x11: Hide all private symbols
The x11 backend exposes a lot of symbols that are meant to only be used when implementing a subclassed backend, like the glx and eglx ones. The uninstalled headers are also filled with cruft declarations of functions long since removed. Let's try to clean up this mess.
This commit is contained in:
parent
89467abae5
commit
a277b4091a
@ -290,7 +290,7 @@ retry:
|
||||
* a dummy, offscreen override-redirect window to which we can always
|
||||
* fall back if no stage is available */
|
||||
|
||||
xvisinfo = clutter_backend_x11_get_visual_info (backend_x11);
|
||||
xvisinfo = _clutter_backend_x11_get_visual_info (backend_x11);
|
||||
if (xvisinfo == NULL)
|
||||
{
|
||||
g_critical ("Unable to find suitable GL visual.");
|
||||
@ -679,7 +679,7 @@ check_vblank_env (const char *name)
|
||||
static ClutterFeatureFlags
|
||||
clutter_backend_egl_get_features (ClutterBackend *backend)
|
||||
{
|
||||
ClutterBackendEGL *backend_egl = CLUTTER_BACKEND_EGL (backend);
|
||||
ClutterBackendEGL *backend_egl = CLUTTER_BACKEND_EGL (backend);
|
||||
const gchar *egl_extensions = NULL;
|
||||
const gchar *gl_extensions = NULL;
|
||||
ClutterFeatureFlags flags;
|
||||
@ -687,8 +687,13 @@ clutter_backend_egl_get_features (ClutterBackend *backend)
|
||||
g_assert (backend_egl->egl_context != NULL);
|
||||
|
||||
#ifdef COGL_HAS_XLIB_SUPPORT
|
||||
flags = clutter_backend_x11_get_features (backend);
|
||||
flags |= CLUTTER_FEATURE_STAGE_MULTIPLE;
|
||||
{
|
||||
ClutterBackendClass *parent_class;
|
||||
|
||||
parent_class = CLUTTER_BACKEND_CLASS (_clutter_backend_egl_parent_class);
|
||||
flags = parent_class->get_features (backend);
|
||||
flags |= CLUTTER_FEATURE_STAGE_MULTIPLE;
|
||||
}
|
||||
#else
|
||||
flags = CLUTTER_FEATURE_STAGE_STATIC;
|
||||
#endif
|
||||
|
@ -69,6 +69,8 @@ static gboolean
|
||||
clutter_backend_glx_pre_parse (ClutterBackend *backend,
|
||||
GError **error)
|
||||
{
|
||||
ClutterBackendClass *parent_class =
|
||||
CLUTTER_BACKEND_CLASS (_clutter_backend_glx_parent_class);
|
||||
const gchar *env_string;
|
||||
|
||||
env_string = g_getenv ("CLUTTER_VBLANK");
|
||||
@ -78,7 +80,7 @@ clutter_backend_glx_pre_parse (ClutterBackend *backend,
|
||||
env_string = NULL;
|
||||
}
|
||||
|
||||
return clutter_backend_x11_pre_parse (backend, error);
|
||||
return parent_class->pre_parse (backend, error);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -87,11 +89,11 @@ clutter_backend_glx_post_parse (ClutterBackend *backend,
|
||||
{
|
||||
ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (backend);
|
||||
ClutterBackendGLX *backend_glx = CLUTTER_BACKEND_GLX (backend);
|
||||
ClutterBackendClass *backend_class =
|
||||
ClutterBackendClass *parent_class =
|
||||
CLUTTER_BACKEND_CLASS (_clutter_backend_glx_parent_class);
|
||||
int glx_major, glx_minor;
|
||||
|
||||
if (!backend_class->post_parse (backend, error))
|
||||
if (!parent_class->post_parse (backend, error))
|
||||
return FALSE;
|
||||
|
||||
if (!glXQueryExtension (backend_x11->xdpy,
|
||||
@ -134,8 +136,12 @@ static void
|
||||
clutter_backend_glx_add_options (ClutterBackend *backend,
|
||||
GOptionGroup *group)
|
||||
{
|
||||
ClutterBackendClass *parent_class =
|
||||
CLUTTER_BACKEND_CLASS (_clutter_backend_glx_parent_class);
|
||||
|
||||
g_option_group_add_entries (group, entries);
|
||||
clutter_backend_x11_add_options (backend, group);
|
||||
|
||||
parent_class->add_options (backend, group);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -215,12 +221,15 @@ static ClutterFeatureFlags
|
||||
clutter_backend_glx_get_features (ClutterBackend *backend)
|
||||
{
|
||||
ClutterBackendGLX *backend_glx = CLUTTER_BACKEND_GLX (backend);
|
||||
ClutterBackendClass *parent_class;
|
||||
const gchar *glx_extensions = NULL;
|
||||
const gchar *gl_extensions = NULL;
|
||||
ClutterFeatureFlags flags;
|
||||
gboolean use_dri = FALSE;
|
||||
|
||||
flags = clutter_backend_x11_get_features (backend);
|
||||
parent_class = CLUTTER_BACKEND_CLASS (_clutter_backend_glx_parent_class);
|
||||
|
||||
flags = parent_class->get_features (backend);
|
||||
flags |= CLUTTER_FEATURE_STAGE_MULTIPLE;
|
||||
|
||||
/* this will make sure that the GL context exists */
|
||||
|
@ -68,6 +68,8 @@
|
||||
#include "clutter-main.h"
|
||||
#include "clutter-private.h"
|
||||
|
||||
#define clutter_backend_x11_get_type _clutter_backend_x11_get_type
|
||||
|
||||
G_DEFINE_TYPE (ClutterBackendX11, clutter_backend_x11, CLUTTER_TYPE_BACKEND);
|
||||
|
||||
/* atoms; remember to add the code that assigns the atom value to
|
||||
@ -294,8 +296,8 @@ clutter_backend_x11_create_keymap (ClutterBackendX11 *backend_x11)
|
||||
}
|
||||
|
||||
gboolean
|
||||
clutter_backend_x11_pre_parse (ClutterBackend *backend,
|
||||
GError **error)
|
||||
_clutter_backend_x11_pre_parse (ClutterBackend *backend,
|
||||
GError **error)
|
||||
{
|
||||
const gchar *env_string;
|
||||
|
||||
@ -327,8 +329,8 @@ clutter_backend_x11_pre_parse (ClutterBackend *backend,
|
||||
}
|
||||
|
||||
gboolean
|
||||
clutter_backend_x11_post_parse (ClutterBackend *backend,
|
||||
GError **error)
|
||||
_clutter_backend_x11_post_parse (ClutterBackend *backend,
|
||||
GError **error)
|
||||
{
|
||||
ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (backend);
|
||||
|
||||
@ -716,8 +718,8 @@ clutter_backend_x11_class_init (ClutterBackendX11Class *klass)
|
||||
gobject_class->dispose = clutter_backend_x11_dispose;
|
||||
gobject_class->finalize = clutter_backend_x11_finalize;
|
||||
|
||||
backend_class->pre_parse = clutter_backend_x11_pre_parse;
|
||||
backend_class->post_parse = clutter_backend_x11_post_parse;
|
||||
backend_class->pre_parse = _clutter_backend_x11_pre_parse;
|
||||
backend_class->post_parse = _clutter_backend_x11_post_parse;
|
||||
backend_class->init_events = clutter_backend_x11_init_events;
|
||||
backend_class->add_options = clutter_backend_x11_add_options;
|
||||
backend_class->get_features = clutter_backend_x11_get_features;
|
||||
@ -1015,16 +1017,6 @@ clutter_x11_remove_filter (ClutterX11FilterFunc func,
|
||||
}
|
||||
}
|
||||
|
||||
ClutterInputDevice *
|
||||
_clutter_x11_get_device_for_xid (XID id)
|
||||
{
|
||||
ClutterDeviceManager *manager;
|
||||
|
||||
manager = clutter_device_manager_get_default ();
|
||||
|
||||
return clutter_device_manager_get_device (manager, (gint) id);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_x11_get_input_devices:
|
||||
*
|
||||
@ -1167,7 +1159,7 @@ clutter_x11_get_use_argb_visual (void)
|
||||
}
|
||||
|
||||
XVisualInfo *
|
||||
clutter_backend_x11_get_visual_info (ClutterBackendX11 *backend_x11)
|
||||
_clutter_backend_x11_get_visual_info (ClutterBackendX11 *backend_x11)
|
||||
{
|
||||
ClutterBackendX11Class *klass;
|
||||
|
||||
@ -1199,7 +1191,7 @@ clutter_x11_get_visual_info (void)
|
||||
|
||||
backend_x11 = CLUTTER_BACKEND_X11 (clutter_get_default_backend ());
|
||||
|
||||
return clutter_backend_x11_get_visual_info (backend_x11);
|
||||
return _clutter_backend_x11_get_visual_info (backend_x11);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CLUTTER_TYPE_BACKEND_X11 (clutter_backend_x11_get_type ())
|
||||
#define CLUTTER_TYPE_BACKEND_X11 (_clutter_backend_x11_get_type ())
|
||||
#define CLUTTER_BACKEND_X11(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_BACKEND_X11, ClutterBackendX11))
|
||||
#define CLUTTER_IS_BACKEND_X11(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_BACKEND_X11))
|
||||
#define CLUTTER_BACKEND_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_BACKEND_X11, ClutterBackendX11Class))
|
||||
@ -128,36 +128,11 @@ struct _ClutterBackendX11Class
|
||||
void _clutter_backend_x11_events_init (ClutterBackend *backend);
|
||||
void _clutter_backend_x11_events_uninit (ClutterBackend *backend);
|
||||
|
||||
GType clutter_backend_x11_get_type (void) G_GNUC_CONST;
|
||||
GType _clutter_backend_x11_get_type (void) G_GNUC_CONST;
|
||||
|
||||
/* Private to glx/eglx backends */
|
||||
gboolean
|
||||
clutter_backend_x11_pre_parse (ClutterBackend *backend,
|
||||
GError **error);
|
||||
|
||||
gboolean
|
||||
clutter_backend_x11_post_parse (ClutterBackend *backend,
|
||||
GError **error);
|
||||
|
||||
gboolean
|
||||
clutter_backend_x11_init_stage (ClutterBackend *backend,
|
||||
GError **error);
|
||||
|
||||
ClutterActor *
|
||||
clutter_backend_x11_get_stage (ClutterBackend *backend);
|
||||
|
||||
void
|
||||
clutter_backend_x11_add_options (ClutterBackend *backend,
|
||||
GOptionGroup *group);
|
||||
|
||||
ClutterFeatureFlags
|
||||
clutter_backend_x11_get_features (ClutterBackend *backend);
|
||||
|
||||
XVisualInfo *
|
||||
clutter_backend_x11_get_visual_info (ClutterBackendX11 *backend_x11);
|
||||
|
||||
ClutterInputDevice *
|
||||
_clutter_x11_get_device_for_xid (XID id);
|
||||
_clutter_backend_x11_get_visual_info (ClutterBackendX11 *backend_x11);
|
||||
|
||||
void
|
||||
_clutter_x11_select_events (Window xwin);
|
||||
|
@ -21,9 +21,7 @@
|
||||
* Author: Emmanuele Bassi <ebassi@linux.intel.com>
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "clutter-keymap-x11.h"
|
||||
#include "clutter-backend-x11.h"
|
||||
@ -80,6 +78,8 @@ enum
|
||||
|
||||
static GParamSpec *obj_props[PROP_LAST];
|
||||
|
||||
#define clutter_keymap_x11_get_type _clutter_keymap_x11_get_type
|
||||
|
||||
G_DEFINE_TYPE (ClutterKeymapX11, clutter_keymap_x11, G_TYPE_OBJECT);
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
|
@ -29,13 +29,13 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CLUTTER_TYPE_KEYMAP_X11 (clutter_keymap_x11_get_type ())
|
||||
#define CLUTTER_TYPE_KEYMAP_X11 (_clutter_keymap_x11_get_type ())
|
||||
#define CLUTTER_KEYMAP_X11(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_KEYMAP_X11, ClutterKeymapX11))
|
||||
#define CLUTTER_IS_KEYMAP_X11(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_KEYMAP_X11))
|
||||
|
||||
typedef struct _ClutterKeymapX11 ClutterKeymapX11;
|
||||
|
||||
GType clutter_keymap_x11_get_type (void) G_GNUC_CONST;
|
||||
GType _clutter_keymap_x11_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gint _clutter_keymap_x11_get_key_group (ClutterKeymapX11 *keymap,
|
||||
ClutterModifierType state);
|
||||
|
@ -54,6 +54,8 @@
|
||||
static void clutter_stage_window_iface_init (ClutterStageWindowIface *iface);
|
||||
static void clutter_event_translator_iface_init (ClutterEventTranslatorIface *iface);
|
||||
|
||||
#define clutter_stage_x11_get_type _clutter_stage_x11_get_type
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (ClutterStageX11,
|
||||
clutter_stage_x11,
|
||||
G_TYPE_OBJECT,
|
||||
@ -120,7 +122,7 @@ update_state (ClutterStageX11 *stage_x11,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
clutter_stage_x11_fix_window_size (ClutterStageX11 *stage_x11,
|
||||
gint new_width,
|
||||
gint new_height)
|
||||
@ -179,7 +181,7 @@ clutter_stage_x11_fix_window_size (ClutterStageX11 *stage_x11,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
clutter_stage_x11_set_wm_protocols (ClutterStageX11 *stage_x11)
|
||||
{
|
||||
ClutterBackend *backend = clutter_get_default_backend ();
|
||||
@ -1218,7 +1220,7 @@ clutter_x11_get_stage_visual (ClutterStage *stage)
|
||||
g_return_val_if_fail (CLUTTER_IS_BACKEND_X11 (backend), NULL);
|
||||
backend_x11 = CLUTTER_BACKEND_X11 (backend);
|
||||
|
||||
return clutter_backend_x11_get_visual_info (backend_x11);
|
||||
return _clutter_backend_x11_get_visual_info (backend_x11);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
@ -1297,7 +1299,7 @@ clutter_x11_set_stage_foreign (ClutterStage *stage,
|
||||
|
||||
actor = CLUTTER_ACTOR (stage);
|
||||
|
||||
xvisinfo = clutter_backend_x11_get_visual_info (backend_x11);
|
||||
xvisinfo = _clutter_backend_x11_get_visual_info (backend_x11);
|
||||
g_return_val_if_fail (xvisinfo != NULL, FALSE);
|
||||
|
||||
clutter_x11_trap_x_errors ();
|
||||
@ -1412,7 +1414,7 @@ _clutter_stage_x11_create_window (ClutterStageX11 *stage_x11)
|
||||
|
||||
backend_x11 = CLUTTER_BACKEND_X11 (clutter_get_default_backend ());
|
||||
|
||||
xvisinfo = clutter_backend_x11_get_visual_info (backend_x11);
|
||||
xvisinfo = _clutter_backend_x11_get_visual_info (backend_x11);
|
||||
if (xvisinfo == NULL)
|
||||
{
|
||||
g_critical ("Unable to find suitable GL visual.");
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CLUTTER_TYPE_STAGE_X11 (clutter_stage_x11_get_type ())
|
||||
#define CLUTTER_TYPE_STAGE_X11 (_clutter_stage_x11_get_type ())
|
||||
#define CLUTTER_STAGE_X11(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_STAGE_X11, ClutterStageX11))
|
||||
#define CLUTTER_IS_STAGE_X11(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_STAGE_X11))
|
||||
#define CLUTTER_STAGE_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_STAGE_X11, ClutterStageX11Class))
|
||||
@ -78,18 +78,9 @@ struct _ClutterStageX11Class
|
||||
ClutterGroupClass parent_class;
|
||||
};
|
||||
|
||||
GType clutter_stage_x11_get_type (void) G_GNUC_CONST;
|
||||
GType _clutter_stage_x11_get_type (void) G_GNUC_CONST;
|
||||
|
||||
/* Private to subclasses */
|
||||
void clutter_stage_x11_fix_window_size (ClutterStageX11 *stage_x11,
|
||||
gint new_width,
|
||||
gint new_height);
|
||||
void clutter_stage_x11_set_wm_protocols (ClutterStageX11 *stage_x11);
|
||||
void clutter_stage_x11_map (ClutterStageX11 *stage_x11);
|
||||
void clutter_stage_x11_unmap (ClutterStageX11 *stage_x11);
|
||||
|
||||
GList *clutter_stage_x11_get_input_devices (ClutterStageX11 *stage_x11);
|
||||
|
||||
gboolean _clutter_stage_x11_create_window (ClutterStageX11 *stage_x11);
|
||||
void _clutter_stage_x11_destroy_window_untrapped (ClutterStageX11 *stage_x11);
|
||||
void _clutter_stage_x11_destroy_window (ClutterStageX11 *stage_x11);
|
||||
|
Loading…
Reference in New Issue
Block a user