ipc updates...

SVN revision: 4365
This commit is contained in:
Carsten Haitzler 2001-03-12 01:01:10 +00:00
parent 41cabbdf27
commit cf59a01878
1 changed files with 29 additions and 5 deletions

View File

@ -1,7 +1,16 @@
#include "e.h" #include "e.h"
struct _coords {
int xid;
int x;
int y;
};
typedef struct _coords coords;
void e_ipc_init(void); void e_ipc_init(void);
static char *e_ipc_get_version(char *argv); static void e_ipc_get_version(int fd);
static void e_ipc_move_window(int fd);
void void
e_ipc_init(void) e_ipc_init(void)
@ -16,11 +25,26 @@ e_ipc_init(void)
/* add ipc services or functions clients can use */ /* add ipc services or functions clients can use */
e_add_ipc_service(0, e_ipc_get_version); e_add_ipc_service(0, e_ipc_get_version);
e_add_ipc_service(1, e_ipc_move_window);
} }
static char static void
*e_ipc_get_version(char *argv) e_ipc_get_version(int fd)
{ {
printf("e_ipc_get_version service called\n"); fflush(stdout); e_ipc_send_data(fd, &VERSION, strlen(VERSION));
return "0.17.0"; }
static void
e_ipc_move_window(int fd)
{
coords test;
int retval = 0;
/* get window id and coords to move to */
e_ipc_get_data(fd, &test);
/* move window here */
/* return failure or success */
e_ipc_send_data(fd, &retval, sizeof(retval));
} }