#ifndef _SWM_
#define _SWM_

#include "global.hh"

#include <X11/Xlib.h>
#include <X11/Xft/Xft.h>
#include "boxes.hh"

extern Display *dpy;
extern unsigned long screen;
extern Rect	root;
extern Window	root_window;
extern int	root_depth;
extern Colormap	root_colormap;
extern Visual*	root_visual;
extern char *home_dir;

extern int swm_mode;
#define MODE_RUN 0
#define MODE_DONE 1
#define MODE_RESTART 2
#define MODE_SCROLL 3
#define MODE_SELECT_WIN 4
#define MODE_MENU 5

#define SWM_CENTER_PLACEMENT	(1L<<0)
#define SWM_OPAQUE_MOVE		(1L<<1)
#define SWM_OPAQUE_RESIZE	(1L<<2)

extern char *restart_cmd; // what to do at restart

#include "misc.hh"

extern Cursor cursor;
extern int origin_stick;
extern int border_stick;
extern int gest_stick;
extern char *root_xf;

extern Atom _XA_WM_CHANGE_STATE;
extern Atom _XA_WM_STATE;
extern Atom _XA_WM_PROTOCOLS;
extern Atom _XA_WM_TAKE_FOCUS;
extern Atom _XA_WM_DELETE_WINDOW;
extern Atom _XA_WM_DESKTOP;
extern Atom _XA_WM_COMMAND;

extern Atom _XA_MOTIF_WM_HINTS;
extern Atom _XA_SWM_HINTS;
extern Atom _XA_SWM_PAGER;

extern Atom _XA_NET_WM_NAME;
extern Atom _XA_NET_WM_ICON_NAME;
extern Atom UTF8_STRING;
 
extern GC OutlineGC;
extern GC InfoGC;

extern int swm_done ();

extern int swm_flags;

#endif
