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