summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2014-08-12 11:56:47 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2014-08-12 11:56:47 +0100
commit63130913ca6265ad59eaff5e9adbf8b3c7b25eb7 (patch)
treecd974e885805d8f1342f250f1d6d8c9cb02704db
parent3d2237865c4ff4f205a487466b9bc61ee9430a03 (diff)
downloadgtk+-63130913ca6265ad59eaff5e9adbf8b3c7b25eb7.tar.gz
docs: Add some more documentation to GdkGLContext
-rw-r--r--gdk/gdkglcontext.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c
index dfecfa03ce..0764344390 100644
--- a/gdk/gdkglcontext.c
+++ b/gdk/gdkglcontext.c
@@ -351,7 +351,9 @@ gdk_gl_context_get_visual (GdkGLContext *context)
* the copy may take place during the vertical refresh of the display
* rather than immediately.
*
- * This function calls `glFlush()` implicitly before returning.
+ * This function may call `glFlush()` implicitly before returning; it
+ * is not recommended to call `glFlush()` explicitly before calling
+ * this function.
*
* Since: 3.14
*/
@@ -552,12 +554,29 @@ gdk_gl_context_get_swap_interval (GdkGLContext *context)
return priv->swap_interval;
}
+/*< private >
+ * gdk_window_has_gl_context:
+ * @window: a #GdkWindow
+ *
+ * Checks whether a #GdkWindow has a #GdkGLContext associated to it.
+ *
+ * Returns: %TRUE if the window has a GL context
+ */
gboolean
gdk_window_has_gl_context (GdkWindow *window)
{
return g_object_get_data (G_OBJECT (window), "-gdk-gl-context") != NULL;
}
+/*< private >
+ * gdk_window_set_gl_context:
+ * @window: a #GdkWindow
+ * @context: a #GdkGLContext
+ *
+ * Sets a back pointer to a #GdkGLContext on @window.
+ *
+ * This function should only be called by gdk_gl_context_set_window().
+ */
void
gdk_window_set_gl_context (GdkWindow *window,
GdkGLContext *context)
@@ -565,6 +584,15 @@ gdk_window_set_gl_context (GdkWindow *window,
g_object_set_data (G_OBJECT (window), "-gdk-gl-context", context);
}
+/*< private >
+ * gdk_window_get_gl_context:
+ * @window: a #GdkWindow
+ *
+ * Retrieves a pointer to the #GdkGLContext associated to
+ * the @window.
+ *
+ * Returns: (transfer none): a #GdkGLContext, or %NULL
+ */
GdkGLContext *
gdk_window_get_gl_context (GdkWindow *window)
{