From 48da4edd293ea6f5b4c242b640bd8d5807a4efd3 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Sat, 4 Jun 2005 19:25:34 +0000 Subject: [PATCH] add -font-cache-get/set and -image-cache-set/get back into ipc SVN revision: 15124 --- src/bin/e_ipc.c | 26 ------------- src/bin/e_ipc_handlers.h | 79 ++++++++++++++++++++++++++++++++++++++++ src/bin/e_remote_main.c | 22 ----------- 3 files changed, 79 insertions(+), 48 deletions(-) diff --git a/src/bin/e_ipc.c b/src/bin/e_ipc.c index ce2b5528b..5619c3ab4 100644 --- a/src/bin/e_ipc.c +++ b/src/bin/e_ipc.c @@ -450,32 +450,6 @@ _e_ipc_cb_client_data(void *data __UNUSED__, int type __UNUSED__, void *event) e_config->border_shade_speed, E_IPC_OP_BORDER_SHADE_SPEED_GET_REPLY); break; - case E_IPC_OP_IMAGE_CACHE_SET: - if (e_ipc_codec_int_dec(e->data, e->size, - &(e_config->image_cache))) - { - E_CONFIG_LIMIT(e_config->image_cache, 0, 256 * 1024); - e_config_save_queue(); - } - break; - case E_IPC_OP_IMAGE_CACHE_GET: - _e_ipc_reply_int_send(e->client, - e_config->image_cache, - E_IPC_OP_IMAGE_CACHE_GET_REPLY); - break; - case E_IPC_OP_FONT_CACHE_SET: - if (e_ipc_codec_int_dec(e->data, e->size, - &(e_config->font_cache))) - { - E_CONFIG_LIMIT(e_config->font_cache, 0, 32 * 1024); - e_config_save_queue(); - } - break; - case E_IPC_OP_FONT_CACHE_GET: - _e_ipc_reply_int_send(e->client, - e_config->font_cache, - E_IPC_OP_FONT_CACHE_GET_REPLY); - break; case E_IPC_OP_DESKS_SET: if (e_ipc_codec_2int_dec(e->data, e->size, &(e_config->zone_desks_x_count), diff --git a/src/bin/e_ipc_handlers.h b/src/bin/e_ipc_handlers.h index 62bebf07e..cbcd430b4 100644 --- a/src/bin/e_ipc_handlers.h +++ b/src/bin/e_ipc_handlers.h @@ -849,6 +849,85 @@ break; #endif #undef HDL +/****************************************************************************/ +#define HDL E_IPC_OP_FONT_CACHE_SET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-font-cache-set", 1, "Set the font cache size (Kb)", 0, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_INT(atoi(params[0]), HDL) +#elif (TYPE == E_WM_IN) + START_INT(val, HDL); + e_config->font_cache = val; + E_CONFIG_LIMIT(e_config->font_cache, 0, 32 * 1024); + SAVE; + END_INT; +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_FONT_CACHE_GET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-font-cache-get", 0, "Get the speculative font cache size (Kb)", 1, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_NULL(HDL) +#elif (TYPE == E_WM_IN) + SEND_INT(e_config->font_cache, E_IPC_OP_FONT_CACHE_GET_REPLY, HDL); +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_FONT_CACHE_GET_REPLY +#if (TYPE == E_REMOTE_OPTIONS) +#elif (TYPE == E_REMOTE_OUT) +#elif (TYPE == E_WM_IN) +#elif (TYPE == E_REMOTE_IN) + START_INT(val, HDL) + printf("REPLY: %i\n", val); + END_INT; +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_IMAGE_CACHE_SET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-image-cache-set", 1, "Set the image cache size (Kb)", 0, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_INT(atoi(params[0]), HDL) +#elif (TYPE == E_WM_IN) + START_INT(val, HDL); + e_config->image_cache = val; + E_CONFIG_LIMIT(e_config->image_cache, 0, 256 * 1024); + SAVE; + END_INT; +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_IMAGE_CACHE_GET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-image-cache-get", 0, "Get the speculative image cache size (Kb)", 1, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_NULL(HDL) +#elif (TYPE == E_WM_IN) + SEND_INT(e_config->image_cache, E_IPC_OP_IMAGE_CACHE_GET_REPLY, HDL); +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_IMAGE_CACHE_GET_REPLY +#if (TYPE == E_REMOTE_OPTIONS) +#elif (TYPE == E_REMOTE_OUT) +#elif (TYPE == E_WM_IN) +#elif (TYPE == E_REMOTE_IN) + START_INT(val, HDL) + printf("REPLY: %i\n", val); + END_INT; +#endif +#undef HDL #if 0 } #endif diff --git a/src/bin/e_remote_main.c b/src/bin/e_remote_main.c index c01b640a3..627c56e50 100644 --- a/src/bin/e_remote_main.c +++ b/src/bin/e_remote_main.c @@ -616,10 +616,6 @@ E_IPC_Opt_Handler handlers[] = OREQ("-border-shade-transition-get", "Get the above value", E_IPC_OP_BORDER_SHADE_TRANSITION_GET, 1), ODBL("-border-shade-speed-set", "Set the shading speed (pixels/sec)", E_IPC_OP_BORDER_SHADE_SPEED_SET, 0), OREQ("-border-shade-speed-get", "Get the shading speed", E_IPC_OP_BORDER_SHADE_SPEED_GET, 1), - OINT("-image-cache-set", "Set the speculative image cache size (Kb)", E_IPC_OP_IMAGE_CACHE_SET, 0), - OREQ("-image-cache-get", "Get the image cache size", E_IPC_OP_IMAGE_CACHE_GET, 1), - OINT("-font-cache-set", "Get the speculative font cache size (Kb)", E_IPC_OP_FONT_CACHE_SET, 0), - OREQ("-font-cache-get", "Set the font cache size", E_IPC_OP_FONT_CACHE_GET, 1), O2INT("-desks-set", "Set the number of virtual desktops (X x Y. OPT1 = X, OPT2 = Y)", E_IPC_OP_DESKS_SET, 0), OREQ("-desks-get", "Get the number of virtual desktops", E_IPC_OP_DESKS_GET, 1), }; @@ -1217,24 +1213,6 @@ _e_ipc_cb_server_data(void *data, int type, void *event) printf("REPLY: %3.3f\n", val); } break; - case E_IPC_OP_IMAGE_CACHE_GET_REPLY: - if (e->data) - { - int val; - - if (e_ipc_codec_int_dec(e->data, e->size, &val)) - printf("REPLY: %i\n", val); - } - break; - case E_IPC_OP_FONT_CACHE_GET_REPLY: - if (e->data) - { - int val; - - if (e_ipc_codec_int_dec(e->data, e->size, &val)) - printf("REPLY: %i\n", val); - } - break; case E_IPC_OP_DESKS_GET_REPLY: if (e->data) {