DMXGetInputAttributes(3)
π DMXGetInputAttributes β determine input device attributes π
okay bestie, we're in the Library Functions Manual section of your local man pages, and today's main character is DMXGetInputAttributes(3). she's a libdmx girly, she's nosy in the best way, and she's about to tell you everything about your input devices. let's go π¦
β¨ SYNOPSIS β¨
#include <X11/extensions/dmxext.h>
Bool DMXGetInputAttributes(Display *dpy,
int id,
DMXInputAttributes *attr);
πΈ DESCRIPTION πΈ
so like, DMXGetInputAttributes() hands you back the tea about the input device you point at with id. and listen β this info? you literally cannot get it from the XListInputDevices(3) call. it's exclusive. it's VIP. π
id is the same id you'd use with the XListInputDevices(3) call, and it has to be in the range 0 to one less than whatever DMXGetInputCount(3) returned, inclusive. so like, stay in your lane, id-wise. π
the DMXInputAttributes structure is:
typedef struct {
DMXInputEnum inputType;
int physicalScreen;
int physicalId;
Bool isCore;
Bool sendsCore;
const char *name;
Bool detached;
} DMXInputAttributes;
inputType is always valid, no cap, and it'll be one of these depending on what kind of input we're dealing with: DMXLocalInputType, DMXConsoleInputType, or DMXBackendInputType. iconic little enum moment.
- for local devices: every other field that comes back, except
isCoreandsendsCore, is invalid. don't trust them, they're just vibes at that point. - for console devices:
physicalScreenandphysicalIDwill be invalid, andnamegives you the name of the X server where the console window is being displayed. - for back-end devices:
physicalScreenidentifies the back-end display and you can totally feed it toDMXGetScreenAttributes(3)to get more info;physicalIdis the XInput device id on the back-end X server; andnameis invalid β because it literally wouldn't tell you anything extra you couldn't already get fromDMXGetScreenAttributes(3). redundant queen, we don't need her. π
now for the core stuff, and this is important so pay attention:
- if
isCoreisTrue, then this device is active as a true core input device and will send core events. - if
sendsCoreisTrue, then this device is an XInput extension device, but it sends core events instead of extension events.
heads up bestie β this behavior is different from XFree86 or Xorg, where XInput extension devices may send both extension events and core events. so don't go assuming. π
and finally, if detached is True, then this device has been detached and is no longer producing input events. she's on a break. but you can reattach her using DMXAddInput(3). we love a comeback arc. π₯
π RETURN VALUE π
DMXGetInputAttributes() returns True unless there's a protocol error. simple as that. π
and if things go wrong? she can generate BadValue β specifically if the value of id is out of range. out of bounds, out of pocket. π«
β SEE ALSO β
lowkey that's the whole page, bestie. go read those SEE ALSOs, iykyk. π«Ά
X Version 11 β¨ libdmx 1.1.5 β mwah, that's the version tag and date vibes, signing off ππ§ββοΈ
π¦ 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