Commit Graph

3 Commits

Author SHA1 Message Date
Neil Roberts
181b875a3d xlib: Internally retrieve XEvents
Previously we relied on the application to send all X events through
Cogl using cogl_xlib_renderer_handle_event. This breaks the
abstraction that an application shouldn't need to know what winsys
Cogl is using. Now that we have main loop integreation in Cogl, the
Xlib-based winsys's can report that Cogl needs to block on the file
descriptor of the X connection and it can manually handle the
events.

The event retrieval can be disabled by an application if it calls the
new cogl_xlib_renderer_set_event_retrieval_enabled() function. The
event retrieval will also automatically be disabled if the application
sets a foreign display.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-01-05 13:40:24 +00:00
Neil Roberts
a8f84af776 cogl-xlib-renderer: Move private data to cogl_object_set_user_data
Previously the Xlib renderer data was meant to be the first member of
whatever the winsys data is. This doesn't work well for the EGL winsys
because it only needs the Xlib data if the X11 platform is used. The
Xlib renderer data is now instead created on demand and connected to
the object using cogl_object_set_user_data. There is a new function to
get access to it.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-12-12 16:13:57 +00:00
Robert Bragg
89562dda73 work towards consistent platform file/symbol naming
we've got into a bit of a mess with how we name platform specific
symbols and files, so this is a first pass at trying to tidy that up.

All platform specific symbols should be named like
cogl_<platform>_symbol_name and similarly files should be named like
cogl-<platform>-filename.c

This patch tackles the X11 specific renderer/display APIs as a start.

Signed-off-by: Neil Roberts <neil@linux.intel.com>
2011-06-30 14:34:33 +01:00