summaryrefslogtreecommitdiff
path: root/gtk/gtktextview.h
Commit message (Collapse)AuthorAgeFilesLines
* 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-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 GtkTextView.Tim Janik2008-06-201-48/+48
| | | | svn path=/trunk/; revision=20616
* whitespace cleanup: remove trailing whitespace and excess newlines andMichael Natterer2008-05-281-9/+7
| | | | | | | | | | | 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
* Move "move-focus" signals from several widgets to GtkWidget to enable moreMichael Natterer2007-06-041-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | 2007-06-04 Michael Natterer <mitch@imendio.com> Move "move-focus" signals from several widgets to GtkWidget to enable more flexible costomization of keyboard navigation via bindings. Fixes bug #414947. * gtk/gtkwidget.c: add "move-focus" binding signal, default to calling the toplevel GtkWindow's "move-focus" vfunc. * gtk/gtktextview.[ch] * gtk/gtkwindow.[ch]: remove "move-focus" signals and add compat code that makes sure that both emitting the signal on the widget and overriding the virtual functions keeps working as before. * gtk/gtktoolbar.c: remove "move-focus" signal here too and use GtkWidget's signal. This change slightly changes keyboard navigation in toolbars. I'll fix the behavior if somebody can explain me if and how exactly the new behavior is broken. svn path=/trunk/; revision=18025
* If the horizontal adjustment changes because of a change in the layoutAnders Carlsson2005-05-181-3/+2
| | | | | | | | | | | 2005-05-18 Anders Carlsson <andersca@imendio.com> * gtk/gtktextview.c: (gtk_text_view_flush_scroll), (gtk_text_view_update_adjustments), (gtk_text_view_value_changed): * gtk/gtktextview.h: If the horizontal adjustment changes because of a change in the layout width, then do a complete redraw. This is because there might be right-aligned or centered text that needs to be redrawn.
* Make PLT-reduction work with gcc4, and don't include everything inMatthias Clasen2005-03-201-9/+5
| | | | | | | | | | | | | | | | | | 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.
* Fix #111031, reported by Padraig O'Briain:Matthias Clasen2004-12-081-0/+5
| | | | | | | | | | | | | | | | | | 2004-12-08 Matthias Clasen <mclasen@redhat.com> Fix #111031, reported by Padraig O'Briain: * gtk/gtktextlayout.h: * gtk/gtktextlayout.c (gtk_text_layout_get_iter_at_position): Add a variant of gtk_text_layout_get_iter_at_pixel() which returns the character at the position, not the closest cursor position. * gtk/gtktextview.h: * gtk/gtktextview.c (gtk_text_view_get_iter_at_position): Add a variant of gtk_text_view_get_iter_at_location() which returns the character at the position, not the closest cursor position.
* Add a new binding signal ::backspace, bind it to the backspace key, andMatthias Clasen2004-08-021-1/+1
| | | | | | | | | | | Mon Aug 2 01:30:03 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtktextview.[hc]: * gtk/gtkentry.[hc]: Add a new binding signal ::backspace, bind it to the backspace key, and make it pay attention to the Pango backspace_deletes_character attribute. (#119891, Noah Levitt, patch by Theppitak Karoonboonyanan)
* rename property tab_moves_focus to accepts_tab. (#122709 again).Soeren Sandmann2003-09-271-4/+4
| | | | | | | Sat Sep 27 16:02:40 2003 Soeren Sandmann <sandmann@daimi.au.dk> * gtk/gtktextview.[ch]: rename property tab_moves_focus to accepts_tab. (#122709 again).
* Add new "tab moves focus" property (#122709)Soeren Sandmann2003-09-211-3/+7
| | | | | | Sun Sep 21 23:13:37 2003 Soeren Sandmann <sandmann@daimi.au.dk> * gtk/gtktextview.[ch]: Add new "tab moves focus" property (#122709)
* Install boolean property "overwrite". (gtk_text_view_[gs]et_property):Matthias Clasen2003-06-091-0/+3
| | | | | | | | | | 2003-06-10 Matthias Clasen <maclas@gmx.de> * gtk/gtktextview.c (gtk_text_view_class_init): Install boolean property "overwrite". (gtk_text_view_[gs]et_property): Handle "overwrite". * gtk/gtktextview.[hc] (gtk_text_view_[gs]et_overwrite): Getter and setter for "overwrite" property. (#110241, Jeroen Zwartepoorte)
* Never scroll on focus in (#81893, Patch from Paolo Maggi)Owen Taylor2003-06-051-5/+3
| | | | | | | | | | | | Thu Jun 5 16:52:54 2003 Owen Taylor <otaylor@redhat.com> * gtk/gtktextview.[ch]: Never scroll on focus in (#81893, Patch from Paolo Maggi) * gtk/gtktextview.c (gtk_text_view_scroll_[h]pages): Scroll to the current cursor location before handling the action, in case the user just tabbed in and the cursor is offscreen.
* Add a comment that the just_selected_element is unused.Matthias Clasen2003-01-061-3/+6
| | | | | | | | | | | | | | | | | 2003-01-07 Matthias Clasen <maclas@gmx.de> * gtk/gtktextview.h (struct _GtkTextView): Add a comment that the just_selected_element is unused. * gtk/gtktextview.c (extend_selection): New helper function to find the range that should be added to the selection. (selection_motion_event_handler): (gtk_text_view_start_selection_drag): (gtk_text_view_end_selection_drag): (selection_motion_event_handler): (selection_scan_timeout): Support select-by-words/lines. (gtk_text_view_button_press_event): Start a selection drag on double/triple clicks. (#78599)
* Deprecation cleanupManish Singh2002-10-101-6/+6
| | | | | | | | | Thu Oct 10 14:41:05 2002 Manish Singh <yosh@gimp.org> * gtk/gtktextbtree.c gtk/gtktextbuffer.c gtk/gtktextdisplay.c gtk/gtktextlayout.c gtk/gtktextmark.c gtk/gtktexttag.[ch] gtk/gtktexttagtable.c gtk/gtktextutil.c gtk/gtktextview.[ch]: Deprecation cleanup
* Centralize lookup and caching of cursor GC's here.Owen Taylor2002-03-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | Sun Mar 3 14:26:33 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkstyle.[ch] (_gtk_get_insertion_cursor_gc): Centralize lookup and caching of cursor GC's here. * gtk/gtkentry.[ch] gtk/gtktextview.[ch] gtk/gtktextdisplay.c gtk/gtklabel.c: Move to using _gtk_get_insertion_cursor_gc(). * gtk/gtkentry.c (gtk_entry_expose): Draw cursors under the text, not over the text. * gtk/gtkwidget.c (gtk_widget_class_init): add a secondary-cursor-color property. * gtk/gtkwidget.c (gtk_widget_class_init): Decrease the default aspect ratio to 1/25 (0.04). * tests/testgtkrc (bell_duration): Comment out cursor color setting.
* Massive padding addition to class structures.Owen Taylor2002-02-231-9/+9
| | | | | | | | 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.
* add mouse_cursor_obscured.Anders Carlsson2002-01-271-0/+2
| | | | | | | | | | | | | | | | | | | | 2002-01-27 Anders Carlsson <andersca@gnu.org> * gtk/gtktextview.h (struct _GtkTextView): add mouse_cursor_obscured. * gtk/gtkentry.h (struct _GtkEntry): Add mouse_cursor_obscured. * gtk/gtktextview.c (set_invisible_cursor): New function. (gtk_text_view_obscure_mouse_cursor): Likewise. (gtk_text_view_key_press_event): Call obscure_cursor if text has been inserted. (gtk_text_view_motion_event): Restore the mouse cursor. * gtk/gtkentry.c (gtk_entry_realize): Add GDK_POINTER_MOTION_MASK. (set_invisible_cursor): New function. (gtk_entry_obscure_mouse_cursor): Likewise. (gtk_entry_key_press): call obscure_cursor if text has been inserted. (gtk_entry_motion_notify): Restore the mouse cursor.
* new function (which I then decided not to use but I think it's needed toHavoc Pennington2002-01-171-1/+11
| | | | | | | | | | | | 2002-01-17 Havoc Pennington <hp@redhat.com> * gtk/gtktextlayout.c (_gtk_text_layout_get_line_xrange): new function (which I then decided not to use but I think it's needed to fix #68963 * gtk/gtktextview.c: add page_horizontally action signal and implement Ctrl+PgUp, Ctrl+PgDown based on patch from Padraig, hackily modified to avoid adding GTK_MOVEMENT_ API. Part of #53934 * gtk/gtkmarshalers.list: add NONE:INT,BOOL
* propagate exposes to no window children not in the buffer window.Havoc Pennington2002-01-021-0/+4
| | | | | | | | | | | | | | | | | 2002-01-01 Havoc Pennington <hp@pobox.com> * gtk/gtktextview.c (gtk_text_view_expose_event): propagate exposes to no window children not in the buffer window. (gtk_text_view_class_init): add move_focus bindings for Ctrl-Tab - is this the right way to do it? (gtk_text_view_focus): add focus method, just chains up for now, I'm not sure why the GtkContainer implementation doesn't work * gtk/gtktextbtree.c (_gtk_text_btree_insert_child_anchor): fill in the text line for the child anchor segment * tests/testtext.c (do_add_focus_children): add another test example (to put focusable buttons into the widget)
* remove g_assert_not_reached() that was bogus, since we demand-create theHavoc Pennington2001-12-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* docs including reference to bugzilla bug about how we should have a betterHavoc Pennington2001-11-141-0/+5
| | | | | | | | | | | | | 2001-11-13 Havoc Pennington <hp@redhat.com> * gtk/gtktextview.c (gtk_text_view_add_child_in_window): docs including reference to bugzilla bug about how we should have a better way of positioning children * gtk/gtktextview.h (struct _GtkTextViewClass): add some padding * gtk/gtktextview.c (gtk_text_view_size_allocate): assign zero size to side rects if they don't exist, #63438
* scroll to cursor on grab focus, unless it's caused by button click, #59708Havoc Pennington2001-10-231-0/+3
| | | | | | | 2001-10-23 Havoc Pennington <hp@redhat.com> * gtk/gtktextview.c (gtk_text_view_grab_focus): scroll to cursor on grab focus, unless it's caused by button click, #59708
* fix for #50317Havoc Pennington2001-09-251-0/+2
| | | | | | 2001-09-25 Havoc Pennington <hp@redhat.com> * gtk/gtktextview.c: fix for #50317
* ue Sep 25 12:41:17 2001 Owen Taylor <otaylor@redhat.com>GTK_1_3_9Owen Taylor2001-09-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.in: Version 1.3.9, interface age 0, binary age 0. * configure.in: Require GLib-1.39, Pango 0.20, Atk 0.5. * NEWS: Updates. Mon Sep 24 11:59:09 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkstyle.[ch] (_gtk_draw_insertion_cursor): Shared function for drawing cursors between gtkentry/gtklabel/gtktextview. Should this be public? It has a bit of an odd interface, but custom editing widgets probably should be using it. Function will draw with wider width for taller cursors, and draws a little indicator arrow to indicate directoin for split cursors. * gtk/gtktextview.c: Add a "cursor_color" property. * gtk/gtktextdisplay.[ch]: Add a cursor_gc parameter to gtk_text_layout_draw(). * gtk/gtkentry.c gtk/gtklabel.c gtk/gtktextdisplay.c: Use _gtk_draw_insertion_cursor(). Tue Sep 25 11:22:23 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkcellrenderertext.c gtk/gtktexttag.c: Restore the behavior where you could turn family_set (etc) back on and get back the values you had before. * demos/gtk-demo/stock_browser.c (id_to_macro): Use g_string_ascii_up() rather than looping through the string ourself.
* Removed - didn't work and not particularly useful anyways if it did.Owen Taylor2001-06-241-3/+0
| | | | | | | | Sun Jun 24 12:06:47 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtktextview.[ch] (gtk_text_view_set_text_window_size): Removed - didn't work and not particularly useful anyways if it did.
* Fix stupid error introduced last night that was making things decidedlyOwen Taylor2001-06-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Sun Jun 24 11:29:35 2001 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkimage-x11.c (gdk_image_new): Fix stupid error introduced last night that was making things decidedly not work. * gtk/*.[ch]: Patch from Kristian Rietveld adding 80 getters so that we have getter/setter pairing everywhere it makes sense. (#55767) * gtk/gtkradiobutton.[ch] gtk/gtktoolbar.c tests/testgtk.: Rename gtk_radio_button_group to gtk_radio_button_get_group, add a deprecated compat macro. (#55516) * gtk/gtklabel.[ch]: Add functions gtk_label_set/get_use_underline(), gtk_label_set/get_use_markup(), gtk_label_set_label(), which mirror the property API for GtkLabel. Make gtk_label_get_attributes() only reflect the attributes set by gtk_label_set_attributes. * gtk/gtknotebook.c (gtk_notebook_set_current_page) gtk/gtkcompat.h: Rename from gtk_notebook_set_page().
* added this functionHavoc Pennington2001-06-081-1/+2
| | | | | | | | | | 2001-06-08 Havoc Pennington <hp@redhat.com> * gtk/gtktextbuffer.c (gtk_text_buffer_get_start_iter): added this function * gtk/gtktextview.c (gtk_text_view_get_default_attributes): added this function
* Validate value from GDK settings against parameter spec.Owen Taylor2001-05-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Wed May 30 15:56:30 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtksettings.c (gtk_settings_get_property): Validate value from GDK settings against parameter spec. * gdk/x11/gdkevents-x11.c (gdk_setting_get): Add assignments to temporary values and use g_value_transform(), since thinking that GValue was going to be easy or efficient to use was, of course, a mistake. * gtk/gtksettings.c: Add cursor blink setting. * gdk/x11/gdkevents-x11.c: Add cursor blink X settings. * gtk/gtkentry.c: Add cursor blinking. * gtk/gtktextview.c (gtk_text_view_check_cursor_blink): Use cursor blink global settings. * gtk/gtkentry.c (gtk_entry_button_press): Add notification for :text_position in places where it is missing.
* Add missing NULL on valist.Owen Taylor2001-03-291-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wed Mar 28 19:20:43 2001 Owen Taylor <otaylor@redhat.com> * gtk/testtext.c (create_buffer): Add missing NULL on valist. * gtk/gtkcheckmenuitem.c (gtk_check_menu_item_class_init): Fix c-n-p problem with INCONSISTENT property. [ Patch from Havoc Pennington <hp@redhat.com> ] * gtk/gtkentry.h (struct _GtkEntryClass): add same populate_popup hook. * gtk/gtktextview.h (struct _GtkTextViewClass): add populate_popup signal as a hook for extending the default popup menu * gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems): use radio menu items for the input method menuitems * gtk/gtkimcontextsimple.c (check_hex): do better validation of inserted unicode from Ctrl-Shift-hex input method * gtk/gtktextbtree.c (_gtk_text_btree_insert): remove utf8 validatation here, already done at GtkTextBuffer level. * gtk/gtkwidget.c (gtk_widget_class_init): add binding set, add popup_menu run action signal and Shift+F10 and Menu keybindings. * gtk/gtkentry.c: implement a default handler for popup_menu * gtk/gtktextview.c: implement a default handler for popup_menu * gtk/gtkmenu.c (gtk_menu_popup): select first item if popup is from a key event * gtk/gtklabel.c: remove "trailer" cruft
* use PRIORITY_VALIDATEHavoc Pennington2001-03-071-0/+2
| | | | | | | | | | | | 2001-03-07 Havoc Pennington <hp@redhat.com> * gtk/gtktextview.c (invalidated_handler): use PRIORITY_VALIDATE * gtk/gtktextview.h (GTK_TEXT_VIEW_PRIORITY_VALIDATE): add this here, bug #50368; changed to be GDK_PRIORITY_REDRAW + 5, instead of GDK_PRIORITY_REDRAW + 1, so you can insert stuff in between the validation and the redraw which is higher priority than the validation.
* offset the current invalid region, fixes redraw bug while scrolling theHavoc Pennington2001-01-121-3/+17
| | | | | | | | | | | | | | | | | | 2001-01-12 Havoc Pennington <hp@redhat.com> * gdk/x11/gdkgeometry-x11.c (gdk_window_scroll): offset the current invalid region, fixes redraw bug while scrolling the text widget * gtk/gtktextview.c, gtk/gtktextview.h: Rearrange the scrolling/validation/etc. code in a major way, so it seems to make sense to me. Probably isn't genuinely that much better, but... * gtk/gtktexttag.c (set_fg_color): fix name of property used for notifies * gtk/gtktextmark.c (gtk_text_mark_get_left_gravity): new function
* Rearrange all the scroll-while-dragging-or-selecting code to be different,Havoc Pennington2000-12-311-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-12-31 Havoc Pennington <hp@pobox.com> * gtk/gtktextview.c: Rearrange all the scroll-while-dragging-or-selecting code to be different, not necessarily better. ;-) (gtk_text_view_scroll_to_mark): Change this function to take within_margin as a fraction instead of a pixel value, and to take alignment arguments (indicating where to align the mark inside the visible area) * gtk/testtextbuffer.c (fill_buffer): fix bad cast of GtkTextTag to GtkObject * gtk/gtktextiter.c (gtk_text_iter_set_line_offset): change behavior so that offsets past the end of the line are not allowed, and an offset equal to the line length moves the iterator to the next line (gtk_text_iter_set_line_index): make parallel change (gtk_text_iter_get_bytes_in_line): add this function * gtk/gtktextbtree.c (_gtk_text_line_byte_locate): change handling of byte indexes off the end of the line; byte index at the end of the line now returns FALSE and doesn't fill in the requested values, byte index past the end of the line is an error. Also, don't allow -1 offset anymore, since its meaning is unclear. This change exposes some bug in visual cursor motion, where we end up with a huge invalid byte index; needs fixing. Symptom of bug is a crash when you hit up arrow. (_gtk_text_line_char_locate): match the change to byte_locate * gtk/gtktextiter.c (find_by_log_attrs): Handle iteration backward from start of line properly. fixes bug reported by Mikael Hermansson where backspace would delete all text before the cursor.
* don't create dangling pointers to the appearance attributes from the lineHavoc Pennington2000-12-021-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-30 Havoc Pennington <hp@pobox.com> * gtk/gtktextdisplay.c (gtk_text_layout_draw): don't create dangling pointers to the appearance attributes from the line display * gdk/gdkdraw.c (gdk_drawable_get_image): allow negative width/height to mean "full width/height of drawable" * gtk/gtktextview.h, gtk/gtktextview.c: Implement double/triple click to select word/line * gtk/gtktextiter.c (test_log_attrs): include paragraph delimiters when getting log attrs. Get a slice, so that pixmaps and stuff are properly handled. * gtk/gtktextbuffer.c (paste): Fix pasting to work properly if you paste into the selection (replaces selection now, previously crashed or added to selection). Reveals longstanding btree bug - select multiple lines, middle-click on the selection, boom. This isn't related to my changes though. * gtk/gtkentry.c (gtk_entry_move_forward_word): Update to reflect PangoLogAttrs changes (gtk_entry_move_backward_word): ditto * gtk/gtktextlayout.h, gtk/gtktextlayout.c: Make the iter motion functions return bool whether the iter moved onto a dereferenceable position. * gtk/gtktextview.h, gtk/gtktextview.c: Add a bunch of public functions for motion in terms of display lines. * gtk/gtktextmark.c (gtk_text_mark_get_buffer): Add function to get the buffer a mark is inside
* Apply patch from Mikael Hermansson to temporarily stop blinking while theHavoc Pennington2000-11-161-0/+1
| | | | | | | | | | | | | 2000-11-15 Havoc Pennington <hp@pobox.com> * gtk/gtktextview.c (gtk_text_view_start_cursor_blink): Apply patch from Mikael Hermansson to temporarily stop blinking while the user is using the keyboard to type or navigate. Also, when blinking, stay on for longer than we stay off. Also, return from start_cursor_blink if !cursor_visible, to save checking that flag all over the place before we call start_cursor_blink.
* Free the filename of the module file.Havoc Pennington2000-11-131-11/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-13 Havoc Pennington <hp@redhat.com> * gtk/gtkimmodule.c (gtk_im_module_init): Free the filename of the module file. * gtk/gtktexttag.c (gtk_text_attributes_copy): fix memory leak of dest->language * gtk/testtext.c: Test pixels above/below/inside paragraphs settings * gtk/gtktextview.c: Implement object args and setters/getters for all the aspects of the GtkTextAttributes that are not set from GtkWidget attributes. This is spacing, justification, margins, etc. (gtk_text_view_set_arg) (gtk_text_view_get_arg): implement get/set for editable, wrap mode args (gtk_text_view_class_init): Add args for justify, left_margin, right_margin, indent, and tabs * gtk/gtktextlayout.c (set_para_values): fix to display indent attribute properly * gtk/gtktexttag.c: Remove left_wrapped_line_margin attribute, replace with indent attribute * gtk/gtktextlayout.c (set_para_values): multiply indent by PANGO_SCALE * gtk/gtktextdisplay.c (render_para): Use PangoLayoutIter, rearranging code to do that (gtk_text_layout_draw): Pass in the y for the whole LineDisplay, i.e. don't subtract the top_margin first, just to keep all margin-futzing in one place. * gdk/gdkpango.c (gdk_draw_layout): Use PangoLayoutIter * gtk/gtktextlayout.c (gtk_text_layout_get_iter_location): Remove special case of last line, Pango now handles this itself. (gtk_text_layout_get_iter_at_pixel): Fix incorrect clamp of the Y coordinate (gtk_text_layout_move_iter_to_x): port to use PangoLayoutIter (find_display_line_above): wasn't moving the byte index as it iterated over lines, so always returned byte 0. Also, port to use PangoLayoutIter. (find_display_line_below): same problem as find_display_line_above. Also, port to use PangoLayoutIter.
* Make parent_class static.Owen Taylor2000-11-121-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sun Nov 5 04:24:53 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkcellrenderertextpixbuf.c: Make parent_class static. Tue Sep 19 10:54:22 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkimcontext*.[ch] gtk/gtkimmulticontext.[ch] gtk/gtktextlayout.[ch] gtk/gtktextview.c gtk/gtkentry.c: Add support for positioning the cursor within the preedit string. Mon Sep 18 23:56:32 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextview.c: Check for bindings after passing events to im context filter. Mon Sep 18 11:50:51 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextlayout.c (add_preedit_attrs): Handle empty attribute lists properly. Sun Sep 17 10:08:16 2000 Owen Taylor <otaylor@redhat.com> * gtk/queryimmodules.c (main): Return non-zero exit status if errors were encountered querying any modules. Sat Sep 16 14:01:52 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtk.h: include gtkmodule.h gtkoldeditable.h, don't include gtkthemes.h. * gtk/testgtk.c gtk/testtext.c: Set environment variables to point * gtk/Makefile.am: Add new .c and .h files, build gtk-query-immodules and use it to create a gtk.immodules file for use of test programs. * gtk/gtkpreview.c: remove extra blank line. Sat Sep 16 13:21:04 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkimcontextsimple.c (gtk_im_context_simple_add_table): Add the ability to add extra tables beyond the default one, and also the ability to have compose sequences that are prefixes of other compose sequences. * gtk/gtkimcontextsimple.c: Export a preedit string which consists of possible candidates for keystrokes that have been entered but not yet committed. * gtk/gtkimcontext.[ch] gtk/immulticontext.[ch] gtk/gtkimcontextsimple.[ch]: add gtk_im_context_reset() * gtk/gtkmulticontext.[ch] (gtk_im_multicontext_append_menuitems): Add a function to add input-method switching menu items to a menu. * gtk/gtkimmulticontext.[ch]: Properly handly set_client_window when switching input methods. * gtk/gtkimcontextsimple.[ch]: Change the format of the compose table to allow compose tables of different lengths / sequence. Sat Sep 16 13:05:48 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkimmodule.[ch]: Support routines for loading GtkIMContext implementations dynamically at runtime. * gtk/queryimmodules.c: Program to query the available input modules and write the results into a file. * gtk/gtkrc.[ch] (gtk_rc_get_im_module_file): Add extra config options "im_module_file" (cache file for input method modules), and "im_module_path" - path to look for modules when generating cache file. This doesn't scale. Sat Sep 16 13:09:06 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkthemes.[ch] gtk/gtkmodule.[ch]: Move most of the generic code from gtkthemes into a new abstraction GtkModule which has the logic for implementing a loadable module which implements a number of GObject types. Sat Sep 16 13:07:13 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkeditable.[ch]: Convert GtkEditable from a class into an interface * gtk/gtkoldeditable.[ch]: Move the old editable implementation into here, so legacy widgets can still rely on the implemenation. GtkOldEditable exports GtkEditable. Make selection handling code use new text conversion functions (and handle UTF-8 as a side-effect). Use GtkClipboard for CLIPBOARD. * gtk/gtktext.[ch] gtk/gtkcombo.c gtk/gtkspinbutton.c: Adopt to match above changes. * gtk/gtkentry.[ch]: Implement GtkEditable directly, avoid GtkOldEditable implementation. Restructure to reduce number of places that modify state directly. Move to GtkBindingSet. Display the preedit string. Queue recomputation of PangoLayout and scroll position to improve effiency of doing complex changes naively. Add a menu with cut/copy/paste and input method selection. Thu Sep 14 22:11:05 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextlayout.[ch]: Add gtk_text_layout_set_preedit_string() to set preedit string and attributes; display preedit string by inserting string and attributes at cursor when creating the GtkTextLineDisplay. * gtk/gtktextlayout.c: Move all conversions between byte positions in PangoLayout and GtkTextIter into new functions line_display_iter_to_index/index_to_iter that properly handle the preedit string. * gtk/gtktextmark.[ch]: Restore gtk_text_mark_get_name, modify it to return const char * (eventually will end up as GCONST char *, most likely.) * gtk/gtktextview.[ch]: Handle the preedit string, call gtk_im_context_reset() as necessary, add a menu to switch input methods. * gtk/gtktextlayout.[ch]: Remove useless gtk_text_layout_get_log_attrs() function.
* Added a bunch of stuff from unusedHavoc Pennington2000-11-041-2/+4
| | | | | | | | | | | | | | | | | | | | 2000-11-04 Havoc Pennington <hp@pobox.com> * gtk/gtk-sections.txt: Added a bunch of stuff from unused 2000-11-04 Havoc Pennington <hp@pobox.com> * gtk/gtkenums.h: remove trailing comma from GtkDeleteType member list * docs/Changes-2.0.txt: Add note about gtk_container_get_toplevels() * gtk/gtktextview.h: formatting * gtk/gtktextview.c: don't start descriptions with "Returns", confuses gtk-doc
* Docs (gtk_text_tag_table_size): return a signed intHavoc Pennington2000-11-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | 2000-11-03 Havoc Pennington <hp@redhat.com> * gtk/gtktexttagtable.c: Docs (gtk_text_tag_table_size): return a signed int * gtk/gtktexttag.c: s/tkxt/text/g; write documentation (gtk_text_tag_event): make the event_object a GObject * gtk/gtktextview.c: Write API docs for all functions. * gtk/gtktextview.h: add GTK_TEXT_WINDOW_PRIVATE as return value for gtk_text_view_get_window_type() called on one of the private windows. * gtk/gtktextview.c: Instead of accessing text_view->buffer directly, call get_buffer() which demand-creates a default buffer. So gtk_text_view_new() can be used to create a view with a default buffer in it, if you just want an empty text box users can put data in. Useful for GUI builders also.
* Rename delete_at_cursor delete_from_cursor, and move to move_cursor.Havoc Pennington2000-10-301-4/+10
| | | | | | | | 2000-10-30 Havoc Pennington <hp@redhat.com> * gtk/gtktextview.h, gtk/gtktextview.c: Rename delete_at_cursor delete_from_cursor, and move to move_cursor.
* Massive reindentation and reformatting. Arg alignment and comments stillHavoc Pennington2000-10-301-24/+24
| | | | | | | | | | | | | | | | | 2000-10-30 Havoc Pennington <hp@redhat.com> * gtktextbtree.c, gtktextbtree.h, gtktextbuffer.c, gtktextbuffer.h, gtktextchild.c, gtktextchild.h, gtktextchildprivate.h, gtktextdisplay.c, gtktextdisplay.h, gtktextiter.c, gtktextiter.h, gtktextiterprivate.h, gtktextlayout.c, gtktextlayout.h, gtktextmark.c, gtktextmark.h, gtktextmarkprivate.h, gtktextsegment.c, gtktextsegment.h, gtktexttag.c, gtktexttag.h, gtktexttagprivate.h, gtktexttagtable.c, gtktexttagtable.h, gtktexttypes.c, gtktexttypes.h, gtktextview.c, gtktextview.h: Massive reindentation and reformatting. Arg alignment and comments still need fixing in various places.
* Change run action signals to be named insert_at_cursor andHavoc Pennington2000-10-301-3/+5
| | | | | | | | 2000-10-30 Havoc Pennington <hp@redhat.com> * gtk/gtktextview.h, gtk/gtktextview.c: Change run action signals to be named insert_at_cursor and delete_at_cursor so C++ can handle them.
* text_window_* weren't static and should have been. Start work on childHavoc Pennington2000-10-021-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-10-02 Havoc Pennington <hp@pobox.com> * gtk/gtktextview.c: text_window_* weren't static and should have been. Start work on child widgets; not yet complete, syncing to office computer. * gtk/gtktextchild.h: change this to contain a public interface, starting work on child interfaces. * gtk/gtktextchildprivate.h: move private interfaces here * gtk/Makefile.am: update to reflect gtktextchildprivate.h * gtk/gtktextview.h, gtk/gtktextview.c, gtk/gtktextbuffer.h, gtk/gtktextbuffer.c, gtk/gtktextiter.h, gtk/gtk/textiter.c, gtk/gtktextmark.c: copyright notices * gtk/gtktextmarkprivate.h: reformat, and put _ in front of internal functions * gtk/gtktextchild.c (_pixbuf_segment_new): put _ in front of internal function * gtk/gtktextlayout.c (gtk_text_layout_get_line_display): Reformatting
* fix indentationHavoc Pennington2000-09-301-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | | 2000-09-29 Havoc Pennington <hp@redhat.com> * gtk/gtktexttag.c (gtk_text_tag_set_priority): fix indentation * gtk/gtktextview.c: Implement drag thresholding; change functions that set border window size to have nicer name (gtk_text_view_mark_set_handler): Fix this to have the right signature. * gtk/testtextbuffer.c (fill_buffer): Update with pixbuf changes * gtk/testtext.c: Update with API changes, put line numbers on both sides. * gtk/gtktextiter.c (gtk_text_iter_get_pixbuf): Replace get_pixmap with this * gtk/gtktextchild.h, gtk/gtktextchild.c: replace all pixmap with pixbuf; delete a big block of #if 0 Tk code * gtk/gtktextbuffer.c (gtk_text_buffer_insert_pixbuf): Replace insert_pixmap with insert_pixbuf
* Set up infrastructure to deal with lots of scrolling child windows, andHavoc Pennington2000-09-281-5/+55
| | | | | | | | | | | | | | | | | | | 2000-09-28 Havoc Pennington <hp@redhat.com> * gtk/gtktextview.c: Set up infrastructure to deal with lots of scrolling child windows, and draw focus rectangle properly. (gtk_text_view_buffer_to_window_coords): Coordinate transformation to deal with all these freaking windows and offsets (gtk_text_view_window_to_buffer_coords): transform the other way * gtk/testtext.c (create_buffer): Update to match Pango API change * gtk/gtktexttagtable.c (gtk_text_tag_table_foreach): Go over the anonymous tags (foreach_unref): don't emit remove signal from finalize, just set tag's parent to NULL
* Draw the focus, and leave space to do so.Havoc Pennington2000-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-09-25 Havoc Pennington <hp@redhat.com> * gtk/gtktextview.c: Draw the focus, and leave space to do so. * gtk/gtktexttypes.c: Remove Latin1 conversion stuff * gtk/gtktextbtree.c (gtk_text_btree_node_remove_data): Fix a bug when removing node data, we didn't properly re-splice the linked list after removing the data. * gtk/gtktextview.c (gtk_text_view_key_press_event): Pass through GDK_Tab as literal tab, Ctrl-Tab to tab to focus widget * gtk/gtktextbuffer.c (selection_received): fix g_convert usage * gtk/gtktextlayout.c (set_para_values): Set tab array for the layout from the GtkTextTag. * gtk/gtktexttypes.h: delete tab and search cruft, remove g_convert() in favor of GLib version * gtk/gtktexttypes.c: remove tab implementation from here, move to Pango * gtk/gtktexttag.h, gtk/gtktexttag.c: Implement tab stuff using new PangoTabArray from Pango * gtk/gtktexttag.c (gtk_text_attributes_fill_from_tags): Remove unused border_width stuff
* Remove g_convert (moved to glib) and now useless utf_to_latin1()Owen Taylor2000-09-141-38/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thu Sep 14 12:21:12 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktexttypes.[ch]: Remove g_convert (moved to glib) and now useless utf_to_latin1() latin1_to_utf() * gtk/gtktextview.[ch]: Change ::move_insert and ::delete_text action signals to ::move and ::delete; create the signals with the right enumeration type, not GTK_TYPE_ENUM so that bindings work. Add C-d, M-d, C-v bindings, change Home, End to move to beginning/end of line, Add C-Home C-End to move to beginning/end of buffer. Change ::cut_text to ::cut_clipboard, etc; combine ::scroll_text into ::move; use new GtkSelectionData functions to simplify DND text handling. * gtk/gtkenums.h gtk/gtktextview.h: Move movement, deletion enumerations here, rename enumeration values to be consistently plural. * gtk/gtktextbuffer.c: Use new clipboard interfaces for cut/copy/paste and primary selection. * gtk/gtktextbuffer.[ch]: Remove excess time and 'interactive' arguments from cut/copy/paste; rename cut to cut_clipboard, etc; remove gtk_text_buffer_get_clipboard_contents(). * gtk/gtktextlayout.[ch]: Add gtk_text_layout_move_iter_to_line_end() to move the iter to line ends. * gtk/gtkselection.[ch] (gtk_selection_data_set/get_text): Functions to set or get a UTF-8 string on the selection data. * gtk/gtkclipboard.[ch]: New, simplified selection handling interfaces. * gtk/gtkinvisible.c (gtk_invisible_new): Realize newly created widgets - one of these is useless if we don't. * gtk/gtkselection.[ch] (gtk_selection_clear_targets): Export a public function clear all targets registered for the widget. * gtk/gtkselection.c (gtk_selection_owner_set) docs/Changes-2.0.txt: Never call gtk_widget_realize() - that was just asking for bizarre side-effects. * gtk/gtkselection.c (gtk_selection_owner_set): Call gdk_selection_owner_set even if the widget is the same so that we reliably update the timestamp on the server. * gdk/x11/gdkevents-x11.c gdk/x11/gdkx.h: Add a gdk_x11_get_server_time() function. * gdk/x11/gdkevents-x11.c gdk/x11/gdkprivate-x11.h gdk/x11/gdkselection-x11.c gdk/x11/gdkwindow-x11.h: Add some tricky filtering on serial numbers for selection clear events to fix up long-standard race condition FIXME's in gtkselection.c. * gdk/gdkproperty.h gdk/x11/gdkselection-x11.h: Add routines to convert from utf8 to compound text or STRING and from a text property to UTF-8. * gtk/gtkmain.[ch] (gtk_get_current_event_time): Add a convenience function gdk_get_current_event_time(). * gtk/gtkselection.c (gtk_selection_data_copy/free): Copy and free selection_data->data properly
* Use G_GNUC_CONST.Elliot Lee2000-08-301-1/+1
| | | | Use G_GNUC_CONST.