- Timestamp:
- Nov 6, 2010, 6:34:03 PM (14 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- ce35060
- Parents:
- 1d81c51
- git-author:
- David Benjamin <davidben@mit.edu> (08/07/10 21:07:19)
- git-committer:
- Anders Kaseorg <andersk@mit.edu> (11/06/10 18:34:03)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
window.c
r4811422 r6ad7bed 45 45 static owl_window *default_cursor; 46 46 47 /* clang gets upset about the glib argument chopping hack because it manages to 48 * inline owl_window_children_foreach. user_data should be a pointer to a 49 * FuncOneArg. */ 50 typedef void (*FuncOneArg)(void *); 51 static void first_arg_only(gpointer data, gpointer user_data) 52 { 53 FuncOneArg *func = user_data; 54 (*func)(data); 55 } 56 47 57 G_DEFINE_TYPE (OwlWindow, owl_window, G_TYPE_OBJECT) 48 58 … … 288 298 { 289 299 owl_window_show(w); 290 owl_window_children_foreach(w, (GFunc)owl_window_show, 0); 300 FuncOneArg ptr = (FuncOneArg)owl_window_show; 301 owl_window_children_foreach(w, first_arg_only, &ptr); 291 302 } 292 303 … … 348 359 owl_window_dirty(w); 349 360 /* map the children */ 350 owl_window_children_foreach(w, (GFunc)_owl_window_realize_later, 0); 361 FuncOneArg ptr = (FuncOneArg)_owl_window_realize_later; 362 owl_window_children_foreach(w, first_arg_only, &ptr); 351 363 } 352 364 … … 356 368 return; 357 369 /* unmap all the children */ 358 owl_window_children_foreach(w, (GFunc)_owl_window_unrealize, 0); 370 FuncOneArg ptr = (FuncOneArg)_owl_window_unrealize; 371 owl_window_children_foreach(w, first_arg_only, &ptr); 359 372 _owl_window_destroy_curses(w); 360 373 w->dirty = w->dirty_subtree = 0; … … 410 423 void owl_window_dirty_children(owl_window *w) 411 424 { 412 owl_window_children_foreach(w, (GFunc)owl_window_dirty, 0); 425 FuncOneArg ptr = (FuncOneArg)owl_window_dirty; 426 owl_window_children_foreach(w, first_arg_only, &ptr); 413 427 } 414 428 … … 434 448 return; 435 449 _owl_window_redraw(w); 436 owl_window_children_foreach(w, (GFunc)_owl_window_redraw_subtree, 0); 450 FuncOneArg ptr = (FuncOneArg)_owl_window_redraw_subtree; 451 owl_window_children_foreach(w, first_arg_only, &ptr); 437 452 w->dirty_subtree = 0; 438 453 }
Note: See TracChangeset
for help on using the changeset viewer.