Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- + //! The TIMER_STATE enum is used to indicate the state of the recording timer.
- + //!
- + //! The
- + //! timer is off. There is not an active recording
- + //! @since 2.1.0
- + const TIMER_STATE_OFF = 0;
- +
- + //! The timer is stopped. The recording is active, with the timer stopped.
- + //! @since 2.1.0
- + const TIMER_STATE_STOPPED = 1;
- +
- + //! The timer is paused. The recording is active with the timer paused. This state
- + //! occurs when the timer is active, but has been stopped with the Auto-Pause
- + //! feature.
- + //! @since 2.1.0
- + const TIMER_STATE_PAUSED = 2;
- +
- + //! The timer is on. The recording is active and the timer is running.
- + //! @since 2.1.0
- + const TIMER_STATE_ON = 3;
- +
- + //! bearing is the direction from your current location or position to the
- + //! destination of navigation. This is dependent on your current location.
- + //! @since 1.2.10
- + //! @return [Number]
- + var bearing;
- +
- + //! bearingFromStart is the direction of desired track from start of navigation to
- + //! destination. This is only dependent on your location when the Course is set, and
- + //! it is not dependent on where you may have moved to.
- + //! @since 1.2.10
- + //! @return [Number]
- + var bearingFromStart;
- +
- + //! Distance to the destination
- + //! @since 1.2.10
- + //! @return [Number]
- + var distanceToDestination;
- +
- + //! Distance to the next point
- + //! @since 1.2.10
- + //! @return [Number]
- + var distanceToNextPoint;
- +
- + //! Elevation at the destination
- + //! @since 1.2.10
- + //! @return [Number]
- + var elevationAtDestination;
- +
- + //! Elevation at the next point
- + //! @since 1.2.10
- + //! @return [Number]
- + var elevationAtNextPoint;
- +
- + //! Index of the Front Bicycle Derailleur. Value from 1 to frontDerailleurMax.
- + //! @since 1.2.10
- + //! @return [Number]
- + var frontDerailleurIndex;
- +
- + //! Max index on the Front Bicycle Derailleur
- + //! @since 1.2.10
- + //! @return [Number]
- + var frontDerailleurMax;
- +
- + //! Gear size on the Front Bicycle Derailleur
- + //! @since 1.2.10
- + //! @return [Number]
- + var frontDerailleurSize;
- +
- + //! Name of the destination
- + //! @since 1.2.10
- + //! @return [Number]
- + var nameOfDestination;
- +
- + //! Name of the next point
- + //! @since 1.2.10
- + //! @return [Number]
- + var nameOfNextPoint;
- +
- + //! Distance to the nearest point on course
- + //! @since 1.2.10
- + //! @return [Number]
- + var offCourseDistance;
- +
- + //! Index of the Rear Bicycle Derailleur. Value from 1 to rearDerailleurMax.
- + //! @since 1.2.10
- + //! @return [Number]
- + var rearDerailleurIndex;
- +
- + //! Max index on the Rear Bicycle Derailleur
- + //! @since 1.2.10
- + //! @return [Number]
- + var rearDerailleurMax;
- +
- + //! Gear size on the Rear Bicycle Derailleur
- + //! @since 1.2.10
- + //! @return [Number]
- + var rearDerailleurSize;
- +
- + //! The recording timer state
- + //! @since 2.1.0
- + //! @return [Number]
- + var timerState;
- +
- + //! track is the direction of travel or track. If you are not moving then heading is
- + //! the direction the unit is pointing based on the compass sensor.
- + //! @since 1.2.10
- + //! @return [Number]
- + var track;
- +
- //! The ActivityMonitor module contains the interface for Activity Monitoring data.
- //! @since 1.0.0
- + //! @permission Steps
- module ActivityMonitor {
- + //! A class representing the active minutes recorded by the device
- + //! @since 2.1.0
- + class ActiveMinutes {
- + //! The total number of moderate activity minutes recorded by the device
- + //! @since 2.1.0
- + //! @return [Number]
- + var moderate;
- +
- + //! The total number of active minutes recorded by the device equal to the total
- + //! number of moderate minutes plus twice the total number of viborous minutes.
- + //! @since 2.1.0
- + //! @return [Number]
- + var total;
- +
- + //! The total number of vigorous activity minutes recorded by the device
- + //! @since 2.1.0
- + //! @return [Number]
- + var vigorous;
- +
- + }
- +
- class History {
- + //! Number of active mintues Contains the moderate, vigorous, and total accumulated
- + //! minutes for the day
- + //! @since 2.1.0
- + //! @return [ActiveMinutes]
- + var activeMinutes;
- +
- + //! The number of floors climbed
- + //! @since 2.1.0
- + //! @return [Number]
- + var floorsClimbed;
- +
- + //! Floor climb goal for the day
- + //! @since 2.1.0
- + //! @return [Number]
- + var floorsClimbedGoal;
- +
- + //! The number of floors descended
- + //! @since 2.1.0
- + //! @return [Number]
- + var floorsDescended;
- +
- class Info {
- + //! Number of active mintues for the current day Contains the moderate, vigorous,
- + //! and total accumulated minutes for the day
- + //! @since 2.1.0
- + //! @return [ActiveMinutes]
- + var activeMinutesDay;
- +
- + //! Number of active mintues for the current week Contains the moderate, vigorous,
- + //! and total accumulated minutes for the week
- + //! @since 2.1.0
- + //! @return [ActiveMinutes]
- + var activeMinutesWeek;
- +
- + //! Value of active mintues goal for the current week
- + //! @since 2.1.0
- + //! @return [Number]
- + var activeMinutesWeekGoal;
- +
- + //! The number of floors climbed
- + //! @since 2.1.0
- + //! @return [Number]
- + var floorsClimbed;
- +
- + //! The current floor climb goal
- + //! @since 2.1.0
- + //! @return [Number]
- + var floorsClimbedGoal;
- +
- + //! The number of floors descended
- + //! @since 2.1.0
- + //! @return [Number]
- + var floorsDescended;
- +
- + //! @deprecated Is the user in sleep mode?
- //! Is the user in sleep mode?
- //! @since 1.0.0
- //! @return [Boolean]
- var isSleepMode;
- + //! The number of meters climbed
- + //! @since 2.1.0
- + //! @return [Float]
- + var metersClimbed;
- +
- + //! The number of meters descended
- + //! @since 2.1.0
- + //! @return [Float]
- + var metersDescended;
- +
- + //! Used to create a new field. Field is updated in the FIT file by changing the the
- + //! value of the data within the Field.
- + //! @since 1.3.0
- + //! @param [String] name The name of the Field as a string. The maximum length may vary between products. At least 64 bytes are availalble.
- + //! @param [Number] fieldId The unique Field Identifier for the Field
- + //! @param [type] type The type definiton for the field from the DATA_TYPE_ enumeration
- + //! @param [Dictionary] options Optional parameters that can be specified for field creation @option [:count] The number of elements to add to the field if it is an array. @option [:mesgType] Optional. The message type that this field should be added to. Defaults to MESG_TYPE_RECORD if not provided. @option [:units] Optional. The display units as a String. This should use the current device language. The maximum length may vary between products. At least 16 bytes are availalble.
- + //! @return [Field] the resulting field object
- + function createField(name, fieldId, type, options) {}
- +
- //! After recording is complete, the discard() method will complete the session by
- //! discarding the recorded data.
- //! @since 1.0.0
- @@ -595,9 +802,16 @@
- //! Use createSession() to create a session object with options determined by the
- //! caller. Only one session object is allowed to exist at a time. If there is an
- //! existing object that has not been closed using the save() or discard() methods,
- - //! this method will return that object instead of creating a new one.
- + //! this method will return that object instead of creating a new one. On some
- + //! products running the 1.x SDK, creating a session object requires a large memory
- + //! allocation. To free this memory, the session must first be succesfully saved or
- + //! or discarded, and then app references to the session object should be set to
- + //! null.
- //! @since 1.0.0
- //! @param [Dictionary] options A Dictionary containing session creation options
- + //! @option [Object] :sport The primary sport being recorded (SPORT_GENERIC by default)
- + //! @option [Object] :subSport The sport subcategory being recorded (SUB_SPORT_GENERIC by default)
- + //! @option [String] :name Required. This is the name that will be associated with the sport being recorded. The suggested maximum length of the name is 15 characters (some devices support longer names).
- //! @return [Session] A new session object, or the existing session object if a session is active and has not been saved or discarded
- function createSession(options) {}
- @@ -750,6 +964,12 @@
- //! @since 1.0.0
- //! @param [enum] c Channel type specifier
- //! @param n Network
- + //! @option [Hash] [CHANNEL_TYPE_TX_NOT_RX] a customizable set of options
- + //! @option [Hash] [CHANNEL_TYPE_RX_NOT_TX] a customizable set of options
- + //! @option [Hash] [CHANNEL_TYPE_RX_ONLY] a customizable set of options
- + //! @option [Hash] [NETWORK_PUBLIC] a customizable set of options
- + //! @option [Hash] [NETWORK_PLUS] a customizable set of options
- + //! @option [Hash] [NETWORK_PRIVATE] a customizable set of options
- function initialize(c, n) {}
- //! See if background scanning is enabled for the channel assignment.
- @@ -850,6 +1070,16 @@
- //! Constructor for the device config object
- //! @since 1.2.0
- //! @param [Dictionary] options initialization options
- + //! @option [Hash] [:deviceNumber] a customizable set of options
- + //! @option [Hash] [:deviceType] a customizable set of options
- + //! @option [Hash] [:transmissionType] a customizable set of options
- + //! @option [Hash] [:messagePeriod] a customizable set of options
- + //! @option [Hash] [:radioFrequency] a customizable set of options
- + //! @option [Hash] [:searchTimeoutLowPriority] a customizable set of options
- + //! @option [Hash] [:searchTimeoutHighPriority] a customizable set of options
- + //! @option [Hash] [:searchThreshold] a customizable set of options
- + //! @option [Hash] [:networkKey64Bit] a customizable set of options
- + //! @option [Hash] [:networkKey128Bit] a customizable set of options
- function initialize(options) {}
- }
- @@ -962,6 +1192,16 @@
- //! The Application module contains the base class for every Connect IQ app.
- //! @since 1.0.0
- module Application {
- + //! The GOAL_TYPE enum defines the different goal types that can be triggered.
- + //! @since 1.3.0
- + const GOAL_TYPE_STEPS = 0;
- +
- + //! @since 1.3.0
- + const GOAL_TYPE_FLOORS_CLIMBED = 1;
- +
- + //! @since 1.3.0
- + const GOAL_TYPE_ACTIVE_MINUTES = 2;
- +
- //! AppBase is the base class for an app. All apps shall inherit from this class. It
- //! is used to manage the lifecycle of an app. For widgets and watch-apps, the
- //! functions are called in the following order: onStart(), getInitialView() and
- @@ -978,6 +1218,18 @@
- //! @param key The key to delete
- function deleteProperty(key) {}
- + //! Retrives the WatchUi.View for a goal that has triggered within a watchface. If a
- + //! goal is reached when a watchface is running, this function will be triggered.
- + //! The type of goal that was met will be provided, and the AppBase should return a
- + //! View that displays a goal reached message and/or animations for that goal. If a
- + //! View is returned from this function, the main watchface view will be shutdown,
- + //! and then new View will pushed. If this method is not overridden in the AppBase,
- + //! or if it returns null, the native goal screens will be shown.
- + //! @since 1.3.0
- + //! @param [Number] goalType The goal type that has triggered from. From the GOAL_TYPE_??? enumeration.
- + //! @return [Array] An array containing [ WatchUi.View ]
- + function getGoalView(goalType) {}
- +
- //! To retrieve the initial WatchUi.View and WatchUi.InputDelegate of the
- //! application, call getInitialView(). Providing a WatchUi.InputDelegate is
- //! optional for widgets and watch-apps. For watchfaces and datafields, an array
- @@ -1061,6 +1313,7 @@
- //! The Tone module allows for making pre-defined sounds. Not all devices support
- //! this API.
- //! @since 1.0.0
- + //! @apptype Data Field
- //! @apptype Widget
- //! @apptype App
- module Attention {
- + //! How the oauth token will be returned in the final step.
- + //! @since 1.3.0
- + const OAUTH_RESULT_TYPE_URL = 0;
- +
- + //! How the oauth request will be signed
- + //! @since 1.0.0
- + const OAUTH_SIGNING_METHOD_HMAC_SHA1 = 0;
- +
- + //! The expected response from making a web request
- + //! @since 1.3.0
- + const HTTP_RESPONSE_CONTENT_TYPE_JSON = 0;
- +
- + //! @since 1.3.0
- + const HTTP_RESPONSE_CONTENT_TYPE_URL_ENCODED = 1;
- +
- + //! Message types that can be registered to receive.
- + //!
- + //! data is of type OAuthMessage
- + //! @since 1.3.0
- + const MESSAGE_ID_OAUTH = 0;
- +
- + //! data is of type Message
- + //! @since 1.3.0
- + const MESSAGE_ID_PHONE_APP = 1;
- +
- + //! Base class for messages.
- + //! @since 1.3.0
- + class Message {
- + //! The message data. The type depends on the message being delivered.
- + //! @since 1.3.0
- + var data;
- +
- + }
- +
- + //! An OAuthMessage received by the callback registered in registerForMessage().
- + //! @since 1.3.0
- + class OAuthMessage extends Message {
- + //! HTTP response code (positive value) or a BLE error code (negative value)
- + //! @since 1.3.0
- + var responseCode;
- +
- + }
- +
- + //! Generate the value for the “Authorization” header in an OAuth 1.0a request. The
- + //! returned value can be set as the “Authorization” header for makeWebRequest().
- + //! @since 1.3.0
- + //! @param [String] url The request URL
- + //! @param [Dictionary] params The parameters of the request
- + //! @param [Number] requestMethod An HTTP_REQUEST_METHOD_* value
- + //! @param [Number] signatureMethod An OAUTH_SIGNING_METHOD_* value
- + //! @param [String] token The token given by the OAuth service. Can be null.
- + //! @param [String] tokenSecret The token secret given by the OAuth service. Used to sign the request.
- + //! @param [String] consumerKey The key that identifies your application
- + //! @param [String] consumerSecret The consumer secret that is used to sign the request.
- + //! @return [String] The value for the “Authorization” header.
- + function generateSignedOAuthHeader(url, params, requestMethod, signatureMethod, token, tokenSecret, consumerKey, consumerSecret) {}
- +
- //! @param [Dictionary] parameters Dictionary of keys and values, appended to the URL. Can be null.
- //! @param [Dictionary] options Additional image options
- //! @param [Method] responseCallback This is a callback in the format function responseCallback(responseCode, data); responseCode has the server response code, and data contains a WatchUi.BitmapResource if it was successful.
- + //! @option [Array] :palette The color palette to restrict the image dithering to. Using a smaller palette can reduce the size of the image data to speed up transfers.
- + //! @option [Number] :maxWidth The maximum width an image should be scaled to
- + //! @option [Number] :maxHeight The maximum height an image should be scaled to
- + //! @option [Number] :dithering The type of dithering to use when processing the image. Defaults to Floyd-Steinberg.
- function makeImageRequest(url, parameters, options, responseCallback) {}
- - //! To use Garmin Connect Mobile as a proxy to the web, use makeJsonRequest(). The
- - //! request is asynchronous; the responseCallback will be called when the request
- - //! returns.
- + //! @deprecated makeJsonRequest() class will be dropped in Connect IQ 3.1. Please use makeWebRequest().
- + //! makeJsonRequest() class will be dropped in Connect IQ 3.1. Please use
- + //! makeWebRequest().
- + //!
- + //! To use Garmin Connect Mobile as a proxy to the web, use
- + //! makeJsonRequest(). The request is asynchronous; the responseCallback will be
- + //! called when the request returns.
- //! @since 1.0.0
- //! @param [String] url The URL being requested
- - //! @param [Dictionary] parameters Dictionary of keys and values, appended to the URL as a GET request or set as the body for a POST request. Can be null.
- + //! @param [Dictionary] parameters Dictionary of keys and values, appended to the URL as a GET/DELETE request or set as the body for a POST/PUT request. These values must be URL encoded. Can be null.
- //! @param [Dictionary] options Dictionary of options. Can be null.
- //! @param [Method] responseCallback This is a callback in the format function responseCallback(responseCode, data); responseCode has the server response code, and data contains a Dictionary of content if the request was successful.
- + //! @option [Number] :method The HTTP method of the request. Should be a HTTP_REQUEST_METHOD_* value.
- + //! @option [Dictionary] :headers A Dictionary of HTTP headers to include in the request. The “Content-Type” header for the body of the request can be specified using a REQUEST_CONTENT_TYPE_* value. This is only valid for methods PUT and POST (you cannot set a body for a GET or DELETE request). If the content type is not specified, it will default to “application/x-www-form-urlencoded”.
- function makeJsonRequest(url, parameters, options, responseCallback) {}
- + //! Request an OAuth sign-in on Garmin Connect Mobile. A notification will trigger
- + //! on the phone, that when clicked, provides a webview that shows initialUrl. If
- + //! the user grants permission to the app the function given to
- + //! registerForOAuthMessages() will be called with a Dictionary of keys from the
- + //! OAuth process.
- + //! @since 1.3.0
- + //! @param [String] requestUrl The URL to load in the web view to begin authentication.
- + //! @param [Dictionary] requestParams A dictionary of non-URL encoded parameters for the initial url.
- + //! @param [String] resultUrl The URL of the final page of authentication that contains the resultKeys.
- + //! @param [Number] resultType What format the result will be in. Should be a OAUTH_RESULT_TYPE_XXX value.
- + //! @param [Dictionary] resultKeys A dictionary of the keys Garmin Connect Mobile will need to pull out of the OAuth response and given to the registered callback in registerForOAuthMessages().
- + function makeOAuthRequest(requestUrl, requestParams, resultUrl, resultType, resultKeys) {}
- +
- + //! To use Garmin Connect Mobile as a proxy to the web, use makeWebRequest(). The
- + //! request is asynchronous; the responseCallback will be called when the request
- + //! returns.
- + //! @since 1.3.0
- + //! @param [String] url The URL being requested
- + //! @param [Dictionary] parameters Dictionary of keys and values. These values should not be URL encoded. Can be null.
- + //! @param [Dictionary] options Dictionary of options. Can be null.
- + //! @param [Method] responseCallback This is a callback in the format function responseCallback(responseCode, data); responseCode has the server response code or a BLE_* error type, and data contains a Dictionary of content if the request was successful.
- + //! @option [Number] :method The HTTP method of the request. Should be a HTTP_REQUEST_METHOD_* value.
- + //! @option [Dictionary] :headers A Dictionary of HTTP headers to include in the request. The “Content-Type” header for the body of the request can be specified using a REQUEST_CONTENT_TYPE_* value. If the content type is not specified, it will default to “application/json” for POST and PUT requests. By default, GET and DELETE requests will have their parameters appended to the URL. Setting the method as GET or DELETE as well as a “Content-Type” header will result in the parameters being set in the body of the request and they will not be appended to the URL.
- + //! @option [Number] :responseType The format of the response. Should be a HTTP_RESPONSE_CONTENT_TYPE_* value. If not given, the system will attempt to first parse the response as JSON, then as URL ENCODED.
- + function makeWebRequest(url, parameters, options, responseCallback) {}
- +
- + //! Request that GCM issue a phone notification that will open a web page.
- + //! @since 1.3.0
- + //! @param [String] url The URL to open.
- + //! @param [Dictionary] params The request parameters. Parameters should not be URL encoded.
- + //! @param [Dictionary] options Additional options for the request. (TBD)
- + function openWebPage(url, params, options) {}
- +
- + //! Register a callback for receiving OAuth messages. The callback will be called
- + //! once for each received OAuth message. If there are messages waiting for the app
- + //! when this function is called, the callback will immediately be called once for
- + //! each waiting message.
- + //! @since 1.3.0
- + //! @param [Method] method The callback with the signature callback(data). data will be of type OAuthMessage
- + function registerForOAuthMessages(method) {}
- +
- + //! The FIT Contributor module will allow Apps and Data Fields to push data into FIT
- + //! files that are being recorded
- + //! @since 1.3.0
- + //! @permission FitContributor
- + //! @apptype Data Field
- + //! @apptype App
- + module FitContributor {
- + //! MESG_TYPE enum maps to the FIT Mesg types that are written to the activity
- + //! file.
- + //!
- + //! Mesg Type for Session Messages Written once per session at the end of
- + //! recording Used for data that pertains to the entire session (eg. Avg Speed)
- + //! @since 1.3.0
- + const MESG_TYPE_SESSION = 18;
- +
- + //! Mesg Type for Lap Messages Written once for every lap in the session Used for
- + //! data that pertains to each lap (eg. Avg Lap Speed)
- + //! @since 1.3.0
- + const MESG_TYPE_LAP = 19;
- +
- + //! Mesg Type for Record Messages Depending on device recording type written once a
- + //! second or when new data is available (Smart Recording). Never written faster
- + //! than once a second. Used for instantaneous values (eg. Current Speed)
- + //! @since 1.3.0
- + const MESG_TYPE_RECORD = 20;
- +
- + //! @since 1.3.0
- + const DATA_TYPE_SINT8 = 1;
- +
- + //! @since 1.3.0
- + const DATA_TYPE_UINT8 = 2;
- +
- + //! @since 1.3.0
- + const DATA_TYPE_SINT16 = 3;
- +
- + //! @since 1.3.0
- + const DATA_TYPE_UINT16 = 4;
- +
- + //! @since 1.3.0
- + const DATA_TYPE_SINT32 = 5;
- +
- + //! @since 1.3.0
- + const DATA_TYPE_UINT32 = 6;
- +
- + //! @since 1.3.0
- + const DATA_TYPE_STRING = 7;
- +
- + //! @since 1.3.0
- + const DATA_TYPE_FLOAT = 8;
- +
- + //! @since 1.3.0
- + const DATA_TYPE_DOUBLE = 9;
- +
- + //! @since 1.3.0
- + class Field {
- + //! Set data sets the data to be written out for this field. This function must be
- + //! called every time an update is to be recorded into the activity recording. If
- + //! this method is called before the a message is dropped into the activity, the
- + //! previous value specified will be lost. Do not for time sensitive data with sub
- + //! second granularity.
- + //! @since 1.3.0
- + function setData() {}
- +
- + }
- +
- + }
- +
- //! The Graphics module provides basic drawing functionality.
- //! @since 1.0.0
- module Graphics {
- - //! Extra tiny font
- + //! Extra tiny Connect IQ font
- //! @since 1.0.0
- const FONT_XTINY = 0;
- - //! Tiny font
- + //! Tiny Connect IQ font
- //! @since 1.0.0
- const FONT_TINY = 1;
- - //! Small font
- + //! Small Connect IQ font
- //! @since 1.0.0
- const FONT_SMALL = 2;
- - //! Medium font
- + //! Medium Connect IQ font
- //! @since 1.0.0
- const FONT_MEDIUM = 3;
- - //! Large font
- + //! Large Connect IQ font
- //! @since 1.0.0
- const FONT_LARGE = 4;
- - //! Normal size number only font
- + //! Normal size number only Connect IQ font
- //! @since 1.0.0
- const FONT_NUMBER_MILD = 5;
- - //! Medium size number only font
- + //! Medium size number only Connect IQ font
- //! @since 1.0.0
- const FONT_NUMBER_MEDIUM = 6;
- - //! Large size number only font
- + //! Large size number only Connect IQ font
- //! @since 1.0.0
- const FONT_NUMBER_HOT = 7;
- - //! Huge size number only font
- + //! Huge size number only Connect IQ font
- //! @since 1.0.0
- const FONT_NUMBER_THAI_HOT = 8;
- + //! Extra tiny system font
- + //! @since 1.3.0
- + const FONT_SYSTEM_XTINY = 9;
- +
- + //! Tiny system font
- + //! @since 1.3.0
- + const FONT_SYSTEM_TINY = 10;
- +
- + //! Small system font
- + //! @since 1.3.0
- + const FONT_SYSTEM_SMALL = 11;
- +
- + //! Medium system font
- + //! @since 1.3.0
- + const FONT_SYSTEM_MEDIUM = 12;
- +
- + //! Large system font
- + //! @since 1.3.0
- + const FONT_SYSTEM_LARGE = 13;
- +
- + //! Normal size number only system font
- + //! @since 1.3.0
- + const FONT_SYSTEM_NUMBER_MILD = 14;
- +
- + //! Medium size number only system font
- + //! @since 1.3.0
- + const FONT_SYSTEM_NUMBER_MEDIUM = 15;
- +
- + //! Large size number only system font
- + //! @since 1.3.0
- + const FONT_SYSTEM_NUMBER_HOT = 16;
- +
- + //! Huge size number only system font
- + //! @since 1.3.0
- + const FONT_SYSTEM_NUMBER_THAI_HOT = 17;
- +
- class Array {
- + //! Use add() to add an object to the end of an array. The array size is increased
- + //! by one and the parameter passed to add is inserted at the new index.
- + //! @since 1.3.0
- + //! @param [Object] object The object to be added to the end of the array
- + //! @return [Array] self
- + function add(object) {}
- +
- + //! Use addAll() to add an array of objects to the end of an array. The array is
- + //! expanded by the size of the provided array, and all of the elements are added to
- + //! the end of the array
- + //! @since 1.3.0
- + //! @param [Array] array The array of objects to be added to the end of the array
- + //! @return [Array] self
- + function addAll(array) {}
- +
- + //! Use indexOf to get the index of an object within the array.
- + //! @since 1.3.0
- + //! @param [Object] object The object to find the index of in the array
- + //! @return [Number] the index of the provided object in the array. If the object is not found -1 is returned.
- + function indexOf(object) {}
- +
- + //! Use remove() to remove an object from an array. If the passed object is found,
- + //! the array size is decreased by one and elements beyond it are shifted to the
- + //! next lower index. If the array has multiple matches, the match at the lowest
- + //! index will be removed
- + //! @since 1.3.0
- + //! @param [Object] object The object to be removed from the array
- + //! @return [Boolean] false if no instances of the object are found, otherwise true
- + function remove(object) {}
- +
- + //! Use removeAll() to add an object from an array. For each instance of the passed
- + //! object that is found, the array size is decreased by one and elements beyond it
- + //! are shifted to the next lower index. If the array has multiple matches, the
- + //! match at the lowest index will be removed
- + //! @since 1.3.0
- + //! @param [Object] object The object to remove all instances of from the array
- + //! @return [Boolean] false if no instances of the object are found, otherwise true
- + function removeAll(object) {}
- +
- + //! reverse() will return a new array that contains the elements of the source array
- + //! in reverse order.
- + //! @since 1.3.0
- + //! @return [Array] A new array with elements in reversed order
- + function reverse() {}
- +
- + //! slice() returns a new array with a copy of the specifed elements
- + //! @since 1.3.0
- + //! @param [Number] startIndex A zero-based index to the start of the new array. If a negative index is provided, it will offset from the end of the array. (-2 will start at the second to last element.) If startIndex is null, the slice will begin at 0. An out of bounds index will be truncated to the array limits.
- + //! @param [Number] endIndex A zero-based index to the end of the new array. Items are included up to, but not including endIndex. If a negative index is provided, it will offset from the end of the array. (-1 will end at the last element.) If endIndex is null, the the slice will end at the last element. An out of bounds index will be truncated to the array limits.
- + //! @return [Array] A new array containing the elements from startIndex to endIndex
- + function slice(startIndex, endIndex) {}
- +
- + //! Chars are unicode characters.
- + //! @since 1.3.0
- + class Char {
- + //! Convert the Char to lowercase with toLower().
- + //! @since 1.3.0
- + //! @return [Char] A new lowercase Char
- + function toLower() {}
- +
- + //! Convert the Char to a Number with toNumber().
- + //! @since 1.3.0
- + //! @return [Number] The sequence of bits of a Char interpreted as a Number
- + function toNumber() {}
- +
- + //! Use toString to convert an Char to a String.
- + //! @since 1.3.0
- + //! @return [String] The String representation of the Char
- + function toString() {}
- +
- + //! Convert the Char to uppercase with toUpper().
- + //! @since 1.3.0
- + //! @return [Char] A new uppercase Char
- + function toUpper() {}
- +
- + }
- +
- + //! Test if this instance is equal to another instance of an Object with equals().
- + //! @since 1.3.0
- + //! @param that That item to test against
- + //! @return [Boolean] true if the objects are equal, false otherwise
- + function equals(that) {}
- +
- + //! Test if this instance is equal to another instance of an Object with equals().
- + //! @since 1.3.0
- + //! @param that That item to test against
- + //! @return [Boolean] true if the objects are equal, false otherwise
- + function equals(that) {}
- +
- //! Invoke the method with invoke().
- //! @since 1.0.0
- + //! @param args parameters
- //! @return [Object] The return value from callback
- - function invoke() {}
- + function invoke(args) {}
- }
- + //! Convert the Number to a Char with toChar().
- + //! @since 1.3.0
- + //! @return [Char] A Char object
- + function toChar() {}
- +
- + //! Convert the String to an Array of Chars.
- + //! @since 1.3.0
- + //! @return [Array] A Char Array representation of the String, where each character in the String is an element in the Array
- + function toCharArray() {}
- +
- - //! If a string is in numeric form, either “123” or “0x12AB”, convert it to a Number
- - //! object with toNumber().
- + //! If a string is in a base 10 numeric form, e.g., “123” or “08”, convert it to a
- + //! Number object with toNumber().
- //! @since 1.0.0
- //! @return [Number] A Number object, or error
- function toNumber() {}
- + //! Convert a string to a number using the specified base.
- + //! @since 2.1.0
- + //! @param base The base of the input string. If the value of base is zero, the syntax expected is similar to that of integer constants, which includes: An optional sign character (+ or -), An optional, prefix for octal or hexadecimal (“0” or “0x”), and a sequence of digits in the prefixed base, or decimal if none was specified. If the base value is between 2 and 36, the format expected for the number is valid digits and/or letters that represent integers of the specified radix (from '0' to 'z'/'Z' for radix 36). The sequence may be optionally prefixed with “0x” if base is 16.
- + //! @return [Number] A Number object
- + function toNumberWithBase(base) {}
- +
- + //! Convert the String to an Array of bytes.
- + //! @since 1.3.0
- + //! @return [Array] An Array representation of the String, where each byte in the string is an element in the Array
- + function toUtf8Array() {}
- +
- + //! Use atan2() to get the arc tangent of y/x in radians.
- + //! @since 1.3.0
- + //! @param [Float] y The proportion of the y coordinate
- + //! @param [Float] x The proportion of the x coordinate
- + //! @return [Float] The principal arc tangent of y/x, in the interval [-PI..PI] radians., or NaN if invalid
- + function atan2(y, x) {}
- +
- + //! Use ceil() to compute the ceiling of a value.
- + //! @since 1.3.0
- + //! @param [Float] x A floating point value
- + //! @return [Float] The smallest integer greater than or equal to x
- + function ceil(x) {}
- +
- + //! Use floor() to compute the floor of a value.
- + //! @since 1.3.0
- + //! @param [Float] x A floating point value
- + //! @return [Float] The largest integer less or equal than x
- + function floor(x) {}
- +
- + //! Use round() to round a value.
- + //! @since 1.3.0
- + //! @param [Float] x A floating point value
- + //! @return [Float] The closest integer to x, with ties rounding up.
- + function round(x) {}
- +
- + //! Use toDegrees() to convert an angle from radians to degrees.
- + //! @since 1.3.0
- + //! @param [Float] x The angle in radians
- + //! @return [Float] The angle of x in degrees
- + function toDegrees(x) {}
- +
- + //! Use toRadians() to convert an angle from degrees to radians.
- + //! @since 1.3.0
- + //! @param [Float] x The angle in degrees
- + //! @return [Float] The angle of x in radians
- + function toRadians(x) {}
- +
- }
- //! Persisted locations allows the saving of a location (waypoint) to a device's
- @@ -2280,6 +2892,7 @@
- //! @since 1.0.2
- //! @param [Location] location Location object to persist
- //! @param [Dictionary] options Dictionary of options, or null to accept defaults
- + //! @option [Hash] :name a customizable set of options
- function persistLocation(location, options) {}
- }
- @@ -2399,6 +3012,9 @@
- //! Constructor: create a coordinate based off an options hash table
- //! @since 1.0.0
- //! @param [Dictionary] options Hash table of options
- + //! @option [Number] :latitude The latitude
- + //! @option [Number] :longitude The longitude
- + //! @option [Symbol] :format The format of lat/long (possible values are :degrees, :radians, or :semicircles)
- function initialize(options) {}
- //! Use toDegrees() to retrieve the coordinate back as an Array of degree values.
- @@ -2548,6 +3164,132 @@
- }
- + //! The SensorHistory module contains the interface for SensorHistory
- + //! @since 2.1.0
- + module SensorHistory {
- + //! The ORDER enum is used to select the data order of the iterator
- + //!
- + //! Request
- + //! iterator with newest data first
- + //! @since 2.1.0
- + const ORDER_NEWEST_FIRST = 0;
- +
- + //! Request iterator with oldest data first
- + //! @since 2.1.0
- + const ORDER_OLDEST_FIRST = 1;
- +
- + //! A class containing sensor data for a given period of time.
- + //! @since 2.1.0
- + class SensorHistoryIterator {
- + //! Get the maximium sensor sample contained in this iterator.
- + //! @since 2.1.0
- + //! @return [Number] the maximum sample
- + function getMax() {}
- +
- + //! Get the minimium sample contained in this iterator.
- + //! @since 2.1.0
- + //! @return [Number] the minimum sample
- + function getMin() {}
- +
- + //! Get the time of the newest sample in this iterator.
- + //! @since 2.1.0
- + //! @return [Moment] the time of the newest sample
- + function getNewestSampleTime() {}
- +
- + //! Get the time of the oldest sample in this iterator.
- + //! @since 2.1.0
- + //! @return [Moment] the time of the oldest sample
- + function getOldestSampleTime() {}
- +
- + //! Get the next entry in the iterator. This must be called to get the initial data
- + //! from the iterator.
- + //! @since 2.1.0
- + //! @return [SensorHistorySample] returns the next SensorHistorySample, or null if there are no more samples
- + function next() {}
- +
- + }
- +
- + //! A class containing sensor data at a given time.
- + //! @since 2.1.0
- + class SensorSample {
- + //! Sensor sample. Make sure to check for invalid samples, which will be null.
- + //! @since 2.1.0
- + //! @return [Number]
- + var data;
- +
- + //! @since 2.1.0
- + //! @return [Moment]
- + var when;
- +
- + }
- +
- + //! Retrieve the elevation history for the given period, up to the last power cycle.
- + //! This function always returns the most recent elevation samples. The time between
- + //! each SensorHistorySample in the iterator may be device dependent.
- + //! @since 2.1.0
- + //! @param [Dictionary] options Dictionary of options. Can be null.
- + //! @option [Number] /[Duration] :period If period is not provided, the entire available history is retrieved. If period is a Duration, then the history for the given Duration is retrieved. If period is a Number, then the last Number entries are retrieved.
- + //! @option [Boolean] :order If order is not provided, the samples will be newest first. Use the ORDER enumeration to explicitly select “newest first” or “oldest first”
- + //! @return [SensorHistory.SensorHistoryIterator] an iterator for the elevation history for the given period
- + function getElevationHistory(options) {}
- +
- + //! Retrieve the heart rate history for the given period, up to the last power
- + //! cycle. This function always returns the most recent heart rate samples. The time
- + //! between each SensorHistorySample in the iterator may be device dependent.
- + //! @since 2.1.0
- + //! @device fr235
- + //! @device fenix 3 HR
- + //! @param [Dictionary] options Dictionary of options. Can be null.
- + //! @option [Number] /[Duration] :period If period is not provided, the entire available history is retrieved. If period is a Duration, then the history for the given Duration is retrieved. If period is a Number, then the last Number entries are retrieved.
- + //! @option [Boolean] :order If order is not provided, the samples will be newest first. Use the ORDER enumeration to explicitly select “newest first” or “oldest first”
- + //! @return [SensorHistory.SensorHistoryIterator] an iterator for the heart rate history for the given period
- + function getHeartRateHistory(options) {}
- +
- + //! Retrieve the pressure history for the given period, up to the last power cycle.
- + //! This function always returns the most recent pressure samples. The time between
- + //! each SensorHistorySample in the iterator may be device dependent.
- + //! @since 2.1.0
- + //! @param [Dictionary] options Dictionary of options. Can be null.
- + //! @option [Number] /[Duration] :period If period is not provided, the entire available history is retrieved. If period is a Duration, then the history for the given Duration is retrieved. If period is a Number, then the last Number entries are retrieved.
- + //! @option [Boolean] :order If order is not provided, the samples will be newest first. Use the ORDER enumeration to explicitly select “newest first” or “oldest first”
- + //! @return [SensorHistory.SensorHistoryIterator] an iterator for the pressure history for the given period
- + function getPressureHistory(options) {}
- +
- + //! Retrieve the temperature history for the given period, up to the last power
- + //! cycle. This function always returns the most recent temperature samples. The
- + //! time between each SensorHistorySample in the iterator may be device dependent.
- + //! @since 2.1.0
- + //! @param [Dictionary] options Dictionary of options. Can be null.
- + //! @option [Number] /[Duration] :period If period is not provided, the entire available history is retrieved. If period is a Duration, then the history for the given Duration is retrieved. If period is a Number, then the last Number entries are retrieved.
- + //! @option [Boolean] :order If order is not provided, the samples will be newest first. Use the ORDER enumeration to explicitly select “newest first” or “oldest first”
- + //! @return [SensorHistory.SensorHistoryIterator] an iterator for the temperature history for the given period
- + function getTemperatureHistory(options) {}
- +
- + }
- +
- + //! The StringUtil module contains String utility functions
- + //! @since 1.3.0
- + module StringUtil {
- + //! Given an Array of Chars, return the String equivalent
- + //! @since 1.3.0
- + //! @param [Array] charArray Array of Chars
- + //! @return [String] String representation of the input Array
- + function charArrayToString(charArray) {}
- +
- + //! Encodes a string in base 64
- + //! @since 1.3.0
- + //! @param [String] string The string to encode
- + //! @return [String] A base 64 encoded String
- + function encodeBase64(string) {}
- +
- + //! Given an Array of UTF-8 bytes, return the String equivalent
- + //! @since 1.3.0
- + //! @param [Array] utf8Array Array of UTF-8 bytes
- + //! @return [String] String representation of the input Array
- + function utf8ArrayToString(utf8Array) {}
- +
- + }
- +
- //! The System module provides basic system calls.
- //! @since 1.0.0
- module System {
- @@ -2631,6 +3373,11 @@
- //! @return [Number]
- var distanceUnits;
- + //! True if “Do Not Disturb” mode is enabled on the device
- + //! @since 2.1.0
- + //! @return [Boolean]
- + var doNotDisturb;
- +
- //! UNIT_METRIC if elevation is shown in meters, UNIT_STATUTE if it is shown in feet
- //! @since 1.0.0
- //! @return [Number]
- @@ -2798,18 +3545,62 @@
- }
- module Test {
- - class Test {
- - //! Returns the value of attribute mPassed
- - var mPassed;
- + module toplevel {
- + //! Returns a new instance of AssertException
- + function initialize() {}
- - function getNumberOfTests() {}
- + }
- - function passed() {}
- + //! The Logger class provides output capabilities to tests
- + class Logger {
- + //! Write a debug string to the output stream. The String is prefixed with [DEBUG]
- + //! and time stamp
- + //! @param [String] str Output string
- + function debug(str) {}
- - function runTest() {}
- + //! Write an error string to the output stream. The String is prefixed with [ERROR]
- + //! and time stam;
- + //! @param [String] str Error string
- + function error(str) {}
- + //! Write a warning string to the output stream. The String is prefixed with
- + //! [WARNING] and time stamp
- + //! @param [String] str Output string
- + function warning(str) {}
- +
- }
- + //! Assert throws an exception if the test is false
- + //! @param [Boolean] test Expression to test for true.
- + function assert(test) {}
- +
- + //! Throws an exception if value1 and value2 are not equal
- + //! @option [Object] Value to test for equality
- + //! @option [Object] Value to test for equality
- + function assertEqual() {}
- +
- + //! Throws an exception if value1 and value2 are not equal
- + //! @option [Object] Value to test for equality
- + //! @option [Object] Value to test for equality
- + //! @option [String] the identifying message for the assert.
- + function assertEqualMessage() {}
- +
- + //! Assert throws an exception if the test is false
- + //! @param [Boolean] test Expression to test for true.
- + //! @option [String] the identifying message for the assert.
- + function assertMessage(test) {}
- +
- + //! Throws an exception if value1 and value2 are equal
- + //! @option [Object] Value to test for equality
- + //! @option [Object] Value to test for equality
- + function assertNotEqual() {}
- +
- + //! Throws an exception if value1 and value2 are equal
- + //! @option [Object] Value to test for equality
- + //! @option [Object] Value to test for equality
- + //! @option [String] the identifying message for the assert.
- + function assertNotEqualMessage() {}
- +
- }
- //! The Time module provides functionality for dealing with times and dates.
- @@ -2896,14 +3687,19 @@
- //! Create a Duration object from a hash of options using duration().
- //! @since 1.0.0
- //! @param [Dictionary] options Hash table of options
- + //! @option [Number] :years The number of years
- + //! @option [Number] :days The number of days
- + //! @option [Number] :hours The number of hours
- + //! @option [Number] :minutes The number of minutes
- + //! @option [Number] :seconds The number of seconds
- //! @return [Duration] The Duration object created using the options
- function duration(options) {}
- - //! Use info() to retrieve a Gregorian.Info for a date.
- + //! Use info() to retrieve a Gregorian.Info for a date converted to local time.
- //! @since 1.0.0
- //! @param [Moment] date Moment object to get Info from
- //! @param [Number] format Time FORMAT_XXX constant to use
- - //! @return [Info] For FORMAT_SHORT, all values in Info are integers. For FORMAT_MEDIUM and FORMAT_LONG, the month/day fields have the strings for the date in question.
- + //! @return [Info] For FORMAT_SHORT, all values in Info are integers. For FORMAT_MEDIUM and FORMAT_LONG, the month/day fields have the strings for the date in question. The time returned has been converted to local time.
- function info(date, format) {}
- //! Create a Moment object from a hash table of options with moment(). The Moment is
- @@ -2911,9 +3707,22 @@
- //! you pass in a :day value of 1 the returned Moment's day will be April 2.
- //! @since 1.0.0
- //! @param [Dictionary] options Hash table of options
- + //! @option [Number] :year The year
- + //! @option [Number] :month The month
- + //! @option [Number] :day The day
- + //! @option [Number] :hour The hour
- + //! @option [Number] :minute The minute
- + //! @option [Number] :second The second
- //! @return [Moment] The Moment object created using the options
- function moment(options) {}
- + //! Use utcInfo() to retrieve a Gregorian.Info for a date converted to UTC.
- + //! @since 2.0.0
- + //! @param [Moment] date Moment object to get Info from
- + //! @param [Number] format Time FORMAT_XXX constant to use
- + //! @return [Info] For FORMAT_SHORT, all values in Info are integers. For FORMAT_MEDIUM and FORMAT_LONG, the month/day fields have the strings for the date in question. The time returned has been converted to UTC.
- + function utcInfo(date, format) {}
- +
- }
- //! The Duration object represents an immutable span of time. This is the return
- @@ -3486,6 +4295,7 @@
- //! @since 1.0.0
- //! @see Drawable#initialize
- //! @param [Dictionary] dictionary A Dictionary containing the settings
- + //! @option [Symbol] :rezId The Rez identifier for the bitmap
- function initialize(dictionary) {}
- //! Draw the bitmap with draw().
- @@ -3526,6 +4336,42 @@
- }
- + //! Button is the class representation of a Selectable that is mappable is to a
- + //! BehaviorDelegate method on selection.
- + //! @since 2.1.0
- + //! @see Selectable
- + class Button extends Selectable {
- + //! Background Drawable, Graphics.COLOR_* constant, or 24-bit integer of the form
- + //! 0xRRGGBB to be drawn before the current Selectable state is drawn.
- + //! @since 2.1.0
- + //! @return [Object]
- + var background;
- +
- + //! Behavior method executed when button is selected. This method must be a member
- + //! of the active View's registered BehaviorDelegate, such as :onBack, but may also
- + //! be a method of an extended class. If the method returns false, or is not
- + //! specified (null), then a SelectableEvent will be issued.
- + //! @since 2.1.0
- + //! @return [Method]
- + var behavior;
- +
- + //! Constructor Initialize the Button foreground, background, and behavior. The
- + //! Button must be registered via a setLayout() call in order to be usable. Accepts
- + //! the standard Selectable symbols and also includes its requirements.
- + //! @since 2.1.0
- + //! @param [Dictionary] options Parameters to specify in Button creation
- + //! @option [Method] :behavior Method object to call when selected, or null to use a SelectableEvent. Optional.
- + //! @option [Object] :background Drawable, Graphics.COLOR_* constant, or 24-bit integer of the form 0xRRGGBB. Optional.
- + function initialize(options) {}
- +
- + //! Draw the object to the display context with draw(). Assume that the device
- + //! context has already been configured to the proper settings.
- + //! @since 2.1.0
- + //! @param [Graphics.Dc] dc The device context
- + function draw(dc) {}
- +
- + }
- +
- //! ClickEvent is an object sent to InputDelegate when the user presses the touch
- //! screen.
- //! @since 1.0.0
- @@ -3605,6 +4451,17 @@
- //! @param [Activity.Info] info The updated Activity.Info object
- function compute(info) {}
- + //! Used to create a new field. Field is updated in the FIT file by changing the the
- + //! value of the data within the Field. This method is to allow data fields access
- + //! to FIT recording without giving them access to the session.
- + //! @since 1.3.0
- + //! @param [String] name The name of the Field as a string
- + //! @param [Number] fieldId The unique Field Identifier for the Field
- + //! @param [type] type The type definiton for the field from the DATA_TYPE_ enumeration
- + //! @param [Dictionary] options Optional parameters that can be specified for field creation @option [:count] The number of elements to add to the field if it is an array. @option [:mesgType] Optional. The message type that this field should be added to. Defaults to MESG_TYPE_RECORD if not provided. @option [:units] Optional. The display units as a String. This should use the current device language.
- + //! @return [Field] the resulting field object
- + function createField(name, fieldId, type, options) {}
- +
- //! Returns the current background color for data fields, which is either
- //! Graphics.COLOR_WHITE or Graphics.COLOR_BLACK
- //! @since 1.2.0
- @@ -3617,6 +4474,38 @@
- //! @return [Number] mask of OBSCURE_X values giving the sides of the display that that are obscured by a round screen. Valid during onUpdate.
- function getObscurityFlags() {}
- + //! The function onTimerLap will be called when a lap is added to the current
- + //! activity
- + //! @since 1.3.0
- + function onTimerLap() {}
- +
- + //! The function onTimerPause will be called when the activity timer goes from the
- + //! running state to the paused state. The paused state will occur when the
- + //! auto-pause feature pauses the timer. If the activity timer is paused when the
- + //! app is loaded, this event will run immediately after startup
- + //! @since 1.3.0
- + function onTimerPause() {}
- +
- + //! The function onTimerReset will be called when the current activity is ended
- + //! @since 1.3.0
- + function onTimerReset() {}
- +
- + //! The function onTimerResume will be called when the activity timer goes from the
- + //! paused state to the running state.
- + //! @since 1.3.0
- + function onTimerResume() {}
- +
- + //! The function onTimerStart will be called when the activity timer goes from the
- + //! stopped state to the started state. If the activity timer is running when the
- + //! app is loaded, this event will run immediately after startup.
- + //! @since 1.3.0
- + function onTimerStart() {}
- +
- + //! The function onTimerStop will be called when the activity timer goes from the
- + //! running state to the stopped state.
- + //! @since 1.3.0
- + function onTimerStop() {}
- +
- }
- //! A Drawable is the base class of a drawable object. A Drawable can be constructed
- @@ -3651,6 +4540,11 @@
- //! Constructor
- //! @since 1.0.0
- //! @param [Dictionary] dictionary A Dictionary containing the settings
- + //! @option [String] :identifier The identifier for the Drawable
- + //! @option [Number] :locX The absolute screen x-coordinate for the Drawable
- + //! @option [Number] :locY The absolute screen y-coordinate for the Drawable
- + //! @option [Number] :width The clip width of the Drawable
- + //! @option [Number] :height The clip height of the Drawable
- function initialize(dictionary) {}
- //! Draw the object to the display context with draw(). Assume that the device
- @@ -3720,6 +4614,15 @@
- //! @return [Boolean] true if handled, false otherwise
- function onRelease(evt) {}
- + //! When the state of a Selectable changes, onSelectable() is called. The instance
- + //! of the associated Selectable is passed so that its current state may be
- + //! determined.
- + //! @since 2.1.0
- + //! @param [Selectable] instance The Selectable that generated the event
- + //! @param [Symbol] previousState The previous Selectable state (stateDefault, stateHighlighted, etc)
- + //! @return [Boolean] true if handled, false otherwise
- + function onSelectable(instance, previousState) {}
- +
- //! When a swipe event occurs, onSwipe() is called. This is sent when the user
- //! swipes the screen.
- //! @since 1.0.0
- @@ -3736,6 +4639,16 @@
- }
- + //! InvalidSelectableStateException is thrown if an instance of Selectable is
- + //! assigned a state that it doesn't contain.
- + //! @since 2.1.0
- + module toplevel {
- + //! Constructor
- + //! @since 2.1.0
- + function initialize() {}
- +
- + }
- +
- //! KeyEvent is an object sent to InputDelegate when a hard key is pressed on the
- //! device.
- //! @since 1.0.0
- @@ -3852,6 +4765,12 @@
- //! Set the options for the Picker.
- //! @since 1.2.0
- //! @param [Dictionary] options the options for the Picker
- + //! @option [Drawable] :title the title for the Picker. Required.
- + //! @option [Array] :pattern an Array of [Object] for the Picker to display. If the Array entry is a PickerFactory then it is presented to the user to make a choice. If it is a Drawable then it is display only. Required.
- + //! @option [Array] :defaults an Array of [Number] indicating the starting index for each entry in :pattern. Optional.
- + //! @option [Drawable] :nextArrow a custom next icon for the Picker. Optional.
- + //! @option [Drawable] :previousArrow a custom previous icon for the Picker. Optional.
- + //! @option [Drawable] :confirm a custom confirm icon for the Picker. Optional.
- function setOptions(options) {}
- }
- @@ -3920,6 +4839,88 @@
- }
- + //! Selectable is the class representation of an on-screen selectable object with
- + //! defined states depending on selection mode
- + //! @since 2.1.0
- + //! @see Drawable
- + class Selectable extends Drawable {
- + //! Default state Drawable, Graphics.COLOR_* constant, or 24-bit integer of the form
- + //! 0xRRGGBB
- + //! @since 2.1.0
- + //! @return [Object]
- + var stateDefault;
- +
- + //! Disabled state Drawable, Graphics.COLOR_* constant, or 24-bit integer of the
- + //! form 0xRRGGBB
- + //! @since 2.1.0
- + //! @return [Object]
- + var stateDisabled;
- +
- + //! Highlighted state Drawable, Graphics.COLOR_* constant, or 24-bit integer of the
- + //! form 0xRRGGBB
- + //! @since 2.1.0
- + //! @return [Object]
- + var stateHighlighted;
- +
- + //! Selected state Drawable, Graphics.COLOR_* constant, or 24-bit integer of the
- + //! form 0xRRGGBB
- + //! @since 2.1.0
- + //! @return [Object]
- + var stateSelected;
- +
- + //! Constructor
- + //! @since 2.1.0
- + //! @param [Dictionary] options Parameters to specify in Selectable creation
- + //! @option [Number] :locX @see Drawable#initialize. Required.
- + //! @option [Number] :locY @see Drawable#initialize. Required.
- + //! @option [Number] :width @see Drawable#initialize. Required.
- + //! @option [Number] :height @see Drawable#initialize. Required.
- + //! @option [Object] :stateDefault Drawable to display in default state. Optional.
- + //! @option [Object] :stateHighlighted Drawable to display in disable state. Optional.
- + //! @option [Object] :stateSelected Drawable to display in highlight state. Optional.
- + //! @option [Object] :stateDisabled Drawable to display in selected state. Optional.
- + function initialize(options) {}
- +
- + //! Draw the object to the display context with draw(). Assume that the device
- + //! context has already been configured to the proper settings.
- + //! @since 2.1.0
- + //! @param [Graphics.Dc] dc The device context
- + function draw(dc) {}
- +
- + //! Get the current state.
- + //! @since 2.1.0
- + //! @return [Symbol] The current state (:stateDefault, :stateHighlighted, etc).
- + function getState() {}
- +
- + //! Set the current state.
- + //! @since 2.1.0
- + //! @param [Symbol] state The desired state (:stateDefault, :stateHighlighted, etc) to make current.
- + function setState(state) {}
- +
- + }
- +
- + //! SelectableEvent is an object sent to InputDelegate when the user manipulates a
- + //! Selectable using hard-keys or the touchscreen.
- + //! @since 2.1.0
- + class SelectableEvent {
- + //! Constructor
- + //! @since 2.1.0
- + //! @param [Selectable] instance The Selectable that generated the event
- + //! @param [Symbol] previousState The previous Selectable state (stateDefault, stateHighlighted, etc)
- + function initialize(instance, previousState) {}
- +
- + //! Get the instance of the manipulated Selectable.
- + //! @since 2.1.0
- + //! @return The Reference to the Selectable manipulated
- + function getInstance() {}
- +
- + //! Get the previous state of the Selectable that generated the event.
- + //! @since 2.1.0
- + //! @return [Symbol] The previous Selectable state (stateDefault, stateHighlighted, etc)
- + function getPreviousState() {}
- +
- + }
- +
- //! The SimpleDataField class is used for creating simple data fields. In a
- //! SimpleDataField, the developer is only required to implement a compute method.
- //! The compute method is passed an Activity.Info object, which contains all current
- @@ -3969,6 +4970,11 @@
- //! @since 1.0.0
- //! @see Drawable#initializes
- //! @param [Dictionary] dictionary A Dictionary containing the settings
- + //! @option [Object] :text The text string or the Rez ID of a string resource
- + //! @option [Object] :color The text color of type Graphics.COLOR_*
- + //! @option [Object] :backgroundColor The background color of type Graphics.COLOR_*
- + //! @option [Object] :font The font to use of type Graphics.FONT_*
- + //! @option [Object] :justification The text justification of type Graphics.TEXT_JUSTIFY_*
- function initialize(dictionary) {}
- //! Draw the Text resource with draw().
- @@ -3976,6 +4982,11 @@
- //! @param [Graphics.Dc] dc The draw context
- function draw(dc) {}
- + //! Use setBackgroundColor() to set the text's background color.
- + //! @since 1.3.0
- + //! @param color The background color of type Graphics.COLOR_*
- + function setBackgroundColor(color) {}
- +
- //! Use setColor() to set the text color.
- //! @since 1.0.0
- //! @param color The text color of type Graphics.COLOR_*
- @@ -4042,6 +5053,10 @@
- //! onShow(), and onUpdate() aren't called for SimpleDataField objects.
- //! @since 1.0.0
- class View {
- + //! Constructor
- + //! @since 2.1.0
- + function initialize() {}
- +
- //! Find a Drawable by its ID.
- //! @since 1.0.0
- //! @param [String] id The ID of the Drawable to find
- @@ -4078,11 +5093,18 @@
- //! @return [Boolean] true if handled, false otherwise
- function onUpdate(dc) {}
- + //! Set the state of the keys to Selectable interaction mode. In this mode the keys
- + //! are used to cycle through the on screen Selectable objects. The first registered
- + //! Selectable in the current layout will be highlighted.
- + //! @since 2.1.0
- + //! @param [Boolean] enabled If the mode should be enabled
- + function setKeyToSelectableInteraction(enabled) {}
- +
- //! Use setLayout() to set the layout for the View. If the extending class does not
- //! override onUpdate(), then all Drawables contained in layout will automatically
- //! be drawn by the View.
- //! @since 1.0.0
- - //! @param [Layout] layout An array of Drawables
- + //! @param [Array] layout An array of Drawables
- function setLayout(layout) {}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement