Move event polling into CoglRenderer

This updates the cogl_poll_ apis to allow dispatching events before we
have a CoglContext and to also enables pollfd state to be changed in a
more add-hoc way by different Cogl components by replacing the
winsys->get_poll_info with _cogl_poll_renderer_add/remove_fd functions
and a winsys->get_dispatch_timeout vfunc.

One of the intentions here is that applications should be able to run
their mainloop before creating a CoglContext to potentially get events
relating to CoglOutputs.

Reviewed-by: Neil Roberts <neil@linux.intel.com>

(cherry picked from commit 667e58c9cb2662aef5f44e580a9eda42dc8d0176)
This commit is contained in:
Robert Bragg
2013-04-16 23:46:03 +01:00
parent 816a5bc437
commit ed90c6fed9
29 changed files with 489 additions and 285 deletions

View File

@ -236,12 +236,13 @@ COGL_PREMULT_BIT
<SECTION>
<FILE>cogl-poll</FILE>
<TITLE>Main loop integeration</TITLE>
<TITLE>Main loop integration</TITLE>
CoglPollFDEvent
CoglPollFD
cogl_poll_get_info
cogl_poll_dispatch
cogl_poll_renderer_get_info
cogl_poll_renderer_dispatch
cogl_glib_source_new
cogl_glib_renderer_source_new
</SECTION>
<SECTION>