cb7769510cb4c026e8a4e58ba0c30f4cdd012f9e
1 #ifndef _WINCLIPBOARD_H_
2 #define _WINCLIPBOARD_H_
4 *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved.
6 *Permission is hereby granted, free of charge, to any person obtaining
7 * a copy of this software and associated documentation files (the
8 *"Software"), to deal in the Software without restriction, including
9 *without limitation the rights to use, copy, modify, merge, publish,
10 *distribute, sublicense, and/or sell copies of the Software, and to
11 *permit persons to whom the Software is furnished to do so, subject to
12 *the following conditions:
14 *The above copyright notice and this permission notice shall be
15 *included in all copies or substantial portions of the Software.
17 *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 *NONINFRINGEMENT. IN NO EVENT SHALL HAROLD L HUNT II BE LIABLE FOR
21 *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
22 *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 *Except as contained in this notice, the name of Harold L Hunt II
26 *shall not be used in advertising or otherwise to promote the sale, use
27 *or other dealings in this Software without prior written authorization
28 *from Harold L Hunt II.
30 * Authors: Harold L Hunt II
33 /* Standard library headers */
39 #include <sys/select.h>
41 #include <X11/Xwinsock.h>
49 #include <X11/Xatom.h>
50 #include <X11/Xproto.h>
51 #include <X11/Xutil.h>
52 #include <X11/Xlocale.h>
55 #include <X11/Xwindows.h>
57 /* Clipboard module constants */
58 #define WIN_CLIPBOARD_WINDOW_CLASS "xwinclip"
59 #define WIN_CLIPBOARD_WINDOW_TITLE "xwinclip"
61 #define WIN_MSG_QUEUE_FNAME "/dev/windows"
63 #define WIN_CONNECT_RETRIES 40
64 #define WIN_CONNECT_DELAY 4
65 #define WIN_JMP_OKAY 0
66 #define WIN_JMP_ERROR_IO 2
67 #define WIN_LOCAL_PROPERTY "CYGX_CUT_BUFFER"
68 #define WIN_XEVENTS_SUCCESS 0
69 #define WIN_XEVENTS_CONVERT 2
70 #define WIN_XEVENTS_NOTIFY 3
71 #define WIN_CLIPBOARD_RETRIES 40
72 #define WIN_CLIPBOARD_DELAY 1
74 #define WM_WM_REINIT (WM_USER + 1)
77 * References to external symbols
81 extern void winDebug(const char *format
, ...);
82 extern void winErrorFVerb(int verb
, const char *format
, ...);
89 winInitClipboard(void);
91 HWND
winClipboardCreateMessagingWindow(void);
94 * winclipboardtextconv.c
98 winClipboardDOStoUNIX(char *pszData
, int iLength
);
101 winClipboardUNIXtoDOS(char **ppszData
, int iLength
);
104 * winclipboardthread.c
107 void *winClipboardProc(void *);
110 * winclipboardwndproc.c
113 BOOL
winClipboardFlushWindowsMessageQueue(HWND hwnd
);
116 winClipboardWindowProc(HWND hwnd
, UINT message
, WPARAM wParam
, LPARAM lParam
);
119 * winclipboardxevents.c
124 winClipboardFlushXEvents(HWND hwnd
,
125 int iWindow
, Display
* pDisplay
, Bool fUnicodeSupport
);