Changeset 46e2e56


Ignore:
Timestamp:
Jun 1, 2010, 12:25:27 AM (11 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
fe49685
Parents:
7cbef8c
git-author:
David Benjamin <davidben@mit.edu> (05/31/10 20:04:05)
git-committer:
David Benjamin <davidben@mit.edu> (06/01/10 00:25:27)
Message:
Rename map_internal to realize
File:
1 edited

Legend:

Unmodified
Added
Removed
  • window.c

    r7cbef8c r46e2e56  
    4040static void _owl_window_destroy_curses(owl_window *w);
    4141
    42 static void _owl_window_map_internal(owl_window *w);
    43 static void _owl_window_unmap_internal(owl_window *w);
     42static void _owl_window_realize(owl_window *w);
     43static void _owl_window_unrealize(owl_window *w);
    4444
    4545/** singletons **/
     
    184184{
    185185  /* make sure the window is unmapped first */
    186   _owl_window_unmap_internal(w);
     186  _owl_window_unrealize(w);
    187187  /* unlink parent/child information */
    188188  if (w->parent) {
     
    278278{
    279279  w->mapped = 1;
    280   _owl_window_map_internal(w);
     280  _owl_window_realize(w);
    281281  if (w->pan)
    282282    show_panel(w->pan);
     
    293293  if (w->pan)
    294294    hide_panel(w->pan);
    295   _owl_window_unmap_internal(w);
     295  _owl_window_unrealize(w);
    296296}
    297297
     
    311311}
    312312
    313 static void _owl_window_map_internal(owl_window *w)
     313static void _owl_window_realize(owl_window *w)
    314314{
    315315  /* check if we can create a window */
     
    323323  /* map the children, unless we failed */
    324324  if (w->win)
    325     owl_window_children_foreach_onearg(w, _owl_window_map_internal);
    326 }
    327 
    328 static void _owl_window_unmap_internal(owl_window *w)
     325    owl_window_children_foreach_onearg(w, _owl_window_realize);
     326}
     327
     328static void _owl_window_unrealize(owl_window *w)
    329329{
    330330  if (w->win == NULL)
    331331    return;
    332332  /* unmap all the children */
    333   owl_window_children_foreach_onearg(w, _owl_window_unmap_internal);
     333  owl_window_children_foreach_onearg(w, _owl_window_unrealize);
    334334  _owl_window_destroy_curses(w);
    335335  /* subwins leave a mess in the parent; dirty it */
     
    429429    }
    430430    /* We don't have a window or failed to move it. Fine. Brute force. */
    431     _owl_window_unmap_internal(w);
    432     _owl_window_map_internal(w);
     431    _owl_window_unrealize(w);
     432    _owl_window_realize(w);
    433433  }
    434434}
     
    453453  /* window is mapped, we must try to have a window at the end */
    454454  if (w->mapped) {
    455     /* resizing in ncurses is hard: give up do a unmap/map */
    456     _owl_window_unmap_internal(w);
     455    /* resizing in ncurses is hard: give up do a unrealize/realize */
     456    _owl_window_unrealize(w);
    457457  }
    458458  /* recalculate children sizes BEFORE remapping, so that everything can resize */
    459459  owl_window_children_foreach_onearg(w, owl_window_recompute_position);
    460460  if (w->mapped) {
    461     _owl_window_map_internal(w);
     461    _owl_window_realize(w);
    462462  }
    463463}
Note: See TracChangeset for help on using the changeset viewer.