From bdfc77e8cd8a586e535f5eab109dd0411e0554a0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 21 Aug 2011 05:00:54 +0000 Subject: Preliminary support for Jack Session and LV2 Persist. Real command line argument support. git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@3441 a436a847-0d15-0410-975c-d299462d15a1 --- src/jalv_gtk2.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'src/jalv_gtk2.c') diff --git a/src/jalv_gtk2.c b/src/jalv_gtk2.c index 59e9772..7d5bd5a 100644 --- a/src/jalv_gtk2.c +++ b/src/jalv_gtk2.c @@ -24,14 +24,26 @@ static void destroy(GtkWidget* widget, gtk_main_quit(); } -void -jalv_init(int* argc, char*** argv) +int +jalv_init(int* argc, char*** argv, JalvOptions* opts) { + GOptionEntry entries[] = { + { "uuid", 'u', 0, G_OPTION_ARG_STRING, &opts->uuid, + "UUID for Jack session restoration", "UUID" }, + { "load", 'l', 0, G_OPTION_ARG_STRING, &opts->load, + "Load state from save directory", "DIR" }, + { 0,0,0,0,0,0,0 } }; GError* error = NULL; - gtk_init_with_args( + const int err = gtk_init_with_args( argc, argv, - "PLUGIN_URI [JACK_UUID] - Run an LV2 plugin as a Jack application", - NULL, NULL, &error); + "PLUGIN_URI - Run an LV2 plugin as a Jack application", + entries, NULL, &error); + + if (!err) { + fprintf(stderr, "%s\n", error->message); + } + + return !err; } LilvNode* -- cgit v1.2.1