Commit Graph

1050 Commits

Author SHA1 Message Date
Owen Taylor
0fd671aed5 Make sure Page_Up, Page_Down get those names, not Prior, Next.
Tue Feb 26 19:16:28 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/win32/gdkkeys-win32.c (gdk_keyval_name):
        * gdk/x11/gdkkeys-x11.c (gdk_keyval_name):
        Make sure Page_Up, Page_Down get those names, not Prior,
        Next.
2002-02-27 00:24:11 +00:00
Tor Lillqvist
93fa867e14 Implement the functions that until now just were non-functional stubs. For
2002-02-26  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkkeys-win32.c: Implement the functions that until
	now just were non-functional stubs. For "hardware keycodes", we
	use Windows virtual keycodes. Not scancodes, although that at
	first might seem more low-level and a better match to X11
	keycodes.

	The Windows API is really mixed up and confused with respect to
	scancodes and virtual keycodes. (Surprised?) Some scancodes are
	generated by two keys on the keyboard (!), and although the
	keyboard messages do have a flag to indicate which key the user
	pressed, other API that take a scan code as input don't let you
	specify which actual key you mean.

	(update_keymap): Function to build a X11-like representation of
	the keyboard. Each key has four keysyms: two levels (nonshifted
	and shifted) and two groups (normal and with AltGr).

	(gdk_keymap_get_direction): Use the codepage corresponding to the
	thread's input locale, not the system codepage.

	* gdk/win32/gdkglobals-win32.c
	* gdk/win32/gdkmain-win32.c
	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkwindow-win32.h
	* gdk/win32/gdkwindow-win32.c: Remove the input_locale and
	charset_info fields from GdkWindowImplWin32. Input locale is
	per-thread in Windows, and as GDK on Windows really only works
	when the GDI interaction all happens in just one thread anyway,
	this state can be global. Use globals _gdk_input_locale and
	_gdk_input_codepage instead. Set these based on the thread's input
	locale (keyboard layout, or which IME is active).

	* gdk/win32/gdkevents-win32.c: Set the group and hardware_keycode
	fields in GDK key events. On input locale change messages, set
	the global state variables, and inform update_keymap() that it
	has to rebuild the keymap.
2002-02-26 01:18:27 +00:00
Owen Taylor
9953d39036 Fix precendence problem. (Sven Neumann)
Mon Feb 25 12:47:25 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        Fix precendence problem. (Sven Neumann)
2002-02-25 17:48:32 +00:00
Owen Taylor
3ce820584f Convert over to using an GtkInvisible - selections don't work properly
Sun Feb 24 23:23:28 2002  Owen Taylor  <otaylor@redhat.com>

	* tests/testselection.c (main): Convert over to using
	an GtkInvisible - selections don't work properly
	with now NO_WINDOW GtkToggleButton. (Example really
	should be using GtkClipboard.)

	* gdk/x11/gdkselection-x11.c (gdk_selection_property_get):
	Fix  problems if sizeof(GdkAtom) != sizeof(Atom). (Unlikely)

	* gdk/x11/gdkproperty-x11.c (gdk_property_get): Set
	actual_length when converting atoms as well.
	(Gregory Merchan, #72074)
2002-02-25 05:12:14 +00:00
Alexander Larsson
3e7279cff4 Always NULL out bg_pixmap, even when it used to be None or parent
2002-02-24  Alexander Larsson  <alla@lysator.liu.se>

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_background):
	Always NULL out bg_pixmap, even when it used to be None
	or parent relative.
2002-02-25 04:00:37 +00:00
Owen Taylor
82b76bbee3 gtk/gtksettings.c gtk/gtkstyle.c: Patch from Richard Hestilow to add a
Sat Feb 23 20:59:05 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkstyle.c gtk/gtkrc.[ch]: gtk/gtksettings.c gtk/gtkstyle.c:
        Patch from Richard Hestilow to add a gtk-font-name GtkSetting.

        * gdk/x11/gdkevents-x11.c: Add Gtk/FontName XSETTING.
2002-02-24 02:24:51 +00:00
Tor Lillqvist
591fe66d00 Set also group in the key press/release events, always to zero for now.
2002-02-24  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (build_keypress_event,
	build_keyrelease_event, gdk_event_translate): Set also group in
	the key press/release events, always to zero for now.
2002-02-23 23:51:19 +00:00
Owen Taylor
e5d1ea8cfe Massive padding addition to class structures.
Sat Feb 23 11:54:12 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/*.h gdk/*.h: Massive padding addition to class structures.

        * gtk/gtktextmark.h: Fix a FIXME about G_CONST_RETURN.
2002-02-23 20:22:05 +00:00
Owen Taylor
a504db9e83 Fixes for AIX compilation from Miroslaw Dobrzanski-Neumann, #72182.
Fri Feb 22 18:36:45 2002  Owen Taylor  <otaylor@redhat.com>

	Fixes for AIX compilation from Miroslaw Dobrzanski-Neumann,
	#72182.

	* demos/gtk-demo/main.c gtk/gtktreeview.c gtk/gtktoolbar.c
	gtk/gtkpaned.c gtk/gtkobject.c gtk/gtkcontainer.c
	gtk/gtkcolorsel.c gtk/gtkcellrender.c gdk/x11/xsettings-client.h:
	Squash trailing commas on enumerations.

	* gdk/gdktypes.h: Drop GDK_RELEASE_MASK to 1 << 30 instead
	of 1 << 31 to work around AIX compiler problem. (C standard
	seems to imply that compiler is required to use an unsigned
	type for the enum value in this case.)

	* gdk/gdkpixbuf-drawable.c: Fix lvalue casts.

	* gtk/gtkwindow.h: Fix use of enum types for bitfields ...
	compilers may choose to use a signed type for bitfields.
2002-02-23 00:13:17 +00:00
Owen Taylor
708e1a9574 Implement "fuzzy" key binding lookups; allow matches on key and level but
Wed Feb 20 14:26:47 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkkeyhash.[ch]: Implement "fuzzy" key binding lookups;
        allow matches on key and level but not group. Also, implement
        ignoring "consumed modifiers correctly."

        * gtk/gtkaccelgroup.c gtk/gtkbindings.c: Convert to using
        GtkKeyHash.

        * gtk/gtkdebug.h gtk/gtkmain.c: Support GTK_DEBUG=keybindings

        * gdk/x11/gdkevents-x11.c (gdk_event_translate): Fill in
        the group for key release events as well as key press events.

        * gdk/gdkkeys.h gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        Rename unused_modifiers to consumed_modifiers, make the docs and
        non-Xkb implementation match the Xkb implementation.

        * gdk/linux-fb/gdkkeyboard-fb.c gdk/win32/gdkkeys-win32.c: Propagate
        doc and parameter name changes.

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        XkbTranslateKeyCode doesn't handle LockMask, we need to handle
        it ourselves.

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): Force
        <Shift>Tab to give GDK_ISO_Left_Tab, since we need consistency
        to allow dealing with ISO_Left_Tab.

        * gtk/gtkwindow.c gtk/gtktextview.c gtk/gtkscrolledwindow.c
        gtk/gtkpaned.c gtk/gtkcombo.c  gtk/gtknotebook.c:
        Remove inappropriate uses of GDK_ISO_Left_Tab. (GDK_ISO_Left_Tab
        or <Shift>Tab both are equivalent as a binding specifier.)

        * gtk/gtkbutton.c (gtk_button_class_init): Make ::activate
        GTK_RUN_ACTION, so you can bind an accelerator to it.

        * gtk/gtklabel.c (gtk_label_set_uline_text_internal): Call
        gdk_unicode_to_keyval on the mnemonic character.

        * tests/testgtk.c: Add a test for the new fuzzy key binding matching.
2002-02-21 17:14:10 +00:00
Owen Taylor
e6d7f5e196 Set the property as type ATOM_PAIR, not ATOM. (#72074, Gregory Merchan.)
Wed Feb 20 21:52:13 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkselection.c (gtk_selection_request): Set the property
        as type ATOM_PAIR, not ATOM. (#72074, Gregory Merchan.)

        * gdk/x11/gdk{property,selecton}-x11.c: Auto-convert properties
        of type ATOM_PAIR as well as properties of type ATOM.
2002-02-21 03:00:40 +00:00
Owen Taylor
6fd8f4aab0 Add a XSETTING mapping for gtk-can-change-accels. (#70218, Thomas
Wed Feb 20 16:19:49 2002  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkevents-x11.c: Add a XSETTING mapping for
	gtk-can-change-accels. (#70218, Thomas Leonard.)
2002-02-20 21:22:22 +00:00
Hans Breuer
911700a37e process WM_PAINT messages for bg_pixmap == GDK_NO_BG, fixes The GIMP's
2002-02-18  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkevents-win32.c : process WM_PAINT messages
	for bg_pixmap == GDK_NO_BG, fixes The GIMP's canvas
	rendering glitches on win32

	* gdk/win32/gdkinput-win32.c : use g_object_new to create
	GdkDevice instead of g_new

	* gtk/gtkpaned.c : make LAST_SIGNAL the last in enum.
	This avoids to smash totally unrelated static data and
	resulting random crashes. (as reported on gtk-devel-list,
	2002-02-10 : testgtk crashes)

	* gtk/gtk.def : add new file selection entry points
2002-02-18 22:56:57 +00:00
Owen Taylor
2e8d083c3c Released 1.3.14
Sun Feb 17 21:30:49 2002  Owen Taylor  <otaylor@redhat.com>

        * Released 1.3.14

        * configure.in: Version 1.3.14, interface, binary age 0.

        * gdk/gdkregion-generic.c (miSubtractO): Fix out-of-bounds
        read. (#71619, reported by Morten Welinder)

        * gtk/gtkmenu.c (gtk_menu_class_init): Fix setting default.

        * gtk/gtkfilesel.c (gtk_file_selection_class_init): Add
        a select_multiple property to go along with thenew
        get/set_select_multiple.

        * gdk/gdkwindow.c: Patch from Soeren Sandmann to improve
        update debugging code. (#71703)
2002-02-18 03:29:00 +00:00
Tor Lillqvist
28bfe19594 Don't set the PC_EXPLICIT flag for unused palette entries, that might have
2002-02-17  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkcolor-win32.c (free_colors): Don't set the
	PC_EXPLICIT flag for unused palette entries, that might have
	undesired side effects. Just set them to black. Black is always
	present in a palette, so having superfluous black entries won't
	cause any extra allocations from the system palette either when
	realized.

	* gdk/win32/gdkevents-win32.c
	(gdk_event_translate:WM_QUERYNEWPALETTE): Don't do anything if the
	system visual is static color, i.e. the user has told GDK to use
	just the 16 static colors. In that case no need to redraw
	anything, as the colors are static and by definition always
	correctly mapped in the system palette.
	(WM_PALETTECHANGED): Ditto, no need to call UpdateColors() either.
2002-02-17 22:03:29 +00:00
Tor Lillqvist
bc1ec5c14a Massive changes. Too many to list here, but I'll try a summary:
2002-02-17  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/*.c: Massive changes. Too many to list here, but I'll
	try a summary:

	1) Unify GdkPixmap and GdkImage implementation: For each
	GdkPixmap, allocate a GdkImage, and vice versa.
	GdkPixmapImplWin32Data has a pointer to the GdkImage.
	GdkImage::windowing_data is a pointer to the GdkPixmap.

	This simplifies many pixmap and image related functions a lot, and
	reduces duplicated code snippets. For instance, there is only one
	place in gdk/win32 where CreateDIBSection() is called, in the
	function _gdk_win32_new_pixmap(). Converting a bitmap (GdkPixmap)
	to a Windows region is almost trivial, with the bitmap bits being
	readily accessible in the associated GdkImage.

	All blitting between GdkPixmaps, GdkWindows and GdkImages goes
	through handled the _gdk_win32_blit() function, which calls
	different functions to handle the cases of blitting from pixmaps,
	inside windows (scrolling), or from windows, which all require
	somewhat different handling.

	2) Support 256-color mode. This has long been very broken, now it
	works more or less OK. Keep the logical palette for each colormap
	as small as possible while allocating and freeing colors. Select
	and realize the logical palette associated with a GdkColormap into
	a DC before drawing or blitting.

	When the display is in 256-color mode, make it possible for the
	user to override the size of the palette(s) used with either the
	GDK_WIN32_MAX_COLORS environment variable, or a -max-colors
	command line option. It is possible to reduce the palette size all
	the way down to using just the 16 static colors (which causes the
	system visual to be of type GDK_VISUAL_STATIC_COLOR. This could
	possibly be useful if one desperately wants to avoid color
	flashing. (Note that in order for this to work properly, an as of
	yet not commited fix to gdkrgb.c is needed.)

	Handle the palette messages. On WM_PALETTECHANGED, call
	UpdateColors() for the given window hierarchy. Do this only if a
	window in some other top-level window hierarchy caused the palette
	change (realized a palette). Do this max five times in a row (an
	arbitrarily chosen limit), though, otherwise redraw by generating
	expose events. On WM_QUERYNEWPALETTE, cause a redraw of the whole
	window hierarchy by generating GDK_EXPOSE events.

	3) Code cleanup in general. For instance, remove the "emulated"
	X11 structs ColormapStruct, Visual and XStandardColormap. Use the
	new GDK_DEBUG_* flags for debugging output in the relevant source
	files. Remove the unused colormap hash table in gdkcolor-win32.c

	4) Plug some resource leaks.

2002-02-14  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdnd-win32.c (gdk_dropfiles_filter): Use
	g_filename_to_uri() to actually create legal URIs in the
	text/uri-list data.
2002-02-17 00:25:05 +00:00
Manish Singh
665723279c use fabs() on a double instead of abs()
2002-02-16  Manish Singh  <yosh@gimp.org>

        * gdk/linux-fb/miarc.c: use fabs() on a double instead of abs()
2002-02-17 00:06:00 +00:00
Tor Lillqvist
c69c19c791 Depend on gtk.ico.
2002-02-16  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/rc/Makefile.am (gdk-win32res.lo): Depend on gtk.ico.

	* gdk/win32/rc/gtk.ico: Use the real GTK logo. Thanks to Jernej
	Simoncic for providing the nice multi-resolution .ico file.
2002-02-15 23:55:42 +00:00
Owen Taylor
27455dcd90 File Edit Options Buffers Tools Help Thu Feb 14 21:08:49 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkglobals.c: Remove GDKVAR from C file, see
        if anyone complains. (#71317, Morten Welinder.)
2002-02-15 02:45:09 +00:00
Tor Lillqvist
d000d2bb6d Add some more GdkDebugFlags, for more fine-grained debugging output
2002-02-13  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdkinternals.h: Add some more GdkDebugFlags, for more
	fine-grained debugging output (mainly used in the Win32 backend).

	* gdk/gdk.c: Corresponding additions to the gdk_debug_keys table.
2002-02-13 21:59:47 +00:00
Owen Taylor
6b838a22d1 g_warning() if setting the local fails, like gdk_set_locale() did.
Wed Feb 13 12:41:44 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmain.c (gtk_init_check): g_warning() if setting
        the local fails, like gdk_set_locale() did.

        * gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list):
        Don't free local_list if local_count == 0. (#71241, reported
        by Kevin Vandersloot.)

        * gdk/x11/gdkselection-x11.c (gdk_text_property_to_text_list):
        Clean up list == NULL handling and failure.
2002-02-13 17:48:01 +00:00
jacob berkman
6480d8bd50 fix signature to match implementation
2002-02-11  jacob berkman  <jacob@ximian.com>

	* gdk/gdkwindow.h (gdk_get_default_root_window): fix signature to
	match implementation
2002-02-11 16:34:27 +00:00
Hans Breuer
6d33d1c7e3 don't reduce the scroll rect size by the scroll amount
2002-02-10  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkgeometry-win32.c : don't reduce the scroll
	rect size by the scroll amount

	* gdk/win32/gdkwindow-win32.c
	* gdk/win32/gdkselection-win32.c : added some casts to
	make it compile with msvc's strict type checking

	* gtk/fnmatch.c : #include <ctype.h> again for tolower
	prototype. The fnmatch() code assumes to be in the crt
	locale though it is feeded by utf8 strings from gtkfilesel.c

	* gtk/gtkfilesel.c : let ->cmpl_text be a strdup managed by
	_CompletionDir instead of referencing already freed memory

	* gtk/gtktooltips.c (gtk_tooltips_init) : fix typo to
	gtk_rc_parse_string (theDefaultTooltipColor) once as it
	was intended

	* tests/makefile.msc : added more tests

	* tests/testgtk.c (create_list) : don't try to load gtkenums.h
	from the current directory use ../gtk/gtkenums.h instead
2002-02-10 13:18:51 +00:00
Owen Taylor
60542887d5 XCopyArea with subwindow_mode = IncludeInferiors. (#70999)
Sat Feb  9 00:16:31 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkimage-x11.c (_gdk_x11_copy_to_image):
        XCopyArea with subwindow_mode = IncludeInferiors.
        (#70999)

        * demos/testpixbuf-save.c (configure_cb): Fix a minor
        memory management problem.
2002-02-09 05:24:25 +00:00
Darin Adler
6ec06edbbf isspace -> g_ascii_isspace Remove gdki8n.h include. Remove <ctype.h>
* demos/gtk-demo/main.c: (load_file): isspace -> g_ascii_isspace
	* gdk/x11/gdkim-x11.c: Remove gdki8n.h include.
	* gdk/x11/gdkkeys-x11.c: Remove <ctype.h> include.
	* gdk/x11/gdkmain-x11.c: Remove <ctype.h> include.
	* gtk/fnmatch.c: Remove <ctype.h> include.
	* gtk/gtkaccelgroup.c: Remove <ctype.h> include.
	* gtk/gtkaccellabel.c: (gtk_accel_label_refetch): toupper ->
	g_unichar_toupper, toupper -> g_unichar_totile
	* gtk/gtkbindings.c: Remove <ctype.h> include.
	* gtk/gtkfontsel.c: Remove <ctype.h> include.
	* gtk/gtkiconfactory.c: Remove <ctype.h> include.
	* gtk/gtkinputdialog.c: Remove <ctype.h> include.
	* gtk/gtklabel.c: Remove <ctype.h> include.
	* gtk/gtkmain.c: Remove <ctype.h> include.
	* gtk/gtkmenu.c: Remove <ctype.h> include.
	* gtk/gtkoldeditable.c: Remove <ctype.h> include.
	* gtk/gtkrc.c: Remove <ctype.h> include.
	* gtk/gtktextbtree.c: Remove <ctype.h> include.
	* gtk/gtktextiter.c: Remove <ctype.h> include.
	* gtk/gtktextsegment.c: Remove <ctype.h> include.
2002-02-08 19:12:34 +00:00
Anders Carlsson
a166fcbeac Free the setting name.
2002-02-07  Anders Carlsson  <andersca@gnu.org>

	* gdk/x11/xsettings-common.c (xsettings_setting_free): Free
	the setting name.
2002-02-07 04:06:16 +00:00
Owen Taylor
9a8f790e8a Keep the length of the anti-expose queue finite, by if it gets too long,
Tue Feb  5 19:13:42 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkgeometry-x11.c (gdk_window_queue): Keep
        the length of the anti-expose queue finite, by if
        it gets too long, first doing a XSync() and checking
	the event queue, and if that doesn't work, simply
        discarding all anti-expose items in the queue.

	* gdk/x11/gdkdnd-x11.c (gdk_window_cache_filter): Fix ordering
	on ConfigureNotify (#56349, Thomas Leonard)
2002-02-06 00:41:07 +00:00
Federico Mena Quintero
9b8cf1d532 Do not #include <gdk/gdkwindow.h>.
2002-02-05  Federico Mena Quintero  <federico@ximian.com>

	* gdk/gdkwindow.h: Do not #include <gdk/gdkwindow.h>.
2002-02-05 22:06:33 +00:00
Owen Taylor
aea7e2c13a on Feb 4 10:06:49 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c: gtk-double-click-time,
        not gtk-double-click-timeout. (#70501)
2002-02-04 15:13:26 +00:00
Owen Taylor
160725555e Fix another missing static.
Thu Jan 31 11:33:52 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkproperty-x11.c (insert_atom_pair): Fix
        another missing static.

        * gtk/gtkimmodule.c (n_loaded_contexts): And another.

        * gdk/x11/Makefile.am gdk/x11/gxid_lib.c: Don't
        build gxid sources at all except in the vanishingly
        rare case of --with-xinput=xfree.
2002-01-31 16:37:27 +00:00
Mark McLoughlin
60dd9e5477 make static.
2002-01-31  Mark McLoughlin  <mark@skynet.ie>

        * gdk/gdkimage.c: (scratch_image_info_for_depth): make static.

        * gdk/x11/gdkimage-x11.c: (get_full_image): ditto.

        * gdk/x11/gxid_lib.[ch]: (_gxid_claim_device), (_gxid_release_device):
        renamed from gxid_(claim|release)_device.

        * gdk/x11/gdkinput-gxi.c: (_gdk_input_enable_window),
        (_gdk_input_disable_window): upd for gxid change.

        * gtk/gtkimage.c: (animation_timeout): make static.

        * gtk/gtkstyle.c: (draw_thin_shadow), (draw_spin_entry_shadow): make
        static.

        * gtk/gtktextutil.c: (bidi_menu_entries): make static.
2002-01-31 15:48:58 +00:00
Owen Taylor
36655ffa79 Deprecate GtkPreviewType, GtkSignalRunType, GtkSideType,
Tue Jan 29 19:51:05 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkenums.h: Deprecate GtkPreviewType,
        GtkSignalRunType, GtkSideType, GtkSubmenuPlacement, GtkSubmenuDirection
        (#68183, Matthias Clasen)

        * gtk/gtkmenuitem.h: Remove _gtk_menu_item_set_placement() from
        the public header to avoid having to use GtkSubmenuPlacement.

        * gtk/{gtkmenuitem.c,gtkmenubar.c,gtkmenushell.c}: #define
        GTK_MENU_INTERNALS to preserve access to GtkSubmenu*.

        * gdk/gdki18n.h: Deprecate contents. (Darin Adler.)
2002-01-30 02:01:10 +00:00
Owen Taylor
ccb9077861 Call _gdk_draw_pixbuf(), thus enabling using this function for pixbufs
Tue Jan 29 17:40:02 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable):
        Call _gdk_draw_pixbuf(), thus enabling using this function
        for pixbufs with alpha. (#68801)

        * gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Move
        implementation of gdk_pixbuf_render_to_drawable()
        to here.
2002-01-29 22:46:21 +00:00
Sven Neumann
2c0e16e403 fixed a segfault that showed up when using the color picker.
2002-01-29  Sven Neumann  <sven@gimp.org>

	* gdk/x11/gdkimage-x11.c (_gdk_x11_copy_to_image): fixed a segfault
	that showed up when using the color picker.
2002-01-29 11:47:15 +00:00
Federico Mena Quintero
165e970296 Merge from gdk-pixbuf stable.
2002-01-25  Federico Mena Quintero  <federico@ximian.com>

	Merge from gdk-pixbuf stable.

	* gdk/gdkpixbuf-drawable.c (rgb565msb): Fixed the endianness
	conversion --- swap the individual 16 bit values instead of taking
	everying as a 32 bit value.
	(rgb565lsb): Likewise.
	(rgb555lsb): Likewise.
	(rgb555msb): Likewise.
2002-01-25 21:34:18 +00:00
Alex Larsson
588e9d1dc0 Implement copy_to_image instead of get_image
2002-01-25  Alex Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkdrawable-fb2.c (gdk_drawable_impl_fb_class_init):
	Implement copy_to_image instead of get_image

	* gdk/linux-fb/gdkimage-fb.c:
	Implement _gdk_image_new_for_depth, _gdk_windowing_get_bits_for_depth and
	_gdk_fb_copy_to_image.
	Based in part on patch from Mathieu Lacage <mathieu_lacage@realmagic.fr>

	* gdk/linux-fb/gdkmain-fb.c:
	Make ENABLE_FB_MANAGER region larger.

	* gdk/linux-fb/gdkprivate-fb.h:
	Change _gdk_fb_get_image to _gdk_fb_copy_to_image.
2002-01-25 17:10:03 +00:00
Owen Taylor
da117dcdca Set the fallback program class here, rather than
Mon Jan 21 11:46:39 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdk.c (gdk_init_check): Set the fallback program class here,
        rather than lazilygdk_get_program_class(), since we don't want
        -name to override it. (#69123, Ryan Lovett)
2002-01-21 16:50:45 +00:00
Owen Taylor
599b862f98 Fix wrong types for command line arguments (#69124, Ryan Lovett)
Mon Jan 21 10:29:45 2002  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdk.c: Fix wrong types for command line arguments
	(#69124, Ryan Lovett)

	* gdk/gdk.c (gdk_arg_context_parse): Fix bug in parsing
	parsing '--arg VALUE'.

	* gdk/gdk.c: Remove unused variable gdk_error_trap_free_list.
2002-01-21 15:41:47 +00:00
Havoc Pennington
fffbc2b16e mention that window arg can be NULL
2002-01-21  Havoc Pennington  <hp@pobox.com>

	* gdk/gdkwindow.c (gdk_window_add_filter): mention that window
	arg can be NULL
2002-01-21 05:58:33 +00:00
Jeff Garzik
b292358479 Wrap case values in GPOINTER_TO_UINT(). Fixes build with gcc 3.x.
Sat Jan 19 08:47:41 2002  Jeff Garzik  <jgarzik@mandrakesoft.com>

        * gdk/linux-fb/gdkproperty-fb.c (gdk_atom_name):
        Wrap case values in GPOINTER_TO_UINT().  Fixes build with gcc 3.x.

        * gtk/gtkmain.c:  Include sys/types.h if G_OS_UNIX.
        Fixes build with gcc 3.x and -ansi.
2002-01-19 17:54:11 +00:00
Raja R Harinath
dcb3638a7d Simplify Makefiles. <URL: http://bugzilla.gnome.org/show_bug.cgi?id=68969>
Simplify Makefiles.
<URL: http://bugzilla.gnome.org/show_bug.cgi?id=68969>
* gdk/Makefile.am: Remove use of automake conditionals to pick
library to build.
* gtk/Makefile.am: Likewise.

* gdk/Makefile.am (LDFLAGS): Use $(libdir), not @prefix@/lib.
* gtk/Makefile.am (LDFLAGS): Likewise.
2002-01-18 04:21:24 +00:00
Owen Taylor
c8698f924d Move here, and save/restore the X error handler to allow people using GTK+
Thu Jan 17 13:08:34 2002  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkmain-x11.c (gdk_error_trap_push): Move
	here, and save/restore the X error handler to allow
	people using GTK+ to set the X error handler to something
	custom without disturbing the operation of GDK.

	* gdk/linux-fb/gdkmain-fb.c (gdk_error_trap_push)
	* gdk/win32/gdkmain-win32.c (gdk_error_trap_pop): Add
	dummy implementations.

	* gdk/x11/gdkmain-x11.c gdk/x11/gdkevents-x11.c
	gdk/x11/gdkdnd-x11.c: Use gdk_error_trap_push()/pop()
	for all error trapping.

	* gdk/x11/gdkdnd-x11.c: Remove '#if 0' code.

	* gdk/x11/gdkdnd-x11.c (gdk_window_cache_new): Fix
	problem where we would add the results anyways,
	and then add it again if no error occurred, and problem
	where we could leave _gdk_error_warnings() unset.
2002-01-17 20:45:23 +00:00
Owen Taylor
9f95840a7f Don't mangle sequences of consecutive \n or \r.
Mon Jan 14 17:14:13 2002  Owen Taylor  <otaylor@redhat.com>
        * gdk/x11/gdkselection-x11.c (sanitize_utf8): Don't
        mangle sequences of consecutive \n or \r.
2002-01-14 23:11:35 +00:00
Sven Neumann
555292237c documentation cleanups.
2002-01-13  Sven Neumann  <sven@gimp.org>

	* gdk/gdkwindow.c: documentation cleanups.
2002-01-13 20:13:34 +00:00
Tor Lillqvist
ffcd60398a Fixes contributed by Archaeopteryx Software: This is a first small part of
2002-01-12  Tor Lillqvist  <tml@iki.fi>

	Fixes contributed by Archaeopteryx Software: This is a first small
	part of their changes. Will commit more later.

	* gdk/win32/*.c: Add some more checks for failed GDI calls. If a
	call fails, don't use bogus values.

	* gdk/win32/gdkcursor-win32.c (_gdk_win32_data_to_wcursor): Plug
	memory leak: g_free() the AND and XOR bitmaps after use.
	(_gdk_cursor_destroy): If we are destroying the current Windows
	cursor, set the Windows cursor to none first.

	* gdk/win32/gdkgc-win32.c (predraw_set_foreground): Delete the old
	brush that was in the DC, like the win32-procution branch does. I
	guess this plugs a resource leak? With the HDC cache, the old
	brush might be something we created ourselves, and not a stock
	brush. And it doesn't do any harm to call DeleteObject on stock
	brushes.

	* gdk/win32/gdkwindow-win32.c (gdk_window_impl_win32_finalize): If
	the window has a cursor which is the current Windows cursor,
	before destroying it set the current Windows cursor to none.
	(gdk_window_set_cursor): Also here, if destroying the current
	Windows cursor, set the current Windows cursor to none first.
	(gdk_window_get_pointer): Revamp logic.
2002-01-11 23:56:28 +00:00
Tim Janik
5972d435b0 get rid of extraneous prototype 2002-01-11 03:47:49 +00:00
Jonathan Blandford
50a641ae48 get the types as well as the symbols because we need them in
Wed Jan  9 20:56:42 2002  Jonathan Blandford  <jrb@redhat.com>

	* gdk/x11/gdkkeys-x11.c (get_xkb): get the types as well as the
	symbols because we need them in MyEnhancedXkbTranslateKeyCode.
2002-01-10 02:02:59 +00:00
Tor Lillqvist
1b7cff4755 Apply the same fixes and improvements as to the gtk-1-3-win32-production
2002-01-10  Tor Lillqvist  <tml@iki.fi>

	Apply the same fixes and improvements as to the
	gtk-1-3-win32-production branch: Bug fixes and cleanup of
	selection and DND functionality. Still doesn't work as well as the
	win32-production branch, though, but getting closer.

	After this, need to add Archaeopteryx Software's OLE2 DND support.

	* gdk/win32/gdkselection-win32.c (gdk_selection_owner_set,
	gdk_selection_send_notify, generate_selection_notify): Don't use
	SendMessage() to generate events for the same app, instead use
	gdk_event_put().

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c
	* gdk/win32/gdkmain-win32.c
	* gdk/win32/gdkevents-win32.c: Thus, remove declaration, definition,
	initialisation and handling of gdk_selection_notify_msg,
	gdk_selection_request_msg and gdk_selection_clear_msg.

	* gdk/win32/gdkselection-win32.c (gdk_text_property_to_text_list,
	gdk_free_text_list, gdk_string_to_compound_text,
	gdk_free_compound_text): Implement trivially, witrh a text_list
	always having a single element, and a compound text always
	consisting of just a single (UTF-8!) string. Let's see how well
	this works.

	* gdk/win32/gdkselection-win32.c (gdk_selection_convert): Fix
	non-ASCII paste from the clipboard: Try getting the same formats
	from the Windows clipboard that gdk_property_change() puts there:
	CF_UNICODETEXT, UTF8_STRING or CF_TEXT+CF_LOCALE.

	* gdk/win32/gdkproperty-win32.c (gdk_property_change): When
	storing text on the clipboard, handle non-ASCII text
	correctly. The logic is as follows:

	If we have only ASCII characters, use CF_TEXT.

	Else, if we are on NT, use CF_UNICODETEXT.

	Else (we are on Win9x), if all the characters are present in the
	code page of some installed locale, use CF_TEXT and also set
	CF_LOCALE to that locale.

	Else (still on Win9x) store as RTF. We use a very simple RTF
	string, just the text, no fonts or other crap, with the non-ASCII
	characters as Unicode \uN keywords. Additionally, also store the
	UTF-8 string as such, under the format "UTF8_STRING", so that GDK
	can also paste from the Clipboard what it has copied there. (Thus
	no need to implement any RTF parser.)

	(find_common_locale): New function, implements the search for a
	locale for case 3 above.

	* gdk/win32/gdkglobals-win32.c: New global variables
	compound_text, text_uri_list, utf8_string, cf_rtf and
	cf_utf8_string.

	* gdk/win32/gdkim-win32.c (_gdk_ucs2_to_utf8): New function,
	converts from a wchar_t string to UTF-8.
	(_gdk_utf8_to_ucs2): Rename from _gdk_win32_nmbstowchar_ts.
	(_gdk_utf8_to_wcs): Rename from gdk_nmbstowchar_ts.

	* gdk/win32/gdkevents-win32.c (build_keypress_event): Use
	_gdk_ucs2_to_utf8().

	* gdk/win32/gdkselection-win32.c: Remove some unnecessary logging.

	* gdk/win32/gdkdnd-win32.c: Plug memory leaks, the
	gdk_drag_context_ref() was called unnecessarily in a couple of
	places, meaning drag contexts were never freed. The same memory
	leaks seem to be present in gdk/linux-fb/gdkselection-fb.c, BTW.

	(gdk_drop_reply): For WIN32_DROPFILES drops, free the temporarily
	stored file list.

	* gdk/win32/gdkselection-win32.c: Clarify the use of the
	sel_prop_table. Now it is used only for storing the GDK_SELECTION
	"properties".

	The file names dropped with WM_DROPFILES -style DND is stored
	temporarily (between the drop and the target picking them up) in a
	separate place.

	Have a separate hash table to map selection atoms to owner
	windows. This used to be quite mixed up.

	(_gdk_dropfiles_store): New function, to store the dropped file
	list for the drop target to possibly fetch, and clear it
	afterwards, from gdk_drop_reply().

	(gdk_selection_owner_get): Much simplified now.
2002-01-10 00:53:39 +00:00
Owen Taylor
63e511bcf4 Check for RENDER before trying to use it... XRenderFindFormat() prints
Wed Jan  9 10:20:16 2002  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkdrawable-x11.c gdk/x11/gdkgc-c11.c: Check for
	RENDER before trying to use it... XRenderFindFormat() prints
	warnings if called when extension isn't present.
2002-01-09 15:23:30 +00:00
Owen Taylor
f1742682c4 Fix a problem where were the offset into the image was passed into
Mon Jan  7 22:19:32 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdrawable-x11.c (draw_with_pixmaps): Fix a
        problem where were the offset into the image was passed
        into convert_to_format() wrong.

        * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_pixbuf): Call
        gdk_x11_drawable_update_picture_clip () before using
        the picture; allow update_picture_clip() to take a NULL gc
        to mean no clipping.
2002-01-08 03:22:13 +00:00
Hans Breuer
ec81d4a8af need to cast image->mem away from void* to avoid 'error C2036: 'void *' :
2002-01-04  Hans Breuer  <hans@breuer.org>

	* gdk/gdkdraw.c gdk/gdkpixbuf-drawable.c :
	need to cast image->mem away from void* to avoid
	'error C2036: 'void *' : unknown size'. Doing pointer
	arithmetics on void pointers is a GCCism afaik.

	* gdk/gdkpixbuf-render.c : #include "gdkinternals.h" for
	_gdk_draw_pixbuf ()

	* gdk/makefile.msc gdk/win32/makefile.msc
        gdk/gtk/makefile.msc.in : use -FI msvc_recommended_pragmas.h

	* gdk/win32/gdkdrawable-win32.c : use _gkd_win32_copy_to_image
	and take care of image->visual possibly NULL.

	* gdk/win32/gdkimage-win32.c : implement _gdk_image_new_for_depth(),
	_gdk_win32_copy_to_image() and _gdk_windowing_bits_for_depth().
	Again take care of image->visual possibly NULL.

	* gdk/win32/gdkprivate-win32.h : declare _gdk_win32_copy_to_image()

	* gdk/win32/gdkevents-win32.c : use gdk_drawable_get_colormap
	instead of private field access

	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new) : adapt
	colormap setting to the gdk-X behaviour
2002-01-05 19:07:13 +00:00
Owen Taylor
734702e6d5 Optimize a little bit. (More for consistency than because it makes much of
Fri Jan  4 01:36:48 2002  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkdrawable-x11.c (convert_to_format): Optimize
	a little bit. (More for consistency than because it
	makes much of a difference.)
2002-01-04 06:38:32 +00:00
Owen Taylor
d12c9702a4 Private function to tell if we have RENDER extension.
Thu Jan  3 22:18:15 2002  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkdrawable-x11.c gdk/x11/gdkprivate-x11.h
	(_gdk_x11_have_render): Private function to tell if we have RENDER
	extension.

	* gdk/x11/gdkgc-x11.c (_gdk_x11_gc_get_fg_picture): Return
	None if we don't have RENDER extension.

	* gdk/x11/gdkpango-x11.c (gdk_pango_context_get): Don't
	use Xft unless we have render extension.

	* gdk/x11/gdkdrawable-x11.c (gdk_x11_drawable_get_picture):
	Handle missing render extension.

	* gdk/gdkdraw.c gdk/gdkdrawable.h gdk/gdkpixmap.c gdk/gdkwindow.c
	gdk/gdkinternals.h: Add a private copy_to_image() virtual function
	to the GdkDrawable vtable that extends get_image() to allow
	copying onto existing images.  Make the default implementation of
	get_image() use this so that backends don't have to implement
	both. Add private wrapper _gdk_drawable_copy_to_image().

	* gdk/x11/gdkimage-x11.c gdk/x11/gdkprivate-x11.c
	gdk/x11/gdkdrawable-x11.c (_gdk_x11_copy_to_image): Implement
	copy_to_image() semantics, speed up by using ShmPixmaps and
	XCopyArea when possible, XFlush() after ungrabbing the server,
	generally redo the logic once again.

	* gdk/gdkinternals.h gdk/x11/gdkimage-x11.c
	_gdk_windowing_bits_per_depth(): Function to convert from depth to
	bits-per-pixel. (We assume only one bpp per depth - X requires
	this.)

	* gdk/gdkinternals.h gdk/gdkrgb.c gdk/gdkimage.c: Move the GdkRGB
	scratch image code into a generic _gdk_image_get_scratch() chunk
	of code that we can use other places we need scratch images.

	* gdk/gdkimage.c gdk/x11/gdkimage.c gdk/gdkinternals.h:
	Add _gdk_image_new_for_depth() as the backend
	to _gdk_image_new() to allowing creating images with
	a depth and no visual.

	* gdk/gdkpixbuf-drawable.c: Fix so that getting
	parts of images not at 0,0 actually works.

	* gdk/gdkdrawable.h gdk/gdkinternals.h gdk/gdkdraw.c
	gdk/gdkwindow.c gdk/gdkpixmap.c gdk/gdkpixbuf-render.c:
	 - Add a new GdkDrawableClass vfunc _draw_pixbuf, and
	  _gdk_draw_pixbuf() [ will be made public later ], to allow
	  backends to accelerate drawing pixbufs.
	 - Move the implementation of gdk_pixbuf_render_to_drawable_alpha()
	   to be the default implementation.
	 - Update docs for gdk_pixbuf_render_to_drawable_alpha().
	 - Optimize the default implementation by using
	   _gdk_image_copy_to_pixmap() and scratch shared images, and
	   special casing the compositing.

	* gdk/x11/gdkdrawable-x11.c: Accelerate _gdk_draw_pixbuf()
	with alpha using the RENDER extension.

        * gdk/gdkpixbuf-drawable.c (gdk_pixbuf_get_from_drawable):
	Optimize by _gdk_image_copy_to_pixmap() and scratch images.

	* tests/testrgb.c: Add test for speed of alpha composition,
	reduce the number of iterations since alpha composition
	can be a bit slow.

	* gdk/x11/gdkimage-x11.c gdk/gdkprivate-x11.h (_gdk_x11_image_get_shm_pixmap):
	Private function to get a ShmPixmap for an image, if possible.
2002-01-04 05:58:01 +00:00
Owen Taylor
90eb9ef041 Fix problem where retrieved atoms weren't properly returned.
Thu Dec 27 18:12:55 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkproperty-x11.c (gdk_property_get): Fix
	problem where retrieved atoms weren't properly returned.
2002-01-04 00:38:15 +00:00
Tor Lillqvist
c8940d6fdc Append EXEEXT to ../gdk-pixbuf/gdk-pixbuf-csource.
2002-01-01  Tor Lillqvist  <tml@iki.fi>

	* demos/Makefile.am (test-inline-pixbufs.h): Append EXEEXT to
	../gdk-pixbuf/gdk-pixbuf-csource.

2001-12-31  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkgc-win32.c (predraw_set_foreground): Improved error
	handling.
	(gdk_win32_hdc_get,gdk_win32_hdc_release): Silence gcc -Wall.

	* gdk/win32/gdkimage-win32.c (_gdk_win32_get_image): Silence gcc
	-Wall.  Use GDK_IS_PIXMAP_IMPL_WIN32 instead of GDK_IS_PIXMAP in
	one more place.

	* gdk/win32/gdkinput-win32.c (_gdk_input_other_event): Silence gcc
	-Wall.

	* gtk/Makefile.am (libgtk_win32_1_3_la_LDFLAGS): Add -lwsock32.
2002-01-01 22:17:09 +00:00
Matthias Clasen
5b291073b0 GDK instead of Gdk.
* gdk-pixbuf/porting-from-imlib.sgml: GDK instead of Gdk.

        * gdk-pixbuf/tmpl/gdk-pixbuf-xlib-init.sgml: Replace references to
        deprecated functions.

        * gdk/tmpl/event_structs.sgml, gdk/tmpl/gcs.sgml,
        gdk/tmpl/images.sgml: Replace references to deprecated functions.

        * gdk/tmpl/properties.sgml, gdk/tmpl/selections.sgml: Additions.

        * gdk/x11/gdkproperty-x11.c, gdk/x11/gdkselection-x11.c:
        Minor documentation tweaks.
2001-12-29 00:24:25 +00:00
Tor Lillqvist
12c7fc52d8 Use G_N_ELEMENTS(). (unicode_classify): Don't return -1 on encountering an
2001-12-28  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkfont-win32.c: Use G_N_ELEMENTS().
	(unicode_classify): Don't return -1 on encountering an
	unclassified character, but play it safe and return U_BASIC_LATIN.
2001-12-28 21:52:04 +00:00
Owen Taylor
cd6070461e 1.3.12, interface, binary age 0.
Sat Dec 22 12:38:03 2001  Owen Taylor  <otaylor@redhat.com>

        * configure.in: 1.3.12, interface, binary age 0.

        * configure.in: Require new versions of Glib, Pango, ATK.

        * NEWS: Updated.

        * configure.in: Make explicit what libtool we are executing.
        (Tomas Ogren)

        * gdk/gdkcolor.c gdk/gdkgc.c gdk/gdkwindow.c: Doc fixes.

        * gtk/gtkwidget.c (gtk_widget_[class]path) gtkrc.h : Fix
        parameter names for docs.

Sat Dec 22 22:35:29 2001  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.c (gtk_window_realize)
          gtk/gtkplug.c (gtk_plug_realize): Include GDK_KEY_RELEASE_MASK.

        * gtk/gtkentry.c (gtk_entry_key_release)
          gtk/gtktextview.c (gtk_text_view_key_release_event): Pass
        key release events to the input method.

        * gtk/gtkimcontextsimple.c (gtk_im_context_simple_filter_keypress):
        Handle release of Control/Shift to end hex sequence.

        * modules/input/gtkimcontextxim.c (gtk_im_context_xim_filter_keypress):         Handle key releases as well as presses.
2001-12-23 22:59:30 +00:00
Owen Taylor
7a67ca02d6 Explicitely deprecate gdk_gc_set_font() (reported by Jeff Franks.)
Tue Dec 18 16:15:55 2001  Owen Taylor  <otaylor@redhat.com>
        * gdk/gdkgc.h: Explicitely deprecate gdk_gc_set_font()
        (reported by Jeff Franks.)
2001-12-18 21:17:49 +00:00
Owen Taylor
6d9afff749 Fix prototype for direction_changed. (Reported by Jeff Franks.)
Tue Dec 18 16:07:28 2001  Owen Taylor  <otaylor@redhat.com>
        * gdk/gdkkeys.h (struct _GdkKeymapClass): Fix
        prototype for direction_changed. (Reported by
        Jeff Franks.)
2001-12-18 21:10:04 +00:00
Darin Adler
20a870a6e0 Fix some warnings.
* gdk/x11/gdkproperty-x11.c: (gdk_property_get): Fix wrong type in
	g_new -- bug if sizeof (GtkAtom) != sizeof (GtkAtom *).
	* gdk/x11/gdkwindow-x11.c: (create_moveresize_window): FALSE -> NULL
	* gtk/gtkaccellabel.c: (gtk_accel_label_refetch): Remove unused local.
	* gtk/gtklistitem.c: (gtk_list_item_expose): Remove unused local.
	* gtk/gtktextiter.c: (_gtk_text_iter_backward_indexable_segment):
	Restructure loop to get rid of uninitialized variable warning. Also
	gives a tiny efficiency gain.
2001-12-15 17:17:56 +00:00
Jacob Berkman
ee17d020eb *** empty log message *** 2001-12-11 01:08:33 +00:00
Anders Carlsson
17f81739f7 Update xsettings name.
2001-12-09  Anders Carlsson  <andersca@gnu.org>

	* gdk/x11/gdkevents-x11.c: Update xsettings name.

	* gtk/gtkdnd.c (gtk_drag_check_threshold): Use the
	gtk-dnd-drag-threshold GtkSetting.

	* gtk/gtksettings.c (gtk_settings_class_init): Add
	setting for dnd drag threshold.
2001-12-09 22:08:30 +00:00
Christopher Blizzard
1d0e9b7f28 Fallback to setting the prgname to "<unknown>" if someone doesn't pass in
Sat Dec  8 16:12:10 2001  Christopher Blizzard  <blizzard@redhat.com>

        * gdk/gdk.c (gdk_init_check): Fallback to setting the prgname to
        "<unknown>" if someone doesn't pass in a valid argc.  (Patch from
        Fabrice Bellet <fabrice@gnu.org>, #54127).
2001-12-08 21:13:02 +00:00
Havoc Pennington
6c98b1cb04 fix up my list of "cursors that are actually useful" in gdk_cursor_new()
2001-12-07  Havoc Pennington  <hp@pobox.com>

	* gdk/x11/gdkcursor-x11.c (gdk_cursor_new): fix up my list of
	"cursors that are actually useful" in gdk_cursor_new() docs
2001-12-07 05:27:17 +00:00
Matthias Clasen
31df9723e5 Fix docs. (#66383)
* gtk/gtklabel.c: Fix docs. (#66383)

        * gtk/gtkbbox.c (gtk_button_box_set_child_secondary): Fix docs.
        (#66278, #66280)

        * gdk/gdkwindow.h (gdk_window_get_deskrelative_origin),
        gdk/gdkimage.h (gdk_image_get): Deprecate. (#66208)

        * gtk/gtkcolorsel.c (gtk_color_selection_set_update_policy):
        Don't emit a g_warning() about being deprecated. (#66208)

        * gtk/gtkaccellabel.c (gtk_accel_label_set_accel_widget): Add docs.

        * gtk/gtkcontainer.c: Doc fixes.

        * gtk/gtkliststore.c (gtk_list_store_clear): Add docs; misc doc fixes.

        * gtk/gtkstyle.c (gtk_style_attach): Add docs.

        * gdk-pixbuf.h (gdk_pixbuf_ref, gdk_pixbuf_unref,
        gdk_pixbuf_animation_ref, gdk_pixbuf_animation_unref):
        Deprecate. (#66208)

        * gtk/tmpl/gtklabel.sgml: Remove redundant docs. (#66383)

        * gtk/tree_widget.sgml: Typo fix. (#66256)

        * gdk-pixbuf/Makefile.am (SCAN_OPTIONS): Add --deprecated-guards.

        * gtk/tmpl/gtktext.sgml, gtk/tmpl/gtktree.sgml,
        gtk/tmpl/gtktreeitem.sgml: Updates.
2001-12-06 21:38:12 +00:00
Matthias Clasen
a7bab735ad Deprecate. (#65851)
* gdk/gdkcolor.h (gdk_colormap_change): Deprecate. (#65851)

        * gdk/gdktypes.h (GdkKeyInfo): Remove. (#66025)

        * gtk/gtkwindow.c, gtk/gtkwidget.c: Add docs, markup fixes.

        * gtk/tmpl/gtkwidget.sgml: Updates.
        * gtk/Makefile.am (IGNORE_HFILES): Remove gtktextchild.h.
2001-12-05 00:06:40 +00:00
Owen Taylor
feca5a64e2 Ref and sink priv->tooltips in init() and unref priv->tooltips in destroy
Tue Dec  4 12:06:13 2001  Owen Taylor  <otaylor@redhat.com>
	* gtk/gtkcolorsel.c: Ref and sink priv->tooltips in
	init() and unref priv->tooltips in destroy rather
	than calling gtk_object_destroy() which has no
	effect on memory management. (#66104, HideToshi
	Tajima)
	* gtk/gtkcolorsel.c (palette_set_color): Use g_object_set_data_full()
	so we free the when the object is freed. (Fixes memory
	leak, #66096, HideToshi Tajima)
	* gdk/gdkevents.c (gdk_synthesize_window_state): Use
	a full GdkEvent structure to avoid reads of uninitialized/
	invalid memory in gdk_event_put() (#65877, patch
	from Hidetoshi Tajima)
2001-12-04 17:12:35 +00:00
Matthias Clasen
101d44881c Deprecate.
* gdk/gdkdrawable.h (gdk_drawable_ref, gdk_drawable_unref),
        gdk/gdkcolor.h (gdk_colormap_ref, gdk_colormap_unref),
        gdk/gdkdnd.h (gdk_drag_context_ref, gdk_drag_context_unref),
        gdk/gdkgc.h (gdk_gc_ref, gdk_gc_unref):  Deprecate.

        * gdk/gdkvisual.h: Use GDK_DISABLE_DEPRECATED, not
        GTK_DISABLE_DEPRECATED.

        * gdk/gdkcolor.c (gdk_colormap_ref, gdk_colormap_unref),
        gdk/gdkgc.c (gdk_gc_ref, gdk_gc_unref): Document.

        * gdk/tmpl/colors.sgml, gdk/tmpl/pixmaps.sgml, gdk/tmpl/dnd.sgml,
        gdk/tmpl/gcs.sgml: Document ref and unref functions as deprecated.
2001-11-30 22:55:28 +00:00
Owen Taylor
845d3701f7 Patch from Hidetoshi Tajima to fix bad match error when target drawable is
Fri Nov 30 16:12:21 2001  Owen Taylor  <otaylor@redhat.com>
	* gdk/gdkpango.c: Patch from Hidetoshi Tajima to fix
	bad match error when target drawable is not the
	same depth as the root window. (#65841)
	* HACKING: Update.
2001-11-30 21:14:07 +00:00
Matthias Clasen
24aef23aab Typo fix.
* gdk/gdkwindow.c: Typo fix.

        * gtk/gtk-sections.sgml: Add GtkTextChildAnchor.

        * gdk/tmpl/dnd.sgml: Updates.

        * gdk/tmpl/pango_interaction.sgml: Document GdkPangoAttrEmbossed
        and GdkPangoAttrStipple.
2001-11-29 23:08:38 +00:00
Owen Taylor
51f1c2a73c Convert atoms to and from atoms for properties of type XA_ATOM. (#65555,
Wed Nov 28 19:34:15 2001  Owen Taylor  <otaylor@redhat.com>
	* gdk/x11/gdkproperty-x11.c (gdk_property_change, gdk_property_get):
	Convert atoms to and from atoms for properties of type XA_ATOM.
	(#65555, patch from Hidetoshi Tajima)
2001-11-29 00:43:24 +00:00
Owen Taylor
931fe180ff Remove reference to gdkcursors.h.
Wed Nov 28 14:12:03 2001  Owen Taylor  <otaylor@redhat.com>
	* gdk/Makefile.am (gdk_public_h_sources): Remove reference
	to gdkcursors.h.
2001-11-28 19:32:18 +00:00
Matthias Clasen
4ee972a5c9 Directly include the contents of gdkcursors.h in the GdkCursorType enum.
* gdk/gdkcursor.h: Directly include the contents
        of gdkcursors.h in the GdkCursorType enum.

        * gdk/gdkcursors.h: Deleted.

        * gdk/gdkkeysyms.h: Remove XFree86-specific keysyms, add
        header boilerplate.

        * gdk/Makefile.am: Remove the X-derived-headers rule.

        * gdk/tmpl/cursors.sgml: Document GdkCursor and standard cursors.
2001-11-28 18:38:43 +00:00
Owen Taylor
6a252271fb Add long, but horribly sketchy comment about what is going on in this
Sun Nov 25 21:19:02 2001  Owen Taylor  <otaylor@redhat.com>
	* gdk/x11/gdkgeometry-x11.c: Add long, but horribly sketchy
	comment about what is going on in this file.
	* gdk/x11/gdkgeometry-x11.c (gdk_window_compute_position): Fix
	x/y problem.
2001-11-26 02:20:06 +00:00
Kristian Rietveld
7a181cf52b free font_desc when finished (#65266)
Sun Nov 25 23:18:39 2001  Kristian Rietveld  <kristian@planet.nl>

        * gtk/gtktexttag.c (gtk_text_tag_set_property): free font_desc
        when finished (#65266)

Sun Nov 25 23:16:29 2001  Kristian Rietveld  <kristian@planet.nl>

        * gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): free
        data after we set the property. (#65264)

Sun Nov 25 23:14:06 2001  Kristian Rietveld  <kristian@planet.nl>

        * gtk/gtkbutton.c: add destroy method so label_text gets freed
        if it has been allocated (#65268)
2001-11-25 22:19:22 +00:00
Manish Singh
dc0b9c8021 gdk/linux-fb/gdkdrawable-fb2.c update to latest Pango API
Sat Nov 24 13:39:51 2001  Manish Singh  <yosh@gimp.org>

        * gdk/linux-fb/gdkdrawable-fb2.c
        * gdk/linux-fb/gdkpango-fb.c: update to latest Pango API

        * gdk/linux-fb/gdkwindow-fb.c: implement gdk_window_show_unraised

        * gdk/linux-fb/gdkfont-fb.c (gdk_font_load): plug memleak on
        set_family

        * gdk/linux-fb/gdkfbswitch.c: minor cleanups
2001-11-24 21:52:50 +00:00
Owen Taylor
4da8e00b62 Handle events in windows other than widget->event_window properly.
Fri Nov 23 19:22:50 2001  Owen Taylor  <otaylor@redhat.com>
	* gtk/gtknotebook.c: Handle events in windows other
	than widget->event_window properly. (#65079, reported
	by Damon Chaplin)
	* gdk/gdkevents.c (gdk_event_get_coords): Fix x/y bug.
2001-11-24 00:24:18 +00:00
Hans Breuer
36ddd7d958 reflect Pango API change
2001-11-23  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkfont-win32.c (gdk_font_from_description) :
	reflect Pango API change

	* gtk/gtk.def : updated externals

	* gtk/gtkfixed.c (gtk_fixed_get_has_window) : use
	g_return_val_if_fail() to avoid 'function must return a value'

	* gtk/gtkrc.c : added spaces to fix small coding style issues
	* gtk/gtkwidget.c : ... and linebreaks. Also a static for
	'static correctness'

	* gtk/makefile.msc.in : temporary(?) disable gtk<plug|socket>
	because they only can be build on win32 after applying my patch
2001-11-23 16:05:39 +00:00
Owen Taylor
aa1a46e26b Fix problem with lost parameter.
Wed Nov 21 17:41:39 2001  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkimage.c (gdk_image_get): Fix problem with
        lost parameter.
2001-11-21 22:42:50 +00:00
Owen Taylor
bffb11e1d6 Version 1.3.11, interface, binary age 0.
Wed Nov 21 15:21:26 2001  Owen Taylor  <otaylor@redhat.com>

	* configure.in (GTK_MICRO_VERSION): Version 1.3.11,
	interface, binary age 0.

	* NEWS: Updates

	* gtk/gtktreemodel.c gtk/gtkrc.c gtk/gtkentry.c: SGML
	fixes in docs.

	* gtk/gtkmain.h: Remove unused and misnamespaced
	get_gtk_win32_directory() prototype.

	* gdk/gdkimage.c (gdk_image_get): Fix parameter names
	to match header.

	* gdk/gdkwindow.h: Fix parameters to gdk_window_shape_combine_mask(),
	gdk_window_set_transient_for(), gdk_window_set_geometry_hints(),
	to match docs.

	* gdk/gdkevents.c (gdk_event_get_coords)
	  gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_get_active)
	  gtk/gtkdnd.c (gtk_drag_set_icon_stock):
	Fix parameter names in docs.

	* docs/faq/Makefile.am (FAQ_FILES): Add missing files.
	(#64961, Akira Tagoh)
2001-11-21 21:44:08 +00:00
Owen Taylor
7fb44279fa Use RevertToParent, not RevertToNone. (#64613, Matthias Clasen)
Mon Nov 19 13:56:45 2001  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkwindow-x11.c (gdk_window_focus): Use
        RevertToParent, not RevertToNone. (#64613,
        Matthias Clasen)
2001-11-19 18:59:57 +00:00
Elliot Lee
1032bbebfa remove "temporary" file that has been in CVS for past year or so 2001-11-19 17:15:39 +00:00
Owen Taylor
d2e2773146 Fix a memory leak when retrieving atom names. (Michael Meeks, #64508)
Mon Nov 19 11:30:03 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkproperty-x11.c (get_atom_name): Fix a
	memory leak when retrieving atom names. (Michael Meeks,
	#64508)
2001-11-19 16:31:34 +00:00
Alex Larsson
ecbfe81b06 Update to new Pango API.
2001-11-18  Alex Larsson  <alexl@redhat.com>

	* gdk/x11/gdkfont-x11.c (gdk_font_from_description):
	Update to new Pango API.
2001-11-19 02:23:56 +00:00
Hans Breuer
d9eb9ba9d6 make it compile with msvc: !HAVE_UNISTD_H; no label without op, even if
2001-11-18  Hans Breuer  <hans@breuer.org>

	* gtk/gdkaccelmap.c : make it compile with msvc: !HAVE_UNISTD_H;
	no label without op, even if it's a no-op.

	* gtk/gtk.def :
	* gtk/makefile.msc.in : reflect marshaler split, some clean-up

	* config.h.win32.in : remove definition of HAVE_DIRENT_H
	* gtk/gtkfilesel.c : due to GDir (new in glib) DIR isn't
	required anymore, replace it.
	* gtk/queryimmodules.c : DIR -> GDir replacement, also
	getcwd() -> g_get_current_dir()

	* gdk/win32/gdkgeometry-win32.c : adapt to refactored gdkgeometry-x11.c
	Even 'noisy laugh' scolling appears to work, though I still can't
	claim to have fully understood what it is supposed to do ...
2001-11-18 15:37:13 +00:00
Owen Taylor
86dbeabc40 Include glib-object.h instead of gobject/gsignal.h
Sat Nov 17 21:07:46 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkenums.h: Include glib-object.h instead of
	gobject/gsignal.h

	* gdk/{gdkinternals.h,gdkwindow.c,gdkwindow.[ch],
	  x11,{fb,win32,x11/gdkwindow-*.c}: Add a dummy GdkScreen
	argument to the window_at_pointer() field of
	GdkPointerHooks. (Patch from Erwann Chenede)

	* gdk/gdkdrawable.h (struct _GdkDrawableClass ): Up
	to 6 pointers.
2001-11-18 02:15:52 +00:00
Owen Taylor
ab14a31ffb Cal gdk_window_invalidate_maybe_recurse() for recursion. (Soeren Sandmann)
Thu Nov 15 14:19:34 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Cal
	gdk_window_invalidate_maybe_recurse() for recursion.
	(Soeren Sandmann)
2001-11-16 16:54:16 +00:00
Hans Breuer
c9dabae939 make sure we know what we are talking about when asked for MINMAXINFO.
2001-11-10  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate) : make sure
	we know what we are talking about when asked for MINMAXINFO.
	Also some cleaning for !HAVE_DIMM_H etc.
2001-11-10 13:23:36 +00:00
Hans Breuer
be3809f0ba use g_strcasecmp(), some poor platforms don't have strcasecmp()
2001-10-28  Hans Breuer  <hans@breuer.org>

	* gtk/gtkfontsel.c : use g_strcasecmp(), some poor platforms
	don't have strcasecmp()

	* gtk/gtktextview.c : to fix crashing on e.g. TextView::find need
	to remove the idle funcs in gtk_text_view_destroy (). To reduce
	code duplication wrap it in its own function and use it in
	gtk_text_view_unrealize () and gtk_text_view_destroy_layout ()

	* gdk/win32/gdkdrawable-win32.c : implement the finalize
	method like the X11 version does, allow to set_colormap NULL
	* gdk/win32/gdkwindow-win32.c : adapt GdkWindowImplWin32::
	set_colormap, also some adaption to X11 version :
	(gdk_window_hide) call _gdk_window_clear_update_area
	(gdk_window_reparent) call _gdk_window_init_position

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_geometry_hints) :
	call gdk_window_resize() after all hints are set, because the
	window resizing process (WM_GETMINMAXINFO) takes all of them into
	account

	* gdk/win32/gdkfont-win32.c : make gdk_font_equal return a gboolean

	* gdk/win32/gdkvisual-win32.c : register GdkVisual with
	sizeof (GdkVisualPrivate)

	* gdk/gdk.def gtk/gtk.def : upated externals

	* gdk/makefile.msc gdk/win32/makefile.msc gdk-pixbuf/makefile.msc
	  gdk-pixbuf/pixops/makefile.msc gtk/makefile.msc.in tests/makefile.msc :
	from now on use make.msc from $(TOP)/glib/build/win32

	* gtk/stock-icons/makefile.msc : add stock_missing_image
2001-11-09 21:52:52 +00:00
Tor Lillqvist
15d2050794 Add headers. Add section about ActiveIMM.
2001-11-08  Tor Lillqvist  <tml@iki.fi>

	* README.win32: Add headers. Add section about ActiveIMM.

	* configure.in: Add --with-ie55 flag to specify the location of
	the "IE55 libs and headers" package downloadable from Microsoft,
	which contains, among other things, the Active IMM header dimm.h
	and UUID library uuid.lib. Use test -f instead of AC_CHECK_FILE.
	Require GLib 1.3.10.

	* config.h.win32.in: New version, produced by merging two
	configure-generated ones (for gcc and MSVC). Hopefully #defines
	the same flags that the previous, hand-written one, did.

	* gdk/Makefile.am
	* gdk/win32/Makefile.am: Handle the uuid library from the IE55 lib.

	* gdk/win32/gdkevents-win32.c: Conditionalize ActiveIMM
	stuff. Remove unused GdkIOClosure.

	* gdk/win32/surrogate-dimm.h: Remove, use real dimm.h instead (if
	available).

	* gdk/win32/libie55uuid.la: New file, handwritten libtool wrapper
	for uuid.lib. (Does it really have to be this hard to use an
	existing library with libtool? Probably I am missing something.)
2001-11-08 20:57:18 +00:00
Owen Taylor
ff4f641512 Fix misplaced HAVE_XFT.
Tue Nov  6 10:13:16 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkgc-x11.c: Fix misplaced HAVE_XFT.
2001-11-06 15:14:09 +00:00
Owen Taylor
42634ee735 Redo Xft support to go directly to Picture objects instead of using
Mon Nov  5 12:46:44 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkdrawable-x11.[ch] gdk/x11/gdkgc-x11.c
	gdk/x11/gdkpixmap-x11.c gdk/x11/gdkprivate-x11.h
	gdk/x11/gdkwindow-x11.c: Redo Xft support to go
	directly to Picture objects instead of using XftDraw.
	This fixes the problem where we weren't able to
	properly destroy XftDraw objects before destroying
	the accompanying windows, and probably improves
	efficiency a bit too. (#50214)
2001-11-05 17:48:58 +00:00
Owen Taylor
8a31888a04 Clamp max window width/height to 32767, not 32768 since we have to be able
Mon Nov  5 10:01:49 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkgeometry-x11.c (gdk_window_compute_position):
	Clamp max window width/height to 32767, not 32768 since
	we have to be able to deal with a dx/y of -32768 without
	getting a width of 65536 when guffaw scrolling.

	* gdk/x11/gdkgeometry-x11.c: Implement gdk_window_scroll()
	for the guffaw scrolling case, fixing some problems with
	copy-area case as well. Fix BadValue bug with moving windows
	by large amounts.

	* gdk/x11/gdkgeometry-x11.c (gdk_window_clip_changed): Update
	clip in window structue before calling gdk_window_invalidate_region
	since that trims new invalidations to the window's visible
	region.

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_static_gravities):
	Really set the static window gravity on the children, not
	repeatedly on the window.

	* gtk/testgtk.c: Add a torture test for big windows and
	gdk_window_scroll().
2001-11-05 15:56:50 +00:00
Owen Taylor
3be9ce0e18 Implement gdk_color_parse() in terms of pango_color_parse().
Sun Nov  4 19:16:23 2001  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkcolor.c (gdk_color_parse): Implement gdk_color_parse()
        in terms of pango_color_parse().

        * gdk/{linux-fb,win32,x11}/gdkcolor-*.c: Remove port-specific
        gdk_color_parse() implementations.
2001-11-05 00:23:45 +00:00
Owen Taylor
21457ced17 Add a function gdk_window_invalidate_maybe_recurse() for use in "shallow
Sun Nov  4 16:02:08 2001  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkwindow.[ch]: Add a function gdk_window_invalidate_maybe_recurse()
        for use in "shallow invalidation" of a widget. (Windows belonging
        to the widget, but not to the widget's children)

        * gtk/gtkprivate.h gtk/gtkwidget.c gtk/gtksizegroup.c: Add private
        flags GTK_ALLOC_NEEDED, GTK_REQUEST_NEEDED.  These flags are set
        up on ancestors up to the resize container on queue_resize. Size
        requests only actually take place if GTK_REQUEST_NEEDED, size
        allocations only take place if GTK_ALLOC_NEEDED or the size
        changed.

        * gtk/gtkcontainer.c gtk/gtkwidget.c: Remove
        container->resize_widgets and the RESIZE_NEEDED flag since the
        above flags are sufficient to figure out what needs to be
        resized/reallocated. Remove code manipulating
        container->resize_widget.

        * gtk/gtkwidget.[ch]: Add gtk_widget_set_redraw_on_alloc(); this
        allows widgets to turn off being automatically invalidated is when
        they are resized.

        * gtk/gtkwidget.[ch] (gtk_widget_size_allocate): Invalidation when
        a widget is resized or moved is "shallow" as described above -
        only the windows that need to be invalidated are invalidated.

        * gtk/gtkbox.c gtk/gtktable.c gtk/gtkalignment.c docs/Changes-2.0.txt:
        Make these widget's init functions call
        gtk_widget_set_redraw_on_allocate(widget,FALSE).

        * gtk/gtkwindow.c (gtk_window_configure_event): Call
        _gtk_container_queue_resize(), since we don't want
        redrawing. (Probably could be done for other
        calls to gtk_widget_queue_resize() in gtkwindow.c,
        but this is the most important one.)

        * gtk/gtkwindow.c (gtk_window_move_resize): Don't call
        gtk_widget_queue_draw() - size_allocate() handles
        that as appropriate.

        * gtk/gtkframe.c (gtk_frame_size_allocate): Invalidate instead
        of queue_clear() to avoid invalidating children.
2001-11-04 22:57:03 +00:00
Sebastian Wilhelmi
d5b5427c06 Removed -DGTK_DISABLE_COMPAT_H.
2001-11-02  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* tests/makefile.msc, gtk/makefile.msc.in: Removed
	-DGTK_DISABLE_COMPAT_H.

	* docs/Changes-2.0.txt:
	s/GDK_DISABLE_COMPAT_H/GDK_DISABLE_DEPRECATED/

	* gtk/gtkcompat.h.in, gdk/gdkcompat.h: Removed from CVS.
2001-11-02 15:39:04 +00:00
jacob berkman
f2f7090a62 these should be 31, not 3. Hooray for Xatoms (and not using the XA_*
2001-10-31  jacob berkman  <jacob@ximian.com>

	* gdk/gdkselection.h (GDK_TARGET_STRING):
	(GDK_SELECTION_TYPE_STRING): these should be 31, not 3.  Hooray
	for Xatoms (and not using the XA_* macros)!
2001-10-31 21:52:29 +00:00
jacob berkman
7c12bae85c automake doesn't support conditionalized LDFLAGS, so put win32 flags in
2001-10-29  jacob berkman  <jacob@ximian.com>

	* gdk/Makefile.am (LDFLAGS):
	* gtk/Makefile.am (LDFLAGS): automake doesn't support conditionalized
	LDFLAGS, so put win32 flags in here
2001-10-29 21:50:06 +00:00
Tor Lillqvist
06b4ef6517 Updates.
2001-10-29  Tor Lillqvist  <tml@iki.fi>

	* README.win32: Updates.

	* gtk-zip.sh.in: New file, used to build distribution package for
	Windows.

	* gdk/gdkglobals.c: Mark gdk_threads_mutex for DLL export when
	applicable with GDKVAR.

	* gtk/gtk.def: Update.

	* gtk/gtkfilesel.c: Include <winsock.h> (if available) for
	gethostname().

	* gtk/gtkmain.c
	* gtk/gtkrc.c: (Win32) Save actual DLL name for later use in DLL
	entry function. Avoid hardcoded paths GTK_LIBDIR, GTK_SYSCONFDIR,
	GTK_DATA_PREFIX and GTK_LOCALEDIR, instead add functions that call
	g_win32_get_package_installation_subdirectory() with the actual
	DLL name saved above. Redefine above directory name macros to call
	these functions. Remove some ifdefs.

	* gtk/maketypes.awk: Output GTKTYPEBUILTINS_VAR (that marks
	variable for export on Win32) also to the _vars file.

	Changes for autoconfiscated build on Win32, and addition of Win32
	backend to the related files:

	* configure.in: Like in GLib, set LT_CURRENT_MINUS_AGE for use
	when forming DLL name in some files. Set MS_LIB_AVAILABLE is
	lib.exe is available. Call AC_LIBTOOL_WIN32_DLL. Set
	PLATFORM_WIN32, OS_WIN32 and USE_WIN32 automake conditionals. Add
	win32 target, using pangowin32. Don't use the
	-export-symbols-regex option on Win32, we use .def files to list
	exported symbols. Check <winsock.h> (for gethostname() in
	gtkfilesel.c). Enclose nested AC_CHECK_* macros in brackets to
	prevent premature m4 expansion.

	* acconfig.h: Add HAVE_WINTAB.

	* gdk/Makefile.am: Add libgdk-win32-1.3.la target and associated
	macros and rules. Use -no-undefined on Win32. Use gdk.def file. If
	MS_LIB_AVAILABLE, build MS import library. Install the import
	libraries. If HAVE_WINTAB, link with the Wintab library.

	* gtk/Makefile.am: Add libgtk-win32-1.3.la target and associated
	macros and rules. Use -no-undefined on Win32. Use gtk-win32.def
	file. Install import libraries.
2001-10-29 07:06:37 +00:00
Tor Lillqvist
a53f14a6e3 New file, hand-written wrapper for the Wintab library.
2001-10-29  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/libwntab32x.la: New file, hand-written wrapper for the
	Wintab library.

	* gdk/win32/gdkwin32.h
	* gdk/win32/gdkprivate-win32.h: Reorganise to match corresponding
	X11 headers better, and to enable gdkwin32.h to be installed and
	included from applications, but not the *-win32.h headers.

	* gdk/win32/*.c: Corresponding small changes, simplifications of
	#includes.

	* gdk/win32/gdkregion-win32.c: Remove.

	* gdk/win32/gdkevents-win32.c (print_event): Add GDK_SETTING.

	* gdk/win32/gdkfont-win32.c
	* gdk/win32/gdkgeometry-win32.c: Remove unused variables.

	* gdk/win32/gdkproperty-win32.c (gdk_atom_intern): Don't insert
	GDK_NONE values into hash table.

	Changes for autoconfiscated build on Win32, and addition of Win32
	backend to the related files:

	* gdk/win32/Makefile.am: Actually enable building the win32
	objects here, not just list all files in EXTRA_DIST. Link in the
	compiled resource file from rc/gdk-win32res.lo. If HAVE_WINTAB,
	copy the Wintab library into the .libs directory.

	* gdk/win32/gdkwindow-win32.c (RegisterGdkClass): Don't assume the
	name of the GDK DLL when fetching the icon. Use the HMODULE saved
	in gdk_dll_hinstance by DllMain.

	* gdk/win32/rc/Makefile.am: Build gdk-win32res.lo using the
	build/win32/lt-compile-resource script.

	* gdk/win32/rc/gdk.rc.in
	* gtk/gtk-win32.rc.in: Use the DLL name that libtool would use.
2001-10-29 06:50:55 +00:00
Hans Breuer
93f12bd6d4 static correct-ness, underscore prefixing of library internal functions
2001-10-28  Hans Breuer  <hans@breuer.org>

	* gdk/gdk.c gdk/gdkevents.c
	  gdk/win32/gdkcolor-win32.c gdk/win32/gdkdnd-win32.c
	  gdk/win32/gdkdrawable-win32.c gdk/win32/gdkevents-win32.c
	  gdk/win32/gdkfont-win32.c gdk/win32/gdkgc-win32.c
	  gdk/win32/gdkim-win32.c gdk/win32/gdkmain-win32.c
	  gdk/win32/gdkprivate-win32.h gdk/win32/gdkproperty-win32.c
	  gdk/win32/gdkselection-win32.c gdk/win32/gdkwin32.h
	  gdk/win32/gdkwindow-win32.c gdk/win32/gdkwindow-win32.h :
	static correct-ness, underscore prefixing of library internal
	functions
	(applied the undisputed and the win32 part. Of the latter
	 I'm probably the one who will change it back again, if Owen
	 decides that the Gdk*Impl types should not be private to Gdk)

	* gdk/gdk.def : added the remaining exported functions
2001-10-28 21:28:51 +00:00
Matthias Clasen
5b10c877c1 Typo fix. Updates. Document the special values <none> and <parent> for
* gdk/x11/gdkinput.c: Typo fix.
        * gdk/tmpl/input_devices.sgml: Updates.
        * gtk/tmpl/gtkrc.sgml: Document the special values <none> and
        <parent> for bg_pixmap.
2001-10-27 20:41:05 +00:00
Anders Carlsson
2a8aab4f18 Ugh, broken pipe.
2001-10-27  Anders Carlsson  <andersca@gnu.org>

	* gdk/x11/gdkmain-x11.c: Replace int and guint with
	long and gulong in some places to make the code 64-bit
	clean.
	(_gdk_windowing_init_check): Replace gint with gulong.
	This patch was made by George Lebl and fixes bug #62113.
2001-10-26 23:43:32 +00:00
Hans Breuer
11e6236bec updated externals
2001-10-26  Hans Breuer  <hans@breuer.org>

	* gdk-pixbuf/gdk_pixbuf.def :
	* gdk/gdk.def :
	* gtk/gtk.def : updated externals

	* gdk/win32/gdkpixmap-win32.c : removed duplicate of
	gdk_window_lookup implementation. It already was in
	gdk/win32/gdkwindow-win32.c

	* gdk/win32/gdkproperty-win32.c : made it compile again
	after GdkAtom API change

	* gtk/gtk/makefile.msc.in : updated
2001-10-26 14:38:12 +00:00
Alex Larsson
b4187613f4 Update to new Pango APIs
2001-10-24  Alex Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkfont-fb.c:
	Update to new Pango APIs

	* gdk/linux-fb/gdkproperty-fb.c:
	Update to new GdkAtom APIs

	* gdk/linux-fb/gdkwindow-fb.c:
	Remove warnings
2001-10-24 23:41:12 +00:00
Owen Taylor
b7c639eafe Always set window->parent (except or the root window itself); if the
Tue Oct 23 17:31:42 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkwindow-x11.c gdk/win32/gdkwindow-win32.c: Always
	set window->parent (except or the root window itself); if
	the window's parent is not a GdkWindow, or is a window of
        type GDK_WINDOW_FOREIGN, set window->parent to the root parent.

	* gdk/gdkwindow.c (gdk_window_get_toplevels): Don't include
	windows of type GDK_WINDOW_FOREIGN.
2001-10-24 14:15:50 +00:00
Owen Taylor
4e32ede287 Remove G_DISABLE_CONST_RETURNS.
Tue Oct 23 11:53:00 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/Makefile.am (INCLUDES): Remove G_DISABLE_CONST_RETURNS.

	* gtk/gtkfontsel.[ch]: Make gtk_font_selection_get_font()
	G_CONST_RETURN. (Murray Cumming)

	* gtk/gtkfontsel.c (gtk_font_selection_dialog_get_preview_text):
	Make G_CONST_RETURN.

	* gtk/gtkfilesel.c (open_user_dir): Fix bug with freeing
	results of g_get_home_dir().

	* gtk/gtkfilesel.c: Make filesel->fileop_file a duplicated
	copy. Storing the return from gtk_entry_get_text() is evil.

	* gtk/gtkcombo.c gtk/gtkcellrenderertext.c gtk/gtkbindings.c
	gtk/gtkfilesel.c gtk/gtkfontsel.c gtk/gtkimmodule.c
	gtk/gtkobject.c gtk/gtkoldeditable.c gtk/gtktreedatalist.c
	gtk/gtksignal.c: Add const.

	* gdk/x11/gdkkeys-x11.c (get_direction): Add missing const.

	* gtk/gtktreeview.c: Namespace object data keys to be safe, even
	if we are setting them on private widgets.

	* gtk/gtktreeview.c (gtk_tree_view_real_start_interactive_search):
	Duplicate entry->text before setting it as object data.
2001-10-23 16:02:23 +00:00
Jonathan Blandford
dc754528a0 Remove handle_box from App demo.
Mon Oct 22 14:08:26 2001  Jonathan Blandford  <jrb@redhat.com>

	* demos/gtk-demo/appwindow.c: Remove handle_box from App demo.

	* gtk/gtktreeview.c (size_allocate): Move to a different drawing
	system.  Instead of having a window the size of the tree, we have
	a window the size of widget->allocation, and simply draw with the
	offset.
	(coords_are_over_arrow): ditto.  Move to window coordinates.
	(do_prelight): ditto
	(do_unprelight): ditto

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
	Minor fix from Kristian Rietveld to fix unsorted case.
2001-10-22 18:24:29 +00:00
Owen Taylor
0c6a8f530b Deprecate gtk_entry_set_editable. (#58768, Vitaly Tishkov)
Sat Oct 20 18:58:25 2001  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkentry.h: Deprecate gtk_entry_set_editable.
        (#58768, Vitaly Tishkov)

        * gtk/gtkobject.h: Deprecate with abandon.
        (#61942, Vitaly Tishkov, Matthias Clasen)

        * gtk/gtksignal.h: Deprecate everything.

        * gtk/gtkmain.h (GTK_PRIORITY_INTERNAL): Deprecate
        all GTK_PRIORITY_* defines other than GKT_PRIORITY_RESIZE>
        (#61942, Matthias Clasen)

        * gtk/gtkstyle.h: Deprecate gtk_draw_*. (#61140,
        Havoc Pennington)

        * gtk/gtkitemfactory.h: Deprecate compat functions
        for GtkMenuFactory code. (#62071)

        * gdk/gdkdrawable.h: Deprecate gdk_draw_string,
        gdk_draw_text,gdk_draw_text_wc. (#62071)

        * gtk/{gtkentry.c,gtklabel.c,gtkoldeditable.c,gtktextview.c}:
        Use GDK_SELECTION_CLIPBOARD instead of GDK_NONE in calls
        to gtk_clipboard_get().
2001-10-22 14:31:06 +00:00
Owen Taylor
7da0a01b88 Don't call g_thread_init(), we don't want to link to -lgthread if we don't
Mon Oct 22 10:12:08 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdk.c docs/Changes-2.0.txt (gdk_threads_init): Don't call
	g_thread_init(), we don't want to link to -lgthread if we don't
	have to.
2001-10-22 14:14:33 +00:00
Owen Taylor
97ff064f22 Add a function, gdk_threads_init() that must be explicitely called to
Mon Oct 22 08:51:02 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdk.[ch] (gdk_threads_init) docs/Changes-2.0.txt:
	Add a function, gdk_threads_init() that must be explicitely
	called to enable the GDK thread mutex.
2001-10-22 12:59:21 +00:00
Owen Taylor
46dde80428 Fix problem with g_return_if_fail return value.
Sun Oct 21 23:27:00 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_translate_coordinates): Fix
	problem with g_return_if_fail return value.

 	* gdk/x11/gdkproperty-x11.c docs/Changes-2.0.txt: Move over the
	virtual atom code from the gdk-multihead branch, removing the per-display
	part. Virtualizing atoms needs to be done now to prevent compat
	breakage in direct Xlib accessing code in the future. (#62208)

 	* gdk/x11/gdkx.h: gdk/gdk/x11/gdkproperty-x11.c: Export
 	gdk_x11_xatom_to_atom, gdk_x11_atom_to_xatom().

	* gdk/gdktypes.h docs/Changes-2.0.txt: Make GdkAtom
	an opaque pointer type so the compiler catches attempts
	to mingle it with X atoms.

	* gdk/x11/{gdkdnd-x11.c,gdkevents-x11.c,gdkglobals-x11.c,
	  gdkkeys-x11.c, gdkmain-x11.c, gdkprivate-x11.c,
	  gdkproperty-x11.c, gdkselection-x11.c, gdkwindow-x11.c}
	  gtk/{gtkclist.c,gtkctree.c,gtkdnd.c,gtkplug.c,gtksocket.c}
	  tests/testdnd.c,tests/testselection.c:
	Fix up for above atom changes.

	* gdk/gdkselection.h (GDK_SELECTION_CLIPBOARD): Add, since we
	now have the ability to add custom predefines.

	* gtk/{gtkentry.c,gtklabel.c,gtkoldeditable.c,gtktextview.c}:
	Use GDK_SELECTION_CLIPBOARD instead of GDK_NONE in calls
	to gtk_clipboard_get().

	* gdk/win32/gdkproperty-win32.c: Add CLIPBOARD, fix up
	for GdkAtom => pointer change.

	* gdk/linux-fb/gdkproperty-fb.c: Fix handling of predefined
	atoms, fix for GdkAtom => pointer change.
2001-10-22 04:34:42 +00:00
Owen Taylor
061fec5841 Fix up for change to Pango font API. #61933. (Untested, even for
Fri Oct 19 12:24:32 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/linux-fb/gdkfont-fb.c: Fix up for change to
	Pango font API. #61933. (Untested, even for compilation.)
2001-10-19 16:26:09 +00:00
Havoc Pennington
6537d7eba7 fix compilation
2001-10-18  Havoc Pennington  <hp@redhat.com>

	* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_lookup): fix compilation
2001-10-18 23:38:52 +00:00
Matthias Clasen
73e845eeab Add gdk_window_lookup, gdk_window_foreign_new, gdk_pixmap_lookup and
* gdk/gdkwindow.h, gdk/gdkpixmap.h, gdk/x11/gdkx.h,
        gdk/x11/gdkwindow-x11.c, gdk/x11/gdkpixmap-x11.c,
        gdk/win32/gdkwin32.h, gdk/win32/gdkwindow-win32.c,
        gdk/win32/gdkpixmap-win32.c, gdk/linux-fb/gdkfb.h,
        gdk/linux-fb/gdkwindow-fb.c, gdk/linux-fb/gdkpixmap-fb.c:
        Add gdk_window_lookup, gdk_window_foreign_new, gdk_pixmap_lookup
        and gkd_pixmap_foreign_new to the gdk frontend api. (#62063)

        * gtk/gtkselection.c: Remove gdk backend dependencies. (#62063)
2001-10-18 20:23:17 +00:00
Owen Taylor
5d7d5eedd5 Rename ACTIVATE_MNEMONIC enum to MNEMONIC_ACTIVATE; signal was changed a
Tue Oct 16 17:04:44 2001  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwidget.c: Rename ACTIVATE_MNEMONIC enum to
        MNEMONIC_ACTIVATE; signal was changed a long time
        ago.

        * gdk/x11/gdkim-x11.c (_gdk_x11_initialize_locale):
        Fix wrong return statement. (Reported by HideToshi
        Tajima and others.)

        * gtk/gtklabel.h (struct _GtkLabelClass): Remove
        left over select_all vfunc.
2001-10-16 23:28:45 +00:00
Owen Taylor
ca9158fa03 Call setlocale (LC_ALL, ""). (#60606)
Wed Oct 10 12:48:38 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkmain.c (gtk_init_check): Call setlocale (LC_ALL, "").
	(#60606)

	* gtk/gtkmain.c (gtk_disable_setlocale): Add function
	to disable calling setlocale (LC_ALL, "").

	* gtk/gtkmain.c (gtk_set_locale): Indicate in the
	docs that this function is not typically useful.

	* gdk/x11/{gdkim-x11.c,gdkmain-x11.c,gdkprivate-x11.h}:
	Automatically initialize GDK for the current locale
	on gdk_init(). Don't reset locale to C when
	XSupportsLocale() fails.

	* gdk/linux-fb/gdkim-fb.c (gdk_set_locale): Remove
	useless checks for UTF-8 locale breakage that mattered
	only for X.

	* examples/calendar/calendar.c
	tests/{testgtk.c,testtext.c,testcalendar.c}: Remove calls to
	gtk_set_locale().

	* gtk/gtkiconfactory.c gtk/gtkitemfactory.c:
	gdk_pixbuf_new_from_stream => gdk_pixbuf_new_from_inline.
2001-10-10 21:54:25 +00:00
Matthias Clasen
42c85f3985 Replace reference to non-existent function gdk_x11_cursor_get_xid by
* gdk/x11/gdkx.h (GDK_CURSOR_XCURSOR): Replace reference to
        non-existent function gdk_x11_cursor_get_xid
        by gdk_x11_cursor_get_xcursor.
2001-10-06 21:50:12 +00:00
Havoc Pennington
264afe83f8 forgot to save before previous commit; this adds the deprecation
of gdk_window_set_hints().
2001-10-03 20:00:18 +00:00
Havoc Pennington
eacd03aef2 Throughout: assorted docs
2001-10-02  Havoc Pennington  <hp@redhat.com>

        Throughout: assorted docs

	* gdk/gdkwindow.h: deprecate gdk_window_set_hints(), it's broken,
	gdk_window_set_geometry_hints() should be used instead.

	* gdk/gdkimage.h: deprecate gdk_image_ref, gdk_image_unref, and
	document them

	* gdk/x11/gdkx.h: remove gdk_get_client_window() since it doesn't
	seem to exist in any .c files

	* gdk/x11/gdkcolor-x11.c (gdk_colormap_query_color): docs,
	g_return_if_fail (pixel < colormap->size).
2001-10-03 18:19:48 +00:00
Havoc Pennington
230b35251a docs
2001-10-02  Havoc Pennington  <hp@redhat.com>

	* gdk/x11/gdkwindow-x11.c: docs

	* tests/testtextbuffer.c (logical_motion_tests): add sentence
	boundary tests

2001-10-02  Havoc Pennington  <hp@redhat.com>

	* gtk/tree_widget.sgml: s/empahsis/emphasis/

	* gtk/tmpl/gtkobject.sgml: update docs
2001-10-02 19:40:54 +00:00
Owen Taylor
540f15dcce Add a compat macro that got lost.
Mon Sep 24 12:48:25 2001  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtknotebook.h: Add a compat macro that got lost.

        * gtk/gtktreestore.c: Doc fixes.

        * gdk/x11/gdkevents-x11.c (gdk_event_translate): Fix reference
        leak for windows that receive events after being destroyed.
        (#60863, Joshua N. Pritikin)

        * gtk/gtktable.c (gtk_table_remove): Use gtk_widget_queue_resize
        rather than gtk_container_queue_resize().

        * gtk/{gtkcontainer.c,gtkwidget.c,gtkwindow.c}: _gtk prefix
        gtk_container_queue_resize, gtk_container_queue_resize_widgets,
        gtk_container_child_composite_name. (#60217.)
2001-09-24 16:54:41 +00:00
Hans Breuer
293d787783 updated externals
2001-09-21  Hans Breuer  <hans@breuer.org>

	* gdk/gdk.def :
	* gtk/gtk.def : updated externals

	* gtk/gtkmain.h : define get_gtk_win32_directoty ()
	* gtk/gtkmain.c (find_module) : don't use module_name after freeing it.
	Also handle that Win32 pathes cann't be hard-coded

	* gtk/gtkrc.c : use get_gtk_win32_directoty () to cleanup the various
	module, themes etc directory calculations

	* gdk/win32/gdkgeometry-win32.c : some more hacking to get coordinates
	>16 bit right. The size limit within Win9x appears _not_ to be 32767
	but slightly smaller ...

	* gdk/win32/gdkwindow-win32.c : use impl->position_info to avoid
	>16 bit clipping. Added dummy body for gdk_window_set_icon_list ()

	* gdk/win32/gdkdrawable-win32.c : implement gdk_win32_drawable_get_handle ()

	* gdk/win32/gdkevents-win32.c : some tweaking to get better expose
	handling. I'm not sure if it is better now, but at least not worse

	* gdk/win32/makefile.msc : define INSIDE_GDK_WIN32, some cleanup

	* gdk/win32/gdkwin32.h : reflect recent API restrictions
2001-09-21 19:58:35 +00:00
Owen Taylor
0989d8ed83 Remove unnecessary call to gdk_image_new_bitmap().
Thu Sep 20 16:20:47 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkrgb.c (gdk_rgb_allocate_images): Remove unnecessary
	call to gdk_image_new_bitmap().
2001-09-20 21:05:45 +00:00
Sven Neumann
b728e2eaba configure.in gdk/Makefile.am gtk/Makefile.am gtk/gtkselection.c
2001-09-20  Sven Neumann  <sven@gimp.org>

	* configure.in
	* gdk/Makefile.am
	* gtk/Makefile.am
	* gtk/gtkselection.c
	* gtk/gtktreeview.c
	* gtk/gtkwindow.c: removed remaining traces of nanox GDK backend.
2001-09-20 16:31:21 +00:00
Owen Taylor
52dd93c400 Add a missing pango_layout_iter_free ().
Thu Sep 20 11:19:42 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkpango.c (gdk_pango_layout_line_get_clip_region): Add
	a missing pango_layout_iter_free ().
2001-09-20 15:38:41 +00:00
Owen Taylor
d9b794af77 Set _NET_WM_PID and WM_CLIENT_MACHINE properties on each window, not just
Wed Sep 19 17:59:27 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_new): Set
	_NET_WM_PID and WM_CLIENT_MACHINE properties on each
	window, not just on the client leader. (#58463)
2001-09-19 22:09:17 +00:00
Owen Taylor
5a2659c215 Fix propagated (flags && GDK_COLOR_WRITEABLE) typo. (#59723)
Wed Sep 19 16:16:38 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/win32/gdkcolor-win32.c gdk/x11/gdkcolor-x11.c
          gdk/linux-fb/gdkcolor-fb.c:
        Fix propagated (flags && GDK_COLOR_WRITEABLE) typo.
	(#59723)
2001-09-19 20:17:44 +00:00
Owen Taylor
32b708985d Allow -1 for width/height to mean "width/height of pixbuf" (Patch from
Wed Sep 19 16:12:16 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkpixbuf-render.c: Allow -1 for width/height
	to mean "width/height of pixbuf" (Patch from Matthias Clasen,
	#59723)
2001-09-19 20:13:16 +00:00
Tim Janik
3a2027fbb6 Released 1.3.8.
Wed Sep 19 11:06:24 2001  Tim Janik  <timj@gtk.org>

        * Released 1.3.8.

        * gdk/Makefile.am: kill EXTRA_DIST clearing.
2001-09-19 10:37:56 +00:00
Owen Taylor
5a43a59ff3 Fix incorrect parameter to compute_double_length (#58680, patch from
Tue Sep 18 20:47:16 2001  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkspinbutton.c (gtk_spin_button_size_request): Fix
        incorrect parameter to compute_double_length
        (#58680, patch from Matthias Clasen)

        Fixes for compilation with Forte cc. (#59734, Derek Rafter)

        * gtk/gtkwindow.h gtk/gtksizegroup.h: Remove extra ;.

        * gdk/gdktypes.h (GdkModifierType): Write 1u << 31
        for GDK_RELEASE_MASK to avoid warnings with Forte.

        * gtk/gtktexttag.c gtk/gtkcellrendertext.c: Add some missing
        break; statements.
2001-09-19 00:58:09 +00:00
Matt Wilson
cbae279486 don't use += before =
2001-09-18  Matt Wilson  <msw@redhat.com>

	* docs/Makefile.am (EXTRA_DIST): don't use += before =

	* docs/faq/Makefile.am (EXTRA_DIST): likewise

	* docs/tutorial/Makefile.am (EXTRA_DIST): likewise

	* gdk/Makefile.am (MAINTAINERCLEANFILES): likewise
	(EXTRA_HEADERS): likewise

	* gtk/Makefile.am (MAINTAINERCLEANFILES): likewise
	(EXTRA_HEADERS): likewise
	(EXTRA_DIST): likewise
	(CLEANFILES): likewise

	* gtk/stock-icons/Makefile.am (CLEANFILES): likewise

	* tests/Makefile.am (EXTRA_DIST): likewise

	* Makefile.am (install-data-local): changed to use
	install-data-hook, which runs after install-pkgconfigDATA, so that
	the pkgconfigdir will have been created and populated first.

gdk-pixbuf/ChangeLog

2001-09-17  Matt Wilson  <msw@redhat.com>

	* Makefile.am (libpixbufloader_xbm_la_LDFLAGS): removed duplicate
	LDFLAGS definition, use the -avoid-version one.
	(libpixbufloader_tga_la_LDFLAGS): likewise
2001-09-18 13:26:52 +00:00
Owen Taylor
69915aa710 Implement a search path for GTK+ modules.
Sat Sep  8 16:19:02 2001  Owen Taylor  <otaylor@redhat.com>

 	* gtk/gtkmain.c: Implement a search path for GTK+ modules.

 	* configure.in gtk/gtkrc.c gtk/Makefile.am: Look for modules
 	in gtk-2.0/<type>/major.minor.(micro-binary_age) rather
 	than in gtk-2.0/major.minor.micro/<type>/. This
 	works better for a search path for modules.

 	* gtk+-2.0.pc.in gtk+-2.0-uninstalled.pc.in: Add
 	gtk_binary_version variable holding major.minor.(micro-binary_age).

 	* modules/input/Makefile.am (moduledir): Fix installation
 	directory to match change in lookup location.

 	* gtk/gtkmain.c (gtk_init_check): Remove OS/2 code for dll
 	suffixes. Needs to be handled in g_module_build_path().

	* gtk/gtkrc.c gtk/queryimmodules.c: Use g_build_filename() where
	appropriate.
2001-09-11 20:24:40 +00:00
Alexander Larsson
ff872aefee Forget gdkfont 2001-09-10 16:57:38 +00:00
Alex Larsson
1a69c439de Update to use the new g_boxed_type_register_static API.
2001-09-10  Alex Larsson  <alexl@redhat.com>

	* demos/gtk-demo/stock_browser.c:
	* gdk/gdkcolor.c:
	* gdk/gdkcursor.c:
	* gdk/gdkevents.c:
	* gdk/gdkrectangle.c:
	* gtk/gtktypeutils.c:
	Update to use the new g_boxed_type_register_static API.
2001-09-10 16:54:07 +00:00
Owen Taylor
f6d7585d00 Prevent a false alarm constness warning with a cast.
Sat Sep  8 01:49:22 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkmain-x11.c (_gdk_windowing_init_check): Prevent a
	false alarm  constness warning with a cast.

	* gdk/x11/gdkx.h: Undefine GDK_ROOT_PARENT before redefining it
	for the inside-gdk case.
2001-09-08 05:57:10 +00:00
Alex Larsson
27401e1e46 Removed unused function.
2001-09-07  Alex Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkcolor-fb.c:
	Removed unused function.

	* gdk/linux-fb/gdkdrawable-fb2.c
	* gdk/linux-fb/gdkfont-fb.c:
	Use PangoLanguage functions.

	* gdk/linux-fb/gdkinput.c:
	* gdk/linux-fb/gdkselection-fb.c:
	Fix const warnings.

	* gdk/linux-fb/gdkwindow-fb.c:
	Fix warning. Implement gdk_window_set_icon_list() and
	gdk_window_get_frame_extents(). (No icon support yet though.)

	* gtk/gtkwindow.c (gtk_window_get_position):
	If window->frame is set get the extents of it instead.
2001-09-08 00:30:13 +00:00
Owen Taylor
a3914aaf10 Deprecate gdk_set/get_use_xshm, make gdk_set_use_xshm a noop. Remove
Fri Sep  7 18:17:47 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdk.h gdk/x11/gdkmain-x11.c: Deprecate gdk_set/get_use_xshm,
	make gdk_set_use_xshm a noop. Remove --no-xshm command line
	option. If we aren't autodetecting properly, we need
	to fix the problem, or at least make it an environment
	variable setting, to avoid problems with propagating
	to embedded children, plugins, etc.

	* gdk/gdkcolor.h: Deprecate gdk_colormap_get_system_size().

	* gdk/gdkpixbuf-render.c gdk/gdkpixbuf.h
	(gdk_pixbuf_render_pixmap_and_mask_for_colormap):
	New function to render a pixmap and mask for a particular colormap.

	* gtk/gtkwindow.c (get_pixmap_and_mask): Change to use
	gdk_pixbuf_render_pixmap_and_mask_for_colormap () instead
	of internal implementation of the same.
2001-09-07 22:33:09 +00:00
Owen Taylor
1bbf2ac7ee Make gdkx.h the only installed header from gdk/x11. All structures in
Fri Sep  7 11:51:44 2001  Owen Taylor  <otaylor@redhat.com>

      Make gdkx.h the only installed header from gdk/x11.
      All structures in gdk/x11 are opaque.

	* gdk/x11/Makefile.am gdk/x11/gdkx.h gdk/x11/gdkprivate-x11.h:
	Don't install gdk{drawable,pixmap,window}-x11.h.

	* gdk/x11/{gdkcolormap-x11.c, gdkfont-x11.c, gdkx.h, gdkvisual-x11.c:
	Move GdkColormapPrivateX11, GdkFontPrivateX GdkImagePrivateX11,
	GdkVisualClass into C files.

	* gdk/gdkpixmap-x11.[ch]: Make gdk_pixmap_impl_get_type() static.

	* gdk/x11/{gdkcolor-x11.c, gdkcursor-x11.c, gdkdrawable-x11.c,
	gdkfont-x11.c, gdkgc-x11.c, gdkx.h, gdkimage-x11,gdkvisual-x11.c}
	Add public functions to replace previously exported direct
	structure access.
	gdk_x11_colormap_get_{xdisplay,xcolormap}
	gdk_x11_cursor_get_{xdisplay,xcursor},
	gdk_x11_drawable_get_{xdisplay,xcursor,gdk_x11_visual_get_xvisual,
	gdk_x11_font_get_{xdisplay,xfont}, gdk_x11_image_get_{xdisplay,ximage},
	gdk_x11_gc_get_{xdisplay,ximage}

	* gdk/gdkprivate.h gdk/gdkinternals.h: Move GdkColorInfo,
	GdkEventFilter, GdkClientFilter, GdkFontPrivate to gdkinternals.

      Fix a number of variables and functions that were exported
      "accidentally" from GDK.

	* gdk/**.[ch]: gdk => _gdk for gdk_visual_init,
	gdk_events_init, gdk_input_init, gdk_dnd_init, gdk_image_exit,
	gdk_input_exit,	gdk_windowing_exit, gdk_event_func, gdk_event_data,
	gdk_event_notify, gdk_queued_events, gdk_queued_tail,
	gdk_event_new, gdk_events_queue, gdk_events_unqueue,
	gdk_event_queue_find_first, gdk_event_queue_remove_link,
	gdk_event_queue_append, gdk_event_button_generate,
	gdk_debug_flags, gdk_default_filters, gdk_parent_root.

	* gdk/x11/{gdkevents-x11.c, gdkglobals-x11.c, gdkimage-x11.c,
	   gdkmain-x11.c, gdkprivate-x11.h, gdk/x11/gdkwindow-x11.c}:
	gdk => _gdk for gdk_event_mask_table, gkd_nevent_masks,
	gdk_wm_window_protocols, gdk_leader_window, gdk_xgrab_window,
	gdk_use_xshm, gdk_input_ignore_core.

	* gdk/x11/xsettings-common.h (xsettings_list_insert): Add
	#defines to namespace functions into the private _gdk_
	namespace.

	* gdk/gdkwindow.[ch] gdk/x11/gdkx.h: Add gdk_get_default_root_window ()
	to replace gdk_parent_root exported variable. Adjust and
	deprecate GDK_ROOT_PARENT().

	* demos/{testpixbuf-drawable.c,testpixbuf-save.c}: Fix
	GDK_ROOT_PARENT usage, remove includes of port-specific
	headers.

	* gdk/{win32,x11,fb}/gdkinput*.[ch]: s/gdk/_gdk/ for
	_gdk_input_gxid_host, _gdk_input_gxid_port, _gdk_input_ignore_core,
	gdk_input_devices, _gdk_input_windows, gdk_init_input_core.

	* gdk/x11/{gdkevents-x11.,c gdkglobals-x11.c, gdkmain-x11.c}
	docs/Changes-2.0.txt: Remove gdk_wm_protocols,
	gdk_wm_delete_window functions, gdk_wm_take_focus,
	use gdk_atom_intern() instead.

	* gdk/linux-fb/{gdkselection-fb.c, gdkmain-fb.c, gdkprivatefb.h}
	  gdk/win32/{gdkselection-win32.c, gdkmgdkwin32.h, gdkprivate-win32.h}
	  gdk/x11/{gdkselection-x11.c gdkx.h, gtkprivate-x11.h}
	  gtk/gtkselection.c
        Unexport gdk_selection_property, just use
	gdk_atom_intern ("GDK_SELECTION").

	* gdk/x11/{gdkprivate-x11.h,gdkdrawable-x11h,gdkgc-x11.c,gdkx.h}:
	Unexport gdk_drawable_impl_x11_get_type, gdk_gc_x11_get_type,
	GDK_GC_X11 cast macros, GdkGCX11 structures, GdkCursorPrivate,
	GdkVisualprivate, gdk_x11_gc_flush.

      Make a number of public exports of variables into functions
      to increase encapsulation.

	* gdk/gdkinternals.h gdk/gdkinput.h gdk/gdkevents.h
	gdk/linux-fb/gdkmouse-fb.c: gdk_core_pointer => _gdk_core_pointer,
	move to gdkinternals.h. Add gdk_device_get_core_pointer ().

	* gdk/gdkprivate.h gdk/gdkpango.c gdk/gdkinternals.h
	docs/Changes-2.0.txt: Unexport gdk_parent_root, gdk_error_code,
	gdk_error_warnings.

	* gdk/x11/{gdkcolormap-x11.c, gdkmain-x11.c, gdkx.h}
	  docs/Changes-2.0.txt:
	s/gdk_screen/_gdk_screen/, add gdk_x11_get_default_screen()
	s/gdk_root_window/_gdk_root_window/, add gdk_x11_get_default_root_xwindow()
	Add gdk_x11_get_default_xdisplay().

	* gdk/gdk.h gdk/gdk.c linux-fb/gdkfb.h linux-fb/gdkglobals-fb.c
	win32/gdkwin32.h x11/gdkglobals-x11.c gdk/x11/gdkmain-x11.c
	gdk/x11/gdkx.h: gdk/gdk.def: Add gdk_get/set_program_class,
	Don't export gdk_progclass, move --class command line
	option and handling to common portion of GDK.

      Miscellaneous fixes:

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): Fix
	g_return_val_if_fail that should have been g_return_if_fail.

	* gdk/gdkinternals.h gdk/gdkprivate.h: Move
	gdk_synthesize_window_state() to the semi-public gdkprivate.h.

	* gtk/gtkdnd.c (_gtk_drag_source_handle_event): Remove uneeded
	X11 dependency.

	* gdk/linux-fb/gdkmain-fb.c gdk/win32/gdkmain-win32.c gdk/TODO:
	Remove unused gdk_key_repeat_disable/restore.

	* linux-fb/gdkglobals-fb.c win32/gdkglobals-win32.c
	x11/gdkglobals-x11.c x11/gdkprivate-x11.h gdk/gdk.def:
	Remove unused gdk_null_window_warnings variable.

	* gdk/Makefile.am (DIST_SUBDIRS) nanox/*: cvs remove nanox;
	it can be retrieved from the repository; it is too far
	from functional to be worth having people check out;
	it would be easier to start from scratch, I suspect.

	* gdk/x11/gdkpixmap-x11.c: Fix lvalue usage of GDK_PIXMAP_XID().

	* gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c
	gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c:
	Fix some accidentally global variables and unused global variables.

	* gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c
	gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c:
	Fix some accidentally global variables and unused global variables.

      Add some space for future expansion to multihead.

	* gdk/gdkdrawable.h: Add four reserved function pointers
	for future expansion of GdkDrawableClass.

	* gtk/gtkwindow.h gtk/gtkinvisible.h: Add reserved pointer
	where we can put a GdkScreen * later.
2001-09-07 21:50:20 +00:00
Matthias Clasen
d8e3d58d42 gdk/x11/gdkkeys-x11.c (get_direction): Don't call g_strcasecmp on NULL strings. (#59058) 2001-09-07 11:43:20 +00:00
Owen Taylor
ec8444ed3a Set current serial so that we don't eternally update the keymap after we
Sun Sep  2 21:41:21 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkkeys-x11.c (update_keymaps): Set current serial
	so that we don't eternally update the keymap after we
	get a change notification.

	* gtk/gtkmenuitem.c (gtk_menu_item_set_right_justified): Fix
	incorrect cast.
2001-09-03 01:43:53 +00:00
Havoc Pennington
9df0074685 add default icon
2001-08-28  Havoc Pennington  <hp@pobox.com>

	* demos/gtk-demo/main.c (setup_default_icon): add default icon

	* gtk/gtkradiobutton.c (gtk_radio_button_new_with_mnemonic):
	warning fix
	(gtk_radio_button_new_with_label): warning fix

	* gtk/gtkdnd.c: used some random GtkImage private structs,
	update to reflect GtkImage changes

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): don't check
	whether the hint is supported, just always set the icon. A task
	list might want to use it even if the WM doesn't, and the WM may
	change over time. Also, XDeleteProperty() if list == NULL.

	* gtk/gtkwindow.c (gtk_window_set_icon_list)
	(gtk_window_get_icon_list)
	(gtk_window_set_icon)
	(gtk_window_get_icon)
	(gtk_window_set_default_icon_list)
	(gtk_window_get_default_icon_list):
	new functions

	* gtk/gtk-boxed.defs (GtkIconSet): add GtkIconSet

	* gtk/gtkimage.c: Implement property support, bug #59408

	* gtk/gtkcontainer.c (gtk_container_add): make the warning message
	on reparent-without-removing-first a bit more helpful.
	Let's just destroy this FAQ.
2001-08-29 02:20:02 +00:00
Havoc Pennington
eae09f4d83 remove gtk_menu_* compat defines; these are already in gtkmenu.h, and the
2001-08-24  Havoc Pennington  <hp@pobox.com>

	* gtk/gtkcompat.h: remove gtk_menu_* compat defines;
	these are already in gtkmenu.h, and the copies
	here were broken.

	Also, change GTK_DISABLE_COMPAT_H to GTK_DISABLE_DEPRECATED

	* gdk/gdkpixbuf-drawable.c (gdk_pixbuf_get_from_image):
	special-case bitmaps to allow no colormap
	(bitmap1): implement no-colormap bitmap-getting
	(bitmap1a): implement no-colormap bitmap-getting to pixbuf with
	alpha
	(rgb8): indentation
	(rgb1a, rgb1): change the way we read the data out of the image,
	old way didn't seem to work quite right.

	I'm pretty sure a lot of the rgbconvert code is still broken.

	* gtk/gtkwindow.c (gtk_window_move_resize): move hints comparison
	above position constraint (I really intended to do this before,
	don't know what's up with that)
	(gtk_XParseGeometry): shut up gcc

	* gdk/gdkpixbuf-drawable.c (rgb1a): fix bug where "x1" was used
	and "0" should have been. remove the attempted 4-bytes-at-once
	optimization, it was totally broken.
2001-08-26 02:03:10 +00:00
Owen Taylor
a2d60d44b1 [ Patch from Sebastian Wilhelmi, 52790 ]
Wed Aug 22 19:15:39 2001  Owen Taylor  <otaylor@redhat.com>

	[ Patch from Sebastian Wilhelmi, 52790 ]

	* gtk/gtkversion.h.in gtk/gtk.h: New file replacing gtkcompat.h

	* gdk/gdkcompat.h gdk/gdk*.h gtk/gtkcompat.h.in gtk/gtk*.h:
	Move compatibility macros from g[dt]kcompat.h to within
	#ifndef G[DT]K_DISABLE_DEPRECATED in each file.

	* gdk/gdk-pixbuf-csource.c: Fix up include of gtkcompat.h.

	* demos/Makefile.am demos/gtk-demo/Makefile.am
          docs/reference/gdk-pixbuf/Makefile.am modules/input/Makefile.am
          tests/Makefile.am: Remove references to -G[DT]K_DISABLE_DEPRECATED.

	* demos/{pixbuf-demo.c,testpixbuf-drawable.c,testpixbuf-save.c,
                 testpixbuf.c}: Fix usages of deprecated functions.
2001-08-23 15:26:49 +00:00
Hans Breuer
f34e996b5f updated externals
2001-08-18  Hans Breuer  <hans@breuer.org>

	* gdk/gdk.def : updated externals

	* gdk/win32/gdkselection-win32.c : returning TRUE with gdk_selection_set
	is required to get (at least) visible in entry fields. Some selections
	are really handled now - even on win32 - but copying via middle
	mouse button into a different app needs to wait ...

	* gdk/win32/gdkdnd-win32.c : implemented inter-app drag&drop
	mostly by stealling code from gdkdnd-fb.c. Thanks to who ever wrote it!

	* gdk/win32/gdkevents-win32.c : some tweaking to get better expose
	handling. I'm not sure if it is better now, but at least not worse

	* gdk/win32/gdkgeometry-win32.c : replaced every call to MoveWindow
	with SetWindowPos () which allows more fine-tuning backing-store wise

	* gdk/win32/gdkwindow-win32.c : allow unraised gdk_window_show ().
	Also changed move/resize to be more like the X version.

	* gtk/gtk.def : updated externals
2001-08-19 18:34:59 +00:00
Matthias Clasen
370046c735 gtk/docs/debugging.txt, gdk/gdk.c, gdk/gdkinternals.h,
gdk/x11/gdkmain-x11.c, gtk/gtkdebug.h, gtk/gtkmain.c: Update
debugging info, remove unused debug flags. (#58330)
2001-08-15 06:52:19 +00:00
Hans Breuer
0b5db507da coalescing property notifies
2001-08-11  Hans Breuer  <hans@breuer.org>

	* gtk/gtkalignment.c, gtk/gtkarrow.c, gtk/gtkaspectframe.c,
	  gtk/gtkcellrenderer.c, gtk/gtkcellrenderertext.c,
	  gtk/gtkcombo.c, gtk/gtkcurve.c, gtk/gtkfontsel.c,
	  gtk/gtklayout.c, gtk/gtkmisc.c, gtk/gtkpacker.c,
	  gtk/gtkprogress.c, gtk/gtkruler.c,, gtk/gtksettings.c,
	  gtk/gtkspinbutton.c, gtk/gtktexttag.c : coalescing property notifies

	* gtk/gtkclist.c, gtk/gtktipsquery.c, gtk/gtktexttag.c,
	  gtk/gtkwidget.c : added G_SIGNAL_TYPE_STATIC_SCOPE to all
	GDK_TYPE_EVENT signals

	* gtk/gtkalignment.c : removed 'direct allocation bug',
	which Tim discovered while reading the patch
2001-08-11 20:27:36 +00:00
Havoc Pennington
f37a0627fc fix a typo.
2001-08-07  Havoc Pennington  <hp@pobox.com>

	* gtk/gtkfilesel.c (open_ref_dir): fix a typo.

	* gtk/gtkplug.c (gtk_plug_init): remove setting of auto_shrink;
	some fixage is needed here, but nothing simple. Owen understands
	it. ;-)

        * gtk/gtkwindow.h, gtk/gtkwindow.c: Rework code and API for window
	sizing and positioning.  Also, fix bug in compute_geometry_hints
	(width/height confusion for setting min size).
	(gtk_window_move): new function
	(gtk_window_resize): new function
	(gtk_window_get_size): new function
	(gtk_window_get_position): new function
	(gtk_window_parse_geometry): new function

 	* gtk/gtkwidget.c (gtk_widget_set_size_request): new function
 	(gtk_widget_get_size_request): new function
 	(gtk_widget_get_usize): delete, that was a short-lived function
 	;-)
 	(gtk_widget_set_usize): deprecate
 	(gtk_widget_set_uposition): deprecate, make it a trivial
	gtk_window_move() wrapper
	(gtk_widget_class_init): remove x/y/width/height properties,
	add width_request height_request

        * demos/*: update to avoid deprecated functions

	* gtk/gtklayout.c: add x/y child properties

	* gtk/gtkfixed.c: add x/y child properties, and get rid of
	uses of "gint16"

	* tests/testgtk.c (create_window_sizing): lots of tweaks to window
	sizing test

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Ensure that
	configure events on toplevel windows are always in root window
	coordinates, following ICCCM spec that all synthetic events
	are in root window coords already, while real events are
	in parent window coords. Previously the code assumed that
	coords of 0,0 were parent window coords, which was
	really broken.

 	* gtk/gtkcontainer.c (gtk_container_get_focus_chain): fix
 	warning

 	* gdk/gdkwindow.h (GdkWindowHints): add GDK_HINT_USER_POS
 	and GDK_HINT_USER_SIZE so we can set USSize and USPosition
 	hints in gtk_window_parse_geometry()

 	* gdk/x11/gdkwindow-x11.c (gdk_window_set_geometry_hints): support
 	new USER_POS USER_SIZE hints
2001-08-10 03:46:08 +00:00
Matthias Clasen
6dd7f04620 gdk/gdkgc.c (gdk_gc_set_rgb_bg_color): Set the background color,
not the foreground color. (#57621)
2001-08-09 07:14:56 +00:00