onscreen: make platform specific onscreen apis consistent

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>
This commit is contained in:
Robert Bragg 2011-07-01 01:58:38 +01:00
parent b2e735ff7f
commit 38b67e2884
4 changed files with 27 additions and 27 deletions

View File

@ -1629,7 +1629,7 @@ cogl_framebuffer_swap_region (CoglFramebuffer *framebuffer,
#ifdef COGL_HAS_X11_SUPPORT #ifdef COGL_HAS_X11_SUPPORT
void void
cogl_onscreen_x11_set_foreign_window_xid (CoglOnscreen *onscreen, cogl_x11_onscreen_set_foreign_window_xid (CoglOnscreen *onscreen,
guint32 xid, guint32 xid,
CoglOnscreenX11MaskCallback update, CoglOnscreenX11MaskCallback update,
void *user_data) void *user_data)
@ -1644,7 +1644,7 @@ cogl_onscreen_x11_set_foreign_window_xid (CoglOnscreen *onscreen,
} }
guint32 guint32
cogl_onscreen_x11_get_window_xid (CoglOnscreen *onscreen) cogl_x11_onscreen_get_window_xid (CoglOnscreen *onscreen)
{ {
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen); CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
@ -1662,7 +1662,7 @@ cogl_onscreen_x11_get_window_xid (CoglOnscreen *onscreen)
} }
guint32 guint32
cogl_onscreen_x11_get_visual_xid (CoglOnscreen *onscreen) cogl_x11_onscreen_get_visual_xid (CoglOnscreen *onscreen)
{ {
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen); CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
const CoglWinsysVtable *winsys = _cogl_framebuffer_get_winsys (framebuffer); const CoglWinsysVtable *winsys = _cogl_framebuffer_get_winsys (framebuffer);
@ -1683,14 +1683,14 @@ cogl_onscreen_x11_get_visual_xid (CoglOnscreen *onscreen)
#ifdef COGL_HAS_WIN32_SUPPORT #ifdef COGL_HAS_WIN32_SUPPORT
void void
cogl_onscreen_win32_set_foreign_window (CoglOnscreen *onscreen, cogl_win32_onscreen_set_foreign_window (CoglOnscreen *onscreen,
HWND hwnd) HWND hwnd)
{ {
onscreen->foreign_hwnd = hwnd; onscreen->foreign_hwnd = hwnd;
} }
HWND HWND
cogl_onscreen_win32_get_window (CoglOnscreen *onscreen) cogl_win32_onscreen_get_window (CoglOnscreen *onscreen)
{ {
if (onscreen->foreign_hwnd) if (onscreen->foreign_hwnd)
return onscreen->foreign_hwnd; return onscreen->foreign_hwnd;

View File

@ -225,7 +225,7 @@ typedef void (*CoglOnscreenX11MaskCallback) (CoglOnscreen *onscreen,
void *user_data); void *user_data);
/** /**
* cogl_onscreen_x11_set_foreign_window_xid: * cogl_x11_onscreen_set_foreign_window_xid:
* @onscreen: The unallocated framebuffer to associated with an X * @onscreen: The unallocated framebuffer to associated with an X
* window. * window.
* @xid: The XID of an existing X window * @xid: The XID of an existing X window
@ -263,7 +263,7 @@ typedef void (*CoglOnscreenX11MaskCallback) (CoglOnscreen *onscreen,
* *
* { * {
* *snip* * *snip*
* cogl_onscreen_x11_set_foreign_window_xid (onscreen, * cogl_x11_onscreen_set_foreign_window_xid (onscreen,
* data->xwin, * data->xwin,
* my_update_cogl_x11_event_mask, * my_update_cogl_x11_event_mask,
* data); * data);
@ -274,33 +274,33 @@ typedef void (*CoglOnscreenX11MaskCallback) (CoglOnscreen *onscreen,
* Since: 2.0 * Since: 2.0
* Stability: Unstable * Stability: Unstable
*/ */
#define cogl_onscreen_x11_set_foreign_window_xid \ #define cogl_x11_onscreen_set_foreign_window_xid \
cogl_onscreen_x11_set_foreign_window_xid_EXP cogl_x11_onscreen_set_foreign_window_xid_EXP
void void
cogl_onscreen_x11_set_foreign_window_xid (CoglOnscreen *onscreen, cogl_x11_onscreen_set_foreign_window_xid (CoglOnscreen *onscreen,
guint32 xid, guint32 xid,
CoglOnscreenX11MaskCallback update, CoglOnscreenX11MaskCallback update,
void *user_data); void *user_data);
#define cogl_onscreen_x11_get_window_xid cogl_onscreen_x11_get_window_xid_EXP #define cogl_x11_onscreen_get_window_xid cogl_x11_onscreen_get_window_xid_EXP
guint32 guint32
cogl_onscreen_x11_get_window_xid (CoglOnscreen *onscreen); cogl_x11_onscreen_get_window_xid (CoglOnscreen *onscreen);
#define cogl_onscreen_x11_get_visual_xid cogl_onscreen_x11_get_visual_xid_EXP #define cogl_x11_onscreen_get_visual_xid cogl_x11_onscreen_get_visual_xid_EXP
guint32 guint32
cogl_onscreen_x11_get_visual_xid (CoglOnscreen *onscreen); cogl_x11_onscreen_get_visual_xid (CoglOnscreen *onscreen);
#endif /* COGL_HAS_X11 */ #endif /* COGL_HAS_X11 */
#ifdef COGL_HAS_WIN32_SUPPORT #ifdef COGL_HAS_WIN32_SUPPORT
#define cogl_onscreen_win32_set_foreign_window \ #define cogl_win32_onscreen_set_foreign_window \
cogl_onscreen_win32_set_foreign_window_EXP cogl_win32_onscreen_set_foreign_window_EXP
void void
cogl_onscreen_win32_set_foreign_window (CoglOnscreen *onscreen, cogl_win32_onscreen_set_foreign_window (CoglOnscreen *onscreen,
HWND hwnd); HWND hwnd);
#define cogl_onscreen_win32_get_window cogl_onscreen_win32_get_window_EXP #define cogl_win32_onscreen_get_window cogl_win32_onscreen_get_window_EXP
HWND HWND
cogl_onscreen_win32_get_window (CoglOnscreen *onscreen); cogl_win32_onscreen_get_window (CoglOnscreen *onscreen);
#endif /* COGL_HAS_WIN32_SUPPORT */ #endif /* COGL_HAS_WIN32_SUPPORT */
#if COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT #if COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT

View File

@ -338,11 +338,11 @@ cogl_pop_framebuffer
CoglOnscreen CoglOnscreen
COGL_ONSCREEN COGL_ONSCREEN
cogl_onscreen_new cogl_onscreen_new
cogl_onscreen_x11_set_foreign_window_xid cogl_x11_onscreen_set_foreign_window_xid
cogl_onscreen_x11_get_window_xid cogl_x11_onscreen_get_window_xid
cogl_onscreen_x11_get_visual_xid cogl_x11_onscreen_get_visual_xid
cogl_onscreen_win32_set_foreign_window cogl_win32_onscreen_set_foreign_window
cogl_onscreen_win32_get_window cogl_win32_onscreen_get_window
cogl_onscreen_set_swap_throttled cogl_onscreen_set_swap_throttled
cogl_onscreen_show cogl_onscreen_show
cogl_onscreen_hide cogl_onscreen_hide

View File

@ -24,7 +24,7 @@ update_cogl_x11_event_mask (CoglOnscreen *onscreen,
guint32 xwin; guint32 xwin;
attrs.event_mask = event_mask | X11_FOREIGN_EVENT_MASK; attrs.event_mask = event_mask | X11_FOREIGN_EVENT_MASK;
xwin = cogl_onscreen_x11_get_window_xid (onscreen); xwin = cogl_x11_onscreen_get_window_xid (onscreen);
XChangeWindowAttributes (xdpy, XChangeWindowAttributes (xdpy,
(Window)xwin, (Window)xwin,
@ -112,7 +112,7 @@ main (int argc, char **argv)
/* We want to test that Cogl can handle foreign X windows... */ /* We want to test that Cogl can handle foreign X windows... */
visual = cogl_onscreen_x11_get_visual_xid (onscreen); visual = cogl_x11_onscreen_get_visual_xid (onscreen);
if (!visual) if (!visual)
{ {
fprintf (stderr, "Failed to query an X visual suitable for the " fprintf (stderr, "Failed to query an X visual suitable for the "
@ -144,7 +144,7 @@ main (int argc, char **argv)
XFree (xvisinfo); XFree (xvisinfo);
cogl_onscreen_x11_set_foreign_window_xid (onscreen, xwin, cogl_x11_onscreen_set_foreign_window_xid (onscreen, xwin,
update_cogl_x11_event_mask, update_cogl_x11_event_mask,
xdpy); xdpy);