Class: Clutter::Script
- Inherits:
-
Object
- Object
- Clutter::Script
- Defined in:
- (unknown)
Overview
The Clutter::ScriptClass structure contains only private data
Instance Method Summary collapse
-
#add_search_paths(paths, n_paths) ⇒ nil
Adds paths to the list of search paths held by script.
-
#add_states(name, state) ⇒ nil
Associates a Clutter::State to the #ClutterScript instance using the given name.
-
#connect_signals(user_data) ⇒ nil
Connects all the signals defined into a UI definition file to their handlers.
-
#connect_signals_full(func, user_data) ⇒ nil
Connects all the signals defined into a UI definition file to their handlers.
-
#ensure_objects ⇒ nil
Ensure that every object defined inside script is correctly constructed.
-
#filename ⇒ String
The path of the currently parsed file.
-
#filename=(filename) ⇒ String
The path of the currently parsed file.
-
#filename_set=(filename_set) ⇒ Boolean
Whether the Clutter::Script:filename property is set.
-
#filename_set? ⇒ Boolean
Whether the Clutter::Script:filename property is set.
-
#get_object(name) ⇒ GObject::Object
Retrieves the object bound to name.
-
#get_objects(first_name, array) ⇒ Integer
Retrieves a list of objects for the given names.
-
#get_states(name) ⇒ Clutter::State
Retrieves the Clutter::State for the given state_name.
-
#get_type_from_name(type_name) ⇒ GLib::Type
Looks up a type by name, using the virtual function that Clutter::Script has for that purpose.
-
#initialize ⇒ Clutter::Script
constructor
Creates a new Clutter::Script instance.
-
#list_objects ⇒ GLib::List<GObject::Object>
Retrieves all the objects created by script.
-
#load_from_data(data, length) ⇒ Integer
Loads the definitions from data into script and merges with the currently loaded ones, if any.
-
#load_from_file(filename) ⇒ Integer
Loads the definitions from filename into script and merges with the currently loaded ones, if any.
-
#load_from_resource(resource_path) ⇒ Integer
Loads the definitions from a resource file into script and merges with the currently loaded ones, if any.
-
#lookup_filename(filename) ⇒ String
Looks up filename inside the search paths of script.
-
#translation_domain ⇒ String
The translation domain, used to localize strings marked as translatable inside a UI definition.
-
#translation_domain=(translation_domain) ⇒ String
The translation domain, used to localize strings marked as translatable inside a UI definition.
-
#unmerge_objects(merge_id) ⇒ nil
Unmerges the objects identified by merge_id.
Constructor Details
#initialize ⇒ Clutter::Script
Creates a new Clutter::Script instance. #ClutterScript can be used to load objects definitions for scenegraph elements, like actors, or behavioural elements, like behaviours and timelines. The definitions must be encoded using the JavaScript Object Notation (JSON) language.
Instance Method Details
#add_search_paths(paths, n_paths) ⇒ nil
Adds paths to the list of search paths held by script.
The search paths are used by clutter_script_lookup_filename(), which can be used to define search paths for the textures source file name or other custom, file-based properties.
#add_states(name, state) ⇒ nil
Associates a Clutter::State to the #ClutterScript instance using the given name.
The Clutter::Script instance will use state to resolve target states when connecting signal handlers.
The Clutter::Script instance will take a reference on the #ClutterState passed to this function.
#connect_signals(user_data) ⇒ nil
Connects all the signals defined into a UI definition file to their handlers.
This method invokes clutter_script_connect_signals_full() internally and uses #GModule's introspective features (by opening the current module's scope) to look at the application's symbol table.
Note that this function will not work if #GModule is not supported by the platform Clutter is running on.
#connect_signals_full(func, user_data) ⇒ nil
Connects all the signals defined into a UI definition file to their handlers.
This function allows to control how the signal handlers are going to be connected to their respective signals. It is meant primarily for language bindings to allow resolving the function names using the native API, but it can also be used on platforms that do not support GModule.
Applications should use clutter_script_connect_signals().
#ensure_objects ⇒ nil
Ensure that every object defined inside script is correctly constructed. You should rarely need to use this function.
#filename ⇒ String
The path of the currently parsed file. If Clutter::Script:filename-set is false then the value of this property is undefined.
#filename=(filename) ⇒ String
The path of the currently parsed file. If Clutter::Script:filename-set is false then the value of this property is undefined.
#filename_set=(filename_set) ⇒ Boolean
Whether the Clutter::Script:filename property is set. If this property is true then the currently parsed data comes from a file, and the file name is stored inside the Clutter::Script:filename property.
#filename_set? ⇒ Boolean
Whether the Clutter::Script:filename property is set. If this property is true then the currently parsed data comes from a file, and the file name is stored inside the Clutter::Script:filename property.
#get_object(name) ⇒ GObject::Object
Retrieves the object bound to name. This function does not increment the reference count of the returned object.
#get_objects(first_name, array) ⇒ Integer
Retrieves a list of objects for the given names. After script, object names/return location pairs should be listed, with a nil pointer ending the list, like:
|[ GObject *my_label, *a_button, *main_timeline;
clutter_script_get_objects (script, "my-label", &my_label, "a-button", &a_button, "main-timeline", &main_timeline, NULL); ]|
Note: This function does not increment the reference count of the returned objects.
#get_states(name) ⇒ Clutter::State
Retrieves the Clutter::State for the given state_name.
If name is nil, this function will return the default Clutter::State instance.
#get_type_from_name(type_name) ⇒ GLib::Type
Looks up a type by name, using the virtual function that Clutter::Script has for that purpose. This function should rarely be used.
#list_objects ⇒ GLib::List<GObject::Object>
Retrieves all the objects created by script.
Note: this function does not increment the reference count of the objects it returns.
#load_from_data(data, length) ⇒ Integer
Loads the definitions from data into script and merges with the currently loaded ones, if any.
#load_from_file(filename) ⇒ Integer
Loads the definitions from filename into script and merges with the currently loaded ones, if any.
#load_from_resource(resource_path) ⇒ Integer
Loads the definitions from a resource file into script and merges with the currently loaded ones, if any.
#lookup_filename(filename) ⇒ String
Looks up filename inside the search paths of script. If filename is found, its full path will be returned .
#translation_domain ⇒ String
The translation domain, used to localize strings marked as translatable inside a UI definition.
If Clutter::Script:translation-domain is set to nil, #ClutterScript will use gettext(), otherwise g_dgettext() will be used.
#translation_domain=(translation_domain) ⇒ String
The translation domain, used to localize strings marked as translatable inside a UI definition.
If Clutter::Script:translation-domain is set to nil, #ClutterScript will use gettext(), otherwise g_dgettext() will be used.
#unmerge_objects(merge_id) ⇒ nil
Unmerges the objects identified by merge_id.