App.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // App.h
  3. // MG
  4. //
  5. // Created by Tim Debo on 5/27/14.
  6. //
  7. //
  8. #import "Command.h"
  9. @protocol AppExports <JSExport>
  10. - (void) terminate;
  11. - (void) activate;
  12. - (void) hide;
  13. - (void) unhide;
  14. - (void) beep;
  15. - (void) bounce;
  16. - (void) notify:(NSDictionary*)aNotification;
  17. - (void) closeNotification:(NSString*)notificationId;
  18. JSExportAs(setUserAgent, - (void) setCustomUserAgent:(NSString *)userAgentString);
  19. - (void) openURL:(NSString*)url;
  20. - (void) launch:(NSString *)name;
  21. - (void) log:(NSString *)msg;
  22. @property (readonly) NSNumber* idleTime;
  23. @property (readonly) NSString* applicationPath;
  24. @property (readonly) NSString* resourcePath;
  25. @property (readonly) NSString* documentsPath;
  26. @property (readonly) NSString* libraryPath;
  27. @property (readonly) NSString* homePath;
  28. @property (readonly) NSString* tempPath;
  29. @property (readonly) NSArray* droppedFiles;
  30. @property (readonly) NSMutableArray* notifications;
  31. @end
  32. @interface App : Command <AppExports>
  33. - (id) initWithWebView:(WebView *)view;
  34. - (void) addFiles: (NSArray*) files;
  35. @end