30 invalid_window_(
false),
35 sdl_win_ = SDL_CreateWindow(title,
40 SDL_WINDOW_RESIZABLE | SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN);
49 SDL_RaiseWindow(sdl_win_);
57 if (sdl_custom_cursor_) {
58 SDL_FreeCursor(sdl_custom_cursor_);
63 SDL_DestroyWindow(sdl_win_);
70#ifdef WITH_OPENGL_BACKEND
71 case GHOST_kDrawingContextTypeOpenGL: {
72 for (
int minor = 6; minor >= 3; --minor) {
82 if (context->initializeDrawingContext()) {
99 if (invalid_window_ ==
false) {
100 system_->addDirtyWindow(
this);
101 invalid_window_ =
true;
111 SDL_SetWindowFullscreen(sdl_win_, SDL_FALSE);
112 SDL_RestoreWindow(sdl_win_);
115 SDL_SetWindowFullscreen(sdl_win_, SDL_FALSE);
116 SDL_MaximizeWindow(sdl_win_);
119 SDL_MinimizeWindow(sdl_win_);
122 SDL_SetWindowFullscreen(sdl_win_, SDL_TRUE);
133 Uint32 flags = SDL_GetWindowFlags(sdl_win_);
135 if (flags & SDL_WINDOW_FULLSCREEN) {
138 if (flags & SDL_WINDOW_MAXIMIZED) {
141 if (flags & SDL_WINDOW_MINIMIZED) {
154 SDL_SetWindowTitle(sdl_win_, title);
159 return SDL_GetWindowTitle(sdl_win_);
170 SDL_GetWindowSize(sdl_win_, &
w, &h);
171 SDL_GetWindowPosition(sdl_win_, &
x, &
y);
182 SDL_GetWindowSize(sdl_win_,
nullptr, &height);
183 SDL_SetWindowSize(sdl_win_, width, height);
190 SDL_GetWindowSize(sdl_win_, &width,
nullptr);
191 SDL_SetWindowSize(sdl_win_, width, height);
197 SDL_SetWindowSize(sdl_win_, width, height);
205 SDL_GetWindowPosition(sdl_win_, &x_win, &y_win);
214 SDL_GetWindowPosition(sdl_win_, &x_win, &y_win);
222 0xef, 0x01, 0xff, 0x01, 0xff, 0x01, 0x7c, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00,
223 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x7c, 0x00, 0xff, 0x01, 0xff, 0x01, 0xef, 0x01,
226 0x00, 0x77, 0x00, 0x1c, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08,
227 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x1c, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00,
229#define sdl_std_cursor_WIDTH_xterm 9
230#define sdl_std_cursor_HEIGHT_xterm 16
231#define sdl_std_cursor_HOT_X_xterm -3
232#define sdl_std_cursor_HOT_Y_xterm -7
235 0xfc, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f, 0xfe, 0x1f, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
236 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfe, 0x1f, 0xfc, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f,
239 0xf8, 0x07, 0xf8, 0x07, 0xf8, 0x07, 0xfc, 0x0f, 0x86, 0x18, 0x83, 0x30, 0x81, 0xe0, 0xc1, 0xe1,
240 0xc1, 0xe1, 0x21, 0xe0, 0x13, 0x30, 0x06, 0x18, 0xfc, 0x0f, 0xf8, 0x07, 0xf8, 0x07, 0xf8, 0x07,
242#define sdl_std_cursor_WIDTH_watch 16
243#define sdl_std_cursor_HEIGHT_watch 16
244#define sdl_std_cursor_HOT_X_watch -15
245#define sdl_std_cursor_HOT_Y_watch -7
248 0xe8, 0x76, 0xfb, 0xdf, 0xfd, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xcf, 0x79, 0xc0, 0x01,
249 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x07, 0xc0, 0x07, 0xc0, 0x07, 0xc0, 0x07, 0x80, 0x03,
252 0x88, 0x04, 0x20, 0x0a, 0xc9, 0x32, 0xf2, 0x09, 0x4c, 0x06, 0x43, 0x18, 0x40, 0x00, 0x40, 0x00,
253 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x01, 0x40, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
255#define sdl_std_cursor_WIDTH_umbrella 16
256#define sdl_std_cursor_HEIGHT_umbrella 16
257#define sdl_std_cursor_HOT_X_umbrella -7
258#define sdl_std_cursor_HOT_Y_umbrella -12
261 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xc0, 0x01, 0xe0, 0x03, 0xf0, 0x07, 0xf8, 0x0f,
262 0xdc, 0x1d, 0xcc, 0x19, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01,
265 0xff, 0x1f, 0xff, 0x1f, 0x00, 0x00, 0x40, 0x00, 0xe0, 0x00, 0x50, 0x01, 0x48, 0x02, 0x44, 0x04,
266 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
268#define sdl_std_cursor_WIDTH_top_side 15
269#define sdl_std_cursor_HEIGHT_top_side 16
270#define sdl_std_cursor_HOT_X_top_side -6
271#define sdl_std_cursor_HOT_Y_top_side -14
274 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0xfc, 0xf7, 0xfc, 0xf7, 0xfc, 0xf7,
275 0xc0, 0xf7, 0xe0, 0xf7, 0x70, 0xf7, 0x38, 0xf7, 0x1c, 0xf7, 0x0c, 0xf7, 0x00, 0xf0, 0x00, 0xf0,
278 0xff, 0x3f, 0xff, 0x3f, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0xfc, 0x31, 0x80, 0x31, 0x40, 0x31,
279 0x20, 0x31, 0x10, 0x31, 0x08, 0x31, 0x04, 0x31, 0x00, 0x30, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00,
281#define sdl_std_cursor_WIDTH_top_right_corner 16
282#define sdl_std_cursor_HEIGHT_top_right_corner 16
283#define sdl_std_cursor_HOT_X_top_right_corner -13
284#define sdl_std_cursor_HOT_Y_top_right_corner -14
287 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0xef, 0x3f, 0xef, 0x3f, 0xef, 0x3f,
288 0xef, 0x03, 0xef, 0x07, 0xef, 0x0e, 0xef, 0x1c, 0xef, 0x38, 0xef, 0x30, 0x0f, 0x00, 0x0f, 0x00,
291 0xff, 0x3f, 0xff, 0x3f, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0xe3, 0x0f, 0x63, 0x00, 0xa3, 0x00,
292 0x23, 0x01, 0x23, 0x02, 0x23, 0x04, 0x23, 0x08, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
294#define sdl_std_cursor_WIDTH_top_left_corner 16
295#define sdl_std_cursor_HEIGHT_top_left_corner 16
296#define sdl_std_cursor_HOT_X_top_left_corner 0
297#define sdl_std_cursor_HOT_Y_top_left_corner -14
300 0x38, 0x00, 0x7c, 0x00, 0xfe, 0x00, 0xff, 0x01, 0xff, 0x01, 0x7c, 0x00, 0x7c, 0x00, 0x7c,
301 0x00, 0x7c, 0x00, 0x7c, 0x00, 0xff, 0x01, 0xff, 0x01, 0xfe, 0x00, 0x7c, 0x00, 0x38, 0x00,
304 0x10, 0x00, 0x38, 0x00, 0x7c, 0x00, 0xfe, 0x00, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, 0x28,
305 0x00, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, 0xfe, 0x00, 0x7c, 0x00, 0x38, 0x00, 0x10, 0x00,
307#define sdl_std_cursor_WIDTH_sb_v_double_arrow 9
308#define sdl_std_cursor_HEIGHT_sb_v_double_arrow 15
309#define sdl_std_cursor_HOT_X_sb_v_double_arrow -3
310#define sdl_std_cursor_HOT_Y_sb_v_double_arrow -8
352#define sdl_std_cursor_WIDTH_sb_h_double_arrow 15
353#define sdl_std_cursor_HEIGHT_sb_h_double_arrow 9
354#define sdl_std_cursor_HOT_X_sb_h_double_arrow -7
355#define sdl_std_cursor_HOT_Y_sb_h_double_arrow -4
358 0x00, 0xf0, 0x00, 0xf0, 0xc0, 0xf0, 0xc0, 0xf1, 0x80, 0xf3, 0x00, 0xf7, 0xff, 0xff, 0xff,
359 0xff, 0xff, 0xff, 0x00, 0xf7, 0x80, 0xf3, 0xc0, 0xf1, 0xc0, 0xf0, 0x00, 0xf0, 0x00, 0xf0,
362 0x00, 0x30, 0x00, 0x30, 0x40, 0x30, 0x80, 0x30, 0x00, 0x31, 0x00, 0x32, 0xff, 0x37, 0x00,
363 0x32, 0x00, 0x31, 0x80, 0x30, 0x40, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00,
365#define sdl_std_cursor_WIDTH_right_side 16
366#define sdl_std_cursor_HEIGHT_right_side 15
367#define sdl_std_cursor_HOT_X_right_side -13
368#define sdl_std_cursor_HOT_Y_right_side -7
371 0x00, 0x03, 0x80, 0x03, 0xc0, 0x03, 0xe0, 0x03, 0xf0, 0x03, 0xf8, 0x03, 0xfc, 0x03, 0xfe, 0x03,
372 0xff, 0x03, 0xff, 0x03, 0xf8, 0x03, 0xbc, 0x03, 0x3c, 0x03, 0x1e, 0x00, 0x1e, 0x00, 0x0c, 0x00,
375 0x00, 0x80, 0x00, 0xc0, 0x00, 0xe0, 0x00, 0xf0, 0x00, 0xf8, 0x00, 0xfc, 0x00, 0xfe, 0x00, 0xff,
376 0x00, 0xf8, 0x00, 0xd8, 0x00, 0x8c, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
378#define sdl_std_cursor_WIDTH_right_ptr 10
379#define sdl_std_cursor_HEIGHT_right_ptr 16
380#define sdl_std_cursor_HOT_X_right_ptr -7
381#define sdl_std_cursor_HOT_Y_right_ptr -14
384 0xf8, 0x00, 0xfc, 0x01, 0xfe, 0x03, 0xff, 0x07, 0x8f, 0x07, 0x9f, 0x07, 0xde, 0x07, 0xfc, 0x03,
385 0xf8, 0x01, 0xf8, 0x00, 0xf8, 0x00, 0xfc, 0x01, 0xfe, 0x03, 0xfc, 0x01, 0xf8, 0x00, 0x70, 0x00,
388 0x7c, 0x00, 0xfe, 0x00, 0xc7, 0x01, 0x83, 0x01, 0x87, 0x01, 0xc6, 0x01, 0xe0, 0x00, 0x78, 0x00,
389 0x38, 0x00, 0x28, 0x00, 0x28, 0x00, 0xee, 0x00, 0x6c, 0x00, 0x38, 0x00, 0x10, 0x00, 0x00, 0x00,
391#define sdl_std_cursor_WIDTH_question_arrow 11
392#define sdl_std_cursor_HEIGHT_question_arrow 16
393#define sdl_std_cursor_HOT_X_question_arrow -4
394#define sdl_std_cursor_HOT_Y_question_arrow -8
397 0xf0, 0x03, 0xf8, 0x07, 0xfc, 0x0f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfc, 0x0f, 0xf8, 0x07, 0xf1, 0x83,
398 0xf1, 0xe3, 0xf3, 0xf3, 0xef, 0x39, 0x1e, 0x1e, 0xe0, 0x01, 0xfe, 0xc7, 0xff, 0xff, 0x0f, 0x7c,
401 0xe0, 0x01, 0xf0, 0x03, 0xf8, 0x07, 0xcc, 0x0c, 0xcc, 0x0c, 0xf8, 0x07, 0xf0, 0x03, 0xe0, 0x01,
402 0xe1, 0x21, 0xe1, 0x61, 0xc2, 0x10, 0x1c, 0x0e, 0xe0, 0x01, 0xf8, 0x47, 0x0f, 0x7c, 0x01, 0x20,
404#define sdl_std_cursor_WIDTH_pirate 16
405#define sdl_std_cursor_HEIGHT_pirate 16
406#define sdl_std_cursor_HOT_X_pirate -7
407#define sdl_std_cursor_HOT_Y_pirate -4
410 0x0f, 0x00, 0x0f, 0x00, 0x0f, 0x03, 0x8f, 0x03, 0xcf, 0x01, 0xef, 0x00, 0xff, 0xff, 0xff,
411 0xff, 0xff, 0xff, 0xef, 0x00, 0xcf, 0x01, 0x8f, 0x03, 0x0f, 0x03, 0x0f, 0x00, 0x0f, 0x00,
414 0x03, 0x00, 0x03, 0x00, 0x83, 0x00, 0x43, 0x00, 0x23, 0x00, 0x13, 0x00, 0xfb, 0x3f, 0x13,
415 0x00, 0x23, 0x00, 0x43, 0x00, 0x83, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
417#define sdl_std_cursor_WIDTH_left_side 16
418#define sdl_std_cursor_HEIGHT_left_side 15
419#define sdl_std_cursor_HOT_X_left_side 0
420#define sdl_std_cursor_HOT_Y_left_side -7
423 0x03, 0x00, 0x07, 0x00, 0x0f, 0x00, 0x1f, 0x00, 0x3f, 0x00, 0x7f, 0x00, 0xff, 0x00, 0xff, 0x01,
424 0xff, 0x03, 0xff, 0x03, 0x7f, 0x00, 0xf7, 0x00, 0xf3, 0x00, 0xe0, 0x01, 0xe0, 0x01, 0xc0, 0x00,
427 0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x3e, 0x00, 0x7e, 0x00, 0xfe, 0x00,
428 0xfe, 0x00, 0x3e, 0x00, 0x36, 0x00, 0x62, 0x00, 0x60, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00,
430#define sdl_std_cursor_WIDTH_left_ptr 10
431#define sdl_std_cursor_HEIGHT_left_ptr 16
432#define sdl_std_cursor_HOT_X_left_ptr -8
433#define sdl_std_cursor_HOT_Y_left_ptr -14
436 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xff, 0xff, 0xff, 0xff,
437 0xff, 0xff, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01,
440 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x7f, 0xff,
441 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00,
443#define sdl_std_cursor_WIDTH_crosshair 16
444#define sdl_std_cursor_HEIGHT_crosshair 16
445#define sdl_std_cursor_HOT_X_crosshair -7
446#define sdl_std_cursor_HOT_Y_crosshair -8
449 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xcc, 0x19, 0xdc, 0x1d,
450 0xf8, 0x0f, 0xf0, 0x07, 0xe0, 0x03, 0xc0, 0x01, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f,
453 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x44, 0x04, 0x48, 0x02,
454 0x50, 0x01, 0xe0, 0x00, 0x40, 0x00, 0x00, 0x00, 0xff, 0x1f, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00,
456#define sdl_std_cursor_WIDTH_bottom_side 15
457#define sdl_std_cursor_HEIGHT_bottom_side 16
458#define sdl_std_cursor_HOT_X_bottom_side -6
459#define sdl_std_cursor_HOT_Y_bottom_side -1
462 0x00, 0xf0, 0x00, 0xf0, 0x0c, 0xf7, 0x1c, 0xf7, 0x38, 0xf7, 0x70, 0xf7, 0xe0, 0xf7, 0xc0, 0xf7,
463 0xfc, 0xf7, 0xfc, 0xf7, 0xfc, 0xf7, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
466 0x00, 0x30, 0x00, 0x30, 0x04, 0x31, 0x08, 0x31, 0x10, 0x31, 0x20, 0x31, 0x40, 0x31, 0x80, 0x31,
467 0xfc, 0x31, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0xff, 0x3f, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00,
469#define sdl_std_cursor_WIDTH_bottom_right_corner 16
470#define sdl_std_cursor_HEIGHT_bottom_right_corner 16
471#define sdl_std_cursor_HOT_X_bottom_right_corner -13
472#define sdl_std_cursor_HOT_Y_bottom_right_corner -1
475 0x0f, 0x00, 0x0f, 0x00, 0xef, 0x30, 0xef, 0x38, 0xef, 0x1c, 0xef, 0x0e, 0xef, 0x07, 0xef, 0x03,
476 0xef, 0x3f, 0xef, 0x3f, 0xef, 0x3f, 0x0f, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
479 0x03, 0x00, 0x03, 0x00, 0x23, 0x08, 0x23, 0x04, 0x23, 0x02, 0x23, 0x01, 0xa3, 0x00, 0x63, 0x00,
480 0xe3, 0x0f, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0xff, 0x3f, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00,
482#define sdl_std_cursor_WIDTH_bottom_left_corner 16
483#define sdl_std_cursor_HEIGHT_bottom_left_corner 16
484#define sdl_std_cursor_HOT_X_bottom_left_corner 0
485#define sdl_std_cursor_HOT_Y_bottom_left_corner -1
488 0x00, 0xe0, 0x00, 0xf8, 0x00, 0xfe, 0x80, 0x7f, 0xe0, 0x7f, 0xf8, 0x3f, 0xfc, 0x3f, 0xfc, 0x1f,
489 0xe0, 0x1f, 0xf0, 0x0f, 0xf8, 0x0f, 0x7c, 0x07, 0x3e, 0x07, 0x1f, 0x02, 0x0e, 0x00, 0x04, 0x00,
492 0x00, 0x30, 0x00, 0x3c, 0x00, 0x1f, 0xc0, 0x1f, 0xf0, 0x0f, 0xfc, 0x0f, 0xc0, 0x07, 0xe0, 0x07,
493 0x70, 0x03, 0x38, 0x03, 0x1c, 0x01, 0x0e, 0x01, 0x07, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
495#define sdl_std_cursor_WIDTH_arrow 16
496#define sdl_std_cursor_HEIGHT_arrow 16
497#define sdl_std_cursor_HOT_X_arrow -13
498#define sdl_std_cursor_HOT_Y_arrow -14
506 const uint8_t *
data,
const uint8_t *
mask,
int w,
int h,
int hot_x,
int hot_y)
508 SDL_Surface *surface;
512 Uint8 datab = 0, maskb = 0;
513 const Uint32 black = 0xFF000000;
514 const Uint32 white = 0xFFFFFFFF;
515 const Uint32 transparent = 0x00000000;
521 surface = SDL_CreateRGBSurface(0,
w, h, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000);
525 for (
y = 0;
y < h; ++
y) {
526 pixel = (Uint32 *)((Uint8 *)surface->pixels +
y * surface->pitch);
527 for (
x = 0;
x <
w; ++
x) {
533 datab = (datab * 0x0202020202ULL & 0x010884422010ULL) % 1023;
534 maskb = (maskb * 0x0202020202ULL & 0x010884422010ULL) % 1023;
537 *pixel++ = (datab & 0x80) ? white : black;
540 *pixel++ = (datab & 0x80) ? white : transparent;
547 cursor = SDL_CreateColorCursor(surface, hot_x, hot_y);
549 SDL_FreeSurface(surface);
558#define DEF_CURSOR(name, ind) \
560 sdl_std_cursor_array[int(ind)] = sdl_ghost_CreateCursor( \
561 sdl_std_cursor_##name, \
562 sdl_std_cursor_mask_##name, \
563 sdl_std_cursor_WIDTH_##name, \
564 sdl_std_cursor_HEIGHT_##name, \
565 (sdl_std_cursor_WIDTH_##name + (sdl_std_cursor_HOT_X_##name)) - 1, \
566 (sdl_std_cursor_HEIGHT_##name + (sdl_std_cursor_HOT_Y_##name)) - 1); \
567 assert(sdl_std_cursor_array[int(ind)] != nullptr); \
607 if (cursor ==
nullptr) {
611 SDL_SetCursor(cursor);
623 const int hot_spot[2],
626 if (sdl_custom_cursor_) {
627 SDL_FreeCursor(sdl_custom_cursor_);
631 bitmap,
mask,
size[0],
size[1], hot_spot[0], hot_spot[1]);
633 SDL_SetCursor(sdl_custom_cursor_);
639 SDL_ShowCursor(visible);
645 int displayIndex = SDL_GetWindowDisplayIndex(sdl_win_);
646 if (displayIndex < 0) {
651 if (SDL_GetDisplayDPI(displayIndex, &ddpi,
nullptr,
nullptr) != 0) {
#define GHOST_OPENGL_SDL_RESET_NOTIFICATION_STRATEGY
#define GHOST_OPENGL_SDL_CONTEXT_FLAGS
@ GHOST_kWindowStateMinimized
@ GHOST_kWindowStateMaximized
@ GHOST_kWindowStateNormal
@ GHOST_kWindowStateFullScreen
@ GHOST_kStandardCursorBottomLeftCorner
@ GHOST_kStandardCursorHelp
@ GHOST_kStandardCursorCopy
@ GHOST_kStandardCursorWait
@ GHOST_kStandardCursorTopSide
@ GHOST_kStandardCursorCrosshair
@ GHOST_kStandardCursorLeftRight
@ GHOST_kStandardCursorPencil
@ GHOST_kStandardCursorUpDown
@ GHOST_kStandardCursorBottomSide
@ GHOST_kStandardCursorInfo
@ GHOST_kStandardCursorTopLeftCorner
@ GHOST_kStandardCursorBottomRightCorner
@ GHOST_kStandardCursorDefault
@ GHOST_kStandardCursorRightSide
@ GHOST_kStandardCursorRightArrow
@ GHOST_kStandardCursorTopRightCorner
@ GHOST_kStandardCursorDestroy
@ GHOST_kStandardCursorLeftSide
@ GHOST_kStandardCursorText
@ GHOST_kStandardCursorLeftArrow
#define GHOST_kStandardCursorNumCursors
GHOST_TDrawingContextType
static uchar sdl_std_cursor_mask_right_ptr[]
static uchar sdl_std_cursor_xterm[]
static uchar sdl_std_cursor_bottom_side[]
static uchar sdl_std_cursor_left_side[]
static uchar sdl_std_cursor_mask_left_side[]
static uchar sdl_std_cursor_arrow[]
static uchar sdl_std_cursor_top_side[]
static uchar sdl_std_cursor_question_arrow[]
static uchar sdl_std_cursor_right_side[]
static uchar sdl_std_cursor_mask_crosshair[]
static uchar sdl_std_cursor_mask_top_right_corner[]
static uchar sdl_std_cursor_mask_bottom_side[]
static uchar sdl_std_cursor_mask_watch[]
static uchar sdl_std_cursor_mask_right_side[]
static SDL_Cursor * sdl_std_cursor_array[int(GHOST_kStandardCursorNumCursors)]
static uchar sdl_std_cursor_top_right_corner[]
static uchar sdl_std_cursor_mask_top_left_corner[]
static SDL_Cursor * getStandardCursorShape(GHOST_TStandardCursor shape)
static SDL_Cursor * sdl_ghost_CreateCursor(const uint8_t *data, const uint8_t *mask, int w, int h, int hot_x, int hot_y)
static uchar sdl_std_cursor_mask_top_side[]
static uchar sdl_std_cursor_mask_left_ptr[]
static uchar sdl_std_cursor_mask_arrow[]
static uchar sdl_std_cursor_mask_bottom_left_corner[]
static uchar sdl_std_cursor_top_left_corner[]
static uchar sdl_std_cursor_umbrella[]
static uchar sdl_std_cursor_sb_v_double_arrow[]
static uchar sdl_std_cursor_left_ptr[]
static uchar sdl_std_cursor_mask_pirate[]
static uchar sdl_std_cursor_bottom_right_corner[]
static uchar sdl_std_cursor_watch[]
static uchar sdl_std_cursor_mask_umbrella[]
static uchar sdl_std_cursor_crosshair[]
static uchar sdl_std_cursor_sb_h_double_arrow[]
static uchar sdl_std_cursor_mask_sb_v_double_arrow[]
static uchar sdl_std_cursor_bottom_left_corner[]
static uchar sdl_std_cursor_mask_xterm[]
static uchar sdl_std_cursor_mask_question_arrow[]
static uchar sdl_std_cursor_mask_bottom_right_corner[]
static uchar sdl_std_cursor_mask_sb_h_double_arrow[]
#define DEF_CURSOR(name, ind)
static uchar sdl_std_cursor_pirate[]
static uchar sdl_std_cursor_right_ptr[]
BMesh const char void * data
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
GHOST_TSuccess setWindowCursorGrab(GHOST_TGrabCursorMode mode) override
std::string getTitle() const override
GHOST_TWindowState getState() const override
void clientToScreen(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const override
GHOST_TSuccess invalidate() override
GHOST_WindowSDL(GHOST_SystemSDL *system, const char *title, int32_t left, int32_t top, uint32_t width, uint32_t height, GHOST_TWindowState state, GHOST_TDrawingContextType type, const GHOST_ContextParams &context_params, const bool exclusive=false, const GHOST_IWindow *parent_window=nullptr)
GHOST_TSuccess setWindowCursorShape(GHOST_TStandardCursor shape) override
GHOST_TSuccess setClientHeight(uint32_t height) override
GHOST_Context * newDrawingContext(GHOST_TDrawingContextType type) override
void getClientBounds(GHOST_Rect &bounds) const override
GHOST_TSuccess setWindowCursorVisibility(bool visible) override
GHOST_TSuccess setClientWidth(uint32_t width) 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
GHOST_TSuccess setState(GHOST_TWindowState state) override
GHOST_TSuccess setClientSize(uint32_t width, uint32_t height) override
void getWindowBounds(GHOST_Rect &bounds) const override
uint16_t getDPIHint() override
bool getValid() const override
void setTitle(const char *title) override
GHOST_TSuccess hasCursorShape(GHOST_TStandardCursor shape) override
void screenToClient(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const override
GHOST_ContextParams want_context_params_
GHOST_TSuccess setDrawingContextType(GHOST_TDrawingContextType type) override
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)
ccl_device_inline float2 mask(const MaskType mask, const float2 a)