Enlightenment CVS committal Author : dj2 Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_ipc_handlers.h Log Message: - add -framerate-get and -framerate-set back into enlightenment_remote NOTE I named the macro START_DOUBLE because e_config.h already has a define for DOUBLE =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_ipc_handlers.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -3 -r1.20 -r1.21 --- e_ipc_handlers.h 3 Jun 2005 17:45:20 -0000 1.20 +++ e_ipc_handlers.h 3 Jun 2005 18:05:55 -0000 1.21 @@ -1,3 +1,6 @@ +/* + * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 + */ /* NOTE: * * This is a very SPECIAL file. This servers as a kind of "auto code generator" @@ -25,6 +28,17 @@ } \ break; + +# define START_DOUBLE(__dbl, HDL) \ +case HDL: \ +if (e->data) { \ + double __dbl = 0.0; \ + if (e_ipc_codec_double_dec(e->data, e->size, &(__dbl))) { +# define END_DOUBLE() \ + } \ +} \ +break; + # define RESPONSE(__res, __store, HDL) \ __store *__res = calloc(1, sizeof(__store)); \ if (e->data) { @@ -44,6 +58,16 @@ } \ break; +#define REQ_DOUBLE(__dbl, HDL) \ +case HDL: { void *data; int bytes; \ + data = e_ipc_codec_double_enc(__dbl, &bytes); \ + if (data) { \ + ecore_ipc_server_send(e->server, E_IPC_DOMAIN_REQUEST, HDL, 0, 0, 0, data, bytes); \ + free(data); \ + } \ +} \ +break; + # define REQ_NULL(HDL) \ case HDL: \ ecore_ipc_server_send(e->server, E_IPC_DOMAIN_REQUEST, HDL, 0, 0, 0, NULL, 0); \ @@ -104,6 +128,16 @@ } \ break; +#define SEND_DOUBLE(__dbl, __op, HDL) \ +case HDL: { void *data; int bytes; \ + data = e_ipc_codec_double_enc(__dbl, &bytes); \ + if (data) { \ + ecore_ipc_client_send(e->client, E_IPC_DOMAIN_REPLY, __op, 0, 0, 0, data, bytes); \ + free(data); \ + } \ +} \ +break; + #define LIST_DATA() \ Evas_List *dat = NULL, *l; \ void *data; int bytes; @@ -565,8 +599,45 @@ #undef HDL +/****************************************************************************/ +#define HDL E_IPC_OP_FRAMERATE_SET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-framerate-set", 1, "Get the animation framerate (fps)", 0, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_DOUBLE(atof(params[0]), HDL); +#elif (TYPE == E_WM_IN) + double dbl; + START_DOUBLE(dbl, HDL); + e_config->framerate = dbl; + e_config_save_queue(); + END_DOUBLE(); +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL +/****************************************************************************/ +#define HDL E_IPC_OP_FRAMERATE_GET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-framerate-get", 0, "Get the animation framerate (fps)", 1, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_NULL(HDL); +#elif (TYPE == E_WM_IN) + SEND_DOUBLE(e_config->framerate, E_IPC_OP_FRAMERATE_GET_REPLY, HDL); +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL +/****************************************************************************/ +#define HDL E_IPC_OP_FRAMERATE_GET_REPLY +#if (TYPE == E_REMOTE_OPTIONS) +#elif (TYPE == E_REMOTE_OUT) +#elif (TYPE == E_WM_IN) +#elif (TYPE == E_REMOTE_IN) + START_DOUBLE(fps, HDL); + printf("REPLY: %3.3f\n", fps); + END_DOUBLE(); +#endif +#undef HDL #if 0 } ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs