2012-06-10 16:50:54 +00:00
|
|
|
/*
|
2024-09-17 19:00:25 +00:00
|
|
|
* Deskflow -- mouse and keyboard sharing utility
|
2025-02-07 17:03:26 +00:00
|
|
|
* SPDX-FileCopyrightText: (C) 2010 - 2018, 2024 - 2025 Symless Ltd.
|
|
|
|
|
* SPDX-FileCopyrightText: (C) 2002 - 2007 Chris Schoeneman
|
2025-01-24 00:11:17 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
2012-06-10 16:50:54 +00:00
|
|
|
*/
|
|
|
|
|
|
2014-02-28 12:36:45 +00:00
|
|
|
#pragma once
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2017-03-08 18:49:29 +00:00
|
|
|
#if defined(_WIN32)
|
2024-07-02 19:07:06 +00:00
|
|
|
#define SYSAPI_WIN32 1
|
|
|
|
|
#define WINAPI_MSWINDOWS 1
|
2017-03-08 18:49:29 +00:00
|
|
|
#elif HAVE_CONFIG_H
|
2025-03-19 22:09:28 +00:00
|
|
|
#include "Config.h"
|
2012-06-10 16:50:54 +00:00
|
|
|
#else
|
2024-07-02 19:07:06 +00:00
|
|
|
#error "config.h missing"
|
2012-06-10 16:50:54 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// define NULL
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
|
|
// make assert available since we use it a lot
|
|
|
|
|
#include <assert.h>
|
2025-01-11 00:09:43 +00:00
|
|
|
#include <stdint.h>
|
2025-02-07 17:03:26 +00:00
|
|
|
#include <stdlib.h> // IWYU pragma: keep
|
|
|
|
|
#include <string.h> // IWYU pragma: keep
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2025-01-11 02:14:00 +00:00
|
|
|
// defined in Carbon
|
|
|
|
|
#if !defined(__MACTYPES__)
|
|
|
|
|
#if defined(__APPLE__)
|
|
|
|
|
#include <CoreServices/CoreServices.h>
|
|
|
|
|
#else
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
2024-10-17 18:04:35 +00:00
|
|
|
enum
|
|
|
|
|
{
|
2025-02-07 17:03:26 +00:00
|
|
|
kExitSuccess = 0, // successful completion
|
|
|
|
|
kExitFailed = 1, // general failure
|
|
|
|
|
kExitTerminated = 2, // killed by signal
|
|
|
|
|
kExitArgs = 3, // bad arguments
|
|
|
|
|
kExitConfig = 4, // cannot read configuration
|
2012-06-10 16:50:54 +00:00
|
|
|
};
|