Blame GLwDrawA.h

Packit 34ce77
/*
Packit 34ce77
 * (c) Copyright 1993, Silicon Graphics, Inc.
Packit 34ce77
 * ALL RIGHTS RESERVED 
Packit 34ce77
 * Permission to use, copy, modify, and distribute this software for 
Packit 34ce77
 * any purpose and without fee is hereby granted, provided that the above
Packit 34ce77
 * copyright notice appear in all copies and that both the copyright notice
Packit 34ce77
 * and this permission notice appear in supporting documentation, and that 
Packit 34ce77
 * the name of Silicon Graphics, Inc. not be used in advertising
Packit 34ce77
 * or publicity pertaining to distribution of the software without specific,
Packit 34ce77
 * written prior permission. 
Packit 34ce77
 *
Packit 34ce77
 * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
Packit 34ce77
 * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
Packit 34ce77
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
Packit 34ce77
 * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
Packit 34ce77
 * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
Packit 34ce77
 * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
Packit 34ce77
 * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
Packit 34ce77
 * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
Packit 34ce77
 * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
Packit 34ce77
 * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
Packit 34ce77
 * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
Packit 34ce77
 * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
Packit 34ce77
 * 
Packit 34ce77
 * 
Packit 34ce77
 * US Government Users Restricted Rights 
Packit 34ce77
 * Use, duplication, or disclosure by the Government is subject to
Packit 34ce77
 * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
Packit 34ce77
 * (c)(1)(ii) of the Rights in Technical Data and Computer Software
Packit 34ce77
 * clause at DFARS 252.227-7013 and/or in similar or successor
Packit 34ce77
 * clauses in the FAR or the DOD or NASA FAR Supplement.
Packit 34ce77
 * Unpublished-- rights reserved under the copyright laws of the
Packit 34ce77
 * United States.  Contractor/manufacturer is Silicon Graphics,
Packit 34ce77
 * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
Packit 34ce77
 *
Packit 34ce77
 * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
Packit 34ce77
 */
Packit 34ce77
#ifndef _GLwDrawA_h
Packit 34ce77
#define _GLwDrawA_h
Packit 34ce77
Packit 34ce77
#include <GL/glx.h>
Packit 34ce77
#include <GL/gl.h>
Packit 34ce77
Packit 34ce77
/****************************************************************
Packit 34ce77
 *
Packit 34ce77
 * GLwDrawingArea widgets
Packit 34ce77
 *
Packit 34ce77
 ****************************************************************/
Packit 34ce77
Packit 34ce77
/* Resources:
Packit 34ce77
Packit 34ce77
 Name		     Class		RepType		Default Value
Packit 34ce77
 ----		     -----		-------		-------------
Packit 34ce77
 attribList	     AttribList		int *		NULL
Packit 34ce77
 visualInfo	     VisualInfo		VisualInfo	NULL
Packit 34ce77
 installColormap     InstallColormap	Boolean		TRUE
Packit 34ce77
 allocateBackground  AllocateColors	Boolean		FALSE
Packit 34ce77
 allocateOtherColors AllocateColors	Boolean		FALSE
Packit 34ce77
 installBackground   InstallBackground	Boolean		TRUE
Packit 34ce77
 exposeCallback      Callback		Pointer		NULL
Packit 34ce77
 ginitCallback       Callback		Pointer		NULL
Packit 34ce77
 inputCallback       Callback		Pointer		NULL
Packit 34ce77
 resizeCallback      Callback		Pointer		NULL
Packit 34ce77
Packit 34ce77
*** The following resources all correspond to the GLX configuration
Packit 34ce77
*** attributes and are used to create the attribList if it is NULL
Packit 34ce77
 bufferSize	     BufferSize		int		0
Packit 34ce77
 level		     Level		int		0
Packit 34ce77
 rgba		     Rgba		Boolean		FALSE
Packit 34ce77
 doublebuffer	     Doublebuffer	Boolean		FALSE
Packit 34ce77
 stereo		     Stereo		Boolean		FALSE
Packit 34ce77
 auxBuffers	     AuxBuffers		int		0
Packit 34ce77
 redSize	     ColorSize		int		1
Packit 34ce77
 greenSize	     ColorSize		int		1
Packit 34ce77
 blueSize	     ColorSize		int		1
Packit 34ce77
 alphaSize	     AlphaSize		int		0
Packit 34ce77
 depthSize	     DepthSize		int		0
Packit 34ce77
 stencilSize	     StencilSize	int		0
Packit 34ce77
 accumRedSize	     AccumColorSize	int		0
Packit 34ce77
 accumGreenSize	     AccumColorSize	int		0
Packit 34ce77
 accumBlueSize	     AccumColorSize	int		0
Packit 34ce77
 accumAlphaSize	     AccumAlphaSize	int		0
Packit 34ce77
*/
Packit 34ce77
Packit 34ce77
#define GLwNattribList		"attribList"
Packit 34ce77
#define GLwCAttribList		"AttribList"
Packit 34ce77
#define GLwNvisualInfo		"visualInfo"
Packit 34ce77
#define GLwCVisualInfo		"VisualInfo"
Packit 34ce77
#define GLwRVisualInfo		"VisualInfo"
Packit 34ce77
Packit 34ce77
#define GLwNinstallColormap	"installColormap"
Packit 34ce77
#define GLwCInstallColormap	"InstallColormap"
Packit 34ce77
#define GLwNallocateBackground	"allocateBackground"
Packit 34ce77
#define GLwNallocateOtherColors	"allocateOtherColors"
Packit 34ce77
#define GLwCAllocateColors	"AllocateColors"
Packit 34ce77
#define GLwNinstallBackground	"installBackground"
Packit 34ce77
#define GLwCInstallBackground	"InstallBackground"
Packit 34ce77
Packit 34ce77
#define GLwCCallback		"Callback"
Packit 34ce77
#define GLwNexposeCallback	"exposeCallback"
Packit 34ce77
#define GLwNginitCallback	"ginitCallback"
Packit 34ce77
#define GLwNresizeCallback	"resizeCallback"
Packit 34ce77
#define GLwNinputCallback	"inputCallback"
Packit 34ce77
Packit 34ce77
#define GLwNbufferSize		"bufferSize"
Packit 34ce77
#define GLwCBufferSize		"BufferSize"
Packit 34ce77
#define GLwNlevel		"level"
Packit 34ce77
#define GLwCLevel		"Level"
Packit 34ce77
#define GLwNrgba		"rgba"
Packit 34ce77
#define GLwCRgba		"Rgba"
Packit 34ce77
#define GLwNdoublebuffer	"doublebuffer"
Packit 34ce77
#define GLwCDoublebuffer	"Doublebuffer"
Packit 34ce77
#define GLwNstereo		"stereo"
Packit 34ce77
#define GLwCStereo		"Stereo"
Packit 34ce77
#define GLwNauxBuffers		"auxBuffers"
Packit 34ce77
#define GLwCAuxBuffers		"AuxBuffers"
Packit 34ce77
#define GLwNredSize		"redSize"
Packit 34ce77
#define GLwNgreenSize		"greenSize"
Packit 34ce77
#define GLwNblueSize		"blueSize"
Packit 34ce77
#define GLwCColorSize		"ColorSize"
Packit 34ce77
#define GLwNalphaSize		"alphaSize"
Packit 34ce77
#define GLwCAlphaSize		"AlphaSize"
Packit 34ce77
#define GLwNdepthSize		"depthSize"
Packit 34ce77
#define GLwCDepthSize		"DepthSize"
Packit 34ce77
#define GLwNstencilSize		"stencilSize"
Packit 34ce77
#define GLwCStencilSize		"StencilSize"
Packit 34ce77
#define GLwNaccumRedSize	"accumRedSize"
Packit 34ce77
#define GLwNaccumGreenSize	"accumGreenSize"
Packit 34ce77
#define GLwNaccumBlueSize	"accumBlueSize"
Packit 34ce77
#define GLwCAccumColorSize	"AccumColorSize"
Packit 34ce77
#define GLwNaccumAlphaSize	"accumAlphaSize"
Packit 34ce77
#define GLwCAccumAlphaSize	"AccumAlphaSize"
Packit 34ce77
Packit 34ce77
#if (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
Packit 34ce77
#  define GLAPIVAR extern __attribute__((visibility("default")))
Packit 34ce77
#else
Packit 34ce77
#  define GLAPIVAR extern
Packit 34ce77
#endif
Packit 34ce77
Packit 34ce77
#ifdef __GLX_MOTIF
Packit 34ce77
Packit 34ce77
typedef struct _GLwMDrawingAreaClassRec	*GLwMDrawingAreaWidgetClass;
Packit 34ce77
typedef struct _GLwMDrawingAreaRec	*GLwMDrawingAreaWidget;
Packit 34ce77
Packit 34ce77
GLAPIVAR WidgetClass glwMDrawingAreaWidgetClass;
Packit 34ce77
Packit 34ce77
Packit 34ce77
#else 
Packit 34ce77
Packit 34ce77
typedef struct _GLwDrawingAreaClassRec	*GLwDrawingAreaWidgetClass;
Packit 34ce77
typedef struct _GLwDrawingAreaRec	*GLwDrawingAreaWidget;
Packit 34ce77
Packit 34ce77
GLAPIVAR WidgetClass glwDrawingAreaWidgetClass;
Packit 34ce77
Packit 34ce77
Packit 34ce77
#endif
Packit 34ce77
Packit 34ce77
Packit 34ce77
/* Callback reasons */
Packit 34ce77
#ifdef __GLX_MOTIF
Packit 34ce77
#define GLwCR_EXPOSE	XmCR_EXPOSE
Packit 34ce77
#define GLwCR_RESIZE	XmCR_RESIZE
Packit 34ce77
#define GLwCR_INPUT	XmCR_INPUT
Packit 34ce77
#else 
Packit 34ce77
/* The same values as Motif, but don't use Motif constants */
Packit 34ce77
#define GLwCR_EXPOSE	38
Packit 34ce77
#define GLwCR_RESIZE	39
Packit 34ce77
#define GLwCR_INPUT	40
Packit 34ce77
#endif
Packit 34ce77
Packit 34ce77
#define GLwCR_GINIT	32135	/* Arbitrary number that should neverr clash */
Packit 34ce77
Packit 34ce77
typedef struct 
Packit 34ce77
  {
Packit 34ce77
  int       reason;
Packit 34ce77
  XEvent   *event;
Packit 34ce77
  Dimension width,height;
Packit 34ce77
  } 
Packit 34ce77
  GLwDrawingAreaCallbackStruct;
Packit 34ce77
Packit 34ce77
#if defined(__cplusplus) || defined(c_plusplus)
Packit 34ce77
extern "C" {
Packit 34ce77
#endif
Packit 34ce77
Packit 34ce77
/* front ends to glXMakeCurrent and glXSwapBuffers */
Packit 34ce77
GLAPI void GLwDrawingAreaMakeCurrent(Widget w,GLXContext ctx);
Packit 34ce77
GLAPI void GLwDrawingAreaSwapBuffers(Widget w);
Packit 34ce77
Packit 34ce77
#ifdef __GLX_MOTIF
Packit 34ce77
#ifdef _NO_PROTO
Packit 34ce77
GLAPI Widget GLwCreateMDrawingArea();
Packit 34ce77
#else
Packit 34ce77
GLAPI Widget GLwCreateMDrawingArea(Widget parent,char *name,ArgList arglist,Cardinal argcount);
Packit 34ce77
#endif
Packit 34ce77
#endif 
Packit 34ce77
Packit 34ce77
#if defined(__cplusplus) || defined(c_plusplus)
Packit 34ce77
}
Packit 34ce77
#endif
Packit 34ce77
Packit 34ce77
#endif