XRecolorCursor(3)

πŸ’– XRecolorCursor(3) β€” XLIB FUNCTIONS πŸ’–

okay bestie, welcome to the XRecolorCursor(3) page β€” manual name is XLIB FUNCTIONS. we're doing three cursor besties: recolor, free, and query-best-size. let's get into it πŸ’…


🌸 NAME 🌸

XRecolorCursor, XFreeCursor, XQueryBestCursor β€” manipulate cursors ✨


πŸ¦‹ SYNTAX πŸ¦‹

int XRecolorCursor(Display *display, Cursor cursor, XColor
              *foreground_color, XColor *background_color);

int XFreeCursor(Display *display, Cursor cursor);

Status XQueryBestCursor(Display *display, Drawable d, unsigned int
              width, unsigned int height, unsigned int *width_return, unsigned
              int *height_return);

πŸŽ€ ARGUMENTS πŸŽ€

  • background_color β€” specifies the RGB values for the background of the source.
  • cursor β€” specifies the cursor.
  • d β€” specifies the drawable, which indicates the screen.
  • display β€” specifies the connection to the X server.
  • foreground_color β€” specifies the RGB values for the foreground of the source.
  • width, height β€” specify the width and height of the cursor that you want the size information for.
  • width_return, height_return β€” return the best width and height that is closest to the specified width and height.

πŸ’… DESCRIPTION πŸ’…

okay so XRecolorCursor changes the color of the specified cursor, and if the cursor is being displayed on a screen, the change is visible immediately. ngl, the pixel members of the XColor structures are ignored; only the RGB values are used.

XRecolorCursor can generate a BadCursor error.

XFreeCursor deletes the association between the cursor resource ID and the specified cursor. the cursor storage is freed when no other resource references it. and bestie, the specified cursor ID should not be referred to again β€” like, do not touch it after this, fr fr.

XFreeCursor can generate a BadCursor error.

some displays allow larger cursors than other displays. XQueryBestCursor provides a way to find out what size cursors are actually possible on the display. it returns the largest size that can be displayed. applications should be prepared to use smaller cursors on displays that cannot support large ones. lowkey important, highkey practical πŸ’œ

XQueryBestCursor can generate a BadDrawable error.


🚨 DIAGNOSTICS 🚨

  • BadCursor β€” a value for a Cursor argument does not name a defined Cursor.
  • BadDrawable β€” a value for a Drawable argument does not name a defined Window or Pixmap.

🌈 SEE ALSO 🌈


byeee 🫢 footer check: X Version 11 Β· libX11 1.8.14 Β· XRecolorCursor(3) β€” date not shown here, bestie πŸ’… periodt ✨

πŸ“¦ where this page comes from