[ { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The CanvasRenderingContext2D interface is used for drawing\n rectangles, text, images and other objects onto the canvas element. It\n provides the 2D rendering context for the drawing on the device's display.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 76, "offset": 206 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 76, "offset": 206 }, "indent": [ 1, 1 ] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "The canvas uses a standard x and y \n ", "position": { "start": { "line": 5, "column": 1, "offset": 208 }, "end": { "line": 6, "column": 2, "offset": 245 }, "indent": [ 1 ] } }, { "type": "link", "url": "https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Drawing_shapes", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "coordinate system" } ], "position": { "start": { "line": 6, "column": 2, "offset": 245 }, "end": { "line": 6, "column": 111, "offset": 354 }, "indent": [] } }, { "type": "text", "value": ". ", "position": { "start": { "line": 6, "column": 111, "offset": 354 }, "end": { "line": 6, "column": 113, "offset": 356 }, "indent": [] } } ], "position": { "start": { "line": 5, "column": 1, "offset": 208 }, "end": { "line": 6, "column": 113, "offset": 356 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "The ", "position": { "start": { "line": 8, "column": 1, "offset": 358 }, "end": { "line": 8, "column": 5, "offset": 362 }, "indent": [] } }, { "type": "inlineCode", "value": "CanvasRenderingContext2D", "position": { "start": { "line": 8, "column": 5, "offset": 362 }, "end": { "line": 8, "column": 31, "offset": 388 }, "indent": [] } }, { "type": "text", "value": " object is obtained as a parameter in the\n ", "position": { "start": { "line": 8, "column": 31, "offset": 388 }, "end": { "line": 9, "column": 2, "offset": 431 }, "indent": [ 1 ] } }, { "type": "link", "url": "/docs/rockyjs/rocky#on", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "rocky.on('draw', ...)" } ], "position": { "start": { "line": 9, "column": 2, "offset": 431 }, "end": { "line": 9, "column": 54, "offset": 483 }, "indent": [] } }, { "type": "text", "value": " event.", "position": { "start": { "line": 9, "column": 54, "offset": 483 }, "end": { "line": 9, "column": 61, "offset": 490 }, "indent": [] } } ], "position": { "start": { "line": 8, "column": 1, "offset": 358 }, "end": { "line": 9, "column": 61, "offset": 490 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "rocky.on('draw', function(drawEvent) {
  var ctx = drawEvent.context;
});", "position": { "start": { "line": 11, "column": 1, "offset": 492 }, "end": { "line": 11, "column": 92, "offset": 583 }, "indent": [] } } ], "position": { "start": { "line": 11, "column": 1, "offset": 492 }, "end": { "line": 11, "column": 92, "offset": 583 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "The state of pixels is maintained between each draw, so developers are \n responsible for clearing an area, before drawing again. ", "position": { "start": { "line": 13, "column": 1, "offset": 585 }, "end": { "line": 14, "column": 58, "offset": 714 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 13, "column": 1, "offset": 585 }, "end": { "line": 14, "column": 58, "offset": 714 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "Please note that this API is still in development and there may be some \n limitations, which are documented below. We will also be adding support \n for more common APIs in future releases.", "position": { "start": { "line": 16, "column": 1, "offset": 716 }, "end": { "line": 18, "column": 42, "offset": 904 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 16, "column": 1, "offset": 716 }, "end": { "line": 18, "column": 42, "offset": 904 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 18, "column": 42, "offset": 904 } } }, "tags": [ { "title": "namespace", "description": null, "lineNumber": 1, "type": null, "name": "CanvasRenderingContext2D" }, { "title": "desc", "description": "The CanvasRenderingContext2D interface is used for drawing\n rectangles, text, images and other objects onto the canvas element. It\n provides the 2D rendering context for the drawing on the device's display.\n\nThe canvas uses a standard x and y \n {@link https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Drawing_shapes coordinate system}. \n\nThe `CanvasRenderingContext2D` object is obtained as a parameter in the\n {@link /docs/rockyjs/rocky#on rocky.on('draw', ...)} event.\n\n`rocky.on('draw', function(drawEvent) {
  var ctx = drawEvent.context;
});`\n\nThe state of pixels is maintained between each draw, so developers are \n responsible for clearing an area, before drawing again. \n\nPlease note that this API is still in development and there may be some \n limitations, which are documented below. We will also be adding support \n for more common APIs in future releases.", "lineNumber": 2 } ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 21, "column": 2 } }, "context": { "loc": { "start": { "line": 22, "column": 0 }, "end": { "line": 163, "column": 2 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "kind": "namespace", "name": "CanvasRenderingContext2D", "members": { "instance": [], "static": [ { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The TextMetrics interface represents the dimensions of a text\n in the canvas (display), as created by ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 44, "offset": 105 }, "indent": [ 1 ] } }, { "type": "link", "url": "#measureText", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "measureText" } ], "position": { "start": { "line": 2, "column": 44, "offset": 105 }, "end": { "line": 2, "column": 76, "offset": 137 }, "indent": [] } }, { "type": "text", "value": ".", "position": { "start": { "line": 2, "column": 76, "offset": 137 }, "end": { "line": 2, "column": 77, "offset": 138 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 77, "offset": 138 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 77, "offset": 138 } } }, "tags": [ { "title": "typedef", "description": null, "lineNumber": 1, "type": { "type": "NameExpression", "name": "Object" }, "name": "TextMetrics" }, { "title": "desc", "description": "The TextMetrics interface represents the dimensions of a text\n in the canvas (display), as created by {@link #measureText measureText}.", "lineNumber": 2 }, { "title": "property", "description": "Calculated width of text in pixels.", "lineNumber": 5, "type": { "type": "NameExpression", "name": "Number" }, "name": "width" }, { "title": "property", "description": "Calculated height of text in pixels.", "lineNumber": 6, "type": { "type": "NameExpression", "name": "Number" }, "name": "height" } ], "loc": { "start": { "line": 23, "column": 2 }, "end": { "line": 30, "column": 5 } }, "context": { "loc": { "start": { "line": 66, "column": 2 }, "end": { "line": 66, "column": 11 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "kind": "typedef", "name": "TextMetrics", "type": { "type": "NameExpression", "name": "Object" }, "properties": [ { "name": "width", "lineNumber": 5, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Calculated width of text in pixels.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 36, "offset": 35 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 36, "offset": 35 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 36, "offset": 35 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "height", "lineNumber": 6, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Calculated height of text in pixels.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 37, "offset": 36 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 37, "offset": 36 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 37, "offset": 36 } } }, "type": { "type": "NameExpression", "name": "Number" } } ], "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "TextMetrics", "kind": "typedef", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.TextMetrics" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Specifies the color to use inside shapes. The default is\n ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 2, "offset": 58 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "#000", "position": { "start": { "line": 2, "column": 2, "offset": 58 }, "end": { "line": 2, "column": 8, "offset": 64 }, "indent": [] } }, { "type": "text", "value": " (black).", "position": { "start": { "line": 2, "column": 8, "offset": 64 }, "end": { "line": 2, "column": 17, "offset": 73 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 17, "offset": 73 }, "indent": [ 1 ] } }, { "type": "heading", "depth": 4, "children": [ { "type": "text", "value": "Options", "position": { "start": { "line": 4, "column": 8, "offset": 82 }, "end": { "line": 4, "column": 15, "offset": 89 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 75 }, "end": { "line": 4, "column": 15, "offset": 89 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": " Possible values:", "position": { "start": { "line": 6, "column": 1, "offset": 91 }, "end": { "line": 6, "column": 19, "offset": 109 }, "indent": [] } } ], "position": { "start": { "line": 6, "column": 1, "offset": 91 }, "end": { "line": 6, "column": 19, "offset": 109 }, "indent": [] } }, { "type": "list", "ordered": false, "start": null, "loose": false, "children": [ { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Most (but not all) CSS color names. e.g. ", "position": { "start": { "line": 8, "column": 5, "offset": 115 }, "end": { "line": 8, "column": 46, "offset": 156 }, "indent": [] } }, { "type": "inlineCode", "value": "blanchedalmond", "position": { "start": { "line": 8, "column": 46, "offset": 156 }, "end": { "line": 8, "column": 62, "offset": 172 }, "indent": [] } } ], "position": { "start": { "line": 8, "column": 5, "offset": 115 }, "end": { "line": 8, "column": 62, "offset": 172 }, "indent": [] } } ], "position": { "start": { "line": 8, "column": 1, "offset": 111 }, "end": { "line": 8, "column": 62, "offset": 172 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Pebble color names. e.g. ", "position": { "start": { "line": 9, "column": 5, "offset": 177 }, "end": { "line": 9, "column": 30, "offset": 202 }, "indent": [] } }, { "type": "inlineCode", "value": "shockingpink", "position": { "start": { "line": 9, "column": 30, "offset": 202 }, "end": { "line": 9, "column": 44, "offset": 216 }, "indent": [] } } ], "position": { "start": { "line": 9, "column": 5, "offset": 177 }, "end": { "line": 9, "column": 44, "offset": 216 }, "indent": [] } } ], "position": { "start": { "line": 9, "column": 1, "offset": 173 }, "end": { "line": 9, "column": 44, "offset": 216 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Hex color codes, short and long. e.g. ", "position": { "start": { "line": 10, "column": 5, "offset": 221 }, "end": { "line": 10, "column": 43, "offset": 259 }, "indent": [] } }, { "type": "inlineCode", "value": "#FFFFFF", "position": { "start": { "line": 10, "column": 43, "offset": 259 }, "end": { "line": 10, "column": 52, "offset": 268 }, "indent": [] } }, { "type": "text", "value": " or ", "position": { "start": { "line": 10, "column": 52, "offset": 268 }, "end": { "line": 10, "column": 56, "offset": 272 }, "indent": [] } }, { "type": "inlineCode", "value": "#FFF", "position": { "start": { "line": 10, "column": 56, "offset": 272 }, "end": { "line": 10, "column": 62, "offset": 278 }, "indent": [] } } ], "position": { "start": { "line": 10, "column": 5, "offset": 221 }, "end": { "line": 10, "column": 62, "offset": 278 }, "indent": [] } } ], "position": { "start": { "line": 10, "column": 1, "offset": 217 }, "end": { "line": 10, "column": 62, "offset": 278 }, "indent": [] } } ], "position": { "start": { "line": 8, "column": 1, "offset": 111 }, "end": { "line": 10, "column": 62, "offset": 278 }, "indent": [ 1, 1 ] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "Please note that we currently only support solid colors. You may specifiy\n ", "position": { "start": { "line": 12, "column": 1, "offset": 280 }, "end": { "line": 13, "column": 2, "offset": 355 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "transparent", "position": { "start": { "line": 13, "column": 2, "offset": 355 }, "end": { "line": 13, "column": 15, "offset": 368 }, "indent": [] } }, { "type": "text", "value": " or ", "position": { "start": { "line": 13, "column": 15, "offset": 368 }, "end": { "line": 13, "column": 19, "offset": 372 }, "indent": [] } }, { "type": "inlineCode", "value": "clear", "position": { "start": { "line": 13, "column": 19, "offset": 372 }, "end": { "line": 13, "column": 26, "offset": 379 }, "indent": [] } }, { "type": "text", "value": " for transparency, but we do do not support \n partial transparency or the ", "position": { "start": { "line": 13, "column": 26, "offset": 379 }, "end": { "line": 14, "column": 30, "offset": 453 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "#RRGGBBAA", "position": { "start": { "line": 14, "column": 30, "offset": 453 }, "end": { "line": 14, "column": 41, "offset": 464 }, "indent": [] } }, { "type": "text", "value": " notation yet.", "position": { "start": { "line": 14, "column": 41, "offset": 464 }, "end": { "line": 14, "column": 55, "offset": 478 }, "indent": [] } } ], "position": { "start": { "line": 12, "column": 1, "offset": 280 }, "end": { "line": 14, "column": 55, "offset": 478 }, "indent": [ 1, 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "ctx.fillStyle = 'white';", "position": { "start": { "line": 16, "column": 1, "offset": 480 }, "end": { "line": 16, "column": 27, "offset": 506 }, "indent": [] } } ], "position": { "start": { "line": 16, "column": 1, "offset": 480 }, "end": { "line": 16, "column": 27, "offset": 506 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 16, "column": 27, "offset": 506 } } }, "tags": [ { "title": "desc", "description": "Specifies the color to use inside shapes. The default is\n `#000` (black).\n\n #### Options\n\n Possible values:\n\n * Most (but not all) CSS color names. e.g. `blanchedalmond`\n * Pebble color names. e.g. `shockingpink`\n * Hex color codes, short and long. e.g. `#FFFFFF` or `#FFF`\n\nPlease note that we currently only support solid colors. You may specifiy\n `transparent` or `clear` for transparency, but we do do not support \n partial transparency or the `#RRGGBBAA` notation yet.\n\n`ctx.fillStyle = 'white';`", "lineNumber": 1 } ], "loc": { "start": { "line": 47, "column": 2 }, "end": { "line": 65, "column": 4 } }, "context": { "loc": { "start": { "line": 66, "column": 2 }, "end": { "line": 66, "column": 11 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "name": "fillStyle", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "fillStyle", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.fillStyle" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Provides information about the device's canvas (display). This is not\n actually a DOM element, it is provided for standards compliance only. ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 72, "offset": 141 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 72, "offset": 141 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "rocky.on('draw', function(drawEvent) {
  var ctx = drawEvent.context;
  var h = ctx.canvas.unobstructedHeight;
});", "position": { "start": { "line": 4, "column": 1, "offset": 143 }, "end": { "line": 4, "column": 146, "offset": 288 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 143 }, "end": { "line": 4, "column": 146, "offset": 288 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 146, "offset": 288 } } }, "tags": [ { "title": "typedef", "description": null, "lineNumber": 1, "type": { "type": "NameExpression", "name": "Object" }, "name": "Canvas" }, { "title": "desc", "description": "Provides information about the device's canvas (display). This is not\n actually a DOM element, it is provided for standards compliance only. \n\n`rocky.on('draw', function(drawEvent) {
  var ctx = drawEvent.context;
  var h = ctx.canvas.unobstructedHeight;
});`", "lineNumber": 2 }, { "title": "property", "description": "The full width of the canvas.", "lineNumber": 7, "type": { "type": "NameExpression", "name": "Number" }, "name": "clientWidth" }, { "title": "property", "description": "The full height of the canvas.", "lineNumber": 8, "type": { "type": "NameExpression", "name": "Number" }, "name": "clientHeight" }, { "title": "property", "description": "The width of the canvas that is not\n obstructed by system overlays (Timeline Quick View).", "lineNumber": 9, "type": { "type": "NameExpression", "name": "Number" }, "name": "unobstructedWidth" }, { "title": "property", "description": "The height of the canvas that is\n not obstructed by system overlays (Timeline Quick View).", "lineNumber": 11, "type": { "type": "NameExpression", "name": "Number" }, "name": "unobstructedHeight" } ], "loc": { "start": { "line": 32, "column": 2 }, "end": { "line": 45, "column": 5 } }, "context": { "loc": { "start": { "line": 66, "column": 2 }, "end": { "line": 66, "column": 11 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "kind": "typedef", "name": "Canvas", "type": { "type": "NameExpression", "name": "Object" }, "properties": [ { "name": "clientWidth", "lineNumber": 7, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The full width of the canvas.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 30, "offset": 29 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 30, "offset": 29 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 30, "offset": 29 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "clientHeight", "lineNumber": 8, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The full height of the canvas.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 31, "offset": 30 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 31, "offset": 30 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 31, "offset": 30 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "unobstructedWidth", "lineNumber": 9, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The width of the canvas that is not\n obstructed by system overlays (Timeline Quick View).", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 57, "offset": 92 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 57, "offset": 92 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 57, "offset": 92 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "unobstructedHeight", "lineNumber": 11, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The height of the canvas that is\n not obstructed by system overlays (Timeline Quick View).", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 61, "offset": 93 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 61, "offset": 93 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 61, "offset": 93 } } }, "type": { "type": "NameExpression", "name": "Number" } } ], "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "Canvas", "kind": "typedef", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.Canvas" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Specifies the color to use for lines around shapes. The\n default is ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 13, "offset": 68 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "#000", "position": { "start": { "line": 2, "column": 13, "offset": 68 }, "end": { "line": 2, "column": 19, "offset": 74 }, "indent": [] } }, { "type": "text", "value": " (black).", "position": { "start": { "line": 2, "column": 19, "offset": 74 }, "end": { "line": 2, "column": 28, "offset": 83 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 28, "offset": 83 }, "indent": [ 1 ] } }, { "type": "heading", "depth": 4, "children": [ { "type": "text", "value": "Options", "position": { "start": { "line": 4, "column": 8, "offset": 92 }, "end": { "line": 4, "column": 15, "offset": 99 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 85 }, "end": { "line": 4, "column": 15, "offset": 99 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": " Possible values:", "position": { "start": { "line": 6, "column": 1, "offset": 101 }, "end": { "line": 6, "column": 19, "offset": 119 }, "indent": [] } } ], "position": { "start": { "line": 6, "column": 1, "offset": 101 }, "end": { "line": 6, "column": 19, "offset": 119 }, "indent": [] } }, { "type": "list", "ordered": false, "start": null, "loose": false, "children": [ { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Most (but not all) CSS color names. e.g. ", "position": { "start": { "line": 8, "column": 5, "offset": 125 }, "end": { "line": 8, "column": 46, "offset": 166 }, "indent": [] } }, { "type": "inlineCode", "value": "blanchedalmond", "position": { "start": { "line": 8, "column": 46, "offset": 166 }, "end": { "line": 8, "column": 62, "offset": 182 }, "indent": [] } } ], "position": { "start": { "line": 8, "column": 5, "offset": 125 }, "end": { "line": 8, "column": 62, "offset": 182 }, "indent": [] } } ], "position": { "start": { "line": 8, "column": 1, "offset": 121 }, "end": { "line": 8, "column": 62, "offset": 182 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Pebble color names. e.g. ", "position": { "start": { "line": 9, "column": 5, "offset": 187 }, "end": { "line": 9, "column": 30, "offset": 212 }, "indent": [] } }, { "type": "inlineCode", "value": "shockingpink", "position": { "start": { "line": 9, "column": 30, "offset": 212 }, "end": { "line": 9, "column": 44, "offset": 226 }, "indent": [] } } ], "position": { "start": { "line": 9, "column": 5, "offset": 187 }, "end": { "line": 9, "column": 44, "offset": 226 }, "indent": [] } } ], "position": { "start": { "line": 9, "column": 1, "offset": 183 }, "end": { "line": 9, "column": 44, "offset": 226 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Hex color codes, short and long. e.g. ", "position": { "start": { "line": 10, "column": 5, "offset": 231 }, "end": { "line": 10, "column": 43, "offset": 269 }, "indent": [] } }, { "type": "inlineCode", "value": "#FFFFFF", "position": { "start": { "line": 10, "column": 43, "offset": 269 }, "end": { "line": 10, "column": 52, "offset": 278 }, "indent": [] } }, { "type": "text", "value": " or ", "position": { "start": { "line": 10, "column": 52, "offset": 278 }, "end": { "line": 10, "column": 56, "offset": 282 }, "indent": [] } }, { "type": "inlineCode", "value": "#FFF", "position": { "start": { "line": 10, "column": 56, "offset": 282 }, "end": { "line": 10, "column": 62, "offset": 288 }, "indent": [] } } ], "position": { "start": { "line": 10, "column": 5, "offset": 231 }, "end": { "line": 10, "column": 62, "offset": 288 }, "indent": [] } } ], "position": { "start": { "line": 10, "column": 1, "offset": 227 }, "end": { "line": 10, "column": 62, "offset": 288 }, "indent": [] } } ], "position": { "start": { "line": 8, "column": 1, "offset": 121 }, "end": { "line": 10, "column": 62, "offset": 288 }, "indent": [ 1, 1 ] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "Please note that we currently only support solid colors. You may specifiy\n ", "position": { "start": { "line": 12, "column": 1, "offset": 290 }, "end": { "line": 13, "column": 2, "offset": 365 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "transparent", "position": { "start": { "line": 13, "column": 2, "offset": 365 }, "end": { "line": 13, "column": 15, "offset": 378 }, "indent": [] } }, { "type": "text", "value": " or ", "position": { "start": { "line": 13, "column": 15, "offset": 378 }, "end": { "line": 13, "column": 19, "offset": 382 }, "indent": [] } }, { "type": "inlineCode", "value": "clear", "position": { "start": { "line": 13, "column": 19, "offset": 382 }, "end": { "line": 13, "column": 26, "offset": 389 }, "indent": [] } }, { "type": "text", "value": " for transparency, but we do do not support \n partial transparency or the ", "position": { "start": { "line": 13, "column": 26, "offset": 389 }, "end": { "line": 14, "column": 30, "offset": 463 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "#RRGGBBAA", "position": { "start": { "line": 14, "column": 30, "offset": 463 }, "end": { "line": 14, "column": 41, "offset": 474 }, "indent": [] } }, { "type": "text", "value": " notation yet.", "position": { "start": { "line": 14, "column": 41, "offset": 474 }, "end": { "line": 14, "column": 55, "offset": 488 }, "indent": [] } } ], "position": { "start": { "line": 12, "column": 1, "offset": 290 }, "end": { "line": 14, "column": 55, "offset": 488 }, "indent": [ 1, 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "ctx.strokeStyle = 'red';", "position": { "start": { "line": 16, "column": 1, "offset": 490 }, "end": { "line": 16, "column": 27, "offset": 516 }, "indent": [] } } ], "position": { "start": { "line": 16, "column": 1, "offset": 490 }, "end": { "line": 16, "column": 27, "offset": 516 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 16, "column": 27, "offset": 516 } } }, "tags": [ { "title": "desc", "description": "Specifies the color to use for lines around shapes. The\n default is `#000` (black).\n\n #### Options\n\n Possible values:\n\n * Most (but not all) CSS color names. e.g. `blanchedalmond`\n * Pebble color names. e.g. `shockingpink`\n * Hex color codes, short and long. e.g. `#FFFFFF` or `#FFF`\n\nPlease note that we currently only support solid colors. You may specifiy\n `transparent` or `clear` for transparency, but we do do not support \n partial transparency or the `#RRGGBBAA` notation yet.\n\n`ctx.strokeStyle = 'red';`", "lineNumber": 1 } ], "loc": { "start": { "line": 68, "column": 2 }, "end": { "line": 86, "column": 4 } }, "context": { "loc": { "start": { "line": 87, "column": 2 }, "end": { "line": 87, "column": 13 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "name": "strokeStyle", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "strokeStyle", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.strokeStyle" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "A ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 3, "offset": 2 }, "indent": [] } }, { "type": "link", "url": "#Canvas", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "Canvas" } ], "position": { "start": { "line": 1, "column": 3, "offset": 2 }, "end": { "line": 1, "column": 25, "offset": 24 }, "indent": [] } }, { "type": "text", "value": " object containing information about\n the system's canvas (display).", "position": { "start": { "line": 1, "column": 25, "offset": 24 }, "end": { "line": 2, "column": 33, "offset": 93 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 33, "offset": 93 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 33, "offset": 93 } } }, "tags": [ { "title": "desc", "description": "A {@link #Canvas Canvas} object containing information about\n the system's canvas (display).", "lineNumber": 1 } ], "loc": { "start": { "line": 89, "column": 2 }, "end": { "line": 92, "column": 4 } }, "context": { "loc": { "start": { "line": 93, "column": 2 }, "end": { "line": 93, "column": 8 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "name": "canvas", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "canvas", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.canvas" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The width of lines drawn (to the nearest integer) with the\n context (", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 11, "offset": 69 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "1.0", "position": { "start": { "line": 2, "column": 11, "offset": 69 }, "end": { "line": 2, "column": 16, "offset": 74 }, "indent": [] } }, { "type": "text", "value": " by default).", "position": { "start": { "line": 2, "column": 16, "offset": 74 }, "end": { "line": 2, "column": 29, "offset": 87 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 29, "offset": 87 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "ctx.lineWidth = 8;", "position": { "start": { "line": 4, "column": 1, "offset": 89 }, "end": { "line": 4, "column": 21, "offset": 109 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 89 }, "end": { "line": 4, "column": 21, "offset": 109 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 21, "offset": 109 } } }, "tags": [ { "title": "desc", "description": "The width of lines drawn (to the nearest integer) with the\n context (`1.0` by default).\n\n`ctx.lineWidth = 8;`", "lineNumber": 1 } ], "loc": { "start": { "line": 95, "column": 2 }, "end": { "line": 101, "column": 4 } }, "context": { "loc": { "start": { "line": 102, "column": 2 }, "end": { "line": 102, "column": 11 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "name": "lineWidth", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "lineWidth", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.lineWidth" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Specifies the current text style being used when drawing text.\n Although this string uses the same syntax as a CSS font specifier, you \n cannot specifiy arbitrary values and you must only use one of the values below.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 81, "offset": 217 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 81, "offset": 217 }, "indent": [ 1, 1 ] } }, { "type": "paragraph", "children": [ { "type": "text", "value": " The default font is ", "position": { "start": { "line": 5, "column": 1, "offset": 219 }, "end": { "line": 5, "column": 22, "offset": 240 }, "indent": [] } }, { "type": "inlineCode", "value": "14px bold Gothic", "position": { "start": { "line": 5, "column": 22, "offset": 240 }, "end": { "line": 5, "column": 40, "offset": 258 }, "indent": [] } }, { "type": "text", "value": ".", "position": { "start": { "line": 5, "column": 40, "offset": 258 }, "end": { "line": 5, "column": 41, "offset": 259 }, "indent": [] } } ], "position": { "start": { "line": 5, "column": 1, "offset": 219 }, "end": { "line": 5, "column": 41, "offset": 259 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "ctx.font = '28px bold Droid-serif';", "position": { "start": { "line": 7, "column": 1, "offset": 261 }, "end": { "line": 7, "column": 38, "offset": 298 }, "indent": [] } } ], "position": { "start": { "line": 7, "column": 1, "offset": 261 }, "end": { "line": 7, "column": 38, "offset": 298 }, "indent": [] } }, { "type": "heading", "depth": 4, "children": [ { "type": "text", "value": "Options", "position": { "start": { "line": 9, "column": 8, "offset": 307 }, "end": { "line": 9, "column": 15, "offset": 314 }, "indent": [] } } ], "position": { "start": { "line": 9, "column": 1, "offset": 300 }, "end": { "line": 9, "column": 15, "offset": 314 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": " Possible values:", "position": { "start": { "line": 11, "column": 1, "offset": 316 }, "end": { "line": 11, "column": 19, "offset": 334 }, "indent": [] } } ], "position": { "start": { "line": 11, "column": 1, "offset": 316 }, "end": { "line": 11, "column": 19, "offset": 334 }, "indent": [] } }, { "type": "list", "ordered": false, "start": null, "loose": false, "children": [ { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "18px bold Gothic", "position": { "start": { "line": 13, "column": 5, "offset": 340 }, "end": { "line": 13, "column": 23, "offset": 358 }, "indent": [] } } ], "position": { "start": { "line": 13, "column": 5, "offset": 340 }, "end": { "line": 13, "column": 23, "offset": 358 }, "indent": [] } } ], "position": { "start": { "line": 13, "column": 1, "offset": 336 }, "end": { "line": 13, "column": 23, "offset": 358 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "14px Gothic", "position": { "start": { "line": 14, "column": 5, "offset": 363 }, "end": { "line": 14, "column": 18, "offset": 376 }, "indent": [] } } ], "position": { "start": { "line": 14, "column": 5, "offset": 363 }, "end": { "line": 14, "column": 18, "offset": 376 }, "indent": [] } } ], "position": { "start": { "line": 14, "column": 1, "offset": 359 }, "end": { "line": 14, "column": 18, "offset": 376 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "14px bold Gothic", "position": { "start": { "line": 15, "column": 5, "offset": 381 }, "end": { "line": 15, "column": 23, "offset": 399 }, "indent": [] } } ], "position": { "start": { "line": 15, "column": 5, "offset": 381 }, "end": { "line": 15, "column": 23, "offset": 399 }, "indent": [] } } ], "position": { "start": { "line": 15, "column": 1, "offset": 377 }, "end": { "line": 15, "column": 23, "offset": 399 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "18px Gothic", "position": { "start": { "line": 16, "column": 5, "offset": 404 }, "end": { "line": 16, "column": 18, "offset": 417 }, "indent": [] } } ], "position": { "start": { "line": 16, "column": 5, "offset": 404 }, "end": { "line": 16, "column": 18, "offset": 417 }, "indent": [] } } ], "position": { "start": { "line": 16, "column": 1, "offset": 400 }, "end": { "line": 16, "column": 18, "offset": 417 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "24px Gothic", "position": { "start": { "line": 17, "column": 5, "offset": 422 }, "end": { "line": 17, "column": 18, "offset": 435 }, "indent": [] } } ], "position": { "start": { "line": 17, "column": 5, "offset": 422 }, "end": { "line": 17, "column": 18, "offset": 435 }, "indent": [] } } ], "position": { "start": { "line": 17, "column": 1, "offset": 418 }, "end": { "line": 17, "column": 18, "offset": 435 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "24px bold Gothic", "position": { "start": { "line": 18, "column": 5, "offset": 440 }, "end": { "line": 18, "column": 23, "offset": 458 }, "indent": [] } } ], "position": { "start": { "line": 18, "column": 5, "offset": 440 }, "end": { "line": 18, "column": 23, "offset": 458 }, "indent": [] } } ], "position": { "start": { "line": 18, "column": 1, "offset": 436 }, "end": { "line": 18, "column": 23, "offset": 458 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "28px Gothic", "position": { "start": { "line": 19, "column": 5, "offset": 463 }, "end": { "line": 19, "column": 18, "offset": 476 }, "indent": [] } } ], "position": { "start": { "line": 19, "column": 5, "offset": 463 }, "end": { "line": 19, "column": 18, "offset": 476 }, "indent": [] } } ], "position": { "start": { "line": 19, "column": 1, "offset": 459 }, "end": { "line": 19, "column": 18, "offset": 476 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "28px bold Gothic", "position": { "start": { "line": 20, "column": 5, "offset": 481 }, "end": { "line": 20, "column": 23, "offset": 499 }, "indent": [] } } ], "position": { "start": { "line": 20, "column": 5, "offset": 481 }, "end": { "line": 20, "column": 23, "offset": 499 }, "indent": [] } } ], "position": { "start": { "line": 20, "column": 1, "offset": 477 }, "end": { "line": 20, "column": 23, "offset": 499 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "30px bolder Bitham", "position": { "start": { "line": 21, "column": 5, "offset": 504 }, "end": { "line": 21, "column": 25, "offset": 524 }, "indent": [] } } ], "position": { "start": { "line": 21, "column": 5, "offset": 504 }, "end": { "line": 21, "column": 25, "offset": 524 }, "indent": [] } } ], "position": { "start": { "line": 21, "column": 1, "offset": 500 }, "end": { "line": 21, "column": 25, "offset": 524 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "42px bold Bitham", "position": { "start": { "line": 22, "column": 5, "offset": 529 }, "end": { "line": 22, "column": 23, "offset": 547 }, "indent": [] } } ], "position": { "start": { "line": 22, "column": 5, "offset": 529 }, "end": { "line": 22, "column": 23, "offset": 547 }, "indent": [] } } ], "position": { "start": { "line": 22, "column": 1, "offset": 525 }, "end": { "line": 22, "column": 23, "offset": 547 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "42px light Bitham", "position": { "start": { "line": 23, "column": 5, "offset": 552 }, "end": { "line": 23, "column": 24, "offset": 571 }, "indent": [] } } ], "position": { "start": { "line": 23, "column": 5, "offset": 552 }, "end": { "line": 23, "column": 24, "offset": 571 }, "indent": [] } } ], "position": { "start": { "line": 23, "column": 1, "offset": 548 }, "end": { "line": 23, "column": 24, "offset": 571 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "42px Bitham-numeric", "position": { "start": { "line": 24, "column": 5, "offset": 576 }, "end": { "line": 24, "column": 26, "offset": 597 }, "indent": [] } } ], "position": { "start": { "line": 24, "column": 5, "offset": 576 }, "end": { "line": 24, "column": 26, "offset": 597 }, "indent": [] } } ], "position": { "start": { "line": 24, "column": 1, "offset": 572 }, "end": { "line": 24, "column": 26, "offset": 597 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "34px Bitham-numeric", "position": { "start": { "line": 25, "column": 5, "offset": 602 }, "end": { "line": 25, "column": 26, "offset": 623 }, "indent": [] } } ], "position": { "start": { "line": 25, "column": 5, "offset": 602 }, "end": { "line": 25, "column": 26, "offset": 623 }, "indent": [] } } ], "position": { "start": { "line": 25, "column": 1, "offset": 598 }, "end": { "line": 25, "column": 26, "offset": 623 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "21px Roboto", "position": { "start": { "line": 26, "column": 5, "offset": 628 }, "end": { "line": 26, "column": 18, "offset": 641 }, "indent": [] } } ], "position": { "start": { "line": 26, "column": 5, "offset": 628 }, "end": { "line": 26, "column": 18, "offset": 641 }, "indent": [] } } ], "position": { "start": { "line": 26, "column": 1, "offset": 624 }, "end": { "line": 26, "column": 18, "offset": 641 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "49px Roboto-subset", "position": { "start": { "line": 27, "column": 5, "offset": 646 }, "end": { "line": 27, "column": 25, "offset": 666 }, "indent": [] } } ], "position": { "start": { "line": 27, "column": 5, "offset": 646 }, "end": { "line": 27, "column": 25, "offset": 666 }, "indent": [] } } ], "position": { "start": { "line": 27, "column": 1, "offset": 642 }, "end": { "line": 27, "column": 25, "offset": 666 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "28px bold Droid-serif", "position": { "start": { "line": 28, "column": 5, "offset": 671 }, "end": { "line": 28, "column": 28, "offset": 694 }, "indent": [] } } ], "position": { "start": { "line": 28, "column": 5, "offset": 671 }, "end": { "line": 28, "column": 28, "offset": 694 }, "indent": [] } } ], "position": { "start": { "line": 28, "column": 1, "offset": 667 }, "end": { "line": 28, "column": 28, "offset": 694 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "20px bold Leco-numbers", "position": { "start": { "line": 29, "column": 5, "offset": 699 }, "end": { "line": 29, "column": 29, "offset": 723 }, "indent": [] } } ], "position": { "start": { "line": 29, "column": 5, "offset": 699 }, "end": { "line": 29, "column": 29, "offset": 723 }, "indent": [] } } ], "position": { "start": { "line": 29, "column": 1, "offset": 695 }, "end": { "line": 29, "column": 29, "offset": 723 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "26px bold Leco-numbers-am-pm", "position": { "start": { "line": 30, "column": 5, "offset": 728 }, "end": { "line": 30, "column": 35, "offset": 758 }, "indent": [] } } ], "position": { "start": { "line": 30, "column": 5, "offset": 728 }, "end": { "line": 30, "column": 35, "offset": 758 }, "indent": [] } } ], "position": { "start": { "line": 30, "column": 1, "offset": 724 }, "end": { "line": 30, "column": 35, "offset": 758 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "32px bold numbers Leco-numbers", "position": { "start": { "line": 31, "column": 5, "offset": 763 }, "end": { "line": 31, "column": 37, "offset": 795 }, "indent": [] } } ], "position": { "start": { "line": 31, "column": 5, "offset": 763 }, "end": { "line": 31, "column": 37, "offset": 795 }, "indent": [] } } ], "position": { "start": { "line": 31, "column": 1, "offset": 759 }, "end": { "line": 31, "column": 37, "offset": 795 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "36px bold numbers Leco-numbers", "position": { "start": { "line": 32, "column": 5, "offset": 800 }, "end": { "line": 32, "column": 37, "offset": 832 }, "indent": [] } } ], "position": { "start": { "line": 32, "column": 5, "offset": 800 }, "end": { "line": 32, "column": 37, "offset": 832 }, "indent": [] } } ], "position": { "start": { "line": 32, "column": 1, "offset": 796 }, "end": { "line": 32, "column": 37, "offset": 832 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "38px bold numbers Leco-numbers", "position": { "start": { "line": 33, "column": 5, "offset": 837 }, "end": { "line": 33, "column": 37, "offset": 869 }, "indent": [] } } ], "position": { "start": { "line": 33, "column": 5, "offset": 837 }, "end": { "line": 33, "column": 37, "offset": 869 }, "indent": [] } } ], "position": { "start": { "line": 33, "column": 1, "offset": 833 }, "end": { "line": 33, "column": 37, "offset": 869 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "42px bold numbers Leco-numbers", "position": { "start": { "line": 34, "column": 5, "offset": 874 }, "end": { "line": 34, "column": 37, "offset": 906 }, "indent": [] } } ], "position": { "start": { "line": 34, "column": 5, "offset": 874 }, "end": { "line": 34, "column": 37, "offset": 906 }, "indent": [] } } ], "position": { "start": { "line": 34, "column": 1, "offset": 870 }, "end": { "line": 34, "column": 37, "offset": 906 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "28px light numbers Leco-numbers", "position": { "start": { "line": 35, "column": 5, "offset": 911 }, "end": { "line": 35, "column": 38, "offset": 944 }, "indent": [] } } ], "position": { "start": { "line": 35, "column": 5, "offset": 911 }, "end": { "line": 35, "column": 38, "offset": 944 }, "indent": [] } } ], "position": { "start": { "line": 35, "column": 1, "offset": 907 }, "end": { "line": 35, "column": 38, "offset": 944 }, "indent": [] } } ], "position": { "start": { "line": 13, "column": 1, "offset": 336 }, "end": { "line": 35, "column": 38, "offset": 944 }, "indent": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 35, "column": 38, "offset": 944 } } }, "tags": [ { "title": "desc", "description": "Specifies the current text style being used when drawing text.\n Although this string uses the same syntax as a CSS font specifier, you \n cannot specifiy arbitrary values and you must only use one of the values below.\n\n The default font is `14px bold Gothic`.\n\n`ctx.font = '28px bold Droid-serif';`\n\n #### Options\n\n Possible values:\n\n * `18px bold Gothic`\n * `14px Gothic`\n * `14px bold Gothic`\n * `18px Gothic`\n * `24px Gothic`\n * `24px bold Gothic`\n * `28px Gothic`\n * `28px bold Gothic`\n * `30px bolder Bitham`\n * `42px bold Bitham`\n * `42px light Bitham`\n * `42px Bitham-numeric`\n * `34px Bitham-numeric`\n * `21px Roboto`\n * `49px Roboto-subset`\n * `28px bold Droid-serif`\n * `20px bold Leco-numbers`\n * `26px bold Leco-numbers-am-pm`\n * `32px bold numbers Leco-numbers`\n * `36px bold numbers Leco-numbers`\n * `38px bold numbers Leco-numbers`\n * `42px bold numbers Leco-numbers`\n * `28px light numbers Leco-numbers`", "lineNumber": 1 } ], "loc": { "start": { "line": 104, "column": 2 }, "end": { "line": 140, "column": 4 } }, "context": { "loc": { "start": { "line": 141, "column": 2 }, "end": { "line": 141, "column": 6 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "name": "font", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "font", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.font" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Specifies the current text alignment being used when drawing\n text. Beware that the alignment is based on the x-axis coordinate value of \n the ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 7, "offset": 145 }, "indent": [ 1, 1 ] } }, { "type": "link", "url": "#fillText", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "CanvasRenderingContext2D.fillText" } ], "position": { "start": { "line": 3, "column": 7, "offset": 145 }, "end": { "line": 3, "column": 58, "offset": 196 }, "indent": [] } }, { "type": "text", "value": " method.", "position": { "start": { "line": 3, "column": 58, "offset": 196 }, "end": { "line": 3, "column": 66, "offset": 204 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 66, "offset": 204 }, "indent": [ 1, 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "ctx.textAlign = 'center';", "position": { "start": { "line": 5, "column": 1, "offset": 206 }, "end": { "line": 5, "column": 28, "offset": 233 }, "indent": [] } } ], "position": { "start": { "line": 5, "column": 1, "offset": 206 }, "end": { "line": 5, "column": 28, "offset": 233 }, "indent": [] } }, { "type": "heading", "depth": 4, "children": [ { "type": "text", "value": "Options", "position": { "start": { "line": 7, "column": 8, "offset": 242 }, "end": { "line": 7, "column": 15, "offset": 249 }, "indent": [] } } ], "position": { "start": { "line": 7, "column": 1, "offset": 235 }, "end": { "line": 7, "column": 15, "offset": 249 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": " Possible values:", "position": { "start": { "line": 9, "column": 1, "offset": 251 }, "end": { "line": 9, "column": 19, "offset": 269 }, "indent": [] } } ], "position": { "start": { "line": 9, "column": 1, "offset": 251 }, "end": { "line": 9, "column": 19, "offset": 269 }, "indent": [] } }, { "type": "list", "ordered": false, "start": null, "loose": false, "children": [ { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "left", "position": { "start": { "line": 11, "column": 5, "offset": 275 }, "end": { "line": 11, "column": 11, "offset": 281 }, "indent": [] } }, { "type": "text", "value": " - The text is left-aligned", "position": { "start": { "line": 11, "column": 11, "offset": 281 }, "end": { "line": 11, "column": 38, "offset": 308 }, "indent": [] } } ], "position": { "start": { "line": 11, "column": 5, "offset": 275 }, "end": { "line": 11, "column": 38, "offset": 308 }, "indent": [] } } ], "position": { "start": { "line": 11, "column": 1, "offset": 271 }, "end": { "line": 11, "column": 38, "offset": 308 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "right", "position": { "start": { "line": 12, "column": 5, "offset": 313 }, "end": { "line": 12, "column": 12, "offset": 320 }, "indent": [] } }, { "type": "text", "value": " - The text is right-aligned", "position": { "start": { "line": 12, "column": 12, "offset": 320 }, "end": { "line": 12, "column": 40, "offset": 348 }, "indent": [] } } ], "position": { "start": { "line": 12, "column": 5, "offset": 313 }, "end": { "line": 12, "column": 40, "offset": 348 }, "indent": [] } } ], "position": { "start": { "line": 12, "column": 1, "offset": 309 }, "end": { "line": 12, "column": 40, "offset": 348 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "center", "position": { "start": { "line": 13, "column": 5, "offset": 353 }, "end": { "line": 13, "column": 13, "offset": 361 }, "indent": [] } }, { "type": "text", "value": " - The text is center-aligned", "position": { "start": { "line": 13, "column": 13, "offset": 361 }, "end": { "line": 13, "column": 42, "offset": 390 }, "indent": [] } } ], "position": { "start": { "line": 13, "column": 5, "offset": 353 }, "end": { "line": 13, "column": 42, "offset": 390 }, "indent": [] } } ], "position": { "start": { "line": 13, "column": 1, "offset": 349 }, "end": { "line": 13, "column": 42, "offset": 390 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "start", "position": { "start": { "line": 14, "column": 5, "offset": 395 }, "end": { "line": 14, "column": 12, "offset": 402 }, "indent": [] } }, { "type": "text", "value": " (default) - The text is aligned left, unless using a \n right-to-left language. Currently only left-to-right is supported.", "position": { "start": { "line": 14, "column": 12, "offset": 402 }, "end": { "line": 15, "column": 73, "offset": 529 }, "indent": [ 5 ] } } ], "position": { "start": { "line": 14, "column": 5, "offset": 395 }, "end": { "line": 15, "column": 73, "offset": 529 }, "indent": [ 5 ] } } ], "position": { "start": { "line": 14, "column": 1, "offset": 391 }, "end": { "line": 15, "column": 73, "offset": 529 }, "indent": [ 1 ] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "end", "position": { "start": { "line": 16, "column": 5, "offset": 534 }, "end": { "line": 16, "column": 10, "offset": 539 }, "indent": [] } }, { "type": "text", "value": " - The text is aligned right, unless using a right-to-left \n language. Currently only left-to-right is supported.", "position": { "start": { "line": 16, "column": 10, "offset": 539 }, "end": { "line": 17, "column": 58, "offset": 656 }, "indent": [ 5 ] } } ], "position": { "start": { "line": 16, "column": 5, "offset": 534 }, "end": { "line": 17, "column": 58, "offset": 656 }, "indent": [ 5 ] } } ], "position": { "start": { "line": 16, "column": 1, "offset": 530 }, "end": { "line": 17, "column": 58, "offset": 656 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 11, "column": 1, "offset": 271 }, "end": { "line": 17, "column": 58, "offset": 656 }, "indent": [ 1, 1, 1, 1, 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 17, "column": 58, "offset": 656 } } }, "tags": [ { "title": "desc", "description": "Specifies the current text alignment being used when drawing\n text. Beware that the alignment is based on the x-axis coordinate value of \n the {@link #fillText CanvasRenderingContext2D.fillText} method.\n\n`ctx.textAlign = 'center';`\n\n #### Options\n\n Possible values:\n\n * `left` - The text is left-aligned\n * `right` - The text is right-aligned\n * `center` - The text is center-aligned\n * `start` (default) - The text is aligned left, unless using a \n right-to-left language. Currently only left-to-right is supported.\n * `end` - The text is aligned right, unless using a right-to-left \n language. Currently only left-to-right is supported.", "lineNumber": 1 } ], "loc": { "start": { "line": 143, "column": 2 }, "end": { "line": 161, "column": 4 } }, "context": { "loc": { "start": { "line": 162, "column": 2 }, "end": { "line": 162, "column": 11 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "name": "textAlign", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "textAlign", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.textAlign" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Sets all pixels in the rectangle at (", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 38, "offset": 37 }, "indent": [] } }, { "type": "inlineCode", "value": "x", "position": { "start": { "line": 1, "column": 38, "offset": 37 }, "end": { "line": 1, "column": 41, "offset": 40 }, "indent": [] } }, { "type": "text", "value": ",", "position": { "start": { "line": 1, "column": 41, "offset": 40 }, "end": { "line": 1, "column": 42, "offset": 41 }, "indent": [] } }, { "type": "inlineCode", "value": "y", "position": { "start": { "line": 1, "column": 42, "offset": 41 }, "end": { "line": 1, "column": 45, "offset": 44 }, "indent": [] } }, { "type": "text", "value": ") with size\n (", "position": { "start": { "line": 1, "column": 45, "offset": 44 }, "end": { "line": 2, "column": 3, "offset": 58 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "width", "position": { "start": { "line": 2, "column": 3, "offset": 58 }, "end": { "line": 2, "column": 10, "offset": 65 }, "indent": [] } }, { "type": "text", "value": ", ", "position": { "start": { "line": 2, "column": 10, "offset": 65 }, "end": { "line": 2, "column": 12, "offset": 67 }, "indent": [] } }, { "type": "inlineCode", "value": "height", "position": { "start": { "line": 2, "column": 12, "offset": 67 }, "end": { "line": 2, "column": 20, "offset": 75 }, "indent": [] } }, { "type": "text", "value": ") to black, erasing any previously drawn content.", "position": { "start": { "line": 2, "column": 20, "offset": 75 }, "end": { "line": 2, "column": 69, "offset": 124 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 69, "offset": 124 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "ctx.clearRect(0, 0, 144, 168);", "position": { "start": { "line": 4, "column": 1, "offset": 126 }, "end": { "line": 4, "column": 33, "offset": 158 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 126 }, "end": { "line": 4, "column": 33, "offset": 158 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 33, "offset": 158 } } }, "tags": [ { "title": "desc", "description": "Sets all pixels in the rectangle at (`x`,`y`) with size\n (`width`, `height`) to black, erasing any previously drawn content.\n\n`ctx.clearRect(0, 0, 144, 168);`", "lineNumber": 1 }, { "title": "param", "description": "The x-axis coordinate of the rectangle's starting point", "lineNumber": 6, "type": { "type": "NameExpression", "name": "Number" }, "name": "x" }, { "title": "param", "description": "The y-axis coordinate of the rectangle's starting point", "lineNumber": 7, "type": { "type": "NameExpression", "name": "Number" }, "name": "y" }, { "title": "param", "description": "The rectangle's width", "lineNumber": 8, "type": { "type": "NameExpression", "name": "Number" }, "name": "width" }, { "title": "param", "description": "The rectangle's height", "lineNumber": 9, "type": { "type": "NameExpression", "name": "Number" }, "name": "height" } ], "loc": { "start": { "line": 165, "column": 0 }, "end": { "line": 175, "column": 2 } }, "context": { "loc": { "start": { "line": 176, "column": 0 }, "end": { "line": 176, "column": 71 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "params": [ { "name": "x", "lineNumber": 6, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The x-axis coordinate of the rectangle's starting point", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "y", "lineNumber": 7, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The y-axis coordinate of the rectangle's starting point", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "width", "lineNumber": 8, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The rectangle's width", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 22, "offset": 21 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 22, "offset": 21 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 22, "offset": 21 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "height", "lineNumber": 9, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The rectangle's height", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 23, "offset": 22 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 23, "offset": 22 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 23, "offset": 22 } } }, "type": { "type": "NameExpression", "name": "Number" } } ], "name": "clearRect", "kind": "function", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "clearRect", "kind": "function", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.clearRect" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Draws a filled rectangle at (", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 30, "offset": 29 }, "indent": [] } }, { "type": "inlineCode", "value": "x", "position": { "start": { "line": 1, "column": 30, "offset": 29 }, "end": { "line": 1, "column": 33, "offset": 32 }, "indent": [] } }, { "type": "text", "value": ",", "position": { "start": { "line": 1, "column": 33, "offset": 32 }, "end": { "line": 1, "column": 34, "offset": 33 }, "indent": [] } }, { "type": "inlineCode", "value": "y", "position": { "start": { "line": 1, "column": 34, "offset": 33 }, "end": { "line": 1, "column": 37, "offset": 36 }, "indent": [] } }, { "type": "text", "value": ") with size (", "position": { "start": { "line": 1, "column": 37, "offset": 36 }, "end": { "line": 1, "column": 50, "offset": 49 }, "indent": [] } }, { "type": "inlineCode", "value": "width", "position": { "start": { "line": 1, "column": 50, "offset": 49 }, "end": { "line": 1, "column": 57, "offset": 56 }, "indent": [] } }, { "type": "text", "value": ", ", "position": { "start": { "line": 1, "column": 57, "offset": 56 }, "end": { "line": 1, "column": 59, "offset": 58 }, "indent": [] } }, { "type": "inlineCode", "value": "height", "position": { "start": { "line": 1, "column": 59, "offset": 58 }, "end": { "line": 1, "column": 67, "offset": 66 }, "indent": [] } }, { "type": "text", "value": "), \n using the current fill style.", "position": { "start": { "line": 1, "column": 67, "offset": 66 }, "end": { "line": 2, "column": 31, "offset": 100 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 31, "offset": 100 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "ctx.fillRect(0, 30, 144, 30);", "position": { "start": { "line": 4, "column": 1, "offset": 102 }, "end": { "line": 4, "column": 32, "offset": 133 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 102 }, "end": { "line": 4, "column": 32, "offset": 133 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 32, "offset": 133 } } }, "tags": [ { "title": "desc", "description": "Draws a filled rectangle at (`x`,`y`) with size (`width`, `height`), \n using the current fill style.\n\n`ctx.fillRect(0, 30, 144, 30);`", "lineNumber": 1 }, { "title": "param", "description": "The x-axis coordinate of the rectangle's starting point", "lineNumber": 6, "type": { "type": "NameExpression", "name": "Number" }, "name": "x" }, { "title": "param", "description": "The y-axis coordinate of the rectangle's starting point", "lineNumber": 7, "type": { "type": "NameExpression", "name": "Number" }, "name": "y" }, { "title": "param", "description": "The rectangle's width", "lineNumber": 8, "type": { "type": "NameExpression", "name": "Number" }, "name": "width" }, { "title": "param", "description": "The rectangle's height", "lineNumber": 9, "type": { "type": "NameExpression", "name": "Number" }, "name": "height" } ], "loc": { "start": { "line": 178, "column": 0 }, "end": { "line": 188, "column": 2 } }, "context": { "loc": { "start": { "line": 189, "column": 0 }, "end": { "line": 189, "column": 70 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "params": [ { "name": "x", "lineNumber": 6, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The x-axis coordinate of the rectangle's starting point", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "y", "lineNumber": 7, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The y-axis coordinate of the rectangle's starting point", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "width", "lineNumber": 8, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The rectangle's width", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 22, "offset": 21 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 22, "offset": 21 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 22, "offset": 21 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "height", "lineNumber": 9, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The rectangle's height", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 23, "offset": 22 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 23, "offset": 22 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 23, "offset": 22 } } }, "type": { "type": "NameExpression", "name": "Number" } } ], "name": "fillRect", "kind": "function", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "fillRect", "kind": "function", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.fillRect" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Paints a rectangle at (", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 24, "offset": 23 }, "indent": [] } }, { "type": "inlineCode", "value": "x", "position": { "start": { "line": 1, "column": 24, "offset": 23 }, "end": { "line": 1, "column": 27, "offset": 26 }, "indent": [] } }, { "type": "text", "value": ",", "position": { "start": { "line": 1, "column": 27, "offset": 26 }, "end": { "line": 1, "column": 28, "offset": 27 }, "indent": [] } }, { "type": "inlineCode", "value": "y", "position": { "start": { "line": 1, "column": 28, "offset": 27 }, "end": { "line": 1, "column": 31, "offset": 30 }, "indent": [] } }, { "type": "text", "value": ") with size (", "position": { "start": { "line": 1, "column": 31, "offset": 30 }, "end": { "line": 1, "column": 44, "offset": 43 }, "indent": [] } }, { "type": "inlineCode", "value": "width", "position": { "start": { "line": 1, "column": 44, "offset": 43 }, "end": { "line": 1, "column": 51, "offset": 50 }, "indent": [] } }, { "type": "text", "value": ", ", "position": { "start": { "line": 1, "column": 51, "offset": 50 }, "end": { "line": 1, "column": 53, "offset": 52 }, "indent": [] } }, { "type": "inlineCode", "value": "height", "position": { "start": { "line": 1, "column": 53, "offset": 52 }, "end": { "line": 1, "column": 61, "offset": 60 }, "indent": [] } }, { "type": "text", "value": "),\n using the current stroke style.", "position": { "start": { "line": 1, "column": 61, "offset": 60 }, "end": { "line": 2, "column": 33, "offset": 95 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 33, "offset": 95 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "ctx.strokeRect(0, 30, 144, 30);", "position": { "start": { "line": 4, "column": 1, "offset": 97 }, "end": { "line": 4, "column": 34, "offset": 130 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 97 }, "end": { "line": 4, "column": 34, "offset": 130 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 34, "offset": 130 } } }, "tags": [ { "title": "desc", "description": "Paints a rectangle at (`x`,`y`) with size (`width`, `height`),\n using the current stroke style.\n\n`ctx.strokeRect(0, 30, 144, 30);`", "lineNumber": 1 }, { "title": "param", "description": "The x-axis coordinate of the rectangle's starting point", "lineNumber": 6, "type": { "type": "NameExpression", "name": "Number" }, "name": "x" }, { "title": "param", "description": "The y-axis coordinate of the rectangle's starting point", "lineNumber": 7, "type": { "type": "NameExpression", "name": "Number" }, "name": "y" }, { "title": "param", "description": "The rectangle's width", "lineNumber": 8, "type": { "type": "NameExpression", "name": "Number" }, "name": "width" }, { "title": "param", "description": "The rectangle's height", "lineNumber": 9, "type": { "type": "NameExpression", "name": "Number" }, "name": "height" } ], "loc": { "start": { "line": 191, "column": 0 }, "end": { "line": 201, "column": 2 } }, "context": { "loc": { "start": { "line": 202, "column": 0 }, "end": { "line": 202, "column": 72 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "params": [ { "name": "x", "lineNumber": 6, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The x-axis coordinate of the rectangle's starting point", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "y", "lineNumber": 7, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The y-axis coordinate of the rectangle's starting point", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "width", "lineNumber": 8, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The rectangle's width", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 22, "offset": 21 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 22, "offset": 21 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 22, "offset": 21 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "height", "lineNumber": 9, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The rectangle's height", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 23, "offset": 22 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 23, "offset": 22 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 23, "offset": 22 } } }, "type": { "type": "NameExpression", "name": "Number" } } ], "name": "strokeRect", "kind": "function", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "strokeRect", "kind": "function", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.strokeRect" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Draws (fills) ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 15, "offset": 14 }, "indent": [] } }, { "type": "inlineCode", "value": "text", "position": { "start": { "line": 1, "column": 15, "offset": 14 }, "end": { "line": 1, "column": 21, "offset": 20 }, "indent": [] } }, { "type": "text", "value": " at the given (", "position": { "start": { "line": 1, "column": 21, "offset": 20 }, "end": { "line": 1, "column": 36, "offset": 35 }, "indent": [] } }, { "type": "inlineCode", "value": "x", "position": { "start": { "line": 1, "column": 36, "offset": 35 }, "end": { "line": 1, "column": 39, "offset": 38 }, "indent": [] } }, { "type": "text", "value": ",", "position": { "start": { "line": 1, "column": 39, "offset": 38 }, "end": { "line": 1, "column": 40, "offset": 39 }, "indent": [] } }, { "type": "inlineCode", "value": "y", "position": { "start": { "line": 1, "column": 40, "offset": 39 }, "end": { "line": 1, "column": 43, "offset": 42 }, "indent": [] } }, { "type": "text", "value": ") position.", "position": { "start": { "line": 1, "column": 43, "offset": 42 }, "end": { "line": 1, "column": 54, "offset": 53 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 54, "offset": 53 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "ctx.fillText('Hello World', 0, 30, 144);", "position": { "start": { "line": 3, "column": 1, "offset": 55 }, "end": { "line": 3, "column": 43, "offset": 97 }, "indent": [] } } ], "position": { "start": { "line": 3, "column": 1, "offset": 55 }, "end": { "line": 3, "column": 43, "offset": 97 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 43, "offset": 97 } } }, "tags": [ { "title": "desc", "description": "Draws (fills) `text` at the given (`x`,`y`) position.\n\n`ctx.fillText('Hello World', 0, 30, 144);`", "lineNumber": 1 }, { "title": "param", "description": "The text to draw", "lineNumber": 5, "type": { "type": "NameExpression", "name": "String" }, "name": "text" }, { "title": "param", "description": "The x-axis coordinate of the text's starting point", "lineNumber": 6, "type": { "type": "NameExpression", "name": "Number" }, "name": "x" }, { "title": "param", "description": "The y-axis coordinate of the text's starting point", "lineNumber": 7, "type": { "type": "NameExpression", "name": "Number" }, "name": "y" }, { "title": "param", "description": "(Optional) Maximum width to draw. If specified, \n and the string is wider than the width, the font is adjusted to use a \n smaller font.", "lineNumber": 8, "type": { "type": "NameExpression", "name": "Number" }, "name": "maxWidth" } ], "loc": { "start": { "line": 204, "column": 0 }, "end": { "line": 215, "column": 2 } }, "context": { "loc": { "start": { "line": 216, "column": 0 }, "end": { "line": 216, "column": 71 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "params": [ { "name": "text", "lineNumber": 5, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The text to draw", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 17, "offset": 16 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 17, "offset": 16 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 17, "offset": 16 } } }, "type": { "type": "NameExpression", "name": "String" } }, { "name": "x", "lineNumber": 6, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The x-axis coordinate of the text's starting point", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 51, "offset": 50 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 51, "offset": 50 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 51, "offset": 50 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "y", "lineNumber": 7, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The y-axis coordinate of the text's starting point", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 51, "offset": 50 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 51, "offset": 50 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 51, "offset": 50 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "maxWidth", "lineNumber": 8, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "(Optional) Maximum width to draw. If specified, \n and the string is wider than the width, the font is adjusted to use a \n smaller font.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 17, "offset": 139 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 17, "offset": 139 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 17, "offset": 139 } } }, "type": { "type": "NameExpression", "name": "Number" } } ], "name": "fillText", "kind": "function", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "fillText", "kind": "function", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.fillText" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Returns a ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 11, "offset": 10 }, "indent": [] } }, { "type": "link", "url": "#TextMetrics", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "TextMetrics" } ], "position": { "start": { "line": 1, "column": 11, "offset": 10 }, "end": { "line": 1, "column": 43, "offset": 42 }, "indent": [] } }, { "type": "text", "value": " object containing\n information about ", "position": { "start": { "line": 1, "column": 43, "offset": 42 }, "end": { "line": 2, "column": 23, "offset": 83 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "text", "position": { "start": { "line": 2, "column": 23, "offset": 83 }, "end": { "line": 2, "column": 29, "offset": 89 }, "indent": [] } }, { "type": "text", "value": ".", "position": { "start": { "line": 2, "column": 29, "offset": 89 }, "end": { "line": 2, "column": 30, "offset": 90 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 30, "offset": 90 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "var dimensions = ctx.measureText('Hello World');", "position": { "start": { "line": 4, "column": 1, "offset": 92 }, "end": { "line": 4, "column": 51, "offset": 142 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 92 }, "end": { "line": 4, "column": 51, "offset": 142 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 51, "offset": 142 } } }, "tags": [ { "title": "desc", "description": "Returns a {@link #TextMetrics TextMetrics} object containing\n information about `text`.\n\n`var dimensions = ctx.measureText('Hello World');`", "lineNumber": 1 }, { "title": "returns", "description": "A ``TextMetrics`` object with information about\n the measured text", "lineNumber": 6, "type": { "type": "NameExpression", "name": "TextMetrics" } }, { "title": "param", "description": "The text to measure", "lineNumber": 9, "type": { "type": "NameExpression", "name": "String" }, "name": "text" } ], "loc": { "start": { "line": 218, "column": 0 }, "end": { "line": 228, "column": 2 } }, "context": { "loc": { "start": { "line": 229, "column": 0 }, "end": { "line": 229, "column": 58 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "returns": [ { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "A ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 3, "offset": 2 }, "indent": [] } }, { "type": "inlineCode", "value": "TextMetrics", "position": { "start": { "line": 1, "column": 3, "offset": 2 }, "end": { "line": 1, "column": 18, "offset": 17 }, "indent": [] } }, { "type": "text", "value": " object with information about\n the measured text", "position": { "start": { "line": 1, "column": 18, "offset": 17 }, "end": { "line": 2, "column": 19, "offset": 66 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 19, "offset": 66 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 19, "offset": 66 } } }, "type": { "type": "NameExpression", "name": "TextMetrics" } } ], "params": [ { "name": "text", "lineNumber": 9, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The text to measure", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 20, "offset": 19 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 20, "offset": 19 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 20, "offset": 19 } } }, "type": { "type": "NameExpression", "name": "String" } } ], "name": "measureText", "kind": "function", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "measureText", "kind": "function", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.measureText" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Starts a new path by emptying the list of sub-paths. Call this\n method when you want to create a new path.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 44, "offset": 106 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 44, "offset": 106 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "ctx.beginPath();", "position": { "start": { "line": 4, "column": 1, "offset": 108 }, "end": { "line": 4, "column": 19, "offset": 126 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 108 }, "end": { "line": 4, "column": 19, "offset": 126 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 19, "offset": 126 } } }, "tags": [ { "title": "desc", "description": "Starts a new path by emptying the list of sub-paths. Call this\n method when you want to create a new path.\n\n`ctx.beginPath();`", "lineNumber": 1 } ], "loc": { "start": { "line": 231, "column": 0 }, "end": { "line": 236, "column": 2 } }, "context": { "loc": { "start": { "line": 237, "column": 0 }, "end": { "line": 237, "column": 52 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "name": "beginPath", "kind": "function", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "beginPath", "kind": "function", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.beginPath" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Causes the point of the pen to move back to the start of the\n current sub-path. It tries to add a straight line (but does not\n actually draw it) from the current point to the start. If the shape has\n already been closed or has only one point, this function does nothing.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 75, "offset": 279 }, "indent": [ 1, 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 75, "offset": 279 }, "indent": [ 1, 1, 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "ctx.closePath();", "position": { "start": { "line": 6, "column": 1, "offset": 281 }, "end": { "line": 6, "column": 19, "offset": 299 }, "indent": [] } } ], "position": { "start": { "line": 6, "column": 1, "offset": 281 }, "end": { "line": 6, "column": 19, "offset": 299 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 6, "column": 19, "offset": 299 } } }, "tags": [ { "title": "desc", "description": "Causes the point of the pen to move back to the start of the\n current sub-path. It tries to add a straight line (but does not\n actually draw it) from the current point to the start. If the shape has\n already been closed or has only one point, this function does nothing.\n\n`ctx.closePath();`", "lineNumber": 1 } ], "loc": { "start": { "line": 239, "column": 0 }, "end": { "line": 246, "column": 2 } }, "context": { "loc": { "start": { "line": 247, "column": 0 }, "end": { "line": 247, "column": 52 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "name": "closePath", "kind": "function", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "closePath", "kind": "function", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.closePath" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Moves the starting point of a new sub-path to the (", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 52, "offset": 51 }, "indent": [] } }, { "type": "inlineCode", "value": "x", "position": { "start": { "line": 1, "column": 52, "offset": 51 }, "end": { "line": 1, "column": 55, "offset": 54 }, "indent": [] } }, { "type": "text", "value": ",", "position": { "start": { "line": 1, "column": 55, "offset": 54 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } }, { "type": "inlineCode", "value": "y", "position": { "start": { "line": 1, "column": 56, "offset": 55 }, "end": { "line": 1, "column": 59, "offset": 58 }, "indent": [] } }, { "type": "text", "value": ")\n coordinates.", "position": { "start": { "line": 1, "column": 59, "offset": 58 }, "end": { "line": 2, "column": 14, "offset": 73 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 14, "offset": 73 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "ctx.moveTo(10, 20);", "position": { "start": { "line": 4, "column": 1, "offset": 75 }, "end": { "line": 4, "column": 22, "offset": 96 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 75 }, "end": { "line": 4, "column": 22, "offset": 96 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 22, "offset": 96 } } }, "tags": [ { "title": "desc", "description": "Moves the starting point of a new sub-path to the (`x`,`y`)\n coordinates.\n\n`ctx.moveTo(10, 20);`", "lineNumber": 1 }, { "title": "param", "description": "The destination point on the x-axis", "lineNumber": 6, "type": { "type": "NameExpression", "name": "Number" }, "name": "x" }, { "title": "param", "description": "The destination point on the y-axis", "lineNumber": 7, "type": { "type": "NameExpression", "name": "Number" }, "name": "y" } ], "loc": { "start": { "line": 249, "column": 0 }, "end": { "line": 257, "column": 2 } }, "context": { "loc": { "start": { "line": 258, "column": 0 }, "end": { "line": 258, "column": 53 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "params": [ { "name": "x", "lineNumber": 6, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The destination point on the x-axis", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 36, "offset": 35 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 36, "offset": 35 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 36, "offset": 35 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "y", "lineNumber": 7, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The destination point on the y-axis", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 36, "offset": 35 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 36, "offset": 35 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 36, "offset": 35 } } }, "type": { "type": "NameExpression", "name": "Number" } } ], "name": "moveTo", "kind": "function", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "moveTo", "kind": "function", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.moveTo" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Connects the last point of the sub-path to the (", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 49, "offset": 48 }, "indent": [] } }, { "type": "inlineCode", "value": "x", "position": { "start": { "line": 1, "column": 49, "offset": 48 }, "end": { "line": 1, "column": 52, "offset": 51 }, "indent": [] } }, { "type": "text", "value": ",", "position": { "start": { "line": 1, "column": 52, "offset": 51 }, "end": { "line": 1, "column": 53, "offset": 52 }, "indent": [] } }, { "type": "inlineCode", "value": "y", "position": { "start": { "line": 1, "column": 53, "offset": 52 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } }, { "type": "text", "value": ")\n coordinates with a straight line.", "position": { "start": { "line": 1, "column": 56, "offset": 55 }, "end": { "line": 2, "column": 35, "offset": 91 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 35, "offset": 91 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "ctx.lineTo(10, 20);", "position": { "start": { "line": 4, "column": 1, "offset": 93 }, "end": { "line": 4, "column": 22, "offset": 114 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 93 }, "end": { "line": 4, "column": 22, "offset": 114 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 22, "offset": 114 } } }, "tags": [ { "title": "desc", "description": "Connects the last point of the sub-path to the (`x`,`y`)\n coordinates with a straight line.\n\n`ctx.lineTo(10, 20);`", "lineNumber": 1 }, { "title": "param", "description": "The destination point on the x-axis", "lineNumber": 6, "type": { "type": "NameExpression", "name": "Number" }, "name": "x" }, { "title": "param", "description": "The destination point on the y-axis", "lineNumber": 7, "type": { "type": "NameExpression", "name": "Number" }, "name": "y" } ], "loc": { "start": { "line": 260, "column": 0 }, "end": { "line": 268, "column": 2 } }, "context": { "loc": { "start": { "line": 269, "column": 0 }, "end": { "line": 269, "column": 53 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "params": [ { "name": "x", "lineNumber": 6, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The destination point on the x-axis", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 36, "offset": 35 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 36, "offset": 35 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 36, "offset": 35 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "y", "lineNumber": 7, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The destination point on the y-axis", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 36, "offset": 35 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 36, "offset": 35 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 36, "offset": 35 } } }, "type": { "type": "NameExpression", "name": "Number" } } ], "name": "lineTo", "kind": "function", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "lineTo", "kind": "function", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.lineTo" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Adds an arc to the path which is centered at (", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 47, "offset": 46 }, "indent": [] } }, { "type": "inlineCode", "value": "x", "position": { "start": { "line": 1, "column": 47, "offset": 46 }, "end": { "line": 1, "column": 50, "offset": 49 }, "indent": [] } }, { "type": "text", "value": ",", "position": { "start": { "line": 1, "column": 50, "offset": 49 }, "end": { "line": 1, "column": 51, "offset": 50 }, "indent": [] } }, { "type": "inlineCode", "value": "y", "position": { "start": { "line": 1, "column": 51, "offset": 50 }, "end": { "line": 1, "column": 54, "offset": 53 }, "indent": [] } }, { "type": "text", "value": ")\n position with radius ", "position": { "start": { "line": 1, "column": 54, "offset": 53 }, "end": { "line": 2, "column": 26, "offset": 80 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "r", "position": { "start": { "line": 2, "column": 26, "offset": 80 }, "end": { "line": 2, "column": 29, "offset": 83 }, "indent": [] } }, { "type": "text", "value": " starting at ", "position": { "start": { "line": 2, "column": 29, "offset": 83 }, "end": { "line": 2, "column": 42, "offset": 96 }, "indent": [] } }, { "type": "inlineCode", "value": "startAngle", "position": { "start": { "line": 2, "column": 42, "offset": 96 }, "end": { "line": 2, "column": 54, "offset": 108 }, "indent": [] } }, { "type": "text", "value": " and ending at\n ", "position": { "start": { "line": 2, "column": 54, "offset": 108 }, "end": { "line": 3, "column": 5, "offset": 127 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "endAngle", "position": { "start": { "line": 3, "column": 5, "offset": 127 }, "end": { "line": 3, "column": 15, "offset": 137 }, "indent": [] } }, { "type": "text", "value": " going in the direction determined by the ", "position": { "start": { "line": 3, "column": 15, "offset": 137 }, "end": { "line": 3, "column": 57, "offset": 179 }, "indent": [] } }, { "type": "inlineCode", "value": "anticlockwise", "position": { "start": { "line": 3, "column": 57, "offset": 179 }, "end": { "line": 3, "column": 72, "offset": 194 }, "indent": [] } }, { "type": "text", "value": " \n parameter (defaulting to clockwise).", "position": { "start": { "line": 3, "column": 72, "offset": 194 }, "end": { "line": 4, "column": 41, "offset": 236 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 41, "offset": 236 }, "indent": [ 1, 1, 1 ] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "If ", "position": { "start": { "line": 6, "column": 1, "offset": 238 }, "end": { "line": 6, "column": 4, "offset": 241 }, "indent": [] } }, { "type": "inlineCode", "value": "startAngle", "position": { "start": { "line": 6, "column": 4, "offset": 241 }, "end": { "line": 6, "column": 16, "offset": 253 }, "indent": [] } }, { "type": "text", "value": " > ", "position": { "start": { "line": 6, "column": 16, "offset": 253 }, "end": { "line": 6, "column": 19, "offset": 256 }, "indent": [] } }, { "type": "inlineCode", "value": "endAngle", "position": { "start": { "line": 6, "column": 19, "offset": 256 }, "end": { "line": 6, "column": 29, "offset": 266 }, "indent": [] } }, { "type": "text", "value": " nothing will be drawn, and if the difference \n between ", "position": { "start": { "line": 6, "column": 29, "offset": 266 }, "end": { "line": 7, "column": 11, "offset": 323 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "startAngle", "position": { "start": { "line": 7, "column": 11, "offset": 323 }, "end": { "line": 7, "column": 23, "offset": 335 }, "indent": [] } }, { "type": "text", "value": " and ", "position": { "start": { "line": 7, "column": 23, "offset": 335 }, "end": { "line": 7, "column": 28, "offset": 340 }, "indent": [] } }, { "type": "inlineCode", "value": "endAngle", "position": { "start": { "line": 7, "column": 28, "offset": 340 }, "end": { "line": 7, "column": 38, "offset": 350 }, "indent": [] } }, { "type": "text", "value": " exceeds 2Ï€, a full circle will be drawn.", "position": { "start": { "line": 7, "column": 38, "offset": 350 }, "end": { "line": 7, "column": 79, "offset": 391 }, "indent": [] } } ], "position": { "start": { "line": 6, "column": 1, "offset": 238 }, "end": { "line": 7, "column": 79, "offset": 391 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "// Draw a full circle outline
ctx.strokeStyle = 'white';
ctx.beginPath();
ctx.arc(72, 84, 40, 0, 2 * Math.PI, false);
ctx.stroke();", "position": { "start": { "line": 9, "column": 1, "offset": 393 }, "end": { "line": 9, "column": 146, "offset": 538 }, "indent": [] } } ], "position": { "start": { "line": 9, "column": 1, "offset": 393 }, "end": { "line": 9, "column": 146, "offset": 538 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "Please note this function does not work with ", "position": { "start": { "line": 11, "column": 1, "offset": 540 }, "end": { "line": 11, "column": 46, "offset": 585 }, "indent": [] } }, { "type": "inlineCode", "value": ".fill", "position": { "start": { "line": 11, "column": 46, "offset": 585 }, "end": { "line": 11, "column": 53, "offset": 592 }, "indent": [] } }, { "type": "text", "value": ", you must use \n ", "position": { "start": { "line": 11, "column": 53, "offset": 592 }, "end": { "line": 12, "column": 2, "offset": 609 }, "indent": [ 1 ] } }, { "type": "link", "url": "#rockyFillRadial", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "CanvasRenderingContext2D.rockyFillRadial" } ], "position": { "start": { "line": 12, "column": 2, "offset": 609 }, "end": { "line": 12, "column": 67, "offset": 674 }, "indent": [] } }, { "type": "text", "value": " instead.", "position": { "start": { "line": 12, "column": 67, "offset": 674 }, "end": { "line": 12, "column": 76, "offset": 683 }, "indent": [] } } ], "position": { "start": { "line": 11, "column": 1, "offset": 540 }, "end": { "line": 12, "column": 76, "offset": 683 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 12, "column": 76, "offset": 683 } } }, "tags": [ { "title": "desc", "description": "Adds an arc to the path which is centered at (`x`,`y`)\n position with radius `r` starting at `startAngle` and ending at\n `endAngle` going in the direction determined by the `anticlockwise` \n parameter (defaulting to clockwise).\n\nIf `startAngle` > `endAngle` nothing will be drawn, and if the difference \n between `startAngle` and `endAngle` exceeds 2Ï€, a full circle will be drawn.\n\n`// Draw a full circle outline
ctx.strokeStyle = 'white';
ctx.beginPath();
ctx.arc(72, 84, 40, 0, 2 * Math.PI, false);
ctx.stroke();`\n\nPlease note this function does not work with `.fill`, you must use \n {@link #rockyFillRadial CanvasRenderingContext2D.rockyFillRadial} instead.", "lineNumber": 1 }, { "title": "param", "description": "The x-axis coordinate of the arc's center", "lineNumber": 14, "type": { "type": "NameExpression", "name": "Number" }, "name": "x" }, { "title": "param", "description": "The y-axis coordinate of the arc's center", "lineNumber": 15, "type": { "type": "NameExpression", "name": "Number" }, "name": "y" }, { "title": "param", "description": "The radius of the arc", "lineNumber": 16, "type": { "type": "NameExpression", "name": "Number" }, "name": "r" }, { "title": "param", "description": "The angle at which the arc starts, measured\n clockwise from the positive x axis and expressed in radians.", "lineNumber": 17, "type": { "type": "NameExpression", "name": "Number" }, "name": "startAngle" }, { "title": "param", "description": "The angle at which the arc ends, measured\n clockwise from the positive x axis and expressed in radians.", "lineNumber": 19, "type": { "type": "NameExpression", "name": "Number" }, "name": "endAngle" }, { "title": "param", "description": "(Optional) `Boolean` which, if `true`,\n causes the arc to be drawn counter-clockwise between the two angles\n (`false` by default)", "lineNumber": 21, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "Bool" } }, "name": "anticlockwise" } ], "loc": { "start": { "line": 271, "column": 0 }, "end": { "line": 295, "column": 2 } }, "context": { "loc": { "start": { "line": 296, "column": 0 }, "end": { "line": 296, "column": 90 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "params": [ { "name": "x", "lineNumber": 14, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The x-axis coordinate of the arc's center", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 42, "offset": 41 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 42, "offset": 41 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 42, "offset": 41 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "y", "lineNumber": 15, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The y-axis coordinate of the arc's center", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 42, "offset": 41 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 42, "offset": 41 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 42, "offset": 41 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "r", "lineNumber": 16, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The radius of the arc", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 22, "offset": 21 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 22, "offset": 21 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 22, "offset": 21 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "startAngle", "lineNumber": 17, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The angle at which the arc starts, measured\n clockwise from the positive x axis and expressed in radians.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 65, "offset": 108 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 65, "offset": 108 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 65, "offset": 108 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "endAngle", "lineNumber": 19, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The angle at which the arc ends, measured\n clockwise from the positive x axis and expressed in radians.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 65, "offset": 106 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 65, "offset": 106 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 65, "offset": 106 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "anticlockwise", "lineNumber": 21, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "(Optional) ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 12, "offset": 11 }, "indent": [] } }, { "type": "inlineCode", "value": "Boolean", "position": { "start": { "line": 1, "column": 12, "offset": 11 }, "end": { "line": 1, "column": 21, "offset": 20 }, "indent": [] } }, { "type": "text", "value": " which, if ", "position": { "start": { "line": 1, "column": 21, "offset": 20 }, "end": { "line": 1, "column": 32, "offset": 31 }, "indent": [] } }, { "type": "inlineCode", "value": "true", "position": { "start": { "line": 1, "column": 32, "offset": 31 }, "end": { "line": 1, "column": 38, "offset": 37 }, "indent": [] } }, { "type": "text", "value": ",\n causes the arc to be drawn counter-clockwise between the two angles\n (", "position": { "start": { "line": 1, "column": 38, "offset": 37 }, "end": { "line": 3, "column": 6, "offset": 116 }, "indent": [ 1, 1 ] } }, { "type": "inlineCode", "value": "false", "position": { "start": { "line": 3, "column": 6, "offset": 116 }, "end": { "line": 3, "column": 13, "offset": 123 }, "indent": [] } }, { "type": "text", "value": " by default)", "position": { "start": { "line": 3, "column": 13, "offset": 123 }, "end": { "line": 3, "column": 25, "offset": 135 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 25, "offset": 135 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 25, "offset": 135 } } }, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "Bool" } } } ], "name": "arc", "kind": "function", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "arc", "kind": "function", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.arc" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Creates a path for a rectangle at position (", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 45, "offset": 44 }, "indent": [] } }, { "type": "inlineCode", "value": "x", "position": { "start": { "line": 1, "column": 45, "offset": 44 }, "end": { "line": 1, "column": 48, "offset": 47 }, "indent": [] } }, { "type": "text", "value": ",", "position": { "start": { "line": 1, "column": 48, "offset": 47 }, "end": { "line": 1, "column": 49, "offset": 48 }, "indent": [] } }, { "type": "inlineCode", "value": "y", "position": { "start": { "line": 1, "column": 49, "offset": 48 }, "end": { "line": 1, "column": 52, "offset": 51 }, "indent": [] } }, { "type": "text", "value": ") with a\n size that is determined by ", "position": { "start": { "line": 1, "column": 52, "offset": 51 }, "end": { "line": 2, "column": 32, "offset": 91 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "width", "position": { "start": { "line": 2, "column": 32, "offset": 91 }, "end": { "line": 2, "column": 39, "offset": 98 }, "indent": [] } }, { "type": "text", "value": " and ", "position": { "start": { "line": 2, "column": 39, "offset": 98 }, "end": { "line": 2, "column": 44, "offset": 103 }, "indent": [] } }, { "type": "inlineCode", "value": "height", "position": { "start": { "line": 2, "column": 44, "offset": 103 }, "end": { "line": 2, "column": 52, "offset": 111 }, "indent": [] } }, { "type": "text", "value": ". Those four points are\n connected by straight lines and the sub-path is marked as closed, so\n that you can fill or stroke this rectangle.", "position": { "start": { "line": 2, "column": 52, "offset": 111 }, "end": { "line": 4, "column": 48, "offset": 255 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 48, "offset": 255 }, "indent": [ 1, 1, 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "ctx.rect(0, 30, 144, 50);", "position": { "start": { "line": 6, "column": 1, "offset": 257 }, "end": { "line": 6, "column": 28, "offset": 284 }, "indent": [] } } ], "position": { "start": { "line": 6, "column": 1, "offset": 257 }, "end": { "line": 6, "column": 28, "offset": 284 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 6, "column": 28, "offset": 284 } } }, "tags": [ { "title": "desc", "description": "Creates a path for a rectangle at position (`x`,`y`) with a\n size that is determined by `width` and `height`. Those four points are\n connected by straight lines and the sub-path is marked as closed, so\n that you can fill or stroke this rectangle.\n\n`ctx.rect(0, 30, 144, 50);`", "lineNumber": 1 }, { "title": "param", "description": "The x-axis coordinate of the rectangle's starting point", "lineNumber": 8, "type": { "type": "NameExpression", "name": "Number" }, "name": "x" }, { "title": "param", "description": "The y-axis coordinate of the rectangle's starting point", "lineNumber": 9, "type": { "type": "NameExpression", "name": "Number" }, "name": "y" }, { "title": "param", "description": "The rectangle's width", "lineNumber": 10, "type": { "type": "NameExpression", "name": "Number" }, "name": "width" }, { "title": "param", "description": "The rectangle's height", "lineNumber": 11, "type": { "type": "NameExpression", "name": "Number" }, "name": "height" } ], "loc": { "start": { "line": 298, "column": 0 }, "end": { "line": 310, "column": 2 } }, "context": { "loc": { "start": { "line": 311, "column": 0 }, "end": { "line": 311, "column": 66 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "params": [ { "name": "x", "lineNumber": 8, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The x-axis coordinate of the rectangle's starting point", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "y", "lineNumber": 9, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The y-axis coordinate of the rectangle's starting point", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "width", "lineNumber": 10, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The rectangle's width", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 22, "offset": 21 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 22, "offset": 21 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 22, "offset": 21 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "height", "lineNumber": 11, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The rectangle's height", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 23, "offset": 22 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 23, "offset": 22 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 23, "offset": 22 } } }, "type": { "type": "NameExpression", "name": "Number" } } ], "name": "rect", "kind": "function", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "rect", "kind": "function", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.rect" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Fills the current path with the current ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 41, "offset": 40 }, "indent": [] } }, { "type": "link", "url": "#fillStyle", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "fillStyle" } ], "position": { "start": { "line": 1, "column": 41, "offset": 40 }, "end": { "line": 1, "column": 69, "offset": 68 }, "indent": [] } }, { "type": "text", "value": ".", "position": { "start": { "line": 1, "column": 69, "offset": 68 }, "end": { "line": 1, "column": 70, "offset": 69 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 70, "offset": 69 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "ctx.fill();", "position": { "start": { "line": 3, "column": 1, "offset": 71 }, "end": { "line": 3, "column": 14, "offset": 84 }, "indent": [] } } ], "position": { "start": { "line": 3, "column": 1, "offset": 71 }, "end": { "line": 3, "column": 14, "offset": 84 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 14, "offset": 84 } } }, "tags": [ { "title": "desc", "description": "Fills the current path with the current {@link #fillStyle fillStyle}.\n\n`ctx.fill();`", "lineNumber": 1 } ], "loc": { "start": { "line": 313, "column": 0 }, "end": { "line": 317, "column": 2 } }, "context": { "loc": { "start": { "line": 318, "column": 0 }, "end": { "line": 318, "column": 47 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "name": "fill", "kind": "function", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "fill", "kind": "function", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.fill" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Strokes the current path with the current ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 43, "offset": 42 }, "indent": [] } }, { "type": "link", "url": "#strokeStyle", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "strokeStyle" } ], "position": { "start": { "line": 1, "column": 43, "offset": 42 }, "end": { "line": 1, "column": 75, "offset": 74 }, "indent": [] } }, { "type": "text", "value": ".", "position": { "start": { "line": 1, "column": 75, "offset": 74 }, "end": { "line": 1, "column": 76, "offset": 75 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 76, "offset": 75 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "ctx.stroke();", "position": { "start": { "line": 3, "column": 1, "offset": 77 }, "end": { "line": 3, "column": 16, "offset": 92 }, "indent": [] } } ], "position": { "start": { "line": 3, "column": 1, "offset": 77 }, "end": { "line": 3, "column": 16, "offset": 92 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 16, "offset": 92 } } }, "tags": [ { "title": "desc", "description": "Strokes the current path with the current {@link #strokeStyle strokeStyle}.\n\n`ctx.stroke();`", "lineNumber": 1 } ], "loc": { "start": { "line": 320, "column": 0 }, "end": { "line": 324, "column": 2 } }, "context": { "loc": { "start": { "line": 325, "column": 0 }, "end": { "line": 325, "column": 49 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "name": "stroke", "kind": "function", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "stroke", "kind": "function", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.stroke" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Saves the entire state of the canvas by pushing the current\n state onto a stack.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 22, "offset": 81 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 22, "offset": 81 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "ctx.save();", "position": { "start": { "line": 4, "column": 1, "offset": 83 }, "end": { "line": 4, "column": 14, "offset": 96 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 83 }, "end": { "line": 4, "column": 14, "offset": 96 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 14, "offset": 96 } } }, "tags": [ { "title": "desc", "description": "Saves the entire state of the canvas by pushing the current\n state onto a stack.\n\n`ctx.save();`", "lineNumber": 1 } ], "loc": { "start": { "line": 327, "column": 0 }, "end": { "line": 332, "column": 2 } }, "context": { "loc": { "start": { "line": 333, "column": 0 }, "end": { "line": 333, "column": 47 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "name": "save", "kind": "function", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "save", "kind": "function", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.save" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Restores the most recently saved canvas state by popping the\n top entry in the drawing state stack. If there is no saved state, this\n method does nothing.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 23, "offset": 156 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 23, "offset": 156 }, "indent": [ 1, 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "ctx.restore();", "position": { "start": { "line": 5, "column": 1, "offset": 158 }, "end": { "line": 5, "column": 17, "offset": 174 }, "indent": [] } } ], "position": { "start": { "line": 5, "column": 1, "offset": 158 }, "end": { "line": 5, "column": 17, "offset": 174 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 5, "column": 17, "offset": 174 } } }, "tags": [ { "title": "desc", "description": "Restores the most recently saved canvas state by popping the\n top entry in the drawing state stack. If there is no saved state, this\n method does nothing.\n\n`ctx.restore();`", "lineNumber": 1 } ], "loc": { "start": { "line": 335, "column": 0 }, "end": { "line": 341, "column": 2 } }, "context": { "loc": { "start": { "line": 342, "column": 0 }, "end": { "line": 342, "column": 50 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "name": "restore", "kind": "function", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "restore", "kind": "function", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.restore" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Fills a circle clockwise between startAngle and endAngle where\n 0 is the start of the circle beginning at the 3 o'clock position on a\n watchface.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 14, "offset": 149 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 14, "offset": 149 }, "indent": [ 1, 1 ] } }, { "type": "paragraph", "children": [ { "type": "text", "value": " If ", "position": { "start": { "line": 5, "column": 1, "offset": 151 }, "end": { "line": 5, "column": 6, "offset": 156 }, "indent": [] } }, { "type": "inlineCode", "value": "startAngle", "position": { "start": { "line": 5, "column": 6, "offset": 156 }, "end": { "line": 5, "column": 18, "offset": 168 }, "indent": [] } }, { "type": "text", "value": " > ", "position": { "start": { "line": 5, "column": 18, "offset": 168 }, "end": { "line": 5, "column": 21, "offset": 171 }, "indent": [] } }, { "type": "inlineCode", "value": "endAngle", "position": { "start": { "line": 5, "column": 21, "offset": 171 }, "end": { "line": 5, "column": 31, "offset": 181 }, "indent": [] } }, { "type": "text", "value": " nothing will be drawn, and if the difference\n between ", "position": { "start": { "line": 5, "column": 31, "offset": 181 }, "end": { "line": 6, "column": 12, "offset": 238 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "startAngle", "position": { "start": { "line": 6, "column": 12, "offset": 238 }, "end": { "line": 6, "column": 24, "offset": 250 }, "indent": [] } }, { "type": "text", "value": " and ", "position": { "start": { "line": 6, "column": 24, "offset": 250 }, "end": { "line": 6, "column": 29, "offset": 255 }, "indent": [] } }, { "type": "inlineCode", "value": "endAngle", "position": { "start": { "line": 6, "column": 29, "offset": 255 }, "end": { "line": 6, "column": 39, "offset": 265 }, "indent": [] } }, { "type": "text", "value": " exceeds 2Ï€, a full circle will be drawn.", "position": { "start": { "line": 6, "column": 39, "offset": 265 }, "end": { "line": 6, "column": 80, "offset": 306 }, "indent": [] } } ], "position": { "start": { "line": 5, "column": 1, "offset": 151 }, "end": { "line": 6, "column": 80, "offset": 306 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "// Draw a filled circle
ctx.fillStyle = 'white';
ctx.rockyFillRadial(72, 84, 0, 30, 0, 2 * Math.PI);", "position": { "start": { "line": 8, "column": 1, "offset": 308 }, "end": { "line": 8, "column": 109, "offset": 416 }, "indent": [] } } ], "position": { "start": { "line": 8, "column": 1, "offset": 308 }, "end": { "line": 8, "column": 109, "offset": 416 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 8, "column": 109, "offset": 416 } } }, "tags": [ { "title": "desc", "description": "Fills a circle clockwise between startAngle and endAngle where\n 0 is the start of the circle beginning at the 3 o'clock position on a\n watchface.\n\n If `startAngle` > `endAngle` nothing will be drawn, and if the difference\n between `startAngle` and `endAngle` exceeds 2Ï€, a full circle will be drawn.\n\n`// Draw a filled circle
ctx.fillStyle = 'white';
ctx.rockyFillRadial(72, 84, 0, 30, 0, 2 * Math.PI);`", "lineNumber": 1 }, { "title": "param", "description": "The x-axis coordinate of the radial's center point", "lineNumber": 10, "type": { "type": "NameExpression", "name": "Number" }, "name": "x" }, { "title": "param", "description": "The y-axis coordinate of the radial's center point", "lineNumber": 11, "type": { "type": "NameExpression", "name": "Number" }, "name": "y" }, { "title": "param", "description": "The inner radius of the circle. Use 0 for a full circle", "lineNumber": 12, "type": { "type": "NameExpression", "name": "Number" }, "name": "innerRadius" }, { "title": "param", "description": "The outer radius of the circle", "lineNumber": 13, "type": { "type": "NameExpression", "name": "Number" }, "name": "outerRadius" }, { "title": "param", "description": "Radial starting angle", "lineNumber": 14, "type": { "type": "NameExpression", "name": "Number" }, "name": "startAngle" }, { "title": "param", "description": "Radial finishing angle. If smaller than `startAngle` nothing is drawn", "lineNumber": 15, "type": { "type": "NameExpression", "name": "Number" }, "name": "endAngle" } ], "loc": { "start": { "line": 344, "column": 0 }, "end": { "line": 360, "column": 2 } }, "context": { "loc": { "start": { "line": 361, "column": 0 }, "end": { "line": 361, "column": 110 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/CanvasRenderingContext2D.js" }, "params": [ { "name": "x", "lineNumber": 10, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The x-axis coordinate of the radial's center point", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 51, "offset": 50 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 51, "offset": 50 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 51, "offset": 50 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "y", "lineNumber": 11, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The y-axis coordinate of the radial's center point", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 51, "offset": 50 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 51, "offset": 50 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 51, "offset": 50 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "innerRadius", "lineNumber": 12, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The inner radius of the circle. Use 0 for a full circle", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "outerRadius", "lineNumber": 13, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The outer radius of the circle", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 31, "offset": 30 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 31, "offset": 30 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 31, "offset": 30 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "startAngle", "lineNumber": 14, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Radial starting angle", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 22, "offset": 21 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 22, "offset": 21 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 22, "offset": 21 } } }, "type": { "type": "NameExpression", "name": "Number" } }, { "name": "endAngle", "lineNumber": 15, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Radial finishing angle. If smaller than ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 41, "offset": 40 }, "indent": [] } }, { "type": "inlineCode", "value": "startAngle", "position": { "start": { "line": 1, "column": 41, "offset": 40 }, "end": { "line": 1, "column": 53, "offset": 52 }, "indent": [] } }, { "type": "text", "value": " nothing is drawn", "position": { "start": { "line": 1, "column": 53, "offset": 52 }, "end": { "line": 1, "column": 70, "offset": 69 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 70, "offset": 69 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 70, "offset": 69 } } }, "type": { "type": "NameExpression", "name": "Number" } } ], "name": "rockyFillRadial", "kind": "function", "memberof": "CanvasRenderingContext2D", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" }, { "name": "rockyFillRadial", "kind": "function", "scope": "static" } ], "namespace": "CanvasRenderingContext2D.rockyFillRadial" } ] }, "path": [ { "name": "CanvasRenderingContext2D", "kind": "namespace" } ], "namespace": "CanvasRenderingContext2D" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "This provides an interface to the app's debugging console. ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 60, "offset": 59 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 60, "offset": 59 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": " If you're using ", "position": { "start": { "line": 3, "column": 1, "offset": 61 }, "end": { "line": 3, "column": 19, "offset": 79 }, "indent": [] } }, { "type": "link", "url": "https://cloudpebble.net", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "CloudPebble" } ], "position": { "start": { "line": 3, "column": 19, "offset": 79 }, "end": { "line": 3, "column": 62, "offset": 122 }, "indent": [] } }, { "type": "text", "value": ", these logs \n will appear when you press 'View Logs' after launching your application.", "position": { "start": { "line": 3, "column": 62, "offset": 122 }, "end": { "line": 4, "column": 75, "offset": 210 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 3, "column": 1, "offset": 61 }, "end": { "line": 4, "column": 75, "offset": 210 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "text", "value": " If you're using the local SDK, you can use the ", "position": { "start": { "line": 6, "column": 1, "offset": 212 }, "end": { "line": 6, "column": 50, "offset": 261 }, "indent": [] } }, { "type": "inlineCode", "value": "$ pebble logs", "position": { "start": { "line": 6, "column": 50, "offset": 261 }, "end": { "line": 6, "column": 65, "offset": 276 }, "indent": [] } }, { "type": "text", "value": " command or: ", "position": { "start": { "line": 6, "column": 65, "offset": 276 }, "end": { "line": 6, "column": 78, "offset": 289 }, "indent": [] } } ], "position": { "start": { "line": 6, "column": 1, "offset": 212 }, "end": { "line": 6, "column": 78, "offset": 289 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": " ", "position": { "start": { "line": 8, "column": 1, "offset": 291 }, "end": { "line": 8, "column": 3, "offset": 293 }, "indent": [] } }, { "type": "inlineCode", "value": "$ pebble install --emulator basalt --logs", "position": { "start": { "line": 8, "column": 3, "offset": 293 }, "end": { "line": 8, "column": 46, "offset": 336 }, "indent": [] } } ], "position": { "start": { "line": 8, "column": 1, "offset": 291 }, "end": { "line": 8, "column": 46, "offset": 336 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": " You can find out more about logging in our \n ", "position": { "start": { "line": 10, "column": 1, "offset": 338 }, "end": { "line": 11, "column": 3, "offset": 386 }, "indent": [ 1 ] } }, { "type": "link", "url": "/guides/debugging/debugging-with-app-logs/", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "Debugging with App Logs" } ], "position": { "start": { "line": 11, "column": 3, "offset": 386 }, "end": { "line": 11, "column": 77, "offset": 460 }, "indent": [] } }, { "type": "text", "value": " guide.", "position": { "start": { "line": 11, "column": 77, "offset": 460 }, "end": { "line": 11, "column": 84, "offset": 467 }, "indent": [] } } ], "position": { "start": { "line": 10, "column": 1, "offset": 338 }, "end": { "line": 11, "column": 84, "offset": 467 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 11, "column": 84, "offset": 467 } } }, "tags": [ { "title": "namespace", "description": null, "lineNumber": 1, "type": null, "name": "console" }, { "title": "desc", "description": "This provides an interface to the app's debugging console. \n\n If you're using {@link https://cloudpebble.net CloudPebble}, these logs \n will appear when you press 'View Logs' after launching your application.\n\n If you're using the local SDK, you can use the `$ pebble logs` command or: \n\n `$ pebble install --emulator basalt --logs`\n\n You can find out more about logging in our \n {@link /guides/debugging/debugging-with-app-logs/ Debugging with App Logs} guide.", "lineNumber": 2 } ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 14, "column": 3 } }, "context": { "loc": { "start": { "line": 15, "column": 0 }, "end": { "line": 15, "column": 27 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/Console.js" }, "kind": "namespace", "name": "console", "members": { "instance": [], "static": [ { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Outputs a message to the app's debugging console.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 50, "offset": 49 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 50, "offset": 49 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": " ", "position": { "start": { "line": 3, "column": 1, "offset": 51 }, "end": { "line": 3, "column": 3, "offset": 53 }, "indent": [] } }, { "type": "inlineCode", "value": "console.log(rocky.watchInfo.platform);", "position": { "start": { "line": 3, "column": 3, "offset": 53 }, "end": { "line": 3, "column": 43, "offset": 93 }, "indent": [] } } ], "position": { "start": { "line": 3, "column": 1, "offset": 51 }, "end": { "line": 3, "column": 43, "offset": 93 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 43, "offset": 93 } } }, "tags": [ { "title": "desc", "description": "Outputs a message to the app's debugging console.\n\n `console.log(rocky.watchInfo.platform);`", "lineNumber": 1 }, { "title": "param", "description": "One or more JavaScript objects to output. The string\n representations of each of these objects are appended together in the order\n listed and output.", "lineNumber": 5, "type": { "type": "RestType", "expression": { "type": "NameExpression", "name": "Object" } }, "name": "obj" } ], "loc": { "start": { "line": 17, "column": 0 }, "end": { "line": 25, "column": 3 } }, "context": { "loc": { "start": { "line": 26, "column": 0 }, "end": { "line": 26, "column": 33 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/Console.js" }, "params": [ { "name": "obj", "lineNumber": 5, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "One or more JavaScript objects to output. The string\n representations of each of these objects are appended together in the order\n listed and output.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 21, "offset": 151 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 21, "offset": 151 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 21, "offset": 151 } } }, "type": { "type": "RestType", "expression": { "type": "NameExpression", "name": "Object" } } } ], "name": "log", "kind": "function", "memberof": "console", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "console", "kind": "namespace" }, { "name": "log", "kind": "function", "scope": "static" } ], "namespace": "console.log" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Outputs a warning message to the app's debugging console.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 58, "offset": 57 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 58, "offset": 57 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": " ", "position": { "start": { "line": 3, "column": 1, "offset": 59 }, "end": { "line": 3, "column": 3, "offset": 61 }, "indent": [] } }, { "type": "inlineCode", "value": "console.warn('Something seems wrong');", "position": { "start": { "line": 3, "column": 3, "offset": 61 }, "end": { "line": 3, "column": 43, "offset": 101 }, "indent": [] } } ], "position": { "start": { "line": 3, "column": 1, "offset": 59 }, "end": { "line": 3, "column": 43, "offset": 101 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 43, "offset": 101 } } }, "tags": [ { "title": "desc", "description": "Outputs a warning message to the app's debugging console.\n\n `console.warn('Something seems wrong');`", "lineNumber": 1 }, { "title": "param", "description": "One or more JavaScript objects to output. The string\n representations of each of these objects are appended together in the order\n listed and output.", "lineNumber": 5, "type": { "type": "RestType", "expression": { "type": "NameExpression", "name": "Object" } }, "name": "obj" } ], "loc": { "start": { "line": 28, "column": 0 }, "end": { "line": 36, "column": 3 } }, "context": { "loc": { "start": { "line": 37, "column": 0 }, "end": { "line": 37, "column": 34 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/Console.js" }, "params": [ { "name": "obj", "lineNumber": 5, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "One or more JavaScript objects to output. The string\n representations of each of these objects are appended together in the order\n listed and output.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 21, "offset": 151 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 21, "offset": 151 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 21, "offset": 151 } } }, "type": { "type": "RestType", "expression": { "type": "NameExpression", "name": "Object" } } } ], "name": "warn", "kind": "function", "memberof": "console", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "console", "kind": "namespace" }, { "name": "warn", "kind": "function", "scope": "static" } ], "namespace": "console.warn" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Outputs an error message to the app's debugging console.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 57, "offset": 56 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 57, "offset": 56 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": " ", "position": { "start": { "line": 3, "column": 1, "offset": 58 }, "end": { "line": 3, "column": 3, "offset": 60 }, "indent": [] } }, { "type": "inlineCode", "value": "console.error(JSON.stringify(obj));", "position": { "start": { "line": 3, "column": 3, "offset": 60 }, "end": { "line": 3, "column": 40, "offset": 97 }, "indent": [] } } ], "position": { "start": { "line": 3, "column": 1, "offset": 58 }, "end": { "line": 3, "column": 40, "offset": 97 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 40, "offset": 97 } } }, "tags": [ { "title": "desc", "description": "Outputs an error message to the app's debugging console.\n\n `console.error(JSON.stringify(obj));`", "lineNumber": 1 }, { "title": "param", "description": "One or more JavaScript objects to output. The string\n representations of each of these objects are appended together in the order\n listed and output.", "lineNumber": 5, "type": { "type": "RestType", "expression": { "type": "NameExpression", "name": "Object" } }, "name": "obj" } ], "loc": { "start": { "line": 39, "column": 0 }, "end": { "line": 47, "column": 3 } }, "context": { "loc": { "start": { "line": 48, "column": 0 }, "end": { "line": 48, "column": 35 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/Console.js" }, "params": [ { "name": "obj", "lineNumber": 5, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "One or more JavaScript objects to output. The string\n representations of each of these objects are appended together in the order\n listed and output.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 21, "offset": 151 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 21, "offset": 151 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 21, "offset": 151 } } }, "type": { "type": "RestType", "expression": { "type": "NameExpression", "name": "Object" } } } ], "name": "error", "kind": "function", "memberof": "console", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "console", "kind": "namespace" }, { "name": "error", "kind": "function", "scope": "static" } ], "namespace": "console.error" } ] }, "path": [ { "name": "console", "kind": "namespace" } ], "namespace": "console" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Creates a JavaScript Date instance that represents a single moment in\n time. Date objects are based on a time value that is the number of\n milliseconds since 1 January, 1970 UTC.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 41, "offset": 178 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 41, "offset": 178 }, "indent": [ 1, 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "var d = new Date();", "position": { "start": { "line": 5, "column": 1, "offset": 180 }, "end": { "line": 5, "column": 22, "offset": 201 }, "indent": [] } } ], "position": { "start": { "line": 5, "column": 1, "offset": 180 }, "end": { "line": 5, "column": 22, "offset": 201 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "We fully implement standard JavaScript ", "position": { "start": { "line": 7, "column": 1, "offset": 203 }, "end": { "line": 7, "column": 40, "offset": 242 }, "indent": [] } }, { "type": "inlineCode", "value": "Date", "position": { "start": { "line": 7, "column": 40, "offset": 242 }, "end": { "line": 7, "column": 46, "offset": 248 }, "indent": [] } }, { "type": "text", "value": " functions, such as: ", "position": { "start": { "line": 7, "column": 46, "offset": 248 }, "end": { "line": 7, "column": 67, "offset": 269 }, "indent": [] } }, { "type": "inlineCode", "value": "getDay()", "position": { "start": { "line": 7, "column": 67, "offset": 269 }, "end": { "line": 7, "column": 77, "offset": 279 }, "indent": [] } }, { "type": "text", "value": ", ", "position": { "start": { "line": 7, "column": 77, "offset": 279 }, "end": { "line": 7, "column": 79, "offset": 281 }, "indent": [] } }, { "type": "inlineCode", "value": "getHours()", "position": { "start": { "line": 7, "column": 79, "offset": 281 }, "end": { "line": 7, "column": 91, "offset": 293 }, "indent": [] } }, { "type": "text", "value": " etc.", "position": { "start": { "line": 7, "column": 91, "offset": 293 }, "end": { "line": 7, "column": 96, "offset": 298 }, "indent": [] } } ], "position": { "start": { "line": 7, "column": 1, "offset": 203 }, "end": { "line": 7, "column": 96, "offset": 298 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "For full ", "position": { "start": { "line": 9, "column": 1, "offset": 300 }, "end": { "line": 9, "column": 10, "offset": 309 }, "indent": [] } }, { "type": "inlineCode", "value": "Date", "position": { "start": { "line": 9, "column": 10, "offset": 309 }, "end": { "line": 9, "column": 16, "offset": 315 }, "indent": [] } }, { "type": "text", "value": " documentation see:\n ", "position": { "start": { "line": 9, "column": 16, "offset": 315 }, "end": { "line": 10, "column": 2, "offset": 336 }, "indent": [ 1 ] } }, { "type": "link", "url": "https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date" } ], "position": { "start": { "line": 10, "column": 2, "offset": 336 }, "end": { "line": 10, "column": 92, "offset": 426 }, "indent": [] } } ], "position": { "start": { "line": 9, "column": 1, "offset": 300 }, "end": { "line": 10, "column": 92, "offset": 426 }, "indent": [ 1 ] } }, { "type": "heading", "depth": 3, "children": [ { "type": "text", "value": "Locale Date Methods", "position": { "start": { "line": 12, "column": 5, "offset": 432 }, "end": { "line": 12, "column": 24, "offset": 451 }, "indent": [] } } ], "position": { "start": { "line": 12, "column": 1, "offset": 428 }, "end": { "line": 12, "column": 24, "offset": 451 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "The locale date methods (", "position": { "start": { "line": 14, "column": 1, "offset": 453 }, "end": { "line": 14, "column": 26, "offset": 478 }, "indent": [] } }, { "type": "link", "url": "#toLocaleString", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "toLocaleString" } ], "position": { "start": { "line": 14, "column": 26, "offset": 478 }, "end": { "line": 14, "column": 64, "offset": 516 }, "indent": [] } }, { "type": "text", "value": ", \n ", "position": { "start": { "line": 14, "column": 64, "offset": 516 }, "end": { "line": 15, "column": 2, "offset": 520 }, "indent": [ 1 ] } }, { "type": "link", "url": "#toLocaleTimeString", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "toLocaleTimeString" } ], "position": { "start": { "line": 15, "column": 2, "offset": 520 }, "end": { "line": 15, "column": 48, "offset": 566 }, "indent": [] } }, { "type": "text", "value": " and \n ", "position": { "start": { "line": 15, "column": 48, "offset": 566 }, "end": { "line": 16, "column": 2, "offset": 573 }, "indent": [ 1 ] } }, { "type": "link", "url": "#toLocaleDateString", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "toLocaleDateString" } ], "position": { "start": { "line": 16, "column": 2, "offset": 573 }, "end": { "line": 16, "column": 48, "offset": 619 }, "indent": [] } }, { "type": "text", "value": ") are currently limited in \n their initial implementation.", "position": { "start": { "line": 16, "column": 48, "offset": 619 }, "end": { "line": 17, "column": 31, "offset": 678 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 14, "column": 1, "offset": 453 }, "end": { "line": 17, "column": 31, "offset": 678 }, "indent": [ 1, 1, 1 ] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "Available ", "position": { "start": { "line": 19, "column": 1, "offset": 680 }, "end": { "line": 19, "column": 11, "offset": 690 }, "indent": [] } }, { "type": "strong", "children": [ { "type": "text", "value": "options", "position": { "start": { "line": 19, "column": 13, "offset": 692 }, "end": { "line": 19, "column": 20, "offset": 699 }, "indent": [] } } ], "position": { "start": { "line": 19, "column": 11, "offset": 690 }, "end": { "line": 19, "column": 22, "offset": 701 }, "indent": [] } }, { "type": "text", "value": ":", "position": { "start": { "line": 19, "column": 22, "offset": 701 }, "end": { "line": 19, "column": 23, "offset": 702 }, "indent": [] } } ], "position": { "start": { "line": 19, "column": 1, "offset": 680 }, "end": { "line": 19, "column": 23, "offset": 702 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "strong", "children": [ { "type": "text", "value": "hour12", "position": { "start": { "line": 21, "column": 3, "offset": 706 }, "end": { "line": 21, "column": 9, "offset": 712 }, "indent": [] } } ], "position": { "start": { "line": 21, "column": 1, "offset": 704 }, "end": { "line": 21, "column": 11, "offset": 714 }, "indent": [] } } ], "position": { "start": { "line": 21, "column": 1, "offset": 704 }, "end": { "line": 21, "column": 11, "offset": 714 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "Use 12-hour time (as opposed to 24-hour time). Possible values are ", "position": { "start": { "line": 23, "column": 1, "offset": 716 }, "end": { "line": 23, "column": 68, "offset": 783 }, "indent": [] } }, { "type": "inlineCode", "value": "true", "position": { "start": { "line": 23, "column": 68, "offset": 783 }, "end": { "line": 23, "column": 74, "offset": 789 }, "indent": [] } }, { "type": "text", "value": " and ", "position": { "start": { "line": 23, "column": 74, "offset": 789 }, "end": { "line": 23, "column": 79, "offset": 794 }, "indent": [] } }, { "type": "inlineCode", "value": "false", "position": { "start": { "line": 23, "column": 79, "offset": 794 }, "end": { "line": 23, "column": 86, "offset": 801 }, "indent": [] } }, { "type": "text", "value": "; the default is locale dependent (Pebble setting).", "position": { "start": { "line": 23, "column": 86, "offset": 801 }, "end": { "line": 23, "column": 137, "offset": 852 }, "indent": [] } } ], "position": { "start": { "line": 23, "column": 1, "offset": 716 }, "end": { "line": 23, "column": 137, "offset": 852 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "strong", "children": [ { "type": "text", "value": "weekday", "position": { "start": { "line": 25, "column": 3, "offset": 856 }, "end": { "line": 25, "column": 10, "offset": 863 }, "indent": [] } } ], "position": { "start": { "line": 25, "column": 1, "offset": 854 }, "end": { "line": 25, "column": 12, "offset": 865 }, "indent": [] } } ], "position": { "start": { "line": 25, "column": 1, "offset": 854 }, "end": { "line": 25, "column": 12, "offset": 865 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "The representation of the weekday. Possible values are \"narrow\", \"short\", \"long\".", "position": { "start": { "line": 27, "column": 1, "offset": 867 }, "end": { "line": 27, "column": 82, "offset": 948 }, "indent": [] } } ], "position": { "start": { "line": 27, "column": 1, "offset": 867 }, "end": { "line": 27, "column": 82, "offset": 948 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "strong", "children": [ { "type": "text", "value": "year", "position": { "start": { "line": 29, "column": 3, "offset": 952 }, "end": { "line": 29, "column": 7, "offset": 956 }, "indent": [] } } ], "position": { "start": { "line": 29, "column": 1, "offset": 950 }, "end": { "line": 29, "column": 9, "offset": 958 }, "indent": [] } } ], "position": { "start": { "line": 29, "column": 1, "offset": 950 }, "end": { "line": 29, "column": 9, "offset": 958 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "The representation of the year. Possible values are \"numeric\", \"2-digit\".", "position": { "start": { "line": 31, "column": 1, "offset": 960 }, "end": { "line": 31, "column": 74, "offset": 1033 }, "indent": [] } } ], "position": { "start": { "line": 31, "column": 1, "offset": 960 }, "end": { "line": 31, "column": 74, "offset": 1033 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "strong", "children": [ { "type": "text", "value": "month", "position": { "start": { "line": 33, "column": 3, "offset": 1037 }, "end": { "line": 33, "column": 8, "offset": 1042 }, "indent": [] } } ], "position": { "start": { "line": 33, "column": 1, "offset": 1035 }, "end": { "line": 33, "column": 10, "offset": 1044 }, "indent": [] } } ], "position": { "start": { "line": 33, "column": 1, "offset": 1035 }, "end": { "line": 33, "column": 10, "offset": 1044 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "The representation of the month. Possible values are \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\".", "position": { "start": { "line": 35, "column": 1, "offset": 1046 }, "end": { "line": 35, "column": 102, "offset": 1147 }, "indent": [] } } ], "position": { "start": { "line": 35, "column": 1, "offset": 1046 }, "end": { "line": 35, "column": 102, "offset": 1147 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "strong", "children": [ { "type": "text", "value": "day", "position": { "start": { "line": 37, "column": 3, "offset": 1151 }, "end": { "line": 37, "column": 6, "offset": 1154 }, "indent": [] } } ], "position": { "start": { "line": 37, "column": 1, "offset": 1149 }, "end": { "line": 37, "column": 8, "offset": 1156 }, "indent": [] } } ], "position": { "start": { "line": 37, "column": 1, "offset": 1149 }, "end": { "line": 37, "column": 8, "offset": 1156 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "The representation of the day. Possible values are \"numeric\", \"2-digit\".", "position": { "start": { "line": 39, "column": 1, "offset": 1158 }, "end": { "line": 39, "column": 73, "offset": 1230 }, "indent": [] } } ], "position": { "start": { "line": 39, "column": 1, "offset": 1158 }, "end": { "line": 39, "column": 73, "offset": 1230 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "strong", "children": [ { "type": "text", "value": "hour", "position": { "start": { "line": 41, "column": 3, "offset": 1234 }, "end": { "line": 41, "column": 7, "offset": 1238 }, "indent": [] } } ], "position": { "start": { "line": 41, "column": 1, "offset": 1232 }, "end": { "line": 41, "column": 9, "offset": 1240 }, "indent": [] } } ], "position": { "start": { "line": 41, "column": 1, "offset": 1232 }, "end": { "line": 41, "column": 9, "offset": 1240 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "The representation of the hour. Possible values are \"numeric\", \"2-digit\".", "position": { "start": { "line": 43, "column": 1, "offset": 1242 }, "end": { "line": 43, "column": 74, "offset": 1315 }, "indent": [] } } ], "position": { "start": { "line": 43, "column": 1, "offset": 1242 }, "end": { "line": 43, "column": 74, "offset": 1315 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "strong", "children": [ { "type": "text", "value": "minute", "position": { "start": { "line": 45, "column": 3, "offset": 1319 }, "end": { "line": 45, "column": 9, "offset": 1325 }, "indent": [] } } ], "position": { "start": { "line": 45, "column": 1, "offset": 1317 }, "end": { "line": 45, "column": 11, "offset": 1327 }, "indent": [] } } ], "position": { "start": { "line": 45, "column": 1, "offset": 1317 }, "end": { "line": 45, "column": 11, "offset": 1327 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "The representation of the minute. Possible values are \"numeric\", \"2-digit\".", "position": { "start": { "line": 47, "column": 1, "offset": 1329 }, "end": { "line": 47, "column": 76, "offset": 1404 }, "indent": [] } } ], "position": { "start": { "line": 47, "column": 1, "offset": 1329 }, "end": { "line": 47, "column": 76, "offset": 1404 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "strong", "children": [ { "type": "text", "value": "second", "position": { "start": { "line": 49, "column": 3, "offset": 1408 }, "end": { "line": 49, "column": 9, "offset": 1414 }, "indent": [] } } ], "position": { "start": { "line": 49, "column": 1, "offset": 1406 }, "end": { "line": 49, "column": 11, "offset": 1416 }, "indent": [] } } ], "position": { "start": { "line": 49, "column": 1, "offset": 1406 }, "end": { "line": 49, "column": 11, "offset": 1416 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "The representation of the second. Possible values are \"numeric\", \"2-digit\".", "position": { "start": { "line": 51, "column": 1, "offset": 1418 }, "end": { "line": 51, "column": 76, "offset": 1493 }, "indent": [] } } ], "position": { "start": { "line": 51, "column": 1, "offset": 1418 }, "end": { "line": 51, "column": 76, "offset": 1493 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "Please note that locale based date and time functions have the following\n limitations at this time:", "position": { "start": { "line": 54, "column": 1, "offset": 1496 }, "end": { "line": 55, "column": 27, "offset": 1595 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 54, "column": 1, "offset": 1496 }, "end": { "line": 55, "column": 27, "offset": 1595 }, "indent": [ 1 ] } }, { "type": "list", "ordered": false, "start": null, "loose": true, "children": [ { "type": "listItem", "loose": true, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "You cannot manually specify a locale, it's automatically based upon the \ncurrent device settings. Locale is optional, or you can specify ", "position": { "start": { "line": 57, "column": 5, "offset": 1601 }, "end": { "line": 58, "column": 66, "offset": 1739 }, "indent": [ 2 ] } }, { "type": "inlineCode", "value": "undefined", "position": { "start": { "line": 58, "column": 66, "offset": 1739 }, "end": { "line": 58, "column": 77, "offset": 1750 }, "indent": [] } }, { "type": "text", "value": ".", "position": { "start": { "line": 58, "column": 77, "offset": 1750 }, "end": { "line": 58, "column": 78, "offset": 1751 }, "indent": [] } } ], "position": { "start": { "line": 57, "column": 5, "offset": 1601 }, "end": { "line": 58, "column": 78, "offset": 1751 }, "indent": [ 2 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "console.log(d.toLocaleDateString());", "position": { "start": { "line": 60, "column": 2, "offset": 1754 }, "end": { "line": 60, "column": 40, "offset": 1792 }, "indent": [] } } ], "position": { "start": { "line": 60, "column": 2, "offset": 1754 }, "end": { "line": 60, "column": 40, "offset": 1792 }, "indent": [] } } ], "position": { "start": { "line": 57, "column": 1, "offset": 1597 }, "end": { "line": 61, "column": 1, "offset": 1793 }, "indent": [ 1, 1, 1, 1 ] } }, { "type": "listItem", "loose": true, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Only a single date/time value can be requested in each method call. Do \nNOT request multiple options. e.g. ", "position": { "start": { "line": 62, "column": 5, "offset": 1798 }, "end": { "line": 63, "column": 37, "offset": 1906 }, "indent": [ 2 ] } }, { "type": "inlineCode", "value": "{hour: 'numeric', minute: '2-digit'}", "position": { "start": { "line": 63, "column": 37, "offset": 1906 }, "end": { "line": 63, "column": 75, "offset": 1944 }, "indent": [] } } ], "position": { "start": { "line": 62, "column": 5, "offset": 1798 }, "end": { "line": 63, "column": 75, "offset": 1944 }, "indent": [ 2 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "console.log(d.toLocaleTimeString(undefined, {hour: 'numeric'}));", "position": { "start": { "line": 65, "column": 2, "offset": 1947 }, "end": { "line": 65, "column": 68, "offset": 2013 }, "indent": [] } } ], "position": { "start": { "line": 65, "column": 2, "offset": 1947 }, "end": { "line": 65, "column": 68, "offset": 2013 }, "indent": [] } } ], "position": { "start": { "line": 62, "column": 1, "offset": 1794 }, "end": { "line": 65, "column": 68, "offset": 2013 }, "indent": [ 1, 1, 1 ] } } ], "position": { "start": { "line": 57, "column": 1, "offset": 1597 }, "end": { "line": 65, "column": 68, "offset": 2013 }, "indent": [ 1, 1, 1, 1, 1, 1, 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 65, "column": 68, "offset": 2013 } } }, "tags": [ { "title": "namespace", "description": null, "lineNumber": 1, "type": null, "name": "Date" }, { "title": "desc", "description": "Creates a JavaScript Date instance that represents a single moment in\n time. Date objects are based on a time value that is the number of\n milliseconds since 1 January, 1970 UTC.\n\n`var d = new Date();`\n\nWe fully implement standard JavaScript `Date` functions, such as: `getDay()`, `getHours()` etc.\n\nFor full `Date` documentation see:\n {@link https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date}\n\n### Locale Date Methods\n\nThe locale date methods ({@link #toLocaleString toLocaleString}, \n {@link #toLocaleTimeString toLocaleTimeString} and \n {@link #toLocaleDateString toLocaleDateString}) are currently limited in \n their initial implementation.\n\nAvailable **options**:\n\n**hour12**\n\nUse 12-hour time (as opposed to 24-hour time). Possible values are `true` and `false`; the default is locale dependent (Pebble setting).\n\n**weekday**\n\nThe representation of the weekday. Possible values are \"narrow\", \"short\", \"long\".\n\n**year**\n\nThe representation of the year. Possible values are \"numeric\", \"2-digit\".\n\n**month**\n\nThe representation of the month. Possible values are \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\".\n\n**day**\n\nThe representation of the day. Possible values are \"numeric\", \"2-digit\".\n\n**hour**\n\nThe representation of the hour. Possible values are \"numeric\", \"2-digit\".\n\n**minute**\n\nThe representation of the minute. Possible values are \"numeric\", \"2-digit\".\n\n**second**\n\nThe representation of the second. Possible values are \"numeric\", \"2-digit\".\n\n\nPlease note that locale based date and time functions have the following\n limitations at this time:\n\n * You cannot manually specify a locale, it's automatically based upon the \n current device settings. Locale is optional, or you can specify `undefined`.\n\n `console.log(d.toLocaleDateString());`\n\n * Only a single date/time value can be requested in each method call. Do \n NOT request multiple options. e.g. `{hour: 'numeric', minute: '2-digit'}`\n\n `console.log(d.toLocaleTimeString(undefined, {hour: 'numeric'}));`", "lineNumber": 3 } ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 69, "column": 3 } }, "context": { "loc": { "start": { "line": 70, "column": 0 }, "end": { "line": 70, "column": 24 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/Date.js" }, "kind": "namespace", "name": "Date", "members": { "instance": [], "static": [ { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "This method returns a string with a language sensitive representation\n of this date object.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 22, "offset": 91 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 22, "offset": 91 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "d.toLocaleString();", "position": { "start": { "line": 4, "column": 1, "offset": 93 }, "end": { "line": 4, "column": 22, "offset": 114 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 93 }, "end": { "line": 4, "column": 22, "offset": 114 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 22, "offset": 114 } } }, "tags": [ { "title": "desc", "description": "This method returns a string with a language sensitive representation\n of this date object.\n\n`d.toLocaleString();`", "lineNumber": 1 }, { "title": "param", "description": "(Optional) The name of the locale.", "lineNumber": 6, "type": { "type": "NameExpression", "name": "String" }, "name": "locale" }, { "title": "param", "description": "(Optional) Only a single option is currently supported.", "lineNumber": 7, "type": { "type": "NameExpression", "name": "Object" }, "name": "options" } ], "loc": { "start": { "line": 72, "column": 0 }, "end": { "line": 80, "column": 3 } }, "context": { "loc": { "start": { "line": 81, "column": 0 }, "end": { "line": 81, "column": 52 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/Date.js" }, "params": [ { "name": "locale", "lineNumber": 6, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "(Optional) The name of the locale.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 35, "offset": 34 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 35, "offset": 34 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 35, "offset": 34 } } }, "type": { "type": "NameExpression", "name": "String" } }, { "name": "options", "lineNumber": 7, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "(Optional) Only a single option is currently supported.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 } } }, "type": { "type": "NameExpression", "name": "Object" } } ], "name": "toLocaleString", "kind": "function", "memberof": "Date", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "Date", "kind": "namespace" }, { "name": "toLocaleString", "kind": "function", "scope": "static" } ], "namespace": "Date.toLocaleString" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "This method returns a string with a language sensitive representation\nof the date portion of this date object.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 41, "offset": 110 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 41, "offset": 110 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "d.toLocaleTimeString(undefined, {hour: 'numeric'});", "position": { "start": { "line": 4, "column": 1, "offset": 112 }, "end": { "line": 4, "column": 54, "offset": 165 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 112 }, "end": { "line": 4, "column": 54, "offset": 165 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 54, "offset": 165 } } }, "tags": [ { "title": "desc", "description": "This method returns a string with a language sensitive representation\nof the date portion of this date object.\n\n`d.toLocaleTimeString(undefined, {hour: 'numeric'});`", "lineNumber": 1 }, { "title": "param", "description": "(Optional) The name of the locale.", "lineNumber": 6, "type": { "type": "NameExpression", "name": "String" }, "name": "locale" }, { "title": "param", "description": "(Optional) Only a single option is currently supported.", "lineNumber": 7, "type": { "type": "NameExpression", "name": "Object" }, "name": "options" } ], "loc": { "start": { "line": 83, "column": 0 }, "end": { "line": 91, "column": 3 } }, "context": { "loc": { "start": { "line": 92, "column": 0 }, "end": { "line": 92, "column": 56 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/Date.js" }, "params": [ { "name": "locale", "lineNumber": 6, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "(Optional) The name of the locale.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 35, "offset": 34 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 35, "offset": 34 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 35, "offset": 34 } } }, "type": { "type": "NameExpression", "name": "String" } }, { "name": "options", "lineNumber": 7, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "(Optional) Only a single option is currently supported.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 } } }, "type": { "type": "NameExpression", "name": "Object" } } ], "name": "toLocaleTimeString", "kind": "function", "memberof": "Date", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "Date", "kind": "namespace" }, { "name": "toLocaleTimeString", "kind": "function", "scope": "static" } ], "namespace": "Date.toLocaleTimeString" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "This method returns a string with a language sensitive representation\nof the time portion of this date object.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 41, "offset": 110 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 41, "offset": 110 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "d.toLocaleDateString(undefined, {weekday: 'long'});", "position": { "start": { "line": 4, "column": 1, "offset": 112 }, "end": { "line": 4, "column": 54, "offset": 165 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 112 }, "end": { "line": 4, "column": 54, "offset": 165 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 54, "offset": 165 } } }, "tags": [ { "title": "desc", "description": "This method returns a string with a language sensitive representation\nof the time portion of this date object.\n\n`d.toLocaleDateString(undefined, {weekday: 'long'});`", "lineNumber": 1 }, { "title": "param", "description": "(Optional) The name of the locale.", "lineNumber": 6, "type": { "type": "NameExpression", "name": "String" }, "name": "locale" }, { "title": "param", "description": "(Optional) Only a single option is currently supported.", "lineNumber": 7, "type": { "type": "NameExpression", "name": "Object" }, "name": "options" } ], "loc": { "start": { "line": 94, "column": 0 }, "end": { "line": 102, "column": 3 } }, "context": { "loc": { "start": { "line": 103, "column": 0 }, "end": { "line": 103, "column": 41 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/Date.js" }, "params": [ { "name": "locale", "lineNumber": 6, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "(Optional) The name of the locale.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 35, "offset": 34 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 35, "offset": 34 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 35, "offset": 34 } } }, "type": { "type": "NameExpression", "name": "String" } }, { "name": "options", "lineNumber": 7, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "(Optional) Only a single option is currently supported.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 56, "offset": 55 } } }, "type": { "type": "NameExpression", "name": "Object" } } ], "name": "toLocaleDateString", "kind": "function", "memberof": "Date", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "Date", "kind": "namespace" }, { "name": "toLocaleDateString", "kind": "function", "scope": "static" } ], "namespace": "Date.toLocaleDateString" } ] }, "path": [ { "name": "Date", "kind": "namespace" } ], "namespace": "Date" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Calls a function after a specified delay.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 42, "offset": 41 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 42, "offset": 41 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "var timeoutId = setTimeout(function(...){}, 10000);", "position": { "start": { "line": 3, "column": 1, "offset": 43 }, "end": { "line": 3, "column": 54, "offset": 96 }, "indent": [] } } ], "position": { "start": { "line": 3, "column": 1, "offset": 43 }, "end": { "line": 3, "column": 54, "offset": 96 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 54, "offset": 96 } } }, "tags": [ { "title": "desc", "description": "Calls a function after a specified delay.\n\n`var timeoutId = setTimeout(function(...){}, 10000);`", "lineNumber": 1 }, { "title": "returns", "description": "timeoutId - The ID of the timeout", "lineNumber": 5, "type": { "type": "NameExpression", "name": "Number" } }, { "title": "param", "description": "The function to execute", "lineNumber": 6, "type": { "type": "NameExpression", "name": "Function" }, "name": "fct" }, { "title": "param", "description": "The delay (in ms)", "lineNumber": 7, "type": { "type": "NameExpression", "name": "Number" }, "name": "delay" } ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 11, "column": 3 } }, "context": { "loc": { "start": { "line": 12, "column": 0 }, "end": { "line": 12, "column": 38 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/global.js" }, "returns": [ { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "timeoutId - The ID of the timeout", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 34, "offset": 33 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 34, "offset": 33 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 34, "offset": 33 } } }, "type": { "type": "NameExpression", "name": "Number" } } ], "params": [ { "name": "fct", "lineNumber": 6, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The function to execute", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 24, "offset": 23 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 24, "offset": 23 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 24, "offset": 23 } } }, "type": { "type": "NameExpression", "name": "Function" } }, { "name": "delay", "lineNumber": 7, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The delay (in ms)", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 18, "offset": 17 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 18, "offset": 17 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 18, "offset": 17 } } }, "type": { "type": "NameExpression", "name": "Number" } } ], "name": "setTimeout", "kind": "function", "members": { "instance": [], "static": [] }, "path": [ { "name": "setTimeout", "kind": "function" } ], "namespace": "setTimeout" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Clears the delay set by ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 25, "offset": 24 }, "indent": [] } }, { "type": "inlineCode", "value": "setTimeout", "position": { "start": { "line": 1, "column": 25, "offset": 24 }, "end": { "line": 1, "column": 39, "offset": 38 }, "indent": [] } }, { "type": "text", "value": ".", "position": { "start": { "line": 1, "column": 39, "offset": 38 }, "end": { "line": 1, "column": 40, "offset": 39 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 40, "offset": 39 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "clearTimeout(timeoutId);", "position": { "start": { "line": 3, "column": 1, "offset": 41 }, "end": { "line": 3, "column": 27, "offset": 67 }, "indent": [] } } ], "position": { "start": { "line": 3, "column": 1, "offset": 41 }, "end": { "line": 3, "column": 27, "offset": 67 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 27, "offset": 67 } } }, "tags": [ { "title": "desc", "description": "Clears the delay set by ``setTimeout``.\n\n`clearTimeout(timeoutId);`", "lineNumber": 1 }, { "title": "param", "description": "The ID of the timeout you wish to clear.", "lineNumber": 5, "type": { "type": "NameExpression", "name": "Number" }, "name": "timeoutId" } ], "loc": { "start": { "line": 14, "column": 0 }, "end": { "line": 20, "column": 3 } }, "context": { "loc": { "start": { "line": 21, "column": 0 }, "end": { "line": 21, "column": 39 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/global.js" }, "params": [ { "name": "timeoutId", "lineNumber": 5, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The ID of the timeout you wish to clear.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 41, "offset": 40 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 41, "offset": 40 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 41, "offset": 40 } } }, "type": { "type": "NameExpression", "name": "Number" } } ], "name": "clearTimeout", "kind": "function", "members": { "instance": [], "static": [] }, "path": [ { "name": "clearTimeout", "kind": "function" } ], "namespace": "clearTimeout" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Repeatedly calls a function, with a fixed time delay between\n each call.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 12, "offset": 72 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 12, "offset": 72 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "var intervalId = setInterval(function(...){}, 10000);", "position": { "start": { "line": 4, "column": 1, "offset": 74 }, "end": { "line": 4, "column": 56, "offset": 129 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 74 }, "end": { "line": 4, "column": 56, "offset": 129 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 56, "offset": 129 } } }, "tags": [ { "title": "desc", "description": "Repeatedly calls a function, with a fixed time delay between\n each call.\n\n`var intervalId = setInterval(function(...){}, 10000);`", "lineNumber": 1 }, { "title": "returns", "description": "intervalId - The ID of the interval", "lineNumber": 6, "type": { "type": "NameExpression", "name": "Number" } }, { "title": "param", "description": "The function to execute", "lineNumber": 7, "type": { "type": "NameExpression", "name": "Function" }, "name": "fct" }, { "title": "param", "description": "The delay (in ms)", "lineNumber": 8, "type": { "type": "NameExpression", "name": "Number" }, "name": "delay" } ], "loc": { "start": { "line": 23, "column": 0 }, "end": { "line": 32, "column": 3 } }, "context": { "loc": { "start": { "line": 33, "column": 0 }, "end": { "line": 33, "column": 39 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/global.js" }, "returns": [ { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "intervalId - The ID of the interval", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 36, "offset": 35 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 36, "offset": 35 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 36, "offset": 35 } } }, "type": { "type": "NameExpression", "name": "Number" } } ], "params": [ { "name": "fct", "lineNumber": 7, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The function to execute", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 24, "offset": 23 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 24, "offset": 23 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 24, "offset": 23 } } }, "type": { "type": "NameExpression", "name": "Function" } }, { "name": "delay", "lineNumber": 8, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The delay (in ms)", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 18, "offset": 17 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 18, "offset": 17 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 18, "offset": 17 } } }, "type": { "type": "NameExpression", "name": "Number" } } ], "name": "setInterval", "kind": "function", "members": { "instance": [], "static": [] }, "path": [ { "name": "setInterval", "kind": "function" } ], "namespace": "setInterval" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Clears the interval set by ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 28, "offset": 27 }, "indent": [] } }, { "type": "inlineCode", "value": "setInterval", "position": { "start": { "line": 1, "column": 28, "offset": 27 }, "end": { "line": 1, "column": 43, "offset": 42 }, "indent": [] } }, { "type": "text", "value": ".", "position": { "start": { "line": 1, "column": 43, "offset": 42 }, "end": { "line": 1, "column": 44, "offset": 43 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 44, "offset": 43 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "clearInterval(intervalId);", "position": { "start": { "line": 3, "column": 1, "offset": 45 }, "end": { "line": 3, "column": 29, "offset": 73 }, "indent": [] } } ], "position": { "start": { "line": 3, "column": 1, "offset": 45 }, "end": { "line": 3, "column": 29, "offset": 73 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 29, "offset": 73 } } }, "tags": [ { "title": "desc", "description": "Clears the interval set by ``setInterval``.\n\n`clearInterval(intervalId);`", "lineNumber": 1 }, { "title": "param", "description": "The ID of the interval you wish to clear", "lineNumber": 5, "type": { "type": "NameExpression", "name": "Number" }, "name": "intervalId" } ], "loc": { "start": { "line": 35, "column": 0 }, "end": { "line": 41, "column": 3 } }, "context": { "loc": { "start": { "line": 42, "column": 0 }, "end": { "line": 42, "column": 41 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/global.js" }, "params": [ { "name": "intervalId", "lineNumber": 5, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The ID of the interval you wish to clear", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 41, "offset": 40 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 41, "offset": 40 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 41, "offset": 40 } } }, "type": { "type": "NameExpression", "name": "Number" } } ], "name": "clearInterval", "kind": "function", "members": { "instance": [], "static": [] }, "path": [ { "name": "clearInterval", "kind": "function" } ], "namespace": "clearInterval" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Provides an interface for interacting with application context and\n events. Developers can access the Rocky object with the following line of\n code:", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 9, "offset": 152 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 9, "offset": 152 }, "indent": [ 1, 1 ] } }, { "type": "paragraph", "children": [ { "type": "text", "value": " ", "position": { "start": { "line": 5, "column": 1, "offset": 154 }, "end": { "line": 5, "column": 4, "offset": 157 }, "indent": [] } }, { "type": "inlineCode", "value": "var rocky = require('rocky');", "position": { "start": { "line": 5, "column": 4, "offset": 157 }, "end": { "line": 5, "column": 35, "offset": 188 }, "indent": [] } } ], "position": { "start": { "line": 5, "column": 1, "offset": 154 }, "end": { "line": 5, "column": 35, "offset": 188 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 5, "column": 35, "offset": 188 } } }, "tags": [ { "title": "namespace", "description": null, "lineNumber": 1, "type": null, "name": "rocky" }, { "title": "desc", "description": "Provides an interface for interacting with application context and\n events. Developers can access the Rocky object with the following line of\n code:\n\n `var rocky = require('rocky');`", "lineNumber": 3 } ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 10, "column": 3 } }, "context": { "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 138, "column": 2 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/rocky.js" }, "kind": "namespace", "name": "rocky", "members": { "instance": [], "static": [ { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The callback function signature to be used with the ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 53, "offset": 52 }, "indent": [] } }, { "type": "inlineCode", "value": "postmessageerror", "position": { "start": { "line": 1, "column": 53, "offset": 52 }, "end": { "line": 1, "column": 71, "offset": 70 }, "indent": [] } }, { "type": "text", "value": "\n ", "position": { "start": { "line": 1, "column": 71, "offset": 70 }, "end": { "line": 2, "column": 4, "offset": 74 }, "indent": [ 1 ] } }, { "type": "link", "url": "#on", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "event" } ], "position": { "start": { "line": 2, "column": 4, "offset": 74 }, "end": { "line": 2, "column": 21, "offset": 91 }, "indent": [] } }, { "type": "text", "value": ".", "position": { "start": { "line": 2, "column": 21, "offset": 91 }, "end": { "line": 2, "column": 22, "offset": 92 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 22, "offset": 92 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 22, "offset": 92 } } }, "tags": [ { "title": "typedef", "description": null, "lineNumber": 1, "type": { "type": "NameExpression", "name": "Function" }, "name": "RockyPostMessageErrorCallback" }, { "title": "desc", "description": "The callback function signature to be used with the `postmessageerror`\n {@link #on event}.", "lineNumber": 2 }, { "title": "param", "description": "An object containing information about the event:\n * `type` - The type of event which was triggered.\n * `data` - The data failed to send within the message.", "lineNumber": 5, "type": { "type": "NameExpression", "name": "Object" }, "name": "event" } ], "loc": { "start": { "line": 72, "column": 2 }, "end": { "line": 80, "column": 5 } }, "context": { "loc": { "start": { "line": 129, "column": 2 }, "end": { "line": 129, "column": 11 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/rocky.js" }, "kind": "typedef", "name": "RockyPostMessageErrorCallback", "type": { "type": "NameExpression", "name": "Function" }, "params": [ { "name": "event", "lineNumber": 5, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "An object containing information about the event:", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 50, "offset": 49 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 50, "offset": 49 }, "indent": [] } }, { "type": "list", "ordered": false, "start": null, "loose": false, "children": [ { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "type", "position": { "start": { "line": 2, "column": 5, "offset": 54 }, "end": { "line": 2, "column": 11, "offset": 60 }, "indent": [] } }, { "type": "text", "value": " - The type of event which was triggered.", "position": { "start": { "line": 2, "column": 11, "offset": 60 }, "end": { "line": 2, "column": 52, "offset": 101 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 5, "offset": 54 }, "end": { "line": 2, "column": 52, "offset": 101 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 1, "offset": 50 }, "end": { "line": 2, "column": 52, "offset": 101 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "data", "position": { "start": { "line": 3, "column": 5, "offset": 106 }, "end": { "line": 3, "column": 11, "offset": 112 }, "indent": [] } }, { "type": "text", "value": " - The data failed to send within the message.", "position": { "start": { "line": 3, "column": 11, "offset": 112 }, "end": { "line": 3, "column": 57, "offset": 158 }, "indent": [] } } ], "position": { "start": { "line": 3, "column": 5, "offset": 106 }, "end": { "line": 3, "column": 57, "offset": 158 }, "indent": [] } } ], "position": { "start": { "line": 3, "column": 1, "offset": 102 }, "end": { "line": 3, "column": 57, "offset": 158 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 1, "offset": 50 }, "end": { "line": 3, "column": 57, "offset": 158 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 57, "offset": 158 } } }, "type": { "type": "NameExpression", "name": "Object" } } ], "memberof": "rocky", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "rocky", "kind": "namespace" }, { "name": "RockyPostMessageErrorCallback", "kind": "typedef", "scope": "static" } ], "namespace": "rocky.RockyPostMessageErrorCallback" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The callback function signature to be used with the ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 53, "offset": 52 }, "indent": [] } }, { "type": "inlineCode", "value": "postmessageconnected", "position": { "start": { "line": 1, "column": 53, "offset": 52 }, "end": { "line": 1, "column": 75, "offset": 74 }, "indent": [] } }, { "type": "text", "value": "\n ", "position": { "start": { "line": 1, "column": 75, "offset": 74 }, "end": { "line": 2, "column": 4, "offset": 78 }, "indent": [ 1 ] } }, { "type": "link", "url": "#on", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "event" } ], "position": { "start": { "line": 2, "column": 4, "offset": 78 }, "end": { "line": 2, "column": 21, "offset": 95 }, "indent": [] } }, { "type": "text", "value": ".", "position": { "start": { "line": 2, "column": 21, "offset": 95 }, "end": { "line": 2, "column": 22, "offset": 96 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 22, "offset": 96 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 22, "offset": 96 } } }, "tags": [ { "title": "typedef", "description": null, "lineNumber": 1, "type": { "type": "NameExpression", "name": "Function" }, "name": "RockyPostMessageConnectedCallback" }, { "title": "desc", "description": "The callback function signature to be used with the `postmessageconnected`\n {@link #on event}.", "lineNumber": 2 }, { "title": "param", "description": "An object containing information about the event:\n * `type` - The type of event which was triggered.", "lineNumber": 5, "type": { "type": "NameExpression", "name": "Object" }, "name": "event" } ], "loc": { "start": { "line": 82, "column": 2 }, "end": { "line": 89, "column": 5 } }, "context": { "loc": { "start": { "line": 129, "column": 2 }, "end": { "line": 129, "column": 11 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/rocky.js" }, "kind": "typedef", "name": "RockyPostMessageConnectedCallback", "type": { "type": "NameExpression", "name": "Function" }, "params": [ { "name": "event", "lineNumber": 5, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "An object containing information about the event:", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 50, "offset": 49 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 50, "offset": 49 }, "indent": [] } }, { "type": "list", "ordered": false, "start": null, "loose": false, "children": [ { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "type", "position": { "start": { "line": 2, "column": 5, "offset": 54 }, "end": { "line": 2, "column": 11, "offset": 60 }, "indent": [] } }, { "type": "text", "value": " - The type of event which was triggered.", "position": { "start": { "line": 2, "column": 11, "offset": 60 }, "end": { "line": 2, "column": 52, "offset": 101 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 5, "offset": 54 }, "end": { "line": 2, "column": 52, "offset": 101 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 1, "offset": 50 }, "end": { "line": 2, "column": 52, "offset": 101 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 1, "offset": 50 }, "end": { "line": 2, "column": 52, "offset": 101 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 52, "offset": 101 } } }, "type": { "type": "NameExpression", "name": "Object" } } ], "memberof": "rocky", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "rocky", "kind": "namespace" }, { "name": "RockyPostMessageConnectedCallback", "kind": "typedef", "scope": "static" } ], "namespace": "rocky.RockyPostMessageConnectedCallback" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Provides information about the currently connected Pebble smartwatch.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 70, "offset": 69 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 70, "offset": 69 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 70, "offset": 69 } } }, "tags": [ { "title": "typedef", "description": null, "lineNumber": 1, "type": { "type": "NameExpression", "name": "Object" }, "name": "WatchInfo" }, { "title": "desc", "description": "Provides information about the currently connected Pebble smartwatch.", "lineNumber": 2 }, { "title": "property", "description": "The name of the Pebble model. (e.g. pebble_time_round_silver_20mm)", "lineNumber": 4, "type": { "type": "NameExpression", "name": "String" }, "name": "model" }, { "title": "property", "description": "The name of the Pebble platform. (e.g. basalt)", "lineNumber": 5, "type": { "type": "NameExpression", "name": "String" }, "name": "platform" }, { "title": "property", "description": "Not available yet.", "lineNumber": 6, "type": { "type": "NameExpression", "name": "String" }, "name": "language" }, { "title": "property", "description": "An object with the following fields:\n * `major` - The major version of the smartwatch's firmware.\n * `minor` - The minor version of the smartwatch's firmware.\n * `patch` - The patch version of the smartwatch's firmware.\n * `suffix` - The suffix of the smartwatch's firmware. (e.g. beta3)", "lineNumber": 7, "type": { "type": "NameExpression", "name": "String" }, "name": "firmware" } ], "loc": { "start": { "line": 12, "column": 2 }, "end": { "line": 24, "column": 4 } }, "context": { "loc": { "start": { "line": 129, "column": 2 }, "end": { "line": 129, "column": 11 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/rocky.js" }, "kind": "typedef", "name": "WatchInfo", "type": { "type": "NameExpression", "name": "Object" }, "properties": [ { "name": "model", "lineNumber": 4, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The name of the Pebble model. (e.g. pebble_time_round_silver_20mm)", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 67, "offset": 66 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 67, "offset": 66 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 67, "offset": 66 } } }, "type": { "type": "NameExpression", "name": "String" } }, { "name": "platform", "lineNumber": 5, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The name of the Pebble platform. (e.g. basalt)", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 47, "offset": 46 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 47, "offset": 46 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 47, "offset": 46 } } }, "type": { "type": "NameExpression", "name": "String" } }, { "name": "language", "lineNumber": 6, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Not available yet.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 19, "offset": 18 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 19, "offset": 18 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 19, "offset": 18 } } }, "type": { "type": "NameExpression", "name": "String" } }, { "name": "firmware", "lineNumber": 7, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "An object with the following fields:", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 37, "offset": 36 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 37, "offset": 36 }, "indent": [] } }, { "type": "list", "ordered": false, "start": null, "loose": false, "children": [ { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "major", "position": { "start": { "line": 2, "column": 5, "offset": 41 }, "end": { "line": 2, "column": 12, "offset": 48 }, "indent": [] } }, { "type": "text", "value": " - The major version of the smartwatch's firmware.", "position": { "start": { "line": 2, "column": 12, "offset": 48 }, "end": { "line": 2, "column": 62, "offset": 98 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 5, "offset": 41 }, "end": { "line": 2, "column": 62, "offset": 98 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 1, "offset": 37 }, "end": { "line": 2, "column": 62, "offset": 98 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "minor", "position": { "start": { "line": 3, "column": 5, "offset": 103 }, "end": { "line": 3, "column": 12, "offset": 110 }, "indent": [] } }, { "type": "text", "value": " - The minor version of the smartwatch's firmware.", "position": { "start": { "line": 3, "column": 12, "offset": 110 }, "end": { "line": 3, "column": 62, "offset": 160 }, "indent": [] } } ], "position": { "start": { "line": 3, "column": 5, "offset": 103 }, "end": { "line": 3, "column": 62, "offset": 160 }, "indent": [] } } ], "position": { "start": { "line": 3, "column": 1, "offset": 99 }, "end": { "line": 3, "column": 62, "offset": 160 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "patch", "position": { "start": { "line": 4, "column": 5, "offset": 165 }, "end": { "line": 4, "column": 12, "offset": 172 }, "indent": [] } }, { "type": "text", "value": " - The patch version of the smartwatch's firmware.", "position": { "start": { "line": 4, "column": 12, "offset": 172 }, "end": { "line": 4, "column": 62, "offset": 222 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 5, "offset": 165 }, "end": { "line": 4, "column": 62, "offset": 222 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 161 }, "end": { "line": 4, "column": 62, "offset": 222 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "suffix", "position": { "start": { "line": 5, "column": 5, "offset": 227 }, "end": { "line": 5, "column": 13, "offset": 235 }, "indent": [] } }, { "type": "text", "value": " - The suffix of the smartwatch's firmware. (e.g. beta3)", "position": { "start": { "line": 5, "column": 13, "offset": 235 }, "end": { "line": 5, "column": 69, "offset": 291 }, "indent": [] } } ], "position": { "start": { "line": 5, "column": 5, "offset": 227 }, "end": { "line": 5, "column": 69, "offset": 291 }, "indent": [] } } ], "position": { "start": { "line": 5, "column": 1, "offset": 223 }, "end": { "line": 5, "column": 69, "offset": 291 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 1, "offset": 37 }, "end": { "line": 5, "column": 69, "offset": 291 }, "indent": [ 1, 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 5, "column": 69, "offset": 291 } } }, "type": { "type": "NameExpression", "name": "String" } } ], "memberof": "rocky", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "rocky", "kind": "namespace" }, { "name": "WatchInfo", "kind": "typedef", "scope": "static" } ], "namespace": "rocky.WatchInfo" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "A ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 3, "offset": 2 }, "indent": [] } }, { "type": "link", "url": "#WatchInfo", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "WatchInfo" } ], "position": { "start": { "line": 1, "column": 3, "offset": 2 }, "end": { "line": 1, "column": 31, "offset": 30 }, "indent": [] } }, { "type": "text", "value": " object containing information about the\n connected Pebble smartwatch.", "position": { "start": { "line": 1, "column": 31, "offset": 30 }, "end": { "line": 2, "column": 31, "offset": 101 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 31, "offset": 101 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "console.log(rocky.watchInfo.model);
> pebble_2_hr_lime", "position": { "start": { "line": 4, "column": 1, "offset": 103 }, "end": { "line": 4, "column": 63, "offset": 165 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 103 }, "end": { "line": 4, "column": 63, "offset": 165 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 63, "offset": 165 } } }, "tags": [ { "title": "desc", "description": "A {@link #WatchInfo WatchInfo} object containing information about the\n connected Pebble smartwatch.\n\n`console.log(rocky.watchInfo.model);
> pebble_2_hr_lime`", "lineNumber": 1 } ], "loc": { "start": { "line": 122, "column": 2 }, "end": { "line": 128, "column": 4 } }, "context": { "loc": { "start": { "line": 129, "column": 2 }, "end": { "line": 129, "column": 11 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/rocky.js" }, "name": "watchInfo", "memberof": "rocky", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "rocky", "kind": "namespace" }, { "name": "watchInfo", "scope": "static" } ], "namespace": "rocky.watchInfo" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The callback function signature to be used with the ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 53, "offset": 52 }, "indent": [] } }, { "type": "inlineCode", "value": "memorypressure", "position": { "start": { "line": 1, "column": 53, "offset": 52 }, "end": { "line": 1, "column": 69, "offset": 68 }, "indent": [] } }, { "type": "text", "value": "\n ", "position": { "start": { "line": 1, "column": 69, "offset": 68 }, "end": { "line": 2, "column": 4, "offset": 72 }, "indent": [ 1 ] } }, { "type": "link", "url": "#on", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "event" } ], "position": { "start": { "line": 2, "column": 4, "offset": 72 }, "end": { "line": 2, "column": 21, "offset": 89 }, "indent": [] } }, { "type": "text", "value": ".", "position": { "start": { "line": 2, "column": 21, "offset": 89 }, "end": { "line": 2, "column": 22, "offset": 90 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 22, "offset": 90 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 22, "offset": 90 } } }, "tags": [ { "title": "typedef", "description": null, "lineNumber": 1, "type": { "type": "NameExpression", "name": "Function" }, "name": "RockyMemoryPressureCallback" }, { "title": "desc", "description": "The callback function signature to be used with the `memorypressure`\n {@link #on event}.", "lineNumber": 2 }, { "title": "param", "description": "An object containing information about the event:\n * `level` (String) - The current level of memory pressure.\n\n * `high` - This is a critical level, indicating that the application will \n be terminated if memory isn't immediately free'd.\n\n Important Notes:\n - Avoid creating any new objects/arrays/strings when this level is raised.\n - Drop object properties you don't need using the `delete` operator or by assigning `undefined` to it.\n - Don't use the `in` operator in the handler for large objects/arrays. Avoid `for (var x in y)` due to memory constraints.\n - Array has large memory requirements for certain operations/methods. Avoid `Array.pop()`, `Array.slice` and length assignment `Array.length = 123`, on large arrays.\n\n * `normal` - Not yet implemented.\n\n * `low` - Not yet implemented.", "lineNumber": 5, "type": { "type": "NameExpression", "name": "Object" }, "name": "event" } ], "loc": { "start": { "line": 100, "column": 2 }, "end": { "line": 120, "column": 5 } }, "context": { "loc": { "start": { "line": 129, "column": 2 }, "end": { "line": 129, "column": 11 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/rocky.js" }, "kind": "typedef", "name": "RockyMemoryPressureCallback", "type": { "type": "NameExpression", "name": "Function" }, "params": [ { "name": "event", "lineNumber": 5, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "An object containing information about the event:", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 50, "offset": 49 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 50, "offset": 49 }, "indent": [] } }, { "type": "list", "ordered": false, "start": null, "loose": true, "children": [ { "type": "listItem", "loose": true, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "level", "position": { "start": { "line": 2, "column": 4, "offset": 53 }, "end": { "line": 2, "column": 11, "offset": 60 }, "indent": [] } }, { "type": "text", "value": " (String) - The current level of memory pressure.", "position": { "start": { "line": 2, "column": 11, "offset": 60 }, "end": { "line": 2, "column": 60, "offset": 109 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 4, "offset": 53 }, "end": { "line": 2, "column": 60, "offset": 109 }, "indent": [] } }, { "type": "list", "ordered": false, "start": null, "loose": true, "children": [ { "type": "listItem", "loose": true, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "high", "position": { "start": { "line": 4, "column": 7, "offset": 117 }, "end": { "line": 4, "column": 13, "offset": 123 }, "indent": [] } }, { "type": "text", "value": " - This is a critical level, indicating that the application will \nbe terminated if memory isn't immediately free'd.", "position": { "start": { "line": 4, "column": 13, "offset": 123 }, "end": { "line": 5, "column": 56, "offset": 245 }, "indent": [ 7 ] } } ], "position": { "start": { "line": 4, "column": 7, "offset": 117 }, "end": { "line": 5, "column": 56, "offset": 245 }, "indent": [ 7 ] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "Important Notes:", "position": { "start": { "line": 7, "column": 7, "offset": 253 }, "end": { "line": 7, "column": 23, "offset": 269 }, "indent": [] } } ], "position": { "start": { "line": 7, "column": 7, "offset": 253 }, "end": { "line": 7, "column": 23, "offset": 269 }, "indent": [] } }, { "type": "list", "ordered": false, "start": null, "loose": false, "children": [ { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Avoid creating any new objects/arrays/strings when this level is raised.", "position": { "start": { "line": 8, "column": 9, "offset": 278 }, "end": { "line": 8, "column": 81, "offset": 350 }, "indent": [] } } ], "position": { "start": { "line": 8, "column": 9, "offset": 278 }, "end": { "line": 8, "column": 81, "offset": 350 }, "indent": [] } } ], "position": { "start": { "line": 8, "column": 7, "offset": 276 }, "end": { "line": 8, "column": 81, "offset": 350 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Drop object properties you don't need using the ", "position": { "start": { "line": 9, "column": 9, "offset": 359 }, "end": { "line": 9, "column": 57, "offset": 407 }, "indent": [] } }, { "type": "inlineCode", "value": "delete", "position": { "start": { "line": 9, "column": 57, "offset": 407 }, "end": { "line": 9, "column": 65, "offset": 415 }, "indent": [] } }, { "type": "text", "value": " operator or by assigning ", "position": { "start": { "line": 9, "column": 65, "offset": 415 }, "end": { "line": 9, "column": 91, "offset": 441 }, "indent": [] } }, { "type": "inlineCode", "value": "undefined", "position": { "start": { "line": 9, "column": 91, "offset": 441 }, "end": { "line": 9, "column": 102, "offset": 452 }, "indent": [] } }, { "type": "text", "value": " to it.", "position": { "start": { "line": 9, "column": 102, "offset": 452 }, "end": { "line": 9, "column": 109, "offset": 459 }, "indent": [] } } ], "position": { "start": { "line": 9, "column": 9, "offset": 359 }, "end": { "line": 9, "column": 109, "offset": 459 }, "indent": [] } } ], "position": { "start": { "line": 9, "column": 7, "offset": 357 }, "end": { "line": 9, "column": 109, "offset": 459 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Don't use the ", "position": { "start": { "line": 10, "column": 9, "offset": 468 }, "end": { "line": 10, "column": 23, "offset": 482 }, "indent": [] } }, { "type": "inlineCode", "value": "in", "position": { "start": { "line": 10, "column": 23, "offset": 482 }, "end": { "line": 10, "column": 27, "offset": 486 }, "indent": [] } }, { "type": "text", "value": " operator in the handler for large objects/arrays. Avoid ", "position": { "start": { "line": 10, "column": 27, "offset": 486 }, "end": { "line": 10, "column": 84, "offset": 543 }, "indent": [] } }, { "type": "inlineCode", "value": "for (var x in y)", "position": { "start": { "line": 10, "column": 84, "offset": 543 }, "end": { "line": 10, "column": 102, "offset": 561 }, "indent": [] } }, { "type": "text", "value": " due to memory constraints.", "position": { "start": { "line": 10, "column": 102, "offset": 561 }, "end": { "line": 10, "column": 129, "offset": 588 }, "indent": [] } } ], "position": { "start": { "line": 10, "column": 9, "offset": 468 }, "end": { "line": 10, "column": 129, "offset": 588 }, "indent": [] } } ], "position": { "start": { "line": 10, "column": 7, "offset": 466 }, "end": { "line": 10, "column": 129, "offset": 588 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Array has large memory requirements for certain operations/methods. Avoid ", "position": { "start": { "line": 11, "column": 9, "offset": 597 }, "end": { "line": 11, "column": 83, "offset": 671 }, "indent": [] } }, { "type": "inlineCode", "value": "Array.pop()", "position": { "start": { "line": 11, "column": 83, "offset": 671 }, "end": { "line": 11, "column": 96, "offset": 684 }, "indent": [] } }, { "type": "text", "value": ", ", "position": { "start": { "line": 11, "column": 96, "offset": 684 }, "end": { "line": 11, "column": 98, "offset": 686 }, "indent": [] } }, { "type": "inlineCode", "value": "Array.slice", "position": { "start": { "line": 11, "column": 98, "offset": 686 }, "end": { "line": 11, "column": 111, "offset": 699 }, "indent": [] } }, { "type": "text", "value": " and length assignment ", "position": { "start": { "line": 11, "column": 111, "offset": 699 }, "end": { "line": 11, "column": 134, "offset": 722 }, "indent": [] } }, { "type": "inlineCode", "value": "Array.length = 123", "position": { "start": { "line": 11, "column": 134, "offset": 722 }, "end": { "line": 11, "column": 154, "offset": 742 }, "indent": [] } }, { "type": "text", "value": ", on large arrays.", "position": { "start": { "line": 11, "column": 154, "offset": 742 }, "end": { "line": 11, "column": 172, "offset": 760 }, "indent": [] } } ], "position": { "start": { "line": 11, "column": 9, "offset": 597 }, "end": { "line": 11, "column": 172, "offset": 760 }, "indent": [] } } ], "position": { "start": { "line": 11, "column": 7, "offset": 595 }, "end": { "line": 11, "column": 172, "offset": 760 }, "indent": [] } } ], "position": { "start": { "line": 8, "column": 7, "offset": 276 }, "end": { "line": 11, "column": 172, "offset": 760 }, "indent": [ 7, 7, 7 ] } } ], "position": { "start": { "line": 4, "column": 4, "offset": 114 }, "end": { "line": 12, "column": 1, "offset": 761 }, "indent": [ 4, 1, 4, 4, 4, 4, 4, 1 ] } }, { "type": "listItem", "loose": true, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "normal", "position": { "start": { "line": 13, "column": 7, "offset": 768 }, "end": { "line": 13, "column": 15, "offset": 776 }, "indent": [] } }, { "type": "text", "value": " - Not yet implemented.", "position": { "start": { "line": 13, "column": 15, "offset": 776 }, "end": { "line": 13, "column": 38, "offset": 799 }, "indent": [] } } ], "position": { "start": { "line": 13, "column": 7, "offset": 768 }, "end": { "line": 13, "column": 38, "offset": 799 }, "indent": [] } } ], "position": { "start": { "line": 13, "column": 4, "offset": 765 }, "end": { "line": 14, "column": 1, "offset": 800 }, "indent": [ 1 ] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "low", "position": { "start": { "line": 15, "column": 7, "offset": 807 }, "end": { "line": 15, "column": 12, "offset": 812 }, "indent": [] } }, { "type": "text", "value": " - Not yet implemented.", "position": { "start": { "line": 15, "column": 12, "offset": 812 }, "end": { "line": 15, "column": 35, "offset": 835 }, "indent": [] } } ], "position": { "start": { "line": 15, "column": 7, "offset": 807 }, "end": { "line": 15, "column": 35, "offset": 835 }, "indent": [] } } ], "position": { "start": { "line": 15, "column": 4, "offset": 804 }, "end": { "line": 15, "column": 35, "offset": 835 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 4, "offset": 114 }, "end": { "line": 15, "column": 35, "offset": 835 }, "indent": [ 4, 1, 4, 4, 4, 4, 4, 1, 4, 1, 4 ] } } ], "position": { "start": { "line": 2, "column": 1, "offset": 50 }, "end": { "line": 15, "column": 35, "offset": 835 }, "indent": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] } } ], "position": { "start": { "line": 2, "column": 1, "offset": 50 }, "end": { "line": 15, "column": 35, "offset": 835 }, "indent": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 15, "column": 35, "offset": 835 } } }, "type": { "type": "NameExpression", "name": "Object" } } ], "memberof": "rocky", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "rocky", "kind": "namespace" }, { "name": "RockyMemoryPressureCallback", "kind": "typedef", "scope": "static" } ], "namespace": "rocky.RockyMemoryPressureCallback" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The callback function signature to be used with the ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 53, "offset": 52 }, "indent": [] } }, { "type": "inlineCode", "value": "postmessagedisconnected", "position": { "start": { "line": 1, "column": 53, "offset": 52 }, "end": { "line": 1, "column": 78, "offset": 77 }, "indent": [] } }, { "type": "text", "value": "\n ", "position": { "start": { "line": 1, "column": 78, "offset": 77 }, "end": { "line": 2, "column": 4, "offset": 81 }, "indent": [ 1 ] } }, { "type": "link", "url": "#on", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "event" } ], "position": { "start": { "line": 2, "column": 4, "offset": 81 }, "end": { "line": 2, "column": 21, "offset": 98 }, "indent": [] } }, { "type": "text", "value": ".", "position": { "start": { "line": 2, "column": 21, "offset": 98 }, "end": { "line": 2, "column": 22, "offset": 99 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 22, "offset": 99 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 22, "offset": 99 } } }, "tags": [ { "title": "typedef", "description": null, "lineNumber": 1, "type": { "type": "NameExpression", "name": "Function" }, "name": "RockyPostMessageDisconnectedCallback" }, { "title": "desc", "description": "The callback function signature to be used with the `postmessagedisconnected`\n {@link #on event}.", "lineNumber": 2 }, { "title": "param", "description": "An object containing information about the event:\n * `type` - The type of event which was triggered.", "lineNumber": 5, "type": { "type": "NameExpression", "name": "Object" }, "name": "event" } ], "loc": { "start": { "line": 91, "column": 2 }, "end": { "line": 98, "column": 5 } }, "context": { "loc": { "start": { "line": 129, "column": 2 }, "end": { "line": 129, "column": 11 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/rocky.js" }, "kind": "typedef", "name": "RockyPostMessageDisconnectedCallback", "type": { "type": "NameExpression", "name": "Function" }, "params": [ { "name": "event", "lineNumber": 5, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "An object containing information about the event:", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 50, "offset": 49 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 50, "offset": 49 }, "indent": [] } }, { "type": "list", "ordered": false, "start": null, "loose": false, "children": [ { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "type", "position": { "start": { "line": 2, "column": 5, "offset": 54 }, "end": { "line": 2, "column": 11, "offset": 60 }, "indent": [] } }, { "type": "text", "value": " - The type of event which was triggered.", "position": { "start": { "line": 2, "column": 11, "offset": 60 }, "end": { "line": 2, "column": 52, "offset": 101 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 5, "offset": 54 }, "end": { "line": 2, "column": 52, "offset": 101 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 1, "offset": 50 }, "end": { "line": 2, "column": 52, "offset": 101 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 1, "offset": 50 }, "end": { "line": 2, "column": 52, "offset": 101 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 52, "offset": 101 } } }, "type": { "type": "NameExpression", "name": "Object" } } ], "memberof": "rocky", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "rocky", "kind": "namespace" }, { "name": "RockyPostMessageDisconnectedCallback", "kind": "typedef", "scope": "static" } ], "namespace": "rocky.RockyPostMessageDisconnectedCallback" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Provides access to user related settings from the currently connected Pebble smartwatch. \n The size itself will vary between platforms, see the \n ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 7, "offset": 156 }, "indent": [ 1, 1 ] } }, { "type": "link", "url": "/guides/user-interfaces/content-size/", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "ContentSize guide" } ], "position": { "start": { "line": 3, "column": 7, "offset": 156 }, "end": { "line": 3, "column": 70, "offset": 219 }, "indent": [] } }, { "type": "text", "value": " for more information.", "position": { "start": { "line": 3, "column": 70, "offset": 219 }, "end": { "line": 3, "column": 92, "offset": 241 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 92, "offset": 241 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 92, "offset": 241 } } }, "tags": [ { "title": "typedef", "description": null, "lineNumber": 1, "type": { "type": "NameExpression", "name": "Object" }, "name": "UserPreferences" }, { "title": "desc", "description": "Provides access to user related settings from the currently connected Pebble smartwatch. \n The size itself will vary between platforms, see the \n {@link /guides/user-interfaces/content-size/ ContentSize guide} for more information.", "lineNumber": 2 }, { "title": "property", "description": "Pebble > System > Notifications > Text Size:\n * `small` - Not available on Emery.\n * `medium` - The default setting.\n * `large` - The default setting on Emery.\n * `x-large` - Only available on Emery.", "lineNumber": 6, "type": { "type": "NameExpression", "name": "String" }, "name": "contentSize" } ], "loc": { "start": { "line": 26, "column": 2 }, "end": { "line": 37, "column": 4 } }, "context": { "loc": { "start": { "line": 129, "column": 2 }, "end": { "line": 129, "column": 11 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/rocky.js" }, "kind": "typedef", "name": "UserPreferences", "type": { "type": "NameExpression", "name": "Object" }, "properties": [ { "name": "contentSize", "lineNumber": 6, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Pebble > System > Notifications > Text Size:", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 45, "offset": 44 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 45, "offset": 44 }, "indent": [] } }, { "type": "list", "ordered": false, "start": null, "loose": false, "children": [ { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "small", "position": { "start": { "line": 2, "column": 5, "offset": 49 }, "end": { "line": 2, "column": 12, "offset": 56 }, "indent": [] } }, { "type": "text", "value": " - Not available on Emery.", "position": { "start": { "line": 2, "column": 12, "offset": 56 }, "end": { "line": 2, "column": 38, "offset": 82 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 5, "offset": 49 }, "end": { "line": 2, "column": 38, "offset": 82 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 1, "offset": 45 }, "end": { "line": 2, "column": 38, "offset": 82 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "medium", "position": { "start": { "line": 3, "column": 5, "offset": 87 }, "end": { "line": 3, "column": 13, "offset": 95 }, "indent": [] } }, { "type": "text", "value": " - The default setting.", "position": { "start": { "line": 3, "column": 13, "offset": 95 }, "end": { "line": 3, "column": 36, "offset": 118 }, "indent": [] } } ], "position": { "start": { "line": 3, "column": 5, "offset": 87 }, "end": { "line": 3, "column": 36, "offset": 118 }, "indent": [] } } ], "position": { "start": { "line": 3, "column": 1, "offset": 83 }, "end": { "line": 3, "column": 36, "offset": 118 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "large", "position": { "start": { "line": 4, "column": 5, "offset": 123 }, "end": { "line": 4, "column": 12, "offset": 130 }, "indent": [] } }, { "type": "text", "value": " - The default setting on Emery.", "position": { "start": { "line": 4, "column": 12, "offset": 130 }, "end": { "line": 4, "column": 44, "offset": 162 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 5, "offset": 123 }, "end": { "line": 4, "column": 44, "offset": 162 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 119 }, "end": { "line": 4, "column": 44, "offset": 162 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "x-large", "position": { "start": { "line": 5, "column": 5, "offset": 167 }, "end": { "line": 5, "column": 14, "offset": 176 }, "indent": [] } }, { "type": "text", "value": " - Only available on Emery.", "position": { "start": { "line": 5, "column": 14, "offset": 176 }, "end": { "line": 5, "column": 41, "offset": 203 }, "indent": [] } } ], "position": { "start": { "line": 5, "column": 5, "offset": 167 }, "end": { "line": 5, "column": 41, "offset": 203 }, "indent": [] } } ], "position": { "start": { "line": 5, "column": 1, "offset": 163 }, "end": { "line": 5, "column": 41, "offset": 203 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 1, "offset": 45 }, "end": { "line": 5, "column": 41, "offset": 203 }, "indent": [ 1, 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 5, "column": 41, "offset": 203 } } }, "type": { "type": "NameExpression", "name": "String" } } ], "memberof": "rocky", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "rocky", "kind": "namespace" }, { "name": "UserPreferences", "kind": "typedef", "scope": "static" } ], "namespace": "rocky.UserPreferences" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The callback function signature to be used with the draw ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 58, "offset": 57 }, "indent": [] } }, { "type": "link", "url": "#on", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "event" } ], "position": { "start": { "line": 1, "column": 58, "offset": 57 }, "end": { "line": 1, "column": 75, "offset": 74 }, "indent": [] } }, { "type": "text", "value": ".", "position": { "start": { "line": 1, "column": 75, "offset": 74 }, "end": { "line": 1, "column": 76, "offset": 75 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 76, "offset": 75 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 76, "offset": 75 } } }, "tags": [ { "title": "typedef", "description": null, "lineNumber": 1, "type": { "type": "NameExpression", "name": "Function" }, "name": "RockyDrawCallback" }, { "title": "desc", "description": "The callback function signature to be used with the draw {@link #on event}.", "lineNumber": 2 }, { "title": "param", "description": "An object containing information about the event:\n * `context` - A {@link /docs/rockyjs/CanvasRenderingContext2D CanvasRenderingContext2D}\n object that can be used to draw information on the disply.", "lineNumber": 4, "type": { "type": "NameExpression", "name": "Object" }, "name": "event" } ], "loc": { "start": { "line": 39, "column": 2 }, "end": { "line": 46, "column": 4 } }, "context": { "loc": { "start": { "line": 129, "column": 2 }, "end": { "line": 129, "column": 11 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/rocky.js" }, "kind": "typedef", "name": "RockyDrawCallback", "type": { "type": "NameExpression", "name": "Function" }, "params": [ { "name": "event", "lineNumber": 4, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "An object containing information about the event:", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 50, "offset": 49 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 50, "offset": 49 }, "indent": [] } }, { "type": "list", "ordered": false, "start": null, "loose": false, "children": [ { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "context", "position": { "start": { "line": 2, "column": 5, "offset": 54 }, "end": { "line": 2, "column": 14, "offset": 63 }, "indent": [] } }, { "type": "text", "value": " - A ", "position": { "start": { "line": 2, "column": 14, "offset": 63 }, "end": { "line": 2, "column": 19, "offset": 68 }, "indent": [] } }, { "type": "link", "url": "/docs/rockyjs/CanvasRenderingContext2D", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "CanvasRenderingContext2D" } ], "position": { "start": { "line": 2, "column": 19, "offset": 68 }, "end": { "line": 2, "column": 90, "offset": 139 }, "indent": [] } }, { "type": "text", "value": "\n object that can be used to draw information on the disply.", "position": { "start": { "line": 2, "column": 90, "offset": 139 }, "end": { "line": 3, "column": 65, "offset": 204 }, "indent": [ 5 ] } } ], "position": { "start": { "line": 2, "column": 5, "offset": 54 }, "end": { "line": 3, "column": 65, "offset": 204 }, "indent": [ 5 ] } } ], "position": { "start": { "line": 2, "column": 1, "offset": 50 }, "end": { "line": 3, "column": 65, "offset": 204 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 2, "column": 1, "offset": 50 }, "end": { "line": 3, "column": 65, "offset": 204 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 65, "offset": 204 } } }, "type": { "type": "NameExpression", "name": "Object" } } ], "memberof": "rocky", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "rocky", "kind": "namespace" }, { "name": "RockyDrawCallback", "kind": "typedef", "scope": "static" } ], "namespace": "rocky.RockyDrawCallback" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The callback function signature to be used with the ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 53, "offset": 52 }, "indent": [] } }, { "type": "inlineCode", "value": "message", "position": { "start": { "line": 1, "column": 53, "offset": 52 }, "end": { "line": 1, "column": 62, "offset": 61 }, "indent": [] } }, { "type": "text", "value": "\n ", "position": { "start": { "line": 1, "column": 62, "offset": 61 }, "end": { "line": 2, "column": 4, "offset": 65 }, "indent": [ 1 ] } }, { "type": "link", "url": "#on", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "event" } ], "position": { "start": { "line": 2, "column": 4, "offset": 65 }, "end": { "line": 2, "column": 21, "offset": 82 }, "indent": [] } }, { "type": "text", "value": ".", "position": { "start": { "line": 2, "column": 21, "offset": 82 }, "end": { "line": 2, "column": 22, "offset": 83 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 22, "offset": 83 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 22, "offset": 83 } } }, "tags": [ { "title": "typedef", "description": null, "lineNumber": 1, "type": { "type": "NameExpression", "name": "Function" }, "name": "RockyMessageCallback" }, { "title": "desc", "description": "The callback function signature to be used with the `message`\n {@link #on event}.", "lineNumber": 2 }, { "title": "param", "description": "An object containing information about the event:\n * `type` - The type of event which was triggered.\n * `data` - The data sent within the message.", "lineNumber": 5, "type": { "type": "NameExpression", "name": "Object" }, "name": "event" } ], "loc": { "start": { "line": 62, "column": 2 }, "end": { "line": 70, "column": 5 } }, "context": { "loc": { "start": { "line": 129, "column": 2 }, "end": { "line": 129, "column": 11 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/rocky.js" }, "kind": "typedef", "name": "RockyMessageCallback", "type": { "type": "NameExpression", "name": "Function" }, "params": [ { "name": "event", "lineNumber": 5, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "An object containing information about the event:", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 50, "offset": 49 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 50, "offset": 49 }, "indent": [] } }, { "type": "list", "ordered": false, "start": null, "loose": false, "children": [ { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "type", "position": { "start": { "line": 2, "column": 5, "offset": 54 }, "end": { "line": 2, "column": 11, "offset": 60 }, "indent": [] } }, { "type": "text", "value": " - The type of event which was triggered.", "position": { "start": { "line": 2, "column": 11, "offset": 60 }, "end": { "line": 2, "column": 52, "offset": 101 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 5, "offset": 54 }, "end": { "line": 2, "column": 52, "offset": 101 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 1, "offset": 50 }, "end": { "line": 2, "column": 52, "offset": 101 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "data", "position": { "start": { "line": 3, "column": 5, "offset": 106 }, "end": { "line": 3, "column": 11, "offset": 112 }, "indent": [] } }, { "type": "text", "value": " - The data sent within the message.", "position": { "start": { "line": 3, "column": 11, "offset": 112 }, "end": { "line": 3, "column": 47, "offset": 148 }, "indent": [] } } ], "position": { "start": { "line": 3, "column": 5, "offset": 106 }, "end": { "line": 3, "column": 47, "offset": 148 }, "indent": [] } } ], "position": { "start": { "line": 3, "column": 1, "offset": 102 }, "end": { "line": 3, "column": 47, "offset": 148 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 1, "offset": 50 }, "end": { "line": 3, "column": 47, "offset": 148 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 47, "offset": 148 } } }, "type": { "type": "NameExpression", "name": "Object" } } ], "memberof": "rocky", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "rocky", "kind": "namespace" }, { "name": "RockyMessageCallback", "kind": "typedef", "scope": "static" } ], "namespace": "rocky.RockyMessageCallback" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The callback function signature to be used with the ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 53, "offset": 52 }, "indent": [] } }, { "type": "inlineCode", "value": "secondchange", "position": { "start": { "line": 1, "column": 53, "offset": 52 }, "end": { "line": 1, "column": 67, "offset": 66 }, "indent": [] } }, { "type": "text", "value": ",\n ", "position": { "start": { "line": 1, "column": 67, "offset": 66 }, "end": { "line": 2, "column": 3, "offset": 70 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "minutechange", "position": { "start": { "line": 2, "column": 3, "offset": 70 }, "end": { "line": 2, "column": 17, "offset": 84 }, "indent": [] } }, { "type": "text", "value": ", ", "position": { "start": { "line": 2, "column": 17, "offset": 84 }, "end": { "line": 2, "column": 19, "offset": 86 }, "indent": [] } }, { "type": "inlineCode", "value": "hourchange", "position": { "start": { "line": 2, "column": 19, "offset": 86 }, "end": { "line": 2, "column": 31, "offset": 98 }, "indent": [] } }, { "type": "text", "value": " and ", "position": { "start": { "line": 2, "column": 31, "offset": 98 }, "end": { "line": 2, "column": 36, "offset": 103 }, "indent": [] } }, { "type": "inlineCode", "value": "daychange", "position": { "start": { "line": 2, "column": 36, "offset": 103 }, "end": { "line": 2, "column": 47, "offset": 114 }, "indent": [] } }, { "type": "text", "value": " ", "position": { "start": { "line": 2, "column": 47, "offset": 114 }, "end": { "line": 2, "column": 48, "offset": 115 }, "indent": [] } }, { "type": "link", "url": "#on", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "events" } ], "position": { "start": { "line": 2, "column": 48, "offset": 115 }, "end": { "line": 2, "column": 66, "offset": 133 }, "indent": [] } }, { "type": "text", "value": ".", "position": { "start": { "line": 2, "column": 66, "offset": 133 }, "end": { "line": 2, "column": 67, "offset": 134 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 67, "offset": 134 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "In addition to firing these tick events at the appropriate time change, \n they are also emitted when the application starts.", "position": { "start": { "line": 4, "column": 1, "offset": 136 }, "end": { "line": 5, "column": 52, "offset": 260 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 136 }, "end": { "line": 5, "column": 52, "offset": 260 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 5, "column": 52, "offset": 260 } } }, "tags": [ { "title": "typedef", "description": null, "lineNumber": 1, "type": { "type": "NameExpression", "name": "Function" }, "name": "RockyTickCallback" }, { "title": "desc", "description": "The callback function signature to be used with the `secondchange`,\n `minutechange`, `hourchange` and `daychange` {@link #on events}.\n\nIn addition to firing these tick events at the appropriate time change, \n they are also emitted when the application starts.", "lineNumber": 2 }, { "title": "param", "description": "An object containing information about the event:\n * `date` - A JavaScript\n {@link http://www.w3schools.com/jsref/jsref_obj_date.asp date} object\n representing the current time.", "lineNumber": 8, "type": { "type": "NameExpression", "name": "Object" }, "name": "event" } ], "loc": { "start": { "line": 48, "column": 2 }, "end": { "line": 60, "column": 5 } }, "context": { "loc": { "start": { "line": 129, "column": 2 }, "end": { "line": 129, "column": 11 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/rocky.js" }, "kind": "typedef", "name": "RockyTickCallback", "type": { "type": "NameExpression", "name": "Function" }, "params": [ { "name": "event", "lineNumber": 8, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "An object containing information about the event:", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 50, "offset": 49 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 50, "offset": 49 }, "indent": [] } }, { "type": "list", "ordered": false, "start": null, "loose": false, "children": [ { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "date", "position": { "start": { "line": 2, "column": 5, "offset": 54 }, "end": { "line": 2, "column": 11, "offset": 60 }, "indent": [] } }, { "type": "text", "value": " - A JavaScript\n ", "position": { "start": { "line": 2, "column": 11, "offset": 60 }, "end": { "line": 3, "column": 6, "offset": 81 }, "indent": [ 5 ] } }, { "type": "link", "url": "http://www.w3schools.com/jsref/jsref_obj_date.asp", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "date" } ], "position": { "start": { "line": 3, "column": 6, "offset": 81 }, "end": { "line": 3, "column": 68, "offset": 143 }, "indent": [] } }, { "type": "text", "value": " object\n representing the current time.", "position": { "start": { "line": 3, "column": 68, "offset": 143 }, "end": { "line": 4, "column": 36, "offset": 186 }, "indent": [ 5 ] } } ], "position": { "start": { "line": 2, "column": 5, "offset": 54 }, "end": { "line": 4, "column": 36, "offset": 186 }, "indent": [ 5, 5 ] } } ], "position": { "start": { "line": 2, "column": 1, "offset": 50 }, "end": { "line": 4, "column": 36, "offset": 186 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 2, "column": 1, "offset": 50 }, "end": { "line": 4, "column": 36, "offset": 186 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 36, "offset": 186 } } }, "type": { "type": "NameExpression", "name": "Object" } } ], "memberof": "rocky", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "rocky", "kind": "namespace" }, { "name": "RockyTickCallback", "kind": "typedef", "scope": "static" } ], "namespace": "rocky.RockyTickCallback" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "A ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 3, "offset": 2 }, "indent": [] } }, { "type": "link", "url": "#UserPreferences", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "UserPreferences" } ], "position": { "start": { "line": 1, "column": 3, "offset": 2 }, "end": { "line": 1, "column": 43, "offset": 42 }, "indent": [] } }, { "type": "text", "value": " object access to user related settings from the currently connected Pebble smartwatch.", "position": { "start": { "line": 1, "column": 43, "offset": 42 }, "end": { "line": 1, "column": 130, "offset": 129 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 130, "offset": 129 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "console.log(rocky.userPreferences.contentSize);
> medium", "position": { "start": { "line": 3, "column": 1, "offset": 131 }, "end": { "line": 3, "column": 65, "offset": 195 }, "indent": [] } } ], "position": { "start": { "line": 3, "column": 1, "offset": 131 }, "end": { "line": 3, "column": 65, "offset": 195 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 65, "offset": 195 } } }, "tags": [ { "title": "desc", "description": "A {@link #UserPreferences UserPreferences} object access to user related settings from the currently connected Pebble smartwatch.\n\n`console.log(rocky.userPreferences.contentSize);
> medium`", "lineNumber": 1 } ], "loc": { "start": { "line": 131, "column": 2 }, "end": { "line": 136, "column": 4 } }, "context": { "loc": { "start": { "line": 137, "column": 2 }, "end": { "line": 137, "column": 17 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/rocky.js" }, "name": "userPreferences", "memberof": "rocky", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "rocky", "kind": "namespace" }, { "name": "userPreferences", "scope": "static" } ], "namespace": "rocky.userPreferences" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Attaches an event handler to the specified events. You may subscribe\n with multiple handlers, but at present there is no way to unsubscribe.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 75, "offset": 143 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 75, "offset": 143 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "text", "value": " ", "position": { "start": { "line": 4, "column": 1, "offset": 145 }, "end": { "line": 4, "column": 2, "offset": 146 }, "indent": [] } }, { "type": "inlineCode", "value": "rocky.on('minutechange', function() {...});", "position": { "start": { "line": 4, "column": 2, "offset": 146 }, "end": { "line": 4, "column": 47, "offset": 191 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 145 }, "end": { "line": 4, "column": 47, "offset": 191 }, "indent": [] } }, { "type": "heading", "depth": 4, "children": [ { "type": "text", "value": "Event Type Options", "position": { "start": { "line": 6, "column": 8, "offset": 200 }, "end": { "line": 6, "column": 26, "offset": 218 }, "indent": [] } } ], "position": { "start": { "line": 6, "column": 1, "offset": 193 }, "end": { "line": 6, "column": 26, "offset": 218 }, "indent": [] } }, { "type": "paragraph", "children": [ { "type": "text", "value": " Possible values:", "position": { "start": { "line": 8, "column": 1, "offset": 220 }, "end": { "line": 8, "column": 19, "offset": 238 }, "indent": [] } } ], "position": { "start": { "line": 8, "column": 1, "offset": 220 }, "end": { "line": 8, "column": 19, "offset": 238 }, "indent": [] } }, { "type": "list", "ordered": false, "start": null, "loose": false, "children": [ { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "draw", "position": { "start": { "line": 10, "column": 5, "offset": 244 }, "end": { "line": 10, "column": 11, "offset": 250 }, "indent": [] } }, { "type": "text", "value": " - Provide a ", "position": { "start": { "line": 10, "column": 11, "offset": 250 }, "end": { "line": 10, "column": 24, "offset": 263 }, "indent": [] } }, { "type": "link", "url": "#RockyDrawCallback", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "RockyDrawCallback" } ], "position": { "start": { "line": 10, "column": 24, "offset": 263 }, "end": { "line": 10, "column": 68, "offset": 307 }, "indent": [] } }, { "type": "text", "value": " as the\n callback. The draw event is being emitted after each call to\n ", "position": { "start": { "line": 10, "column": 68, "offset": 307 }, "end": { "line": 12, "column": 7, "offset": 388 }, "indent": [ 5, 5 ] } }, { "type": "link", "url": "#requestDraw", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "requestDraw" } ], "position": { "start": { "line": 12, "column": 7, "offset": 388 }, "end": { "line": 12, "column": 39, "offset": 420 }, "indent": [] } }, { "type": "text", "value": " but at most once for each screen update,\n even if ", "position": { "start": { "line": 12, "column": 39, "offset": 420 }, "end": { "line": 13, "column": 15, "offset": 476 }, "indent": [ 5 ] } }, { "type": "link", "url": "#requestDraw", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "requestDraw" } ], "position": { "start": { "line": 13, "column": 15, "offset": 476 }, "end": { "line": 13, "column": 47, "offset": 508 }, "indent": [] } }, { "type": "text", "value": " is called frequently the 'draw'\n event might also fire at other meaningful times (e.g. upon launch).", "position": { "start": { "line": 13, "column": 47, "offset": 508 }, "end": { "line": 14, "column": 74, "offset": 614 }, "indent": [ 5 ] } } ], "position": { "start": { "line": 10, "column": 5, "offset": 244 }, "end": { "line": 14, "column": 74, "offset": 614 }, "indent": [ 5, 5, 5, 5 ] } } ], "position": { "start": { "line": 10, "column": 1, "offset": 240 }, "end": { "line": 14, "column": 74, "offset": 614 }, "indent": [ 1, 1, 1, 1 ] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "secondchange", "position": { "start": { "line": 15, "column": 5, "offset": 619 }, "end": { "line": 15, "column": 19, "offset": 633 }, "indent": [] } }, { "type": "text", "value": " - Provide a ", "position": { "start": { "line": 15, "column": 19, "offset": 633 }, "end": { "line": 15, "column": 32, "offset": 646 }, "indent": [] } }, { "type": "link", "url": "#RockyTickCallback", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "RockyTickCallback" } ], "position": { "start": { "line": 15, "column": 32, "offset": 646 }, "end": { "line": 15, "column": 76, "offset": 690 }, "indent": [] } }, { "type": "text", "value": " as the\n callback. The secondchange event is emitted every time the clock's second changes.", "position": { "start": { "line": 15, "column": 76, "offset": 690 }, "end": { "line": 16, "column": 89, "offset": 786 }, "indent": [ 5 ] } } ], "position": { "start": { "line": 15, "column": 5, "offset": 619 }, "end": { "line": 16, "column": 89, "offset": 786 }, "indent": [ 5 ] } } ], "position": { "start": { "line": 15, "column": 1, "offset": 615 }, "end": { "line": 16, "column": 89, "offset": 786 }, "indent": [ 1 ] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "minutechange", "position": { "start": { "line": 17, "column": 5, "offset": 791 }, "end": { "line": 17, "column": 19, "offset": 805 }, "indent": [] } }, { "type": "text", "value": " - Provide a ", "position": { "start": { "line": 17, "column": 19, "offset": 805 }, "end": { "line": 17, "column": 32, "offset": 818 }, "indent": [] } }, { "type": "link", "url": "#RockyTickCallback", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "RockyTickCallback" } ], "position": { "start": { "line": 17, "column": 32, "offset": 818 }, "end": { "line": 17, "column": 76, "offset": 862 }, "indent": [] } }, { "type": "text", "value": " as the\n callback. The minutechange event is emitted every time the clock's minute changes.", "position": { "start": { "line": 17, "column": 76, "offset": 862 }, "end": { "line": 18, "column": 89, "offset": 958 }, "indent": [ 5 ] } } ], "position": { "start": { "line": 17, "column": 5, "offset": 791 }, "end": { "line": 18, "column": 89, "offset": 958 }, "indent": [ 5 ] } } ], "position": { "start": { "line": 17, "column": 1, "offset": 787 }, "end": { "line": 18, "column": 89, "offset": 958 }, "indent": [ 1 ] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "hourchange", "position": { "start": { "line": 19, "column": 5, "offset": 963 }, "end": { "line": 19, "column": 17, "offset": 975 }, "indent": [] } }, { "type": "text", "value": " - Provide a ", "position": { "start": { "line": 19, "column": 17, "offset": 975 }, "end": { "line": 19, "column": 30, "offset": 988 }, "indent": [] } }, { "type": "link", "url": "#RockyTickCallback", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "RockyTickCallback" } ], "position": { "start": { "line": 19, "column": 30, "offset": 988 }, "end": { "line": 19, "column": 74, "offset": 1032 }, "indent": [] } }, { "type": "text", "value": " as the\n callback. The hourchange event is emitted every time the clock's hour changes.", "position": { "start": { "line": 19, "column": 74, "offset": 1032 }, "end": { "line": 20, "column": 85, "offset": 1124 }, "indent": [ 5 ] } } ], "position": { "start": { "line": 19, "column": 5, "offset": 963 }, "end": { "line": 20, "column": 85, "offset": 1124 }, "indent": [ 5 ] } } ], "position": { "start": { "line": 19, "column": 1, "offset": 959 }, "end": { "line": 20, "column": 85, "offset": 1124 }, "indent": [ 1 ] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "daychange", "position": { "start": { "line": 21, "column": 5, "offset": 1129 }, "end": { "line": 21, "column": 16, "offset": 1140 }, "indent": [] } }, { "type": "text", "value": " - Provide a ", "position": { "start": { "line": 21, "column": 16, "offset": 1140 }, "end": { "line": 21, "column": 29, "offset": 1153 }, "indent": [] } }, { "type": "link", "url": "#RockyTickCallback", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "RockyTickCallback" } ], "position": { "start": { "line": 21, "column": 29, "offset": 1153 }, "end": { "line": 21, "column": 73, "offset": 1197 }, "indent": [] } }, { "type": "text", "value": " as the\n callback. The daychange event is emitted every time the clock's day changes.", "position": { "start": { "line": 21, "column": 73, "offset": 1197 }, "end": { "line": 22, "column": 83, "offset": 1287 }, "indent": [ 5 ] } } ], "position": { "start": { "line": 21, "column": 5, "offset": 1129 }, "end": { "line": 22, "column": 83, "offset": 1287 }, "indent": [ 5 ] } } ], "position": { "start": { "line": 21, "column": 1, "offset": 1125 }, "end": { "line": 22, "column": 83, "offset": 1287 }, "indent": [ 1 ] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "memorypressure", "position": { "start": { "line": 23, "column": 5, "offset": 1292 }, "end": { "line": 23, "column": 21, "offset": 1308 }, "indent": [] } }, { "type": "text", "value": " - Provides a ", "position": { "start": { "line": 23, "column": 21, "offset": 1308 }, "end": { "line": 23, "column": 35, "offset": 1322 }, "indent": [] } }, { "type": "link", "url": "#RockyMemoryPressureCallback", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "RockyMemoryPressureCallback" } ], "position": { "start": { "line": 23, "column": 35, "offset": 1322 }, "end": { "line": 23, "column": 99, "offset": 1386 }, "indent": [] } }, { "type": "text", "value": ". The\n event is emitted every time there is a notable change in available system memory.\n You can see an example implementation of memory pressure handling ", "position": { "start": { "line": 23, "column": 99, "offset": 1386 }, "end": { "line": 25, "column": 73, "offset": 1552 }, "indent": [ 5, 5 ] } }, { "type": "link", "url": "https://github.com/pebble-examples/rocky-memorypressure", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "here" } ], "position": { "start": { "line": 25, "column": 73, "offset": 1552 }, "end": { "line": 25, "column": 141, "offset": 1620 }, "indent": [] } }, { "type": "text", "value": ".", "position": { "start": { "line": 25, "column": 141, "offset": 1620 }, "end": { "line": 25, "column": 142, "offset": 1621 }, "indent": [] } } ], "position": { "start": { "line": 23, "column": 5, "offset": 1292 }, "end": { "line": 25, "column": 142, "offset": 1621 }, "indent": [ 5, 5 ] } } ], "position": { "start": { "line": 23, "column": 1, "offset": 1288 }, "end": { "line": 25, "column": 142, "offset": 1621 }, "indent": [ 1, 1 ] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "message", "position": { "start": { "line": 26, "column": 5, "offset": 1626 }, "end": { "line": 26, "column": 14, "offset": 1635 }, "indent": [] } }, { "type": "text", "value": " - Provide a ", "position": { "start": { "line": 26, "column": 14, "offset": 1635 }, "end": { "line": 26, "column": 27, "offset": 1648 }, "indent": [] } }, { "type": "link", "url": "#RockyMessageCallback", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "RockyMessageCallback" } ], "position": { "start": { "line": 26, "column": 27, "offset": 1648 }, "end": { "line": 26, "column": 77, "offset": 1698 }, "indent": [] } }, { "type": "text", "value": "\n as the callback. The message event is emitted every time the application\n receives a ", "position": { "start": { "line": 26, "column": 77, "offset": 1698 }, "end": { "line": 28, "column": 18, "offset": 1795 }, "indent": [ 5, 5 ] } }, { "type": "link", "url": "#postMessage", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "postMessage" } ], "position": { "start": { "line": 28, "column": 18, "offset": 1795 }, "end": { "line": 28, "column": 50, "offset": 1827 }, "indent": [] } }, { "type": "text", "value": " from the mobile companion.", "position": { "start": { "line": 28, "column": 50, "offset": 1827 }, "end": { "line": 28, "column": 77, "offset": 1854 }, "indent": [] } } ], "position": { "start": { "line": 26, "column": 5, "offset": 1626 }, "end": { "line": 28, "column": 77, "offset": 1854 }, "indent": [ 5, 5 ] } } ], "position": { "start": { "line": 26, "column": 1, "offset": 1622 }, "end": { "line": 28, "column": 77, "offset": 1854 }, "indent": [ 1, 1 ] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "postmessageconnected", "position": { "start": { "line": 29, "column": 5, "offset": 1859 }, "end": { "line": 29, "column": 27, "offset": 1881 }, "indent": [] } }, { "type": "text", "value": " - Provide a ", "position": { "start": { "line": 29, "column": 27, "offset": 1881 }, "end": { "line": 29, "column": 40, "offset": 1894 }, "indent": [] } }, { "type": "link", "url": "#RockyPostMessageConnectedCallback", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "RockyPostMessageConnectedCallback" } ], "position": { "start": { "line": 29, "column": 40, "offset": 1894 }, "end": { "line": 29, "column": 116, "offset": 1970 }, "indent": [] } }, { "type": "text", "value": "\n as the callback. The event may be emitted immediately upon subscription, \n if the subsystem is already connected. It is also emitted when connectivity is established.", "position": { "start": { "line": 29, "column": 116, "offset": 1970 }, "end": { "line": 31, "column": 98, "offset": 2148 }, "indent": [ 5, 5 ] } } ], "position": { "start": { "line": 29, "column": 5, "offset": 1859 }, "end": { "line": 31, "column": 98, "offset": 2148 }, "indent": [ 5, 5 ] } } ], "position": { "start": { "line": 29, "column": 1, "offset": 1855 }, "end": { "line": 31, "column": 98, "offset": 2148 }, "indent": [ 1, 1 ] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "postmessagedisconnected", "position": { "start": { "line": 32, "column": 5, "offset": 2153 }, "end": { "line": 32, "column": 30, "offset": 2178 }, "indent": [] } }, { "type": "text", "value": " - Provide a ", "position": { "start": { "line": 32, "column": 30, "offset": 2178 }, "end": { "line": 32, "column": 43, "offset": 2191 }, "indent": [] } }, { "type": "link", "url": "#RockyPostMessageDisconnectedCallback", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "RockyPostMessageDisconnectedCallback" } ], "position": { "start": { "line": 32, "column": 43, "offset": 2191 }, "end": { "line": 32, "column": 125, "offset": 2273 }, "indent": [] } }, { "type": "text", "value": "\n as the callback. The event may be emitted immediately upon subscription, \n if the subsystem is already disconnected. It is also emitted when connectivity is lost.", "position": { "start": { "line": 32, "column": 125, "offset": 2273 }, "end": { "line": 34, "column": 94, "offset": 2447 }, "indent": [ 5, 5 ] } } ], "position": { "start": { "line": 32, "column": 5, "offset": 2153 }, "end": { "line": 34, "column": 94, "offset": 2447 }, "indent": [ 5, 5 ] } } ], "position": { "start": { "line": 32, "column": 1, "offset": 2149 }, "end": { "line": 34, "column": 94, "offset": 2447 }, "indent": [ 1, 1 ] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "postmessageerror", "position": { "start": { "line": 35, "column": 5, "offset": 2452 }, "end": { "line": 35, "column": 23, "offset": 2470 }, "indent": [] } }, { "type": "text", "value": " - Provide a ", "position": { "start": { "line": 35, "column": 23, "offset": 2470 }, "end": { "line": 35, "column": 36, "offset": 2483 }, "indent": [] } }, { "type": "link", "url": "#RockyPostMessageErrorCallback", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "RockyPostMessageErrorCallback" } ], "position": { "start": { "line": 35, "column": 36, "offset": 2483 }, "end": { "line": 35, "column": 104, "offset": 2551 }, "indent": [] } }, { "type": "text", "value": "\n as the callback. The event is emitted when a transmission error occurrs. The type \n of error is not provided, but the message has not been delivered.", "position": { "start": { "line": 35, "column": 104, "offset": 2551 }, "end": { "line": 37, "column": 72, "offset": 2712 }, "indent": [ 5, 5 ] } } ], "position": { "start": { "line": 35, "column": 5, "offset": 2452 }, "end": { "line": 37, "column": 72, "offset": 2712 }, "indent": [ 5, 5 ] } } ], "position": { "start": { "line": 35, "column": 1, "offset": 2448 }, "end": { "line": 37, "column": 72, "offset": 2712 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 10, "column": 1, "offset": 240 }, "end": { "line": 37, "column": 72, "offset": 2712 }, "indent": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 37, "column": 72, "offset": 2712 } } }, "tags": [ { "title": "desc", "description": "Attaches an event handler to the specified events. You may subscribe\n with multiple handlers, but at present there is no way to unsubscribe.\n\n `rocky.on('minutechange', function() {...});`\n\n #### Event Type Options\n\n Possible values:\n\n * `draw` - Provide a {@link #RockyDrawCallback RockyDrawCallback} as the\n callback. The draw event is being emitted after each call to\n {@link #requestDraw requestDraw} but at most once for each screen update,\n even if {@link #requestDraw requestDraw} is called frequently the 'draw'\n event might also fire at other meaningful times (e.g. upon launch).\n * `secondchange` - Provide a {@link #RockyTickCallback RockyTickCallback} as the\n callback. The secondchange event is emitted every time the clock's second changes.\n * `minutechange` - Provide a {@link #RockyTickCallback RockyTickCallback} as the\n callback. The minutechange event is emitted every time the clock's minute changes.\n * `hourchange` - Provide a {@link #RockyTickCallback RockyTickCallback} as the\n callback. The hourchange event is emitted every time the clock's hour changes.\n * `daychange` - Provide a {@link #RockyTickCallback RockyTickCallback} as the\n callback. The daychange event is emitted every time the clock's day changes.\n * `memorypressure` - Provides a {@link #RockyMemoryPressureCallback RockyMemoryPressureCallback}. The\n event is emitted every time there is a notable change in available system memory.\n You can see an example implementation of memory pressure handling {@link https://github.com/pebble-examples/rocky-memorypressure here}.\n * `message` - Provide a {@link #RockyMessageCallback RockyMessageCallback}\n as the callback. The message event is emitted every time the application\n receives a {@link #postMessage postMessage} from the mobile companion.\n * `postmessageconnected` - Provide a {@link #RockyPostMessageConnectedCallback RockyPostMessageConnectedCallback}\n as the callback. The event may be emitted immediately upon subscription, \n if the subsystem is already connected. It is also emitted when connectivity is established.\n * `postmessagedisconnected` - Provide a {@link #RockyPostMessageDisconnectedCallback RockyPostMessageDisconnectedCallback}\n as the callback. The event may be emitted immediately upon subscription, \n if the subsystem is already disconnected. It is also emitted when connectivity is lost.\n * `postmessageerror` - Provide a {@link #RockyPostMessageErrorCallback RockyPostMessageErrorCallback}\n as the callback. The event is emitted when a transmission error occurrs. The type \n of error is not provided, but the message has not been delivered.", "lineNumber": 1 }, { "title": "param", "description": "The event being subscribed to.", "lineNumber": 39, "type": { "type": "NameExpression", "name": "String" }, "name": "type" }, { "title": "param", "description": "A callback function that will be executed when\n the event occurs. See below for more details.", "lineNumber": 40, "type": { "type": "NameExpression", "name": "Function" }, "name": "callback" } ], "loc": { "start": { "line": 140, "column": 0 }, "end": { "line": 183, "column": 3 } }, "context": { "loc": { "start": { "line": 184, "column": 0 }, "end": { "line": 184, "column": 40 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/rocky.js" }, "params": [ { "name": "type", "lineNumber": 39, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The event being subscribed to.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 31, "offset": 30 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 31, "offset": 30 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 31, "offset": 30 } } }, "type": { "type": "NameExpression", "name": "String" } }, { "name": "callback", "lineNumber": 40, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "A callback function that will be executed when\n the event occurs. See below for more details.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 48, "offset": 94 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 48, "offset": 94 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 48, "offset": 94 } } }, "type": { "type": "NameExpression", "name": "Function" } } ], "name": "on", "kind": "function", "memberof": "rocky", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "rocky", "kind": "namespace" }, { "name": "on", "kind": "function", "scope": "static" } ], "namespace": "rocky.on" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Attaches an event handler to the specified events. Synonymous with \n ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 7, "offset": 74 }, "indent": [ 1 ] } }, { "type": "link", "title": null, "url": "#on", "children": [ { "type": "text", "value": "rocky.on()", "position": { "start": { "line": 2, "column": 8, "offset": 75 }, "end": { "line": 2, "column": 18, "offset": 85 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 7, "offset": 74 }, "end": { "line": 2, "column": 24, "offset": 91 }, "indent": [] } }, { "type": "text", "value": ".", "position": { "start": { "line": 2, "column": 24, "offset": 91 }, "end": { "line": 2, "column": 25, "offset": 92 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 25, "offset": 92 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "rocky.addEventListener(type, callback);", "position": { "start": { "line": 4, "column": 1, "offset": 94 }, "end": { "line": 4, "column": 42, "offset": 135 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 94 }, "end": { "line": 4, "column": 42, "offset": 135 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 42, "offset": 135 } } }, "tags": [ { "title": "desc", "description": "Attaches an event handler to the specified events. Synonymous with \n [rocky.on()](#on).\n\n`rocky.addEventListener(type, callback);`", "lineNumber": 1 }, { "title": "param", "description": "The event being subscribed to.", "lineNumber": 6, "type": { "type": "NameExpression", "name": "String" }, "name": "type" }, { "title": "param", "description": "A callback function that will be executed when \n the event occurs. See below for more details.", "lineNumber": 7, "type": { "type": "NameExpression", "name": "Function" }, "name": "callback" } ], "loc": { "start": { "line": 186, "column": 0 }, "end": { "line": 195, "column": 3 } }, "context": { "loc": { "start": { "line": 196, "column": 0 }, "end": { "line": 196, "column": 54 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/rocky.js" }, "params": [ { "name": "type", "lineNumber": 6, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The event being subscribed to.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 31, "offset": 30 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 31, "offset": 30 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 31, "offset": 30 } } }, "type": { "type": "NameExpression", "name": "String" } }, { "name": "callback", "lineNumber": 7, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "A callback function that will be executed when \n the event occurs. See below for more details.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 48, "offset": 95 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 48, "offset": 95 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 48, "offset": 95 } } }, "type": { "type": "NameExpression", "name": "Function" } } ], "name": "addEventListener", "kind": "function", "memberof": "rocky", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "rocky", "kind": "namespace" }, { "name": "addEventListener", "kind": "function", "scope": "static" } ], "namespace": "rocky.addEventListener" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Remove an existing event listener previously registered with \n ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 3, "offset": 64 }, "indent": [ 1 ] } }, { "type": "link", "title": null, "url": "#on", "children": [ { "type": "text", "value": "rocky.on()", "position": { "start": { "line": 2, "column": 4, "offset": 65 }, "end": { "line": 2, "column": 14, "offset": 75 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 3, "offset": 64 }, "end": { "line": 2, "column": 20, "offset": 81 }, "indent": [] } }, { "type": "text", "value": " or ", "position": { "start": { "line": 2, "column": 20, "offset": 81 }, "end": { "line": 2, "column": 24, "offset": 85 }, "indent": [] } }, { "type": "link", "title": null, "url": "#addEventListener", "children": [ { "type": "text", "value": "rocky.addEventListener()", "position": { "start": { "line": 2, "column": 25, "offset": 86 }, "end": { "line": 2, "column": 49, "offset": 110 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 24, "offset": 85 }, "end": { "line": 2, "column": 69, "offset": 130 }, "indent": [] } }, { "type": "text", "value": ".", "position": { "start": { "line": 2, "column": 69, "offset": 130 }, "end": { "line": 2, "column": 70, "offset": 131 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 70, "offset": 131 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 70, "offset": 131 } } }, "tags": [ { "title": "desc", "description": "Remove an existing event listener previously registered with \n [rocky.on()](#on) or [rocky.addEventListener()](#addEventListener).", "lineNumber": 1 }, { "title": "param", "description": "The type of the event listener to be removed. See \n [rocky.on()](#on) for a list of available event types.", "lineNumber": 4, "type": { "type": "NameExpression", "name": "String" }, "name": "type" }, { "title": "param", "description": "The existing developer-defined function that was \n previously registered.", "lineNumber": 6, "type": { "type": "NameExpression", "name": "Function" }, "name": "callback" } ], "loc": { "start": { "line": 198, "column": 0 }, "end": { "line": 206, "column": 3 } }, "context": { "loc": { "start": { "line": 207, "column": 0 }, "end": { "line": 207, "column": 57 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/rocky.js" }, "params": [ { "name": "type", "lineNumber": 4, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The type of the event listener to be removed. See \n ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 3, "offset": 53 }, "indent": [ 1 ] } }, { "type": "link", "title": null, "url": "#on", "children": [ { "type": "text", "value": "rocky.on()", "position": { "start": { "line": 2, "column": 4, "offset": 54 }, "end": { "line": 2, "column": 14, "offset": 64 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 3, "offset": 53 }, "end": { "line": 2, "column": 20, "offset": 70 }, "indent": [] } }, { "type": "text", "value": " for a list of available event types.", "position": { "start": { "line": 2, "column": 20, "offset": 70 }, "end": { "line": 2, "column": 57, "offset": 107 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 57, "offset": 107 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 57, "offset": 107 } } }, "type": { "type": "NameExpression", "name": "String" } }, { "name": "callback", "lineNumber": 6, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The existing developer-defined function that was \n previously registered.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 25, "offset": 74 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 25, "offset": 74 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 25, "offset": 74 } } }, "type": { "type": "NameExpression", "name": "Function" } } ], "name": "removeEventListener", "kind": "function", "memberof": "rocky", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "rocky", "kind": "namespace" }, { "name": "removeEventListener", "kind": "function", "scope": "static" } ], "namespace": "rocky.removeEventListener" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Remove an existing event handler from the specified events. Synonymous \n with ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 13, "offset": 84 }, "indent": [ 1 ] } }, { "type": "link", "title": null, "url": "#removeEventListener", "children": [ { "type": "text", "value": "rocky.removeEventListener()", "position": { "start": { "line": 2, "column": 14, "offset": 85 }, "end": { "line": 2, "column": 41, "offset": 112 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 13, "offset": 84 }, "end": { "line": 2, "column": 64, "offset": 135 }, "indent": [] } }, { "type": "text", "value": ".", "position": { "start": { "line": 2, "column": 64, "offset": 135 }, "end": { "line": 2, "column": 65, "offset": 136 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 65, "offset": 136 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "rocky.off(type, callback);", "position": { "start": { "line": 4, "column": 1, "offset": 138 }, "end": { "line": 4, "column": 29, "offset": 166 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 138 }, "end": { "line": 4, "column": 29, "offset": 166 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 29, "offset": 166 } } }, "tags": [ { "title": "desc", "description": "Remove an existing event handler from the specified events. Synonymous \n with [rocky.removeEventListener()](#removeEventListener).\n\n`rocky.off(type, callback);`", "lineNumber": 1 }, { "title": "param", "description": "The type of the event listener to be removed. See \n [rocky.on()](#on) for a list of available event types.", "lineNumber": 6, "type": { "type": "NameExpression", "name": "String" }, "name": "type" }, { "title": "param", "description": "The existing developer-defined function that was \n previously registered.", "lineNumber": 8, "type": { "type": "NameExpression", "name": "Function" }, "name": "callback" } ], "loc": { "start": { "line": 209, "column": 0 }, "end": { "line": 219, "column": 3 } }, "context": { "loc": { "start": { "line": 220, "column": 0 }, "end": { "line": 220, "column": 41 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/rocky.js" }, "params": [ { "name": "type", "lineNumber": 6, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The type of the event listener to be removed. See \n ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 3, "offset": 53 }, "indent": [ 1 ] } }, { "type": "link", "title": null, "url": "#on", "children": [ { "type": "text", "value": "rocky.on()", "position": { "start": { "line": 2, "column": 4, "offset": 54 }, "end": { "line": 2, "column": 14, "offset": 64 }, "indent": [] } } ], "position": { "start": { "line": 2, "column": 3, "offset": 53 }, "end": { "line": 2, "column": 20, "offset": 70 }, "indent": [] } }, { "type": "text", "value": " for a list of available event types.", "position": { "start": { "line": 2, "column": 20, "offset": 70 }, "end": { "line": 2, "column": 57, "offset": 107 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 57, "offset": 107 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 57, "offset": 107 } } }, "type": { "type": "NameExpression", "name": "String" } }, { "name": "callback", "lineNumber": 8, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The existing developer-defined function that was \n previously registered.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 25, "offset": 74 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 25, "offset": 74 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 25, "offset": 74 } } }, "type": { "type": "NameExpression", "name": "Function" } } ], "name": "off", "kind": "function", "memberof": "rocky", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "rocky", "kind": "namespace" }, { "name": "off", "kind": "function", "scope": "static" } ], "namespace": "rocky.off" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Sends a message to the mobile companion component. Please be aware \n that messages should be kept concise. Each message is queued, so \n ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 4, "offset": 140 }, "indent": [ 1, 1 ] } }, { "type": "inlineCode", "value": "postMessage()", "position": { "start": { "line": 3, "column": 4, "offset": 140 }, "end": { "line": 3, "column": 19, "offset": 155 }, "indent": [] } }, { "type": "text", "value": " can be called multiple times immediately. If there is a momentary loss of connectivity, queued \n messages may still be delivered, or automatically removed from the queue \n after a few seconds of failed connectivity. Any transmission failures, or \n out of memory errors will be raised via the ", "position": { "start": { "line": 3, "column": 19, "offset": 155 }, "end": { "line": 6, "column": 48, "offset": 454 }, "indent": [ 1, 1, 1 ] } }, { "type": "inlineCode", "value": "postmessageerror", "position": { "start": { "line": 6, "column": 48, "offset": 454 }, "end": { "line": 6, "column": 66, "offset": 472 }, "indent": [] } }, { "type": "text", "value": " event.", "position": { "start": { "line": 6, "column": 66, "offset": 472 }, "end": { "line": 6, "column": 73, "offset": 479 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 6, "column": 73, "offset": 479 }, "indent": [ 1, 1, 1, 1, 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "rocky.postMessage({cmd: 'fetch'});", "position": { "start": { "line": 8, "column": 1, "offset": 481 }, "end": { "line": 8, "column": 37, "offset": 517 }, "indent": [] } } ], "position": { "start": { "line": 8, "column": 1, "offset": 481 }, "end": { "line": 8, "column": 37, "offset": 517 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 8, "column": 37, "offset": 517 } } }, "tags": [ { "title": "desc", "description": "Sends a message to the mobile companion component. Please be aware \n that messages should be kept concise. Each message is queued, so \n `postMessage()` can be called multiple times immediately. If there is a momentary loss of connectivity, queued \n messages may still be delivered, or automatically removed from the queue \n after a few seconds of failed connectivity. Any transmission failures, or \n out of memory errors will be raised via the `postmessageerror` event.\n\n`rocky.postMessage({cmd: 'fetch'});`", "lineNumber": 1 }, { "title": "param", "description": "An object containing the data to deliver to the mobile\n device. This will be received in the `data` field of the `event`\n delivered to the `on('message', ...)` handler.", "lineNumber": 10, "type": { "type": "NameExpression", "name": "Object" }, "name": "data" } ], "loc": { "start": { "line": 222, "column": 0 }, "end": { "line": 235, "column": 3 } }, "context": { "loc": { "start": { "line": 236, "column": 0 }, "end": { "line": 236, "column": 39 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/rocky.js" }, "params": [ { "name": "data", "lineNumber": 10, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "An object containing the data to deliver to the mobile\n device. This will be received in the ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 46, "offset": 100 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "data", "position": { "start": { "line": 2, "column": 46, "offset": 100 }, "end": { "line": 2, "column": 52, "offset": 106 }, "indent": [] } }, { "type": "text", "value": " field of the ", "position": { "start": { "line": 2, "column": 52, "offset": 106 }, "end": { "line": 2, "column": 66, "offset": 120 }, "indent": [] } }, { "type": "inlineCode", "value": "event", "position": { "start": { "line": 2, "column": 66, "offset": 120 }, "end": { "line": 2, "column": 73, "offset": 127 }, "indent": [] } }, { "type": "text", "value": "\n delivered to the ", "position": { "start": { "line": 2, "column": 73, "offset": 127 }, "end": { "line": 3, "column": 26, "offset": 153 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "on('message', ...)", "position": { "start": { "line": 3, "column": 26, "offset": 153 }, "end": { "line": 3, "column": 46, "offset": 173 }, "indent": [] } }, { "type": "text", "value": " handler.", "position": { "start": { "line": 3, "column": 46, "offset": 173 }, "end": { "line": 3, "column": 55, "offset": 182 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 55, "offset": 182 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 55, "offset": 182 } } }, "type": { "type": "NameExpression", "name": "Object" } } ], "name": "postMessage", "kind": "function", "memberof": "rocky", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "rocky", "kind": "namespace" }, { "name": "postMessage", "kind": "function", "scope": "static" } ], "namespace": "rocky.postMessage" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Flags the canvas (display) as requiring a redraw. Invoking this method\n will cause the ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 19, "offset": 89 }, "indent": [ 1 ] } }, { "type": "link", "url": "#on", "title": null, "jsdoc": true, "children": [ { "type": "text", "value": "draw event" } ], "position": { "start": { "line": 2, "column": 19, "offset": 89 }, "end": { "line": 2, "column": 41, "offset": 111 }, "indent": [] } }, { "type": "text", "value": " to be emitted. Only 1 draw event\n will occur, regardless of how many times the redraw is requested before\n the next draw event.", "position": { "start": { "line": 2, "column": 41, "offset": 111 }, "end": { "line": 4, "column": 24, "offset": 243 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 24, "offset": 243 }, "indent": [ 1, 1, 1 ] } }, { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "rocky.on('secondchange', function(e) {
  rocky.requestDraw();
});", "position": { "start": { "line": 6, "column": 1, "offset": 245 }, "end": { "line": 6, "column": 84, "offset": 328 }, "indent": [] } } ], "position": { "start": { "line": 6, "column": 1, "offset": 245 }, "end": { "line": 6, "column": 84, "offset": 328 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 6, "column": 84, "offset": 328 } } }, "tags": [ { "title": "desc", "description": "Flags the canvas (display) as requiring a redraw. Invoking this method\n will cause the {@link #on draw event} to be emitted. Only 1 draw event\n will occur, regardless of how many times the redraw is requested before\n the next draw event.\n\n`rocky.on('secondchange', function(e) {
  rocky.requestDraw();
});`", "lineNumber": 1 } ], "loc": { "start": { "line": 238, "column": 0 }, "end": { "line": 245, "column": 3 } }, "context": { "loc": { "start": { "line": 246, "column": 0 }, "end": { "line": 246, "column": 35 } }, "file": "/Users/devsite/Pebble/developer.getpebble.com/js-docs/rocky/rocky.js" }, "name": "requestDraw", "kind": "function", "memberof": "rocky", "scope": "static", "members": { "instance": [], "static": [] }, "path": [ { "name": "rocky", "kind": "namespace" }, { "name": "requestDraw", "kind": "function", "scope": "static" } ], "namespace": "rocky.requestDraw" } ] }, "path": [ { "name": "rocky", "kind": "namespace" } ], "namespace": "rocky" } ]