(claim coords owner)
Marks (via metadata) the supplied set of coords
as being owned by owner
. If
coords
already has an owner (that is not equal to owner
), throws.
Marks (via metadata) the supplied set of `coords` as being owned by `owner`. If `coords` already has an owner (that is not equal to `owner`), throws.
(event? e)
Returns true if e
is an event, false otherwise.
Make new events with make-event
.
Returns true if `e` is an event, false otherwise. Make new events with [[make-event]].
(frame-maker c->e e->c)
Takes:
c->e
, a function mapping coordinates to eventse->c
, a function mapping events to coordinatesand returns a function that takes:
and returns instance of IFrame
.
Both c->e
and e->c
must accept three arguments:
ancestor-frame
IFrame
instanceTakes: - `c->e`, a function mapping coordinates to events - `e->c`, a function mapping events to coordinates and returns a function that takes: - a symbolic name - an ancestor frame - a dictionary of params and returns instance of [[IFrame]]. Both `c->e` and `e->c` must accept three arguments: - `ancestor-frame` - the [[IFrame]] instance - a map of parameters supplied to the returned function (possibly empty!).
(frame-owner coords)
Returns the owning IFrame
instance of the supplied coordinates coords
,
nil if there's no owner otherwise.
Returns the owning [[IFrame]] instance of the supplied coordinates `coords`, nil if there's no owner otherwise.
(frame? x)
Returns true if x
implements IFrame
, false otherwise.
Returns true if `x` implements [[IFrame]], false otherwise.
(ancestor-frame _)
Returns the ancestor IFrame
instance of this frame, or nil if there is
no ancestor.
Returns the ancestor [[IFrame]] instance of this frame, or nil if there is no ancestor.
(coords->event this coords)
Accepts a coordinate representation coords
of some event
and returns a
coordinate-free representation of the event.
coords
must be owned this this reference frame; [[coords->event]] will throw
if not.
Accepts a coordinate representation `coords` of some `event` and returns a coordinate-free representation of the event. `coords` must be owned this this reference frame; [[coords->event]] will throw if not.
(event->coords this event)
Accepts a reference frame and an event
, and returns this reference
frame's coordinate representation of the supplied event
.
Accepts a reference frame and an `event`, and returns this reference frame's coordinate representation of the supplied `event`.
(frame-name _)
Returns the symbolic name of the suppplied frame.
Returns the symbolic name of the suppplied frame.
(params _)
Returns the parameters registered with the supplied frame.
Returns the parameters registered with the supplied frame.
(make-event e)
Marks the input event e
as an event via its metadata. The return value will
return true
when passed to event?
.
Marks the input event `e` as an event via its metadata. The return value will return `true` when passed to [[event?]].
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close