diff --git a/cogl/cogl-context.h b/cogl/cogl-context.h index 9c616d347..5d2913083 100644 --- a/cogl/cogl-context.h +++ b/cogl/cogl-context.h @@ -77,6 +77,21 @@ void cogl_android_set_native_window (ANativeWindow *window); #endif +/** + * cogl_is_context: + * @object: An object or %NULL + * + * Gets whether the given object references an existing context object. + * + * Return value: %TRUE if the handle references a #CoglContext, + * %FALSE otherwise + * + * Since: 1.10 + * Stability: Unstable + */ +gboolean +cogl_is_context (void *object); + G_END_DECLS #endif /* __COGL_CONTEXT_H__ */ diff --git a/doc/reference/cogl-2.0-experimental/cogl-2.0-experimental-sections.txt b/doc/reference/cogl-2.0-experimental/cogl-2.0-experimental-sections.txt index 6381a4cc6..70bb21c3a 100644 --- a/doc/reference/cogl-2.0-experimental/cogl-2.0-experimental-sections.txt +++ b/doc/reference/cogl-2.0-experimental/cogl-2.0-experimental-sections.txt @@ -74,6 +74,7 @@ cogl_wayland_display_set_compositor_display cogl_context_new +cogl_is_context cogl_context_get_display