DMXAddInput(3)
π DMXAddInput β bestie, let's attach a new input π
okay so this is a libdmx page, and the whole vibe is: you've got an Xdmx(1) server and you wanna bolt a new input onto it (or re-bolt one you took off earlier). These three functions do exactly that. No cap.
β¨ NAME β¨
DMXAddInput, DMXAddBackendInput, DMXAddConsoleInput β attach a new input π«Ά
πΈ SYNOPSIS πΈ
#include <X11/extensions/dmxext.h>
Bool DMXAddInput(Display *dpy,
unsigned int mask,
DMXInputAttributes *attr,
int *id);
Bool DMXAddBackendInput(Display *dpy,
int screen,
int sendsCore,
int *newId);
Bool DMXAddConsoleInput(Display *dpy,
const char *name,
int sendsCore,
int *newId);
π¦ DESCRIPTION π¦
So DMXAddInput() is the main character here β it attaches a new input (or a previously detached input, we love a comeback arc β¨) to the Xdmx(1) server.
masktells you which fields insideattrare actually active (like, which ones we're paying attention to, bestie).idreturns the device id of the first device in the series</... wait no β the device id of the first device in the series that gets added. π
The value of mask is computed from these values:
DMXInputTypeDMXInputPhysicalScreenDMXInputSendsCore
And here's the DMXInputAttributes structure, in all its glory:
typedef struct {
DMXInputEnum inputType;
int physicalScreen;
int physicalId;
Bool isCore;
Bool sendsCore;
const char *name;
Bool detached;
} DMXInputAttributes;
inputType can be either DMXConsoleInputType or DMXBackendInputType β pick your fighter. π
- For console devices,
nameis the one that specifies the display to be used. - For back-end devices,
physicalScreenspecifies theXdmx(1)screen number.
If sendsCore is True, the new device gets added as a true core device. Iconic.
If a device was removed earlier with DMXRemoveInput(3), then an attempt will be made to reconnect the previous devices β and heads up, sendsCore is ignored in that case. π
π the helper functions π
DMXAddBackendInput() is a lil helper that's used to add input from a back-end server. With this one:
screenrefers to the back-end screensendsCoreisTrueif the new input should send core events (and it is ignored if the input has been detached)newIdwill hold the device id of the first device in the series added
DMXAddConsoleInput() is the other helper, used to add input from a console. With this one:
nameis the name of the console displaysendsCoreisTrueif the new input should send core events (and it is ignored if the input has been detached)newIdwill hold the device id of the first device in the series added
π RETURN VALUE π
DMXAddInput() returns True on success and False otherwise. That's it, that's the whole thing. β¨
DMXAddInput() can also generate these errors, and ngl you should know them:
BadValueβ ifinputTypeis invalid orphysicalScreenis out of rangeBadAccessβ if the input has already been attached, or if the backend screen is currently detached
π NOTES π
- Local devices cannot be attached or detached. Just not a thing, bestie. π
- Attributes that are not specified will default to
0. This may lead to unintended results β so like, actually specify your stuff, fr fr.
π«Ά lowkey important: that default-to-zero thing is not a vibe. Set your fields.
π SEE ALSO π
and that's the page!! π this was libdmx version 1.1.5, part of X Version 11, and the whole thing is dated the same way that footer always is. stay slay, go attach ur inputs, mwah ππ¦πΈ
π¦ where this page comes from
- epel 10: libdmx-devel 1.1.5-5.el10_1 Β· MIT
- fedora 43: libdmx-devel 1.1.5-6.fc43 Β· MIT
- fedora 43: libdmx-devel 1.1.5-6.fc43 Β· MIT
- fedora 44: libdmx-devel 1.1.5-7.fc44 Β· MIT
- fedora 44: libdmx-devel 1.1.5-7.fc44 Β· MIT
- nixos 26.05: libdmx 1.1.5
- nixpkgs unstable: libdmx 1.1.5
- opensuse-leap 16.0: libdmx-devel 1.1.5-160000.3.2 Β· MIT
- opensuse-leap 16.0: libdmx-devel 1.1.5-160000.3.2 Β· MIT
- opensuse-leap 16.0: libdmx-devel 1.1.5-160000.3.2 Β· MIT
- opensuse-leap 16.0: libdmx-devel 1.1.5-160000.3.2 Β· MIT
- Copyright 2004 Red Hat Inc., Durham, North Carolina
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms