Commit Graph

368 Commits

Author SHA1 Message Date
Matthias Clasen
83c626bbe0 Remove dubious bitfields of unspecified signedness. (#112919, Morten
2003-05-27  Matthias Clasen  <maclas@gmx.de>

	* io-wbmp.c: Remove dubious bitfields of
	unspecified signedness.  (#112919, Morten Welinder)gdk-p

	* gdk-pixdata.c (gdk_pixdata_to_csource): Replace all occurances
	of g_string_new ("") by g_string_new (NULL). (#106975, Morten Welinder)

	* gtk/gtkwindow-decorate.c:
	* gtk/gtktreeprivate.h:
	* gtk/gtkdnd.c:
	* gdk/win32/gdkwindow-win32.h:
	* gdk/linux-fb/gdkprivate-fb.h:
	* gdk/linux-fb/gdkkeyboard-fb.c: Remove dubious bitfields of
	unspecified signedness.  (#112919, Morten Welinder)

	* gtk/queryimmodules.c (escape_string):
	* gtk/gtktextbtree.c (_gtk_text_btree_get_text):
	* gtk/gtksettings.c (_gtk_settings_parse_convert):
	* gtk/gtkrc.c (gtk_rc_parse_assignment):
	* gtk/gtkinputdialog.c (gtk_input_dialog_set_key):
	* gdk/x11/gdkdisplay-x11.c (escape_for_xmessage): Replace all
	occurances of g_string_new ("") by g_string_new (NULL). (#106975,
	Morten Welinder)
2003-05-27 21:21:00 +00:00
Owen Taylor
629a0e1424 Patch from James Henstridge to update to automake-1.7 (#109542)
Tue May  6 16:50:52 2003  Owen Taylor  <otaylor@redhat.com>

        Patch from James Henstridge to update to automake-1.7
        (#109542)

        * autogen.sh: update to call newer tools.

        * configure.in: various updates, to use M4 macros to put
        variables that change each release at the top.
        Use AC_HELP_STRING to format help strings.
        Use AC_CONFIG_COMMANDS to generate gdkconfig.h.

        * Makefile.am: require Automake 1.7.  Remove gdk-2.0.pc and
        gtk+-2.0.pc on uninstall.  Pass --enable-gtk-doc to configure
        during distcheck.

        * docs/reference/*/Makefile.am: simplify to use the gtk-doc.make
        makefile fragment.

        * */Makefile.am: don't use STRIP_BEGIN/STRIP_END.
        Use BUILT_SOURCES where appropriate.
        Build generated files in builddir rather than srcdir.
        Fix uninstall and distclean targets to satisfy distcheck.

        ===

        * gdk/*/Makefile.am: Remove the hacks to get gdkenumtypes.h
        built first, since we are now using BUILT_SOURCES.

        * gdk/Makefile.am: Remove an outdated comment about gdk_headers.

        * demos/gtk-demo/Makefile.am: Fix srcdir != buildd problem
        with geninclude.pl.

        * configure.in: Update versions to 2.3.0.
2003-05-06 21:55:41 +00:00
Tor Lillqvist
2e58122c79 Fix for #110165 (thanks to Arnaud Charlet):
2003-05-06  Tor Lillqvist  <tml@iki.fi>

	Fix for #110165 (thanks to Arnaud Charlet):

	* gdk/win32/gdkevents-win32.c (build_keypress_event,
	build_keyrelease_event): For unshifted control char, use
	lowercase ASCII keyval.
	(gdk_event_translate): Similarily, when handling WM_SYSKEYDOWN and
	UP (i.e. Alt-something), if it's an unshifted ASCII letter, use
	lowercase keyval. Use build_key_event_state() here, too, instead
	of minor code duplication.
2003-05-06 21:44:55 +00:00
Tor Lillqvist
935dca854e Use the signed GET_X_LPARAM() and GET_Y_LPARAM() to extract x and y
2003-03-14  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c: Use the signed GET_X_LPARAM() and
	GET_Y_LPARAM() to extract x and y coordinates from an LPARAM or
	DWORD, and not the unsigned HIWORD() and LOWORD(). Systems with
	multiple monitors can have negative coordinates on some of the
	monitors. (partial fix for #99496, Arnaud Charlet)
2003-03-15 00:02:42 +00:00
Tor Lillqvist
b2698b3a58 On WM_MOUSEMOVE, the test whether we have actually moved (and thus
2003-03-13  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): On
	WM_MOUSEMOVE, the test whether we have actually moved (and thus
	shouldn't generate an GDK event) moved after the call to
	propagate() and translate_mouse_coords(). Otherwise we were
	testing wrong values. (#108115, Allin Cottrell)
	(gdk_event_translate): On WM_?BUTTONUP, set current_{x,y} the same
	way as in WM_?BUTTONDOWN and WM_MOUSEMOVE.
2003-03-13 01:44:27 +00:00
Tor Lillqvist
1e072f625c if a grab cursor is used, must copy the HCURSOR with CopyCursor(), as it
2003-03-13  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (gdk_pointer_grab): if a grab cursor
	is used, must copy the HCURSOR with CopyCursor(), as it is OK to
	destroy the GdkCursor after calling gdk_pointer_grab(). Set the
	cursor right away with SetCursor(), as we won't get any
	WM_SETCURSOR messages while the mouse is captured.
	(gdk_display_pointer_ungrab): Correspondingly, destroy the copy
	with DestroyCursor() when no longer used. (#108114, Allin Cottrell)

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): On
	WM_SYSCHAR, return FALSE from the window procedure to prevent the
	DefWindowProc from being called. Otherwise Windows would beep,
	thinking you are tring to access a (nonexistent) menu when you
	press Alt-something. Don't do this for Alt-Space,
	though. (#107454, Martyn Russell)

	* gdk/win32/gdkcursor-win32.c: Minor spacing and debug print fixes.
2003-03-13 00:57:14 +00:00
Tor Lillqvist
ae90aab7ff Don't try to compensate for LineTo() not drawing the end pixel. It causes
2003-03-09  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdrawable-win32.c (draw_segments): Don't try to
	compensate for LineTo() not drawing the end pixel. It causes more
	harm than benefits, see bug #81895.
2003-03-09 17:15:48 +00:00
Matthias Clasen
3db24eb81c Bug #107664 continued:
2003-03-08  Matthias Clasen  <maclas@gmx.de>

	Bug #107664 continued:

	* gdk/x11/gdkinputprivate.h:
	* gdk/x11/gdkinput-none.c (_gdk_input_window_none_event): Remove.
	(_gdk_input_other_event): Return gboolean.
	* gdk/x11/gdkinput-xfree.c (_gdk_input_window_none_event): Remove.
	(_gdk_input_other_event): Return gboolean.
	* gdk/x11/gdkinput-x11.c (_gdk_input_common_other_event): Return gboolean.

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Make return_val
	gboolean, remove pointless call to _gdk_input_window_none_event.

	* gdk/win32/gdkinput-win32.[hc] (_gdk_input_other_event): Return gboolean.
	(_gdk_input_window_none_event): Remove.

	* gtk/gtktextiter.c (_gtk_text_iter_get_indexable_segment):
	(_gtk_text_iter_get_any_segment):
	(_gtk_text_iter_get_segment_byte):
	(_gtk_text_iter_get_segment_char):
	(_gtk_text_iter_get_text_line):
	(_gtk_text_iter_get_btree): Fix 0/NULL confusion.
	* gdk/x11/gdkdnd-x11.c (motif_target_table_check): Return gint.
	* gdk/win32/gdkfont-win32.c (gdk_font_equal):
	* gdk/linux-fb/gdkwindow-fb.c (gdk_window_get_deskrelative_origin):
	(gdk_window_get_origin):
	* gdk/linux-fb/gdkcolor-fb.c (gdk_colors_alloc): Fix 0/FALSE confusion.
2003-03-08 21:11:39 +00:00
Matthias Clasen
d03b2741ad Trivial cleanups (bug #107664) 2003-03-08 20:49:00 +00:00
Tor Lillqvist
ec9429b84d Merge from stable:
2003-02-01  Tor Lillqvist  <tml@iki.fi>

	Merge from stable:

	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_foreign_new_for_display,
	gdk_pixmap_lookup, gdk_pixmap_lookup_for_display): Implement.
	(#104108, Naofumi Yasufuku)

	* gdk/gdk.def: Export the above. Export
	gdk_screen_get_system_visual, noticed by Ed Woods.
2003-02-01 21:05:09 +00:00
Tor Lillqvist
d867b9a8df Merge from stable:
2003-01-19  Tor Lillqvist  <tml@iki.fi>

	Merge from stable:

	Fix for #103614 and some other problems with GtkFileSelection on
	Windows:

	* gtk/fnmatch.c (get_char): Need to use g_unichar_tolower(), not
	g_ascii_tolower(). Windows file names are case-insensitive for all
	Unicode letters.

	* gtk/gtkfilesel.c: Instead of checking for G_OS_WIN32 or
	G_WITH_CYGWIN, check G_PLATFORM_WIN32. Move inclusion of gtkintl.h
	earlier, as it includes config.h unconditionally, and gtkprivate.h
	redefines GTK_LOCALEDIR.
	(struct _CompletionDirSent): Ifdef out the fields not used on
	Windows.
	(compare_utf8_filenames, compare_sys_filenames): Need different
	comparison implementation for UTF-8 file names and system locale
	file names on Win32. Cannot simply use g_ascii_strcasecmp(), but
	need to casefold all Unicode letters.
	(cmpl_completion_matches, open_dir, correct_parent): Ifdef out
	variables not used on Win32 to avoid warnings about unused
	variables.
	(open_ref_dir): Use g_path_skip_root() to skip past potential
	drive letter in front of the leading (back)slash.
	(open_new_dir): Ifdef out use of CompletionDirSent fields not
	there on Win32.
	(correct_parent): Bypass inode check also on Cygwin.

	Fix bug noticed by Alex Shaduri: Tooltips and other
	GDK_WINDOW_TEMP windows were activated. This looked very odd, and
	was a regression from earlier versions.

	* gdk/win32/gdkwindow-win32.c (show_window_internal): Fine-tune
	behaviour. Don't ever activate GDK_WINDOW_TEMP windows.
	(gdk_window_move, gdk_window_resize): Add debug logging.

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): When we get a
	WM_SIZE message for a non-visible (withdrawn) window, don't clear
	the GDK_WINDOW_STATE_WITHDRAWN bit. The window is still withdrawn
	even if its size changes.
2003-01-19 21:18:15 +00:00
Tor Lillqvist
4a3c812b7d Merge from stable:
2003-01-12  Tor Lillqvist  <tml@iki.fi>

	Merge from stable:

	* gtk/gtkmain.c: Move inclusion of config.h and gtkintl.h earlier,
	as gtkprivate.h redefines GTK_LOCALEDIR on Win32, for run-time
	lookup.

	* gdk/Makefile.am (libgdk_win32_2_0_la_DEPENDENCIES): Depend on
	gdk.def.

	* gdk/gdk.def
	* gtk/gtk.def: Add some missing entries. Thanks to Kenichi SUTO.

	* gtk-zip.sh.in (DEVZIP): Add bin/{gtk-query-immodules-2.0,
	gtk-demo}.exe and share/gtk-2.0.

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_skip_taskbar_hint):
	Implement by setting or clearing the WS_EX_TOOLWINDOW extended
	window style.
	(gdk_window_set_type_hint): Add all cases to the switch (not all
	do anything, though). Handle GDK_WINDOW_TYPE_HINT_TOOLBAR by
	calling gdk_window_set_skip_taskbar_hint(). This means that GTK
	won't know that the skip_taskbar hint is on for the window, is
	this bad?
2003-01-12 04:44:23 +00:00
Tor Lillqvist
0973b993f2 Use correct DLL and import library names, with GTK_API_VERSION in name,
2003-01-05  Tor Lillqvist  <tml@iki.fi>

	* gtk-zip.sh.in: Use correct DLL and import library names, with
	GTK_API_VERSION in name, not GTK_MAJOR_VERSION.GTK_MINOR_VERSION.
	(DEVZIP): Add gdk-pixbuf-query-loaders.exe.

	* configure.in: Improve check for dimm.h.

	* configure.in: Set SOEXT to 'so' on Unix, 'dll' on Win32. Used in
	gdk-pixbuf/Makefile.am.

	* gdk-pixbuf/makefile.mingw.in
	* gdk-pixbuf/pixops/makefile.mingw.in
	* gdk/makefile.mingw.in
	* gdk/win32/makefile.mingw.in
	* gtk/makefile.mingw.in: Remove. Not maintained anyway.

	* gdk-pixbuf/Makefile.am
	* gdk-pixbuf/pixops/Makefile.am
	* gdk/Makefile.am
	* gdk/win32/Makefile.am
	* gtk/Makefile.am
	* configure.in: Remove makefile.mingw{,.in} from here, too.

	* README.win32: Updates. Don't mention the now removed
	makefile.mingw files.

	* gdk/gdk.def
	* gtk/gtk.def: Add a couple of missing entries.

	* gdk/gdkkeynames.c: Include <string.h> for strcmp() and memcpy().

	* gdk/win32/gdkevents-win32.c: Move dimm.h header clash workaround
	earlier.

	* gdk/win32/rc/Makefile.am: Add hack to help
	build/win32/lt-compile-resource decide which kind of libtool
	object file to produce.
2003-01-05 02:24:15 +00:00
Tor Lillqvist
eee70b8153 Move the code that sets the window style and extended window style, and
2002-12-21  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c (gdk_window_new): Move the code that
	sets the window style and extended window style, and adjusts the
	width and height to take the window decorations into account
	earlier. The adjusted width and height used to be ignored. Remove
	the local x, y, width and height variables, no need to further
	confuse the code by having local copies. (Partial fix, I hope, for
	#101588)

	(gdk_window_move): When moving top-level windows, take title bar
	and border width into account, offsetting the coordinates before
	calling SetWindowPos().

	(gdk_window_set_decorations, gdk_window_set_functions):
	Reimplement, taking into account the peculiar semantics of
	GDK_DECOR_ALL and GDK_FUNC_ALL. (#79036)

	(gdk_window_get_decorations): Implement. (#98981)

	(gdk_window_set_type_hint): When setting
	GDK_WINDOW_TYPE_HINT_MENU, call	gdk_window_set_decorations().
	(#79036)

	* gdk/gdk.def: Add gdk_window_get_decorations. (#98981)
2002-12-21 23:32:20 +00:00
Tor Lillqvist
7ed6dc1da8 Minor cosmetics.
2002-12-17  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkglobals-win32.c: Minor cosmetics.

	Implement two missing functions (#101369)

	* gdk/win32/gdkevents-win32.c
	(gdk_display_add_client_message_filter): Implement by calling
	gdk_add_client_message_filter(), no separate displays on Windows,
	at least not yet.

	* gdk/win32/gdkgc-win32.c (gdk_gc_get_screen): Implement by
	returning the only screen so far, _gdk_screen.
2002-12-17 01:39:11 +00:00
Matthias Clasen
8ba71578f2 Use g_printf instead of system printf. (#99327)
2002-12-15  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcalendar.c:
	* gtk/gtkfilesel.c:
	* gtk/gtkfontsel.c:
	* gtk/gtkhruler.c:
	* gtk/gtkinputdialog.c:
	* gtk/gtkprogress.c:
	* gtk/gtktreemodel.c:
	* gtk/gtkvruler.c:
	* gtk/queryimmodules.c:
	* gtk/theme-bits/decompose-bits.c:
	* gdk-pixbuf/gdk-pixbuf-csource.c:
	* gdk-pixbuf/make-inline-pixbuf.c:
	* gdk-pixbuf/queryloaders.c:
	* gdk/gdkkeynames.c:
	* gdk/gdkrgb.c:
	* gdk/linux-fb/gdkfbmanager.c:
	* gdk/win32/gdkevents-win32.c:
	* gdk/win32/gdkmain-win32.c:
	* gdk/win32/gdkproperty-win32.c:
	* gdk/x11/gdkmain-x11.c: Use g_printf instead of system
	printf.  (#99327)
2002-12-15 01:49:01 +00:00
Tor Lillqvist
5fc015b4e9 gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new, gdk_bitmap_create_from_data,
2002-12-11  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new,
	gdk_bitmap_create_from_data, gdk_pixmap_create_from_data)
	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkimage-win32.c (_gdk_win32_setup_pixmap_image):
	Functions now take a GdkDrawable instead of GdkWindow parameter,
	like in X11 and linux-fb backends (#100780)

	* gdk/win32/gdkwindow-win32.c (get_default_title): Do use
	g_get_application_name() (I now have a fresh enough GLib).
2002-12-11 23:04:39 +00:00
Tor Lillqvist
af9b53fc58 Merge from stable:
2002-12-09  Tor Lillqvist  <tml@iki.fi>

	Merge from stable:

	* gdk/win32/gdkdrawable-win32.c (generic_draw): Don't leak
	stipple_gc. More checks for errors. Use correct ternary ROP when
	blitting the foreground into the tile pixmap onto those pixels
	where the stipple is set. (I didn't notice that I had used the
	wrong one, as it didn't matter on Win2k, where DIB sections
	apparently are zeroed upon creation. But on Win98 they have random
	initial contents. Thanks to Hans Breuer for reporting this.)
	(gdk_win32_draw_rectangle, gdk_win32_draw_arc,
	gdk_win32_draw_polygon): Don't pass the LINE_ATTRIBUTES bits to
	generic_draw() if drawing a filled figure.

	* gdk/win32/gdkmain-win32.c (_gdk_win32_print_dc): Minor cosmetics.
	(_gdk_win32_gcvalues_mask_to_string): Initialize buffer as empty.
	(_gdk_win32_window_state_to_string): New debugging output helper
	function.

	* gdk/win32/gdkevents-win32.c: Minor debugging output changes.
	(gdk_event_translate): Ignore the WM_SHOWWINDOW/SW_OTHERUNZOOM or
	SW_OTHERZOOM messages. Do not generate a GDK_UNMAP event for
	WM_SIZE/SIZE_MINIMIZED messages, they do not really corrspond to
	unmapping on X11. Set window state correctly for all three of
	SIZE_{MINIMIZED,MAXIMIZED,RESTORED}. A maximized and then iconified
	("minimized" in Windows terminology) window still has the
	"maximized" property, i.e. when deiconified, it will reappear as
	maximized. (#10557)

	* gdk/win32/gdkprivate-win32.h: Declare new function.
	(WIN32_API_FAILED, WIN32_GDI_FAILED, OTHER_API_FAILED): Don't use
	__PRETTY_FUNCTION__ if __GNUC__ >= 3, to avoid warning message.

	* gdk/win32/gdkwindow-win32.c (show_window_internal): Handle more
	situations. Add parameter to tell whether deiconifying. Code
	reorg: Return early when appropriate instead of using nested if
	statements. If just deiconifying without raising, restore active
	window. (#10557)

	(gdk_window_hide, gdk_window_withdraw, gdk_window_iconify,
	gdk_window_deiconify, gdk_window_maximize, gdk_window_unmaximize,
	gdk_window_focus): Use _gdk_win32_window_state_to_string() in
	debugging output.

	(gdk_window_iconify): Restore active window after calling
	ShowWindow(). Otherwise the "next" window gets activated.

	(gdk_window_stick, gdk_window_unstick): Don't output any warnings.

	(gdk_window_set_transient_for): Rewrite. Just call SetWindowLong()
	with GWL_HWNDPARENT, which despite its name sets the *owner*
	window, which should be exactly what we want. The PSDK
	documentation is said to be misleading. testgtk's modal window
	test now works much better. (#50586)
2002-12-09 00:43:42 +00:00
Eric Warmenhoven
9310fe538f Fix gdkenumtypes.h hack
Thu Dec  5 16:01:14 2002  Eric Warmenhoven <eric@warmenhoven.org>

	* gdk/{linux-fb,win32}/Makefile.am: Fix gdkenumtypes.h hack
2002-12-06 00:12:53 +00:00
Owen Taylor
a1f5e821bf Fixes from #98358, Havoc Pennington.
Mon Nov 25 17:44:09 2002  Owen Taylor  <otaylor@redhat.com>

        Fixes from #98358, Havoc Pennington.

        * gdk/{x11,win32,linux-fb}/gdkcolor-*.c (gdk_colormap_finalize):
        Free the private structure.

        * gdk/x11,win32,linxu-fb}/gdkscreen-*.c (gdk_screen_set_default_colormap):
          gdk/x11/gdkwindow-x11.c (_gdk_windowing_window_init):
        Keep a ref to the default colormap.

        * gdk/x11/gdkscreen-x11.c (gdk_screen_x11_dispose): Unref
        the default colormap.

        * gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_set_colormap):
        Handle the CMAP == NULL case even when the window is
        destroyed.

        * gdk/x11/gdkwindow-x11.c (_gdk_windowing_window_init):
        Add a missing ref for the system colormap.
2002-11-25 22:52:36 +00:00
Tor Lillqvist
8c782e730d Enclose in #ifdef G_ENABLE_DEBUG, as they use functions only available
2002-11-25  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (print_event_state,
	print_window_state, print_event): Enclose in #ifdef
	G_ENABLE_DEBUG, as they use functions only available with
	G_ENABLE_DEBUG, and are called only when G_ENABLE_DEBUG. (#99494,
	Arnaud Charlet)
2002-11-25 22:17:46 +00:00
Tor Lillqvist
08fc500e8d Merge from stable:
2002-11-24  Tor Lillqvist  <tml@iki.fi>

	Merge from stable:

	Implement tiles and stipples for all drawing methids (except the
	deprecated draw_text() and draw_text_wc()).

	* gdk/win32/gdkdrawable-win32.c: Remove the already ifdeffed-out
	code that didn't use generic_draw().

	(generic_draw): When drawing into the mask (for tiled/stippled
	fill styles), copy the line attributes from the actual GC. Also
	ask for text drawing setup if needed. Use differently set up HDCs
	in the normal and tiled/stippled cases.

	(draw_lines, gdk_win32_draw_lines, draw_polygon,
	gdk_win32_draw_polygon, draw_segments, gdk_win32_draw_segments,
	draw_arc, gdk_win32_draw_arc): Use generic_draw(), thus
	implementing tiled and stippled fill styles for lines, polygons,
	segments, and args.

	(gdk_win32_draw_points): Use Rectangle() instead of
	SetPixel(). Rectangle() uses the function (raster op) set for the
	HDC, SetPixel() doesn't.

	(widen_bounds): New function, refactoring.

	* gdk/win32/gdkgc-win32.c: Remove ifdeffed-out code.

	(predraw_set_foreground, gdk_win32_hdc_get): Some code moved
	around. Call SetROP2() only if necessary. Call SetTextColor() only
	if GDK_GC_FOREGROUND flag present. Don't handle
	GDK_OPAQUE_STIPPLED here, has been superseded by the code in
	generic_draw(). Always create a solid brush.

	Remove background color handling from here. The background color
	of a GdkGC is supposed to affect only GDK_OPAQUE_STIPPLED fill
	style, which it is already handled in generic_draw(), and
	GDK_LINE_DOUBLE_DASH lines, which aren't implemented properly
	anyway. Calling SetBkColor() is unnecessary as we always use
	TRANSPARENT text output.

	(gdk_win32_hdc_get, gdk_win32_hdc_release): Add doc comments, as
	these are public functions.

	* gdk/win32/gdkevents-win32.c (synthesize_expose_events): Don't
	synthesize expose events for GDK_INPUT_ONLY windows.
	(gdk_event_translate): On WM_SIZE, call
	gdk_synthesize_window_state() if window was iconified, restored or
	maximized. (#98983, Arnaud Charlet)

	* gtk+/gdk/win32/gdkwindow-win32.c
	(gdk_window_get_frame_extents): Fix typo in setting y.  (#98983,
	Arnaud Charlet)
2002-11-24 23:54:01 +00:00
Tor Lillqvist
36a56b08e5 Add missing entries, needed by gtk.
2002-11-16  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdk.def: Add missing entries, needed by gtk.

	* gdk/win32/gdkcolor-win32.c (gdk_screen_get_system_colormap):
	Remove g_return_val_if_fail call. This function is called from
	gdk_display_open() with the _gdk_screen it just created, but when
	gdk_screen_get_default() still returns NULL.

	* gdk/win32/gdkdisplay-win32.c
	* gdk/win32/gdkscreen-win32.c: Make more like the linux-fb
	versions. For instance, don't call
	gdk_display_manager_set_default_display() from gdk_display_open().

	* gdk/win32/gdkglobals-win32.c: Move _gdk_display, _gdk_screen and
	_gdk_parent_root here.

	* gdk/win32/gdkinput.c (gdk_display_list_devices): New function.

	* gdk/win32/gdkmain-win32.c (gdk_get_display): New function.

	* gdk/win32/gdkvisual-win32.c (gdk_screen_get_system_visual):
	Don't require that the screen parameter is non-NULL. It can be,
	and the linux-fb version doesn't check either.

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_skip_taskbar_hint,
	gdk_window_set_skip_pager_hint, gdk_window_fullscreen,
	gdk_window_unfullscreen): Implement as no-ops.
2002-11-16 21:51:47 +00:00
Tor Lillqvist
fda3e29611 Reflect recent renamings and removals of functions.
2002-11-15  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdk.def: Reflect recent renamings and removals of functions.

	Merge from stable:

	Start implementing all fill styles (i.e. tiled, stippled, and
	opaque stippled in addition to the plain solid style) in the Win32
	backend in an elegant and generic way. For now only did the
	draw_rectangle() and draw_glyphs() methods. The rest will
	follow. Previously some of the drawing methods implemented opaque
	stippling, but not tiles or non-opaque stippling.

	Seems to work fine, now the check marks show up in check buttons,
	the stippled background and stippled text in gtk-demo's Text
	Widget look as they should, and GtkText's line wrap arrow shows
	correctly instead of an ugly rectangle. [This refers to the stable
	branch, haven't actually checked HEAD.]

	The implementation does do a lot of pixmap handling and blitting
	back and forth, especially on Win9x. But performance is hopefully
	not an issue. I don't think many applications do a lot of tiled or
	stippled drawing.

	* gdk/win32/gdkprivate-win32.h: Define a new macro, GDI_CALL, that
	calls a GDI function and prints a warning if it failed. Also
	API_CALL for non-GDI calls. Cleans all the the if (!BlaBla())
	WIN32_GDI_FAILED ("BlaBla") snippets, these can now be written
	GDI_CALL (BlaBla, ()). Declare new functions.

	* gdk/win32/gdkdrawable-win32.c: Use GDI_CALL macro in lots of places.

	(generic_draw): New function that handles all the blitting
	necessary to implement tiles and stipples. A function that
	actually draws stuff is passed as a parameter to
	generic_draw(). If the fill style is solid, it is called
	directly, to draw on the destination drawable. Otherwise it is
	called to draw on a temporary mask bitmap, which then is used in
	blitting operations. The tiles and/or stipples are rendered into
	another temporary pixmap. If MaskBlt() is available (on NT/2k/XP),
	it is used, otherwise a sequence of BitBlt() is used to do the
	final composition onto the destination drawable.

	(draw_tiles_lowlevel, draw_tiles): Some renaming and code
	reorg. Use BitBlt() to blit each tile, not gdk_draw_drawable().

	(rop2_to_rop3): New function, does binary->ternary rop mapping.

	(blit_from_pixmap, blit_inside_window, blit_from_window): Use
	rop2_to_rop3(). Previously used SRCCOPY always...

	(draw_rectangle, gdk_win32_draw_rectangle, draw_glyphs,
	gdk_win32_draw_glyphs): Split functionality into two functions,
	with generic_draw() doing its magic inbetween.

	* gdk/win32/gdkevents-win32.c: Remove the TrackMouseEvent code, it
	was ifdeffed out and wouldn't have done anything even if
	enabled. Remove the GDK_EVENT_FUNC_FROM_WINDOW_PROC code, didn't
	have any effect any more anyway after all the changes GTK+ has
	gone through in the last years. Remove some #if 0 code.

	* gdk/win32/gdkgc-win32.c (gdk_gc_copy): Set the copy's hdc field
	to NULL in case a GC is copied while it has a Windows DC active.

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c: Remove gdk_event_func_from_window_proc.

	* gdk/win32/gdkmain-win32.c: Remove -event-func-from-window-proc
	option. If there is a PRETEND_WIN9X envvar, set windows_version as
	if on Win9x.

	* gdk/win32/gdkpixmap-win32.c (_gdk_win32_pixmap_new,
	gdk_pixmap_new): Combine these two, _gdk_win32_pixmap_new() wasn't
	used or exported. Make a bit more like the X11 version. Hopefully
	I didn't break the fragile palettized display ("pseudocolor")
	code.

	* gdk/win32/gdkgc-win32.c: Various debugging output improvements.

	(predraw_set_foreground): Check whether
	tile/stipple origins are valid when calling SetBrushOrgEx().

	(gdk_win32_hdc_get): Ifdef out code that tries to handle the
	stipple by converting it into a region, and combining the clip
	region with that. A stipple shouldn't work like that, it should
	replicate in x and y directions. Stipples are now handled by
	generic_draw() in gdkdrawable-win32.c.

	* gdk/win32/gdkmain-win32.c: (gdk_win32_gcvalues_mask_to_string,
	gdk_win32_rop2_to_string): New debugging functions.

	(gdk_win32_print_dc): Print also DC's rop2 and text color.
2002-11-16 01:12:10 +00:00
Owen Taylor
af2d862517 Try a different hack to force gdkenumtypes.h to be updated before building
Fri Nov  8 18:04:16 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/{linux-fb,win32,11}/Makefile.am: Try a different
        hack to force gdkenumtypes.h to be updated before
        building the subdir, last hack caused contents
        to be rebuilt on every make.
2002-11-14 06:07:46 +00:00
Tor Lillqvist
e96a41be45 gdk/win32/gdkprivate-win32.h Rename all global variables and functions to
2002-11-12  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/*.c: Rename all global variables and functions to
	start with underscore.

	Merge from stable:

	More work on the Win32 backend. The cause of some scrolling
	problems was that SetWindowPos() and ScrollWindowEx() don't blit
	those parts of the window they think are invalid. As we didn't
	keep Windows's update region in synch with GDK's, Windows thought
	those areas that in fact had been updated were invalid. Calling
	ValidateRgn() in _gdk_windowing_window_queue_antiexpose() seems to
	be an elegant and efficient solution, removing from Windows's
	update region those areas we are about to repaint proactively.

	In some cases garbage leftover values were used for the clip
	origin in GdkGCWin32. This showed up as odd blank areas around the
	pixmaps included in the Text Widget in gtk-demo.

	Having the clip region either as a GdkRegion or a HRGN in
	GdkGCWin32 was unnecessary, it's better to just use a HRGN.

	The translation and antiexpose queue handling in
	gdkgeometry-win32.c seems unnecessary (and not implementable in
	the same way as on X11 anyway, no serial numbers) on Windows,
	ifdeffed out.

	Don't (try to) do guffaw scrolling as there is no static window
	gravity on Windows. Guffaw scrolling would be unnecessary anyway,
	as there is the ScrollWindow() API. This improves the behaviour of
	the Text Widget demo in gtk-demo a lot. But I have no idea how the
	lack of static win gravity should be handled in other places where
	the X11 code uses it. Especially _gdk_window_move_resize_child().

	There is still some problem in expose handling. By moving an
	obscuring window back and forth over testgtk's main window, for
	instance, every now and then you typically get narrow vertical or
	horizontal strips of pixels that haven't been properly redrawn
	after being exposed. A fencepost error somewhere?

	Otherwise, all of testgtk and gtk-demo except "big windows" now
	seem to work pretty well.

	Bug #79720 should be fixed now.

	* gdk/win32/gdkcolor-win32.c (gdk_win32_color_to_string,
	gdk_win32_print_paletteentries, gdk_win32_print_system_palette,
	gdk_win32_print_hpalette)
	* gdk/win32/gdkdrawable-win32.c (gdk_win32_drawable_description)
	* gdk/win32/gdkevents-win32.c (gdk_win32_message_name):
	Move all debugging helper functions to gdkmain-win32.c.

	* gdk/win32/gdkdrawable-win32.c (_gdk_win32_draw_tiles):
	Rewrite. Make static. Must take tile origin parameters, too.

	(gdk_win32_draw_rectangle): Pass the tile/stipple origin to
	_gdk_win32_draw_tiles(). Remove #if 0 code.

	(blit_inside_window): Don't call ScrollDC(), that didn't work at
	all like I thought. A simple call to BitBlt() is enough.

	* gdk/win32/gdkevents-win32.c (gdk_event_translate) Remove unused
	latin_locale_loaded variable.

	(_gdk_win32_get_next_tick): New function. Used to make sure
	timestamps of events are always increasing, both in events
	generated from the window procedure and in events gotten via
	PeekMessage(). Not sure whether this is actually useful, but it
	seemed as a good idea.

	(real_window_procedure): Don't use a local GdkEventPrivate
	variable. Don't attempt any compression of configure or expose
	events here, handled elsewhere.

	(erase_background): Accumulate window offsets when traversing up
	the parent chain for GDK_PARENT_RELATIVE_BG, in order to get
	correct alignment of background pixmaps. Don't fill with
	BLACK_BRUSH if GDK_NO_BG.

	(gdk_event_get_graphics_expose): A bit more verbose debugging output.

	(gdk_event_translate): Use _gdk_win32_get_next_tick(). In the
	WM_PAINT handler, don't check for empty update rect. When we get a
	WM_PAINT, the update region isn't empty. And if it for some
	strange reason is, that will be handled later anyway. Call
	GetUpdateRgn() before calling BeginPaint() and EndPaint() (which
	empty the update region).

	* gdk/win32/gdkdnd-win32.c
	* gdk/win32/gdkinput-win32.c:
	Use _gdk_win32_get_next_tick().

	* gdk/win32/gdkfont-win32.c: Use %p to print HFONTs.

	(gdk_text_size): Remove, unused.

	* gdk/win32/gdkgc-win32.c:  Set clip origins to zero
	when appropriate.

	(gdk_gc_copy): Increase refcount on colormap if present.

	(gdk_win32_hdc_get): Handle just hcliprgn. If we have a stipple,
	combine it with clip region after selecting into the DC.

	(_gdk_win32_bitmap_to_hrgn): Rename from _gdk_win32_bitmap_to_region.

	(_gdk_win3_gdkregion_to_hrgn): New function, code snippet
	extracted from gdk_win32_hdc_get().

	* gdk/win32/gdkgeometry-win32.c: Ifdef out the translate_queue
	handling.

	(gdk_window_copy_area_scroll): Increase clipRect to avoid
	ScrollWindowEx() not scrolling pixels it thinks are invalid.
	Scroll also children with the ScrollWindowEx() call. No need to
	call gdk_window_move() on the children.

	(gdk_window_scroll): Don't do guffaw scrolling.

	(gdk_window_compute_position): Fix typo, used win32_y where x was
	intended.

	(gdk_window_premove, gdk_window_postmove,
	gdk_window_clip_changed): Add debugging output.

	(_gdk_windowing_window_queue_antiexpose): Just call ValidateRgn()
	on the region.

	(_gdk_window_process_expose): No use for the serial number
	parameter now. Instead of a rectangle, take a region parameter, as
	Windows gives us one in WM_PAINT.

	* gdk/win32/gdkmain-win32.c (_gdk_win32_lbstyle_to_string,
	_gdk_win32_pstype_to_string, _gdk_win32_psstyle_to_string,
	_gdk_win32_psendcap_to_string, _gdk_win32_psjoin_to_string,
	_gdk_win32_rect_to_string, _gdk_win32_gdkrectangle_to_string,
	_gdk_win32_gdkregion_to_string): New debugging functions.

	(static_printf): Helper function for the above. sprintfs into a
	static circular buffer, return value should be used "soon".

	* gdk/win32/gdkwindow-win32.c (gdk_propagate_shapes): Plug memory
	leak, free list after use.

	(gdk_window_gravity_works): Remove, we know that there is no such
	thing on Windows.

	(gdk_window_set_static_bit_gravity,
	gdk_window_set_static_win_gravity): Ditto, remove, they didn't do
	anything anyway.

	(_gdk_windowing_window_init, gdk_window_foreign_new): Call
	_gdk_window_init_position() like in the X11 backend.

	(gdk_window_reparent): Don't call the now nonexistent
	gdk_window_set_static_win_gravity(). No idea what should be done
	instead.

	(gdk_window_get_geometry): The returned x and y should be relative
	to parent. Used to be always zero..

	(gdk_window_set_static_gravities): Return FALSE if trying to set
	static gravity.

	* gdk/win32/gdkprivate-win32.h: Drop the clip_region field from
	GdkGCWin32. Only use the HRGN hcliprgn. Declare new
	functions.

	* gdk/win32/*.c: Use new debugging functions.

	* gdk/win32/rc/gdk.rc.in: Update copyright year.
2002-11-12 22:17:48 +00:00
Owen Taylor
85c6465ec5 Add in a awful hack to force gdkenumtypes.h to be updated before building
Fri Nov  8 18:04:16 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/{linux-fb,win32,11}/Makefile.am: Add in a awful
        hack to force gdkenumtypes.h to be updated before
        building the subdir. (#86587)
2002-11-08 23:14:53 +00:00
Owen Taylor
accc3a3365 Add startup notification hooks - mostly based on patch by Havoc Pennington
Sat Nov  2 00:22:33 2002  Owen Taylor  <otaylor@redhat.com>

        Add startup notification hooks - mostly based on patch
        by Havoc Pennington in #96772.

        * gdk/gdk.h gdk/x11/gdkdisplay-x11.c
        gdk/{win32,linux-fb}/gdkmain-*.c: (gdk_notify_startup_complete):
        new function that indicates an application has finished starting
        up.

        * gdk/x11/gdkmain-x11.c gdk/x11/gdkdisplay-x11.c
        (_gdk_windowing_set_default_display): store value of
        DESKTOP_STARTUP_ID on the default screen, and clear it from the
        environment.

        * gdk/x11/gdkdisplay-x11.c:
        Set _NET_STARTUP_ID hint on display's group leader window.

        * gtk/gtkwindow.c (gtk_window_set_auto_startup_notification):
        function to toggle whether we automatically broadcast that we've
        started up, after mapping the first toplevel window.
        (gtk_window_map): call gdk_screen_notify_startup_complete() by
        default, unless enabled by above.

        * gtk/gtkmain.c gtk/gtkcombo.c gtk/gtktoolbar.c:
        Couple of warning fixes.
2002-11-02 05:37:04 +00:00
Owen Taylor
550bf181d2 Add a --screen option for setting the default screen. (Based on a patch
Thu Oct 31 12:40:39 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdk.[ch] gdk/gdkglobals.c gdk/gdkinternals.h
        gdk/{x11,win32,linux-fb}/gdkscreen-{x11,win32,linux-fb}.c:
        Add a --screen option for setting the default screen.
        (Based on a patch from Balamurali Viswanathan, #81145)

        * gdk/gdk.c gdkdisplay.h gtk/gtkmain.c: Add
        gdk_display_open_default_libgtk_only(), so gtk_init_check()
        and gdk_init_check() can share the same behavior w.r.t.
        --screen.

        * gdk/gdk.[ch]: Make gdk_get_display_arg_name() G_CONST_RETURN.

        * gdk/x11/gdkselection-x11.c (gdk_selection_property_get):
        Suppress a spurious warning.

        * tests/testgtkrc: Remove someleft-over commented out
        includes that could be confusing.
2002-10-31 21:12:23 +00:00
Tor Lillqvist
ae26d02476 Don't call GetWindowLong for GWL_EXSTYLE, the extended window style wasn't
2002-10-28  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_decorations,
	gdk_window_set_functions): Don't call GetWindowLong for
	GWL_EXSTYLE, the extended window style wasn't used or
	changed. After setting the window style with SetWindowLong, call
	SetWindowPos with the SWP_FRAMECHANGED flag for the window to
	actually be updated, as Platform SDK docs say one should. (#95812,
	huzheng)
2002-10-28 20:48:40 +00:00
Matthias Clasen
1a4c94b90b Fix doc comment.
* gdk/x11/gdkcursor-x11.c: Fix doc comment.

	* gdk/gdkdnd.c: Add missing includes.
2002-10-25 00:01:15 +00:00
Matthias Clasen
5cc215cddf Remove redundant doc comments. 2002-10-23 21:03:35 +00:00
Owen Taylor
209fd4cc5d Make 'filled' arguments for draw_arc/polygon/rectangle gboolean not gint.
Wed Oct 16 14:32:43 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkdrawable.h gdk/gdkdraw.c gdk/gdkpixmap.c
        gdk/gdkwindow.c gdk/x11/gdkdrawable-x11.c
        gdk/win32/gdkdrawable-win32.c gdk/linux-fb/gdkdrawable-fb2.c
        gdk/linux-fb/gdkprivate-fb.h:
        Make 'filled' arguments for draw_arc/polygon/rectangle
        gboolean not gint. (#94976)
2002-10-16 18:41:42 +00:00
Owen Taylor
f3f016d045 Add gdk_drag_find_window_for_screen(), so that we can interpret x_root /
Mon Oct  7 15:48:44 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkdnd.[ch] gdk/x11/gdkdnd-x11.c: Add
        gdk_drag_find_window_for_screen(), so that we can
        interpret x_root / y_root relative to the correct screen.

        * gdk/gdkdnd.c Makefile.am gdk/x11/gdkdnd-x11.c
        gdk/fb/gdkdnd-fb.c gdk/win32/gdkdnd-win32.c: New file.
        Move gdk_drag_find_window(), gdk_drag_get_protocol() here.

        * gtk/gtkdnd.c: Handle drags between screens; use
        a fallback icon for icons set as windows/pixmaps,
        move the drag icon between displays for icons set as
        pixbufs.

        * gdk/x11/gdkkeys-x11.c (update_keymaps): Fix infinite
        loop from last change.
2002-10-07 20:03:15 +00:00
Owen Taylor
253458ec52 - Replace GdkPointerHooks with a multihead-safe GdkDisplayPointerHooks,
Mon Oct  7 15:10:00 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkdisplay.[ch] gdk/gdkinternals.h
        gdk/gdkwindow.[ch] gdk/linux-fb/gdkwindow-fb.c
        gdk/win32/gdkwindow-win32.c gdk/x11/gdkwindow-x11.c:

        - Replace GdkPointerHooks with a multihead-safe
          GdkDisplayPointerHooks, leave GdkPointerHooks
          around for singlehead.
        - Add gdk_display_get_pointer() to get the pointer
          location with the screen it is on.

        * gdk/gdk.def gdk/gdkdisplay.[ch] gdk/gdkscreen.[ch]:
        Change gdk_screen_get_window_at_pointer() to
        gdk_display_get_window_at_pointer().

        * gtk/gtktreeview.c demos/gtk-demo/changedisplay.c
        tests/testgtk.c: Use gdk_display_get_window_at_pointer(),
        not gdk_screen_get_window_at_pointer().

        * gtk/gtkcolorsel.c: Fix grabbing color to be multihead
        safe.

        * gtk/gtkwidget.c: Allow gtk_widget_push_colormap (NULL).
        since it is useful for writing code that doesn't
        know the dcurrent state but needs a clean colormap.

        * gtk/gtkrc.c: When loading the settings for a particular
        screen, only reset toplevels on that screen.

        * gtk/gtkiconfactory.h: Fix #ifdef GTK_MULTIHEAD_SAFE
        that should have been #ifndef GTK_MULTIHEAD_SAFE.
2002-10-07 19:42:49 +00:00
Bill Haneman
4494b086fd gdk_image_get_pixel, gdk_image_put_pixel: Fixed sense of bounds checks. 2002-10-07 15:16:06 +00:00
Owen Taylor
ef33adff83 Add a 'type' parameter, make public.
Thu Oct  3 14:13:33 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkevents.c (gdk_event_new): Add a 'type'
        parameter, make public.

        * gdk/gdkevents.c (gdk_event_copy): Copy the screen.

        * gdk/gdkevents.c gdk/linux-fb/gdkmain-fb.c
        gdk/x11/gdkevents-x11.c gdk/win32/gdkevents-win32.c:
        _gdk_event_new() => gdk_event_new().

        * gdk/win32/gdkevents-win32.c (real_window_procedure):
        Fix event_private->screen breakage that results from evil
        encapsulation breakage here.

        * gtk/gtkclist.c gtk/gtkcombo.c gtk/gtkcontainer.c
        gtk/gtkdialog.c gtk/gtkdnd.c gtk/gtkdrawingarea.c
        gtk/gtkimcontextsimple.c gtk/gtklist.c gtk/gtkmenu.c
        gtk/gtknotebook.c gtk/gtkplug.c gtk/gtkselection.c
        gtk/gtktext.c gtk/gtktreeitem.c gtk/gtktreeview.c
        gtk/gtkviewport.c gtk/gtkwindow-decorate.c gtk/gtkwindow.c
        tests/testgtk.c: Remove most usage of stack-allocated
        GdkEvent structures.

        * gtk/gtktreeview.c: Use a cut-and-paste of the full
        send_focus_event() from gtkwindow.c that does the necessary
        notification of the ::has-focus property and setting of
        the HAS_FOCUS flag.x

        * gtk/gtkdnd.c: Clean up some mess/duplicated code; removing
        an extraneous use of a GdkEvent.
2002-10-03 20:53:30 +00:00
Tor Lillqvist
6b20187e0d Set image->windowing_data to NULL, unref the image. (Late merge from
2002-09-30  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_impl_win32_finalize):
	Set image->windowing_data to NULL, unref the image. (Late merge
	from stable.)
2002-09-30 20:33:24 +00:00
Owen Taylor
2d385b9bb6 Set the client ID on all displays. (#85713)
Mon Sep 30 15:31:57 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkdisplay.c gdk/x11/gdkdisplay-x11.c
        gdk/gdkinternals.h: Set the client ID on all
        displays. (#85713)

        * gdk/gdkdisplay.h gkd/gdkinternals.h
         gdk/{linux-fb,win32,x11}/gdkmain-{fb,win32,x11}.c
        Privatize gdk_display_set_sm_client_id().
2002-09-30 19:38:12 +00:00
Eric Warmenhoven
393ad7381e Move gdk_keval_name and gdk_keyval_from_name to new gdkkeynames.c, share
Fri Sep 27 14:30:34 2002 Eric Warmenhoven <eric@warmenhoven.org>

	* gdk/Makefile.am gdk/gdkkeynames.c gdk/linux-fb/gdkmain-fb.c
	gdk/win32/gdkkeys-win32.c: Move gdk_keval_name and
	gdk_keyval_from_name to new gdkkeynames.c, share implementation for
	linux-fb and win32 (#94123)

	* gdk/linux-fb/Makefile.am gdk/linux-fb/gdkkeyboard-fb.c
	gdk/linux-fb/gdkmain-fb.c gdk/linux-fb/gdkmouse-fb.c: add
	-DG_DISABLE_DEPRECATED and -DGDK_PIXBUF_DISABLE_DEPRECATED to compile
	flags

	* gdk/linux-fb/gdkdisplay-fb.c: prevent segfault if display can't
	initialize

	* gdk/linux-fb/gdkkeyboard-fb.c: better parsing of keycodes

	* gdk/linux-fb/gdkwindow-fb.c: add stubs for new functions
2002-09-27 21:36:11 +00:00
Owen Taylor
d41f210d6b Add gdk_screen_make_display_name(), which returns a display name that can
Wed Sep 25 10:51:24 2002  Owen Taylor  <otaylor@redhat.com>
        * gdk/gdkscreen.h gdk/{x11,win32,linux-fb}/gdkscreen-*.c:
        Add gdk_screen_make_display_name(), which returns a
        display name that can be used to open a display with the
        screen as the default (Based on patch from Mark McLoughlin,
        #86013)
2002-09-25 15:07:47 +00:00
Manish Singh
234e191c1c add -DG_DISABLE_DEPRECATED and -DGDK_PIXBUF_DISABLE_DEPRECATED to compile
Wed Sep 25 00:16:53 2002  Manish Singh  <yosh@gimp.org>

        * gdk/Makefile.am gdk/x11/Makefile.am: add -DG_DISABLE_DEPRECATED
        and -DGDK_PIXBUF_DISABLE_DEPRECATED to compile flags

        * gdk/gdkcolor.c gdk/gdkdisplay.c gdk/gdkdraw.c gdk/gdkevents.c
        gdk/gdkgc.c gdk/gdkimage.c gdk/gdkpango.c gdk/gdkpixbuf-render.c
        gdk/gdkpixmap.c gdk/gdkrgb.c gdk/gdkwindow.c gdk/linux-fb/gdkdnd-fb.c
        gdk/linux-fb/gdkfont-fb.c gdk/win32/gdkdnd-win32.c
        gdk/win32/gdkfont-win32.c gdk/x11/gdkdisplay-x11.c gdk/x11/gdkdnd-x11.c
        gdk/x11/gdkdrawable-x11.c gdk/x11/gdkevents-x11.c gdk/x11/gdkfont-x11.c
        gdk/x11/gdkgc-x11.c gdk/x11/gdkgeometry-x11.c gdk/x11/gdkim-x11.c
        gdk/x11/gdkinput-x11.c gdk/x11/gdkkeys-x11.c gdk/x11/gdkscreen-x11.c
        gdk/x11/gdkwindow-x11.c: Deprecation cleanup, mostly changing
        gdk_foo_{ref,unref} to g_object equivalents.
2002-09-25 07:23:55 +00:00
Tor Lillqvist
e53e9652a5 Merge from gtk-2-0:
2002-09-25  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate):
	WM_SYSKEYDOWN, WM_SYSKEYUP: Need to handle F10 specially here in
	order to be able to handle it normally in the application. Set
	ignore_wm_char also always when handling WM_SYSKEY{DOWN,UP}, this
	way we can generate GDK events also for Alt-Fn keys, for instance.
2002-09-24 21:53:19 +00:00
Owen Taylor
c2aa25d703 gdk/win32/gdkimage-win32.c gdk/x11/gdkimage-x11.c Add bounds-checking
Tue Sep 24 16:24:22 2002  Owen Taylor  <otaylor@redhat.com>
        * gdk/win32/gdkimage-win32.c gdk/x11/gdkimage-x11.c
        * gdk/linux-fb/gdkimage-fb.c (gdk_image_put/get_pixel):
        Add bounds-checking g_return_if_fail(). (Olexiy Avramchenko)
2002-09-24 20:29:28 +00:00
Owen Taylor
50fdb4d7ba Change the window parameter for
Tue Sep 24 05:26:31 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdk.h gdk/gdkdisplay.c gdk/linux-fb/gdkevents-fb.c
        gdk/x11/gdkevents-x11.c  gdk/win32/gdkevents-win32.c:
        Change the window parameter for
        gdk_event_send_client_message[_for_display] from guint32
        to GdkNativeWindow. (#79979)
2002-09-24 09:53:25 +00:00
Tor Lillqvist
d0cac48203 Copy from X11 backend. The old version mishandled consecutive newlines.
2002-09-21  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkselection-win32.c (sanitize_utf8): Copy from X11
	backend. The old version mishandled consecutive newlines.

	* tests/testgtkrc: Remove obsolete mention of gtk-engines and
	Pixmap theme engine on Win32.
2002-09-21 12:59:31 +00:00
Tor Lillqvist
d8a4962708 Delete leftover declarations of the obsolete Win32-only functions
2002-09-20  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdkfont.h: Delete leftover declarations of the obsolete
	Win32-only functions gdk_font_full_name_get() and
	gdk_font_full_name_free().

	* gdk/gdk.def: Delete from here, too.

	* gdk/win32/gdkfont-win32.c (logfont_to_xlfd,
	gdk_font_full_name_get, gdk_font_full_name_free): Delete
	implementation, and helper functions.

	(pattern_match, InnerEnumFontFamExProc, EnumFontFamExProc,
	gdk_font_list_new, gdk_font_list_free): Delete unused functions.

	(gdk_text_width, gdk_text_width_wc) Instead of code duplication,
	let gdk_text_extents() and gdk_text_extents_wc() do the job.

	* gdk/win32/gdkgc-win32.c (gdk_win32_gc_values_to_win32values):
	Don't use the above removed functions in debugging output.

	* gdk/win32/gdkdisplay-win32.c
	* gdk/win32/gdkmain-win32.c
	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkselection-win32.c
	* gdk/win32/gdkinput-win32.h
	* gdk/win32/gdkinput.c: Make it compile again, pass a GdkDisplay in
	a couple of places.
2002-09-19 23:27:10 +00:00
Tor Lillqvist
3e58667f6b Merge from gtk-2-0:
2002-09-12  Tor Lillqvist  <tml@iki.fi>

	Merge from gtk-2-0:

	* gdk/win32/gdkkeys-win32.c (print_keysym_tab): Factor out
	debugging output to new function.
2002-09-11 21:55:48 +00:00
Tor Lillqvist
0db4000945 Merge from gtk-1-3-win32-production and gtk-2-0:
2002-09-12  Tor Lillqvist  <tml@iki.fi>

	Merge from gtk-1-3-win32-production and gtk-2-0:

	* gdk/win32/gdkinput-win32.c (gdk_input_init): Use
	GetSystemMetrics (SM_C[XY]SCREEN) instead of
	gdk_screen_{width,height}().

	* gdk/win32/gdkselection-win32.c (gdk_selection_convert): Don't
	use return value from GlobalSize() as length of string when
	calling MultiByteToWideChar(). Pass -1 instead (zero-terminated
	string). Thanks to Iwasa Kazmi.
2002-09-11 21:51:59 +00:00
Tor Lillqvist
f713eb82bf Use correct function name in warning messages.
2002-09-12  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkinput-win32.c (gdk_input_wintab_init): Use correct
	function name in warning messages.
2002-09-11 21:23:44 +00:00
Tor Lillqvist
c06ae8c21a Merge from gtk-2-0:
2002-09-12  Tor Lillqvist  <tml@iki.fi>

	Merge from gtk-2-0:

	* gdk/win32/gdkgeometry-win32.c: Add GDK_NOTE debugging output
	to some functions, related to moving and resizing and expose
	and antiexpose queue processing. Use %p to output HWNDs.

	Tentative fix for #79720 based on code by Florent Duguet:

	* gdk/win32/gdkgeometry-win32 (gdk_window_queue_append): New
	static function. Checks length of translate_queue, calls
	_gdk_window_process_expose() if length is >= 128. Then appends
	to translate_queue.
	(gdk_window_queue_translation,_gdk_windowing_window_queue_antiexpose):
	Call gdk_window_queue_append().
2002-09-11 21:20:11 +00:00
Tor Lillqvist
1acfb9ae12 Merge from gtk-2-0:
2002-09-12  Tor Lillqvist  <tml@iki.fi>

	Merge from gtk-2-0:

	* gdk/win32/gdkevents-win32.c: Some spacing and indentation cleanup.

	* gdk/win32/gdkevents-win32.c (_gdk_events_init): Search if the
	system has some input locale identifier that uses a Latin
	keyboard. This is needed to be able to get the virtual-key code
	for the latin characters corresponding to ASCII control
	characters. If no such keyboard is present, try to load one
	then. Will this upset users with no wish to ever use a Latin-based
	keyboard layout?

	(vk_from_char): Convert all ASCII control chars to the
	corresponding uppercase char before calling VkKeyScanEx(). Idea by
	Florent Duguet. Makes Control-C work again. To make it hopefully
	work like I think it should on non-Latin keyboards, too, use
	latin_locale when looking for the corresponding keycode.

	Fix for #81831 by Tim Evans:

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Don't call
	_gdk_event_button_generate() here, it would append the double- or
	triple-click events too early, before the single-click event.

	(real_window_procedure): If we got a single-click event, call
	_gdk_event_button_generate() to perhaps append the double- or
	triple-click event after that.

	Merge from gtk-1-3-win32-production branch:

	* gdk/win32/gdkevents-win32.c (propagate): Check for parent being
	NULL before trying to propagate to it, and return FALSE in that
	case. (If parent is NULL, we are handling gdk_parent_root, and
	probably should have noticed that and bailed out earlier. But
	better late than never.)
2002-09-11 20:59:04 +00:00
Tor Lillqvist
86a90abf97 Merge from gtk-2-0:
2002-09-12  Tor Lillqvist  <tml@iki.fi>

	Merge from gtk-2-0:

	* gdk/win32/gdkdrawable-win32.c (render_line_horizontal,
	render_line_vertical): Some spacing cleanup. Return TRUE.
2002-09-11 20:51:05 +00:00
Tor Lillqvist
41590bea09 Use HWND_NOTOPMOST instead of HWND_TOPMOST. Suggested by Florent Duguet.
2002-09-05  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_transient_for):
	Use HWND_NOTOPMOST instead of HWND_TOPMOST. Suggested by Florent
	Duguet.
2002-09-04 21:45:38 +00:00
Tor Lillqvist
234acfd024 Fix braino, actually do check each char, not just the first one, when
2002-09-05  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkproperty-win32.c (gdk_property_change): Fix braino,
	actually do check each char, not just the first one, when looping
	through the text looking to insert CR in front of each LF. Bug
	noticed and fix provided by Florent Duguet.
2002-09-04 21:14:37 +00:00
Tor Lillqvist
a0c80fcc67 On Cygwin, open /dev/windows instead of using the magic G_WIN32_MSG_HANDLE
2002-08-31  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (_gdk_events_init): On Cygwin, open
	/dev/windows instead of using the magic G_WIN32_MSG_HANDLE fd that
	is implemented (in GLib) only on native Win32. (#91683, Masahiro
	Sakai)
2002-08-31 18:06:02 +00:00
Tor Lillqvist
eab30a1223 Use MAX_PATH (from windef.h) insted of _MAX_PATH (from stdlib.h in mingw
2002-08-26  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c (RegisterGdkClass): Use MAX_PATH
	(from windef.h) insted of _MAX_PATH (from stdlib.h in mingw and
	MSVC, but not there in Cygwin) (#91681, Masahiro Sakai).
2002-08-26 20:00:36 +00:00
Tor Lillqvist
a1b14ffa7f gdk/gdkevents.c gdk/gdkinternals.h gdk/x11/gdkevents-x11.c Move the
2002-08-25  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdkevents.c
	* gdk/gdkinternals.h
	* gdk/x11/gdkevents-x11.c
	* gdk/win32/gdkevents-win32.c: Move the GdkEventPrivate and
	GdkEventFlags definitions from gdkevents.c to
	gdkinternals.h. Remove the duplicated definitions in
	gdkevents-x11.c and gdkevents-win32.c. (#89771)
2002-08-24 22:03:46 +00:00
Tor Lillqvist
6b5240ed0f Let the system handle Alt-Space, too. Thanks to Tim Evans (#91477).
2002-08-24  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Let the
	system handle Alt-Space, too. Thanks to Tim Evans (#91477).
2002-08-24 20:26:59 +00:00
Owen Taylor
b7c0c06b8e Fix args to pango_x_shutdown_display().
Fri Aug  2 15:56:47 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkscreen-x11.c (gdk_screen_x11_dispose): Fix
        args to pango_x_shutdown_display().

        * gdk/linux-fb/gdkinput.c gdk/linux-fb/gdkinputprivate.h
        gdk/win32/gdkinput-win32.[ch] gdk/win32/gdkinput.c
        gdk/win32/gdkwindow-win32.c gdk/x11/gdkinput-x11.c
        gdk/x11/gdkinput-xfree.c gdk/x11/gdkinput.c
        gdk/x11/gdkinputprivate.h gdk/x11/gdkwindow-x11.c: Move
        a bunch of functions gdk_input => _gdk_input. Clean
        up some header file cruft. (#79971)
2002-08-02 20:22:49 +00:00
Owen Taylor
e5ae081ebe Start implementing display/screen closing scheme; keep a flag for whether
Thu Aug  1 11:26:03 2002  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkdisplay.[ch] gdk/gdkscreen.[ch] gdkinternals.h:
	Start implementing display/screen closing scheme; keep a
	flag for whether displays and screens are closed,
	call g_object_run_dispose(). Remove public gdk_screen_close().

	* gdk/x11/gdkdisplay-x11.c gdk/x11/gdkscreen-x11.c: Add
	dispose() methods; move appropriate parts of the finalize
	there.

	* gdk/x11/gdkcolor-x11.c gdk/x11/gdkimage-x11.c
	gdk/x11/gdkmain-x11.c gdk/x11/gdkpango-x11.c
	gdk/x11/gdkpixmap-x11.c gdk/x11/gdkproperty-x11.c
	gdk/x11/gdkselection-x11.c gdk/x11/gdkwindow-x11.c:
	Start of making everything correctly ignore operations
	when a display has been closed.

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_decorations):
	Handle decorations == NULL.

	* gdk/x11/gdkcolor-x11.c (gdk_colormap_remove):
	Remove unnecessary hash table creation.

	* gdk/x11/gdkinput.c gdk/x11/gdkinput-x11.c gdk/win32/gdkinput.c
	Fix up gdk_device_get_history - handle events, n_events == NULL,
	etc.

	* gdk/x11/gdkproperty-x11.c (gdk_property_get):
	Handle failure better.

	* gdk/x11/gdkselection-x11.c (gdk_selection_property_get):
	Handle failure better, handle data == NULL, move docs
	here, remove an excess round trip by asking for
	all selection data at once.

	* gdk/gdkselection.c gdk/win32/{x11,win32}/gdkselection-{x11,win32}.c
	  gdk/{x11,win32}/gdkmain-{x11,win32}.c	gdk/gdkdisplay.c: Move
	gdk_text_property_to_text_list(), gdk_string_to_compound_text(),
	gdk_display_set_sm_client_id() to display-independent part of GDK.

	* gdk/Makefile.am (gdk_c_sources): Sort gdkdisplay/screen.[ch]
	into the right place.
2002-08-01 15:28:40 +00:00
Sven Neumann
2f57f4684b gdk/gdk.c gdk/gdkinternals.h gdk/win32/gdkmain-win32.c pass argc and argv
2002-07-16  Sven Neumann  <sven@gimp.org>

	* gdk/gdk.c
	* gdk/gdkinternals.h
	* gdk/win32/gdkmain-win32.c
	* gdk/x11/gdkmain-x11.c: pass argc and argv to the GDK backend in
	_gdk_windowing_init() so that the backend has a chance to process
	the command-line arguments (GTK+-DirectFB needs this).
2002-07-16 16:11:49 +00:00
Owen Taylor
28c2b0a31f Renames:
Thu Jun 20 19:41:09 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkdisplay.h gdk/gdkscreen.h gdk/**.c gtk/*.c
        tests/*.c: Renames:

         gdk_get_default_display => gdk_display_get_default
         gdk_get_default_screen  => gdk_screen_get_default
         gdk_open_display        => gdk_display_open
2002-06-20 23:59:27 +00:00
Owen Taylor
5830bf89b5 Add a singleton object that we can use to get notification when displays
Thu Jun 20 16:49:00 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkdisplaymanager.[ch] gdk/gdk.[ch] gdk/gdkdisplay.c
        gdk/gdkinternals.h gdk/x11/gdkdisplay-x11.c
        gdk/win32/gdkdisplay-win32.c: Add a singleton object that
        we can use to get notification when displays
        appear / disappear or the default display changes.

        gdk_set_default_display() => gdk_display_manager_set_default_display()
        gdk_list_displays() => gdk_display_manager_list_displays().
        (#85696)

        * gdk/Makefile.am gdk/gdkmarshalers.list: Add marshaler
        generation.

        * gdk/gdkintl.h: Add this.

        * gtk/gtkmain.c: Add gtk_parse_args() that initializes
        GTK+ without opening a display.

        * gtk/gtkmain.c: Set things up so if a module
        exports gtk_module_init() and gtk_module_display_init(),
        then we treat it as multihead aware, otherwise,
        we only initialize it after the default display is set.
2002-06-20 23:29:19 +00:00
Owen Taylor
1abf7df6be Make the core pointer object per-display. (#85698)
Tue Jun 18 19:11:51 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkdisplay.[ch] gdk/gdkevents.c gdk/gdkinput.h
        gdk/gdkinternals.h gdk/win32/gdkevents-win32.c
        gdk/win32/gdkinput-win32.[ch] gdk/x11/gdkevents-x11.c
        gdk/x11/gdkinput{,-none,-x11}.c gdk/x11/gdkinputprivate.h:
        Make the core pointer object per-display. (#85698)
2002-06-18 23:23:30 +00:00
Owen Taylor
621fb7466a Replace gdk_cursor_new_for_screen() with gdk_cursor_new_for_display().
Tue Jun 18 14:41:48 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkcursor.[ch] gdk/x11/gdkcursor-x11.c
        gdk/x11/gdkprivate-x11.h gdk/win32/gdkcursor-win32.c: Replace
        gdk_cursor_new_for_screen() with gdk_cursor_new_for_display().
        (#85671)

        * gtk/gtkclist.c gtk/gtkcombo.c gtk/gtkcurve.c gtk/gtkdnd.c
        gtk/gtkentry.c gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtklabel.c
        gtk/gtkpaned.c gtk/gtktext.c gtk/gtktextview.c
        gtk/gtktipsquery.c gtk/gtktreeviewcolumn.c:
        Adapt to above change.
2002-06-18 20:59:44 +00:00
Hans Breuer
6539a7d34c added gdkdisplay and gdkscreen
2002-06-10  Hans Breuer  <hans@breuer.org>

	* gdk/makefile.msc : added gdkdisplay and gdkscreen

	* gdk/win32/gdkdisplay-win32.c (gdk_open_display) :
	need to gdk_screen_set_default_colormap(). Also un-static
	some exported gdk_display_*() functions

	* gdk/win32/gdkdrawable-win32.c : added "gdkscreen.h"

	* gdk/win32/gdkscreen-win32.c : implement
	gdk_screen_get_number, fixed typo, added rewuired headers

	[merge from 2.0.x branch, should we really manifest
	 GtkPlug as being an X11 only thing this way? See #58541]
	* gtk/gtkwindow.c (gtk_window_show): Conditionalize
	GTK_IS_PLUG() check on GDK_WINDOWING_X11. (Problem
	reported by Sven Neumann)
2002-06-10 21:58:00 +00:00
Tor Lillqvist
663ec013a4 [ merge from stable ]
2002-06-10  Tor Lillqvist  <tml@iki.fi>

	[ merge from stable ]

	* gdk/win32/gdkmain-win32.c (gdk_screen_get_width_mm,
	gdk_screen_get_height_mm): Use the "logical dpi" to calculate
	(pseudo) physical sizes. Similar to the use of "logical dpi" in
	Pango as suggested by Joaquin Cuenca Abela.

	Two fixes by Florent Duguet:

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): Correct
	semantics for setting cursor to NULL (should use cursor of parent
	window).

	* gdk/win32/gdkgc-win32.c (gdk_win32_hdc_get): Plug memory
	leak.
2002-06-10 20:27:15 +00:00
Owen Taylor
aeaaae04ac Changes multihead reorganizing code for win32 support, mostly from a patch
Wed Jun  5 18:34:47 2002  Owen Taylor  <otaylor@redhat.com>

	Changes multihead reorganizing code for win32 support,
	mostly from a patch by Hans Breuer.

	* gdk/gdkcolor.c gdk/x11/gdkcolor-x11.c gdk/gdkcursor.c
	  gdk/x11/gdkcursor-x11.c gdk/gdkevents.c gdk/x11/gdkevents-x11.c
	  gdk/gdkfont.c gdk/x11/gdkfont-x11.c gdk/gdkkeys.c
	  gdk/x11/gdkkeys-x11.c gdk/gdkimage.c gdk/x11/gdkimage-x11.c
	  gdk/gdkscreen.c gdk/x11/gdkmain-x11.c
	  gdk/gdkdisplay.c gdk/gdkevents-x11.c gdk/gdkpango.c
	  gdk/x11/gdkpango-x11.c gdk/gdkselection.c
	  gdk/x11/gdkselection-x11.c gdk/gdkwindow.c
	  gdk/x11/gdkwindow-x11.c gdk/gdkvisual.c gdk/x11/gdkvisual-x11.c:
	  Move port-independent singlehead wrapper functions into
	  port-independent part of GDK. (#80009)

	* gdk/win32/gdkcolor-win32.c gdk/win32/gdkcursor-win32.c
	  gdk/win32/gdkevents-win32.c gdk/win32/gdkfont-win32.c
	  gdk/win32/gdkimage-win32.c gdk/win32/gdkkeys-win32.c
	  gdk/win32/gdkmain-win32.c gdk/win32/gdkproperty-win32.c
	  gdk/win32/gdkselection-win32.c gdk/win32/gkwindow-win32.c:
	Turn singlehead functions into "multihead" functions that ignore
	their GdkDisplay or GdkScreen arguments.

	* gdk/win32/gdkdrawable-win32.c gdk/win32/gdkevents-win32.c
	gdk/win32/gdkinput-win32.c gdk/win32/gdkprivate-win32.h:
	Misc multihead-compatibility changes.

	* gtk/gtk.def gdk/gdk.def: Update for multihead functions.

	* gdk/gdkcolormap.h gdk/gdkvisual.h gdk/x11/gdkcolormap-x11.c
	gdk/x11/gdkvisual-x11.c: Remove the screen fields
	from the public parts of the colormap/visual structures, add accessors
	instead.

	* gdk/gdkpixbuf-render.c gdk/gdkpixmap.c gdk/gdkrgb.c
	  gdk/x11/gdkcolormap-x11.c gdk/x11/gdkimage-x11.c
	  gdk/x11/gdkimage-x11.c gdk/x11/gdkprivate-x11.h gtk/gtkgc.c
	  gtk/gtkstyle.c gtk/gtkwidget.c: Use accessors to get the screen
	for colormaps, visuals; move the fields into the private
	structures for the x11 backend.

	* gdk/gdkdisplay.[ch] gdk/x11/gdkdisplay-x11.[ch]
	  gdk/gdkscreen.[ch] gdk/x11/gdkscreen-x11.c:
	Remove virtualization of screen and display functions.
	(#79990, patch from Erwann Chenede)

	* gdk/win32/gdkdisplay-x11.c gdk/win32/gdkscreen-win32.c
	gdk/win32/{Makefile.am, makefile.msc, makefile.mingw}:
	New files containing stub implementations of Display,
	Screen functions.

	* gdk/x11/gdkscreen-x11.[ch] gdk/x11/gdkdisplay-x11.[ch]
	gdk/x11/gdkx.h: Clean up function exports and what
	headers they are in. (#79954)

	* gdk/x11/gdkx.h: Fix macro that was referring to a non-existant
	screen->screen_num. (In the patch for #79972, Erwann Chenede)

	* gdk/gdkscreen.c gdk/gdkwindow.c gdk/x11/gdkinternals.h
	 gdk/x11/gdkscreen-x11.c: Fix gdk_screen_get_window_at_pointer()
	to use window hooks. (#79972, patch partly from Erwann Chenede)

	* gdk/x11/gdkdisplay-x11.c gdk/x11/gdkevents-x11.c: Fix
	some warnings.
2002-06-06 00:26:42 +00:00
Owen Taylor
1dd8a1453f Add a sanity g_return_if_fail() check for the depths for the window and
Tue May 14 15:40:49 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkwindow-{linux-fb,win32,x11.c} (gdk_window_set_back_pixmap):        Add a sanity g_return_if_fail() check for the depths
        for the window and pixmap. (#79191, Shivaram Upadhyayula)
2002-05-14 19:45:08 +00:00
Hans Breuer
fe60d43a26 Fixed dashed line issues (#74441) to an IMO reasonable extend. That is:
2002-03-29  Hans Breuer  <hans@breuer.org>

	Fixed dashed line issues (#74441) to an IMO reasonable extend.
	That is: use PS_USERSTYLE on WinNT (the next GDI limit appears
	to be with lines width > 50); Render horizontal and vertical
	dashed lines on Win9x 'by hand'. Dotted selection rectangles
	and Dia look nice ...

	* gdk/win32/gdkprivate-win32.h : add pen_dashes pointer and
	num_pen_dashes to _GdkGCWin32
	* gdk/win32/gdkgc-win32.c : initialize pen_dashes and remove
	the guesses from dashes to windoze line styles.
	(predraw_set_forground) : always ExtCreatePen (PS_SOLID) on
	Win9x, which does not support PS_USERSTYLE.
	* gdk/win32/gdkdrawable-win32.c : new functions render_line_
	<horizontal|vertical>. Use them if not running on NT in
	gdk_win32_draw_<rectangle|segments|lines> ()

	* gdk/win32/gdkkeys-win32.c (gdk_keyval_name) : return NULL
	for keyval == 0 to avoid to have zeros in all menu entries
	without accelerator.
2002-03-28 23:25:33 +00:00
Tor Lillqvist
1ffa06c6a5 Don't clear all of the pen_style, just the PS_STYLE_MASK. Seems to fix
2002-03-22  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkgc-win32.c (gdk_win32_gc_set_dashes): Don't clear
	all of the pen_style, just the PS_STYLE_MASK. Seems to fix #74441,
	but that is just the special case of one-pixel wide one-pixel
	on-off dotted lines. To fully implement generic X11 style dashed
	lines a major rewrite would be needed.
2002-03-21 22:36:02 +00:00
Tor Lillqvist
a5eec70325 Use gdk_window_get_toplevel(), as it is the top-level windows that are
2002-03-20  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdnd-win32.c (gdk_drag_find_window): Use
	gdk_window_get_toplevel(), as it is the top-level windows that are
	registered for DND.

	* gdk/win32/gdkwin32.h: Don't include gdkinternals.h.
2002-03-19 23:16:08 +00:00
Tor Lillqvist
34c06b2b6c gdk-pixbuf/gdk_pixbuf.rc.in gdk/win32/rc/gdk.rc.in Use GTK_API_VERSION.
2002-03-06  Tor Lillqvist  <tml@iki.fi>

	* gdk-pixbuf/gdk_pixbuf.rc.in
	* gdk/win32/rc/gdk.rc.in
	* gtk/gtk-win32.rc.in: Use GTK_API_VERSION.
2002-03-06 01:50:43 +00:00
Tor Lillqvist
d0ebbe9d77 Bypass calls to the grab/ungrab functions in gdkinput-win32.c, as they
2002-03-06  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (gdk_pointer_grab,
	gdk_pointer_ungrab): Bypass calls to the grab/ungrab functions in
	gdkinput-win32.c, as they don't effectively do anything anyway.
	(build_key_event_state): Set MOD2 bit if key is in AltGr group.
	(gdk_event_translate): Call _gdk_windowing_window_get_offsets()
	each time the offsets are used, on the window they refer to,
	instead of once in the beginning. The window in question might
	change due to event propagation.
	(gdk_event_translate): Set key event group to 0 for non-AltGr
	keys. Do set the SHIFT bit in the key event state also for
	ISO_Left_Tab. Now backtabbing finally works again.

	* gdk/win32/gdkunput-win32.c: Minor debugging output change.

	* gdk/win32/gdkkeys-win32.c (update_keymap): Set VK_TAB mapping to
	Gdk_Tab and GDK_ISO_Left_Tab, like on X11.
	(gdk_keymap_translate_keyboard_state): Add similar code as in the
	non-XKB case on X11 to generate a more correct
	consumed_modifiers. Add debugging output.
	(gdk_keyval_name): Use the U+xxxx format for UCS characters
	encoded as keyvals. Never return NULL, but hex number
	representation if keyval not in table.

	* gdk/win32/gdkwindow-win32.c (gdk_window_focus): Call
	SetFocus(). Doesn't seem to have any harmful effect, and probably
	is close to what this function is supposed to do. But it didn't
	fix GtkCombo as I had hoped.
	(gdk_window_set_type_hint): Don't intern the _NET_WM_* atoms that
	weren't used and wouldn't have any meaning on Win32 anyway.
2002-03-06 00:36:08 +00:00
Owen Taylor
ec09f3ab15 Update version to 2.0.0
Tue Mar  5 15:47:54 2002  Owen Taylor  <otaylor@redhat.com>

        * configure.in test/makefile.msc **.pc.in **/*.am:
	Update version to 2.0.0

        * gtk/Makefile.am (MAINTAINERCLEANFILES): Add stamp
        files.

        * configure.in (GDK_PIXBUF_VERSION): Require GLib 2.0.0,
        Pango, Atk, 1.0.0.

        * m4macros/gtk-2.0.m4: Default to 2.0.0 as the minimum
        version.
2002-03-05 21:04:09 +00:00
Tor Lillqvist
7fee0db1f0 gdk/gdk.def Add and (trivially) implement
2002-03-03  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdk.def
	* gdk/win32/gdkevents-win32.c: Add and (trivially) implement
	gdk_pointer_grab_info_libgtk_only() and
	gdk_keyboard_grab_info_libgtk_only().

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

	* gdk/win32/gdkevents-win32.c (build_keypress_event): Reorder
	code, keyval should get a value in all cases now.
	(build_keyrelease_event): Set GDK_CONTROL_MASK here, too, if it
	was a control character produced with Alt+keypad digits.
	(gdk_event_translate): Minor cleanups to keyboard input
	handling. Still need more major work.
2002-03-02 22:49:45 +00:00
Tor Lillqvist
8beceb3846 Remove the event_mask, it is now in GdkWindowObject.
2002-03-01  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.h (struct _GdkWindowImplWin32): Remove
	the event_mask, it is now in GdkWindowObject.

	* gdk/win32/gdkwindow-win32.c: Change accordingly. Set the
	GDK_STRUCTURE_MASK in gdk_window_set_events(), as it is always set
	in gdk_window_new(), too. (Bug#72921)

	* gdk/win32/gdkevents-win32.c: Change accordingly here, too.
	(vk_from_char): New function, calculates the virtual keycode
	corresponding to the char in a WM_CHAR message.
	(build_keypress_event, build_keyrelease_event): Use it.
	(build_keypress_event): Call ImmReleaseContext() after using the
	input context. This might plug a memory or resource leak.
	(build_key_event_state): Remove #if 0 code.
	(gdk_event_translate): Actually, it would be preferrable to always
	handle just the WM_KEYDOWN and WM_KEYUP messages, not WM_CHAR at
	all, and thus drop the contorted logic with ignore_wm_char etc.

	* gdk/win32/gdkkeys-win32.c: (gdk_keymap_get_entries_for_keyval):
	Debugging output.
	(gdk_keymap_translate_keyboard_state): Return correct value. (But
	_gtk_key_hash_lookup() doesn't check the return value...)
2002-02-28 23:38:55 +00:00
Tor Lillqvist
3244b86dd6 Move bdfcursor.c from libgdk_win32_la_SOURCES to EXTRA_DIST.
2002-02-28  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/Makefile.am: Move bdfcursor.c from
	libgdk_win32_la_SOURCES to EXTRA_DIST.

	* gdk/win32/gdkgc-win32.c (gdk_win32_colormap_color_pack): In the
	bitmap case, use just the LSB of the pixel value. Does this match
	X11 semantics? Or should it be pixel!=0?
2002-02-28 00:49:36 +00:00
Owen Taylor
7ea17ce7fd ed Feb 27 19:16:50 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_new):
        * gdk/x11/gdkwindow-x11.c (gdk_window_get_events):
        * gdk/x11/gdkwindow-x11.c (gdk_window_set_events):
        * gdk/win32/gdkwindow-win32.c (gdk_window_set_events):
        * gdk/win32/gdkwindow-win32.c (gdk_window_new):
        * gdk/gdkwindow.h (struct _GdkWindowObject):
        * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_events):
        Save the window's event mask in window->event_mask.

        * gdk/gdkwindow.c (gdk_window_process_updates_internal): Only
        generate expose events if GDK_EXPOSE_MASK is included
        window->event_mask. (#54506)
2002-02-28 00:26:51 +00:00
Hans Breuer
bc94033dd3 new file
2002-02-27  Hans Breuer  <hans@breuer.org>

	* demos/gtk-demo/makefile.msc.in : new file

	* gdk-pixbuf/gtk-pixbuf.rc.in : new file to include
	  version resource
	* gdk-pixbuf/makefile.msc : create and use gdk-pixbuf.res

	* gdk/win32/gdkkeys-win32.c : handle undefined LANG_URDU,
	(gdk_keyval_name) : fix endless looping

	* gtk/gtkfilesel.c : translate_win32_path() static
	* gtk/queryimmodules : print_escaped(), query_module() static

	* gtk/makefile.msc.in : added gtkkeyhash, build gtk-win32.res

	* gtk/stock-icons/makefile.msc : regenerated from directory
	listing (almost all filenames changed)
2002-02-27 16:37:04 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Alexander Larsson
cdb59b8949 Update to the new pango win32 api.
2001-08-09  Alexander Larsson <alexl@redhat.com>

	* gdk/win32/gdkfont-win32.c:
	Update to the new pango win32 api.
2001-08-09 05:09:01 +00:00
Alexander Larsson
81cfd5c9dc Add #ifdef HAVE_WINTAB around wintab.h include.
2001-08-04 Alexander Larsson <alexl@redhat.com>

	* gdk/win32/gdkinput.c:
	Add #ifdef HAVE_WINTAB around wintab.h include.

	* gtk/gtk.def:
	Removed marshals that have been moved to glib.
	Commented out plug and socket. They didn't compile for me
	on win32.
2001-08-04 16:28:09 +00:00
Hans Breuer
afb6e60fb3 new file use it
2001-08-04  Hans Breuer  <hans@breuer.org>

	* gtk/stocks-icons/makefile.msc : new file
	* gtk/makefile.msc.in : use it

	* gtk/gtkstyle.c : not all platforms do provide M_PI and
	friends, but luckily there is G_PI

	* gtk/gtk.def : updated

	* gdk/win32/gdkwindow.c (gdk_window_new) : don't make all TEMP
	windows WS_POPUP, but only those without a parent. This fixes the
	mis-alignment between the selectable (temp, input only) window and
	the window text of GtkLabel.

	(gdk_window_show) : respect private->state when actually showing
	the window.

	(gdk_window_set_transient_for) : Implementation from Wolfgang
	Sourdeau <wolfgang@contre.com> ported to 2.0 and added some
	error handling. Should fix #50586.

	* gdk/win32/gdkevents-win32.c : beautify log output
2001-08-04 13:17:33 +00:00
Hans Breuer
da155bb731 build in the backend dir after auto-generating files
2001-07-29  Hans Breuer  <hans@breuer.org>

	* gdk/makefile.msc : build in the backend dir after
	auto-generating files

	* gdk/win32/gdkfont-win32.c (gdk_font_load) : reimplement
	with code from win32-production-branch.

	*  gdk/win32/gdkwindow-win32.c : set the private->destroyed flag
	before calling DestroyWindow, which indirectly calls
	gdk_window_destroy_notify ()

	(performance patch merged from win32-production-branch)
	* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_segments):
	Use PatBlt() instead of LineTo() when possible (solid single-pixel pen,
	R2_COPYPEN rop). It is claimed to be much faster.
2001-07-28 23:02:02 +00:00
Hans Breuer
4c5b559e04 gdk_device_get_history moved to gdk/gdkinput.c like the other backends
2001-07-20  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkinput-win32.c : gdk_device_get_history moved to
	gdk/gdkinput.c like the other backends

	* gdk/win32/gdkinput-win32.h :
	* gdk/win32/gdkinput.c :
	* gdk/win32/gdkvisual-win32.c :
	* gdk/win32/gdkwin32.h : mechanical adaption to GdkDevice and
	GdkVisual GObjectification. UNTESTED for pen-devices because
	I simply have none.

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

	* gtk/gtkiconfactory.c :
	* gtk/gtkoldeditable.c : GError *error needs to be initialized (= NULL)
	before passing &error to functions to avoid strange crashes

	* gtk/gtkcontainer.c (gtk_container_real_set_focus_child) : is static

	* gtk/gtkwidget.c (gtk_widget_get_child_visible): use g_return_val_if_fail

	* gtk/makefile.msc.in : updated
2001-07-20 18:05:33 +00:00
Owen Taylor
191e83b32a Add gdk_set_pointer_hooks() to allow pointer-querying to be hooked by an
Mon Jul  2 01:09:37 2001  Owen Taylor  <otaylor@redhat.com>

 	* gdk/gdkwindow.[ch] gdk/gdkinternals.h gdk/x11/gdkwindow-x11.c
 	gdk/linux-fb/gdkwindow-fb.c gdk/x11/gdkwindow-x11.c gdk/gdk:
 	Add gdk_set_pointer_hooks() to allow pointer-querying to
 	be hooked by an event record/playback system like GERD.
	(#56914)
2001-07-05 13:41:34 +00:00
Hans Breuer
f0ee2996e1 updated externals
2001-06-22  Hans Breuer  <hans@breuer.org>

	* gdk/gdk.def : updated externals

	* gdk/win32/gdkdrawable-win32.c : corrected some casts
	in GDK_NOTEs

	* gdk/win32/gdkevents-win32.c : use _gdk_windowing_window_get_offsets
	to translate coordinates to the internal > 16 bit system
	Try to handle WM_WINDOWPOSCHANGED to get better performance for
	when moving/resizing

	* gdk/win32/gdkkeys-win32.c : implement gdk_keymap_get_default ()
	and gdk_keymap_get_direction (). The latter is untested for
	the RTL case

	* gtk/gtk.def : updated externals

	* gtk/gtkmain.c : gtk_get_default_language () should reurn the result
	from pango_language_from_string (), not an already freed pointer

	* gtk/stock-icons/stock_menu_sort_ascending.png : PNGs need to be
	binary (-kb) to be useable on windoze
2001-06-22 14:08:51 +00:00
Hans Breuer
b5db5d514d made fil mode GDK_STIPPLED actually work -> check boxes and radio buttons
2001-05-25  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkgc-win32.c : made fil mode GDK_STIPPLED actually
	work -> check boxes and radio buttons are drawn now, even on win9x.
	Improved line settings a bit, still no clue how to get really dotted
	lines on win9x, on NT it's PS_ALTERNATE.

	* gdk/win32/gdkwindow-win32.c : use SafeAdjustWindowRect for
	GDK_HINT_MIN_SIZE as well

	* gdk/win32/makefile.am : added gdkkeys-win32.c to EXTRA_DIST

	* gtk/gtk.def : updated

	* gtk/gtktreeprivate.h : change column_drop_func to be a function
	pointer not a function pointer pointer

	* tests/testdnd.c : include <stdlib.h> for putenv prototype

	* tests/testsocket.c : made it compile on win32 again

	* tests/makefile.msc : one more test-app uses prop-editor.obj
2001-05-25 15:43:53 +00:00
Hans Breuer
1fa43ed5b4 updated exports
2001-01-06  Hans Breuer  <hans@breuer.org>

	* gdk/gdk.def : updated exports

	* gdk/win32/makefile.msc : -DGDK_ENABLE_BROKEN otherwise
	gdk won't compile anymore

	* gdk/win32/gdkevents-win32.c : initialize ret_val when
	processing GDK_FILTER functions, initialize event.key->hardware_keycode.
	Improved gdk_flush () to not only do pending drawing operations
	but also process all currently pending events. This should make
	the behaviour more similar to the X11 version.

	* gdk/win32/gdkgc-win32.c (predraw_set_background) : a background
	option needs to be set even if there is no GDK_GC_BACKGROUND.
	(gdk_win32_hdc_get) : use predraw_set_background () independent
	of value_mask. This allows to draw dashed lines leaving the original
	background intact.

	* gdk/win32/gdkimage-win32.c (gdk_image_new_bitamp) : free data
	after processing, because we can't reuse it as the X11 version does.

	* gtk/gtk.def : updated exports

	* gtk/makefile.msc.in : added ATK, removed all test apps. (I
	would like to get rid of this file again, and use straight
	makefile.msc again, as the other Gtk+ subdirs do)

	* test/makefile.msc (new file) : build the test apps here
2001-05-06 14:02:45 +00:00
Hans Breuer
eed3dbb64c updated
2001-04-14  Hans Breuer  <hans@breuer.org>

	* gdk/gdk.def :
	* gdk/makefile.msc : updated

	* gdk/win32/gdkdrawable.win32 (gdk_win32_draw_rectangle) : if modus is
	"fill with tile" do so with new helper function	gdk_win32_draw_tiles
	(the testgtk::text backgound pixmap is drawn again)
	Changed SetTextAlign before pango_win32_render to TA_BASELINE to reflect
	Win32 Pango change
	* gdk/win32/gdkprivate-win32.h : prototype for gdk_win32_draw_tiles

	* gdk/win32/gdkproperty-win32.c : first implementation of gdk_setting_get
	Not sure if the returned settings have the right unit, because I couldn't
	find any docs for the X version ...

	* gtk/gtk.def :
	* gtk/makefile.msc.in : updated
2001-04-13 23:56:19 +00:00
Hans Breuer
6ff97d2e0b disable USE_MMX for msvc build cause the assembler doesn't fit and is out
2001-03-31  Hans Breuer  <hans@breuer.org>

	* config.h.win32.in : disable USE_MMX for msvc build cause
	the assembler doesn't fit and is out of my scope. Disable
	USE_GMODULE for msvc build as wel. The right way to share
	binaries on win32 would be to use libtiff.dll etc. To reduce
	installation hassles IMO it's better to include all fileformats
	builtin to gdk-pixbuf

	* gdk-pixbuf/makefile.msc : new file

	* gdk/gdk.def : updated

	* gdk/win32/gdkevents-win32.c : don't erase the background if
	.no_bg is set. It improves the scrolling (e.g. of testgtk main
	buttons
	* gdk/win32/gdkgeometry-win32.c : added comment about the above

	* gdk/win32/gdkwindow-win32.c : added three new functions like
	the X version. Only one is implemented, because the other two
	"gdk_window_begin_(resize|move)_drag" got no docs and appear to
	be default behaviour on win32 anyway ...

	* gtk/gtk.def : updated

	* gtk/makefile.msc.in : update for new files, use glib-genmarshal
	from where it was built and add an additional rule to automagically
	build gtkmarshal.[hc]

	* gtk/gtkfilesel.c (open_new_dir) : don't increase n_entries
	before array access for the current entry isn't finished

	* gtk/gtktreeitem.c (gtk_tree_item_subtree_button_click) :
	use g_return_val_if_fail

	* gtk/testgtk.c (window_controls) : don't use the *wrong* size
	for the static array, but let the compiler calculate it. It
	makes me wonder if gcc isn't capable to catch bugs like this ...
2001-03-31 19:33:49 +00:00
Tor Lillqvist
c5f68d2527 gdk/win32/gdkdrawable-win32.c Use correct casts in debugging output.
2001-03-19  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdrawable-win32.c
	* gdk/win32/gdkimage-win32.c: Use correct casts in debugging
	output.

	* demos/testpixbuf-drawable.c: If GDK_WINDOWING_WIN32, include
	gdkwin32.h.

2001-03-19  Tor Lillqvist  <tml@iki.fi>

	* makefile.mingw.in: Handle gdk-pixbuf-marshal.c.

	* gdk_pixbuf.def: Update.

	* pixbufloader_*.def: Just export the fill_vtable functions now.
2001-03-19 19:37:59 +00:00
Tor Lillqvist
4f81f119e4 New function. print_event_state, print_event): Use preprocessor macro to
2001-03-18  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (print_window_state): New function.
	print_event_state, print_event): Use preprocessor macro to make
	code more compact. Print also GDK_WINDOW_STATE events.
	(synthesize_crossing_events): Remove the old #ifdeffed-out code.

	* gtk/gtk.def
	* gtk/makefile.mingw.in: Update.

	* gtk/gtkmain.h: Check for G_PLATFORM_WIN32, not only G_OS_WIN32,
	to catch also Cygwin.
2001-03-18 22:16:41 +00:00
Hans Breuer
0f6d1b4a27 updated
2001-03-10  Hans Breuer  <hans@breuer.org>

	* gdk/gdk.def : updated

	* gdk/win32/gdkgc-win32.c : pixmaps are visible again, due
	to offseting the clip_mask at the right place

	* gdk/win32/gdkwindow-win32.c : don't create background brushes
	for all the gdkClasses, especially not for the input_only case.
	Otherwise flickering wont be avoidable, because we don't get
	WM_ERASEBKGND message for these windows.

	* gdk/win32/gdkevents-win32.c : initialize event->expose.region
	and fixed massive redraw problems apparently triggered by Alexanders
	recent change. Not fully understood the GDK_EXPOSE / WM_PAINT handling
	but it seems to work quite well :-)

	* gdk/win32/gdkprivate-win32.h : added _gdk_window_process_expose
	prototype
2001-03-10 18:13:03 +00:00
Owen Taylor
79fed460d9 Remove old XIM code.
Wed Mar  7 20:47:41 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktext.c gtk/gtkoldeditable.[ch] gdk/gdk.[ch]
	gdk/Makefile.am gdk/x11/Makefile.am gdk/x11/gdkevents-x11.c
	gdk/x11/gdkglobals-x11.c gdk/x11/gdkprivate-x11.c
	gdk/x11/gdkx.h gdk/x11/gdkim-x11.c: Remove old XIM code.

	* gdk/win32/gdkim-win32.c gdk/linux-fb/gdkim-fb.c: Remove
	gdk_im/gdk_ic.
2001-03-09 20:28:20 +00:00
Hans Breuer
f4cd3854c5 updated
2001-03-09  Hans Breuer  <hans@breuer.org>

	* gdk/gdk.def : updated

	* gdk/win32/gdkevents-win32.c : don't ask input_only windows
	for their palette

	* gdk/win32/gdkgeometry-win32.c : reflect GdkWindowObject::mapped
	removing

	* gdk/win32/gdkwindow-win32.c : reflect GdkWindowObject::mapped
	removing and implemented Havoc's GdkWindow state functions;
	stick/unstick only as no-op, cause I don't know how to emulate
	on win32 ...

	* gtk/gtk.def : updated

	* gtk/gtkbox.c (gtk_box_get_spacing) : use g_return_val_if_fail ()

	* gtk/gtktypeutils.c : #include <string.h>

	* gtk/gtkwindow.h : declare gtk_window_set_decorated ()
2001-03-09 16:43:19 +00:00
Owen Taylor
c374cd299b Doc fixes
Sat Mar  3 16:59:16 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkpango.h gdk/x11/gdkwindow-x11.c: Doc fixes

	* gdk/win32/gdkinput.c (gdk_device_get_axis): Remove doc
	comment. Won't do to have duplicated doc comments between
	the platform subdirs.
2001-03-04 00:12:55 +00:00
Hans Breuer
75b4076d2a small (not only) portability fixes 2001-02-25 17:25:09 +00:00
Tor Lillqvist
3dcfcddf7a Update. Mention the gtk-1-3-win32-production branch.
2001-02-23  Tor Lillqvist  <tml@iki.fi>

	* README.win32: Update. Mention the gtk-1-3-win32-production
	branch.

	* gdk/win32/bdfcursor.c: New file. A program that generates
	xcursors.h. Thanks to Stefan Ondrejicka.

	* gdk/win32/xcursors.h: New file, contains the X cursor font in a
	compact format.

	* gdk/win32/Makefile.am (EXTRA_DIST): Add new files.

	* gdk/win32/gdkcursor-win32.c (_gdk_win32_data_to_wcursor): New
	function, uses xcursors.h.
	(gdk_cursor_new): Use _gdk_win32_data_to_wcursor to generate
	cursor from inline data instead of using LoadCursor() to generate
	it from a resource.

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): At button up
	event, must check the Windows message for mouse button state, as
	the GDK event state might not have been built if it is
	undelivered. Remove one goto.

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): Call
	SetCursor() if the current cursor as returned by GetCursor() is
	the window's previous cursor. The ChildWindowFromPoint() test
	apparently didn't work correctly.

	* gdk/win32/rc/*.cur: Remove.

	* gdk/win32/rc/gdk.rc.in: Remove cursors.

	* gdk/win32/rc/Makefile.am (EXTRA_DIST): Remove from here, too.

	* gtk/makefile.{mingw,msc}.in: Updates.
2001-02-23 03:51:41 +00:00
Hans Breuer
6fb6363e30 updated for win32 msvc build (forgot this before) 2001-02-19 22:02:23 +00:00
Hans Breuer
c3aba35edf updated for win32 msvc build 2001-02-19 21:54:04 +00:00
Tor Lillqvist
730a2bdc6b Remove gdkcc-win32.c from here, too.
2001-02-11  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/Makefile.am: Remove gdkcc-win32.c from here, too.
2001-02-11 11:06:59 +00:00
Tor Lillqvist
e8aacae47d New function, copied from X11 version.
2001-02-11  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkcolor-win32.c (gdk_colormap_query_color): New
	function, copied from X11 version.

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): Eliminate
	DestroyCursor failures. The reason for the problem (despite the
	inconsistent messages from GetLastError()) was that
	DestroyCursor() cannot be called while a cursor is set in a
	window. Set the new cursor first and then destroy the old one.
	Thanks to jpe@archaeopteryx.com.

	* gdk/win32/gdkcc-win32.c: Removed.

	* gdk/gdk.def
	* gdk/makefile.mingw.in: Update. Godbye GdkColorContext.

	* gtk/gtk.def
	* gtk/makefile.mingw.in: Updates.
2001-02-11 11:00:14 +00:00
Tor Lillqvist
90359c8234 gdk/gdk.def Provide dummy implementations.
2001-02-04  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdk.def
	* gdk/win32/gdkim-win32.c (gdk_ic_attr_new, gdk_ic_attr_destroy):
	Provide dummy implementations.
2001-02-04 11:06:48 +00:00
Owen Taylor
a2d1299475 Make gdk_colormap_sync private since it was never exported in a header
Fri Feb  2 17:16:09 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkcolor-x11.c (gdk_colormap_sync): Make
	gdk_colormap_sync private since it was never exported
	in a header file.

	* gdk/x11/gdkcolor-x11.c (gdk_colormap_new): Fill in
	colormap->colors[] for StaticGray, StaticColor colormaps.

	* gdk/gdkpixbuf-drawable.c: Fix problems where image->bpp
	was being used as if it was image->bits_per_pixel.

	* gdk/gdkimage.h, gdk/x11/gdkimage-x11.c: Save the bits-per-pixel
	for the image in the GdkImage structure since it isn't
	reconstructable, and we need it to handle packed types

	* gdk/win32/gdkimage-win32.c: Set image->bits_per_pixel. (I'm making
	the assumption that on Win32 image->bits_per_pixel == image->depth,
	always.

	* gdk/linux-fb/gdkimage-fb.c: Set image->bits_per_pixel.

	* gdk/gdkrgb.c (gdk_rgb_select_conv): Exit with an informative
	warning message if no converter can be found.
2001-02-02 22:19:31 +00:00
Tor Lillqvist
576ef7f29a gtk/gtkmain.c Use the new
2001-01-18  Tor Lillqvist  <tml@iki.fi>

	* gtk/gtkmain.c
	* gtk/gtkrc.c: (Win32) Use the new
	g_win32_get_package_installation_(sub)directory() functions.

	* config.h.win32.in: New file.

	* config.h.win32: Removed.

	* configure.in: Output config.h.win32.

	* Makefile.am: Add it to EXTRA_DIST.

	* gtk/gtk.def: Update.

2001-01-16  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c (gdk_window_show, gdk_window_hide):
	Eliminate redraws when input-only windows are shown or
	hidden. Thanks to jpe@archaeopteryx.com.

2001-01-18  Tor Lillqvist  <tml@iki.fi>

	* gdk-pixbuf-io.c (get_libdir): (Win32) Use the new
	g_win32_get_package_installation_subdirectory() function.
	(gtk_win32_get_installation_directory): Remove this then.
2001-01-17 22:26:19 +00:00
Tor Lillqvist
18e95c4e0f Include <stdlib.h> for getenv().
2001-01-16  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkvisual-win32.c: Include <stdlib.h> for getenv().

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Don't use
	GDK_COLORMAP_PRIVATE_DATA on a potentially NULL GdkColormap.

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

	* gtk/makefile.msc.in (gtk_OBJECTS)
	* gtk/makefile.mingw.in (gtk_OBJECTS): Add gtkwindow-decorate.

	* gtk/gtk.def: Update.
2001-01-15 22:12:31 +00:00
Tor Lillqvist
420e4ee2f7 New implementaion that more closely mimics the events that an X server
2001-01-15  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (synthesize_crossing_events): New
	implementaion that more closely mimics the events that an X server
	would generate. Especially, properly generate GDK_NOTIFY_VIRTUAL and
	GDK_NOTIFY_NONLINEAR_VIRTUAL crossing events. This makes buttons
	with nested preview widgets, for instance, more responsive when
	you move the mouse quickly into them.
	(find_window_for_pointer_event): Make it actually compile.
	(gdk_event_translate): Set send_event to the value of
	InSendMessage (). This doesn't really mean the same as X11's
	send_event flag, but is close enough, says jpe@archaeopteryx.com
2001-01-15 19:48:53 +00:00
Tor Lillqvist
0056107b5d Implement better mouse capturing. Do use SetCapture(). Thanks to
2001-01-09  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c: Implement better mouse
	capturing. Do use SetCapture(). Thanks to jpe@archaeopteryx.com.
	(find_window_for_pointer_event): New function.
	(gdk_event_translate): Use it when handling mouse events.
2001-01-09 16:45:44 +00:00
Tor Lillqvist
c921abb888 Adapt calls to g_{locale,filename}_{to,from}_utf8 to match current API.
2001-01-07  Tor Lillqvist  <tml@iki.fi>

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

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

	* gdk/gdk.def
	* gtk/gtk.def
	* gtk/makefile.mingw.in: Update.
2001-01-07 18:00:15 +00:00
Tor Lillqvist
ee4c69b68e New function, as in the X11 backend. (gdk_window_new,
2000-12-30  Tor Lillqvist  <tml@iki.fi>

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

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

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

	* gtk/gtk.def: Update.

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

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

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

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

	* gdk_pixbuf.def: Update.
2000-12-30 20:06:14 +00:00
Tor Lillqvist
2e70f892cc Add gdkkeys.
2000-12-15  Tor Lillqvist  <tml@iki.fi>

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

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

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

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

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

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

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

	* gdk/win32/gdkgc-win32.c (BitmapToRegion): Plug memory
	leak. Thanks to Andreas Kemnade.
2000-12-14 23:14:18 +00:00
Owen Taylor
a4b2a6a857 Fix link to PNG home, remove reference to fribidi.
Tue Dec  5 15:49:31 2000  Owen Taylor  <otaylor@redhat.com>

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

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

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

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

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

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

	* gtk/gtkwidget.[ch] (gtk_widget_is_ancestor): Change
	return type to boolean (Oskar Liljeblad, #18648)
2000-12-05 20:53:30 +00:00
Tor Lillqvist
68ae419bfb Changes by Hans Breuer:
2000-11-30  Tor Lillqvist  <tml@iki.fi>

	Changes by Hans Breuer:

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

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

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

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

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

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

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

	* gtk/gtktexttypes.h: Ditto.

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

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

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

	* gtk/gtk.def: Updates.
2000-11-30 23:39:50 +00:00
Owen Taylor
0204bd1cef Nov 17 20:14:20 2000 Owen Taylor <otaylor@redhat.com>
* Released 1.3.2

	* NEWS: Updates for 1.3.2
2000-11-18 01:49:50 +00:00
Owen Taylor
a8b012d0a0 cvsignore updates 2000-11-16 16:14:17 +00:00