summaryrefslogtreecommitdiff
path: root/gdk/win32/gdkdisplay-win32.c
Commit message (Collapse)AuthorAgeFilesLines
* win32: Make build with latest gdkdisplay changesAlexander Larsson2013-04-111-20/+0
|
* Change FSF AddressJavier Jardón2012-02-271-3/+1
|
* win32: Fix some warningsAlexander Larsson2011-11-101-0/+3
|
* win32: Make flush/sync work like in XAlexander Larsson2011-11-101-1/+10
| | | | | | | | | | gdk_flush() should gdk_display_sync() on all open displays. Both for display_flush and display_sync it seems useful to call GdiFlush, but we don't have anything extra to do for display_sync, as there is no inherent roundtrip on win32. This should close bug #84314
* Add G_ENABLE_DEBUG #ifdef check in gdkdisplay-win32.cChun-wei Fan2011-11-101-0/+3
| | | | | | Commit 88707e6912c376faedf0b8c5b02895aa18473cb4 used _gdk_win32_cf_to_string, which is only defined when G_ENABLE_DEBUG is defined, so add G_ENABLE_DEBUG #ifdef around that part.
* win32: resurect Windows clipboard selection notificationMarc-André Lureau2011-11-101-6/+180
| | | | | | | This is a rewrite of e6fa7394baa8a7cb80ae01a0c81729717019172b, with misc fixes that should help with some bugs Tim was talking about. https://bugzilla.gnome.org/show_bug.cgi?id=652239
* gdk: Use const instead G_CONST_RETURNJavier Jardón2011-06-101-1/+1
|
* win32: no more GdkNativeWindow and related changesHans Breuer2011-02-061-3/+0
| | | | | | - replace GdkNativeWindow with HWND, remove type casts - no more GdkDisplayClass::get_drag_protocol but GdkWindowImpl::get_drag_protocol - remove *_client_message*()
* win32: gdk3 resurrectionHans Breuer2011-01-021-31/+181
| | | | | | 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."
* API: Remove colormap handling from GdkScreenBenjamin Otte2010-09-261-2/+0
| | | | | | | | 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()
* API: remove GdkImageBenjamin Otte2010-08-101-1/+0
| | | | It was unused and buggy.
* Merge branch 'master' into client-side-windowsAlexander Larsson2009-05-251-1/+1
|\ | | | | | | | | Conflicts: gdk/x11/gdkwindow-x11.c
| * Bug 578094 - ProcessIdToSessionId needs to be declared as WINAPITor Lillqvist2009-04-061-1/+1
| | | | | | | | Patch by Shixin Zeng.
* | CSW Win32 work in progress - builds but does not work yet.Cody Russell2009-04-021-1/+7
|/
* Bug 566628 - gdk_display_close always asserts on win32Tor Lillqvist2009-01-051-1/+1
| | | | | | | | | | | | | | 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
* Don't bother looking up EnumDisplayMonitors and GetMonitorInfoATor Lillqvist2008-08-031-71/+59
| | | | | | | | | | | | | | 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
* Include "config.h" instead of <config.h> Command used: find -nameJohan Dahlin2008-06-221-1/+1
| | | | | | | | | | | | 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
* check surface status after ceating a pdf. Avoids crashing when the targetHans Breuer2008-06-131-1/+4
| | | | | | | | | | | | | | | 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
* As we don't support Win9x anyway, we can use ProcessIdToSessionId()Tor Lillqvist2008-06-111-29/+7
| | | | | | | | | | | 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
* gdk/gdkdisplay.h gdk/gdkdrawable.h gdk/gdkevents.h gdk/gdkpango.hMichael Natterer2008-01-151-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* gdk/win32/gdkdisplay-win32.c gdk/win32/gdkglobals-win32.cTor Lillqvist2008-01-101-30/+39
| | | | | | | | | | | | | | | | 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
* Add support for composited child windows. (#412882, Ryan Lortie)Matthias Clasen2007-06-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* New function, return TRUE. (gdk_display_supports_input_shapes): NewTor Lillqvist2006-02-201-0/+20
| | | | | | | | 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.
* Remove the clipboard viewer code. It didn't really do anything useful, andTor Lillqvist2005-10-141-121/+2
| | | | | | | | | | | | | | | | | | | | 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.
* Typo.Tor Lillqvist2005-09-081-1/+1
|
* Cache the display name. There is only one GdkDisplay on Win32, andTor Lillqvist2005-09-081-8/+20
| | | | | | | | | | | | | | | | | | | 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.
* New debugging function, to log a clipboard format name symbolically.Tor Lillqvist2005-04-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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().
* [merged from gtk-2-6 branch] let dash_offset shift the start of the lineHans Breuer2005-04-031-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Return the Terminal Services session number, window station name (alwaysTor Lillqvist2005-03-201-3/+71
| | | | | | | | | | | 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.
* Print debugging output only if asked for, not always.Tor Lillqvist2005-03-161-19/+20
| | | | | | | | | | | | | | | | | | | 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.
* updatedHans Breuer2004-10-291-0/+16
| | | | | | | | | | | 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
* List the three theme gtkrc files separately, zip doesn't do anything ifTor Lillqvist2004-09-031-17/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Report whole of (primary) monitor, including any taskbars. Excluding theTor Lillqvist2004-08-221-29/+19
| | | | | | | | | | 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)
* make it compile and more similar to the X11 implementation [backwardHans Breuer2004-08-061-0/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Don't undefine HAVE_MONITOR_INFO when compiling with gcc. Mingw's headersTor Lillqvist2004-03-131-1/+1
| | | | | | | | | | | | | | 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.
* Fixes #136082 and #135265, patch by Morten Welinder.Federico Mena Quintero2004-03-061-0/+1
| | | | | | | | | | 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>
* Add missing entries, thanks to J. Ali Harlow.Tor Lillqvist2004-03-051-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* set current_dest_drag to NULL when destroying, fixes bug #120007. AlsoHans Breuer2004-02-281-1/+1
| | | | | | | | | | | | | | | | 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
* handle GTK_DATADIR similar as the other filesystem placement 'constants'Hans Breuer2003-12-141-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Use <multimon.h> when compiling with MSVC and old headers. (#126933, JohnTor Lillqvist2003-12-081-0/+4
| | | | | | | 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)
* Don't call CloseHandle() on the HMODULE returned from GetModuleHandle().Tor Lillqvist2003-09-021-2/+0
| | | | | | | | | | | | | 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.
* gdk/win32/gdkinput-win32.h Drop the GdkEvent* parameter, it wasn't used.Tor Lillqvist2003-08-071-0/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add missing entries, needed by gtk.Tor Lillqvist2002-11-161-15/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Delete leftover declarations of the obsolete Win32-only functionsTor Lillqvist2002-09-191-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Renames:Owen Taylor2002-06-201-1/+1
| | | | | | | | | | | 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
* Add a singleton object that we can use to get notification when displaysOwen Taylor2002-06-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* added gdkdisplay and gdkscreenHans Breuer2002-06-101-4/+7
| | | | | | | | | | | | | | | | | | | | | 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)
* Changes multihead reorganizing code for win32 support, mostly from a patchOwen Taylor2002-06-061-0/+80
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.