summaryrefslogtreecommitdiff
path: root/src/bin/e_ipc.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2005-05-03 16:27:46 +0000
committerCarsten Haitzler <raster@rasterman.com>2005-05-03 16:27:46 +0000
commitefa853f59eb4be9859fcb5b034d17bed31942fab (patch)
treecd85e9bdf2f9a1fc3a82012951ea42787701ae32 /src/bin/e_ipc.c
parent476c8f543a0caf3fb8a435d7daec5d00f2e13850 (diff)
some ipc is in to handle key and mouse bindings. right now you can just list
them (so now you know what the defaults are!) :) need to add add/del handling on both the e and e_remote sides. SVN revision: 14578
Diffstat (limited to 'src/bin/e_ipc.c')
-rw-r--r--src/bin/e_ipc.c97
1 files changed, 96 insertions, 1 deletions
diff --git a/src/bin/e_ipc.c b/src/bin/e_ipc.c
index c0279d9..f78ae0e 100644
--- a/src/bin/e_ipc.c
+++ b/src/bin/e_ipc.c
@@ -15,6 +15,8 @@ ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_font_available_list_enc);
15ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_font_fallback_list_enc); 15ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_font_fallback_list_enc);
16ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_font_default_list_enc); 16ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_font_default_list_enc);
17ECORE_IPC_ENC_STRUCT_PROTO(_e_ipc_font_default_enc); 17ECORE_IPC_ENC_STRUCT_PROTO(_e_ipc_font_default_enc);
18ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_mouse_binding_enc);
19ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_key_binding_enc);
18 20
19/* local subsystem globals */ 21/* local subsystem globals */
20static Ecore_Ipc_Server *_e_ipc_server = NULL; 22static Ecore_Ipc_Server *_e_ipc_server = NULL;
@@ -447,6 +449,54 @@ _e_ipc_cb_client_data(void *data __UNUSED__, int type __UNUSED__, void *event)
447 free(data); 449 free(data);
448 } 450 }
449 break; 451 break;
452 case E_IPC_OP_BINDING_MOUSE_LIST:
453 {
454 Evas_List *bindings;
455 int bytes;
456 char *data;
457
458 bindings = e_config->mouse_bindings;
459 data = _e_ipc_mouse_binding_enc(bindings, &bytes);
460 ecore_ipc_client_send(e->client,
461 E_IPC_DOMAIN_REPLY,
462 E_IPC_OP_BINDING_MOUSE_LIST_REPLY,
463 0/*ref*/, 0/*ref_to*/, 0/*response*/,
464 data, bytes);
465 free(data);
466 }
467 break;
468 case E_IPC_OP_BINDING_MOUSE_ADD:
469 {
470 }
471 break;
472 case E_IPC_OP_BINDING_MOUSE_DEL:
473 {
474 }
475 break;
476 case E_IPC_OP_BINDING_KEY_LIST:
477 {
478 Evas_List *bindings;
479 int bytes;
480 char *data;
481
482 bindings = e_config->key_bindings;
483 data = _e_ipc_key_binding_enc(bindings, &bytes);
484 ecore_ipc_client_send(e->client,
485 E_IPC_DOMAIN_REPLY,
486 E_IPC_OP_BINDING_KEY_LIST_REPLY,
487 0/*ref*/, 0/*ref_to*/, 0/*response*/,
488 data, bytes);
489 free(data);
490 }
491 break;
492 case E_IPC_OP_BINDING_KEY_ADD:
493 {
494 }
495 break;
496 case E_IPC_OP_BINDING_KEY_DEL:
497 {
498 }
499 break;
450 default: 500 default:
451 break; 501 break;
452 } 502 }
@@ -625,9 +675,54 @@ ECORE_IPC_ENC_STRUCT_PROTO(_e_ipc_font_default_enc)
625 ECORE_IPC_ENC_STRUCT_HEAD(E_Font_Default, 675 ECORE_IPC_ENC_STRUCT_HEAD(E_Font_Default,
626 ECORE_IPC_SLEN(l1, text_class) + 676 ECORE_IPC_SLEN(l1, text_class) +
627 ECORE_IPC_SLEN(l2, font) + 677 ECORE_IPC_SLEN(l2, font) +
628 4); 678 4);
629 ECORE_IPC_PUTS(text_class, l1); 679 ECORE_IPC_PUTS(text_class, l1);
630 ECORE_IPC_PUTS(font, l2); 680 ECORE_IPC_PUTS(font, l2);
631 ECORE_IPC_PUT32(size); 681 ECORE_IPC_PUT32(size);
632 ECORE_IPC_ENC_STRUCT_FOOT(); 682 ECORE_IPC_ENC_STRUCT_FOOT();
633} 683}
684
685ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_mouse_binding_enc)
686{
687 ECORE_IPC_ENC_EVAS_LIST_HEAD_START(E_Config_Binding_Mouse);
688 ECORE_IPC_CNT32();
689 ECORE_IPC_CNT32();
690 ECORE_IPC_CNTS(action);
691 ECORE_IPC_CNTS(params);
692 ECORE_IPC_CNT8();
693 ECORE_IPC_CNT8();
694 ECORE_IPC_ENC_EVAS_LIST_HEAD_FINISH();
695 int l1, l2;
696 ECORE_IPC_PUT32(context);
697 ECORE_IPC_PUT32(modifiers);
698 ECORE_IPC_SLEN(l1, action);
699 ECORE_IPC_SLEN(l2, params);
700 ECORE_IPC_PUTS(action, l1);
701 ECORE_IPC_PUTS(params, l2);
702 ECORE_IPC_PUT8(button);
703 ECORE_IPC_PUT8(any_mod);
704 ECORE_IPC_ENC_EVAS_LIST_FOOT();
705}
706
707ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_key_binding_enc)
708{
709 ECORE_IPC_ENC_EVAS_LIST_HEAD_START(E_Config_Binding_Key);
710 ECORE_IPC_CNT32();
711 ECORE_IPC_CNT32();
712 ECORE_IPC_CNTS(key);
713 ECORE_IPC_CNTS(action);
714 ECORE_IPC_CNTS(params);
715 ECORE_IPC_CNT8();
716 ECORE_IPC_ENC_EVAS_LIST_HEAD_FINISH();
717 int l1, l2, l3;
718 ECORE_IPC_PUT32(context);
719 ECORE_IPC_PUT32(modifiers);
720 ECORE_IPC_SLEN(l1, key);
721 ECORE_IPC_SLEN(l2, action);
722 ECORE_IPC_SLEN(l3, params);
723 ECORE_IPC_PUTS(key, l1);
724 ECORE_IPC_PUTS(action, l2);
725 ECORE_IPC_PUTS(params, l3);
726 ECORE_IPC_PUT8(any_mod);
727 ECORE_IPC_ENC_EVAS_LIST_FOOT();
728}