Plugin Action Definitions

The following actions are only available when optional Storyboard plugins has been loaded.

gra.lua

Cause a Lua script function to execute.

Plugin

libgre-plugin-lua.so

Options:
script

The name of the Lua function to invoke

Additional arguments can be passed to the function by providing additional key/value pairs to the action. The key/value pairs are provided to the Lua function as values in the argument table.

For example to call the Lua function myfunction with an extra argument, firstargument, that corresponds to the value of the application variable myvar you would simply add a new entry to the parameter list.

The corresponding call to the Lua function would fill the entry into the argument table such that:

function myfunction(mapargs)
    print("The value is: " .. tostring(mapargs.firstargument))
end
                    

would print out the value of ${app:myvar}.

gra.animate

Start an animation.  Animations are started based on their name. Each animation can have an optional identifier (id) which is used to ensure that animations run in an exclusive manner. If an existing animation is running that uses the same identifier, then that animation is stopped before this animation is started. The data argument is as follows:

Plugin

libgre-plugin-animation.so

Options:
name

The animation name to start

id

An optional instance id to be associated with the animation. Animation identifiers can be used with different animations to ensure that only one animation of the set is running at a time.

When the animation stops it will emit a notification event in the form of gre.animate.complete.[name]

gra.animate.stop

Stop an animation.  If you stop an animation only by name then all running animations with that name will stop and emit a complete event. If you stop an anaimation by id then only that specific animation will stop and emit a complete event. The data argument is as follows:

Plugin

libgre-plugin-animation.so

Options:
name

The animation name to stop

id

An optional instance id associated with the name

When the animation stops it will emit a notification event in the form of gre.animate.complete.[name]

gra.audio

Start or stop the asynchronous playback of a WAV audio file. The data argument is as follows:

Plugin:

libgre-plugin-audio.so

Options:
filename

A filename to play, or empty to stop the current playback.

gra.greio

Send a new event over a Storyboard IO channel.

Plugin:

libgre-plugin-greio.so

Options:
name

Storyboard IO channel name to send the event to (required)

event

The name of the event to generate (required)

target

The target of the event to generate (optional)

format

The format of the event data (optional)

data

The data payload for the event

gra.perf_state

Control the capture of performance data

Plugin:

libgre-plugin-logger.so

Options:
state

Turn off (0) or on (1) performance data capture

In order for this action to be used, the libgre-plugin-logger.so must have been started with performance logging enabled, but not necessarily to have it start capturing the performance data. For example sbengine -ologger,perf=0 will enable perfomance logging but not start capturing events at startup while sbengine -ologging,perf=1 will enable performance logging and immediately start capturing events.

gra.redirect

Redirect all events to another Storyboard IO channel.

Plugin:

libgre-plugin-redirect.so

Options:
channel

Storyboard IO channel name to send the events to

gra.screen.path

Causes a screen transition to occur by fading the old screen into the new one.

Plugin:

libgre-plugin-screen-path.so

Options:
screen

The screen to transition to

rate

Defines how the alpha values will change

linear
easein
easeout
easeinout
bounce

fps

Number of frames per second

duration

Length of the transition in milliseconds

direction

The direction to transition from

left
right
top
bottom

layers

The layers to transition, all of the layers or just the layers that are different between source and destination.

all
delta

moving

The screen(s) to animate with the desired path transition.

both
new only
old only

gra.screen.scale

Causes a screen transition to occur by scaling the old screen into the new one.

Plugin:

libgre-plugin-screen-scale.so

Options:
screen

The screen to transition to

rate

Defines how the alpha values will change

linear
easein
easeout
easeinout
bounce

fps

Number of frames per second

duration

Length of the transition in milliseconds

layers

The layers to transition, all of the layers or just the layers that are different between source and destination.

all
delta

gra.screen.glswitch

Causes a screen transition to occur by using 3D to switch the old screen into the new one.

Plugin:

libgre-plugin-screen-3d.so

Options:
screen

The screen to transition to

rate

Defines how the alpha values will change

linear
easein
easeout
easeinout
bounce

fps

Number of frames per second

duration

Length of the transition in milliseconds

layers

The layers to transition, all of the layers or just the layers that are different between source and destination.

all
delta

gra.screen.glrotate

Causes a screen transition to occur by using 3D to rotate the old screen in the x-axis into the new one.

Plugin:

libgre-plugin-screen-3d.so

Options:
screen

The screen to transition to

rate

Defines how the alpha values will change

linear
easein
easeout
easeinout
bounce

fps

Number of frames per second

duration

Length of the transition in milliseconds

direction

The direction to transition from

left
right
top
bottom

layers

The layers to transition, all of the layers or just the layers that are different between source and destination.

all
delta

gra.screen.glflip

Causes a screen transition to occur by using 3D to switch the old screen into the new one.

Plugin:

libgre-plugin-screen-3d.so

Options:
screen

The screen to transition to

rate

Defines how the alpha values will change

linear
easein
easeout
easeinout
bounce

fps

Number of frames per second

duration

Length of the transition in milliseconds

layers

The layers to transition, all of the layers or just the layers that are different between source and destination.

all
delta

gra.screen.gldoors

Causes a screen transition to occur by using 3D to switch the old screen into the new one using a door opening animation.

Plugin:

libgre-plugin-screen-3d.so

Options:
screen

The screen to transition to

rate

Defines how the alpha values will change

linear
easein
easeout
easeinout
bounce

fps

Number of frames per second

duration

Length of the transition in milliseconds

direction

The direction to transition from

left
right
top
bottom

layers

The layers to transition, all of the layers or just the layers that are different between source and destination.

all
delta

gra.screen.gltip

Causes a screen transition to occur by using 3D to switch the old screen into the new one by tipping the display forward.

Plugin:

libgre-plugin-screen-3d.so

Options:
screen

The screen to transition to

rate

Defines how the alpha values will change

linear
easein
easeout
easeinout
bounce

fps

Number of frames per second

duration

Length of the transition in milliseconds

direction

The direction to transition from

left
right
top
bottom

layers

The layers to transition, all of the layers or just the layers that are different between source and destination.

all
delta

gra.screen.glcube

Causes a screen transition to occur by using 3D to switch the old screen into the new one using a cube animation.

Plugin:

libgre-plugin-screen-3d.so

Options:
screen

The screen to transition to

rate

Defines how the alpha values will change

linear
easein
easeout
easeinout
bounce

fps

Number of frames per second

duration

Length of the transition in milliseconds

direction

The direction to transition from

left
right
top
bottom

layers

The layers to transition, all of the layers or just the layers that are different between source and destination.

all
delta

gra.screendump

Dump the contents of the screen to an image file.

Plugin:

libgre-plugin-screen-dump.so

Options:
filename

The filename of the image file to create. The directory path to the filename must exist and the filename will be overwritten if it is. The filename must end with either a .bmp extension to generate BMP formatted images or .tga to generate TGA formatted images

gra.timer

Start, stop and control a timer.

Plugin:

libgre-plugin-timer.so

Options:
name

The name to use to identify this timer (required)

rtime

The time delay in milliseconds relative to the action invocation. One of rtime or atime values are required. Specify a value of 0 to stop an existing timer.

atime

The time delay in as an absolute value as a YY:MM:DD:HH:mm:ss:ms string format. One of rtime or atime values are required.

repeat

The number of milliseconds to delay after the timer first fires, used to provide a stable repeat timer. Specify 0 for a one shot timer.

count

The number of times that the timer should repeat before automatically stopping, assuming that the timer is not a one shot timer. Specify -1 to allow an unlimited number of repeat firings

One of rtime or atime must be specified and a value of 0 for rtime/atime and repeat indicates that the timer should stop firing.

For example, to start a timer that fires in 1s from the event and then every 500ms afterwards:

<action ... type="timer" data="name=MyTimer,rtime=1000,repeat=500" />

Then to stop the timer:

<action ... type="timer" data="name=MyTimer,rtime=0,repeat=0" />

An event will be generated each time that the timer fires and will be named timer.<name> so for the examples above, the event would be generated would be timer.MyTimer.