• Home
  • Raw
  • Download

Lines Matching +full:api +full:- +full:name

1 # -*- coding: utf-8 -*-
3 #-------------------------------------------------------------------------
5 # --------------------------------------
13 # http://www.apache.org/licenses/LICENSE-2.0
21 #-------------------------------------------------------------------------
35 …warning('%s:%d, %s %s: ' + fmt, elem.base, elem.sourceline, elem.tag, elem.get('name') or '', *arg…
47 name = None variable in Enums
53 name=None variable in Type
55 api=None variable in Type
59 kwargs.setdefault('name', elem.get('name'))
74 name=None variable in Command
144 return [item.get('name')]
152 #return [(name, api)] + ([(alias, api)] if alias is not None else [])
153 return [item.findtext('proto/name')]
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
180 if name == item.get('alias'):
181 warnElem(item, "Alias already present: %s", name)
198 self.apis.setdefault(eFeature.get('api'), []).append(eFeature)
204 def getFeatures(self, api, checkVersion=None): argument
205 return [eFeature for eFeature in self.apis[api]
213 return [item.name]
218 return self.createMissing(name=key)
229 aliases = eCommand.xpath('alias/@name')
233 return eExtension.get('name')
235 def extensionSupports(eExtension, api, profile=None): argument
236 if api == 'gl' and profile == 'core':
239 needSupport = api
260 for typeName in eComponent.xpath('type/@name'):
262 for enumName in eComponent.xpath('enum/@name'):
264 for commandName in eComponent.xpath('command/@name'):
267 def addComponents(self, elem, api, profile=None): argument
269 cApi = eComponent.get('api')
271 if (matchApi(api, eComponent.get('api')) and
275 def addFeature(self, eFeature, api=None, profile=None, force=False): argument
276 info('Feature %s', eFeature.get('name'))
277 if not matchApi(api, eFeature.get('api')):
279 warnElem(eFeature, 'API %s is not supported', api)
280 self.addComponents(eFeature, api, profile)
281 self.versions.add(eFeature.get('name'))
283 def addExtension(self, eExtension, api=None, profile=None, force=False): argument
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): argument
297 name=eType.get('name') or eType.findtext('name'),
299 api=eType.get('api'),
302 def createType(name): argument
303 info('Add type %s', name)
305 return parseType(registry.types[name, api])
307 return Type(name=name)
311 return parseEnum(registry.enums[enumName, api])
328 name=eParam.get('name') or eParam.findtext('name'),
340 name=eCmd.findtext('proto/name'),
348 def createGroup(name): argument
349 info('Add group %s', name)
351 eGroup = registry.groups[name]
353 return Group(name=name)
358 enums=NameIndex(enums[name] for name in eGroup.xpath('enum/@name')
359 if name in enums))
365 # <proto>void <name>glGetFenceivNV</name></proto>
366 # <param group="FenceNV"><ptype>GLuint</ptype> <name>fence</name></param>
373 warning("Location not found for %s: %s", type(item).__name__.lower(), item.name)
401 name = aliasCommand.findtext('proto/name')
402 if name in commands:
403 command.alias = commands[name]
420 def spec(registry, api, version=None, profile=None, extensionNames=[], protects=[], force=False): argument
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): argument
450 s = spec(registry, api, **kwargs)
451 return createInterface(registry, s, api)