wiki:EasyGuiAuxiliaryTypes

Auxiliary Types

Fonts

(make-font &key family size style justification text-color background-color) [function]

Creates a font description that can be used in set-view-font. TODO: In addition to whatever else we support for family (string? int?) also allow keywords corresponding to meta font constants, e.g. :big-system-font :small-system-font :small-bold-system-font :view-system-font…)

(font-p object) [function]

Returns true if object is a font.

(same-font-p font1 font2) [function]

True if font1 and font2 are the same in all components. TODO: Or should we intern and let them use EQ?

(font-family font) [function]

Returns the font family.

(font-size font) [function]

Returns the font size.

(font-style font) [function]

Returns the font style.

(font-justification font) [function]

Returns the font text justification, one of :default, :center, :right or :left.

(font-text-color font) [function]

Returns the font foreground color.

(font-background-color font) [function]

Returns the font background color.

Colors

Note: This is explicit about it being RGB in order to allow extension to support other color spaces in the future.

(make-rgb-color &key red green blue alpha) [function]

Creates a color description for the specified values. TODO: Accept both floats 0.0-1.0 or ints 0-255?

(rgb-color-p object) [function]

Returns true if object is an rgb-color.

(same-color-p rgb-color1 rgb-color2) [function]

True if rgb-color1 and rgb-color2 are the same in all components.

(color-red rgb-color) [function]

Returns the red component of the color.

(color-green rgb-color) [function]

Returns the green component of the color.

(color-blue rgb-color) [function]

Returns the blue component of the color.

(color-alpha rgb-color) [function]

Returns the alpha component of the color.

Points

(point h v) [function]

Returns a point with horizontal coordinate h and vertical coordinate v. h and v can be any real numbers.

(point-p object) [function]

Returns true if object is a point.

(point-h point) [function]

Returns the horizontal coordinate of point.

(point-v point) [function]

Returns the vertical coordinate of point.

(point+ point1 point2) [function]

Returns a point with each coordinate being the sum of point1 and point2.

(point- point1 point2) [function]

Returns a point with each coordinate being the difference of point1 and point2.

(point<= point1 point2) [function]

Returns true if each coordinate of point1 is <= to corresponding coordinate of point2.

(point< point1 point2) [function]

Returns true if each coordinate of point1 is < corresponding coordinate of point2.

(point= point1 point2) [function]

Returns true if each coordinate of point1 is = to corresponding coordinate of point2.

Rectangles

(make-rect &key top left bottom right top-left bottom-right width height size) [function]

Returns a rectangle, specified by either top/left/bottom/right coordinates, or top/left/height/width coordinates, or the top-left/bottom-right points, or top-left/size points.

(rect-p object) [function]

Returns true if object is a rectangle.

(rect-top rect) [function]

Returns the top coordinate of rect.

(rect-left rect) [function]

Returns the left coordinate of rect.

(rect-bottom rect) [function]

Returns the bottom coordinate of rect.

(rect-right rect) [function]

Returns the top coordinate of rect.

(rect-width rect) [function]

Returns the width of rect.

(rect-height rect) [function]

Returns the height coordinate of rect.

(rect-top-left rect) [function]

Returns the top and left coordinates of rect as a point.

(rect-bottom-right rect) [function]

Returns the bottom and right coordinates of rect as a point.

(rect-size rect) [function]

Returns the width and height of rect as a point.

OSTypes

OSTypes are used as identifiers in many Carbon contexts. We do not introduce a special Common Lisp type to represent OSTypes. Instead, all functions that are documented as accepting an OSType will accept any of: a 32-bit integer, or a 4-character string (of 8-bit characters), or a keyword whose symbol-name is a 4-character string (of 8-bit characters).

(ostype-value ostype) [function]

Returns the integer value of ostype.

(ostype-string ostype) [function]

Returns the string value of ostype.

(ostype-keyword ostype) [function]

Returns the keyword value of ostype.