mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 13:30:19 +00:00
GdkWindow -> GdkSurface initial type rename
This renames the GdkWindow class and related classes (impl, backend subclasses) to surface. Additionally it renames related types: GdkWindowAttr, GdkWindowPaint, GdkWindowWindowClass, GdkWindowType, GdkWindowTypeHint, GdkWindowHints, GdkWindowState, GdkWindowEdge This is an automatic conversion using the below commands: git sed -f g GdkWindowWindowClass GdkSurfaceSurfaceClass git sed -f g GdkWindow GdkSurface git sed -f g "gdk_window\([ _\(\),;]\|$\)" "gdk_surface\1" # Avoid hitting gdk_windowing git sed -f g "GDK_WINDOW\([ _\(]\|$\)" "GDK_SURFACE\1" # Avoid hitting GDK_WINDOWING git sed "GDK_\([A-Z]*\)IS_WINDOW\([_ (]\|$\)" "GDK_\1IS_SURFACE\2" git sed GDK_TYPE_WINDOW GDK_TYPE_SURFACE git sed -f g GdkPointerWindowInfo GdkPointerSurfaceInfo git sed -f g "BROADWAY_WINDOW" "BROADWAY_SURFACE" git sed -f g "broadway_window" "broadway_surface" git sed -f g "BroadwayWindow" "BroadwaySurface" git sed -f g "WAYLAND_WINDOW" "WAYLAND_SURFACE" git sed -f g "wayland_window" "wayland_surface" git sed -f g "WaylandWindow" "WaylandSurface" git sed -f g "X11_WINDOW" "X11_SURFACE" git sed -f g "x11_window" "x11_surface" git sed -f g "X11Window" "X11Surface" git sed -f g "WIN32_WINDOW" "WIN32_SURFACE" git sed -f g "win32_window" "win32_surface" git sed -f g "Win32Window" "Win32Surface" git sed -f g "QUARTZ_WINDOW" "QUARTZ_SURFACE" git sed -f g "quartz_window" "quartz_surface" git sed -f g "QuartzWindow" "QuartzSurface" git checkout NEWS* po-properties
This commit is contained in:
parent
f7326ff828
commit
391727bd0d
@ -473,11 +473,11 @@ static void
|
||||
window_state_changed (GtkWidget *widget)
|
||||
{
|
||||
DemoApplicationWindow *window = (DemoApplicationWindow *)widget;
|
||||
GdkWindowState new_state;
|
||||
GdkSurfaceState new_state;
|
||||
|
||||
new_state = gdk_window_get_state (gtk_widget_get_window (widget));
|
||||
window->maximized = (new_state & GDK_WINDOW_STATE_MAXIMIZED) != 0;
|
||||
window->fullscreen = (new_state & GDK_WINDOW_STATE_FULLSCREEN) != 0;
|
||||
new_state = gdk_surface_get_state (gtk_widget_get_window (widget));
|
||||
window->maximized = (new_state & GDK_SURFACE_STATE_MAXIMIZED) != 0;
|
||||
window->fullscreen = (new_state & GDK_SURFACE_STATE_FULLSCREEN) != 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -68,19 +68,19 @@ enum
|
||||
static GtkWidget *
|
||||
find_toplevel_at_pointer (GdkDisplay *display)
|
||||
{
|
||||
GdkWindow *pointer_window;
|
||||
GdkSurface *pointer_window;
|
||||
GtkWidget *widget = NULL;
|
||||
|
||||
pointer_window = gdk_device_get_window_at_position (gtk_get_current_event_device (),
|
||||
NULL, NULL);
|
||||
|
||||
/* The user data field of a GdkWindow is used to store a pointer
|
||||
/* The user data field of a GdkSurface is used to store a pointer
|
||||
* to the widget that created it.
|
||||
*/
|
||||
if (pointer_window)
|
||||
{
|
||||
gpointer widget_ptr;
|
||||
gdk_window_get_user_data (pointer_window, &widget_ptr);
|
||||
gdk_surface_get_user_data (pointer_window, &widget_ptr);
|
||||
widget = widget_ptr;
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ checkerboard_draw (GtkDrawingArea *da,
|
||||
/* At the start of a draw handler, a clip region has been set on
|
||||
* the Cairo context, and the contents have been cleared to the
|
||||
* widget's background color. The docs for
|
||||
* gdk_window_begin_paint_region() give more details on how this
|
||||
* gdk_surface_begin_paint_region() give more details on how this
|
||||
* works.
|
||||
*/
|
||||
|
||||
|
@ -37,7 +37,7 @@ enum
|
||||
static Bug data[] =
|
||||
{
|
||||
{ FALSE, 60482, "Normal", "scrollable notebooks and hidden tabs" },
|
||||
{ FALSE, 60620, "Critical", "gdk_window_clear_area (gdkwindow-win32.c) is not thread-safe" },
|
||||
{ FALSE, 60620, "Critical", "gdk_surface_clear_area (gdkwindow-win32.c) is not thread-safe" },
|
||||
{ FALSE, 50214, "Major", "Xft support does not clean up correctly" },
|
||||
{ TRUE, 52877, "Major", "GtkFileSelection needs a refresh method. " },
|
||||
{ FALSE, 56070, "Normal", "Can't click button after setting in sensitive" },
|
||||
|
@ -250,7 +250,7 @@ static gchar *types[] =
|
||||
"GtkTreeSelection ",
|
||||
"GdkDisplay ",
|
||||
"GdkScreen ",
|
||||
"GdkWindow ",
|
||||
"GdkSurface ",
|
||||
"GdkEventButton ",
|
||||
"GdkCursor ",
|
||||
"GtkTreeIter ",
|
||||
|
@ -64,7 +64,7 @@ get_idle (gpointer data)
|
||||
GtkApplication *app = gtk_window_get_application (GTK_WINDOW (window));
|
||||
|
||||
gtk_widget_set_sensitive (window, TRUE);
|
||||
gdk_window_set_cursor (gtk_widget_get_window (window), NULL);
|
||||
gdk_surface_set_cursor (gtk_widget_get_window (window), NULL);
|
||||
g_application_unmark_busy (G_APPLICATION (app));
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
@ -81,7 +81,7 @@ get_busy (GSimpleAction *action,
|
||||
|
||||
g_application_mark_busy (G_APPLICATION (app));
|
||||
cursor = gdk_cursor_new_from_name ("wait", NULL);
|
||||
gdk_window_set_cursor (gtk_widget_get_window (window), cursor);
|
||||
gdk_surface_set_cursor (gtk_widget_get_window (window), cursor);
|
||||
g_object_unref (cursor);
|
||||
g_timeout_add (5000, get_idle, window);
|
||||
|
||||
|
@ -26,13 +26,13 @@ Refer to the file widget_system.txt which covers widget flags and the
|
||||
resulting invariants in a detailed way.
|
||||
|
||||
|
||||
GdkWindow pointers may be NULL in GdkEvents
|
||||
GdkSurface pointers may be NULL in GdkEvents
|
||||
-------------------------------------------
|
||||
|
||||
The notification nature of the signal mechanism might cause events to
|
||||
be emitted that have their GdkWindow pointer set to NULL.
|
||||
be emitted that have their GdkSurface pointer set to NULL.
|
||||
This is due to the fact that certain events need to be emitted after the
|
||||
real GdkWindow of a widget is not any longer pertinent.
|
||||
real GdkSurface of a widget is not any longer pertinent.
|
||||
It's up to the signal handling function (application) to check for the
|
||||
window field of the event structure to be != NULL, if it is going to
|
||||
perform any operations through Gdk calls on it.
|
||||
@ -51,10 +51,10 @@ GDK_EXPOSE GtkWidget::expose_event
|
||||
Writing Gdk functions
|
||||
---------------------
|
||||
|
||||
When writing Gdk functions that operate on GdkWindow structures in any
|
||||
meaningful sense, that is casting to a GdkWindowPrivate structure for
|
||||
access to fields other then GdkWindow.user_data, the programmer is
|
||||
recommended to check for the GdkWindowPrivate.destroyed field to be ==
|
||||
FALSE, especially if the GdkWindowPrivate.xwindow field is used.
|
||||
When writing Gdk functions that operate on GdkSurface structures in any
|
||||
meaningful sense, that is casting to a GdkSurfacePrivate structure for
|
||||
access to fields other then GdkSurface.user_data, the programmer is
|
||||
recommended to check for the GdkSurfacePrivate.destroyed field to be ==
|
||||
FALSE, especially if the GdkSurfacePrivate.xwindow field is used.
|
||||
Silent abortion of the Gdk function is the correct behaviour if this
|
||||
condition isn't met.
|
||||
|
@ -81,19 +81,19 @@ GdkAtom gdk_drag_get_selection (GdkDragContext *context);
|
||||
|
||||
/* Source side */
|
||||
|
||||
GdkDragContext * gdk_drag_begin (GdkWindow *window,
|
||||
GdkDragContext * gdk_drag_begin (GdkSurface *window,
|
||||
GList *targets,
|
||||
GdkDragAction actions);
|
||||
gboolean gdk_drag_get_protocol (guint32 xid,
|
||||
GdkDragProtocol *protocol);
|
||||
void gdk_drag_find_window (GdkDragContext *context,
|
||||
GdkWindow *drag_window,
|
||||
GdkSurface *drag_window,
|
||||
gint x_root,
|
||||
gint y_root,
|
||||
GdkWindow **dest_window,
|
||||
GdkSurface **dest_window,
|
||||
GdkDragProtocol *protocol);
|
||||
gboolean gdk_drag_motion (GdkDragContext *context,
|
||||
GdkWindow *dest_window,
|
||||
GdkSurface *dest_window,
|
||||
GdkDragProtocol protocol,
|
||||
gint x_root,
|
||||
gint y_root,
|
||||
|
@ -47,12 +47,12 @@ gdk_scroll_direction_get_type
|
||||
gdk_setting_action_get_type
|
||||
gdk_status_get_type
|
||||
gdk_visibility_state_get_type
|
||||
gdk_window_attributes_type_get_type
|
||||
gdk_window_edge_get_type
|
||||
gdk_window_hints_get_type
|
||||
gdk_window_state_get_type
|
||||
gdk_window_type_get_type
|
||||
gdk_window_type_hint_get_type
|
||||
gdk_surface_attributes_type_get_type
|
||||
gdk_surface_edge_get_type
|
||||
gdk_surface_hints_get_type
|
||||
gdk_surface_state_get_type
|
||||
gdk_surface_type_get_type
|
||||
gdk_surface_type_hint_get_type
|
||||
gdk_wm_decoration_get_type
|
||||
gdk_wm_function_get_type
|
||||
GDK_AVAILABLE_IN_4_0
|
||||
@ -169,186 +169,186 @@ gdk_rgba_get_type
|
||||
<SECTION>
|
||||
<TITLE>Windows</TITLE>
|
||||
<FILE>windows</FILE>
|
||||
GdkWindow
|
||||
GdkWindowType
|
||||
GdkWindowClass
|
||||
GdkWindowHints
|
||||
GdkSurface
|
||||
GdkSurfaceType
|
||||
GdkSurfaceClass
|
||||
GdkSurfaceHints
|
||||
GdkGeometry
|
||||
GdkGravity
|
||||
GdkAnchorHints
|
||||
GdkWindowEdge
|
||||
GdkWindowTypeHint
|
||||
GdkWindowState
|
||||
gdk_window_new_toplevel
|
||||
gdk_window_new_popup
|
||||
gdk_window_new_temp
|
||||
gdk_window_new_child
|
||||
gdk_window_destroy
|
||||
gdk_window_get_window_type
|
||||
gdk_window_get_display
|
||||
gdk_window_show
|
||||
gdk_window_show_unraised
|
||||
gdk_window_hide
|
||||
gdk_window_is_destroyed
|
||||
gdk_window_is_visible
|
||||
gdk_window_is_viewable
|
||||
gdk_window_is_input_only
|
||||
gdk_window_is_shaped
|
||||
gdk_window_get_state
|
||||
gdk_window_withdraw
|
||||
gdk_window_iconify
|
||||
gdk_window_deiconify
|
||||
gdk_window_stick
|
||||
gdk_window_unstick
|
||||
gdk_window_maximize
|
||||
gdk_window_unmaximize
|
||||
gdk_window_fullscreen
|
||||
gdk_window_fullscreen_on_monitor
|
||||
gdk_window_unfullscreen
|
||||
GdkSurfaceEdge
|
||||
GdkSurfaceTypeHint
|
||||
GdkSurfaceState
|
||||
gdk_surface_new_toplevel
|
||||
gdk_surface_new_popup
|
||||
gdk_surface_new_temp
|
||||
gdk_surface_new_child
|
||||
gdk_surface_destroy
|
||||
gdk_surface_get_window_type
|
||||
gdk_surface_get_display
|
||||
gdk_surface_show
|
||||
gdk_surface_show_unraised
|
||||
gdk_surface_hide
|
||||
gdk_surface_is_destroyed
|
||||
gdk_surface_is_visible
|
||||
gdk_surface_is_viewable
|
||||
gdk_surface_is_input_only
|
||||
gdk_surface_is_shaped
|
||||
gdk_surface_get_state
|
||||
gdk_surface_withdraw
|
||||
gdk_surface_iconify
|
||||
gdk_surface_deiconify
|
||||
gdk_surface_stick
|
||||
gdk_surface_unstick
|
||||
gdk_surface_maximize
|
||||
gdk_surface_unmaximize
|
||||
gdk_surface_fullscreen
|
||||
gdk_surface_fullscreen_on_monitor
|
||||
gdk_surface_unfullscreen
|
||||
GdkFullscreenMode
|
||||
gdk_window_get_fullscreen_mode
|
||||
gdk_window_set_fullscreen_mode
|
||||
gdk_window_set_keep_above
|
||||
gdk_window_set_keep_below
|
||||
gdk_window_set_opacity
|
||||
gdk_window_set_pass_through
|
||||
gdk_window_get_pass_through
|
||||
gdk_window_move
|
||||
gdk_window_resize
|
||||
gdk_window_move_resize
|
||||
gdk_window_scroll
|
||||
gdk_window_move_region
|
||||
gdk_window_has_native
|
||||
gdk_window_raise
|
||||
gdk_window_lower
|
||||
gdk_window_restack
|
||||
gdk_window_focus
|
||||
gdk_window_register_dnd
|
||||
gdk_window_begin_resize_drag
|
||||
gdk_window_begin_resize_drag_for_device
|
||||
gdk_window_begin_move_drag
|
||||
gdk_window_begin_move_drag_for_device
|
||||
gdk_window_show_window_menu
|
||||
gdk_window_constrain_size
|
||||
gdk_window_beep
|
||||
gdk_window_get_scale_factor
|
||||
gdk_window_set_opaque_region
|
||||
gdk_window_create_gl_context
|
||||
gdk_window_create_vulkan_context
|
||||
gdk_surface_get_fullscreen_mode
|
||||
gdk_surface_set_fullscreen_mode
|
||||
gdk_surface_set_keep_above
|
||||
gdk_surface_set_keep_below
|
||||
gdk_surface_set_opacity
|
||||
gdk_surface_set_pass_through
|
||||
gdk_surface_get_pass_through
|
||||
gdk_surface_move
|
||||
gdk_surface_resize
|
||||
gdk_surface_move_resize
|
||||
gdk_surface_scroll
|
||||
gdk_surface_move_region
|
||||
gdk_surface_has_native
|
||||
gdk_surface_raise
|
||||
gdk_surface_lower
|
||||
gdk_surface_restack
|
||||
gdk_surface_focus
|
||||
gdk_surface_register_dnd
|
||||
gdk_surface_begin_resize_drag
|
||||
gdk_surface_begin_resize_drag_for_device
|
||||
gdk_surface_begin_move_drag
|
||||
gdk_surface_begin_move_drag_for_device
|
||||
gdk_surface_show_window_menu
|
||||
gdk_surface_constrain_size
|
||||
gdk_surface_beep
|
||||
gdk_surface_get_scale_factor
|
||||
gdk_surface_set_opaque_region
|
||||
gdk_surface_create_gl_context
|
||||
gdk_surface_create_vulkan_context
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_window_get_clip_region
|
||||
gdk_window_begin_draw_frame
|
||||
gdk_window_end_draw_frame
|
||||
gdk_window_get_visible_region
|
||||
gdk_surface_get_clip_region
|
||||
gdk_surface_begin_draw_frame
|
||||
gdk_surface_end_draw_frame
|
||||
gdk_surface_get_visible_region
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_window_invalidate_rect
|
||||
gdk_window_invalidate_region
|
||||
GdkWindowChildFunc
|
||||
gdk_window_invalidate_maybe_recurse
|
||||
gdk_window_get_update_area
|
||||
gdk_window_freeze_updates
|
||||
gdk_window_thaw_updates
|
||||
gdk_window_get_frame_clock
|
||||
gdk_surface_invalidate_rect
|
||||
gdk_surface_invalidate_region
|
||||
GdkSurfaceChildFunc
|
||||
gdk_surface_invalidate_maybe_recurse
|
||||
gdk_surface_get_update_area
|
||||
gdk_surface_freeze_updates
|
||||
gdk_surface_thaw_updates
|
||||
gdk_surface_get_frame_clock
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_window_set_user_data
|
||||
gdk_window_set_accept_focus
|
||||
gdk_window_get_accept_focus
|
||||
gdk_window_set_focus_on_map
|
||||
gdk_window_get_focus_on_map
|
||||
gdk_window_shape_combine_region
|
||||
gdk_window_set_child_shapes
|
||||
gdk_window_merge_child_shapes
|
||||
gdk_window_input_shape_combine_region
|
||||
gdk_window_set_child_input_shapes
|
||||
gdk_window_merge_child_input_shapes
|
||||
gdk_window_set_title
|
||||
gdk_surface_set_user_data
|
||||
gdk_surface_set_accept_focus
|
||||
gdk_surface_get_accept_focus
|
||||
gdk_surface_set_focus_on_map
|
||||
gdk_surface_get_focus_on_map
|
||||
gdk_surface_shape_combine_region
|
||||
gdk_surface_set_child_shapes
|
||||
gdk_surface_merge_child_shapes
|
||||
gdk_surface_input_shape_combine_region
|
||||
gdk_surface_set_child_input_shapes
|
||||
gdk_surface_merge_child_input_shapes
|
||||
gdk_surface_set_title
|
||||
GDK_PARENT_RELATIVE
|
||||
gdk_window_set_cursor
|
||||
gdk_window_get_cursor
|
||||
gdk_window_get_user_data
|
||||
gdk_window_get_geometry
|
||||
gdk_window_set_geometry_hints
|
||||
gdk_window_get_width
|
||||
gdk_window_get_height
|
||||
gdk_window_set_icon_list
|
||||
gdk_window_set_modal_hint
|
||||
gdk_window_get_modal_hint
|
||||
gdk_window_set_type_hint
|
||||
gdk_window_get_type_hint
|
||||
gdk_window_set_shadow_width
|
||||
gdk_window_set_skip_taskbar_hint
|
||||
gdk_window_set_skip_pager_hint
|
||||
gdk_window_set_urgency_hint
|
||||
gdk_window_get_position
|
||||
gdk_window_get_root_origin
|
||||
gdk_window_get_frame_extents
|
||||
gdk_window_get_origin
|
||||
gdk_window_get_root_coords
|
||||
gdk_window_get_device_position
|
||||
gdk_window_get_device_position_double
|
||||
gdk_surface_set_cursor
|
||||
gdk_surface_get_cursor
|
||||
gdk_surface_get_user_data
|
||||
gdk_surface_get_geometry
|
||||
gdk_surface_set_geometry_hints
|
||||
gdk_surface_get_width
|
||||
gdk_surface_get_height
|
||||
gdk_surface_set_icon_list
|
||||
gdk_surface_set_modal_hint
|
||||
gdk_surface_get_modal_hint
|
||||
gdk_surface_set_type_hint
|
||||
gdk_surface_get_type_hint
|
||||
gdk_surface_set_shadow_width
|
||||
gdk_surface_set_skip_taskbar_hint
|
||||
gdk_surface_set_skip_pager_hint
|
||||
gdk_surface_set_urgency_hint
|
||||
gdk_surface_get_position
|
||||
gdk_surface_get_root_origin
|
||||
gdk_surface_get_frame_extents
|
||||
gdk_surface_get_origin
|
||||
gdk_surface_get_root_coords
|
||||
gdk_surface_get_device_position
|
||||
gdk_surface_get_device_position_double
|
||||
GdkModifierType
|
||||
GdkModifierIntent
|
||||
gdk_window_get_parent
|
||||
gdk_window_get_toplevel
|
||||
gdk_window_get_children
|
||||
gdk_window_get_children_with_user_data
|
||||
gdk_window_peek_children
|
||||
gdk_window_get_events
|
||||
gdk_window_set_events
|
||||
gdk_window_set_icon_name
|
||||
gdk_window_set_transient_for
|
||||
gdk_window_set_role
|
||||
gdk_window_set_startup_id
|
||||
gdk_window_set_group
|
||||
gdk_window_get_group
|
||||
gdk_window_set_decorations
|
||||
gdk_window_get_decorations
|
||||
gdk_surface_get_parent
|
||||
gdk_surface_get_toplevel
|
||||
gdk_surface_get_children
|
||||
gdk_surface_get_children_with_user_data
|
||||
gdk_surface_peek_children
|
||||
gdk_surface_get_events
|
||||
gdk_surface_set_events
|
||||
gdk_surface_set_icon_name
|
||||
gdk_surface_set_transient_for
|
||||
gdk_surface_set_role
|
||||
gdk_surface_set_startup_id
|
||||
gdk_surface_set_group
|
||||
gdk_surface_get_group
|
||||
gdk_surface_set_decorations
|
||||
gdk_surface_get_decorations
|
||||
GdkWMDecoration
|
||||
gdk_window_set_functions
|
||||
gdk_surface_set_functions
|
||||
GdkWMFunction
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_window_get_support_multidevice
|
||||
gdk_window_set_support_multidevice
|
||||
gdk_window_get_device_cursor
|
||||
gdk_window_set_device_cursor
|
||||
gdk_window_get_device_events
|
||||
gdk_window_set_device_events
|
||||
gdk_surface_get_support_multidevice
|
||||
gdk_surface_set_support_multidevice
|
||||
gdk_surface_get_device_cursor
|
||||
gdk_surface_set_device_cursor
|
||||
gdk_surface_get_device_events
|
||||
gdk_surface_set_device_events
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_window_coords_from_parent
|
||||
gdk_window_coords_to_parent
|
||||
gdk_surface_coords_from_parent
|
||||
gdk_surface_coords_to_parent
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_WINDOW
|
||||
GDK_WINDOW_GET_CLASS
|
||||
GDK_TYPE_WINDOW
|
||||
GDK_IS_WINDOW
|
||||
GDK_WINDOW_CLASS
|
||||
GDK_IS_WINDOW_CLASS
|
||||
GDK_SURFACE
|
||||
GDK_SURFACE_GET_CLASS
|
||||
GDK_TYPE_SURFACE
|
||||
GDK_IS_SURFACE
|
||||
GDK_SURFACE_CLASS
|
||||
GDK_IS_SURFACE_CLASS
|
||||
GDK_TYPE_FILTER_RETURN
|
||||
GDK_TYPE_GRAVITY
|
||||
GDK_TYPE_MODIFIER_TYPE
|
||||
GDK_TYPE_WINDOW_ATTRIBUTES_TYPE
|
||||
GDK_TYPE_WINDOW_EDGE
|
||||
GDK_TYPE_WINDOW_HINTS
|
||||
GDK_TYPE_WINDOW_TYPE
|
||||
GDK_TYPE_WINDOW_TYPE_HINT
|
||||
GDK_TYPE_SURFACE_ATTRIBUTES_TYPE
|
||||
GDK_TYPE_SURFACE_EDGE
|
||||
GDK_TYPE_SURFACE_HINTS
|
||||
GDK_TYPE_SURFACE_TYPE
|
||||
GDK_TYPE_SURFACE_TYPE_HINT
|
||||
GDK_TYPE_WM_DECORATION
|
||||
GDK_TYPE_WM_FUNCTION
|
||||
GDK_TYPE_WINDOW_STATE
|
||||
GDK_TYPE_SURFACE_STATE
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_window_get_type
|
||||
gdk_window_window_class_get_type
|
||||
GdkWindowClass
|
||||
GdkWindowImpl
|
||||
GdkWindowImplClass
|
||||
GdkWindowRedirect
|
||||
gdk_window_impl_get_type
|
||||
gdk_surface_get_type
|
||||
gdk_surface_window_class_get_type
|
||||
GdkSurfaceClass
|
||||
GdkSurfaceImpl
|
||||
GdkSurfaceImplClass
|
||||
GdkSurfaceRedirect
|
||||
gdk_surface_impl_get_type
|
||||
gdk_fullscreen_mode_get_type
|
||||
</SECTION>
|
||||
|
||||
@ -417,8 +417,8 @@ gdk_pango_layout_line_get_clip_region
|
||||
<SECTION>
|
||||
<TITLE>Cairo Interaction</TITLE>
|
||||
<FILE>cairo_interaction</FILE>
|
||||
gdk_window_create_similar_surface
|
||||
gdk_window_create_similar_image_surface
|
||||
gdk_surface_create_similar_surface
|
||||
gdk_surface_create_similar_image_surface
|
||||
gdk_cairo_get_clip_rectangle
|
||||
gdk_cairo_get_drawing_context
|
||||
gdk_cairo_set_source_rgba
|
||||
@ -828,7 +828,7 @@ gdk_drag_context_get_type
|
||||
<INCLUDE>gdk/gdkx.h</INCLUDE>
|
||||
<TITLE>X Window System Interaction</TITLE>
|
||||
<FILE>x_interaction</FILE>
|
||||
GDK_WINDOW_XID
|
||||
GDK_SURFACE_XID
|
||||
GDK_DISPLAY_XDISPLAY
|
||||
GDK_POINTER_TO_XID
|
||||
GDK_XID_TO_POINTER
|
||||
@ -864,16 +864,16 @@ gdk_x11_screen_lookup_visual
|
||||
gdk_x11_screen_supports_net_wm_hint
|
||||
gdk_x11_screen_get_number_of_desktops
|
||||
gdk_x11_screen_get_current_desktop
|
||||
gdk_x11_window_foreign_new_for_display
|
||||
gdk_x11_window_lookup_for_display
|
||||
gdk_x11_window_get_xid
|
||||
gdk_x11_window_set_theme_variant
|
||||
gdk_x11_window_set_user_time
|
||||
gdk_x11_window_move_to_current_desktop
|
||||
gdk_x11_window_move_to_desktop
|
||||
gdk_x11_window_get_desktop
|
||||
gdk_x11_window_set_utf8_property
|
||||
gdk_x11_window_set_frame_sync_enabled
|
||||
gdk_x11_surface_foreign_new_for_display
|
||||
gdk_x11_surface_lookup_for_display
|
||||
gdk_x11_surface_get_xid
|
||||
gdk_x11_surface_set_theme_variant
|
||||
gdk_x11_surface_set_user_time
|
||||
gdk_x11_surface_move_to_current_desktop
|
||||
gdk_x11_surface_move_to_desktop
|
||||
gdk_x11_surface_get_desktop
|
||||
gdk_x11_surface_set_utf8_property
|
||||
gdk_x11_surface_set_frame_sync_enabled
|
||||
gdk_x11_keymap_get_group_for_state
|
||||
gdk_x11_keymap_key_is_modifier
|
||||
gdk_x11_visual_get_xvisual
|
||||
@ -966,12 +966,12 @@ GDK_X11_VISUAL_CLASS
|
||||
GDK_IS_X11_VISUAL
|
||||
GDK_IS_X11_VISUAL_CLASS
|
||||
GDK_X11_VISUAL_GET_CLASS
|
||||
GDK_TYPE_X11_WINDOW
|
||||
GDK_X11_WINDOW
|
||||
GDK_X11_WINDOW_CLASS
|
||||
GDK_IS_X11_WINDOW
|
||||
GDK_IS_X11_WINDOW_CLASS
|
||||
GDK_X11_WINDOW_GET_CLASS
|
||||
GDK_TYPE_X11_SURFACE
|
||||
GDK_X11_SURFACE
|
||||
GDK_X11_SURFACE_CLASS
|
||||
GDK_IS_X11_SURFACE
|
||||
GDK_IS_X11_SURFACE_CLASS
|
||||
GDK_X11_SURFACE_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_x11_app_launch_context_get_type
|
||||
@ -988,8 +988,8 @@ gdk_x11_drag_context_get_type
|
||||
gdk_x11_keymap_get_type
|
||||
gdk_x11_screen_get_type
|
||||
gdk_x11_visual_get_type
|
||||
gdk_x11_window_get_type
|
||||
gdk_window_impl_x11_get_type
|
||||
gdk_x11_surface_get_type
|
||||
gdk_surface_impl_x11_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@ -1003,13 +1003,13 @@ gdk_wayland_device_get_wl_seat
|
||||
gdk_wayland_display_get_wl_compositor
|
||||
gdk_wayland_display_get_wl_display
|
||||
gdk_wayland_display_query_registry
|
||||
gdk_wayland_window_new_subsurface
|
||||
gdk_wayland_window_get_wl_surface
|
||||
gdk_wayland_window_set_use_custom_surface
|
||||
GdkWaylandWindowExported
|
||||
gdk_wayland_window_export_handle
|
||||
gdk_wayland_window_unexport_handle
|
||||
gdk_wayland_window_set_transient_for_exported
|
||||
gdk_wayland_surface_new_subsurface
|
||||
gdk_wayland_surface_get_wl_surface
|
||||
gdk_wayland_surface_set_use_custom_surface
|
||||
GdkWaylandSurfaceExported
|
||||
gdk_wayland_surface_export_handle
|
||||
gdk_wayland_surface_unexport_handle
|
||||
gdk_wayland_surface_set_transient_for_exported
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_WAYLAND_DEVICE
|
||||
@ -1030,18 +1030,18 @@ GDK_WAYLAND_DISPLAY_MANAGER_CLASS
|
||||
GDK_WAYLAND_DISPLAY_MANAGER_GET_CLASS
|
||||
GDK_IS_WAYLAND_DISPLAY_MANAGER
|
||||
GDK_IS_WAYLAND_DISPLAY_MANAGER_CLASS
|
||||
GDK_TYPE_WAYLAND_WINDOW
|
||||
GDK_WAYLAND_WINDOW
|
||||
GDK_WAYLAND_WINDOW_CLASS
|
||||
GDK_WAYLAND_WINDOW_GET_CLASS
|
||||
GDK_IS_WAYLAND_WINDOW
|
||||
GDK_IS_WAYLAND_WINDOW_CLASS
|
||||
GDK_TYPE_WAYLAND_SURFACE
|
||||
GDK_WAYLAND_SURFACE
|
||||
GDK_WAYLAND_SURFACE_CLASS
|
||||
GDK_WAYLAND_SURFACE_GET_CLASS
|
||||
GDK_IS_WAYLAND_SURFACE
|
||||
GDK_IS_WAYLAND_SURFACE_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_wayland_device_get_type
|
||||
gdk_wayland_display_get_type
|
||||
gdk_wayland_display_manager_get_type
|
||||
gdk_wayland_window_get_type
|
||||
gdk_wayland_surface_get_type
|
||||
|
||||
</SECTION>
|
||||
|
||||
|
@ -11,7 +11,7 @@ gdk_gl_context_get_type
|
||||
gdk_keymap_get_type
|
||||
gdk_monitor_get_type
|
||||
gdk_seat_get_type
|
||||
gdk_window_get_type
|
||||
gdk_surface_get_type
|
||||
gdk_content_serializer_get_type
|
||||
gdk_content_deserializer_get_type
|
||||
gdk_clipboard_get_type
|
||||
|
@ -90,7 +90,7 @@
|
||||
<link linkend="GdkEvent"><structname>GdkEvent</structname></link>
|
||||
structures and sends them on to the GTK layer. In turn, the GTK layer
|
||||
finds the widget that corresponds to a particular
|
||||
<classname>GdkWindow</classname> and emits the corresponding event
|
||||
<classname>GdkSurface</classname> and emits the corresponding event
|
||||
signals on that widget.
|
||||
</para>
|
||||
|
||||
@ -207,17 +207,17 @@
|
||||
|
||||
<para>
|
||||
Normally, there is only a single cairo context which is used in
|
||||
the entire repaint, rather than one per GdkWindow. This means you
|
||||
the entire repaint, rather than one per GdkSurface. This means you
|
||||
have to respect (and not reset) existing clip and transformations
|
||||
set on it.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Most widgets, including those that create their own GdkWindows have
|
||||
Most widgets, including those that create their own GdkSurfaces have
|
||||
a transparent background, so they draw on top of whatever widgets
|
||||
are below them. This was not the case in GTK+ 2 where the theme set
|
||||
the background of most widgets to the default background color. (In
|
||||
fact, transparent GdkWindows used to be impossible.)
|
||||
fact, transparent GdkSurfaces used to be impossible.)
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@ -263,10 +263,10 @@
|
||||
<para>
|
||||
Two basic functions in GDK form the core of the double-buffering
|
||||
mechanism: <link
|
||||
linkend="gdk_window_begin_paint_region"><function>gdk_window_begin_paint_region()</function></link>
|
||||
linkend="gdk_surface_begin_paint_region"><function>gdk_surface_begin_paint_region()</function></link>
|
||||
and <link
|
||||
linkend="gdk_window_end_paint"><function>gdk_window_end_paint()</function></link>.
|
||||
The first function tells a <classname>GdkWindow</classname> to
|
||||
linkend="gdk_surface_end_paint"><function>gdk_surface_end_paint()</function></link>.
|
||||
The first function tells a <classname>GdkSurface</classname> to
|
||||
create a temporary off-screen buffer for drawing. All
|
||||
subsequent drawing operations to this window get automatically
|
||||
redirected to that buffer. The second function actually paints
|
||||
@ -278,16 +278,16 @@
|
||||
|
||||
<para>
|
||||
It would be inconvenient for all widgets to call
|
||||
<function>gdk_window_begin_paint_region()</function> and
|
||||
<function>gdk_window_end_paint()</function> at the beginning
|
||||
<function>gdk_surface_begin_paint_region()</function> and
|
||||
<function>gdk_surface_end_paint()</function> at the beginning
|
||||
and end of their draw handlers.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To make this easier, GTK+ normally calls
|
||||
<function>gdk_window_begin_paint_region()</function>
|
||||
<function>gdk_surface_begin_paint_region()</function>
|
||||
before emitting the #GtkWidget::draw signal, and
|
||||
then it calls <function>gdk_window_end_paint()</function>
|
||||
then it calls <function>gdk_surface_end_paint()</function>
|
||||
after the signal has been emitted. This is convenient for
|
||||
most widgets, as they do not need to worry about creating
|
||||
their own temporary drawing buffers or about calling those
|
||||
@ -335,8 +335,8 @@ my_widget_init (MyWidget *widget)
|
||||
<para>
|
||||
Even if you turn off double buffering on a widget, you
|
||||
can still call
|
||||
<function>gdk_window_begin_paint_region()</function> and
|
||||
<function>gdk_window_end_paint()</function> by hand to use
|
||||
<function>gdk_surface_begin_paint_region()</function> and
|
||||
<function>gdk_surface_end_paint()</function> by hand to use
|
||||
temporary drawing buffers.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
@ -137,7 +137,7 @@
|
||||
<para>
|
||||
This is the step in a <glossterm
|
||||
linkend="widget">widget's</glossterm> life cycle where it
|
||||
actually shows the GdkWindows it created when it was
|
||||
actually shows the GdkSurfaces it created when it was
|
||||
<glossterm linkend="realization">realized</glossterm>. When a
|
||||
widget is mapped, it must turn on its
|
||||
%GTK_MAPPED <link linkend="GtkWidgetFlags">flag</link>.
|
||||
@ -146,7 +146,7 @@
|
||||
<para>
|
||||
Note that due to the asynchronous nature of the X window
|
||||
system, a widget's window may not appear on the screen
|
||||
immediatly after one calls gdk_window_show():
|
||||
immediatly after one calls gdk_surface_show():
|
||||
you must wait for the corresponding map <glossterm
|
||||
linkend="event">event</glossterm> to be received. You can do
|
||||
this with the <link
|
||||
@ -193,7 +193,7 @@
|
||||
<glossterm>no-window widget</glossterm>
|
||||
<glossdef>
|
||||
<para>
|
||||
A widget that does not have a GdkWindow of its own on which to
|
||||
A widget that does not have a GdkSurface of its own on which to
|
||||
draw its contents, but rather shares its <glossterm
|
||||
linkend="parent">parent's</glossterm>. This can be tested with
|
||||
the gtk_widget_get_has_window() function.
|
||||
@ -218,20 +218,20 @@
|
||||
<para>
|
||||
This is the step in a <glossterm
|
||||
linkend="widget">widget's</glossterm> life cycle where it
|
||||
creates its own GdkWindow, or otherwise associates itself with
|
||||
creates its own GdkSurface, or otherwise associates itself with
|
||||
its <glossterm linkend="parent">parent's</glossterm>
|
||||
GdkWindow. If the widget has its own window, then it must
|
||||
GdkSurface. If the widget has its own window, then it must
|
||||
also attach a <glossterm linkend="style">style</glossterm> to
|
||||
it. A widget becomes unrealized by destroying its associated
|
||||
GdkWindow. When a widget is realized, it must turn on its
|
||||
GdkSurface. When a widget is realized, it must turn on its
|
||||
%GTK_REALIZED <link linkend="GtkWidgetFlags">flag</link>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Widgets that don't own the GdkWindow on which they draw are
|
||||
Widgets that don't own the GdkSurface on which they draw are
|
||||
called <glossterm linkend="no-window">no-window widgets</glossterm>.
|
||||
This can be tested with the gtk_widget_get_has_window() function. Normally,
|
||||
these widgets draw on their parent's GdkWindow.
|
||||
these widgets draw on their parent's GdkSurface.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
@ -91,7 +91,7 @@
|
||||
<title>Event propagation</title>
|
||||
|
||||
<para>
|
||||
For widgets which have a #GdkWindow set, events are received from the
|
||||
For widgets which have a #GdkSurface set, events are received from the
|
||||
windowing system and passed to gtk_main_do_event(). See its documentation
|
||||
for details of what it does: compression of enter/leave events,
|
||||
identification of the widget receiving the event, pushing the event onto a
|
||||
@ -101,11 +101,11 @@
|
||||
|
||||
<para>
|
||||
When a GDK backend produces an input event, it is tied to a #GdkDevice and
|
||||
a #GdkWindow, which in turn represents a windowing system surface in the
|
||||
a #GdkSurface, which in turn represents a windowing system surface in the
|
||||
backend. If a widget has grabbed the current input device, or all input
|
||||
devices, the event is propagated to that #GtkWidget. Otherwise, it is
|
||||
propagated to the the #GtkWidget which called gtk_widget_register_window()
|
||||
on the #GdkWindow receiving the event.
|
||||
on the #GdkSurface receiving the event.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@ -113,7 +113,7 @@
|
||||
specific input device (gtk_device_grab_add()), is sent events in
|
||||
preference to a global grab (gtk_grab_add()). Input grabs only have effect
|
||||
within the #GtkWindowGroup containing the #GtkWidget which registered the
|
||||
event’s #GdkWindow. If this #GtkWidget is a child of the grab widget, the
|
||||
event’s #GdkSurface. If this #GtkWidget is a child of the grab widget, the
|
||||
event is propagated to the child — this is the basis for propagating
|
||||
events within modal dialogs.
|
||||
</para>
|
||||
@ -186,15 +186,15 @@
|
||||
Each widget instance has a basic event mask and another per input device,
|
||||
which determine the types of input event it receives. Each event mask set
|
||||
on a widget is added to the corresponding (basic or per-device) event mask
|
||||
for the widget’s #GdkWindow, and all child #GdkWindows.
|
||||
for the widget’s #GdkSurface, and all child #GdkSurfaces.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Filtering events against event masks happens inside #GdkWindow, which
|
||||
Filtering events against event masks happens inside #GdkSurface, which
|
||||
exposes event masks to the windowing system to reduce the number of events
|
||||
GDK receives from it. On receiving an event, it is filtered against the
|
||||
#GdkWindow’s mask for the input device, if set. Otherwise, it is filtered
|
||||
against the #GdkWindow’s basic event mask.
|
||||
#GdkSurface’s mask for the input device, if set. Otherwise, it is filtered
|
||||
against the #GdkSurface’s basic event mask.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
@ -79,13 +79,13 @@
|
||||
<title>Review your window creation flags</title>
|
||||
<para>
|
||||
GTK+ 4 removes the GDK_WA_CURSOR flag. Instead, just use
|
||||
gdk_window_set_cursor() to set a cursor on the window after
|
||||
gdk_surface_set_cursor() to set a cursor on the window after
|
||||
creating it.
|
||||
</para>
|
||||
<para>
|
||||
GTK+ 4 also removes the GDK_WA_VISUAL flag, and always uses
|
||||
an RGBA visual for windows. To prepare your code for this,
|
||||
use gdk_window_set_visual (gdk_screen_get_rgba_visual ()) after
|
||||
use gdk_surface_set_visual (gdk_screen_get_rgba_visual ()) after
|
||||
creating your window.
|
||||
</para>
|
||||
<para>
|
||||
@ -194,7 +194,7 @@
|
||||
<title>Stop using the root window</title>
|
||||
<para>
|
||||
The root window is an X11-centric concept that is no longer exposed in the
|
||||
backend-neutral GDK API. gdk_window_get_parent() will return %NULL for toplevel
|
||||
backend-neutral GDK API. gdk_surface_get_parent() will return %NULL for toplevel
|
||||
windows. If you need to interact with the X11 root window, you can use
|
||||
gdk_x11_display_get_xrootwindow() to get its XID.
|
||||
</para>
|
||||
@ -217,12 +217,12 @@
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Adapt to GdkWindow API changes</title>
|
||||
<title>Adapt to GdkSurface API changes</title>
|
||||
<para>
|
||||
The gdk_window_new() function has been replaced by a number of more
|
||||
specialized constructors: gdk_window_new_toplevel(), gdk_window_new_popup(),
|
||||
gdk_window_new_temp(), gdk_window_new_child(), gdk_window_new_input(),
|
||||
gdk_wayland_window_new_subsurface(). Use the appropriate ones to create
|
||||
The gdk_surface_new() function has been replaced by a number of more
|
||||
specialized constructors: gdk_surface_new_toplevel(), gdk_surface_new_popup(),
|
||||
gdk_surface_new_temp(), gdk_surface_new_child(), gdk_surface_new_input(),
|
||||
gdk_wayland_surface_new_subsurface(). Use the appropriate ones to create
|
||||
your windows.
|
||||
</para>
|
||||
<para>
|
||||
@ -230,7 +230,7 @@
|
||||
complicating the code and could not be supported across backends.
|
||||
</para>
|
||||
<para>
|
||||
gdk_window_reparent() is no longer available.
|
||||
gdk_surface_reparent() is no longer available.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@ -244,7 +244,7 @@
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Stop using gdk_window_set_event_compression</title>
|
||||
<title>Stop using gdk_surface_set_event_compression</title>
|
||||
<para>
|
||||
Event compression is now always enabled. If you need to see the uncoalesced
|
||||
motion history, use gdk_event_get_motion_history().
|
||||
@ -367,7 +367,7 @@
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Stop using APIs to query GdkWindows</title>
|
||||
<title>Stop using APIs to query GdkSurfaces</title>
|
||||
<para>
|
||||
A number of APIs for querying special-purpose windows have been removed,
|
||||
since these windows are no longer publically available:
|
||||
|
@ -391,14 +391,14 @@ This comes up when using bitfields; in C you can write the following
|
||||
code:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
gdk_window_set_events (gdk_window,
|
||||
gdk_surface_set_events (gdk_surface,
|
||||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
while in C++ you must write:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
gdk_window_set_events (gdk_window,
|
||||
gdk_surface_set_events (gdk_surface,
|
||||
(GdkEventMask) GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
@ -211,20 +211,20 @@ static GList *toplevels;
|
||||
static guint shot_id;
|
||||
|
||||
static gboolean
|
||||
window_is_csd (GdkWindow *window)
|
||||
window_is_csd (GdkSurface *window)
|
||||
{
|
||||
gboolean set;
|
||||
GdkWMDecoration decorations = 0;
|
||||
|
||||
/* FIXME: is this accurate? */
|
||||
set = gdk_window_get_decorations (window, &decorations);
|
||||
set = gdk_surface_get_decorations (window, &decorations);
|
||||
return (set && (decorations == 0));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
shoot_one (WidgetInfo *info)
|
||||
{
|
||||
GdkWindow *window;
|
||||
GdkSurface *window;
|
||||
XID id;
|
||||
GdkPixbuf *screenshot = NULL;
|
||||
DecorationType decor = DECOR_FRAME;
|
||||
@ -236,7 +236,7 @@ shoot_one (WidgetInfo *info)
|
||||
}
|
||||
|
||||
window = gtk_widget_get_window (info->window);
|
||||
id = gdk_x11_window_get_xid (window);
|
||||
id = gdk_x11_surface_get_xid (window);
|
||||
if (window_is_csd (window))
|
||||
decor = (info->include_decorations) ? DECOR_NONE : DECOR_WINDOW_FRAME;
|
||||
screenshot = take_window_shot (id, decor);
|
||||
|
@ -62,23 +62,23 @@ GtkWidget, public flags:
|
||||
GTK_TOPLEVEL:
|
||||
Widgets without a real parent, as there are GtkWindows and
|
||||
GtkMenus have this flag set throughout their lifetime.
|
||||
Toplevel widgets always contain their own GdkWindow.
|
||||
Toplevel widgets always contain their own GdkSurface.
|
||||
|
||||
GTK_NO_WINDOW:
|
||||
This flag is indicative for a widget that does not provide
|
||||
its own GdkWindow. Visible action (e.g. drawing) is performed
|
||||
on the parent's GdkWindow.
|
||||
its own GdkSurface. Visible action (e.g. drawing) is performed
|
||||
on the parent's GdkSurface.
|
||||
|
||||
GTK_REALIZED:
|
||||
Set by gtk_widget_realize, unset by gtk_widget_unrealize.
|
||||
Relies on ((widget->parent && widget->parent->window)
|
||||
|| GTK_WIDGET_TOPLEVEL (widget));
|
||||
Means: widget has an associated GdkWindow (XWindow).
|
||||
Means: widget has an associated GdkSurface (XWindow).
|
||||
|
||||
GTK_MAPPED:
|
||||
Set by gtk_widget_map, unset by gtk_widget_unmap.
|
||||
May only be set if GTK_WIDGET_REALIZED (widget).
|
||||
Means: gdk_window_show() has been called on the widgets window(s).
|
||||
Means: gdk_surface_show() has been called on the widgets window(s).
|
||||
|
||||
GTK_VISIBLE:
|
||||
Set by gtk_widget_show.
|
||||
@ -382,7 +382,7 @@ The Map signal
|
||||
--------------
|
||||
|
||||
1) Set the MAPPED flag
|
||||
2) If the widget has any windows, gdk_window_show those windows
|
||||
2) If the widget has any windows, gdk_surface_show those windows
|
||||
3) call gtk_widget_map for all child widgets that are
|
||||
VISIBLE, CHILD_VISIBLE and !MAPPED. (A widget will only
|
||||
be !CHILD_VISIBLE if the container set it that way, so
|
||||
@ -395,7 +395,7 @@ The Unmap signal
|
||||
|
||||
When a widget receives the unmap signal, it must:
|
||||
|
||||
1) If the widget has a window, gdk_window_hide that window,
|
||||
1) If the widget has a window, gdk_surface_hide that window,
|
||||
2) If the widget does not have a window, unmap all child widgets
|
||||
3) Do any other functions related to taking the widget offscreen
|
||||
(for instance, removing popup windows...)
|
||||
@ -409,8 +409,8 @@ When a widget receives the unrealize signal, it must
|
||||
|
||||
1) For any windows other than widget->window do:
|
||||
|
||||
gdk_window_set_user_data (window, NULL);
|
||||
gdk_window_destroy (window);
|
||||
gdk_surface_set_user_data (window, NULL);
|
||||
gdk_surface_destroy (window);
|
||||
|
||||
2) Call the parent's unrealize handler
|
||||
|
||||
|
@ -32,7 +32,7 @@ size_allocate_cb (GtkWidget *widget,
|
||||
|
||||
if (gtk_widget_get_window (widget))
|
||||
{
|
||||
surface = gdk_window_create_similar_surface (gtk_widget_get_window (widget),
|
||||
surface = gdk_surface_create_similar_surface (gtk_widget_get_window (widget),
|
||||
CAIRO_CONTENT_COLOR,
|
||||
gtk_widget_get_width (widget),
|
||||
gtk_widget_get_height (widget));
|
||||
|
@ -22,33 +22,33 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_BROADWAY_WINDOW_H__
|
||||
#define __GDK_BROADWAY_WINDOW_H__
|
||||
#ifndef __GDK_BROADWAY_SURFACE_H__
|
||||
#define __GDK_BROADWAY_SURFACE_H__
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GDK_TYPE_BROADWAY_WINDOW (gdk_broadway_window_get_type ())
|
||||
#define GDK_BROADWAY_WINDOW(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_BROADWAY_WINDOW, GdkBroadwayWindow))
|
||||
#define GDK_BROADWAY_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_BROADWAY_WINDOW, GdkBroadwayWindowClass))
|
||||
#define GDK_IS_BROADWAY_WINDOW(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_BROADWAY_WINDOW))
|
||||
#define GDK_IS_BROADWAY_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_BROADWAY_WINDOW))
|
||||
#define GDK_BROADWAY_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_BROADWAY_WINDOW, GdkBroadwayWindowClass))
|
||||
#define GDK_TYPE_BROADWAY_SURFACE (gdk_broadway_surface_get_type ())
|
||||
#define GDK_BROADWAY_SURFACE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_BROADWAY_SURFACE, GdkBroadwaySurface))
|
||||
#define GDK_BROADWAY_SURFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_BROADWAY_SURFACE, GdkBroadwaySurfaceClass))
|
||||
#define GDK_IS_BROADWAY_SURFACE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_BROADWAY_SURFACE))
|
||||
#define GDK_IS_BROADWAY_SURFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_BROADWAY_SURFACE))
|
||||
#define GDK_BROADWAY_SURFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_BROADWAY_SURFACE, GdkBroadwaySurfaceClass))
|
||||
|
||||
#ifdef GDK_COMPILATION
|
||||
typedef struct _GdkBroadwayWindow GdkBroadwayWindow;
|
||||
typedef struct _GdkBroadwaySurface GdkBroadwaySurface;
|
||||
#else
|
||||
typedef GdkWindow GdkBroadwayWindow;
|
||||
typedef GdkSurface GdkBroadwaySurface;
|
||||
#endif
|
||||
typedef struct _GdkBroadwayWindowClass GdkBroadwayWindowClass;
|
||||
typedef struct _GdkBroadwaySurfaceClass GdkBroadwaySurfaceClass;
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gdk_broadway_window_get_type (void);
|
||||
GType gdk_broadway_surface_get_type (void);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
guint32 gdk_broadway_get_last_seen_time (GdkWindow *window);
|
||||
guint32 gdk_broadway_get_last_seen_time (GdkSurface *window);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_BROADWAY_WINDOW_H__ */
|
||||
#endif /* __GDK_BROADWAY_SURFACE_H__ */
|
||||
|
@ -24,45 +24,45 @@
|
||||
#include "gdkprivate-broadway.h"
|
||||
|
||||
static gboolean gdk_broadway_device_get_history (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
guint32 start,
|
||||
guint32 stop,
|
||||
GdkTimeCoord ***events,
|
||||
gint *n_events);
|
||||
static void gdk_broadway_device_get_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gdouble *axes,
|
||||
GdkModifierType *mask);
|
||||
static void gdk_broadway_device_set_window_cursor (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkCursor *cursor);
|
||||
static void gdk_broadway_device_warp (GdkDevice *device,
|
||||
gdouble x,
|
||||
gdouble y);
|
||||
static void gdk_broadway_device_query_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkWindow **child_window,
|
||||
GdkSurface *window,
|
||||
GdkSurface **child_window,
|
||||
gdouble *root_x,
|
||||
gdouble *root_y,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
GdkModifierType *mask);
|
||||
static GdkGrabStatus gdk_broadway_device_grab (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gboolean owner_events,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindow *confine_to,
|
||||
GdkSurface *confine_to,
|
||||
GdkCursor *cursor,
|
||||
guint32 time_);
|
||||
static void gdk_broadway_device_ungrab (GdkDevice *device,
|
||||
guint32 time_);
|
||||
static GdkWindow * gdk_broadway_device_window_at_position (GdkDevice *device,
|
||||
static GdkSurface * gdk_broadway_device_window_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,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkEventMask event_mask);
|
||||
|
||||
|
||||
@ -97,7 +97,7 @@ gdk_broadway_device_init (GdkBroadwayDevice *device_core)
|
||||
|
||||
static gboolean
|
||||
gdk_broadway_device_get_history (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
guint32 start,
|
||||
guint32 stop,
|
||||
GdkTimeCoord ***events,
|
||||
@ -108,13 +108,13 @@ gdk_broadway_device_get_history (GdkDevice *device,
|
||||
|
||||
static void
|
||||
gdk_broadway_device_get_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gdouble *axes,
|
||||
GdkModifierType *mask)
|
||||
{
|
||||
gdouble x, y;
|
||||
|
||||
gdk_window_get_device_position_double (window, device, &x, &y, mask);
|
||||
gdk_surface_get_device_position_double (window, device, &x, &y, mask);
|
||||
|
||||
if (axes)
|
||||
{
|
||||
@ -125,7 +125,7 @@ gdk_broadway_device_get_state (GdkDevice *device,
|
||||
|
||||
static void
|
||||
gdk_broadway_device_set_window_cursor (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkCursor *cursor)
|
||||
{
|
||||
}
|
||||
@ -139,8 +139,8 @@ gdk_broadway_device_warp (GdkDevice *device,
|
||||
|
||||
static void
|
||||
gdk_broadway_device_query_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkWindow **child_window,
|
||||
GdkSurface *window,
|
||||
GdkSurface **child_window,
|
||||
gdouble *root_x,
|
||||
gdouble *root_y,
|
||||
gdouble *win_x,
|
||||
@ -177,7 +177,7 @@ gdk_broadway_device_query_state (GdkDevice *device,
|
||||
*mask = mask32;
|
||||
if (child_window)
|
||||
{
|
||||
GdkWindow *mouse_toplevel;
|
||||
GdkSurface *mouse_toplevel;
|
||||
|
||||
mouse_toplevel = g_hash_table_lookup (broadway_display->id_ht, GUINT_TO_POINTER (mouse_toplevel_id));
|
||||
if (window == NULL)
|
||||
@ -190,10 +190,10 @@ gdk_broadway_device_query_state (GdkDevice *device,
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_window_grab_check_unmap (GdkWindow *window,
|
||||
_gdk_broadway_surface_grab_check_unmap (GdkSurface *window,
|
||||
gulong serial)
|
||||
{
|
||||
GdkDisplay *display = gdk_window_get_display (window);
|
||||
GdkDisplay *display = gdk_surface_get_display (window);
|
||||
GdkSeat *seat;
|
||||
GList *devices, *d;
|
||||
|
||||
@ -212,9 +212,9 @@ _gdk_broadway_window_grab_check_unmap (GdkWindow *window,
|
||||
|
||||
|
||||
void
|
||||
_gdk_broadway_window_grab_check_destroy (GdkWindow *window)
|
||||
_gdk_broadway_surface_grab_check_destroy (GdkSurface *window)
|
||||
{
|
||||
GdkDisplay *display = gdk_window_get_display (window);
|
||||
GdkDisplay *display = gdk_surface_get_display (window);
|
||||
GdkSeat *seat;
|
||||
GdkDeviceGrabInfo *grab;
|
||||
GList *devices, *d;
|
||||
@ -244,10 +244,10 @@ _gdk_broadway_window_grab_check_destroy (GdkWindow *window)
|
||||
|
||||
static GdkGrabStatus
|
||||
gdk_broadway_device_grab (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gboolean owner_events,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindow *confine_to,
|
||||
GdkSurface *confine_to,
|
||||
GdkCursor *cursor,
|
||||
guint32 time_)
|
||||
{
|
||||
@ -266,7 +266,7 @@ gdk_broadway_device_grab (GdkDevice *device,
|
||||
{
|
||||
/* Device is a pointer */
|
||||
return _gdk_broadway_server_grab_pointer (broadway_display->server,
|
||||
GDK_WINDOW_IMPL_BROADWAY (window->impl)->id,
|
||||
GDK_SURFACE_IMPL_BROADWAY (window->impl)->id,
|
||||
owner_events,
|
||||
event_mask,
|
||||
time_);
|
||||
@ -311,14 +311,14 @@ gdk_broadway_device_ungrab (GdkDevice *device,
|
||||
}
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
static GdkSurface *
|
||||
gdk_broadway_device_window_at_position (GdkDevice *device,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
GdkModifierType *mask,
|
||||
gboolean get_toplevel)
|
||||
{
|
||||
GdkWindow *window;
|
||||
GdkSurface *window;
|
||||
|
||||
gdk_broadway_device_query_state (device, NULL, &window, NULL, NULL, win_x, win_y, mask);
|
||||
|
||||
@ -327,7 +327,7 @@ gdk_broadway_device_window_at_position (GdkDevice *device,
|
||||
|
||||
static void
|
||||
gdk_broadway_device_select_window_events (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkEventMask event_mask)
|
||||
{
|
||||
}
|
||||
|
@ -181,10 +181,10 @@ _gdk_broadway_display_size_changed (GdkDisplay *display,
|
||||
toplevels = broadway_display->toplevels;
|
||||
for (l = toplevels; l != NULL; l = l->next)
|
||||
{
|
||||
GdkWindowImplBroadway *toplevel_impl = l->data;
|
||||
GdkSurfaceImplBroadway *toplevel_impl = l->data;
|
||||
|
||||
if (toplevel_impl->maximized)
|
||||
gdk_window_move_resize (toplevel_impl->wrapper, 0, 0, msg->width, msg->height);
|
||||
gdk_surface_move_resize (toplevel_impl->wrapper, 0, 0, msg->width, msg->height);
|
||||
}
|
||||
}
|
||||
|
||||
@ -313,7 +313,7 @@ gdk_broadway_display_has_pending (GdkDisplay *display)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
static GdkSurface *
|
||||
gdk_broadway_display_get_default_group (GdkDisplay *display)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
||||
@ -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_WINDOW;
|
||||
display_class->window_type = GDK_TYPE_BROADWAY_SURFACE;
|
||||
|
||||
display_class->get_name = gdk_broadway_display_get_name;
|
||||
display_class->beep = gdk_broadway_display_beep;
|
||||
|
@ -84,7 +84,7 @@ gdk_broadway_drag_context_finalize (GObject *object)
|
||||
/* Drag Contexts */
|
||||
|
||||
GdkDragContext *
|
||||
_gdk_broadway_window_drag_begin (GdkWindow *window,
|
||||
_gdk_broadway_surface_drag_begin (GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
GdkContentProvider *content,
|
||||
GdkDragAction actions,
|
||||
@ -94,10 +94,10 @@ _gdk_broadway_window_drag_begin (GdkWindow *window,
|
||||
GdkDragContext *new_context;
|
||||
|
||||
g_return_val_if_fail (window != NULL, NULL);
|
||||
g_return_val_if_fail (GDK_WINDOW_IS_BROADWAY (window), NULL);
|
||||
g_return_val_if_fail (GDK_SURFACE_IS_BROADWAY (window), NULL);
|
||||
|
||||
new_context = g_object_new (GDK_TYPE_BROADWAY_DRAG_CONTEXT,
|
||||
"display", gdk_window_get_display (window),
|
||||
"display", gdk_surface_get_display (window),
|
||||
"content", content,
|
||||
NULL);
|
||||
|
||||
@ -145,7 +145,7 @@ gdk_broadway_drag_context_drop_finish (GdkDragContext *context,
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_window_register_dnd (GdkWindow *window)
|
||||
_gdk_broadway_surface_register_dnd (GdkSurface *window)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
|
||||
GdkDisplay *display;
|
||||
GdkBroadwayDisplay *display_broadway;
|
||||
GdkSeat *seat;
|
||||
GdkWindow *window;
|
||||
GdkSurface *window;
|
||||
GdkEvent *event = NULL;
|
||||
GList *node;
|
||||
GSList *list, *d;
|
||||
|
@ -42,30 +42,30 @@ void _gdk_broadway_resync_windows (void);
|
||||
guint32 gdk_broadway_display_ensure_texture (GdkDisplay *display,
|
||||
GdkTexture *texture);
|
||||
|
||||
void gdk_broadway_window_set_nodes (GdkWindow *window,
|
||||
void gdk_broadway_surface_set_nodes (GdkSurface *window,
|
||||
GArray *nodes,
|
||||
GPtrArray *node_textures);
|
||||
|
||||
void _gdk_broadway_window_register_dnd (GdkWindow *window);
|
||||
GdkDragContext * _gdk_broadway_window_drag_begin (GdkWindow *window,
|
||||
void _gdk_broadway_surface_register_dnd (GdkSurface *window);
|
||||
GdkDragContext * _gdk_broadway_surface_drag_begin (GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
GdkContentProvider *content,
|
||||
GdkDragAction actions,
|
||||
gint dx,
|
||||
gint dy);
|
||||
void _gdk_broadway_window_translate (GdkWindow *window,
|
||||
void _gdk_broadway_surface_translate (GdkSurface *window,
|
||||
cairo_region_t *area,
|
||||
gint dx,
|
||||
gint dy);
|
||||
gboolean _gdk_broadway_moveresize_handle_event (GdkDisplay *display,
|
||||
BroadwayInputMsg *msg);
|
||||
gboolean _gdk_broadway_moveresize_configure_done (GdkDisplay *display,
|
||||
GdkWindow *window);
|
||||
void _gdk_broadway_roundtrip_notify (GdkWindow *window,
|
||||
GdkSurface *window);
|
||||
void _gdk_broadway_roundtrip_notify (GdkSurface *window,
|
||||
guint32 tag,
|
||||
gboolean local_reply);
|
||||
void _gdk_broadway_window_grab_check_destroy (GdkWindow *window);
|
||||
void _gdk_broadway_window_grab_check_unmap (GdkWindow *window,
|
||||
void _gdk_broadway_surface_grab_check_destroy (GdkSurface *window);
|
||||
void _gdk_broadway_surface_grab_check_unmap (GdkSurface *window,
|
||||
gulong serial);
|
||||
|
||||
void _gdk_keymap_keys_changed (GdkDisplay *display);
|
||||
@ -100,10 +100,10 @@ void _gdk_broadway_display_get_maximal_cursor_size (GdkDisplay *display,
|
||||
guint *width,
|
||||
guint *height);
|
||||
void _gdk_broadway_display_create_window_impl (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
GdkWindow *real_parent,
|
||||
GdkSurface *window,
|
||||
GdkSurface *real_parent,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindowAttr *attributes);
|
||||
GdkSurfaceAttr *attributes);
|
||||
gint _gdk_broadway_display_text_property_to_utf8_list (GdkDisplay *display,
|
||||
GdkAtom encoding,
|
||||
gint format,
|
||||
@ -120,11 +120,11 @@ BroadwayInputMsg * _gdk_broadway_display_block_for_input (GdkDisplay *display,
|
||||
gboolean remove);
|
||||
|
||||
/* Window methods - testing */
|
||||
void _gdk_broadway_window_resize_surface (GdkWindow *window);
|
||||
void _gdk_broadway_surface_resize_surface (GdkSurface *window);
|
||||
|
||||
void _gdk_broadway_cursor_update_theme (GdkCursor *cursor);
|
||||
void _gdk_broadway_cursor_display_finalize (GdkDisplay *display);
|
||||
|
||||
#define GDK_WINDOW_IS_BROADWAY(win) (GDK_IS_WINDOW_IMPL_BROADWAY (((GdkWindow *)win)->impl))
|
||||
#define GDK_SURFACE_IS_BROADWAY(win) (GDK_IS_SURFACE_IMPL_BROADWAY (((GdkSurface *)win)->impl))
|
||||
|
||||
#endif /* __GDK_PRIVATE_BROADWAY_H__ */
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -22,31 +22,31 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_WINDOW_BROADWAY_H__
|
||||
#define __GDK_WINDOW_BROADWAY_H__
|
||||
#ifndef __GDK_SURFACE_BROADWAY_H__
|
||||
#define __GDK_SURFACE_BROADWAY_H__
|
||||
|
||||
#include <gdk/gdkwindowimpl.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GdkWindowImplBroadway GdkWindowImplBroadway;
|
||||
typedef struct _GdkWindowImplBroadwayClass GdkWindowImplBroadwayClass;
|
||||
typedef struct _GdkSurfaceImplBroadway GdkSurfaceImplBroadway;
|
||||
typedef struct _GdkSurfaceImplBroadwayClass GdkSurfaceImplBroadwayClass;
|
||||
|
||||
/* Window implementation for Broadway
|
||||
*/
|
||||
|
||||
#define GDK_TYPE_WINDOW_IMPL_BROADWAY (gdk_window_impl_broadway_get_type ())
|
||||
#define GDK_WINDOW_IMPL_BROADWAY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WINDOW_IMPL_BROADWAY, GdkWindowImplBroadway))
|
||||
#define GDK_WINDOW_IMPL_BROADWAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WINDOW_IMPL_BROADWAY, GdkWindowImplBroadwayClass))
|
||||
#define GDK_IS_WINDOW_IMPL_BROADWAY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW_IMPL_BROADWAY))
|
||||
#define GDK_IS_WINDOW_IMPL_BROADWAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WINDOW_IMPL_BROADWAY))
|
||||
#define GDK_WINDOW_IMPL_BROADWAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WINDOW_IMPL_BROADWAY, GdkWindowImplBroadwayClass))
|
||||
#define GDK_TYPE_SURFACE_IMPL_BROADWAY (gdk_surface_impl_broadway_get_type ())
|
||||
#define GDK_SURFACE_IMPL_BROADWAY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_SURFACE_IMPL_BROADWAY, GdkSurfaceImplBroadway))
|
||||
#define GDK_SURFACE_IMPL_BROADWAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_SURFACE_IMPL_BROADWAY, GdkSurfaceImplBroadwayClass))
|
||||
#define GDK_IS_SURFACE_IMPL_BROADWAY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_SURFACE_IMPL_BROADWAY))
|
||||
#define GDK_IS_SURFACE_IMPL_BROADWAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_SURFACE_IMPL_BROADWAY))
|
||||
#define GDK_SURFACE_IMPL_BROADWAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_SURFACE_IMPL_BROADWAY, GdkSurfaceImplBroadwayClass))
|
||||
|
||||
struct _GdkWindowImplBroadway
|
||||
struct _GdkSurfaceImplBroadway
|
||||
{
|
||||
GdkWindowImpl parent_instance;
|
||||
GdkSurfaceImpl parent_instance;
|
||||
|
||||
GdkWindow *wrapper;
|
||||
GdkSurface *wrapper;
|
||||
|
||||
GdkCursor *cursor;
|
||||
|
||||
@ -66,19 +66,19 @@ struct _GdkWindowImplBroadway
|
||||
gboolean last_synced;
|
||||
|
||||
GdkGeometry geometry_hints;
|
||||
GdkWindowHints geometry_hints_mask;
|
||||
GdkSurfaceHints geometry_hints_mask;
|
||||
|
||||
GArray *node_data;
|
||||
GPtrArray *node_data_textures;
|
||||
};
|
||||
|
||||
struct _GdkWindowImplBroadwayClass
|
||||
struct _GdkSurfaceImplBroadwayClass
|
||||
{
|
||||
GdkWindowImplClass parent_class;
|
||||
GdkSurfaceImplClass parent_class;
|
||||
};
|
||||
|
||||
GType gdk_window_impl_broadway_get_type (void);
|
||||
GType gdk_surface_impl_broadway_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_WINDOW_BROADWAY_H__ */
|
||||
#endif /* __GDK_SURFACE_BROADWAY_H__ */
|
||||
|
@ -36,7 +36,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkKeymap, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkMonitor, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkSeat, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkVulkanContext, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkWindow, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkSurface, g_object_unref)
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkContentFormats, gdk_content_formats_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkEvent, gdk_event_free)
|
||||
|
@ -10,17 +10,17 @@ GdkDisplay * gdk_display_open_default (void);
|
||||
|
||||
gboolean gdk_device_grab_info (GdkDisplay *display,
|
||||
GdkDevice *device,
|
||||
GdkWindow **grab_window,
|
||||
GdkSurface **grab_window,
|
||||
gboolean *owner_events);
|
||||
|
||||
void gdk_pre_parse (void);
|
||||
|
||||
void gdk_window_freeze_toplevel_updates (GdkWindow *window);
|
||||
void gdk_window_thaw_toplevel_updates (GdkWindow *window);
|
||||
void gdk_surface_freeze_toplevel_updates (GdkSurface *window);
|
||||
void gdk_surface_thaw_toplevel_updates (GdkSurface *window);
|
||||
|
||||
gboolean gdk_window_supports_edge_constraints (GdkWindow *window);
|
||||
gboolean gdk_surface_supports_edge_constraints (GdkSurface *window);
|
||||
|
||||
void gdk_window_move_to_rect (GdkWindow *window,
|
||||
void gdk_surface_move_to_rect (GdkSurface *window,
|
||||
const GdkRectangle *rect,
|
||||
GdkGravity rect_anchor,
|
||||
GdkGravity window_anchor,
|
||||
|
@ -33,9 +33,9 @@
|
||||
* can be used with GDK. GTK+ does all of its drawing using cairo.
|
||||
*
|
||||
* GDK does not wrap the cairo API, instead it allows to create cairo
|
||||
* contexts which can be used to draw on #GdkWindows. Additional
|
||||
* contexts which can be used to draw on #GdkSurfaces. Additional
|
||||
* functions allow use #GdkRectangles with cairo and to use #GdkRGBAs,
|
||||
* #GdkPixbufs and #GdkWindows as sources for drawing operations.
|
||||
* #GdkPixbufs and #GdkSurfaces as sources for drawing operations.
|
||||
*/
|
||||
|
||||
|
||||
@ -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,
|
||||
GdkWindow *for_window)
|
||||
GdkSurface *for_window)
|
||||
{
|
||||
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_WINDOW (for_window), NULL);
|
||||
g_return_val_if_fail (for_window == NULL || GDK_IS_SURFACE (for_window), 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_window_create_similar_image_surface (for_window,
|
||||
gdk_surface_create_similar_image_surface (for_window,
|
||||
format,
|
||||
gdk_pixbuf_get_width (pixbuf),
|
||||
gdk_pixbuf_get_height (pixbuf),
|
||||
|
@ -58,10 +58,10 @@ cairo_region_t *
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
cairo_surface_t * gdk_cairo_surface_create_from_pixbuf (const GdkPixbuf *pixbuf,
|
||||
int scale,
|
||||
GdkWindow *for_window);
|
||||
GdkSurface *for_window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_cairo_draw_from_gl (cairo_t *cr,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
int source,
|
||||
int source_type,
|
||||
int buffer_scale,
|
||||
|
@ -48,7 +48,7 @@
|
||||
*
|
||||
* Cursors by themselves are not very interesting, they must be
|
||||
* bound to a window for users to see them. This is done with
|
||||
* gdk_window_set_cursor() or gdk_window_set_device_cursor().
|
||||
* gdk_surface_set_cursor() or gdk_surface_set_device_cursor().
|
||||
* Applications will typically use higher-level GTK+ functions such
|
||||
* as gtk_widget_set_cursor() instead.
|
||||
*
|
||||
@ -69,7 +69,7 @@
|
||||
* gdk_display_get_maximal_cursor_size() for the limitations that might apply.
|
||||
*
|
||||
* To ease work with unsupported cursors, a fallback cursor can be provided.
|
||||
* If a #GdkWindow cannot use a cursor because of the reasons mentioned above,
|
||||
* If a #GdkSurface cannot use a cursor because of the reasons mentioned above,
|
||||
* it will try the fallback cursor. Of course, fallback cursors can themselves
|
||||
* have fallback cursors again, so it is possible to provide a chain of
|
||||
* progressively easier to support cursors. If none of the provided cursors
|
||||
|
@ -502,7 +502,7 @@ gdk_device_get_property (GObject *object,
|
||||
/**
|
||||
* gdk_device_get_state: (skip)
|
||||
* @device: a #GdkDevice.
|
||||
* @window: a #GdkWindow.
|
||||
* @window: a #GdkSurface.
|
||||
* @axes: (nullable) (array): an array of doubles to store the values of
|
||||
* the axes of @device in, or %NULL.
|
||||
* @mask: (optional) (out): location to store the modifiers, or %NULL.
|
||||
@ -514,13 +514,13 @@ gdk_device_get_property (GObject *object,
|
||||
*/
|
||||
void
|
||||
gdk_device_get_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gdouble *axes,
|
||||
GdkModifierType *mask)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_DEVICE (device));
|
||||
g_return_if_fail (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD);
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
g_return_if_fail (GDK_IS_SURFACE (window));
|
||||
g_return_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_SLAVE ||
|
||||
gdk_display_device_is_grabbed (gdk_device_get_display (device), device));
|
||||
|
||||
@ -609,16 +609,16 @@ gdk_device_get_position (GdkDevice *device,
|
||||
* function may not be called on devices of type %GDK_DEVICE_TYPE_SLAVE,
|
||||
* unless there is an ongoing grab on them, see gdk_device_grab().
|
||||
*
|
||||
* Returns: (nullable) (transfer none): the #GdkWindow under the
|
||||
* Returns: (nullable) (transfer none): the #GdkSurface under the
|
||||
* device position, or %NULL.
|
||||
**/
|
||||
GdkWindow *
|
||||
GdkSurface *
|
||||
gdk_device_get_window_at_position_double (GdkDevice *device,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y)
|
||||
{
|
||||
gdouble tmp_x, tmp_y;
|
||||
GdkWindow *window;
|
||||
GdkSurface *window;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
|
||||
g_return_val_if_fail (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD, NULL);
|
||||
@ -630,7 +630,7 @@ gdk_device_get_window_at_position_double (GdkDevice *device,
|
||||
/* This might need corrections, as the native window returned
|
||||
may contain client side children */
|
||||
if (window)
|
||||
window = _gdk_window_find_descendant_at (window,
|
||||
window = _gdk_surface_find_descendant_at (window,
|
||||
tmp_x, tmp_y,
|
||||
&tmp_x, &tmp_y);
|
||||
|
||||
@ -657,16 +657,16 @@ gdk_device_get_window_at_position_double (GdkDevice *device,
|
||||
* function may not be called on devices of type %GDK_DEVICE_TYPE_SLAVE,
|
||||
* unless there is an ongoing grab on them, see gdk_device_grab().
|
||||
*
|
||||
* Returns: (nullable) (transfer none): the #GdkWindow under the
|
||||
* Returns: (nullable) (transfer none): the #GdkSurface under the
|
||||
* device position, or %NULL.
|
||||
**/
|
||||
GdkWindow *
|
||||
GdkSurface *
|
||||
gdk_device_get_window_at_position (GdkDevice *device,
|
||||
gint *win_x,
|
||||
gint *win_y)
|
||||
{
|
||||
gdouble tmp_x, tmp_y;
|
||||
GdkWindow *window;
|
||||
GdkSurface *window;
|
||||
|
||||
window =
|
||||
gdk_device_get_window_at_position_double (device, &tmp_x, &tmp_y);
|
||||
@ -698,7 +698,7 @@ gdk_device_get_window_at_position (GdkDevice *device,
|
||||
* be returned. (This is not distinguishable from the case where
|
||||
* motion history is supported and no events were found.)
|
||||
*
|
||||
* Note that there is also gdk_window_set_event_compression() to get
|
||||
* Note that there is also gdk_surface_set_event_compression() to get
|
||||
* more motion events delivered directly, independent of the windowing
|
||||
* system.
|
||||
*
|
||||
@ -707,7 +707,7 @@ gdk_device_get_window_at_position (GdkDevice *device,
|
||||
**/
|
||||
gboolean
|
||||
gdk_device_get_history (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
guint32 start,
|
||||
guint32 stop,
|
||||
GdkTimeCoord ***events,
|
||||
@ -715,7 +715,7 @@ gdk_device_get_history (GdkDevice *device,
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DEVICE (device), FALSE);
|
||||
g_return_val_if_fail (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD, FALSE);
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
|
||||
g_return_val_if_fail (GDK_IS_SURFACE (window), FALSE);
|
||||
|
||||
if (n_events)
|
||||
*n_events = 0;
|
||||
@ -723,7 +723,7 @@ gdk_device_get_history (GdkDevice *device,
|
||||
if (events)
|
||||
*events = NULL;
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
if (GDK_SURFACE_DESTROYED (window))
|
||||
return FALSE;
|
||||
|
||||
if (!GDK_DEVICE_GET_CLASS (device)->get_history)
|
||||
@ -1311,7 +1311,7 @@ get_native_grab_event_mask (GdkEventMask grab_mask)
|
||||
* or gdk_event_get_device() if the grab is in reaction to an event. Also, you can use
|
||||
* gdk_seat_get_pointer() but only in code that isn’t triggered by a
|
||||
* #GdkEvent and there aren’t other means to get a meaningful #GdkDevice to operate on.
|
||||
* @window: the #GdkWindow which will own the grab (the grab window)
|
||||
* @window: the #GdkSurface which will own the grab (the grab window)
|
||||
* @grab_ownership: specifies the grab ownership.
|
||||
* @owner_events: if %FALSE then all device events are reported with respect to
|
||||
* @window and are only reported if selected by @event_mask. If
|
||||
@ -1357,7 +1357,7 @@ get_native_grab_event_mask (GdkEventMask grab_mask)
|
||||
**/
|
||||
GdkGrabStatus
|
||||
gdk_device_grab (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkGrabOwnership grab_ownership,
|
||||
gboolean owner_events,
|
||||
GdkEventMask event_mask,
|
||||
@ -1365,15 +1365,15 @@ gdk_device_grab (GdkDevice *device,
|
||||
guint32 time_)
|
||||
{
|
||||
GdkGrabStatus res;
|
||||
GdkWindow *native;
|
||||
GdkSurface *native;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_DEVICE (device), GDK_GRAB_FAILED);
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), GDK_GRAB_FAILED);
|
||||
g_return_val_if_fail (gdk_window_get_display (window) == gdk_device_get_display (device), GDK_GRAB_FAILED);
|
||||
g_return_val_if_fail (GDK_IS_SURFACE (window), GDK_GRAB_FAILED);
|
||||
g_return_val_if_fail (gdk_surface_get_display (window) == gdk_device_get_display (device), GDK_GRAB_FAILED);
|
||||
|
||||
native = gdk_window_get_toplevel (window);
|
||||
native = gdk_surface_get_toplevel (window);
|
||||
|
||||
if (native == NULL || GDK_WINDOW_DESTROYED (native))
|
||||
if (native == NULL || GDK_SURFACE_DESTROYED (native))
|
||||
return GDK_GRAB_NOT_VIEWABLE;
|
||||
|
||||
res = GDK_DEVICE_GET_CLASS (device)->grab (device,
|
||||
@ -1389,7 +1389,7 @@ gdk_device_grab (GdkDevice *device,
|
||||
GdkDisplay *display;
|
||||
gulong serial;
|
||||
|
||||
display = gdk_window_get_display (window);
|
||||
display = gdk_surface_get_display (window);
|
||||
serial = _gdk_display_get_next_serial (display);
|
||||
|
||||
_gdk_display_add_device_grab (display,
|
||||
@ -1567,7 +1567,7 @@ find_axis_info (GArray *array,
|
||||
|
||||
gboolean
|
||||
_gdk_device_translate_window_coord (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
guint index_,
|
||||
gdouble value,
|
||||
gdouble *axis_value)
|
||||
@ -1608,8 +1608,8 @@ _gdk_device_translate_window_coord (GdkDevice *device,
|
||||
x_min = axis_info_x->min_value;
|
||||
y_min = axis_info_y->min_value;
|
||||
|
||||
window_width = gdk_window_get_width (window);
|
||||
window_height = gdk_window_get_height (window);
|
||||
window_width = gdk_surface_get_width (window);
|
||||
window_height = gdk_surface_get_height (window);
|
||||
|
||||
x_resolution = axis_info_x->resolution;
|
||||
y_resolution = axis_info_y->resolution;
|
||||
@ -1665,7 +1665,7 @@ _gdk_device_translate_window_coord (GdkDevice *device,
|
||||
|
||||
gboolean
|
||||
_gdk_device_translate_screen_coord (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gdouble window_root_x,
|
||||
gdouble window_root_y,
|
||||
gdouble screen_width,
|
||||
@ -1746,8 +1746,8 @@ _gdk_device_translate_axis (GdkDevice *device,
|
||||
|
||||
void
|
||||
_gdk_device_query_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkWindow **child_window,
|
||||
GdkSurface *window,
|
||||
GdkSurface **child_window,
|
||||
gdouble *root_x,
|
||||
gdouble *root_y,
|
||||
gdouble *win_x,
|
||||
@ -1764,7 +1764,7 @@ _gdk_device_query_state (GdkDevice *device,
|
||||
mask);
|
||||
}
|
||||
|
||||
GdkWindow *
|
||||
GdkSurface *
|
||||
_gdk_device_window_at_position (GdkDevice *device,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
@ -1790,11 +1790,11 @@ _gdk_device_window_at_position (GdkDevice *device,
|
||||
*
|
||||
* Returns: (transfer none) (allow-none): the last window the device
|
||||
*/
|
||||
GdkWindow *
|
||||
GdkSurface *
|
||||
gdk_device_get_last_event_window (GdkDevice *device)
|
||||
{
|
||||
GdkDisplay *display;
|
||||
GdkPointerWindowInfo *info;
|
||||
GdkPointerSurfaceInfo *info;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
|
||||
g_return_val_if_fail (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD, NULL);
|
||||
|
@ -163,7 +163,7 @@ void gdk_device_set_axis_use (GdkDevice *device,
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_device_get_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gdouble *axes,
|
||||
GdkModifierType *mask);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
@ -171,7 +171,7 @@ void gdk_device_get_position (GdkDevice *device,
|
||||
gint *x,
|
||||
gint *y);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow *
|
||||
GdkSurface *
|
||||
gdk_device_get_window_at_position
|
||||
(GdkDevice *device,
|
||||
gint *win_x,
|
||||
@ -181,14 +181,14 @@ void gdk_device_get_position_double (GdkDevice *device,
|
||||
gdouble *x,
|
||||
gdouble *y);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow *
|
||||
GdkSurface *
|
||||
gdk_device_get_window_at_position_double
|
||||
(GdkDevice *device,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_device_get_history (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
guint32 start,
|
||||
guint32 stop,
|
||||
GdkTimeCoord ***events,
|
||||
@ -225,7 +225,7 @@ GdkDeviceType gdk_device_get_device_type (GdkDevice *device);
|
||||
|
||||
GDK_DEPRECATED_FOR(gdk_seat_grab)
|
||||
GdkGrabStatus gdk_device_grab (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkGrabOwnership grab_ownership,
|
||||
gboolean owner_events,
|
||||
GdkEventMask event_mask,
|
||||
@ -242,7 +242,7 @@ void gdk_device_warp (GdkDevice *device,
|
||||
gint y);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow *gdk_device_get_last_event_window (GdkDevice *device);
|
||||
GdkSurface *gdk_device_get_last_event_window (GdkDevice *device);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const gchar *gdk_device_get_vendor_id (GdkDevice *device);
|
||||
|
@ -71,49 +71,49 @@ struct _GdkDeviceClass
|
||||
GObjectClass parent_class;
|
||||
|
||||
gboolean (* get_history) (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
guint32 start,
|
||||
guint32 stop,
|
||||
GdkTimeCoord ***events,
|
||||
gint *n_events);
|
||||
|
||||
void (* get_state) (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gdouble *axes,
|
||||
GdkModifierType *mask);
|
||||
|
||||
void (* set_window_cursor) (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkCursor *cursor);
|
||||
|
||||
void (* warp) (GdkDevice *device,
|
||||
gdouble x,
|
||||
gdouble y);
|
||||
void (* query_state) (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkWindow **child_window,
|
||||
GdkSurface *window,
|
||||
GdkSurface **child_window,
|
||||
gdouble *root_x,
|
||||
gdouble *root_y,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
GdkModifierType *mask);
|
||||
GdkGrabStatus (* grab) (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gboolean owner_events,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindow *confine_to,
|
||||
GdkSurface *confine_to,
|
||||
GdkCursor *cursor,
|
||||
guint32 time_);
|
||||
void (*ungrab) (GdkDevice *device,
|
||||
guint32 time_);
|
||||
|
||||
GdkWindow * (* window_at_position) (GdkDevice *device,
|
||||
GdkSurface * (* window_at_position) (GdkDevice *device,
|
||||
double *win_x,
|
||||
double *win_y,
|
||||
GdkModifierType *mask,
|
||||
gboolean get_toplevel);
|
||||
void (* select_window_events) (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkEventMask event_mask);
|
||||
};
|
||||
|
||||
@ -139,13 +139,13 @@ void _gdk_device_set_keys (GdkDevice *device,
|
||||
guint num_keys);
|
||||
|
||||
gboolean _gdk_device_translate_window_coord (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
guint index,
|
||||
gdouble value,
|
||||
gdouble *axis_value);
|
||||
|
||||
gboolean _gdk_device_translate_screen_coord (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gdouble window_root_x,
|
||||
gdouble window_root_y,
|
||||
gdouble screen_width,
|
||||
@ -167,14 +167,14 @@ void _gdk_device_add_slave (GdkDevice *device,
|
||||
void _gdk_device_remove_slave (GdkDevice *device,
|
||||
GdkDevice *slave);
|
||||
void _gdk_device_query_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkWindow **child_window,
|
||||
GdkSurface *window,
|
||||
GdkSurface **child_window,
|
||||
gdouble *root_x,
|
||||
gdouble *root_y,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
GdkModifierType *mask);
|
||||
GdkWindow * _gdk_device_window_at_position (GdkDevice *device,
|
||||
GdkSurface * _gdk_device_window_at_position (GdkDevice *device,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
GdkModifierType *mask,
|
||||
|
@ -171,7 +171,7 @@ gdk_display_class_init (GdkDisplayClass *class)
|
||||
object_class->get_property = gdk_display_get_property;
|
||||
|
||||
class->get_app_launch_context = gdk_display_real_get_app_launch_context;
|
||||
class->window_type = GDK_TYPE_WINDOW;
|
||||
class->window_type = GDK_TYPE_SURFACE;
|
||||
|
||||
class->opened = gdk_display_real_opened;
|
||||
class->make_default = gdk_display_real_make_default;
|
||||
@ -326,10 +326,10 @@ gdk_display_class_init (GdkDisplayClass *class)
|
||||
}
|
||||
|
||||
static void
|
||||
free_pointer_info (GdkPointerWindowInfo *info)
|
||||
free_pointer_info (GdkPointerSurfaceInfo *info)
|
||||
{
|
||||
g_clear_object (&info->window_under_pointer);
|
||||
g_slice_free (GdkPointerWindowInfo, info);
|
||||
g_slice_free (GdkPointerSurfaceInfo, info);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -516,14 +516,14 @@ gdk_display_put_event (GdkDisplay *display,
|
||||
|
||||
static void
|
||||
generate_grab_broken_event (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
gboolean implicit,
|
||||
GdkWindow *grab_window)
|
||||
GdkSurface *grab_window)
|
||||
{
|
||||
g_return_if_fail (window != NULL);
|
||||
|
||||
if (!GDK_WINDOW_DESTROYED (window))
|
||||
if (!GDK_SURFACE_DESTROYED (window))
|
||||
{
|
||||
GdkEvent *event;
|
||||
|
||||
@ -559,8 +559,8 @@ _gdk_display_get_last_device_grab (GdkDisplay *display,
|
||||
GdkDeviceGrabInfo *
|
||||
_gdk_display_add_device_grab (GdkDisplay *display,
|
||||
GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkWindow *native_window,
|
||||
GdkSurface *window,
|
||||
GdkSurface *native_window,
|
||||
GdkGrabOwnership grab_ownership,
|
||||
gboolean owner_events,
|
||||
GdkEventMask event_mask,
|
||||
@ -619,23 +619,23 @@ _gdk_display_add_device_grab (GdkDisplay *display,
|
||||
return info;
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
static GdkSurface *
|
||||
get_current_toplevel (GdkDisplay *display,
|
||||
GdkDevice *device,
|
||||
int *x_out,
|
||||
int *y_out,
|
||||
GdkModifierType *state_out)
|
||||
{
|
||||
GdkWindow *pointer_window;
|
||||
GdkSurface *pointer_window;
|
||||
gdouble x, y;
|
||||
GdkModifierType state;
|
||||
|
||||
pointer_window = _gdk_device_window_at_position (device, &x, &y, &state, TRUE);
|
||||
|
||||
if (pointer_window != NULL &&
|
||||
(GDK_WINDOW_DESTROYED (pointer_window) ||
|
||||
GDK_WINDOW_TYPE (pointer_window) == GDK_WINDOW_ROOT ||
|
||||
GDK_WINDOW_TYPE (pointer_window) == GDK_WINDOW_FOREIGN))
|
||||
(GDK_SURFACE_DESTROYED (pointer_window) ||
|
||||
GDK_SURFACE_TYPE (pointer_window) == GDK_SURFACE_ROOT ||
|
||||
GDK_SURFACE_TYPE (pointer_window) == GDK_SURFACE_FOREIGN))
|
||||
pointer_window = NULL;
|
||||
|
||||
*x_out = round (x);
|
||||
@ -654,8 +654,8 @@ switch_to_pointer_grab (GdkDisplay *display,
|
||||
guint32 time,
|
||||
gulong serial)
|
||||
{
|
||||
GdkWindow *new_toplevel;
|
||||
GdkPointerWindowInfo *info;
|
||||
GdkSurface *new_toplevel;
|
||||
GdkPointerSurfaceInfo *info;
|
||||
GList *old_grabs;
|
||||
GdkModifierType state;
|
||||
int x = 0, y = 0;
|
||||
@ -768,7 +768,7 @@ _gdk_display_device_grab_update (GdkDisplay *display,
|
||||
|
||||
if ((next_grab == NULL && current_grab->implicit_ungrab) ||
|
||||
(next_grab != NULL && current_grab->window != next_grab->window))
|
||||
generate_grab_broken_event (display, GDK_WINDOW (current_grab->window),
|
||||
generate_grab_broken_event (display, GDK_SURFACE (current_grab->window),
|
||||
device,
|
||||
current_grab->implicit,
|
||||
next_grab? next_grab->window : NULL);
|
||||
@ -837,7 +837,7 @@ gboolean
|
||||
_gdk_display_end_device_grab (GdkDisplay *display,
|
||||
GdkDevice *device,
|
||||
gulong serial,
|
||||
GdkWindow *if_child,
|
||||
GdkSurface *if_child,
|
||||
gboolean implicit)
|
||||
{
|
||||
GdkDeviceGrabInfo *grab;
|
||||
@ -851,7 +851,7 @@ _gdk_display_end_device_grab (GdkDisplay *display,
|
||||
grab = l->data;
|
||||
if (grab &&
|
||||
(if_child == NULL ||
|
||||
_gdk_window_event_parent_of (if_child, grab->window)))
|
||||
_gdk_surface_event_parent_of (if_child, grab->window)))
|
||||
{
|
||||
grab->serial_end = serial;
|
||||
grab->implicit_ungrab = implicit;
|
||||
@ -916,11 +916,11 @@ _gdk_display_check_grab_ownership (GdkDisplay *display,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GdkPointerWindowInfo *
|
||||
GdkPointerSurfaceInfo *
|
||||
_gdk_display_get_pointer_info (GdkDisplay *display,
|
||||
GdkDevice *device)
|
||||
{
|
||||
GdkPointerWindowInfo *info;
|
||||
GdkPointerSurfaceInfo *info;
|
||||
|
||||
if (device && gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
|
||||
device = gdk_device_get_associated_device (device);
|
||||
@ -932,7 +932,7 @@ _gdk_display_get_pointer_info (GdkDisplay *display,
|
||||
|
||||
if (G_UNLIKELY (!info))
|
||||
{
|
||||
info = g_slice_new0 (GdkPointerWindowInfo);
|
||||
info = g_slice_new0 (GdkPointerSurfaceInfo);
|
||||
g_hash_table_insert (display->pointers_info, device, info);
|
||||
}
|
||||
|
||||
@ -951,7 +951,7 @@ _gdk_display_pointer_info_foreach (GdkDisplay *display,
|
||||
|
||||
while (g_hash_table_iter_next (&iter, &key, &value))
|
||||
{
|
||||
GdkPointerWindowInfo *info = value;
|
||||
GdkPointerSurfaceInfo *info = value;
|
||||
GdkDevice *device = key;
|
||||
|
||||
(func) (display, device, info, user_data);
|
||||
@ -975,7 +975,7 @@ _gdk_display_pointer_info_foreach (GdkDisplay *display,
|
||||
gboolean
|
||||
gdk_device_grab_info (GdkDisplay *display,
|
||||
GdkDevice *device,
|
||||
GdkWindow **grab_window,
|
||||
GdkSurface **grab_window,
|
||||
gboolean *owner_events)
|
||||
{
|
||||
GdkDeviceGrabInfo *info;
|
||||
@ -1105,12 +1105,12 @@ gdk_display_flush (GdkDisplay *display)
|
||||
*
|
||||
* Returns the default group leader window for all toplevel windows
|
||||
* on @display. This window is implicitly created by GDK.
|
||||
* See gdk_window_set_group().
|
||||
* See gdk_surface_set_group().
|
||||
*
|
||||
* Returns: (transfer none): The default group leader window
|
||||
* for @display
|
||||
**/
|
||||
GdkWindow *
|
||||
GdkSurface *
|
||||
gdk_display_get_default_group (GdkDisplay *display)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
||||
@ -1162,7 +1162,7 @@ gdk_display_get_primary_clipboard (GdkDisplay *display)
|
||||
* gdk_display_supports_shapes:
|
||||
* @display: a #GdkDisplay
|
||||
*
|
||||
* Returns %TRUE if gdk_window_shape_combine_mask() can
|
||||
* Returns %TRUE if gdk_surface_shape_combine_mask() can
|
||||
* be used to create shaped windows on @display.
|
||||
*
|
||||
* Returns: %TRUE if shaped windows are supported
|
||||
@ -1179,7 +1179,7 @@ gdk_display_supports_shapes (GdkDisplay *display)
|
||||
* gdk_display_supports_input_shapes:
|
||||
* @display: a #GdkDisplay
|
||||
*
|
||||
* Returns %TRUE if gdk_window_input_shape_combine_mask() can
|
||||
* Returns %TRUE if gdk_surface_input_shape_combine_mask() can
|
||||
* be used to modify the input shape of windows on @display.
|
||||
*
|
||||
* Returns: %TRUE if windows with modified input shape are supported
|
||||
@ -1315,10 +1315,10 @@ _gdk_display_event_data_free (GdkDisplay *display,
|
||||
|
||||
void
|
||||
_gdk_display_create_window_impl (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
GdkWindow *real_parent,
|
||||
GdkSurface *window,
|
||||
GdkSurface *real_parent,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindowAttr *attributes)
|
||||
GdkSurfaceAttr *attributes)
|
||||
{
|
||||
GDK_DISPLAY_GET_CLASS (display)->create_window_impl (display,
|
||||
window,
|
||||
@ -1327,7 +1327,7 @@ _gdk_display_create_window_impl (GdkDisplay *display,
|
||||
attributes);
|
||||
}
|
||||
|
||||
GdkWindow *
|
||||
GdkSurface *
|
||||
_gdk_display_create_window (GdkDisplay *display)
|
||||
{
|
||||
return g_object_new (GDK_DISPLAY_GET_CLASS (display)->window_type,
|
||||
@ -1433,7 +1433,7 @@ gdk_display_set_composited (GdkDisplay *display,
|
||||
* to check if that is the case.
|
||||
*
|
||||
* For setting an overall opacity for a top-level window, see
|
||||
* gdk_window_set_opacity().
|
||||
* gdk_surface_set_opacity().
|
||||
*
|
||||
* On modern displays, this value is always %TRUE.
|
||||
*
|
||||
@ -1675,7 +1675,7 @@ gdk_display_get_monitor_at_point (GdkDisplay *display,
|
||||
/**
|
||||
* gdk_display_get_monitor_at_window:
|
||||
* @display: a #GdkDisplay
|
||||
* @window: a #GdkWindow
|
||||
* @window: a #GdkSurface
|
||||
*
|
||||
* Gets the monitor in which the largest area of @window
|
||||
* resides, or a monitor close to @window if it is outside
|
||||
@ -1685,7 +1685,7 @@ gdk_display_get_monitor_at_point (GdkDisplay *display,
|
||||
*/
|
||||
GdkMonitor *
|
||||
gdk_display_get_monitor_at_window (GdkDisplay *display,
|
||||
GdkWindow *window)
|
||||
GdkSurface *window)
|
||||
{
|
||||
GdkRectangle win;
|
||||
int n_monitors, i;
|
||||
@ -1704,8 +1704,8 @@ gdk_display_get_monitor_at_window (GdkDisplay *display,
|
||||
return best;
|
||||
}
|
||||
|
||||
gdk_window_get_geometry (window, &win.x, &win.y, &win.width, &win.height);
|
||||
gdk_window_get_origin (window, &win.x, &win.y);
|
||||
gdk_surface_get_geometry (window, &win.x, &win.y, &win.width, &win.height);
|
||||
gdk_surface_get_origin (window, &win.x, &win.y);
|
||||
|
||||
n_monitors = gdk_display_get_n_monitors (display);
|
||||
for (i = 0; i < n_monitors; i++)
|
||||
|
@ -80,7 +80,7 @@ GDK_AVAILABLE_IN_ALL
|
||||
GdkDisplay *gdk_display_get_default (void);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow *gdk_display_get_default_group (GdkDisplay *display);
|
||||
GdkSurface *gdk_display_get_default_group (GdkDisplay *display);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkClipboard * gdk_display_get_clipboard (GdkDisplay *display);
|
||||
@ -117,7 +117,7 @@ GdkMonitor * gdk_display_get_monitor_at_point (GdkDisplay *display,
|
||||
int y);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkMonitor * gdk_display_get_monitor_at_window (GdkDisplay *display,
|
||||
GdkWindow *window);
|
||||
GdkSurface *window);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkKeymap * gdk_display_get_keymap (GdkDisplay *display);
|
||||
|
@ -40,8 +40,8 @@ typedef struct _GdkDisplayClass GdkDisplayClass;
|
||||
/* Tracks information about the device grab on this display */
|
||||
typedef struct
|
||||
{
|
||||
GdkWindow *window;
|
||||
GdkWindow *native_window;
|
||||
GdkSurface *window;
|
||||
GdkSurface *native_window;
|
||||
gulong serial_start;
|
||||
gulong serial_end; /* exclusive, i.e. not active on serial_end */
|
||||
guint event_mask;
|
||||
@ -63,12 +63,12 @@ typedef struct
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
GdkWindow *window_under_pointer; /* window that last got a normal enter event */
|
||||
GdkSurface *window_under_pointer; /* window that last got a normal enter event */
|
||||
gdouble toplevel_x, toplevel_y;
|
||||
guint32 state;
|
||||
guint32 button;
|
||||
GdkDevice *last_slave;
|
||||
} GdkPointerWindowInfo;
|
||||
} GdkPointerSurfaceInfo;
|
||||
|
||||
struct _GdkDisplay
|
||||
{
|
||||
@ -86,7 +86,7 @@ struct _GdkDisplay
|
||||
GdkClipboard *clipboard;
|
||||
GdkClipboard *primary_clipboard;
|
||||
|
||||
GHashTable *pointers_info; /* GdkPointerWindowInfo for each device */
|
||||
GHashTable *pointers_info; /* GdkPointerSurfaceInfo for each device */
|
||||
guint32 last_event_time; /* Last reported event time from server */
|
||||
|
||||
guint double_click_time; /* Maximum time between clicks in msecs */
|
||||
@ -125,7 +125,7 @@ struct _GdkDisplayClass
|
||||
gboolean (*has_pending) (GdkDisplay *display);
|
||||
void (*queue_events) (GdkDisplay *display);
|
||||
void (*make_default) (GdkDisplay *display);
|
||||
GdkWindow * (*get_default_group) (GdkDisplay *display);
|
||||
GdkSurface * (*get_default_group) (GdkDisplay *display);
|
||||
gboolean (*supports_shapes) (GdkDisplay *display);
|
||||
gboolean (*supports_input_shapes) (GdkDisplay *display);
|
||||
|
||||
@ -141,10 +141,10 @@ struct _GdkDisplayClass
|
||||
void (*event_data_free) (GdkDisplay *display,
|
||||
GdkEvent *event);
|
||||
void (*create_window_impl) (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
GdkWindow *real_parent,
|
||||
GdkSurface *window,
|
||||
GdkSurface *real_parent,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindowAttr *attributes);
|
||||
GdkSurfaceAttr *attributes);
|
||||
|
||||
GdkKeymap * (*get_keymap) (GdkDisplay *display);
|
||||
|
||||
@ -167,7 +167,7 @@ struct _GdkDisplayClass
|
||||
int index);
|
||||
GdkMonitor * (*get_primary_monitor) (GdkDisplay *display);
|
||||
GdkMonitor * (*get_monitor_at_window) (GdkDisplay *display,
|
||||
GdkWindow *window);
|
||||
GdkSurface *window);
|
||||
gboolean (*get_setting) (GdkDisplay *display,
|
||||
const char *name,
|
||||
GValue *value);
|
||||
@ -185,7 +185,7 @@ struct _GdkDisplayClass
|
||||
|
||||
typedef void (* GdkDisplayPointerInfoForeach) (GdkDisplay *display,
|
||||
GdkDevice *device,
|
||||
GdkPointerWindowInfo *device_info,
|
||||
GdkPointerSurfaceInfo *device_info,
|
||||
gpointer user_data);
|
||||
|
||||
void _gdk_display_update_last_event (GdkDisplay *display,
|
||||
@ -198,8 +198,8 @@ GdkDeviceGrabInfo * _gdk_display_get_last_device_grab (GdkDisplay *display,
|
||||
GdkDevice *device);
|
||||
GdkDeviceGrabInfo * _gdk_display_add_device_grab (GdkDisplay *display,
|
||||
GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkWindow *native_window,
|
||||
GdkSurface *window,
|
||||
GdkSurface *native_window,
|
||||
GdkGrabOwnership grab_ownership,
|
||||
gboolean owner_events,
|
||||
GdkEventMask event_mask,
|
||||
@ -212,12 +212,12 @@ GdkDeviceGrabInfo * _gdk_display_has_device_grab (GdkDisplay *display
|
||||
gboolean _gdk_display_end_device_grab (GdkDisplay *display,
|
||||
GdkDevice *device,
|
||||
gulong serial,
|
||||
GdkWindow *if_child,
|
||||
GdkSurface *if_child,
|
||||
gboolean implicit);
|
||||
gboolean _gdk_display_check_grab_ownership (GdkDisplay *display,
|
||||
GdkDevice *device,
|
||||
gulong serial);
|
||||
GdkPointerWindowInfo * _gdk_display_get_pointer_info (GdkDisplay *display,
|
||||
GdkPointerSurfaceInfo * _gdk_display_get_pointer_info (GdkDisplay *display,
|
||||
GdkDevice *device);
|
||||
void _gdk_display_pointer_info_foreach (GdkDisplay *display,
|
||||
GdkDisplayPointerInfoForeach func,
|
||||
@ -231,11 +231,11 @@ void _gdk_display_event_data_copy (GdkDisplay *display
|
||||
void _gdk_display_event_data_free (GdkDisplay *display,
|
||||
GdkEvent *event);
|
||||
void _gdk_display_create_window_impl (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
GdkWindow *real_parent,
|
||||
GdkSurface *window,
|
||||
GdkSurface *real_parent,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindowAttr *attributes);
|
||||
GdkWindow * _gdk_display_create_window (GdkDisplay *display);
|
||||
GdkSurfaceAttr *attributes);
|
||||
GdkSurface * _gdk_display_create_window (GdkDisplay *display);
|
||||
|
||||
gboolean gdk_display_make_gl_context_current (GdkDisplay *display,
|
||||
GdkGLContext *context);
|
||||
|
12
gdk/gdkdnd.c
12
gdk/gdkdnd.c
@ -174,11 +174,11 @@ gdk_drag_context_get_selected_action (GdkDragContext *context)
|
||||
* gdk_drag_context_get_source_window:
|
||||
* @context: a #GdkDragContext
|
||||
*
|
||||
* Returns the #GdkWindow where the DND operation started.
|
||||
* Returns the #GdkSurface where the DND operation started.
|
||||
*
|
||||
* Returns: (transfer none): a #GdkWindow
|
||||
* Returns: (transfer none): a #GdkSurface
|
||||
**/
|
||||
GdkWindow *
|
||||
GdkSurface *
|
||||
gdk_drag_context_get_source_window (GdkDragContext *context)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), NULL);
|
||||
@ -192,9 +192,9 @@ gdk_drag_context_get_source_window (GdkDragContext *context)
|
||||
*
|
||||
* Returns the destination window for the DND operation.
|
||||
*
|
||||
* Returns: (transfer none): a #GdkWindow
|
||||
* Returns: (transfer none): a #GdkSurface
|
||||
**/
|
||||
GdkWindow *
|
||||
GdkSurface *
|
||||
gdk_drag_context_get_dest_window (GdkDragContext *context)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), NULL);
|
||||
@ -794,7 +794,7 @@ gdk_drop_read_finish (GdkDragContext *context,
|
||||
*
|
||||
* Returns: (nullable) (transfer none): the drag window, or %NULL
|
||||
*/
|
||||
GdkWindow *
|
||||
GdkSurface *
|
||||
gdk_drag_context_get_drag_window (GdkDragContext *context)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), NULL);
|
||||
|
@ -98,9 +98,9 @@ GDK_AVAILABLE_IN_ALL
|
||||
GdkDragAction gdk_drag_context_get_selected_action (GdkDragContext *context);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow *gdk_drag_context_get_source_window (GdkDragContext *context);
|
||||
GdkSurface *gdk_drag_context_get_source_window (GdkDragContext *context);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow *gdk_drag_context_get_dest_window (GdkDragContext *context);
|
||||
GdkSurface *gdk_drag_context_get_dest_window (GdkDragContext *context);
|
||||
|
||||
/* Destination side */
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
@ -132,7 +132,7 @@ GInputStream * gdk_drop_read_finish (GdkDragContext *
|
||||
/* Source side */
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkDragContext * gdk_drag_begin (GdkWindow *window,
|
||||
GdkDragContext * gdk_drag_begin (GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
GdkContentProvider *content,
|
||||
GdkDragAction actions,
|
||||
@ -147,7 +147,7 @@ void gdk_drag_drop_done (GdkDragContext *context,
|
||||
gboolean success);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow *gdk_drag_context_get_drag_window (GdkDragContext *context);
|
||||
GdkSurface *gdk_drag_context_get_drag_window (GdkDragContext *context);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_drag_context_set_hotspot (GdkDragContext *context,
|
||||
|
@ -57,7 +57,7 @@ struct _GdkDragContextClass {
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
gboolean (*drop_status) (GdkDragContext *context);
|
||||
GdkWindow* (*get_drag_window) (GdkDragContext *context);
|
||||
GdkSurface* (*get_drag_window) (GdkDragContext *context);
|
||||
void (*set_hotspot) (GdkDragContext *context,
|
||||
gint hot_x,
|
||||
gint hot_y);
|
||||
@ -87,9 +87,9 @@ struct _GdkDragContext {
|
||||
GdkDisplay *display;
|
||||
|
||||
gboolean is_source;
|
||||
GdkWindow *source_window;
|
||||
GdkWindow *dest_window;
|
||||
GdkWindow *drag_window;
|
||||
GdkSurface *source_window;
|
||||
GdkSurface *dest_window;
|
||||
GdkSurface *drag_window;
|
||||
|
||||
GdkContentProvider *content;
|
||||
GdkContentFormats *formats;
|
||||
|
@ -49,7 +49,7 @@
|
||||
typedef struct _GdkDrawContextPrivate GdkDrawContextPrivate;
|
||||
|
||||
struct _GdkDrawContextPrivate {
|
||||
GdkWindow *window;
|
||||
GdkSurface *window;
|
||||
|
||||
guint is_drawing : 1;
|
||||
};
|
||||
@ -148,13 +148,13 @@ gdk_draw_context_class_init (GdkDrawContextClass *klass)
|
||||
/**
|
||||
* GdkDrawContext:window:
|
||||
*
|
||||
* The #GdkWindow the gl context is bound to.
|
||||
* The #GdkSurface the gl context is bound to.
|
||||
*/
|
||||
pspecs[PROP_WINDOW] =
|
||||
g_param_spec_object ("window",
|
||||
P_("Window"),
|
||||
P_("The GDK window bound to the context"),
|
||||
GDK_TYPE_WINDOW,
|
||||
GDK_TYPE_SURFACE,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
@ -257,18 +257,18 @@ gdk_draw_context_get_display (GdkDrawContext *context)
|
||||
|
||||
g_return_val_if_fail (GDK_IS_DRAW_CONTEXT (context), NULL);
|
||||
|
||||
return priv->window ? gdk_window_get_display (priv->window) : NULL;
|
||||
return priv->window ? gdk_surface_get_display (priv->window) : NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_draw_context_get_window:
|
||||
* @context: a #GdkDrawContext
|
||||
*
|
||||
* Retrieves the #GdkWindow used by the @context.
|
||||
* Retrieves the #GdkSurface used by the @context.
|
||||
*
|
||||
* Returns: (nullable) (transfer none): a #GdkWindow or %NULL
|
||||
* Returns: (nullable) (transfer none): a #GdkSurface or %NULL
|
||||
*/
|
||||
GdkWindow *
|
||||
GdkSurface *
|
||||
gdk_draw_context_get_window (GdkDrawContext *context)
|
||||
{
|
||||
GdkDrawContextPrivate *priv = gdk_draw_context_get_instance_private (context);
|
||||
|
@ -40,7 +40,7 @@ GType gdk_draw_context_get_type (void) G_GNUC_CONST;
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkDisplay * gdk_draw_context_get_display (GdkDrawContext *context);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow * gdk_draw_context_get_window (GdkDrawContext *context);
|
||||
GdkSurface * gdk_draw_context_get_window (GdkDrawContext *context);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@ -21,13 +21,13 @@
|
||||
* @Short_description: Drawing context for GDK windows
|
||||
*
|
||||
* #GdkDrawingContext is an object that represents the current drawing
|
||||
* state of a #GdkWindow.
|
||||
* state of a #GdkSurface.
|
||||
*
|
||||
* It's possible to use a #GdkDrawingContext to draw on a #GdkWindow
|
||||
* It's possible to use a #GdkDrawingContext to draw on a #GdkSurface
|
||||
* via rendering API like Cairo or OpenGL.
|
||||
*
|
||||
* A #GdkDrawingContext can only be created by calling gdk_window_begin_draw_frame()
|
||||
* and will be valid until a call to gdk_window_end_draw_frame().
|
||||
* A #GdkDrawingContext can only be created by calling gdk_surface_begin_draw_frame()
|
||||
* and will be valid until a call to gdk_surface_end_draw_frame().
|
||||
*
|
||||
* #GdkDrawingContext is available since GDK 3.22
|
||||
*/
|
||||
@ -56,7 +56,7 @@
|
||||
typedef struct _GdkDrawingContextPrivate GdkDrawingContextPrivate;
|
||||
|
||||
struct _GdkDrawingContextPrivate {
|
||||
GdkWindow *window;
|
||||
GdkSurface *window;
|
||||
GdkDrawContext *paint_context;
|
||||
|
||||
cairo_region_t *clip;
|
||||
@ -114,7 +114,7 @@ gdk_drawing_context_set_property (GObject *gobject,
|
||||
{
|
||||
g_critical ("The drawing context of type %s does not have a window "
|
||||
"associated to it. Drawing contexts can only be created "
|
||||
"using gdk_window_begin_draw_frame().",
|
||||
"using gdk_surface_begin_draw_frame().",
|
||||
G_OBJECT_TYPE_NAME (gobject));
|
||||
return;
|
||||
}
|
||||
@ -173,11 +173,11 @@ gdk_drawing_context_class_init (GdkDrawingContextClass *klass)
|
||||
/**
|
||||
* GdkDrawingContext:window:
|
||||
*
|
||||
* The #GdkWindow that created the drawing context.
|
||||
* The #GdkSurface that created the drawing context.
|
||||
*/
|
||||
obj_property[PROP_WINDOW] =
|
||||
g_param_spec_object ("window", "Window", "The window that created the context",
|
||||
GDK_TYPE_WINDOW,
|
||||
GDK_TYPE_SURFACE,
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
@ -242,7 +242,7 @@ gdk_cairo_get_drawing_context (cairo_t *cr)
|
||||
* gdk_drawing_context_get_cairo_context:
|
||||
* @context: a #GdkDrawingContext created with a %NULL paint context
|
||||
*
|
||||
* Retrieves a Cairo context to be used to draw on the #GdkWindow
|
||||
* Retrieves a Cairo context to be used to draw on the #GdkSurface
|
||||
* that created the #GdkDrawingContext. The @context must have been
|
||||
* created without a #GdkDrawContext for this function to work. If
|
||||
* gdk_drawing_context_get_paint_context() does not return %NULL,
|
||||
@ -250,10 +250,10 @@ gdk_cairo_get_drawing_context (cairo_t *cr)
|
||||
*
|
||||
* The returned context is guaranteed to be valid as long as the
|
||||
* #GdkDrawingContext is valid, that is between a call to
|
||||
* gdk_window_begin_draw_frame() and gdk_window_end_draw_frame().
|
||||
* gdk_surface_begin_draw_frame() and gdk_surface_end_draw_frame().
|
||||
*
|
||||
* Returns: (transfer none) (nullable): a Cairo context to be used to draw
|
||||
* the contents of the #GdkWindow. The context is owned by the
|
||||
* the contents of the #GdkSurface. The context is owned by the
|
||||
* #GdkDrawingContext and should not be destroyed. %NULL is
|
||||
* returned when a paint context is in used.
|
||||
*/
|
||||
@ -263,7 +263,7 @@ gdk_drawing_context_get_cairo_context (GdkDrawingContext *context)
|
||||
GdkDrawingContextPrivate *priv = gdk_drawing_context_get_instance_private (context);
|
||||
|
||||
g_return_val_if_fail (GDK_IS_DRAWING_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (priv->window), NULL);
|
||||
g_return_val_if_fail (GDK_IS_SURFACE (priv->window), NULL);
|
||||
|
||||
if (priv->paint_context != NULL)
|
||||
return NULL;
|
||||
@ -273,12 +273,12 @@ gdk_drawing_context_get_cairo_context (GdkDrawingContext *context)
|
||||
cairo_region_t *region;
|
||||
cairo_surface_t *surface;
|
||||
|
||||
surface = _gdk_window_ref_cairo_surface (priv->window);
|
||||
surface = _gdk_surface_ref_cairo_surface (priv->window);
|
||||
priv->cr = cairo_create (surface);
|
||||
|
||||
gdk_cairo_set_drawing_context (priv->cr, context);
|
||||
|
||||
region = gdk_window_get_current_paint_region (priv->window);
|
||||
region = gdk_surface_get_current_paint_region (priv->window);
|
||||
cairo_region_union (region, priv->clip);
|
||||
gdk_cairo_region (priv->cr, region);
|
||||
cairo_clip (priv->cr);
|
||||
@ -296,9 +296,9 @@ gdk_drawing_context_get_cairo_context (GdkDrawingContext *context)
|
||||
*
|
||||
* Retrieves the window that created the drawing @context.
|
||||
*
|
||||
* Returns: (transfer none): a #GdkWindow
|
||||
* Returns: (transfer none): a #GdkSurface
|
||||
*/
|
||||
GdkWindow *
|
||||
GdkSurface *
|
||||
gdk_drawing_context_get_window (GdkDrawingContext *context)
|
||||
{
|
||||
GdkDrawingContextPrivate *priv = gdk_drawing_context_get_instance_private (context);
|
||||
@ -365,7 +365,7 @@ gdk_drawing_context_is_valid (GdkDrawingContext *context)
|
||||
if (priv->window == NULL)
|
||||
return FALSE;
|
||||
|
||||
if (gdk_window_get_drawing_context (priv->window) != context)
|
||||
if (gdk_surface_get_drawing_context (priv->window) != context)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
|
@ -37,7 +37,7 @@ GDK_AVAILABLE_IN_ALL
|
||||
GType gdk_drawing_context_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow * gdk_drawing_context_get_window (GdkDrawingContext *context);
|
||||
GdkSurface * gdk_drawing_context_get_window (GdkDrawingContext *context);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkDrawContext* gdk_drawing_context_get_paint_context (GdkDrawingContext *context);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
|
@ -372,7 +372,7 @@ _gdk_event_queue_handle_motion_compression (GdkDisplay *display)
|
||||
{
|
||||
GList *tmp_list;
|
||||
GList *pending_motions = NULL;
|
||||
GdkWindow *pending_motion_window = NULL;
|
||||
GdkSurface *pending_motion_window = NULL;
|
||||
GdkDevice *pending_motion_device = NULL;
|
||||
GdkEvent *last_motion = NULL;
|
||||
|
||||
@ -429,7 +429,7 @@ _gdk_event_queue_handle_motion_compression (GdkDisplay *display)
|
||||
pending_motions == display->queued_events &&
|
||||
pending_motions == display->queued_tail)
|
||||
{
|
||||
GdkFrameClock *clock = gdk_window_get_frame_clock (pending_motion_window);
|
||||
GdkFrameClock *clock = gdk_surface_get_frame_clock (pending_motion_window);
|
||||
if (clock) /* might be NULL if window was destroyed */
|
||||
gdk_frame_clock_request_phase (clock, GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS);
|
||||
}
|
||||
@ -602,7 +602,7 @@ copy_time_coord (const GdkTimeCoord *coord)
|
||||
* @event: a #GdkEvent
|
||||
*
|
||||
* Copies a #GdkEvent, copying or incrementing the reference count of the
|
||||
* resources associated with it (e.g. #GdkWindow’s and strings).
|
||||
* resources associated with it (e.g. #GdkSurface’s and strings).
|
||||
*
|
||||
* Returns: (transfer full): a copy of @event. Free with g_object_unref()
|
||||
*/
|
||||
@ -779,11 +779,11 @@ gdk_event_finalize (GObject *object)
|
||||
* gdk_event_get_window:
|
||||
* @event: a #GdkEvent
|
||||
*
|
||||
* Extracts the #GdkWindow associated with an event.
|
||||
* Extracts the #GdkSurface associated with an event.
|
||||
*
|
||||
* Returns: (transfer none): The #GdkWindow associated with the event
|
||||
* Returns: (transfer none): The #GdkSurface associated with the event
|
||||
*/
|
||||
GdkWindow *
|
||||
GdkSurface *
|
||||
gdk_event_get_window (const GdkEvent *event)
|
||||
{
|
||||
g_return_val_if_fail (event != NULL, NULL);
|
||||
@ -1626,7 +1626,7 @@ gdk_event_set_source_device (GdkEvent *event,
|
||||
* triggered the event, falling back to the virtual (master) device
|
||||
* (as in gdk_event_get_device()) if the event wasn’t caused by
|
||||
* interaction with a hardware device. This may happen for example
|
||||
* in synthesized crossing events after a #GdkWindow updates its
|
||||
* in synthesized crossing events after a #GdkSurface updates its
|
||||
* geometry or a grab is acquired/released.
|
||||
*
|
||||
* If the event does not contain a device field, this function will
|
||||
@ -1673,13 +1673,13 @@ gdk_event_triggers_context_menu (const GdkEvent *event)
|
||||
GdkDisplay *display;
|
||||
GdkModifierType modifier;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (bevent->any.window), FALSE);
|
||||
g_return_val_if_fail (GDK_IS_SURFACE (bevent->any.window), FALSE);
|
||||
|
||||
if (bevent->button == GDK_BUTTON_SECONDARY &&
|
||||
! (bevent->state & (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK)))
|
||||
return TRUE;
|
||||
|
||||
display = gdk_window_get_display (bevent->any.window);
|
||||
display = gdk_surface_get_display (bevent->any.window);
|
||||
|
||||
modifier = gdk_keymap_get_modifier_mask (gdk_display_get_keymap (display),
|
||||
GDK_MODIFIER_INTENT_CONTEXT_MENU);
|
||||
@ -1848,7 +1848,7 @@ gdk_event_get_display (const GdkEvent *event)
|
||||
return event->any.display;
|
||||
|
||||
if (event->any.window)
|
||||
return gdk_window_get_display (event->any.window);
|
||||
return gdk_surface_get_display (event->any.window);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -2336,7 +2336,7 @@ gdk_event_get_touch_emulating_pointer (const GdkEvent *event,
|
||||
**/
|
||||
gboolean
|
||||
gdk_event_get_grab_window (const GdkEvent *event,
|
||||
GdkWindow **window)
|
||||
GdkSurface **window)
|
||||
{
|
||||
if (!event)
|
||||
return FALSE;
|
||||
|
@ -166,7 +166,7 @@ typedef void (*GdkEventFunc) (GdkEvent *event,
|
||||
* @GDK_LEAVE_NOTIFY: the pointer has left the window.
|
||||
* @GDK_FOCUS_CHANGE: the keyboard focus has entered or left the window.
|
||||
* @GDK_CONFIGURE: the size, position or stacking order of the window has changed.
|
||||
* Note that GTK+ discards these events for %GDK_WINDOW_CHILD windows.
|
||||
* Note that GTK+ discards these events for %GDK_SURFACE_CHILD windows.
|
||||
* @GDK_MAP: the window has been mapped.
|
||||
* @GDK_UNMAP: the window has been unmapped.
|
||||
* @GDK_PROXIMITY_IN: an input device has moved into contact with a sensing
|
||||
@ -381,7 +381,7 @@ GDK_AVAILABLE_IN_ALL
|
||||
void gdk_event_free (GdkEvent *event);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow *gdk_event_get_window (const GdkEvent *event);
|
||||
GdkSurface *gdk_event_get_window (const GdkEvent *event);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
guint32 gdk_event_get_time (const GdkEvent *event);
|
||||
@ -546,7 +546,7 @@ gboolean gdk_event_get_touch_emulating_pointer (const GdkEvent *event,
|
||||
gboolean *emulating);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_event_get_grab_window (const GdkEvent *event,
|
||||
GdkWindow **window);
|
||||
GdkSurface **window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_event_get_focus_in (const GdkEvent *event,
|
||||
gboolean *focus_in);
|
||||
|
@ -55,7 +55,7 @@ struct _GdkEventAny
|
||||
{
|
||||
GObject parent_instance;
|
||||
GdkEventType type;
|
||||
GdkWindow *window;
|
||||
GdkSurface *window;
|
||||
guint16 flags;
|
||||
gint8 send_event;
|
||||
GdkDevice *device;
|
||||
@ -329,7 +329,7 @@ struct _GdkEventKey
|
||||
struct _GdkEventCrossing
|
||||
{
|
||||
GdkEventAny any;
|
||||
GdkWindow *subwindow;
|
||||
GdkSurface *subwindow;
|
||||
guint32 time;
|
||||
gdouble x;
|
||||
gdouble y;
|
||||
@ -427,7 +427,7 @@ struct _GdkEventGrabBroken {
|
||||
GdkEventAny any;
|
||||
gboolean keyboard;
|
||||
gboolean implicit;
|
||||
GdkWindow *grab_window;
|
||||
GdkSurface *grab_window;
|
||||
};
|
||||
|
||||
/*
|
||||
|
20
gdk/gdkgl.c
20
gdk/gdkgl.c
@ -30,7 +30,7 @@ static cairo_user_data_key_t direct_key;
|
||||
|
||||
void
|
||||
gdk_cairo_surface_mark_as_direct (cairo_surface_t *surface,
|
||||
GdkWindow *window)
|
||||
GdkSurface *window)
|
||||
{
|
||||
cairo_surface_set_user_data (surface, &direct_key,
|
||||
g_object_ref (window), g_object_unref);
|
||||
@ -219,10 +219,10 @@ gdk_gl_texture_quads (GdkGLContext *paint_context,
|
||||
{
|
||||
GdkGLContextPaintData *paint_data = gdk_gl_context_get_paint_data (paint_context);
|
||||
GdkGLContextProgram *program;
|
||||
GdkWindow *window = gdk_gl_context_get_window (paint_context);
|
||||
int window_scale = gdk_window_get_scale_factor (window);
|
||||
float w = gdk_window_get_width (window) * window_scale;
|
||||
float h = gdk_window_get_height (window) * window_scale;
|
||||
GdkSurface *window = gdk_gl_context_get_window (paint_context);
|
||||
int window_scale = gdk_surface_get_scale_factor (window);
|
||||
float w = gdk_surface_get_width (window) * window_scale;
|
||||
float h = gdk_surface_get_height (window) * window_scale;
|
||||
int i;
|
||||
float *vertex_buffer_data;
|
||||
|
||||
@ -327,7 +327,7 @@ gdk_gl_texture_quads (GdkGLContext *paint_context,
|
||||
*/
|
||||
void
|
||||
gdk_cairo_draw_from_gl (cairo_t *cr,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
int source,
|
||||
int source_type,
|
||||
int buffer_scale,
|
||||
@ -345,7 +345,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
|
||||
GdkGLContextPaintData *paint_data;
|
||||
int major, minor, version;
|
||||
|
||||
paint_context = gdk_window_get_paint_gl_context (window, NULL);
|
||||
paint_context = gdk_surface_get_paint_gl_context (window, NULL);
|
||||
if (paint_context == NULL)
|
||||
{
|
||||
g_warning ("gdk_cairo_draw_gl_render_buffer failed - no paint context");
|
||||
@ -458,7 +458,7 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
|
||||
double device_x_offset, device_y_offset;
|
||||
cairo_rectangle_int_t rect, e;
|
||||
int n_rects, i;
|
||||
GdkWindow *window;
|
||||
GdkSurface *window;
|
||||
int unscaled_window_height;
|
||||
unsigned int texture_id;
|
||||
int window_scale;
|
||||
@ -483,8 +483,8 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
|
||||
use_texture_rectangle = gdk_gl_context_use_texture_rectangle (paint_context);
|
||||
|
||||
window = gdk_gl_context_get_window (paint_context);
|
||||
window_scale = gdk_window_get_scale_factor (window);
|
||||
gdk_window_get_unscaled_size (window, NULL, &unscaled_window_height);
|
||||
window_scale = gdk_surface_get_scale_factor (window);
|
||||
gdk_surface_get_unscaled_size (window, NULL, &unscaled_window_height);
|
||||
|
||||
sx = sy = 1;
|
||||
cairo_surface_get_device_scale (surface, &sx, &sy);
|
||||
|
@ -26,12 +26,12 @@
|
||||
* #GdkGLContext is an object representing the platform-specific
|
||||
* OpenGL draw context.
|
||||
*
|
||||
* #GdkGLContexts are created for a #GdkWindow using
|
||||
* gdk_window_create_gl_context(), and the context will match the
|
||||
* #GdkGLContexts are created for a #GdkSurface using
|
||||
* gdk_surface_create_gl_context(), and the context will match the
|
||||
* the characteristics of the window.
|
||||
*
|
||||
* A #GdkGLContext is not tied to any particular normal framebuffer.
|
||||
* For instance, it cannot draw to the #GdkWindow back buffer. The GDK
|
||||
* For instance, it cannot draw to the #GdkSurface back buffer. The GDK
|
||||
* repaint system is in full control of the painting to that. Instead,
|
||||
* you can create render buffers or textures and use gdk_cairo_draw_from_gl()
|
||||
* in the draw function of your widget to draw them. Then GDK will handle
|
||||
@ -46,14 +46,14 @@
|
||||
* ## Creating a new OpenGL context ##
|
||||
*
|
||||
* In order to create a new #GdkGLContext instance you need a
|
||||
* #GdkWindow, which you typically get during the realize call
|
||||
* #GdkSurface, which you typically get during the realize call
|
||||
* of a widget.
|
||||
*
|
||||
* A #GdkGLContext is not realized until either gdk_gl_context_make_current(),
|
||||
* or until it is realized using gdk_gl_context_realize(). It is possible to
|
||||
* specify details of the GL context like the OpenGL version to be used, or
|
||||
* whether the GL context should have extra state validation enabled after
|
||||
* calling gdk_window_create_gl_context() by calling gdk_gl_context_realize().
|
||||
* calling gdk_surface_create_gl_context() by calling gdk_gl_context_realize().
|
||||
* If the realization fails you have the option to change the settings of the
|
||||
* #GdkGLContext and try again.
|
||||
*
|
||||
@ -265,12 +265,12 @@ gdk_gl_context_real_realize (GdkGLContext *self,
|
||||
static cairo_region_t *
|
||||
gdk_gl_context_real_get_damage (GdkGLContext *context)
|
||||
{
|
||||
GdkWindow *window = gdk_draw_context_get_window (GDK_DRAW_CONTEXT (context));
|
||||
GdkSurface *window = gdk_draw_context_get_window (GDK_DRAW_CONTEXT (context));
|
||||
|
||||
return cairo_region_create_rectangle (&(GdkRectangle) {
|
||||
0, 0,
|
||||
gdk_window_get_width (window),
|
||||
gdk_window_get_height (window)
|
||||
gdk_surface_get_width (window),
|
||||
gdk_surface_get_height (window)
|
||||
});
|
||||
}
|
||||
|
||||
@ -279,7 +279,7 @@ gdk_gl_context_real_begin_frame (GdkDrawContext *draw_context,
|
||||
cairo_region_t *region)
|
||||
{
|
||||
GdkGLContext *context = GDK_GL_CONTEXT (draw_context);
|
||||
GdkWindow *window;
|
||||
GdkSurface *window;
|
||||
GdkGLContext *shared;
|
||||
cairo_region_t *damage;
|
||||
int ww, wh;
|
||||
@ -296,8 +296,8 @@ gdk_gl_context_real_begin_frame (GdkDrawContext *draw_context,
|
||||
cairo_region_destroy (damage);
|
||||
|
||||
window = gdk_draw_context_get_window (draw_context);
|
||||
ww = gdk_window_get_width (window) * gdk_window_get_scale_factor (window);
|
||||
wh = gdk_window_get_height (window) * gdk_window_get_scale_factor (window);
|
||||
ww = gdk_surface_get_width (window) * gdk_surface_get_scale_factor (window);
|
||||
wh = gdk_surface_get_height (window) * gdk_surface_get_scale_factor (window);
|
||||
|
||||
gdk_gl_context_make_current (context);
|
||||
|
||||
@ -889,11 +889,11 @@ gdk_gl_context_get_display (GdkGLContext *context)
|
||||
* gdk_gl_context_get_window:
|
||||
* @context: a #GdkGLContext
|
||||
*
|
||||
* Retrieves the #GdkWindow used by the @context.
|
||||
* Retrieves the #GdkSurface used by the @context.
|
||||
*
|
||||
* Returns: (nullable) (transfer none): a #GdkWindow or %NULL
|
||||
* Returns: (nullable) (transfer none): a #GdkSurface or %NULL
|
||||
*/
|
||||
GdkWindow *
|
||||
GdkSurface *
|
||||
gdk_gl_context_get_window (GdkGLContext *context)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_GL_CONTEXT (context), NULL);
|
||||
|
@ -45,7 +45,7 @@ GType gdk_gl_context_get_type (void) G_GNUC_CONST;
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkDisplay * gdk_gl_context_get_display (GdkGLContext *context);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow * gdk_gl_context_get_window (GdkGLContext *context);
|
||||
GdkSurface * gdk_gl_context_get_window (GdkGLContext *context);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkGLContext * gdk_gl_context_get_shared_context (GdkGLContext *context);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
|
@ -91,7 +91,7 @@ gdk_gl_texture_download (GdkTexture *texture,
|
||||
}
|
||||
else
|
||||
{
|
||||
GdkWindow *window;
|
||||
GdkSurface *window;
|
||||
|
||||
window = gdk_gl_context_get_window (self->context);
|
||||
gdk_cairo_draw_from_gl (cr, window, self->id, GL_TEXTURE, 1,
|
||||
@ -145,7 +145,7 @@ gdk_gl_texture_get_id (GdkGLTexture *self)
|
||||
void
|
||||
gdk_gl_texture_release (GdkGLTexture *self)
|
||||
{
|
||||
GdkWindow *window;
|
||||
GdkSurface *window;
|
||||
GdkTexture *texture;
|
||||
cairo_t *cr;
|
||||
|
||||
|
@ -42,7 +42,7 @@ G_BEGIN_DECLS
|
||||
|
||||
/* Debugging support */
|
||||
|
||||
typedef struct _GdkWindowAttr GdkWindowAttr;
|
||||
typedef struct _GdkSurfaceAttr GdkSurfaceAttr;
|
||||
|
||||
typedef enum {
|
||||
GDK_DEBUG_MISC = 1 << 0,
|
||||
@ -116,35 +116,35 @@ typedef enum
|
||||
GDK_EVENT_FLUSHED = 1 << 2
|
||||
} GdkEventFlags;
|
||||
|
||||
typedef struct _GdkWindowPaint GdkWindowPaint;
|
||||
typedef struct _GdkSurfacePaint GdkSurfacePaint;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GDK_INPUT_OUTPUT,
|
||||
GDK_INPUT_ONLY
|
||||
} GdkWindowWindowClass;
|
||||
} GdkSurfaceSurfaceClass;
|
||||
|
||||
|
||||
struct _GdkWindowAttr
|
||||
struct _GdkSurfaceAttr
|
||||
{
|
||||
gint x, y;
|
||||
gint width;
|
||||
gint height;
|
||||
GdkWindowWindowClass wclass;
|
||||
GdkWindowType window_type;
|
||||
GdkWindowTypeHint type_hint;
|
||||
GdkSurfaceSurfaceClass wclass;
|
||||
GdkSurfaceType window_type;
|
||||
GdkSurfaceTypeHint type_hint;
|
||||
};
|
||||
|
||||
struct _GdkWindow
|
||||
struct _GdkSurface
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
GdkDisplay *display;
|
||||
|
||||
GdkWindowImpl *impl; /* window-system-specific delegate object */
|
||||
GdkSurfaceImpl *impl; /* window-system-specific delegate object */
|
||||
|
||||
GdkWindow *parent;
|
||||
GdkWindow *transient_for;
|
||||
GdkSurface *parent;
|
||||
GdkSurface *transient_for;
|
||||
|
||||
gpointer user_data;
|
||||
|
||||
@ -182,8 +182,8 @@ struct _GdkWindow
|
||||
/* We store the old expose areas to support buffer-age optimizations */
|
||||
cairo_region_t *old_updated_area[2];
|
||||
|
||||
GdkWindowState old_state;
|
||||
GdkWindowState state;
|
||||
GdkSurfaceState old_state;
|
||||
GdkSurfaceState state;
|
||||
|
||||
guint8 alpha;
|
||||
guint8 fullscreen_mode;
|
||||
@ -209,10 +209,10 @@ struct _GdkWindow
|
||||
guint geometry_dirty : 1;
|
||||
guint frame_clock_events_paused : 1;
|
||||
|
||||
/* The GdkWindow that has the impl, ref:ed if another window.
|
||||
/* The GdkSurface that has the impl, ref:ed if another window.
|
||||
* This ref is required to keep the wrapper of the impl window alive
|
||||
* for as long as any GdkWindow references the impl. */
|
||||
GdkWindow *impl_window;
|
||||
* for as long as any GdkSurface references the impl. */
|
||||
GdkSurface *impl_window;
|
||||
|
||||
guint update_and_descendants_freeze_count;
|
||||
|
||||
@ -244,8 +244,8 @@ struct _GdkWindow
|
||||
cairo_region_t *opaque_region;
|
||||
};
|
||||
|
||||
#define GDK_WINDOW_TYPE(d) ((((GdkWindow *)(d)))->window_type)
|
||||
#define GDK_WINDOW_DESTROYED(d) (((GdkWindow *)(d))->destroyed)
|
||||
#define GDK_SURFACE_TYPE(d) ((((GdkSurface *)(d)))->window_type)
|
||||
#define GDK_SURFACE_DESTROYED(d) (((GdkSurface *)(d))->destroyed)
|
||||
|
||||
extern gint _gdk_screen_number;
|
||||
|
||||
@ -280,8 +280,8 @@ void _gdk_windowing_event_data_copy (const GdkEvent *src,
|
||||
GdkEvent *dst);
|
||||
void _gdk_windowing_event_data_free (GdkEvent *event);
|
||||
|
||||
void gdk_window_set_state (GdkWindow *window,
|
||||
GdkWindowState new_state);
|
||||
void gdk_surface_set_state (GdkSurface *window,
|
||||
GdkSurfaceState new_state);
|
||||
|
||||
gboolean _gdk_cairo_surface_extents (cairo_surface_t *surface,
|
||||
GdkRectangle *extents);
|
||||
@ -303,7 +303,7 @@ void gdk_cairo_surface_paint_pixbuf (cairo_surface_t *surface,
|
||||
const GdkPixbuf *pixbuf);
|
||||
|
||||
void gdk_cairo_surface_mark_as_direct (cairo_surface_t *surface,
|
||||
GdkWindow *window);
|
||||
GdkSurface *window);
|
||||
cairo_region_t *gdk_cairo_region_from_clip (cairo_t *cr);
|
||||
|
||||
void gdk_cairo_set_drawing_context (cairo_t *cr,
|
||||
@ -314,27 +314,27 @@ void gdk_cairo_set_drawing_context (cairo_t *cr,
|
||||
*************************************/
|
||||
|
||||
cairo_surface_t *
|
||||
_gdk_window_ref_cairo_surface (GdkWindow *window);
|
||||
_gdk_surface_ref_cairo_surface (GdkSurface *window);
|
||||
|
||||
GdkWindow* gdk_window_new (GdkDisplay *display,
|
||||
GdkWindow *parent,
|
||||
GdkWindowAttr *attributes);
|
||||
void _gdk_window_destroy (GdkWindow *window,
|
||||
GdkSurface* gdk_surface_new (GdkDisplay *display,
|
||||
GdkSurface *parent,
|
||||
GdkSurfaceAttr *attributes);
|
||||
void _gdk_surface_destroy (GdkSurface *window,
|
||||
gboolean foreign_destroy);
|
||||
void _gdk_window_clear_update_area (GdkWindow *window);
|
||||
void _gdk_window_update_size (GdkWindow *window);
|
||||
gboolean _gdk_window_update_viewable (GdkWindow *window);
|
||||
GdkGLContext * gdk_window_get_paint_gl_context (GdkWindow *window,
|
||||
void _gdk_surface_clear_update_area (GdkSurface *window);
|
||||
void _gdk_surface_update_size (GdkSurface *window);
|
||||
gboolean _gdk_surface_update_viewable (GdkSurface *window);
|
||||
GdkGLContext * gdk_surface_get_paint_gl_context (GdkSurface *window,
|
||||
GError **error);
|
||||
void gdk_window_get_unscaled_size (GdkWindow *window,
|
||||
void gdk_surface_get_unscaled_size (GdkSurface *window,
|
||||
int *unscaled_width,
|
||||
int *unscaled_height);
|
||||
|
||||
GdkDrawingContext *gdk_window_get_drawing_context (GdkWindow *window);
|
||||
GdkDrawingContext *gdk_surface_get_drawing_context (GdkSurface *window);
|
||||
|
||||
cairo_region_t *gdk_window_get_current_paint_region (GdkWindow *window);
|
||||
cairo_region_t *gdk_surface_get_current_paint_region (GdkSurface *window);
|
||||
|
||||
void _gdk_window_process_updates_recurse (GdkWindow *window,
|
||||
void _gdk_surface_process_updates_recurse (GdkSurface *window,
|
||||
cairo_region_t *expose_region);
|
||||
|
||||
/*****************************************
|
||||
@ -352,28 +352,28 @@ void _gdk_windowing_got_event (GdkDisplay *display,
|
||||
GdkEvent *event,
|
||||
gulong serial);
|
||||
|
||||
#define GDK_WINDOW_IS_MAPPED(window) (((window)->state & GDK_WINDOW_STATE_WITHDRAWN) == 0)
|
||||
#define GDK_SURFACE_IS_MAPPED(window) (((window)->state & GDK_SURFACE_STATE_WITHDRAWN) == 0)
|
||||
|
||||
void _gdk_window_invalidate_for_expose (GdkWindow *window,
|
||||
void _gdk_surface_invalidate_for_expose (GdkSurface *window,
|
||||
cairo_region_t *region);
|
||||
|
||||
GdkWindow * _gdk_window_find_child_at (GdkWindow *window,
|
||||
GdkSurface * _gdk_surface_find_child_at (GdkSurface *window,
|
||||
double x, double y);
|
||||
GdkWindow * _gdk_window_find_descendant_at (GdkWindow *toplevel,
|
||||
GdkSurface * _gdk_surface_find_descendant_at (GdkSurface *toplevel,
|
||||
double x, double y,
|
||||
double *found_x,
|
||||
double *found_y);
|
||||
|
||||
GdkEvent * _gdk_make_event (GdkWindow *window,
|
||||
GdkEvent * _gdk_make_event (GdkSurface *window,
|
||||
GdkEventType type,
|
||||
GdkEvent *event_in_queue,
|
||||
gboolean before_event);
|
||||
gboolean _gdk_window_event_parent_of (GdkWindow *parent,
|
||||
GdkWindow *child);
|
||||
gboolean _gdk_surface_event_parent_of (GdkSurface *parent,
|
||||
GdkSurface *child);
|
||||
|
||||
void _gdk_synthesize_crossing_events (GdkDisplay *display,
|
||||
GdkWindow *src,
|
||||
GdkWindow *dest,
|
||||
GdkSurface *src,
|
||||
GdkSurface *dest,
|
||||
GdkDevice *device,
|
||||
GdkDevice *source_device,
|
||||
GdkCrossingMode mode,
|
||||
@ -386,16 +386,16 @@ void _gdk_synthesize_crossing_events (GdkDisplay *display,
|
||||
gboolean non_linear);
|
||||
void _gdk_display_set_window_under_pointer (GdkDisplay *display,
|
||||
GdkDevice *device,
|
||||
GdkWindow *window);
|
||||
GdkSurface *window);
|
||||
|
||||
gboolean _gdk_window_has_impl (GdkWindow *window);
|
||||
GdkWindow * _gdk_window_get_impl_window (GdkWindow *window);
|
||||
gboolean _gdk_surface_has_impl (GdkSurface *window);
|
||||
GdkSurface * _gdk_surface_get_impl_window (GdkSurface *window);
|
||||
|
||||
void gdk_window_destroy_notify (GdkWindow *window);
|
||||
void gdk_surface_destroy_notify (GdkSurface *window);
|
||||
|
||||
void gdk_synthesize_window_state (GdkWindow *window,
|
||||
GdkWindowState unset_flags,
|
||||
GdkWindowState set_flags);
|
||||
void gdk_synthesize_window_state (GdkSurface *window,
|
||||
GdkSurfaceState unset_flags,
|
||||
GdkSurfaceState set_flags);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
@ -411,7 +411,7 @@ gdk_monitor_get_model (GdkMonitor *monitor)
|
||||
*
|
||||
* This can be used if you want to create pixel based data for a
|
||||
* particular monitor, but most of the time you’re drawing to a window
|
||||
* where it is better to use gdk_window_get_scale_factor() instead.
|
||||
* where it is better to use gdk_surface_get_scale_factor() instead.
|
||||
*
|
||||
* Returns: the scale factor
|
||||
*/
|
||||
|
@ -67,8 +67,8 @@
|
||||
* // where we are drawing are [-RADIUS, RADIUS], [-RADIUS, RADIUS]
|
||||
* // We first center, then change the scale
|
||||
*
|
||||
* width = gdk_window_get_width (window);
|
||||
* height = gdk_window_get_height (window);
|
||||
* width = gdk_surface_get_width (window);
|
||||
* height = gdk_surface_get_height (window);
|
||||
* radius = MIN (width, height) / 2.;
|
||||
*
|
||||
* cairo_translate (cr,
|
||||
|
@ -38,7 +38,7 @@
|
||||
* and manipulate pixbufs, see the #GdkPixbuf API documentation.
|
||||
*
|
||||
* The functions described here allow to obtain pixbufs from
|
||||
* #GdkWindows and cairo surfaces.
|
||||
* #GdkSurfaces and cairo surfaces.
|
||||
*/
|
||||
|
||||
static cairo_format_t
|
||||
|
@ -233,7 +233,7 @@ gdk_seat_get_capabilities (GdkSeat *seat)
|
||||
/**
|
||||
* gdk_seat_grab:
|
||||
* @seat: a #GdkSeat
|
||||
* @window: the #GdkWindow which will own the grab
|
||||
* @window: the #GdkSurface which will own the grab
|
||||
* @capabilities: capabilities that will be grabbed
|
||||
* @owner_events: if %FALSE then all device events are reported with respect to
|
||||
* @window and are only reported if selected by @event_mask. If
|
||||
@ -267,7 +267,7 @@ gdk_seat_get_capabilities (GdkSeat *seat)
|
||||
* events corresponding to the given capabilities. For example in GTK+ this
|
||||
* is used for Drag and Drop operations, popup menus and such.
|
||||
*
|
||||
* Note that if the event mask of a #GdkWindow has selected both button press
|
||||
* Note that if the event mask of a #GdkSurface has selected both button press
|
||||
* and button release events, or touch begin and touch end, then a press event
|
||||
* will cause an automatic grab until the button is released, equivalent to a
|
||||
* grab on the window with @owner_events set to %TRUE. This is done because most
|
||||
@ -281,7 +281,7 @@ gdk_seat_get_capabilities (GdkSeat *seat)
|
||||
**/
|
||||
GdkGrabStatus
|
||||
gdk_seat_grab (GdkSeat *seat,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkSeatCapabilities capabilities,
|
||||
gboolean owner_events,
|
||||
GdkCursor *cursor,
|
||||
@ -292,7 +292,7 @@ gdk_seat_grab (GdkSeat *seat,
|
||||
GdkSeatClass *seat_class;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_SEAT (seat), GDK_GRAB_FAILED);
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), GDK_GRAB_FAILED);
|
||||
g_return_val_if_fail (GDK_IS_SURFACE (window), GDK_GRAB_FAILED);
|
||||
|
||||
capabilities &= GDK_SEAT_CAPABILITY_ALL;
|
||||
g_return_val_if_fail (capabilities != GDK_SEAT_CAPABILITY_NONE, GDK_GRAB_FAILED);
|
||||
|
@ -64,7 +64,7 @@ typedef enum {
|
||||
/**
|
||||
* GdkSeatGrabPrepareFunc:
|
||||
* @seat: the #GdkSeat being grabbed
|
||||
* @window: the #GdkWindow being grabbed
|
||||
* @window: the #GdkSurface being grabbed
|
||||
* @user_data: user data passed in gdk_seat_grab()
|
||||
*
|
||||
* Type of the callback used to set up @window so it can be
|
||||
@ -75,7 +75,7 @@ typedef enum {
|
||||
* Since: 3.20
|
||||
*/
|
||||
typedef void (* GdkSeatGrabPrepareFunc) (GdkSeat *seat,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gpointer user_data);
|
||||
|
||||
struct _GdkSeat
|
||||
@ -88,7 +88,7 @@ GType gdk_seat_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkGrabStatus gdk_seat_grab (GdkSeat *seat,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkSeatCapabilities capabilities,
|
||||
gboolean owner_events,
|
||||
GdkCursor *cursor,
|
||||
|
@ -104,7 +104,7 @@ gdk_seat_default_get_capabilities (GdkSeat *seat)
|
||||
|
||||
static GdkGrabStatus
|
||||
gdk_seat_default_grab (GdkSeat *seat,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkSeatCapabilities capabilities,
|
||||
gboolean owner_events,
|
||||
GdkCursor *cursor,
|
||||
@ -121,7 +121,7 @@ gdk_seat_default_grab (GdkSeat *seat,
|
||||
if (prepare_func)
|
||||
(prepare_func) (seat, window, prepare_func_data);
|
||||
|
||||
if (!gdk_window_is_visible (window))
|
||||
if (!gdk_surface_is_visible (window))
|
||||
{
|
||||
g_critical ("Window %p has not been made visible in GdkSeatGrabPrepareFunc",
|
||||
window);
|
||||
@ -163,7 +163,7 @@ gdk_seat_default_grab (GdkSeat *seat,
|
||||
{
|
||||
if (capabilities & ~GDK_SEAT_CAPABILITY_KEYBOARD)
|
||||
gdk_device_ungrab (priv->master_pointer, evtime);
|
||||
gdk_window_hide (window);
|
||||
gdk_surface_hide (window);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ struct _GdkSeatClass
|
||||
GdkSeatCapabilities (*get_capabilities) (GdkSeat *seat);
|
||||
|
||||
GdkGrabStatus (* grab) (GdkSeat *seat,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkSeatCapabilities capabilities,
|
||||
gboolean owner_events,
|
||||
GdkCursor *cursor,
|
||||
|
@ -128,7 +128,7 @@ typedef struct _GdkDragContext GdkDragContext;
|
||||
typedef struct _GdkClipboard GdkClipboard;
|
||||
typedef struct _GdkDisplayManager GdkDisplayManager;
|
||||
typedef struct _GdkDisplay GdkDisplay;
|
||||
typedef struct _GdkWindow GdkWindow;
|
||||
typedef struct _GdkSurface GdkSurface;
|
||||
typedef struct _GdkKeymap GdkKeymap;
|
||||
typedef struct _GdkAppLaunchContext GdkAppLaunchContext;
|
||||
typedef struct _GdkSeat GdkSeat;
|
||||
@ -387,7 +387,7 @@ typedef enum
|
||||
*
|
||||
* Since GTK 3.8, motion events are already compressed by default, independent
|
||||
* of this mechanism. This compression can be disabled with
|
||||
* gdk_window_set_event_compression(). See the documentation of that function
|
||||
* gdk_surface_set_event_compression(). See the documentation of that function
|
||||
* for details.
|
||||
*
|
||||
* If %GDK_TOUCH_MASK is enabled, the window will receive touch events
|
||||
@ -461,27 +461,27 @@ typedef enum {
|
||||
} GdkVulkanError;
|
||||
|
||||
/**
|
||||
* GdkWindowTypeHint:
|
||||
* @GDK_WINDOW_TYPE_HINT_NORMAL: Normal toplevel window.
|
||||
* @GDK_WINDOW_TYPE_HINT_DIALOG: Dialog window.
|
||||
* @GDK_WINDOW_TYPE_HINT_MENU: Window used to implement a menu; GTK+ uses
|
||||
* GdkSurfaceTypeHint:
|
||||
* @GDK_SURFACE_TYPE_HINT_NORMAL: Normal toplevel window.
|
||||
* @GDK_SURFACE_TYPE_HINT_DIALOG: Dialog window.
|
||||
* @GDK_SURFACE_TYPE_HINT_MENU: Window used to implement a menu; GTK+ uses
|
||||
* this hint only for torn-off menus, see #GtkTearoffMenuItem.
|
||||
* @GDK_WINDOW_TYPE_HINT_TOOLBAR: Window used to implement toolbars.
|
||||
* @GDK_WINDOW_TYPE_HINT_SPLASHSCREEN: Window used to display a splash
|
||||
* @GDK_SURFACE_TYPE_HINT_TOOLBAR: Window used to implement toolbars.
|
||||
* @GDK_SURFACE_TYPE_HINT_SPLASHSCREEN: Window used to display a splash
|
||||
* screen during application startup.
|
||||
* @GDK_WINDOW_TYPE_HINT_UTILITY: Utility windows which are not detached
|
||||
* @GDK_SURFACE_TYPE_HINT_UTILITY: Utility windows which are not detached
|
||||
* toolbars or dialogs.
|
||||
* @GDK_WINDOW_TYPE_HINT_DOCK: Used for creating dock or panel windows.
|
||||
* @GDK_WINDOW_TYPE_HINT_DESKTOP: Used for creating the desktop background
|
||||
* @GDK_SURFACE_TYPE_HINT_DOCK: Used for creating dock or panel windows.
|
||||
* @GDK_SURFACE_TYPE_HINT_DESKTOP: Used for creating the desktop background
|
||||
* window.
|
||||
* @GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU: A menu that belongs to a menubar.
|
||||
* @GDK_WINDOW_TYPE_HINT_POPUP_MENU: A menu that does not belong to a menubar,
|
||||
* @GDK_SURFACE_TYPE_HINT_DROPDOWN_MENU: A menu that belongs to a menubar.
|
||||
* @GDK_SURFACE_TYPE_HINT_POPUP_MENU: A menu that does not belong to a menubar,
|
||||
* e.g. a context menu.
|
||||
* @GDK_WINDOW_TYPE_HINT_TOOLTIP: A tooltip.
|
||||
* @GDK_WINDOW_TYPE_HINT_NOTIFICATION: A notification - typically a “bubble”
|
||||
* @GDK_SURFACE_TYPE_HINT_TOOLTIP: A tooltip.
|
||||
* @GDK_SURFACE_TYPE_HINT_NOTIFICATION: A notification - typically a “bubble”
|
||||
* that belongs to a status icon.
|
||||
* @GDK_WINDOW_TYPE_HINT_COMBO: A popup from a combo box.
|
||||
* @GDK_WINDOW_TYPE_HINT_DND: A window that is used to implement a DND cursor.
|
||||
* @GDK_SURFACE_TYPE_HINT_COMBO: A popup from a combo box.
|
||||
* @GDK_SURFACE_TYPE_HINT_DND: A window that is used to implement a DND cursor.
|
||||
*
|
||||
* These are hints for the window manager that indicate what type of function
|
||||
* the window has. The window manager can use this when determining decoration
|
||||
@ -492,21 +492,21 @@ typedef enum {
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GDK_WINDOW_TYPE_HINT_NORMAL,
|
||||
GDK_WINDOW_TYPE_HINT_DIALOG,
|
||||
GDK_WINDOW_TYPE_HINT_MENU, /* Torn off menu */
|
||||
GDK_WINDOW_TYPE_HINT_TOOLBAR,
|
||||
GDK_WINDOW_TYPE_HINT_SPLASHSCREEN,
|
||||
GDK_WINDOW_TYPE_HINT_UTILITY,
|
||||
GDK_WINDOW_TYPE_HINT_DOCK,
|
||||
GDK_WINDOW_TYPE_HINT_DESKTOP,
|
||||
GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU, /* A drop down menu (from a menubar) */
|
||||
GDK_WINDOW_TYPE_HINT_POPUP_MENU, /* A popup menu (from right-click) */
|
||||
GDK_WINDOW_TYPE_HINT_TOOLTIP,
|
||||
GDK_WINDOW_TYPE_HINT_NOTIFICATION,
|
||||
GDK_WINDOW_TYPE_HINT_COMBO,
|
||||
GDK_WINDOW_TYPE_HINT_DND
|
||||
} GdkWindowTypeHint;
|
||||
GDK_SURFACE_TYPE_HINT_NORMAL,
|
||||
GDK_SURFACE_TYPE_HINT_DIALOG,
|
||||
GDK_SURFACE_TYPE_HINT_MENU, /* Torn off menu */
|
||||
GDK_SURFACE_TYPE_HINT_TOOLBAR,
|
||||
GDK_SURFACE_TYPE_HINT_SPLASHSCREEN,
|
||||
GDK_SURFACE_TYPE_HINT_UTILITY,
|
||||
GDK_SURFACE_TYPE_HINT_DOCK,
|
||||
GDK_SURFACE_TYPE_HINT_DESKTOP,
|
||||
GDK_SURFACE_TYPE_HINT_DROPDOWN_MENU, /* A drop down menu (from a menubar) */
|
||||
GDK_SURFACE_TYPE_HINT_POPUP_MENU, /* A popup menu (from right-click) */
|
||||
GDK_SURFACE_TYPE_HINT_TOOLTIP,
|
||||
GDK_SURFACE_TYPE_HINT_NOTIFICATION,
|
||||
GDK_SURFACE_TYPE_HINT_COMBO,
|
||||
GDK_SURFACE_TYPE_HINT_DND
|
||||
} GdkSurfaceTypeHint;
|
||||
|
||||
/**
|
||||
* GdkAxisUse:
|
||||
|
@ -36,8 +36,8 @@
|
||||
* #GdkVulkanContext is an object representing the platform-specific
|
||||
* Vulkan draw context.
|
||||
*
|
||||
* #GdkVulkanContexts are created for a #GdkWindow using
|
||||
* gdk_window_create_vulkan_context(), and the context will match the
|
||||
* #GdkVulkanContexts are created for a #GdkSurface using
|
||||
* gdk_surface_create_vulkan_context(), and the context will match the
|
||||
* the characteristics of the window.
|
||||
*
|
||||
* Support for #GdkVulkanContext is platform-specific, context creation
|
||||
@ -250,7 +250,7 @@ gdk_vulkan_context_check_swapchain (GdkVulkanContext *context,
|
||||
GError **error)
|
||||
{
|
||||
GdkVulkanContextPrivate *priv = gdk_vulkan_context_get_instance_private (context);
|
||||
GdkWindow *window = gdk_draw_context_get_window (GDK_DRAW_CONTEXT (context));
|
||||
GdkSurface *window = gdk_draw_context_get_window (GDK_DRAW_CONTEXT (context));
|
||||
VkSurfaceCapabilitiesKHR capabilities;
|
||||
VkCompositeAlphaFlagBitsKHR composite_alpha;
|
||||
VkSwapchainKHR new_swapchain;
|
||||
@ -258,8 +258,8 @@ gdk_vulkan_context_check_swapchain (GdkVulkanContext *context,
|
||||
VkDevice device;
|
||||
guint i;
|
||||
|
||||
if (gdk_window_get_width (window) * gdk_window_get_scale_factor (window) == priv->swapchain_width &&
|
||||
gdk_window_get_height (window) * gdk_window_get_scale_factor (window) == priv->swapchain_height)
|
||||
if (gdk_surface_get_width (window) * gdk_surface_get_scale_factor (window) == priv->swapchain_width &&
|
||||
gdk_surface_get_height (window) * gdk_surface_get_scale_factor (window) == priv->swapchain_height)
|
||||
return TRUE;
|
||||
|
||||
device = gdk_vulkan_context_get_device (context);
|
||||
@ -295,8 +295,8 @@ gdk_vulkan_context_check_swapchain (GdkVulkanContext *context,
|
||||
*/
|
||||
if (capabilities.currentExtent.width == -1 || capabilities.currentExtent.height == -1)
|
||||
{
|
||||
capabilities.currentExtent.width = gdk_window_get_width (window) * gdk_window_get_scale_factor (window);
|
||||
capabilities.currentExtent.height = gdk_window_get_height (window) * gdk_window_get_scale_factor (window);
|
||||
capabilities.currentExtent.width = gdk_surface_get_width (window) * gdk_surface_get_scale_factor (window);
|
||||
capabilities.currentExtent.height = gdk_surface_get_height (window) * gdk_surface_get_scale_factor (window);
|
||||
}
|
||||
|
||||
res = GDK_VK_CHECK (vkCreateSwapchainKHR, device,
|
||||
@ -361,8 +361,8 @@ gdk_vulkan_context_check_swapchain (GdkVulkanContext *context,
|
||||
{
|
||||
priv->regions[i] = cairo_region_create_rectangle (&(cairo_rectangle_int_t) {
|
||||
0, 0,
|
||||
gdk_window_get_width (window),
|
||||
gdk_window_get_height (window),
|
||||
gdk_surface_get_width (window),
|
||||
gdk_surface_get_height (window),
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -705,8 +705,8 @@ gdk_vulkan_context_get_image (GdkVulkanContext *context,
|
||||
*
|
||||
* Gets the index of the image that is currently being drawn.
|
||||
*
|
||||
* This function can only be used between gdk_window_begin_draw_frame() and
|
||||
* gdk_window_end_draw_frame() calls for the toplevel window that the
|
||||
* This function can only be used between gdk_surface_begin_draw_frame() and
|
||||
* gdk_surface_end_draw_frame() calls for the toplevel window that the
|
||||
* @context is associated with.
|
||||
*
|
||||
* Returns: the index of the images that is being drawn
|
||||
@ -729,8 +729,8 @@ gdk_vulkan_context_get_draw_index (GdkVulkanContext *context)
|
||||
* Gets the Vulkan semaphore that protects access to the image that is
|
||||
* currently being drawn.
|
||||
*
|
||||
* This function can only be used between gdk_window_begin_draw_frame() and
|
||||
* gdk_window_end_draw_frame() calls for the toplevel window that the
|
||||
* This function can only be used between gdk_surface_begin_draw_frame() and
|
||||
* gdk_surface_end_draw_frame() calls for the toplevel window that the
|
||||
* @context is associated with.
|
||||
*
|
||||
* Returns: (transfer none): the VkSemaphore
|
||||
|
2398
gdk/gdkwindow.c
2398
gdk/gdkwindow.c
File diff suppressed because it is too large
Load Diff
454
gdk/gdkwindow.h
454
gdk/gdkwindow.h
@ -22,8 +22,8 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_WINDOW_H__
|
||||
#define __GDK_WINDOW_H__
|
||||
#ifndef __GDK_SURFACE_H__
|
||||
#define __GDK_SURFACE_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
@ -41,15 +41,15 @@ G_BEGIN_DECLS
|
||||
typedef struct _GdkGeometry GdkGeometry;
|
||||
|
||||
/**
|
||||
* GdkWindowType:
|
||||
* @GDK_WINDOW_ROOT: root window; this window has no parent, covers the entire
|
||||
* GdkSurfaceType:
|
||||
* @GDK_SURFACE_ROOT: root window; this window has no parent, covers the entire
|
||||
* screen, and is created by the window system
|
||||
* @GDK_WINDOW_TOPLEVEL: toplevel window (used to implement #GtkWindow)
|
||||
* @GDK_WINDOW_CHILD: child window (used to implement e.g. #GtkEntry)
|
||||
* @GDK_WINDOW_TEMP: override redirect temporary window (used to implement
|
||||
* @GDK_SURFACE_TOPLEVEL: toplevel window (used to implement #GtkWindow)
|
||||
* @GDK_SURFACE_CHILD: child window (used to implement e.g. #GtkEntry)
|
||||
* @GDK_SURFACE_TEMP: override redirect temporary window (used to implement
|
||||
* #GtkMenu)
|
||||
* @GDK_WINDOW_FOREIGN: foreign window (see gdk_window_foreign_new())
|
||||
* @GDK_WINDOW_SUBSURFACE: subsurface-based window; This window is visually
|
||||
* @GDK_SURFACE_FOREIGN: foreign window (see gdk_surface_foreign_new())
|
||||
* @GDK_SURFACE_SUBSURFACE: subsurface-based window; This window is visually
|
||||
* tied to a toplevel, and is moved/stacked with it. Currently this window
|
||||
* type is only implemented in Wayland. Since 3.14
|
||||
*
|
||||
@ -57,18 +57,18 @@ typedef struct _GdkGeometry GdkGeometry;
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GDK_WINDOW_ROOT,
|
||||
GDK_WINDOW_TOPLEVEL,
|
||||
GDK_WINDOW_CHILD,
|
||||
GDK_WINDOW_TEMP,
|
||||
GDK_WINDOW_FOREIGN,
|
||||
GDK_WINDOW_SUBSURFACE
|
||||
} GdkWindowType;
|
||||
GDK_SURFACE_ROOT,
|
||||
GDK_SURFACE_TOPLEVEL,
|
||||
GDK_SURFACE_CHILD,
|
||||
GDK_SURFACE_TEMP,
|
||||
GDK_SURFACE_FOREIGN,
|
||||
GDK_SURFACE_SUBSURFACE
|
||||
} GdkSurfaceType;
|
||||
|
||||
/* Size restriction enumeration.
|
||||
*/
|
||||
/**
|
||||
* GdkWindowHints:
|
||||
* GdkSurfaceHints:
|
||||
* @GDK_HINT_POS: indicates that the program has positioned the window
|
||||
* @GDK_HINT_MIN_SIZE: min size fields are set
|
||||
* @GDK_HINT_MAX_SIZE: max size fields are set
|
||||
@ -101,11 +101,11 @@ typedef enum
|
||||
GDK_HINT_WIN_GRAVITY = 1 << 6,
|
||||
GDK_HINT_USER_POS = 1 << 7,
|
||||
GDK_HINT_USER_SIZE = 1 << 8
|
||||
} GdkWindowHints;
|
||||
} GdkSurfaceHints;
|
||||
|
||||
/* The next two enumeration values current match the
|
||||
* Motif constants. If this is changed, the implementation
|
||||
* of gdk_window_set_decorations/gdk_window_set_functions
|
||||
* of gdk_surface_set_decorations/gdk_surface_set_functions
|
||||
* will need to change as well.
|
||||
*/
|
||||
/**
|
||||
@ -157,7 +157,7 @@ typedef enum
|
||||
} GdkWMFunction;
|
||||
|
||||
/* Currently, these are the same values numerically as in the
|
||||
* X protocol. If you change that, gdkwindow-x11.c/gdk_window_set_geometry_hints()
|
||||
* X protocol. If you change that, gdkwindow-x11.c/gdk_surface_set_geometry_hints()
|
||||
* will need fixing.
|
||||
*/
|
||||
/**
|
||||
@ -239,29 +239,29 @@ typedef enum
|
||||
} GdkAnchorHints;
|
||||
|
||||
/**
|
||||
* GdkWindowEdge:
|
||||
* @GDK_WINDOW_EDGE_NORTH_WEST: the top left corner.
|
||||
* @GDK_WINDOW_EDGE_NORTH: the top edge.
|
||||
* @GDK_WINDOW_EDGE_NORTH_EAST: the top right corner.
|
||||
* @GDK_WINDOW_EDGE_WEST: the left edge.
|
||||
* @GDK_WINDOW_EDGE_EAST: the right edge.
|
||||
* @GDK_WINDOW_EDGE_SOUTH_WEST: the lower left corner.
|
||||
* @GDK_WINDOW_EDGE_SOUTH: the lower edge.
|
||||
* @GDK_WINDOW_EDGE_SOUTH_EAST: the lower right corner.
|
||||
* GdkSurfaceEdge:
|
||||
* @GDK_SURFACE_EDGE_NORTH_WEST: the top left corner.
|
||||
* @GDK_SURFACE_EDGE_NORTH: the top edge.
|
||||
* @GDK_SURFACE_EDGE_NORTH_EAST: the top right corner.
|
||||
* @GDK_SURFACE_EDGE_WEST: the left edge.
|
||||
* @GDK_SURFACE_EDGE_EAST: the right edge.
|
||||
* @GDK_SURFACE_EDGE_SOUTH_WEST: the lower left corner.
|
||||
* @GDK_SURFACE_EDGE_SOUTH: the lower edge.
|
||||
* @GDK_SURFACE_EDGE_SOUTH_EAST: the lower right corner.
|
||||
*
|
||||
* Determines a window edge or corner.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GDK_WINDOW_EDGE_NORTH_WEST,
|
||||
GDK_WINDOW_EDGE_NORTH,
|
||||
GDK_WINDOW_EDGE_NORTH_EAST,
|
||||
GDK_WINDOW_EDGE_WEST,
|
||||
GDK_WINDOW_EDGE_EAST,
|
||||
GDK_WINDOW_EDGE_SOUTH_WEST,
|
||||
GDK_WINDOW_EDGE_SOUTH,
|
||||
GDK_WINDOW_EDGE_SOUTH_EAST
|
||||
} GdkWindowEdge;
|
||||
GDK_SURFACE_EDGE_NORTH_WEST,
|
||||
GDK_SURFACE_EDGE_NORTH,
|
||||
GDK_SURFACE_EDGE_NORTH_EAST,
|
||||
GDK_SURFACE_EDGE_WEST,
|
||||
GDK_SURFACE_EDGE_EAST,
|
||||
GDK_SURFACE_EDGE_SOUTH_WEST,
|
||||
GDK_SURFACE_EDGE_SOUTH,
|
||||
GDK_SURFACE_EDGE_SOUTH_EAST
|
||||
} GdkSurfaceEdge;
|
||||
|
||||
/**
|
||||
* GdkFullscreenMode:
|
||||
@ -302,9 +302,9 @@ typedef enum
|
||||
* The #GdkGeometry struct gives the window manager information about
|
||||
* a window’s geometry constraints. Normally you would set these on
|
||||
* the GTK+ level using gtk_window_set_geometry_hints(). #GtkWindow
|
||||
* then sets the hints on the #GdkWindow it creates.
|
||||
* then sets the hints on the #GdkSurface it creates.
|
||||
*
|
||||
* gdk_window_set_geometry_hints() expects the hints to be fully valid already
|
||||
* gdk_surface_set_geometry_hints() expects the hints to be fully valid already
|
||||
* and simply passes them to the window manager; in contrast,
|
||||
* gtk_window_set_geometry_hints() performs some interpretation. For example,
|
||||
* #GtkWindow will apply the hints to the geometry widget instead of the
|
||||
@ -371,62 +371,62 @@ struct _GdkGeometry
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkWindowState:
|
||||
* @GDK_WINDOW_STATE_WITHDRAWN: the window is not shown.
|
||||
* @GDK_WINDOW_STATE_ICONIFIED: the window is minimized.
|
||||
* @GDK_WINDOW_STATE_MAXIMIZED: the window is maximized.
|
||||
* @GDK_WINDOW_STATE_STICKY: the window is sticky.
|
||||
* @GDK_WINDOW_STATE_FULLSCREEN: the window is maximized without
|
||||
* GdkSurfaceState:
|
||||
* @GDK_SURFACE_STATE_WITHDRAWN: the window is not shown.
|
||||
* @GDK_SURFACE_STATE_ICONIFIED: the window is minimized.
|
||||
* @GDK_SURFACE_STATE_MAXIMIZED: the window is maximized.
|
||||
* @GDK_SURFACE_STATE_STICKY: the window is sticky.
|
||||
* @GDK_SURFACE_STATE_FULLSCREEN: the window is maximized without
|
||||
* decorations.
|
||||
* @GDK_WINDOW_STATE_ABOVE: the window is kept above other windows.
|
||||
* @GDK_WINDOW_STATE_BELOW: the window is kept below other windows.
|
||||
* @GDK_WINDOW_STATE_FOCUSED: the window is presented as focused (with active decorations).
|
||||
* @GDK_WINDOW_STATE_TILED: the window is in a tiled state, Since 3.10. Since 3.91.2, this
|
||||
* @GDK_SURFACE_STATE_ABOVE: the window is kept above other windows.
|
||||
* @GDK_SURFACE_STATE_BELOW: the window is kept below other windows.
|
||||
* @GDK_SURFACE_STATE_FOCUSED: the window is presented as focused (with active decorations).
|
||||
* @GDK_SURFACE_STATE_TILED: the window is in a tiled state, Since 3.10. Since 3.91.2, this
|
||||
* is deprecated in favor of per-edge information.
|
||||
* @GDK_WINDOW_STATE_TOP_TILED: whether the top edge is tiled, Since 3.91.2
|
||||
* @GDK_WINDOW_STATE_TOP_RESIZABLE: whether the top edge is resizable, Since 3.91.2
|
||||
* @GDK_WINDOW_STATE_RIGHT_TILED: whether the right edge is tiled, Since 3.91.2
|
||||
* @GDK_WINDOW_STATE_RIGHT_RESIZABLE: whether the right edge is resizable, Since 3.91.2
|
||||
* @GDK_WINDOW_STATE_BOTTOM_TILED: whether the bottom edge is tiled, Since 3.91.2
|
||||
* @GDK_WINDOW_STATE_BOTTOM_RESIZABLE: whether the bottom edge is resizable, Since 3.91.2
|
||||
* @GDK_WINDOW_STATE_LEFT_TILED: whether the left edge is tiled, Since 3.91.2
|
||||
* @GDK_WINDOW_STATE_LEFT_RESIZABLE: whether the left edge is resizable, Since 3.91.2
|
||||
* @GDK_SURFACE_STATE_TOP_TILED: whether the top edge is tiled, Since 3.91.2
|
||||
* @GDK_SURFACE_STATE_TOP_RESIZABLE: whether the top edge is resizable, Since 3.91.2
|
||||
* @GDK_SURFACE_STATE_RIGHT_TILED: whether the right edge is tiled, Since 3.91.2
|
||||
* @GDK_SURFACE_STATE_RIGHT_RESIZABLE: whether the right edge is resizable, Since 3.91.2
|
||||
* @GDK_SURFACE_STATE_BOTTOM_TILED: whether the bottom edge is tiled, Since 3.91.2
|
||||
* @GDK_SURFACE_STATE_BOTTOM_RESIZABLE: whether the bottom edge is resizable, Since 3.91.2
|
||||
* @GDK_SURFACE_STATE_LEFT_TILED: whether the left edge is tiled, Since 3.91.2
|
||||
* @GDK_SURFACE_STATE_LEFT_RESIZABLE: whether the left edge is resizable, Since 3.91.2
|
||||
*
|
||||
* Specifies the state of a toplevel window.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GDK_WINDOW_STATE_WITHDRAWN = 1 << 0,
|
||||
GDK_WINDOW_STATE_ICONIFIED = 1 << 1,
|
||||
GDK_WINDOW_STATE_MAXIMIZED = 1 << 2,
|
||||
GDK_WINDOW_STATE_STICKY = 1 << 3,
|
||||
GDK_WINDOW_STATE_FULLSCREEN = 1 << 4,
|
||||
GDK_WINDOW_STATE_ABOVE = 1 << 5,
|
||||
GDK_WINDOW_STATE_BELOW = 1 << 6,
|
||||
GDK_WINDOW_STATE_FOCUSED = 1 << 7,
|
||||
GDK_WINDOW_STATE_TILED = 1 << 8,
|
||||
GDK_WINDOW_STATE_TOP_TILED = 1 << 9,
|
||||
GDK_WINDOW_STATE_TOP_RESIZABLE = 1 << 10,
|
||||
GDK_WINDOW_STATE_RIGHT_TILED = 1 << 11,
|
||||
GDK_WINDOW_STATE_RIGHT_RESIZABLE = 1 << 12,
|
||||
GDK_WINDOW_STATE_BOTTOM_TILED = 1 << 13,
|
||||
GDK_WINDOW_STATE_BOTTOM_RESIZABLE = 1 << 14,
|
||||
GDK_WINDOW_STATE_LEFT_TILED = 1 << 15,
|
||||
GDK_WINDOW_STATE_LEFT_RESIZABLE = 1 << 16
|
||||
} GdkWindowState;
|
||||
GDK_SURFACE_STATE_WITHDRAWN = 1 << 0,
|
||||
GDK_SURFACE_STATE_ICONIFIED = 1 << 1,
|
||||
GDK_SURFACE_STATE_MAXIMIZED = 1 << 2,
|
||||
GDK_SURFACE_STATE_STICKY = 1 << 3,
|
||||
GDK_SURFACE_STATE_FULLSCREEN = 1 << 4,
|
||||
GDK_SURFACE_STATE_ABOVE = 1 << 5,
|
||||
GDK_SURFACE_STATE_BELOW = 1 << 6,
|
||||
GDK_SURFACE_STATE_FOCUSED = 1 << 7,
|
||||
GDK_SURFACE_STATE_TILED = 1 << 8,
|
||||
GDK_SURFACE_STATE_TOP_TILED = 1 << 9,
|
||||
GDK_SURFACE_STATE_TOP_RESIZABLE = 1 << 10,
|
||||
GDK_SURFACE_STATE_RIGHT_TILED = 1 << 11,
|
||||
GDK_SURFACE_STATE_RIGHT_RESIZABLE = 1 << 12,
|
||||
GDK_SURFACE_STATE_BOTTOM_TILED = 1 << 13,
|
||||
GDK_SURFACE_STATE_BOTTOM_RESIZABLE = 1 << 14,
|
||||
GDK_SURFACE_STATE_LEFT_TILED = 1 << 15,
|
||||
GDK_SURFACE_STATE_LEFT_RESIZABLE = 1 << 16
|
||||
} GdkSurfaceState;
|
||||
|
||||
|
||||
typedef struct _GdkWindowClass GdkWindowClass;
|
||||
typedef struct _GdkSurfaceClass GdkSurfaceClass;
|
||||
|
||||
#define GDK_TYPE_WINDOW (gdk_window_get_type ())
|
||||
#define GDK_WINDOW(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WINDOW, GdkWindow))
|
||||
#define GDK_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WINDOW, GdkWindowClass))
|
||||
#define GDK_IS_WINDOW(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW))
|
||||
#define GDK_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WINDOW))
|
||||
#define GDK_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WINDOW, GdkWindowClass))
|
||||
#define GDK_TYPE_SURFACE (gdk_surface_get_type ())
|
||||
#define GDK_SURFACE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_SURFACE, GdkSurface))
|
||||
#define GDK_SURFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_SURFACE, GdkSurfaceClass))
|
||||
#define GDK_IS_SURFACE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_SURFACE))
|
||||
#define GDK_IS_SURFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_SURFACE))
|
||||
#define GDK_SURFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_SURFACE, GdkSurfaceClass))
|
||||
|
||||
|
||||
struct _GdkWindowClass
|
||||
struct _GdkSurfaceClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
@ -444,81 +444,81 @@ struct _GdkWindowClass
|
||||
/* Windows
|
||||
*/
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gdk_window_get_type (void) G_GNUC_CONST;
|
||||
GType gdk_surface_get_type (void) G_GNUC_CONST;
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow * gdk_window_new_toplevel (GdkDisplay *display,
|
||||
GdkSurface * gdk_surface_new_toplevel (GdkDisplay *display,
|
||||
int width,
|
||||
int height);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow * gdk_window_new_popup (GdkDisplay *display,
|
||||
GdkSurface * gdk_surface_new_popup (GdkDisplay *display,
|
||||
const GdkRectangle *position);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow * gdk_window_new_temp (GdkDisplay *display);
|
||||
GdkSurface * gdk_surface_new_temp (GdkDisplay *display);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow * gdk_window_new_child (GdkWindow *parent,
|
||||
GdkSurface * gdk_surface_new_child (GdkSurface *parent,
|
||||
const GdkRectangle *position);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_destroy (GdkWindow *window);
|
||||
void gdk_surface_destroy (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindowType gdk_window_get_window_type (GdkWindow *window);
|
||||
GdkSurfaceType gdk_surface_get_window_type (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_window_is_destroyed (GdkWindow *window);
|
||||
gboolean gdk_surface_is_destroyed (GdkSurface *window);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkDisplay * gdk_window_get_display (GdkWindow *window);
|
||||
GdkDisplay * gdk_surface_get_display (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_show (GdkWindow *window);
|
||||
void gdk_surface_show (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_hide (GdkWindow *window);
|
||||
void gdk_surface_hide (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_withdraw (GdkWindow *window);
|
||||
void gdk_surface_withdraw (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_show_unraised (GdkWindow *window);
|
||||
void gdk_surface_show_unraised (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_move (GdkWindow *window,
|
||||
void gdk_surface_move (GdkSurface *window,
|
||||
gint x,
|
||||
gint y);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_resize (GdkWindow *window,
|
||||
void gdk_surface_resize (GdkSurface *window,
|
||||
gint width,
|
||||
gint height);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_move_resize (GdkWindow *window,
|
||||
void gdk_surface_move_resize (GdkSurface *window,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_raise (GdkWindow *window);
|
||||
void gdk_surface_raise (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_lower (GdkWindow *window);
|
||||
void gdk_surface_lower (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_restack (GdkWindow *window,
|
||||
GdkWindow *sibling,
|
||||
void gdk_surface_restack (GdkSurface *window,
|
||||
GdkSurface *sibling,
|
||||
gboolean above);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_focus (GdkWindow *window,
|
||||
void gdk_surface_focus (GdkSurface *window,
|
||||
guint32 timestamp);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_user_data (GdkWindow *window,
|
||||
void gdk_surface_set_user_data (GdkSurface *window,
|
||||
gpointer user_data);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_window_get_accept_focus (GdkWindow *window);
|
||||
gboolean gdk_surface_get_accept_focus (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_accept_focus (GdkWindow *window,
|
||||
void gdk_surface_set_accept_focus (GdkSurface *window,
|
||||
gboolean accept_focus);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_window_get_focus_on_map (GdkWindow *window);
|
||||
gboolean gdk_surface_get_focus_on_map (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_focus_on_map (GdkWindow *window,
|
||||
void gdk_surface_set_focus_on_map (GdkSurface *window,
|
||||
gboolean focus_on_map);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_scroll (GdkWindow *window,
|
||||
void gdk_surface_scroll (GdkSurface *window,
|
||||
gint dx,
|
||||
gint dy);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_move_region (GdkWindow *window,
|
||||
void gdk_surface_move_region (GdkSurface *window,
|
||||
const cairo_region_t *region,
|
||||
gint dx,
|
||||
gint dy);
|
||||
@ -528,7 +528,7 @@ void gdk_window_move_region (GdkWindow *window,
|
||||
* - cool feature, needed for Drag and Drag for example.
|
||||
*/
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_shape_combine_region (GdkWindow *window,
|
||||
void gdk_surface_shape_combine_region (GdkSurface *window,
|
||||
const cairo_region_t *shape_region,
|
||||
gint offset_x,
|
||||
gint offset_y);
|
||||
@ -541,7 +541,7 @@ void gdk_window_shape_combine_region (GdkWindow *window,
|
||||
* - Raster
|
||||
*/
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_child_shapes (GdkWindow *window);
|
||||
void gdk_surface_set_child_shapes (GdkSurface *window);
|
||||
|
||||
/*
|
||||
* This routine allows you to merge (ie ADD) child shapes to your
|
||||
@ -551,24 +551,24 @@ void gdk_window_set_child_shapes (GdkWindow *window);
|
||||
* - Raster
|
||||
*/
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_merge_child_shapes (GdkWindow *window);
|
||||
void gdk_surface_merge_child_shapes (GdkSurface *window);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_input_shape_combine_region (GdkWindow *window,
|
||||
void gdk_surface_input_shape_combine_region (GdkSurface *window,
|
||||
const cairo_region_t *shape_region,
|
||||
gint offset_x,
|
||||
gint offset_y);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_child_input_shapes (GdkWindow *window);
|
||||
void gdk_surface_set_child_input_shapes (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_merge_child_input_shapes (GdkWindow *window);
|
||||
void gdk_surface_merge_child_input_shapes (GdkSurface *window);
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_pass_through (GdkWindow *window,
|
||||
void gdk_surface_set_pass_through (GdkSurface *window,
|
||||
gboolean pass_through);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_window_get_pass_through (GdkWindow *window);
|
||||
gboolean gdk_surface_get_pass_through (GdkSurface *window);
|
||||
|
||||
/*
|
||||
* Check if a window has been shown, and whether all its
|
||||
@ -577,273 +577,273 @@ gboolean gdk_window_get_pass_through (GdkWindow *window);
|
||||
* viewable in the X sense.
|
||||
*/
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_window_is_visible (GdkWindow *window);
|
||||
gboolean gdk_surface_is_visible (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_window_is_viewable (GdkWindow *window);
|
||||
gboolean gdk_surface_is_viewable (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_window_is_input_only (GdkWindow *window);
|
||||
gboolean gdk_surface_is_input_only (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_window_is_shaped (GdkWindow *window);
|
||||
gboolean gdk_surface_is_shaped (GdkSurface *window);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindowState gdk_window_get_state (GdkWindow *window);
|
||||
GdkSurfaceState gdk_surface_get_state (GdkSurface *window);
|
||||
|
||||
|
||||
/* GdkWindow */
|
||||
/* GdkSurface */
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_window_has_native (GdkWindow *window);
|
||||
gboolean gdk_surface_has_native (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_type_hint (GdkWindow *window,
|
||||
GdkWindowTypeHint hint);
|
||||
void gdk_surface_set_type_hint (GdkSurface *window,
|
||||
GdkSurfaceTypeHint hint);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindowTypeHint gdk_window_get_type_hint (GdkWindow *window);
|
||||
GdkSurfaceTypeHint gdk_surface_get_type_hint (GdkSurface *window);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_window_get_modal_hint (GdkWindow *window);
|
||||
gboolean gdk_surface_get_modal_hint (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_modal_hint (GdkWindow *window,
|
||||
void gdk_surface_set_modal_hint (GdkSurface *window,
|
||||
gboolean modal);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_skip_taskbar_hint (GdkWindow *window,
|
||||
void gdk_surface_set_skip_taskbar_hint (GdkSurface *window,
|
||||
gboolean skips_taskbar);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_skip_pager_hint (GdkWindow *window,
|
||||
void gdk_surface_set_skip_pager_hint (GdkSurface *window,
|
||||
gboolean skips_pager);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_urgency_hint (GdkWindow *window,
|
||||
void gdk_surface_set_urgency_hint (GdkSurface *window,
|
||||
gboolean urgent);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_geometry_hints (GdkWindow *window,
|
||||
void gdk_surface_set_geometry_hints (GdkSurface *window,
|
||||
const GdkGeometry *geometry,
|
||||
GdkWindowHints geom_mask);
|
||||
GdkSurfaceHints geom_mask);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
cairo_region_t *gdk_window_get_clip_region (GdkWindow *window);
|
||||
cairo_region_t *gdk_surface_get_clip_region (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
cairo_region_t *gdk_window_get_visible_region(GdkWindow *window);
|
||||
cairo_region_t *gdk_surface_get_visible_region(GdkSurface *window);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkDrawingContext *gdk_window_begin_draw_frame (GdkWindow *window,
|
||||
GdkDrawingContext *gdk_surface_begin_draw_frame (GdkSurface *window,
|
||||
GdkDrawContext *context,
|
||||
const cairo_region_t *region);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_end_draw_frame (GdkWindow *window,
|
||||
void gdk_surface_end_draw_frame (GdkSurface *window,
|
||||
GdkDrawingContext *context);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_title (GdkWindow *window,
|
||||
void gdk_surface_set_title (GdkSurface *window,
|
||||
const gchar *title);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_role (GdkWindow *window,
|
||||
void gdk_surface_set_role (GdkSurface *window,
|
||||
const gchar *role);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_startup_id (GdkWindow *window,
|
||||
void gdk_surface_set_startup_id (GdkSurface *window,
|
||||
const gchar *startup_id);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_transient_for (GdkWindow *window,
|
||||
GdkWindow *parent);
|
||||
void gdk_surface_set_transient_for (GdkSurface *window,
|
||||
GdkSurface *parent);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_cursor (GdkWindow *window,
|
||||
void gdk_surface_set_cursor (GdkSurface *window,
|
||||
GdkCursor *cursor);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkCursor *gdk_window_get_cursor (GdkWindow *window);
|
||||
GdkCursor *gdk_surface_get_cursor (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_device_cursor (GdkWindow *window,
|
||||
void gdk_surface_set_device_cursor (GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
GdkCursor *cursor);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkCursor *gdk_window_get_device_cursor (GdkWindow *window,
|
||||
GdkCursor *gdk_surface_get_device_cursor (GdkSurface *window,
|
||||
GdkDevice *device);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_get_user_data (GdkWindow *window,
|
||||
void gdk_surface_get_user_data (GdkSurface *window,
|
||||
gpointer *data);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_get_geometry (GdkWindow *window,
|
||||
void gdk_surface_get_geometry (GdkSurface *window,
|
||||
gint *x,
|
||||
gint *y,
|
||||
gint *width,
|
||||
gint *height);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
int gdk_window_get_width (GdkWindow *window);
|
||||
int gdk_surface_get_width (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
int gdk_window_get_height (GdkWindow *window);
|
||||
int gdk_surface_get_height (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_get_position (GdkWindow *window,
|
||||
void gdk_surface_get_position (GdkSurface *window,
|
||||
gint *x,
|
||||
gint *y);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gint gdk_window_get_origin (GdkWindow *window,
|
||||
gint gdk_surface_get_origin (GdkSurface *window,
|
||||
gint *x,
|
||||
gint *y);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_get_root_coords (GdkWindow *window,
|
||||
void gdk_surface_get_root_coords (GdkSurface *window,
|
||||
gint x,
|
||||
gint y,
|
||||
gint *root_x,
|
||||
gint *root_y);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_coords_to_parent (GdkWindow *window,
|
||||
void gdk_surface_coords_to_parent (GdkSurface *window,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble *parent_x,
|
||||
gdouble *parent_y);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_coords_from_parent (GdkWindow *window,
|
||||
void gdk_surface_coords_from_parent (GdkSurface *window,
|
||||
gdouble parent_x,
|
||||
gdouble parent_y,
|
||||
gdouble *x,
|
||||
gdouble *y);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_get_root_origin (GdkWindow *window,
|
||||
void gdk_surface_get_root_origin (GdkSurface *window,
|
||||
gint *x,
|
||||
gint *y);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_get_frame_extents (GdkWindow *window,
|
||||
void gdk_surface_get_frame_extents (GdkSurface *window,
|
||||
GdkRectangle *rect);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gint gdk_window_get_scale_factor (GdkWindow *window);
|
||||
gint gdk_surface_get_scale_factor (GdkSurface *window);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow * gdk_window_get_device_position (GdkWindow *window,
|
||||
GdkSurface * gdk_surface_get_device_position (GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
gint *x,
|
||||
gint *y,
|
||||
GdkModifierType *mask);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow * gdk_window_get_device_position_double (GdkWindow *window,
|
||||
GdkSurface * gdk_surface_get_device_position_double (GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
gdouble *x,
|
||||
gdouble *y,
|
||||
GdkModifierType *mask);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow * gdk_window_get_parent (GdkWindow *window);
|
||||
GdkSurface * gdk_surface_get_parent (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow * gdk_window_get_toplevel (GdkWindow *window);
|
||||
GdkSurface * gdk_surface_get_toplevel (GdkSurface *window);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GList * gdk_window_get_children (GdkWindow *window);
|
||||
GList * gdk_surface_get_children (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GList * gdk_window_peek_children (GdkWindow *window);
|
||||
GList * gdk_surface_peek_children (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GList * gdk_window_get_children_with_user_data (GdkWindow *window,
|
||||
GList * gdk_surface_get_children_with_user_data (GdkSurface *window,
|
||||
gpointer user_data);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkEventMask gdk_window_get_events (GdkWindow *window);
|
||||
GdkEventMask gdk_surface_get_events (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_events (GdkWindow *window,
|
||||
void gdk_surface_set_events (GdkSurface *window,
|
||||
GdkEventMask event_mask);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_device_events (GdkWindow *window,
|
||||
void gdk_surface_set_device_events (GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
GdkEventMask event_mask);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkEventMask gdk_window_get_device_events (GdkWindow *window,
|
||||
GdkEventMask gdk_surface_get_device_events (GdkSurface *window,
|
||||
GdkDevice *device);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_icon_list (GdkWindow *window,
|
||||
void gdk_surface_set_icon_list (GdkSurface *window,
|
||||
GList *surfaces);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_icon_name (GdkWindow *window,
|
||||
void gdk_surface_set_icon_name (GdkSurface *window,
|
||||
const gchar *name);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_group (GdkWindow *window,
|
||||
GdkWindow *leader);
|
||||
void gdk_surface_set_group (GdkSurface *window,
|
||||
GdkSurface *leader);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow* gdk_window_get_group (GdkWindow *window);
|
||||
GdkSurface* gdk_surface_get_group (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_decorations (GdkWindow *window,
|
||||
void gdk_surface_set_decorations (GdkSurface *window,
|
||||
GdkWMDecoration decorations);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_window_get_decorations (GdkWindow *window,
|
||||
gboolean gdk_surface_get_decorations (GdkSurface *window,
|
||||
GdkWMDecoration *decorations);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_functions (GdkWindow *window,
|
||||
void gdk_surface_set_functions (GdkSurface *window,
|
||||
GdkWMFunction functions);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
cairo_surface_t *
|
||||
gdk_window_create_similar_surface (GdkWindow *window,
|
||||
gdk_surface_create_similar_surface (GdkSurface *window,
|
||||
cairo_content_t content,
|
||||
int width,
|
||||
int height);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
cairo_surface_t *
|
||||
gdk_window_create_similar_image_surface (GdkWindow *window,
|
||||
gdk_surface_create_similar_image_surface (GdkSurface *window,
|
||||
cairo_format_t format,
|
||||
int width,
|
||||
int height,
|
||||
int scale);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_beep (GdkWindow *window);
|
||||
void gdk_surface_beep (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_iconify (GdkWindow *window);
|
||||
void gdk_surface_iconify (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_deiconify (GdkWindow *window);
|
||||
void gdk_surface_deiconify (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_stick (GdkWindow *window);
|
||||
void gdk_surface_stick (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_unstick (GdkWindow *window);
|
||||
void gdk_surface_unstick (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_maximize (GdkWindow *window);
|
||||
void gdk_surface_maximize (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_unmaximize (GdkWindow *window);
|
||||
void gdk_surface_unmaximize (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_fullscreen (GdkWindow *window);
|
||||
void gdk_surface_fullscreen (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_fullscreen_on_monitor (GdkWindow *window,
|
||||
void gdk_surface_fullscreen_on_monitor (GdkSurface *window,
|
||||
GdkMonitor *monitor);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_fullscreen_mode (GdkWindow *window,
|
||||
void gdk_surface_set_fullscreen_mode (GdkSurface *window,
|
||||
GdkFullscreenMode mode);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkFullscreenMode
|
||||
gdk_window_get_fullscreen_mode (GdkWindow *window);
|
||||
gdk_surface_get_fullscreen_mode (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_unfullscreen (GdkWindow *window);
|
||||
void gdk_surface_unfullscreen (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_keep_above (GdkWindow *window,
|
||||
void gdk_surface_set_keep_above (GdkSurface *window,
|
||||
gboolean setting);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_keep_below (GdkWindow *window,
|
||||
void gdk_surface_set_keep_below (GdkSurface *window,
|
||||
gboolean setting);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_opacity (GdkWindow *window,
|
||||
void gdk_surface_set_opacity (GdkSurface *window,
|
||||
gdouble opacity);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_register_dnd (GdkWindow *window);
|
||||
void gdk_surface_register_dnd (GdkSurface *window);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_begin_resize_drag (GdkWindow *window,
|
||||
GdkWindowEdge edge,
|
||||
void gdk_surface_begin_resize_drag (GdkSurface *window,
|
||||
GdkSurfaceEdge edge,
|
||||
gint button,
|
||||
gint root_x,
|
||||
gint root_y,
|
||||
guint32 timestamp);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_begin_resize_drag_for_device (GdkWindow *window,
|
||||
GdkWindowEdge edge,
|
||||
void gdk_surface_begin_resize_drag_for_device (GdkSurface *window,
|
||||
GdkSurfaceEdge edge,
|
||||
GdkDevice *device,
|
||||
gint button,
|
||||
gint root_x,
|
||||
gint root_y,
|
||||
guint32 timestamp);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_begin_move_drag (GdkWindow *window,
|
||||
void gdk_surface_begin_move_drag (GdkSurface *window,
|
||||
gint button,
|
||||
gint root_x,
|
||||
gint root_y,
|
||||
guint32 timestamp);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_begin_move_drag_for_device (GdkWindow *window,
|
||||
void gdk_surface_begin_move_drag_for_device (GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
gint button,
|
||||
gint root_x,
|
||||
@ -852,44 +852,44 @@ void gdk_window_begin_move_drag_for_device (GdkWindow *window,
|
||||
|
||||
/* Interface for dirty-region queueing */
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_invalidate_rect (GdkWindow *window,
|
||||
void gdk_surface_invalidate_rect (GdkSurface *window,
|
||||
const GdkRectangle *rect,
|
||||
gboolean invalidate_children);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_invalidate_region (GdkWindow *window,
|
||||
void gdk_surface_invalidate_region (GdkSurface *window,
|
||||
const cairo_region_t *region,
|
||||
gboolean invalidate_children);
|
||||
|
||||
/**
|
||||
* GdkWindowChildFunc:
|
||||
* @window: a #GdkWindow
|
||||
* GdkSurfaceChildFunc:
|
||||
* @window: a #GdkSurface
|
||||
* @user_data: user data
|
||||
*
|
||||
* A function of this type is passed to gdk_window_invalidate_maybe_recurse().
|
||||
* A function of this type is passed to gdk_surface_invalidate_maybe_recurse().
|
||||
* It gets called for each child of the window to determine whether to
|
||||
* recursively invalidate it or now.
|
||||
*
|
||||
* Returns: %TRUE to invalidate @window recursively
|
||||
*/
|
||||
typedef gboolean (*GdkWindowChildFunc) (GdkWindow *window,
|
||||
typedef gboolean (*GdkSurfaceChildFunc) (GdkSurface *window,
|
||||
gpointer user_data);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_invalidate_maybe_recurse (GdkWindow *window,
|
||||
void gdk_surface_invalidate_maybe_recurse (GdkSurface *window,
|
||||
const cairo_region_t *region,
|
||||
GdkWindowChildFunc child_func,
|
||||
GdkSurfaceChildFunc child_func,
|
||||
gpointer user_data);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
cairo_region_t *gdk_window_get_update_area (GdkWindow *window);
|
||||
cairo_region_t *gdk_surface_get_update_area (GdkSurface *window);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_freeze_updates (GdkWindow *window);
|
||||
void gdk_surface_freeze_updates (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_thaw_updates (GdkWindow *window);
|
||||
void gdk_surface_thaw_updates (GdkSurface *window);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_constrain_size (GdkGeometry *geometry,
|
||||
GdkWindowHints flags,
|
||||
void gdk_surface_constrain_size (GdkGeometry *geometry,
|
||||
GdkSurfaceHints flags,
|
||||
gint width,
|
||||
gint height,
|
||||
gint *new_width,
|
||||
@ -897,37 +897,37 @@ void gdk_window_constrain_size (GdkGeometry *geometry,
|
||||
|
||||
/* Multidevice support */
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_support_multidevice (GdkWindow *window,
|
||||
void gdk_surface_set_support_multidevice (GdkSurface *window,
|
||||
gboolean support_multidevice);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_window_get_support_multidevice (GdkWindow *window);
|
||||
gboolean gdk_surface_get_support_multidevice (GdkSurface *window);
|
||||
|
||||
/* Frame clock */
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkFrameClock* gdk_window_get_frame_clock (GdkWindow *window);
|
||||
GdkFrameClock* gdk_surface_get_frame_clock (GdkSurface *window);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_opaque_region (GdkWindow *window,
|
||||
void gdk_surface_set_opaque_region (GdkSurface *window,
|
||||
cairo_region_t *region);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_window_set_shadow_width (GdkWindow *window,
|
||||
void gdk_surface_set_shadow_width (GdkSurface *window,
|
||||
gint left,
|
||||
gint right,
|
||||
gint top,
|
||||
gint bottom);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_window_show_window_menu (GdkWindow *window,
|
||||
gboolean gdk_surface_show_window_menu (GdkSurface *window,
|
||||
GdkEvent *event);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkGLContext * gdk_window_create_gl_context (GdkWindow *window,
|
||||
GdkGLContext * gdk_surface_create_gl_context (GdkSurface *window,
|
||||
GError **error);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkVulkanContext *
|
||||
gdk_window_create_vulkan_context(GdkWindow *window,
|
||||
gdk_surface_create_vulkan_context(GdkSurface *window,
|
||||
GError **error);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_WINDOW_H__ */
|
||||
#endif /* __GDK_SURFACE_H__ */
|
||||
|
@ -29,10 +29,10 @@
|
||||
#include "gdkinternals.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GdkWindowImpl, gdk_window_impl, G_TYPE_OBJECT);
|
||||
G_DEFINE_TYPE (GdkSurfaceImpl, gdk_surface_impl, G_TYPE_OBJECT);
|
||||
|
||||
static gboolean
|
||||
gdk_window_impl_beep (GdkWindow *window)
|
||||
gdk_surface_impl_beep (GdkSurface *window)
|
||||
{
|
||||
/* FALSE means windows can't beep, so the display will be
|
||||
* made to beep instead. */
|
||||
@ -40,15 +40,15 @@ gdk_window_impl_beep (GdkWindow *window)
|
||||
}
|
||||
|
||||
static GdkDisplay *
|
||||
get_display_for_window (GdkWindow *primary,
|
||||
GdkWindow *secondary)
|
||||
get_display_for_window (GdkSurface *primary,
|
||||
GdkSurface *secondary)
|
||||
{
|
||||
GdkDisplay *display = gdk_window_get_display (primary);
|
||||
GdkDisplay *display = gdk_surface_get_display (primary);
|
||||
|
||||
if (display)
|
||||
return display;
|
||||
|
||||
display = gdk_window_get_display (secondary);
|
||||
display = gdk_surface_get_display (secondary);
|
||||
|
||||
if (display)
|
||||
return display;
|
||||
@ -173,21 +173,21 @@ maybe_flip_position (gint bounds_pos,
|
||||
return primary;
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
traverse_to_toplevel (GdkWindow *window,
|
||||
static GdkSurface *
|
||||
traverse_to_toplevel (GdkSurface *window,
|
||||
gint x,
|
||||
gint y,
|
||||
gint *toplevel_x,
|
||||
gint *toplevel_y)
|
||||
{
|
||||
GdkWindow *parent;
|
||||
GdkSurface *parent;
|
||||
gdouble xf = x;
|
||||
gdouble yf = y;
|
||||
|
||||
while ((parent = window->parent) != NULL &&
|
||||
(gdk_window_get_window_type (parent) != GDK_WINDOW_ROOT))
|
||||
(gdk_surface_get_window_type (parent) != GDK_SURFACE_ROOT))
|
||||
{
|
||||
gdk_window_coords_to_parent (window, xf, yf, &xf, &yf);
|
||||
gdk_surface_coords_to_parent (window, xf, yf, &xf, &yf);
|
||||
window = parent;
|
||||
}
|
||||
|
||||
@ -197,7 +197,7 @@ traverse_to_toplevel (GdkWindow *window,
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_window_impl_move_to_rect (GdkWindow *window,
|
||||
gdk_surface_impl_move_to_rect (GdkSurface *window,
|
||||
const GdkRectangle *rect,
|
||||
GdkGravity rect_anchor,
|
||||
GdkGravity window_anchor,
|
||||
@ -205,7 +205,7 @@ gdk_window_impl_move_to_rect (GdkWindow *window,
|
||||
gint rect_anchor_dx,
|
||||
gint rect_anchor_dy)
|
||||
{
|
||||
GdkWindow *transient_for_toplevel;
|
||||
GdkSurface *transient_for_toplevel;
|
||||
GdkDisplay *display;
|
||||
GdkMonitor *monitor;
|
||||
GdkRectangle bounds;
|
||||
@ -226,7 +226,7 @@ gdk_window_impl_move_to_rect (GdkWindow *window,
|
||||
&root_rect.x,
|
||||
&root_rect.y);
|
||||
|
||||
gdk_window_get_root_coords (transient_for_toplevel,
|
||||
gdk_surface_get_root_coords (transient_for_toplevel,
|
||||
root_rect.x,
|
||||
root_rect.y,
|
||||
&root_rect.x,
|
||||
@ -314,9 +314,9 @@ gdk_window_impl_move_to_rect (GdkWindow *window,
|
||||
final_rect.height += window->shadow_top + window->shadow_bottom;
|
||||
|
||||
if (final_rect.width != window->width || final_rect.height != window->height)
|
||||
gdk_window_move_resize (window, final_rect.x, final_rect.y, final_rect.width, final_rect.height);
|
||||
gdk_surface_move_resize (window, final_rect.x, final_rect.y, final_rect.width, final_rect.height);
|
||||
else
|
||||
gdk_window_move (window, final_rect.x, final_rect.y);
|
||||
gdk_surface_move (window, final_rect.x, final_rect.y);
|
||||
|
||||
g_signal_emit_by_name (window,
|
||||
"moved-to-rect",
|
||||
@ -327,21 +327,21 @@ gdk_window_impl_move_to_rect (GdkWindow *window,
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_window_impl_process_updates_recurse (GdkWindow *window,
|
||||
gdk_surface_impl_process_updates_recurse (GdkSurface *window,
|
||||
cairo_region_t *region)
|
||||
{
|
||||
_gdk_window_process_updates_recurse (window, region);
|
||||
_gdk_surface_process_updates_recurse (window, region);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_window_impl_class_init (GdkWindowImplClass *impl_class)
|
||||
gdk_surface_impl_class_init (GdkSurfaceImplClass *impl_class)
|
||||
{
|
||||
impl_class->beep = gdk_window_impl_beep;
|
||||
impl_class->move_to_rect = gdk_window_impl_move_to_rect;
|
||||
impl_class->process_updates_recurse = gdk_window_impl_process_updates_recurse;
|
||||
impl_class->beep = gdk_surface_impl_beep;
|
||||
impl_class->move_to_rect = gdk_surface_impl_move_to_rect;
|
||||
impl_class->process_updates_recurse = gdk_surface_impl_process_updates_recurse;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_window_impl_init (GdkWindowImpl *impl)
|
||||
gdk_surface_impl_init (GdkSurfaceImpl *impl)
|
||||
{
|
||||
}
|
||||
|
@ -22,58 +22,58 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_WINDOW_IMPL_H__
|
||||
#define __GDK_WINDOW_IMPL_H__
|
||||
#ifndef __GDK_SURFACE_IMPL_H__
|
||||
#define __GDK_SURFACE_IMPL_H__
|
||||
|
||||
#include <gdk/gdkwindow.h>
|
||||
#include <gdk/gdkproperty.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GDK_TYPE_WINDOW_IMPL (gdk_window_impl_get_type ())
|
||||
#define GDK_WINDOW_IMPL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WINDOW_IMPL, GdkWindowImpl))
|
||||
#define GDK_WINDOW_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WINDOW_IMPL, GdkWindowImplClass))
|
||||
#define GDK_IS_WINDOW_IMPL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW_IMPL))
|
||||
#define GDK_IS_WINDOW_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WINDOW_IMPL))
|
||||
#define GDK_WINDOW_IMPL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WINDOW_IMPL, GdkWindowImplClass))
|
||||
#define GDK_TYPE_SURFACE_IMPL (gdk_surface_impl_get_type ())
|
||||
#define GDK_SURFACE_IMPL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_SURFACE_IMPL, GdkSurfaceImpl))
|
||||
#define GDK_SURFACE_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_SURFACE_IMPL, GdkSurfaceImplClass))
|
||||
#define GDK_IS_SURFACE_IMPL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_SURFACE_IMPL))
|
||||
#define GDK_IS_SURFACE_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_SURFACE_IMPL))
|
||||
#define GDK_SURFACE_IMPL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_SURFACE_IMPL, GdkSurfaceImplClass))
|
||||
|
||||
typedef struct _GdkWindowImpl GdkWindowImpl;
|
||||
typedef struct _GdkWindowImplClass GdkWindowImplClass;
|
||||
typedef struct _GdkSurfaceImpl GdkSurfaceImpl;
|
||||
typedef struct _GdkSurfaceImplClass GdkSurfaceImplClass;
|
||||
|
||||
struct _GdkWindowImpl
|
||||
struct _GdkSurfaceImpl
|
||||
{
|
||||
GObject parent;
|
||||
};
|
||||
|
||||
struct _GdkWindowImplClass
|
||||
struct _GdkSurfaceImplClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
cairo_surface_t *
|
||||
(* ref_cairo_surface) (GdkWindow *window);
|
||||
(* ref_cairo_surface) (GdkSurface *window);
|
||||
cairo_surface_t *
|
||||
(* create_similar_image_surface) (GdkWindow * window,
|
||||
(* create_similar_image_surface) (GdkSurface * window,
|
||||
cairo_format_t format,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
void (* show) (GdkWindow *window,
|
||||
void (* show) (GdkSurface *window,
|
||||
gboolean already_mapped);
|
||||
void (* hide) (GdkWindow *window);
|
||||
void (* withdraw) (GdkWindow *window);
|
||||
void (* raise) (GdkWindow *window);
|
||||
void (* lower) (GdkWindow *window);
|
||||
void (* restack_toplevel) (GdkWindow *window,
|
||||
GdkWindow *sibling,
|
||||
void (* hide) (GdkSurface *window);
|
||||
void (* withdraw) (GdkSurface *window);
|
||||
void (* raise) (GdkSurface *window);
|
||||
void (* lower) (GdkSurface *window);
|
||||
void (* restack_toplevel) (GdkSurface *window,
|
||||
GdkSurface *sibling,
|
||||
gboolean above);
|
||||
|
||||
void (* move_resize) (GdkWindow *window,
|
||||
void (* move_resize) (GdkSurface *window,
|
||||
gboolean with_move,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void (* move_to_rect) (GdkWindow *window,
|
||||
void (* move_to_rect) (GdkSurface *window,
|
||||
const GdkRectangle *rect,
|
||||
GdkGravity rect_anchor,
|
||||
GdkGravity window_anchor,
|
||||
@ -81,33 +81,33 @@ struct _GdkWindowImplClass
|
||||
gint rect_anchor_dx,
|
||||
gint rect_anchor_dy);
|
||||
|
||||
GdkEventMask (* get_events) (GdkWindow *window);
|
||||
void (* set_events) (GdkWindow *window,
|
||||
GdkEventMask (* get_events) (GdkSurface *window);
|
||||
void (* set_events) (GdkSurface *window,
|
||||
GdkEventMask event_mask);
|
||||
|
||||
void (* get_geometry) (GdkWindow *window,
|
||||
void (* get_geometry) (GdkSurface *window,
|
||||
gint *x,
|
||||
gint *y,
|
||||
gint *width,
|
||||
gint *height);
|
||||
void (* get_root_coords) (GdkWindow *window,
|
||||
void (* get_root_coords) (GdkSurface *window,
|
||||
gint x,
|
||||
gint y,
|
||||
gint *root_x,
|
||||
gint *root_y);
|
||||
gboolean (* get_device_state) (GdkWindow *window,
|
||||
gboolean (* get_device_state) (GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
gdouble *x,
|
||||
gdouble *y,
|
||||
GdkModifierType *mask);
|
||||
gboolean (* begin_paint) (GdkWindow *window);
|
||||
void (* end_paint) (GdkWindow *window);
|
||||
gboolean (* begin_paint) (GdkSurface *window);
|
||||
void (* end_paint) (GdkSurface *window);
|
||||
|
||||
void (* shape_combine_region) (GdkWindow *window,
|
||||
void (* shape_combine_region) (GdkSurface *window,
|
||||
const cairo_region_t *shape_region,
|
||||
gint offset_x,
|
||||
gint offset_y);
|
||||
void (* input_shape_combine_region) (GdkWindow *window,
|
||||
void (* input_shape_combine_region) (GdkSurface *window,
|
||||
const cairo_region_t *shape_region,
|
||||
gint offset_x,
|
||||
gint offset_y);
|
||||
@ -116,10 +116,10 @@ struct _GdkWindowImplClass
|
||||
* layer a chance to save the region for later use in avoiding duplicate
|
||||
* exposes.
|
||||
*/
|
||||
void (* queue_antiexpose) (GdkWindow *window,
|
||||
void (* queue_antiexpose) (GdkSurface *window,
|
||||
cairo_region_t *update_area);
|
||||
|
||||
/* Called to do the windowing system specific part of gdk_window_destroy(),
|
||||
/* Called to do the windowing system specific part of gdk_surface_destroy(),
|
||||
*
|
||||
* window: The window being destroyed
|
||||
* recursing: If TRUE, then this is being called because a parent
|
||||
@ -132,125 +132,125 @@ struct _GdkWindowImplClass
|
||||
* windowing system calls should be made. (This may never happen
|
||||
* for some windowing systems.)
|
||||
*/
|
||||
void (* destroy) (GdkWindow *window,
|
||||
void (* destroy) (GdkSurface *window,
|
||||
gboolean recursing,
|
||||
gboolean foreign_destroy);
|
||||
|
||||
|
||||
/* optional */
|
||||
gboolean (* beep) (GdkWindow *window);
|
||||
gboolean (* beep) (GdkSurface *window);
|
||||
|
||||
void (* focus) (GdkWindow *window,
|
||||
void (* focus) (GdkSurface *window,
|
||||
guint32 timestamp);
|
||||
void (* set_type_hint) (GdkWindow *window,
|
||||
GdkWindowTypeHint hint);
|
||||
GdkWindowTypeHint (* get_type_hint) (GdkWindow *window);
|
||||
void (* set_modal_hint) (GdkWindow *window,
|
||||
void (* set_type_hint) (GdkSurface *window,
|
||||
GdkSurfaceTypeHint hint);
|
||||
GdkSurfaceTypeHint (* get_type_hint) (GdkSurface *window);
|
||||
void (* set_modal_hint) (GdkSurface *window,
|
||||
gboolean modal);
|
||||
void (* set_skip_taskbar_hint) (GdkWindow *window,
|
||||
void (* set_skip_taskbar_hint) (GdkSurface *window,
|
||||
gboolean skips_taskbar);
|
||||
void (* set_skip_pager_hint) (GdkWindow *window,
|
||||
void (* set_skip_pager_hint) (GdkSurface *window,
|
||||
gboolean skips_pager);
|
||||
void (* set_urgency_hint) (GdkWindow *window,
|
||||
void (* set_urgency_hint) (GdkSurface *window,
|
||||
gboolean urgent);
|
||||
void (* set_geometry_hints) (GdkWindow *window,
|
||||
void (* set_geometry_hints) (GdkSurface *window,
|
||||
const GdkGeometry *geometry,
|
||||
GdkWindowHints geom_mask);
|
||||
void (* set_title) (GdkWindow *window,
|
||||
GdkSurfaceHints geom_mask);
|
||||
void (* set_title) (GdkSurface *window,
|
||||
const gchar *title);
|
||||
void (* set_role) (GdkWindow *window,
|
||||
void (* set_role) (GdkSurface *window,
|
||||
const gchar *role);
|
||||
void (* set_startup_id) (GdkWindow *window,
|
||||
void (* set_startup_id) (GdkSurface *window,
|
||||
const gchar *startup_id);
|
||||
void (* set_transient_for) (GdkWindow *window,
|
||||
GdkWindow *parent);
|
||||
void (* get_frame_extents) (GdkWindow *window,
|
||||
void (* set_transient_for) (GdkSurface *window,
|
||||
GdkSurface *parent);
|
||||
void (* get_frame_extents) (GdkSurface *window,
|
||||
GdkRectangle *rect);
|
||||
void (* set_accept_focus) (GdkWindow *window,
|
||||
void (* set_accept_focus) (GdkSurface *window,
|
||||
gboolean accept_focus);
|
||||
void (* set_focus_on_map) (GdkWindow *window,
|
||||
void (* set_focus_on_map) (GdkSurface *window,
|
||||
gboolean focus_on_map);
|
||||
void (* set_icon_list) (GdkWindow *window,
|
||||
void (* set_icon_list) (GdkSurface *window,
|
||||
GList *pixbufs);
|
||||
void (* set_icon_name) (GdkWindow *window,
|
||||
void (* set_icon_name) (GdkSurface *window,
|
||||
const gchar *name);
|
||||
void (* iconify) (GdkWindow *window);
|
||||
void (* deiconify) (GdkWindow *window);
|
||||
void (* stick) (GdkWindow *window);
|
||||
void (* unstick) (GdkWindow *window);
|
||||
void (* maximize) (GdkWindow *window);
|
||||
void (* unmaximize) (GdkWindow *window);
|
||||
void (* fullscreen) (GdkWindow *window);
|
||||
void (* fullscreen_on_monitor) (GdkWindow *window,
|
||||
void (* iconify) (GdkSurface *window);
|
||||
void (* deiconify) (GdkSurface *window);
|
||||
void (* stick) (GdkSurface *window);
|
||||
void (* unstick) (GdkSurface *window);
|
||||
void (* maximize) (GdkSurface *window);
|
||||
void (* unmaximize) (GdkSurface *window);
|
||||
void (* fullscreen) (GdkSurface *window);
|
||||
void (* fullscreen_on_monitor) (GdkSurface *window,
|
||||
GdkMonitor *monitor);
|
||||
void (* apply_fullscreen_mode) (GdkWindow *window);
|
||||
void (* unfullscreen) (GdkWindow *window);
|
||||
void (* set_keep_above) (GdkWindow *window,
|
||||
void (* apply_fullscreen_mode) (GdkSurface *window);
|
||||
void (* unfullscreen) (GdkSurface *window);
|
||||
void (* set_keep_above) (GdkSurface *window,
|
||||
gboolean setting);
|
||||
void (* set_keep_below) (GdkWindow *window,
|
||||
void (* set_keep_below) (GdkSurface *window,
|
||||
gboolean setting);
|
||||
GdkWindow * (* get_group) (GdkWindow *window);
|
||||
void (* set_group) (GdkWindow *window,
|
||||
GdkWindow *leader);
|
||||
void (* set_decorations) (GdkWindow *window,
|
||||
GdkSurface * (* get_group) (GdkSurface *window);
|
||||
void (* set_group) (GdkSurface *window,
|
||||
GdkSurface *leader);
|
||||
void (* set_decorations) (GdkSurface *window,
|
||||
GdkWMDecoration decorations);
|
||||
gboolean (* get_decorations) (GdkWindow *window,
|
||||
gboolean (* get_decorations) (GdkSurface *window,
|
||||
GdkWMDecoration *decorations);
|
||||
void (* set_functions) (GdkWindow *window,
|
||||
void (* set_functions) (GdkSurface *window,
|
||||
GdkWMFunction functions);
|
||||
void (* begin_resize_drag) (GdkWindow *window,
|
||||
GdkWindowEdge edge,
|
||||
void (* begin_resize_drag) (GdkSurface *window,
|
||||
GdkSurfaceEdge edge,
|
||||
GdkDevice *device,
|
||||
gint button,
|
||||
gint root_x,
|
||||
gint root_y,
|
||||
guint32 timestamp);
|
||||
void (* begin_move_drag) (GdkWindow *window,
|
||||
void (* begin_move_drag) (GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
gint button,
|
||||
gint root_x,
|
||||
gint root_y,
|
||||
guint32 timestamp);
|
||||
void (* enable_synchronized_configure) (GdkWindow *window);
|
||||
void (* configure_finished) (GdkWindow *window);
|
||||
void (* set_opacity) (GdkWindow *window,
|
||||
void (* enable_synchronized_configure) (GdkSurface *window);
|
||||
void (* configure_finished) (GdkSurface *window);
|
||||
void (* set_opacity) (GdkSurface *window,
|
||||
gdouble opacity);
|
||||
void (* destroy_notify) (GdkWindow *window);
|
||||
void (* register_dnd) (GdkWindow *window);
|
||||
GdkDragContext * (*drag_begin) (GdkWindow *window,
|
||||
void (* destroy_notify) (GdkSurface *window);
|
||||
void (* register_dnd) (GdkSurface *window);
|
||||
GdkDragContext * (*drag_begin) (GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
GdkContentProvider*content,
|
||||
GdkDragAction actions,
|
||||
gint dx,
|
||||
gint dy);
|
||||
|
||||
void (*process_updates_recurse) (GdkWindow *window,
|
||||
void (*process_updates_recurse) (GdkSurface *window,
|
||||
cairo_region_t *region);
|
||||
|
||||
gint (* get_scale_factor) (GdkWindow *window);
|
||||
void (* get_unscaled_size) (GdkWindow *window,
|
||||
gint (* get_scale_factor) (GdkSurface *window);
|
||||
void (* get_unscaled_size) (GdkSurface *window,
|
||||
int *unscaled_width,
|
||||
int *unscaled_height);
|
||||
|
||||
void (* set_opaque_region) (GdkWindow *window,
|
||||
void (* set_opaque_region) (GdkSurface *window,
|
||||
cairo_region_t *region);
|
||||
void (* set_shadow_width) (GdkWindow *window,
|
||||
void (* set_shadow_width) (GdkSurface *window,
|
||||
gint left,
|
||||
gint right,
|
||||
gint top,
|
||||
gint bottom);
|
||||
gboolean (* show_window_menu) (GdkWindow *window,
|
||||
gboolean (* show_window_menu) (GdkSurface *window,
|
||||
GdkEvent *event);
|
||||
GdkGLContext *(*create_gl_context) (GdkWindow *window,
|
||||
GdkGLContext *(*create_gl_context) (GdkSurface *window,
|
||||
gboolean attached,
|
||||
GdkGLContext *share,
|
||||
GError **error);
|
||||
gboolean (* supports_edge_constraints)(GdkWindow *window);
|
||||
gboolean (* supports_edge_constraints)(GdkSurface *window);
|
||||
};
|
||||
|
||||
/* Interface Functions */
|
||||
GType gdk_window_impl_get_type (void) G_GNUC_CONST;
|
||||
GType gdk_surface_impl_get_type (void) G_GNUC_CONST;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_WINDOW_IMPL_H__ */
|
||||
#endif /* __GDK_SURFACE_IMPL_H__ */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* GdkQuartzWindow.m
|
||||
/* GdkQuartzSurface.m
|
||||
*
|
||||
* Copyright (C) 2005-2007 Imendio AB
|
||||
*
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
-(BOOL)windowShouldClose:(id)sender
|
||||
{
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
GdkSurface *window = [[self contentView] gdkWindow];
|
||||
GdkEvent *event;
|
||||
|
||||
event = gdk_event_new (GDK_DELETE);
|
||||
@ -49,47 +49,47 @@
|
||||
|
||||
-(void)windowWillMiniaturize:(NSNotification *)aNotification
|
||||
{
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
GdkSurface *window = [[self contentView] gdkWindow];
|
||||
|
||||
_gdk_quartz_window_detach_from_parent (window);
|
||||
_gdk_quartz_surface_detach_from_parent (window);
|
||||
}
|
||||
|
||||
-(void)windowDidMiniaturize:(NSNotification *)aNotification
|
||||
{
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
GdkSurface *window = [[self contentView] gdkWindow];
|
||||
|
||||
gdk_synthesize_window_state (window, 0,
|
||||
GDK_WINDOW_STATE_ICONIFIED);
|
||||
GDK_SURFACE_STATE_ICONIFIED);
|
||||
}
|
||||
|
||||
-(void)windowDidDeminiaturize:(NSNotification *)aNotification
|
||||
{
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
GdkSurface *window = [[self contentView] gdkWindow];
|
||||
|
||||
_gdk_quartz_window_attach_to_parent (window);
|
||||
_gdk_quartz_surface_attach_to_parent (window);
|
||||
|
||||
gdk_synthesize_window_state (window, GDK_WINDOW_STATE_ICONIFIED, 0);
|
||||
gdk_synthesize_window_state (window, GDK_SURFACE_STATE_ICONIFIED, 0);
|
||||
}
|
||||
|
||||
-(void)windowDidBecomeKey:(NSNotification *)aNotification
|
||||
{
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
GdkSurface *window = [[self contentView] gdkWindow];
|
||||
|
||||
gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_FOCUSED);
|
||||
gdk_synthesize_window_state (window, 0, GDK_SURFACE_STATE_FOCUSED);
|
||||
_gdk_quartz_events_update_focus_window (window, TRUE);
|
||||
}
|
||||
|
||||
-(void)windowDidResignKey:(NSNotification *)aNotification
|
||||
{
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
GdkSurface *window = [[self contentView] gdkWindow];
|
||||
|
||||
_gdk_quartz_events_update_focus_window (window, FALSE);
|
||||
gdk_synthesize_window_state (window, GDK_WINDOW_STATE_FOCUSED, 0);
|
||||
gdk_synthesize_window_state (window, GDK_SURFACE_STATE_FOCUSED, 0);
|
||||
}
|
||||
|
||||
-(void)windowDidBecomeMain:(NSNotification *)aNotification
|
||||
{
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
GdkSurface *window = [[self contentView] gdkWindow];
|
||||
|
||||
if (![self isVisible])
|
||||
{
|
||||
@ -101,15 +101,15 @@
|
||||
return;
|
||||
}
|
||||
|
||||
_gdk_quartz_window_did_become_main (window);
|
||||
_gdk_quartz_surface_did_become_main (window);
|
||||
}
|
||||
|
||||
-(void)windowDidResignMain:(NSNotification *)aNotification
|
||||
{
|
||||
GdkWindow *window;
|
||||
GdkSurface *window;
|
||||
|
||||
window = [[self contentView] gdkWindow];
|
||||
_gdk_quartz_window_did_resign_main (window);
|
||||
_gdk_quartz_surface_did_resign_main (window);
|
||||
}
|
||||
|
||||
/* Used in combination with NSLeftMouseUp in sendEvent to keep track
|
||||
@ -154,8 +154,8 @@
|
||||
|
||||
-(void)checkSendEnterNotify
|
||||
{
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
|
||||
GdkSurface *window = [[self contentView] gdkWindow];
|
||||
GdkSurfaceImplQuartz *impl = GDK_SURFACE_IMPL_QUARTZ (window->impl);
|
||||
|
||||
/* When a new window has been created, and the mouse
|
||||
* is in the window area, we will not receive an NSMouseEntered
|
||||
@ -186,21 +186,21 @@
|
||||
|
||||
-(void)windowDidMove:(NSNotification *)aNotification
|
||||
{
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
GdkSurface *window = [[self contentView] gdkWindow];
|
||||
GdkEvent *event;
|
||||
|
||||
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
|
||||
gboolean maximized = gdk_window_get_state (window) & GDK_WINDOW_STATE_MAXIMIZED;
|
||||
GdkSurfaceImplQuartz *impl = GDK_SURFACE_IMPL_QUARTZ (window->impl);
|
||||
gboolean maximized = gdk_surface_get_state (window) & GDK_SURFACE_STATE_MAXIMIZED;
|
||||
|
||||
/* In case the window is changed when maximized remove the maximized state */
|
||||
if (maximized && !inMaximizeTransition && !NSEqualRects (lastMaximizedFrame, [self frame]))
|
||||
{
|
||||
gdk_synthesize_window_state (window,
|
||||
GDK_WINDOW_STATE_MAXIMIZED,
|
||||
GDK_SURFACE_STATE_MAXIMIZED,
|
||||
0);
|
||||
}
|
||||
|
||||
_gdk_quartz_window_update_position (window);
|
||||
_gdk_quartz_surface_update_position (window);
|
||||
|
||||
/* Synthesize a configure event */
|
||||
event = gdk_event_new (GDK_CONFIGURE);
|
||||
@ -218,16 +218,16 @@
|
||||
-(void)windowDidResize:(NSNotification *)aNotification
|
||||
{
|
||||
NSRect content_rect = [self contentRectForFrameRect:[self frame]];
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
GdkSurface *window = [[self contentView] gdkWindow];
|
||||
GdkEvent *event;
|
||||
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
|
||||
gboolean maximized = gdk_window_get_state (window) & GDK_WINDOW_STATE_MAXIMIZED;
|
||||
GdkSurfaceImplQuartz *impl = GDK_SURFACE_IMPL_QUARTZ (window->impl);
|
||||
gboolean maximized = gdk_surface_get_state (window) & GDK_SURFACE_STATE_MAXIMIZED;
|
||||
|
||||
/* see same in windowDidMove */
|
||||
if (maximized && !inMaximizeTransition && !NSEqualRects (lastMaximizedFrame, [self frame]))
|
||||
{
|
||||
gdk_synthesize_window_state (window,
|
||||
GDK_WINDOW_STATE_MAXIMIZED,
|
||||
GDK_SURFACE_STATE_MAXIMIZED,
|
||||
0);
|
||||
}
|
||||
|
||||
@ -237,11 +237,11 @@
|
||||
/* Certain resize operations (e.g. going fullscreen), also move the
|
||||
* origin of the window.
|
||||
*/
|
||||
_gdk_quartz_window_update_position (window);
|
||||
_gdk_quartz_surface_update_position (window);
|
||||
|
||||
[[self contentView] setFrame:NSMakeRect (0, 0, window->width, window->height)];
|
||||
|
||||
_gdk_window_update_size (window);
|
||||
_gdk_surface_update_size (window);
|
||||
|
||||
/* Synthesize a configure event */
|
||||
event = gdk_event_new (GDK_CONFIGURE);
|
||||
@ -273,27 +273,27 @@
|
||||
|
||||
-(BOOL)canBecomeMainWindow
|
||||
{
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
|
||||
GdkSurface *window = [[self contentView] gdkWindow];
|
||||
GdkSurfaceImplQuartz *impl = GDK_SURFACE_IMPL_QUARTZ (window->impl);
|
||||
|
||||
switch (impl->type_hint)
|
||||
{
|
||||
case GDK_WINDOW_TYPE_HINT_NORMAL:
|
||||
case GDK_WINDOW_TYPE_HINT_DIALOG:
|
||||
case GDK_SURFACE_TYPE_HINT_NORMAL:
|
||||
case GDK_SURFACE_TYPE_HINT_DIALOG:
|
||||
return YES;
|
||||
|
||||
case GDK_WINDOW_TYPE_HINT_MENU:
|
||||
case GDK_WINDOW_TYPE_HINT_TOOLBAR:
|
||||
case GDK_WINDOW_TYPE_HINT_SPLASHSCREEN:
|
||||
case GDK_WINDOW_TYPE_HINT_UTILITY:
|
||||
case GDK_WINDOW_TYPE_HINT_DOCK:
|
||||
case GDK_WINDOW_TYPE_HINT_DESKTOP:
|
||||
case GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU:
|
||||
case GDK_WINDOW_TYPE_HINT_POPUP_MENU:
|
||||
case GDK_WINDOW_TYPE_HINT_TOOLTIP:
|
||||
case GDK_WINDOW_TYPE_HINT_NOTIFICATION:
|
||||
case GDK_WINDOW_TYPE_HINT_COMBO:
|
||||
case GDK_WINDOW_TYPE_HINT_DND:
|
||||
case GDK_SURFACE_TYPE_HINT_MENU:
|
||||
case GDK_SURFACE_TYPE_HINT_TOOLBAR:
|
||||
case GDK_SURFACE_TYPE_HINT_SPLASHSCREEN:
|
||||
case GDK_SURFACE_TYPE_HINT_UTILITY:
|
||||
case GDK_SURFACE_TYPE_HINT_DOCK:
|
||||
case GDK_SURFACE_TYPE_HINT_DESKTOP:
|
||||
case GDK_SURFACE_TYPE_HINT_DROPDOWN_MENU:
|
||||
case GDK_SURFACE_TYPE_HINT_POPUP_MENU:
|
||||
case GDK_SURFACE_TYPE_HINT_TOOLTIP:
|
||||
case GDK_SURFACE_TYPE_HINT_NOTIFICATION:
|
||||
case GDK_SURFACE_TYPE_HINT_COMBO:
|
||||
case GDK_SURFACE_TYPE_HINT_DND:
|
||||
return NO;
|
||||
}
|
||||
|
||||
@ -302,8 +302,8 @@
|
||||
|
||||
-(BOOL)canBecomeKeyWindow
|
||||
{
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
|
||||
GdkSurface *window = [[self contentView] gdkWindow];
|
||||
GdkSurfaceImplQuartz *impl = GDK_SURFACE_IMPL_QUARTZ (window->impl);
|
||||
|
||||
if (!window->accept_focus)
|
||||
return NO;
|
||||
@ -311,27 +311,27 @@
|
||||
/* Popup windows should not be able to get focused in the window
|
||||
* manager sense, it's only handled through grabs.
|
||||
*/
|
||||
if (window->window_type == GDK_WINDOW_TEMP)
|
||||
if (window->window_type == GDK_SURFACE_TEMP)
|
||||
return NO;
|
||||
|
||||
switch (impl->type_hint)
|
||||
{
|
||||
case GDK_WINDOW_TYPE_HINT_NORMAL:
|
||||
case GDK_WINDOW_TYPE_HINT_DIALOG:
|
||||
case GDK_WINDOW_TYPE_HINT_MENU:
|
||||
case GDK_WINDOW_TYPE_HINT_TOOLBAR:
|
||||
case GDK_WINDOW_TYPE_HINT_UTILITY:
|
||||
case GDK_WINDOW_TYPE_HINT_DOCK:
|
||||
case GDK_WINDOW_TYPE_HINT_DESKTOP:
|
||||
case GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU:
|
||||
case GDK_WINDOW_TYPE_HINT_POPUP_MENU:
|
||||
case GDK_WINDOW_TYPE_HINT_COMBO:
|
||||
case GDK_SURFACE_TYPE_HINT_NORMAL:
|
||||
case GDK_SURFACE_TYPE_HINT_DIALOG:
|
||||
case GDK_SURFACE_TYPE_HINT_MENU:
|
||||
case GDK_SURFACE_TYPE_HINT_TOOLBAR:
|
||||
case GDK_SURFACE_TYPE_HINT_UTILITY:
|
||||
case GDK_SURFACE_TYPE_HINT_DOCK:
|
||||
case GDK_SURFACE_TYPE_HINT_DESKTOP:
|
||||
case GDK_SURFACE_TYPE_HINT_DROPDOWN_MENU:
|
||||
case GDK_SURFACE_TYPE_HINT_POPUP_MENU:
|
||||
case GDK_SURFACE_TYPE_HINT_COMBO:
|
||||
return YES;
|
||||
|
||||
case GDK_WINDOW_TYPE_HINT_SPLASHSCREEN:
|
||||
case GDK_WINDOW_TYPE_HINT_TOOLTIP:
|
||||
case GDK_WINDOW_TYPE_HINT_NOTIFICATION:
|
||||
case GDK_WINDOW_TYPE_HINT_DND:
|
||||
case GDK_SURFACE_TYPE_HINT_SPLASHSCREEN:
|
||||
case GDK_SURFACE_TYPE_HINT_TOOLTIP:
|
||||
case GDK_SURFACE_TYPE_HINT_NOTIFICATION:
|
||||
case GDK_SURFACE_TYPE_HINT_DND:
|
||||
return NO;
|
||||
}
|
||||
|
||||
@ -340,8 +340,8 @@
|
||||
|
||||
- (void)showAndMakeKey:(BOOL)makeKey
|
||||
{
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
|
||||
GdkSurface *window = [[self contentView] gdkWindow];
|
||||
GdkSurfaceImplQuartz *impl = GDK_SURFACE_IMPL_QUARTZ (window->impl);
|
||||
|
||||
inShowOrHide = YES;
|
||||
|
||||
@ -357,8 +357,8 @@
|
||||
|
||||
- (void)hide
|
||||
{
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
|
||||
GdkSurface *window = [[self contentView] gdkWindow];
|
||||
GdkSurfaceImplQuartz *impl = GDK_SURFACE_IMPL_QUARTZ (window->impl);
|
||||
|
||||
inShowOrHide = YES;
|
||||
[impl->toplevel orderOut:nil];
|
||||
@ -369,8 +369,8 @@
|
||||
|
||||
- (BOOL)trackManualMove
|
||||
{
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
|
||||
GdkSurface *window = [[self contentView] gdkWindow];
|
||||
GdkSurfaceImplQuartz *impl = GDK_SURFACE_IMPL_QUARTZ (window->impl);
|
||||
NSPoint currentLocation;
|
||||
NSPoint newOrigin;
|
||||
NSRect screenFrame = [[NSScreen mainScreen] visibleFrame];
|
||||
@ -435,28 +435,28 @@
|
||||
* height and position.
|
||||
*/
|
||||
dw = dh = dx = dy = 0.0;
|
||||
if (resizeEdge == GDK_WINDOW_EDGE_EAST ||
|
||||
resizeEdge == GDK_WINDOW_EDGE_NORTH_EAST ||
|
||||
resizeEdge == GDK_WINDOW_EDGE_SOUTH_EAST)
|
||||
if (resizeEdge == GDK_SURFACE_EDGE_EAST ||
|
||||
resizeEdge == GDK_SURFACE_EDGE_NORTH_EAST ||
|
||||
resizeEdge == GDK_SURFACE_EDGE_SOUTH_EAST)
|
||||
{
|
||||
dw = -1.0;
|
||||
}
|
||||
if (resizeEdge == GDK_WINDOW_EDGE_NORTH ||
|
||||
resizeEdge == GDK_WINDOW_EDGE_NORTH_WEST ||
|
||||
resizeEdge == GDK_WINDOW_EDGE_NORTH_EAST)
|
||||
if (resizeEdge == GDK_SURFACE_EDGE_NORTH ||
|
||||
resizeEdge == GDK_SURFACE_EDGE_NORTH_WEST ||
|
||||
resizeEdge == GDK_SURFACE_EDGE_NORTH_EAST)
|
||||
{
|
||||
dh = -1.0;
|
||||
}
|
||||
if (resizeEdge == GDK_WINDOW_EDGE_SOUTH ||
|
||||
resizeEdge == GDK_WINDOW_EDGE_SOUTH_WEST ||
|
||||
resizeEdge == GDK_WINDOW_EDGE_SOUTH_EAST)
|
||||
if (resizeEdge == GDK_SURFACE_EDGE_SOUTH ||
|
||||
resizeEdge == GDK_SURFACE_EDGE_SOUTH_WEST ||
|
||||
resizeEdge == GDK_SURFACE_EDGE_SOUTH_EAST)
|
||||
{
|
||||
dh = 1.0;
|
||||
dy = -1.0;
|
||||
}
|
||||
if (resizeEdge == GDK_WINDOW_EDGE_WEST ||
|
||||
resizeEdge == GDK_WINDOW_EDGE_NORTH_WEST ||
|
||||
resizeEdge == GDK_WINDOW_EDGE_SOUTH_WEST)
|
||||
if (resizeEdge == GDK_SURFACE_EDGE_WEST ||
|
||||
resizeEdge == GDK_SURFACE_EDGE_NORTH_WEST ||
|
||||
resizeEdge == GDK_SURFACE_EDGE_SOUTH_WEST)
|
||||
{
|
||||
dw = 1.0;
|
||||
dx = -1.0;
|
||||
@ -503,7 +503,7 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
-(void)beginManualResize:(GdkWindowEdge)edge
|
||||
-(void)beginManualResize:(GdkSurfaceEdge)edge
|
||||
{
|
||||
if (inMove || inManualMove || inManualResize)
|
||||
return;
|
||||
@ -579,7 +579,7 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
|
||||
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
GdkEvent *event;
|
||||
GdkWindow *window;
|
||||
GdkSurface *window;
|
||||
|
||||
if (current_context)
|
||||
g_object_unref (current_context);
|
||||
@ -589,7 +589,7 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
|
||||
|
||||
window = [[self contentView] gdkWindow];
|
||||
|
||||
current_context->display = gdk_window_get_display (window);
|
||||
current_context->display = gdk_surface_get_display (window);
|
||||
|
||||
gdk_drag_context_set_device (current_context,
|
||||
gdk_seat_get_pointer (gdk_display_get_default_seat (current_context->display)));
|
||||
@ -650,7 +650,7 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
|
||||
int gx, gy;
|
||||
|
||||
update_context_from_dragging_info (sender);
|
||||
_gdk_quartz_window_nspoint_to_gdk_xy (screen_point, &gx, &gy);
|
||||
_gdk_quartz_surface_nspoint_to_gdk_xy (screen_point, &gx, &gy);
|
||||
|
||||
event = gdk_event_new (GDK_DRAG_MOTION);
|
||||
event->dnd.window = g_object_ref ([[self contentView] gdkWindow]);
|
||||
@ -678,7 +678,7 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
|
||||
int gy, gx;
|
||||
|
||||
update_context_from_dragging_info (sender);
|
||||
_gdk_quartz_window_nspoint_to_gdk_xy (screen_point, &gx, &gy);
|
||||
_gdk_quartz_surface_nspoint_to_gdk_xy (screen_point, &gx, &gy);
|
||||
|
||||
event = gdk_event_new (GDK_DROP_START);
|
||||
event->dnd.window = g_object_ref ([[self contentView] gdkWindow]);
|
||||
@ -719,7 +719,7 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
|
||||
event->dnd.send_event = FALSE;
|
||||
event->dnd.context = g_object_ref (_gdk_quartz_drag_source_context);
|
||||
|
||||
display = gdk_window_get_display (event->dnd.window);
|
||||
display = gdk_surface_get_display (event->dnd.window);
|
||||
|
||||
if (display)
|
||||
{
|
||||
@ -729,17 +729,17 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
|
||||
event->dnd.context->dest_window = NULL;
|
||||
|
||||
windows = get_toplevels ();
|
||||
_gdk_quartz_window_nspoint_to_gdk_xy (aPoint, &gx, &gy);
|
||||
_gdk_quartz_surface_nspoint_to_gdk_xy (aPoint, &gx, &gy);
|
||||
|
||||
for (list = windows; list; list = list->next)
|
||||
{
|
||||
GdkWindow* win = (GdkWindow*) list->data;
|
||||
GdkSurface* win = (GdkSurface*) list->data;
|
||||
gint wx, wy;
|
||||
gint ww, wh;
|
||||
|
||||
gdk_window_get_root_origin (win, &wx, &wy);
|
||||
ww = gdk_window_get_width (win);
|
||||
wh = gdk_window_get_height (win);
|
||||
gdk_surface_get_root_origin (win, &wx, &wy);
|
||||
ww = gdk_surface_get_width (win);
|
||||
wh = gdk_surface_get_height (win);
|
||||
|
||||
if (gx > wx && gy > wy && gx <= wx + ww && gy <= wy + wh)
|
||||
event->dnd.context->dest_window = win;
|
||||
@ -772,7 +772,7 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
|
||||
is_fullscreen = (([self styleMask] & NSFullScreenWindowMask) != 0);
|
||||
|
||||
if (was_fullscreen != is_fullscreen)
|
||||
_gdk_quartz_window_update_fullscreen_state ([[self contentView] gdkWindow]);
|
||||
_gdk_quartz_surface_update_fullscreen_state ([[self contentView] gdkWindow]);
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -780,8 +780,8 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
|
||||
- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen
|
||||
{
|
||||
NSRect rect;
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
|
||||
GdkSurface *window = [[self contentView] gdkWindow];
|
||||
GdkSurfaceImplQuartz *impl = GDK_SURFACE_IMPL_QUARTZ (window->impl);
|
||||
|
||||
/* Allow the window to move up "shadow_top" more than normally allowed
|
||||
* by the default impl. This makes it possible to move windows with
|
||||
@ -797,9 +797,9 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
|
||||
defaultFrame:(NSRect)newFrame
|
||||
{
|
||||
NSRect screenFrame = [[self screen] visibleFrame];
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
|
||||
gboolean maximized = gdk_window_get_state (window) & GDK_WINDOW_STATE_MAXIMIZED;
|
||||
GdkSurface *window = [[self contentView] gdkWindow];
|
||||
GdkSurfaceImplQuartz *impl = GDK_SURFACE_IMPL_QUARTZ (window->impl);
|
||||
gboolean maximized = gdk_surface_get_state (window) & GDK_SURFACE_STATE_MAXIMIZED;
|
||||
|
||||
if (!maximized)
|
||||
return screenFrame;
|
||||
@ -811,15 +811,15 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
|
||||
toFrame:(NSRect)newFrame
|
||||
{
|
||||
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
|
||||
gboolean maximized = gdk_window_get_state (window) & GDK_WINDOW_STATE_MAXIMIZED;
|
||||
GdkSurface *window = [[self contentView] gdkWindow];
|
||||
GdkSurfaceImplQuartz *impl = GDK_SURFACE_IMPL_QUARTZ (window->impl);
|
||||
gboolean maximized = gdk_surface_get_state (window) & GDK_SURFACE_STATE_MAXIMIZED;
|
||||
|
||||
if (maximized)
|
||||
{
|
||||
lastMaximizedFrame = newFrame;
|
||||
gdk_synthesize_window_state (window,
|
||||
GDK_WINDOW_STATE_MAXIMIZED,
|
||||
GDK_SURFACE_STATE_MAXIMIZED,
|
||||
0);
|
||||
}
|
||||
else
|
||||
@ -827,7 +827,7 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
|
||||
lastUnmaximizedFrame = [nsWindow frame];
|
||||
gdk_synthesize_window_state (window,
|
||||
0,
|
||||
GDK_WINDOW_STATE_MAXIMIZED);
|
||||
GDK_SURFACE_STATE_MAXIMIZED);
|
||||
}
|
||||
|
||||
inMaximizeTransition = YES;
|
||||
|
@ -33,7 +33,7 @@
|
||||
NSPoint initialMoveLocation;
|
||||
NSPoint initialResizeLocation;
|
||||
NSRect initialResizeFrame;
|
||||
GdkWindowEdge resizeEdge;
|
||||
GdkSurfaceEdge resizeEdge;
|
||||
|
||||
NSRect lastUnmaximizedFrame;
|
||||
NSRect lastMaximizedFrame;
|
||||
@ -45,7 +45,7 @@
|
||||
-(void)beginManualMove;
|
||||
-(BOOL)trackManualMove;
|
||||
-(BOOL)isInManualResizeOrMove;
|
||||
-(void)beginManualResize:(GdkWindowEdge)edge;
|
||||
-(void)beginManualResize:(GdkSurfaceEdge)edge;
|
||||
-(BOOL)trackManualResize;
|
||||
-(void)showAndMakeKey:(BOOL)makeKey;
|
||||
-(void)hide;
|
||||
|
@ -76,10 +76,10 @@
|
||||
gint ns_x, ns_y;
|
||||
GdkRectangle *rect;
|
||||
|
||||
rect = g_object_get_data (G_OBJECT (gdk_window), GIC_CURSOR_RECT);
|
||||
rect = g_object_get_data (G_OBJECT (gdk_surface), GIC_CURSOR_RECT);
|
||||
if (rect)
|
||||
{
|
||||
_gdk_quartz_window_gdk_xy_to_xy (rect->x, rect->y + rect->height,
|
||||
_gdk_quartz_surface_gdk_xy_to_xy (rect->x, rect->y + rect->height,
|
||||
&ns_x, &ns_y);
|
||||
|
||||
return NSMakeRect (ns_x, ns_y, rect->width, rect->height);
|
||||
@ -126,7 +126,7 @@
|
||||
gchar *prev_str;
|
||||
markedRange = selectedRange = NSMakeRange (NSNotFound, 0);
|
||||
|
||||
g_object_set_data_full (G_OBJECT (gdk_window), TIC_MARKED_TEXT, NULL, g_free);
|
||||
g_object_set_data_full (G_OBJECT (gdk_surface), TIC_MARKED_TEXT, NULL, g_free);
|
||||
}
|
||||
|
||||
-(void)setMarkedText: (id)aString selectedRange: (NSRange)newSelection replacementRange: (NSRange)replacementRange
|
||||
@ -153,21 +153,21 @@
|
||||
str = [aString UTF8String];
|
||||
}
|
||||
|
||||
g_object_set_data_full (G_OBJECT (gdk_window), TIC_MARKED_TEXT, g_strdup (str), g_free);
|
||||
g_object_set_data (G_OBJECT (gdk_window), TIC_SELECTED_POS,
|
||||
g_object_set_data_full (G_OBJECT (gdk_surface), TIC_MARKED_TEXT, g_strdup (str), g_free);
|
||||
g_object_set_data (G_OBJECT (gdk_surface), TIC_SELECTED_POS,
|
||||
GUINT_TO_POINTER (selectedRange.location));
|
||||
g_object_set_data (G_OBJECT (gdk_window), TIC_SELECTED_LEN,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), TIC_SELECTED_LEN,
|
||||
GUINT_TO_POINTER (selectedRange.length));
|
||||
|
||||
GDK_NOTE (EVENTS, g_message ("setMarkedText: set %s (%p, nsview %p): %s",
|
||||
TIC_MARKED_TEXT, gdk_window, self,
|
||||
TIC_MARKED_TEXT, gdk_surface, self,
|
||||
str ? str : "(empty)"));
|
||||
|
||||
/* handle text input changes by mouse events */
|
||||
if (!GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (gdk_window),
|
||||
if (!GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (gdk_surface),
|
||||
TIC_IN_KEY_DOWN)))
|
||||
{
|
||||
_gdk_quartz_synthesize_null_key_event(gdk_window);
|
||||
_gdk_quartz_synthesize_null_key_event(gdk_surface);
|
||||
}
|
||||
}
|
||||
|
||||
@ -209,326 +209,326 @@
|
||||
str = [string UTF8String];
|
||||
}
|
||||
|
||||
g_object_set_data_full (G_OBJECT (gdk_window), TIC_INSERT_TEXT, g_strdup (str), g_free);
|
||||
g_object_set_data_full (G_OBJECT (gdk_surface), TIC_INSERT_TEXT, g_strdup (str), g_free);
|
||||
GDK_NOTE (EVENTS, g_message ("insertText: set %s (%p, nsview %p): %s",
|
||||
TIC_INSERT_TEXT, gdk_window, self,
|
||||
TIC_INSERT_TEXT, gdk_surface, self,
|
||||
str ? str : "(empty)"));
|
||||
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_FILTERED));
|
||||
|
||||
/* handle text input changes by mouse events */
|
||||
if (!GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (gdk_window),
|
||||
if (!GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (gdk_surface),
|
||||
TIC_IN_KEY_DOWN)))
|
||||
{
|
||||
_gdk_quartz_synthesize_null_key_event(gdk_window);
|
||||
_gdk_quartz_synthesize_null_key_event(gdk_surface);
|
||||
}
|
||||
}
|
||||
|
||||
-(void)deleteBackward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("deleteBackward"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)deleteForward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("deleteForward"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)deleteToBeginningOfLine: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("deleteToBeginningOfLine"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)deleteToEndOfLine: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("deleteToEndOfLine"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)deleteWordBackward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("deleteWordBackward"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)deleteWordForward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("deleteWordForward"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)insertBacktab: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("insertBacktab"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)insertNewline: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("insertNewline"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY, GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY, GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)insertTab: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("insertTab"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveBackward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveBackward"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveBackwardAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveBackwardAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveDown: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveDown"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveDownAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveDownAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveForward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveForward"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveForwardAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveForwardAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveLeft: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveLeft"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveLeftAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveLeftAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveRight: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveRight"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveRightAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveRightAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToBeginningOfDocument: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveToBeginningOfDocument"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToBeginningOfDocumentAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveToBeginningOfDocumentAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToBeginningOfLine: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveToBeginningOfLine"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToBeginningOfLineAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveToBeginningOfLineAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToEndOfDocument: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveToEndOfDocument"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToEndOfDocumentAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveToEndOfDocumentAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToEndOfLine: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveToEndOfLine"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveToEndOfLineAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveToEndOfLineAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveUp: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveUp"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveUpAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveUpAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordBackward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveWordBackward"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordBackwardAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveWordBackwardAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordForward: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveWordForward"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordForwardAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveWordForwardAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordLeft: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveWordLeft"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordLeftAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveWordLeftAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordRight: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveWordRight"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)moveWordRightAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("moveWordRightAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)pageDown: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("pageDown"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)pageDownAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("pageDownAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)pageUp: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("pageUp"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)pageUpAndModifySelection: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("pageUpAndModifySelection"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)selectAll: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("selectAll"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)selectLine: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("selectLine"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
-(void)selectWord: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("selectWord"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
g_object_set_data (G_OBJECT (gdk_surface), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
@ -550,14 +550,14 @@
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
-(void)setGdkWindow: (GdkWindow *)window
|
||||
-(void)setGdkSurface: (GdkSurface *)window
|
||||
{
|
||||
gdk_window = window;
|
||||
gdk_surface = window;
|
||||
}
|
||||
|
||||
-(GdkWindow *)gdkWindow
|
||||
-(GdkSurface *)gdkWindow
|
||||
{
|
||||
return gdk_window;
|
||||
return gdk_surface;
|
||||
}
|
||||
|
||||
-(NSTrackingRectTag)trackingRect
|
||||
@ -572,7 +572,7 @@
|
||||
|
||||
-(BOOL)isOpaque
|
||||
{
|
||||
if (GDK_WINDOW_DESTROYED (gdk_window))
|
||||
if (GDK_SURFACE_DESTROYED (gdk_surface))
|
||||
return YES;
|
||||
|
||||
return NO;
|
||||
@ -581,13 +581,13 @@
|
||||
-(void)drawRect: (NSRect)rect
|
||||
{
|
||||
GdkRectangle gdk_rect;
|
||||
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (gdk_window->impl);
|
||||
GdkSurfaceImplQuartz *impl = GDK_SURFACE_IMPL_QUARTZ (gdk_window->impl);
|
||||
const NSRect *drawn_rects;
|
||||
NSInteger count;
|
||||
int i;
|
||||
cairo_region_t *region;
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (gdk_window))
|
||||
if (GDK_SURFACE_DESTROYED (gdk_surface))
|
||||
return;
|
||||
|
||||
if (! (gdk_window->event_mask & GDK_EXPOSURE_MASK))
|
||||
@ -596,7 +596,7 @@
|
||||
if (NSEqualRects (rect, NSZeroRect))
|
||||
return;
|
||||
|
||||
if (!GDK_WINDOW_IS_MAPPED (gdk_window))
|
||||
if (!GDK_SURFACE_IS_MAPPED (gdk_surface))
|
||||
{
|
||||
/* If the window is not yet mapped, clip_region_with_children
|
||||
* will be empty causing the usual code below to draw nothing.
|
||||
@ -636,7 +636,7 @@
|
||||
}
|
||||
|
||||
impl->in_paint_rect_count++;
|
||||
_gdk_window_process_updates_recurse (gdk_window, region);
|
||||
_gdk_surface_process_updates_recurse (gdk_surface, region);
|
||||
impl->in_paint_rect_count--;
|
||||
|
||||
cairo_region_destroy (region);
|
||||
@ -658,7 +658,7 @@
|
||||
*/
|
||||
-(void)updateTrackingRect
|
||||
{
|
||||
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (gdk_window->impl);
|
||||
GdkSurfaceImplQuartz *impl = GDK_SURFACE_IMPL_QUARTZ (gdk_window->impl);
|
||||
NSRect rect;
|
||||
|
||||
if (!impl || !impl->toplevel)
|
||||
|
@ -34,15 +34,15 @@
|
||||
|
||||
@interface GdkQuartzView : NSView <NSTextInputClient>
|
||||
{
|
||||
GdkWindow *gdk_window;
|
||||
GdkSurface *gdk_surface;
|
||||
NSTrackingRectTag trackingRect;
|
||||
BOOL needsInvalidateShadow;
|
||||
NSRange markedRange;
|
||||
NSRange selectedRange;
|
||||
}
|
||||
|
||||
- (void)setGdkWindow: (GdkWindow *)window;
|
||||
- (GdkWindow *)gdkWindow;
|
||||
- (void)setGdkSurface: (GdkSurface *)window;
|
||||
- (GdkSurface *)gdkWindow;
|
||||
- (NSTrackingRectTag)trackingRect;
|
||||
- (void)setNeedsInvalidateShadow: (BOOL)invalidate;
|
||||
|
||||
|
@ -38,46 +38,46 @@ struct _GdkQuartzDeviceCoreClass
|
||||
};
|
||||
|
||||
static gboolean gdk_quartz_device_core_get_history (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
guint32 start,
|
||||
guint32 stop,
|
||||
GdkTimeCoord ***events,
|
||||
gint *n_events);
|
||||
static void gdk_quartz_device_core_get_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gdouble *axes,
|
||||
GdkModifierType *mask);
|
||||
static void gdk_quartz_device_core_set_window_cursor (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkCursor *cursor);
|
||||
static void gdk_quartz_device_core_warp (GdkDevice *device,
|
||||
gdouble x,
|
||||
gdouble y);
|
||||
static void gdk_quartz_device_core_query_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkWindow **root_window,
|
||||
GdkWindow **child_window,
|
||||
GdkSurface *window,
|
||||
GdkSurface **root_window,
|
||||
GdkSurface **child_window,
|
||||
gdouble *root_x,
|
||||
gdouble *root_y,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
GdkModifierType *mask);
|
||||
static GdkGrabStatus gdk_quartz_device_core_grab (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gboolean owner_events,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindow *confine_to,
|
||||
GdkSurface *confine_to,
|
||||
GdkCursor *cursor,
|
||||
guint32 time_);
|
||||
static void gdk_quartz_device_core_ungrab (GdkDevice *device,
|
||||
guint32 time_);
|
||||
static GdkWindow * gdk_quartz_device_core_window_at_position (GdkDevice *device,
|
||||
static GdkSurface * gdk_quartz_device_core_window_at_position (GdkDevice *device,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
GdkModifierType *mask,
|
||||
gboolean get_toplevel);
|
||||
static void gdk_quartz_device_core_select_window_events (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkEventMask event_mask);
|
||||
|
||||
|
||||
@ -112,7 +112,7 @@ gdk_quartz_device_core_init (GdkQuartzDeviceCore *quartz_device_core)
|
||||
|
||||
static gboolean
|
||||
gdk_quartz_device_core_get_history (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
guint32 start,
|
||||
guint32 stop,
|
||||
GdkTimeCoord ***events,
|
||||
@ -123,13 +123,13 @@ gdk_quartz_device_core_get_history (GdkDevice *device,
|
||||
|
||||
static void
|
||||
gdk_quartz_device_core_get_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gdouble *axes,
|
||||
GdkModifierType *mask)
|
||||
{
|
||||
gdouble x_pos, y_pos;
|
||||
|
||||
gdk_window_get_device_position_double (window, device, &x_pos, &y_pos, mask);
|
||||
gdk_surface_get_device_position_double (window, device, &x_pos, &y_pos, mask);
|
||||
|
||||
if (axes)
|
||||
{
|
||||
@ -139,12 +139,12 @@ gdk_quartz_device_core_get_state (GdkDevice *device,
|
||||
}
|
||||
|
||||
static void
|
||||
translate_coords_to_child_coords (GdkWindow *parent,
|
||||
GdkWindow *child,
|
||||
translate_coords_to_child_coords (GdkSurface *parent,
|
||||
GdkSurface *child,
|
||||
gint *x,
|
||||
gint *y)
|
||||
{
|
||||
GdkWindow *current = child;
|
||||
GdkSurface *current = child;
|
||||
|
||||
if (child == parent)
|
||||
return;
|
||||
@ -153,23 +153,23 @@ translate_coords_to_child_coords (GdkWindow *parent,
|
||||
{
|
||||
gint tmp_x, tmp_y;
|
||||
|
||||
gdk_window_get_origin (current, &tmp_x, &tmp_y);
|
||||
gdk_surface_get_origin (current, &tmp_x, &tmp_y);
|
||||
|
||||
*x -= tmp_x;
|
||||
*y -= tmp_y;
|
||||
|
||||
current = gdk_window_get_parent (current);
|
||||
current = gdk_surface_get_parent (current);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_device_core_set_window_cursor (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkCursor *cursor)
|
||||
{
|
||||
NSCursor *nscursor;
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
if (GDK_SURFACE_DESTROYED (window))
|
||||
return;
|
||||
|
||||
nscursor = _gdk_quartz_cursor_get_ns_cursor (cursor);
|
||||
@ -185,21 +185,21 @@ gdk_quartz_device_core_warp (GdkDevice *device,
|
||||
CGDisplayMoveCursorToPoint (CGMainDisplayID (), CGPointMake (x, y));
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
gdk_quartz_device_core_query_state_helper (GdkWindow *window,
|
||||
static GdkSurface *
|
||||
gdk_quartz_device_core_query_state_helper (GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
gdouble *x,
|
||||
gdouble *y,
|
||||
GdkModifierType *mask)
|
||||
{
|
||||
GdkWindow *toplevel;
|
||||
GdkSurface *toplevel;
|
||||
NSPoint point;
|
||||
gint x_tmp, y_tmp;
|
||||
GdkWindow *found_window;
|
||||
GdkSurface *found_window;
|
||||
|
||||
g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), NULL);
|
||||
g_return_val_if_fail (window == NULL || GDK_IS_SURFACE (window), NULL);
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
if (GDK_SURFACE_DESTROYED (window))
|
||||
{
|
||||
*x = 0;
|
||||
*y = 0;
|
||||
@ -207,7 +207,7 @@ gdk_quartz_device_core_query_state_helper (GdkWindow *window,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
toplevel = gdk_window_get_toplevel (window);
|
||||
toplevel = gdk_surface_get_toplevel (window);
|
||||
|
||||
if (mask)
|
||||
*mask = _gdk_quartz_events_get_current_keyboard_modifiers () |
|
||||
@ -217,14 +217,14 @@ gdk_quartz_device_core_query_state_helper (GdkWindow *window,
|
||||
if (window == _gdk_root)
|
||||
{
|
||||
point = [NSEvent mouseLocation];
|
||||
_gdk_quartz_window_nspoint_to_gdk_xy (point, &x_tmp, &y_tmp);
|
||||
_gdk_quartz_surface_nspoint_to_gdk_xy (point, &x_tmp, &y_tmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
GdkWindowImplQuartz *impl;
|
||||
GdkSurfaceImplQuartz *impl;
|
||||
NSWindow *nswindow;
|
||||
|
||||
impl = GDK_WINDOW_IMPL_QUARTZ (toplevel->impl);
|
||||
impl = GDK_SURFACE_IMPL_QUARTZ (toplevel->impl);
|
||||
nswindow = impl->toplevel;
|
||||
|
||||
point = [nswindow mouseLocationOutsideOfEventStream];
|
||||
@ -235,7 +235,7 @@ gdk_quartz_device_core_query_state_helper (GdkWindow *window,
|
||||
window = toplevel;
|
||||
}
|
||||
|
||||
found_window = _gdk_quartz_window_find_child (window, x_tmp, y_tmp,
|
||||
found_window = _gdk_quartz_surface_find_child (window, x_tmp, y_tmp,
|
||||
FALSE);
|
||||
|
||||
if (found_window == _gdk_root)
|
||||
@ -255,15 +255,15 @@ gdk_quartz_device_core_query_state_helper (GdkWindow *window,
|
||||
|
||||
static void
|
||||
gdk_quartz_device_core_query_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkWindow **child_window,
|
||||
GdkSurface *window,
|
||||
GdkSurface **child_window,
|
||||
gdouble *root_x,
|
||||
gdouble *root_y,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
GdkModifierType *mask)
|
||||
{
|
||||
GdkWindow *found_window;
|
||||
GdkSurface *found_window;
|
||||
NSPoint point;
|
||||
gint x_tmp, y_tmp;
|
||||
|
||||
@ -281,7 +281,7 @@ gdk_quartz_device_core_query_state (GdkDevice *device,
|
||||
*child_window = found_window;
|
||||
|
||||
point = [NSEvent mouseLocation];
|
||||
_gdk_quartz_window_nspoint_to_gdk_xy (point, &x_tmp, &y_tmp);
|
||||
_gdk_quartz_surface_nspoint_to_gdk_xy (point, &x_tmp, &y_tmp);
|
||||
|
||||
if (root_x)
|
||||
*root_x = x_tmp;
|
||||
@ -292,10 +292,10 @@ gdk_quartz_device_core_query_state (GdkDevice *device,
|
||||
|
||||
static GdkGrabStatus
|
||||
gdk_quartz_device_core_grab (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gboolean owner_events,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindow *confine_to,
|
||||
GdkSurface *confine_to,
|
||||
GdkCursor *cursor,
|
||||
guint32 time_)
|
||||
{
|
||||
@ -316,22 +316,22 @@ gdk_quartz_device_core_ungrab (GdkDevice *device,
|
||||
_gdk_display_device_grab_update (_gdk_display, device, NULL, 0);
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
static GdkSurface *
|
||||
gdk_quartz_device_core_window_at_position (GdkDevice *device,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
GdkModifierType *mask,
|
||||
gboolean get_toplevel)
|
||||
{
|
||||
GdkWindow *found_window;
|
||||
GdkSurface *found_window;
|
||||
NSPoint point;
|
||||
gint x_tmp, y_tmp;
|
||||
|
||||
/* Get mouse coordinates, find window under the mouse pointer */
|
||||
point = [NSEvent mouseLocation];
|
||||
_gdk_quartz_window_nspoint_to_gdk_xy (point, &x_tmp, &y_tmp);
|
||||
_gdk_quartz_surface_nspoint_to_gdk_xy (point, &x_tmp, &y_tmp);
|
||||
|
||||
found_window = _gdk_quartz_window_find_child (_gdk_root, x_tmp, y_tmp, get_toplevel);
|
||||
found_window = _gdk_quartz_surface_find_child (_gdk_root, x_tmp, y_tmp, get_toplevel);
|
||||
|
||||
if (found_window)
|
||||
translate_coords_to_child_coords (_gdk_root, found_window, &x_tmp, &y_tmp);
|
||||
@ -351,7 +351,7 @@ gdk_quartz_device_core_window_at_position (GdkDevice *device,
|
||||
|
||||
static void
|
||||
gdk_quartz_device_core_select_window_events (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkEventMask event_mask)
|
||||
{
|
||||
/* The mask is set in the common code. */
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "gdkdisplay-quartz.h"
|
||||
|
||||
|
||||
static GdkWindow *
|
||||
static GdkSurface *
|
||||
gdk_quartz_display_get_default_group (GdkDisplay *display)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
||||
@ -62,7 +62,7 @@ _gdk_quartz_display_open (const gchar *display_name)
|
||||
|
||||
_gdk_screen = g_object_new (gdk_quartz_screen_get_type (), NULL);
|
||||
|
||||
_gdk_quartz_window_init_windowing (_gdk_display);
|
||||
_gdk_quartz_surface_init_windowing (_gdk_display);
|
||||
|
||||
_gdk_quartz_events_init ();
|
||||
|
||||
@ -215,7 +215,7 @@ gdk_quartz_display_class_init (GdkQuartzDisplayClass *class)
|
||||
object_class->finalize = gdk_quartz_display_finalize;
|
||||
object_class->dispose = gdk_quartz_display_dispose;
|
||||
|
||||
display_class->window_type = GDK_TYPE_QUARTZ_WINDOW;
|
||||
display_class->window_type = GDK_TYPE_QUARTZ_SURFACE;
|
||||
|
||||
display_class->get_name = gdk_quartz_display_get_name;
|
||||
display_class->beep = gdk_quartz_display_beep;
|
||||
|
@ -63,10 +63,10 @@ void _gdk_quartz_display_get_maximal_cursor_size (GdkDisplay *display,
|
||||
void _gdk_quartz_display_before_process_all_updates (GdkDisplay *display);
|
||||
void _gdk_quartz_display_after_process_all_updates (GdkDisplay *display);
|
||||
void _gdk_quartz_display_create_window_impl (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
GdkWindow *real_parent,
|
||||
GdkSurface *window,
|
||||
GdkSurface *real_parent,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindowAttr *attributes);
|
||||
GdkSurfaceAttr *attributes);
|
||||
|
||||
/* Display methods - keymap */
|
||||
GdkKeymap * _gdk_quartz_display_get_keymap (GdkDisplay *display);
|
||||
|
@ -34,7 +34,7 @@ gdk_quartz_drag_source_context_libgtk_only ()
|
||||
}
|
||||
|
||||
GdkDragContext *
|
||||
_gdk_quartz_window_drag_begin (GdkWindow *window,
|
||||
_gdk_quartz_surface_drag_begin (GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
GList *targets,
|
||||
gint dx,
|
||||
@ -97,7 +97,7 @@ gdk_quartz_drag_context_drop_finish (GdkDragContext *context,
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_quartz_window_register_dnd (GdkWindow *window)
|
||||
_gdk_quartz_surface_register_dnd (GdkSurface *window)
|
||||
{
|
||||
/* FIXME: Implement */
|
||||
}
|
||||
|
@ -39,16 +39,16 @@
|
||||
#define GRIP_HEIGHT 15
|
||||
#define GDK_LION_RESIZE 5
|
||||
|
||||
#define WINDOW_IS_TOPLEVEL(window) (GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD)
|
||||
#define WINDOW_IS_TOPLEVEL(window) (GDK_SURFACE_TYPE (window) != GDK_SURFACE_CHILD)
|
||||
|
||||
/* This is the window corresponding to the key window */
|
||||
static GdkWindow *current_keyboard_window;
|
||||
static GdkSurface *current_keyboard_window;
|
||||
|
||||
|
||||
static void append_event (GdkEvent *event,
|
||||
gboolean windowing);
|
||||
|
||||
static GdkWindow *find_toplevel_under_pointer (GdkDisplay *display,
|
||||
static GdkSurface *find_toplevel_under_pointer (GdkDisplay *display,
|
||||
NSPoint screen_point,
|
||||
gint *x,
|
||||
gint *y);
|
||||
@ -378,7 +378,7 @@ get_event_mask_from_ns_event (NSEvent *nsevent)
|
||||
}
|
||||
|
||||
static void
|
||||
get_window_point_from_screen_point (GdkWindow *window,
|
||||
get_window_point_from_screen_point (GdkSurface *window,
|
||||
NSPoint screen_point,
|
||||
gint *x,
|
||||
gint *y)
|
||||
@ -386,7 +386,7 @@ get_window_point_from_screen_point (GdkWindow *window,
|
||||
NSPoint point;
|
||||
NSWindow *nswindow;
|
||||
|
||||
nswindow = ((GdkWindowImplQuartz *)window->impl)->toplevel;
|
||||
nswindow = ((GdkSurfaceImplQuartz *)window->impl)->toplevel;
|
||||
|
||||
point = [nswindow convertScreenToBase:screen_point];
|
||||
|
||||
@ -408,13 +408,13 @@ is_mouse_button_press_event (NSEventType type)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
static GdkSurface *
|
||||
get_toplevel_from_ns_event (NSEvent *nsevent,
|
||||
NSPoint *screen_point,
|
||||
gint *x,
|
||||
gint *y)
|
||||
{
|
||||
GdkWindow *toplevel = NULL;
|
||||
GdkSurface *toplevel = NULL;
|
||||
|
||||
if ([nsevent window])
|
||||
{
|
||||
@ -488,7 +488,7 @@ get_toplevel_from_ns_event (NSEvent *nsevent,
|
||||
}
|
||||
|
||||
static GdkEvent *
|
||||
create_focus_event (GdkWindow *window,
|
||||
create_focus_event (GdkSurface *window,
|
||||
gboolean in)
|
||||
{
|
||||
GdkEvent *event;
|
||||
@ -507,7 +507,7 @@ create_focus_event (GdkWindow *window,
|
||||
|
||||
|
||||
static void
|
||||
generate_motion_event (GdkWindow *window)
|
||||
generate_motion_event (GdkSurface *window)
|
||||
{
|
||||
NSPoint screen_point;
|
||||
GdkEvent *event;
|
||||
@ -520,7 +520,7 @@ generate_motion_event (GdkWindow *window)
|
||||
|
||||
screen_point = [NSEvent mouseLocation];
|
||||
|
||||
_gdk_quartz_window_nspoint_to_gdk_xy (screen_point, &x_root, &y_root);
|
||||
_gdk_quartz_surface_nspoint_to_gdk_xy (screen_point, &x_root, &y_root);
|
||||
get_window_point_from_screen_point (window, screen_point, &x, &y);
|
||||
|
||||
event->any.type = GDK_MOTION_NOTIFY;
|
||||
@ -542,7 +542,7 @@ generate_motion_event (GdkWindow *window)
|
||||
|
||||
/* Note: Used to both set a new focus window and to unset the old one. */
|
||||
void
|
||||
_gdk_quartz_events_update_focus_window (GdkWindow *window,
|
||||
_gdk_quartz_events_update_focus_window (GdkSurface *window,
|
||||
gboolean got_focus)
|
||||
{
|
||||
GdkEvent *event;
|
||||
@ -586,9 +586,9 @@ _gdk_quartz_events_update_focus_window (GdkWindow *window,
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_quartz_events_send_map_event (GdkWindow *window)
|
||||
_gdk_quartz_events_send_map_event (GdkSurface *window)
|
||||
{
|
||||
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
|
||||
GdkSurfaceImplQuartz *impl = GDK_SURFACE_IMPL_QUARTZ (window->impl);
|
||||
|
||||
if (!impl->toplevel)
|
||||
return;
|
||||
@ -604,14 +604,14 @@ _gdk_quartz_events_send_map_event (GdkWindow *window)
|
||||
}
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
static GdkSurface *
|
||||
find_toplevel_under_pointer (GdkDisplay *display,
|
||||
NSPoint screen_point,
|
||||
gint *x,
|
||||
gint *y)
|
||||
{
|
||||
GdkWindow *toplevel;
|
||||
GdkPointerWindowInfo *info;
|
||||
GdkSurface *toplevel;
|
||||
GdkPointerSurfaceInfo *info;
|
||||
|
||||
info = _gdk_display_get_pointer_info (display, GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_device_manager)->core_pointer);
|
||||
toplevel = info->toplevel_under_pointer;
|
||||
@ -633,11 +633,11 @@ find_toplevel_under_pointer (GdkDisplay *display,
|
||||
return toplevel;
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
static GdkSurface *
|
||||
find_toplevel_for_keyboard_event (NSEvent *nsevent)
|
||||
{
|
||||
GList *devices = NULL, *l;
|
||||
GdkWindow *window;
|
||||
GdkSurface *window;
|
||||
GdkDisplay *display;
|
||||
GdkQuartzView *view;
|
||||
GdkSeat *seat;
|
||||
@ -645,7 +645,7 @@ find_toplevel_for_keyboard_event (NSEvent *nsevent)
|
||||
view = (GdkQuartzView *)[[nsevent window] contentView];
|
||||
window = [view gdkWindow];
|
||||
|
||||
display = gdk_window_get_display (window);
|
||||
display = gdk_surface_get_display (window);
|
||||
|
||||
seat = gdk_display_get_default_seat (display);
|
||||
|
||||
@ -663,7 +663,7 @@ find_toplevel_for_keyboard_event (NSEvent *nsevent)
|
||||
grab = _gdk_display_get_last_device_grab (display, device);
|
||||
if (grab && grab->window && !grab->owner_events)
|
||||
{
|
||||
window = gdk_window_get_toplevel (grab->window);
|
||||
window = gdk_surface_get_toplevel (grab->window);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -673,20 +673,20 @@ find_toplevel_for_keyboard_event (NSEvent *nsevent)
|
||||
return window;
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
static GdkSurface *
|
||||
find_toplevel_for_mouse_event (NSEvent *nsevent,
|
||||
gint *x,
|
||||
gint *y)
|
||||
{
|
||||
NSPoint screen_point;
|
||||
NSEventType event_type;
|
||||
GdkWindow *toplevel;
|
||||
GdkSurface *toplevel;
|
||||
GdkDisplay *display;
|
||||
GdkDeviceGrabInfo *grab;
|
||||
|
||||
toplevel = get_toplevel_from_ns_event (nsevent, &screen_point, x, y);
|
||||
|
||||
display = gdk_window_get_display (toplevel);
|
||||
display = gdk_surface_get_display (toplevel);
|
||||
|
||||
event_type = [nsevent type];
|
||||
|
||||
@ -717,7 +717,7 @@ find_toplevel_for_mouse_event (NSEvent *nsevent,
|
||||
* reported with respect to the key window, which could be
|
||||
* wrong.
|
||||
*/
|
||||
GdkWindow *toplevel_under_pointer;
|
||||
GdkSurface *toplevel_under_pointer;
|
||||
gint x_tmp, y_tmp;
|
||||
|
||||
toplevel_under_pointer = find_toplevel_under_pointer (display,
|
||||
@ -735,9 +735,9 @@ find_toplevel_for_mouse_event (NSEvent *nsevent,
|
||||
else
|
||||
{
|
||||
/* Finally check the grab window. */
|
||||
GdkWindow *grab_toplevel;
|
||||
GdkSurface *grab_toplevel;
|
||||
|
||||
grab_toplevel = gdk_window_get_toplevel (grab->window);
|
||||
grab_toplevel = gdk_surface_get_toplevel (grab->window);
|
||||
get_window_point_from_screen_point (grab_toplevel, screen_point,
|
||||
x, y);
|
||||
|
||||
@ -749,7 +749,7 @@ find_toplevel_for_mouse_event (NSEvent *nsevent,
|
||||
else
|
||||
{
|
||||
/* The non-grabbed case. */
|
||||
GdkWindow *toplevel_under_pointer;
|
||||
GdkSurface *toplevel_under_pointer;
|
||||
gint x_tmp, y_tmp;
|
||||
|
||||
/* Ignore all events but mouse moved that might be on the title
|
||||
@ -770,11 +770,11 @@ find_toplevel_for_mouse_event (NSEvent *nsevent,
|
||||
if (toplevel_under_pointer
|
||||
&& WINDOW_IS_TOPLEVEL (toplevel_under_pointer))
|
||||
{
|
||||
GdkWindowImplQuartz *toplevel_impl;
|
||||
GdkSurfaceImplQuartz *toplevel_impl;
|
||||
|
||||
toplevel = toplevel_under_pointer;
|
||||
|
||||
toplevel_impl = (GdkWindowImplQuartz *)toplevel->impl;
|
||||
toplevel_impl = (GdkSurfaceImplQuartz *)toplevel->impl;
|
||||
|
||||
*x = x_tmp;
|
||||
*y = y_tmp;
|
||||
@ -789,7 +789,7 @@ find_toplevel_for_mouse_event (NSEvent *nsevent,
|
||||
/* This function finds the correct window to send an event to, taking
|
||||
* into account grabs, event propagation, and event masks.
|
||||
*/
|
||||
static GdkWindow *
|
||||
static GdkSurface *
|
||||
find_window_for_ns_event (NSEvent *nsevent,
|
||||
gint *x,
|
||||
gint *y,
|
||||
@ -797,7 +797,7 @@ find_window_for_ns_event (NSEvent *nsevent,
|
||||
gint *y_root)
|
||||
{
|
||||
GdkQuartzView *view;
|
||||
GdkWindow *toplevel;
|
||||
GdkSurface *toplevel;
|
||||
NSPoint screen_point;
|
||||
NSEventType event_type;
|
||||
|
||||
@ -806,7 +806,7 @@ find_window_for_ns_event (NSEvent *nsevent,
|
||||
toplevel = get_toplevel_from_ns_event (nsevent, &screen_point, x, y);
|
||||
if (!toplevel)
|
||||
return NULL;
|
||||
_gdk_quartz_window_nspoint_to_gdk_xy (screen_point, x_root, y_root);
|
||||
_gdk_quartz_surface_nspoint_to_gdk_xy (screen_point, x_root, y_root);
|
||||
|
||||
event_type = [nsevent type];
|
||||
|
||||
@ -851,7 +851,7 @@ find_window_for_ns_event (NSEvent *nsevent,
|
||||
}
|
||||
|
||||
static void
|
||||
fill_crossing_event (GdkWindow *toplevel,
|
||||
fill_crossing_event (GdkSurface *toplevel,
|
||||
GdkEvent *event,
|
||||
NSEvent *nsevent,
|
||||
gint x,
|
||||
@ -899,7 +899,7 @@ fill_crossing_event (GdkWindow *toplevel,
|
||||
*/
|
||||
#ifdef AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
|
||||
static void
|
||||
fill_pinch_event (GdkWindow *window,
|
||||
fill_pinch_event (GdkSurface *window,
|
||||
GdkEvent *event,
|
||||
NSEvent *nsevent,
|
||||
gint x,
|
||||
@ -996,7 +996,7 @@ fill_pinch_event (GdkWindow *window,
|
||||
#endif /* OSX Version >= 10.8 */
|
||||
|
||||
static void
|
||||
fill_button_event (GdkWindow *window,
|
||||
fill_button_event (GdkSurface *window,
|
||||
GdkEvent *event,
|
||||
NSEvent *nsevent,
|
||||
gint x,
|
||||
@ -1047,7 +1047,7 @@ fill_button_event (GdkWindow *window,
|
||||
}
|
||||
|
||||
static void
|
||||
fill_motion_event (GdkWindow *window,
|
||||
fill_motion_event (GdkSurface *window,
|
||||
GdkEvent *event,
|
||||
NSEvent *nsevent,
|
||||
gint x,
|
||||
@ -1073,7 +1073,7 @@ fill_motion_event (GdkWindow *window,
|
||||
}
|
||||
|
||||
static void
|
||||
fill_scroll_event (GdkWindow *window,
|
||||
fill_scroll_event (GdkSurface *window,
|
||||
GdkEvent *event,
|
||||
NSEvent *nsevent,
|
||||
gint x,
|
||||
@ -1106,7 +1106,7 @@ fill_scroll_event (GdkWindow *window,
|
||||
}
|
||||
|
||||
static void
|
||||
fill_key_event (GdkWindow *window,
|
||||
fill_key_event (GdkSurface *window,
|
||||
GdkEvent *event,
|
||||
NSEvent *nsevent,
|
||||
GdkEventType type)
|
||||
@ -1236,7 +1236,7 @@ fill_key_event (GdkWindow *window,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
synthesize_crossing_event (GdkWindow *window,
|
||||
synthesize_crossing_event (GdkSurface *window,
|
||||
GdkEvent *event,
|
||||
NSEvent *nsevent,
|
||||
gint x,
|
||||
@ -1283,7 +1283,7 @@ synthesize_crossing_event (GdkWindow *window,
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_quartz_synthesize_null_key_event (GdkWindow *window)
|
||||
_gdk_quartz_synthesize_null_key_event (GdkSurface *window)
|
||||
{
|
||||
GdkEvent *event;
|
||||
GdkQuartzDeviceManagerCore *device_manager;
|
||||
@ -1344,15 +1344,15 @@ _gdk_quartz_events_get_current_mouse_modifiers (void)
|
||||
/* Detect window resizing */
|
||||
|
||||
static gboolean
|
||||
test_resize (NSEvent *event, GdkWindow *toplevel, gint x, gint y)
|
||||
test_resize (NSEvent *event, GdkSurface *toplevel, gint x, gint y)
|
||||
{
|
||||
GdkWindowImplQuartz *toplevel_impl;
|
||||
GdkSurfaceImplQuartz *toplevel_impl;
|
||||
gboolean lion;
|
||||
|
||||
/* Resizing from the resize indicator only begins if an NSLeftMouseButton
|
||||
* event is received in the resizing area.
|
||||
*/
|
||||
toplevel_impl = (GdkWindowImplQuartz *)toplevel->impl;
|
||||
toplevel_impl = (GdkSurfaceImplQuartz *)toplevel->impl;
|
||||
if ([toplevel_impl->toplevel showsResizeIndicator])
|
||||
if ([event type] == NSLeftMouseDown &&
|
||||
[toplevel_impl->toplevel showsResizeIndicator])
|
||||
@ -1388,7 +1388,7 @@ test_resize (NSEvent *event, GdkWindow *toplevel, gint x, gint y)
|
||||
* do receive, for instance, a right mouse down event for a GDK window
|
||||
* for x-coordinate range [-3, 0], but we do not want to forward this
|
||||
* into GDK. Forwarding such events into GDK will confuse the pointer
|
||||
* window finding code, because there are no GdkWindows present in
|
||||
* window finding code, because there are no GdkSurfaces present in
|
||||
* the range [-3, 0].
|
||||
*/
|
||||
lion = gdk_quartz_osx_version () >= GDK_OSX_LION;
|
||||
@ -1412,7 +1412,7 @@ gdk_event_translate (GdkEvent *event,
|
||||
{
|
||||
NSEventType event_type;
|
||||
NSWindow *nswindow;
|
||||
GdkWindow *window;
|
||||
GdkSurface *window;
|
||||
int x, y;
|
||||
int x_root, y_root;
|
||||
gboolean return_val;
|
||||
@ -1457,7 +1457,7 @@ gdk_event_translate (GdkEvent *event,
|
||||
/* Ignore events for ones with no windows */
|
||||
if (!nswindow)
|
||||
{
|
||||
GdkWindow *toplevel = NULL;
|
||||
GdkSurface *toplevel = NULL;
|
||||
|
||||
if (event_type == NSMouseMoved)
|
||||
{
|
||||
@ -1505,7 +1505,7 @@ gdk_event_translate (GdkEvent *event,
|
||||
return FALSE;
|
||||
|
||||
/* Apply any window filters. */
|
||||
if (GDK_IS_WINDOW (window))
|
||||
if (GDK_IS_SURFACE (window))
|
||||
{
|
||||
GdkFilterReturn result;
|
||||
|
||||
@ -1534,7 +1534,7 @@ gdk_event_translate (GdkEvent *event,
|
||||
event_type == NSOtherMouseDown ||
|
||||
event_type == NSLeftMouseDown))
|
||||
{
|
||||
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
|
||||
GdkSurfaceImplQuartz *impl = GDK_SURFACE_IMPL_QUARTZ (window->impl);
|
||||
|
||||
if (![NSApp isActive])
|
||||
{
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "gdkintl.h"
|
||||
|
||||
GdkGLContext *
|
||||
gdk_quartz_window_create_gl_context (GdkWindow *window,
|
||||
gdk_quartz_surface_create_gl_context (GdkSurface *window,
|
||||
gboolean attached,
|
||||
GdkGLContext *share,
|
||||
GError **error)
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
GdkGLContext * gdk_quartz_window_create_gl_context (GdkWindow *window,
|
||||
GdkGLContext * gdk_quartz_surface_create_gl_context (GdkSurface *window,
|
||||
gboolean attach,
|
||||
GdkGLContext *share,
|
||||
GError **error);
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
GdkDisplay *_gdk_display = NULL;
|
||||
GdkQuartzScreen *_gdk_screen = NULL;
|
||||
GdkWindow *_gdk_root = NULL;
|
||||
GdkSurface *_gdk_root = NULL;
|
||||
GdkDeviceManager *_gdk_device_manager = NULL;
|
||||
|
||||
GdkOSXVersion
|
||||
|
@ -36,15 +36,15 @@
|
||||
|
||||
extern GdkDisplay *_gdk_display;
|
||||
extern GdkQuartzScreen *_gdk_screen;
|
||||
extern GdkWindow *_gdk_root;
|
||||
extern GdkSurface *_gdk_root;
|
||||
extern GdkDeviceManager *_gdk_device_manager;
|
||||
|
||||
extern GdkDragContext *_gdk_quartz_drag_source_context;
|
||||
|
||||
#define GDK_WINDOW_IS_QUARTZ(win) (GDK_IS_WINDOW_IMPL_QUARTZ (((GdkWindow *)win)->impl))
|
||||
#define GDK_SURFACE_IS_QUARTZ(win) (GDK_IS_SURFACE_IMPL_QUARTZ (((GdkSurface *)win)->impl))
|
||||
|
||||
/* Initialization */
|
||||
void _gdk_quartz_window_init_windowing (GdkDisplay *display);
|
||||
void _gdk_quartz_surface_init_windowing (GdkDisplay *display);
|
||||
void _gdk_quartz_events_init (void);
|
||||
void _gdk_quartz_event_loop_init (void);
|
||||
|
||||
@ -56,9 +56,9 @@ typedef enum {
|
||||
GDK_QUARTZ_EVENT_SUBTYPE_EVENTLOOP
|
||||
} GdkQuartzEventSubType;
|
||||
|
||||
void _gdk_quartz_events_update_focus_window (GdkWindow *new_window,
|
||||
void _gdk_quartz_events_update_focus_window (GdkSurface *new_window,
|
||||
gboolean got_focus);
|
||||
void _gdk_quartz_events_send_map_event (GdkWindow *window);
|
||||
void _gdk_quartz_events_send_map_event (GdkSurface *window);
|
||||
|
||||
GdkModifierType _gdk_quartz_events_get_current_keyboard_modifiers (void);
|
||||
GdkModifierType _gdk_quartz_events_get_current_mouse_modifiers (void);
|
||||
@ -73,11 +73,11 @@ void _gdk_quartz_event_loop_release_event (NSEvent *event);
|
||||
/* Keys */
|
||||
GdkEventType _gdk_quartz_keys_event_type (NSEvent *event);
|
||||
gboolean _gdk_quartz_keys_is_modifier (guint keycode);
|
||||
void _gdk_quartz_synthesize_null_key_event (GdkWindow *window);
|
||||
void _gdk_quartz_synthesize_null_key_event (GdkSurface *window);
|
||||
|
||||
/* Drag and Drop */
|
||||
void _gdk_quartz_window_register_dnd (GdkWindow *window);
|
||||
GdkDragContext * _gdk_quartz_window_drag_begin (GdkWindow *window,
|
||||
void _gdk_quartz_surface_register_dnd (GdkSurface *window);
|
||||
GdkDragContext * _gdk_quartz_surface_drag_begin (GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
GList *targets,
|
||||
gint x_root,
|
||||
@ -98,35 +98,35 @@ gboolean _gdk_quartz_get_setting (const gchar *name,
|
||||
|
||||
|
||||
/* Window */
|
||||
gboolean _gdk_quartz_window_is_ancestor (GdkWindow *ancestor,
|
||||
GdkWindow *window);
|
||||
void _gdk_quartz_window_gdk_xy_to_xy (gint gdk_x,
|
||||
gboolean _gdk_quartz_surface_is_ancestor (GdkSurface *ancestor,
|
||||
GdkSurface *window);
|
||||
void _gdk_quartz_surface_gdk_xy_to_xy (gint gdk_x,
|
||||
gint gdk_y,
|
||||
gint *ns_x,
|
||||
gint *ns_y);
|
||||
void _gdk_quartz_window_xy_to_gdk_xy (gint ns_x,
|
||||
void _gdk_quartz_surface_xy_to_gdk_xy (gint ns_x,
|
||||
gint ns_y,
|
||||
gint *gdk_x,
|
||||
gint *gdk_y);
|
||||
void _gdk_quartz_window_nspoint_to_gdk_xy (NSPoint point,
|
||||
void _gdk_quartz_surface_nspoint_to_gdk_xy (NSPoint point,
|
||||
gint *x,
|
||||
gint *y);
|
||||
GdkWindow *_gdk_quartz_window_find_child (GdkWindow *window,
|
||||
GdkSurface *_gdk_quartz_surface_find_child (GdkSurface *window,
|
||||
gint x,
|
||||
gint y,
|
||||
gboolean get_toplevel);
|
||||
void _gdk_quartz_window_attach_to_parent (GdkWindow *window);
|
||||
void _gdk_quartz_window_detach_from_parent (GdkWindow *window);
|
||||
void _gdk_quartz_window_did_become_main (GdkWindow *window);
|
||||
void _gdk_quartz_window_did_resign_main (GdkWindow *window);
|
||||
void _gdk_quartz_window_debug_highlight (GdkWindow *window,
|
||||
void _gdk_quartz_surface_attach_to_parent (GdkSurface *window);
|
||||
void _gdk_quartz_surface_detach_from_parent (GdkSurface *window);
|
||||
void _gdk_quartz_surface_did_become_main (GdkSurface *window);
|
||||
void _gdk_quartz_surface_did_resign_main (GdkSurface *window);
|
||||
void _gdk_quartz_surface_debug_highlight (GdkSurface *window,
|
||||
gint number);
|
||||
|
||||
void _gdk_quartz_window_update_position (GdkWindow *window);
|
||||
void _gdk_quartz_window_update_fullscreen_state (GdkWindow *window);
|
||||
void _gdk_quartz_surface_update_position (GdkSurface *window);
|
||||
void _gdk_quartz_surface_update_fullscreen_state (GdkSurface *window);
|
||||
|
||||
/* Window methods - property */
|
||||
gboolean _gdk_quartz_window_get_property (GdkWindow *window,
|
||||
gboolean _gdk_quartz_surface_get_property (GdkSurface *window,
|
||||
GdkAtom property,
|
||||
GdkAtom type,
|
||||
gulong offset,
|
||||
@ -136,14 +136,14 @@ gboolean _gdk_quartz_window_get_property (GdkWindow *window,
|
||||
gint *actual_format_type,
|
||||
gint *actual_length,
|
||||
guchar **data);
|
||||
void _gdk_quartz_window_change_property (GdkWindow *window,
|
||||
void _gdk_quartz_surface_change_property (GdkSurface *window,
|
||||
GdkAtom property,
|
||||
GdkAtom type,
|
||||
gint format,
|
||||
GdkPropMode mode,
|
||||
const guchar *data,
|
||||
gint nelements);
|
||||
void _gdk_quartz_window_delete_property (GdkWindow *window,
|
||||
void _gdk_quartz_surface_delete_property (GdkSurface *window,
|
||||
GdkAtom property);
|
||||
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_QUARTZ_WINDOW_H__
|
||||
#define __GDK_QUARTZ_WINDOW_H__
|
||||
#ifndef __GDK_QUARTZ_SURFACE_H__
|
||||
#define __GDK_QUARTZ_SURFACE_H__
|
||||
|
||||
#if !defined (__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
|
||||
#error "Only <gdk/gdkquartz.h> can be included directly."
|
||||
@ -28,28 +28,28 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GDK_TYPE_QUARTZ_WINDOW (gdk_quartz_window_get_type ())
|
||||
#define GDK_QUARTZ_WINDOW(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_WINDOW, GdkQuartzWindow))
|
||||
#define GDK_QUARTZ_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_WINDOW, GdkQuartzWindowClass))
|
||||
#define GDK_IS_QUARTZ_WINDOW(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_WINDOW))
|
||||
#define GDK_IS_QUARTZ_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_WINDOW))
|
||||
#define GDK_QUARTZ_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_WINDOW, GdkQuartzWindowClass))
|
||||
#define GDK_TYPE_QUARTZ_SURFACE (gdk_quartz_surface_get_type ())
|
||||
#define GDK_QUARTZ_SURFACE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_SURFACE, GdkQuartzSurface))
|
||||
#define GDK_QUARTZ_SURFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_SURFACE, GdkQuartzSurfaceClass))
|
||||
#define GDK_IS_QUARTZ_SURFACE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_SURFACE))
|
||||
#define GDK_IS_QUARTZ_SURFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_SURFACE))
|
||||
#define GDK_QUARTZ_SURFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_SURFACE, GdkQuartzSurfaceClass))
|
||||
|
||||
#ifdef GDK_COMPILATION
|
||||
typedef struct _GdkQuartzWindow GdkQuartzWindow;
|
||||
typedef struct _GdkQuartzSurface GdkQuartzSurface;
|
||||
#else
|
||||
typedef GdkWindow GdkQuartzWindow;
|
||||
typedef GdkSurface GdkQuartzSurface;
|
||||
#endif
|
||||
typedef struct _GdkQuartzWindowClass GdkQuartzWindowClass;
|
||||
typedef struct _GdkQuartzSurfaceClass GdkQuartzSurfaceClass;
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gdk_quartz_window_get_type (void);
|
||||
GType gdk_quartz_surface_get_type (void);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
NSWindow *gdk_quartz_window_get_nswindow (GdkWindow *window);
|
||||
NSWindow *gdk_quartz_surface_get_nswindow (GdkSurface *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
NSView *gdk_quartz_window_get_nsview (GdkWindow *window);
|
||||
NSView *gdk_quartz_surface_get_nsview (GdkSurface *window);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_QUARTZ_WINDOW_H__ */
|
||||
#endif /* __GDK_QUARTZ_SURFACE_H__ */
|
||||
|
@ -53,8 +53,8 @@
|
||||
*
|
||||
* A Cocoa coordinate is always relative to the origin of the monitor
|
||||
* coordinate space. Such coordinates are mapped to their respective
|
||||
* position in the GdkScreen root window (_gdk_quartz_window_xy_to_gdk_xy)
|
||||
* and vice versa (_gdk_quartz_window_gdk_xy_to_xy). Both functions can
|
||||
* position in the GdkScreen root window (_gdk_quartz_surface_xy_to_gdk_xy)
|
||||
* and vice versa (_gdk_quartz_surface_gdk_xy_to_xy). Both functions can
|
||||
* be found in gdkwindow-quartz.c. Note that Cocoa coordinates can have
|
||||
* negative values (in case a monitor is located left or below of screen 0),
|
||||
* but GDK coordinates can *not*!
|
||||
@ -208,7 +208,7 @@ _gdk_quartz_screen_update_window_sizes (GdkQuartzScreen *screen)
|
||||
|
||||
windows = get_toplevels ();
|
||||
for (list = windows; list; list = list->next)
|
||||
_gdk_quartz_window_update_position (list->data);
|
||||
_gdk_quartz_surface_update_position (list->data);
|
||||
}
|
||||
|
||||
static void
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -16,8 +16,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_WINDOW_QUARTZ_H__
|
||||
#define __GDK_WINDOW_QUARTZ_H__
|
||||
#ifndef __GDK_SURFACE_QUARTZ_H__
|
||||
#define __GDK_SURFACE_QUARTZ_H__
|
||||
|
||||
#import <gdk/quartz/GdkQuartzView.h>
|
||||
#import <gdk/quartz/GdkQuartzNSWindow.h>
|
||||
@ -28,31 +28,31 @@ G_BEGIN_DECLS
|
||||
/* Window implementation for Quartz
|
||||
*/
|
||||
|
||||
typedef struct _GdkWindowImplQuartz GdkWindowImplQuartz;
|
||||
typedef struct _GdkWindowImplQuartzClass GdkWindowImplQuartzClass;
|
||||
typedef struct _GdkSurfaceImplQuartz GdkSurfaceImplQuartz;
|
||||
typedef struct _GdkSurfaceImplQuartzClass GdkSurfaceImplQuartzClass;
|
||||
|
||||
#define GDK_TYPE_WINDOW_IMPL_QUARTZ (_gdk_window_impl_quartz_get_type ())
|
||||
#define GDK_WINDOW_IMPL_QUARTZ(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WINDOW_IMPL_QUARTZ, GdkWindowImplQuartz))
|
||||
#define GDK_WINDOW_IMPL_QUARTZ_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WINDOW_IMPL_QUARTZ, GdkWindowImplQuartzClass))
|
||||
#define GDK_IS_WINDOW_IMPL_QUARTZ(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW_IMPL_QUARTZ))
|
||||
#define GDK_IS_WINDOW_IMPL_QUARTZ_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WINDOW_IMPL_QUARTZ))
|
||||
#define GDK_WINDOW_IMPL_QUARTZ_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WINDOW_IMPL_QUARTZ, GdkWindowImplQuartzClass))
|
||||
#define GDK_TYPE_SURFACE_IMPL_QUARTZ (_gdk_surface_impl_quartz_get_type ())
|
||||
#define GDK_SURFACE_IMPL_QUARTZ(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_SURFACE_IMPL_QUARTZ, GdkSurfaceImplQuartz))
|
||||
#define GDK_SURFACE_IMPL_QUARTZ_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_SURFACE_IMPL_QUARTZ, GdkSurfaceImplQuartzClass))
|
||||
#define GDK_IS_SURFACE_IMPL_QUARTZ(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_SURFACE_IMPL_QUARTZ))
|
||||
#define GDK_IS_SURFACE_IMPL_QUARTZ_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_SURFACE_IMPL_QUARTZ))
|
||||
#define GDK_SURFACE_IMPL_QUARTZ_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_SURFACE_IMPL_QUARTZ, GdkSurfaceImplQuartzClass))
|
||||
|
||||
struct _GdkWindowImplQuartz
|
||||
struct _GdkSurfaceImplQuartz
|
||||
{
|
||||
GdkWindowImpl parent_instance;
|
||||
GdkSurfaceImpl parent_instance;
|
||||
|
||||
GdkWindow *wrapper;
|
||||
GdkSurface *wrapper;
|
||||
|
||||
NSWindow *toplevel;
|
||||
NSTrackingRectTag tracking_rect;
|
||||
GdkQuartzView *view;
|
||||
|
||||
GdkWindowTypeHint type_hint;
|
||||
GdkSurfaceTypeHint type_hint;
|
||||
|
||||
gint in_paint_rect_count;
|
||||
|
||||
GdkWindow *transient_for;
|
||||
GdkSurface *transient_for;
|
||||
|
||||
/* Sorted by z-order */
|
||||
GList *sorted_children;
|
||||
@ -66,21 +66,21 @@ struct _GdkWindowImplQuartz
|
||||
gint shadow_max;
|
||||
};
|
||||
|
||||
struct _GdkWindowImplQuartzClass
|
||||
struct _GdkSurfaceImplQuartzClass
|
||||
{
|
||||
GdkWindowImplClass parent_class;
|
||||
GdkSurfaceImplClass parent_class;
|
||||
|
||||
CGContextRef (* get_context) (GdkWindowImplQuartz *window,
|
||||
CGContextRef (* get_context) (GdkSurfaceImplQuartz *window,
|
||||
gboolean antialias);
|
||||
void (* release_context) (GdkWindowImplQuartz *window,
|
||||
void (* release_context) (GdkSurfaceImplQuartz *window,
|
||||
CGContextRef cg_context);
|
||||
};
|
||||
|
||||
GType _gdk_window_impl_quartz_get_type (void);
|
||||
GType _gdk_surface_impl_quartz_get_type (void);
|
||||
|
||||
CGContextRef gdk_quartz_window_get_context (GdkWindowImplQuartz *window,
|
||||
CGContextRef gdk_quartz_surface_get_context (GdkSurfaceImplQuartz *window,
|
||||
gboolean antialias);
|
||||
void gdk_quartz_window_release_context (GdkWindowImplQuartz *window,
|
||||
void gdk_quartz_surface_release_context (GdkSurfaceImplQuartz *window,
|
||||
CGContextRef context);
|
||||
|
||||
/* Root window implementation for Quartz
|
||||
@ -98,12 +98,12 @@ typedef struct _GdkRootWindowImplQuartzClass GdkRootWindowImplQuartzClass;
|
||||
|
||||
struct _GdkRootWindowImplQuartz
|
||||
{
|
||||
GdkWindowImplQuartz parent_instance;
|
||||
GdkSurfaceImplQuartz parent_instance;
|
||||
};
|
||||
|
||||
struct _GdkRootWindowImplQuartzClass
|
||||
{
|
||||
GdkWindowImplQuartzClass parent_class;
|
||||
GdkSurfaceImplQuartzClass parent_class;
|
||||
};
|
||||
|
||||
GType _gdk_root_window_impl_quartz_get_type (void);
|
||||
@ -112,4 +112,4 @@ GList *get_toplevels (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_WINDOW_QUARTZ_H__ */
|
||||
#endif /* __GDK_SURFACE_QUARTZ_H__ */
|
||||
|
@ -69,7 +69,7 @@ struct _GdkWaylandTouchData
|
||||
uint32_t id;
|
||||
gdouble x;
|
||||
gdouble y;
|
||||
GdkWindow *window;
|
||||
GdkSurface *window;
|
||||
uint32_t touch_down_serial;
|
||||
guint initial_touch : 1;
|
||||
};
|
||||
@ -86,7 +86,7 @@ struct _GdkWaylandPointerFrameData
|
||||
};
|
||||
|
||||
struct _GdkWaylandPointerData {
|
||||
GdkWindow *focus;
|
||||
GdkSurface *focus;
|
||||
|
||||
double surface_x, surface_y;
|
||||
|
||||
@ -96,7 +96,7 @@ struct _GdkWaylandPointerData {
|
||||
uint32_t enter_serial;
|
||||
uint32_t press_serial;
|
||||
|
||||
GdkWindow *grab_window;
|
||||
GdkSurface *grab_window;
|
||||
uint32_t grab_time;
|
||||
|
||||
struct wl_surface *pointer_surface;
|
||||
@ -220,8 +220,8 @@ struct _GdkWaylandSeat
|
||||
GdkWaylandPointerData touch_info;
|
||||
|
||||
GdkModifierType key_modifiers;
|
||||
GdkWindow *keyboard_focus;
|
||||
GdkWindow *grab_window;
|
||||
GdkSurface *keyboard_focus;
|
||||
GdkSurface *grab_window;
|
||||
uint32_t grab_time;
|
||||
gboolean have_server_repeat;
|
||||
uint32_t server_repeat_rate;
|
||||
@ -242,7 +242,7 @@ struct _GdkWaylandSeat
|
||||
GdkDragContext *drop_context;
|
||||
|
||||
/* Source/dest for non-local dnd */
|
||||
GdkWindow *foreign_dnd_window;
|
||||
GdkSurface *foreign_dnd_window;
|
||||
|
||||
/* Some tracking on gesture events */
|
||||
guint gesture_n_fingers;
|
||||
@ -298,7 +298,7 @@ static void deliver_key_event (GdkWaylandSeat *seat,
|
||||
|
||||
static gboolean
|
||||
gdk_wayland_device_get_history (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
guint32 start,
|
||||
guint32 stop,
|
||||
GdkTimeCoord ***events,
|
||||
@ -309,13 +309,13 @@ gdk_wayland_device_get_history (GdkDevice *device,
|
||||
|
||||
static void
|
||||
gdk_wayland_device_get_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gdouble *axes,
|
||||
GdkModifierType *mask)
|
||||
{
|
||||
gdouble x, y;
|
||||
|
||||
gdk_window_get_device_position_double (window, device, &x, &y, mask);
|
||||
gdk_surface_get_device_position_double (window, device, &x, &y, mask);
|
||||
|
||||
if (axes)
|
||||
{
|
||||
@ -470,7 +470,7 @@ gdk_wayland_device_update_window_cursor (GdkDevice *device)
|
||||
|
||||
static void
|
||||
gdk_wayland_device_set_window_cursor (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkCursor *cursor)
|
||||
{
|
||||
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (gdk_device_get_seat (device));
|
||||
@ -528,7 +528,7 @@ get_coordinates (GdkDevice *device,
|
||||
|
||||
if (pointer->focus)
|
||||
{
|
||||
gdk_window_get_root_coords (pointer->focus,
|
||||
gdk_surface_get_root_coords (pointer->focus,
|
||||
pointer->surface_x,
|
||||
pointer->surface_y,
|
||||
&root_x, &root_y);
|
||||
@ -562,8 +562,8 @@ device_get_modifiers (GdkDevice *device)
|
||||
|
||||
static void
|
||||
gdk_wayland_device_query_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkWindow **child_window,
|
||||
GdkSurface *window,
|
||||
GdkSurface **child_window,
|
||||
gdouble *root_x,
|
||||
gdouble *root_y,
|
||||
gdouble *win_x,
|
||||
@ -590,8 +590,8 @@ gdk_wayland_device_query_state (GdkDevice *device,
|
||||
}
|
||||
|
||||
static void
|
||||
emulate_crossing (GdkWindow *window,
|
||||
GdkWindow *subwindow,
|
||||
emulate_crossing (GdkSurface *window,
|
||||
GdkSurface *subwindow,
|
||||
GdkDevice *device,
|
||||
GdkEventType type,
|
||||
GdkCrossingMode mode,
|
||||
@ -608,18 +608,18 @@ emulate_crossing (GdkWindow *window,
|
||||
gdk_event_set_device (event, device);
|
||||
gdk_event_set_source_device (event, device);
|
||||
|
||||
gdk_window_get_device_position_double (window, device,
|
||||
gdk_surface_get_device_position_double (window, device,
|
||||
&event->crossing.x, &event->crossing.y,
|
||||
&event->crossing.state);
|
||||
event->crossing.x_root = event->crossing.x;
|
||||
event->crossing.y_root = event->crossing.y;
|
||||
|
||||
_gdk_wayland_display_deliver_event (gdk_window_get_display (window), event);
|
||||
_gdk_wayland_display_deliver_event (gdk_surface_get_display (window), event);
|
||||
}
|
||||
|
||||
static void
|
||||
emulate_touch_crossing (GdkWindow *window,
|
||||
GdkWindow *subwindow,
|
||||
emulate_touch_crossing (GdkSurface *window,
|
||||
GdkSurface *subwindow,
|
||||
GdkDevice *device,
|
||||
GdkDevice *source,
|
||||
GdkWaylandTouchData *touch,
|
||||
@ -643,11 +643,11 @@ emulate_touch_crossing (GdkWindow *window,
|
||||
event->crossing.x_root = event->crossing.x;
|
||||
event->crossing.y_root = event->crossing.y;
|
||||
|
||||
_gdk_wayland_display_deliver_event (gdk_window_get_display (window), event);
|
||||
_gdk_wayland_display_deliver_event (gdk_surface_get_display (window), event);
|
||||
}
|
||||
|
||||
static void
|
||||
emulate_focus (GdkWindow *window,
|
||||
emulate_focus (GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
gboolean focus_in,
|
||||
guint32 time_)
|
||||
@ -660,13 +660,13 @@ emulate_focus (GdkWindow *window,
|
||||
gdk_event_set_device (event, device);
|
||||
gdk_event_set_source_device (event, device);
|
||||
|
||||
_gdk_wayland_display_deliver_event (gdk_window_get_display (window), event);
|
||||
_gdk_wayland_display_deliver_event (gdk_surface_get_display (window), event);
|
||||
}
|
||||
|
||||
static void
|
||||
device_emit_grab_crossing (GdkDevice *device,
|
||||
GdkWindow *from,
|
||||
GdkWindow *to,
|
||||
GdkSurface *from,
|
||||
GdkSurface *to,
|
||||
GdkCrossingMode mode,
|
||||
guint32 time_)
|
||||
{
|
||||
@ -686,7 +686,7 @@ device_emit_grab_crossing (GdkDevice *device,
|
||||
}
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
static GdkSurface *
|
||||
gdk_wayland_device_get_focus (GdkDevice *device)
|
||||
{
|
||||
GdkWaylandSeat *wayland_seat = GDK_WAYLAND_SEAT (gdk_device_get_seat (device));
|
||||
@ -707,19 +707,19 @@ gdk_wayland_device_get_focus (GdkDevice *device)
|
||||
|
||||
static GdkGrabStatus
|
||||
gdk_wayland_device_grab (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gboolean owner_events,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindow *confine_to,
|
||||
GdkSurface *confine_to,
|
||||
GdkCursor *cursor,
|
||||
guint32 time_)
|
||||
{
|
||||
GdkWaylandSeat *wayland_seat = GDK_WAYLAND_SEAT (gdk_device_get_seat (device));
|
||||
GdkWindow *prev_focus = gdk_wayland_device_get_focus (device);
|
||||
GdkSurface *prev_focus = gdk_wayland_device_get_focus (device);
|
||||
GdkWaylandPointerData *pointer = GDK_WAYLAND_DEVICE (device)->pointer;
|
||||
|
||||
if (gdk_window_get_window_type (window) == GDK_WINDOW_TEMP &&
|
||||
gdk_window_is_visible (window))
|
||||
if (gdk_surface_get_window_type (window) == GDK_SURFACE_TEMP &&
|
||||
gdk_surface_is_visible (window))
|
||||
{
|
||||
g_warning ("Window %p is already mapped at the time of grabbing. "
|
||||
"gdk_seat_grab() should be used to simultanously grab input "
|
||||
@ -733,7 +733,7 @@ gdk_wayland_device_grab (GdkDevice *device,
|
||||
if (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
|
||||
{
|
||||
/* Device is a keyboard */
|
||||
gdk_wayland_window_inhibit_shortcuts (window,
|
||||
gdk_wayland_surface_inhibit_shortcuts (window,
|
||||
gdk_device_get_seat (device));
|
||||
return GDK_GRAB_SUCCESS;
|
||||
}
|
||||
@ -751,7 +751,7 @@ gdk_wayland_device_grab (GdkDevice *device,
|
||||
|
||||
pointer->grab_window = window;
|
||||
pointer->grab_time = time_;
|
||||
_gdk_wayland_window_set_grab_seat (window, GDK_SEAT (wayland_seat));
|
||||
_gdk_wayland_surface_set_grab_seat (window, GDK_SEAT (wayland_seat));
|
||||
|
||||
g_clear_object (&wayland_seat->cursor);
|
||||
|
||||
@ -771,7 +771,7 @@ gdk_wayland_device_ungrab (GdkDevice *device,
|
||||
GdkWaylandPointerData *pointer = GDK_WAYLAND_DEVICE (device)->pointer;
|
||||
GdkDisplay *display;
|
||||
GdkDeviceGrabInfo *grab;
|
||||
GdkWindow *focus, *prev_focus = NULL;
|
||||
GdkSurface *focus, *prev_focus = NULL;
|
||||
|
||||
display = gdk_device_get_display (device);
|
||||
|
||||
@ -792,7 +792,7 @@ gdk_wayland_device_ungrab (GdkDevice *device,
|
||||
{
|
||||
/* Device is a keyboard */
|
||||
if (prev_focus)
|
||||
gdk_wayland_window_restore_shortcuts (prev_focus,
|
||||
gdk_wayland_surface_restore_shortcuts (prev_focus,
|
||||
gdk_device_get_seat (device));
|
||||
}
|
||||
else
|
||||
@ -801,12 +801,12 @@ gdk_wayland_device_ungrab (GdkDevice *device,
|
||||
gdk_wayland_device_update_window_cursor (device);
|
||||
|
||||
if (pointer->grab_window)
|
||||
_gdk_wayland_window_set_grab_seat (pointer->grab_window,
|
||||
_gdk_wayland_surface_set_grab_seat (pointer->grab_window,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
static GdkSurface *
|
||||
gdk_wayland_device_window_at_position (GdkDevice *device,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
@ -832,7 +832,7 @@ gdk_wayland_device_window_at_position (GdkDevice *device,
|
||||
|
||||
static void
|
||||
gdk_wayland_device_select_window_events (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkEventMask event_mask)
|
||||
{
|
||||
}
|
||||
@ -1077,11 +1077,11 @@ data_device_enter (void *data,
|
||||
struct wl_data_offer *offer)
|
||||
{
|
||||
GdkWaylandSeat *seat = data;
|
||||
GdkWindow *dest_window, *dnd_owner;
|
||||
GdkSurface *dest_window, *dnd_owner;
|
||||
|
||||
dest_window = wl_surface_get_user_data (surface);
|
||||
|
||||
if (!GDK_IS_WINDOW (dest_window))
|
||||
if (!GDK_IS_SURFACE (dest_window))
|
||||
return;
|
||||
|
||||
GDK_DISPLAY_NOTE (seat->display, EVENTS,
|
||||
@ -1357,7 +1357,7 @@ pointer_handle_enter (void *data,
|
||||
if (!surface)
|
||||
return;
|
||||
|
||||
if (!GDK_IS_WINDOW (wl_surface_get_user_data (surface)))
|
||||
if (!GDK_IS_SURFACE (wl_surface_get_user_data (surface)))
|
||||
return;
|
||||
|
||||
_gdk_wayland_display_update_serial (display_wayland, serial);
|
||||
@ -1411,7 +1411,7 @@ pointer_handle_leave (void *data,
|
||||
if (!surface)
|
||||
return;
|
||||
|
||||
if (!GDK_IS_WINDOW (wl_surface_get_user_data (surface)))
|
||||
if (!GDK_IS_SURFACE (wl_surface_get_user_data (surface)))
|
||||
return;
|
||||
|
||||
if (!seat->pointer_info.focus)
|
||||
@ -1771,7 +1771,7 @@ keyboard_handle_enter (void *data,
|
||||
if (!surface)
|
||||
return;
|
||||
|
||||
if (!GDK_IS_WINDOW (wl_surface_get_user_data (surface)))
|
||||
if (!GDK_IS_SURFACE (wl_surface_get_user_data (surface)))
|
||||
return;
|
||||
|
||||
_gdk_wayland_display_update_serial (display, serial);
|
||||
@ -1809,7 +1809,7 @@ keyboard_handle_leave (void *data,
|
||||
if (!seat->keyboard_focus)
|
||||
return;
|
||||
|
||||
/* gdk_window_is_destroyed() might already return TRUE for
|
||||
/* gdk_surface_is_destroyed() might already return TRUE for
|
||||
* seat->keyboard_focus here, which would happen if we destroyed the
|
||||
* window before loosing keyboard focus.
|
||||
*/
|
||||
@ -2227,7 +2227,7 @@ _create_touch_event (GdkWaylandSeat *seat,
|
||||
event->touch.emulating_pointer = TRUE;
|
||||
}
|
||||
|
||||
gdk_window_get_root_coords (touch->window,
|
||||
gdk_surface_get_root_coords (touch->window,
|
||||
touch->x, touch->y,
|
||||
&x_root, &y_root);
|
||||
|
||||
@ -3370,12 +3370,12 @@ tablet_tool_handle_proximity_in (void *data,
|
||||
GdkWaylandTabletData *tablet = zwp_tablet_v2_get_user_data (wp_tablet);
|
||||
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (tablet->seat);
|
||||
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (seat->display);
|
||||
GdkWindow *window = wl_surface_get_user_data (surface);
|
||||
GdkSurface *window = wl_surface_get_user_data (surface);
|
||||
GdkEvent *event;
|
||||
|
||||
if (!surface)
|
||||
return;
|
||||
if (!GDK_IS_WINDOW (window))
|
||||
if (!GDK_IS_SURFACE (window))
|
||||
return;
|
||||
|
||||
tool->current_tablet = tablet;
|
||||
@ -4386,10 +4386,10 @@ static const struct wl_surface_listener pointer_surface_listener = {
|
||||
pointer_surface_leave
|
||||
};
|
||||
|
||||
static GdkWindow *
|
||||
static GdkSurface *
|
||||
create_foreign_dnd_window (GdkDisplay *display)
|
||||
{
|
||||
return gdk_window_new_popup (display, &(GdkRectangle) { 0, 0, 1, 1 });
|
||||
return gdk_surface_new_popup (display, &(GdkRectangle) { 0, 0, 1, 1 });
|
||||
}
|
||||
|
||||
static void
|
||||
@ -4425,7 +4425,7 @@ gdk_wayland_seat_finalize (GObject *object)
|
||||
g_clear_object (&seat->clipboard);
|
||||
g_clear_object (&seat->primary_clipboard);
|
||||
g_hash_table_destroy (seat->touches);
|
||||
gdk_window_destroy (seat->foreign_dnd_window);
|
||||
gdk_surface_destroy (seat->foreign_dnd_window);
|
||||
zwp_tablet_seat_v2_destroy (seat->wp_tablet_seat);
|
||||
stop_key_repeat (seat);
|
||||
|
||||
@ -4450,11 +4450,11 @@ gdk_wayland_seat_get_capabilities (GdkSeat *seat)
|
||||
|
||||
static void
|
||||
gdk_wayland_seat_set_grab_window (GdkWaylandSeat *seat,
|
||||
GdkWindow *window)
|
||||
GdkSurface *window)
|
||||
{
|
||||
if (seat->grab_window)
|
||||
{
|
||||
_gdk_wayland_window_set_grab_seat (seat->grab_window, NULL);
|
||||
_gdk_wayland_surface_set_grab_seat (seat->grab_window, NULL);
|
||||
g_object_remove_weak_pointer (G_OBJECT (seat->grab_window),
|
||||
(gpointer *) &seat->grab_window);
|
||||
seat->grab_window = NULL;
|
||||
@ -4465,13 +4465,13 @@ gdk_wayland_seat_set_grab_window (GdkWaylandSeat *seat,
|
||||
seat->grab_window = window;
|
||||
g_object_add_weak_pointer (G_OBJECT (window),
|
||||
(gpointer *) &seat->grab_window);
|
||||
_gdk_wayland_window_set_grab_seat (window, GDK_SEAT (seat));
|
||||
_gdk_wayland_surface_set_grab_seat (window, GDK_SEAT (seat));
|
||||
}
|
||||
}
|
||||
|
||||
static GdkGrabStatus
|
||||
gdk_wayland_seat_grab (GdkSeat *seat,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkSeatCapabilities capabilities,
|
||||
gboolean owner_events,
|
||||
GdkCursor *cursor,
|
||||
@ -4482,12 +4482,12 @@ gdk_wayland_seat_grab (GdkSeat *seat,
|
||||
GdkWaylandSeat *wayland_seat = GDK_WAYLAND_SEAT (seat);
|
||||
guint32 evtime = event ? gdk_event_get_time (event) : GDK_CURRENT_TIME;
|
||||
GdkDisplay *display = gdk_seat_get_display (seat);
|
||||
GdkWindow *native;
|
||||
GdkSurface *native;
|
||||
GList *l;
|
||||
|
||||
native = gdk_window_get_toplevel (window);
|
||||
native = gdk_surface_get_toplevel (window);
|
||||
|
||||
if (native == NULL || GDK_WINDOW_DESTROYED (native))
|
||||
if (native == NULL || GDK_SURFACE_DESTROYED (native))
|
||||
return GDK_GRAB_NOT_VIEWABLE;
|
||||
|
||||
gdk_wayland_seat_set_grab_window (wayland_seat, native);
|
||||
@ -4496,7 +4496,7 @@ gdk_wayland_seat_grab (GdkSeat *seat,
|
||||
if (prepare_func)
|
||||
(prepare_func) (seat, window, prepare_func_data);
|
||||
|
||||
if (!gdk_window_is_visible (window))
|
||||
if (!gdk_surface_is_visible (window))
|
||||
{
|
||||
gdk_wayland_seat_set_grab_window (wayland_seat, NULL);
|
||||
g_critical ("Window %p has not been made visible in GdkSeatGrabPrepareFunc",
|
||||
@ -4507,7 +4507,7 @@ gdk_wayland_seat_grab (GdkSeat *seat,
|
||||
if (wayland_seat->master_pointer &&
|
||||
capabilities & GDK_SEAT_CAPABILITY_POINTER)
|
||||
{
|
||||
GdkWindow *prev_focus = gdk_wayland_device_get_focus (wayland_seat->master_pointer);
|
||||
GdkSurface *prev_focus = gdk_wayland_device_get_focus (wayland_seat->master_pointer);
|
||||
|
||||
if (prev_focus != native)
|
||||
device_emit_grab_crossing (wayland_seat->master_pointer, prev_focus,
|
||||
@ -4532,7 +4532,7 @@ gdk_wayland_seat_grab (GdkSeat *seat,
|
||||
if (wayland_seat->touch_master &&
|
||||
capabilities & GDK_SEAT_CAPABILITY_TOUCH)
|
||||
{
|
||||
GdkWindow *prev_focus = gdk_wayland_device_get_focus (wayland_seat->touch_master);
|
||||
GdkSurface *prev_focus = gdk_wayland_device_get_focus (wayland_seat->touch_master);
|
||||
|
||||
if (prev_focus != native)
|
||||
device_emit_grab_crossing (wayland_seat->touch_master, prev_focus,
|
||||
@ -4553,7 +4553,7 @@ gdk_wayland_seat_grab (GdkSeat *seat,
|
||||
if (wayland_seat->master_keyboard &&
|
||||
capabilities & GDK_SEAT_CAPABILITY_KEYBOARD)
|
||||
{
|
||||
GdkWindow *prev_focus = gdk_wayland_device_get_focus (wayland_seat->master_keyboard);
|
||||
GdkSurface *prev_focus = gdk_wayland_device_get_focus (wayland_seat->master_keyboard);
|
||||
|
||||
if (prev_focus != native)
|
||||
device_emit_grab_crossing (wayland_seat->master_keyboard, prev_focus,
|
||||
@ -4572,7 +4572,7 @@ gdk_wayland_seat_grab (GdkSeat *seat,
|
||||
|
||||
/* Inhibit shortcuts if the seat grab is for the keyboard only */
|
||||
if (capabilities == GDK_SEAT_CAPABILITY_KEYBOARD)
|
||||
gdk_wayland_window_inhibit_shortcuts (window, seat);
|
||||
gdk_wayland_surface_inhibit_shortcuts (window, seat);
|
||||
}
|
||||
|
||||
if (wayland_seat->tablets &&
|
||||
@ -4581,7 +4581,7 @@ gdk_wayland_seat_grab (GdkSeat *seat,
|
||||
for (l = wayland_seat->tablets; l; l = l->next)
|
||||
{
|
||||
GdkWaylandTabletData *tablet = l->data;
|
||||
GdkWindow *prev_focus = gdk_wayland_device_get_focus (tablet->master);
|
||||
GdkSurface *prev_focus = gdk_wayland_device_get_focus (tablet->master);
|
||||
|
||||
if (prev_focus != native)
|
||||
device_emit_grab_crossing (tablet->master, prev_focus,
|
||||
@ -4619,7 +4619,7 @@ gdk_wayland_seat_ungrab (GdkSeat *seat)
|
||||
|
||||
if (wayland_seat->master_pointer)
|
||||
{
|
||||
GdkWindow *focus, *prev_focus = NULL;
|
||||
GdkSurface *focus, *prev_focus = NULL;
|
||||
|
||||
grab = _gdk_display_get_last_device_grab (display, wayland_seat->master_pointer);
|
||||
|
||||
@ -4647,7 +4647,7 @@ gdk_wayland_seat_ungrab (GdkSeat *seat)
|
||||
{
|
||||
grab->serial_end = grab->serial_start;
|
||||
if (grab->window)
|
||||
gdk_wayland_window_restore_shortcuts (grab->window, seat);
|
||||
gdk_wayland_surface_restore_shortcuts (grab->window, seat);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -636,7 +636,7 @@ _gdk_wayland_display_open (const gchar *display_name)
|
||||
static void
|
||||
destroy_toplevel (gpointer data)
|
||||
{
|
||||
_gdk_window_destroy (GDK_WINDOW (data), FALSE);
|
||||
_gdk_surface_destroy (GDK_SURFACE (data), FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -714,7 +714,7 @@ gdk_wayland_display_get_name (GdkDisplay *display)
|
||||
|
||||
void
|
||||
gdk_wayland_display_system_bell (GdkDisplay *display,
|
||||
GdkWindow *window)
|
||||
GdkSurface *window)
|
||||
{
|
||||
GdkWaylandDisplay *display_wayland;
|
||||
struct gtk_surface1 *gtk_surface;
|
||||
@ -728,7 +728,7 @@ gdk_wayland_display_system_bell (GdkDisplay *display,
|
||||
return;
|
||||
|
||||
if (window)
|
||||
gtk_surface = gdk_wayland_window_get_gtk_surface (window);
|
||||
gtk_surface = gdk_wayland_surface_get_gtk_surface (window);
|
||||
else
|
||||
gtk_surface = NULL;
|
||||
|
||||
@ -798,7 +798,7 @@ gdk_wayland_display_has_pending (GdkDisplay *display)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
static GdkSurface *
|
||||
gdk_wayland_display_get_default_group (GdkDisplay *display)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
||||
@ -917,15 +917,15 @@ gdk_wayland_display_get_monitor (GdkDisplay *display,
|
||||
|
||||
static GdkMonitor *
|
||||
gdk_wayland_display_get_monitor_at_window (GdkDisplay *display,
|
||||
GdkWindow *window)
|
||||
GdkSurface *window)
|
||||
{
|
||||
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
|
||||
struct wl_output *output;
|
||||
int i;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_WAYLAND_WINDOW (window), NULL);
|
||||
g_return_val_if_fail (GDK_IS_WAYLAND_SURFACE (window), NULL);
|
||||
|
||||
output = gdk_wayland_window_get_wl_output (window);
|
||||
output = gdk_wayland_surface_get_wl_output (window);
|
||||
if (output == NULL)
|
||||
return NULL;
|
||||
|
||||
@ -953,7 +953,7 @@ gdk_wayland_display_class_init (GdkWaylandDisplayClass *class)
|
||||
object_class->dispose = gdk_wayland_display_dispose;
|
||||
object_class->finalize = gdk_wayland_display_finalize;
|
||||
|
||||
display_class->window_type = gdk_wayland_window_get_type ();
|
||||
display_class->window_type = gdk_wayland_surface_get_type ();
|
||||
|
||||
#ifdef GDK_RENDERING_VULKAN
|
||||
display_class->vk_context_type = GDK_TYPE_WAYLAND_VULKAN_CONTEXT;
|
||||
@ -1848,7 +1848,7 @@ static void
|
||||
update_scale (GdkDisplay *display)
|
||||
{
|
||||
g_list_foreach (gdk_wayland_display_get_toplevel_windows (display),
|
||||
(GFunc)gdk_wayland_window_update_scale,
|
||||
(GFunc)gdk_wayland_surface_update_scale,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ typedef struct _GdkWaylandDragContextClass GdkWaylandDragContextClass;
|
||||
struct _GdkWaylandDragContext
|
||||
{
|
||||
GdkDragContext context;
|
||||
GdkWindow *dnd_window;
|
||||
GdkSurface *dnd_window;
|
||||
struct wl_surface *dnd_surface;
|
||||
struct wl_data_source *data_source;
|
||||
GdkDragAction selected_action;
|
||||
@ -74,7 +74,7 @@ gdk_wayland_drag_context_finalize (GObject *object)
|
||||
{
|
||||
GdkWaylandDragContext *wayland_context = GDK_WAYLAND_DRAG_CONTEXT (object);
|
||||
GdkDragContext *context = GDK_DRAG_CONTEXT (object);
|
||||
GdkWindow *dnd_window;
|
||||
GdkSurface *dnd_window;
|
||||
|
||||
contexts = g_list_remove (contexts, context);
|
||||
|
||||
@ -91,7 +91,7 @@ gdk_wayland_drag_context_finalize (GObject *object)
|
||||
G_OBJECT_CLASS (gdk_wayland_drag_context_parent_class)->finalize (object);
|
||||
|
||||
if (dnd_window)
|
||||
gdk_window_destroy (dnd_window);
|
||||
gdk_surface_destroy (dnd_window);
|
||||
}
|
||||
|
||||
void
|
||||
@ -99,7 +99,7 @@ _gdk_wayland_drag_context_emit_event (GdkDragContext *context,
|
||||
GdkEventType type,
|
||||
guint32 time_)
|
||||
{
|
||||
GdkWindow *window;
|
||||
GdkSurface *window;
|
||||
GdkEvent *event;
|
||||
|
||||
switch ((guint) type)
|
||||
@ -126,7 +126,7 @@ _gdk_wayland_drag_context_emit_event (GdkDragContext *context,
|
||||
event->dnd.y_root = GDK_WAYLAND_DRAG_CONTEXT (context)->y;
|
||||
gdk_event_set_device (event, gdk_drag_context_get_device (context));
|
||||
|
||||
gdk_display_put_event (gdk_window_get_display (window), event);
|
||||
gdk_display_put_event (gdk_surface_get_display (window), event);
|
||||
g_object_unref (event);
|
||||
}
|
||||
|
||||
@ -360,7 +360,7 @@ gdk_wayland_drag_context_init (GdkWaylandDragContext *context_wayland)
|
||||
context->actions = GDK_ACTION_COPY | GDK_ACTION_MOVE;
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
static GdkSurface *
|
||||
gdk_wayland_drag_context_get_drag_window (GdkDragContext *context)
|
||||
{
|
||||
return GDK_WAYLAND_DRAG_CONTEXT (context)->dnd_window;
|
||||
@ -382,9 +382,9 @@ gdk_wayland_drag_context_set_hotspot (GdkDragContext *context,
|
||||
if (prev_hot_x == hot_x && prev_hot_y == hot_y)
|
||||
return;
|
||||
|
||||
_gdk_wayland_window_offset_next_wl_buffer (context_wayland->dnd_window,
|
||||
_gdk_wayland_surface_offset_next_wl_buffer (context_wayland->dnd_window,
|
||||
-hot_x, -hot_y);
|
||||
gdk_window_invalidate_rect (context_wayland->dnd_window, &damage_rect, FALSE);
|
||||
gdk_surface_invalidate_rect (context_wayland->dnd_window, &damage_rect, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -429,7 +429,7 @@ gdk_wayland_drag_context_drop_done (GdkDragContext *context,
|
||||
if (success)
|
||||
{
|
||||
if (context_wayland->dnd_window)
|
||||
gdk_window_hide (context_wayland->dnd_window);
|
||||
gdk_surface_hide (context_wayland->dnd_window);
|
||||
}
|
||||
}
|
||||
|
||||
@ -461,24 +461,24 @@ gdk_wayland_drag_context_class_init (GdkWaylandDragContextClass *klass)
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_wayland_window_register_dnd (GdkWindow *window)
|
||||
_gdk_wayland_surface_register_dnd (GdkSurface *window)
|
||||
{
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
static GdkSurface *
|
||||
create_dnd_window (GdkDisplay *display)
|
||||
{
|
||||
GdkWindow *window;
|
||||
GdkSurface *window;
|
||||
|
||||
window = gdk_window_new_popup (display, &(GdkRectangle) { 0, 0, 100, 100 });
|
||||
window = gdk_surface_new_popup (display, &(GdkRectangle) { 0, 0, 100, 100 });
|
||||
|
||||
gdk_window_set_type_hint (window, GDK_WINDOW_TYPE_HINT_DND);
|
||||
gdk_surface_set_type_hint (window, GDK_SURFACE_TYPE_HINT_DND);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
GdkDragContext *
|
||||
_gdk_wayland_window_drag_begin (GdkWindow *window,
|
||||
_gdk_wayland_surface_drag_begin (GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
GdkContentProvider *content,
|
||||
GdkDragAction actions,
|
||||
@ -503,8 +503,8 @@ _gdk_wayland_window_drag_begin (GdkWindow *window,
|
||||
|
||||
gdk_drag_context_set_device (context, device);
|
||||
|
||||
context_wayland->dnd_window = create_dnd_window (gdk_window_get_display (window));
|
||||
context_wayland->dnd_surface = gdk_wayland_window_get_wl_surface (context_wayland->dnd_window);
|
||||
context_wayland->dnd_window = create_dnd_window (gdk_surface_get_display (window));
|
||||
context_wayland->dnd_surface = gdk_wayland_surface_get_wl_surface (context_wayland->dnd_window);
|
||||
context_wayland->data_source =
|
||||
gdk_wayland_selection_get_data_source (window);
|
||||
|
||||
@ -523,7 +523,7 @@ _gdk_wayland_window_drag_begin (GdkWindow *window,
|
||||
|
||||
wl_data_device_start_drag (gdk_wayland_device_get_data_device (device),
|
||||
context_wayland->data_source,
|
||||
gdk_wayland_window_get_wl_surface (window),
|
||||
gdk_wayland_surface_get_wl_surface (window),
|
||||
context_wayland->dnd_surface,
|
||||
_gdk_wayland_display_get_serial (display_wayland));
|
||||
|
||||
@ -580,7 +580,7 @@ _gdk_wayland_drag_context_set_coords (GdkDragContext *context,
|
||||
|
||||
void
|
||||
_gdk_wayland_drag_context_set_source_window (GdkDragContext *context,
|
||||
GdkWindow *window)
|
||||
GdkSurface *window)
|
||||
{
|
||||
if (context->source_window)
|
||||
g_object_unref (context->source_window);
|
||||
@ -590,7 +590,7 @@ _gdk_wayland_drag_context_set_source_window (GdkDragContext *context,
|
||||
|
||||
void
|
||||
_gdk_wayland_drag_context_set_dest_window (GdkDragContext *context,
|
||||
GdkWindow *dest_window,
|
||||
GdkSurface *dest_window,
|
||||
uint32_t serial)
|
||||
{
|
||||
if (context->dest_window)
|
||||
@ -618,7 +618,7 @@ gdk_wayland_drag_context_lookup_by_data_source (struct wl_data_source *source)
|
||||
}
|
||||
|
||||
GdkDragContext *
|
||||
gdk_wayland_drag_context_lookup_by_source_window (GdkWindow *window)
|
||||
gdk_wayland_drag_context_lookup_by_source_window (GdkSurface *window)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
|
@ -163,7 +163,7 @@ gdk_wayland_gl_context_get_damage (GdkGLContext *context)
|
||||
GdkDisplay *display = gdk_draw_context_get_display (GDK_DRAW_CONTEXT (context));
|
||||
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
|
||||
EGLSurface egl_surface;
|
||||
GdkWindow *window = gdk_draw_context_get_window (GDK_DRAW_CONTEXT (context));
|
||||
GdkSurface *window = gdk_draw_context_get_window (GDK_DRAW_CONTEXT (context));
|
||||
int buffer_age = 0;
|
||||
|
||||
if (display_wayland->have_egl_buffer_age)
|
||||
@ -176,7 +176,7 @@ gdk_wayland_gl_context_get_damage (GdkGLContext *context)
|
||||
shared = context;
|
||||
shared_wayland = GDK_WAYLAND_GL_CONTEXT (shared);
|
||||
|
||||
egl_surface = gdk_wayland_window_get_egl_surface (window->impl_window,
|
||||
egl_surface = gdk_wayland_surface_get_egl_surface (window->impl_window,
|
||||
shared_wayland->egl_config);
|
||||
gdk_gl_context_make_current (shared);
|
||||
eglQuerySurface (display_wayland->egl_display, egl_surface,
|
||||
@ -208,8 +208,8 @@ gdk_wayland_gl_context_end_frame (GdkDrawContext *draw_context,
|
||||
cairo_region_t *damage)
|
||||
{
|
||||
GdkGLContext *context = GDK_GL_CONTEXT (draw_context);
|
||||
GdkWindow *window = gdk_gl_context_get_window (context);
|
||||
GdkDisplay *display = gdk_window_get_display (window);
|
||||
GdkSurface *window = gdk_gl_context_get_window (context);
|
||||
GdkDisplay *display = gdk_surface_get_display (window);
|
||||
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
|
||||
GdkWaylandGLContext *context_wayland = GDK_WAYLAND_GL_CONTEXT (context);
|
||||
EGLSurface egl_surface;
|
||||
@ -220,7 +220,7 @@ gdk_wayland_gl_context_end_frame (GdkDrawContext *draw_context,
|
||||
|
||||
gdk_gl_context_make_current (context);
|
||||
|
||||
egl_surface = gdk_wayland_window_get_egl_surface (window->impl_window,
|
||||
egl_surface = gdk_wayland_surface_get_egl_surface (window->impl_window,
|
||||
context_wayland->egl_config);
|
||||
|
||||
if (display_wayland->have_egl_swap_buffers_with_damage && damage != NULL)
|
||||
@ -228,7 +228,7 @@ gdk_wayland_gl_context_end_frame (GdkDrawContext *draw_context,
|
||||
int i, j, n_rects = cairo_region_num_rectangles (damage);
|
||||
EGLint *rects = g_new (EGLint, n_rects * 4);
|
||||
cairo_rectangle_int_t rect;
|
||||
int window_height = gdk_window_get_height (window);
|
||||
int window_height = gdk_surface_get_height (window);
|
||||
|
||||
for (i = 0, j = 0; i < n_rects; i++)
|
||||
{
|
||||
@ -244,7 +244,7 @@ gdk_wayland_gl_context_end_frame (GdkDrawContext *draw_context,
|
||||
else
|
||||
eglSwapBuffers (display_wayland->egl_display, egl_surface);
|
||||
|
||||
gdk_wayland_window_sync (window);
|
||||
gdk_wayland_surface_sync (window);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -360,11 +360,11 @@ gdk_wayland_display_init_gl (GdkDisplay *display)
|
||||
#define MAX_EGL_ATTRS 30
|
||||
|
||||
static gboolean
|
||||
find_eglconfig_for_window (GdkWindow *window,
|
||||
find_eglconfig_for_window (GdkSurface *window,
|
||||
EGLConfig *egl_config_out,
|
||||
GError **error)
|
||||
{
|
||||
GdkDisplay *display = gdk_window_get_display (window);
|
||||
GdkDisplay *display = gdk_surface_get_display (window);
|
||||
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
|
||||
EGLint attrs[MAX_EGL_ATTRS];
|
||||
EGLint count;
|
||||
@ -418,12 +418,12 @@ find_eglconfig_for_window (GdkWindow *window,
|
||||
}
|
||||
|
||||
GdkGLContext *
|
||||
gdk_wayland_window_create_gl_context (GdkWindow *window,
|
||||
gdk_wayland_surface_create_gl_context (GdkSurface *window,
|
||||
gboolean attached,
|
||||
GdkGLContext *share,
|
||||
GError **error)
|
||||
{
|
||||
GdkDisplay *display = gdk_window_get_display (window);
|
||||
GdkDisplay *display = gdk_surface_get_display (window);
|
||||
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
|
||||
GdkWaylandGLContext *context;
|
||||
EGLConfig config;
|
||||
@ -466,8 +466,8 @@ gdk_wayland_gl_context_dispose (GObject *gobject)
|
||||
if (context_wayland->egl_context != NULL)
|
||||
{
|
||||
GdkGLContext *context = GDK_GL_CONTEXT (gobject);
|
||||
GdkWindow *window = gdk_gl_context_get_window (context);
|
||||
GdkDisplay *display = gdk_window_get_display (window);
|
||||
GdkSurface *window = gdk_gl_context_get_window (context);
|
||||
GdkDisplay *display = gdk_surface_get_display (window);
|
||||
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
|
||||
|
||||
if (eglGetCurrentContext () == context_wayland->egl_context)
|
||||
@ -490,7 +490,7 @@ gdk_wayland_display_make_gl_context_current (GdkDisplay *display,
|
||||
{
|
||||
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
|
||||
GdkWaylandGLContext *context_wayland;
|
||||
GdkWindow *window;
|
||||
GdkSurface *window;
|
||||
EGLSurface egl_surface;
|
||||
|
||||
if (context == NULL)
|
||||
@ -504,13 +504,13 @@ gdk_wayland_display_make_gl_context_current (GdkDisplay *display,
|
||||
window = gdk_gl_context_get_window (context);
|
||||
|
||||
if (context_wayland->is_attached || gdk_draw_context_is_drawing (GDK_DRAW_CONTEXT (context)))
|
||||
egl_surface = gdk_wayland_window_get_egl_surface (window->impl_window, context_wayland->egl_config);
|
||||
egl_surface = gdk_wayland_surface_get_egl_surface (window->impl_window, context_wayland->egl_config);
|
||||
else
|
||||
{
|
||||
if (display_wayland->have_egl_surfaceless_context)
|
||||
egl_surface = EGL_NO_SURFACE;
|
||||
else
|
||||
egl_surface = gdk_wayland_window_get_dummy_egl_surface (window->impl_window,
|
||||
egl_surface = gdk_wayland_surface_get_dummy_egl_surface (window->impl_window,
|
||||
context_wayland->egl_config);
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ struct _GdkWaylandGLContextClass
|
||||
};
|
||||
|
||||
gboolean gdk_wayland_display_init_gl (GdkDisplay *display);
|
||||
GdkGLContext * gdk_wayland_window_create_gl_context (GdkWindow *window,
|
||||
GdkGLContext * gdk_wayland_surface_create_gl_context (GdkSurface *window,
|
||||
gboolean attach,
|
||||
GdkGLContext *share,
|
||||
GError **error);
|
||||
|
@ -43,7 +43,7 @@
|
||||
#define WL_SURFACE_HAS_BUFFER_SCALE 3
|
||||
#define WL_POINTER_HAS_FRAME 5
|
||||
|
||||
#define GDK_WINDOW_IS_WAYLAND(win) (GDK_IS_WINDOW_IMPL_WAYLAND (((GdkWindow *)win)->impl))
|
||||
#define GDK_SURFACE_IS_WAYLAND(win) (GDK_IS_SURFACE_IMPL_WAYLAND (((GdkSurface *)win)->impl))
|
||||
|
||||
GdkKeymap *_gdk_wayland_keymap_new (GdkDisplay *display);
|
||||
void _gdk_wayland_keymap_update_from_fd (GdkKeymap *keymap,
|
||||
@ -71,7 +71,7 @@ gboolean _gdk_wayland_display_supports_cursor_alpha (GdkDisplay *display);
|
||||
gboolean _gdk_wayland_display_supports_cursor_color (GdkDisplay *display);
|
||||
|
||||
void gdk_wayland_display_system_bell (GdkDisplay *display,
|
||||
GdkWindow *window);
|
||||
GdkSurface *window);
|
||||
|
||||
struct wl_buffer *_gdk_wayland_cursor_get_buffer (GdkWaylandDisplay *display,
|
||||
GdkCursor *cursor,
|
||||
@ -88,24 +88,24 @@ guint _gdk_wayland_cursor_get_next_image_index (GdkWaylandDisplay *display,
|
||||
guint current_image_index,
|
||||
guint *next_image_delay);
|
||||
|
||||
void gdk_wayland_window_sync (GdkWindow *window);
|
||||
void gdk_wayland_surface_sync (GdkSurface *window);
|
||||
|
||||
void _gdk_wayland_window_register_dnd (GdkWindow *window);
|
||||
GdkDragContext *_gdk_wayland_window_drag_begin (GdkWindow *window,
|
||||
void _gdk_wayland_surface_register_dnd (GdkSurface *window);
|
||||
GdkDragContext *_gdk_wayland_surface_drag_begin (GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
GdkContentProvider *content,
|
||||
GdkDragAction actions,
|
||||
gint dx,
|
||||
gint dy);
|
||||
void _gdk_wayland_window_offset_next_wl_buffer (GdkWindow *window,
|
||||
void _gdk_wayland_surface_offset_next_wl_buffer (GdkSurface *window,
|
||||
int x,
|
||||
int y);
|
||||
GdkDragContext * _gdk_wayland_drop_context_new (GdkDisplay *display,
|
||||
struct wl_data_device *data_device);
|
||||
void _gdk_wayland_drag_context_set_source_window (GdkDragContext *context,
|
||||
GdkWindow *window);
|
||||
GdkSurface *window);
|
||||
void _gdk_wayland_drag_context_set_dest_window (GdkDragContext *context,
|
||||
GdkWindow *dest_window,
|
||||
GdkSurface *dest_window,
|
||||
uint32_t serial);
|
||||
void _gdk_wayland_drag_context_emit_event (GdkDragContext *context,
|
||||
GdkEventType type,
|
||||
@ -118,16 +118,16 @@ void gdk_wayland_drag_context_set_action (GdkDragContext *context,
|
||||
GdkDragAction action);
|
||||
|
||||
GdkDragContext * gdk_wayland_drag_context_lookup_by_data_source (struct wl_data_source *source);
|
||||
GdkDragContext * gdk_wayland_drag_context_lookup_by_source_window (GdkWindow *window);
|
||||
GdkDragContext * gdk_wayland_drag_context_lookup_by_source_window (GdkSurface *window);
|
||||
struct wl_data_source * gdk_wayland_drag_context_get_data_source (GdkDragContext *context);
|
||||
|
||||
void gdk_wayland_drop_context_update_targets (GdkDragContext *context);
|
||||
|
||||
void _gdk_wayland_display_create_window_impl (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
GdkWindow *real_parent,
|
||||
GdkSurface *window,
|
||||
GdkSurface *real_parent,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindowAttr *attributes);
|
||||
GdkSurfaceAttr *attributes);
|
||||
|
||||
gint _gdk_wayland_display_text_property_to_utf8_list (GdkDisplay *display,
|
||||
GdkAtom encoding,
|
||||
@ -175,7 +175,7 @@ guint32 gdk_wayland_display_get_output_scale (GdkWaylandDisplay *display_wayland
|
||||
struct wl_output *gdk_wayland_display_get_wl_output (GdkDisplay *display,
|
||||
int monitor_num);
|
||||
|
||||
void _gdk_wayland_window_set_grab_seat (GdkWindow *window,
|
||||
void _gdk_wayland_surface_set_grab_seat (GdkSurface *window,
|
||||
GdkSeat *seat);
|
||||
|
||||
guint32 _gdk_wayland_display_get_serial (GdkWaylandDisplay *display_wayland);
|
||||
@ -205,29 +205,29 @@ void gdk_wayland_selection_set_offer (GdkDisplay *display,
|
||||
gpointer gdk_wayland_selection_get_offer (GdkDisplay *display);
|
||||
GdkContentFormats *gdk_wayland_selection_get_targets (GdkDisplay *display);
|
||||
|
||||
struct wl_data_source * gdk_wayland_selection_get_data_source (GdkWindow *owner);
|
||||
struct wl_data_source * gdk_wayland_selection_get_data_source (GdkSurface *owner);
|
||||
void gdk_wayland_selection_unset_data_source (GdkDisplay *display);
|
||||
gboolean gdk_wayland_selection_set_current_offer_actions (GdkDisplay *display,
|
||||
uint32_t actions);
|
||||
|
||||
EGLSurface gdk_wayland_window_get_egl_surface (GdkWindow *window,
|
||||
EGLSurface gdk_wayland_surface_get_egl_surface (GdkSurface *window,
|
||||
EGLConfig config);
|
||||
EGLSurface gdk_wayland_window_get_dummy_egl_surface (GdkWindow *window,
|
||||
EGLSurface gdk_wayland_surface_get_dummy_egl_surface (GdkSurface *window,
|
||||
EGLConfig config);
|
||||
|
||||
struct gtk_surface1 * gdk_wayland_window_get_gtk_surface (GdkWindow *window);
|
||||
struct gtk_surface1 * gdk_wayland_surface_get_gtk_surface (GdkSurface *window);
|
||||
|
||||
void gdk_wayland_seat_set_global_cursor (GdkSeat *seat,
|
||||
GdkCursor *cursor);
|
||||
|
||||
struct wl_output *gdk_wayland_window_get_wl_output (GdkWindow *window);
|
||||
struct wl_output *gdk_wayland_surface_get_wl_output (GdkSurface *window);
|
||||
|
||||
void gdk_wayland_window_inhibit_shortcuts (GdkWindow *window,
|
||||
void gdk_wayland_surface_inhibit_shortcuts (GdkSurface *window,
|
||||
GdkSeat *gdk_seat);
|
||||
void gdk_wayland_window_restore_shortcuts (GdkWindow *window,
|
||||
void gdk_wayland_surface_restore_shortcuts (GdkSurface *window,
|
||||
GdkSeat *gdk_seat);
|
||||
|
||||
void gdk_wayland_window_update_scale (GdkWindow *window);
|
||||
void gdk_wayland_surface_update_scale (GdkSurface *window);
|
||||
|
||||
|
||||
#endif /* __GDK_PRIVATE_WAYLAND_H__ */
|
||||
|
@ -427,9 +427,9 @@ static const struct wl_data_source_listener data_source_listener = {
|
||||
};
|
||||
|
||||
struct wl_data_source *
|
||||
gdk_wayland_selection_get_data_source (GdkWindow *owner)
|
||||
gdk_wayland_selection_get_data_source (GdkSurface *owner)
|
||||
{
|
||||
GdkDisplay *display = gdk_window_get_display (owner);
|
||||
GdkDisplay *display = gdk_surface_get_display (owner);
|
||||
GdkWaylandSelection *wayland_selection = gdk_wayland_display_get_selection (display);
|
||||
gpointer source = NULL;
|
||||
GdkWaylandDisplay *display_wayland;
|
||||
@ -437,7 +437,7 @@ gdk_wayland_selection_get_data_source (GdkWindow *owner)
|
||||
if (wayland_selection->dnd_source)
|
||||
return wayland_selection->dnd_source;
|
||||
|
||||
display_wayland = GDK_WAYLAND_DISPLAY (gdk_window_get_display (owner));
|
||||
display_wayland = GDK_WAYLAND_DISPLAY (gdk_surface_get_display (owner));
|
||||
|
||||
source = wl_data_device_manager_create_data_source (display_wayland->data_device_manager);
|
||||
wl_data_source_add_listener (source,
|
||||
|
@ -37,7 +37,7 @@ static VkResult
|
||||
gdk_wayland_vulkan_context_create_surface (GdkVulkanContext *context,
|
||||
VkSurfaceKHR *surface)
|
||||
{
|
||||
GdkWindow *window = gdk_draw_context_get_window (GDK_DRAW_CONTEXT (context));
|
||||
GdkSurface *window = gdk_draw_context_get_window (GDK_DRAW_CONTEXT (context));
|
||||
GdkDisplay *display = gdk_draw_context_get_display (GDK_DRAW_CONTEXT (context));
|
||||
|
||||
/* This is necessary so that Vulkan sees the Window.
|
||||
@ -53,7 +53,7 @@ gdk_wayland_vulkan_context_create_surface (GdkVulkanContext *context,
|
||||
NULL,
|
||||
0,
|
||||
gdk_wayland_display_get_wl_display (display),
|
||||
gdk_wayland_window_get_wl_surface (window)
|
||||
gdk_wayland_surface_get_wl_surface (window)
|
||||
},
|
||||
NULL,
|
||||
surface);
|
||||
@ -64,11 +64,11 @@ gdk_vulkan_context_wayland_end_frame (GdkDrawContext *context,
|
||||
cairo_region_t *painted,
|
||||
cairo_region_t *damage)
|
||||
{
|
||||
GdkWindow *window = gdk_draw_context_get_window (GDK_DRAW_CONTEXT (context));
|
||||
GdkSurface *window = gdk_draw_context_get_window (GDK_DRAW_CONTEXT (context));
|
||||
|
||||
GDK_DRAW_CONTEXT_CLASS (gdk_wayland_vulkan_context_parent_class)->end_frame (context, painted, damage);
|
||||
|
||||
gdk_wayland_window_sync (window);
|
||||
gdk_wayland_surface_sync (window);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -15,8 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_WAYLAND_WINDOW_H__
|
||||
#define __GDK_WAYLAND_WINDOW_H__
|
||||
#ifndef __GDK_WAYLAND_SURFACE_H__
|
||||
#define __GDK_WAYLAND_SURFACE_H__
|
||||
|
||||
#if !defined (__GDKWAYLAND_H_INSIDE__) && !defined (GDK_COMPILATION)
|
||||
#error "Only <gdk/gdkwayland.h> can be included directly."
|
||||
@ -29,33 +29,33 @@
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#ifdef GDK_COMPILATION
|
||||
typedef struct _GdkWaylandWindow GdkWaylandWindow;
|
||||
typedef struct _GdkWaylandSurface GdkWaylandSurface;
|
||||
#else
|
||||
typedef GdkWindow GdkWaylandWindow;
|
||||
typedef GdkSurface GdkWaylandSurface;
|
||||
#endif
|
||||
typedef struct _GdkWaylandWindowClass GdkWaylandWindowClass;
|
||||
typedef struct _GdkWaylandSurfaceClass GdkWaylandSurfaceClass;
|
||||
|
||||
#define GDK_TYPE_WAYLAND_WINDOW (gdk_wayland_window_get_type())
|
||||
#define GDK_WAYLAND_WINDOW(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WAYLAND_WINDOW, GdkWaylandWindow))
|
||||
#define GDK_WAYLAND_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WAYLAND_WINDOW, GdkWaylandWindowClass))
|
||||
#define GDK_IS_WAYLAND_WINDOW(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WAYLAND_WINDOW))
|
||||
#define GDK_IS_WAYLAND_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WAYLAND_WINDOW))
|
||||
#define GDK_WAYLAND_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WAYLAND_WINDOW, GdkWaylandWindowClass))
|
||||
#define GDK_TYPE_WAYLAND_SURFACE (gdk_wayland_surface_get_type())
|
||||
#define GDK_WAYLAND_SURFACE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WAYLAND_SURFACE, GdkWaylandSurface))
|
||||
#define GDK_WAYLAND_SURFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WAYLAND_SURFACE, GdkWaylandSurfaceClass))
|
||||
#define GDK_IS_WAYLAND_SURFACE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WAYLAND_SURFACE))
|
||||
#define GDK_IS_WAYLAND_SURFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WAYLAND_SURFACE))
|
||||
#define GDK_WAYLAND_SURFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WAYLAND_SURFACE, GdkWaylandSurfaceClass))
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gdk_wayland_window_get_type (void);
|
||||
GType gdk_wayland_surface_get_type (void);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWindow * gdk_wayland_window_new_subsurface (GdkDisplay *display,
|
||||
GdkSurface * gdk_wayland_surface_new_subsurface (GdkDisplay *display,
|
||||
const GdkRectangle *position);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
struct wl_surface *gdk_wayland_window_get_wl_surface (GdkWindow *window);
|
||||
struct wl_surface *gdk_wayland_surface_get_wl_surface (GdkSurface *window);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_wayland_window_set_use_custom_surface (GdkWindow *window);
|
||||
void gdk_wayland_surface_set_use_custom_surface (GdkSurface *window);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_wayland_window_set_dbus_properties_libgtk_only (GdkWindow *window,
|
||||
void gdk_wayland_surface_set_dbus_properties_libgtk_only (GdkSurface *window,
|
||||
const char *application_id,
|
||||
const char *app_menu_path,
|
||||
const char *menubar_path,
|
||||
@ -63,25 +63,25 @@ void gdk_wayland_window_set_dbus_properties_libgtk_only (Gdk
|
||||
const char *application_object_path,
|
||||
const char *unique_bus_name);
|
||||
|
||||
typedef void (*GdkWaylandWindowExported) (GdkWindow *window,
|
||||
typedef void (*GdkWaylandSurfaceExported) (GdkSurface *window,
|
||||
const char *handle,
|
||||
gpointer user_data);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_wayland_window_export_handle (GdkWindow *window,
|
||||
GdkWaylandWindowExported callback,
|
||||
gboolean gdk_wayland_surface_export_handle (GdkSurface *window,
|
||||
GdkWaylandSurfaceExported callback,
|
||||
gpointer user_data,
|
||||
GDestroyNotify destroy_func);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_wayland_window_unexport_handle (GdkWindow *window);
|
||||
void gdk_wayland_surface_unexport_handle (GdkSurface *window);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_wayland_window_set_transient_for_exported (GdkWindow *window,
|
||||
gboolean gdk_wayland_surface_set_transient_for_exported (GdkSurface *window,
|
||||
char *parent_handle_str);
|
||||
|
||||
void gdk_wayland_window_announce_csd (GdkWindow *window);
|
||||
void gdk_wayland_surface_announce_csd (GdkSurface *window);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_WAYLAND_WINDOW_H__ */
|
||||
#endif /* __GDK_WAYLAND_SURFACE_H__ */
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -65,7 +65,7 @@ _gdk_device_virtual_set_active (GdkDevice *device,
|
||||
|
||||
static gboolean
|
||||
gdk_device_virtual_get_history (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
guint32 start,
|
||||
guint32 stop,
|
||||
GdkTimeCoord ***events,
|
||||
@ -77,7 +77,7 @@ gdk_device_virtual_get_history (GdkDevice *device,
|
||||
|
||||
static void
|
||||
gdk_device_virtual_get_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gdouble *axes,
|
||||
GdkModifierType *mask)
|
||||
{
|
||||
@ -90,12 +90,12 @@ gdk_device_virtual_get_state (GdkDevice *device,
|
||||
|
||||
static void
|
||||
gdk_device_virtual_set_window_cursor (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkCursor *cursor)
|
||||
{
|
||||
if (cursor != NULL)
|
||||
{
|
||||
GdkDisplay *display = gdk_window_get_display (window);
|
||||
GdkDisplay *display = gdk_surface_get_display (window);
|
||||
HCURSOR hcursor = NULL;
|
||||
|
||||
if (display != NULL)
|
||||
@ -116,8 +116,8 @@ gdk_device_virtual_warp (GdkDevice *device,
|
||||
|
||||
static void
|
||||
gdk_device_virtual_query_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkWindow **child_window,
|
||||
GdkSurface *window,
|
||||
GdkSurface **child_window,
|
||||
gdouble *root_x,
|
||||
gdouble *root_y,
|
||||
gdouble *win_x,
|
||||
@ -135,14 +135,14 @@ gdk_device_virtual_query_state (GdkDevice *device,
|
||||
|
||||
static GdkGrabStatus
|
||||
gdk_device_virtual_grab (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gboolean owner_events,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindow *confine_to,
|
||||
GdkSurface *confine_to,
|
||||
GdkCursor *cursor,
|
||||
guint32 time_)
|
||||
{
|
||||
GdkWindowImplWin32 *impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
|
||||
GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
|
||||
if (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD)
|
||||
{
|
||||
@ -160,7 +160,7 @@ gdk_device_virtual_grab (GdkDevice *device,
|
||||
else
|
||||
SetCursor (LoadCursor (NULL, IDC_ARROW));
|
||||
|
||||
SetCapture (GDK_WINDOW_HWND (window));
|
||||
SetCapture (GDK_SURFACE_HWND (window));
|
||||
}
|
||||
|
||||
return GDK_GRAB_SUCCESS;
|
||||
@ -199,7 +199,7 @@ gdk_device_virtual_ungrab (GdkDevice *device,
|
||||
|
||||
static void
|
||||
gdk_device_virtual_select_window_events (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkEventMask event_mask)
|
||||
{
|
||||
}
|
||||
@ -216,7 +216,7 @@ gdk_device_virtual_class_init (GdkDeviceVirtualClass *klass)
|
||||
device_class->query_state = gdk_device_virtual_query_state;
|
||||
device_class->grab = gdk_device_virtual_grab;
|
||||
device_class->ungrab = gdk_device_virtual_ungrab;
|
||||
device_class->window_at_position = _gdk_device_win32_window_at_position;
|
||||
device_class->window_at_position = _gdk_device_win32_surface_at_position;
|
||||
device_class->select_window_events = gdk_device_virtual_select_window_events;
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ G_DEFINE_TYPE (GdkDeviceWin32, gdk_device_win32, GDK_TYPE_DEVICE)
|
||||
|
||||
static gboolean
|
||||
gdk_device_win32_get_history (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
guint32 start,
|
||||
guint32 stop,
|
||||
GdkTimeCoord ***events,
|
||||
@ -41,13 +41,13 @@ gdk_device_win32_get_history (GdkDevice *device,
|
||||
|
||||
static void
|
||||
gdk_device_win32_get_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gdouble *axes,
|
||||
GdkModifierType *mask)
|
||||
{
|
||||
gint x_int, y_int;
|
||||
|
||||
gdk_window_get_device_position (window, device, &x_int, &y_int, mask);
|
||||
gdk_surface_get_device_position (window, device, &x_int, &y_int, mask);
|
||||
|
||||
if (axes)
|
||||
{
|
||||
@ -58,7 +58,7 @@ gdk_device_win32_get_state (GdkDevice *device,
|
||||
|
||||
static void
|
||||
gdk_device_win32_set_window_cursor (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkCursor *cursor)
|
||||
{
|
||||
}
|
||||
@ -98,8 +98,8 @@ get_current_mask (void)
|
||||
|
||||
static void
|
||||
gdk_device_win32_query_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkWindow **child_window,
|
||||
GdkSurface *window,
|
||||
GdkSurface **child_window,
|
||||
gdouble *root_x,
|
||||
gdouble *root_y,
|
||||
gdouble *win_x,
|
||||
@ -112,8 +112,8 @@ gdk_device_win32_query_state (GdkDevice *device,
|
||||
|
||||
if (window)
|
||||
{
|
||||
scale = GDK_WINDOW_IMPL_WIN32 (window->impl)->window_scale;
|
||||
hwnd = GDK_WINDOW_HWND (window);
|
||||
scale = GDK_SURFACE_IMPL_WIN32 (window->impl)->window_scale;
|
||||
hwnd = GDK_SURFACE_HWND (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -171,10 +171,10 @@ gdk_device_win32_query_state (GdkDevice *device,
|
||||
|
||||
static GdkGrabStatus
|
||||
gdk_device_win32_grab (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gboolean owner_events,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindow *confine_to,
|
||||
GdkSurface *confine_to,
|
||||
GdkCursor *cursor,
|
||||
guint32 time_)
|
||||
{
|
||||
@ -195,15 +195,15 @@ screen_to_client (HWND hwnd, POINT screen_pt, POINT *client_pt)
|
||||
ScreenToClient (hwnd, client_pt);
|
||||
}
|
||||
|
||||
GdkWindow *
|
||||
_gdk_device_win32_window_at_position (GdkDevice *device,
|
||||
GdkSurface *
|
||||
_gdk_device_win32_surface_at_position (GdkDevice *device,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
GdkModifierType *mask,
|
||||
gboolean get_toplevel)
|
||||
{
|
||||
GdkWindow *window = NULL;
|
||||
GdkWindowImplWin32 *impl = NULL;
|
||||
GdkSurface *window = NULL;
|
||||
GdkSurfaceImplWin32 *impl = NULL;
|
||||
POINT screen_pt, client_pt;
|
||||
HWND hwnd, hwndc;
|
||||
RECT rect;
|
||||
@ -223,7 +223,7 @@ _gdk_device_win32_window_at_position (GdkDevice *device,
|
||||
window = gdk_win32_handle_table_lookup (hwnd);
|
||||
|
||||
if (window != NULL &&
|
||||
GDK_WINDOW_TYPE (window) != GDK_WINDOW_FOREIGN)
|
||||
GDK_SURFACE_TYPE (window) != GDK_SURFACE_FOREIGN)
|
||||
break;
|
||||
|
||||
screen_to_client (hwnd, screen_pt, &client_pt);
|
||||
@ -268,7 +268,7 @@ _gdk_device_win32_window_at_position (GdkDevice *device,
|
||||
|
||||
if (window && (win_x || win_y))
|
||||
{
|
||||
impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
|
||||
if (win_x)
|
||||
*win_x = client_pt.x / impl->window_scale;
|
||||
@ -281,7 +281,7 @@ _gdk_device_win32_window_at_position (GdkDevice *device,
|
||||
|
||||
static void
|
||||
gdk_device_win32_select_window_events (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkEventMask event_mask)
|
||||
{
|
||||
}
|
||||
@ -298,7 +298,7 @@ gdk_device_win32_class_init (GdkDeviceWin32Class *klass)
|
||||
device_class->query_state = gdk_device_win32_query_state;
|
||||
device_class->grab = gdk_device_win32_grab;
|
||||
device_class->ungrab = gdk_device_win32_ungrab;
|
||||
device_class->window_at_position = _gdk_device_win32_window_at_position;
|
||||
device_class->window_at_position = _gdk_device_win32_surface_at_position;
|
||||
device_class->select_window_events = gdk_device_win32_select_window_events;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ struct _GdkDeviceWin32Class
|
||||
|
||||
GType gdk_device_win32_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GdkWindow *_gdk_device_win32_window_at_position (GdkDevice *device,
|
||||
GdkSurface *_gdk_device_win32_surface_at_position (GdkDevice *device,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
GdkModifierType *mask,
|
||||
|
@ -30,7 +30,7 @@ G_DEFINE_TYPE (GdkDeviceWintab, gdk_device_wintab, GDK_TYPE_DEVICE)
|
||||
|
||||
static gboolean
|
||||
gdk_device_wintab_get_history (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
guint32 start,
|
||||
guint32 stop,
|
||||
GdkTimeCoord ***events,
|
||||
@ -67,7 +67,7 @@ get_current_mask (void)
|
||||
|
||||
static void
|
||||
gdk_device_wintab_get_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gdouble *axes,
|
||||
GdkModifierType *mask)
|
||||
{
|
||||
@ -94,7 +94,7 @@ gdk_device_wintab_get_state (GdkDevice *device,
|
||||
|
||||
static void
|
||||
gdk_device_wintab_set_window_cursor (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkCursor *cursor)
|
||||
{
|
||||
}
|
||||
@ -108,8 +108,8 @@ gdk_device_wintab_warp (GdkDevice *device,
|
||||
|
||||
static void
|
||||
gdk_device_wintab_query_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkWindow **child_window,
|
||||
GdkSurface *window,
|
||||
GdkSurface **child_window,
|
||||
gdouble *root_x,
|
||||
gdouble *root_y,
|
||||
gdouble *win_x,
|
||||
@ -119,14 +119,14 @@ gdk_device_wintab_query_state (GdkDevice *device,
|
||||
GdkDeviceWintab *device_wintab;
|
||||
POINT point;
|
||||
HWND hwnd, hwndc;
|
||||
GdkWindowImplWin32 *impl;
|
||||
GdkSurfaceImplWin32 *impl;
|
||||
int scale;
|
||||
|
||||
device_wintab = GDK_DEVICE_WINTAB (device);
|
||||
if (window)
|
||||
{
|
||||
scale = GDK_WINDOW_IMPL_WIN32 (window->impl)->window_scale;
|
||||
hwnd = GDK_WINDOW_HWND (window);
|
||||
scale = GDK_SURFACE_IMPL_WIN32 (window->impl)->window_scale;
|
||||
hwnd = GDK_SURFACE_HWND (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -186,10 +186,10 @@ gdk_device_wintab_query_state (GdkDevice *device,
|
||||
|
||||
static GdkGrabStatus
|
||||
gdk_device_wintab_grab (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gboolean owner_events,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindow *confine_to,
|
||||
GdkSurface *confine_to,
|
||||
GdkCursor *cursor,
|
||||
guint32 time_)
|
||||
{
|
||||
@ -202,7 +202,7 @@ gdk_device_wintab_ungrab (GdkDevice *device,
|
||||
{
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
static GdkSurface *
|
||||
gdk_device_wintab_window_at_position (GdkDevice *device,
|
||||
gdouble *win_x,
|
||||
gdouble *win_y,
|
||||
@ -214,30 +214,30 @@ gdk_device_wintab_window_at_position (GdkDevice *device,
|
||||
|
||||
static void
|
||||
gdk_device_wintab_select_window_events (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
GdkEventMask event_mask)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_device_wintab_translate_axes (GdkDeviceWintab *device_wintab,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gdouble *axes,
|
||||
gdouble *x,
|
||||
gdouble *y)
|
||||
{
|
||||
GdkDevice *device;
|
||||
GdkWindow *impl_window;
|
||||
GdkSurface *impl_window;
|
||||
gint root_x, root_y;
|
||||
gdouble temp_x, temp_y;
|
||||
gint i;
|
||||
GdkDisplay *display;
|
||||
|
||||
device = GDK_DEVICE (device_wintab);
|
||||
impl_window = _gdk_window_get_impl_window (window);
|
||||
impl_window = _gdk_surface_get_impl_window (window);
|
||||
temp_x = temp_y = 0;
|
||||
|
||||
gdk_window_get_origin (impl_window, &root_x, &root_y);
|
||||
gdk_surface_get_origin (impl_window, &root_x, &root_y);
|
||||
|
||||
display = gdk_device_get_display (device);
|
||||
|
||||
@ -260,7 +260,7 @@ _gdk_device_wintab_translate_axes (GdkDeviceWintab *device_wintab,
|
||||
HMONITOR hmonitor;
|
||||
MONITORINFO minfo = {sizeof (MONITORINFO),};
|
||||
|
||||
hmonitor = MonitorFromWindow (GDK_WINDOW_HWND (window),
|
||||
hmonitor = MonitorFromWindow (GDK_SURFACE_HWND (window),
|
||||
MONITOR_DEFAULTTONEAREST);
|
||||
GetMonitorInfo (hmonitor, &minfo);
|
||||
|
||||
|
@ -61,7 +61,7 @@ struct _GdkDeviceWintabClass
|
||||
GType gdk_device_wintab_get_type (void) G_GNUC_CONST;
|
||||
|
||||
void _gdk_device_wintab_translate_axes (GdkDeviceWintab *device,
|
||||
GdkWindow *window,
|
||||
GdkSurface *window,
|
||||
gdouble *axes,
|
||||
gdouble *x,
|
||||
gdouble *y);
|
||||
|
@ -43,7 +43,7 @@
|
||||
#define TWOPI (2 * G_PI)
|
||||
|
||||
static GList *wintab_contexts = NULL;
|
||||
static GdkWindow *wintab_window = NULL;
|
||||
static GdkSurface *wintab_window = NULL;
|
||||
extern gint _gdk_input_ignore_core;
|
||||
|
||||
typedef UINT (WINAPI *t_WTInfoA) (UINT a, UINT b, LPVOID c);
|
||||
@ -432,7 +432,7 @@ wintab_init_check (GdkDeviceManagerWin32 *device_manager)
|
||||
ndevices, ncursors));
|
||||
#endif
|
||||
/* Create a dummy window to receive wintab events */
|
||||
wintab_window = gdk_window_new_popup (display, &(GdkRectangle) { -100, -100, 2, 2 });
|
||||
wintab_window = gdk_surface_new_popup (display, &(GdkRectangle) { -100, -100, 2, 2 });
|
||||
g_object_ref (wintab_window);
|
||||
|
||||
for (devix = 0; devix < ndevices; devix++)
|
||||
@ -496,7 +496,7 @@ wintab_init_check (GdkDeviceManagerWin32 *device_manager)
|
||||
print_lc(&lc)));
|
||||
#endif
|
||||
hctx = g_new (HCTX, 1);
|
||||
if ((*hctx = (*p_WTOpenA) (GDK_WINDOW_HWND (wintab_window), &lc, TRUE)) == NULL)
|
||||
if ((*hctx = (*p_WTOpenA) (GDK_SURFACE_HWND (wintab_window), &lc, TRUE)) == NULL)
|
||||
{
|
||||
g_warning ("gdk_input_wintab_init: WTOpen failed");
|
||||
return;
|
||||
@ -831,7 +831,7 @@ decode_tilt (gint *axis_data,
|
||||
|
||||
/*
|
||||
* Get the currently active keyboard modifiers (ignoring the mouse buttons)
|
||||
* We could use gdk_window_get_pointer but that function does a lot of other
|
||||
* We could use gdk_surface_get_pointer but that function does a lot of other
|
||||
* expensive things besides getting the modifiers. This code is somewhat based
|
||||
* on build_pointer_event_state from gdkevents-win32.c
|
||||
*/
|
||||
@ -878,7 +878,7 @@ gboolean
|
||||
gdk_input_other_event (GdkDisplay *display,
|
||||
GdkEvent *event,
|
||||
MSG *msg,
|
||||
GdkWindow *window)
|
||||
GdkSurface *window)
|
||||
{
|
||||
GdkDeviceManagerWin32 *device_manager;
|
||||
GdkDeviceWintab *source_device = NULL;
|
||||
@ -886,7 +886,7 @@ gdk_input_other_event (GdkDisplay *display,
|
||||
GdkEventMask masktest;
|
||||
guint key_state;
|
||||
POINT pt;
|
||||
GdkWindowImplWin32 *impl;
|
||||
GdkSurfaceImplWin32 *impl;
|
||||
|
||||
PACKET packet;
|
||||
gint root_x, root_y;
|
||||
@ -912,7 +912,7 @@ gdk_input_other_event (GdkDisplay *display,
|
||||
|
||||
GDK_NOTE (EVENTS_OR_INPUT,
|
||||
g_print ("gdk_input_other_event: window=%p %+d%+d\n",
|
||||
window ? GDK_WINDOW_HWND (window) : NULL, x, y));
|
||||
window ? GDK_SURFACE_HWND (window) : NULL, x, y));
|
||||
|
||||
if (msg->message == WT_PACKET || msg->message == WT_CSRCHANGE)
|
||||
{
|
||||
@ -1060,28 +1060,28 @@ gdk_input_other_event (GdkDisplay *display,
|
||||
/* Now we can check if the window wants the event, and
|
||||
* propagate if necessary.
|
||||
*/
|
||||
while ((gdk_window_get_device_events (window, GDK_DEVICE (source_device)) & masktest) == 0 &&
|
||||
while ((gdk_surface_get_device_events (window, GDK_DEVICE (source_device)) & masktest) == 0 &&
|
||||
(gdk_device_get_device_type (GDK_DEVICE (source_device)) == GDK_DEVICE_TYPE_SLAVE &&
|
||||
(gdk_window_get_events (window) & masktest) == 0))
|
||||
(gdk_surface_get_events (window) & masktest) == 0))
|
||||
{
|
||||
GDK_NOTE (EVENTS_OR_INPUT, g_print ("... not selected\n"));
|
||||
|
||||
if (window->parent == NULL)
|
||||
return FALSE;
|
||||
|
||||
impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
pt.x = x * impl->window_scale;
|
||||
pt.y = y * impl->window_scale;
|
||||
ClientToScreen (GDK_WINDOW_HWND (window), &pt);
|
||||
ClientToScreen (GDK_SURFACE_HWND (window), &pt);
|
||||
g_object_unref (window);
|
||||
window = window->parent;
|
||||
impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
g_object_ref (window);
|
||||
ScreenToClient (GDK_WINDOW_HWND (window), &pt);
|
||||
ScreenToClient (GDK_SURFACE_HWND (window), &pt);
|
||||
x = pt.x / impl->window_scale;
|
||||
y = pt.y / impl->window_scale;
|
||||
GDK_NOTE (EVENTS_OR_INPUT, g_print ("... propagating to %p %+d%+d\n",
|
||||
GDK_WINDOW_HWND (window), x, y));
|
||||
GDK_SURFACE_HWND (window), x, y));
|
||||
}
|
||||
|
||||
event->any.window = window;
|
||||
@ -1096,7 +1096,7 @@ gdk_input_other_event (GdkDisplay *display,
|
||||
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
|
||||
|
||||
event->button.axes = g_new (gdouble, num_axes);
|
||||
gdk_window_get_origin (window, &root_x, &root_y);
|
||||
gdk_surface_get_origin (window, &root_x, &root_y);
|
||||
|
||||
_gdk_device_wintab_translate_axes (source_device,
|
||||
window,
|
||||
@ -1128,7 +1128,7 @@ gdk_input_other_event (GdkDisplay *display,
|
||||
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
|
||||
|
||||
event->motion.axes = g_new (gdouble, num_axes);
|
||||
gdk_window_get_origin (window, &root_x, &root_y);
|
||||
gdk_surface_get_origin (window, &root_x, &root_y);
|
||||
|
||||
_gdk_device_wintab_translate_axes (source_device,
|
||||
window,
|
||||
|
@ -60,7 +60,7 @@ void _gdk_input_set_tablet_active (void);
|
||||
gboolean gdk_input_other_event (GdkDisplay *display,
|
||||
GdkEvent *event,
|
||||
MSG *msg,
|
||||
GdkWindow *window);
|
||||
GdkSurface *window);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@ -492,7 +492,7 @@ gdk_win32_display_get_name (GdkDisplay *display)
|
||||
return display_name_cache;
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
static GdkSurface *
|
||||
gdk_win32_display_get_default_group (GdkDisplay *display)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
||||
@ -1143,7 +1143,7 @@ gdk_win32_display_class_init (GdkWin32DisplayClass *klass)
|
||||
object_class->dispose = gdk_win32_display_dispose;
|
||||
object_class->finalize = gdk_win32_display_finalize;
|
||||
|
||||
display_class->window_type = GDK_TYPE_WIN32_WINDOW;
|
||||
display_class->window_type = GDK_TYPE_WIN32_SURFACE;
|
||||
|
||||
display_class->get_name = gdk_win32_display_get_name;
|
||||
display_class->beep = gdk_win32_display_beep;
|
||||
@ -1184,5 +1184,5 @@ gdk_win32_display_class_init (GdkWin32DisplayClass *klass)
|
||||
display_class->get_last_seen_time = gdk_win32_display_get_last_seen_time;
|
||||
display_class->set_cursor_theme = gdk_win32_display_set_cursor_theme;
|
||||
|
||||
_gdk_win32_windowing_init ();
|
||||
_gdk_win32_surfaceing_init ();
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user