diff options
author | Daniel Dunbar <daniel@zuster.org> | 2004-05-04 23:10:55 +0400 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2004-05-04 23:10:55 +0400 |
commit | 400cd96effacc007b4b445cffc34884d718dafed (patch) | |
tree | 84c75bc9f06a2df84ffe28587c9b7e6e2b330382 /source/blender/src/ghostwinlay.c | |
parent | 2620ee4dc2ad101f5581b947ef861c4526402639 (diff) |
- ugh, do not break open an abstract data type just to add one single
function, especially when you are introducing extra dependencies
(GHOST) on files that should not have them.
Diffstat (limited to 'source/blender/src/ghostwinlay.c')
-rw-r--r-- | source/blender/src/ghostwinlay.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/source/blender/src/ghostwinlay.c b/source/blender/src/ghostwinlay.c index b6a7c8ba354..0cb396d25cb 100644 --- a/source/blender/src/ghostwinlay.c +++ b/source/blender/src/ghostwinlay.c @@ -57,12 +57,43 @@ #include "BIF_mywindow.h" #include "BIF_screen.h" #include "BIF_usiblender.h" +#include "BIF_cursors.h" #include "mydevice.h" #include "blendef.h" #include "winlay.h" +/// + +struct _Window { + GHOST_WindowHandle ghostwin; + + /* Handler and private data for handler */ + WindowHandlerFP handler; + void *user_data; + + /* Window state */ + int size[2], position[2]; + int active, visible; + + /* Last known mouse/button/qualifier state */ + int lmouse[2]; + int lqual; /* (LR_SHFTKEY, LR_CTRLKEY, LR_ALTKEY) */ + int lmbut; /* (L_MOUSE, M_MOUSE, R_MOUSE) */ + int commandqual; + + /* Tracks the faked mouse button, if non-zero it is + * the event number of the last faked button. + */ + int faked_mbut; + + GHOST_TimerTaskHandle timer; + int timer_event; +}; + +/// + static GHOST_SystemHandle g_system= 0; /* Some simple ghost <-> blender conversions */ @@ -306,6 +337,22 @@ void window_set_custom_cursor(Window *win, unsigned char mask[16][2], GHOST_SetCustomCursorShape(win->ghostwin, bitmap, mask, hotx, hoty); } +void window_set_custom_cursor_ex(Window *win, BCursor *cursor, int useBig) { + if (useBig) { + GHOST_SetCustomCursorShapeEx(win->ghostwin, + cursor->big_bm, cursor->big_mask, + cursor->big_sizex,cursor->big_sizey, + cursor->big_hotx,cursor->big_hoty, + cursor->fg_color, cursor->bg_color); + } else { + GHOST_SetCustomCursorShapeEx(win->ghostwin, + cursor->small_bm, cursor->small_mask, + cursor->small_sizex,cursor->small_sizey, + cursor->small_hotx,cursor->small_hoty, + cursor->fg_color, cursor->bg_color); + } +} + void window_make_active(Window *win) { if (win != active_gl_window) { active_gl_window= win; |