1 /************************************************************
2 
3 Copyright 1998 by Thomas E. Dickey <dickey@clark.net>
4 
5                         All Rights Reserved
6 
7 Permission to use, copy, modify, and distribute this software and its
8 documentation for any purpose and without fee is hereby granted,
9 provided that the above copyright notice appear in all copies and that
10 both that copyright notice and this permission notice appear in
11 supporting documentation, and that the name of the above listed
12 copyright holder(s) not be used in advertising or publicity pertaining
13 to distribution of the software without specific, written prior
14 permission.
15 
16 THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
17 TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
18 AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
19 LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
20 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
21 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
22 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 
24 ********************************************************/
25 
26 #ifndef _DIFSUTILS_H
27 #define _DIFSUTILS_H 1
28 
29 #include <misc.h>
30 #include <auth.h>
31 #include <X11/fonts/font.h>
32 #include <X11/fonts/fontstruct.h>
33 #include <X11/fonts/libxfont2.h>
34 
35 typedef void (*DifsWakeupFunc)(pointer data, int result, unsigned long * pReadmask);
36 typedef Bool (*DifsWorkFunc) (ClientPtr, pointer);
37 
38 extern AuthContextPtr GetClientAuthorization (void);
39 extern Bool ClientIsAsleep (ClientPtr client);
40 extern Bool ClientSleep (ClientPtr client, Bool (*function) (ClientPtr, pointer), pointer data);
41 extern Bool QueueWorkProc (DifsWorkFunc function, ClientPtr client, pointer data);
42 extern Bool RegisterBlockAndWakeupHandlers (FontBlockHandlerProcPtr blockHandler, DifsWakeupFunc wakeupHandler, pointer blockData);
43 #if 0
44 extern FontResolutionPtr GetClientResolutions (int *num);
45 #endif
46 #if 0
47 extern int GetDefaultPointSize (void);
48 #endif
49 extern int SetDefaultResolutions (char *str);
50 #if 0
51 extern int client_auth_generation (ClientPtr client);
52 #endif
53 extern int set_font_authorizations (char **authorizations, int *authlen, void *_client);
54 extern int strncmpnocase (const char *first, const char *second, int n);
55 extern pointer Xalloc (unsigned long m);
56 extern pointer Xrealloc (pointer n, unsigned long m);
57 extern void BlockHandler (OSTimePtr pTimeout, pointer pReadmask);
58 extern void ClientWakeup (ClientPtr client);
59 extern void InitBlockAndWakeupHandlers (void);
60 extern void NoopDDA (void);
61 extern void ProcessWorkQueue (void);
62 extern void RemoveBlockAndWakeupHandlers (FontBlockHandlerProcPtr blockHandler, DifsWakeupFunc wakeupHandler, pointer blockData);
63 extern void SetDefaultPointSize (int ps);
64 extern void WakeupHandler (int result, unsigned long * pReadmask);
65 extern void Xfree (unsigned long *n);
66 extern pointer Xcalloc (unsigned long n);
67 
68 #endif /* _DIFSUTILS_H */
69