Commit 9a7e7211 authored by Alexander Larsson's avatar Alexander Larsson

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
parent 890080eb
......@@ -470,7 +470,7 @@ demo_application_window_size_allocate (GtkWidget *widget,
}
static void
window_state_changed (GtkWidget *widget)
surface_state_changed (GtkWidget *widget)
{
DemoApplicationWindow *window = (DemoApplicationWindow *)widget;
GdkSurfaceState new_state;
......@@ -486,14 +486,14 @@ demo_application_window_realize (GtkWidget *widget)
GTK_WIDGET_CLASS (demo_application_window_parent_class)->realize (widget);
g_signal_connect_swapped (gtk_widget_get_window (widget), "notify::state",
G_CALLBACK (window_state_changed), widget);
G_CALLBACK (surface_state_changed), widget);
}
static void
demo_application_window_unrealize (GtkWidget *widget)
{
g_signal_handlers_disconnect_by_func (gtk_widget_get_window (widget),
window_state_changed, widget);
surface_state_changed, widget);
GTK_WIDGET_CLASS (demo_application_window_parent_class)->unrealize (widget);
}
......
......@@ -71,7 +71,7 @@ find_toplevel_at_pointer (GdkDisplay *display)
GdkSurface *pointer_window;
GtkWidget *widget = NULL;
pointer_window = gdk_device_get_window_at_position (gtk_get_current_event_device (),
pointer_window = gdk_device_get_surface_at_position (gtk_get_current_event_device (),
NULL, NULL);
/* The user data field of a GdkSurface is used to store a pointer
......
......@@ -87,13 +87,13 @@ GdkDragContext * gdk_drag_begin (GdkSurface *window,
gboolean gdk_drag_get_protocol (guint32 xid,
GdkDragProtocol *protocol);
void gdk_drag_find_window (GdkDragContext *context,
GdkSurface *drag_window,
GdkSurface *drag_surface,
gint x_root,
gint y_root,
GdkSurface **dest_window,
GdkSurface **dest_surface,
GdkDragProtocol *protocol);
gboolean gdk_drag_motion (GdkDragContext *context,
GdkSurface *dest_window,
GdkSurface *dest_surface,
GdkDragProtocol protocol,
gint x_root,
gint y_root,
......
......@@ -96,7 +96,7 @@ gdk_display_get_n_monitors
gdk_display_get_monitor
gdk_display_get_primary_monitor
gdk_display_get_monitor_at_point
gdk_display_get_monitor_at_window
gdk_display_get_monitor_at_surface
gdk_display_get_clipboard
gdk_display_get_primary_clipboard
gdk_display_get_setting
......@@ -184,7 +184,7 @@ gdk_surface_new_popup
gdk_surface_new_temp
gdk_surface_new_child
gdk_surface_destroy
gdk_surface_get_window_type
gdk_surface_get_surface_type
gdk_surface_get_display
gdk_surface_show
gdk_surface_show_unraised
......@@ -536,15 +536,15 @@ gdk_device_ungrab
gdk_device_get_state
gdk_device_get_position
gdk_device_get_position_double
gdk_device_get_window_at_position
gdk_device_get_window_at_position_double
gdk_device_get_surface_at_position
gdk_device_get_surface_at_position_double
gdk_device_get_history
gdk_device_free_history
GdkTimeCoord
gdk_device_get_axis
gdk_device_list_axes
gdk_device_get_axis_value
gdk_device_get_last_event_window
gdk_device_get_last_event_surface
<SUBSECTION>
gdk_device_tool_get_serial
......@@ -804,9 +804,9 @@ gdk_drag_context_get_suggested_action
gdk_drag_context_get_selected_action
gdk_drag_context_get_formats
gdk_drag_context_get_device
gdk_drag_context_get_source_window
gdk_drag_context_get_dest_window
gdk_drag_context_get_drag_window
gdk_drag_context_get_source_surface
gdk_drag_context_get_dest_surface
gdk_drag_context_get_drag_surface
gdk_drag_context_set_hotspot
<SUBSECTION Standard>
......@@ -853,7 +853,7 @@ gdk_x11_display_error_trap_push
gdk_x11_display_error_trap_pop
gdk_x11_display_error_trap_pop_ignored
gdk_x11_display_set_cursor_theme
gdk_x11_display_set_window_scale
gdk_x11_display_set_surface_scale
gdk_x11_display_get_glx_version
gdk_x11_register_standard_event_type
gdk_x11_screen_get_screen_number
......@@ -1116,7 +1116,7 @@ gdk_frame_timings_get_type
<FILE>gdkdrawcontext</FILE>
GdkDrawContext
gdk_draw_context_get_display
gdk_draw_context_get_window
gdk_draw_context_get_surface
<SUBSECTION Standard>
GDK_DRAW_CONTEXT
......@@ -1132,7 +1132,7 @@ gdk_draw_context_get_type
<FILE>gdkglcontext</FILE>
GdkGLContext
gdk_gl_context_get_display
gdk_gl_context_get_window
gdk_gl_context_get_surface
gdk_gl_context_get_shared_context
gdk_gl_context_get_version
......@@ -1197,7 +1197,7 @@ GDK_IS_MONITOR
<SECTION>
<FILE>gdkdrawingcontext</FILE>
GdkDrawingContext
gdk_drawing_context_get_window
gdk_drawing_context_get_surface
gdk_drawing_context_get_clip
gdk_drawing_context_get_cairo_context
gdk_drawing_context_is_valid
......
<SECTION>
<FILE>GskRenderer</FILE>
gsk_renderer_new_for_window
gsk_renderer_get_window
gsk_renderer_new_for_surface
gsk_renderer_get_surface
gsk_renderer_get_display
gsk_renderer_realize
gsk_renderer_unrealize
......
......@@ -2907,7 +2907,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_window_coords
gtk_text_view_buffer_to_surface_coords
gtk_text_view_window_to_buffer_coords
gtk_text_view_set_border_window_size
gtk_text_view_get_border_window_size
......@@ -3642,9 +3642,9 @@ gtk_tree_view_get_visible_rect
gtk_tree_view_get_visible_range
gtk_tree_view_convert_bin_window_to_tree_coords
gtk_tree_view_convert_bin_window_to_widget_coords
gtk_tree_view_convert_tree_to_bin_window_coords
gtk_tree_view_convert_tree_to_bin_surface_coords
gtk_tree_view_convert_tree_to_widget_coords
gtk_tree_view_convert_widget_to_bin_window_coords
gtk_tree_view_convert_widget_to_bin_surface_coords
gtk_tree_view_convert_widget_to_tree_coords
gtk_tree_view_enable_model_drag_dest
gtk_tree_view_enable_model_drag_source
......
......@@ -150,7 +150,7 @@
</section>
<section>
<title>Stop using gdk_pixbuf_get_from_window() and gdk_cairo_set_source_window()</title>
<title>Stop using gdk_pixbuf_get_from_window() and gdk_cairo_set_source_surface()</title>
<para>
These functions are not supported in GTK+ 4. Instead, either use backend-specific
APIs, or render your widgets using gtk_widget_render().
......
......@@ -33,7 +33,7 @@ static void gdk_broadway_device_get_state (GdkDevice *device,
GdkSurface *window,
gdouble *axes,
GdkModifierType *mask);
static void gdk_broadway_device_set_window_cursor (GdkDevice *device,
static void gdk_broadway_device_set_surface_cursor (GdkDevice *device,
GdkSurface *window,
GdkCursor *cursor);
static void gdk_broadway_device_warp (GdkDevice *device,
......@@ -56,12 +56,12 @@ static GdkGrabStatus gdk_broadway_device_grab (GdkDevice *device,
guint32 time_);
static void gdk_broadway_device_ungrab (GdkDevice *device,
guint32 time_);
static GdkSurface * gdk_broadway_device_window_at_position (GdkDevice *device,
static GdkSurface * gdk_broadway_device_surface_at_position (GdkDevice *device,
gdouble *win_x,
gdouble *win_y,
GdkModifierType *mask,
gboolean get_toplevel);
static void gdk_broadway_device_select_window_events (GdkDevice *device,
static void gdk_broadway_device_select_surface_events (GdkDevice *device,
GdkSurface *window,
GdkEventMask event_mask);
......@@ -75,13 +75,13 @@ gdk_broadway_device_class_init (GdkBroadwayDeviceClass *klass)
device_class->get_history = gdk_broadway_device_get_history;
device_class->get_state = gdk_broadway_device_get_state;
device_class->set_window_cursor = gdk_broadway_device_set_window_cursor;
device_class->set_surface_cursor = gdk_broadway_device_set_surface_cursor;
device_class->warp = gdk_broadway_device_warp;
device_class->query_state = gdk_broadway_device_query_state;
device_class->grab = gdk_broadway_device_grab;
device_class->ungrab = gdk_broadway_device_ungrab;
device_class->window_at_position = gdk_broadway_device_window_at_position;
device_class->select_window_events = gdk_broadway_device_select_window_events;
device_class->surface_at_position = gdk_broadway_device_surface_at_position;
device_class->select_surface_events = gdk_broadway_device_select_surface_events;
}
static void
......@@ -124,7 +124,7 @@ gdk_broadway_device_get_state (GdkDevice *device,
}
static void
gdk_broadway_device_set_window_cursor (GdkDevice *device,
gdk_broadway_device_set_surface_cursor (GdkDevice *device,
GdkSurface *window,
GdkCursor *cursor)
{
......@@ -230,7 +230,7 @@ _gdk_broadway_surface_grab_check_destroy (GdkSurface *window)
/* Make sure there is no lasting grab in this native window */
grab = _gdk_display_get_last_device_grab (display, d->data);
if (grab && grab->native_window == window)
if (grab && grab->native_surface == window)
{
grab->serial_end = grab->serial_start;
grab->implicit_ungrab = TRUE;
......@@ -312,7 +312,7 @@ gdk_broadway_device_ungrab (GdkDevice *device,
}
static GdkSurface *
gdk_broadway_device_window_at_position (GdkDevice *device,
gdk_broadway_device_surface_at_position (GdkDevice *device,
gdouble *win_x,
gdouble *win_y,
GdkModifierType *mask,
......@@ -326,7 +326,7 @@ gdk_broadway_device_window_at_position (GdkDevice *device,
}
static void
gdk_broadway_device_select_window_events (GdkDevice *device,
gdk_broadway_device_select_surface_events (GdkDevice *device,
GdkSurface *window,
GdkEventMask event_mask)
{
......
......@@ -520,7 +520,7 @@ gdk_broadway_display_class_init (GdkBroadwayDisplayClass * class)
object_class->dispose = gdk_broadway_display_dispose;
object_class->finalize = gdk_broadway_display_finalize;
display_class->window_type = GDK_TYPE_BROADWAY_SURFACE;
display_class->surface_type = GDK_TYPE_BROADWAY_SURFACE;
display_class->get_name = gdk_broadway_display_get_name;
display_class->beep = gdk_broadway_display_beep;
......@@ -534,7 +534,7 @@ gdk_broadway_display_class_init (GdkBroadwayDisplayClass * class)
display_class->get_next_serial = gdk_broadway_display_get_next_serial;
display_class->notify_startup_complete = gdk_broadway_display_notify_startup_complete;
display_class->create_window_impl = _gdk_broadway_display_create_window_impl;
display_class->create_surface_impl = _gdk_broadway_display_create_surface_impl;
display_class->get_keymap = _gdk_broadway_display_get_keymap;
display_class->text_property_to_utf8_list = _gdk_broadway_display_text_property_to_utf8_list;
display_class->utf8_to_string_target = _gdk_broadway_display_utf8_to_string_target;
......
......@@ -99,7 +99,7 @@ void _gdk_broadway_display_get_default_cursor_size (GdkDisplay *display,
void _gdk_broadway_display_get_maximal_cursor_size (GdkDisplay *display,
guint *width,
guint *height);
void _gdk_broadway_display_create_window_impl (GdkDisplay *display,
void _gdk_broadway_display_create_surface_impl (GdkDisplay *display,
GdkSurface *window,
GdkSurface *real_parent,
GdkEventMask event_mask,
......
......@@ -46,7 +46,7 @@
/* Forward declarations */
static void gdk_surface_impl_broadway_finalize (GObject *object);
#define WINDOW_IS_TOPLEVEL(window) \
#define SURFACE_IS_TOPLEVEL(window) \
(GDK_SURFACE_TYPE (window) != GDK_SURFACE_CHILD)
struct _GdkBroadwaySurface {
......@@ -123,7 +123,7 @@ queue_flush (GdkSurface *window)
static void
gdk_surface_impl_broadway_init (GdkSurfaceImplBroadway *impl)
{
impl->toplevel_window_type = -1;
impl->toplevel_surface_type = -1;
}
static void
......@@ -195,7 +195,7 @@ on_frame_clock_after_paint (GdkFrameClock *clock,
static void
connect_frame_clock (GdkSurface *window)
{
if (WINDOW_IS_TOPLEVEL (window))
if (SURFACE_IS_TOPLEVEL (window))
{
GdkFrameClock *frame_clock = gdk_surface_get_frame_clock (window);
......@@ -205,7 +205,7 @@ connect_frame_clock (GdkSurface *window)
}
void
_gdk_broadway_display_create_window_impl (GdkDisplay *display,
_gdk_broadway_display_create_surface_impl (GdkDisplay *display,
GdkSurface *window,
GdkSurface *real_parent,
GdkEventMask event_mask,
......@@ -223,12 +223,12 @@ _gdk_broadway_display_create_window_impl (GdkDisplay *display,
window->y,
window->width,
window->height,
window->window_type == GDK_SURFACE_TEMP);
window->surface_type == GDK_SURFACE_TEMP);
g_hash_table_insert (broadway_display->id_ht, GINT_TO_POINTER(impl->id), window);
impl->wrapper = window;
g_assert (window->window_type == GDK_SURFACE_TOPLEVEL ||
window->window_type == GDK_SURFACE_TEMP);
g_assert (window->surface_type == GDK_SURFACE_TOPLEVEL ||
window->surface_type == GDK_SURFACE_TEMP);
g_assert (window->parent == NULL);
broadway_display->toplevels = g_list_prepend (broadway_display->toplevels, impl);
......@@ -687,7 +687,7 @@ gdk_broadway_surface_set_icon_name (GdkSurface *window,
const gchar *name)
{
if (GDK_SURFACE_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window))
!SURFACE_IS_TOPLEVEL (window))
return;
g_object_set_qdata (G_OBJECT (window), g_quark_from_static_string ("gdk-icon-name-set"),
......@@ -698,7 +698,7 @@ static void
gdk_broadway_surface_iconify (GdkSurface *window)
{
if (GDK_SURFACE_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window))
!SURFACE_IS_TOPLEVEL (window))
return;
}
......@@ -706,7 +706,7 @@ static void
gdk_broadway_surface_deiconify (GdkSurface *window)
{
if (GDK_SURFACE_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window))
!SURFACE_IS_TOPLEVEL (window))
return;
}
......@@ -714,7 +714,7 @@ static void
gdk_broadway_surface_stick (GdkSurface *window)
{
if (GDK_SURFACE_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window))
!SURFACE_IS_TOPLEVEL (window))
return;
}
......@@ -723,7 +723,7 @@ static void
gdk_broadway_surface_unstick (GdkSurface *window)
{
if (GDK_SURFACE_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window))
!SURFACE_IS_TOPLEVEL (window))
return;
}
......@@ -737,7 +737,7 @@ gdk_broadway_surface_maximize (GdkSurface *window)
GdkRectangle geom;
if (GDK_SURFACE_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window))
!SURFACE_IS_TOPLEVEL (window))
return;
impl = GDK_SURFACE_IMPL_BROADWAY (window->impl);
......@@ -747,7 +747,7 @@ gdk_broadway_surface_maximize (GdkSurface *window)
impl->maximized = TRUE;
gdk_synthesize_window_state (window, 0, GDK_SURFACE_STATE_MAXIMIZED);
gdk_synthesize_surface_state (window, 0, GDK_SURFACE_STATE_MAXIMIZED);
impl->pre_maximize_x = window->x;
impl->pre_maximize_y = window->y;
......@@ -769,7 +769,7 @@ gdk_broadway_surface_unmaximize (GdkSurface *window)
GdkSurfaceImplBroadway *impl;
if (GDK_SURFACE_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window))
!SURFACE_IS_TOPLEVEL (window))
return;
impl = GDK_SURFACE_IMPL_BROADWAY (window->impl);
......@@ -779,7 +779,7 @@ gdk_broadway_surface_unmaximize (GdkSurface *window)
impl->maximized = FALSE;
gdk_synthesize_window_state (window, GDK_SURFACE_STATE_MAXIMIZED, 0);
gdk_synthesize_surface_state (window, GDK_SURFACE_STATE_MAXIMIZED, 0);
gdk_surface_move_resize (window,
impl->pre_maximize_x,
......@@ -792,7 +792,7 @@ static void
gdk_broadway_surface_fullscreen (GdkSurface *window)
{
if (GDK_SURFACE_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window))
!SURFACE_IS_TOPLEVEL (window))
return;
}
......@@ -801,7 +801,7 @@ static void
gdk_broadway_surface_unfullscreen (GdkSurface *window)
{
if (GDK_SURFACE_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window))
!SURFACE_IS_TOPLEVEL (window))
return;
}
......@@ -813,7 +813,7 @@ gdk_broadway_surface_set_keep_above (GdkSurface *window,
g_return_if_fail (GDK_IS_SURFACE (window));
if (GDK_SURFACE_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window))
!SURFACE_IS_TOPLEVEL (window))
return;
}
......@@ -824,7 +824,7 @@ gdk_broadway_surface_set_keep_below (GdkSurface *window, gboolean setting)
g_return_if_fail (GDK_IS_SURFACE (window));
if (GDK_SURFACE_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window))
!SURFACE_IS_TOPLEVEL (window))
return;
}
......@@ -833,7 +833,7 @@ static GdkSurface *
gdk_broadway_surface_get_group (GdkSurface *window)
{
if (GDK_SURFACE_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window))
!SURFACE_IS_TOPLEVEL (window))
return NULL;
return window;
......@@ -850,7 +850,7 @@ gdk_broadway_surface_set_decorations (GdkSurface *window,
GdkWMDecoration decorations)
{
if (GDK_SURFACE_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window))
!SURFACE_IS_TOPLEVEL (window))
return;
}
......@@ -862,7 +862,7 @@ gdk_broadway_surface_get_decorations (GdkSurface *window,
gboolean result = FALSE;
if (GDK_SURFACE_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window))
!SURFACE_IS_TOPLEVEL (window))
return FALSE;
return result;
......@@ -875,7 +875,7 @@ gdk_broadway_surface_set_functions (GdkSurface *window,
g_return_if_fail (GDK_IS_SURFACE (window));
if (GDK_SURFACE_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window))
!SURFACE_IS_TOPLEVEL (window))
return;
}
......@@ -1264,7 +1264,7 @@ gdk_broadway_surface_begin_resize_drag (GdkSurface *window,
impl = GDK_SURFACE_IMPL_BROADWAY (window->impl);
if (GDK_SURFACE_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window))
!SURFACE_IS_TOPLEVEL (window))
return;
if (impl->maximized)
......@@ -1304,7 +1304,7 @@ gdk_broadway_surface_begin_move_drag (GdkSurface *window,
impl = GDK_SURFACE_IMPL_BROADWAY (window->impl);
if (GDK_SURFACE_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window))
!SURFACE_IS_TOPLEVEL (window))
return;
if (impl->maximized)
......@@ -1342,7 +1342,7 @@ gdk_broadway_surface_set_opacity (GdkSurface *window,
g_return_if_fail (GDK_IS_SURFACE (window));
if (GDK_SURFACE_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window))
!SURFACE_IS_TOPLEVEL (window))
return;
if (opacity < 0)
......
......@@ -61,7 +61,7 @@ struct _GdkSurfaceImplBroadway
int pre_maximize_width;
int pre_maximize_height;
gint8 toplevel_window_type;
gint8 toplevel_surface_type;
gboolean dirty;
gboolean last_synced;
......
......@@ -23,7 +23,7 @@ gboolean gdk_surface_supports_edge_constraints (GdkSurface *window);
void gdk_surface_move_to_rect (GdkSurface *window,
const GdkRectangle *rect,
GdkGravity rect_anchor,
GdkGravity window_anchor,
GdkGravity surface_anchor,
GdkAnchorHints anchor_hints,
gint rect_anchor_dx,
gint rect_anchor_dy);
......
......@@ -241,7 +241,7 @@ gdk_cairo_surface_paint_pixbuf (cairo_surface_t *surface,
* gdk_cairo_surface_create_from_pixbuf:
* @pixbuf: a #GdkPixbuf
* @scale: the scale of the new surface, or 0 to use same as @window
* @for_window: (allow-none): The window this will be drawn to, or %NULL
* @for_surface: (allow-none): The window this will be drawn to, or %NULL
*
* Creates an image surface with the same contents as
* the pixbuf.
......@@ -251,14 +251,14 @@ gdk_cairo_surface_paint_pixbuf (cairo_surface_t *surface,
cairo_surface_t *
gdk_cairo_surface_create_from_pixbuf (const GdkPixbuf *pixbuf,
int scale,
GdkSurface *for_window)
GdkSurface *for_surface)
{
cairo_format_t format;
cairo_surface_t *surface;
g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
g_return_val_if_fail (scale >= 0, NULL);
g_return_val_if_fail (for_window == NULL || GDK_IS_SURFACE (for_window), NULL);
g_return_val_if_fail (for_surface == NULL || GDK_IS_SURFACE (for_surface), NULL);
if (gdk_pixbuf_get_n_channels (pixbuf) == 3)
format = CAIRO_FORMAT_RGB24;
......@@ -266,7 +266,7 @@ gdk_cairo_surface_create_from_pixbuf (const GdkPixbuf *pixbuf,
format = CAIRO_FORMAT_ARGB32;
surface =
gdk_surface_create_similar_image_surface (for_window,
gdk_surface_create_similar_image_surface (for_surface,
format,
gdk_pixbuf_get_width (pixbuf),
gdk_pixbuf_get_height (pixbuf),
......
......@@ -58,7 +58,7 @@ cairo_region_t *
GDK_AVAILABLE_IN_ALL
cairo_surface_t * gdk_cairo_surface_create_from_pixbuf (const GdkPixbuf *pixbuf,
int scale,
GdkSurface *for_window);
GdkSurface *for_surface);
GDK_AVAILABLE_IN_ALL
void gdk_cairo_draw_from_gl (cairo_t *cr,
GdkSurface *window,
......
......@@ -594,7 +594,7 @@ gdk_device_get_position (GdkDevice *device,
/**
* gdk_device_get_window_at_position_double:
* gdk_device_get_surface_at_position_double:
* @device: pointer #GdkDevice to query info to.
* @win_x: (out) (allow-none): return location for the X coordinate of the device location,
* relative to the window origin, or %NULL.
......@@ -613,7 +613,7 @@ gdk_device_get_position (GdkDevice *device,
* device position, or %NULL.
**/
GdkSurface *
gdk_device_get_window_at_position_double (GdkDevice *device,
gdk_device_get_surface_at_position_double (GdkDevice *device,
gdouble *win_x,
gdouble *win_y)
{
......@@ -625,7 +625,7 @@ gdk_device_get_window_at_position_double (GdkDevice *device,
g_return_val_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_SLAVE ||
gdk_display_device_is_grabbed (gdk_device_get_display (device), device), NULL);
window = _gdk_device_window_at_position (device, &tmp_x, &tmp_y, NULL, FALSE);
window = _gdk_device_surface_at_position (device, &tmp_x, &tmp_y, NULL, FALSE);
/* This might need corrections, as the native window returned
may contain client side children */
......@@ -643,7 +643,7 @@ gdk_device_get_window_at_position_double (GdkDevice *device,
}
/**
* gdk_device_get_window_at_position:
* gdk_device_get_surface_at_position:
* @device: pointer #GdkDevice to query info to.
* @win_x: (out) (allow-none): return location for the X coordinate of the device location,
* relative to the window origin, or %NULL.
......@@ -661,7 +661,7 @@ gdk_device_get_window_at_position_double (GdkDevice *device,
* device position, or %NULL.
**/
GdkSurface *
gdk_device_get_window_at_position (GdkDevice *device,
gdk_device_get_surface_at_position (GdkDevice *device,
gint *win_x,
gint *win_y)
{
......@@ -669,7 +669,7 @@ gdk_device_get_window_at_position (GdkDevice *device,
GdkSurface *window;
window =
gdk_device_get_window_at_position_double (device, &tmp_x, &tmp_y);
gdk_device_get_surface_at_position_double (device, &tmp_x, &tmp_y);
if (win_x)
*win_x = round (tmp_x);
......@@ -1566,7 +1566,7 @@ find_axis_info (GArray *array,
}
gboolean
_gdk_device_translate_window_coord (GdkDevice *device,
_gdk_device_translate_surface_coord (GdkDevice *device,
GdkSurface *window,
guint index_,
gdouble value,
......@@ -1765,13 +1765,13 @@ _gdk_device_query_state (GdkDevice *device,
}
GdkSurface *
_gdk_device_window_at_position (GdkDevice *device,
_gdk_device_surface_at_position (GdkDevice *device,
gdouble *win_x,
gdouble *win_y,
GdkModifierType *mask,
gboolean get_toplevel)
{
return GDK_DEVICE_GET_CLASS (device)->window_at_position (device,
return GDK_DEVICE_GET_CLASS (device)->surface_at_position (device,
win_x,
win_y,
mask,
......@@ -1779,7 +1779,7 @@ _gdk_device_window_at_position (GdkDevice *device,
}
/**
* gdk_device_get_last_event_window:
* gdk_device_get_last_event_surface:
* @device: a #GdkDevice, with a source other than %GDK_SOURCE_KEYBOARD
*
* Gets information about which window the given pointer device is in, based on events
......@@ -1791,7 +1791,7 @@ _gdk_device_window_at_position (GdkDevice *device,
* Returns: (transfer none) (allow-none): the last window the device
*/
GdkSurface *
gdk_device_get_last_event_window (GdkDevice *device)
gdk_device_get_last_event_surface (GdkDevice *device)
{
GdkDisplay *display;
GdkPointerSurfaceInfo *info;
......@@ -1802,7 +1802,7 @@ gdk_device_get_last_event_window (GdkDevice *device)
display = gdk_device_get_display (device);
info = _gdk_display_get_pointer_info (display, device);
return info->window_under_pointer;
return info->surface_under_pointer;
}
/**
......
......@@ -73,7 +73,7 @@ typedef enum
* @GDK_MODE_DISABLED: the device is disabled and will not report any events.
* @GDK_MODE_SCREEN: the device is enabled. The device’s coordinate space
* maps to the entire screen.
* @GDK_MODE_WINDOW: the device is enabled. The device’s coordinate space
* @GDK_MODE_SURFACE: the device is enabled. The device’s coordinate space
* is mapped to a single window. The manner in which this window
* is chosen is undefined, but it will typically be the same
* way in which the focus window for key events is determined.
......@@ -84,7 +84,7 @@ typedef enum
{
GDK_MODE_DISABLED,
GDK_MODE_SCREEN,
GDK_MODE_WINDOW
GDK_MODE_SURFACE
} GdkInputMode;
/**
......@@ -172,7 +172,7 @@ void gdk_device_get_position (GdkDevice *device,
gint *y);
GDK_AVAILABLE_IN_ALL
GdkSurface *
gdk_device_get_window_at_position
gdk_device_get_surface_at_position
(GdkDevice *device,
gint *win_x,
gint *win_y);
......@@ -182,7 +182,7 @@ void gdk_device_get_position_double (GdkDevice *device,
gdouble *y);
GDK_AVAILABLE_IN_ALL
GdkSurface *
gdk_device_get_window_at_position_double
gdk_device_get_surface_at_position_double
(GdkDevice *device,
gdouble *win_x,