summaryrefslogtreecommitdiff
path: root/gtk/gtktextbuffer.h
Commit message (Collapse)AuthorAgeFilesLines
* Hide GtkTextBTree's typedefEmmanuele Bassi2021-03-111-7/+0
| | | | It's a private type, and has no business in a public header.
* docs: Add missing fields to GtkTextBufferClassEmmanuele Bassi2020-12-021-0/+4
|
* gtk/gtktextbuffer: remove GtkTextBufferTargetInfoDavid Lechner2020-11-071-20/+0
| | | GtkTextBufferTargetInfo is not used anywhere and can be removed.
* textbuffer: Improve some get_iter apisMatthias Clasen2020-10-031-17/+17
| | | | | | | | | | | Make these functions return FALSE if they did not return the exact position that was requested. Adapt tests. Based on a patch by Sebastien Wilmet Fixes: #506
* Replace "gchar" with "char"Benjamin Otte2020-07-251-20/+20
|
* Replace "gint" with "int"Benjamin Otte2020-07-251-17/+17
|
* Match argument name between declaration and definitionEmmanuele Bassi2020-02-131-1/+1
| | | | Otherwise the documentation and the introspection data will complain.
* textview: Use paintables instead of textures, and fix the supportAlexander Larsson2020-02-061-6/+6
| | | | | | | | This changes gtk_text_buffer_insert_texture() to gtk_text_buffer_insert_paintable() which is strictly more useful (as textures are paintables). It also fixes the code to actually support drawing the paintables (as well as tracking changes to the paintables.
* textbuffer: Add a content provider apiMatthias Clasen2020-01-081-0/+4
| | | | | | We need a content provider for the selection, to implement DND, and the text buffer already has one. Just add an api to get it.
* textview: add undo/redo support to GtkTextViewChristian Hergert2019-11-051-3/+26
| | | | | | | | | | | | | | | | | | | This builds upon the GtkTextHistory helper to provide undo and redo support for the GtkTextView widget and GtkTextBuffer object. You can undo/redo using familiar shortcuts such as Primary+Z, Primary+Shift+Z, ad Primary+Y. Developers that wish to disable undo, should set the GtkTextBuffer:enable-undo property to FALSE. You can wrap irreversible actions gtk_text_buffer_begin_irreversible_action() and gtk_text_buffer_end_irreversible_action(). This will cause the undo stack to drop all undo/redo actions and the changes made between them will be the "initial state" of the buffer. Calling gtk_text_buffer_set_text() will do this automatically for you.
* The big versioning cleanupMatthias Clasen2018-02-061-1/+1
| | | | | | | 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.
* textview: Redo clipboard handlingBenjamin Otte2017-12-031-12/+6
| | | | | | Instead of using GtkClipboard and handling everything ourselves, we now put GtkTextBuffer into the GdkClipboard and register (de)serializers for text/plain.
* textview: Replace pixbufs by texturesMatthias Clasen2017-11-291-15/+10
| | | | | | | | This affects a few apis, such as gtk_text_iter_get_pixbuf, gtk_text_buffer_insert_pixbuf and GtkTextBuffer::insert-pixbuf, which have all been replaced by texture equivalents. Update all callers.
* contentformats: Rename GtkTargetListBenjamin Otte2017-11-201-2/+2
| | | | It's now called GdkContentsFormat
* Revert "textbuffer: nicer get_iter functions"Matthias Clasen2015-11-121-17/+17
| | | | | | | | This reverts commit a9a1c00cc9255ee9a7f73695f69abe172cde7bfa. Unfortunately, adding the boolean return broke both the python and javascript bindings, since they now return a tuple consisting of the boolean and the out argument.
* textbuffer: nicer get_iter functionsSébastien Wilmet2015-10-161-17/+17
| | | | | | | | | | | | Avoid crashes when passing an invalid location to a gtk_text_buffer_get_iter_at_*() function. A boolean is returned to know if @iter has been set to the exact location. Unit tests are added. https://bugzilla.gnome.org/show_bug.cgi?id=735341
* Split off a private header for GtkTextBufferMatthias Clasen2015-10-151-27/+0
| | | | This avoids polluting the installed header with private symbols.
* Allow inserting Pango markup in text buffersMatthias Clasen2014-12-041-0/+6
| | | | | | This has been a very long-standing feature request. https://bugzilla.gnome.org/show_bug.cgi?id=59390
* docs: documentation for GtkTextBufferClassSébastien Wilmet2014-10-181-38/+56
| | | | It'll most probably be more useful in the near future.
* docs: use proper quotesWilliam Jon McCann2014-02-051-1/+1
|
* docs: use ` instead of <literal>William Jon McCann2014-02-041-1/+1
|
* docs: add docs GtkTextBufferTargetInfoWilliam Jon McCann2014-01-211-4/+11
|
* Add annotations to gtk headersMatthias Clasen2013-05-051-0/+62
| | | | Add annotations to all exported functions in GTK+ headers.
* Move single-include guards inside include guardsMatthias Clasen2012-12-281-3/+3
| | | | | | 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
* Change FSF AddressJavier Jardón2012-02-271-3/+1
|
* GtkTextBuffer: Add accessible apiMatthias Clasen2011-07-051-0/+16
| | | | | | These functions match closely to the AtkText interface; they will be used in the GtkTextView accessible implementation. Keep them private for now.
* [GI] Make argument names in vfunc decls consistent with invoker docsPavel Holejsovsky2011-01-181-8/+8
|
* Add padding to class structsMatthias Clasen2010-10-191-1/+0
|
* Move GtkTextBuffer sealed attributes to private struct.Ignacio Casal Quinteiro2010-07-171-16/+2
|
* Remove all traces of GDK_PIXBUF/GTK_DISABLE_SINGLE_INCLUDESMichael Natterer2010-05-031-1/+1
| | | | ...and disallow inclusion of individual files unconditionally.
* Bug 492794 – Pasting external text at end of view yields wrong scrollingPaolo Borelli2009-01-121-1/+3
| | | | | | | | | | | | | | | | | 2009-01-12 Paolo Borelli <pborelli@katamail.com> Bug 492794 – Pasting external text at end of view yields wrong scrolling to mark * gtk/gtktextbuffer.[ch]: * gtk/gtktextview.c: Add a "paste-done" signal and use it to propelry scroll the view at the end of the pasted text in the case of an async paste. Patch by Ignacio Casal Quintero based on a patch by Yevgen Muntyan. svn path=/trunk/; revision=22100
* Revert name changeCody Russell2008-07-011-1/+1
| | | | svn path=/trunk/; revision=20724
* Practically everything changed.Cody Russell2008-06-301-1/+1
| | | | | | | | | | | | | 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
* Switch to "guint GSEAL (foo) : width;" when packing fields in guints.Tim Janik2008-06-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gtk/gtkbox.h: * gtk/gtkbutton.h: * gtk/gtkcellrenderer.h: * gtk/gtkcellrenderertext.h: * gtk/gtkcheckmenuitem.h: * gtk/gtkcontainer.h: * gtk/gtkentry.h: * gtk/gtkhandlebox.h: * gtk/gtkimcontextsimple.h: * gtk/gtklabel.h: * gtk/gtkliststore.h: * gtk/gtkmenu.h: * gtk/gtkmenuitem.h: * gtk/gtkmenushell.h: * gtk/gtknotebook.h: * gtk/gtkpaned.h: * gtk/gtkplug.h: * gtk/gtkprintjob.h: * gtk/gtkprogressbar.h: * gtk/gtkrange.h: * gtk/gtkscale.h: * gtk/gtkscrolledwindow.h: * gtk/gtksizegroup.h: * gtk/gtksocket.h: * gtk/gtkspinbutton.h: * gtk/gtkstatusbar.h: * gtk/gtktable.h: * gtk/gtktearoffmenuitem.h: * gtk/gtktextbuffer.h: * gtk/gtktextview.h: * gtk/gtktogglebutton.h: * gtk/gtktoolbar.h: * gtk/gtktreestore.h: * gtk/gtktreeviewcolumn.h: * gtk/gtkwindow.h: Do not specify width inside GSEAL() when packing fields in guints. svn path=/trunk/; revision=20621
* Seal GtkTextBuffer.Tim Janik2008-06-201-8/+8
| | | | svn path=/trunk/; revision=20598
* whitespace cleanup: remove trailing whitespace and excess newlines andMichael Natterer2008-05-281-3/+3
| | | | | | | | | | | 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
* define __GTK_H_INSIDE__ around including all other headers.Michael Natterer2008-05-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Allow to separate GtkTextMark creation from buffer insertion. (#132818,Matthias Clasen2007-05-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | 2007-05-25 Matthias Clasen <mclasen@redhat.com> Allow to separate GtkTextMark creation from buffer insertion. (#132818, Gustavo Giráldez, patch by Yevgen Muntyan) * gtk/gtktextmarkprivate.h: * gtk/gtktextmark.[hc] (gtk_text_mark_new): New function to create a GtkTextMark. * gtk/gtktextbuffer.[hc] (gtk_text_buffer_add_mark): New function to add an existing mark to a buffer. * gtk/gtktextbtree.c: Allow adding existing marks. * gtk/gtk.symbols: Add new functions. * tests/testtextbuffer.c: Add some tests for new mark functionality. svn path=/trunk/; revision=17922
* changed values from G_MAXUINT-0, -1, -2 to -1, -2, -3 so we stay withinMichael Natterer2007-02-051-3/+3
| | | | | | | | | | | 2007-02-05 Michael Natterer <mitch@imendio.com> * gtk/gtktextbuffer.h (enum GtkTextBufferTargetInfo): changed values from G_MAXUINT-0, -1, -2 to -1, -2, -3 so we stay within ansi C enum value limits. Fixes bug #46757. svn path=/trunk/; revision=17260
* count down from G_MAXUINT to avoid clashes with application-added DNDMichael Natterer2006-03-221-3/+6
| | | | | | | | | | | | | | | | | 2006-03-22 Michael Natterer <mitch@imendio.com> * gtk/gtktextbuffer.h (enum GtkTextBufferTargetInfo): count down from G_MAXUINT to avoid clashes with application-added DND targets. * gtk/gtktextview.c (gtk_text_view_init): set an empty GtkTargetList on the drag_dest so it is not NULL when a derived class' init() function is called. (gtk_text_view_target_list_notify): copy the text buffer's paste targets into the view's destinstion target list (preserving application-added DND targets), instead of replacing the view's target list. Fixes bug #334399.
* Add infrastructure for copy/paste and DND of rich text for GtkTextBuffer.Michael Natterer2006-03-071-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add a has-selection propertyMatthias Clasen2005-10-071-0/+4
|
* Remove G_GNUC_NULL_TERMINATED here as well.Matthias Clasen2005-08-011-1/+1
| | | | | | | | 2005-08-01 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextbuffer.h: * gtk/gtk.symbols: Remove G_GNUC_NULL_TERMINATED here as well.
* Make PLT-reduction work with gcc4, and don't include everything inMatthias Clasen2005-03-201-8/+4
| | | | | | | | | | | | | | | | | | 2005-03-20 Matthias Clasen <mclasen@redhat.com> Make PLT-reduction work with gcc4, and don't include everything in gdkalias.h: * gtk/grk.symbols: Group symbols by header and source file. * gtk/makegtkalias.pl: Protect definitions by the same preprocessor symbols used to guard the headers. Move the alias declarations to a separate file which is produced when calling makegtkalias.pl -def * gdk/Makefile.am (gtkaliasdef.c): Add a rule to generate this file. * gtk/*.c: Include gtkalias.h after the other headers, include gtkaliasdef.c at the bottom. * gtk/*.h: Small cleanups.
* Use G_GNUC_NULL_TERMINATED where appropriate. (#165682, Marc Meissner)Matthias Clasen2005-03-081-3/+3
| | | | | | | | | | | | | | | | 2005-03-08 Matthias Clasen <mclasen@redhat.com> * gtk/gtkwidget.h: * gtk/gtktreeview.h: * gtk/gtktreeviewcolumn.h: * gtk/gtktextbuffer.h: * gtk/gtkobject.h: * gtk/gtkfilechooserdialog.h: * gtk/gtkdialog.h: * gtk/gtkcontainer.h: * gtk/gtkcelllayout.h: * gtk/gtkaboutdialog.h: Use G_GNUC_NULL_TERMINATED where appropriate. (#165682, Marc Meissner)
* #155952Owen Taylor2004-10-211-7/+9
| | | | | | | | | | | | | | | Thu Oct 21 15:01:09 2004 Owen Taylor <otaylor@redhat.com> #155952 * gtk/gtkentry.c: Fix checking the wrong position for the backspace_deletes_character PangoLogAttr. * gtk/gtktextbuffer.[ch] gtk/gtk.symbols (gtk_text_buffer_backspace): Move backspace logic from GtkTextView to here, check backspace_deletes_char. * gtk/gtktextview.c: Use gtk_text_buffer_backspace().
* Implement a utility function proposed in #102534:Matthias Clasen2003-01-061-1/+4
| | | | | | | | | | | | | | | | 2003-01-06 Matthias Clasen <maclas@gmx.de> Implement a utility function proposed in #102534: * gtk/gtktextbtree.h: * gtk/gtktextbtree.c (_gtk_text_btree_select_range): New function. (_gtk_text_btree_place_cursor): Now a simple wrapper around _gtk_text_btree_select_range(). * gtk/gtktextbuffer.h: * gtk/gtktextbuffer.c (gtk_text_buffer_select_range): New function. (gtk_text_buffer_place_cursor): Now a simple wrapper around gtk_text_buffer_select_range().
* Massive padding addition to class structures.Owen Taylor2002-02-231-6/+7
| | | | | | | | Sat Feb 23 11:54:12 2002 Owen Taylor <otaylor@redhat.com> * gtk/*.h gdk/*.h: Massive padding addition to class structures. * gtk/gtktextmark.h: Fix a FIXME about G_CONST_RETURN.
* remove g_assert_not_reached() that was bogus, since we demand-create theHavoc Pennington2001-12-051-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-12-04 Havoc Pennington <hp@redhat.com> * gtk/gtktextbtree.c (gtk_text_btree_remove_tag_info): remove g_assert_not_reached() that was bogus, since we demand-create the tag info. reported by Chris Phelps Jump through assorted hoops to fix bug from Chris Phelps where removing tags from the table resulted in btree trying to access tag->table * gtk/gtktextbuffer.c: set up mechanics of adding/removing ourselves to the tag table * gtk/gtktexttagtable.c (_gtk_text_tag_table_add_buffer) (_gtk_text_tag_table_remove_buffer): private cruft to let us notify buffer of disappearing tags * gtk/gtktexttag.h: remove BTreeNode typedef from this public header, put it in tagprivate * gtk/gtktextbtree.c (_gtk_text_btree_new): don't connect to tag_removed; it's emitted too late. (_gtk_text_btree_notify_will_remove_tag): rename tag_remove_cb to this Padding for ABI-compat expansion * gtk/gtktexttag.h (struct _GtkTextAttributes): pad this (struct _GtkTextAppearance): one pad in here too * gtk/gtktextlayout.h (struct _GtkTextLayoutClass): padding here * gtk/gtktextview.h (struct _GtkTextViewClass): more padding, since action signals etc. seem pretty likely * gtk/gtktextbuffer.h (struct _GtkTextBufferClass): padding * gtk/gtktexttag.h (struct _GtkTextTagClass): padding * gtk/gtktexttagtable.h (struct _GtkTextTagTableClass): padding
* Instead of always mirroring the selection to a single PRIMARY selection,Owen Taylor2001-08-311-5/+13
| | | | | | | | | | | | | | | | | Wed Aug 29 20:40:58 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtktextbuffer.[ch] (gtk_text_buffer_add/remove_selection_clipboard): Instead of always mirroring the selection to a single PRIMARY selection, allow it to be mirrored to any number of clipboards. * gtk/gtktextbuffer.[ch] (gtk_text_buffer_paste_primary): Remove, just use gtk_text_buffer_paste_clipboard with the appropriate clipboard. * gtk/gtktextbuffer.[ch] (gtk_text_buffer_cut/copy/paste_clipboard): Add a GtkClipboard argument, and for paste_clipboard, the @override_location argument from @paste_primary. * gtk/gtktextview.c: Adapt to above change.