parameters: (entries, prefix_name, verbatim, filename, with_args)
docstring: Generate a C header containing a macro listing all entry points.
         |entries| is a list of Entry instances.
         |prefix_name| is a prefix-name, it will be converted to upper-case.
         |verbatim| is a list of verbatim lines that must appear before the
         macro declaration. Useful to insert #include <> statements.
         |filename| is the name of the original file.
docstring_summary: Generate a C header containing a macro listing all entry points.
         |entries| is a list of Entry instances.
         |prefix_name| is a prefix-name, it will be converted to upper-case.
         |verbatim| is a list of verbatim lines that must appear before the
         macro declaration. Useful to insert #include <> statements.
         |filename| is the name of the original file.
docstring_tokens: Generate a C header containing a macro listing all entry points . |entries| is a list of Entry instances . |prefix_name| is a prefix - name it will be converted to upper - case . |verbatim| is a list of verbatim lines that must appear before the macro declaration . Useful to insert #include < > statements . |filename| is the name of the original file .
function: def gen_functions_header(entries, prefix_name, verbatim, filename, with_args):
      """Generate a C header containing a macro listing all entry points.
         |entries| is a list of Entry instances.
         |prefix_name| is a prefix-name, it will be converted to upper-case.
         |verbatim| is a list of verbatim lines that must appear before the
         macro declaration. Useful to insert #include <> statements.
         |filename| is the name of the original file.
      """
      prefix_name = prefix_name.upper()
      print("// Auto-generated with: %s" % banner_command(sys.argv))
      print("// DO NOT EDIT THIS FILE")
      print("")
      print("#ifndef %s_FUNCTIONS_H" % prefix_name)
      print("#define %s_FUNCTIONS_H" % prefix_name)
      print("")
      for line in verbatim:
          print(line)
      print("#define LIST_%s_FUNCTIONS(X) \\" % prefix_name)
      new_header_apis = [
          # AEMU private exts
          "eglGetMaxGLESVersion",
          "eglBlitFromCurrentReadBufferANDROID",
          "eglSetImageFenceANDROID",
          "eglWaitImageFenceANDROID",
          "eglAddLibrarySearchPathANDROID",
          "eglQueryVulkanInteropSupportANDROID",
          "eglQueryVulkanInteropSupportANDROID",
          # For snapshotting
          "eglLoadConfig",
          "eglLoadContext",
          "eglLoadAllImages",
          "eglSaveConfig",
          "eglSaveContext",
          "eglSaveAllImages",
          "eglPreSaveContext",
          "eglPostLoadAllImages",
          "eglPostSaveContext",
          "eglUseOsEglApi",
          "eglFillUsages",
          "eglSetMaxGLESVersion",
      ]
      need_decls = []
      for entry in entries:
          if entry.__name__ in new_header_apis:
              need_decls.append(entry)
          if with_args:
              print("  X(%s, %s, (%s), (%s)) \\" % \
                      (entry.return_type, entry.__name__, entry.parameters,
                       entry.call))
          else:
              print("  X(%s, %s, (%s)) \\" % \
                      (entry.return_type, entry.__name__, entry.parameters))
      print("")
      for entry in need_decls:
          print("EGLAPI %s EGLAPIENTRY %s(%s);" % (entry.return_type, entry.__name__, entry.parameters))
      print("")
      print("#endif  // %s_FUNCTIONS_H" % prefix_name)
function_tokens: def gen_functions_header ( entries , prefix_name , verbatim , filename , with_args ) : prefix_name = prefix_name . upper ( ) print ( "// Auto-generated with: %s" % banner_command ( sys . argv ) ) print ( "// DO NOT EDIT THIS FILE" ) print ( "" ) print ( "#ifndef %s_FUNCTIONS_H" % prefix_name ) print ( "#define %s_FUNCTIONS_H" % prefix_name ) print ( "" ) for line in verbatim : print ( line ) print ( "#define LIST_%s_FUNCTIONS(X) \\" % prefix_name ) new_header_apis = [ # AEMU private exts "eglGetMaxGLESVersion" , "eglBlitFromCurrentReadBufferANDROID" , "eglSetImageFenceANDROID" , "eglWaitImageFenceANDROID" , "eglAddLibrarySearchPathANDROID" , "eglQueryVulkanInteropSupportANDROID" , "eglQueryVulkanInteropSupportANDROID" , # For snapshotting "eglLoadConfig" , "eglLoadContext" , "eglLoadAllImages" , "eglSaveConfig" , "eglSaveContext" , "eglSaveAllImages" , "eglPreSaveContext" , "eglPostLoadAllImages" , "eglPostSaveContext" , "eglUseOsEglApi" , "eglFillUsages" , "eglSetMaxGLESVersion" , ] need_decls = [ ] for entry in entries : if entry . __name__ in new_header_apis : need_decls . append ( entry ) if with_args : print ( "  X(%s, %s, (%s), (%s)) \\" % ( entry . return_type , entry . __name__ , entry . parameters , entry . call ) ) else : print ( "  X(%s, %s, (%s)) \\" % ( entry . return_type , entry . __name__ , entry . parameters ) ) print ( "" ) for entry in need_decls : print ( "EGLAPI %s EGLAPIENTRY %s(%s);" % ( entry . return_type , entry . __name__ , entry . parameters ) ) print ( "" ) print ( "#endif  // %s_FUNCTIONS_H" % prefix_name )