summaryrefslogtreecommitdiff
path: root/gdk/win32/gdkwin32dnd-private.h
blob: 161f59a22819204bbd8a22541cd07e1a1bc3ec90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/* GDK - The GIMP Drawing Kit
 * Copyright (C) 2010 Red Hat, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef __GDK_WIN32_DND_PRIVATE_H__
#define __GDK_WIN32_DND_PRIVATE_H__

#if !defined (__GDKWIN32_H_INSIDE__) && !defined (GDK_COMPILATION)
#error "Only <gdk/gdkwin32.h> can be included directly."
#endif

#include <gdk/gdk.h>

G_BEGIN_DECLS

struct _GdkWin32DragContext
{
  GdkDragContext context;
  GdkSurface *ipc_window;
  GdkSurface *drag_window;
  GdkCursor *cursor;
  GdkSeat *grab_seat;
  GdkDragAction actions;
  GdkDragAction current_action;

  guint drag_status : 4;             /* Current status of drag */
  guint drop_failed : 1;             /* Whether the drop was unsuccessful */
  guint has_image_format : 1;

  guint scale;              /* Temporarily caches the HiDPI scale */
  gint hot_x;             /* Hotspot offset from the top-left of the drag-window, scaled (can be added to GDK space coordinates) */
  gint hot_y;
  gint last_x;            /* Coordinates from last event, in GDK space */
  gint last_y;
  gint start_x;           /* Coordinates of the drag start, in GDK space */
  gint start_y;
  DWORD last_key_state;     /* Key state from last event */

  /* Just like context->targets, but an array, and with format IDs
   * stored inside.
   */
  GArray *droptarget_format_target_map;
};

struct _GdkWin32DragContextClass
{
  GdkDragContextClass parent_class;
};

G_END_DECLS

#endif /* __GDK_WIN32_DND_PRIVATE_H__ */