#ifndef FNS_H
#define FNS_H

#include "dat.h"

/* 9box.c */
Window selectwin(Box *);
Window dump_tree(Box *, Window, int);
char * getprop(Box *, Window, Atom);
Window reparent_window(Box *);


/* grab.c */
int grab(Box *, Window, int, Cursor, int);
void ungrab(Box *, XButtonEvent *);


/* manage.c */
void resize_window(BoxedWindow *);
void select_window(BoxedWindow *);
void remove_window(BoxedWindow *);
void release_window(BoxedWindow *);
void update_buttons_position(Box *);


/* buttons.c */
void draw_button(BoxedWindow *);
int button_height();
void move_button_to(Box *, int);

/* utils.c */
BoxedWindow * search_boxedwindow(Box *, Window);
BoxedWindow * search_boxedwindow_client(Box *, Window);
BoxedWindow * search_boxedwindow_button(Box *, Window);

/* wm.c */
void set_title(Box *, char *);
void set_constraints_from_window(Box *, Window);

#endif
