MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / PiuViewChangeCursor

Function PiuViewChangeCursor

modules/piu/PC/lin/piuView.c:478–508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

476}
477
478void PiuViewChangeCursor(PiuView* self, int32_t shape)
479{
480 GtkWindow* gtkWindow = (*self)->gtkWindow;
481 GdkCursorType cursor_type;
482 GdkCursor *cursor;
483 switch (shape) {
484 case 1:
485 cursor_type = GDK_TCROSS;
486 break;
487 case 2:
488 cursor_type = GDK_XTERM;
489 break;
490 case 3:
491 cursor_type = GDK_HAND1;
492 break;
493 case 4:
494 cursor_type = GDK_X_CURSOR;
495 break;
496 case 5:
497 cursor_type = GDK_SB_H_DOUBLE_ARROW;
498 break;
499 case 6:
500 cursor_type = GDK_SB_V_DOUBLE_ARROW;
501 break;
502 default:
503 cursor_type = GDK_LEFT_PTR;
504 break;
505 }
506 cursor = gdk_cursor_new_for_display(gdk_display_get_default(), cursor_type);
507 gdk_window_set_cursor(gtk_widget_get_window(GTK_WIDGET(gtkWindow)), cursor);
508}
509
510void PiuViewCreate(xsMachine* the)
511{

Callers 1

PiuApplicationMouseMovedFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected