[gtkmm/gtkmm-3-24] Add Gdk::FrameClock and Gdk::FrameTimings
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm/gtkmm-3-24] Add Gdk::FrameClock and Gdk::FrameTimings
- Date: Wed, 22 Aug 2018 14:45:05 +0000 (UTC)
commit 66e03b6c4754e87aad54c53f84a79e6a031a8dce
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Wed Aug 22 16:37:37 2018 +0200
Add Gdk::FrameClock and Gdk::FrameTimings
* gdk/src/frameclock.[ccg|hg]:
* gdk/src/frametimings.[ccg|hg]: New files.
* .gitignore:
* gdk/gdkmm.h:
* gdk/src/filelist.am: Add new filenames.
* gdk/src/gdk_extra_objects.defs: Add new objects.
* gdk/src/gdk_signals.defs: Add GdkFrameClock's signals.
* tools/extra_defs_gen/generate_defs_gdk.cc: Add GDK_TYPE_FRAME_CLOCK.
* tools/m4/convert_gdk.m: Add conversions for GdkFrameClock and
GdkFrameTimings.
Fixes #23
.gitignore | 4 +
gdk/gdkmm.h | 1 +
gdk/src/filelist.am | 2 +
gdk/src/frameclock.ccg | 15 ++++
gdk/src/frameclock.hg | 101 ++++++++++++++++++++++
gdk/src/frametimings.ccg | 15 ++++
gdk/src/frametimings.hg | 54 ++++++++++++
gdk/src/gdk_extra_objects.defs | 12 +++
gdk/src/gdk_signals.defs | 135 ++++++++++++++++++++++--------
tools/extra_defs_gen/generate_defs_gdk.cc | 1 +
tools/m4/convert_gdk.m4 | 8 +-
11 files changed, 313 insertions(+), 35 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index a336338c..91397e8b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -68,6 +68,10 @@ gdk/gdkmm/drawingcontext.cc
gdk/gdkmm/drawingcontext.h
gdk/gdkmm/event.cc
gdk/gdkmm/event.h
+gdk/gdkmm/frameclock.cc
+gdk/gdkmm/frameclock.h
+gdk/gdkmm/frametimings.cc
+gdk/gdkmm/frametimings.h
gdk/gdkmm/glcontext.cc
gdk/gdkmm/glcontext.h
gdk/gdkmm/monitor.cc
diff --git a/gdk/gdkmm.h b/gdk/gdkmm.h
index 3969510a..b50ffa21 100644
--- a/gdk/gdkmm.h
+++ b/gdk/gdkmm.h
@@ -31,6 +31,7 @@
#include <gdkmm/applaunchcontext.h>
#include <gdkmm/cursor.h>
#include <gdkmm/drawingcontext.h>
+#include <gdkmm/frameclock.h>
#include <gdkmm/glcontext.h>
#include <gdkmm/rectangle.h>
#include <gdkmm/display.h>
diff --git a/gdk/src/filelist.am b/gdk/src/filelist.am
index 0cdff5c8..157478a6 100644
--- a/gdk/src/filelist.am
+++ b/gdk/src/filelist.am
@@ -22,6 +22,8 @@ gdkmm_files_any_hg = \
dragcontext.hg \
drawingcontext.hg \
event.hg \
+ frameclock.hg \
+ frametimings.hg \
glcontext.hg \
monitor.hg \
pixbuf.hg \
diff --git a/gdk/src/frameclock.ccg b/gdk/src/frameclock.ccg
new file mode 100644
index 00000000..d47b7866
--- /dev/null
+++ b/gdk/src/frameclock.ccg
@@ -0,0 +1,15 @@
+/* Copyright (C) 2018 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
diff --git a/gdk/src/frameclock.hg b/gdk/src/frameclock.hg
new file mode 100644
index 00000000..f656564e
--- /dev/null
+++ b/gdk/src/frameclock.hg
@@ -0,0 +1,101 @@
+/* Copyright (C) 2018 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glibmm/object.h>
+#include <gdkmm/frametimings.h>
+
+_DEFS(gdkmm,gdk)
+_PINCLUDE(glibmm/private/object_p.h)
+
+_CC_INCLUDE(gdk/gdk.h)
+
+extern "C" typedef struct _GdkFrameClock GdkFrameClock;
+
+namespace Gdk
+{
+_WRAP_ENUM(FrameClockPhase, GdkFrameClockPhase, newin "3,24")
+
+/** Frame clock syncs painting to a window or display.
+ *
+ * A %Gdk::FrameClock tells the application when to update and repaint a
+ * window. This may be synced to the vertical refresh rate of the
+ * monitor, for example. Even when the frame clock uses a simple timer
+ * rather than a hardware-based vertical sync, the frame clock helps
+ * because it ensures everything paints at the same time (reducing the
+ * total number of frames). The frame clock can also automatically
+ * stop painting when it knows the frames will not be visible, or
+ * scale back animation framerates.
+ *
+ * %Gdk::FrameClock is designed to be compatible with an OpenGL-based
+ * implementation or with mozRequestAnimationFrame in Firefox,
+ * for example.
+ *
+ * A frame clock is idle until someone requests a frame with
+ * request_phase(). At some later point that makes
+ * sense for the synchronization being implemented, the clock will
+ * process a frame and emit signals for each phase that has been
+ * requested. (See the signals of the %Gdk::FrameClock class for
+ * documentation of the phases. Gdk::FRAME_CLOCK_PHASE_UPDATE and the
+ * signal_update() signal are most interesting for application
+ * writers, and are used to update the animations, using the frame time
+ * given by get_frame_time().
+ *
+ * The frame time is reported in microseconds and generally in the same
+ * timescale as g_get_monotonic_time(), however, it is not the same
+ * as g_get_monotonic_time(). The frame time does not advance during
+ * the time a frame is being painted, and outside of a frame, an attempt
+ * is made so that all calls to get_frame_time() that
+ * are called at a “similar” time get the same value. This means that
+ * if different animations are timed by looking at the difference in
+ * time between an initial value from get_frame_time()
+ * and the value inside the signal_update() signal of the clock,
+ * they will stay exactly synchronized.
+ *
+ * @newin{3,24}
+ */
+class FrameClock : public Glib::Object
+{
+ _CLASS_GOBJECT(FrameClock, GdkFrameClock, GDK_FRAME_CLOCK, Glib::Object, GObject)
+
+public:
+ _WRAP_METHOD(gint64 get_frame_time() const, gdk_frame_clock_get_frame_time)
+ _WRAP_METHOD(void request_phase(FrameClockPhase phase), gdk_frame_clock_request_phase)
+ _WRAP_METHOD(void begin_updating(), gdk_frame_clock_begin_updating)
+ _WRAP_METHOD(void end_updating(), gdk_frame_clock_end_updating)
+ _WRAP_METHOD(gint64 get_frame_counter() const, gdk_frame_clock_get_frame_counter)
+ _WRAP_METHOD(gint64 get_history_start() const, gdk_frame_clock_get_history_start)
+ _WRAP_METHOD(Glib::RefPtr<FrameTimings> get_timings(gint64 frame_counter), gdk_frame_clock_get_timings,
refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const FrameTimings> get_timings(gint64 frame_counter) const,
gdk_frame_clock_get_timings, refreturn, constversion)
+ _WRAP_METHOD(Glib::RefPtr<FrameTimings> get_current_timings(), gdk_frame_clock_get_current_timings,
refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const FrameTimings> get_current_timings() const,
gdk_frame_clock_get_current_timings, refreturn, constversion)
+ _WRAP_METHOD(void get_refresh_info(gint64 base_time, gint64& refresh_interval_return,
+ gint64& presentation_time_return) const, gdk_frame_clock_get_refresh_info)
+
+ _IGNORE_SIGNAL("flush-events")dnl// Applications should not handle this signal.
+ _IGNORE_SIGNAL("before-paint")dnl// Applications should generally not handle this signal.
+
+ // no_default_handler because the wrapped C signals have no default handlers.
+ _WRAP_SIGNAL(void update(), "update", no_default_handler)
+ _WRAP_SIGNAL(void layout(), "layout", no_default_handler)
+ _WRAP_SIGNAL(void paint(), "paint", no_default_handler)
+
+ _IGNORE_SIGNAL("after-paint")dnl// Applications should generally not handle this signal.
+ _IGNORE_SIGNAL("resume-events")dnl// Applications should not handle this signal.
+
+ // There are no properties or vfuncs.
+};
+
+} // namespace Gdk
diff --git a/gdk/src/frametimings.ccg b/gdk/src/frametimings.ccg
new file mode 100644
index 00000000..d47b7866
--- /dev/null
+++ b/gdk/src/frametimings.ccg
@@ -0,0 +1,15 @@
+/* Copyright (C) 2018 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
diff --git a/gdk/src/frametimings.hg b/gdk/src/frametimings.hg
new file mode 100644
index 00000000..ef286f1b
--- /dev/null
+++ b/gdk/src/frametimings.hg
@@ -0,0 +1,54 @@
+/* Copyright (C) 2018 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+_DEFS(gdkmm,gdk)
+
+#include <glibmm/refptr.h>
+
+_CC_INCLUDE(gdk/gdk.h)
+
+extern "C" typedef struct _GdkFrameTimings GdkFrameTimings;
+
+namespace Gdk
+{
+
+/** Object holding timing information for a single frame.
+ *
+ * A %Gdk::FrameTimings object holds timing information for a single frame
+ * of the application’s displays. To retrieve %Gdk::FrameTimings objects,
+ * use Gdk::FrameClock::get_timings() or Gdk::FrameClock::get_current_timings().
+ * The information in %Gdk::FrameTimings is useful for precise synchronization
+ * of video with the event or audio streams, and for measuring
+ * quality metrics for the application’s display, such as latency and jitter.
+ *
+ * @newin{3,24}
+ */
+class FrameTimings final
+{
+ // GdkFrameTimings is registered as a boxed type, but it has custom
+ // reference-counting instead of copy/free functions, so we use it via RefPtr.
+ _CLASS_OPAQUE_REFCOUNTED(FrameTimings, GdkFrameTimings, NONE, gdk_frame_timings_ref,
gdk_frame_timings_unref)
+ _IGNORE(gdk_frame_timings_ref, gdk_frame_timings_unref)
+public:
+ _WRAP_METHOD(gint64 get_frame_counter() const, gdk_frame_timings_get_frame_counter)
+ _WRAP_METHOD(bool get_complete() const, gdk_frame_timings_get_complete)
+ _WRAP_METHOD(gint64 get_frame_time() const, gdk_frame_timings_get_frame_time)
+ _WRAP_METHOD(gint64 get_presentation_time() const, gdk_frame_timings_get_presentation_time)
+ _WRAP_METHOD(gint64 get_refresh_interval() const, gdk_frame_timings_get_refresh_interval)
+ _WRAP_METHOD(gint64 get_predicted_presentation_time() const,
gdk_frame_timings_get_predicted_presentation_time)
+};
+
+} // namespace Gdk
diff --git a/gdk/src/gdk_extra_objects.defs b/gdk/src/gdk_extra_objects.defs
index 91a38cca..5c366214 100644
--- a/gdk/src/gdk_extra_objects.defs
+++ b/gdk/src/gdk_extra_objects.defs
@@ -62,6 +62,18 @@
(gtype-id "GDK_TYPE_EVENT")
)
+(define-object FrameClock
+ (in-module "Gdk")
+ (c-name "GdkFrameClock")
+ (gtype-id "GDK_TYPE_FRAME_CLOCK")
+)
+
+(define-object FrameTimings
+ (in-module "Gdk")
+ (c-name "GdkFrameTimings")
+ (gtype-id "GDK_TYPE_FRAME_TIMINGS")
+)
+
(define-object GLContext
(in-module "Gdk")
(parent "GObject")
diff --git a/gdk/src/gdk_signals.defs b/gdk/src/gdk_signals.defs
index c67ce7a2..96632079 100644
--- a/gdk/src/gdk_signals.defs
+++ b/gdk/src/gdk_signals.defs
@@ -14,7 +14,7 @@
(define-signal cancel
(of-object "GdkDragContext")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GdkDragCancelReason" "p0")
)
@@ -23,7 +23,7 @@
(define-signal drop-performed
(of-object "GdkDragContext")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("gint" "p0")
)
@@ -32,13 +32,13 @@
(define-signal dnd-finished
(of-object "GdkDragContext")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
(define-signal action-changed
(of-object "GdkDragContext")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GdkDragAction" "p0")
)
@@ -49,13 +49,13 @@
(define-signal changed
(of-object "GdkDevice")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
(define-signal tool-changed
(of-object "GdkDevice")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GdkDeviceTool*" "p0")
)
@@ -86,6 +86,7 @@
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property associated-device
@@ -104,6 +105,7 @@
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "GDK_DEVICE_TYPE_MASTER")
)
(define-property input-source
@@ -113,6 +115,7 @@
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "GDK_SOURCE_MOUSE")
)
(define-property input-mode
@@ -122,6 +125,7 @@
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "GDK_MODE_DISABLED")
)
(define-property has-cursor
@@ -131,6 +135,7 @@
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "FALSE")
)
(define-property n-axes
@@ -140,6 +145,7 @@
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "0")
)
(define-property vendor-id
@@ -149,6 +155,7 @@
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property product-id
@@ -158,6 +165,7 @@
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property seat
@@ -176,6 +184,7 @@
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "0")
)
(define-property axes
@@ -185,6 +194,7 @@
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "0")
)
(define-property tool
@@ -201,7 +211,7 @@
(define-signal device-added
(of-object "GdkDeviceManager")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GdkDevice*" "p0")
)
@@ -210,7 +220,7 @@
(define-signal device-removed
(of-object "GdkDeviceManager")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GdkDevice*" "p0")
)
@@ -219,7 +229,7 @@
(define-signal device-changed
(of-object "GdkDeviceManager")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GdkDevice*" "p0")
)
@@ -239,13 +249,13 @@
(define-signal opened
(of-object "GdkDisplay")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
(define-signal closed
(of-object "GdkDisplay")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("gboolean" "p0")
)
@@ -254,7 +264,7 @@
(define-signal seat-added
(of-object "GdkDisplay")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GdkSeat*" "p0")
)
@@ -263,7 +273,7 @@
(define-signal seat-removed
(of-object "GdkDisplay")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GdkSeat*" "p0")
)
@@ -272,7 +282,7 @@
(define-signal monitor-added
(of-object "GdkDisplay")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GdkMonitor*" "p0")
)
@@ -281,7 +291,7 @@
(define-signal monitor-removed
(of-object "GdkDisplay")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GdkMonitor*" "p0")
)
@@ -292,7 +302,7 @@
(define-signal display-opened
(of-object "GdkDisplayManager")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GdkDisplay*" "p0")
)
@@ -327,12 +337,56 @@
(construct-only #t)
)
+;; From GdkFrameClock
+
+(define-signal flush-events
+ (of-object "GdkFrameClock")
+ (return-type "void")
+ (flags "Run Last")
+)
+
+(define-signal before-paint
+ (of-object "GdkFrameClock")
+ (return-type "void")
+ (flags "Run Last")
+)
+
+(define-signal update
+ (of-object "GdkFrameClock")
+ (return-type "void")
+ (flags "Run Last")
+)
+
+(define-signal layout
+ (of-object "GdkFrameClock")
+ (return-type "void")
+ (flags "Run Last")
+)
+
+(define-signal paint
+ (of-object "GdkFrameClock")
+ (return-type "void")
+ (flags "Run Last")
+)
+
+(define-signal after-paint
+ (of-object "GdkFrameClock")
+ (return-type "void")
+ (flags "Run Last")
+)
+
+(define-signal resume-events
+ (of-object "GdkFrameClock")
+ (return-type "void")
+ (flags "Run Last")
+)
+
;; From GdkMonitor
(define-signal invalidate
(of-object "GdkMonitor")
(return-type "void")
- (when "first")
+ (flags "Run First")
)
(define-property display
@@ -351,6 +405,7 @@
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "")
)
(define-property model
@@ -360,6 +415,7 @@
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "")
)
(define-property scale-factor
@@ -369,6 +425,7 @@
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "1")
)
(define-property geometry
@@ -396,6 +453,7 @@
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "0")
)
(define-property height-mm
@@ -405,6 +463,7 @@
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "0")
)
(define-property refresh-rate
@@ -414,6 +473,7 @@
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "0")
)
(define-property subpixel-layout
@@ -423,6 +483,7 @@
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "GDK_SUBPIXEL_LAYOUT_UNKNOWN")
)
;; From GdkPixbuf
@@ -434,6 +495,7 @@
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "GDK_COLORSPACE_RGB")
)
(define-property n-channels
@@ -443,6 +505,7 @@
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "3")
)
(define-property has-alpha
@@ -452,6 +515,7 @@
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "FALSE")
)
(define-property bits-per-sample
@@ -461,6 +525,7 @@
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "8")
)
(define-property width
@@ -470,6 +535,7 @@
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "1")
)
(define-property height
@@ -479,6 +545,7 @@
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "1")
)
(define-property rowstride
@@ -488,6 +555,7 @@
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "1")
)
(define-property pixels
@@ -515,13 +583,13 @@
(define-signal closed
(of-object "GdkPixbufLoader")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
(define-signal size-prepared
(of-object "GdkPixbufLoader")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("gint" "p0")
'("gint" "p1")
@@ -531,13 +599,13 @@
(define-signal area-prepared
(of-object "GdkPixbufLoader")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
(define-signal area-updated
(of-object "GdkPixbufLoader")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("gint" "p0")
'("gint" "p1")
@@ -553,19 +621,19 @@
(define-signal size-changed
(of-object "GdkScreen")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
(define-signal composited-changed
(of-object "GdkScreen")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
(define-signal monitors-changed
(of-object "GdkScreen")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
(define-property font-options
@@ -584,6 +652,7 @@
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "-1")
)
;; From GdkSeat
@@ -591,7 +660,7 @@
(define-signal device-added
(of-object "GdkSeat")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GdkDevice*" "p0")
)
@@ -600,7 +669,7 @@
(define-signal device-removed
(of-object "GdkSeat")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GdkDevice*" "p0")
)
@@ -609,7 +678,7 @@
(define-signal tool-added
(of-object "GdkSeat")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GdkDeviceTool*" "p0")
)
@@ -618,7 +687,7 @@
(define-signal tool-removed
(of-object "GdkSeat")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GdkDeviceTool*" "p0")
)
@@ -640,7 +709,7 @@
(define-signal pick-embedded-child
(of-object "GdkWindow")
(return-type "GdkWindow*")
- (when "last")
+ (flags "Run Last")
(parameters
'("gdouble" "p0")
'("gdouble" "p1")
@@ -650,7 +719,7 @@
(define-signal to-embedder
(of-object "GdkWindow")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("gdouble" "p0")
'("gdouble" "p1")
@@ -662,7 +731,7 @@
(define-signal from-embedder
(of-object "GdkWindow")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("gdouble" "p0")
'("gdouble" "p1")
@@ -674,7 +743,7 @@
(define-signal create-surface
(of-object "GdkWindow")
(return-type "CairoSurface*")
- (when "last")
+ (flags "Run Last")
(parameters
'("gint" "p0")
'("gint" "p1")
@@ -684,7 +753,7 @@
(define-signal moved-to-rect
(of-object "GdkWindow")
(return-type "void")
- (when "first")
+ (flags "Run First")
(parameters
'("gpointer" "p0")
'("gpointer" "p1")
diff --git a/tools/extra_defs_gen/generate_defs_gdk.cc b/tools/extra_defs_gen/generate_defs_gdk.cc
index 800fb1ad..96101847 100644
--- a/tools/extra_defs_gen/generate_defs_gdk.cc
+++ b/tools/extra_defs_gen/generate_defs_gdk.cc
@@ -44,6 +44,7 @@ int main(int argc, char** argv)
<< get_defs( GDK_TYPE_DISPLAY_MANAGER )
#endif /* G_OS_WIN32 */
<< get_defs( GDK_TYPE_DRAWING_CONTEXT )
+ << get_defs( GDK_TYPE_FRAME_CLOCK )
<< get_defs( GDK_TYPE_MONITOR )
<< get_defs( GDK_TYPE_PIXBUF )
<< get_defs( GDK_TYPE_PIXBUF_ANIMATION )
diff --git a/tools/m4/convert_gdk.m4 b/tools/m4/convert_gdk.m4
index a34dc7bf..7dc6768a 100644
--- a/tools/m4/convert_gdk.m4
+++ b/tools/m4/convert_gdk.m4
@@ -40,6 +40,7 @@ _CONV_ENUM(Gdk,EventType)
_CONV_ENUM(Gdk,ExtensionMode)
_CONV_ENUM(Gdk,Fill)
_CONV_ENUM(Gdk,FillRule)
+_CONV_ENUM(Gdk,FrameClockPhase)
_CONV_ENUM(Gdk,FullscreenMode)
_CONV_ENUM(Gdk,Function)
_CONV_ENUM(Gdk,GCValuesMask)
@@ -270,8 +271,11 @@ _CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr<Display> >',`$2($3, Glib:
_CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr<const Display> >',`$2($3, Glib::OWNERSHIP_SHALLOW)')
_CONVERSION(`gchar**',`Glib::StringArrayHandle',`$2($3)')
-
-
+# FrameClock, FrameTimings
+_CONVERSION(`GdkFrameClock*',`Glib::RefPtr<FrameClock>',`Glib::wrap($3)')
+_CONVERSION(`GdkFrameClock*',`Glib::RefPtr<Gdk::FrameClock>',`Glib::wrap($3)')
+_CONVERSION(`const Glib::RefPtr<Gdk::FrameClock>&',`GdkFrameClock*',__CONVERT_REFPTR_TO_P)
+_CONVERSION(`GdkFrameTimings*',`Glib::RefPtr<FrameTimings>',`Glib::wrap($3)')
# XPM data
_CONVERSION(`const char*const*',`const char**',`const_cast<const char**>($3)',`$3')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]