Lines Matching defs:api

55 	api=None
152 #return [(name, api)] + ([(alias, api)] if alias is not None else [])
157 return [(item.get('name'), item.get('api'))]
169 return [(item.get('name') or item.findtext('name'), item.get('api'))]
173 name, api, alias = (item.get(attrib) for attrib in ['name', 'api', 'alias'])
175 #return [(name, api)] + ([(alias, api)] if alias is not None else [])
176 return [(name, api)]
179 (name, api) = nameapipair
198 self.apis.setdefault(eFeature.get('api'), []).append(eFeature)
204 def getFeatures(self, api, checkVersion=None):
205 return [eFeature for eFeature in self.apis[api]
235 def extensionSupports(eExtension, api, profile=None):
236 if api == 'gl' and profile == 'core':
239 needSupport = api
267 def addComponents(self, elem, api, profile=None):
269 cApi = eComponent.get('api')
271 if (matchApi(api, eComponent.get('api')) and
275 def addFeature(self, eFeature, api=None, profile=None, force=False):
277 if not matchApi(api, eFeature.get('api')):
279 warnElem(eFeature, 'API %s is not supported', api)
280 self.addComponents(eFeature, api, profile)
283 def addExtension(self, eExtension, api=None, profile=None, force=False):
284 if not extensionSupports(eExtension, api, profile):
286 warnElem(eExtension, '%s is not supported in API %s' % (getExtensionName(eExtension), api))
287 self.addComponents(eExtension, api, profile)
289 def createInterface(registry, spec, api=None):
299 api=eType.get('api'),
305 return parseType(registry.types[name, api])
311 return parseEnum(registry.enums[enumName, api])
420 def spec(registry, api, version=None, profile=None, extensionNames=[], protects=[], force=False):
432 # spec.addComponents(registry.types, api, profile)
434 for eFeature in registry.getFeatures(api, check):
435 spec.addFeature(eFeature, api, profile, force)
444 spec.addExtension(eExtension, api, profile, force)
449 def interface(registry, api, **kwargs):
450 s = spec(registry, api, **kwargs)
451 return createInterface(registry, s, api)