/*
* 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 <libtu/objp.h>
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);
}
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);
}
{(DynFun*)pholder_do_target,
(DynFun*)groupedpholder_do_target},
+
+ {(DynFun*)pholder_do_root,
+ (DynFun*)groupedpholder_do_root},
END_DYNFUNTAB
};