mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-11 03:43:29 +00:00
add stuff
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@800 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
16
src/core.c
16
src/core.c
@@ -676,3 +676,19 @@ void MwReparent(MwWidget handle, MwWidget new_parent) {
|
||||
handle->parent = new_parent;
|
||||
arrput(new_parent->children, handle);
|
||||
}
|
||||
|
||||
MwClass MwGetClass(MwWidget handle) {
|
||||
return handle->widget_class;
|
||||
}
|
||||
|
||||
MwWidget* MwGetChildren(MwWidget handle) {
|
||||
MwWidget* c = malloc(sizeof(*c) * (arrlen(handle->children) + 1));
|
||||
int i;
|
||||
|
||||
for(i = 0; i < arrlen(handle->children); i++) {
|
||||
c[i] = handle->children[i];
|
||||
}
|
||||
c[arrlen(handle->children)] = 0;
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user