From e2cfcb6288b000abccb15831e9dde8b8283eb36e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 23 Jul 2007 02:33:55 +0000 Subject: Removed glib dependency from LV2 OSC code. Made LV2 OSC code C++ safe. Preliminary work on OSC patching in Ingen. Added LV2 OSC printing stuff to repository. Broke building Ingen separately. Whatever. git-svn-id: http://svn.drobilla.net/lad/ingen@599 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/gui/Configuration.cpp | 18 +- src/libs/gui/Configuration.h | 9 +- src/libs/gui/PatchCanvas.cpp | 8 + src/libs/gui/PatchCanvas.h | 2 + src/libs/gui/ingen_gui.glade | 968 +++++++++++++++++++++-------------------- 5 files changed, 520 insertions(+), 485 deletions(-) (limited to 'src/libs/gui') diff --git a/src/libs/gui/Configuration.cpp b/src/libs/gui/Configuration.cpp index 663a813d..72ea5cb5 100644 --- a/src/libs/gui/Configuration.cpp +++ b/src/libs/gui/Configuration.cpp @@ -38,10 +38,12 @@ using namespace Ingen::Client; Configuration::Configuration() -: _patch_path("/usr/share/ingen/patches:/usr/local/share/ingen/patches"), - _audio_port_color( 0x394f66B0), - _control_port_color(0x396639B0), - _midi_port_color( 0x663939B0) + : _patch_path("/usr/share/ingen/patches:/usr/local/share/ingen/patches") + // Agave FTW + , _audio_port_color( 0x0D597FFF) + , _control_port_color(0x2F7F0DFF) + , _midi_port_color( 0x7F240DFF) + , _osc_port_color( 0x5D0D7FFF) { } @@ -140,7 +142,7 @@ Configuration::apply_settings() } -int +uint32_t Configuration::get_port_color(const PortModel* pi) { assert(pi != NULL); @@ -151,9 +153,13 @@ Configuration::get_port_color(const PortModel* pi) return _audio_port_color; } else if (pi->is_midi()) { return _midi_port_color; + } else if (pi->is_osc()) { + return _osc_port_color; } - cerr << "[Configuration] Unknown port type! Port will be bright red, this is an error." << endl; + cerr << "[Configuration] Unknown port type " << pi->type() << ", port will appear bright red." + << endl; + return 0xFF0000B0; } diff --git a/src/libs/gui/Configuration.h b/src/libs/gui/Configuration.h index b1a861cb..9f7cbb08 100644 --- a/src/libs/gui/Configuration.h +++ b/src/libs/gui/Configuration.h @@ -56,7 +56,7 @@ public: const string& patch_folder() { return _patch_folder; } void set_patch_folder(const string& f) { _patch_folder = f; } - int get_port_color(const PortModel* pi); + uint32_t get_port_color(const PortModel* pi); private: /** Search path for patch files. Colon delimited, as usual. */ @@ -65,9 +65,10 @@ private: /** Most recent patch folder shown in open dialog */ string _patch_folder; - int _audio_port_color; - int _control_port_color; - int _midi_port_color; + uint32_t _audio_port_color; + uint32_t _control_port_color; + uint32_t _midi_port_color; + uint32_t _osc_port_color; }; diff --git a/src/libs/gui/PatchCanvas.cpp b/src/libs/gui/PatchCanvas.cpp index 4808c288..f37b81c5 100644 --- a/src/libs/gui/PatchCanvas.cpp +++ b/src/libs/gui/PatchCanvas.cpp @@ -60,6 +60,8 @@ PatchCanvas::PatchCanvas(SharedPtr patch, int width, int height) xml->get_widget("canvas_menu_add_control_output", _menu_add_control_output); xml->get_widget("canvas_menu_add_midi_input", _menu_add_midi_input); xml->get_widget("canvas_menu_add_midi_output", _menu_add_midi_output); + xml->get_widget("canvas_menu_add_osc_input", _menu_add_osc_input); + xml->get_widget("canvas_menu_add_osc_output", _menu_add_osc_output); xml->get_widget("canvas_menu_load_plugin", _menu_load_plugin); xml->get_widget("canvas_menu_load_patch", _menu_load_patch); xml->get_widget("canvas_menu_new_patch", _menu_new_patch); @@ -83,6 +85,12 @@ PatchCanvas::PatchCanvas(SharedPtr patch, int width, int height) _menu_add_midi_output->signal_activate().connect( sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port), "midi_output", "ingen:midi", true)); + _menu_add_osc_input->signal_activate().connect( + sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port), + "osc_input", "ingen:osc", false)); + _menu_add_osc_output->signal_activate().connect( + sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port), + "osc_output", "ingen:osc", true)); build_plugin_menu(); diff --git a/src/libs/gui/PatchCanvas.h b/src/libs/gui/PatchCanvas.h index 275d6209..da33142b 100644 --- a/src/libs/gui/PatchCanvas.h +++ b/src/libs/gui/PatchCanvas.h @@ -117,6 +117,8 @@ private: Gtk::MenuItem* _menu_add_control_output; Gtk::MenuItem* _menu_add_midi_input; Gtk::MenuItem* _menu_add_midi_output; + Gtk::MenuItem* _menu_add_osc_input; + Gtk::MenuItem* _menu_add_osc_output; Gtk::MenuItem* _menu_load_plugin; Gtk::MenuItem* _menu_load_patch; Gtk::MenuItem* _menu_new_patch; diff --git a/src/libs/gui/ingen_gui.glade b/src/libs/gui/ingen_gui.glade index e0777069..994f456a 100644 --- a/src/libs/gui/ingen_gui.glade +++ b/src/libs/gui/ingen_gui.glade @@ -481,53 +481,62 @@ 3 12 - + True - 1 - Node Name: - True + True + Clear filter text (show all plugins) + gtk-clear + True + 0 - 2 - 3 + 2 + 3 GTK_FILL - + True + Name contains: - 1 - 2 - 1 - 2 GTK_FILL + - + True + True + True + Search string to filter plugin list + * - 1 - 2 - GTK_FILL - GTK_FILL + 1 + 2 + 6 - + True + False + True + Add selected plugin to patch + gtk-add + True + 0 2 3 - 1 - 2 + 2 + 3 GTK_FILL - GTK_FILL + @@ -570,60 +579,51 @@ - + True - False - True - Add selected plugin to patch - gtk-add - True - 0 2 3 - 2 - 3 + 1 + 2 GTK_FILL - + GTK_FILL - + True - True - True - Search string to filter plugin list - * - 1 - 2 - 6 + 1 + 2 + GTK_FILL + GTK_FILL - + True - Name contains: + 1 + 2 + 1 + 2 GTK_FILL - - + True - True - Clear filter text (show all plugins) - gtk-clear - True - 0 + 1 + Node Name: + True - 2 - 3 + 2 + 3 GTK_FILL @@ -654,61 +654,61 @@ 2 2 - + True - 0 - Name: + True + True + * + True - GTK_FILL - GTK_EXPAND - 5 + 1 + 2 + + 4 - + True - 0 - Polyphony: + True + 1 0 100 1 10 10 + 1 + 1 + 2 1 2 GTK_FILL - GTK_EXPAND - 5 + + 4 - + True - True - 1 0 100 1 10 10 - 1 + 0 + Polyphony: - 1 - 2 1 2 GTK_FILL - - 4 + GTK_EXPAND + 5 - + True - True - True - * - True + 0 + Name: - 1 - 2 - - 4 + GTK_FILL + GTK_EXPAND + 5 @@ -810,63 +810,71 @@ 12 4 - + True - 0 - <b>Name: </b> - True + + + True + True + Specify the name for the new patch + Specify: + True + 0 + True + load_subpatch_name_from_file_radio + + + False + False + + + + + True + False + True + Specify the name for the new patch + * + True + + + False + 1 + + - GTK_FILL - + 3 + 4 + GTK_FILL - + True 0 - <b>Polyphony: </b> - True - - - 1 - 2 - GTK_FILL - - - - - - True - True - Use the name stored in the patch file - Load from file - True - 0 - True - True - 1 - 2 + 2 + 3 GTK_FILL - + True True - Use the polyphony value stored in the patch file - Load from file + Set polyphony to the same value as the parent (containing) patch + Same as parent (?) True 0 - True True + load_subpatch_poly_from_file_radio - 1 - 2 + 2 + 3 1 2 GTK_FILL @@ -917,19 +925,19 @@ - + True True - Set polyphony to the same value as the parent (containing) patch - Same as parent (?) + Use the polyphony value stored in the patch file + Load from file True 0 + True True - load_subpatch_poly_from_file_radio - 2 - 3 + 1 + 2 1 2 GTK_FILL @@ -937,55 +945,47 @@ - + + True + True + Use the name stored in the patch file + Load from file + True + 0 + True + True + + + 1 + 2 + GTK_FILL + + + + + True 0 + <b>Polyphony: </b> + True - 2 - 3 + 1 + 2 GTK_FILL - + True - - - True - True - Specify the name for the new patch - Specify: - True - 0 - True - load_subpatch_name_from_file_radio - - - False - False - - - - - True - False - True - Specify the name for the new patch - * - True - - - False - 1 - - + 0 + <b>Name: </b> + True - 3 - 4 - GTK_FILL + GTK_FILL + @@ -1046,54 +1046,6 @@ 4 12 4 - - - True - 0 - <b>Polyphony: </b> - True - - - GTK_FILL - - - - - - True - True - Use the same polyphony as the current patch - Keep current - True - 0 - True - True - - - 1 - 2 - GTK_FILL - - - - - - True - True - Use the polyphony value stored in the patch file - Load from file - True - 0 - True - load_patch_poly_from_current_radio - - - 2 - 3 - GTK_FILL - - - True @@ -1134,6 +1086,54 @@ GTK_FILL + + + True + True + Use the polyphony value stored in the patch file + Load from file + True + 0 + True + load_patch_poly_from_current_radio + + + 2 + 3 + GTK_FILL + + + + + + True + True + Use the same polyphony as the current patch + Keep current + True + 0 + True + True + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + <b>Polyphony: </b> + True + + + GTK_FILL + + + False @@ -1181,62 +1181,38 @@ window1 - True - 4 - 2 - - - - - - - - - - - - - - - True - - - True - 0 - - - True - True - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - - - True - GTK_SHADOW_NONE - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - - - - - - + True + 4 + 2 + + + + + + + + + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + True - True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - True - Apply changed controls to all voices - All Voices - True - 0 - True + + True + 0 + 4 + 4 + <b>Name</b> + True + True False @@ -1244,54 +1220,67 @@ - + True - 5 - - - True - True - Apply changed controls to one voice only - Specific Voice: - True - 0 - True - control_panel_all_voices_radio - - - False - False - - + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 1 + 1 + 0 + 0 + 2 + 2 + 2 - + True - False True - Voice control changes are applied to - 1 1 100 1 10 10 - 1 + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + 0 -9.9999999999999999e+45 1.0000000000000001e+63 1 10 10 + 4 True - - 1 - - False - False 1 False - 5 + False + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 -1e+113 1e+137 0 0 0 + 63 + False + + + False 1 + + 3 + 4 + + + + + True + + + 1 + 2 + GTK_FILL + @@ -1525,32 +1514,46 @@ - - True - - - 1 - 2 - GTK_FILL - - - - + True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 - + True - 0 - 4 - 4 - <b>Name</b> - True - True + True + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + + + True + GTK_SHADOW_NONE + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + + + + + + + + + True + True + + + True + Apply changed controls to all voices + All Voices + True + 0 + True False @@ -1558,57 +1561,54 @@ - + True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 1 - 1 - 0 - 0 - 2 - 2 - 2 + 5 - + True True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 12 - 0 -9.9999999999999999e+45 1.0000000000000001e+63 1 10 10 - 4 + Apply changed controls to one voice only + Specific Voice: + True + 0 + True + control_panel_all_voices_radio + + + False + False + + + + + True + False + True + Voice control changes are applied to + 1 1 100 1 10 10 + 1 True + + 1 + + False + False 1 False - False - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 -1e+113 1e+137 0 0 0 - 63 - False - - - False + 5 1 - - 3 - 4 - @@ -1698,51 +1698,51 @@ 2 2 - + True - <b>Patch Search Path: </b> - True + 0 + 1 + 2 GTK_FILL - + True - True - * + <i>Example: /foo/bar:/home/john/patches:/usr/share/om/patches</i> + True 1 2 + 1 + 2 + GTK_FILL - + True - <i>Example: /foo/bar:/home/john/patches:/usr/share/om/patches</i> - True + True + * 1 2 - 1 - 2 - GTK_FILL - + True - 0 + <b>Patch Search Path: </b> + True - 1 - 2 GTK_FILL @@ -2118,7 +2118,7 @@ 10 6 - + True 0 - @@ -2126,28 +2126,34 @@ 1 2 + 2 + 3 GTK_FILL - + True 0 - Type: + Name: + 2 + 3 GTK_FILL - + True 0 - URI: + - + 1 + 2 1 2 GTK_FILL @@ -2155,14 +2161,12 @@ - + True 0 - - + URI: - 1 - 2 1 2 GTK_FILL @@ -2170,20 +2174,18 @@ - + True 0 - Name: + Type: - 2 - 3 GTK_FILL - + True 0 - @@ -2191,8 +2193,6 @@ 1 2 - 2 - 3 GTK_FILL @@ -2347,64 +2347,33 @@ Contributors: 2 8 - - True - - - True - False - True - 16180 1 65535 1 10 10 - 1 - True - - - False - False - - - - - 1 - 2 - 1 - 2 - GTK_FILL - 8 - - - - + True - - - True - True - * - True - 28 - osc.udp://localhost:16180 - - + 0 1 2 + 2 + 3 GTK_FILL - GTK_FILL - 8 + - + True + False True - Connect to running server at: + Use internal engine True 0 True + connect_server_radiobutton + 2 + 3 GTK_FILL @@ -2427,35 +2396,66 @@ Contributors: - + True - False True - Use internal engine + Connect to running server at: True 0 True - connect_server_radiobutton - 2 - 3 GTK_FILL - + True - 0 + + + True + True + * + True + 28 + osc.udp://localhost:16180 + + 1 2 - 2 - 3 GTK_FILL - + GTK_FILL + 8 + + + + + True + + + True + False + True + 16180 1 65535 1 10 10 + 1 + True + + + False + False + + + + + 1 + 2 + 1 + 2 + GTK_FILL + 8 @@ -2556,6 +2556,15 @@ Contributors: + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Add an OSC input to this patch + OSC + True + + @@ -2601,6 +2610,15 @@ Contributors: + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Add an OSC output to this patch + OSC + True + + @@ -2778,19 +2796,26 @@ Contributors: 2 8 - + True - True - Enter a short name suitable for use as an identifier or filename. - -The first character must be one of _, a-z or A-Z and subsequenct characters can be from _, a-z, A-Z or 0-9. - - * - True + 0 + Short Name: - 1 - 2 + 1 + 2 + GTK_FILL + + + + + + True + 0 + Symbol: + + + GTK_FILL @@ -2811,26 +2836,19 @@ The first character must be one of _, a-z or A-Z and subsequenct characters can - - True - 0 - Symbol: - - - GTK_FILL - - - - - + True - 0 - Short Name: + True + Enter a short name suitable for use as an identifier or filename. + +The first character must be one of _, a-z or A-Z and subsequenct characters can be from _, a-z, A-Z or 0-9. + + * + True - 1 - 2 - GTK_FILL + 1 + 2 @@ -2976,17 +2994,26 @@ Thank you for contributing. 2 4 - + True - True - 0 -100000000 100000000 1 10 10 - 1 - 5 - True + 0 + Maximum Value: - 1 - 2 + 1 + 2 + GTK_FILL + + + + + + True + 0 + Minimum Value: + + + GTK_FILL @@ -3008,26 +3035,17 @@ Thank you for contributing. - - True - 0 - Minimum Value: - - - GTK_FILL - - - - - + True - 0 - Maximum Value: + True + 0 -100000000 100000000 1 10 10 + 1 + 5 + True - 1 - 2 - GTK_FILL + 1 + 2 -- cgit v1.2.1