docs » cp.apple.finalcutpro.WindowWatcher


Window Watcher Module.

API Overview

  • Methods - API calls which can only be made on an object returned by a constructor

API Documentation

Methods

new

Signature cp.apple.finalcutpro.WindowWatcher:new(windowFn) -> WindowWatcher
Type Method
Description Creates a new WindowWatcher
Parameters
  • `window` - the window object (eg. CommandEditor)
Returns
  • `WindowWatcher` - the new WindowWatcher instance.

unwatch

Signature cp.apple.finalcutpro.WindowWatcher:unwatch() -> bool
Type Method
Description Removes the watch with the specified ID
Parameters
  • `id` - The ID returned from `watch` that wants to be removed.
Returns
  • None

watch

Signature cp.apple.finalcutpro.WindowWatcher:watch() -> bool
Type Method
Description Watch for events that happen in the window
Parameters
  • `events` - A table of functions with to watch. These may be:
  • `show(window)` - Triggered when the window is shown.
  • `hide(window)` - Triggered when the window is hidden.
  • `open(window)` - Triggered when the window is opened.
  • `close(window)` - Triggered when the window is closed.
  • `move(window)` - Triggered when the window is moved.
Returns
  • An ID which can be passed to `unwatch` to stop watching.

results matching ""

    No results matching ""