diff options
-rw-r--r-- | ChangeLog | 29 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 29 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 29 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 29 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 29 | ||||
-rw-r--r-- | gdk/gdk.def | 17 | ||||
-rw-r--r-- | gdk/win32/gdkcursor-win32.c | 115 | ||||
-rw-r--r-- | gdk/win32/gdkdisplay-win32.c | 9 | ||||
-rw-r--r-- | gdk/win32/gdkevents-win32.c | 6 | ||||
-rw-r--r-- | gdk/win32/gdkfont-win32.c | 6 | ||||
-rw-r--r-- | gdk/win32/gdkinput-win32.c | 15 | ||||
-rw-r--r-- | gdk/win32/gdkwindow-win32.c | 14 |
12 files changed, 310 insertions, 17 deletions
@@ -1,3 +1,32 @@ +2004-03-05 Tor Lillqvist <tml@iki.fi> + + * gdk/gdk.def: Add missing entries, thanks to J. Ali Harlow. + + * gdk/win32/gdkcursor-win32.c (color_is_white): const-correctness. + + (gdk_cursor_new_from_pixbuf): Copy of the non-Xcursor X11 + implementation. + + (gdk_display_supports_cursor_alpha, + gdk_display_supports_cursor_color): Dummy implementations. + + (gdk_display_get_default_cursor_size, + gdk_display_get_maximal_cursor_size): Implement. + + * gdk/win32/gdkdisplay-win32.c (gdk_display_get_default_group): + Dummy implementation. + + * gdk/win32/gdkevents-win32.c (gdk_net_wm_supports): Dummy + implementation. + + * gdk/win32/gdkfont-win32.c (gdk_font_get_display): Implement. + + * gdk/win32/gdkinput-win32.c (gdk_input_motion_events): Remove, + not in API. + + * gdk/win32/gdkwindow-win32.c (gdk_window_get_group): Dummy + implementation. + Fri Mar 5 18:00:36 2004 Jonathan Blandford <jrb@redhat.com> * gtk/gtkfilechooserdefault.c (new_folder_button_clicked): scroll diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 108eecbc62..8dc45aabb8 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,32 @@ +2004-03-05 Tor Lillqvist <tml@iki.fi> + + * gdk/gdk.def: Add missing entries, thanks to J. Ali Harlow. + + * gdk/win32/gdkcursor-win32.c (color_is_white): const-correctness. + + (gdk_cursor_new_from_pixbuf): Copy of the non-Xcursor X11 + implementation. + + (gdk_display_supports_cursor_alpha, + gdk_display_supports_cursor_color): Dummy implementations. + + (gdk_display_get_default_cursor_size, + gdk_display_get_maximal_cursor_size): Implement. + + * gdk/win32/gdkdisplay-win32.c (gdk_display_get_default_group): + Dummy implementation. + + * gdk/win32/gdkevents-win32.c (gdk_net_wm_supports): Dummy + implementation. + + * gdk/win32/gdkfont-win32.c (gdk_font_get_display): Implement. + + * gdk/win32/gdkinput-win32.c (gdk_input_motion_events): Remove, + not in API. + + * gdk/win32/gdkwindow-win32.c (gdk_window_get_group): Dummy + implementation. + Fri Mar 5 18:00:36 2004 Jonathan Blandford <jrb@redhat.com> * gtk/gtkfilechooserdefault.c (new_folder_button_clicked): scroll diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 108eecbc62..8dc45aabb8 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,32 @@ +2004-03-05 Tor Lillqvist <tml@iki.fi> + + * gdk/gdk.def: Add missing entries, thanks to J. Ali Harlow. + + * gdk/win32/gdkcursor-win32.c (color_is_white): const-correctness. + + (gdk_cursor_new_from_pixbuf): Copy of the non-Xcursor X11 + implementation. + + (gdk_display_supports_cursor_alpha, + gdk_display_supports_cursor_color): Dummy implementations. + + (gdk_display_get_default_cursor_size, + gdk_display_get_maximal_cursor_size): Implement. + + * gdk/win32/gdkdisplay-win32.c (gdk_display_get_default_group): + Dummy implementation. + + * gdk/win32/gdkevents-win32.c (gdk_net_wm_supports): Dummy + implementation. + + * gdk/win32/gdkfont-win32.c (gdk_font_get_display): Implement. + + * gdk/win32/gdkinput-win32.c (gdk_input_motion_events): Remove, + not in API. + + * gdk/win32/gdkwindow-win32.c (gdk_window_get_group): Dummy + implementation. + Fri Mar 5 18:00:36 2004 Jonathan Blandford <jrb@redhat.com> * gtk/gtkfilechooserdefault.c (new_folder_button_clicked): scroll diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 108eecbc62..8dc45aabb8 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,32 @@ +2004-03-05 Tor Lillqvist <tml@iki.fi> + + * gdk/gdk.def: Add missing entries, thanks to J. Ali Harlow. + + * gdk/win32/gdkcursor-win32.c (color_is_white): const-correctness. + + (gdk_cursor_new_from_pixbuf): Copy of the non-Xcursor X11 + implementation. + + (gdk_display_supports_cursor_alpha, + gdk_display_supports_cursor_color): Dummy implementations. + + (gdk_display_get_default_cursor_size, + gdk_display_get_maximal_cursor_size): Implement. + + * gdk/win32/gdkdisplay-win32.c (gdk_display_get_default_group): + Dummy implementation. + + * gdk/win32/gdkevents-win32.c (gdk_net_wm_supports): Dummy + implementation. + + * gdk/win32/gdkfont-win32.c (gdk_font_get_display): Implement. + + * gdk/win32/gdkinput-win32.c (gdk_input_motion_events): Remove, + not in API. + + * gdk/win32/gdkwindow-win32.c (gdk_window_get_group): Dummy + implementation. + Fri Mar 5 18:00:36 2004 Jonathan Blandford <jrb@redhat.com> * gtk/gtkfilechooserdefault.c (new_folder_button_clicked): scroll diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 108eecbc62..8dc45aabb8 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,32 @@ +2004-03-05 Tor Lillqvist <tml@iki.fi> + + * gdk/gdk.def: Add missing entries, thanks to J. Ali Harlow. + + * gdk/win32/gdkcursor-win32.c (color_is_white): const-correctness. + + (gdk_cursor_new_from_pixbuf): Copy of the non-Xcursor X11 + implementation. + + (gdk_display_supports_cursor_alpha, + gdk_display_supports_cursor_color): Dummy implementations. + + (gdk_display_get_default_cursor_size, + gdk_display_get_maximal_cursor_size): Implement. + + * gdk/win32/gdkdisplay-win32.c (gdk_display_get_default_group): + Dummy implementation. + + * gdk/win32/gdkevents-win32.c (gdk_net_wm_supports): Dummy + implementation. + + * gdk/win32/gdkfont-win32.c (gdk_font_get_display): Implement. + + * gdk/win32/gdkinput-win32.c (gdk_input_motion_events): Remove, + not in API. + + * gdk/win32/gdkwindow-win32.c (gdk_window_get_group): Dummy + implementation. + Fri Mar 5 18:00:36 2004 Jonathan Blandford <jrb@redhat.com> * gtk/gtkfilechooserdefault.c (new_folder_button_clicked): scroll diff --git a/gdk/gdk.def b/gdk/gdk.def index edc8be5bec..9c6069f57d 100644 --- a/gdk/gdk.def +++ b/gdk/gdk.def @@ -42,6 +42,7 @@ EXPORTS gdk_cursor_get_type gdk_cursor_new gdk_cursor_new_for_display + gdk_cursor_new_from_pixbuf gdk_cursor_new_from_pixmap gdk_cursor_ref gdk_cursor_type_get_type @@ -63,8 +64,11 @@ EXPORTS gdk_display_flush gdk_display_get_core_pointer gdk_display_get_default + gdk_display_get_default_cursor_size + gdk_display_get_default_group gdk_display_get_default_screen gdk_display_get_event + gdk_display_get_maximal_cursor_size gdk_display_get_n_screens gdk_display_get_name gdk_display_get_pointer @@ -87,6 +91,8 @@ EXPORTS gdk_display_set_double_click_distance gdk_display_set_double_click_time gdk_display_set_pointer_hooks + gdk_display_supports_cursor_alpha + gdk_display_supports_cursor_color gdk_display_sync gdk_drag_abort gdk_drag_action_get_type @@ -129,6 +135,7 @@ EXPORTS gdk_draw_string gdk_draw_text gdk_draw_text_wc + gdk_drawable_copy_to_image gdk_drawable_get_clip_region gdk_drawable_get_colormap gdk_drawable_get_data @@ -180,6 +187,7 @@ EXPORTS gdk_font_equal gdk_font_from_description gdk_font_from_description_for_display + gdk_font_get_display gdk_font_get_type gdk_font_id gdk_font_load @@ -248,7 +256,6 @@ EXPORTS gdk_input_add_full gdk_input_condition_get_type gdk_input_mode_get_type - gdk_input_motion_events gdk_input_remove gdk_input_set_extension_events gdk_input_source_get_type @@ -276,6 +283,7 @@ EXPORTS gdk_list_visuals gdk_mbstowcs gdk_modifier_type_get_type + gdk_net_wm_supports gdk_notify_startup_complete gdk_notify_type_get_type gdk_overlap_type_get_type @@ -399,6 +407,9 @@ EXPORTS gdk_set_use_xshm gdk_setting_action_get_type gdk_setting_get + gdk_spawn_command_line_on_screen + gdk_spawn_on_screen + gdk_spawn_on_screen_with_pipes gdk_status_get_type gdk_string_extents gdk_string_height @@ -421,7 +432,10 @@ EXPORTS gdk_threads_enter gdk_threads_init gdk_threads_leave + gdk_threads_lock gdk_threads_mutex + gdk_threads_set_lock_functions + gdk_threads_unlock gdk_unicode_to_keyval gdk_utf8_to_compound_text gdk_utf8_to_compound_text_for_display @@ -470,6 +484,7 @@ EXPORTS gdk_window_get_events gdk_window_get_frame_extents gdk_window_get_geometry + gdk_window_get_group gdk_window_get_internal_paint_info gdk_window_get_origin gdk_window_get_parent diff --git a/gdk/win32/gdkcursor-win32.c b/gdk/win32/gdkcursor-win32.c index 0970cd61d5..b36c5c069c 100644 --- a/gdk/win32/gdkcursor-win32.c +++ b/gdk/win32/gdkcursor-win32.c @@ -19,6 +19,7 @@ */ #include "gdkdisplay.h" +#include "gdkscreen.h" #include "gdkcursor.h" #include "gdkprivate-win32.h" @@ -111,7 +112,7 @@ gdk_cursor_new_for_display (GdkDisplay *display, } static gboolean -color_is_white (GdkColor *color) +color_is_white (const GdkColor *color) { return (color->red == 0xFFFF && color->green == 0xFFFF @@ -317,3 +318,115 @@ gdk_cursor_get_display (GdkCursor *cursor) { return gdk_display_get_default (); } + +GdkCursor * +gdk_cursor_new_from_pixbuf (GdkDisplay *display, + GdkPixbuf *pixbuf, + gint x, + gint y) +{ + /* FIXME: Use alpha if supported */ + + GdkCursor *cursor; + GdkPixmap *pixmap, *mask; + guint width, height, n_channels, rowstride, i, j; + guint8 *data, *mask_data, *pixels; + GdkColor fg = { 0, 0, 0, 0 }; + GdkColor bg = { 0, 0xffff, 0xffff, 0xffff }; + GdkScreen *screen; + + g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL); + g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL); + + width = gdk_pixbuf_get_width (pixbuf); + height = gdk_pixbuf_get_height (pixbuf); + + g_return_val_if_fail (0 <= x && x < width, NULL); + g_return_val_if_fail (0 <= y && y < height, NULL); + + n_channels = gdk_pixbuf_get_n_channels (pixbuf); + rowstride = gdk_pixbuf_get_rowstride (pixbuf); + pixels = gdk_pixbuf_get_pixels (pixbuf); + + data = g_new0 (guint8, (width + 7) / 8 * height); + mask_data = g_new0 (guint8, (width + 7) / 8 * height); + + for (j = 0; j < height; j++) + { + guint8 *src = pixels + j * rowstride; + guint8 *d = data + (width + 7) / 8 * j; + guint8 *md = mask_data + (width + 7) / 8 * j; + + for (i = 0; i < width; i++) + { + if (src[1] < 0x80) + *d |= 1 << (i % 8); + + if (n_channels == 3 || src[3] >= 0x80) + *md |= 1 << (i % 8); + + src += n_channels; + if (i % 8 == 7) + { + d++; + md++; + } + } + } + + screen = gdk_display_get_default_screen (display); + pixmap = gdk_bitmap_create_from_data (gdk_screen_get_root_window (screen), + data, width, height); + + mask = gdk_bitmap_create_from_data (gdk_screen_get_root_window (screen), + mask_data, width, height); + + cursor = gdk_cursor_new_from_pixmap (pixmap, mask, &fg, &bg, x, y); + + g_object_unref (pixmap); + g_object_unref (mask); + + g_free (data); + g_free (mask_data); + + return cursor; +} + +gboolean +gdk_display_supports_cursor_alpha (GdkDisplay *display) +{ + g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE); + + /* FIXME */ + return FALSE; +} + +gboolean +gdk_display_supports_cursor_color (GdkDisplay *display) +{ + g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE); + + /* FIXME */ + return FALSE; +} + +guint +gdk_display_get_default_cursor_size (GdkDisplay *display) +{ + g_return_val_if_fail (GDK_IS_DISPLAY (display), 0); + + return MIN (GetSystemMetrics (SM_CXCURSOR), GetSystemMetrics (SM_CYCURSOR)); +} + +void +gdk_display_get_maximal_cursor_size (GdkDisplay *display, + guint *width, + guint *height) +{ + g_return_if_fail (GDK_IS_DISPLAY (display)); + + if (width) + *width = GetSystemMetrics (SM_CXCURSOR); + if (height) + *height = GetSystemMetrics (SM_CYCURSOR); +} diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c index 36cd1fc0c1..6651f0b4a3 100644 --- a/gdk/win32/gdkdisplay-win32.c +++ b/gdk/win32/gdkdisplay-win32.c @@ -224,3 +224,12 @@ gdk_display_get_default_screen (GdkDisplay *display) return _gdk_screen; } +GdkWindow * +gdk_display_get_default_group (GdkDisplay *display) +{ + g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL); + + g_warning ("gdk_display_get_default_group not yet implemented"); + + return NULL; +} diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c index 0a6827db8b..b6b42a81e7 100644 --- a/gdk/win32/gdkevents-win32.c +++ b/gdk/win32/gdkevents-win32.c @@ -3446,3 +3446,9 @@ gdk_display_flush (GdkDisplay * display) /* Nothing */ } + +gboolean +gdk_net_wm_supports (GdkAtom property) +{ + return FALSE; +} diff --git a/gdk/win32/gdkfont-win32.c b/gdk/win32/gdkfont-win32.c index 7e1cbbd91c..e76f12bfec 100644 --- a/gdk/win32/gdkfont-win32.c +++ b/gdk/win32/gdkfont-win32.c @@ -1709,3 +1709,9 @@ gdk_text_extents_wc (GdkFont *font, if (descent) *descent = font->descent + 1; } + +GdkDisplay* +gdk_font_get_display (GdkFont* font) +{ + return _gdk_display; +} diff --git a/gdk/win32/gdkinput-win32.c b/gdk/win32/gdkinput-win32.c index e7431859c8..261a416c99 100644 --- a/gdk/win32/gdkinput-win32.c +++ b/gdk/win32/gdkinput-win32.c @@ -639,21 +639,6 @@ gdk_input_get_root_relative_geometry (HWND w, *y_ret = rect.top; } -GdkTimeCoord * -gdk_input_motion_events (GdkWindow *window, - guint32 deviceid, - guint32 start, - guint32 stop, - gint *nevents_return) -{ - g_return_val_if_fail (window != NULL, NULL); - if (GDK_WINDOW_DESTROYED (window)) - return NULL; - - *nevents_return = 0; - return NULL; /* ??? */ -} - void _gdk_input_configure_event (GdkWindow *window) { diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c index 4034ea8906..17380587a5 100644 --- a/gdk/win32/gdkwindow-win32.c +++ b/gdk/win32/gdkwindow-win32.c @@ -2500,6 +2500,20 @@ gdk_window_set_icon_name (GdkWindow *window, API_CALL (SetWindowText, (GDK_WINDOW_HWND (window), name)); } +GdkWindow * +gdk_window_get_group (GdkWindow *window) +{ + g_return_val_if_fail (GDK_IS_WINDOW (window), NULL); + g_return_val_if_fail (GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD, NULL); + + if (GDK_WINDOW_DESTROYED (window)) + return NULL; + + g_warning ("gdk_window_get_group not yet implemented"); + + return NULL; +} + void gdk_window_set_group (GdkWindow *window, GdkWindow *leader) |