[gtkmm] Gtk::IconView, TreeView: Update get_tooltip_context_*()



commit 24e5ae5664e28f21a864335fd96ec4891f5ea92f
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Thu Nov 19 15:28:58 2020 +0100

    Gtk::IconView, TreeView: Update get_tooltip_context_*()
    
    Change the &x and &y arguments to x and y (input, no output).

 gtk/src/iconview.ccg |  8 ++++----
 gtk/src/iconview.hg  | 22 ++++++++++------------
 gtk/src/treeview.ccg |  8 ++++----
 gtk/src/treeview.hg  | 42 ++++++++++++++++++------------------------
 4 files changed, 36 insertions(+), 44 deletions(-)
---
diff --git a/gtk/src/iconview.ccg b/gtk/src/iconview.ccg
index d815537b..cc1eede2 100644
--- a/gtk/src/iconview.ccg
+++ b/gtk/src/iconview.ccg
@@ -174,7 +174,7 @@ bool IconView::get_dest_item_at_pos(int drag_x, int drag_y, DropPosition& pos) c
 }
 
 bool
-IconView::get_tooltip_context_path(int& x, int& y,
+IconView::get_tooltip_context_path(int x, int y,
                                    bool keyboard_tip,
                                    TreeModel::Path& path)
 {
@@ -182,7 +182,7 @@ IconView::get_tooltip_context_path(int& x, int& y,
 
   gboolean result =
     gtk_icon_view_get_tooltip_context(gobj(),
-                                      &x, &y,
+                                      x, y,
                                       keyboard_tip,
                                       nullptr,
                                       &cpath,
@@ -196,7 +196,7 @@ IconView::get_tooltip_context_path(int& x, int& y,
 }
 
 bool
-IconView::get_tooltip_context_iter(int& x, int& y,
+IconView::get_tooltip_context_iter(int x, int y,
                                    bool keyboard_tip,
                                    Gtk::TreeModel::iterator& iter)
 {
@@ -204,7 +204,7 @@ IconView::get_tooltip_context_iter(int& x, int& y,
 
   gboolean result =
     gtk_icon_view_get_tooltip_context(gobj(),
-                                      &x, &y,
+                                      x, y,
                                       keyboard_tip,
                                       nullptr,
                                       nullptr,
diff --git a/gtk/src/iconview.hg b/gtk/src/iconview.hg
index 53073676..c14c7557 100644
--- a/gtk/src/iconview.hg
+++ b/gtk/src/iconview.hg
@@ -333,19 +333,18 @@ public:
    * The return value indicates whether there is an icon view item at the given
    * coordinates (true) or not (false) for mouse tooltips. For keyboard
    * tooltips the item returned will be the cursor item. When true, then the
-   * path which has been provided will be set to point to
-   * that row and the corresponding model. x and y will always be converted
-   * to be relative to IconView's bin_window if keyboard_tooltip is false.
+   * @a path which has been provided will be set to point to
+   * that row and the corresponding model.
    *
-   * @param[in,out] x The x coordinate (relative to widget coordinates)
-   * @param[in,out] y The y coordinate (relative to widget coordinates)
+   * @param x The x coordinate (relative to widget coordinates)
+   * @param y The y coordinate (relative to widget coordinates)
    * @param keyboard_tip Whether this is a keyboard tooltip or not
    * @param[out] path A reference to receive a Gtk::TreePath
    * @result Whether or not the given tooltip context points to an item.
    *
    * @newin{2,12}
    */
-  bool get_tooltip_context_path(int& x, int& y,
+  bool get_tooltip_context_path(int x, int y,
                                 bool keyboard_tip,
                                 TreeModel::Path& path);
 
@@ -357,19 +356,18 @@ public:
    * The return value indicates whether there is an icon view item at the given
    * coordinates (true) or not (false) for mouse tooltips. For keyboard
    * tooltips the item returned will be the cursor item. When true, then the
-   * iter which has been provided will be set to point to
-   * that row and the corresponding model. x and y will always be converted
-   * to be relative to IconView's bin_window if keyboard_tooltip is false.
+   * @a iter which has been provided will be set to point to
+   * that row and the corresponding model.
    *
-   * @param[in,out] x The x coordinate (relative to widget coordinates)
-   * @param[in,out] y The y coordinate (relative to widget coordinates)
+   * @param x The x coordinate (relative to widget coordinates)
+   * @param y The y coordinate (relative to widget coordinates)
    * @param keyboard_tip Whether this is a keyboard tooltip or not
    * @param[out] iter A reference to receive a Gtk::TreeModel::iterator
    * @result Whether or not the given tooltip context points to an item.
    *
    * @newin{2,12}
    */
-  bool get_tooltip_context_iter(int& x, int& y,
+  bool get_tooltip_context_iter(int x, int y,
                                 bool keyboard_tip,
                                 Gtk::TreeModel::iterator& iter);
   _IGNORE(gtk_icon_view_get_tooltip_context)
diff --git a/gtk/src/treeview.ccg b/gtk/src/treeview.ccg
index abfcb178..46bbf56d 100644
--- a/gtk/src/treeview.ccg
+++ b/gtk/src/treeview.ccg
@@ -352,7 +352,7 @@ void TreeView::unset_model()
 }
 
 bool
-TreeView::get_tooltip_context_path(int& x, int& y,
+TreeView::get_tooltip_context_path(int x, int y,
                                    bool keyboard_tip,
                                    TreeModel::Path& path)
 {
@@ -360,7 +360,7 @@ TreeView::get_tooltip_context_path(int& x, int& y,
 
   gboolean result =
     gtk_tree_view_get_tooltip_context(gobj(),
-                                      &x, &y,
+                                      x, y,
                                       keyboard_tip,
                                       nullptr,
                                       &cpath,
@@ -374,7 +374,7 @@ TreeView::get_tooltip_context_path(int& x, int& y,
 }
 
 bool
-TreeView::get_tooltip_context_iter(int& x, int& y,
+TreeView::get_tooltip_context_iter(int x, int y,
                                    bool keyboard_tip,
                                    Gtk::TreeModel::iterator& iter)
 {
@@ -382,7 +382,7 @@ TreeView::get_tooltip_context_iter(int& x, int& y,
 
   gboolean result =
     gtk_tree_view_get_tooltip_context(gobj(),
-                                      &x, &y,
+                                      x, y,
                                       keyboard_tip,
                                       nullptr,
                                       nullptr,
diff --git a/gtk/src/treeview.hg b/gtk/src/treeview.hg
index 61014e2b..87d37924 100644
--- a/gtk/src/treeview.hg
+++ b/gtk/src/treeview.hg
@@ -770,13 +770,7 @@ public:
 
   _IGNORE(gtk_tree_view_get_tooltip_context)
 
-  /**
-   * @param x: the x coordinate (relative to widget coordinates)
-   * @param y: the y coordinate (relative to widget coordinates)
-   * @param keyboard_tip: whether this is a keyboard tooltip or not
-   * @param path: a reference to receive a Gtk::TreePath
-   *
-   * This function is supposed to be used in a Gtk::Widget::query-tooltip
+  /** This function is supposed to be used in a Gtk::Widget::query-tooltip
    * signal handler for Gtk::TreeView. The x, y and keyboard_tip values
    * which are received in the signal handler, should be passed to this
    * function without modification.
@@ -784,25 +778,22 @@ public:
    * The return value indicates whether there is an tree view row at the given
    * coordinates (true) or not (false) for mouse tooltips. For keyboard
    * tooltips the row returned will be the cursor item. When true, then the
-   * path which has been provided will be set to point to
-   * that row and the corresponding model. x and y will always be converted
-   * to be relative to Gtk::TreeView's bin_window if keyboard_tooltip is false.
+   * @a path which has been provided will be set to point to
+   * that row and the corresponding model.
    *
-   * Return value: whether or not the given tooltip context points to a row.
+   * @param x The x coordinate (relative to widget coordinates)
+   * @param y The y coordinate (relative to widget coordinates)
+   * @param keyboard_tip Whether this is a keyboard tooltip or not
+   * @param path A reference to receive a Gtk::TreePath
+   * @return Whether or not the given tooltip context points to a row.
    *
    * @newin{2,12}
    */
-  bool get_tooltip_context_path(int& x, int& y,
+  bool get_tooltip_context_path(int x, int y,
                                 bool keyboard_tip,
                                 TreeModel::Path& path);
 
-  /**
-   * @param x: the x coordinate (relative to widget coordinates)
-   * @param y: the y coordinate (relative to widget coordinates)
-   * @param keyboard_tip: whether this is a keyboard tooltip or not
-   * @param iter: a pointer to receive a Gtk::TreeModel::iterator
-   *
-   * This function is supposed to be used in a Gtk::Widget::query-tooltip
+  /** This function is supposed to be used in a Gtk::Widget::query-tooltip
    * signal handler for Gtk::TreeView. The x, y and keyboard_tip values
    * which are received in the signal handler, should be passed to this
    * function without modification.
@@ -810,15 +801,18 @@ public:
    * The return value indicates whether there is an tree view row at the given
    * coordinates (true) or not (false) for mouse tooltips. For keyboard
    * tooltips the row returned will be the cursor item. When true, then the
-   * iter which has been provided will be set to point to
-   * that row and the corresponding model. x and y will always be converted
-   * to be relative to Gtk::TreeView's bin_window if keyboard_tip is false.
+   * @a iter which has been provided will be set to point to
+   * that row and the corresponding model.
    *
-   * Return value: whether or not the given tooltip context points to a row.
+   * @param x The x coordinate (relative to widget coordinates)
+   * @param y The y coordinate (relative to widget coordinates)
+   * @param keyboard_tip Whether this is a keyboard tooltip or not
+   * @param iter A reference to receive a Gtk::TreeModel::iterator
+   * @return Whether or not the given tooltip context points to a row.
    *
    * @newin{2,12}
    */
-  bool get_tooltip_context_iter(int& x, int& y,
+  bool get_tooltip_context_iter(int x, int y,
                                 bool keyboard_tip,
                                 Gtk::TreeModel::iterator& iter);
 


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