12#include <X11/XKBlib.h>
20# include <X11/extensions/XInput.h>
29#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
30# define GHOST_X11_RES_NAME "Blender"
31# define GHOST_X11_RES_CLASS "Blender"
38#define GHOST_X11_ERROR_HANDLERS_OVERRIDE(var) \
40 XErrorHandler handler; \
41 XIOErrorHandler handler_io; \
43 XSetErrorHandler(GHOST_X11_ApplicationErrorHandler), \
44 XSetIOErrorHandler(GHOST_X11_ApplicationIOErrorHandler), \
47#define GHOST_X11_ERROR_HANDLERS_RESTORE(var) \
49 (void)XSetErrorHandler(var.handler); \
50 (void)XSetIOErrorHandler(var.handler_io); \
128 const bool exclusive =
false,
129 const bool is_dialog =
false,
196#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
216 unsigned int *context)
const;
230 void putClipboard(
const char *buffer,
bool selection)
const override;
243 const char *help_label,
244 const char *continue_label,
275#ifdef WITH_X11_XINPUT
276 typedef struct GHOST_TabletX11 {
287 int XtiltLevels, YtiltLevels;
290 std::vector<GHOST_TabletX11> &GetXTablets()
324#ifdef WITH_X11_XINPUT
329#ifdef WITH_X11_XINPUT
330 XExtensionVersion m_xinput_version;
337 XkbDescRec *m_xkb_descr;
339#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
343#ifdef WITH_X11_XINPUT
345 std::vector<GHOST_TabletX11> m_xtablets;
349 std::vector<GHOST_WindowX11 *> m_dirty_windows;
352 char m_keyboard_vector[32];
362 unsigned int m_last_release_keycode;
363 Time m_last_release_time;
365#ifdef WITH_X11_XINPUT
367 Time m_last_key_time;
370 uint m_keycode_last_repeat_key;
377#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
381#ifdef WITH_X11_XINPUT
382 void clearXInputDevices();
383 void refreshXInputDevices();
388 void processEvent(XEvent *xe);
390 Time lastEventTime(Time default_time);
392 bool generateWindowExposeEvents();
int GHOST_X11_ApplicationErrorHandler(Display *display, XErrorEvent *event)
int GHOST_X11_ApplicationIOErrorHandler(Display *display)
GHOST_TConsoleWindowState
char * getClipboard(bool selection) const override
void putClipboard(const char *buffer, bool selection) const override
void getClipboard_xcout(const XEvent *evt, Atom sel, Atom target, unsigned char **txt, unsigned long *len, unsigned int *context) const
~GHOST_SystemX11() override
GHOST_TSuccess getModifierKeys(GHOST_ModifierKeys &keys) const override
void addDirtyWindow(GHOST_WindowX11 *bad_wind)
struct GHOST_SystemX11::@1504 m_atom
Atom _NET_WM_STATE_MAXIMIZED_VERT
GHOST_TSuccess getButtons(GHOST_Buttons &buttons) const override
void getAllDisplayDimensions(uint32_t &width, uint32_t &height) const override
GHOST_IWindow * createWindow(const char *title, int32_t left, int32_t top, uint32_t width, uint32_t height, GHOST_TWindowState state, GHOST_GPUSettings gpuSettings, const bool exclusive=false, const bool is_dialog=false, const GHOST_IWindow *parentWindow=nullptr) override
GHOST_TSuccess setCursorPosition(int32_t x, int32_t y) override
GHOST_TCapabilityFlag getCapabilities() const override
bool processEvents(bool waitForEvent) override
Atom _NET_WM_STATE_FULLSCREEN
void getMainDisplayDimensions(uint32_t &width, uint32_t &height) const override
uint8_t getNumDisplays() const override
GHOST_TSuccess disposeContext(GHOST_IContext *context) override
uint64_t ms_from_input_time(const Time timestamp) const
bool setConsoleWindowState(GHOST_TConsoleWindowState) override
Atom _NET_WM_STATE_MAXIMIZED_HORZ
GHOST_TSuccess getCursorPosition(int32_t &x, int32_t &y) const override
GHOST_IContext * createOffscreenContext(GHOST_GPUSettings gpuSettings) override
GHOST_TSuccess init() override
GHOST_TSuccess showMessageBox(const char *title, const char *message, const char *help_label, const char *continue_label, const char *link, GHOST_DialogOptions dialog_options) const override
uint64_t getMilliSeconds() const override
GHOST_TSuccess getPixelAtCursor(float r_color[3]) const override
unsigned __int64 uint64_t