Commit Graph

862 Commits

Author SHA1 Message Date
Alexander Larsson
b299835e86 Implemented drag and drop. Seems to be mostly working. I sometimes get an
2001-01-15  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkdnd-fb.c:
	Implemented drag and drop.
	Seems to be mostly working. I sometimes get an assert from gtkdnd.c:2664
	when it tries to free and then copy the same event (info->last_event).
	I am not sure about why	this happens, but will continue looking.
2001-01-15 15:46:28 +00:00
Alexander Larsson
6a184ba228 Use gdk_window_invalidate_rect instead of gdk_window_invalidate_rect_clear
2001-01-15  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkwindow-fb.c:
	Use gdk_window_invalidate_rect instead of
	gdk_window_invalidate_rect_clear to minimise flashing.
	When hiding windows you need to clear the root window though.
2001-01-15 10:22:15 +00:00
Alexander Larsson
c288355ffd For optization, add an full_shapes argument to gdk_fb_clip_region. If this
2001-01-15  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkdrawable-fb2.c:
	For optization, add an full_shapes argument to gdk_fb_clip_region.
	If this is false, only the cliprects of the shapes are used.

	* gdk/linux-fb/gdkprivate-fb.h:
	Export gdk_fb_window_peek_shape.
	Add full_shapes to gdk_fb_clip_region.

	* gdk/linux-fb/gdkwindow-fb.c (gdk_fb_window_move_resize):
	When moving a window, don't clear everything under the it, just the
	root window. Makes stuff faster and flash less.
	(gdk_window_get_pointer): Correctly handle offseted shapes, due to
	USE_CHILD_SHAPE. (gdk_fb_window_peek_shape): Return the correct
	offset of the shape.
2001-01-15 09:54:28 +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
Alexander Larsson
8e1a69c28b Hide mouse pointer while rotation. Show it afterwards.
2001-01-12  Alexander Larsson  <alla@lysator.liu.se>

	* gdk/linux-fb/gdkmain-fb.c (gdk_fb_set_rotation):
	Hide mouse pointer while rotation. Show it afterwards.
2001-01-12 15:55:56 +00:00
Alexander Larsson
058c2d9320 Take shaped windows in consideration when generating clip region.
2001-01-12  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_clip_region): Take shaped
	windows in consideration when generating clip region.

	* gdk/linux-fb/gdkfb.h:
	Huge HACK. Added GDK_FB_USE_CHILD_SHAPE.

	* gdk/linux-fb/gdkprivate-fb.h:
	Add shape to GdkWindowFBDatat.
	exported gdk_fb_window_get_abs_shape().
	removed gdk_fb_draw_lines declaration.

	* gdk/linux-fb/gdkwindow-fb.c (gdk_window_impl_fb_init):
	Init shape to NULL. (gdk_fb_window_send_crossing_events): Don't
	send focus changes when there is a grabbed window.
	(gdk_window_get_pointer): Handle shaped windows.
	(gdk_fb_region_create_from_bitmap): Convert bitmap to region.
	(gdk_fb_window_peek_shape): Returns the shape for a window,
	handles GDK_FB_USE_CHILD_SHAPE.
	(gdk_fb_window_get_abs_shape): Returns the shape of the window,
	offseted to absolute positions. Handles GDK_FB_USE_CHILD_SHAPE.
	(gdk_window_shape_combine_mask): Implement.

	* gtk/gtkwindow-decorate.c:
	HACK! Set GDK_FB_USE_CHILD_SHAPE on window->frame to make sure
	setting the shape of a window makes the window transparent.
2001-01-12 15:45:26 +00:00
Alexander Larsson
b29eece81f Added ENABLE_SHADOW_FB
2001-01-11  Alexander Larsson  <alexl@redhat.com>

	* acconfig.h:
	Added ENABLE_SHADOW_FB

	* configure.in:
	Added --disable-shadowfb

	* gdk/linux-fb/gdkcursor-fb.c:
	Update shadowfb when updating cursor

	* gdk/linux-fb/gdkdrawable-fb2.c:
	Added wrappers for shadowfb that calls 	the normal drawable
	methods, but calls gdk_shadow_fb_update(bounding box) when
	GdkWindows are drawed to.
	Moved gdk_draw_glyphs implementation to _gdk_draw_glyphs
	which also returns the bounding box.

	* gdk/linux-fb/gdkfb.h:
	Added GdkFBAngle type and gdk_fb_set_rotation declaration.

	* gdk/linux-fb/gdkgeometry-fb.c:
	Update shadowfb when scrolling window.

	* gdk/linux-fb/gdkglobals-fb.c:
	Add _gdk_fb_screen_angle.

	* gdk/linux-fb/gdkkeyboard-fb.c:
	Test code for screen rotation. Shift-F2 in the xlate driver
	rotates the screen.

	* gdk/linux-fb/gdkmain-fb.c:
	Handle shadowfb. Add gdk_fb_set_rotation(). Remove CM and RP.

	* gdk/linux-fb/gdkmouse-fb.c:
	Use fb_width/height instead of modeinfo.xres/yres.

	* gdk/linux-fb/gdkprivate-fb.h:
	Added fb_men, fb_width, fb_height & fb_stride. When using
	shadow fb these can differ from the framebuffer stuff.
	Declarations for gdk_shadow_fb_update, gdk_shadow_fb_init,
	gdk_shadow_fb_stop_updates, gdk_fb_recompute_all,
	_gdk_fb_screen_angle. Removed CM, RP.

	* gdk/linux-fb/gdkrender-fb.c:
	Added code for shadowfb handling and screen rotation using
	shadowfb.

	* gdk/linux-fb/gdkwindow-fb.c:
	Use fb_mem, fb_stride, fb_width, fb_height.
	Added recompute_rowstride to reset the rowstride of all windows.
	Added gdk_fb_recompute_all() which recomputes rootwindow size,
	window abs positions and window rowstrides. Usefull when the
	rotation has changed.
2001-01-11 16:39:21 +00:00
Tor Lillqvist
0056107b5d Implement better mouse capturing. Do use SetCapture(). Thanks to
2001-01-09  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c: Implement better mouse
	capturing. Do use SetCapture(). Thanks to jpe@archaeopteryx.com.
	(find_window_for_pointer_event): New function.
	(gdk_event_translate): Use it when handling mouse events.
2001-01-09 16:45:44 +00:00
Alexander Larsson
7e3eadd61c Added --with-included-loaders option
2001-01-09  Alexander Larsson  <alla@lysator.liu.se>

	* configure.in:
	Added --with-included-loaders option

	* gdk-pixbuf/Makefile.am:
	* gdk-pixbuf/gdk-pixbuf-io.c:
	Add support for including selected gdk-pixbuf loaders only.

	* gtk/gtkwindow.c (gtk_window_set_frame_dimensions,
	gtk_window_set_has_frame):
	Added inline documentation.

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_decorations):
	* docs/reference/gdk/tmpl/windows.sgml:
	Added inline documentation.
2001-01-09 09:53:28 +00:00
Alexander Larsson
49bb8dfa19 Correct filename ~/.pangoft2_aliases
2001-01-08  Alexander Larsson  <alexl@redhat.com>

	* docs/README.linux-fb:
	Correct filename ~/.pangoft2_aliases

	* gdk/gdkwindow.h:
	Added new function gdk_window_get_decorations.

	* gdk/linux-fb/gdkfb.h:
	Removed _gdk_window_get_decorations declaration.
	Renamed _gdk_window_set_child_handler to
	gdk_fb_window_set_child_handler.

	* gdk/linux-fb/gdkwindow-fb.c:
	Renamed _gdk_window_set_child_handler to
	gdk_fb_window_set_child_handler.

	* gdk/x11/gdkwindow-x11.c:
	New function gdk_window_get_mwm_hints().
	Implemented gdk_window_get_decorations.

	* docs/reference/gdk/tmpl/windows.sgml:
	* docs/reference/gdk/gdk-sections.txt:
	Added gdk_window_get_decorations docs.
2001-01-08 16:42:08 +00:00
Alexander Larsson
94dfd3dd82 Possibly send focus events when the mouse moves from one window to
2001-01-08  Alexander Larsson  <alla@lysator.liu.se>

	* gdk/linux-fb/gdkwindow-fb.c (_gdk_fb_window_find_focus,
	gdk_fb_window_find_focus, gdk_fb_send_focus_change,
	gdk_fb_window_send_crossing_events):
	Possibly send focus events when the mouse moves from one
	window to another.
2001-01-08 11:12:21 +00:00
Tor Lillqvist
c921abb888 Adapt calls to g_{locale,filename}_{to,from}_utf8 to match current API.
2001-01-07  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_title,
	gdk_window_new): Adapt  calls to g_{locale,filename}_{to,from}_utf8
	to match current API.

	* gdk/win32/gdkvisual-win32.c (gdk_visual_init): If a secret
	environment variable is set, don't call g_error when on a
	palettized (PseudoColor) display. Some people want to use GTK+
	in 256-colour mode even though works only partially.

	* gdk/gdk.def
	* gtk/gtk.def
	* gtk/makefile.mingw.in: Update.
2001-01-07 18:00:15 +00:00
Alexander Larsson
30888237b9 free colormap in here. Sync from X port. (gdk_fb_set_colormap): allow the
2001-01-05  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_drawable_finalize): free
	colormap in here. Sync from X port.
	(gdk_fb_set_colormap): allow the colormap to be NULL if you like.
	Sync from X port.
	(gdk_fb_clip_region): Comment out g_warning about empty clip region.
	This happens now and then, and i don't think it is a bug.
	(gdk_fb_draw_polygon): Correctly add extra point if startpoint
	!= endpoint.
	(gdk_fb_draw_lines): Don't draw dashed lines if line_style is
	GDK_LINE_SOLID.

	* gdk/linux-fb/gdkfont-fb.c: Return bogus GdkFont that has
	some of the fields filled in at least.

	* gdk/linux-fb/miwideline.c: The widths argument to miLineArcI, and
	miLineArcD is no more, remove it from the function definition.
2001-01-05 14:01:36 +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
a7aa33f14e Havoc Pennington <hp@redhat.com>
* gtk/Makefile.am (LDFLAGS): add @LIBTOOL_EXPORT_OPTIONS@

	* gdk/Makefile.am (LDFLAGS): add @LIBTOOL_EXPORT_OPTIONS@

	* configure.in (LIBTOOL_EXPORT_OPTIONS): define
	LIBTOOL_EXPORT_OPTIONS with options to control symbol export
2001-01-02 16:15:35 +00:00
Tor Lillqvist
ee4c69b68e New function, as in the X11 backend. (gdk_window_new,
2000-12-30  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c
	(gdk_window_impl_win32_get_visible_region): New function, as in
	the X11 backend.
	(gdk_window_new, gdk_window_set_title): Use g_locale_from_utf8()
	instead of duplicating the same code here.

	* gdk/win32/gdkwin32.h (GDK_COLORMAP_PRIVATE_DATA): Use
	GDK_COLORMAP macro.

	* gdk/win32/gdkevents-win32.c (gdk_event_funcs): Use NULL as
	destroy function.
	(gdk_event_translate): Use GDK_COLORMAP_PRIVATE_DATA to correctly
	access that.

	* gtk/gtk.def: Update.

	* gtk/makefile.mingw.in: Use glib-genmarshal from $(GLIB)/gobject.

2000-12-26  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkvisual-win32.c (gdk_visual_init): Call g_error if
	we are on a palettized display ("PseudoColor" in X11), as the code
	for that doesn't work anyway, and never has.

2000-12-30  Tor Lillqvist  <tml@iki.fi>

	* gdk_pixbuf.def: Update.
2000-12-30 20:06:14 +00:00
Havoc Pennington
d5be411c7b Set the system colormap on input only windows, to avoid special cases all
2000-12-30  Havoc Pennington  <hp@pobox.com>

* gdk/x11/gdkwindow-x11.c (gdk_window_new): Set the system
colormap on input only windows, to avoid special cases all over
the code for these windows.
2000-12-30 15:44:41 +00:00
Alexander Larsson
3944c2dbfc Don't use isprint() for chars > 255.
2000-12-22  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkkeyboard-fb.c (xlate_io):
	Don't use isprint() for chars > 255.
2000-12-22 12:33:07 +00:00
Alexander Larsson
ee053ddd2e Uh? What happed? My cvs checkin got broken pipe.. 2000-12-21 10:33:40 +00:00
Owen Taylor
c7755bc949 Check for FreeType using freetype-config, since we can't rely on Xft to
Tue Dec 19 23:47:27 2000  Owen Taylor  <otaylor@redhat.com>

	* configure.in gdk/x11/Makefile.am: Check for FreeType
	using freetype-config, since we can't rely on Xft
	to pull in the libraries for us, or rely on it being
	in the default include path first.

	* gtk/gtkframe.c: Fix some problems where the gap wasn't
	being drawn in the right place, especially for right-aligned
	frame labels.

Thu Dec 14 21:02:59 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkfontsel.c (gtk_font_selection_select_font): Update
	the font_name entry as needed.
2000-12-20 04:49:49 +00:00
Havoc Pennington
d788d9b054 wow, that implementation was pretty non-working.
2000-12-18  Havoc Pennington  <hp@redhat.com>

	* gdk/gdkevents.c (gdk_event_get_state): wow, that implementation
	was pretty non-working.

	* gtk/testtext.c (fill_file_buffer): make this a bit more robust
	by passing the length to g_utf8_validate().
2000-12-18 19:12:35 +00:00
Havoc Pennington
fde4fecfd2 Port to GObject, can go back in gdk-pixbuf after setting up a
2000-12-16  Havoc Pennington  <hp@pobox.com>

* gtk/gdk-pixbuf-loader.h, gtk/gdk-pixbuf-loader.c:
Port to GObject, can go back in gdk-pixbuf after setting up
a gdk-pixbuf-marshal.h header over there.

* gtk/gtktreeview.c: s/SEPERATOR/SEPARATOR/g;
(gtk_tree_view_class_init): specify GTK_TYPE_ADJUSTMENT for signal
args
(gtk_tree_view_init): don't unset GTK_NO_WINDOW, it shouldn't be
set
(gtk_tree_view_realize_buttons): don't gtk_widget_show() buttons
here, do it when we create the buttons later
(gtk_tree_view_realize_buttons): add some g_return_if_fail
(gtk_tree_view_map): paranoia checks that column->button is shown
and unmapped
(gtk_tree_view_size_request): only request visible children.
Move header size calculation in here, for cleanliness, and
to maintain invariants for child widgets if we eventually
let users set different children inside the buttons
(gtk_tree_view_map_buttons): factor out code to map buttons,
since it was being called several times
(gtk_tree_view_size_allocate_buttons): move_resize the drag
windows instead of just moving them; their height may change
if we allow random widgets in there, or the theme changes.
(gtk_tree_view_size_allocate): move button size allocation
above emitting the scroll signals, to ensure a sane state when we
hit user code
(gtk_tree_view_button_release): remove queue_resize after
tree_view_set_size(), set_size() will handle any resize queuing
that's needed
(gtk_tree_view_focus_in): just queue a draw, don't fool with
draw_focus goo
(gtk_tree_view_focus): use gtk_get_current_event() and
gdk_event_get_state()
(gtk_tree_view_deleted): don't queue_resize() after calling set_size()
(gtk_tree_view_build_tree): fix a "if (foo); {}" bug - i.e. remove
semicolon
(gtk_tree_view_create_button): show the button here
(gtk_tree_view_button_clicked): actually emit the clicked signal
on the column
(_gtk_tree_view_set_size): return right away if the size is
unchanged, as a cheesy optimization
(gtk_tree_view_setup_model): rename set_model_realized to
setup_model to match the flag that indicates whether we've
called it
(gtk_tree_view_get_hadjustment): create adjustment if it doesn't
exist, because set_scroll_adjustment does that and it shouldn't
matter what order you call these in
(gtk_tree_view_get_vadjustment): ditto
(gtk_tree_view_set_headers_visible): canonicalize the bool,
for paranoia
(gtk_tree_view_set_headers_visible): call
gtk_tree_view_map_buttons() instead of using cut-and-paste code
(gtk_tree_view_append_column): clarify whether the return value
is the count of columns before or after, and do the increment
separately from the return statement so you can tell from the code.
(gtk_tree_view_remove_column): ditto
(gtk_tree_view_insert_column): ditto
(gtk_tree_view_get_column): remove g_return_if_fail for columns
outside the existing range, the docs say that outside-range
columns are allowed, so we handle them as documented. (Presumably
this allows a nice loop with column != NULL as test.)
(gtk_tree_view_move_to): document what 0.0, 0.5, 1.0 alignments
mean (left/right/center etc.).
(gtk_tree_view_collapse_all): only queue a draw if we're mapped
(gtk_tree_view_expand_row): add docs
(gtk_tree_view_collapse_row): add docs

* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clicked): new
function to emit the clicked signal on a column

* gdk/gdkevents.c (gdk_event_get_state): new function, to get the
state of an event
(gdk_event_get_time): don't treat GDK_SCROLL
as a button event, remove default case from switch so gcc
will whine if we don't explicitly handle all event types

* gtk/gtktreeselection.h: added some FIXME

* gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): rename
"columns" to "n_columns" and "column" to "columns" for clarity
2000-12-17 23:50:00 +00:00
Owen Taylor
6e5a269f38 Add two virtualized functions gdk_drawable_get_clip_region - to get the
Thu Dec 14 20:22:31 2000  Owen Taylor  <otaylor@redhat.com>

        * gdk/{gdkdrawable.[ch],gdkpixmap.c,gdkwindow.c,x11/gdkwindow.c}:
	Add two virtualized functions gdk_drawable_get_clip_region - to
	get the clip region when drawing.

	* gdk/gdkwindow.c (gdk_window_invalidate_rect): Rewrite to simple
	use invalidate_region.

	* gdk/gdkwindow.c (gdk_window_invalidate_region): Clip to visible
	region.

	* acconfig.h configure.in: Check for Xft. For now, assume
	that if Xft is found, Pango was compiled with Xft support
	as well.

	* gdk/gdkcolor.h gdk/x11/gdkcolor-x11.c: Add
	gdk_colormap_query_color().

	* gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_glyphs): Draw
	with Xft if appropriate.

	* gdk/x11/gdkpango-x11.c (gdk_pango_context_get): Create
	a pangoxft context if we have XFT and the environment
	variable GD_USE_XFT is set.

	* gdk/x11/gdkx.h (struct _GdkGCX11): Cache the fg_pixel
	and also possibly an XftDraw structure.

        * gtk/gtkfontsel.c: Handle the case where the font from the
	style doesn't match any of the fonts a bit better.

	* gtk/testgtk.c: Add tabs between directional segments for
	hebrew/arabic test. (Not really necessary, just a little
	prettier.)
2000-12-15 01:46:41 +00:00
Tor Lillqvist
2e70f892cc Add gdkkeys.
2000-12-15  Tor Lillqvist  <tml@iki.fi>

	* gdk/makefile.{mingw.in,msc} (gdk_OBJECTS): Add gdkkeys.

	* gtk/gtk.def
	* gdk/gdk.def: Update.

	* gdk/win32/gdkmain-win32.c
	* gdk/win32/gdkkeys-win32.c: New file. Move some functions from
	gdkmain-win32.c here.

	* gdk/win32/makefile.mingw.in (all): No need to make
	gdk-win32res.o here, the makefile one step up will call us to make
	it.

	* gdk/win32/makefile.{mingw.in,msc} (gdk_win32_OBJECTS): Add
	gdkkeys-win32.

	* gdk/win32/gdkcolor-win32.c: Silence gcc -Wall.

	* gdk/win32/gdkevents-win32.c (gdk_events_init): Remove leftover
	call to g_source_add().

	* gdk/win32/gdkgc-win32.c (BitmapToRegion): Plug memory
	leak. Thanks to Andreas Kemnade.
2000-12-14 23:14:18 +00:00
3
02eac1c64d Add support for ps2 intellimouse.
2000-12-13    <alexl@redhat.com>

	* gdk/linux-fb/gdkmouse-fb.c (mouse_devs):
	Add support for ps2 intellimouse.

	* gdkkeyboard-fb.c:
	Move shift-F1 repaint handling to xlate handler only.

	* docs/README.linux-fb:
	Add imps2 to docs.
	Document the new refresh keys.
2000-12-13 10:03:16 +00:00
Alexander Larsson
944046942a Don't free gdk_fb_keyboard twice.
2000-12-12  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkkeyboard-fb.c (xlate_close, raw_close):
	Don't free gdk_fb_keyboard twice.
2000-12-12 12:11:14 +00:00
James Henstridge
21430de47d add prot struct member to hold masks for detecting the start of a protocol
2000-12-09  James Henstridge  <james@daa.com.au>

        * gdk/linux-fb/gdkmouse-fb.c (GdkFBMouseDevice): add prot struct
        member to hold masks for detecting the start of a protocol packet.
        (mouse_devs): add packet start masks for ps2 and ms device types.
        Left the mask for fidmour blank, as I have no idea what it should
        be.
        (handle_mouse_io): skip bytes until we get to the start of a
        packet.  My Logitech mouse seems to be passing an extra NULL pad
        byte, and GPM does a similar thing here.
        (gdk_fb_mouse_ms_open): changed error message to not say psaux, as
        this is the ms mouse driver.
        (gdk_fb_mouse_ms_packet): fix up button handling, which was
        completely broken except for button1.  It was checking the wrong
        bit in the packet for the status of the right mouse button, and
        wrongly assuming right == button2 rather than 3.  I fixed that and
        also added support for middle button (button2).
2000-12-09 11:10:41 +00:00
Alexander Larsson
78b055e77b /dev/ttyS0 -> /dev/mouse
2000-12-08  Alexander Larsson  <alla@lysator.liu.se>

	* gdk/linux-fb/gdkmouse-fb.c (gdk_fb_mouse_ms_open):
	/dev/ttyS0 -> /dev/mouse
2000-12-08 16:32:57 +00:00
Alexander Larsson
b09aade537 Add dummy gdk_fontset_load 2000-12-08 16:01:46 +00:00
Alexander Larsson
3e3cc0224b Docs, docs, anyone want docs!
2000-12-06  Alexander Larsson  <alexl@redhat.com>

	* docs/README.linux-fb:
	* docs/Makefile.am:
	Initial GtkFB docs.

	* gdk/linux-fb/Makefile.am:
	Define GDK_DATA_PREFIX.

	* gdk/linux-fb/gdkmain-fb.c:
	Fix typo.
	Change default display to /dev/fb0.

	* gdk/linux-fb/gdkpango-fb.c:
	Add $(prefix)/share/fonts/ to font path.
2000-12-08 15:00:07 +00:00
Alexander Larsson
6d0c6b792e New file containing the abstracted keyboard driver. Most code taken from
2000-12-08  Alexander Larsson  <alla@lysator.liu.se>

	* gdk/linux-fb/gdkkeyboard-fb.c:
	New file containing the abstracted keyboard driver. Most code
	taken from gdkinput-ps2.c

	* gdk/linux-fb/gdkinput-ps2.c:
	Removed file.

	* gdk/linux-fb/Makefile.am:
	Added gdkkeyboard-fb.c, removed gdkinput-ps2.c.

	* gdk/linux-fb/gdkcolor-fb.c:
	display->fb was renamed to display->fb_fd.

	* gdk/linux-fb/gdkcursor-fb.c:
	gdk_mouse_get_info -> gdk_fb_mouse_get_info

	* gdk/linux-fb/gdkinput.c:
	Moved gdk_input_init here from gdkinput-ps2.c

	* gdk/linux-fb/gdkmain-fb.c:
	display->fb was renamed to display->fb_fd.
	Now the tty and the console is opened here instead
	of in the keyboard driver. Also check GDK_VT to see what
	tty to open.
	Move gdk_beep () here from gdkinput-ps2.c
	gdk_mouse_get_info -> gdk_fb_mouse_get_info

	* gdk/linux-fb/gdkmouse-fb.c:
	Add header.
	gdk_mouse_get_info -> gdk_fb_mouse_get_info
	Return correct keyboard modifiers.
	GDK_MOUSETYPE -> GDK_MOUSE_TYPE for consistancy

	* gdk/linux-fb/gdkprivate-fb.h:
	Add tty and vt info to display.
	Add orignal modeinfo storage to display
	Update global functions

	* gdk/linux-fb/gdkwindow-fb.c:
	Added gdk_fb_window_find_focus().
	gdk_mouse_get_info -> gdk_fb_mouse_get_info
2000-12-08 12:38:48 +00:00
Havoc Pennington
6a2abb2867 fix name of function, noticed by Alex
2000-12-07  Havoc Pennington  <hp@pobox.com>

* gdk/x11/gdkkeys-x11.c (gdk_keymap_lookup_key): fix name of
function, noticed by Alex
2000-12-07 14:30:07 +00:00
Elliot Lee
89709dd14f Detect freetype properly Make use of above.
* configure.in: Detect freetype properly
* modules/basic/Makefile.am, gdk/linux-fb/Makefile.am: Make use of above.
2000-12-06 18:45:42 +00:00
Alexander Larsson
7fa13eaf35 Add gdkmouse-fb.c
2000-12-06  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/Makefile.am:
	Add gdkmouse-fb.c

	* gdk/linux-fb/gdkmouse-fb.c:
	New file. Abstracted the mouse drivers a bit.

	* gdk/linux-fb/gdkcursor-fb.c:
	The cursor hide/show functions was moved here from gdkinput-ps2.c.

	* gdk/linux-fb/gdkinput-ps2.c:
	Removed old mouse handling code. Moved cursor handling code
	to gdkcursor-fb.c, moved gdk_fb_window_send_crossing_events() to
	gdkwindow-fb.c. gdk_input_get_mouseinfo was renamed to
	gdk_mouse_get_info.

	* gdk/linux-fb/gdkmain-fb.c:
	Pass NULL pointers for x,y in gdk_mouse_get_info call.

	* gdk/linux-fb/gdkprivate-fb.h:
	Removed public gdk_fb_find_common_ancestor, added and renamed
	functions for the new mouse handling code.

	* gdk/linux-fb/gdkwindow-fb.c:
	Moved gdk_fb_window_send_crossing_events here. added global
	variable gdk_fb_window_containing_pointer. made
	gdk_fb_find_common_ancestor static. gdk_input_get_mouseinfo was
	renamed to gdk_mouse_get_info.
2000-12-06 17:27:52 +00:00
Alexander Larsson
b7f7cba72b Update to match latest gmain/gsource changes.
2000-12-06  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkevents-fb.c:
	Update to match latest gmain/gsource changes.

	* gdk/linux-fb/gdkinput-ps2.c:
	Bogus gdk_keymap_get_entries_for_keycode implementation so that
	it links. Will be implemented later.
2000-12-06 12:11:45 +00:00
Havoc Pennington
36aac0177b add gdkkeys.[hc]
2000-12-03  Havoc Pennington  <hp@pobox.com>

* gdk/Makefile.am: add gdkkeys.[hc]

* gdk/gdkkeys.h, gdk/gdkkeys.c: Move all the keyval stuff to these
files from gdk.h, gdk.c; add GdkKeymap type and operations on it.

* acconfig.h, configure.in: add checks and command line options
for XKB

* gdk/x11/gdkkeys-x11.c: Implement the above functions

* gdk/x11/gdkevents-x11.c (gdk_event_translate): Put the keycode
and group in the key event

* gdk/gdkevents.h (struct _GdkEventKey): Add a hardware_keycode
field with the low-level hardware key code, and a group
field with the keyboard group

* gdk/x11/gdkprivate-x11.h: include config.h for HAVE_XKB,
and declare a couple globals used for keymap handling

* gtk/gtkimcontextsimple.c: Implement ISO 14755 input method,
hold down Shift-Control and type a hex number to get a Unicode
character corresponding to the hex number
(gtk_im_context_simple_get_preedit_string): Fix cursor position
(return bytes not chars)
2000-12-06 05:31:30 +00:00
Elliot Lee
3bc53c742d Make GdkColor specify element sizes to avoid waste on 64-bit platforms.
* gdk/gdkcolor.h: Make GdkColor specify element sizes
to avoid waste on 64-bit platforms.
2000-12-05 22:59:40 +00:00
Owen Taylor
a4b2a6a857 Fix link to PNG home, remove reference to fribidi.
Tue Dec  5 15:49:31 2000  Owen Taylor  <otaylor@redhat.com>

	* INSTALL: Fix link to PNG home, remove reference
	to fribidi.

	* gdk/x11/gdkevents-x11.c: Fix up for new GMain API.

	* gdk/win32/gdkevents-win32.c: Fix up for new GMain API. (Not
	tested.)

	* gtk/gtkcheckmenuitem.c: Permanently turn on
	always_show_toggle.

	* gtk/gtkclist.c (gtk_clist_get_pixtext): Allow mask to
	be NULL. (Vladimir Klebanov, #26545)

	* gtk/gtkspinbutton.c (gtk_spin_button_insert_text): Fix
	some signed/unsigned comparison problems. (#6510,
	David Kaelbling)

	* gtk/gtkwidget.[ch] (gtk_widget_is_ancestor): Change
	return type to boolean (Oskar Liljeblad, #18648)
2000-12-05 20:53:30 +00:00
Alexander Larsson
f2e4ead7db Remove bogus colormap setting.
2000-12-05  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkmain-fb.c (gdk_fb_display_new):
	Remove bogus colormap setting.
2000-12-05 17:01:39 +00:00
Alexander Larsson
b9ef6f2cba More complete colormap handling. Now GdkRGB work in 8 bpp modes.
2000-12-05  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkcolor-fb.c:
	More complete colormap handling. Now GdkRGB work in 8 bpp modes.

	* gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_image):
	Must set colormap.
2000-12-05 16:58:25 +00:00
Alexander Larsson
f1046d9a66 Remove old debug g_warning(). (gdk_fb_draw_drawable): The src argument can
2000-12-05  Alexander Larsson  <alla@lysator.liu.se>

	* gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3):
	Remove old debug g_warning().
	(gdk_fb_draw_drawable): The src argument can be either a wrapper
	or an implementation, just pass the implementation to draw_drawable_2.

	* gdk/linux-fb/gdkprivate-fb.h:
	Added GDK_IS_DRAWABLE_IMPL_FBDATA()

	* gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_destroy):
	clear and invalidate area when window is destroyed.
	(send_map_events): Remove old commented out code.
2000-12-05 11:39:26 +00:00
Alexander Larsson
b7118c8094 Use italic instead of oblique in font aliases.
2000-12-05  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkpango-fb.c:
	Use italic instead of oblique in font aliases.

	* gdk/linux-fb/gdkrender-fb.c (gdk_fb_fill_span_generic,
	_gdk_fb_gc_calc_state): Support GDK_XOR, add g_warning for
	other unsupported functions.
2000-12-05 09:47:13 +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
Alexander Larsson
d77144614b Divide size by 2, not multiply.
2000-12-04  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkfont-fb.c (gdk_text_width): Divide size by 2, not
	multiply.

	* gdk/linux-fb/gdkpango-fb.c:
	Copied some 26.6 scaling macros from pango to clean up the rounding.
	(pango_fb_font_get_glyph_info): Correct sign on x value.

	* gdk/linux-fb/gdkprivate-fb.h:
	Removed unreferenced external functions.

	* modules/linux-fb/Makefile.am: Use ` instead of '.

	* modules/linux-fb/basic.c:
	Remove dead code. In particular the dummy lang engine which broke all
	pango layouts in GtkFB. Don't include tables-big.i anymore.

	* modules/linux-fb/tables-big.i:
	Upgrade to latest version from pango. Left for reference, basic_ranges
	moved to basic.c.
2000-12-04 17:59:43 +00:00
Alexander Larsson
15c81f52d3 Return positive descent.
2000-12-04  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkpango-fb.c (pango_fb_font_get_metrics):
	Return positive descent.
2000-12-04 12:07:41 +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
1
f3e06d23bf Note: GtkFB now requires Freetype 2 final.
2000-12-01    <alexl@redhat.com>

	* gdk/linux-fb/Makefile.am:
	* modules/linux-fb/Makefile.am:
	Freetype 2 final uses freetype-config

	* gdk/linux-fb/gdkpango-fb.c:
	Upgrade to use Freetype 2 final.
	More flexible support for font aliases, this also fixes a bug with
	GtkFontSelector, as the aliases must be visible in the font/family list,
	or GtkFontSelector reads uninitialized memory.
2000-12-01 17:14:29 +00:00
Owen Taylor
1f7d7453b1 Properly handle gc->clip_region == NULL>
Thu Nov 30 23:03:04 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkgc-x11.c (gdk_gc_copy): Properly handle
	gc->clip_region == NULL>
2000-12-01 04:05:47 +00:00
Tor Lillqvist
68ae419bfb Changes by Hans Breuer:
2000-11-30  Tor Lillqvist  <tml@iki.fi>

	Changes by Hans Breuer:

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_geometry_hints):
	Dont't use negative width and height as max_hints. This fixes
	Owen's recent testgtk changes for win32.

	* gdk/win32/gdkgc-win32.c (gdk_win32_hdc_get,
	gdk_win32_hdc_release): These are exported and may be called with
	other drawable types than our GdkDrawableImplWin32 (?).

	* gdk/gdkwindow.c: Backing store appears to work on Windows now,
	so always #define USE_BACKING_STORE.

	* gtk/gtktextdisplay.c (render_layout_line): Use g_print instead
	of printf for debugging output.

	* gtk/gtktextlayout.c (allocate_child_widgets): Ditto.

	* gtk/gtktextview.c (gtk_text_view_child_allocated): Ditto.

	* gtk/gtkmain.h (GTKMAIN_C_VAR): Win32 fix for dllimport
	declaration.

	* gtk/gtktexttypes.h: Ditto.

	* gtk/gtklabel.c (gtk_label_set_markup_with_accel): Return a value
	(GDK_VoidSymbol) also if in case of arg check failure.

	* gtk/gtkimcontextsimple.c
	(gtk_im_context_simple_get_preedit_string): Don't assign cursor
	position to the pointer, but to the variable it points to.

	* gtk/makefile.msc.in (DEFINES): Define GTK_VERSION.

	* gtk/gtk.def: Updates.
2000-11-30 23:39:50 +00:00
Alexander Larsson
b1b6c9fc7a Set the size of the font from the description. (gdk_text_width): Gross
2000-11-29  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkfont-fb.c (gdk_font_from_description):
	Set the size of the font from the description.
	(gdk_text_width): Gross hack that calculates the width
	of text by text_length * size/2. This is necessary because
	GtkLabel does some ugly gtk_string_width call to calculate
	an good size.
	(linux-fb/gdkprivate-fb.h): Removed unused field FT_Face.
2000-11-29 13:49:37 +00:00
Alexander Larsson
92bc6d4175 If you pass width or height == 0 to gdk_window_clear_area they should be
2000-11-29  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_clear_area):
	If you pass width or height == 0 to gdk_window_clear_area they
	should be calculated from the window size.
2000-11-29 13:13:20 +00:00
Alexander Larsson
57356cfe07 If there is a grab, but no grab-cursor, use the cursor from the grabbed
2000-11-29  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkinput-ps2.c (move_pointer): If there is
	a grab, but no grab-cursor, use the cursor from the grabbed
	window. (gdk_fb_window_send_crossing_events): Send normal
	enter/leave notifications if grab and owner_events == TRUE.
2000-11-29 12:52:41 +00:00
Alexander Larsson
3c6f0d5f3e Do implicit button grabs, even if the window doesn't want the event.
2000-11-29  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkinput-ps2.c (send_button_event):
	Do implicit button grabs, even if the window doesn't
	want the event.
	(gdk_fb_window_send_crossing_events): If there is a
	grab, only the grabbed window gets normal enter/leave
	notifications. On ungrab go from grabbed window to current.
	Don't send any notification to b when propagating from c -> b.
	If setting a grab on window, don't set prev_window.
	(handle_mouse_input): Send enter/leave events to the window the
	mouse is over, not the grabbed one.
2000-11-29 11:49:17 +00:00
Elliot Lee
2e39ad6a28 Zap warning.
Zap warning.
2000-11-28 18:45:03 +00:00
Alexander Larsson
270d45a3e5 The cursor should be hidden if it is part of either the source or
2000-11-28  Alexander Larsson  <alla@lysator.liu.se>

	* gdk/linux-fb/gdkwindow-fb.c (gdk_fb_window_move_resize):
	The cursor should be hidden if it is part of either the
	source or destination region. Not only if it is in both.
	(gdk_window_set_transient_for): Silence warnings.
2000-11-28 16:39:55 +00:00
Alexander Larsson
7f8a4aa1c3 Fix filled arcs and commit previous stuff which i somehow missed. 2000-11-28 15:38:23 +00:00
Alexander Larsson
26b7063388 Implement configure events and correct enter/leave notification. 2000-11-28 08:44:02 +00:00
Alexander Larsson
1c805555ce Huge GtkFB patch with lots of small bugfixes and initial selections implementation.
2000-11-23  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkselection-fb.c:
	Initial selection implementation.

	* gtk/gtkselection.c:
	if GDK_WINDOWING_FB defined, include linux-fb/gdkfb.h and look up
	requestor in gtk_selection_request.

	* gdk/linux-fb/gdkfb.h, gdk/linux-fb/gdkglobals-fb.c:
	Added gdk_selection_property atom.

	* gdk/linux-fb/gdkprivate-fb.h:
	Export _gdk_selection_window_destroyed.
	Removed mask_off_x/y from GdkCursorPrivateFB.
	Removed hbearing, added top, left to PangoFBGlyphInfo.

	* gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_destroy):
	Call _gdk_selection_window_destroyed
	(_gdk_windowing_window_init): Don't call gdk_cursor_new() before
	the root window has been created.
	(static_dx_hack, static_dy_hack, compare_draw_rects,
	gdk_fb_window_move_resize): Remove unnecessary sort of rectangles
	in region. They are already sorted. Instead just traverse them in
	reverse if draw_direction < 0.

	* gdk/linux-fb/gdkinput-ps2.c (send_button_event):
	Double-clicks must be sent after the normal button_press.
	(gdk_fb_cursor_unhide): Remove usage of mask_off_x/y. Clean up.

	* gdk/linux-fb/gdkgeometry-fb.c (gdk_window_scroll):
	Pass _gdk_fb_screen_gc instead of NULL.

	* gdk/linux-fb/gdkmain-fb.c (_gdk_windowing_init_check):
	Initialize gdk_selection_property.
	(gdk_event_make): Remove unused code.

	* gdk/linux-fb/gdkcursor-fb.c:
	Make the pixmap for the cursor the same size as the mask. Also remove
	the mask_off_x/y fields in GdkCursorPrivateFB and combine
	_gdk_cursor_new_from_pixmap() and gdk_cursor_new_from_pixmap()
	Now the whole cursor is visible.

	* gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3):
	Fix bug where xdest+height instead of ydest+height was used
	to calculate if the source and dest overlapped. This fixes the
	redraw bug when the main window in testgtk was scrolled when
	partially covered by a tall window.
	Copy rectangles in region in order depending on draw_direction.
	Also moved the draw_direction flipping of start_y and end_y into
	the gc functions, as this might not be what all of them want.
	(gdk_fb_draw_lines): Support dashed lines.
	(gdk_fb_draw_glyphs): Clean up glyph placement. Also fix positioning
	so that the text is positioned correctly (was 1 pixel high).

	gdk/linux-fb/gdkgc-fb.c:
	Initialize cap_style to GTK_CAP_BUTT. This fixes a problem where
	all lines were drawn a pixel to short. Also checked the default of
	the rest of the values, and they're the same as X now.

	* gdk/linux-fb/gdkpango-fb.c (pango_fb_font_get_glyph_info):
	Clean up pixel positioning of the glyphs. Just use bgy->top and
	bgy->left. Also used PANGO_PIXEL where appropriate and added 0.5
	to all divisions to get correct rounding behaviour.

	* gdk/linux-fb/gdkrender-fb.c (gdk_fb_draw_drawable_generic,
	gdk_fb_draw_drawable_memmove, gdk_fb_draw_drawable_aa_24):
	Moved start_y/end_y flip into draw_drawable implementations.
	Flip also x rendering when draw_direction < 0.
	Remove unneccesary multiply with draw_direction.
2000-11-25 15:44:35 +00:00
Alexander Larsson
2382edbdb6 Correct calculation of font metrics. Now GtkEntrys have sane size.
2000-11-22  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkpango-fb.c (pango_fb_font_get_metrics):
	Correct calculation of font metrics. Now GtkEntrys have sane
	size.
2000-11-22 12:09:08 +00:00
Alexander Larsson
5b4c8afa7e i2000-11-22 Alexander Larsson <alexl@redhat.com>
* gdk/gdktypes.h:
	Add new type GdkSpan

	* docs/reference/gdk/gdk-sections.txt,
	docs/reference/gdk/tmpl/regions.sgml, gdk/gdkregion-generic.c,
	gdk/gdkregion.h:
	Implement and document gdk_region_spans_intersect_foreach.

	* gdk/linux-fb/Makefile.am, gdk/linux-fb/gdkrender-fb.c:
	Add new file gdkrender-fb.c which contains all core
	rendering code.
	Add gdk_fb_fill_rectangle_generic (old rectangle code) and
	gdk_fb_fill_rectangle_simple_16, gdk_fb_fill_rectangle_simple_32
	(optimized rectangle fillers).

	* gdk/linux-fb/gdkdrawable-fb2.c:
	Move all rendering code to gdkrender-fb.c.
	Change from using GdkRectangles and GdkSegments for spans to GdkSpan.
	Use the new span intersection functions in gdk_fb_fill_spans.
	gdk_fb_draw_rectangle() clips filled rectangles and calls
	gc->fill_rectangle with the result.
	gdk_fb_fill_spans() gets extra argument "sorted".

	* gdk/linux-fb/gdkevents-fb.c:
	Remove unused includes and defines.
	New function gdk_fb_get_time() to get correct time for events.

	* gdk/linux-fb/gdkinput-ps2.c:
	Use gdk method of generating multiple-clicks (gdk_event_button_generate)
	Make sure to set the time of all events.

	* gdk/linux-fb/gdkmain-fb.c:
	Use gdk_fb_get_time ().

	* gdk/linux-fb/gdkprivate-fb.h:
	New virtual GC calls: fill_span & fill_rectangle.
	Export gdk_fb_get_time().
	gdk_fb_fill_spans() gets extra argument "sorted".

	* gdk/linux-fb/mi*.c:
	Use GdkSpan instead of GdkRectangle.
	Pass correct sorted to gdk_fb_fill_spans. (sorted value taken
	from XFree 4 source)
2000-11-22 10:07:34 +00:00
Alexander Larsson
2999f465b4 Removed unused arguments from gdk_fb_drawable_get_pixel().
2000-11-20  Alexander Larsson  <alla@lysator.liu.se>

	* gdk/linux-fb/gdkdrawable-fb2.c:
	Removed unused arguments from gdk_fb_drawable_get_pixel().

	* gdk/linux-fb/gdkinput-ps2.c (handle_input_ps2):
	Renamed fidur specific mouse packet data in MouseDevice to
	generic. Used it in ps2 mouse handling code to avoid blocking
	reads.
2000-11-20 10:12:40 +00:00
Owen Taylor
14ec95efb4 Fix off-by-one error when destroying allocated segments on failure.
Sat Nov 18 11:58:17 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkrgb.c (gdk_rgb_allocate_images): Fix
	off-by-one error when destroying allocated segments
	on failure. (Elliot)
2000-11-18 17:01:01 +00:00
Owen Taylor
0204bd1cef Nov 17 20:14:20 2000 Owen Taylor <otaylor@redhat.com>
* Released 1.3.2

	* NEWS: Updates for 1.3.2
2000-11-18 01:49:50 +00:00
Tor Lillqvist
2c2dbae197 Add comment that GdkXEvent isn't only for XEvent, but in general for
2000-11-17  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdkevents.h: Add comment that GdkXEvent isn't only for XEvent,
	but in general for window system specific events.

	* gtk/gtk.def
	* gtk/makefile.mingw.in
	* gtk/makefile.msc.in: Update.
2000-11-17 21:59:04 +00:00
Owen Taylor
a8b012d0a0 cvsignore updates 2000-11-16 16:14:17 +00:00
Owen Taylor
bc41c3ffcf remove unecessary rules for win32-specific config-substituted targets. If
Wed Nov 15 18:39:40 2000  Owen Taylor  <otaylor@redhat.com>

	* **/Makefile.am : remove unecessary rules for win32-specific
	config-substituted targets. If you want these rules, use
	--enable-maintainer-mode (called automatically by autogen.sh).
	Stops a lot of unneccessary make-time warnings.

	* gtk/gtktext{layout,display}.c: Factor in total width as
	well as screen when figuring alignment for word-wrap as well as
	no wrap; this is necessary to handle lines that cannot be wrapped
	at all.
2000-11-16 00:16:46 +00:00
Elliot Lee
152f160a8a Add s'more TODO items.
Add s'more TODO items.
2000-11-15 22:08:10 +00:00
Alexander Larsson
0c4f41198a Fixed some debug macros. 2000-11-15 13:48:13 +00:00
Alexander Larsson
2eb744a3c4 Added virtual functions set_pixel, get_color, fill_span and draw_drawable
2000-11-15  Alexander Larsson  <alla@lysator.liu.se>

	* gdk/linux-fb/gdkprivate-fb.h:
	Added virtual functions set_pixel, get_color,
	fill_span and draw_drawable to the GC.
	Added global _gdk_fb_screen_gc to use instead of
	NULL when drawing to the screen.
	Added _gdk_fb_gc_calc_state() prototype.

	* gdk/linux-fb/gdkgc-fb.c:
	Call _gdk_fb_gc_calc_state() on any gc state change.

	* gdk/linux-fb/gdkglobals-fb.c:
	Add _gdk_fb_screen_gc

	* gdk/linux-fb/gdkdrawable-fb2.c:
	_gdk_fb_gc_calc_state() calculates best functions
	for the GC state and depth.
	Moved bpp specialized code to separate functions.
	Added optimized 24 bpp AA draw_drawable.

	* gdk/linux-fb/gdkevents-fb.c:
	Silence gcc warning.

	* gdk/linux-fb/gdkimage-fb.c:
	Use _gdk_fb_screen_gc

	* gdk/linux-fb/gdkwindow-fb.c:
	Init and use _gdk_fb_screen_gc

	* gdk/linux-fb/mitypes.h:
	Remove unused types.
2000-11-15 12:45:30 +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
Tor Lillqvist
8a26c540a3 Remove. New file. New file Corresponding changes.
2000-11-15  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/rc/gdk.rc: Remove.
	* gdk/win32/rc/gdk.rc.in: New file.
	* gdk/win32/rc/Makefile.am: New file
	* gdk/win32/Makefile.am: Corresponding changes.

	* gtk/gtk.rc: Remove.
	* gtk/gtk.rc.in: New file.
	* gtk/Makefile.am: Corresponding changes.

	* configure.in: Corresponding changes.
2000-11-14 22:16:24 +00:00
Elliot Lee
f15049bd02 Add a couple of missing G_GNUC_CONST's.
Add a couple of missing G_GNUC_CONST's.
2000-11-13 19:47:31 +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
Alexander Larsson
be698675c7 Cleanup and reindent of GtkFB.
Added some serial mouse support.
Updates to latest Gtk+/pango
2000-11-13 17:40:23 +00:00
Sebastian Wilhelmi
b664be5ffb GCompareFunc -> GEqualFunc where applicable.
2000-11-13  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gdk/linux-fb/gdkcolor-fb.c, gdk/nanox/gdkmain-nanox.c,
	gdk/win32/gdkcolor-win32.c, gdk/win32/gdkwin32id.c,
	gdk/x11/gdkcolor-x11.c, gdk/x11/gdkvisual-x11.c, gdk/x11/gdkxid.c,
	gtk/gtkgc.c, gtk/gtkrc.c, gtk/gtktext.c: GCompareFunc ->
	GEqualFunc where applicable.

	* gdk/linux-fb/gdkpango-fb.c: pango_font_description_compare ->
	pango_font_description_equal as changed in pango.

	* gdk/nanox/gdkmain-nanox.c: gdk_xid_compare -> gdk_xid_equal.

	* gdk/win32/gdkcolor-win32.c: gdk_colormap_cmp -> gdk_colormap_equal.

	* gdk/win32/gdkwin32id.c: gdk_handle_compare -> gdk_handle_equal.

	* gdk/x11/gdkcolor-x11.c: gdk_colormap_cmp -> gdk_colormap_equal.

	* gdk/x11/gdkvisual-x11.c: gdk_visual_compare -> gdk_visual_equal.

	* gdk/x11/gdkxid.c: gdk_xid_compare -> gdk_xid_equal.

	* gtk/gtkgc.c: gtk_gc_key_compare -> gtk_gc_key_equal and
	gtk_gc_drawable_compare -> gtk_gc_drawable_equal.

	* gtk/gtkrc.c: gtk_rc_style_compare -> gtk_rc_style_equal and
	gtk_rc_styles_compare -> gtk_rc_styles_equal.
2000-11-13 13:15:41 +00:00
Robert Brady
b17f1a964a g_filename_{to,from}_utf8 now takes an extra parameter.
Sun Nov 12 22:15:35 2000  Robert Brady  <robert@suse.co.uk>

	* gtk/gtkfileselection.c, gdk/win32/gdkfont-win32.c:
	g_filename_{to,from}_utf8 now takes an extra parameter.

	* gtk/gtkcalendar.c (gtk_calendar_init): Convert output of
	strftime into UTF-8.

	(column_from_x, gtk_calendar_paint_day_names): Support RTL
	calendars.

	(gtk_calendar_paint_day_names): Draw day names in the right
	place.
2000-11-12 22:15:43 +00:00
Owen Taylor
2cb2d33b20 Fix problem with using result of g_get_charset() backwards - pointed out
Sun Nov 12 14:10:09 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkselection-x11.c (gdk_utf8_to_compound_text): Fix
	problem with using result of g_get_charset() backwards -
	pointed out by Mikael Hermansson <mikeh@bahnhof.se>.

	* gtk/gtkwindow.c (gtk_window_compute_hints): Support
	negative min_width/height and max_width/height to
	mean "requisition"; this allows setting a window
	to be user-resizable in only one direction easily.

	* gtk/testgtk.c (create_main_window): Remove hard-coded
	usize - set a default size in the vertical direction.
2000-11-12 19:16:11 +00:00
Hans Breuer
aceeae34fb corrected object casts, make it work again on win32 2000-11-12 15:46:55 +00:00
Tor Lillqvist
22a0c3a5f5 gdk/gdk.def Update.
2000-11-11  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdk.def
	* gtk/gtk.def: Update.

	* gdk/win32/*.c: Add last argument to g_type_register_static()
	calls.

	* gdk/win32/gdkwindow-win32.c: Silence gcc -Wall.

	* gdk/win32/gdkevents-win32.c: Handle MSH_MOUSEWHEEL messages
	generated by older wheel mouse drivers. Get the correct y
	coordinate from WM_MOUSEWHEEL messages.

	* gdk/win32/gdkgc-win32.c (gdk_win32_cap_style_to_string,
	gdk_win32_fill_style_to_string, gdk_win32_function_to_string,
	gdk_win32_join_style_to_string, gdk_win32_line_style_to_string):
	Debugging functions.

	* gdk/win32/gdkprivate-win32.h: Declare them.

	* gdk/win32/gdkinput-win32.h: Add declaration for
	gdk_input_window_destroy().

	* gtk/makefile.mingw.in: Pass -DGTK_VERSION. Add gtktreemodel.o.

	* gdk_pixbuf.def: Add gdk_pixbuf_new_subpixbuf.
2000-11-11 18:39:57 +00:00
Alexander Larsson
8898529c12 Changes to make the new testgtk compile after gtk_menu_append was removed.
2000-11-09  Alexander Larsson  <alexl@redhat.com>

	* demos/testgtk/menus.c:
	Changes to make the new testgtk compile after
	gtk_menu_append was removed.

	* gdk/linux-fb/gdkdrawable-fb2.c
	(gdk_fb_get_depth, gdk_fb_get_visual,
	gdk_drawable_impl_fb_class_init): Implement
	these drawable functions. Now GtkImages work again.

	* gdk/linux-fb/gdkimage-fb.c (_gdk_fb_get_image): Change prototype.

	* gdk/linux-fb/gdkprivate-fb.h (_gdk_fb_get_image): Change prototype.

	* gdk/linux-fb/gdkmain-fb.c (fb_modes_parse_mode,
	gdk_fb_setup_mode_from_name, gdk_fb_set_mode, gdk_fb_display_new);
	Parse /etc/fb.modes, use the environment variables GDK_DISPLAY_MODE,
	GDK_DISPLAY_DEPTH, GDK_DISPLAY_WIDTH, GDK_DISPLAY_HEIGHT.
2000-11-09 12:15:40 +00:00
Alexander Larsson
163dc54dea Forgot to remove stray g_print() 2000-11-07 14:26:31 +00:00
Alexander Larsson
224f6ec534 use g_object_new() instead of g_type_create_instance() which is a private
2000-11-07  Alexander Larsson  <alla@lysator.liu.se>

	* gdk/linux-fb/gdkcolor-fb.c, gdk/linux-fb/gdkdnd-fb.c,
	gdk/linux-fb/gdkgc-fb.c, gdk/linux-fb/gdkimage-fb.c,
	gdk/linux-fb/gdkpango-fb.c, gdk/linux-fb/gdkpixmap-fb.c,
	gdk/linux-fb/gdkwindow-fb.c:
	use g_object_new() instead of g_type_create_instance() which
	is a private function for fundamental type implementations.

	* gdk/linux-fb/gdkinput-ps2.c:
	Use MEDIUMRAW instead of RAW keycodes. Remove keyboard state-table
	instead just store the current modifier state. Add a (somewhat broken)
	keyboard input parser for XLATE mode too, if we couldn't use MEDIUMRAW.
	Rename exported function gdk_input_ps2_get_mouseinfo to
	gdk_input_get_mouseinfo.

	* gdk/linux-fb/gdkmain-fb.c, gdk/linux-fb/gdkprivate-fb.h,
	gdk/linux-fb/gdkwindow-fb.c:
	gdk_input_ps2_get_mouseinfo was renamed to gdk_input_get_mouseinfo.
2000-11-07 14:18:47 +00:00
Owen Taylor
78ae775ee8 Fix a bunch of functions that should have been marked static.
Thu Nov  2 14:10:51 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkdnd-x11.c: Fix a bunch of functions that should have
	been marked static.
2000-11-02 19:15:34 +00:00
Havoc Pennington
0ee86faa3c had a test backward
2000-11-02  Havoc Pennington  <hp@redhat.com>

	* gtk/testgtk.c (create_labels): had a test backward

	* gdk/x11/gdkgc-x11.c (gdk_gc_copy): Copy the client-side GC
	fields, so the dest GC ends up with the correct clip origin,
	etc. Fixes a bug where colored labels didn't redraw
	properly.
2000-11-02 17:18:53 +00:00
Alexander Larsson
214c61d575 Add last argument to t_type_register_static call.
2000-11-02  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkcolor-fb.c, gdk/linux-fb/gdkdnd-fb.c,
	gdk/linux-fb/gdkgc-fb.c, gdk/linux-fb/gdkpango-fb.c,
	gdk/linux-fb/gdkpixmap-fb.c, gdk/linux-fb/gdkwindow-fb.c:
	Add last argument to t_type_register_static call.

	* gdk/linux-fb/gdkdrawable-fb2.c:
	Add last argument to t_type_register_static call.
	export the get_image drawable virtual function.

	* gdk/linux-fb/gdkimage-fb.c:
	Add last argument to t_type_register_static call.
	rename gtk_image_get to _gdk_fb_get_image and
	export it for use by gdkdrawable-fb2.

	* gdk/linux-fb/gdkprivate-fb.h:
	export _gdk_fb_get_image.

	* gdk/linux-fb/gdkselection-fb.c:
	Add new api call stubs.

	* gtk/Makefile.am:
	Missing ( in linux-fb part.

	* modules/linux-fb/Makefile.am:
	Must link with gdk_pixbuf or get unresolved symbol.
2000-11-02 15:38:04 +00:00
Havoc Pennington
fcaa719b7d Clip the rectangle to be rendered to the drawable, since
2000-11-01  Havoc Pennington  <hp@redhat.com>

	* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha):
	Clip the rectangle to be rendered to the drawable, since
	get_from_drawable() requires a region within the drawable
2000-11-01 16:34:23 +00:00
Owen Taylor
b2e180cea0 Only ref the window if it isn't NULL.
Wed Oct 25 20:10:57 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkevents.c (gdk_event_copy): Only ref the window if
	it isn't NULL.
2000-11-01 15:55:48 +00:00
Havoc Pennington
fe9f9d03f4 New function to create a pixbuf pointing to a subregion of another pixbuf.
2000-11-01  Havoc Pennington  <hp@pobox.com>

* gdk-pixbuf.c (gdk_pixbuf_new_subpixbuf): New function to create
a pixbuf pointing to a subregion of another pixbuf.

2000-11-01  Havoc Pennington  <hp@pobox.com>

* gtk/gtklabel.c (gtk_label_set_attributes): Set a PangoAttrList
on a label
(gtk_label_finalize): unref the attr list if any.

* gtk/testgtk.c (create_get_image): close test on second click
(make_message_dialog): close dialog if it exists

* gdk/gdkpango.c (gdk_draw_layout): Handle rise attribute

* gdk-2.0.pc.in (Requires): Make it require gdk-pixbuf-2.0 not
gdk-pixbuf

* gtk/gtklabel.c (gtk_label_set_markup): new function to set label
from Pango markup format
(gtk_label_set_markup_with_accel): ditto but with accelerator
parsing

* gtk/gtkimage.c (gtk_image_expose): reformatting.

* gdk/gdkpixbuf-drawable.c (gdk_pixbuf_get_from_drawable): Hack to
reflect current state of GDK - use gdk_drawable_get_colormap, etc.
Check GDK_IS_WINDOW() not !GDK_IS_PIXMAP() to decide whether to
call gdk_window_get_origin().

* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha):
implement GDK_PIXBUF_ALPHA_FULL
2000-11-01 07:07:46 +00:00
Tim Janik
d69496c060 urg, removed implementation of gtk_marshal_VOID__INT_INT_INT_INT. if
Wed Oct 25 20:47:41 2000  Tim Janik  <timj@gtk.org>

        * gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_class_init): urg, removed
        implementation of gtk_marshal_VOID__INT_INT_INT_INT. if people do that,
        couldn't they at least give it a non-standard name?

        * gtk/gtktextlayout.c: arg! yet another implementation of
        gtk_marshal_VOID__INT_INT_INT_INT(), is this a conspiracy?

        * gtk/gtktextbuffer.c: gotcha! captured a vagabonding
        gtk_marshal_VOID__INT_POINTER_INT() implementation, braught it back
        home. now i know this _is_ a conspiracy.

        * gtk/gtkwidget.c (gtk_widget_class_init): marshaller fixups for
        ::state-changed.

        * gtk/gtkaccelgroup.c (gtk_accel_group_create_remove):
        (gtk_accel_group_create_add): marshaller signature fixups.

        * gtk/gtklistitem.c (gtk_list_item_class_init): signal creation fixups,
        pass in GTK_TYPE_SCROLL_TYPE instead of GTK_TYPE_ENUM.

        * gtk/gtkobject.[hc]: removed GTK_CONNECTED flag, it's not valid
        anymore.

Tue Oct 24 23:59:21 2000  Tim Janik  <timj@gtk.org>

        * docs/reference/Makefile.am: disabled SUBDIRS for the moment, since
        due to the signal system changes, it wouldn't build currently. to
        be fixed soon.

        * docs/Changes-2.0.txt: GtkSignal/GSignal updates.

        * gtk/gtkwidget.c: ::direction_changed takes an enum as argument,
        so it needs gtk_marshal_VOID__ENUM() instead of
        gtk_marshal_NONE__UINT().

        * gdk/gdk*.c: adapted type registration functions.

        * gtk/gtkbindings.c:
        * gtk/gtkaccelgroup.c: operate on GSignalQuery, GtkSignalQuery is
        gone.

        * gtk/gtkenums.h: define GtkSignalRunType in terms of GSignalType.

        * gtk/gtkobject.c:
        (gtk_object_destroy):
        (gtk_object_shutdown): fixed recursion guards. basically we have to
        catch the case where any of GObject.shutdown() or gtk_object_destroy()
        is called during ::destroy, and avoid recursion there.

        * gtk/gtktypeutils.c:
        * gtk/maketypes.awk: awk-script hackup to provide gtk_type_init() with
        boxed_copy/boxed_free. this needs a more general solution based on a
        publically installed code-generator utility.

        * gtk/gtktypeutils.[hc]: compat aliased GTK_TYPE_BOXED to G_TYPE_BOXED,
        glib's gobject has support for that now.
        define GtkSignalMarshaller in terms of GSignalCMarshaller.


Mon Oct 23 09:36:42 2000  Tim Janik  <timj@gtk.org>

        * gtk/gtksignal.[hc]:
        * gtk/gtkmarshal.[hc]:
        * gtk/Makefile.am: generate marshallers with glib-genmarshal and don't
        compile gtkmarshal.c on its own anymore, just include it in gtksignal.c.
        removed #include <gtkmarshal.h>s all over the place, gtksignal.h takes
        care of that.

        * *.c: marshaller name fixups.

        * gtk/gtkmarshal.list: added a comment briefing the format.

Sun Oct 22 23:14:39 2000  Tim Janik  <timj@gtk.org>

        * gtk/gtksignal.[hc]: nuked old implementation. we mostly have
        compatibility macros here now. more specifically, most of
        the API is preserved (yes, _most_, nonwithstanding the
        following exceptions listed, the API is stil lHUGE ;)
        things that got removed completely:
        GtkSignalQuery, gtk_signal_query(), gtk_signal_n_emissions(),
        gtk_signal_n_emissions_by_name(), gtk_signal_handlers_destroy(),
        gtk_signal_set_funcs(), gtk_signal_handler_pending_by_id(),
        gtk_signal_add_emission_hook(), gtk_signal_add_emission_hook_full(),
        gtk_signal_remove_emission_hook().
        non-functional functions variants:
        gtk_signal_add_emission_hook(), gtk_signal_remove_emission_hook().
        the GtkCallbackMarshal argument to gtk_signal_connect_full() is
        not supported anymore.
        (gtk_signal_compat_matched): new internal function to aid
        implementation of the compatibility macros, it  provides
        functionality to block/unblock/disconnect handlers based
        on func/data.

        * gtk/gtkenums.h: define GtkSignalRunType in terms of GSignalType,

        * *.c: adaptions to new type registration API signatures.


Fri Oct 20 15:26:33 2000  Tim Janik  <timj@gtk.org>

        * gtk/gtktypeutils.[hc]: removed G_TYPE_GTK_POINTER cludge.
2000-10-25 22:34:14 +00:00
Robert Brady
7ae3922d2c If window == NULL, assume the root window. (restoring the behaviour that
2000-10-25  Robert Brady  <robert@suse.co.uk>

	* gdk/x11/gdkproperty-x11.c (gdk_property_get, gdk_property_change,
	gdk_property_delete): If window == NULL, assume the root window.
	(restoring the behaviour that was in 1.2).
--------------------------------------------------------------------
2000-10-25 21:05:37 +00:00
Tor Lillqvist
fb2127452a Include x11/gdkx.h only when building for X11.
2000-10-25  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdkwindow.c: Include x11/gdkx.h only when building for X11.

	* gdk/win32/gdkdrawable-win32.c
	* gdk/win32/gdkimage-win32.c
	* gdk/win32/gdkprivate-win32.h: Corresponding changes as in the
	X11 backend.

	* gdk/win32/gdkcc-win32.c
	* gdk/win32/gdkcolor-win32.c
	* gdk/win32/gdkfont-win32.c
	* gdk/win32/gdkinput-win32.c
	* gdk/win32/gdkmain-win32.c
	* gdk/win32/gdkproperty-win32.c: Silence gcc -Wall.
2000-10-25 18:07:12 +00:00
Havoc Pennington
86b5c82a97 Re-enable the "find" dialog
2000-10-23  Havoc Pennington  <hp@redhat.com>

        * gtk/testtext.c: Re-enable the "find" dialog

	* gtk/testgtk.c: Add test for gdk_drawable_get_image

	* gdk/gdkwindow.c (gdk_window_begin_paint_region): Fix bug where
	the arguments to gdk_draw_drawable were in the wrong order
	(gdk_window_paint_init_bg): This function was ignoring the
	init_region, instead of clipping to it, so the entire backing
	pixmap was cleared on every begin_paint()
	(gdk_window_begin_paint_region): Hmm, the same list-walking bug
	was in here again, the loop kept using the same GtkWindowPaint
	over and over.
	(gdk_window_begin_paint_region): Fix a bug where we had two
	x_offset instead of x_offset and y_offset

	* gdk/gdkdraw.c (gdk_drawable_get_image): get composite drawable
	before we get the image.
	(gdk_draw_drawable): get the composite before we draw the drawable.
	(gdk_drawable_real_get_composite_drawable): default
	get_composite_drawable implementation that returns the drawable
	itself

	* gdk/gdkdrawable.h (struct _GdkDrawableClass ): Add
	get_composite_drawable virtual function

	* gdk/gdkwindow.c (gdk_window_begin_paint_region): Fix a cheesy
	list-walking bug

	* gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_drawable): Add a hack to
	make this work if the source drawable is a GdkDrawableImplX11
	instead of a public drawable type. This is really broken; the
	problem is that GdkDrawable needs a virtual method get_xid(), but
	of course that doesn't work in practice. Enter RTTI.

	Also, improve mismatched depth message.

	* gdk/gdkpixmap.c (gdk_pixmap_get_image): Implement get_image for
	GdkPixmap

	* gdk/x11/gdkdrawable-x11.c (gdk_drawable_impl_x11_class_init):
	install _gdk_x11_get_image as our implementation of get_image

	* gdk/x11/gdkimage-x11.c (gdk_image_get): Rename to
	_gdk_x11_get_image and export for use in gdkdrawable-x11.c

	* gdk/gdkimage.c (gdk_image_get): Make this just a wrapper around
	gdk_drawable_get_image

	* gdk/gdkdraw.c (gdk_drawable_get_image): call virtual get_image

	* gdk/gdkdrawable.h (struct _GdkDrawableClass ): Virtualize
	get_image

	* gtk/gtktreestore.c (gtk_tree_store_get_node): remove weird
	trailing semicolon after for loop
2000-10-24 00:15:14 +00:00
Tor Lillqvist
f49a2a0055 gdk/win32/gdkgc-win32.c Remove gcc -Wall warnings.
2000-10-22  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkgc-win32.c
	* gdk/win32/gdkimage-win32.c: Remove gcc -Wall warnings.

	Patches by Hans Breuer:

	* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_glyphs): Call
	SetBkMode() and SetTextAlign() before calling
	pango_win32_render().

	* gdk/win32/gdkgc-win32.c (gdk_win32_gc_values_to_win32values):
	Set hcliprgn to NULL after destroying it.
	(gdk_gc_set_clip_rectangle): Delete hcliprgn and set to NULL.

	* gdk/win32/gdkgeometry-win32.c
	(_gdk_windowing_window_queue_antiexpose): More effective
	implementation.

	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new): Use drawable's
	depth as default, not the visual's.

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_title): Guard
	against empty title.

	* gdk/win32/gdkprivate-win32.h: Define a helper macro,
	IMAGE_PRIVATE_DATA.

	* gdk/win32/gdkimage-win32.c (gdk_image_get_type): Use it.
2000-10-22 17:16:42 +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
Tor Lillqvist
658b4b1da8 Update.
2000-10-09  Tor Lillqvist  <tml@iki.fi>

	* README.win32: Update.

	* gdk/win32/gdkgeometry-win32.c (gdk_window_clip_changed): Add two
	lines that had been deleted by mistake (?).

	* gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Handle
	also the case fg==white and bg==black (but still not randomly
	coloured cursors). Thanks to Wolfgang Sourdeau.

	* gdk/win32/*.c: Silence gcc -Wall.

	* gtk/gtk.def: Add missing entry points.

	Fixes by Hans Breuer:

	* gdk/makefile.msc
	* gdk/win32/makefile.msc: Update.

	* gdk/testgdk.c: If compiling with debugging (with _DEBUG defined,
	some MSVC thing, presumably), cause breakpoint on failures. Add
	GDK_NOR case. Call g_log_set_always_fatal.

	* gdk/win32/gdkwin32id.c (gdk_win32_handle_table_insert): Handle
	should be pased by reference.

	* gdk/win32/gdkprivate-win32.h: Correct declaration accordingly.

	* gdk/win32/*.c: Correct calls to gdk_win32_handle_table_insert.

	* gdk/win32/gdkevents-win32.c
	* gdk/win32/gdkwindow-win32.c: Handle WM_CREATE.

	* gdk/win32/gdkgc-win32.c: Fix mixups of drawable and
	implementation object.

	* gdk/win32/gdkimage-win32.c (gdk_image_get): Handle drawables,
	not just windows.

	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_impl_win32_finalize):
	Use the wrapper object.
2000-10-09 19:49:42 +00:00
Havoc Pennington
518f32d97e contrib subdir
2000-10-06  Havoc Pennington  <hp@redhat.com>

	* Makefile.am (SRC_SUBDIRS): contrib subdir

	* gdk/gdkpixbuf.h: Move GdkPixbufAlphaMode to gdk-pixbuf library,
	so it can be used in Xlib version

	* demos/testpixbuf.c (update_timeout): error checking from 1.0
	tree

	* gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_get_pixbuf): Sync
	change from 1.0 tree that returns first frame of animation
	if the loaded file is an animation.

        * contrib: add new directory to hold stuff that comes with GTK+
	but isn't really part of GTK+ (for now, gdk-pixbuf-xlib)

	* configure.in: add contrib/*

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

	* gdk-pixbuf.h: add GdkPixbufAlphaMode

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

        This entry is a summary of the merged-in changes from 1.0.
	Relevant original ChangeLog entries are spliced in after
	this entry; the files they refer to are from the 1.0
	gdk-pixbuf sources.

	* pixops/pixops.c (pixops_composite_nearest): sync a small fix
	from 1.0

	* io-xpm.c (xpm_seek_string): add fscanf error check from 1.0
	Add progressive loader from 1.0

	* io-tiff.c (gdk_pixbuf__tiff_image_begin_load): mem leak fixes
	from 1.0 tree

	* io-pnm.c: new version from 1.0 tree

	* io-jpeg.c (gdk_pixbuf__jpeg_image_load): sync from 1.0, use
	malloc not g_malloc

	* io-gif.c (lzw_read_byte): sync from 1.0, change a g_error to
	g_warning
	(gif_get_next_step): return 0 here, sync from 1.0

	* gdk-pixbuf-util.c: sync email address change for Cody
	Russell

2000-09-11  Jeffrey Stedfast  <fejj@helixcode.com>

	* gdk-pixbuf/io-pnm.c: Pretty much totally rewrote again because
	last nights code was still "broken". Should now properly handle
	all error conditions gracefully.

2000-09-10  Jeffrey Stedfast  <fejj@helixcode.com>

	* gdk-pixbuf/io-pnm.c: Rewrote.

2000-09-09  Federico Mena Quintero  <federico@helixcode.com>

	* gdk-pixbuf/pixops/pixops.c (pixops_composite_nearest): Compute
	the correct dest offset.

2000-08-25  Federico Mena Quintero  <federico@helixcode.com>

	* gdk-pixbuf/io-xpm.c: #include <unistd.h>

2000-08-05  Larry Ewing  <lewing@helixcode.com>

	* gdk-pixbuf/io-tiff.c: stop leaking context->tempname.

	* gdk-pixbuf/io-xpm.c: same as above.

2000-07-26  Michael Meeks  <michael@helixcode.com>

	* gdk-pixbuf/io-jpeg.c (gdk_pixbuf__jpeg_image_load): make
	g_malloc a malloc.

2000-07-21  Larry Ewing  <lewing@helixcode.com>

	* gdk-pixbuf/io-xpm.c: add a fake progressive loader so that
	xpm at least supports the progressive interface like the one in
	io-tiff.c. This should be reimplemented as an actual progressive
	loader.

2000-07-19  Jonathan Blandford  <jrb@redhat.com>

	* demo/pixbuf-demo.c (update_timeout): changed scaling level to
	make it look better.
	* gdk-pixbuf/testpixbuf.c (update_timeout): Patch from michael
	meeks to handle errors better.
2000-10-09 17:22:20 +00:00
Jonathan Blandford
76806e9a1e Fix obvious bug in circle drawing.
2000-10-04  Jonathan Blandford  <jrb@redhat.com>

	* gdk/gdkwindow.c (gdk_window_draw_arc): Fix obvious bug in circle
	drawing.
2000-10-04 23:16:05 +00:00
0
468689e31a Move list pointer forwards before removing item from list. (Crash reported
Wed Oct  4 15:52:15 2000    <otaylor@redhat.com>

	* gdk/x11/gdkselection-x11.c (_gdk_selection_window_destroyed):
	Move list pointer forwards before removing item from
	list. (Crash reported by Salmaso Raffaele)

	* gdk/gdkwindow.h: Remove spurious trailing ,

	* gdk/Makefile.am (LDFLAGS): You can't do interlibrary
	dependencies on uninstalled libraries, sorry folks.
2000-10-04 19:53:53 +00:00
Owen Taylor
0d15886459 Add gdk_window_iconify.
Mon Sep 25 15:05:17 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkwindow.h gdk/x11/gdkwindow-x11.c (gdk_window_iconify):
	Add gdk_window_iconify.

	* gdk/gdkwindow.h gdk/x11/gdkwindow-x11.c
	(gdk_window_set_geometry_hints): Add win_gravity
	to geometry structure.

	* gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter):
	Implement _NET_WM_PING.

	* gdk/x11/gdkmain-x11.c (_gdk_windowing_init_check):
	Set _NET_WM_PID on the client leader.

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_name):
	Handle UTF-8 better.

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_title): Handle
	UTF-8 better, set _NET_WM_NAME as well. Only set
	icon name if it hasn't previously been explicitely
	set.
2000-10-04 16:51:42 +00:00
Tor Lillqvist
69ac9451a6 Guard definition of alloca(). glib.h now handles that.
2000-10-03  Tor Lillqvist  <tml@iki.fi>

	* config.h.win32: Guard definition of alloca(). glib.h now handles
	that.

	* gdk/gdk.def
	* gtk/gtk.def: Add new entry points.

	Changes just to make GTK+ build without errors on Win32. No hope
	of it working in its current state, though...:

	* gdk/win32/gdkselection-win32.c: Remove gcc -Wall warnings.  Add
	some functions from the X11 backend, just to make GTK+ build.

	* gdk/makefile.mingw.in
	* gtk/makefile.mingw.in: Use correct gdk_pixbuf version
	number. Add new object files.

	* gtk/gtkclipboard.c: Include gdkwin32.h on Win32. Use
	GetMessageTime to get timestamp (where on X11 uses
	gdk_x11_get_server_time()).
2000-10-03 21:00:49 +00:00
Owen Taylor
39339f14f5 Remove g_convert (moved to glib) and now useless utf_to_latin1()
Thu Sep 14 12:21:12 2000  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktexttypes.[ch]: Remove g_convert (moved to
	glib) and now useless utf_to_latin1() latin1_to_utf()

	* gtk/gtktextview.[ch]: Change ::move_insert and
	::delete_text action signals to ::move and ::delete;
	create the signals with the right enumeration type,
	not GTK_TYPE_ENUM so that bindings work. Add C-d, M-d,
	C-v bindings, change Home, End to move to beginning/end
	of line, Add C-Home C-End to move to beginning/end
	of buffer. Change ::cut_text to ::cut_clipboard, etc;
	combine ::scroll_text into ::move; use new GtkSelectionData
	functions to simplify DND text handling.

	* gtk/gtkenums.h gtk/gtktextview.h: Move movement,
	deletion enumerations here, rename enumeration values to
	be consistently plural.

	* gtk/gtktextbuffer.c: Use new clipboard interfaces
	for cut/copy/paste and primary selection.

	* gtk/gtktextbuffer.[ch]: Remove excess time and
	'interactive' arguments from cut/copy/paste;
	rename cut to cut_clipboard, etc; remove
	gtk_text_buffer_get_clipboard_contents().

	* gtk/gtktextlayout.[ch]: Add
	gtk_text_layout_move_iter_to_line_end() to move	the iter to
	line ends.

	* gtk/gtkselection.[ch] (gtk_selection_data_set/get_text):
	Functions to set or get a UTF-8 string on the selection
	data.

	* gtk/gtkclipboard.[ch]: New, simplified selection handling
	interfaces.

	* gtk/gtkinvisible.c (gtk_invisible_new): Realize newly
	created widgets - one of these is useless if we don't.

	* gtk/gtkselection.[ch] (gtk_selection_clear_targets): Export
	a public function clear all targets registered for the
	widget.

	* gtk/gtkselection.c (gtk_selection_owner_set) docs/Changes-2.0.txt:
	Never call gtk_widget_realize() - that was just asking
	for bizarre side-effects.

	* gtk/gtkselection.c (gtk_selection_owner_set): Call
	gdk_selection_owner_set even if the widget is the
	same so that we reliably update the timestamp on
	the server.

	* gdk/x11/gdkevents-x11.c gdk/x11/gdkx.h: Add a
	gdk_x11_get_server_time() function.

	* gdk/x11/gdkevents-x11.c gdk/x11/gdkprivate-x11.h
	gdk/x11/gdkselection-x11.c gdk/x11/gdkwindow-x11.h:
	Add some tricky filtering on serial numbers for
	selection clear events to fix up long-standard
	race condition FIXME's in gtkselection.c.

	* gdk/gdkproperty.h gdk/x11/gdkselection-x11.h: Add
	routines to convert from utf8 to compound text or
	STRING and from a text property to UTF-8.

	* gtk/gtkmain.[ch] (gtk_get_current_event_time): Add
	a convenience function gdk_get_current_event_time().

	* gtk/gtkselection.c (gtk_selection_data_copy/free): Copy
	and free selection_data->data properly
2000-09-14 16:41:20 +00:00
Tor Lillqvist
7e928a4b2d Oops, cut&paste error. 2000-09-07 19:55:36 +00:00
Tor Lillqvist
6ffe1dcf10 Use -Wall. Add gdkpango-win32.o
2000-09-07  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/makefile.mingw.in: Use -Wall. Add gdkpango-win32.o

	* gdk/win32/gdkwin32.h: Add more definitions missing from the free
	w32api headers.

	* gdk/win32/gdkprivate-win32.h: Add a couple of missing
	declarations.

	* gdk/win32/gdkdrawable-win32.c: Remove gcc -Wall warnings.
	(gdk_win32_get_colormap): A line had been deleted by mistake.

	* gdk/win32/gdkevents-win32.c: Remove lint (gcc -Wall) here, too.
	(gdk_event_translate): Handle more virtual keycodes to be able to
	generate GDK events for Control-comma, Control-period, etc.

	* gtk/gtk.def: Add some missing entry points.

2000-09-07  Tor Lillqvist  <tml@iki.fi>

	* makefile.mingw.in: Use own version number for gdk-pixbuf DLLs,
	like on Unix.
2000-09-07 19:51:32 +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
Sebastian Wilhelmi
8c4980ed54 Remove conftest* after use along the lines of AC_TRY_COMPILE.
2000-09-05  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in (use_mmx_asm): Remove conftest* after use along the
	lines of AC_TRY_COMPILE.

        * .cvsignore updates
2000-09-05 14:07:55 +00:00
Elliot Lee
2c8fc56d21 Put text after #endif inside a comment to avoid ANSI warning.
* gdk/gdkpixbuf.h: Put text after #endif inside a comment to avoid ANSI warning.
2000-09-04 20:54:39 +00:00
Owen Taylor
6e3a2369b3 Fix bug where moving a toplevel window immediately after sizing it would
Fri Sep  1 15:34:46 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_move): Fix bug where
	moving a toplevel window immediately after sizing it would
	result in it being sized back to the old size since
	impl->width, impl->height aren't updated until we hear
	back from the server. There is still a (longstanding) bug
	here that gdk_window_get_size() will give the wrong size
	until we do hear back.
2000-09-01 20:10:58 +00:00
Owen Taylor
d717bbe4df remove GDK_IMAGE_SHARED_PIXMAP from switch statements, since Tor removed
Fri Aug 25 12:16:15 2000  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkimage-x11.c: remove GDK_IMAGE_SHARED_PIXMAP
	from switch statements, since Tor removed the enumeration
	value.

	* gdk/x11/gdkimage-x11.c (gdk_image_get):
	s/GDK_IS_WINDOW/GDK_IS_DRAWABLE/.
2000-08-31 02:04:54 +00:00
Elliot Lee
0176b387c8 Use G_GNUC_CONST.
Use G_GNUC_CONST.
2000-08-30 00:33:38 +00:00
Elliot Lee
3c8161925e Try to fix a bug where a window move, with a non-rectangular region
Try to fix a bug where a window move, with a non-rectangular region unobstructed, would cause
pieces of the window to be moved twice. Effectively, sort of implement a
gdk_draw_drawable_region(drawable, gc, drawable, region, dx, dy);

Am going blind trying to find the off-by-one thing, especially since it doesn't happen except for
the preview tests. Still not fixed, have at it.
2000-08-23 00:50:32 +00:00
Tor Lillqvist
617e17da3f gdk/gdkimage.h No need any longer on Win32 for the shared memory
2000-08-20  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdkimage.h
	* gdk/win32/gdkimage-win32.c: No need any longer on Win32 for the
	shared memory image+pixmap GdkImage type, or
	gdk_image_bitmap_new(). They were used in the gdk_imlib port, but
	I am dropping that.

	* gtk/gtkmain.h: On Win32, use a #define to map gtk_init() to
	actually call gtk_init_abi_check(), passing also
	sizeof(GtkWindow). Ditto for gtk_init_check().

	* gtk/gtk.def
	* gtk/gtkmain.c: (gtk_init_abi_check, gtk_init_check_abi_check):
	New functions, used to check that the GTK+-using code has been
	compiled using the correct compiler and switches. In particular,
	with gcc one has to use the -fnative-struct switch as GTK+ is
	compiled with that.
2000-08-19 21:46:05 +00:00
Owen Taylor
41885abc7c Don't leave dangling ->prev fields when merging lists. (Found
Fri Aug 18 17:27:46 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkclist.c (gtk_clist_merge): Don't leave dangling
	->prev fields when merging lists. (Found simultaneously
	by Pawel Salek and Jakub Jelinek)
2000-08-18 21:32:48 +00:00
Tor Lillqvist
e0833cd52a gdk/gdk.def Add missing entries.
2000-08-12  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdk.def
	* gtk/gtk.def: Add missing entries.

	* gdk/win32/gdkfont-win32.c (gdk_font_load_internal): Use
	OUT_TT_ONLY_PRECIS, try to get a TrueType font.

	* gdk/win32/gdkinput-win32.c (gdk_device_get_state): New
	function. Dummy implementation at this point.

	* gtk/makefile.mingw.in: Fix typo. Add testtext and testtextbuffer
	rules. Undefine GTK_COMPILATION when compiling the test programs.

	* gtk/gtkdebug.h: Mark gtk_debug_flags for export/import.

	* gdk_pixbuf.def: Add missing entry point.
2000-08-12 19:51:05 +00:00
Havoc Pennington
fcc951506d Change the format of the snapshot version to match glib
2000-08-10  Havoc Pennington  <hp@redhat.com>

* Makefile.am (snapshot): Change the format of the snapshot
version to match glib

* gdk/win32/Makefile.am (EXTRA_DIST): remove gdkinputprivate.h
from EXTRA_DIST since it doesn't seem to exist

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

* Makefile.am (EXTRA_DIST): The *.def files had the wrong names
(s/pixbuf_/pixbufloader_)
2000-08-11 02:58:59 +00:00
Elliot Lee
cbfcca98b0 Ref window before returning.
Ref window before returning.
2000-08-09 21:53:50 +00:00
Elliot Lee
a6895b64fd Make numeric keypad work.
Make numeric keypad work.
2000-08-09 19:58:10 +00:00
Elliot Lee
98bacfb792 Bugfixorama
Bugfixorama
2000-08-09 17:26:29 +00:00
Elliot Lee
d72659968c Some hacks to stop screen blanking.
Some hacks to stop screen blanking.
2000-08-09 17:24:47 +00:00
Elliot Lee
06fd9e335d Implement gdk_beep() (woohoo!)
Implement gdk_beep() (woohoo!)
2000-08-09 16:12:06 +00:00
Elliot Lee
9ecfc48c12 Fix compiler warnings 2000-08-09 02:56:13 +00:00
Elliot Lee
d1da582ab8 Fix GDK_Left position in table.
Fix GDK_Left position in table.
2000-08-09 01:36:37 +00:00
Elliot Lee
f14eca7043 At init time, read data from the PS/2 mouse until there's nothing left to
At init time, read data from the PS/2 mouse until there's nothing left to read, in an attempt to
synchronize up with the event stream.
2000-08-08 16:44:25 +00:00
Elliot Lee
b9ac96e591 Handle GDK_INCLUDE_INFERIORS subwindow_mode.
Handle GDK_INCLUDE_INFERIORS subwindow_mode.

Call gobject finalize routine in gdk_gc_finalize.

Unrememberable etcs.
2000-08-07 23:00:38 +00:00
Elliot Lee
bc3f1cfc43 Store mouse coords as doubles not ints...
Store mouse coords as doubles not ints...
2000-08-07 18:21:18 +00:00
Elliot Lee
73f441ccbb Works. 2000-08-07 18:19:43 +00:00
Elliot Lee
10ce43ece5 fidmour support, mouse genericization (the file is now quite misnamed, I'm
fidmour support, mouse genericization (the file is now quite misnamed, I'm afraid).
2000-08-07 03:31:12 +00:00
Elliot Lee
c6bf7f0c5f Warning fixes. 2000-08-07 03:26:05 +00:00
Elliot Lee
08b87727f0 Implement gdkcc (visually broken, but can be fixed by someone with a clue
Implement gdkcc (visually broken, but can be fixed by someone with a clue w/o problems).
2000-08-04 01:30:54 +00:00
Elliot Lee
5ad55596f9 sync to ps2-less anode
sync to ps2-less anode
2000-08-03 21:19:04 +00:00
Elliot Lee
b3dd84048d Fix the second bug, draw underlines.
Fix the second bug, draw underlines.
2000-08-03 20:43:47 +00:00
Elliot Lee
aa88a217a5 Bugfix.
Bugfix.
2000-08-03 20:33:38 +00:00
Elliot Lee
98f8f4d229 Don't draw runs with a PANGO_ATTR_SHAPE set.
* gdk/gdkpango.c (gdk_draw_layout_line): Don't draw runs with a PANGO_ATTR_SHAPE set.
2000-08-03 20:15:37 +00:00
Owen Taylor
c4384ce24f Applied patch from Peter Osterlund to simplify the code while keeping the
Thu Aug  3 09:17:06 2000  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkrectangle.c (gdk_rectangle_intersect): Applied patch from
        Peter Osterlund to simplify the code while keeping the
        functionality the same.
2000-08-03 13:18:01 +00:00
Elliot Lee
b427cec028 Set serif font to something sane.
Set serif font to something sane.

Add cursors so it will compile anywhere (hopefully).
2000-08-03 02:33:46 +00:00
Owen Taylor
1b6dbf0ea2 Move is_viewable() test further inside the function, since removing the
Wed Aug  2 14:57:38 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkwindow.c (gdk_window_process_updates_internal): Move
	is_viewable() test further inside the function, since removing the
	window from the redraw list without clearing ->update_area
	was also very broken.
2000-08-02 19:07:00 +00:00
Owen Taylor
e9a03443c7 Fix problem where computation was depending on widget->allocation instead
Mon Jul 31 18:37:36 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkentry.c (entry_adjust_scroll): Fix problem where computation
	was depending on widget->allocation instead of the width of text_area,
	which was incorrect for subclasses like GtkSpinButton.

	* gdk/gdkpango.c (gdk_draw_layout): Fix a couple of typos
	with width == 1 tests that should be width == -1.
2000-07-31 22:59:29 +00:00
Owen Taylor
44afc537b3 Replace broken, (broken, Elliot, every single window blank on X) custom
Mon Jul 31 16:45:48 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkwindow.c (gdk_window_process_updates_internal): Replace broken,
	(broken, Elliot, every single window blank on X) custom code with call
	to gdk_window_is_viewable() which a) prevents code duplicate and
	b) works.
2000-07-31 20:48:38 +00:00
Elliot Lee
d9e05d7009 We really do need to include gdkfb.h in order to get the GDK_PARENT_ROOT()
* gtk/gtkcolorsel.c: We really do need to include gdkfb.h in order to get the GDK_PARENT_ROOT()
macro to work.
* gtk/gtkmarshal.list: Add NONE:STRING,POINTER
* gdk/gdkwindow.c: Don't send expose events, or invalidate pieces of, windows that aren't shown.
* gdk/linux-fb: Redraw-when-menu-hidden solved, plus a bunch of pointer grab stuff.
2000-07-31 17:18:36 +00:00
Stanislav Brabec
e4d140d5aa #ifdef G_ENABLE_DEBUG around gdk_arg_debug_cb and gdk_arg_no_debug_cb to
2000-07-31  Stanislav Brabec  <utx@penguin.cz>

        * gdk/gdk.c: #ifdef G_ENABLE_DEBUG around gdk_arg_debug_cb and
        gdk_arg_no_debug_cb to fix compilation problem with --disable-debug.

        * gdk/Makefile.am: Link gdk against actually compiled gdk_pixbuf-1.3,
        not gdk_pixbuf.
2000-07-31 10:16:45 +00:00
Tor Lillqvist
471396fdd4 Add makefile.mingw.in to EXTRA_DIST.
2000-07-30  Tor Lillqvist  <tml@iki.fi>

	* gdk/Makefile.am: Add makefile.mingw.in to EXTRA_DIST.

	* gdk/win32/gdkevents-win32.c (gdk_events_init, gdk_events_queue):
	Remove the g_pipe_readable_msg stuff. Not needed with new GLib
	GIOChannel implementation.

	* gdk/win32/gdkinput.c
	* gdk/win32/gdkpango-win32.c: Update license name here, too.

	* gdk/win32/gdkwin32id.c (gdk_win32_handle_table_lookup): Fix
	definition to match prototype.

	* gtk/makefile.mingw.in: Add libiconv CFLAGS and LIBS.
2000-07-30 08:11:28 +00:00
Tim Janik
afee2c67c5 applied patch from Andreas Persenius <ndap@swipnet.se> that updates the
Wed Jul 26 12:59:31 2000  Tim Janik  <timj@gtk.org>

        * *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
        updates the license headers to the GNU Lesser General Public License,
        as well as updating the copyright year to 2000.
2000-07-26 11:33:08 +00:00
Tor Lillqvist
20e675e1a3 Generate gtk/makefile.mingw.
2000-07-25  Tor Lillqvist  <tml@iki.fi>

	* configure.in: Generate gtk/makefile.mingw.

	* config.h.win32: Add GETTEXT_PACKAGE.

	* gdk/gdk.def
	* gtk/gtk.def: Updates.

	* gdk/gdkfont.h
	* gdk/gdkpixmap.h: Remove temporary Win32-only functions, we don't
	need them any longer.

	* gdk/gdkinput.h: Mark gdk_core_pointer for export/import.

	* gdk/win32/*.c: More work.

	* gdk/win32/gdkpango-win32.c: New file.

	* gtk/makefile.mingw.in: New file

	* gtk/makefile.cygwin: Removed

	* gtk/Makefile.am: Update accordingly.

	* gtk/gtkmain.c: Use gtk_win32_get_installation_directory().

	* gtk/gtktextdisplay.c: No need to include pangox.h, pango.h
	is enough.

	* gtk/gtktypeutils.c: Mark glib_debug_objects for import.
2000-07-25 20:38:35 +00:00
Tor Lillqvist
5ac61d3eee Include the build directory.
2000-07-25  Tor Lillqvist  <tml@iki.fi>

	* Makefile.am: Include the build directory.

	* configure.in: Generate build/Makefile and build/win32/Makefile.

	* config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf.

	* gdk/gdk.def
	* gtk/gtk.def: Updates.

	* gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with
	PANGOWIN32_LIBS and gdk_pixbuf.

	* gdk/win32: Compiles, but no doubt doesn't work at all.

	* gdk/win32/makefile.mingw.in: Define GDK_COMPILATION.

	* gdk/win32/gdkinput.c: New file, temporarily.

	* gdk/win32/gdkinput-win32.h: New file

	* gdk/win32/gdkinputprivate.h: Remove.

	* gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and
	made externally visible.
2000-07-25 17:31:05 +00:00
Elliot Lee
6d7a643f7c (Part 2) Remove gdk_*_lookup() defines, since they are defined by the
(Part 2)
	* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
	individual backends already.
	* gdk/gdkregion-generic.h, gdk/gdktypes.h: Put gdkregionbox & gdksegment back together
	again. Yes, there really is a good reason for this, if you are using the gdkregion
	internals, and if you're not, why do you care?
	* gdk/gdkwindow.c: Fix inverted condition
	* gdk/linux-fb: Compiles (for me - it will not work elsewhere most likely).
	* gtk/gtkcolorsel.c, gtk/gtkwindow.c: Add include for linux-fb
	* gtk/gtkrange.c: Redraw trough when moving.
	* gtk/gtktypeutils.c: Fix warning by adding const cast.
	* modules/linux-fb/basic.c: Fix unknown glyph retrieval.
2000-07-24 16:19:00 +00:00
Tor Lillqvist
4658795817 More work on the Win32 backend. More files compile now. 2000-07-23 21:43:23 +00:00
Tor Lillqvist
20b5d8ec2f More work on GDK for Win32. Still in an intermediate state.
2000-07-23  Tor Lillqvist  <tml@iki.fi>

	More work on GDK for Win32. Still in an intermediate state.

	* gdk/makefile.cygwin
	* gdk/win32/makefile.cygwin: Removed.

	* gdk/makefile.mingw.in
	* gdk/win32/makefile.mingw.in: New files.

	* gdk/Makefile.am
	* gdk/win32/Makefile.am: Generate and distribute them.

	* gdk/win32/gdkwindow-win32.h
	* gdk/win32/gdkdrawable-win32.h
	* gdk/win32/gdkpixmap-win32.h: New files.

	* gdk/win32/gdkcolor-win32.c
	* gdk/win32/gdkcursor-win32.c
	* gdk/win32/gdkgc-win32.c
	* gdk/win32/gdkimage-win32.c
	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkwin32.h: Update data structures. Cosmetics:
	don't use fields and variables called xcursor, xid, etc (leftovers
	from the X11 backend).
2000-07-23 01:18:34 +00:00
Tor Lillqvist
2f8d209e5d New file, quick hack to test backends for pixel-by-pixel correctness of
2000-07-15  Tor Lillqvist  <tml@iki.fi>

* gdk/testgdk.c: New file, quick hack to test backends for
pixel-by-pixel correctness of the most simple graphic operations.
2000-07-15 02:15:44 +00:00
Owen Taylor
0bcf86c032 use FALSE for size_only most of the time when calling
Fri Jul 14 16:21:26 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextlayout.c: use FALSE for size_only most
	of the time when calling gtk_text_layout_get_line_display()
	to avoid causing double reshapes when a redraw follows
	immediately after.

Tue Jul 11 11:13:40 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkrange.c (gtk_range_default_[hv]slider_update): Invalidate
	appropriate region and gdk_window_process_updates() so trough
	updating doesn't lag behind the window being scrolled.

        * gdk/gdkgc.c: Make parent_class pointer static.

Sun Jul  9 21:31:23 2000  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdk-pixbuf.c gtk/gdk-pixbuf-loader.c gtk/gtktextview.c:
	include <string.h>.

	* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Fix
	cut-and-paste error in computing memory offset for 4 channels.
2000-07-14 20:24:14 +00:00
Owen Taylor
bb26890024 Move gtk-config to gtk-config-2.0 move gtk_.m4 to gtk-2.0.m4
Fri Jul 14 12:22:49 2000  Owen Taylor  <otaylor@redhat.com>

	* configure.in Makefile.am gtk-config.m4 gtk.m4: Move
	gtk-config to gtk-config-2.0 move gtk_.m4 to
	gtk-2.0.m4

	* Makefile.am gtk/Makefile.am gdk-pixbuf/Makefile.am
	gdk/Makefile.am demos/Makefile.am: Change
	library names to libgtk-1.3.la, etc, so that we
	can distinguish gtk-1.2 and gtk-2.0 on the linkline.

	* Makefile.am gtk/Makefile.am gdk-pixbuf/Makefile.am
	gdk/Makefile.am gdk/x11/Makfile.am
	Move include files into /usr/include/gtk-2.0,
	/usr/lib/gtk-2.0/include/

	* autogen.sh acconfig.h configure.in gtk/gtkmain.c
	gtk/gtkintl.h: Change package for gettext from
	gtk+ to gtk20. Put hack in autogen.sh to modify
	po/Makefile.in.in after gettextize to make this
	possible.

	* gtk+.spec: Some updates, not tested.

	* gdk-pixbuf/Makefile.am: Move loaders into
	$(libdir)/gtk-2.0/$(GTK_VERSION)/loaders.

	* gtk/Makefile.am gtk/gtkrc.c: Move RC file locations
	$(sysconfdir)/gtk-2.0 ~/.gtkrc-2.0; theme subdir
	to THEMENAME/gtk-2.0/. Move engine directory  to
	$(libdir)/gtk-2.0/$(GTK_VERSION)/engines.
2000-07-14 20:08:10 +00:00
Tor Lillqvist
1f581a961e gdk/win32/gdkcolor-win32.c gdk/win32/gdkprivate-win32.h Changes to make
2000-07-12  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkcc-win32.c:
* gdk/win32/gdkcolor-win32.c
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkwin32.h: Changes to make compilable, with new
GDK object structure.
2000-07-11 22:39:34 +00:00
Tor Lillqvist
2823963703 Win32 changes, still doesn't build though.
2000-07-12  Tor Lillqvist  <tml@iki.fi>

Win32 changes, still doesn't build though.

* gdk/makefile.cygwin
* gdk/win32/makefile.cygwin
* gtk/makefile.cygwin: Updates.

* gdk/win32/gdkgc-win32.c (_gdk_win32_gc_new): Use the same
default values for fg and bg pixel as X11 does (0 and 1), not
black and white. Use PS_ENDCAP_FLAT and PS_JOIN_MITER by default.
Use 0 for pen width by default (treated as 1 anyway later, but for
apps that might check the value in the GdkGC).
(gdk_win32_hdc_get, gdk_win32_hdc_release): New functions, public
interface to gdk_gc_predraw and _postdraw.

* gdk/win32/gdkwin32.h
* gdk/gdk.def: Add gdk_win32_hdc_{get,release}.

* gdk/win32/gdkcolor-win32.c (gdk_colormap_alloc1): Remove
extraneous semicolon.

* gdk/win32/gdkdrawable-win32.c: Check also for pen_width == 0.

* gdk/win32/gdkimage-win32.c (gdk_image_new): Use the visual's depth,
not the Win32 bitspixel value.
2000-07-11 21:42:15 +00:00
Tim Janik
64911ddc44 add xthickness and ythickness to GtkRcStyle and add the necessary tokens.
Tue Jul 11 06:38:42 2000  Tim Janik  <timj@gtk.org>

        * gtk/gtkrc.h: add xthickness and ythickness to GtkRcStyle and
        add the necessary tokens.

        * gtk/gtkrc.c (gtk_rc_style_init): properly initiality the rc style.
        (gtk_rc_style_to_style): copy thicknesses.
        (gtk_rc_init_style): apply thicknesses.
        (gtk_rc_parse_style): parse xthickness and ythickness.

        * gdk/x11/gdkdnd-x11.c: silence compiler in switch() statements.

        * gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new):
        (gdk_window_new):
        (_gdk_windowing_window_init):
        * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_foreign_new):
        (gdk_pixmap_create_from_data):
        (gdk_bitmap_create_from_data):
        (gdk_pixmap_new):
        * gdk/x11/gdkimage-x11.c (gdk_image_get):
        (gdk_image_new):
        * gdk/x11/gdkgc-x11.c (_gdk_x11_gc_new):
        * gdk/x11/gdkdnd-x11.c (gdk_drag_context_new):
        * gdk/x11/gdkcolor-x11.c (gdkx_colormap_get):
        (gdk_colormap_get_system):
        (gdk_colormap_new):
        * gdk/gdkwindow.c (gdk_window_init):
        * gtk/gtkstyle.c (gtk_style_new):
        * gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_frame_done):
        * gdk/gdkpixmap.c (gdk_pixmap_init):
        * gtk/gtkrc.c (gtk_rc_style_new):
        use g_object_new() instead of g_type_create_instance() which
        is a private function for fundamental type implementations.

Tue Jul 11 06:20:14 2000  Tim Janik  <timj@gtk.org>

        * io-gif.c (gdk_pixbuf__gif_image_load_animation):
        * gdk-pixbuf-data.c (gdk_pixbuf_new_from_data):
        * gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file):
        use g_object_new() instead of g_type_create_instance() which
        is a private function for fundamental type implementations.
2000-07-11 04:46:11 +00:00
Owen Taylor
359307231a Add check for db2html
Thu Jul  6 16:12:14 2000  Owen Taylor  <otaylor@redhat.com>

	* configure.in: Add check for db2html

Thu Jul  6 14:53:05 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktypeutils.c (gtk_type_init): Add a temporary
	hack to set glib_debug_objects based on gtk_debug_flags.

Thu Jul  6 14:12:13 2000  Owen Taylor  <otaylor@redhat.com>

	* INSTALL.in: Update the Prerequisites section.

	* Makefile.am demos/Makefile.am docs/Makefile.am
	docs/tutorial/Makefile.am gdk/x11/Makefile.am
	gdk/linux-fb/Makefile.am: Dist fixes
2000-07-06 21:09:25 +00:00
Owen Taylor
0611f06b5a Patch from George Liebl to add a GdkGrabStatus enumeration to use as a
Thu Jul  6 11:54:03 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdk.h gdk/gdktypes.h gdk/linux-fb/gdkmain-fb.c
	gdk/nanox/gdkmain-nanox.c gdk/win32/gdkevents-win32.c
	gdk/win32/gdkinput-win32.c gdk/win32/gdkwin32.h
	gdk/x11/gdkmain-x11.c:

	Patch from George Liebl to add a GdkGrabStatus enumeration to use
	as a return value of gdk_*_grab(). Previously, we just
	returned the X11 values directly.
2000-07-06 16:20:45 +00:00
Owen Taylor
f60e216527 Patch from George Liebl to install all the headers in the right place.
Thu Jul  6 11:27:44 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/Makefile.am: Patch from George Liebl to
	install all the headers in the right place.
2000-07-06 15:51:10 +00:00
Tor Lillqvist
a1260f864d Handle also WM_SYSCHAR, and other changes to get handling of Alt+nnn or
2000-07-04  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkevents-win32.c (gdk_event_translate): Handle also
WM_SYSCHAR, and other changes to get handling of Alt+nnn or
Alt+0nnn on the numpad (used to enter characters by numeric code
from current DOS or ANSI codepage) working correctly, as in other
Windows apps.

* gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Use
same argument validity tests as in X11 version.
(_gdk_cursor_destroy): Use DestroyCursor, not DestroyIcon.

* gdk/win32/gdkwin32.h: Add also WM_MOUSEWHEEL and CopyCursor
definitions in case missing from headers.

* gdk/win32/gdkwindow-win32.c (gdk_win32_window_destroy): ALso
destroy the window-specific cursor.
(RegisterGdkClass): Use the global gdk_ProgInstance instead of
calling GetModuleHandle(NULL).
(gdk_window_set_cursor): Reworked to always copy the passed cursor
with CopyCursor before setting it. It is OK for the caller to
destroy the GdkCursor (and thus also the Windows cursor) after
calling this function. Also, destroy any previous cursor for this
window.

2000-05-29  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkevents-win32.c (gdk_WindowProc): The local "event"
variable should be of type GdkEventPrivate.
2000-07-04 06:12:54 +00:00
Owen Taylor
ceac1c16fd font charset is iso8859-1, not iso-8859-1.
Mon Jul  3 17:54:49 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkfont-x11.c (gdk_font_charset_for_locale):
	font charset is iso8859-1, not iso-8859-1.
2000-07-03 21:56:27 +00:00
Owen Taylor
50b1a5a9dc Use g_get_charset() instead of g_get_codeset().
Mon Jul  3 17:08:14 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkfont-x11.c (gdk_font_charset_for_locale):
	Use g_get_charset() instead of g_get_codeset().

	* gtk/gtkframe.[ch] gtkframe.h gtk/gtktextmark.h:
	Comment out some strdup'ing functions to keep timj
	happy until we finish fighting this out.
2000-07-03 21:21:25 +00:00
Owen Taylor
01212ce170 Ignore calls with <= width or height.
Mon Jul  3 14:24:16 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_draw): Ignore calls with
	<= width or height.

	* gtk/gtktable.c (gtk_table_attach): Fix missed merge
	from 1.2 for parent/child states.

	* gdk/gdkgc.c (gdk_gc_set_rgb_fg/bg_color): Fix a couple
	of typos.

	* gdk/gdkevents.[ch]: Remove press/xtilt/ytilt fields of
	event structures, replace with a generic axes field. Replace
	deviceid/source with GdkDevice *device.

	* gdk/gdkevents.[ch] (gdk_event_get_axis): Add function
	to extract particular axis use value from event. (Also
	can be used for normal X/Y.)

	* gdk/gdkinput.h gdk/x11/gdkinput*: Major revision;
	allow for arbitrary number of axes, namespace everything
	as gdk_device_*. Replace guint32 deviceid with GdkDevice *
	everywhere.

	* gdk/x11/{gdkmain-x11.c,gdkevent-x11.c,gdkinput*}:
	Get rid of the gdk_input_vtable setup if favor of simply
	defining the functions in gdkinput-none/gxi/xfree.c in
	a similar fashion to the way that the port structure is
	done.

	* gtk/gtkdnd.c: Fix fields of synthesized button press event
	for new event structures.

	* gtk/gtkinputdialog.c gtk/testinput.c: Revise to match
	new device interfaces.
2000-07-03 19:00:23 +00:00
Owen Taylor
fe7fb8c62f Add a is_foreign flag to the structure. Do not call XFreePixmap on pixmaps
Sun Jul  2 13:06:26 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkpixmap-x11.[ch] Changes-1.4.txt: Add a is_foreign
	flag to the structure. Do not call XFreePixmap on pixmaps created
	by gdk_pixmap_foreign_new().
2000-07-02 17:16:54 +00:00
Owen Taylor
4f1ccca594 Add gdk_rgb_find_color() to get a pixel value using GdkRGB functionality
Sun Jul  2 12:45:50 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkrgb.[ch]: Add gdk_rgb_find_color() to get a pixel
	value using GdkRGB functionality given GdkColormap and GdkColor.
	(name not final, waiting for inspiration.)

	* gdk/gdkgc.[ch] (gdk_gc_set_rgb_fg/bg_color): New functions to
	set the foreground/background of a GC using the GC's colormap
	and GdkRGB. (name not final, waiting for inspiration.)

	* gdk/gdkcompat.h gdk/gdkrgb.c (gdk_rgb_get_colormap): Rename from
	gdk_rgb_get_cmap(), put #define in gdkcompat.h.

	* gtk/gtkwidget.[ch] gtkcompat.h: Make visuals for
	gtk_widget_get_visual(), gtk_widget_get_default_visual, etc,
	purely a function of the corresponding colormap. Make
	gtk_widget_set_visual(), etc, noop macros in gtkcompat.h.

	* gdk/gdkpixmap.c gdk/x11/gdkpixmap-c11.c: Rewrite
	gdk_pixbuf_*create_from_xpm_* in terms of
	gdk_pixbuf_new_from_xpm_data(), move into platform independent
	code.

	* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Take
	advantage of the new draw_rgb_32_image_dithalign.

	* gdk/gdkrgb.c (gdk_draw_rgb_32_image_dithalign): Added.

	* gtk/gtkgc.c (gtk_gc_new): Set the appropriate colormap
	on each created GC.

	* gdk/gdkgc.[ch]: Add gdk_gc_get/set_colormap.

	* gdk/gdkgc.[ch]: Add a colormap field to the GdkGC structure
	which we initialize from the drawable when the GC is created,
	if the drawable has a colormap.

	* gdk/x11/gdkgc-x11.c: include string.h for memset.

	* gdk/x11/gdkinput-x11.c: include string.h for strlen, etc.

	* gtk/gtklayout.[ch]: Remove unsed configure serial member.
2000-07-02 17:03:21 +00:00
Owen Taylor
7164c0acb1 When actually returning expose events, make sure to set the count field
Sat Jul  1 16:28:32 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): When
	actually returning expose events, make sure to set
	the count field properly.

	* gdk/x11/gdkgc-x11.c (gdk_x11_gc_values_to_xvalues): Fix
	accidentally reintroced bug which always cleared
	the graphics_exposures value.
2000-07-01 21:15:05 +00:00
Owen Taylor
2bb4bcff5d If possible, create only a single shm segment and use multiple parts of it
Mon Jun 26 18:53:31 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkrgb.c: If possible, create only a single shm segment and
	use multiple parts of it instead of creating a bunch of separate
	segments, since the maximum number of segments per system is not
	large. (This might be worth backporting to GTK+-1.2.x if we make a
	new release )

	* gdk/gdkrgb.c: Localize a bunch of variables into the GdkRgbInfo
	structure in preparation for per-colormap GdkRGB.

	* gdk/x11/gdkimage-x11.c (gdk_image_new): Don't set gdk_use_xshm
	to False when we get EINVAL from shmget so that the caller of
	gdk_image_new can retry with a smaller segment size.
2000-06-26 22:55:42 +00:00
Havoc Pennington
3a422541e3 Convert GdkPixbuf to GObject, leaving it opaque (i.e. derivation is not
2000-06-21  Havoc Pennington  <hp@pobox.com>

* gdk-pixbuf.c: Convert GdkPixbuf to GObject, leaving it opaque
(i.e. derivation is not allowed, and there are no virtual methods
anyway).
(gdk_pixbuf_preinit): Call g_type_init() here.
(gdk_pixbuf_init): Add a user-friendly init function, for users
of standalone gdk-pixbuf

* gdk-pixbuf-animation.c: Convert to GObject, in the same
way GdkPixbufAnimation was done.

* gdk-pixbuf.h: Remove gdk_pixbuf_set_unref_handler() and
gdk_pixbuf_finalize() from API, since these are broken and don't
make sense with new GObject stuff.

2000-06-21  Havoc Pennington  <hp@pobox.com>

* gdk/gdkwindow.c (_gdk_window_destroy_hierarchy): Fix bug where
we didn't check window->bg_pixmap != GDK_NO_BG.

* gtk/gdk-pixbuf-loader.c: Change to reflect GObject-ification of
gdk-pixbuf
2000-06-22 15:36:12 +00:00
Owen Taylor
ba55612d48 Indentation fixups to GTK+ standard.
Wed Jun 21 19:29:08 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkpixbuf-render.c gdk/gdkpixbuf-drawable.c: Indentation
	fixups to GTK+ standard.
2000-06-21 23:29:51 +00:00
Owen Taylor
11056f564b Welcome aboard, gdk-pixbuf.
Wed Jun 21 16:38:13 2000  Owen Taylor  <otaylor@redhat.com>

        * gdk-pixbuf/* docs/reference/gdk-pixbuf/*: Welcome aboard,
	gdk-pixbuf.

	* gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_class_init):
	fixups for GObject.

	* gdk/Makefile.am gdk/gdkpixbuf-render.[ch] gdk/gdkpixbuf.[ch]: Bits of
	gdk-pixbuf with GDK dependencies moved into GDK.

	* gtk/Makefile.am gtk/gdk-pixbuf-loader.[ch]: Temporarily
	move gdk-pixbuf-loader here until GObject has signals.

	* demos/: New directory of demos. Move demos from
	gdk-pixbuf here.

	* demos/pixbuf-init.c: Small bit of code to check for
	loaders in ../gdk-pixbuf/.libs/gdk-pixbuf, and if found,
	set GDK_PIXBUF_MODULEDIR appropriately.

	* gdk/gdkcompat.h: Remove GDK_DRAWABLE_PIXMAP compat
	define which no longer makes sense.
2000-06-21 20:47:22 +00:00
Christopher Blizzard
e01a43253a use $(mkinstalldirs) not $(MKINSTALLDIRS)
2000-06-21 Christopher Blizzard  <blizzard@redhat.com>

        * gdk/x11/Makefile.am (install-data-local): use $(mkinstalldirs)
        not $(MKINSTALLDIRS)
2000-06-21 16:44:40 +00:00
Owen Taylor
2a98bc6a31 Remove use of libunicode in favor of new GLib functions.
Wed Jun 21 11:41:43 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkentry.c gtk/gtkimcontextsimple.c gtk/gtklabel.c
	gtk/gtktexttypes.c gtk/testtext.c modules/linux-fb/basic.c:
	Remove use of libunicode in favor of new GLib functions.

	* gtk/gtkcolorsel.c: Remove conditional includes for FB, win32,
	nano-x, framebuffer. The X11 include is just a hack until we get
	the necessary functions in gdkcolor.h, so there is no reason to
	add other includes of platforms.

	* gtk/gtkwindow.c (gtk_window_compute_default_size): Revert
	window bigger than the screen change.

        * gtk/testgtk.c: Revert some random changes from Elliot
	that had no particular point and were causing testgtkrc
	not to function correctly.

	* gdk/gdkregion-generic.h: Revert change from Elliot. Just
	because GdkSegment and GdkRegionBox have the same fields,
	it doesn't mean that 'typedef GdkSegment GdkRegionBox'
	results in clearer code.

	* gdk/x11/gdkinput-x11.c (gdk_input_common_select_events,
	gdk_input_translate_coordinates): Fix missed GdkObjectification
2000-06-21 16:19:59 +00:00
Elliot Lee
2a1b3edd18 Fix conditionality to work the "right" way. Missed commits from previous.
2000-06-18  Elliot Lee  <sopwith@redhat.com>

* gdk/Makefile.am, gdk/*/Makefile.am: Fix conditionality to work the "right" way.
* gtk/gtk{plug,socket}.h: Missed commits from previous.
2000-06-20 22:24:49 +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
Elliot Lee
dd7510dccb *** empty log message *** 2000-06-20 20:20:38 +00:00
Christopher Blizzard
f327889ac4 Change private class member to be named private_data throughout the file.
Fri Jun 16 22:24:22 2000  Christopher Blizzard  <blizzard@redhat.com>

        * gtk/gtkcolorsel.c: Change private class member to be named
        private_data throughout the file.

        * gtk/gtkcolorsel.h (struct _GtkColorSelection): Change private to
        private_data to avoid clashing with keyword.

Fri Jun 16 22:24:22 2000  Christopher Blizzard  <blizzard@redhat.com>

        * gdk/gdkdnd.h: Add comment to remove warning.
2000-06-19 03:00:56 +00:00
Owen Taylor
bae5667ca3 Call gdk_window_withdraw rather than gdk_window_hide; this makes things
Mon Jun 12 16:58:40 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwindow.c (gtk_window_unmap): Call gdk_window_withdraw
	rather than gdk_window_hide; this makes things work
	correctly if the window is programmatically hidden while
	iconified.
2000-06-12 21:08:07 +00:00
Owen Taylor
60d3ad3e0b Add missing backslash that was keeping GTK+ from building at all.
Wed Jun  7 15:44:42 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/Makefile.am (LDFLAGS): Add missing backslash that was keeping
	GTK+ from building at all.

	* gdk/Makefile.am (gdk_c_sources): Fix up some indentation issues.
2000-06-07 19:45:21 +00:00
CEST 2000 Paolo Molaro
4bacc3ecd0 make it possible to configure gtk for different targets on the same
Mon Jun  5 19:32:53 CEST 2000 Paolo Molaro <lupus@linuxcare.com>

	* configure.in, gtk-config.in, gdk/Makefile.am, gdk/*/Makefile.am,
	gtk/Makefile.am: make it possible to configure gtk for different
	targets on the same platform. The library name is now
	libgtk-$target-$version.so. gtk-config accepts a --target x11|nanox|linux-fb
	flag. Only the x11 target compiles right now.
	* gdk/gdkregion-generic.h, gdk/gdkregion-generic.c, gdk/gdkpoly-generic.h,
	gdk/gdkpolyreg-generic.c: move generic region code in the main GDK dir.
	* gdk/nanox/gdk*generic*: delete generic region code.
	* gdk/linux-fb/gdk*generic*: delete generic region code.
	* README.nanox: update information.
2000-06-07 16:44:29 +00:00
Owen Taylor
3a917e9da7 Add call to g_type_init() - we'll need this later, and this makes sure
Mon Jun  5 16:00:09 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdk.c (gdk_init_check): Add call to g_type_init() - we'll
	need this later, and this makes sure that the atexit for
	glib gets called after that for GDK, so atexits are
	properly ordered for object leak checking.

	* gdk/gdk.c (gdk_exit_func): Call gdk_windowing_exit().

	* gdk/x11/gdkmain-x11.c (gdk_windowing_exit): Call
	pango_x_shutdown_display()

	* gtk/simple.c (main): Close window on destroy.
2000-06-06 00:56:00 +00:00
Owen Taylor
eaa77a4754 We need to treat initial creation different from setting with regards to
Mon Jun  5 11:50:02 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkgc-x11.c (gdk_x11_gc_values_to_xvalues): We need
	to treat initial creation different from setting with
	regards to the graphics-exposures parameter, so add a parameter
	indicating whether this is initial or not.
2000-06-05 15:54:32 +00:00
Owen Taylor
eb34d19399 Hack gdk_event_get_graphics_expose() to sort of work by adding an extra
Mon Jun  5 13:29:31 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkevents-x11.c: Hack gdk_event_get_graphics_expose()
	to sort of work by adding an extra return_exposes arg
	to gdk_event_translate() - it might be better to simply
	deprecate the function altogether and force people to rewrite
	without it. gdk_window_scroll() handles most of it, and where
	gdk_window_scroll() doesn't work, simply redrawing more does.

	* gtk/gtkwidget.c (gtk_widget_set_default_direction): Fix up
	assertion.

	* gtk-config.in: Include PANGO_CFLAGS/LIBS.

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Remove a
	bunch of pretty much useless /* Print debugging info */ comments
	which had drifted away from the code they were commenting.
2000-06-05 15:24:59 +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
Elliot Lee
3f0092c4e6 Remove deadwood code.
Remove deadwood code.
2000-06-01 21:59:31 +00:00
Elliot Lee
c496211676 Put it into CVS.
Put it into CVS.
2000-05-31 21:50:38 +00:00
CEST 2000 lupus
a357ab820a add missing header files.
Tue May 23 12:25:07 CEST 2000 lupus <lupus@debian.org>

	* gdk/nanox/*.h: add missing header files.
2000-05-23 10:26:25 +00:00
Elliot Lee
31fa339113 If a region does not have any rectangles, or if the specified rectangle is
If a region does not have any rectangles, or if the specified rectangle is
not in the region, then return GDK_OVERLAP_RECTANGLE_OUT instead of
GDK_OVERLAP_RECTANGLE_IN.
2000-05-18 22:44:19 +00:00
Tor Lillqvist
8596f7edc5 Plug same refcount leaks as in the X11 backend.
2000-05-17  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkevents-win32.c (gdk_event_translate): Plug same
refcount leaks as in the X11 backend.

* gdk/win32/gdkgc-win32.c (gdk_win32_gc_set_values): Logging
cosmetics.

* gdk/win32/gdkwindow-win32.c: Similar changes as in X11
backend. Add _gdk_windowing_window_destroy().

* gtk/gtkcolorsel.c: Include correct backend-specific header.
Don't use XColor unless on X11. (No GDK_VISUAL_STATIC_COLOR
either, but these probably do exist on nanox?)

* gtk/gtkhsv.c: Use G_PI (fresh from <glib.h>) instead of M_PI
which isn't necessarily defined by <math.h>.

* gtk/gtkobject.c (gtk_object_init): Don't go up the class
ancestry past GtkObject.

* gtk/gtktypeutils.h: Mark GTK_TYPE_IDENTIFIER for export/import
from DLL on Win32.

* gtk/gtk.def: Update corresponding to recent changes.

* gtk/makefile.{cygwin,msc}: Updates.
2000-05-16 21:27:10 +00:00
Owen Taylor
386ae20970 A bit of editing.
Fri May 12 18:46:51 2000  Owen Taylor  <otaylor@redhat.com>

	* docs/Changes-1.4.txt: A bit of editing.

	* gdk/gdkwindow.c (_gdk_window_clear_update_area)
	* gdk/x11/gdkwindow-x11.c (gdk_window_hide): Add a function
	to clear the update area for the window, and clear it
	when hiding a window.

	* gdk/gdkwindow.c (gdk_window_begin_paint_region): Ignore
	if window destroyed.

	* gdk/gdkwindow.c (gdk_window_end_paint): Likewise.

	* gdk/gdkwindow.c gdk/x11/gdkwindow-x11.c gdk/gdkinternals.h: Move
	gdk_window_destroy() to the generic code, since there was a lot of
	window-system-independent logic it in. Add a function:

	 _gdk_window_destroy()

	to the internal API to destroy a window without unreferencing it.
	Add a function:

	 _gdk_windowing_window_destroy()

	That does the windowing-system-dependent part of destroying
	the window.

Fri May 12 11:07:41 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/testgtk.c: Fix various memory leaks of pixmaps.

Fri May 12 11:06:10 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c docs/Changes-1.4.txt (gtk_widget_shape_combine_mask):
	Make gtk_widget_shape_combine_mask() keep a reference count on
	the pixmap since it keeps it around.

Fri May 12 10:53:29 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkwindow.c (gdk_window_process_updates_internal): Fix refcount
	leak.

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Fix refcount
	leak with event filters.

Thu May 11 14:29:44 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkdnd.c (gtk_drag_dest_set_internal): Remove the
	signal handlers with the right data arguments. (Fixes
	some warnings when a widget was repeatedly set as a drag
	destination.)

	* gdk/x11/gdkdnd-x11.c (gdk_window_register_dnd): Set data on the
	window so we can avoid avoid setting the DND properties on the
	toplevel window repeatedly.
2000-05-15 16:09:53 +00:00
Tor Lillqvist
014e275b3a Typo. 2000-05-12 23:01:42 +00:00
Tor Lillqvist
cab7ca49d5 Define more message types missing from mingw headers.
2000-05-13  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkwin32.h: Define more message types missing from
mingw headers.

* gdk/win32/gdkevents-win32.c (gdk_event_translate): On WM_DESTROY
call gdk_window_destroy_notify(). It was never called. This
probably meant that the GdkWindow was never freed. Thanks Owen for
noticing (!).

* gdk/win32/gdkwindow-win32.c (gdk_window_internal_destroy): Mark
window as destroyed before calling DestroyWindow(). DestroyWindow()
causes a call to the window procedure (gdk_WindowProc), which
calls gdk_event_translate(), which calls
gdk_window_destroy_notify(), which gets confused unless the window
is set as destroyed.

* gdk/win32/gdkcolor-win32.c (gdk_win32_color_to_string): Rename
this function to indicate it's win32 only. Put inside #ifdef
G_ENABLE_DEBUG.

* gdk/win32/gdkevents-win32.c (gdk_win32_message_name): New
debugging function. (gdk_event_translate:) Add a default branch
that uses the above function to print debug messages with all
Windows messages symbolically.

* gdk/win32/gdkprivate-win32.h: Declare it, and
gdk_win32_color_to_string, but only if G_ENABLE_DEBUG.
2000-05-12 22:29:31 +00:00
Darin Adler
0e164d5fca Change all conversion from 16-bit formats to 32-bit formats to re-use
the high bits of the color values so that white maps to full white.
2000-05-09 18:23:29 +00:00
Tor Lillqvist
acc8e78c2d Fix typo. I had deleted a ! operator by mistake, which caused
2000-05-07  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkevents-win32.c (gdk_event_translate): Fix typo. I
had deleted a ! operator by mistake, which caused
GDK_SELECTION_CLEAR events never to be generated, which caused
only the first copy to the clipboard from an gtkeditable to
actually cause a copy to the Windows clipboard.

2000-05-06  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkdnd-win32.c: Enable shortcut resolution for gcc
compilation, too. Current mingw gcc distributions include the
necessary headers. Also the necessary IIDs are now in mingw
headers/libraries, and own definitions unnecessary.

More hacking on OLE2 DND, still doesn't work though, and thus
ifdeffed out.

* gdk/win32/gdkwindow-win32.c: Remove gdk_window_clear() from
here, too.
2000-05-07 19:45:27 +00:00
Paolo Molaro
8a836c07cf Sat, 6 May 2000 13:31:34 +0200 Paolo Molaro <lupus@linuxcare.com>
Sat,  6 May 2000 13:31:34 +0200 Paolo Molaro <lupus@linuxcare.com>

	* gdk/nanox/*: nano-X port work in progress.
	* gdk/simple.c: simple test for Gdk.
	* README.nanox: notes about the port: read this first!
	* gtk/gtk{dnd,plug,selection,window}.c: minimal changes to make gtk compile
	with nano-X.
2000-05-06 11:57:31 +00:00
Owen Taylor
ea71f02aca Move gdk_window_clear() into common code, implement in terms of
Fri May  5 11:18:47 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkwindow.c gdk/x11/gdkwindow-x11.c (gdk_window_clear): Move
	gdk_window_clear() into common code, implement in terms of
	gdk_window_clear_area(). (Fixes bug where gdk_window_clear() was
	not redirected to the backing rectangle.

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.

Tue Apr 25 22:20:41 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkwindow.c (gdk_window_process_updates_internal): Fix error
	with recursion where process_updates() is called from
	an expose handler. (GtkTextView is highly broken in
	doing this, but it should work, so it is a nice test
	case.)

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

	* gdk/gdkwindow.c (gdk_window_process_updates_internal): Gracefully
	handle the case where updates are queued during processing of
	updates.

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

	* gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new): We already assume
	window is on gdk_display - use that instead of segfaulting.
2000-05-05 15:57:48 +00:00
Tor Lillqvist
57dd3ef80f Don't try to draw too narrow or too low arcs, they seem to fail, at least
2000-05-02  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_arc): Don't try to
draw too narrow or too low arcs, they seem to fail, at least with
some display drivers.

* gdk/gdk.c (gdk_init_check): Use G_DIR_SEPARATOR.
2000-05-02 21:36:08 +00:00
Tor Lillqvist
4481ff0cef New file, just a quick hack of the X11 version.
2000-05-02  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkgeometry-win32.c: New file, just a quick hack of
the X11 version.
2000-05-01 22:49:16 +00:00
Tor Lillqvist
1f149b3a8d Large changes to the Win32 backend, partially made necessary by the
2000-05-02  Tor Lillqvist  <tml@iki.fi>

Large changes to the Win32 backend, partially made necessary by
the changes to the backend-independent internal
structures. Attempts to implement similar backing store stuff as
on X11. The current (CVS) version of the Win32 backend is *not* as
stable as it was before the no-flicker branch was merged. A
zipfile with that version is available from
http://www.gimp.org/win32/. That should be use by "production"
code until this CVS version is usable. (But note, the Win32
backend has never been claimed to be "production quality".)

* README.win32: Add the above comment about versions.

* gdk/gdkwindow.c: Don't use backing store for now on Win32.

* gdk/gdk.def: Update.

* gdk/gdkfont.h: Declare temporary Win32-only functions. Will
presumably be replaced by some more better mechanism as 1.4 gets
closer to release shape.

* gdk/makefile.{cygwin,msc}: Update.

* gdk/win32/*.c: Correct inclusions of the backend-specific and
internal headers. Change code according to changes in these. Use
gdk_drawable_*, not gdk_window_* where necessary.

* gdk/win32/gdkdnd-win32.c: Use MISC selector for GDK_NOTE, not
our old DND.

* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_text): Don't try
to interpret single characters as UTF-8. Thanks to Hans Breuer.
Use correct function name in warning messages.

* gdk/win32/gdkevents-win32.c: Use correct parameter lists for the
GSourceFuncs gdk_event_prepare and gdk_event_check.
(gdk_event_get_graphics_expose): Do implement, use
PeekMessage. Thanks to Hans Breuer.
(event_mask_string): Debugging function to print an GdkEventMask.
(gdk_pointer_grab): Use it.

* gdk/win32/gdkfont-win32.c: The Unicode subrange that the
(old) book I used claimed was Hangul actually is CJK Unified
Ideographs Extension A. Also, Hangul Syllables were missing.
Improve logging.

* gdk/win32/gdkgc-win32.c: Largish changes.

* gdk/win32/gdkim-win32.c (gdk_set_locale): Use
g_win32_getlocale() from GLib, and not setlocale() to get current
locale name.

* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkwin32.h: Move stuff from gdkprivate-win32.h to
gdkwin32.h, similarily as in the X11 backend.

* gdk/win32/gdkwindow-win32.c (gdk_propagate_shapes): Bugfix,
assignment was used instead of equals in if test. Thanks to Hans
Breuer.

* gdk/win32/makefile.{cygwin,msc}
* gtk/makefile.{cygwin,msc}: Updates. Better kludge to get the
path to the Win32 headers that works also with the mingw compiler.

* gtk/gtkstyle.c: Include <string.h>.
2000-05-01 22:06:49 +00:00
Havoc Pennington
4fe58c01f9 clean up enum format, remove extra comma, this keeps scanner scripts from
2000-04-15  Havoc Pennington  <hp@pobox.com>

* gdk/gdkdnd.h: clean up enum format, remove extra comma,
this keeps scanner scripts from getting confused.

* gdk/gdkdraw.c (gdk_drawable_get_data): This should return the
data, rather than void
2000-04-15 16:22:52 +00:00
Federico Mena Quintero
829ed02435 Most of this patch is based on a patch by Havoc Pennington (hp@redhat.com)
2000-04-11  Federico Mena Quintero  <federico@helixcode.com>

	Most of this patch is based on a patch by Havoc Pennington
	(hp@redhat.com) to make GdkPixbuf's structures opaque and to
	remove the libart dependency.

	* gdk-pixbuf/gdk-pixbuf.h: Removed the public structures.
	(GdkColorspace): New enum that for now only contains
	GDK_COLORSPACE_RGB.
	(GdkPixbufDestroyNotify): New type for the pixbuf's pixels destroy
	notification function.
	(GdkInterpType): New num with interpolation types.

	* *.[ch]: Replace the libart stuff with our own stuff.

	* pixops/*.[ch]: Likewise.

	* gdk-pixbuf/gdk-pixbuf-private.h: New file with the private
	declarations of the GdkPixbuf structures.

	* gdk-pixbuf/gdk-pixbuf.c (gdk_pixbuf_new_from_art_pixbuf):
	Removed function.
	(gdk_pixbuf_get_format): Constify.
	(gdk_pixbuf_get_n_channels): Constify.
	(gdk_pixbuf_get_has_alpha): Constify.
	(gdk_pixbuf_get_bits_per_sample): Constify.
	(gdk_pixbuf_get_pixels): Constify.
	(gdk_pixbuf_get_width): Constify.
	(gdk_pixbuf_get_height): Constify.
	(gdk_pixbuf_get_rowstride): Constify.

	* gdk-pixbuf/gdk-pixbuf.c (gdk_pixbuf_copy): New function to copy
	a pixbuf.

	* gdk-pixbuf/gdk-pixbuf-data.c (gdk_pixbuf_new_from_data): Added a
	bits_per_sample argument; currently only 8 bits per sample are
	supported.

	* gdk-pixbuf/gdk-pixbuf-animation.c (gdk_pixbuf_frame_get_pixbuf):
	New accessor.
	(gdk_pixbuf_frame_get_x_offset): New accessor.
	(gdk_pixbuf_frame_get_y_offset): New accessor.
	(gdk_pixbuf_frame_get_delay_time): New accessor.
	(gdk_pixbuf_frame_get_action): New accessor.

	* gdk-pixbuf/gdk-pixbuf-render.c
	(gdk_pixbuf_render_pixmap_and_mask): Instead of returning a solid
	mask rectangle for pixbufs without an alpha channel, set the
	*mask_return to NULL.

	* gdk-pixbuf/gdk-pixbuf-util.c (gdk_pixbuf_add_alpha): Constify.

	* gdk-pixbuf/gdk-pixbuf-scale.c: Fix includes.

	* gdk-pixbuf/gdk-pixbuf-scale.c (gdk_pixbuf_scale): Added some
	preconditions.  Maybe we should also check for the colorspace,
	bits per pixel, and such.
	(gdk_pixbuf_composite): Likewise.
	(gdk_pixbuf_composite_color): Likewise.
	(gdk_pixbuf_scale_simple): Likewise, and fail gracefully if we
	cannot allocate the new pixbuf.
	(gdk_pixbuf_composite_color_simple): Likewise.

	* gdk-pixbuf/gnome-canvas-pixbuf.c (gnome_canvas_pixbuf_render):
	Use art_rgb_rgba_affine() or art_rgb_affine() since we no longer
	have an ArtPixBuf.

	* gdk-pixbuf/io-bmp.c: Fix includes.

	* gdk-pixbuf/pixops/pixops.c (pixops_scale_nearest): Fixed cast in
	an lvalue.

	* TODO: Populated.

	* configure.in: Removed checks for libart.

	* gdk-pixbuf/Makefile.am: Removed references to libart.
	(noinst_HEADERS): Added gdk-pixbuf-private.h.

	* gdk-pixbuf/Makefile.am (libgdk_pixbuf_la_LDFLAGS): Incremented
	the version number of the libtool library to indicate that this
	definitely is not compatible with the old usage.  I know you love
	me.  I know you do.

	* configure.in: Bumped version number to 0.7.0.

	* README: Updated.

	* gdk-pixbuf-config.in (--libs): We no longer require libart.

	* DEPENDS.libgdk_pixbuf: We no longer depend on libart.

	* gdk-pixbuf.spec.in: Updated, but I don't guarantee anything.
2000-04-11 07:03:25 +00:00
Owen Taylor
848cff384e Fix problem with installation directory for gdkx.h
Fri Apr  7 17:19:27 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/Makefile.am: Fix problem with installation directory for
	gdkx.h

	* gtk/gtkmenuitem.c gtk/gtkmenushell.c: Patch from David Santiago
	<mrcooger@cyberverse.com> so that when selecting menus with the
	mouse, the first item will not be selected, but when selecting
	with an accelerator, or navigating left-right on a menubar with
	the menus popped up, the first item will be selected.
2000-04-07 21:36:13 +00:00
Owen Taylor
58df98f92a Fix screwy indentation.
Wed Apr  5 00:08:36 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkgc-x11.c (_gdk_x11_gc_new): Fix screwy
	indentation.

	* Makefile.am (EXTRA_DIST): Fix typo.

	* gdk[/x11]/Makefile.am (INCLUDES): Add $(top_builddir)/gdk
	to catch gdkconfig.h

	* gtk/gtkitemfactory.c: Added FIXME.
2000-04-05 04:11:10 +00:00
Owen Taylor
a6e85956d2 Fix up merge slipup.
Mon Mar 27 20:56:14 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Fix up
	merge slipup.

	* gdk/gdkinput.h: Fix missing line from merge.
2000-03-28 01:58:05 +00:00
Owen Taylor
b14b577d59 Include gdkinternals.h instead of gdkprivate.h.
Mon Mar 27 20:39:49 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkcolor.c cursor.c gdkdraw.c gdkfont.c: Include gdkinternals.h
	instead of gdkprivate.h.
2000-03-28 01:40:57 +00:00
Owen Taylor
8098546227 Merge no-flicker branch into HEAD 2000-03-28 01:24:44 +00:00
Tor Lillqvist
0cc2a00dc9 Remove the #ifndef USE_DISPATCHMESSAGE sections, we do want to use
2000-03-17  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkevents-win32.c: Remove the #ifndef
USE_DISPATCHMESSAGE sections, we do want to use DispatchMessage.

* gdk/win32/gdkfont-win32.c
* gdk/win32/gdkproperty-win32.c
* gdk/win32/gdkselection-win32.c
* gdk/win32/gdkwindow-win32.c: Add const to some arguments that are
now declared such.
2000-03-16 21:58:35 +00:00
Owen Taylor
10ba4fd066 Merges from gtk-1-2 2000-03-14 19:57:25 +00:00
Tor Lillqvist
ec1e8f1f5d Internal GDK error reporting changes: (gdk_win32_gdi_failed) New function
2000-03-07  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkmain-win32.c: Internal GDK error reporting changes:
(gdk_win32_gdi_failed) New function for reporting errors from GDI,
for which it is no use to call GetLastError on Win9x.
(gdk_other_api_failed) New function, for
general error reporting without calling GetLastError.
(gdk_win32_api_failed) OTOH, this function always calls
GetLastError. (gdk_win32_last_error_string) Remove this function,
GLib has the equivalent now.

* gdk/win32/gdkprivate-win32.h: Declare the above, and macros to
call them with function name, file name and line number in the
arguments.

* gdk/win32/*.c: Use the new macros for reporting errors from GDI
functions.

* gtk/gtk.def: Add some missing entry points.

* gtk/gtkcompat.h.in: Define gtk_paned_gutter_size and
gtk_paned_set_gutter_size, which don't exist any longer, as void.

Fixes by Hans Breuer:

* gdk/makefile.msc: Update for debugging.

* gdk/win32/gdkgc-win32.c (gdk_win32_gc_set_dashes): Fake
implementation, just use the PS_DASH, PS_DOT, PS_DASHDOT or
PS_DASHDOTDOT or PS_DASH styles depending on the number of entries
in the dash_list.

* gdk/win32/gdkwin32.h (GDK_FONT_XFONT): New macro, similar as in
the x11 backend.

* gdk/win32/gdkprivate-win32.h (IS_WIN_NT): New macro.

* gtk/testgtk.c: Include config.h, guard inclusion of unistd.h.
2000-03-08 06:18:41 +00:00
Tor Lillqvist
5a4e1abbfc Store just pixel value of background colour.
2000-03-04  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkprivate-win32.h (struct _GdkWindowWin32Data): Store
just pixel value of background colour.

* gdk/win32/gdkgc-win32.c (gdk_colormap_color): New function
containing code snippet previously duplicated in a couple of
places.

* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_points): Use
gdk_colormap_color.

* gdk/win32/gdkevents-win32.c (gdk_event_translate): Generate
GDK_SCROLL events for WM_MOUSEWHEEL messages. Don't generate
events for autorepeated Shift, Control and Alt keys. Use
gdk_colormap_color.

* gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): If the
pointer is inside the window the cursor of which we are setting,
call SetCursor immediately.

* gdk/win32/makefile.cygwin
* gtk/makefile.cygwin: If we don't have the build number stamp
file, use zero.

* gtk/gtkcompat.h.in: Define gtk_paned_gutter_size and
gtk_paned_set_gutter_size as empty.

* gtk/gtk.def: Remove gtk_paned_set_gutter_size.
2000-03-03 23:21:51 +00:00
Matt Wilson
06884f05ff s/unsigned long/guint32/g, s/unsigned short/guint16/g, s/unsigned
2000-02-28  Matt Wilson  <msw@redhat.com>

	* gdk-pixbuf/gdk-pixbuf-drawable.c: s/unsigned long/guint32/g,
	s/unsigned short/guint16/g, s/unsigned char/guint8/g
2000-02-29 18:27:44 +00:00
GMT 2000 Tony Gale
6ab2659931 Spelling/grammar fixes from Martin Buchholz <martin@xemacs.org>
Tue Feb 29 13:10:00 GMT 2000  Tony Gale <gale@gtk.org>

        * gdk/gdkwindow.h gdk/x11/gxid.c gtk/gtkclist.c gtk/gtkclist.h
          gtk/gtkctree.c gtk/gtkmenu.h gtk/gtkwidget.c gtk/testgtk.c
          docs/styles.txt docs/refcounting.txt docs/gtkfaq.sgml
          docs/gtk_tut.sgml docs/gtk.texi TODO:
          Spelling/grammar fixes from Martin Buchholz <martin@xemacs.org>
2000-02-29 13:15:10 +00:00
Owen Taylor
c8a2382b65 Remove OwnerGrabButtonMask from button entries for GDK_BUTTON_PRESS /
Fri Feb 18 14:37:29 2000  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkwindow-x11.c (gdk_event_mask_table): Remove
	OwnerGrabButtonMask from button entries for
	GDK_BUTTON_PRESS / GDK_BUTTON_RELEASE.

	* gtk/gtklayout.c (gtk_layout_realize): Always add GDK_SCROLL
	to the event mask (which will result in button/press release
	being added to the event mask on Unix) so scrolling works
	for layouts in scroll windows.

	* gdk/gdkevents.h (enum): Fix up GDK_ALL_EVENTS_MASK.

	Patch from Anders Carlsson  <andersca@picard.andersnet> to add
	a scroll event.

 	* gtk/testgtk.c (scroll_test_scroll): Added an example of mouse wheel
 	scrolling to the "Test Scrolling" part of testgtk.

 	* gtk/gtkwidget.h (struct _GtkWidgetClass): Added scroll_event signal.

 	* gtk/gtkwidget.c: Added "scroll_event" GTK+ signal and matched
 	it against GDK_SCROLL.

 	* gtk/gtkrange.c (gtk_range_scroll_event): Updated to use the new
 	way of mouse wheel scrolling.

 	* gtk/gtkscrolledwindow.c (gtk_scrolled_window_scroll_event): Likewise.

 	* gtk/gtkspinbutton.c (gtk_spin_button_scroll): Likewise.

 	* gtk/gtkmain.c: Removed previous mouse wheel hack.

 	* gdk/x11/gdkwindow-x11.c (gdk_event_mask_table): Added entry in
 	gdk_event_mask_table.

 	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Added
 	GdkEventScroll handler.

 	* gdk/gdkevents.h: Added GdkEventScroll structure.
2000-02-18 20:02:24 +00:00
Tor Lillqvist
37cfb7d74b Move the test for no segments before the assertion for non-NULL segment
2000-02-14  Tor Lillqvist  <tml@iki.fi>

* gdk/gdkdraw.c (gdk_draw_segments): Move the test for no segments
before the assertion for non-NULL segment list.

* gdk/win32/gdkgc-win32.c: (gdk_win32_gc_values_to_win32values):
Seems that pattern brushes *must* be 8x8 pixels! At least on my
machine, but it might be display driver dependent. Sigh, so make
sure the stipple is that size. Does Windows suck or what?

* gdk/win32/gdkdrawable-win32.c: Improve error handling in a few
places.
2000-02-13 23:19:23 +00:00
Havoc Pennington
95a9052d56 init refcount to 1 (gdk_cursor_new): init refcount to 1
2000-02-13  Havoc Pennington  <hp@pobox.com>

	* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): init
		refcount to 1
			(gdk_cursor_new): init refcount to 1

				* gdk/win32/gdkcursor-win32.c
(gdk_cursor_new): init refcount to 1
2000-02-13 20:22:20 +00:00
Tor Lillqvist
ff99eb7cc1 Add an extra parameter so that we don't have to do unnecessary settings to
2000-02-13  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkgc-win32.c (gdk_gc_predraw): Add an extra parameter
so that we don't have to do unnecessary settings to the HDC.

* gdk/win32/gdkdrawable-win32.c
* gdk/win32/gdkimage-win32.c: Corresponding changes to the calls of
gdk_gc_predraw.

* gdk/win32/gdkdrawable-win32.c: Special-casing for GdkGCs where
the fill style is GDK_OPAQUE_STIPPLED. In those cases we construct
GDI paths, call WidenPath to get the outline of the stroken path,
and then fill the outline (with the brush that was built from the
stipple).

* gdk/win32/gdkgc-win32.c: Factor out common code from
_gdk_win32_gc_new and gdk_win32_gc_set_values into
gdk_win32_gc_values_to_win32values.

* gdk/win32/gdkmain-win32.c (gdk_win32_last_error_string,
gdk_win32_api_failed): New functions for error logging.

* gdk/win32/gdkprivate-win32.h: Declare them, and a macro
WIN32_API_FAILED to call them, passing function or file name and
line number.

* gdk/win32/*.c: Use the WIN32_API_FAILED macro.

* gdk/win32/gdkprivate-win32.h: Store just the pixel values from
GdkColor for foreground and background in GdkGCWin32Data.

* gdk/makefile.cygwin: Link in the resource object separately.

* gdk/win32/rc/gdk.rc
* gtk/gtk.rc (New file)
* gdk/win32/makefile.cygwin
* gtk/makefile.cygwin: Update build number in DLLs automatically,
as in GLib.
2000-02-13 14:52:47 +00:00
Tim Janik
ef03cb5287 s/refcount/ref_count/.
Sun Feb 13 08:54:45 2000  Tim Janik  <timj@gtk.org>

        * gdk/gdkcursor.h (struct _GdkCursor): s/refcount/ref_count/.
        * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap):
        * gdk/x11/gdkcursor-x11.c (_gdk_cursor_destroy):
        * gdk/gdkcursor.c (gdk_cursor_ref): insert assertments for the
        parameters given and cursor->ref_count. coding style fixups.

        * gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer,
        not GtkWidget.

        * gtk/*.h: applied patch from Mathieu Lacage <lacage@email.enst.fr> to
        fix up widget macros and add _GET_CLASS() variant.

        * gtk/*.c: some GtkType fixups.
2000-02-13 08:16:48 +00:00
Tor Lillqvist
196d48435e gdk/win32/gdkproperty-win32.c The assertions for GDK_IS_WINDOW were
2000-02-09  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkproperty-win32.c
* gdk/x11/gdkproperty-x11.c: The assertions for GDK_IS_WINDOW
were reversed.
2000-02-09 22:31:34 +00:00
Tor Lillqvist
e57b1afa2b Use g_filename_to_utf8 to convert the font names Windows gives us from
2000-02-04  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkfont-win32.c (logfont_to_xlfd): Use
g_filename_to_utf8 to convert the font names Windows gives us from
whatever is the default codepage to UTF-8.
(gdk_font_load_internal) Use g_filename_from_utf8 for conversion
in the other direction.

* gdk/win32/gdkgc-win32.c (gdk_win32_gc_set_values): Fix cut&paste
error in debugging output.

2000-02-02  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkwindow-win32.c (gdk_window_clear): Pass zero width
and height parameters to gdk_window_clear_area(). Not minus one.

2000-02-01  Tor Lillqvist  <tml@iki.fi>

* gtk/gtkfilesel.c: Use the g_filename_to_utf8 and
g_filename_from_utf8 functions (which were added a moment ago to
GLib). Some cleanups: Use gbooleans. Use GStrings instead of fixed
size buffers.

* gtk/gtkfilesel.h: Add comment about
gtk_file_selection_get_filename returning the filename in the C
runtime's encoding.

* README.win32
* gdk/gdk.def
* gdk/makefile.{cygwin,msc}
* gtk/gtk.def: Updates.

* gdk/gdkcursor-win32.c: Initialise refcount.
2000-02-03 01:19:03 +00:00
Federico Mena Quintero
e9f75f6bd8 Added sanity check for width and height being >= 0. Also, do nothing if
2000-02-03  Federico Mena Quintero  <federico@helixcode.com>

	* gdk-pixbuf/gdk-pixbuf-render.c
	(gdk_pixbuf_render_threshold_alpha): Added sanity check for width
	and height being >= 0.  Also, do nothing if either of them is
	zero.  Thanks to Ettore for pointing this out.
	(gdk_pixbuf_render_to_drawable): Likewise.
	(gdk_pixbuf_render_to_drawable_alpha): Likewise.
2000-02-02 10:05:57 +00:00
Havoc Pennington
a3a4a60c34 forgot to cvs add this 2000-01-29 22:27:09 +00:00
Havoc Pennington
4d48b106f0 use gdk_cursor_unref instead of destroy
2000-01-30  Havoc Pennington  <hp@pobox.com>

	* gtk/testgtk.c (set_cursor): use gdk_cursor_unref instead of
		destroy

			* gdk/gdkimage.c (gdk_image_ref): image wasn't being returned

				* gdk/gdkprivate.h: declare
_gdk_cursor_destroy which is then
	implemented in platform-specific code

		* gdk/Makefile.am (gdk_c_sources): add gdkcursor.c

			* gdk/x11/gdkcursor-x11.c (gdk_cursor_destroy):
rename with an
	underscore in front

		* gdk/win32/gdkcursor-win32.c (gdk_cursor_destroy):
			put an underscore in front

				* gdk/gdkcursor.c: new file, implements
					gdk_cursor_ref/gdk_cursor_unref

						* gdk/gdkcursor.h: Refcount GdkCursor

							* gdk/gdkcompat.h
(gdk_cursor_destroy): compat
2000-01-29 22:26:41 +00:00
Tor Lillqvist
bcfafb624a gdk/gdkwindow.h Remove prototypes for renamed functions.
2000-01-29  Tor Lillqvist  <tml@iki.fi>

* gdk/gdkwindow.h
* gdk/gdkpixmap.h: Remove prototypes for renamed functions.
2000-01-28 12:16:26 +00:00
Owen Taylor
2f27c99f36 .cvsignore additions 2000-01-21 21:57:14 +00:00
Tor Lillqvist
cf51b4790e The correct semantics (to mimic the X11 backend, which just calls
2000-01-19  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkwindow-win32.c (gdk_window_clear_area): The correct
semantics (to mimic the X11 backend, which just calls XClearArea)
is to check for zero width (and height), and in that case use the
window's width minus x (height minus y). This fixes for instance
some redraw problems with gtkclist, which were easily noticeable
in the gtk file selection widget.

(gdk_window_new): Don't set WS_EX_TOPMOST for dialog
windows.
2000-01-18 22:03:59 +00:00
Federico Mena Quintero
4f0f733060 Removed the broken --enable-canvas-pixbuf option. Added the stuff
2000-01-16  Federico Mena Quintero  <federico@helixcode.com>

	* configure.in: Removed the broken --enable-canvas-pixbuf option.
	Added the stuff necessary to substitute the variables in
	gnomecanvaspixbufConf.sh.in.

	* gnomecanvaspixbufConf.sh.in: New gnome-config handler for the
	tiny gnomecanvaspixbuf library.

	* Makefile.am: Build gnomecanvaspixbufConf.sh.

	* gdk-pixbuf/Makefile.am: Create a libgnomecanvaspixbuf and only
	build it if gdk-pixbuf is being built outside of gnome-libs.

	* doc/gdk-pixbuf-sections.txt: Added gdk_pixbuf_render_pixmap_and_mask().

	* gdk-pixbuf/gdk-pixbuf-render.c
	(gdk_pixbuf_render_pixmap_and_mask): Renamed from
	gdk_pixbuf_render_pixmap().  Do not create the mask if it is not
	needed, and do not use a clipping mask when rendering the pixmap.
	Tweaked documentation a little.

	* HACKING: New file with hacking policies for the gdk-pixbuf
	module.

	* doc/Makefile.am (tmpl_sources): Added missing backslash.

	* doc/Makefile.am: Use gnomecanvaspixbuf in gnome-config when
	scanning for docstrings.

	* gdk-pixbuf/gdk-pixbuf-util.c (gdk_pixbuf_copy_area): Made sanity
	checks more stringent.  Removed "gint" abominations.  Made
	documentation consistent with the rest of the functions.

	* doc/gdk-pixbuf-sections.txt: Added gdk_pixbuf_copy_area() to the
	utilities section.
2000-01-17 01:48:21 +00:00
Tor Lillqvist
c3491b7497 configure.in gdk/Makefile.am gdk/x11/Makefile.am Small fixes, thanks to
2000-01-13  Tor Lillqvist  <tml@iki.fi>

* configure.in
* gdk/Makefile.am
* gdk/x11/Makefile.am
* gdk/win32/Makefile.am: Small fixes, thanks to Peter Wainwright
(bug #5177).
* gdk/win32/gdkcc-win32.c: Reintroduce, to be thrown
out later.
2000-01-15 16:04:54 +00:00
Jonathan Blandford
1f48e45e54 new function to let you create a gdk_pixmap from a gdk_pixbuf.
2000-01-14  Jonathan Blandford  <jrb@redhat.com>

	* gdk-pixbuf/gdk-pixbuf-render.c (gdk_pixbuf_render_pixmap): new
	function to let you create a gdk_pixmap from a gdk_pixbuf.
2000-01-14 20:59:18 +00:00
Tor Lillqvist
82abdad4db Ignore WM_MOVE for iconified or invisible windows. This fixes various
2000-01-09  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkevents-win32.c (gdk_event_translate): Ignore
WM_MOVE for iconified or invisible windows. This fixes various
problems when minimising windows. Thanks to Bernd Herd.
2000-01-09 18:57:20 +00:00
Tor Lillqvist
273089af2a Fix copy&paste error: Call the backend's draw_lines method, not
2000-01-05  Tor Lillqvist  <tml@iki.fi>

* gdk/gdkdraw.c (gdk_draw_lines): Fix copy&paste error: Call the
backend's draw_lines method, not draw_points.
2000-01-05 17:05:30 +00:00
Tor Lillqvist
d475580348 Clean up some more leftovers from before Owen's reorganization: Don't have
2000-01-02  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkevents-win32.c: Clean up some more leftovers from
before Owen's reorganization: Don't have queued_events and
queued_tail statics in this file, but use gdk_queued_events and
gdk_queued_tail. This makes exposure event compression work again.

(gdk_WindowProc): Comment out a posting of gdk_ping_msg, doesn't
seem to be needed?
2000-01-02 11:03:12 +00:00
Federico Mena Quintero
6e3522ab2c Added reference counting to animations. A web browser may want to share a
2000-01-01  Federico Mena Quintero  <federico@helixcode.com>

	* gdk-pixbuf/gdk-pixbuf.h (GdkPixbufAnimation): Added reference
	counting to animations.  A web browser may want to share a single
	copy of an animated GIF if it appears multiple times in a web
	page, for example.

	* gdk-pixbuf/gdk-pixbuf-animation.c: New file.  Moved the
	animation functions here.
	(gdk_pixbuf_animation_new_from_file): Prettified.  Return a NULL
	animation if the loader does not support multiframe loading and
	the single-frame load returned NULL.  Check that the filename is
	not NULL.  Updated inline documentation.
	(gdk_pixbuf_animation_ref): New function.
	(gdk_pixbuf_animation_unref): New function.
	Removed gdk_pixbuf_animation_destroy() in favor of reference
	counting.

	* gdk-pixbuf/gdk-pixbuf-io.c (gdk_pixbuf_new_from_file):
	Prettified.  Made ref_count assertion more paranoid.  Check that
	the filename is not NULL.
	(gdk_pixbuf_get_module): Use guchar * and guint for buffer and
	size, respectively.
	(gdk_pixbuf_new_from_xpm_data): Changed the "data" argument to
	const char **.

	* gdk-pixbuf/io-gif.c (image_load_animation): Create the animation
	with a reference count of 1.

	* gdk-pixbuf/Makefile.am (libgdk_pixbuf_la_SOURCES): Added
	gdk-pixbuf-animation.c.

	* doc/tmpl/animation.sgml: Populated.  It is still missing a
	description of the overlay modes.

	* doc/gdk-pixbuf-sections.txt: Added the animation section.  Moved
	the canvas item section to the end, as it will be moved later to
	gnome-libs.

	* doc/gdk-pixbuf.sgml: Added the animation section.

	* doc/Makefile.am (tmpl_sources): Added tmpl/animation.sgml.
2000-01-02 03:59:22 +00:00
Tor Lillqvist
605c562ffb gdk/win32/gdkprivate-win32.h gdk/win32/gdkevents-win32.c
1999-12-30  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkevents-win32.c
* gdk/win32/gdkinput-win32.c
* gdk/win32/gdkwindow-win32.c: Remove the superfluous
extension_events field in the GdkWindowWin32Data struct. Use only
the extension_events field in GdkWindowPrivate. Previously one was
set, and the other one tested, which broke tablet functionality.
1999-12-30 00:07:48 +00:00
Tor Lillqvist
68a6e7befb If we don't HAVE_XCONVERTCASE we must #include gdkkeysyms.h to get the
1999-12-30  Tor Lillqvist  <tml@iki.fi>

* gdk/gdk.c: If we don't HAVE_XCONVERTCASE we must #include
gdkkeysyms.h to get the GDK_* keysym constants that are needed by
gdk_keyval_convert_case(). Otherwise, gdk_keyval_convert_case()
doesn't do anything.

* gdk/gdk.def: Add gdk_xid_table_insert.
1999-12-29 23:08:52 +00:00
Tor Lillqvist
0733eb725d When handling a single character (text length == 1), don't handle it as if
1999-12-18  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkfont-win32.c (gdk_text_size, gdk_text_extents):
When handling a single character (text length == 1), don't handle
it as if it was UTF-8.
1999-12-18 02:03:13 +00:00
Tor Lillqvist
7df755b181 More tweaks. Check only if at least one of those Unicode subrange bits we
1999-12-11  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkfont-win32.c (check_unicode_subranges): More
tweaks. Check only if at least one of those Unicode subrange bits
we care for is set. If no code page bits are set, guess (wildly)
based on the charset.
1999-12-12 01:32:53 +00:00
Tor Lillqvist
4f5b014220 gdk/Makefile.am Distribute Win32 files.
1999-12-11  Tor Lillqvist  <tml@iki.fi>

* gdk/Makefile.am
* gdk/win32/Makefile.am: Distribute Win32 files.

* gdk/makefile.msc: New file.

* gdk/gdk.c (gdk_arg_context_parse): Fix gccism (no statement
after label).

* gdk/win32/makefile.msc: Update.
1999-12-11 23:41:46 +00:00
Tor Lillqvist
913cb7cd85 Distribute README.win32.
1999-12-11  Tor Lillqvist  <tml@iki.fi>

* Makefile.am: Distribute README.win32.

* gdk/Makefile.am
* gdk/win32/Makefile.am: Distribute gdk/win32.
1999-12-11 23:18:12 +00:00
Tor Lillqvist
9c00803e19 Must mark also gdk_error_warnings and gdk_error_code as GDKVAR, as they
1999-12-11  Tor Lillqvist  <tml@iki.fi>

* gdk/gdkprivate.h: Must mark also gdk_error_warnings and
gdk_error_code as GDKVAR, as they are referred outside GDK.

* gdk/win32/gdkinput-win32.c: Remove debugging leftover.

* gdk/win32/gdkwindow-win32.c (gdk_window_new): Assure title is
non-NULL.

* gtk/gtkdnd.c
* gtk/gtklayout.c
* gtk/gtkplug.c
* gtk/gtkselection.c
* gtk/gtksocket.c
* gtk/gtkwindow.c: Include x11/gdkx.h *or* win32/gdkwin32.c as
appropriate. There must be a cleaner way to handle this?

* gtk/gtkrc.c: Must include windows.h on Win32.

* gtk/testgtk.c: No need to include gdkx.h.

* gtk/makefile.cygwin: Correct invokation of genmarshal.pl.
1999-12-11 23:04:55 +00:00
Jonathan Blandford
0b0ebee941 make a warning go away.
1999-12-10  Jonathan Blandford  <jrb@redhat.com>

	* gdk-pixbuf/gdk-pixbuf-drawable.c (gdk_pixbuf_get_from_drawable):
	make a warning go away.

	* gdk-pixbuf/gdk-pixbuf.h: added new prototypes for animations.

	* gdk-pixbuf/gdk-pixbuf-loader.h: added new prototypes for
	animations.
1999-12-10 23:15:20 +00:00
Michael Zucchi
757fc193c4 Should now handle all formats, slow routine used where optimised
ones can't be.

1999-12-09  Michael Zucchi  <zucchi@zedzone.mmc.com.au>

        * gdk-pixbuf/gdk-pixbuf-drawable.c
        (convert_real_slow): New function - should convert ANY visual/data
        format properly, but it aint fast.  Used as a fallback when an
        optimised routine wont match.
        (rgbconvert): Do very specific tests on the data format to verify
        properly if the optimised version will do, otherwise use the
        fallback function for all other data formats.
1999-12-09 01:50:18 +00:00
Michael Zucchi
6b23587aef Filled in body of function. (rgbconvert): Added GdkColormap parameter, and
1999-12-09  Michael Zucchi  <zucchi@zedzone.mmc.com.au>

	* gdk-pixbuf/gdk-pixbuf-drawable.c (gdk_pixbuf_get_from_drawable):
	Filled in body of function.
	(rgbconvert): Added GdkColormap parameter, and to all conversion
	functions also.

	* gdk-pixbuf/Makefile.am: Re-enabled building of
	textpixbuf-drawable.

	* gdk-pixbuf/testpixbuf-drawable.c (main): Changed to use
	gdk_pixbuf_get_from_drawable().
1999-12-09 00:43:53 +00:00
Arjan van de Ven
880f5ade6b Fixed the red/green/red bug on two occasions. Changed from the custom
1999-12-08  Arjan van de Ven
<arjan@fenrus.demon.nl>

* gdk-pixbuf/gdk-pixbuf-drawable.c : Fixed
  the red/green/red bug on two occasions.
* gdk-pixbuf/io-ras.c: Changed from the custom
  be32_to_cpu function to the generic glib one.
1999-12-08 21:37:17 +00:00
Federico Mena Quintero
c6f25c2de8 Fix includes. (gdk_pixbuf_get_from_drawable): Implemented the zillion
1999-12-08  Federico Mena Quintero  <federico@redhat.com>

	* gdk-pixbuf/gdk-pixbuf-drawable.c: Fix includes.
	(gdk_pixbuf_get_from_drawable): Implemented the zillion sanity
	checks and API definition.  The body needs filling in and it needs
	to do the Right Thing(tm) for pixmaps plus the given colormap and
	windows and their own colormaps.

	* gdk-pixbuf/gdk-pixbuf.h: Added prototype for
	gdk_pixbuf_get_from_drawable().  Killed gdk-pixbuf-drawable.h.

	* gdk-pixbuf/Makefile.am: Re-added the gdk-pixbuf-drawable sources.

	* doc/tmpl/from-drawables.sgml: Populated.

	* doc/gdk-pixbuf.sgml: Added the from-drawables section.

	* doc/Makefile.am (tmpl_sources): Added tmpl/from-drawables.sgml.

	* doc/gdk-pixbuf-sections.txt: Added a section for getting pixbufs
	from drawables.
1999-12-08 21:17:53 +00:00
Tor Lillqvist
6817444e14 Fix string measurement code. For now, the rbearing is set to the same as
1999-12-07  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkfont-win32.c: Fix string measurement code. For now,
the rbearing is set to the same as the width, but this should be
fixed.
1999-12-06 23:48:08 +00:00
Tor Lillqvist
0f5c8e857c New function. Guesstimate what Unicode subranges a font covers based on
1999-12-06  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkfont-win32.c (check_unicode_subranges): New
function. Guesstimate what Unicode subranges a font covers based
on the codepages. Windows tells us it covers. This will hopefully
help those Windows versions or fonts that don't give us any useful
Unicode subrange information with GetTextCharsetInfo. Call this
function in gdk_font_load_internal.

* gdk/win32/{gdkdnd,gdkimage,gdkpixmap,gdkprivate}-win32.c: Misc
minor changes.
1999-12-05 23:26:46 +00:00
Owen Taylor
a3bf693cd4 Change only_if_exists argument of gdk_atom_intern to bool.
Wed Dec  1 22:35:43 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkproperty.h x11/gdkproperty.c: Change
	only_if_exists argument of gdk_atom_intern to
	bool.
1999-12-03 20:16:04 +00:00
Federico Mena Quintero
25a8142429 #include <config.h>, and fix includes.
1999-12-02  Federico Mena Quintero  <federico@redhat.com>

	* src/testpixbuf.c: #include <config.h>, and fix includes.

	* src/testpixbuf-drawable.c: #include <config.h>, and fix includes.

	* src/io-xpm.c: Fix includes.

	* src/io-tiff.c: Fix includes.

	* src/io-ras.c: Fix includes, and do not include more stuff than needed.

	* src/io-pnm.c: Fix inlcudes, and do not include more stuff than needed.

	* src/io-png.c: Fix includes.

	* src/io-ico.c: Fix includes, and do not include more stuff than needed.

	* src/io-gif.c: Fix includes, and do not include more stuff than needed.

	* src/io-bmp.c: Fix includes, and do not include more stuff than needed.

	* src/gnome-canvas-pixbuf.c: Fix includes.

	* src/gdk-pixbuf.c: Fix includes.

	* src/gdk-pixbuf-util.c: Fix includes.

	* src/gdk-pixbuf-render.c: Fix includes.

	* src/gdk-pixbuf-io.h: Fix includes.

	* src/gdk-pixbuf-drawable.c: Fix includes.

	* src/gdk-pixbuf-drawable.h: Use angle brackets for the gdk-pixbuf
	include files.

	* src/gdk-pixbuf-data.c: Fix includes.

	* src/gdk-pixbuf-loader.c: #include <config.h>

	* src/gdk-pixbuf-loader.h: Use angle brackets for the gdk-pixbuf
	include files.

	* src/Makefile.am: Commented out the gdk-pixbuf-drawable stuff,
	since it is not finished.
1999-12-02 20:44:43 +00:00
Owen Taylor
bfa345c338 Keep the mask around until after we draw ... since the GC changes aren't
1999-11-29  Owen Taylor  <otaylor@redhat.com>

	* src/gdk-pixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha):
	Keep the mask around until after we draw ... since
	the GC changes aren't flushed to the X server until we
	draw, destroying it before that may result in BadPixmap
	errors.
1999-11-30 17:56:02 +00:00
Tor Lillqvist
f0e6c2b1f3 Temp debugging function prototype left in by mistake. 1999-11-25 00:48:46 +00:00
Tor Lillqvist
72fc042792 Fix two copy&paste errors.
1999-11-25  Tor Lillqvist  <tml@iki.fi>

* gdk/gdkgc.c (gdk_gc_set_ts_origin, gdk_gc_set_clip_origin):
Fix two copy&paste errors.

* gdk/makefile.cygwin: Also rebuild DLL when the static archive in
win32 has changed.

* gdk/win32/gdkprivate-win32.h: Don't need CPINFO in the
GdkWin32SingleFont struct.

* gdk/win32/gdkfont-win32.c: Some more debugging: Print Unicode
subranges of loaded fonts. Clear font signature first, in case
GetTextCharsetInfo fails. Pretend SYMBOL_CHARSET fonts have
ASCII+Basic Latin (i.e. 0x40--0xFF) as they are single-byte.

* gdk/win32/gdkgc-win32.c: Improved logging. (gdk_gc_postdraw):
Unoffset clip region.
1999-11-25 00:27:11 +00:00
Federico Mena Quintero
b990b30723 Create the temporary buffer to the size of the interesction of the
1999-11-22  Federico Mena Quintero  <federico@redhat.com>

	* src/gnome-canvas-pixbuf.c (gnome_canvas_pixbuf_draw): Create the
	temporary buffer to the size of the interesction of the bounding
	box and the expose area, not the whole expose area.  This speeds
	up things a lot.

	* src/gdk-pixbuf-render.c (gdk_pixbuf_render_threshold_alpha): Do
	not paint black on the mask, since we already cleared it in a
	single gdk_draw_rectangle() operation.
1999-11-24 08:19:58 +00:00
Tor Lillqvist
0b793d2cc8 set event->any.window before calling filter functions.
1999-11-23  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkevents-win32.c (gdk_event_translate): set
event->any.window before calling filter functions.
1999-11-23 22:38:50 +00:00
Jonathan Blandford
14237d13e2 make the symlink. Does not work for srcdir != buildir != . Beats me why; I
1999-11-22  Jonathan Blandford  <jrb@redhat.com>

	* configure.in (GDK_PIXBUF_DIR): make the symlink.  Does not work
	for srcdir != buildir != .  Beats me why; I can't figure it out.
	AC_OUTPUT_COMMANDS doesn't seem to let me substitute it correctly.
1999-11-22 20:43:58 +00:00
Tor Lillqvist
143002cac5 Remove, as this is a file generated by configure (or copied from
1999-11-21  Tor Lillqvist  <tml@iki.fi>

* gdk/gdkconfig.h: Remove, as this is a file generated by configure
(or copied from gdkconfig.h.win32 on Win32, sigh).

* gdk/gdkprivate.h: Mark gdk_parent_root for export from DLL.

* gdk/gdkgc.c (gdk_gc_alloc): Remove duplicated line.
1999-11-21 22:56:37 +00:00