forked from enlightenment/enlightenment
parent
8d98eefed0
commit
94c79d788a
|
@ -65,3 +65,5 @@ enlightenment_LDFLAGS = -export-dynamic @e_libs@ @dlopen_libs@
|
||||||
enlightenment_remote_SOURCES = \
|
enlightenment_remote_SOURCES = \
|
||||||
e.h \
|
e.h \
|
||||||
e_remote_main.c
|
e_remote_main.c
|
||||||
|
|
||||||
|
enlightenment_remote_LDFLAGS = @e_libs@ @dlopen_libs@
|
||||||
|
|
|
@ -8,7 +8,7 @@ struct _E_Before_Idler
|
||||||
unsigned char delete_me : 1;
|
unsigned char delete_me : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* local subsystem globals */
|
/* local subsystem functions */
|
||||||
static void _e_main_shutdown_push(void (*func)(void));
|
static void _e_main_shutdown_push(void (*func)(void));
|
||||||
static void _e_main_shutdown(int errorcode);
|
static void _e_main_shutdown(int errorcode);
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ E_Path *path_themes = NULL;
|
||||||
E_Path *path_init = NULL;
|
E_Path *path_init = NULL;
|
||||||
int restart = 0;
|
int restart = 0;
|
||||||
|
|
||||||
/* local subsystem functions */
|
/* local subsystem globals */
|
||||||
#define MAX_LEVEL 32
|
#define MAX_LEVEL 32
|
||||||
static void (*_e_main_shutdown_func[MAX_LEVEL]) (void);
|
static void (*_e_main_shutdown_func[MAX_LEVEL]) (void);
|
||||||
static int _e_main_level = 0;
|
static int _e_main_level = 0;
|
||||||
|
|
|
@ -0,0 +1,78 @@
|
||||||
|
#include "e.h"
|
||||||
|
|
||||||
|
/* local subsystem functions */
|
||||||
|
static int _e_cb_signal_exit(void *data, int ev_type, void *ev);
|
||||||
|
static int _e_ipc_init(void);
|
||||||
|
|
||||||
|
/* local subsystem globals */
|
||||||
|
|
||||||
|
/* externally accessible functions */
|
||||||
|
int
|
||||||
|
main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
/* handle some command-line parameters */
|
||||||
|
for (i = 1; i < argc; i++)
|
||||||
|
{
|
||||||
|
if ((!strcmp(argv[i], "-instance")) && (i < (argc - 1)))
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* basic ecore init */
|
||||||
|
if (!ecore_init())
|
||||||
|
{
|
||||||
|
printf("Enlightenment cannot Initialize Ecore!\n"
|
||||||
|
"Perhaps you are out of memory?\n");
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
ecore_app_args_set((int)argc, (const char **)argv);
|
||||||
|
/* setup a handler for when e is asked to exit via a system signal */
|
||||||
|
if (!ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, _e_cb_signal_exit, NULL))
|
||||||
|
{
|
||||||
|
printf("Enlightenment cannot set up an exit signal handler.\n"
|
||||||
|
"Perhaps you are out of memory?\n");
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
/* init ipc */
|
||||||
|
if (!ecore_ipc_init())
|
||||||
|
{
|
||||||
|
printf("Enlightenment cannot initialize the ipc system.\n"
|
||||||
|
"Perhaps you are out of memory?\n");
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* setup e ipc service */
|
||||||
|
if (!_e_ipc_init())
|
||||||
|
{
|
||||||
|
printf("Enlightenment cannot set up the IPC socket.\n"
|
||||||
|
"It likely is already in use by an exisiting copy of Enlightenment.\n"
|
||||||
|
"Double check to see if Enlightenment is not already on this display,\n"
|
||||||
|
"but if that fails try deleting all files in ~/.ecore/enlightenment-*\n"
|
||||||
|
"and try running again.\n");
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* start our main loop */
|
||||||
|
ecore_main_loop_begin();
|
||||||
|
|
||||||
|
/* just return 0 to keep the compiler quiet */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* local subsystem functions */
|
||||||
|
static int
|
||||||
|
_e_cb_signal_exit(void *data, int ev_type, void *ev)
|
||||||
|
{
|
||||||
|
/* called on ctrl-c, kill (pid) (also SIGINT, SIGTERM and SIGQIT) */
|
||||||
|
ecore_main_loop_quit();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
_e_ipc_init(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue