Matthias Clasen
5e57b3d07a
testdnd2: Fix the text case
...
We must take mime types into account when checking.
2020-01-08 18:48:22 -05:00
Matthias Clasen
5206a92522
Update all callers
2020-01-08 18:48:22 -05:00
Matthias Clasen
009228471c
testdnd2: Use GDK content formats api
2020-01-08 18:48:22 -05:00
Matthias Clasen
c95659bf32
testdnd2: Update to the api change in the previous commit
2020-01-08 18:48:22 -05:00
Matthias Clasen
2227d2a2b5
testdnd2: Use gtk_widget_add_controller for drag source
2020-01-08 18:48:21 -05:00
Matthias Clasen
e8b830a3dd
dragsource: Reshuffle api a bit
...
Remove arguments from the constructor.
For actions, we now default to COPY, which is the most common one
that we should enable by default (MOVE requires handling deletion
on the the source side, and ASK only makes sense if we have
multiple actions).
For the content provider, we add a new ::prepare signal where
it should be provided just-in-time.
2020-01-08 18:48:21 -05:00
Matthias Clasen
38974d7d2b
dragsource: Tweak api, update all callers
...
Add GdkDrag back to signals, drop ::drag-data-delete,
and replace it with a boolean in ::drag-end.
2020-01-08 18:48:21 -05:00
Matthias Clasen
e9067ae2db
Replace gtk_drop_target_attach/detach
...
Since drop targets are now just event controller,
gtk_widget_add/remove_controller works just fine
for them.
2020-01-08 18:48:21 -05:00
Matthias Clasen
46f42fc53d
droptarget: Drop defaults flags
...
These no longer have any effect.
Update all callers.
2020-01-08 18:48:20 -05:00
Matthias Clasen
58106af54d
testdnd2: Add a test for ASK handling
...
It is a bit unfortunate that we need to extend the
lifespan of the drop object by keeping our own
ref, but I don't see a better way of doing it.
2020-01-08 18:48:20 -05:00
Matthias Clasen
3f33a0ed27
testdnd2: Port to GtkDropTarget
2020-01-08 18:48:20 -05:00
Matthias Clasen
b4c689ecd6
tests: Convert to GtkDragSource
...
Some tests, such as testimage did not have
anything particularly worth keeping, so
were removed instead of fixed.
2020-01-08 18:48:19 -05:00
Timm Bäder
71339225eb
icontheme: Remove gtk_icon_info_load_texture
...
It's the same as load_icon now.
2019-09-09 17:36:26 +02:00
Timm Bäder
6821fe0c13
icontheme: Add error argument to _load_texture
...
Loading an icon might fail.
2019-09-09 17:36:26 +02:00
Matthias Clasen
7733f646d6
gdk: Rename GdkDragContext to GdkDrag
...
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.
2018-07-02 14:59:26 +02:00
Benjamin Otte
9a91d3739d
widget: Remove time argument from drag_data_get() vfunc
2018-06-18 23:49:53 +02:00
Benjamin Otte
6d7cb2b781
dnd: Make drag-data-received use a GdkDrop
2018-06-18 23:49:52 +02:00
Benjamin Otte
cbe40f5f46
image: Remove gtk_image_set_texture()
...
gtk_image_get_paintable() is a perfect replacement, so use that one.
2018-03-16 06:04:45 +01:00
Benjamin Otte
01f996447e
tests: Port from surface to texture
2018-03-16 06:04:45 +01:00
Benjamin Otte
4658d7ea54
dnd: Remove x/y coordinates from drag-data-received
...
This is in preparation of using input streams to show that these
coordinates aren't needed most of the time and can otherwise be saved
during GtkWidget::drag-drop.
2017-12-05 05:29:00 +01:00
Benjamin Otte
fc2ce5a925
gdk: Make GdkContentFormats immutable
2017-11-20 23:13:10 +01:00
Benjamin Otte
9a6ec4e959
contentformats: Rename GtkTargetList
...
It's now called GdkContentsFormat
2017-11-20 23:12:33 +01:00
Benjamin Otte
3f5178dc21
selection: Remove the info uint
...
Instead of allowing people to pass a uint user-data, insist on them
comparing mime types.
The user data was a uint instead of a pointer anyway, so uniqueness
could not be guaranteed and it caused more issues than it was worth.
And that's ignoring the fact that it basically wasn't used.
2017-11-16 22:59:43 +01:00
Matthias Clasen
0d23606653
Drop gtk_icon_size_lookup
...
Add a new, private gtk_image_get_image_size to replace it, and
update the remaining callers in a suitable way.
2017-11-15 14:22:17 -05:00
Matthias Clasen
2301d8d90b
enums: Change GtkIconSize values
...
The new values are the ones we intend to keep. The old ones had
duplicated meanings and nobody knew which one to take.
2017-11-15 14:22:17 -05:00
Matthias Clasen
dbfaa99107
image: Remove icon-size argument from icon setters
...
Instead, add a function gtk_image_set_icon_size() for the cases where
overriding the icon size is necessary.
Treat icon sizes the same way as pixel sizes, too. So gtk_image_clear()
no longer unsets the icon size.
2017-11-15 14:22:17 -05:00
Benjamin Otte
049cc6aa01
image: Change getters
...
Instead of returning the icon size with them, make
gtk_image_get_icon_name() and gtk_image_get_gicon() only return the icon
itself.
As a benefit, we can turn them into regular getters that return values
instead of requiring out parameters.
Instead, provide gtk_image_get_icon_size() to query the icon size.
2017-11-15 14:22:17 -05:00
Benjamin Otte
5a1a11bcde
dnd: Make GtkDragDest and GtkDragSource use GtkTargetList
...
This gets rid of GtkTargetEntry in the API and consistently uses
GtkTargetList.
2017-11-15 19:07:17 +01:00
Benjamin Otte
ecd5b399a4
icontheme: Use GdkDisplay instead of GdkScreen
2017-10-31 03:05:55 +01:00
Matthias Clasen
a783470491
tests: Convert dnd test to surface apis
...
Stop using gtk_drag_set_icon_pixbuf in testdnd2.
This api is going away.
2017-10-23 05:58:54 +02:00
Benjamin Otte
69da7836f9
tests: Get rid of GtkEventBox
2017-08-02 00:15:10 +01:00
Timm Bäder
6364231571
testdnd2: Don't pass a toplevel to gtk_drag_set_icon_widget
2017-04-25 20:30:37 +02:00
Timm Bäder
ea897c6df4
Remove gtk_widget_show_all
2017-01-20 21:37:04 +01:00
Matthias Clasen
2c7e567f05
Update callers
...
Adapt all our tests and examples to the new initialization api.
2017-01-19 13:50:17 -05:00
Matthias Clasen
e0e114fddb
testdnd2: Actually test gtk_drag_set_icon_widget
...
I added a new test function, but didn't actually use it.
No wonder I couldn't reproduce the lifecycle issues with
drag widgets that firefox is experiencing.
2016-04-26 20:34:24 -04:00
Matthias Clasen
4fe336930e
Expand the drag widget testcase
...
This adds a testcase which reuses the drag widget for multiple
drags.
2016-04-26 00:19:02 -04:00
Matthias Clasen
6d953cb08e
Add a dnd test using a window as icon
...
This case is causing problems in firefox. Lets at least make
sure that it doesn't crash in GTK+.
2016-04-21 14:23:00 -04:00
Matthias Clasen
934941d95d
testdnd2: Add some verbosity
...
This makes it easier to see that we're missing some signals
under Wayland.
2015-12-13 16:02:02 -05:00
Matthias Clasen
a8a33b71e4
Add a drag-end callback
...
This will be helpful in figuring out life-cycle issues
with icon widgets.
2015-12-11 10:50:25 -05:00
Matthias Clasen
c418ca451b
Add a dnd testcase
...
This has tests for drag images, widgets, hotspots.
2015-12-11 10:44:46 -05:00