X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=ioncore%2Fattach.c;h=0ee74ab01743ba24a9b856fb3d2368f352e2c0eb;hp=a1dc7addf23200034454ea5281bcffaccefb91d8;hb=HEAD;hpb=de22e45179cb3bafa490294d31d47f361047a30a diff --git a/ioncore/attach.c b/ioncore/attach.c index a1dc7ad..0ee74ab 100644 --- a/ioncore/attach.c +++ b/ioncore/attach.c @@ -1,12 +1,9 @@ /* * ion/ioncore/attach.c * - * Copyright (c) Tuomo Valkonen 1999-2007. + * Copyright (c) Tuomo Valkonen 1999-2009. * - * Ion is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. + * See the included file LICENSE for details. */ #include @@ -119,10 +116,14 @@ static WRegion *doit_reparent(WRegion *mgr, } -static WRegion *wrap_load(WWindow *par, const WFitParams *fp, - ExtlTab *tab) +typedef struct{ + ExtlTab tab; + WPHolder **sm_ph_p; +} WLP; + +static WRegion *wrap_load(WWindow *par, const WFitParams *fp, WLP *p) { - return create_region_load(par, fp, *tab); + return create_region_load(par, fp, p->tab, p->sm_ph_p); } @@ -132,7 +133,7 @@ WRegion *ioncore_newly_created=NULL; static WRegion *doit_load(WRegion *mgr, WWindow *par, const WFitParams *fp, WRegionDoAttachFn *cont, void *cont_param, - ExtlTab tab) + ExtlTab tab, WPHolder **sm_ph) { WRegion *reg=NULL; @@ -148,11 +149,25 @@ static WRegion *doit_load(WRegion *mgr, if(reg!=NULL){ return doit_reparent(mgr, par, fp, cont, cont_param, reg); }else{ + WLP p; + p.tab=tab; + p.sm_ph_p=sm_ph; + return doit_new(mgr, par, fp, cont, cont_param, - (WRegionCreateFn*)wrap_load, &tab); + (WRegionCreateFn*)wrap_load, &p); } } + +WRegion *region_attach_load_helper(WRegion *mgr, + WWindow *par, const WFitParams *fp, + WRegionDoAttachFn *fn, void *fn_param, + ExtlTab tab, WPHolder **sm_ph) +{ + return doit_load(mgr, par, fp, fn, fn_param, tab, sm_ph); +} + + WRegion *region_attach_helper(WRegion *mgr, WWindow *par, const WFitParams *fp, WRegionDoAttachFn *fn, void *fn_param, @@ -162,7 +177,7 @@ WRegion *region_attach_helper(WRegion *mgr, return doit_new(mgr, par, fp, fn, fn_param, data->u.n.fn, data->u.n.param); }else if(data->type==REGION_ATTACH_LOAD){ - return doit_load(mgr, par, fp, fn, fn_param, data->u.tab); + return doit_load(mgr, par, fp, fn, fn_param, data->u.tab, NULL); }else if(data->type==REGION_ATTACH_REPARENT){ return doit_reparent(mgr, par, fp, fn, fn_param, data->u.reg); }else{