[gtkmm] Gtk: Remove API which has been removed in gtk+-4
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gtk: Remove API which has been removed in gtk+-4
- Date: Mon, 9 Jan 2017 07:52:13 +0000 (UTC)
commit 1e33b58346a738b51cae01a2f2c6f6fc3b39c80e
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Mon Jan 9 08:43:41 2017 +0100
Gtk: Remove API which has been removed in gtk+-4
* gtk/src/treeview.hg: Remove get_bin_window().
* gtk/src/viewport.hg: Remove get_bin_window() and get_view_window().
* gtk/src/widget.hg: Remove get_style_property_value() because
gtk_widget_style_get_property() has been removed. Use the still existing
gtk_widget_style_get() in get_style_property(). Remove declarations of
the previously removed Gtk::Action and Gtk::Style classes.
gtk/src/treeview.hg | 23 ++++++++++-------------
gtk/src/viewport.hg | 6 ------
gtk/src/widget.hg | 24 ++----------------------
3 files changed, 12 insertions(+), 41 deletions(-)
---
diff --git a/gtk/src/treeview.hg b/gtk/src/treeview.hg
index d6c23d0..b642386 100644
--- a/gtk/src/treeview.hg
+++ b/gtk/src/treeview.hg
@@ -481,14 +481,11 @@ public:
void get_cursor(TreeModel::Path& path, TreeViewColumn*& focus_column);
/* Layout information */
- _WRAP_METHOD(Glib::RefPtr<Gdk::Window> get_bin_window(), gtk_tree_view_get_bin_window, refreturn)
- _WRAP_METHOD(Glib::RefPtr<const Gdk::Window> get_bin_window() const, gtk_tree_view_get_bin_window,
refreturn, constversion)
-
- /** Finds the path at the point (@a x, @a y), relative to bin_window coordinates
- * (please see get_bin_window()).
- * That is, @a x and @a y are relative to an events coordinates. @a x and @a y must
- * come from an event on the TreeView only where event->window ==
- * get_bin_window(). It is primarily for
+ /** Finds the path at the point (@a x, @a y), relative to bin_window coordinates.
+ *
+ * That is, @a x and @a y are relative to an events coordinates. Widget-relative
+ * coordinates must be converted using
+ * convert_widget_to_bin_window_coords(). It is primarily for
* things like popup menus. @a path will be filled
* with the TreeModel::Path at that point. @a column will be filled
* with the column at that point. @a cell_x and @a cell_y return the coordinates
@@ -514,11 +511,11 @@ public:
*/
bool get_path_at_pos(int x, int y, TreeModel::Path& path, TreeViewColumn*& column, int& cell_x, int&
cell_y) const;
- /** Finds the path at the point (@a x, @a y), relative to bin_window coordinates
- * (please see get_bin_window()).
- * That is, @a x and @a y are relative to an events coordinates. @a x and @a y must
- * come from an event on the TreeView only where event->window ==
- * get_bin_window(). It is primarily for
+ /** Finds the path at the point (@a x, @a y), relative to bin_window coordinates.
+ *
+ * That is, @a x and @a y are relative to an events coordinates. Widget-relative
+ * coordinates must be converted using
+ * convert_widget_to_bin_window_coords(). It is primarily for
* things like popup menus. @a path will be filled
* with the TreeModel::Path at that point.
* This method is only meaningful if the TreeView is realized.
diff --git a/gtk/src/viewport.hg b/gtk/src/viewport.hg
index 8e11e3c..a271e38 100644
--- a/gtk/src/viewport.hg
+++ b/gtk/src/viewport.hg
@@ -46,12 +46,6 @@ public:
_WRAP_METHOD(ShadowType get_shadow_type() const,
gtk_viewport_get_shadow_type)
- _WRAP_METHOD(Glib::RefPtr<Gdk::Window> get_bin_window(), gtk_viewport_get_bin_window, refreturn)
- _WRAP_METHOD(Glib::RefPtr<const Gdk::Window> get_bin_window() const, gtk_viewport_get_bin_window,
refreturn, constversion)
-
- _WRAP_METHOD(Glib::RefPtr<Gdk::Window> get_view_window(), gtk_viewport_get_view_window, refreturn)
- _WRAP_METHOD(Glib::RefPtr<const Gdk::Window> get_view_window() const, gtk_viewport_get_view_window,
refreturn, constversion)
-
_WRAP_PROPERTY("shadow_type", ShadowType)
};
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index 7c7b3bc..c8bf4c6 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -62,8 +62,6 @@ _CC_INCLUDE(gtk/gtk.h)
_WRAP_ENUM(DestDefaults, GtkDestDefaults)
_WRAP_ENUM(DragResult, GtkDragResult)
-class Action;
-class Style;
class AccelGroup;
class Adjustment;
class Window;
@@ -382,7 +380,7 @@ public:
//The parameter name is "the_property_name" to avoid a warning because there is a method with the
"property_name" name.
/** Gets the value of a style property of @a widget.
* @param the_property_name The name of a style property.
- * @param value Location to return the property value.
+ * @param[out] value Location to return the property value.
*/
template <class PropertyType>
void get_style_property(const Glib::ustring& the_property_name, PropertyType& value) const;
@@ -778,19 +776,6 @@ protected:
void transform_cairo_context_to_window(const ::Cairo::RefPtr< ::Cairo::Context>& cr, const
Glib::RefPtr<const Gdk::Window>& window);
_IGNORE(gtk_cairo_transform_to_window)
- //The parameter name is "the_property_name" to avoid a warning because there is a method with the
"property_name" name.
- /** Gets the value of a style property of @a widget.
- *
- * It is usually easier to use get_style_property(), to avoid the use of
- * Glib::Value.
- *
- * @param the_property_name The name of a style property.
- * @param value Location to return the property value.
- */
- _WRAP_METHOD(void get_style_property_value(
- const Glib::ustring& the_property_name, Glib::ValueBase& value) const,
- gtk_widget_style_get_property)
-
void realize_if_needed();
#m4begin
@@ -823,12 +808,7 @@ dnl
template <class PropertyType>
void Widget::get_style_property(const Glib::ustring& the_property_name, PropertyType& value) const
{
- Glib::Value<PropertyType> property_value;
- property_value.init(Glib::Value<PropertyType>::value_type());
-
- this->get_style_property_value(the_property_name, property_value);
-
- value = property_value.get();
+ gtk_widget_style_get(const_cast<GtkWidget*>(gobj()), the_property_name.c_str(), &value, nullptr);
}
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]