Common Lisp Package: CLX-CURSOR

Library for loading cursor pixmaps from Xcur files and rendering it with Xrender. Library supports themes.

README:

FUNCTION

Public

ADD-CURSOR (DISPLAY DRAWABLE XCURSOR NAME)

Stores xcursor into cache. @var{drawable} must be window or pixmap. @var{name} must be keyword.

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.

LOAD-CURSOR-FROM-FILE (DISPLAY FILEPATH)

Reads Xcur file, and returns xcursor object. xcursor object can be used in @reffun{add-cursor}.

SET-THEME (DISPLAY &OPTIONAL (NAME XCURSOR.THEME) (SIZE XCURSOR.SIZE))

Sets current theme to name and size.

THEME (DISPLAY)

Returns current theme name and size.

XCURSOR-FILENAME (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-IMAGE-DATA (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-IMAGE-DELAY (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-IMAGE-HEIGHT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-IMAGE-WIDTH (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-IMAGE-XHOT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-IMAGE-YHOT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-IMAGES (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-LICENSE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-OTHER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

Undocumented

COPY-XCURSOR (INSTANCE)

COPY-XCURSOR-IMAGE (INSTANCE)

MAKE-XCURSOR (&KEY ((FILENAME DUM39) ) ((COPYRIGHT DUM40) ) ((LICENSE DUM41) ) ((OTHER DUM42) (LIST)) ((IMAGES DUM43) (MAKE-ARRAY '(0) ELEMENT-TYPE '(OR XCURSOR-IMAGE NULL) INITIAL-ELEMENT NIL ADJUSTABLE T FILL-POINTER 0)))

MAKE-XCURSOR-IMAGE (&KEY ((WIDTH DUM143) 0) ((HEIGHT DUM144) 0) ((XHOT DUM145) 0) ((YHOT DUM146) 0) ((DELAY DUM147) 0) ((DATA DUM148) NIL))

SETFXCURSOR-FILENAME (NEW-VALUE INSTANCE)

SETFXCURSOR-IMAGE-DATA (NEW-VALUE INSTANCE)

SETFXCURSOR-IMAGE-DELAY (NEW-VALUE INSTANCE)

SETFXCURSOR-IMAGE-HEIGHT (NEW-VALUE INSTANCE)

XCURSOR-IMAGE-P (OBJECT)

SETFXCURSOR-IMAGE-WIDTH (NEW-VALUE INSTANCE)

SETFXCURSOR-IMAGE-XHOT (NEW-VALUE INSTANCE)

SETFXCURSOR-IMAGE-YHOT (NEW-VALUE INSTANCE)

SETFXCURSOR-IMAGES (NEW-VALUE INSTANCE)

SETFXCURSOR-LICENSE (NEW-VALUE INSTANCE)

SETFXCURSOR-OTHER (NEW-VALUE INSTANCE)

XCURSOR-P (OBJECT)

Private

CACHE-CURSOR-ICONS (DISPLAY)

Caches cursor glyphs from current theme.

CLEAR-CURSOR-CACHE (DISPLAY)

Clears cursor cache.

CURSOR-KEYWORD-TO-NAME (KEYWORD-SYMBOL)

Converts keyword to string. Downcases characters, replaces - to _

CURSOR-NAME-TO-KEYWORD (CURSOR-NAME)

Converts string to keyword. Upcases characters, replaces _ to -

CURSOR-NAME-TO-SYMBOL (CURSOR-NAME)

Converts string to symbol. Upcases characters, replaces _ to -

DISPLAY-CURSOR-CACHE (DISPLAY)

Returns cursor cache for specified display.

FRIENDLY-GET-RESOURCE (DATABASE PATH &OPTIONAL DEFAULT)

Get resource value from @var{database} and @{path}. If value is not found, returns default.

GET-NEW-CURSOR (DRAWABLE XCURSOR)

Returns xlib:cursor object for xcursor object. If xcursor object does not contain specified width and height, returns standard cursor glyph. @var{drawable} must be window or pixmap.

GET-OLD-CURSOR (DRAWABLE NAME)

Returns x11 standard cursor glyph

GET-XLIB-CURSOR-OBJECT (DRAWABLE XCURSOR-IMAGE)

Returns xlib:cursor object for specified image. Uses Xrender for antialiasing cursor glyph.

KEYWORD-TO-SYMBOL (CURSOR-SYMBOL)

Converts keyword to symbol of current package.

READ-XCURSOR-CHUNK (STREAM)

Reads chunk.

READ-XCURSOR-COMMENT-CHUNK (STREAM HEADER TYPE)

Reads comment chunk from stream.

READ-XCURSOR-IMAGE-CHUNK (STREAM HEADER TYPE)

Reads image chunk from stream.

READ-XCURSOR-TOC-HEADER (STREAM)

Reads table of contents

RENDER-CREATE-ANIM-CURSOR (CURSORS DELAYS)

Create animated cursor. cursors length must be the same as delays length.

XCURSOR-CHUNK-HEADER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-CHUNK-SUBTYPE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-CHUNK-TYPE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-CHUNK-VERSION (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-COMMENT-CHUNK-HEADER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-COMMENT-CHUNK-LENGTH (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-COMMENT-CHUNK-STRING (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-COMMENT-CHUNK-SUBTYPE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-COMMENT-CHUNK-TYPE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-COMMENT-CHUNK-VERSION (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-HEADER-HEADER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-HEADER-MAGIC (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-HEADER-NTOC (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-HEADER-TC (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-HEADER-VERSION (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-IMAGE-CHUNK-DELAY (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-IMAGE-CHUNK-HEADER (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-IMAGE-CHUNK-HEIGHT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-IMAGE-CHUNK-PIXELS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-IMAGE-CHUNK-SUBTYPE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-IMAGE-CHUNK-TYPE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-IMAGE-CHUNK-VERSION (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-IMAGE-CHUNK-WIDTH (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-IMAGE-CHUNK-XHOT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-IMAGE-CHUNK-YHOT (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-TOC-HEADER-POSITION (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-TOC-HEADER-SUBTYPE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

XCURSOR-TOC-HEADER-TYPE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

Undocumented

COPY-XCURSOR-CHUNK (INSTANCE)

COPY-XCURSOR-COMMENT-CHUNK (INSTANCE)

COPY-XCURSOR-HEADER (INSTANCE)

COPY-XCURSOR-IMAGE-CHUNK (INSTANCE)

COPY-XCURSOR-TOC-HEADER (INSTANCE)

FIND-ARGB32-PICTURE-FORMAT (DISPLAY)

MAKE-XCURSOR-CHUNK (&KEY ((HEADER DUM310) 0) ((TYPE DUM311) 0) ((SUBTYPE DUM312) 0) ((VERSION DUM313) 0))

MAKE-XCURSOR-COMMENT-CHUNK (&KEY ((HEADER DUM364) 0) ((TYPE DUM365) 0) ((SUBTYPE DUM366) 0) ((VERSION DUM367) 0) ((LENGTH DUM368) 0) ((STRING DUM369) ))

MAKE-XCURSOR-HEADER (&KEY ((MAGIC DUM204) ) ((HEADER DUM205) 0) ((VERSION DUM206) 0) ((NTOC DUM207) 0) ((TC DUM208) (LIST)))

MAKE-XCURSOR-IMAGE-CHUNK (&KEY ((HEADER DUM427) 0) ((TYPE DUM428) 0) ((SUBTYPE DUM429) 0) ((VERSION DUM430) 0) ((WIDTH DUM431) 0) ((HEIGHT DUM432) 0) ((XHOT DUM433) 0) ((YHOT DUM434) 0) ((DELAY DUM435) 0) ((PIXELS DUM436) (MAKE-ARRAY '(1 1) ELEMENT-TYPE 'CARD32)))

MAKE-XCURSOR-TOC-HEADER (&KEY ((TYPE DUM261) 0) ((SUBTYPE DUM262) 0) ((POSITION DUM263) 0))

READ-ASCII (STREAM N)

READ-CARD32 (STREAM)

READ-REVERTED-CARD32 (STREAM)

SETFXCURSOR-CHUNK-HEADER (NEW-VALUE INSTANCE)

XCURSOR-CHUNK-P (OBJECT)

SETFXCURSOR-CHUNK-SUBTYPE (NEW-VALUE INSTANCE)

SETFXCURSOR-CHUNK-TYPE (NEW-VALUE INSTANCE)

SETFXCURSOR-CHUNK-VERSION (NEW-VALUE INSTANCE)

SETFXCURSOR-COMMENT-CHUNK-HEADER (NEW-VALUE INSTANCE)

SETFXCURSOR-COMMENT-CHUNK-LENGTH (NEW-VALUE INSTANCE)

XCURSOR-COMMENT-CHUNK-P (OBJECT)

SETFXCURSOR-COMMENT-CHUNK-STRING (NEW-VALUE INSTANCE)

SETFXCURSOR-COMMENT-CHUNK-SUBTYPE (NEW-VALUE INSTANCE)

SETFXCURSOR-COMMENT-CHUNK-TYPE (NEW-VALUE INSTANCE)

SETFXCURSOR-COMMENT-CHUNK-VERSION (NEW-VALUE INSTANCE)

SETFXCURSOR-HEADER-HEADER (NEW-VALUE INSTANCE)

SETFXCURSOR-HEADER-MAGIC (NEW-VALUE INSTANCE)

SETFXCURSOR-HEADER-NTOC (NEW-VALUE INSTANCE)

XCURSOR-HEADER-P (OBJECT)

SETFXCURSOR-HEADER-TC (NEW-VALUE INSTANCE)

SETFXCURSOR-HEADER-VERSION (NEW-VALUE INSTANCE)

SETFXCURSOR-IMAGE-CHUNK-DELAY (NEW-VALUE INSTANCE)

SETFXCURSOR-IMAGE-CHUNK-HEADER (NEW-VALUE INSTANCE)

SETFXCURSOR-IMAGE-CHUNK-HEIGHT (NEW-VALUE INSTANCE)

XCURSOR-IMAGE-CHUNK-P (OBJECT)

SETFXCURSOR-IMAGE-CHUNK-PIXELS (NEW-VALUE INSTANCE)

SETFXCURSOR-IMAGE-CHUNK-SUBTYPE (NEW-VALUE INSTANCE)

SETFXCURSOR-IMAGE-CHUNK-TYPE (NEW-VALUE INSTANCE)

SETFXCURSOR-IMAGE-CHUNK-VERSION (NEW-VALUE INSTANCE)

SETFXCURSOR-IMAGE-CHUNK-WIDTH (NEW-VALUE INSTANCE)

SETFXCURSOR-IMAGE-CHUNK-XHOT (NEW-VALUE INSTANCE)

SETFXCURSOR-IMAGE-CHUNK-YHOT (NEW-VALUE INSTANCE)

XCURSOR-TOC-HEADER-P (OBJECT)

SETFXCURSOR-TOC-HEADER-POSITION (NEW-VALUE INSTANCE)

SETFXCURSOR-TOC-HEADER-SUBTYPE (NEW-VALUE INSTANCE)

SETFXCURSOR-TOC-HEADER-TYPE (NEW-VALUE INSTANCE)

VARIABLE

Public

*ICON-PATHS*

Contains paths for themes.

Private

XCURSOR.SIZE

Contains default cursor size. Readed from Xresources.

XCURSOR.THEME

Contains default theme name. Readed from Xresources.

Undocumented

*CURSOR-NAMES*

ARROW

BASED-ARROW-DOWN

BASED-ARROW-UP

BOAT

BOGOSITY

BOTTOM-LEFT-CORNER

BOTTOM-RIGHT-CORNER

BOTTOM-SIDE

BOTTOM-TEE

BOX-SPIRAL

CENTER-PTR

CIRCLE

CLOCK

COFFEE-MUG

CROSS

CROSS-REVERSE

CROSSHAIR

CURSOR-FONT

DIAMOND-CROSS

DOT

DOTBOX

DOUBLE-ARROW

DRAFT-LARGE

DRAFT-SMALL

DRAPED-BOX

EXCHANGE

FLEUR

GOBBLER

GUMBY

HAND1

HAND2

HEART

ICON

IRON-CROSS

LEFT-PTR

LEFT-SIDE

LEFT-TEE

LEFTBUTTON

LL-ANGLE

LR-ANGLE

MAN

MIDDLEBUTTON

MOUSE

NUM-GLYPHS

PENCIL

PIRATE

PLUS

QUESTION-ARROW

RESOURCE-DB

RIGHT-PTR

RIGHT-SIDE

RIGHT-TEE

RIGHTBUTTON

SAILBOAT

SB-DOWN-ARROW

SB-H-DOUBLE-ARROW

SB-LEFT-ARROW

SB-RIGHT-ARROW

SB-UP-ARROW

SB-V-DOUBLE-ARROW

SHUTTLE

SIZING

SPIDER

SPRAYCAN

STAR

TARGET

TCROSS

TOP-LEFT-ARROW

TOP-LEFT-CORNER

TOP-RIGHT-CORNER

TOP-SIDE

TOP-TEE

TREK

UL-ANGLE

UMBRELLA

UR-ANGLE

WATCH

X-CURSOR

XTERM

CLASS

Public

XCURSOR

Structure contains xcursor information from Xcur file. Images slot is array of xcursor-images.

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).

Private

XCURSOR-CHUNK

Parent structure for chunks.

XCURSOR-COMMENT-CHUNK

Structure for comment chunks.

XCURSOR-HEADER

Main file header

XCURSOR-IMAGE-CHUNK

Structure for image chunks.

XCURSOR-TOC-HEADER

Table of contents