[gtk/matthiasc/color-profiles: 18/32] Add gdk_surface_set_hdr




commit 6489e40d12e2524f0bd89d8e4cd50d4d7a581e86
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Oct 1 20:21:32 2021 -0400

    Add gdk_surface_set_hdr
    
    Add private api to tell a GdkSurface that it should
    provide an HDR framebuffer (what that means is not
    precisely specified).
    
    Currently, this does nothing, since no backends
    implement the new vfunc.

 gdk/gdksurface.c        | 15 +++++++++++++++
 gdk/gdksurfaceprivate.h |  5 +++++
 2 files changed, 20 insertions(+)
---
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index b35105eb27..2f7a8b8877 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -479,6 +479,12 @@ gdk_surface_init (GdkSurface *surface)
                                                  NULL, g_object_unref);
 }
 
+static void
+gdk_surface_real_set_hdr (GdkSurface *surface,
+                          gboolean    hdr)
+{
+}
+
 static void
 gdk_surface_class_init (GdkSurfaceClass *klass)
 {
@@ -489,6 +495,7 @@ gdk_surface_class_init (GdkSurfaceClass *klass)
   object_class->get_property = gdk_surface_get_property;
 
   klass->beep = gdk_surface_real_beep;
+  klass->set_hdr = gdk_surface_real_set_hdr;
 
   /**
    * GdkSurface:color-profile: (attributes org.gtk.Property.get=gdk_surface_get_color_profile)
@@ -3042,3 +3049,11 @@ gdk_surface_leave_monitor (GdkSurface *surface,
 {
   g_signal_emit (surface, signals[LEAVE_MONITOR], 0, monitor);
 }
+
+void
+gdk_surface_set_hdr (GdkSurface *surface,
+                     gboolean    hdr)
+{
+  GDK_SURFACE_GET_CLASS (surface)->set_hdr (surface, hdr);
+}
+
diff --git a/gdk/gdksurfaceprivate.h b/gdk/gdksurfaceprivate.h
index 566871c274..ab4a2b8974 100644
--- a/gdk/gdksurfaceprivate.h
+++ b/gdk/gdksurfaceprivate.h
@@ -163,6 +163,9 @@ struct _GdkSurfaceClass
                                            cairo_region_t *region);
   void         (* request_layout)         (GdkSurface     *surface);
   gboolean     (* compute_size)           (GdkSurface     *surface);
+
+  void         (* set_hdr)                (GdkSurface     *surface,
+                                           gboolean        hdr);
 };
 
 #define GDK_SURFACE_DESTROYED(d) (((GdkSurface *)(d))->destroyed)
@@ -339,6 +342,8 @@ void       gdk_surface_request_compute_size (GdkSurface      *surface);
 GDK_AVAILABLE_IN_ALL
 void           gdk_surface_request_motion (GdkSurface *surface);
 
+void       gdk_surface_set_hdr            (GdkSurface *surface,
+                                           gboolean    hdr);
 
 G_END_DECLS
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]