[mutter/wip/nielsdg/remove-coglfuncptr] cogl: remove CoglFuncPtr, use GCallback instead
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/nielsdg/remove-coglfuncptr] cogl: remove CoglFuncPtr, use GCallback instead
- Date: Fri, 30 Nov 2018 14:09:30 +0000 (UTC)
commit a8fdaacd7fd4500f06f7440537a55f8fe7fe25d5
Author: Niels De Graef <nielsdegraef gmail com>
Date: Fri Nov 30 15:04:45 2018 +0100
cogl: remove CoglFuncPtr, use GCallback instead
They literally mean the same thing, so we shouldn't reinvent the wheel.
cogl/cogl/cogl-types.h | 9 ---------
cogl/cogl/cogl.c | 2 +-
cogl/cogl/cogl1-context.h | 2 +-
cogl/cogl/winsys/cogl-winsys-egl.c | 2 +-
cogl/cogl/winsys/cogl-winsys-glx.c | 2 +-
cogl/cogl/winsys/cogl-winsys-private.h | 2 +-
cogl/cogl/winsys/cogl-winsys-stub.c | 2 +-
7 files changed, 6 insertions(+), 15 deletions(-)
---
diff --git a/cogl/cogl/cogl-types.h b/cogl/cogl/cogl-types.h
index 922ba0376..2b9643ed8 100644
--- a/cogl/cogl/cogl-types.h
+++ b/cogl/cogl/cogl-types.h
@@ -125,15 +125,6 @@ cogl_handle_ref (CoglHandle handle);
void
cogl_handle_unref (CoglHandle handle);
-/**
- * CoglFuncPtr:
- *
- * The type used by cogl for function pointers, note that this type
- * is used as a generic catch-all cast for function pointers and the
- * actual arguments and return type may be different.
- */
-typedef void (* CoglFuncPtr) (void);
-
/* We forward declare this in cogl-types to avoid circular dependencies
* between cogl-matrix.h, cogl-euler.h and cogl-quaterion.h */
typedef struct _CoglMatrix CoglMatrix;
diff --git a/cogl/cogl/cogl.c b/cogl/cogl/cogl.c
index 296999010..cf6a9844e 100644
--- a/cogl/cogl/cogl.c
+++ b/cogl/cogl/cogl.c
@@ -59,7 +59,7 @@
#include "deprecated/cogl-framebuffer-deprecated.h"
-CoglFuncPtr
+GCallback
cogl_get_proc_address (const char* name)
{
_COGL_GET_CONTEXT (ctx, NULL);
diff --git a/cogl/cogl/cogl1-context.h b/cogl/cogl/cogl1-context.h
index cb7f33ef4..8e7a28fde 100644
--- a/cogl/cogl/cogl1-context.h
+++ b/cogl/cogl/cogl1-context.h
@@ -106,7 +106,7 @@ cogl_features_available (CoglFeatureFlags features);
* Return value: a pointer to the requested function or %NULL if the
* function is not available.
*/
-CoglFuncPtr
+GCallback
cogl_get_proc_address (const char *name);
/**
diff --git a/cogl/cogl/winsys/cogl-winsys-egl.c b/cogl/cogl/winsys/cogl-winsys-egl.c
index 6e43d2227..56f423a75 100644
--- a/cogl/cogl/winsys/cogl-winsys-egl.c
+++ b/cogl/cogl/winsys/cogl-winsys-egl.c
@@ -138,7 +138,7 @@ get_error_string (void)
}
}
-static CoglFuncPtr
+static GCallback
_cogl_winsys_renderer_get_proc_address (CoglRenderer *renderer,
const char *name,
CoglBool in_core)
diff --git a/cogl/cogl/winsys/cogl-winsys-glx.c b/cogl/cogl/winsys/cogl-winsys-glx.c
index 2226ee942..dfdcf6490 100644
--- a/cogl/cogl/winsys/cogl-winsys-glx.c
+++ b/cogl/cogl/winsys/cogl-winsys-glx.c
@@ -166,7 +166,7 @@ static const CoglFeatureData winsys_feature_data[] =
#include "winsys/cogl-winsys-glx-feature-functions.h"
};
-static CoglFuncPtr
+static GCallback
_cogl_winsys_renderer_get_proc_address (CoglRenderer *renderer,
const char *name,
CoglBool in_core)
diff --git a/cogl/cogl/winsys/cogl-winsys-private.h b/cogl/cogl/winsys/cogl-winsys-private.h
index a8e07a509..ba4ad13e3 100644
--- a/cogl/cogl/winsys/cogl-winsys-private.h
+++ b/cogl/cogl/winsys/cogl-winsys-private.h
@@ -79,7 +79,7 @@ typedef struct _CoglWinsysVtable
/* Required functions */
- CoglFuncPtr
+ GCallback
(*renderer_get_proc_address) (CoglRenderer *renderer,
const char *name,
CoglBool in_core);
diff --git a/cogl/cogl/winsys/cogl-winsys-stub.c b/cogl/cogl/winsys/cogl-winsys-stub.c
index 29c4cf8c9..06815ea0a 100644
--- a/cogl/cogl/winsys/cogl-winsys-stub.c
+++ b/cogl/cogl/winsys/cogl-winsys-stub.c
@@ -49,7 +49,7 @@ static int _cogl_winsys_stub_dummy_ptr;
* integration code.
*/
-static CoglFuncPtr
+static GCallback
_cogl_winsys_renderer_get_proc_address (CoglRenderer *renderer,
const char *name,
CoglBool in_core)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]