diff options
author | David Robillard <d@drobilla.net> | 2014-02-09 20:32:07 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-02-09 20:32:07 +0000 |
commit | 8d228466f47c0730f2b00a0e74860ad5987d5295 (patch) | |
tree | 8424f4087f810ad2a61e6d89974660a5d8508f88 /lv2/lv2plug.in/ns/extensions/ui/ui.h | |
parent | 7553d21abaac2a211f38d6633a8c478e1ddcd292 (diff) | |
download | lv2-8d228466f47c0730f2b00a0e74860ad5987d5295.tar.xz |
Add show interface so UIs can gracefully degrade to separate windows if hosts can not use their widget directly.
Diffstat (limited to 'lv2/lv2plug.in/ns/extensions/ui/ui.h')
-rw-r--r-- | lv2/lv2plug.in/ns/extensions/ui/ui.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/lv2/lv2plug.in/ns/extensions/ui/ui.h b/lv2/lv2plug.in/ns/extensions/ui/ui.h index ad51aa3..e59e298 100644 --- a/lv2/lv2plug.in/ns/extensions/ui/ui.h +++ b/lv2/lv2plug.in/ns/extensions/ui/ui.h @@ -51,6 +51,7 @@ #define LV2_UI__portNotification LV2_UI_PREFIX "portNotification" #define LV2_UI__portSubscribe LV2_UI_PREFIX "portSubscribe" #define LV2_UI__resize LV2_UI_PREFIX "resize" +#define LV2_UI__showInterface LV2_UI_PREFIX "showInterface" #define LV2_UI__touch LV2_UI_PREFIX "touch" #define LV2_UI__ui LV2_UI_PREFIX "ui" #define LV2_UI__updateRate LV2_UI_PREFIX "updateRate" @@ -340,7 +341,7 @@ typedef struct _LV2UI_Touch { } LV2UI_Touch; /** - UI Idle Feature (LV2_UI__idle) + UI Idle Feature (LV2_UI__idleInterface) This feature is an addition to the UI API that provides a callback for the host to call rapidly, e.g. to drive the idle callback of a toolkit. @@ -358,6 +359,31 @@ typedef struct _LV2UI_Idle_Interface { } LV2UI_Idle_Interface; /** + UI Show Interface (LV2_UI__showInterface) + + UIs can use this interface to provide show/hide methods to pop up a window, + which allows them to function in hosts unable to embed their widget type. + + If used, LV2UI_Idle_Interface should also be used to drive the UI. The UI + should return non-zero from idle() when the window has been closed. +*/ +typedef struct _LV2UI_Show_Interface { + /** + Show a window for this UI. + + @return 0 on success, or anything else to stop being called. + */ + int (*show)(LV2UI_Handle ui); + + /** + Hide the window for this UI. + + @return 0 on success, or anything else to stop being called. + */ + int (*hide)(LV2UI_Handle ui); +} LV2UI_Show_Interface; + +/** Peak data for a slice of time, the update format for ui:peakProtocol. */ typedef struct _LV2UI_Peak_Data { |