diff options
Diffstat (limited to 'xorg-server/hw/xwin/winclipboard/internal.h')
-rwxr-xr-x[-rw-r--r--] | xorg-server/hw/xwin/winclipboard/internal.h | 82 |
1 files changed, 49 insertions, 33 deletions
diff --git a/xorg-server/hw/xwin/winclipboard/internal.h b/xorg-server/hw/xwin/winclipboard/internal.h index 94956f80d..d42497cc9 100644..100755 --- a/xorg-server/hw/xwin/winclipboard/internal.h +++ b/xorg-server/hw/xwin/winclipboard/internal.h @@ -1,4 +1,5 @@ - +#ifndef _WINCLIPBOARD_H_ +#define _WINCLIPBOARD_H_ /* *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved. * @@ -29,27 +30,64 @@ * Authors: Harold L Hunt II */ -#ifndef WINCLIPBOARD_INTERNAL_H -#define WINCLIPBOARD_INTERNAL_H +/* Standard library headers */ +#include <assert.h> +#include <stdio.h> +#include <stdlib.h> +#ifndef _MSC_VER +#include <unistd.h> +#endif +#ifdef __CYGWIN__ +#include <sys/select.h> +#else +#include <X11/Xwinsock.h> +#endif +#include <fcntl.h> +#include <setjmp.h> +#ifdef _MSC_VER +typedef int pid_t; +#endif +#include <pthread.h> /* X headers */ -#include <X11/Xlib.h> +#include <X11/X.h> +#include <X11/Xatom.h> +#include <X11/Xproto.h> +#include <X11/Xutil.h> /* Windows headers */ #include <X11/Xwindows.h> +/* Clipboard module constants */ +#define WIN_CLIPBOARD_WINDOW_CLASS "xwinclip" +#define WIN_CLIPBOARD_WINDOW_TITLE "xwinclip" +#ifdef HAS_DEVWINDOWS +#define WIN_MSG_QUEUE_FNAME "/dev/windows" +#endif +#define WIN_CONNECT_RETRIES 40 +#define WIN_CONNECT_DELAY 4 +#define WIN_JMP_OKAY 0 +#define WIN_JMP_ERROR_IO 2 +#define WIN_LOCAL_PROPERTY "CYGX_CUT_BUFFER" #define WIN_XEVENTS_SUCCESS 0 #define WIN_XEVENTS_CONVERT 2 #define WIN_XEVENTS_NOTIFY 3 -#define WM_WM_REINIT (WM_USER + 1) +#include "winmsg.h" /* * References to external symbols */ -extern void winDebug(const char *format, ...); -extern void ErrorF(const char *format, ...); +extern char *display; +/* + * winclipboardinit.c + */ + +Bool + winInitClipboard(void); + +HWND winClipboardCreateMessagingWindow(void); /* * winclipboardtextconv.c @@ -65,45 +103,23 @@ void * winclipboardthread.c */ - -typedef struct -{ - Atom atomClipboard; - Atom atomLocalProperty; - Atom atomUTF8String; - Atom atomCompoundText; - Atom atomTargets; -} ClipboardAtoms; +void *winClipboardProc(void *); /* * 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; - ClipboardAtoms *atoms; -} ClipboardWindowCreationParams; - /* * winclipboardxevents.c */ int -winClipboardFlushXEvents(HWND hwnd, - Window iWindow, Display * pDisplay, Bool fUnicodeSupport, ClipboardAtoms *atom); - - -Atom -winClipboardGetLastOwnedSelectionAtom(ClipboardAtoms *atoms); - -void -winClipboardInitMonitoredSelections(void); +winClipboardFlushXEvents(HWND hwnd, + int iWindow, Display * pDisplay, Bool fUnicodeSupport, Bool ClipboardOpened); #endif |