summaryrefslogtreecommitdiff
path: root/src/bin/e_ipc.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2005-06-27 13:50:10 +0000
committerCarsten Haitzler <raster@rasterman.com>2005-06-27 13:50:10 +0000
commitb5ece28d8a8631b3fa670e73bab51d98fa394b04 (patch)
tree99948c2425cf4135d9f27abb79774cde205d84d6 /src/bin/e_ipc.c
parent8f1323e5bdc01a9d9ad2b05986abafa19c9129c6 (diff)
shorne's mouse/key bindings ipc patch... :)
SVN revision: 15548
Diffstat (limited to 'src/bin/e_ipc.c')
-rw-r--r--src/bin/e_ipc.c184
1 files changed, 0 insertions, 184 deletions
diff --git a/src/bin/e_ipc.c b/src/bin/e_ipc.c
index 6db9229..c20418a 100644
--- a/src/bin/e_ipc.c
+++ b/src/bin/e_ipc.c
@@ -76,138 +76,6 @@ _e_ipc_cb_client_data(void *data __UNUSED__, int type __UNUSED__, void *event)
76#define TYPE E_WM_IN 76#define TYPE E_WM_IN
77#include "e_ipc_handlers.h" 77#include "e_ipc_handlers.h"
78#undef TYPE 78#undef TYPE
79/* here to steal from to port over to the new e_ipc_handlers.h */
80#if 0
81 case E_IPC_OP_BINDING_MOUSE_LIST:
82 {
83 Evas_List *bindings;
84 int bytes;
85 char *data;
86
87 bindings = e_config->mouse_bindings;
88 data = _e_ipc_mouse_binding_list_enc(bindings, &bytes);
89 ecore_ipc_client_send(e->client,
90 E_IPC_DOMAIN_REPLY,
91 E_IPC_OP_BINDING_MOUSE_LIST_REPLY,
92 0/*ref*/, 0/*ref_to*/, 0/*response*/,
93 data, bytes);
94 free(data);
95 }
96 break;
97 case E_IPC_OP_BINDING_MOUSE_ADD:
98 {
99 E_Config_Binding_Mouse bind, *eb;
100
101 _e_ipc_mouse_binding_dec(e->data, e->size, &bind);
102 {
103 eb = e_config_binding_mouse_match(&bind);
104 if (!eb)
105 {
106 eb = E_NEW(E_Config_Binding_Key, 1);
107 e_config->mouse_bindings = evas_list_append(e_config->mouse_bindings, eb);
108 eb->context = bind.context;
109 eb->button = bind.button;
110 eb->modifiers = bind.modifiers;
111 eb->any_mod = bind.any_mod;
112 eb->action = strdup(bind.action);
113 eb->params = strdup(bind.params);
114 e_border_button_bindings_ungrab_all();
115 e_bindings_mouse_add(bind.context, bind.button, bind.modifiers,
116 bind.any_mod, bind.action, bind.params);
117 e_border_button_bindings_grab_all();
118 e_config_save_queue();
119 }
120 }
121 }
122 break;
123 case E_IPC_OP_BINDING_MOUSE_DEL:
124 {
125 E_Config_Binding_Mouse bind, *eb;
126
127 _e_ipc_mouse_binding_dec(e->data, e->size, &bind);
128 {
129 eb = e_config_binding_mouse_match(&bind);
130 if (eb)
131 {
132 e_config->mouse_bindings = evas_list_remove(e_config->mouse_bindings, eb);
133 IF_FREE(eb->action);
134 IF_FREE(eb->params);
135 IF_FREE(eb);
136 e_border_button_bindings_ungrab_all();
137 e_bindings_mouse_del(bind.context, bind.button, bind.modifiers,
138 bind.any_mod, bind.action, bind.params);
139 e_border_button_bindings_grab_all();
140 e_config_save_queue();
141 }
142 }
143 }
144 break;
145 case E_IPC_OP_BINDING_KEY_LIST:
146 {
147 Evas_List *bindings;
148 int bytes;
149 char *data;
150
151 bindings = e_config->key_bindings;
152 data = _e_ipc_key_binding_list_enc(bindings, &bytes);
153 ecore_ipc_client_send(e->client,
154 E_IPC_DOMAIN_REPLY,
155 E_IPC_OP_BINDING_KEY_LIST_REPLY,
156 0/*ref*/, 0/*ref_to*/, 0/*response*/,
157 data, bytes);
158 free(data);
159 }
160 break;
161 case E_IPC_OP_BINDING_KEY_ADD:
162 {
163 E_Config_Binding_Key bind, *eb;
164
165 _e_ipc_key_binding_dec(e->data, e->size, &bind);
166 {
167 eb = e_config_binding_key_match(&bind);
168 if (!eb)
169 {
170 eb = E_NEW(E_Config_Binding_Key, 1);
171 e_config->key_bindings = evas_list_append(e_config->key_bindings, eb);
172 eb->context = bind.context;
173 eb->modifiers = bind.modifiers;
174 eb->any_mod = bind.any_mod;
175 eb->key = strdup(bind.key);
176 eb->action = strdup(bind.action);
177 eb->params = strdup(bind.params);
178 e_managers_keys_ungrab();
179 e_bindings_key_add(bind.context, bind.key, bind.modifiers,
180 bind.any_mod, bind.action, bind.params);
181 e_managers_keys_grab();
182 e_config_save_queue();
183 }
184 }
185 }
186 break;
187 case E_IPC_OP_BINDING_KEY_DEL:
188 {
189 E_Config_Binding_Key bind, *eb;
190
191 _e_ipc_key_binding_dec(e->data, e->size, &bind);
192 {
193 eb = e_config_binding_key_match(&bind);
194 if (eb)
195 {
196 e_config->key_bindings = evas_list_remove(e_config->key_bindings, eb);
197 IF_FREE(eb->key);
198 IF_FREE(eb->action);
199 IF_FREE(eb->params);
200 IF_FREE(eb);
201 e_managers_keys_ungrab();
202 e_bindings_key_del(bind.context, bind.key, bind.modifiers,
203 bind.any_mod, bind.action, bind.params);
204 e_managers_keys_grab();
205 e_config_save_queue();
206 }
207 }
208 }
209 break;
210#endif
211 default: 79 default:
212 break; 80 break;
213 } 81 }
@@ -220,55 +88,3 @@ _e_ipc_cb_client_data(void *data __UNUSED__, int type __UNUSED__, void *event)
220 return 1; 88 return 1;
221} 89}
222 90
223#if 0
224static void
225_e_ipc_reply_double_send(Ecore_Ipc_Client *client, double val, int opcode)
226{
227 void *data;
228 int bytes;
229
230 if ((data = e_ipc_codec_double_enc(val, &bytes)))
231 {
232 ecore_ipc_client_send(client,
233 E_IPC_DOMAIN_REPLY,
234 opcode,
235 0/*ref*/, 0/*ref_to*/, 0/*response*/,
236 data, bytes);
237 free(data);
238 }
239}
240
241static void
242_e_ipc_reply_int_send(Ecore_Ipc_Client *client, int val, int opcode)
243{
244 void *data;
245 int bytes;
246
247 if ((data = e_ipc_codec_int_enc(val, &bytes)))
248 {
249 ecore_ipc_client_send(client,
250 E_IPC_DOMAIN_REPLY,
251 opcode,
252 0/*ref*/, 0/*ref_to*/, 0/*response*/,
253 data, bytes);
254 free(data);
255 }
256}
257
258static void
259_e_ipc_reply_2int_send(Ecore_Ipc_Client *client, int val1, int val2, int opcode)
260{
261 void *data;
262 int bytes;
263
264 if ((data = e_ipc_codec_2int_enc(val1, val2, &bytes)))
265 {
266 ecore_ipc_client_send(client,
267 E_IPC_DOMAIN_REPLY,
268 opcode,
269 0/*ref*/, 0/*ref_to*/, 0/*response*/,
270 data, bytes);
271 free(data);
272 }
273}
274#endif