[gtkmm] Gdk::Window: Add new create_*() methods and property_display()
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gdk::Window: Add new create_*() methods and property_display()
- Date: Fri, 18 Nov 2016 15:26:13 +0000 (UTC)
commit fae06337c5e468a6aee1467496a5fa5d8dbdb5a5
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Fri Nov 18 16:21:13 2016 +0100
Gdk::Window: Add new create_*() methods and property_display()
Also remove Gtk::StyleContext::render_extension(), because
gtk_render_extension() has been removed.
gdk/src/window.hg | 25 +++++++++++++++++++------
gtk/src/stylecontext.hg | 1 -
tools/m4/convert_gdk.m4 | 1 +
3 files changed, 20 insertions(+), 7 deletions(-)
---
diff --git a/gdk/src/window.hg b/gdk/src/window.hg
index cf016fc..cd45567 100644
--- a/gdk/src/window.hg
+++ b/gdk/src/window.hg
@@ -59,9 +59,24 @@ class Window : public Glib::Object
{
_CLASS_GOBJECT(Window, GdkWindow, GDK_WINDOW, Glib::Object, GObject)
_STRUCT_NOT_HIDDEN
- _IGNORE(gdk_window_destroy, gdk_window_new, gdk_window_is_destroyed)
+ _IGNORE(gdk_window_destroy, gdk_window_is_destroyed)
public:
+ // _WRAP_CREATE() would not be very useful here.
+ // The gdk_window_new_*() functions do more than call g_object_new().
+ // And we can't make one hand-coded constructor for each gdk_window_new_*()
+ // function, because some of them have identical prototypes.
+ _WRAP_METHOD(static Glib::RefPtr<Window> create_toplevel(const Glib::RefPtr<Display>& display,
+ EventMask event_mask, int width, int height), gdk_window_new_toplevel)
+ _WRAP_METHOD(static Glib::RefPtr<Window> create_popup(const Glib::RefPtr<Display>& display,
+ EventMask event_mask, const Rectangle& position), gdk_window_new_popup)
+ //TODO: Wrap or ignore? The documentation says: You most likely do not want to use this function.
+ //_WRAP_METHOD(static Glib::RefPtr<Window> create_temp(const Glib::RefPtr<Display>& display),
gdk_window_new_temp)
+ _WRAP_METHOD(static Glib::RefPtr<Window> create_child(const Glib::RefPtr<Window>& parent,
+ EventMask event_mask, const Rectangle& position), gdk_window_new_child)
+ _WRAP_METHOD(static Glib::RefPtr<Window> create_input(const Glib::RefPtr<Window>& parent,
+ EventMask event_mask, const Rectangle& position), gdk_window_new_input)
+
_WRAP_METHOD(WindowType get_window_type() const, gdk_window_get_window_type)
_WRAP_METHOD(Glib::RefPtr<Screen> get_screen(), gdk_window_get_screen, refreturn)
@@ -325,11 +340,6 @@ public:
//This is const because it returns a copy (though that is not very clear from the C documentation)
_WRAP_METHOD(::Cairo::RefPtr< ::Cairo::Region> get_visible_region() const, gdk_window_get_visible_region)
- //TODO: Wrap these? Find out when they are emitted and if they are useful outside of GTK+, and improve the
C docs.
- //_WRAP_SIGNAL(Glib::RefPtr<Gdk::Window> pick_embedded_child(double x, double y), pick-embedded-child,
no_default_handler)
- //_WRAP_SIGNAL(Glib::RefPtr<Gdk::Window> to_embedder(double offscreen_x, double offscreen_y, double&
embedder_x, double& embedder_y), to-embedder, no_default_handler)
- //_WRAP_SIGNAL(Glib::RefPtr<Gdk::Window> from_embedder(double embedder_x, double embedder_y, double&
offscreen_x, double& offscreen_y), from-embedder, no_default_handler)
-
_WRAP_METHOD(void set_opaque_region(const ::Cairo::RefPtr<const ::Cairo::Region>& region),
gdk_window_set_opaque_region)
_WRAP_METHOD(void set_event_compression(bool event_compression = true), gdk_window_set_event_compression)
@@ -359,7 +369,10 @@ public:
_WRAP_METHOD(Glib::RefPtr<DrawingContext> begin_draw_frame(const ::Cairo::RefPtr<const ::Cairo::Region>&
region), gdk_window_begin_draw_frame, refreturn)
_WRAP_METHOD(void end_draw_frame(const Glib::RefPtr<DrawingContext>& context), gdk_window_end_draw_frame)
+ _IGNORE_SIGNAL("moved-to-rect")dnl// Private
+
_WRAP_PROPERTY("cursor", Glib::RefPtr<Cursor>)
+ _WRAP_PROPERTY("display", Glib::RefPtr<Display>)
};
} // namespace Gdk
diff --git a/gtk/src/stylecontext.hg b/gtk/src/stylecontext.hg
index 6e71c2c..39d3037 100644
--- a/gtk/src/stylecontext.hg
+++ b/gtk/src/stylecontext.hg
@@ -224,7 +224,6 @@ _DEPRECATE_IFDEF_END
_WRAP_METHOD(void render_line(const ::Cairo::RefPtr< ::Cairo::Context>& cr, double x0, double y0, double
x1, double y1), gtk_render_line)
_WRAP_METHOD(void render_slider(const ::Cairo::RefPtr< ::Cairo::Context>& cr, double x, double y, double
width, double height, Orientation orientation), gtk_render_slider)
_WRAP_METHOD(void render_frame_gap(const ::Cairo::RefPtr< ::Cairo::Context>& cr, double x, double y,
double width, double height, PositionType gap_side, double xy0_gap, double xy1_gap), gtk_render_frame_gap)
- _WRAP_METHOD(void render_extension(const ::Cairo::RefPtr< ::Cairo::Context>& cr, double x, double y,
double width, double height, PositionType gap_side), gtk_render_extension)
_WRAP_METHOD(void render_handle(const ::Cairo::RefPtr< ::Cairo::Context>& cr, double x, double y, double
width, double height), gtk_render_handle)
_WRAP_METHOD(void render_activity(const ::Cairo::RefPtr< ::Cairo::Context>& cr, double x, double y,
double width, double height), gtk_render_activity)
_WRAP_METHOD(void render_icon(const ::Cairo::RefPtr< ::Cairo::Context>& cr, const
Glib::RefPtr<Gdk::Pixbuf>& pixbuf, double x, double y), gtk_render_icon)
diff --git a/tools/m4/convert_gdk.m4 b/tools/m4/convert_gdk.m4
index cc505f5..256b64e 100644
--- a/tools/m4/convert_gdk.m4
+++ b/tools/m4/convert_gdk.m4
@@ -76,6 +76,7 @@ _CONV_ENUM(Gdk,GLError)
_CONVERSION(`guint32&',`guint32*',`&($3)')
+_CONVERSION(`EventMask',`gint',`$3')
_CONVERSION(`Gdk::EventMask',`gint',`$3')
_CONVERSION(`gint',`Gdk::EventMask',`static_cast<Gdk::EventMask>($3)')
_CONVERSION(`ModifierType&',`GdkModifierType*',`(($2) &($3))')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]