textview: revert renaming of buffer_to_surface_coords()
authorChristian Hergert <chergert@redhat.com>
Mon, 23 Sep 2019 23:08:53 +0000 (16:08 -0700)
committerChristian Hergert <chergert@redhat.com>
Fri, 4 Oct 2019 20:22:49 +0000 (13:22 -0700)
The renaming of this function doesn't make much since because the window
is the GtkTextWindowType, not GdkWindow specifically. So we can keep the
old name which is closer to the proper meaning and less code for consumers
to change when porting to 4.x.

docs/reference/gtk/gtk4-sections.txt
gtk/a11y/gtktextviewaccessible.c
gtk/gtktextview.c
gtk/gtktextview.h

index b454df5ca1143e70a965f0af983ce0e6541bd7f3..cfd069216b2517685d4b22de99be42e7c5f8b11a 100644 (file)
@@ -3070,7 +3070,7 @@ gtk_text_view_get_line_at_y
 gtk_text_view_get_line_yrange
 gtk_text_view_get_iter_at_location
 gtk_text_view_get_iter_at_position
-gtk_text_view_buffer_to_surface_coords
+gtk_text_view_buffer_to_window_coords
 gtk_text_view_window_to_buffer_coords
 gtk_text_view_set_border_window_size
 gtk_text_view_get_border_window_size
index 67dce5bd0fbc96674a0bb357ac37408a940190e1..ba15122db02216a9a60e9db8bc12b987df037522 100644 (file)
@@ -513,7 +513,7 @@ gtk_text_view_accessible_get_character_extents (AtkText      *text,
   *height = rectangle.height;
   *width = rectangle.width;
 
-  gtk_text_view_buffer_to_surface_coords (view, GTK_TEXT_WINDOW_WIDGET,
+  gtk_text_view_buffer_to_window_coords (view, GTK_TEXT_WINDOW_WIDGET,
     rectangle.x, rectangle.y, x, y);
   if (coords != ATK_XY_WINDOW)
     {
index 7811fd79afb2fc4b0e2d1eddfd335e67d3b57d8b..38e7e103569cd390fca237614c1bffccf8154b3e 100644 (file)
@@ -2008,7 +2008,7 @@ gtk_text_view_get_buffer (GtkTextView *text_view)
  * cursor’s offset within the preedit sequence.
  *
  * The rectangle position is in buffer coordinates; use
- * gtk_text_view_buffer_to_surface_coords() to convert these
+ * gtk_text_view_buffer_to_window_coords() to convert these
  * coordinates to coordinates for one of the windows in the text view.
  **/
 void
@@ -2111,7 +2111,7 @@ gtk_text_view_get_iter_at_position (GtkTextView *text_view,
  *
  * Gets a rectangle which roughly contains the character at @iter.
  * The rectangle position is in buffer coordinates; use
- * gtk_text_view_buffer_to_surface_coords() to convert these
+ * gtk_text_view_buffer_to_window_coords() to convert these
  * coordinates to coordinates for one of the windows in the text view.
  **/
 void
@@ -2136,7 +2136,7 @@ gtk_text_view_get_iter_location (GtkTextView       *text_view,
  *
  * Gets the y coordinate of the top of the line containing @iter,
  * and the height of the line. The coordinate is a buffer coordinate;
- * convert to window coordinates with gtk_text_view_buffer_to_surface_coords().
+ * convert to window coordinates with gtk_text_view_buffer_to_window_coords().
  **/
 void
 gtk_text_view_get_line_yrange (GtkTextView       *text_view,
@@ -2786,7 +2786,7 @@ gtk_text_view_move_mark_onscreen (GtkTextView *text_view,
  *
  * Fills @visible_rect with the currently-visible
  * region of the buffer, in buffer coordinates. Convert to window coordinates
- * with gtk_text_view_buffer_to_surface_coords().
+ * with gtk_text_view_buffer_to_window_coords().
  **/
 void
 gtk_text_view_get_visible_rect (GtkTextView  *text_view,
@@ -4764,7 +4764,7 @@ gtk_text_view_show_magnifier (GtkTextView *text_view,
   gtk_text_view_get_iter_location (text_view, iter,
                                    (GdkRectangle *) &rect);
   rect.x = x + priv->xoffset;
-  gtk_text_view_buffer_to_surface_coords (text_view, GTK_TEXT_WINDOW_TEXT,
+  gtk_text_view_buffer_to_window_coords (text_view, GTK_TEXT_WINDOW_TEXT,
                                          rect.x, rect.y, &rect.x, &rect.y);
   _text_window_to_widget_coords (text_view, &rect.x, &rect.y);
   req.height = rect.height * N_LINES *
@@ -8791,12 +8791,12 @@ gtk_text_view_do_popup (GtkTextView    *text_view,
 
       if (is_visible)
         {
-          gtk_text_view_buffer_to_surface_coords (text_view,
-                                                  GTK_TEXT_WINDOW_WIDGET,
-                                                  iter_location.x,
-                                                  iter_location.y,
-                                                  &iter_location.x,
-                                                  &iter_location.y);
+          gtk_text_view_buffer_to_window_coords (text_view,
+                                                 GTK_TEXT_WINDOW_WIDGET,
+                                                 iter_location.x,
+                                                 iter_location.y,
+                                                 &iter_location.x,
+                                                 &iter_location.y);
 
           gtk_popover_set_pointing_to (GTK_POPOVER (priv->popup_menu), &iter_location);
         }
@@ -9213,7 +9213,7 @@ gtk_text_view_get_css_node (GtkTextView       *text_view,
 }
 
 /**
- * gtk_text_view_buffer_to_surface_coords:
+ * gtk_text_view_buffer_to_window_coords:
  * @text_view: a #GtkTextView
  * @win: a #GtkTextWindowType except #GTK_TEXT_WINDOW_PRIVATE
  * @buffer_x: buffer x coordinate
@@ -9228,7 +9228,7 @@ gtk_text_view_get_css_node (GtkTextView       *text_view,
  * gtk_text_view_set_border_window_size()).
  **/
 void
-gtk_text_view_buffer_to_surface_coords (GtkTextView      *text_view,
+gtk_text_view_buffer_to_window_coords (GtkTextView      *text_view,
                                        GtkTextWindowType win,
                                        gint              buffer_x,
                                        gint              buffer_y,
@@ -10023,7 +10023,7 @@ gtk_text_view_insert_emoji (GtkTextView *text_view)
                                     gtk_text_buffer_get_insert (buffer));
 
   gtk_text_view_get_iter_location (text_view, &iter, (GdkRectangle *) &rect);
-  gtk_text_view_buffer_to_surface_coords (text_view, GTK_TEXT_WINDOW_TEXT,
+  gtk_text_view_buffer_to_window_coords (text_view, GTK_TEXT_WINDOW_TEXT,
                                          rect.x, rect.y, &rect.x, &rect.y);
   _text_window_to_widget_coords (text_view, &rect.x, &rect.y);
 
index bf666f7b813d8dc779489389c24a25397975a140..489b5ebf1ff48fc21c2ee80f6ab4595d4cd3487f 100644 (file)
@@ -266,12 +266,12 @@ void           gtk_text_view_get_line_at_y         (GtkTextView       *text_view
                                                     gint              *line_top);
 
 GDK_AVAILABLE_IN_ALL
-void gtk_text_view_buffer_to_surface_coords (GtkTextView       *text_view,
-                                            GtkTextWindowType  win,
-                                            gint               buffer_x,
-                                            gint               buffer_y,
-                                            gint              *window_x,
-                                            gint              *window_y);
+void gtk_text_view_buffer_to_window_coords (GtkTextView       *text_view,
+                                            GtkTextWindowType  win,
+                                            gint               buffer_x,
+                                            gint               buffer_y,
+                                            gint              *window_x,
+                                            gint              *window_y);
 GDK_AVAILABLE_IN_ALL
 void gtk_text_view_window_to_buffer_coords (GtkTextView       *text_view,
                                             GtkTextWindowType  win,