XSetState(3)

πŸ¦‹ XSetState(3) β€” GC convenience routines πŸ¦‹

okay so this page is from the XLIB FUNCTIONS manual, and it's giving β€œfive little GC convenience routines that absolutely carry the group project.” bestie, if you've ever needed to poke at a GC without doing the whole entire thing, this is your moment. πŸ’…


✨ NAME ✨

  • XSetState, XSetFunction, XSetPlaneMask, XSetForeground, XSetBackground β€” GC convenience routines, periodt. πŸ’–

🌸 SYNTAX 🌸

       int XSetState(Display *display, GC gc, unsigned long foreground,
              unsigned long background, int function, unsigned long
              plane_mask);

       int XSetFunction(Display *display, GC gc, int function);

       int XSetPlaneMask(Display *display, GC gc, unsigned long plane_mask);

       int XSetForeground(Display *display, GC gc, unsigned long foreground);

       int XSetBackground(Display *display, GC gc, unsigned long background);

πŸŽ€ ARGUMENTS πŸŽ€

  • background β€” specifies the background you want to set for the specified GC. yes, the background. the vibe behind the vibe.
  • display β€” specifies the connection to the X server. your link to the server, iykyk.
  • foreground β€” specifies the foreground you want to set for the specified GC. the main-character color, lowkey.
  • function β€” specifies the function you want to set for the specified GC. yes, that function.
  • gc β€” specifies the GC. short, sweet, no notes.
  • plane_mask β€” specifies the plane mask. that's the whole description, bestie, we respect it.

πŸ’« DESCRIPTION πŸ’«

  • XSetState β€” sets the foreground, background, plane mask, and function components for the specified GC. iconic multitasking behavior. πŸ’…
  • XSetState can generate BadAlloc, BadGC, and BadValue errors. not the cute kind of drama. 😭
  • XSetFunction sets a specified value in the specified GC. simple, effective, slay.
  • XSetFunction can generate BadAlloc, BadGC, and BadValue errors.
  • XSetPlaneMask sets the plane mask in the specified GC.
  • XSetPlaneMask can generate BadAlloc and BadGC errors.
  • XSetForeground sets the foreground in the specified GC.
  • XSetForeground can generate BadAlloc and BadGC errors.
  • XSetBackground sets the background in the specified GC.
  • XSetBackground can generate BadAlloc and BadGC errors.

🫢 DIAGNOSTICS 🫢

  • BadAlloc β€” the server failed to allocate the requested resource or server memory. the server said β€œno ❀️” and honestly? rude.
  • BadGC β€” a value for a GContext argument does not name a defined GContext. bestie, that GC is not giving what you think it's giving.
  • BadValue β€” some numeric value falls outside the range of values accepted by the request. unless a specific range is specified for an argument, the full range defined by the argument's type is accepted. any argument defined as a set of alternatives can generate this error. so yeah, check your numbers before the server does it for you. πŸ’€

🌈 SEE ALSO 🌈


and that's the page, bestie πŸŽ€ big sign-off energy: this footer is serving X Version 11 and libX11 1.8.14 β€” the date line isn't in this one, so I'm absolutely not inventing one, no cap. XSetState(3) out. πŸ’œβœ¨

πŸ“¦ where this page comes from