import"scenejs.idl";
|
| DOMString | get_option (DOMString section, DOMString key) |
| |
| *DOMString | get_option (DOMString section, unsigned key_idx) |
| |
| void | set_option (DOMString section, DOMString key, optional DOMString value=null) |
| |
| DOMString | get_arg (unsigned long idx) |
| |
| Array | enum_directory (DOMString dir, optional DOMString filter=null, optional DOMString filter=null, optional bool go_up=false) |
| |
| void | set_size (unsigned long width, unsigned long height) |
| |
| void | exit () |
| |
| void | set_3d (Boolean use_3d) |
| |
| void | move_window (unsigned long x, unsigned long y, optional boolean relative=false) |
| |
| void | set_event_filter (GPACEventFilter filter_event_func) |
| |
| void | set_focus (DOMString focus) |
| |
| void | set_focus (Node elt) |
| |
| DOMString | error_string (GF_Err e) |
| |
| void | show_keyboard (boolean do_show) |
| |
| void | trigger_gc () |
| |
| MediaObject | get_object_manager (DOMString url) |
| |
| void | switch_quality (boolean up) |
| |
| boolean | navigation_supported (unsigned long nav_type) |
| |
| void | set_back_color (double r, double g, double b, double a) |
| |
| Storage | new_storage (DOMString storage_name) |
| |
JSGPAC is the interface to compositor
◆ get_option() [1/2]
| DOMString JSGPAC::get_option |
( |
DOMString |
section, |
|
|
DOMString |
key |
|
) |
| |
see gf_opts_get_key
- Parameters
-
| section | the section name |
| key | the key name |
- Returns
- the key value
◆ get_option() [2/2]
| * DOMString JSGPAC::get_option |
( |
DOMString |
section, |
|
|
unsigned |
key_idx |
|
) |
| |
see gf_opts_get_key_name
- Parameters
-
| section | the section name |
| key_idx | the key index in the section |
- Returns
- the key name
◆ set_option()
| void JSGPAC::set_option |
( |
DOMString |
section, |
|
|
DOMString |
key, |
|
|
optional DOMString |
value = null |
|
) |
| |
see gf_opts_set_key
- Parameters
-
| section | the section name |
| key | the key name |
| value | the key value, null to remove the key |
◆ get_arg()
| DOMString JSGPAC::get_arg |
( |
unsigned long |
idx | ) |
|
get program argument by index
- Parameters
-
- Returns
- the argument
◆ enum_directory()
| Array JSGPAC::enum_directory |
( |
DOMString |
dir, |
|
|
optional DOMString |
filter = null, |
|
|
optional DOMString |
filter = null, |
|
|
optional bool |
go_up = false |
|
) |
| |
enumerate directories
- Parameters
-
| dir | the directory to enumerate |
| filter | the filter for file extensions. If "dir", only enumerate directories |
| go_up | if true, enumerate parent directory or root (/). |
- Returns
- array of FileInformation interface
◆ set_size()
| void JSGPAC::set_size |
( |
unsigned long |
width, |
|
|
unsigned long |
height |
|
) |
| |
set output window size
- Parameters
-
| width | desired width |
| height | desired height |
◆ exit()
◆ set_3d()
| void JSGPAC::set_3d |
( |
Boolean |
use_3d | ) |
|
turns 3D rendering on/off
- Parameters
-
| use_3d | if true, uses 3D for all content, otherwise use 3D based on content type |
◆ move_window()
| void JSGPAC::move_window |
( |
unsigned long |
x, |
|
|
unsigned long |
y, |
|
|
optional boolean |
relative = false |
|
) |
| |
moves output window
- Parameters
-
| x | the horizontal position or delta |
| y | the vertical position or delta |
| relative | if true, use relative (delta) positioning; otherwise use absolute |
◆ set_event_filter()
assigns event filter
- Parameters
-
| filter_event_func | the filter event function to use, or null to deactivate event filtering |
◆ set_focus() [1/2]
| void JSGPAC::set_focus |
( |
DOMString |
focus | ) |
|
moves focus
- Parameters
-
| focus | "next" for next element in focus ring, "prev" for previous |
◆ set_focus() [2/2]
| void JSGPAC::set_focus |
( |
Node |
elt | ) |
|
sets focus on element
- Parameters
-
| elt | the node on which focus should be set |
◆ error_string()
| DOMString JSGPAC::error_string |
( |
GF_Err |
e | ) |
|
gets string for error
- Parameters
-
- Returns
- the corresponding string
◆ show_keyboard()
| void JSGPAC::show_keyboard |
( |
boolean |
do_show | ) |
|
show or hide virtual keyboard
- Parameters
-
| do_show | if true, show keyboard, otherwise hide it |
◆ trigger_gc()
| void JSGPAC::trigger_gc |
( |
| ) |
|
triggers JS garbage collection pass
◆ get_object_manager()
| MediaObject JSGPAC::get_object_manager |
( |
DOMString |
url | ) |
|
gets object manager for the given service URL loaded in the root scene of the compositor
- Parameters
-
| url | url of service for which the object manager is queried |
- Returns
- the object manager, or null if not found
◆ switch_quality()
| void JSGPAC::switch_quality |
( |
boolean |
up | ) |
|
switches quality
- Parameters
-
| up | switches quality up (true) or down (false) |
◆ navigation_supported()
| boolean JSGPAC::navigation_supported |
( |
unsigned long |
nav_type | ) |
|
checks if navigation type is supported for the current content
- Parameters
-
| nav_type | the navigation type to check |
- Returns
- true if supported, false otherwise
◆ set_back_color()
| void JSGPAC::set_back_color |
( |
double |
r, |
|
|
double |
g, |
|
|
double |
b, |
|
|
double |
a |
|
) |
| |
sets default back color of player
- Parameters
-
| r | red component between 0.0 and 1.0 |
| g | green component between 0.0 and 1.0 |
| b | blue component between 0.0 and 1.0 |
| a | alpha component between 0.0 and 1.0 |
◆ new_storage()
| Storage JSGPAC::new_storage |
( |
DOMString |
storage_name | ) |
|
allocates a new storage
- Parameters
-
| storage_name | the storage name |
- Returns
- the storage object
◆ last_working_directory
| attribute DOMString JSGPAC::last_working_directory |
◆ batteryOn
| readonly attribute boolean JSGPAC::batteryOn |
indicates if running on battery or with power charge
◆ batteryCharging
| readonly attribute boolean JSGPAC::batteryCharging |
indicates if battery is charging
◆ batteryPercent
| readonly attribute unsigned long JSGPAC::batteryPercent |
battery percent (0 to 100)
◆ batteryLifeTime
| readonly attribute unsigned long JSGPAC::batteryLifeTime |
estimated battery lifetime - see gf_sys_get_battery_state
◆ batteryFullLifeTime
| readonly attribute unsigned long JSGPAC::batteryFullLifeTime |
estimated battery lifetime in full charge - see gf_sys_get_battery_state
◆ hostname
| readonly DOMString JSGPAC::hostname |
◆ fullscreen
| attribute boolean JSGPAC::fullscreen |
◆ current_path
| readonly DOMString JSGPAC::current_path |
current working directory
◆ volume
| attribute unsigned long JSGPAC::volume |
◆ navigation
| attribute unsigned long JSGPAC::navigation |
◆ navigation_type
| attribute unsigned long JSGPAC::navigation_type |
checks if navigation is off, 2D or 3D mode
◆ hardware_yuv
| readonly attribute boolean JSGPAC::hardware_yuv |
true if display has hardware yuv 2D blit
◆ hardware_rgb
| readonly attribute boolean JSGPAC::hardware_rgb |
true if display has hardware rgb 2D blit
◆ hardware_rgba
| readonly attribute boolean JSGPAC::hardware_rgba |
true if display has hardware rgba 2D blit
◆ hardware_stretch
| readonly attribute boolean JSGPAC::hardware_stretch |
true if display has hardware stretch blit
◆ screen_width
| readonly attribute unsigned long JSGPAC::screen_width |
◆ screen_height
| readonly attribute unsigned long JSGPAC::screen_height |
◆ http_max_bitrate
| attribute unsigned long JSGPAC::http_max_bitrate |
max capped HTTP download rate - used for DASH simulations mostly
◆ http_bitrate
| readonly attribute unsigned long JSGPAC::http_bitrate |
current http download rate averaged on all active resources
◆ fps
| readonly attribute double JSGPAC::fps |
◆ sim_fps
| readonly attribute double JSGPAC::sim_fps |
desired output fps for animations
◆ has_opengl
| readonly attribute boolean JSGPAC::has_opengl |
true if display has opengl support
◆ cpu
| readonly attribute double JSGPAC::cpu |
◆ nb_cores
| readonly attribute unsigned long JSGPAC::nb_cores |
◆ system_memory
| readonly attribute unsigned long JSGPAC::system_memory |
◆ memory
| readonly attribute unsigned long JSGPAC::memory |
◆ argc
| readonly attribute unsigned long JSGPAC::argc |
number of arguments of launch command
◆ caption
| attribute DOMString JSGPAC::caption |
◆ focus_highlight
| attribute boolean JSGPAC::focus_highlight |
enables or disable focus highlighting
◆ dpi_x
| readonly attribute unsigned long JSGPAC::dpi_x |
◆ dpi_y
| readonly attribute unsigned long JSGPAC::dpi_y |
◆ sensors_active
| attribute boolean JSGPAC::sensors_active |
sensor active state (gyroscope)
◆ zoom
| readonly attribute double JSGPAC::zoom |
◆ text_selection
| readonly attribute DOMString JSGPAC::text_selection |