2012-08-09 13:15:30 -07:00
|
|
|
#include "entrance_client.h"
|
|
|
|
#include <Ecore.h>
|
|
|
|
#include <Ecore_X.h>
|
|
|
|
#include <Ecore_Getopt.h>
|
|
|
|
|
|
|
|
static const Ecore_Getopt options =
|
|
|
|
{
|
|
|
|
"entrance_client",
|
|
|
|
"%prog [options]",
|
|
|
|
VERSION,
|
|
|
|
"(C) 2011 Enlightenment, see AUTHORS.",
|
|
|
|
"GPL, see COPYING",
|
|
|
|
"Launch gui client.",
|
|
|
|
EINA_TRUE,
|
|
|
|
{
|
|
|
|
ECORE_GETOPT_STORE_STR('d', "display", "specify the display to use"),
|
|
|
|
ECORE_GETOPT_STORE_STR('t', "theme", "specify the theme to use"),
|
|
|
|
ECORE_GETOPT_HELP ('h', "help"),
|
|
|
|
ECORE_GETOPT_VERSION('V', "version"),
|
|
|
|
ECORE_GETOPT_COPYRIGHT('R', "copyright"),
|
|
|
|
ECORE_GETOPT_LICENSE('L', "license"),
|
|
|
|
ECORE_GETOPT_SENTINEL
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
int
|
|
|
|
main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
int args;
|
|
|
|
unsigned char quit_option = 0;
|
|
|
|
char *display = NULL;
|
|
|
|
char *theme = NULL;
|
|
|
|
|
|
|
|
Ecore_Getopt_Value values[] =
|
|
|
|
{
|
|
|
|
ECORE_GETOPT_VALUE_STR(display),
|
|
|
|
ECORE_GETOPT_VALUE_STR(theme),
|
|
|
|
ECORE_GETOPT_VALUE_BOOL(quit_option),
|
|
|
|
ECORE_GETOPT_VALUE_BOOL(quit_option),
|
|
|
|
ECORE_GETOPT_VALUE_BOOL(quit_option),
|
|
|
|
ECORE_GETOPT_VALUE_BOOL(quit_option)
|
|
|
|
};
|
|
|
|
args = ecore_getopt_parse(&options, values, argc, argv);
|
|
|
|
if (args < 0)
|
|
|
|
return EXIT_FAILURE;
|
|
|
|
if (quit_option)
|
|
|
|
return EXIT_SUCCESS;
|
2014-10-02 15:57:38 -07:00
|
|
|
eina_init();
|
2012-08-09 13:15:30 -07:00
|
|
|
if (!display)
|
|
|
|
{
|
2014-10-02 15:57:38 -07:00
|
|
|
PT("A display is required!");
|
|
|
|
eina_shutdown();
|
2012-08-09 13:15:30 -07:00
|
|
|
return EXIT_FAILURE;
|
|
|
|
}
|
|
|
|
ecore_init();
|
2013-09-03 11:08:37 -07:00
|
|
|
ecore_x_init(display);
|
2012-08-09 13:15:30 -07:00
|
|
|
elm_init(argc, argv);
|
2014-10-02 15:57:38 -07:00
|
|
|
PT("login init");
|
2013-09-03 11:08:37 -07:00
|
|
|
entrance_login_init();
|
2014-10-02 15:57:38 -07:00
|
|
|
PT("gui init");
|
2013-09-03 11:08:37 -07:00
|
|
|
if (!entrance_gui_init(theme)) return EXIT_FAILURE;
|
2014-10-02 15:57:38 -07:00
|
|
|
PT("conf init");
|
2014-03-19 17:44:20 -07:00
|
|
|
entrance_conf_init();
|
2014-10-02 15:57:38 -07:00
|
|
|
PT("connect init");
|
2013-09-03 11:08:37 -07:00
|
|
|
entrance_connect_init();
|
|
|
|
elm_run();
|
2014-10-02 15:57:38 -07:00
|
|
|
PT("connect shutdown");
|
2013-09-03 11:08:37 -07:00
|
|
|
entrance_connect_shutdown();
|
2014-10-02 15:57:38 -07:00
|
|
|
PT("conf shutdown");
|
2014-03-19 17:44:20 -07:00
|
|
|
entrance_conf_init();
|
2014-10-02 15:57:38 -07:00
|
|
|
PT("gui shutdown");
|
2013-09-03 11:08:37 -07:00
|
|
|
entrance_gui_shutdown();
|
2014-10-02 15:57:38 -07:00
|
|
|
PT("login shutdown");
|
2013-09-03 11:08:37 -07:00
|
|
|
entrance_login_shutdown();
|
2012-08-09 13:15:30 -07:00
|
|
|
elm_shutdown();
|
|
|
|
ecore_x_shutdown();
|
|
|
|
ecore_shutdown();
|
|
|
|
eina_shutdown();
|
2014-10-02 15:57:38 -07:00
|
|
|
PT("exit");
|
2012-08-09 13:15:30 -07:00
|
|
|
return EXIT_SUCCESS;
|
|
|
|
}
|
2013-09-03 11:08:37 -07:00
|
|
|
|