* Link a widget to another widget, where the new widget is linked at the end * of the list of the first widget. * @param w1 Widget to which the other widget is added. * @param w2 Widget which is added to the first widget (at the end of his chain). * @return The first widget of the chain. */
| 813 | * @return The first widget of the chain. |
| 814 | */ |
| 815 | Widget *GUI_Widget_Link(Widget *w1, Widget *w2) |
| 816 | { |
| 817 | Widget *first = w1; |
| 818 | |
| 819 | s_widgetReset = true; |
| 820 | |
| 821 | if (w2 == NULL) return w1; |
| 822 | w2->next = NULL; |
| 823 | if (w1 == NULL) return w2; |
| 824 | |
| 825 | while (w1->next != NULL) w1 = w1->next; |
| 826 | |
| 827 | w1->next = w2; |
| 828 | return first; |
| 829 | } |
| 830 | |
| 831 | /** |
| 832 | * Get scrollbar position. |
no outgoing calls
no test coverage detected