#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>


typedef struct task
{
	struct task *next;
	Window win;
	Pixmap icon;
	Pixmap mask;
	char *name;
	int pos_x;
	int width;
	unsigned int focused:1;
	unsigned int iconified:1;
	unsigned int icon_copied:1;
    unsigned int shaded:1; // bva
    unsigned int marked:1;
} task;


#define MWM_HINTS_DECORATIONS         (1L << 1)
typedef struct _mwmhints
{
	unsigned long flags;
	unsigned long functions;
	unsigned long decorations;
	long inputMode;
	unsigned long status;
} MWMHints;

// bva

int onlyMinmizedAppsFlag = 1;

#define MAX_APPLET  15

#define NO_APPLET   0
#define ARROW_PAGER 1
#define BOX_PAGER   2
#define CLOCK       3
#define TASK_AREA   4
#define WSPACE_NAME 5
#define MENU        6


// end bva

#define WIN_STATE_STICKY          (1<<0)	/* everyone knows sticky */
#define WIN_STATE_MINIMIZED       (1<<1)	/* ??? */
#define WIN_STATE_MAXIMIZED_VERT  (1<<2)	/* window in maximized V state */
#define WIN_STATE_MAXIMIZED_HORIZ (1<<3)	/* window in maximized H state */
#define WIN_STATE_HIDDEN          (1<<4)	/* not on taskbar but window visible */
#define WIN_STATE_SHADED          (1<<5)	/* shaded (NeXT style) */
#define WIN_STATE_HID_WORKSPACE   (1<<6)	/* not on current desktop */
#define WIN_STATE_HID_TRANSIENT   (1<<7)	/* owner of transient is hidden */
#define WIN_STATE_FIXED_POSITION  (1<<8)	/* window is fixed in position even */
#define WIN_STATE_ARRANGE_IGNORE  (1<<9)	/* ignore for auto arranging */

#define WIN_HINTS_SKIP_FOCUS      (1<<0)	/* "alt-tab" skips this win */
#define WIN_HINTS_SKIP_WINLIST    (1<<1)	/* not in win list */
#define WIN_HINTS_SKIP_TASKBAR    (1<<2)	/* not on taskbar */
#define WIN_HINTS_GROUP_TRANSIENT (1<<3)	/* ??????? */
#define WIN_HINTS_FOCUS_ON_CLICK  (1<<4)	/* app only accepts focus when clicked */
#define WIN_HINTS_DO_NOT_COVER    (1<<5)	/* attempt to not cover this window */


typedef enum fspanel_constants
{
    applet_width_c = 0,
    applet_right_align_c = 1,
    applet_left_align_c = 2, 
    applet_centre_align_c = 3,
    applet_fill_align_c = 4
    
} fspanel_constants_t;

typedef struct applet_info
{
    int width;
    int alignment;
} applet_info_t;



void gui_draw_vline( int x );
void gui_draw_string( char *str, int len, int x, int y );
 

int panel_get_winheight( void );
int panel_get_y_text_origin( void );
int panel_get_winwidth( void );
int panel_get_taskcount( void );
unsigned long panel_get_palette( int index );

int wm_get_workspace_count( void );
int wm_get_current_desktop( void );
Atom wm_get_workspace_atom( void );
Atom wm_get_winstate_atom( void );
Atom wm_get_winhints_atom( void );
Atom wm_get_winlayer_atom( void );
Atom wm_get_mwmhints_atom( void );
void wm_switch_desktop ( int rel );
char *wm_get_current_workspace_name( void );

XFontStruct * x_get_fontstruct( void );
Display *     x_get_display( void );
Window        x_get_window( void );
Window        x_get_root_window( void );
GC            x_get_foregroundGC( void );
int           x_get_screen( void );
int           x_get_screen_height( void );
int           x_get_screen_width( void );
