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:
authorCampbell Barton <ideasman42@gmail.com>2009-06-14 00:58:43 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-06-14 00:58:43 +0400
commit646d4041e2c3461f4494be126172cf10472914b7 (patch)
tree413a687276b3893dd22b788824c14a077067ff74 /source/blender/windowmanager
parent611e2f484c1d3c1c07abbe289a23623e714c700f (diff)
BGE events, not sure every event works as it should but keyboard looking and mouse focus seems to work ok.
Tested some basic logic brick blend files that use key input which run properly.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c2
-rw-r--r--source/blender/windowmanager/intern/wm_window.c6
-rw-r--r--source/blender/windowmanager/wm_event_system.h2
-rw-r--r--source/blender/windowmanager/wm_window.h1
4 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index f5c8e535002..ea6a65859e5 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -76,7 +76,7 @@ void wm_event_add(wmWindow *win, wmEvent *event_to_add)
BLI_addtail(&win->queue, event);
}
-static void wm_event_free(wmEvent *event)
+void wm_event_free(wmEvent *event)
{
if(event->customdata && event->customdatafree)
MEM_freeN(event->customdata);
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index cb6bcb41366..2d320458543 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -595,6 +595,12 @@ void wm_window_process_events(const bContext *C)
PIL_sleep_ms(5);
}
+void wm_window_process_events_nosleep(const bContext *C)
+{
+ if(GHOST_ProcessEvents(g_system, 0))
+ GHOST_DispatchEvents(g_system);
+}
+
/* exported as handle callback to bke blender.c */
void wm_window_testbreak(void)
{
diff --git a/source/blender/windowmanager/wm_event_system.h b/source/blender/windowmanager/wm_event_system.h
index 99853c77a55..9a3bba9af1d 100644
--- a/source/blender/windowmanager/wm_event_system.h
+++ b/source/blender/windowmanager/wm_event_system.h
@@ -82,6 +82,8 @@ enum {
/* wm_event_system.c */
void wm_event_add (wmWindow *win, wmEvent *event_to_add);
void wm_event_free_all (wmWindow *win);
+void wm_event_free (wmEvent *event);
+
/* goes over entire hierarchy: events -> window -> screen -> area -> region */
void wm_event_do_handlers (bContext *C);
diff --git a/source/blender/windowmanager/wm_window.h b/source/blender/windowmanager/wm_window.h
index 7bf08617fb6..45fa9bf6cf7 100644
--- a/source/blender/windowmanager/wm_window.h
+++ b/source/blender/windowmanager/wm_window.h
@@ -40,6 +40,7 @@ void wm_window_free (bContext *C, wmWindow *win);
void wm_window_title (wmWindowManager *wm, wmWindow *win);
void wm_window_add_ghostwindows (wmWindowManager *wm);
void wm_window_process_events (const bContext *C);
+void wm_window_process_events_nosleep(const bContext *C);
void wm_window_make_drawable(bContext *C, wmWindow *win);