Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

API Reference

jeff-h edited this page May 17, 2014 · 13 revisions

MacGap exposes an object called macgap inside JavaScript. The methods exposed by this API are documented below:

MacGap object description
App application methods: quit, activate, hide, unhide, beep, bounce, open('url'), launch, setCustomUserAgent, systemIdleTime

Clipboard | copy, paste

Window | open, resize, getX, getY, move, toggleFullscreen, maximize, minimize, isMaximized

Path — application, resource, documents, library, home, temp

Dock — badge

Sound — play, playSystem

Growl — notify

Notice —notify

Fonts — availableFonts, availableFontFamilies, availableMembersOfFontFamily

Events — wake, sleep, appActivated

Menus — addItem, addSeparator, remove, setCallback, setKey, setTitle

User Defaults — getUserDefaultsKeys, getMyDefaults, setString, setInteger, setBool, setFloat, getString, getInteger, getBool, getFloat

Clone this wiki locally