forked from AuroraMiddleware/gtk
Remove unused code in gdksurface-win32.c
This commit is contained in:
parent
3acd26c64a
commit
93f8f3c406
@ -125,8 +125,6 @@ static void gdk_win32_impl_frame_clock_after_paint (GdkFrameClock *clock,
|
||||
GdkSurface *surface);
|
||||
static gboolean _gdk_surface_get_functions (GdkSurface *window,
|
||||
GdkWMFunction *functions);
|
||||
static HDC _gdk_win32_impl_acquire_dc (GdkSurfaceImplWin32 *impl);
|
||||
static void _gdk_win32_impl_release_dc (GdkSurfaceImplWin32 *impl);
|
||||
|
||||
#define SURFACE_IS_TOPLEVEL(window) \
|
||||
(GDK_SURFACE_TYPE (window) != GDK_SURFACE_FOREIGN)
|
||||
@ -5124,55 +5122,6 @@ gdk_win32_surface_get_type_hint (GdkSurface *window)
|
||||
return GDK_SURFACE_IMPL_WIN32 (window->impl)->type_hint;
|
||||
}
|
||||
|
||||
static HRGN
|
||||
cairo_region_to_hrgn (const cairo_region_t *region,
|
||||
gint x_origin,
|
||||
gint y_origin,
|
||||
guint scale)
|
||||
{
|
||||
HRGN hrgn;
|
||||
RGNDATA *rgndata;
|
||||
RECT *rect;
|
||||
cairo_rectangle_int_t r;
|
||||
const int nrects = cairo_region_num_rectangles (region);
|
||||
guint nbytes =
|
||||
sizeof (RGNDATAHEADER) + (sizeof (RECT) * nrects);
|
||||
int i;
|
||||
|
||||
rgndata = g_malloc (nbytes);
|
||||
rgndata->rdh.dwSize = sizeof (RGNDATAHEADER);
|
||||
rgndata->rdh.iType = RDH_RECTANGLES;
|
||||
rgndata->rdh.nCount = rgndata->rdh.nRgnSize = 0;
|
||||
SetRect (&rgndata->rdh.rcBound,
|
||||
G_MAXLONG, G_MAXLONG, G_MINLONG, G_MINLONG);
|
||||
|
||||
for (i = 0; i < nrects; i++)
|
||||
{
|
||||
rect = ((RECT *) rgndata->Buffer) + rgndata->rdh.nCount++;
|
||||
|
||||
cairo_region_get_rectangle (region, i, &r);
|
||||
rect->left = (r.x + x_origin) * scale;
|
||||
rect->right = (rect->left + r.width) * scale;
|
||||
rect->top = (r.y + y_origin) * scale;
|
||||
rect->bottom = (rect->top + r.height) * scale;
|
||||
|
||||
if (rect->left < rgndata->rdh.rcBound.left)
|
||||
rgndata->rdh.rcBound.left = rect->left;
|
||||
if (rect->right > rgndata->rdh.rcBound.right)
|
||||
rgndata->rdh.rcBound.right = rect->right;
|
||||
if (rect->top < rgndata->rdh.rcBound.top)
|
||||
rgndata->rdh.rcBound.top = rect->top;
|
||||
if (rect->bottom > rgndata->rdh.rcBound.bottom)
|
||||
rgndata->rdh.rcBound.bottom = rect->bottom;
|
||||
}
|
||||
if ((hrgn = ExtCreateRegion (NULL, nbytes, rgndata)) == NULL)
|
||||
WIN32_API_FAILED ("ExtCreateRegion");
|
||||
|
||||
g_free (rgndata);
|
||||
|
||||
return (hrgn);
|
||||
}
|
||||
|
||||
GdkSurface *
|
||||
gdk_win32_surface_lookup_for_display (GdkDisplay *display,
|
||||
HWND anid)
|
||||
@ -5282,11 +5231,6 @@ gdk_win32_surface_get_impl_hwnd (GdkSurface *window)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_win32_cairo_surface_destroy (void *data)
|
||||
{
|
||||
}
|
||||
|
||||
BOOL WINAPI
|
||||
GtkShowWindow (GdkSurface *window,
|
||||
int cmd_show)
|
||||
|
Loading…
Reference in New Issue
Block a user