Commit Graph

40 Commits

Author SHA1 Message Date
Hans Breuer
1d838f586c win32: gdk3 resurrection
There are sure regressions but basic stuff seems to be working
again after all the API breakage done with comments like
"Win32 and Quartz need to be ported still."
2011-01-02 13:33:04 +01:00
Benjamin Otte
cf4cb4f6d9 API: Remove colormap handling from GdkScreen
In particular, the following functions are gone:
- gdk_screen_get_default_colormap()
- gdk_screen_set_default_colormap()
- gdk_screen_get_system_colormap()
- gdk_screen_get_rgba_colormap()
2010-09-26 15:11:34 +02:00
Benjamin Otte
14fe04ec89 API: remove GdkImage
It was unused and buggy.
2010-08-10 21:02:26 +02:00
Alexander Larsson
7698daf97a Merge branch 'master' into client-side-windows
Conflicts:
	gdk/x11/gdkwindow-x11.c
2009-05-25 14:30:01 +02:00
Tor Lillqvist
c338228a86 Bug 578094 - ProcessIdToSessionId needs to be declared as WINAPI
Patch by  Shixin Zeng.
2009-04-06 15:10:35 +03:00
Cody Russell
a93c6cd6e1 CSW Win32 work in progress - builds but does not work yet. 2009-04-02 10:16:29 +02:00
Tor Lillqvist
7ddb955766 Bug 566628 - gdk_display_close always asserts on win32
2009-01-05  Tor Lillqvist  <tml@novell.com>

	Bug 566628 - gdk_display_close always asserts on win32

	* gdk/win32/gdkdisplay-win32.c
	(_gdk_windowing_set_default_display): Allow also a NULL parameter
	in the g_assert(). Still don't actually do anything in this
	function, though.


svn path=/trunk/; revision=22068
2009-01-05 15:31:14 +00:00
Tor Lillqvist
34159c417b Don't bother looking up EnumDisplayMonitors and GetMonitorInfoA
2008-08-04  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c: Don't bother looking up
	EnumDisplayMonitors and GetMonitorInfoA dynamically, they are
	present in NT-based Windows since Windows 2000.
	(enum_monitor): For some reason the MONITORINFOEX struct in
	mingw-win64 is different than the proper one as in MSDN and 32-bit
	mingw, so just copy the proper definition here.


svn path=/trunk/; revision=20953
2008-08-03 23:05:37 +00:00
Johan Dahlin
d97cdbdf53 Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch and Tim


svn path=/trunk/; revision=20669
2008-06-22 14:28:52 +00:00
Hans Breuer
8677ed959d check surface status after ceating a pdf. Avoids crashing when the target
2008-05-23  Hans Breuer  <hans@breuer.org>

	* gtk/gtkprintoperation.c : check surface status after ceating a pdf.
	Avoids crashing when the target can not be written, bug #537685

	* gdk/win32/gdkdisplay-win32.c : runtime linking of ProcessIdToSessionId

	* gtk/gtkfilesystem.c : variadic macros are not supported with c89 and
	it was not needed here anyway.


svn path=/trunk/; revision=20370
2008-06-13 08:36:26 +00:00
Tor Lillqvist
b981e4ff37 As we don't support Win9x anyway, we can use ProcessIdToSessionId()
2008-06-11  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c (gdk_display_get_name): As we don't
	support Win9x anyway, we can use ProcessIdToSessionId()
	unconditionally.


svn path=/trunk/; revision=20353
2008-06-11 16:05:28 +00:00
Michael Natterer
8243e3d415 gdk/gdkdisplay.h gdk/gdkdrawable.h gdk/gdkevents.h gdk/gdkpango.h
2008-01-15  Michael Natterer  <mitch@imendio.com>

	* gdk/gdkdisplay.h
	* gdk/gdkdrawable.h
	* gdk/gdkevents.h
	* gdk/gdkpango.h
	* gdk/gdkregion.h
	* gdk/gdkrgb.h
	* gdk/gdkwindow.h: made more struct pointer and array parameters
	const. GDK should now be constified as far as possible without
	breaking source compatibility. Includes some minor cleanup like
	indentation and s/nfoo/n_foo/ (bug #508544).

	* gdk/gdkdisplay.c
	* gdk/gdkdraw.c
	* gdk/gdkevents.c
	* gdk/gdkpango.c
	* gdk/gdkregion-generic.c
	* gdk/gdkrgb.c
	* gdk/directfb/gdkdisplay-directfb.c
	* gdk/directfb/gdkwindow-directfb.c
	* gdk/quartz/gdkdisplay-quartz.c
	* gdk/quartz/gdkwindow-quartz.c
	* gdk/win32/gdkdisplay-win32.c
	* gdk/win32/gdkwindow-win32.c
	* gdk/x11/gdkdisplay-x11.c
	* gdk/x11/gdkwindow-x11.c: changed accordingly.


svn path=/trunk/; revision=19372
2008-01-15 15:32:37 +00:00
Tor Lillqvist
8dab0b9360 gdk/win32/gdkdisplay-win32.c gdk/win32/gdkglobals-win32.c
2008-01-10  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c
	* gdk/win32/gdkglobals-win32.c
	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkscreen-win32.c
	* gdk/win32/gdkwindow-win32.c: Implement
	gdk_screen_get_monitor_width_mm(), gdk_screen_get_monitor_height_mm()
	and gdk_screen_get_monitor_plug_name(). Thanks to Kazuki
	Iwamoto. (#505753)


svn path=/trunk/; revision=19346
2008-01-10 21:40:48 +00:00
Matthias Clasen
885ba04648 Add support for composited child windows. (#412882, Ryan Lortie)
2007-06-01  Matthias Clasen  <mclasen@redhat.com>

        Add support for composited child windows.  (#412882, Ryan Lortie)

        * gdk/gdk.symbols:
        * gdk/gdkdisplay.h:
        * gdk/gdkinternals.h:
        * gdk/gdkwindow.[hc]: Add gdk_display_supports_composite() and
        gdk_window_set_composited().

        * gdk/x11/gdkevents-x11.c:
        * gdk/x11/gdkdisplay-x11.[hc]:
        * gdk/x11/gdkwindow-x11.[hc]: X11 implementation.

        * gdk/win32/gdkdisplay-win32.c:
        * gdk/win32/gdkwindow-win32.c: Dummy win32 implementration.

        * gdk/quartz/gdkdisplay-quartz.c:
        * gdk/quartz/gdkwindow-quartz.c: Dummy Quartz implementation.

        * gdk/directfb/gdkdisplay-directfb.c:
        * gdk/directfb/gdkwindow-directfb.c: Dummy DirectFB implementation.

        * tests/testgtk.c: Add a "composited window" test.


svn path=/trunk/; revision=18004
2007-06-01 12:16:12 +00:00
Tor Lillqvist
3cb8a43a25 New function, return TRUE. (gdk_display_supports_input_shapes): New
2006-02-20  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c (gdk_display_supports_shapes):
	New function, return TRUE.
	(gdk_display_supports_input_shapes): New function, return FALSE.
2006-02-20 10:10:27 +00:00
Tor Lillqvist
e6fa7394ba Remove the clipboard viewer code. It didn't really do anything useful, and
2005-10-14  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c: Remove the clipboard viewer code.
	It didn't really do anything useful, and was just confusing and
	incomplete. Comments claimed we don't do delayed rendering, but in
	fact we do, for images. (The delayed rendering code has other
	problems, though, see #168173.) The clipboard viewer code was
	probably even buggy (the WM_CHANGECBCHAIN handled didn't propagate
	the message when necessary). It was just test code, it said so in
	a comment. Add something similar back later if necessary.

	(_win32_on_clipboard_change,
	_gdk_win32_register_clipboard_notification): Remove.

	(gdk_display_supports_selection_notification,
	gdk_display_request_selection_notification): Always just return
	FALSE. We didn't generate any GDK_OWNER_CHANGE events anywhere.
2005-10-14 00:08:14 +00:00
Tor Lillqvist
ef86d40384 Typo. 2005-09-08 23:50:52 +00:00
Tor Lillqvist
0905c73a88 Cache the display name. There is only one GdkDisplay on Win32, and
2005-09-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c (gdk_display_get_name): Cache the
	display name. There is only one GdkDisplay on Win32, and
	constructing the display name isn't entirely trivial, so cacheing
	is probably worth it. For instance GIMP calls this function a lot.
	(gdk_display_open): Call gdk_display_get_name() to prime the
	cached name.
	(gdk_display_get_n_screens, gdk_display_get_screen,
	gdk_display_get_default_screen): Verify parameter correctness like
	the X11 backend does.

	* gdk/win32/gdkscreen-win32.c (gdk_screen_make_display_name):
	Return a freshly allocated string, as the API specifies. Fixes a
	heap corruption problem that caused random errors and crashes in
	GIMP, for instance.
2005-09-08 22:45:40 +00:00
Tor Lillqvist
0b2ac32cf5 New debugging function, to log a clipboard format name symbolically.
2005-04-04  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkmain.c (_gdk_win32_cf_to_string): New debugging
	function, to log a clipboard format name symbolically.
	(_gdk_win32_data_to_string): Also new, to log random data bytes.

	Implement delayed rendering on Win32, specifically for transfering
	images through the clipboard from GTK+ apps to other
	apps (#168173, implementation by Ivan Wong):

	* gdk/win32/gdkevents-win32.c (gdk_event_translate):
	Handle WM_RENDERFORMAT.

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c: Add _format_atom_table,
	_delayed_rendering_data and _image_bmp.

	* gdk/win32/gdkmain-win32.c: Initialize _image_bmp.

	* gdk/win32/gdkproperty-win32.c (gdk_property_change):
	Accept formats other than GDK_TARGET_STRING or _utf8_string, and
	assume they are handled through delayed rendering.

	* gdk/win32/gdkselection-win32.c (gdk_selection_convert):
	Return all available formats (including those registered by GTK+
	apps) on request_targets.
	(gdk_selection_property_get): We should append a zero byte like
	X11 does.
	(gdk_win32_selection_add_targets): New function, for
	gtkselection's use. Win32 requires that the clipboard owner
	registers all valid formats even if the owner wants delayed
	rendering.
	(_gdk_win32_selection_convert_to_dib): New function. Convert
	images to DIB using gdk-pixbuf.

	* gdk/win32/gdkwin32.h: Declare gdk_win32_selection_add_targets().

	* gtk/gtkselection.c (gtk_selection_add_target,
	gtk_selection_add_targets): Call gdk_win32_selection_add_targets()
	to register target formats.

	* gdk/gdk.symbols: Add gdk_win32_selection_add_targets().
2005-04-04 00:12:26 +00:00
Hans Breuer
0ba6aed77e [merged from gtk-2-6 branch] let dash_offset shift the start of the line
2005-04-03  Hans Breuer  <hans@breuer.org>

	[merged from gtk-2-6 branch]
	* gdk/win32/gdkdrawable-win32.c : let dash_offset shift the start of
	the line pattern not the start of the line. Fixes bug #171641.

	* gtk/makefile.msc.in : follow .symbols changes

	* gdk/win32/gdkwindow-win32.c : declare and resolve GetAncestor()
	dynamically. (It is not available in _WIN_VER <= 0x0400)

	* gdk/win32/makefile.msc : removed gdkpango-win32.obj

	* gtk/gtkhsv.c gtk/gtkstyle.c : use G_PI instead of M_PI

	[also applied to gtk-2-6 branch]
	* gdk/makefile.msc gdk-pixbuf/makefile.msc : handle gdk*alias.def

	* gdk/makefile.msc.in : add gtkmnemonichash.obj

	* test/testgtk.c(set_parent_signal) : use g_message instead of
	g_print to keep the 'testgtk --bench=all' output clean
2005-04-03 21:03:08 +00:00
Tor Lillqvist
b459ef889c Return the Terminal Services session number, window station name (always
2005-03-20  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c (gdk_display_get_name): Return the
	Terminal Services session number, window station name (always
	"WinSta0" in interactive processes), and desktop name (typically
	"Default"), concatenated with backslash separators.
	(gdk_display_open): Accept only NULL or the string
	gdk_display_get_name() returns as display name.
2005-03-20 21:39:55 +00:00
Tor Lillqvist
df9768cf3a Print debugging output only if asked for, not always.
2005-03-16  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c (_win32_on_clipboard_change): Print
	debugging output only if asked for, not always.

	* gdk/win32/*.c: Use the %+d%+d format for coordinate pairs in
	debugging printout instead of +%d+%d. Misc other additions and
	cosmetic improvements to debugging printouts. Use API_CALL() and
	GDI_CALL() macros in more places.

	* gdk/win32/gdkwindow-win32.c (gdk_window_move, gdk_window_resize,
	gdk_window_move_resize): To detect child windows, check whether
	the real parent is not the desktop window, instead of relying on
	the GDK window type being GDK_WINDOW_CHILD. Foreign GtkPlug
	windows have a GDK window type GDK_WINDOW_FOREIGN, but are still
	de facto child windows.
2005-03-16 01:38:57 +00:00
Hans Breuer
9002d5c310 updated
2004-10-29  Hans Breuer  <hans@breuer.org>

	* gdk/makefile.msc gtk/makefile.msc.in : updated

	* gdk/win32/gdkdisplay-win32.c : dummy implementations for
	gdk_display_supports_clipboard_persistence, gdk_display_store_clipboard

	* gtk/gtkmodules.c : #include "gtkprivate.h" for GTK_LIBDIR
2004-10-29 21:44:53 +00:00
Tor Lillqvist
f8ef369e78 List the three theme gtkrc files separately, zip doesn't do anything if
2004-09-03  Tor Lillqvist  <tml@iki.fi>

	* gtk-zip.sh.in: List the three theme gtkrc files separately, zip
	doesn't do anything if one of the files on its command line
	doesn't exist.

	Handle changes of screen resolution on Win32. (#151581, reported by
	Arjohn Kampman)

	* gdk/win32/gdkwindow-win32.c (_gdk_windowing_window_init,
	_gdk_root_window_size_init): Factor out setting the root window's
	size (as the size of the union of all monitors) to a new function.

	* gdk/win32/gdkdisplay-win32.c (gdk_display_open,
	_gdk_monitor_init): Factor out the monitor query to a new
	function.

	* gdk/win32/gdkprivate-win32.h: Declare above new functions.

	* gdk/win32/gdkevents-win32.c (gdk_event_translate,
	handle_display_change): Handle WM_DISPLAYCHANGE by calling the
	above two functions, and emitting the "size_changed" signal on our
	(only) GdkScreen.
2004-09-03 01:27:57 +00:00
Tor Lillqvist
a63a44ff3b Report whole of (primary) monitor, including any taskbars. Excluding the
2004-08-22  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdisplay-win32.c (enum_monitor, gdk_display_open):
	Report whole of (primary) monitor, including any taskbars.
	Excluding the taskbar area from the "root window" reported to GDK
	doesn't seem to be that useful although gdk/win32 had been doing it
	for a very long time. (#149013, see also #145467 and #148526)
2004-08-22 16:59:14 +00:00
Hans Breuer
7405177690 make it compile and more similar to the X11 implementation [backward
2004-08-06  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkwindow-win32.c : make it compile and more
	similar to the X11 implementation [backward compatibility
	for GDK_WINDOW_TEMP, GDK_INPUT_ONLY (fixes bug #148702),
	use the *screen* function variants, dont reparent already
	destroyed]
	(get_visible_region) : take the win32 part into account
	(_gdk_windowing_window_destroy) : remove from handle table

	* gdk/win32/gdkdisplay-win32.c : added
	gdk_display_(request|supports)_selection_notification ()
	with a currently mostly pointless implementation ;-)

	* gtk/gtkfilesystemwin32.c (*_to_path) : same changes as on *NIX,
	plugs memory leak
	(gtk_file_system_win32_render_icon) : use new GTK_STOCK_DIRECTORY

	* gtk/makefile.msc.in demos/gtk-demo/makefile.msc.in
	  gtk/stock-icons/makefile.msc tests/makefile.msc : updated

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

	* tests/testiconview.c : remove unneeded dirent.h inclusion
2004-08-06 19:20:42 +00:00
Tor Lillqvist
f6d1307a01 Don't undefine HAVE_MONITOR_INFO when compiling with gcc. Mingw's headers
2004-03-13  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdisplay-win32.c: Don't undefine HAVE_MONITOR_INFO
	when compiling with gcc. Mingw's headers do have the required
	definitions.

	* gdk/win32/gdkdrawable-win32.c (draw_polygon): When drawing
	filled polygons, don't draw the outline, similarily as
	draw_rectangle(). Apparently GTK and GIMP don't use
	gdk_draw_polygon() much (or always draw the outline, too), as this
	has gone undetected for so long. Thanks to Bruce Hochstetler.
2004-03-13 22:26:05 +00:00
Federico Mena Quintero
80581c3011 Fixes #136082 and #135265, patch by Morten Welinder.
2004-03-05  Federico Mena Quintero  <federico@ximian.com>

	Fixes #136082 and #135265, patch by Morten Welinder.

	* configure.in: Use AC_SYS_LARGEFILE.

	* */*.c: #include <config.h>
2004-03-06 03:38:59 +00:00
Tor Lillqvist
72d622fcf5 Add missing entries, thanks to J. Ali Harlow.
2004-03-05  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdk.def: Add missing entries, thanks to J. Ali Harlow.

	* gdk/win32/gdkcursor-win32.c (color_is_white): const-correctness.

	(gdk_cursor_new_from_pixbuf): Copy of the non-Xcursor X11
	implementation.

	(gdk_display_supports_cursor_alpha,
	gdk_display_supports_cursor_color): Dummy implementations.

	(gdk_display_get_default_cursor_size,
	gdk_display_get_maximal_cursor_size): Implement.

	* gdk/win32/gdkdisplay-win32.c (gdk_display_get_default_group):
	Dummy implementation.

	* gdk/win32/gdkevents-win32.c (gdk_net_wm_supports): Dummy
	implementation.

	* gdk/win32/gdkfont-win32.c (gdk_font_get_display): Implement.

	* gdk/win32/gdkinput-win32.c (gdk_input_motion_events): Remove,
	not in API.

	* gdk/win32/gdkwindow-win32.c (gdk_window_get_group): Dummy
	implementation.
2004-03-05 23:26:07 +00:00
Hans Breuer
75aa148d97 set current_dest_drag to NULL when destroying, fixes bug #120007. Also
2004-02-28  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkdnd-win32.c : set current_dest_drag to NULL
	when destroying, fixes bug #120007. Also removed the mirrored
	ref counting for deprecated gdk_drag_context_<ref|unref>()
	cause it wasn't reliable anymore anyway.

	* gdk/win32/gdkdisplay-win32.c : fix typo, which should
	have broken the win32 build for everyone not using msvc

	* gdk/win32/gdkevents-win32.c : WM_GETMINAMXINFO ensure not to
	return negative values for ptMaxTrackSize, it caused snapping
	windows to their minimum size
2004-02-28 13:21:25 +00:00
Hans Breuer
4acd98a836 handle GTK_DATADIR similar as the other filesystem placement 'constants'
2003-12-14  Hans Breuer  <hans@breuer.org>

	* gtk/gtkprivate.h gtk/gtkmain.c : handle GTK_DATADIR
	similar as the other filesystem placement 'constants' (dynamic
	resolving on win32)

	* gtk/gtkfilechooserwidget.c : handle file system to win32
	renaming here as will
	* gtk/gtkfilesystemwin32.c : implement render_icon

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

	* gdk/win32/gdkdisplay-win32.c : make it compile without
	<multimon.h> - i.e. even older sdk

	* gdk/win32/gdkevents-win32.c : match resize_timer_proc
	with TIMERPROC prototype

	* gdk/win32/gdkwindow-win32.c : older msvc does not know
	BITMAPV5HEADER (from win xp) either

	* gtk/gtkimmodule.c : make it compile even if GTK_LOCALEDIR is
	not defined

	* tests/testfilechooser.c : recent GLib crashes on
	g_print ("%s", NULL) so avoid this
2003-12-14 19:03:02 +00:00
Tor Lillqvist
dfddc20628 Use <multimon.h> when compiling with MSVC and old headers. (#126933, John
2003-12-08  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdisplay-win32.c: Use <multimon.h> when compiling
	with MSVC and old headers. (#126933, John Ehresman)
2003-12-08 22:43:51 +00:00
Tor Lillqvist
fafe735f13 Don't call CloseHandle() on the HMODULE returned from GetModuleHandle().
2003-09-02  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdisplay-win32.c (gdk_display_open): Don't call
	CloseHandle() on the HMODULE returned from GetModuleHandle().
	Didn't cause any harm, but didn't do anything useful either. When
	running a GTK+ program under MS's debugger, the CloseHandle() call
	would cause a "first-chance exception" in ntdll.dll to show up.
	(The exception is caught appropriately if you let it proceed, but
	it confuses the person using the debugger). Thanks to Bruce
	Hochstetler for noticing.
2003-09-02 23:33:02 +00:00
Tor Lillqvist
5155f3ca66 gdk/win32/gdkinput-win32.h Drop the GdkEvent* parameter, it wasn't used.
2003-08-07  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkinput-win32.h
	* gdk/win32/gdkinput-win32.c (_gdk_input_configure_event,
	_gdk_input_enter_event): Drop the GdkEvent* parameter, it wasn't
	used.

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Adapt caller
	accordingly, in fact an uninitialised variable was dereferenced.


	[Win32] Add support for multiple monitors.

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c: New global variables for
	multiple-monitor info: _gdk_num_monitors, _gdk_monitors, and
	_gdk_offset_x and _gdk_offset_y.

	* gdk/win32/gdkdisplay-win32.c (count_monitor, enum_monitor): New
	functions, enumeration functions passed to EnumDisplayMonitors().

	(gdk_display_open): If the EnumDisplayMonitors() and
	GetMonitorInfo() API is present (on Win98, Win2000 and newer), use
	if to find out monitor info.

	Calculate the offset between Win32 coordinates (relative to the
	primary monitor's origin (and thus negative on monitors to the
	left of or above it), and GDK's (visible coordinates should be
	non-negative).

	* gdk/win32/gdkscreen-win32 (gdk_screen_get_n_monitors,
	gdk_screen_get_monitor_geometry): Use information collected above.

	(gdk_window_move, gdk_window_move_resize_window_get_geometry):
	Subtract _gdk_offset_{x,y} from GDK root window coordinates.

	(gdk_window_get_geometry, gdk_window_get_origin,
	gdk_window_get_frame_extents): For top-level windows, add
	_gdk_offset_{x,y} to GDK root window coordinates

	Still need to handle multiple monitors in
	gdk_window_fullscreen(). Probably should make the window
	fullscreen on the monitor where the cursor is?

	* gdk/win32/gdkevents-win32.c: Add _gdk_offset_{x,y} to all GDK
	root window coordinates in GdkEvents.


	[Win32] Fix geometry hint handling. Add support for resize
	increment and base size, and aspect ratio geometry hints. The
	"gridded geometry" test in testgtk now works beautifully.

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_geometry_hints):
	Turns out this function shouldn't actually ever modify the
	window's size, just store the hints. (Old code kept for a while
	inside #if 0.)

	(gdk_window_set_hints): Remove presumably broken code that handles
	the position hints, this function is obsolete anyway.

	* gdk/win32/gdkevents-win32.c: Drop the current_{x,y}_root
	variables, not used.

	(adjust_drag): New function, used to implement resize increment
	hints.

	(gdk_event_translate): Handle WM_SIZING, implement resize
	increment and base size, and aspect ratio geometry hints here. The
	WM_GETMINMAXINFO handler takes care of the minimum and maximum
	size hints as before. Fix the WM_GETMINMAXINFO handler to take
	into account window decorations. No need to modify the
	ptMaxPosition and ptMaxSize fields in the MINMAXINFO struct,
	the defaults are fine.

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkwindow-win32.c (_gdk_win32_adjust_client_rect,
	_gdk_win32_get_adjusted_client_rect): New helper functions.
2003-08-07 22:17:18 +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
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
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
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
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