[gtkmm] Gtk: Remove API which has been removed in gtk+-4



commit bc8718ce0be215d420a2221dafbe25abe9a0e95e
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Thu Jul 20 18:33:29 2017 +0200

    Gtk: Remove API which has been removed in gtk+-4
    
    * gtk/gtkmm.h: Remove styleproperty.h.
    * gtk/gtkmm/filelist.am: Remove styleproperty.[cc|h].
    * gtk/gtkmm/styleproperty.[cc|h]: Removed files.
    * gtk/src/checkmenuitem.[ccg|hg]: Remove snapshot_indicator_vfunc().
    * gtk/src/iconview.hg: Remove convert_widget_to_bin_window_coords().
    * gtk/src/layout.hg: remove get_bin_window().
    * gtk/src/paned.hg: Remove get_handle_window().
    * gtk/src/range.hg: Remove get/set/property_lower_stepper_sensitivity() and
    get/set/property_upper_stepper_sensitivity().
    * gtk/src/scale.hg: Remove draw_value_vfunc().
    * gtk/src/stylecontext.hg: Remove get_style_property() and
    get_style_property_value().
    * gtk/src/widget.[ccg|hg]: Remove set_allocation(), set_clip(),
    get_style_property(), transform_cairo_context_to_window(),
    queue_draw_region_vfunc() and queue_draw_child_vfunc().
    Add new parameters to size_allocate() and signal_size_allocate() handlers.
    * tools/m4/convert_gtk.m4: Add a conversion for Gtk::Allocation.
    
    Style properties have been completely removed from gtk+.

 gtk/gtkmm.h                |    1 -
 gtk/gtkmm/filelist.am      |    2 -
 gtk/gtkmm/styleproperty.cc |   77 -------------------
 gtk/gtkmm/styleproperty.h  |  182 --------------------------------------------
 gtk/src/checkmenuitem.ccg  |    2 -
 gtk/src/checkmenuitem.hg   |    9 --
 gtk/src/iconview.hg        |    2 -
 gtk/src/layout.hg          |    3 -
 gtk/src/paned.hg           |    3 -
 gtk/src/range.hg           |    7 --
 gtk/src/scale.hg           |    3 -
 gtk/src/stylecontext.hg    |   26 ------
 gtk/src/widget.ccg         |    5 -
 gtk/src/widget.hg          |   60 ++-------------
 tools/m4/convert_gtk.m4    |    1 +
 15 files changed, 8 insertions(+), 375 deletions(-)
---
diff --git a/gtk/gtkmm.h b/gtk/gtkmm.h
index dbc8c47..f919c2d 100644
--- a/gtk/gtkmm.h
+++ b/gtk/gtkmm.h
@@ -251,7 +251,6 @@ extern const int gtkmm_micro_version;
 #include <gtkmm/stackswitcher.h>
 #include <gtkmm/statusbar.h>
 #include <gtkmm/stylecontext.h>
-#include <gtkmm/styleproperty.h>
 #include <gtkmm/switch.h>
 #include <gtkmm/textbuffer.h>
 #include <gtkmm/textchildanchor.h>
diff --git a/gtk/gtkmm/filelist.am b/gtk/gtkmm/filelist.am
index 3d3834d..d5577b7 100644
--- a/gtk/gtkmm/filelist.am
+++ b/gtk/gtkmm/filelist.am
@@ -14,7 +14,6 @@ gtkmm_files_extra_any_cc =            \
        object.cc \
        radiobuttongroup.cc             \
        selectiondata_private.cc        \
-       styleproperty.cc \
        targetentry.cc                  \
        treemodelcolumn.cc              \
        treeview_private.cc \
@@ -35,7 +34,6 @@ gtkmm_files_extra_any_h =                     \
        object.h \
        radiobuttongroup.h              \
        selectiondata_private.h         \
-       styleproperty.h \
        targetentry.h                   \
        treemodelcolumn.h               \
        treeview_private.h              \
diff --git a/gtk/src/checkmenuitem.ccg b/gtk/src/checkmenuitem.ccg
index 347e0a9..141f71f 100644
--- a/gtk/src/checkmenuitem.ccg
+++ b/gtk/src/checkmenuitem.ccg
@@ -18,7 +18,6 @@
 
 #include <gtk/gtk.h>
 #include <gtkmm/label.h>
-#include <gtkmm/snapshot.h>
 
 namespace Gtk
 {
@@ -31,4 +30,3 @@ CheckMenuItem::CheckMenuItem(const Glib::ustring& label, bool mnemonic)
 }
 
 } // namespace Gtk
-
diff --git a/gtk/src/checkmenuitem.hg b/gtk/src/checkmenuitem.hg
index eaa061f..8d0568d 100644
--- a/gtk/src/checkmenuitem.hg
+++ b/gtk/src/checkmenuitem.hg
@@ -23,7 +23,6 @@ _PINCLUDE(gtkmm/private/menuitem_p.h)
 
 namespace Gtk
 {
-class Snapshot;
 
 /** A menu item that maintains the state of a boolean value in addition to a Gtk::MenuItem's usual role in 
activating application code.
  * A check box indicating the state of the boolean value is displayed at the left side of the Gtk::MenuItem.
@@ -56,14 +55,6 @@ public:
   _WRAP_PROPERTY("active", bool)
   _WRAP_PROPERTY("inconsistent", bool)
   _WRAP_PROPERTY("draw-as-radio", bool)
-
-protected:
-#m4 _CONVERSION(`GtkSnapshot*',`Snapshot&',`*Glib::wrap($3)')
-  /** Triggered when the item is redrawn (e.g. after being toggled).
-   * Override this vfunc if you want to implement your own check item
-   * look. Otherwise, you most likely don't care about it.
-   */
-  _WRAP_VFUNC(void snapshot_indicator(Snapshot& snapshot), snapshot_indicator)
 };
 
 } //namespace Gtk
diff --git a/gtk/src/iconview.hg b/gtk/src/iconview.hg
index 7852fc4..170a77c 100644
--- a/gtk/src/iconview.hg
+++ b/gtk/src/iconview.hg
@@ -333,8 +333,6 @@ public:
 #m4 
_CONVERSION(`cairo_surface_t*',`Cairo::RefPtr<Cairo::Surface>',`Cairo::make_refptr_for_instance<Cairo::Surface>(new
 Cairo::Surface($3, false /* take reference */))')
   _WRAP_METHOD(Cairo::RefPtr<Cairo::Surface> create_drag_icon( const TreeModel::Path& path), 
gtk_icon_view_create_drag_icon)
 
-  _WRAP_METHOD(void convert_widget_to_bin_window_coords(int wx, int wy, int& bx, int& by) const, 
gtk_icon_view_convert_widget_to_bin_window_coords)
-
 #m4 _INITIALIZATION(`Gdk::Rectangle&',`GdkRectangle', `$3 = Glib::wrap(&($4))')
   _WRAP_METHOD(bool get_cell_rect(const TreeModel::Path& path, const CellRenderer& cell{?}, Gdk::Rectangle& 
rect{.>>}) const, gtk_icon_view_get_cell_rect)
 
diff --git a/gtk/src/layout.hg b/gtk/src/layout.hg
index e77789c..05662fb 100644
--- a/gtk/src/layout.hg
+++ b/gtk/src/layout.hg
@@ -49,9 +49,6 @@ public:
   _CTOR_DEFAULT
   _WRAP_CTOR(Layout(const Glib::RefPtr<Adjustment>& hadjustment, const Glib::RefPtr<Adjustment>& 
vadjustment), gtk_layout_new)
 
-  _WRAP_METHOD(Glib::RefPtr<Gdk::Window> get_bin_window(), gtk_layout_get_bin_window, refreturn)
-  _WRAP_METHOD(Glib::RefPtr<const Gdk::Window> get_bin_window() const, gtk_layout_get_bin_window, refreturn, 
constversion)
-
   _WRAP_METHOD(void put(Widget& child_widget, int x, int y), gtk_layout_put)
   _WRAP_METHOD(void move(Widget& child_widget, int x, int y), gtk_layout_move)
   _WRAP_METHOD(void set_size(guint width, guint height), gtk_layout_set_size)
diff --git a/gtk/src/paned.hg b/gtk/src/paned.hg
index d2da12b..15ca653 100644
--- a/gtk/src/paned.hg
+++ b/gtk/src/paned.hg
@@ -86,9 +86,6 @@ public:
   _WRAP_METHOD(Widget* get_child2(), gtk_paned_get_child2)
   _WRAP_METHOD(const Widget* get_child2() const, gtk_paned_get_child2, constversion)
 
-  _WRAP_METHOD(Glib::RefPtr<Gdk::Window> get_handle_window(), gtk_paned_get_handle_window, refreturn)
-  _WRAP_METHOD(Glib::RefPtr<const Gdk::Window> get_handle_window() const, gtk_paned_get_handle_window, 
refreturn, constversion)
-
   _WRAP_METHOD(void set_wide_handle(bool wide = true), gtk_paned_set_wide_handle)
   _WRAP_METHOD(bool get_wide_handle() const, gtk_paned_get_wide_handle)
 
diff --git a/gtk/src/range.hg b/gtk/src/range.hg
index fca85c5..a832b3c 100644
--- a/gtk/src/range.hg
+++ b/gtk/src/range.hg
@@ -70,11 +70,6 @@ public:
 
   _WRAP_METHOD(void  get_slider_range(int& slider_start, int& slider_end) const, gtk_range_get_slider_range)
 
-  _WRAP_METHOD(void set_lower_stepper_sensitivity(SensitivityType sensitivity), 
gtk_range_set_lower_stepper_sensitivity)
-  _WRAP_METHOD(SensitivityType get_lower_stepper_sensitivity() const, 
gtk_range_get_lower_stepper_sensitivity)
-  _WRAP_METHOD(void set_upper_stepper_sensitivity(SensitivityType sensitivity), 
gtk_range_set_upper_stepper_sensitivity)
-  _WRAP_METHOD(SensitivityType get_upper_stepper_sensitivity() const, 
gtk_range_get_upper_stepper_sensitivity)
-
   _WRAP_METHOD(void set_increments(double step, double  page), gtk_range_set_increments)
   _WRAP_METHOD(void set_range(double min, double max), gtk_range_set_range)
   _WRAP_METHOD(void set_value(double value), gtk_range_set_value)
@@ -96,8 +91,6 @@ public:
 
   _WRAP_PROPERTY("adjustment", Adjustment*)
   _WRAP_PROPERTY("inverted", bool)
-  _WRAP_PROPERTY("lower-stepper-sensitivity", SensitivityType)
-  _WRAP_PROPERTY("upper-stepper-sensitivity", SensitivityType)
   _WRAP_PROPERTY("show-fill-level", bool)
   _WRAP_PROPERTY("restrict-to-fill-level", bool)
   _WRAP_PROPERTY("fill-level", double)
diff --git a/gtk/src/scale.hg b/gtk/src/scale.hg
index 266f2cf..f252242 100644
--- a/gtk/src/scale.hg
+++ b/gtk/src/scale.hg
@@ -121,9 +121,6 @@ dnl// See bug http://bugzilla.gnome.org/show_bug.cgi?id=168747.
   _WRAP_PROPERTY("has-origin", bool)
 
 protected:
-
-  _WRAP_VFUNC(void draw_value(), draw_value)
-
   virtual int calc_digits_(double step) const;
 };
 
diff --git a/gtk/src/stylecontext.hg b/gtk/src/stylecontext.hg
index 3c6aa31..328e533 100644
--- a/gtk/src/stylecontext.hg
+++ b/gtk/src/stylecontext.hg
@@ -150,18 +150,6 @@ public:
   _WRAP_METHOD(void remove_class(const Glib::ustring& class_name), gtk_style_context_remove_class)
   _WRAP_METHOD(bool has_class(const Glib::ustring& class_name), gtk_style_context_has_class)
 
-  /** Gets the value of a style property
-   * @param property_name The name of a style property.
-   * @param value Location to return the property value.
-   */
-  template <class PropertyType>
-  void get_style_property(const Glib::ustring& property_name, PropertyType& value) const;
-
-  _WRAP_METHOD(void get_style_property_value(
-                   const Glib::ustring& property_name, Glib::ValueBase& value) const,
-               gtk_style_context_get_style_property)
-  _IGNORE(gtk_style_context_get_style, gtk_style_context_get_style, )
-
   _WRAP_METHOD(void set_screen(const Glib::RefPtr<Gdk::Screen>& screen), gtk_style_context_set_screen)
 
   _WRAP_METHOD(Glib::RefPtr<Gdk::Screen> get_screen(), gtk_style_context_get_screen, refreturn)
@@ -222,18 +210,4 @@ public:
   _WRAP_PROPERTY("parent", Glib::RefPtr<StyleContext>)
 };
 
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-
-template <class PropertyType>
-void StyleContext::get_style_property(const Glib::ustring& property_name, PropertyType& value) const
-{
-  Glib::Value<PropertyType> property_value;
-  property_value.init(Glib::Value<PropertyType>::value_type());
-
-  this->get_style_property_value(property_name, property_value);
-
-  value = property_value.get();
-}
-
-#endif
 } // namespace Gtk
diff --git a/gtk/src/widget.ccg b/gtk/src/widget.ccg
index 5a50358..3f65caa 100644
--- a/gtk/src/widget.ccg
+++ b/gtk/src/widget.ccg
@@ -619,11 +619,6 @@ void Widget::unset_font_options()
   gtk_widget_set_font_options(gobj(), nullptr);
 }
 
-void Widget::transform_cairo_context_to_window(const Cairo::RefPtr<Cairo::Context>& cr, const 
Glib::RefPtr<const Gdk::Window>& window)
-{
-  gtk_cairo_transform_to_window((cr)->cobj(), gobj(), 
const_cast<GdkWindow*>(Glib::unwrap<Gdk::Window>(window)));
-}
-
 void Widget::remove_action_group(const Glib::ustring& name)
 {
   gtk_widget_insert_action_group(gobj(), name.c_str(), nullptr /* see C docs */);
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index 12c7aa7..33bd040 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -105,7 +105,7 @@ class Widget
   _IMPLEMENTS_INTERFACE(Buildable)
   _IMPLEMENTS_INTERFACE(Atk::Implementor, ifdef GTKMM_ATKMM_ENABLED)
   _IGNORE(gtk_widget_destroy, gtk_widget_destroyed, gtk_widget_hide_on_delete,
-          gtk_widget_style_get_valist, gtk_widget_list_accel_closures, gtk_widget_style_get)
+          gtk_widget_list_accel_closures)
 public:
   friend class Main;
   _CUSTOM_DTOR
@@ -123,8 +123,7 @@ public:
   _WRAP_METHOD(void queue_resize(), gtk_widget_queue_resize)
   _WRAP_METHOD(void queue_allocate(), gtk_widget_queue_allocate)
 
-  _WRAP_METHOD(void size_allocate(const Allocation& allocation), gtk_widget_size_allocate)
-  _WRAP_METHOD(void size_allocate(const Allocation& allocation, int baseline), 
gtk_widget_size_allocate_with_baseline)
+  _WRAP_METHOD(void size_allocate(const Allocation& allocation, int baseline, Allocation& out_clip), 
gtk_widget_size_allocate)
 
   _WRAP_METHOD(SizeRequestMode get_request_mode() const, gtk_widget_get_request_mode)
   _WRAP_METHOD(void measure(Orientation orientation, int for_size, int& minimum, int& natural,
@@ -258,12 +257,6 @@ public:
   Allocation get_allocation() const;
   _IGNORE(gtk_widget_get_allocation)
 
-#m4 _CONVERSION(`const Allocation&',`const GtkAllocation*',`($3).gobj()')
-#m4 _CONVERSION(`const Allocation&',`const GdkRectangle*',`($3).gobj()')
-  _WRAP_METHOD(void set_allocation(const Allocation& allocation), gtk_widget_set_allocation)
-
-  _WRAP_METHOD(void set_clip(const Allocation& clip), gtk_widget_set_clip)
-
   /** Retrieves the widget’s clip area.
    *
    * The clip area is the area in which all of the widget's drawing will
@@ -362,14 +355,6 @@ public:
 
   _WRAP_METHOD(void reset_style(), gtk_widget_reset_style)
 
-  //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[out] value Location to return the property value.
-   */
-  template <class PropertyType>
-  void get_style_property(const Glib::ustring& the_property_name, PropertyType& value) const;
-
   _WRAP_METHOD(Glib::RefPtr<Pango::Context> create_pango_context(), gtk_widget_create_pango_context)
   _WRAP_METHOD(Glib::RefPtr<Pango::Context> get_pango_context(), gtk_widget_get_pango_context, refreturn)
 
@@ -546,9 +531,11 @@ public:
   //_WRAP(meth|sig|impl,void unrealize_(),gtk_widget_unrealize,"unrealize")
   _WRAP_SIGNAL(void unrealize(),"unrealize")
 
-#m4 _CONVERSION(`Allocation&',`GdkRectangle*',`($2)($3.gobj())')
-#m4 _CONVERSION(`GdkRectangle*',`Allocation&',`($2)(Glib::wrap($3))')
-  _WRAP_SIGNAL(void size_allocate(Allocation& allocation), "size_allocate")
+#m4 _CONVERSION(`const Allocation&',`const GdkRectangle*',`($3.gobj())')
+#m4 _CONVERSION(`const GdkRectangle*',`const Allocation&',`Glib::wrap($3)')
+#m4 _CONVERSION(`Allocation&',`GdkRectangle*',`($3.gobj())')
+#m4 _CONVERSION(`GdkRectangle*',`Allocation&',`Glib::wrap($3)')
+  _WRAP_SIGNAL(void size_allocate(const Allocation& allocation, int baseline, Allocation& out_clip), 
"size_allocate")
 
 // Changed signals -- inform widget of internal changes.
 // We rename parent_set => parent_changed
@@ -752,10 +739,6 @@ protected:
   _WRAP_VFUNC(void compute_expand(bool& hexpand_p, bool& vexpand_p), compute_expand,
     custom_vfunc_callback, custom_vfunc)
 
-#m4 _CONVERSION(`const cairo_region_t*',`const ::Cairo::RefPtr<const 
::Cairo::Region>&',`::Cairo::make_refptr_for_instance<const ::Cairo::Region>(new 
::Cairo::Region(const_cast<cairo_region_t*>($3), false /* has_reference */))')
-  _WRAP_VFUNC(void queue_draw_region(const ::Cairo::RefPtr<const ::Cairo::Region>& region), 
queue_draw_region)
-  _WRAP_VFUNC(void queue_draw_child(Widget& child, const ::Cairo::RefPtr<const ::Cairo::Region>& region), 
queue_draw_child)
-
   // The snapshot vfunc must not be wrapped here. It would interfere with the way
   // gtk+ selects either the snapshot vfunc or the draw signal for rendering widgets.
   // Custom widgets that need the snapshot vfunc must use a custom rendering widget
@@ -796,24 +779,6 @@ protected:
   void set_window(const Glib::RefPtr<Gdk::Window>& window);
   _IGNORE(gtk_widget_set_window)
 
- /** Transforms the given cairo context @a cr from widget-relative
-  * coordinates to window-relative coordinates.
-  * If the widget's window is not an ancestor of @a window, no
-  * modification will be applied.
-  *
-  * This is the inverse to the transformation GTK applies when
-  * preparing an expose event to be emitted with the Widget's draw
-  * signal. It is intended to help porting multiwindow widgets from
-  * GTK+ 2 to the rendering architecture of GTK+ 3.
-  *
-  * @param cr The cairo context to transform.
-  * @param window The window to transform the context to.
-  *
-  * @newin{3,0}
-  */
-  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)
-
   void realize_if_needed();
 
 #m4begin
@@ -840,15 +805,4 @@ dnl
 
 };
 
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-
-//The parameter name is "the_property_name" to avoid a warning because there is a method with the 
"property_name" name.
-template <class PropertyType>
-void Widget::get_style_property(const Glib::ustring& the_property_name, PropertyType& value) const
-{
-  gtk_widget_style_get(const_cast<GtkWidget*>(gobj()), the_property_name.c_str(), &value, nullptr);
-}
-
-#endif /* DOXYGEN_SHOULD_SKIP_THIS */
-
 } // namespace Gtk
diff --git a/tools/m4/convert_gtk.m4 b/tools/m4/convert_gtk.m4
index 6fc4341..d8557e7 100644
--- a/tools/m4/convert_gtk.m4
+++ b/tools/m4/convert_gtk.m4
@@ -422,6 +422,7 @@ _CONVERSION(`GtkRequisition', `Requisition', `static_cast<$2>($3)')
 
 _CONVERSION(`Allocation&',`GtkAllocation*',`($2)($3.gobj())')
 _CONVERSION(`const Allocation&',`GtkAllocation*',`($2)($3.gobj())')
+_CONVERSION(`const Allocation&',`const GtkAllocation*',`($3.gobj())')
 _CONVERSION(`Allocation',`GtkAllocation',`static_cast<$2>(*($3.gobj()))')
 
 _CONVERSION(`GtkEntry*',`Entry*',__RP2P)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]