diff options
author | David Robillard <d@drobilla.net> | 2024-11-16 13:16:33 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-11-24 19:02:18 -0500 |
commit | ae75e363101a249d4da94ab4ca525d32a325a030 (patch) | |
tree | 54770d731633f91b4d92face31066718a8e38ebf /src/jalv.c | |
parent | 5881e8438197b71f88f9c9d80cc9b0067f1fee58 (diff) | |
download | jalv-ae75e363101a249d4da94ab4ca525d32a325a030.tar.gz jalv-ae75e363101a249d4da94ab4ca525d32a325a030.tar.bz2 jalv-ae75e363101a249d4da94ab4ca525d32a325a030.zip |
Move URID and node initialization to a separate file
Diffstat (limited to 'src/jalv.c')
-rw-r--r-- | src/jalv.c | 94 |
1 files changed, 0 insertions, 94 deletions
@@ -26,14 +26,8 @@ #include "lv2/data-access/data-access.h" #include "lv2/instance-access/instance-access.h" #include "lv2/log/log.h" -#include "lv2/midi/midi.h" #include "lv2/options/options.h" -#include "lv2/parameters/parameters.h" #include "lv2/patch/patch.h" -#include "lv2/port-groups/port-groups.h" -#include "lv2/port-props/port-props.h" -#include "lv2/presets/presets.h" -#include "lv2/resize-port/resize-port.h" #include "lv2/state/state.h" #include "lv2/time/time.h" #include "lv2/ui/ui.h" @@ -785,94 +779,6 @@ jalv_select_custom_ui(const Jalv* const jalv) } static void -jalv_init_urids(Symap* const symap, JalvURIDs* const urids) -{ -#define MAP_URI(uri) symap_map(symap, (uri)) - - urids->atom_Float = MAP_URI(LV2_ATOM__Float); - urids->atom_Int = MAP_URI(LV2_ATOM__Int); - urids->atom_Object = MAP_URI(LV2_ATOM__Object); - urids->atom_Path = MAP_URI(LV2_ATOM__Path); - urids->atom_String = MAP_URI(LV2_ATOM__String); - urids->atom_eventTransfer = MAP_URI(LV2_ATOM__eventTransfer); - urids->bufsz_maxBlockLength = MAP_URI(LV2_BUF_SIZE__maxBlockLength); - urids->bufsz_minBlockLength = MAP_URI(LV2_BUF_SIZE__minBlockLength); - urids->bufsz_sequenceSize = MAP_URI(LV2_BUF_SIZE__sequenceSize); - urids->log_Error = MAP_URI(LV2_LOG__Error); - urids->log_Trace = MAP_URI(LV2_LOG__Trace); - urids->log_Warning = MAP_URI(LV2_LOG__Warning); - urids->midi_MidiEvent = MAP_URI(LV2_MIDI__MidiEvent); - urids->param_sampleRate = MAP_URI(LV2_PARAMETERS__sampleRate); - urids->patch_Get = MAP_URI(LV2_PATCH__Get); - urids->patch_Put = MAP_URI(LV2_PATCH__Put); - urids->patch_Set = MAP_URI(LV2_PATCH__Set); - urids->patch_body = MAP_URI(LV2_PATCH__body); - urids->patch_property = MAP_URI(LV2_PATCH__property); - urids->patch_value = MAP_URI(LV2_PATCH__value); - urids->time_Position = MAP_URI(LV2_TIME__Position); - urids->time_bar = MAP_URI(LV2_TIME__bar); - urids->time_barBeat = MAP_URI(LV2_TIME__barBeat); - urids->time_beatUnit = MAP_URI(LV2_TIME__beatUnit); - urids->time_beatsPerBar = MAP_URI(LV2_TIME__beatsPerBar); - urids->time_beatsPerMinute = MAP_URI(LV2_TIME__beatsPerMinute); - urids->time_frame = MAP_URI(LV2_TIME__frame); - urids->time_speed = MAP_URI(LV2_TIME__speed); - urids->ui_scaleFactor = MAP_URI(LV2_UI__scaleFactor); - urids->ui_updateRate = MAP_URI(LV2_UI__updateRate); - -#undef MAP_URI -} - -static void -jalv_init_nodes(LilvWorld* const world, JalvNodes* const nodes) -{ -#define MAP_NODE(uri) lilv_new_uri(world, (uri)) - - nodes->atom_AtomPort = MAP_NODE(LV2_ATOM__AtomPort); - nodes->atom_Chunk = MAP_NODE(LV2_ATOM__Chunk); - nodes->atom_Float = MAP_NODE(LV2_ATOM__Float); - nodes->atom_Path = MAP_NODE(LV2_ATOM__Path); - nodes->atom_Sequence = MAP_NODE(LV2_ATOM__Sequence); - nodes->lv2_AudioPort = MAP_NODE(LV2_CORE__AudioPort); - nodes->lv2_CVPort = MAP_NODE(LV2_CORE__CVPort); - nodes->lv2_ControlPort = MAP_NODE(LV2_CORE__ControlPort); - nodes->lv2_InputPort = MAP_NODE(LV2_CORE__InputPort); - nodes->lv2_OutputPort = MAP_NODE(LV2_CORE__OutputPort); - nodes->lv2_connectionOptional = MAP_NODE(LV2_CORE__connectionOptional); - nodes->lv2_control = MAP_NODE(LV2_CORE__control); - nodes->lv2_default = MAP_NODE(LV2_CORE__default); - nodes->lv2_designation = MAP_NODE(LV2_CORE__designation); - nodes->lv2_enumeration = MAP_NODE(LV2_CORE__enumeration); - nodes->lv2_extensionData = MAP_NODE(LV2_CORE__extensionData); - nodes->lv2_integer = MAP_NODE(LV2_CORE__integer); - nodes->lv2_latency = MAP_NODE(LV2_CORE__latency); - nodes->lv2_maximum = MAP_NODE(LV2_CORE__maximum); - nodes->lv2_minimum = MAP_NODE(LV2_CORE__minimum); - nodes->lv2_name = MAP_NODE(LV2_CORE__name); - nodes->lv2_reportsLatency = MAP_NODE(LV2_CORE__reportsLatency); - nodes->lv2_sampleRate = MAP_NODE(LV2_CORE__sampleRate); - nodes->lv2_symbol = MAP_NODE(LV2_CORE__symbol); - nodes->lv2_toggled = MAP_NODE(LV2_CORE__toggled); - nodes->midi_MidiEvent = MAP_NODE(LV2_MIDI__MidiEvent); - nodes->pg_group = MAP_NODE(LV2_PORT_GROUPS__group); - nodes->pprops_logarithmic = MAP_NODE(LV2_PORT_PROPS__logarithmic); - nodes->pprops_notOnGUI = MAP_NODE(LV2_PORT_PROPS__notOnGUI); - nodes->pprops_rangeSteps = MAP_NODE(LV2_PORT_PROPS__rangeSteps); - nodes->pset_Preset = MAP_NODE(LV2_PRESETS__Preset); - nodes->pset_bank = MAP_NODE(LV2_PRESETS__bank); - nodes->rdfs_comment = MAP_NODE(LILV_NS_RDFS "comment"); - nodes->rdfs_label = MAP_NODE(LILV_NS_RDFS "label"); - nodes->rdfs_range = MAP_NODE(LILV_NS_RDFS "range"); - nodes->rsz_minimumSize = MAP_NODE(LV2_RESIZE_PORT__minimumSize); - nodes->ui_showInterface = MAP_NODE(LV2_UI__showInterface); - nodes->work_interface = MAP_NODE(LV2_WORKER__interface); - nodes->work_schedule = MAP_NODE(LV2_WORKER__schedule); - nodes->end = NULL; - -#undef MAP_NODE -} - -static void jalv_init_env(SerdEnv* const env) { serd_env_set_prefix_from_strings( |