summaryrefslogtreecommitdiff
path: root/hw/xwin/winclipboard/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xwin/winclipboard/internal.h')
-rw-r--r--hw/xwin/winclipboard/internal.h42
1 files changed, 16 insertions, 26 deletions
diff --git a/hw/xwin/winclipboard/internal.h b/hw/xwin/winclipboard/internal.h
index 766a836ae..368fa7057 100644
--- a/hw/xwin/winclipboard/internal.h
+++ b/hw/xwin/winclipboard/internal.h
@@ -31,8 +31,9 @@
#ifndef WINCLIPBOARD_INTERNAL_H
#define WINCLIPBOARD_INTERNAL_H
-/* X headers */
-#include <X11/Xlib.h>
+#include <xcb/xproto.h>
+#include <X11/Xfuncproto.h> // for _X_ATTRIBUTE_PRINTF
+#include <X11/Xmd.h> // for BOOL
/* Windows headers */
#include <X11/Xwindows.h>
@@ -42,7 +43,6 @@
#define WIN_XEVENTS_NOTIFY_DATA 3
#define WIN_XEVENTS_NOTIFY_TARGETS 4
-#define WM_WM_REINIT (WM_USER + 1)
#define WM_WM_QUIT (WM_USER + 2)
#define ARRAY_SIZE(a) (sizeof((a)) / sizeof((a)[0]))
@@ -68,38 +68,29 @@ void
* winclipboardthread.c
*/
-
typedef struct
{
- Atom atomClipboard;
- Atom atomLocalProperty;
- Atom atomUTF8String;
- Atom atomCompoundText;
- Atom atomTargets;
- Atom atomIncr;
+ xcb_atom_t atomClipboard;
+ xcb_atom_t atomLocalProperty;
+ xcb_atom_t atomUTF8String;
+ xcb_atom_t atomCompoundText;
+ xcb_atom_t atomTargets;
+ xcb_atom_t atomIncr;
} ClipboardAtoms;
-/* Modern clipboard API functions */
-typedef wBOOL WINAPI (*ADDCLIPBOARDFORMATLISTENERPROC)(HWND hwnd);
-typedef wBOOL WINAPI (*REMOVECLIPBOARDFORMATLISTENERPROC)(HWND hwnd);
-
-extern Bool g_fHasModernClipboardApi;
-extern ADDCLIPBOARDFORMATLISTENERPROC g_fpAddClipboardFormatListener;
-extern REMOVECLIPBOARDFORMATLISTENERPROC g_fpRemoveClipboardFormatListener;
-
/*
* winclipboardwndproc.c
*/
-Bool winClipboardFlushWindowsMessageQueue(HWND hwnd);
+BOOL winClipboardFlushWindowsMessageQueue(HWND hwnd);
LRESULT CALLBACK
winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
typedef struct
{
- Display *pClipboardDisplay;
- Window iClipboardWindow;
+ xcb_connection_t *pClipboardDisplay;
+ xcb_window_t iClipboardWindow;
ClipboardAtoms *atoms;
} ClipboardWindowCreationParams;
@@ -109,18 +100,17 @@ typedef struct
typedef struct
{
- Bool fUseUnicode;
- Atom *targetList;
+ xcb_atom_t *targetList;
unsigned char *incr;
unsigned long int incrsize;
} ClipboardConversionData;
int
winClipboardFlushXEvents(HWND hwnd,
- Window iWindow, Display * pDisplay, ClipboardConversionData *data, ClipboardAtoms *atom);
-
+ xcb_window_t iWindow, xcb_connection_t * pDisplay,
+ ClipboardConversionData *data, ClipboardAtoms *atoms);
-Atom
+xcb_atom_t
winClipboardGetLastOwnedSelectionAtom(ClipboardAtoms *atoms);
void