/* $Id: ShellP.h,v 1.1 1997/04/15 10:07:15 archer Exp $
 *	SHELLP.H - Widget WM-capable
 *
 * Handles geometry change, key press, accelerators, exit requests
 */
#ifndef _widget_shellp_h_included
#define _widget_shellp_h_included
#include <Widget/WidgetsP.h>
#include <Widget/Shell.h>


/**
 ** Private types
 **/
typedef struct x11__key_do {
	struct x11__key_do	*next;
	KeySym			key;
	int			modifiers;
	X11_callback		call;
	X11_widget		requester;
	void			*data;
} x11__key;


typedef struct {
	x11__core	core;
/*
 * Shell-specific
 */
	X11_widget	current_default;
	X11_widget	current_focus;
	x11__key	*accelerators;
	X11_callback	on_exitrequest;
	void		*user_data;
/*
 * Visual
 */
	X11_icon	*icon;
	char		*title;
/*
 * Avoid recursions
 */
	boolean		reshuffling;
	boolean		shuffle_again;
	boolean		has_keyboard_focus;
} x11__shell;
#define W_SHELL		((x11__shell *)wdg)


/**
 ** Private variables
 **/
extern KeySym		x11__key_sym;
extern unsigned int	x11__key_mods;
extern char		x11__key_buffer[];


/**
 ** Prototypes
 **/
extern void	x11__default_gets(X11_widget);
extern void	x11__default_loses(X11_widget);
extern void	x11__focus_gets(X11_widget);
extern void	x11__focus_might(X11_widget);
extern void	x11__focus_loses(X11_widget);

extern void	x11__key_act(X11_widget,XEvent *);
extern void	x11__shell_cleanup(X11_widget,XEvent *);
extern char	*x11__key_translate(XKeyEvent *);


#endif /*_widget_shellp_h_included*/
