-
Notifications
You must be signed in to change notification settings - Fork 49
/
oslinux.h
106 lines (89 loc) · 3.22 KB
/
oslinux.h
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*
* This file is part of the Advance project.
*
* Copyright (C) 2001, 2002, 2003 Andrea Mazzoleni
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* In addition, as a special exception, Andrea Mazzoleni
* gives permission to link the code of this program with
* the MAME library (or with modified versions of MAME that use the
* same license as MAME), and distribute linked combinations including
* the two. You must obey the GNU General Public License in all
* respects for all of the code used other than MAME. If you modify
* this file, you may extend this exception to your version of the
* file, but you are not obligated to do so. If you do not wish to
* do so, delete this exception statement from your version.
*/
/** \file
* Internal interface for the "linux" host.
*/
#ifndef __OSLINUX_H
#define __OSLINUX_H
#ifdef __cplusplus
extern "C" {
#endif
/***************************************************************************/
/* Internal */
void target_usleep_granularity(unsigned us);
/**
* Get the VideoCore event counter.
*/
unsigned target_vc_get_event(void);
/**
* Wait until we get the expected VideoCore event counter, or the timeout is reached.
*/
int target_vc_wait_event(unsigned counter, unsigned timeout_ms);
/* Check if svgalib is used in some way */
#if defined(USE_VIDEO_SVGALIB) || defined(USE_KEYBOARD_SVGALIB) || defined(USE_MOUSE_SVGALIB) || defined(USE_JOYSTICK_SVGALIB)
#define USE_SVGALIB
void* os_internal_svgalib_get(void);
int os_internal_svgalib_is_video_active(void);
int os_internal_svgalib_is_video_mode_active(void);
#endif
/* Check if FB is used in some way */
#if defined(USE_VIDEO_FB)
#define USE_FB
void* os_internal_fb_get(void);
int os_internal_fb_is_video_active(void);
int os_internal_fb_is_video_mode_active(void);
#endif
/* Check if sLang is used in some way */
#if defined(USE_VIDEO_SLANG)
#define USE_SLANG
void* os_internal_slang_get(void);
#endif
#if defined(USE_VIDEO_CURSES)
#define USE_CURSES
void* os_internal_curses_get(void);
#endif
/* Check if X is used in some way */
#if defined(USE_VIDEO_X) || defined(USE_KEYBOARD_X) || defined(USE_MOUSE_X)
#define USE_X
void* os_internal_x_get(void);
#endif
/* Check if SDL is used in some way */
#if defined(USE_VIDEO_SDL) || defined(USE_KEYBOARD_SDL) || defined(USE_MOUSE_SDL) || defined(USE_JOYSTICK_SDL) || defined(USE_SOUND_SDL) || defined(USE_INPUT_SDL)
#define USE_SDL
#include "ossdl.h"
#endif
/* Check if input-event is used in some way */
#if defined(USE_KEYBOARD_EVENT) || defined(USE_MOUSE_EVENT) || defined(USE_JOYSTICK_EVENT)
#define USE_EVENT
#endif
#ifdef __cplusplus
}
#endif
#endif