-])
-
-
-class Dispatcher:
-
- def header(self):
- pass
- #print 'typedef void (*__PROC)(void);'
- #print
- #print 'static __PROC __getPublicProcAddress(const char *name);'
- #print 'static __PROC __getPrivateProcAddress(const char *name);'
- #print
-
- def dispatch_api(self, api):
- for function in api.functions:
- dispatcher.dispatch_function(function)
-
- print '#ifdef RETRACE'
- for function in api.functions:
- if not self.is_public_function(function):
- print '#define %s __%s' % (function.name, function.name)
- print '#endif /* RETRACE */'
- print
-
- def function_pointer_type(self, function):
- return '__PFN' + function.name.upper()
-
- def function_pointer_value(self, function):
- return '__' + function.name + '_ptr'
-
- def dispatch_function(self, function):
- if self.is_public_function(function):
- print '#ifndef RETRACE'
- print
- ptype = self.function_pointer_type(function)
- pvalue = self.function_pointer_value(function)
- print 'typedef ' + function.prototype('* %s' % ptype) + ';'
- print 'static %s %s = NULL;' % (ptype, pvalue)
- print
- print 'static inline ' + function.prototype('__' + function.name) + ' {'
- if function.type is stdapi.Void:
- ret = ''
- else:
- ret = 'return '
- self.get_true_pointer(function)
- pvalue = self.function_pointer_value(function)
- print ' %s%s(%s);' % (ret, pvalue, ', '.join([str(arg.name) for arg in function.args]))
- print '}'
- print
- if self.is_public_function(function):
- print '#endif /* !RETRACE */'
- print
-
- def is_public_function(self, function):
- return True
+
+ # WGL
+ #"glDebugEntry",
+ "wglChoosePixelFormat",
+ "wglCopyContext",
+ "wglCreateContext",
+ "wglCreateLayerContext",
+ "wglDeleteContext",
+ "wglDescribeLayerPlane",
+ "wglDescribePixelFormat",
+ "wglGetCurrentContext",
+ "wglGetCurrentDC",
+ "wglGetDefaultProcAddress",
+ "wglGetLayerPaletteEntries",
+ "wglGetPixelFormat",
+ "wglGetProcAddress",
+ "wglMakeCurrent",
+ "wglRealizeLayerPalette",
+ "wglSetLayerPaletteEntries",
+ "wglSetPixelFormat",
+ "wglShareLists",
+ "wglSwapBuffers",
+ "wglSwapLayerBuffers",
+ "wglSwapMultipleBuffers",
+ "wglUseFontBitmapsA",
+ "wglUseFontBitmapsW",
+ "wglUseFontOutlinesA",
+ "wglUseFontOutlinesW",