summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver/hw/omron/omron.h
blob: 32ffaabfcdbf47d895c339de7944d2d352e33f68 (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
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/*
 * $XConsortium: omron.h,v 1.3 94/02/04 19:37:26 dpw Exp kaleb $
 *
 * Copyright 1991 by OMRON Corporation
 * 
 * Permission to use, copy, modify, distribute, and sell this software and its
 * documentation for any purpose is hereby granted without fee, provided that
 * the above copyright notice appear in all copies and that both that
 * copyright notice and this permission notice appear in supporting
 * documentation, and that the name of OMRON not be used in advertising or
 * publicity pertaining to distribution of the software without specific,
 * written prior permission.  OMRON makes no representations about the
 * suitability of this software for any purpose.  It is provided "as is"
 * without express or implied warranty.
 *
 * OMRON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL OMRON
 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */
#include <stdio.h>

#include <fcntl.h>
#ifdef	uniosu
# include <termio.h>
#endif
#include <sys/types.h>
#include <sys/param.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/signal.h>

#ifdef	uniosu
# include <sys/sys9100.h>
# include <sys/kbms.h>
#else /* not uniosu */
# if defined(luna88k) || defined(luna2)
#  include <machine/sysomron.h>
#  include <dev/kbms.h>
# else /* uniosb */
#  include <om68k/sysomron.h>
#  include <om68kdev/kbms.h>
# endif
#endif

#include <errno.h>

#include "X.h"
#include "Xmd.h"
#include "Xpoll.h"

#define	NEED_EVENTS
#include "Xproto.h"

#include "misc.h"

#include "scrnintstr.h"
#include "screenint.h"

#include "servermd.h"

#include "input.h"
#include "inputstr.h"

#include "mipointer.h"

#include "mfb.h"

#define SET_KBTIME 1
#define SET_MSTIME 0

/* libc */
extern int	open();
extern int  read();
extern int  write();
extern int	ioctl();
extern int	close();
extern int	getpagesize();
extern int	getpid();
extern char *valloc();
extern int	free();
extern int	mmap();
extern int	munmap();
extern int	exit();
extern int  sysomron();
extern int  fcntl();
extern int  ffs();
extern int  sigblock();
extern int  sigsetmask();

/* dix */
extern void NoopDDA();
extern int	AddScreen();
extern int	AllocateScreenPrivateIndex();
#ifdef	UNUSE_SIGIO_SIGNAL
extern Bool RegisterBlockAndWakeupHandlers();
#endif

/* os */
extern int  AddEnabledDevice();
extern int  RemoveEnabledDevice();

/* ddx/mi */
extern Bool mieqInit();
extern int  mieqProcessInputEvents();
extern int  mieqEnqueue();
extern void miRegisterPointerDevice();
extern Bool miDCInitialize();

/* ddx/omron */
extern void omronSetLastEventTime();
extern Bool omronParseFbArg();
extern void omronSetIoHandler();
extern void omronInitEventPrvRec();
extern void omronSetDriverTimeMode();

#ifndef	UNUSE_SIGIO_SIGNAL
extern void omronSigIOHandler();
#else
extern void omronWakeupProc();
#endif

extern void omronEnqueueEvents();
#ifndef UNUSE_DRV_TIME
extern void omronEnqueueTEvents();
#endif

/* libc */
#ifdef X_NOT_STDC_ENV
extern int errno;
#endif

/* os */
extern fd_set* EnabledDevices;

/* ddx/omron */
extern int omronScreenIndex;	
extern int monitorResolution;

extern int  scrw;
extern int  scrh;
extern int  QueryFb;
extern char *fb_type;

extern int lastEventTime;

extern CARD8 *omronKeyModMap[];
extern KeySymsRec omronKeySyms[];