DMXGetScreenAttributes(3)

πŸ“¦
version 1.1.5 Β· 2 versions
, in epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

✨ DMXGetScreenAttributes ✨

okay bestie, welcome to DMXGetScreenAttributes(3) from the libdmx crew πŸ’– this is a Library Functions Manual moment and honestly? it's giving "let me peek at one specific screen's whole vibe" and we're obsessed.


🌸 NAME 🌸

DMXGetScreenAttributes β€” figure out the back-end screen attributes, no cap πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

#include <X11/extensions/dmxext.h>

Bool DMXGetScreenAttributes(Display *dpy,
                            int screen,
                            DMXScreenAttributes *attr);

πŸ’… DESCRIPTION πŸ’…

DMXGetScreenAttributes() hands you the attributes for the one DMX screen you point at with screen. Just the one. Singular. Main character energy, honestly 🫢

The DMXScreenAttributes structure is literally this, copy it exactly bestie:

typedef struct {
    char         *displayName;
    int          logicalScreen;

    unsigned int screenWindowWidth;
    unsigned int screenWindowHeight;
    int          screenWindowXoffset;
    int          screenWindowYoffset;

    unsigned int rootWindowWidth;
    unsigned int rootWindowHeight;
    int          rootWindowXoffset;
    int          rootWindowYoffset;

    int          rootWindowXorigin;
    int          rootWindowYorigin;
} DMXScreenAttributes;

Let's go field by field because every single one matters πŸ’–

  • displayName β€” the name used to open the display, either from the Xdmx(1) command-line or from the configuration file. That's it, that's the source.
  • logicalScreen β€” the value of the screen that the Xdmx(1) server exports to clients. 🌈 When Xinerama is in use, this value is typically 0 for all values of physicalScreen. And if Xinerama is in use, rootWindowXorigin and rootWindowYorigin tell you where the physical screen sits in the global Xinerama coordinate system. Otherwise? Those two are just set to 0. Simple as.
  • screenWindowWidth, screenWindowHeight, screenWindowXoffset, and screenWindowYoffset β€” a geometry specification (check X(7x)) for where the DMX screen lives on the back-end screen. The coordinate system of the back-end display is what's used for these values. Noted πŸ“
  • rootWindowWidth, rootWindowHeight, rootWindowXoffset, and rootWindowYoffset β€” another geometry specification (again, X(7x)) but this time for where the root window lives on the screen window. This one uses the coordinate system of the screen window. In most cases the root window will have the same geometry as the DMX screen window, and will occupy the same area of the back-end display. πŸ‘€ However β€” that would not be the case, for example, if automatic projector alignment is used. So don't assume, bestie.

⭐ RETURN VALUE ⭐

DMXGetScreenAttributes() returns True unless there is a protocol error. That's the whole thing πŸŽ€

⚠️ heads up: DMXGetScreenAttributes() can generate BadValue errors. Watch for those fr fr πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole page, periodt πŸ’… go read those SEE ALSOs, they're the friend group and they all slay together.

X Version 11 ✨ libdmx 1.1.5 β€” yeah, that's the version, that's the source, mwah 🫢 bye bestie, go call some functions πŸ‘‘