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