| 1 |
/* GDK - The GIMP Drawing Kit |
| 2 |
* Copyright (C) 2010 Red Hat, Inc. |
| 3 |
* |
| 4 |
* This library is free software; you can redistribute it and/or |
| 5 |
* modify it under the terms of the GNU Lesser General Public |
| 6 |
* License as published by the Free Software Foundation; either |
| 7 |
* version 2 of the License, or (at your option) any later version. |
| 8 |
* |
| 9 |
* This library is distributed in the hope that it will be useful, |
| 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 |
* Lesser General Public License for more details. |
| 13 |
* |
| 14 |
* You should have received a copy of the GNU Lesser General Public |
| 15 |
* License along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 16 |
*/ |
| 17 |
|
| 18 |
#ifndef __GDK_WIN32_DND_PRIVATE_H__ |
| 19 |
#define __GDK_WIN32_DND_PRIVATE_H__ |
| 20 |
|
| 21 |
#if !defined (__GDKWIN32_H_INSIDE__) && !defined (GDK_COMPILATION) |
| 22 |
#error "Only <gdk/gdkwin32.h> can be included directly." |
| 23 |
#endif |
| 24 |
|
| 25 |
#include <gdk/gdk.h> |
| 26 |
|
| 27 |
G_BEGIN_DECLS |
| 28 |
|
| 29 |
struct _GdkWin32DragContext |
| 30 |
{ |
| 31 |
GdkDragContext context; |
| 32 |
GdkWindow *ipc_window; |
| 33 |
GdkWindow *drag_window; |
| 34 |
GdkCursor *cursor; |
| 35 |
GdkSeat *grab_seat; |
| 36 |
GdkDragAction actions; |
| 37 |
GdkDragAction current_action; |
| 38 |
|
| 39 |
guint drag_status : 4; /* Current status of drag */ |
| 40 |
guint drop_failed : 1; /* Whether the drop was unsuccessful */ |
| 41 |
guint has_image_format : 1; |
| 42 |
guint has_text_uri_list : 1; |
| 43 |
guint has_shell_id_list : 1; |
| 44 |
guint has_unicodetext : 1; |
| 45 |
guint has_cf_png : 1; |
| 46 |
guint has_cf_dib : 1; |
| 47 |
guint has_gif : 1; |
| 48 |
guint has_jfif : 1; |
| 49 |
|
| 50 |
guint scale; /* Temporarily caches the HiDPI scale */ |
| 51 |
gint hot_x; /* Hotspot offset from the top-left of the drag-window, scaled (can be added to GDK space coordinates) */ |
| 52 |
gint hot_y; |
| 53 |
gint last_x; /* Coordinates from last event, in GDK space */ |
| 54 |
gint last_y; |
| 55 |
gint start_x; /* Coordinates of the drag start, in GDK space */ |
| 56 |
gint start_y; |
| 57 |
DWORD last_key_state; /* Key state from last event */ |
| 58 |
HMONITOR last_monitor; /* While dragging we keep track of the monitor the cursor |
| 59 |
is currently on. As the cursor moves between monitors, |
| 60 |
we move the invisible dnd ipc window to the top-left |
| 61 |
corner of the current monitor, because OLE2 does not |
| 62 |
work correctly if the source window and the dest window |
| 63 |
are on monitors with different scales (say one is 125% |
| 64 |
and the other 100%) and the drag-initiating application |
| 65 |
(effectively driving the DND) is not per-monitor DPI aware |
| 66 |
*/ |
| 67 |
|
| 68 |
/* Just like context->targets, but an array, and with format IDs |
| 69 |
* stored inside. |
| 70 |
*/ |
| 71 |
GArray *droptarget_format_target_map; |
| 72 |
}; |
| 73 |
|
| 74 |
struct _GdkWin32DragContextClass |
| 75 |
{ |
| 76 |
GdkDragContextClass parent_class; |
| 77 |
}; |
| 78 |
|
| 79 |
G_END_DECLS |
| 80 |
|
| 81 |
#endif /* __GDK_WIN32_DND_PRIVATE_H__ */ |