clutter: Rename ClutterMainContext to ClutterContext
The intention for ClutterContext is to be more or less the MetaContext or CoglContext equivalent. Lets rename the type so that it becomes more consistent with the other similar types. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2016>
This commit is contained in:
parent
6ad0114d1f
commit
579532f644
@ -93,7 +93,7 @@ clutter_backend_dispose (GObject *gobject)
|
||||
static void
|
||||
clutter_backend_real_resolution_changed (ClutterBackend *backend)
|
||||
{
|
||||
ClutterMainContext *context;
|
||||
ClutterContext *context;
|
||||
ClutterSettings *settings;
|
||||
gdouble resolution;
|
||||
gint dpi;
|
||||
@ -405,7 +405,7 @@ _clutter_backend_create_context (ClutterBackend *backend,
|
||||
ClutterBackend *
|
||||
clutter_get_default_backend (void)
|
||||
{
|
||||
ClutterMainContext *clutter_context;
|
||||
ClutterContext *clutter_context;
|
||||
|
||||
clutter_context = _clutter_context_get_default ();
|
||||
|
||||
|
@ -962,7 +962,7 @@ clutter_event_free (ClutterEvent *event)
|
||||
ClutterEvent *
|
||||
clutter_event_get (void)
|
||||
{
|
||||
ClutterMainContext *context = _clutter_context_get_default ();
|
||||
ClutterContext *context = _clutter_context_get_default ();
|
||||
ClutterEvent *event;
|
||||
|
||||
event = g_async_queue_try_pop (context->events_queue);
|
||||
@ -974,7 +974,7 @@ void
|
||||
_clutter_event_push (const ClutterEvent *event,
|
||||
gboolean do_copy)
|
||||
{
|
||||
ClutterMainContext *context = _clutter_context_get_default ();
|
||||
ClutterContext *context = _clutter_context_get_default ();
|
||||
|
||||
g_assert (context != NULL);
|
||||
|
||||
@ -1016,7 +1016,7 @@ clutter_event_put (const ClutterEvent *event)
|
||||
gboolean
|
||||
clutter_events_pending (void)
|
||||
{
|
||||
ClutterMainContext *context = _clutter_context_get_default ();
|
||||
ClutterContext *context = _clutter_context_get_default ();
|
||||
|
||||
g_return_val_if_fail (context != NULL, FALSE);
|
||||
|
||||
@ -1058,7 +1058,7 @@ clutter_get_current_event_time (void)
|
||||
const ClutterEvent *
|
||||
clutter_get_current_event (void)
|
||||
{
|
||||
ClutterMainContext *context = _clutter_context_get_default ();
|
||||
ClutterContext *context = _clutter_context_get_default ();
|
||||
|
||||
g_return_val_if_fail (context != NULL, NULL);
|
||||
|
||||
@ -1269,7 +1269,7 @@ gboolean
|
||||
_clutter_event_process_filters (ClutterEvent *event,
|
||||
ClutterActor *event_actor)
|
||||
{
|
||||
ClutterMainContext *context = _clutter_context_get_default ();
|
||||
ClutterContext *context = _clutter_context_get_default ();
|
||||
GList *l, *next;
|
||||
|
||||
/* Event filters are handled in order from least recently added to
|
||||
@ -1312,7 +1312,7 @@ clutter_event_add_filter (ClutterStage *stage,
|
||||
GDestroyNotify notify,
|
||||
gpointer user_data)
|
||||
{
|
||||
ClutterMainContext *context = _clutter_context_get_default ();
|
||||
ClutterContext *context = _clutter_context_get_default ();
|
||||
ClutterEventFilter *event_filter = g_new0 (ClutterEventFilter, 1);
|
||||
static guint event_filter_id = 0;
|
||||
|
||||
@ -1339,7 +1339,7 @@ clutter_event_add_filter (ClutterStage *stage,
|
||||
void
|
||||
clutter_event_remove_filter (guint id)
|
||||
{
|
||||
ClutterMainContext *context = _clutter_context_get_default ();
|
||||
ClutterContext *context = _clutter_context_get_default ();
|
||||
GList *l;
|
||||
|
||||
for (l = context->event_filters; l; l = l->next)
|
||||
|
@ -732,7 +732,7 @@ clutter_input_pointer_a11y_update (ClutterInputDevice *device,
|
||||
const ClutterEvent *event)
|
||||
{
|
||||
|
||||
ClutterMainContext *clutter_context;
|
||||
ClutterContext *clutter_context;
|
||||
ClutterBackend *backend;
|
||||
ClutterEventType event_type;
|
||||
|
||||
|
@ -76,7 +76,7 @@
|
||||
#include "cally/cally.h" /* For accessibility support */
|
||||
|
||||
/* main context */
|
||||
static ClutterMainContext *ClutterCntx = NULL;
|
||||
static ClutterContext *ClutterCntx = NULL;
|
||||
|
||||
/* command line options */
|
||||
static gboolean clutter_is_initialized = FALSE;
|
||||
@ -142,7 +142,7 @@ static const GDebugKey clutter_paint_debug_keys[] = {
|
||||
gboolean
|
||||
_clutter_context_get_show_fps (void)
|
||||
{
|
||||
ClutterMainContext *context = _clutter_context_get_default ();
|
||||
ClutterContext *context = _clutter_context_get_default ();
|
||||
|
||||
return context->show_fps;
|
||||
}
|
||||
@ -186,7 +186,7 @@ clutter_disable_accessibility (void)
|
||||
static CoglPangoFontMap *
|
||||
clutter_context_get_pango_fontmap (void)
|
||||
{
|
||||
ClutterMainContext *self;
|
||||
ClutterContext *self;
|
||||
CoglPangoFontMap *font_map;
|
||||
gdouble resolution;
|
||||
gboolean use_mipmapping;
|
||||
@ -488,7 +488,7 @@ _clutter_context_is_initialized (void)
|
||||
return ClutterCntx->is_initialized;
|
||||
}
|
||||
|
||||
ClutterMainContext *
|
||||
ClutterContext *
|
||||
_clutter_context_get_default (void)
|
||||
{
|
||||
g_assert (ClutterCntx);
|
||||
@ -496,8 +496,8 @@ _clutter_context_get_default (void)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_init_real (ClutterMainContext *clutter_context,
|
||||
GError **error)
|
||||
clutter_init_real (ClutterContext *clutter_context,
|
||||
GError **error)
|
||||
{
|
||||
ClutterBackend *backend;
|
||||
|
||||
@ -545,7 +545,7 @@ clutter_init_real (ClutterMainContext *clutter_context,
|
||||
}
|
||||
|
||||
static void
|
||||
init_clutter_debug (ClutterMainContext *clutter_context)
|
||||
init_clutter_debug (ClutterContext *clutter_context)
|
||||
{
|
||||
const char *env_string;
|
||||
|
||||
@ -595,7 +595,7 @@ clutter_context_new (ClutterBackendConstructor backend_constructor,
|
||||
gpointer user_data,
|
||||
GError **error)
|
||||
{
|
||||
ClutterMainContext *clutter_context;
|
||||
ClutterContext *clutter_context;
|
||||
|
||||
if (ClutterCntx)
|
||||
{
|
||||
@ -606,7 +606,7 @@ clutter_context_new (ClutterBackendConstructor backend_constructor,
|
||||
|
||||
clutter_graphene_init ();
|
||||
|
||||
clutter_context = g_new0 (ClutterMainContext, 1);
|
||||
clutter_context = g_new0 (ClutterContext, 1);
|
||||
init_clutter_debug (clutter_context);
|
||||
clutter_context->show_fps = clutter_show_fps;
|
||||
clutter_context->is_initialized = FALSE;
|
||||
@ -632,7 +632,7 @@ clutter_context_new (ClutterBackendConstructor backend_constructor,
|
||||
}
|
||||
|
||||
void
|
||||
clutter_context_free (ClutterMainContext *clutter_context)
|
||||
clutter_context_free (ClutterContext *clutter_context)
|
||||
{
|
||||
g_clear_pointer (&clutter_context->events_queue, g_async_queue_unref);
|
||||
g_clear_pointer (&clutter_context->backend, clutter_backend_destroy);
|
||||
@ -853,9 +853,9 @@ clutter_stage_handle_event (ClutterStage *stage,
|
||||
}
|
||||
|
||||
static void
|
||||
_clutter_process_event_details (ClutterActor *stage,
|
||||
ClutterMainContext *context,
|
||||
ClutterEvent *event)
|
||||
_clutter_process_event_details (ClutterActor *stage,
|
||||
ClutterContext *context,
|
||||
ClutterEvent *event)
|
||||
{
|
||||
switch (clutter_event_type (event))
|
||||
{
|
||||
@ -907,7 +907,7 @@ void
|
||||
clutter_stage_process_event (ClutterStage *stage,
|
||||
ClutterEvent *event)
|
||||
{
|
||||
ClutterMainContext *context;
|
||||
ClutterContext *context;
|
||||
ClutterSeat *seat;
|
||||
|
||||
context = _clutter_context_get_default ();
|
||||
@ -960,7 +960,7 @@ void
|
||||
clutter_threads_remove_repaint_func (guint handle_id)
|
||||
{
|
||||
ClutterRepaintFunction *repaint_func;
|
||||
ClutterMainContext *context;
|
||||
ClutterContext *context;
|
||||
GList *l;
|
||||
|
||||
g_return_if_fail (handle_id > 0);
|
||||
@ -1077,7 +1077,7 @@ clutter_threads_add_repaint_func_full (ClutterRepaintFlags flags,
|
||||
gpointer data,
|
||||
GDestroyNotify notify)
|
||||
{
|
||||
ClutterMainContext *context;
|
||||
ClutterContext *context;
|
||||
ClutterRepaintFunction *repaint_func;
|
||||
|
||||
g_return_val_if_fail (func != NULL, 0);
|
||||
@ -1111,7 +1111,7 @@ clutter_threads_add_repaint_func_full (ClutterRepaintFlags flags,
|
||||
void
|
||||
_clutter_run_repaint_functions (ClutterRepaintFlags flags)
|
||||
{
|
||||
ClutterMainContext *context = _clutter_context_get_default ();
|
||||
ClutterContext *context = _clutter_context_get_default ();
|
||||
ClutterRepaintFunction *repaint_func;
|
||||
GList *invoke_list, *reinvoke_list, *l;
|
||||
|
||||
@ -1187,7 +1187,7 @@ clutter_get_default_text_direction (void)
|
||||
void
|
||||
_clutter_clear_events_queue (void)
|
||||
{
|
||||
ClutterMainContext *context = _clutter_context_get_default ();
|
||||
ClutterContext *context = _clutter_context_get_default ();
|
||||
ClutterEvent *event;
|
||||
GAsyncQueue *events_queue;
|
||||
|
||||
|
@ -44,8 +44,6 @@
|
||||
* various matrix calculations. */
|
||||
#define CLUTTER_COORDINATE_EPSILON (1.0 / 256.0)
|
||||
|
||||
typedef struct _ClutterMainContext ClutterContext;
|
||||
|
||||
typedef ClutterBackend * (* ClutterBackendConstructor) (gpointer user_data);
|
||||
|
||||
/**
|
||||
@ -63,9 +61,7 @@ CLUTTER_EXPORT
|
||||
void clutter_context_free (ClutterContext *clutter_context);
|
||||
|
||||
/**
|
||||
* clutter_context_get_backend:
|
||||
*
|
||||
* Returns: (transfer none): The corresponding %ClutterBackend
|
||||
* clutter_context_get_backend: (skip)
|
||||
*/
|
||||
CLUTTER_EXPORT
|
||||
ClutterBackend * clutter_context_get_backend (ClutterContext *clutter_context);
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _ClutterMainContext ClutterMainContext;
|
||||
typedef struct _ClutterContext ClutterContext;
|
||||
|
||||
#define CLUTTER_REGISTER_VALUE_TRANSFORM_TO(TYPE_TO,func) { \
|
||||
g_value_register_transform_func (g_define_type_id, TYPE_TO, func); \
|
||||
@ -108,11 +108,11 @@ typedef enum
|
||||
} ClutterPrivateFlags;
|
||||
|
||||
/*
|
||||
* ClutterMainContext:
|
||||
* ClutterContext:
|
||||
*
|
||||
* The shared state of Clutter
|
||||
*/
|
||||
struct _ClutterMainContext
|
||||
struct _ClutterContext
|
||||
{
|
||||
/* the main windowing system backend */
|
||||
ClutterBackend *backend;
|
||||
@ -157,7 +157,7 @@ typedef struct
|
||||
gboolean _clutter_threads_dispatch (gpointer data);
|
||||
void _clutter_threads_dispatch_free (gpointer data);
|
||||
|
||||
ClutterMainContext * _clutter_context_get_default (void);
|
||||
ClutterContext * _clutter_context_get_default (void);
|
||||
void _clutter_context_lock (void);
|
||||
void _clutter_context_unlock (void);
|
||||
CLUTTER_EXPORT
|
||||
|
@ -241,7 +241,7 @@ settings_update_fontmap (ClutterSettings *self,
|
||||
|
||||
if (self->last_fontconfig_timestamp != stamp)
|
||||
{
|
||||
ClutterMainContext *context;
|
||||
ClutterContext *context;
|
||||
gboolean update_needed = FALSE;
|
||||
|
||||
context = _clutter_context_get_default ();
|
||||
|
@ -162,7 +162,7 @@ clutter_stage_manager_init (ClutterStageManager *stage_manager)
|
||||
ClutterStageManager *
|
||||
clutter_stage_manager_get_default (void)
|
||||
{
|
||||
ClutterMainContext *context = _clutter_context_get_default ();
|
||||
ClutterContext *context = _clutter_context_get_default ();
|
||||
|
||||
if (G_UNLIKELY (context->stage_manager == NULL))
|
||||
context->stage_manager = g_object_new (CLUTTER_TYPE_STAGE_MANAGER, NULL);
|
||||
|
@ -3933,7 +3933,7 @@ clutter_stage_grab_full (ClutterStage *stage,
|
||||
|
||||
if (!priv->topmost_grab)
|
||||
{
|
||||
ClutterMainContext *context;
|
||||
ClutterContext *context;
|
||||
ClutterSeat *seat;
|
||||
|
||||
/* First grab in the chain, trigger a backend grab too */
|
||||
@ -4048,7 +4048,7 @@ clutter_stage_unlink_grab (ClutterStage *stage,
|
||||
|
||||
if (!priv->topmost_grab)
|
||||
{
|
||||
ClutterMainContext *context;
|
||||
ClutterContext *context;
|
||||
ClutterSeat *seat;
|
||||
|
||||
/* This was the last remaining grab, trigger a backend ungrab */
|
||||
|
Loading…
Reference in New Issue
Block a user