[gtk/matthiasc/color-profiles: 98/111] Add gdk_surface_set_hdr




commit 73589ef038da476c34d020377dbf6d3064d8d177
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 e9c5981d83..0828abc76f 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -494,6 +494,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)
 {
@@ -504,6 +510,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)
@@ -3124,3 +3131,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 30985fa88d..16bdd7b152 100644
--- a/gdk/gdksurfaceprivate.h
+++ b/gdk/gdksurfaceprivate.h
@@ -161,6 +161,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)
@@ -347,6 +350,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]