[cogl] context: Add an accessor to get display associated with the context
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] context: Add an accessor to get display associated with the context
- Date: Mon, 5 Sep 2011 18:48:54 +0000 (UTC)
commit 6584c183f03d42f4785f33524d028f41eb212843
Author: Damien Lespiau <damien lespiau intel com>
Date: Thu Aug 25 17:39:35 2011 +0100
context: Add an accessor to get display associated with the context
https://bugzilla.gnome.org/show_bug.cgi?id=657347
Reviewed-by: Robert Bragg <robert linux intel com>
cogl/cogl-context.c | 6 ++++++
cogl/cogl-context.h | 4 ++++
.../cogl-2.0-experimental-sections.txt | 1 +
3 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c
index 71e912d..02f05a6 100644
--- a/cogl/cogl-context.c
+++ b/cogl/cogl-context.c
@@ -495,6 +495,12 @@ _cogl_context_get_default (void)
return _context;
}
+CoglDisplay *
+cogl_context_get_display (CoglContext *context)
+{
+ return context->display;
+}
+
#ifdef COGL_HAS_EGL_SUPPORT
EGLDisplay
cogl_egl_context_get_egl_display (CoglContext *context)
diff --git a/cogl/cogl-context.h b/cogl/cogl-context.h
index 1b51ffc..9c616d3 100644
--- a/cogl/cogl-context.h
+++ b/cogl/cogl-context.h
@@ -61,6 +61,10 @@ CoglContext *
cogl_context_new (CoglDisplay *display,
GError **error);
+#define cogl_context_get_display cogl_context_get_display_EXP
+CoglDisplay *
+cogl_context_get_display (CoglContext *context);
+
#ifdef COGL_HAS_EGL_SUPPORT
#define cogl_egl_context_get_egl_display cogl_egl_context_get_egl_display_EXP
EGLDisplay
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 35f4d63..00e7792 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
@@ -72,6 +72,7 @@ cogl_wayland_display_set_compositor_display
<SUBSECTION>
cogl_context_new
+cogl_context_get_display
<SUBSECTION>
cogl_push_matrix
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]