Commit Graph

13 Commits

Author SHA1 Message Date
Matthias Clasen
a1c5a806b3 Convert headers to #pragma once
The conversion was done by guard2one.
2023-03-31 15:11:10 -04:00
Benjamin Otte
7cd728a0ea gdk: Make gdk_drop_status() take preferred action
This allows textview/text dnd to properly display a MOVE icon when in
the widget the drag started from but a COPY icon otherwise.
2020-03-02 04:43:56 +01:00
Benjamin Otte
808961564c gdk: Make DRAG_ENTER event take x/y coordinates
Make it mirror the behavior of ENTER/LEAVE events.
2020-02-21 18:19:16 +01:00
Matthias Clasen
7e80c39aee Remove root coords from the GdkDrop api 2020-02-21 00:39:41 -05:00
Matthias Clasen
64fd5158bf gdk: Change some async dnd api
The pattern we generally follow is to put the
async result right after the source object, in
finish functions. Do this for gdk_drop_read_finish.
2019-04-02 15:11:06 +00:00
Matthias Clasen
bc2f484ae9 Revert "GdkDrop: drop the priv struct"
This reverts commit d927c3bee0.

I was wrong. Better to hide the struct fields from subclasses.
2018-07-15 15:58:05 -04:00
Matthias Clasen
d927c3bee0 GdkDrop: drop the priv struct
Its not needed.
2018-07-12 13:02:42 +02:00
Benjamin Otte
657ebd2a78 drop: Add private API for event emission 2018-06-18 23:49:52 +02:00
Benjamin Otte
316bd6a333 dnd: Add gdk_drop_finish()
and move the vfunc into GdkDrop.
2018-06-18 23:49:20 +02:00
Benjamin Otte
a05af1f0f3 dnd: Move the gdk_drag_status() function
It's now gdk_drop_status().

Also clarify the intended semantics.
2018-06-18 23:49:19 +02:00
Benjamin Otte
b2dc303e5e dnd: Add gdk_drop_get_actions()
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).
2018-06-18 23:49:19 +02:00
Benjamin Otte
6919d8c532 drop: Move gdk_drop_read_async() to GdkDrop class 2018-06-18 23:49:19 +02:00
Benjamin Otte
f247d268d4 dnd: Add GdkDrop base class for GdkDragContext
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
2018-06-18 23:49:19 +02:00