Since: 2.4
enum CaptionInfoKey { "CAPTION_ONOFF_KEY", "CAPTION_MODE_KEY", "CAPTION_FONT_SIZE_KEY", "CAPTION_FONT_STYLE_KEY", "CAPTION_FONT_COLOR_KEY", "CAPTION_FONT_OPACITY_KEY", "CAPTION_BG_COLOR_KEY", "CAPTION_BG_OPACITY_KEY", "CAPTION_EDGE_TYPE_KEY", "CAPTION_EDGE_COLOR_KEY", "CAPTION_WINDOW_COLOR_KEY", "CAPTION_WINDOW_OPACITY_KEY" };
enum CaptionState { "CAPTION_OFF", "CAPTION_ON" };
These values may be returned for key CAPTION_ONOFF_KEY.
enum CaptionMode { "CAPTION_MODE_DEFAULT", "CAPTION_MODE_SERVICE1", "CAPTION_MODE_SERVICE2", "CAPTION_MODE_SERVICE3", "CAPTION_MODE_SERVICE4", "CAPTION_MODE_SERVICE5", "CAPTION_MODE_SERVICE6", "CAPTION_MODE_CC1", "CAPTION_MODE_CC2", "CAPTION_MODE_CC3", "CAPTION_MODE_CC4", "CAPTION_MODE_TEXT1", "CAPTION_MODE_TEXT2", "CAPTION_MODE_TEXT3", "CAPTION_MODE_TEXT4" };
These values may be returned for key CAPTION_MODE_KEY.
enum CaptionFontSize { "CAPTION_SIZE_DEFAULT", "CAPTION_SIZE_SMALL", "CAPTION_SIZE_STANDARD", "CAPTION_SIZE_LARGE", "CAPTION_SIZE_EXTRA_LARGE" };
These values may be returned for key CAPTION_FONT_SIZE_KEY.
enum CaptionFontStyle { "CAPTION_FONT_DEFAULT", "CAPTION_FONT_STYLE0", "CAPTION_FONT_STYLE1", "CAPTION_FONT_STYLE2", "CAPTION_FONT_STYLE3", "CAPTION_FONT_STYLE4", "CAPTION_FONT_STYLE5", "CAPTION_FONT_STYLE6", "CAPTION_FONT_STYLE7" };
These values may be returned for key CAPTION_FONT_STYLE_KEY.
enum CaptionColor { "CAPTION_COLOR_DEFAULT", "CAPTION_COLOR_WHITE", "CAPTION_COLOR_BLACK", "CAPTION_COLOR_RED", "CAPTION_COLOR_GREEN", "CAPTION_COLOR_BLUE", "CAPTION_COLOR_YELLOW", "CAPTION_COLOR_MAGENTA", "CAPTION_COLOR_CYAN" };
These values may be returned for keys CAPTION_FONT_COLOR_KEY, CAPTION_BG_COLOR_KEY, CAPTION_EDGE_COLOR_KEY and CAPTION_WINDOW_COLOR_KEY.
enum CaptionOpacity { "CAPTION_OPACITY_SOLID", "CAPTION_OPACITY_FLASHING", "CAPTION_OPACITY_TRANSLUCENT", "CAPTION_OPACITY_TRANSPARENT", "CAPTION_OPACITY_DEFAULT" };
These values may be returned for keys CAPTION_FONT_OPACITY_KEY, CAPTION_BG_OPACITY_KEY and CAPTION_WINDOW_OPACITY_KEY.
enum CaptionEdge { "CAPTION_EDGE_NONE", "CAPTION_EDGE_RAISED", "CAPTION_EDGE_DEPRESSED", "CAPTION_EDGE_UNIFORM", "CAPTION_EDGE_DROP_SHADOWED" };
These values may be returned for key CAPTION_EDGE_TYPE_KEY.
typedef (CaptionState or CaptionMode or CaptionFontSize or CaptionFontStyle or CaptionColor or CaptionOpacity or CaptionEdge) CaptionValue;
[NoInterfaceObject] interface TVInfoManagerObject { readonly attribute TVInfoManager tvinfo; };
Tizen implements TVInfoManagerObject;
There is a tizen.tvinfo object that allows accessing the functionality of the TVInfo API.
[NoInterfaceObject] interface TVInfoManager { CaptionValue getCaptionValue(CaptionInfoKey key) raises(WebAPIException); long addCaptionValueChangeListener(CaptionInfoKey key, CaptionValueChangeCallback callback) raises(WebAPIException); void removeCaptionValueChangeListener(long watchId) raises(WebAPIException); };
getCaptionValue
CaptionValue getCaptionValue(CaptionInfoKey key);
Parameters:
Return value:
Exceptions:
with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
with error type UnknownError in any other error case.
Code example:
console.log("Caption menu turned on: " + (tizen.tvinfo.getCaptionValue("CAPTION_ONOFF_KEY") === "CAPTION_ON"));
addCaptionValueChangeListener
long addCaptionValueChangeListener(CaptionInfoKey key, CaptionValueChangeCallback callback);
with error type InvalidValuesError, if any of the input parameters contain an invalid value.
var id = tizen.tvinfo.addCaptionValueChangeListener("CAPTION_ONOFF_KEY", function(value) { console.log("Caption menu state changed: " + value); });
removeCaptionValueChangeListener
void removeCaptionValueChangeListener(long watchId);
with error type UnknownError, in any other error case.
var id = tizen.tvinfo.addCaptionValueChangeListener("CAPTION_ONOFF_KEY", function() {}); tizen.tvinfo.removeCaptionValueChangeListener(id);
[Callback=FunctionOnly, NoInterfaceObject] interface CaptionValueChangeCallback { void onchanged(CaptionInfoKey key, CaptionValue value); };
onchanged
void onchanged(CaptionInfoKey key, CaptionValue value);
module TVInfo { enum CaptionInfoKey { "CAPTION_ONOFF_KEY", "CAPTION_MODE_KEY", "CAPTION_FONT_SIZE_KEY", "CAPTION_FONT_STYLE_KEY", "CAPTION_FONT_COLOR_KEY", "CAPTION_FONT_OPACITY_KEY", "CAPTION_BG_COLOR_KEY", "CAPTION_BG_OPACITY_KEY", "CAPTION_EDGE_TYPE_KEY", "CAPTION_EDGE_COLOR_KEY", "CAPTION_WINDOW_COLOR_KEY", "CAPTION_WINDOW_OPACITY_KEY" }; enum CaptionState { "CAPTION_OFF", "CAPTION_ON" }; enum CaptionMode { "CAPTION_MODE_DEFAULT", "CAPTION_MODE_SERVICE1", "CAPTION_MODE_SERVICE2", "CAPTION_MODE_SERVICE3", "CAPTION_MODE_SERVICE4", "CAPTION_MODE_SERVICE5", "CAPTION_MODE_SERVICE6", "CAPTION_MODE_CC1", "CAPTION_MODE_CC2", "CAPTION_MODE_CC3", "CAPTION_MODE_CC4", "CAPTION_MODE_TEXT1", "CAPTION_MODE_TEXT2", "CAPTION_MODE_TEXT3", "CAPTION_MODE_TEXT4" }; enum CaptionFontSize { "CAPTION_SIZE_DEFAULT", "CAPTION_SIZE_SMALL", "CAPTION_SIZE_STANDARD", "CAPTION_SIZE_LARGE", "CAPTION_SIZE_EXTRA_LARGE" }; enum CaptionFontStyle { "CAPTION_FONT_DEFAULT", "CAPTION_FONT_STYLE0", "CAPTION_FONT_STYLE1", "CAPTION_FONT_STYLE2", "CAPTION_FONT_STYLE3", "CAPTION_FONT_STYLE4", "CAPTION_FONT_STYLE5", "CAPTION_FONT_STYLE6", "CAPTION_FONT_STYLE7" }; enum CaptionColor { "CAPTION_COLOR_DEFAULT", "CAPTION_COLOR_WHITE", "CAPTION_COLOR_BLACK", "CAPTION_COLOR_RED", "CAPTION_COLOR_GREEN", "CAPTION_COLOR_BLUE", "CAPTION_COLOR_YELLOW", "CAPTION_COLOR_MAGENTA", "CAPTION_COLOR_CYAN" }; enum CaptionOpacity { "CAPTION_OPACITY_SOLID", "CAPTION_OPACITY_FLASHING", "CAPTION_OPACITY_TRANSLUCENT", "CAPTION_OPACITY_TRANSPARENT", "CAPTION_OPACITY_DEFAULT" }; enum CaptionEdge { "CAPTION_EDGE_NONE", "CAPTION_EDGE_RAISED", "CAPTION_EDGE_DEPRESSED", "CAPTION_EDGE_UNIFORM", "CAPTION_EDGE_DROP_SHADOWED" }; typedef (CaptionState or CaptionMode or CaptionFontSize or CaptionFontStyle or CaptionColor or CaptionOpacity or CaptionEdge) CaptionValue; [NoInterfaceObject] interface TVInfoManagerObject { readonly attribute TVInfoManager tvinfo; }; Tizen implements TVInfoManagerObject; [NoInterfaceObject] interface TVInfoManager { CaptionValue getCaptionValue(CaptionInfoKey key) raises(WebAPIException); long addCaptionValueChangeListener(CaptionInfoKey key, CaptionValueChangeCallback callback) raises(WebAPIException); void removeCaptionValueChangeListener(long watchId) raises(WebAPIException); }; [Callback=FunctionOnly, NoInterfaceObject] interface CaptionValueChangeCallback { void onchanged(CaptionInfoKey key, CaptionValue value); }; };