forked from enlightenment/enlightenment
parent
47efbf19bd
commit
470bf9d36f
|
@ -344,47 +344,6 @@ _e_ipc_cb_client_data(void *data __UNUSED__, int type __UNUSED__, void *event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case E_IPC_OP_DESKS_SET:
|
|
||||||
if (e_ipc_codec_2int_dec(e->data, e->size,
|
|
||||||
&(e_config->zone_desks_x_count),
|
|
||||||
&(e_config->zone_desks_y_count)))
|
|
||||||
{
|
|
||||||
Evas_List *l;
|
|
||||||
|
|
||||||
E_CONFIG_LIMIT(e_config->zone_desks_x_count, 1, 64);
|
|
||||||
E_CONFIG_LIMIT(e_config->zone_desks_y_count, 1, 64);
|
|
||||||
for (l = e_manager_list(); l; l = l->next)
|
|
||||||
{
|
|
||||||
E_Manager *man;
|
|
||||||
Evas_List *l2;
|
|
||||||
|
|
||||||
man = l->data;
|
|
||||||
for (l2 = man->containers; l2; l2 = l2->next)
|
|
||||||
{
|
|
||||||
E_Container *con;
|
|
||||||
Evas_List *l3;
|
|
||||||
|
|
||||||
con = l2->data;
|
|
||||||
for (l3 = con->zones; l3; l3 = l3->next)
|
|
||||||
{
|
|
||||||
E_Zone *zone;
|
|
||||||
|
|
||||||
zone = l3->data;
|
|
||||||
e_zone_desk_count_set(zone,
|
|
||||||
e_config->zone_desks_x_count,
|
|
||||||
e_config->zone_desks_y_count);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
e_config_save_queue();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case E_IPC_OP_DESKS_GET:
|
|
||||||
_e_ipc_reply_2int_send(e->client,
|
|
||||||
e_config->zone_desks_x_count,
|
|
||||||
e_config->zone_desks_y_count,
|
|
||||||
E_IPC_OP_DESKS_GET_REPLY);
|
|
||||||
break;
|
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -63,6 +63,17 @@ if (e->data) { \
|
||||||
} \
|
} \
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
# define START_2INT(__int1, __int2, HDL) \
|
||||||
|
case HDL: \
|
||||||
|
if (e->data) { \
|
||||||
|
int __int1 = 0; \
|
||||||
|
int __int2 = 0; \
|
||||||
|
if (e_ipc_codec_2int_dec(e->data, e->size, &(__int1), &(__int2))) {
|
||||||
|
# define END_2INT \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
break;
|
||||||
|
|
||||||
# define RESPONSE(__res, __store, HDL) \
|
# define RESPONSE(__res, __store, HDL) \
|
||||||
__store *__res = calloc(1, sizeof(__store)); \
|
__store *__res = calloc(1, sizeof(__store)); \
|
||||||
if (e->data) {
|
if (e->data) {
|
||||||
|
@ -118,6 +129,16 @@ break;
|
||||||
REQ_INT_START(HDL) \
|
REQ_INT_START(HDL) \
|
||||||
REQ_INT_END(__int, HDL)
|
REQ_INT_END(__int, HDL)
|
||||||
|
|
||||||
|
# define REQ_2INT(__int1, __int2, HDL) \
|
||||||
|
case HDL: { void *data; int bytes; \
|
||||||
|
data = e_ipc_codec_2int_enc(__int1, __int2, &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) \
|
# define REQ_NULL(HDL) \
|
||||||
case HDL: \
|
case HDL: \
|
||||||
ecore_ipc_server_send(e->server, E_IPC_DOMAIN_REQUEST, HDL, 0, 0, 0, NULL, 0); \
|
ecore_ipc_server_send(e->server, E_IPC_DOMAIN_REQUEST, HDL, 0, 0, 0, NULL, 0); \
|
||||||
|
@ -198,6 +219,16 @@ case HDL: { void *data; int bytes; \
|
||||||
} \
|
} \
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
# define SEND_2INT(__int1, __int2,__op, HDL) \
|
||||||
|
case HDL: { void *data; int bytes; \
|
||||||
|
data = e_ipc_codec_2int_enc(__int1, __int2, &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() \
|
#define LIST_DATA() \
|
||||||
Evas_List *dat = NULL, *l; \
|
Evas_List *dat = NULL, *l; \
|
||||||
void *data; int bytes;
|
void *data; int bytes;
|
||||||
|
@ -1314,6 +1345,71 @@ break;
|
||||||
#endif
|
#endif
|
||||||
#undef HDL
|
#undef HDL
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
#define HDL E_IPC_OP_DESKS_SET
|
||||||
|
#if (TYPE == E_REMOTE_OPTIONS)
|
||||||
|
OP("-desks-set", 1, "Set the number of virtual desktops (X x Y. OPT1 = X, OPT2 = Y)", 0, HDL)
|
||||||
|
#elif (TYPE == E_REMOTE_OUT)
|
||||||
|
REQ_2INT(atoi(params[0]), atoi(params[1]), HDL);
|
||||||
|
#elif (TYPE == E_WM_IN)
|
||||||
|
START_2INT(val1, val2, HDL);
|
||||||
|
e_config->zone_desks_x_count = val1;
|
||||||
|
e_config->zone_desks_y_count = val2;
|
||||||
|
E_CONFIG_LIMIT(e_config->zone_desks_x_count, 1, 64)
|
||||||
|
E_CONFIG_LIMIT(e_config->zone_desks_y_count, 1, 64)
|
||||||
|
{
|
||||||
|
Evas_List *l;
|
||||||
|
for (l = e_manager_list(); l; l = l->next)
|
||||||
|
{
|
||||||
|
E_Manager *man;
|
||||||
|
Evas_List *l2;
|
||||||
|
man = l->data;
|
||||||
|
for (l2 = man->containers; l2; l2 = l2->next)
|
||||||
|
{
|
||||||
|
E_Container *con;
|
||||||
|
Evas_List *l3;
|
||||||
|
con = l2->data;
|
||||||
|
for (l3 = con->zones; l3; l3 = l3->next)
|
||||||
|
{
|
||||||
|
E_Zone *zone;
|
||||||
|
zone = l3->data;
|
||||||
|
e_zone_desk_count_set(zone,
|
||||||
|
e_config->zone_desks_x_count,
|
||||||
|
e_config->zone_desks_y_count);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SAVE;
|
||||||
|
END_2INT;
|
||||||
|
#elif (TYPE == E_REMOTE_IN)
|
||||||
|
#endif
|
||||||
|
#undef HDL
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
#define HDL E_IPC_OP_DESKS_GET
|
||||||
|
#if (TYPE == E_REMOTE_OPTIONS)
|
||||||
|
OP("-desks-get", 0, "Get the number of virtual desktops", 1, HDL)
|
||||||
|
#elif (TYPE == E_REMOTE_OUT)
|
||||||
|
REQ_NULL(HDL)
|
||||||
|
#elif (TYPE == E_WM_IN)
|
||||||
|
SEND_2INT(e_config->zone_desks_x_count, e_config->zone_desks_y_count, E_IPC_OP_DESKS_GET_REPLY, HDL);
|
||||||
|
#elif (TYPE == E_REMOTE_IN)
|
||||||
|
#endif
|
||||||
|
#undef HDL
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
#define HDL E_IPC_OP_DESKS_GET_REPLY
|
||||||
|
#if (TYPE == E_REMOTE_OPTIONS)
|
||||||
|
#elif (TYPE == E_REMOTE_OUT)
|
||||||
|
#elif (TYPE == E_WM_IN)
|
||||||
|
#elif (TYPE == E_REMOTE_IN)
|
||||||
|
START_2INT(val1, val2, HDL)
|
||||||
|
printf("REPLY: %i %i\n", val1, val2);
|
||||||
|
END_2INT;
|
||||||
|
#endif
|
||||||
|
#undef HDL
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -580,8 +580,6 @@ E_IPC_Opt_Handler handlers[] =
|
||||||
OREQ("-binding-key-list", "List all key bindings", E_IPC_OP_BINDING_KEY_LIST, 1),
|
OREQ("-binding-key-list", "List all key bindings", E_IPC_OP_BINDING_KEY_LIST, 1),
|
||||||
OFNC("-binding-key-add", "Add an existing key binding. OPT1 = Context, OPT2 = key, OPT3 = modifiers, OPT4 = any modifier ok, OPT5 = action, OPT6 = action parameters", 6, _e_opt_binding_key_add, 0),
|
OFNC("-binding-key-add", "Add an existing key binding. OPT1 = Context, OPT2 = key, OPT3 = modifiers, OPT4 = any modifier ok, OPT5 = action, OPT6 = action parameters", 6, _e_opt_binding_key_add, 0),
|
||||||
OFNC("-binding-key-del", "Delete an existing key binding. OPT1 = Context, OPT2 = key, OPT3 = modifiers, OPT4 = any modifier ok, OPT5 = action, OPT6 = action parameters", 6, _e_opt_binding_key_del, 0),
|
OFNC("-binding-key-del", "Delete an existing key binding. OPT1 = Context, OPT2 = key, OPT3 = modifiers, OPT4 = any modifier ok, OPT5 = action, OPT6 = action parameters", 6, _e_opt_binding_key_del, 0),
|
||||||
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),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* externally accessible functions */
|
/* externally accessible functions */
|
||||||
|
@ -962,16 +960,6 @@ _e_ipc_cb_server_data(void *data, int type, void *event)
|
||||||
else
|
else
|
||||||
printf("REPLY: AVAILABLE NONE\n");
|
printf("REPLY: AVAILABLE NONE\n");
|
||||||
break;
|
break;
|
||||||
case E_IPC_OP_DESKS_GET_REPLY:
|
|
||||||
if (e->data)
|
|
||||||
{
|
|
||||||
int val1;
|
|
||||||
int val2;
|
|
||||||
|
|
||||||
if (e_ipc_codec_2int_dec(e->data, e->size, &val1, &val2))
|
|
||||||
printf("REPLY: %i %i\n", val1, val2);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue