original_docstring: Writes the Pepper OpenGLES interface definition.
docstring: Writes the Pepper OpenGLES interface definition.
docstring_tokens: Writes the Pepper OpenGLES interface definition .
code: def WritePepperGLES2Interface(self, filename, dev):
      """Writes the Pepper OpenGLES interface definition."""
      file = CWriter(filename)
      file.Write(_LICENSE)
      file.Write(_DO_NOT_EDIT_WARNING)
  
      file.Write("label Chrome {\n")
      file.Write("  M39 = 1.0\n")
      file.Write("};\n\n")
  
      if not dev:
        # Declare GL types.
        file.Write("[version=1.0]\n")
        file.Write("describe {\n")
        for gltype in ['GLbitfield', 'GLboolean', 'GLbyte', 'GLclampf',
                       'GLclampx', 'GLenum', 'GLfixed', 'GLfloat', 'GLint',
                       'GLintptr', 'GLshort', 'GLsizei', 'GLsizeiptr',
                       'GLubyte', 'GLuint', 'GLushort']:
          file.Write("  %s;\n" % gltype)
          file.Write("  %s_ptr_t;\n" % gltype)
        file.Write("};\n\n")
  
      # C level typedefs.
      file.Write("#inline c\n")
      file.Write("#include \"ppapi/c/pp_resource.h\"\n")
      if dev:
        file.Write("#include \"ppapi/c/ppb_opengles2.h\"\n\n")
      else:
        file.Write("\n#ifndef __gl2_h_\n")
        for (k, v) in _GL_TYPES.iteritems():
          file.Write("typedef %s %s;\n" % (v, k))
        file.Write("#ifdef _WIN64\n")
        for (k, v) in _GL_TYPES_64.iteritems():
          file.Write("typedef %s %s;\n" % (v, k))
        file.Write("#else\n")
        for (k, v) in _GL_TYPES_32.iteritems():
          file.Write("typedef %s %s;\n" % (v, k))
        file.Write("#endif  // _WIN64\n")
        file.Write("#endif  // __gl2_h_\n\n")
      file.Write("#endinl\n")
  
      for interface in self.pepper_interfaces:
        if interface.dev != dev:
          continue
        # Historically, we provide OpenGLES2 interfaces with struct
        # namespace. Not to break code which uses the interface as
        # "struct OpenGLES2", we put it in struct namespace.
        file.Write('\n[macro="%s", force_struct_namespace]\n' %
                   interface.GetInterfaceName())
        file.Write("interface %s {\n" % interface.GetStructName())
        for func in self.original_functions:
          if not func.InPepperInterface(interface):
            continue
  
          ret_type = func.MapCTypeToPepperIdlType(func.return_type,
                                                  is_for_return_type=True)
          func_prefix = "  %s %s(" % (ret_type, func.GetPepperName())
          file.Write(func_prefix)
          file.Write("[in] PP_Resource context")
          for arg in func.MakeTypedPepperIdlArgStrings():
            file.Write(",\n" + " " * len(func_prefix) + arg)
          file.Write(");\n")
        file.Write("};\n\n")
  
  
      file.Close()
code_tokens: def WritePepperGLES2Interface ( self , filename , dev ) : file = CWriter ( filename ) file . Write ( _LICENSE ) file . Write ( _DO_NOT_EDIT_WARNING ) file . Write ( "label Chrome {\n" ) file . Write ( "  M39 = 1.0\n" ) file . Write ( "};\n\n" ) if not dev : file . Write ( "[version=1.0]\n" ) file . Write ( "describe {\n" ) for gltype in [ 'GLbitfield' , 'GLboolean' , 'GLbyte' , 'GLclampf' , 'GLclampx' , 'GLenum' , 'GLfixed' , 'GLfloat' , 'GLint' , 'GLintptr' , 'GLshort' , 'GLsizei' , 'GLsizeiptr' , 'GLubyte' , 'GLuint' , 'GLushort' ] : file . Write ( "  %s;\n" % gltype ) file . Write ( "  %s_ptr_t;\n" % gltype ) file . Write ( "};\n\n" ) file . Write ( "#inline c\n" ) file . Write ( "#include \"ppapi/c/pp_resource.h\"\n" ) if dev : file . Write ( "#include \"ppapi/c/ppb_opengles2.h\"\n\n" ) else : file . Write ( "\n#ifndef __gl2_h_\n" ) for ( k , v ) in _GL_TYPES . iteritems ( ) : file . Write ( "typedef %s %s;\n" % ( v , k ) ) file . Write ( "#ifdef _WIN64\n" ) for ( k , v ) in _GL_TYPES_64 . iteritems ( ) : file . Write ( "typedef %s %s;\n" % ( v , k ) ) file . Write ( "#else\n" ) for ( k , v ) in _GL_TYPES_32 . iteritems ( ) : file . Write ( "typedef %s %s;\n" % ( v , k ) ) file . Write ( "#endif  // _WIN64\n" ) file . Write ( "#endif  // __gl2_h_\n\n" ) file . Write ( "#endinl\n" ) for interface in self . pepper_interfaces : if interface . dev != dev : continue file . Write ( '\n[macro="%s", force_struct_namespace]\n' % interface . GetInterfaceName ( ) ) file . Write ( "interface %s {\n" % interface . GetStructName ( ) ) for func in self . original_functions : if not func . InPepperInterface ( interface ) : continue ret_type = func . MapCTypeToPepperIdlType ( func . return_type , is_for_return_type = True ) func_prefix = "  %s %s(" % ( ret_type , func . GetPepperName ( ) ) file . Write ( func_prefix ) file . Write ( "[in] PP_Resource context" ) for arg in func . MakeTypedPepperIdlArgStrings ( ) : file . Write ( ",\n" + " " * len ( func_prefix ) + arg ) file . Write ( ");\n" ) file . Write ( "};\n\n" ) file . Close ( )
short_docstring: Writes the Pepper OpenGLES interface definition.
short_docstring_tokens: Writes the Pepper OpenGLES interface definition .
comment: """Writes the Pepper OpenGLES interface definition."""$SEP$# Declare GL types.$SEP$# C level typedefs.$SEP$# Historically, we provide OpenGLES2 interfaces with struct$SEP$# namespace. Not to break code which uses the interface as$SEP$# "struct OpenGLES2", we put it in struct namespace.