1
/* $Id: gii.h,v 1.3 2001/06/30 09:56:14 soyt Exp $
2
******************************************************************************
6
Copyright (C) 1998 Andreas Beck [becka@ggi-project.org]
7
Copyright (C) 1999-2000 Marcus Sundberg [marcus@ggi-project.org]
9
Permission is hereby granted, free of charge, to any person obtaining a
10
copy of this software and associated documentation files (the "Software"),
11
to deal in the Software without restriction, including without limitation
12
the rights to use, copy, modify, merge, publish, distribute, sublicense,
13
and/or sell copies of the Software, and to permit persons to whom the
14
Software is furnished to do so, subject to the following conditions:
16
The above copyright notice and this permission notice shall be included in
17
all copies or substantial portions of the Software.
19
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22
THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
23
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26
******************************************************************************
32
#include <ggi/events.h>
34
#ifndef _INTERNAL_LIBGII
35
/* Opaque pointer types.
36
This little magic gains us some type checking. */
37
struct gii_h_dummy1 { char dummy1; };
38
typedef struct gii_h_dummy1 *gii_input_t;
43
******************************************************************************
44
libGII function definitions
45
******************************************************************************
49
/* Get the master config dir
51
const char *giiGetConfDir(void);
53
/* Enter and leave the library.
57
void giiPanic(const char *format, ...);
59
/* Turn on thread safe operation
63
/* Open a new Input - use input `NULL' for autoselect.
65
gii_input_t giiOpen(const char *input,...);
66
int giiClose(gii_input_t inp);
70
gii_input_t giiJoinInputs(gii_input_t inp, gii_input_t inp2);
71
int giiSplitInputs(gii_input_t inp, gii_input_t *newhand,
72
uint32 origin, uint32 flags);
76
gii_event_mask giiEventPoll(gii_input_t inp, gii_event_mask mask,
78
int giiEventRead(gii_input_t inp, gii_event *ev,
80
int giiEventsQueued(gii_input_t inp, gii_event_mask mask);
81
int giiEventSend(gii_input_t inp, gii_event *ev);
82
int giiSetEventMask(gii_input_t inp, gii_event_mask evm);
83
gii_event_mask giiGetEventMask(gii_input_t inp);
85
#define giiAddEventMask(inp,mask) \
86
giiSetEventMask((inp), giiGetEventMask((inp)) | (mask))
87
#define giiRemoveEventMask(inp,mask) \
88
giiSetEventMask((inp), giiGetEventMask((inp)) & ~(mask))
92
int giiQueryDeviceInfo (gii_input_t inp, uint32 origin, gii_cmddata_getdevinfo *info);
93
int giiQueryDeviceInfoByNumber(gii_input_t inp, uint32 number, uint32 *origin, gii_cmddata_getdevinfo *info);
94
int giiQueryValInfo (gii_input_t inp, uint32 origin, uint32 valnumber, gii_cmddata_getvalinfo *info);
98
#endif /* _GGI_GII_H */