13#include <X11/cursorfont.h>
26#ifdef WITH_OPENGL_BACKEND
30#ifdef WITH_VULKAN_BACKEND
36# include <X11/extensions/XInput2.h>
40#include <X11/Xresource.h>
77# define HOST_NAME_MAX 64
88#define _NET_WM_STATE_REMOVE 0
89#define _NET_WM_STATE_ADD 1
92#ifdef WITH_OPENGL_BACKEND
93static XVisualInfo *get_x11_visualinfo(
Display *display)
96 XVisualInfo vinfo_template;
97 vinfo_template.screen = DefaultScreen(display);
98 return XGetVisualInfo(display, VisualScreenMask, &vinfo_template, &num_visuals);
112 const bool is_dialog,
114 const bool exclusive,
122 invalid_window_(
false),
124 custom_cursor_(
None),
125 visible_cursor_(
None),
130#
if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
134 preferred_device_(preferred_device)
136#ifdef WITH_OPENGL_BACKEND
137 if (type == GHOST_kDrawingContextTypeOpenGL) {
138 visual_info_ = get_x11_visualinfo(display_);
143 XVisualInfo tmp = {
nullptr};
145 visual_info_ = XGetVisualInfo(display_, 0, &tmp, &n);
149 if (visual_info_ ==
nullptr) {
150 fprintf(stderr,
"initial window could not find the GLX extension\n");
154 uint xattributes_valuemask = 0;
156 XSetWindowAttributes xattributes;
157 memset(&xattributes, 0,
sizeof(xattributes));
159 xattributes_valuemask |= CWBorderPixel;
160 xattributes.border_pixel = 0;
164 xattributes_valuemask |= CWEventMask;
165 xattributes.event_mask = ExposureMask | StructureNotifyMask | KeyPressMask | KeyReleaseMask |
166 EnterWindowMask | LeaveWindowMask | ButtonPressMask |
167 ButtonReleaseMask | PointerMotionMask | FocusChangeMask |
168 PropertyChangeMask | KeymapStateMask;
171 xattributes_valuemask |= CWOverrideRedirect;
172 xattributes.override_redirect = True;
175 xattributes_valuemask |= CWColormap;
176 xattributes.colormap = XCreateColormap(
177 display_, RootWindow(display_, visual_info_->screen), visual_info_->visual, AllocNone);
180 window_ = XCreateWindow(display_,
181 RootWindow(display_, visual_info_->screen),
189 visual_info_->visual,
190 xattributes_valuemask,
203 atoms[
count++] = system_->atom_._NET_WM_STATE_MAXIMIZED_VERT;
204 atoms[
count++] = system_->atom_._NET_WM_STATE_MAXIMIZED_HORZ;
207 atoms[
count++] = system_->atom_._NET_WM_STATE_FULLSCREEN;
210 XChangeProperty(display_,
212 system_->atom_._NET_WM_STATE,
240 if (is_dialog && parent_window) {
247 XSizeHints *xsizehints = XAllocSizeHints();
248 xsizehints->flags = PPosition | PSize | PMinSize | PMaxSize;
249 xsizehints->x =
left;
251 xsizehints->width = width;
252 xsizehints->height = height;
253 xsizehints->min_width = 320;
254 xsizehints->min_height = 240;
255 xsizehints->max_width = 65535;
256 xsizehints->max_height = 65535;
257 XSetWMNormalHints(display_, window_, xsizehints);
263 XClassHint *xclasshint = XAllocClassHint();
264 const int len = strlen(title) + 1;
265 char *wmclass = (
char *)malloc(
sizeof(
char) *
len);
266 memcpy(wmclass, title,
len *
sizeof(
char));
267 xclasshint->res_name = wmclass;
268 xclasshint->res_class = wmclass;
269 XSetClassHint(display_, window_, xclasshint);
275 if (system_->atom_.WM_PROTOCOLS) {
279 if (system_->atom_.WM_DELETE_WINDOW) {
280 atoms[natom] = system_->atom_.WM_DELETE_WINDOW;
284 if (system_->atom_.WM_TAKE_FOCUS && system_->window_focus_) {
285 atoms[natom] = system_->atom_.WM_TAKE_FOCUS;
291 XSetWMProtocols(display_, window_, atoms, natom);
297 XWMHints *xwmhints = XAllocWMHints();
298 xwmhints->initial_state = NormalState;
299 xwmhints->input = (system_->window_focus_) ? True : False;
300 xwmhints->flags = InputHint | StateHint;
301 XSetWMHints(display, window_, xwmhints);
307 motifShowWindowFrame(
false);
312 Atom _NET_WM_ICON = XInternAtom(display_,
"_NET_WM_ICON", False);
313 XChangeProperty(display_,
325 Atom _NET_WM_PID = XInternAtom(display_,
"_NET_WM_PID", False);
326 pid_t pid = getpid();
328 display_, window_, _NET_WM_PID, XA_CARDINAL, 32, PropModeReplace, (
uchar *)&pid, 1);
335 XTextProperty text_prop;
337 gethostname(hostname,
sizeof(hostname));
338 hostname[
sizeof(hostname) - 1] =
'\0';
339 text_array[0] = hostname;
341 XStringListToTextProperty(text_array, 1, &text_prop);
342 XSetWMClientMachine(display_, window_, &text_prop);
343 XFree(text_prop.value);
346#ifdef WITH_X11_XINPUT
347 refreshXInputDevices();
357 "A graphics card and driver with support for OpenGL 4.3 or higher is "
358 "required.\n\nInstalling the latest driver for your graphics card might resolve the "
360 const char *help =
"https://www.blender.org/download/requirements/";
369 XMapRaised(display_, window_);
372 XMapWindow(display_, window_);
375 XLowerWindow(display_, window_);
383#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
384static Bool destroyICCallback(XIC , XPointer
ptr, XPointer )
389 *(XIC *)
ptr =
nullptr;
395bool GHOST_WindowX11::createX11_XIC()
397 XIM xim = system_->getX11_XIM();
403 destroy.callback = (XICProc)destroyICCallback;
404 destroy.client_data = (XPointer)&xic_;
405 xic_ = XCreateIC(xim,
411 XIMPreeditNothing | XIMStatusNothing,
424 XGetICValues(xic_, XNFilterEvents, &fevent,
nullptr);
425 XSelectInput(display_,
427 ExposureMask | StructureNotifyMask | KeyPressMask | KeyReleaseMask |
428 EnterWindowMask | LeaveWindowMask | ButtonPressMask | ButtonReleaseMask |
429 PointerMotionMask | FocusChangeMask | PropertyChangeMask | KeymapStateMask |
435#ifdef WITH_X11_XINPUT
436void GHOST_WindowX11::refreshXInputDevices()
438 if (system_->xinput_version_.present) {
439 std::vector<XEventClass> xevents;
441 for (GHOST_SystemX11::GHOST_TabletX11 &xtablet : system_->GetXTablets()) {
448 DeviceMotionNotify(xtablet.Device, xtablet.MotionEvent, ev);
450 xevents.push_back(ev);
452 DeviceButtonPress(xtablet.Device, xtablet.PressEvent, ev);
454 xevents.push_back(ev);
456 ProximityIn(xtablet.Device, xtablet.ProxInEvent, ev);
458 xevents.push_back(ev);
460 ProximityOut(xtablet.Device, xtablet.ProxOutEvent, ev);
462 xevents.push_back(ev);
466 XSelectExtensionEvent(display_, window_, xevents.data(),
int(xevents.size()));
484 Atom
name = XInternAtom(display_,
"_NET_WM_NAME", 0);
485 Atom utf8str = XInternAtom(display_,
"UTF8_STRING", 0);
487 display_, window_,
name, utf8str, 8, PropModeReplace, (
const uchar *)title, strlen(title));
491 XStoreName(display_, window_, title);
498 char *
name =
nullptr;
500 XFetchName(display_, window_, &
name);
501 std::string title =
name ?
name :
"untitled";
516 int x_return, y_return;
517 uint w_return, h_return, border_w_return, depth_return;
520 XGetGeometry(display_,
540 XWindowChanges values;
541 uint value_mask = CWWidth;
542 values.width = width;
543 XConfigureWindow(display_, window_, value_mask, &values);
550 XWindowChanges values;
551 uint value_mask = CWHeight;
552 values.height = height;
553 XConfigureWindow(display_, window_, value_mask, &values);
559 XWindowChanges values;
560 uint value_mask = CWWidth | CWHeight;
561 values.width = width;
562 values.height = height;
563 XConfigureWindow(display_, window_, value_mask, &values);
574 XTranslateCoordinates(
575 display_, RootWindow(display_, visual_info_->screen), window_, 0, 0, &ax, &ay, &temp);
585 XTranslateCoordinates(
586 display_, window_, RootWindow(display_, visual_info_->screen), inX, inY, &ax, &ay, &temp);
594 Atom atom_window_type = XInternAtom(display_,
"_NET_WM_WINDOW_TYPE", False);
595 Atom atom_dialog = XInternAtom(display_,
"_NET_WM_WINDOW_TYPE_DIALOG", False);
599 display_, window_, atom_window_type, XA_ATOM, 32, PropModeReplace, (
uchar *)&atom_dialog, 1);
600 XSetTransientForHint(display_, window_, parent_window->window_);
609 XChangeProperty(display_,
611 system_->atom_._MOTIF_WM_HINTS,
612 system_->atom_._MOTIF_WM_HINTS,
621void GHOST_WindowX11::icccmSetState(
int state)
625 if (
state != IconicState) {
629 xev.xclient.type = ClientMessage;
630 xev.xclient.serial = 0;
631 xev.xclient.send_event = True;
632 xev.xclient.display = display_;
633 xev.xclient.window = window_;
634 xev.xclient.format = 32;
635 xev.xclient.message_type = system_->atom_.WM_CHANGE_STATE;
636 xev.xclient.data.l[0] =
state;
638 RootWindow(display_, visual_info_->screen),
640 SubstructureNotifyMask | SubstructureRedirectMask,
644int GHOST_WindowX11::icccmGetState()
const
650 ulong bytes_after, num_ret;
656 ret = XGetWindowProperty(display_,
658 system_->atom_.WM_STATE,
662 system_->atom_.WM_STATE,
667 ((
uchar **)&prop_ret));
668 if ((
ret ==
Success) && (prop_ret !=
nullptr) && (num_ret == 2)) {
669 st = prop_ret->state;
682void GHOST_WindowX11::netwmMaximized(
bool set)
686 xev.xclient.type = ClientMessage;
687 xev.xclient.serial = 0;
688 xev.xclient.send_event = True;
689 xev.xclient.window = window_;
690 xev.xclient.message_type = system_->atom_._NET_WM_STATE;
691 xev.xclient.format = 32;
700 xev.xclient.data.l[1] = system_->atom_._NET_WM_STATE_MAXIMIZED_HORZ;
701 xev.xclient.data.l[2] = system_->atom_._NET_WM_STATE_MAXIMIZED_VERT;
702 xev.xclient.data.l[3] = 0;
703 xev.xclient.data.l[4] = 0;
705 RootWindow(display_, visual_info_->screen),
707 SubstructureRedirectMask | SubstructureNotifyMask,
711bool GHOST_WindowX11::netwmIsMaximized()
const
714 ulong bytes_after, num_ret,
i;
721 ret = XGetWindowProperty(display_,
723 system_->atom_._NET_WM_STATE,
732 (
uchar **)&prop_ret);
733 if ((
ret ==
Success) && (prop_ret) && (format_ret == 32)) {
735 for (
i = 0;
i < num_ret;
i++) {
736 if (prop_ret[
i] == system_->atom_._NET_WM_STATE_MAXIMIZED_HORZ) {
739 if (prop_ret[
i] == system_->atom_._NET_WM_STATE_MAXIMIZED_VERT) {
755void GHOST_WindowX11::netwmFullScreen(
bool set)
759 xev.xclient.type = ClientMessage;
760 xev.xclient.serial = 0;
761 xev.xclient.send_event = True;
762 xev.xclient.window = window_;
763 xev.xclient.message_type = system_->atom_._NET_WM_STATE;
764 xev.xclient.format = 32;
773 xev.xclient.data.l[1] = system_->atom_._NET_WM_STATE_FULLSCREEN;
774 xev.xclient.data.l[2] = 0;
775 xev.xclient.data.l[3] = 0;
776 xev.xclient.data.l[4] = 0;
778 RootWindow(display_, visual_info_->screen),
780 SubstructureRedirectMask | SubstructureNotifyMask,
784bool GHOST_WindowX11::netwmIsFullScreen()
const
787 ulong bytes_after, num_ret,
i;
794 ret = XGetWindowProperty(display_,
796 system_->atom_._NET_WM_STATE,
805 (
uchar **)&prop_ret);
806 if ((
ret ==
Success) && (prop_ret) && (format_ret == 32)) {
807 for (
i = 0;
i < num_ret;
i++) {
808 if (prop_ret[
i] == system_->atom_._NET_WM_STATE_FULLSCREEN) {
821void GHOST_WindowX11::motifShowWindowFrame(
bool set)
831 "Only allowed when the window frame is shown.");
835 XChangeProperty(display_,
837 system_->atom_._MOTIF_WM_HINTS,
838 system_->atom_._MOTIF_WM_HINTS,
845bool GHOST_WindowX11::motifIsShowWindowFrame()
const
847 MotifWmHints *prop_ret;
848 ulong bytes_after, num_ret;
855 st = XGetWindowProperty(display_,
857 system_->atom_._MOTIF_WM_HINTS,
861 system_->atom_._MOTIF_WM_HINTS,
866 (
uchar **)&prop_ret);
867 if ((st ==
Success) && prop_ret) {
881void GHOST_WindowX11::motifFullScreen(
bool set)
884 motifShowWindowFrame(
false);
887 motifShowWindowFrame(
true);
891bool GHOST_WindowX11::motifIsFullScreen()
const
897 return motifIsShowWindowFrame();
906 state = icccmGetState();
911 if (
ELEM(
state, IconicState, WithdrawnState)) {
914 else if (netwmIsFullScreen() == True) {
917 else if (motifIsFullScreen() == True) {
920 else if (netwmIsMaximized() == True) {
929 bool is_max, is_full, is_motif_full;
932 if (
state ==
int(cur_state)) {
941 is_max = netwmIsMaximized();
942 is_full = netwmIsFullScreen();
949 is_motif_full = motifIsFullScreen();
952 state = normal_state_;
956 if (is_max == True) {
957 netwmMaximized(False);
959 if (is_full == True) {
960 netwmFullScreen(False);
962 if (is_motif_full == True) {
963 motifFullScreen(False);
965 icccmSetState(NormalState);
978 normal_state_ = cur_state;
980 if (is_max == True) {
981 netwmMaximized(False);
983 if (is_full == False) {
984 netwmFullScreen(True);
986 if (is_motif_full == False) {
987 motifFullScreen(True);
1001 if (is_full == True) {
1002 netwmFullScreen(False);
1004 if (is_motif_full == True) {
1005 motifFullScreen(False);
1007 if (is_max == False) {
1008 netwmMaximized(True);
1018 icccmSetState(IconicState);
1028 XWindowAttributes attr;
1035 XRaiseWindow(display_, window_);
1037 atom = XInternAtom(display_,
"_NET_ACTIVE_WINDOW", True);
1044 xev.xclient.type = ClientMessage;
1045 xev.xclient.serial = 0;
1046 xev.xclient.send_event = True;
1047 xev.xclient.window = window_;
1048 xev.xclient.message_type = atom;
1050 xev.xclient.format = 32;
1051 xev.xclient.data.l[0] = 1;
1052 xev.xclient.data.l[1] = CurrentTime;
1053 xev.xclient.data.l[2] = window_;
1054 xev.xclient.data.l[3] = 0;
1055 xev.xclient.data.l[4] = 0;
1057 root = RootWindow(display_, visual_info_->screen);
1058 eventmask = SubstructureRedirectMask | SubstructureNotifyMask;
1060 XSendEvent(display_, root, False, eventmask, &xev);
1063 XGetWindowAttributes(display_, window_, &attr);
1066 if (attr.map_state == IsViewable) {
1067 XSetInputFocus(display_, window_, RevertToPointerRoot, CurrentTime);
1072 XLowerWindow(display_, window_);
1084 Atom atom_window_type = XInternAtom(display_,
"_NET_WM_WINDOW_TYPE", False);
1085 Atom atom_dialog = XInternAtom(display_,
"_NET_WM_WINDOW_TYPE_DIALOG", False);
1088 ulong bytes_after, num_ret;
1091 int format_ret,
ret;
1095 ret = XGetWindowProperty(display_,
1106 (
uchar **)&prop_ret);
1107 if ((
ret ==
Success) && (prop_ret) && (format_ret == 32)) {
1108 if (prop_ret[0] == atom_dialog) {
1135 if (invalid_window_ ==
false) {
1136 system_->addDirtyWindow(
this);
1137 invalid_window_ =
true;
1150 invalid_window_ =
false;
1155 std::map<uint, Cursor>::iterator it = standard_cursors_.begin();
1156 for (; it != standard_cursors_.end(); ++it) {
1157 XFreeCursor(display_, it->second);
1160 if (empty_cursor_) {
1161 XFreeCursor(display_, empty_cursor_);
1163 if (custom_cursor_) {
1164 XFreeCursor(display_, custom_cursor_);
1168 static Atom Primary_atom, Clipboard_atom;
1171 Primary_atom = XInternAtom(display_,
"PRIMARY", False);
1172 Clipboard_atom = XInternAtom(display_,
"CLIPBOARD", False);
1174 p_owner = XGetSelectionOwner(display_, Primary_atom);
1175 c_owner = XGetSelectionOwner(display_, Clipboard_atom);
1177 if (p_owner == window_) {
1178 XSetSelectionOwner(display_, Primary_atom,
None, CurrentTime);
1180 if (c_owner == window_) {
1181 XSetSelectionOwner(display_, Clipboard_atom,
None, CurrentTime);
1186 XFree(visual_info_);
1189#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
1196 delete drop_target_;
1202 XDestroyWindow(display_, window_);
1209#ifdef WITH_VULKAN_BACKEND
1210 case GHOST_kDrawingContextTypeVulkan: {
1212 GHOST_kVulkanPlatformX11,
1222 if (context->initializeDrawingContext()) {
1230#ifdef WITH_OPENGL_BACKEND
1231 case GHOST_kDrawingContextTypeOpenGL: {
1234 for (
int minor = 6; minor >= 3; --minor) {
1238 EGLNativeWindowType(window_),
1239 EGLNativeDisplayType(display_),
1240 EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT,
1247 if (context->initializeDrawingContext()) {
1255 for (
int minor = 6; minor >= 3; --minor) {
1260 (GLXFBConfig)fbconfig_,
1261 GLX_CONTEXT_CORE_PROFILE_BIT_ARB,
1267 if (context->initializeDrawingContext()) {
1288 xcursor_id = XC_question_arrow;
1291 xcursor_id = XC_watch;
1294 xcursor_id = XC_xterm;
1297 xcursor_id = XC_crosshair;
1300 xcursor_id = XC_sb_v_double_arrow;
1303 xcursor_id = XC_sb_h_double_arrow;
1306 xcursor_id = XC_top_side;
1309 xcursor_id = XC_bottom_side;
1312 xcursor_id = XC_left_side;
1315 xcursor_id = XC_right_side;
1318 xcursor_id = XC_top_left_corner;
1321 xcursor_id = XC_top_right_corner;
1324 xcursor_id = XC_bottom_right_corner;
1327 xcursor_id = XC_bottom_left_corner;
1337 xcursor = standard_cursors_[xcursor_id];
1340 xcursor = XCreateFontCursor(display_, xcursor_id);
1342 standard_cursors_[xcursor_id] = xcursor;
1348Cursor GHOST_WindowX11::getEmptyCursor()
1350 if (!empty_cursor_) {
1356 blank = XCreateBitmapFromData(
1357 display_, RootWindow(display_, visual_info_->screen),
data, 1, 1);
1359 empty_cursor_ = XCreatePixmapCursor(display_, blank, blank, &dummy, &dummy, 0, 0);
1360 XFreePixmap(display_, blank);
1363 return empty_cursor_;
1371 if (visible_cursor_) {
1372 xcursor = visible_cursor_;
1379 xcursor = getEmptyCursor();
1382 XDefineCursor(display_, window_, xcursor);
1399#ifdef GHOST_X11_GRAB
1400 XGrabPointer(display_,
1403 ButtonPressMask | ButtonReleaseMask | PointerMotionMask,
1421#if defined(WITH_X11_XINPUT) && defined(USE_X11_XINPUT_WARP)
1422 if ((system_->xinput_version_.present) && (system_->xinput_version_.major_version >= 2)) {
1424 if (XIGetClientPointer(display_,
None, &device_id) != False) {
1425 XIWarpPointer(display_, device_id,
None,
None, 0, 0, 0, 0, 0, 0);
1431 XWarpPointer(display_,
None,
None, 0, 0, 0, 0, 0, 0);
1444#ifdef GHOST_X11_GRAB
1445 XUngrabPointer(display_, CurrentTime);
1461 visible_cursor_ = xcursor;
1463 XDefineCursor(display_, window_, xcursor);
1472 return getStandardCursor(shape, xcursor);
1476 const uint8_t *
mask,
1478 const int hot_spot[2],
1481 Colormap colormap = DefaultColormap(display_, visual_info_->screen);
1482 Pixmap bitmap_pix, mask_pix;
1485 if (XAllocNamedColor(display_, colormap,
"White", &fg, &fg) == 0) {
1488 if (XAllocNamedColor(display_, colormap,
"Black", &bg, &bg) == 0) {
1492 if (custom_cursor_) {
1493 XFreeCursor(display_, custom_cursor_);
1496 bitmap_pix = XCreateBitmapFromData(display_, window_, (
char *)bitmap,
size[0],
size[1]);
1497 mask_pix = XCreateBitmapFromData(display_, window_, (
char *)
mask,
size[0],
size[1]);
1499 custom_cursor_ = XCreatePixmapCursor(
1500 display_, bitmap_pix, mask_pix, &fg, &bg, hot_spot[0], hot_spot[1]);
1501 XDefineCursor(display_, window_, custom_cursor_);
1504 visible_cursor_ = custom_cursor_;
1506 XFreePixmap(display_, bitmap_pix);
1507 XFreePixmap(display_, mask_pix);
1509 XFreeColors(display_, colormap, &fg.pixel, 1, 0
L);
1510 XFreeColors(display_, colormap, &bg.pixel, 1, 0
L);
1518 char *resMan = XResourceManagerString(display_);
1520 XrmDatabase xrdb = XrmGetStringDatabase(resMan);
1523 char *type =
nullptr;
1526 int success = XrmGetResource(xrdb,
"Xft.dpi",
"Xft.Dpi", &type, &val);
1527 if (success && type) {
1528 if (
STREQ(type,
"String")) {
1529 dpi = atoi((
const char *)val.addr);
1532 XrmDestroyDatabase(xrdb);
1541 XWindowAttributes attr;
1542 if (!XGetWindowAttributes(display_, window_, &attr)) {
1547 Screen *screen = attr.screen;
1548 int pixelWidth = WidthOfScreen(screen);
1549 int pixelHeight = HeightOfScreen(screen);
1550 int mmWidth = WidthMMOfScreen(screen);
1551 int mmHeight = HeightMMOfScreen(screen);
1553 double pixelDiagonal =
sqrt((pixelWidth * pixelWidth) + (pixelHeight * pixelHeight));
1554 double mmDiagonal =
sqrt((mmWidth * mmWidth) + (mmHeight * mmHeight));
1555 float inchDiagonal = mmDiagonal * 0.039f;
1556 int dpi = pixelDiagonal / inchDiagonal;
void BLI_kdtree_nd_ free(KDTree *tree)
#define GHOST_OPENGL_EGL_CONTEXT_FLAGS
#define GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY
#define GHOST_OPENGL_GLX_RESET_NOTIFICATION_STRATEGY
#define GHOST_OPENGL_GLX_CONTEXT_FLAGS
#define GHOST_ASSERT(x, info)
static const unsigned long BLENDER_ICONS_WM_X11[]
@ GHOST_kWindowStateMinimized
@ GHOST_kWindowStateMaximized
@ GHOST_kWindowStateNormal
@ GHOST_kWindowStateFullScreen
@ GHOST_kStandardCursorBottomLeftCorner
@ GHOST_kStandardCursorHelp
@ GHOST_kStandardCursorWait
@ GHOST_kStandardCursorTopSide
@ GHOST_kStandardCursorCrosshair
@ GHOST_kStandardCursorLeftRight
@ GHOST_kStandardCursorUpDown
@ GHOST_kStandardCursorBottomSide
@ GHOST_kStandardCursorTopLeftCorner
@ GHOST_kStandardCursorBottomRightCorner
@ GHOST_kStandardCursorDefault
@ GHOST_kStandardCursorRightSide
@ GHOST_kStandardCursorTopRightCorner
@ GHOST_kStandardCursorLeftSide
@ GHOST_kStandardCursorText
static const GHOST_TabletData GHOST_TABLET_DATA_NONE
GHOST_TDrawingContextType
@ GHOST_kWindowOrderBottom
#define _NET_WM_STATE_REMOVE
#define _NET_WM_STATE_ADD
BMesh const char void * data
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
static bool getUseWindowFrame()
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
GHOST_Context * newDrawingContext(GHOST_TDrawingContextType type) override
GHOST_WindowX11(GHOST_SystemX11 *system, Display *display, const char *title, int32_t left, int32_t top, uint32_t width, uint32_t height, GHOST_TWindowState state, GHOST_WindowX11 *parent_window, GHOST_TDrawingContextType type, const bool is_dialog, const GHOST_ContextParams &context_params, const bool exclusive, const GHOST_GPUDevice &preferred_device)
bool getValid() const override
void clientToScreen(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const override
GHOST_TSuccess setClientHeight(uint32_t height) override
void getWindowBounds(GHOST_Rect &bounds) const override
~GHOST_WindowX11() override
GHOST_TSuccess setState(GHOST_TWindowState state) override
GHOST_TSuccess endProgressBar() override
void getClientBounds(GHOST_Rect &bounds) const override
void setTitle(const char *title) override
std::string getTitle() const override
GHOST_TSuccess setClientWidth(uint32_t width) override
GHOST_TSuccess setWindowCursorShape(GHOST_TStandardCursor shape) override
GHOST_TSuccess setProgressBar(float progress) override
GHOST_TSuccess hasCursorShape(GHOST_TStandardCursor shape) override
GHOST_TSuccess setClientSize(uint32_t width, uint32_t height) override
GHOST_TSuccess setOrder(GHOST_TWindowOrder order) override
GHOST_TSuccess setWindowCursorVisibility(bool visible) override
void screenToClient(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const override
GHOST_TSuccess setWindowCustomCursorShape(const uint8_t *bitmap, const uint8_t *mask, const int size[2], const int hot_spot[2], bool can_invert_color) override
bool isDialog() const override
uint16_t getDPIHint() override
GHOST_TSuccess setWindowCursorGrab(GHOST_TGrabCursorMode mode) override
GHOST_TSuccess invalidate() override
GHOST_TWindowState post_state_
GHOST_TSuccess setDialogHints(GHOST_WindowX11 *parent_window)
GHOST_TWindowState getState() const override
GHOST_ContextParams want_context_params_
void setCursorGrabAccum(int32_t x, int32_t y)
GHOST_TStandardCursor getCursorShape() const override
GHOST_TSuccess setDrawingContextType(GHOST_TDrawingContextType type) override
int32_t cursor_grab_init_pos_[2]
GHOST_TSuccess releaseNativeHandles()
bool getValid() const override
GHOST_Window(uint32_t width, uint32_t height, GHOST_TWindowState state, const GHOST_ContextParams &context_params, const bool exclusive=false)
GHOST_Rect cursor_grab_bounds_
GHOST_WindowHDRInfo hdr_info_
GHOST_TGrabCursorMode cursor_grab_
ccl_device_inline float2 mask(const MaskType mask, const float2 a)