summaryrefslogtreecommitdiff
path: root/gtk/gtkdragicon.c
Commit message (Collapse)AuthorAgeFilesLines
* Make widget property setters behaveMatthias Clasen2023-03-301-1/+1
| | | | | | We want to allow setting a property to its current value, while still having a precondition for widget->parent being NULL otherwise.
* dragicon: Handle compute-sizeIvan Molodetskikh2023-03-141-0/+13
| | | | | | Compute our size when requested by the backend. This makes GtkDragIcons actually recompute their size when it changes, instead of getting stuck with the first size and potentially underallocating.
* dragicon: Handle files without infoMatthias Clasen2023-01-301-0/+3
| | | | | g_file_query_info can (and does) fail, occasionally. Handle it.
* gtk: Stop using gtk_widget_show/hideMatthias Clasen2022-11-281-2/+2
| | | | | | | gtk_widget_set_visible and gtk_window_present are better alternatives, and calling gtk_widget_show on newly created widgets is no longer necessary anyway.
* gtk: Rename some private headersMatthias Clasen2022-10-051-1/+1
| | | | | Improve the consistency of our private header naming, by add 'private' to a bunch of them.
* Drop gtkintl.hMatthias Clasen2022-09-241-1/+0
| | | | | Include gtkprivate.h for I_() and glib-i18n.h for gettext macros.
* Remove all nicks and blurbs from param specsSophie Herold2022-05-111-3/+1
| | | | | | | | Those property features don't seem to be in use anywhere. They are redundant since the docs cover the same information and more. They also created unnecessary translation work. Closes #4904
* dragicon: Make color icons work in X11Matthias Clasen2021-12-121-0/+2
| | | | | | We need to disable the DND support in GtkColorSwatch completely for this to work in X11.
* dragicon: Provide default icons for more typesMatthias Clasen2021-12-121-0/+21
| | | | | | | Provide default icons for paintables and files. This is easy to do, and makes sense. fixup drag icon
* dragicon: No events, pleaseMatthias Clasen2021-12-121-1/+2
| | | | | | | We run into trouble on X11 if the widgets in the drag icon have drop targets attached. Prevent this by suppressing event delivery to drag icons outright.
* surface: Add a private structBenjamin Otte2021-10-061-1/+2
| | | | | Adding a random member to it resulted in a lot of header surgery as a side effect.
* dragicon: Add a default drag icon for GskRenderNodeBenjamin Otte2021-08-301-0/+21
| | | | Somebody should make this default drag icon machinery pluggable.
* docs: Tweak wordingMatthias Clasen2021-06-191-1/+1
| | | | | Instead of drag'n'drop, say drag-and-drop. That is easier to read, and less unclear on the markdown syntax implications.
* docs: Reduce redundancyMatthias Clasen2021-05-201-2/+2
| | | | | | | | Remove a boatload of "or %NULL" from nullable parameters and return values. gi-docgen generates suitable text from the annotation that we don't need to duplicate. This adds a few missing nullable annotations too.
* dragicon: Tweak docsMatthias Clasen2021-03-111-1/+1
|
* dragicon: Convert docsMatthias Clasen2021-03-111-31/+31
|
* gtk/native: Remove gtk_native_check_resize()Jonas Ådahl2020-12-071-6/+0
| | | | | This is now handle by the corresponding implemenatations using per non-gobject-type API.
* gtk/dragicon: Use private gtk_drag_icon_present() instead of GtkNativeJonas Ådahl2020-12-071-3/+7
| | | | | It didn't even use GtkNative, just the vfunc it set to the interface sturct.
* gtk: Allocate everything from GtkNativeClass::layoutJonas Ådahl2020-12-071-11/+13
| | | | | | | | | | | This changes allocation of the widget trees to happen as a side effect to the GdkSurface::layout signal, which first passes the GtkNative instance where it is then forwarded to the implementations of the GtkNative interface. The implementations of GtkNative are the ones doing the actual gtk_widget_allocate(), and they do so in their GtkNativeClass::layout function.
* wayland: Layout drag icon from GdkSurface::layoutJonas Ådahl2020-12-071-8/+12
|
* gtk/dragicon: Don't show until child is setJonas Ådahl2020-12-071-2/+6
| | | | | | Showing before the child would result in bogus gdk_drag_surface_present() with an "empty" (1x1) size. This can easily be avoided by postponing showing until there is anything to show.
* dragicon: Make a function propertly exportedMatthias Clasen2020-11-051-0/+1
| | | | | | | | Mark gtk_drag_icon_create_widget_for_value with GDK_AVAILABLE_IN_ALL, since it is meant to be public. Also, clarify the documentation a bit. Fixes: #3325
* gtk: Remove unused header includeBenjamin Otte2020-10-201-1/+0
| | | | | gtkcssnodeprivate.h was mainly used for repositioning CSS nodes in gadgets, and gadgets are gone now.
* Make GtkNativeInterface privateMatthias Clasen2020-08-141-1/+1
| | | | | We are not sure yet if allowing out-of-tree implementations of GtkNative are a good idea.
* Drop gtknativeprivate.hMatthias Clasen2020-06-071-1/+1
| | | | No need to ship empty headers.
* Change coordinate translation apis to take doublesMatthias Clasen2020-05-171-2/+2
| | | | | | Change gtk_widget_translate_coordinates and gtk_native_get_surface_transform to operate on doubles. Update all callers.
* natives: Use GtkCssBoxes in get_surface_transformTimm Bäder2020-05-161-9/+9
|
* Remove lots of focus vfuncsMatthias Clasen2020-05-111-2/+0
| | | | | In many cases, the default widget vfuncs work just fine, combined with setting focusable.
* dragicon: Derive from GtkWidgetMatthias Clasen2020-05-011-1/+1
| | | | This wasn't meant to derive from GtkContainer.
* Reinstate expected focus behaviorMatthias Clasen2020-04-091-0/+2
| | | | | | | | After the :can-focus change in the previous commit, widgets need to set suitable focus and grab_focus implementations to implement the desired focus behavior. This commit does that for all widgets.
* root: Reorganize focus handlingMatthias Clasen2020-04-091-8/+0
| | | | | Make :focus-widget a GtkWindow property and add vfuncs to the GtkRoot interface instead of the property.
* gtkdragicon: Use drag surface apiMatthias Clasen2020-03-121-4/+4
|
* Fix introspection warnings for GtkDragIconEmmanuele Bassi2020-03-031-1/+1
|
* dragicon: Add gtk_drag_icon_create_widget_for_value()Benjamin Otte2020-03-021-0/+64
| | | | ... and use it to set a drag icon.
* dragicon: Change how to acquire drag iconsBenjamin Otte2020-03-021-34/+32
| | | | | | | | Before, gtk_drag_icon_new_for_drag() allowed creating new drag icons. This could cause multiple drag icons to exist for a single drag. Now, gtk_drag_icon_get_for_drag() makes sure that only one drag icon is created.
* dragicon: Add GtkDragIcon::childBenjamin Otte2020-03-021-53/+80
|
* Ensure all natives request at least a 1px wide surfaceBenjamin Otte2020-02-221-3/+3
| | | | | | | | FIXME: Is this necessary? Could the surfaces just clamp to 1x1 themselves? We recently declared that surfaces can decide on whatever size they want so natives need to inspect the size they requested anyway.
* Use style values directlyMatthias Clasen2020-01-291-6/+6
| | | | | | | Replace uses of gtk_css_style_get_value with direct access, throughout the tree. We don't replace all uses, just those where we are dealing with a fixed property. Be careful to handle the currentColor special case for color properties.
* drag icon: Stop using style context gettersMatthias Clasen2020-01-251-10/+12
| | | | Just go to the css node directly.
* dragicon: Add docsMatthias Clasen2020-01-091-0/+34
|
* Make GtkDragIcon publicMatthias Clasen2020-01-081-0/+40
| | | | | This is needed if we want to use gdk_drag_begin for one-off drags, without a GtkDragSource.
* Add GtkDragIconMatthias Clasen2019-12-301-0/+398
This is a GtkRoot implemntation for drag icons, using the surface provided by GdkDrag. This lets us avoid GTK_WINDOW_POPUP and gtk_window_set_hardcoded_surface.