and here is some substance

SVN revision: 12275
This commit is contained in:
Carsten Haitzler 2004-11-26 11:11:05 +00:00
parent 8d98eefed0
commit 94c79d788a
3 changed files with 82 additions and 2 deletions

View File

@ -65,3 +65,5 @@ enlightenment_LDFLAGS = -export-dynamic @e_libs@ @dlopen_libs@
enlightenment_remote_SOURCES = \
e.h \
e_remote_main.c
enlightenment_remote_LDFLAGS = @e_libs@ @dlopen_libs@

View File

@ -8,7 +8,7 @@ struct _E_Before_Idler
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(int errorcode);
@ -37,7 +37,7 @@ E_Path *path_themes = NULL;
E_Path *path_init = NULL;
int restart = 0;
/* local subsystem functions */
/* local subsystem globals */
#define MAX_LEVEL 32
static void (*_e_main_shutdown_func[MAX_LEVEL]) (void);
static int _e_main_level = 0;

78
src/bin/e_remote_main.c Normal file
View File

@ -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;
}