[gtk/present-toplevel-2: 73/83] win32: Drop some unused vfuncs
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/present-toplevel-2: 73/83] win32: Drop some unused vfuncs
- Date: Thu, 12 Mar 2020 00:49:08 +0000 (UTC)
commit 99536e160b16f0893ed1aacde4f2894bac070bf0
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Mar 9 10:41:44 2020 -0700
win32: Drop some unused vfuncs
toplevel_resize is unused in the frontend.
gdk/win32/gdksurface-win32.c | 167 -------------------------------------------
1 file changed, 167 deletions(-)
---
diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c
index 1463793ef8..3ad928deff 100644
--- a/gdk/win32/gdksurface-win32.c
+++ b/gdk/win32/gdksurface-win32.c
@@ -120,8 +120,6 @@ typedef struct _AeroSnapEdgeRegion AeroSnapEdgeRegion;
static void gdk_win32_impl_frame_clock_after_paint (GdkFrameClock *clock,
GdkSurface *surface);
-static gboolean _gdk_surface_get_functions (GdkSurface *window,
- GdkWMFunction *functions);
G_DEFINE_TYPE (GdkWin32Surface, gdk_win32_surface, GDK_TYPE_SURFACE)
@@ -1273,14 +1271,6 @@ gdk_win32_surface_move_resize (GdkSurface *window,
gdk_win32_surface_move_resize_internal (window, TRUE, x, y, width, height);
}
-static void
-gdk_win32_surface_toplevel_resize (GdkSurface *surface,
- gint width,
- gint height)
-{
- gdk_win32_surface_move_resize_internal (surface, FALSE, 0, 0, width, height);
-}
-
void
gdk_win32_surface_move (GdkSurface *surface,
gint x,
@@ -1862,14 +1852,6 @@ gdk_win32_surface_get_root_coords (GdkSurface *window,
(ty + _gdk_offset_y) / impl->surface_scale));
}
-static void
-gdk_win32_surface_restack_toplevel (GdkSurface *window,
- GdkSurface *sibling,
- gboolean above)
-{
- // ### TODO
-}
-
static gboolean
gdk_surface_win32_get_device_state (GdkSurface *window,
GdkDevice *device,
@@ -1989,35 +1971,6 @@ gdk_win32_surface_set_icon_list (GdkSurface *window,
impl->hicon_small = small_hicon;
}
-static void
-gdk_win32_surface_set_icon_name (GdkSurface *window,
- const gchar *name)
-{
- /* In case I manage to confuse this again (or somebody else does):
- * Please note that "icon name" here really *does* mean the name or
- * title of a window minimized as an icon on the desktop, or in the
- * taskbar. It has nothing to do with the freedesktop.org icon
- * naming stuff.
- */
-
- g_return_if_fail (GDK_IS_SURFACE (window));
-
- if (GDK_SURFACE_DESTROYED (window))
- return;
-
-#if 0
- /* This is not the correct thing to do. We should keep both the
- * "normal" window title, and the icon name. When the window is
- * minimized, call SetWindowText() with the icon name, and when the
- * window is restored, with the normal window title. Also, the name
- * is in UTF-8, so we should do the normal conversion to either wide
- * chars or system codepage, and use either the W or A version of
- * SetWindowText(), depending on Windows version.
- */
- API_CALL (SetWindowText, (GDK_SURFACE_HWND (window), name));
-#endif
-}
-
static void
update_single_bit (LONG *style,
gboolean all,
@@ -2247,119 +2200,6 @@ update_single_system_menu_entry (HMENU hmenu,
EnableMenuItem (hmenu, menu_entry, MF_BYCOMMAND | MF_GRAYED);
}
-static void
-update_system_menu (GdkSurface *window)
-{
- GdkWMFunction functions;
- BOOL all;
-
- if (_gdk_surface_get_functions (window, &functions))
- {
- HMENU hmenu = GetSystemMenu (GDK_SURFACE_HWND (window), FALSE);
-
- all = (functions & GDK_FUNC_ALL);
- update_single_system_menu_entry (hmenu, all, functions & GDK_FUNC_RESIZE, SC_SIZE);
- update_single_system_menu_entry (hmenu, all, functions & GDK_FUNC_MOVE, SC_MOVE);
- update_single_system_menu_entry (hmenu, all, functions & GDK_FUNC_MINIMIZE, SC_MINIMIZE);
- update_single_system_menu_entry (hmenu, all, functions & GDK_FUNC_MAXIMIZE, SC_MAXIMIZE);
- update_single_system_menu_entry (hmenu, all, functions & GDK_FUNC_CLOSE, SC_CLOSE);
- }
-}
-
-static void
-gdk_win32_surface_set_decorations (GdkSurface *window,
- GdkWMDecoration decorations)
-{
- GdkWin32Surface *impl;
-
- g_return_if_fail (GDK_IS_SURFACE (window));
-
- impl = GDK_WIN32_SURFACE (window);
-
- GDK_NOTE (MISC, g_print ("gdk_surface_set_decorations: %p: %s %s%s%s%s%s%s\n",
- GDK_SURFACE_HWND (window),
- (decorations & GDK_DECOR_ALL ? "clearing" : "setting"),
- (decorations & GDK_DECOR_BORDER ? "BORDER " : ""),
- (decorations & GDK_DECOR_RESIZEH ? "RESIZEH " : ""),
- (decorations & GDK_DECOR_TITLE ? "TITLE " : ""),
- (decorations & GDK_DECOR_MENU ? "MENU " : ""),
- (decorations & GDK_DECOR_MINIMIZE ? "MINIMIZE " : ""),
- (decorations & GDK_DECOR_MAXIMIZE ? "MAXIMIZE " : "")));
-
- if (!impl->decorations)
- impl->decorations = g_malloc (sizeof (GdkWMDecoration));
-
- *impl->decorations = decorations;
-
- _gdk_win32_surface_update_style_bits (window);
-}
-
-static gboolean
-gdk_win32_surface_get_decorations (GdkSurface *window,
- GdkWMDecoration *decorations)
-{
- GdkWin32Surface *impl;
-
- g_return_val_if_fail (GDK_IS_SURFACE (window), FALSE);
-
- impl = GDK_WIN32_SURFACE (window);
-
- if (impl->decorations == NULL)
- return FALSE;
-
- *decorations = *impl->decorations;
-
- return TRUE;
-}
-
-static GQuark
-get_functions_quark ()
-{
- static GQuark quark = 0;
-
- if (!quark)
- quark = g_quark_from_static_string ("gdk-surface-functions");
-
- return quark;
-}
-
-static void
-gdk_win32_surface_set_functions (GdkSurface *window,
- GdkWMFunction functions)
-{
- GdkWMFunction* functions_copy;
-
- g_return_if_fail (GDK_IS_SURFACE (window));
-
- GDK_NOTE (MISC, g_print ("gdk_surface_set_functions: %p: %s %s%s%s%s%s\n",
- GDK_SURFACE_HWND (window),
- (functions & GDK_FUNC_ALL ? "clearing" : "setting"),
- (functions & GDK_FUNC_RESIZE ? "RESIZE " : ""),
- (functions & GDK_FUNC_MOVE ? "MOVE " : ""),
- (functions & GDK_FUNC_MINIMIZE ? "MINIMIZE " : ""),
- (functions & GDK_FUNC_MAXIMIZE ? "MAXIMIZE " : ""),
- (functions & GDK_FUNC_CLOSE ? "CLOSE " : "")));
-
- functions_copy = g_malloc (sizeof (GdkWMFunction));
- *functions_copy = functions;
- g_object_set_qdata_full (G_OBJECT (window), get_functions_quark (), functions_copy, g_free);
-
- update_system_menu (window);
-}
-
-gboolean
-_gdk_surface_get_functions (GdkSurface *window,
- GdkWMFunction *functions)
-{
- GdkWMFunction* functions_set;
-
- functions_set = g_object_get_qdata (G_OBJECT (window), get_functions_quark ());
- if (functions_set)
- *functions = *functions_set;
-
- return (functions_set != NULL);
-}
-
#if defined(MORE_AEROSNAP_DEBUGGING)
static void
log_region (gchar *prefix, AeroSnapEdgeRegion *region)
@@ -5190,9 +5030,6 @@ gdk_win32_surface_class_init (GdkWin32SurfaceClass *klass)
impl_class->withdraw = gdk_win32_surface_withdraw;
impl_class->raise = gdk_win32_surface_raise;
impl_class->lower = gdk_win32_surface_lower;
- impl_class->restack_toplevel = gdk_win32_surface_restack_toplevel;
- impl_class->toplevel_resize = gdk_win32_surface_toplevel_resize;
- impl_class->present_popup = gdk_win32_surface_present_popup;
impl_class->get_geometry = gdk_win32_surface_get_geometry;
impl_class->get_device_state = gdk_surface_win32_get_device_state;
impl_class->get_root_coords = gdk_win32_surface_get_root_coords;
@@ -5215,7 +5052,6 @@ gdk_win32_surface_class_init (GdkWin32SurfaceClass *klass)
impl_class->set_accept_focus = gdk_win32_surface_set_accept_focus;
impl_class->set_focus_on_map = gdk_win32_surface_set_focus_on_map;
impl_class->set_icon_list = gdk_win32_surface_set_icon_list;
- impl_class->set_icon_name = gdk_win32_surface_set_icon_name;
impl_class->minimize = gdk_win32_surface_minimize;
impl_class->unminimize = gdk_win32_surface_unminimize;
impl_class->stick = gdk_win32_surface_stick;
@@ -5226,9 +5062,6 @@ gdk_win32_surface_class_init (GdkWin32SurfaceClass *klass)
impl_class->unfullscreen = gdk_win32_surface_unfullscreen;
impl_class->set_keep_above = gdk_win32_surface_set_keep_above;
impl_class->set_keep_below = gdk_win32_surface_set_keep_below;
- impl_class->set_decorations = gdk_win32_surface_set_decorations;
- impl_class->get_decorations = gdk_win32_surface_get_decorations;
- impl_class->set_functions = gdk_win32_surface_set_functions;
impl_class->set_shadow_width = gdk_win32_surface_set_shadow_width;
impl_class->begin_resize_drag = gdk_win32_surface_begin_resize_drag;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]