/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 3.0.8 * * 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. * ----------------------------------------------------------------------------- */ #ifndef SWIGRUBY #define SWIGRUBY #endif #define SWIG_DIRECTORS #ifdef __cplusplus /* SwigValueWrapper is described in swig.swg */ template class SwigValueWrapper { struct SwigMovePointer { T *ptr; SwigMovePointer(T *p) : ptr(p) { } ~SwigMovePointer() { delete ptr; } SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } } pointer; SwigValueWrapper& operator=(const SwigValueWrapper& rhs); SwigValueWrapper(const SwigValueWrapper& rhs); public: SwigValueWrapper() : pointer(0) { } SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } operator T&() const { return *pointer.ptr; } T *operator&() { return pointer.ptr; } }; template 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 SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # 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 /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 #endif /* Intel's compiler complains if a variable which was never initialised is * cast to void, which is a common idiom which we use to indicate that we * are aware a variable isn't used. So we just silence that warning. * See: https://github.com/swig/swig/issues/192 for more discussion. */ #ifdef __INTEL_COMPILER # pragma warning disable 592 #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 SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # 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 /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 #endif /* Intel's compiler complains if a variable which was never initialised is * cast to void, which is a common idiom which we use to indicate that we * are aware a variable isn't used. So we just silence that warning. * See: https://github.com/swig/swig/issues/192 for more discussion. */ #ifdef __INTEL_COMPILER # pragma warning disable 592 #endif /* ----------------------------------------------------------------------------- * swigrun.swg * * This file contains generic C API SWIG runtime support for pointer * type checking. * ----------------------------------------------------------------------------- */ /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ #define SWIG_RUNTIME_VERSION "4" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE # define SWIG_QUOTE_STRING(x) #x # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) #else # define SWIG_TYPE_TABLE_NAME #endif /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ #ifndef SWIGRUNTIME # define SWIGRUNTIME SWIGINTERN #endif #ifndef SWIGRUNTIMEINLINE # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE #endif /* Generic buffer size */ #ifndef SWIG_BUFFER_SIZE # define SWIG_BUFFER_SIZE 1024 #endif /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 /* Flags/methods for returning states. The SWIG conversion methods, as ConvertPtr, return an integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). Use the following macros/flags to set or process the returning states. In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code } else { //fail code } Now you can be more explicit: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { // success code } else { // fail code } which is the same really, but now you can also do Type *ptr; int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); if (SWIG_IsOK(res)) { // success code if (SWIG_IsNewObj(res) { ... delete *ptr; } else { ... } } else { // fail code } I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as int SWIG_ConvertPtr(obj, ptr,...) { if () { if () { *ptr = ; return SWIG_NEWOBJ; } else { *ptr = ; return SWIG_OLDOBJ; } } else { return SWIG_BADOBJ; } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code allows to return the 'cast rank', for example, if you have this int food(double) int fooi(int); and you call food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ #define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) /* The NewMask denotes the object was created (using new/malloc) */ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) /* The TmpMask is for in/out typemaps that use temporal objects */ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) /* Simple returning values */ #define SWIG_BADOBJ (SWIG_ERROR) #define SWIG_OLDOBJ (SWIG_OK) #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) /* Check, add and del mask methods */ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) /* Cast-Rank Mode */ #if defined(SWIG_CASTRANK_MODE) # ifndef SWIG_TypeRank # define SWIG_TypeRank unsigned long # endif # ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } SWIGINTERNINLINE int SWIG_CheckState(int r) { return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast(r) (r) # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif #include #ifdef __cplusplus extern "C" { #endif typedef void *(*swig_converter_func)(void *, int *); typedef struct swig_type_info *(*swig_dycast_func)(void **); /* Structure to store information on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ struct swig_cast_info *cast; /* linked list of types that can cast into this type */ void *clientdata; /* language specific type data */ int owndata; /* flag if the structure owns the clientdata */ } swig_type_info; /* Structure to store a type and conversion function used for casting */ typedef struct swig_cast_info { swig_type_info *type; /* pointer to type that is equivalent to this type */ swig_converter_func converter; /* function to cast the void pointers */ struct swig_cast_info *next; /* pointer to next cast in linked list */ struct swig_cast_info *prev; /* pointer to the previous cast */ } swig_cast_info; /* Structure used to store module information * Each module generates one structure like this, and the runtime collects * all of these structures and stores them in a circularly linked list.*/ typedef struct swig_module_info { swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ size_t size; /* Number of types in this module */ struct swig_module_info *next; /* Pointer to next element in circularly linked list */ swig_type_info **type_initial; /* Array of initially generated type structures */ swig_cast_info **cast_initial; /* Array of initially generated casting structures */ void *clientdata; /* Language specific module data */ } swig_module_info; /* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class" == "Class", etc. Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. */ SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2) { for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { while ((*f1 == ' ') && (f1 != l1)) ++f1; while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } return (int)((l1 - f1) - (l2 - f2)); } /* Check type equivalence in a name list like ||... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb) { int equiv = 1; const char* te = tb + strlen(tb); const char* ne = nb; while (equiv != 0 && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = SWIG_TypeNameComp(nb, ne, tb, te); if (*ne) ++ne; } return equiv; } /* Check type equivalence in a name list like ||... Return 0 if not equal, 1 if equal */ SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb) { return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; } /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (strcmp(iter->type->name, c) == 0) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (iter->type == from) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } /* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { swig_type_info *lastty = ty; if (!ty || !ty->dcast) return ty; while (ty && (ty->dcast)) { ty = (*ty->dcast)(ptr); if (ty) lastty = ty; } return lastty; } /* Return the name associated with this type */ SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty) { return ty->name; } /* Return the pretty name associated with this type, that is an unmangled type name in a form presentable to the user. */ SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the type, separated by vertical-bar characters. We choose to print the last name, as it is often (?) the most specific. */ if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; const char *s; for (s = type->str; *s; s++) if (*s == '|') last_name = s+1; return last_name; } else return type->name; } /* Set the clientdata field for a type */ SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } } cast = cast->next; } } SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { swig_module_info *iter = start; do { if (iter->size) { size_t l = 0; size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { int compare = strcmp(name, iname); if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { r = i - 1; } else { break; } } else if (compare > 0) { l = i + 1; } } else { break; /* should never happen */ } } while (l <= r); } iter = iter->next; } while (iter != end); return 0; } /* Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); if (ret) { return ret; } else { /* STEP 2: If the type hasn't been found, do a complete search of the str field (the human readable name) */ swig_module_info *iter = start; do { size_t i = 0; for (; i < iter->size; ++i) { if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) return iter->types[i]; } iter = iter->next; } while (iter != end); } /* neither found a match */ return 0; } /* Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { static const char hex[17] = "0123456789abcdef"; const unsigned char *u = (unsigned char *) ptr; const unsigned char *eu = u + sz; for (; u != eu; ++u) { unsigned char uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } /* Unpack binary data from a string */ SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) { unsigned char *u = (unsigned char *) ptr; const unsigned char *eu = u + sz; for (; u != eu; ++u) { char d = *(c++); unsigned char uu; if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); else return (char *) 0; *u = uu; } return c; } /* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { char *r = buff; if ((2*sizeof(void *) + 2) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,&ptr,sizeof(void *)); if (strlen(name) + 1 > (bsz - (r - buff))) return 0; strcpy(r,name); return buff; } SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { *ptr = (void *) 0; return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sizeof(void *)); } SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { char *r = buff; size_t lname = (name ? strlen(name) : 0); if ((2*sz + 2 + lname) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,ptr,sz); if (lname) { strncpy(r,name,lname+1); } else { *r = 0; } return buff; } SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { memset(ptr,0,sz); return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sz); } #ifdef __cplusplus } #endif /* Errors in SWIG */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 #define SWIG_IndexError -4 #define SWIG_TypeError -5 #define SWIG_DivisionByZero -6 #define SWIG_OverflowError -7 #define SWIG_SyntaxError -8 #define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 #define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 #include /* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which * breaks using rb_intern as an lvalue, as SWIG does. We work around this * issue for now by disabling this. * https://sourceforge.net/tracker/?func=detail&aid=2859614&group_id=1645&atid=101645 */ #ifdef rb_intern # undef rb_intern #endif /* Remove global macros defined in Ruby's win32.h */ #ifdef write # undef write #endif #ifdef read # undef read #endif #ifdef bind # undef bind #endif #ifdef close # undef close #endif #ifdef connect # undef connect #endif /* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */ #ifndef NUM2LL #define NUM2LL(x) NUM2LONG((x)) #endif #ifndef LL2NUM #define LL2NUM(x) INT2NUM((long) (x)) #endif #ifndef ULL2NUM #define ULL2NUM(x) UINT2NUM((unsigned long) (x)) #endif /* Ruby 1.7 doesn't (yet) define NUM2ULL() */ #ifndef NUM2ULL #ifdef HAVE_LONG_LONG #define NUM2ULL(x) rb_num2ull((x)) #else #define NUM2ULL(x) NUM2ULONG(x) #endif #endif /* RSTRING_LEN, etc are new in Ruby 1.9, but ->ptr and ->len no longer work */ /* Define these for older versions so we can just write code the new way */ #ifndef RSTRING_LEN # define RSTRING_LEN(x) RSTRING(x)->len #endif #ifndef RSTRING_PTR # define RSTRING_PTR(x) RSTRING(x)->ptr #endif #ifndef RSTRING_END # define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x)) #endif #ifndef RARRAY_LEN # define RARRAY_LEN(x) RARRAY(x)->len #endif #ifndef RARRAY_PTR # define RARRAY_PTR(x) RARRAY(x)->ptr #endif #ifndef RFLOAT_VALUE # define RFLOAT_VALUE(x) RFLOAT(x)->value #endif #ifndef DOUBLE2NUM # define DOUBLE2NUM(x) rb_float_new(x) #endif #ifndef RHASH_TBL # define RHASH_TBL(x) (RHASH(x)->tbl) #endif #ifndef RHASH_ITER_LEV # define RHASH_ITER_LEV(x) (RHASH(x)->iter_lev) #endif #ifndef RHASH_IFNONE # define RHASH_IFNONE(x) (RHASH(x)->ifnone) #endif #ifndef RHASH_SIZE # define RHASH_SIZE(x) (RHASH(x)->tbl->num_entries) #endif #ifndef RHASH_EMPTY_P # define RHASH_EMPTY_P(x) (RHASH_SIZE(x) == 0) #endif #ifndef RSTRUCT_LEN # define RSTRUCT_LEN(x) RSTRUCT(x)->len #endif #ifndef RSTRUCT_PTR # define RSTRUCT_PTR(x) RSTRUCT(x)->ptr #endif /* * Need to be very careful about how these macros are defined, especially * when compiling C++ code or C code with an ANSI C compiler. * * VALUEFUNC(f) is a macro used to typecast a C function that implements * a Ruby method so that it can be passed as an argument to API functions * like rb_define_method() and rb_define_singleton_method(). * * VOIDFUNC(f) is a macro used to typecast a C function that implements * either the "mark" or "free" stuff for a Ruby Data object, so that it * can be passed as an argument to API functions like Data_Wrap_Struct() * and Data_Make_Struct(). */ #ifdef __cplusplus # ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */ # define PROTECTFUNC(f) ((VALUE (*)()) f) # define VALUEFUNC(f) ((VALUE (*)()) f) # define VOIDFUNC(f) ((void (*)()) f) # else # ifndef ANYARGS /* These definitions should work for Ruby 1.6 */ # define PROTECTFUNC(f) ((VALUE (*)()) f) # define VALUEFUNC(f) ((VALUE (*)()) f) # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f) # else /* These definitions should work for Ruby 1.7+ */ # define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f) # define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f) # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f) # endif # endif #else # define VALUEFUNC(f) (f) # define VOIDFUNC(f) (f) #endif /* Don't use for expressions have side effect */ #ifndef RB_STRING_VALUE #define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s))) #endif #ifndef StringValue #define StringValue(s) RB_STRING_VALUE(s) #endif #ifndef StringValuePtr #define StringValuePtr(s) RSTRING_PTR(RB_STRING_VALUE(s)) #endif #ifndef StringValueLen #define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s)) #endif #ifndef SafeStringValue #define SafeStringValue(v) do {\ StringValue(v);\ rb_check_safe_str(v);\ } while (0) #endif #ifndef HAVE_RB_DEFINE_ALLOC_FUNC #define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1) #define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new") #endif static VALUE _mSWIG = Qnil; /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ /* Define some additional error types */ #define SWIG_ObjectPreviouslyDeletedError -100 /* Define custom exceptions for errors that do not map to existing Ruby exceptions. Note this only works for C++ since a global cannot be initialized by a function in C. For C, fallback to rb_eRuntimeError.*/ SWIGINTERN VALUE getNullReferenceError(void) { static int init = 0; static VALUE rb_eNullReferenceError ; if (!init) { init = 1; rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError); } return rb_eNullReferenceError; } SWIGINTERN VALUE getObjectPreviouslyDeletedError(void) { static int init = 0; static VALUE rb_eObjectPreviouslyDeleted ; if (!init) { init = 1; rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError); } return rb_eObjectPreviouslyDeleted; } SWIGINTERN VALUE SWIG_Ruby_ErrorType(int SWIG_code) { VALUE type; switch (SWIG_code) { case SWIG_MemoryError: type = rb_eNoMemError; break; case SWIG_IOError: type = rb_eIOError; break; case SWIG_RuntimeError: type = rb_eRuntimeError; break; case SWIG_IndexError: type = rb_eIndexError; break; case SWIG_TypeError: type = rb_eTypeError; break; case SWIG_DivisionByZero: type = rb_eZeroDivError; break; case SWIG_OverflowError: type = rb_eRangeError; break; case SWIG_SyntaxError: type = rb_eSyntaxError; break; case SWIG_ValueError: type = rb_eArgError; break; case SWIG_SystemError: type = rb_eFatal; break; case SWIG_AttributeError: type = rb_eRuntimeError; break; case SWIG_NullReferenceError: type = getNullReferenceError(); break; case SWIG_ObjectPreviouslyDeletedError: type = getObjectPreviouslyDeletedError(); break; case SWIG_UnknownError: type = rb_eRuntimeError; break; default: type = rb_eRuntimeError; } return type; } /* This function is called when a user inputs a wrong argument to a method. */ SWIGINTERN const char* Ruby_Format_TypeError( const char* msg, const char* type, const char* name, const int argn, VALUE input ) { char buf[128]; VALUE str; VALUE asStr; if ( msg && *msg ) { str = rb_str_new2(msg); } else { str = rb_str_new(NULL, 0); } str = rb_str_cat2( str, "Expected argument " ); sprintf( buf, "%d of type ", argn-1 ); str = rb_str_cat2( str, buf ); str = rb_str_cat2( str, type ); str = rb_str_cat2( str, ", but got " ); str = rb_str_cat2( str, rb_obj_classname(input) ); str = rb_str_cat2( str, " " ); asStr = rb_inspect(input); if ( RSTRING_LEN(asStr) > 30 ) { str = rb_str_cat( str, StringValuePtr(asStr), 30 ); str = rb_str_cat2( str, "..." ); } else { str = rb_str_append( str, asStr ); } if ( name ) { str = rb_str_cat2( str, "\n\tin SWIG method '" ); str = rb_str_cat2( str, name ); str = rb_str_cat2( str, "'" ); } return StringValuePtr( str ); } /* This function is called when an overloaded method fails */ SWIGINTERN void Ruby_Format_OverloadedError( const int argc, const int maxargs, const char* method, const char* prototypes ) { const char* msg = "Wrong # of arguments"; if ( argc <= maxargs ) msg = "Wrong arguments"; rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n" "Possible C/C++ prototypes are:\n%s", msg, method, prototypes); } /* ----------------------------------------------------------------------------- * rubytracking.swg * * This file contains support for tracking mappings from * Ruby objects to C++ objects. This functionality is needed * to implement mark functions for Ruby's mark and sweep * garbage collector. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #endif #if !defined(ST_DATA_T_DEFINED) /* Needs to be explicitly included for Ruby 1.8 and earlier */ #include #endif /* Ruby 1.8 actually assumes the first case. */ #if SIZEOF_VOIDP == SIZEOF_LONG # define SWIG2NUM(v) LONG2NUM((unsigned long)v) # define NUM2SWIG(x) (unsigned long)NUM2LONG(x) #elif SIZEOF_VOIDP == SIZEOF_LONG_LONG # define SWIG2NUM(v) LL2NUM((unsigned long long)v) # define NUM2SWIG(x) (unsigned long long)NUM2LL(x) #else # error sizeof(void*) is not the same as long or long long #endif /* Global hash table to store Trackings from C/C++ structs to Ruby Objects. */ static st_table* swig_ruby_trackings = NULL; static VALUE swig_ruby_trackings_count(ANYARGS) { return SWIG2NUM(swig_ruby_trackings->num_entries); } /* Setup a hash table to store Trackings */ SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) { /* Create a hash table to store Trackings from C++ objects to Ruby objects. */ /* Try to see if some other .so has already created a tracking hash table, which we keep hidden in an instance var in the SWIG module. This is done to allow multiple DSOs to share the same tracking table. */ VALUE trackings_value = Qnil; /* change the variable name so that we can mix modules compiled with older SWIG's - this used to be called "@__trackings__" */ ID trackings_id = rb_intern( "@__safetrackings__" ); VALUE verbose = rb_gv_get("VERBOSE"); rb_gv_set("VERBOSE", Qfalse); trackings_value = rb_ivar_get( _mSWIG, trackings_id ); rb_gv_set("VERBOSE", verbose); /* The trick here is that we have to store the hash table pointer in a Ruby variable. We do not want Ruby's GC to treat this pointer as a Ruby object, so we convert it to a Ruby numeric value. */ if (trackings_value == Qnil) { /* No, it hasn't. Create one ourselves */ swig_ruby_trackings = st_init_numtable(); rb_ivar_set( _mSWIG, trackings_id, SWIG2NUM(swig_ruby_trackings) ); } else { swig_ruby_trackings = (st_table*)NUM2SWIG(trackings_value); } rb_define_virtual_variable("SWIG_TRACKINGS_COUNT", swig_ruby_trackings_count, NULL); } /* Add a Tracking from a C/C++ struct to a Ruby object */ SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) { /* Store the mapping to the global hash table. */ st_insert(swig_ruby_trackings, (st_data_t)ptr, object); } /* Get the Ruby object that owns the specified C/C++ struct */ SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) { /* Now lookup the value stored in the global hash table */ VALUE value; if (st_lookup(swig_ruby_trackings, (st_data_t)ptr, &value)) { return value; } else { return Qnil; } } /* Remove a Tracking from a C/C++ struct to a Ruby object. It is very important to remove objects once they are destroyed since the same memory address may be reused later to create a new object. */ SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) { /* Delete the object from the hash table */ st_delete(swig_ruby_trackings, (st_data_t *)&ptr, NULL); } /* This is a helper method that unlinks a Ruby object from its underlying C++ object. This is needed if the lifetime of the Ruby object is longer than the C++ object */ SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) { VALUE object = SWIG_RubyInstanceFor(ptr); if (object != Qnil) { if (TYPE(object) != T_DATA) abort(); DATA_PTR(object) = 0; } } /* This is a helper method that iterates over all the trackings passing the C++ object pointer and its related Ruby object to the passed callback function. */ /* Proxy method to abstract the internal trackings datatype */ static int swig_ruby_internal_iterate_callback(void* ptr, VALUE obj, void(*meth)(void* ptr, VALUE obj)) { (*meth)(ptr, obj); return ST_CONTINUE; } SWIGRUNTIME void SWIG_RubyIterateTrackings( void(*meth)(void* ptr, VALUE obj) ) { st_foreach(swig_ruby_trackings, (int (*)(ANYARGS))&swig_ruby_internal_iterate_callback, (st_data_t)meth); } #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * Ruby API portion that goes into the runtime * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #endif SWIGINTERN VALUE SWIG_Ruby_AppendOutput(VALUE target, VALUE o) { if (NIL_P(target)) { target = o; } else { if (TYPE(target) != T_ARRAY) { VALUE o2 = target; target = rb_ary_new(); rb_ary_push(target, o2); } rb_ary_push(target, o); } return target; } /* For ruby1.8.4 and earlier. */ #ifndef RUBY_INIT_STACK RUBY_EXTERN void Init_stack(VALUE* addr); # define RUBY_INIT_STACK \ VALUE variable_in_this_stack_frame; \ Init_stack(&variable_in_this_stack_frame); #endif #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * rubyrun.swg * * This file contains the runtime support for Ruby modules * and includes code for managing global variables and pointer * type checking. * ----------------------------------------------------------------------------- */ /* For backward compatibility only */ #define SWIG_POINTER_EXCEPTION 0 /* for raw pointers */ #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0) #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own) #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags) #define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own) #define swig_owntype swig_ruby_owntype /* for raw packed data */ #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags) #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type) /* for class or struct pointers */ #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) /* for C or C++ function pointers */ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0) #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0) /* for C++ member pointers, ie, member methods */ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type) /* Runtime API */ #define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule(clientdata) #define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer) /* Error manipulation */ #define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code) #define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg) #define SWIG_fail goto fail /* Ruby-specific SWIG API */ #define SWIG_InitRuntime() SWIG_Ruby_InitRuntime() #define SWIG_define_class(ty) SWIG_Ruby_define_class(ty) #define SWIG_NewClassInstance(value, ty) SWIG_Ruby_NewClassInstance(value, ty) #define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value) #define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty) #include "assert.h" /* ----------------------------------------------------------------------------- * pointers/data manipulation * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #endif typedef struct { VALUE klass; VALUE mImpl; void (*mark)(void *); void (*destroy)(void *); int trackObjects; } swig_class; /* Global pointer used to keep some internal SWIG stuff */ static VALUE _cSWIG_Pointer = Qnil; static VALUE swig_runtime_data_type_pointer = Qnil; /* Global IDs used to keep some internal SWIG stuff */ static ID swig_arity_id = 0; static ID swig_call_id = 0; /* If your swig extension is to be run within an embedded ruby and has director callbacks, you should set -DRUBY_EMBEDDED during compilation. This will reset ruby's stack frame on each entry point from the main program the first time a virtual director function is invoked (in a non-recursive way). If this is not done, you run the risk of Ruby trashing the stack. */ #ifdef RUBY_EMBEDDED # define SWIG_INIT_STACK \ if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \ ++swig_virtual_calls; # define SWIG_RELEASE_STACK --swig_virtual_calls; # define Ruby_DirectorTypeMismatchException(x) \ rb_raise( rb_eTypeError, "%s", x ); return c_result; static unsigned int swig_virtual_calls = 0; #else /* normal non-embedded extension */ # define SWIG_INIT_STACK # define SWIG_RELEASE_STACK # define Ruby_DirectorTypeMismatchException(x) \ throw Swig::DirectorTypeMismatchException( x ); #endif /* RUBY_EMBEDDED */ SWIGRUNTIME VALUE getExceptionClass(void) { static int init = 0; static VALUE rubyExceptionClass ; if (!init) { init = 1; rubyExceptionClass = rb_const_get(_mSWIG, rb_intern("Exception")); } return rubyExceptionClass; } /* This code checks to see if the Ruby object being raised as part of an exception inherits from the Ruby class Exception. If so, the object is simply returned. If not, then a new Ruby exception object is created and that will be returned to Ruby.*/ SWIGRUNTIME VALUE SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) { VALUE exceptionClass = getExceptionClass(); if (rb_obj_is_kind_of(obj, exceptionClass)) { return obj; } else { return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj)); } } /* Initialize Ruby runtime support */ SWIGRUNTIME void SWIG_Ruby_InitRuntime(void) { if (_mSWIG == Qnil) { _mSWIG = rb_define_module("SWIG"); swig_call_id = rb_intern("call"); swig_arity_id = rb_intern("arity"); } } /* Define Ruby class for C type */ SWIGRUNTIME void SWIG_Ruby_define_class(swig_type_info *type) { char *klass_name = (char *) malloc(4 + strlen(type->name) + 1); sprintf(klass_name, "TYPE%s", type->name); if (NIL_P(_cSWIG_Pointer)) { _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject); rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new"); } rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer); free((void *) klass_name); } /* Create a new pointer object */ SWIGRUNTIME VALUE SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags) { int own = flags & SWIG_POINTER_OWN; int track; char *klass_name; swig_class *sklass; VALUE klass; VALUE obj; if (!ptr) return Qnil; if (type->clientdata) { sklass = (swig_class *) type->clientdata; /* Are we tracking this class and have we already returned this Ruby object? */ track = sklass->trackObjects; if (track) { obj = SWIG_RubyInstanceFor(ptr); /* Check the object's type and make sure it has the correct type. It might not in cases where methods do things like downcast methods. */ if (obj != Qnil) { VALUE value = rb_iv_get(obj, "@__swigtype__"); const char* type_name = RSTRING_PTR(value); if (strcmp(type->name, type_name) == 0) { return obj; } } } /* Create a new Ruby object */ obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), ( own ? VOIDFUNC(sklass->destroy) : (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 ) ), ptr); /* If tracking is on for this class then track this object. */ if (track) { SWIG_RubyAddTracking(ptr, obj); } } else { klass_name = (char *) malloc(4 + strlen(type->name) + 1); sprintf(klass_name, "TYPE%s", type->name); klass = rb_const_get(_mSWIG, rb_intern(klass_name)); free((void *) klass_name); obj = Data_Wrap_Struct(klass, 0, 0, ptr); } rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name)); return obj; } /* Create a new class instance (always owned) */ SWIGRUNTIME VALUE SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type) { VALUE obj; swig_class *sklass = (swig_class *) type->clientdata; obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0); rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name)); return obj; } /* Get type mangle from class name */ SWIGRUNTIMEINLINE char * SWIG_Ruby_MangleStr(VALUE obj) { VALUE stype = rb_iv_get(obj, "@__swigtype__"); return StringValuePtr(stype); } /* Acquire a pointer value */ typedef struct { void (*datafree)(void *); int own; } swig_ruby_owntype; SWIGRUNTIME swig_ruby_owntype SWIG_Ruby_AcquirePtr(VALUE obj, swig_ruby_owntype own) { swig_ruby_owntype oldown = {0, 0}; if (obj) { oldown.datafree = RDATA(obj)->dfree; RDATA(obj)->dfree = own.datafree; } return oldown; } /* Convert a pointer value */ SWIGRUNTIME int SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, swig_ruby_owntype *own) { char *c; swig_cast_info *tc; void *vptr = 0; /* Grab the pointer */ if (NIL_P(obj)) { if (ptr) *ptr = 0; return SWIG_OK; } else { if (TYPE(obj) != T_DATA) { return SWIG_ERROR; } Data_Get_Struct(obj, void, vptr); } if (own) { own->datafree = RDATA(obj)->dfree; own->own = 0; } /* Check to see if the input object is giving up ownership of the underlying C struct or C++ object. If so then we need to reset the destructor since the Ruby object no longer owns the underlying C++ object.*/ if (flags & SWIG_POINTER_DISOWN) { /* Is tracking on for this class? */ int track = 0; if (ty && ty->clientdata) { swig_class *sklass = (swig_class *) ty->clientdata; track = sklass->trackObjects; } if (track) { /* We are tracking objects for this class. Thus we change the destructor * to SWIG_RubyRemoveTracking. This allows us to * remove the mapping from the C++ to Ruby object * when the Ruby object is garbage collected. If we don't * do this, then it is possible we will return a reference * to a Ruby object that no longer exists thereby crashing Ruby. */ RDATA(obj)->dfree = SWIG_RubyRemoveTracking; } else { RDATA(obj)->dfree = 0; } } /* Do type-checking if type info was provided */ if (ty) { if ((c = SWIG_MangleStr(obj)) == NULL) { return SWIG_ERROR; } tc = SWIG_TypeCheck(c, ty); if (!tc) { return SWIG_ERROR; } else { if (vptr == 0) { /* The object has already been deleted */ return SWIG_ObjectPreviouslyDeletedError; } if (ptr) { if (tc->type == ty) { *ptr = vptr; } else { int newmemory = 0; *ptr = SWIG_TypeCast(tc, vptr, &newmemory); if (newmemory == SWIG_CAST_NEW_MEMORY) { assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ if (own) own->own = own->own | SWIG_CAST_NEW_MEMORY; } } } } } else { if (ptr) *ptr = vptr; } return SWIG_OK; } /* Check convert */ SWIGRUNTIMEINLINE int SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty) { char *c = SWIG_MangleStr(obj); if (!c) return 0; return SWIG_TypeCheck(c,ty) != 0; } SWIGRUNTIME VALUE SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) { char result[1024]; char *r = result; if ((2*sz + 1 + strlen(type->name)) > 1000) return 0; *(r++) = '_'; r = SWIG_PackData(r, ptr, sz); strcpy(r, type->name); return rb_str_new2(result); } /* Convert a packed value value */ SWIGRUNTIME int SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) { swig_cast_info *tc; const char *c; if (TYPE(obj) != T_STRING) goto type_error; c = StringValuePtr(obj); /* Pointer values must start with leading underscore */ if (*c != '_') goto type_error; c++; c = SWIG_UnpackData(c, ptr, sz); if (ty) { tc = SWIG_TypeCheck(c, ty); if (!tc) goto type_error; } return SWIG_OK; type_error: return SWIG_ERROR; } SWIGRUNTIME swig_module_info * SWIG_Ruby_GetModule(void *SWIGUNUSEDPARM(clientdata)) { VALUE pointer; swig_module_info *ret = 0; VALUE verbose = rb_gv_get("VERBOSE"); /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */ rb_gv_set("VERBOSE", Qfalse); /* first check if pointer already created */ pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME); if (pointer != Qnil) { Data_Get_Struct(pointer, swig_module_info, ret); } /* reinstate warnings */ rb_gv_set("VERBOSE", verbose); return ret; } SWIGRUNTIME void SWIG_Ruby_SetModule(swig_module_info *pointer) { /* register a new class */ VALUE cl = rb_define_class("swig_runtime_data", rb_cObject); /* create and store the structure pointer to a global variable */ swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer); rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer); } /* This function can be used to check whether a proc or method or similarly callable function has been passed. Usually used in a %typecheck, like: %typecheck(c_callback_t, precedence=SWIG_TYPECHECK_POINTER) { $result = SWIG_Ruby_isCallable( $input ); } */ SWIGINTERN int SWIG_Ruby_isCallable( VALUE proc ) { if ( rb_respond_to( proc, swig_call_id ) ) return 1; return 0; } /* This function can be used to check the arity (number of arguments) a proc or method can take. Usually used in a %typecheck. Valid arities will be that equal to minimal or those < 0 which indicate a variable number of parameters at the end. */ SWIGINTERN int SWIG_Ruby_arity( VALUE proc, int minimal ) { if ( rb_respond_to( proc, swig_arity_id ) ) { VALUE num = rb_funcall( proc, swig_arity_id, 0 ); int arity = NUM2INT(num); if ( arity < 0 && (arity+1) < -minimal ) return 1; if ( arity == minimal ) return 1; return 1; } return 0; } #ifdef __cplusplus } #endif #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else #define SWIG_exception(code, msg) do { SWIG_Error(code, msg);; } while(0) /* ----------------------------------------------------------------------------- * director_common.swg * * This file contains support for director classes which is common between * languages. * ----------------------------------------------------------------------------- */ /* Use -DSWIG_DIRECTOR_STATIC if you prefer to avoid the use of the 'Swig' namespace. This could be useful for multi-modules projects. */ #ifdef SWIG_DIRECTOR_STATIC /* Force anonymous (static) namespace */ #define Swig #endif /* ----------------------------------------------------------------------------- * director.swg * * This file contains support for director classes so that Ruby proxy * methods can be called from C++. * ----------------------------------------------------------------------------- */ /* Use -DSWIG_DIRECTOR_NOUEH if you prefer to avoid the use of the Undefined Exception Handler provided by swig. */ #ifndef SWIG_DIRECTOR_NOUEH #ifndef SWIG_DIRECTOR_UEH #define SWIG_DIRECTOR_UEH #endif #endif #include #include #include #include # define SWIG_DIRECTOR_CAST(ARG) dynamic_cast(ARG) namespace Swig { /* memory handler */ struct GCItem { virtual ~GCItem() { } virtual swig_ruby_owntype get_own() const { swig_ruby_owntype own = {0, 0}; return own; } }; struct GCItem_var { GCItem_var(GCItem *item = 0) : _item(item) { } GCItem_var& operator=(GCItem *item) { GCItem *tmp = _item; _item = item; delete tmp; return *this; } ~GCItem_var() { delete _item; } GCItem *operator->() const { return _item; } private: GCItem *_item; }; template struct GCItem_T : GCItem { GCItem_T(Type *ptr) : _ptr(ptr) { } virtual ~GCItem_T() { delete _ptr; } private: Type *_ptr; }; struct GCItem_Object : GCItem { GCItem_Object(swig_ruby_owntype own) : _own(own) { } virtual ~GCItem_Object() { } swig_ruby_owntype get_own() const { return _own; } private: swig_ruby_owntype _own; }; template struct GCArray_T : GCItem { GCArray_T(Type *ptr) : _ptr(ptr) { } virtual ~GCArray_T() { delete[] _ptr; } private: Type *_ptr; }; /* body args */ struct body_args { VALUE recv; ID id; int argc; VALUE *argv; }; /* Base class for director exceptions */ class DirectorException : public std::exception { protected: VALUE swig_error; std::string swig_msg; protected: DirectorException(VALUE error) : swig_error(error) { } DirectorException(VALUE error, const char *hdr, const char *msg ="") : swig_error(error), swig_msg(hdr) { if (msg[0]) { swig_msg += " "; swig_msg += msg; } if (swig_msg.size()) { VALUE str = rb_str_new(swig_msg.data(), swig_msg.size()); swig_error = rb_exc_new3(error, str); } else { swig_error = error; } } public: virtual ~DirectorException() throw() { } VALUE getType() const { return CLASS_OF(swig_error); } VALUE getError() const { return swig_error; } /* Deprecated, use what() instead */ const std::string& getMessage() const { return swig_msg; } const char *what() const throw() { return swig_msg.c_str(); } }; /* unknown exception handler */ class UnknownExceptionHandler { #ifdef SWIG_DIRECTOR_UEH static void handler() { try { throw; } catch (DirectorException& e) { std::cerr << "SWIG Director exception caught:" << std::endl << e.what() << std::endl; } catch (std::exception& e) { std::cerr << "std::exception caught: "<< e.what() << std::endl; } catch (...) { std::cerr << "Unknown exception caught." << std::endl; } std::cerr << std::endl << "Ruby interpreter traceback:" << std::endl; std::cerr << std::endl; std::cerr << "This exception was caught by the SWIG unexpected exception handler." << std::endl << "Try using %feature(\"director:except\") to avoid reaching this point." << std::endl << std::endl << "Exception is being re-thrown, program will like abort/terminate." << std::endl; throw; } public: std::unexpected_handler old; UnknownExceptionHandler(std::unexpected_handler nh = handler) { old = std::set_unexpected(nh); } ~UnknownExceptionHandler() { std::set_unexpected(old); } #endif }; /* Type mismatch in the return value from a Ruby method call */ class DirectorTypeMismatchException : public DirectorException { public: DirectorTypeMismatchException(VALUE error, const char *msg="") : DirectorException(error, "SWIG director type mismatch", msg) { } DirectorTypeMismatchException(const char *msg="") : DirectorException(rb_eTypeError, "SWIG director type mismatch", msg) { } static void raise(VALUE error, const char *msg) { throw DirectorTypeMismatchException(error, msg); } static void raise(const char *msg) { throw DirectorTypeMismatchException(msg); } }; /* Any Ruby exception that occurs during a director method call */ class DirectorMethodException : public DirectorException { public: DirectorMethodException(VALUE error) : DirectorException(error) { } DirectorMethodException(const char *msg = "") : DirectorException(rb_eRuntimeError, "SWIG director method error.", msg) { } static void raise(VALUE error) { throw DirectorMethodException(error); } }; /* Attempted to call a pure virtual method via a director method */ class DirectorPureVirtualException : public DirectorException { public: DirectorPureVirtualException(const char *msg = "") : DirectorException(rb_eRuntimeError, "SWIG director pure virtual method called", msg) { } static void raise(const char *msg) { throw DirectorPureVirtualException(msg); } }; /* Simple thread abstraction for pthreads on win32 */ #ifdef __THREAD__ # define __PTHREAD__ # if defined(_WIN32) || defined(__WIN32__) # define pthread_mutex_lock EnterCriticalSection # define pthread_mutex_unlock LeaveCriticalSection # define pthread_mutex_t CRITICAL_SECTION # define SWIG_MUTEX_INIT(var) var # else # include # define SWIG_MUTEX_INIT(var) var = PTHREAD_MUTEX_INITIALIZER # endif #endif #ifdef __PTHREAD__ struct Guard { pthread_mutex_t *_mutex; Guard(pthread_mutex_t &mutex) : _mutex(&mutex) { pthread_mutex_lock(_mutex); } ~Guard() { pthread_mutex_unlock(_mutex); } }; # define SWIG_GUARD(mutex) Guard _guard(mutex) #else # define SWIG_GUARD(mutex) #endif /* director base class */ class Director { private: /* pointer to the wrapped Ruby object */ VALUE swig_self; /* flag indicating whether the object is owned by Ruby or c++ */ mutable bool swig_disown_flag; public: /* wrap a Ruby object. */ Director(VALUE self) : swig_self(self), swig_disown_flag(false) { } /* discard our reference at destruction */ virtual ~Director() { } /* return a pointer to the wrapped Ruby object */ VALUE swig_get_self() const { return swig_self; } /* acquire ownership of the wrapped Ruby object (the sense of "disown" is from Ruby) */ void swig_disown() const { if (!swig_disown_flag) { swig_disown_flag = true; } } /* ownership management */ private: typedef std::map swig_ownership_map; mutable swig_ownership_map swig_owner; #ifdef __PTHREAD__ static pthread_mutex_t swig_mutex_own; #endif public: template void swig_acquire_ownership_array(Type *vptr) const { if (vptr) { SWIG_GUARD(swig_mutex_own); swig_owner[vptr] = new GCArray_T(vptr); } } template void swig_acquire_ownership(Type *vptr) const { if (vptr) { SWIG_GUARD(swig_mutex_own); swig_owner[vptr] = new GCItem_T(vptr); } } void swig_acquire_ownership_obj(void *vptr, swig_ruby_owntype own) const { if (vptr && own.datafree) { SWIG_GUARD(swig_mutex_own); swig_owner[vptr] = new GCItem_Object(own); } } swig_ruby_owntype swig_release_ownership(void *vptr) const { swig_ruby_owntype own = {0, 0}; if (vptr) { SWIG_GUARD(swig_mutex_own); swig_ownership_map::iterator iter = swig_owner.find(vptr); if (iter != swig_owner.end()) { own.datafree = iter->second->get_own().datafree; swig_owner.erase(iter); } } return own; } }; } /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_Gosu__Button swig_types[0] #define SWIGTYPE_p_Gosu__Color swig_types[1] #define SWIGTYPE_p_Gosu__Font swig_types[2] #define SWIGTYPE_p_Gosu__GLTexInfo swig_types[3] #define SWIGTYPE_p_Gosu__Image swig_types[4] #define SWIGTYPE_p_Gosu__Sample swig_types[5] #define SWIGTYPE_p_Gosu__SampleInstance swig_types[6] #define SWIGTYPE_p_Gosu__Song swig_types[7] #define SWIGTYPE_p_Gosu__TextInput swig_types[8] #define SWIGTYPE_p_Gosu__Window swig_types[9] #define SWIGTYPE_p_char swig_types[10] #define SWIGTYPE_p_double swig_types[11] #define SWIGTYPE_p_std__tr1__arrayT_double_16_t swig_types[12] static swig_type_info *swig_types[14]; static swig_module_info swig_module = {swig_types, 13, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) /* -------- TYPES TABLE (END) -------- */ #define SWIG_init Init_gosu #define SWIG_name "Gosu" static VALUE mGosu; #define SWIG_RUBY_THREAD_BEGIN_BLOCK #define SWIG_RUBY_THREAD_END_BLOCK #define SWIGVERSION 0x030008 #define SWIG_VERSION SWIGVERSION #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) #include // Escape from ruby.h macro hell on Windows. #undef accept #undef write #undef close #undef read #undef bind #undef send #undef sleep #undef Sleep #undef int8_t #undef uint8_t #undef int16_t #undef uint16_t #undef int32_t #undef uint32_t #undef int64_t #undef uint64_t #include #include namespace Gosu { void enableUndocumentedRetrofication() { extern bool undocumentedRetrofication; undocumentedRetrofication = true; } void releaseAllOpenALResources(); void register_entity(const std::wstring& name, Gosu::Image* image) { registerEntity(name, image->getData().toBitmap()); } } #include #include #include // Preprocessor check for 1.9 or higher (thanks banister) #if defined(ROBJECT_EMBED_LEN_MAX) #define FIX_ENCODING(var) \ rb_funcall(var, rb_intern("force_encoding"), 1, rb_str_new2("UTF-8")); #define RUBY_18_19(r18, r19) r19 #else #define FIX_ENCODING(var) #define RUBY_18_19(r18, r19) r18 #endif namespace { void callRubyBlock(VALUE block) { rb_funcall(block, rb_intern("call"), 0); } } namespace Gosu { void loadBitmap(Bitmap& bitmap, VALUE val) { // Try to treat as filename first. if (rb_respond_to(val, rb_intern("to_str"))) { VALUE to_str = rb_funcall(val, rb_intern("to_str"), 0); const char* filenameUTF8 = StringValuePtr(to_str); std::wstring filename = Gosu::utf8ToWstring(filenameUTF8); loadImageFile(bitmap, filename); return; } // Otherwise, try to call .to_blob on it (works with RMagick, TexPlay etc). VALUE conversion = rb_str_new2("to_blob { self.format = 'RGBA'; self.depth = 8 }"); VALUE blob = rb_obj_instance_eval(1, &conversion, val); rb_check_safe_obj(blob); unsigned width = NUM2ULONG(rb_funcall(val, rb_intern("columns"), 0)); unsigned height = NUM2ULONG(rb_funcall(val, rb_intern("rows"), 0)); bitmap.resize(width, height, Gosu::Color::NONE); if (width * height * 4 == RSTRING_LEN(blob)) { // 32 bit per pixel, assume R8G8B8A8 std::memcpy(bitmap.data(), reinterpret_cast(RSTRING_PTR(blob)), width * height * 4); } else if (width * height * 4 * sizeof(float) == RSTRING_LEN(blob)) { // 128 bit per channel, assume float/float/float/float const float* in = reinterpret_cast(RSTRING_PTR(blob)); Gosu::Color::Channel* out = reinterpret_cast(bitmap.data()); for (int i = width * height * 4; i > 0; --i) *(out++) = static_cast(*(in++) * 255); } else throw std::logic_error("Blob length mismatch!"); } const char* cstrFromSymbol(VALUE symbol) { Check_Type(symbol, T_SYMBOL); return rb_id2name(SYM2ID(symbol)); } } // Global input functions namespace Gosu { Gosu::Button charToButtonId(wchar_t ch) { return Gosu::Input::charToId(ch); } wchar_t buttonIdToChar(Gosu::Button btn) { return Gosu::Input::idToChar(btn); } bool isButtonDown(Gosu::Button btn) { return Gosu::Input::down(btn); } } // Global graphics functions namespace Gosu { void drawLine(double x1, double y1, Gosu::Color c1, double x2, double y2, Gosu::Color c2, Gosu::ZPos z = 0, Gosu::AlphaMode mode = Gosu::amDefault) { Gosu::Graphics::drawLine(x1, y1, c1, x2, y2, c2, z, mode); } void drawTriangle(double x1, double y1, Gosu::Color c1, double x2, double y2, Gosu::Color c2, double x3, double y3, Gosu::Color c3, Gosu::ZPos z = 0, Gosu::AlphaMode mode = Gosu::amDefault) { Gosu::Graphics::drawTriangle(x1, y1, c1, x2, y2, c2, x3, y3, c3, z, mode); } void drawQuad(double x1, double y1, Gosu::Color c1, double x2, double y2, Gosu::Color c2, double x3, double y3, Gosu::Color c3, double x4, double y4, Gosu::Color c4, Gosu::ZPos z = 0, Gosu::AlphaMode mode = Gosu::amDefault) { Gosu::Graphics::drawQuad(x1, y1, c1, x2, y2, c2, x3, y3, c3, x4, y4, c4, z, mode); } void drawRect(double x, double y, double width, double height, Gosu::Color c, Gosu::ZPos z = 0, Gosu::AlphaMode mode = Gosu::amDefault) { Gosu::Graphics::drawQuad(x, y, c, x + width, y, c, x, y + height, c, x + width, y + height, c, z, mode); } void flush() { return Gosu::Graphics::flush(); } void unsafe_gl() { Gosu::Graphics::beginGL(); rb_yield(Qnil); Gosu::Graphics::endGL(); } void unsafe_gl(Gosu::ZPos z) { Gosu::Graphics::scheduleGL(std::tr1::bind(callRubyBlock, rb_block_proc()), z); } void clipTo(double x, double y, double width, double height) { Gosu::Graphics::beginClipping(x, y, width, height); rb_yield(Qnil); Gosu::Graphics::endClipping(); } Gosu::Image* record(int width, int height) { Gosu::Graphics::beginRecording(); rb_yield(Qnil); return new Gosu::Image(Gosu::Graphics::endRecording(width, height)); } // This method cannot be called "transform" because then it would be an ambiguous overload of Gosu::Transform Gosu::transform(...). // So it has to be renamed via %rename below... :( - same for the other transformations. void transformForRuby(double m0, double m1, double m2, double m3, double m4, double m5, double m6, double m7, double m8, double m9, double m10, double m11, double m12, double m13, double m14, double m15) { Gosu::Transform transform = { m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15 }; Gosu::Graphics::pushTransform(transform); rb_yield(Qnil); Gosu::Graphics::popTransform(); } void rotateForRuby(double angle, double aroundX = 0, double aroundY = 0) { Gosu::Graphics::pushTransform(Gosu::rotate(angle, aroundX, aroundY)); rb_yield(Qnil); Gosu::Graphics::popTransform(); } void scaleForRuby(double factor) { Gosu::Graphics::pushTransform(Gosu::scale(factor)); rb_yield(Qnil); Gosu::Graphics::popTransform(); } void scaleForRuby(double factorX, double factorY) { Gosu::Graphics::pushTransform(Gosu::scale(factorX, factorY)); rb_yield(Qnil); Gosu::Graphics::popTransform(); } void scaleForRuby(double factorX, double factorY, double aroundX, double aroundY) { Gosu::Graphics::pushTransform(Gosu::scale(factorX, factorY, aroundX, aroundY)); rb_yield(Qnil); Gosu::Graphics::popTransform(); } void translateForRuby(double x, double y) { Gosu::Graphics::pushTransform(Gosu::translate(x, y)); rb_yield(Qnil); Gosu::Graphics::popTransform(); } } #include #if !defined(SWIG_NO_LLONG_MAX) # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) # define LLONG_MAX __LONG_LONG_MAX__ # define LLONG_MIN (-LLONG_MAX - 1LL) # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) # endif #endif #define SWIG_From_long LONG2NUM SWIGINTERNINLINE VALUE SWIG_From_int (int value) { return SWIG_From_long (value); } SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { static int init = 0; static swig_type_info* info = 0; if (!init) { info = SWIG_TypeQuery("_p_char"); init = 1; } return info; } SWIGINTERNINLINE VALUE SWIG_FromCharPtrAndSize(const char* carray, size_t size) { if (carray) { if (size > LONG_MAX) { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); return pchar_descriptor ? SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : Qnil; } else { return rb_str_new(carray, static_cast< long >(size)); } } else { return Qnil; } } SWIGINTERNINLINE VALUE SWIG_FromCharPtr(const char *cptr) { return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); } SWIGINTERNINLINE VALUE SWIG_From_unsigned_SS_long (unsigned long value) { return ULONG2NUM(value); } SWIGINTERN VALUE SWIG_ruby_failed(void) { return Qnil; } /*@SWIG:/usr/local/Cellar/swig/3.0.8/share/swig/3.0.8/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args) { VALUE obj = args[0]; VALUE type = TYPE(obj); double *res = (double *)(args[1]); *res = NUM2DBL(obj); (void)type; return obj; } /*@SWIG@*/ SWIGINTERN int SWIG_AsVal_double (VALUE obj, double *val) { VALUE type = TYPE(obj); if ((type == T_FLOAT) || (type == T_FIXNUM) || (type == T_BIGNUM)) { double v; VALUE a[2]; a[0] = obj; a[1] = (VALUE)(&v); if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2DBL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) { if (val) *val = v; return SWIG_OK; } } return SWIG_TypeError; } #define SWIG_From_double rb_float_new SWIGINTERNINLINE VALUE SWIG_From_unsigned_SS_int (unsigned int value) { return SWIG_From_unsigned_SS_long (value); } #include /*@SWIG:/usr/local/Cellar/swig/3.0.8/share/swig/3.0.8/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args) { VALUE obj = args[0]; VALUE type = TYPE(obj); unsigned long *res = (unsigned long *)(args[1]); *res = type == T_FIXNUM ? NUM2ULONG(obj) : rb_big2ulong(obj); return obj; } /*@SWIG@*/ SWIGINTERN int SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val) { VALUE type = TYPE(obj); if ((type == T_FIXNUM) || (type == T_BIGNUM)) { unsigned long v; VALUE a[2]; a[0] = obj; a[1] = (VALUE)(&v); if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) { if (val) *val = v; return SWIG_OK; } } return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_unsigned_SS_int (VALUE obj, unsigned int *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, &v); if (SWIG_IsOK(res)) { if ((v > UINT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< unsigned int >(v); } } return res; } SWIGINTERNINLINE VALUE SWIG_From_unsigned_SS_char (unsigned char value) { return SWIG_From_unsigned_SS_long (value); } SWIGINTERN Gosu::Color Gosu_Color_rgb(Gosu::Color::Channel r,Gosu::Color::Channel g,Gosu::Color::Channel b){ return Gosu::Color(r, g, b); } SWIGINTERN Gosu::Color Gosu_Color_rgba__SWIG_0(Gosu::Color::Channel r,Gosu::Color::Channel g,Gosu::Color::Channel b,Gosu::Color::Channel a){ return Gosu::Color(a, r, g, b); } SWIGINTERN Gosu::Color Gosu_Color_rgba__SWIG_1(std::tr1::uint32_t rgba){ return Gosu::Color(rgba & 0xff, (rgba >> 24) & 0xff, (rgba >> 16) & 0xff, (rgba >> 8) & 0xff); } SWIGINTERN Gosu::Color Gosu_Color_argb__SWIG_1(Gosu::Color::Channel a,Gosu::Color::Channel r,Gosu::Color::Channel g,Gosu::Color::Channel b){ return Gosu::Color(a, r, g, b); } SWIGINTERN Gosu::Color Gosu_Color_argb__SWIG_2(std::tr1::uint32_t argb){ return Gosu::Color(argb); } SWIGINTERN Gosu::Color Gosu_Color_dup(Gosu::Color const *self){ return *self; } SWIGINTERN std::string Gosu_Color_inspect(Gosu::Color const *self){ char buffer[32]; // snprintf is either member of std:: (C++11), or a #define for ruby_snprintf. using namespace std; snprintf(buffer, sizeof buffer, "#", self->alpha(), self->argb() & 0xffffff); return buffer; } SWIGINTERNINLINE VALUE SWIG_From_std_string (const std::string& s) { return SWIG_FromCharPtrAndSize(s.data(), s.size()); } SWIGINTERN bool Gosu_Color_operator_Se__Se_(Gosu::Color *self,VALUE other){ if (TYPE(other) == T_FIXNUM || TYPE(other) == T_BIGNUM) return *self == Gosu::Color(NUM2ULONG(other)); void* ptr; int res = SWIG_ConvertPtr(other, &ptr, SWIGTYPE_p_Gosu__Color, 0); return SWIG_IsOK(res) && ptr && *self == *reinterpret_cast(ptr); } SWIGINTERNINLINE VALUE SWIG_From_bool (bool value) { return value ? Qtrue : Qfalse; } /*@SWIG:/usr/local/Cellar/swig/3.0.8/share/swig/3.0.8/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args) { VALUE obj = args[0]; VALUE type = TYPE(obj); long *res = (long *)(args[1]); *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj); return obj; } /*@SWIG@*/ SWIGINTERN int SWIG_AsVal_long (VALUE obj, long* val) { VALUE type = TYPE(obj); if ((type == T_FIXNUM) || (type == T_BIGNUM)) { long v; VALUE a[2]; a[0] = obj; a[1] = (VALUE)(&v); if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) { if (val) *val = v; return SWIG_OK; } } return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_int (VALUE obj, int *val) { long v; int res = SWIG_AsVal_long (obj, &v); if (SWIG_IsOK(res)) { if ((v < INT_MIN || v > INT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< int >(v); } } return res; } SWIGINTERN Gosu::Font *new_Gosu_Font__SWIG_0(Gosu::Window &window,std::wstring const &fontName,unsigned int height){ return new Gosu::Font(height, fontName); } SWIGINTERN Gosu::Font *new_Gosu_Font__SWIG_1(unsigned int height,VALUE options=0){ std::wstring fontName = Gosu::defaultFontName(); if (options) { Check_Type(options, T_HASH); VALUE keys = rb_funcall(options, rb_intern("keys"), 0, NULL); int keysSize = NUM2INT(rb_funcall(keys, rb_intern("size"), 0, NULL)); for (int i = 0; i < keysSize; ++i) { VALUE key = rb_ary_entry(keys, i); const char* keyString = Gosu::cstrFromSymbol(key); VALUE value = rb_hash_aref(options, key); if (!strcmp(keyString, "name")) { VALUE rbString = rb_obj_as_string(value); char* utf8String = StringValueCStr(rbString); fontName = Gosu::utf8ToWstring(utf8String); } // TODO - would be nice & trivial to support :bold => false and :italic => true here else { static bool issuedWarning = false; if (!issuedWarning) { issuedWarning = true; rb_warn("Unknown keyword argument: :%s", keyString); } } } } return new Gosu::Font(height, fontName); } SWIGINTERN void Gosu_Font_set_image(Gosu::Font *self,wchar_t wc,VALUE source){ Gosu::Bitmap bitmap; Gosu::loadBitmap(bitmap, source); self->setImage(wc, Gosu::Image(bitmap, Gosu::ifSmooth)); } #include #include /* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */ #ifndef SWIG_isfinite # if defined(isfinite) # define SWIG_isfinite(X) (isfinite(X)) # elif defined(_MSC_VER) # define SWIG_isfinite(X) (_finite(X)) # elif defined(__sun) && defined(__SVR4) # include # define SWIG_isfinite(X) (finite(X)) # endif #endif /* Accept infinite as a valid float value unless we are unable to check if a value is finite */ #ifdef SWIG_isfinite # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX) && SWIG_isfinite(X)) #else # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX)) #endif SWIGINTERN int SWIG_AsVal_float (VALUE obj, float *val) { double v; int res = SWIG_AsVal_double (obj, &v); if (SWIG_IsOK(res)) { if (SWIG_Float_Overflow_Check(v)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< float >(v); } } return res; } SWIGINTERNINLINE VALUE SWIG_From_float (float value) { return SWIG_From_double (value); } SWIGINTERN Gosu::Image *new_Gosu_Image(VALUE source,VALUE options=0){ Gosu::Bitmap bmp; Gosu::loadBitmap(bmp, source); unsigned srcX = 0, srcY = 0, srcWidth = bmp.width(), srcHeight = bmp.height(); unsigned flags = 0; if (options) { Check_Type(options, T_HASH); VALUE keys = rb_funcall(options, rb_intern("keys"), 0, NULL); int keysSize = NUM2INT(rb_funcall(keys, rb_intern("size"), 0, NULL)); for (int i = 0; i < keysSize; ++i) { VALUE key = rb_ary_entry(keys, i); const char* keyString = Gosu::cstrFromSymbol(key); VALUE value = rb_hash_aref(options, key); if (!strcmp(keyString, "tileable")) { if (RTEST(value)) flags |= Gosu::ifTileable; } else if (!strcmp(keyString, "retro")) { if (RTEST(value)) flags |= Gosu::ifRetro; } else if (!strcmp(keyString, "rect")) { Check_Type(value, T_ARRAY); int rectSize = NUM2INT(rb_funcall(value, rb_intern("size"), 0, NULL)); if (rectSize != 4) rb_raise(rb_eArgError, "Argument passed to :rect must be a four-element Array (x, y, width, height)"); srcX = NUM2INT(rb_ary_entry(value, 0)); srcY = NUM2INT(rb_ary_entry(value, 1)); srcWidth = NUM2INT(rb_ary_entry(value, 2)); srcHeight = NUM2INT(rb_ary_entry(value, 3)); } else { static bool issuedWarning = false; if (!issuedWarning) { issuedWarning = true; rb_warn("Unknown keyword argument: :%s", keyString); } } } } return new Gosu::Image(bmp, srcX, srcY, srcWidth, srcHeight, flags); } SWIGINTERN void Gosu_Image_drawAsQuad(Gosu::Image *self,double x1,double y1,Gosu::Color c1,double x2,double y2,Gosu::Color c2,double x3,double y3,Gosu::Color c3,double x4,double y4,Gosu::Color c4,Gosu::ZPos z,Gosu::AlphaMode mode=Gosu::amDefault){ self->getData().draw(x1, y1, c1, x2, y2, c2, x3, y3, c3, x4, y4, c4, z, mode); } SWIGINTERN Gosu::GLTexInfo *Gosu_Image_glTexInfo(Gosu::Image const *self){ const Gosu::GLTexInfo* info = self->getData().glTexInfo(); if (info) return new Gosu::GLTexInfo(*info); else return 0; } SWIGINTERN Gosu::Image *Gosu_Image_subimage(Gosu::Image *self,int x,int y,int w,int h){ GOSU_UNIQUE_PTR imageData = self->getData().subimage(x, y, w, h); return imageData.get() ? new Gosu::Image(GOSU_MOVE_UNIQUE_PTR(imageData)) : 0; } SWIGINTERN Gosu::Image *Gosu_Image_fromText(std::wstring const &text,unsigned int fontHeight,VALUE options=0){ std::wstring font = Gosu::defaultFontName(); unsigned width = 0xfefefefe; unsigned spacing = 0; Gosu::TextAlign align = Gosu::taLeft; unsigned flags = 0; if (options) { Check_Type(options, T_HASH); VALUE keys = rb_funcall(options, rb_intern("keys"), 0, NULL); int keysSize = NUM2INT(rb_funcall(keys, rb_intern("size"), 0, NULL)); for (int i = 0; i < keysSize; ++i) { VALUE key = rb_ary_entry(keys, i); const char* keyString = Gosu::cstrFromSymbol(key); VALUE value = rb_hash_aref(options, key); if (!strcmp(keyString, "font")) { const char* fontUTF8 = StringValuePtr(value); font = Gosu::utf8ToWstring(fontUTF8); } else if (!strcmp(keyString, "align")) { const char* cstr = Gosu::cstrFromSymbol(value); if (!strcmp(cstr, "left")) align = Gosu::taLeft; else if (!strcmp(cstr, "center")) align = Gosu::taCenter; else if (!strcmp(cstr, "right")) align = Gosu::taRight; else if (!strcmp(cstr, "justify")) align = Gosu::taJustify; else rb_raise(rb_eArgError, "Argument passed to :align must be a valid text alignment (:left, :center, :right, :justify)"); } else if (!strcmp(keyString, "width")) { width = NUM2INT(value); } else if (!strcmp(keyString, "spacing")) { spacing = NUM2INT(value); } else if (!strcmp(keyString, "retro")) { if (RTEST(value)) flags |= Gosu::ifRetro; } else { static bool issuedWarning = false; if (!issuedWarning) { issuedWarning = true; rb_warn("Unknown keyword argument: :%s", keyString); } } } } if (width == 0xfefefefe) return new Gosu::Image(Gosu::createText(text, font, fontHeight), flags); else return new Gosu::Image(Gosu::createText(text, font, fontHeight, spacing, width, align), flags); } SWIGINTERN std::vector< Gosu::Image > Gosu_Image_loadTiles__SWIG_0(VALUE source,int tileWidth,int tileHeight,VALUE options=0){ Gosu::Bitmap bmp; Gosu::loadBitmap(bmp, source); unsigned flags = 0; if (options) { Check_Type(options, T_HASH); VALUE keys = rb_funcall(options, rb_intern("keys"), 0, NULL); int keysSize = NUM2INT(rb_funcall(keys, rb_intern("size"), 0, NULL)); for (int i = 0; i < keysSize; ++i) { VALUE key = rb_ary_entry(keys, i); const char* keyString = Gosu::cstrFromSymbol(key); VALUE value = rb_hash_aref(options, key); if (!strcmp(keyString, "tileable")) { if (RTEST(value)) flags |= Gosu::ifTileable; } else if (!strcmp(keyString, "retro")) { if (RTEST(value)) flags |= Gosu::ifRetro; } else { static bool issuedWarning = false; if (!issuedWarning) { issuedWarning = true; rb_warn("Unknown keyword argument: :%s", keyString); } } } } return Gosu::loadTiles(bmp, tileWidth, tileHeight, flags); } SWIGINTERN int SWIG_AsVal_bool (VALUE obj, bool *val) { if (obj == Qtrue) { if (val) *val = true; return SWIG_OK; } else if (obj == Qfalse) { if (val) *val = false; return SWIG_OK; } else { int res = 0; if (SWIG_AsVal_int (obj, &res) == SWIG_OK) { if (val) *val = res ? true : false; return SWIG_OK; } } return SWIG_TypeError; } SWIGINTERN std::vector< Gosu::Image > Gosu_Image_loadTiles__SWIG_1(Gosu::Window &window,VALUE source,int tileWidth,int tileHeight,bool tileable){ Gosu::Bitmap bmp; Gosu::loadBitmap(bmp, source); return Gosu::loadTiles(bmp, tileWidth, tileHeight, tileable ? Gosu::ifTileable : Gosu::ifSmooth); } SWIGINTERN std::string Gosu_Image_toBlob(Gosu::Image const *self){ // TODO: Optimize with direct copy into a Ruby string Gosu::Bitmap bmp = self->getData().toBitmap(); return std::string(reinterpret_cast(bmp.data()), reinterpret_cast(bmp.data()) + bmp.width() * bmp.height() * 4); } SWIGINTERN unsigned int Gosu_Image_columns(Gosu::Image const *self){ return self->width(); } SWIGINTERN unsigned int Gosu_Image_rows(Gosu::Image const *self){ return self->height(); } SWIGINTERN void Gosu_Image_save(Gosu::Image const *self,std::wstring const &filename){ Gosu::saveImageFile(self->getData().toBitmap(), filename); } SWIGINTERN void Gosu_Image_insert(Gosu::Image *self,VALUE source,int x,int y){ Gosu::Bitmap bmp; Gosu::loadBitmap(bmp, source); self->getData().insert(bmp, x, y); } SWIGINTERN unsigned int Gosu_TextInput_caret_pos(Gosu::TextInput const *self){ return RUBY_18_19(Gosu::wstringToUTF8(self->text().substr(0, self->caretPos())).size(), self->caretPos()); } SWIGINTERN unsigned int Gosu_TextInput_selection_start(Gosu::TextInput const *self){ return RUBY_18_19(Gosu::wstringToUTF8(self->text().substr(0, self->selectionStart())).size(), self->selectionStart()); } SWIGINTERN Gosu::TextInput *Gosu_Window_textInput(Gosu::Window const *self){ return self->input().textInput(); } SWIGINTERN void Gosu_Window_setTextInput(Gosu::Window *self,Gosu::TextInput *ti){ self->input().setTextInput(ti); } SWIGINTERN double Gosu_Window_mouseX(Gosu::Window const *self){ return self->input().mouseX(); } SWIGINTERN double Gosu_Window_mouseY(Gosu::Window const *self){ return self->input().mouseY(); } SWIGINTERN void Gosu_Window_setMousePosition(Gosu::Window *self,double x,double y){ self->input().setMousePosition(x, y); } SWIGINTERN void Gosu_Window_setMouseX(Gosu::Window *self,double x){ self->input().setMousePosition(x, self->input().mouseY()); } SWIGINTERN void Gosu_Window_setMouseY(Gosu::Window *self,double y){ self->input().setMousePosition(self->input().mouseX(), y); } SWIGINTERN int Gosu_Window_width(Gosu::Window const *self){ return self->graphics().width(); } SWIGINTERN int Gosu_Window_height(Gosu::Window const *self){ return self->graphics().height(); } SWIGINTERN bool Gosu_Window_fullscreen(Gosu::Window const *self){ return self->graphics().fullscreen(); } static void markWindow(void* window) { #ifndef __MACRUBY__ Gosu::TextInput* ti = static_cast(window)->input().textInput(); if (VALUE ti_value = SWIG_RubyInstanceFor(ti)) rb_gc_mark(ti_value); #endif } /* --------------------------------------------------- * C++ director class helpers * --------------------------------------------------- */ /* --------------------------------------------------- * C++ director class methods * --------------------------------------------------- */ #include "gosu_wrap.h" SwigDirector_TextInput::SwigDirector_TextInput(VALUE self): Gosu::TextInput(), Swig::Director(self) { } SwigDirector_TextInput::~SwigDirector_TextInput() { } std::wstring SwigDirector_TextInput::filter(std::wstring const &text) const { std::wstring c_result ; VALUE obj0 = Qnil ; VALUE result; { obj0 = rb_str_new2(Gosu::wstringToUTF8(text).c_str()); FIX_ENCODING(obj0); } result = rb_funcall(swig_get_self(), rb_intern("filter"), 1,obj0); { VALUE localTemporary = rb_obj_as_string(result); c_result = Gosu::utf8ToWstring(StringValueCStr(localTemporary));; } return (std::wstring) c_result; } SwigDirector_Window::SwigDirector_Window(VALUE self, unsigned int width, unsigned int height, bool fullscreen, double updateInterval): Gosu::Window(width, height, fullscreen, updateInterval), Swig::Director(self) { } SwigDirector_Window::~SwigDirector_Window() { } void SwigDirector_Window::show() { VALUE result; result = rb_funcall(swig_get_self(), rb_intern("show"), 0, NULL); } bool SwigDirector_Window::tick() { bool c_result ; VALUE result; result = rb_funcall(swig_get_self(), rb_intern("tick"), 0, NULL); bool swig_val; int swig_res = SWIG_AsVal_bool(result, &swig_val); if (!SWIG_IsOK(swig_res)) { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); } c_result = static_cast< bool >(swig_val); return (bool) c_result; } void SwigDirector_Window::update() { VALUE result; result = rb_funcall(swig_get_self(), rb_intern("update"), 0, NULL); } void SwigDirector_Window::draw() { VALUE result; result = rb_funcall(swig_get_self(), rb_intern("draw"), 0, NULL); } bool SwigDirector_Window::needsRedraw() const { bool c_result ; VALUE result; result = rb_funcall(swig_get_self(), rb_intern("needs_redraw?"), 0, NULL); bool swig_val; int swig_res = SWIG_AsVal_bool(result, &swig_val); if (!SWIG_IsOK(swig_res)) { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); } c_result = static_cast< bool >(swig_val); return (bool) c_result; } bool SwigDirector_Window::needsCursor() const { bool c_result ; VALUE result; result = rb_funcall(swig_get_self(), rb_intern("needs_cursor?"), 0, NULL); bool swig_val; int swig_res = SWIG_AsVal_bool(result, &swig_val); if (!SWIG_IsOK(swig_res)) { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); } c_result = static_cast< bool >(swig_val); return (bool) c_result; } void SwigDirector_Window::loseFocus() { VALUE result; result = rb_funcall(swig_get_self(), rb_intern("lose_focus"), 0, NULL); } void SwigDirector_Window::releaseMemory() { VALUE result; result = rb_funcall(swig_get_self(), rb_intern("release_memory"), 0, NULL); } void SwigDirector_Window::buttonDown(Gosu::Button arg0) { VALUE obj0 = Qnil ; VALUE result; { if (arg0 == Gosu::noButton) obj0 = Qnil; else obj0 = LONG2NUM((&arg0)->id()); } result = rb_funcall(swig_get_self(), rb_intern("button_down"), 1,obj0); } void SwigDirector_Window::buttonUp(Gosu::Button arg0) { VALUE obj0 = Qnil ; VALUE result; { if (arg0 == Gosu::noButton) obj0 = Qnil; else obj0 = LONG2NUM((&arg0)->id()); } result = rb_funcall(swig_get_self(), rb_intern("button_up"), 1,obj0); } SWIGINTERN VALUE _wrap_milliseconds(int argc, VALUE *argv, VALUE self) { unsigned long result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } { try { result = (unsigned long)Gosu::milliseconds(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_random(int argc, VALUE *argv, VALUE self) { double arg1 ; double arg2 ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; double result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::random", 1, argv[0] )); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::random", 2, argv[1] )); } arg2 = static_cast< double >(val2); { try { result = (double)Gosu::random(arg1,arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_degrees_to_radians(int argc, VALUE *argv, VALUE self) { double arg1 ; double val1 ; int ecode1 = 0 ; double result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::degreesToRadians", 1, argv[0] )); } arg1 = static_cast< double >(val1); { try { result = (double)Gosu::degreesToRadians(arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_radians_to_degrees(int argc, VALUE *argv, VALUE self) { double arg1 ; double val1 ; int ecode1 = 0 ; double result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::radiansToDegrees", 1, argv[0] )); } arg1 = static_cast< double >(val1); { try { result = (double)Gosu::radiansToDegrees(arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_offset_x(int argc, VALUE *argv, VALUE self) { double arg1 ; double arg2 ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; double result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::offsetX", 1, argv[0] )); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::offsetX", 2, argv[1] )); } arg2 = static_cast< double >(val2); { try { result = (double)Gosu::offsetX(arg1,arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_offset_y(int argc, VALUE *argv, VALUE self) { double arg1 ; double arg2 ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; double result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::offsetY", 1, argv[0] )); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::offsetY", 2, argv[1] )); } arg2 = static_cast< double >(val2); { try { result = (double)Gosu::offsetY(arg1,arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_angle(int argc, VALUE *argv, VALUE self) { double arg1 ; double arg2 ; double arg3 ; double arg4 ; double arg5 = (double) 0 ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double result; VALUE vresult = Qnil; if ((argc < 4) || (argc > 5)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::angle", 1, argv[0] )); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::angle", 2, argv[1] )); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(argv[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Gosu::angle", 3, argv[2] )); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(argv[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","Gosu::angle", 4, argv[3] )); } arg4 = static_cast< double >(val4); if (argc > 4) { ecode5 = SWIG_AsVal_double(argv[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","Gosu::angle", 5, argv[4] )); } arg5 = static_cast< double >(val5); } { try { result = (double)Gosu::angle(arg1,arg2,arg3,arg4,arg5); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_angle_diff(int argc, VALUE *argv, VALUE self) { double arg1 ; double arg2 ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; double result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::angleDiff", 1, argv[0] )); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::angleDiff", 2, argv[1] )); } arg2 = static_cast< double >(val2); { try { result = (double)Gosu::angleDiff(arg1,arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_normalize_angle(int argc, VALUE *argv, VALUE self) { double arg1 ; double val1 ; int ecode1 = 0 ; double result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::normalizeAngle", 1, argv[0] )); } arg1 = static_cast< double >(val1); { try { result = (double)Gosu::normalizeAngle(arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_distance(int argc, VALUE *argv, VALUE self) { double arg1 ; double arg2 ; double arg3 ; double arg4 ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double result; VALUE vresult = Qnil; if ((argc < 4) || (argc > 4)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::distance", 1, argv[0] )); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::distance", 2, argv[1] )); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(argv[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Gosu::distance", 3, argv[2] )); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(argv[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","Gosu::distance", 4, argv[3] )); } arg4 = static_cast< double >(val4); { try { result = (double)Gosu::distance(arg1,arg2,arg3,arg4); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_default_font_name(int argc, VALUE *argv, VALUE self) { std::wstring result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } { try { result = Gosu::defaultFontName(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } { vresult = rb_str_new2(Gosu::wstringToUTF8(result).c_str()); FIX_ENCODING(vresult); } return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_language(int argc, VALUE *argv, VALUE self) { std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } { try { result = Gosu::language(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } { vresult = rb_str_new2((&result)->c_str()); FIX_ENCODING(vresult); } return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_enable_undocumented_retrofication(int argc, VALUE *argv, VALUE self) { if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } { try { Gosu::enableUndocumentedRetrofication(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap__release_all_openal_resources(int argc, VALUE *argv, VALUE self) { if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } { try { Gosu::releaseAllOpenALResources(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_register_entity(int argc, VALUE *argv, VALUE self) { std::wstring *arg1 = 0 ; Gosu::Image *arg2 = (Gosu::Image *) 0 ; std::wstring temp1 ; void *argp2 = 0 ; int res2 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } { VALUE localTemporary = rb_obj_as_string(argv[0]); temp1 = Gosu::utf8ToWstring(StringValueCStr(localTemporary)); arg1 = &temp1; } res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_Gosu__Image, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Gosu::Image *","Gosu::register_entity", 2, argv[1] )); } arg2 = reinterpret_cast< Gosu::Image * >(argp2); { try { Gosu::register_entity((std::wstring const &)*arg1,arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } static swig_class SwigClassColor; SWIGINTERN VALUE _wrap_new_Color__SWIG_0(int argc, VALUE *argv, VALUE self) { const char *classname SWIGUNUSED = "Gosu::Color"; Gosu::Color *result = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } { try { result = (Gosu::Color *)new Gosu::Color(); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_Color__SWIG_1(int argc, VALUE *argv, VALUE self) { unsigned int arg1 ; unsigned int val1 ; int ecode1 = 0 ; const char *classname SWIGUNUSED = "Gosu::Color"; Gosu::Color *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned int","Color", 1, argv[0] )); } arg1 = static_cast< unsigned int >(val1); { try { result = (Gosu::Color *)new Gosu::Color(arg1); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_Color__SWIG_2(int argc, VALUE *argv, VALUE self) { Gosu::Color::Channel arg1 ; Gosu::Color::Channel arg2 ; Gosu::Color::Channel arg3 ; const char *classname SWIGUNUSED = "Gosu::Color"; Gosu::Color *result = 0 ; if ((argc < 3) || (argc > 3)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; } { arg1 = Gosu::clamp(NUM2ULONG(argv[0]), 0, 255); } { arg2 = Gosu::clamp(NUM2ULONG(argv[1]), 0, 255); } { arg3 = Gosu::clamp(NUM2ULONG(argv[2]), 0, 255); } { try { result = (Gosu::Color *)new Gosu::Color(arg1,arg2,arg3); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return self; fail: return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_Color_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_Color_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Gosu__Color); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_Color__SWIG_3(int argc, VALUE *argv, VALUE self) { Gosu::Color::Channel arg1 ; Gosu::Color::Channel arg2 ; Gosu::Color::Channel arg3 ; Gosu::Color::Channel arg4 ; const char *classname SWIGUNUSED = "Gosu::Color"; Gosu::Color *result = 0 ; if ((argc < 4) || (argc > 4)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; } { arg1 = Gosu::clamp(NUM2ULONG(argv[0]), 0, 255); } { arg2 = Gosu::clamp(NUM2ULONG(argv[1]), 0, 255); } { arg3 = Gosu::clamp(NUM2ULONG(argv[2]), 0, 255); } { arg4 = Gosu::clamp(NUM2ULONG(argv[3]), 0, 255); } { try { result = (Gosu::Color *)new Gosu::Color(arg1,arg2,arg3,arg4); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_Color(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[4]; int ii; argc = nargs; if (argc > 4) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if (argc == 0) { return _wrap_new_Color__SWIG_0(nargs, args, self); } if (argc == 1) { int _v; { int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_Color__SWIG_1(nargs, args, self); } } if (argc == 3) { int _v; { _v = !!rb_respond_to(argv[0], rb_intern("to_i")); } if (_v) { { _v = !!rb_respond_to(argv[1], rb_intern("to_i")); } if (_v) { { _v = !!rb_respond_to(argv[2], rb_intern("to_i")); } if (_v) { return _wrap_new_Color__SWIG_2(nargs, args, self); } } } } if (argc == 4) { int _v; { _v = !!rb_respond_to(argv[0], rb_intern("to_i")); } if (_v) { { _v = !!rb_respond_to(argv[1], rb_intern("to_i")); } if (_v) { { _v = !!rb_respond_to(argv[2], rb_intern("to_i")); } if (_v) { { _v = !!rb_respond_to(argv[3], rb_intern("to_i")); } if (_v) { return _wrap_new_Color__SWIG_3(nargs, args, self); } } } } } fail: Ruby_Format_OverloadedError( argc, 4, "Color.new", " Color.new()\n" " Color.new(unsigned int argb)\n" " Color.new(Gosu::Color::Channel red, Gosu::Color::Channel green, Gosu::Color::Channel blue)\n" " Color.new(Gosu::Color::Channel alpha, Gosu::Color::Channel red, Gosu::Color::Channel green, Gosu::Color::Channel blue)\n"); return Qnil; } SWIGINTERN VALUE _wrap_Color_from_hsv(int argc, VALUE *argv, VALUE self) { double arg1 ; double arg2 ; double arg3 ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; Gosu::Color result; VALUE vresult = Qnil; if ((argc < 3) || (argc > 3)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::Color::fromHSV", 1, argv[0] )); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::Color::fromHSV", 2, argv[1] )); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(argv[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Gosu::Color::fromHSV", 3, argv[2] )); } arg3 = static_cast< double >(val3); { try { result = Gosu::Color::fromHSV(arg1,arg2,arg3); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_NewPointerObj((new Gosu::Color(static_cast< const Gosu::Color& >(result))), SWIGTYPE_p_Gosu__Color, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_from_ahsv(int argc, VALUE *argv, VALUE self) { Gosu::Color::Channel arg1 ; double arg2 ; double arg3 ; double arg4 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; Gosu::Color result; VALUE vresult = Qnil; if ((argc < 4) || (argc > 4)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; } { arg1 = Gosu::clamp(NUM2ULONG(argv[0]), 0, 255); } ecode2 = SWIG_AsVal_double(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::Color::fromAHSV", 2, argv[1] )); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(argv[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Gosu::Color::fromAHSV", 3, argv[2] )); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(argv[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","Gosu::Color::fromAHSV", 4, argv[3] )); } arg4 = static_cast< double >(val4); { try { result = Gosu::Color::fromAHSV(arg1,arg2,arg3,arg4); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_NewPointerObj((new Gosu::Color(static_cast< const Gosu::Color& >(result))), SWIGTYPE_p_Gosu__Color, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_red(int argc, VALUE *argv, VALUE self) { Gosu::Color *arg1 = (Gosu::Color *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Gosu::Color::Channel result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","red", 1, self )); } arg1 = reinterpret_cast< Gosu::Color * >(argp1); { try { result = ((Gosu::Color const *)arg1)->red(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_green(int argc, VALUE *argv, VALUE self) { Gosu::Color *arg1 = (Gosu::Color *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Gosu::Color::Channel result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","green", 1, self )); } arg1 = reinterpret_cast< Gosu::Color * >(argp1); { try { result = ((Gosu::Color const *)arg1)->green(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_blue(int argc, VALUE *argv, VALUE self) { Gosu::Color *arg1 = (Gosu::Color *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Gosu::Color::Channel result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","blue", 1, self )); } arg1 = reinterpret_cast< Gosu::Color * >(argp1); { try { result = ((Gosu::Color const *)arg1)->blue(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_alpha(int argc, VALUE *argv, VALUE self) { Gosu::Color *arg1 = (Gosu::Color *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Gosu::Color::Channel result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","alpha", 1, self )); } arg1 = reinterpret_cast< Gosu::Color * >(argp1); { try { result = ((Gosu::Color const *)arg1)->alpha(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_rede___(int argc, VALUE *argv, VALUE self) { Gosu::Color *arg1 = (Gosu::Color *) 0 ; Gosu::Color::Channel arg2 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color *","setRed", 1, self )); } arg1 = reinterpret_cast< Gosu::Color * >(argp1); { arg2 = Gosu::clamp(NUM2ULONG(argv[0]), 0, 255); } { try { (arg1)->setRed(arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_greene___(int argc, VALUE *argv, VALUE self) { Gosu::Color *arg1 = (Gosu::Color *) 0 ; Gosu::Color::Channel arg2 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color *","setGreen", 1, self )); } arg1 = reinterpret_cast< Gosu::Color * >(argp1); { arg2 = Gosu::clamp(NUM2ULONG(argv[0]), 0, 255); } { try { (arg1)->setGreen(arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_bluee___(int argc, VALUE *argv, VALUE self) { Gosu::Color *arg1 = (Gosu::Color *) 0 ; Gosu::Color::Channel arg2 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color *","setBlue", 1, self )); } arg1 = reinterpret_cast< Gosu::Color * >(argp1); { arg2 = Gosu::clamp(NUM2ULONG(argv[0]), 0, 255); } { try { (arg1)->setBlue(arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_alphae___(int argc, VALUE *argv, VALUE self) { Gosu::Color *arg1 = (Gosu::Color *) 0 ; Gosu::Color::Channel arg2 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color *","setAlpha", 1, self )); } arg1 = reinterpret_cast< Gosu::Color * >(argp1); { arg2 = Gosu::clamp(NUM2ULONG(argv[0]), 0, 255); } { try { (arg1)->setAlpha(arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_hue(int argc, VALUE *argv, VALUE self) { Gosu::Color *arg1 = (Gosu::Color *) 0 ; void *argp1 = 0 ; int res1 = 0 ; double result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","hue", 1, self )); } arg1 = reinterpret_cast< Gosu::Color * >(argp1); { try { result = (double)((Gosu::Color const *)arg1)->hue(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_huee___(int argc, VALUE *argv, VALUE self) { Gosu::Color *arg1 = (Gosu::Color *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color *","setHue", 1, self )); } arg1 = reinterpret_cast< Gosu::Color * >(argp1); ecode2 = SWIG_AsVal_double(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","setHue", 2, argv[0] )); } arg2 = static_cast< double >(val2); { try { (arg1)->setHue(arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_saturation(int argc, VALUE *argv, VALUE self) { Gosu::Color *arg1 = (Gosu::Color *) 0 ; void *argp1 = 0 ; int res1 = 0 ; double result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","saturation", 1, self )); } arg1 = reinterpret_cast< Gosu::Color * >(argp1); { try { result = (double)((Gosu::Color const *)arg1)->saturation(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_saturatione___(int argc, VALUE *argv, VALUE self) { Gosu::Color *arg1 = (Gosu::Color *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color *","setSaturation", 1, self )); } arg1 = reinterpret_cast< Gosu::Color * >(argp1); ecode2 = SWIG_AsVal_double(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","setSaturation", 2, argv[0] )); } arg2 = static_cast< double >(val2); { try { (arg1)->setSaturation(arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_value(int argc, VALUE *argv, VALUE self) { Gosu::Color *arg1 = (Gosu::Color *) 0 ; void *argp1 = 0 ; int res1 = 0 ; double result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","value", 1, self )); } arg1 = reinterpret_cast< Gosu::Color * >(argp1); { try { result = (double)((Gosu::Color const *)arg1)->value(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_valuee___(int argc, VALUE *argv, VALUE self) { Gosu::Color *arg1 = (Gosu::Color *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color *","setValue", 1, self )); } arg1 = reinterpret_cast< Gosu::Color * >(argp1); ecode2 = SWIG_AsVal_double(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","setValue", 2, argv[0] )); } arg2 = static_cast< double >(val2); { try { (arg1)->setValue(arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_argb__SWIG_0(int argc, VALUE *argv, VALUE self) { Gosu::Color *arg1 = (Gosu::Color *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::tr1::uint32_t result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","argb", 1, self )); } arg1 = reinterpret_cast< Gosu::Color * >(argp1); { try { result = ((Gosu::Color const *)arg1)->argb(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_bgr(int argc, VALUE *argv, VALUE self) { Gosu::Color *arg1 = (Gosu::Color *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::tr1::uint32_t result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","bgr", 1, self )); } arg1 = reinterpret_cast< Gosu::Color * >(argp1); { try { result = ((Gosu::Color const *)arg1)->bgr(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_abgr(int argc, VALUE *argv, VALUE self) { Gosu::Color *arg1 = (Gosu::Color *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::tr1::uint32_t result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","abgr", 1, self )); } arg1 = reinterpret_cast< Gosu::Color * >(argp1); { try { result = ((Gosu::Color const *)arg1)->abgr(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_gl(int argc, VALUE *argv, VALUE self) { Gosu::Color *arg1 = (Gosu::Color *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::tr1::uint32_t result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","gl", 1, self )); } arg1 = reinterpret_cast< Gosu::Color * >(argp1); { try { result = ((Gosu::Color const *)arg1)->gl(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_rgb(int argc, VALUE *argv, VALUE self) { Gosu::Color::Channel arg1 ; Gosu::Color::Channel arg2 ; Gosu::Color::Channel arg3 ; Gosu::Color result; VALUE vresult = Qnil; if ((argc < 3) || (argc > 3)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; } { arg1 = Gosu::clamp(NUM2ULONG(argv[0]), 0, 255); } { arg2 = Gosu::clamp(NUM2ULONG(argv[1]), 0, 255); } { arg3 = Gosu::clamp(NUM2ULONG(argv[2]), 0, 255); } { try { result = Gosu_Color_rgb(arg1,arg2,arg3); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_NewPointerObj((new Gosu::Color(static_cast< const Gosu::Color& >(result))), SWIGTYPE_p_Gosu__Color, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_rgba__SWIG_0(int argc, VALUE *argv, VALUE self) { Gosu::Color::Channel arg1 ; Gosu::Color::Channel arg2 ; Gosu::Color::Channel arg3 ; Gosu::Color::Channel arg4 ; Gosu::Color result; VALUE vresult = Qnil; if ((argc < 4) || (argc > 4)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; } { arg1 = Gosu::clamp(NUM2ULONG(argv[0]), 0, 255); } { arg2 = Gosu::clamp(NUM2ULONG(argv[1]), 0, 255); } { arg3 = Gosu::clamp(NUM2ULONG(argv[2]), 0, 255); } { arg4 = Gosu::clamp(NUM2ULONG(argv[3]), 0, 255); } { try { result = Gosu_Color_rgba__SWIG_0(arg1,arg2,arg3,arg4); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_NewPointerObj((new Gosu::Color(static_cast< const Gosu::Color& >(result))), SWIGTYPE_p_Gosu__Color, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_rgba__SWIG_1(int argc, VALUE *argv, VALUE self) { std::tr1::uint32_t arg1 ; unsigned long val1 ; int ecode1 = 0 ; Gosu::Color result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_unsigned_SS_long(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "std::tr1::uint32_t","Gosu_Color_rgba__SWIG_1", 1, argv[0] )); } arg1 = static_cast< std::tr1::uint32_t >(val1); { try { result = Gosu_Color_rgba__SWIG_1(arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_NewPointerObj((new Gosu::Color(static_cast< const Gosu::Color& >(result))), SWIGTYPE_p_Gosu__Color, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_rgba(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[4]; int ii; argc = nargs; if (argc > 4) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if (argc == 1) { int _v; { int res = SWIG_AsVal_unsigned_SS_long(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_Color_rgba__SWIG_1(nargs, args, self); } } if (argc == 4) { int _v; { _v = !!rb_respond_to(argv[0], rb_intern("to_i")); } if (_v) { { _v = !!rb_respond_to(argv[1], rb_intern("to_i")); } if (_v) { { _v = !!rb_respond_to(argv[2], rb_intern("to_i")); } if (_v) { { _v = !!rb_respond_to(argv[3], rb_intern("to_i")); } if (_v) { return _wrap_Color_rgba__SWIG_0(nargs, args, self); } } } } } fail: Ruby_Format_OverloadedError( argc, 4, "rgba", " Gosu::Color rgba(Gosu::Color::Channel r, Gosu::Color::Channel g, Gosu::Color::Channel b, Gosu::Color::Channel a)\n" " Gosu::Color rgba(std::tr1::uint32_t rgba)\n"); return Qnil; } SWIGINTERN VALUE _wrap_Color_argb__SWIG_1(int argc, VALUE *argv, VALUE self) { Gosu::Color::Channel arg1 ; Gosu::Color::Channel arg2 ; Gosu::Color::Channel arg3 ; Gosu::Color::Channel arg4 ; Gosu::Color result; VALUE vresult = Qnil; if ((argc < 4) || (argc > 4)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; } { arg1 = Gosu::clamp(NUM2ULONG(argv[0]), 0, 255); } { arg2 = Gosu::clamp(NUM2ULONG(argv[1]), 0, 255); } { arg3 = Gosu::clamp(NUM2ULONG(argv[2]), 0, 255); } { arg4 = Gosu::clamp(NUM2ULONG(argv[3]), 0, 255); } { try { result = Gosu_Color_argb__SWIG_1(arg1,arg2,arg3,arg4); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_NewPointerObj((new Gosu::Color(static_cast< const Gosu::Color& >(result))), SWIGTYPE_p_Gosu__Color, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_argb__SWIG_2(int argc, VALUE *argv, VALUE self) { std::tr1::uint32_t arg1 ; unsigned long val1 ; int ecode1 = 0 ; Gosu::Color result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_unsigned_SS_long(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "std::tr1::uint32_t","Gosu_Color_argb__SWIG_2", 1, argv[0] )); } arg1 = static_cast< std::tr1::uint32_t >(val1); { try { result = Gosu_Color_argb__SWIG_2(arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_NewPointerObj((new Gosu::Color(static_cast< const Gosu::Color& >(result))), SWIGTYPE_p_Gosu__Color, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Color_argb(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[4]; int ii; argc = nargs; if (argc > 4) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Gosu__Color, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Color_argb__SWIG_0(nargs, args, self); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_unsigned_SS_long(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_Color_argb__SWIG_2(nargs, args, self); } } if (argc == 4) { int _v; { _v = !!rb_respond_to(argv[0], rb_intern("to_i")); } if (_v) { { _v = !!rb_respond_to(argv[1], rb_intern("to_i")); } if (_v) { { _v = !!rb_respond_to(argv[2], rb_intern("to_i")); } if (_v) { { _v = !!rb_respond_to(argv[3], rb_intern("to_i")); } if (_v) { return _wrap_Color_argb__SWIG_1(nargs, args, self); } } } } } fail: Ruby_Format_OverloadedError( argc, 4, "Color.argb", " Gosu::Color Color.argb(Gosu::Color const *self)\n" " Gosu::Color Color.argb(Gosu::Color::Channel a, Gosu::Color::Channel r, Gosu::Color::Channel g, Gosu::Color::Channel b)\n" " Gosu::Color Color.argb(std::tr1::uint32_t argb)\n"); return Qnil; } /* Document-method: Gosu::Color.dup call-seq: dup -> Color Create a duplicate of the class and unfreeze it if needed. */ SWIGINTERN VALUE _wrap_Color_dup(int argc, VALUE *argv, VALUE self) { Gosu::Color *arg1 = (Gosu::Color *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Gosu::Color result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","dup", 1, self )); } arg1 = reinterpret_cast< Gosu::Color * >(argp1); { try { result = Gosu_Color_dup((Gosu::Color const *)arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_NewPointerObj((new Gosu::Color(static_cast< const Gosu::Color& >(result))), SWIGTYPE_p_Gosu__Color, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } /* Document-method: Gosu::Color.inspect call-seq: inspect -> std::string Inspect class and its contents. */ SWIGINTERN VALUE _wrap_Color_inspect(int argc, VALUE *argv, VALUE self) { Gosu::Color *arg1 = (Gosu::Color *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color const *","inspect", 1, self )); } arg1 = reinterpret_cast< Gosu::Color * >(argp1); { try { result = Gosu_Color_inspect((Gosu::Color const *)arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; } /* Document-method: Gosu::Color.== call-seq: ==(other) -> bool Equality comparison operator. */ SWIGINTERN VALUE _wrap_Color___eq__(int argc, VALUE *argv, VALUE self) { Gosu::Color *arg1 = (Gosu::Color *) 0 ; VALUE arg2 = (VALUE) 0 ; void *argp1 = 0 ; int res1 = 0 ; bool result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Color, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Color *","operator ==", 1, self )); } arg1 = reinterpret_cast< Gosu::Color * >(argp1); arg2 = argv[0]; { try { result = (bool)Gosu_Color_operator_Se__Se_(arg1,arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } SWIGINTERN void free_Gosu_Color(void *self) { Gosu::Color *arg1 = (Gosu::Color *)self; SWIG_RubyRemoveTracking(arg1); delete arg1; } static swig_class SwigClassFont; SWIGINTERN VALUE _wrap_Font_name(int argc, VALUE *argv, VALUE self) { Gosu::Font *arg1 = (Gosu::Font *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::wstring result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Font, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font const *","name", 1, self )); } arg1 = reinterpret_cast< Gosu::Font * >(argp1); { try { result = ((Gosu::Font const *)arg1)->name(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } { vresult = rb_str_new2(Gosu::wstringToUTF8(result).c_str()); FIX_ENCODING(vresult); } return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Font_height(int argc, VALUE *argv, VALUE self) { Gosu::Font *arg1 = (Gosu::Font *) 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Font, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font const *","height", 1, self )); } arg1 = reinterpret_cast< Gosu::Font * >(argp1); { try { result = (unsigned int)((Gosu::Font const *)arg1)->height(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Font_flags(int argc, VALUE *argv, VALUE self) { Gosu::Font *arg1 = (Gosu::Font *) 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Font, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font const *","flags", 1, self )); } arg1 = reinterpret_cast< Gosu::Font * >(argp1); { try { result = (unsigned int)((Gosu::Font const *)arg1)->flags(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Font_text_width(int argc, VALUE *argv, VALUE self) { Gosu::Font *arg1 = (Gosu::Font *) 0 ; std::wstring *arg2 = 0 ; double arg3 = (double) 1 ; void *argp1 = 0 ; int res1 = 0 ; std::wstring temp2 ; double val3 ; int ecode3 = 0 ; double result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Font, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font const *","textWidth", 1, self )); } arg1 = reinterpret_cast< Gosu::Font * >(argp1); { VALUE localTemporary = rb_obj_as_string(argv[0]); temp2 = Gosu::utf8ToWstring(StringValueCStr(localTemporary)); arg2 = &temp2; } if (argc > 1) { ecode3 = SWIG_AsVal_double(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","textWidth", 3, argv[1] )); } arg3 = static_cast< double >(val3); } { try { result = (double)((Gosu::Font const *)arg1)->textWidth((std::wstring const &)*arg2,arg3); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Font_draw(int argc, VALUE *argv, VALUE self) { Gosu::Font *arg1 = (Gosu::Font *) 0 ; std::wstring *arg2 = 0 ; double arg3 ; double arg4 ; Gosu::ZPos arg5 ; double arg6 = (double) 1 ; double arg7 = (double) 1 ; Gosu::Color arg8 = (Gosu::Color) Gosu::Color::WHITE ; Gosu::AlphaMode arg9 = (Gosu::AlphaMode) Gosu::amDefault ; void *argp1 = 0 ; int res1 = 0 ; std::wstring temp2 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val6 ; int ecode6 = 0 ; double val7 ; int ecode7 = 0 ; if ((argc < 4) || (argc > 8)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Font, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font const *","draw", 1, self )); } arg1 = reinterpret_cast< Gosu::Font * >(argp1); { VALUE localTemporary = rb_obj_as_string(argv[0]); temp2 = Gosu::utf8ToWstring(StringValueCStr(localTemporary)); arg2 = &temp2; } ecode3 = SWIG_AsVal_double(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","draw", 3, argv[1] )); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(argv[2], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","draw", 4, argv[2] )); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(argv[3], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "Gosu::ZPos","draw", 5, argv[3] )); } arg5 = static_cast< Gosu::ZPos >(val5); if (argc > 4) { ecode6 = SWIG_AsVal_double(argv[4], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","draw", 6, argv[4] )); } arg6 = static_cast< double >(val6); } if (argc > 5) { ecode7 = SWIG_AsVal_double(argv[5], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","draw", 7, argv[5] )); } arg7 = static_cast< double >(val7); } if (argc > 6) { { if (TYPE(argv[6]) == T_FIXNUM || TYPE(argv[6]) == T_BIGNUM) arg8 = Gosu::Color(NUM2ULONG(argv[6])); else { void* ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg8 = *reinterpret_cast(ptr); } } } if (argc > 7) { { const char* cstr = Gosu::cstrFromSymbol(argv[7]); if (!strcmp(cstr, "default")) arg9 = Gosu::amDefault; else if (!strcmp(cstr, "add")) arg9 = Gosu::amAdditive; else if (!strcmp(cstr, "additive")) arg9 = Gosu::amAdditive; else if (!strcmp(cstr, "multiply")) arg9 = Gosu::amMultiply; else SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode"); } } { try { ((Gosu::Font const *)arg1)->draw((std::wstring const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Font_draw_rel(int argc, VALUE *argv, VALUE self) { Gosu::Font *arg1 = (Gosu::Font *) 0 ; std::wstring *arg2 = 0 ; double arg3 ; double arg4 ; Gosu::ZPos arg5 ; double arg6 ; double arg7 ; double arg8 = (double) 1 ; double arg9 = (double) 1 ; Gosu::Color arg10 = (Gosu::Color) Gosu::Color::WHITE ; Gosu::AlphaMode arg11 = (Gosu::AlphaMode) Gosu::amDefault ; void *argp1 = 0 ; int res1 = 0 ; std::wstring temp2 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val6 ; int ecode6 = 0 ; double val7 ; int ecode7 = 0 ; double val8 ; int ecode8 = 0 ; double val9 ; int ecode9 = 0 ; if ((argc < 6) || (argc > 10)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Font, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font const *","drawRel", 1, self )); } arg1 = reinterpret_cast< Gosu::Font * >(argp1); { VALUE localTemporary = rb_obj_as_string(argv[0]); temp2 = Gosu::utf8ToWstring(StringValueCStr(localTemporary)); arg2 = &temp2; } ecode3 = SWIG_AsVal_double(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","drawRel", 3, argv[1] )); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(argv[2], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","drawRel", 4, argv[2] )); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(argv[3], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "Gosu::ZPos","drawRel", 5, argv[3] )); } arg5 = static_cast< Gosu::ZPos >(val5); ecode6 = SWIG_AsVal_double(argv[4], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","drawRel", 6, argv[4] )); } arg6 = static_cast< double >(val6); ecode7 = SWIG_AsVal_double(argv[5], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","drawRel", 7, argv[5] )); } arg7 = static_cast< double >(val7); if (argc > 6) { ecode8 = SWIG_AsVal_double(argv[6], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "double","drawRel", 8, argv[6] )); } arg8 = static_cast< double >(val8); } if (argc > 7) { ecode9 = SWIG_AsVal_double(argv[7], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), Ruby_Format_TypeError( "", "double","drawRel", 9, argv[7] )); } arg9 = static_cast< double >(val9); } if (argc > 8) { { if (TYPE(argv[8]) == T_FIXNUM || TYPE(argv[8]) == T_BIGNUM) arg10 = Gosu::Color(NUM2ULONG(argv[8])); else { void* ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg10 = *reinterpret_cast(ptr); } } } if (argc > 9) { { const char* cstr = Gosu::cstrFromSymbol(argv[9]); if (!strcmp(cstr, "default")) arg11 = Gosu::amDefault; else if (!strcmp(cstr, "add")) arg11 = Gosu::amAdditive; else if (!strcmp(cstr, "additive")) arg11 = Gosu::amAdditive; else if (!strcmp(cstr, "multiply")) arg11 = Gosu::amMultiply; else SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode"); } } { try { ((Gosu::Font const *)arg1)->drawRel((std::wstring const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Font_draw_rot(int argc, VALUE *argv, VALUE self) { Gosu::Font *arg1 = (Gosu::Font *) 0 ; std::wstring *arg2 = 0 ; double arg3 ; double arg4 ; Gosu::ZPos arg5 ; double arg6 ; double arg7 = (double) 1 ; double arg8 = (double) 1 ; Gosu::Color arg9 = (Gosu::Color) Gosu::Color::WHITE ; Gosu::AlphaMode arg10 = (Gosu::AlphaMode) Gosu::amDefault ; void *argp1 = 0 ; int res1 = 0 ; std::wstring temp2 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val6 ; int ecode6 = 0 ; double val7 ; int ecode7 = 0 ; double val8 ; int ecode8 = 0 ; if ((argc < 5) || (argc > 9)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Font, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font const *","drawRot", 1, self )); } arg1 = reinterpret_cast< Gosu::Font * >(argp1); { VALUE localTemporary = rb_obj_as_string(argv[0]); temp2 = Gosu::utf8ToWstring(StringValueCStr(localTemporary)); arg2 = &temp2; } ecode3 = SWIG_AsVal_double(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","drawRot", 3, argv[1] )); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(argv[2], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","drawRot", 4, argv[2] )); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(argv[3], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "Gosu::ZPos","drawRot", 5, argv[3] )); } arg5 = static_cast< Gosu::ZPos >(val5); ecode6 = SWIG_AsVal_double(argv[4], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","drawRot", 6, argv[4] )); } arg6 = static_cast< double >(val6); if (argc > 5) { ecode7 = SWIG_AsVal_double(argv[5], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","drawRot", 7, argv[5] )); } arg7 = static_cast< double >(val7); } if (argc > 6) { ecode8 = SWIG_AsVal_double(argv[6], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "double","drawRot", 8, argv[6] )); } arg8 = static_cast< double >(val8); } if (argc > 7) { { if (TYPE(argv[7]) == T_FIXNUM || TYPE(argv[7]) == T_BIGNUM) arg9 = Gosu::Color(NUM2ULONG(argv[7])); else { void* ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg9 = *reinterpret_cast(ptr); } } } if (argc > 8) { { const char* cstr = Gosu::cstrFromSymbol(argv[8]); if (!strcmp(cstr, "default")) arg10 = Gosu::amDefault; else if (!strcmp(cstr, "add")) arg10 = Gosu::amAdditive; else if (!strcmp(cstr, "additive")) arg10 = Gosu::amAdditive; else if (!strcmp(cstr, "multiply")) arg10 = Gosu::amMultiply; else SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode"); } } { try { ((Gosu::Font const *)arg1)->drawRot((std::wstring const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_Font__SWIG_0(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = 0 ; std::wstring *arg2 = 0 ; unsigned int arg3 ; void *argp1 = 0 ; int res1 = 0 ; std::wstring temp2 ; unsigned int val3 ; int ecode3 = 0 ; const char *classname SWIGUNUSED = "Gosu::Font"; Gosu::Font *result = 0 ; if ((argc < 3) || (argc > 3)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Gosu__Window, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window &","Font", 1, argv[0] )); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Gosu::Window &","Font", 1, argv[0])); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); { VALUE localTemporary = rb_obj_as_string(argv[1]); temp2 = Gosu::utf8ToWstring(StringValueCStr(localTemporary)); arg2 = &temp2; } ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","Font", 3, argv[2] )); } arg3 = static_cast< unsigned int >(val3); { try { result = (Gosu::Font *)new_Gosu_Font__SWIG_0(*arg1,(std::wstring const &)*arg2,arg3); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return self; fail: return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_Font_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_Font_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Gosu__Font); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_Font__SWIG_1(int argc, VALUE *argv, VALUE self) { unsigned int arg1 ; VALUE arg2 = (VALUE) 0 ; unsigned int val1 ; int ecode1 = 0 ; const char *classname SWIGUNUSED = "Gosu::Font"; Gosu::Font *result = 0 ; if ((argc < 1) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned int","Font", 1, argv[0] )); } arg1 = static_cast< unsigned int >(val1); if (argc > 1) { arg2 = argv[1]; } { try { result = (Gosu::Font *)new_Gosu_Font__SWIG_1(arg1,arg2); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_new_Font(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[3]; int ii; argc = nargs; if (argc > 3) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if ((argc >= 1) && (argc <= 2)) { int _v; { int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { if (argc <= 1) { return _wrap_new_Font__SWIG_1(nargs, args, self); } _v = (argv[1] != 0); if (_v) { return _wrap_new_Font__SWIG_1(nargs, args, self); } } } if (argc == 3) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Gosu__Window, 0); _v = SWIG_CheckState(res); if (_v) { { _v = !!rb_respond_to(argv[1], rb_intern("to_str")); } if (_v) { { int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_Font__SWIG_0(nargs, args, self); } } } } fail: Ruby_Format_OverloadedError( argc, 3, "Font.new", " Font.new(Gosu::Window &window, std::wstring const &fontName, unsigned int height)\n" " Font.new(unsigned int height, VALUE options)\n"); return Qnil; } SWIGINTERN VALUE _wrap_Font_set_image(int argc, VALUE *argv, VALUE self) { Gosu::Font *arg1 = (Gosu::Font *) 0 ; wchar_t arg2 ; VALUE arg3 = (VALUE) 0 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Font, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Font *","set_image", 1, self )); } arg1 = reinterpret_cast< Gosu::Font * >(argp1); { VALUE rbString = rb_obj_as_string(argv[0]); char* utf8String = StringValueCStr(rbString); std::wstring ucsString = Gosu::utf8ToWstring(utf8String); if (ucsString.length() != 1) rb_raise(rb_eArgError, "A single-character string was expected, but `%s' given", utf8String); arg2 = ucsString[0]; } arg3 = argv[1]; { try { Gosu_Font_set_image(arg1,arg2,arg3); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN void free_Gosu_Font(void *self) { Gosu::Font *arg1 = (Gosu::Font *)self; SWIG_RubyRemoveTracking(arg1); delete arg1; } static swig_class SwigClassGLTexInfo; SWIGINTERN VALUE _wrap_GLTexInfo_tex_name_set(int argc, VALUE *argv, VALUE self) { Gosu::GLTexInfo *arg1 = (Gosu::GLTexInfo *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__GLTexInfo, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::GLTexInfo *","texName", 1, self )); } arg1 = reinterpret_cast< Gosu::GLTexInfo * >(argp1); ecode2 = SWIG_AsVal_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","texName", 2, argv[0] )); } arg2 = static_cast< int >(val2); if (arg1) (arg1)->texName = arg2; return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_GLTexInfo_tex_name_get(int argc, VALUE *argv, VALUE self) { Gosu::GLTexInfo *arg1 = (Gosu::GLTexInfo *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__GLTexInfo, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::GLTexInfo *","texName", 1, self )); } arg1 = reinterpret_cast< Gosu::GLTexInfo * >(argp1); result = (int) ((arg1)->texName); vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_GLTexInfo_left_set(int argc, VALUE *argv, VALUE self) { Gosu::GLTexInfo *arg1 = (Gosu::GLTexInfo *) 0 ; float arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__GLTexInfo, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::GLTexInfo *","left", 1, self )); } arg1 = reinterpret_cast< Gosu::GLTexInfo * >(argp1); ecode2 = SWIG_AsVal_float(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "float","left", 2, argv[0] )); } arg2 = static_cast< float >(val2); if (arg1) (arg1)->left = arg2; return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_GLTexInfo_left_get(int argc, VALUE *argv, VALUE self) { Gosu::GLTexInfo *arg1 = (Gosu::GLTexInfo *) 0 ; void *argp1 = 0 ; int res1 = 0 ; float result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__GLTexInfo, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::GLTexInfo *","left", 1, self )); } arg1 = reinterpret_cast< Gosu::GLTexInfo * >(argp1); result = (float) ((arg1)->left); vresult = SWIG_From_float(static_cast< float >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_GLTexInfo_right_set(int argc, VALUE *argv, VALUE self) { Gosu::GLTexInfo *arg1 = (Gosu::GLTexInfo *) 0 ; float arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__GLTexInfo, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::GLTexInfo *","right", 1, self )); } arg1 = reinterpret_cast< Gosu::GLTexInfo * >(argp1); ecode2 = SWIG_AsVal_float(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "float","right", 2, argv[0] )); } arg2 = static_cast< float >(val2); if (arg1) (arg1)->right = arg2; return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_GLTexInfo_right_get(int argc, VALUE *argv, VALUE self) { Gosu::GLTexInfo *arg1 = (Gosu::GLTexInfo *) 0 ; void *argp1 = 0 ; int res1 = 0 ; float result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__GLTexInfo, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::GLTexInfo *","right", 1, self )); } arg1 = reinterpret_cast< Gosu::GLTexInfo * >(argp1); result = (float) ((arg1)->right); vresult = SWIG_From_float(static_cast< float >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_GLTexInfo_top_set(int argc, VALUE *argv, VALUE self) { Gosu::GLTexInfo *arg1 = (Gosu::GLTexInfo *) 0 ; float arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__GLTexInfo, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::GLTexInfo *","top", 1, self )); } arg1 = reinterpret_cast< Gosu::GLTexInfo * >(argp1); ecode2 = SWIG_AsVal_float(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "float","top", 2, argv[0] )); } arg2 = static_cast< float >(val2); if (arg1) (arg1)->top = arg2; return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_GLTexInfo_top_get(int argc, VALUE *argv, VALUE self) { Gosu::GLTexInfo *arg1 = (Gosu::GLTexInfo *) 0 ; void *argp1 = 0 ; int res1 = 0 ; float result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__GLTexInfo, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::GLTexInfo *","top", 1, self )); } arg1 = reinterpret_cast< Gosu::GLTexInfo * >(argp1); result = (float) ((arg1)->top); vresult = SWIG_From_float(static_cast< float >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_GLTexInfo_bottom_set(int argc, VALUE *argv, VALUE self) { Gosu::GLTexInfo *arg1 = (Gosu::GLTexInfo *) 0 ; float arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__GLTexInfo, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::GLTexInfo *","bottom", 1, self )); } arg1 = reinterpret_cast< Gosu::GLTexInfo * >(argp1); ecode2 = SWIG_AsVal_float(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "float","bottom", 2, argv[0] )); } arg2 = static_cast< float >(val2); if (arg1) (arg1)->bottom = arg2; return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_GLTexInfo_bottom_get(int argc, VALUE *argv, VALUE self) { Gosu::GLTexInfo *arg1 = (Gosu::GLTexInfo *) 0 ; void *argp1 = 0 ; int res1 = 0 ; float result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__GLTexInfo, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::GLTexInfo *","bottom", 1, self )); } arg1 = reinterpret_cast< Gosu::GLTexInfo * >(argp1); result = (float) ((arg1)->bottom); vresult = SWIG_From_float(static_cast< float >(result)); return vresult; fail: return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_GLTexInfo_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_GLTexInfo_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Gosu__GLTexInfo); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_GLTexInfo(int argc, VALUE *argv, VALUE self) { const char *classname SWIGUNUSED = "Gosu::GLTexInfo"; Gosu::GLTexInfo *result = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } { try { result = (Gosu::GLTexInfo *)new Gosu::GLTexInfo(); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return self; fail: return Qnil; } SWIGINTERN void free_Gosu_GLTexInfo(void *self) { Gosu::GLTexInfo *arg1 = (Gosu::GLTexInfo *)self; SWIG_RubyRemoveTracking(arg1); delete arg1; } static swig_class SwigClassImage; SWIGINTERN VALUE _wrap_Image_width(int argc, VALUE *argv, VALUE self) { Gosu::Image *arg1 = (Gosu::Image *) 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Image const *","width", 1, self )); } arg1 = reinterpret_cast< Gosu::Image * >(argp1); { try { result = (unsigned int)((Gosu::Image const *)arg1)->width(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Image_height(int argc, VALUE *argv, VALUE self) { Gosu::Image *arg1 = (Gosu::Image *) 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Image const *","height", 1, self )); } arg1 = reinterpret_cast< Gosu::Image * >(argp1); { try { result = (unsigned int)((Gosu::Image const *)arg1)->height(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Image_draw(int argc, VALUE *argv, VALUE self) { Gosu::Image *arg1 = (Gosu::Image *) 0 ; double arg2 ; double arg3 ; Gosu::ZPos arg4 ; double arg5 = (double) 1 ; double arg6 = (double) 1 ; Gosu::Color arg7 = (Gosu::Color) Gosu::Color::WHITE ; Gosu::AlphaMode arg8 = (Gosu::AlphaMode) Gosu::amDefault ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val6 ; int ecode6 = 0 ; if ((argc < 3) || (argc > 7)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Image const *","draw", 1, self )); } arg1 = reinterpret_cast< Gosu::Image * >(argp1); ecode2 = SWIG_AsVal_double(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","draw", 2, argv[0] )); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","draw", 3, argv[1] )); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(argv[2], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Gosu::ZPos","draw", 4, argv[2] )); } arg4 = static_cast< Gosu::ZPos >(val4); if (argc > 3) { ecode5 = SWIG_AsVal_double(argv[3], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","draw", 5, argv[3] )); } arg5 = static_cast< double >(val5); } if (argc > 4) { ecode6 = SWIG_AsVal_double(argv[4], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","draw", 6, argv[4] )); } arg6 = static_cast< double >(val6); } if (argc > 5) { { if (TYPE(argv[5]) == T_FIXNUM || TYPE(argv[5]) == T_BIGNUM) arg7 = Gosu::Color(NUM2ULONG(argv[5])); else { void* ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg7 = *reinterpret_cast(ptr); } } } if (argc > 6) { { const char* cstr = Gosu::cstrFromSymbol(argv[6]); if (!strcmp(cstr, "default")) arg8 = Gosu::amDefault; else if (!strcmp(cstr, "add")) arg8 = Gosu::amAdditive; else if (!strcmp(cstr, "additive")) arg8 = Gosu::amAdditive; else if (!strcmp(cstr, "multiply")) arg8 = Gosu::amMultiply; else SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode"); } } { try { ((Gosu::Image const *)arg1)->draw(arg2,arg3,arg4,arg5,arg6,arg7,arg8); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Image_draw_mod(int argc, VALUE *argv, VALUE self) { Gosu::Image *arg1 = (Gosu::Image *) 0 ; double arg2 ; double arg3 ; Gosu::ZPos arg4 ; double arg5 ; double arg6 ; Gosu::Color arg7 ; Gosu::Color arg8 ; Gosu::Color arg9 ; Gosu::Color arg10 ; Gosu::AlphaMode arg11 = (Gosu::AlphaMode) Gosu::amDefault ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val6 ; int ecode6 = 0 ; if ((argc < 9) || (argc > 10)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 9)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Image const *","drawMod", 1, self )); } arg1 = reinterpret_cast< Gosu::Image * >(argp1); ecode2 = SWIG_AsVal_double(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","drawMod", 2, argv[0] )); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","drawMod", 3, argv[1] )); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(argv[2], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Gosu::ZPos","drawMod", 4, argv[2] )); } arg4 = static_cast< Gosu::ZPos >(val4); ecode5 = SWIG_AsVal_double(argv[3], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","drawMod", 5, argv[3] )); } arg5 = static_cast< double >(val5); ecode6 = SWIG_AsVal_double(argv[4], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","drawMod", 6, argv[4] )); } arg6 = static_cast< double >(val6); { if (TYPE(argv[5]) == T_FIXNUM || TYPE(argv[5]) == T_BIGNUM) arg7 = Gosu::Color(NUM2ULONG(argv[5])); else { void* ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg7 = *reinterpret_cast(ptr); } } { if (TYPE(argv[6]) == T_FIXNUM || TYPE(argv[6]) == T_BIGNUM) arg8 = Gosu::Color(NUM2ULONG(argv[6])); else { void* ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg8 = *reinterpret_cast(ptr); } } { if (TYPE(argv[7]) == T_FIXNUM || TYPE(argv[7]) == T_BIGNUM) arg9 = Gosu::Color(NUM2ULONG(argv[7])); else { void* ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg9 = *reinterpret_cast(ptr); } } { if (TYPE(argv[8]) == T_FIXNUM || TYPE(argv[8]) == T_BIGNUM) arg10 = Gosu::Color(NUM2ULONG(argv[8])); else { void* ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg10 = *reinterpret_cast(ptr); } } if (argc > 9) { { const char* cstr = Gosu::cstrFromSymbol(argv[9]); if (!strcmp(cstr, "default")) arg11 = Gosu::amDefault; else if (!strcmp(cstr, "add")) arg11 = Gosu::amAdditive; else if (!strcmp(cstr, "additive")) arg11 = Gosu::amAdditive; else if (!strcmp(cstr, "multiply")) arg11 = Gosu::amMultiply; else SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode"); } } { try { ((Gosu::Image const *)arg1)->drawMod(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Image_draw_rot(int argc, VALUE *argv, VALUE self) { Gosu::Image *arg1 = (Gosu::Image *) 0 ; double arg2 ; double arg3 ; Gosu::ZPos arg4 ; double arg5 ; double arg6 = (double) 0.5 ; double arg7 = (double) 0.5 ; double arg8 = (double) 1 ; double arg9 = (double) 1 ; Gosu::Color arg10 = (Gosu::Color) Gosu::Color::WHITE ; Gosu::AlphaMode arg11 = (Gosu::AlphaMode) Gosu::amDefault ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val6 ; int ecode6 = 0 ; double val7 ; int ecode7 = 0 ; double val8 ; int ecode8 = 0 ; double val9 ; int ecode9 = 0 ; if ((argc < 4) || (argc > 10)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Image const *","drawRot", 1, self )); } arg1 = reinterpret_cast< Gosu::Image * >(argp1); ecode2 = SWIG_AsVal_double(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","drawRot", 2, argv[0] )); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","drawRot", 3, argv[1] )); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(argv[2], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "Gosu::ZPos","drawRot", 4, argv[2] )); } arg4 = static_cast< Gosu::ZPos >(val4); ecode5 = SWIG_AsVal_double(argv[3], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","drawRot", 5, argv[3] )); } arg5 = static_cast< double >(val5); if (argc > 4) { ecode6 = SWIG_AsVal_double(argv[4], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","drawRot", 6, argv[4] )); } arg6 = static_cast< double >(val6); } if (argc > 5) { ecode7 = SWIG_AsVal_double(argv[5], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","drawRot", 7, argv[5] )); } arg7 = static_cast< double >(val7); } if (argc > 6) { ecode8 = SWIG_AsVal_double(argv[6], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "double","drawRot", 8, argv[6] )); } arg8 = static_cast< double >(val8); } if (argc > 7) { ecode9 = SWIG_AsVal_double(argv[7], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), Ruby_Format_TypeError( "", "double","drawRot", 9, argv[7] )); } arg9 = static_cast< double >(val9); } if (argc > 8) { { if (TYPE(argv[8]) == T_FIXNUM || TYPE(argv[8]) == T_BIGNUM) arg10 = Gosu::Color(NUM2ULONG(argv[8])); else { void* ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg10 = *reinterpret_cast(ptr); } } } if (argc > 9) { { const char* cstr = Gosu::cstrFromSymbol(argv[9]); if (!strcmp(cstr, "default")) arg11 = Gosu::amDefault; else if (!strcmp(cstr, "add")) arg11 = Gosu::amAdditive; else if (!strcmp(cstr, "additive")) arg11 = Gosu::amAdditive; else if (!strcmp(cstr, "multiply")) arg11 = Gosu::amMultiply; else SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode"); } } { try { ((Gosu::Image const *)arg1)->drawRot(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_Image_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_Image_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Gosu__Image); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_Image(int argc, VALUE *argv, VALUE self) { VALUE arg1 = (VALUE) 0 ; VALUE arg2 = (VALUE) 0 ; const char *classname SWIGUNUSED = "Gosu::Image"; Gosu::Image *result = 0 ; if ((argc < 1) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } arg1 = argv[0]; if (argc > 1) { arg2 = argv[1]; } { try { result = (Gosu::Image *)new_Gosu_Image(arg1,arg2); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_Image_draw_as_quad(int argc, VALUE *argv, VALUE self) { Gosu::Image *arg1 = (Gosu::Image *) 0 ; double arg2 ; double arg3 ; Gosu::Color arg4 ; double arg5 ; double arg6 ; Gosu::Color arg7 ; double arg8 ; double arg9 ; Gosu::Color arg10 ; double arg11 ; double arg12 ; Gosu::Color arg13 ; Gosu::ZPos arg14 ; Gosu::AlphaMode arg15 = (Gosu::AlphaMode) Gosu::amDefault ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val5 ; int ecode5 = 0 ; double val6 ; int ecode6 = 0 ; double val8 ; int ecode8 = 0 ; double val9 ; int ecode9 = 0 ; double val11 ; int ecode11 = 0 ; double val12 ; int ecode12 = 0 ; double val14 ; int ecode14 = 0 ; if ((argc < 13) || (argc > 14)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 13)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Image *","drawAsQuad", 1, self )); } arg1 = reinterpret_cast< Gosu::Image * >(argp1); ecode2 = SWIG_AsVal_double(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","drawAsQuad", 2, argv[0] )); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","drawAsQuad", 3, argv[1] )); } arg3 = static_cast< double >(val3); { if (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM) arg4 = Gosu::Color(NUM2ULONG(argv[2])); else { void* ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg4 = *reinterpret_cast(ptr); } } ecode5 = SWIG_AsVal_double(argv[3], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","drawAsQuad", 5, argv[3] )); } arg5 = static_cast< double >(val5); ecode6 = SWIG_AsVal_double(argv[4], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","drawAsQuad", 6, argv[4] )); } arg6 = static_cast< double >(val6); { if (TYPE(argv[5]) == T_FIXNUM || TYPE(argv[5]) == T_BIGNUM) arg7 = Gosu::Color(NUM2ULONG(argv[5])); else { void* ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg7 = *reinterpret_cast(ptr); } } ecode8 = SWIG_AsVal_double(argv[6], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "double","drawAsQuad", 8, argv[6] )); } arg8 = static_cast< double >(val8); ecode9 = SWIG_AsVal_double(argv[7], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), Ruby_Format_TypeError( "", "double","drawAsQuad", 9, argv[7] )); } arg9 = static_cast< double >(val9); { if (TYPE(argv[8]) == T_FIXNUM || TYPE(argv[8]) == T_BIGNUM) arg10 = Gosu::Color(NUM2ULONG(argv[8])); else { void* ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg10 = *reinterpret_cast(ptr); } } ecode11 = SWIG_AsVal_double(argv[9], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), Ruby_Format_TypeError( "", "double","drawAsQuad", 11, argv[9] )); } arg11 = static_cast< double >(val11); ecode12 = SWIG_AsVal_double(argv[10], &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), Ruby_Format_TypeError( "", "double","drawAsQuad", 12, argv[10] )); } arg12 = static_cast< double >(val12); { if (TYPE(argv[11]) == T_FIXNUM || TYPE(argv[11]) == T_BIGNUM) arg13 = Gosu::Color(NUM2ULONG(argv[11])); else { void* ptr; int res = SWIG_ConvertPtr(argv[11], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg13 = *reinterpret_cast(ptr); } } ecode14 = SWIG_AsVal_double(argv[12], &val14); if (!SWIG_IsOK(ecode14)) { SWIG_exception_fail(SWIG_ArgError(ecode14), Ruby_Format_TypeError( "", "Gosu::ZPos","drawAsQuad", 14, argv[12] )); } arg14 = static_cast< Gosu::ZPos >(val14); if (argc > 13) { { const char* cstr = Gosu::cstrFromSymbol(argv[13]); if (!strcmp(cstr, "default")) arg15 = Gosu::amDefault; else if (!strcmp(cstr, "add")) arg15 = Gosu::amAdditive; else if (!strcmp(cstr, "additive")) arg15 = Gosu::amAdditive; else if (!strcmp(cstr, "multiply")) arg15 = Gosu::amMultiply; else SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode"); } } { try { Gosu_Image_drawAsQuad(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Image_gl_tex_info(int argc, VALUE *argv, VALUE self) { Gosu::Image *arg1 = (Gosu::Image *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Gosu::GLTexInfo *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Image const *","glTexInfo", 1, self )); } arg1 = reinterpret_cast< Gosu::Image * >(argp1); { try { result = (Gosu::GLTexInfo *)Gosu_Image_glTexInfo((Gosu::Image const *)arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gosu__GLTexInfo, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Image_subimage(int argc, VALUE *argv, VALUE self) { Gosu::Image *arg1 = (Gosu::Image *) 0 ; int arg2 ; int arg3 ; int arg4 ; int arg5 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; int val5 ; int ecode5 = 0 ; Gosu::Image *result = 0 ; VALUE vresult = Qnil; if ((argc < 4) || (argc > 4)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Image *","subimage", 1, self )); } arg1 = reinterpret_cast< Gosu::Image * >(argp1); ecode2 = SWIG_AsVal_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","subimage", 2, argv[0] )); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","subimage", 3, argv[1] )); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(argv[2], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","subimage", 4, argv[2] )); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_int(argv[3], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "int","subimage", 5, argv[3] )); } arg5 = static_cast< int >(val5); { try { result = (Gosu::Image *)Gosu_Image_subimage(arg1,arg2,arg3,arg4,arg5); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gosu__Image, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Image_from_text(int argc, VALUE *argv, VALUE self) { std::wstring *arg1 = 0 ; unsigned int arg2 ; VALUE arg3 = (VALUE) 0 ; std::wstring temp1 ; unsigned int val2 ; int ecode2 = 0 ; Gosu::Image *result = 0 ; VALUE vresult = Qnil; if ((argc < 2) || (argc > 3)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } { VALUE localTemporary = rb_obj_as_string(argv[0]); temp1 = Gosu::utf8ToWstring(StringValueCStr(localTemporary)); arg1 = &temp1; } ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","Gosu_Image_fromText", 2, argv[1] )); } arg2 = static_cast< unsigned int >(val2); if (argc > 2) { arg3 = argv[2]; } { try { result = (Gosu::Image *)Gosu_Image_fromText((std::wstring const &)*arg1,arg2,arg3); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gosu__Image, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Image_load_tiles__SWIG_0(int argc, VALUE *argv, VALUE self) { VALUE arg1 = (VALUE) 0 ; int arg2 ; int arg3 ; VALUE arg4 = (VALUE) 0 ; int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; SwigValueWrapper< std::vector< Gosu::Image > > result; VALUE vresult = Qnil; if ((argc < 3) || (argc > 4)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; } arg1 = argv[0]; ecode2 = SWIG_AsVal_int(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Gosu_Image_loadTiles__SWIG_0", 2, argv[1] )); } arg2 = static_cast< int >(val2); ecode3 = SWIG_AsVal_int(argv[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","Gosu_Image_loadTiles__SWIG_0", 3, argv[2] )); } arg3 = static_cast< int >(val3); if (argc > 3) { arg4 = argv[3]; } { try { result = Gosu_Image_loadTiles__SWIG_0(arg1,arg2,arg3,arg4); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } { vresult = rb_ary_new2((&result)->size()); for (unsigned i = 0; i < (&result)->size(); i++) { VALUE image = SWIG_NewPointerObj(SWIG_as_voidptr(new Gosu::Image((*&result)[i])), SWIGTYPE_p_Gosu__Image, SWIG_POINTER_OWN); rb_ary_store(vresult, i, image); } } return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Image_load_tiles__SWIG_1(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = 0 ; VALUE arg2 = (VALUE) 0 ; int arg3 ; int arg4 ; bool arg5 ; void *argp1 = 0 ; int res1 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; bool val5 ; int ecode5 = 0 ; SwigValueWrapper< std::vector< Gosu::Image > > result; VALUE vresult = Qnil; if ((argc < 5) || (argc > 5)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_Gosu__Window, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window &","Gosu_Image_loadTiles__SWIG_1", 1, argv[0] )); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "Gosu::Window &","Gosu_Image_loadTiles__SWIG_1", 1, argv[0])); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); arg2 = argv[1]; ecode3 = SWIG_AsVal_int(argv[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","Gosu_Image_loadTiles__SWIG_1", 3, argv[2] )); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(argv[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","Gosu_Image_loadTiles__SWIG_1", 4, argv[3] )); } arg4 = static_cast< int >(val4); ecode5 = SWIG_AsVal_bool(argv[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "bool","Gosu_Image_loadTiles__SWIG_1", 5, argv[4] )); } arg5 = static_cast< bool >(val5); { try { result = Gosu_Image_loadTiles__SWIG_1(*arg1,arg2,arg3,arg4,arg5); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } { vresult = rb_ary_new2((&result)->size()); for (unsigned i = 0; i < (&result)->size(); i++) { VALUE image = SWIG_NewPointerObj(SWIG_as_voidptr(new Gosu::Image((*&result)[i])), SWIGTYPE_p_Gosu__Image, SWIG_POINTER_OWN); rb_ary_store(vresult, i, image); } } return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Image_load_tiles(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[5]; int ii; argc = nargs; if (argc > 5) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if ((argc >= 3) && (argc <= 4)) { int _v; _v = (argv[0] != 0); if (_v) { { int res = SWIG_AsVal_int(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { if (argc <= 3) { return _wrap_Image_load_tiles__SWIG_0(nargs, args, self); } _v = (argv[3] != 0); if (_v) { return _wrap_Image_load_tiles__SWIG_0(nargs, args, self); } } } } } if (argc == 5) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Gosu__Window, 0); _v = SWIG_CheckState(res); if (_v) { _v = (argv[1] != 0); if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_int(argv[3], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_bool(argv[4], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_Image_load_tiles__SWIG_1(nargs, args, self); } } } } } } fail: Ruby_Format_OverloadedError( argc, 5, "load_tiles", " std::vector< Gosu::Image > load_tiles(VALUE source, int tileWidth, int tileHeight, VALUE options)\n" " std::vector< Gosu::Image > load_tiles(Gosu::Window &window, VALUE source, int tileWidth, int tileHeight, bool tileable)\n"); return Qnil; } SWIGINTERN VALUE _wrap_Image_to_blob(int argc, VALUE *argv, VALUE self) { Gosu::Image *arg1 = (Gosu::Image *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::string result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Image const *","toBlob", 1, self )); } arg1 = reinterpret_cast< Gosu::Image * >(argp1); { try { result = Gosu_Image_toBlob((Gosu::Image const *)arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_std_string(static_cast< std::string >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Image_columns(int argc, VALUE *argv, VALUE self) { Gosu::Image *arg1 = (Gosu::Image *) 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Image const *","columns", 1, self )); } arg1 = reinterpret_cast< Gosu::Image * >(argp1); { try { result = (unsigned int)Gosu_Image_columns((Gosu::Image const *)arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Image_rows(int argc, VALUE *argv, VALUE self) { Gosu::Image *arg1 = (Gosu::Image *) 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Image const *","rows", 1, self )); } arg1 = reinterpret_cast< Gosu::Image * >(argp1); { try { result = (unsigned int)Gosu_Image_rows((Gosu::Image const *)arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Image_save(int argc, VALUE *argv, VALUE self) { Gosu::Image *arg1 = (Gosu::Image *) 0 ; std::wstring *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; std::wstring temp2 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Image const *","save", 1, self )); } arg1 = reinterpret_cast< Gosu::Image * >(argp1); { VALUE localTemporary = rb_obj_as_string(argv[0]); temp2 = Gosu::utf8ToWstring(StringValueCStr(localTemporary)); arg2 = &temp2; } { try { Gosu_Image_save((Gosu::Image const *)arg1,(std::wstring const &)*arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } /* Document-method: Gosu::Image.insert call-seq: insert(source, x, y) Insert one or more new elements in the Image. */ SWIGINTERN VALUE _wrap_Image_insert(int argc, VALUE *argv, VALUE self) { Gosu::Image *arg1 = (Gosu::Image *) 0 ; VALUE arg2 = (VALUE) 0 ; int arg3 ; int arg4 ; void *argp1 = 0 ; int res1 = 0 ; int val3 ; int ecode3 = 0 ; int val4 ; int ecode4 = 0 ; if ((argc < 3) || (argc > 3)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Image *","insert", 1, self )); } arg1 = reinterpret_cast< Gosu::Image * >(argp1); arg2 = argv[0]; ecode3 = SWIG_AsVal_int(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","insert", 3, argv[1] )); } arg3 = static_cast< int >(val3); ecode4 = SWIG_AsVal_int(argv[2], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","insert", 4, argv[2] )); } arg4 = static_cast< int >(val4); { try { Gosu_Image_insert(arg1,arg2,arg3,arg4); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN void free_Gosu_Image(void *self) { Gosu::Image *arg1 = (Gosu::Image *)self; SWIG_RubyRemoveTracking(arg1); delete arg1; } SWIGINTERN VALUE _wrap_fps(int argc, VALUE *argv, VALUE self) { int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } { try { result = (int)Gosu::fps(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } static swig_class SwigClassSampleInstance; #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_SampleInstance_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_SampleInstance_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Gosu__SampleInstance); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_SampleInstance(int argc, VALUE *argv, VALUE self) { int arg1 ; int arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; const char *classname SWIGUNUSED = "Gosu::SampleInstance"; Gosu::SampleInstance *result = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_int(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","SampleInstance", 1, argv[0] )); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_int(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","SampleInstance", 2, argv[1] )); } arg2 = static_cast< int >(val2); { try { result = (Gosu::SampleInstance *)new Gosu::SampleInstance(arg1,arg2); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_SampleInstance_playingq___(int argc, VALUE *argv, VALUE self) { Gosu::SampleInstance *arg1 = (Gosu::SampleInstance *) 0 ; void *argp1 = 0 ; int res1 = 0 ; bool result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__SampleInstance, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::SampleInstance const *","playing", 1, self )); } arg1 = reinterpret_cast< Gosu::SampleInstance * >(argp1); { try { result = (bool)((Gosu::SampleInstance const *)arg1)->playing(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_SampleInstance_pausedq___(int argc, VALUE *argv, VALUE self) { Gosu::SampleInstance *arg1 = (Gosu::SampleInstance *) 0 ; void *argp1 = 0 ; int res1 = 0 ; bool result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__SampleInstance, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::SampleInstance const *","paused", 1, self )); } arg1 = reinterpret_cast< Gosu::SampleInstance * >(argp1); { try { result = (bool)((Gosu::SampleInstance const *)arg1)->paused(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_SampleInstance_pause(int argc, VALUE *argv, VALUE self) { Gosu::SampleInstance *arg1 = (Gosu::SampleInstance *) 0 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__SampleInstance, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::SampleInstance *","pause", 1, self )); } arg1 = reinterpret_cast< Gosu::SampleInstance * >(argp1); { try { (arg1)->pause(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_SampleInstance_resume(int argc, VALUE *argv, VALUE self) { Gosu::SampleInstance *arg1 = (Gosu::SampleInstance *) 0 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__SampleInstance, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::SampleInstance *","resume", 1, self )); } arg1 = reinterpret_cast< Gosu::SampleInstance * >(argp1); { try { (arg1)->resume(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_SampleInstance_stop(int argc, VALUE *argv, VALUE self) { Gosu::SampleInstance *arg1 = (Gosu::SampleInstance *) 0 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__SampleInstance, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::SampleInstance *","stop", 1, self )); } arg1 = reinterpret_cast< Gosu::SampleInstance * >(argp1); { try { (arg1)->stop(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_SampleInstance_volumee___(int argc, VALUE *argv, VALUE self) { Gosu::SampleInstance *arg1 = (Gosu::SampleInstance *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__SampleInstance, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::SampleInstance *","changeVolume", 1, self )); } arg1 = reinterpret_cast< Gosu::SampleInstance * >(argp1); ecode2 = SWIG_AsVal_double(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","changeVolume", 2, argv[0] )); } arg2 = static_cast< double >(val2); { try { (arg1)->changeVolume(arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_SampleInstance_pane___(int argc, VALUE *argv, VALUE self) { Gosu::SampleInstance *arg1 = (Gosu::SampleInstance *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__SampleInstance, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::SampleInstance *","changePan", 1, self )); } arg1 = reinterpret_cast< Gosu::SampleInstance * >(argp1); ecode2 = SWIG_AsVal_double(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","changePan", 2, argv[0] )); } arg2 = static_cast< double >(val2); { try { (arg1)->changePan(arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_SampleInstance_speede___(int argc, VALUE *argv, VALUE self) { Gosu::SampleInstance *arg1 = (Gosu::SampleInstance *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__SampleInstance, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::SampleInstance *","changeSpeed", 1, self )); } arg1 = reinterpret_cast< Gosu::SampleInstance * >(argp1); ecode2 = SWIG_AsVal_double(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","changeSpeed", 2, argv[0] )); } arg2 = static_cast< double >(val2); { try { (arg1)->changeSpeed(arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN void free_Gosu_SampleInstance(void *self) { Gosu::SampleInstance *arg1 = (Gosu::SampleInstance *)self; SWIG_RubyRemoveTracking(arg1); delete arg1; } static swig_class SwigClassSample; #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_Sample_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_Sample_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Gosu__Sample); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_Sample(int argc, VALUE *argv, VALUE self) { std::wstring *arg1 = 0 ; std::wstring temp1 ; const char *classname SWIGUNUSED = "Gosu::Sample"; Gosu::Sample *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } { VALUE localTemporary = rb_obj_as_string(argv[0]); temp1 = Gosu::utf8ToWstring(StringValueCStr(localTemporary)); arg1 = &temp1; } { try { result = (Gosu::Sample *)new Gosu::Sample((std::wstring const &)*arg1); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return self; fail: return Qnil; } SWIGINTERN VALUE _wrap_Sample_play(int argc, VALUE *argv, VALUE self) { Gosu::Sample *arg1 = (Gosu::Sample *) 0 ; double arg2 = (double) 1 ; double arg3 = (double) 1 ; bool arg4 = (bool) false ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; bool val4 ; int ecode4 = 0 ; SwigValueWrapper< Gosu::SampleInstance > result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 3)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Sample, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Sample const *","play", 1, self )); } arg1 = reinterpret_cast< Gosu::Sample * >(argp1); if (argc > 0) { ecode2 = SWIG_AsVal_double(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","play", 2, argv[0] )); } arg2 = static_cast< double >(val2); } if (argc > 1) { ecode3 = SWIG_AsVal_double(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","play", 3, argv[1] )); } arg3 = static_cast< double >(val3); } if (argc > 2) { ecode4 = SWIG_AsVal_bool(argv[2], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "bool","play", 4, argv[2] )); } arg4 = static_cast< bool >(val4); } { try { result = ((Gosu::Sample const *)arg1)->play(arg2,arg3,arg4); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_NewPointerObj((new Gosu::SampleInstance(static_cast< const Gosu::SampleInstance& >(result))), SWIGTYPE_p_Gosu__SampleInstance, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Sample_play_pan(int argc, VALUE *argv, VALUE self) { Gosu::Sample *arg1 = (Gosu::Sample *) 0 ; double arg2 ; double arg3 = (double) 1 ; double arg4 = (double) 1 ; bool arg5 = (bool) false ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; bool val5 ; int ecode5 = 0 ; SwigValueWrapper< Gosu::SampleInstance > result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 4)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Sample, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Sample const *","playPan", 1, self )); } arg1 = reinterpret_cast< Gosu::Sample * >(argp1); ecode2 = SWIG_AsVal_double(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","playPan", 2, argv[0] )); } arg2 = static_cast< double >(val2); if (argc > 1) { ecode3 = SWIG_AsVal_double(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","playPan", 3, argv[1] )); } arg3 = static_cast< double >(val3); } if (argc > 2) { ecode4 = SWIG_AsVal_double(argv[2], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","playPan", 4, argv[2] )); } arg4 = static_cast< double >(val4); } if (argc > 3) { ecode5 = SWIG_AsVal_bool(argv[3], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "bool","playPan", 5, argv[3] )); } arg5 = static_cast< bool >(val5); } { try { result = ((Gosu::Sample const *)arg1)->playPan(arg2,arg3,arg4,arg5); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_NewPointerObj((new Gosu::SampleInstance(static_cast< const Gosu::SampleInstance& >(result))), SWIGTYPE_p_Gosu__SampleInstance, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN void free_Gosu_Sample(void *self) { Gosu::Sample *arg1 = (Gosu::Sample *)self; SWIG_RubyRemoveTracking(arg1); delete arg1; } static swig_class SwigClassSong; #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_Song_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_Song_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Gosu__Song); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_Song(int argc, VALUE *argv, VALUE self) { std::wstring *arg1 = 0 ; std::wstring temp1 ; const char *classname SWIGUNUSED = "Gosu::Song"; Gosu::Song *result = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } { VALUE localTemporary = rb_obj_as_string(argv[0]); temp1 = Gosu::utf8ToWstring(StringValueCStr(localTemporary)); arg1 = &temp1; } { try { result = (Gosu::Song *)new Gosu::Song((std::wstring const &)*arg1); DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return self; fail: return Qnil; } SWIGINTERN void free_Gosu_Song(void *self) { Gosu::Song *arg1 = (Gosu::Song *)self; SWIG_RubyRemoveTracking(arg1); delete arg1; } SWIGINTERN VALUE _wrap_Song_current_song(int argc, VALUE *argv, VALUE self) { Gosu::Song *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } { try { result = (Gosu::Song *)Gosu::Song::currentSong(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gosu__Song, 0 | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Song_play(int argc, VALUE *argv, VALUE self) { Gosu::Song *arg1 = (Gosu::Song *) 0 ; bool arg2 = (bool) false ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; if ((argc < 0) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Song, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Song *","play", 1, self )); } arg1 = reinterpret_cast< Gosu::Song * >(argp1); if (argc > 0) { ecode2 = SWIG_AsVal_bool(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","play", 2, argv[0] )); } arg2 = static_cast< bool >(val2); } { try { (arg1)->play(arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Song_pause(int argc, VALUE *argv, VALUE self) { Gosu::Song *arg1 = (Gosu::Song *) 0 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Song, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Song *","pause", 1, self )); } arg1 = reinterpret_cast< Gosu::Song * >(argp1); { try { (arg1)->pause(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Song_pausedq___(int argc, VALUE *argv, VALUE self) { Gosu::Song *arg1 = (Gosu::Song *) 0 ; void *argp1 = 0 ; int res1 = 0 ; bool result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Song, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Song const *","paused", 1, self )); } arg1 = reinterpret_cast< Gosu::Song * >(argp1); { try { result = (bool)((Gosu::Song const *)arg1)->paused(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Song_stop(int argc, VALUE *argv, VALUE self) { Gosu::Song *arg1 = (Gosu::Song *) 0 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Song, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Song *","stop", 1, self )); } arg1 = reinterpret_cast< Gosu::Song * >(argp1); { try { (arg1)->stop(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Song_playingq___(int argc, VALUE *argv, VALUE self) { Gosu::Song *arg1 = (Gosu::Song *) 0 ; void *argp1 = 0 ; int res1 = 0 ; bool result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Song, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Song const *","playing", 1, self )); } arg1 = reinterpret_cast< Gosu::Song * >(argp1); { try { result = (bool)((Gosu::Song const *)arg1)->playing(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Song_volume(int argc, VALUE *argv, VALUE self) { Gosu::Song *arg1 = (Gosu::Song *) 0 ; void *argp1 = 0 ; int res1 = 0 ; double result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Song, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Song const *","volume", 1, self )); } arg1 = reinterpret_cast< Gosu::Song * >(argp1); { try { result = (double)((Gosu::Song const *)arg1)->volume(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Song_volumee___(int argc, VALUE *argv, VALUE self) { Gosu::Song *arg1 = (Gosu::Song *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Song, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Song *","changeVolume", 1, self )); } arg1 = reinterpret_cast< Gosu::Song * >(argp1); ecode2 = SWIG_AsVal_double(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","changeVolume", 2, argv[0] )); } arg2 = static_cast< double >(val2); { try { (arg1)->changeVolume(arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Song_update(int argc, VALUE *argv, VALUE self) { if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } { try { Gosu::Song::update(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } static swig_class SwigClassTextInput; #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_TextInput_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_TextInput_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Gosu__TextInput); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_TextInput(int argc, VALUE *argv, VALUE self) { VALUE arg1 = (VALUE) 0 ; const char *classname SWIGUNUSED = "Gosu::TextInput"; Gosu::TextInput *result = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } arg1 = self; { try { if ( strcmp(rb_obj_classname(self), classname) != 0 ) { /* subclassed */ result = (Gosu::TextInput *)new SwigDirector_TextInput(arg1); } else { result = (Gosu::TextInput *)new Gosu::TextInput(); } DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return self; fail: return Qnil; } SWIGINTERN void free_Gosu_TextInput(void *self) { Gosu::TextInput *arg1 = (Gosu::TextInput *)self; SWIG_RubyRemoveTracking(arg1); delete arg1; } SWIGINTERN VALUE _wrap_TextInput_text(int argc, VALUE *argv, VALUE self) { Gosu::TextInput *arg1 = (Gosu::TextInput *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::wstring result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__TextInput, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::TextInput const *","text", 1, self )); } arg1 = reinterpret_cast< Gosu::TextInput * >(argp1); { try { result = ((Gosu::TextInput const *)arg1)->text(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } { vresult = rb_str_new2(Gosu::wstringToUTF8(result).c_str()); FIX_ENCODING(vresult); } return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_TextInput_texte___(int argc, VALUE *argv, VALUE self) { Gosu::TextInput *arg1 = (Gosu::TextInput *) 0 ; std::wstring *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; std::wstring temp2 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__TextInput, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::TextInput *","setText", 1, self )); } arg1 = reinterpret_cast< Gosu::TextInput * >(argp1); { VALUE localTemporary = rb_obj_as_string(argv[0]); temp2 = Gosu::utf8ToWstring(StringValueCStr(localTemporary)); arg2 = &temp2; } { try { (arg1)->setText((std::wstring const &)*arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_TextInput_caret_pose___(int argc, VALUE *argv, VALUE self) { Gosu::TextInput *arg1 = (Gosu::TextInput *) 0 ; unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__TextInput, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::TextInput *","setCaretPos", 1, self )); } arg1 = reinterpret_cast< Gosu::TextInput * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","setCaretPos", 2, argv[0] )); } arg2 = static_cast< unsigned int >(val2); { try { (arg1)->setCaretPos(arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_TextInput_selection_starte___(int argc, VALUE *argv, VALUE self) { Gosu::TextInput *arg1 = (Gosu::TextInput *) 0 ; unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__TextInput, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::TextInput *","setSelectionStart", 1, self )); } arg1 = reinterpret_cast< Gosu::TextInput * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","setSelectionStart", 2, argv[0] )); } arg2 = static_cast< unsigned int >(val2); { try { (arg1)->setSelectionStart(arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_TextInput_filter(int argc, VALUE *argv, VALUE self) { Gosu::TextInput *arg1 = (Gosu::TextInput *) 0 ; std::wstring *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; std::wstring temp2 ; Swig::Director *director = 0; bool upcall = false; std::wstring result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__TextInput, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::TextInput const *","filter", 1, self )); } arg1 = reinterpret_cast< Gosu::TextInput * >(argp1); { VALUE localTemporary = rb_obj_as_string(argv[0]); temp2 = Gosu::utf8ToWstring(StringValueCStr(localTemporary)); arg2 = &temp2; } director = dynamic_cast(arg1); upcall = (director && (director->swig_get_self() == self)); try { { try { if (upcall) { result = ((Gosu::TextInput const *)arg1)->Gosu::TextInput::filter((std::wstring const &)*arg2); } else { result = ((Gosu::TextInput const *)arg1)->filter((std::wstring const &)*arg2); } } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } } catch (Swig::DirectorException& e) { rb_exc_raise(e.getError()); SWIG_fail; } { vresult = rb_str_new2(Gosu::wstringToUTF8(result).c_str()); FIX_ENCODING(vresult); } return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_TextInput_caret_pos(int argc, VALUE *argv, VALUE self) { Gosu::TextInput *arg1 = (Gosu::TextInput *) 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__TextInput, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::TextInput const *","caret_pos", 1, self )); } arg1 = reinterpret_cast< Gosu::TextInput * >(argp1); { try { result = (unsigned int)Gosu_TextInput_caret_pos((Gosu::TextInput const *)arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_TextInput_selection_start(int argc, VALUE *argv, VALUE self) { Gosu::TextInput *arg1 = (Gosu::TextInput *) 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__TextInput, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::TextInput const *","selection_start", 1, self )); } arg1 = reinterpret_cast< Gosu::TextInput * >(argp1); { try { result = (unsigned int)Gosu_TextInput_selection_start((Gosu::TextInput const *)arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_disown_TextInput(int argc, VALUE *argv, VALUE self) { Gosu::TextInput *arg1 = (Gosu::TextInput *) 0 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Gosu__TextInput, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::TextInput *","disown_TextInput", 1, argv[0] )); } arg1 = reinterpret_cast< Gosu::TextInput * >(argp1); { Swig::Director *director = SWIG_DIRECTOR_CAST(arg1); if (director) director->swig_disown(); } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_screen_width(int argc, VALUE *argv, VALUE self) { unsigned int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } { try { result = (unsigned int)Gosu::screenWidth(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_screen_height(int argc, VALUE *argv, VALUE self) { unsigned int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } { try { result = (unsigned int)Gosu::screenHeight(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_available_width(int argc, VALUE *argv, VALUE self) { unsigned int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } { try { result = (unsigned int)Gosu::availableWidth(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_available_height(int argc, VALUE *argv, VALUE self) { unsigned int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } { try { result = (unsigned int)Gosu::availableHeight(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return vresult; fail: return Qnil; } static swig_class SwigClassWindow; #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_Window_allocate(VALUE self) { #else SWIGINTERN VALUE _wrap_Window_allocate(int argc, VALUE *argv, VALUE self) { #endif VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Gosu__Window); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC rb_obj_call_init(vresult, argc, argv); #endif return vresult; } SWIGINTERN VALUE _wrap_new_Window(int argc, VALUE *argv, VALUE self) { VALUE arg1 = (VALUE) 0 ; unsigned int arg2 ; unsigned int arg3 ; bool arg4 = (bool) false ; double arg5 = (double) 16.666666 ; unsigned int val2 ; int ecode2 = 0 ; unsigned int val3 ; int ecode3 = 0 ; bool val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; const char *classname SWIGUNUSED = "Gosu::Window"; Gosu::Window *result = 0 ; if ((argc < 2) || (argc > 4)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } arg1 = self; ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned int","Window", 2, argv[0] )); } arg2 = static_cast< unsigned int >(val2); ecode3 = SWIG_AsVal_unsigned_SS_int(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "unsigned int","Window", 3, argv[1] )); } arg3 = static_cast< unsigned int >(val3); if (argc > 2) { ecode4 = SWIG_AsVal_bool(argv[2], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "bool","Window", 4, argv[2] )); } arg4 = static_cast< bool >(val4); } if (argc > 3) { ecode5 = SWIG_AsVal_double(argv[3], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","Window", 5, argv[3] )); } arg5 = static_cast< double >(val5); } { try { if ( strcmp(rb_obj_classname(self), classname) != 0 ) { /* subclassed */ result = (Gosu::Window *)new SwigDirector_Window(arg1,arg2,arg3,arg4,arg5); } else { result = (Gosu::Window *)new Gosu::Window(arg2,arg3,arg4,arg5); } DATA_PTR(self) = result; SWIG_RubyAddTracking(result, self); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return self; fail: return Qnil; } SWIGINTERN void free_Gosu_Window(void *self) { Gosu::Window *arg1 = (Gosu::Window *)self; SWIG_RubyRemoveTracking(arg1); delete arg1; } SWIGINTERN VALUE _wrap_Window_caption(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; void *argp1 = 0 ; int res1 = 0 ; std::wstring result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","caption", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); { try { result = ((Gosu::Window const *)arg1)->caption(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } { vresult = rb_str_new2(Gosu::wstringToUTF8(result).c_str()); FIX_ENCODING(vresult); } return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_captione___(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; std::wstring *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; std::wstring temp2 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","setCaption", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); { VALUE localTemporary = rb_obj_as_string(argv[0]); temp2 = Gosu::utf8ToWstring(StringValueCStr(localTemporary)); arg2 = &temp2; } { try { (arg1)->setCaption((std::wstring const &)*arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_update_interval(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; void *argp1 = 0 ; int res1 = 0 ; double result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","updateInterval", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); { try { result = (double)((Gosu::Window const *)arg1)->updateInterval(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_show(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Swig::Director *director = 0; bool upcall = false; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","show", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); director = dynamic_cast(arg1); upcall = (director && (director->swig_get_self() == self)); try { { try { if (upcall) { (arg1)->Gosu::Window::show(); } else { (arg1)->show(); } } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } } catch (Swig::DirectorException& e) { rb_exc_raise(e.getError()); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_tick(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Swig::Director *director = 0; bool upcall = false; bool result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","tick", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); director = dynamic_cast(arg1); upcall = (director && (director->swig_get_self() == self)); try { { try { if (upcall) { result = (bool)(arg1)->Gosu::Window::tick(); } else { result = (bool)(arg1)->tick(); } } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } } catch (Swig::DirectorException& e) { rb_exc_raise(e.getError()); SWIG_fail; } vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_close(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","close", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); { try { (arg1)->close(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_update(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Swig::Director *director = 0; bool upcall = false; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","update", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); director = dynamic_cast(arg1); upcall = (director && (director->swig_get_self() == self)); try { { try { if (upcall) { (arg1)->Gosu::Window::update(); } else { (arg1)->update(); } } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } } catch (Swig::DirectorException& e) { rb_exc_raise(e.getError()); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_draw(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Swig::Director *director = 0; bool upcall = false; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","draw", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); director = dynamic_cast(arg1); upcall = (director && (director->swig_get_self() == self)); try { { try { if (upcall) { (arg1)->Gosu::Window::draw(); } else { (arg1)->draw(); } } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } } catch (Swig::DirectorException& e) { rb_exc_raise(e.getError()); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_needs_redrawq___(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Swig::Director *director = 0; bool upcall = false; bool result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","needsRedraw", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); director = dynamic_cast(arg1); upcall = (director && (director->swig_get_self() == self)); try { { try { if (upcall) { result = (bool)((Gosu::Window const *)arg1)->Gosu::Window::needsRedraw(); } else { result = (bool)((Gosu::Window const *)arg1)->needsRedraw(); } } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } } catch (Swig::DirectorException& e) { rb_exc_raise(e.getError()); SWIG_fail; } vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_needs_cursorq___(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Swig::Director *director = 0; bool upcall = false; bool result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","needsCursor", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); director = dynamic_cast(arg1); upcall = (director && (director->swig_get_self() == self)); try { { try { if (upcall) { result = (bool)((Gosu::Window const *)arg1)->Gosu::Window::needsCursor(); } else { result = (bool)((Gosu::Window const *)arg1)->needsCursor(); } } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } } catch (Swig::DirectorException& e) { rb_exc_raise(e.getError()); SWIG_fail; } vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_lose_focus(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Swig::Director *director = 0; bool upcall = false; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","loseFocus", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); director = dynamic_cast(arg1); upcall = (director && (director->swig_get_self() == self)); try { { try { if (upcall) { (arg1)->Gosu::Window::loseFocus(); } else { (arg1)->loseFocus(); } } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } } catch (Swig::DirectorException& e) { rb_exc_raise(e.getError()); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_release_memory(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Swig::Director *director = 0; bool upcall = false; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","releaseMemory", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); director = dynamic_cast(arg1); upcall = (director && (director->swig_get_self() == self)); try { { try { if (upcall) { (arg1)->Gosu::Window::releaseMemory(); } else { (arg1)->releaseMemory(); } } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } } catch (Swig::DirectorException& e) { rb_exc_raise(e.getError()); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_button_down(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; Gosu::Button arg2 ; void *argp1 = 0 ; int res1 = 0 ; Swig::Director *director = 0; bool upcall = false; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","buttonDown", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); { if (NIL_P(argv[0])) arg2 = Gosu::noButton; else arg2 = Gosu::Button(NUM2LONG(argv[0])); } director = dynamic_cast(arg1); upcall = (director && (director->swig_get_self() == self)); try { { try { if (upcall) { (arg1)->Gosu::Window::buttonDown(arg2); } else { (arg1)->buttonDown(arg2); } } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } } catch (Swig::DirectorException& e) { rb_exc_raise(e.getError()); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_button_up(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; Gosu::Button arg2 ; void *argp1 = 0 ; int res1 = 0 ; Swig::Director *director = 0; bool upcall = false; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","buttonUp", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); { if (NIL_P(argv[0])) arg2 = Gosu::noButton; else arg2 = Gosu::Button(NUM2LONG(argv[0])); } director = dynamic_cast(arg1); upcall = (director && (director->swig_get_self() == self)); try { { try { if (upcall) { (arg1)->Gosu::Window::buttonUp(arg2); } else { (arg1)->buttonUp(arg2); } } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } } catch (Swig::DirectorException& e) { rb_exc_raise(e.getError()); SWIG_fail; } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_text_input(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; void *argp1 = 0 ; int res1 = 0 ; Swig::Director *director = 0; Gosu::TextInput *result = 0 ; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","textInput", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); { try { result = (Gosu::TextInput *)Gosu_Window_textInput((Gosu::Window const *)arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } director = dynamic_cast(result); if (director) { vresult = director->swig_get_self(); } else { vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gosu__TextInput, 0 | 0 ); } return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_text_inpute___(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; Gosu::TextInput *arg2 = (Gosu::TextInput *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","setTextInput", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_Gosu__TextInput, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "Gosu::TextInput *","setTextInput", 2, argv[0] )); } arg2 = reinterpret_cast< Gosu::TextInput * >(argp2); { try { Gosu_Window_setTextInput(arg1,arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_mouse_x(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; void *argp1 = 0 ; int res1 = 0 ; double result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","mouseX", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); { try { result = (double)Gosu_Window_mouseX((Gosu::Window const *)arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_mouse_y(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; void *argp1 = 0 ; int res1 = 0 ; double result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","mouseY", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); { try { result = (double)Gosu_Window_mouseY((Gosu::Window const *)arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_set_mouse_position(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; double arg2 ; double arg3 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","setMousePosition", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); ecode2 = SWIG_AsVal_double(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","setMousePosition", 2, argv[0] )); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","setMousePosition", 3, argv[1] )); } arg3 = static_cast< double >(val3); { try { Gosu_Window_setMousePosition(arg1,arg2,arg3); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_mouse_xe___(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","setMouseX", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); ecode2 = SWIG_AsVal_double(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","setMouseX", 2, argv[0] )); } arg2 = static_cast< double >(val2); { try { Gosu_Window_setMouseX(arg1,arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_mouse_ye___(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; double arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","setMouseY", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); ecode2 = SWIG_AsVal_double(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","setMouseY", 2, argv[0] )); } arg2 = static_cast< double >(val2); { try { Gosu_Window_setMouseY(arg1,arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_width(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","width", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); { try { result = (int)Gosu_Window_width((Gosu::Window const *)arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_height(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","height", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); { try { result = (int)Gosu_Window_height((Gosu::Window const *)arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_Window_fullscreenq___(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; void *argp1 = 0 ; int res1 = 0 ; bool result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window const *","fullscreen", 1, self )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); { try { result = (bool)Gosu_Window_fullscreen((Gosu::Window const *)arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_disown_Window(int argc, VALUE *argv, VALUE self) { Gosu::Window *arg1 = (Gosu::Window *) 0 ; void *argp1 = 0 ; int res1 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_Gosu__Window, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "Gosu::Window *","disown_Window", 1, argv[0] )); } arg1 = reinterpret_cast< Gosu::Window * >(argp1); { Swig::Director *director = SWIG_DIRECTOR_CAST(arg1); if (director) director->swig_disown(); } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_char_to_button_id(int argc, VALUE *argv, VALUE self) { wchar_t arg1 ; Gosu::Button result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } { VALUE rbString = rb_obj_as_string(argv[0]); char* utf8String = StringValueCStr(rbString); std::wstring ucsString = Gosu::utf8ToWstring(utf8String); if (ucsString.length() != 1) rb_raise(rb_eArgError, "A single-character string was expected, but `%s' given", utf8String); arg1 = ucsString[0]; } { try { result = Gosu::charToButtonId(arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } { if (result == Gosu::noButton) vresult = Qnil; else vresult = LONG2NUM((&result)->id()); } return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_button_id_to_char(int argc, VALUE *argv, VALUE self) { Gosu::Button arg1 ; wchar_t result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } { if (NIL_P(argv[0])) arg1 = Gosu::noButton; else arg1 = Gosu::Button(NUM2LONG(argv[0])); } { try { result = (wchar_t)Gosu::buttonIdToChar(arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } { if (result == 0) vresult = Qnil; else { vresult = rb_str_new2(Gosu::wstringToUTF8(std::wstring(1, result)).c_str()); FIX_ENCODING(vresult); } } return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_button_downq___(int argc, VALUE *argv, VALUE self) { Gosu::Button arg1 ; bool result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } { if (NIL_P(argv[0])) arg1 = Gosu::noButton; else arg1 = Gosu::Button(NUM2LONG(argv[0])); } { try { result = (bool)Gosu::isButtonDown(arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_draw_line(int argc, VALUE *argv, VALUE self) { double arg1 ; double arg2 ; Gosu::Color arg3 ; double arg4 ; double arg5 ; Gosu::Color arg6 ; Gosu::ZPos arg7 = (Gosu::ZPos) 0 ; Gosu::AlphaMode arg8 = (Gosu::AlphaMode) Gosu::amDefault ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val7 ; int ecode7 = 0 ; if ((argc < 6) || (argc > 8)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::drawLine", 1, argv[0] )); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::drawLine", 2, argv[1] )); } arg2 = static_cast< double >(val2); { if (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM) arg3 = Gosu::Color(NUM2ULONG(argv[2])); else { void* ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg3 = *reinterpret_cast(ptr); } } ecode4 = SWIG_AsVal_double(argv[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","Gosu::drawLine", 4, argv[3] )); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(argv[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","Gosu::drawLine", 5, argv[4] )); } arg5 = static_cast< double >(val5); { if (TYPE(argv[5]) == T_FIXNUM || TYPE(argv[5]) == T_BIGNUM) arg6 = Gosu::Color(NUM2ULONG(argv[5])); else { void* ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg6 = *reinterpret_cast(ptr); } } if (argc > 6) { ecode7 = SWIG_AsVal_double(argv[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "Gosu::ZPos","Gosu::drawLine", 7, argv[6] )); } arg7 = static_cast< Gosu::ZPos >(val7); } if (argc > 7) { { const char* cstr = Gosu::cstrFromSymbol(argv[7]); if (!strcmp(cstr, "default")) arg8 = Gosu::amDefault; else if (!strcmp(cstr, "add")) arg8 = Gosu::amAdditive; else if (!strcmp(cstr, "additive")) arg8 = Gosu::amAdditive; else if (!strcmp(cstr, "multiply")) arg8 = Gosu::amMultiply; else SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode"); } } { try { Gosu::drawLine(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_draw_triangle(int argc, VALUE *argv, VALUE self) { double arg1 ; double arg2 ; Gosu::Color arg3 ; double arg4 ; double arg5 ; Gosu::Color arg6 ; double arg7 ; double arg8 ; Gosu::Color arg9 ; Gosu::ZPos arg10 = (Gosu::ZPos) 0 ; Gosu::AlphaMode arg11 = (Gosu::AlphaMode) Gosu::amDefault ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val7 ; int ecode7 = 0 ; double val8 ; int ecode8 = 0 ; double val10 ; int ecode10 = 0 ; if ((argc < 9) || (argc > 11)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 9)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::drawTriangle", 1, argv[0] )); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::drawTriangle", 2, argv[1] )); } arg2 = static_cast< double >(val2); { if (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM) arg3 = Gosu::Color(NUM2ULONG(argv[2])); else { void* ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg3 = *reinterpret_cast(ptr); } } ecode4 = SWIG_AsVal_double(argv[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","Gosu::drawTriangle", 4, argv[3] )); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(argv[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","Gosu::drawTriangle", 5, argv[4] )); } arg5 = static_cast< double >(val5); { if (TYPE(argv[5]) == T_FIXNUM || TYPE(argv[5]) == T_BIGNUM) arg6 = Gosu::Color(NUM2ULONG(argv[5])); else { void* ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg6 = *reinterpret_cast(ptr); } } ecode7 = SWIG_AsVal_double(argv[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","Gosu::drawTriangle", 7, argv[6] )); } arg7 = static_cast< double >(val7); ecode8 = SWIG_AsVal_double(argv[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "double","Gosu::drawTriangle", 8, argv[7] )); } arg8 = static_cast< double >(val8); { if (TYPE(argv[8]) == T_FIXNUM || TYPE(argv[8]) == T_BIGNUM) arg9 = Gosu::Color(NUM2ULONG(argv[8])); else { void* ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg9 = *reinterpret_cast(ptr); } } if (argc > 9) { ecode10 = SWIG_AsVal_double(argv[9], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), Ruby_Format_TypeError( "", "Gosu::ZPos","Gosu::drawTriangle", 10, argv[9] )); } arg10 = static_cast< Gosu::ZPos >(val10); } if (argc > 10) { { const char* cstr = Gosu::cstrFromSymbol(argv[10]); if (!strcmp(cstr, "default")) arg11 = Gosu::amDefault; else if (!strcmp(cstr, "add")) arg11 = Gosu::amAdditive; else if (!strcmp(cstr, "additive")) arg11 = Gosu::amAdditive; else if (!strcmp(cstr, "multiply")) arg11 = Gosu::amMultiply; else SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode"); } } { try { Gosu::drawTriangle(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_draw_quad(int argc, VALUE *argv, VALUE self) { double arg1 ; double arg2 ; Gosu::Color arg3 ; double arg4 ; double arg5 ; Gosu::Color arg6 ; double arg7 ; double arg8 ; Gosu::Color arg9 ; double arg10 ; double arg11 ; Gosu::Color arg12 ; Gosu::ZPos arg13 = (Gosu::ZPos) 0 ; Gosu::AlphaMode arg14 = (Gosu::AlphaMode) Gosu::amDefault ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val7 ; int ecode7 = 0 ; double val8 ; int ecode8 = 0 ; double val10 ; int ecode10 = 0 ; double val11 ; int ecode11 = 0 ; double val13 ; int ecode13 = 0 ; if ((argc < 12) || (argc > 14)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 12)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::drawQuad", 1, argv[0] )); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::drawQuad", 2, argv[1] )); } arg2 = static_cast< double >(val2); { if (TYPE(argv[2]) == T_FIXNUM || TYPE(argv[2]) == T_BIGNUM) arg3 = Gosu::Color(NUM2ULONG(argv[2])); else { void* ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg3 = *reinterpret_cast(ptr); } } ecode4 = SWIG_AsVal_double(argv[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","Gosu::drawQuad", 4, argv[3] )); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(argv[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","Gosu::drawQuad", 5, argv[4] )); } arg5 = static_cast< double >(val5); { if (TYPE(argv[5]) == T_FIXNUM || TYPE(argv[5]) == T_BIGNUM) arg6 = Gosu::Color(NUM2ULONG(argv[5])); else { void* ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg6 = *reinterpret_cast(ptr); } } ecode7 = SWIG_AsVal_double(argv[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","Gosu::drawQuad", 7, argv[6] )); } arg7 = static_cast< double >(val7); ecode8 = SWIG_AsVal_double(argv[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "double","Gosu::drawQuad", 8, argv[7] )); } arg8 = static_cast< double >(val8); { if (TYPE(argv[8]) == T_FIXNUM || TYPE(argv[8]) == T_BIGNUM) arg9 = Gosu::Color(NUM2ULONG(argv[8])); else { void* ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg9 = *reinterpret_cast(ptr); } } ecode10 = SWIG_AsVal_double(argv[9], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), Ruby_Format_TypeError( "", "double","Gosu::drawQuad", 10, argv[9] )); } arg10 = static_cast< double >(val10); ecode11 = SWIG_AsVal_double(argv[10], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), Ruby_Format_TypeError( "", "double","Gosu::drawQuad", 11, argv[10] )); } arg11 = static_cast< double >(val11); { if (TYPE(argv[11]) == T_FIXNUM || TYPE(argv[11]) == T_BIGNUM) arg12 = Gosu::Color(NUM2ULONG(argv[11])); else { void* ptr; int res = SWIG_ConvertPtr(argv[11], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg12 = *reinterpret_cast(ptr); } } if (argc > 12) { ecode13 = SWIG_AsVal_double(argv[12], &val13); if (!SWIG_IsOK(ecode13)) { SWIG_exception_fail(SWIG_ArgError(ecode13), Ruby_Format_TypeError( "", "Gosu::ZPos","Gosu::drawQuad", 13, argv[12] )); } arg13 = static_cast< Gosu::ZPos >(val13); } if (argc > 13) { { const char* cstr = Gosu::cstrFromSymbol(argv[13]); if (!strcmp(cstr, "default")) arg14 = Gosu::amDefault; else if (!strcmp(cstr, "add")) arg14 = Gosu::amAdditive; else if (!strcmp(cstr, "additive")) arg14 = Gosu::amAdditive; else if (!strcmp(cstr, "multiply")) arg14 = Gosu::amMultiply; else SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode"); } } { try { Gosu::drawQuad(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_draw_rect(int argc, VALUE *argv, VALUE self) { double arg1 ; double arg2 ; double arg3 ; double arg4 ; Gosu::Color arg5 ; Gosu::ZPos arg6 = (Gosu::ZPos) 0 ; Gosu::AlphaMode arg7 = (Gosu::AlphaMode) Gosu::amDefault ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val6 ; int ecode6 = 0 ; if ((argc < 5) || (argc > 7)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::drawRect", 1, argv[0] )); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::drawRect", 2, argv[1] )); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(argv[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Gosu::drawRect", 3, argv[2] )); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(argv[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","Gosu::drawRect", 4, argv[3] )); } arg4 = static_cast< double >(val4); { if (TYPE(argv[4]) == T_FIXNUM || TYPE(argv[4]) == T_BIGNUM) arg5 = Gosu::Color(NUM2ULONG(argv[4])); else { void* ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_Gosu__Color, 0); if (!SWIG_IsOK(res)) SWIG_exception_fail(SWIG_ValueError, "invalid value"); else if (!ptr) SWIG_exception_fail(SWIG_ValueError, "invalid null reference of type Gosu::Color"); else arg5 = *reinterpret_cast(ptr); } } if (argc > 5) { ecode6 = SWIG_AsVal_double(argv[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "Gosu::ZPos","Gosu::drawRect", 6, argv[5] )); } arg6 = static_cast< Gosu::ZPos >(val6); } if (argc > 6) { { const char* cstr = Gosu::cstrFromSymbol(argv[6]); if (!strcmp(cstr, "default")) arg7 = Gosu::amDefault; else if (!strcmp(cstr, "add")) arg7 = Gosu::amAdditive; else if (!strcmp(cstr, "additive")) arg7 = Gosu::amAdditive; else if (!strcmp(cstr, "multiply")) arg7 = Gosu::amMultiply; else SWIG_exception_fail(SWIG_ValueError, "invalid alpha mode"); } } { try { Gosu::drawRect(arg1,arg2,arg3,arg4,arg5,arg6,arg7); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_flush(int argc, VALUE *argv, VALUE self) { if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } { try { Gosu::flush(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_unsafe_gl__SWIG_0(int argc, VALUE *argv, VALUE self) { if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } { try { Gosu::unsafe_gl(); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_unsafe_gl__SWIG_1(int argc, VALUE *argv, VALUE self) { Gosu::ZPos arg1 ; double val1 ; int ecode1 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "Gosu::ZPos","Gosu::unsafe_gl", 1, argv[0] )); } arg1 = static_cast< Gosu::ZPos >(val1); { try { Gosu::unsafe_gl(arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_unsafe_gl(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[1]; int ii; argc = nargs; if (argc > 1) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if (argc == 0) { return _wrap_unsafe_gl__SWIG_0(nargs, args, self); } if (argc == 1) { int _v; { int res = SWIG_AsVal_double(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_unsafe_gl__SWIG_1(nargs, args, self); } } fail: Ruby_Format_OverloadedError( argc, 1, "unsafe_gl", " void unsafe_gl()\n" " void unsafe_gl(Gosu::ZPos z)\n"); return Qnil; } SWIGINTERN VALUE _wrap_clip_to(int argc, VALUE *argv, VALUE self) { double arg1 ; double arg2 ; double arg3 ; double arg4 ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; if ((argc < 4) || (argc > 4)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::clipTo", 1, argv[0] )); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::clipTo", 2, argv[1] )); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(argv[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Gosu::clipTo", 3, argv[2] )); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(argv[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","Gosu::clipTo", 4, argv[3] )); } arg4 = static_cast< double >(val4); { try { Gosu::clipTo(arg1,arg2,arg3,arg4); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_record(int argc, VALUE *argv, VALUE self) { int arg1 ; int arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; Gosu::Image *result = 0 ; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_int(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","Gosu::record", 1, argv[0] )); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_int(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","Gosu::record", 2, argv[1] )); } arg2 = static_cast< int >(val2); { try { result = (Gosu::Image *)Gosu::record(arg1,arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gosu__Image, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; } SWIGINTERN VALUE _wrap_transform(int argc, VALUE *argv, VALUE self) { double arg1 ; double arg2 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; double arg7 ; double arg8 ; double arg9 ; double arg10 ; double arg11 ; double arg12 ; double arg13 ; double arg14 ; double arg15 ; double arg16 ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; double val6 ; int ecode6 = 0 ; double val7 ; int ecode7 = 0 ; double val8 ; int ecode8 = 0 ; double val9 ; int ecode9 = 0 ; double val10 ; int ecode10 = 0 ; double val11 ; int ecode11 = 0 ; double val12 ; int ecode12 = 0 ; double val13 ; int ecode13 = 0 ; double val14 ; int ecode14 = 0 ; double val15 ; int ecode15 = 0 ; double val16 ; int ecode16 = 0 ; if ((argc < 16) || (argc > 16)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 16)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 1, argv[0] )); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 2, argv[1] )); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(argv[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 3, argv[2] )); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(argv[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 4, argv[3] )); } arg4 = static_cast< double >(val4); ecode5 = SWIG_AsVal_double(argv[4], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 5, argv[4] )); } arg5 = static_cast< double >(val5); ecode6 = SWIG_AsVal_double(argv[5], &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 6, argv[5] )); } arg6 = static_cast< double >(val6); ecode7 = SWIG_AsVal_double(argv[6], &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 7, argv[6] )); } arg7 = static_cast< double >(val7); ecode8 = SWIG_AsVal_double(argv[7], &val8); if (!SWIG_IsOK(ecode8)) { SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 8, argv[7] )); } arg8 = static_cast< double >(val8); ecode9 = SWIG_AsVal_double(argv[8], &val9); if (!SWIG_IsOK(ecode9)) { SWIG_exception_fail(SWIG_ArgError(ecode9), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 9, argv[8] )); } arg9 = static_cast< double >(val9); ecode10 = SWIG_AsVal_double(argv[9], &val10); if (!SWIG_IsOK(ecode10)) { SWIG_exception_fail(SWIG_ArgError(ecode10), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 10, argv[9] )); } arg10 = static_cast< double >(val10); ecode11 = SWIG_AsVal_double(argv[10], &val11); if (!SWIG_IsOK(ecode11)) { SWIG_exception_fail(SWIG_ArgError(ecode11), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 11, argv[10] )); } arg11 = static_cast< double >(val11); ecode12 = SWIG_AsVal_double(argv[11], &val12); if (!SWIG_IsOK(ecode12)) { SWIG_exception_fail(SWIG_ArgError(ecode12), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 12, argv[11] )); } arg12 = static_cast< double >(val12); ecode13 = SWIG_AsVal_double(argv[12], &val13); if (!SWIG_IsOK(ecode13)) { SWIG_exception_fail(SWIG_ArgError(ecode13), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 13, argv[12] )); } arg13 = static_cast< double >(val13); ecode14 = SWIG_AsVal_double(argv[13], &val14); if (!SWIG_IsOK(ecode14)) { SWIG_exception_fail(SWIG_ArgError(ecode14), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 14, argv[13] )); } arg14 = static_cast< double >(val14); ecode15 = SWIG_AsVal_double(argv[14], &val15); if (!SWIG_IsOK(ecode15)) { SWIG_exception_fail(SWIG_ArgError(ecode15), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 15, argv[14] )); } arg15 = static_cast< double >(val15); ecode16 = SWIG_AsVal_double(argv[15], &val16); if (!SWIG_IsOK(ecode16)) { SWIG_exception_fail(SWIG_ArgError(ecode16), Ruby_Format_TypeError( "", "double","Gosu::transformForRuby", 16, argv[15] )); } arg16 = static_cast< double >(val16); { try { Gosu::transformForRuby(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_rotate(int argc, VALUE *argv, VALUE self) { double arg1 ; double arg2 = (double) 0 ; double arg3 = (double) 0 ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; if ((argc < 1) || (argc > 3)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::rotateForRuby", 1, argv[0] )); } arg1 = static_cast< double >(val1); if (argc > 1) { ecode2 = SWIG_AsVal_double(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::rotateForRuby", 2, argv[1] )); } arg2 = static_cast< double >(val2); } if (argc > 2) { ecode3 = SWIG_AsVal_double(argv[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Gosu::rotateForRuby", 3, argv[2] )); } arg3 = static_cast< double >(val3); } { try { Gosu::rotateForRuby(arg1,arg2,arg3); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_scale__SWIG_0(int argc, VALUE *argv, VALUE self) { double arg1 ; double val1 ; int ecode1 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::scaleForRuby", 1, argv[0] )); } arg1 = static_cast< double >(val1); { try { Gosu::scaleForRuby(arg1); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_scale__SWIG_1(int argc, VALUE *argv, VALUE self) { double arg1 ; double arg2 ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::scaleForRuby", 1, argv[0] )); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::scaleForRuby", 2, argv[1] )); } arg2 = static_cast< double >(val2); { try { Gosu::scaleForRuby(arg1,arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_scale__SWIG_2(int argc, VALUE *argv, VALUE self) { double arg1 ; double arg2 ; double arg3 ; double arg4 ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; if ((argc < 4) || (argc > 4)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::scaleForRuby", 1, argv[0] )); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::scaleForRuby", 2, argv[1] )); } arg2 = static_cast< double >(val2); ecode3 = SWIG_AsVal_double(argv[2], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","Gosu::scaleForRuby", 3, argv[2] )); } arg3 = static_cast< double >(val3); ecode4 = SWIG_AsVal_double(argv[3], &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","Gosu::scaleForRuby", 4, argv[3] )); } arg4 = static_cast< double >(val4); { try { Gosu::scaleForRuby(arg1,arg2,arg3,arg4); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } SWIGINTERN VALUE _wrap_scale(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[4]; int ii; argc = nargs; if (argc > 4) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if (argc == 1) { int _v; { int res = SWIG_AsVal_double(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_scale__SWIG_0(nargs, args, self); } } if (argc == 2) { int _v; { int res = SWIG_AsVal_double(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_double(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_scale__SWIG_1(nargs, args, self); } } } if (argc == 4) { int _v; { int res = SWIG_AsVal_double(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_double(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_double(argv[2], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_double(argv[3], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_scale__SWIG_2(nargs, args, self); } } } } } fail: Ruby_Format_OverloadedError( argc, 4, "scale", " void scale(double factor)\n" " void scale(double factorX, double factorY)\n" " void scale(double factorX, double factorY, double aroundX, double aroundY)\n"); return Qnil; } SWIGINTERN VALUE _wrap_translate(int argc, VALUE *argv, VALUE self) { double arg1 ; double arg2 ; double val1 ; int ecode1 = 0 ; double val2 ; int ecode2 = 0 ; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } ecode1 = SWIG_AsVal_double(argv[0], &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","Gosu::translateForRuby", 1, argv[0] )); } arg1 = static_cast< double >(val1); ecode2 = SWIG_AsVal_double(argv[1], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","Gosu::translateForRuby", 2, argv[1] )); } arg2 = static_cast< double >(val2); { try { Gosu::translateForRuby(arg1,arg2); } catch (const std::exception& e) { SWIG_exception(SWIG_RuntimeError, e.what()); } } return Qnil; fail: return Qnil; } /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ static swig_type_info _swigt__p_Gosu__Button = {"_p_Gosu__Button", "Gosu::Button *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Gosu__Color = {"_p_Gosu__Color", "Gosu::Color *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Gosu__Font = {"_p_Gosu__Font", "Gosu::Font *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Gosu__GLTexInfo = {"_p_Gosu__GLTexInfo", "Gosu::GLTexInfo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Gosu__Image = {"_p_Gosu__Image", "Gosu::Image *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Gosu__Sample = {"_p_Gosu__Sample", "Gosu::Sample *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Gosu__SampleInstance = {"_p_Gosu__SampleInstance", "Gosu::SampleInstance *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Gosu__Song = {"_p_Gosu__Song", "Gosu::Song *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Gosu__TextInput = {"_p_Gosu__TextInput", "Gosu::TextInput *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Gosu__Window = {"_p_Gosu__Window", "Gosu::Window *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_double = {"_p_double", "Gosu::ZPos *|double *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__tr1__arrayT_double_16_t = {"_p_std__tr1__arrayT_double_16_t", "std::tr1::array< double,16 > *|Gosu::Transform *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_Gosu__Button, &_swigt__p_Gosu__Color, &_swigt__p_Gosu__Font, &_swigt__p_Gosu__GLTexInfo, &_swigt__p_Gosu__Image, &_swigt__p_Gosu__Sample, &_swigt__p_Gosu__SampleInstance, &_swigt__p_Gosu__Song, &_swigt__p_Gosu__TextInput, &_swigt__p_Gosu__Window, &_swigt__p_char, &_swigt__p_double, &_swigt__p_std__tr1__arrayT_double_16_t, }; static swig_cast_info _swigc__p_Gosu__Button[] = { {&_swigt__p_Gosu__Button, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Gosu__Color[] = { {&_swigt__p_Gosu__Color, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Gosu__Font[] = { {&_swigt__p_Gosu__Font, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Gosu__GLTexInfo[] = { {&_swigt__p_Gosu__GLTexInfo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Gosu__Image[] = { {&_swigt__p_Gosu__Image, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Gosu__Sample[] = { {&_swigt__p_Gosu__Sample, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Gosu__SampleInstance[] = { {&_swigt__p_Gosu__SampleInstance, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Gosu__Song[] = { {&_swigt__p_Gosu__Song, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Gosu__TextInput[] = { {&_swigt__p_Gosu__TextInput, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Gosu__Window[] = { {&_swigt__p_Gosu__Window, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__tr1__arrayT_double_16_t[] = { {&_swigt__p_std__tr1__arrayT_double_16_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p_Gosu__Button, _swigc__p_Gosu__Color, _swigc__p_Gosu__Font, _swigc__p_Gosu__GLTexInfo, _swigc__p_Gosu__Image, _swigc__p_Gosu__Sample, _swigc__p_Gosu__SampleInstance, _swigc__p_Gosu__Song, _swigc__p_Gosu__TextInput, _swigc__p_Gosu__Window, _swigc__p_char, _swigc__p_double, _swigc__p_std__tr1__arrayT_double_16_t, }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ /* ----------------------------------------------------------------------------- * Type initialization: * This problem is tough by the requirement that no dynamic * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back * to swig_type_info structures, we need some lookup code at initialization. * The idea is that swig generates all the structures that are needed. * The runtime then collects these partially filled structures. * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * * The generated swig_type_info structures are assigned statically to an initial * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the * cast linked list. The cast data is initially stored in something like a * two-dimensional array. Each row corresponds to a type (there are the same * number of rows as there are in the swig_type_initial array). Each entry in * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that * swig_cast_info to the linked list (because the cast->type) pointer will * be correct. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* c-mode */ #endif #endif #if 0 #define SWIGRUNTIME_DEBUG #endif SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; int init; /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; swig_module.next = &swig_module; init = 1; } else { init = 0; } /* Try and load any already created modules */ module_head = SWIG_GetModule(clientdata); if (!module_head) { /* This is the first module loaded for this interpreter */ /* so set the swig module into the interpreter */ SWIG_SetModule(clientdata, &swig_module); } else { /* the interpreter has loaded a SWIG module, but has it loaded this one? */ iter=module_head; do { if (iter==&swig_module) { /* Our module is already in the list, so there's nothing more to do. */ return; } iter=iter->next; } while (iter!= module_head); /* otherwise we must add our module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } /* When multiple interpreters are used, a module could have already been initialized in a different interpreter, but not yet have a pointer in this interpreter. In this case, we do not want to continue adding types... everything should be set up already */ if (init == 0) return; /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %d\n", swig_module.size); #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ if (swig_module.next != &swig_module) { type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); } if (type) { /* Overwrite clientdata field */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found type %s\n", type->name); #endif if (swig_module.type_initial[i]->clientdata) { type->clientdata = swig_module.type_initial[i]->clientdata; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); #endif } } else { type = swig_module.type_initial[i]; } /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); #endif if (swig_module.next != &swig_module) { ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); #ifdef SWIGRUNTIME_DEBUG if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); #endif } if (ret) { if (type == swig_module.type_initial[i]) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: skip old type %s\n", ret->name); #endif cast->type = ret; ret = 0; } else { /* Check for casting already in the list */ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); #ifdef SWIGRUNTIME_DEBUG if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); #endif if (!ocast) ret = 0; } } if (!ret) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); #endif if (type->cast) { type->cast->prev = cast; cast->next = type->cast; } type->cast = cast; } cast++; } /* Set entry in modules->types array equal to the type */ swig_module.types[i] = type; } swig_module.types[i] = 0; #ifdef SWIGRUNTIME_DEBUG printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { int j = 0; swig_cast_info *cast = swig_module.cast_initial[i]; printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); cast++; ++j; } printf("---- Total casts: %d\n",j); } printf("**** SWIG_InitializeModule: Cast List ******\n"); #endif } /* This function will propagate the clientdata field of type to * any new swig_type_info structures that have been added into the list * of equivalent types. It is like calling * SWIG_TypeClientData(type, clientdata) a second time. */ SWIGRUNTIME void SWIG_PropagateClientData(void) { size_t i; swig_cast_info *equiv; static int init_run = 0; if (init_run) return; init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { if (equiv->type && !equiv->type->clientdata) SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); } equiv = equiv->next; } } } } #ifdef __cplusplus #if 0 { /* c-mode */ #endif } #endif /* */ #ifdef __cplusplus extern "C" #endif SWIGEXPORT void Init_gosu(void) { size_t i; SWIG_InitRuntime(); mGosu = rb_define_module("Gosu"); SWIG_InitializeModule(0); for (i = 0; i < swig_module.size; i++) { SWIG_define_class(swig_module.types[i]); } SWIG_RubyInitializeTrackings(); rb_define_const(mGosu, "MAJOR_VERSION", SWIG_From_int(static_cast< int >(0))); rb_define_const(mGosu, "MINOR_VERSION", SWIG_From_int(static_cast< int >(10))); rb_define_const(mGosu, "POINT_VERSION", SWIG_From_int(static_cast< int >(6))); rb_define_const(mGosu, "VERSION", SWIG_FromCharPtr("0.10.6")); rb_define_const(mGosu, "GOSU_COPYRIGHT_NOTICE", SWIG_FromCharPtr("This software uses the following third-party libraries:\n\nGosu, http://www.libgosu.org, MIT License, http://opensource.org/licenses/MIT\nSDL 2, http://www.libsdl.org, MIT License, http://opensource.org/licenses/MIT\nlibsndfile, http://www.mega-nerd.com/libsndfile, GNU LGPL 3, http://www.gnu.org/copyleft/lesser.html\nOpenAL Soft, http://kcat.strangesoft.net/openal.html, GNU LGPL 2, http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html\n")); rb_define_module_function(mGosu, "milliseconds", VALUEFUNC(_wrap_milliseconds), -1); rb_define_module_function(mGosu, "random", VALUEFUNC(_wrap_random), -1); rb_define_module_function(mGosu, "degrees_to_radians", VALUEFUNC(_wrap_degrees_to_radians), -1); rb_define_module_function(mGosu, "radians_to_degrees", VALUEFUNC(_wrap_radians_to_degrees), -1); rb_define_module_function(mGosu, "offset_x", VALUEFUNC(_wrap_offset_x), -1); rb_define_module_function(mGosu, "offset_y", VALUEFUNC(_wrap_offset_y), -1); rb_define_module_function(mGosu, "angle", VALUEFUNC(_wrap_angle), -1); rb_define_module_function(mGosu, "angle_diff", VALUEFUNC(_wrap_angle_diff), -1); rb_define_module_function(mGosu, "normalize_angle", VALUEFUNC(_wrap_normalize_angle), -1); rb_define_module_function(mGosu, "distance", VALUEFUNC(_wrap_distance), -1); rb_define_module_function(mGosu, "default_font_name", VALUEFUNC(_wrap_default_font_name), -1); rb_define_const(mGosu, "MAX_TEXTURE_SIZE", SWIG_From_unsigned_SS_int(static_cast< unsigned int >(Gosu::MAX_TEXTURE_SIZE))); rb_define_module_function(mGosu, "language", VALUEFUNC(_wrap_language), -1); rb_define_module_function(mGosu, "enable_undocumented_retrofication", VALUEFUNC(_wrap_enable_undocumented_retrofication), -1); rb_define_module_function(mGosu, "_release_all_openal_resources", VALUEFUNC(_wrap__release_all_openal_resources), -1); rb_define_module_function(mGosu, "register_entity", VALUEFUNC(_wrap_register_entity), -1); SwigClassColor.klass = rb_define_class_under(mGosu, "Color", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_Gosu__Color, (void *) &SwigClassColor); rb_define_alloc_func(SwigClassColor.klass, _wrap_Color_allocate); rb_define_method(SwigClassColor.klass, "initialize", VALUEFUNC(_wrap_new_Color), -1); rb_define_const(SwigClassColor.klass, "GL_FORMAT", SWIG_From_unsigned_SS_int(static_cast< unsigned int >(Gosu::Color::GL_FORMAT))); rb_define_singleton_method(SwigClassColor.klass, "from_hsv", VALUEFUNC(_wrap_Color_from_hsv), -1); rb_define_singleton_method(SwigClassColor.klass, "from_ahsv", VALUEFUNC(_wrap_Color_from_ahsv), -1); rb_define_method(SwigClassColor.klass, "red", VALUEFUNC(_wrap_Color_red), -1); rb_define_method(SwigClassColor.klass, "green", VALUEFUNC(_wrap_Color_green), -1); rb_define_method(SwigClassColor.klass, "blue", VALUEFUNC(_wrap_Color_blue), -1); rb_define_method(SwigClassColor.klass, "alpha", VALUEFUNC(_wrap_Color_alpha), -1); rb_define_method(SwigClassColor.klass, "red=", VALUEFUNC(_wrap_Color_rede___), -1); rb_define_method(SwigClassColor.klass, "green=", VALUEFUNC(_wrap_Color_greene___), -1); rb_define_method(SwigClassColor.klass, "blue=", VALUEFUNC(_wrap_Color_bluee___), -1); rb_define_method(SwigClassColor.klass, "alpha=", VALUEFUNC(_wrap_Color_alphae___), -1); rb_define_method(SwigClassColor.klass, "hue", VALUEFUNC(_wrap_Color_hue), -1); rb_define_method(SwigClassColor.klass, "hue=", VALUEFUNC(_wrap_Color_huee___), -1); rb_define_method(SwigClassColor.klass, "saturation", VALUEFUNC(_wrap_Color_saturation), -1); rb_define_method(SwigClassColor.klass, "saturation=", VALUEFUNC(_wrap_Color_saturatione___), -1); rb_define_method(SwigClassColor.klass, "value", VALUEFUNC(_wrap_Color_value), -1); rb_define_method(SwigClassColor.klass, "value=", VALUEFUNC(_wrap_Color_valuee___), -1); rb_define_method(SwigClassColor.klass, "bgr", VALUEFUNC(_wrap_Color_bgr), -1); rb_define_method(SwigClassColor.klass, "abgr", VALUEFUNC(_wrap_Color_abgr), -1); rb_define_method(SwigClassColor.klass, "gl", VALUEFUNC(_wrap_Color_gl), -1); rb_define_singleton_method(SwigClassColor.klass, "rgb", VALUEFUNC(_wrap_Color_rgb), -1); rb_define_singleton_method(SwigClassColor.klass, "rgba", VALUEFUNC(_wrap_Color_rgba), -1); rb_define_singleton_method(SwigClassColor.klass, "argb", VALUEFUNC(_wrap_Color_argb), -1); rb_define_method(SwigClassColor.klass, "dup", VALUEFUNC(_wrap_Color_dup), -1); rb_define_method(SwigClassColor.klass, "inspect", VALUEFUNC(_wrap_Color_inspect), -1); rb_define_method(SwigClassColor.klass, "==", VALUEFUNC(_wrap_Color___eq__), -1); SwigClassColor.mark = 0; SwigClassColor.destroy = (void (*)(void *)) free_Gosu_Color; SwigClassColor.trackObjects = 1; SwigClassFont.klass = rb_define_class_under(mGosu, "Font", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_Gosu__Font, (void *) &SwigClassFont); rb_define_alloc_func(SwigClassFont.klass, _wrap_Font_allocate); rb_define_method(SwigClassFont.klass, "initialize", VALUEFUNC(_wrap_new_Font), -1); rb_define_method(SwigClassFont.klass, "name", VALUEFUNC(_wrap_Font_name), -1); rb_define_method(SwigClassFont.klass, "height", VALUEFUNC(_wrap_Font_height), -1); rb_define_method(SwigClassFont.klass, "flags", VALUEFUNC(_wrap_Font_flags), -1); rb_define_method(SwigClassFont.klass, "text_width", VALUEFUNC(_wrap_Font_text_width), -1); rb_define_method(SwigClassFont.klass, "draw", VALUEFUNC(_wrap_Font_draw), -1); rb_define_method(SwigClassFont.klass, "draw_rel", VALUEFUNC(_wrap_Font_draw_rel), -1); rb_define_method(SwigClassFont.klass, "draw_rot", VALUEFUNC(_wrap_Font_draw_rot), -1); rb_define_method(SwigClassFont.klass, "set_image", VALUEFUNC(_wrap_Font_set_image), -1); SwigClassFont.mark = 0; SwigClassFont.destroy = (void (*)(void *)) free_Gosu_Font; SwigClassFont.trackObjects = 1; SwigClassGLTexInfo.klass = rb_define_class_under(mGosu, "GLTexInfo", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_Gosu__GLTexInfo, (void *) &SwigClassGLTexInfo); rb_define_alloc_func(SwigClassGLTexInfo.klass, _wrap_GLTexInfo_allocate); rb_define_method(SwigClassGLTexInfo.klass, "initialize", VALUEFUNC(_wrap_new_GLTexInfo), -1); rb_define_method(SwigClassGLTexInfo.klass, "tex_name=", VALUEFUNC(_wrap_GLTexInfo_tex_name_set), -1); rb_define_method(SwigClassGLTexInfo.klass, "tex_name", VALUEFUNC(_wrap_GLTexInfo_tex_name_get), -1); rb_define_method(SwigClassGLTexInfo.klass, "left=", VALUEFUNC(_wrap_GLTexInfo_left_set), -1); rb_define_method(SwigClassGLTexInfo.klass, "left", VALUEFUNC(_wrap_GLTexInfo_left_get), -1); rb_define_method(SwigClassGLTexInfo.klass, "right=", VALUEFUNC(_wrap_GLTexInfo_right_set), -1); rb_define_method(SwigClassGLTexInfo.klass, "right", VALUEFUNC(_wrap_GLTexInfo_right_get), -1); rb_define_method(SwigClassGLTexInfo.klass, "top=", VALUEFUNC(_wrap_GLTexInfo_top_set), -1); rb_define_method(SwigClassGLTexInfo.klass, "top", VALUEFUNC(_wrap_GLTexInfo_top_get), -1); rb_define_method(SwigClassGLTexInfo.klass, "bottom=", VALUEFUNC(_wrap_GLTexInfo_bottom_set), -1); rb_define_method(SwigClassGLTexInfo.klass, "bottom", VALUEFUNC(_wrap_GLTexInfo_bottom_get), -1); SwigClassGLTexInfo.mark = 0; SwigClassGLTexInfo.destroy = (void (*)(void *)) free_Gosu_GLTexInfo; SwigClassGLTexInfo.trackObjects = 1; SwigClassImage.klass = rb_define_class_under(mGosu, "Image", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_Gosu__Image, (void *) &SwigClassImage); rb_define_alloc_func(SwigClassImage.klass, _wrap_Image_allocate); rb_define_method(SwigClassImage.klass, "initialize", VALUEFUNC(_wrap_new_Image), -1); rb_define_method(SwigClassImage.klass, "width", VALUEFUNC(_wrap_Image_width), -1); rb_define_method(SwigClassImage.klass, "height", VALUEFUNC(_wrap_Image_height), -1); rb_define_method(SwigClassImage.klass, "draw", VALUEFUNC(_wrap_Image_draw), -1); rb_define_method(SwigClassImage.klass, "draw_mod", VALUEFUNC(_wrap_Image_draw_mod), -1); rb_define_method(SwigClassImage.klass, "draw_rot", VALUEFUNC(_wrap_Image_draw_rot), -1); rb_define_method(SwigClassImage.klass, "draw_as_quad", VALUEFUNC(_wrap_Image_draw_as_quad), -1); rb_define_method(SwigClassImage.klass, "gl_tex_info", VALUEFUNC(_wrap_Image_gl_tex_info), -1); rb_define_method(SwigClassImage.klass, "subimage", VALUEFUNC(_wrap_Image_subimage), -1); rb_define_singleton_method(SwigClassImage.klass, "from_text", VALUEFUNC(_wrap_Image_from_text), -1); rb_define_singleton_method(SwigClassImage.klass, "load_tiles", VALUEFUNC(_wrap_Image_load_tiles), -1); rb_define_method(SwigClassImage.klass, "to_blob", VALUEFUNC(_wrap_Image_to_blob), -1); rb_define_method(SwigClassImage.klass, "columns", VALUEFUNC(_wrap_Image_columns), -1); rb_define_method(SwigClassImage.klass, "rows", VALUEFUNC(_wrap_Image_rows), -1); rb_define_method(SwigClassImage.klass, "save", VALUEFUNC(_wrap_Image_save), -1); rb_define_method(SwigClassImage.klass, "insert", VALUEFUNC(_wrap_Image_insert), -1); SwigClassImage.mark = 0; SwigClassImage.destroy = (void (*)(void *)) free_Gosu_Image; SwigClassImage.trackObjects = 1; rb_define_module_function(mGosu, "fps", VALUEFUNC(_wrap_fps), -1); SwigClassSampleInstance.klass = rb_define_class_under(mGosu, "SampleInstance", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_Gosu__SampleInstance, (void *) &SwigClassSampleInstance); rb_define_alloc_func(SwigClassSampleInstance.klass, _wrap_SampleInstance_allocate); rb_define_method(SwigClassSampleInstance.klass, "initialize", VALUEFUNC(_wrap_new_SampleInstance), -1); rb_define_method(SwigClassSampleInstance.klass, "playing?", VALUEFUNC(_wrap_SampleInstance_playingq___), -1); rb_define_method(SwigClassSampleInstance.klass, "paused?", VALUEFUNC(_wrap_SampleInstance_pausedq___), -1); rb_define_method(SwigClassSampleInstance.klass, "pause", VALUEFUNC(_wrap_SampleInstance_pause), -1); rb_define_method(SwigClassSampleInstance.klass, "resume", VALUEFUNC(_wrap_SampleInstance_resume), -1); rb_define_method(SwigClassSampleInstance.klass, "stop", VALUEFUNC(_wrap_SampleInstance_stop), -1); rb_define_method(SwigClassSampleInstance.klass, "volume=", VALUEFUNC(_wrap_SampleInstance_volumee___), -1); rb_define_method(SwigClassSampleInstance.klass, "pan=", VALUEFUNC(_wrap_SampleInstance_pane___), -1); rb_define_method(SwigClassSampleInstance.klass, "speed=", VALUEFUNC(_wrap_SampleInstance_speede___), -1); SwigClassSampleInstance.mark = 0; SwigClassSampleInstance.destroy = (void (*)(void *)) free_Gosu_SampleInstance; SwigClassSampleInstance.trackObjects = 1; SwigClassSample.klass = rb_define_class_under(mGosu, "Sample", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_Gosu__Sample, (void *) &SwigClassSample); rb_define_alloc_func(SwigClassSample.klass, _wrap_Sample_allocate); rb_define_method(SwigClassSample.klass, "initialize", VALUEFUNC(_wrap_new_Sample), -1); rb_define_method(SwigClassSample.klass, "play", VALUEFUNC(_wrap_Sample_play), -1); rb_define_method(SwigClassSample.klass, "play_pan", VALUEFUNC(_wrap_Sample_play_pan), -1); SwigClassSample.mark = 0; SwigClassSample.destroy = (void (*)(void *)) free_Gosu_Sample; SwigClassSample.trackObjects = 1; SwigClassSong.klass = rb_define_class_under(mGosu, "Song", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_Gosu__Song, (void *) &SwigClassSong); rb_define_alloc_func(SwigClassSong.klass, _wrap_Song_allocate); rb_define_method(SwigClassSong.klass, "initialize", VALUEFUNC(_wrap_new_Song), -1); rb_define_singleton_method(SwigClassSong.klass, "current_song", VALUEFUNC(_wrap_Song_current_song), -1); rb_define_method(SwigClassSong.klass, "play", VALUEFUNC(_wrap_Song_play), -1); rb_define_method(SwigClassSong.klass, "pause", VALUEFUNC(_wrap_Song_pause), -1); rb_define_method(SwigClassSong.klass, "paused?", VALUEFUNC(_wrap_Song_pausedq___), -1); rb_define_method(SwigClassSong.klass, "stop", VALUEFUNC(_wrap_Song_stop), -1); rb_define_method(SwigClassSong.klass, "playing?", VALUEFUNC(_wrap_Song_playingq___), -1); rb_define_method(SwigClassSong.klass, "volume", VALUEFUNC(_wrap_Song_volume), -1); rb_define_method(SwigClassSong.klass, "volume=", VALUEFUNC(_wrap_Song_volumee___), -1); rb_define_singleton_method(SwigClassSong.klass, "update", VALUEFUNC(_wrap_Song_update), -1); SwigClassSong.mark = 0; SwigClassSong.destroy = (void (*)(void *)) free_Gosu_Song; SwigClassSong.trackObjects = 1; rb_define_const(mGosu, "KbEscape", SWIG_From_int(static_cast< int >(Gosu::kbEscape))); rb_define_const(mGosu, "KbF1", SWIG_From_int(static_cast< int >(Gosu::kbF1))); rb_define_const(mGosu, "KbF2", SWIG_From_int(static_cast< int >(Gosu::kbF2))); rb_define_const(mGosu, "KbF3", SWIG_From_int(static_cast< int >(Gosu::kbF3))); rb_define_const(mGosu, "KbF4", SWIG_From_int(static_cast< int >(Gosu::kbF4))); rb_define_const(mGosu, "KbF5", SWIG_From_int(static_cast< int >(Gosu::kbF5))); rb_define_const(mGosu, "KbF6", SWIG_From_int(static_cast< int >(Gosu::kbF6))); rb_define_const(mGosu, "KbF7", SWIG_From_int(static_cast< int >(Gosu::kbF7))); rb_define_const(mGosu, "KbF8", SWIG_From_int(static_cast< int >(Gosu::kbF8))); rb_define_const(mGosu, "KbF9", SWIG_From_int(static_cast< int >(Gosu::kbF9))); rb_define_const(mGosu, "KbF10", SWIG_From_int(static_cast< int >(Gosu::kbF10))); rb_define_const(mGosu, "KbF11", SWIG_From_int(static_cast< int >(Gosu::kbF11))); rb_define_const(mGosu, "KbF12", SWIG_From_int(static_cast< int >(Gosu::kbF12))); rb_define_const(mGosu, "Kb0", SWIG_From_int(static_cast< int >(Gosu::kb0))); rb_define_const(mGosu, "Kb1", SWIG_From_int(static_cast< int >(Gosu::kb1))); rb_define_const(mGosu, "Kb2", SWIG_From_int(static_cast< int >(Gosu::kb2))); rb_define_const(mGosu, "Kb3", SWIG_From_int(static_cast< int >(Gosu::kb3))); rb_define_const(mGosu, "Kb4", SWIG_From_int(static_cast< int >(Gosu::kb4))); rb_define_const(mGosu, "Kb5", SWIG_From_int(static_cast< int >(Gosu::kb5))); rb_define_const(mGosu, "Kb6", SWIG_From_int(static_cast< int >(Gosu::kb6))); rb_define_const(mGosu, "Kb7", SWIG_From_int(static_cast< int >(Gosu::kb7))); rb_define_const(mGosu, "Kb8", SWIG_From_int(static_cast< int >(Gosu::kb8))); rb_define_const(mGosu, "Kb9", SWIG_From_int(static_cast< int >(Gosu::kb9))); rb_define_const(mGosu, "KbTab", SWIG_From_int(static_cast< int >(Gosu::kbTab))); rb_define_const(mGosu, "KbReturn", SWIG_From_int(static_cast< int >(Gosu::kbReturn))); rb_define_const(mGosu, "KbSpace", SWIG_From_int(static_cast< int >(Gosu::kbSpace))); rb_define_const(mGosu, "KbLeftShift", SWIG_From_int(static_cast< int >(Gosu::kbLeftShift))); rb_define_const(mGosu, "KbRightShift", SWIG_From_int(static_cast< int >(Gosu::kbRightShift))); rb_define_const(mGosu, "KbLeftControl", SWIG_From_int(static_cast< int >(Gosu::kbLeftControl))); rb_define_const(mGosu, "KbRightControl", SWIG_From_int(static_cast< int >(Gosu::kbRightControl))); rb_define_const(mGosu, "KbLeftAlt", SWIG_From_int(static_cast< int >(Gosu::kbLeftAlt))); rb_define_const(mGosu, "KbRightAlt", SWIG_From_int(static_cast< int >(Gosu::kbRightAlt))); rb_define_const(mGosu, "KbLeftMeta", SWIG_From_int(static_cast< int >(Gosu::kbLeftMeta))); rb_define_const(mGosu, "KbRightMeta", SWIG_From_int(static_cast< int >(Gosu::kbRightMeta))); rb_define_const(mGosu, "KbBackspace", SWIG_From_int(static_cast< int >(Gosu::kbBackspace))); rb_define_const(mGosu, "KbLeft", SWIG_From_int(static_cast< int >(Gosu::kbLeft))); rb_define_const(mGosu, "KbRight", SWIG_From_int(static_cast< int >(Gosu::kbRight))); rb_define_const(mGosu, "KbUp", SWIG_From_int(static_cast< int >(Gosu::kbUp))); rb_define_const(mGosu, "KbDown", SWIG_From_int(static_cast< int >(Gosu::kbDown))); rb_define_const(mGosu, "KbHome", SWIG_From_int(static_cast< int >(Gosu::kbHome))); rb_define_const(mGosu, "KbEnd", SWIG_From_int(static_cast< int >(Gosu::kbEnd))); rb_define_const(mGosu, "KbInsert", SWIG_From_int(static_cast< int >(Gosu::kbInsert))); rb_define_const(mGosu, "KbDelete", SWIG_From_int(static_cast< int >(Gosu::kbDelete))); rb_define_const(mGosu, "KbPageUp", SWIG_From_int(static_cast< int >(Gosu::kbPageUp))); rb_define_const(mGosu, "KbPageDown", SWIG_From_int(static_cast< int >(Gosu::kbPageDown))); rb_define_const(mGosu, "KbEnter", SWIG_From_int(static_cast< int >(Gosu::kbEnter))); rb_define_const(mGosu, "KbBacktick", SWIG_From_int(static_cast< int >(Gosu::kbBacktick))); rb_define_const(mGosu, "KbMinus", SWIG_From_int(static_cast< int >(Gosu::kbMinus))); rb_define_const(mGosu, "KbEqual", SWIG_From_int(static_cast< int >(Gosu::kbEqual))); rb_define_const(mGosu, "KbBracketLeft", SWIG_From_int(static_cast< int >(Gosu::kbBracketLeft))); rb_define_const(mGosu, "KbBracketRight", SWIG_From_int(static_cast< int >(Gosu::kbBracketRight))); rb_define_const(mGosu, "KbBackslash", SWIG_From_int(static_cast< int >(Gosu::kbBackslash))); rb_define_const(mGosu, "KbSemicolon", SWIG_From_int(static_cast< int >(Gosu::kbSemicolon))); rb_define_const(mGosu, "KbApostrophe", SWIG_From_int(static_cast< int >(Gosu::kbApostrophe))); rb_define_const(mGosu, "KbComma", SWIG_From_int(static_cast< int >(Gosu::kbComma))); rb_define_const(mGosu, "KbPeriod", SWIG_From_int(static_cast< int >(Gosu::kbPeriod))); rb_define_const(mGosu, "KbSlash", SWIG_From_int(static_cast< int >(Gosu::kbSlash))); rb_define_const(mGosu, "KbA", SWIG_From_int(static_cast< int >(Gosu::kbA))); rb_define_const(mGosu, "KbB", SWIG_From_int(static_cast< int >(Gosu::kbB))); rb_define_const(mGosu, "KbC", SWIG_From_int(static_cast< int >(Gosu::kbC))); rb_define_const(mGosu, "KbD", SWIG_From_int(static_cast< int >(Gosu::kbD))); rb_define_const(mGosu, "KbE", SWIG_From_int(static_cast< int >(Gosu::kbE))); rb_define_const(mGosu, "KbF", SWIG_From_int(static_cast< int >(Gosu::kbF))); rb_define_const(mGosu, "KbG", SWIG_From_int(static_cast< int >(Gosu::kbG))); rb_define_const(mGosu, "KbH", SWIG_From_int(static_cast< int >(Gosu::kbH))); rb_define_const(mGosu, "KbI", SWIG_From_int(static_cast< int >(Gosu::kbI))); rb_define_const(mGosu, "KbJ", SWIG_From_int(static_cast< int >(Gosu::kbJ))); rb_define_const(mGosu, "KbK", SWIG_From_int(static_cast< int >(Gosu::kbK))); rb_define_const(mGosu, "KbL", SWIG_From_int(static_cast< int >(Gosu::kbL))); rb_define_const(mGosu, "KbM", SWIG_From_int(static_cast< int >(Gosu::kbM))); rb_define_const(mGosu, "KbN", SWIG_From_int(static_cast< int >(Gosu::kbN))); rb_define_const(mGosu, "KbO", SWIG_From_int(static_cast< int >(Gosu::kbO))); rb_define_const(mGosu, "KbP", SWIG_From_int(static_cast< int >(Gosu::kbP))); rb_define_const(mGosu, "KbQ", SWIG_From_int(static_cast< int >(Gosu::kbQ))); rb_define_const(mGosu, "KbR", SWIG_From_int(static_cast< int >(Gosu::kbR))); rb_define_const(mGosu, "KbS", SWIG_From_int(static_cast< int >(Gosu::kbS))); rb_define_const(mGosu, "KbT", SWIG_From_int(static_cast< int >(Gosu::kbT))); rb_define_const(mGosu, "KbU", SWIG_From_int(static_cast< int >(Gosu::kbU))); rb_define_const(mGosu, "KbV", SWIG_From_int(static_cast< int >(Gosu::kbV))); rb_define_const(mGosu, "KbW", SWIG_From_int(static_cast< int >(Gosu::kbW))); rb_define_const(mGosu, "KbX", SWIG_From_int(static_cast< int >(Gosu::kbX))); rb_define_const(mGosu, "KbY", SWIG_From_int(static_cast< int >(Gosu::kbY))); rb_define_const(mGosu, "KbZ", SWIG_From_int(static_cast< int >(Gosu::kbZ))); rb_define_const(mGosu, "KbISO", SWIG_From_int(static_cast< int >(Gosu::kbISO))); rb_define_const(mGosu, "KbNumpad0", SWIG_From_int(static_cast< int >(Gosu::kbNumpad0))); rb_define_const(mGosu, "KbNumpad1", SWIG_From_int(static_cast< int >(Gosu::kbNumpad1))); rb_define_const(mGosu, "KbNumpad2", SWIG_From_int(static_cast< int >(Gosu::kbNumpad2))); rb_define_const(mGosu, "KbNumpad3", SWIG_From_int(static_cast< int >(Gosu::kbNumpad3))); rb_define_const(mGosu, "KbNumpad4", SWIG_From_int(static_cast< int >(Gosu::kbNumpad4))); rb_define_const(mGosu, "KbNumpad5", SWIG_From_int(static_cast< int >(Gosu::kbNumpad5))); rb_define_const(mGosu, "KbNumpad6", SWIG_From_int(static_cast< int >(Gosu::kbNumpad6))); rb_define_const(mGosu, "KbNumpad7", SWIG_From_int(static_cast< int >(Gosu::kbNumpad7))); rb_define_const(mGosu, "KbNumpad8", SWIG_From_int(static_cast< int >(Gosu::kbNumpad8))); rb_define_const(mGosu, "KbNumpad9", SWIG_From_int(static_cast< int >(Gosu::kbNumpad9))); rb_define_const(mGosu, "KbNumpadAdd", SWIG_From_int(static_cast< int >(Gosu::kbNumpadAdd))); rb_define_const(mGosu, "KbNumpadSubtract", SWIG_From_int(static_cast< int >(Gosu::kbNumpadSubtract))); rb_define_const(mGosu, "KbNumpadMultiply", SWIG_From_int(static_cast< int >(Gosu::kbNumpadMultiply))); rb_define_const(mGosu, "KbNumpadDivide", SWIG_From_int(static_cast< int >(Gosu::kbNumpadDivide))); rb_define_const(mGosu, "MsLeft", SWIG_From_int(static_cast< int >(Gosu::msLeft))); rb_define_const(mGosu, "MsMiddle", SWIG_From_int(static_cast< int >(Gosu::msMiddle))); rb_define_const(mGosu, "MsRight", SWIG_From_int(static_cast< int >(Gosu::msRight))); rb_define_const(mGosu, "MsWheelUp", SWIG_From_int(static_cast< int >(Gosu::msWheelUp))); rb_define_const(mGosu, "MsWheelDown", SWIG_From_int(static_cast< int >(Gosu::msWheelDown))); rb_define_const(mGosu, "MsOther0", SWIG_From_int(static_cast< int >(Gosu::msOther0))); rb_define_const(mGosu, "MsOther1", SWIG_From_int(static_cast< int >(Gosu::msOther1))); rb_define_const(mGosu, "MsOther2", SWIG_From_int(static_cast< int >(Gosu::msOther2))); rb_define_const(mGosu, "MsOther3", SWIG_From_int(static_cast< int >(Gosu::msOther3))); rb_define_const(mGosu, "MsOther4", SWIG_From_int(static_cast< int >(Gosu::msOther4))); rb_define_const(mGosu, "MsOther5", SWIG_From_int(static_cast< int >(Gosu::msOther5))); rb_define_const(mGosu, "MsOther6", SWIG_From_int(static_cast< int >(Gosu::msOther6))); rb_define_const(mGosu, "MsOther7", SWIG_From_int(static_cast< int >(Gosu::msOther7))); rb_define_const(mGosu, "GpLeft", SWIG_From_int(static_cast< int >(Gosu::gpLeft))); rb_define_const(mGosu, "GpRight", SWIG_From_int(static_cast< int >(Gosu::gpRight))); rb_define_const(mGosu, "GpUp", SWIG_From_int(static_cast< int >(Gosu::gpUp))); rb_define_const(mGosu, "GpDown", SWIG_From_int(static_cast< int >(Gosu::gpDown))); rb_define_const(mGosu, "GpButton0", SWIG_From_int(static_cast< int >(Gosu::gpButton0))); rb_define_const(mGosu, "GpButton1", SWIG_From_int(static_cast< int >(Gosu::gpButton1))); rb_define_const(mGosu, "GpButton2", SWIG_From_int(static_cast< int >(Gosu::gpButton2))); rb_define_const(mGosu, "GpButton3", SWIG_From_int(static_cast< int >(Gosu::gpButton3))); rb_define_const(mGosu, "GpButton4", SWIG_From_int(static_cast< int >(Gosu::gpButton4))); rb_define_const(mGosu, "GpButton5", SWIG_From_int(static_cast< int >(Gosu::gpButton5))); rb_define_const(mGosu, "GpButton6", SWIG_From_int(static_cast< int >(Gosu::gpButton6))); rb_define_const(mGosu, "GpButton7", SWIG_From_int(static_cast< int >(Gosu::gpButton7))); rb_define_const(mGosu, "GpButton8", SWIG_From_int(static_cast< int >(Gosu::gpButton8))); rb_define_const(mGosu, "GpButton9", SWIG_From_int(static_cast< int >(Gosu::gpButton9))); rb_define_const(mGosu, "GpButton10", SWIG_From_int(static_cast< int >(Gosu::gpButton10))); rb_define_const(mGosu, "GpButton11", SWIG_From_int(static_cast< int >(Gosu::gpButton11))); rb_define_const(mGosu, "GpButton12", SWIG_From_int(static_cast< int >(Gosu::gpButton12))); rb_define_const(mGosu, "GpButton13", SWIG_From_int(static_cast< int >(Gosu::gpButton13))); rb_define_const(mGosu, "GpButton14", SWIG_From_int(static_cast< int >(Gosu::gpButton14))); rb_define_const(mGosu, "GpButton15", SWIG_From_int(static_cast< int >(Gosu::gpButton15))); rb_define_const(mGosu, "Gp0Left", SWIG_From_int(static_cast< int >(Gosu::gp0Left))); rb_define_const(mGosu, "Gp0Right", SWIG_From_int(static_cast< int >(Gosu::gp0Right))); rb_define_const(mGosu, "Gp0Up", SWIG_From_int(static_cast< int >(Gosu::gp0Up))); rb_define_const(mGosu, "Gp0Down", SWIG_From_int(static_cast< int >(Gosu::gp0Down))); rb_define_const(mGosu, "Gp0Button0", SWIG_From_int(static_cast< int >(Gosu::gp0Button0))); rb_define_const(mGosu, "Gp0Button1", SWIG_From_int(static_cast< int >(Gosu::gp0Button1))); rb_define_const(mGosu, "Gp0Button2", SWIG_From_int(static_cast< int >(Gosu::gp0Button2))); rb_define_const(mGosu, "Gp0Button3", SWIG_From_int(static_cast< int >(Gosu::gp0Button3))); rb_define_const(mGosu, "Gp0Button4", SWIG_From_int(static_cast< int >(Gosu::gp0Button4))); rb_define_const(mGosu, "Gp0Button5", SWIG_From_int(static_cast< int >(Gosu::gp0Button5))); rb_define_const(mGosu, "Gp0Button6", SWIG_From_int(static_cast< int >(Gosu::gp0Button6))); rb_define_const(mGosu, "Gp0Button7", SWIG_From_int(static_cast< int >(Gosu::gp0Button7))); rb_define_const(mGosu, "Gp0Button8", SWIG_From_int(static_cast< int >(Gosu::gp0Button8))); rb_define_const(mGosu, "Gp0Button9", SWIG_From_int(static_cast< int >(Gosu::gp0Button9))); rb_define_const(mGosu, "Gp0Button10", SWIG_From_int(static_cast< int >(Gosu::gp0Button10))); rb_define_const(mGosu, "Gp0Button11", SWIG_From_int(static_cast< int >(Gosu::gp0Button11))); rb_define_const(mGosu, "Gp0Button12", SWIG_From_int(static_cast< int >(Gosu::gp0Button12))); rb_define_const(mGosu, "Gp0Button13", SWIG_From_int(static_cast< int >(Gosu::gp0Button13))); rb_define_const(mGosu, "Gp0Button14", SWIG_From_int(static_cast< int >(Gosu::gp0Button14))); rb_define_const(mGosu, "Gp0Button15", SWIG_From_int(static_cast< int >(Gosu::gp0Button15))); rb_define_const(mGosu, "Gp1Left", SWIG_From_int(static_cast< int >(Gosu::gp1Left))); rb_define_const(mGosu, "Gp1Right", SWIG_From_int(static_cast< int >(Gosu::gp1Right))); rb_define_const(mGosu, "Gp1Up", SWIG_From_int(static_cast< int >(Gosu::gp1Up))); rb_define_const(mGosu, "Gp1Down", SWIG_From_int(static_cast< int >(Gosu::gp1Down))); rb_define_const(mGosu, "Gp1Button0", SWIG_From_int(static_cast< int >(Gosu::gp1Button0))); rb_define_const(mGosu, "Gp1Button1", SWIG_From_int(static_cast< int >(Gosu::gp1Button1))); rb_define_const(mGosu, "Gp1Button2", SWIG_From_int(static_cast< int >(Gosu::gp1Button2))); rb_define_const(mGosu, "Gp1Button3", SWIG_From_int(static_cast< int >(Gosu::gp1Button3))); rb_define_const(mGosu, "Gp1Button4", SWIG_From_int(static_cast< int >(Gosu::gp1Button4))); rb_define_const(mGosu, "Gp1Button5", SWIG_From_int(static_cast< int >(Gosu::gp1Button5))); rb_define_const(mGosu, "Gp1Button6", SWIG_From_int(static_cast< int >(Gosu::gp1Button6))); rb_define_const(mGosu, "Gp1Button7", SWIG_From_int(static_cast< int >(Gosu::gp1Button7))); rb_define_const(mGosu, "Gp1Button8", SWIG_From_int(static_cast< int >(Gosu::gp1Button8))); rb_define_const(mGosu, "Gp1Button9", SWIG_From_int(static_cast< int >(Gosu::gp1Button9))); rb_define_const(mGosu, "Gp1Button10", SWIG_From_int(static_cast< int >(Gosu::gp1Button10))); rb_define_const(mGosu, "Gp1Button11", SWIG_From_int(static_cast< int >(Gosu::gp1Button11))); rb_define_const(mGosu, "Gp1Button12", SWIG_From_int(static_cast< int >(Gosu::gp1Button12))); rb_define_const(mGosu, "Gp1Button13", SWIG_From_int(static_cast< int >(Gosu::gp1Button13))); rb_define_const(mGosu, "Gp1Button14", SWIG_From_int(static_cast< int >(Gosu::gp1Button14))); rb_define_const(mGosu, "Gp1Button15", SWIG_From_int(static_cast< int >(Gosu::gp1Button15))); rb_define_const(mGosu, "Gp2Left", SWIG_From_int(static_cast< int >(Gosu::gp2Left))); rb_define_const(mGosu, "Gp2Right", SWIG_From_int(static_cast< int >(Gosu::gp2Right))); rb_define_const(mGosu, "Gp2Up", SWIG_From_int(static_cast< int >(Gosu::gp2Up))); rb_define_const(mGosu, "Gp2Down", SWIG_From_int(static_cast< int >(Gosu::gp2Down))); rb_define_const(mGosu, "Gp2Button0", SWIG_From_int(static_cast< int >(Gosu::gp2Button0))); rb_define_const(mGosu, "Gp2Button1", SWIG_From_int(static_cast< int >(Gosu::gp2Button1))); rb_define_const(mGosu, "Gp2Button2", SWIG_From_int(static_cast< int >(Gosu::gp2Button2))); rb_define_const(mGosu, "Gp2Button3", SWIG_From_int(static_cast< int >(Gosu::gp2Button3))); rb_define_const(mGosu, "Gp2Button4", SWIG_From_int(static_cast< int >(Gosu::gp2Button4))); rb_define_const(mGosu, "Gp2Button5", SWIG_From_int(static_cast< int >(Gosu::gp2Button5))); rb_define_const(mGosu, "Gp2Button6", SWIG_From_int(static_cast< int >(Gosu::gp2Button6))); rb_define_const(mGosu, "Gp2Button7", SWIG_From_int(static_cast< int >(Gosu::gp2Button7))); rb_define_const(mGosu, "Gp2Button8", SWIG_From_int(static_cast< int >(Gosu::gp2Button8))); rb_define_const(mGosu, "Gp2Button9", SWIG_From_int(static_cast< int >(Gosu::gp2Button9))); rb_define_const(mGosu, "Gp2Button10", SWIG_From_int(static_cast< int >(Gosu::gp2Button10))); rb_define_const(mGosu, "Gp2Button11", SWIG_From_int(static_cast< int >(Gosu::gp2Button11))); rb_define_const(mGosu, "Gp2Button12", SWIG_From_int(static_cast< int >(Gosu::gp2Button12))); rb_define_const(mGosu, "Gp2Button13", SWIG_From_int(static_cast< int >(Gosu::gp2Button13))); rb_define_const(mGosu, "Gp2Button14", SWIG_From_int(static_cast< int >(Gosu::gp2Button14))); rb_define_const(mGosu, "Gp2Button15", SWIG_From_int(static_cast< int >(Gosu::gp2Button15))); rb_define_const(mGosu, "Gp3Left", SWIG_From_int(static_cast< int >(Gosu::gp3Left))); rb_define_const(mGosu, "Gp3Right", SWIG_From_int(static_cast< int >(Gosu::gp3Right))); rb_define_const(mGosu, "Gp3Up", SWIG_From_int(static_cast< int >(Gosu::gp3Up))); rb_define_const(mGosu, "Gp3Down", SWIG_From_int(static_cast< int >(Gosu::gp3Down))); rb_define_const(mGosu, "Gp3Button0", SWIG_From_int(static_cast< int >(Gosu::gp3Button0))); rb_define_const(mGosu, "Gp3Button1", SWIG_From_int(static_cast< int >(Gosu::gp3Button1))); rb_define_const(mGosu, "Gp3Button2", SWIG_From_int(static_cast< int >(Gosu::gp3Button2))); rb_define_const(mGosu, "Gp3Button3", SWIG_From_int(static_cast< int >(Gosu::gp3Button3))); rb_define_const(mGosu, "Gp3Button4", SWIG_From_int(static_cast< int >(Gosu::gp3Button4))); rb_define_const(mGosu, "Gp3Button5", SWIG_From_int(static_cast< int >(Gosu::gp3Button5))); rb_define_const(mGosu, "Gp3Button6", SWIG_From_int(static_cast< int >(Gosu::gp3Button6))); rb_define_const(mGosu, "Gp3Button7", SWIG_From_int(static_cast< int >(Gosu::gp3Button7))); rb_define_const(mGosu, "Gp3Button8", SWIG_From_int(static_cast< int >(Gosu::gp3Button8))); rb_define_const(mGosu, "Gp3Button9", SWIG_From_int(static_cast< int >(Gosu::gp3Button9))); rb_define_const(mGosu, "Gp3Button10", SWIG_From_int(static_cast< int >(Gosu::gp3Button10))); rb_define_const(mGosu, "Gp3Button11", SWIG_From_int(static_cast< int >(Gosu::gp3Button11))); rb_define_const(mGosu, "Gp3Button12", SWIG_From_int(static_cast< int >(Gosu::gp3Button12))); rb_define_const(mGosu, "Gp3Button13", SWIG_From_int(static_cast< int >(Gosu::gp3Button13))); rb_define_const(mGosu, "Gp3Button14", SWIG_From_int(static_cast< int >(Gosu::gp3Button14))); rb_define_const(mGosu, "Gp3Button15", SWIG_From_int(static_cast< int >(Gosu::gp3Button15))); // Call srand() so that Gosu::random() is actually random in Ruby scripts std::srand(static_cast(std::time(0))); std::rand(); // and flush the first value rb_define_module_function(mGosu, "disown_TextInput", VALUEFUNC(_wrap_disown_TextInput), -1); SwigClassTextInput.klass = rb_define_class_under(mGosu, "TextInput", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_Gosu__TextInput, (void *) &SwigClassTextInput); rb_define_alloc_func(SwigClassTextInput.klass, _wrap_TextInput_allocate); rb_define_method(SwigClassTextInput.klass, "initialize", VALUEFUNC(_wrap_new_TextInput), -1); rb_define_method(SwigClassTextInput.klass, "text", VALUEFUNC(_wrap_TextInput_text), -1); rb_define_method(SwigClassTextInput.klass, "text=", VALUEFUNC(_wrap_TextInput_texte___), -1); rb_define_method(SwigClassTextInput.klass, "caret_pos=", VALUEFUNC(_wrap_TextInput_caret_pose___), -1); rb_define_method(SwigClassTextInput.klass, "selection_start=", VALUEFUNC(_wrap_TextInput_selection_starte___), -1); rb_define_method(SwigClassTextInput.klass, "filter", VALUEFUNC(_wrap_TextInput_filter), -1); rb_define_method(SwigClassTextInput.klass, "caret_pos", VALUEFUNC(_wrap_TextInput_caret_pos), -1); rb_define_method(SwigClassTextInput.klass, "selection_start", VALUEFUNC(_wrap_TextInput_selection_start), -1); SwigClassTextInput.mark = 0; SwigClassTextInput.destroy = (void (*)(void *)) free_Gosu_TextInput; SwigClassTextInput.trackObjects = 1; rb_define_module_function(mGosu, "screen_width", VALUEFUNC(_wrap_screen_width), -1); rb_define_module_function(mGosu, "screen_height", VALUEFUNC(_wrap_screen_height), -1); rb_define_module_function(mGosu, "available_width", VALUEFUNC(_wrap_available_width), -1); rb_define_module_function(mGosu, "available_height", VALUEFUNC(_wrap_available_height), -1); rb_define_module_function(mGosu, "disown_Window", VALUEFUNC(_wrap_disown_Window), -1); SwigClassWindow.klass = rb_define_class_under(mGosu, "Window", rb_cObject); SWIG_TypeClientData(SWIGTYPE_p_Gosu__Window, (void *) &SwigClassWindow); rb_define_alloc_func(SwigClassWindow.klass, _wrap_Window_allocate); rb_define_method(SwigClassWindow.klass, "initialize", VALUEFUNC(_wrap_new_Window), -1); rb_define_method(SwigClassWindow.klass, "caption", VALUEFUNC(_wrap_Window_caption), -1); rb_define_method(SwigClassWindow.klass, "caption=", VALUEFUNC(_wrap_Window_captione___), -1); rb_define_method(SwigClassWindow.klass, "update_interval", VALUEFUNC(_wrap_Window_update_interval), -1); rb_define_method(SwigClassWindow.klass, "show", VALUEFUNC(_wrap_Window_show), -1); rb_define_method(SwigClassWindow.klass, "tick", VALUEFUNC(_wrap_Window_tick), -1); rb_define_method(SwigClassWindow.klass, "close", VALUEFUNC(_wrap_Window_close), -1); rb_define_method(SwigClassWindow.klass, "update", VALUEFUNC(_wrap_Window_update), -1); rb_define_method(SwigClassWindow.klass, "draw", VALUEFUNC(_wrap_Window_draw), -1); rb_define_method(SwigClassWindow.klass, "needs_redraw?", VALUEFUNC(_wrap_Window_needs_redrawq___), -1); rb_define_method(SwigClassWindow.klass, "needs_cursor?", VALUEFUNC(_wrap_Window_needs_cursorq___), -1); rb_define_method(SwigClassWindow.klass, "lose_focus", VALUEFUNC(_wrap_Window_lose_focus), -1); rb_define_method(SwigClassWindow.klass, "release_memory", VALUEFUNC(_wrap_Window_release_memory), -1); rb_define_method(SwigClassWindow.klass, "button_down", VALUEFUNC(_wrap_Window_button_down), -1); rb_define_method(SwigClassWindow.klass, "button_up", VALUEFUNC(_wrap_Window_button_up), -1); rb_define_method(SwigClassWindow.klass, "text_input", VALUEFUNC(_wrap_Window_text_input), -1); rb_define_method(SwigClassWindow.klass, "text_input=", VALUEFUNC(_wrap_Window_text_inpute___), -1); rb_define_method(SwigClassWindow.klass, "mouse_x", VALUEFUNC(_wrap_Window_mouse_x), -1); rb_define_method(SwigClassWindow.klass, "mouse_y", VALUEFUNC(_wrap_Window_mouse_y), -1); rb_define_method(SwigClassWindow.klass, "set_mouse_position", VALUEFUNC(_wrap_Window_set_mouse_position), -1); rb_define_method(SwigClassWindow.klass, "mouse_x=", VALUEFUNC(_wrap_Window_mouse_xe___), -1); rb_define_method(SwigClassWindow.klass, "mouse_y=", VALUEFUNC(_wrap_Window_mouse_ye___), -1); rb_define_method(SwigClassWindow.klass, "width", VALUEFUNC(_wrap_Window_width), -1); rb_define_method(SwigClassWindow.klass, "height", VALUEFUNC(_wrap_Window_height), -1); rb_define_method(SwigClassWindow.klass, "fullscreen?", VALUEFUNC(_wrap_Window_fullscreenq___), -1); SwigClassWindow.mark = (void (*)(void *)) markWindow; SwigClassWindow.destroy = (void (*)(void *)) free_Gosu_Window; SwigClassWindow.trackObjects = 1; rb_define_module_function(mGosu, "char_to_button_id", VALUEFUNC(_wrap_char_to_button_id), -1); rb_define_module_function(mGosu, "button_id_to_char", VALUEFUNC(_wrap_button_id_to_char), -1); rb_define_module_function(mGosu, "button_down?", VALUEFUNC(_wrap_button_downq___), -1); rb_define_module_function(mGosu, "draw_line", VALUEFUNC(_wrap_draw_line), -1); rb_define_module_function(mGosu, "draw_triangle", VALUEFUNC(_wrap_draw_triangle), -1); rb_define_module_function(mGosu, "draw_quad", VALUEFUNC(_wrap_draw_quad), -1); rb_define_module_function(mGosu, "draw_rect", VALUEFUNC(_wrap_draw_rect), -1); rb_define_module_function(mGosu, "flush", VALUEFUNC(_wrap_flush), -1); rb_define_module_function(mGosu, "unsafe_gl", VALUEFUNC(_wrap_unsafe_gl), -1); rb_define_module_function(mGosu, "clip_to", VALUEFUNC(_wrap_clip_to), -1); rb_define_module_function(mGosu, "record", VALUEFUNC(_wrap_record), -1); rb_define_module_function(mGosu, "transform", VALUEFUNC(_wrap_transform), -1); rb_define_module_function(mGosu, "rotate", VALUEFUNC(_wrap_rotate), -1); rb_define_module_function(mGosu, "scale", VALUEFUNC(_wrap_scale), -1); rb_define_module_function(mGosu, "translate", VALUEFUNC(_wrap_translate), -1); }