summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlliver Schinagl <oliver@schinagl.nl>2015-01-24 16:33:38 (GMT)
committerOlliver Schinagl <oliver@schinagl.nl>2015-01-24 16:33:38 (GMT)
commita6f59e16946ddd2f7d896f8cdbfb891aaedb73ef (patch)
tree12554fb464cb428eea1c70309d474bdae7d5ec17
parent08cfb908c22c0c7b5aeb788569950718939b7465 (diff)
downloadeulogium-a6f59e16946ddd2f7d896f8cdbfb891aaedb73ef.zip
eulogium-a6f59e16946ddd2f7d896f8cdbfb891aaedb73ef.tar.gz
eulogium-a6f59e16946ddd2f7d896f8cdbfb891aaedb73ef.tar.bz2
wip commit
-rw-r--r--.gitignore1
-rw-r--r--configure.ac4
-rw-r--r--data/desktop/eulogium.desktop12
-rw-r--r--doc/eulogium.150
-rw-r--r--po/POTFILES.in3
-rw-r--r--po/eulogium.pot21
-rw-r--r--src/Makefile.am14
-rw-r--r--src/bin/Makefile.am19
-rw-r--r--src/bin/eulogium_main.c118
-rw-r--r--src/bin/eulogium_private.h6
-rwxr-xr-xsrc/eulogiumbin0 -> 17860 bytes
-rw-r--r--src/eulogium.c61
-rw-r--r--src/gettext.h (renamed from src/bin/gettext.h)0
-rw-r--r--src/lib/Eulogium.h111
-rw-r--r--src/lib/Makefile.am18
-rw-r--r--src/lib/eulogium.c64
-rw-r--r--src/lib/eulogium_private.h27
17 files changed, 160 insertions, 369 deletions
diff --git a/.gitignore b/.gitignore
index cd67ad2..29a9268 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
# generated and tmp files
*~
+*.swp
*.edj
*.exe
*.o
diff --git a/configure.ac b/configure.ac
index 5af30e4..2671436 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,9 +32,9 @@ PKG_CHECK_MODULES([EFL],
[
eina >= 1.8.0
evas >= 1.8.0
+ ecore-evas >= 1.8.0
ecore >= 1.8.0
edje >= 1.8.0
- elementary >= 1.8.0
])
# Check for tests and coverage
@@ -72,8 +72,6 @@ packaging/slackware/Makefile
packaging/pkgbuild/Makefile
po/Makefile.in
src/Makefile
-src/bin/Makefile
-src/lib/Makefile
src/tests/Makefile
doc/eulogium.1
])
diff --git a/data/desktop/eulogium.desktop b/data/desktop/eulogium.desktop
new file mode 100644
index 0000000..4b866e7
--- /dev/null
+++ b/data/desktop/eulogium.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=0.0.1
+Type=Application
+Name=eulogium
+Name[fr]=eulogium
+GenericName=Efl Application Skeletion
+Comment=Efl Application Eulogium
+Icon=eulogium
+TryExec=eulogium
+Exec=eulogium
+Categories=Development;Utility;
diff --git a/doc/eulogium.1 b/doc/eulogium.1
new file mode 100644
index 0000000..fb25823
--- /dev/null
+++ b/doc/eulogium.1
@@ -0,0 +1,50 @@
+.TH EULOGIUM 1 "01 01 1970 FIXME" "eulogium 0.0.1"
+
+.SH NAME
+eulogium \- a demo application
+
+.SH SYNOPSIS
+.B eulogium
+[-d] [-f] [-t=THEME] [-m=MINES] [-L] [-C] [-V] [-h]
+
+.SH DESCRIPTION
+
+Eulogium is a demo application to show how to integrate EFL and autotools into a
+cross platform build. You should be able to generate an executable easily for all
+target supported by EFL with this eulogium.
+
+With no option, the program starts and display an Hello World.
+
+
+.SH OPTIONS
+
+.TP
+.B -L, --license
+Show license.
+
+.TP
+.B -C, --copyright
+Show copyright.
+
+.TP
+.B -V, --version
+Show program version.
+
+.TP
+.B -h, --help
+Print list of options with short description.
+
+
+.SH BUGS
+
+Reports are welcome. Send them at enlightenment-devel@lists.sourceforge.net.
+
+
+.SH HOMEPAGE
+
+http://enlightenment.org
+
+
+.SH AUTHORS
+
+oliver <o.schinagl@ultimaker.com> and various contributors.
diff --git a/po/POTFILES.in b/po/POTFILES.in
index ff2ad76..79f7c5c 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,2 +1 @@
-src/bin/eulogium_main.c
-src/bin/eulogium_private.h
+src/eulogium.c
diff --git a/po/eulogium.pot b/po/eulogium.pot
new file mode 100644
index 0000000..e6559b3
--- /dev/null
+++ b/po/eulogium.pot
@@ -0,0 +1,21 @@
+# SOME DESCRIPTIVE TITLE.
+# This file is put in the public domain.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: eulogium 0.0.1\n"
+"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
+"POT-Creation-Date: 2015-01-24 16:57+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/eulogium.c:57
+msgid "Could not parse arguments."
+msgstr ""
diff --git a/src/Makefile.am b/src/Makefile.am
index 15871c9..6d27e95 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,16 @@
MAINTAINERCLEANFILES = Makefile.in
-SUBDIRS = lib bin tests
+SUBDIRS = tests
+bin_PROGRAMS = eulogium
+
+AM_CPPFLAGS = -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
+-I$(top_builddir)/src/ \
+-I$(top_srcdir)/src/ \
+@EFL_CFLAGS@
+
+eulogium_SOURCES = eulogium.c
+eulogium_LDADD = @EFL_LIBS@
+
+localedir = $(datadir)/locale
+DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
deleted file mode 100644
index 589f68d..0000000
--- a/src/bin/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-MAINTAINERCLEANFILES = Makefile.in
-
-bin_PROGRAMS = eulogium
-
-AM_CPPFLAGS = -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
--I$(top_builddir)/src/bin/ \
--I$(top_srcdir)/src/bin/ \
--I$(top_builddir)/src/lib/ \
--I$(top_srcdir)/src/lib/ \
-@EFL_CFLAGS@
-
-eulogium_SOURCES = eulogium_main.c
-eulogium_LDADD = @EFL_LIBS@ $(top_builddir)/src/lib/libeulogium.la
-
-localedir = $(datadir)/locale
-DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
-
-EXTRA_DIST = eulogium_private.h
-
diff --git a/src/bin/eulogium_main.c b/src/bin/eulogium_main.c
deleted file mode 100644
index b8a83e1..0000000
--- a/src/bin/eulogium_main.c
+++ /dev/null
@@ -1,118 +0,0 @@
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-/* NOTE: Respecting header order is important for portability.
- * Always put system first, then EFL, then your public header,
- * and finally your private one. */
-
-#include <Ecore_Getopt.h>
-#include <Elementary.h>
-
-#include "gettext.h"
-
-#include "Eulogium.h"
-
-#include "eulogium_private.h"
-
-#define COPYRIGHT "Copyright © 2013 oliver <o.schinagl@ultimaker.com> and various contributors (see AUTHORS)."
-
-static void
-_eulogium_win_del(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
-{
- elm_exit();
-}
-
-static Evas_Object *
-eulogium_win_setup(void)
-{
- Evas_Object *win;
- Evas_Object *label;
-
- win = elm_win_util_standard_add("main", "Eulogium");
- if (!win) return NULL;
-
- elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
- evas_object_smart_callback_add(win, "delete,request", _eulogium_win_del, NULL);
-
- label = elm_label_add(win);
- elm_object_text_set(label, " Hello World !");
- evas_object_size_hint_weight_set(label, 0.0, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(label, 0.0, EVAS_HINT_FILL);
- evas_object_show(label);
-
- elm_win_resize_object_add(win, label);
-
- evas_object_show(win);
-
- return win;
-}
-
-static const Ecore_Getopt optdesc = {
- "eulogium",
- "%prog [options]",
- PACKAGE_VERSION,
- COPYRIGHT,
- "BSD with advertisement clause",
- "An EFL eulogium program",
- 0,
- {
- ECORE_GETOPT_LICENSE('L', "license"),
- ECORE_GETOPT_COPYRIGHT('C', "copyright"),
- ECORE_GETOPT_VERSION('V', "version"),
- ECORE_GETOPT_HELP('h', "help"),
- ECORE_GETOPT_SENTINEL
- }
-};
-
-EAPI_MAIN int
-elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
-{
- Evas_Object *win;
- int args;
- Eina_Bool quit_option = EINA_FALSE;
-
- Ecore_Getopt_Value values[] = {
- ECORE_GETOPT_VALUE_BOOL(quit_option),
- ECORE_GETOPT_VALUE_BOOL(quit_option),
- ECORE_GETOPT_VALUE_BOOL(quit_option),
- ECORE_GETOPT_VALUE_BOOL(quit_option),
- ECORE_GETOPT_VALUE_NONE
- };
-
-#if ENABLE_NLS
- setlocale(LC_ALL, "");
- bindtextdomain(PACKAGE, LOCALEDIR);
- bind_textdomain_codeset(PACKAGE, "UTF-8");
- textdomain(PACKAGE);
-#endif
-
- eulogium_init();
-
- args = ecore_getopt_parse(&optdesc, values, argc, argv);
- if (args < 0)
- {
- EINA_LOG_CRIT("Could not parse arguments.");
- goto end;
- }
- else if (quit_option)
- {
- goto end;
- }
-
- elm_app_info_set(elm_main, "eulogium", "images/eulogium.png");
-
- if (!(win = eulogium_win_setup()))
- goto end;
-
- eulogium_library_call();
-
- elm_run();
-
- end:
- eulogium_shutdown();
- elm_shutdown();
-
- return 0;
-}
-ELM_MAIN()
diff --git a/src/bin/eulogium_private.h b/src/bin/eulogium_private.h
deleted file mode 100644
index aa968c6..0000000
--- a/src/bin/eulogium_private.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef EULOGIUM_PRIVATE_H_
-# define EULOGIUM_PRIVATE_H_
-
-// FIXME: put some private stuff related to your binary
-
-#endif
diff --git a/src/eulogium b/src/eulogium
new file mode 100755
index 0000000..e6223a7
--- /dev/null
+++ b/src/eulogium
Binary files differ
diff --git a/src/eulogium.c b/src/eulogium.c
new file mode 100644
index 0000000..bbe259c
--- /dev/null
+++ b/src/eulogium.c
@@ -0,0 +1,61 @@
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Evas.h>
+#include <Edje.h>
+
+#include "gettext.h"
+
+#define COPYRIGHT "Copyright © 2015 oliver <o.schinagl@ultimaker.com> and various contributors (see AUTHORS)."
+
+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]",
+ PACKAGE_VERSION,
+ COPYRIGHT,
+ "Affero GPLv3",
+ "eulogium program",
+ 0,
+ {
+ ECORE_GETOPT_LICENSE('L', "license"),
+ ECORE_GETOPT_COPYRIGHT('C', "copyright"),
+ ECORE_GETOPT_VERSION('V', "version"),
+ ECORE_GETOPT_HELP('h', "help"),
+ ECORE_GETOPT_SENTINEL
+ }
+ };
+
+
+ Ecore_Getopt_Value values[] = {
+ ECORE_GETOPT_VALUE_BOOL(quit_option),
+ ECORE_GETOPT_VALUE_BOOL(quit_option),
+ ECORE_GETOPT_VALUE_BOOL(quit_option),
+ ECORE_GETOPT_VALUE_BOOL(quit_option),
+ ECORE_GETOPT_VALUE_NONE
+ };
+ args = ecore_getopt_parse(&optdesc, values, argc, argv);
+#endif
+
+#if ENABLE_NLS
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ bind_textdomain_codeset(PACKAGE, "UTF-8");
+ textdomain(PACKAGE);
+#endif
+
+ eina_init();
+
+ EINA_LOG_CRIT("Could not parse arguments.");
+
+ eina_shutdown();
+
+ return 0;
+}
diff --git a/src/bin/gettext.h b/src/gettext.h
index e76b592..e76b592 100644
--- a/src/bin/gettext.h
+++ b/src/gettext.h
diff --git a/src/lib/Eulogium.h b/src/lib/Eulogium.h
deleted file mode 100644
index 7ef7c0d..0000000
--- a/src/lib/Eulogium.h
+++ /dev/null
@@ -1,111 +0,0 @@
-#ifndef EULOGIUM_H_
-# define EULOGIUM_H_
-
-#include <Elementary.h>
-
-#ifdef EAPI
-# undef EAPI
-#endif
-
-#ifdef _WIN32
-# ifdef EFL_EULOGIUM_BUILD
-# ifdef DLL_EXPORT
-# define EAPI __declspec(dllexport)
-# else
-# define EAPI
-# endif /* ! DLL_EXPORT */
-# else
-# define EAPI __declspec(dllimport)
-# endif /* ! EFL_EULOGIUM_BUILD */
-#else
-# ifdef __GNUC__
-# if __GNUC__ >= 4
-# define EAPI __attribute__ ((visibility("default")))
-# else
-# define EAPI
-# endif
-# else
-# define EAPI
-# endif
-#endif /* ! _WIN32 */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @file
- * @brief These routines are used for Eulogium library interaction.
- */
-
-/**
- * @brief Init / shutdown functions.
- * @defgroup Init Init / Shutdown
- *
- * @{
- *
- * Functions of obligatory usage, handling proper initialization
- * and shutdown routines.
- *
- * Before the usage of any other function, Eulogium should be properly
- * initialized with @ref eulogium_init() and the last call to Eulogium's
- * functions should be @ref eulogium_shutdown(), so everything will
- * be correctly freed.
- *
- * Eulogium logs everything with Eina Log, using the "eulogium" log domain.
- *
- */
-
-/**
- * Initialize Eulogium.
- *
- * Initializes Eulogium, its dependencies and modules. Should be the first
- * function of Eulogium to be called.
- *
- * @return The init counter value.
- *
- * @see eulogium_shutdown().
- *
- * @ingroup Init
- */
-EAPI int eulogium_init(void);
-
-/**
- * Shutdown Eulogium
- *
- * Shutdown Eulogium. If init count reaches 0, all the internal structures will
- * be freed. Any Eulogium library call after this point will leads to an error.
- *
- * @return Eulogium's init counter value.
- *
- * @see eulogium_init().
- *
- * @ingroup Init
- */
-EAPI int eulogium_shutdown(void);
-
-/**
- * @}
- */
-
-/**
- * @brief Main group API that wont do anything
- * @defgroup Main Main
- *
- * @{
- *
- * @brief A function that doesn't do any good nor any bad
- *
- * @ingroup Main
- */
-EAPI void eulogium_library_call(void);
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* EULOGIUM_H_ */
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
deleted file mode 100644
index 56d5c22..0000000
--- a/src/lib/Makefile.am
+++ /dev/null
@@ -1,18 +0,0 @@
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = \
--I$(top_srcdir)/src/lib \
--I$(top_builddir)/src/lib \
--DPACKAGE_LIB_DIR=\"$(libdir)\" \
--DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
-@EFL_CFLAGS@ \
--DEFL_EFL_BUILD
-
-lib_LTLIBRARIES = libeulogium.la
-
-includes_HEADERS = Eulogium.h
-includesdir = $(includedir)/eulogium-@VMAJ@
-
-libeulogium_la_SOURCES = eulogium.c
-libeulogium_la_LIBADD = @EFL_LIBS@ -lm
-libeulogium_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
diff --git a/src/lib/eulogium.c b/src/lib/eulogium.c
deleted file mode 100644
index 8e19356..0000000
--- a/src/lib/eulogium.c
+++ /dev/null
@@ -1,64 +0,0 @@
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include "Eulogium.h"
-
-#include "eulogium_private.h"
-
-static int _eulogium_init = 0;
-int _eulogium_lib_log_dom = -1;
-
-EAPI int
-eulogium_init(void)
-{
- _eulogium_init++;
- if (_eulogium_init > 1) return _eulogium_init;
-
- eina_init();
-
- _eulogium_lib_log_dom = eina_log_domain_register("eulogium", EINA_COLOR_CYAN);
- if (_eulogium_lib_log_dom < 0)
- {
- EINA_LOG_ERR("Eulogium can not create its log domain.");
- goto shutdown_eina;
- }
-
- // Put here your initialization logic of your library
-
- eina_log_timing(_eulogium_lib_log_dom, EINA_LOG_STATE_STOP, EINA_LOG_STATE_INIT);
-
- return _eulogium_init;
-
- shutdown_eina:
- eina_shutdown();
- _eulogium_init--;
-
- return _eulogium_init;
-}
-
-EAPI int
-eulogium_shutdown(void)
-{
- _eulogium_init--;
- if (_eulogium_init != 0) return _eulogium_init;
-
- eina_log_timing(_eulogium_lib_log_dom,
- EINA_LOG_STATE_START,
- EINA_LOG_STATE_SHUTDOWN);
-
- // Put here your shutdown logic
-
- eina_log_domain_unregister(_eulogium_lib_log_dom);
- _eulogium_lib_log_dom = -1;
-
- eina_shutdown();
-
- return _eulogium_init;
-}
-
-EAPI void
-eulogium_library_call(void)
-{
- INF("Not really doing anything useful.");
-}
diff --git a/src/lib/eulogium_private.h b/src/lib/eulogium_private.h
deleted file mode 100644
index ff03439..0000000
--- a/src/lib/eulogium_private.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef EULOGIUM_PRIVATE_H
-# define EULOGIUM_PRIVATE_H
-
-extern int _eulogium_lib_log_dom;
-
-#ifdef ERR
-# undef ERR
-#endif
-#define ERR(...) EINA_LOG_DOM_ERR(_eulogium_lib_log_dom, __VA_ARGS__)
-#ifdef INF
-# undef INF
-#endif
-#define INF(...) EINA_LOG_DOM_INFO(_eulogium_lib_log_dom, __VA_ARGS__)
-#ifdef WRN
-# undef WRN
-#endif
-#define WRN(...) EINA_LOG_DOM_WARN(_eulogium_lib_log_dom, __VA_ARGS__)
-#ifdef CRIT
-# undef CRIT
-#endif
-#define CRIT(...) EINA_LOG_DOM_CRIT(_eulogium_lib_log_dom, __VA_ARGS__)
-#ifdef DBG
-# undef DBG
-#endif
-#define DBG(...) EINA_LOG_DOM_DBG(_eulogium_lib_log_dom, __VA_ARGS__)
-
-#endif