For cogl 2.0 we don't want to have a default context. In the meantime
we can simply assume that calling cogl_context_new() implicitly
sets that context as the default context before returning.
Signed-off-by: Neil Roberts <neil@linux.intel.com>
There were several CoglOnscreen functions named like:
cogl_onscreen_<platform>_blah instead of cogl_<platform>_onscreen_blah
so this patch updates those to be consistent with other platform
specific apis we have in cogl.
Signed-off-by: Neil Roberts <neil@linux.intel.com>
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>
This adds Xlib and Win32 typesafe replacements for
cogl_renderer_handle_native_event, cogl_renderer_add_native_filter,
cogl_renderer_remove_native_filter. The old functions are kept as an
implementation detail so we can share code.
Signed-off-by: Neil Roberts <neil@linux.intel.com>
This update the x11-foreign test so that it checks for events on its X
display and forwards them on to Cogl. It will now also quit if any key
of button is pressed.
This extends cogl_onscreen_x11_set_foreign_xid to take a callback to a
function that details the event mask the Cogl requires the application
to select on foreign windows. This is required because Cogl, for
example, needs to track size changes of a window and may also in the
future want other notifications such as map/unmap.
Most applications wont need to use the foreign xwindow apis, but those
that do are required to pass a valid callback and update the event mask
of their window according to Cogl's requirements.
This adds a simple standalone Cogl application that can be used to
smoke test a standalone build of Cogl without Clutter.
This also adds an x11-foreign app that shows how a toolkit can ask Cogl
to draw to an X Window that it owns instead of Cogl being responsible
for automatically creating and mapping an X Window for CoglOnscreen.