本文整理汇总了Python中specs.stdapi.API类的典型用法代码示例。如果您正苦于以下问题:Python API类的具体用法?Python API怎么用?Python API使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了API类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: main
def main():
print r'#define INITGUID'
print
print r'#include <string.h>'
print
print r'#include <iostream>'
print
print r'#include "d3dretrace.hpp"'
print r'#include "os_version.hpp"'
print
print r'#include "d3dretrace_dxgi.hpp"'
print r'#include "d3d10imports.hpp"'
print r'#include "d3d10size.hpp"'
print r'#include "d3d10state.hpp"'
print r'#include "d3d11imports.hpp"'
print r'#include "d3d11size.hpp"'
print r'#include "dcompimports.hpp"'
print r'#include "d3dstate.hpp"'
print r'#include "d3d9imports.hpp" // D3DERR_WASSTILLDRAWING'
print
print '''static d3dretrace::D3DDumper<IDXGISwapChain> dxgiDumper;'''
print '''static d3dretrace::D3DDumper<ID3D10Device> d3d10Dumper;'''
print '''static d3dretrace::D3DDumper<ID3D11DeviceContext> d3d11Dumper;'''
print
api = API()
api.addModule(dxgi)
api.addModule(d3d10)
api.addModule(d3d10_1)
api.addModule(d3d11)
api.addModule(dcomp)
retracer = D3DRetracer()
retracer.retraceApi(api)
开发者ID:janesma,项目名称:apitrace,代码行数:34,代码来源:dxgiretrace.py
示例2: main
def main():
print r"#define INITGUID"
print
print r"#include <string.h>"
print
print r"#include <iostream>"
print
print r'#include "d3dretrace.hpp"'
print r'#include "os_version.hpp"'
print
print r'#include "d3dretrace_dxgi.hpp"'
print r'#include "d3d10imports.hpp"'
print r'#include "d3d10size.hpp"'
print r'#include "d3d10state.hpp"'
print r'#include "d3d11imports.hpp"'
print r'#include "d3d11size.hpp"'
print r'#include "d3dstate.hpp"'
print
print """static d3dretrace::D3DDumper<IDXGISwapChain> dxgiDumper;"""
print """static d3dretrace::D3DDumper<ID3D10Device> d3d10Dumper;"""
print """static d3dretrace::D3DDumper<ID3D11DeviceContext> d3d11Dumper;"""
print
api = API()
api.addModule(dxgi)
api.addModule(d3d10)
api.addModule(d3d10_1)
api.addModule(d3d11)
retracer = D3DRetracer()
retracer.retraceApi(api)
开发者ID:hramrach,项目名称:apitrace,代码行数:31,代码来源:dxgiretrace.py
示例3: main
def main():
print r'#define INITGUID'
print
print r'#include <string.h>'
print
print r'#include <iostream>'
print
print r'#include "d3dretrace.hpp"'
print r'#include "os_version.hpp"'
print
moduleNames = sys.argv[1:]
api = API()
if moduleNames:
print r'#include "d3dretrace_dxgi.hpp"'
print r'#include "d3d10imports.hpp"'
print r'#include "d3d10size.hpp"'
print r'#include "d3d10state.hpp"'
print r'#include "d3d11imports.hpp"'
print r'#include "d3d11size.hpp"'
print r'#include "d3dstate.hpp"'
print
print '''static d3dretrace::D3DDumper<IDXGISwapChain> dxgiDumper;'''
print '''static d3dretrace::D3DDumper<ID3D10Device> d3d10Dumper;'''
print '''static d3dretrace::D3DDumper<ID3D11DeviceContext> d3d11Dumper;'''
print
print r'''
static void
createWindow(DXGI_SWAP_CHAIN_DESC *pSwapChainDesc) {
UINT Width = pSwapChainDesc->BufferDesc.Width;
UINT Height = pSwapChainDesc->BufferDesc.Height;
if (!Width) Width = 1024;
if (!Height) Height = 768;
if (retrace::forceWindowed) {
pSwapChainDesc->Windowed = TRUE;
}
pSwapChainDesc->OutputWindow = d3dretrace::createWindow(Width, Height);
}
'''
api.addModule(dxgi)
api.addModule(d3d10)
api.addModule(d3d10_1)
api.addModule(d3d11)
retracer = D3DRetracer()
retracer.retraceApi(api)
开发者ID:mcleary,项目名称:apitrace,代码行数:49,代码来源:dxgiretrace.py
示例4: main
def main():
print r'#include <string.h>'
print
print r'#include <iostream>'
print
print r'#include "d3dretrace.hpp"'
print
api = API()
print r'#include "d3dimports.hpp"'
api.addModule(ddraw)
print
print '''static d3dretrace::D3DDumper<IDirect3DDevice7> d3d7Dumper;'''
print
retracer = D3DRetracer()
retracer.table_name = 'd3dretrace::ddraw_callbacks'
retracer.retraceApi(api)
开发者ID:Dhanasekahar,项目名称:apitrace,代码行数:19,代码来源:ddrawretrace.py
示例5: main
def main():
print r'#define INITGUID'
print
print r'#include <string.h>'
print
print r'#include <iostream>'
print
print r'#include "d3dretrace.hpp"'
print
moduleNames = sys.argv[1:]
api = API()
if moduleNames:
print r'#include "d3dretrace_dxgi.hpp"'
api.addModule(dxgi)
if 'd3d10' in moduleNames:
if 'd3d10_1' in moduleNames:
print r'#include "d3d10_1imports.hpp"'
api.addModule(d3d10_1)
else:
print r'#include "d3d10imports.hpp"'
print r'#include "d3d10size.hpp"'
api.addModule(d3d10)
print
print '''static d3dretrace::D3DDumper<ID3D10Device> d3d10Dumper;'''
print
if 'd3d11' in moduleNames:
print r'#include "d3d11imports.hpp"'
if 'd3d11_1' in moduleNames:
print '#include <d3d11_1.h>'
import specs.d3d11_1
print r'#include "d3d11size.hpp"'
print r'#include "d3dstate.hpp"'
api.addModule(d3d11)
print
print '''static d3dretrace::D3DDumper<ID3D11DeviceContext> d3d11Dumper;'''
print
retracer = D3DRetracer()
retracer.retraceApi(api)
开发者ID:perftrace,项目名称:apitrace,代码行数:45,代码来源:dxgiretrace.py
示例6: main
def main():
print r'#include <string.h>'
print
print r'#include <iostream>'
print
print r'#include "d3dretrace.hpp"'
print
moduleName = sys.argv[1]
support = int(sys.argv[2])
api = API()
if support:
if moduleName == 'd3d9':
from specs.d3d9 import d3d9, d3dperf
print r'#include "d3d9imports.hpp"'
print r'#include "d3d9size.hpp"'
d3d9.mergeModule(d3dperf)
api.addModule(d3d9)
print
print '''static d3dretrace::D3DDumper<IDirect3DDevice9> d3d9Dumper;'''
print
elif moduleName == 'd3d8':
from specs.d3d8 import d3d8
print r'#include "d3d8imports.hpp"'
print r'#include "d3d8size.hpp"'
api.addModule(d3d8)
print
print '''static d3dretrace::D3DDumper<IDirect3DDevice8> d3d8Dumper;'''
print
else:
assert False
retracer = D3DRetracer()
retracer.table_name = 'd3dretrace::%s_callbacks' % moduleName
retracer.retraceApi(api)
开发者ID:galek,项目名称:apitrace,代码行数:37,代码来源:d3d9retrace.py
示例7: main
def main():
print r'#define INITGUID'
print
print r'#include <string.h>'
print
print r'#include <iostream>'
print
print r'#include "d3dretrace.hpp"'
print r'#include "os_version.hpp"'
print
moduleNames = sys.argv[1:]
api = API()
if moduleNames:
print r'#include "d3dretrace_dxgi.hpp"'
print r'#include "d3d10imports.hpp"'
print r'#include "d3d10size.hpp"'
print r'#include "d3d10state.hpp"'
print r'#include "d3d11imports.hpp"'
print r'#include "d3d11size.hpp"'
print r'#include "d3dstate.hpp"'
print
print '''static d3dretrace::D3DDumper<IDXGISwapChain> dxgiDumper;'''
print '''static d3dretrace::D3DDumper<ID3D10Device> d3d10Dumper;'''
print '''static d3dretrace::D3DDumper<ID3D11DeviceContext> d3d11Dumper;'''
print
api.addModule(dxgi)
api.addModule(d3d10)
api.addModule(d3d10_1)
api.addModule(d3d11)
retracer = D3DRetracer()
retracer.retraceApi(api)
开发者ID:AheadIO,项目名称:apitrace,代码行数:36,代码来源:dxgiretrace.py
示例8: main
def main():
print r"#include <string.h>"
print
print r"#include <iostream>"
print
print r'#include "d3dretrace.hpp"'
print
moduleName = sys.argv[1]
support = int(sys.argv[2])
api = API()
if support:
if moduleName == "d3d9":
from specs.d3d9 import d3d9, d3dperf
from specs.dxva2 import dxva2
print r'#include "d3d9imports.hpp"'
print r'#include "d3d9size.hpp"'
print r'#include "dxva2imports.hpp"'
d3d9.mergeModule(d3dperf)
api.addModule(d3d9)
api.addModule(dxva2)
print
print """static d3dretrace::D3DDumper<IDirect3DDevice9> d3d9Dumper;"""
print """static d3dretrace::D3DDumper<IDirect3DSwapChain9> d3d9scDumper;"""
print
elif moduleName == "d3d8":
from specs.d3d8 import d3d8
print r'#include "d3d8imports.hpp"'
print r'#include "d3d8size.hpp"'
api.addModule(d3d8)
print
print """static d3dretrace::D3DDumper<IDirect3DDevice8> d3d8Dumper;"""
print
else:
assert False
retracer = D3DRetracer()
retracer.table_name = "d3dretrace::%s_callbacks" % moduleName
retracer.retraceApi(api)
开发者ID:schulmar,项目名称:apitrace,代码行数:43,代码来源:d3d9retrace.py
示例9: API
print ' } else {'
print ' _MapDesc.pData = NULL;'
print ' _MapDesc.Size = 0;'
print ' }'
#print r' os::log("%%p <- %%p+%%lu\n", %s,_MapDesc.pData, (unsigned long)_MapDesc.Size);' % pResource
print ' %s->_MapDesc = _MapDesc;' % pResource
if __name__ == '__main__':
print r'#define INITGUID'
print
print r'#include "trace_writer_local.hpp"'
print r'#include "os.hpp"'
print
print r'#include "d3dcommonshader.hpp"'
print
print r'#include "d3d10imports.hpp"'
print r'#include "d3d10size.hpp"'
print r'#include "d3d11imports.hpp"'
print r'#include "d3d11size.hpp"'
print
api = API()
api.addModule(dxgi.dxgi)
api.addModule(d3d10.d3d10)
api.addModule(d3d10_1.d3d10_1)
api.addModule(d3d11.d3d11)
tracer = D3DCommonTracer()
tracer.traceApi(api)
开发者ID:asloobq,项目名称:apitrace,代码行数:30,代码来源:dxgitrace.py
示例10: __unwrap_proc_addr
print '#endif'
print '#include <dlfcn.h>'
print
print '#include "trace_writer_local.hpp"'
print
print '// To validate our prototypes'
print '#define GL_GLEXT_PROTOTYPES'
print '#define GLX_GLXEXT_PROTOTYPES'
print
print '#include "glproc.hpp"'
print '#include "glsize.hpp"'
print
print 'static __GLXextFuncPtr __unwrap_proc_addr(const GLubyte * procName, __GLXextFuncPtr procPtr);'
print
api = API()
api.addApi(glxapi)
api.addApi(glapi)
tracer = GlxTracer()
tracer.trace_api(api)
print 'static __GLXextFuncPtr __unwrap_proc_addr(const GLubyte * procName, __GLXextFuncPtr procPtr) {'
print ' if (!procPtr) {'
print ' return procPtr;'
print ' }'
for f in api.functions:
ptype = function_pointer_type(f)
pvalue = function_pointer_value(f)
print ' if (strcmp("%s", (const char *)procName) == 0) {' % f.name
print ' %s = (%s)procPtr;' % (pvalue, ptype)
print ' return (__GLXextFuncPtr)&%s;' % (f.name,)
开发者ID:berkus,项目名称:apitrace,代码行数:31,代码来源:glxtrace.py
示例11: Module
print '#include <dlfcn.h>'
print
print '#include "trace_writer_local.hpp"'
print
print '// To validate our prototypes'
print '#define GL_GLEXT_PROTOTYPES'
print '#define GLX_GLXEXT_PROTOTYPES'
print
print '#include "glproc.hpp"'
print '#include "glsize.hpp"'
print
module = Module()
module.mergeModule(glxapi)
module.mergeModule(glapi)
api = API()
api.addModule(module)
tracer = GlxTracer()
tracer.traceApi(api)
print r'''
/*
* Invoke the true dlopen() function.
*/
static void *_dlopen(const char *filename, int flag)
{
typedef void * (*PFN_DLOPEN)(const char *, int);
static PFN_DLOPEN dlopen_ptr = NULL;
开发者ID:PeterLValve,项目名称:apitrace,代码行数:30,代码来源:glxtrace.py
示例12: API
# all OpenGL symbols are visible on MacOSX
return True
if __name__ == '__main__':
print
print '#include <stdlib.h>'
print '#include <string.h>'
print
print '#include "trace_writer_local.hpp"'
print
print '// To validate our prototypes'
print '#define GL_GLEXT_PROTOTYPES'
print
print '#include "glproc.hpp"'
print '#include "glsize.hpp"'
print
api = API()
api.addApi(cglapi)
api.addApi(glapi)
tracer = CglTracer()
tracer.traceApi(api)
print r'''
PUBLIC
void * gll_noop = 0;
'''
开发者ID:netconstructor,项目名称:apitrace,代码行数:30,代码来源:cgltrace.py
示例13: API
print ' _MappedSize = 0;'
print ' }'
if __name__ == '__main__':
print '#define INITGUID'
print
print '#include "trace_writer_local.hpp"'
print '#include "os.hpp"'
print
print '#include "d3dcommonshader.hpp"'
print
moduleNames = sys.argv[1:]
api = API()
if moduleNames:
api.addModule(dxgi)
if 'd3d10' in moduleNames:
if 'd3d10_1' in moduleNames:
print r'#include "d3d10_1imports.hpp"'
api.addModule(d3d10_1)
else:
print r'#include "d3d10imports.hpp"'
print r'#include "d3d10size.hpp"'
api.addModule(d3d10)
if 'd3d11' in moduleNames:
print r'#include "d3d11imports.hpp"'
开发者ID:chiehwen,项目名称:apitrace,代码行数:31,代码来源:dxgitrace.py
示例14: handle_default
def handle_default():
print ' os::log("apitrace: warning: unknown function \\"%s\\"\\n", lpszProc);'
string_switch('lpszProc', func_dict.keys(), handle_case, handle_default)
print ' }'
if __name__ == '__main__':
print
print '#define _GDI32_'
print
print '#include <string.h>'
print '#include <windows.h>'
print
print '#include "trace_writer_local.hpp"'
print '#include "os.hpp"'
print
print '// To validate our prototypes'
print '#define GL_GLEXT_PROTOTYPES'
print '#define WGL_GLXEXT_PROTOTYPES'
print
print '#include "glproc.hpp"'
print '#include "glsize.hpp"'
print
api = API()
api.add_api(glapi)
api.add_api(wglapi)
tracer = WglTracer()
tracer.trace_api(api)
开发者ID:kalyankondapally,项目名称:apitrace,代码行数:29,代码来源:wgltrace.py
示例15: __unwrap_proc_addr
print '#endif'
print '#include <dlfcn.h>'
print
print '#include "trace_writer_local.hpp"'
print
print '// To validate our prototypes'
print '#define GL_GLEXT_PROTOTYPES'
print '#define GLX_GLXEXT_PROTOTYPES'
print
print '#include "glproc.hpp"'
print '#include "glsize.hpp"'
print
print 'static __GLXextFuncPtr __unwrap_proc_addr(const GLubyte * procName, __GLXextFuncPtr procPtr);'
print
api = API()
api.add_api(glxapi)
api.add_api(glapi)
tracer = GlxTracer()
tracer.trace_api(api)
print 'static __GLXextFuncPtr __unwrap_proc_addr(const GLubyte * procName, __GLXextFuncPtr procPtr) {'
print ' if (!procPtr) {'
print ' return procPtr;'
print ' }'
for f in api.functions:
ptype = function_pointer_type(f)
pvalue = function_pointer_value(f)
print ' if (strcmp("%s", (const char *)procName) == 0) {' % f.name
print ' %s = (%s)procPtr;' % (pvalue, ptype)
print ' return (__GLXextFuncPtr)&%s;' % (f.name,)
开发者ID:kalyankondapally,项目名称:apitrace,代码行数:31,代码来源:glxtrace.py
示例16: API
print r' }'
if __name__ == '__main__':
print r'#include "guids_defs.hpp"'
print
print r'#include "trace_writer_local.hpp"'
print r'#include "os.hpp"'
print
print r'#include "d3dcommonshader.hpp"'
print
print r'#include "d3d10imports.hpp"'
print r'#include "d3d10size.hpp"'
print r'#include "d3d11imports.hpp"'
print r'#include "d3d11size.hpp"'
print r'#include "dcompimports.hpp"'
print r'#include "d2dimports.hpp" // WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT'
print r'#include "d3d9imports.hpp" // D3DPERF_*'
print
api = API()
api.addModule(dxgi.dxgi)
api.addModule(d3d10.d3d10)
api.addModule(d3d10.d3d10_1)
api.addModule(d3d11.d3d11)
api.addModule(dcomp.dcomp)
api.addModule(d3d9.d3dperf)
tracer = D3DCommonTracer()
tracer.traceApi(api)
开发者ID:qingxbl,项目名称:apitrace,代码行数:30,代码来源:dxgitrace.py
示例17: API
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
##########################################################################/
from dlltrace import DllTracer
from specs.stdapi import API
from specs.dwrite import dwrite
from specs.d2d1 import d2d1
if __name__ == '__main__':
print '#include "guids_defs.hpp"'
print
print '#include "trace_writer_local.hpp"'
print '#include "os.hpp"'
print
print '#define DWRITE_EXPORT WINAPI'
print
print '#include "d2dimports.hpp"'
print
api = API()
api.addModule(d2d1)
api.addModule(dwrite)
tracer = DllTracer()
tracer.traceApi(api)
开发者ID:Dhanasekahar,项目名称:apitrace,代码行数:30,代码来源:d2d1trace.py
示例18: if
print ' _MappedData[Level] = std::make_pair(mappedSize, pbData);'
print ' } else {'
print ' _MappedData.erase(Level);'
print ' }'
else:
# FIXME: handle recursive locks
print ' if (SUCCEEDED(_result) && !(Flags & D3DLOCK_READONLY)) {'
print ' _getMapInfo(_this, %s, m_pbData, _MappedSize);' % ', '.join(method.argNames()[:-1])
print ' } else {'
print ' m_pbData = NULL;'
print ' _MappedSize = 0;'
print ' }'
if __name__ == '__main__':
print '#define INITGUID'
print
print '#include "trace_writer_local.hpp"'
print '#include "os.hpp"'
print
print '#include "d3d9imports.hpp"'
print '#include "d3d9size.hpp"'
print '#include "d3d9shader.hpp"'
print '#include "dxvaint.h"'
print
api = API()
api.addModule(d3d9)
tracer = D3D9Tracer()
tracer.traceApi(api)
开发者ID:AheadIO,项目名称:apitrace,代码行数:30,代码来源:d3d9trace.py
示例19: Module
# if REGAL_SYS_GLX
# undef REGAL_SYS_GLX
# define REGAL_SYS_GLX 0
# endif
#endif
'''
cglmodule = Module('cgl')
cglmodule.mergeModule(cglapi)
eglmodule = Module('egl')
eglmodule.mergeModule(eglapi)
glxmodule = Module('glx')
glxmodule.mergeModule(glxapi)
wglmodule = Module('wgl')
wglmodule.mergeModule(wglapi)
gfxmodule = Module('gfx')
gfxmodule.mergeModule(glapi)
gfxmodule.mergeModule(glesapi)
api = API()
api.addModule(gfxmodule)
api.addModule(cglmodule)
api.addModule(eglmodule)
api.addModule(glxmodule)
api.addModule(wglmodule)
tracer = RegalTracer()
tracer.traceApi(api)
开发者ID:Shalmezad,项目名称:regal,代码行数:28,代码来源:regaltrace.py
示例20: if
print ' if (_result) {'
print ' if (hglrc != NULL)'
print ' gltrace::setContext((uintptr_t)hglrc);'
print ' else'
print ' gltrace::clearContext();'
print ' }'
if __name__ == '__main__':
print
print '#define _GDI32_'
print
print '#include <string.h>'
print '#include <windows.h>'
print
print '#include "trace_writer_local.hpp"'
print '#include "os.hpp"'
print
print '// To validate our prototypes'
print '#define GL_GLEXT_PROTOTYPES'
print '#define WGL_GLXEXT_PROTOTYPES'
print
print '#include "glproc.hpp"'
print '#include "glsize.hpp"'
print
api = API()
api.addApi(glapi)
api.addApi(wglapi)
tracer = WglTracer()
tracer.traceApi(api)
开发者ID:RAOF,项目名称:apitrace,代码行数:30,代码来源:wgltrace.py
注:本文中的specs.stdapi.API类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论