summaryrefslogtreecommitdiff
path: root/cogl/cogl-renderer-private.h
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2013-05-14 15:43:04 +0100
committerNeil Roberts <neil@linux.intel.com>2013-05-30 13:41:44 +0100
commit4543ed6ac3af2522beb3a4983bd3a3f7bd2c8c22 (patch)
tree6a67311e006a3be999419ef51a0dde311a8c829e /cogl/cogl-renderer-private.h
parentcc4e144dd773691cb2642063021f1653a9ec4e59 (diff)
downloadcogl-4543ed6ac3af2522beb3a4983bd3a3f7bd2c8c22.tar.gz
win32: Automatically process windows messages when using a GMainLoop
Previously the WGL winsys was expecting the application to send all windows messages to Cogl via the cogl_win32_renderer_handle_event function. When using a GLib main loop we can make this work transparently to the application with a GSource for the magic G_WIN32_MSG_HANDLE file descriptor. That causes the GMainLoop to wake up whenever a message is available. This patch makes the WGL winsys add that magic value as a source fd. This will only have any meaning if the application is using glib, but it shouldn't matter because the cogl_poll_renderer_get_info function is documented to only work on Unix-based winsys's anyway. This patch is an API break because by default Cogl will now start stealing all of the Windows messages. Something like Clutter that wants to handle its own event retrieval would now need to call cogl_win32_renderer_set_event_retrieval_enabled to stop Cogl from stealing the events. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 99a7f84d7149f24f3e86c5d3562f9f2632ff6df8)
Diffstat (limited to 'cogl/cogl-renderer-private.h')
-rw-r--r--cogl/cogl-renderer-private.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/cogl/cogl-renderer-private.h b/cogl/cogl-renderer-private.h
index e71e8b9b..62aca7e3 100644
--- a/cogl/cogl-renderer-private.h
+++ b/cogl/cogl-renderer-private.h
@@ -65,6 +65,10 @@ struct _CoglRenderer
CoglBool xlib_enable_event_retrieval;
#endif
+#ifdef COGL_HAS_WIN32_SUPPORT
+ CoglBool win32_enable_event_retrieval;
+#endif
+
CoglDriver driver;
#ifndef HAVE_DIRECTLY_LINKED_GL_LIBRARY
GModule *libgl_module;