diff options
author | Alexander Larsson <alexl@redhat.com> | 2018-03-20 12:05:26 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2018-03-20 12:05:26 +0100 |
commit | 9a7e721181ce714ab248429dc1258984b9e10748 (patch) | |
tree | 73d69b5c298d61cc9c045bed3bc7e54dde4aa15c /gdk/x11/gdkscreen-x11.c | |
parent | 890080ebf7a12199d5500fbbf6a0daf06cc2d35f (diff) | |
download | gtk+-9a7e721181ce714ab248429dc1258984b9e10748.tar.gz |
GdkSurface: Rename various functions and variables
This is an automatic rename of various things related
to the window->surface rename.
Public symbols changed by this is:
GDK_MODE_WINDOW
gdk_device_get_window_at_position
gdk_device_get_window_at_position_double
gdk_device_get_last_event_window
gdk_display_get_monitor_at_window
gdk_drag_context_get_source_window
gdk_drag_context_get_dest_window
gdk_drag_context_get_drag_window
gdk_draw_context_get_window
gdk_drawing_context_get_window
gdk_gl_context_get_window
gdk_synthesize_window_state
gdk_surface_get_window_type
gdk_x11_display_set_window_scale
gsk_renderer_new_for_window
gsk_renderer_get_window
gtk_text_view_buffer_to_window_coords
gtk_tree_view_convert_widget_to_bin_window_coords
gtk_tree_view_convert_tree_to_bin_window_coords
The commands that generated this are:
git sed -f g "GDK window" "GDK surface"
git sed -f g window_impl surface_impl
(cd gdk; git sed -f g impl_window impl_surface)
git sed -f g WINDOW_IMPL SURFACE_IMPL
git sed -f g GDK_MODE_WINDOW GDK_MODE_SURFACE
git sed -f g gdk_draw_context_get_window gdk_draw_context_get_surface
git sed -f g gdk_drawing_context_get_window gdk_drawing_context_get_surface
git sed -f g gdk_gl_context_get_window gdk_gl_context_get_surface
git sed -f g gsk_renderer_get_window gsk_renderer_get_surface
git sed -f g gsk_renderer_new_for_window gsk_renderer_new_for_surface
(cd gdk; git sed -f g window_type surface_type)
git sed -f g gdk_surface_get_window_type gdk_surface_get_surface_type
git sed -f g window_at_position surface_at_position
git sed -f g event_window event_surface
git sed -f g window_coord surface_coord
git sed -f g window_state surface_state
git sed -f g window_cursor surface_cursor
git sed -f g window_scale surface_scale
git sed -f g window_events surface_events
git sed -f g monitor_at_window monitor_at_surface
git sed -f g window_under_pointer surface_under_pointer
(cd gdk; git sed -f g for_window for_surface)
git sed -f g window_anchor surface_anchor
git sed -f g WINDOW_IS_TOPLEVEL SURFACE_IS_TOPLEVEL
git sed -f g native_window native_surface
git sed -f g source_window source_surface
git sed -f g dest_window dest_surface
git sed -f g drag_window drag_surface
git sed -f g input_window input_surface
git checkout NEWS* po-properties po docs/reference/gtk/migrating-3to4.xml
Diffstat (limited to 'gdk/x11/gdkscreen-x11.c')
-rw-r--r-- | gdk/x11/gdkscreen-x11.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c index bcabeb32de..83b6818e55 100644 --- a/gdk/x11/gdkscreen-x11.c +++ b/gdk/x11/gdkscreen-x11.c @@ -242,10 +242,10 @@ gdk_x11_screen_get_work_area (GdkX11Screen *x11_screen, area->width = workareas[desktop * 4 + 2]; area->height = workareas[desktop * 4 + 3]; - area->x /= x11_screen->window_scale; - area->y /= x11_screen->window_scale; - area->width /= x11_screen->window_scale; - area->height /= x11_screen->window_scale; + area->x /= x11_screen->surface_scale; + area->y /= x11_screen->surface_scale; + area->width /= x11_screen->surface_scale; + area->height /= x11_screen->surface_scale; out: if (ret_workarea) @@ -408,10 +408,10 @@ init_randr15 (GdkX11Screen *x11_screen, gboolean *changed) gdk_monitor_get_geometry (GDK_MONITOR (monitor), &geometry); name = g_strndup (output_info->name, output_info->nameLen); - newgeo.x = rr_monitors[i].x / x11_screen->window_scale; - newgeo.y = rr_monitors[i].y / x11_screen->window_scale; - newgeo.width = rr_monitors[i].width / x11_screen->window_scale; - newgeo.height = rr_monitors[i].height / x11_screen->window_scale; + newgeo.x = rr_monitors[i].x / x11_screen->surface_scale; + newgeo.y = rr_monitors[i].y / x11_screen->surface_scale; + newgeo.width = rr_monitors[i].width / x11_screen->surface_scale; + newgeo.height = rr_monitors[i].height / x11_screen->surface_scale; if (newgeo.x != geometry.x || newgeo.y != geometry.y || newgeo.width != geometry.width || @@ -430,7 +430,7 @@ init_randr15 (GdkX11Screen *x11_screen, gboolean *changed) gdk_monitor_set_subpixel_layout (GDK_MONITOR (monitor), translate_subpixel_order (output_info->subpixel_order)); gdk_monitor_set_refresh_rate (GDK_MONITOR (monitor), refresh_rate); - gdk_monitor_set_scale_factor (GDK_MONITOR (monitor), x11_screen->window_scale); + gdk_monitor_set_scale_factor (GDK_MONITOR (monitor), x11_screen->surface_scale); gdk_monitor_set_model (GDK_MONITOR (monitor), name); g_free (name); @@ -570,10 +570,10 @@ init_randr13 (GdkX11Screen *x11_screen, gboolean *changed) gdk_monitor_get_geometry (GDK_MONITOR (monitor), &geometry); name = g_strndup (output_info->name, output_info->nameLen); - newgeo.x = crtc->x / x11_screen->window_scale; - newgeo.y = crtc->y / x11_screen->window_scale; - newgeo.width = crtc->width / x11_screen->window_scale; - newgeo.height = crtc->height / x11_screen->window_scale; + newgeo.x = crtc->x / x11_screen->surface_scale; + newgeo.y = crtc->y / x11_screen->surface_scale; + newgeo.width = crtc->width / x11_screen->surface_scale; + newgeo.height = crtc->height / x11_screen->surface_scale; if (newgeo.x != geometry.x || newgeo.y != geometry.y || newgeo.width != geometry.width || @@ -592,7 +592,7 @@ init_randr13 (GdkX11Screen *x11_screen, gboolean *changed) gdk_monitor_set_subpixel_layout (GDK_MONITOR (monitor), translate_subpixel_order (output_info->subpixel_order)); gdk_monitor_set_refresh_rate (GDK_MONITOR (monitor), refresh_rate); - gdk_monitor_set_scale_factor (GDK_MONITOR (monitor), x11_screen->window_scale); + gdk_monitor_set_scale_factor (GDK_MONITOR (monitor), x11_screen->surface_scale); gdk_monitor_set_model (GDK_MONITOR (monitor), name); g_free (name); @@ -712,7 +712,7 @@ init_no_multihead (GdkX11Screen *x11_screen, gboolean *changed) gdk_monitor_set_size (GDK_MONITOR (monitor), width, height); g_object_notify (G_OBJECT (monitor), "workarea"); gdk_monitor_set_physical_size (GDK_MONITOR (monitor), width_mm, height_mm); - gdk_monitor_set_scale_factor (GDK_MONITOR (monitor), x11_screen->window_scale); + gdk_monitor_set_scale_factor (GDK_MONITOR (monitor), x11_screen->surface_scale); if (x11_display->primary_monitor != 0) *changed = TRUE; @@ -772,13 +772,13 @@ _gdk_x11_screen_new (GdkDisplay *display, scale_str = g_getenv ("GDK_SCALE"); if (scale_str) { - x11_screen->fixed_window_scale = TRUE; - x11_screen->window_scale = atol (scale_str); - if (x11_screen->window_scale == 0) - x11_screen->window_scale = 1; + x11_screen->fixed_surface_scale = TRUE; + x11_screen->surface_scale = atol (scale_str); + if (x11_screen->surface_scale == 0) + x11_screen->surface_scale = 1; } else - x11_screen->window_scale = 1; + x11_screen->surface_scale = 1; init_randr_support (x11_screen); init_multihead (x11_screen); @@ -789,17 +789,17 @@ _gdk_x11_screen_new (GdkDisplay *display, } void -_gdk_x11_screen_set_window_scale (GdkX11Screen *x11_screen, +_gdk_x11_screen_set_surface_scale (GdkX11Screen *x11_screen, gint scale) { GdkX11Display *x11_display = GDK_X11_DISPLAY (x11_screen->display); GList *toplevels, *l; int i; - if (x11_screen->window_scale == scale) + if (x11_screen->surface_scale == scale) return; - x11_screen->window_scale = scale; + x11_screen->surface_scale = scale; toplevels = gdk_x11_display_get_toplevel_windows (x11_screen->display); @@ -807,7 +807,7 @@ _gdk_x11_screen_set_window_scale (GdkX11Screen *x11_screen, { GdkSurface *window = l->data; - _gdk_x11_surface_set_window_scale (window, scale); + _gdk_x11_surface_set_surface_scale (window, scale); } for (i = 0; i < x11_display->monitors->len; i++) |