Blender V4.3
GHOST_DropTargetX11.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2012 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include "GHOST_SystemX11.hh"
12#include "GHOST_WindowX11.hh"
13#include <GHOST_Types.h>
14
15#include "xdnd.h"
16
18 public:
26
31
35 bool GHOST_HandleClientMessage(XEvent *event);
36
45 void *getGhostData(Atom dropType, const unsigned char *dropBuffer, int dropBufferSize);
46
47 private:
48 /* Internal helper functions */
49
53 void Initialize();
54
58 void Uninitialize();
59
66 void *getURIListGhostData(const unsigned char *dropBuffer, int dropBufferSize);
67
73 char *FileUrlDecode(const char *fileUrl);
74
75 /* The associated GHOST_WindowWin32. */
76 GHOST_WindowX11 *m_window;
77 /* The System. */
78 GHOST_SystemX11 *m_system;
79
80 /* Data type of the dragged object */
81 GHOST_TDragnDropTypes m_draggedObjectType;
82
83 /* Is drag-and-drop stuff initialized. */
84 static bool m_xdndInitialized;
85
86 /* Class holding internal stiff of `xdnd` library. */
87 static DndClass m_dndClass;
88
89 /* List of supported types to be dragged into. */
90 static Atom *m_dndTypes;
91
92 /* List of supported drag-and-drop actions. */
93 static Atom *m_dndActions;
94
95 /* List of supported MIME types to be dragged into. */
96 static const char *m_dndMimeTypes[];
97
98 /* Counter of references to global #XDND structures. */
99 static int m_refCounter;
100
101#ifdef WITH_CXX_GUARDEDALLOC
102 MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_DropTargetX11")
103#endif
104};
GHOST_TDragnDropTypes
bool GHOST_HandleClientMessage(XEvent *event)
void * getGhostData(Atom dropType, const unsigned char *dropBuffer, int dropBufferSize)
GHOST_DropTargetX11(GHOST_WindowX11 *window, GHOST_SystemX11 *system)