[gtk/wip/matthiasc/popup4: 83/106] surface: Add a frame-clock property
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup4: 83/106] surface: Add a frame-clock property
- Date: Wed, 24 Apr 2019 11:44:15 +0000 (UTC)
commit af34abbbe7fecb3e8bfd73573e0b17b39b17b7b8
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Apr 22 01:14:28 2019 +0000
surface: Add a frame-clock property
This will let us shift things around later.
gdk/gdksurface.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
---
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 411efdb097..2f53f12b31 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -83,6 +83,7 @@ enum {
PROP_0,
PROP_CURSOR,
PROP_DISPLAY,
+ PROP_FRAME_CLOCK,
PROP_STATE,
PROP_MAPPED,
LAST_PROP
@@ -204,6 +205,13 @@ gdk_surface_class_init (GdkSurfaceClass *klass)
GDK_TYPE_DISPLAY,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
+ properties[PROP_FRAME_CLOCK] =
+ g_param_spec_object ("frame-clock",
+ P_("Frame Clock"),
+ P_("Frame Clock"),
+ GDK_TYPE_FRAME_CLOCK,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
+
properties[PROP_STATE] =
g_param_spec_flags ("state",
P_("State"),
@@ -398,6 +406,10 @@ gdk_surface_set_property (GObject *object,
g_assert (surface->display != NULL);
break;
+ case PROP_FRAME_CLOCK:
+ gdk_surface_set_frame_clock (surface, GDK_FRAME_CLOCK (g_value_get_object (value));
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -422,6 +434,10 @@ gdk_surface_get_property (GObject *object,
g_value_set_object (value, surface->display);
break;
+ case PROP_FRAME_CLOCK:
+ g_value_set_object (value, surface->frame_clock);
+ break;
+
case PROP_STATE:
g_value_set_flags (value, surface->state);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]