mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
Clean up clutter-private.h/4
Move the private Backend API to a separate header. This also allows us to finally move the class vtable and instance structure to a separate file and plug the visibility hole that left the Backend class bare for everyone to poke into.
This commit is contained in:
parent
8613013ab0
commit
43edfc9400
@ -220,6 +220,7 @@ source_c = \
|
||||
# private headers; these should not be distributed or introspected
|
||||
source_h_priv = \
|
||||
$(srcdir)/clutter-actor-meta-private.h \
|
||||
$(srcdir)/clutter-backend-private.h \
|
||||
$(srcdir)/clutter-bezier.h \
|
||||
$(srcdir)/clutter-debug.h \
|
||||
$(srcdir)/clutter-device-manager-private.h \
|
||||
|
99
clutter/clutter-backend-private.h
Normal file
99
clutter/clutter-backend-private.h
Normal file
@ -0,0 +1,99 @@
|
||||
#ifndef __CLUTTER_BACKEND_PRIVATE_H__
|
||||
#define __CLUTTER_BACKEND_PRIVATE_H__
|
||||
|
||||
#include <clutter/clutter-backend.h>
|
||||
|
||||
#define CLUTTER_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_BACKEND, ClutterBackendClass))
|
||||
#define CLUTTER_IS_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_BACKEND))
|
||||
#define CLUTTER_BACKEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_BACKEND, ClutterBackendClass))
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _ClutterBackendPrivate ClutterBackendPrivate;
|
||||
typedef struct _ClutterBackendClass ClutterBackendClass;
|
||||
|
||||
struct _ClutterBackend
|
||||
{
|
||||
/*< private >*/
|
||||
GObject parent_instance;
|
||||
ClutterBackendPrivate *priv;
|
||||
};
|
||||
|
||||
struct _ClutterBackendClass
|
||||
{
|
||||
/*< private >*/
|
||||
GObjectClass parent_class;
|
||||
|
||||
/* vfuncs */
|
||||
gboolean (* pre_parse) (ClutterBackend *backend,
|
||||
GError **error);
|
||||
gboolean (* post_parse) (ClutterBackend *backend,
|
||||
GError **error);
|
||||
ClutterStageWindow * (* create_stage) (ClutterBackend *backend,
|
||||
ClutterStage *wrapper,
|
||||
GError **error);
|
||||
void (* init_events) (ClutterBackend *backend);
|
||||
void (* init_features) (ClutterBackend *backend);
|
||||
void (* add_options) (ClutterBackend *backend,
|
||||
GOptionGroup *group);
|
||||
ClutterFeatureFlags (* get_features) (ClutterBackend *backend);
|
||||
void (* redraw) (ClutterBackend *backend,
|
||||
ClutterStage *stage);
|
||||
gboolean (* create_context) (ClutterBackend *backend,
|
||||
GError **error);
|
||||
void (* ensure_context) (ClutterBackend *backend,
|
||||
ClutterStage *stage);
|
||||
ClutterDeviceManager *(* get_device_manager) (ClutterBackend *backend);
|
||||
|
||||
void (* copy_event_data) (ClutterBackend *backend,
|
||||
const ClutterEvent *src,
|
||||
ClutterEvent *dest);
|
||||
void (* free_event_data) (ClutterBackend *backend,
|
||||
ClutterEvent *event);
|
||||
|
||||
/* signals */
|
||||
void (* resolution_changed) (ClutterBackend *backend);
|
||||
void (* font_changed) (ClutterBackend *backend);
|
||||
void (* settings_changed) (ClutterBackend *backend);
|
||||
};
|
||||
|
||||
/* vfuncs implemented by backend */
|
||||
GType _clutter_backend_impl_get_type (void);
|
||||
|
||||
void _clutter_backend_redraw (ClutterBackend *backend,
|
||||
ClutterStage *stage);
|
||||
ClutterStageWindow *_clutter_backend_create_stage (ClutterBackend *backend,
|
||||
ClutterStage *wrapper,
|
||||
GError **error);
|
||||
void _clutter_backend_ensure_context (ClutterBackend *backend,
|
||||
ClutterStage *stage);
|
||||
void _clutter_backend_ensure_context_internal
|
||||
(ClutterBackend *backend,
|
||||
ClutterStage *stage);
|
||||
gboolean _clutter_backend_create_context (ClutterBackend *backend,
|
||||
GError **error);
|
||||
|
||||
void _clutter_backend_add_options (ClutterBackend *backend,
|
||||
GOptionGroup *group);
|
||||
gboolean _clutter_backend_pre_parse (ClutterBackend *backend,
|
||||
GError **error);
|
||||
gboolean _clutter_backend_post_parse (ClutterBackend *backend,
|
||||
GError **error);
|
||||
void _clutter_backend_init_events (ClutterBackend *backend);
|
||||
|
||||
void _clutter_backend_copy_event_data (ClutterBackend *backend,
|
||||
const ClutterEvent *src,
|
||||
ClutterEvent *dest);
|
||||
void _clutter_backend_free_event_data (ClutterBackend *backend,
|
||||
ClutterEvent *event);
|
||||
|
||||
ClutterFeatureFlags _clutter_backend_get_features (ClutterBackend *backend);
|
||||
|
||||
gfloat _clutter_backend_get_units_per_em (ClutterBackend *backend,
|
||||
PangoFontDescription *font_desc);
|
||||
|
||||
gint32 _clutter_backend_get_units_serial (ClutterBackend *backend);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_BACKEND_PRIVATE_H__ */
|
@ -42,7 +42,7 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "clutter-backend.h"
|
||||
#include "clutter-backend-private.h"
|
||||
#include "clutter-debug.h"
|
||||
#include "clutter-fixed.h"
|
||||
#include "clutter-marshal.h"
|
||||
|
@ -44,58 +44,8 @@ G_BEGIN_DECLS
|
||||
#define CLUTTER_TYPE_BACKEND (clutter_backend_get_type ())
|
||||
#define CLUTTER_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_BACKEND, ClutterBackend))
|
||||
#define CLUTTER_IS_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_BACKEND))
|
||||
#define CLUTTER_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_BACKEND, ClutterBackendClass))
|
||||
#define CLUTTER_IS_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_BACKEND))
|
||||
#define CLUTTER_BACKEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_BACKEND, ClutterBackendClass))
|
||||
|
||||
typedef struct _ClutterBackend ClutterBackend;
|
||||
typedef struct _ClutterBackendPrivate ClutterBackendPrivate;
|
||||
typedef struct _ClutterBackendClass ClutterBackendClass;
|
||||
|
||||
struct _ClutterBackend
|
||||
{
|
||||
/*< private >*/
|
||||
GObject parent_instance;
|
||||
ClutterBackendPrivate *priv;
|
||||
};
|
||||
|
||||
struct _ClutterBackendClass
|
||||
{
|
||||
/*< private >*/
|
||||
GObjectClass parent_class;
|
||||
|
||||
/* vfuncs */
|
||||
gboolean (* pre_parse) (ClutterBackend *backend,
|
||||
GError **error);
|
||||
gboolean (* post_parse) (ClutterBackend *backend,
|
||||
GError **error);
|
||||
ClutterStageWindow * (* create_stage) (ClutterBackend *backend,
|
||||
ClutterStage *wrapper,
|
||||
GError **error);
|
||||
void (* init_events) (ClutterBackend *backend);
|
||||
void (* init_features) (ClutterBackend *backend);
|
||||
void (* add_options) (ClutterBackend *backend,
|
||||
GOptionGroup *group);
|
||||
ClutterFeatureFlags (* get_features) (ClutterBackend *backend);
|
||||
void (* redraw) (ClutterBackend *backend,
|
||||
ClutterStage *stage);
|
||||
gboolean (* create_context) (ClutterBackend *backend,
|
||||
GError **error);
|
||||
void (* ensure_context) (ClutterBackend *backend,
|
||||
ClutterStage *stage);
|
||||
ClutterDeviceManager *(* get_device_manager) (ClutterBackend *backend);
|
||||
|
||||
void (* copy_event_data) (ClutterBackend *backend,
|
||||
const ClutterEvent *src,
|
||||
ClutterEvent *dest);
|
||||
void (* free_event_data) (ClutterBackend *backend,
|
||||
ClutterEvent *event);
|
||||
|
||||
/* signals */
|
||||
void (* resolution_changed) (ClutterBackend *backend);
|
||||
void (* font_changed) (ClutterBackend *backend);
|
||||
void (* settings_changed) (ClutterBackend *backend);
|
||||
};
|
||||
|
||||
GType clutter_backend_get_type (void) G_GNUC_CONST;
|
||||
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "clutter-backend-private.h"
|
||||
#include "clutter-debug.h"
|
||||
#include "clutter-device-manager-private.h"
|
||||
#include "clutter-enum-types.h"
|
||||
|
@ -27,11 +27,12 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "clutter-backend-private.h"
|
||||
#include "clutter-debug.h"
|
||||
#include "clutter-event.h"
|
||||
#include "clutter-keysyms.h"
|
||||
#include "clutter-keysyms-table.h"
|
||||
#include "clutter-event.h"
|
||||
#include "clutter-private.h"
|
||||
#include "clutter-debug.h"
|
||||
|
||||
/**
|
||||
* SECTION:clutter-event
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "clutter-backend-private.h"
|
||||
#include "clutter-feature.h"
|
||||
#include "clutter-main.h"
|
||||
#include "clutter-private.h"
|
||||
|
@ -98,19 +98,19 @@
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
#endif
|
||||
|
||||
#include "clutter-actor.h"
|
||||
#include "clutter-backend-private.h"
|
||||
#include "clutter-debug.h"
|
||||
#include "clutter-device-manager-private.h"
|
||||
#include "clutter-event.h"
|
||||
#include "clutter-backend.h"
|
||||
#include "clutter-feature.h"
|
||||
#include "clutter-frame-source.h"
|
||||
#include "clutter-main.h"
|
||||
#include "clutter-master-clock.h"
|
||||
#include "clutter-feature.h"
|
||||
#include "clutter-actor.h"
|
||||
#include "clutter-stage-private.h"
|
||||
#include "clutter-private.h"
|
||||
#include "clutter-debug.h"
|
||||
#include "clutter-version.h" /* For flavour define */
|
||||
#include "clutter-frame-source.h"
|
||||
#include "clutter-profile.h"
|
||||
#include "clutter-device-manager-private.h"
|
||||
#include "clutter-stage-private.h"
|
||||
#include "clutter-version.h" /* For flavour define */
|
||||
|
||||
#include "cogl/cogl.h"
|
||||
#include "pango/cogl-pango.h"
|
||||
|
@ -298,41 +298,6 @@ PangoContext *_clutter_context_get_pango_context (ClutterMainContext *self);
|
||||
|
||||
G_CONST_RETURN gchar *_clutter_gettext (const gchar *str);
|
||||
|
||||
/* vfuncs implemented by backend */
|
||||
GType _clutter_backend_impl_get_type (void);
|
||||
|
||||
void _clutter_backend_redraw (ClutterBackend *backend,
|
||||
ClutterStage *stage);
|
||||
ClutterStageWindow *_clutter_backend_create_stage (ClutterBackend *backend,
|
||||
ClutterStage *wrapper,
|
||||
GError **error);
|
||||
void _clutter_backend_ensure_context (ClutterBackend *backend,
|
||||
ClutterStage *stage);
|
||||
void _clutter_backend_ensure_context_internal
|
||||
(ClutterBackend *backend,
|
||||
ClutterStage *stage);
|
||||
gboolean _clutter_backend_create_context (ClutterBackend *backend,
|
||||
GError **error);
|
||||
|
||||
void _clutter_backend_add_options (ClutterBackend *backend,
|
||||
GOptionGroup *group);
|
||||
gboolean _clutter_backend_pre_parse (ClutterBackend *backend,
|
||||
GError **error);
|
||||
gboolean _clutter_backend_post_parse (ClutterBackend *backend,
|
||||
GError **error);
|
||||
void _clutter_backend_init_events (ClutterBackend *backend);
|
||||
|
||||
void _clutter_backend_copy_event_data (ClutterBackend *backend,
|
||||
const ClutterEvent *src,
|
||||
ClutterEvent *dest);
|
||||
void _clutter_backend_free_event_data (ClutterBackend *backend,
|
||||
ClutterEvent *event);
|
||||
|
||||
ClutterFeatureFlags _clutter_backend_get_features (ClutterBackend *backend);
|
||||
|
||||
gfloat _clutter_backend_get_units_per_em (ClutterBackend *backend,
|
||||
PangoFontDescription *font_desc);
|
||||
|
||||
gboolean _clutter_feature_init (GError **error);
|
||||
|
||||
/* Reinjecting queued events for processing */
|
||||
@ -403,8 +368,6 @@ void _clutter_actor_finish_queue_redraw (ClutterActor *self,
|
||||
|
||||
void _clutter_run_repaint_functions (void);
|
||||
|
||||
gint32 _clutter_backend_get_units_serial (ClutterBackend *backend);
|
||||
|
||||
gboolean _clutter_effect_pre_paint (ClutterEffect *effect);
|
||||
void _clutter_effect_post_paint (ClutterEffect *effect);
|
||||
gboolean _clutter_effect_get_paint_volume (ClutterEffect *effect,
|
||||
|
@ -55,7 +55,7 @@
|
||||
|
||||
#include "clutter-stage.h"
|
||||
|
||||
#include "clutter-backend.h"
|
||||
#include "clutter-backend-private.h"
|
||||
#include "clutter-main.h"
|
||||
#include "clutter-color.h"
|
||||
#include "clutter-util.h"
|
||||
|
@ -69,9 +69,10 @@
|
||||
#include <glib-object.h>
|
||||
#include <gobject/gvaluecollector.h>
|
||||
|
||||
#include "clutter-units.h"
|
||||
#include "clutter-private.h"
|
||||
#include "clutter-backend-private.h"
|
||||
#include "clutter-interval.h"
|
||||
#include "clutter-private.h"
|
||||
#include "clutter-units.h"
|
||||
|
||||
#define DPI_FALLBACK (96.0)
|
||||
|
||||
|
@ -27,12 +27,13 @@
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <clutter/clutter-event.h>
|
||||
#include <clutter/clutter-backend.h>
|
||||
#ifdef COGL_HAS_XLIB_SUPPORT
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
#endif
|
||||
|
||||
#include "clutter-backend-private.h"
|
||||
|
||||
#include "clutter-egl-headers.h"
|
||||
|
||||
#ifdef COGL_HAS_X11_SUPPORT
|
||||
|
@ -32,8 +32,9 @@
|
||||
#include <GLES/egl.h>
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <clutter/clutter-backend.h>
|
||||
#include <clutter/clutter-private.h>
|
||||
|
||||
#include "clutter-backend-private.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CLUTTER_TYPE_BACKEND_FRUITY (clutter_backend_egl_get_type ())
|
||||
|
@ -22,7 +22,7 @@
|
||||
#ifndef __CLUTTER_BACKEND_OSX_H__
|
||||
#define __CLUTTER_BACKEND_OSX_H__
|
||||
|
||||
#include <clutter/clutter-backend.h>
|
||||
#include "clutter-backend-private.h"
|
||||
|
||||
@class NSOpenGLPixelFormat, NSOpenGLContext;
|
||||
|
||||
|
@ -29,13 +29,14 @@
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <clutter/clutter-event.h>
|
||||
#include <clutter/clutter-backend.h>
|
||||
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
|
||||
#include "clutter-wayland.h"
|
||||
|
||||
#include "clutter-backend-private.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CLUTTER_TYPE_BACKEND_WAYLAND (_clutter_backend_wayland_get_type ())
|
||||
|
@ -24,9 +24,10 @@
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <clutter/clutter-event.h>
|
||||
#include <clutter/clutter-backend.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include "clutter-backend-private.h"
|
||||
|
||||
#include "clutter-win32.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
@ -24,12 +24,11 @@
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <clutter/clutter-event.h>
|
||||
#include <clutter/clutter-backend.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
#include "clutter-x11.h"
|
||||
|
||||
#include "clutter-backend-private.h"
|
||||
#include "clutter-keymap-x11.h"
|
||||
#include "xsettings/xsettings-client.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user