[gtkmm] Add RGBA class and widget methods.(Fixing the build with latest GTK+)
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Add RGBA class and widget methods.(Fixing the build with latest GTK+)
- Date: Mon, 25 Oct 2010 12:31:17 +0000 (UTC)
commit 94da6976d59be63149fc451f9ab9a1afa13c29fb
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Oct 25 14:30:56 2010 +0200
Add RGBA class and widget methods.(Fixing the build with latest GTK+)
* gdk/src/rgba.[hg|ccg]: Added the RGBA class, apparently a replacement for
Gdk::Color.
* gdk/src/iconinfo.hg: load_icon_symbolic(): Change the parameters from
Color to RGBA.
* gdk/src/scrollable.hg: Remove set/get_min_content_width/height().
* gtk/src/scrollable.hg: Added set/get_min_content_width/height() and
properties.
* gtk/src/widget.hg: Added queue_draw_region(), set/get_hexpand(),
set/get_hexpand_set(), set/get_vexpand(), set/get_vexpand_set(),
queue_compute_expand(), compute_expand(), shape_combine_region(),
input_shape_combine_region()
ChangeLog | 20 ++++-
gdk/src/filelist.am | 1 +
gdk/src/rgba.ccg | 190 +++++++++++++++++++++++++++++++++++++++++++++
gdk/src/rgba.hg | 150 +++++++++++++++++++++++++++++++++++
gtk/src/gtk_methods.defs | 141 +++++++++++++++++++++++++--------
gtk/src/iconinfo.ccg | 4 +-
gtk/src/iconinfo.hg | 3 +-
gtk/src/scrollable.hg | 10 +--
gtk/src/scrolledwindow.hg | 7 ++
gtk/src/widget.hg | 15 ++++
tools/m4/convert_gdk.m4 | 2 +-
11 files changed, 494 insertions(+), 49 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3425092..be0cb48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2010-10-25 Murray Cumming <murrayc murrayc com>>
+
+ Add RGBA class and widget methods.(Fixing the build with latest GTK+)
+
+ * gdk/src/rgba.[hg|ccg]: Added the RGBA class, apparently a replacement for
+ Gdk::Color.
+ * gdk/src/iconinfo.hg: load_icon_symbolic(): Change the parameters from
+ Color to RGBA.
+ * gdk/src/scrollable.hg: Remove set/get_min_content_width/height().
+ * gtk/src/scrollable.hg: Added set/get_min_content_width/height() and
+ properties.
+ * gtk/src/widget.hg: Added queue_draw_region(), set/get_hexpand(),
+ set/get_hexpand_set(), set/get_vexpand(), set/get_vexpand_set(),
+ queue_compute_expand(), compute_expand(), shape_combine_region(),
+ input_shape_combine_region()
+
2010-10-22 Murray Cumming <murrayc murrayc com>
Entry: Added get_text_area() and get_icon_area().
@@ -20,9 +36,9 @@
* gtk/src/toolpallette.hg:
* gtk/src/treeview.hg:
* gtk/src/viewport.hg: Derive from, and implement, Scrollable.
- Remove their get/set/unset_h/vadjustment() methods and set_scroll_adjustments
+ Remove their get/set/unset_h/vadjustment() methods and set_scroll_adjustments
signals, because they are now in the base Scrollable.
- * gtk/src/scrolledwindow.ccg: add() Use GTK_IS_SCROLLABLE() instead of the
+ * gtk/src/scrolledwindow.ccg: add() Use GTK_IS_SCROLLABLE() instead of the
old hack to check the default signal handler for 0.
2010-10-22 Murray Cumming <murrayc murrayc com>
diff --git a/gdk/src/filelist.am b/gdk/src/filelist.am
index 8d870dc..768913b 100644
--- a/gdk/src/filelist.am
+++ b/gdk/src/filelist.am
@@ -28,6 +28,7 @@ gdkmm_files_hg = \
pixbufformat.hg \
pixbufloader.hg \
rectangle.hg \
+ rgba.hg \
screen.hg \
types.hg \
visual.hg \
diff --git a/gdk/src/rgba.ccg b/gdk/src/rgba.ccg
new file mode 100644
index 0000000..5ad8545
--- /dev/null
+++ b/gdk/src/rgba.ccg
@@ -0,0 +1,190 @@
+/*
+ *
+ * Copyright 2010 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, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdk/gdk.h>
+
+namespace Gdk
+{
+
+RGBA::RGBA()
+{
+ GdkRGBA tmp = { 0, 0, 0, 0, };
+ gobject_ = gdk_rgba_copy(&tmp);
+}
+
+RGBA::RGBA(const Glib::ustring& value)
+{
+ GdkRGBA tmp = { 0, 0, 0, 0, };
+ gobject_ = gdk_rgba_copy(&tmp);
+
+ set(value);
+}
+
+void RGBA::set_grey(gushort value)
+{
+ gobject_->red = gobject_->green = gobject_->blue = value;
+}
+
+void RGBA::set_grey_p(double g)
+{
+ gobject_->red = gobject_->green = gobject_->blue = (gushort)(g * 65535.0);
+}
+
+void RGBA::set_rgb(gushort red_, gushort green_, gushort blue_)
+{
+ gobject_->red = red_;
+ gobject_->green = green_;
+ gobject_->blue = blue_;
+}
+
+void RGBA::set_rgb_p(double red_, double green_, double blue_)
+{
+ gobject_->red = (gushort)(red_ * 65535.0);
+ gobject_->green = (gushort)(green_ * 65535.0);
+ gobject_->blue = (gushort)(blue_ * 65535.0);
+}
+
+void RGBA::set_hsv(double h, double s, double v)
+{
+ //TODO: Comments/Documentation. I have no idea what this code does. murrayc.
+
+ h /= 60.0;
+ int i = (int)h;
+ double p = v * (1 - s);
+ double q = v * (1 - s * (h - i));
+ double t = v * (1 - s * (1 - h + i));
+
+ switch(i)
+ {
+ case 0:
+ set_rgb_p(v, t, p);
+ break;
+ case 1:
+ set_rgb_p(q, v, p);
+ break;
+ case 2:
+ set_rgb_p(p, v, t);
+ break;
+ case 3:
+ set_rgb_p(p, q, v);
+ break;
+ case 4:
+ set_rgb_p(t, p, v);
+ break;
+ default:
+ set_rgb_p(v, p, q);
+ }
+}
+
+void RGBA::set_hsl(double h, double s, double l)
+{
+ //TODO: Comments/Documentation. I have no idea what this code does. murrayc.
+
+ if(s == 0.0)
+ set_grey_p(l);
+ else
+ {
+ double t2 = (l < 0.5) ? l * (1.0 + s) : l + s - l * s;
+ double t1 = 2*l-t2;
+ h /= 360.0;
+
+ double tr = h + 1.0/3.0;
+ double tg = h;
+ double tb = h - 1.0/3.0;
+ if (tb < 0) tb += 1.0;
+
+ double r = 0.0, g = 0.0, b = 0.0;
+
+ if (tr < 1.0/6.0)
+ r = t1 +(t2-t1) * 6 * tr;
+ else if (tr < 1.0/2.0)
+ r = t2;
+ else if (tr < 2.0/3.0)
+ r = t1+(t2-t1)*(2.0/3.0 - tr) * 6.0;
+
+ if (tg < 1.0/6.0)
+ g = t1 + (t2 - t1) * 6 * tg;
+ else if (tg < 1.0/2.0)
+ g = t2;
+ else if (tg < 2.0/3.0)
+ g = t1+(t2-t1)*(2.0/3.0 - tg) * 6.0;
+
+ if (tb < 1.0/6.0)
+ b = t1 +(t2-t1) * 6 * tb;
+ else if (tb < 1.0/2.0)
+ b = t2;
+ else if (tb < 2.0/3.0)
+ b = t1+(t2-t1)*(2.0/3.0 - tb) * 6.0;
+
+ set_rgb_p(r, g, b);
+ }
+}
+
+bool RGBA::set(const Glib::ustring& value)
+{
+ return gdk_rgba_parse(value.c_str(), gobj());
+}
+
+gushort RGBA::get_red() const
+{
+ return gobject_->red;
+}
+
+gushort RGBA::get_green() const
+{
+ return gobject_->green;
+
+}
+gushort RGBA::get_blue() const
+{
+ return gobject_->blue;
+}
+
+void RGBA::set_red(gushort value)
+{
+ gobject_->red = value;
+}
+
+void RGBA::set_green(gushort value)
+{
+ gobject_->green = value;
+}
+
+void RGBA::set_blue(gushort value)
+{
+ gobject_->blue = value;
+}
+
+double RGBA::get_red_p() const
+{
+ return gobject_->red / 65535.0;
+}
+
+double RGBA::get_green_p() const
+{
+ return gobject_->green / 65535.0;
+}
+
+double RGBA::get_blue_p() const
+{
+ return gobject_->blue / 65535.0;
+}
+
+
+} //namespace Gdk
diff --git a/gdk/src/rgba.hg b/gdk/src/rgba.hg
new file mode 100644
index 0000000..de0b9bc
--- /dev/null
+++ b/gdk/src/rgba.hg
@@ -0,0 +1,150 @@
+/* Copyright (C) 2010 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, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdk/gdk.h> //TODO: Remove this?
+
+_DEFS(gdkmm,gdk)
+
+namespace Gdk
+{
+
+/** TODO
+ */
+class RGBA
+{
+ _CLASS_BOXEDTYPE(RGBA, GdkRGBA, NONE, gdk_rgba_copy, gdk_rgba_free)
+public:
+
+ _CUSTOM_DEFAULT_CTOR
+
+ /** Instantiate a new Gdk::RGBA.
+ */
+ RGBA();
+
+ /** Instantiate a new Gdk::RGBA.
+ * The text string can be in any of the forms accepted by XParseRGBA; these include names for a color from rgb.txt,
+ * such as DarkSlateGray, or a hex specification such as 305050.
+ * @param value the string specifying the color..
+ */
+ explicit RGBA(const Glib::ustring& value);
+ _IGNORE(gdk_rgba_parse)
+
+ /** Set a grey color, by using the same value for all color components.
+ * @param value The value to be used for the red, green, and blue components.
+ */
+ void set_grey(gushort value);
+ void set_grey_p(double g);
+
+ /** Set the color, by specifying red, green, and blue color component values.
+ * @param red_ The red component of the color.
+ * @param green_ The green component of the color.
+ * @param blue_ The blue component of the color.
+ */
+ void set_rgb(gushort red_, gushort green_, gushort blue_);
+
+ /** Set the color, by specifying red, green, and blue color component values, as percentages.
+ * @param red_ The red component of the color, as a percentage.
+ * @param green_ The green component of the color, as a percentage.
+ * @param blue_ The blue component of the color, as a percentage.
+ */
+ void set_rgb_p(double red_, double green_, double blue_);
+
+ void set_hsv(double h, double s, double v);
+ void set_hsl(double h, double s, double l);
+
+ /** Parses a textual specification of a color and fills in the red, green, and blue values.
+ * The text string can be in any of the forms accepted by XParseRGBA; these include names for a color from rgb.txt,
+ * such as DarkSlateGray, or a hex specification such as 305050.
+ *
+ * @param value the string specifying the color.
+ * @result true if the parsing succeeded.
+ */
+ bool set(const Glib::ustring& value);
+
+ /** Get the red component of the color.
+ * @result The red component of the color.
+ */
+ gushort get_red() const;
+
+ /** Get the green component of the color.
+ * @result The green component of the color.
+ */
+ gushort get_green() const;
+
+ /** Get the blue component of the color.
+ * @result The blue component of the color.
+ */
+ gushort get_blue() const;
+
+ /** Set the red component of the color.
+ * @param value The red component of the color.
+ */
+ void set_red(gushort value);
+
+ /** Set the green component of the color.
+ * @param value The green component of the color.
+ */
+ void set_green(gushort value);
+
+ /** Set the blue component of the color.
+ * @param value The blue component of the color.
+ */
+ void set_blue(gushort value);
+
+
+ /** Get the red component of the color, as a percentage.
+ * @result The red component of the color, as a percentage.
+ */
+ double get_red_p() const;
+
+ /** Get the green component of the color, as a percentage.
+ * @result The green component of the color, as a percentage.
+ */
+ double get_green_p() const;
+
+ /** Get the blue component of the color, as a percentage.
+ * @result The blue component of the color, as a percentage.
+ */
+ double get_blue_p() const;
+
+ _WRAP_METHOD(Glib::ustring to_string() const, gdk_rgba_to_string)
+
+#m4begin
+ _WRAP_EQUAL(gdk_rgba_equal)
+#m4end
+};
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+/* These traits are for arrays of GdkRGBA structs -- not pointer arrays.
+ */
+struct RGBATraits
+{
+ typedef Gdk::RGBA CppType;
+ typedef GdkRGBA CType;
+ typedef GdkRGBA CTypeNonConst;
+
+ static CType to_c_type (const CppType& obj) { return *obj.gobj(); }
+ static CType to_c_type (const CType& obj) { return obj; }
+ static CppType to_cpp_type (const CType& obj) { return CppType(const_cast<CType*>(&obj), true); }
+ static void release_c_type (const CType&) {}
+};
+#endif //DOXYGEN_SHOULD_SKIP_THIS
+
+typedef Glib::ArrayHandle<RGBA,RGBATraits> ArrayHandle_RGBA;
+
+} // namespace Gdk
diff --git a/gtk/src/gtk_methods.defs b/gtk/src/gtk_methods.defs
index ab88be0..09853cb 100644
--- a/gtk/src/gtk_methods.defs
+++ b/gtk/src/gtk_methods.defs
@@ -5805,6 +5805,15 @@
)
)
+(define-method set_background_rgba
+ (of-object "GtkCellView")
+ (c-name "gtk_cell_view_set_background_rgba")
+ (return-type "none")
+ (parameters
+ '("const-GdkRGBA*" "rgba")
+ )
+)
+
;; From gtkcheckbutton.h
@@ -6192,6 +6201,14 @@
)
)
+(define-function gtk_color_button_new_with_rgba
+ (c-name "gtk_color_button_new_with_rgba")
+ (return-type "GtkWidget*")
+ (parameters
+ '("const-GdkRGBA*" "rgba")
+ )
+)
+
(define-method set_color
(of-object "GtkColorButton")
(c-name "gtk_color_button_set_color")
@@ -6240,6 +6257,24 @@
(return-type "gboolean")
)
+(define-method set_rgba
+ (of-object "GtkColorButton")
+ (c-name "gtk_color_button_set_rgba")
+ (return-type "none")
+ (parameters
+ '("const-GdkRGBA*" "rgba")
+ )
+)
+
+(define-method get_rgba
+ (of-object "GtkColorButton")
+ (c-name "gtk_color_button_get_rgba")
+ (return-type "none")
+ (parameters
+ '("GdkRGBA*" "rgba")
+ )
+)
+
(define-method set_title
(of-object "GtkColorButton")
(c-name "gtk_color_button_set_title")
@@ -6390,6 +6425,42 @@
(return-type "guint16")
)
+(define-method set_current_rgba
+ (of-object "GtkColorSelection")
+ (c-name "gtk_color_selection_set_current_rgba")
+ (return-type "none")
+ (parameters
+ '("const-GdkRGBA*" "rgba")
+ )
+)
+
+(define-method get_current_rgba
+ (of-object "GtkColorSelection")
+ (c-name "gtk_color_selection_get_current_rgba")
+ (return-type "none")
+ (parameters
+ '("GdkRGBA*" "rgba")
+ )
+)
+
+(define-method set_previous_rgba
+ (of-object "GtkColorSelection")
+ (c-name "gtk_color_selection_set_previous_rgba")
+ (return-type "none")
+ (parameters
+ '("const-GdkRGBA*" "rgba")
+ )
+)
+
+(define-method get_previous_rgba
+ (of-object "GtkColorSelection")
+ (c-name "gtk_color_selection_get_previous_rgba")
+ (return-type "none")
+ (parameters
+ '("GdkRGBA*" "rgba")
+ )
+)
+
(define-method is_adjusting
(of-object "GtkColorSelection")
(c-name "gtk_color_selection_is_adjusting")
@@ -9792,7 +9863,7 @@
(c-name "gtk_grid_attach_next_to")
(return-type "none")
(parameters
- '("GtkWidget*" "widget")
+ '("GtkWidget*" "child")
'("GtkWidget*" "sibling")
'("GtkPositionType" "side")
'("gint" "width")
@@ -10727,10 +10798,10 @@
(c-name "gtk_icon_info_load_symbolic")
(return-type "GdkPixbuf*")
(parameters
- '("GdkColor*" "fg")
- '("GdkColor*" "success_color")
- '("GdkColor*" "warning_color")
- '("GdkColor*" "error_color")
+ '("GdkRGBA*" "fg")
+ '("GdkRGBA*" "success_color")
+ '("GdkRGBA*" "warning_color")
+ '("GdkRGBA*" "error_color")
'("gboolean*" "was_symbolic")
'("GError**" "error")
)
@@ -17669,36 +17740,6 @@
)
)
-(define-method get_min_display_width
- (of-object "GtkScrollable")
- (c-name "gtk_scrollable_get_min_display_width")
- (return-type "gint")
-)
-
-(define-method set_min_display_width
- (of-object "GtkScrollable")
- (c-name "gtk_scrollable_set_min_display_width")
- (return-type "none")
- (parameters
- '("gint" "width")
- )
-)
-
-(define-method get_min_display_height
- (of-object "GtkScrollable")
- (c-name "gtk_scrollable_get_min_display_height")
- (return-type "gint")
-)
-
-(define-method set_min_display_height
- (of-object "GtkScrollable")
- (c-name "gtk_scrollable_set_min_display_height")
- (return-type "none")
- (parameters
- '("gint" "height")
- )
-)
-
;; From gtkscrollbar.h
@@ -17844,6 +17885,36 @@
)
)
+(define-method get_min_content_width
+ (of-object "GtkScrolledWindow")
+ (c-name "gtk_scrolled_window_get_min_content_width")
+ (return-type "gint")
+)
+
+(define-method set_min_content_width
+ (of-object "GtkScrolledWindow")
+ (c-name "gtk_scrolled_window_set_min_content_width")
+ (return-type "none")
+ (parameters
+ '("gint" "width")
+ )
+)
+
+(define-method get_min_content_height
+ (of-object "GtkScrolledWindow")
+ (c-name "gtk_scrolled_window_get_min_content_height")
+ (return-type "gint")
+)
+
+(define-method set_min_content_height
+ (of-object "GtkScrolledWindow")
+ (c-name "gtk_scrolled_window_set_min_content_height")
+ (return-type "none")
+ (parameters
+ '("gint" "height")
+ )
+)
+
;; From gtkselection.h
diff --git a/gtk/src/iconinfo.ccg b/gtk/src/iconinfo.ccg
index aea7d04..7bf0a03 100644
--- a/gtk/src/iconinfo.ccg
+++ b/gtk/src/iconinfo.ccg
@@ -47,11 +47,11 @@ IconInfo::operator bool() const
}
-Glib::RefPtr<Gdk::Pixbuf> IconInfo::load_icon_symbolic(const Gdk::Color& fg, const Gdk::Color& success_color, const Gdk::Color& warning_color, const Gdk::Color& error_color, bool& was_symbolic) const
+Glib::RefPtr<Gdk::Pixbuf> IconInfo::load_icon_symbolic(const Gdk::RGBA& fg, const Gdk::RGBA& success_color, const Gdk::RGBA& warning_color, const Gdk::RGBA& error_color, bool& was_symbolic) const
{
GError* gerror = 0;
gboolean c_was_symbolic = false;
- Glib::RefPtr<Gdk::Pixbuf> retvalue = Glib::wrap(gtk_icon_info_load_symbolic(const_cast<GtkIconInfo*>(gobj()), const_cast<GdkColor*>(fg.gobj()), const_cast<GdkColor*>(success_color.gobj()), const_cast<GdkColor*>(warning_color.gobj()), const_cast<GdkColor*>(error_color.gobj()), &c_was_symbolic, &(gerror)));
+ Glib::RefPtr<Gdk::Pixbuf> retvalue = Glib::wrap(gtk_icon_info_load_symbolic(const_cast<GtkIconInfo*>(gobj()), const_cast<GdkRGBA*>(fg.gobj()), const_cast<GdkRGBA*>(success_color.gobj()), const_cast<GdkRGBA*>(warning_color.gobj()), const_cast<GdkRGBA*>(error_color.gobj()), &c_was_symbolic, &(gerror)));
was_symbolic = c_was_symbolic;
if(gerror)
::Glib::Error::throw_exception(gerror);
diff --git a/gtk/src/iconinfo.hg b/gtk/src/iconinfo.hg
index f937518..08a7fd6 100644
--- a/gtk/src/iconinfo.hg
+++ b/gtk/src/iconinfo.hg
@@ -18,6 +18,7 @@
#include <gtkmm/style.h>
#include <gdkmm/rectangle.h>
#include <gdkmm/pixbuf.h>
+#include <gdkmm/rgba.h>
#include <gdkmm/types.h>
//#include <gtk/gtkicontheme.h>
@@ -48,7 +49,7 @@ public:
_WRAP_METHOD(Glib::RefPtr<Gdk::Pixbuf> load_icon() const, gtk_icon_info_load_icon, errthrow)
//TODO: Documentation
- Glib::RefPtr<Gdk::Pixbuf> load_icon_symbolic(const Gdk::Color& fg, const Gdk::Color& success_color, const Gdk::Color& warning_color, const Gdk::Color& error_color, bool& was_symbolic) const;
+ Glib::RefPtr<Gdk::Pixbuf> load_icon_symbolic(const Gdk::RGBA& fg, const Gdk::RGBA& success_color, const Gdk::RGBA& warning_color, const Gdk::RGBA& error_color, bool& was_symbolic) const;
_IGNORE(gtk_icon_info_load_symbolic)
Glib::RefPtr<Gdk::Pixbuf> load_icon_symbolic(const Glib::RefPtr<Style>& style, StateType state, bool& was_symbolic) const;
diff --git a/gtk/src/scrollable.hg b/gtk/src/scrollable.hg
index d14d7cc..5b3fd6d 100644
--- a/gtk/src/scrollable.hg
+++ b/gtk/src/scrollable.hg
@@ -32,7 +32,7 @@ namespace Gtk
* GtkScale/GtkHScale/GtkVScale). GtkScrollable is more flexible in that it
* allows the orientation to be changed at runtime, allowing the widgets to 'flip'.
*
- * @newin{2,16}
+ * @newin{3,0}
*/
class Scrollable : public Glib::Interface
{
@@ -48,7 +48,7 @@ public:
* @see set_hadjustment().
*/
void unset_hadjustment();
-
+
_WRAP_METHOD(Glib::RefPtr<Adjustment> get_vadjustment(), gtk_scrollable_get_vadjustment)
_WRAP_METHOD(Glib::RefPtr<const Adjustment> get_vadjustment() const, gtk_scrollable_get_vadjustment)
@@ -59,12 +59,6 @@ public:
*/
void unset_vadjustment();
- _WRAP_METHOD(int get_min_display_width() const, gtk_scrollable_get_min_display_width)
- _WRAP_METHOD(void set_min_display_width(int width), gtk_scrollable_set_min_display_width)
-
- _WRAP_METHOD(int get_min_display_height() const, gtk_scrollable_get_min_display_height)
- _WRAP_METHOD(void set_min_display_height(int width), gtk_scrollable_set_min_display_height)
-
//TODO: Properties and signals.
_WRAP_PROPERTY("hadjustment", Glib::RefPtr<Adjustment>)
_WRAP_PROPERTY("vadjustment", Glib::RefPtr<Adjustment>)
diff --git a/gtk/src/scrolledwindow.hg b/gtk/src/scrolledwindow.hg
index 6dd82da..a84dd3b 100644
--- a/gtk/src/scrolledwindow.hg
+++ b/gtk/src/scrolledwindow.hg
@@ -88,6 +88,11 @@ public:
_WRAP_METHOD(HScrollbar* get_hscrollbar(), gtk_scrolled_window_get_hscrollbar)
_WRAP_METHOD(const HScrollbar* get_hscrollbar() const, gtk_scrolled_window_get_hscrollbar)
+ _WRAP_METHOD(int get_min_content_width() const, gtk_scrolled_window_get_min_content_width)
+ _WRAP_METHOD(void set_min_content_width(int width), gtk_scrolled_window_set_min_content_width)
+ _WRAP_METHOD(int get_min_content_height() const, gtk_scrolled_window_get_min_content_height)
+ _WRAP_METHOD(void set_min_content_height(int height), gtk_scrolled_window_set_min_content_height)
+
//Keybinding signals:
_IGNORE_SIGNAL("scroll_child")
_IGNORE_SIGNAL("move_focus_out")
@@ -99,6 +104,8 @@ public:
_WRAP_PROPERTY("window-placement", CornerType)
_WRAP_PROPERTY("window-placement-set", bool)
_WRAP_PROPERTY("shadow-type", ShadowType)
+ _WRAP_PROPERTY("min-content-width", min_content_width)
+ _WRAP_PROPERTY("min-content-height", min_content_height)
};
} /* namespace Gtk */
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index 648d39b..a33ed73 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -126,6 +126,7 @@ public:
_WRAP_METHOD(void queue_draw(), gtk_widget_queue_draw)
_WRAP_METHOD(void queue_draw_area(int x, int y, int width, int height), gtk_widget_queue_draw_area)
+ _WRAP_METHOD(void queue_draw_region(const Cairo::RefPtr<const Cairo::Region>& region), gtk_widget_queue_draw_region)
_WRAP_METHOD(void queue_resize(), gtk_widget_queue_resize)
_WRAP_METHOD(void size_allocate(const Allocation& allocation), gtk_widget_size_allocate)
@@ -306,6 +307,17 @@ public:
_WRAP_METHOD(Glib::RefPtr<Clipboard> get_clipboard(const Glib::ustring& selection), gtk_widget_get_clipboard, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Clipboard> get_clipboard(const Glib::ustring& selection) const, gtk_widget_get_clipboard, refreturn, constversion)
+ _WRAP_METHOD(bool get_hexpand() const, gtk_widget_get_hexpand)
+ _WRAP_METHOD(void set_hexpand(bool expand = true), gtk_widget_set_hexpand)
+ _WRAP_METHOD(bool get_hexpand_set() const, gtk_widget_get_hexpand_set)
+ _WRAP_METHOD(void set_hexpand_set(bool set = true), gtk_widget_set_hexpand_set)
+ _WRAP_METHOD(bool get_vexpand() const, gtk_widget_get_vexpand)
+ _WRAP_METHOD(void set_vexpand(bool expand = true), gtk_widget_set_vexpand)
+ _WRAP_METHOD(bool get_vexpand_set() const, gtk_widget_get_vexpand_set)
+ _WRAP_METHOD(void set_vexpand_set(bool set = true), gtk_widget_set_vexpand_set)
+ _WRAP_METHOD(void queue_compute_expand(), gtk_widget_queue_compute_expand)
+ _WRAP_METHOD(bool compute_expand(Orientation orientation), gtk_widget_compute_expand)
+
_WRAP_METHOD(Glib::RefPtr<Gdk::Pixmap> get_snapshot(Gdk::Rectangle& clip_rect) const, gtk_widget_get_snapshot)
_WRAP_METHOD(bool get_support_multidevice() const, gtk_widget_get_support_multidevice)
@@ -476,6 +488,9 @@ public:
_WRAP_METHOD(static void set_default_direction(TextDirection dir), gtk_widget_set_default_direction)
_WRAP_METHOD(static TextDirection get_default_direction(), gtk_widget_get_default_direction)
+ _WRAP_METHOD(void shape_combine_region(const Cairo::RefPtr<const Cairo::Region>& region), gtk_widget_shape_combine_region)
+ _WRAP_METHOD(void input_shape_combine_region(const Cairo::RefPtr<const Cairo::Region>& region), gtk_widget_input_shape_combine_region)
+
// must be realized
_WRAP_METHOD(void reset_shapes(),gtk_widget_reset_shapes)
diff --git a/tools/m4/convert_gdk.m4 b/tools/m4/convert_gdk.m4
index fa01708..69e7b0d 100644
--- a/tools/m4/convert_gdk.m4
+++ b/tools/m4/convert_gdk.m4
@@ -99,7 +99,7 @@ _CONVERSION(`const Rectangle&',`const GdkRectangle*',($3).gobj())
_CONVERSION(`const Gdk::Rectangle&',`const GdkRectangle*',($3).gobj())
_CONVERSION(`Font&',`GdkFont*',($3).gobj())
_CONVERSION(`const Cairo::RefPtr<Cairo::Region>&',`const cairo_region_t*',`(($3) ? ($3)->cobj() : 0)')
-_CONVERSION(`const Cairo::RefPtr<const Cairo::Region>&',`cairo_region_t*',`(($3) ? ($3)->cobj() : 0)')
+_CONVERSION(`const Cairo::RefPtr<const Cairo::Region>&',`cairo_region_t*',`const_cast<cairo_region_t*>(($3) ? ($3)->cobj() : 0)')
_CONVERSION(`const Glib::RefPtr<Gdk::Colormap>&',`GdkColormap*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Gdk::Pixmap>&',`GdkPixmap*',__CONVERT_REFPTR_TO_P)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]