DMXChangeS...Attributes(3)

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

✨ DMXChangeS...Attributes(3) ✨

okay bestie, so this one's from the Library Functions Manual and it's literally called DMXChangeScreensAttributes πŸ’… let's get into it


πŸ’– NAME πŸ’–

DMXChangeScreensAttributes β€” change back-end screen attributes


🌸 SYNOPSIS 🌸

#include <X11/extensions/dmxext.h>

int DMXChangeScreensAttributes(Display *dpy,
                               int screen_count,
                               int *screens,
                               int mask_count,
                               unsigned int *masks,
                               DMXScreenAttributes *attr,
                               int *error_screen);

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically, DMXChangeScreensAttributes() is the glow-up function πŸ’… it changes the geometries and positions of the DMX screen and DMX root windows over on the back-end X servers. like, you're rearranging the whole vibe.

  • screen_count tells you how many screens are getting changed, periodt.
  • for each screen: the screen number goes in screens, an attribute mask goes in masks, and a DMXScreenAttributes structure goes in attr. three little slots, one per screen, no cap.

oh and if you want the full explanation of the DMXScreenAttributes structure? it's all in DMXGetScreenAttributes(3) β€” go read that one, bestie, it ate 🫢

🌈 the mask values 🌈

the values used to compute each entry in masks are these, exactly:

  • DMXScreenWindowWidth
  • DMXScreenWindowHeight
  • DMXScreenWindowXoffset
  • DMXScreenWindowYoffset
  • DMXRootWindowWidth
  • DMXRootWindowHeight
  • DMXRootWindowXoffset
  • DMXRootWindowYoffset
  • DMXRootWindowXorigin
  • DMXRootWindowYorigin

πŸŽ€ the mask_count shortcut πŸŽ€

ngl, in general mask_count should just be equal to screen_count. that's the standard, that's the moment.

but β€” as a little convenience β€” mask_count can be less than screen_count, and then the last entry in masks gets reused for all the remaining screens. it's giving "one mask, many screens" ✨ and it means you can make identical changes across several screens using just one mask. iconic behavior honestly.


πŸ”₯ RETURN VALUE πŸ”₯

on success, 0 is returned. slay. πŸŽ‰

otherwise, error_screen gets set to the value of the first screen in the list that caused the error, and a non-zero value comes back at you.

  • if screen_count or mask_count is less than 1, or if any of the attribute values are not within the appropriate bounding boxes β†’ DmxBadValue is returned πŸ’€
  • if a protocol error happens β†’ DmxBadReply is returned πŸ™ˆ
also, DMXChangeScreensAttributes() can generate BadLength (if the data you provided does not match the data implicitly required by the screen_count and mask_count values), BadValue (if the values in screens are not valid), and BadAlloc errors. so like... be careful out there πŸ’€

πŸ’œ SEE ALSO πŸ’œ


and that's the whole page, bestie!! 🫢 this one came to you from X Version 11, libdmx 1.1.5, and it lives in the Library Functions Manual as DMXChangeS...Attributes(3). mwah πŸ’‹ go change some screens, you main character πŸ‘‘