1 #ifdef XTERNAL_UI 2 3 #ifdef USE_GUI_THREAD 4 static int idle(LV2UI_Handle handle); 5 #endif 6 static int process_gui_events(LV2UI_Handle handle); 7 x_run(struct lv2_external_ui * handle)8static void x_run (struct lv2_external_ui * handle) { 9 GLrobtkLV2UI* self = (GLrobtkLV2UI*)handle->self; 10 #ifdef USE_GUI_THREAD 11 idle(self); 12 #else 13 process_gui_events(self); 14 #endif 15 if (self->close_ui && self->ui_closed) { 16 self->close_ui = FALSE; 17 #ifndef USE_GUI_THREAD 18 ui_disable(self->ui); 19 puglHideWindow(self->view); 20 #else 21 self->ui_queue_puglXWindow = -1; 22 #endif 23 self->ui_closed(self->controller); 24 } 25 } 26 x_show(struct lv2_external_ui * handle)27static void x_show (struct lv2_external_ui * handle) { 28 GLrobtkLV2UI* self = (GLrobtkLV2UI*)handle->self; 29 #ifndef USE_GUI_THREAD 30 puglShowWindow(self->view); 31 ui_enable(self->ui); 32 #else 33 self->ui_queue_puglXWindow = 1; 34 #endif 35 } 36 x_hide(struct lv2_external_ui * handle)37static void x_hide (struct lv2_external_ui * handle) { 38 GLrobtkLV2UI* self = (GLrobtkLV2UI*)handle->self; 39 #ifndef USE_GUI_THREAD 40 ui_disable(self->ui); 41 puglHideWindow(self->view); 42 #else 43 self->ui_queue_puglXWindow = -1; 44 #endif 45 } 46 #endif 47