summaryrefslogtreecommitdiff
path: root/hw/xfree86/os-support/xf86_os_support.h
blob: a4fe01346ec2d7a54db2591e5b82dd8594fc8b23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* SPDX-License-Identifier: MIT OR X11
 *
 * Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
 */

/* prototypes for the os-support layer of xfree86 DDX */

#ifndef _XSERVER_XF86_OS_SUPPORT
#define _XSERVER_XF86_OS_SUPPORT

#include <X11/Xdefs.h>

#include "os.h"

/*
 * This is to prevent re-entrancy to FatalError() when aborting.
 * Anything that can be called as a result of ddxGiveUp() should use this
 * instead of FatalError().
 */

#define xf86FatalError(a, b) \
	if (dispatchException & DE_TERMINATE) { \
		ErrorF(a, b); \
		ErrorF("\n"); \
		return; \
	} else FatalError(a, b)

typedef void (*PMClose) (void);

void xf86OpenConsole(void);
void xf86CloseConsole(void);
Bool xf86VTActivate(int vtno);
Bool xf86VTSwitchPending(void);
Bool xf86VTSwitchAway(void);
Bool xf86VTSwitchTo(void);
void xf86VTRequest(int sig);
int xf86ProcessArgument(int argc, char **argv, int i);
void xf86UseMsg(void);
PMClose xf86OSPMOpen(void);
void xf86InitVidMem(void);

void xf86OSRingBell(int volume, int pitch, int duration);
void xf86OSInputThreadInit(void);
Bool xf86DeallocateGARTMemory(int screenNum, int key);
int xf86RemoveSIGIOHandler(int fd);

typedef struct {
    Bool initialised;
} VidMemInfo, *VidMemInfoPtr;

void xf86OSInitVidMem(VidMemInfoPtr);

#ifdef XSERVER_PLATFORM_BUS
#include "hotplug.h"
void
xf86PlatformDeviceProbe(struct OdevAttributes *attribs);

void
xf86PlatformReprobeDevice(int index, struct OdevAttributes *attribs);
#endif

#endif /* _XSERVER_XF86_OS_SUPPORT */