X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=ioncore%2Fgroupedpholder.c;h=cce1a16cc4dd75bbd672c2ca995dce769a428f88;hb=ae4260bb64817c11f9a7140324cd3e3ba113e297;hp=ac3b6924d751ebb7ddf416c369cc454f816a3268;hpb=8366314611bf30a0f31d25bf5f5023186fa87692;p=ion3.git diff --git a/ioncore/groupedpholder.c b/ioncore/groupedpholder.c index ac3b692..cce1a16 100644 --- a/ioncore/groupedpholder.c +++ b/ioncore/groupedpholder.c @@ -1,12 +1,9 @@ /* * ion/ioncore/groupedpholder.c * - * Copyright (c) Tuomo Valkonen 2005-2006. + * Copyright (c) Tuomo Valkonen 2005-2007. * - * 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 @@ -127,7 +124,7 @@ WRegion *groupedpholder_do_attach(WGroupedPHolder *ph, int flags, data2.u.n.fn=grouped_handler; data2.u.n.param=data; - return pholder_attach_(ph->cont, flags, &data2); + return pholder_do_attach(ph->cont, flags, &data2); } @@ -139,19 +136,32 @@ WRegion *groupedpholder_do_attach(WGroupedPHolder *ph, int flags, bool groupedpholder_do_goto(WGroupedPHolder *ph) { - if(ph->cont!=NULL) - return pholder_goto(ph->cont); - - return FALSE; + return (ph->cont!=NULL + ? pholder_goto(ph->cont) + : FALSE); } WRegion *groupedpholder_do_target(WGroupedPHolder *ph) { - if(ph->cont!=NULL) - return pholder_target(ph->cont); + return (ph->cont!=NULL + ? pholder_target(ph->cont) + : NULL); +} + + +WPHolder *groupedpholder_do_root(WGroupedPHolder *ph) +{ + WPHolder *root; + + if(ph->cont==NULL) + return NULL; + + root=pholder_root(ph->cont); - return NULL; + return (root!=ph->cont + ? root + : &ph->ph); } @@ -170,6 +180,9 @@ static DynFunTab groupedpholder_dynfuntab[]={ {(DynFun*)pholder_do_target, (DynFun*)groupedpholder_do_target}, + + {(DynFun*)pholder_do_root, + (DynFun*)groupedpholder_do_root}, END_DYNFUNTAB };