[gtk+] gdk: Add private API for rendering mode
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdk: Add private API for rendering mode
- Date: Mon, 10 Nov 2014 20:25:36 +0000 (UTC)
commit 5536d9bcde711045393db7f94d4de309020b0f09
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Nov 10 14:39:57 2014 -0500
gdk: Add private API for rendering mode
This will be used to expose rendering mode in the inspector.
gdk/gdk-private.c | 2 ++
gdk/gdk-private.h | 12 +++++++++++-
gdk/gdkdisplay.c | 13 +++++++++++++
3 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdk-private.c b/gdk/gdk-private.c
index bbb89a7..e6588de 100644
--- a/gdk/gdk-private.c
+++ b/gdk/gdk-private.c
@@ -13,6 +13,8 @@ gdk__private__ (void)
gdk_gl_set_flags,
gdk_window_freeze_toplevel_updates,
gdk_window_thaw_toplevel_updates,
+ gdk_display_get_rendering_mode,
+ gdk_display_set_rendering_mode
};
return &table;
diff --git a/gdk/gdk-private.h b/gdk/gdk-private.h
index 290160d..9a012e0 100644
--- a/gdk/gdk-private.h
+++ b/gdk/gdk-private.h
@@ -23,6 +23,10 @@ void gdk_gl_set_flags (GdkGLFlags flags);
void gdk_window_freeze_toplevel_updates (GdkWindow *window);
void gdk_window_thaw_toplevel_updates (GdkWindow *window);
+GdkRenderingMode gdk_display_get_rendering_mode (GdkDisplay *display);
+void gdk_display_set_rendering_mode (GdkDisplay *display,
+ GdkRenderingMode mode);
+
typedef struct {
/* add all private functions here, initialize them in gdk-private.c */
gboolean (* gdk_device_grab_info) (GdkDisplay *display,
@@ -34,10 +38,16 @@ typedef struct {
void (* gdk_add_option_entries) (GOptionGroup *group);
void (* gdk_pre_parse) (void);
+
GdkGLFlags (* gdk_gl_get_flags) (void);
- void (* gdk_gl_set_flags) (GdkGLFlags flags);
+ void (* gdk_gl_set_flags) (GdkGLFlags flags);
+
void (* gdk_window_freeze_toplevel_updates) (GdkWindow *window);
void (* gdk_window_thaw_toplevel_updates) (GdkWindow *window);
+
+ GdkRenderingMode (* gdk_display_get_rendering_mode) (GdkDisplay *display);
+ void (* gdk_display_set_rendering_mode) (GdkDisplay *display,
+ GdkRenderingMode mode);
} GdkPrivateVTable;
GDK_AVAILABLE_IN_ALL
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index 029a1c4..f3a6aaa 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -2289,3 +2289,16 @@ gdk_display_make_gl_context_current (GdkDisplay *display,
{
return GDK_DISPLAY_GET_CLASS (display)->make_gl_context_current (display, context);
}
+
+GdkRenderingMode
+gdk_display_get_rendering_mode (GdkDisplay *display)
+{
+ return display->rendering_mode;
+}
+
+void
+gdk_display_set_rendering_mode (GdkDisplay *display,
+ GdkRenderingMode mode)
+{
+ display->rendering_mode = mode;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]