2021-06-26 13:36:56 +00:00
|
|
|
#ifndef SUNSHINE_PLATFORM_MISC_H
|
|
|
|
#define SUNSHINE_PLATFORM_MISC_H
|
|
|
|
|
2021-08-12 19:11:40 +00:00
|
|
|
#include <unistd.h>
|
2021-06-26 13:36:56 +00:00
|
|
|
#include <vector>
|
2021-08-12 19:11:40 +00:00
|
|
|
|
|
|
|
#include "sunshine/utility.h"
|
|
|
|
|
|
|
|
KITTY_USING_MOVE_T(file_t, int, -1, {
|
|
|
|
if(el >= 0) {
|
|
|
|
close(el);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2021-09-06 18:40:41 +00:00
|
|
|
enum class window_system_e {
|
|
|
|
NONE,
|
|
|
|
X11,
|
|
|
|
WAYLAND,
|
|
|
|
};
|
|
|
|
|
|
|
|
extern window_system_e window_system;
|
|
|
|
|
2021-06-26 13:36:56 +00:00
|
|
|
namespace dyn {
|
|
|
|
typedef void (*apiproc)(void);
|
|
|
|
|
|
|
|
int load(void *handle, const std::vector<std::tuple<apiproc *, const char *>> &funcs, bool strict = true);
|
|
|
|
void *handle(const std::vector<const char *> &libs);
|
|
|
|
|
|
|
|
} // namespace dyn
|
|
|
|
|
|
|
|
#endif
|