-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.h
68 lines (61 loc) · 1.17 KB
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef MAIN_H
#define MAIN_H
#ifdef _MSC_VER
#define PATH_MAX MAX_PATH
#include <SDL.h>
#else
#include <SDL2/SDL.h>
#endif
#ifdef __WIN32
#include <stdio.h>
#include <windows.h>
#elif __DARWIN
#include <objc/runtime.h>
#include <objc/message.h>
#include <Carbon/Carbon.h>
#include <CoreGraphics/CGDisplayConfiguration.h>
#include <limits.h>
#include <pwd.h>
#elif __LINUX
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <linux/limits.h>
#include <pwd.h>
#include <unistd.h>
#endif
typedef struct
{
float sensitivityX;
float sensitivityY;
SDL_Texture *tex;
} Layer;
typedef struct
{
char dirPath[PATH_MAX];
int repeatX, repeatY;
int layersCount;
Layer *layers;
int originalW, originalH;
SDL_Texture *tex;
} Wallpaper;
typedef struct
{
int x, y, w, h;
int wallpaperX, wallpaperY, wallpaperW, wallpaperH;
SDL_Texture *tex;
Wallpaper wallpaper;
} Monitor;
typedef struct
{
int reloadRootWnd;
int monitorsCount;
float smooth;
int targetFPS;
Monitor *monitors;
} Config;
typedef struct
{
SDL_Window *window;
SDL_Renderer *renderer;
} App;
#endif // MAIN_H