refactor code for removing children from a con

Let’s see how this callback stuff will work out. If it doesn’t work out well,
we will remove it.
This commit is contained in:
Michael Stapelberg
2011-02-14 18:08:36 +01:00
parent a5e075c154
commit 28dd226259
4 changed files with 31 additions and 22 deletions

View File

@ -358,6 +358,9 @@ struct Con {
TAILQ_ENTRY(Con) focused;
TAILQ_ENTRY(Con) all_cons;
TAILQ_ENTRY(Con) floating_windows;
/** callbacks */
void(*on_remove_child)(Con *);
};
#endif

View File

@ -34,6 +34,8 @@
} \
while (0)
#define CALL(obj, member, ...) obj->member(obj, ## __VA_ARGS__)
int min(int a, int b);
int max(int a, int b);
bool rect_contains(Rect rect, uint32_t x, uint32_t y);