summaryrefslogtreecommitdiff
path: root/gdk/gdkdnd.c
Commit message (Collapse)AuthorAgeFilesLines
* dnd: Rename headersMatthias Clasen2018-07-021-767/+0
| | | | | | | Rename gdkdnd.h to gdkdrag.h, to go along with gdkdrop.h This commit includes the necessary updates to the X11, Wayland and Broadway backends. Other backends have to be updated separately.
* gdk: Rename GdkDragContext to GdkDragMatthias Clasen2018-07-021-182/+181
| | | | | | | This is to go along with the newly introduced GdkDrop. This commit includes the necessary updates to the X11, Wayland and Broadway backends. Other backends have to be updated separately.
* dnd: gdk_drag_action_is_unique() should return a booleanBenjamin Otte2018-06-191-1/+1
|
* dnd: Remove unused time argumentsBenjamin Otte2018-06-181-3/+2
|
* dnd: Remove GdkDragContext.dest_surfaceBenjamin Otte2018-06-181-3/+0
| | | | The variable is now unused
* dnd: Remove GdkDragContext.is_sourceBenjamin Otte2018-06-181-3/+0
| | | | | All drag contexts are sources these days, the other ones are GdkDrop now.
* dnd: Make the base Drag/Drop types abstractBenjamin Otte2018-06-181-1/+1
| | | | | | | This way, they'll be ignored by the testsuite. And we don't want to instantiate them anyway, the backends have their own subclasses.
* dnd: GdkDragContext is no longer a GdkDrop subclassBenjamin Otte2018-06-181-34/+1
| | | | This includes a bunch of header cleanup
* dnd: Remove gdk_drag_status() and gdk_drag_finish()Benjamin Otte2018-06-181-43/+0
| | | | | Those functions are unused and have been replaced by their equivalents gdk_drop_status() and gdk_drop_finish().
* dnd: Remove gdk_drag_context_get_dest_surface()Benjamin Otte2018-06-181-32/+0
| | | | | | ... and gdk_drag_context_get_source_surface(). In the backends, use direct access to the variables instead.
* dnd: Remove GdkDragContext::commit_drag_status() vfuncBenjamin Otte2018-06-181-36/+0
| | | | | | | The idea behind the vfunc doesn't work as status updates can happen asynchronously. A better solution needs to be found.
* dnd: Add gdk_drop_finish()Benjamin Otte2018-06-181-1/+4
| | | | and move the vfunc into GdkDrop.
* dnd: Rename gdk_drop_finish() => gdk_drag_finish()Benjamin Otte2018-06-181-2/+2
| | | | | This is a simple rename, so that we can reintroduce gdk_drop_finish() with the GdkDrop object.
* dnd: Move the gdk_drag_status() functionBenjamin Otte2018-06-181-3/+1
| | | | | | It's now gdk_drop_status(). Also clarify the intended semantics.
* dnd: Add gdk_drop_get_actions()Benjamin Otte2018-06-181-0/+5
| | | | | | | | This uses the new method without GDK_ACTION_ASK: Either it is a single action (queryable via gdk_drag_action_is_unique()) or it is not and then the drop target has to make a decision (potentially by asking someone).
* dnd: Make actions a private member variableBenjamin Otte2018-06-181-3/+19
| | | | Use a setter in the backends.
* dnd: Add gdk_drag_action_is_unique()Benjamin Otte2018-06-181-0/+19
| | | | This will be necessary once we remove the ASK action.
* dnd: Remove GDK_ACTION_DEFAULT and GDK_ACTION_PRIVATEBenjamin Otte2018-06-181-2/+1
| | | | They're unused and nobody knows what they're supposed to men anyway.
* drop: Move gdk_drop_read_async() to GdkDrop classBenjamin Otte2018-06-181-103/+0
|
* dnd: Add GdkDrop base class for GdkDragContextBenjamin Otte2018-06-181-1/+29
| | | | | | | | | | | | | | | The ultimate goal of this patch series is to split GdkDragContext into GdkDrop + GdkDrag classes for the destination and source side of a dnd operation. The refactoring is meant to work something like this: 1. Introduce GdkDrop as a base class 2. Make all drop related code (like GdkEvent) use GdkDrop instead of GdkDragContext. Move/duplicate APIs to allow that. 3. Port all drop contexts in the backends from GdkDragContext to GdkDrop 4. Delete all APIs in GdkDragContext that aren't needed anymore. 5. Make GdkDragContext no longer a GdkDrop subclass 6. Rename GdkDragContext to GdkDrag
* dnd: Make "formats" a construct-only propertyBenjamin Otte2018-05-071-5/+30
| | | | ... and hide the member variable inside the DragContextPrivate.
* Document gdk_drop_read_asyncMatthias Clasen2018-05-031-8/+13
|
* dnd: Add a private structBenjamin Otte2018-05-031-9/+25
| | | | | | And put member veriables into it. Also fix backends to use accessors instead of direct access.
* dnd: Remove gdk_drop_reply()Benjamin Otte2018-05-031-21/+0
| | | | It was only necessary for Motif DND, and we don't support that anymore.
* gdk: Remove gdk_drag_grop_succeeded()Benjamin Otte2018-05-031-19/+0
| | | | It's unused and most backends don't implement it.
* Fix some g-i annotation warningsRico Tzschichholz2018-05-011-1/+1
|
* dnd: Make GdkDragContext::device a (construct-only) propertyBenjamin Otte2018-04-271-30/+26
| | | | | Also remove gdk_drag_context_set_device() and insist on backends using the property.
* GdkSurface: Rename lots of stuff from window->surfaceAlexander Larsson2018-03-201-10/+10
| | | | | Mostly these are internal things, but the major public change is that event.window is now event.surface.
* GdkSurface: Rename various functions and variablesAlexander Larsson2018-03-201-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an automatic rename of various things related to the window->surface rename. Public symbols changed by this is: GDK_MODE_WINDOW gdk_device_get_window_at_position gdk_device_get_window_at_position_double gdk_device_get_last_event_window gdk_display_get_monitor_at_window gdk_drag_context_get_source_window gdk_drag_context_get_dest_window gdk_drag_context_get_drag_window gdk_draw_context_get_window gdk_drawing_context_get_window gdk_gl_context_get_window gdk_synthesize_window_state gdk_surface_get_window_type gdk_x11_display_set_window_scale gsk_renderer_new_for_window gsk_renderer_get_window gtk_text_view_buffer_to_window_coords gtk_tree_view_convert_widget_to_bin_window_coords gtk_tree_view_convert_tree_to_bin_window_coords The commands that generated this are: git sed -f g "GDK window" "GDK surface" git sed -f g window_impl surface_impl (cd gdk; git sed -f g impl_window impl_surface) git sed -f g WINDOW_IMPL SURFACE_IMPL git sed -f g GDK_MODE_WINDOW GDK_MODE_SURFACE git sed -f g gdk_draw_context_get_window gdk_draw_context_get_surface git sed -f g gdk_drawing_context_get_window gdk_drawing_context_get_surface git sed -f g gdk_gl_context_get_window gdk_gl_context_get_surface git sed -f g gsk_renderer_get_window gsk_renderer_get_surface git sed -f g gsk_renderer_new_for_window gsk_renderer_new_for_surface (cd gdk; git sed -f g window_type surface_type) git sed -f g gdk_surface_get_window_type gdk_surface_get_surface_type git sed -f g window_at_position surface_at_position git sed -f g event_window event_surface git sed -f g window_coord surface_coord git sed -f g window_state surface_state git sed -f g window_cursor surface_cursor git sed -f g window_scale surface_scale git sed -f g window_events surface_events git sed -f g monitor_at_window monitor_at_surface git sed -f g window_under_pointer surface_under_pointer (cd gdk; git sed -f g for_window for_surface) git sed -f g window_anchor surface_anchor git sed -f g WINDOW_IS_TOPLEVEL SURFACE_IS_TOPLEVEL git sed -f g native_window native_surface git sed -f g source_window source_surface git sed -f g dest_window dest_surface git sed -f g drag_window drag_surface git sed -f g input_window input_surface git checkout NEWS* po-properties po docs/reference/gtk/migrating-3to4.xml
* GdkWindow -> GdkSurface: File renamesAlexander Larsson2018-03-201-1/+1
| | | | | | | | | | | | | Rename all *window.[ch] source files. This is an automatic operation, done by the following commands: for i in $(git ls-files gdk | grep window); do git mv $i $(echo $i | sed s/window/surface/); git sed -f g $(basename $i) $(basename $i | sed s/window/surface/) ; done git checkout NEWS* po-properties po
* GdkWindow -> GdkSurface initial type renameAlexander Larsson2018-03-201-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* The big versioning cleanupMatthias Clasen2018-02-061-38/+0
| | | | | | | Remove all the old 2.x and 3.x version annotations. GTK+ 4 is a new start, and from the perspective of a GTK+ 4 developer all these APIs have been around since the beginning.
* dnd: Remove 2 vfuncs that aren't neededBenjamin Otte2018-01-311-74/+0
| | | | | They're only used inside the X11 backend, and the backend can just call its own function.
* dnd: Add g-i annotations for gdk_drop_read_async/finishRico Tzschichholz2018-01-031-0/+22
|
* Document more structsMatthias Clasen2017-12-261-0/+7
|
* dnd: Remove gdk_drag_get_selection()Benjamin Otte2017-12-141-16/+0
| | | | | | | | | Without selections, drags can't have them either. Also included is removing the selection from GtkSelectionData. Includes a bunch of crude cleanups to Wayland code that no longer has to care about selection atoms.
* gdk: Remove GdkEventType argument from GdkEvent unionCarlos Garnacho2017-12-141-1/+1
| | | | | | It won't stand true anymore that the GdkEventType argument is the first field of the GdkEvent* structs. All callers have been updated to use event->any.type instead.
* gdk: Remove gdk_selection_convert()Benjamin Otte2017-12-141-14/+0
| | | | It's not used anymore.
* dnd: Pass content to gdk_drag_begin()Benjamin Otte2017-12-131-0/+173
| | | | | | | | | | | | | | | | Instead of just passing the GdkContentFormats, we are now passing the GdkContentProvider to gdk_drag_begin(). This means that GDK itself can now query the data from the provider directly instead of having to send selection events. Use this to provide the private API gdk_drag_context_write() that allows backends to pass an output stream that this data will be written to. Implement this as the mechanism for providing drag data on Wayland. And to make this all work, implement a content provider named GtkDragContent that is implemented by reverting to the old DND drag-data-get machinery inside GTK, so for widgets everything works just like before.
* gdk: Remove unused functionBenjamin Otte2017-12-131-6/+0
| | | | Fun fact: This function was never used.
* gdk: Remove gdk_drag_manage_dnd()Benjamin Otte2017-12-111-57/+0
| | | | | | | Instead, pass the actions as part of gdk_drag_begin() and insist DND is always managed. A new side effect is that gdk_drag_begin() can now return %NULL.
* dnd: Introduce gdk_drop_read_async() and use itBenjamin Otte2017-12-101-0/+80
| | | | | | | | | | This is the replacement for selection usage. Backend implementations for X11 (missing support for backwards compat formats like COMPOUND_TEXT) and Wayland are included. GTK code should be adapted to use gdk_drop_read_*() functions instead of gtk_drag_get_data().
* dnd: Add gdk_drag_context_get_display()Benjamin Otte2017-12-101-0/+83
| | | | | | Also turn it into a readable, construct-only property. Every GDK object should have this. (Apart from GdkDisplay, obviously.)
* Remove GdkDragProtocol from the apiMatthias Clasen2017-12-031-19/+1
| | | | | ...together with apis that return it. We were not using this information in GTK+ at all, so no need to provide it.
* Drop api that is only for unmanaged dndMatthias Clasen2017-12-031-12/+3
| | | | These functions are not needed as public api anymore.
* gdkdnd: Make GdkDragContext->formats a GdkContentFormatsBenjamin Otte2017-11-201-9/+10
| | | | Instead of it being a GList of GdkAtoms.
* gdk: Intern signal namesMatthias Clasen2017-11-171-4/+4
| | | | We were forgetting this in a few places.
* gdk: Replace GDK_NONE with NULLBenjamin Otte2017-11-151-2/+2
|
* gdk: Cursors no longer have a displayBenjamin Otte2017-11-041-2/+2
| | | | | | | Change constructors to reflect that. While doing so, also add a fallback argument to the cursor constructors, so it is now possible to create cursors with fallback.
* dnd: Drop GdkScreen from apisMatthias Clasen2017-10-311-10/+8
| | | | | | | | Drop the screen argument from gdk_dnd_find_window_for_screen and rename the function to gdk_dnd_find_window. The screen argument does not add anything here since the drag context is already tied to the display. Update all backends, and update all callers.