summaryrefslogtreecommitdiff
path: root/hw/xwin/winclipboard.h
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-06-21 13:19:32 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-06-21 13:19:32 +0000
commitd6e8b1affec7351549c0006cc63b6923091cdd68 (patch)
tree6e5e9dd1c1ec6e141349337df844b649bbf4277d /hw/xwin/winclipboard.h
parentdfdbb60bf5f613b3554d5435f08f16bde72aa353 (diff)
Bug 777: Merge from CYGWIN branch
Diffstat (limited to 'hw/xwin/winclipboard.h')
-rw-r--r--hw/xwin/winclipboard.h71
1 files changed, 32 insertions, 39 deletions
diff --git a/hw/xwin/winclipboard.h b/hw/xwin/winclipboard.h
index 3e7c22fa0..225f50418 100644
--- a/hw/xwin/winclipboard.h
+++ b/hw/xwin/winclipboard.h
@@ -1,5 +1,7 @@
+#ifndef _WINCLIPBOARD_H_
+#define _WINCLIPBOARD_H_
/*
- *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
+ *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved.
*
*Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@@ -15,23 +17,18 @@
*THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
*EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
*MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
+ *NONINFRINGEMENT. IN NO EVENT SHALL HAROLD L HUNT II BE LIABLE FOR
*ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
*CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
*WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- *Except as contained in this notice, the name of the XFree86 Project
+ *Except as contained in this notice, the name of Harold L Hunt II
*shall not be used in advertising or otherwise to promote the sale, use
*or other dealings in this Software without prior written authorization
- *from the XFree86 Project.
+ *from Harold L Hunt II.
*
- * Authors: Harold Hunt
+ * Authors: Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winwindow.c,v 1.5 2002/11/07 10:31:32 alanh Exp $ */
-
-
-#ifndef _WINCLIPBOARD_H_
-#define _WINCLIPBOARD_H_
/* Standard library headers */
#include <assert.h>
@@ -44,41 +41,42 @@
#include <pthread.h>
/* X headers */
-#include "X.h"
-#include "Xatom.h"
+#include "X11/X.h"
+#include "X11/Xatom.h"
/* NOTE: For some unknown reason, including Xproto.h solves
* tons of problems with including windows.h. Unknowns reasons
* are usually bad, so someone should investigate this.
*/
-#include "Xproto.h"
-#include "Xutil.h"
-#include "Xlocale.h"
+#include "X11/Xproto.h"
+#include "X11/Xutil.h"
+#include "X11/Xlocale.h"
/* Fixups to prevent collisions between Windows and X headers */
#define ATOM DWORD
/* Windows headers */
+#ifndef XFree86Server
+#define XFree86Server
+#endif
#include <windows.h>
+#undef XFree86Server
/* Clipboard module constants */
#define WIN_CLIPBOARD_WINDOW_CLASS "xwinclip"
#define WIN_CLIPBOARD_WINDOW_TITLE "xwinclip"
#define WIN_MSG_QUEUE_FNAME "/dev/windows"
-#define WIN_CONNECT_RETRIES 3
+#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_SHUTDOWN 1
+#define WIN_XEVENTS_CONVERT 2
+#define WIN_XEVENTS_NOTIFY 3
-/*
- * Argument structure for Clipboard module main thread
- */
-
-typedef struct _ClipboardProcArgRec {
- DWORD dwScreen;
- pthread_mutex_t *ppmServerStarted;
-} ClipboardProcArgRec, *ClipboardProcArgPtr;
-
+#define WM_WM_REINIT (WM_USER + 1)
/*
* References to external symbols
@@ -86,6 +84,8 @@ typedef struct _ClipboardProcArgRec {
extern char *display;
extern void ErrorF (const char* /*f*/, ...);
+extern void winDebug (const char *format, ...);
+extern void winErrorFVerb (int verb, const char *format, ...);
/*
@@ -93,12 +93,10 @@ extern void ErrorF (const char* /*f*/, ...);
*/
Bool
-winInitClipboard (pthread_t *ptClipboardProc,
- pthread_mutex_t *ppmServerStarted,
- DWORD dwScreen);
+winInitClipboard (void);
HWND
-winClipboardCreateMessagingWindow ();
+winClipboardCreateMessagingWindow (void);
/*
@@ -117,17 +115,18 @@ winClipboardUNIXtoDOS (unsigned char **ppszData, int iLength);
*/
void *
-winClipboardProc (void *pArg);
+winClipboardProc (void *);
void
-winDeinitClipboard ();
+winDeinitClipboard (void);
+
/*
* winclipboardunicode.c
*/
Bool
-winClipboardDetectUnicodeSupport ();
+winClipboardDetectUnicodeSupport (void);
/*
@@ -146,14 +145,8 @@ winClipboardWindowProc (HWND hwnd, UINT message,
* winclipboardxevents.c
*/
-Bool
+int
winClipboardFlushXEvents (HWND hwnd,
- Atom atomClipboard,
- Atom atomLocalProperty,
- Atom atomUTF8String,
- Atom atomCompoundText,
- Atom atomTargets,
- Atom atomDeleteWindow,
int iWindow,
Display *pDisplay,
Bool fUnicodeSupport);