forked from AuroraMiddleware/gtk
Store just pixel value of background colour.
2000-03-04 Tor Lillqvist <tml@iki.fi> * gdk/win32/gdkprivate-win32.h (struct _GdkWindowWin32Data): Store just pixel value of background colour. * gdk/win32/gdkgc-win32.c (gdk_colormap_color): New function containing code snippet previously duplicated in a couple of places. * gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_points): Use gdk_colormap_color. * gdk/win32/gdkevents-win32.c (gdk_event_translate): Generate GDK_SCROLL events for WM_MOUSEWHEEL messages. Don't generate events for autorepeated Shift, Control and Alt keys. Use gdk_colormap_color. * gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): If the pointer is inside the window the cursor of which we are setting, call SetCursor immediately. * gdk/win32/makefile.cygwin * gtk/makefile.cygwin: If we don't have the build number stamp file, use zero. * gtk/gtkcompat.h.in: Define gtk_paned_gutter_size and gtk_paned_set_gutter_size as empty. * gtk/gtk.def: Remove gtk_paned_set_gutter_size.
This commit is contained in:
parent
2468916bcc
commit
5a4e1abbfc
30
ChangeLog
30
ChangeLog
@ -1,3 +1,33 @@
|
|||||||
|
2000-03-04 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* gdk/win32/gdkprivate-win32.h (struct _GdkWindowWin32Data): Store
|
||||||
|
just pixel value of background colour.
|
||||||
|
|
||||||
|
* gdk/win32/gdkgc-win32.c (gdk_colormap_color): New function
|
||||||
|
containing code snippet previously duplicated in a couple of
|
||||||
|
places.
|
||||||
|
|
||||||
|
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_points): Use
|
||||||
|
gdk_colormap_color.
|
||||||
|
|
||||||
|
* gdk/win32/gdkevents-win32.c (gdk_event_translate): Generate
|
||||||
|
GDK_SCROLL events for WM_MOUSEWHEEL messages. Don't generate
|
||||||
|
events for autorepeated Shift, Control and Alt keys. Use
|
||||||
|
gdk_colormap_color.
|
||||||
|
|
||||||
|
* gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): If the
|
||||||
|
pointer is inside the window the cursor of which we are setting,
|
||||||
|
call SetCursor immediately.
|
||||||
|
|
||||||
|
* gdk/win32/makefile.cygwin
|
||||||
|
* gtk/makefile.cygwin: If we don't have the build number stamp
|
||||||
|
file, use zero.
|
||||||
|
|
||||||
|
* gtk/gtkcompat.h.in: Define gtk_paned_gutter_size and
|
||||||
|
gtk_paned_set_gutter_size as empty.
|
||||||
|
|
||||||
|
* gtk/gtk.def: Remove gtk_paned_set_gutter_size.
|
||||||
|
|
||||||
Tue Feb 29 13:10:00 GMT 2000 Tony Gale <gale@gtk.org>
|
Tue Feb 29 13:10:00 GMT 2000 Tony Gale <gale@gtk.org>
|
||||||
|
|
||||||
* gdk/gdkwindow.h gdk/x11/gxid.c gtk/gtkclist.c gtk/gtkclist.h
|
* gdk/gdkwindow.h gdk/x11/gxid.c gtk/gtkclist.c gtk/gtkclist.h
|
||||||
|
@ -1,3 +1,33 @@
|
|||||||
|
2000-03-04 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* gdk/win32/gdkprivate-win32.h (struct _GdkWindowWin32Data): Store
|
||||||
|
just pixel value of background colour.
|
||||||
|
|
||||||
|
* gdk/win32/gdkgc-win32.c (gdk_colormap_color): New function
|
||||||
|
containing code snippet previously duplicated in a couple of
|
||||||
|
places.
|
||||||
|
|
||||||
|
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_points): Use
|
||||||
|
gdk_colormap_color.
|
||||||
|
|
||||||
|
* gdk/win32/gdkevents-win32.c (gdk_event_translate): Generate
|
||||||
|
GDK_SCROLL events for WM_MOUSEWHEEL messages. Don't generate
|
||||||
|
events for autorepeated Shift, Control and Alt keys. Use
|
||||||
|
gdk_colormap_color.
|
||||||
|
|
||||||
|
* gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): If the
|
||||||
|
pointer is inside the window the cursor of which we are setting,
|
||||||
|
call SetCursor immediately.
|
||||||
|
|
||||||
|
* gdk/win32/makefile.cygwin
|
||||||
|
* gtk/makefile.cygwin: If we don't have the build number stamp
|
||||||
|
file, use zero.
|
||||||
|
|
||||||
|
* gtk/gtkcompat.h.in: Define gtk_paned_gutter_size and
|
||||||
|
gtk_paned_set_gutter_size as empty.
|
||||||
|
|
||||||
|
* gtk/gtk.def: Remove gtk_paned_set_gutter_size.
|
||||||
|
|
||||||
Tue Feb 29 13:10:00 GMT 2000 Tony Gale <gale@gtk.org>
|
Tue Feb 29 13:10:00 GMT 2000 Tony Gale <gale@gtk.org>
|
||||||
|
|
||||||
* gdk/gdkwindow.h gdk/x11/gxid.c gtk/gtkclist.c gtk/gtkclist.h
|
* gdk/gdkwindow.h gdk/x11/gxid.c gtk/gtkclist.c gtk/gtkclist.h
|
||||||
|
@ -1,3 +1,33 @@
|
|||||||
|
2000-03-04 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* gdk/win32/gdkprivate-win32.h (struct _GdkWindowWin32Data): Store
|
||||||
|
just pixel value of background colour.
|
||||||
|
|
||||||
|
* gdk/win32/gdkgc-win32.c (gdk_colormap_color): New function
|
||||||
|
containing code snippet previously duplicated in a couple of
|
||||||
|
places.
|
||||||
|
|
||||||
|
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_points): Use
|
||||||
|
gdk_colormap_color.
|
||||||
|
|
||||||
|
* gdk/win32/gdkevents-win32.c (gdk_event_translate): Generate
|
||||||
|
GDK_SCROLL events for WM_MOUSEWHEEL messages. Don't generate
|
||||||
|
events for autorepeated Shift, Control and Alt keys. Use
|
||||||
|
gdk_colormap_color.
|
||||||
|
|
||||||
|
* gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): If the
|
||||||
|
pointer is inside the window the cursor of which we are setting,
|
||||||
|
call SetCursor immediately.
|
||||||
|
|
||||||
|
* gdk/win32/makefile.cygwin
|
||||||
|
* gtk/makefile.cygwin: If we don't have the build number stamp
|
||||||
|
file, use zero.
|
||||||
|
|
||||||
|
* gtk/gtkcompat.h.in: Define gtk_paned_gutter_size and
|
||||||
|
gtk_paned_set_gutter_size as empty.
|
||||||
|
|
||||||
|
* gtk/gtk.def: Remove gtk_paned_set_gutter_size.
|
||||||
|
|
||||||
Tue Feb 29 13:10:00 GMT 2000 Tony Gale <gale@gtk.org>
|
Tue Feb 29 13:10:00 GMT 2000 Tony Gale <gale@gtk.org>
|
||||||
|
|
||||||
* gdk/gdkwindow.h gdk/x11/gxid.c gtk/gtkclist.c gtk/gtkclist.h
|
* gdk/gdkwindow.h gdk/x11/gxid.c gtk/gtkclist.c gtk/gtkclist.h
|
||||||
|
@ -1,3 +1,33 @@
|
|||||||
|
2000-03-04 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* gdk/win32/gdkprivate-win32.h (struct _GdkWindowWin32Data): Store
|
||||||
|
just pixel value of background colour.
|
||||||
|
|
||||||
|
* gdk/win32/gdkgc-win32.c (gdk_colormap_color): New function
|
||||||
|
containing code snippet previously duplicated in a couple of
|
||||||
|
places.
|
||||||
|
|
||||||
|
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_points): Use
|
||||||
|
gdk_colormap_color.
|
||||||
|
|
||||||
|
* gdk/win32/gdkevents-win32.c (gdk_event_translate): Generate
|
||||||
|
GDK_SCROLL events for WM_MOUSEWHEEL messages. Don't generate
|
||||||
|
events for autorepeated Shift, Control and Alt keys. Use
|
||||||
|
gdk_colormap_color.
|
||||||
|
|
||||||
|
* gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): If the
|
||||||
|
pointer is inside the window the cursor of which we are setting,
|
||||||
|
call SetCursor immediately.
|
||||||
|
|
||||||
|
* gdk/win32/makefile.cygwin
|
||||||
|
* gtk/makefile.cygwin: If we don't have the build number stamp
|
||||||
|
file, use zero.
|
||||||
|
|
||||||
|
* gtk/gtkcompat.h.in: Define gtk_paned_gutter_size and
|
||||||
|
gtk_paned_set_gutter_size as empty.
|
||||||
|
|
||||||
|
* gtk/gtk.def: Remove gtk_paned_set_gutter_size.
|
||||||
|
|
||||||
Tue Feb 29 13:10:00 GMT 2000 Tony Gale <gale@gtk.org>
|
Tue Feb 29 13:10:00 GMT 2000 Tony Gale <gale@gtk.org>
|
||||||
|
|
||||||
* gdk/gdkwindow.h gdk/x11/gxid.c gtk/gtkclist.c gtk/gtkclist.h
|
* gdk/gdkwindow.h gdk/x11/gxid.c gtk/gtkclist.c gtk/gtkclist.h
|
||||||
|
@ -1,3 +1,33 @@
|
|||||||
|
2000-03-04 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* gdk/win32/gdkprivate-win32.h (struct _GdkWindowWin32Data): Store
|
||||||
|
just pixel value of background colour.
|
||||||
|
|
||||||
|
* gdk/win32/gdkgc-win32.c (gdk_colormap_color): New function
|
||||||
|
containing code snippet previously duplicated in a couple of
|
||||||
|
places.
|
||||||
|
|
||||||
|
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_points): Use
|
||||||
|
gdk_colormap_color.
|
||||||
|
|
||||||
|
* gdk/win32/gdkevents-win32.c (gdk_event_translate): Generate
|
||||||
|
GDK_SCROLL events for WM_MOUSEWHEEL messages. Don't generate
|
||||||
|
events for autorepeated Shift, Control and Alt keys. Use
|
||||||
|
gdk_colormap_color.
|
||||||
|
|
||||||
|
* gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): If the
|
||||||
|
pointer is inside the window the cursor of which we are setting,
|
||||||
|
call SetCursor immediately.
|
||||||
|
|
||||||
|
* gdk/win32/makefile.cygwin
|
||||||
|
* gtk/makefile.cygwin: If we don't have the build number stamp
|
||||||
|
file, use zero.
|
||||||
|
|
||||||
|
* gtk/gtkcompat.h.in: Define gtk_paned_gutter_size and
|
||||||
|
gtk_paned_set_gutter_size as empty.
|
||||||
|
|
||||||
|
* gtk/gtk.def: Remove gtk_paned_set_gutter_size.
|
||||||
|
|
||||||
Tue Feb 29 13:10:00 GMT 2000 Tony Gale <gale@gtk.org>
|
Tue Feb 29 13:10:00 GMT 2000 Tony Gale <gale@gtk.org>
|
||||||
|
|
||||||
* gdk/gdkwindow.h gdk/x11/gxid.c gtk/gtkclist.c gtk/gtkclist.h
|
* gdk/gdkwindow.h gdk/x11/gxid.c gtk/gtkclist.c gtk/gtkclist.h
|
||||||
|
@ -1,3 +1,33 @@
|
|||||||
|
2000-03-04 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* gdk/win32/gdkprivate-win32.h (struct _GdkWindowWin32Data): Store
|
||||||
|
just pixel value of background colour.
|
||||||
|
|
||||||
|
* gdk/win32/gdkgc-win32.c (gdk_colormap_color): New function
|
||||||
|
containing code snippet previously duplicated in a couple of
|
||||||
|
places.
|
||||||
|
|
||||||
|
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_points): Use
|
||||||
|
gdk_colormap_color.
|
||||||
|
|
||||||
|
* gdk/win32/gdkevents-win32.c (gdk_event_translate): Generate
|
||||||
|
GDK_SCROLL events for WM_MOUSEWHEEL messages. Don't generate
|
||||||
|
events for autorepeated Shift, Control and Alt keys. Use
|
||||||
|
gdk_colormap_color.
|
||||||
|
|
||||||
|
* gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): If the
|
||||||
|
pointer is inside the window the cursor of which we are setting,
|
||||||
|
call SetCursor immediately.
|
||||||
|
|
||||||
|
* gdk/win32/makefile.cygwin
|
||||||
|
* gtk/makefile.cygwin: If we don't have the build number stamp
|
||||||
|
file, use zero.
|
||||||
|
|
||||||
|
* gtk/gtkcompat.h.in: Define gtk_paned_gutter_size and
|
||||||
|
gtk_paned_set_gutter_size as empty.
|
||||||
|
|
||||||
|
* gtk/gtk.def: Remove gtk_paned_set_gutter_size.
|
||||||
|
|
||||||
Tue Feb 29 13:10:00 GMT 2000 Tony Gale <gale@gtk.org>
|
Tue Feb 29 13:10:00 GMT 2000 Tony Gale <gale@gtk.org>
|
||||||
|
|
||||||
* gdk/gdkwindow.h gdk/x11/gxid.c gtk/gtkclist.c gtk/gtkclist.h
|
* gdk/gdkwindow.h gdk/x11/gxid.c gtk/gtkclist.c gtk/gtkclist.h
|
||||||
|
@ -1,3 +1,33 @@
|
|||||||
|
2000-03-04 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* gdk/win32/gdkprivate-win32.h (struct _GdkWindowWin32Data): Store
|
||||||
|
just pixel value of background colour.
|
||||||
|
|
||||||
|
* gdk/win32/gdkgc-win32.c (gdk_colormap_color): New function
|
||||||
|
containing code snippet previously duplicated in a couple of
|
||||||
|
places.
|
||||||
|
|
||||||
|
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_points): Use
|
||||||
|
gdk_colormap_color.
|
||||||
|
|
||||||
|
* gdk/win32/gdkevents-win32.c (gdk_event_translate): Generate
|
||||||
|
GDK_SCROLL events for WM_MOUSEWHEEL messages. Don't generate
|
||||||
|
events for autorepeated Shift, Control and Alt keys. Use
|
||||||
|
gdk_colormap_color.
|
||||||
|
|
||||||
|
* gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): If the
|
||||||
|
pointer is inside the window the cursor of which we are setting,
|
||||||
|
call SetCursor immediately.
|
||||||
|
|
||||||
|
* gdk/win32/makefile.cygwin
|
||||||
|
* gtk/makefile.cygwin: If we don't have the build number stamp
|
||||||
|
file, use zero.
|
||||||
|
|
||||||
|
* gtk/gtkcompat.h.in: Define gtk_paned_gutter_size and
|
||||||
|
gtk_paned_set_gutter_size as empty.
|
||||||
|
|
||||||
|
* gtk/gtk.def: Remove gtk_paned_set_gutter_size.
|
||||||
|
|
||||||
Tue Feb 29 13:10:00 GMT 2000 Tony Gale <gale@gtk.org>
|
Tue Feb 29 13:10:00 GMT 2000 Tony Gale <gale@gtk.org>
|
||||||
|
|
||||||
* gdk/gdkwindow.h gdk/x11/gxid.c gtk/gtkclist.c gtk/gtkclist.h
|
* gdk/gdkwindow.h gdk/x11/gxid.c gtk/gtkclist.c gtk/gtkclist.h
|
||||||
|
@ -5,10 +5,8 @@ http://www.iki.fi/tml/gimp/win32/ .
|
|||||||
|
|
||||||
To build GTk+ on Win32, you need either the Microsoft compiler and
|
To build GTk+ on Win32, you need either the Microsoft compiler and
|
||||||
tools, or gcc-2.95 or later running under cygwin-b20.1 or
|
tools, or gcc-2.95 or later running under cygwin-b20.1 or
|
||||||
later. Compile in gdk\win32 and gtk with `nmake -f makefile.msc` or
|
later. Compile in gdk\win32, gdk and gtk with `nmake -f makefile.msc` or
|
||||||
`make -f makefile.cygwin`. Before doing a install, check the BIN
|
`make -f makefile.cygwin`.
|
||||||
definition in gdk\win32\makefile.msc (or makefile.cygwin) and
|
|
||||||
gtk\makefile.msc (or makefile.cygwin).
|
|
||||||
|
|
||||||
See the README.win32 file in the GLib distribution for instructions
|
See the README.win32 file in the GLib distribution for instructions
|
||||||
how to build with gcc.
|
how to build with gcc.
|
||||||
|
@ -726,26 +726,26 @@ gdk_win32_draw_points (GdkDrawable *drawable,
|
|||||||
GdkPoint *points,
|
GdkPoint *points,
|
||||||
gint npoints)
|
gint npoints)
|
||||||
{
|
{
|
||||||
GdkGCPrivate *gc_private = (GdkGCPrivate*) gc;
|
|
||||||
GdkGCWin32Data *gc_data = GDK_GC_WIN32DATA (gc_private);
|
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
COLORREF fg;
|
COLORREF fg;
|
||||||
|
GdkGCPrivate *gc_private = (GdkGCPrivate*) gc;
|
||||||
|
GdkGCWin32Data *gc_data = GDK_GC_WIN32DATA (gc_private);
|
||||||
|
GdkDrawablePrivate *drawable_private = (GdkDrawablePrivate *) drawable;
|
||||||
|
GdkColormapPrivateWin32 *colormap_private =
|
||||||
|
(GdkColormapPrivateWin32 *) drawable_private->colormap;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
GDK_NOTE (MISC, g_print ("gdk_draw_points: %#x destdc: (%d) %#x "
|
hdc = gdk_gc_predraw (drawable, gc_private, 0);
|
||||||
"npoints: %d\n",
|
|
||||||
GDK_DRAWABLE_XID (drawable),
|
fg = gdk_colormap_color (colormap_private, gc_data->foreground);
|
||||||
gc_private, hdc,
|
|
||||||
npoints));
|
|
||||||
|
|
||||||
hdc = gdk_gc_predraw (drawable, gc_private, GDK_GC_FOREGROUND);
|
GDK_NOTE (MISC, g_print ("gdk_draw_points: %#x %dx%.06x\n",
|
||||||
fg = GetTextColor (hdc);
|
GDK_DRAWABLE_XID (drawable), npoints, fg));
|
||||||
|
|
||||||
for (i = 0; i < npoints; i++)
|
for (i = 0; i < npoints; i++)
|
||||||
{
|
SetPixel (hdc, points[i].x, points[i].y, fg);
|
||||||
SetPixel (hdc, points[i].x, points[i].y, fg);
|
|
||||||
}
|
gdk_gc_postdraw (drawable, gc_private, 0);
|
||||||
gdk_gc_postdraw (drawable, gc_private, GDK_GC_FOREGROUND);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -2594,6 +2594,7 @@ print_event (GdkEvent *event)
|
|||||||
case GDK_CLIENT_EVENT: g_print ("GDK_CLIENT_EVENT "); break;
|
case GDK_CLIENT_EVENT: g_print ("GDK_CLIENT_EVENT "); break;
|
||||||
case GDK_VISIBILITY_NOTIFY: g_print ("GDK_VISIBILITY_NOTIFY "); break;
|
case GDK_VISIBILITY_NOTIFY: g_print ("GDK_VISIBILITY_NOTIFY "); break;
|
||||||
case GDK_NO_EXPOSE: g_print ("GDK_NO_EXPOSE "); break;
|
case GDK_NO_EXPOSE: g_print ("GDK_NO_EXPOSE "); break;
|
||||||
|
case GDK_SCROLL: g_print ("GDK_SCROLL "); break;
|
||||||
}
|
}
|
||||||
g_print ("%#x ", GDK_DRAWABLE_XID (event->any.window));
|
g_print ("%#x ", GDK_DRAWABLE_XID (event->any.window));
|
||||||
|
|
||||||
@ -2638,12 +2639,21 @@ print_event (GdkEvent *event)
|
|||||||
break;
|
break;
|
||||||
case GDK_ENTER_NOTIFY:
|
case GDK_ENTER_NOTIFY:
|
||||||
case GDK_LEAVE_NOTIFY:
|
case GDK_LEAVE_NOTIFY:
|
||||||
g_print (" %s",
|
g_print ("%s ",
|
||||||
(event->crossing.detail == GDK_NOTIFY_INFERIOR ? "INFERIOR" :
|
(event->crossing.detail == GDK_NOTIFY_INFERIOR ? "INFERIOR" :
|
||||||
(event->crossing.detail == GDK_NOTIFY_ANCESTOR ? "ANCESTOR" :
|
(event->crossing.detail == GDK_NOTIFY_ANCESTOR ? "ANCESTOR" :
|
||||||
(event->crossing.detail == GDK_NOTIFY_NONLINEAR ? "NONLINEAR" :
|
(event->crossing.detail == GDK_NOTIFY_NONLINEAR ? "NONLINEAR" :
|
||||||
"???"))));
|
"???"))));
|
||||||
break;
|
break;
|
||||||
|
case GDK_SCROLL:
|
||||||
|
g_print ("%s ",
|
||||||
|
(event->scroll.direction == GDK_SCROLL_UP ? "UP" :
|
||||||
|
(event->scroll.direction == GDK_SCROLL_DOWN ? "DOWN" :
|
||||||
|
(event->scroll.direction == GDK_SCROLL_LEFT ? "LEFT" :
|
||||||
|
(event->scroll.direction == GDK_SCROLL_RIGHT ? "RIGHT" :
|
||||||
|
"???")))));
|
||||||
|
print_event_state (event->scroll.state);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
g_print ("\n");
|
g_print ("\n");
|
||||||
}
|
}
|
||||||
@ -2659,7 +2669,7 @@ synthesize_crossing_events (GdkWindow *window,
|
|||||||
*/
|
*/
|
||||||
if (p_TrackMouseEvent == NULL
|
if (p_TrackMouseEvent == NULL
|
||||||
&& curWnd
|
&& curWnd
|
||||||
&& (GDK_WINDOW_WIN32DATA(curWnd)->event_mask & GDK_LEAVE_NOTIFY_MASK))
|
&& (GDK_WINDOW_WIN32DATA (curWnd)->event_mask & GDK_LEAVE_NOTIFY_MASK))
|
||||||
{
|
{
|
||||||
GDK_NOTE (EVENTS, g_print ("synthesizing LEAVE_NOTIFY event\n"));
|
GDK_NOTE (EVENTS, g_print ("synthesizing LEAVE_NOTIFY event\n"));
|
||||||
|
|
||||||
@ -2688,7 +2698,7 @@ synthesize_crossing_events (GdkWindow *window,
|
|||||||
GDK_NOTE (EVENTS, print_event (event));
|
GDK_NOTE (EVENTS, print_event (event));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GDK_WINDOW_WIN32DATA(window)->event_mask & GDK_ENTER_NOTIFY_MASK)
|
if (GDK_WINDOW_WIN32DATA (window)->event_mask & GDK_ENTER_NOTIFY_MASK)
|
||||||
{
|
{
|
||||||
GDK_NOTE (EVENTS, g_print ("synthesizing ENTER_NOTIFY event\n"));
|
GDK_NOTE (EVENTS, g_print ("synthesizing ENTER_NOTIFY event\n"));
|
||||||
|
|
||||||
@ -2789,7 +2799,7 @@ propagate (GdkWindow **window,
|
|||||||
}
|
}
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
if ((*doesnt_want_it) (GDK_WINDOW_WIN32DATA(*window)->event_mask, xevent))
|
if ((*doesnt_want_it) (GDK_WINDOW_WIN32DATA (*window)->event_mask, xevent))
|
||||||
{
|
{
|
||||||
/* Owner doesn't want it, propagate to parent. */
|
/* Owner doesn't want it, propagate to parent. */
|
||||||
if (((GdkWindowPrivate *) *window)->parent == gdk_parent_root)
|
if (((GdkWindowPrivate *) *window)->parent == gdk_parent_root)
|
||||||
@ -2886,29 +2896,37 @@ doesnt_want_button_motion (gint mask,
|
|||||||
&& (mask & GDK_BUTTON3_MOTION_MASK)));
|
&& (mask & GDK_BUTTON3_MOTION_MASK)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
doesnt_want_scroll (gint mask,
|
||||||
|
MSG *xevent)
|
||||||
|
{
|
||||||
|
return !(mask & GDK_SCROLL_MASK);
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gdk_event_translate (GdkEvent *event,
|
gdk_event_translate (GdkEvent *event,
|
||||||
MSG *xevent,
|
MSG *xevent,
|
||||||
gboolean *ret_val_flagp,
|
gboolean *ret_val_flagp,
|
||||||
gint *ret_valp)
|
gint *ret_valp)
|
||||||
{
|
{
|
||||||
GdkWindow *window, *orig_window;
|
|
||||||
GdkColormapPrivateWin32 *colormap_private;
|
|
||||||
HWND owner;
|
|
||||||
DWORD pidActWin;
|
DWORD pidActWin;
|
||||||
DWORD pidThis;
|
DWORD pidThis;
|
||||||
DWORD dwStyle;
|
DWORD dwStyle;
|
||||||
PAINTSTRUCT paintstruct;
|
PAINTSTRUCT paintstruct;
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
|
HDC bgdc;
|
||||||
|
HGDIOBJ oldbitmap;
|
||||||
HBRUSH hbr;
|
HBRUSH hbr;
|
||||||
|
COLORREF bg;
|
||||||
RECT rect;
|
RECT rect;
|
||||||
POINT pt;
|
POINT pt;
|
||||||
MINMAXINFO *lpmmi;
|
MINMAXINFO *lpmmi;
|
||||||
|
HWND hwnd;
|
||||||
|
GdkWindow *window, *orig_window, *newwindow;
|
||||||
|
GdkColormapPrivateWin32 *colormap_private;
|
||||||
GdkEventMask mask;
|
GdkEventMask mask;
|
||||||
GdkPixmap *pixmap;
|
GdkPixmap *pixmap;
|
||||||
GdkDrawablePrivate *pixmap_private;
|
GdkDrawablePrivate *pixmap_private;
|
||||||
HDC bgdc;
|
|
||||||
HGDIOBJ oldbitmap;
|
|
||||||
int button;
|
int button;
|
||||||
int i, j, n, k;
|
int i, j, n, k;
|
||||||
gchar buf[256];
|
gchar buf[256];
|
||||||
@ -3074,9 +3092,9 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
GDK_NOTE (EVENTS,
|
GDK_NOTE (EVENTS,
|
||||||
g_print ("WM_INPUTLANGCHANGE: %#x charset %d locale %x\n",
|
g_print ("WM_INPUTLANGCHANGE: %#x charset %d locale %x\n",
|
||||||
xevent->hwnd, xevent->wParam, xevent->lParam));
|
xevent->hwnd, xevent->wParam, xevent->lParam));
|
||||||
GDK_WINDOW_WIN32DATA(window)->input_locale = (HKL) xevent->lParam;
|
GDK_WINDOW_WIN32DATA (window)->input_locale = (HKL) xevent->lParam;
|
||||||
TranslateCharsetInfo ((DWORD FAR *) xevent->wParam,
|
TranslateCharsetInfo ((DWORD FAR *) xevent->wParam,
|
||||||
&GDK_WINDOW_WIN32DATA(window)->charset_info,
|
&GDK_WINDOW_WIN32DATA (window)->charset_info,
|
||||||
TCI_SRCCHARSET);
|
TCI_SRCCHARSET);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -3149,15 +3167,29 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
case VK_RETURN:
|
case VK_RETURN:
|
||||||
event->key.keyval = GDK_Return; break;
|
event->key.keyval = GDK_Return; break;
|
||||||
case VK_SHIFT:
|
case VK_SHIFT:
|
||||||
event->key.keyval = GDK_Shift_L; break;
|
/* Don't let Shift auto-repeat */
|
||||||
|
if (xevent->message == WM_KEYDOWN
|
||||||
|
&& (xevent->lParam & 0x40000000))
|
||||||
|
ignore_WM_CHAR = FALSE;
|
||||||
|
else
|
||||||
|
event->key.keyval = GDK_Shift_L;
|
||||||
|
break;
|
||||||
case VK_CONTROL:
|
case VK_CONTROL:
|
||||||
if (xevent->lParam & 0x01000000)
|
/* And not Control either */
|
||||||
|
if (xevent->message == WM_KEYDOWN
|
||||||
|
&& (xevent->lParam & 0x40000000))
|
||||||
|
ignore_WM_CHAR = FALSE;
|
||||||
|
else if (xevent->lParam & 0x01000000)
|
||||||
event->key.keyval = GDK_Control_R;
|
event->key.keyval = GDK_Control_R;
|
||||||
else
|
else
|
||||||
event->key.keyval = GDK_Control_L;
|
event->key.keyval = GDK_Control_L;
|
||||||
break;
|
break;
|
||||||
case VK_MENU:
|
case VK_MENU:
|
||||||
if (xevent->lParam & 0x01000000)
|
/* And not Alt */
|
||||||
|
if (xevent->message == WM_KEYDOWN
|
||||||
|
&& (xevent->lParam & 0x40000000))
|
||||||
|
ignore_WM_CHAR = FALSE;
|
||||||
|
else if (xevent->lParam & 0x01000000)
|
||||||
{
|
{
|
||||||
/* AltGr key comes in as Control+Right Alt */
|
/* AltGr key comes in as Control+Right Alt */
|
||||||
if (GetKeyState (VK_CONTROL) < 0)
|
if (GetKeyState (VK_CONTROL) < 0)
|
||||||
@ -3370,30 +3402,30 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
event->key.window = window;
|
event->key.window = window;
|
||||||
return_val = !GDK_DRAWABLE_DESTROYED (window);
|
return_val = !GDK_DRAWABLE_DESTROYED (window);
|
||||||
if (return_val && (event->key.window == k_grab_window
|
if (return_val && (event->key.window == k_grab_window
|
||||||
|| (GDK_WINDOW_WIN32DATA(window)->event_mask & GDK_KEY_RELEASE_MASK)))
|
|| (GDK_WINDOW_WIN32DATA (window)->event_mask & GDK_KEY_RELEASE_MASK)))
|
||||||
{
|
{
|
||||||
if (window == k_grab_window
|
if (window == k_grab_window
|
||||||
|| (GDK_WINDOW_WIN32DATA(window)->event_mask & GDK_KEY_PRESS_MASK))
|
|| (GDK_WINDOW_WIN32DATA (window)->event_mask & GDK_KEY_PRESS_MASK))
|
||||||
{
|
{
|
||||||
/* Append a GDK_KEY_PRESS event to the pushback list
|
/* Append a GDK_KEY_PRESS event to the pushback list
|
||||||
* (from which it will be fetched before the release
|
* (from which it will be fetched before the release
|
||||||
* event).
|
* event).
|
||||||
*/
|
*/
|
||||||
GdkEvent *event2 = gdk_event_new ();
|
GdkEvent *event2 = gdk_event_new ();
|
||||||
build_keypress_event (GDK_WINDOW_WIN32DATA(window), event2, xevent);
|
build_keypress_event (GDK_WINDOW_WIN32DATA (window), event2, xevent);
|
||||||
event2->key.window = window;
|
event2->key.window = window;
|
||||||
gdk_window_ref (window);
|
gdk_window_ref (window);
|
||||||
gdk_event_queue_append (event2);
|
gdk_event_queue_append (event2);
|
||||||
GDK_NOTE (EVENTS, print_event (event2));
|
GDK_NOTE (EVENTS, print_event (event2));
|
||||||
}
|
}
|
||||||
/* Return the key release event. */
|
/* Return the key release event. */
|
||||||
build_keyrelease_event (GDK_WINDOW_WIN32DATA(window), event, xevent);
|
build_keyrelease_event (GDK_WINDOW_WIN32DATA (window), event, xevent);
|
||||||
}
|
}
|
||||||
else if (return_val
|
else if (return_val
|
||||||
&& (GDK_WINDOW_WIN32DATA(window)->event_mask & GDK_KEY_PRESS_MASK))
|
&& (GDK_WINDOW_WIN32DATA (window)->event_mask & GDK_KEY_PRESS_MASK))
|
||||||
{
|
{
|
||||||
/* Return just the key press event. */
|
/* Return just the key press event. */
|
||||||
build_keypress_event (GDK_WINDOW_WIN32DATA(window), event, xevent);
|
build_keypress_event (GDK_WINDOW_WIN32DATA (window), event, xevent);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return_val = FALSE;
|
return_val = FALSE;
|
||||||
@ -3443,13 +3475,13 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
{
|
{
|
||||||
/* No explicit active grab, let's start one automatically */
|
/* No explicit active grab, let's start one automatically */
|
||||||
gint owner_events =
|
gint owner_events =
|
||||||
GDK_WINDOW_WIN32DATA(window)->event_mask
|
GDK_WINDOW_WIN32DATA (window)->event_mask
|
||||||
& (GDK_BUTTON_PRESS_MASK|GDK_BUTTON_RELEASE_MASK);
|
& (GDK_BUTTON_PRESS_MASK|GDK_BUTTON_RELEASE_MASK);
|
||||||
|
|
||||||
GDK_NOTE (EVENTS, g_print ("...automatic grab started\n"));
|
GDK_NOTE (EVENTS, g_print ("...automatic grab started\n"));
|
||||||
gdk_pointer_grab (window,
|
gdk_pointer_grab (window,
|
||||||
owner_events,
|
owner_events,
|
||||||
GDK_WINDOW_WIN32DATA(window)->event_mask,
|
GDK_WINDOW_WIN32DATA (window)->event_mask,
|
||||||
NULL, NULL, 0);
|
NULL, NULL, 0);
|
||||||
p_grab_automatic = TRUE;
|
p_grab_automatic = TRUE;
|
||||||
}
|
}
|
||||||
@ -3594,7 +3626,7 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
LOWORD (xevent->lParam), HIWORD (xevent->lParam)));
|
LOWORD (xevent->lParam), HIWORD (xevent->lParam)));
|
||||||
if (p_TrackMouseEvent == NULL
|
if (p_TrackMouseEvent == NULL
|
||||||
&& curWnd != NULL
|
&& curWnd != NULL
|
||||||
&& (GDK_WINDOW_WIN32DATA(curWnd)->event_mask & GDK_LEAVE_NOTIFY_MASK))
|
&& (GDK_WINDOW_WIN32DATA (curWnd)->event_mask & GDK_LEAVE_NOTIFY_MASK))
|
||||||
{
|
{
|
||||||
GDK_NOTE (EVENTS, g_print ("...synthesizing LEAVE_NOTIFY event\n"));
|
GDK_NOTE (EVENTS, g_print ("...synthesizing LEAVE_NOTIFY event\n"));
|
||||||
|
|
||||||
@ -3622,11 +3654,69 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifndef WM_MOUSEWHEEL
|
||||||
|
#define WM_MOUSEWHEEL 0x20a
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case WM_MOUSEWHEEL:
|
||||||
|
GDK_NOTE (EVENTS, g_print ("WM_MOUSEWHEEL: %#x\n", xevent->hwnd));
|
||||||
|
|
||||||
|
if (((GdkWindowPrivate *) window)->extension_events != 0
|
||||||
|
&& gdk_input_ignore_core)
|
||||||
|
{
|
||||||
|
GDK_NOTE (EVENTS, g_print ("...ignored\n"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
event->scroll.type = GDK_SCROLL;
|
||||||
|
|
||||||
|
/* WM_MOUSEWHEEL seems to be delivered to top-level windows
|
||||||
|
* only, for some reason. Work around that. Also, the position
|
||||||
|
* is in screen coordinates, not client coordinates as with the
|
||||||
|
* button messages. I love the consistency of Windows.
|
||||||
|
*/
|
||||||
|
pt.x = LOWORD (xevent->lParam);
|
||||||
|
pt.y = HIWORD (xevent->lParam);
|
||||||
|
if ((hwnd = WindowFromPoint (pt)) == NULL)
|
||||||
|
break;
|
||||||
|
xevent->hwnd = hwnd;
|
||||||
|
if ((newwindow = gdk_window_lookup (xevent->hwnd)) == NULL)
|
||||||
|
break;
|
||||||
|
if (newwindow != window)
|
||||||
|
{
|
||||||
|
gdk_window_unref (window);
|
||||||
|
window = newwindow;
|
||||||
|
gdk_window_ref (window);
|
||||||
|
}
|
||||||
|
ScreenToClient (xevent->hwnd, &pt);
|
||||||
|
if (!propagate (&window, xevent,
|
||||||
|
p_grab_window, p_grab_owner_events, p_grab_mask,
|
||||||
|
doesnt_want_scroll))
|
||||||
|
break;
|
||||||
|
event->button.window = window;
|
||||||
|
event->scroll.direction = (((short) HIWORD (xevent->wParam)) > 0) ?
|
||||||
|
GDK_SCROLL_UP : GDK_SCROLL_DOWN;
|
||||||
|
event->scroll.window = window;
|
||||||
|
event->scroll.time = xevent->time;
|
||||||
|
event->scroll.x = (gint16) pt.x;
|
||||||
|
event->scroll.y = (gint16) pt.y;
|
||||||
|
event->scroll.x_root = (gint16) LOWORD (xevent->lParam);
|
||||||
|
event->scroll.y_root = (gint16) LOWORD (xevent->lParam);
|
||||||
|
event->scroll.pressure = 0.5;
|
||||||
|
event->scroll.xtilt = 0;
|
||||||
|
event->scroll.ytilt = 0;
|
||||||
|
event->scroll.state = build_pointer_event_state (xevent);
|
||||||
|
event->scroll.source = GDK_SOURCE_MOUSE;
|
||||||
|
event->scroll.deviceid = GDK_CORE_POINTER;
|
||||||
|
return_val = !GDK_DRAWABLE_DESTROYED (window);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
#ifdef USE_TRACKMOUSEEVENT
|
#ifdef USE_TRACKMOUSEEVENT
|
||||||
case WM_MOUSELEAVE:
|
case WM_MOUSELEAVE:
|
||||||
GDK_NOTE (EVENTS, g_print ("WM_MOUSELEAVE: %#x\n", xevent->hwnd));
|
GDK_NOTE (EVENTS, g_print ("WM_MOUSELEAVE: %#x\n", xevent->hwnd));
|
||||||
|
|
||||||
if (!(GDK_WINDOW_WIN32DATA(window)->event_mask & GDK_LEAVE_NOTIFY_MASK))
|
if (!(GDK_WINDOW_WIN32DATA (window)->event_mask & GDK_LEAVE_NOTIFY_MASK))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
event->crossing.type = GDK_LEAVE_NOTIFY;
|
event->crossing.type = GDK_LEAVE_NOTIFY;
|
||||||
@ -3667,7 +3757,7 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
"SET" : "KILL"),
|
"SET" : "KILL"),
|
||||||
xevent->hwnd));
|
xevent->hwnd));
|
||||||
|
|
||||||
if (!(GDK_WINDOW_WIN32DATA(window)->event_mask & GDK_FOCUS_CHANGE_MASK))
|
if (!(GDK_WINDOW_WIN32DATA (window)->event_mask & GDK_FOCUS_CHANGE_MASK))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
event->focus_change.type = GDK_FOCUS_CHANGE;
|
event->focus_change.type = GDK_FOCUS_CHANGE;
|
||||||
@ -3703,17 +3793,17 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
*ret_val_flagp = TRUE;
|
*ret_val_flagp = TRUE;
|
||||||
*ret_valp = 1;
|
*ret_valp = 1;
|
||||||
|
|
||||||
if (GDK_WINDOW_WIN32DATA(window)->bg_type == GDK_WIN32_BG_TRANSPARENT)
|
if (GDK_WINDOW_WIN32DATA (window)->bg_type == GDK_WIN32_BG_TRANSPARENT)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (GDK_WINDOW_WIN32DATA(window)->bg_type == GDK_WIN32_BG_PARENT_RELATIVE)
|
if (GDK_WINDOW_WIN32DATA (window)->bg_type == GDK_WIN32_BG_PARENT_RELATIVE)
|
||||||
{
|
{
|
||||||
/* If this window should have the same background as the
|
/* If this window should have the same background as the
|
||||||
* parent, fetch the parent. (And if the same goes for
|
* parent, fetch the parent. (And if the same goes for
|
||||||
* the parent, fetch the grandparent, etc.)
|
* the parent, fetch the grandparent, etc.)
|
||||||
*/
|
*/
|
||||||
while (window
|
while (window
|
||||||
&& GDK_WINDOW_WIN32DATA(window)->bg_type == GDK_WIN32_BG_PARENT_RELATIVE)
|
&& GDK_WINDOW_WIN32DATA (window)->bg_type == GDK_WIN32_BG_PARENT_RELATIVE)
|
||||||
{
|
{
|
||||||
gdk_window_unref (window);
|
gdk_window_unref (window);
|
||||||
window = ((GdkWindowPrivate *) window)->parent;
|
window = ((GdkWindowPrivate *) window)->parent;
|
||||||
@ -3721,20 +3811,18 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GDK_WINDOW_WIN32DATA(window)->bg_type == GDK_WIN32_BG_PIXEL)
|
if (GDK_WINDOW_WIN32DATA (window)->bg_type == GDK_WIN32_BG_PIXEL)
|
||||||
{
|
{
|
||||||
COLORREF bg;
|
bg = gdk_colormap_color (colormap_private,
|
||||||
|
GDK_WINDOW_WIN32DATA (window)->bg_pixel);
|
||||||
|
|
||||||
GetClipBox (hdc, &rect);
|
GetClipBox (hdc, &rect);
|
||||||
GDK_NOTE (EVENTS,
|
GDK_NOTE (EVENTS,
|
||||||
g_print ("...%dx%d@+%d+%d BG_PIXEL %s\n",
|
g_print ("...%dx%d@+%d+%d BG_PIXEL %.06x\n",
|
||||||
rect.right - rect.left,
|
rect.right - rect.left,
|
||||||
rect.bottom - rect.top,
|
rect.bottom - rect.top,
|
||||||
rect.left, rect.top,
|
rect.left, rect.top,
|
||||||
gdk_color_to_string (&GDK_WINDOW_WIN32DATA(window)->bg_pixel)));
|
bg));
|
||||||
bg = GetNearestColor
|
|
||||||
(hdc, RGB (GDK_WINDOW_WIN32DATA(window)->bg_pixel.red >> 8,
|
|
||||||
GDK_WINDOW_WIN32DATA(window)->bg_pixel.green >> 8,
|
|
||||||
GDK_WINDOW_WIN32DATA(window)->bg_pixel.blue >> 8));
|
|
||||||
hbr = CreateSolidBrush (bg);
|
hbr = CreateSolidBrush (bg);
|
||||||
#if 0
|
#if 0
|
||||||
g_print ("...CreateSolidBrush (%.08x) = %.08x\n", bg, hbr);
|
g_print ("...CreateSolidBrush (%.08x) = %.08x\n", bg, hbr);
|
||||||
@ -3743,9 +3831,9 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
WIN32_API_FAILED ("FillRect");
|
WIN32_API_FAILED ("FillRect");
|
||||||
DeleteObject (hbr);
|
DeleteObject (hbr);
|
||||||
}
|
}
|
||||||
else if (GDK_WINDOW_WIN32DATA(window)->bg_type == GDK_WIN32_BG_PIXMAP)
|
else if (GDK_WINDOW_WIN32DATA (window)->bg_type == GDK_WIN32_BG_PIXMAP)
|
||||||
{
|
{
|
||||||
pixmap = GDK_WINDOW_WIN32DATA(window)->bg_pixmap;
|
pixmap = GDK_WINDOW_WIN32DATA (window)->bg_pixmap;
|
||||||
pixmap_private = (GdkDrawablePrivate*) pixmap;
|
pixmap_private = (GdkDrawablePrivate*) pixmap;
|
||||||
GetClipBox (hdc, &rect);
|
GetClipBox (hdc, &rect);
|
||||||
|
|
||||||
@ -3830,7 +3918,7 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
|
|
||||||
EndPaint (xevent->hwnd, &paintstruct);
|
EndPaint (xevent->hwnd, &paintstruct);
|
||||||
|
|
||||||
if (!(GDK_WINDOW_WIN32DATA(window)->event_mask & GDK_EXPOSURE_MASK))
|
if (!(GDK_WINDOW_WIN32DATA (window)->event_mask & GDK_EXPOSURE_MASK))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
event->expose.type = GDK_EXPOSE;
|
event->expose.type = GDK_EXPOSE;
|
||||||
@ -3870,11 +3958,11 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
SetCursor (p_grab_cursor);
|
SetCursor (p_grab_cursor);
|
||||||
}
|
}
|
||||||
else if (!GDK_DRAWABLE_DESTROYED (window)
|
else if (!GDK_DRAWABLE_DESTROYED (window)
|
||||||
&& GDK_WINDOW_WIN32DATA(window)->xcursor)
|
&& GDK_WINDOW_WIN32DATA (window)->xcursor)
|
||||||
{
|
{
|
||||||
GDK_NOTE (EVENTS, g_print ("...SetCursor(%#x)\n",
|
GDK_NOTE (EVENTS, g_print ("...SetCursor(%#x)\n",
|
||||||
GDK_WINDOW_WIN32DATA(window)->xcursor));
|
GDK_WINDOW_WIN32DATA (window)->xcursor));
|
||||||
SetCursor (GDK_WINDOW_WIN32DATA(window)->xcursor);
|
SetCursor (GDK_WINDOW_WIN32DATA (window)->xcursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window != curWnd)
|
if (window != curWnd)
|
||||||
@ -3889,7 +3977,7 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
xevent->hwnd,
|
xevent->hwnd,
|
||||||
xevent->wParam));
|
xevent->wParam));
|
||||||
|
|
||||||
if (!(GDK_WINDOW_WIN32DATA(window)->event_mask & GDK_STRUCTURE_MASK))
|
if (!(GDK_WINDOW_WIN32DATA (window)->event_mask & GDK_STRUCTURE_MASK))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
event->any.type = (xevent->wParam ? GDK_MAP : GDK_UNMAP);
|
event->any.type = (xevent->wParam ? GDK_MAP : GDK_UNMAP);
|
||||||
@ -3917,7 +4005,7 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
(xevent->wParam == SIZE_RESTORED ? "RESTORED" : "?"))))),
|
(xevent->wParam == SIZE_RESTORED ? "RESTORED" : "?"))))),
|
||||||
LOWORD (xevent->lParam), HIWORD (xevent->lParam)));
|
LOWORD (xevent->lParam), HIWORD (xevent->lParam)));
|
||||||
|
|
||||||
if (!(GDK_WINDOW_WIN32DATA(window)->event_mask & GDK_STRUCTURE_MASK))
|
if (!(GDK_WINDOW_WIN32DATA (window)->event_mask & GDK_STRUCTURE_MASK))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (xevent->wParam == SIZE_MINIMIZED)
|
if (xevent->wParam == SIZE_MINIMIZED)
|
||||||
@ -3971,18 +4059,18 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
GDK_NOTE (EVENTS, g_print ("WM_GETMINMAXINFO: %#x\n", xevent->hwnd));
|
GDK_NOTE (EVENTS, g_print ("WM_GETMINMAXINFO: %#x\n", xevent->hwnd));
|
||||||
|
|
||||||
lpmmi = (MINMAXINFO*) xevent->lParam;
|
lpmmi = (MINMAXINFO*) xevent->lParam;
|
||||||
if (GDK_WINDOW_WIN32DATA(window)->hint_flags & GDK_HINT_MIN_SIZE)
|
if (GDK_WINDOW_WIN32DATA (window)->hint_flags & GDK_HINT_MIN_SIZE)
|
||||||
{
|
{
|
||||||
lpmmi->ptMinTrackSize.x = GDK_WINDOW_WIN32DATA(window)->hint_min_width;
|
lpmmi->ptMinTrackSize.x = GDK_WINDOW_WIN32DATA (window)->hint_min_width;
|
||||||
lpmmi->ptMinTrackSize.y = GDK_WINDOW_WIN32DATA(window)->hint_min_height;
|
lpmmi->ptMinTrackSize.y = GDK_WINDOW_WIN32DATA (window)->hint_min_height;
|
||||||
}
|
}
|
||||||
if (GDK_WINDOW_WIN32DATA(window)->hint_flags & GDK_HINT_MAX_SIZE)
|
if (GDK_WINDOW_WIN32DATA (window)->hint_flags & GDK_HINT_MAX_SIZE)
|
||||||
{
|
{
|
||||||
lpmmi->ptMaxTrackSize.x = GDK_WINDOW_WIN32DATA(window)->hint_max_width;
|
lpmmi->ptMaxTrackSize.x = GDK_WINDOW_WIN32DATA (window)->hint_max_width;
|
||||||
lpmmi->ptMaxTrackSize.y = GDK_WINDOW_WIN32DATA(window)->hint_max_height;
|
lpmmi->ptMaxTrackSize.y = GDK_WINDOW_WIN32DATA (window)->hint_max_height;
|
||||||
|
|
||||||
lpmmi->ptMaxSize.x = GDK_WINDOW_WIN32DATA(window)->hint_max_width;
|
lpmmi->ptMaxSize.x = GDK_WINDOW_WIN32DATA (window)->hint_max_width;
|
||||||
lpmmi->ptMaxSize.y = GDK_WINDOW_WIN32DATA(window)->hint_max_height;
|
lpmmi->ptMaxSize.y = GDK_WINDOW_WIN32DATA (window)->hint_max_height;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -3991,7 +4079,7 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
xevent->hwnd,
|
xevent->hwnd,
|
||||||
LOWORD (xevent->lParam), HIWORD (xevent->lParam)));
|
LOWORD (xevent->lParam), HIWORD (xevent->lParam)));
|
||||||
|
|
||||||
if (!(GDK_WINDOW_WIN32DATA(window)->event_mask & GDK_STRUCTURE_MASK))
|
if (!(GDK_WINDOW_WIN32DATA (window)->event_mask & GDK_STRUCTURE_MASK))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (GDK_DRAWABLE_TYPE (window) != GDK_WINDOW_CHILD
|
if (GDK_DRAWABLE_TYPE (window) != GDK_WINDOW_CHILD
|
||||||
|
@ -714,7 +714,30 @@ gdk_gc_copy (GdkGC *dst_gc, GdkGC *src_gc)
|
|||||||
gdk_drawable_ref (dst_data->stipple);
|
gdk_drawable_ref (dst_data->stipple);
|
||||||
}
|
}
|
||||||
|
|
||||||
static guint mask[9] = { 0, 1, 3, 7, 15, 31, 63, 127, 255 };
|
static guint bitmask[9] = { 0, 1, 3, 7, 15, 31, 63, 127, 255 };
|
||||||
|
|
||||||
|
COLORREF
|
||||||
|
gdk_colormap_color (GdkColormapPrivateWin32 *colormap_private,
|
||||||
|
gulong pixel)
|
||||||
|
{
|
||||||
|
GdkVisual *visual;
|
||||||
|
guchar r, g, b;
|
||||||
|
|
||||||
|
if (colormap_private == NULL || colormap_private->xcolormap->rc_palette)
|
||||||
|
return PALETTEINDEX (pixel);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
visual = colormap_private->base.visual;
|
||||||
|
r = (pixel & visual->red_mask) >> visual->red_shift;
|
||||||
|
r = (r * 255) / bitmask[visual->red_prec];
|
||||||
|
g = (pixel & visual->green_mask) >> visual->green_shift;
|
||||||
|
g = (g * 255) / bitmask[visual->green_prec];
|
||||||
|
b = (pixel & visual->blue_mask) >> visual->blue_shift;
|
||||||
|
b = (b * 255) / bitmask[visual->blue_prec];
|
||||||
|
|
||||||
|
return RGB (r, g, b);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
predraw_set_foreground (GdkGCWin32Data *data,
|
predraw_set_foreground (GdkGCWin32Data *data,
|
||||||
@ -724,8 +747,6 @@ predraw_set_foreground (GdkGCWin32Data *data,
|
|||||||
LOGBRUSH logbrush;
|
LOGBRUSH logbrush;
|
||||||
HPEN hpen;
|
HPEN hpen;
|
||||||
HBRUSH hbr;
|
HBRUSH hbr;
|
||||||
GdkVisual *visual;
|
|
||||||
guchar r, g, b;
|
|
||||||
|
|
||||||
if (colormap_private == NULL)
|
if (colormap_private == NULL)
|
||||||
{
|
{
|
||||||
@ -774,20 +795,9 @@ predraw_set_foreground (GdkGCWin32Data *data,
|
|||||||
g_print ("Selected palette %#x for gc %#x, realized %d colors\n",
|
g_print ("Selected palette %#x for gc %#x, realized %d colors\n",
|
||||||
colormap_private->xcolormap->palette, data->xgc, k);
|
colormap_private->xcolormap->palette, data->xgc, k);
|
||||||
#endif
|
#endif
|
||||||
fg = PALETTEINDEX (data->foreground);
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
visual = colormap_private->base.visual;
|
|
||||||
r = (data->foreground & visual->red_mask) >> visual->red_shift;
|
|
||||||
r = (r * 255) / mask[visual->red_prec];
|
|
||||||
g = (data->foreground & visual->green_mask) >> visual->green_shift;
|
|
||||||
g = (g * 255) / mask[visual->green_prec];
|
|
||||||
b = (data->foreground & visual->blue_mask) >> visual->blue_shift;
|
|
||||||
b = (b * 255) / mask[visual->blue_prec];
|
|
||||||
|
|
||||||
fg = GetNearestColor (data->xgc, RGB (r, g, b));
|
fg = gdk_colormap_color (colormap_private, data->foreground);
|
||||||
}
|
|
||||||
|
|
||||||
if (SetTextColor (data->xgc, fg) == CLR_INVALID)
|
if (SetTextColor (data->xgc, fg) == CLR_INVALID)
|
||||||
WIN32_API_FAILED ("SetTextColor");
|
WIN32_API_FAILED ("SetTextColor");
|
||||||
@ -829,36 +839,12 @@ void
|
|||||||
predraw_set_background (GdkGCWin32Data *data,
|
predraw_set_background (GdkGCWin32Data *data,
|
||||||
GdkColormapPrivateWin32 *colormap_private)
|
GdkColormapPrivateWin32 *colormap_private)
|
||||||
{
|
{
|
||||||
COLORREF bg;
|
COLORREF bg = gdk_colormap_color (colormap_private, data->background);
|
||||||
GdkVisual *visual;
|
|
||||||
guchar r, g, b;
|
|
||||||
|
|
||||||
if (colormap_private == NULL)
|
|
||||||
{
|
|
||||||
/* a bitmap */
|
|
||||||
bg = PALETTEINDEX (data->background);
|
|
||||||
}
|
|
||||||
else if (colormap_private->xcolormap->rc_palette)
|
|
||||||
{
|
|
||||||
bg = PALETTEINDEX (data->background);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
visual = colormap_private->base.visual;
|
|
||||||
r = (data->background & visual->red_mask) >> visual->red_shift;
|
|
||||||
r = (r * 255) / mask[visual->red_prec];
|
|
||||||
g = (data->background & visual->green_mask) >> visual->green_shift;
|
|
||||||
g = (g * 255) / mask[visual->green_prec];
|
|
||||||
b = (data->background & visual->blue_mask) >> visual->blue_shift;
|
|
||||||
b = (b * 255) / mask[visual->green_prec];
|
|
||||||
|
|
||||||
bg = GetNearestColor (data->xgc, RGB (r, g, b));
|
|
||||||
}
|
|
||||||
if (SetBkColor (data->xgc, bg) == CLR_INVALID)
|
if (SetBkColor (data->xgc, bg) == CLR_INVALID)
|
||||||
WIN32_API_FAILED ("SetBkColor");
|
WIN32_API_FAILED ("SetBkColor");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HDC
|
HDC
|
||||||
gdk_gc_predraw (GdkDrawable *drawable,
|
gdk_gc_predraw (GdkDrawable *drawable,
|
||||||
GdkGCPrivate *gc_private,
|
GdkGCPrivate *gc_private,
|
||||||
@ -912,7 +898,7 @@ gdk_gc_predraw (GdkDrawable *drawable,
|
|||||||
if (SetROP2 (data->xgc, data->rop2) == 0)
|
if (SetROP2 (data->xgc, data->rop2) == 0)
|
||||||
WIN32_API_FAILED ("SetROP2");
|
WIN32_API_FAILED ("SetROP2");
|
||||||
|
|
||||||
if (data->values_mask & GDK_GC_CLIP_MASK
|
if ((data->values_mask & GDK_GC_CLIP_MASK)
|
||||||
&& data->clip_region != NULL)
|
&& data->clip_region != NULL)
|
||||||
{
|
{
|
||||||
if (data->values_mask & (GDK_GC_CLIP_X_ORIGIN | GDK_GC_CLIP_Y_ORIGIN))
|
if (data->values_mask & (GDK_GC_CLIP_X_ORIGIN | GDK_GC_CLIP_Y_ORIGIN))
|
||||||
@ -975,7 +961,7 @@ gdk_gc_postdraw (GdkDrawable *drawable,
|
|||||||
if (!DeleteObject (hbr))
|
if (!DeleteObject (hbr))
|
||||||
WIN32_API_FAILED ("DeleteObject #2");
|
WIN32_API_FAILED ("DeleteObject #2");
|
||||||
|
|
||||||
if (data->values_mask & GDK_GC_CLIP_MASK
|
if ((data->values_mask & GDK_GC_CLIP_MASK)
|
||||||
&& data->clip_region != NULL
|
&& data->clip_region != NULL
|
||||||
&& (data->values_mask & (GDK_GC_CLIP_X_ORIGIN | GDK_GC_CLIP_Y_ORIGIN)))
|
&& (data->values_mask & (GDK_GC_CLIP_X_ORIGIN | GDK_GC_CLIP_Y_ORIGIN)))
|
||||||
OffsetRgn (data->clip_region,
|
OffsetRgn (data->clip_region,
|
||||||
|
@ -196,7 +196,7 @@ struct _GdkWindowWin32Data
|
|||||||
|
|
||||||
/* We draw the background ourselves at WM_ERASEBKGND */
|
/* We draw the background ourselves at WM_ERASEBKGND */
|
||||||
guchar bg_type;
|
guchar bg_type;
|
||||||
GdkColor bg_pixel;
|
gulong bg_pixel; /* GdkColor pixel, not COLORREF */
|
||||||
GdkPixmap *bg_pixmap;
|
GdkPixmap *bg_pixmap;
|
||||||
|
|
||||||
HCURSOR xcursor;
|
HCURSOR xcursor;
|
||||||
@ -277,6 +277,8 @@ gpointer gdk_xid_table_lookup (HANDLE xid);
|
|||||||
GdkGC * _gdk_win32_gc_new (GdkDrawable *drawable,
|
GdkGC * _gdk_win32_gc_new (GdkDrawable *drawable,
|
||||||
GdkGCValues *values,
|
GdkGCValues *values,
|
||||||
GdkGCValuesMask values_mask);
|
GdkGCValuesMask values_mask);
|
||||||
|
COLORREF gdk_colormap_color (GdkColormapPrivateWin32 *colormap_private,
|
||||||
|
gulong pixel);
|
||||||
HDC gdk_gc_predraw (GdkDrawable *drawable,
|
HDC gdk_gc_predraw (GdkDrawable *drawable,
|
||||||
GdkGCPrivate *gc_private,
|
GdkGCPrivate *gc_private,
|
||||||
GdkGCValuesMask usage);
|
GdkGCValuesMask usage);
|
||||||
|
@ -1414,7 +1414,7 @@ gdk_window_set_background (GdkWindow *window,
|
|||||||
GDK_WINDOW_WIN32DATA (window)->bg_type = GDK_WIN32_BG_NORMAL;
|
GDK_WINDOW_WIN32DATA (window)->bg_type = GDK_WIN32_BG_NORMAL;
|
||||||
}
|
}
|
||||||
GDK_WINDOW_WIN32DATA (window)->bg_type = GDK_WIN32_BG_PIXEL;
|
GDK_WINDOW_WIN32DATA (window)->bg_type = GDK_WIN32_BG_PIXEL;
|
||||||
GDK_WINDOW_WIN32DATA (window)->bg_pixel = *color;
|
GDK_WINDOW_WIN32DATA (window)->bg_pixel = color->pixel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1464,6 +1464,7 @@ gdk_window_set_cursor (GdkWindow *window,
|
|||||||
{
|
{
|
||||||
GdkCursorPrivate *cursor_private;
|
GdkCursorPrivate *cursor_private;
|
||||||
HCURSOR xcursor;
|
HCURSOR xcursor;
|
||||||
|
POINT pt;
|
||||||
|
|
||||||
g_return_if_fail (window != NULL);
|
g_return_if_fail (window != NULL);
|
||||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||||
@ -1480,6 +1481,10 @@ gdk_window_set_cursor (GdkWindow *window,
|
|||||||
GDK_NOTE (MISC, g_print ("gdk_window_set_cursor: %#x %#x\n",
|
GDK_NOTE (MISC, g_print ("gdk_window_set_cursor: %#x %#x\n",
|
||||||
GDK_DRAWABLE_XID (window), xcursor));
|
GDK_DRAWABLE_XID (window), xcursor));
|
||||||
GDK_WINDOW_WIN32DATA (window)->xcursor = xcursor;
|
GDK_WINDOW_WIN32DATA (window)->xcursor = xcursor;
|
||||||
|
|
||||||
|
GetCursorPos (&pt);
|
||||||
|
if (ChildWindowFromPoint (GDK_DRAWABLE_XID (window), pt) == GDK_DRAWABLE_XID (window))
|
||||||
|
SetCursor (xcursor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,10 +62,19 @@ gdk-win32res.o : rc/gdk.rc gdk-build.tmp
|
|||||||
windres --include-dir rc --include-dir $(WIN32APIHEADERS) gdk-win32res.rc gdk-win32res.o
|
windres --include-dir rc --include-dir $(WIN32APIHEADERS) gdk-win32res.rc gdk-win32res.o
|
||||||
rm gdk-build.tmp gdk-win32res.rc
|
rm gdk-build.tmp gdk-win32res.rc
|
||||||
|
|
||||||
|
# The *.stamp files aren't distributed. Thus, this takes care of only
|
||||||
|
# tml building libraries with nonzero build number.
|
||||||
|
|
||||||
|
ifeq ($(wildcard gdk-build.stamp),gdk-build.stamp)
|
||||||
# Magic to bump the build number
|
# Magic to bump the build number
|
||||||
gdk-build.tmp :
|
gdk-build.tmp :
|
||||||
bash -c "read number && echo $$[number+1]" <gdk-build.stamp >gdk-build.tmp
|
bash -c "read number && echo $$[number+1]" <gdk-build.stamp >gdk-build.tmp
|
||||||
cp gdk-build.tmp gdk-build.stamp
|
cp gdk-build.tmp gdk-build.stamp
|
||||||
|
else
|
||||||
|
# Use zero as build number.
|
||||||
|
gdk-build.tmp :
|
||||||
|
echo 0 >gdk-build.tmp
|
||||||
|
endif
|
||||||
|
|
||||||
libgdk-win32.a : $(gdk_win32_OBJECTS)
|
libgdk-win32.a : $(gdk_win32_OBJECTS)
|
||||||
-rm -f $@
|
-rm -f $@
|
||||||
|
@ -871,7 +871,6 @@ EXPORTS
|
|||||||
gtk_paned_get_type
|
gtk_paned_get_type
|
||||||
gtk_paned_pack1
|
gtk_paned_pack1
|
||||||
gtk_paned_pack2
|
gtk_paned_pack2
|
||||||
gtk_paned_set_gutter_size
|
|
||||||
gtk_paned_set_handle_size
|
gtk_paned_set_handle_size
|
||||||
gtk_paned_set_position
|
gtk_paned_set_position
|
||||||
gtk_pattern_match
|
gtk_pattern_match
|
||||||
|
@ -340,10 +340,19 @@ gtk-win32res.o : gtk.rc gtk-build.tmp
|
|||||||
windres --include-dir $(WIN32APIHEADERS) gtk-win32res.rc gtk-win32res.o
|
windres --include-dir $(WIN32APIHEADERS) gtk-win32res.rc gtk-win32res.o
|
||||||
rm gtk-build.tmp gtk-win32res.rc
|
rm gtk-build.tmp gtk-win32res.rc
|
||||||
|
|
||||||
|
# The *.stamp files aren't distributed. Thus, this takes care of only
|
||||||
|
# tml building libraries with nonzero build number.
|
||||||
|
|
||||||
|
ifeq ($(wildcard gtk-build.stamp),gtk-build.stamp)
|
||||||
# Magic to bump the build number
|
# Magic to bump the build number
|
||||||
gtk-build.tmp :
|
gtk-build.tmp :
|
||||||
bash -c "read number && echo $$[number+1]" <gtk-build.stamp >gtk-build.tmp
|
bash -c "read number && echo $$[number+1]" <gtk-build.stamp >gtk-build.tmp
|
||||||
cp gtk-build.tmp gtk-build.stamp
|
cp gtk-build.tmp gtk-build.stamp
|
||||||
|
else
|
||||||
|
# Use zero as build number.
|
||||||
|
gtk-build.tmp :
|
||||||
|
echo 0 >gtk-build.tmp
|
||||||
|
endif
|
||||||
|
|
||||||
# General rule for compiling the objects into the DLL
|
# General rule for compiling the objects into the DLL
|
||||||
.c.o :
|
.c.o :
|
||||||
|
Loading…
Reference in New Issue
Block a user