summaryrefslogtreecommitdiff
path: root/lib/libdmx/man/DMXAddInput.man
blob: 287f9c3b442da2f17c9a343f1a5fa3bced558130 (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
153
154
155
156
157
158
159
160
.\" Copyright 2004 Red Hat Inc., Durham, North Carolina.
.\" All Rights Reserved.
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining
.\" a copy of this software and associated documentation files (the
.\" "Software"), to deal in the Software without restriction, including
.\" without limitation on the rights to use, copy, modify, merge,
.\" publish, distribute, sublicense, and/or sell copies of the Software,
.\" and to permit persons to whom the Software is furnished to do so,
.\" subject to the following conditions:
.\"
.\" he above copyright notice and this permission notice (including the
.\" next paragraph) shall be included in all copies or substantial
.\" portions of the Software.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
.\" SOFTWARE.
.TH DMXAddInput __libmansuffix__ __vendorversion__
.SH NAME
DMXAddInput, DMXAddBackendInput, DMXAddConsoleInput \- attach a new input
.SH SYNOPSIS
.B #include <X11/extensions/dmxext.h>
.sp
.nf
.BI "Bool DMXAddInput(Display " *dpy ,
.BI "                 unsigned int " mask ,
.BI "                 DMXInputAttributes " *attr ,
.BI "                 int " *id );
.br
.BI "Bool DMXAddBackendInput(Display " *dpy ,
.BI "                        int " screen ,
.BI "                        int " sendsCore ,
.BI "                        int " *newId );
.br
.BI "Bool DMXAddConsoleInput(Display " *dpy ,
.BI "                        const char " *name ,
.BI "                        int " sendsCore ,
.BI "                        int " *newId );
.fi
.SH DESCRIPTION
.B DMXAddInput()
is used to attach a new input (or a previously detached input) to the
.BR Xdmx (1)
server.
.I mask
specifies the fields in
.I attr
that are active, and
.I id
returns the device if of the first device in the series that is added.
.PP
The value of
.I mask
is computed from the following values:
.sp
.nf
DMXInputType
DMXInputPhysicalScreen
DMXInputSendsCore
.fi
.PP
The
.B DMXInputAttributes
structure is:
.sp
.nf
typedef struct {
    DMXInputEnum inputType;
    int          physicalScreen;
    int          physicalId;
    Bool         isCore;
    Bool         sendsCore;
    const char   *name;
    Bool         detached;
} DMXInputAttributes;
.fi
.PP
.I inputType
may bave the value
.B DmxConsoleInputType " or " DmxBackendInputType .
.PP
For console devices,
.I name
will specify the display to be used.
.PP
For back-end devices,
.I physicalScreen
will specify the
.BR Xdmx (1)
screen number.
.PP
If
.I sendsCore
is
.BR True ,
the new device will be added as a true core device.
.PP
If a device was removed with
.BR DMXRemoveInput (__libmansuffix__)
an attempt will be made to reconnect the previous devices
.RI ( sendsCore
is ignored in this case).
.PP
.B DMXAddBackendInput()
is a helper function that is used to add input from a back-end server.
With this function,
.I screen
refers to the back-end screen,
.I sendsCore
is
.B True
if the new input should send core events (and it ignored if the input
has been detached), and
.I newId
will hold the device id of the first device in the series added.
.PP
.B DMXAddConsoleInput()
is a helper function that is used to add input from a console.  With
this function,
.I name
is the name of the console display,
.I sendsCore
is
.B True
if the new input should send core events (and it ignored if the input
has been detached), and
.I newId
will hold the device id of the first device in the series added.
.SH "RETURN VALUE"
.B DMXAddInput()
returns
.B True
on success and
.B False
otherwise.
.PP
.B DMXAddInput()
can generate
.B BadValue
(if
.I inputType
is invalid or
.I physicalScreen
is out of range),
.B BadAccess
(if the input has already been attached or if the backend screen is
currently detached).
.SH NOTES
Local devices cannot be attached or detached.
.PP
Attributes that are not specified will default to 0.  This may lead to
unintended results.
.SH "SEE ALSO"
.BR DMXRemoveInput "(__libmansuffix__), " DMX "(__libmansuffix__), " Xdmx (1)