Storyboard Engine Public API
If you are writing your own plugin or working with a Storyboard RTExec or Storyboard Lite platform, you need to understand how Storyboard engine is initialized. If you are running on a system such as Linux or QNX you can disregard this information.
The engine in initialized in two steps:
-
The first step is to create the engine's application handle via the
gr_application_create_argsfunction. This function initializes the core framework and plugins and loads the UI model and verifies its integrity. -
When the UI model is loaded the main UI event loop can be started using the
gr_application_runfunction along with the application handle returned fromgr_application_create_args. Thegr_application_runfunction will not return until the application terminates. -
The Integration API is thread safe so it is possible to terminate the application, by calling
gr_application_quit, in another thread. In general, thegr_application_createandgr_application_runfunctions should be called from the same thread context since the initialization of some of the engineβs subsystems may create thread local data required for execution.
When the application terminates and returns from gr_application_run, the application handle should be released by calling gr_application_free. Once an application handle has been released it is no longer valid for use.
The engine provides execution tracing functionality through the gr_application_debug interface. This function takes an optional application handle and an integer command value. Additional arguments may be required based on the type of command and are documented within the <gre/gre.h> header. This function is most often used to provide additional diagnostics. For example invoking:
gr_application_debug(NULL, GR_DEBUG_CMD_VERBOSITY, GR_LOG_TRACE2);
will enable logging of all significant operations within the engine.
gr_app_log
The grapplog function provides an interface to integrate logging into user created threads and plugins.
gr_application_add_event_listener
The grapplicationaddeventlistener function provides an interface associate a callback/handler to associate with a Storyboard event.
gr_application_create
The grapplicationcreate function creates the application handle for the Storyboard Engine. The application handle can be used to further configure the engine or to start it's execution.
gr_application_create_args
The grapplicationcreate_args function creates the application handle for the Storyboard Engine. The application handle can be used to further configure the engine or to start it's execution.
gr_application_debug
The grapplicationdebug function provides an interface to some of the debugging and introspection facilities of the Storyboard Engine.
gr_application_free
The grapplicationfree Destroy and free an application handle. This
gr_application_get_data
The grapplicationget_data function provides an interface to get Storyboard data variables associated with a key, and their formats.
gr_application_get_data_variable
The grapplicationgetdatavariable function provides an interface to get Storyboard data variables associated with a key, and their formats. Combines the fqn and variable to create a key in the form of "fqn.variable". The returned grwrappeddatat must be freed with grapplicationfreedata.
gr_application_quit
The grapplicationquit function provides a method of asynchronously
gr_application_register_log_cb
The grapplicationregisterlogcb function will register a handler
gr_application_rem_event_listener
The grapplicationremeventlistener function provides an interface to free a user created grapplicationeventlistenert.
gr_application_run
The grapplicationrun function creates the application handle for the
gr_application_send_event
The grapplicationsend_event function provides an interface to inject an event into the application event queue.
gr_application_set_data
The grapplicationset_data function provides an interface to set a
gr_application_set_data_variable
The grapplicationsetdatavariable function provides an interface to set a Storyboard data variable. Combines the fqn and variable to create a key in the form of "fqn.variable". Copies the data into the corresponding data manager key, creating the key if needed.
gr_context_get_application
The grcontextget_application function is used to obtain the
gr_context_get_column
The grcontextget_column returns the column number of a table cell,
gr_context_get_control
The grcontextget_control function stores the fully qualified name of
gr_context_get_event_data
The grcontextgeteventdata function returns the data payload of the
gr_context_get_event_name
The grcontextgeteventname function returns the name of the event that the action is associated with.
gr_context_get_fqn
The grcontextget_fqn function stores the fully qualified name of the
gr_context_get_group
The grcontextget_group function stores the fully qualified name of
gr_context_get_layer
The grcontextget_layer function stores the fully qualified name of
gr_context_get_row
The grcontextget_row returns the row number of a table cell, if the action's context is a table cell.
gr_context_get_screen
The grcontextgetscreen function stores the fully qualified name of the screen in the buffer provided up to bufferlen characters.
gr_context_max_fqn
The grcontextmax_fqn function estimates the maximum length a fully qualified name contained in an action context.