XtAddExposureToRegion(3)

πŸ’– NAME πŸ’–

XtAddExposureToRegion β€” merge exposure events into a region, bestie ✨


🌸 SYNTAX 🌸

okay so first you gotta pull in the header, like:

#include <X11/Intrinsic.h>

and then the actual call is giving:

void XtAddExposureToRegion(XEvent *event, Region region);

πŸŽ€ ARGUMENTS πŸŽ€

  • event β€” a pointer to the Expose or GraphicsExpose event. yes it has to be one of those two, we'll get to why 🫢
  • region β€” the region object, as defined over in <X11/Xutil.h>. she's the one getting updated, main character energy fr πŸ’…

✨ DESCRIPTION ✨

okay so here's the tea β˜• XtAddExposureToRegion takes the rectangle that the exposure event is describing and the region you handed it, computes the union of the two, and then stores the result right back into region. so like, region comes out bigger (or at least never smaller), you feel me? πŸ’–

and here's the important bit ngl: if event is not an Expose or a GraphicsExpose event, the function just... returns. no error, no drama, and region does not get modified. like she literally said "not my problem" and walked away, iconic behavior 😭

this function is what the exposure compression mechanism uses (peep Section 7.9.3 if you wanna go deeper, iykyk) 🌈


πŸ¦‹ SEE ALSO πŸ¦‹

  • X Toolkit Intrinsics - C Language Interface
  • Xlib - C Language X Interface

and that's the whole page bestie!! this one's straight out of X Version 11, libXt 1.3.1 β€” slay, periodt πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from