backend: Unify the event initialization
Input backends are, in some cases, independent from the windowing system backends; we can initialize input handling using a model similar to what we use for windowing backends, including an environment variable and compile-/run-time checks. This model allows us to remove the backend-specific init_events(), and use a generic implementation directly inside the base ClutterBackend class, thus further reducing the backend-specific code that every platform has to implement. This requires some minor surgery to every single backend, to make sure that the function exposed to initialize the event loop is similar and performs roughly the same operations.
This commit is contained in:
@ -30,7 +30,7 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CLUTTER_TYPE_BACKEND_OSX (clutter_backend_osx_get_type())
|
||||
#define CLUTTER_TYPE_BACKEND_OSX (_clutter_backend_osx_get_type())
|
||||
#define CLUTTER_BACKEND_OSX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),CLUTTER_TYPE_BACKEND_OSX,ClutterBackendOSX))
|
||||
#define CLUTTER_BACKEND_OSX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),CLUTTER_TYPE_BACKEND_OSX,ClutterBackend))
|
||||
#define CLUTTER_IS_BACKEND_OSX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),CLUTTER_TYPE_BACKEND_OSX))
|
||||
@ -54,7 +54,9 @@ struct _ClutterBackendOSXClass
|
||||
ClutterBackendClass parent_class;
|
||||
};
|
||||
|
||||
GType clutter_backend_osx_get_type (void) G_GNUC_CONST;
|
||||
GType _clutter_backend_osx_get_type (void) G_GNUC_CONST;
|
||||
|
||||
void _clutter_backend_osx_events_init (ClutterBackend *backend);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
Reference in New Issue
Block a user