ui/ozone/generate_ozone_platform_list.py
def GeneratePlatformListHeader(out, platforms):
  """Generate ids of ozone platforms & declaration of static names array."""

  out.write('// DO NOT MODIFY. GENERATED BY generate_ozone_platform_list.py\n')
  out.write('\n')

  out.write('#ifndef UI_OZONE_PLATFORM_LIST_H_\n')
  out.write('#define UI_OZONE_PLATFORM_LIST_H_\n')
  out.write('\n')

  out.write('namespace ui {\n')
  out.write('\n')

  # Prototypes for platform initializers.
  for plat_id, plat_name in enumerate(platforms):
    out.write('const int %s = %d;\n' % (GetConstantName(plat_name), plat_id))
  out.write('\n')

  # Platform count.
  out.write('const int kPlatformCount = %d;\n' % len(platforms))
  out.write('\n')

  # Declaration for names list.
  out.write('extern const char* kPlatformNames[kPlatformCount];\n')
  out.write('\n')

  out.write('}  // namespace ui\n')
  out.write('\n')

  out.write('#endif  // UI_OZONE_PLATFORM_LIST_H_\n')
  out.write('\n')
Generate ids of ozone platforms & declaration of static names array.
Generate ids of ozone platforms & declaration of static names array.
Generate ids of ozone platforms & declaration of static names array .
def GeneratePlatformListHeader(out, platforms):
  out.write('// DO NOT MODIFY. GENERATED BY generate_ozone_platform_list.py\n')
  out.write('\n')
  out.write('#ifndef UI_OZONE_PLATFORM_LIST_H_\n')
  out.write('#define UI_OZONE_PLATFORM_LIST_H_\n')
  out.write('\n')
  out.write('namespace ui {\n')
  out.write('\n')
  for plat_id, plat_name in enumerate(platforms):
    out.write('const int %s = %d;\n' % (GetConstantName(plat_name), plat_id))
  out.write('\n')
  out.write('const int kPlatformCount = %d;\n' % len(platforms))
  out.write('\n')
  out.write('extern const char* kPlatformNames[kPlatformCount];\n')
  out.write('\n')
  out.write('}  // namespace ui\n')
  out.write('\n')
  out.write('#endif  // UI_OZONE_PLATFORM_LIST_H_\n')
  out.write('\n')
def GeneratePlatformListHeader ( out , platforms ) : out . write ( '// DO NOT MODIFY. GENERATED BY generate_ozone_platform_list.py\n' ) out . write ( '\n' ) out . write ( '#ifndef UI_OZONE_PLATFORM_LIST_H_\n' ) out . write ( '#define UI_OZONE_PLATFORM_LIST_H_\n' ) out . write ( '\n' ) out . write ( 'namespace ui {\n' ) out . write ( '\n' ) for plat_id , plat_name in enumerate ( platforms ) : out . write ( 'const int %s = %d;\n' % ( GetConstantName ( plat_name ) , plat_id ) ) out . write ( '\n' ) out . write ( 'const int kPlatformCount = %d;\n' % len ( platforms ) ) out . write ( '\n' ) out . write ( 'extern const char* kPlatformNames[kPlatformCount];\n' ) out . write ( '\n' ) out . write ( '}  // namespace ui\n' ) out . write ( '\n' ) out . write ( '#endif  // UI_OZONE_PLATFORM_LIST_H_\n' ) out . write ( '\n' )
Generate ids of ozone platforms & declaration of static names array.
Generate ids of ozone platforms & declaration of static names array .
"""Generate ids of ozone platforms & declaration of static names array.""" # Prototypes for platform initializers. # Platform count. # Declaration for names list.
out
platforms