mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
cogl/cleanup: Replace CoglUserDataDestroyCallback with GDestroyNotify
It is just a typedef Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3193>
This commit is contained in:
parent
b044e26e62
commit
b4bd69e4e8
@ -54,7 +54,7 @@ typedef struct _CoglClosure
|
||||
|
||||
void *function;
|
||||
void *user_data;
|
||||
CoglUserDataDestroyCallback destroy_cb;
|
||||
GDestroyNotify destroy_cb;
|
||||
} CoglClosure;
|
||||
|
||||
/*
|
||||
@ -74,7 +74,7 @@ CoglClosure *
|
||||
_cogl_closure_list_add (CoglList *list,
|
||||
void *function,
|
||||
void *user_data,
|
||||
CoglUserDataDestroyCallback destroy_cb);
|
||||
GDestroyNotify destroy_cb);
|
||||
|
||||
/*
|
||||
* _cogl_closure_list_invoke:
|
||||
|
@ -57,7 +57,7 @@ CoglClosure *
|
||||
_cogl_closure_list_add (CoglList *list,
|
||||
void *function,
|
||||
void *user_data,
|
||||
CoglUserDataDestroyCallback destroy_cb)
|
||||
GDestroyNotify destroy_cb)
|
||||
{
|
||||
CoglClosure *closure = g_new0 (CoglClosure, 1);
|
||||
|
||||
|
@ -89,18 +89,6 @@ cogl_object_unref (void *object);
|
||||
*/
|
||||
#define cogl_clear_object(object_ptr) g_clear_pointer ((object_ptr), cogl_object_unref)
|
||||
|
||||
/**
|
||||
* CoglUserDataDestroyCallback:
|
||||
* @user_data: The data whose association with a #CoglObject has been
|
||||
* destroyed.
|
||||
*
|
||||
* When associating private data with a #CoglObject a callback can be
|
||||
* given which will be called either if the object is destroyed or if
|
||||
* cogl_object_set_user_data() is called with NULL user_data for the
|
||||
* same key.
|
||||
*/
|
||||
typedef GDestroyNotify CoglUserDataDestroyCallback;
|
||||
|
||||
/**
|
||||
* CoglDebugObjectTypeInfo:
|
||||
* @name: A human readable name for the type.
|
||||
|
@ -514,7 +514,7 @@ CoglFrameClosure *
|
||||
cogl_onscreen_add_frame_callback (CoglOnscreen *onscreen,
|
||||
CoglFrameCallback callback,
|
||||
void *user_data,
|
||||
CoglUserDataDestroyCallback destroy)
|
||||
GDestroyNotify destroy)
|
||||
{
|
||||
CoglOnscreenPrivate *priv = cogl_onscreen_get_instance_private (onscreen);
|
||||
|
||||
@ -564,7 +564,7 @@ CoglOnscreenDirtyClosure *
|
||||
cogl_onscreen_add_dirty_callback (CoglOnscreen *onscreen,
|
||||
CoglOnscreenDirtyCallback callback,
|
||||
void *user_data,
|
||||
CoglUserDataDestroyCallback destroy)
|
||||
GDestroyNotify destroy)
|
||||
{
|
||||
CoglOnscreenPrivate *priv = cogl_onscreen_get_instance_private (onscreen);
|
||||
|
||||
|
@ -444,7 +444,7 @@ COGL_EXPORT CoglFrameClosure *
|
||||
cogl_onscreen_add_frame_callback (CoglOnscreen *onscreen,
|
||||
CoglFrameCallback callback,
|
||||
void *user_data,
|
||||
CoglUserDataDestroyCallback destroy);
|
||||
GDestroyNotify destroy);
|
||||
|
||||
/**
|
||||
* cogl_onscreen_remove_frame_callback:
|
||||
@ -549,7 +549,7 @@ COGL_EXPORT CoglOnscreenDirtyClosure *
|
||||
cogl_onscreen_add_dirty_callback (CoglOnscreen *onscreen,
|
||||
CoglOnscreenDirtyCallback callback,
|
||||
void *user_data,
|
||||
CoglUserDataDestroyCallback destroy);
|
||||
GDestroyNotify destroy);
|
||||
|
||||
/**
|
||||
* cogl_onscreen_remove_dirty_callback:
|
||||
|
@ -62,4 +62,4 @@ COGL_EXPORT CoglClosure *
|
||||
_cogl_poll_renderer_add_idle (CoglRenderer *renderer,
|
||||
CoglIdleCallback idle_cb,
|
||||
void *user_data,
|
||||
CoglUserDataDestroyCallback destroy_cb);
|
||||
GDestroyNotify destroy_cb);
|
||||
|
@ -219,7 +219,7 @@ CoglClosure *
|
||||
_cogl_poll_renderer_add_idle (CoglRenderer *renderer,
|
||||
CoglIdleCallback idle_cb,
|
||||
void *user_data,
|
||||
CoglUserDataDestroyCallback destroy_cb)
|
||||
GDestroyNotify destroy_cb)
|
||||
{
|
||||
return _cogl_closure_list_add (&renderer->idle_closures,
|
||||
idle_cb,
|
||||
|
Loading…
Reference in New Issue
Block a user