From 22a0c3a5f5eb8ae0fcccbae6c83de7618fa2066a Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sat, 11 Nov 2000 18:39:57 +0000 Subject: [PATCH] gdk/gdk.def Update. 2000-11-11 Tor Lillqvist * gdk/gdk.def * gtk/gtk.def: Update. * gdk/win32/*.c: Add last argument to g_type_register_static() calls. * gdk/win32/gdkwindow-win32.c: Silence gcc -Wall. * gdk/win32/gdkevents-win32.c: Handle MSH_MOUSEWHEEL messages generated by older wheel mouse drivers. Get the correct y coordinate from WM_MOUSEWHEEL messages. * gdk/win32/gdkgc-win32.c (gdk_win32_cap_style_to_string, gdk_win32_fill_style_to_string, gdk_win32_function_to_string, gdk_win32_join_style_to_string, gdk_win32_line_style_to_string): Debugging functions. * gdk/win32/gdkprivate-win32.h: Declare them. * gdk/win32/gdkinput-win32.h: Add declaration for gdk_input_window_destroy(). * gtk/makefile.mingw.in: Pass -DGTK_VERSION. Add gtktreemodel.o. * gdk_pixbuf.def: Add gdk_pixbuf_new_subpixbuf. --- ChangeLog | 26 ++++ ChangeLog.pre-2-0 | 26 ++++ ChangeLog.pre-2-10 | 26 ++++ ChangeLog.pre-2-2 | 26 ++++ ChangeLog.pre-2-4 | 26 ++++ ChangeLog.pre-2-6 | 26 ++++ ChangeLog.pre-2-8 | 26 ++++ gdk-pixbuf/ChangeLog | 2 + gdk-pixbuf/gdk_pixbuf.def | 1 + gdk/gdk.def | 3 + gdk/win32/gdkcolor-win32.c | 2 +- gdk/win32/gdkdnd-win32.c | 7 +- gdk/win32/gdkdrawable-win32.c | 28 +--- gdk/win32/gdkevents-win32.c | 128 ++++++++++++++----- gdk/win32/gdkgc-win32.c | 100 ++++++++++++++- gdk/win32/gdkimage-win32.c | 2 +- gdk/win32/gdkinput-win32.h | 6 +- gdk/win32/gdkpixmap-win32.c | 2 +- gdk/win32/gdkprivate-win32.h | 9 +- gdk/win32/gdkwindow-win32.c | 232 ++++++++++++++++++---------------- gtk/gtk.def | 32 ++++- gtk/makefile.mingw.in | 4 +- gtk/makefile.msc.in | 1 + 23 files changed, 564 insertions(+), 177 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1ae3eac50b..93f180917d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,29 @@ +2000-11-11 Tor Lillqvist + + * gdk/gdk.def + * gtk/gtk.def: Update. + + * gdk/win32/*.c: Add last argument to g_type_register_static() + calls. + + * gdk/win32/gdkwindow-win32.c: Silence gcc -Wall. + + * gdk/win32/gdkevents-win32.c: Handle MSH_MOUSEWHEEL messages + generated by older wheel mouse drivers. Get the correct y + coordinate from WM_MOUSEWHEEL messages. + + * gdk/win32/gdkgc-win32.c (gdk_win32_cap_style_to_string, + gdk_win32_fill_style_to_string, gdk_win32_function_to_string, + gdk_win32_join_style_to_string, gdk_win32_line_style_to_string): + Debugging functions. + + * gdk/win32/gdkprivate-win32.h: Declare them. + + * gdk/win32/gdkinput-win32.h: Add declaration for + gdk_input_window_destroy(). + + * gtk/makefile.mingw.in: Pass -DGTK_VERSION. Add gtktreemodel.o. + Fri Nov 10 19:06:41 2000 Jonathan Blandford * gtk/gtktreemodelsort.c (gtk_tree_model_sort_insert_value): New diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 1ae3eac50b..93f180917d 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,29 @@ +2000-11-11 Tor Lillqvist + + * gdk/gdk.def + * gtk/gtk.def: Update. + + * gdk/win32/*.c: Add last argument to g_type_register_static() + calls. + + * gdk/win32/gdkwindow-win32.c: Silence gcc -Wall. + + * gdk/win32/gdkevents-win32.c: Handle MSH_MOUSEWHEEL messages + generated by older wheel mouse drivers. Get the correct y + coordinate from WM_MOUSEWHEEL messages. + + * gdk/win32/gdkgc-win32.c (gdk_win32_cap_style_to_string, + gdk_win32_fill_style_to_string, gdk_win32_function_to_string, + gdk_win32_join_style_to_string, gdk_win32_line_style_to_string): + Debugging functions. + + * gdk/win32/gdkprivate-win32.h: Declare them. + + * gdk/win32/gdkinput-win32.h: Add declaration for + gdk_input_window_destroy(). + + * gtk/makefile.mingw.in: Pass -DGTK_VERSION. Add gtktreemodel.o. + Fri Nov 10 19:06:41 2000 Jonathan Blandford * gtk/gtktreemodelsort.c (gtk_tree_model_sort_insert_value): New diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 1ae3eac50b..93f180917d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,29 @@ +2000-11-11 Tor Lillqvist + + * gdk/gdk.def + * gtk/gtk.def: Update. + + * gdk/win32/*.c: Add last argument to g_type_register_static() + calls. + + * gdk/win32/gdkwindow-win32.c: Silence gcc -Wall. + + * gdk/win32/gdkevents-win32.c: Handle MSH_MOUSEWHEEL messages + generated by older wheel mouse drivers. Get the correct y + coordinate from WM_MOUSEWHEEL messages. + + * gdk/win32/gdkgc-win32.c (gdk_win32_cap_style_to_string, + gdk_win32_fill_style_to_string, gdk_win32_function_to_string, + gdk_win32_join_style_to_string, gdk_win32_line_style_to_string): + Debugging functions. + + * gdk/win32/gdkprivate-win32.h: Declare them. + + * gdk/win32/gdkinput-win32.h: Add declaration for + gdk_input_window_destroy(). + + * gtk/makefile.mingw.in: Pass -DGTK_VERSION. Add gtktreemodel.o. + Fri Nov 10 19:06:41 2000 Jonathan Blandford * gtk/gtktreemodelsort.c (gtk_tree_model_sort_insert_value): New diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 1ae3eac50b..93f180917d 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,29 @@ +2000-11-11 Tor Lillqvist + + * gdk/gdk.def + * gtk/gtk.def: Update. + + * gdk/win32/*.c: Add last argument to g_type_register_static() + calls. + + * gdk/win32/gdkwindow-win32.c: Silence gcc -Wall. + + * gdk/win32/gdkevents-win32.c: Handle MSH_MOUSEWHEEL messages + generated by older wheel mouse drivers. Get the correct y + coordinate from WM_MOUSEWHEEL messages. + + * gdk/win32/gdkgc-win32.c (gdk_win32_cap_style_to_string, + gdk_win32_fill_style_to_string, gdk_win32_function_to_string, + gdk_win32_join_style_to_string, gdk_win32_line_style_to_string): + Debugging functions. + + * gdk/win32/gdkprivate-win32.h: Declare them. + + * gdk/win32/gdkinput-win32.h: Add declaration for + gdk_input_window_destroy(). + + * gtk/makefile.mingw.in: Pass -DGTK_VERSION. Add gtktreemodel.o. + Fri Nov 10 19:06:41 2000 Jonathan Blandford * gtk/gtktreemodelsort.c (gtk_tree_model_sort_insert_value): New diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 1ae3eac50b..93f180917d 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,29 @@ +2000-11-11 Tor Lillqvist + + * gdk/gdk.def + * gtk/gtk.def: Update. + + * gdk/win32/*.c: Add last argument to g_type_register_static() + calls. + + * gdk/win32/gdkwindow-win32.c: Silence gcc -Wall. + + * gdk/win32/gdkevents-win32.c: Handle MSH_MOUSEWHEEL messages + generated by older wheel mouse drivers. Get the correct y + coordinate from WM_MOUSEWHEEL messages. + + * gdk/win32/gdkgc-win32.c (gdk_win32_cap_style_to_string, + gdk_win32_fill_style_to_string, gdk_win32_function_to_string, + gdk_win32_join_style_to_string, gdk_win32_line_style_to_string): + Debugging functions. + + * gdk/win32/gdkprivate-win32.h: Declare them. + + * gdk/win32/gdkinput-win32.h: Add declaration for + gdk_input_window_destroy(). + + * gtk/makefile.mingw.in: Pass -DGTK_VERSION. Add gtktreemodel.o. + Fri Nov 10 19:06:41 2000 Jonathan Blandford * gtk/gtktreemodelsort.c (gtk_tree_model_sort_insert_value): New diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 1ae3eac50b..93f180917d 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,29 @@ +2000-11-11 Tor Lillqvist + + * gdk/gdk.def + * gtk/gtk.def: Update. + + * gdk/win32/*.c: Add last argument to g_type_register_static() + calls. + + * gdk/win32/gdkwindow-win32.c: Silence gcc -Wall. + + * gdk/win32/gdkevents-win32.c: Handle MSH_MOUSEWHEEL messages + generated by older wheel mouse drivers. Get the correct y + coordinate from WM_MOUSEWHEEL messages. + + * gdk/win32/gdkgc-win32.c (gdk_win32_cap_style_to_string, + gdk_win32_fill_style_to_string, gdk_win32_function_to_string, + gdk_win32_join_style_to_string, gdk_win32_line_style_to_string): + Debugging functions. + + * gdk/win32/gdkprivate-win32.h: Declare them. + + * gdk/win32/gdkinput-win32.h: Add declaration for + gdk_input_window_destroy(). + + * gtk/makefile.mingw.in: Pass -DGTK_VERSION. Add gtktreemodel.o. + Fri Nov 10 19:06:41 2000 Jonathan Blandford * gtk/gtktreemodelsort.c (gtk_tree_model_sort_insert_value): New diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 1ae3eac50b..93f180917d 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,29 @@ +2000-11-11 Tor Lillqvist + + * gdk/gdk.def + * gtk/gtk.def: Update. + + * gdk/win32/*.c: Add last argument to g_type_register_static() + calls. + + * gdk/win32/gdkwindow-win32.c: Silence gcc -Wall. + + * gdk/win32/gdkevents-win32.c: Handle MSH_MOUSEWHEEL messages + generated by older wheel mouse drivers. Get the correct y + coordinate from WM_MOUSEWHEEL messages. + + * gdk/win32/gdkgc-win32.c (gdk_win32_cap_style_to_string, + gdk_win32_fill_style_to_string, gdk_win32_function_to_string, + gdk_win32_join_style_to_string, gdk_win32_line_style_to_string): + Debugging functions. + + * gdk/win32/gdkprivate-win32.h: Declare them. + + * gdk/win32/gdkinput-win32.h: Add declaration for + gdk_input_window_destroy(). + + * gtk/makefile.mingw.in: Pass -DGTK_VERSION. Add gtktreemodel.o. + Fri Nov 10 19:06:41 2000 Jonathan Blandford * gtk/gtktreemodelsort.c (gtk_tree_model_sort_insert_value): New diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index ea9b49f81a..89c6d2436a 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,5 +1,7 @@ 2000-11-11 Tor Lillqvist + * gdk_pixbuf.def: Add gdk_pixbuf_new_subpixbuf. + * io-tiff.c (gdk_pixbuf__tiff_image_begin_load): Use g_file_open_tmp() (just added to GLib) instead of mkstemp() (or mktemp() and open()). diff --git a/gdk-pixbuf/gdk_pixbuf.def b/gdk-pixbuf/gdk_pixbuf.def index 6ea9e02a31..49a7b282e6 100644 --- a/gdk-pixbuf/gdk_pixbuf.def +++ b/gdk-pixbuf/gdk_pixbuf.def @@ -37,6 +37,7 @@ EXPORTS gdk_pixbuf_new_from_file gdk_pixbuf_new_from_inline gdk_pixbuf_new_from_xpm_data + gdk_pixbuf_new_subpixbuf gdk_pixbuf_postinit gdk_pixbuf_preinit gdk_pixbuf_ref diff --git a/gdk/gdk.def b/gdk/gdk.def index 9d63ae546a..22acb43223 100644 --- a/gdk/gdk.def +++ b/gdk/gdk.def @@ -92,6 +92,7 @@ EXPORTS gdk_draw_text gdk_draw_text_wc gdk_drawable_get_colormap + gdk_drawable_get_image gdk_drawable_get_size gdk_drawable_get_type gdk_drawable_get_visual @@ -157,6 +158,8 @@ EXPORTS gdk_gc_set_foreground gdk_gc_set_function gdk_gc_set_line_attributes + gdk_gc_set_rgb_bg_color + gdk_gc_set_rgb_fg_color gdk_gc_set_stipple gdk_gc_set_subwindow gdk_gc_set_tile diff --git a/gdk/win32/gdkcolor-win32.c b/gdk/win32/gdkcolor-win32.c index 311ad4a02f..a96b23ebcb 100644 --- a/gdk/win32/gdkcolor-win32.c +++ b/gdk/win32/gdkcolor-win32.c @@ -75,7 +75,7 @@ gdk_colormap_get_type (void) object_type = g_type_register_static (G_TYPE_OBJECT, "GdkColormap", - &object_info); + &object_info, 0); } return object_type; diff --git a/gdk/win32/gdkdnd-win32.c b/gdk/win32/gdkdnd-win32.c index 42e2cd307e..fa2c9fabf8 100644 --- a/gdk/win32/gdkdnd-win32.c +++ b/gdk/win32/gdkdnd-win32.c @@ -130,7 +130,7 @@ gdk_drag_context_get_type (void) object_type = g_type_register_static (G_TYPE_OBJECT, "GdkDragContext", - &object_info); + &object_info, 0); } return object_type; @@ -1231,12 +1231,13 @@ gdk_drop_finish (GdkDragContext *context, GDK_NOTE (DND, g_print ("gdk_drop_finish\n")); } +#ifdef OLE2_DND + static GdkFilterReturn gdk_destroy_filter (GdkXEvent *xev, GdkEvent *event, gpointer data) { -#ifdef OLE2_DND MSG *msg = (MSG *) xev; if (msg->message == WM_DESTROY) @@ -1250,9 +1251,9 @@ gdk_destroy_filter (GdkXEvent *xev, RevokeDragDrop (msg->hwnd); CoLockObjectExternal (idtp, FALSE, TRUE); } -#endif return GDK_FILTER_CONTINUE; } +#endif void gdk_window_register_dnd (GdkWindow *window) diff --git a/gdk/win32/gdkdrawable-win32.c b/gdk/win32/gdkdrawable-win32.c index 4f9a040996..75b23583ca 100644 --- a/gdk/win32/gdkdrawable-win32.c +++ b/gdk/win32/gdkdrawable-win32.c @@ -139,7 +139,7 @@ gdk_drawable_impl_win32_get_type (void) object_type = g_type_register_static (GDK_TYPE_DRAWABLE, "GdkDrawableImplWin32", - &object_info); + &object_info, 0); } return object_type; @@ -223,8 +223,7 @@ gdk_win32_draw_rectangle (GdkDrawable *drawable, GdkGCWin32 *gc_private = GDK_GC_WIN32 (gc); const GdkGCValuesMask mask = GDK_GC_FOREGROUND|GDK_GC_BACKGROUND; HDC hdc; - HGDIOBJ oldpen, oldbrush; - HBRUSH hbr = NULL; + HGDIOBJ old_pen_or_brush; POINT pts[4]; gboolean ok = TRUE; @@ -291,25 +290,18 @@ gdk_win32_draw_rectangle (GdkDrawable *drawable, if (ok && !FillPath (hdc)) WIN32_GDI_FAILED ("FillPath"), ok = FALSE; - - if (hbr != NULL) - if (!DeleteObject (hbr)) - WIN32_GDI_FAILED ("DeleteObject"); } else { if (filled) - oldpen = SelectObject (hdc, GetStockObject (NULL_PEN)); + old_pen_or_brush = SelectObject (hdc, GetStockObject (NULL_PEN)); else - oldbrush = SelectObject (hdc, GetStockObject (HOLLOW_BRUSH)); + old_pen_or_brush = SelectObject (hdc, GetStockObject (HOLLOW_BRUSH)); if (!Rectangle (hdc, x, y, x+width+1, y+height+1)) WIN32_GDI_FAILED ("Rectangle"); - if (filled) - SelectObject (hdc, oldpen); - else - SelectObject (hdc, oldbrush); + SelectObject (hdc, old_pen_or_brush); } gdk_win32_hdc_release (drawable, gc, mask); @@ -397,7 +389,6 @@ gdk_win32_draw_polygon (GdkDrawable *drawable, GdkGCWin32 *gc_private = GDK_GC_WIN32 (gc); const GdkGCValuesMask mask = GDK_GC_FOREGROUND|GDK_GC_BACKGROUND; HDC hdc; - HBRUSH hbr = NULL; POINT *pts; gboolean ok = TRUE; int i; @@ -445,10 +436,6 @@ gdk_win32_draw_polygon (GdkDrawable *drawable, if (ok && !FillPath (hdc)) WIN32_GDI_FAILED ("FillPath"), ok = FALSE; - - if (hbr != NULL) - if (!DeleteObject (hbr)) - WIN32_GDI_FAILED ("DeleteObject"); } else { @@ -778,7 +765,6 @@ gdk_win32_draw_segments (GdkDrawable *drawable, GdkGCWin32 *gc_private = GDK_GC_WIN32 (gc); const GdkGCValuesMask mask = GDK_GC_FOREGROUND|GDK_GC_BACKGROUND; HDC hdc; - HBRUSH hbr = NULL; gboolean ok = TRUE; int i; @@ -813,10 +799,6 @@ gdk_win32_draw_segments (GdkDrawable *drawable, if (ok && !FillPath (hdc)) WIN32_GDI_FAILED ("FillPath"), ok = FALSE; - - if (hbr != NULL) - if (!DeleteObject (hbr)) - WIN32_GDI_FAILED ("DeleteObject"); } else { diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c index d63ce1af85..85d97b5a01 100644 --- a/gdk/win32/gdkevents-win32.c +++ b/gdk/win32/gdkevents-win32.c @@ -136,6 +136,7 @@ static GdkWindow *current_window = NULL; static gint current_x, current_y; static gdouble current_x_root, current_y_root; static UINT gdk_ping_msg; +static UINT msh_mousewheel_msg; static gboolean ignore_wm_char = FALSE; static gboolean is_altgr_key = FALSE; @@ -296,8 +297,15 @@ gdk_events_init (void) #endif gdk_ping_msg = RegisterWindowMessage ("gdk-ping"); - GDK_NOTE (EVENTS, g_print ("gdk-ping = %#.03x\n", - gdk_ping_msg)); + GDK_NOTE (EVENTS, g_print ("gdk-ping = %#x\n", gdk_ping_msg)); + + /* This is the string MSH_MOUSEWHEEL from zmouse.h, + * http://www.microsoft.com/mouse/intellimouse/sdk/zmouse.h + * This message is used by mouse drivers than cannot generate WM_MOUSEWHEEL + * or on Win95. + */ + msh_mousewheel_msg = RegisterWindowMessage ("MSWHEEL_ROLLMSG"); + GDK_NOTE (EVENTS, g_print ("MSH_MOUSEWHEEL = %#x\n", msh_mousewheel_msg)); g_source_add (GDK_PRIORITY_EVENTS, TRUE, &event_funcs, NULL, NULL, NULL); @@ -1454,7 +1462,7 @@ gdk_event_translate (GdkEvent *event, return_val = !GDK_WINDOW_DESTROYED (window); - /* Will pass through switch below without match */ + goto done; } else if (msg->message == gdk_selection_request_msg) { @@ -1471,7 +1479,7 @@ gdk_event_translate (GdkEvent *event, return_val = !GDK_WINDOW_DESTROYED (window); - /* Again, will pass through switch below without match */ + goto done; } else if (msg->message == gdk_selection_clear_msg) { @@ -1485,7 +1493,64 @@ gdk_event_translate (GdkEvent *event, return_val = !GDK_WINDOW_DESTROYED (window); - /* Once again, we will pass through switch below without match */ + goto done; + } + else if (msg->message == msh_mousewheel_msg) + { + GDK_NOTE (EVENTS, g_print ("MSH_MOUSEWHEEL: %#lx %d\n", + (gulong) msg->hwnd, msg->wParam)); + + event->scroll.type = GDK_SCROLL; + + /* MSG_MOUSEWHEEL is delivered to the foreground window. Work + * around that. Also, the position is in screen coordinates, not + * client coordinates as with the button messages. + */ + pt.x = LOWORD (msg->lParam); + pt.y = HIWORD (msg->lParam); + if ((hwnd = WindowFromPoint (pt)) == NULL) + goto done; + + msg->hwnd = hwnd; + if ((new_window = gdk_win32_handle_table_lookup ((GdkNativeWindow) msg->hwnd)) == NULL) + goto done; + + if (new_window != window) + { + gdk_drawable_unref (window); + ASSIGN_WINDOW (new_window); + gdk_drawable_ref (window); + } + + if (GDK_WINDOW_OBJECT (window)->extension_events != 0 + && gdk_input_ignore_core) + { + GDK_NOTE (EVENTS, g_print ("...ignored\n")); + goto done; + } + + if (!propagate (&window, msg, + p_grab_window, p_grab_owner_events, p_grab_mask, + doesnt_want_scroll)) + goto done; + + ASSIGN_WINDOW (window); + + ScreenToClient (msg->hwnd, &pt); + event->button.window = window; + event->scroll.direction = ((int) msg->wParam > 0) ? + GDK_SCROLL_UP : GDK_SCROLL_DOWN; + event->scroll.window = window; + event->scroll.time = msg->time; + event->scroll.x = (gint16) pt.x; + event->scroll.y = (gint16) pt.y; + event->scroll.x_root = (gint16) LOWORD (msg->lParam); + event->scroll.y_root = (gint16) HIWORD (msg->lParam); + event->scroll.state = 0; /* No state information with MSH_MOUSEWHEEL */ + event->scroll.device = gdk_core_pointer; + return_val = !GDK_WINDOW_DESTROYED (window); + + goto done; } else { @@ -2139,7 +2204,31 @@ gdk_event_translate (GdkEvent *event, break; case WM_MOUSEWHEEL: - GDK_NOTE (EVENTS, g_print ("WM_MOUSEWHEEL: %#lx\n", (gulong) msg->hwnd)); + GDK_NOTE (EVENTS, g_print ("WM_MOUSEWHEEL: %#lx %d\n", + (gulong) msg->hwnd, HIWORD (msg->wParam))); + + event->scroll.type = GDK_SCROLL; + + /* WM_MOUSEWHEEL is delivered to the focus window 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 (msg->lParam); + pt.y = HIWORD (msg->lParam); + if ((hwnd = WindowFromPoint (pt)) == NULL) + break; + + msg->hwnd = hwnd; + if ((new_window = gdk_win32_handle_table_lookup ((GdkNativeWindow) msg->hwnd)) == NULL) + break; + + if (new_window != window) + { + gdk_drawable_unref (window); + ASSIGN_WINDOW (new_window); + gdk_drawable_ref (window); + } if (GDK_WINDOW_OBJECT (window)->extension_events != 0 && gdk_input_ignore_core) @@ -2148,33 +2237,14 @@ gdk_event_translate (GdkEvent *event, 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 (msg->lParam); - pt.y = HIWORD (msg->lParam); - if ((hwnd = WindowFromPoint (pt)) == NULL) - break; - msg->hwnd = hwnd; - if ((new_window = gdk_win32_handle_table_lookup ((GdkNativeWindow) msg->hwnd)) == NULL) - break; - if (new_window != window) - { - gdk_drawable_unref (window); - ASSIGN_WINDOW (new_window); - gdk_drawable_ref (window); - } - ScreenToClient (msg->hwnd, &pt); if (!propagate (&window, msg, p_grab_window, p_grab_owner_events, p_grab_mask, doesnt_want_scroll)) break; + ASSIGN_WINDOW (window); + ScreenToClient (msg->hwnd, &pt); event->button.window = window; event->scroll.direction = (((short) HIWORD (msg->wParam)) > 0) ? GDK_SCROLL_UP : GDK_SCROLL_DOWN; @@ -2183,7 +2253,7 @@ gdk_event_translate (GdkEvent *event, event->scroll.x = (gint16) pt.x; event->scroll.y = (gint16) pt.y; event->scroll.x_root = (gint16) LOWORD (msg->lParam); - event->scroll.y_root = (gint16) LOWORD (msg->lParam); + event->scroll.y_root = (gint16) HIWORD (msg->lParam); event->scroll.state = build_pointer_event_state (msg); event->scroll.device = gdk_core_pointer; return_val = !GDK_WINDOW_DESTROYED (window); @@ -2204,7 +2274,7 @@ gdk_event_translate (GdkEvent *event, event->crossing.x = current_x; event->crossing.y = current_y; event->crossing.x_root = current_xroot; - event->crossing.y_root = curYroot; + event->crossing.y_root = current_yroot; event->crossing.mode = GDK_CROSSING_NORMAL; if (current_window && IsChild (GDK_WINDOW_HWND (current_window), GDK_WINDOW_HWND (window))) diff --git a/gdk/win32/gdkgc-win32.c b/gdk/win32/gdkgc-win32.c index 8ec265cc96..9482fa0914 100644 --- a/gdk/win32/gdkgc-win32.c +++ b/gdk/win32/gdkgc-win32.c @@ -72,7 +72,7 @@ gdk_gc_win32_get_type (void) object_type = g_type_register_static (GDK_TYPE_GC, "GdkGCWin32", - &object_info); + &object_info, 0); } return object_type; @@ -1454,3 +1454,101 @@ BitmapToRegion (HBITMAP hBmp) return hRgn; } + +#ifdef G_ENABLE_DEBUG + +gchar * +gdk_win32_cap_style_to_string (GdkCapStyle cap_style) +{ + switch (cap_style) + { +#define CASE(x) case x: return #x + strlen ("GDK_CAP_") + CASE (GDK_CAP_NOT_LAST); + CASE (GDK_CAP_BUTT); + CASE (GDK_CAP_ROUND); + CASE (GDK_CAP_PROJECTING); +#undef CASE + default: return ("illegal GdkCapStyle value"); + } + /* NOTREACHED */ + return NULL; +} + +gchar * +gdk_win32_fill_style_to_string (GdkFill fill) +{ + switch (fill) + { +#define CASE(x) case x: return #x + strlen ("GDK_") + CASE (GDK_SOLID); + CASE (GDK_TILED); + CASE (GDK_STIPPLED); + CASE (GDK_OPAQUE_STIPPLED); +#undef CASE + default: return ("illegal GdkFill value"); + } + /* NOTREACHED */ + return NULL; +} + +gchar * +gdk_win32_function_to_string (GdkFunction function) +{ + switch (function) + { +#define CASE(x) case x: return #x + strlen ("GDK_") + CASE (GDK_COPY); + CASE (GDK_INVERT); + CASE (GDK_XOR); + CASE (GDK_CLEAR); + CASE (GDK_AND); + CASE (GDK_AND_REVERSE); + CASE (GDK_AND_INVERT); + CASE (GDK_NOOP); + CASE (GDK_OR); + CASE (GDK_EQUIV); + CASE (GDK_OR_REVERSE); + CASE (GDK_COPY_INVERT); + CASE (GDK_OR_INVERT); + CASE (GDK_NAND); + CASE (GDK_SET); +#undef CASE + default: return ("illegal GdkFunction value"); + } + /* NOTREACHED */ + return NULL; +} + +gchar * +gdk_win32_join_style_to_string (GdkJoinStyle join_style) +{ + switch (join_style) + { +#define CASE(x) case x: return #x + strlen ("GDK_JOIN_") + CASE (GDK_JOIN_MITER); + CASE (GDK_JOIN_ROUND); + CASE (GDK_JOIN_BEVEL); +#undef CASE + default: return ("illegal GdkJoinStyle value"); + } + /* NOTREACHED */ + return NULL; +} + +gchar * +gdk_win32_line_style_to_string (GdkLineStyle line_style) +{ + switch (line_style) + { +#define CASE(x) case x: return #x + strlen ("GDK_LINE_") + CASE(GDK_LINE_SOLID); + CASE(GDK_LINE_ON_OFF_DASH); + CASE(GDK_LINE_DOUBLE_DASH); +#undef CASE + default: return ("illegal GdkLineStyle value"); + } + /* NOTREACHED */ + return NULL; +} + +#endif diff --git a/gdk/win32/gdkimage-win32.c b/gdk/win32/gdkimage-win32.c index 6507aff75d..284dd79f0d 100644 --- a/gdk/win32/gdkimage-win32.c +++ b/gdk/win32/gdkimage-win32.c @@ -64,7 +64,7 @@ gdk_image_get_type (void) object_type = g_type_register_static (G_TYPE_OBJECT, "GdkImage", - &object_info); + &object_info, 0); } return object_type; diff --git a/gdk/win32/gdkinput-win32.h b/gdk/win32/gdkinput-win32.h index 8216f49e50..b8de5ad1b6 100644 --- a/gdk/win32/gdkinput-win32.h +++ b/gdk/win32/gdkinput-win32.h @@ -148,9 +148,11 @@ gint _gdk_input_other_event (GdkEvent *event, GdkInputWindow *gdk_input_window_find (GdkWindow *window); -gint _gdk_input_enable_window (GdkWindow *window, +void gdk_input_window_destroy (GdkWindow *window); + +gint _gdk_input_enable_window (GdkWindow *window, GdkDevicePrivate *gdkdev); -gint _gdk_input_disable_window (GdkWindow *window, +gint _gdk_input_disable_window (GdkWindow *window, GdkDevicePrivate *gdkdev); gint _gdk_input_grab_pointer (GdkWindow *window, gint owner_events, diff --git a/gdk/win32/gdkpixmap-win32.c b/gdk/win32/gdkpixmap-win32.c index df90c12c4c..e7064601f4 100644 --- a/gdk/win32/gdkpixmap-win32.c +++ b/gdk/win32/gdkpixmap-win32.c @@ -67,7 +67,7 @@ gdk_pixmap_impl_win32_get_type (void) object_type = g_type_register_static (GDK_TYPE_DRAWABLE_IMPL_WIN32, "GdkPixmapImplWin32", - &object_info); + &object_info, 0); } return object_type; diff --git a/gdk/win32/gdkprivate-win32.h b/gdk/win32/gdkprivate-win32.h index 3111303cfd..7f865b1110 100644 --- a/gdk/win32/gdkprivate-win32.h +++ b/gdk/win32/gdkprivate-win32.h @@ -89,8 +89,13 @@ void gdk_wchar_text_handle (GdkFont *font, void *arg); #ifdef G_ENABLE_DEBUG -gchar *gdk_win32_color_to_string (const GdkColor *); -gchar *gdk_win32_message_name (UINT msg); +gchar *gdk_win32_color_to_string (const GdkColor *color); +gchar *gdk_win32_cap_style_to_string (GdkCapStyle cap_style); +gchar *gdk_win32_fill_style_to_string (GdkFill fill); +gchar *gdk_win32_function_to_string (GdkFunction function); +gchar *gdk_win32_join_style_to_string (GdkJoinStyle join_style); +gchar *gdk_win32_line_style_to_string (GdkLineStyle line_style); +gchar *gdk_win32_message_name (UINT msg); #endif gchar *gdk_win32_last_error_string (void); diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c index 6ca5b2c52f..28fd509948 100644 --- a/gdk/win32/gdkwindow-win32.c +++ b/gdk/win32/gdkwindow-win32.c @@ -32,6 +32,7 @@ #include "gdkwindow.h" #include "gdkinternals.h" #include "gdkprivate-win32.h" +#include "gdkinput-win32.h" static gboolean gdk_window_gravity_works (void); static void gdk_window_set_static_win_gravity (GdkWindow *window, @@ -71,7 +72,7 @@ gdk_window_impl_win32_get_type (void) object_type = g_type_register_static (GDK_TYPE_DRAWABLE_IMPL_WIN32, "GdkWindowImplWin32", - &object_info); + &object_info, 0); } return object_type; @@ -597,7 +598,8 @@ gdk_window_new (GdkWindow *parent, if (GDK_WINDOW_HWND (window) != hwndNew) { g_warning("gdk_window_new: gdk_event_translate::WM_CREATE (%#x, %#x) HWND mismatch.", - GDK_WINDOW_HWND (window), hwndNew); + (guint) GDK_WINDOW_HWND (window), + (guint) hwndNew); /* HB: IHMO due to a race condition the handle was increased by * one, which causes much trouble. Because I can't find the @@ -629,10 +631,10 @@ gdk_window_new (GdkWindow *parent, "???")))), mbtitle, width, height, (x == CW_USEDEFAULT ? -9999 : x), y, - hparent, - GDK_WINDOW_HWND (window), - impl->input_locale, - impl->charset_info.ciACP)); + (guint) hparent, + (guint) GDK_WINDOW_HWND (window), + (guint) impl->input_locale, + (guint) impl->charset_info.ciACP)); g_free (mbtitle); g_free (wctitle); @@ -714,7 +716,7 @@ _gdk_windowing_window_destroy (GdkWindow *window, g_return_if_fail (GDK_IS_WINDOW (window)); GDK_NOTE (MISC, g_print ("_gdk_windowing_window_destroy %#x\n", - GDK_WINDOW_HWND (window))); + (guint) GDK_WINDOW_HWND (window))); if (private->extension_events != 0) gdk_input_window_destroy (window); @@ -751,14 +753,14 @@ gdk_window_destroy_notify (GdkWindow *window) GDK_NOTE (EVENTS, g_print ("gdk_window_destroy_notify: %#x %s\n", - GDK_WINDOW_HWND (window), + (guint) GDK_WINDOW_HWND (window), (GDK_WINDOW_DESTROYED (window) ? "(destroyed)" : ""))); if (!GDK_WINDOW_DESTROYED (window)) { if (GDK_WINDOW_TYPE(window) != GDK_WINDOW_FOREIGN) g_warning ("window %#x unexpectedly destroyed", - GDK_WINDOW_HWND (window)); + (guint) GDK_WINDOW_HWND (window)); _gdk_window_destroy (window, TRUE); } @@ -778,7 +780,7 @@ gdk_window_show (GdkWindow *window) if (!private->destroyed) { GDK_NOTE (MISC, g_print ("gdk_window_show: %#x\n", - GDK_WINDOW_HWND (window))); + (guint) GDK_WINDOW_HWND (window))); private->mapped = TRUE; if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP) @@ -815,7 +817,7 @@ gdk_window_hide (GdkWindow *window) if (!private->destroyed) { GDK_NOTE (MISC, g_print ("gdk_window_hide: %#x\n", - GDK_WINDOW_HWND (window))); + (guint) GDK_WINDOW_HWND (window))); private->mapped = FALSE; if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TOPLEVEL) @@ -836,7 +838,7 @@ gdk_window_withdraw (GdkWindow *window) if (!private->destroyed) { GDK_NOTE (MISC, g_print ("gdk_window_withdraw: %#x\n", - GDK_WINDOW_HWND (window))); + (guint) GDK_WINDOW_HWND (window))); gdk_window_hide (window); /* ??? */ } @@ -880,7 +882,8 @@ gdk_window_resize (GdkWindow *window, if (!private->destroyed) { GDK_NOTE (MISC, g_print ("gdk_window_resize: %#x %dx%d\n", - GDK_WINDOW_HWND (window), width, height)); + (guint) GDK_WINDOW_HWND (window), + width, height)); if (GDK_WINDOW_TYPE (private) != GDK_WINDOW_CHILD) { @@ -917,9 +920,9 @@ gdk_window_resize (GdkWindow *window, private->resize_count += 1; - GDK_NOTE (MISC, - g_print ("...MoveWindow(%#x,%dx%d@+%d+%d)\n", - GDK_WINDOW_HWND (window), width, height, x, y)); + GDK_NOTE (MISC, g_print ("...MoveWindow(%#x,%dx%d@+%d+%d)\n", + (guint) GDK_WINDOW_HWND (window), + width, height, x, y)); if (!MoveWindow (GDK_WINDOW_HWND (window), x, y, width, height, TRUE)) WIN32_API_FAILED ("MoveWindow"); } @@ -952,7 +955,8 @@ gdk_window_move_resize (GdkWindow *window, DWORD dwExStyle; GDK_NOTE (MISC, g_print ("gdk_window_move_resize: %#x %dx%d@+%d+%d\n", - GDK_WINDOW_HWND (window), width, height, x, y)); + (guint) GDK_WINDOW_HWND (window), + width, height, x, y)); if (GDK_WINDOW_TYPE (private) == GDK_WINDOW_CHILD) _gdk_window_move_resize_child (window, x, y, width, height); @@ -968,8 +972,8 @@ gdk_window_move_resize (GdkWindow *window, if (!AdjustWindowRectEx (&rect, dwStyle, FALSE, dwExStyle)) WIN32_API_FAILED ("AdjustWindowRectEx"); - GDK_NOTE (MISC, g_print ("...MoveWindow(%#x,%dx%d@+%d+%d)\n", - GDK_WINDOW_HWND (window), + GDK_NOTE (MISC, g_print ("...MoveWindow(%#x,%ldx%ld@+%ld+%ld)\n", + (guint) GDK_WINDOW_HWND (window), rect.right - rect.left, rect.bottom - rect.top, rect.left, rect.top)); if (!MoveWindow (GDK_WINDOW_HWND (window), @@ -1005,8 +1009,8 @@ gdk_window_reparent (GdkWindow *window, if (!GDK_WINDOW_DESTROYED (window) && !GDK_WINDOW_DESTROYED (new_parent)) { GDK_NOTE (MISC, g_print ("gdk_window_reparent: %#x %#x\n", - GDK_WINDOW_HWND (window), - GDK_WINDOW_HWND (new_parent))); + (guint) GDK_WINDOW_HWND (window), + (guint) GDK_WINDOW_HWND (new_parent))); if (!SetParent (GDK_WINDOW_HWND (window), GDK_WINDOW_HWND (new_parent))) WIN32_API_FAILED ("SetParent"); @@ -1054,7 +1058,8 @@ _gdk_windowing_window_clear_area (GdkWindow *window, height = impl->height - y; GDK_NOTE (MISC, g_print ("_gdk_windowing_window_clear_area: " "%#x %dx%d@+%d+%d\n", - GDK_WINDOW_HWND (window), width, height, x, y)); + (guint) GDK_WINDOW_HWND (window), + width, height, x, y)); hdc = GetDC (GDK_WINDOW_HWND (window)); IntersectClipRect (hdc, x, y, x + width + 1, y + height + 1); SendMessage (GDK_WINDOW_HWND (window), WM_ERASEBKGND, (WPARAM) hdc, 0); @@ -1078,7 +1083,8 @@ _gdk_windowing_window_clear_area_e (GdkWindow *window, GDK_NOTE (MISC, g_print ("_gdk_windowing_window_clear_area_e: " "%#x %dx%d@+%d+%d\n", - GDK_WINDOW_HWND (window), width, height, x, y)); + (guint) GDK_WINDOW_HWND (window), + width, height, x, y)); rect.left = x; rect.right = x + width + 1; @@ -1099,7 +1105,7 @@ gdk_window_raise (GdkWindow *window) if (!GDK_WINDOW_DESTROYED (window)) { GDK_NOTE (MISC, g_print ("gdk_window_raise: %#x\n", - GDK_WINDOW_HWND (window))); + (guint) GDK_WINDOW_HWND (window))); if (!BringWindowToTop (GDK_WINDOW_HWND (window))) WIN32_API_FAILED ("BringWindowToTop"); @@ -1115,7 +1121,7 @@ gdk_window_lower (GdkWindow *window) if (!GDK_WINDOW_DESTROYED (window)) { GDK_NOTE (MISC, g_print ("gdk_window_lower: %#x\n", - GDK_WINDOW_HWND (window))); + (guint) GDK_WINDOW_HWND (window))); if (!SetWindowPos (GDK_WINDOW_HWND (window), HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE)) @@ -1149,7 +1155,7 @@ gdk_window_set_hints (GdkWindow *window, impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl); GDK_NOTE (MISC, g_print ("gdk_window_set_hints: %#x %dx%d..%dx%d @+%d+%d\n", - GDK_WINDOW_HWND (window), + (guint) GDK_WINDOW_HWND (window), min_width, min_height, max_width, max_height, x, y)); @@ -1159,48 +1165,50 @@ gdk_window_set_hints (GdkWindow *window, if (flags) { if (flags & GDK_HINT_POS) - if (!GetWindowPlacement (GDK_WINDOW_HWND (window), &size_hints)) - WIN32_API_FAILED ("GetWindowPlacement"); - else - { - GDK_NOTE (MISC, g_print ("...rcNormalPosition:" - " (%d,%d)--(%d,%d)\n", - size_hints.rcNormalPosition.left, - size_hints.rcNormalPosition.top, - size_hints.rcNormalPosition.right, - size_hints.rcNormalPosition.bottom)); - /* What are the corresponding window coordinates for client - * area coordinates x, y - */ - rect.left = x; - rect.top = y; - rect.right = rect.left + 200; /* dummy */ - rect.bottom = rect.top + 200; - dwStyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE); - dwExStyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE); - AdjustWindowRectEx (&rect, dwStyle, FALSE, dwExStyle); - size_hints.flags = 0; - size_hints.showCmd = SW_SHOWNA; - - /* Set the normal position hint to that location, with unchanged - * width and height. - */ - diff = size_hints.rcNormalPosition.left - rect.left; - size_hints.rcNormalPosition.left = rect.left; - size_hints.rcNormalPosition.right -= diff; - diff = size_hints.rcNormalPosition.top - rect.top; - size_hints.rcNormalPosition.top = rect.top; - size_hints.rcNormalPosition.bottom -= diff; - GDK_NOTE (MISC, g_print ("...setting: (%d,%d)--(%d,%d)\n", - size_hints.rcNormalPosition.left, - size_hints.rcNormalPosition.top, - size_hints.rcNormalPosition.right, - size_hints.rcNormalPosition.bottom)); - if (!SetWindowPlacement (GDK_WINDOW_HWND (window), &size_hints)) - WIN32_API_FAILED ("SetWindowPlacement"); - impl->hint_x = rect.left; - impl->hint_y = rect.top; - } + { + if (!GetWindowPlacement (GDK_WINDOW_HWND (window), &size_hints)) + WIN32_API_FAILED ("GetWindowPlacement"); + else + { + GDK_NOTE (MISC, g_print ("...rcNormalPosition:" + " (%ld,%ld)--(%ld,%ld)\n", + size_hints.rcNormalPosition.left, + size_hints.rcNormalPosition.top, + size_hints.rcNormalPosition.right, + size_hints.rcNormalPosition.bottom)); + /* What are the corresponding window coordinates for client + * area coordinates x, y + */ + rect.left = x; + rect.top = y; + rect.right = rect.left + 200; /* dummy */ + rect.bottom = rect.top + 200; + dwStyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE); + dwExStyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE); + AdjustWindowRectEx (&rect, dwStyle, FALSE, dwExStyle); + size_hints.flags = 0; + size_hints.showCmd = SW_SHOWNA; + + /* Set the normal position hint to that location, with unchanged + * width and height. + */ + diff = size_hints.rcNormalPosition.left - rect.left; + size_hints.rcNormalPosition.left = rect.left; + size_hints.rcNormalPosition.right -= diff; + diff = size_hints.rcNormalPosition.top - rect.top; + size_hints.rcNormalPosition.top = rect.top; + size_hints.rcNormalPosition.bottom -= diff; + GDK_NOTE (MISC, g_print ("...setting: (%ld,%ld)--(%ld,%ld)\n", + size_hints.rcNormalPosition.left, + size_hints.rcNormalPosition.top, + size_hints.rcNormalPosition.right, + size_hints.rcNormalPosition.bottom)); + if (!SetWindowPlacement (GDK_WINDOW_HWND (window), &size_hints)) + WIN32_API_FAILED ("SetWindowPlacement"); + impl->hint_x = rect.left; + impl->hint_y = rect.top; + } + } if (flags & GDK_HINT_MIN_SIZE) { @@ -1257,7 +1265,6 @@ gdk_window_set_geometry_hints (GdkWindow *window, RECT rect; DWORD dwStyle; DWORD dwExStyle; - int diff; g_return_if_fail (window != NULL); g_return_if_fail (GDK_IS_WINDOW (window)); @@ -1323,28 +1330,30 @@ gdk_window_set_geometry_hints (GdkWindow *window, if (geom_mask & GDK_HINT_BASE_SIZE && geometry->base_width > 0 && geometry->base_height > 0) - if (!GetWindowPlacement (GDK_WINDOW_HWND (window), &size_hints)) - WIN32_API_FAILED ("GetWindowPlacement"); - else - { - GDK_NOTE (MISC, g_print ("gdk_window_set_geometry_hints:" - " rcNormalPosition: (%d,%d)--(%d,%d)\n", - size_hints.rcNormalPosition.left, - size_hints.rcNormalPosition.top, - size_hints.rcNormalPosition.right, - size_hints.rcNormalPosition.bottom)); - size_hints.rcNormalPosition.right = - size_hints.rcNormalPosition.left + geometry->base_width; - size_hints.rcNormalPosition.bottom = - size_hints.rcNormalPosition.top + geometry->base_height; - GDK_NOTE (MISC, g_print ("...setting: rcNormal: (%d,%d)--(%d,%d)\n", - size_hints.rcNormalPosition.left, - size_hints.rcNormalPosition.top, - size_hints.rcNormalPosition.right, - size_hints.rcNormalPosition.bottom)); - if (!SetWindowPlacement (GDK_WINDOW_HWND (window), &size_hints)) - WIN32_API_FAILED ("SetWindowPlacement"); - } + { + if (!GetWindowPlacement (GDK_WINDOW_HWND (window), &size_hints)) + WIN32_API_FAILED ("GetWindowPlacement"); + else + { + GDK_NOTE (MISC, g_print ("gdk_window_set_geometry_hints:" + " rcNormalPosition: (%ld,%ld)--(%ld,%ld)\n", + size_hints.rcNormalPosition.left, + size_hints.rcNormalPosition.top, + size_hints.rcNormalPosition.right, + size_hints.rcNormalPosition.bottom)); + size_hints.rcNormalPosition.right = + size_hints.rcNormalPosition.left + geometry->base_width; + size_hints.rcNormalPosition.bottom = + size_hints.rcNormalPosition.top + geometry->base_height; + GDK_NOTE (MISC, g_print ("...setting: rcNormal: (%ld,%ld)--(%ld,%ld)\n", + size_hints.rcNormalPosition.left, + size_hints.rcNormalPosition.top, + size_hints.rcNormalPosition.right, + size_hints.rcNormalPosition.bottom)); + if (!SetWindowPlacement (GDK_WINDOW_HWND (window), &size_hints)) + WIN32_API_FAILED ("SetWindowPlacement"); + } + } if (geom_mask & GDK_HINT_RESIZE_INC) { @@ -1375,7 +1384,7 @@ gdk_window_set_title (GdkWindow *window, title = "."; GDK_NOTE (MISC, g_print ("gdk_window_set_title: %#x %s\n", - GDK_WINDOW_HWND (window), title)); + (guint) GDK_WINDOW_HWND (window), title)); if (!GDK_WINDOW_DESTROYED (window)) { @@ -1406,7 +1415,8 @@ gdk_window_set_role (GdkWindow *window, g_return_if_fail (GDK_IS_WINDOW (window)); GDK_NOTE (MISC, g_print ("gdk_window_set_role: %#x %s\n", - GDK_WINDOW_HWND (window), (role ? role : "NULL"))); + (guint) GDK_WINDOW_HWND (window), + (role ? role : "NULL"))); /* XXX */ } @@ -1418,8 +1428,8 @@ gdk_window_set_transient_for (GdkWindow *window, g_return_if_fail (GDK_IS_WINDOW (window)); GDK_NOTE (MISC, g_print ("gdk_window_set_transient_for: %#x %#x\n", - GDK_WINDOW_HWND (window), - GDK_WINDOW_HWND (parent))); + (guint) GDK_WINDOW_HWND (window), + (guint) GDK_WINDOW_HWND (parent))); /* XXX */ } @@ -1433,7 +1443,7 @@ gdk_window_set_background (GdkWindow *window, g_return_if_fail (GDK_IS_WINDOW (window)); GDK_NOTE (MISC, g_print ("gdk_window_set_background: %#x %s\n", - GDK_WINDOW_HWND (window), + (guint) GDK_WINDOW_HWND (window), gdk_win32_color_to_string (color))); private->bg_color = *color; @@ -1504,10 +1514,12 @@ gdk_window_set_cursor (GdkWindow *window, hcursor = cursor_private->hcursor; GDK_NOTE (MISC, g_print ("gdk_window_set_cursor: %#x %#x\n", - GDK_WINDOW_HWND (window), hcursor)); + (guint) GDK_WINDOW_HWND (window), + (guint) hcursor)); if (impl->hcursor != NULL) { - GDK_NOTE (MISC, g_print ("...DestroyCursor (%#x)\n", impl->hcursor)); + GDK_NOTE (MISC, g_print ("...DestroyCursor (%#x)\n", + (guint) impl->hcursor)); DestroyCursor (impl->hcursor); impl->hcursor = NULL; @@ -1522,7 +1534,7 @@ gdk_window_set_cursor (GdkWindow *window, */ impl->hcursor = CopyCursor (hcursor); GDK_NOTE (MISC, g_print ("...CopyCursor (%#x) = %#x\n", - hcursor, impl->hcursor)); + (guint) hcursor, (guint) impl->hcursor)); GetCursorPos (&pt); if (ChildWindowFromPoint (GDK_WINDOW_HWND (window), pt) == GDK_WINDOW_HWND (window)) @@ -1595,7 +1607,8 @@ gdk_window_get_origin (GdkWindow *window, *y = ty; GDK_NOTE (MISC, g_print ("gdk_window_get_origin: %#x: +%d+%d\n", - GDK_WINDOW_HWND (window), tx, ty)); + (guint) GDK_WINDOW_HWND (window), + tx, ty)); return return_val; } @@ -1640,9 +1653,10 @@ gdk_window_get_root_origin (GdkWindow *window, if (y) *y = pt.y; - GDK_NOTE (MISC, g_print ("gdk_window_get_root_origin: %#x: (%#x) +%d+%d\n", - GDK_WINDOW_HWND (window), - GDK_WINDOW_HWND (rover), pt.x, pt.y)); + GDK_NOTE (MISC, g_print ("gdk_window_get_root_origin: %#x: (%#x) +%ld+%ld\n", + (guint) GDK_WINDOW_HWND (window), + (guint) GDK_WINDOW_HWND (rover), + pt.x, pt.y)); } GdkWindow* @@ -1749,8 +1763,9 @@ gdk_window_at_pointer (gint *win_x, *win_y = point.y - rect.top; } - GDK_NOTE (MISC, g_print ("gdk_window_at_pointer: +%d+%d %#x%s\n", - point.x, point.y, hwnd, + GDK_NOTE (MISC, g_print ("gdk_window_at_pointer: +%ld+%ld %#x%s\n", + point.x, point.y, + (guint) hwnd, (window == NULL ? " NULL" : ""))); return window; @@ -1792,7 +1807,7 @@ gdk_window_shape_combine_mask (GdkWindow *window, if (!mask) { GDK_NOTE (MISC, g_print ("gdk_window_shape_combine_mask: %#x none\n", - GDK_WINDOW_HWND (window))); + (guint) GDK_WINDOW_HWND (window))); SetWindowRgn (GDK_WINDOW_HWND (window), NULL, TRUE); } else @@ -1806,8 +1821,8 @@ gdk_window_shape_combine_mask (GdkWindow *window, hrgn = BitmapToRegion (GDK_WINDOW_HWND (mask)); GDK_NOTE (MISC, g_print ("gdk_window_shape_combine_mask: %#x %#x\n", - GDK_WINDOW_HWND (window), - GDK_WINDOW_HWND (mask))); + (guint) GDK_WINDOW_HWND (window), + (guint) GDK_WINDOW_HWND (mask))); /* SetWindowRgn wants window (not client) coordinates */ dwStyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE); @@ -1999,7 +2014,6 @@ gdk_propagate_shapes (HANDLE win, { RECT emptyRect; HRGN region, childRegion; - RECT rect; HWND *list = NULL; gint i, num; diff --git a/gtk/gtk.def b/gtk/gtk.def index 5559269f20..dba8705b5f 100755 --- a/gtk/gtk.def +++ b/gtk/gtk.def @@ -436,8 +436,14 @@ EXPORTS gtk_curve_set_vector gtk_data_get_type gtk_debug_flags + gtk_dialog_add_action_widget + gtk_dialog_add_button + gtk_dialog_add_buttons gtk_dialog_get_type gtk_dialog_new + gtk_dialog_new_with_buttons + gtk_dialog_response + gtk_dialog_run gtk_drag_begin gtk_drag_dest_handle_event gtk_drag_dest_set @@ -642,6 +648,8 @@ EXPORTS gtk_label_parse_uline gtk_label_set_justify gtk_label_set_line_wrap + gtk_label_set_markup + gtk_label_set_markup_with_accel gtk_label_set_pattern gtk_label_set_text gtk_layout_freeze @@ -738,7 +746,6 @@ EXPORTS gtk_marshal_VOID__UINT_POINTER_UINT_FLAGS_FLAGS gtk_marshal_VOID__UINT_POINTER_UINT_UINT_ENUM gtk_marshal_VOID__VOID - gtk_menu_append gtk_menu_attach_to_widget gtk_menu_bar_append gtk_menu_bar_get_type @@ -761,7 +768,6 @@ EXPORTS gtk_menu_get_attach_widget gtk_menu_get_type gtk_menu_get_uline_accel_group - gtk_menu_insert gtk_menu_item_activate gtk_menu_item_configure gtk_menu_item_deselect @@ -776,7 +782,6 @@ EXPORTS gtk_menu_new gtk_menu_popdown gtk_menu_popup - gtk_menu_prepend gtk_menu_reorder_child gtk_menu_reposition gtk_menu_set_accel_group @@ -1060,6 +1065,7 @@ EXPORTS gtk_selection_request gtk_separator_get_type gtk_set_locale + gtk_signal_compat_matched gtk_signal_connect_full gtk_signal_connect_object_while_alive gtk_signal_connect_while_alive @@ -1122,10 +1128,13 @@ EXPORTS gtk_text_backward_delete gtk_text_buffer_apply_tag gtk_text_buffer_apply_tag_by_name + gtk_text_buffer_create_child_anchor gtk_text_buffer_create_mark gtk_text_buffer_create_tag gtk_text_buffer_delete + gtk_text_buffer_delete_interactive gtk_text_buffer_delete_mark + gtk_text_buffer_delete_mark_by_name gtk_text_buffer_get_bounds gtk_text_buffer_get_char_count gtk_text_buffer_get_insert @@ -1138,12 +1147,22 @@ EXPORTS gtk_text_buffer_get_mark gtk_text_buffer_get_selection_bounds gtk_text_buffer_get_slice - gtk_text_buffer_get_tag_table + gtk_text_buffer_get_tag_table + gtk_text_buffer_get_text gtk_text_buffer_insert + gtk_text_buffer_insert_at_cursor + gtk_text_buffer_insert_interactive + gtk_text_buffer_insert_interactive_at_cursor gtk_text_buffer_insert_pixbuf + gtk_text_buffer_insert_range + gtk_text_buffer_insert_range_interactive + gtk_text_buffer_insert_with_tags + gtk_text_buffer_insert_with_tags_by_name gtk_text_buffer_modified gtk_text_buffer_move_mark + gtk_text_buffer_move_mark_by_name gtk_text_buffer_new + gtk_text_buffer_place_cursor gtk_text_buffer_remove_tag gtk_text_buffer_remove_tag_by_name gtk_text_buffer_set_modified @@ -1154,11 +1173,14 @@ EXPORTS gtk_text_get_type gtk_text_insert gtk_text_iter_backward_chars + gtk_text_iter_backward_find_char + gtk_text_iter_backward_search gtk_text_iter_backward_to_tag_toggle gtk_text_iter_begins_tag gtk_text_iter_ends_tag gtk_text_iter_equal gtk_text_iter_forward_chars + gtk_text_iter_forward_find_char gtk_text_iter_forward_line gtk_text_iter_forward_search gtk_text_iter_forward_to_tag_toggle @@ -1167,9 +1189,11 @@ EXPORTS gtk_text_iter_get_offset gtk_text_iter_get_text gtk_text_iter_get_toggled_tags + gtk_text_iter_in_range gtk_text_iter_is_last gtk_text_iter_next_char gtk_text_iter_prev_char + gtk_text_iter_reorder gtk_text_iter_spew gtk_text_iter_toggles_tag gtk_text_new diff --git a/gtk/makefile.mingw.in b/gtk/makefile.mingw.in index 21c9d1523c..050adc2863 100644 --- a/gtk/makefile.mingw.in +++ b/gtk/makefile.mingw.in @@ -34,7 +34,7 @@ AWK = awk INCLUDES = -I . -I .. -I ../gdk -I ../gdk-pixbuf DEPCFLAGS = $(PANGO_CFLAGS) $(GLIB_CFLAGS) $(LIBICONV_CFLAGS) $(INTL_CFLAGS) -DEFINES = -DGTK_DISABLE_COMPAT_H -DGTK_COMPILATION -DG_LOG_DOMAIN=\"Gtk\" +DEFINES = -DGTK_DISABLE_COMPAT_H -DGTK_COMPILATION -DG_LOG_DOMAIN=\"Gtk\" -DGTK_VERSION=\"@GTK_VERSION@\" all : \ ../config.h \ @@ -168,6 +168,7 @@ gtk_OBJECTS = \ gtktooltips.o \ gtktree.o \ gtktreeitem.o \ + gtktreemodel.o \ gtktypeutils.o \ gtkvbbox.o \ gtkvbox.o \ @@ -463,5 +464,6 @@ rmgen: makefile.mingw: makefile.mingw.in sed -e 's,@GTK_MAJOR[_]VERSION@,@GTK_MAJOR_VERSION@,' \ -e 's,@GTK_MINOR[_]VERSION@,@GTK_MINOR_VERSION@,' \ + -e 's,@GTK[_]VERSION@,@GTK_VERSION@,' \ -e 's,@GDK_PIXBUF[_]MAJOR@,@GDK_PIXBUF_MAJOR@,' \ -e 's,@GDK_PIXBUF[_]MINOR@,@GDK_PIXBUF_MINOR@,' <$< >$@ diff --git a/gtk/makefile.msc.in b/gtk/makefile.msc.in index 3a12077073..f641aed7f9 100644 --- a/gtk/makefile.msc.in +++ b/gtk/makefile.msc.in @@ -165,6 +165,7 @@ gtk_OBJECTS = \ gtktooltips.obj \ gtktree.obj \ gtktreeitem.obj \ + gtktreemodel.obj \ gtktypeutils.obj \ gtkvbbox.obj \ gtkvbox.obj \