[gtkmm] Gdk::Display: Add methods and signals related to Gdk::Monitor
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gdk::Display: Add methods and signals related to Gdk::Monitor
- Date: Fri, 27 May 2016 14:23:24 +0000 (UTC)
commit 9d3310f52abd978d88ef68d6d9e605c9ee34f3a2
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Fri May 27 16:20:04 2016 +0200
Gdk::Display: Add methods and signals related to Gdk::Monitor
gdk/src/display.ccg | 1 +
gdk/src/display.hg | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/gdk/src/display.ccg b/gdk/src/display.ccg
index 661707f..9a990ce 100644
--- a/gdk/src/display.ccg
+++ b/gdk/src/display.ccg
@@ -21,6 +21,7 @@
#include <gdkmm/applaunchcontext.h>
#include <gdkmm/devicemanager.h>
#include <gdkmm/seat.h>
+#include <gdkmm/monitor.h>
#include <gdkmm/window.h>
#include <gdk/gdk.h>
diff --git a/gdk/src/display.hg b/gdk/src/display.hg
index dece178..c3b86d8 100644
--- a/gdk/src/display.hg
+++ b/gdk/src/display.hg
@@ -32,6 +32,8 @@ _CC_INCLUDE(gdk/gdk.h)
class Device;
class DeviceManager;
class Seat;
+class Monitor;
+class Window;
/** Gdk::Display object's purpose is two fold:
* To grab/ungrab keyboard focus and mouse pointer
@@ -166,6 +168,16 @@ public:
#m4 _CONVERSION(`GList*',`std::vector<Glib::RefPtr<const Seat>>',`Glib::ListHandler<Glib::RefPtr<const
Seat>>::list_to_vector($3, Glib::OWNERSHIP_SHALLOW)')
_WRAP_METHOD(std::vector<Glib::RefPtr<const Seat>> list_seats() const, gdk_display_list_seats)
+ _WRAP_METHOD(int get_n_monitors() const, gdk_display_get_n_monitors)
+ _WRAP_METHOD(Glib::RefPtr<Monitor> get_monitor(int monitor_num), gdk_display_get_monitor, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const Monitor> get_monitor(int monitor_num) const, gdk_display_get_monitor,
refreturn, constversion)
+ _WRAP_METHOD(Glib::RefPtr<Monitor> get_primary_monitor(), gdk_display_get_primary_monitor, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const Monitor> get_primary_monitor() const, gdk_display_get_primary_monitor,
refreturn, constversion)
+ _WRAP_METHOD(Glib::RefPtr<Monitor> get_monitor_at_point(int x, int y), gdk_display_get_monitor_at_point,
refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const Monitor> get_monitor_at_point(int x, int y) const,
gdk_display_get_monitor_at_point, refreturn, constversion)
+ _WRAP_METHOD(Glib::RefPtr<Monitor> get_monitor_at_window(const Glib::RefPtr<Window>& window),
gdk_display_get_monitor_at_window, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const Monitor> get_monitor_at_window(const Glib::RefPtr<Window>& window) const,
gdk_display_get_monitor_at_window, refreturn, constversion)
+
//We use no_default_handler because GdkDisplayClass is private.
_WRAP_SIGNAL(void closed(bool is_error), closed, no_default_handler)
@@ -175,6 +187,10 @@ public:
_WRAP_SIGNAL(void seat_added(const Glib::RefPtr<Seat>& seat), "seat-added", no_default_handler)
_WRAP_SIGNAL(void seat_removed(const Glib::RefPtr<Seat>& seat), "seat-removed", no_default_handler)
+#m4 _CONVERSION(`GdkMonitor*',`const Glib::RefPtr<Monitor>&', Glib::wrap($3, true))
+ _WRAP_SIGNAL(void monitor_added(const Glib::RefPtr<Monitor>& monitor), "monitor-added", no_default_handler)
+ _WRAP_SIGNAL(void monitor_removed(const Glib::RefPtr<Monitor>& monitor), "monitor-removed",
no_default_handler)
+
// There are no properties.
// We don't wrap the vfuncs because GdkDisplayClass is private.
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]