1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
|
# format: class : {method : (prototype1, prototype2)}
# using a "*" means all prototypes
ignored_methods = {
"wxIcon": {'wxIcon': (['const char', 'int', 'int'], )},
}
# these classes are either replaced by different data types in bindings, or have equivalent / better
# functionality provided by the target language.
excluded_classes = [
"wxAny",
"wxAnyValueType",
"wxArchiveClassFactory",
"wxArchiveEntry",
"wxArchiveInputStream",
"wxArchiveIterator",
"wxArchiveNotifier",
"wxArchiveOutputStream",
"wxArray< T >",
"wxArrayString",
"wxAutomationObject",
"wxBufferedInputStream",
"wxBufferedOutputStream",
"wxCharBuffer",
"wxCharTypeBuffer",
"wxClassInfo",
"wxCmdLineParser",
"wxCondition",
"wxConnection",
"wxConnectionBase",
"wxConvAuto",
"wxCountingOutputStream",
"wxCriticalSection",
"wxCriticalSectionLocker",
"wxCSConv",
"wxDatagramSocket",
"wxDataInputStream",
"wxDataOutputStream",
"wxDir",
"wxDirTraverser",
"wxFFile",
"wxFFileInputStream",
"wxFFileOutputStream",
"wxFile",
"wxFileInputStream",
"wxFileName",
"wxFileOutputStream",
"wxFileStream",
"wxFilterClassFactory",
"wxFilterInputStream",
"wxFilterOutputStream",
"wxFSFile",
"wxFSVolume",
"wxFTP",
"wxHashMap",
"wxHashSet",
"wxHashTable",
"wxHTTP",
"wxImage::HSVValue",
"wxImage::RGBValue",
"wxInputStream",
"wxIPAddress",
"wxIPV4Address",
"wxList< T >",
"wxLongLong",
"wxMBConv",
"wxMBConvFile",
"wxMBConvUTF7",
"wxMBConvUTF8",
"wxMBConvUTF16",
"wxMBConvUTF32",
"wxMemoryBuffer",
"wxMemoryFSHandler",
"wxMemoryInputStream",
"wxMemoryOutputStream",
"wxMessageQueue< T >",
"wxModule",
"wxMutex",
"wxMutexLocker",
"wxNode< T >",
"wxObjectDataPtr< T >",
"wxObjectRefData",
"wxOutputStream",
"wxProcess",
"wxProcessEvent",
"wxProtocol",
"wxProtocolLog",
"wxRecursionGuard",
"wxRecursionGuardFlag",
"wxRegKey",
"wxScopedArray",
"wxScopedCharTypeBuffer",
"wxScopedPtr",
"wxScopedPtr< T >",
"wxSharedPtr< T >",
"wxServer",
"wxSockAddress",
"wxSocketBase",
"wxSocketClient",
"wxSocketEvent",
"wxSocketInputStream",
"wxSocketOutputStream",
"wxSortedArrayString",
"wxStopWatch",
"wxStreamBase",
"wxStreamBuffer",
"wxStreamToTextRedirector",
"wxString",
"wxStringBuffer",
"wxStringBufferLength",
"wxStringClientData",
"wxStringInputStream",
"wxStringOutputStream",
"wxTarClassFactory",
"wxTarEntry",
"wxTarInputStream",
"wxTarOutputStream",
"wxTCPClient",
"wxTCPConnection",
"wxTCPServer",
"wxTempFile",
"wxTempFileOutputStream",
"wxTextInputStream",
"wxTextOutputStream",
"wxThread",
"wxThreadEvent",
"wxThreadHelper",
"wxULongLong",
"wxUniChar",
"wxUniCharRef",
"wxURI",
"wxURL",
"wxUString",
"wxVariant",
"wxVariantData",
"wxVector< T >",
"wxVector< T >::reverse_iterator",
"wxWCharBuffer",
"wxWeakRef< T >",
"wxWeakRefDynamic< T >",
"wxZipInputStream",
"wxZipOutputStream",
"wxZlibInputStream",
"wxZlibOutputStream",
]
def get_first_value(alist):
if len(alist) > 0:
return alist[0]
else:
return ""
def make_enums(aclass):
retval = ""
for enum in aclass.enums:
retval += "enum %s {\n" % enum
num_values = len(aclass.enums[enum])
for value in aclass.enums[enum]:
retval += " %s" % value
if not value == aclass.enums[enum][-1]:
retval += ", "
retval += "\n"
retval += "};\n\n"
return retval
|