11 #ifndef ccuty_macdesktop
12 #define ccuty_macdesktop
25 int system(
const std::string& command);
28 int system(
const std::string& command, std::string& result);
46 void open(
const std::string& path);
50 void openUrl(
const std::string& url);
55 void openFile(
const std::string& path);
60 void openApp(
const std::string& path);
63 void openApp(
const std::string& path,
const std::string& arg);
66 void hideApp(
const std::string& path);
69 void tellApp(
const std::string& path,
const std::string& command,
bool inBackground =
true);
72 void tellApp(
const std::string& path,
const std::string& command, std::string& result);
78 void changeVolume(
int value,
bool displayNotification =
false);
81 void setVolume(
unsigned int value,
bool displayNotification =
false);
87 void beep(
int seconds);
90 void say(
const std::string& message);
99 bool playAlbum(
const std::string& album,
const std::string& artist);
104 bool playPlaylist(
const std::string& playlist,
const std::string& track =
"");
110 bool getCurrentTrack(std::string& album, std::string& artist, std::string& track,
111 bool isPlaying =
true);
130 static void getMouse(
double& x,
double& y);
133 static void pressMouse(
double x,
double y,
unsigned int mouseButton);
136 static void releaseMouse(
double x,
double y,
unsigned int mouseButton);
139 static void dragMouse(
double x,
double y,
unsigned int mouseButton);
142 static void moveMouse(
double x,
double y);
145 enum Modifiers {Shift=1<<0, Control=1<<1, Alt=1<<2, Command=1<<3};
169 static void sendKeycode(uint32_t keycode, uint8_t modifiers=0, uint8_t keytype =
KeyType);