mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 20:32:16 +00:00
b2482a2069
Mutter needs to fetch the X11 Window ID from the onscreen and did that by using an X11 specific API on the CoglOnscreen, where the X11 type was "expanded" (Window -> uint32_t). Change this by introducing an interface called CoglX11Onscreen, implemented by both the Xlib and GLX onscreen implementations, that keeps the right type (Window), while avoiding X11 specific API for CoglOnscreen. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1514>
50 lines
1.4 KiB
C
50 lines
1.4 KiB
C
/*
|
|
* Copyright (C) 2020 Red Hat Inc.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License as
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
* License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
* 02111-1307, USA.
|
|
*
|
|
*/
|
|
|
|
#if !defined(__COGL_H_INSIDE__) && !defined(COGL_COMPILATION)
|
|
#error "Only <cogl/cogl.h> can be included directly."
|
|
#endif
|
|
|
|
#ifndef COGL_X11_ONSCREEN_H
|
|
#define COGL_X11_ONSCREEN_H
|
|
|
|
#include <glib-object.h>
|
|
#include <X11/Xlib.h>
|
|
|
|
#include "cogl-macros.h"
|
|
|
|
#define COGL_TYPE_X11_ONSCREEN (cogl_x11_onscreen_get_type ())
|
|
COGL_EXPORT
|
|
G_DECLARE_INTERFACE (CoglX11Onscreen, cogl_x11_onscreen,
|
|
COGL, X11_ONSCREEN,
|
|
GObject)
|
|
|
|
struct _CoglX11OnscreenInterface
|
|
{
|
|
GTypeInterface parent_iface;
|
|
|
|
Window (* get_x11_window) (CoglX11Onscreen *x11_onscreen);
|
|
};
|
|
|
|
COGL_EXPORT
|
|
Window cogl_x11_onscreen_get_x11_window (CoglX11Onscreen *x11_onscreen);
|
|
|
|
#endif /* COGL_X11_ONSCREEN_H */
|