diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-11 18:18:21 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-11 18:18:21 +0300 |
commit | 4a4b0732e5d1bc71dde53934a4e74dc782beee1c (patch) | |
tree | 89731bd1e7c0a2305d947c8db1d68055c82f1f4e /source/blender/windowmanager/wm_event_types.h | |
parent | 3bb5fc9c7d10f7dec32f8d2a772fce69be468b15 (diff) |
Various changes made in the process of working on the UI code:
* Added functions to generate Timer events. There was some unfinished code to
create one timer per window, this replaces that with a way to let operators
or other handlers add/remove their own timers as needed. This is currently
delivered as an event with the timer handle, perhaps this should be a notifier
instead? Also includes some fixes in ghost for timer events that were not
delivered in time, due to passing negative timeout.
* Added a Message event, which is a generic event that can be added by any
operator. This is used in the UI code to communicate the results of opened
blocks. Again, this may be better as a notifier.
* These two events should not be blocked as they are intended for a specific
operator or handler, so there were exceptions added for this, which is one
of the reasons they might work better as notifiers, but currently these
things can't listen to notifier yet.
* Added an option to events to indicate if the customdata should be freed or
not.
* Added a free() callback for area regions, and added a free function for
area regions in blenkernel since it was already there for screens and areas.
* Added ED_screen/area/region_exit functions to clean up things like operators
and handlers when they are closed.
* Added screen level regions, these will draw over areas boundaries, with the
last created region on top. These are useful for tooltips, menus, etc, and
are not saved to file. It's using the same ARegion struct as areas to avoid
code duplication, but perhaps that should be renamed then. Note that redraws
currently go correct, because only full window redraws are used, for partial
redraws without any frontbuffer drawing, the window manager needs to get
support for compositing subwindows.
* Minor changes in the subwindow code to retrieve the matrix, and moved
setlinestyle to glutil.c.
* Reversed argument order in WM_event_add/remove_keymap_handler to be consistent
with modal_handler.
* Operators can now block events but not necessarily cancel/finish.
* Modal operators are now stored in a list in the window/area/region they were
created in. This means for example that when a transform operator is invoked
from a region but registers a handler at the window level (since mouse motion
across areas should work), it will still get removed when the region is closed
while the operator is running.
Diffstat (limited to 'source/blender/windowmanager/wm_event_types.h')
-rw-r--r-- | source/blender/windowmanager/wm_event_types.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h index 842bf0fce84..0e2a7c3b9fb 100644 --- a/source/blender/windowmanager/wm_event_types.h +++ b/source/blender/windowmanager/wm_event_types.h @@ -38,6 +38,8 @@ /* custom data type */ #define EVT_TABLET 1 #define EVT_GESTURE 2 +#define EVT_TIMER 3 +#define EVT_MESSAGE 4 #define MOUSEX 0x004 #define MOUSEY 0x005 @@ -56,16 +58,18 @@ /* SYSTEM : 0x01x */ -#define KEYBD 0x010 /* keyboard */ -#define RAWKEYBD 0x011 /* raw keyboard for keyboard manager */ -#define REDRAW 0x012 /* used by port manager to signal redraws */ -#define INPUTCHANGE 0x013 /* input connected or disconnected */ -#define QFULL 0x014 /* queue was filled */ -#define WINFREEZE 0x015 /* user wants process in this win to shut up */ -#define WINTHAW 0x016 /* user wants process in this win to go again */ -#define WINCLOSE 0x017 /* window close */ -#define WINQUIT 0x018 /* signal from user that app is to go away */ -#define Q_FIRSTTIME 0x019 /* on startup */ +#define KEYBD 0x0100 /* keyboard */ +#define RAWKEYBD 0x0101 /* raw keyboard for keyboard manager */ +#define REDRAW 0x0102 /* used by port manager to signal redraws */ +#define INPUTCHANGE 0x0103 /* input connected or disconnected */ +#define QFULL 0x0104 /* queue was filled */ +#define WINFREEZE 0x0105 /* user wants process in this win to shut up */ +#define WINTHAW 0x0106 /* user wants process in this win to go again */ +#define WINCLOSE 0x0107 /* window close */ +#define WINQUIT 0x0108 /* signal from user that app is to go away */ +#define Q_FIRSTTIME 0x0109 /* on startup */ +#define TIMER 0x0110 /* timer event */ +#define MESSAGE 0x0111 /* message event */ /* standard keyboard */ |