add -font-cache-get/set and -image-cache-set/get back into ipc

SVN revision: 15124
This commit is contained in:
Dan Sinclair 2005-06-04 19:25:34 +00:00 committed by Dan Sinclair
parent b51a0d0024
commit 48da4edd29
3 changed files with 79 additions and 48 deletions

View File

@ -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),

View File

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

View File

@ -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)
{