/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.36
 * 
 * This file is not intended to be easily readable and contains a number of 
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG 
 * interface file instead. 
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
template < typename T > class SwigValueWrapper
{
  T              *tt;
public:
SwigValueWrapper ():tt (0)
  {
  }
  SwigValueWrapper (const SwigValueWrapper < T > &rhs):tt (new T (*rhs.tt))
  {
  }
  SwigValueWrapper (const T & t):tt (new T (t))
  {
  }
  ~SwigValueWrapper ()
  {
    delete          tt;
  }
  SwigValueWrapper & operator= (const T & t)
  {
    delete          tt;
    tt = new T (t);
    return *this;
  }
  operator        T & () const
  {
    return *tt;
  }
  T              *operator& ()
  {
    return tt;
  }
private:
  SwigValueWrapper & operator= (const SwigValueWrapper < T > &rhs);
};

template < typename T > T SwigValueInit ()
{
  return T ();
}
#endif

/* -----------------------------------------------------------------------------
 *  This section contains generic SWIG labels for method/variable
 *  declarations/attributes, and other compiler dependent labels.
 * ----------------------------------------------------------------------------- */

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
#if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
#define SWIGTEMPLATEDISAMBIGUATOR template
#elif defined(__HP_aCC)
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
#define SWIGTEMPLATEDISAMBIGUATOR template
#else
#define SWIGTEMPLATEDISAMBIGUATOR
#endif
#endif

/* inline attribute */
#ifndef SWIGINLINE
#if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
#define SWIGINLINE inline
#else
#define SWIGINLINE
#endif
#endif

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
#if defined(__GNUC__)
#if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#define SWIGUNUSED __attribute__ ((__unused__))
#else
#define SWIGUNUSED
#endif
#elif defined(__ICC)
#define SWIGUNUSED __attribute__ ((__unused__))
#else
#define SWIGUNUSED
#endif
#endif

#ifndef SWIGUNUSEDPARM
#ifdef __cplusplus
#define SWIGUNUSEDPARM(p)
#else
#define SWIGUNUSEDPARM(p) p SWIGUNUSED
#endif
#endif

/* internal SWIG method */
#ifndef SWIGINTERN
#define SWIGINTERN static SWIGUNUSED
#endif

/* internal inline SWIG method */
#ifndef SWIGINTERNINLINE
#define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/* exporting methods */
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#ifndef GCC_HASCLASSVISIBILITY
#define GCC_HASCLASSVISIBILITY
#endif
#endif

#ifndef SWIGEXPORT
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#if defined(STATIC_LINKED)
#define SWIGEXPORT
#else
#define SWIGEXPORT __declspec(dllexport)
#endif
#else
#if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#define SWIGEXPORT __attribute__ ((visibility("default")))
#else
#define SWIGEXPORT
#endif
#endif
#endif

/* calling conventions for Windows */
#ifndef SWIGSTDCALL
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#define SWIGSTDCALL __stdcall
#else
#define SWIGSTDCALL
#endif
#endif

/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
#define _CRT_SECURE_NO_DEPRECATE
#endif

/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
#define _SCL_SECURE_NO_DEPRECATE
#endif

#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#if defined(_WIN32) || defined(__CYGWIN32__)
#define DllExport   __declspec( dllexport )
#define SWIGSTDCALL __stdcall
#else
#define DllExport
#define SWIGSTDCALL
#endif

#ifdef __cplusplus
#include <new>
#endif

/* Callback for returning strings to Ada without leaking memory */

typedef char   *(SWIGSTDCALL * SWIG_AdaStringHelperCallback) (const char *);
static SWIG_AdaStringHelperCallback SWIG_ada_string_callback = NULL;

/* probably obsolete ...
#ifdef __cplusplus
extern "C" 
#endif
DllExport void SWIGSTDCALL SWIGRegisterStringCallback_CORE_MODULE(SWIG_AdaStringHelperCallback callback) {
  SWIG_ada_string_callback = callback;
}
*/

/* Contract support */
/*
#define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_AdaThrowException(SWIG_AdaArgumentOutOfRangeException, msg); return nullreturn; } else
*/

#define protected public
#define private   public

#include "GL/osmesa.h"

#undef protected
#undef private
#ifdef __cplusplus
extern          "C"
{
#endif
  DllExport void *SWIGSTDCALL Ada_OSMesaCreateContext (unsigned int jarg1,
						       void *jarg2)
  {
    void           *jresult;
    GLenum          arg1;
    OSMesaContext   arg2 = (OSMesaContext) 0;
    OSMesaContext   result;

                    arg1 = (GLenum) jarg1;

                    arg2 = (OSMesaContext) jarg2;

                    result = (OSMesaContext) OSMesaCreateContext (arg1, arg2);
                    jresult = (void *) result;

                    return jresult;

  }

  DllExport void *SWIGSTDCALL Ada_OSMesaCreateContextExt (unsigned int jarg1,
							  int jarg2,
							  int jarg3,
							  int jarg4,
							  void *jarg5)
  {
    void           *jresult;
    GLenum          arg1;
    GLint           arg2;
    GLint           arg3;
    GLint           arg4;
    OSMesaContext   arg5 = (OSMesaContext) 0;
    OSMesaContext   result;

    arg1 = (GLenum) jarg1;

    arg2 = (GLint) jarg2;

    arg3 = (GLint) jarg3;

    arg4 = (GLint) jarg4;

    arg5 = (OSMesaContext) jarg5;

    result =
      (OSMesaContext) OSMesaCreateContextExt (arg1, arg2, arg3, arg4, arg5);
    jresult = (void *) result;

    return jresult;

  }


  DllExport void SWIGSTDCALL Ada_OSMesaDestroyContext (void *jarg1)
  {
    OSMesaContext   arg1 = (OSMesaContext) 0;

    arg1 = (OSMesaContext) jarg1;

    OSMesaDestroyContext (arg1);

  }

  DllExport unsigned char SWIGSTDCALL Ada_OSMesaMakeCurrent (void *jarg1,
							     void *jarg2,
							     unsigned int
							     jarg3, int jarg4,
							     int jarg5)
  {
    unsigned char   jresult;
    OSMesaContext   arg1 = (OSMesaContext) 0;
    void           *arg2 = (void *) 0;
    GLenum          arg3;
    GLsizei         arg4;
    GLsizei         arg5;
    GLboolean       result;

    arg1 = (OSMesaContext) jarg1;

    arg2 = (void *) jarg2;

    arg3 = (GLenum) jarg3;

    arg4 = (GLsizei) jarg4;

    arg5 = (GLsizei) jarg5;

    result = (GLboolean) OSMesaMakeCurrent (arg1, arg2, arg3, arg4, arg5);
    jresult = result;

    return jresult;

  }

  DllExport void *SWIGSTDCALL Ada_OSMesaGetCurrentContext ()
  {
    void           *jresult;
    OSMesaContext   result;

    result = (OSMesaContext) OSMesaGetCurrentContext ();
    jresult = (void *) result;

    return jresult;

  }

  DllExport void SWIGSTDCALL Ada_OSMesaPixelStore (int jarg1, int jarg2)
  {
    GLint           arg1;
    GLint           arg2;

    arg1 = (GLint) jarg1;

    arg2 = (GLint) jarg2;

    OSMesaPixelStore (arg1, arg2);

  }

  DllExport void SWIGSTDCALL Ada_OSMesaGetIntegerv (int jarg1, int *jarg2)
  {
    GLint           arg1;
    GLint          *arg2 = (GLint *) 0;

    arg1 = (GLint) jarg1;

    arg2 = (GLint *) jarg2;

    OSMesaGetIntegerv (arg1, arg2);

  }

  DllExport unsigned char SWIGSTDCALL Ada_OSMesaGetDepthBuffer (void *jarg1,
								int *jarg2,
								int *jarg3,
								int *jarg4,
								void *jarg5)
  {
    unsigned char   jresult;
    OSMesaContext   arg1 = (OSMesaContext) 0;
    GLint          *arg2 = (GLint *) 0;
    GLint          *arg3 = (GLint *) 0;
    GLint          *arg4 = (GLint *) 0;
    void          **arg5 = (void **) 0;
    GLboolean       result;

    arg1 = (OSMesaContext) jarg1;

    arg2 = (GLint *) jarg2;

    arg3 = (GLint *) jarg3;

    arg4 = (GLint *) jarg4;

    arg5 = (void **) jarg5;

    result = (GLboolean) OSMesaGetDepthBuffer (arg1, arg2, arg3, arg4, arg5);
    jresult = result;

    return jresult;

  }

  DllExport unsigned char SWIGSTDCALL Ada_OSMesaGetColorBuffer (void *jarg1,
								int *jarg2,
								int *jarg3,
								int *jarg4,
								void *jarg5)
  {
    unsigned char   jresult;
    OSMesaContext   arg1 = (OSMesaContext) 0;
    GLint          *arg2 = (GLint *) 0;
    GLint          *arg3 = (GLint *) 0;
    GLint          *arg4 = (GLint *) 0;
    void          **arg5 = (void **) 0;
    GLboolean       result;

    arg1 = (OSMesaContext) jarg1;

    arg2 = (GLint *) jarg2;

    arg3 = (GLint *) jarg3;

    arg4 = (GLint *) jarg4;

    arg5 = (void **) jarg5;

    result = (GLboolean) OSMesaGetColorBuffer (arg1, arg2, arg3, arg4, arg5);
    jresult = result;

    return jresult;

  }

  DllExport void *SWIGSTDCALL Ada_OSMesaGetProcAddress (char *jarg1)
  {
    void           *jresult;
    char           *arg1 = (char *) 0;
    OSMESAproc      result;

    arg1 = jarg1;

    result = (OSMESAproc) OSMesaGetProcAddress ((char const *) arg1);
    jresult = (void *) result;

    return jresult;

  }

  DllExport void SWIGSTDCALL Ada_OSMesaColorClamp (unsigned char jarg1)
  {
    GLboolean       arg1;

    arg1 = (GLboolean) jarg1;

    OSMesaColorClamp (arg1);

  }

  DllExport void SWIGSTDCALL Ada_OSMesaPostprocess (void *jarg1,
						    char *jarg2,
						    unsigned int jarg3)
  {
    OSMesaContext   arg1 = (OSMesaContext) 0;
    char           *arg2 = (char *) 0;
    unsigned int    arg3;

    arg1 = (OSMesaContext) jarg1;

    arg2 = jarg2;

    arg3 = (unsigned int) jarg3;

    OSMesaPostprocess (arg1, (char const *) arg2, arg3);

  }

#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern          "C"
{
#endif
#ifdef __cplusplus
}
#endif
