X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=ioncore%2Fgroupedpholder.c;fp=ioncore%2Fgroupedpholder.c;h=4112372de8618ca63731ffef46091f0f6841e085;hp=ac3b6924d751ebb7ddf416c369cc454f816a3268;hb=803afbc1cd633f6c025bcd9537e9b7e9aedadd0d;hpb=8366314611bf30a0f31d25bf5f5023186fa87692 diff --git a/ioncore/groupedpholder.c b/ioncore/groupedpholder.c index ac3b692..4112372 100644 --- a/ioncore/groupedpholder.c +++ b/ioncore/groupedpholder.c @@ -1,7 +1,7 @@ /* * 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 @@ -127,7 +127,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 +139,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 +183,9 @@ static DynFunTab groupedpholder_dynfuntab[]={ {(DynFun*)pholder_do_target, (DynFun*)groupedpholder_do_target}, + + {(DynFun*)pholder_do_root, + (DynFun*)groupedpholder_do_root}, END_DYNFUNTAB };