1999-11-11 22:12:27 +00:00
|
|
|
/* GDK - The GIMP Drawing Kit
|
|
|
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
2000-07-26 11:33:08 +00:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
1999-11-11 22:12:27 +00:00
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2018-03-21 08:06:31 +00:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2000-07-26 11:33:08 +00:00
|
|
|
* Lesser General Public License for more details.
|
1999-11-11 22:12:27 +00:00
|
|
|
*
|
2000-07-26 11:33:08 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2012-02-27 13:01:10 +00:00
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
1999-11-11 22:12:27 +00:00
|
|
|
*/
|
|
|
|
|
2023-03-31 19:11:10 +00:00
|
|
|
#pragma once
|
1999-11-11 22:12:27 +00:00
|
|
|
|
2023-05-30 17:55:21 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
2011-01-02 10:51:25 +00:00
|
|
|
#include <gdk/gdkcursorprivate.h>
|
2022-09-24 03:11:41 +00:00
|
|
|
#include <gdk/gdkdebugprivate.h>
|
2018-03-20 10:46:11 +00:00
|
|
|
#include <gdk/win32/gdksurface-win32.h>
|
2015-05-13 07:45:40 +00:00
|
|
|
#include <gdk/win32/gdkwin32display.h>
|
2015-12-17 23:36:57 +00:00
|
|
|
#include <gdk/win32/gdkwin32screen.h>
|
2016-07-13 11:41:35 +00:00
|
|
|
#include <gdk/win32/gdkwin32keys.h>
|
2017-11-30 05:38:20 +00:00
|
|
|
#include <gdk/win32/gdkdevicemanager-win32.h>
|
2018-03-24 16:27:11 +00:00
|
|
|
#include <gdk/win32/gdkclipdrop-win32.h>
|
2001-10-29 06:50:55 +00:00
|
|
|
|
2022-09-23 14:32:07 +00:00
|
|
|
|
|
|
|
/* Old debug macros */
|
|
|
|
|
|
|
|
#define GDK_NOTE(type,action) \
|
|
|
|
G_STMT_START { \
|
|
|
|
if (GDK_DEBUG_CHECK (type)) \
|
|
|
|
{ action; }; \
|
|
|
|
} G_STMT_END
|
|
|
|
|
2016-03-18 04:51:52 +00:00
|
|
|
/* According to
|
|
|
|
* http://blog.airesoft.co.uk/2009/11/wm_messages/
|
|
|
|
* this is the actual internal name MS uses for this undocumented message.
|
|
|
|
* According to
|
|
|
|
* https://bugs.winehq.org/show_bug.cgi?id=15055
|
|
|
|
* wParam is 0
|
|
|
|
* lParam is a pair of virtual desktop coordinates for the popup
|
|
|
|
*/
|
|
|
|
#ifndef WM_SYSMENU
|
|
|
|
#define WM_SYSMENU 0x313
|
|
|
|
#endif
|
|
|
|
|
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
|
|
|
/* Define some combinations of GdkDebugFlags */
|
|
|
|
#define GDK_DEBUG_EVENTS_OR_INPUT (GDK_DEBUG_EVENTS|GDK_DEBUG_INPUT)
|
2008-10-05 00:00:10 +00:00
|
|
|
#define GDK_DEBUG_MISC_OR_EVENTS (GDK_DEBUG_MISC|GDK_DEBUG_EVENTS)
|
2001-10-29 06:50:55 +00:00
|
|
|
|
2018-04-24 15:14:23 +00:00
|
|
|
/* Use this for hWndInsertAfter (2nd argument to SetWindowPos()) if
|
|
|
|
* SWP_NOZORDER flag is used. Otherwise it's unobvious why a particular
|
|
|
|
* argument is used. Using NULL is misleading, because
|
|
|
|
* NULL is equivalent to HWND_TOP.
|
|
|
|
*/
|
|
|
|
#define SWP_NOZORDER_SPECIFIED HWND_TOP
|
|
|
|
|
2018-03-24 16:28:52 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GDK_DRAG_PROTO_NONE = 0,
|
|
|
|
GDK_DRAG_PROTO_WIN32_DROPFILES,
|
|
|
|
GDK_DRAG_PROTO_OLE2,
|
|
|
|
} GdkDragProtocol;
|
|
|
|
|
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
|
|
|
gulong _gdk_win32_get_next_tick (gulong suggested_tick);
|
2024-09-13 04:31:34 +00:00
|
|
|
BOOL _gdk_win32_get_cursor_pos (GdkDisplay *display,
|
|
|
|
LPPOINT lpPoint);
|
2021-08-16 12:39:25 +00:00
|
|
|
|
2024-08-19 10:49:17 +00:00
|
|
|
gboolean _gdk_win32_surface_enable_transparency (GdkSurface *surface);
|
2015-04-22 19:10:55 +00:00
|
|
|
|
2001-10-28 21:28:51 +00:00
|
|
|
void _gdk_win32_dnd_exit (void);
|
2000-10-09 19:49:42 +00:00
|
|
|
|
2024-08-30 07:42:35 +00:00
|
|
|
void gdk_win32_display_handle_table_insert (GdkDisplay *display,
|
|
|
|
HANDLE *handle,
|
|
|
|
gpointer data);
|
|
|
|
void gdk_win32_display_handle_table_remove (GdkDisplay *display,
|
|
|
|
HANDLE handle);
|
|
|
|
gpointer gdk_win32_display_handle_table_lookup_ (GdkDisplay *display,
|
|
|
|
HWND handle);
|
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
|
|
|
|
GDK-Win32/4.0: Enable HiDPI support for Windows
This enables HiDPI support for GTK+ on Windows, so that the
fonts and window look better on HiDPI displays. Notes for the current
work:
-The DPI awareness enabling can be disabled if and only if an application
manifest is not embedded in the app to enable DPI awareness AND a user
compatibility setting is not set to limit DPI awareness for the app, via
the envvar GDK_WIN32_DISABLE_HIDPI. The app manifest/user setting for
DPI awareness will always win against the envvar, and so the HiDPI items
will be always setup in such scenarios, unless DPI awareness is disabled.
-Both automatic detection for the scaling factor and setting the scale
factor using the GDK_SCALE envvar are supported, where the envvar takes
precedence, which will therefore disable automatic scaling when
resolution changes.
-We now default to a per-system DPI awareness model, which means that we
do not handle WM_DPICHANGED, unless one sets the
GDK_WIN32_PER_MONITOR_HIDPI envvar, where notes for it are in the
following point.
-Automatic scaling during WM_DISPLAYCHANGE is handled (DPI setting change of
current monitor) is now supported. WM_DPICHANGED is handled as well,
except that the window positioning during the change of scaling still
needs to be refined, a change in GDK itself may be required for this.
-I am unable to test the wintab items because I don't have such devices
around.
https://bugzilla.gnome.org/show_bug.cgi?id=768081
2016-06-27 05:16:43 +00:00
|
|
|
cairo_region_t *_gdk_win32_hrgn_to_region (HRGN hrgn,
|
|
|
|
guint scale);
|
2006-01-02 00:45:39 +00:00
|
|
|
|
2024-08-19 10:49:17 +00:00
|
|
|
void _gdk_win32_adjust_client_rect (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
RECT *RECT);
|
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
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
GdkSurface *_gdk_modal_current (void);
|
2024-08-19 10:49:17 +00:00
|
|
|
gboolean _gdk_modal_blocked (GdkSurface *surface);
|
2008-02-05 16:47:24 +00:00
|
|
|
|
2022-05-04 12:56:48 +00:00
|
|
|
gboolean gdk_win32_ensure_com (void);
|
|
|
|
gboolean gdk_win32_ensure_ole (void);
|
|
|
|
|
2024-10-31 13:25:52 +00:00
|
|
|
/*
|
|
|
|
* gdk_win32_com_clear:
|
|
|
|
* @com_ptr: pointer to a COM object pointer
|
|
|
|
*
|
|
|
|
* Clears a reference to a COM object.
|
|
|
|
*
|
|
|
|
* `com_ptr` must not be `NULL`.
|
|
|
|
*
|
|
|
|
* If the reference is `NULL` then this function does nothing.
|
|
|
|
* Otherwise, the reference count of the object is decreased
|
|
|
|
* and the pointer is set to NULL.
|
|
|
|
*
|
|
|
|
* Think of this function like g_clear_object() but for COM objects.
|
|
|
|
*/
|
|
|
|
#define gdk_win32_com_clear(com_ptr) \
|
|
|
|
G_STMT_START {\
|
|
|
|
if (*(com_ptr)) \
|
|
|
|
{ \
|
|
|
|
(*(com_ptr))->lpVtbl->Release (*(com_ptr)); \
|
|
|
|
*(com_ptr) = NULL; \
|
|
|
|
} \
|
|
|
|
}G_STMT_END
|
|
|
|
|
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
|
|
|
void _gdk_win32_print_dc (HDC hdc);
|
|
|
|
|
2020-09-10 04:39:03 +00:00
|
|
|
char *_gdk_win32_surface_state_to_string (GdkToplevelState state);
|
2020-07-24 18:40:36 +00:00
|
|
|
char *_gdk_win32_surface_style_to_string (LONG style);
|
|
|
|
char *_gdk_win32_surface_exstyle_to_string (LONG style);
|
|
|
|
char *_gdk_win32_surface_pos_bits_to_string (UINT flags);
|
|
|
|
char *_gdk_win32_drag_action_to_string (GdkDragAction actions);
|
|
|
|
|
|
|
|
char *_gdk_win32_message_to_string (UINT msg);
|
|
|
|
char *_gdk_win32_key_to_string (LONG lParam);
|
|
|
|
char *_gdk_win32_cf_to_string (UINT format);
|
|
|
|
char *_gdk_win32_rect_to_string (const RECT *rect);
|
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
|
|
|
|
2020-02-16 16:09:02 +00:00
|
|
|
void _gdk_win32_print_event (GdkEvent *event);
|
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
|
|
|
|
2020-07-24 18:40:36 +00:00
|
|
|
void _gdk_win32_api_failed (const char *where,
|
|
|
|
const char *api);
|
|
|
|
void _gdk_other_api_failed (const char *where,
|
|
|
|
const char *api);
|
Large changes to the Win32 backend, partially made necessary by the
2000-05-02 Tor Lillqvist <tml@iki.fi>
Large changes to the Win32 backend, partially made necessary by
the changes to the backend-independent internal
structures. Attempts to implement similar backing store stuff as
on X11. The current (CVS) version of the Win32 backend is *not* as
stable as it was before the no-flicker branch was merged. A
zipfile with that version is available from
http://www.gimp.org/win32/. That should be use by "production"
code until this CVS version is usable. (But note, the Win32
backend has never been claimed to be "production quality".)
* README.win32: Add the above comment about versions.
* gdk/gdkwindow.c: Don't use backing store for now on Win32.
* gdk/gdk.def: Update.
* gdk/gdkfont.h: Declare temporary Win32-only functions. Will
presumably be replaced by some more better mechanism as 1.4 gets
closer to release shape.
* gdk/makefile.{cygwin,msc}: Update.
* gdk/win32/*.c: Correct inclusions of the backend-specific and
internal headers. Change code according to changes in these. Use
gdk_drawable_*, not gdk_window_* where necessary.
* gdk/win32/gdkdnd-win32.c: Use MISC selector for GDK_NOTE, not
our old DND.
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_text): Don't try
to interpret single characters as UTF-8. Thanks to Hans Breuer.
Use correct function name in warning messages.
* gdk/win32/gdkevents-win32.c: Use correct parameter lists for the
GSourceFuncs gdk_event_prepare and gdk_event_check.
(gdk_event_get_graphics_expose): Do implement, use
PeekMessage. Thanks to Hans Breuer.
(event_mask_string): Debugging function to print an GdkEventMask.
(gdk_pointer_grab): Use it.
* gdk/win32/gdkfont-win32.c: The Unicode subrange that the
(old) book I used claimed was Hangul actually is CJK Unified
Ideographs Extension A. Also, Hangul Syllables were missing.
Improve logging.
* gdk/win32/gdkgc-win32.c: Largish changes.
* gdk/win32/gdkim-win32.c (gdk_set_locale): Use
g_win32_getlocale() from GLib, and not setlocale() to get current
locale name.
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkwin32.h: Move stuff from gdkprivate-win32.h to
gdkwin32.h, similarily as in the X11 backend.
* gdk/win32/gdkwindow-win32.c (gdk_propagate_shapes): Bugfix,
assignment was used instead of equals in if test. Thanks to Hans
Breuer.
* gdk/win32/makefile.{cygwin,msc}
* gtk/makefile.{cygwin,msc}: Updates. Better kludge to get the
path to the Win32 headers that works also with the mingw compiler.
* gtk/gtkstyle.c: Include <string.h>.
2000-05-01 22:06:49 +00:00
|
|
|
|
2009-10-21 18:46:44 +00:00
|
|
|
#define WIN32_API_FAILED(api) _gdk_win32_api_failed (G_STRLOC , api)
|
2006-08-29 23:01:53 +00:00
|
|
|
#define WIN32_GDI_FAILED(api) WIN32_API_FAILED (api)
|
2009-10-21 18:46:44 +00:00
|
|
|
#define OTHER_API_FAILED(api) _gdk_other_api_failed (G_STRLOC, api)
|
2015-04-29 07:31:08 +00:00
|
|
|
|
2021-07-09 13:17:17 +00:00
|
|
|
#define WIN32_API_FAILED_LOG_ONCE(api) G_STMT_START { static gboolean logged = 0; if (!logged) { _gdk_win32_api_failed (G_STRLOC , api); logged = 1; }} G_STMT_END
|
|
|
|
|
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
|
|
|
/* These two macros call a GDI or other Win32 API and if the return
|
|
|
|
* value is zero or NULL, print a warning message. The majority of GDI
|
|
|
|
* calls return zero or NULL on failure. The value of the macros is nonzero
|
|
|
|
* if the call succeeded, zero otherwise.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define GDI_CALL(api, arglist) (api arglist ? 1 : (WIN32_GDI_FAILED (#api), 0))
|
|
|
|
#define API_CALL(api, arglist) (api arglist ? 1 : (WIN32_API_FAILED (#api), 0))
|
2015-04-29 07:31:08 +00:00
|
|
|
|
2022-05-04 12:56:48 +00:00
|
|
|
#define HR_LOG(hr)
|
|
|
|
|
|
|
|
#define HR_CHECK_RETURN(hr) { if G_UNLIKELY (FAILED (hr)) return; }
|
|
|
|
#define HR_CHECK_RETURN_VAL(hr, val) { if G_UNLIKELY (FAILED (hr)) return val; }
|
|
|
|
#define HR_CHECK_GOTO(hr, label) { if G_UNLIKELY (FAILED (hr)) goto label; }
|
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
extern LRESULT CALLBACK _gdk_win32_surface_procedure (HWND, UINT, WPARAM, LPARAM);
|
1999-11-17 00:45:37 +00:00
|
|
|
|
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
|
|
|
/* These are thread specific, but GDK/win32 works OK only when invoked
|
|
|
|
* from a single thread anyway.
|
|
|
|
*/
|
|
|
|
|
2017-08-11 07:00:41 +00:00
|
|
|
typedef enum {
|
|
|
|
GDK_WIN32_MODAL_OP_NONE = 0x0,
|
|
|
|
GDK_WIN32_MODAL_OP_SIZE = 0x1 << 0,
|
|
|
|
GDK_WIN32_MODAL_OP_MOVE = 0x1 << 1,
|
|
|
|
GDK_WIN32_MODAL_OP_MENU = 0x1 << 2,
|
|
|
|
GDK_WIN32_MODAL_OP_DND = 0x1 << 3
|
|
|
|
} GdkWin32ModalOpKind;
|
|
|
|
|
|
|
|
#define GDK_WIN32_MODAL_OP_SIZEMOVE_MASK (GDK_WIN32_MODAL_OP_SIZE | GDK_WIN32_MODAL_OP_MOVE)
|
|
|
|
|
2015-05-13 07:45:40 +00:00
|
|
|
void _gdk_win32_display_init_cursors (GdkWin32Display *display);
|
|
|
|
void _gdk_win32_display_finalize_cursors (GdkWin32Display *display);
|
|
|
|
void _gdk_win32_display_update_cursors (GdkWin32Display *display);
|
|
|
|
|
|
|
|
typedef struct _Win32CursorTheme Win32CursorTheme;
|
|
|
|
|
|
|
|
struct _Win32CursorTheme {
|
|
|
|
GHashTable *named_cursors;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef enum GdkWin32CursorLoadType {
|
|
|
|
GDK_WIN32_CURSOR_LOAD_FROM_FILE = 0,
|
|
|
|
GDK_WIN32_CURSOR_LOAD_FROM_RESOURCE_NULL = 1,
|
|
|
|
GDK_WIN32_CURSOR_LOAD_FROM_RESOURCE_THIS = 2,
|
|
|
|
GDK_WIN32_CURSOR_CREATE = 3,
|
2018-03-29 23:40:32 +00:00
|
|
|
GDK_WIN32_CURSOR_LOAD_FROM_RESOURCE_GTK = 4,
|
2015-05-13 07:45:40 +00:00
|
|
|
} GdkWin32CursorLoadType;
|
|
|
|
|
|
|
|
typedef struct _Win32Cursor Win32Cursor;
|
|
|
|
|
|
|
|
struct _Win32Cursor {
|
|
|
|
GdkWin32CursorLoadType load_type;
|
2024-05-06 12:27:33 +00:00
|
|
|
wchar_t *resource_name;
|
2020-07-24 13:54:49 +00:00
|
|
|
int width;
|
|
|
|
int height;
|
2015-05-13 07:45:40 +00:00
|
|
|
guint load_flags;
|
2020-07-24 13:54:49 +00:00
|
|
|
int xcursor_number;
|
2015-05-13 07:45:40 +00:00
|
|
|
};
|
|
|
|
|
2020-07-24 18:40:36 +00:00
|
|
|
Win32CursorTheme *win32_cursor_theme_load (const char *name,
|
2020-07-24 13:54:49 +00:00
|
|
|
int size);
|
2015-05-13 07:45:40 +00:00
|
|
|
Win32Cursor * win32_cursor_theme_get_cursor (Win32CursorTheme *theme,
|
2020-07-24 18:40:36 +00:00
|
|
|
const char *name);
|
2015-05-13 07:45:40 +00:00
|
|
|
void win32_cursor_theme_destroy (Win32CursorTheme *theme);
|
|
|
|
Win32CursorTheme *_gdk_win32_display_get_cursor_theme (GdkWin32Display *win32_display);
|
|
|
|
|
2024-02-09 17:59:54 +00:00
|
|
|
HICON _gdk_win32_create_hicon_for_texture (GdkTexture *texture,
|
|
|
|
gboolean is_icon,
|
|
|
|
int x,
|
|
|
|
int y);
|
|
|
|
|
2011-01-02 10:51:25 +00:00
|
|
|
gboolean _gdk_win32_display_has_pending (GdkDisplay *display);
|
|
|
|
void _gdk_win32_display_queue_events (GdkDisplay *display);
|
|
|
|
|
2016-07-13 11:41:35 +00:00
|
|
|
guint8 _gdk_win32_keymap_get_active_group (GdkWin32Keymap *keymap);
|
|
|
|
guint8 _gdk_win32_keymap_get_rshift_scancode (GdkWin32Keymap *keymap);
|
|
|
|
void _gdk_win32_keymap_set_active_layout (GdkWin32Keymap *keymap,
|
|
|
|
HKL hkl);
|
2022-01-05 14:44:49 +00:00
|
|
|
GdkModifierType _gdk_win32_keymap_get_mod_mask (GdkWin32Keymap *keymap);
|
2016-07-13 11:41:35 +00:00
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
/* stray GdkSurfaceImplWin32 members */
|
2024-08-19 10:49:17 +00:00
|
|
|
void _gdk_win32_surface_register_dnd (GdkSurface *surface);
|
|
|
|
void _gdk_win32_surface_unregister_dnd (GdkSurface *surface);
|
GDK W32: Adapt to GdkDrop and GdkDragContext changes
* Remove clipdrop->dnd_target_state, it's not used anymore
* Remove non-functioning _gdk_dropfiles_store(), store dropfiles
list in GdkWin32Drop instead
* Fix multiple comment typos
* Fix _gdk_win32_get_clipboard_format_name_as_interned_mimetype() to
leave names that look like mime/types alone
* Refactor _gdk_win32_add_w32format_to_pairs() to populate
GdkContentFormatsBuilder directly, instead of making a GList
* Rename context -> drag (still using GdkDragContext type,
but [almost?] all variables and comments say "drag" now)
* Rename GdkDropContext -> GdkDrop
* Rename some parameter names for clarity
* Rewrite local protocol to look more like OLE2 protocol
instead of mirroring the structure of the X11 API.
* Add handle_events field to GdkWin32DragContext,
to shut off event handling (temporary fix until GTK is patched up)
* Remove _gdk_win32_drag_context_find() - the drag object is stored
in GdkDrop instead. Use _gdk_win32_find_drag_for_dest_surface()
to get it initially.
* Remove target_ctx_for_window, droptarget context is stored
in the surface instead.
* Call gdk_drag_context_set_cursor() just like wayland backend does
(slightly broken for now)
* Clean up the action choosing code (filter source actions by using
keyboard state, pass that to GTK, get all actions supported by GTK in
response, match them up with filtered source actions, return the
result, falling back to COPY in case of multiple actions)
* Check drag_win32->protocol instead of the use_ole2_dnd variable where
possible
* Remove protocol checks from functions that are only used by the local
protocol
* Use event state to manufacture the keyboard state for WM_MOUSEMOVE
* Change function names printed by GDK_NOTE to name the actual
functions, not their theoretical generic GDK stack ancestors
* Consistently use drag_win32 and drop_win32 variables instead of a mix
of that and win32_drag/win32_drop
* Return FALSE from button handler to ensure that GTK gets the button
event to break implicit grab
* Emit leave event on failed idroptarget_drop() calls
2018-06-05 23:03:51 +00:00
|
|
|
|
2024-08-19 10:49:17 +00:00
|
|
|
GdkDrag *_gdk_win32_surface_drag_begin (GdkSurface *surface,
|
2018-07-02 16:04:51 +00:00
|
|
|
GdkDevice *device,
|
|
|
|
GdkContentProvider *content,
|
|
|
|
GdkDragAction actions,
|
2020-05-17 21:49:02 +00:00
|
|
|
double x_root,
|
|
|
|
double y_root);
|
2011-01-02 10:51:25 +00:00
|
|
|
|
2024-09-12 04:57:50 +00:00
|
|
|
/* miscellaneous items (property setup, language notification, keymap serial) */
|
|
|
|
gboolean gdk_win32_display_get_setting (GdkDisplay *display,
|
|
|
|
const char *name,
|
|
|
|
GValue *value);
|
|
|
|
void gdk_win32_display_lang_notification_init (GdkWin32Display *display);
|
|
|
|
void gdk_win32_display_lang_notification_exit (GdkWin32Display *display);
|
|
|
|
void gdk_win32_display_set_input_locale (GdkWin32Display *display,
|
|
|
|
HKL input_locale);
|
|
|
|
gboolean gdk_win32_display_input_locale_is_ime (GdkWin32Display *display);
|
|
|
|
GdkKeymap *gdk_win32_display_get_default_keymap (GdkWin32Display *display);
|
|
|
|
void gdk_win32_display_increment_keymap_serial (GdkWin32Display *display);
|
|
|
|
guint gdk_win32_display_get_keymap_serial (GdkWin32Display *display);
|
2024-08-20 08:12:56 +00:00
|
|
|
|
2011-01-02 10:51:25 +00:00
|
|
|
/* Stray GdkWin32Screen members */
|
2016-02-28 11:03:00 +00:00
|
|
|
void _gdk_win32_screen_on_displaychange_event (GdkWin32Screen *screen);
|
2011-01-02 10:51:25 +00:00
|
|
|
|
|
|
|
/* Distributed display manager implementation */
|
2020-07-24 18:40:36 +00:00
|
|
|
GdkDisplay *_gdk_win32_display_open (const char *display_name);
|
2011-06-09 18:45:20 +00:00
|
|
|
void _gdk_win32_append_event (GdkEvent *event);
|
2011-01-02 10:51:25 +00:00
|
|
|
|
2024-08-19 10:49:17 +00:00
|
|
|
void _gdk_win32_surface_handle_aerosnap (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
GdkWin32AeroSnapCombo combo);
|
2016-03-08 02:33:47 +00:00
|
|
|
|
2024-08-23 03:47:03 +00:00
|
|
|
gboolean gdk_win32_get_surface_hwnd_rect (GdkSurface *surface,
|
2016-02-06 12:06:41 +00:00
|
|
|
RECT *rect);
|
2024-08-19 10:49:17 +00:00
|
|
|
void _gdk_win32_do_emit_configure_event (GdkSurface *surface,
|
2016-02-06 12:06:41 +00:00
|
|
|
RECT rect);
|
2024-08-19 10:49:17 +00:00
|
|
|
void gdk_win32_surface_do_move_resize_drag (GdkSurface *surface,
|
2020-07-24 13:54:49 +00:00
|
|
|
int x,
|
|
|
|
int y);
|
2024-08-19 10:49:17 +00:00
|
|
|
void gdk_win32_surface_end_move_resize_drag (GdkSurface *surface);
|
|
|
|
gboolean _gdk_win32_surface_fill_min_max_info (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
MINMAXINFO *mmi);
|
2016-02-06 12:06:41 +00:00
|
|
|
|
2024-08-19 10:49:17 +00:00
|
|
|
gboolean _gdk_win32_surface_lacks_wm_decorations (GdkSurface *surface);
|
2016-02-23 09:20:55 +00:00
|
|
|
|
2020-03-09 17:25:06 +00:00
|
|
|
void gdk_win32_surface_show (GdkSurface *surface,
|
|
|
|
gboolean already_mapped);
|
2020-03-12 11:01:30 +00:00
|
|
|
void gdk_win32_surface_raise (GdkSurface *surface);
|
|
|
|
void gdk_win32_surface_set_opacity (GdkSurface *surface,
|
|
|
|
double opacity);
|
|
|
|
void gdk_win32_surface_resize (GdkSurface *surface,
|
|
|
|
int width,
|
|
|
|
int height);
|
2020-03-09 17:25:06 +00:00
|
|
|
|
2024-08-23 03:42:28 +00:00
|
|
|
BOOL WINAPI GtkShowSurfaceHWND (GdkSurface *surface,
|
|
|
|
int cmd_show);
|
GDK-Win32/4.0: Enable HiDPI support for Windows
This enables HiDPI support for GTK+ on Windows, so that the
fonts and window look better on HiDPI displays. Notes for the current
work:
-The DPI awareness enabling can be disabled if and only if an application
manifest is not embedded in the app to enable DPI awareness AND a user
compatibility setting is not set to limit DPI awareness for the app, via
the envvar GDK_WIN32_DISABLE_HIDPI. The app manifest/user setting for
DPI awareness will always win against the envvar, and so the HiDPI items
will be always setup in such scenarios, unless DPI awareness is disabled.
-Both automatic detection for the scaling factor and setting the scale
factor using the GDK_SCALE envvar are supported, where the envvar takes
precedence, which will therefore disable automatic scaling when
resolution changes.
-We now default to a per-system DPI awareness model, which means that we
do not handle WM_DPICHANGED, unless one sets the
GDK_WIN32_PER_MONITOR_HIDPI envvar, where notes for it are in the
following point.
-Automatic scaling during WM_DISPLAYCHANGE is handled (DPI setting change of
current monitor) is now supported. WM_DPICHANGED is handled as well,
except that the window positioning during the change of scaling still
needs to be refined, a change in GDK itself may be required for this.
-I am unable to test the wintab items because I don't have such devices
around.
https://bugzilla.gnome.org/show_bug.cgi?id=768081
2016-06-27 05:16:43 +00:00
|
|
|
|
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
|
|
|
/* Initialization */
|
2018-03-20 10:40:08 +00:00
|
|
|
void _gdk_win32_surfaceing_init (void);
|
2018-03-24 16:27:11 +00:00
|
|
|
void _gdk_drag_init (void);
|
2016-03-05 18:02:15 +00:00
|
|
|
void _gdk_events_init (GdkDisplay *display);
|
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
|
|
|
|
2022-01-05 14:44:49 +00:00
|
|
|
typedef enum _GdkWin32ProcessorCheckType
|
|
|
|
{
|
|
|
|
GDK_WIN32_ARM64,
|
|
|
|
GDK_WIN32_WOW64,
|
|
|
|
} GdkWin32ProcessorCheckType;
|
|
|
|
|
|
|
|
gboolean _gdk_win32_check_processor (GdkWin32ProcessorCheckType check_type);
|
|
|
|
|
2022-08-24 11:44:32 +00:00
|
|
|
GdkPixbuf *gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon,
|
|
|
|
double *x_hot,
|
|
|
|
double *y_hot);
|
2024-08-19 10:49:17 +00:00
|
|
|
void gdk_win32_set_modal_dialog_libgtk_only (HWND hwnd);
|
2022-08-24 11:44:32 +00:00
|
|
|
|
2023-03-23 15:27:17 +00:00
|
|
|
extern IMAGE_DOS_HEADER __ImageBase;
|
|
|
|
|
|
|
|
static inline HMODULE
|
|
|
|
this_module (void)
|
|
|
|
{
|
|
|
|
return (HMODULE) &__ImageBase;
|
|
|
|
}
|
|
|
|
|