1 /* |
1 /* |
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
3 * |
3 * |
4 * Copyright 2014 Olaf Wintermann. All rights reserved. |
4 * Copyright 2017 Olaf Wintermann. All rights reserved. |
5 * |
5 * |
6 * Redistribution and use in source and binary forms, with or without |
6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions are met: |
7 * modification, are permitted provided that the following conditions are met: |
8 * |
8 * |
9 * 1. Redistributions of source code must retain the above copyright |
9 * 1. Redistributions of source code must retain the above copyright |
224 |
224 |
225 void ui_destroy_userdata(GtkWidget *object, void *userdata) { |
225 void ui_destroy_userdata(GtkWidget *object, void *userdata) { |
226 free(userdata); |
226 free(userdata); |
227 } |
227 } |
228 |
228 |
|
229 void ui_destroy_boundvar(UiContext *ctx, UiVar *var) { |
|
230 if(var->type == UI_VAR_SPECIAL) { |
|
231 free(var); |
|
232 } else { |
|
233 uic_remove_bound_var(ctx, var); |
|
234 } |
|
235 } |
|
236 |
229 void ui_set_active_window(UiObject *obj) { |
237 void ui_set_active_window(UiObject *obj) { |
230 active_window = obj; |
238 active_window = obj; |
231 } |
239 } |
232 |
240 |
233 UiObject *ui_get_active_window() { |
241 UiObject *ui_get_active_window() { |