From ea90facf4674046e0a58969a6e0eb23054c550de Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Wed, 13 Nov 2019 22:35:11 +0100 Subject: Use GLib for command line too --- options.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'options.h') diff --git a/options.h b/options.h index 3cc0681..86741cf 100644 --- a/options.h +++ b/options.h @@ -23,6 +23,7 @@ * Email: */ #include +#include /* Runtime options. */ struct options { @@ -34,16 +35,19 @@ struct options { double exposure_ms; /* Digital gain after image acquisition, -1.0 for default. */ double gain; - /* When zero, run interactive mode, else number of frame to dump. */ + /* Number of frame to dump. */ int count; - /* Output file name or pattern, only used in dump mode. This should - * include a printf like pattern (%d) used to name the files. Only used in - * dump mode. */ + /* Output file name or pattern. This should include a printf like pattern + * (%d) used to name the files. */ const char *out; }; -/* Parse command line options and fill provided options structure. */ +/* Add options to application. */ void -options_parse(int argc, char **argv, struct options *options); +options_add(GApplication *app); + +/* Handle options. */ +gint +options_handle(GApplication *app, GVariantDict *options_dict); #endif /* options_h */ -- cgit v1.2.3