Files
armorpaint/base/sources/backends/linux_system.h
T

58 lines
1.1 KiB
C
Raw Normal View History

2024-11-10 22:11:29 +01:00
#pragma once
2025-02-26 08:47:09 +01:00
#include <iron_system.h>
2024-11-10 22:11:29 +01:00
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/extensions/XInput.h>
2025-09-14 16:40:34 +02:00
#include <X11/extensions/XInput2.h>
2024-11-10 22:11:29 +01:00
#include <X11/extensions/Xrandr.h>
2025-08-03 12:02:59 +02:00
#define MAXIMUM_DISPLAYS 8
2024-11-10 22:11:29 +01:00
2025-03-09 17:02:12 +01:00
struct iron_x11_window {
2024-11-10 22:11:29 +01:00
int display_index;
int width;
int height;
2025-03-09 17:02:12 +01:00
iron_window_mode_t mode;
2024-11-10 22:11:29 +01:00
Window window;
XIM xInputMethod;
XIC xInputContext;
};
2025-03-09 17:02:12 +01:00
struct iron_x11_display {
2024-11-10 22:11:29 +01:00
int index;
int x;
int y;
int width;
int height;
bool primary;
RROutput output;
RRCrtc crtc;
};
struct x11_pen_device {
2025-09-14 16:40:34 +02:00
int id;
int pressure_index;
double pressure_max;
float pressure_current;
2025-02-15 18:32:13 +01:00
void (*press)(int /*x*/, int /*y*/, float /*pressure*/);
void (*move)(int /*x*/, int /*y*/, float /*pressure*/);
void (*release)(int /*x*/, int /*y*/, float /*pressure*/);
2024-11-10 22:11:29 +01:00
};
struct x11_context {
Display *display;
struct x11_pen_device pen;
struct x11_pen_device eraser;
2025-06-20 23:53:10 +02:00
struct iron_x11_window windows[1];
2024-11-10 22:11:29 +01:00
int num_displays;
2025-03-09 17:02:12 +01:00
struct iron_x11_display displays[MAXIMUM_DISPLAYS];
2024-11-10 22:11:29 +01:00
};
2025-08-03 13:23:42 +02:00
#ifdef WITH_GAMEPAD
2025-03-09 17:02:12 +01:00
void iron_linux_initHIDGamepads();
void iron_linux_updateHIDGamepads();
void iron_linux_closeHIDGamepads();
2025-08-03 13:23:42 +02:00
#endif