Changes in uspace/lib/gui/connection.c [10cb47e:6d5e378] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gui/connection.c
r10cb47e r6d5e378 65 65 66 66 signal_node_t *sig_node = NULL; 67 list_foreach(connection_list, link, signal_node_t, cur) { 67 list_foreach(connection_list, link) { 68 signal_node_t *cur = list_get_instance(link, signal_node_t, link); 68 69 if (cur->signal == signal) { 69 70 sig_node = cur; … … 87 88 88 89 slot_node_t *slt_node = NULL; 89 list_foreach(sig_node->slots, link, slot_node_t, cur) { 90 list_foreach(sig_node->slots, link) { 91 slot_node_t *cur = list_get_instance(link, slot_node_t, link); 90 92 if (cur->widget == widget && cur->slot == slot) { 91 93 slt_node = cur; … … 119 121 120 122 signal_node_t *sig_node = NULL; 121 list_foreach(connection_list, link, signal_node_t, cur) { 123 list_foreach(connection_list, link) { 124 signal_node_t *cur = list_get_instance(link, signal_node_t, link); 122 125 if (cur->signal == signal) { 123 126 sig_node = cur; … … 132 135 133 136 slot_node_t *slt_node = NULL; 134 list_foreach(sig_node->slots, link, slot_node_t, cur) { 137 list_foreach(sig_node->slots, link) { 138 slot_node_t *cur = list_get_instance(link, slot_node_t, link); 135 139 if (cur->widget == widget && cur->slot == slot) { 136 140 slt_node = cur; … … 160 164 161 165 signal_node_t *sig_node = NULL; 162 list_foreach(connection_list, link, signal_node_t, cur) { 166 list_foreach(connection_list, link) { 167 signal_node_t *cur = list_get_instance(link, signal_node_t, link); 163 168 if (cur->signal == signal) { 164 169 sig_node = cur; … … 172 177 } 173 178 174 list_foreach(sig_node->slots, link, slot_node_t, cur) { 179 list_foreach(sig_node->slots, link) { 180 slot_node_t *cur = list_get_instance(link, slot_node_t, link); 175 181 cur->slot(cur->widget, data); 176 182 } … … 184 190 185 191 signal_node_t *sig_node = NULL; 186 list_foreach(connection_list, link, signal_node_t, cur) { 192 list_foreach(connection_list, link) { 193 signal_node_t *cur = list_get_instance(link, signal_node_t, link); 187 194 if (cur->signal == signal) { 188 195 sig_node = cur; … … 196 203 } 197 204 198 list_foreach(sig_node->slots, link, slot_node_t, cur) { 205 list_foreach(sig_node->slots, link) { 206 slot_node_t *cur = list_get_instance(link, slot_node_t, link); 207 199 208 void *data_copy = NULL; 200 if (data != NULL) 209 if (data != NULL) { 201 210 data_copy = malloc(data_size); 202 203 if (data_copy != NULL) 211 } 212 if (data_copy != NULL) { 204 213 memcpy(data_copy, data, data_size); 205 214 } 206 215 window_event_t *event = 207 208 216 (window_event_t *) malloc(sizeof(window_event_t)); 217 209 218 if (event) { 210 219 link_initialize(&event->link); 211 220 event->type = ET_SIGNAL_EVENT; 212 event->data.sig nal.object = (sysarg_t) cur->widget;213 event->data.sig nal.slot = (sysarg_t) cur->slot;214 event->data.sig nal.argument = (sysarg_t) data_copy;221 event->data.sig.object = (sysarg_t) cur->widget; 222 event->data.sig.slot = (sysarg_t) cur->slot; 223 event->data.sig.argument = (sysarg_t) data_copy; 215 224 prodcons_produce(&cur->widget->window->events, &event->link); 216 225 } else { 217 if (data_copy != NULL) 226 if (data_copy != NULL) { 218 227 free(data_copy); 228 } 219 229 } 220 230 }
Note:
See TracChangeset
for help on using the changeset viewer.