Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2009-01-09 16:55:45 +0300
committerTon Roosendaal <ton@blender.org>2009-01-09 16:55:45 +0300
commitc7fa55eebdd74812c5bd993e8ec54ec5b04197f2 (patch)
tree823862dd9602abdc6329fa2385f3384db8e0f933 /source/blender/windowmanager/WM_api.h
parenta93e253103a222063d71c1628d0ac7729de813ca (diff)
2.5
Vertex Paint back! Added WM level "paint cursor" system, which manages a custom painting cursor for tools or modes. - Activate it with WM_paint_cursor_activate(). That function wants two callbacks, a poll(C) to check whether there's a cursor in given context and ARegion, and a draw(C, x, y) which gets called when appropriate. - While paintcursor is active, the WM handles necessary redrawing events for all regions, also to nicely clear the cursor on region exit. - WM_paint_cursor_activate returns a handle, which you have to use to end the paint cursor. This handle also means you can register as many custom cursors as you want. At the moment, vertex paint mode registers only a mousemove handler, all other events are still normally handled. This is stuff for the future todo.
Diffstat (limited to 'source/blender/windowmanager/WM_api.h')
-rw-r--r--source/blender/windowmanager/WM_api.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 40a67c3c67a..c4cd6d655a3 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -63,6 +63,9 @@ void WM_cursor_restore (struct wmWindow *win);
void WM_cursor_wait (struct wmWindow *win, int val);
void WM_timecursor (struct wmWindow *win, int nr);
+void *WM_paint_cursor_activate(struct wmWindowManager *wm, int (*poll)(struct bContext *C), void (*draw)(struct bContext *C, int, int));
+void WM_paint_cursor_end(struct wmWindowManager *wm, void *handle);
+
/* keymap */
wmKeymapItem *WM_keymap_set_item (ListBase *lb, char *idname, short type,
short val, int modifier, short keymodifier);