2021-06-06 01:26:18 +00:00
|
|
|
/**
|
|
|
|
* Looking Glass
|
|
|
|
* Copyright (C) 2017-2021 The Looking Glass Authors
|
|
|
|
* https://looking-glass.io
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License as published by the Free
|
|
|
|
* Software Foundation; either version 2 of the License, or (at your option)
|
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
* more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc., 59
|
|
|
|
* Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
2019-02-28 05:35:30 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2019-02-28 08:20:35 +00:00
|
|
|
#include <stdbool.h>
|
2019-02-28 05:35:30 +00:00
|
|
|
|
2021-01-21 04:07:19 +00:00
|
|
|
// exit code for user opted to exit looking-glass-host
|
2021-01-21 04:24:02 +00:00
|
|
|
#define LG_HOST_EXIT_USER 0x10
|
2021-01-21 04:07:19 +00:00
|
|
|
// exit code for capture errors that should result in a restart, e.g. UAC
|
2021-01-21 04:24:02 +00:00
|
|
|
#define LG_HOST_EXIT_CAPTURE 0x20
|
2021-01-21 04:07:19 +00:00
|
|
|
// exit code for terminated
|
2021-01-21 04:24:02 +00:00
|
|
|
#define LG_HOST_EXIT_KILLED 0x30
|
2021-01-21 04:07:19 +00:00
|
|
|
// exit code for failed to start
|
2021-01-21 04:24:02 +00:00
|
|
|
#define LG_HOST_EXIT_FAILED 0x40
|
2021-03-18 23:05:51 +00:00
|
|
|
// exit code for failed to start, and no amount of restarting could help
|
|
|
|
#define LG_HOST_EXIT_FATAL 0x50
|
2021-01-21 04:07:19 +00:00
|
|
|
|
2019-05-09 09:30:09 +00:00
|
|
|
int app_main(int argc, char * argv[]);
|
2019-05-09 12:06:58 +00:00
|
|
|
bool app_init();
|
2021-01-21 04:14:50 +00:00
|
|
|
void app_shutdown();
|
2019-03-02 09:31:33 +00:00
|
|
|
void app_quit();
|
2019-02-28 05:35:30 +00:00
|
|
|
|
2019-02-28 08:20:35 +00:00
|
|
|
// these must be implemented for each OS
|
2020-04-24 10:34:58 +00:00
|
|
|
const char * os_getExecutable();
|
2020-05-30 02:31:26 +00:00
|
|
|
const char * os_getDataPath();
|
2021-06-04 02:31:15 +00:00
|
|
|
void os_showMessage(const char * caption, const char * msg);
|
2021-02-03 22:42:54 +00:00
|
|
|
|
|
|
|
bool os_blockScreensaver();
|