clx-cursor

API Reference

clx-cursor

Pure Common Lisp library for antialiased cursor rendering for clx.

CLX-CURSOR

Library for loading cursor pixmaps from Xcur files and rendering it 
with Xrender. Library supports themes.
  • Function SET-THEME (display &optional (name xcursor.theme) (size xcursor.size))
    Sets current theme to name and size.
  • Function THEME (display)
    Returns current theme name and size.
  • Struct XCURSOR
    Structure contains xcursor information from Xcur file. Images slot is array of xcursor-images.
    FILENAME
    COPYRIGHT
    LICENSE
    OTHER
    IMAGES
  • Function COPY-XCURSOR (instance)
  • Function XCURSOR-P (object)
  • Function XCURSOR-FILENAME (instance)
  • Function (setf XCURSOR-FILENAME) (value instance)
  • Function XCURSOR-COPYRIGHT (instance)
  • Function (setf XCURSOR-COPYRIGHT) (value instance)
  • Function XCURSOR-LICENSE (instance)
  • Function (setf XCURSOR-LICENSE) (value instance)
  • Function XCURSOR-OTHER (instance)
  • Function (setf XCURSOR-OTHER) (value instance)
  • Function XCURSOR-IMAGES (instance)
  • Function (setf XCURSOR-IMAGES) (value instance)
  • Function MAKE-XCURSOR (&key ((filename filename) "") ((copyright copyright) "") ((license license) "") ((other other) (list)) ((images images) (make-array '(0) :element-type '(or xcursor-image null) :initial-element nil :adjustable t :fill-pointer 0)))
  • Struct XCURSOR-IMAGE
    Structure containg cursor glyph information. Data is 2 dimensional array with ARGB pixels. Data can be used in xlib:create-image :data parameter. Delay slot is used for animated cursors (milliseconds).
    WIDTH
    HEIGHT
    XHOT
    YHOT
    DELAY
    DATA
  • Function COPY-XCURSOR-IMAGE (instance)
  • Function XCURSOR-IMAGE-P (object)
  • Function XCURSOR-IMAGE-WIDTH (instance)
  • Function (setf XCURSOR-IMAGE-WIDTH) (value instance)
  • Function XCURSOR-IMAGE-HEIGHT (instance)
  • Function (setf XCURSOR-IMAGE-HEIGHT) (value instance)
  • Function XCURSOR-IMAGE-XHOT (instance)
  • Function (setf XCURSOR-IMAGE-XHOT) (value instance)
  • Function XCURSOR-IMAGE-YHOT (instance)
  • Function (setf XCURSOR-IMAGE-YHOT) (value instance)
  • Function XCURSOR-IMAGE-DELAY (instance)
  • Function (setf XCURSOR-IMAGE-DELAY) (value instance)
  • Function XCURSOR-IMAGE-DATA (instance)
  • Function (setf XCURSOR-IMAGE-DATA) (value instance)
  • Function MAKE-XCURSOR-IMAGE (&key ((width width) 0) ((height height) 0) ((xhot xhot) 0) ((yhot yhot) 0) ((delay delay) 0) ((data data) nil))
  • Function LOAD-CURSOR-FROM-FILE (display filepath)
    Reads Xcur file, and returns xcursor object. xcursor object can be used in @reffun{add-cursor}.
  • Variable *ICON-PATHS*
    (list (merge-pathnames ".icons/" (user-homedir-pathname)) #p"/usr/share/icons/"
          #p"/usr/share/pixmaps/")
    Contains paths for themes.
  • Function CURSOR (drawable name)
    Returns cursor object, which can be used with (xlib:window-cursor). If Xrender and theme icon file is available, tries to load cursor from that file, else load standard xlib cursor glyph. index.theme is not supported.
  • Function ADD-CURSOR (display drawable xcursor name)
    Stores xcursor into cache. @var{drawable} must be window or pixmap. @var{name} must be keyword.