diff options
author | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2016-04-04 16:07:39 +0200 |
---|---|---|
committer | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2016-04-04 16:07:39 +0200 |
commit | a3ebe4beeeeeeb962cd89d8fe5d1c7f2cac49c6f (patch) | |
tree | bf82d328910249b5bba6d09ab622256e6e3dfe44 | |
parent | 6b77ebd493115d15226c73b333113b5630144d5f (diff) | |
download | midi_matrix.lv2-0.1.6.tar.xz (sig) |
remove eo_ui dir.0.1.6
-rw-r--r-- | eo_ui.lv2/CMakeLists.txt | 58 | ||||
-rw-r--r-- | eo_ui.lv2/COPYING | 201 | ||||
-rw-r--r-- | eo_ui.lv2/README.md | 3 | ||||
-rw-r--r-- | eo_ui.lv2/lv2_eo_ui.h | 637 | ||||
-rw-r--r-- | eo_ui.lv2/lv2_external_ui.h | 109 | ||||
-rw-r--r-- | eo_ui.lv2/manifest.ttl | 28 | ||||
-rw-r--r-- | eo_ui.lv2/test/eo.c | 103 | ||||
-rw-r--r-- | eo_ui.lv2/test/eo.ttl | 104 | ||||
-rw-r--r-- | eo_ui.lv2/test/eo_ui.c | 242 | ||||
-rw-r--r-- | eo_ui.lv2/test/lv2_white.png | bin | 2481 -> 0 bytes | |||
-rw-r--r-- | eo_ui.lv2/test/manifest.ttl.in | 61 |
11 files changed, 0 insertions, 1546 deletions
diff --git a/eo_ui.lv2/CMakeLists.txt b/eo_ui.lv2/CMakeLists.txt deleted file mode 100644 index 55729b6..0000000 --- a/eo_ui.lv2/CMakeLists.txt +++ /dev/null @@ -1,58 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -project(eo.lv2) - -include_directories(${PROJECT_SOURCE_DIR}) -include_directories(${PROJECT_BINARY_DIR}) - -set(CMAKE_C_FLAGS "-std=gnu99 -Wextra -Wno-unused-parameter -ffast-math -fvisibility=hidden ${CMAKE_C_FLAGS}") -set(CMAKE_C_FLAGS "-Wshadow -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes ${CMAKE_C_FLAGS}") -set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-z,nodelete ${CMAKE_MODULE_LINKER_FLAGS}") -add_definitions("-D_GNU_SOURCE=1") # asprintf - -set(EO_MAJOR_VERSION 0) -set(EO_MINOR_VERSION 1) -set(EO_MICRO_VERSION 1) - -set(DEST lib/lv2/eo.lv2) - -find_package(PkgConfig) # ${PKG_CONFIG_FOUND} - -# eo -add_library(eo MODULE - test/eo.c) -target_link_libraries(eo ${LIBS}) -set_target_properties(eo PROPERTIES PREFIX "") -install(TARGETS eo DESTINATION ${DEST}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/test/eo.ttl DESTINATION ${DEST}) - -# manifest -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test/manifest.ttl.in ${PROJECT_BINARY_DIR}/manifest.ttl) -install(FILES ${PROJECT_BINARY_DIR}/manifest.ttl DESTINATION ${DEST}) - -pkg_search_module(ELM REQUIRED elementary>=1.8) -include_directories(${ELM_INCLUDE_DIRS}) -set(LIBS_UI ${LIBS_UI} ${ELM_LDFLAGS}) - -pkg_search_module(ECORE_X OPTIONAL ecore-x) - -if((${ELM_VERSION} VERSION_EQUAL "1.9.0") OR (${ELM_VERSION} VERSION_GREATER "1.9.0")) - add_definitions("-DELM_1_9") -endif() - -if((DEFINED ECORE_X_FOUND) AND ((${ELM_VERSION} VERSION_EQUAL "1.13.0") OR (${ELM_VERSION} VERSION_GREATER "1.13.0"))) - message(STATUS "X11 UI wrap enabled") - set(X11_UI_WRAP "") - add_definitions("-DX11_UI_WRAP") -else() - message(STATUS "X11 UI wrap disabled") - set(X11_UI_WRAP "#") -endif() - -# eo_ui -add_library(eo_ui MODULE - test/eo_ui.c) -target_link_libraries(eo_ui ${LIBS_UI}) -set_target_properties(eo_ui PROPERTIES PREFIX "") -install(TARGETS eo_ui DESTINATION ${DEST}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/test/lv2_white.png DESTINATION ${DEST}) diff --git a/eo_ui.lv2/COPYING b/eo_ui.lv2/COPYING deleted file mode 100644 index ddb9a46..0000000 --- a/eo_ui.lv2/COPYING +++ /dev/null @@ -1,201 +0,0 @@ - The Artistic License 2.0 - - Copyright (c) 2000-2006, The Perl Foundation. - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -Preamble - -This license establishes the terms under which a given free software -Package may be copied, modified, distributed, and/or redistributed. -The intent is that the Copyright Holder maintains some artistic -control over the development of that Package while still keeping the -Package available as open source and free software. - -You are always permitted to make arrangements wholly outside of this -license directly with the Copyright Holder of a given Package. If the -terms of this license do not permit the full use that you propose to -make of the Package, you should contact the Copyright Holder and seek -a different licensing arrangement. - -Definitions - - "Copyright Holder" means the individual(s) or organization(s) - named in the copyright notice for the entire Package. - - "Contributor" means any party that has contributed code or other - material to the Package, in accordance with the Copyright Holder's - procedures. - - "You" and "your" means any person who would like to copy, - distribute, or modify the Package. - - "Package" means the collection of files distributed by the - Copyright Holder, and derivatives of that collection and/or of - those files. A given Package may consist of either the Standard - Version, or a Modified Version. - - "Distribute" means providing a copy of the Package or making it - accessible to anyone else, or in the case of a company or - organization, to others outside of your company or organization. - - "Distributor Fee" means any fee that you charge for Distributing - this Package or providing support for this Package to another - party. It does not mean licensing fees. - - "Standard Version" refers to the Package if it has not been - modified, or has been modified only in ways explicitly requested - by the Copyright Holder. - - "Modified Version" means the Package, if it has been changed, and - such changes were not explicitly requested by the Copyright - Holder. - - "Original License" means this Artistic License as Distributed with - the Standard Version of the Package, in its current version or as - it may be modified by The Perl Foundation in the future. - - "Source" form means the source code, documentation source, and - configuration files for the Package. - - "Compiled" form means the compiled bytecode, object code, binary, - or any other form resulting from mechanical transformation or - translation of the Source form. - - -Permission for Use and Modification Without Distribution - -(1) You are permitted to use the Standard Version and create and use -Modified Versions for any purpose without restriction, provided that -you do not Distribute the Modified Version. - - -Permissions for Redistribution of the Standard Version - -(2) You may Distribute verbatim copies of the Source form of the -Standard Version of this Package in any medium without restriction, -either gratis or for a Distributor Fee, provided that you duplicate -all of the original copyright notices and associated disclaimers. At -your discretion, such verbatim copies may or may not include a -Compiled form of the Package. - -(3) You may apply any bug fixes, portability changes, and other -modifications made available from the Copyright Holder. The resulting -Package will still be considered the Standard Version, and as such -will be subject to the Original License. - - -Distribution of Modified Versions of the Package as Source - -(4) You may Distribute your Modified Version as Source (either gratis -or for a Distributor Fee, and with or without a Compiled form of the -Modified Version) provided that you clearly document how it differs -from the Standard Version, including, but not limited to, documenting -any non-standard features, executables, or modules, and provided that -you do at least ONE of the following: - - (a) make the Modified Version available to the Copyright Holder - of the Standard Version, under the Original License, so that the - Copyright Holder may include your modifications in the Standard - Version. - - (b) ensure that installation of your Modified Version does not - prevent the user installing or running the Standard Version. In - addition, the Modified Version must bear a name that is different - from the name of the Standard Version. - - (c) allow anyone who receives a copy of the Modified Version to - make the Source form of the Modified Version available to others - under - - (i) the Original License or - - (ii) a license that permits the licensee to freely copy, - modify and redistribute the Modified Version using the same - licensing terms that apply to the copy that the licensee - received, and requires that the Source form of the Modified - Version, and of any works derived from it, be made freely - available in that license fees are prohibited but Distributor - Fees are allowed. - - -Distribution of Compiled Forms of the Standard Version -or Modified Versions without the Source - -(5) You may Distribute Compiled forms of the Standard Version without -the Source, provided that you include complete instructions on how to -get the Source of the Standard Version. Such instructions must be -valid at the time of your distribution. If these instructions, at any -time while you are carrying out such distribution, become invalid, you -must provide new instructions on demand or cease further distribution. -If you provide valid instructions or cease distribution within thirty -days after you become aware that the instructions are invalid, then -you do not forfeit any of your rights under this license. - -(6) You may Distribute a Modified Version in Compiled form without -the Source, provided that you comply with Section 4 with respect to -the Source of the Modified Version. - - -Aggregating or Linking the Package - -(7) You may aggregate the Package (either the Standard Version or -Modified Version) with other packages and Distribute the resulting -aggregation provided that you do not charge a licensing fee for the -Package. Distributor Fees are permitted, and licensing fees for other -components in the aggregation are permitted. The terms of this license -apply to the use and Distribution of the Standard or Modified Versions -as included in the aggregation. - -(8) You are permitted to link Modified and Standard Versions with -other works, to embed the Package in a larger work of your own, or to -build stand-alone binary or bytecode versions of applications that -include the Package, and Distribute the result without restriction, -provided the result does not expose a direct interface to the Package. - - -Items That are Not Considered Part of a Modified Version - -(9) Works (including, but not limited to, modules and scripts) that -merely extend or make use of the Package, do not, by themselves, cause -the Package to be a Modified Version. In addition, such works are not -considered parts of the Package itself, and are not subject to the -terms of this license. - - -General Provisions - -(10) Any use, modification, and distribution of the Standard or -Modified Versions is governed by this Artistic License. By using, -modifying or distributing the Package, you accept this license. Do not -use, modify, or distribute the Package, if you do not accept this -license. - -(11) If your Modified Version has been derived from a Modified -Version made by someone other than you, you are nevertheless required -to ensure that your Modified Version complies with the requirements of -this license. - -(12) This license does not grant you the right to use any trademark, -service mark, tradename, or logo of the Copyright Holder. - -(13) This license includes the non-exclusive, worldwide, -free-of-charge patent license to make, have made, use, offer to sell, -sell, import and otherwise transfer the Package with respect to any -patent claims licensable by the Copyright Holder that are necessarily -infringed by the Package. If you institute patent litigation -(including a cross-claim or counterclaim) against any party alleging -that the Package constitutes direct or contributory patent -infringement, then this Artistic License to you shall terminate on the -date that such litigation is filed. - -(14) Disclaimer of Warranty: -THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS -IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL -LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/eo_ui.lv2/README.md b/eo_ui.lv2/README.md deleted file mode 100644 index 328188e..0000000 --- a/eo_ui.lv2/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# eo\_ui.lv2 - -## Enlightened User Interface Extension for the LV2 Plugin Specification diff --git a/eo_ui.lv2/lv2_eo_ui.h b/eo_ui.lv2/lv2_eo_ui.h deleted file mode 100644 index e4d7646..0000000 --- a/eo_ui.lv2/lv2_eo_ui.h +++ /dev/null @@ -1,637 +0,0 @@ -/* - * Copyright (c) 2015 Hanspeter Portner (dev@open-music-kontrollers.ch) - * - * This is free software: you can redistribute it and/or modify - * it under the terms of the Artistic License 2.0 as published by - * The Perl Foundation. - * - * This source 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. See the - * Artistic License 2.0 for more details. - * - * You should have received a copy of the Artistic License 2.0 - * along the source as a COPYING file. If not, obtain it from - * http://www.perlfoundation.org/artistic_license_2_0. - */ - -#ifndef _EO_UI_H -#define _EO_UI_H - -#include <Elementary.h> - -#if defined(X11_UI_WRAP) -# include <Ecore_X.h> -#endif - -#include <lv2/lv2plug.in/ns/extensions/ui/ui.h> -#include <lv2/lv2plug.in/ns/ext/options/options.h> -#include <lv2/lv2plug.in/ns/ext/urid/urid.h> -#include <lv2/lv2plug.in/ns/ext/atom/atom.h> -#include <lv2_external_ui.h> // kxstudio external-ui extension - -typedef enum _eo_ui_driver_t eo_ui_driver_t; -typedef struct _eo_ui_t eo_ui_t; -typedef Evas_Object *(*eo_ui_content_get)(eo_ui_t *eoui); - -enum _eo_ui_driver_t { - EO_UI_DRIVER_NONE = 0, - EO_UI_DRIVER_EO, - EO_UI_DRIVER_X11, - EO_UI_DRIVER_UI, - EO_UI_DRIVER_KX -}; - -struct _eo_ui_t { - eo_ui_driver_t driver; - LV2UI_Controller controller; - int w, h; - - Evas_Object *win; // main window - Evas_Object *bg; // background - - Evas_Object *content; - eo_ui_content_get content_get; - - LV2_URID window_title; - LV2_URID atom_string; - char title [512]; - - union { - // eo iface - struct { - Evas_Object *parent; - LV2UI_Resize *resize; - } eo; - - // show iface - struct { - volatile int done; - } ui; - -#if defined(X11_UI_WRAP) - // X11 iface - struct { - Ecore_X_Window parent; - Ecore_X_Window child; - LV2UI_Resize *resize; - - Ecore_Evas *ee; - } x11; -#endif - - // external-ui iface - struct { - LV2_External_UI_Widget widget; - const LV2_External_UI_Host *host; - } kx; - }; -}; - -// Idle interface -static inline int -_idle_cb(LV2UI_Handle instance) -{ - eo_ui_t *eoui = instance; - if(!eoui) - return -1; - - ecore_main_loop_iterate(); - - return eoui->ui.done; -} - -static const LV2UI_Idle_Interface idle_ext = { - .idle = _idle_cb -}; - -static inline void -_show_delete_request(void *data, Evas_Object *obj, void *event_info) -{ - eo_ui_t *eoui = data; - if(!eoui) - return; - - // set done flag, host will then call _hide_cb - eoui->ui.done = 1; -} - -// Show Interface -static inline int -_show_cb(LV2UI_Handle instance) -{ - eo_ui_t *eoui = instance; - if(!eoui) - return -1; - - // create main window - eoui->win = elm_win_add(NULL, eoui->title, ELM_WIN_BASIC); - if(!eoui->win) - return -1; - evas_object_smart_callback_add(eoui->win, "delete,request", - _show_delete_request, eoui); - evas_object_resize(eoui->win, eoui->w, eoui->h); - evas_object_show(eoui->win); - - eoui->bg = elm_bg_add(eoui->win); - if(eoui->bg) - { - elm_bg_color_set(eoui->bg, 64, 64, 64); - evas_object_size_hint_weight_set(eoui->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(eoui->bg, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_show(eoui->bg); - elm_win_resize_object_add(eoui->win, eoui->bg); - } - - eoui->content = eoui->content_get(eoui); - if(eoui->content) - { - evas_object_size_hint_weight_set(eoui->content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(eoui->content, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_show(eoui->content); - elm_win_resize_object_add(eoui->win, eoui->content); - } - - return 0; -} - -static inline int -_hide_cb(LV2UI_Handle instance) -{ - eo_ui_t *eoui = instance; - if(!eoui) - return -1; - - // hide & delete bg&main window - if(eoui->win) - { - if(eoui->content) - { - elm_win_resize_object_del(eoui->win, eoui->content); - evas_object_del(eoui->content); - eoui->content = NULL; - } - if(eoui->bg) - { - elm_win_resize_object_del(eoui->win, eoui->bg); - evas_object_del(eoui->bg); - eoui->bg = NULL; - } - evas_object_del(eoui->win); - eoui->win = NULL; - } - - // reset done flag - eoui->ui.done = 0; - - return 0; -} - -static const LV2UI_Show_Interface show_ext = { - .show = _show_cb, - .hide = _hide_cb -}; - -// External-UI Interface -static inline void -_kx_run(LV2_External_UI_Widget *widget) -{ - eo_ui_t *eoui = widget - ? (void *)widget - offsetof(eo_ui_t, kx.widget) - : NULL; - if(!eoui) - return; - - ecore_main_loop_iterate(); -} - -static inline void -_kx_hide(LV2_External_UI_Widget *widget) -{ - eo_ui_t *eoui = widget - ? (void *)widget - offsetof(eo_ui_t, kx.widget) - : NULL; - if(!eoui) - return; - - // hide & delete bg & main window - if(eoui->win) - { - if(eoui->content) - { - elm_win_resize_object_del(eoui->win, eoui->content); - evas_object_del(eoui->content); - eoui->content = NULL; - } - if(eoui->bg) - { - elm_win_resize_object_del(eoui->win, eoui->bg); - evas_object_del(eoui->bg); - eoui->bg = NULL; - } - evas_object_del(eoui->win); // will call _kx_free - eoui->win = NULL; - } -} - -static inline void -_kx_free(void *data, Evas *e, Evas_Object *obj, void *event_info) -{ - eo_ui_t *eoui = data; - if(!eoui) - return; - - eoui->content = NULL; - eoui->bg = NULL; - eoui->win = NULL; - - if(eoui->kx.host->ui_closed && eoui->controller) - eoui->kx.host->ui_closed(eoui->controller); -} - -static inline void -_kx_show(LV2_External_UI_Widget *widget) -{ - eo_ui_t *eoui = widget - ? (void *)widget - offsetof(eo_ui_t, kx.widget) - : NULL; - if(!eoui || eoui->win) - return; - - // create main window - eoui->win = elm_win_add(NULL, eoui->title, ELM_WIN_BASIC); - if(!eoui->win) - return; - elm_win_autodel_set(eoui->win, EINA_TRUE); - evas_object_event_callback_add(eoui->win, EVAS_CALLBACK_FREE, _kx_free, eoui); - evas_object_resize(eoui->win, eoui->w, eoui->h); - evas_object_show(eoui->win); - - eoui->bg = elm_bg_add(eoui->win); - if(eoui->bg) - { - elm_bg_color_set(eoui->bg, 64, 64, 64); - evas_object_size_hint_weight_set(eoui->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(eoui->bg, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_show(eoui->bg); - elm_win_resize_object_add(eoui->win, eoui->bg); - } - - eoui->content = eoui->content_get(eoui); - if(eoui->content) - { - evas_object_size_hint_weight_set(eoui->content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(eoui->content, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_show(eoui->content); - elm_win_resize_object_add(eoui->win, eoui->content); - } -} - -// Resize Interface -static inline int -_ui_resize_cb(LV2UI_Feature_Handle instance, int w, int h) -{ - eo_ui_t *eoui = instance; - if(!eoui) - return -1; - - // check whether size actually needs any update - if( (eoui->w == w) && (eoui->h == h) ) - return 0; - - // update size - eoui->w = w; - eoui->h = h; - - // resize main window -#if defined(X11_UI_WRAP) - if(eoui->x11.ee) - ecore_evas_resize(eoui->x11.ee, eoui->w, eoui->h); -#endif - if(eoui->win) - evas_object_resize(eoui->win, eoui->w, eoui->h); - if(eoui->bg) - evas_object_resize(eoui->bg, eoui->w, eoui->h); - if(eoui->content) - evas_object_resize(eoui->content, eoui->w, eoui->h); - - return 0; -} - -static const LV2UI_Resize resize_ext = { - .handle = NULL, - .ui_resize = _ui_resize_cb -}; - -#if defined(X11_UI_WRAP) -static void -_x11_ui_wrap_mouse_in(Ecore_Evas *ee) -{ - eo_ui_t *eoui = ecore_evas_data_get(ee, "eoui"); - if(!eoui) - return; - - if(eoui->x11.parent) - ecore_x_window_focus(eoui->x11.parent); -} -#endif - -static inline int -eoui_instantiate(eo_ui_t *eoui, const LV2UI_Descriptor *descriptor, - const char *plugin_uri, const char *bundle_path, - LV2UI_Write_Function write_function, LV2UI_Controller controller, - LV2UI_Widget *widget, const LV2_Feature *const *features) -{ - //eoui->driver = NULL; set by ui plugin - eoui->controller = controller; - eoui->w = eoui->w > 0 ? eoui->w : 400; // fall-back if w == 0 - eoui->h = eoui->h > 0 ? eoui->h : 400; // fall-back if h == 0 - - LV2_URID_Map *map = NULL; - for(unsigned i=0; features[i]; i++) - { - if(!strcmp(features[i]->URI, LV2_URID__map)) - map = features[i]->data; - } - - if(!map) - return -1; - - eoui->atom_string = map->map(map->handle, LV2_ATOM__String); - eoui->window_title = map->map(map->handle, LV2_UI__windowTitle); - - *widget = NULL; - - switch(eoui->driver) - { - case EO_UI_DRIVER_EO: - { - eoui->eo.parent = NULL; // mandatory - eoui->eo.resize = NULL; // optional - for(int i=0; features[i]; i++) - { - if(!strcmp(features[i]->URI, LV2_UI__parent)) - eoui->eo.parent = features[i]->data; - else if(!strcmp(features[i]->URI, LV2_UI__resize)) - eoui->eo.resize = features[i]->data; - } - if(!eoui->eo.parent) - return -1; - - eoui->win = eoui->eo.parent; - - eoui->content = eoui->content_get(eoui); - - *(Evas_Object **)widget = eoui->content; - - if(eoui->eo.resize) - eoui->eo.resize->ui_resize(eoui->eo.resize->handle, eoui->w, eoui->h); - - break; - } - - case EO_UI_DRIVER_UI: - { - // according to the LV2 spec, the host MUST signal availability of - // idle interface via features, thus we test for it here - int host_provides_idle_iface = 0; // mandatory - LV2_Options_Option *opts = NULL; // optional - for(int i=0; features[i]; i++) - { - if(!strcmp(features[i]->URI, LV2_UI__idleInterface)) - host_provides_idle_iface = 1; - else if(!strcmp(features[i]->URI, LV2_OPTIONS__options)) - opts = features[i]->data; - } - if(!host_provides_idle_iface) - return -1; - - snprintf(eoui->title, 512, "%s", descriptor->URI); - if(opts) - { - for(LV2_Options_Option *opt = opts; - (opt->key != 0) && (opt->value != NULL); - opt++) - { - if( (opt->key == eoui->window_title) && (opt->type == eoui->atom_string) ) - snprintf(eoui->title, 512, "%s", opt->value); - } - } - - // initialize elementary library - _elm_startup_time = ecore_time_unix_get(); - elm_init(0, NULL); - - break; - } - -#if defined(X11_UI_WRAP) - case EO_UI_DRIVER_X11: - { - eoui->x11.parent = 0; // mandatory - eoui->x11.resize = NULL; // optional - int host_provides_idle_iface = 0; // mandatory - for(int i=0; features[i]; i++) - { - if(!strcmp(features[i]->URI, LV2_UI__parent)) - eoui->x11.parent = (Ecore_X_Window)(uintptr_t)features[i]->data; - else if(!strcmp(features[i]->URI, LV2_UI__resize)) - eoui->x11.resize = features[i]->data; - else if(!strcmp(features[i]->URI, LV2_UI__idleInterface)) - host_provides_idle_iface = 1; - } - if(!eoui->x11.parent || !host_provides_idle_iface) - return -1; - - // initialize elementary library - _elm_startup_time = ecore_time_unix_get(); - elm_init(0, NULL); - - eoui->x11.ee = ecore_evas_gl_x11_new(NULL, eoui->x11.parent, 0, 0, - eoui->w, eoui->h); - if(!eoui->x11.ee) - eoui->x11.ee = ecore_evas_software_x11_new(NULL, eoui->x11.parent, 0, 0, - eoui->w, eoui->h); - if(!eoui->x11.ee) - { - //elm_shutdown(); - return -1; - } - ecore_evas_data_set(eoui->x11.ee, "eoui", eoui); - ecore_evas_callback_mouse_in_set(eoui->x11.ee, _x11_ui_wrap_mouse_in); - ecore_evas_show(eoui->x11.ee); - - eoui->win = elm_win_fake_add(eoui->x11.ee); - if(eoui->win) - { - evas_object_resize(eoui->win, eoui->w, eoui->h); - evas_object_show(eoui->win); - - eoui->bg = elm_bg_add(eoui->win); - if(eoui->bg) - { - elm_bg_color_set(eoui->bg, 64, 64, 64); - evas_object_size_hint_weight_set(eoui->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(eoui->bg, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_resize(eoui->bg, eoui->w, eoui->h); - evas_object_show(eoui->bg); - } - - eoui->content = eoui->content_get(eoui); - if(eoui->content) - { - evas_object_size_hint_weight_set(eoui->content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(eoui->content, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_resize(eoui->content, eoui->w, eoui->h); - evas_object_show(eoui->content); - } - } - - eoui->x11.child = elm_win_xwindow_get(eoui->win); - *(uintptr_t *)widget = eoui->x11.child; - - if(eoui->x11.resize) - eoui->x11.resize->ui_resize(eoui->x11.resize->handle, eoui->w, eoui->h); - - break; - } -#endif - - case EO_UI_DRIVER_KX: - { - eoui->kx.host = NULL; // mandatory - LV2_Options_Option *opts = NULL; // optional - for(int i=0; features[i]; i++) - { - if(!strcmp(features[i]->URI, LV2_EXTERNAL_UI__Host)) - eoui->kx.host = features[i]->data; - else if(!strcmp(features[i]->URI, LV2_OPTIONS__options)) - opts = features[i]->data; - } - if(!eoui->kx.host) - return -1; - - snprintf(eoui->title, 512, "%s", descriptor->URI); - if(opts) - { - for(LV2_Options_Option *opt = opts; - (opt->key != 0) && (opt->value != NULL); - opt++) - { - if( (opt->key == eoui->window_title) && (opt->type == eoui->atom_string) ) - snprintf(eoui->title, 512, "%s", opt->value); - } - } - if(eoui->kx.host->plugin_human_id) - snprintf(eoui->title, 512, "%s", eoui->kx.host->plugin_human_id); - - // initialize elementary library - _elm_startup_time = ecore_time_unix_get(); - elm_init(0, NULL); - - eoui->kx.widget.run = _kx_run; - eoui->kx.widget.show = _kx_show; - eoui->kx.widget.hide = _kx_hide; - - *(LV2_External_UI_Widget **)widget = &eoui->kx.widget; - - break; - } - - default: - break; - } - - return 0; -} - -static inline void -eoui_cleanup(eo_ui_t *eoui) -{ - switch(eoui->driver) - { - case EO_UI_DRIVER_EO: - { - eoui->content = NULL; - - break; - } - - case EO_UI_DRIVER_UI: - { - //elm_shutdown(); - - break; - } - -#if defined(X11_UI_WRAP) - case EO_UI_DRIVER_X11: - { - if(eoui->win) - { - if(eoui->content) - { - elm_win_resize_object_del(eoui->win, eoui->content); - evas_object_del(eoui->content); - } - if(eoui->bg) - { - elm_win_resize_object_del(eoui->win, eoui->bg); - evas_object_del(eoui->bg); - } - evas_object_del(eoui->win); - } - if(eoui->x11.ee) - { - //ecore_evas_free(eoui->x11.ee); - } - - //elm_shutdown(); - - break; - } -#endif - - case EO_UI_DRIVER_KX: - { - //elm_shutdown(); - - break; - } - - default: - break; - } - - // clear eoui - memset(eoui, 0, sizeof(eo_ui_t)); -} - -#define eoui_eo_extension_data NULL -#define eoui_kx_extension_data NULL - -// extension data callback for show interface UI -static inline const void * -eoui_ui_extension_data(const char *uri) -{ - if(!strcmp(uri, LV2_UI__idleInterface)) - return &idle_ext; - else if(!strcmp(uri, LV2_UI__showInterface)) - return &show_ext; - - return NULL; -} - -// extension data callback for X11UI -static inline const void * -eoui_x11_extension_data(const char *uri) -{ - if(!strcmp(uri, LV2_UI__idleInterface)) - return &idle_ext; - else if(!strcmp(uri, LV2_UI__resize)) - return &resize_ext; - - return NULL; -} - -#endif // _EO_UI_H diff --git a/eo_ui.lv2/lv2_external_ui.h b/eo_ui.lv2/lv2_external_ui.h deleted file mode 100644 index 2c9e6ee..0000000 --- a/eo_ui.lv2/lv2_external_ui.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - LV2 External UI extension - 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 Filipe Coelho (aka falkTX) <falktx@falktx.com> - or ask in #lad channel, FreeNode IRC network. -*/ - -/** - @file lv2_external_ui.h - C header for the LV2 External UI extension <http://kxstudio.sf.net/ns/lv2ext/external-ui>. -*/ - -#ifndef LV2_EXTERNAL_UI_H -#define LV2_EXTERNAL_UI_H - -#include "lv2/lv2plug.in/ns/extensions/ui/ui.h" - -#define LV2_EXTERNAL_UI_URI "http://kxstudio.sf.net/ns/lv2ext/external-ui" -#define LV2_EXTERNAL_UI_PREFIX LV2_EXTERNAL_UI_URI "#" - -#define LV2_EXTERNAL_UI__Host LV2_EXTERNAL_UI_PREFIX "Host" -#define LV2_EXTERNAL_UI__Widget LV2_EXTERNAL_UI_PREFIX "Widget" - -/** This extension used to be defined by a lv2plug.in URI */ -#define LV2_EXTERNAL_UI_DEPRECATED_URI "http://lv2plug.in/ns/extensions/ui#external" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * When LV2_EXTERNAL_UI__Widget UI is instantiated, the returned - * LV2UI_Widget handle must be cast to pointer to LV2_External_UI_Widget. - * UI is created in invisible state. - */ -typedef struct _LV2_External_UI_Widget { - /** - * 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_Widget * _this_); - - /** - * Host calls this function to make the plugin UI visible. - * - * @param _this_ the UI context - */ - void (*show)(struct _LV2_External_UI_Widget * _this_); - - /** - * Host calls this function to make the plugin UI invisible again. - * - * @param _this_ the UI context - */ - void (*hide)(struct _LV2_External_UI_Widget * _this_); - -} LV2_External_UI_Widget; - -#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__Host feature. - * LV2_Feature::data must be pointer to LV2_External_UI_Host. - */ -typedef struct _LV2_External_UI_Host { - /** - * Callback that plugin UI will call when UI (GUI window) is closed by user. - * This callback will be called during execution of LV2_External_UI_Widget::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, the UI must be reinstantiated. - * - * @note When using the depreated URI LV2_EXTERNAL_UI_DEPRECATED_URI, - * some hosts will not call LV2UI_Descriptor::cleanup() as they should, - * and may call show() again without re-initialization. - * - * @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; - -} LV2_External_UI_Host; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* LV2_EXTERNAL_UI_H */ diff --git a/eo_ui.lv2/manifest.ttl b/eo_ui.lv2/manifest.ttl deleted file mode 100644 index 0949129..0000000 --- a/eo_ui.lv2/manifest.ttl +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2015 Hanspeter Portner (dev@open-music-kontrollers.ch) -# -# This is free software: you can redistribute it and/or modify -# it under the terms of the Artistic License 2.0 as published by -# The Perl Foundation. -# -# This source 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. See the -# Artistic License 2.0 for more details. -# -# You should have received a copy of the Artistic License 2.0 -# along the source as a COPYING file. If not, obtain it from -# http://www.perlfoundation.org/artistic_license_2_0. - -@prefix ui: <http://lv2plug.in/ns/extensions/ui#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix owl: <http://www.w3.org/2002/07/owl#> . - -ui:EoUI - a rdfs:Class , - owl:Class ; - rdfs:subClassOf ui:UI ; - rdfs:comment """ -A UI where the LV2_Widget is a pointer to an Evas/Elementary compatible Object -(e.g. an "Evas_Object *" or "Eo *"), and the host guarantees that the -Ecore_Evas or Elementary library has been initialised and the Ecore or -Elementary main loop is running before an UI of this type is instantiated.""" . diff --git a/eo_ui.lv2/test/eo.c b/eo_ui.lv2/test/eo.c deleted file mode 100644 index 91573b9..0000000 --- a/eo_ui.lv2/test/eo.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2016 Hanspeter Portner (dev@open-music-kontrollers.ch) - * - * This is free software: you can redistribute it and/or modify - * it under the terms of the Artistic License 2.0 as published by - * The Perl Foundation. - * - * This source is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the voiceied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * Artistic License 2.0 for more details. - * - * You should have received a copy of the Artistic License 2.0 - * along the source as a COPYING file. If not, obtain it from - * http://www.perlfoundation.org/artistic_license_2_0. - */ - -#include <stdlib.h> - -#include <lv2/lv2plug.in/ns/lv2core/lv2.h> - -#define EO_PREFIX "http://open-music-kontrollers.ch/lv2/eo#" -#define EO_TEST_URI EO_PREFIX"test" - -typedef struct _plughandle_t plughandle_t; - -struct _plughandle_t { - const float *x_in; - const float *y_in; -}; - -static LV2_Handle -instantiate(const LV2_Descriptor* descriptor, double rate, - const char *bundle_path, const LV2_Feature *const *features) -{ - plughandle_t *handle = calloc(1, sizeof(plughandle_t)); - if(!handle) - return NULL; - - return handle; -} - -static void -connect_port(LV2_Handle instance, uint32_t port, void *data) -{ - plughandle_t *handle = (plughandle_t *)instance; - - switch(port) - { - case 0: - handle->x_in = (const float *)data; - break; - case 1: - handle->y_in = (const float *)data; - break; - default: - break; - } -} - -static void -run(LV2_Handle instance, uint32_t nsamples) -{ - plughandle_t *handle = instance; - - // do nothing -} - -static void -cleanup(LV2_Handle instance) -{ - plughandle_t *handle = instance; - - free(handle); -} - -const LV2_Descriptor eo_test = { - .URI = EO_TEST_URI, - .instantiate = instantiate, - .connect_port = connect_port, - .activate = NULL, - .run = run, - .deactivate = NULL, - .cleanup = cleanup, - .extension_data = NULL -}; - -#ifdef _WIN32 -__declspec(dllexport) -#else -__attribute__((visibility("default"))) -#endif -const LV2_Descriptor* -lv2_descriptor(uint32_t index) -{ - switch(index) - { - case 0: - return &eo_test; - default: - return NULL; - } -} diff --git a/eo_ui.lv2/test/eo.ttl b/eo_ui.lv2/test/eo.ttl deleted file mode 100644 index a5148c1..0000000 --- a/eo_ui.lv2/test/eo.ttl +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright (c) 2016 Hanspeter Portner (dev@open-music-kontrollers.ch) -# -# This is free software: you can redistribute it and/or modify -# it under the terms of the Artistic License 2.0 as published by -# The Perl Foundation. -# -# This source 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. See the -# Artistic License 2.0 for more details. -# -# You should have received a copy of the Artistic License 2.0 -# along the source as a COPYING file. If not, obtain it from -# http://www.perlfoundation.org/artistic_license_2_0. - -@prefix owl: <http://www.w3.org/2002/07/owl#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix atom: <http://lv2plug.in/ns/ext/atom#> . -@prefix urid: <http://lv2plug.in/ns/ext/urid#> . -@prefix state: <http://lv2plug.in/ns/ext/state#> . -@prefix patch: <http://lv2plug.in/ns/ext/patch#> . -@prefix log: <http://lv2plug.in/ns/ext/log#> . -@prefix units: <http://lv2plug.in/ns/extensions/units#> . -@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . -@prefix ui: <http://lv2plug.in/ns/extensions/ui#> . -@prefix kx: <http://kxstudio.sf.net/ns/lv2ext/external-ui#> . - -@prefix lic: <http://opensource.org/licenses/> . -@prefix omk: <http://open-music-kontrollers.ch/ventosus#> . -@prefix proj: <http://open-music-kontrollers.ch/lv2/> . -@prefix eo: <http://open-music-kontrollers.ch/lv2/eo#> . - -ui:EoUI - a rdfs:Class, owl:Class ; - rdfs:subClassOf ui:UI . -kx:Widget - a rdfs:Class, owl:Class ; - rdfs:subClassOf ui:UI . -kx:Host - a lv2:Feature . - -# Maintainer -omk:me - a foaf:Person ; - foaf:name "Hanspeter Portner" ; - foaf:mbox <mailto:dev@open-music-kontrollers.ch> ; - foaf:homepage <http://open-music-kontrollers.ch> . - -# Project -proj:eo - a doap:Project ; - doap:maintainer omk:me ; - doap:name "EoUI Bundle" . - -# Test Plugin -eo:test - a lv2:Plugin , - lv2:ConverterPlugin ; - doap:name "EoUI Test" ; - doap:license lic:Artistic-2.0 ; - lv2:project proj:eo ; - lv2:optionalFeature lv2:isLive, lv2:hardRTCapable ; - - lv2:port [ - a lv2:InputPort , - lv2:ControlPort ; - lv2:index 0 ; - lv2:symbol "x_in" ; - lv2:name "X In" ; - lv2:default 0.5 ; - lv2:minimum 0.0 ; - lv2:maximum 1.0 ; - ] , [ - a lv2:InputPort , - lv2:ControlPort ; - lv2:index 1 ; - lv2:symbol "y_in" ; - lv2:name "Y In" ; - lv2:default 0.5 ; - lv2:minimum 0.0 ; - lv2:maximum 1.0 ; - ] . - -# Test UI -eo:ui - a ui:UI ; - lv2:requiredFeature ui:idleInterface, ui:portMap, urid:map ; - lv2:extensionData ui:idleInterface, ui:showInterface . -eo:kx - a kx:Widget ; - lv2:requiredFeature kx:Host, ui:portMap, urid:map . -eo:x11 - a ui:X11UI ; - lv2:requiredFeature ui:idleInterface, ui:portMap, urid:map ; - lv2:optionalFeature ui:resize ; - lv2:extensionData ui:idleInterface, ui:resize . -eo:eo - a ui:EoUI ; - lv2:optionalFeature ui:resize ; - lv2:requiredFeature ui:idleInterface, ui:portMap, urid:map . diff --git a/eo_ui.lv2/test/eo_ui.c b/eo_ui.lv2/test/eo_ui.c deleted file mode 100644 index 0939227..0000000 --- a/eo_ui.lv2/test/eo_ui.c +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Copyright (c) 2015 Hanspeter Portner (dev@open-music-kontrollers.ch) - * - * This is free software: you can redistribute it and/or modify - * it under the terms of the Artistic License 2.0 as published by - * The Perl Foundation. - * - * This source 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. See the - * Artistic License 2.0 for more details. - * - * You should have received a copy of the Artistic License 2.0 - * along the source as a COPYING file. If not, obtain it from - * http://www.perlfoundation.org/artistic_license_2_0. - */ - -#include <string.h> - -#include <Elementary.h> - -#include <lv2_eo_ui.h> - -#define EO_PREFIX "http://open-music-kontrollers.ch/lv2/eo#" -#define EO_TEST_URI EO_PREFIX"test" -#define EO_UI_URI EO_PREFIX"ui" -#define EO_KX_URI EO_PREFIX"kx" -#define EO_X11_URI EO_PREFIX"x11" -#define EO_EO_URI EO_PREFIX"eo" - -typedef struct _UI UI; - -struct _UI { - eo_ui_t eoui; - LV2_URID_Map *map; - - LV2_URID float_protocol; - LV2UI_Write_Function write_function; - LV2UI_Controller controller; - - LV2UI_Port_Map *port_map; - uint32_t x_in_port; - uint32_t y_in_port; - - int w, h; - Evas_Object *widget; - char img_src [512]; -}; - -const LV2UI_Descriptor eo_eo; -const LV2UI_Descriptor eo_ui; -const LV2UI_Descriptor eo_x11; -const LV2UI_Descriptor eo_kx; - -static void -_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info) -{ - UI *ui = data; - Evas_Event_Mouse_Move *ev = event_info; - - int w, h; - evas_object_geometry_get(obj, NULL, NULL, &w, &h); - - Evas_Coord x = ev->cur.canvas.x; - Evas_Coord y = ev->cur.canvas.y; - - const float X = (float)x / w; - const float Y = (float)y / h; - - ui->write_function(ui->controller, ui->x_in_port, sizeof(float), - ui->float_protocol, &X); - ui->write_function(ui->controller, ui->y_in_port, sizeof(float), - ui->float_protocol, &Y); -} - -static Evas_Object * -_content_get(eo_ui_t *eoui) -{ - UI *ui = (void *)eoui - offsetof(UI, eoui); - - ui->widget = elm_bg_add(eoui->win); - if(ui->widget) - { - elm_bg_file_set(ui->widget, ui->img_src, NULL); - evas_object_event_callback_add(ui->widget, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move, ui); - } - - return ui->widget; -} - -static LV2UI_Handle -instantiate(const LV2UI_Descriptor *descriptor, const char *plugin_uri, - const char *bundle_path, LV2UI_Write_Function write_function, - LV2UI_Controller controller, LV2UI_Widget *widget, - const LV2_Feature *const *features) -{ - if(strcmp(plugin_uri, EO_TEST_URI)) - return NULL; - - eo_ui_driver_t driver; - if(descriptor == &eo_eo) - driver = EO_UI_DRIVER_EO; - else if(descriptor == &eo_ui) - driver = EO_UI_DRIVER_UI; - else if(descriptor == &eo_x11) - driver = EO_UI_DRIVER_X11; - else if(descriptor == &eo_kx) - driver = EO_UI_DRIVER_KX; - else - return NULL; - - UI *ui = calloc(1, sizeof(UI)); - if(!ui) - return NULL; - - for(int i=0; features[i]; i++) - { - if(!strcmp(features[i]->URI, LV2_URID__map)) - ui->map = (LV2_URID_Map *)features[i]->data; - else if(!strcmp(features[i]->URI, LV2_UI__portMap)) - ui->port_map = (LV2UI_Port_Map *)features[i]->data; - } - - if(!ui->map) - { - fprintf(stderr, "%s: Host does not support urid:map\n", descriptor->URI); - free(ui); - return NULL; - } - if(!ui->port_map) - { - fprintf(stderr, "%s: Host does not support ui:portMap\n", descriptor->URI); - free(ui); - return NULL; - } - - ui->float_protocol = ui->map->map(ui->map->handle, LV2_UI__floatProtocol); - - // query port index of "control" port - ui->x_in_port = ui->port_map->port_index(ui->port_map->handle, "x_in"); - ui->y_in_port = ui->port_map->port_index(ui->port_map->handle, "y_in"); - - eo_ui_t *eoui = &ui->eoui; - eoui->driver = driver; - eoui->content_get = _content_get; - eoui->w = 100, - eoui->h = 63; - - ui->write_function = write_function; - ui->controller = controller; - - snprintf(ui->img_src, 512, "%s/lv2_white.png", bundle_path); - - if(eoui_instantiate(eoui, descriptor, plugin_uri, bundle_path, write_function, - controller, widget, features)) - { - free(ui); - return NULL; - } - - return ui; -} - -static void -cleanup(LV2UI_Handle handle) -{ - UI *ui = handle; - - eoui_cleanup(&ui->eoui); - free(ui); -} - -static void -port_event(LV2UI_Handle handle, uint32_t port_index, uint32_t buffer_size, - uint32_t format, const void *buffer) -{ - UI *ui = handle; - - if(port_index == ui->x_in_port) - { - //TODO - } - else if(port_index == ui->y_in_port) - { - //TODO - } -} - -const LV2UI_Descriptor eo_eo = { - .URI = EO_EO_URI, - .instantiate = instantiate, - .cleanup = cleanup, - .port_event = port_event, - .extension_data = eoui_eo_extension_data -}; - -const LV2UI_Descriptor eo_ui = { - .URI = EO_UI_URI, - .instantiate = instantiate, - .cleanup = cleanup, - .port_event = port_event, - .extension_data = eoui_ui_extension_data -}; - -const LV2UI_Descriptor eo_x11 = { - .URI = EO_X11_URI, - .instantiate = instantiate, - .cleanup = cleanup, - .port_event = port_event, - .extension_data = eoui_x11_extension_data -}; - -const LV2UI_Descriptor eo_kx = { - .URI = EO_KX_URI, - .instantiate = instantiate, - .cleanup = cleanup, - .port_event = port_event, - .extension_data = eoui_kx_extension_data -}; - -#ifdef _WIN32 -__declspec(dllexport) -#else -__attribute__((visibility("default"))) -#endif -const LV2UI_Descriptor* -lv2ui_descriptor(uint32_t index) -{ - switch(index) - { - case 0: - return &eo_eo; - case 1: - return &eo_ui; - case 2: - return &eo_x11; - case 3: - return &eo_kx; - default: - return NULL; - } -} diff --git a/eo_ui.lv2/test/lv2_white.png b/eo_ui.lv2/test/lv2_white.png Binary files differdeleted file mode 100644 index dabc244..0000000 --- a/eo_ui.lv2/test/lv2_white.png +++ /dev/null diff --git a/eo_ui.lv2/test/manifest.ttl.in b/eo_ui.lv2/test/manifest.ttl.in deleted file mode 100644 index 7e6c8bc..0000000 --- a/eo_ui.lv2/test/manifest.ttl.in +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright (c) 2016 Hanspeter Portner (dev@open-music-kontrollers.ch) -# -# This is free software: you can redistribute it and/or modify -# it under the terms of the Artistic License 2.0 as published by -# The Perl Foundation. -# -# This source 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. See the -# Artistic License 2.0 for more details. -# -# You should have received a copy of the Artistic License 2.0 -# along the source as a COPYING file. If not, obtain it from -# http://www.perlfoundation.org/artistic_license_2_0. - -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix owl: <http://www.w3.org/2002/07/owl#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix ui: <http://lv2plug.in/ns/extensions/ui#> . -@prefix kx: <http://kxstudio.sf.net/ns/lv2ext/external-ui#> . - -@prefix eo: <http://open-music-kontrollers.ch/lv2/eo#> . - -ui:EoUI - a rdfs:Class, owl:Class ; - rdfs:subClassOf ui:UI . -kx:Widget - a rdfs:Class, owl:Class ; - rdfs:subClassOf ui:UI . -kx:Host - a lv2:Feature . - -# Test Plugin -eo:test - a lv2:Plugin ; - lv2:minorVersion @EO_MINOR_VERSION@ ; - lv2:microVersion @EO_MICRO_VERSION@ ; - lv2:binary <eo@CMAKE_SHARED_MODULE_SUFFIX@> ; - @UI_UI_WRAP@ui:ui eo:ui ; - @KX_UI_WRAP@ui:ui eo:kx ; - @X11_UI_WRAP@ui:ui eo:x11 ; - @EO_UI_WRAP@ui:ui eo:eo ; - rdfs:seeAlso <eo.ttl> . - -# Test UI -eo:ui - a ui:UI ; - ui:binary <eo_ui@CMAKE_SHARED_MODULE_SUFFIX@> ; - rdfs:seeAlso <eo.ttl> . -eo:kx - a kx:Widget ; - ui:binary <eo_ui@CMAKE_SHARED_MODULE_SUFFIX@> ; - rdfs:seeAlso <eo.ttl> . -eo:x11 - a ui:X11UI ; - ui:binary <eo_ui@CMAKE_SHARED_MODULE_SUFFIX@> ; - rdfs:seeAlso <eo.ttl> . -eo:eo - a ui:EoUI ; - ui:binary <eo_ui@CMAKE_SHARED_MODULE_SUFFIX@> ; - rdfs:seeAlso <eo.ttl> . |