Blender Git Loki

Git Commits -> Revision 4a4b073

Revision 4a4b073 by Brecht Van Lommel (master)
November 11, 2008, 15:18 (GMT)

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.

Commit Details:

Full Hash: 4a4b0732e5d1bc71dde53934a4e74dc782beee1c
SVN Revision: 17408
Parent Commit: 3bb5fc9
Lines Changed: +429, -176

24 Modified Paths:

/intern/ghost/GHOST_Types.h (+2, -0) (Diff)
/intern/ghost/intern/GHOST_SystemCarbon.cpp (+2, -4) (Diff)
/intern/ghost/intern/GHOST_SystemWin32.cpp (+3, -2) (Diff)
/intern/ghost/intern/GHOST_SystemX11.cpp (+4, -1) (Diff)
/source/blender/blenkernel/BKE_screen.h (+2, -0) (Diff)
/source/blender/blenkernel/intern/screen.c (+10, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+7, -1) (Diff)
/source/blender/editors/include/BIF_glutil.h (+1, -0) (Diff)
/source/blender/editors/include/ED_screen.h (+4, -0) (Diff)
/source/blender/editors/screen/area.c (+23, -13) (Diff)
/source/blender/editors/screen/glutil.c (+12, -0) (Diff)
/source/blender/editors/screen/screen_edit.c (+43, -8) (Diff)
/source/blender/editors/space_time/space_time.c (+4, -4) (Diff)
/source/blender/editors/space_view3d/space_view3d.c (+1, -1) (Diff)
/source/blender/makesdna/DNA_screen_types.h (+10, -2) (Diff)
/source/blender/makesdna/DNA_windowmanager_types.h (+11, -9) (Diff)
/source/blender/windowmanager/intern/wm_event_system.c (+203, -57) (Diff)
/source/blender/windowmanager/intern/wm_files.c (+4, -5) (Diff)
/source/blender/windowmanager/intern/wm_subwindow.c (+32, -36) (Diff)
/source/blender/windowmanager/intern/wm_window.c (+18, -18) (Diff)
/source/blender/windowmanager/WM_api.h (+12, -2) (Diff)
/source/blender/windowmanager/wm_event_types.h (+14, -10) (Diff)
/source/blender/windowmanager/wm_subwindow.h (+3, -3) (Diff)
/source/blender/windowmanager/WM_types.h (+4, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021