/* $XConsortium: GrabShellP.h /main/5 1995/07/15 20:51:26 drk $ */
/*
 *  @OSF_COPYRIGHT@
 *  COPYRIGHT NOTICE
 *  Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
 *  ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
 *  the full copyright text.
 */
/*
 * HISTORY
 */
#ifndef _XmGrabShellP_h
#define _XmGrabShellP_h

#include <Xm/GrabShell.h>
#include <Xm/XmP.h>
#include <X11/ShellP.h>

#ifdef __cplusplus
extern "C" {
#endif

#ifdef _SGIMOTIF
typedef struct __SG_XmGrabShellClassExtPart {
  SgRenderShadowsProc render_shadows;
  visual_state_array  default_state_array;
}_SG_XmGrabShellClassExtPart;

typedef struct __SG_XmGrabShellClassExt {
  _SgClassExtensionRec common;
  _SG_XmGrabShellClassExtPart grab_shell;
} _SG_XmGrabShellClassExtRec, *_SG_XmGrabShellClassExt;

typedef struct __SG_XmGrabShellExtPart {
  visual_state_array instance_state_array;
  int    visual_state;
  shaderptr shader;
  Boolean draw_frame;
  Boolean draw_internal_frame;
} _SG_XmGrabShellExtPart;

typedef struct __SG_XmGrabShellExt {
  _SgInstanceExtensionRec     common;   /* Stuff all instance rec's have */
  _SG_XmGrabShellExtPart      instance;
} _SG_XmGrabShellExtRec, *_SG_XmGrabShellExt;

#define _SG_GrabShellPtr(w) \
((_SG_XmGrabShellExt)(((XmGrabShellWidget)(w))->grab_shell._SG_vendorExtension))

#define _SG_GrabShellClassPtr(wc) \
((_SG_XmGrabShellClassExt)(((XmGrabShellClassRec*)(wc))-> \
                grab_shell_class._SG_vendorExtension))
#endif /* _SGIMOTIF */

/* The GrabShell instance record */

typedef struct 
{
  Cursor	cursor;
  Dimension	shadow_thickness;
  Pixel		top_shadow_color;
  Pixmap  	top_shadow_pixmap;
  Pixel   	bottom_shadow_color;
  Pixmap  	bottom_shadow_pixmap;
  GC      	top_shadow_GC;
  GC      	bottom_shadow_GC;
  Boolean	owner_events;
  int		grab_style;
  /* Internal fields */
  Time		post_time;
  Time		unpost_time;
  Boolean	mapped;
  Window	old_focus;
  int		old_revert_to;
#ifdef _SGIMOTIF
  _SG_XmGrabShellExt     _SG_vendorExtension;
#endif

} XmGrabShellPart;


/* Full instance record declaration */

typedef  struct _XmGrabShellRec 
{
  CorePart		core;
  CompositePart		composite;
  ShellPart		shell;
  WMShellPart		wm_shell;
  VendorShellPart	vendor_shell;
  XmGrabShellPart	grab_shell;
} XmGrabShellRec;

typedef  struct _XmGrabShellWidgetRec /* OBSOLETE (for compatibility only).*/
{
  CorePart		core;
  CompositePart		composite;
  ShellPart		shell;
  WMShellPart		wm_shell;
  VendorShellPart	vendor_shell;
  XmGrabShellPart	grab_shell;
} XmGrabShellWidgetRec;



/* GrabShell class structure */

typedef struct 
{
  XtPointer		extension;	 /* Pointer to extension record */
#ifdef _SGIMOTIF
  _SgClassExtension    _SG_vendorExtension;
#endif
} XmGrabShellClassPart;


/* Full class record declaration */

typedef struct _XmGrabShellClassRec 
{
  CoreClassPart	    	core_class;
  CompositeClassPart	composite_class;
  ShellClassPart	shell_class;
  WMShellClassPart	wm_shell_class;
  VendorShellClassPart	vendor_shell_class;
  XmGrabShellClassPart  grab_shell_class;
} XmGrabShellClassRec;


externalref XmGrabShellClassRec  xmGrabShellClassRec;

/********    Private Function Declarations    ********/

/********    End Private Function Declarations    ********/


#ifdef __cplusplus
}  /* Close scope of 'extern "C"' declaration which encloses file. */
#endif

#endif /* _XmGrabShellP_h */
/* DON'T ADD STUFF AFTER THIS #endif */
