Commit Graph

80 Commits

Author SHA1 Message Date
Benjamin Otte
b64a403100 selection: Remove surface APIs 2018-03-16 06:04:45 +01:00
Matthias Clasen
4c150d8eb5 The big versioning cleanup
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.
2018-02-06 01:16:32 -05:00
Benjamin Otte
b49a9b9933 dnd: Remove gdk_drag_get_selection()
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.
2017-12-14 04:39:22 +01:00
Benjamin Otte
54f9aef0d4 gdk: Remove gdk_selection_convert()
It's not used anymore.
2017-12-14 00:44:26 +01:00
Benjamin Otte
4042d5f242 gdk: Remove ability to own a selection
With this, the GDK_EVENT_SELECTION_REQUEST and GDK_EVENT_SELECTION_CLEAR
and the associated GtkWidget signals are gone, too.
2017-12-13 23:39:02 +01:00
Benjamin Otte
b66052f3ce gdk: Remove gdk_selection_add_targets()
It's not needed anymore, now that we can look at the content provider's
formats.

Alose remove all the API in GTK that was used to set it.
2017-12-13 19:27:51 +01:00
Benjamin Otte
20de4c86ad selection: Add texture getter/setter 2017-12-02 16:21:58 +01:00
Benjamin Otte
3d4743ee62 textview: Remove serialization API
It's unused. Plain text is not using that framework, neither is
in-process same-display transmission.

So it was only useful for sharing text with custom tags across
applications, and nobody is doing that.
2017-11-29 23:03:33 -05: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
0638bbb5d5 gdk: Move GtkTargetList to GDK
It's gonna be renamed next, so put it in the right source file already.

For now retain the old name to keep the diff small.
2017-11-20 23:12:33 +01:00
Benjamin Otte
0b40ad32f3 selection: Make GtkTargetList members private
Outside of the target list, don't access it directly, instead use public
APIs like the newly introduced gtk_target_list_intersects().
2017-11-20 23:12:33 +01:00
Benjamin Otte
c863ac0f90 dnd: Remove GtkTargetEntry and GtkTargetFlags
warning: We don't do any same-app checks anymore so you currently can
copy local data into external apps.

This will be fixed later.
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
Benjamin Otte
5da3059175 selection: Remove gtk_target_table_*() functions 2017-11-16 22:59:42 +01:00
Benjamin Otte
47e75b34a4 selection: Make GtkTargetEntry not allocatable
And remove it being registered as a boxed type (lol).
2017-11-16 22:59:42 +01:00
Benjamin Otte
7efc5a1558 clipboard: Consistently use GtkTargetList
Some code was using GtkTargetList, some used GtkTargetEntry and some
GtkTargetPair.
2017-11-15 19:07:16 +01:00
Matthias Clasen
27e89c69cd selection: Add another surface api
Of course, we need a getter too.
2017-10-23 05:58:54 +02:00
Matthias Clasen
ad00108678 selection: Add surface based apis
Add gtk_selection_data_set_surface.
2017-10-22 22:22:44 +02:00
Matthias Clasen
6ac7b54378 dnd: Move GtkDragDest to a separate file
This follows what was done for GtkDragSource in
415030d25f and shaves another
500 lines off gtkdnd.c.
2016-03-25 15:37:20 -04:00
William Jon McCann
22586ea7c2 docs: use #*-struct instead of <structname> 2014-01-27 19:59:55 -05:00
William Jon McCann
29f2578cca docs: add docs for GtkTargetPair 2014-01-20 15:18:21 -05:00
Matthias Clasen
20c8c8b91c Add annotations to gtk headers
Add annotations to all exported functions in GTK+ headers.
2013-05-05 15:38:47 -04:00
Marc-André Lureau
1568204159 Fix a small typo s/parater/parameter 2013-02-06 17:26:15 +01:00
Matthias Clasen
5adecf183b Move single-include guards inside include guards
gcc has optimizations for include guards that only work
if they are outermost in the the header.
https://bugzilla.gnome.org/show_bug.cgi?id=689810
2012-12-28 09:57:56 -05:00
Cosimo Cecchi
f70fc49ebc docs: fix a number of typos and obsolete references 2012-07-02 10:41:11 -04:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Matthias Clasen
abc8ac1a8b Move GtkSelection docs inline
At the same time, move private selection API to gtkselectionprivate.h
2011-01-14 19:20:56 -05:00
Matthias Clasen
c7f39eb07e add gtk_selection_data_get_data_with_length API which can be bound
* gtk_selection_data_get_data can't be bound because we need to know the length
  of data inorder to marshal it

https://bugzilla.gnome.org/show_bug.cgi?id=635299
2011-01-03 12:13:30 -05:00
Javier Jardón
26a304c54b Move GtkSelectionData to a private header 2010-12-19 20:48:20 +00:00
Benjamin Otte
d50c582961 selection: constify GtkSelectionData getters 2010-12-17 16:47:57 +01:00
Matthias Clasen
9c1e61e9aa Revert c00b85bf3f
This needs more work, currently we do dupe targets when copying
target entries in various places, and consequently free them
later. To do this correctly, the strings need to be interned
or something like that.
2010-11-29 13:00:04 -05:00
Michael Natterer
c00b85bf3f Bug 565665 - GtkTargetEntry member target should be const char * 2010-11-24 21:01:45 +01:00
Colin Walters
18578b33c5 Add boxed type and constructor
This allows bindings to sanely construct these.

https://bugzilla.gnome.org/show_bug.cgi?id=632095
2010-10-15 13:54:37 -04:00
Michael Natterer
5e29973773 Remove all traces of GDK_PIXBUF/GTK_DISABLE_SINGLE_INCLUDES
...and disallow inclusion of individual files unconditionally.
2010-05-03 01:51:18 +02:00
Christian Dywan
6513947473 Prefix gtk_selection_clear with an underscore 2010-05-03 01:39:50 +02:00
Michael Natterer
3544c28133 no need to include <gtk/gtkenums.h> in headers which somehow include
2008-10-30  Michael Natterer  <mitch@imendio.com>

	* gtk/*.h: no need to include <gtk/gtkenums.h> in headers which
	somehow include gtkobject.h or another header which includes it.


svn path=/trunk/; revision=21734
2008-10-30 16:34:16 +00:00
Torsten Schönfeld
0697bb7942 Add gtk_selection_data_get_selection to retrieve the sealed struct field
GtkSelectionData.selection.

svn path=/trunk/; revision=21564
2008-10-01 18:53:49 +00:00
Matthias Clasen
9eae7a1d2e Split gtk_selection_data_get_data into gtk_selection_data_get_data and
2008-08-29  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtk.symbols:
        * gtk/gtkselection.[hc]: Split gtk_selection_data_get_data into
        gtk_selection_data_get_data and gtk_selection_data_get_length.
        Proposed by Owen Taylor.


svn path=/trunk/; revision=21232
2008-08-29 04:16:56 +00:00
Christian Dywan
41cef8545b Bug 549734 – gtk_selection_data_get_data prototype is wrong
2008-08-28  Christian Dywan  <christian@imendio.com>

	Bug 549734 – gtk_selection_data_get_data prototype is wrong

	* gtk/gtkselection.[ch] (gtk_selection_data_get_data): make the
	'length' argument of gtk_selection_data_get_data a 'gint', that's
	what it should be.


svn path=/trunk/; revision=21229
2008-08-28 17:50:52 +00:00
Cody Russell
57223c9a05 Revert name change
svn path=/trunk/; revision=20724
2008-07-01 22:57:50 +00:00
Cody Russell
fce9c8b7d4 Practically everything changed.
2008-06-30  Cody Russell  <bratsche@gnome.org>

        * Practically everything changed.

        Change	all references	of GIMP	Toolkit	(and variations	of it)
        to GTK+	Toolkit, showing no mercy at all to our	beloved
	ancestry. (#540529)


svn path=/trunk/; revision=20709
2008-06-30 23:01:56 +00:00
Michael Natterer
5390e1e24c properly indent the newly added GtkSelectionData accessors. Some newlines
2008-06-28  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkselection.h: properly indent the newly added
	GtkSelectionData accessors. Some newlines can't hurt either.


svn path=/trunk/; revision=20702
2008-06-28 17:02:20 +00:00
Michael Natterer
f87182ac43 gtk/gtkaccellabel.h gtk/gtkactiongroup.h gtk/gtkalignment.h gtk/gtkarrow.h
2008-06-20  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkaccellabel.h
	* gtk/gtkactiongroup.h
	* gtk/gtkalignment.h
	* gtk/gtkarrow.h
	* gtk/gtkaspectframe.h
	* gtk/gtkbin.h
	* gtk/gtkhandlebox.h
	* gtk/gtkprogressbar.h
	* gtk/gtkrange.h
	* gtk/gtkscale.h
	* gtk/gtkscalebutton.h
	* gtk/gtkselection.h: fix some formatting and spacing uglyness
	that got merged from the GSEAL branch.


svn path=/trunk/; revision=20643
2008-06-20 14:17:00 +00:00
Tim Janik
016d891708 Remove superflous gtkselection accessors and merge _get_data
svn path=/trunk/; revision=20628
2008-06-20 11:10:31 +00:00
Tim Janik
0e072ea8be Implement gtk_selection_get_display, style fixes
svn path=/trunk/; revision=20627
2008-06-20 11:10:26 +00:00
Tim Janik
161f29ca55 Seal GtkSelectionData
svn path=/trunk/; revision=20619
2008-06-20 11:09:36 +00:00
Michael Natterer
2c5f8a5c2b whitespace cleanup: remove trailing whitespace and excess newlines and
2008-05-28  Michael Natterer  <mitch@imendio.com>

	* gtk/gtk*.h: whitespace cleanup: remove trailing whitespace and
	excess newlines and sprinkled some newlines where needed. Zero
	code or formatting changes included.


svn path=/trunk/; revision=20225
2008-05-28 15:35:43 +00:00
Michael Natterer
eff99c282c define __GTK_H_INSIDE__ around including all other headers.
2008-05-28  Michael Natterer  <mitch@imendio.com>

	* gtk/gtk.h: define __GTK_H_INSIDE__ around including all other
	headers.

	* gtk/gtktypebuiltins.h.template
	* gtk/gtkversion.h.in
	* gtk/gtk*.h: add single-include guards that #error out if
	GTK_DISABLE_SINGLE_INCLUDES is defined and any of these files is
	included individually.

	* gtk/gtkprintbackend.h
	* gtk/gtkprinter-private.h
	* gtk/gtktextlayout.h
	* gtk/gtktexttagprivate.h
	* gtk/gtktexttypes.h
	* gtk/gtktreedatalist.h: include <gtk/gtk.h> instead of individual
	headers in these private or semi-private headers.

	* gtk/gtkimmodule.h: also here because it's not in gtk.h.

	* gtk/gtkpagesetupunixdialog.h
	* gtk/gtkprinter.h
	* gtk/gtkprintjob.h
	* gtk/gtkprintunixdialog.h: likewise in the gtkunixprint headers.

	* gtk/gtkclist.h
	* gtk/gtkcombo.h
	* gtk/gtkctree.h
	* gtk/gtkfilesel.h
	* gtk/gtkitemfactory.h
	* gtk/gtklist.h
	* gtk/gtklistitem.h
	* gtk/gtkoldeditable.h
	* gtk/gtkoptionmenu.h
	* gtk/gtkpixmap.h
	* gtk/gtkpreview.h
	* gtk/gtksignal.h
	* gtk/gtktipsquery.h: whenever possible, include only <gtk/gtk.h>
	instead of individual headers in these deprecated headers. They
	don't get included at all when GTK_DISABLE_DEPRECATED is defined,
	so if an app needs them anyway, it must undef GTK_DISABLE_DEPRECATED
	and include them individually, which should continue to work.

	* gtk/gtkclist.c: include "gtkctree.h" because of the change
	above.


svn path=/trunk/; revision=20221
2008-05-28 15:07:04 +00:00
Michael Natterer
6c1d990adc Add infrastructure for copy/paste and DND of rich text for GtkTextBuffer.
2006-03-07  Michael Natterer  <mitch@imendio.com>

	Add infrastructure for copy/paste and DND of rich text for
	GtkTextBuffer. Fixes bug #324177.

	* gtk/gtktextbufferrichtext.[ch]: new files implementing a
	per-buffer registry of rich text formats.

	* gtk/gtk.h: #include gtktextbufferrichtext.h

	* gtk/gtktextbufferserialize.[ch]: new files implementing an
	internal serialization format that can handle all of a text
	buffer's tags and pixbufs. It's not useful for anything except
	tranfer between instances of GtkTextBuffer (Anders Carlsson).

	* gtk/Makefile.am: build the new files.

	* gtk/gtkclipboard.[ch]: added convenience APIs for rich text,
	just as they exist for plain text and pixbufs.

	* gtk/gtkselection.[ch]: added rich text convenience APIs here
	too.  Return the target list from gtk_target_list_ref(). Register
	GtkTargetList as boxed type. Added
	gtk_target_table_new_from_list() and gtk_target_table_free(),
	which make converting between GtkTargetList and arrays of
	GtkTargetEntry considerably easier.

	* gtk/gtktextutil.[ch]: added _gtk_text_util_create_rich_drag_icon()
	which creates a fancy rich text icon (Matthias Clasen).

	* gtk/gtktextbuffer.[ch]: use all the new stuff above and
	implement copy and paste of rich text. Added APIs for getting the
	target lists used for copy and paste. Added public enum
	GtkTextBufferTargetInfo which contains the "info" IDs associated
	with the entries of the target lists.

	* gtk/gtktextview.c: use the new rich text APIs and
	GtkTextBuffer's new target list API to enable DND of rich text
	chunks.

	* gtk/gtk.symbols: export all the new symbols added.

	* tests/testtext.c: added rich text testing stuff.
2006-03-07 13:46:11 +00:00