SleelaDoc API
HTML documentation for the SLeeLa standard library (/lib)
Home › Packages › ballum

Package ballum

This package contains 24 source unit(s) defining 24 class(es) / struct(s). Each unit below lists its fields (the values it stores) and methods (the actions it performs), with a plain explanation of each.

01-screen-inspection #sleela 2.5 (lib/ballum/examples/01-screen-inspection.sleela)

BallumScreenInspection class

Methods — the actions this unit can perform.

MethodSignatureWhat it does
mainvoid main()No description in source.

02-safe-pixel #sleela 2.5 (lib/ballum/examples/02-safe-pixel.sleela)

BallumSafePixel class

Methods — the actions this unit can perform.

MethodSignatureWhat it does
inBoundsboolean inBounds(int x, int y, int w, int h)No description in source.
mainvoid main()No description in source.

03-display-controls #sleela 2.5 (lib/ballum/examples/03-display-controls.sleela)

BallumDisplayControls class

Methods — the actions this unit can perform.

MethodSignatureWhat it does
hasboolean has(int caps, int bit)No description in source.
mainvoid main()No description in source.

04-input-polling #sleela 2.5 (lib/ballum/examples/04-input-polling.sleela)

BallumInputPolling class

Methods — the actions this unit can perform.

MethodSignatureWhat it does
mainvoid main()No description in source.

05-headless-safe #sleela 2.5 (lib/ballum/examples/05-headless-safe.sleela)

BallumHeadlessSafe class

Methods — the actions this unit can perform.

MethodSignatureWhat it does
mainvoid main()No description in source.

ballum #sleela 2.5 (lib/ballum/ballum.sleela)

Ballum class

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
widthint width--- a single display's facts ---
heightint heightNo description in source.
capsint capsNo description in source.
handleint handle--- manager state --- VM-local bridge index; <0 means no bridge
lastStatusint lastStatusNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
initvoid init()No description in source.
nativeReadyboolean nativeReady()No description in source.
bindvoid bind(int h)No description in source.
hasboolean has(int cap)No description in source.
containsboolean contains(int x, int y)No description in source.
clampBrightnessint clampBrightness(int p)No description in source.
clampWarmthint clampWarmth(int k)No description in source.
statusTextString statusText(int code)No description in source.
setPixelint setPixel(int x, int y)No description in source.
setBrightnessint setBrightness(int percent)No description in source.
setWarmthint setWarmth(int kelvin)No description in source.
mainvoid main()No description in source.

ballum-live #sleela 2.5 (lib/ballum/ballum-live.sleela)

BallumLive class

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
capHasboolean capHas(int caps, int bit)No description in source.
mainvoid main()No description in source.

input-demo #sleela 2.5 (lib/ballum/input-demo.sleela)

InputDemo class

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
NONEstatic final int NONE = 0No description in source.
DOWNstatic final int DOWN = 1No description in source.
MOVEstatic final int MOVE = 2No description in source.
CLICKstatic final int CLICK = 3No description in source.
DRAG_BEGINstatic final int DRAG_BEGIN = 4No description in source.
DRAG_MOVEstatic final int DRAG_MOVE = 5No description in source.
DRAG_ENDstatic final int DRAG_END = 6No description in source.
dragThresholdint dragThresholdNo description in source.
pressedint pressedNo description in source.
draggingint draggingNo description in source.
downXint downXNo description in source.
downYint downYNo description in source.
curXint curXNo description in source.
curYint curYNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
initvoid init()No description in source.
absDiffint absDiff(int a, int b)No description in source.
foldint fold(int raw)No description in source.
nameString name(int g)No description in source.
mainvoid main()No description in source.

screen-demo #sleela 2.5 (lib/ballum/screen-demo.sleela)

ScreenDemo class

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
boundIdint boundIdNo description in source.
wint wNo description in source.
hint hNo description in source.
capsint capsNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
capHasboolean capHas(int bit)No description in source.
inBoundsboolean inBounds(int x, int y)No description in source.
statusTextString statusText(int code)No description in source.
openint open()Open the primary display and cache its facts.
plotint plot(int x, int y, int r, int g, int b)plot(x,y,...): one pixel-accurate write, validated before dispatch.
mainvoid main()No description in source.

session-demo #sleela 2.5 (lib/ballum/session-demo.sleela)

SessionDemo class

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
stateint staterun states (mirror SLBallumSession): 0 idle, 1 running, 2 frame, 3 exit
frameint frameNo description in source.
fadeFramesint fadeFramesNo description in source.
effectint effectNo description in source.
boundIdint boundIdNo description in source.
wint wNo description in source.
hint hNo description in source.
capsint capsNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
paramString param(String name, String fallback)No description in source.
strToIntint strToInt(String s, int fallback)No description in source.
capHasboolean capHas(int bit)No description in source.
startint start()No description in source.
paintWhitevoid paintWhite()fill the entire display white, pixel by pixel through the accurate bridge
escPressedvoid escPressed()one ESC press: running -> frame, frame -> exit
stepint step()step(): poll ESC, advance the logo fade one frame, return the run state
fadePercentint fadePercent()No description in source.
stateNameString stateName(int s)No description in source.
mainvoid main()No description in source.

SLBallumColor #sleela 2.5 (lib/ballum/SLBallumColor.sleela)

SLBallumColor class

An 8-bit RGBA color, mirroring ballum_color_t.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
rint rNo description in source.
gint gNo description in source.
bint bNo description in source.
aint aNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
clampChannelint clampChannel(int v)No description in source.
setRgbvoid setRgb(int red, int green, int blue)No description in source.
setRgbavoid setRgba(int red, int green, int blue, int alpha)No description in source.
redint red()No description in source.
greenint green()No description in source.
blueint blue()No description in source.
alphaint alpha()No description in source.
packedint packed()Pack to 0xAARRGGBB for a caller that wants a single int handle.

SLBallumDisplay #sleela 2.5 (lib/ballum/SLBallumDisplay.sleela)

SLBallumDisplay class

A connected display description, mirroring ballum_display_t.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
CAP_NONEstatic final int CAP_NONE = 0--- capability flags (mirror ballum_capability_t) ---
CAP_PER_PIXELstatic final int CAP_PER_PIXEL = 11 << 0
CAP_REGION_BLITstatic final int CAP_REGION_BLIT = 21 << 1
CAP_BRIGHTNESSstatic final int CAP_BRIGHTNESS = 41 << 2
CAP_COLOR_TEMPERATUREstatic final int CAP_COLOR_TEMPERATURE = 81 << 3
CAP_GAMMAstatic final int CAP_GAMMA = 161 << 4
idint idNo description in source.
nameString nameNo description in source.
widthint widthNo description in source.
heightint heightNo description in source.
refreshMilliHzint refreshMilliHzNo description in source.
primaryint primary1 if the primary display
capabilitiesint capabilitiesOR of CAP_* flags

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int displayId, String displayName, int w, int h)No description in source.
setCapabilitiesvoid setCapabilities(int caps)No description in source.
setPrimaryvoid setPrimary(boolean isPrimary)No description in source.
displayIdint displayId()No description in source.
displayNameString displayName()No description in source.
pixelWidthint pixelWidth()No description in source.
pixelHeightint pixelHeight()No description in source.
isPrimaryboolean isPrimary()No description in source.
hasboolean has(int cap)Capability queries a GUI checks before enabling a control.
supportsPerPixelboolean supportsPerPixel()No description in source.
supportsBlitboolean supportsBlit()No description in source.
supportsBrightnessboolean supportsBrightness()No description in source.
supportsColorTemperatureboolean supportsColorTemperature()No description in source.
supportsGammaboolean supportsGamma()No description in source.
containsboolean contains(int x, int y)Is (x, y) a valid pixel on this display?

SLBallumEffect #sleela 2.5 (lib/ballum/SLBallumEffect.sleela)

SLBallumEffect class

The catalog of Ballum transition effects a session uses to reveal a logo over a background across its fade timeline. Each effect id mirrors the native ballum_effects.h / ballum_fx_t set one-for-one; the native compositor (uiBallumLogoBlend) applies the chosen effect per frame. Effects are deliberately broad and fun: fades, wipes, iris, bars/blinds, dissolve, pixelate, slides, zoom, spotlight, ripple, checker, diamond, a radial clock wipe, and sparkle. Pick one with id() or byName(); a session passes the id to uiBallumLogoSetEffect before its fade. Family: ballum. Pure catalog; the compositing lives in native code.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
FADEstatic final int FADE = 0effect ids -- must match ballum_fx_t in ballum/include/.../ballum_effects.h
WIPE_LEFTstatic final int WIPE_LEFT = 1No description in source.
WIPE_RIGHTstatic final int WIPE_RIGHT = 2No description in source.
WIPE_UPstatic final int WIPE_UP = 3No description in source.
WIPE_DOWNstatic final int WIPE_DOWN = 4No description in source.
IRIS_INstatic final int IRIS_IN = 5No description in source.
IRIS_OUTstatic final int IRIS_OUT = 6No description in source.
BARSstatic final int BARS = 7No description in source.
BLINDSstatic final int BLINDS = 8No description in source.
DISSOLVEstatic final int DISSOLVE = 9No description in source.
PIXELATEstatic final int PIXELATE = 10No description in source.
SLIDE_LEFTstatic final int SLIDE_LEFT = 11No description in source.
SLIDE_UPstatic final int SLIDE_UP = 12No description in source.
ZOOMstatic final int ZOOM = 13No description in source.
SPOTLIGHTstatic final int SPOTLIGHT = 14No description in source.
RIPPLEstatic final int RIPPLE = 15No description in source.
CHECKERstatic final int CHECKER = 16No description in source.
DIAMONDstatic final int DIAMOND = 17No description in source.
CLOCKstatic final int CLOCK = 18No description in source.
SPARKLEstatic final int SPARKLE = 19No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
countint count()How many effects the native catalog advertises (authoritative).
nameString name(int fx)The lowercase name of an effect id (e.g. 5 -> "iris-in").
byNameint byName(String n)Resolve an effect id by name; unknown names resolve to FADE.
catalogString catalog()A newline-separated listing of every effect: "id name".

SLBallumInput #sleela 2.5 (lib/ballum/SLBallumInput.sleela)

SLBallumInput class

The Ballum touchscreen + mouse input listener (click, move, drag).

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
NONEstatic final int NONE = 0--- gesture codes ---
DOWNstatic final int DOWN = 1No description in source.
MOVEstatic final int MOVE = 2No description in source.
CLICKstatic final int CLICK = 3No description in source.
DRAG_BEGINstatic final int DRAG_BEGIN = 4No description in source.
DRAG_MOVEstatic final int DRAG_MOVE = 5No description in source.
DRAG_ENDstatic final int DRAG_END = 6No description in source.
RAW_NONEstatic final int RAW_NONE = 0--- raw native event types (ballum_event_type_t) ---
RAW_DOWNstatic final int RAW_DOWN = 1No description in source.
RAW_MOVEstatic final int RAW_MOVE = 2No description in source.
RAW_UPstatic final int RAW_UP = 3No description in source.
dragThresholdint dragThresholdMovement (in pixels) past which a press becomes a drag rather than a click.
pressedint pressedPressed-gesture state. 1 while a button/finger is down
draggingint dragging1 once movement crossed the threshold
downXint downXwhere the press started
downYint downYNo description in source.
curTypeint curTypeThe latched current event, for accessor reads after poll(). raw type of the last polled event
curXint curXNo description in source.
curYint curYNo description in source.
curButtonint curButtonNo description in source.
curSourceint curSource0 mouse, 1 touch
curContactint curContactNo description in source.
curModifiersint curModifiersNo description in source.
lastGestureint lastGesturethe gesture poll() last returned
KEY_NONEstatic final int KEY_NONE = 0--- key codes (ballum_key_t) ---
KEY_ENTERstatic final int KEY_ENTER = 13No description in source.
KEY_ESCstatic final int KEY_ESC = 27No description in source.
KEY_SPACEstatic final int KEY_SPACE = 32No description in source.
curKeyint curKeythe last key poll_key() returned (0 none)

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
setDragThresholdvoid setDragThreshold(int px)No description in source.
availableboolean available()Is a pointer-input backend available on this host?
hasKeyboardboolean hasKeyboard()Is a keyboard backend available on this host?
pollKeyint pollKey()pollKey(): dequeue one key, returning its code (0 none, 27 ESC, 13 ENTER, 32 SPACE, printable ASCII as itself). Fail closed: a host with no keyboard backend always returns KEY_NONE, never a false key.
keyint key()No description in source.
isEscapeboolean isEscape()No description in source.
absDiffint absDiff(int a, int b)|a - b| for the threshold test.
pollint poll()poll(): dequeue one raw event and fold it into the gesture state machine. Returns a gesture code (see the class header). Call repeatedly until it returns NONE to drain all input for this frame.
gestureint gesture()---- accessors for the latched event / gesture ----------------------
rawTypeint rawType()No description in source.
xint x()No description in source.
yint y()No description in source.
buttonint button()No description in source.
sourceint source()0 mouse, 1 touch
contactint contact()No description in source.
modifiersint modifiers()No description in source.
isTouchboolean isTouch()No description in source.
isMouseboolean isMouse()No description in source.
isPressedboolean isPressed()No description in source.
isDraggingboolean isDragging()No description in source.
pressXint pressX()The start point of the current press/drag.
pressYint pressY()No description in source.
snapshotSLBallumPointerEvent snapshot()Build an SLBallumPointerEvent snapshot of the latched raw event, for code that prefers a value object over the inline accessors.
gestureNameString gestureName(int g)No description in source.

SLBallumManager #sleela 2.5 (lib/ballum/SLBallumManager.sleela)

SLBallumManager class

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
STATE_NEWstatic final int STATE_NEW = 0No description in source.
STATE_BRIDGE_READYstatic final int STATE_BRIDGE_READY = 1No description in source.
STATE_ENUMERATEDstatic final int STATE_ENUMERATED = 2No description in source.
BRIGHTNESS_MINstatic final int BRIGHTNESS_MIN = 0Documented native ranges (mirror ballum_manager.h).
BRIGHTNESS_MAXstatic final int BRIGHTNESS_MAX = 100No description in source.
WARMTH_MIN_KELVINstatic final int WARMTH_MIN_KELVIN = 1000No description in source.
WARMTH_NEUTRAL_Kstatic final int WARMTH_NEUTRAL_K = 6500No description in source.
WARMTH_MAX_KELVINstatic final int WARMTH_MAX_KELVIN = 10000No description in source.
GAMMA_SCALEstatic final int GAMMA_SCALE = 100gamma 2.20 is encoded as 220
GAMMA_MINstatic final int GAMMA_MIN = 100.10
GAMMA_MAXstatic final int GAMMA_MAX = 100010.00
nativeHandleint nativeHandleVM-local bridge index, not a native pointer
stateint stateNo description in source.
lastStatusint lastStatusNo description in source.
displayCountint displayCountNo description in source.
statusSLBallumStatus statusNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
bindNativeHandleboolean bindNativeHandle(int handle)Bind the VM-side native handle (returned by the host bridge). A negative handle means the backend is unavailable on this host.
nativeReadyboolean nativeReady()No description in source.
handleint handle()No description in source.
managerStateint managerState()No description in source.
statusCodeint statusCode()No description in source.
statusTextString statusText()No description in source.
displaysint displays()No description in source.
clampBrightnessint clampBrightness(int percent)---- clamps (mirror ballum_clamp_*) --------------------------------
clampWarmthint clampWarmth(int kelvin)No description in source.
clampGammaint clampGamma(int gammaScaled)No description in source.
acceptEnumerateResultint acceptEnumerateResult(int statusCode, int count)---- enumeration ---------------------------------------------------- acceptEnumerateResult: the host bridge calls this with the native status and the display count after ballum_manager_enumerate runs.
requestSetPixelint requestSetPixel(SLBallumDisplay display, int x, int y, SLBallumColor color)---- per-pixel ------------------------------------------------------ requestSetPixel: validate against the display before asking the bridge. Returns OK when the request is well-formed and may be dispatched, else a failing status that the caller surfaces without touching the device.
requestGetPixelint requestGetPixel(SLBallumDisplay display, int x, int y)No description in source.
requestBlitint requestBlit(SLBallumDisplay display, int x, int y, int w, int h, int pixelCount)requestBlit: the rectangle must be inside the display and the pixel count must equal width*height.
requestBrightnessint requestBrightness(SLBallumDisplay display, int percent)---- whole-display controls ----------------------------------------- Each returns the value to hand the native layer (already clamped), via lastStatus = OK, or a failing status when unsupported / no bridge.
requestWarmthint requestWarmth(SLBallumDisplay display, int kelvin)No description in source.
requestGammaint requestGamma(SLBallumDisplay display, int gammaScaled)No description in source.
resetvoid reset()No description in source.
backendSupportedboolean backendSupported()1 if a real per-OS backend is compiled in, 0 if the fallback.
backendNameString backendName()No description in source.
enumerateint enumerate()Enumerate displays; records the count and marks the manager ENUMERATED.
displayIdAtint displayIdAt(int index)No description in source.
displayNameAtString displayNameAt(int index)No description in source.
displayWidthAtint displayWidthAt(int index)No description in source.
displayHeightAtint displayHeightAt(int index)No description in source.
displayPrimaryAtboolean displayPrimaryAt(int index)No description in source.
displayCapsAtint displayCapsAt(int index)No description in source.
setPixelint setPixel(int id, int x, int y, SLBallumColor color)Set a pixel's color on display `id`. Returns the native status.
getPixelPackedint getPixelPacked(int id, int x, int y)Read a pixel; returns packed 0xAARRGGBB, or -1 on failure.
setBrightnessint setBrightness(int id, int percent)Whole-display controls (clamped locally, then dispatched to native).
setWarmthint setWarmth(int id, int kelvin)No description in source.
setGammaint setGamma(int id, int gammaScaled)No description in source.

SLBallumPointerEvent #sleela 2.5 (lib/ballum/SLBallumPointerEvent.sleela)

SLBallumPointerEvent class

One Ballum pointer (mouse/touch) event, mirroring ballum_pointer_event_t.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
TYPE_NONEstatic final int TYPE_NONE = 0--- event type (mirror ballum_event_type_t) ---
TYPE_DOWNstatic final int TYPE_DOWN = 1No description in source.
TYPE_MOVEstatic final int TYPE_MOVE = 2No description in source.
TYPE_UPstatic final int TYPE_UP = 3No description in source.
BUTTON_NONEstatic final int BUTTON_NONE = 0--- button (mirror ballum_pointer_button_t) ---
BUTTON_LEFTstatic final int BUTTON_LEFT = 1No description in source.
BUTTON_MIDDLEstatic final int BUTTON_MIDDLE = 2No description in source.
BUTTON_RIGHTstatic final int BUTTON_RIGHT = 3No description in source.
SOURCE_MOUSEstatic final int SOURCE_MOUSE = 0--- source (mirror ballum_pointer_source_t) ---
SOURCE_TOUCHstatic final int SOURCE_TOUCH = 1No description in source.
MOD_SHIFTstatic final int MOD_SHIFT = 1--- modifier bits (mirror BALLUM_MOD_*) ---
MOD_CTRLstatic final int MOD_CTRL = 2No description in source.
MOD_ALTstatic final int MOD_ALT = 4No description in source.
MOD_SUPERstatic final int MOD_SUPER = 8No description in source.
typeint typeNo description in source.
xint xNo description in source.
yint yNo description in source.
buttonint buttonNo description in source.
sourceint sourceNo description in source.
contactIdint contactIdNo description in source.
modifiersint modifiersNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int evType, int px, int py, int evButton,No description in source.
eventTypeint eventType()No description in source.
posXint posX()No description in source.
posYint posY()No description in source.
pointerButtonint pointerButton()No description in source.
pointerSourceint pointerSource()No description in source.
touchContactint touchContact()No description in source.
modifierMaskint modifierMask()No description in source.
isDownboolean isDown()No description in source.
isMoveboolean isMove()No description in source.
isUpboolean isUp()No description in source.
isNoneboolean isNone()No description in source.
isTouchboolean isTouch()No description in source.
isMouseboolean isMouse()No description in source.
isLeftboolean isLeft()No description in source.
hasModifierboolean hasModifier(int bit)No description in source.
shiftboolean shift()No description in source.
ctrlboolean ctrl()No description in source.
altboolean alt()No description in source.

SLBallumScreen #sleela 2.5 (lib/ballum/SLBallumScreen.sleela)

SLBallumScreen class

The clean, pixel-accurate Screen API for Ballum developers.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
managerSLBallumManager managerthe low-level bridge-boundary driver
statusSLBallumStatus statusresult-code text
boundIndexint boundIndexenumerate() index of the bound display, or -1
boundIdint boundIdnative display id of the bound display, or -1
wint wcached width (pixels) of the bound display
hint hcached height (pixels) of the bound display
capsint capscached capability bitmask of the bound display
lastStatusint lastStatusthe status of the most recent operation

Methods — the actions this unit can perform.

MethodSignatureWhat it does
createvoid create()Prepare the Screen. Call open()/openIndex() before drawing.
attachboolean attach(int nativeHandle)Bind the native backend handle the host VM provides. A negative handle means no display backend is available on this host.
openint open()open(): enumerate displays and bind the primary one (or display 0 if no display is flagged primary). Returns the result code.
openIndexint openIndex(int index)openIndex(index): enumerate displays and bind the one at `index`.
isReadyboolean isReady()A Screen is ready to draw once a display is bound.
screenCountint screenCount()No description in source.
primaryIndexint primaryIndex()Index of the primary display among the enumerated set, or 0 as a safe default when none is flagged. Enumerates first if needed.
widthint width()Geometry + identity of the bound display.
heightint height()No description in source.
displayIdint displayId()No description in source.
nameString name()No description in source.
isPrimaryboolean isPrimary()No description in source.
capHasboolean capHas(int bit)Capability queries a developer checks before enabling a control. These read the advertised capability bitmask of the bound display (ballum_capability_t: 1 per-pixel, 2 blit, 4 brightness, 8 warmth, 16 gamma).
canPlotPixelsboolean canPlotPixels()No description in source.
canSetBrightnessboolean canSetBrightness()No description in source.
canSetWarmthboolean canSetWarmth()No description in source.
canSetGammaboolean canSetGamma()No description in source.
inBoundsboolean inBounds(int x, int y)Is (x, y) an exact, in-range pixel on the bound display? This is the accuracy gate every placement passes through.
rgbSLBallumColor rgb(int r, int g, int b)Build a color without needing to name SLBallumColor at the call site.
rgbaSLBallumColor rgba(int r, int g, int b, int a)No description in source.
plotint plot(int x, int y, SLBallumColor color)plot(x, y, color): set exactly one pixel. Validates readiness, capability, and bounds before the write, so the pixel lands precisely or a clear status is returned. Returns the result code (also in lastStatus).
plotRgbint plotRgb(int x, int y, int r, int g, int b)plotRgb: the common case, one call, no color object at the call site.
sampleint sample(int x, int y)sample(x, y): read a pixel back, returned packed as 0xAARRGGBB, or -1 if the read is out of bounds / unsupported. Lets a developer verify accuracy.
fillRectint fillRect(int x, int y, int rectW, int rectH, SLBallumColor color)fillRect(x, y, rectW, rectH, color): set every pixel in an exact rectangle, one accurate plot at a time. The rectangle must lie fully inside the display; otherwise OUT_OF_BOUNDS is returned and nothing is drawn. Returns the result code; stops and reports the first non-OK pixel.
brightnessint brightness(int percent)brightness(percent): 0..100.
warmthint warmth(int kelvin)warmth(kelvin): color temperature, 1000..10000K (6500 neutral; lower warmer).
gammaint gamma(int gammaScaled)gamma(gammaScaled): gamma encoded x100 (2.20 gamma == 220), 10..1000.
gammaPointint gammaPoint(int whole, int hundredths)gammaPoint(whole, hundredths): convenience for gamma(2, 20) == 2.20 gamma.
statusCodeint statusCode()No description in source.
okboolean ok()No description in source.
lastMessageString lastMessage()No description in source.

SLBallumScreenFit #sleela 2.5 (lib/ballum/SLBallumScreenFit.sleela)

SLBallumScreenFit class

SLBallumScreenFit — the screen-size bridge between the Ballum

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
screenWint screenWlast discovered primary-display size (0 until a fit* call succeeds)
screenHint screenHNo description in source.
gotRealint gotReal1 once a real screen size was obtained from the Ballum backend

Methods — the actions this unit can perform.

MethodSignatureWhat it does
createvoid create()No description in source.
discoverboolean discover()No description in source.
widthint width()The last discovered primary-display width (0 if none).
heightint height()The last discovered primary-display height (0 if none).
hasRealScreenboolean hasRealScreen()True if the last fit*/discover obtained a real screen size from the backend.
fitFrameboolean fitFrame(SLLayoutFrame frame, int x, int y)No description in source.

SLBallumSession #sleela 2.5 (lib/ballum/SLBallumSession.sleela)

SLBallumSession class

A full-screen Ballum session with an easy, one-call startup: a

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
IDLEstatic final int IDLE = 0---- session run states (returned by step()) --- not started yet
RUNNINGstatic final int RUNNING = 1fading the logo in / holding full screen
FRAMEstatic final int FRAME = 2first ESC: yielded full screen to a framed context
EXITstatic final int EXIT = 3second ESC (or requestExit): leaving the program
screenSLBallumScreen screenthe bound full-screen display
inputSLBallumInput inputkeyboard + pointer input (for ESC and the pointer exit fallback)
logoUrlString logoUrlstartup configuration (easy defaults; override before start())
logoPathString logoPathlocal file path to decode the logo from (empty = none; URL is for display)
effectint effecttransition effect id (SLBallumEffect.*); default FADE
fadeFramesint fadeFramesNo description in source.
displayIndexint displayIndexNo description in source.
bgRint bgRbackground is pure white by default, as an RGB triple
bgGint bgGNo description in source.
bgBint bgBNo description in source.
stateint statelive state
frameint framecurrent fade frame, 0..fadeFrames
paintedint painted1 once the white background has been painted
logoReadyint logoReady1 once a logo decoder supplied pixels (host-dependent)

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()Prepare a session with sensible, user-friendly defaults.
defaultLogoUrlString defaultLogoUrl()The default splash logo (the national bitcoin / ICC mark).
withLogoSLBallumSession withLogo(String url)No description in source.
withLogoFileSLBallumSession withLogoFile(String path)No description in source.
withEffectSLBallumSession withEffect(int fx)Choose a transition effect (SLBallumEffect.* -- FADE, IRIS_IN, SPARKLE...).
withFadeFramesSLBallumSession withFadeFrames(int frames)No description in source.
withDisplayIndexSLBallumSession withDisplayIndex(int index)No description in source.
withBackgroundSLBallumSession withBackground(int r, int g, int b)No description in source.
startint start()No description in source.
paintBackgroundvoid paintBackground()No description in source.
stepint step()No description in source.
handleInputvoid handleInput()No description in source.
escPressedvoid escPressed()Apply one ESC press to the state machine.
requestExitvoid requestExit()No description in source.
resumeint resume()Return a FRAME-mode session to full-screen running.
finishvoid finish()No description in source.
renderFadevoid renderFade()No description in source.
fadePercentint fadePercent()The current fade opacity as a percent 0..100.
isFullScreenboolean isFullScreen()---- queries --------------------------------------------------------
isRunningboolean isRunning()No description in source.
isFrameModeboolean isFrameMode()No description in source.
isExitingboolean isExiting()No description in source.
fadeCompleteboolean fadeComplete()No description in source.
logoPendingboolean logoPending()No description in source.
runStateint runState()No description in source.
currentFrameint currentFrame()No description in source.
screenWidthint screenWidth()No description in source.
screenHeightint screenHeight()No description in source.
logoString logo()No description in source.
stateNameString stateName(int s)No description in source.

SLBallumStatus #sleela 2.5 (lib/ballum/SLBallumStatus.sleela)

SLBallumStatus class

Ballum result/status codes, mirroring ballum_status_t.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
OKstatic final int OK = 0--- native ballum_status_t (same ordinals) ---
INVALID_ARGUMENTstatic final int INVALID_ARGUMENT = 1No description in source.
BACKEND_UNAVAILABLEstatic final int BACKEND_UNAVAILABLE = 2No description in source.
BACKEND_ERRORstatic final int BACKEND_ERROR = 3No description in source.
DISPLAY_NOT_FOUNDstatic final int DISPLAY_NOT_FOUND = 4No description in source.
OUT_OF_BOUNDSstatic final int OUT_OF_BOUNDS = 5No description in source.
BUFFER_TOO_SMALLstatic final int BUFFER_TOO_SMALL = 6No description in source.
UNSUPPORTEDstatic final int UNSUPPORTED = 7No description in source.
PERMISSION_DENIEDstatic final int PERMISSION_DENIED = 8No description in source.
NOT_INITIALIZEDstatic final int NOT_INITIALIZED = 9No description in source.
BRIDGE_REQUIREDstatic final int BRIDGE_REQUIRED = 100--- SLeeLa bridge-boundary code (no native equivalent) --- Returned before a host SLVM binding connects this facade to the native ballum_manager_* API.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
textString text(int code)No description in source.
okboolean ok(int code)No description in source.

SLLinuxBallumProfile #sleela 2.5 (lib/ballum/platforms/GNU/Linux/SLLinuxBallumProfile.sleela)

SLLinuxBallumProfile class

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
brandString brand()No description in source.
nameString name()No description in source.
backendNameString backendName()No description in source.
displayServerString displayServer()No description in source.
systemLibrariesString systemLibraries()No description in source.
supportsPerPixelboolean supportsPerPixel()No description in source.
supportsRegionBlitboolean supportsRegionBlit()No description in source.
supportsBrightnessboolean supportsBrightness()via CRTC gamma scaling
supportsColorTemperatureboolean supportsColorTemperature()via CRTC gamma ramp
supportsGammaboolean supportsGamma()No description in source.
supportsDdcBacklightboolean supportsDdcBacklight()DDC/CI backlight is hardware-dependent; advertised separately.

SLMacOSBallumProfile #sleela 2.5 (lib/ballum/platforms/Apple/macOS/SLMacOSBallumProfile.sleela)

SLMacOSBallumProfile class

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
brandString brand()No description in source.
nameString name()No description in source.
backendNameString backendName()No description in source.
displayServerString displayServer()No description in source.
systemLibrariesString systemLibraries()No description in source.
supportsPerPixelboolean supportsPerPixel()No description in source.
supportsRegionBlitboolean supportsRegionBlit()No description in source.
supportsBrightnessboolean supportsBrightness()via transfer formula
supportsColorTemperatureboolean supportsColorTemperature()via transfer formula
supportsGammaboolean supportsGamma()No description in source.
supportsDdcBacklightboolean supportsDdcBacklight()No description in source.

SLPackage #sleela 2.5 (lib/ballum/SLPackage.sleela)

SLPackage class

Defines the SLeeLa standard-library package for ballum.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
packageNameString packageNameNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String name)No description in source.
nameString name()No description in source.
availableboolean available()No description in source.

SLWindowsBallumProfile #sleela 2.5 (lib/ballum/platforms/Microsoft/Windows/SLWindowsBallumProfile.sleela)

SLWindowsBallumProfile class

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
brandString brand()No description in source.
nameString name()No description in source.
minimumVersionString minimumVersion()No description in source.
backendNameString backendName()No description in source.
displayServerString displayServer()No description in source.
systemLibrariesString systemLibraries()No description in source.
supportsPerPixelboolean supportsPerPixel()No description in source.
supportsRegionBlitboolean supportsRegionBlit()No description in source.
supportsBrightnessboolean supportsBrightness()via gamma ramp scaling
supportsColorTemperatureboolean supportsColorTemperature()via gamma ramp
supportsGammaboolean supportsGamma()No description in source.
supportsDdcBacklightboolean supportsDdcBacklight()No description in source.