Documentation of the core library of GPAC
JSScene Interface Reference


Public Member Functions

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)
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)
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)

Data Fields

attribute boolean fullscreen
readonly DOMString current_path
attribute unsigned long volume
attribute unsigned long navigation
attribute unsigned long navigation_type
readonly attribute boolean hardware_yuv
readonly attribute boolean hardware_rgb
readonly attribute boolean hardware_rgba
readonly attribute boolean hardware_stretch
readonly attribute unsigned long screen_width
readonly attribute unsigned long screen_height
readonly attribute double fps
readonly attribute double sim_fps
readonly attribute boolean has_opengl
attribute DOMString caption
attribute boolean focus_highlight
readonly attribute unsigned long dpi_x
readonly attribute unsigned long dpi_y
attribute boolean sensors_active
readonly attribute double zoom
readonly attribute DOMString text_selection

Detailed Description

JSScene is the interface to compositor

Member Function Documentation

◆ get_option() [1/2]

DOMString JSScene::get_option ( DOMString  section,
DOMString  key 

see gf_opts_get_key

sectionthe section name
keythe key name
the key value

◆ get_option() [2/2]

* DOMString JSScene::get_option ( DOMString  section,
unsigned  key_idx 

see gf_opts_get_key_name

sectionthe section name
key_idxthe key index in the section
the key name

◆ set_option()

void JSScene::set_option ( DOMString  section,
DOMString  key,
optional DOMString  value = null 

see gf_opts_set_key

sectionthe section name
keythe key name
valuethe key value, null to remove the key

◆ set_size()

void JSScene::set_size ( unsigned long  width,
unsigned long  height 

set output window size

widthdesired width
heightdesired height

◆ exit()

void JSScene::exit ( )

post quit message

◆ set_3d()

void JSScene::set_3d ( Boolean  use_3d)

turns 3D rendering on/off

use_3dif true, uses 3D for all content, otherwise use 3D based on content type

◆ move_window()

void JSScene::move_window ( unsigned long  x,
unsigned long  y,
optional boolean  relative = false 

moves output window

xthe horizontal position or delta
ythe vertical position or delta
relativeif true, use relative (delta) positioning; otherwise use absolute

◆ set_event_filter()

void JSScene::set_event_filter ( GPACEventFilter  filter_event_func)

assigns event filter

filter_event_functhe filter event function to use, or null to deactivate event filtering

◆ set_focus() [1/2]

void JSScene::set_focus ( DOMString  focus)

moves focus

focus"next" for next element in focus ring, "prev" for previous

◆ set_focus() [2/2]

void JSScene::set_focus ( Node  elt)

sets focus on element

eltthe node on which focus should be set

◆ show_keyboard()

void JSScene::show_keyboard ( boolean  do_show)

show or hide virtual keyboard

do_showif true, show keyboard, otherwise hide it

◆ trigger_gc()

void JSScene::trigger_gc ( )

triggers JS garbage collection pass

◆ get_object_manager()

MediaObject JSScene::get_object_manager ( DOMString  url)

gets object manager for the given service URL loaded in the root scene of the compositor

urlurl of service for which the object manager is queried
the object manager, or null if not found

◆ switch_quality()

void JSScene::switch_quality ( boolean  up)

switches quality

upswitches quality up (true) or down (false)

◆ navigation_supported()

boolean JSScene::navigation_supported ( unsigned long  nav_type)

checks if navigation type is supported for the current content

nav_typethe navigation type to check
true if supported, false otherwise

◆ set_back_color()

void JSScene::set_back_color ( double  r,
double  g,
double  b,
double  a 

sets default back color of player

rred component between 0.0 and 1.0
ggreen component between 0.0 and 1.0
bblue component between 0.0 and 1.0
aalpha component between 0.0 and 1.0

Field Documentation

◆ fullscreen

attribute boolean JSScene::fullscreen

fullscreen status

◆ current_path

readonly DOMString JSScene::current_path

current working directory

◆ volume

attribute unsigned long JSScene::volume

audio output volume

◆ navigation

attribute unsigned long JSScene::navigation

navigation mode

◆ navigation_type

attribute unsigned long JSScene::navigation_type

checks if navigation is off, 2D or 3D mode

◆ hardware_yuv

readonly attribute boolean JSScene::hardware_yuv

true if display has hardware yuv 2D blit

◆ hardware_rgb

readonly attribute boolean JSScene::hardware_rgb

true if display has hardware rgb 2D blit

◆ hardware_rgba

readonly attribute boolean JSScene::hardware_rgba

true if display has hardware rgba 2D blit

◆ hardware_stretch

readonly attribute boolean JSScene::hardware_stretch

true if display has hardware stretch blit

◆ screen_width

readonly attribute unsigned long JSScene::screen_width

display width

◆ screen_height

readonly attribute unsigned long JSScene::screen_height

display height

◆ fps

readonly attribute double JSScene::fps

current output fps

◆ sim_fps

readonly attribute double JSScene::sim_fps

desired output fps for animations

◆ has_opengl

readonly attribute boolean JSScene::has_opengl

true if display has opengl support

◆ caption

attribute DOMString JSScene::caption

window title

◆ focus_highlight

attribute boolean JSScene::focus_highlight

enables or disable focus highlighting

◆ dpi_x

readonly attribute unsigned long JSScene::dpi_x

screen horizontal dpi

◆ dpi_y

readonly attribute unsigned long JSScene::dpi_y

screen vertical dpi

◆ sensors_active

attribute boolean JSScene::sensors_active

sensor active state (gyroscope)

◆ zoom

readonly attribute double JSScene::zoom

compositor zoom factor

◆ text_selection

readonly attribute DOMString JSScene::text_selection

current text selection