summaryrefslogtreecommitdiff
path: root/src/bin/e_ipc.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2005-05-04 04:50:33 +0000
committerCarsten Haitzler <raster@rasterman.com>2005-05-04 04:50:33 +0000
commit72d02e9a1b14df2e0a678df4b3794c4eb4d44bae (patch)
treef9aff23028f0397e0ba3153470f1668851123dce /src/bin/e_ipc.c
parent98058a97e1b746f9c1775040e05c761d36639de4 (diff)
more work on protol codecs. have to hook in add/del for key and mouse bindings.
SVN revision: 14590
Diffstat (limited to 'src/bin/e_ipc.c')
-rw-r--r--src/bin/e_ipc.c237
1 files changed, 156 insertions, 81 deletions
diff --git a/src/bin/e_ipc.c b/src/bin/e_ipc.c
index f78ae0e..7f57c24 100644
--- a/src/bin/e_ipc.c
+++ b/src/bin/e_ipc.c
@@ -15,8 +15,12 @@ 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); 18ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_mouse_binding_list_enc);
19ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_key_binding_enc); 19ECORE_IPC_ENC_STRUCT_PROTO(_e_ipc_mouse_binding_enc);
20ECORE_IPC_DEC_STRUCT_PROTO(_e_ipc_mouse_binding_dec);
21ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_key_binding_list_enc);
22ECORE_IPC_ENC_STRUCT_PROTO(_e_ipc_key_binding_enc);
23ECORE_IPC_DEC_STRUCT_PROTO(_e_ipc_key_binding_dec);
20 24
21/* local subsystem globals */ 25/* local subsystem globals */
22static Ecore_Ipc_Server *_e_ipc_server = NULL; 26static Ecore_Ipc_Server *_e_ipc_server = NULL;
@@ -456,7 +460,7 @@ _e_ipc_cb_client_data(void *data __UNUSED__, int type __UNUSED__, void *event)
456 char *data; 460 char *data;
457 461
458 bindings = e_config->mouse_bindings; 462 bindings = e_config->mouse_bindings;
459 data = _e_ipc_mouse_binding_enc(bindings, &bytes); 463 data = _e_ipc_mouse_binding_list_enc(bindings, &bytes);
460 ecore_ipc_client_send(e->client, 464 ecore_ipc_client_send(e->client,
461 E_IPC_DOMAIN_REPLY, 465 E_IPC_DOMAIN_REPLY,
462 E_IPC_OP_BINDING_MOUSE_LIST_REPLY, 466 E_IPC_OP_BINDING_MOUSE_LIST_REPLY,
@@ -480,7 +484,7 @@ _e_ipc_cb_client_data(void *data __UNUSED__, int type __UNUSED__, void *event)
480 char *data; 484 char *data;
481 485
482 bindings = e_config->key_bindings; 486 bindings = e_config->key_bindings;
483 data = _e_ipc_key_binding_enc(bindings, &bytes); 487 data = _e_ipc_key_binding_list_enc(bindings, &bytes);
484 ecore_ipc_client_send(e->client, 488 ecore_ipc_client_send(e->client,
485 E_IPC_DOMAIN_REPLY, 489 E_IPC_DOMAIN_REPLY,
486 E_IPC_OP_BINDING_KEY_LIST_REPLY, 490 E_IPC_OP_BINDING_KEY_LIST_REPLY,
@@ -620,109 +624,180 @@ _e_ipc_multi_str_dec(char *data, int bytes, int str_count)
620/* list/struct encoding functions */ 624/* list/struct encoding functions */
621ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_module_list_enc) 625ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_module_list_enc)
622{ 626{
623 ECORE_IPC_ENC_EVAS_LIST_HEAD_START(E_Module); 627 ECORE_IPC_ENC_EVAS_LIST_HEAD_START(E_Module);
624 ECORE_IPC_CNTS(name); 628 ECORE_IPC_CNTS(name);
625 ECORE_IPC_CNT8(); 629 ECORE_IPC_CNT8();
626 ECORE_IPC_ENC_EVAS_LIST_HEAD_FINISH(); 630 ECORE_IPC_ENC_EVAS_LIST_HEAD_FINISH();
627 int l1; 631 int l1;
628 ECORE_IPC_SLEN(l1, name); 632 ECORE_IPC_SLEN(l1, name);
629 ECORE_IPC_PUTS(name, l1); 633 ECORE_IPC_PUTS(name, l1);
630 ECORE_IPC_PUT8(enabled); 634 ECORE_IPC_PUT8(enabled);
631 ECORE_IPC_ENC_EVAS_LIST_FOOT(); 635 ECORE_IPC_ENC_EVAS_LIST_FOOT();
632} 636}
633 637
634ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_font_available_list_enc) 638ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_font_available_list_enc)
635{ 639{
636 ECORE_IPC_ENC_EVAS_LIST_HEAD_START(E_Font_Available); 640 ECORE_IPC_ENC_EVAS_LIST_HEAD_START(E_Font_Available);
637 ECORE_IPC_CNTS(name); 641 ECORE_IPC_CNTS(name);
638 ECORE_IPC_ENC_EVAS_LIST_HEAD_FINISH(); 642 ECORE_IPC_ENC_EVAS_LIST_HEAD_FINISH();
639 int l1; 643 int l1;
640 ECORE_IPC_SLEN(l1, name); 644 ECORE_IPC_SLEN(l1, name);
641 ECORE_IPC_PUTS(name, l1); 645 ECORE_IPC_PUTS(name, l1);
642 ECORE_IPC_ENC_EVAS_LIST_FOOT(); 646 ECORE_IPC_ENC_EVAS_LIST_FOOT();
643} 647}
644 648
645ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_font_fallback_list_enc) 649ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_font_fallback_list_enc)
646{ 650{
647 ECORE_IPC_ENC_EVAS_LIST_HEAD_START(E_Font_Fallback); 651 ECORE_IPC_ENC_EVAS_LIST_HEAD_START(E_Font_Fallback);
648 ECORE_IPC_CNTS(name); 652 ECORE_IPC_CNTS(name);
649 ECORE_IPC_ENC_EVAS_LIST_HEAD_FINISH(); 653 ECORE_IPC_ENC_EVAS_LIST_HEAD_FINISH();
650 int l1; 654 int l1;
651 ECORE_IPC_SLEN(l1, name); 655 ECORE_IPC_SLEN(l1, name);
652 ECORE_IPC_PUTS(name, l1); 656 ECORE_IPC_PUTS(name, l1);
653 ECORE_IPC_ENC_EVAS_LIST_FOOT(); 657 ECORE_IPC_ENC_EVAS_LIST_FOOT();
654} 658}
655 659
656ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_font_default_list_enc) 660ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_font_default_list_enc)
657{ 661{
658 ECORE_IPC_ENC_EVAS_LIST_HEAD_START(E_Font_Default); 662 ECORE_IPC_ENC_EVAS_LIST_HEAD_START(E_Font_Default);
659 ECORE_IPC_CNTS(text_class); 663 ECORE_IPC_CNTS(text_class);
660 ECORE_IPC_CNTS(font); 664 ECORE_IPC_CNTS(font);
661 ECORE_IPC_CNT32(); 665 ECORE_IPC_CNT32();
662 ECORE_IPC_ENC_EVAS_LIST_HEAD_FINISH(); 666 ECORE_IPC_ENC_EVAS_LIST_HEAD_FINISH();
663 int l1, l2; 667 int l1, l2;
664 ECORE_IPC_SLEN(l1, text_class); 668 ECORE_IPC_SLEN(l1, text_class);
665 ECORE_IPC_SLEN(l2, font); 669 ECORE_IPC_SLEN(l2, font);
666 ECORE_IPC_PUTS(text_class, l1); 670 ECORE_IPC_PUTS(text_class, l1);
667 ECORE_IPC_PUTS(font, l2); 671 ECORE_IPC_PUTS(font, l2);
668 ECORE_IPC_PUT32(size); 672 ECORE_IPC_PUT32(size);
669 ECORE_IPC_ENC_EVAS_LIST_FOOT(); 673 ECORE_IPC_ENC_EVAS_LIST_FOOT();
670} 674}
671 675
672ECORE_IPC_ENC_STRUCT_PROTO(_e_ipc_font_default_enc) 676ECORE_IPC_ENC_STRUCT_PROTO(_e_ipc_font_default_enc)
673{ 677{
674 int l1, l2; 678 int l1, l2;
675 ECORE_IPC_ENC_STRUCT_HEAD(E_Font_Default, 679 ECORE_IPC_ENC_STRUCT_HEAD(E_Font_Default,
676 ECORE_IPC_SLEN(l1, text_class) + 680 ECORE_IPC_SLEN(l1, text_class) +
677 ECORE_IPC_SLEN(l2, font) + 681 ECORE_IPC_SLEN(l2, font) +
678 4); 682 4);
679 ECORE_IPC_PUTS(text_class, l1); 683 ECORE_IPC_PUTS(text_class, l1);
680 ECORE_IPC_PUTS(font, l2); 684 ECORE_IPC_PUTS(font, l2);
681 ECORE_IPC_PUT32(size); 685 ECORE_IPC_PUT32(size);
682 ECORE_IPC_ENC_STRUCT_FOOT(); 686 ECORE_IPC_ENC_STRUCT_FOOT();
683} 687}
684 688
685ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_mouse_binding_enc) 689ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_mouse_binding_list_enc)
686{ 690{
687 ECORE_IPC_ENC_EVAS_LIST_HEAD_START(E_Config_Binding_Mouse); 691 ECORE_IPC_ENC_EVAS_LIST_HEAD_START(E_Config_Binding_Mouse);
688 ECORE_IPC_CNT32(); 692 ECORE_IPC_CNT32();
689 ECORE_IPC_CNT32(); 693 ECORE_IPC_CNT32();
690 ECORE_IPC_CNTS(action); 694 ECORE_IPC_CNTS(action);
691 ECORE_IPC_CNTS(params); 695 ECORE_IPC_CNTS(params);
692 ECORE_IPC_CNT8(); 696 ECORE_IPC_CNT8();
693 ECORE_IPC_CNT8(); 697 ECORE_IPC_CNT8();
694 ECORE_IPC_ENC_EVAS_LIST_HEAD_FINISH(); 698 ECORE_IPC_ENC_EVAS_LIST_HEAD_FINISH();
695 int l1, l2; 699 int l1, l2;
696 ECORE_IPC_PUT32(context); 700 ECORE_IPC_PUT32(context);
697 ECORE_IPC_PUT32(modifiers); 701 ECORE_IPC_PUT32(modifiers);
698 ECORE_IPC_SLEN(l1, action); 702 ECORE_IPC_SLEN(l1, action);
699 ECORE_IPC_SLEN(l2, params); 703 ECORE_IPC_SLEN(l2, params);
700 ECORE_IPC_PUTS(action, l1); 704 ECORE_IPC_PUTS(action, l1);
701 ECORE_IPC_PUTS(params, l2); 705 ECORE_IPC_PUTS(params, l2);
702 ECORE_IPC_PUT8(button); 706 ECORE_IPC_PUT8(button);
703 ECORE_IPC_PUT8(any_mod); 707 ECORE_IPC_PUT8(any_mod);
704 ECORE_IPC_ENC_EVAS_LIST_FOOT(); 708 ECORE_IPC_ENC_EVAS_LIST_FOOT();
705} 709}
706 710
707ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_key_binding_enc) 711ECORE_IPC_ENC_STRUCT_PROTO(_e_ipc_mouse_binding_enc)
708{ 712{
709 ECORE_IPC_ENC_EVAS_LIST_HEAD_START(E_Config_Binding_Key); 713 int l1, l2;
710 ECORE_IPC_CNT32(); 714 ECORE_IPC_ENC_STRUCT_HEAD(E_Config_Binding_Mouse,
711 ECORE_IPC_CNT32(); 715 4 + 4 +
712 ECORE_IPC_CNTS(key); 716 ECORE_IPC_SLEN(l1, action) +
713 ECORE_IPC_CNTS(action); 717 ECORE_IPC_SLEN(l2, params) +
714 ECORE_IPC_CNTS(params); 718 1 + 1);
715 ECORE_IPC_CNT8(); 719 ECORE_IPC_PUT32(context);
716 ECORE_IPC_ENC_EVAS_LIST_HEAD_FINISH(); 720 ECORE_IPC_PUT32(modifiers);
717 int l1, l2, l3; 721 ECORE_IPC_PUTS(action, l1);
718 ECORE_IPC_PUT32(context); 722 ECORE_IPC_PUTS(params, l2);
719 ECORE_IPC_PUT32(modifiers); 723 ECORE_IPC_PUT8(button);
720 ECORE_IPC_SLEN(l1, key); 724 ECORE_IPC_PUT8(any_mod);
721 ECORE_IPC_SLEN(l2, action); 725 ECORE_IPC_ENC_STRUCT_FOOT();
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} 726}
727
728ECORE_IPC_DEC_STRUCT_PROTO(_e_ipc_mouse_binding_dec)
729{
730 ECORE_IPC_DEC_STRUCT_HEAD_MIN(E_Config_Binding_Mouse,
731 4 + 4 +
732 1 +
733 1 +
734 1 + 1);
735 ECORE_IPC_CHEKS();
736 ECORE_IPC_GET32(context);
737 ECORE_IPC_GET32(modifiers);
738 ECORE_IPC_GETS(action);
739 ECORE_IPC_GETS(params);
740 ECORE_IPC_GET8(button);
741 ECORE_IPC_GET8(any_mod);
742 ECORE_IPC_DEC_STRUCT_FOOT();
743}
744
745ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_key_binding_list_enc)
746{
747 ECORE_IPC_ENC_EVAS_LIST_HEAD_START(E_Config_Binding_Key);
748 ECORE_IPC_CNT32();
749 ECORE_IPC_CNT32();
750 ECORE_IPC_CNTS(key);
751 ECORE_IPC_CNTS(action);
752 ECORE_IPC_CNTS(params);
753 ECORE_IPC_CNT8();
754 ECORE_IPC_ENC_EVAS_LIST_HEAD_FINISH();
755 int l1, l2, l3;
756 ECORE_IPC_PUT32(context);
757 ECORE_IPC_PUT32(modifiers);
758 ECORE_IPC_SLEN(l1, key);
759 ECORE_IPC_SLEN(l2, action);
760 ECORE_IPC_SLEN(l3, params);
761 ECORE_IPC_PUTS(key, l1);
762 ECORE_IPC_PUTS(action, l2);
763 ECORE_IPC_PUTS(params, l3);
764 ECORE_IPC_PUT8(any_mod);
765 ECORE_IPC_ENC_EVAS_LIST_FOOT();
766}
767
768ECORE_IPC_ENC_STRUCT_PROTO(_e_ipc_key_binding_enc)
769{
770 int l1, l2, l3;
771 ECORE_IPC_ENC_STRUCT_HEAD(E_Config_Binding_Key,
772 4 + 4 +
773 ECORE_IPC_SLEN(l1, key) +
774 ECORE_IPC_SLEN(l2, action) +
775 ECORE_IPC_SLEN(l3, params) +
776 1);
777 ECORE_IPC_PUT32(context);
778 ECORE_IPC_PUT32(modifiers);
779 ECORE_IPC_PUTS(key, l1);
780 ECORE_IPC_PUTS(action, l2);
781 ECORE_IPC_PUTS(params, l3);
782 ECORE_IPC_PUT8(any_mod);
783 ECORE_IPC_ENC_STRUCT_FOOT();
784}
785
786ECORE_IPC_DEC_STRUCT_PROTO(_e_ipc_key_binding_dec)
787{
788 ECORE_IPC_DEC_STRUCT_HEAD_MIN(E_Config_Binding_Key,
789 4 + 4 +
790 1 +
791 1 +
792 1 +
793 1);
794 ECORE_IPC_CHEKS();
795 ECORE_IPC_GET32(context);
796 ECORE_IPC_GET32(modifiers);
797 ECORE_IPC_GETS(key);
798 ECORE_IPC_GETS(action);
799 ECORE_IPC_GETS(params);
800 ECORE_IPC_GET8(any_mod);
801 ECORE_IPC_DEC_STRUCT_FOOT();
802}
803