Commit Graph

474 Commits

Author SHA1 Message Date
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