Commit Graph

31 Commits

Author SHA1 Message Date
Tim Janik
06718ecfed added accumulator data argument to g_signal_newc() functions.
Thu Mar  8 16:51:21 2001  Tim Janik  <timj@gtk.org>

        * *.c: added accumulator data argument to g_signal_newc()
        functions.

        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_set_model):
        * gtk/gtktreeview.c (gtk_tree_view_setup_model):
        * gtk/treestoretest.c (make_window):
        s/g_signal_connect/g_signal_connectc/.

        * gtk/gtktextbuffer.c: completed signal arg fixups,
        they also needed G_SIGNAL_TYPE_STATIC_SCOPE flag.
2001-03-08 16:36:17 +00:00
Tim Janik
35af5c4eba marshaller fixes.
Wed Mar  7 13:24:57 2001  Tim Janik  <timj@gtk.org>

        * gtk/*.c: marshaller fixes.

        * gtk/gtkmarshal.list: extreme cleanup.

        * gtk/gtktreeview.c (gtk_tree_view_class_init): disable interface
        param spec for now.

        * gtk/gtktexttag.c (gtk_text_tag_set_property): use g_value_get_boxed()
        where appliable.

        * gtk/gtktypeutils.[hc]: updates to GLib API changes.
        special cased autogenerated boxed types from gtktypebuiltins_ids.c
        which are not reference counted:
        GtkSelectionData, GdkEvent, GdkColor, GtkTextIter, PangoTabArray,
        PangoFontDescription, GtkTreeIter and GtkTreePath.

Thu Mar  1 03:58:56 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtktreeselection.h:
        * gtk/gtktreemodel.c:
        * gtk/gtktreedatalist.[hc]: fixed includes. no gobject/*
        file should be included directly, and gobject/gmarshal.h
        as well as gtk/gtkmarshal.h even can't be included directly.

        * Makefile.am: grr, install gtk-config-2.0.

        * gtk/testgtk.c:
        * gtk/simple.c:
        * gtk/gtkmenu.c:
        * gtk/gtkitemfactory.c: use g_object_connect() instead of
        passing "*signal*::*" args to gtk_widget_set().

        * gtk/gtktypeutils.[hc]: got rid of GTK_TYPE_SIGNAL.

        * gtk/*.c: removed trailer arg from property setters and getters.
        macro fixups.

Thu Mar  1 04:01:57 2001  Tim Janik  <timj@gtk.org>

        * test-gdk-pixbuf.c: fixed includes.
2001-03-07 14:49:21 +00:00
Havoc Pennington
4a3c8a367a remove validation idle
2001-02-08  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
	validation idle

	* demos/gtk-demo/main.c (create_tree): adjust to changes in text
	cell renderer

	* demos/pixbuf-demo.c (timeout): remove deprecated
	gtk_widget_draw

	* demos/testpixbuf-save.c (main): remove deprecated
	gtk_drawing_area_size

	* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
	buttons even if the model isn't setup. gtk_tree_view_check_dirty()
	at the start of the allocation.
	(gtk_tree_view_check_dirty): handle column->button == NULL, handle
	unsetup or NULL model.

	* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
	even/odd/sorted cells in the tree view.

	* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
	bugfixes

	* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
	backgrounds with draw_flat_box using different detail for even/odd
	rows.

	* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
	row, so we can draw the alternating colors thing

	* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
	property from a synonym property, notify for the synonym.
	Also, nuke the background_gdk_set and foreground_gdk_set synonyms
	(gtk_text_tag_get_property): Always return the font, even if
	all its fields aren't set

	* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
	store the attr list; it leaves us with no way to change attributes
	in _render according to the render flags, and no way to implement
	get_property. Instead store all the specific text attributes.
	Separate whether an attribute is enabled from its value. Sync all
	properties with GtkTextTag, make them all consistent, etc.

	* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
	renderers can highlight the sort row/column

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
	accessor functions to get values; this has the side effect of
	showing up which accessor functions were missing. Added those.

	* gtk/gtktreeviewcolumn.h: Replace set_justification with
	set_alignment, to be consistent with GtkLabel, GtkMisc

	* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
	arrow.

	* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h

	* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +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
18742b1dc3 rename member fields from GTK_WRAPMODE_WORD to GTK_WRAP_WORD, etc., seems
2001-01-20  Havoc Pennington  <hp@pobox.com>

	* gtk/gtktexttag.h (enum GtkWrapMode): rename member fields
	from GTK_WRAPMODE_WORD to GTK_WRAP_WORD, etc., seems nicer to
	me, matches Pango
2001-01-23 06:09:49 +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
f4b31ff5e6 offset the current invalid region, fixes redraw bug while scrolling the
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
2001-01-12 23:23:40 +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
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
f00175cf07 new directory to contain tests, gtk/test* should move here sometime (with
2000-12-20  Havoc Pennington  <hp@redhat.com>

	* tests: new directory to contain tests, gtk/test* should move
	here sometime (with appropriate on-cvs-server hackery)

	* tests/testtreeview.c, tests/Makefile.am: a test

	* configure.in (AC_OUTPUT): add tests/Makefile

	* gtk/gtktexttag.c (gtk_text_tag_get_property): Add "invisible"
	and "invisible_set" which were missing

	* gtk/gtkrbtree.h: some cheesy indentation fix
2000-12-21 01:53:39 +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
Tim Janik
2c9eb3a572 doh, this was broken beyond believe.
Tue Dec 12 23:46:44 2000  Tim Janik  <timj@gtk.org>

	* gtk/stock-icons/Makefile.am: doh, this was broken beyond believe.

	* gtk/gtkbox.c: change property types from (u)long to (u)int for
	::position and ::padding.

	* gtk/gtkcontainer.c: make ::border_width an INT property.

	* gtk/gtkpacker.c: make ::position an INT property.

	* gtk/gtkscrolledwindow.c (gtk_scrolled_window_adjustment_changed):
	guard against NULL h/v scrollbars, since this is used at construction
	time.

	* gtk/gtkclist.[hc]: nuked gtk_clist_construct(), implemented
	internal gtk_clist_constructor().

	* gtk/gtkctree.[hc]: nuked gtk_ctree_construct(), implemented
	gtk_ctree_constructor().

	* gtk/gtkprogressbar.c (gtk_progress_bar_class_init): property
	::pulse_step should use ARG_PULSE_STEP, not ARG_FRACTION.

	* docs/reference/Makefile.am: fun stuff, disabled docs generation
	again, gtk-scan.c needs to introspec paramspecs, not GtkAgs.

	* gtk/gtkwidget.[hc]:
	removed gtk_widget_setv(), gtk_widget_getv(), gtk_widget_newv()
	and gtk_widget_get().
	(gtk_widget_new): use g_object_new_valist().
	(gtk_widget_set): use g_object_set_valist().

	* gtk/gtkobject.[hc]:
	removed gtk_object_arg_get_info(), gtk_object_getv(),
	gtk_object_query_args(), gtk_object_newv(),
	gtk_object_class_add_signals(),
	gtk_object_class_user_signal_new(),
	gtk_object_class_user_signal_newv(),
	gtk_object_arg_set(), gtk_object_arg_get(),
	gtk_object_args_collect(),
	gtk_object_default_construct(),
	gtk_object_constructed(),
	GTK_CONSTRUCTED and GTK_OBJECT_CONSTRUCTED().
	removed nsignals, signals and n_args members from GtkObjectClass.
	(gtk_object_new): use g_object_new_valist().
	(gtk_object_set): use g_object_set_valist().
	(gtk_object_get): use g_object_get_valist().

	* gtk/gtkcompat.h: define gtk_object_default_construct().

	* gtk/gtktypeutils.c (gtk_type_new): create constructed objects via
	g_object_new().

	* gtk/*.c: removed gtk_object_class_add_signals() from class_init()
	fucntions, cleaned up method assignments (make sure your structures
	are setup properly before calling out). removed all GTK_CONSTRUCTED
	hacks ;)
2000-12-13 01:34:41 +00:00
Havoc Pennington
fe8da19f2a Draw underlines one pixel higher.
2000-11-14  Havoc Pennington  <hp@redhat.com>

	* gdk/gdkpango.c (gdk_draw_layout_line): Draw underlines one pixel
	higher.

	* gtk/gtktextdisplay.c (render_layout_line): Take rise into
	account. Also, render rise, underline, background, etc. for
	pixbufs as well as text. Also, draw underlines one pixel higher.

	* gtk/gtktextlayout.c (gtk_text_layout_get_line_display): Add a
	PangoAttribute for the rise, so it gets drawn properly. Also,
	add the GtkTextAppearance attribute for pixbuf/widget segments
	as well; we should go ahead and have rise, underline, background,
	stipple work for those

	* gtk/gtktexttag.c: Rename "offset" property to "rise" to match
	Pango
2000-11-15 00:23:37 +00:00
Havoc Pennington
73a00eeb44 fix bug where GC didn't always get updated properly
2000-11-13  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextdisplay.c (gtk_text_render_state_update): fix bug
	where GC didn't always get updated properly

	* demos/gtk-demo/textview.c (create_tags): Use subattributes
	of fonts instead of setting the entire font

	* gtk/testtext.c (fill_example_buffer): Use "size" instead of
	setting entire font

	* gtk/gtkdialog.c (gtk_dialog_add_button): Fix some warnings

	* gtk/gtktexttag.h, gtk/gtktexttag.c: Explode font_desc into
	a bunch of individually-settable font attributes. You can still
	use the "font" and "font_desc" args, they just set all the font
	attributes at once.
2000-11-14 01:08:28 +00:00
Havoc Pennington
15e0004b10 Free the filename of the module file.
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.
2000-11-13 18:49:52 +00:00
Havoc Pennington
167e741e93 Add visible and visible_set args, don't know where these had gone, I
2000-11-08  Havoc Pennington  <hp@pobox.com>

* gtk/gtktexttag.c (gtk_text_tag_class_init): Add visible and
visible_set args, don't know where these had gone, I thought they
used to be there

* gtk/testtext.c: Add a menu item to apply invisibility tag;
now we can test the feature and see that it's totally broken.
2000-11-09 04:51:53 +00:00
Havoc Pennington
6c9d8adc49 Docs (gtk_text_tag_table_size): return a signed int
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.
2000-11-03 23:31:06 +00:00
Havoc Pennington
820e79a467 Use GTK_TYPE_TEXT_ITER and BOXED marshallers
2000-11-01  Havoc Pennington  <hp@pobox.com>

* gtk/gtktextbuffer.c (gtk_text_buffer_class_init): Use
GTK_TYPE_TEXT_ITER and BOXED marshallers

* gtk/gtktexttagtable.c (gtk_text_tag_table_class_init): ditto

* gtk/gtktexttag.c (gtk_text_tag_class_init): ditto

* gtk/gtk-boxed.defs: add GtkTextIter

* gtk/gtkmarshal.list: Add marshallers for text widget that
properly use OBJECT and BOXED
2000-11-02 02:38:22 +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
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
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
9bec105a66 Draw the focus, and leave space to do so.
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
2000-09-25 17:17:13 +00:00
Jonathan Blandford
8ff6644c76 gtk/gtktextdisplay.c gtk/gtktextlayout.c gtk/gtktexttag.c gtk/gtktexttag.h
2000-09-08  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktextdisplay.c
	* gtk/gtktextlayout.c
	* gtk/gtktexttag.c
	* gtk/gtktexttag.h
	* gtk/testtext.c: Change the overstrike property to strikethrough,
	to closer match pango.
2000-09-08 23:29:46 +00:00
Owen Taylor
21b538970e Doc comment fixing. (Mostly non-matching parameter names.)
Thu Sep  7 11:47:02 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextbuffer.c gtk/gtkimcontext.c gtk/gtkwidget.c:
	Doc comment fixing. (Mostly non-matching parameter names.)

	* gtk/gtkcalendar.c gtk/gtklist.c gtk/gtknotebook.c: Modify
	comments a little to avoid looking like a doc comment.

	* gtk/gtkspinbutton.h (GTK_INPUT_ERROR): Change INPUT_ERROR to
	GTK_INPUT_ERROR. (Should the mechanism for erros in spin button
	conversions be changed to GError?)

	* gtk/gtkcolorsel.c (GTK_CUSTOM_PALETTE_WIDTH/HEIGHT):
	Move private #defines into .c file.

	* gtk/gtktexttag.c (gtk_text_tag_class_init): Alphabetize
	order of argument addition, remove duplicates.

	* gtk/gtkaspectframe.h (struct _GtkAspectFrameClass):
	parent class is FrameClass, not BinClass.

	* gtk/gtk.h: Add gtkinvisible, which was missing.
	(It's occasionalyl useful for client apps, if seldom.)

	* gdk/gdktypes.h: Remove obsolete GDK_CORE_POINTER
	#define.
2000-09-07 18:07:59 +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
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
Owen Taylor
b02ebc65e4 Call gtk_widget_size_request() on reparented child, if one. Otherwise,
Sun Jul  2 14:37:58 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkoptionmenu.c (gtk_option_menu_size_request): Call
	gtk_widget_size_request() on reparented child, if one. Otherwise,
	queue_resize() on the child never results in it getting size-requested
	at all.

	* gtk/testgtk.c (build_option_menu): Remove silly radio-menu-items
	in option menus, so that (with luck) people won't copy it into
	their apps in the future.

	* gtk/gtkoptionmenu.c: Connect ::size_request on the menu
	to gtk_option_menu_calc_size. This isn't perfect, but should fix
	a lot of problems with changing the size of the menu's menu
	items after adding it to the option menu.

	* gtk/gtktexttag.c: Include gtkmain.h for gtk_get_default_language().

	* gtk/gtkwidget.[ch]: Add a ::direction_changed that triggers when
	the text direction for a widget changes.

	* gtk/gtk{entry.c,label.[ch],textview.[ch]} gtk/testgtk.c: Use
	::direction_changed to get rid of various hacks.
2000-07-02 18:41:29 +00:00
Havoc Pennington
443e8c395e Use gtk_get_default_language
2000-06-21  Havoc Pennington  <hp@redhat.com>

* gtk/gtkwidget.c (gtk_widget_create_pango_context): Use
gtk_get_default_language

* gtk/gtkmain.h, gtk/gtkmain.c (gtk_get_default_language):
new function to get the default language

* gtk/gtktexttagprivate.h, gtk/gtktexttag.c, gtktextview.c:
s/gtk_text_view_style_values/gtk_text_style_values/

* gtk/gtktexttag.c, gtk/gtktexttag.h, gtk/gtktexttagprivate.h:
Add a "language" field to tags.

(gtk_text_tag_set_arg): Fix bug in setting
"bg_full_height_set" tag.
2000-06-21 20:41:15 +00:00
Havoc Pennington
df4fc36721 Make this compile without framebuffer enabled
2000-06-20  Havoc Pennington  <hp@redhat.com>

* modules/linux-fb/Makefile.am: Make this compile
without framebuffer enabled

* gdk/linux-fb/Makefile.am: Add conditional to not build
framebuffer unless specified in configure

* gdk/gdkdraw.c (gdk_draw_drawable): Fix bug where I was getting
the size of the target instead of source if -1 was passed for
width/height

* gdk/x11/gdkgeometry-x11.c (gdk_window_compute_position): Fix
width/height confusion.

2000-06-19  Havoc Pennington  <hp@redhat.com>

* gdk/x11/gdkx.h (GDK_WINDOW_XWINDOW): change this to be
GDK_DRAWABLE_XID. In the future, we probably want to make it
faster with G_DISABLE_CHECKS turned on.

2000-06-14  Havoc Pennington  <hp@redhat.com>

        * gdk/Makefile.am: add gdkpixmap.c

	* gdk/gdk.c: s/gdk_window_init/_gdk_windowing_window_init/
	s/gdk_image_init/_gdk_windowing_image_init

	* gdk/gdkcolor.c: make ref/unref compat wrappers for GObject
	ref/unref

	* gdk/gdkcolor.h: make GdkColormap a GObject subclass

	* gdk/gdkcompat.h: remove GdkWindowType compat, since
	GdkWindowType is now non-deprecated;
	change gdk_window_get_type() compat to be
	gdk_window_get_window_type().

	* gdk/gdkdnd.h: make GdkDragContext a GObject.

	* gdk/gdkdraw.c, gdk/gdkdraw.h: Convert GdkDrawable to a pure
	virtual GObject. Make all functions call into the vtable.
	Move gdk_image_put() guts in here. Remove GdkDrawableType
	and gdk_drawable_get_type(), these are now GdkWindow-specific.
	draw_image, get_depth, get_size, set_colormap, get_colormap,
	get_visual added to the vtable.

	* gdk/gdkgc.h, gdk/gdkgc.c: Convert GdkGC to a pure virtual
	GObject. Virtualize everything.
	(gdk_gc_new_with_values): remove check for destroyed window,
	because now GdkWindow::create_gc will check this.
	(gdk_gc_set_values): New function to set GC values, this
	was already implemented but wasn't in the header

	* gdk/gdkimage.h, gdk/gdkimage.c: Convert GdkImage to a GObject.

	* gdk/gdkinternals.h: Remove _gdk_window_alloc(), remove
	_gdk_window_draw_image(), remove _gdk_windowing_window_class,
	remove _gdk_window_class; add _gdk_window_impl_get_type() and
	_gdk_pixmap_impl_get_type(). Rename gdk_window_init to
	_gdk_windowing_window_init, rename gdk_image_init to
	_gdk_windowing_image_init.

	* gdk/gdkpango.c: Reflect GObject-ification of PangoContext.
	(gdk_draw_layout): Remove check for destroyed window,
	because all the drawable methods already check it.

	* gdk/gdkpixmap.h, gdk/gdkpixmap.c: Convert GdkPixmap to GObject.
	Add gdkpixmap.c which contains implementation of GdkDrawable
	virtual table (by chaining to a platform-specific implementation
	object).

	* gdk/gdkprivate.h: Remove GDK_IS_WINDOW, GDK_IS_PIXMAP,
	GDK_DRAWABLE_DESTROYED. Add GDK_WINDOW_DESTROYED. Replace
	GDK_DRAWABLE_TYPE with GDK_WINDOW_TYPE. Remove GdkDrawablePrivate,
	GdkWindowPrivate, GdkImageClass, GdkImagePrivate, GdkGCPrivate,
	GdkColormapPrivate.

	* gdk/gdktypes.h: #include <glib-object.h>

	* gdk/gdkwindow.h, gdk/gdkwindow.c: Convert GdkWindow to GObject.
	Move most functionality to platform-specific implementation
	object. GdkWindow itself now handles the backing store, then
	chains to the platform-specific implementation.
	(gdk_window_get_window_type): return GdkWindowType of the window.
	(gdk_window_peek_children): New routine, returns the children of
	a GdkWindow
	(gdk_window_get_children): Was in X11-specific code and did
	XQueryTree. Changed to simply return a copy of window->children;
	so it can go in cross-platform code.

	* gdk/x11/Makefile.am: fix broken MKINSTALLDIRS path

	* gdk/x11/gdkcolor-x11.c: implement X-specific parts of
	GdkColormap; just changed to use the new private data instead
	of casting to GdkColormapPrivate.

	* gdk/x11/gdkcursor-x11.c: added a couple typechecks to
	gdk_cursor_new().

	* gdk/x11/gdkdnd-x11.c: Change the way we access private fields
	(private data member in the GObject).
	(xdnd_manager_source_filter): Function had broken
	error handling, fix it (use gdk_error_trap_push).

	* gdk/x11/gdkdrawable-x11.c: This file now implements
	a base class for GdkWindowImplX11/GdkPixmapImplX11. This
	base class is purely for the convenience of the X port,
	and not part of the interface to cross-platform GDK.

	* gdk/x11/gdkevents-x11.c: Reflect various renamings.

	* gdk/x11/gdkgc-x11.c: Implement a subclass of GdkGC that's
	specific to X, and returned by the create_gc virtual method
	of GdkDrawableImplX11.
	(gdk_x11_gc_set_dashes): Change this to take an array of gint8
	rather than gchar, this was also changed in the GdkGC vtable.
	(gdk_x11_gc_values_to_xvalues): If GdkGCValues is NULL, or the
	mask is 0, return immediately, instead of checking every flag.
	This is faster, and keeps us from segfaulting if values is NULL
	and the mask contains some nonzero flags.

	* gdk/x11/gdkgeometry-x11.c: deal with all the rearranging of
	GdkWindow.

	* gdk/x11/gdkglobals-x11.c: change type of grab window, since
	GdkWindowPrivate is gone.

	* gdk/x11/gdkim-x11.c: rename things that got renamed.

	* gdk/x11/gdkimage-x11.c: implement in terms of GObject, and
	remove the image_put stuff that got transferred to GdkDrawable.

	* gdk/x11/gdkinput.c: renamings

	* gdk/x11/gdkmain-x11.c: #include <pango/pangox.h>

	* gdk/x11/gdkpixmap-x11.c: GObject conversion

	* gdk/x11/gdkprivate-x11.h: indentation fixes

	* gdk/x11/gdkproperty-x11.c: renamings

	* gdk/x11/gdkselection-x11.c: renamings

	* gdk/x11/gdkwindow-x11.c: Restructuring and renaming; this now
	implements the platform-specific "impl" object.
	Moved gdk_window_get_children to gdk/gdkwindow.c

	* gdk/x11/gdkx.h: Remove all the private structs and private datas
	that no longer exist. Add declaration of GdkGCX11 object here.
	Fix all the macros to still work.

	* gtk/gtk-boxed.defs: Remove GtkStyle, GdkColormap, GdkWindow,
	GdkDragContext from the boxed types since they are now GObjects.

	* gtk/gtkstyle.h, gtk/gtkstyle.c: Converted GtkStyle to a GObject,
	moved xthickness/ythickness into the instance. GtkStyleClass
	functions are now in the standard vtable for GtkStyle, so you have
	to create a GObject subclass to write a theme engine.
	(gtk_style_copy): fixed a leaked PangoFontDescription
	(gtk_style_init): renamed gtk_style_realize, so gtk_style_init
	can be the standard GObject function.

	* Throughout GTK:
	s/style->klass->[xy]thickness/style->[xy]thickness
	s/pango_layout_unref/g_object_unref/

	* gtk/gtkrc.h, gtk/gtkrc.c: Converted GtkRcStyle to a GObject.

	* gtk/gtksocket.c: Use gdk_window_get_user_data() instead of
	accessing GDK internals.

	* gtk/gtkwidget.c: Use gdk_window_peek_children() instead of
	accessing GDK internals.
2000-06-20 21:04:44 +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