<commit_before>---
name: Titanium.Gesture
summary: The top level Gestures module.  The Gesture module is responsible for high level device gestures that are device-wide.
extends: Titanium.Module
since: "0.8"

methods:

  - name: isLandscape
    summary: |
        Returns true if current window is considered lanscape by the device, false
        otherwise.
    returns:
        type: Boolean
    platforms: [android, iphone, ipad]

  - name: isPortrait
    summary: |
        Returns true if current window is considered portrait by the device, false
        otherwise.
    returns:
        type: Boolean
    platforms: [android, iphone, ipad]

  - name: getLandscape
    summary: |
        Returns true if current window is considered lanscape by the device, false
        otherwise.
    returns:
        type: Boolean
    platforms: [mobileweb]

  - name: getPortrait
    summary: |
        Returns true if current window is considered portrait by the device, false
        otherwise.
    returns:
        type: Boolean
    platforms: [mobileweb]

properties:
  - name: portrait
    type: Boolean
    summary: True if current window is considered portrait by the device, false otherwise.
    description: On iOS, use [isPortrait](Titanium.Gesture.isPortrait).
    permission: read-only
    platforms: [android, iphone, ipad, mobileweb]

  - name: landscape
    type: Boolean
    summary: True if current window is considered landscape by the device, false otherwise.
    description: On iOS, use [isLandscape](Titanium.Gesture.isLandscape).
    permission: read-only
    platforms: [android, iphone, ipad, mobileweb]

  - name: orientation
    type: Number
    summary: Orientation of the current window.  
    description: |
        Value will be one of the following: <Titanium.UI.PORTRAIT>, <Titanium.UI.UPSIDE_PORTRAIT>, 
        <Titanium.UI.LANDSCAPE_LEFT>, <Titanium.UI.LANDSCAPE_RIGHT> or 
        <Titanium.UI.UNKNOWN>.

        On iOS, returns the current orientation of the *device*, regardless of the screen
        orientation. To determine the current screen orientation on iOS, use
        <Titanium.UI.orientation>.

        On Android and Mobile Web, returns the orientation of the current window, and
        never reports the "reverse" orientations (`LANDSCAPE_RIGHT` and `UPSIDE_PORTRAIT`).

        To set the *allowable* orientations for a window, see <Titanium.UI.Window.orientationModes>.
    permission: read-only
    platforms: [android, iphone, ipad, mobileweb]

events:
  - name: orientationchange
    summary: Fired when the device orientation changes.
    description: |
        On Android, note that the application must have a heavyweight window or tab group open 
        in order to receive the `orientationchange` event. It is not necessary for the  heavyweight
        window to be the topmost window.

        Almost all real-world applications will have a heavyweight windows or a
        tab group. This is only likely to be an issue if you create a test case or test
        application that adds an orientation change listener from `app.js`
        without opening a heavyweight window.

        Android and Mobile Web do not report the "reverse" orientations,
        `UPSIDE_PORTRAIT` and `LANDSCAPE_RIGHT`. These are reported as 
        `PORTRAIT` and `LANDSCAPE_LEFT`, respectively. 
    properties:
      - name: orientation
        type: Number
        summary: |
            Orientation of the current window.  Value is one of the following: 
            <Titanium.UI.PORTRAIT>, <Titanium.UI.UPSIDE_PORTRAIT>, <Titanium.UI.LANDSCAPE_LEFT>, 
            <Titanium.UI.LANDSCAPE_RIGHT> or <Titanium.UI.UNKNOWN>.

  - name: shake
    summary: fired when the device is shaken
    properties:
      - name: timestamp
        type: Number
        summary: timestamp reference since previous shake
      - name: x
        type: Number
        summary: x coordinate of the shake event
      - name: y
        type: Number
        summary: y coordinate of the shake event
      - name: z
        type: Number
        summary: z coordinate of the shake event<commit_msg>[TIDOC-424] Updated to address review comments and Bryan's Gesture  changes on MobileWeb. Also edited "shake" event doc because it was there.<commit_after>---
name: Titanium.Gesture
summary: |
    The Gesture module is responsible for high-level device gestures such as
    orientation changes and shake gestures.
extends: Titanium.Module
since: "0.8"

methods:

  - name: isLandscape
    summary: |
        Returns true if current window is considered lanscape by the device, false
        otherwise.
    returns:
        type: Boolean
    platforms: [android, iphone, ipad]

  - name: isPortrait
    summary: |
        Returns true if current window is considered portrait by the device, false
        otherwise.
    returns:
        type: Boolean
    platforms: [android, iphone, ipad]

properties:
  - name: portrait
    type: Boolean
    summary: True if current window is considered portrait by the device, false otherwise.
    description: On iOS, use [isPortrait](Titanium.Gesture.isPortrait).
    permission: read-only
    platforms: [android, mobileweb]
    accessors: false

  - name: landscape
    type: Boolean
    summary: True if current window is considered landscape by the device, false otherwise.
    description: On iOS, use [isLandscape](Titanium.Gesture.isLandscape).
    permission: read-only
    platforms: [android, mobileweb]
    accessors: false

  - name: orientation
    type: Number
    summary: Orientation of the current window.  
    description: |
        Value will be one of the following: <Titanium.UI.PORTRAIT>, <Titanium.UI.UPSIDE_PORTRAIT>, 
        <Titanium.UI.LANDSCAPE_LEFT>, <Titanium.UI.LANDSCAPE_RIGHT> or 
        <Titanium.UI.UNKNOWN>.

        On iOS, returns the current orientation of the *device*, regardless of the screen
        orientation. To determine the current screen orientation on iOS, use
        <Titanium.UI.orientation>.

        On Android and Mobile Web, returns the orientation of the current window, and
        never reports the "reverse" orientations (`LANDSCAPE_RIGHT` and `UPSIDE_PORTRAIT`).

        For Mobile Web, the orientation is always that of the browser window, which is
        automatically controlled by the operating system.

        To set the *allowable* orientations for a window, see <Titanium.UI.Window.orientationModes>.
    permission: read-only
    platforms: [android, iphone, ipad, mobileweb]

events:
  - name: orientationchange
    summary: Fired when the device orientation changes.
    description: |
        On Android, note that the application must have a heavyweight window or tab group open 
        in order to receive the `orientationchange` event. It is not necessary for the  heavyweight
        window to be the topmost window.

        Almost all real-world applications will have a heavyweight windows or a
        tab group. This is only likely to be an issue if you create a test case or test
        application that adds an orientation change listener from `app.js`
        without opening a heavyweight window.

        Android and Mobile Web do not report the "reverse" orientations,
        `UPSIDE_PORTRAIT` and `LANDSCAPE_RIGHT`. These are reported as 
        `PORTRAIT` and `LANDSCAPE_LEFT`, respectively. 
    properties:
      - name: orientation
        type: Number
        summary: |
            Orientation of the current window.  Value is one of the following: 
            <Titanium.UI.PORTRAIT>, <Titanium.UI.UPSIDE_PORTRAIT>, <Titanium.UI.LANDSCAPE_LEFT>, 
            <Titanium.UI.LANDSCAPE_RIGHT> or <Titanium.UI.UNKNOWN>.

  - name: shake
    summary: Fired when the device is shaken.
    description: |
        A shake gesture consists of a series of quick accelerations, and is represented by a series
        of shake events. 

        The `timestamp` property represents the interval between shake events. It is
        measured in milliseconds on Android and Mobile Web, and in seconds on iOS.
        
        Note that Mobile Web detects shake gestures using the device accelerometer, if the
        device and browser support this. This event cannot be generated on Mobile Web in
        the iOS simulator. The simulator's **Shake Gesture** menu item generates a native
        shake event, but does not generate accelerometer events to the browser.
    properties:

      - name: timestamp
        type: Number
        summary: |
            Time interval since previous shake event, or 0 if no shake gesture is in
            progress.

      - name: x
        type: Number
        summary: Acceleration along the X axis, in Gs.
        
      - name: y
        type: Number
        summary: Acceleration along the Y axis, in Gs.

      - name: z
        type: Number
        summary: Acceleration along the Z axis, in Gs.
{'fraction_non_alphanumeric': 0.062380362571782456, 'fraction_numerical': 0.0009007994595203243, 'mean_word_length': 2.6870070568700704, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2252080', 'n_tokens_mistral': 2422, 'n_tokens_neox': 2305, 'n_words': 995}