mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 19:40:43 -05:00
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:
parent
b2e735ff7f
commit
38b67e2884
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user