[SCM] calf/master: + LV2: add external UI header (not used for anything yet)

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:39:57 UTC 2013


The following commit has been merged in the master branch:
commit f0719b1e8926595d869936865ba84f60284dd660
Author: Krzysztof Foltman <wdev at foltman.com>
Date:   Fri Apr 2 00:01:11 2010 +0100

    + LV2: add external UI header (not used for anything yet)

diff --git a/src/calf/Makefile.am b/src/calf/Makefile.am
index 48b0877..45c4fb1 100644
--- a/src/calf/Makefile.am
+++ b/src/calf/Makefile.am
@@ -1,7 +1,8 @@
 noinst_HEADERS = audio_fx.h benchmark.h biquad.h buffer.h custom_ctl.h \
     ctl_curve.h ctl_keyboard.h ctl_led.h \
     delay.h envelope.h fft.h fixed_point.h giface.h gui.h gui_controls.h inertia.h jackhost.h ladspa_wrap.h loudness.h \
-    lv2_contexts.h lv2_data_access.h lv2_event.h lv2_progress.h lv2_polymorphic_port.h lv2_string_port.h lv2_ui.h \
+    lv2_contexts.h lv2_data_access.h lv2_event.h lv2_external_ui.h \
+    lv2_progress.h lv2_polymorphic_port.h lv2_string_port.h lv2_ui.h \
     lv2_uri_map.h lv2-midiport.h lv2helpers.h lv2wrap.h \
     main_win.h metadata.h modmatrix.h modules.h modules_dev.h modules_small.h modules_synths.h modulelist.h \
     multichorus.h onepole.h organ.h osc.h osctl.h osctlnet.h osctlserv.h plugininfo.h preset.h \
diff --git a/src/calf/lv2_external_ui.h b/src/calf/lv2_external_ui.h
new file mode 100644
index 0000000..242271e
--- /dev/null
+++ b/src/calf/lv2_external_ui.h
@@ -0,0 +1,101 @@
+/* -*- Mode: C ; c-basic-offset: 2 -*- */
+/*****************************************************************************
+ *
+ *  This work is in public domain.
+ *
+ *  This file is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *  If you have questions, contact Nedko Arnaudov <nedko at arnaudov.name> or
+ *  ask in #lad channel, FreeNode IRC network.
+ *
+ *****************************************************************************/
+
+#ifndef LV2_EXTERNAL_UI_H__5AFE09A5_0FB7_47AF_924E_2AF0F8DE8873__INCLUDED
+#define LV2_EXTERNAL_UI_H__5AFE09A5_0FB7_47AF_924E_2AF0F8DE8873__INCLUDED
+
+/** UI extension suitable for out-of-process UIs */
+#define LV2_EXTERNAL_UI_URI "http://lv2plug.in/ns/extensions/ui#external"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+} /* Adjust editor indent */
+#endif
+
+/**
+ * When LV2_EXTERNAL_UI_URI UI is instantiated, the returned
+ * LV2UI_Widget handle must be cast to pointer to struct lv2_external_ui.
+ * UI is created in invisible state.
+ */
+struct lv2_external_ui
+{
+  /**
+   * Host calls this function regulary. UI library implementing the
+   * callback may do IPC or redraw the UI.
+   *
+   * @param _this_ the UI context
+   */
+  void (* run)(struct lv2_external_ui * _this_);
+
+  /**
+   * Host calls this function to make the plugin UI visible.
+   *
+   * @param _this_ the UI context
+   */
+  void (* show)(struct lv2_external_ui * _this_);
+
+  /**
+   * Host calls this function to make the plugin UI invisible again.
+   *
+   * @param _this_ the UI context
+   */
+  void (* hide)(struct lv2_external_ui * _this_);
+};
+
+#define LV2_EXTERNAL_UI_RUN(ptr) (ptr)->run(ptr)
+#define LV2_EXTERNAL_UI_SHOW(ptr) (ptr)->show(ptr)
+#define LV2_EXTERNAL_UI_HIDE(ptr) (ptr)->hide(ptr)
+
+/**
+ * On UI instantiation, host must supply LV2_EXTERNAL_UI_URI
+ * feature. LV2_Feature::data must be pointer to struct lv2_external_ui_host. */
+struct lv2_external_ui_host
+{
+  /**
+   * Callback that plugin UI will call
+   * when UI (GUI window) is closed by user.
+   * This callback wil; be called during execution of lv2_external_ui::run()
+   * (i.e. not from background thread).
+   *
+   * After this callback is called, UI is defunct. Host must call
+   * LV2UI_Descriptor::cleanup(). If host wants to make the UI visible
+   * again UI must be reinstantiated.
+   *
+   * @param controller Host context associated with plugin UI, as
+   * supplied to LV2UI_Descriptor::instantiate()
+   */
+  void (* ui_closed)(LV2UI_Controller controller);
+
+  /**
+   * Optional (may be NULL) "user friendly" identifier which the UI
+   * may display to allow a user to easily associate this particular
+   * UI instance with the correct plugin instance as it is represented
+   * by the host (e.g. "track 1" or "channel 4").
+   *
+   * If supplied by host, the string will be referenced only during
+   * LV2UI_Descriptor::instantiate()
+   */
+  const char * plugin_human_id;
+};
+
+#if 0
+{ /* Adjust editor indent */
+#endif
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* #ifndef LV2_EXTERNAL_UI_H__5AFE09A5_0FB7_47AF_924E_2AF0F8DE8873__INCLUDED */

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list