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,
261 GHOST_IWindow *window,
275#ifdef WITH_X11_XINPUT
276 typedef struct GHOST_TabletX11 {
287 int XtiltLevels, YtiltLevels;
290 std::vector<GHOST_TabletX11> &GetXTablets()
325#ifdef WITH_X11_XINPUT
330#ifdef WITH_X11_XINPUT
331 XExtensionVersion xinput_version_;
338 XkbDescRec *xkb_descr_;
340#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
344#ifdef WITH_X11_XINPUT
346 std::vector<GHOST_TabletX11> xtablets_;
350 std::vector<GHOST_WindowX11 *> dirty_windows_;
353 char keyboard_vector_[32];
363 unsigned int last_release_keycode_;
364 Time last_release_time_;
366#ifdef WITH_X11_XINPUT
371 uint keycode_last_repeat_key_;
378#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
382#ifdef WITH_X11_XINPUT
383 void clearXInputDevices();
384 void refreshXInputDevices();
391 Time lastEventTime(Time default_time);
393 bool generateWindowExposeEvents();
bool processEvent(GHOST_EventHandle hEvent, GHOST_TUserDataPtr user_data)
int GHOST_X11_ApplicationErrorHandler(Display *display, XErrorEvent *event)
int GHOST_X11_ApplicationIOErrorHandler(Display *display)
GHOST_TConsoleWindowState
BMesh const char void * data
unsigned long long int uint64_t
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_IWindow * createWindow(const char *title, int32_t left, int32_t top, uint32_t width, uint32_t height, GHOST_TWindowState state, GHOST_GPUSettings gpu_settings, const bool exclusive=false, const bool is_dialog=false, const GHOST_IWindow *parent_window=nullptr) override
GHOST_TSuccess getModifierKeys(GHOST_ModifierKeys &keys) const override
void addDirtyWindow(GHOST_WindowX11 *bad_wind)
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_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
GHOST_IContext * createOffscreenContext(GHOST_GPUSettings gpu_settings) 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
struct GHOST_SystemX11::@164270272260354005033176304166017055252265157316 atom_
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