summaryrefslogtreecommitdiffstats
path: root/src/eulogium.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eulogium.c')
-rw-r--r--src/eulogium.c42
1 files changed, 32 insertions, 10 deletions
diff --git a/src/eulogium.c b/src/eulogium.c
index bbe259c..e97758c 100644
--- a/src/eulogium.c
+++ b/src/eulogium.c
@@ -5,17 +5,19 @@
#include <Eina.h>
#include <Ecore.h>
#include <Ecore_Evas.h>
+#include <Ecore_Getopt.h>
#include <Edje.h>
+#include <stdlib.h>
#include "gettext.h"
-#define COPYRIGHT "Copyright © 2015 oliver <o.schinagl@ultimaker.com> and various contributors (see AUTHORS)."
+#define COPYRIGHT "Copyright © 2015 Olliver Schinagl <oliver@schinagl.nl> and various contributors (see AUTHORS)."
+
+#define EULOGIUM_THEME "eulogium.edj"
int main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
-#if 0
Eina_Bool quit_option = EINA_FALSE;
- int args;
static const Ecore_Getopt optdesc = {
"eulogium",
"%prog [options]",
@@ -32,8 +34,6 @@ int main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
ECORE_GETOPT_SENTINEL
}
};
-
-
Ecore_Getopt_Value values[] = {
ECORE_GETOPT_VALUE_BOOL(quit_option),
ECORE_GETOPT_VALUE_BOOL(quit_option),
@@ -41,8 +41,12 @@ int main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
ECORE_GETOPT_VALUE_BOOL(quit_option),
ECORE_GETOPT_VALUE_NONE
};
- args = ecore_getopt_parse(&optdesc, values, argc, argv);
-#endif
+ int args;
+ Eina_Prefix *prefix;
+ Ecore_Evas *ee;
+ Evas *canvas;
+ Eina_List *engines, *l;
+ const char *eulogium_edj = EULOGIUM_THEME;
#if ENABLE_NLS
setlocale(LC_ALL, "");
@@ -51,11 +55,29 @@ int main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
textdomain(PACKAGE);
#endif
- eina_init();
+ if (!ecore_evas_init())
+ return EXIT_FAILURE;
+
+ if (!edje_init())
+ return EXIT_FAILURE;
- EINA_LOG_CRIT("Could not parse arguments.");
+ prefix = eina_prefix_new(argv[0], main,
+ "EULOGIUM",
+ "eulogium",
+ eulogium_edj,
+ PACKAGE_BIN_DIR,
+ PACKAGE_LIB_DIR,
+ PACKAGE_DATA_DIR,
+ LOCALE_DIR);
+
+ args = ecore_getopt_parse(&optdesc, values, argc, argv);
+ if (args < 0)
+ EINA_LOG_CRIT("Could not parse arguments.");
+ if (args == 1)
+ ecore_getopt_help(stderr, &optdesc);
- eina_shutdown();
+ ecore_evas_shutdown();
+ edje_shutdown();
return 0;
}