diff options
| author | Zander Brown <zbrown@gnome.org> | 2021-07-06 17:14:20 +0100 |
|---|---|---|
| committer | Zander Brown <zbrown@gnome.org> | 2021-07-18 23:24:01 +0100 |
| commit | 9dec4d4bbc26ed91be99c66133b9c4b79d1969f1 (patch) | |
| tree | 7360b67ddbac893301baca7142dd8d6222610d45 | |
| parent | 2b4f8bf97ed0887e5bb08f460a56eb6e2401198d (diff) | |
| download | mutter-zbrown/assorted-g-i-things.tar.gz | |
cogl: Hide a couple things that confuse g-izbrown/assorted-g-i-things
cogl_clutter_winsys_has_feature (and its macro nature) results in an
uncallable function, it's deprecated for cogl_has_feature anyway so
just hide it
EGLImageKHR is unusable via g-i so cogl_egl_texture_2d_new_from_image's
image parameter is unresolvable
g-i tried to parse the asserts as structs which is clearly nonsense,
avoid this by making COGL_STRUCT_SIZE_ASSERT impotent when scanning
| -rw-r--r-- | cogl/cogl/cogl-texture-2d.h | 3 | ||||
| -rw-r--r-- | cogl/cogl/cogl-types.h | 4 | ||||
| -rw-r--r-- | cogl/cogl/deprecated/cogl-clutter.h | 4 |
3 files changed, 11 insertions, 0 deletions
diff --git a/cogl/cogl/cogl-texture-2d.h b/cogl/cogl/cogl-texture-2d.h index 9bee64692..0e8f23b98 100644 --- a/cogl/cogl/cogl-texture-2d.h +++ b/cogl/cogl/cogl-texture-2d.h @@ -217,6 +217,8 @@ cogl_texture_2d_new_from_bitmap (CoglBitmap *bitmap); * cogl_egl_texture_2d_new_from_image: (skip) */ #if defined (COGL_HAS_EGL_SUPPORT) && defined (EGL_KHR_image_base) + +#ifndef __GI_SCANNER__ /* NB: The reason we require the width, height and format to be passed * even though they may seem redundant is because GLES 1/2 don't * provide a way to query these properties. */ @@ -228,6 +230,7 @@ cogl_egl_texture_2d_new_from_image (CoglContext *ctx, EGLImageKHR image, CoglEglImageFlags flags, GError **error); +#endif typedef gboolean (*CoglTexture2DEGLImageExternalAlloc) (CoglTexture2D *tex_2d, gpointer user_data, diff --git a/cogl/cogl/cogl-types.h b/cogl/cogl/cogl-types.h index cd92b2ecd..800ca47e3 100644 --- a/cogl/cogl/cogl-types.h +++ b/cogl/cogl/cogl-types.h @@ -64,6 +64,7 @@ G_BEGIN_DECLS #define COGL_PRIVATE(x) private_member_ ## x #endif +#ifndef __GI_SCANNER__ /* To help catch accidental changes to public structs that should * be stack allocated we use this macro to compile time assert that * a struct size is as expected. @@ -73,6 +74,9 @@ typedef struct { \ char compile_time_assert_ ## TYPE ## _size[ \ (sizeof (TYPE) == (SIZE)) ? 1 : -1]; \ } _ ## TYPE ## SizeCheck +#else +#define COGL_STRUCT_SIZE_ASSERT(TYPE, SIZE) +#endif /** * CoglHandle: diff --git a/cogl/cogl/deprecated/cogl-clutter.h b/cogl/cogl/deprecated/cogl-clutter.h index 3cf624d20..65c5b1b3b 100644 --- a/cogl/cogl/deprecated/cogl-clutter.h +++ b/cogl/cogl/deprecated/cogl-clutter.h @@ -35,11 +35,15 @@ G_BEGIN_DECLS +#ifndef __GI_SCANNER__ + #define cogl_clutter_winsys_has_feature cogl_clutter_winsys_has_feature_CLUTTER COGL_DEPRECATED_FOR (cogl_has_feature) COGL_EXPORT gboolean cogl_clutter_winsys_has_feature (CoglWinsysFeature feature); +#endif + G_END_DECLS #endif /* __COGL_CLUTTER_H__ */ |
