summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorРуслан Ижбулатов <lrn1986@gmail.com>2018-06-16 17:18:54 +0000
committerBenjamin Otte <otte@redhat.com>2018-06-18 23:49:53 +0200
commitbf3ea24489992c6a3d996ad49d07cd228606fada (patch)
tree0aff0cb4b77c178de989624e1e51c085bab38203 /gdk
parent997e8c1ae1e2ee28e47038865dbb47c6b902800f (diff)
downloadgtk+-bf3ea24489992c6a3d996ad49d07cd228606fada.tar.gz
GDK W32: Remove gdk_win32_surface_foreign_new_for_display
That function is now unused.
Diffstat (limited to 'gdk')
-rw-r--r--gdk/win32/gdksurface-win32.c62
-rw-r--r--gdk/win32/gdkwin32misc.h3
2 files changed, 0 insertions, 65 deletions
diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c
index b99b3c76f9..af46bd7b28 100644
--- a/gdk/win32/gdksurface-win32.c
+++ b/gdk/win32/gdksurface-win32.c
@@ -754,68 +754,6 @@ _gdk_win32_display_create_surface_impl (GdkDisplay *display,
window);
}
-GdkSurface *
-gdk_win32_surface_foreign_new_for_display (GdkDisplay *display,
- HWND anid)
-{
- GdkSurface *window;
- GdkSurfaceImplWin32 *impl;
-
- HANDLE parent;
- RECT rect;
- POINT point;
-
- if ((window = gdk_win32_surface_lookup_for_display (display, anid)) != NULL)
- return g_object_ref (window);
-
- window = _gdk_display_create_surface (display);
- window->impl = g_object_new (GDK_TYPE_SURFACE_IMPL_WIN32, NULL);
- window->impl_surface = window;
- impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
- impl->wrapper = window;
- parent = GetParent (anid);
-
- /* Always treat foreigns as toplevels */
- window->parent = NULL;
-
- GetClientRect ((HWND) anid, &rect);
- point.x = rect.left;
- point.y = rect.right;
- ClientToScreen ((HWND) anid, &point);
- if (parent != GetDesktopWindow ())
- ScreenToClient (parent, &point);
- window->x = point.x / impl->surface_scale;
- window->y = point.y / impl->surface_scale;
- impl->unscaled_width = rect.right - rect.left;
- impl->unscaled_height = rect.bottom - rect.top;
- window->width = (impl->unscaled_width + impl->surface_scale - 1) / impl->surface_scale;
- window->height = (impl->unscaled_height + impl->surface_scale - 1) / impl->surface_scale;
- window->surface_type = GDK_SURFACE_FOREIGN;
- window->destroyed = FALSE;
- if (IsWindowVisible ((HWND) anid))
- window->state &= (~GDK_SURFACE_STATE_WITHDRAWN);
- else
- window->state |= GDK_SURFACE_STATE_WITHDRAWN;
- if (GetWindowLong ((HWND)anid, GWL_EXSTYLE) & WS_EX_TOPMOST)
- window->state |= GDK_SURFACE_STATE_ABOVE;
- else
- window->state &= (~GDK_SURFACE_STATE_ABOVE);
- window->state &= (~GDK_SURFACE_STATE_BELOW);
- window->viewable = TRUE;
-
- GDK_SURFACE_HWND (window) = anid;
-
- g_object_ref (window);
- gdk_win32_handle_table_insert (&GDK_SURFACE_HWND (window), window);
-
- GDK_NOTE (MISC, g_print ("gdk_win32_surface_foreign_new_for_display: %p: %s@%+d%+d\n",
- (HWND) anid,
- _gdk_win32_surface_description (window),
- window->x, window->y));
-
- return window;
-}
-
static void
gdk_win32_surface_destroy (GdkSurface *window,
gboolean recursing,
diff --git a/gdk/win32/gdkwin32misc.h b/gdk/win32/gdkwin32misc.h
index 7a32ba96a3..e8133f0748 100644
--- a/gdk/win32/gdkwin32misc.h
+++ b/gdk/win32/gdkwin32misc.h
@@ -82,9 +82,6 @@ GDK_AVAILABLE_IN_ALL
HGDIOBJ gdk_win32_surface_get_handle (GdkSurface *window);
GDK_AVAILABLE_IN_ALL
-GdkSurface * gdk_win32_surface_foreign_new_for_display (GdkDisplay *display,
- HWND anid);
-GDK_AVAILABLE_IN_ALL
GdkSurface * gdk_win32_surface_lookup_for_display (GdkDisplay *display,
HWND anid);