1 | /* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loaderProcs.h,v 1.21 2003/10/15 16:29:04 dawes Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | *
|
---|
5 | * Copyright 1995-1998 by Metro Link, Inc.
|
---|
6 | *
|
---|
7 | * Permission to use, copy, modify, distribute, and sell this software and its
|
---|
8 | * documentation for any purpose is hereby granted without fee, provided that
|
---|
9 | * the above copyright notice appear in all copies and that both that
|
---|
10 | * copyright notice and this permission notice appear in supporting
|
---|
11 | * documentation, and that the name of Metro Link, Inc. not be used in
|
---|
12 | * advertising or publicity pertaining to distribution of the software without
|
---|
13 | * specific, written prior permission. Metro Link, Inc. makes no
|
---|
14 | * representations about the suitability of this software for any purpose.
|
---|
15 | * It is provided "as is" without express or implied warranty.
|
---|
16 | *
|
---|
17 | * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
---|
18 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
---|
19 | * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
---|
20 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
---|
21 | * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
---|
22 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
---|
23 | * PERFORMANCE OF THIS SOFTWARE.
|
---|
24 | */
|
---|
25 | /*
|
---|
26 | * Copyright (c) 1997-2002 by The XFree86 Project, Inc.
|
---|
27 | *
|
---|
28 | * Permission is hereby granted, free of charge, to any person obtaining a
|
---|
29 | * copy of this software and associated documentation files (the "Software"),
|
---|
30 | * to deal in the Software without restriction, including without limitation
|
---|
31 | * the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
---|
32 | * and/or sell copies of the Software, and to permit persons to whom the
|
---|
33 | * Software is furnished to do so, subject to the following conditions:
|
---|
34 | *
|
---|
35 | * The above copyright notice and this permission notice shall be included in
|
---|
36 | * all copies or substantial portions of the Software.
|
---|
37 | *
|
---|
38 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
39 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
40 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
---|
41 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
---|
42 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
---|
43 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
---|
44 | * OTHER DEALINGS IN THE SOFTWARE.
|
---|
45 | *
|
---|
46 | * Except as contained in this notice, the name of the copyright holder(s)
|
---|
47 | * and author(s) shall not be used in advertising or otherwise to promote
|
---|
48 | * the sale, use or other dealings in this Software without prior written
|
---|
49 | * authorization from the copyright holder(s) and author(s).
|
---|
50 | */
|
---|
51 |
|
---|
52 | #ifdef HAVE_XORG_CONFIG_H
|
---|
53 | #include <xorg-config.h>
|
---|
54 | #endif
|
---|
55 |
|
---|
56 | #ifndef _LOADERPROCS_H
|
---|
57 | #define _LOADERPROCS_H
|
---|
58 |
|
---|
59 | #define IN_LOADER
|
---|
60 | #include "xf86Module.h"
|
---|
61 | #include <X11/fonts/fontmod.h>
|
---|
62 |
|
---|
63 | typedef struct module_desc {
|
---|
64 | struct module_desc *child;
|
---|
65 | struct module_desc *sib;
|
---|
66 | struct module_desc *parent;
|
---|
67 | struct module_desc *demand_next;
|
---|
68 | char *name;
|
---|
69 | char *filename;
|
---|
70 | char *identifier;
|
---|
71 | XID client_id;
|
---|
72 | int in_use;
|
---|
73 | int handle;
|
---|
74 | ModuleSetupProc SetupProc;
|
---|
75 | ModuleTearDownProc TearDownProc;
|
---|
76 | void *TearDownData; /* returned from SetupProc */
|
---|
77 | const char *path;
|
---|
78 | const XF86ModuleVersionInfo *VersionInfo;
|
---|
79 | } ModuleDesc, *ModuleDescPtr;
|
---|
80 |
|
---|
81 | /*
|
---|
82 | * Extenal API for the loader
|
---|
83 | */
|
---|
84 |
|
---|
85 | void LoaderInit(void);
|
---|
86 |
|
---|
87 | ModuleDescPtr LoadDriver(const char *, const char *, int, pointer, int *,
|
---|
88 | int *);
|
---|
89 | ModuleDescPtr LoadModule(const char *, const char *, const char **,
|
---|
90 | const char **, pointer, const XF86ModReqInfo *,
|
---|
91 | int *, int *);
|
---|
92 | ModuleDescPtr LoadSubModule(ModuleDescPtr, const char *,
|
---|
93 | const char **, const char **, pointer,
|
---|
94 | const XF86ModReqInfo *, int *, int *);
|
---|
95 | ModuleDescPtr LoadSubModuleLocal(ModuleDescPtr, const char *,
|
---|
96 | const char **, const char **,
|
---|
97 | pointer, const XF86ModReqInfo *,
|
---|
98 | int *, int *);
|
---|
99 | ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent);
|
---|
100 | void LoadFont(FontModule *);
|
---|
101 | void UnloadModule(ModuleDescPtr);
|
---|
102 | void UnloadSubModule(ModuleDescPtr);
|
---|
103 | void UnloadDriver(ModuleDescPtr);
|
---|
104 | void FreeModuleDesc(ModuleDescPtr mod);
|
---|
105 | ModuleDescPtr NewModuleDesc(const char *);
|
---|
106 | ModuleDescPtr AddSibling(ModuleDescPtr head, ModuleDescPtr new);
|
---|
107 | void LoaderSetPath(const char *path);
|
---|
108 | void LoaderSortExtensions(void);
|
---|
109 |
|
---|
110 | void LoaderVReqSymLists(const char **, va_list args);
|
---|
111 | void LoaderVReqSymbols(const char *, va_list args);
|
---|
112 | void LoaderVRefSymLists(const char **, va_list args);
|
---|
113 | void LoaderVRefSymbols(const char *, va_list args);
|
---|
114 |
|
---|
115 | void LoaderShowStack(void);
|
---|
116 | void *LoaderSymbolHandle(const char *, int);
|
---|
117 | int LoaderUnload(int);
|
---|
118 | unsigned long LoaderGetModuleVersion(ModuleDescPtr mod);
|
---|
119 |
|
---|
120 | void LoaderResetOptions(void);
|
---|
121 | void LoaderSetOptions(unsigned long);
|
---|
122 | void LoaderClearOptions(unsigned long);
|
---|
123 |
|
---|
124 | /* Options for LoaderSetOptions */
|
---|
125 | #define LDR_OPT_ABI_MISMATCH_NONFATAL 0x0001
|
---|
126 |
|
---|
127 | #endif /* _LOADERPROCS_H */
|
---|