summaryrefslogtreecommitdiff
path: root/gdk/gdkcontentproviderimpl.c
Commit message (Collapse)AuthorAgeFilesLines
* *: Fix spelling mistakes found by codespellBjörn Daase2020-08-211-1/+1
|
* Fix minor typosYuri Chornoivan2020-06-181-1/+1
|
* clipboard: GdkContentProviderUnion should return after writing the first ↵Carlos Garcia Campos2020-05-071-0/+1
| | | | | | | matched format It continues trying with the other providers due to a missing early return.
* Small documentation fixesMatthias Clasen2020-03-141-1/+1
|
* Fix introspection annotation syntaxEmmanuele Bassi2020-02-261-1/+1
|
* Remove gdk_content_provider_new_with_formats()Benjamin Otte2020-02-181-164/+0
| | | | | See the removal of gdk_content_provider_new_with_callback() for a rationale.
* contentprovider: Add a union content providerBenjamin Otte2020-02-171-2/+276
|
* dnd: Remove gdk_content_provider_new_with_callback()Benjamin Otte2020-02-161-112/+0
| | | | | | | | | | | | | | | | Content providers are meant to be immutable, apart from very special cases, but in those cases they need to emit gdk_content_provider_content_changed(). Having a constructor that just uses a get_func invites abuse of this by not making developers aware of those requirments. In fact, all users in GTK failed to do this. Instead, code should use the GtkDragSource::prepare signal to create content providers when needed. The same problem exists with gdk_content_provider_new_with_formats(), but this commit doesn't touch that.
* contentprovider: Add gdk_content_provider_new_typed()Benjamin Otte2020-02-161-0/+40
| | | | | Gets around the boilerplate required to create and initialize a GValue by having this function doing it via G_VALUE_COLLECT().
* Add a notify function to GdkContentProviderEmmanuele Bassi2020-02-131-5/+53
| | | | | | The callback-based content providers need a GDestroyNotify function to free the data passed to them on construction, otherwise they are going to leak.
* Add missing (closure) GIR annotationsRobert Ancell2020-01-131-1/+1
|
* content provider impl: Take mime types into accountMatthias Clasen2020-01-081-2/+2
|
* Add another callback-based providerMatthias Clasen2020-01-081-0/+143
| | | | | | This one can be used in cases where data needs to be served in multiple formats that may not all be covered by content serializers.
* Add a generic callback content providerMatthias Clasen2020-01-081-0/+87
| | | | | | This one is convenient to use in cases where a drag is just serving an existing GType which is covered by content serializers.
* Allow binding GdkContentFormatsBuilderEmmanuele Bassi2018-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | GdkContentFormatsBuilder is currently not introspectable, as it does not have a GType. We can turn it into a boxed type, but we need to implement memory management for it. The current gdk_content_formats_builder_free() function returns a newly constructed value, so we cannot use it as a GBoxedFreeFunc; additionally copying a GdkContentFormatsBuilder contents would make it a bit odd, as you could get multiple identical GdkContentFormats out of the copies. A simple approach is to model the GdkContentFormatsBuilder API to follow the GBytes one: use reference counting for memory management, and have a function to release a reference, return a GdkContentFormats, and reset the GdkContentFormatsBuilder state. For language bindings, we can provide a get_formats() function that returns the GdkContentFormats instance and resets the builder instance, leaving the reference count untouched. For C convenience we can keep gdk_content_formats_builder_free(), and make it a wrapper around gdk_content_formats_builder_get_formats(), with the guarantee that it'll free the builder instance regardless of its current reference count. https://bugzilla.gnome.org/show_bug.cgi?id=793097 https://blogs.gnome.org/otte/2018/02/03/builders/
* Use Unicode quotation marks in new stringsPiotr Drąg2017-12-031-1/+1
| | | | | | See https://developer.gnome.org/hig/stable/typography.html https://bugzilla.gnome.org/show_bug.cgi?id=772371
* gdk: Add gdk_content_formats_new_for_gtype()Benjamin Otte2017-12-031-4/+1
| | | | | Many places create formats for a single tpye, so make it easy for them to get this without having to create a builder first.
* clipboard: Introduce GdkContentProviderBenjamin Otte2017-12-031-0/+285
GdkContentProvider is the object that represents local data in the clipboard. This patch only introduces the object and adds the clipboard properties, it does not yet provide a way for the actual implementations to access it. The only access that is implemented is the local shortcut GValue access.