4 * Copyright (c) Tuomo Valkonen 1999-2007.
6 * Ion is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
15 #include <libtu/objp.h>
16 #include <libtu/minmax.h>
18 #include <libextl/extl.h>
19 #include <libmainloop/defer.h>
33 #include "frame-pointer.h"
38 #include "mplexpholder.h"
41 #include "sizepolicy.h"
45 #include "groupedpholder.h"
48 #define SUBS_MAY_BE_MAPPED(MPLEX) \
49 (REGION_IS_MAPPED(MPLEX) && !MPLEX_MGD_UNVIEWABLE(MPLEX))
51 #define PASSIVE(ST) ((ST)->level<=STACKING_LEVEL_MODAL1 \
53 || (ST)->reg->flags®ION_SKIP_FOCUS))
55 #define CAN_MANAGE_STDISP(REG) HAS_DYN(REG, region_manage_stdisp)
58 /*{{{ Stacking list stuff */
61 WStacking *mplex_get_stacking(WMPlex *mplex)
63 return window_get_stacking(&mplex->win);
67 WStacking **mplex_get_stackingp(WMPlex *mplex)
69 return window_get_stackingp(&mplex->win);
73 void mplex_iter_init(WMPlexIterTmp *tmp, WMPlex *mplex)
75 stacking_iter_mgr_init(tmp, mplex->mgd, NULL, mplex);
79 WRegion *mplex_iter(WMPlexIterTmp *tmp)
81 return stacking_iter_mgr(tmp);
85 WStacking *mplex_iter_nodes(WMPlexIterTmp *tmp)
87 return stacking_iter_mgr_nodes(tmp);
94 /*{{{ Destroy/create mplex */
97 bool mplex_do_init(WMPlex *mplex, WWindow *parent,
98 const WFitParams *fp, Window win)
103 mplex->mx_current=NULL;
109 watch_init(&(mplex->stdispwatch));
110 mplex->stdispinfo.pos=MPLEX_STDISP_BL;
111 mplex->stdispinfo.fullsize=FALSE;
113 if(!window_do_init((WWindow*)mplex, parent, fp, win))
116 mplex->win.region.flags|=REGION_BINDINGS_ARE_GRABBED;
118 window_select_input(&(mplex->win), IONCORE_EVENTMASK_CWINMGR);
120 region_register((WRegion*)mplex);
122 /* Call this to set MPLEX_MANAGED_UNVIEWABLE if necessary. */
123 mplex_fit_managed(mplex);
129 bool mplex_init(WMPlex *mplex, WWindow *parent, const WFitParams *fp)
131 return mplex_do_init(mplex, parent, fp, None);
135 WMPlex *create_mplex(WWindow *parent, const WFitParams *fp)
137 CREATEOBJ_IMPL(WMPlex, mplex, (p, parent, fp));
141 void mplex_deinit(WMPlex *mplex)
146 FOR_ALL_MANAGED_BY_MPLEX(mplex, reg, tmp){
147 destroy_obj((Obj*)reg);
150 assert(mplex->mgd==NULL);
151 assert(mplex->mx_list==NULL);
153 while(mplex->mx_phs!=NULL){
154 assert(mplexpholder_move(mplex->mx_phs, NULL, NULL, NULL));
157 window_deinit((WWindow*)mplex);
164 /*{{{ Node lookup etc. */
167 WStacking *mplex_find_stacking(WMPlex *mplex, WRegion *reg)
171 /* Some routines that call us expect us to this check. */
172 if(reg==NULL || REGION_MANAGER(reg)!=(WRegion*)mplex)
175 st=ioncore_find_stacking(reg);
177 assert(st==NULL || st->mgr_prev!=NULL);
183 WStacking *mplex_current_node(WMPlex *mplex)
188 reg=REGION_ACTIVE_SUB(mplex);
189 reg=region_managed_within((WRegion*)mplex, reg);
191 st=mplex_find_stacking(mplex, reg);
196 return (mplex->mx_current!=NULL ? mplex->mx_current->st : NULL);
200 WRegion *mplex_current(WMPlex *mplex)
202 WStacking *node=mplex_current_node(mplex);
203 return (node==NULL ? NULL : node->reg);
210 /*{{{ Exclusive list management and exports */
213 * Returns the number of objects on the mutually exclusive list of \var{mplex}.
217 int mplex_mx_count(WMPlex *mplex)
219 return mplex->mx_count;
224 * Returns the managed object currently active within the mutually exclusive
225 * list of \var{mplex}.
229 WRegion *mplex_mx_current(WMPlex *mplex)
231 WLListNode *lnode=mplex->mx_current;
232 return (lnode==NULL ? NULL : lnode->st->reg);
237 * Returns the \var{n}:th object managed by \var{mplex} on the
242 WRegion *mplex_mx_nth(WMPlex *mplex, uint n)
244 WLListNode *lnode=llist_nth_node(mplex->mx_list, n);
245 return (lnode==NULL ? NULL : lnode->st->reg);
250 * Iterate over numbered/mutually exclusive region list of \var{mplex}
251 * until \var{iterfn} returns \code{false}.
252 * The function itself returns \code{true} if it reaches the end of list
253 * without this happening.
257 bool mplex_mx_i(WMPlex *mplex, ExtlFn iterfn)
260 llist_iter_init(&tmp, mplex->mx_list);
262 return extl_iter_objlist_(iterfn, (ObjIterator*)llist_iter_regions, &tmp);
267 * Iterate over managed regions of \var{mplex} until \var{iterfn} returns
269 * The function itself returns \code{true} if it reaches the end of list
270 * without this happening.
274 bool mplex_managed_i(WMPlex *mplex, ExtlFn iterfn)
277 mplex_iter_init(&tmp, mplex);
279 return extl_iter_objlist_(iterfn, (ObjIterator*)mplex_iter, &tmp);
284 * Set index of \var{reg} to \var{index} within the mutually exclusive
285 * list of \var{mplex}. Special values for \var{index} are:
286 * \begin{tabularx}{\linewidth}{lX}
288 * $-2$ & After \fnref{WMPlex.mx_current}. \\
292 void mplex_set_index(WMPlex *mplex, WRegion *reg, int index)
294 WLListNode *lnode, *after;
297 node=mplex_find_stacking(mplex, reg);
305 lnode=ALLOC(WLListNode);
315 mplex_move_phs_before(mplex, lnode);
316 llist_unlink(&(mplex->mx_list), lnode);
319 after=llist_index_to_after(mplex->mx_list, mplex->mx_current, index);
320 llist_link_after(&(mplex->mx_list), after, lnode);
321 mplex_managed_changed(mplex, MPLEX_CHANGE_REORDER, FALSE, reg);
326 * Get index of \var{reg} on the mutually exclusive list of \var{mplex}.
327 * The indices begin from zero.. If \var{reg} is not on the list,
332 int mplex_get_index(WMPlex *mplex, WRegion *reg)
338 FOR_ALL_NODES_ON_LLIST(lnode, mplex->mx_list, tmp){
339 if(reg==lnode->st->reg)
349 * Move \var{r} ''right'' within objects managed by \var{mplex} on list 1.
352 void mplex_inc_index(WMPlex *mplex, WRegion *r)
355 r=mplex_mx_current(mplex);
357 mplex_set_index(mplex, r, mplex_get_index(mplex, r)+1);
362 * Move \var{r} ''right'' within objects managed by \var{mplex} on list 1.
365 void mplex_dec_index(WMPlex *mplex, WRegion *r)
368 r=mplex_mx_current(mplex);
370 mplex_set_index(mplex, r, mplex_get_index(mplex, r)-1);
380 static void mplex_map_mgd(WMPlex *mplex)
385 FOR_ALL_NODES_IN_MPLEX(mplex, node, tmp){
386 if(!STACKING_IS_HIDDEN(node))
387 region_map(node->reg);
392 static void mplex_unmap_mgd(WMPlex *mplex)
397 FOR_ALL_NODES_IN_MPLEX(mplex, node, tmp){
398 if(!STACKING_IS_HIDDEN(node))
399 region_unmap(node->reg);
405 void mplex_map(WMPlex *mplex)
407 window_map((WWindow*)mplex);
408 /* A lame requirement of the ICCCM is that client windows should be
409 * unmapped if the parent is unmapped.
411 if(!MPLEX_MGD_UNVIEWABLE(mplex))
412 mplex_map_mgd(mplex);
416 void mplex_unmap(WMPlex *mplex)
418 window_unmap((WWindow*)mplex);
419 /* A lame requirement of the ICCCM is that client windows should be
420 * unmapped if the parent is unmapped.
422 if(!MPLEX_MGD_UNVIEWABLE(mplex))
423 mplex_unmap_mgd(mplex);
430 /*{{{ Resize and reparent */
433 bool mplex_fitrep(WMPlex *mplex, WWindow *par, const WFitParams *fp)
435 bool wchg=(REGION_GEOM(mplex).w!=fp->g.w);
436 bool hchg=(REGION_GEOM(mplex).h!=fp->g.h);
438 window_do_fitrep(&(mplex->win), par, &(fp->g));
441 mplex_fit_managed(mplex);
442 mplex_size_changed(mplex, wchg, hchg);
449 void mplex_do_fit_managed(WMPlex *mplex, WFitParams *fp)
456 if(!MPLEX_MGD_UNVIEWABLE(mplex) && (fp->g.w<=1 || fp->g.h<=1)){
457 mplex->flags|=MPLEX_MANAGED_UNVIEWABLE;
458 if(REGION_IS_MAPPED(mplex))
459 mplex_unmap_mgd(mplex);
460 }else if(MPLEX_MGD_UNVIEWABLE(mplex) && !(fp->g.w<=1 || fp->g.h<=1)){
461 mplex->flags&=~MPLEX_MANAGED_UNVIEWABLE;
462 if(REGION_IS_MAPPED(mplex))
463 mplex_map_mgd(mplex);
466 if(!MPLEX_MGD_UNVIEWABLE(mplex)){
467 FOR_ALL_NODES_IN_MPLEX(mplex, node, tmp){
469 sizepolicy(&node->szplcy, node->reg, NULL, 0, &fp2);
470 region_fitrep(node->reg, NULL, &fp2);
476 void mplex_fit_managed(WMPlex *mplex)
480 fp.mode=REGION_FIT_EXACT;
481 mplex_managed_geom(mplex, &(fp.g));
483 mplex_do_fit_managed(mplex, &fp);
487 static void mplex_managed_rqgeom(WMPlex *mplex, WRegion *sub,
488 const WRQGeomParams *rq,
495 node=mplex_find_stacking(mplex, sub);
499 mplex_managed_geom(mplex, &fp.g);
501 sizepolicy(&node->szplcy, sub, &rq->geom, rq->flags, &fp);
506 if(!(rq->flags®ION_RQGEOM_TRYONLY))
507 region_fitrep(sub, NULL, &fp);
517 static WStacking *mplex_do_to_focus(WMPlex *mplex, WStacking *to_try)
519 WStacking *stacking=mplex_get_stacking(mplex);
525 if(to_try!=NULL && (to_try->reg==NULL || !REGION_IS_MAPPED(to_try->reg)))
528 st=stacking_find_to_focus_mapped(stacking, to_try, NULL);
532 else if(mplex->mx_current!=NULL)
533 return mplex->mx_current->st;
539 static WStacking *maybe_focusable(WRegion *reg)
541 if(reg==NULL || !REGION_IS_MAPPED(reg))
544 return ioncore_find_stacking(reg);
548 static WStacking *stacking_within(WMPlex *mplex, WRegion *reg)
550 while(reg!=NULL && REGION_MANAGER(reg)!=(WRegion*)mplex)
551 reg=REGION_MANAGER(reg);
553 return maybe_focusable(reg);
557 static WStacking *mplex_to_focus(WMPlex *mplex)
559 WStacking *to_try=NULL;
562 to_try=maybe_focusable(REGION_ACTIVE_SUB(mplex));
565 /* Search focus history */
566 for(reg=ioncore_g.focus_current; reg!=NULL; reg=reg->active_next){
567 to_try=stacking_within(mplex, reg);
573 return mplex_do_to_focus(mplex, to_try);
577 static WStacking *mplex_do_to_focus_on(WMPlex *mplex, WStacking *node,
580 WStacking *stacking=mplex_get_stacking(mplex);
586 if(to_try!=NULL && (to_try->reg==NULL || !REGION_IS_MAPPED(to_try->reg)))
589 return stacking_find_to_focus_mapped(stacking, to_try, node->reg);
593 static WStacking *mplex_to_focus_on(WMPlex *mplex, WStacking *node,
596 WGroup *grp=OBJ_CAST(node->reg, WGroup);
601 to_try=grp->current_managed;
602 st=mplex_do_to_focus_on(mplex, node, to_try);
603 if(st!=NULL || to_try!=NULL)
605 /* We don't know whether something is blocking focus here,
606 * or if there was nothing to focus (as node->reg itself
607 * isn't on the stacking list).
611 st=mplex_do_to_focus(mplex, node);
612 return (st==node ? st : NULL);
616 void mplex_do_set_focus(WMPlex *mplex, bool warp)
618 if(!MPLEX_MGD_UNVIEWABLE(mplex)){
619 WStacking *st=mplex_to_focus(mplex);
622 region_do_set_focus(st->reg, warp);
627 window_do_set_focus((WWindow*)mplex, warp);
637 static void mplex_do_remanage_stdisp(WMPlex *mplex, WRegion *sub)
639 WRegion *stdisp=(WRegion*)(mplex->stdispwatch.obj);
642 if(sub!=NULL && CAN_MANAGE_STDISP(sub)){
644 WRegion *omgr=REGION_MANAGER(stdisp);
645 if(omgr!=sub && omgr!=NULL){
646 if(CAN_MANAGE_STDISP(omgr))
647 region_unmanage_stdisp(omgr, FALSE, FALSE);
648 region_detach_manager(stdisp);
651 region_manage_stdisp(sub, stdisp,
652 &(mplex->stdispinfo));
654 region_unmanage_stdisp(sub, TRUE, FALSE);
660 void mplex_remanage_stdisp(WMPlex *mplex)
662 mplex_do_remanage_stdisp(mplex, (mplex->mx_current!=NULL
663 ? mplex->mx_current->st->reg
668 static void mplex_do_node_display(WMPlex *mplex, WStacking *node,
671 WRegion *sub=node->reg;
672 WLListNode *mxc=mplex->mx_current;
674 if(!STACKING_IS_HIDDEN(node))
677 if(node->lnode!=NULL && node->lnode!=mxc)
678 mplex_do_remanage_stdisp(mplex, sub);
682 if(SUBS_MAY_BE_MAPPED(mplex))
687 if(node->lnode!=NULL){
689 /* Hide current mx region. We do it after mapping the
690 * new one to avoid flicker.
692 if(REGION_IS_MAPPED(mplex))
693 region_unmap(mxc->st->reg);
694 mxc->st->hidden=TRUE;
697 mplex->mx_current=node->lnode;
700 * Many programs will get upset if the visible, although only
701 * such, client window is not the lowest window in the mplex.
702 * xprop/xwininfo will return the information for the lowest
703 * window. 'netscape -remote' will not work at all if there are
704 * no visible netscape windows.
707 WGroup *grp=(WGroup*)OBJ_CAST(sub, WGroupCW);
709 WRegion *bottom=group_bottom(grp);
711 region_managed_rqorder((WRegion*)grp, bottom,
718 mplex_managed_changed(mplex, MPLEX_CHANGE_SWITCHONLY, TRUE, sub);
723 static bool mplex_refocus(WMPlex *mplex, WStacking *node, bool warp)
729 foc=mplex_to_focus_on(mplex, node, NULL);
735 foc=mplex_to_focus(mplex);
739 region_maybewarp(foc->reg, warp);
745 bool mplex_do_prepare_focus(WMPlex *mplex, WStacking *node,
746 WStacking *sub, int flags,
747 WPrepareFocusResult *res)
751 if(sub==NULL && node==NULL)
754 /* Display the node in any case */
755 if(node!=NULL && !(flags®ION_GOTO_ENTERWINDOW))
756 mplex_do_node_display(mplex, node, TRUE);
758 if(!region_prepare_focus((WRegion*)mplex, flags, res))
762 foc=mplex_to_focus_on(mplex, node, sub);
764 foc=mplex_do_to_focus(mplex, sub);
767 if(ioncore_g.autoraise &&
768 !(flags®ION_GOTO_ENTERWINDOW) &&
769 foc->level>STACKING_LEVEL_BOTTOM){
770 WStacking **stackingp=mplex_get_stackingp(mplex);
771 stacking_restack(stackingp, foc, None, NULL, NULL, FALSE);
787 bool mplex_managed_prepare_focus(WMPlex *mplex, WRegion *disp,
788 int flags, WPrepareFocusResult *res)
790 WStacking *node=mplex_find_stacking(mplex, disp);
795 return mplex_do_prepare_focus(mplex, node, NULL, flags, res);
802 /*{{{ Switch exports */
805 static void do_switch(WMPlex *mplex, WLListNode *lnode)
807 WStacking *node=(lnode!=NULL ? lnode->st : NULL);
810 bool mcf=region_may_control_focus((WRegion*)mplex);
812 mplex_do_node_display(mplex, node, TRUE);
815 mplex_refocus(mplex, node, TRUE);
821 * Have \var{mplex} display the \var{n}:th object managed by it.
824 void mplex_switch_nth(WMPlex *mplex, uint n)
826 do_switch(mplex, llist_nth_node(mplex->mx_list, n));
831 * Have \var{mplex} display next (wrt. currently selected) object managed
835 void mplex_switch_next(WMPlex *mplex)
837 do_switch(mplex, LIST_NEXT_WRAP(mplex->mx_list, mplex->mx_current,
843 * Have \var{mplex} display previous (wrt. currently selected) object
847 void mplex_switch_prev(WMPlex *mplex)
849 do_switch(mplex, LIST_PREV_WRAP(mplex->mx_list, mplex->mx_current,
854 bool mplex_set_hidden(WMPlex *mplex, WRegion *reg, int sp)
856 bool mcf=region_may_control_focus((WRegion*)mplex);
857 WStacking *node=mplex_find_stacking(mplex, reg);
858 bool hidden, nhidden;
863 hidden=STACKING_IS_HIDDEN(node);
864 nhidden=libtu_do_setparam(sp, hidden);
866 if(!hidden && nhidden){
869 if(REGION_IS_MAPPED(mplex) && !MPLEX_MGD_UNVIEWABLE(mplex))
872 /* lnode -> switch next? */
873 }else if(hidden && !nhidden){
874 mplex_do_node_display(mplex, node, TRUE);
877 if(mcf && !PASSIVE(node))
878 mplex_refocus(mplex, (nhidden ? NULL : node), TRUE);
880 return STACKING_IS_HIDDEN(node);
885 * Set the visibility of the region \var{reg} on \var{mplex}
886 * as specified with the parameter \var{how} (set/unset/toggle).
887 * The resulting state is returned.
889 EXTL_EXPORT_AS(WMPlex, set_hidden)
890 bool mplex_set_hidden_extl(WMPlex *mplex, WRegion *reg, const char *how)
892 return mplex_set_hidden(mplex, reg, libtu_string_to_setparam(how));
897 * Is \var{reg} on within \var{mplex} and hidden?
901 bool mplex_is_hidden(WMPlex *mplex, WRegion *reg)
903 WStacking *node=mplex_find_stacking(mplex, reg);
905 return (node!=NULL && STACKING_IS_HIDDEN(node));
915 static WStacking *mplex_nxt(WMPlex *mplex, WStacking *st, bool wrap)
917 return (st->mgr_next!=NULL
919 : (wrap ? mplex->mgd : NULL));
923 static WStacking *mplex_prv(WMPlex *mplex, WStacking *st, bool wrap)
925 return (st!=mplex->mgd
927 : (wrap ? st->mgr_prev : NULL));
931 typedef WStacking *NxtFn(WMPlex *mplex, WStacking *st, bool wrap);
934 static WRegion *do_navi(WMPlex *mplex, WStacking *sti,
935 NxtFn *fn, WRegionNaviData *data,
936 bool sti_ok, bool wrap)
938 WStacking *st, *stacking;
941 stacking=mplex_get_stacking(mplex);
944 min_level=stacking_min_level_mapped(stacking);
948 st=fn(mplex, st, wrap);
950 if(st==NULL || (st==sti && !sti_ok))
954 if(OBJ_IS(st->reg, WGroup)){
955 /* WGroup navigation code should respect modal stuff. */
956 WRegion *res=region_navi_cont((WRegion*)mplex, st->reg, data);
957 if(res!=NULL && res!=st->reg)
960 if(st->level>=min_level && !PASSIVE(st))
961 return region_navi_cont((WRegion*)mplex, st->reg, data);
973 WRegion *mplex_navi_first(WMPlex *mplex, WRegionNavi nh,
974 WRegionNaviData *data)
976 WStacking *lst=mplex->mgd;
980 if(nh==REGION_NAVI_ANY){
984 if(nh==REGION_NAVI_ANY || nh==REGION_NAVI_END ||
985 nh==REGION_NAVI_BOTTOM || nh==REGION_NAVI_RIGHT){
986 res=do_navi(mplex, lst, mplex_prv, data, TRUE, TRUE);
988 res=do_navi(mplex, lst->mgr_prev, mplex_nxt, data, TRUE, TRUE);
992 return region_navi_cont((WRegion*)mplex, res, data);
996 WRegion *mplex_navi_next(WMPlex *mplex, WRegion *rel, WRegionNavi nh,
997 WRegionNaviData *data)
1003 st=mplex_find_stacking(mplex, rel);
1006 }else if(mplex->mx_current!=NULL){
1007 st=mplex->mx_current->st;
1009 return mplex_navi_first(mplex, nh, data);
1012 if(nh==REGION_NAVI_ANY){
1016 if(nh==REGION_NAVI_ANY || nh==REGION_NAVI_END ||
1017 nh==REGION_NAVI_BOTTOM || nh==REGION_NAVI_RIGHT){
1018 res=do_navi(mplex, st, mplex_nxt, data, FALSE, FALSE);
1020 res=do_navi(mplex, st, mplex_prv, data, FALSE, FALSE);
1023 return region_navi_cont((WRegion*)mplex, res, data);
1033 bool mplex_managed_rqorder(WMPlex *mplex, WRegion *reg, WRegionOrder order)
1035 WStacking **stackingp=mplex_get_stackingp(mplex);
1038 if(stackingp==NULL || *stackingp==NULL)
1041 st=mplex_find_stacking(mplex, reg);
1046 stacking_restack(stackingp, st, None, NULL, NULL,
1047 (order!=REGION_ORDER_FRONT));
1059 static bool mplex_stack(WMPlex *mplex, WStacking *st)
1061 WStacking *tmp=NULL;
1062 Window bottom=None, top=None;
1063 WStacking **stackingp=mplex_get_stackingp(mplex);
1068 LINK_ITEM_FIRST(tmp, st, next, prev);
1069 stacking_weave(stackingp, &tmp, FALSE);
1076 static void mplex_unstack(WMPlex *mplex, WStacking *st)
1078 WStacking *stacking;
1080 stacking=mplex_get_stacking(mplex);
1082 stacking_unstack(&mplex->win, st);
1086 /* WMPlexWPHolder is used for position marking in order to allow
1087 * WLListNodes be safely removed in the attach handler hnd, that
1088 * could remove something this mplex is managing.
1090 bool mplex_do_attach_final(WMPlex *mplex, WRegion *reg, WMPlexPHolder *ph)
1092 WStacking *node=NULL;
1093 WLListNode *lnode=NULL;
1094 WMPlexAttachParams *param=&ph->param;
1095 bool mx_was_empty, sw, modal, mcf, hidden;
1099 mcf=region_may_control_focus((WRegion*)mplex);
1101 mx_was_empty=(mplex->mx_list==NULL);
1103 szplcy=((param->flags&MPLEX_ATTACH_SIZEPOLICY &&
1104 param->szplcy!=SIZEPOLICY_DEFAULT)
1106 : (param->flags&MPLEX_ATTACH_UNNUMBERED
1107 ? SIZEPOLICY_FULL_BOUNDS
1108 : SIZEPOLICY_FULL_EXACT));
1110 modal=(param->flags&MPLEX_ATTACH_LEVEL
1111 ? param->level>=STACKING_LEVEL_MODAL1
1112 : param->flags&MPLEX_ATTACH_MODAL);
1114 level=(param->flags&MPLEX_ATTACH_LEVEL
1116 : (param->flags&MPLEX_ATTACH_MODAL
1117 ? STACKING_LEVEL_MODAL1
1118 : (param->flags&MPLEX_ATTACH_UNNUMBERED
1119 ? STACKING_LEVEL_NORMAL
1120 : STACKING_LEVEL_BOTTOM)));
1122 hidden=(param->flags&MPLEX_ATTACH_HIDDEN
1123 && (param->flags&MPLEX_ATTACH_UNNUMBERED
1126 sw=(!hidden && (param->flags&MPLEX_ATTACH_SWITCHTO
1127 || (param->flags&MPLEX_ATTACH_UNNUMBERED
1129 : (mplex_current_node(mplex)==NULL))));
1131 hidden=(hidden || (!sw && !(param->flags&MPLEX_ATTACH_UNNUMBERED)));
1133 node=create_stacking();
1138 if(!(param->flags&MPLEX_ATTACH_UNNUMBERED)){
1139 lnode=ALLOC(WLListNode);
1141 stacking_free(node);
1151 if(!stacking_assoc(node, reg)){
1156 stacking_free(node);
1161 node->szplcy=szplcy;
1165 llist_link_after(&(mplex->mx_list),
1166 (ph!=NULL ? ph->after : NULL),
1170 /* Move following placeholders after new node */
1171 while(ph->next!=NULL)
1172 mplexpholder_move(ph->next, mplex, NULL, lnode);
1175 LINK_ITEM(mplex->mgd, node, mgr_next, mgr_prev);
1177 if(!OBJ_IS(reg, WGroup))
1178 mplex_stack(mplex, node);
1180 region_set_manager(reg, (WRegion*)mplex);
1182 if(!(param->flags&MPLEX_ATTACH_WHATEVER)){
1185 mplex_managed_geom(mplex, &(fp.g));
1187 sizepolicy(&node->szplcy, reg,
1188 (param->flags&MPLEX_ATTACH_GEOM ? &(param->geom) : NULL),
1191 if(rectangle_compare(&fp.g, ®ION_GEOM(reg))!=RECTANGLE_SAME)
1192 region_fitrep(reg, NULL, &fp);
1196 mplex_do_node_display(mplex, node, FALSE);
1201 mplex_refocus(mplex, node, FALSE);
1204 mplex_managed_changed(mplex, MPLEX_CHANGE_ADD, sw, reg);
1210 WRegion *mplex_do_attach_pholder(WMPlex *mplex, WMPlexPHolder *ph,
1211 WRegionAttachData *data)
1213 WMPlexAttachParams *param=&(ph->param);
1216 if(param->flags&MPLEX_ATTACH_GEOM)
1219 mplex_managed_geom(mplex, &(fp.g));
1221 fp.mode=REGION_FIT_WHATEVER|REGION_FIT_BOUNDS;
1223 return region_attach_helper((WRegion*)mplex,
1224 (WWindow*)mplex, &fp,
1225 (WRegionDoAttachFn*)mplex_do_attach_final,
1230 WRegion *mplex_do_attach(WMPlex *mplex, WMPlexAttachParams *param,
1231 WRegionAttachData *data)
1236 ph=create_mplexpholder(mplex, NULL, param);
1241 reg=mplex_do_attach_pholder(mplex, ph, data);
1243 destroy_obj((Obj*)ph);
1249 WRegion *mplex_do_attach_new(WMPlex *mplex, WMPlexAttachParams *param,
1250 WRegionCreateFn *fn, void *fn_param)
1252 WRegionAttachData data;
1254 data.type=REGION_ATTACH_NEW;
1256 data.u.n.param=fn_param;
1258 return mplex_do_attach(mplex, param, &data);
1262 #define MPLEX_ATTACH_SET_FLAGS (MPLEX_ATTACH_GEOM| \
1263 MPLEX_ATTACH_SIZEPOLICY| \
1267 WRegion *mplex_attach_simple(WMPlex *mplex, WRegion *reg, int flags)
1269 WMPlexAttachParams param;
1270 WRegionAttachData data;
1272 param.flags=flags&~MPLEX_ATTACH_SET_FLAGS;
1274 data.type=REGION_ATTACH_REPARENT;
1277 return mplex_do_attach(mplex, ¶m, &data);
1281 static void get_params(WMPlex *mplex, ExtlTab tab, int mask,
1282 WMPlexAttachParams *par)
1288 if(extl_table_gets_i(tab, "level", &tmp)){
1289 if(tmp>=0 && ok&MPLEX_ATTACH_LEVEL){
1290 par->flags|=MPLEX_ATTACH_LEVEL;
1295 if(extl_table_is_bool_set(tab, "modal"))
1296 par->flags|=MPLEX_ATTACH_MODAL&ok;
1298 if(extl_table_is_bool_set(tab, "unnumbered"))
1299 par->flags|=MPLEX_ATTACH_UNNUMBERED&ok;
1301 if(extl_table_is_bool_set(tab, "switchto"))
1302 par->flags|=MPLEX_ATTACH_SWITCHTO&ok;
1304 if(extl_table_is_bool_set(tab, "hidden"))
1305 par->flags|=MPLEX_ATTACH_HIDDEN&ok;
1307 if(extl_table_gets_i(tab, "index", &(par->index)))
1308 par->flags|=MPLEX_ATTACH_INDEX&ok;
1310 if(extl_table_gets_i(tab, "sizepolicy", &tmp)){
1311 if(ok&MPLEX_ATTACH_SIZEPOLICY){
1312 par->flags|=MPLEX_ATTACH_SIZEPOLICY;
1317 if(extl_table_gets_rectangle(tab, "geom", &par->geom))
1318 par->flags|=MPLEX_ATTACH_GEOM&ok;
1323 * Attach and reparent existing region \var{reg} to \var{mplex}.
1324 * The table \var{param} may contain the fields \var{index} and
1325 * \var{switchto} that are interpreted as for \fnref{WMPlex.attach_new}.
1328 WRegion *mplex_attach(WMPlex *mplex, WRegion *reg, ExtlTab param)
1330 WMPlexAttachParams par=MPLEXATTACHPARAMS_INIT;
1331 WRegionAttachData data;
1336 get_params(mplex, param, 0, &par);
1338 data.type=REGION_ATTACH_REPARENT;
1341 return mplex_do_attach(mplex, &par, &data);
1345 WRegion *mplex_attach_new_(WMPlex *mplex, WMPlexAttachParams *par,
1346 int mask, ExtlTab param)
1348 WRegionAttachData data;
1350 get_params(mplex, param, mask, par);
1352 data.type=REGION_ATTACH_LOAD;
1355 return mplex_do_attach(mplex, par, &data);
1360 * Create a new region to be managed by \var{mplex}. At least the following
1361 * fields in \var{param} are understood (all but \var{type} are optional).
1363 * \begin{tabularx}{\linewidth}{lX}
1364 * \tabhead{Field & Description}
1365 * \var{type} & (string) Class name (a string) of the object to be created. \\
1366 * \var{name} & (string) Name of the object to be created (a string). \\
1367 * \var{switchto} & (boolean) Should the region be switched to (boolean)? \\
1368 * \var{unnumbered} & (boolean) Do not put on the numbered mutually
1369 * exclusive list. \\
1370 * \var{index} & (integer) Index on this list, same as for
1371 * \fnref{WMPlex.set_index}. \\
1372 * \var{level} & (integer) Stacking level. \\
1373 * \var{modal} & (boolean) Shortcut for modal stacking level. \\
1374 * \var{hidden} & (boolean) Attach hidden, if not prevented
1375 * by e.g. the mutually exclusive list being empty.
1376 * This option overrides \var{switchto}. \\
1377 * \var{sizepolicy} & (integer) Size policy. \\
1378 * \var{geom} & (table) Geometry specification. \\
1381 * In addition parameters to the region to be created are passed in this
1385 WRegion *mplex_attach_new(WMPlex *mplex, ExtlTab param)
1387 WMPlexAttachParams par=MPLEXATTACHPARAMS_INIT;
1389 return mplex_attach_new_(mplex, &par, 0, param);
1393 static bool mplex_handle_drop(WMPlex *mplex, int x, int y,
1396 WRegion *curr=mplex_mx_current(mplex);
1398 /* This code should handle dropping tabs on floating workspaces. */
1399 if(curr && HAS_DYN(curr, region_handle_drop)){
1401 region_rootpos(curr, &rx, &ry);
1402 if(rectangle_contains(®ION_GEOM(curr), x-rx, y-ry)){
1403 if(region_handle_drop(curr, x, y, dropped))
1408 return (NULL!=mplex_attach_simple(mplex, dropped, MPLEX_ATTACH_SWITCHTO));
1412 WPHolder *mplex_prepare_manage(WMPlex *mplex, const WClientWin *cwin,
1413 const WManageParams *param, int redir)
1415 WMPlexAttachParams ap;
1420 if(redir==MANAGE_REDIR_STRICT_YES || redir==MANAGE_REDIR_PREFER_YES){
1421 WStacking *cur=mplex_current_node(mplex);
1424 ph=region_prepare_manage(cur->reg, cwin, param,
1425 MANAGE_REDIR_PREFER_YES);
1430 if(mplex->mx_current!=NULL && mplex->mx_current->st!=cur){
1431 ph=region_prepare_manage(mplex->mx_current->st->reg,
1433 MANAGE_REDIR_PREFER_YES);
1439 if(redir==MANAGE_REDIR_STRICT_YES)
1442 ap.flags=((param->switchto ? MPLEX_ATTACH_SWITCHTO : 0)
1443 |MPLEX_ATTACH_SIZEPOLICY);
1444 ap.szplcy=SIZEPOLICY_FULL_EXACT;
1446 mph=create_mplexpholder(mplex, NULL, &ap);
1449 WGroupedPHolder *gph=create_groupedpholder((WPHolder*)mph);
1451 return (WPHolder*)gph;
1454 return (WPHolder*)mph;
1464 void mplex_managed_remove(WMPlex *mplex, WRegion *sub)
1466 bool mx=FALSE, hadfocus=FALSE, mcf;
1467 WRegion *stdisp=(WRegion*)(mplex->stdispwatch.obj);
1468 WStacking *node, *next=NULL;
1470 mcf=region_may_control_focus((WRegion*)mplex);
1473 if(CAN_MANAGE_STDISP(sub) &&
1474 region_managed_within((WRegion*)mplex, stdisp)==sub){
1475 region_unmanage_stdisp(sub, TRUE, TRUE);
1476 region_detach_manager(stdisp);
1480 node=mplex_find_stacking(mplex, sub);
1485 hadfocus=(mplex_current_node(mplex)==node);
1487 if(node->lnode!=NULL){
1488 if(mplex->mx_current==node->lnode){
1491 mplex->mx_current=NULL;
1492 lnext=LIST_PREV(mplex->mx_list, node->lnode, next, prev);
1494 lnext=LIST_NEXT(mplex->mx_list, node->lnode, next, prev);
1495 if(lnext==node->lnode)
1502 mplex_move_phs_before(mplex, node->lnode);
1503 llist_unlink(&(mplex->mx_list), node->lnode);
1511 UNLINK_ITEM(mplex->mgd, node, mgr_next, mgr_prev);
1513 mplex_unstack(mplex, node);
1515 stacking_unassoc(node);
1516 stacking_free(node);
1518 region_unset_manager(sub, (WRegion*)mplex);
1520 if(OBJ_IS_BEING_DESTROYED(mplex))
1524 mplex_do_node_display(mplex, next, FALSE);
1527 mplex_refocus(mplex, next, FALSE);
1530 mplex_managed_changed(mplex, MPLEX_CHANGE_REMOVE, next!=NULL, sub);
1534 bool mplex_rescue_clientwins(WMPlex *mplex, WRescueInfo *info)
1539 mplex_iter_init(&tmp, mplex);
1540 ret1=region_rescue_some_clientwins((WRegion*)mplex, info,
1541 (WRegionIterator*)mplex_iter,
1544 ret2=region_rescue_child_clientwins((WRegion*)mplex, info);
1546 return (ret1 && ret2);
1551 void mplex_child_removed(WMPlex *mplex, WRegion *sub)
1553 if(sub!=NULL && sub==(WRegion*)(mplex->stdispwatch.obj)){
1554 watch_reset(&(mplex->stdispwatch));
1555 mplex_set_stdisp(mplex, NULL, NULL);
1563 /*{{{ Status display support */
1566 # define offsetof(T,F) ((size_t)((char*)&((T*)0L)->F-(char*)0L))
1569 #define STRUCTOF(T, F, FADDR) \
1570 ((T*)((char*)(FADDR)-offsetof(T, F)))
1573 static void stdisp_watch_handler(Watch *watch, Obj *obj)
1575 /*WMPlex *mplex=STRUCTOF(WMPlex, stdispinfo,
1576 STRUCTOF(WMPlexSTDispInfo, regwatch, watch));
1577 WMPlexSTDispInfo *di=&(mplex->stdispinfo);
1578 WGenWS *ws=OBJ_CAST(REGION_MANAGER(obj), WGenWS);
1580 if(ioncore_g.opmode!=IONCORE_OPMODE_DEINIT && ws!=NULL)
1581 genws_unmanage_stdisp(ws, TRUE, FALSE);*/
1585 bool mplex_set_stdisp(WMPlex *mplex, WRegion *reg,
1586 const WMPlexSTDispInfo *din)
1588 WRegion *oldstdisp=(WRegion*)(mplex->stdispwatch.obj);
1591 assert(reg==NULL || (reg==oldstdisp) ||
1592 (REGION_MANAGER(reg)==NULL &&
1593 REGION_PARENT(reg)==(WWindow*)mplex));
1595 if(oldstdisp!=NULL){
1596 mgr=region_managed_within((WRegion*)mplex, oldstdisp);
1598 if(!CAN_MANAGE_STDISP(mgr))
1603 mplex->stdispinfo=*din;
1606 watch_reset(&(mplex->stdispwatch));
1609 region_unmanage_stdisp(mgr, TRUE, FALSE);
1611 region_detach_manager(oldstdisp);
1614 watch_setup(&(mplex->stdispwatch), (Obj*)reg, stdisp_watch_handler);
1616 mplex_remanage_stdisp(mplex);
1619 if(oldstdisp!=NULL && oldstdisp!=reg)
1620 mainloop_defer_destroy((Obj*)oldstdisp);
1626 void mplex_get_stdisp(WMPlex *mplex, WRegion **reg, WMPlexSTDispInfo *di)
1628 *di=mplex->stdispinfo;
1629 *reg=(WRegion*)mplex->stdispwatch.obj;
1633 static StringIntMap pos_map[]={
1634 {"tl", MPLEX_STDISP_TL},
1635 {"tr", MPLEX_STDISP_TR},
1636 {"bl", MPLEX_STDISP_BL},
1637 {"br", MPLEX_STDISP_BR},
1642 static bool do_attach_stdisp(WRegion *mplex, WRegion *reg, void *unused)
1644 /* We do not actually manage the stdisp. */
1650 * Set/create status display for \var{mplex}. Table is a standard
1651 * description of the object to be created (as passed to e.g.
1652 * \fnref{WMPlex.attach_new}). In addition, the following fields are
1655 * \begin{tabularx}{\linewidth}{lX}
1656 * \tabhead{Field & Description}
1657 * \var{pos} & The corner of the screen to place the status display
1658 * in. One of \code{tl}, \code{tr}, \var{bl} or \var{br}. \\
1659 * \var{action} & If this field is set to \code{keep}, \var{corner}
1660 * and \var{orientation} are changed for the existing
1661 * status display. If this field is set to \var{remove},
1662 * the existing status display is removed. If this
1663 * field is not set or is set to \code{replace}, a
1664 * new status display is created and the old, if any,
1668 EXTL_EXPORT_AS(WMPlex, set_stdisp)
1669 WRegion *mplex_set_stdisp_extl(WMPlex *mplex, ExtlTab t)
1671 WRegion *stdisp=NULL;
1672 WMPlexSTDispInfo din=mplex->stdispinfo;
1675 if(extl_table_gets_s(t, "pos", &s)){
1676 din.pos=stringintmap_value(pos_map, s, -1);
1678 warn(TR("Invalid position setting."));
1683 extl_table_gets_b(t, "fullsize", &(din.fullsize));
1686 extl_table_gets_s(t, "action", &s);
1688 if(s==NULL || strcmp(s, "replace")==0){
1689 WRegionAttachData data;
1695 fp.g.w=REGION_GEOM(mplex).w;
1696 fp.g.h=REGION_GEOM(mplex).h;
1697 fp.mode=REGION_FIT_BOUNDS|REGION_FIT_WHATEVER;
1699 /* Full mplex size is stupid so use saved geometry initially
1702 extl_table_gets_rectangle(t, "geom", &(fp.g));
1704 data.type=REGION_ATTACH_LOAD;
1707 stdisp=region_attach_helper((WRegion*)mplex,
1708 (WWindow*)mplex, &fp,
1709 do_attach_stdisp, NULL,
1715 }else if(strcmp(s, "keep")==0){
1716 stdisp=(WRegion*)(mplex->stdispwatch.obj);
1717 }else if(strcmp(s, "remove")!=0){
1718 warn(TR("Invalid action setting."));
1722 if(!mplex_set_stdisp(mplex, stdisp, &din)){
1723 destroy_obj((Obj*)stdisp);
1731 static ExtlTab mplex_do_get_stdisp_extl(WMPlex *mplex, bool fullconfig)
1733 WRegion *reg=(WRegion*)mplex->stdispwatch.obj;
1737 return extl_table_none();
1740 t=region_get_configuration(reg);
1741 extl_table_sets_rectangle(t, "geom", ®ION_GEOM(reg));
1743 t=extl_create_table();
1744 extl_table_sets_o(t, "reg", (Obj*)reg);
1747 if(t!=extl_table_none()){
1748 WMPlexSTDispInfo *di=&(mplex->stdispinfo);
1749 extl_table_sets_s(t, "pos", stringintmap_key(pos_map, di->pos, NULL));
1750 extl_table_sets_b(t, "fullsize", di->fullsize);
1757 * Get status display information. See \fnref{WMPlex.get_stdisp} for
1758 * information on the fields.
1761 EXTL_EXPORT_AS(WMPlex, get_stdisp)
1762 ExtlTab mplex_get_stdisp_extl(WMPlex *mplex)
1764 return mplex_do_get_stdisp_extl(mplex, FALSE);
1774 void mplex_managed_geom_default(const WMPlex *mplex, WRectangle *geom)
1778 geom->w=REGION_GEOM(mplex).w;
1779 geom->h=REGION_GEOM(mplex).h;
1783 void mplex_managed_geom(const WMPlex *mplex, WRectangle *geom)
1785 CALL_DYN(mplex_managed_geom, mplex, (mplex, geom));
1789 void mplex_size_changed(WMPlex *mplex, bool wchg, bool hchg)
1791 CALL_DYN(mplex_size_changed, mplex, (mplex, wchg, hchg));
1795 void mplex_managed_changed(WMPlex *mplex, int mode, bool sw, WRegion *mgd)
1797 CALL_DYN(mplex_managed_changed, mplex, (mplex, mode, sw, mgd));
1801 int mplex_default_index(WMPlex *mplex)
1803 int idx=LLIST_INDEX_LAST;
1804 CALL_DYN_RET(idx, int, mplex_default_index, mplex, (mplex));
1809 /* For regions managing stdisps */
1811 void region_manage_stdisp(WRegion *reg, WRegion *stdisp,
1812 const WMPlexSTDispInfo *info)
1814 CALL_DYN(region_manage_stdisp, reg, (reg, stdisp, info));
1818 void region_unmanage_stdisp(WRegion *reg, bool permanent, bool nofocus)
1820 CALL_DYN(region_unmanage_stdisp, reg, (reg, permanent, nofocus));
1827 /*{{{ Changed hook helper */
1830 static const char *mode2str(int mode)
1832 if(mode==MPLEX_CHANGE_SWITCHONLY)
1833 return "switchonly";
1834 else if(mode==MPLEX_CHANGE_REORDER)
1836 else if(mode==MPLEX_CHANGE_ADD)
1838 else if(mode==MPLEX_CHANGE_REMOVE)
1844 static bool mrsh_chg(ExtlFn fn, WMPlexChangedParams *p)
1846 ExtlTab t=extl_create_table();
1849 extl_table_sets_o(t, "reg", (Obj*)p->reg);
1850 extl_table_sets_s(t, "mode", mode2str(p->mode));
1851 extl_table_sets_b(t, "sw", p->sw);
1852 extl_table_sets_o(t, "sub", (Obj*)p->sub);
1855 ret=extl_call(fn, "t", NULL, t);
1856 extl_unprotect(NULL);
1858 extl_unref_table(t);
1864 void mplex_call_changed_hook(WMPlex *mplex, WHook *hook,
1865 int mode, bool sw, WRegion *reg)
1867 WMPlexChangedParams p;
1874 hook_call_p(hook, &p, (WHookMarshallExtl*)mrsh_chg);
1884 static void save_node(WMPlex *mplex, ExtlTab subs, int *n,
1885 WStacking *node, bool unnumbered)
1889 st=region_get_configuration(node->reg);
1891 if(st!=extl_table_none()){
1892 if(mplex->mx_current!=NULL && node==mplex->mx_current->st)
1893 extl_table_sets_b(st, "switchto", TRUE);
1894 extl_table_sets_i(st, "sizepolicy", node->szplcy);
1895 extl_table_sets_i(st, "level", node->level);
1896 g=extl_table_from_rectangle(®ION_GEOM(node->reg));
1897 extl_table_sets_t(st, "geom", g);
1898 extl_unref_table(g);
1899 if(STACKING_IS_HIDDEN(node))
1900 extl_table_sets_b(st, "hidden", TRUE);
1902 extl_table_sets_b(st, "unnumbered", TRUE);
1904 extl_table_seti_t(subs, ++(*n), st);
1905 extl_unref_table(st);
1910 ExtlTab mplex_get_configuration(WMPlex *mplex)
1912 ExtlTab tab, subs, stdisptab;
1919 tab=region_get_base_configuration((WRegion*)mplex);
1921 subs=extl_create_table();
1922 extl_table_sets_t(tab, "managed", subs);
1924 /* First the numbered/mutually exclusive nodes */
1925 FOR_ALL_NODES_ON_LLIST(lnode, mplex->mx_list, ltmp){
1926 save_node(mplex, subs, &n, lnode->st, FALSE);
1929 FOR_ALL_NODES_IN_MPLEX(mplex, node, tmp){
1930 if(node->lnode==NULL)
1931 save_node(mplex, subs, &n, node, TRUE);
1934 extl_unref_table(subs);
1936 /*stdisptab=mplex_do_get_stdisp_extl(mplex, TRUE);
1937 if(stdisptab!=extl_table_none()){
1938 extl_table_sets_t(tab, "stdisp", stdisptab);
1939 extl_unref_table(stdisptab);
1946 static WMPlex *tmp_mplex=NULL;
1947 static WMPlexAttachParams *tmp_par=NULL;
1949 static WPHolder *pholder_callback()
1951 assert(tmp_mplex!=NULL);
1952 return (WPHolder*)create_mplexpholder(tmp_mplex, NULL, tmp_par);
1956 void mplex_load_contents(WMPlex *mplex, ExtlTab tab)
1958 ExtlTab substab, subtab;
1961 /*if(extl_table_gets_t(tab, "stdisp", &subtab)){
1962 mplex_set_stdisp_extl(mplex, subtab);
1963 extl_unref_table(subtab);
1966 if(extl_table_gets_t(tab, "managed", &substab) ||
1967 extl_table_gets_t(tab, "subs", &substab)){
1968 n=extl_table_get_n(substab);
1969 for(i=1; i<=n; i++){
1970 if(extl_table_geti_t(substab, i, &subtab)){
1971 /*mplex_attach_new(mplex, subtab);*/
1972 WMPlexAttachParams par=MPLEXATTACHPARAMS_INIT;
1973 WRegionAttachData data;
1976 get_params(mplex, subtab, 0, &par);
1978 par.flags|=MPLEX_ATTACH_INDEX;
1979 par.index=LLIST_INDEX_LAST;
1984 data.type=REGION_ATTACH_LOAD;
1987 ioncore_set_sm_pholder_callback(pholder_callback);
1989 mplex_do_attach(mplex, &par, &data);
1993 extl_unref_table(subtab);
1996 extl_unref_table(substab);
2001 WRegion *mplex_load(WWindow *par, const WFitParams *fp, ExtlTab tab)
2003 WMPlex *mplex=create_mplex(par, fp);
2005 mplex_load_contents(mplex, tab);
2006 return (WRegion*)mplex;
2013 /*{{{ Dynfuntab and class info */
2016 static DynFunTab mplex_dynfuntab[]={
2017 {region_do_set_focus,
2018 mplex_do_set_focus},
2020 {region_managed_remove,
2021 mplex_managed_remove},
2023 {region_managed_rqgeom,
2024 mplex_managed_rqgeom},
2026 {(DynFun*)region_managed_prepare_focus,
2027 (DynFun*)mplex_managed_prepare_focus},
2029 {(DynFun*)region_handle_drop,
2030 (DynFun*)mplex_handle_drop},
2032 {region_map, mplex_map},
2033 {region_unmap, mplex_unmap},
2035 {(DynFun*)region_prepare_manage,
2036 (DynFun*)mplex_prepare_manage},
2038 {(DynFun*)region_current,
2039 (DynFun*)mplex_current},
2041 {(DynFun*)region_rescue_clientwins,
2042 (DynFun*)mplex_rescue_clientwins},
2044 {(DynFun*)region_get_configuration,
2045 (DynFun*)mplex_get_configuration},
2047 {mplex_managed_geom,
2048 mplex_managed_geom_default},
2050 {(DynFun*)region_fitrep,
2051 (DynFun*)mplex_fitrep},
2053 {region_child_removed,
2054 mplex_child_removed},
2056 {(DynFun*)region_managed_get_pholder,
2057 (DynFun*)mplex_managed_get_pholder},
2059 {(DynFun*)region_get_rescue_pholder_for,
2060 (DynFun*)mplex_get_rescue_pholder_for},
2062 {(DynFun*)region_navi_first,
2063 (DynFun*)mplex_navi_first},
2065 {(DynFun*)region_navi_next,
2066 (DynFun*)mplex_navi_next},
2068 {(DynFun*)region_managed_rqorder,
2069 (DynFun*)mplex_managed_rqorder},
2076 IMPLCLASS(WMPlex, WWindow, mplex_deinit, mplex_dynfuntab);