xserver

xserver with xephyr scale patch
git clone https://git.neptards.moe/u3shit/xserver.git
Log | Files | Refs | README | LICENSE

internal.h (3304B)


      1 /*
      2  *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved.
      3  *
      4  *Permission is hereby granted, free of charge, to any person obtaining
      5  * a copy of this software and associated documentation files (the
      6  *"Software"), to deal in the Software without restriction, including
      7  *without limitation the rights to use, copy, modify, merge, publish,
      8  *distribute, sublicense, and/or sell copies of the Software, and to
      9  *permit persons to whom the Software is furnished to do so, subject to
     10  *the following conditions:
     11  *
     12  *The above copyright notice and this permission notice shall be
     13  *included in all copies or substantial portions of the Software.
     14  *
     15  *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
     16  *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     17  *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
     18  *NONINFRINGEMENT. IN NO EVENT SHALL HAROLD L HUNT II BE LIABLE FOR
     19  *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
     20  *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
     21  *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     22  *
     23  *Except as contained in this notice, the name of Harold L Hunt II
     24  *shall not be used in advertising or otherwise to promote the sale, use
     25  *or other dealings in this Software without prior written authorization
     26  *from Harold L Hunt II.
     27  *
     28  * Authors:	Harold L Hunt II
     29  */
     30 
     31 #ifndef WINCLIPBOARD_INTERNAL_H
     32 #define WINCLIPBOARD_INTERNAL_H
     33 
     34 #include <xcb/xproto.h>
     35 #include <X11/Xfuncproto.h> // for _X_ATTRIBUTE_PRINTF
     36 #include <X11/Xmd.h> // for BOOL
     37 
     38 /* Windows headers */
     39 #include <X11/Xwindows.h>
     40 
     41 #define WIN_XEVENTS_SUCCESS			0  // more like 'CONTINUE'
     42 #define WIN_XEVENTS_FAILED			1
     43 #define WIN_XEVENTS_NOTIFY_DATA			3
     44 #define WIN_XEVENTS_NOTIFY_TARGETS		4
     45 
     46 #define WM_WM_QUIT                             (WM_USER + 2)
     47 
     48 #define ARRAY_SIZE(a)  (sizeof((a)) / sizeof((a)[0]))
     49 
     50 /*
     51  * References to external symbols
     52  */
     53 
     54 extern void winDebug(const char *format, ...) _X_ATTRIBUTE_PRINTF(1, 2);
     55 extern void ErrorF(const char *format, ...) _X_ATTRIBUTE_PRINTF(1, 2);
     56 
     57 /*
     58  * winclipboardtextconv.c
     59  */
     60 
     61 void
     62  winClipboardDOStoUNIX(char *pszData, int iLength);
     63 
     64 void
     65  winClipboardUNIXtoDOS(char **ppszData, int iLength);
     66 
     67 /*
     68  * winclipboardthread.c
     69  */
     70 
     71 typedef struct
     72 {
     73     xcb_atom_t atomClipboard;
     74     xcb_atom_t atomLocalProperty;
     75     xcb_atom_t atomUTF8String;
     76     xcb_atom_t atomCompoundText;
     77     xcb_atom_t atomTargets;
     78     xcb_atom_t atomIncr;
     79 } ClipboardAtoms;
     80 
     81 /*
     82  * winclipboardwndproc.c
     83  */
     84 
     85 BOOL winClipboardFlushWindowsMessageQueue(HWND hwnd);
     86 
     87 LRESULT CALLBACK
     88 winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
     89 
     90 typedef struct
     91 {
     92   xcb_connection_t *pClipboardDisplay;
     93   xcb_window_t iClipboardWindow;
     94   ClipboardAtoms *atoms;
     95 } ClipboardWindowCreationParams;
     96 
     97 /*
     98  * winclipboardxevents.c
     99  */
    100 
    101 typedef struct
    102 {
    103   xcb_atom_t *targetList;
    104   unsigned char *incr;
    105   unsigned long int incrsize;
    106 } ClipboardConversionData;
    107 
    108 int
    109 winClipboardFlushXEvents(HWND hwnd,
    110                          xcb_window_t iWindow, xcb_connection_t * pDisplay,
    111                          ClipboardConversionData *data, ClipboardAtoms *atoms);
    112 
    113 xcb_atom_t
    114 winClipboardGetLastOwnedSelectionAtom(ClipboardAtoms *atoms);
    115 
    116 void
    117 winClipboardInitMonitoredSelections(void);
    118 
    119 #endif