|
|
|
@ -1,5 +1,59 @@ |
|
|
|
|
#include "ephoto.h" |
|
|
|
|
|
|
|
|
|
Getopts_Data *getopts; |
|
|
|
|
|
|
|
|
|
const Ecore_Getopt general_opts = |
|
|
|
|
{ |
|
|
|
|
"ephoto", |
|
|
|
|
NULL, |
|
|
|
|
"5.15", |
|
|
|
|
"(C) 2009 - Stephen okra Houston <UnixTitan@gmail.com>", |
|
|
|
|
"BSD License", |
|
|
|
|
"Ephoto - Version 5.15\n" |
|
|
|
|
" Fancy Image Viewing\n",
|
|
|
|
|
0, |
|
|
|
|
{ |
|
|
|
|
ECORE_GETOPT_COUNT |
|
|
|
|
('\0',"use-software", "Use the Software engine to render this program"), |
|
|
|
|
ECORE_GETOPT_COUNT |
|
|
|
|
('\0', "use-xrender", "Use the Xrender engine to render this program"), |
|
|
|
|
ECORE_GETOPT_COUNT |
|
|
|
|
('\0', "use-opengl", "Use the OpenGL engine to render this program"), |
|
|
|
|
ECORE_GETOPT_LICENSE('L', "license"), |
|
|
|
|
ECORE_GETOPT_COPYRIGHT('C', "copyright"), |
|
|
|
|
ECORE_GETOPT_VERSION('V', "version"), |
|
|
|
|
ECORE_GETOPT_HELP('h', "help"), |
|
|
|
|
ECORE_GETOPT_SENTINEL |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
static Eina_Bool |
|
|
|
|
_ephoto_args_init(int argc, char **argv) |
|
|
|
|
{ |
|
|
|
|
getopts = calloc(1, sizeof(Getopts_Data)); |
|
|
|
|
int arg_index; |
|
|
|
|
|
|
|
|
|
Ecore_Getopt_Value general_values[] =
|
|
|
|
|
{ |
|
|
|
|
ECORE_GETOPT_VALUE_BOOL(getopts->software), |
|
|
|
|
ECORE_GETOPT_VALUE_BOOL(getopts->xrender), |
|
|
|
|
ECORE_GETOPT_VALUE_BOOL(getopts->opengl), |
|
|
|
|
ECORE_GETOPT_VALUE_BOOL(getopts->quit), |
|
|
|
|
ECORE_GETOPT_VALUE_BOOL(getopts->quit), |
|
|
|
|
ECORE_GETOPT_VALUE_BOOL(getopts->quit), |
|
|
|
|
ECORE_GETOPT_VALUE_BOOL(getopts->quit), |
|
|
|
|
ECORE_GETOPT_VALUE_NONE |
|
|
|
|
}; |
|
|
|
|
arg_index = ecore_getopt_parse(&general_opts, general_values, argc, argv); |
|
|
|
|
|
|
|
|
|
if (getopts->quit) |
|
|
|
|
{ |
|
|
|
|
return EINA_FALSE; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
return EINA_TRUE; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int main(int argc, char **argv) |
|
|
|
|
{ |
|
|
|
|
if (!eina_init()) |
|
|
|
@ -53,6 +107,9 @@ int main(int argc, char **argv) |
|
|
|
|
return 1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!_ephoto_args_init(argc, argv)) |
|
|
|
|
return 0; |
|
|
|
|
|
|
|
|
|
create_main_window(); |
|
|
|
|
|
|
|
|
|
ecore_main_loop_begin(); |
|
|
|
|