diff options
author | David Robillard <d@drobilla.net> | 2013-03-19 02:46:10 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-03-19 02:46:10 +0000 |
commit | a6acef5894a5086cb9e8952e245bcf959b374f50 (patch) | |
tree | 4608f27a421a09034f52ed89450d8992fe67d9fc /lv2/lv2plug.in/ns/extensions/ui/ui.h | |
parent | 68ab5ac516f893fe5366c172599ca4b688ca286a (diff) | |
download | lv2-a6acef5894a5086cb9e8952e245bcf959b374f50.tar.xz |
Add UI idle interface.
Diffstat (limited to 'lv2/lv2plug.in/ns/extensions/ui/ui.h')
-rw-r--r-- | lv2/lv2plug.in/ns/extensions/ui/ui.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lv2/lv2plug.in/ns/extensions/ui/ui.h b/lv2/lv2plug.in/ns/extensions/ui/ui.h index 62f4c93..2a9b28a 100644 --- a/lv2/lv2plug.in/ns/extensions/ui/ui.h +++ b/lv2/lv2plug.in/ns/extensions/ui/ui.h @@ -41,6 +41,7 @@ #define LV2_UI__X11UI LV2_UI_PREFIX "X11UI" #define LV2_UI__binary LV2_UI_PREFIX "binary" #define LV2_UI__fixedSize LV2_UI_PREFIX "fixedSize" +#define LV2_UI__idleInterface LV2_UI_PREFIX "idleInterface" #define LV2_UI__noUserResize LV2_UI_PREFIX "noUserResize" #define LV2_UI__notifyType LV2_UI_PREFIX "notifyType" #define LV2_UI__parent LV2_UI_PREFIX "parent" @@ -338,6 +339,24 @@ typedef struct _LV2UI_Touch { } LV2UI_Touch; /** + UI Idle Feature (LV2_UI__idle) + + 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. +*/ +typedef struct _LV2UI_Idle_Interface { + /** + Run a single iteration of the UI's idle loop. + + This will be called "frequently" in the UI thread at a rate appropriate + for a toolkit main loop. There are no precise timing guarantees. + + @return 0 on success, or anything else to stop being called. + */ + int (*idle)(LV2UI_Handle ui); +} LV2UI_Idle_Interface; + +/** Peak data for a slice of time, the update format for ui:peakProtocol. */ typedef struct _LV2UI_Peak_Data { |