summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/e_ipc.c26
-rw-r--r--src/bin/e_ipc_handlers.h84
-rw-r--r--src/bin/e_remote_main.c22
3 files changed, 82 insertions, 50 deletions
diff --git a/src/bin/e_ipc.c b/src/bin/e_ipc.c
index 869a92450..ce2b5528b 100644
--- a/src/bin/e_ipc.c
+++ b/src/bin/e_ipc.c
@@ -476,32 +476,6 @@ _e_ipc_cb_client_data(void *data __UNUSED__, int type __UNUSED__, void *event)
476 e_config->font_cache, 476 e_config->font_cache,
477 E_IPC_OP_FONT_CACHE_GET_REPLY); 477 E_IPC_OP_FONT_CACHE_GET_REPLY);
478 break; 478 break;
479 case E_IPC_OP_USE_EDGE_FLIP_SET:
480 if (e_ipc_codec_int_dec(e->data, e->size,
481 &(e_config->use_edge_flip)))
482 {
483 E_CONFIG_LIMIT(e_config->use_edge_flip, 0, 1);
484 e_config_save_queue();
485 }
486 break;
487 case E_IPC_OP_USE_EDGE_FLIP_GET:
488 _e_ipc_reply_int_send(e->client,
489 e_config->use_edge_flip,
490 E_IPC_OP_USE_EDGE_FLIP_GET_REPLY);
491 break;
492 case E_IPC_OP_EDGE_FLIP_TIMEOUT_SET:
493 if (e_ipc_codec_double_dec(e->data, e->size,
494 &(e_config->edge_flip_timeout)))
495 {
496 E_CONFIG_LIMIT(e_config->edge_flip_timeout, 0.0, 2.0);
497 e_config_save_queue();
498 }
499 break;
500 case E_IPC_OP_EDGE_FLIP_TIMEOUT_GET:
501 _e_ipc_reply_double_send(e->client,
502 e_config->edge_flip_timeout,
503 E_IPC_OP_EDGE_FLIP_TIMEOUT_GET_REPLY);
504 break;
505 case E_IPC_OP_DESKS_SET: 479 case E_IPC_OP_DESKS_SET:
506 if (e_ipc_codec_2int_dec(e->data, e->size, 480 if (e_ipc_codec_2int_dec(e->data, e->size,
507 &(e_config->zone_desks_x_count), 481 &(e_config->zone_desks_x_count),
diff --git a/src/bin/e_ipc_handlers.h b/src/bin/e_ipc_handlers.h
index 3eb200387..62bebf07e 100644
--- a/src/bin/e_ipc_handlers.h
+++ b/src/bin/e_ipc_handlers.h
@@ -91,8 +91,8 @@ case HDL: { void *data; int bytes;
91break; 91break;
92 92
93# define REQ_INT(__int, HDL) \ 93# define REQ_INT(__int, HDL) \
94 REQ_INT_START(__int, HDL) \ 94 REQ_INT_START(HDL) \
95 REQ_INT_END(HDL) 95 REQ_INT_END(__int, HDL)
96 96
97# define REQ_NULL(HDL) \ 97# define REQ_NULL(HDL) \
98case HDL: \ 98case HDL: \
@@ -769,6 +769,86 @@ break;
769#endif 769#endif
770#undef HDL 770#undef HDL
771 771
772/****************************************************************************/
773#define HDL E_IPC_OP_USE_EDGE_FLIP_SET
774#if (TYPE == E_REMOTE_OPTIONS)
775 OP("-edge-flip-set", 1, "Set the edge flip flag (0/1)", 0, HDL)
776#elif (TYPE == E_REMOTE_OUT)
777 REQ_INT(atoi(params[0]), HDL);
778#elif (TYPE == E_WM_IN)
779 START_INT(value, HDL);
780 e_config->use_edge_flip = value;
781 E_CONFIG_LIMIT(e_config->use_edge_flip, 0, 1);
782 SAVE;
783 END_INT;
784#elif (TYPE == E_REMOTE_IN)
785#endif
786#undef HDL
787
788/****************************************************************************/
789#define HDL E_IPC_OP_USE_EDGE_FLIP_GET
790#if (TYPE == E_REMOTE_OPTIONS)
791 OP("-edge-flip-get", 0, "Get the edge flip flag", 1, HDL)
792#elif (TYPE == E_REMOTE_OUT)
793 REQ_NULL(HDL)
794#elif (TYPE == E_WM_IN)
795 SEND_INT(e_config->use_edge_flip, E_IPC_OP_USE_EDGE_FLIP_GET_REPLY, HDL);
796#elif (TYPE == E_REMOTE_IN)
797#endif
798#undef HDL
799
800/****************************************************************************/
801#define HDL E_IPC_OP_USE_EDGE_FLIP_GET_REPLY
802#if (TYPE == E_REMOTE_OPTIONS)
803#elif (TYPE == E_REMOTE_OUT)
804#elif (TYPE == E_WM_IN)
805#elif (TYPE == E_REMOTE_IN)
806 START_INT(val, HDL)
807 printf("REPLY: %i\n", val);
808 END_INT;
809#endif
810#undef HDL
811
812/****************************************************************************/
813#define HDL E_IPC_OP_EDGE_FLIP_TIMEOUT_SET
814#if (TYPE == E_REMOTE_OPTIONS)
815 OP("-edge-flip-timeout-set", 1, "Set the edge flip timeout (sec)", 0, HDL)
816#elif (TYPE == E_REMOTE_OUT)
817 REQ_DOUBLE(atof(params[0]), HDL)
818#elif (TYPE == E_WM_IN)
819 START_DOUBLE(dbl, HDL);
820 e_config->edge_flip_timeout = dbl;
821 E_CONFIG_LIMIT(e_config->edge_flip_timeout, 0.0, 2.0);
822 SAVE;
823 END_DOUBLE;
824#elif (TYPE == E_REMOTE_IN)
825#endif
826#undef HDL
827
828/****************************************************************************/
829#define HDL E_IPC_OP_EDGE_FLIP_TIMEOUT_GET
830#if (TYPE == E_REMOTE_OPTIONS)
831 OP("-edge-flip-timeout-get", 0, "Get the edge flip timeout", 1, HDL)
832#elif (TYPE == E_REMOTE_OUT)
833 REQ_NULL(HDL)
834#elif (TYPE == E_WM_IN)
835 SEND_DOUBLE(e_config->edge_flip_timeout, E_IPC_OP_EDGE_FLIP_TIMEOUT_GET_REPLY, HDL);
836#elif (TYPE == E_REMOTE_IN)
837#endif
838#undef HDL
839
840/****************************************************************************/
841#define HDL E_IPC_OP_EDGE_FLIP_TIMEOUT_GET_REPLY
842#if (TYPE == E_REMOTE_OPTIONS)
843#elif (TYPE == E_REMOTE_OUT)
844#elif (TYPE == E_WM_IN)
845#elif (TYPE == E_REMOTE_IN)
846 START_DOUBLE(val, HDL)
847 printf("REPLY: %3.3f\n", val);
848 END_DOUBLE;
849#endif
850#undef HDL
851
772#if 0 852#if 0
773} 853}
774#endif 854#endif
diff --git a/src/bin/e_remote_main.c b/src/bin/e_remote_main.c
index 5fc8aa83f..c01b640a3 100644
--- a/src/bin/e_remote_main.c
+++ b/src/bin/e_remote_main.c
@@ -620,10 +620,6 @@ E_IPC_Opt_Handler handlers[] =
620 OREQ("-image-cache-get", "Get the image cache size", E_IPC_OP_IMAGE_CACHE_GET, 1), 620 OREQ("-image-cache-get", "Get the image cache size", E_IPC_OP_IMAGE_CACHE_GET, 1),
621 OINT("-font-cache-set", "Get the speculative font cache size (Kb)", E_IPC_OP_FONT_CACHE_SET, 0), 621 OINT("-font-cache-set", "Get the speculative font cache size (Kb)", E_IPC_OP_FONT_CACHE_SET, 0),
622 OREQ("-font-cache-get", "Set the font cache size", E_IPC_OP_FONT_CACHE_GET, 1), 622 OREQ("-font-cache-get", "Set the font cache size", E_IPC_OP_FONT_CACHE_GET, 1),
623 OINT("-edge-flip-set", "Set the edge flip flag (0/1)", E_IPC_OP_USE_EDGE_FLIP_SET, 0),
624 OREQ("-edge-flip-get", "Get the edge flip flag", E_IPC_OP_USE_EDGE_FLIP_GET, 1),
625 ODBL("-edge-flip_timeout-set", "Set the edge flip timeout (sec)", E_IPC_OP_EDGE_FLIP_TIMEOUT_SET, 0),
626 OREQ("-edge-flip_timeout-get", "Get the edge flip timeout", E_IPC_OP_EDGE_FLIP_TIMEOUT_GET, 1),
627 O2INT("-desks-set", "Set the number of virtual desktops (X x Y. OPT1 = X, OPT2 = Y)", E_IPC_OP_DESKS_SET, 0), 623 O2INT("-desks-set", "Set the number of virtual desktops (X x Y. OPT1 = X, OPT2 = Y)", E_IPC_OP_DESKS_SET, 0),
628 OREQ("-desks-get", "Get the number of virtual desktops", E_IPC_OP_DESKS_GET, 1), 624 OREQ("-desks-get", "Get the number of virtual desktops", E_IPC_OP_DESKS_GET, 1),
629}; 625};
@@ -1239,24 +1235,6 @@ _e_ipc_cb_server_data(void *data, int type, void *event)
1239 printf("REPLY: %i\n", val); 1235 printf("REPLY: %i\n", val);
1240 } 1236 }
1241 break; 1237 break;
1242 case E_IPC_OP_USE_EDGE_FLIP_GET_REPLY:
1243 if (e->data)
1244 {
1245 int val;
1246
1247 if (e_ipc_codec_int_dec(e->data, e->size, &val))
1248 printf("REPLY: %i\n", val);
1249 }
1250 break;
1251 case E_IPC_OP_EDGE_FLIP_TIMEOUT_GET_REPLY:
1252 if (e->data)
1253 {
1254 double val;
1255
1256 if (e_ipc_codec_double_dec(e->data, e->size, &val))
1257 printf("REPLY: %3.3f\n", val);
1258 }
1259 break;
1260 case E_IPC_OP_DESKS_GET_REPLY: 1238 case E_IPC_OP_DESKS_GET_REPLY:
1261 if (e->data) 1239 if (e->data)
1262 { 1240 {