diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c index 7cf6048cf..0d7188324 100644 --- a/cogl/cogl-framebuffer.c +++ b/cogl/cogl-framebuffer.c @@ -1629,7 +1629,7 @@ cogl_framebuffer_swap_region (CoglFramebuffer *framebuffer, #ifdef COGL_HAS_X11_SUPPORT void -cogl_onscreen_x11_set_foreign_window_xid (CoglOnscreen *onscreen, +cogl_x11_onscreen_set_foreign_window_xid (CoglOnscreen *onscreen, guint32 xid, CoglOnscreenX11MaskCallback update, void *user_data) @@ -1644,7 +1644,7 @@ cogl_onscreen_x11_set_foreign_window_xid (CoglOnscreen *onscreen, } guint32 -cogl_onscreen_x11_get_window_xid (CoglOnscreen *onscreen) +cogl_x11_onscreen_get_window_xid (CoglOnscreen *onscreen) { CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen); @@ -1662,7 +1662,7 @@ cogl_onscreen_x11_get_window_xid (CoglOnscreen *onscreen) } guint32 -cogl_onscreen_x11_get_visual_xid (CoglOnscreen *onscreen) +cogl_x11_onscreen_get_visual_xid (CoglOnscreen *onscreen) { CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen); 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 void -cogl_onscreen_win32_set_foreign_window (CoglOnscreen *onscreen, +cogl_win32_onscreen_set_foreign_window (CoglOnscreen *onscreen, HWND hwnd) { onscreen->foreign_hwnd = hwnd; } HWND -cogl_onscreen_win32_get_window (CoglOnscreen *onscreen) +cogl_win32_onscreen_get_window (CoglOnscreen *onscreen) { if (onscreen->foreign_hwnd) return onscreen->foreign_hwnd; diff --git a/cogl/cogl-framebuffer.h b/cogl/cogl-framebuffer.h index fcf29144e..77df43444 100644 --- a/cogl/cogl-framebuffer.h +++ b/cogl/cogl-framebuffer.h @@ -225,7 +225,7 @@ typedef void (*CoglOnscreenX11MaskCallback) (CoglOnscreen *onscreen, 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 * window. * @xid: The XID of an existing X window @@ -263,7 +263,7 @@ typedef void (*CoglOnscreenX11MaskCallback) (CoglOnscreen *onscreen, * * { * *snip* - * cogl_onscreen_x11_set_foreign_window_xid (onscreen, + * cogl_x11_onscreen_set_foreign_window_xid (onscreen, * data->xwin, * my_update_cogl_x11_event_mask, * data); @@ -274,33 +274,33 @@ typedef void (*CoglOnscreenX11MaskCallback) (CoglOnscreen *onscreen, * Since: 2.0 * Stability: Unstable */ -#define cogl_onscreen_x11_set_foreign_window_xid \ - cogl_onscreen_x11_set_foreign_window_xid_EXP +#define cogl_x11_onscreen_set_foreign_window_xid \ + cogl_x11_onscreen_set_foreign_window_xid_EXP void -cogl_onscreen_x11_set_foreign_window_xid (CoglOnscreen *onscreen, +cogl_x11_onscreen_set_foreign_window_xid (CoglOnscreen *onscreen, guint32 xid, CoglOnscreenX11MaskCallback update, 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 -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 -cogl_onscreen_x11_get_visual_xid (CoglOnscreen *onscreen); +cogl_x11_onscreen_get_visual_xid (CoglOnscreen *onscreen); #endif /* COGL_HAS_X11 */ #ifdef COGL_HAS_WIN32_SUPPORT -#define cogl_onscreen_win32_set_foreign_window \ - cogl_onscreen_win32_set_foreign_window_EXP +#define cogl_win32_onscreen_set_foreign_window \ + cogl_win32_onscreen_set_foreign_window_EXP void -cogl_onscreen_win32_set_foreign_window (CoglOnscreen *onscreen, +cogl_win32_onscreen_set_foreign_window (CoglOnscreen *onscreen, 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 -cogl_onscreen_win32_get_window (CoglOnscreen *onscreen); +cogl_win32_onscreen_get_window (CoglOnscreen *onscreen); #endif /* COGL_HAS_WIN32_SUPPORT */ #if COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT diff --git a/doc/reference/cogl-2.0-experimental/cogl-sections.txt b/doc/reference/cogl-2.0-experimental/cogl-sections.txt index d2c4f8bde..c4f833295 100644 --- a/doc/reference/cogl-2.0-experimental/cogl-sections.txt +++ b/doc/reference/cogl-2.0-experimental/cogl-sections.txt @@ -338,11 +338,11 @@ cogl_pop_framebuffer CoglOnscreen COGL_ONSCREEN cogl_onscreen_new -cogl_onscreen_x11_set_foreign_window_xid -cogl_onscreen_x11_get_window_xid -cogl_onscreen_x11_get_visual_xid -cogl_onscreen_win32_set_foreign_window -cogl_onscreen_win32_get_window +cogl_x11_onscreen_set_foreign_window_xid +cogl_x11_onscreen_get_window_xid +cogl_x11_onscreen_get_visual_xid +cogl_win32_onscreen_set_foreign_window +cogl_win32_onscreen_get_window cogl_onscreen_set_swap_throttled cogl_onscreen_show cogl_onscreen_hide diff --git a/examples/x11-foreign.c b/examples/x11-foreign.c index b9b29ee35..e43a2ef5b 100644 --- a/examples/x11-foreign.c +++ b/examples/x11-foreign.c @@ -24,7 +24,7 @@ update_cogl_x11_event_mask (CoglOnscreen *onscreen, guint32 xwin; 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, (Window)xwin, @@ -112,7 +112,7 @@ main (int argc, char **argv) /* 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) { fprintf (stderr, "Failed to query an X visual suitable for the " @@ -144,7 +144,7 @@ main (int argc, char **argv) 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, xdpy);