summaryrefslogtreecommitdiff
path: root/gtk/gtktextchild.c
Commit message (Collapse)AuthorAgeFilesLines
* gtk: Stop using g_sliceMatthias Clasen2023-03-141-4/+4
|
* 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/+1
| | | | | Include gtkprivate.h for I_() and glib-i18n.h for gettext macros.
* Restore the GtkTextchild abiMatthias Clasen2021-12-111-13/+30
| | | | | | Move the new chars field to a private struct. Fixes: #4531
* Add a missing since tagMatthias Clasen2021-12-101-26/+28
| | | | | gtk_text_child_anchor_new_with_replacement was recently added.
* textchildanchor: allow to specify replacement characterGeorg Vienna2021-12-031-9/+24
|
* textchild: Convert docsMatthias Clasen2021-03-111-16/+20
|
* Avoid diagnostics for gcc-11 false positive out of bounds accesseswip/kalev/gcc-11Kalev Lember2021-01-111-0/+14
| | | | | This is a patch by Jeff Law <law@redhat.com> done in downstream Fedora to fix the build with gcc 11.
* textview: Properly delete anchored childrenMatthias Clasen2020-09-161-2/+2
| | | | | | | | | | | When we remove anchors with widgets from the text buffer, we used to call gtk_widget_destroy(), which indirectly called gtk_container_remove() which cleared the child properly. When gtk_widget_destroy() was removed, we replaced the calls with gtk_widget_unparent(), but that is not enough. Explicitly call gtk_text_view_remove() instead - we know the parent is a text view.
* gtk: Documentation fixupsMatthias Clasen2020-06-051-0/+1
| | | | Document missing symbols, and other cleanups.
* Replace gtk_widget_destroy everywhereMatthias Clasen2020-05-111-1/+1
| | | | | Replace all remaining uses of gtk_widget_destroy by gtk_container_remove or g_object_unref.
* Annotate gtk_text_child_anchor_get_widgets() correctlyEmmanuele Bassi2020-05-061-2/+3
| | | | | | We switched from returning a list to returning a C array, which means we need to update the introspection annotation and the documentation to match the implementation.
* textchild: Return an array from get_widgetsTimm Bäder2020-05-051-6/+17
| | | | Yay, one GList less.
* textview: Use paintables instead of textures, and fix the supportAlexander Larsson2020-02-061-30/+87
| | | | | | | | 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.
* textview: Replace pixbufs by texturesMatthias Clasen2017-11-291-25/+25
| | | | | | | | 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.
* textview: Make the semi-private headrs really privateBenjamin Otte2017-11-111-2/+1
| | | | | | Rename the files to have the private.h ending. And remove gtktextdisplay.h from the installed files.
* Don't use g_slist_next in gtktextchild.cMatthias Clasen2015-10-201-2/+2
| | | | We generally use ->next directly.
* Code cleanupMatthias Clasen2015-07-311-10/+2
| | | | | | Use g_slist_free_full more consistently. This commit just converts the obvious cases where g_slist_forall is directly followed by g_slist_free.
* Remove more leftover &mdash;esMatthias Clasen2014-09-081-1/+1
| | | | These were leftover at various places in the documentation.
* GtkTextView: use GSlice to allocate GtkTextLineSegment'sSébastien Wilmet2014-04-131-11/+11
| | | | | | | | | | | | | | | | | | | | Use GSlice to allocate all types of segments: - char - toggle - mark - pixbuf - child widget Char segments are a bit more complicated because the length of the text is determined at run time and stored in the 'byte_count' field. If the text is long, GSlice will call the system malloc() anyway, so it's better to always use GSlice for GtkTextLineSegment. Toggle segments are also freed in gtktextbtree.c, hence the function _gtk_toggle_segment_free() (for a later commit it would be nice to rename those functions with the _gtk_text prefix). https://bugzilla.gnome.org/show_bug.cgi?id=727908
* docs: use Returns: consistentlyWilliam Jon McCann2014-02-191-3/+3
| | | | Instead of Return value:
* gtktextchild: replace hard-coded values by a macroSébastien Wilmet2013-05-121-5/+6
| | | | | | The macro already exists, so it's better to use it. https://bugzilla.gnome.org/show_bug.cgi?id=700007
* Get rid of the rest of variables exported from libgtkTor Lillqvist2010-09-081-3/+4
| | | | | | | | | | | | | | | | | | | | Especially the gtk_*_type ones in gtktexttypes.h were mentioned in gtk.symbols presumably by accident. That header isn't even installed, so no way can they be supposed to be public. gtk_text_attr_appearance_type is from the installed but "semi-private" gtktextlayout.h, so drop that one too from gtk.symbols for now. The use of gtk_text_unknown_char_utf8 is bit of a mess. Code in a few files knew implicitly that it is three bytes. Define a symbolic name for the length of it instead. Add an exported function gtk_text_unknown_char_utf8_gtk_tests_only() that returns a pointer to it just for the sake of gtk/tests/textbuffer.c. Prefix the variable with an underscore. I doubt the usefulness of the test_utf8() in textbuffer.c. If it could be dropped, gtk_text_unknown_char_utf8_gtk_tests_only() could be dropped, too.
* gtk/: fully remove gtkalias hacksJavier Jardón2010-07-101-4/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=623845
* [introspection] Merge in Gtk-custom.c annotationsColin Walters2009-12-161-3/+3
| | | | | | | | The Gtk-custom.c file in gir-repository contained a number of introspection annotations. Merge those into the GTK source files. Some documentation was moved from the tmpl/ files to accomodate the addition of annotations.
* Include "config.h" instead of <config.h> Command used: find -nameJohan Dahlin2008-06-221-1/+1
| | | | | | | | | | | | 2008-06-21 Johan Dahlin <jdahlin@async.com.br> * *.[ch]: Include "config.h" instead of <config.h> Command used: find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g' Rubberstamped by Mitch and Tim svn path=/trunk/; revision=20669
* gtk/gtktextchild.c meant to use G_STRFUNC, not G_STRLOC...Michael Natterer2008-01-281-2/+2
| | | | | | | | | | 2008-01-28 Michael Natterer <mitch@imendio.com> * gtk/gtktextchild.c * gtk/gtktextview.c: meant to use G_STRFUNC, not G_STRLOC... svn path=/trunk/; revision=19418
* gtk/gtktextchild.c use G_STRLOC instead of G_GNUC_FUNCTION (which isMichael Natterer2008-01-281-13/+15
| | | | | | | | | | | 2008-01-28 Michael Natterer <mitch@imendio.com> * gtk/gtktextchild.c * gtk/gtktextview.c: use G_STRLOC instead of G_GNUC_FUNCTION (which is deprecated now). svn path=/trunk/; revision=19416
* More of the sameMatthias Clasen2006-05-141-1/+1
|
* Boilerplate reductionMatthias Clasen2006-05-021-34/+3
|
* Fix a warning.Matthias Clasen2006-04-031-2/+2
| | | | | | | | | | | | | | | * gtk/gtktextlayout.c: Fix a warning. * gtk/gtktextsegment.h: * gtk/gtktextsegment.c: * gtk/gtktextchild.c: * gtk/gtktextbtree.c: * gtk/gtktextmark.c: * gtk/gtktexttypes.h: Make the segment class pointers const. * gtk/gtktextbufferserialize.c: Make parser struct const. * gtk/gtkuimanager.c: Make parser struct const.
* Intern some more strings.Matthias Clasen2005-09-011-2/+3
| | | | | | | | | 2005-09-01 Matthias Clasen <mclasen@redhat.com> * gdk/*.c: Intern some more strings. * gtk/gtkintl.h: * gtk/*.c: Define an I_() macro and use it instead of the bulky g_intern_static_string().
* Also intern static strings passed to g_object_set_data()Matthias Clasen2005-08-311-1/+1
|
* Intern type names in code generated by glib-mkenums, too.Matthias Clasen2005-08-311-1/+1
| | | | | | | | | | | | | 2005-08-31 Matthias Clasen <mclasen@redhat.com> * gdk/Makefile.am: * gtk/Makefile.am: Intern type names in code generated by glib-mkenums, too. * gtk/*.c: * gdk/x11/*.c: * gdk/*.c: Intern type names before registering the type to avoid unnecessary copies.
* Make PLT-reduction work with gcc4, and don't include everything inMatthias Clasen2005-03-201-2/+3
| | | | | | | | | | | | | | | | | | 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.
* Add hidden aliases for exported symbols which are used internally in orderMatthias Clasen2004-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mon Aug 9 12:48:04 2004 Matthias Clasen <maclas@gmx.de> Add hidden aliases for exported symbols which are used internally in order to get rid of many PLT entries. (#145519, Arjan van de Ven) * gtk/Makefile.am: Add rules to generate gtk.def and from gtk.symbols, and make make check check the abi with abicheck.sh. (gtk_private_h_sources): Add gtkinternals.h (gtk_built_private_headers): Add gtkalias.h (gtk_extra_sources): Add gtk.symbols (EXTRA_DIST): Add makegtkalias.pl and abicheck.sh * gtk/gtk.symbols: New file. Definition of the GTK+ ABI. The file can be processed by cpp to filter out certain subsets of symbols. * gtk/abicheck.sh: New file. Script to check the actually symbols exported from libgtk-x11.2.0.so against the symbols found in gtk.symbols. * gtk/makegtkalias.pl: New file. Perl script to generate the header containing the alias definitions for internally used exported symbols from a list of symbols. * gtk/gtkinternals.h: New file. An uninstalled header listing symbols which must be exported for some reason and do not appear in any other header. * gtk/*.c: Include gtkalias.h
* Fixes #136082 and #135265, patch by Morten Welinder.Federico Mena Quintero2004-03-061-0/+1
| | | | | | | | | | 2004-03-05 Federico Mena Quintero <federico@ximian.com> Fixes #136082 and #135265, patch by Morten Welinder. * configure.in: Use AC_SYS_LARGEFILE. * */*.c: #include <config.h>
* Add chains to the parent's ::finalize() handler (#134901, Morten Welinder,Matthias Clasen2004-02-221-0/+2
| | | | | | | | | | | | | | | | | | | | Sun Feb 22 03:03:29 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtkaction.c: (gtk_action_finalize): * gtk/gtkclipboard.c: (gtk_clipboard_finalize): * gtk/gtkentrycompletion.c: (gtk_entry_completion_class_init), (gtk_entry_completion_finalize): * gtk/gtkfilechooserwidget.c: (gtk_file_chooser_widget_finalize): * gtk/gtkfilesystemmodel.c: (gtk_file_system_model_class_init), (gtk_file_system_model_finalize): * gtk/gtkicontheme.c: (gtk_icon_theme_class_init), (gtk_icon_theme_finalize): * gtk/gtktextchild.c: (gtk_text_child_anchor_finalize): * gtk/gtkuimanager.c: (gtk_ui_manager_class_init), (gtk_ui_manager_finalize): * modules/input/gtkimcontextxim.c: (gtk_im_context_xim_finalize): Add chains to the parent's ::finalize() handler (#134901, Morten Welinder, patch by Jan Arne Petersen)
* Don't crash when finalizing an unused GtkTextChildAnchor. (#132260,Matthias Clasen2004-01-311-14/+17
| | | | | | | | Sat Jan 31 23:13:43 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtktextchild.c (gtk_text_child_anchor_finalize): Don't crash when finalizing an unused GtkTextChildAnchor. (#132260, muppet)
* Deprecation cleanupManish Singh2002-10-101-13/+10
| | | | | | | | Thu Oct 10 14:58:47 2002 Manish Singh <yosh@gimp.org> * gtk/gtkaccelgroup.c gtk/gtkarrow.[ch] gtk/gtkeventbox.[ch] gtk/gtkiconfactory.c gtk/gtkinvisible.[ch] gtk/gtktextchild.c: Deprecation cleanup
* Use == rather than = in sanity checks. Ouch!Daniel Elstner2002-02-091-6/+6
| | | | | | 2002-02-09 Daniel Elstner <daniel.elstner@gmx.net> * gtk/gtktextchild.c: Use == rather than = in sanity checks. Ouch!
* Add missing curled braces so that it doesn't always return. Also indentDaniel Elstner2002-02-091-2/+16
| | | | | | 2002-02-09 Daniel Elstner <daniel.elstner@gmx.net> * gtk/gtktextchild.c (CHECK_IN_BUFFER_RETURN): Add missing curled braces so that it doesn't always return. Also indent both CHECK_IN_BUFFER* macros properly, and make use of G_STMT_START/G_STMT_END.
* s/__FUNCTION__/G_GNUC_FUNCTION/ dittoLaszlo Peter2002-02-081-2/+2
| | | | | | | 2002-02-08 Laszlo Peter <laca@ireland.sun.com> * gtk/gtktextchild.c: s/__FUNCTION__/G_GNUC_FUNCTION/ * gtk/gtktextview.c: ditto
* Add warnings if you try to use a child anchor that isn't inside a buffer.Havoc Pennington2002-02-061-0/+13
| | | | | | | | | 2002-02-06 Havoc Pennington <hp@redhat.com> * gtk/gtktextchild.c: Add warnings if you try to use a child anchor that isn't inside a buffer. Really kind of lame; we should separate the anchor from the buffer. But not worth fixing for now. #70601
* move README.linux-fb in hereHavoc Pennington2002-01-011-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-01-01 Havoc Pennington <hp@pobox.com> * gtk/framebuffer.sgml: move README.linux-fb in here * gtk/tmpl/gtkpreview.sgml: explain what to use instead * gtk/tmpl/gtkseparator.sgml: typo fix * gtk/tmpl/gtkstock.sgml: add some overview docs * gtk/Makefile.am (content_files): add new files * gtk/changes-1.2.sgml: move Changes-1.2.txt in here * gtk/changes-2.0.sgml: move Changes-2.0.txt in here * gdk/tmpl/threads.sgml: mention gdk_threads_init() in the overview docs, copy in the examples from the FAQ * gtk/gtk-docs.sgml: change DTD to 3.1, and add question_index.sgml and changes-1.2, changes-2.0 * gtk/tmpl/gtkdrawingarea.sgml: fixups to reflect 2.0 changes * gtk/question_index.sgml: new section with question-based index of the manual * gtk/text_widget.sgml: fix some cross-references 2002-01-01 Havoc Pennington <hp@pobox.com> * docs/README.linux-fb: note that this file is obsolete * docs/Changes-2.0.txt, docs/Changes-1.2.txt: Add notes to these files that they should not be edited and look in the reference manual instead. Probably these files should just be replaced by the note, and their main contents deleted. * gtk/gtktextview.c: docs * gtk/gtktextmark.c: docs * gtk/gtktextchild.c: docs * gtk/gtktextbuffer.c: docs stuff * gtk/gtkclipboard.c (gtk_clipboard_get): fool with docs to maybe give people more leads in sorting out PRIMARY vs. CLIPBOARD
* add a #error unless you define GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API, soHavoc Pennington2001-10-221-0/+1
| | | | | | | | | 2001-10-22 Havoc Pennington <hp@redhat.com> * gtk/gtktextlayout.h: add a #error unless you define GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API, so people don't use this accidentally * gtk/gtktext*.c: #define GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API as appropriate.
* add insert_child_anchor signal, bug #50245Havoc Pennington2001-02-191-2/+11
| | | | | | | | | | | | | | | | | 2001-02-19 Havoc Pennington <hp@redhat.com> * gtk/gtktextbuffer.h (struct _GtkTextBufferClass): add insert_child_anchor signal, bug #50245 * gtk/gtktextbtree.c (_gtk_text_btree_insert_child_anchor): change from create_child_anchor, so the anchor is passed in * gtk/gtktextchild.c (gtk_text_child_anchor_new): new function (_gtk_widget_segment_new): have the child anchor object passed in, instead of creating it. * gtk/gtktextbuffer.c (gtk_text_buffer_modified): rename to gtk_text_buffer_get_modified
* General cleanup of the log attr iteration stuff. This should make e.g. theHavoc Pennington2000-12-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | 2000-12-16 Havoc Pennington <hp@pobox.com> * gtk/gtktextiter.c: General cleanup of the log attr iteration stuff. This should make e.g. the delete key work again in the text widget... (gtk_text_iter_forward_cursor_positions): handle negative count (gtk_text_iter_backward_cursor_positions): handle negative count (gtk_text_iter_forward_word_ends): handle negative count (gtk_text_iter_backward_word_starts): handle negative count * gtk/gtktextlayout.h, gtk/gtktextlayout.c, gtk/gtktexttag.h, gtk/gtktexttag.c, gtk/gtktexttagtable.h, gtk/gtktexttagtable.c, gtk/gtktextbuffer.h, gtk/gtktextbuffer.c: Convert everything to GObject. No doubt will cause breakage. * demos/gtk-demo/textview.c: remove hacks around non-GObject-ification of the text objects * demos/gtk-demo/main.c (main): use g_object_set() to manipulate the text tag
* Put _ in front of every function in this header fileHavoc Pennington2000-12-141-1/+1
| | | | | | | | | 2000-12-13 Havoc Pennington <hp@pobox.com> * gtk/gtktextbtree.h: Put _ in front of every function in this header file * gtk/gtktext*.[hc]: update to reflect renamed btree functions
* Handle chopping off \r\n and 0x2029 in addition to \n before passing toHavoc Pennington2000-12-111-1/+1
| | | | | | | | | | | | | | | | | | | 2000-12-11 Havoc Pennington <hp@redhat.com> * gtk/gtktextlayout.c (gtk_text_layout_get_line_display): Handle chopping off \r\n and 0x2029 in addition to \n before passing to PangoLayout * gtk/gtkimcontextsimple.c (gtk_im_context_simple_get_preedit_string): return an empty string if no match is pending * gtk/gtkimcontext.c (gtk_im_context_get_preedit_string): add assertion that the returned preedit string was sane * gtk/gtktext*.[hc], gtk/testtext.c, gtk/testtextbuffer.c: s/gtk_text_iter_next_char/gtk_text_iter_forward_char/g; s/gtk_text_iter_prev_char/gtk_text_iter_backward_char/g;