[gtkmm] Window: Added get_device_cursor().
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Window: Added get_device_cursor().
- Date: Tue, 11 Jan 2011 22:00:07 +0000 (UTC)
commit 3fd6139cb9a4a02cfd3d16da354e75898721f159
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Jan 11 22:55:24 2011 +0100
Window: Added get_device_cursor().
* gdk/src/device.[hg|ccg]: Move the EventMask and GrabStatus enums here
because they are used by Device and Device is the more common header to
include. Do not include Window from here.
* gdk/src/window.hg: Added get_device_cursor(). Include device.h to use the
InputSource enum.
* tools/m4/convert_gdk.m4: Added necessary conversion.
* gdk/src/display.[hg|ccg]: Do not include device.h or devicemanager.h,
to avoid a circular include.
* gdk/src/screen.hg: Remove mention of removed gdk_screen_get_rgb_visual()
function.
* gdk/src/event.hg: Include types.h instead of window.h, because that is all
that is needed, and it avoids a circular include.
* gdk/src/pixbuf.hg: Include cairomm/surface.h instead of window.h, because
that is all that is needed, and it avoids a circular include.
* gdk/src/gdk_extra_objects.defs: Mention more objects, to improve the
documentation.
* gdk/gdmm/general.h: Include rgba.h and rectangle.h now that they are not
included indirectly.
ChangeLog | 23 +++++++++++++++++++++++
gdk/gdkmm/general.h | 2 ++
gdk/src/device.ccg | 1 +
gdk/src/device.hg | 6 +++++-
gdk/src/display.ccg | 1 +
gdk/src/display.hg | 3 +--
gdk/src/event.hg | 2 +-
gdk/src/gdk_extra_objects.defs | 18 ++++++++++++++++++
gdk/src/pixbuf.hg | 3 ++-
gdk/src/screen.hg | 3 ---
gdk/src/window.hg | 11 ++++++++---
tools/m4/convert_gdk.m4 | 1 +
12 files changed, 63 insertions(+), 11 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 72ac05a..e12f0d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,28 @@
2011-01-11 Murray Cumming <murrayc murrayc com>
+ Window: Added get_device_cursor().
+
+ * gdk/src/device.[hg|ccg]: Move the EventMask and GrabStatus enums here
+ because they are used by Device and Device is the more common header to
+ include. Do not include Window from here.
+ * gdk/src/window.hg: Added get_device_cursor(). Include device.h to use the
+ InputSource enum.
+ * tools/m4/convert_gdk.m4: Added necessary conversion.
+ * gdk/src/display.[hg|ccg]: Do not include device.h or devicemanager.h,
+ to avoid a circular include.
+ * gdk/src/screen.hg: Remove mention of removed gdk_screen_get_rgb_visual()
+ function.
+ * gdk/src/event.hg: Include types.h instead of window.h, because that is all
+ that is needed, and it avoids a circular include.
+ * gdk/src/pixbuf.hg: Include cairomm/surface.h instead of window.h, because
+ that is all that is needed, and it avoids a circular include.
+ * gdk/src/gdk_extra_objects.defs: Mention more objects, to improve the
+ documentation.
+ * gdk/gdmm/general.h: Include rgba.h and rectangle.h now that they are not
+ included indirectly.
+
+2011-01-11 Murray Cumming <murrayc murrayc com>
+
Regenerated the function defs.
* gdk/src/gdk_methods.defs:
diff --git a/gdk/gdkmm/general.h b/gdk/gdkmm/general.h
index 7c1bfe9..dbf66d8 100644
--- a/gdk/gdkmm/general.h
+++ b/gdk/gdkmm/general.h
@@ -22,6 +22,8 @@
#include <gdkmm/pixbuf.h>
#include <gdkmm/color.h>
+#include <gdkmm/rectangle.h>
+#include <gdkmm/rgba.h>
#include <cairomm/context.h>
#include <cairomm/region.h>
diff --git a/gdk/src/device.ccg b/gdk/src/device.ccg
index 3a54378..2149fee 100644
--- a/gdk/src/device.ccg
+++ b/gdk/src/device.ccg
@@ -21,6 +21,7 @@
#include <gdk/gdk.h>
#include <gdkmm/cursor.h>
#include <gdkmm/display.h>
+#include <gdkmm/window.h>
namespace Gdk
{
diff --git a/gdk/src/device.hg b/gdk/src/device.hg
index c88e134..ad789ed 100644
--- a/gdk/src/device.hg
+++ b/gdk/src/device.hg
@@ -17,7 +17,8 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <gdkmm/window.h>
+//#include <gdkmm/window.h>
+#include <gdkmm/cursor.h>
#include <gdkmm/event.h>
#include <gdkmm/timecoord.h>
#include <gdk/gdk.h>
@@ -30,12 +31,15 @@ _PINCLUDE(glibmm/private/object_p.h)
namespace Gdk
{
+_WRAP_ENUM(EventMask, GdkEventMask)
_WRAP_ENUM(InputMode, GdkInputMode)
_WRAP_ENUM(InputSource, GdkInputSource)
_WRAP_ENUM(DeviceType, GdkDeviceType)
_WRAP_ENUM(GrabOwnership, GdkGrabOwnership)
+_WRAP_ENUM(GrabStatus, GdkGrabStatus)
class Display;
+class Window;
/** A Gdk::Device instance contains a detailed description of an extended input device.
*/
diff --git a/gdk/src/display.ccg b/gdk/src/display.ccg
index 0f83a33..a831b6d 100644
--- a/gdk/src/display.ccg
+++ b/gdk/src/display.ccg
@@ -20,6 +20,7 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <gdkmm/devicemanager.h>
#include <gdkmm/window.h>
#include <gdk/gdk.h>
diff --git a/gdk/src/display.hg b/gdk/src/display.hg
index cda95b0..6e3ba7a 100644
--- a/gdk/src/display.hg
+++ b/gdk/src/display.hg
@@ -20,8 +20,7 @@
*/
#include <gdkmm/screen.h>
-#include <gdkmm/device.h>
-#include <gdkmm/devicemanager.h>
+//#include <gdkmm/devicemanager.h>
#include <gdkmm/types.h> //For ModifierType
_DEFS(gdkmm,gdk)
_PINCLUDE(glibmm/private/object_p.h)
diff --git a/gdk/src/event.hg b/gdk/src/event.hg
index 26faa12..38bcfcb 100644
--- a/gdk/src/event.hg
+++ b/gdk/src/event.hg
@@ -18,7 +18,7 @@
_DEFS(gdkmm,gdk)
_CC_INCLUDE(gdk/gdk.h)
-#include <gdkmm/window.h>
+#include <gdkmm/types.h>
#include <gdkmm/screen.h>
/* Shadow DELETE macro (from winnt.h).
diff --git a/gdk/src/gdk_extra_objects.defs b/gdk/src/gdk_extra_objects.defs
index 9f76252..6c701a4 100644
--- a/gdk/src/gdk_extra_objects.defs
+++ b/gdk/src/gdk_extra_objects.defs
@@ -6,6 +6,18 @@
; that are mentioned in documentation text.
; (DocsParser.pm:substitute_function(), which uses GtkDefs.pm:lookup_object().)
+(define-object Cursor
+ (in-module "Gdk")
+ (c-name "GdkCursor")
+ (gtype-id "GDK_TYPE_CURSOR")
+)
+
+(define-object Display
+ (in-module "Gdk")
+ (c-name "GdkDisplay")
+ (gtype-id "GDK_TYPE_DISPLAY")
+)
+
(define-object Event
(in-module "Gdk")
(c-name "GdkEvent")
@@ -18,6 +30,12 @@
(gtype-id "GDK_TYPE_REGION")
)
+(define-object Screen
+ (in-module "Gdk")
+ (c-name "GdkScreen")
+ (gtype-id "GDK_TYPE_SCREEN")
+)
+
(define-object Visual
(in-module "Gdk")
(c-name "GdkVisual")
diff --git a/gdk/src/pixbuf.hg b/gdk/src/pixbuf.hg
index fdfbad0..9ce030a 100644
--- a/gdk/src/pixbuf.hg
+++ b/gdk/src/pixbuf.hg
@@ -19,11 +19,12 @@
// the #ifndef GDKMM_DISABLE_DEPRECATED in deprecated classes) is generated:
_CONFIGINCLUDE(gdkmmconfig.h)
-#include <gdkmm/window.h>
+//#include <gdkmm/window.h>
#include <gdkmm/pixbufformat.h>
#include <gdkmm/types.h>
#include <giomm/inputstream.h>
#include <giomm/icon.h>
+#include <cairomm/surface.h>
_DEFS(gdkmm,gdk)
_PINCLUDE(glibmm/private/object_p.h)
diff --git a/gdk/src/screen.hg b/gdk/src/screen.hg
index 3957178..ed28378 100644
--- a/gdk/src/screen.hg
+++ b/gdk/src/screen.hg
@@ -51,9 +51,6 @@ public:
_WRAP_METHOD(Glib::RefPtr<Visual> get_system_visual(), gdk_screen_get_system_visual, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Visual> get_system_visual() const, gdk_screen_get_system_visual, refreturn, constversion)
- _WRAP_METHOD(Glib::RefPtr<Visual> get_rgb_visual(), gdk_screen_get_rgb_visual, refreturn)
- _WRAP_METHOD(Glib::RefPtr<const Visual> get_rgb_visual() const, gdk_screen_get_rgb_visual, refreturn, constversion)
-
_WRAP_METHOD(Glib::RefPtr<Visual> get_rgba_visual(), gdk_screen_get_rgba_visual, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Visual> get_rgba_visual() const, gdk_screen_get_rgba_visual, refreturn, constversion)
diff --git a/gdk/src/window.hg b/gdk/src/window.hg
index d498705..225e912 100644
--- a/gdk/src/window.hg
+++ b/gdk/src/window.hg
@@ -22,6 +22,7 @@ _CONFIGINCLUDE(gdkmmconfig.h)
#include <gdkmm/types.h>
#include <cairomm/region.h>
#include <cairomm/pattern.h>
+#include <gdkmm/device.h>
#include <gdkmm/visual.h>
#include <gdkmm/rgba.h>
#include <cairomm/context.h>
@@ -33,7 +34,6 @@ _PINCLUDE(glibmm/private/object_p.h)
namespace Gdk
{
-_WRAP_ENUM(EventMask, GdkEventMask)
_WRAP_ENUM(WindowState, GdkWindowState)
_WRAP_ENUM(WindowType, GdkWindowType)
_WRAP_ENUM(WindowAttributesType, GdkWindowAttributesType)
@@ -43,10 +43,8 @@ _WRAP_ENUM(WMDecoration, GdkWMDecoration)
_WRAP_ENUM(WMFunction, GdkWMFunction)
_WRAP_ENUM(WindowEdge, GdkWindowEdge)
_WRAP_ENUM(Gravity, GdkGravity)
-_WRAP_ENUM(GrabStatus, GdkGrabStatus)
class Cursor;
-class Device;
class Pixbuf;
/** A Gdk::Window is a rectangular region on the screen. It's a low-level object, used to implement high-level objects such
@@ -171,6 +169,10 @@ public:
* For top-level windows this means that it will use the default cursor for the ROOT window.
*/
void set_device_cursor(const Glib::RefPtr<Device>& device);
+
+ _WRAP_METHOD(Glib::RefPtr<Cursor> get_device_cursor(const Glib::RefPtr<Device>& device), gdk_window_get_device_cursor, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const Cursor> get_device_cursor(const Glib::RefPtr<const Device>& device) const, gdk_window_get_device_cursor, refreturn)
+
_WRAP_METHOD(Glib::RefPtr<Cursor> get_cursor(), gdk_window_get_cursor, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Cursor> get_cursor() const, gdk_window_get_cursor, refreturn, constversion)
@@ -211,6 +213,9 @@ public:
_WRAP_METHOD(EventMask get_device_events(const Glib::RefPtr<const Device>& device) const, gdk_window_get_device_events)
_WRAP_METHOD(void set_device_events(const Glib::RefPtr<Device>& device, EventMask event_mask), gdk_window_set_device_events)
+
+ _WRAP_METHOD(EventMask get_source_events(InputSource source) const, gdk_window_get_source_events)
+ _WRAP_METHOD(void set_source_events(InputSource source, EventMask event_mask), gdk_window_set_source_events)
_WRAP_METHOD(void set_icon_list(const Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> >& pixbufs), gdk_window_set_icon_list)
void set_icon(const Glib::RefPtr<Window>& icon_window, const Glib::RefPtr<Pixmap>& pixmap);
diff --git a/tools/m4/convert_gdk.m4 b/tools/m4/convert_gdk.m4
index 1f74eac..ecd66f9 100644
--- a/tools/m4/convert_gdk.m4
+++ b/tools/m4/convert_gdk.m4
@@ -188,6 +188,7 @@ _CONVERSION(`GdkPixmap*',`Glib::RefPtr<const Pixmap>', `Glib::wrap((GdkPixmapObj
_CONVERSION(`GdkPixmap*',`Glib::RefPtr<const Gdk::Pixmap>', `Glib::wrap((GdkPixmapObject*)($3))')
_CONVERSION(`GdkPixmap*',`Glib::RefPtr<Gdk::Pixmap>', `Glib::wrap((GdkPixmapObject*)($3))')
_CONVERSION(`GdkCursor*',`Glib::RefPtr<Cursor>', `Glib::wrap($3)')
+_CONVERSION(`GdkCursor*',`Glib::RefPtr<const Cursor>', `Glib::wrap($3)')
_CONVERSION(`GdkVisual*',`Glib::RefPtr<Gdk::Visual>', `Glib::wrap($3)')
_CONVERSION(`GdkVisual*',`Glib::RefPtr<Visual>', `Glib::wrap($3)')
_CONVERSION(`GdkVisual*',`Glib::RefPtr<const Visual>', `Glib::wrap($3)')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]