Guest User

Untitled

a guest
Feb 5th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. ttl:
  2. @prefix uiext: <http://lv2plug.in/ns/extensions/ui#> .
  3.  
  4. <http://drumgizmo.org/lv2-gui>
  5. a uiext:X11UI ;
  6. lv2:requiredFeature uiext:idleInterface ;
  7. lv2:extensionData uiext:idleInterface ;
  8. uiext:binary <drumgizmo.so> .
  9.  
  10. code:
  11. static int idle(LV2UI_Handle handle)
  12. {
  13. printf("----------- %s\n", __PRETTY_FUNCTION__);
  14. struct DG_GUI* dggui = (struct DG_GUI*)handle;
  15. if(dggui && dggui->gui)
  16. {
  17. dggui->gui->processEvents();
  18. }
  19. return 0;
  20. }
  21. static const LV2UI_Idle_Interface idle_iface = { idle };
  22.  
  23. static const void* ui_extension_data(const char* uri)
  24. {
  25. printf("----------- %s : %s\n", __PRETTY_FUNCTION__, uri);
  26. if(!strcmp(uri, LV2_UI__idleInterface))
  27. {
  28. printf("idle_iface\n");
  29. return &idle_iface;
  30. }
  31.  
  32. return NULL;
  33. }
  34.  
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38.  
  39. static LV2UI_Descriptor descriptor = {
  40. DRUMGIZMO_UI_URI,
  41. ui_instantiate,
  42. ui_cleanup,
  43. ui_port_event,
  44. ui_extension_data
  45. };
  46.  
  47. const LV2UI_Descriptor *lv2ui_descriptor(uint32_t index)
  48. {
  49. printf("----------- %s\n", __PRETTY_FUNCTION__);
  50. if(index == 0) return &descriptor;
  51. return NULL;
  52. }
  53.  
  54. #ifdef __cplusplus
  55. }
  56. #endif
Advertisement
Add Comment
Please, Sign In to add comment