Commit Graph

105 Commits

Author SHA1 Message Date
Havoc Pennington
85cdc1cec3 fix return value, #61714 (Vitaly Tishkov)
2001-10-23  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextiter.c (gtk_text_iter_forward_cursor_positions): fix
	return value, #61714 (Vitaly Tishkov)
	(gtk_text_iter_backward_sentence_starts): ditto
	(gtk_text_iter_backward_word_starts): ditto
	(gtk_text_iter_forward_word_ends): ditto
	(gtk_text_iter_forward_sentence_ends): ditto
	(gtk_text_iter_backward_cursor_positions): ditto
2001-10-23 19:19:10 +00:00
Havoc Pennington
0d5635b366 don't back up a char from the end iterator, fixes #61859 ("can't put
2001-10-22  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextbuffer.c (gtk_text_buffer_place_cursor): don't back
	up a char from the end iterator, fixes #61859 ("can't put cursor
	at the end of the buffer")

	* gtk/gtktextiter.c (gtk_text_iter_forward_to_line_end): fix this
	to work with delimiters other than newline.

	* tests/testtextbuffer.c: add some tests for get_chars_in_line,
	get_bytes_in_line

	* gtk/gtktextiter.c (gtk_text_iter_get_chars_in_line): fix for the
	last line, since the newline is no longer counted.
	(gtk_text_iter_get_bytes_in_line): ditto
2001-10-22 23:35:03 +00:00
Havoc Pennington
0a522533b0 add temporary code to dump btree contents on assertion failure described
2001-10-22  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextiter.c (_gtk_text_iter_forward_indexable_segment):
	add temporary code to dump btree contents on assertion failure
	described in #62656

	* gtk/gtktextbtree.c (ensure_end_iter_segment): add some
	assertions that we're getting the right end iter segment

	* gtk/gtktextiter.c (_gtk_text_iter_forward_indexable_segment):
	verify that we aren't on the end iterator after moving
	forward one segment - fixes return value in an obscure case.
	Also, some trivial code cleanup/rearranging.
2001-10-22 22:17:21 +00:00
Havoc Pennington
6446484667 add a #error unless you define GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API, so
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.
2001-10-22 21:52:47 +00:00
Havoc Pennington
72e6566b0d Clarify behavior in docs, #61777 (gtk_text_iter_forward_search)
2001-10-22  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextiter.c (gtk_text_iter_set_line): Clarify behavior in
	docs, #61777
	(gtk_text_iter_forward_search) (gtk_text_iter_backward_search):
	change the two boolean args to a flags field, so we can extend
	to add case insensitive, regexp searches later. #61852
2001-10-22 19:13:28 +00:00
Havoc Pennington
739ffc4934 fix test case, it previously verified incorrect behavior
2001-10-03  Havoc Pennington  <hp@redhat.com>

	* tests/testtextbuffer.c (logical_motion_tests): fix test case,
	it previously verified incorrect behavior

        Fixes for #61565

	* gtk/gtktextiter.c (gtk_text_iter_set_line): don't return lines
	off the end
	(_gtk_text_btree_get_iter_at_line_char): don't return lines off
	the end
	(_gtk_text_btree_get_iter_at_line_byte): don't return lines off
	the end
	(gtk_text_iter_forward_lines): if on the last line, move to end of
	it

	* gtk/gtktextbtree.c (_gtk_text_btree_last_could_contain_tag):
	don't return a line off the end
2001-10-04 00:22:13 +00:00
Havoc Pennington
77dc57e960 allow testing the end position
2001-10-03  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextiter.c (test_log_attrs): allow testing the end
	position

	* gtk/gtktextbuffer.c (compute_log_attrs): update for pango
	changes

	* tests/testtextbuffer.c (logical_motion_tests): updates
2001-10-03 20:49:10 +00:00
Havoc Pennington
be6ae47ad2 fix for #50317
2001-09-25  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextview.c: fix for #50317
2001-09-25 23:35:06 +00:00
Havoc Pennington
1a26412db8 use gtk_text_iter_can_insert
2001-09-25  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextview.c (gtk_text_view_key_press_event): use
	gtk_text_iter_can_insert

	* gtk/gtktextbuffer.c: use gtk_text_iter_can_insert

	* gtk/gtktextiter.c (find_line_log_attrs): fixes, #57611, #57613
	 (gtk_text_iter_can_insert): new function to fix #60282, should
	also fix msw's "can paste into empty buffer" bug.

	* gtk/gtktexttag.c (gtk_text_tag_event): change type check for
	"event object,"  #59091

	* gtk/gtktextbtree.c: indentation fixes

	* gtk/gtktextiter.c (find_by_log_attrs): fixes
2001-09-25 22:51:26 +00:00
Havoc Pennington
1e3b62fd13 Get rid of the newline-that-could-not-be-deleted; buffers may now be
2001-09-24  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextiter.c, gtk/gtktextbuffer.c, gtk/gtktextbtree.c,
	gtktextlayout.c:
	Get rid of the newline-that-could-not-be-deleted; buffers may
	now be zero-length. Much easier to fix than expected, once
	I figured out the right way to do it. However, there are
	various subtle bugs introduced by this that will have to get
	sorted out. Please use bugzilla.
2001-09-24 23:12:39 +00:00
Havoc Pennington
85b433515b add variables and checks for specific versions of dependencies. Previously
2001-09-20  Havoc Pennington  <hp@pobox.com>

	* configure.in (PANGO_REQUIRED_VERSION)
	(ATK_REQUIRED_VERSION): add variables and checks for specific
	versions of dependencies. Previously we didn't verify the
	Pango or ATk versions.

2001-09-09  Havoc Pennington  <hp@pobox.com>

	* gtk/gtktextiter.c: fool with indentation
	(gtk_text_iter_in_range): add g_return_if_fail
2001-09-21 14:23:15 +00:00
Havoc Pennington
9ddcb3e07e default xscale/yscale to 0.0, not 0.5, 0.5 isn't useful
2001-09-08  Havoc Pennington  <hp@pobox.com>

	* gtk/gtkalignment.c (gtk_alignment_class_init): default
	xscale/yscale to 0.0, not 0.5, 0.5 isn't useful

	* tests/testtextbuffer.c: fix usage of gtk_text_iter_spew

	* gtk/gtktextiter.c: fix docs
	(gtk_text_iter_spew): get rid of this

	* gtk/gtklayout.c: docs

	* gtk/gtkbutton.c (gtk_button_construct_child): add an alignment
	to center image and label together, instead of having image on
	left and label centered, patch/suggestion from Jacob

	* gtk/gtkdialog.c: docs

2001-09-08  Havoc Pennington  <hp@pobox.com>

	* gtk/tmpl/gtklayout.sgml: docs

	* gdk-pixbuf/gdk-pixbuf.sgml: remove the section on compiling
	gdk-pixbuf since it isn't a standalone package anymore

	* gtk/building.sgml: section on compiling GTK itself
2001-09-08 19:33:06 +00:00
Havoc Pennington
51d551786a add some lame code to handle G_MININT, fixes #57424
2001-09-07  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextiter.c: add some lame code to handle G_MININT, fixes
	#57424
2001-09-07 22:48:30 +00:00
Owen Taylor
22491fd6a4 Add missing gdk_rectangle_get_type() prototype.
Mon Jun 11 18:15:16 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdk.h: Add missing gdk_rectangle_get_type() prototype.

	* gtk/gtk[hv]scale.c: Include math.h, stdlib.h

	* gdk/gdkpango.h gtk/gtkclist.c gtk/gtkentry.c gtk/gtkmain.[ch]
	  gtk/gtkspinbutton.c gtk/gtkstyle.c gtk/gtktextbuffer.c
	  gtk/gtktextdisplay.c gtk/gtktextiter.[ch]
	  gtk/gtktextlayout.c gtk/gtktexttag.[ch] gtk/gtkwidget.c: Adapt
	  to recent changes in Pango.

	* tests/testgtk.c: Set language tags with gtk_label_set_markup()
	  to test whether the basic engine honors them.
2001-06-14 20:41:44 +00:00
Havoc Pennington
7009511a22 added this function
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
2001-06-08 19:03:23 +00:00
Havoc Pennington
ec6baad4d8 rename from gtk_text_iter_reorder
2001-06-05  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextiter.c (gtk_text_iter_order): rename from
	gtk_text_iter_reorder
2001-06-05 21:53:56 +00:00
Joe Shaw
f508a7b7e2 Simplify as suggested by Havoc. Just get the last iter and work backward
2001-05-22  Joe Shaw  <joe@ximian.com>

	* gtk/gtktextiter.c (_gtk_text_btree_get_iter_at_last_toggle):
	Simplify as suggested by Havoc. Just get the last iter and work
	backward to the tag instead of getting a line and working back from
	there. Fixes passing in an invalid offset to
	iter_init_from_byte_offset().
2001-05-22 20:38:18 +00:00
Havoc Pennington
b4e4a0ed9d fix some shell typos
2001-05-04  Havoc Pennington  <hp@redhat.com>

	* configure.in: fix some shell typos

	* gtk/gtkcolorsel.c (gtk_color_selection_destroy): warning fix

	* gtk/gtkimage.c: handle animations

	* gtk/gtkcheckbutton.c (gtk_check_button_size_request): request
	border_width * 2, not just border_width

	* gtk/gtkscale.c: add "format_value" signal to allow people
	to override the way values are drawn.
	(gtk_scale_get_value_size): fix width/height mistake,
	and compute size from actual displayed text, not
	from made-up text.

	* gtk/gtktexttag.c (gtk_text_tag_class_init): fix return type in
	signal registration

	* tests/testtext.c: Add "Remove all tags" menu item for testing

	* gtk/gtktextbuffer.c (gtk_text_buffer_remove_all_tags): implement

	* demos/gtk-demo/main.c (main): add hack so we can find modules
	without installing gtk

	* demos/gtk-demo/textview.c (insert_text): demo font scaling

	* gtk/gtkcellrenderertext.c: Add "scale" property (font scaling
	factor)
	(gtk_cell_renderer_text_set_property): remove some bogus
	g_object_notify

	* gtk/gtktexttag.c: add "scale" property which is a font scaling
	factor

	* gtk/gtktextlayout.c (add_text_attrs): add font scale attribute
	to layout

	* gtk/gtktextiter.c (gtk_text_iter_is_start): rename from
	gtk_text_iter_is_first

2001-05-04  Havoc Pennington  <hp@redhat.com>

	* pixops/pixops.c (pixops_process): merge fix from stable: Patch
	 from hoshem@mel.comcen.com.au to fix nonzero X offsets.  Fixes
	 bug #50371.

        * gdk-pixbuf/pixops/pixops.c (pixops_composite_nearest): merge
	from stable: Patch from OKADA Mitsuru <m-okada@fjb.co.jp> to fix
	confusion of using "src" instead of "p".
        (pixops_composite_color_nearest): Use a more accurate (and
	correct, to begin with) compositing method.  This cures checks
	showing through on images with no alpha.

	* gdk-pixbuf.c (gdk_pixbuf_fill): fix bug that left some trailing
	bytes unfilled.

	* gdk-pixbuf-io.h: fix UpdatedNotifyFunc to use signed ints

	* gdk-pixbuf-loader.h (struct _GdkPixbufLoaderClass): Change
	area_updated signal to use signed ints.  Removed animation-related
	signals.

	* io-gif.c, io-gif-animation.h, io-gif-animation.c: Massive
	rewrite action

	* gdk-pixbuf-animation.c: Add GdkPixbufAnimationIter to abstract
	all the pesky details. Remove old frame-based API. Make
	GdkPixbufAnimation an abstract base class, derived by the loaders.
2001-05-07 15:58:47 +00:00
Havoc Pennington
b84d2f1234 handle 0-height empty/invisible lines.
2001-04-21  Havoc Pennington  <hp@pobox.com>

	* gtk/gtktextdisplay.c (gtk_text_layout_draw): handle 0-height
	empty/invisible lines.

	* gtk/gtktextiter.c (gtk_text_iter_set_visible_line_offset)
	(gtk_text_iter_set_visible_line_index): new functions to set
	indexes excluding invisible text

	* gtk/gtktextlayout.c (line_display_iter_to_index): get visible
	index

	* gtk/gtktextiter.c (gtk_text_iter_get_visible_line_index)
	(gtk_text_iter_get_visible_line_offset): new functions to
	get indexes excluding invisible text

	* gtk/gtkmessagedialog.c (gtk_message_dialog_init): strip out a
	bunch of extra padding that served no purpose

	* gtk/gtkdialog.c: Make all the spacings configurable via style
	properties, for chubbiness configuration in themes

	* tests/testtext.c: fix path to the immodules.
2001-04-24 12:24:35 +00:00
Havoc Pennington
08add3cd50 convert the X coordinates so they're with respect to the line, rather than
2001-02-15  Havoc Pennington  <hp@redhat.com>

	* gdk/gdkpango.c (gdk_pango_layout_line_get_clip_region): convert
	the X coordinates so they're with respect to the line, rather than
	with respect to the layout.

	* gtk/gtkalignment.c: Convert to new property API, patch from Lee
	Mallabone

	* gtk/testgtk.c (create_range_controls): add vscale tests,
	and inverted test

	* gtk/gtkrange.c (gtk_range_set_inverted): new function to fix
	#50806

	* gtk/gtkentry.c (gtk_entry_get_text): add G_CONST_RETURN

	* gtk/gtktextiter.h (gtk_text_iter_is_last): rename
	gtk_text_iter_is_end

	* gtk/gtktextbuffer.h (gtk_text_buffer_get_last_iter):
	rename gtk_text_buffer_get_end_iter

	* gtk/testgtk.c (create_labels): Add test for selectable

	* gtk/gtkentry.c (gtk_entry_draw_text): Use new GDK API to draw
	the selection stuff. This code is kind of broken since it doesn't
	use the theme engine.

	* gdk/gdkpango.c (gdk_pango_layout_line_get_clip_region):
	fix infinite loop and y offset problem
	(gdk_draw_layout_line_with_colors): fix foreground color handling

        * gtk/gtklabel.h, gtk/gtklabel.c: Implement a "selectable" flag
	that makes the label selectable.

	* gtk/gtklabel.c (gtk_label_style_set): recreate the label's
	layout when the style is set, since fonts etc. could have changed.
2001-02-17 00:11:03 +00:00
Havoc Pennington
2c5d938ff8 CVS is doing its broken pipe thing, this is more of the previous commit
2001-02-02  Havoc Pennington  <hp@redhat.com>
2001-02-03 01:09:41 +00:00
Havoc Pennington
e0fee22e78 Add built marshaller files to support GdkPixbufLoader signals
2001-01-22  Havoc Pennington  <hp@redhat.com>

	* Makefile.am: Add built marshaller files to support
	GdkPixbufLoader signals

	* gdk-pixbuf-io.c (gdk_pixbuf_load_module): have
	GDK_PIXBUF_MODULEDIR unconditionally replace the compiled-in
	module location, rather than acting as a fallback, because we are
	using GDK_PIXBUF_MODULEDIR to use gdk-pixbuf before installing it.

	* gdk-pixbuf.h: include gdk-pixbuf-loader.h

        * gdk-pixbuf-loader.h, gdk-pixbuf-loader.c: Move back over here
	from gtk, and add error to close(), because stop_load may do
	parsing of the image.

	* pixops/have_mmx.S (_pixops_have_mmx): add newline at end of file

        * io-*.c: make individual operations static, and add fill_vtable
	functions which are exported. Fix the collection of type warnings
	that surfaced, including a number of functions that didn't
	properly take a GError and some that weren't
	const-correct. Involved adding error handling for a few loaders.

	* gdk-pixbuf-io.h: Add error reporting to stop_load function

	* gdk-pixbuf-io.c (gdk_pixbuf_load_module): change to just look up
	a function that fills in the GdkPixbufModule vtable, instead of
	looking up all the image functions individually; this means we
	can get type safety within modules for the loader functions.
	Also it means you don't have to keep the statically compiled and
	GModule versions in sync.

	* test-gdk-pixbuf.c (main): remove gdk_pixbuf_init()

	* make-inline-pixbuf.c (main): remove call to gdk_pixbuf_init()

	* gdk-pixbuf.h: nuke gdk_pixbuf_init()

	* gdk-pixbuf-animation.c (gdk_pixbuf_frame_get_type): g_type_init
	() here

	* gdk-pixbuf.c (gdk_pixbuf_get_type): g_type_init () here

	* gdk-pixbuf-animation.c (gdk_pixbuf_animation_get_type):
	g_type_init() here


2001-01-22  Havoc Pennington  <hp@redhat.com>

	* demos/testanimation.c: fix to reflect gdk-pixbuf changes

	* demos/testpixbuf.c: fix to reflect gdk-pixbuf changes

	* gtk/gdk-pixbuf-loader.c, gtk/gdk-pixbuf-loader.h:
	Remove, move back to gdk-pixbuf

	* gtk/gtktextiter.c, gtk/gtktextiter.h: add sentence equivalents
	to all the word functions

	* gtk/gtktextview.c (gtk_text_view_start_cursor_blink): return
	before doing anything on NULL layout or if we don't have the focus

	* gtk/testtext.c (fill_example_buffer): "justification"

	* gtk/gtktexttag.h, gtk/gtktexttag.c: change the tag attribute
	to be called "justification" not "justify"

	* demos/gtk-demo/textview.c (create_tags): "justification"

	* gtk/gtktextlayout.c (set_para_values): Handle char-wise wrapping
2001-01-22 23:09:48 +00:00
Havoc Pennington
5c37906778 hack on this a bit
2001-01-05  Havoc Pennington  <hp@redhat.com>

	* tests/testtreeview.c: hack on this a bit

	* gtk/gtktextlayout.c (gtk_text_layout_class_init):
	s/GTK_RUN_LAST/G_SIGNAL_RUN_LAST

	* gtk/gtktreemodelsimple.h (GTK_IS_TREE_MODEL_SIMPLE_CLASS):
	was spelled incorrectly
	(GTK_IS_TREE_MODEL_SIMPLE): ditto

	* gtk/gtktreeview.c (gtk_tree_view_set_headers_clickable): rename
	from gtk_tree_view_set_headers_active

	* gtk/gtktexttag.c:
	(gtk_text_tag_get_property): handle PROP_DIRECTION
	(gtk_text_tag_set_property): g_object_notify when we toggle the _set
	properties, bug 40235

	* gtk/gtktextiter.c (gtk_text_iter_forward_to_delimiters): rename
	forward_to_line_end
2001-01-06 01:31:58 +00:00
Havoc Pennington
1299c1df6f this function was broken if called on the first position in the buffer.
2001-01-05  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextiter.c (gtk_text_iter_ends_line): this function was
	broken if called on the first position in the buffer.

	* gtk/gtktextlayout.c (line_display_index_to_iter): fix
	forward_to_delimiters to be called only if we aren't already at
	the delimiters.
2001-01-05 19:51:55 +00:00
Havoc Pennington
b0a909b8c4 if index is equal to the line length, then position iterator before
2001-01-04  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextlayout.c (line_display_index_to_iter): if index is
	equal to the line length, then position iterator before paragraph
	separators. Fixes crash reported by Mikael Hermansson when
	pressing left arrow from the start of a line.

	* gtk/gtktextiter.c (iter_set_from_byte_offset): Add g_error
	about byte indexes off the end
	(iter_set_from_char_offset): add g_error about char offsets
	off the end
2001-01-04 20:01:32 +00:00
Havoc Pennington
c7826b5f63 Adapt to uscore-ification of gtktextiterprivate
2001-01-03  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextbtree.c: Adapt to uscore-ification of gtktextiterprivate

	* gtk/gtktextdisplay.c (gtk_text_layout_draw): remove use
	of private functions; remove inclusion of private headers.

	* gtk/gtktextlayout.c (gtk_text_layout_get_iter_at_line): Add this
	function, so we don't need private functions in gtktextdisplay.c

	* gtk/gtktextiterprivate.h: underscore-ification

	* gtk/gtkwidget.c: Clean up a bunch of docs that said "INTERNAL"
	to instead say "only useful to implement widgets"

	* gtk/gtkenums.h (GtkMovementStep): Rename GTK_MOVEMENT_CHARS,
	GTK_MOVEMENT_POSITIONS to GTK_MOVEMENT_LOGICAL_POSITIONS,
	GTK_MOVEMENT_VISUAL_POSITIONS. Resolves bug 40249.

	* gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_set_colormap):
	This function was completely broken

	* gtk/testtext.c (line_numbers_expose): use gtk_paint_layout

	* gtk/gtkvscale.c (gtk_vscale_draw_value): use gtk_paint_layout

	* gtk/gtkvruler.c (gtk_vruler_draw_ticks): use gtk_paint_layout

	* gtk/gtklabel.c (gtk_label_expose): use gtk_paint_layout

	* gtk/gtkhscale.c (gtk_hscale_draw_value): use gtk_paint_layout

	* gtk/gtkhruler.c (gtk_hruler_draw_ticks): use gtk_paint_layout

	* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render): use
	gtk_paint_layout

	* gtk/gtkaccellabel.c (gtk_accel_label_expose_event): use
	gtk_paint_layout

	* gtk/gtkstyle.h: Add draw/paint expander to draw tree expanders.
	Progress on bug 40103. Add draw_layout to draw a PangoLayout.
	(struct _GtkStyleClass): Remove draw_cross, draw_oval, draw_ramp,
	which were not implemented.

	* gtk/gtktextbuffer.h (struct _GtkTextBufferClass): Add
	insert_pixbuf signal. Rename delete_text to delete_range since it
	also deletes pixbufs and child anchors. This almost closes bug
	40245 (still need to deal with child anchors)

	* gtk/gtktextbuffer.c (gtk_text_buffer_class_init): Add
	insert_pixbuf, change signal names as appropriate, change types of
	signals taking marks/tags to have the specific type, not just
	G_TYPE_OBJECT

	* gtk/gtkmain.c (gtk_get_current_event_state): Add this function;
	closes bug 40051

	* gtk/gtkoptionmenu.c (gtk_option_menu_set_history): clean up
	unnecessary remove_contents() call
	(gtk_option_menu_class_init): add a "changed" signal, closes
	bug 40039
	(gtk_option_menu_update_contents): emit "changed" if the
	active menu item changes

	* gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_frame_done): fix bad
	cast to GtkObject, reported by Jonas Borgstrom
	(gdk_pixbuf_loader_finalize): don't close the loader on finalize;
	we can't do stuff with side effects in finalize. Instead, spew a
	warning if the loader isn't closed.

	* gdk/x11/gdkdrawable-x11.c (gdk_drawable_impl_x11_finalize): free
	colormap in here, non-X ports probably need to sync to this change

	* gdk/x11/gdkdrawable-x11.c (gdk_x11_set_colormap): remove
	assertion that colormap != NULL, you can set the colormap to NULL
	if you like.

	* Makefile.am: remove gtk-config-2.0

	* configure.in: Use pkg-config to locate GLib. Remove
	separated-out GMODULE_LIBS, GMODULE_CFLAGS; these were not used,
	and the gmodule libs/cflags were in GLIB_LIBS GLIB_CFLAGS anyhow.
	Use pkg-config to locate Pango. Output correct Pango libs to
	gdk-2.0.pc.in. Fix test for FREETYPE_CONFIG (typo fix).

	* Makefile.am (pkgconfig_DATA): install only target-specific pc
	files
	(install-data-local): symlink gtk+-2.0.pc and gdk-2.0.pc to the
	X11 pc files

	* gtk+-2.0.pc.in (Requires): require the GDK for the current target
	unref from here
2001-01-04 17:48:43 +00:00
Havoc Pennington
aac55c4664 uscore-prepend all the stuff in here.
2001-01-01  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktexttagprivate.h: uscore-prepend all the stuff in here.

	* gtk/gtk-boxed.defs (GtkTextAttributes): Add boxed type for
	GtkTextAttributes

	* gtk/gtktexttag.c: Fix up GtkTextAttributes copying to close bug
	#40246
	(gtk_text_attributes_copy_values): rename from
	gtk_text_attributes_copy
	(gtk_text_attributes_copy): a more standard GTK copy function,
	which returns a new object
2001-01-01 20:26:10 +00:00
Havoc Pennington
7a958797e2 Rearrange all the scroll-while-dragging-or-selecting code to be different,
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.
2000-12-31 23:28:57 +00:00
Havoc Pennington
e405f75c2b General cleanup of the log attr iteration stuff. This should make e.g. the
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
2000-12-16 07:01:48 +00:00
Havoc Pennington
94ec8cff93 remove unused call to get_last_line()
2000-12-14  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextbtree.c (_gtk_text_btree_validate_line): remove
	unused call to get_last_line()

	* gtk/gtkobject.c (gtk_object_add_arg_type): add G_TYPE_POINTER
	here until boxed is working (and maybe after that - we should
	really not gratuitously break old code)

	* gtk/gtktexttag.c (gtk_text_tag_class_init): add commented-out
	specific types for font_desc and tabs args, move them to
	GTK_TYPE_POINTER for now, waiting on g_param_spec_boxed() to get
	fixed. Move GdkColor args to GTK_TYPE_POINTER also.

	* gtk/gtktextbuffer.c (gtk_text_buffer_class_init): temporarily
	use GTK_TYPE_POINTER for signal signatures as a hack-around

	* gtk/gtk-boxed.defs: Add boxed types for PangoFontDescription and
	PangoTabArray

	* gtk/gtktextlayout.c (line_display_iter_to_index):
	make static
	(line_display_index_to_iter): make static

	* gtk/gtktextbuffer.c (gtk_text_buffer_class_init): fix marshaller
	to marshal a string not a boxed

	* gtk/gtkmarshal.list: add marshaller for GtkTextBuffer:insert_text

	* gtk/testtext.c (fill_file_buffer): don't use g_utf8_next_char
	since the UTF-8 isn't validated yet

	* gtk/gtktextsegment.c (char_segment_check_func): don't require
	lines to end in '\n'

	* gtk/gtktextview.c (gtk_text_view_move_cursor): update to use
	forward_to_delimiters, and grapheme boundaries
	(gtk_text_view_delete_from_cursor): properly handle non-newline
	delimiters, and grapheme boundaries

	* gtk/gtktextiter.c (gtk_text_iter_forward_to_newline): rename
	to gtk_text_iter_forward_to_delimiters, and make it work properly
	if empty lines end with a character other than '\n'

	* gtk/gtktextiter.h, gtk/gtktextiter.c: Add movement by cursor
	position
2000-12-14 23:26:59 +00:00
Havoc Pennington
be59b202e8 Remove double _ in front of some functions
2000-12-13  Havoc Pennington  <hp@pobox.com>

* gtk/gtktextbtree.h: Remove double _ in front of some functions

* gtk/gtktext*.[hc]: update accordingly
2000-12-14 04:58:44 +00:00
Havoc Pennington
bacb35ba3c Put _ in front of every function in this header file
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
2000-12-14 04:54:03 +00:00
Havoc Pennington
310a0d4fcc Handle chopping off \r\n and 0x2029 in addition to \n before passing to
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;
2000-12-11 15:51:20 +00:00
Havoc Pennington
565074f9a3 fix breakage here that cause a segfault on text insertion
2000-12-08  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextbtree.c (gtk_text_btree_insert): fix breakage here
	that cause a segfault on text insertion

	* gtk/gtktextchild.c (gtk_text_child_anchor_queue_resize): fix
	warning

	* gtk/gtktextiter.c (test_log_attrs): use
	_gtk_text_buffer_get_line_log_attrs to speed things up a bit

	* gtk/gtktextbuffer.c (_gtk_text_buffer_get_line_log_attrs):
	Get log attrs for a line, using a cache stored on the buffer

	* gtk/gtkcolorsel.h (GTK_COLOR_SELECTION_GET_CLASS): fix typo,
	reported by Jeff Franks
2000-12-08 20:08:52 +00:00
Havoc Pennington
9365d0d7dc fix this to be sane
2000-12-04  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkpaned.c (gtk_paned_expose): fix this to be sane

	* gtk/gtkvpaned.c (gtk_vpaned_expose): Add an expose handler

	* gtk/gtkhpaned.c (gtk_hpaned_expose): Add an expose handler

	* gtk/gtknotebook.c (gtk_notebook_draw_tab): put in a temporary
	hack to avoid infinite loops (queue draw instead of draw) -
	Owen has more appropriate fixes in a branch he'll check in later.

	* gtk/gtktextiter.c (gtk_text_iter_ends_line): handle paragraph
	separator, CR, and CRLF as line ends

	* gtk/gtktextbtree.c (gtk_text_btree_insert): on insertion, break
	into lines using pango_find_paragraph_boundary(); other bits of
	the widget are still going to be broken if the boundary isn't '\n'
	though
2000-12-04 23:04:17 +00:00
Havoc Pennington
35876710dc don't create dangling pointers to the appearance attributes from the line
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
2000-12-02 07:51:37 +00:00
Havoc Pennington
c72cec38f1 change "offset" to "rise"
2000-11-14  Havoc Pennington  <hp@pobox.com>

* gtk/testtextbuffer.c (fill_buffer): change "offset" to "rise"

* gtk/gtktexttypes.h (GTK_TEXT_UNKNOWN_CHAR): Add macro for
unknown char, no real reason we were using a variable.
Remove gtk_text_unknown_char variable. Fix all the text widget
files accordingly.

* gtk/gtktexttypes.c: Change "unknown character" to 0xFFFC,
since the Unicode spec seems to prefer that character for our
purposes.
2000-11-15 03:41:45 +00:00
Havoc Pennington
f1de9df051 rename to gtk_text_mark_get_visible
2000-11-07  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextmark.c (gtk_text_mark_is_visible): rename
	to gtk_text_mark_get_visible

	* gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_line_end): fix
	bug that was generating an invalid iterator

	* gtk/gtktextiter.c (gtk_text_iter_get_offset): move call to
	ensure_char_offsets() in front of code placing the iter in an
	invalid state.

	* gtk/gtktextbuffer.c (gtk_text_buffer_paste_primary):
	make override_location arg const
	(paste): Replace the selection if we paste into the
	current selection

	* gtk/gtkselection.h: Remove "GtkSelectioData"
	(struct _GtkSelectionData): move the definition here.

	* gtk/gtktextbuffer.c (gtk_text_buffer_update_primary_selection):
	Export the GTK_TEXT_BUFFER_CONTENTS target for in-process copies

	* gtk/gtktextiter.c (gtk_text_iter_get_tags): New function

	* gtk/gtktextbuffer.c (gtk_text_buffer_insert_range): implement
	(gtk_text_buffer_insert_range_interactive): implement
	(gtk_text_buffer_get_tags): Remove, replaced by
	gtk_text_iter_get_tags()

	* gtk/gtktextiter.c (gtk_text_iter_forward_search): Add a search
	limit parameter, to avoid infinite linear scan.
	(gtk_text_iter_backward_search): Add search limit
	(gtk_text_iter_forward_find_char): Add search limit
	(gtk_text_iter_backward_find_char): Add search limit
2000-11-07 21:01:02 +00:00
Havoc Pennington
ca83d0a3dc Get widgets working on the btree/buffer side. Display of them still
2000-11-03  Havoc Pennington  <hp@redhat.com>

        Get widgets working on the btree/buffer side. Display of them
	still doesn't work.

	* gtk/gtktextview.c: start implementing child widget stuff

	* gtk/gtktextiter.c (gtk_text_iter_get_child_anchor): new function

	* gtk/gtktextlayout.c: handle embedded widgets

	* gtk/gtktextdisplay.c: handle embedded widgets

	* gtk/gtktextchild.c: Implement all the child anchor goo

	* gtk/gtktextbuffer.c (gtk_text_buffer_create_child_anchor): New
	function

	* gtk/gtktextbtree.c: Add child anchor table to the btree struct
	(insert_pixbuf_or_widget_segment): abstract out common portions of
	creating a child anchor or a pixbuf segment.
	(gtk_text_btree_create_child_anchor): new function
	(gtk_text_btree_unregister_child_anchor): new function

	* gtk/gtkmarshal.list: added VOID:OBJECT,INT,INT for the
	allocate_child signal on GtkTextLayout

	* gtk/gtktextiter.c (gtk_text_iter_get_pixbuf): fix bogus return
	values
	(gtk_text_iter_get_child_anchor): new function

	* gtk/gtktextbuffer.c (gtk_text_buffer_real_changed): Add a
	default handler for the changed signal, which calls
	gtk_text_buffer_set_modified(), instead of just always emitting
	changed then calling set_modified() manually. I guess this is
	maybe more flexible. It seems logical.
2000-11-03 20:40:57 +00:00
Havoc Pennington
5190c7397c Massive reindentation and reformatting. Arg alignment and comments still
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.
2000-10-30 17:03:00 +00:00
Havoc Pennington
3605930213 fix constness warning
2000-10-26  Havoc Pennington  <hp@redhat.com>

        * gtk/gtktextiter.c (my_strrstr): fix constness warning

        Fixed output of:
        nm -g -l .libs/libgtk-x11-1.3.so | grep ' T ' | grep -v gtk_ | grep -v GTK_

        * gtk/gtktextsegment.c (char_segment_new): rename
        (_char_segment_new_from_two_strings): rename
        (_toggle_segment_new): rename

        * gtk/gtkclipboard.c (ensure_clipboard_widget): make this static
        (make_clipboard_widget): make it static
        (text_get_func): static
        (text_clear_func): static

        * gtk/gtkcolorsel.c (adjustment_changed): make this function
        static
        (hex_changed): make it static
        (hsv_changed): make it static
        (opacity_entry_changed): make it static

        * gtk/gtktextbtree.c (change_node_toggle_count): rename with _gtk
        (toggle_segment_check_func): rename with _gtk

        * gtk/gtktextchild.c (_pixbuf_segment_new): rename with _gtk
        (_widget_segment_new): rename
        (_widget_segment_add): rename
        (_widget_segment_remove): rename
        (_widget_segment_ref): rename
        (_widget_segment_unref): rename

        * gtk/gtktextmark.c (_mark_segment_new): Rename
        _gtk_mark_segment_new
2000-10-26 23:50:57 +00:00
Havoc Pennington
a291b0be4c add new marshallers used by the text widget
2000-10-26  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkmarshal.list: add new marshallers used by the text widget

	* gtk/gtktextbuffer.c (gtk_text_buffer_class_init): fix marshaller
	types

	* gtk/gtktexttagtable.c (gtk_text_tag_table_class_init): fix
	marshaller types

	* gtk/gtktextlayout.h, gtk/gtktextlayout.c, gtk/gtktextdisplay.h,
	gtk/gtktextdisplay.c: We need to preserve Tk copyrights and
	license on these files.

	* gtk/gtktextiter.c (gtk_text_iter_backward_search): Make this
	work.

	* gtk/gtktextbtree.c (gtk_text_btree_new): init stamps to
	runtime random number different for each tree, instead of
	a constant I made up.
2000-10-26 23:05:43 +00:00
Havoc Pennington
2fab0eb1fa make it a static function
2000-10-24  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextview.c (gtk_text_view_scroll_to_mark_adjusted): make
	it a static function

	* gtk/gtktextbtree.c (gtk_text_btree_tag): Gee, maybe we should
	redraw text when a tag is applied to it.

	* gtk/gtktexttag.c (gtk_text_tag_affects_size)
	(gtk_text_tag_affects_nonsize_appearance): private functions to
	see if a tag requires various kinds of redraw/layout to be queued
	up.

	* gtk/gtktexttag.h (struct _GtkTextTag): Remove relief crackrock

	* gtk/testtext.c (fill_example_buffer): Put the cursor
	at the start of the buffer, so search works by default

	* gtk/gtktextiter.c (lines_match): init match_start always

	* gtk/gtktextbuffer.c (gtk_text_buffer_get_iter_at_line_index): New
	function, get iter at a line + a byte index

	* gtk/gtktextiter.c (gtk_text_iter_set_line_index): New function,
	to set byte position within a line
	(gtk_text_iter_check): remove leftover G_BREAKPOINT thing
2000-10-24 22:44:14 +00:00
Havoc Pennington
7a4c689387 Some updates
2000-10-18  Havoc Pennington  <hp@redhat.com>

	* gtk/gtk-sections.txt: Some updates

	* gdk/gdk-sections.txt: remove GdkPixbufAlphaMode

	* gdk-pixbuf/gdk-pixbuf-sections.txt: Add new API, remove
	GdkPixbufClass/GdkAnimationClass since those are private

	* gdk-pixbuf/Makefile.am (IGNORE_HFILES): ignore more headers

2000-10-18  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextiter.c (gtk_text_iter_forward_to_newline): Fix a bug
	where any number of empty lines would get skipped

	* gtk/gtktextiter.h: Remove padding from GtkTextIter; live on the
	edge.

	* gtk/gtktextiter.c (gtk_text_iter_make_surreal): enhance the
	warning about invalid iterators (explain more thoroughly)
	(gtk_text_iter_in_region): rename gtk_text_iter_in_range

	* gtk/gtktextview.c (FOCUS_EDGE_WIDTH): Make focus rectangle less
	big

	* demos/*.c: Add error handling

	* gtk/gtktextbuffer.c: don't modify const iterators

	* gtk/gdk-pixbuf-loader.c: Add full error handling here

	* gtk/gtkimage.c (gtk_image_set_from_file): ignore errors
	on file load

	* gtk/gtkiconfactory.c: Update to reflect addition of error
	handling to gdk-pixbuf loaders

2000-10-16  Havoc Pennington  <hp@redhat.com>

	* gdk-pixbuf-io.c (gdk_pixbuf_get_module)
	(gdk_pixbuf_get_named_module) (gdk_pixbuf_load_module):
	add error reporting here also

	* make-inline-pixbuf.c (main): use GError

	* io-xpm.c: include unistd.h

	* gdk-pixbuf-util.c: include string.h

	* io-*.c: add error reporting

	* gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file): add
	error reporting

	* gdk-pixbuf-io.c (gdk_pixbuf_new_from_file): Add error reporting

	* gdk-pixbuf-io.h: Add GError** to load_increment and load
	methods

	* gdk-pixbuf-io.c (gdk_pixbuf_save) (gdk_pixbuf_savev): return
	a G_FILE_ERROR if we fail to write or close the file.

	* gdk-pixbuf.h: remove GDK_PIXBUF_ERROR_IO, instead we'll use
	G_FILE_ERROR_*. Rename enum to GdkPixbufError, properly following
	the GError naming rules. Add GError** to load functions.
2000-10-18 18:42:54 +00:00
Havoc Pennington
928c069883 clean up trailing whitespace, add extensive tests for tag toggle
2000-10-03  Havoc Pennington  <hp@redhat.com>

	* gtk/testtextbuffer.c: clean up trailing whitespace,
	add extensive tests for tag toggle iteration.

	* gtk/gtktextiter.c (MAX_LINEAR_SCAN): decrease linear scan
	distance

	* gtk/gtktextbtree.c (gtk_text_line_next_could_contain_tag):
	optimize case where the tag root is on level 1
	(gtk_text_line_previous_could_contain_tag): attempt to implement
	(gtk_text_line_next_could_contain_tag): Abstract out node_compare
	functionality

	* gtk/gtktextiter.c (gtk_text_iter_backward_to_tag_toggle):
	Implement this, though not very efficiently.

	* gtk/gtktextiterprivate.h: reformat

	* gtk/gtktextiter.c (gtk_text_iter_get_char): return 0 on the end
	iterator

	* gtk/gtktextbuffer.c (gtk_text_buffer_delete_interactive): Fix
	this to properly revalidate the iterators.

	* gtk/gtktextview.c (gtk_text_view_delete): fix control-K to work
	properly at the end of the line (and therefore on empty lines)

	* gtk/gtktextbtree.c (gtk_text_btree_get_selection_bounds): Gee,
	maybe we should return a value...
2000-10-04 14:23:09 +00:00
Havoc Pennington
8ebf77d13b text_window_* weren't static and should have been. Start work on child
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
2000-10-02 14:29:24 +00:00
Havoc Pennington
632fda6f0b Handle NULL start/end pointers
2000-09-30  Havoc Pennington  <hp@pobox.com>

* gtk/gtktextbtree.c (gtk_text_btree_get_selection_bounds): Handle
NULL start/end pointers

* gtk/gtktextbuffer.c: Write some docs
(gtk_text_buffer_get_selection_bounds): Allow start/end to be
NULL, so you can just check whether there's a selection.

* gtk/gtktextbtree.c (gtk_text_btree_remove_mark): No need to
cleanup_line or segments_changed ourselves, it gets done
in unlink_segment

* gtk/gtktextmark.h:
s/gtk_text_mark_deleted/gtk_text_mark_get_deleted/

* gtk/gtktextsegment.h: Clean up some indentation and naming mess

* gtk/gtktextmark.c: delete some more old Tk cruft

* gtk/gtktextbuffer.c (gtk_text_buffer_delete_mark): add ref to
mark before removing it, so we can emit MARK_DELETED with a valid
pointer.
(gtk_text_buffer_mark_set): hold ref across signal emission

* gtk/gtktextbtree.c (gtk_text_btree_remove_mark): improve
whining about attempts to delete special marks

* gtk/gtktextbuffer.c (_gtk_text_buffer_spew): Prepend with
underscore, since it's internal.

* gtk/gtktextbuffer.h: Remove find_string prototype, this is
now implemented in terms of iterators in gtktextiter.h

* gtk/gtktextbuffer.c (gtk_text_buffer_set_text):
New function, destructively sets contents of buffer. Also
a convenient way to clear the buffer by setting text to ""

* gtk/gtktextiter.c (gtk_text_iter_make_surreal): reformat
multiline string literal

* gtk/testtext.c (text_changed_callback): Redraw line numbers if
text changes.

* gtk/gtktextiter.c (forward_char): Return FALSE if new location
is not dereferenceable
(gtk_text_iter_forward_lines): fix return value
2000-09-30 17:08:25 +00:00
Havoc Pennington
244996ffec fix indentation
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
2000-09-30 00:17:22 +00:00
Havoc Pennington
78500e9045 Rename GtkTextStyleValues to GtkTextAttributes
2000-08-31  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextiter.h, gtk/gtktextiter.c, gtk/gtktextlayout.h,
	gtk/gtktextlayout.c, gtk/gtktexttag.h, gtk/gtktexttag.c,
	gtk/gtktexttagprivate.h, gtk/gtktextview.c:
	Rename GtkTextStyleValues to GtkTextAttributes
2000-08-31 17:08:45 +00:00
Havoc Pennington
41b5d5d26d cache end line, for rapid testing whether an iterator is the end iterator
2000-08-31  Havoc Pennington  <hp@pobox.com>

* gtk/gtktextbtree.c (GtkTextBTree): cache end line,
for rapid testing whether an iterator is the end iterator
(gtk_text_btree_new): init end line cache
(gtk_text_line_is_last): use fast cached line to
see if we're the last line.
(get_last_line): use cached line here too, should
speed up some random unrelated code.
2000-08-31 04:20:59 +00:00
Havoc Pennington
a10a7350f3 wrote lots of API docs, minor indentation fixes, inserted some FIXME about
2000-08-27  Havoc Pennington  <hp@pobox.com>

* gtk/gtktextiter.c, gtk/gtktextiter.h: wrote lots of API docs,
minor indentation fixes, inserted some FIXME about stuff I
realized was broken while documenting it.
(gtk_text_iter_get_pixmap): allow out params to be NULL, following
GTK convention
2000-08-28 03:44:06 +00:00
Havoc Pennington
a4762fbff4 update to reflect text widget changes.
2000-07-25  Havoc Pennington  <hp@redhat.com>

* gtk/testtext.c, gtk/testtextbuffer.c: update to reflect text
widget changes.

* gtk/gtktextview.h: To be consistent with usage of "line"
throughout the API to mean "newline-terminated thingy", change
MOVEMENT_LINE to be MOVEMENT_WRAPPED_LINE, and MOVEMENT_PARAGRAPH
to MOVEMENT_LINE.

(GtkTextView): Add flags for default editability, and whether to
show the cursor. Add functions to get/set that. Add

(gtk_text_view_get_iter_location): new function

* gtk/gtktexttypes.h: Move GtkTextLine typedef from here to
gtktextlayout.h
(g_convert): Add g_convert temporarily, will go in glib in a bit

* gtk/gtktexttagtable.h: include gtktexttag.h, and define
GtkTextTagTableForeach instead of brokenly using GHFunc.
Change gtk_text_tag_table_foreach() so it doesn't use GHFunc.

* gtk/gtktexttagprivate.h: Remove GtkTextStyleValues from here,
moved to public header.

* gtk/gtktexttag.h: Rename the "elide" attribute of tags to
"invisible", since "elide" was a bad name.
(gtk_text_tag_get_priority): Added

(GtkTextStyleValues): put this in public header, along with
functions to use it.

* gtk/gtktextmarkprivate.h: Include more headers, since we no
longer include gtktextbtree.h.

* gtk/gtktextmark.h: Add gtk_text_mark_ref, gtk_text_mark_unref,
gtk_text_mark_deleted

* gtk/gtktextlayout.h: Don't include the "really private" headers,
only buffer/iter. Forward declare GtkTextLIne and GtkTextLineData
to make this possible. Now we only need to install
gtktextlayout.h, not gtktextbtree.h and gtktext*private.h.
(However the Makefile.am isn't changed yet because of the
logistics of merging gtk-hp-patches piecemeal)

* gtk/gtktextiterprivate.h: include btree header, so it compiles;
rename gtk_text_iter_get_line to gtk_text_iter_get_text_line since
gtk_text_iter_get_line is now used in the public API for a
different purpose.

* gtk/gtktextiter.h: Clean up function names to be more
consistent. Always call char offset "offset" and byte index
"index". A "line" is always a line number.

(gtk_text_iter_is_last): new function, more efficient than
the existing way to check
(gtk_text_iter_is_first): new function, also more efficient

(gtk_text_iter_up_lines, gtk_text_iter_down_lines): Remove these

(gtk_text_iter_next_char, gtk_text_iter_prev_char): Renamed from
gtk_text_iter_forward_char, etc.

(gtk_text_iter_forward_to_tag_toggle): Renamed from
forward_find_tag_toggle, since this isn't a linear search

(GtkTextCharPredicate): rename from GtkTextViewCharPredicate

(gtk_text_iter_forward_search, gtk_text_iter_backward_search):
New functions, search for a buffer substring.

* gtk/gtktextbuffer.h: Add fields to store whether a paste is
interactive and default editable (since we need to store that info
until we receive the selection data).

Remove all the _at_char and at_line etc. versions of functions;
only have iterator versions.

Add _interactive() versions of functions, that consider the
editability of text. (FIXME add interactive flag to the
insert/delete signals per Darin's suggestion)

(gtk_text_buffer_get_tag_table): new function, demand-creates the
tag table if necessary

Remove declaration of gtk_text_buffer_get_iter_from_string

(_gtk_text_buffer_get_btree): private/internal function, added.


* gtk/gtktextbtree.h: Remove forward decl of GtkTextLineData.
(gtk_text_line_is_last): new function
2000-07-25 23:59:38 +00:00
Havoc Pennington
ee0895169d Use gunichar instead of gint when appropriate in the interfaces
2000-06-21  Havoc Pennington  <hp@redhat.com>

* gtk/gtktextiter.h: Use gunichar instead of gint when appropriate
in the interfaces

* gtk/gtktexttypes.c: Remove UTF functions, use glib
stuff instead when possible.

* gtk/gtktexttypes.h: Delete some unused constants

* gtktextbtree.c, gtktextiter.c, gtktextsegment.c, gtktextview.c,
testtextbuffer.c: use glib instead of custom unicode routines
2000-06-21 18:51:36 +00:00
Havoc Pennington
e86329d5d4 Test program to make sure GtkTextBuffer is in working order.
2000-06-02  Havoc Pennington  <hp@pobox.com>

        * gtk/testtextbuffer.c: Test program to make sure GtkTextBuffer
	is in working order.

	* gtk/testtext.c: Change to reflect anonymous mark API

	* gtk/gtktextview.c: Convert from mark names to GtkTextMark*.

	* gtk/gtktexttag.h (struct _GtkTextTag): remove the affects_size
	field, which was unused.

	* gtk/gtktextmarkprivate.h (GTK_IS_TEXT_MARK): add this macro,
	saves some typing.

	* gtk/gtktextbuffer.c: Switch from mark names to GtkTextMark*

	* gtk/gtktextbtree.c (gtk_text_btree_new): set the not_deleteable
	flag on the insertion point and selection bound

	Throughout, use GtkTextMark instead of GtkTextLineSegment, and
	make mark-manipulation functions take a GtkTextMark* instead of a
	mark name.

	* gtk/gtktextmarkprivate.h: Add a "not_deleteable" flag to
	GtkTextMarkBody; will be used to detect attempts to delete
	the permanent marks (insert and selection bound)
2000-06-02 17:27:21 +00:00
Havoc Pennington
9ae724bf4d Remove all references to offscreen flag which was no longer used.
Thu Jun  1 23:05:13 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c: Remove all references to
	offscreen flag which was no longer used.

	* gtk/gtkprivate.h (enum): Remove unused flags and compress.

	* gtk/gtkframe.c (gtk_frame_set_label_widget): Check
	for non-null label_widget->parent.

	* gtk/gtkentry.c: Get rid of code to deal with PangoAttribute
	which no longer was used.

	* gdk/gdkpango.c (gdk_pango_context_get_info): make static.

	* gdk/gdkpango.c (gdk_draw_layout[_line]): Add checks
	for null arguments.

	* gdk/x11/gdkgeometry-x11.c (gdk_window_scroll): add
	check for destroyed windows.

Thu Jun  1 13:48:45 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkimmulticontext.c: Add a finalize method and unref
	the slave context there.

	* gtk/gtkinvisible.[ch]: Make reference counting behavior
	identical to GtkWindow.

Thu Jun  1 01:54:11 2000  Owen Taylor  <otaylor@redhat.com>

	* Makefile.am gdk/gdkpango.c: Copy the layout render function from
	pangox to here, so we can write them independent of rendering
	system, using GDK primitives.

	* gdk/gdkdrawable.h gdk/gdkdraw.c gdk/gdkwindow.c
	gdk/x11/gdkdrawable-x11.c: Remove draw_layout() from the vtable,
	since we have a rendering-system independent implementation in
	terms of draw_glyphs().

	* gdk/gdkpango.c gdkdrawable.h (gdk_draw_layout_line): New
	function to render a single line.

	* gdk/x11/gdkpango.c: Move the guts of this file mostly
	into ../gdkpango.c, which simplifies things, since we
	don't have to deal with raw X gc's.

Fri May 19 04:28:16 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextlayout.[ch]: Add get_log_attrs() function to
	get the logical attributes for a given GtkTextLine.

Tue May 30 16:05:39 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkfont-x11.c (gdk_font_charset_for_locale): Track
	g_locale_get_codeset() to g_get_codeset() change.

Tue May 30 15:03:19 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/testcalendar.c (calendar_font_selection_ok): Use font
	descriptions.

	* gtk/gtkentry.c (gtk_entry_draw_text): Center text within
	the entry.

	* gtk/gtkfontsel.c (gtk_font_selection_dialog_init): Start of
	redoing (vastly simplifying) for Pango. Still needs quite
	a bit of work. (Size selection is currently poor. List of
	predefined sizes is not a good idea, since all of these
	sizes won't necessarily be distinct.)

Tue May 30 13:50:19 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkfont-x11.c (gdk_font_charset_for_locale): Handle
	CODESET results for LANG=C.

Mon May 29 15:49:10 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkrc.[ch]: Add a 'font_name' declaration to RC
	which takes a stringized pango font description;
	ignore the older 'font' and 'fontset' declarations.

	* gtk/gtkstyle.c gtk/gtkrc.c: Fill in the style->font
	field with a GdkFont derived via gdk_font_from_description(),
	for compatibility. (Should we just remove it entirely?
	Probably too much compatibility breakage, but people
	should be migrating to the new Pango stuff as quickly
	as possible.)

Mon May 29 15:47:41 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkentry.c gtk/gtkclist.c: s/pango_font_unref/g_object_unref/.

Mon May 29 15:44:46 2000  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcalender.c: Roughly pango-ized. Really needs
	redoing; there are some bugs in size allocation right
	now, the semi-existant distinction between header / day
	fonts was removed, but, with Pango, could actually
	be made functional in a nice way.

	* gtk/testcalender: Move calender from examples into this
	directory as a test program. (We really need to restrcture
	testgtk into a whole directory full of tests for every
	widget or functionality group, separated into multiple .c
	files.)

Mon May 29 15:19:56 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/testgtk.c (file_exists): Fix stupid typo that
	was keeping RC file from being loaded.

	* gtk/testgtkrc gtk/testgtkrc2: Test new pango-ized
	RC file font code.

Mon May 29 14:31:27 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkfont.h gdk/x11/gdkfont-x11.c (gdk_font_from_description):
	Add function to load a GdkFont from a PangoFontDescription.

Fri May 26 17:16:40 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/frame.[ch] gtkaspectframe.c: Make frame widgets able
	to have any widget for the label, use a GtkLabel widget
	to display the text. (Based partially on a patch from
	Anders Carlson.)

	(Quite a bit of code reorganization - strip 90% of the
	guts out of gtkaspectframe and add a single virtual
	func to GtkFrameClass - compute_child_allocation.)

Fri May 26 12:00:02 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkctree.c gtk/gtkclist.[ch]: Pangoized.
	(Removed clist->row_center_offset field because caching
	it wasn't saving time or code, added private function
	_gtk_clist_create_cell_layout()).

Wed May 24 15:59:37 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkaccellabel.c: Pangoized.

	* gtk/[hv]ruler.c: Pangoized

Mon May 22 19:23:59 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkfilesel.c (gtk_file_selection_init):
	Use gtk_clist_set_column_auto_resize() to remove need
	need for manual column width computations.

Mon May 22 18:50:26 2000  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktooltips.[ch]: Replace custom drawing with a GtkLabel,
	ensuring Pango correctness, and considerably simplifying the
	code.

	* gtk/gtklabel.c gtk[hv]scale.c: 1000 => PANGO_SCALE.

	* gtk/gtklabel.c (gtk_label_size_request): Fixed incorrect
	getting of numbers of lines.

	* gtk/gtklabel.c (gtk_label_size_request): Set the requisition
	to the actual requested width of the lable, not to the wrap
	width we set.

	* gtk/gtktextchild.h: Remove extraneous include of gtk/gtk.h.

	* gtk/gtktextbtree.c gtk/gtktextbuffer.c gtk/gtktextlayout.c
	  gtk/gtktextview.c gtk/gtktextview.[ch]: Fix up includes.

	* gtk/gtktextview.c: Fix structure inheritance.

	* gtk/gtkprogressbar.c: Pangoize.

Mon May 22 15:47:30 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextview.c (gtk_text_view_get_first_para_iter): Encapsulate
	in a function.

	* gtk/gtktextlayout.c (find_display_line_above): Fixed
	bug with computing line tops.

	* gtk/gtktextview.c (changed_handler): Fix < , <= confusion.

Thu May 18 18:53:31 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextdisplay.c (gtk_text_layout_draw): Fix up the x_offset
	and y_offset coordinates to do what we need now. (The offset between
	buffer and layout coordinates has been reintroduced, but is a
	bit different than before.)

	* gtk/gtktextview.[ch]: No longer inherit from GtkLayout; instead
	handle the adjustments ourselves, and scroll as necessary using
	the new gdk_window_scroll().

	The advantage of this is that when we are incrementally revalidating,
	we are essentially rearranging things around the visible portion
	of the screen. With the old setup, the visible portion of the
	screen was moved around in the layout, so scrolling and redrawing
	to track that caused jumping of the display. Since we now
	control the scrolling ourselves, we can suppress this and
	only redraw when things actually change.

Thu May 18 18:47:25 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextbtree.c (redisplay_mark): We need to invalidate
	the region not just redisplay it after-all, since we store the
	cursors in the LineDisplay. (Ugly interactions here between
	GtkLayout and GtkTextBTree here.)

	* gtk/gtktextbtree.c (redisplay_region): Fixed reversed comparison.

Thu May 18 18:43:21 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkwindow.h gdk/x11/gdkgeometry-x11.c (gdk_window_scroll):
	Added function to scroll contents of a window while keeping the
	window constant. Works by XCopyArea or guffaw-scrolling depending
	on the details of how the window is set up. (guffaw-scrolling
	still needs to be filled in.)

Wed May 17 22:36:53 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextiter.c gtk/gtkmain.c: Add a debug key for the text widget,
	move the debugging that was tied to a global variable
	to that.

	* gtk/gtkmarshal.list: Add NONE:INT,INT,INT

	* gtk/gtktextbtree.[ch] gtk/gtktextlayout.c: Keep a separate
	validated flag, in line data instead of setting height/width to
	-1. This allows us to perform operations with partially invalid
	buffer (using the old size for invalid lines) and thus to do
	incremental vaidation. Keep height/width aggregates up to date
	when deleting text and rebalancing the tree.

	* gtk/gtktextbtree.[ch]: Add functions validate a line
	(gtk_text_btree_validate_line), and to validate up
	to a number of pixels (gtk_text_btree_validate).

	* gtk/gtktextlayout.[ch]: Add an ::invalidated signal
	that indicates that something is changed and a revalidation
	pass is needed. Change ::need_repaint to ::changed, and
	make it take old and new yranges instead of a rectangle.

	* gtk/gtktextbtree.[ch] gtk/gtktextlayout.[ch]: Move
	the line_data_destroy() function from
	gtk_text_btree_add_view() to a virtual function in
	GtkTextLayout

	* gtk/gtktextbtree.[ch]: Remove gtk_text_btree_get_damage_range(),
	since we are handling partial repaints in a different fashion
	now.

	* gtk/gtktextbtree.[ch]: Only repaint the changed portion
	of the selection instead of queueing a repaint on the
	entire widget.

	* gtk/gtktextbuffer.[ch] gtk/gtktextbtree.[ch]: Move
	get_selection_bounds() down to btree, make the function
	in buffer a wrapper around the btree function.

	* gtk/gtktextlayout.[ch]: Add functions to check if the
	layout is valid and to recompute either a range of pixels
	aroudn a line or a certain total number of pixels.

	* gtk/gtktextlayout.[ch]: Cache a single line display;
	now that we only redraw the needed portions, the hit rate
	for this cache is quite high.

	* gtk/gtktextview.[ch]: Keep track of the first paragraph
	on the screen so that when re-laying-out the buffer, we can
	keep the same place. This requires connecting to ::value_changed
	on the adjustments

	* gtk/gtktextview.[ch]: Add idle functions to revalidate
	the buffer after we receive an ::invalidated signal.

Wed May 17 22:10:47 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtklayout.c (gtk_layout_size_allocate): Set upper
	to max of allocation and layout size, not just to the
	layout size.

	* gtk/gtk[hv]scrollbar.c (gtk_[hv]scrollbar_calc_slider_size):
	Invalidate window so it gets redrawn properly.

	* gdk/gdkwindow.c (gdk_window_invalidate_rect): Allow rect == NULL
	to mean the entire window.

	* gdk/gdkevents.h: Move definition for GDK_PRIORITY_REDRAW
	into public header.

Mon May 15 14:51:31 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextmark.c (gtk_text_mark_get_name): Add function
	to get the name of a mark.

	* gtk/gtktextlayout.c (gtk_text_layout_get_line_at_y): Add a function
	to find the paragraph from a y position.

Thu May 11 12:57:20 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextbtree.c (gtk_text_btree_node_invalidate_upward): Valid
	nodes have width/height >= 0, not > 0.

Tue May  9 21:29:06 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextlayout.[ch] gtk/gtktextdisplay.c (gtk_text_layout_get_line_display):
	Add a size_only flag, so when we only need the size, we don't create
	useless appearance attributes.

	* gtk/gtktextview.c (gtk_text_view_ensure_layout): Remove
	duplicate setting of font description.

	* gtk/gtkscale.c: Use PANGO_SCALE instead of 1000

Wed Apr 26 01:53:23 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/Makefile.am (EXTRA_DIST): Add OLD_STAMP into
	EXTRA_DIST. It does not work well when the file that
	everything depends on is not in the tarball.

Wed Apr 26 00:56:14 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/testgtk.c: Some hacks and fixes so that it basically
	works when not sitting in the GTK+ build tree.

2000-05-03  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextbtree.c (gtk_text_line_next_could_contain_tag):
	Properly determine the ordering of the tag root and the current
	line within the tree. Previous algorithm only worked if the tag
	root's immediate parent was the common root of both the current
	line and the tag root.

Wed Apr 26 00:43:00 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextlayout.c (set_para_values): Fix some bugs in
	alignment.

	* gtk/gtktextview.c (gtk_text_view_ensure_layout): Track
	the widget text directional dynamically.

	* gtk/gtktextview.[ch]: Added functions to get and set default
	wrap mode.

Tue Apr 25 23:47:38 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextlayout.c (gtk_text_layout_get_iter_location): Fix bug
	in cursor location computation.

Tue Apr 25 23:22:59 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtklayout.c (gtk_layout_set_size): Clamp hadjustment/
	vadjusment values properly when layout gets smaller.

	* gtk/gtktextview.c (need_repaint_handler): Areas being
	passed in are far completely inaccurate, and sometimes
	too small, so, for now, just queue a redraw on the
	whole visible region.

2000-04-25  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextbtree.c (summary_destroy): new function to
	destroy tag summary nodes
	(gtk_text_line_next_could_contain_tag): this function was
	totally broken if the line passed in wasn't below the tag
	root. Fix it.
	(gtk_text_btree_first_could_contain_tag): In the tag == NULL
	"wildcard" case, we have to do a linear scan. Blah.
	(gtk_text_btree_last_could_contain_tag): In tag == NULL case,
	we have to do the linear scan
	(tag_removed_cb): When a tag is removed from the tag table,
	remove the GtkTextTagInfo node from the btree.
	(gtk_text_btree_spew): Implement the spew function, for
	our debugging pleasure.

Tue Apr 25 19:40:18 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextlayout.c (gtk_text_layout_set_buffer): Fix
	a problem with referring to the wrong buffer.

	* gtk/gtkentry.c: Fix focus-in/focus-out confusion.

	* gtk/gtkrc.c gtk/gtkstyle.c: Moving setting default
	font description to gtk_style_new() - otherwise things
	don't work without a .gtkrc file.

	* gtk/gtktextbuffer.c (gtk_text_buffer_new): Sink the
	tags table if we create it ourself, too.

	* gdk/gdktypes.h (enum): Move GDK_RELEASE_MASK, since
	it was conflicting with XKB modifiers.

	* gtk/gtktextview.[ch]: Add simple support for
	GtkIMContext.

Mon Apr 24 19:34:18 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkentry.c (gtk_entry_move_cursor_visually): Fix problem
	with deletion from last commit.

Mon Apr 24 19:29:40 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_create_pango_context): Set the language
	in the context from the current locale.

	* gtk/gtkentry.c (gtk_entry_size_request): Use language from the
	context, not hardcoded value.

	* gtk/gtkentry.c (gtk_entry_move_cursor): Make character movement visual,
	not logical.

Sun Apr 23 23:39:18 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkentry.c gtk/gtktextdisplay.c: Don't handle selections as
	attributes - that doesn't handle partial-glyph selection
	properly. Instead use new pango_layout_line_get_x_ranges()
	functionality to draw the selection.

	* gtk/gtkentry.c: Simplify code since pango_layout_line_index_to_x()
	now properly handles out-of-range coordinates.

	* gtk/gtktextbuffer.c: Emit "mark_set" when the cursor is moved.

	* gtk/gtktextiter.h gtk/gtktextiterprivate.h: Make gtk_text_iter_get_line_byte()
	public.

	* gtk/gtktextlayout.[ch]: Properly set the direction in the PangoContext
	for paragraphs opposite to the base direction of the widget.

	* gtk/gtktextlayout.[ch] gtk/gtktextdisplay.c: Fixes for alignment.

	* gtk/gtktextlayout.c: Don't split segments on marks, since that
	causes Arabic words to reshape as you cursor through.

	* gtk/gtktextlayout.[ch] gtk/gtktextview.[ch]: Implement virtual
	cursor position when moving vertically with the arrow keys and
	scrolling with page-up/page-down. (Arrow keys save only the X,
	scrolling saves both X and Y.)

	This means you can line-up / line-down or page-up / page-down
	without losing your place, and also that moving vertically
	with the cursor keys keeps the same X position, not the same
	character count:

	* gtk/gtktextlayout.[ch] gtk/gtktextview.[ch]: Make vertical
	arrow keys move by display lines, not paragraphs.

Tue Apr 18 14:16:50 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtklayout.c: Make sure that the bin window is at least
	as big as the allocation. (Should we also make sure that the
	bin window is big enough to completely cover widget->window?)

	* gtk/gtktextview.c (gtk_text_view_get_visible_rect): Add
	function to get the onscreen rectangle.

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_pointer): Correctly account
	for offsets in window coordinates.

Sun Apr 16 16:13:27 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkentry.c (gtk_entry_get_cursor_locations): Fix index/offset
	confusion.

	* gtk/gtktextview.c (gtk_text_view_ensure_layout): Set the default direction
	from the widget direction.

	* gtk/gtktexttag.c gtk/gtktexttagprivate.h (gtk_text_tag_set_arg):
	Add a "direction" attribute.

	* gtk/gtktextview.c: global s/tkxt/text_view/.

	* gtk/testtext.c: Added long block of text in Arabic, to test out
	the direction attributes. (Some problems with the shaping system
	for arabic become obvious - like the fact the cursor splits words
	into unjoined pieces.)

Fri Apr 14 12:54:34 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextdisplay.c (render_layout): Add overstrike handling.

	* gtk/gtktextlayout.c: Fix up alignment.

	* gtk/testtext.c: Add some tests for centering, wrapping.

Fri Apr 14 09:26:22 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkdrawable.h gdk/gdkdraw.c gdk/gdkwindow.c gdk/x11/gdkdrawable-x11.c:
	Add a draw_glyphs() operation to the drawable vtable and gdk_draw_glyphs().
	If we wrote GTK+-specific layout-render function this could just replace
	the draw_layout() operation in the vtable.

	* gtk/gtkentry.c: Move guts of gtk_entry_get_cursor_locations to
	pango_layout_get_cursor_pos() and use that function.

	* gtk/gtktextchild.[ch]: add gtk_ onto pixmap_segment_new(), since it
	is a non-static symbol.

	* gtk/gtktextbtree.[ch]: Replace gtk_text_btree_find_line_data_by_y()
	with gtk_text_btree_find_line_by_y()

	* gtk/gtktextdisplay.c: Rewrote for Pango - uses a custom layout
	renderer that handles GtkTextAppearance attributes.

	* gtk/gtktexttag.[ch] gtk/gtktexttagprivate.h:

	  - Move the values in the style that don't affect geometry into a
	    GtkTextAppearance structure.
	  - Change underline to take a PangoUnderline and "font" a string
	    representation of a font description
	  - Add a "font_desc" attribute which takes a FontDescription structure.

	* gtk/gtktextlayout.[ch]:

	  - Get rid of the display-line list per each line. Instead, we
	    generate, on demand, a GtkTextLineDisplay structure which]
	    contains a PangoLayout * and other necesary information
	    (offsets, cursor locations) for displaying a paragraph.
	  - Get rid of the code to wrap lines, create display chunks,
	    etc. Instead, we just go through a paragraph and convert
	    it into the necessary inputs to a PangoLayout.
	  - Implement a new attribute type, GtkTextAttrAppearance. This
	    holds a GtkTextAppearance, and is used to pass colors,
	    stipple, etc, through from the layout to the display without
	    having to use lots and lots of individual attributes.
	  - Reimplement gtk_layout_get_iter_at_pixel() gtk_layout_get_iter_pos()
	    in terms of PangoLayout functions.

	* gtk/gtktextview.c:

	  - Handle passing the necessary PangoContext to the layout
	  - Some fixups in painting to deal with the automatic backing store
	    and offsetting of GTK+-1.4
	  - Add a style_set handler so that the default style reacts
	    properly to theme changes.

	* gtk/gtktext?*.[ch]: Random code-style fixes.

	* gtk/testtext.c: Substitute in languages that Pango handles now for Thai

Mon Apr 10 10:33:45 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktext?*.[ch]: Check in Havoc's port of the Tk text widget,
	in original form preparatory to Pango-ization and gdkimcontext-ization.

Thu Apr  6 19:25:39 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkimcontext.c: Move default implementations to real_* vfuncs,
	so that we can derive from gtkimcontext in language bindings properly.

Thu Apr  6 16:02:52 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkimcontextsimple.[ch]: Use gdk_keyval_to_unicode to gdk_unicode_to_keyval.
	Add a compose table including (almost) all the compose combinations
	from X. This is 6k of static, shared data as opposed to 50k or so of dynamic
	data in the XIM implementation.

	* gdk/gdk.h gdk/gdkkeyuni.c gdk/win32/gdkevents-win32.c (gdk_keyval_to_unicode, gdk_unicode_to_keyval):
	Moved functions to convert keyvalues from and to unicode here from
	the win32 port and made them public.

Wed Apr  5 16:37:29 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkeditable.c (gtk_editable_insert_text): Allow new_text_length == -1.

Wed Apr  5 16:27:45 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkimcontext.[ch]: Base class for new input context system

	* gtk/gtkimmulticontext.[ch]: Proxy input context that allows
	the real input context implementation to be loaded from modules
	and switched on the fly.

	* gtk/gtkcontextsimple.[ch]: Simple implementation of an input
	context that just does direct keysymbol => unicode translation.

	* gtk/gtkentry.[ch]: Start switching editing over to using
	GtkInputContext. (No handling of preedit yet.)

Wed Apr  5 15:48:41 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktypeutils.h (GTK_CHECK_GET_CLASS): Fix problem with one too
	many substitutions. (klass should not be subsituted.)

Wed Apr  5 00:18:14 2000  Owen Taylor  <otaylor@redhat.com>

	* configure.in: Add checks for Pango

	* configure.in docs/Makefile.am: Add test for sgml2html
	and allow 'make dist' without building html, but print out
	warnings in that case. (For making snapshots)

	* gdk/Makefile.am gdk/x11/Makefile.am gtk/Makefile.am:
	Add Pango libraries and C flags

	* gdk/gdkdraw.c gdk/gdkdrawable.h gdkwindow.c gdk/x11/gdkdrawable-x11.c:
	Add function (gdk_draw_layout) to draw a pango layout.

	* gdk/gdkpango.h gdk/x11/gdkpango-x11.c: New file with functions
	for getting Pango contexts for GDK.

	* gtk/gtkeditable.c: Get rid of dead code gtk_editable_parent_set()

	* gtk/gtkentry.[ch]: Complete rewrite to use Pango, add bidirectional
	editing.

	* gtk/gtkentry.c: Hack in simple Hebrew input with direct
	keysym => unicode translations. More languages can be added
	here, but real input-method support is needed.

	* docs/Changes-1.4.txt: Added note about entry behavior.

	* gtk/gtkenums.h gtk/gtkwidget.[ch] testgtk.c gtkprivate.h: Add functions
	to set the reading direction for a widget and the global direction.
	Add test which allows toggling the global direction. Two private
	flags are used to store the direction. (GTK_DIRECTION_SET + GTK_DIRECTION_LTR)

	* gtk/gtkcheckbutton.c gtk/gtkframe.c gtk/gtkhbbox.c gtk/gtkhbox.c
	  gtk/gtkradiobutton.c gtk/gtkspinbutton.c gtk/gtktable.c

	* gtk/gtk[hv]scale.c gtk/gtkscale.[ch]: Draw numbers using Pango

	* gtk/gtklabel.[ch]: Moved to Pango and considerably rewritten. Line breaking,
	underlining now handled by Pango.

	* gtk/gtkstyle.[ch] gtk/gtkrc.[ch]: Add a PangoFontDescription
	to RCStyle and Style. (Having both this and the old font name and GdkFont
	is temporary.)

	* gtk/gtkwidget.[ch] (gtk_widget_create_pango_{context,layout}): Added
	convenience functions for creating contexts and layouts for widgets.

	* gtk/testgtk.c: Enhance label tests with multilingual labels.
2000-06-02 03:14:07 +00:00