{
if (!IsIconic (GDK_SURFACE_HWND (surface)))
{
- GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (surface->impl);
GDK_NOTE (EVENTS, g_print ("Setting window position ... "));
API_CALL (SetWindowPos, (GDK_SURFACE_HWND (surface),
create_cairo_surface_for_surface (GdkSurface *surface,
int scale)
{
- GdkDisplay *display;
cairo_surface_t *cairo_surface;
HDC hdc;
- display = gdk_surface_get_display (surface);
-
hdc = GetDC (GDK_SURFACE_HWND (surface));
if (!hdc)
{
cairo_region_t *region)
{
GdkWin32CairoContext *self = GDK_WIN32_CAIRO_CONTEXT (draw_context);
- GdkRectangle clip_box;
GdkSurface *surface;
- double sx, sy;
GdkSurfaceImplWin32 *impl;
int scale;
cairo_t *cr;
GdkWin32CairoContext *self = GDK_WIN32_CAIRO_CONTEXT (draw_context);
GdkSurface *surface;
gint scale;
- GdkSurfaceImplWin32 *impl;
surface = gdk_draw_context_get_surface (draw_context);
scale = gdk_surface_get_scale_factor (surface);
- impl = GDK_SURFACE_IMPL_WIN32 (surface->impl);
-
/* The code to resize double-buffered windows immediately
* before blitting the buffer contents onto them used
* to be here.
static void
gdk_win32_clipboard_finalize (GObject *object)
{
- GdkWin32Clipboard *cb = GDK_WIN32_CLIPBOARD (object);
-
G_OBJECT_CLASS (gdk_win32_clipboard_parent_class)->finalize (object);
}
GAsyncReadyCallback callback,
gpointer user_data)
{
- GdkWin32Clipboard *cb = GDK_WIN32_CLIPBOARD (clipboard);
- GSList *targets;
GTask *task;
- GdkWin32Clipdrop *clipdrop = _gdk_win32_clipdrop_get ();
task = g_task_new (clipboard, cancellable, callback, user_data);
g_task_set_priority (task, io_priority);
static GdkAtom
convert_clipboard_selection_to_targets_target (GdkSurface *requestor)
{
- gint fmt;
int i;
int format_count = CountClipboardFormats ();
GArray *targets = g_array_sized_new (FALSE, FALSE, sizeof (GdkWin32ContentFormatPair), format_count);
GArray *pairs; /* of GdkWin32ContentFormatPair */
const char * const *mime_types;
gint n_mime_types;
- gint i, offset;
+ gint i;
GdkWin32Clipdrop *clipdrop = _gdk_win32_clipdrop_get ();
- GArray *streams;
GdkWin32ClipboardStorePrep *prep;
g_assert (clipdrop->clipboard_window != NULL);
GdkDeviceWintab *device_wintab;
POINT point;
HWND hwnd, hwndc;
- GdkSurfaceImplWin32 *impl;
int scale;
device_wintab = GDK_DEVICE_WINTAB (device);
gint root_x, root_y;
gdouble temp_x, temp_y;
gint i;
- GdkDisplay *display;
device = GDK_DEVICE (device_wintab);
impl_surface = _gdk_surface_get_impl_surface (window);
gdk_surface_get_origin (impl_surface, &root_x, &root_y);
- display = gdk_device_get_display (device);
-
for (i = 0; i < gdk_device_get_n_axes (device); i++)
{
GdkAxisUse use;
{
target_drag_context *ctx = (target_drag_context *) This;
GdkWin32DropContext *context_win32 = GDK_WIN32_DROP_CONTEXT (ctx->context);
- GdkWin32Clipdrop *clipdrop = _gdk_win32_clipdrop_get ();
gint pt_x = pt.x / context_win32->scale + _gdk_offset_x;
gint pt_y = pt.y / context_win32->scale + _gdk_offset_y;
guint32 time)
{
GdkDragContext *src_context;
- GdkEvent *tmp_event;
GdkWin32Clipdrop *clipdrop = _gdk_win32_clipdrop_get ();
g_return_if_fail (context != NULL);
_gdk_win32_print_event (const GdkEvent *event)
{
gchar *escaped, *kvname;
- const char *selection_name, *target_name, *property_name;
g_print ("%s%*s===> ", (debug_indent > 0 ? "\n" : ""), debug_indent, "");
switch (event->any.type)
GList **filters)
{
GdkWin32MessageFilterReturn result = GDK_WIN32_MESSAGE_FILTER_CONTINUE;
- GList *node;
GList *tmp_list;
tmp_list = *filters;
handle_dpi_changed (GdkSurface *window,
MSG *msg)
{
- HWND hwnd = GDK_SURFACE_HWND (window);
GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
GdkDisplay *display = gdk_display_get_default ();
GdkWin32Display *win32_display = GDK_WIN32_DISPLAY (display);
- GdkDevice *device = gdk_seat_get_pointer (gdk_display_get_default_seat (display));
RECT *rect = (RECT *)msg->lParam;
- GdkEvent *event;
guint old_scale = impl->surface_scale;
/* MSDN for WM_DPICHANGED: dpi_x == dpi_y here, so LOWORD (msg->wParam) == HIWORD (msg->wParam) */
{
GdkSurfaceImplWin32 *impl;
LONG_PTR style, tmp_style;
- gboolean maximized, minimized;
LONG_PTR additional_styles;
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
style = GetWindowLongPtr (msg->hwnd, GWL_STYLE);
- maximized = IsZoomed (msg->hwnd) || (style & WS_MAXIMIZE);
- minimized = IsIconic (msg->hwnd) || (style & WS_MINIMIZE);
additional_styles = 0;
if (!(style & WS_SYSMENU))
GdkSurface *grab_window = NULL;
gint button;
- GdkAtom target;
gchar buf[256];
gboolean return_val = FALSE;
int i;
- GdkWin32Clipdrop *clipdrop = NULL;
-
- STGMEDIUM *property_change_data;
-
display = gdk_display_get_default ();
win32_display = GDK_WIN32_DISPLAY (display);
static void
gdk_win32_hdata_output_stream_init (GdkWin32HDataOutputStream *stream)
{
- GdkWin32HDataOutputStreamPrivate *priv = gdk_win32_hdata_output_stream_get_instance_private (stream);
}
GOutputStream *
GdkDisplay *display = _gdk_display;
int monitor_count;
GdkMonitor *monitor;
- GdkSurfaceImplWin32 *root_impl;
monitor_count = gdk_display_get_n_monitors (display);
monitor = gdk_display_get_monitor (display, 0);
static void
gdk_surface_impl_win32_init (GdkSurfaceImplWin32 *impl)
{
- GdkDisplay *display = gdk_display_get_default ();
-
impl->hicon_big = NULL;
impl->hicon_small = NULL;
impl->hint_flags = 0;
RegisterGdkClass (GdkSurfaceType wtype, GdkSurfaceTypeHint wtype_hint)
{
static ATOM klassTOPLEVEL = 0;
- static ATOM klassCHILD = 0;
static ATOM klassTEMP = 0;
static ATOM klassTEMPSHADOW = 0;
static HICON hAppIcon = NULL;
else
{
RECT outer_rect;
- GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
get_outer_rect (window, width, height, &outer_rect);
gint *width,
gint *height)
{
- GdkDisplay *display;
- gboolean window_is_root;
-
- display = gdk_surface_get_display (window);
-
if (!GDK_SURFACE_DESTROYED (window))
{
RECT rect;
gint halfright = 0;
gint fullup = 0;
gboolean fullup_edge = FALSE;
- GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
if (context->op == GDK_WIN32_DRAGOP_RESIZE)
switch (context->edge)
const gchar *cursor_name;
GdkSurface *pointer_window;
GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
- GdkDisplay *display = gdk_device_get_display (device);
gboolean maximized = gdk_surface_get_state (window) & GDK_SURFACE_STATE_MAXIMIZED;
/* Before we drag, we need to undo any maximization or snapping.
static void
gdk_win32_cairo_surface_destroy (void *data)
{
- GdkSurfaceImplWin32 *impl = data;
}
BOOL WINAPI
GdkSurfaceImplWin32 *impl;
GdkWin32Display *win32_display;
- UINT dpix, dpiy;
- gboolean is_scale_acquired;
if (GDK_SURFACE_DESTROYED (window))
return 1;
if (msg->lParam & GCS_RESULTSTR)
{
gsize len;
- gchar *utf8str = NULL;
GError *error = NULL;
len = ImmGetCompositionStringW (himc, GCS_RESULTSTR, NULL, 0);
*/
if (message == WM_SIZE)
{
- GtkAllocation alloc;
- alloc.width = LOWORD (lparam);
- alloc.height = HIWORD (lparam);
-
gtk_widget_queue_resize (op_win32->embed_widget);
}
GtkWidget *widget;
GtkCssNode *widget_node;
GdkSeat *seat;
+#ifdef GDK_WINDOWING_X11
GdkContentFormats *targets;
+#endif
widget = GTK_WIDGET (window);