summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore17
-rw-r--r--BUILD.gn68
-rw-r--r--LICENSE27
-rw-r--r--README.md43
-rw-r--r--build/config/BUILD.gn24
-rw-r--r--c/BUILD.gn363
-rw-r--r--c/PRESUBMIT.py16
-rw-r--r--c/README.md45
-rw-r--r--c/docs/bindings/INTERNALS.md151
-rw-r--r--c/docs/bindings/TUTORIAL.md372
-rw-r--r--c/include/GLES2/gl2.h526
-rw-r--r--c/include/GLES2/gl2ext.h2026
-rw-r--r--c/include/GLES2/gl2extmojo.h798
-rw-r--r--c/include/GLES2/gl2mojo_autogen.h330
-rw-r--r--c/include/GLES2/gl2mojo_internal.h22
-rw-r--r--c/include/GLES2/gl2platform.h30
-rw-r--r--c/include/KHR/khrplatform.h282
-rw-r--r--c/include/MGL/mgl.h65
-rw-r--r--c/include/MGL/mgl_echo.h22
-rw-r--r--c/include/MGL/mgl_onscreen.h25
-rw-r--r--c/include/MGL/mgl_signal_sync_point.h27
-rw-r--r--c/include/MGL/mgl_types.h24
-rw-r--r--c/include/mojo/bindings/array.h134
-rw-r--r--c/include/mojo/bindings/buffer.h48
-rw-r--r--c/include/mojo/bindings/interface.h27
-rw-r--r--c/include/mojo/bindings/internal/type_descriptor.h218
-rw-r--r--c/include/mojo/bindings/internal/util.h38
-rw-r--r--c/include/mojo/bindings/map.h45
-rw-r--r--c/include/mojo/bindings/message.h76
-rw-r--r--c/include/mojo/bindings/string.h27
-rw-r--r--c/include/mojo/bindings/struct.h108
-rw-r--r--c/include/mojo/bindings/union.h118
-rw-r--r--c/include/mojo/bindings/validation.h63
-rw-r--r--c/include/mojo/environment/async_waiter.h71
-rw-r--r--c/include/mojo/environment/logger.h61
-rw-r--r--c/include/mojo/macros.h89
-rw-r--r--c/include/mojo/result.h217
-rw-r--r--c/include/mojo/system/buffer.h236
-rw-r--r--c/include/mojo/system/data_pipe.h511
-rw-r--r--c/include/mojo/system/handle.h204
-rw-r--r--c/include/mojo/system/main.h25
-rw-r--r--c/include/mojo/system/message_pipe.h185
-rw-r--r--c/include/mojo/system/time.h40
-rw-r--r--c/include/mojo/system/wait.h120
-rw-r--r--c/include/mojo/system/wait_set.h190
-rw-r--r--c/lib/bindings/array.c253
-rw-r--r--c/lib/bindings/buffer.c21
-rw-r--r--c/lib/bindings/map.c38
-rw-r--r--c/lib/bindings/message.c73
-rw-r--r--c/lib/bindings/struct.c204
-rw-r--r--c/lib/bindings/type_descriptor.c459
-rw-r--r--c/lib/bindings/union.c159
-rw-r--r--c/tests/bindings/array_unittest.cc294
-rw-r--r--c/tests/bindings/buffer_unittest.cc52
-rw-r--r--c/tests/bindings/message_unittest.cc127
-rw-r--r--c/tests/bindings/struct_unittest.cc365
-rw-r--r--c/tests/bindings/testing_util.h47
-rw-r--r--c/tests/bindings/union_unittest.cc203
-rw-r--r--c/tests/bindings/validation_unittest.cc270
-rw-r--r--c/tests/compile/compile_unittest.cc32
-rw-r--r--c/tests/compile/pure_c.c110
-rw-r--r--c/tests/compile/pure_cpp.cc26
-rw-r--r--c/tests/environment/async_waiter_perftest_helpers.cc136
-rw-r--r--c/tests/environment/async_waiter_perftest_helpers.h31
-rw-r--r--c/tests/macros_unittest.cc84
-rw-r--r--c/tests/result_unittest.cc55
-rw-r--r--c/tests/system/buffer_unittest.cc132
-rw-r--r--c/tests/system/data_pipe_unittest.cc444
-rw-r--r--c/tests/system/handle_unittest.cc118
-rw-r--r--c/tests/system/message_pipe_perftest.cc238
-rw-r--r--c/tests/system/message_pipe_unittest.cc172
-rw-r--r--c/tests/system/perftest_utils.cc53
-rw-r--r--c/tests/system/perftest_utils.h30
-rw-r--r--c/tests/system/reference_perftest.cc18
-rw-r--r--c/tests/system/time_unittest.cc20
-rw-r--r--c/tests/system/wait_set_perftest.cc179
-rw-r--r--c/tests/system/wait_set_unittest.cc391
-rw-r--r--c/tests/system/wait_unittest.cc46
-rw-r--r--cpp/PRESUBMIT.py16
-rw-r--r--cpp/README.md62
-rw-r--r--cpp/application/BUILD.gn89
-rw-r--r--cpp/application/application_impl_base.h117
-rw-r--r--cpp/application/application_test_base.h54
-rw-r--r--cpp/application/connect.h73
-rw-r--r--cpp/application/connection_context.h56
-rw-r--r--cpp/application/lib/application_impl_base.cc78
-rw-r--r--cpp/application/lib/application_test_base.cc161
-rw-r--r--cpp/application/lib/application_test_main.cc11
-rw-r--r--cpp/application/lib/connect.cc24
-rw-r--r--cpp/application/lib/run_application.cc106
-rw-r--r--cpp/application/lib/service_provider_impl.cc64
-rw-r--r--cpp/application/run_application.h59
-rw-r--r--cpp/application/service_connector.h31
-rw-r--r--cpp/application/service_provider_impl.h152
-rw-r--r--cpp/application/tests/BUILD.gn24
-rw-r--r--cpp/application/tests/service_provider_impl_unittest.cc352
-rw-r--r--cpp/bindings/BUILD.gn129
-rw-r--r--cpp/bindings/array.h315
-rw-r--r--cpp/bindings/binding.h210
-rw-r--r--cpp/bindings/binding_set.h58
-rw-r--r--cpp/bindings/callback.h118
-rw-r--r--cpp/bindings/formatting.h77
-rw-r--r--cpp/bindings/interface_handle.h85
-rw-r--r--cpp/bindings/interface_ptr.h189
-rw-r--r--cpp/bindings/interface_ptr_set.h73
-rw-r--r--cpp/bindings/interface_request.h140
-rw-r--r--cpp/bindings/lib/TODO4
-rw-r--r--cpp/bindings/lib/array_internal.cc74
-rw-r--r--cpp/bindings/lib/array_internal.h540
-rw-r--r--cpp/bindings/lib/array_serialization.h538
-rw-r--r--cpp/bindings/lib/bindings_internal.h281
-rw-r--r--cpp/bindings/lib/bindings_serialization.cc90
-rw-r--r--cpp/bindings/lib/bindings_serialization.h95
-rw-r--r--cpp/bindings/lib/bounds_checker.cc77
-rw-r--r--cpp/bindings/lib/bounds_checker.h63
-rw-r--r--cpp/bindings/lib/buffer.h24
-rw-r--r--cpp/bindings/lib/callback_internal.h28
-rw-r--r--cpp/bindings/lib/connector.cc205
-rw-r--r--cpp/bindings/lib/connector.h124
-rw-r--r--cpp/bindings/lib/control_message_handler.cc85
-rw-r--r--cpp/bindings/lib/control_message_handler.h42
-rw-r--r--cpp/bindings/lib/control_message_proxy.cc104
-rw-r--r--cpp/bindings/lib/control_message_proxy.h38
-rw-r--r--cpp/bindings/lib/fixed_buffer.cc60
-rw-r--r--cpp/bindings/lib/fixed_buffer.h86
-rw-r--r--cpp/bindings/lib/interface_ptr_internal.h173
-rw-r--r--cpp/bindings/lib/iterator_util.h129
-rw-r--r--cpp/bindings/lib/map_data_internal.h154
-rw-r--r--cpp/bindings/lib/map_internal.h58
-rw-r--r--cpp/bindings/lib/map_serialization.h212
-rw-r--r--cpp/bindings/lib/map_serialization_forward.h46
-rw-r--r--cpp/bindings/lib/message.cc113
-rw-r--r--cpp/bindings/lib/message_builder.cc60
-rw-r--r--cpp/bindings/lib/message_builder.h92
-rw-r--r--cpp/bindings/lib/message_header_validator.cc134
-rw-r--r--cpp/bindings/lib/message_header_validator.h31
-rw-r--r--cpp/bindings/lib/message_internal.h41
-rw-r--r--cpp/bindings/lib/message_validation.cc57
-rw-r--r--cpp/bindings/lib/message_validation.h40
-rw-r--r--cpp/bindings/lib/message_validator.cc28
-rw-r--r--cpp/bindings/lib/no_interface.cc20
-rw-r--r--cpp/bindings/lib/router.cc173
-rw-r--r--cpp/bindings/lib/router.h110
-rw-r--r--cpp/bindings/lib/shared_data.h75
-rw-r--r--cpp/bindings/lib/shared_ptr.h57
-rw-r--r--cpp/bindings/lib/string_serialization.cc40
-rw-r--r--cpp/bindings/lib/string_serialization.h22
-rw-r--r--cpp/bindings/lib/synchronous_connector.cc77
-rw-r--r--cpp/bindings/lib/synchronous_connector.h47
-rw-r--r--cpp/bindings/lib/template_util.h57
-rw-r--r--cpp/bindings/lib/union_accessor.h33
-rw-r--r--cpp/bindings/lib/validate_params.h49
-rw-r--r--cpp/bindings/lib/validation_errors.cc89
-rw-r--r--cpp/bindings/lib/validation_errors.h128
-rw-r--r--cpp/bindings/lib/validation_util.cc55
-rw-r--r--cpp/bindings/lib/validation_util.h37
-rw-r--r--cpp/bindings/map.h298
-rw-r--r--cpp/bindings/message.h172
-rw-r--r--cpp/bindings/message_validator.h49
-rw-r--r--cpp/bindings/no_interface.h51
-rw-r--r--cpp/bindings/string.h178
-rw-r--r--cpp/bindings/strong_binding.h187
-rw-r--r--cpp/bindings/strong_binding_set.h76
-rw-r--r--cpp/bindings/struct_ptr.h180
-rw-r--r--cpp/bindings/synchronous_interface_ptr.h150
-rw-r--r--cpp/bindings/tests/BUILD.gn165
-rw-r--r--cpp/bindings/tests/array_unittest.cc824
-rw-r--r--cpp/bindings/tests/binding_callback_unittest.cc298
-rw-r--r--cpp/bindings/tests/binding_set_unittest.cc106
-rw-r--r--cpp/bindings/tests/binding_unittest.cc337
-rw-r--r--cpp/bindings/tests/bindings_perftest.cc120
-rw-r--r--cpp/bindings/tests/bounds_checker_unittest.cc209
-rw-r--r--cpp/bindings/tests/buffer_unittest.cc99
-rw-r--r--cpp/bindings/tests/callback_unittest.cc165
-rw-r--r--cpp/bindings/tests/connector_unittest.cc469
-rw-r--r--cpp/bindings/tests/constant_unittest.cc42
-rw-r--r--cpp/bindings/tests/container_test_util.cc50
-rw-r--r--cpp/bindings/tests/container_test_util.h53
-rw-r--r--cpp/bindings/tests/equals_unittest.cc112
-rw-r--r--cpp/bindings/tests/formatting_unittest.cc104
-rw-r--r--cpp/bindings/tests/handle_passing_unittest.cc353
-rw-r--r--cpp/bindings/tests/interface_ptr_set_unittest.cc118
-rw-r--r--cpp/bindings/tests/interface_ptr_unittest.cc661
-rw-r--r--cpp/bindings/tests/interface_unittest.cc78
-rw-r--r--cpp/bindings/tests/iterator_test_util.h132
-rw-r--r--cpp/bindings/tests/iterator_util_unittest.cc89
-rw-r--r--cpp/bindings/tests/map_unittest.cc429
-rw-r--r--cpp/bindings/tests/message_builder_unittest.cc76
-rw-r--r--cpp/bindings/tests/message_queue.cc43
-rw-r--r--cpp/bindings/tests/message_queue.h43
-rw-r--r--cpp/bindings/tests/request_response_unittest.cc150
-rw-r--r--cpp/bindings/tests/router_unittest.cc462
-rw-r--r--cpp/bindings/tests/sample_service_unittest.cc372
-rw-r--r--cpp/bindings/tests/serialization_api_unittest.cc205
-rw-r--r--cpp/bindings/tests/serialization_warning_unittest.cc218
-rw-r--r--cpp/bindings/tests/string_unittest.cc131
-rw-r--r--cpp/bindings/tests/strong_binding_set_unittest.cc116
-rw-r--r--cpp/bindings/tests/struct_unittest.cc459
-rw-r--r--cpp/bindings/tests/synchronous_connector_unittest.cc74
-rw-r--r--cpp/bindings/tests/synchronous_interface_ptr_unittest.cc224
-rw-r--r--cpp/bindings/tests/type_conversion_unittest.cc205
-rw-r--r--cpp/bindings/tests/union_unittest.cc1253
-rw-r--r--cpp/bindings/tests/validation_test_input_parser.cc408
-rw-r--r--cpp/bindings/tests/validation_test_input_parser.h120
-rw-r--r--cpp/bindings/tests/validation_unittest.cc454
-rw-r--r--cpp/bindings/tests/validation_util.cc107
-rw-r--r--cpp/bindings/tests/validation_util.h38
-rw-r--r--cpp/bindings/tests/versioning_apptest.cc121
-rw-r--r--cpp/bindings/tests/versioning_test_service.cc126
-rw-r--r--cpp/bindings/type_converter.h92
-rw-r--r--cpp/environment/BUILD.gn57
-rw-r--r--cpp/environment/async_waiter.h41
-rw-r--r--cpp/environment/environment.h45
-rw-r--r--cpp/environment/lib/async_waiter.cc34
-rw-r--r--cpp/environment/lib/default_async_waiter.cc84
-rw-r--r--cpp/environment/lib/default_async_waiter.h18
-rw-r--r--cpp/environment/lib/default_logger.cc76
-rw-r--r--cpp/environment/lib/default_logger.h18
-rw-r--r--cpp/environment/lib/environment.cc56
-rw-r--r--cpp/environment/lib/logging.cc45
-rw-r--r--cpp/environment/lib/logging_only_environment.cc20
-rw-r--r--cpp/environment/logging.h89
-rw-r--r--cpp/environment/tests/BUILD.gn43
-rw-r--r--cpp/environment/tests/async_wait_unittest.cc117
-rw-r--r--cpp/environment/tests/async_waiter_unittest.cc106
-rw-r--r--cpp/environment/tests/logger_unittest.cc118
-rw-r--r--cpp/environment/tests/logging_unittest.cc520
-rw-r--r--cpp/environment/tests/run_loop_async_wait_perftest.cc47
-rw-r--r--cpp/system/BUILD.gn19
-rw-r--r--cpp/system/buffer.h106
-rw-r--r--cpp/system/data_pipe.h197
-rw-r--r--cpp/system/handle.h251
-rw-r--r--cpp/system/macros.h78
-rw-r--r--cpp/system/message_pipe.h119
-rw-r--r--cpp/system/tests/BUILD.gn24
-rw-r--r--cpp/system/tests/buffer_unittest.cc40
-rw-r--r--cpp/system/tests/data_pipe_unittest.cc121
-rw-r--r--cpp/system/tests/handle_unittest.cc216
-rw-r--r--cpp/system/tests/macros_unittest.cc141
-rw-r--r--cpp/system/tests/message_pipe_unittest.cc297
-rw-r--r--cpp/system/tests/time_unittest.cc20
-rw-r--r--cpp/system/tests/wait_unittest.cc101
-rw-r--r--cpp/system/time.h23
-rw-r--r--cpp/system/wait.h89
-rw-r--r--cpp/system/wait_set.h85
-rw-r--r--cpp/test_support/BUILD.gn30
-rw-r--r--cpp/test_support/lib/test_utils.cc60
-rw-r--r--cpp/test_support/test_support.h37
-rw-r--r--cpp/test_support/test_utils.h31
-rw-r--r--cpp/utility/BUILD.gn19
-rw-r--r--cpp/utility/lib/run_loop.cc396
-rw-r--r--cpp/utility/run_loop.h184
-rw-r--r--cpp/utility/run_loop_handler.h36
-rw-r--r--cpp/utility/tests/BUILD.gn20
-rw-r--r--cpp/utility/tests/run_loop_unittest.cc435
-rw-r--r--dart/.analysis_options4
-rw-r--r--dart/.gitignore3
-rw-r--r--dart/rules.gni440
-rwxr-xr-xdart/tools/fetch_dart_packages.py92
-rw-r--r--go/application/application_impl.go177
-rw-r--r--go/application/connection.go223
-rw-r--r--go/application/describer.go119
-rw-r--r--go/bindings/async_waiter.go282
-rw-r--r--go/bindings/connector.go113
-rw-r--r--go/bindings/decoder.go429
-rw-r--r--go/bindings/encoder.go594
-rw-r--r--go/bindings/interface.go67
-rw-r--r--go/bindings/invalid_handle.go101
-rw-r--r--go/bindings/message.go205
-rw-r--r--go/bindings/router.go228
-rw-r--r--go/bindings/stub.go63
-rw-r--r--go/bindings/util.go59
-rw-r--r--go/system/core.go151
-rw-r--r--go/system/data_pipe.go126
-rw-r--r--go/system/handle.go169
-rw-r--r--go/system/message_pipe.go59
-rw-r--r--go/system/mojo_types.go141
-rw-r--r--go/system/shared_buffer.go74
-rw-r--r--go/system/system.go47
-rw-r--r--go/system/system_android.go13
-rw-r--r--go/system/system_linux.go13
-rw-r--r--go/system/system_nacl.go13
-rw-r--r--interfaces/BUILD.gn11
-rw-r--r--interfaces/application/BUILD.gn15
-rw-r--r--interfaces/application/application.mojom38
-rw-r--r--interfaces/application/application_connector.mojom23
-rw-r--r--interfaces/application/service_provider.mojom18
-rw-r--r--interfaces/application/shell.mojom22
-rw-r--r--interfaces/bindings/BUILD.gn14
-rw-r--r--interfaces/bindings/interface_control_messages.mojom90
-rw-r--r--interfaces/bindings/mojom_files.mojom106
-rw-r--r--interfaces/bindings/mojom_types.mojom515
-rw-r--r--interfaces/bindings/service_describer.mojom58
-rw-r--r--interfaces/bindings/tests/BUILD.gn68
-rw-r--r--interfaces/bindings/tests/data/message_data25
-rw-r--r--interfaces/bindings/tests/data/validation/boundscheck_msghdr_no_such_method.data5
-rw-r--r--interfaces/bindings/tests/data/validation/boundscheck_msghdr_no_such_method.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_empty.data0
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_empty.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_incomplete_struct.data2
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_incomplete_struct.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_incomplete_struct_header.data1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_incomplete_struct_header.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_invalid_flag_combo.data6
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_invalid_flag_combo.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_missing_request_id.data6
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_missing_request_id.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_no_such_method.data5
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_no_such_method.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_num_bytes_huge.data4
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_num_bytes_huge.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_num_bytes_less_than_min_requirement.data4
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_num_bytes_less_than_min_requirement.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_num_bytes_less_than_struct_header.data4
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_num_bytes_less_than_struct_header.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_num_bytes_version_mismatch_1.data7
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_num_bytes_version_mismatch_1.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_num_bytes_version_mismatch_2.data8
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_num_bytes_version_mismatch_2.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_num_bytes_version_mismatch_3.data5
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_msghdr_num_bytes_version_mismatch_3.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd0_good.data11
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd0_good.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd0_incomplete_struct.data9
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd0_incomplete_struct.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd0_incomplete_struct_header.data7
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd0_incomplete_struct_header.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd0_invalid_request_flags.data6
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd0_invalid_request_flags.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd0_invalid_request_flags2.data7
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd0_invalid_request_flags2.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd0_struct_num_bytes_huge.data10
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd0_struct_num_bytes_huge.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd0_struct_num_bytes_less_than_min_requirement.data9
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd0_struct_num_bytes_less_than_min_requirement.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd0_struct_num_bytes_less_than_struct_header.data10
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd0_struct_num_bytes_less_than_struct_header.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd10_good.data46
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd10_good.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd10_good_non_unique_keys.data46
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd10_good_non_unique_keys.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd10_null_keys.data23
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd10_null_keys.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd10_null_values.data38
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd10_null_values.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd10_one_null_key.data38
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd10_one_null_key.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd10_unequal_array_size.data46
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd10_unequal_array_size.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd11_good_version0.data17
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd11_good_version0.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd11_good_version1.data18
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd11_good_version1.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd11_good_version2.data18
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd11_good_version2.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd11_good_version3.data26
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd11_good_version3.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd11_good_version_newer_than_known_1.data28
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd11_good_version_newer_than_known_1.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd11_good_version_newer_than_known_2.data28
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd11_good_version_newer_than_known_2.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd11_num_bytes_version_mismatch_1.data19
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd11_num_bytes_version_mismatch_1.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd11_num_bytes_version_mismatch_2.data17
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd11_num_bytes_version_mismatch_2.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd12_invalid_request_flags.data7
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd12_invalid_request_flags.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd13_good_1.data15
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd13_good_1.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd13_good_2.data17
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd13_good_2.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_good_1.data14
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_good_1.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_good_array_in_union.data19
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_good_array_in_union.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_good_map_in_union.data49
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_good_map_in_union.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_good_nested_union.data19
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_good_nested_union.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_good_null_array_in_union.data13
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_good_null_array_in_union.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_good_null_map_in_union.data13
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_good_null_map_in_union.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_good_struct_in_union.data19
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_good_struct_in_union.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_good_unknown_union_tag.data14
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_good_unknown_union_tag.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_unexpected_null_array_in_union.data13
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_unexpected_null_array_in_union.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_unexpected_null_map_in_union.data13
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_unexpected_null_map_in_union.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_unexpected_null_struct_in_union.data13
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_unexpected_null_struct_in_union.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_unexpected_null_union_in_union.data13
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd14_unexpected_null_union_in_union.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd15_good_union_in_array.data45
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd15_good_union_in_array.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd15_good_union_in_map.data61
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd15_good_union_in_map.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd15_good_union_in_struct.data24
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd15_good_union_in_struct.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd15_unexpected_null_union_in_array.data43
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd15_unexpected_null_union_in_array.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd1_good.data16
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd1_good.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd1_misaligned_struct.data18
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd1_misaligned_struct.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd1_struct_pointer_overflow.data11
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd1_struct_pointer_overflow.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd1_unexpected_null_struct.data10
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd1_unexpected_null_struct.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd2_good.data32
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd2_good.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd2_multiple_pointers_to_same_struct.data25
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd2_multiple_pointers_to_same_struct.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd2_overlapped_objects.data30
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd2_overlapped_objects.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd2_wrong_layout_order.data32
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd2_wrong_layout_order.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd3_array_num_bytes_huge.data16
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd3_array_num_bytes_huge.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd3_array_num_bytes_less_than_array_header.data16
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd3_array_num_bytes_less_than_array_header.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd3_array_num_bytes_less_than_necessary_size.data18
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd3_array_num_bytes_less_than_necessary_size.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd3_array_pointer_overflow.data11
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd3_array_pointer_overflow.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd3_good.data17
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd3_good.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd3_incomplete_array.data14
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd3_incomplete_array.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd3_incomplete_array_header.data13
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd3_incomplete_array_header.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd3_misaligned_array.data19
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd3_misaligned_array.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd3_unexpected_null_array.data10
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd3_unexpected_null_array.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd4_good.data32
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd4_good.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd4_multiple_pointers_to_same_array.data24
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd4_multiple_pointers_to_same_array.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd4_overlapped_objects.data30
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd4_overlapped_objects.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd4_wrong_layout_order.data33
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd4_wrong_layout_order.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd5_good.data35
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd5_good.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd5_handle_out_of_range.data36
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd5_handle_out_of_range.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd5_multiple_handles_with_same_value_1.data35
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd5_multiple_handles_with_same_value_1.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd5_multiple_handles_with_same_value_2.data35
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd5_multiple_handles_with_same_value_2.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd5_unexpected_invalid_handle.data34
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd5_unexpected_invalid_handle.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd5_wrong_handle_order.data36
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd5_wrong_handle_order.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd6_good.data22
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd6_good.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd6_nested_array_num_bytes_less_than_necessary_size.data22
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd6_nested_array_num_bytes_less_than_necessary_size.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd7_good.data38
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd7_good.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd7_unexpected_null_fixed_array.data24
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd7_unexpected_null_fixed_array.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd7_unmatched_array_elements.data32
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd7_unmatched_array_elements.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd7_unmatched_array_elements_nested.data38
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd7_unmatched_array_elements_nested.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd8_array_num_bytes_overflow.data19
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd8_array_num_bytes_overflow.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd8_good.data30
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd8_good.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd8_unexpected_null_array.data10
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd8_unexpected_null_array.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd8_unexpected_null_string.data31
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd8_unexpected_null_string.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd9_good.data34
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd9_good.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd9_good_null_array.data12
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd9_good_null_array.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd9_unexpected_null_array.data25
-rw-r--r--interfaces/bindings/tests/data/validation/conformance_mthd9_unexpected_null_array.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/integration_intf_resp_mthd0_good.data17
-rw-r--r--interfaces/bindings/tests/data/validation/integration_intf_resp_mthd0_good.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/integration_intf_resp_mthd0_unexpected_array_header.data17
-rw-r--r--interfaces/bindings/tests/data/validation/integration_intf_resp_mthd0_unexpected_array_header.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/integration_intf_rqst_mthd0_good.data18
-rw-r--r--interfaces/bindings/tests/data/validation/integration_intf_rqst_mthd0_good.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/integration_intf_rqst_mthd0_unexpected_struct_header.data15
-rw-r--r--interfaces/bindings/tests/data/validation/integration_intf_rqst_mthd0_unexpected_struct_header.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/integration_msghdr_invalid_flags.data6
-rw-r--r--interfaces/bindings/tests/data/validation/integration_msghdr_invalid_flags.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/resp_boundscheck_msghdr_no_such_method.data6
-rw-r--r--interfaces/bindings/tests/data/validation/resp_boundscheck_msghdr_no_such_method.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/resp_conformance_msghdr_invalid_response_flags1.data6
-rw-r--r--interfaces/bindings/tests/data/validation/resp_conformance_msghdr_invalid_response_flags1.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/resp_conformance_msghdr_invalid_response_flags2.data6
-rw-r--r--interfaces/bindings/tests/data/validation/resp_conformance_msghdr_invalid_response_flags2.expected1
-rw-r--r--interfaces/bindings/tests/data/validation/resp_conformance_msghdr_no_such_method.data6
-rw-r--r--interfaces/bindings/tests/data/validation/resp_conformance_msghdr_no_such_method.expected1
-rw-r--r--interfaces/bindings/tests/math_calculator.mojom13
-rw-r--r--interfaces/bindings/tests/minimal_interface.mojom9
-rw-r--r--interfaces/bindings/tests/no_module.mojom9
-rw-r--r--interfaces/bindings/tests/ping_service.mojom10
-rw-r--r--interfaces/bindings/tests/rect.mojom14
-rw-r--r--interfaces/bindings/tests/regression_tests.mojom116
-rw-r--r--interfaces/bindings/tests/sample_factory.mojom43
-rw-r--r--interfaces/bindings/tests/sample_import.mojom39
-rw-r--r--interfaces/bindings/tests/sample_import2.mojom29
-rw-r--r--interfaces/bindings/tests/sample_interfaces.mojom37
-rw-r--r--interfaces/bindings/tests/sample_service.mojom118
-rw-r--r--interfaces/bindings/tests/scoping.mojom17
-rw-r--r--interfaces/bindings/tests/serialization_test_structs.mojom37
-rw-r--r--interfaces/bindings/tests/test_arrays.mojom62
-rw-r--r--interfaces/bindings/tests/test_constants.mojom53
-rw-r--r--interfaces/bindings/tests/test_enums.mojom16
-rw-r--r--interfaces/bindings/tests/test_included_unions.mojom10
-rw-r--r--interfaces/bindings/tests/test_structs.mojom401
-rw-r--r--interfaces/bindings/tests/test_unions.mojom140
-rw-r--r--interfaces/bindings/tests/validation_parser/validation_parser.cc53
-rw-r--r--interfaces/bindings/tests/validation_parser/validation_parser.h25
-rw-r--r--interfaces/bindings/tests/validation_test_interfaces.mojom127
-rw-r--r--interfaces/bindings/tests/versioning_test_client.mojom35
-rw-r--r--interfaces/bindings/tests/versioning_test_service.mojom38
-rw-r--r--interfaces/network/BUILD.gn14
-rw-r--r--interfaces/network/http_header.mojom11
-rw-r--r--interfaces/network/network_error.mojom11
-rw-r--r--interfaces/network/url_request.mojom51
-rw-r--r--interfaces/network/url_response.mojom43
-rw-r--r--java/BUILD.gn77
-rw-r--r--java/application/src/org/chromium/mojo/application/ApplicationConnection.java96
-rw-r--r--java/application/src/org/chromium/mojo/application/ApplicationDelegate.java37
-rw-r--r--java/application/src/org/chromium/mojo/application/ApplicationImpl.java70
-rw-r--r--java/application/src/org/chromium/mojo/application/ApplicationRunner.java32
-rw-r--r--java/application/src/org/chromium/mojo/application/ServiceFactoryBinder.java28
-rw-r--r--java/application/src/org/chromium/mojo/application/ShellHelper.java40
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/AutoCloseableRouter.java118
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/BindingsHelper.java199
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/Callbacks.java130
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/ConnectionErrorHandler.java15
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/Connector.java250
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/DataHeader.java70
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/Decoder.java714
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/DelegatingConnectionErrorHandler.java49
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/DeserializationException.java26
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/Encoder.java563
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/ExecutorFactory.java185
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/HandleOwner.java29
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/Interface.java451
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/InterfaceControlMessagesHelper.java89
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/InterfaceRequest.java58
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/Message.java69
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/MessageHeader.java237
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/MessageReceiver.java25
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/MessageReceiverWithResponder.java21
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/Router.java31
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/RouterImpl.java265
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/SerializationException.java26
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/ServiceMessage.java73
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/SideEffectFreeCloseable.java21
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/Struct.java69
-rw-r--r--java/bindings/src/org/chromium/mojo/bindings/Union.java30
-rw-r--r--java/system/src/org/chromium/mojo/system/AsyncWaiter.java53
-rw-r--r--java/system/src/org/chromium/mojo/system/Core.java321
-rw-r--r--java/system/src/org/chromium/mojo/system/DataPipe.java334
-rw-r--r--java/system/src/org/chromium/mojo/system/Flags.java83
-rw-r--r--java/system/src/org/chromium/mojo/system/Handle.java61
-rw-r--r--java/system/src/org/chromium/mojo/system/InvalidHandle.java227
-rw-r--r--java/system/src/org/chromium/mojo/system/MessagePipeHandle.java224
-rw-r--r--java/system/src/org/chromium/mojo/system/MojoException.java44
-rw-r--r--java/system/src/org/chromium/mojo/system/MojoResult.java87
-rw-r--r--java/system/src/org/chromium/mojo/system/Pair.java67
-rw-r--r--java/system/src/org/chromium/mojo/system/ResultAnd.java34
-rw-r--r--java/system/src/org/chromium/mojo/system/RunLoop.java41
-rw-r--r--java/system/src/org/chromium/mojo/system/SharedBufferHandle.java212
-rw-r--r--java/system/src/org/chromium/mojo/system/UntypedHandle.java45
-rw-r--r--js/BUILD.gn12
-rw-r--r--js/bindings.js128
-rw-r--r--js/buffer.js156
-rw-r--r--js/codec.js889
-rw-r--r--js/codec_unittests.js292
-rw-r--r--js/connection.js155
-rw-r--r--js/connector.js132
-rw-r--r--js/constants.cc18
-rw-r--r--js/constants.h22
-rw-r--r--js/core.js239
-rw-r--r--js/core_unittests.js197
-rw-r--r--js/router.js145
-rw-r--r--js/struct_unittests.js279
-rw-r--r--js/support.js30
-rw-r--r--js/test/validation_test_input_parser.js299
-rw-r--r--js/threading.js21
-rw-r--r--js/unicode.js51
-rw-r--r--js/union_unittests.js184
-rw-r--r--js/validation_unittests.js316
-rw-r--r--js/validator.js433
-rw-r--r--mojo.gni51
-rw-r--r--mojo_application.gni438
-rw-r--r--mojo_sdk.gni132
-rw-r--r--platform/dart/BUILD.gn24
-rw-r--r--platform/dart/README.md15
-rw-r--r--platform/dart/dart_handle_watcher.cc597
-rw-r--r--platform/dart/dart_handle_watcher.h216
-rw-r--r--platform/dart/mojo_natives.cc874
-rw-r--r--platform/dart/mojo_natives.h22
-rw-r--r--platform/nacl/BUILD.gn45
-rw-r--r--platform/nacl/libmojo.cc350
-rw-r--r--platform/nacl/mgl_irt.cc119
-rw-r--r--platform/nacl/mgl_irt.h45
-rw-r--r--platform/nacl/mojo_initial_handle.h15
-rw-r--r--platform/nacl/mojo_irt.h129
-rw-r--r--platform/nacl/mojo_main_thunk.cc13
-rw-r--r--platform/native/BUILD.gn134
-rw-r--r--platform/native/gles2/call_visitor.h20
-rw-r--r--platform/native/gles2/call_visitor_autogen.h537
-rw-r--r--platform/native/gles2/call_visitor_chromium_bind_uniform_location_autogen.h14
-rw-r--r--platform/native/gles2/call_visitor_chromium_map_sub_autogen.h29
-rw-r--r--platform/native/gles2/call_visitor_chromium_miscellaneous_autogen.h11
-rw-r--r--platform/native/gles2/call_visitor_chromium_resize_autogen.h14
-rw-r--r--platform/native/gles2/call_visitor_chromium_sync_point_autogen.h12
-rw-r--r--platform/native/gles2/call_visitor_chromium_texture_mailbox_autogen.h27
-rw-r--r--platform/native/gles2/call_visitor_ext_debug_marker_autogen.h19
-rw-r--r--platform/native/gles2/call_visitor_ext_discard_framebuffer_autogen.h14
-rw-r--r--platform/native/gles2/call_visitor_ext_multisampled_render_to_texture_autogen.h27
-rw-r--r--platform/native/gles2/call_visitor_ext_occlusion_query_autogen.h26
-rw-r--r--platform/native/gles2/call_visitor_ext_texture_storage_autogen.h18
-rw-r--r--platform/native/gles2/call_visitor_khr_blend_equation_advanced_autogen.h11
-rw-r--r--platform/native/gles2/call_visitor_occlusion_query_ext_autogen.h26
-rw-r--r--platform/native/gles2/call_visitor_oes_vertex_array_object_autogen.h20
-rw-r--r--platform/native/gles2_impl_chromium_bind_uniform_location_thunks.c36
-rw-r--r--platform/native/gles2_impl_chromium_bind_uniform_location_thunks.h55
-rw-r--r--platform/native/gles2_impl_chromium_map_sub_thunks.c35
-rw-r--r--platform/native/gles2_impl_chromium_map_sub_thunks.h53
-rw-r--r--platform/native/gles2_impl_chromium_miscellaneous_thunks.c36
-rw-r--r--platform/native/gles2_impl_chromium_miscellaneous_thunks.h54
-rw-r--r--platform/native/gles2_impl_chromium_resize_thunks.c35
-rw-r--r--platform/native/gles2_impl_chromium_resize_thunks.h53
-rw-r--r--platform/native/gles2_impl_chromium_sync_point_thunks.c35
-rw-r--r--platform/native/gles2_impl_chromium_sync_point_thunks.h53
-rw-r--r--platform/native/gles2_impl_chromium_texture_mailbox_thunks.c36
-rw-r--r--platform/native/gles2_impl_chromium_texture_mailbox_thunks.h54
-rw-r--r--platform/native/gles2_impl_ext_debug_marker_thunks.c35
-rw-r--r--platform/native/gles2_impl_ext_debug_marker_thunks.h53
-rw-r--r--platform/native/gles2_impl_ext_discard_framebuffer_thunks.c36
-rw-r--r--platform/native/gles2_impl_ext_discard_framebuffer_thunks.h54
-rw-r--r--platform/native/gles2_impl_ext_multisampled_render_to_texture_thunks.c37
-rw-r--r--platform/native/gles2_impl_ext_multisampled_render_to_texture_thunks.h56
-rw-r--r--platform/native/gles2_impl_ext_occlusion_query_thunks.c35
-rw-r--r--platform/native/gles2_impl_ext_occlusion_query_thunks.h53
-rw-r--r--platform/native/gles2_impl_ext_texture_storage_thunks.c35
-rw-r--r--platform/native/gles2_impl_ext_texture_storage_thunks.h53
-rw-r--r--platform/native/gles2_impl_khr_blend_equation_advanced_thunks.c36
-rw-r--r--platform/native/gles2_impl_khr_blend_equation_advanced_thunks.h54
-rw-r--r--platform/native/gles2_impl_oes_vertex_array_object_thunks.c36
-rw-r--r--platform/native/gles2_impl_oes_vertex_array_object_thunks.h54
-rw-r--r--platform/native/gles2_impl_thunks.c26
-rw-r--r--platform/native/gles2_impl_thunks.h48
-rw-r--r--platform/native/gles2_thunks.c56
-rw-r--r--platform/native/mgl_echo_thunks.c23
-rw-r--r--platform/native/mgl_echo_thunks.h46
-rw-r--r--platform/native/mgl_onscreen_thunks.c28
-rw-r--r--platform/native/mgl_onscreen_thunks.h45
-rw-r--r--platform/native/mgl_signal_sync_point_thunks.c25
-rw-r--r--platform/native/mgl_signal_sync_point_thunks.h49
-rw-r--r--platform/native/mgl_thunks.c50
-rw-r--r--platform/native/mgl_thunks.h57
-rw-r--r--platform/native/platform_handle_private.h72
-rw-r--r--platform/native/platform_handle_private_apptest.cc65
-rw-r--r--platform/native/platform_handle_private_thunks.c33
-rw-r--r--platform/native/platform_handle_private_thunks.h33
-rw-r--r--platform/native/system_thunks.c264
-rw-r--r--platform/native/system_thunks.h208
-rw-r--r--platform/native/thunk_export.h18
-rw-r--r--platform/native_cgo/system_cgo.go266
-rw-r--r--python/BUILD.gn161
-rw-r--r--python/c_async_waiter.pxd31
-rw-r--r--python/c_core.pxd203
-rw-r--r--python/c_environment.pxd30
-rw-r--r--python/c_export.pxd11
-rw-r--r--python/c_thunks.pxd12
-rw-r--r--python/dummy_mojo_system/mojo_system.py25
-rw-r--r--python/mojo_application/__init__.py3
-rw-r--r--python/mojo_application/application_delegate.py29
-rw-r--r--python/mojo_application/application_impl.py61
-rw-r--r--python/mojo_application/application_runner.py17
-rw-r--r--python/mojo_application/service_provider_impl.py29
-rw-r--r--python/mojo_bindings/__init__.py3
-rw-r--r--python/mojo_bindings/descriptor.py815
-rw-r--r--python/mojo_bindings/interface_reflection.py467
-rw-r--r--python/mojo_bindings/messaging.py409
-rw-r--r--python/mojo_bindings/promise.py221
-rw-r--r--python/mojo_bindings/reflection.py310
-rw-r--r--python/mojo_bindings/serialization.py309
-rw-r--r--python/mojo_system.pyx798
-rw-r--r--python/mojo_system_impl.pyx72
-rw-r--r--python/rules.gni118
-rw-r--r--python/src/common.cc189
-rw-r--r--python/src/common.h109
-rw-r--r--python/src/python_system_helper.cc43
-rw-r--r--python/src/python_system_helper.h30
-rw-r--r--rust/Cargo.toml15
-rw-r--r--rust/README.md55
-rw-r--r--rust/build.rs78
-rw-r--r--rust/src/bindings/decoding.rs381
-rw-r--r--rust/src/bindings/encoding.rs402
-rw-r--r--rust/src/bindings/macros.rs131
-rw-r--r--rust/src/bindings/message.rs110
-rw-r--r--rust/src/bindings/mod.rs13
-rw-r--r--rust/src/bindings/mojom.rs897
-rw-r--r--rust/src/bindings/run_loop.rs672
-rw-r--r--rust/src/bindings/util.rs49
-rw-r--r--rust/src/lib.rs148
-rw-r--r--rust/src/system/core.rs65
-rw-r--r--rust/src/system/data_pipe.rs439
-rw-r--r--rust/src/system/ffi.rs233
-rw-r--r--rust/src/system/handle.rs122
-rw-r--r--rust/src/system/message_pipe.rs208
-rw-r--r--rust/src/system/mod.rs18
-rw-r--r--rust/src/system/mojo_types.rs278
-rw-r--r--rust/src/system/shared_buffer.rs238
-rw-r--r--rust/src/system/wait_set.rs155
-rw-r--r--rust/tests/encoding.rs705
-rw-r--r--rust/tests/integration.rs67
-rw-r--r--rust/tests/regression.rs107
-rw-r--r--rust/tests/run_loop.rs386
-rw-r--r--rust/tests/system.rs264
-rw-r--r--rust/tests/util/mod.rs95
-rw-r--r--rust/tests/util/mojom_validation.rs3243
-rw-r--r--rust/tests/validation.rs131
-rw-r--r--third_party/README.txt2
-rw-r--r--third_party/jinja2/AUTHORS33
-rw-r--r--third_party/jinja2/Jinja2-2.7.1.tar.gz.md51
-rw-r--r--third_party/jinja2/Jinja2-2.7.1.tar.gz.sha5121
-rw-r--r--third_party/jinja2/LICENSE31
-rw-r--r--third_party/jinja2/README.chromium25
-rw-r--r--third_party/jinja2/__init__.py69
-rw-r--r--third_party/jinja2/_compat.py150
-rw-r--r--third_party/jinja2/_stringdefs.py132
-rw-r--r--third_party/jinja2/bccache.py311
-rw-r--r--third_party/jinja2/compiler.py1640
-rw-r--r--third_party/jinja2/constants.py32
-rw-r--r--third_party/jinja2/debug.py337
-rw-r--r--third_party/jinja2/defaults.py43
-rw-r--r--third_party/jinja2/environment.py1191
-rw-r--r--third_party/jinja2/exceptions.py146
-rw-r--r--third_party/jinja2/ext.py636
-rw-r--r--third_party/jinja2/filters.py987
-rwxr-xr-xthird_party/jinja2/get_jinja2.sh123
-rw-r--r--third_party/jinja2/lexer.py733
-rw-r--r--third_party/jinja2/loaders.py471
-rw-r--r--third_party/jinja2/meta.py103
-rw-r--r--third_party/jinja2/nodes.py914
-rw-r--r--third_party/jinja2/optimizer.py68
-rw-r--r--third_party/jinja2/parser.py895
-rw-r--r--third_party/jinja2/runtime.py581
-rw-r--r--third_party/jinja2/sandbox.py368
-rw-r--r--third_party/jinja2/tests.py149
-rw-r--r--third_party/jinja2/utils.py520
-rw-r--r--third_party/jinja2/visitor.py87
-rw-r--r--third_party/markupsafe/AUTHORS13
-rw-r--r--third_party/markupsafe/LICENSE33
-rw-r--r--third_party/markupsafe/MarkupSafe-0.18.tar.gz.md51
-rw-r--r--third_party/markupsafe/MarkupSafe-0.18.tar.gz.sha5121
-rw-r--r--third_party/markupsafe/README.chromium24
-rw-r--r--third_party/markupsafe/__init__.py234
-rw-r--r--third_party/markupsafe/_compat.py24
-rw-r--r--third_party/markupsafe/_constants.py267
-rw-r--r--third_party/markupsafe/_native.py46
-rw-r--r--third_party/markupsafe/_speedups.c239
-rwxr-xr-xthird_party/markupsafe/get_markupsafe.sh121
-rw-r--r--tools/BUILD.gn103
-rw-r--r--tools/NETWORK_SERVICE_VERSION1
-rw-r--r--tools/bindings/BUILD.gn10
-rw-r--r--tools/bindings/generators/cpp_templates/enum_macros.tmpl68
-rw-r--r--tools/bindings/generators/cpp_templates/interface_declaration.tmpl24
-rw-r--r--tools/bindings/generators/cpp_templates/interface_definition.tmpl233
-rw-r--r--tools/bindings/generators/cpp_templates/interface_macros.tmpl58
-rw-r--r--tools/bindings/generators/cpp_templates/interface_proxy_declaration.tmpl13
-rw-r--r--tools/bindings/generators/cpp_templates/interface_request_validator_declaration.tmpl6
-rw-r--r--tools/bindings/generators/cpp_templates/interface_response_validator_declaration.tmpl6
-rw-r--r--tools/bindings/generators/cpp_templates/interface_stub_declaration.tmpl15
-rw-r--r--tools/bindings/generators/cpp_templates/module-common.cc.tmpl280
-rw-r--r--tools/bindings/generators/cpp_templates/module-common.h.tmpl223
-rw-r--r--tools/bindings/generators/cpp_templates/module-internal.h.tmpl83
-rw-r--r--tools/bindings/generators/cpp_templates/module-sync.cc.tmpl120
-rw-r--r--tools/bindings/generators/cpp_templates/module-sync.h.tmpl73
-rw-r--r--tools/bindings/generators/cpp_templates/module.cc.tmpl31
-rw-r--r--tools/bindings/generators/cpp_templates/module.h.tmpl59
-rw-r--r--tools/bindings/generators/cpp_templates/struct_declaration.tmpl50
-rw-r--r--tools/bindings/generators/cpp_templates/struct_definition.tmpl213
-rw-r--r--tools/bindings/generators/cpp_templates/struct_macros.tmpl280
-rw-r--r--tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl7
-rw-r--r--tools/bindings/generators/cpp_templates/struct_serialization_definition.tmpl99
-rw-r--r--tools/bindings/generators/cpp_templates/union_declaration.tmpl57
-rw-r--r--tools/bindings/generators/cpp_templates/union_definition.tmpl106
-rw-r--r--tools/bindings/generators/cpp_templates/union_serialization_declaration.tmpl7
-rw-r--r--tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl172
-rw-r--r--tools/bindings/generators/cpp_templates/validation_macros.tmpl66
-rw-r--r--tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl77
-rw-r--r--tools/bindings/generators/cpp_templates/wrapper_class_definition.tmpl46
-rw-r--r--tools/bindings/generators/cpp_templates/wrapper_union_class_declaration.tmpl56
-rw-r--r--tools/bindings/generators/cpp_templates/wrapper_union_class_definition.tmpl134
-rw-r--r--tools/bindings/generators/dart_templates/encoding_macros.tmpl101
-rw-r--r--tools/bindings/generators/dart_templates/enum_definition.tmpl57
-rw-r--r--tools/bindings/generators/dart_templates/interface_definition.tmpl438
-rw-r--r--tools/bindings/generators/dart_templates/module.lib.tmpl34
-rw-r--r--tools/bindings/generators/dart_templates/module_definition.tmpl60
-rw-r--r--tools/bindings/generators/dart_templates/struct_definition.tmpl101
-rw-r--r--tools/bindings/generators/dart_templates/union_definition.tmpl114
-rw-r--r--tools/bindings/generators/go_templates/encoding_macros.tmpl220
-rw-r--r--tools/bindings/generators/go_templates/enum.tmpl30
-rw-r--r--tools/bindings/generators/go_templates/interface.tmpl294
-rw-r--r--tools/bindings/generators/go_templates/runtime_type_macros.tmpl37
-rw-r--r--tools/bindings/generators/go_templates/source.tmpl95
-rw-r--r--tools/bindings/generators/go_templates/struct.tmpl71
-rw-r--r--tools/bindings/generators/go_templates/union.tmpl124
-rw-r--r--tools/bindings/generators/java_templates/constant_definition.tmpl3
-rw-r--r--tools/bindings/generators/java_templates/constants.java.tmpl12
-rw-r--r--tools/bindings/generators/java_templates/data_types_definition.tmpl385
-rw-r--r--tools/bindings/generators/java_templates/enum.java.tmpl4
-rw-r--r--tools/bindings/generators/java_templates/enum_definition.tmpl21
-rw-r--r--tools/bindings/generators/java_templates/header.java.tmpl11
-rw-r--r--tools/bindings/generators/java_templates/interface.java.tmpl4
-rw-r--r--tools/bindings/generators/java_templates/interface_definition.tmpl289
-rw-r--r--tools/bindings/generators/java_templates/interface_internal.java.tmpl4
-rw-r--r--tools/bindings/generators/java_templates/struct.java.tmpl4
-rw-r--r--tools/bindings/generators/java_templates/union.java.tmpl4
-rw-r--r--tools/bindings/generators/js_templates/enum_definition.tmpl13
-rw-r--r--tools/bindings/generators/js_templates/interface_definition.tmpl188
-rw-r--r--tools/bindings/generators/js_templates/module.amd.tmpl23
-rw-r--r--tools/bindings/generators/js_templates/module_definition.tmpl49
-rw-r--r--tools/bindings/generators/js_templates/struct_definition.tmpl100
-rw-r--r--tools/bindings/generators/js_templates/union_definition.tmpl146
-rw-r--r--tools/bindings/generators/js_templates/validation_macros.tmpl52
-rw-r--r--tools/bindings/generators/mojom_cpp_generator.py476
-rw-r--r--tools/bindings/generators/mojom_dart_generator.py663
-rw-r--r--tools/bindings/generators/mojom_go_generator.py455
-rw-r--r--tools/bindings/generators/mojom_java_generator.py532
-rw-r--r--tools/bindings/generators/mojom_js_generator.py416
-rw-r--r--tools/bindings/generators/mojom_python_generator.py245
-rw-r--r--tools/bindings/generators/python_templates/module.py.tmpl65
-rw-r--r--tools/bindings/generators/python_templates/module_macros.tmpl49
-rw-r--r--tools/bindings/mojom.gni582
-rwxr-xr-xtools/bindings/mojom_bindings_generator.py112
-rwxr-xr-xtools/bindings/mojom_list_dart_outputs.py63
-rwxr-xr-xtools/bindings/mojom_tool.py44
-rw-r--r--tools/bindings/mojom_tool/bin/README.md26
-rw-r--r--tools/bindings/mojom_tool/bin/linux64/generators/c.sha11
-rw-r--r--tools/bindings/mojom_tool/bin/linux64/generators/deps.sha11
-rw-r--r--tools/bindings/mojom_tool/bin/linux64/generators/go.sha11
l---------tools/bindings/mojom_tool/bin/linux64/generators/legacy1
-rw-r--r--tools/bindings/mojom_tool/bin/linux64/generators/rust.sha11
-rw-r--r--tools/bindings/mojom_tool/bin/linux64/mojom.sha11
-rw-r--r--tools/bindings/mojom_tool/bin/mac64/generators/c.sha11
-rw-r--r--tools/bindings/mojom_tool/bin/mac64/generators/deps.sha11
-rw-r--r--tools/bindings/mojom_tool/bin/mac64/generators/go.sha11
l---------tools/bindings/mojom_tool/bin/mac64/generators/legacy1
-rw-r--r--tools/bindings/mojom_tool/bin/mac64/mojom.sha11
-rw-r--r--tools/bindings/pylib/mojom/__init__.py0
-rw-r--r--tools/bindings/pylib/mojom/error.py27
-rw-r--r--tools/bindings/pylib/mojom/fileutil.py18
-rw-r--r--tools/bindings/pylib/mojom/generate/__init__.py0
-rw-r--r--tools/bindings/pylib/mojom/generate/constant_resolver.py96
-rw-r--r--tools/bindings/pylib/mojom/generate/generated/README.md9
-rw-r--r--tools/bindings/pylib/mojom/generate/generated/__init__.py0
-rw-r--r--tools/bindings/pylib/mojom/generate/generated/mojom_files_mojom.py47
-rw-r--r--tools/bindings/pylib/mojom/generate/generated/mojom_types_mojom.py334
-rw-r--r--tools/bindings/pylib/mojom/generate/generator.py186
-rw-r--r--tools/bindings/pylib/mojom/generate/module.py590
-rw-r--r--tools/bindings/pylib/mojom/generate/module_tests.py34
-rwxr-xr-xtools/bindings/pylib/mojom/generate/mojom_translator.py901
-rw-r--r--tools/bindings/pylib/mojom/generate/mojom_translator_unittest.py1097
-rw-r--r--tools/bindings/pylib/mojom/generate/pack.py127
-rwxr-xr-xtools/bindings/pylib/mojom/generate/run_tests.py33
-rw-r--r--tools/bindings/pylib/mojom/generate/template_expander.py52
-rw-r--r--tools/bindings/pylib/mojom/generate/test_support.py193
-rw-r--r--tools/bindings/pylib/mojom/parse/__init__.py0
-rwxr-xr-xtools/bindings/pylib/mojom/parse/parser_runner.py127
-rw-r--r--tools/bindings/pylib/mojom_tests/__init__.py0
-rw-r--r--tools/bindings/pylib/mojom_tests/fileutil_unittest.py55
-rw-r--r--tools/bindings/pylib/mojom_tests/generate/__init__.py0
-rw-r--r--tools/bindings/pylib/mojom_tests/generate/generator_unittest.py37
-rw-r--r--tools/bindings/pylib/mojom_tests/generate/module_unittest.py37
-rw-r--r--tools/bindings/pylib/mojom_tests/support/__init__.py0
-rw-r--r--tools/bindings/pylib/mojom_tests/support/find_files.py32
-rw-r--r--tools/bindings/pylib/mojom_tests/support/run_bindings_generator.py47
-rwxr-xr-xtools/bindings/run_code_generators.py185
-rwxr-xr-xtools/dart_analyze.py107
-rwxr-xr-xtools/dart_package_name.py38
-rwxr-xr-xtools/dart_pkg.py293
-rwxr-xr-xtools/dart_pkg_static_analysis.py119
-rwxr-xr-xtools/dart_snapshotter.py33
-rwxr-xr-xtools/dartx.py33
-rwxr-xr-xtools/download_dart_snapshotter.py101
-rwxr-xr-xtools/download_network_service.py85
-rwxr-xr-xtools/download_shell_binary.py101
-rwxr-xr-xtools/gn/last_commit_timestamp.py36
-rwxr-xr-xtools/gn/unzip.py46
-rwxr-xr-xtools/gn/zip.py66
-rwxr-xr-xtools/ls.py31
-rwxr-xr-xtools/prepend.py37
-rw-r--r--tools/pylib/gs.py34
903 files changed, 0 insertions, 103895 deletions
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index f99f2ab..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,17 +0,0 @@
-*.pyc
-/tools/prebuilt/
-
-# Download the Mojom parser binary.
-/tools/bindings/mojom_tool/bin/linux64/mojom
-/tools/bindings/mojom_tool/bin/linux64/mojom.stamp
-/tools/bindings/mojom_tool/bin/mac64/mojom
-/tools/bindings/mojom_tool/bin/mac64/mojom.stamp
-
-# Download the mojom generators.
-# A generator is anything in the generators directory except sha1 files.
-/tools/bindings/mojom_tool/bin/linux64/generators/
-/tools/bindings/mojom_tool/bin/mac64/generators/
-!/tools/bindings/mojom_tool/bin/linux64/generators/*.sha1
-!/tools/bindings/mojom_tool/bin/mac64/generators/*.sha1
-!/tools/bindings/mojom_tool/bin/linux64/generators/legacy
-!/tools/bindings/mojom_tool/bin/mac64/generators/legacy
diff --git a/BUILD.gn b/BUILD.gn
deleted file mode 100644
index 4c9bb3d..0000000
--- a/BUILD.gn
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import("mojo.gni")
-
-group("public") {
- # Meta-target, don't link into production code.
- testonly = true
- deps = [
- ":libmojo_sdk",
- ":sdk",
- "cpp/application:standalone",
- "cpp/bindings",
- "cpp/environment:standalone",
- "cpp/utility",
- "interfaces/bindings/tests:test_interfaces",
- ]
-
- if (is_linux && !is_fnl) {
- deps += [
- "python",
- "tools/bindings",
- ]
- }
-
- if (is_android) {
- deps += [
- "java:application",
- "java:bindings",
- "java:system",
- ]
- }
-}
-
-group("sdk") {
- deps = [
- "c:system",
- "cpp/application:standalone",
- "cpp/bindings",
- "cpp/environment:standalone",
- "cpp/utility",
- "interfaces/application",
- "interfaces/bindings",
- "js",
- ]
-
- if (mojo_use_network_in_sdk) {
- deps += [ "interfaces/network" ]
- }
-}
-
-static_library("libmojo_sdk") {
- complete_static_lib = true
- deps = [
- ":sdk",
- ]
-}
-
-# "Forwarding" target, to make it easy to put gtest wherever you want.
-# TODO(vtl): Maybe this should be parametrized and made into
-# //build/module_args/mojo.gni (but maybe that's overkill).
-group("gtest") {
- testonly = true
- public_deps = [
- "//testing/gtest",
- ]
-}
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 972bb2e..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/README.md b/README.md
deleted file mode 100644
index a31a8a8..0000000
--- a/README.md
+++ /dev/null
@@ -1,43 +0,0 @@
-Mojo Public API
-===============
-
-The Mojo Public API is a binary stable API to the Mojo system.
-
-It consists of support for a number of programming languages (with a directory
-for each support language), some "build" tools and build-time requirements, and
-interface definitions for Mojo services (specified using an IDL).
-
-Note that there are various subdirectories named tests/. These contain tests of
-the code in the enclosing directory, and are not meant for use by Mojo
-applications.
-
-C/CPP/JS
---------
-
-The c/, cpp/, js/ subdirectories define the API for C, C++, and JavaScript,
-respectively.
-
-The basic principle for these directories is that they consist of the source
-files that one needs at build/deployment/run time (as appropriate for the
-language), organized in a natural way for the particular language.
-
-Interfaces
-----------
-
-The interfaces/ subdirectory contains Mojo IDL (a.k.a. .mojom) descriptions of
-standard Mojo services.
-
-Platform
---------
-
-The platform/ subdirectory contains any build-time requirements (e.g., static
-libraries) that may be needed to produce a Mojo application for certain
-platforms, such as a native shared library or as a NaCl binary.
-
-Tools
------
-
-The tools/ subdirectory contains tools that are useful/necessary at
-build/deployment time. These tools may be needed (as a practical necessity) to
-use the API in any given language, e.g., to generate bindings from Mojo IDL
-files.
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn
deleted file mode 100644
index 3b85c1e..0000000
--- a/build/config/BUILD.gn
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import("../../mojo_sdk.gni")
-
-config("mojo_sdk") {
- include_dirs = [
- # Include paths in the Mojo public SDK are specified relative to the
- # directory holding the SDK.
- mojo_root,
-
- # The same goes for files generated from mojoms.
- root_gen_dir + mojo_root,
-
- # Mojo C headers should be included as <mojo/...>. The
- # mojo/public/c:c_config config theoretically makes this work, but this
- # requires that everyone use public_deps correctly (in order to propagate
- # the config).
- # TODO(vtl): Try to fix everyone, so that this isn't necessary. (That, or
- # consider using all_dependent_configs instead.
- "$mojo_root/mojo/public/c/include",
- ]
-}
diff --git a/c/BUILD.gn b/c/BUILD.gn
deleted file mode 100644
index 8975441..0000000
--- a/c/BUILD.gn
+++ /dev/null
@@ -1,363 +0,0 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import("../mojo_sdk.gni")
-
-config("c_config") {
- include_dirs = [ "include" ]
-}
-
-# Catch-all for all public C headers/libraries, except for the bindings.
-group("c") {
- public_deps = [
- ":common",
- ":system",
- ]
-}
-
-# bindings ---------------------------------------------------------------------
-
-# Headers in include/mojo/bindings (to be included as <mojo/bindings/HEADER.h>)
-# and library in lib/bindings.
-#
-# Depends on :common and :system (minimally -- just <mojo/system/handle.h>).
-
-mojo_sdk_source_set("bindings") {
- public_configs = [ ":c_config" ]
-
- sources = [
- # Public headers.
- "include/mojo/bindings/array.h",
- "include/mojo/bindings/buffer.h",
- "include/mojo/bindings/interface.h",
- "include/mojo/bindings/map.h",
- "include/mojo/bindings/message.h",
- "include/mojo/bindings/string.h",
- "include/mojo/bindings/struct.h",
- "include/mojo/bindings/union.h",
- "include/mojo/bindings/validation.h",
-
- # Internal headers.
- "include/mojo/bindings/internal/type_descriptor.h",
- "include/mojo/bindings/internal/util.h",
-
- # Implementation library.
- # TODO(vtl): Maybe separate this out into a separate source set (or even
- # static library?).
- "lib/bindings/array.c",
- "lib/bindings/buffer.c",
- "lib/bindings/map.c",
- "lib/bindings/message.c",
- "lib/bindings/struct.c",
- "lib/bindings/type_descriptor.c",
- "lib/bindings/union.c",
- ]
-
- deps = [
- ":system",
- ]
-}
-
-mojo_sdk_source_set("bindings_unittests") {
- testonly = true
-
- sources = [
- "tests/bindings/array_unittest.cc",
- "tests/bindings/buffer_unittest.cc",
- "tests/bindings/message_unittest.cc",
- "tests/bindings/struct_unittest.cc",
- "tests/bindings/testing_util.h",
- "tests/bindings/union_unittest.cc",
- "tests/bindings/validation_unittest.cc",
- ]
-
- deps = [
- ":bindings",
- ]
-
- mojo_sdk_deps = [
- "mojo/public:gtest",
- "mojo/public/cpp/bindings/tests:mojo_public_bindings_test_utils",
- "mojo/public/cpp/bindings/tests:validation_util",
- "mojo/public/cpp/test_support",
- "mojo/public/cpp/system",
-
- # The "_c" suffix'd target compiles the generated C bindings to this mojom
- # target.
- "mojo/public/interfaces/bindings/tests:test_interfaces_c",
- ]
-}
-
-# common -----------------------------------------------------------------------
-
-# Headers in include/mojo (to be included as <mojo/HEADER.h>).
-#
-# Depends on nothing.
-
-mojo_sdk_source_set("common") {
- public_configs = [ ":c_config" ]
-
- sources = [
- "include/mojo/macros.h",
- "include/mojo/result.h",
- ]
-}
-
-mojo_sdk_source_set("common_unittests") {
- testonly = true
-
- sources = [
- "tests/macros_unittest.cc",
- "tests/result_unittest.cc",
- ]
-
- deps = [
- ":common",
- ]
-
- mojo_sdk_deps = [ "mojo/public:gtest" ]
-}
-
-# environment ------------------------------------------------------------------
-
-# Headers in include/mojo/environment (to be included as
-# <mojo//environment/HEADER.h>).
-#
-# Depends on :system (and thus :common).
-
-mojo_sdk_source_set("environment") {
- public_configs = [ ":c_config" ]
-
- sources = [
- "include/mojo/environment/async_waiter.h",
- "include/mojo/environment/logger.h",
- ]
-
- public_deps = [
- ":system",
- ]
-}
-
-mojo_sdk_source_set("environment_perftest_helpers") {
- testonly = true
-
- sources = [
- "tests/environment/async_waiter_perftest_helpers.cc",
- "tests/environment/async_waiter_perftest_helpers.h",
- ]
-
- public_deps = [
- ":environment",
- ]
-
- mojo_sdk_deps = [ "mojo/public/cpp/system" ]
-}
-
-# gpu / gpu_onscreen -----------------------------------------------------------
-
-# TODO(vtl): Rationalize this to be more like the others. Probably, we should
-# just have :GLES2, :MGL, etc. targets (and no :gpu/:gpu_onscreen).
-
-group("gpu") {
- public_deps = [
- ":GLES2",
- ":MGL",
- ":MGL_signal_sync_point",
- ]
-
- deps = [
- "../platform/native:gles2_thunks",
- ]
- if (!is_nacl) {
- deps += [ "../platform/native:mgl_thunks" ]
- }
-}
-
-group("gpu_onscreen") {
- public_deps = [
- ":MGL_onscreen",
- ":gpu",
- ]
-
- if (!is_nacl) {
- deps = [
- "../platform/native:mgl_onscreen_thunks",
- ]
- }
-}
-
-mojo_sdk_source_set("MGL") {
- public_configs = [ ":c_config" ]
-
- sources = [
- "include/MGL/mgl.h",
- "include/MGL/mgl_types.h",
- ]
-
- public_deps = [
- ":system",
- ]
-}
-
-mojo_sdk_source_set("MGL_onscreen") {
- public_configs = [ ":c_config" ]
-
- sources = [
- "include/MGL/mgl_onscreen.h",
- ]
-
- public_deps = [
- ":MGL",
- ]
-}
-
-mojo_sdk_source_set("MGL_echo") {
- public_configs = [ ":c_config" ]
-
- sources = [
- "include/MGL/mgl_echo.h",
- ]
-
- public_deps = [
- ":MGL",
- ]
-}
-
-mojo_sdk_source_set("MGL_signal_sync_point") {
- public_configs = [ ":c_config" ]
-
- sources = [
- "include/MGL/mgl_signal_sync_point.h",
- ]
-
- public_deps = [
- ":MGL",
- ]
-}
-
-mojo_sdk_source_set("GLES2") {
- public_configs = [ ":c_config" ]
-
- sources = [
- "include/GLES2/gl2.h",
- "include/GLES2/gl2ext.h",
- "include/GLES2/gl2extmojo.h",
- "include/GLES2/gl2mojo_autogen.h",
- "include/GLES2/gl2mojo_internal.h",
- "include/GLES2/gl2platform.h",
- ]
-
- public_deps = [
- ":KHR",
- ]
-}
-
-mojo_sdk_source_set("KHR") {
- public_configs = [ ":c_config" ]
-
- sources = [
- "include/KHR/khrplatform.h",
- ]
-}
-
-# system -----------------------------------------------------------------------
-
-# Headers in include/mojo/system (to be included as <mojo/system/HEADER.h>).
-#
-# Depends on :common.
-
-mojo_sdk_source_set("system") {
- public_configs = [ ":c_config" ]
-
- sources = [
- "include/mojo/system/buffer.h",
- "include/mojo/system/data_pipe.h",
- "include/mojo/system/handle.h",
- "include/mojo/system/main.h",
- "include/mojo/system/message_pipe.h",
- "include/mojo/system/time.h",
- "include/mojo/system/wait.h",
- "include/mojo/system/wait_set.h",
- ]
-
- public_deps = [
- ":common",
- ]
-}
-
-mojo_sdk_source_set("system_unittests") {
- testonly = true
-
- sources = [
- "tests/system/buffer_unittest.cc",
- "tests/system/data_pipe_unittest.cc",
- "tests/system/handle_unittest.cc",
- "tests/system/message_pipe_unittest.cc",
- "tests/system/time_unittest.cc",
- "tests/system/wait_set_unittest.cc",
- "tests/system/wait_unittest.cc",
- ]
-
- deps = [
- ":system",
- ]
-
- mojo_sdk_deps = [ "mojo/public:gtest" ]
-}
-
-mojo_sdk_source_set("system_perftests") {
- testonly = true
-
- sources = [
- "tests/system/message_pipe_perftest.cc",
- "tests/system/perftest_utils.cc",
- "tests/system/perftest_utils.h",
- "tests/system/reference_perftest.cc",
- "tests/system/wait_set_perftest.cc",
- ]
-
- deps = [
- ":system",
- ]
-
- mojo_sdk_deps = [
- "mojo/public:gtest",
- "mojo/public/cpp/test_support",
- ]
-}
-
-# Compilation tests ------------------------------------------------------------
-
-# This test ensures that various headers compile and link properly.
-mojo_sdk_source_set("compile_unittests") {
- testonly = true
-
- sources = [
- "tests/compile/compile_unittest.cc",
- ]
-
- deps = [
- ":pure_compile_tests",
- ]
-
- mojo_sdk_deps = [ "mojo/public:gtest" ]
-}
-
-# This source set contains "pure" tests that only depend on the public SDK (and
-# the standard library), and in particular not on gtest (whose headers don't
-# compile with "-Wundef").
-mojo_sdk_source_set("pure_compile_tests") {
- testonly = true
-
- visibility = [ ":compile_unittests" ]
-
- cflags = [ "-Wundef" ]
-
- sources = [
- "tests/compile/pure_c.c",
- "tests/compile/pure_cpp.cc",
- ]
-
- mojo_sdk_deps = [ "mojo/public/c:environment" ]
-}
diff --git a/c/PRESUBMIT.py b/c/PRESUBMIT.py
deleted file mode 100644
index 4cba433..0000000
--- a/c/PRESUBMIT.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Presubmit script for mojo/public/c.
-
-See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
-for more details about the presubmit API built into depot_tools.
-"""
-
-def CheckChangeOnUpload(input_api, output_api):
- results = []
- results += input_api.canned_checks.CheckChangeHasOnlyOneEol(input_api,
- output_api)
- results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api)
- return results
diff --git a/c/README.md b/c/README.md
deleted file mode 100644
index 8e11545..0000000
--- a/c/README.md
+++ /dev/null
@@ -1,45 +0,0 @@
-Mojo Public C API
-=================
-
-This directory contains C language bindings for the Mojo Public API.
-
-Environment
------------
-
-The environment/ subdirectory defines some common things that, while not part of
-the system API, may be required for GLES2 (for example). These are things that a
-Mojo application may be required to provide to the GLES2 (for example) library
-in order to use it. (However, the Mojo application may implement these things as
-it sees fit.)
-
-GLES2
------
-
-The gles2/ subdirectory defines the GLES2 C API that's available to Mojo
-applications. To use GLES2, Mojo applications must link against a dynamic
-library (the exact mechanism being platform-dependent) and use the header files
-in this directory as well as the standard Khronos GLES2 header files.
-
-The reason for this, rather than providing GLES2 using the standard Mojo IPC
-mechanism, is performance: The protocol (and transport mechanisms) used to
-communicate with the Mojo GLES2 service is not stable nor "public" (mainly for
-performance reasons), and using the dynamic library shields the application from
-changes to the underlying system.
-
-System
-------
-
-The system/ subdirectory provides definitions of the basic low-level API used by
-all Mojo applications (whether directly or indirectly). These consist primarily
-of the IPC primitives used to communicate with Mojo services.
-
-Though the message protocol is stable, the implementation of the transport is
-not, and access to the IPC mechanisms must be via the primitives defined in this
-directory.
-
-Test Support
-------------
-
-This directory contains a C API for running tests. This API is only available
-under special, specific test conditions. It is not meant for general use by Mojo
-applications.
diff --git a/c/docs/bindings/INTERNALS.md b/c/docs/bindings/INTERNALS.md
deleted file mode 100644
index d44d20f..0000000
--- a/c/docs/bindings/INTERNALS.md
+++ /dev/null
@@ -1,151 +0,0 @@
-This document describes some of the internals of the C bindings, along with some
-numbers.
-
-# Generated code
-
-One of the goals of the C bindings is to generate minimal code and use little
-memory. The C bindings achieve this by generating type descriptors for each
-mojom type that contain information required for encoding, decoding and
-validation. For instance, type descriptions for mojom structs describe where the
-pointer and handle fields in a struct are located, which of them are nullable,
-the sizes of different versions of the struct, etc. Using this information, we
-can avoid generating separate encoding, decoding and validation code for each
-struct, and instead rely on a common encoding function shared amongst all mojom
-structs which consume these generated type descriptions. Simiarly, type
-descriptions are generated for every instance of arrays, maps, and unions. These
-type descriptions live in the `.rodata` (or similar) section of a binary.
-
-# Sizes of type descriptors
-
-The following subsections describe the space cost of type descriptors generated
-for different mojom types on a 64-bit system. The C data types for type
-descriptors are located in `bindings/type_descriptor.h`, which is the
-canonical place for up-to-date documentation of type description tables, how
-they are structured and used.
-
-## Structs
-A type descriptor for a mojom struct contains:
-- A version table (pointer, 8 bytes):
- - Each version is described by a `version` <=> `size of struct` (8 bytes)
- - Number of elements in the version table (4 bytes)
-- Pointer/handle location table (pointer, 8 bytes):
- - Array of `struct MojomTypeDescriptorStructEntry` (roughly 20 bytes per
- field), each entry describing a pointer or handle field.
- - Number of entries in the table (4 bytes)
-
-Example:
-```mojom
-struct Rect {
- int32 x;
- int32 y;
- int32 w;
- int32 h;
-};
-```
-
-This struct has just 1 version, and no pointer or handle fields. It takes up `8
-bytes + 8 bytes + 4 bytes` for the version table, another `8 bytes + 4 bytes`
-for the location table, for a total of **32 bytes**. Adding any additional
-non-handle/pointer fields will not grow the generated type descriptior for this
-mojom struct.
-
-Another example:
-```mojom
-struct RectPair {
- Rect a;
- Rect b;
-};
-```
-
-RectPair similarly has 1 version (accounting for `8 + 8 + 4 bytes`), but has 2
-pointer types, which puts its location table to `8 + 4 + 20*2 bytes`, bringing
-its type descriptor to **72 bytes** in size.
-
-## Arrays and Strings
-
-A type descriptor for a mojom array contains:
-- The type of its entries, and a pointer to its type descriptor (roughly 1 + 8
- bytes)
-- Number of elements in the array, only applicable if defined in the mojom IDL
- (4 bytes)
-- Size (in number of bits) of a single element. (4 bytes)
-- If its elements can be nullable (1 byte).
-
-A single array of any type (e.g., `array<int8>`) will therefore take roughly **18
-bytes**. However, an array of other composite types can end up forming a chain of
-type descriptors. For example, consider `array<array<int8>>`: 18 bytes for the
-outer-array, and another 18 bytes for `array<int8>`, totalling **36 bytes**.
-
-Strings are arrays of UTF-8 encoded characters; A type descriptor for a string
-is always the same (it is composed of a variable number of characters). For this
-reason, the bindings library comes with a single type descriptor for an array of
-characters, so a new type descriptor is not generated for every instance of a
-string.
-
-## Maps
-
-A map is just a mojom struct with 2 mojom arrays, so a type descriptor for a simple map (mapping a POD
-to a POD) could take `32 bytes + 2 * (18 bytes)` = **68 bytes**. A new type
-descriptor is generated for every occurance of a mojom map. A possible optimization in
-the future is to deduplicate identical type descriptors and share them.
-
-## Unions
-
-TODO(vardhan)
-
-## Interfaces
-
-Interfaces are composed of messages, each of which is composed of a request
-parameters, and possibly response parameters. For example:
-
-```mojom
-struct Person { ... };
-
-interface Population {
- GetPerson(string name) => (Person p);
-};
-```
-
-Consits of two mojom structs, equivalent to:
-```mojom
-struct Population_GetPerson_Request {
- string name;
-}
-struct Population_GetPerson_Response {
- Person p;
-};
-```
-
-The request struct takes up **32 bytes** (taken from the example in the
-**Structs** section above) **+ 8 bytes** (for the string entry). Similarly, the
-response struct takes up another **32+8 bytes** bytes (this is not accounting
-for the space taken up by the `struct Person` type descriptor).
-
-## Other types
-
-TODO(vardhan)
-
-# Compiled code size
-
-A lot of these generated type descriptors can be compacted further, if required.
-This kind of optimization could be done later when things are more stable. There
-are also opportunities to de-duplicate generated type descriptors, notable for
-arrays and maps (e.g., we only need one type descriptor for array<int8> that
-could be shared across all mojom structs).
-
-Comparing the sizes of an example mojo echo client in C and C++ (which can be
-found in the domokit/mojo github repo), built for Linux:
-
-C++ echo client:
-```bash
-$ size out/Release/echo_client.mojo
- text data bss dec hex filename
-134194 4528 436 139158 21f96 out/Release/echo_client.mojo
-```
-
-C echo client:
-```bash
-$ size out/Release/c_echo_client.mojo
-text data bss dec hex filename
-9834 1328 264 11426 2ca2 out/Release/c_echo_client.mojo
-```
diff --git a/c/docs/bindings/TUTORIAL.md b/c/docs/bindings/TUTORIAL.md
deleted file mode 100644
index 629f185..0000000
--- a/c/docs/bindings/TUTORIAL.md
+++ /dev/null
@@ -1,372 +0,0 @@
-# C bindings guide
-
-The Mojo C bindings are a way to talk the Mojom protocol, the canonical protocol
-for communication between Mojo programs. The library under `bindings/` provides
-functionality for encoding, decoding and other computation, so it needs to be
-linked together with C code generated from .mojom files. These C bindings are
-lower-level than the C++ bindings (or any other language, for that matter),
-are more error-prone, and require some knowledge of the C Mojo API and the
-mojom encoding format. This document assumes the reader knows about (or knows
-how to look up) this relevant information. Consequently, C bindings can also
-be faster; generated bindings are smaller than the C++ equivalent, while
-encoding and decoding is faster. The intention is to use them only when you
-require speed and flexibility.
-
-## Structs
-
-Let's look at what the generated code looks like for the following struct:
-
-``` mojom
-module example;
-
-enum Gender { MALE, FEMALE };
-struct Person {
- uint32 age;
- string name;
- Gender gender;
-};
-```
-
-A small snippet of the generated C code for the struct and enum:
-
-```C
-// Generated code for mojom enum 'example.Gender'.
-typedef uint32_t example_Gender;
-enum example_Gender_Enum {
- examples_Gender_MALE = 0,
- examples_Gender_MALE = 1,
-};
-
-// Generated code for mojom struct 'example.Person'.
-union example_PersonPtr {
- struct example_Person* ptr;
- uint64_t offset;
-};
-struct example_Person {
- struct MojomStructHeader header_;
- uint32_t age;
- example_Gender gender;
- union MojomStringHeaderPtr name;
-};
-```
-
-The mojom wire format of a struct is comparable to the C memory model of a
-struct, with some restrictions; in the example above, we see that the order of
-the fields is different between the mojom and C structs, since the generated C
-structs are in packing order, not ordinal order. Although not applicable in this
-example, there may be additional fields inserted in the generated C struct for
-padding purposes -- since 4-byte data types need to be 4-byte aligned, the
-generated C bindings may include some fields not explicitly present in the
-mojom. Since it's not immediately obvious where padding fields could be
-inserted, it helps to examine the generated C struct to make sure what the
-fields are, and if possible, set them using field initializers. The
-`example_PersonPtr` union is used to represent an offset in the encoded form, or
-a pointer in the unencoded form.
-
-Since mojom objects appear in depth-first order relative to their parent object,
-we can use a `struct MojomBuffer` and calls to `MojomBuffer_Allocate(..)` to
-linearly allocate space. The struct needs to be constructed and provided by the
-user, and it contains 3 fields: A pointer to the buffer, size of the buffer in
-bytes, and the byte-position of the next allocation, typically set to 0.
-
-For instance, to allocate space for the `name` parameter of an `example_Person`,
-we can do so this way:
-```C
-char byte_buffer[512] = {0};
-struct MojomBuffer buf = {byte_buffer, sizeof(byte_buffer), 0};
-
-// First allocate space for the example_Person struct:
-struct example_Person* person =
- (struct example_Person*)MojomBuffer_Allocate(&buf, sizeof(struct example_Person));
-
-// Allocate enough space for a 10 character string.
-person->name.ptr = (struct MojomStringHeader*)MojomBuffer_Allocate(
- &buf,
- sizeof(struct MojomStringHeader) + 10);
-```
-
-We can extract how much buffer space was used by reading `buf.num_byes_used`.
-
-Along with the C struct, there are some functions generated that help encode and
-decode mojom structs, amongst other things. For the `example.Person` mojom
-struct, the following functions are generated:
-
-```c
-struct example_Person* example_Person_DeepCopy(
- struct MojomBuffer* in_buffer,
- struct example_Person* in_data);
-
-void example_Person_EncodePointersAndHandles(
- struct example_Person* inout_struct, uint32_t in_struct_size,
- struct MojomHandleBuffer* inout_handle_buffer);
-
-void example_Person_DecodePointersAndHandles(
- struct example_Person* inout_struct, uint32_t in_struct_size,
- MojomHandle inout_handles[], uin32_t in_num_handles);
-
-MojomValidationResult example_Person_Validate(
- const struct example_Person* in_struct, uint32_t in_struct_size,
- uint32_t in_num_handles);
-```
-
-The generated `example_Person_DeepCopy(..)` function is used to copy over the
-`in_data` into another buffer, specified by `MojomBuffer`. The primary purpose
-of this function is "linearize" a given `struct example_Person` and its
-referenced objects into the new buffer. This essentially recursively copies all
-objects in encoding order. The returned copy can then be encoded.
-
-Example usage copying a struct example_Person `person`:
-```c
-...
-char byte_buffer[512] = {0};
-struct MojomBuffer buf = {byte_buffer, sizeof(byte_buffer), 0};
-struct example_Person* new_person = example_Person_DeepCopy(&buf, person);
-assert(new_person != NULL);
-...
-```
-
-The generated `example_Person_EncodePointersAndHandles(..)` is used to encode
-a given C struct so that it's in wire-format, ready to send over a message pipe.
-This encoding process involves translating pointers into relative offsets, and
-extracting handles out of the struct into a separate handle array (and replacing
-the handle values in the struct with references into the handle array). The
-supplied `struct MojomHandleBuffer` needs to be constructed and provided by the
-user and contains 3 fields: pointer to a handles array, the size of the array
-(number of elements), and the starting offset into the array where handles can
-be moved into (typically set to 0).
-
-The generated `example_Person_DecodePointersAndHandles(..)` does the inverse --
-it translates relative offsets into pointers, and moves handles out of the
-handle array and into the struct (based on the encoded offset into the array).
-In practice, before decoding a mojom struct into a usable C struct, it should be
-first validated; this function may crash on invalid encoded data.
-
-The generated `example_Person_Validate(..)` validates an encoded `struct
-example_Person`. The function returns `MOJOM_VALIDATION_ERROR_NONE` if the
-struct is valid, in which case the struct can be decoded. See
-`bindings/validation.h` for more error codes.
-
-## Interfaces
-
-It isn't enough to talk to other mojo applications by encoding structs and
-referenced objects alone; communication happens via interface message calls
-(i.e., sending mojom messages), so we need to frame our structs this way. The
-following example describes what's generated for interfaces. Consider an
-interface `Population` with a message `GetPerson()` that returns a `Person`
-object given their name:
-
-```mojom
-module example;
-
-[ServiceName="example.EmployeeRegistry"]
-interface EmployeeRegistry {
- GetPerson(string name) => (Person person);
-};
-```
-
-The generated code:
-```C
-#define example_EmployeeRegistry__ServiceName \
- ((const char*)"example::EmployeeRegistry")
-#define example_EmployeeRegistry__CurrentVersion ((uint32_t)0)
-
-// For message GetPerson:
-#define example_EmployeeRegistry_GetPerson__Ordinal ((uint32_t)0)
-#define example_EmployeeRegistry_GetPerson__MinVersion ((uint32_t)0)
-
-// Request struct for GetPerson():
-struct example_EmployeeRegistry_GetPerson_Request {
- struct MojomStructHeader header_;
- struct MojomStringHeaderPtr name;
-};
-
-// Response struct for GetPerson():
-struct example_EmployeeRegistry_GetPerson_Response {
- struct MojomStructHeader header_;
- struct example_PersonPtr person;
-};
-```
-
-We see that the parameters (and return value) of the `GetPerson(..)` message are
-contained within mojom structs. To send a `GetPerson(..)` request, an interface
-request message must be constructed. An interface request message for
-`GetPerson(..)` consists of the following data in the following order:
-
- 1. `struct MojomMessageWithRequestId`. This contains:
- - the message ordinal (generated above) which represents which message it is.
- - flags that say if it's a request or response.
- - a request ID, since this message is expecting a response.
- - (see `bindings/message.h`)
- 2. `struct examples_EmployeeRegistry_GetPerson_Request`. This contains the
- actual parameters for GetPerson().
-
-Since the request parameters are just a mojom struct, all relevant functions for
-structs are also generated (see above), e.g, ` void
-examples_EmployeeRegistry_GetPerson_Request_EncodePointersAndHandles()`. Once
-the request struct has been encoded, the buffer containing the above two structs
-can be written to a message pipe.
-
-On the other hand, when reading an incoming message, the message header must
-first be validated using
-```
-MojomValidationResult MojomMessage_ValidateHeader(const void* in_buf,
- uint32_t in_buf_size);
-```
-- If the message arrives on the client side:
- 1. It must be validated as a response message.
- 2. You must check that the message ordinal is known and expects a response
- message.
-- If the message arrives on the server side:
- 1. It must be validated as a request message, and that it's a known ordinal.
- 2. If the message's ordinal is known to expect a response, the request message
- must be validated as expecting a response.
-
-If valid, it is safe to look at the `request_id` in `struct MojomMessage`, and
-the `ordinal` describing the message. By checking if it's any of
-`example_EmployeeRegistry_*__Ordinal`, you can further validate that it is a
-request or expects a response. See `bindings/message.h` for more functions that
-help validate message headers. Once the message header is fully validated, you
-must also validate the request or response mojom struct following the message
-header using the generated `*_Validate(..)` function.
-
-Note that validation is run on encoded messages and structs on the wire --
-decoding a struct without validating it first is dangerous.
-
-## Enums and Constants
-
-Example mojom code:
-``` mojom
-module example;
-
-enum MyEnum { Zero, One, Four = 4, Five };
-const uint64 kMyConst = 34;
-```
-
-Generated C code:
-``` C
-typedef uint32_t example_MyEnum;
-enum example_MyEnum_Enum {
- examples_MyEnum_Zero = 0,
- examples_MyEnum_One = 1,
- examples_MyEnum_Four = 4,
- examples_MyEnum_Five = 5,
-};
-
-#define example_kMyConst ((uint64_t)34)
-```
-
-## Tagged Unions
-
-Example mojom code:
-``` mojom
-module example;
-
-union MyUnion {
- int8 f0;
- string f1;
- MyUnion f2;
-};
-
-struct StructWithUnion {
- MyUnion u;
-}
-```
-Generated C code:
-```C
-// Generated code for the Tags enum for |MyUnion|.
-typedef uint32_t example_MyUnion_Tag;
-enum example_MyUnion_Tag_Enum {
- example_MyUnion_Tag_f0 = 0,
- example_MyUnion_Tag_f1 = 1,
- example_MyUnion_Tag_f2 = 2,
- example_MyUnion_Tag__UNKNOWN__ = 0xFFFFFFFF,
-};
-
-// Generated code for |MyUnion|.
-union example_MyUnionPtr {
- struct example_MyUnion* ptr;
- uint64_t offset;
-};
-struct example_MyUnion {
- uint32_t size;
- example_MyUnion_Tag tag;
- union {
- int8_t f_f0;
- union MojomStringHeaderPtr f_f1;
- union example_MyUnionPtr f_f2;
- uint64_t unknown;
- } data;
-};
-
-// Snippet of generated code for |StructWithUnion|.
-struct example_StructWithUnion {
- struct MojomStructHeader header_;
- struct example_MyUnion u;
-};
-```
-
-Note that the `MyUnion` inside the `MyUnion` is a pointer object, whereas the
-`MyUnion` inside `StructWithUnion` is inlined. The only case when unions are
-pointer objects are when they are inside another union, otherwise they are
-inlined. Unions are initialized by setting their size and their tag. The size is
-always 16 bytes if the union is not null (4 for the size field, 4 for the tag,
-and 8 for the data). The tag must be set to one defined in the generated enum of
-tags. The unknown tag isn't meant to be encoded over the wire, and exists as an
-initial value for a union's tag, but the tag should be set to a valid tag
-before being written to wire. A union whose size is 0 is considered null. Unlike
-for structs, there are no functions generated for unions, since unions are never
-encoded as a top-level object type on the wire.
-
-## Arrays and Strings
-
-Arrays and strings (which are just arrays of characters) are not top-level data
-types; they can only be defined within a struct, union or interface message.
-Arrays inside structs are pointers to an array object. The array object's byte
-layout is as follow:
- 1. `struct MojomArrayHeader`. This contains:
- - Number of bytes in the array (this includes the header and the data
- following the array header; see `2.`)
- - Number of elements in the array.
- - (see `bindings/array.h` for more details)
- 2. The contents of the array (the size of this is accounted for in the number
- of bytes specified in the array header).
-
-Note that if the array contains pointer objects (structs, arrays, maps), the
-array contains only the 8-byte pointers (or offsets in its encoded form) -- the
-objects' data follow the array contents, and their size is not accounted for in
-the array header.
-
-Example of how to allocate and initialize a new array of 5 int32s, and set each
-one:
-```C
-...
-struct MojomArrayHeader* int32_array = MojomArray_New(&buf, 5, sizeof(int32_t));
-*MOJOM_ARRAY_INDEX(int32_array, int32_t, 0) = 10;
-*MOJOM_ARRAY_INDEX(int32_array, int32_t, 1) = 20;
-*MOJOM_ARRAY_INDEX(int32_array, int32_t, 2) = 30;
-*MOJOM_ARRAY_INDEX(int32_array, int32_t, 3) = 40;
-*MOJOM_ARRAY_INDEX(int32_array, int32_t, 4) = 50;
-```
-
-Here, `MojomArray_New(..)` allocates space for the buffer and initializes the
-header, while the `MOJOM_ARRAY_INDEX(.., i)` macro returns the address of the
-`i`th element.
-
-TODO(vardhan): Explain how to make an array of bools.
-
-Since a mojom string is an array of UTF-8 encoded characters, you can use
-`MojomArray_New(&buf, NUM_CHARACTERS, sizeof(uint8_t))` if they are ASCII
-characters. Otherwise, since UTF-8 characters may be variable-sized, you must be
-careful to set the number of characters appropriately, as it may not be the same
-as the number of bytes (minus the header). By convention, mojom strings are not
-null-terminated.
-
-## Maps
-
-Maps on the wire are mojom structs with two arrays; one for the keys, and one
-for the values. The `i`th element in the keys array corresponds to the `i`th
-element in the values array. As such, both arrays must have the same number
-of elements, and neither may be null.
-
-# Additional Readings
-* [Internals of the generated bindings](INTERNALS.md)
diff --git a/c/include/GLES2/gl2.h b/c/include/GLES2/gl2.h
deleted file mode 100644
index d17e19d..0000000
--- a/c/include/GLES2/gl2.h
+++ /dev/null
@@ -1,526 +0,0 @@
-#ifndef __gl2_h_
-#define __gl2_h_ 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-** Copyright (c) 2013-2014 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-/*
-** This header is generated from the Khronos OpenGL / OpenGL ES XML
-** API Registry. The current version of the Registry, generator scripts
-** used to make the header, and the header can be found at
-** http://www.opengl.org/registry/
-**
-** Khronos $Revision: 28366 $ on $Date: 2014-10-20 11:29:02 +0200 (Mon, 20 Oct 2014) $
-*/
-
-#include <GLES2/gl2mojo_internal.h>
-#include <GLES2/gl2platform.h>
-
-/* Generated on date 20141020 */
-
-/* Generated C header for:
- * API: gles2
- * Profile: common
- * Versions considered: 2\.[0-9]
- * Versions emitted: .*
- * Default extensions included: None
- * Additional extensions included: _nomatch_^
- * Extensions removed: _nomatch_^
- */
-
-#ifndef GL_ES_VERSION_2_0
-#define GL_ES_VERSION_2_0 1
-#include <KHR/khrplatform.h>
-typedef khronos_int8_t GLbyte;
-typedef khronos_float_t GLclampf;
-typedef khronos_int32_t GLfixed;
-typedef short GLshort;
-typedef unsigned short GLushort;
-typedef void GLvoid;
-typedef struct __GLsync *GLsync;
-typedef khronos_int64_t GLint64;
-typedef khronos_uint64_t GLuint64;
-typedef unsigned int GLenum;
-typedef unsigned int GLuint;
-typedef char GLchar;
-typedef khronos_float_t GLfloat;
-typedef khronos_ssize_t GLsizeiptr;
-typedef khronos_intptr_t GLintptr;
-typedef unsigned int GLbitfield;
-typedef int GLint;
-typedef unsigned char GLboolean;
-typedef int GLsizei;
-typedef khronos_uint8_t GLubyte;
-#define GL_DEPTH_BUFFER_BIT 0x00000100
-#define GL_STENCIL_BUFFER_BIT 0x00000400
-#define GL_COLOR_BUFFER_BIT 0x00004000
-#define GL_FALSE 0
-#define GL_TRUE 1
-#define GL_POINTS 0x0000
-#define GL_LINES 0x0001
-#define GL_LINE_LOOP 0x0002
-#define GL_LINE_STRIP 0x0003
-#define GL_TRIANGLES 0x0004
-#define GL_TRIANGLE_STRIP 0x0005
-#define GL_TRIANGLE_FAN 0x0006
-#define GL_ZERO 0
-#define GL_ONE 1
-#define GL_SRC_COLOR 0x0300
-#define GL_ONE_MINUS_SRC_COLOR 0x0301
-#define GL_SRC_ALPHA 0x0302
-#define GL_ONE_MINUS_SRC_ALPHA 0x0303
-#define GL_DST_ALPHA 0x0304
-#define GL_ONE_MINUS_DST_ALPHA 0x0305
-#define GL_DST_COLOR 0x0306
-#define GL_ONE_MINUS_DST_COLOR 0x0307
-#define GL_SRC_ALPHA_SATURATE 0x0308
-#define GL_FUNC_ADD 0x8006
-#define GL_BLEND_EQUATION 0x8009
-#define GL_BLEND_EQUATION_RGB 0x8009
-#define GL_BLEND_EQUATION_ALPHA 0x883D
-#define GL_FUNC_SUBTRACT 0x800A
-#define GL_FUNC_REVERSE_SUBTRACT 0x800B
-#define GL_BLEND_DST_RGB 0x80C8
-#define GL_BLEND_SRC_RGB 0x80C9
-#define GL_BLEND_DST_ALPHA 0x80CA
-#define GL_BLEND_SRC_ALPHA 0x80CB
-#define GL_CONSTANT_COLOR 0x8001
-#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
-#define GL_CONSTANT_ALPHA 0x8003
-#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
-#define GL_BLEND_COLOR 0x8005
-#define GL_ARRAY_BUFFER 0x8892
-#define GL_ELEMENT_ARRAY_BUFFER 0x8893
-#define GL_ARRAY_BUFFER_BINDING 0x8894
-#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
-#define GL_STREAM_DRAW 0x88E0
-#define GL_STATIC_DRAW 0x88E4
-#define GL_DYNAMIC_DRAW 0x88E8
-#define GL_BUFFER_SIZE 0x8764
-#define GL_BUFFER_USAGE 0x8765
-#define GL_CURRENT_VERTEX_ATTRIB 0x8626
-#define GL_FRONT 0x0404
-#define GL_BACK 0x0405
-#define GL_FRONT_AND_BACK 0x0408
-#define GL_TEXTURE_2D 0x0DE1
-#define GL_CULL_FACE 0x0B44
-#define GL_BLEND 0x0BE2
-#define GL_DITHER 0x0BD0
-#define GL_STENCIL_TEST 0x0B90
-#define GL_DEPTH_TEST 0x0B71
-#define GL_SCISSOR_TEST 0x0C11
-#define GL_POLYGON_OFFSET_FILL 0x8037
-#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
-#define GL_SAMPLE_COVERAGE 0x80A0
-#define GL_NO_ERROR 0
-#define GL_INVALID_ENUM 0x0500
-#define GL_INVALID_VALUE 0x0501
-#define GL_INVALID_OPERATION 0x0502
-#define GL_OUT_OF_MEMORY 0x0505
-#define GL_CW 0x0900
-#define GL_CCW 0x0901
-#define GL_LINE_WIDTH 0x0B21
-#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
-#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
-#define GL_CULL_FACE_MODE 0x0B45
-#define GL_FRONT_FACE 0x0B46
-#define GL_DEPTH_RANGE 0x0B70
-#define GL_DEPTH_WRITEMASK 0x0B72
-#define GL_DEPTH_CLEAR_VALUE 0x0B73
-#define GL_DEPTH_FUNC 0x0B74
-#define GL_STENCIL_CLEAR_VALUE 0x0B91
-#define GL_STENCIL_FUNC 0x0B92
-#define GL_STENCIL_FAIL 0x0B94
-#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
-#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
-#define GL_STENCIL_REF 0x0B97
-#define GL_STENCIL_VALUE_MASK 0x0B93
-#define GL_STENCIL_WRITEMASK 0x0B98
-#define GL_STENCIL_BACK_FUNC 0x8800
-#define GL_STENCIL_BACK_FAIL 0x8801
-#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
-#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
-#define GL_STENCIL_BACK_REF 0x8CA3
-#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
-#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
-#define GL_VIEWPORT 0x0BA2
-#define GL_SCISSOR_BOX 0x0C10
-#define GL_COLOR_CLEAR_VALUE 0x0C22
-#define GL_COLOR_WRITEMASK 0x0C23
-#define GL_UNPACK_ALIGNMENT 0x0CF5
-#define GL_PACK_ALIGNMENT 0x0D05
-#define GL_MAX_TEXTURE_SIZE 0x0D33
-#define GL_MAX_VIEWPORT_DIMS 0x0D3A
-#define GL_SUBPIXEL_BITS 0x0D50
-#define GL_RED_BITS 0x0D52
-#define GL_GREEN_BITS 0x0D53
-#define GL_BLUE_BITS 0x0D54
-#define GL_ALPHA_BITS 0x0D55
-#define GL_DEPTH_BITS 0x0D56
-#define GL_STENCIL_BITS 0x0D57
-#define GL_POLYGON_OFFSET_UNITS 0x2A00
-#define GL_POLYGON_OFFSET_FACTOR 0x8038
-#define GL_TEXTURE_BINDING_2D 0x8069
-#define GL_SAMPLE_BUFFERS 0x80A8
-#define GL_SAMPLES 0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
-#define GL_DONT_CARE 0x1100
-#define GL_FASTEST 0x1101
-#define GL_NICEST 0x1102
-#define GL_GENERATE_MIPMAP_HINT 0x8192
-#define GL_BYTE 0x1400
-#define GL_UNSIGNED_BYTE 0x1401
-#define GL_SHORT 0x1402
-#define GL_UNSIGNED_SHORT 0x1403
-#define GL_INT 0x1404
-#define GL_UNSIGNED_INT 0x1405
-#define GL_FLOAT 0x1406
-#define GL_FIXED 0x140C
-#define GL_DEPTH_COMPONENT 0x1902
-#define GL_ALPHA 0x1906
-#define GL_RGB 0x1907
-#define GL_RGBA 0x1908
-#define GL_LUMINANCE 0x1909
-#define GL_LUMINANCE_ALPHA 0x190A
-#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
-#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
-#define GL_UNSIGNED_SHORT_5_6_5 0x8363
-#define GL_FRAGMENT_SHADER 0x8B30
-#define GL_VERTEX_SHADER 0x8B31
-#define GL_MAX_VERTEX_ATTRIBS 0x8869
-#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
-#define GL_MAX_VARYING_VECTORS 0x8DFC
-#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
-#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
-#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
-#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
-#define GL_SHADER_TYPE 0x8B4F
-#define GL_DELETE_STATUS 0x8B80
-#define GL_LINK_STATUS 0x8B82
-#define GL_VALIDATE_STATUS 0x8B83
-#define GL_ATTACHED_SHADERS 0x8B85
-#define GL_ACTIVE_UNIFORMS 0x8B86
-#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
-#define GL_ACTIVE_ATTRIBUTES 0x8B89
-#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
-#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
-#define GL_CURRENT_PROGRAM 0x8B8D
-#define GL_NEVER 0x0200
-#define GL_LESS 0x0201
-#define GL_EQUAL 0x0202
-#define GL_LEQUAL 0x0203
-#define GL_GREATER 0x0204
-#define GL_NOTEQUAL 0x0205
-#define GL_GEQUAL 0x0206
-#define GL_ALWAYS 0x0207
-#define GL_KEEP 0x1E00
-#define GL_REPLACE 0x1E01
-#define GL_INCR 0x1E02
-#define GL_DECR 0x1E03
-#define GL_INVERT 0x150A
-#define GL_INCR_WRAP 0x8507
-#define GL_DECR_WRAP 0x8508
-#define GL_VENDOR 0x1F00
-#define GL_RENDERER 0x1F01
-#define GL_VERSION 0x1F02
-#define GL_EXTENSIONS 0x1F03
-#define GL_NEAREST 0x2600
-#define GL_LINEAR 0x2601
-#define GL_NEAREST_MIPMAP_NEAREST 0x2700
-#define GL_LINEAR_MIPMAP_NEAREST 0x2701
-#define GL_NEAREST_MIPMAP_LINEAR 0x2702
-#define GL_LINEAR_MIPMAP_LINEAR 0x2703
-#define GL_TEXTURE_MAG_FILTER 0x2800
-#define GL_TEXTURE_MIN_FILTER 0x2801
-#define GL_TEXTURE_WRAP_S 0x2802
-#define GL_TEXTURE_WRAP_T 0x2803
-#define GL_TEXTURE 0x1702
-#define GL_TEXTURE_CUBE_MAP 0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
-#define GL_TEXTURE0 0x84C0
-#define GL_TEXTURE1 0x84C1
-#define GL_TEXTURE2 0x84C2
-#define GL_TEXTURE3 0x84C3
-#define GL_TEXTURE4 0x84C4
-#define GL_TEXTURE5 0x84C5
-#define GL_TEXTURE6 0x84C6
-#define GL_TEXTURE7 0x84C7
-#define GL_TEXTURE8 0x84C8
-#define GL_TEXTURE9 0x84C9
-#define GL_TEXTURE10 0x84CA
-#define GL_TEXTURE11 0x84CB
-#define GL_TEXTURE12 0x84CC
-#define GL_TEXTURE13 0x84CD
-#define GL_TEXTURE14 0x84CE
-#define GL_TEXTURE15 0x84CF
-#define GL_TEXTURE16 0x84D0
-#define GL_TEXTURE17 0x84D1
-#define GL_TEXTURE18 0x84D2
-#define GL_TEXTURE19 0x84D3
-#define GL_TEXTURE20 0x84D4
-#define GL_TEXTURE21 0x84D5
-#define GL_TEXTURE22 0x84D6
-#define GL_TEXTURE23 0x84D7
-#define GL_TEXTURE24 0x84D8
-#define GL_TEXTURE25 0x84D9
-#define GL_TEXTURE26 0x84DA
-#define GL_TEXTURE27 0x84DB
-#define GL_TEXTURE28 0x84DC
-#define GL_TEXTURE29 0x84DD
-#define GL_TEXTURE30 0x84DE
-#define GL_TEXTURE31 0x84DF
-#define GL_ACTIVE_TEXTURE 0x84E0
-#define GL_REPEAT 0x2901
-#define GL_CLAMP_TO_EDGE 0x812F
-#define GL_MIRRORED_REPEAT 0x8370
-#define GL_FLOAT_VEC2 0x8B50
-#define GL_FLOAT_VEC3 0x8B51
-#define GL_FLOAT_VEC4 0x8B52
-#define GL_INT_VEC2 0x8B53
-#define GL_INT_VEC3 0x8B54
-#define GL_INT_VEC4 0x8B55
-#define GL_BOOL 0x8B56
-#define GL_BOOL_VEC2 0x8B57
-#define GL_BOOL_VEC3 0x8B58
-#define GL_BOOL_VEC4 0x8B59
-#define GL_FLOAT_MAT2 0x8B5A
-#define GL_FLOAT_MAT3 0x8B5B
-#define GL_FLOAT_MAT4 0x8B5C
-#define GL_SAMPLER_2D 0x8B5E
-#define GL_SAMPLER_CUBE 0x8B60
-#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
-#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
-#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
-#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
-#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
-#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
-#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
-#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
-#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
-#define GL_COMPILE_STATUS 0x8B81
-#define GL_INFO_LOG_LENGTH 0x8B84
-#define GL_SHADER_SOURCE_LENGTH 0x8B88
-#define GL_SHADER_COMPILER 0x8DFA
-#define GL_SHADER_BINARY_FORMATS 0x8DF8
-#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
-#define GL_LOW_FLOAT 0x8DF0
-#define GL_MEDIUM_FLOAT 0x8DF1
-#define GL_HIGH_FLOAT 0x8DF2
-#define GL_LOW_INT 0x8DF3
-#define GL_MEDIUM_INT 0x8DF4
-#define GL_HIGH_INT 0x8DF5
-#define GL_FRAMEBUFFER 0x8D40
-#define GL_RENDERBUFFER 0x8D41
-#define GL_RGBA4 0x8056
-#define GL_RGB5_A1 0x8057
-#define GL_RGB565 0x8D62
-#define GL_DEPTH_COMPONENT16 0x81A5
-#define GL_STENCIL_INDEX8 0x8D48
-#define GL_RENDERBUFFER_WIDTH 0x8D42
-#define GL_RENDERBUFFER_HEIGHT 0x8D43
-#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
-#define GL_RENDERBUFFER_RED_SIZE 0x8D50
-#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
-#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
-#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
-#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
-#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
-#define GL_COLOR_ATTACHMENT0 0x8CE0
-#define GL_DEPTH_ATTACHMENT 0x8D00
-#define GL_STENCIL_ATTACHMENT 0x8D20
-#define GL_NONE 0
-#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
-#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
-#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
-#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
-#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
-#define GL_FRAMEBUFFER_BINDING 0x8CA6
-#define GL_RENDERBUFFER_BINDING 0x8CA7
-#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
-#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
-GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
-GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
-GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
-GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
-GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
-GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
-GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
-GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode);
-GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
-GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
-GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
-GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
-GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
-GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
-GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d);
-GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
-GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
-GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
-GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
-GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
-GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
-GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
-GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
-GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
-GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
-GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
-GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
-GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
-GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
-GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f);
-GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
-GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
-GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
-GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
-GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
-GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
-GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
-GL_APICALL void GL_APIENTRY glFinish (void);
-GL_APICALL void GL_APIENTRY glFlush (void);
-GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
-GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
-GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
-GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
-GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
-GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
-GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
-GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
-GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
-GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data);
-GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
-GL_APICALL GLenum GL_APIENTRY glGetError (void);
-GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data);
-GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data);
-GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
-GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
-GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name);
-GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
-GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
-GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
-GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
-GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
-GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
-GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
-GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
-GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
-GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
-GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
-GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
-GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
-GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
-GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
-GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
-GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
-GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
-GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
-GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
-GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
-GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
-GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
-GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
-GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
-GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
-GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
-GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
-GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0);
-GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0);
-GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
-GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
-GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
-GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
-GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
-GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
-GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
-GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
-#endif /* GL_ES_VERSION_2_0 */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/c/include/GLES2/gl2ext.h b/c/include/GLES2/gl2ext.h
deleted file mode 100644
index a3efa82..0000000
--- a/c/include/GLES2/gl2ext.h
+++ /dev/null
@@ -1,2026 +0,0 @@
-#ifndef __gl2ext_h_
-#define __gl2ext_h_ 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-** Copyright (c) 2013-2014 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-/*
-** This header is generated from the Khronos OpenGL / OpenGL ES XML
-** API Registry. The current version of the Registry, generator scripts
-** used to make the header, and the header can be found at
-** http://www.opengl.org/registry/
-**
-** Khronos $Revision: 28366 $ on $Date: 2014-10-20 11:29:02 +0200 (Mon, 20 Oct 2014) $
-*/
-
-#ifndef GL_APIENTRYP
-#define GL_APIENTRYP GL_APIENTRY*
-#endif
-
-/* Generated on date 20141020 */
-
-/* Generated C header for:
- * API: gles2
- * Profile: common
- * Versions considered: 2\.[0-9]
- * Versions emitted: _nomatch_^
- * Default extensions included: gles2
- * Additional extensions included: _nomatch_^
- * Extensions removed: _nomatch_^
- */
-
-#ifndef GL_KHR_blend_equation_advanced
-#define GL_KHR_blend_equation_advanced 1
-#define GL_MULTIPLY_KHR 0x9294
-#define GL_SCREEN_KHR 0x9295
-#define GL_OVERLAY_KHR 0x9296
-#define GL_DARKEN_KHR 0x9297
-#define GL_LIGHTEN_KHR 0x9298
-#define GL_COLORDODGE_KHR 0x9299
-#define GL_COLORBURN_KHR 0x929A
-#define GL_HARDLIGHT_KHR 0x929B
-#define GL_SOFTLIGHT_KHR 0x929C
-#define GL_DIFFERENCE_KHR 0x929E
-#define GL_EXCLUSION_KHR 0x92A0
-#define GL_HSL_HUE_KHR 0x92AD
-#define GL_HSL_SATURATION_KHR 0x92AE
-#define GL_HSL_COLOR_KHR 0x92AF
-#define GL_HSL_LUMINOSITY_KHR 0x92B0
-typedef void (GL_APIENTRYP PFNGLBLENDBARRIERKHRPROC) (void);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBlendBarrierKHR (void);
-#endif
-#endif /* GL_KHR_blend_equation_advanced */
-
-#ifndef GL_KHR_blend_equation_advanced_coherent
-#define GL_KHR_blend_equation_advanced_coherent 1
-#define GL_BLEND_ADVANCED_COHERENT_KHR 0x9285
-#endif /* GL_KHR_blend_equation_advanced_coherent */
-
-#ifndef GL_KHR_context_flush_control
-#define GL_KHR_context_flush_control 1
-#define GL_CONTEXT_RELEASE_BEHAVIOR_KHR 0x82FB
-#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR 0x82FC
-#endif /* GL_KHR_context_flush_control */
-
-#ifndef GL_KHR_debug
-#define GL_KHR_debug 1
-typedef void (GL_APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,void *userParam);
-//#define GL_SAMPLER 0x82E6
-#define GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR 0x8242
-#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR 0x8243
-#define GL_DEBUG_CALLBACK_FUNCTION_KHR 0x8244
-#define GL_DEBUG_CALLBACK_USER_PARAM_KHR 0x8245
-#define GL_DEBUG_SOURCE_API_KHR 0x8246
-#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR 0x8247
-#define GL_DEBUG_SOURCE_SHADER_COMPILER_KHR 0x8248
-#define GL_DEBUG_SOURCE_THIRD_PARTY_KHR 0x8249
-#define GL_DEBUG_SOURCE_APPLICATION_KHR 0x824A
-#define GL_DEBUG_SOURCE_OTHER_KHR 0x824B
-#define GL_DEBUG_TYPE_ERROR_KHR 0x824C
-#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR 0x824D
-#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR 0x824E
-#define GL_DEBUG_TYPE_PORTABILITY_KHR 0x824F
-#define GL_DEBUG_TYPE_PERFORMANCE_KHR 0x8250
-#define GL_DEBUG_TYPE_OTHER_KHR 0x8251
-#define GL_DEBUG_TYPE_MARKER_KHR 0x8268
-#define GL_DEBUG_TYPE_PUSH_GROUP_KHR 0x8269
-#define GL_DEBUG_TYPE_POP_GROUP_KHR 0x826A
-#define GL_DEBUG_SEVERITY_NOTIFICATION_KHR 0x826B
-#define GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR 0x826C
-#define GL_DEBUG_GROUP_STACK_DEPTH_KHR 0x826D
-#define GL_BUFFER_KHR 0x82E0
-#define GL_SHADER_KHR 0x82E1
-#define GL_PROGRAM_KHR 0x82E2
-#define GL_VERTEX_ARRAY_KHR 0x8074
-#define GL_QUERY_KHR 0x82E3
-#define GL_SAMPLER_KHR 0x82E6
-#define GL_MAX_LABEL_LENGTH_KHR 0x82E8
-#define GL_MAX_DEBUG_MESSAGE_LENGTH_KHR 0x9143
-#define GL_MAX_DEBUG_LOGGED_MESSAGES_KHR 0x9144
-#define GL_DEBUG_LOGGED_MESSAGES_KHR 0x9145
-#define GL_DEBUG_SEVERITY_HIGH_KHR 0x9146
-#define GL_DEBUG_SEVERITY_MEDIUM_KHR 0x9147
-#define GL_DEBUG_SEVERITY_LOW_KHR 0x9148
-#define GL_DEBUG_OUTPUT_KHR 0x92E0
-#define GL_CONTEXT_FLAG_DEBUG_BIT_KHR 0x00000002
-#define GL_STACK_OVERFLOW_KHR 0x0503
-#define GL_STACK_UNDERFLOW_KHR 0x0504
-typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, void *userParam);
-typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
-typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC) (void);
-typedef void (GL_APIENTRYP PFNGLOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
-typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
-typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label);
-typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
-typedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRPROC) (GLenum pname, void **params);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDebugMessageControlKHR (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
-GL_APICALL void GL_APIENTRY glDebugMessageInsertKHR (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
-GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam);
-GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLogKHR (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
-GL_APICALL void GL_APIENTRY glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, const GLchar *message);
-GL_APICALL void GL_APIENTRY glPopDebugGroupKHR (void);
-GL_APICALL void GL_APIENTRY glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
-GL_APICALL void GL_APIENTRY glGetObjectLabelKHR (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
-GL_APICALL void GL_APIENTRY glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label);
-GL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHR (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
-GL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, void **params);
-#endif
-#endif /* GL_KHR_debug */
-
-#ifndef GL_KHR_robust_buffer_access_behavior
-#define GL_KHR_robust_buffer_access_behavior 1
-#endif /* GL_KHR_robust_buffer_access_behavior */
-
-#ifndef GL_KHR_robustness
-#define GL_KHR_robustness 1
-#define GL_CONTEXT_ROBUST_ACCESS_KHR 0x90F3
-#define GL_LOSE_CONTEXT_ON_RESET_KHR 0x8252
-#define GL_GUILTY_CONTEXT_RESET_KHR 0x8253
-#define GL_INNOCENT_CONTEXT_RESET_KHR 0x8254
-#define GL_UNKNOWN_CONTEXT_RESET_KHR 0x8255
-#define GL_RESET_NOTIFICATION_STRATEGY_KHR 0x8256
-#define GL_NO_RESET_NOTIFICATION_KHR 0x8261
-#define GL_CONTEXT_LOST_KHR 0x0507
-typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSKHRPROC) (void);
-typedef void (GL_APIENTRYP PFNGLREADNPIXELSKHRPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMUIVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusKHR (void);
-GL_APICALL void GL_APIENTRY glReadnPixelsKHR (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-GL_APICALL void GL_APIENTRY glGetnUniformfvKHR (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
-GL_APICALL void GL_APIENTRY glGetnUniformivKHR (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-GL_APICALL void GL_APIENTRY glGetnUniformuivKHR (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
-#endif
-#endif /* GL_KHR_robustness */
-
-#ifndef GL_KHR_texture_compression_astc_hdr
-#define GL_KHR_texture_compression_astc_hdr 1
-#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
-#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1
-#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
-#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3
-#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
-#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
-#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
-#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7
-#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
-#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9
-#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA
-#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
-#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
-#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
-#endif /* GL_KHR_texture_compression_astc_hdr */
-
-#ifndef GL_KHR_texture_compression_astc_ldr
-#define GL_KHR_texture_compression_astc_ldr 1
-#endif /* GL_KHR_texture_compression_astc_ldr */
-
-#ifndef GL_OES_EGL_image
-#define GL_OES_EGL_image 1
-typedef void *GLeglImageOES;
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
-GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
-#endif
-#endif /* GL_OES_EGL_image */
-
-#ifndef GL_OES_EGL_image_external
-#define GL_OES_EGL_image_external 1
-#define GL_TEXTURE_EXTERNAL_OES 0x8D65
-#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
-#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
-#define GL_SAMPLER_EXTERNAL_OES 0x8D66
-#endif /* GL_OES_EGL_image_external */
-
-#ifndef GL_OES_compressed_ETC1_RGB8_sub_texture
-#define GL_OES_compressed_ETC1_RGB8_sub_texture 1
-#endif /* GL_OES_compressed_ETC1_RGB8_sub_texture */
-
-#ifndef GL_OES_compressed_ETC1_RGB8_texture
-#define GL_OES_compressed_ETC1_RGB8_texture 1
-#define GL_ETC1_RGB8_OES 0x8D64
-#endif /* GL_OES_compressed_ETC1_RGB8_texture */
-
-#ifndef GL_OES_compressed_paletted_texture
-#define GL_OES_compressed_paletted_texture 1
-#define GL_PALETTE4_RGB8_OES 0x8B90
-#define GL_PALETTE4_RGBA8_OES 0x8B91
-#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
-#define GL_PALETTE4_RGBA4_OES 0x8B93
-#define GL_PALETTE4_RGB5_A1_OES 0x8B94
-#define GL_PALETTE8_RGB8_OES 0x8B95
-#define GL_PALETTE8_RGBA8_OES 0x8B96
-#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
-#define GL_PALETTE8_RGBA4_OES 0x8B98
-#define GL_PALETTE8_RGB5_A1_OES 0x8B99
-#endif /* GL_OES_compressed_paletted_texture */
-
-#ifndef GL_OES_depth24
-#define GL_OES_depth24 1
-#define GL_DEPTH_COMPONENT24_OES 0x81A6
-#endif /* GL_OES_depth24 */
-
-#ifndef GL_OES_depth32
-#define GL_OES_depth32 1
-#define GL_DEPTH_COMPONENT32_OES 0x81A7
-#endif /* GL_OES_depth32 */
-
-#ifndef GL_OES_depth_texture
-#define GL_OES_depth_texture 1
-#endif /* GL_OES_depth_texture */
-
-#ifndef GL_OES_element_index_uint
-#define GL_OES_element_index_uint 1
-#endif /* GL_OES_element_index_uint */
-
-#ifndef GL_OES_fbo_render_mipmap
-#define GL_OES_fbo_render_mipmap 1
-#endif /* GL_OES_fbo_render_mipmap */
-
-#ifndef GL_OES_fragment_precision_high
-#define GL_OES_fragment_precision_high 1
-#endif /* GL_OES_fragment_precision_high */
-
-#ifndef GL_OES_get_program_binary
-#define GL_OES_get_program_binary 1
-#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741
-#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE
-#define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
-typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
-GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
-#endif
-#endif /* GL_OES_get_program_binary */
-
-#ifndef GL_OES_mapbuffer
-#define GL_OES_mapbuffer 1
-#define GL_WRITE_ONLY_OES 0x88B9
-#define GL_BUFFER_ACCESS_OES 0x88BB
-#define GL_BUFFER_MAPPED_OES 0x88BC
-#define GL_BUFFER_MAP_POINTER_OES 0x88BD
-typedef void *(GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
-typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
-typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void **params);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void *GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
-GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
-GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void **params);
-#endif
-#endif /* GL_OES_mapbuffer */
-
-#ifndef GL_OES_packed_depth_stencil
-#define GL_OES_packed_depth_stencil 1
-#define GL_DEPTH_STENCIL_OES 0x84F9
-#define GL_UNSIGNED_INT_24_8_OES 0x84FA
-#define GL_DEPTH24_STENCIL8_OES 0x88F0
-#endif /* GL_OES_packed_depth_stencil */
-
-#ifndef GL_OES_required_internalformat
-#define GL_OES_required_internalformat 1
-#define GL_ALPHA8_OES 0x803C
-#define GL_DEPTH_COMPONENT16_OES 0x81A5
-#define GL_LUMINANCE4_ALPHA4_OES 0x8043
-#define GL_LUMINANCE8_ALPHA8_OES 0x8045
-#define GL_LUMINANCE8_OES 0x8040
-#define GL_RGBA4_OES 0x8056
-#define GL_RGB5_A1_OES 0x8057
-#define GL_RGB565_OES 0x8D62
-#define GL_RGB8_OES 0x8051
-#define GL_RGBA8_OES 0x8058
-#define GL_RGB10_EXT 0x8052
-#define GL_RGB10_A2_EXT 0x8059
-#endif /* GL_OES_required_internalformat */
-
-#ifndef GL_OES_rgb8_rgba8
-#define GL_OES_rgb8_rgba8 1
-#endif /* GL_OES_rgb8_rgba8 */
-
-#ifndef GL_OES_sample_shading
-#define GL_OES_sample_shading 1
-#define GL_SAMPLE_SHADING_OES 0x8C36
-#define GL_MIN_SAMPLE_SHADING_VALUE_OES 0x8C37
-typedef void (GL_APIENTRYP PFNGLMINSAMPLESHADINGOESPROC) (GLfloat value);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glMinSampleShadingOES (GLfloat value);
-#endif
-#endif /* GL_OES_sample_shading */
-
-#ifndef GL_OES_sample_variables
-#define GL_OES_sample_variables 1
-#endif /* GL_OES_sample_variables */
-
-#ifndef GL_OES_shader_image_atomic
-#define GL_OES_shader_image_atomic 1
-#endif /* GL_OES_shader_image_atomic */
-
-#ifndef GL_OES_shader_multisample_interpolation
-#define GL_OES_shader_multisample_interpolation 1
-#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_OES 0x8E5B
-#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_OES 0x8E5C
-#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS_OES 0x8E5D
-#endif /* GL_OES_shader_multisample_interpolation */
-
-#ifndef GL_OES_standard_derivatives
-#define GL_OES_standard_derivatives 1
-#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B
-#endif /* GL_OES_standard_derivatives */
-
-#ifndef GL_OES_stencil1
-#define GL_OES_stencil1 1
-#define GL_STENCIL_INDEX1_OES 0x8D46
-#endif /* GL_OES_stencil1 */
-
-#ifndef GL_OES_stencil4
-#define GL_OES_stencil4 1
-#define GL_STENCIL_INDEX4_OES 0x8D47
-#endif /* GL_OES_stencil4 */
-
-#ifndef GL_OES_surfaceless_context
-#define GL_OES_surfaceless_context 1
-#define GL_FRAMEBUFFER_UNDEFINED_OES 0x8219
-#endif /* GL_OES_surfaceless_context */
-
-#ifndef GL_OES_texture_3D
-#define GL_OES_texture_3D 1
-#define GL_TEXTURE_WRAP_R_OES 0x8072
-#define GL_TEXTURE_3D_OES 0x806F
-#define GL_TEXTURE_BINDING_3D_OES 0x806A
-#define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073
-#define GL_SAMPLER_3D_OES 0x8B5F
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4
-typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
-typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-
-// Chromium-specific define to account for issues in gles2_conform_test
-// TODO (bajones): This symbol should be updated to the correct version in the
-// conformance test upstream and this hack removed. crbug.com/329708
-#define PFNGLFRAMEBUFFERTEXTURE3DOES PFNGLFRAMEBUFFERTEXTURE3DOESPROC
-
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
-GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
-GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
-GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
-GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-#endif
-#endif /* GL_OES_texture_3D */
-
-#ifndef GL_OES_texture_compression_astc
-#define GL_OES_texture_compression_astc 1
-#define GL_COMPRESSED_RGBA_ASTC_3x3x3_OES 0x93C0
-#define GL_COMPRESSED_RGBA_ASTC_4x3x3_OES 0x93C1
-#define GL_COMPRESSED_RGBA_ASTC_4x4x3_OES 0x93C2
-#define GL_COMPRESSED_RGBA_ASTC_4x4x4_OES 0x93C3
-#define GL_COMPRESSED_RGBA_ASTC_5x4x4_OES 0x93C4
-#define GL_COMPRESSED_RGBA_ASTC_5x5x4_OES 0x93C5
-#define GL_COMPRESSED_RGBA_ASTC_5x5x5_OES 0x93C6
-#define GL_COMPRESSED_RGBA_ASTC_6x5x5_OES 0x93C7
-#define GL_COMPRESSED_RGBA_ASTC_6x6x5_OES 0x93C8
-#define GL_COMPRESSED_RGBA_ASTC_6x6x6_OES 0x93C9
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES 0x93E0
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES 0x93E1
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES 0x93E2
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES 0x93E3
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES 0x93E4
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES 0x93E5
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES 0x93E6
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES 0x93E7
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES 0x93E8
-#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES 0x93E9
-#endif /* GL_OES_texture_compression_astc */
-
-#ifndef GL_OES_texture_float
-#define GL_OES_texture_float 1
-#endif /* GL_OES_texture_float */
-
-#ifndef GL_OES_texture_float_linear
-#define GL_OES_texture_float_linear 1
-#endif /* GL_OES_texture_float_linear */
-
-#ifndef GL_OES_texture_half_float
-#define GL_OES_texture_half_float 1
-#define GL_HALF_FLOAT_OES 0x8D61
-#endif /* GL_OES_texture_half_float */
-
-#ifndef GL_OES_texture_half_float_linear
-#define GL_OES_texture_half_float_linear 1
-#endif /* GL_OES_texture_half_float_linear */
-
-#ifndef GL_OES_texture_npot
-#define GL_OES_texture_npot 1
-#endif /* GL_OES_texture_npot */
-
-#ifndef GL_OES_texture_stencil8
-#define GL_OES_texture_stencil8 1
-#define GL_STENCIL_INDEX_OES 0x1901
-#define GL_STENCIL_INDEX8_OES 0x8D48
-#endif /* GL_OES_texture_stencil8 */
-
-#ifndef GL_OES_texture_storage_multisample_2d_array
-#define GL_OES_texture_storage_multisample_2d_array 1
-#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY_OES 0x9102
-#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY_OES 0x9105
-#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910B
-#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910C
-#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910D
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEOESPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTexStorage3DMultisampleOES (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-#endif
-#endif /* GL_OES_texture_storage_multisample_2d_array */
-
-#ifndef GL_OES_vertex_array_object
-#define GL_OES_vertex_array_object 1
-#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5
-typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
-typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
-typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
-typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);
-GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
-GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
-GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
-#endif
-#endif /* GL_OES_vertex_array_object */
-
-#ifndef GL_OES_vertex_half_float
-#define GL_OES_vertex_half_float 1
-#endif /* GL_OES_vertex_half_float */
-
-#ifndef GL_OES_vertex_type_10_10_10_2
-#define GL_OES_vertex_type_10_10_10_2 1
-#define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6
-#define GL_INT_10_10_10_2_OES 0x8DF7
-#endif /* GL_OES_vertex_type_10_10_10_2 */
-
-#ifndef GL_AMD_compressed_3DC_texture
-#define GL_AMD_compressed_3DC_texture 1
-#define GL_3DC_X_AMD 0x87F9
-#define GL_3DC_XY_AMD 0x87FA
-#endif /* GL_AMD_compressed_3DC_texture */
-
-#ifndef GL_AMD_compressed_ATC_texture
-#define GL_AMD_compressed_ATC_texture 1
-#define GL_ATC_RGB_AMD 0x8C92
-#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
-#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
-#endif /* GL_AMD_compressed_ATC_texture */
-
-#ifndef GL_AMD_performance_monitor
-#define GL_AMD_performance_monitor 1
-#define GL_COUNTER_TYPE_AMD 0x8BC0
-#define GL_COUNTER_RANGE_AMD 0x8BC1
-#define GL_UNSIGNED_INT64_AMD 0x8BC2
-#define GL_PERCENTAGE_AMD 0x8BC3
-#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
-#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
-#define GL_PERFMON_RESULT_AMD 0x8BC6
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);
-typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
-typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
-typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
-typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
-typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data);
-GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
-GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
-GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
-GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
-GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
-#endif
-#endif /* GL_AMD_performance_monitor */
-
-#ifndef GL_AMD_program_binary_Z400
-#define GL_AMD_program_binary_Z400 1
-#define GL_Z400_BINARY_AMD 0x8740
-#endif /* GL_AMD_program_binary_Z400 */
-
-#ifndef GL_ANDROID_extension_pack_es31a
-#define GL_ANDROID_extension_pack_es31a 1
-#endif /* GL_ANDROID_extension_pack_es31a */
-
-#ifndef GL_ANGLE_depth_texture
-#define GL_ANGLE_depth_texture 1
-#endif /* GL_ANGLE_depth_texture */
-
-#ifndef GL_ANGLE_framebuffer_blit
-#define GL_ANGLE_framebuffer_blit 1
-#define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8
-#define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9
-#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6
-#define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA
-typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-#endif
-#endif /* GL_ANGLE_framebuffer_blit */
-
-#ifndef GL_ANGLE_framebuffer_multisample
-#define GL_ANGLE_framebuffer_multisample 1
-#define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56
-#define GL_MAX_SAMPLES_ANGLE 0x8D57
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-#endif
-#endif /* GL_ANGLE_framebuffer_multisample */
-
-#ifndef GL_ANGLE_instanced_arrays
-#define GL_ANGLE_instanced_arrays 1
-#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE
-typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
-typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
-GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor);
-#endif
-#endif /* GL_ANGLE_instanced_arrays */
-
-#ifndef GL_ANGLE_pack_reverse_row_order
-#define GL_ANGLE_pack_reverse_row_order 1
-#define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4
-#endif /* GL_ANGLE_pack_reverse_row_order */
-
-#ifndef GL_ANGLE_program_binary
-#define GL_ANGLE_program_binary 1
-#define GL_PROGRAM_BINARY_ANGLE 0x93A6
-#endif /* GL_ANGLE_program_binary */
-
-#ifndef GL_ANGLE_texture_compression_dxt3
-#define GL_ANGLE_texture_compression_dxt3 1
-#define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2
-#endif /* GL_ANGLE_texture_compression_dxt3 */
-
-#ifndef GL_ANGLE_texture_compression_dxt5
-#define GL_ANGLE_texture_compression_dxt5 1
-#define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3
-#endif /* GL_ANGLE_texture_compression_dxt5 */
-
-#ifndef GL_ANGLE_texture_usage
-#define GL_ANGLE_texture_usage 1
-#define GL_TEXTURE_USAGE_ANGLE 0x93A2
-#define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3
-#endif /* GL_ANGLE_texture_usage */
-
-#ifndef GL_ANGLE_translated_shader_source
-#define GL_ANGLE_translated_shader_source 1
-#define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0
-typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
-#endif
-#endif /* GL_ANGLE_translated_shader_source */
-
-#ifndef GL_APPLE_clip_distance
-#define GL_APPLE_clip_distance 1
-#define GL_MAX_CLIP_DISTANCES_APPLE 0x0D32
-#define GL_CLIP_DISTANCE0_APPLE 0x3000
-#define GL_CLIP_DISTANCE1_APPLE 0x3001
-#define GL_CLIP_DISTANCE2_APPLE 0x3002
-#define GL_CLIP_DISTANCE3_APPLE 0x3003
-#define GL_CLIP_DISTANCE4_APPLE 0x3004
-#define GL_CLIP_DISTANCE5_APPLE 0x3005
-#define GL_CLIP_DISTANCE6_APPLE 0x3006
-#define GL_CLIP_DISTANCE7_APPLE 0x3007
-#endif /* GL_APPLE_clip_distance */
-
-#ifndef GL_APPLE_color_buffer_packed_float
-#define GL_APPLE_color_buffer_packed_float 1
-#endif /* GL_APPLE_color_buffer_packed_float */
-
-#ifndef GL_APPLE_copy_texture_levels
-#define GL_APPLE_copy_texture_levels 1
-typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
-#endif
-#endif /* GL_APPLE_copy_texture_levels */
-
-#ifndef GL_APPLE_framebuffer_multisample
-#define GL_APPLE_framebuffer_multisample 1
-#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56
-#define GL_MAX_SAMPLES_APPLE 0x8D57
-#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8
-#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9
-#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6
-#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
-#endif
-#endif /* GL_APPLE_framebuffer_multisample */
-
-#ifndef GL_APPLE_rgb_422
-#define GL_APPLE_rgb_422 1
-#define GL_RGB_422_APPLE 0x8A1F
-#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
-#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
-#define GL_RGB_RAW_422_APPLE 0x8A51
-#endif /* GL_APPLE_rgb_422 */
-
-#ifndef GL_APPLE_sync
-#define GL_APPLE_sync 1
-#define GL_SYNC_OBJECT_APPLE 0x8A53
-#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111
-#define GL_OBJECT_TYPE_APPLE 0x9112
-#define GL_SYNC_CONDITION_APPLE 0x9113
-#define GL_SYNC_STATUS_APPLE 0x9114
-#define GL_SYNC_FLAGS_APPLE 0x9115
-#define GL_SYNC_FENCE_APPLE 0x9116
-#define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117
-#define GL_UNSIGNALED_APPLE 0x9118
-#define GL_SIGNALED_APPLE 0x9119
-#define GL_ALREADY_SIGNALED_APPLE 0x911A
-#define GL_TIMEOUT_EXPIRED_APPLE 0x911B
-#define GL_CONDITION_SATISFIED_APPLE 0x911C
-#define GL_WAIT_FAILED_APPLE 0x911D
-#define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001
-#define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFFull
-typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags);
-typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync);
-typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync);
-typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
-typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
-typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params);
-typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags);
-GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync);
-GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync);
-GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params);
-GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-#endif
-#endif /* GL_APPLE_sync */
-
-#ifndef GL_APPLE_texture_format_BGRA8888
-#define GL_APPLE_texture_format_BGRA8888 1
-#define GL_BGRA_EXT 0x80E1
-#define GL_BGRA8_EXT 0x93A1
-#endif /* GL_APPLE_texture_format_BGRA8888 */
-
-#ifndef GL_APPLE_texture_max_level
-#define GL_APPLE_texture_max_level 1
-#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D
-#endif /* GL_APPLE_texture_max_level */
-
-#ifndef GL_APPLE_texture_packed_float
-#define GL_APPLE_texture_packed_float 1
-#define GL_UNSIGNED_INT_10F_11F_11F_REV_APPLE 0x8C3B
-#define GL_UNSIGNED_INT_5_9_9_9_REV_APPLE 0x8C3E
-#define GL_R11F_G11F_B10F_APPLE 0x8C3A
-#define GL_RGB9_E5_APPLE 0x8C3D
-#endif /* GL_APPLE_texture_packed_float */
-
-#ifndef GL_ARM_mali_program_binary
-#define GL_ARM_mali_program_binary 1
-#define GL_MALI_PROGRAM_BINARY_ARM 0x8F61
-#endif /* GL_ARM_mali_program_binary */
-
-#ifndef GL_ARM_mali_shader_binary
-#define GL_ARM_mali_shader_binary 1
-#define GL_MALI_SHADER_BINARY_ARM 0x8F60
-#endif /* GL_ARM_mali_shader_binary */
-
-#ifndef GL_ARM_rgba8
-#define GL_ARM_rgba8 1
-#endif /* GL_ARM_rgba8 */
-
-#ifndef GL_ARM_shader_framebuffer_fetch
-#define GL_ARM_shader_framebuffer_fetch 1
-#define GL_FETCH_PER_SAMPLE_ARM 0x8F65
-#define GL_FRAGMENT_SHADER_FRAMEBUFFER_FETCH_MRT_ARM 0x8F66
-#endif /* GL_ARM_shader_framebuffer_fetch */
-
-#ifndef GL_ARM_shader_framebuffer_fetch_depth_stencil
-#define GL_ARM_shader_framebuffer_fetch_depth_stencil 1
-#endif /* GL_ARM_shader_framebuffer_fetch_depth_stencil */
-
-#ifndef GL_DMP_program_binary
-#define GL_DMP_program_binary 1
-#define GL_SMAPHS30_PROGRAM_BINARY_DMP 0x9251
-#define GL_SMAPHS_PROGRAM_BINARY_DMP 0x9252
-#define GL_DMP_PROGRAM_BINARY_DMP 0x9253
-#endif /* GL_DMP_program_binary */
-
-#ifndef GL_DMP_shader_binary
-#define GL_DMP_shader_binary 1
-#define GL_SHADER_BINARY_DMP 0x9250
-#endif /* GL_DMP_shader_binary */
-
-#ifndef GL_EXT_blend_minmax
-#define GL_EXT_blend_minmax 1
-#define GL_MIN_EXT 0x8007
-#define GL_MAX_EXT 0x8008
-#endif /* GL_EXT_blend_minmax */
-
-#ifndef GL_EXT_color_buffer_half_float
-#define GL_EXT_color_buffer_half_float 1
-#define GL_RGBA16F_EXT 0x881A
-#define GL_RGB16F_EXT 0x881B
-#define GL_RG16F_EXT 0x822F
-#define GL_R16F_EXT 0x822D
-#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211
-#define GL_UNSIGNED_NORMALIZED_EXT 0x8C17
-#endif /* GL_EXT_color_buffer_half_float */
-
-#ifndef GL_EXT_copy_image
-#define GL_EXT_copy_image 1
-typedef void (GL_APIENTRYP PFNGLCOPYIMAGESUBDATAEXTPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glCopyImageSubDataEXT (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
-#endif
-#endif /* GL_EXT_copy_image */
-
-#ifndef GL_EXT_debug_label
-#define GL_EXT_debug_label 1
-#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F
-#define GL_PROGRAM_OBJECT_EXT 0x8B40
-#define GL_SHADER_OBJECT_EXT 0x8B48
-#define GL_BUFFER_OBJECT_EXT 0x9151
-#define GL_QUERY_OBJECT_EXT 0x9153
-#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154
-#define GL_TRANSFORM_FEEDBACK 0x8E22
-typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
-typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
-GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
-#endif
-#endif /* GL_EXT_debug_label */
-
-#ifndef GL_EXT_debug_marker
-#define GL_EXT_debug_marker 1
-typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
-typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
-typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
-GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
-GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void);
-#endif
-#endif /* GL_EXT_debug_marker */
-
-#ifndef GL_EXT_discard_framebuffer
-#define GL_EXT_discard_framebuffer 1
-#define GL_COLOR_EXT 0x1800
-#define GL_DEPTH_EXT 0x1801
-#define GL_STENCIL_EXT 0x1802
-typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-#endif
-#endif /* GL_EXT_discard_framebuffer */
-
-#ifndef GL_EXT_disjoint_timer_query
-#define GL_EXT_disjoint_timer_query 1
-#define GL_QUERY_COUNTER_BITS_EXT 0x8864
-#define GL_CURRENT_QUERY_EXT 0x8865
-#define GL_QUERY_RESULT_EXT 0x8866
-#define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867
-#define GL_TIME_ELAPSED_EXT 0x88BF
-#define GL_TIMESTAMP_EXT 0x8E28
-#define GL_GPU_DISJOINT_EXT 0x8FBB
-typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);
-typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);
-typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id);
-typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);
-typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target);
-typedef void (GL_APIENTRYP PFNGLQUERYCOUNTEREXTPROC) (GLuint id, GLenum target);
-typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVEXTPROC) (GLuint id, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);
-typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params);
-typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids);
-GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids);
-GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id);
-GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id);
-GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target);
-GL_APICALL void GL_APIENTRY glQueryCounterEXT (GLuint id, GLenum target);
-GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetQueryObjectivEXT (GLuint id, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params);
-GL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params);
-GL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params);
-#endif
-#endif /* GL_EXT_disjoint_timer_query */
-
-#ifndef GL_EXT_draw_buffers
-#define GL_EXT_draw_buffers 1
-#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
-#define GL_MAX_DRAW_BUFFERS_EXT 0x8824
-#define GL_DRAW_BUFFER0_EXT 0x8825
-#define GL_DRAW_BUFFER1_EXT 0x8826
-#define GL_DRAW_BUFFER2_EXT 0x8827
-#define GL_DRAW_BUFFER3_EXT 0x8828
-#define GL_DRAW_BUFFER4_EXT 0x8829
-#define GL_DRAW_BUFFER5_EXT 0x882A
-#define GL_DRAW_BUFFER6_EXT 0x882B
-#define GL_DRAW_BUFFER7_EXT 0x882C
-#define GL_DRAW_BUFFER8_EXT 0x882D
-#define GL_DRAW_BUFFER9_EXT 0x882E
-#define GL_DRAW_BUFFER10_EXT 0x882F
-#define GL_DRAW_BUFFER11_EXT 0x8830
-#define GL_DRAW_BUFFER12_EXT 0x8831
-#define GL_DRAW_BUFFER13_EXT 0x8832
-#define GL_DRAW_BUFFER14_EXT 0x8833
-#define GL_DRAW_BUFFER15_EXT 0x8834
-#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
-#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
-#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
-#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
-#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
-#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
-#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
-#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
-#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
-#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
-#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
-#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
-#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
-#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
-#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
-#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
-typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs);
-#endif
-#endif /* GL_EXT_draw_buffers */
-
-#ifndef GL_EXT_draw_buffers_indexed
-#define GL_EXT_draw_buffers_indexed 1
-#define GL_MIN 0x8007
-#define GL_MAX 0x8008
-typedef void (GL_APIENTRYP PFNGLENABLEIEXTPROC) (GLenum target, GLuint index);
-typedef void (GL_APIENTRYP PFNGLDISABLEIEXTPROC) (GLenum target, GLuint index);
-typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONIEXTPROC) (GLuint buf, GLenum mode);
-typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEIEXTPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
-typedef void (GL_APIENTRYP PFNGLBLENDFUNCIEXTPROC) (GLuint buf, GLenum src, GLenum dst);
-typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEIEXTPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-typedef void (GL_APIENTRYP PFNGLCOLORMASKIEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
-typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDIEXTPROC) (GLenum target, GLuint index);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glEnableiEXT (GLenum target, GLuint index);
-GL_APICALL void GL_APIENTRY glDisableiEXT (GLenum target, GLuint index);
-GL_APICALL void GL_APIENTRY glBlendEquationiEXT (GLuint buf, GLenum mode);
-GL_APICALL void GL_APIENTRY glBlendEquationSeparateiEXT (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
-GL_APICALL void GL_APIENTRY glBlendFunciEXT (GLuint buf, GLenum src, GLenum dst);
-GL_APICALL void GL_APIENTRY glBlendFuncSeparateiEXT (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-GL_APICALL void GL_APIENTRY glColorMaskiEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
-GL_APICALL GLboolean GL_APIENTRY glIsEnablediEXT (GLenum target, GLuint index);
-#endif
-#endif /* GL_EXT_draw_buffers_indexed */
-
-#ifndef GL_EXT_draw_instanced
-#define GL_EXT_draw_instanced 1
-typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
-typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
-GL_APICALL void GL_APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-#endif
-#endif /* GL_EXT_draw_instanced */
-
-#ifndef GL_EXT_geometry_point_size
-#define GL_EXT_geometry_point_size 1
-#endif /* GL_EXT_geometry_point_size */
-
-#ifndef GL_EXT_geometry_shader
-#define GL_EXT_geometry_shader 1
-#define GL_GEOMETRY_SHADER_EXT 0x8DD9
-#define GL_GEOMETRY_SHADER_BIT_EXT 0x00000004
-#define GL_GEOMETRY_LINKED_VERTICES_OUT_EXT 0x8916
-#define GL_GEOMETRY_LINKED_INPUT_TYPE_EXT 0x8917
-#define GL_GEOMETRY_LINKED_OUTPUT_TYPE_EXT 0x8918
-#define GL_GEOMETRY_SHADER_INVOCATIONS_EXT 0x887F
-#define GL_LAYER_PROVOKING_VERTEX_EXT 0x825E
-#ifndef GL_EXT_geometry_shader4
-#define GL_LINES_ADJACENCY_EXT 0x000A
-#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B
-#define GL_TRIANGLES_ADJACENCY_EXT 0x000C
-#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D
-#endif /* GL_EXT_geometry_shader4 */
-#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
-#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS_EXT 0x8A2C
-#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8A32
-#define GL_MAX_GEOMETRY_INPUT_COMPONENTS_EXT 0x9123
-#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_EXT 0x9124
-#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
-#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
-#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS_EXT 0x8E5A
-#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
-#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT 0x92CF
-#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT 0x92D5
-#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS_EXT 0x90CD
-#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_EXT 0x90D7
-#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D
-#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E
-#define GL_UNDEFINED_VERTEX_EXT 0x8260
-#define GL_PRIMITIVES_GENERATED_EXT 0x8C87
-#define GL_FRAMEBUFFER_DEFAULT_LAYERS_EXT 0x9312
-#define GL_MAX_FRAMEBUFFER_LAYERS_EXT 0x9317
-#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
-#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
-#define GL_REFERENCED_BY_GEOMETRY_SHADER_EXT 0x9309
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level);
-#endif
-#endif /* GL_EXT_geometry_shader */
-
-#ifndef GL_EXT_gpu_shader5
-#define GL_EXT_gpu_shader5 1
-#endif /* GL_EXT_gpu_shader5 */
-
-#ifndef GL_EXT_instanced_arrays
-#define GL_EXT_instanced_arrays 1
-#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_EXT 0x88FE
-typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISOREXTPROC) (GLuint index, GLuint divisor);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glVertexAttribDivisorEXT (GLuint index, GLuint divisor);
-#endif
-#endif /* GL_EXT_instanced_arrays */
-
-#ifndef GL_EXT_map_buffer_range
-#define GL_EXT_map_buffer_range 1
-#define GL_MAP_READ_BIT_EXT 0x0001
-#define GL_MAP_WRITE_BIT_EXT 0x0002
-#define GL_MAP_INVALIDATE_RANGE_BIT_EXT 0x0004
-#define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008
-#define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010
-#define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020
-typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void *GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length);
-#endif
-#endif /* GL_EXT_map_buffer_range */
-
-#ifndef GL_EXT_multi_draw_arrays
-#define GL_EXT_multi_draw_arrays 1
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
-GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
-#endif
-#endif /* GL_EXT_multi_draw_arrays */
-
-#ifndef GL_EXT_multisampled_render_to_texture
-#define GL_EXT_multisampled_render_to_texture 1
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C
-#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
-#define GL_MAX_SAMPLES_EXT 0x8D57
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-#endif /* GL_EXT_multisampled_render_to_texture */
-
-#ifndef GL_EXT_multiview_draw_buffers
-#define GL_EXT_multiview_draw_buffers 1
-#define GL_COLOR_ATTACHMENT_EXT 0x90F0
-#define GL_MULTIVIEW_EXT 0x90F1
-#define GL_DRAW_BUFFER_EXT 0x0C01
-#define GL_READ_BUFFER_EXT 0x0C02
-#define GL_MAX_MULTIVIEW_BUFFERS_EXT 0x90F2
-typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index);
-typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices);
-typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index);
-GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices);
-GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data);
-#endif
-#endif /* GL_EXT_multiview_draw_buffers */
-
-#ifndef GL_EXT_occlusion_query_boolean
-#define GL_EXT_occlusion_query_boolean 1
-#define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F
-#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A
-#endif /* GL_EXT_occlusion_query_boolean */
-
-#ifndef GL_EXT_primitive_bounding_box
-#define GL_EXT_primitive_bounding_box 1
-#define GL_PRIMITIVE_BOUNDING_BOX_EXT 0x92BE
-typedef void (GL_APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXEXTPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glPrimitiveBoundingBoxEXT (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
-#endif
-#endif /* GL_EXT_primitive_bounding_box */
-
-#ifndef GL_EXT_pvrtc_sRGB
-#define GL_EXT_pvrtc_sRGB 1
-#define GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT 0x8A54
-#define GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT 0x8A55
-#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT 0x8A56
-#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT 0x8A57
-#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG 0x93F0
-#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG 0x93F1
-#endif /* GL_EXT_pvrtc_sRGB */
-
-#ifndef GL_EXT_read_format_bgra
-#define GL_EXT_read_format_bgra 1
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365
-#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
-#endif /* GL_EXT_read_format_bgra */
-
-#ifndef GL_EXT_robustness
-#define GL_EXT_robustness 1
-#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253
-#define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254
-#define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255
-#define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3
-#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256
-#define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252
-#define GL_NO_RESET_NOTIFICATION_EXT 0x8261
-typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
-typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
-GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
-GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-#endif
-#endif /* GL_EXT_robustness */
-
-#ifndef GL_EXT_sRGB
-#define GL_EXT_sRGB 1
-#define GL_SRGB_EXT 0x8C40
-#define GL_SRGB_ALPHA_EXT 0x8C42
-#define GL_SRGB8_ALPHA8_EXT 0x8C43
-#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210
-#endif /* GL_EXT_sRGB */
-
-#ifndef GL_EXT_sRGB_write_control
-#define GL_EXT_sRGB_write_control 1
-#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
-#endif /* GL_EXT_sRGB_write_control */
-
-#ifndef GL_EXT_separate_shader_objects
-#define GL_EXT_separate_shader_objects 1
-#define GL_ACTIVE_PROGRAM_EXT 0x8259
-#define GL_VERTEX_SHADER_BIT_EXT 0x00000001
-#define GL_FRAGMENT_SHADER_BIT_EXT 0x00000002
-#define GL_ALL_SHADER_BITS_EXT 0xFFFFFFFF
-#define GL_PROGRAM_SEPARABLE_EXT 0x8258
-#define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A
-typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);
-typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
-typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);
-typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);
-typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);
-typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
-typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
-typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);
-GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline);
-GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);
-GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines);
-GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines);
-GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params);
-GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
-GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0);
-GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0);
-GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1);
-GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1);
-GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
-GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
-GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
-GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
-GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program);
-GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0);
-GL_APICALL void GL_APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1);
-GL_APICALL void GL_APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
-GL_APICALL void GL_APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-GL_APICALL void GL_APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-#endif
-#endif /* GL_EXT_separate_shader_objects */
-
-#ifndef GL_EXT_shader_framebuffer_fetch
-#define GL_EXT_shader_framebuffer_fetch 1
-#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52
-#endif /* GL_EXT_shader_framebuffer_fetch */
-
-#ifndef GL_EXT_shader_implicit_conversions
-#define GL_EXT_shader_implicit_conversions 1
-#endif /* GL_EXT_shader_implicit_conversions */
-
-#ifndef GL_EXT_shader_integer_mix
-#define GL_EXT_shader_integer_mix 1
-#endif /* GL_EXT_shader_integer_mix */
-
-#ifndef GL_EXT_shader_io_blocks
-#define GL_EXT_shader_io_blocks 1
-#endif /* GL_EXT_shader_io_blocks */
-
-#ifndef GL_EXT_shader_pixel_local_storage
-#define GL_EXT_shader_pixel_local_storage 1
-#define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT 0x8F63
-#define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_SIZE_EXT 0x8F67
-#define GL_SHADER_PIXEL_LOCAL_STORAGE_EXT 0x8F64
-#endif /* GL_EXT_shader_pixel_local_storage */
-
-#ifndef GL_EXT_shader_texture_lod
-#define GL_EXT_shader_texture_lod 1
-#endif /* GL_EXT_shader_texture_lod */
-
-#ifndef GL_EXT_shadow_samplers
-#define GL_EXT_shadow_samplers 1
-#define GL_TEXTURE_COMPARE_MODE_EXT 0x884C
-#define GL_TEXTURE_COMPARE_FUNC_EXT 0x884D
-#define GL_COMPARE_REF_TO_TEXTURE_EXT 0x884E
-#define GL_SAMPLER_2D_SHADOW_EXT 0x8B62
-#endif /* GL_EXT_shadow_samplers */
-
-#ifndef GL_EXT_tessellation_point_size
-#define GL_EXT_tessellation_point_size 1
-#endif /* GL_EXT_tessellation_point_size */
-
-#ifndef GL_EXT_tessellation_shader
-#define GL_EXT_tessellation_shader 1
-#define GL_PATCHES_EXT 0x000E
-#define GL_PATCH_VERTICES_EXT 0x8E72
-#define GL_TESS_CONTROL_OUTPUT_VERTICES_EXT 0x8E75
-#define GL_TESS_GEN_MODE_EXT 0x8E76
-#define GL_TESS_GEN_SPACING_EXT 0x8E77
-#define GL_TESS_GEN_VERTEX_ORDER_EXT 0x8E78
-#define GL_TESS_GEN_POINT_MODE_EXT 0x8E79
-#define GL_ISOLINES_EXT 0x8E7A
-#define GL_QUADS_EXT 0x0007
-#define GL_FRACTIONAL_ODD_EXT 0x8E7B
-#define GL_FRACTIONAL_EVEN_EXT 0x8E7C
-#define GL_MAX_PATCH_VERTICES_EXT 0x8E7D
-#define GL_MAX_TESS_GEN_LEVEL_EXT 0x8E7E
-#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_EXT 0x8E7F
-#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT 0x8E80
-#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_EXT 0x8E81
-#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_EXT 0x8E82
-#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_EXT 0x8E83
-#define GL_MAX_TESS_PATCH_COMPONENTS_EXT 0x8E84
-#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_EXT 0x8E85
-#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_EXT 0x8E86
-#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_EXT 0x8E89
-#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_EXT 0x8E8A
-#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_EXT 0x886C
-#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_EXT 0x886D
-#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_EXT 0x8E1E
-#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT 0x8E1F
-#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_EXT 0x92CD
-#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_EXT 0x92CE
-#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_EXT 0x92D3
-#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_EXT 0x92D4
-#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_EXT 0x90CB
-#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_EXT 0x90CC
-#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_EXT 0x90D8
-#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_EXT 0x90D9
-#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221
-#define GL_IS_PER_PATCH_EXT 0x92E7
-#define GL_REFERENCED_BY_TESS_CONTROL_SHADER_EXT 0x9307
-#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER_EXT 0x9308
-#define GL_TESS_CONTROL_SHADER_EXT 0x8E88
-#define GL_TESS_EVALUATION_SHADER_EXT 0x8E87
-#define GL_TESS_CONTROL_SHADER_BIT_EXT 0x00000008
-#define GL_TESS_EVALUATION_SHADER_BIT_EXT 0x00000010
-typedef void (GL_APIENTRYP PFNGLPATCHPARAMETERIEXTPROC) (GLenum pname, GLint value);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glPatchParameteriEXT (GLenum pname, GLint value);
-#endif
-#endif /* GL_EXT_tessellation_shader */
-
-#ifndef GL_EXT_texture_border_clamp
-#define GL_EXT_texture_border_clamp 1
-#define GL_TEXTURE_BORDER_COLOR_EXT 0x1004
-#define GL_CLAMP_TO_BORDER_EXT 0x812D
-typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
-typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
-typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, const GLint *param);
-typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, const GLuint *param);
-typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, GLuint *params);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params);
-GL_APICALL void GL_APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params);
-GL_APICALL void GL_APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params);
-GL_APICALL void GL_APIENTRY glSamplerParameterIivEXT (GLuint sampler, GLenum pname, const GLint *param);
-GL_APICALL void GL_APIENTRY glSamplerParameterIuivEXT (GLuint sampler, GLenum pname, const GLuint *param);
-GL_APICALL void GL_APIENTRY glGetSamplerParameterIivEXT (GLuint sampler, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetSamplerParameterIuivEXT (GLuint sampler, GLenum pname, GLuint *params);
-#endif
-#endif /* GL_EXT_texture_border_clamp */
-
-#ifndef GL_EXT_texture_buffer
-#define GL_EXT_texture_buffer 1
-#define GL_TEXTURE_BUFFER_EXT 0x8C2A
-#define GL_TEXTURE_BUFFER_BINDING_EXT 0x8C2A
-#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
-#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
-#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
-#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_EXT 0x919F
-#define GL_SAMPLER_BUFFER_EXT 0x8DC2
-#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
-#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
-#define GL_IMAGE_BUFFER_EXT 0x9051
-#define GL_INT_IMAGE_BUFFER_EXT 0x905C
-#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067
-#define GL_TEXTURE_BUFFER_OFFSET_EXT 0x919D
-#define GL_TEXTURE_BUFFER_SIZE_EXT 0x919E
-typedef void (GL_APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
-typedef void (GL_APIENTRYP PFNGLTEXBUFFERRANGEEXTPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer);
-GL_APICALL void GL_APIENTRY glTexBufferRangeEXT (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
-#endif
-#endif /* GL_EXT_texture_buffer */
-
-#ifndef GL_EXT_texture_compression_dxt1
-#define GL_EXT_texture_compression_dxt1 1
-#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
-#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
-#endif /* GL_EXT_texture_compression_dxt1 */
-
-#ifndef GL_EXT_texture_compression_s3tc
-#define GL_EXT_texture_compression_s3tc 1
-#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
-#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
-#endif /* GL_EXT_texture_compression_s3tc */
-
-#ifndef GL_EXT_texture_cube_map_array
-#define GL_EXT_texture_cube_map_array 1
-#define GL_TEXTURE_CUBE_MAP_ARRAY_EXT 0x9009
-#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_EXT 0x900A
-#define GL_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900C
-#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_EXT 0x900D
-#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900E
-#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900F
-#define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054
-#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F
-#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A
-#endif /* GL_EXT_texture_cube_map_array */
-
-#ifndef GL_EXT_texture_filter_anisotropic
-#define GL_EXT_texture_filter_anisotropic 1
-#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
-#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
-#endif /* GL_EXT_texture_filter_anisotropic */
-
-#ifndef GL_EXT_texture_format_BGRA8888
-#define GL_EXT_texture_format_BGRA8888 1
-#endif /* GL_EXT_texture_format_BGRA8888 */
-
-#ifndef GL_EXT_texture_rg
-#define GL_EXT_texture_rg 1
-#define GL_RED_EXT 0x1903
-#define GL_RG_EXT 0x8227
-#define GL_R8_EXT 0x8229
-#define GL_RG8_EXT 0x822B
-#endif /* GL_EXT_texture_rg */
-
-#ifndef GL_EXT_texture_sRGB_decode
-#define GL_EXT_texture_sRGB_decode 1
-#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48
-#define GL_DECODE_EXT 0x8A49
-#define GL_SKIP_DECODE_EXT 0x8A4A
-#endif /* GL_EXT_texture_sRGB_decode */
-
-#ifndef GL_EXT_texture_storage
-#define GL_EXT_texture_storage 1
-#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F
-#define GL_ALPHA8_EXT 0x803C
-#define GL_LUMINANCE8_EXT 0x8040
-#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
-#define GL_RGBA32F_EXT 0x8814
-#define GL_RGB32F_EXT 0x8815
-#define GL_ALPHA32F_EXT 0x8816
-#define GL_LUMINANCE32F_EXT 0x8818
-#define GL_LUMINANCE_ALPHA32F_EXT 0x8819
-#define GL_ALPHA16F_EXT 0x881C
-#define GL_LUMINANCE16F_EXT 0x881E
-#define GL_LUMINANCE_ALPHA16F_EXT 0x881F
-#define GL_R32F_EXT 0x822E
-#define GL_RG32F_EXT 0x8230
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-#endif
-#endif /* GL_EXT_texture_storage */
-
-#ifndef GL_EXT_texture_type_2_10_10_10_REV
-#define GL_EXT_texture_type_2_10_10_10_REV 1
-#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
-#endif /* GL_EXT_texture_type_2_10_10_10_REV */
-
-#ifndef GL_EXT_texture_view
-#define GL_EXT_texture_view 1
-#define GL_TEXTURE_VIEW_MIN_LEVEL_EXT 0x82DB
-#define GL_TEXTURE_VIEW_NUM_LEVELS_EXT 0x82DC
-#define GL_TEXTURE_VIEW_MIN_LAYER_EXT 0x82DD
-#define GL_TEXTURE_VIEW_NUM_LAYERS_EXT 0x82DE
-#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF
-typedef void (GL_APIENTRYP PFNGLTEXTUREVIEWEXTPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTextureViewEXT (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
-#endif
-#endif /* GL_EXT_texture_view */
-
-#ifndef GL_EXT_unpack_subimage
-#define GL_EXT_unpack_subimage 1
-#define GL_UNPACK_ROW_LENGTH_EXT 0x0CF2
-#define GL_UNPACK_SKIP_ROWS_EXT 0x0CF3
-#define GL_UNPACK_SKIP_PIXELS_EXT 0x0CF4
-#endif /* GL_EXT_unpack_subimage */
-
-#ifndef GL_FJ_shader_binary_GCCSO
-#define GL_FJ_shader_binary_GCCSO 1
-#define GL_GCCSO_SHADER_BINARY_FJ 0x9260
-#endif /* GL_FJ_shader_binary_GCCSO */
-
-#ifndef GL_IMG_multisampled_render_to_texture
-#define GL_IMG_multisampled_render_to_texture 1
-#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134
-#define GL_MAX_SAMPLES_IMG 0x9135
-#define GL_TEXTURE_SAMPLES_IMG 0x9136
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-#endif /* GL_IMG_multisampled_render_to_texture */
-
-#ifndef GL_IMG_program_binary
-#define GL_IMG_program_binary 1
-#define GL_SGX_PROGRAM_BINARY_IMG 0x9130
-#endif /* GL_IMG_program_binary */
-
-#ifndef GL_IMG_read_format
-#define GL_IMG_read_format 1
-#define GL_BGRA_IMG 0x80E1
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365
-#endif /* GL_IMG_read_format */
-
-#ifndef GL_IMG_shader_binary
-#define GL_IMG_shader_binary 1
-#define GL_SGX_BINARY_IMG 0x8C0A
-#endif /* GL_IMG_shader_binary */
-
-#ifndef GL_IMG_texture_compression_pvrtc
-#define GL_IMG_texture_compression_pvrtc 1
-#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
-#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
-#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
-#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
-#endif /* GL_IMG_texture_compression_pvrtc */
-
-#ifndef GL_IMG_texture_compression_pvrtc2
-#define GL_IMG_texture_compression_pvrtc2 1
-#define GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG 0x9137
-#define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138
-#endif /* GL_IMG_texture_compression_pvrtc2 */
-
-#ifndef GL_INTEL_performance_query
-#define GL_INTEL_performance_query 1
-#define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000
-#define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001
-#define GL_PERFQUERY_WAIT_INTEL 0x83FB
-#define GL_PERFQUERY_FLUSH_INTEL 0x83FA
-#define GL_PERFQUERY_DONOT_FLUSH_INTEL 0x83F9
-#define GL_PERFQUERY_COUNTER_EVENT_INTEL 0x94F0
-#define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1
-#define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2
-#define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3
-#define GL_PERFQUERY_COUNTER_RAW_INTEL 0x94F4
-#define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5
-#define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8
-#define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9
-#define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA
-#define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB
-#define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC
-#define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD
-#define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE
-#define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF
-#define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500
-typedef void (GL_APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle);
-typedef void (GL_APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle);
-typedef void (GL_APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle);
-typedef void (GL_APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle);
-typedef void (GL_APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId);
-typedef void (GL_APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId);
-typedef void (GL_APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);
-typedef void (GL_APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);
-typedef void (GL_APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId);
-typedef void (GL_APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle);
-GL_APICALL void GL_APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle);
-GL_APICALL void GL_APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle);
-GL_APICALL void GL_APIENTRY glEndPerfQueryINTEL (GLuint queryHandle);
-GL_APICALL void GL_APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId);
-GL_APICALL void GL_APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId);
-GL_APICALL void GL_APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);
-GL_APICALL void GL_APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);
-GL_APICALL void GL_APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId);
-GL_APICALL void GL_APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
-#endif
-#endif /* GL_INTEL_performance_query */
-
-#ifndef GL_NV_blend_equation_advanced
-#define GL_NV_blend_equation_advanced 1
-#define GL_BLEND_OVERLAP_NV 0x9281
-#define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280
-#define GL_BLUE_NV 0x1905
-#define GL_COLORBURN_NV 0x929A
-#define GL_COLORDODGE_NV 0x9299
-#define GL_CONJOINT_NV 0x9284
-#define GL_CONTRAST_NV 0x92A1
-#define GL_DARKEN_NV 0x9297
-#define GL_DIFFERENCE_NV 0x929E
-#define GL_DISJOINT_NV 0x9283
-#define GL_DST_ATOP_NV 0x928F
-#define GL_DST_IN_NV 0x928B
-#define GL_DST_NV 0x9287
-#define GL_DST_OUT_NV 0x928D
-#define GL_DST_OVER_NV 0x9289
-#define GL_EXCLUSION_NV 0x92A0
-#define GL_GREEN_NV 0x1904
-#define GL_HARDLIGHT_NV 0x929B
-#define GL_HARDMIX_NV 0x92A9
-#define GL_HSL_COLOR_NV 0x92AF
-#define GL_HSL_HUE_NV 0x92AD
-#define GL_HSL_LUMINOSITY_NV 0x92B0
-#define GL_HSL_SATURATION_NV 0x92AE
-#define GL_INVERT_OVG_NV 0x92B4
-#define GL_INVERT_RGB_NV 0x92A3
-#define GL_LIGHTEN_NV 0x9298
-#define GL_LINEARBURN_NV 0x92A5
-#define GL_LINEARDODGE_NV 0x92A4
-#define GL_LINEARLIGHT_NV 0x92A7
-#define GL_MINUS_CLAMPED_NV 0x92B3
-#define GL_MINUS_NV 0x929F
-#define GL_MULTIPLY_NV 0x9294
-#define GL_OVERLAY_NV 0x9296
-#define GL_PINLIGHT_NV 0x92A8
-#define GL_PLUS_CLAMPED_ALPHA_NV 0x92B2
-#define GL_PLUS_CLAMPED_NV 0x92B1
-#define GL_PLUS_DARKER_NV 0x9292
-#define GL_PLUS_NV 0x9291
-#define GL_RED_NV 0x1903
-#define GL_SCREEN_NV 0x9295
-#define GL_SOFTLIGHT_NV 0x929C
-#define GL_SRC_ATOP_NV 0x928E
-#define GL_SRC_IN_NV 0x928A
-#define GL_SRC_NV 0x9286
-#define GL_SRC_OUT_NV 0x928C
-#define GL_SRC_OVER_NV 0x9288
-#define GL_UNCORRELATED_NV 0x9282
-#define GL_VIVIDLIGHT_NV 0x92A6
-#define GL_XOR_NV 0x1506
-typedef void (GL_APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value);
-typedef void (GL_APIENTRYP PFNGLBLENDBARRIERNVPROC) (void);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBlendParameteriNV (GLenum pname, GLint value);
-GL_APICALL void GL_APIENTRY glBlendBarrierNV (void);
-#endif
-#endif /* GL_NV_blend_equation_advanced */
-
-#ifndef GL_NV_blend_equation_advanced_coherent
-#define GL_NV_blend_equation_advanced_coherent 1
-#define GL_BLEND_ADVANCED_COHERENT_NV 0x9285
-#endif /* GL_NV_blend_equation_advanced_coherent */
-
-#ifndef GL_NV_copy_buffer
-#define GL_NV_copy_buffer 1
-#define GL_COPY_READ_BUFFER_NV 0x8F36
-#define GL_COPY_WRITE_BUFFER_NV 0x8F37
-typedef void (GL_APIENTRYP PFNGLCOPYBUFFERSUBDATANVPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glCopyBufferSubDataNV (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-#endif
-#endif /* GL_NV_copy_buffer */
-
-#ifndef GL_NV_coverage_sample
-#define GL_NV_coverage_sample 1
-#define GL_COVERAGE_COMPONENT_NV 0x8ED0
-#define GL_COVERAGE_COMPONENT4_NV 0x8ED1
-#define GL_COVERAGE_ATTACHMENT_NV 0x8ED2
-#define GL_COVERAGE_BUFFERS_NV 0x8ED3
-#define GL_COVERAGE_SAMPLES_NV 0x8ED4
-#define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5
-#define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6
-#define GL_COVERAGE_AUTOMATIC_NV 0x8ED7
-#define GL_COVERAGE_BUFFER_BIT_NV 0x00008000
-typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
-typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
-GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
-#endif
-#endif /* GL_NV_coverage_sample */
-
-#ifndef GL_NV_depth_nonlinear
-#define GL_NV_depth_nonlinear 1
-#define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C
-#endif /* GL_NV_depth_nonlinear */
-
-#ifndef GL_NV_draw_buffers
-#define GL_NV_draw_buffers 1
-#define GL_MAX_DRAW_BUFFERS_NV 0x8824
-#define GL_DRAW_BUFFER0_NV 0x8825
-#define GL_DRAW_BUFFER1_NV 0x8826
-#define GL_DRAW_BUFFER2_NV 0x8827
-#define GL_DRAW_BUFFER3_NV 0x8828
-#define GL_DRAW_BUFFER4_NV 0x8829
-#define GL_DRAW_BUFFER5_NV 0x882A
-#define GL_DRAW_BUFFER6_NV 0x882B
-#define GL_DRAW_BUFFER7_NV 0x882C
-#define GL_DRAW_BUFFER8_NV 0x882D
-#define GL_DRAW_BUFFER9_NV 0x882E
-#define GL_DRAW_BUFFER10_NV 0x882F
-#define GL_DRAW_BUFFER11_NV 0x8830
-#define GL_DRAW_BUFFER12_NV 0x8831
-#define GL_DRAW_BUFFER13_NV 0x8832
-#define GL_DRAW_BUFFER14_NV 0x8833
-#define GL_DRAW_BUFFER15_NV 0x8834
-#define GL_COLOR_ATTACHMENT0_NV 0x8CE0
-#define GL_COLOR_ATTACHMENT1_NV 0x8CE1
-#define GL_COLOR_ATTACHMENT2_NV 0x8CE2
-#define GL_COLOR_ATTACHMENT3_NV 0x8CE3
-#define GL_COLOR_ATTACHMENT4_NV 0x8CE4
-#define GL_COLOR_ATTACHMENT5_NV 0x8CE5
-#define GL_COLOR_ATTACHMENT6_NV 0x8CE6
-#define GL_COLOR_ATTACHMENT7_NV 0x8CE7
-#define GL_COLOR_ATTACHMENT8_NV 0x8CE8
-#define GL_COLOR_ATTACHMENT9_NV 0x8CE9
-#define GL_COLOR_ATTACHMENT10_NV 0x8CEA
-#define GL_COLOR_ATTACHMENT11_NV 0x8CEB
-#define GL_COLOR_ATTACHMENT12_NV 0x8CEC
-#define GL_COLOR_ATTACHMENT13_NV 0x8CED
-#define GL_COLOR_ATTACHMENT14_NV 0x8CEE
-#define GL_COLOR_ATTACHMENT15_NV 0x8CEF
-typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);
-#endif
-#endif /* GL_NV_draw_buffers */
-
-#ifndef GL_NV_draw_instanced
-#define GL_NV_draw_instanced 1
-typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDNVPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
-typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDNVPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDrawArraysInstancedNV (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
-GL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
-#endif
-#endif /* GL_NV_draw_instanced */
-
-#ifndef GL_NV_explicit_attrib_location
-#define GL_NV_explicit_attrib_location 1
-#endif /* GL_NV_explicit_attrib_location */
-
-#ifndef GL_NV_fbo_color_attachments
-#define GL_NV_fbo_color_attachments 1
-#define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF
-#endif /* GL_NV_fbo_color_attachments */
-
-#ifndef GL_NV_fence
-#define GL_NV_fence 1
-#define GL_ALL_COMPLETED_NV 0x84F2
-#define GL_FENCE_STATUS_NV 0x84F3
-#define GL_FENCE_CONDITION_NV 0x84F4
-typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
-typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
-typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
-typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
-typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
-typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
-GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
-GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint fence);
-GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint fence);
-GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint fence);
-GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
-#endif
-#endif /* GL_NV_fence */
-
-#ifndef GL_NV_framebuffer_blit
-#define GL_NV_framebuffer_blit 1
-#define GL_READ_FRAMEBUFFER_NV 0x8CA8
-#define GL_DRAW_FRAMEBUFFER_NV 0x8CA9
-#define GL_DRAW_FRAMEBUFFER_BINDING_NV 0x8CA6
-#define GL_READ_FRAMEBUFFER_BINDING_NV 0x8CAA
-typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERNVPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBlitFramebufferNV (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-#endif
-#endif /* GL_NV_framebuffer_blit */
-
-#ifndef GL_NV_framebuffer_multisample
-#define GL_NV_framebuffer_multisample 1
-#define GL_RENDERBUFFER_SAMPLES_NV 0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV 0x8D56
-#define GL_MAX_SAMPLES_NV 0x8D57
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLENVPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-#endif
-#endif /* GL_NV_framebuffer_multisample */
-
-#ifndef GL_NV_generate_mipmap_sRGB
-#define GL_NV_generate_mipmap_sRGB 1
-#endif /* GL_NV_generate_mipmap_sRGB */
-
-#ifndef GL_NV_instanced_arrays
-#define GL_NV_instanced_arrays 1
-#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV 0x88FE
-typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORNVPROC) (GLuint index, GLuint divisor);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, GLuint divisor);
-#endif
-#endif /* GL_NV_instanced_arrays */
-
-#ifndef GL_NV_non_square_matrices
-#define GL_NV_non_square_matrices 1
-#define GL_FLOAT_MAT2x3_NV 0x8B65
-#define GL_FLOAT_MAT2x4_NV 0x8B66
-#define GL_FLOAT_MAT3x2_NV 0x8B67
-#define GL_FLOAT_MAT3x4_NV 0x8B68
-#define GL_FLOAT_MAT4x2_NV 0x8B69
-#define GL_FLOAT_MAT4x3_NV 0x8B6A
-typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X3FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X2FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X4FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X2FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X4FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X3FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glUniformMatrix2x3fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix3x2fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix2x4fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix4x2fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix3x4fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glUniformMatrix4x3fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-#endif
-#endif /* GL_NV_non_square_matrices */
-
-#ifndef GL_NV_read_buffer
-#define GL_NV_read_buffer 1
-#define GL_READ_BUFFER_NV 0x0C02
-typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode);
-#endif
-#endif /* GL_NV_read_buffer */
-
-#ifndef GL_NV_read_buffer_front
-#define GL_NV_read_buffer_front 1
-#endif /* GL_NV_read_buffer_front */
-
-#ifndef GL_NV_read_depth
-#define GL_NV_read_depth 1
-#endif /* GL_NV_read_depth */
-
-#ifndef GL_NV_read_depth_stencil
-#define GL_NV_read_depth_stencil 1
-#endif /* GL_NV_read_depth_stencil */
-
-#ifndef GL_NV_read_stencil
-#define GL_NV_read_stencil 1
-#endif /* GL_NV_read_stencil */
-
-#ifndef GL_NV_sRGB_formats
-#define GL_NV_sRGB_formats 1
-#define GL_SLUMINANCE_NV 0x8C46
-#define GL_SLUMINANCE_ALPHA_NV 0x8C44
-#define GL_SRGB8_NV 0x8C41
-#define GL_SLUMINANCE8_NV 0x8C47
-#define GL_SLUMINANCE8_ALPHA8_NV 0x8C45
-#define GL_COMPRESSED_SRGB_S3TC_DXT1_NV 0x8C4C
-#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV 0x8C4D
-#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV 0x8C4E
-#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV 0x8C4F
-#define GL_ETC1_SRGB8_NV 0x88EE
-#endif /* GL_NV_sRGB_formats */
-
-#ifndef GL_NV_shadow_samplers_array
-#define GL_NV_shadow_samplers_array 1
-#define GL_SAMPLER_2D_ARRAY_SHADOW_NV 0x8DC4
-#endif /* GL_NV_shadow_samplers_array */
-
-#ifndef GL_NV_shadow_samplers_cube
-#define GL_NV_shadow_samplers_cube 1
-#define GL_SAMPLER_CUBE_SHADOW_NV 0x8DC5
-#endif /* GL_NV_shadow_samplers_cube */
-
-#ifndef GL_NV_texture_border_clamp
-#define GL_NV_texture_border_clamp 1
-#define GL_TEXTURE_BORDER_COLOR_NV 0x1004
-#define GL_CLAMP_TO_BORDER_NV 0x812D
-#endif /* GL_NV_texture_border_clamp */
-
-#ifndef GL_NV_texture_compression_s3tc_update
-#define GL_NV_texture_compression_s3tc_update 1
-#endif /* GL_NV_texture_compression_s3tc_update */
-
-#ifndef GL_NV_texture_npot_2D_mipmap
-#define GL_NV_texture_npot_2D_mipmap 1
-#endif /* GL_NV_texture_npot_2D_mipmap */
-
-#ifndef GL_QCOM_alpha_test
-#define GL_QCOM_alpha_test 1
-#define GL_ALPHA_TEST_QCOM 0x0BC0
-#define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1
-#define GL_ALPHA_TEST_REF_QCOM 0x0BC2
-typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref);
-#endif
-#endif /* GL_QCOM_alpha_test */
-
-#ifndef GL_QCOM_binning_control
-#define GL_QCOM_binning_control 1
-#define GL_BINNING_CONTROL_HINT_QCOM 0x8FB0
-#define GL_CPU_OPTIMIZED_QCOM 0x8FB1
-#define GL_GPU_OPTIMIZED_QCOM 0x8FB2
-#define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM 0x8FB3
-#endif /* GL_QCOM_binning_control */
-
-#ifndef GL_QCOM_driver_control
-#define GL_QCOM_driver_control 1
-typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
-typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
-typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
-typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
-GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
-GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
-GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
-#endif
-#endif /* GL_QCOM_driver_control */
-
-#ifndef GL_QCOM_extended_get
-#define GL_QCOM_extended_get 1
-#define GL_TEXTURE_WIDTH_QCOM 0x8BD2
-#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3
-#define GL_TEXTURE_DEPTH_QCOM 0x8BD4
-#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5
-#define GL_TEXTURE_FORMAT_QCOM 0x8BD6
-#define GL_TEXTURE_TYPE_QCOM 0x8BD7
-#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8
-#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9
-#define GL_TEXTURE_TARGET_QCOM 0x8BDA
-#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB
-#define GL_STATE_RESTORE 0x8BDC
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
-typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels);
-typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, void **params);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
-GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
-GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
-GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
-GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels);
-GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, void **params);
-#endif
-#endif /* GL_QCOM_extended_get */
-
-#ifndef GL_QCOM_extended_get2
-#define GL_QCOM_extended_get2 1
-typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
-typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
-typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
-typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
-GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
-GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
-GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
-#endif
-#endif /* GL_QCOM_extended_get2 */
-
-#ifndef GL_QCOM_perfmon_global_mode
-#define GL_QCOM_perfmon_global_mode 1
-#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0
-#endif /* GL_QCOM_perfmon_global_mode */
-
-#ifndef GL_QCOM_tiled_rendering
-#define GL_QCOM_tiled_rendering 1
-#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001
-#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002
-#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004
-#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008
-#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010
-#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020
-#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040
-#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080
-#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100
-#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200
-#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400
-#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800
-#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000
-#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000
-#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000
-#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000
-#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000
-#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000
-#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000
-#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000
-#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000
-#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000
-#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000
-#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000
-#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000
-#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000
-#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000
-#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000
-#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000
-#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000
-#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000
-#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000
-typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
-typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
-GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
-#endif
-#endif /* GL_QCOM_tiled_rendering */
-
-#ifndef GL_QCOM_writeonly_rendering
-#define GL_QCOM_writeonly_rendering 1
-#define GL_WRITEONLY_RENDERING_QCOM 0x8823
-#endif /* GL_QCOM_writeonly_rendering */
-
-#ifndef GL_VIV_shader_binary
-#define GL_VIV_shader_binary 1
-#define GL_SHADER_BINARY_VIV 0x8FC4
-#endif /* GL_VIV_shader_binary */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/c/include/GLES2/gl2extmojo.h b/c/include/GLES2/gl2extmojo.h
deleted file mode 100644
index be58797..0000000
--- a/c/include/GLES2/gl2extmojo.h
+++ /dev/null
@@ -1,798 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file contains Mojo-specific GLES2 extensions declarations.
-
-#ifndef GPU_GLES2_GL2EXTMOJO_H_
-#define GPU_GLES2_GL2EXTMOJO_H_
-
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* GL_CHROMIUM_iosurface */
-#ifndef GL_CHROMIUM_iosurface
-#define GL_CHROMIUM_iosurface 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTexImageIOSurface2DCHROMIUM(
- GLenum target, GLsizei width, GLsizei height, GLuint ioSurfaceId,
- GLuint plane);
-#endif
-typedef void (GL_APIENTRYP PFNGLTEXIMAGEIOSURFACE2DCHROMIUMPROC) (
- GLenum target, GLsizei width, GLsizei height, GLuint ioSurfaceId,
- GLuint plane);
-#endif /* GL_CHROMIUM_iosurface */
-
-/* GL_CHROMIUM_gpu_memory_manager */
-#ifndef GL_CHROMIUM_gpu_memory_manager
-#define GL_CHROMIUM_gpu_memory_manager 1
-
-#ifndef GL_TEXTURE_POOL_UNMANAGED_CHROMIUM
-#define GL_TEXTURE_POOL_UNMANAGED_CHROMIUM 0x6002
-#endif
-
-#ifndef GL_TEXTURE_POOL_CHROMIUM
-#define GL_TEXTURE_POOL_CHROMIUM 0x6000
-#endif
-
-#ifndef GL_TEXTURE_POOL_MANAGED_CHROMIUM
-#define GL_TEXTURE_POOL_MANAGED_CHROMIUM 0x6001
-#endif
-#endif /* GL_CHROMIUM_gpu_memory_manager */
-
-/* GL_CHROMIUM_texture_mailbox */
-#ifndef GL_CHROMIUM_texture_mailbox
-#define GL_CHROMIUM_texture_mailbox 1
-
-#ifndef GL_MAILBOX_SIZE_CHROMIUM
-#define GL_MAILBOX_SIZE_CHROMIUM 64
-#endif
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGenMailboxCHROMIUM(GLbyte* mailbox);
-GL_APICALL void GL_APIENTRY glProduceTextureCHROMIUM(
- GLenum target, const GLbyte* mailbox);
-GL_APICALL void GL_APIENTRY glProduceTextureDirectCHROMIUM(
- GLuint texture, GLenum target, const GLbyte* mailbox);
-GL_APICALL void GL_APIENTRY glConsumeTextureCHROMIUM(
- GLenum target, const GLbyte* mailbox);
-GL_APICALL GLuint GL_APIENTRY glCreateAndConsumeTextureCHROMIUM(
- GLenum target, const GLbyte* mailbox);
-#endif
-typedef void (GL_APIENTRYP PFNGLGENMAILBOXCHROMIUMPROC) (GLbyte* mailbox);
-typedef void (GL_APIENTRYP PFNGLPRODUCETEXTURECHROMIUMPROC) (
- GLenum target, const GLbyte* mailbox);
-typedef void (GL_APIENTRYP PFNGLPRODUCETEXTUREDIRECTCHROMIUMPROC) (
- GLuint texture, GLenum target, const GLbyte* mailbox);
-typedef void (GL_APIENTRYP PFNGLCONSUMETEXTURECHROMIUMPROC) (
- GLenum target, const GLbyte* mailbox);
-typedef GLuint (GL_APIENTRYP PFNGLCREATEANDCONSUMETEXTURECHROMIUMPROC) (
- GLenum target, const GLbyte* mailbox);
-#endif /* GL_CHROMIUM_texture_mailbox */
-
-/* GL_CHROMIUM_pixel_transfer_buffer_object */
-#ifndef GL_CHROMIUM_pixel_transfer_buffer_object
-#define GL_CHROMIUM_pixel_transfer_buffer_object 1
-
-#ifndef GL_PIXEL_UNPACK_TRANSFER_BUFFER_CHROMIUM
-// TODO(reveman): Get official numbers for this constants.
-#define GL_PIXEL_UNPACK_TRANSFER_BUFFER_CHROMIUM 0x78EC
-#define GL_PIXEL_PACK_TRANSFER_BUFFER_CHROMIUM 0x78ED
-
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void* GL_APIENTRY glMapBufferCHROMIUM(GLuint target,GLenum access);
-GL_APICALL GLboolean GL_APIENTRY glUnmapBufferCHROMIUM(GLuint target);
-#endif
-typedef void* (GL_APIENTRY PFNGLMAPBUFFERCHROMIUM) (
- GLuint target,GLenum access);
-typedef GLboolean (GL_APIENTRY PFNGLUNMAPBUFFERCHROMIUM) (GLuint target);
-#endif /* GL_CHROMIUM_pixel_transfer_buffer_object */
-
-#ifndef GL_PIXEL_UNPACK_TRANSFER_BUFFER_BINDING_CHROMIUM
-// TODO(reveman): Get official numbers for this constants.
-#define GL_PIXEL_UNPACK_TRANSFER_BUFFER_BINDING_CHROMIUM 0x78EF
-#define GL_PIXEL_PACK_TRANSFER_BUFFER_BINDING_CHROMIUM 0x78EE
-#endif
-
-#ifndef GL_STREAM_READ
-#define GL_STREAM_READ 0x88E1
-#endif
-#endif /* GL_CHROMIUM_pixel_transfer_buffer_object */
-
-/* GL_CHROMIUM_image */
-#ifndef GL_CHROMIUM_image
-#define GL_CHROMIUM_image 1
-
-typedef struct _ClientBuffer* ClientBuffer;
-
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL GLuint GL_APIENTRY glCreateImageCHROMIUM(ClientBuffer buffer,
- GLsizei width,
- GLsizei height,
- GLenum internalformat);
-GL_APICALL void GL_APIENTRY glDestroyImageCHROMIUM(GLuint image_id);
-#endif
-typedef GLuint(GL_APIENTRYP PFNGLCREATEIMAGECHROMIUMPROC)(
- ClientBuffer buffer,
- GLsizei width,
- GLsizei height,
- GLenum internalformat);
-typedef void (
- GL_APIENTRYP PFNGLDESTROYIMAGECHROMIUMPROC)(GLuint image_id);
-#endif /* GL_CHROMIUM_image */
-
- /* GL_CHROMIUM_gpu_memory_buffer_image */
-#ifndef GL_CHROMIUM_gpu_memory_buffer_image
-#define GL_CHROMIUM_gpu_memory_buffer_image 1
-
-#ifndef GL_MAP_CHROMIUM
-#define GL_MAP_CHROMIUM 0x78F1
-#endif
-
-#ifndef GL_SCANOUT_CHROMIUM
-#define GL_SCANOUT_CHROMIUM 0x78F2
-#endif
-
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL GLuint GL_APIENTRY glCreateGpuMemoryBufferImageCHROMIUM(
- GLsizei width,
- GLsizei height,
- GLenum internalformat,
- GLenum usage);
-#endif
-typedef GLuint(GL_APIENTRYP PFNGLCREATEGPUMEMORYBUFFERIMAGECHROMIUMPROC)(
- GLsizei width,
- GLsizei height,
- GLenum internalformat,
- GLenum usage);
-#endif /* GL_CHROMIUM_gpu_memory_buffer_image */
-
-/* GL_CHROMIUM_map_sub */
-#ifndef GL_CHROMIUM_map_sub
-#define GL_CHROMIUM_map_sub 1
-
-#ifndef GL_READ_ONLY
-#define GL_READ_ONLY 0x88B8
-#endif
-
-#ifndef GL_WRITE_ONLY
-#define GL_WRITE_ONLY 0x88B9
-#endif
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void* GL_APIENTRY glMapBufferSubDataCHROMIUM(
- GLuint target, GLintptr offset, GLsizeiptr size, GLenum access);
-GL_APICALL void GL_APIENTRY glUnmapBufferSubDataCHROMIUM(const void* mem);
-GL_APICALL void* GL_APIENTRY glMapTexSubImage2DCHROMIUM(
- GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
- GLsizei height, GLenum format, GLenum type, GLenum access);
-GL_APICALL void GL_APIENTRY glUnmapTexSubImage2DCHROMIUM(const void* mem);
-#endif
-typedef void* (GL_APIENTRYP PFNGLMAPBUFFERSUBDATACHROMIUMPROC) (
- GLuint target, GLintptr offset, GLsizeiptr size, GLenum access);
-typedef void (
- GL_APIENTRYP PFNGLUNMAPBUFFERSUBDATACHROMIUMPROC) (const void* mem);
-typedef void* (GL_APIENTRYP PFNGLMAPTEXSUBIMAGE2DCHROMIUMPROC) (
- GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
- GLsizei height, GLenum format, GLenum type, GLenum access);
-typedef void (
- GL_APIENTRYP PFNGLUNMAPTEXSUBIMAGE2DCHROMIUMPROC) (const void* mem);
-#endif /* GL_CHROMIUM_map_sub */
-
-/* GL_CHROMIUM_request_extension */
-#ifndef GL_CHROMIUM_request_extension
-#define GL_CHROMIUM_request_extension 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL const GLchar* GL_APIENTRY glGetRequestableExtensionsCHROMIUM();
-GL_APICALL void GL_APIENTRY glRequestExtensionCHROMIUM(const char* extension);
-#endif
-typedef const GLchar* (GL_APIENTRYP PFNGLGETREQUESTABLEEXTENSIONSCHROMIUMPROC) (
- );
-typedef void (GL_APIENTRYP PFNGLREQUESTEXTENSIONCHROMIUMPROC) (
- const char* extension);
-#endif /* GL_CHROMIUM_request_extension */
-
-/* GL_CHROMIUM_get_error_query */
-#ifndef GL_CHROMIUM_get_error_query
-#define GL_CHROMIUM_get_error_query 1
-
-#ifndef GL_GET_ERROR_QUERY_CHROMIUM
-// TODO(gman): Get official numbers for this constants.
-#define GL_GET_ERROR_QUERY_CHROMIUM 0x6003
-#endif
-#endif /* GL_CHROMIUM_get_error_query */
-
-/* GL_CHROMIUM_texture_from_image */
-#ifndef GL_CHROMIUM_texture_from_image
-#define GL_CHROMIUM_texture_from_image 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBindTexImage2DCHROMIUM(
- GLenum target, GLint imageId);
-GL_APICALL void GL_APIENTRY glReleaseTexImage2DCHROMIUM(
- GLenum target, GLint imageId);
-#endif
-typedef void (GL_APIENTRYP PFNGLBINDTEXIMAGE2DCHROMIUMPROC) (
- GLenum target, GLint imageId);
-typedef void (GL_APIENTRYP PFNGLRELEASETEXIMAGE2DCHROMIUMPROC) (
- GLenum target, GLint imageId);
-#endif /* GL_CHROMIUM_texture_from_image */
-
-/* GL_CHROMIUM_rate_limit_offscreen_context */
-#ifndef GL_CHROMIUM_rate_limit_offscreen_context
-#define GL_CHROMIUM_rate_limit_offscreen_context 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRateLimitOffscreenContextCHROMIUM();
-#endif
-typedef void (GL_APIENTRYP PFNGLRATELIMITOFFSCREENCONTEXTCHROMIUMPROC) ();
-#endif /* GL_CHROMIUM_rate_limit_offscreen_context */
-
-/* GL_CHROMIUM_post_sub_buffer */
-#ifndef GL_CHROMIUM_post_sub_buffer
-#define GL_CHROMIUM_post_sub_buffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glPostSubBufferCHROMIUM(
- GLint x, GLint y, GLint width, GLint height);
-#endif
-typedef void (GL_APIENTRYP PFNGLPOSTSUBBUFFERCHROMIUMPROC) (
- GLint x, GLint y, GLint width, GLint height);
-#endif /* GL_CHROMIUM_post_sub_buffer */
-
-/* GL_CHROMIUM_bind_uniform_location */
-#ifndef GL_CHROMIUM_bind_uniform_location
-#define GL_CHROMIUM_bind_uniform_location 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBindUniformLocationCHROMIUM(
- GLuint program, GLint location, const char* name);
-#endif
-typedef void (GL_APIENTRYP PFNGLBINDUNIFORMLOCATIONCHROMIUMPROC) (
- GLuint program, GLint location, const char* name);
-#endif /* GL_CHROMIUM_bind_uniform_location */
-
-/* GL_CHROMIUM_command_buffer_query */
-#ifndef GL_CHROMIUM_command_buffer_query
-#define GL_CHROMIUM_command_buffer_query 1
-
-#ifndef GL_COMMANDS_ISSUED_CHROMIUM
-// TODO(gman): Get official numbers for this constants.
-#define GL_COMMANDS_ISSUED_CHROMIUM 0x6004
-#endif
-#endif /* GL_CHROMIUM_command_buffer_query */
-
-/* GL_CHROMIUM_framebuffer_multisample */
-#ifndef GL_CHROMIUM_framebuffer_multisample
-#define GL_CHROMIUM_framebuffer_multisample 1
-
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleCHROMIUM (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
-GL_APICALL void GL_APIENTRY glBlitFramebufferCHROMIUM (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-#endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECHROMIUMPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERCHROMIUMPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-
-#ifndef GL_FRAMEBUFFER_BINDING_EXT
-#define GL_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING
-#endif
-
-#ifndef GL_DRAW_FRAMEBUFFER_BINDING_EXT
-#define GL_DRAW_FRAMEBUFFER_BINDING_EXT GL_DRAW_FRAMEBUFFER_BINDING
-#endif
-
-#ifndef GL_RENDERBUFFER_BINDING_EXT
-#define GL_RENDERBUFFER_BINDING_EXT GL_RENDERBUFFER_BINDING
-#endif
-
-#ifndef GL_RENDERBUFFER_SAMPLES
-#define GL_RENDERBUFFER_SAMPLES 0x8CAB
-#endif
-
-#ifndef GL_READ_FRAMEBUFFER_EXT
-#define GL_READ_FRAMEBUFFER_EXT GL_READ_FRAMEBUFFER
-#endif
-
-#ifndef GL_RENDERBUFFER_SAMPLES_EXT
-#define GL_RENDERBUFFER_SAMPLES_EXT GL_RENDERBUFFER_SAMPLES
-#endif
-
-#ifndef GL_RENDERBUFFER_BINDING
-#define GL_RENDERBUFFER_BINDING 0x8CA7
-#endif
-
-#ifndef GL_READ_FRAMEBUFFER_BINDING
-#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
-#endif
-
-#ifndef GL_MAX_SAMPLES
-#define GL_MAX_SAMPLES 0x8D57
-#endif
-
-#ifndef GL_READ_FRAMEBUFFER_BINDING_EXT
-#define GL_READ_FRAMEBUFFER_BINDING_EXT GL_READ_FRAMEBUFFER_BINDING
-#endif
-
-#ifndef GL_DRAW_FRAMEBUFFER_BINDING
-#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6
-#endif
-
-#ifndef GL_MAX_SAMPLES_EXT
-#define GL_MAX_SAMPLES_EXT GL_MAX_SAMPLES
-#endif
-
-#ifndef GL_DRAW_FRAMEBUFFER
-#define GL_DRAW_FRAMEBUFFER 0x8CA9
-#endif
-
-#ifndef GL_READ_FRAMEBUFFER
-#define GL_READ_FRAMEBUFFER 0x8CA8
-#endif
-
-#ifndef GL_DRAW_FRAMEBUFFER_EXT
-#define GL_DRAW_FRAMEBUFFER_EXT GL_DRAW_FRAMEBUFFER
-#endif
-
-#ifndef GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
-#endif
-
-#ifndef GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE // NOLINT
-#endif
-
-#ifndef GL_FRAMEBUFFER_BINDING
-#define GL_FRAMEBUFFER_BINDING 0x8CA6
-#endif
-#endif /* GL_CHROMIUM_framebuffer_multisample */
-
-/* GL_CHROMIUM_texture_compression_dxt3 */
-#ifndef GL_CHROMIUM_texture_compression_dxt3
-#define GL_CHROMIUM_texture_compression_dxt3 1
-
-#ifndef GL_COMPRESSED_RGBA_S3TC_DXT3_EXT
-#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
-#endif
-#endif /* GL_CHROMIUM_texture_compression_dxt3 */
-
-/* GL_CHROMIUM_texture_compression_dxt5 */
-#ifndef GL_CHROMIUM_texture_compression_dxt5
-#define GL_CHROMIUM_texture_compression_dxt5 1
-
-#ifndef GL_COMPRESSED_RGBA_S3TC_DXT5_EXT
-#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
-#endif
-#endif /* GL_CHROMIUM_texture_compression_dxt5 */
-
-/* GL_CHROMIUM_async_pixel_transfers */
-#ifndef GL_CHROMIUM_async_pixel_transfers
-#define GL_CHROMIUM_async_pixel_transfers 1
-
-#ifndef GL_ASYNC_PIXEL_UNPACK_COMPLETED_CHROMIUM
-#define GL_ASYNC_PIXEL_UNPACK_COMPLETED_CHROMIUM 0x6005
-#endif
-#ifndef GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM
-#define GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM 0x6006
-#endif
-#endif /* GL_CHROMIUM_async_pixel_transfers */
-
-#ifndef GL_BIND_GENERATES_RESOURCE_CHROMIUM
-#define GL_BIND_GENERATES_RESOURCE_CHROMIUM 0x9244
-#endif
-
-/* GL_CHROMIUM_copy_texture */
-#ifndef GL_CHROMIUM_copy_texture
-#define GL_CHROMIUM_copy_texture 1
-
-#ifndef GL_UNPACK_COLORSPACE_CONVERSION_CHROMIUM
-#define GL_UNPACK_COLORSPACE_CONVERSION_CHROMIUM 0x9243
-#endif
-
-#ifndef GL_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM
-#define GL_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM 0x9242
-#endif
-
-#ifndef GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM
-#define GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM 0x9241
-#endif
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glCopyTextureCHROMIUM(GLenum target,
- GLenum source_id,
- GLenum dest_id,
- GLint internalformat,
- GLenum dest_type);
-
-GL_APICALL void GL_APIENTRY glCopySubTextureCHROMIUM(GLenum target,
- GLenum source_id,
- GLenum dest_id,
- GLint xoffset,
- GLint yoffset);
-#endif
-typedef void(GL_APIENTRYP PFNGLCOPYTEXTURECHROMIUMPROC)(GLenum target,
- GLenum source_id,
- GLenum dest_id,
- GLint internalformat,
- GLenum dest_type);
-
-typedef void(GL_APIENTRYP PFNGLCOPYSUBTEXTURECHROMIUMPROC)(GLenum target,
- GLenum source_id,
- GLenum dest_id,
- GLint xoffset,
- GLint yoffset);
-#endif /* GL_CHROMIUM_copy_texture */
-
-/* GL_CHROMIUM_lose_context */
-#ifndef GL_CHROMIUM_lose_context
-#define GL_CHROMIUM_lose_context 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glLoseContextCHROMIUM(GLenum current, GLenum other);
-#endif
-typedef void (GL_APIENTRYP PFNGLLOSECONTEXTCHROMIUMPROC) (
- GLenum current, GLenum other);
-#endif /* GL_CHROMIUM_lose_context */
-
-/* GL_CHROMIUM_flipy */
-#ifndef GL_CHROMIUM_flipy
-#define GL_CHROMIUM_flipy 1
-
-#ifndef GL_UNPACK_FLIP_Y_CHROMIUM
-#define GL_UNPACK_FLIP_Y_CHROMIUM 0x9240
-#endif
-#endif /* GL_CHROMIUM_flipy */
-
-/* GL_ARB_texture_rectangle */
-#ifndef GL_ARB_texture_rectangle
-#define GL_ARB_texture_rectangle 1
-
-#ifndef GL_SAMPLER_2D_RECT_ARB
-#define GL_SAMPLER_2D_RECT_ARB 0x8B63
-#endif
-
-#ifndef GL_TEXTURE_BINDING_RECTANGLE_ARB
-#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
-#endif
-
-#ifndef GL_TEXTURE_RECTANGLE_ARB
-#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
-#endif
-#endif /* GL_ARB_texture_rectangle */
-
-/* GL_CHROMIUM_enable_feature */
-#ifndef GL_CHROMIUM_enable_feature
-#define GL_CHROMIUM_enable_feature 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL GLboolean GL_APIENTRY glEnableFeatureCHROMIUM(const char* feature);
-#endif
-typedef GLboolean (GL_APIENTRYP PFNGLENABLEFEATURECHROMIUMPROC) (
- const char* feature);
-#endif /* GL_CHROMIUM_enable_feature */
-
-/* GL_CHROMIUM_command_buffer_latency_query */
-#ifndef GL_CHROMIUM_command_buffer_latency_query
-#define GL_CHROMIUM_command_buffer_latency_query 1
-
-#ifndef GL_LATENCY_QUERY_CHROMIUM
-// TODO(gman): Get official numbers for these constants.
-#define GL_LATENCY_QUERY_CHROMIUM 0x6007
-#endif
-#endif /* GL_CHROMIUM_command_buffer_latency_query */
-
-/* GL_ARB_robustness */
-#ifndef GL_ARB_robustness
-#define GL_ARB_robustness 1
-
-#ifndef GL_GUILTY_CONTEXT_RESET_ARB
-#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253
-#endif
-
-#ifndef GL_UNKNOWN_CONTEXT_RESET_ARB
-#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255
-#endif
-
-#ifndef GL_INNOCENT_CONTEXT_RESET_ARB
-#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254
-#endif
-#endif /* GL_ARB_robustness */
-
-/* GL_EXT_framebuffer_blit */
-#ifndef GL_EXT_framebuffer_blit
-#define GL_EXT_framebuffer_blit 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBlitFramebufferEXT(
- GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0,
- GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-#endif
-typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (
- GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0,
- GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-#endif /* GL_EXT_framebuffer_blit */
-
-/* GL_EXT_draw_buffers */
-#ifndef GL_EXT_draw_buffers
-#define GL_EXT_draw_buffers 1
-
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDrawBuffersEXT(
- GLsizei n, const GLenum* bufs);
-#endif
-typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (
- GLsizei n, const GLenum* bufs);
-
-#ifndef GL_COLOR_ATTACHMENT0_EXT
-#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
-#endif
-#ifndef GL_COLOR_ATTACHMENT1_EXT
-#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
-#endif
-#ifndef GL_COLOR_ATTACHMENT2_EXT
-#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
-#endif
-#ifndef GL_COLOR_ATTACHMENT3_EXT
-#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
-#endif
-#ifndef GL_COLOR_ATTACHMENT4_EXT
-#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
-#endif
-#ifndef GL_COLOR_ATTACHMENT5_EXT
-#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
-#endif
-#ifndef GL_COLOR_ATTACHMENT6_EXT
-#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
-#endif
-#ifndef GL_COLOR_ATTACHMENT7_EXT
-#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
-#endif
-#ifndef GL_COLOR_ATTACHMENT8_EXT
-#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
-#endif
-#ifndef GL_COLOR_ATTACHMENT9_EXT
-#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
-#endif
-#ifndef GL_COLOR_ATTACHMENT10_EXT
-#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
-#endif
-#ifndef GL_COLOR_ATTACHMENT11_EXT
-#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
-#endif
-#ifndef GL_COLOR_ATTACHMENT12_EXT
-#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
-#endif
-#ifndef GL_COLOR_ATTACHMENT13_EXT
-#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
-#endif
-#ifndef GL_COLOR_ATTACHMENT14_EXT
-#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
-#endif
-#ifndef GL_COLOR_ATTACHMENT15_EXT
-#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
-#endif
-
-#ifndef GL_DRAW_BUFFER0_EXT
-#define GL_DRAW_BUFFER0_EXT 0x8825
-#endif
-#ifndef GL_DRAW_BUFFER1_EXT
-#define GL_DRAW_BUFFER1_EXT 0x8826
-#endif
-#ifndef GL_DRAW_BUFFER2_EXT
-#define GL_DRAW_BUFFER2_EXT 0x8827
-#endif
-#ifndef GL_DRAW_BUFFER3_EXT
-#define GL_DRAW_BUFFER3_EXT 0x8828
-#endif
-#ifndef GL_DRAW_BUFFER4_EXT
-#define GL_DRAW_BUFFER4_EXT 0x8829
-#endif
-#ifndef GL_DRAW_BUFFER5_EXT
-#define GL_DRAW_BUFFER5_EXT 0x882A
-#endif
-#ifndef GL_DRAW_BUFFER6_EXT
-#define GL_DRAW_BUFFER6_EXT 0x882B
-#endif
-#ifndef GL_DRAW_BUFFER7_EXT
-#define GL_DRAW_BUFFER7_EXT 0x882C
-#endif
-#ifndef GL_DRAW_BUFFER8_EXT
-#define GL_DRAW_BUFFER8_EXT 0x882D
-#endif
-#ifndef GL_DRAW_BUFFER9_EXT
-#define GL_DRAW_BUFFER9_EXT 0x882E
-#endif
-#ifndef GL_DRAW_BUFFER10_EXT
-#define GL_DRAW_BUFFER10_EXT 0x882F
-#endif
-#ifndef GL_DRAW_BUFFER11_EXT
-#define GL_DRAW_BUFFER11_EXT 0x8830
-#endif
-#ifndef GL_DRAW_BUFFER12_EXT
-#define GL_DRAW_BUFFER12_EXT 0x8831
-#endif
-#ifndef GL_DRAW_BUFFER13_EXT
-#define GL_DRAW_BUFFER13_EXT 0x8832
-#endif
-#ifndef GL_DRAW_BUFFER14_EXT
-#define GL_DRAW_BUFFER14_EXT 0x8833
-#endif
-#ifndef GL_DRAW_BUFFER15_EXT
-#define GL_DRAW_BUFFER15_EXT 0x8834
-#endif
-
-#ifndef GL_MAX_COLOR_ATTACHMENTS_EXT
-#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
-#endif
-
-#ifndef GL_MAX_DRAW_BUFFERS_EXT
-#define GL_MAX_DRAW_BUFFERS_EXT 0x8824
-#endif
-
-#endif /* GL_EXT_draw_buffers */
-
-/* GL_CHROMIUM_resize */
-#ifndef GL_CHROMIUM_resize
-#define GL_CHROMIUM_resize 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glResizeCHROMIUM(
- GLuint width, GLuint height, GLfloat scale_factor);
-#endif
-typedef void (GL_APIENTRYP PFNGLRESIZECHROMIUMPROC) (
- GLuint width, GLuint height);
-#endif /* GL_CHROMIUM_resize */
-
-/* GL_CHROMIUM_get_multiple */
-#ifndef GL_CHROMIUM_get_multiple
-#define GL_CHROMIUM_get_multiple 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetProgramInfoCHROMIUM(
- GLuint program, GLsizei bufsize, GLsizei* size, void* info);
-#endif
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMINFOCHROMIUMPROC) (
- GLuint program, GLsizei bufsize, GLsizei* size, void* info);
-#endif /* GL_CHROMIUM_get_multiple */
-
-/* GL_CHROMIUM_sync_point */
-#ifndef GL_CHROMIUM_sync_point
-#define GL_CHROMIUM_sync_point 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL GLuint GL_APIENTRY glInsertSyncPointCHROMIUM();
-GL_APICALL void GL_APIENTRY glWaitSyncPointCHROMIUM(GLuint sync_point);
-#endif
-typedef GLuint (GL_APIENTRYP PFNGLINSERTSYNCPOINTCHROMIUMPROC) ();
-typedef void (GL_APIENTRYP PFNGLWAITSYNCPOINTCHROMIUMPROC) (GLuint sync_point);
-#endif /* GL_CHROMIUM_sync_point */
-
-#ifndef GL_CHROMIUM_color_buffer_float_rgba
-#define GL_CHROMIUM_color_buffer_float_rgba 1
-#ifndef GL_RGBA32F
-#define GL_RGBA32F 0x8814
-#endif
-#endif /* GL_CHROMIUM_color_buffer_float_rgba */
-
-#ifndef GL_CHROMIUM_color_buffer_float_rgb
-#define GL_CHROMIUM_color_buffer_float_rgb 1
-#ifndef GL_RGB32F
-#define GL_RGB32F 0x8815
-#endif
-#endif /* GL_CHROMIUM_color_buffer_float_rgb */
-
-/* GL_CHROMIUM_schedule_overlay_plane */
-#ifndef GL_CHROMIUM_schedule_overlay_plane
-#define GL_CHROMIUM_schedule_overlay_plane 1
-
-#ifndef GL_OVERLAY_TRANSFORM_NONE_CHROMIUM
-#define GL_OVERLAY_TRANSFORM_NONE_CHROMIUM 0x9245
-#endif
-
-#ifndef GL_OVERLAY_TRANSFORM_FLIP_HORIZONTAL_CHROMIUM
-#define GL_OVERLAY_TRANSFORM_FLIP_HORIZONTAL_CHROMIUM 0x9246
-#endif
-
-#ifndef GL_OVERLAY_TRANSFORM_FLIP_VERTICAL_CHROMIUM
-#define GL_OVERLAY_TRANSFORM_FLIP_VERTICAL_CHROMIUM 0x9247
-#endif
-
-#ifndef GL_OVERLAY_TRANSFORM_ROTATE_90_CHROMIUM
-#define GL_OVERLAY_TRANSFORM_ROTATE_90_CHROMIUM 0x9248
-#endif
-
-#ifndef GL_OVERLAY_TRANSFORM_ROTATE_180_CHROMIUM
-#define GL_OVERLAY_TRANSFORM_ROTATE_180_CHROMIUM 0x9249
-#endif
-
-#ifndef GL_OVERLAY_TRANSFORM_ROTATE_270_CHROMIUM
-#define GL_OVERLAY_TRANSFORM_ROTATE_270_CHROMIUM 0x924A
-#endif
-
-/* GL_CHROMIUM_subscribe_uniform */
-#ifndef GL_CHROMIUM_subscribe_uniform
-#define GL_CHROMIUM_subscribe_uniform 1
-
-#ifndef GL_SUBSCRIBED_VALUES_BUFFER_CHROMIUM
-#define GL_SUBSCRIBED_VALUES_BUFFER_CHROMIUM 0x924B
-#endif
-
-#ifndef GL_MOUSE_POSITION_CHROMIUM
-#define GL_MOUSE_POSITION_CHROMIUM 0x924C
-#endif
-
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY
-glGenValuebuffersCHROMIUM(GLsizei n, GLuint* buffers);
-GL_APICALL void GL_APIENTRY
-glDeleteValuebuffersCHROMIUM(GLsizei n, const GLuint* valuebuffers);
-GL_APICALL GLboolean GL_APIENTRY glIsValuebufferCHROMIUM(GLuint valuebuffer);
-GL_APICALL void GL_APIENTRY
-glBindValuebufferCHROMIUM(GLenum target, GLuint valuebuffer);
-GL_APICALL void GL_APIENTRY
-glSubscribeValueCHROMIUM(GLenum target, GLenum subscription);
-GL_APICALL void GL_APIENTRY glPopulateSubscribedValuesCHROMIUM(GLenum target);
-GL_APICALL void GL_APIENTRY glUniformValuebufferCHROMIUM(GLint location,
- GLenum target,
- GLenum subscription);
-#endif
-#endif /* GL_CHROMIUM_subscribe_uniform */
-
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY
- glScheduleOverlayPlaneCHROMIUM(GLint plane_z_order,
- GLenum plane_transform,
- GLuint overlay_texture_id,
- GLint bounds_x,
- GLint bounds_y,
- GLint bounds_width,
- GLint bounds_height,
- GLfloat uv_x,
- GLfloat uv_y,
- GLfloat uv_width,
- GLfloat uv_height);
-#endif
-typedef void(GL_APIENTRYP PFNGLSCHEDULEOVERLAYPLANECHROMIUMPROC)(
- GLint plane_z_order,
- GLenum plane_transform,
- GLuint overlay_texture_id,
- GLint bounds_x,
- GLint bounds_y,
- GLint bounds_width,
- GLint bounds_height,
- GLfloat uv_x,
- GLfloat uv_y,
- GLfloat uv_width,
- GLfloat uv_height);
-#endif /* GL_CHROMIUM_schedule_overlay_plane */
-
-/* GL_CHROMIUM_sync_query */
-#ifndef GL_CHROMIUM_sync_query
-#define GL_CHROMIUM_sync_query 1
-
-#ifndef GL_COMMANDS_COMPLETED_CHROMIUM
-#define GL_COMMANDS_COMPLETED_CHROMIUM 0x84F7
-#endif
-#endif /* GL_CHROMIUM_sync_query */
-
-#ifndef GL_CHROMIUM_path_rendering
-#define GL_CHROMIUM_path_rendering 1
-
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY
- glMatrixLoadfCHROMIUM(GLenum mode, const GLfloat* m);
-GL_APICALL void GL_APIENTRY glMatrixLoadIdentityCHROMIUM(GLenum mode);
-#endif
-
-typedef void(GL_APIENTRYP PFNGLMATRIXLOADFCHROMIUMPROC)(GLenum matrixMode,
- const GLfloat* m);
-typedef void(GL_APIENTRYP PFNGLMATRIXLOADIDENTITYCHROMIUMPROC)(
- GLenum matrixMode);
-
-#endif /* GL_CHROMIUM_path_rendering */
-
-/* GL_CHROMIUM_shallow_flush */
-#ifndef GL_CHROMIUM_shallow_flush
-#define GL_CHROMIUM_shallow_flush 1
-
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glShallowFlushCHROMIUM(void);
-#endif
-
-#endif /* GL_CHROMIUM_shallow_flush */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // GPU_GLES2_GL2EXTMOJO_H_
diff --git a/c/include/GLES2/gl2mojo_autogen.h b/c/include/GLES2/gl2mojo_autogen.h
deleted file mode 100644
index f153f05..0000000
--- a/c/include/GLES2/gl2mojo_autogen.h
+++ /dev/null
@@ -1,330 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file is auto-generated from
-// gpu/command_buffer/build_gles2_cmd_buffer.py
-// It's formatted by clang-format using chromium coding style:
-// clang-format -i -style=chromium filename
-// DO NOT EDIT!
-
-// This file contains Mojo-specific GLES2 declarations.
-
-#ifndef GPU_GLES2_GL2MOJO_AUTOGEN_H_
-#define GPU_GLES2_GL2MOJO_AUTOGEN_H_
-
-#define glActiveTexture GLES2_GET_FUN(ActiveTexture)
-#define glAttachShader GLES2_GET_FUN(AttachShader)
-#define glBindAttribLocation GLES2_GET_FUN(BindAttribLocation)
-#define glBindBuffer GLES2_GET_FUN(BindBuffer)
-#define glBindBufferBase GLES2_GET_FUN(BindBufferBase)
-#define glBindBufferRange GLES2_GET_FUN(BindBufferRange)
-#define glBindFramebuffer GLES2_GET_FUN(BindFramebuffer)
-#define glBindRenderbuffer GLES2_GET_FUN(BindRenderbuffer)
-#define glBindSampler GLES2_GET_FUN(BindSampler)
-#define glBindTexture GLES2_GET_FUN(BindTexture)
-#define glBindTransformFeedback GLES2_GET_FUN(BindTransformFeedback)
-#define glBlendColor GLES2_GET_FUN(BlendColor)
-#define glBlendEquation GLES2_GET_FUN(BlendEquation)
-#define glBlendEquationSeparate GLES2_GET_FUN(BlendEquationSeparate)
-#define glBlendFunc GLES2_GET_FUN(BlendFunc)
-#define glBlendFuncSeparate GLES2_GET_FUN(BlendFuncSeparate)
-#define glBufferData GLES2_GET_FUN(BufferData)
-#define glBufferSubData GLES2_GET_FUN(BufferSubData)
-#define glCheckFramebufferStatus GLES2_GET_FUN(CheckFramebufferStatus)
-#define glClear GLES2_GET_FUN(Clear)
-#define glClearBufferfi GLES2_GET_FUN(ClearBufferfi)
-#define glClearBufferfv GLES2_GET_FUN(ClearBufferfv)
-#define glClearBufferiv GLES2_GET_FUN(ClearBufferiv)
-#define glClearBufferuiv GLES2_GET_FUN(ClearBufferuiv)
-#define glClearColor GLES2_GET_FUN(ClearColor)
-#define glClearDepthf GLES2_GET_FUN(ClearDepthf)
-#define glClearStencil GLES2_GET_FUN(ClearStencil)
-#define glClientWaitSync GLES2_GET_FUN(ClientWaitSync)
-#define glColorMask GLES2_GET_FUN(ColorMask)
-#define glCompileShader GLES2_GET_FUN(CompileShader)
-#define glCompressedTexImage2D GLES2_GET_FUN(CompressedTexImage2D)
-#define glCompressedTexSubImage2D GLES2_GET_FUN(CompressedTexSubImage2D)
-#define glCopyBufferSubData GLES2_GET_FUN(CopyBufferSubData)
-#define glCopyTexImage2D GLES2_GET_FUN(CopyTexImage2D)
-#define glCopyTexSubImage2D GLES2_GET_FUN(CopyTexSubImage2D)
-#define glCopyTexSubImage3D GLES2_GET_FUN(CopyTexSubImage3D)
-#define glCreateProgram GLES2_GET_FUN(CreateProgram)
-#define glCreateShader GLES2_GET_FUN(CreateShader)
-#define glCullFace GLES2_GET_FUN(CullFace)
-#define glDeleteBuffers GLES2_GET_FUN(DeleteBuffers)
-#define glDeleteFramebuffers GLES2_GET_FUN(DeleteFramebuffers)
-#define glDeleteProgram GLES2_GET_FUN(DeleteProgram)
-#define glDeleteRenderbuffers GLES2_GET_FUN(DeleteRenderbuffers)
-#define glDeleteSamplers GLES2_GET_FUN(DeleteSamplers)
-#define glDeleteSync GLES2_GET_FUN(DeleteSync)
-#define glDeleteShader GLES2_GET_FUN(DeleteShader)
-#define glDeleteTextures GLES2_GET_FUN(DeleteTextures)
-#define glDeleteTransformFeedbacks GLES2_GET_FUN(DeleteTransformFeedbacks)
-#define glDepthFunc GLES2_GET_FUN(DepthFunc)
-#define glDepthMask GLES2_GET_FUN(DepthMask)
-#define glDepthRangef GLES2_GET_FUN(DepthRangef)
-#define glDetachShader GLES2_GET_FUN(DetachShader)
-#define glDisable GLES2_GET_FUN(Disable)
-#define glDisableVertexAttribArray GLES2_GET_FUN(DisableVertexAttribArray)
-#define glDrawArrays GLES2_GET_FUN(DrawArrays)
-#define glDrawElements GLES2_GET_FUN(DrawElements)
-#define glDrawRangeElements GLES2_GET_FUN(DrawRangeElements)
-#define glEnable GLES2_GET_FUN(Enable)
-#define glEnableVertexAttribArray GLES2_GET_FUN(EnableVertexAttribArray)
-#define glFenceSync GLES2_GET_FUN(FenceSync)
-#define glFinish GLES2_GET_FUN(Finish)
-#define glFlush GLES2_GET_FUN(Flush)
-#define glFramebufferRenderbuffer GLES2_GET_FUN(FramebufferRenderbuffer)
-#define glFramebufferTexture2D GLES2_GET_FUN(FramebufferTexture2D)
-#define glFramebufferTextureLayer GLES2_GET_FUN(FramebufferTextureLayer)
-#define glFrontFace GLES2_GET_FUN(FrontFace)
-#define glGenBuffers GLES2_GET_FUN(GenBuffers)
-#define glGenerateMipmap GLES2_GET_FUN(GenerateMipmap)
-#define glGenFramebuffers GLES2_GET_FUN(GenFramebuffers)
-#define glGenRenderbuffers GLES2_GET_FUN(GenRenderbuffers)
-#define glGenSamplers GLES2_GET_FUN(GenSamplers)
-#define glGenTextures GLES2_GET_FUN(GenTextures)
-#define glGenTransformFeedbacks GLES2_GET_FUN(GenTransformFeedbacks)
-#define glGetActiveAttrib GLES2_GET_FUN(GetActiveAttrib)
-#define glGetActiveUniform GLES2_GET_FUN(GetActiveUniform)
-#define glGetActiveUniformBlockiv GLES2_GET_FUN(GetActiveUniformBlockiv)
-#define glGetActiveUniformBlockName GLES2_GET_FUN(GetActiveUniformBlockName)
-#define glGetActiveUniformsiv GLES2_GET_FUN(GetActiveUniformsiv)
-#define glGetAttachedShaders GLES2_GET_FUN(GetAttachedShaders)
-#define glGetAttribLocation GLES2_GET_FUN(GetAttribLocation)
-#define glGetBooleanv GLES2_GET_FUN(GetBooleanv)
-#define glGetBufferParameteriv GLES2_GET_FUN(GetBufferParameteriv)
-#define glGetError GLES2_GET_FUN(GetError)
-#define glGetFloatv GLES2_GET_FUN(GetFloatv)
-#define glGetFragDataLocation GLES2_GET_FUN(GetFragDataLocation)
-#define glGetFramebufferAttachmentParameteriv \
- GLES2_GET_FUN(GetFramebufferAttachmentParameteriv)
-#define glGetInteger64v GLES2_GET_FUN(GetInteger64v)
-#define glGetIntegeri_v GLES2_GET_FUN(GetIntegeri_v)
-#define glGetInteger64i_v GLES2_GET_FUN(GetInteger64i_v)
-#define glGetIntegerv GLES2_GET_FUN(GetIntegerv)
-#define glGetInternalformativ GLES2_GET_FUN(GetInternalformativ)
-#define glGetProgramiv GLES2_GET_FUN(GetProgramiv)
-#define glGetProgramInfoLog GLES2_GET_FUN(GetProgramInfoLog)
-#define glGetRenderbufferParameteriv GLES2_GET_FUN(GetRenderbufferParameteriv)
-#define glGetSamplerParameterfv GLES2_GET_FUN(GetSamplerParameterfv)
-#define glGetSamplerParameteriv GLES2_GET_FUN(GetSamplerParameteriv)
-#define glGetShaderiv GLES2_GET_FUN(GetShaderiv)
-#define glGetShaderInfoLog GLES2_GET_FUN(GetShaderInfoLog)
-#define glGetShaderPrecisionFormat GLES2_GET_FUN(GetShaderPrecisionFormat)
-#define glGetShaderSource GLES2_GET_FUN(GetShaderSource)
-#define glGetString GLES2_GET_FUN(GetString)
-#define glGetSynciv GLES2_GET_FUN(GetSynciv)
-#define glGetTexParameterfv GLES2_GET_FUN(GetTexParameterfv)
-#define glGetTexParameteriv GLES2_GET_FUN(GetTexParameteriv)
-#define glGetTransformFeedbackVarying GLES2_GET_FUN(GetTransformFeedbackVarying)
-#define glGetUniformBlockIndex GLES2_GET_FUN(GetUniformBlockIndex)
-#define glGetUniformfv GLES2_GET_FUN(GetUniformfv)
-#define glGetUniformiv GLES2_GET_FUN(GetUniformiv)
-#define glGetUniformIndices GLES2_GET_FUN(GetUniformIndices)
-#define glGetUniformLocation GLES2_GET_FUN(GetUniformLocation)
-#define glGetVertexAttribfv GLES2_GET_FUN(GetVertexAttribfv)
-#define glGetVertexAttribiv GLES2_GET_FUN(GetVertexAttribiv)
-#define glGetVertexAttribPointerv GLES2_GET_FUN(GetVertexAttribPointerv)
-#define glHint GLES2_GET_FUN(Hint)
-#define glInvalidateFramebuffer GLES2_GET_FUN(InvalidateFramebuffer)
-#define glInvalidateSubFramebuffer GLES2_GET_FUN(InvalidateSubFramebuffer)
-#define glIsBuffer GLES2_GET_FUN(IsBuffer)
-#define glIsEnabled GLES2_GET_FUN(IsEnabled)
-#define glIsFramebuffer GLES2_GET_FUN(IsFramebuffer)
-#define glIsProgram GLES2_GET_FUN(IsProgram)
-#define glIsRenderbuffer GLES2_GET_FUN(IsRenderbuffer)
-#define glIsSampler GLES2_GET_FUN(IsSampler)
-#define glIsShader GLES2_GET_FUN(IsShader)
-#define glIsSync GLES2_GET_FUN(IsSync)
-#define glIsTexture GLES2_GET_FUN(IsTexture)
-#define glIsTransformFeedback GLES2_GET_FUN(IsTransformFeedback)
-#define glLineWidth GLES2_GET_FUN(LineWidth)
-#define glLinkProgram GLES2_GET_FUN(LinkProgram)
-#define glPauseTransformFeedback GLES2_GET_FUN(PauseTransformFeedback)
-#define glPixelStorei GLES2_GET_FUN(PixelStorei)
-#define glPolygonOffset GLES2_GET_FUN(PolygonOffset)
-#define glReadBuffer GLES2_GET_FUN(ReadBuffer)
-#define glReadPixels GLES2_GET_FUN(ReadPixels)
-#define glReleaseShaderCompiler GLES2_GET_FUN(ReleaseShaderCompiler)
-#define glRenderbufferStorage GLES2_GET_FUN(RenderbufferStorage)
-#define glResumeTransformFeedback GLES2_GET_FUN(ResumeTransformFeedback)
-#define glSampleCoverage GLES2_GET_FUN(SampleCoverage)
-#define glSamplerParameterf GLES2_GET_FUN(SamplerParameterf)
-#define glSamplerParameterfv GLES2_GET_FUN(SamplerParameterfv)
-#define glSamplerParameteri GLES2_GET_FUN(SamplerParameteri)
-#define glSamplerParameteriv GLES2_GET_FUN(SamplerParameteriv)
-#define glScissor GLES2_GET_FUN(Scissor)
-#define glShaderBinary GLES2_GET_FUN(ShaderBinary)
-#define glShaderSource GLES2_GET_FUN(ShaderSource)
-#define glShallowFinishCHROMIUM GLES2_GET_FUN(ShallowFinishCHROMIUM)
-#define glShallowFlushCHROMIUM GLES2_GET_FUN(ShallowFlushCHROMIUM)
-#define glOrderingBarrierCHROMIUM GLES2_GET_FUN(OrderingBarrierCHROMIUM)
-#define glStencilFunc GLES2_GET_FUN(StencilFunc)
-#define glStencilFuncSeparate GLES2_GET_FUN(StencilFuncSeparate)
-#define glStencilMask GLES2_GET_FUN(StencilMask)
-#define glStencilMaskSeparate GLES2_GET_FUN(StencilMaskSeparate)
-#define glStencilOp GLES2_GET_FUN(StencilOp)
-#define glStencilOpSeparate GLES2_GET_FUN(StencilOpSeparate)
-#define glTexImage2D GLES2_GET_FUN(TexImage2D)
-#define glTexImage3D GLES2_GET_FUN(TexImage3D)
-#define glTexParameterf GLES2_GET_FUN(TexParameterf)
-#define glTexParameterfv GLES2_GET_FUN(TexParameterfv)
-#define glTexParameteri GLES2_GET_FUN(TexParameteri)
-#define glTexParameteriv GLES2_GET_FUN(TexParameteriv)
-#define glTexStorage3D GLES2_GET_FUN(TexStorage3D)
-#define glTexSubImage2D GLES2_GET_FUN(TexSubImage2D)
-#define glTexSubImage3D GLES2_GET_FUN(TexSubImage3D)
-#define glTransformFeedbackVaryings GLES2_GET_FUN(TransformFeedbackVaryings)
-#define glUniform1f GLES2_GET_FUN(Uniform1f)
-#define glUniform1fv GLES2_GET_FUN(Uniform1fv)
-#define glUniform1i GLES2_GET_FUN(Uniform1i)
-#define glUniform1iv GLES2_GET_FUN(Uniform1iv)
-#define glUniform1ui GLES2_GET_FUN(Uniform1ui)
-#define glUniform1uiv GLES2_GET_FUN(Uniform1uiv)
-#define glUniform2f GLES2_GET_FUN(Uniform2f)
-#define glUniform2fv GLES2_GET_FUN(Uniform2fv)
-#define glUniform2i GLES2_GET_FUN(Uniform2i)
-#define glUniform2iv GLES2_GET_FUN(Uniform2iv)
-#define glUniform2ui GLES2_GET_FUN(Uniform2ui)
-#define glUniform2uiv GLES2_GET_FUN(Uniform2uiv)
-#define glUniform3f GLES2_GET_FUN(Uniform3f)
-#define glUniform3fv GLES2_GET_FUN(Uniform3fv)
-#define glUniform3i GLES2_GET_FUN(Uniform3i)
-#define glUniform3iv GLES2_GET_FUN(Uniform3iv)
-#define glUniform3ui GLES2_GET_FUN(Uniform3ui)
-#define glUniform3uiv GLES2_GET_FUN(Uniform3uiv)
-#define glUniform4f GLES2_GET_FUN(Uniform4f)
-#define glUniform4fv GLES2_GET_FUN(Uniform4fv)
-#define glUniform4i GLES2_GET_FUN(Uniform4i)
-#define glUniform4iv GLES2_GET_FUN(Uniform4iv)
-#define glUniform4ui GLES2_GET_FUN(Uniform4ui)
-#define glUniform4uiv GLES2_GET_FUN(Uniform4uiv)
-#define glUniformBlockBinding GLES2_GET_FUN(UniformBlockBinding)
-#define glUniformMatrix2fv GLES2_GET_FUN(UniformMatrix2fv)
-#define glUniformMatrix2x3fv GLES2_GET_FUN(UniformMatrix2x3fv)
-#define glUniformMatrix2x4fv GLES2_GET_FUN(UniformMatrix2x4fv)
-#define glUniformMatrix3fv GLES2_GET_FUN(UniformMatrix3fv)
-#define glUniformMatrix3x2fv GLES2_GET_FUN(UniformMatrix3x2fv)
-#define glUniformMatrix3x4fv GLES2_GET_FUN(UniformMatrix3x4fv)
-#define glUniformMatrix4fv GLES2_GET_FUN(UniformMatrix4fv)
-#define glUniformMatrix4x2fv GLES2_GET_FUN(UniformMatrix4x2fv)
-#define glUniformMatrix4x3fv GLES2_GET_FUN(UniformMatrix4x3fv)
-#define glUseProgram GLES2_GET_FUN(UseProgram)
-#define glValidateProgram GLES2_GET_FUN(ValidateProgram)
-#define glVertexAttrib1f GLES2_GET_FUN(VertexAttrib1f)
-#define glVertexAttrib1fv GLES2_GET_FUN(VertexAttrib1fv)
-#define glVertexAttrib2f GLES2_GET_FUN(VertexAttrib2f)
-#define glVertexAttrib2fv GLES2_GET_FUN(VertexAttrib2fv)
-#define glVertexAttrib3f GLES2_GET_FUN(VertexAttrib3f)
-#define glVertexAttrib3fv GLES2_GET_FUN(VertexAttrib3fv)
-#define glVertexAttrib4f GLES2_GET_FUN(VertexAttrib4f)
-#define glVertexAttrib4fv GLES2_GET_FUN(VertexAttrib4fv)
-#define glVertexAttribI4i GLES2_GET_FUN(VertexAttribI4i)
-#define glVertexAttribI4iv GLES2_GET_FUN(VertexAttribI4iv)
-#define glVertexAttribI4ui GLES2_GET_FUN(VertexAttribI4ui)
-#define glVertexAttribI4uiv GLES2_GET_FUN(VertexAttribI4uiv)
-#define glVertexAttribIPointer GLES2_GET_FUN(VertexAttribIPointer)
-#define glVertexAttribPointer GLES2_GET_FUN(VertexAttribPointer)
-#define glViewport GLES2_GET_FUN(Viewport)
-#define glWaitSync GLES2_GET_FUN(WaitSync)
-#define glBlitFramebufferCHROMIUM GLES2_GET_FUN(BlitFramebufferCHROMIUM)
-#define glRenderbufferStorageMultisampleCHROMIUM \
- GLES2_GET_FUN(RenderbufferStorageMultisampleCHROMIUM)
-#define glRenderbufferStorageMultisampleEXT \
- GLES2_GET_FUN(RenderbufferStorageMultisampleEXT)
-#define glFramebufferTexture2DMultisampleEXT \
- GLES2_GET_FUN(FramebufferTexture2DMultisampleEXT)
-#define glTexStorage2DEXT GLES2_GET_FUN(TexStorage2DEXT)
-#define glGenQueriesEXT GLES2_GET_FUN(GenQueriesEXT)
-#define glDeleteQueriesEXT GLES2_GET_FUN(DeleteQueriesEXT)
-#define glIsQueryEXT GLES2_GET_FUN(IsQueryEXT)
-#define glBeginQueryEXT GLES2_GET_FUN(BeginQueryEXT)
-#define glBeginTransformFeedback GLES2_GET_FUN(BeginTransformFeedback)
-#define glEndQueryEXT GLES2_GET_FUN(EndQueryEXT)
-#define glEndTransformFeedback GLES2_GET_FUN(EndTransformFeedback)
-#define glGetQueryivEXT GLES2_GET_FUN(GetQueryivEXT)
-#define glGetQueryObjectuivEXT GLES2_GET_FUN(GetQueryObjectuivEXT)
-#define glInsertEventMarkerEXT GLES2_GET_FUN(InsertEventMarkerEXT)
-#define glPushGroupMarkerEXT GLES2_GET_FUN(PushGroupMarkerEXT)
-#define glPopGroupMarkerEXT GLES2_GET_FUN(PopGroupMarkerEXT)
-#define glGenVertexArraysOES GLES2_GET_FUN(GenVertexArraysOES)
-#define glDeleteVertexArraysOES GLES2_GET_FUN(DeleteVertexArraysOES)
-#define glIsVertexArrayOES GLES2_GET_FUN(IsVertexArrayOES)
-#define glBindVertexArrayOES GLES2_GET_FUN(BindVertexArrayOES)
-#define glSwapBuffers GLES2_GET_FUN(SwapBuffers)
-#define glGetMaxValueInBufferCHROMIUM GLES2_GET_FUN(GetMaxValueInBufferCHROMIUM)
-#define glEnableFeatureCHROMIUM GLES2_GET_FUN(EnableFeatureCHROMIUM)
-#define glMapBufferCHROMIUM GLES2_GET_FUN(MapBufferCHROMIUM)
-#define glUnmapBufferCHROMIUM GLES2_GET_FUN(UnmapBufferCHROMIUM)
-#define glMapBufferSubDataCHROMIUM GLES2_GET_FUN(MapBufferSubDataCHROMIUM)
-#define glUnmapBufferSubDataCHROMIUM GLES2_GET_FUN(UnmapBufferSubDataCHROMIUM)
-#define glMapBufferRange GLES2_GET_FUN(MapBufferRange)
-#define glUnmapBuffer GLES2_GET_FUN(UnmapBuffer)
-#define glMapTexSubImage2DCHROMIUM GLES2_GET_FUN(MapTexSubImage2DCHROMIUM)
-#define glUnmapTexSubImage2DCHROMIUM GLES2_GET_FUN(UnmapTexSubImage2DCHROMIUM)
-#define glResizeCHROMIUM GLES2_GET_FUN(ResizeCHROMIUM)
-#define glGetRequestableExtensionsCHROMIUM \
- GLES2_GET_FUN(GetRequestableExtensionsCHROMIUM)
-#define glRequestExtensionCHROMIUM GLES2_GET_FUN(RequestExtensionCHROMIUM)
-#define glRateLimitOffscreenContextCHROMIUM \
- GLES2_GET_FUN(RateLimitOffscreenContextCHROMIUM)
-#define glGetProgramInfoCHROMIUM GLES2_GET_FUN(GetProgramInfoCHROMIUM)
-#define glGetUniformBlocksCHROMIUM GLES2_GET_FUN(GetUniformBlocksCHROMIUM)
-#define glGetTransformFeedbackVaryingsCHROMIUM \
- GLES2_GET_FUN(GetTransformFeedbackVaryingsCHROMIUM)
-#define glGetUniformsES3CHROMIUM GLES2_GET_FUN(GetUniformsES3CHROMIUM)
-#define glCreateStreamTextureCHROMIUM GLES2_GET_FUN(CreateStreamTextureCHROMIUM)
-#define glCreateImageCHROMIUM GLES2_GET_FUN(CreateImageCHROMIUM)
-#define glDestroyImageCHROMIUM GLES2_GET_FUN(DestroyImageCHROMIUM)
-#define glCreateGpuMemoryBufferImageCHROMIUM \
- GLES2_GET_FUN(CreateGpuMemoryBufferImageCHROMIUM)
-#define glGetTranslatedShaderSourceANGLE \
- GLES2_GET_FUN(GetTranslatedShaderSourceANGLE)
-#define glPostSubBufferCHROMIUM GLES2_GET_FUN(PostSubBufferCHROMIUM)
-#define glTexImageIOSurface2DCHROMIUM GLES2_GET_FUN(TexImageIOSurface2DCHROMIUM)
-#define glCopyTextureCHROMIUM GLES2_GET_FUN(CopyTextureCHROMIUM)
-#define glCopySubTextureCHROMIUM GLES2_GET_FUN(CopySubTextureCHROMIUM)
-#define glDrawArraysInstancedANGLE GLES2_GET_FUN(DrawArraysInstancedANGLE)
-#define glDrawElementsInstancedANGLE GLES2_GET_FUN(DrawElementsInstancedANGLE)
-#define glVertexAttribDivisorANGLE GLES2_GET_FUN(VertexAttribDivisorANGLE)
-#define glGenMailboxCHROMIUM GLES2_GET_FUN(GenMailboxCHROMIUM)
-#define glProduceTextureCHROMIUM GLES2_GET_FUN(ProduceTextureCHROMIUM)
-#define glProduceTextureDirectCHROMIUM \
- GLES2_GET_FUN(ProduceTextureDirectCHROMIUM)
-#define glConsumeTextureCHROMIUM GLES2_GET_FUN(ConsumeTextureCHROMIUM)
-#define glCreateAndConsumeTextureCHROMIUM \
- GLES2_GET_FUN(CreateAndConsumeTextureCHROMIUM)
-#define glBindUniformLocationCHROMIUM GLES2_GET_FUN(BindUniformLocationCHROMIUM)
-#define glGenValuebuffersCHROMIUM GLES2_GET_FUN(GenValuebuffersCHROMIUM)
-#define glDeleteValuebuffersCHROMIUM GLES2_GET_FUN(DeleteValuebuffersCHROMIUM)
-#define glIsValuebufferCHROMIUM GLES2_GET_FUN(IsValuebufferCHROMIUM)
-#define glBindValuebufferCHROMIUM GLES2_GET_FUN(BindValuebufferCHROMIUM)
-#define glSubscribeValueCHROMIUM GLES2_GET_FUN(SubscribeValueCHROMIUM)
-#define glPopulateSubscribedValuesCHROMIUM \
- GLES2_GET_FUN(PopulateSubscribedValuesCHROMIUM)
-#define glUniformValuebufferCHROMIUM GLES2_GET_FUN(UniformValuebufferCHROMIUM)
-#define glBindTexImage2DCHROMIUM GLES2_GET_FUN(BindTexImage2DCHROMIUM)
-#define glReleaseTexImage2DCHROMIUM GLES2_GET_FUN(ReleaseTexImage2DCHROMIUM)
-#define glTraceBeginCHROMIUM GLES2_GET_FUN(TraceBeginCHROMIUM)
-#define glTraceEndCHROMIUM GLES2_GET_FUN(TraceEndCHROMIUM)
-#define glAsyncTexSubImage2DCHROMIUM GLES2_GET_FUN(AsyncTexSubImage2DCHROMIUM)
-#define glAsyncTexImage2DCHROMIUM GLES2_GET_FUN(AsyncTexImage2DCHROMIUM)
-#define glWaitAsyncTexImage2DCHROMIUM GLES2_GET_FUN(WaitAsyncTexImage2DCHROMIUM)
-#define glWaitAllAsyncTexImage2DCHROMIUM \
- GLES2_GET_FUN(WaitAllAsyncTexImage2DCHROMIUM)
-#define glDiscardFramebufferEXT GLES2_GET_FUN(DiscardFramebufferEXT)
-#define glLoseContextCHROMIUM GLES2_GET_FUN(LoseContextCHROMIUM)
-#define glInsertSyncPointCHROMIUM GLES2_GET_FUN(InsertSyncPointCHROMIUM)
-#define glWaitSyncPointCHROMIUM GLES2_GET_FUN(WaitSyncPointCHROMIUM)
-#define glDrawBuffersEXT GLES2_GET_FUN(DrawBuffersEXT)
-#define glDiscardBackbufferCHROMIUM GLES2_GET_FUN(DiscardBackbufferCHROMIUM)
-#define glScheduleOverlayPlaneCHROMIUM \
- GLES2_GET_FUN(ScheduleOverlayPlaneCHROMIUM)
-#define glSwapInterval GLES2_GET_FUN(SwapInterval)
-#define glMatrixLoadfCHROMIUM GLES2_GET_FUN(MatrixLoadfCHROMIUM)
-#define glMatrixLoadIdentityCHROMIUM GLES2_GET_FUN(MatrixLoadIdentityCHROMIUM)
-#define glBlendBarrierKHR GLES2_GET_FUN(BlendBarrierKHR)
-
-#endif // GPU_GLES2_GL2MOJO_AUTOGEN_H_
diff --git a/c/include/GLES2/gl2mojo_internal.h b/c/include/GLES2/gl2mojo_internal.h
deleted file mode 100644
index 32bc3b1..0000000
--- a/c/include/GLES2/gl2mojo_internal.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file contains Mojo-specific GLES2 declarations.
-
-#ifndef GPU_GLES2_GL2MOJO_INTERNAL_H_
-#define GPU_GLES2_GL2MOJO_INTERNAL_H_
-
-#include <GLES2/gl2platform.h>
-
-#define GL_CONTEXT_LOST 0x300E
-#define GL_PATH_MODELVIEW_CHROMIUM 0x1700
-#define GL_PATH_PROJECTION_CHROMIUM 0x1701
-#define GL_PATH_MODELVIEW_MATRIX_CHROMIUM 0x0BA6
-#define GL_PATH_PROJECTION_MATRIX_CHROMIUM 0x0BA7
-
-#define GLES2_GET_FUN(name) MojoGLES2gl##name
-
-#include <GLES2/gl2mojo_autogen.h>
-
-#endif // GPU_GLES2_GL2MOJO_INTERNAL_H_
diff --git a/c/include/GLES2/gl2platform.h b/c/include/GLES2/gl2platform.h
deleted file mode 100644
index 89d4d44..0000000
--- a/c/include/GLES2/gl2platform.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef __gl2platform_h_
-#define __gl2platform_h_
-
-/* $Revision: 23328 $ on $Date:: 2013-10-02 02:28:28 -0700 #$ */
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
- *
- * Adopters may modify khrplatform.h and this file to suit their platform.
- * You are encouraged to submit all modifications to the Khronos group so that
- * they can be included in future versions of this file. Please submit changes
- * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
- * by filing a bug against product "OpenGL-ES" component "Registry".
- */
-
-#include <KHR/khrplatform.h>
-
-#ifndef GL_APICALL
-#define GL_APICALL KHRONOS_APICALL
-#endif
-
-#ifndef GL_APIENTRY
-#define GL_APIENTRY KHRONOS_APIENTRY
-#endif
-
-#endif /* __gl2platform_h_ */
diff --git a/c/include/KHR/khrplatform.h b/c/include/KHR/khrplatform.h
deleted file mode 100644
index c9e6f17..0000000
--- a/c/include/KHR/khrplatform.h
+++ /dev/null
@@ -1,282 +0,0 @@
-#ifndef __khrplatform_h_
-#define __khrplatform_h_
-
-/*
-** Copyright (c) 2008-2009 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-
-/* Khronos platform-specific types and definitions.
- *
- * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $
- *
- * Adopters may modify this file to suit their platform. Adopters are
- * encouraged to submit platform specific modifications to the Khronos
- * group so that they can be included in future versions of this file.
- * Please submit changes by sending them to the public Khronos Bugzilla
- * (http://khronos.org/bugzilla) by filing a bug against product
- * "Khronos (general)" component "Registry".
- *
- * A predefined template which fills in some of the bug fields can be
- * reached using http://tinyurl.com/khrplatform-h-bugreport, but you
- * must create a Bugzilla login first.
- *
- *
- * See the Implementer's Guidelines for information about where this file
- * should be located on your system and for more details of its use:
- * http://www.khronos.org/registry/implementers_guide.pdf
- *
- * This file should be included as
- * #include <KHR/khrplatform.h>
- * by Khronos client API header files that use its types and defines.
- *
- * The types in khrplatform.h should only be used to define API-specific types.
- *
- * Types defined in khrplatform.h:
- * khronos_int8_t signed 8 bit
- * khronos_uint8_t unsigned 8 bit
- * khronos_int16_t signed 16 bit
- * khronos_uint16_t unsigned 16 bit
- * khronos_int32_t signed 32 bit
- * khronos_uint32_t unsigned 32 bit
- * khronos_int64_t signed 64 bit
- * khronos_uint64_t unsigned 64 bit
- * khronos_intptr_t signed same number of bits as a pointer
- * khronos_uintptr_t unsigned same number of bits as a pointer
- * khronos_ssize_t signed size
- * khronos_usize_t unsigned size
- * khronos_float_t signed 32 bit floating point
- * khronos_time_ns_t unsigned 64 bit time in nanoseconds
- * khronos_utime_nanoseconds_t unsigned time interval or absolute time in
- * nanoseconds
- * khronos_stime_nanoseconds_t signed time interval in nanoseconds
- * khronos_boolean_enum_t enumerated boolean type. This should
- * only be used as a base type when a client API's boolean type is
- * an enum. Client APIs which use an integer or other type for
- * booleans cannot use this as the base type for their boolean.
- *
- * Tokens defined in khrplatform.h:
- *
- * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
- *
- * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
- * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
- *
- * Calling convention macros defined in this file:
- * KHRONOS_APICALL
- * KHRONOS_APIENTRY
- * KHRONOS_APIATTRIBUTES
- *
- * These may be used in function prototypes as:
- *
- * KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
- * int arg1,
- * int arg2) KHRONOS_APIATTRIBUTES;
- */
-
-/*-------------------------------------------------------------------------
- * Definition of KHRONOS_APICALL
- *-------------------------------------------------------------------------
- * This precedes the return type of the function in the function prototype.
- */
-#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
-# define KHRONOS_APICALL __declspec(dllimport)
-#elif defined (__SYMBIAN32__)
-# define KHRONOS_APICALL IMPORT_C
-#else
-# define KHRONOS_APICALL
-#endif
-
-/*-------------------------------------------------------------------------
- * Definition of KHRONOS_APIENTRY
- *-------------------------------------------------------------------------
- * This follows the return type of the function and precedes the function
- * name in the function prototype.
- */
-#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
- /* Win32 but not WinCE */
-# define KHRONOS_APIENTRY __stdcall
-#else
-# define KHRONOS_APIENTRY
-#endif
-
-/*-------------------------------------------------------------------------
- * Definition of KHRONOS_APIATTRIBUTES
- *-------------------------------------------------------------------------
- * This follows the closing parenthesis of the function prototype arguments.
- */
-#if defined (__ARMCC_2__)
-#define KHRONOS_APIATTRIBUTES __softfp
-#else
-#define KHRONOS_APIATTRIBUTES
-#endif
-
-/*-------------------------------------------------------------------------
- * basic type definitions
- *-----------------------------------------------------------------------*/
-#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
-
-
-/*
- * Using <stdint.h>
- */
-#include <stdint.h>
-typedef int32_t khronos_int32_t;
-typedef uint32_t khronos_uint32_t;
-typedef int64_t khronos_int64_t;
-typedef uint64_t khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64 1
-#define KHRONOS_SUPPORT_FLOAT 1
-
-#elif defined(__VMS ) || defined(__sgi)
-
-/*
- * Using <inttypes.h>
- */
-#include <inttypes.h>
-typedef int32_t khronos_int32_t;
-typedef uint32_t khronos_uint32_t;
-typedef int64_t khronos_int64_t;
-typedef uint64_t khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64 1
-#define KHRONOS_SUPPORT_FLOAT 1
-
-#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
-
-/*
- * Win32
- */
-typedef __int32 khronos_int32_t;
-typedef unsigned __int32 khronos_uint32_t;
-typedef __int64 khronos_int64_t;
-typedef unsigned __int64 khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64 1
-#define KHRONOS_SUPPORT_FLOAT 1
-
-#elif defined(__sun__) || defined(__digital__)
-
-/*
- * Sun or Digital
- */
-typedef int khronos_int32_t;
-typedef unsigned int khronos_uint32_t;
-#if defined(__arch64__) || defined(_LP64)
-typedef long int khronos_int64_t;
-typedef unsigned long int khronos_uint64_t;
-#else
-typedef long long int khronos_int64_t;
-typedef unsigned long long int khronos_uint64_t;
-#endif /* __arch64__ */
-#define KHRONOS_SUPPORT_INT64 1
-#define KHRONOS_SUPPORT_FLOAT 1
-
-#elif 0
-
-/*
- * Hypothetical platform with no float or int64 support
- */
-typedef int khronos_int32_t;
-typedef unsigned int khronos_uint32_t;
-#define KHRONOS_SUPPORT_INT64 0
-#define KHRONOS_SUPPORT_FLOAT 0
-
-#else
-
-/*
- * Generic fallback
- */
-#include <stdint.h>
-typedef int32_t khronos_int32_t;
-typedef uint32_t khronos_uint32_t;
-typedef int64_t khronos_int64_t;
-typedef uint64_t khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64 1
-#define KHRONOS_SUPPORT_FLOAT 1
-
-#endif
-
-
-/*
- * Types that are (so far) the same on all platforms
- */
-typedef signed char khronos_int8_t;
-typedef unsigned char khronos_uint8_t;
-typedef signed short int khronos_int16_t;
-typedef unsigned short int khronos_uint16_t;
-
-/*
- * Types that differ between LLP64 and LP64 architectures - in LLP64,
- * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
- * to be the only LLP64 architecture in current use.
- */
-#ifdef _WIN64
-typedef signed long long int khronos_intptr_t;
-typedef unsigned long long int khronos_uintptr_t;
-typedef signed long long int khronos_ssize_t;
-typedef unsigned long long int khronos_usize_t;
-#else
-typedef signed long int khronos_intptr_t;
-typedef unsigned long int khronos_uintptr_t;
-typedef signed long int khronos_ssize_t;
-typedef unsigned long int khronos_usize_t;
-#endif
-
-#if KHRONOS_SUPPORT_FLOAT
-/*
- * Float type
- */
-typedef float khronos_float_t;
-#endif
-
-#if KHRONOS_SUPPORT_INT64
-/* Time types
- *
- * These types can be used to represent a time interval in nanoseconds or
- * an absolute Unadjusted System Time. Unadjusted System Time is the number
- * of nanoseconds since some arbitrary system event (e.g. since the last
- * time the system booted). The Unadjusted System Time is an unsigned
- * 64 bit value that wraps back to 0 every 584 years. Time intervals
- * may be either signed or unsigned.
- */
-typedef khronos_uint64_t khronos_utime_nanoseconds_t;
-typedef khronos_int64_t khronos_stime_nanoseconds_t;
-#endif
-
-/*
- * Dummy value used to pad enum types to 32 bits.
- */
-#ifndef KHRONOS_MAX_ENUM
-#define KHRONOS_MAX_ENUM 0x7FFFFFFF
-#endif
-
-/*
- * Enumerated boolean type
- *
- * Values other than zero should be considered to be true. Therefore
- * comparisons should not be made against KHRONOS_TRUE.
- */
-typedef enum {
- KHRONOS_FALSE = 0,
- KHRONOS_TRUE = 1,
- KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
-} khronos_boolean_enum_t;
-
-#endif /* __khrplatform_h_ */
diff --git a/c/include/MGL/mgl.h b/c/include/MGL/mgl.h
deleted file mode 100644
index 5c69598..0000000
--- a/c/include/MGL/mgl.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Note: This header should be compilable as C.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MGL_MGL_H_
-#define MOJO_PUBLIC_C_INCLUDE_MGL_MGL_H_
-
-#include <MGL/mgl_types.h>
-#include <mojo/macros.h>
-#include <mojo/system/handle.h>
-#include <stdint.h>
-
-MOJO_BEGIN_EXTERN_C
-
-typedef uint32_t MGLOpenGLAPIVersion;
-
-// OpenGL ES 2.0
-#define MGL_API_VERSION_GLES2 ((MGLOpenGLAPIVersion)1)
-// OpenGL ES 3.0
-#define MGL_API_VERSION_GLES3 ((MGLOpenGLAPIVersion)2)
-// OpenGL ES 3.1
-#define MGL_API_VERSION_GLES31 ((MGLOpenGLAPIVersion)3)
-
-#define MGL_NO_CONTEXT ((MGLContext)0)
-
-struct MojoAsyncWaiter;
-
-// Creates a context at the given API version or returns MGL_NO_CONTEXT.
-// |command_buffer_handle| must be a command buffer message pipe handle from
-// the Gpu service or another source. The callee takes ownership of this
-// handle.
-// |share_group| specifies the share group to create this context in.
-// If this is MGL_NO_CONTEXT a new share group will be created for this context.
-// |lost_callback|, if not null, will be invoked when the context is lost.
-// |async_waiter| must be a pointer to a MojoAsyncWaiter implementation that is
-// usable from any thread the returned MGLContext will be used from
-// for as long as the context exists.
-MGLContext MGLCreateContext(MGLOpenGLAPIVersion version,
- MojoHandle command_buffer_handle,
- MGLContext share_group,
- MGLContextLostCallback lost_callback,
- void* lost_callback_closure,
- const struct MojoAsyncWaiter* async_waiter);
-void MGLDestroyContext(MGLContext context);
-
-// Makes |context| the current MGLContext for the calling thread. Calling with
-// MGL_NO_CONTEXT clears the current context.
-void MGLMakeCurrent(MGLContext context);
-
-// Returns the currently bound context for the calling thread or MGL_NO_CONTEXT
-// if there is none.
-MGLContext MGLGetCurrentContext(void);
-
-// Returns GL function usable in any context that advertise the corresponding
-// extension in their GL_EXTENSIONS string, or null for functions that the
-// implementation does not support. The implementation only advertises GL
-// functions.
-// |name| is the name of the GL function.
-MGLMustCastToProperFunctionPointerType MGLGetProcAddress(const char* name);
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MGL_MGL_H_
diff --git a/c/include/MGL/mgl_echo.h b/c/include/MGL/mgl_echo.h
deleted file mode 100644
index e78c427..0000000
--- a/c/include/MGL/mgl_echo.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Note: This header should be compilable as C.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MGL_MGL_ECHO_H_
-#define MOJO_PUBLIC_C_INCLUDE_MGL_MGL_ECHO_H_
-
-#include <MGL/mgl_types.h>
-#include <mojo/macros.h>
-#include <stdint.h>
-
-MOJO_BEGIN_EXTERN_C
-
-typedef void (*MGLEchoCallback)(void* closure);
-
-void MGLEcho(MGLEchoCallback callback, void* closure);
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MGL_MGL_ECHO_H_
diff --git a/c/include/MGL/mgl_onscreen.h b/c/include/MGL/mgl_onscreen.h
deleted file mode 100644
index 5c3f2a0..0000000
--- a/c/include/MGL/mgl_onscreen.h
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Note: This header should be compilable as C.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MGL_MGL_ONSCREEN_H_
-#define MOJO_PUBLIC_C_INCLUDE_MGL_MGL_ONSCREEN_H_
-
-#include <MGL/mgl_types.h>
-#include <mojo/macros.h>
-#include <stdint.h>
-
-MOJO_BEGIN_EXTERN_C
-
-// Resizes the default framebuffer for the currently bound onscreen MGLContext.
-void MGLResizeSurface(uint32_t width, uint32_t height);
-
-// Presents the default framebuffer for the currently bound onscreen MGLContext
-// to the windowing system or display.
-void MGLSwapBuffers(void);
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MGL_MGL_ONSCREEN_H_
diff --git a/c/include/MGL/mgl_signal_sync_point.h b/c/include/MGL/mgl_signal_sync_point.h
deleted file mode 100644
index 0cb0e29..0000000
--- a/c/include/MGL/mgl_signal_sync_point.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Note: This header should be compilable as C.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MGL_MGL_SIGNAL_SYNC_POINT_H_
-#define MOJO_PUBLIC_C_INCLUDE_MGL_MGL_SIGNAL_SYNC_POINT_H_
-
-#include <MGL/mgl_types.h>
-#include <mojo/macros.h>
-#include <stdint.h>
-
-MOJO_BEGIN_EXTERN_C
-
-typedef void (*MGLSyncPointCallback)(void* closure);
-
-// MGLSignalSyncPoint signals the given sync point in the current context and
-// invokes |callback| when the service side acknowleges that the sync point has
-// been passed.
-void MGLSignalSyncPoint(uint32_t sync_point,
- MGLSignalSyncPointCallback callback,
- void* closure);
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MGL_MGL_SIGNAL_SYNC_POINT_H_
diff --git a/c/include/MGL/mgl_types.h b/c/include/MGL/mgl_types.h
deleted file mode 100644
index a38e254..0000000
--- a/c/include/MGL/mgl_types.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Note: This header should be compilable as C.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MGL_TYPES_H_
-#define MOJO_PUBLIC_C_INCLUDE_MGL_TYPES_H_
-
-#include <mojo/macros.h>
-
-MOJO_BEGIN_EXTERN_C
-
-typedef struct MGLContextPrivate* MGLContext;
-typedef void (*MGLContextLostCallback)(void* closure);
-typedef void (*MGLSignalSyncPointCallback)(void* closure);
-
-// This is a generic function pointer type, which must be cast to the proper
-// type and calling convention before use.
-typedef void (*MGLMustCastToProperFunctionPointerType)(void);
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MGL_TYPES_H_
diff --git a/c/include/mojo/bindings/array.h b/c/include/mojo/bindings/array.h
deleted file mode 100644
index abbfbdc..0000000
--- a/c/include/mojo/bindings/array.h
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_ARRAY_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_ARRAY_H_
-
-#include <mojo/bindings/buffer.h>
-#include <mojo/bindings/internal/type_descriptor.h>
-#include <mojo/macros.h>
-#include <stdint.h>
-
-MOJO_BEGIN_EXTERN_C
-
-// The fields below are just the header of a mojom array. The bytes that
-// immediately follow this struct consist of |num_bytes -
-// sizeof(MojomArrayHeader)| bytes describing |num_elements| elements of the
-// array.
-struct MojomArrayHeader {
- // num_bytes includes the size of this struct along with the accompanying
- // array bytes that follow these fields.
- uint32_t num_bytes;
- uint32_t num_elements;
-};
-MOJO_STATIC_ASSERT(sizeof(struct MojomArrayHeader) == 8,
- "struct MojomArrayHeader must be 8 bytes.");
-
-// This union is used to represent references to a mojom array.
-union MojomArrayHeaderPtr {
- // |ptr| is used to access the array when it hasn't been encoded yet.
- struct MojomArrayHeader* ptr;
- // |offset| is used to access the array after it has been encoded.
- uint64_t offset;
-};
-MOJO_STATIC_ASSERT(sizeof(union MojomArrayHeaderPtr) == 8,
- "union MojomArrayHeaderPtr must be 8 bytes.");
-
-// Allocates enough space using the given |buffer| for |num_elements|, each of
-// which is |element_byte_size| bytes in size. Returns NULL on failure.
-struct MojomArrayHeader* MojomArray_New(struct MojomBuffer* buffer,
- uint32_t num_elements,
- uint32_t element_byte_size);
-
-// This is a macro for accessing a particular element in a mojom array. Given
-// |base|, which pointers to a |struct MojomArrayHeader|, extracts the |index|th
-// element, where each element is |sizeof(type)| bytes.
-#define MOJOM_ARRAY_INDEX(base, type, index) \
- ((type*)((char*)(base) + sizeof(struct MojomArrayHeader) + \
- sizeof(type) * (index)))
-
-// Returns the number of bytes required to serialize this mojom array.
-// |in_type_desc| is the generated descriptor entry that describes |in_array|.
-// The user isn't expected to call this function directly, but this will
-// probably be called when |ComputeSerializedSize()|ing a user-defined mojom
-// struct.
-size_t MojomArray_ComputeSerializedSize(
- const struct MojomTypeDescriptorArray* in_type_desc,
- const struct MojomArrayHeader* in_array_data);
-
-// Encodes the mojom array described by the |inout_array| buffer; note that any
-// references from the array are also in the buffer backed by |inout_array|, and
-// they are recursively encoded. Encodes all pointers to relative offsets, and
-// encodes all handles by moving them into |inout_handles_buffer| and encoding
-// the index into the handle.
-// |in_type_desc|: Describes the pointer and handle fields of the mojom array.
-// |inout_array|: Contains the array, and any other references outside the
-// array.
-// |in_array_size|: Size of the buffer backed by |inout_array| in bytes.
-// |inout_handles_buffer|:
-// A buffer used to record handles during encoding. The |num_handles_used|
-// field can be used to determine how many handles were moved into this
-// buffer after this function returns.
-void MojomArray_EncodePointersAndHandles(
- const struct MojomTypeDescriptorArray* in_type_desc,
- struct MojomArrayHeader* inout_array,
- uint32_t in_array_size,
- struct MojomHandleBuffer* inout_handles_buffer);
-
-// Decodes the mojom array described by the |inout_array| buffer; note that any
-// references from the array are also in the buffer backed by |inout_array|, and
-// they are recursively decoded. Decodes all offset to pointers, and decodes all
-// handles by moving them out of |inout_handles| array using the encoded index.
-// |in_type_desc|: Describes the pointer and handle fields of the mojom array.
-// |inout_array|: Contains the array, and any other references outside the
-// array.
-// |in_array_size|: Size of the buffer backed by |inout_array|.
-// |inout_handles|: Mojo handles are moved out of this array, and are references
-// by index in |inout_buf|.
-// |in_num_handles|: Size in # of number elements available in |inout_handles|.
-void MojomArray_DecodePointersAndHandles(
- const struct MojomTypeDescriptorArray* in_type_desc,
- struct MojomArrayHeader* inout_array,
- uint32_t in_array_size,
- MojoHandle* inout_handles,
- uint32_t in_num_handles);
-
-// Validates the mojom array described by the |in_struct| buffer. Any
-// references from the array are also recursively validated, and are expected
-// to be in the same buffer backing |in_array|.
-// |in_type_desc|: Describes the pointer and handle fields of the mojom array.
-// |in_array|: Buffer containing the array, and any other references outside of
-// the array
-// |in_array_size|: Size of the buffer backed by |in_array| in bytes.
-// |in_num_handles|: Number of valid handles expected to be referenced from
-// |in_array|.
-// |inout_context|: An initialized context that contains the expected location
-// of the next pointer and next offset. This is used to
-// validate that no two pointers or handles are shared.
-MojomValidationResult MojomArray_Validate(
- const struct MojomTypeDescriptorArray* in_type_desc,
- const struct MojomArrayHeader* in_array,
- uint32_t in_array_size,
- uint32_t in_num_handles,
- struct MojomValidationContext* inout_context);
-
-// Creates a new copy of |in_array| using |buffer| to allocate space.
-// Recursively creates new copies of any references from |in_array|, and updates
-// the references to point to the new copies. This operation is useful if you
-// want to linearize |in_array| using the buffer backed by |buffer|. If there is
-// insufficient space in the buffer or has unknown-typed data, this function
-// returns false and the supplied buffer may be partially used. Otherwise,
-// |out_array| is set to the new copy of the struct.
-// |buffer|: A mojom buffer used to allocate space for the new array.
-// |in_type_desc|: Describes the pointer and handle fields of the mojom array.
-// |in_array|: The unencoded mojom array to be copied.
-// |out_array|: Will be set to the new unencoded mojom array.
-bool MojomArray_DeepCopy(struct MojomBuffer* buffer,
- const struct MojomTypeDescriptorArray* in_type_desc,
- const struct MojomArrayHeader* in_array,
- struct MojomArrayHeader** out_array);
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_ARRAY_H_
diff --git a/c/include/mojo/bindings/buffer.h b/c/include/mojo/bindings/buffer.h
deleted file mode 100644
index 8df8449..0000000
--- a/c/include/mojo/bindings/buffer.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_BUFFER_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_BUFFER_H_
-
-#include <mojo/macros.h>
-#include <mojo/system/handle.h>
-#include <stdint.h>
-
-MOJO_BEGIN_EXTERN_C
-
-// |MojomBuffer| is used to track a buffer state for mojom serialization. The
-// user must initialize this struct themselves. See the fields for details.
-struct MojomBuffer {
- char* buf;
- // The number of bytes described by |buf|.
- uint32_t buf_size;
- // Must be initialized to 0. MojomBuffer_Allocate() will update it as it
- // consumes |buf|.
- uint32_t num_bytes_used;
-};
-
-// Allocates |num_bytes| (rounded up to 8 bytes) from |buf|. Returns NULL if
-// there isn't enough space left to allocate.
-void* MojomBuffer_Allocate(struct MojomBuffer* buf, uint32_t num_bytes);
-
-// |MojomHandleBuffer| is used to track handle offsets during serialization.
-// Handles are moved into the |handles| array, and are referred to by index
-// into the array. The user must initialize this struct themselves. See the
-// fields for details.
-struct MojomHandleBuffer {
- // |handles| must contain enough space to store all the valid MojoHandles
- // encountered during serialization.
- MojoHandle* handles;
- // Size of the |handles| array.
- uint32_t num_handles;
- // The number of handles used so far in |handles|. As handles are moved into
- // |handles|, this counter is incremented. The caller can use it to determine
- // how many handles were moved into |handles| after serialization. This
- // counter must be initialized appropriately before the struct can be used.
- uint32_t num_handles_used;
-};
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_BUFFER_H_
diff --git a/c/include/mojo/bindings/interface.h b/c/include/mojo/bindings/interface.h
deleted file mode 100644
index fcf2b1e..0000000
--- a/c/include/mojo/bindings/interface.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_INTERFACE_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_INTERFACE_H_
-
-#include <mojo/macros.h>
-#include <mojo/system/handle.h>
-#include <stdint.h>
-
-MOJO_BEGIN_EXTERN_C
-
-// |MojomInterfaceData| represents a handle to an interface; in particular, this
-// is the client side of the interface where messages are sent and responses are
-// received. When encoded, |handle| represents the index into an array of
-// handles. The encoded version of an invalid handle is '-1' of MojoHandle type.
-struct MojomInterfaceData {
- MojoHandle handle;
- uint32_t version;
-};
-MOJO_STATIC_ASSERT(sizeof(struct MojomInterfaceData) == 8,
- "struct MojomInterfaceData must be 8 bytes.");
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_INTERFACE_H_
diff --git a/c/include/mojo/bindings/internal/type_descriptor.h b/c/include/mojo/bindings/internal/type_descriptor.h
deleted file mode 100644
index bee56a4..0000000
--- a/c/include/mojo/bindings/internal/type_descriptor.h
+++ /dev/null
@@ -1,218 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file contains structs used for constructing type descriptors for
-// generated mojom types. A type descriptor for a mojom struct is a table
-// describing the byte-offsets of all the pointers and handles in the struct,
-// and has references to the type descriptorss that further describe the
-// pointers. The table is used for doing all computations for the struct --
-// determining serialized size, encoding and decoding recursively, etc. A type
-// descriptor is generated for each struct, union, array and map. Mojom maps are
-// just mojom structs with two mojom arrays. We denote it as a separate type,
-// but it is described the same way as a mojom struct.
-//
-// The user is not expected to construct type descriptors -- a bindings
-// generator will do this when it generates bindings for a mojom file.
-//
-// A type descriptor for a mojom struct is a |MojomTypeDescriptorStruct|
-// containing an array of entries of types of |MojomTypeDescriptorStructEntry|.
-// Similarly, unions are described with |MojomTypeDescriptorUnion| with entries
-// of |MojomTypeDescriptorUnionEntry|. Arrays are described with
-// |MojomTypeDescriptorArray|.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_INTERNAL_TYPE_DESCRIPTOR_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_INTERNAL_TYPE_DESCRIPTOR_H_
-
-#include <mojo/bindings/buffer.h>
-#include <mojo/bindings/internal/util.h>
-#include <mojo/bindings/validation.h>
-#include <mojo/macros.h>
-#include <mojo/system/handle.h>
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdint.h>
-
-MOJO_BEGIN_EXTERN_C
-
-// This enum is used in a type descriptor entry for the |elem_type| field, and
-// indicates which type the accompanying |elem_descriptor| is describing (if it
-// is describing a reference type), or to indicate that it's a handle type.
-// Values that correspond to an |elem_descriptor|'s pointer type:
-// - If MOJOM_TYPE_DESCRIPTOR_TYPE_STRUCT_PTR, then |elem_descriptor| points to
-// a |MojomTypeDescriptorStruct|.
-// - If MOJOM_TYPE_DESCRIPTOR_TYPE_MAP_PTR, then |elem_descriptor| points to
-// a |MojomTypeDescriptorStruct|.
-// - If MOJOM_TYPE_DESCRIPTOR_TYPE_UNION or
-// MOJOM_TYPE_DESCRIPTOR_TYPE_UNION_PTR, then |elem_descriptor| points to a
-// |MojomTypeDescriptorUnion|.
-// - If MOJOM_TYPE_DESCRIPTOR_TYPE_ARRAY_PTR, then |elem_descriptor| points to a
-// |MojomTypeDescriptorArray|.
-// - For any other value, |elem_descriptor| is NULL.
-enum MojomTypeDescriptorType {
- // Note: A map is a mojom struct with 2 mojom arrays, so we don't have a
- // separate descriptor type for it.
- MOJOM_TYPE_DESCRIPTOR_TYPE_STRUCT_PTR = 0,
- MOJOM_TYPE_DESCRIPTOR_TYPE_MAP_PTR = 1,
- MOJOM_TYPE_DESCRIPTOR_TYPE_ARRAY_PTR = 2,
- // A MOJOM_TYPE_DESCRIPTOR_TYPE_UNION_PTR only occurs inside a
- // |MojomTypeDescriptorUnion|, since union fields inside unions are encoded as
- // pointers to an out-of-line union.
- MOJOM_TYPE_DESCRIPTOR_TYPE_UNION_PTR = 3,
- // A union that is not inside a union is inlined, and described by
- // MOJOM_TYPE_DESCRIPTOR_TYPE_UNION.
- MOJOM_TYPE_DESCRIPTOR_TYPE_UNION = 4,
- MOJOM_TYPE_DESCRIPTOR_TYPE_HANDLE = 5,
- MOJOM_TYPE_DESCRIPTOR_TYPE_INTERFACE = 6,
- // This is only used in an array descriptor, and serves as a way to terminate
- // a chain of array descriptors; the last entry in the chain always contains a
- // plain-old-data type.
- MOJOM_TYPE_DESCRIPTOR_TYPE_POD = 7,
-};
-
-struct MojomTypeDescriptorStructVersion {
- uint32_t version;
- uint32_t num_bytes;
-};
-
-// Mojom structs are described using this struct.
-struct MojomTypeDescriptorStruct {
- uint32_t num_versions;
- // Increasing ordered by version.
- struct MojomTypeDescriptorStructVersion* versions;
- // |entries| is an array of |num_entries|, each describing a field of
- // reference or handle type.
- uint32_t num_entries;
- const struct MojomTypeDescriptorStructEntry* entries;
-};
-
-// This struct is used to describe each entry in a mojom struct. Each entry
-// indicates whether it is describing a reference type, or a handle type through
-// the field |elem_type|. |elem_descriptor| points to the type descriptor
-// describing the field, if the type has one (handles don't have type
-// descriptors). |offset| indicates the starting byte offset of the element
-// within the struct.
-struct MojomTypeDescriptorStructEntry {
- // See comments for |MojomTypeDescriptorType| on possible values and
- // corresponding behaviour with |elem_descriptor|.
- enum MojomTypeDescriptorType elem_type;
- // Use |elem_type| to decide which type |elem_descriptor| should be casted to.
- const void* elem_descriptor;
- // |offset| does not account for the struct header. Offset 0 always refers to
- // the first element.
- uint32_t offset;
- // Corresponds to the '[MinVersion]' attribute in mojom IDL. This determines
- // if this field should be ignored if its min_version < version of the struct
- // we are dealing with.
- uint32_t min_version;
- // Is this field nullable?
- bool nullable;
-};
-
-// Mojom unions are described using this struct.
-struct MojomTypeDescriptorUnion {
- // Number of fields in the union.
- uint32_t num_fields;
- // Number of elements in the |entries| array below.
- uint32_t num_entries;
- // |entries| only includes entries for pointer and handle types.
- const struct MojomTypeDescriptorUnionEntry* entries;
-};
-
-// Like |MojomTypeDescriptorStructEntry|, this variant is used to construct a
-// type descriptor for a union. Instead of an offset, it describes a union field
-// by its |tag|.
-struct MojomTypeDescriptorUnionEntry {
- // See comments for |MojomTypeDescriptorType| on possible values and
- // corresponding behaviour with |elem_descriptor|.
- enum MojomTypeDescriptorType elem_type;
- const void* elem_descriptor;
- // The tag of the union field.
- uint32_t tag;
- bool nullable;
-};
-
-// Describes a mojom array. To describe an array, we don't need a table of
-// entries, since arrays can only describe 1 type. However, that one type can
-// recursively be an array (e.g, array<array<int>>), in which case a chain of
-// array entries are constructed.
-struct MojomTypeDescriptorArray {
- enum MojomTypeDescriptorType elem_type;
- const void* elem_descriptor;
- // How many elements is this array expected to hold?
- // 0 means unspecified.
- uint32_t num_elements;
- // Size of each element, in bits (since bools are 1-bit in size). This is
- // needed to validate the size of an array.
- uint32_t elem_num_bits;
- bool nullable;
-};
-
-// This describes a mojom string.
-// A mojom string is a mojom array of chars without a fixed-sized.
-extern const struct MojomTypeDescriptorArray g_mojom_string_type_description;
-
-// Returns true if |type| is a "pointer" type: an array or a struct, whose data
-// is referenced by a pointer (or an offset, if serialized).
-// Since unions being pointer types depends on their container, we don't include
-// them here.
-bool MojomType_IsPointer(enum MojomTypeDescriptorType type);
-
-// This helper function, depending on |type|, calls the appropriate
-// *_ComputeSerializedSize(|type_desc|, |data|).
-size_t MojomType_DispatchComputeSerializedSize(
- enum MojomTypeDescriptorType type,
- const void* type_desc,
- bool nullable,
- const void* data);
-
-// This helper function, depending on |in_elem_type|, calls the appropriate
-// *_EncodePointersAndHandles(...). If |in_elem_type| describes a pointer, it
-// first encodes the pointer before calling the associated
-// *_EncodePointersAndHandles(...). If |in_elem_type| describes a handle, it
-// encodes the handle into |inout_handles|.
-void MojomType_DispatchEncodePointersAndHandles(
- enum MojomTypeDescriptorType in_elem_type,
- const void* in_type_desc,
- bool in_nullable,
- void* inout_buf,
- uint32_t in_buf_size,
- struct MojomHandleBuffer* inout_handles_buffer);
-
-// This helper function, depending on |in_elem_type|, calls the appropriate
-// *_DecodePointersAndHandles(...). If |in_elem_type| describes a pointer, it
-// first decodes the offset into a pointer before calling the associated
-// *_DecodePointersAndHandles(...). If |in_elem_type| describes a handle, it
-// decodes the handle by looking up it up in |inout_handles|.
-void MojomType_DispatchDecodePointersAndHandles(
- enum MojomTypeDescriptorType in_elem_type,
- const void* in_type_desc,
- bool in_nullable,
- void* inout_buf,
- uint32_t in_buf_size,
- MojoHandle* inout_handles,
- uint32_t in_num_handles);
-
-MojomValidationResult MojomType_DispatchValidate(
- enum MojomTypeDescriptorType in_elem_type,
- const void* in_type_desc,
- bool in_nullable,
- const void* in_buf,
- uint32_t in_buf_size,
- uint32_t in_num_handles,
- struct MojomValidationContext* inout_context);
-
-// This helper function, depending on |in_elem_type|, calls the appropriate
-// *_DeepCopy(...). The result of that call is then assigned to |out_data|. If
-// |in_type_type| describes a pointer to a union, it allocates space for the
-// new union before dispatching a call to MojomUnion_DeepCopy. Returns false if
-// the copy failed due to insufficient space in the buffer.
-bool MojomType_DispatchDeepCopy(struct MojomBuffer* buffer,
- enum MojomTypeDescriptorType in_elem_type,
- const void* in_type_desc,
- const void* in_data,
- void* out_data);
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_INTERNAL_TYPE_DESCRIPTOR_H_
diff --git a/c/include/mojo/bindings/internal/util.h b/c/include/mojo/bindings/internal/util.h
deleted file mode 100644
index 1823ea4..0000000
--- a/c/include/mojo/bindings/internal/util.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_INTERNAL_UTIL_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_INTERNAL_UTIL_H_
-
-#include <mojo/macros.h>
-#include <stdint.h>
-
-// Rounds-up |num| to 8. The result is undefined if this results in an overflow.
-#define MOJOM_INTERNAL_ROUND_TO_8(num) (((num) + 7) & ~7)
-
-// Represents the memory layout of a mojom pointer; it is a |ptr| (pointer to
-// some memory) when unencoded, and refers to a relative |offset| when encoded.
-union MojomPointer {
- void* ptr;
- uint64_t offset;
-};
-MOJO_STATIC_ASSERT(sizeof(union MojomPointer) == 8,
- "union MojomPointer must be 8 bytes");
-
-// This struct represents the state we need to keep when validating an encoded
-// mojom type.
-struct MojomValidationContext {
- // |next_handle_index| is a counter that represents the next-available index
- // into the handle array. Previous indices have already been used up. This
- // counter is non-decreasing as it is used throughout validation.
- uint32_t next_handle_index;
-
- // As we validate, we keep track of the point where pointers can point to,
- // since two pointers may not point to the same memory region.
- char* next_pointer;
-
- // TODO(vardhan): Include an error string? How big should it be?
-};
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_INTERNAL_UTIL_H_
diff --git a/c/include/mojo/bindings/map.h b/c/include/mojo/bindings/map.h
deleted file mode 100644
index 6b08ee4..0000000
--- a/c/include/mojo/bindings/map.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_MAP_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_MAP_H_
-
-#include <mojo/bindings/array.h>
-#include <mojo/bindings/internal/type_descriptor.h>
-#include <mojo/bindings/internal/util.h>
-#include <mojo/bindings/struct.h>
-#include <mojo/macros.h>
-#include <mojo/system/handle.h>
-#include <stdint.h>
-
-MOJO_BEGIN_EXTERN_C
-
-// A mojom Map is a mojom struct with two MojomArrayHeaders: keys and values.
-// - Number of elements in keys == number of elements values.
-// - ith key corresponds to the ith value.
-struct MojomMapHeader {
- struct MojomStructHeader header;
- union MojomArrayHeaderPtr keys;
- union MojomArrayHeaderPtr values;
-};
-MOJO_STATIC_ASSERT(sizeof(struct MojomMapHeader) == 24,
- "struct MojomMapHeader must be 24 bytes.");
-
-union MojomMapHeaderPtr {
- struct MojomMapHeader* ptr;
- uint64_t offset;
-};
-MOJO_STATIC_ASSERT(sizeof(union MojomMapHeaderPtr) == 8,
- "MojomMapHeaderPtr must be 8 bytes.");
-
-MojomValidationResult MojomMap_Validate(
- const struct MojomTypeDescriptorStruct* in_type_desc,
- const struct MojomStructHeader* in_struct,
- uint32_t in_buf_size,
- uint32_t in_num_handles,
- struct MojomValidationContext* inout_context);
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_MAP_H_
diff --git a/c/include/mojo/bindings/message.h b/c/include/mojo/bindings/message.h
deleted file mode 100644
index 438448d..0000000
--- a/c/include/mojo/bindings/message.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_MESSAGE_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_MESSAGE_H_
-
-#include <mojo/bindings/struct.h>
-#include <mojo/bindings/validation.h>
-#include <mojo/macros.h>
-#include <stdint.h>
-
-MOJO_BEGIN_EXTERN_C
-
-#define MOJOM_MESSAGE_FLAGS_EXPECTS_RESPONSE ((uint32_t)(1 << 0u))
-#define MOJOM_MESSAGE_FLAGS_IS_RESPONSE ((uint32_t)(1 << 1u))
-
-// All mojom messages (over a message pipe) are framed with a MojomMessage as
-// its header.
-// MojomMessage is actually a mojom struct -- we define it here since it's
-// easier to read, and the validation has more to it than simple mojom struct
-// validation.
-struct MojomMessage {
- // header.version = 0 (version 1 has a request_id)
- struct MojomStructHeader header;
- // The ordinal number associated with this message. This is specified
- // (implicitly, if not explicitly) in the mojom IDL for an interface message
- // and is used to identify it.
- uint32_t ordinal;
- // Described by the MOJOM_MESSAGE_* flags defined above.
- uint32_t flags;
-};
-MOJO_STATIC_ASSERT(sizeof(struct MojomMessage) == 16,
- "struct MojomMessage must be 16 bytes");
-
-// Using |MojomMessage| as a member of this struct could work, but usability
-// would suffer a little while accessing the |header|. MojomMessageWithRequestId
-// is a "newer" version than MojomMessage.
-struct MojomMessageWithRequestId {
- // header.version = 1
- struct MojomStructHeader header;
- // Which message is it?
- uint32_t ordinal;
- // Described by the MOJOM_MESSAGE_* flags defined above.
- uint32_t flags;
- uint64_t request_id;
-};
-MOJO_STATIC_ASSERT(sizeof(struct MojomMessageWithRequestId) == 24,
- "MojomMessageWithRequestId must be 24 bytes");
-
-// Validates that |in_buf| is a valid mojom message. This does not validate the
-// contents of the message's body, only the message header. This function does
-// not validate whether a message should be a kind of request.
-// |in_buf|: can be a MojomMessage or a MojomMessageWithRequestId.
-// |in_buf_size|: number of bytes in |in_buf|.
-MojomValidationResult MojomMessage_ValidateHeader(const void* in_buf,
- uint32_t in_buf_size);
-
-// Validates that the given message is a request expecting a response. Assumes
-// that the message is already validated by MojomMessage_ValidateHeader().
-MojomValidationResult MojomMessage_ValidateRequestExpectingResponse(
- const void* in_buf);
-
-// Validates that the given message is a request which isn't expecting a
-// response. Assumes that the message is already validated by
-// MojomMessage_ValidateHeader().
-MojomValidationResult MojomMessage_ValidateRequestWithoutResponse(
- const void* in_buf);
-
-// Validates that the given message is a response. Assumes taht the message is
-// already validated by MojomMessage_ValidateHeader().
-MojomValidationResult MojomMessage_ValidateResponse(const void* in_buf);
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_MESSAGE_H_
diff --git a/c/include/mojo/bindings/string.h b/c/include/mojo/bindings/string.h
deleted file mode 100644
index daefa2b..0000000
--- a/c/include/mojo/bindings/string.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_STRING_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_STRING_H_
-
-#include <mojo/bindings/array.h>
-#include <mojo/bindings/buffer.h>
-
-// A mojom string is a mojom array of UTF-8 chars that need not be
-// null-terminated.
-struct MojomStringHeader {
- struct MojomArrayHeader chars;
-};
-MOJO_STATIC_ASSERT(sizeof(struct MojomStringHeader) ==
- sizeof(struct MojomArrayHeader),
- "MojomStringHeader must be just a MojomArrayHeader.");
-
-union MojomStringHeaderPtr {
- struct MojomStringHeader* ptr;
- uint64_t offset;
-};
-MOJO_STATIC_ASSERT(sizeof(union MojomStringHeaderPtr) == 8,
- "MojomStringHeaderPtr must be 8 byes.");
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_STRING_H_
diff --git a/c/include/mojo/bindings/struct.h b/c/include/mojo/bindings/struct.h
deleted file mode 100644
index 06219a1..0000000
--- a/c/include/mojo/bindings/struct.h
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_STRUCT_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_STRUCT_H_
-
-#include <mojo/bindings/buffer.h>
-#include <mojo/bindings/internal/type_descriptor.h>
-#include <mojo/bindings/internal/util.h>
-#include <mojo/macros.h>
-#include <stddef.h>
-#include <stdint.h>
-
-MOJO_BEGIN_EXTERN_C
-
-struct MojomStructHeader {
- // |num_bytes| includes the size of this struct header along with the
- // accompanying struct data. |num_bytes| must be rounded up to 8 bytes.
- uint32_t num_bytes;
- uint32_t version;
-};
-MOJO_STATIC_ASSERT(sizeof(struct MojomStructHeader) == 8,
- "struct MojomStructHeader must be 8 bytes.");
-
-// Returns the number of bytes required to serialize |in_struct|.
-// |in_type_desc| is the generated type descriptor that describes the locations
-// of the pointers and handles in |in_struct|.
-size_t MojomStruct_ComputeSerializedSize(
- const struct MojomTypeDescriptorStruct* in_type_desc,
- const struct MojomStructHeader* in_struct);
-
-// Encodes the mojom struct described by the |inout_struct| buffer; note that
-// any references from the struct are also in the buffer backed by
-// |inout_struct|, and they are recursively encoded. Encodes all pointers to
-// relative offsets, and encodes all handles by moving them into
-// |inout_handles_buffer| encoding the index into the handle.
-// |in_type_desc|: Describes the pointer and handle fields of the mojom struct.
-// |inout_struct|: Contains the struct, and any other references outside of the
-// struct.
-// |in_struct_size|: Size of the buffer backed by |inout_struct| in bytes.
-// |inout_handles_buffer|:
-// A buffer used to record handles during encoding. The |num_handles_used|
-// field can be used to determine how many handles were moved into this
-// buffer.
-void MojomStruct_EncodePointersAndHandles(
- const struct MojomTypeDescriptorStruct* in_type_desc,
- struct MojomStructHeader* inout_struct,
- uint32_t in_struct_size,
- struct MojomHandleBuffer* inout_handles_buffer);
-
-// Decodes the mojom struct described by the |inout_struct| buffer; note that
-// any references from the struct are also in |inout_struct|, and they are
-// recursively decoded. Decodes all offsets to pointers, and decodes all handles
-// by moving them out of |inout_handles| array using the encoded index into the
-// array.
-// |in_type_desc|: Describes the pointer and handle fields of the mojom struct.
-// |inout_struct|: Contains the struct, and any other references outside of the
-// struct.
-// |in_struct_size|: Size of the buffer backed by |inout_struct| in bytes.
-// |inout_handles|: Mojo handles are in this array, and are referenced by index
-// in |inout_buf|.
-// |in_num_handles|: Size in # of number elements available in |inout_handles|.
-void MojomStruct_DecodePointersAndHandles(
- const struct MojomTypeDescriptorStruct* in_type_desc,
- struct MojomStructHeader* inout_struct,
- uint32_t in_struct_size,
- MojoHandle* inout_handles,
- uint32_t in_num_handles);
-
-// Validates the mojom struct described by the |in_struct| buffer. Any
-// references from the struct are also recursively validated, and are expected
-// to be in the same buffer backing |in_struct|.
-// |in_type_desc|: Describes the pointer and handle fields of the mojom struct.
-// |inout_struct|: Buffer containing the struct, and any other references
-// outside of the struct.
-// |in_struct_size|: Size of the buffer backed by |inout_struct| in bytes.
-// |in_num_handles|: Number of valid handles expected to be referenced from
-// |in_struct|.
-// |inout_context|: An initialized context that contains the expected location
-// of the next pointer and next offset. This is used to
-// validate that no two pointers or handles are shared.
-MojomValidationResult MojomStruct_Validate(
- const struct MojomTypeDescriptorStruct* in_type_desc,
- const struct MojomStructHeader* in_struct,
- uint32_t in_struct_size,
- uint32_t in_num_handles,
- struct MojomValidationContext* inout_context);
-
-// Creates a new copy of |in_struct| using |buffer| to allocate space.
-// Recursively creates new copies of any references from |in_struct|, and
-// updates the references to point to the new copies. This operation is useful
-// if you want to linearize |in_struct| using the buffer backed by |buffer|. If
-// there is insufficient space in the buffer or has unknown-typed data, this
-// function returns false and the supplied buffer may be partially used.
-// Otherwise, |out_struct| is set to the new copy of the struct.
-// |buffer|: A mojom buffer used to allocate space for the new struct.
-// |in_type_desc|: Describes the pointer and handle fields of the mojom struct.
-// |in_struct|: The unencoded mojom struct to be copied.
-// |out_struct|: Will be set to the new unencoded mojom struct.
-bool MojomStruct_DeepCopy(struct MojomBuffer* buffer,
- const struct MojomTypeDescriptorStruct* in_type_desc,
- const struct MojomStructHeader* in_struct,
- struct MojomStructHeader** out_struct);
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_STRUCT_H_
diff --git a/c/include/mojo/bindings/union.h b/c/include/mojo/bindings/union.h
deleted file mode 100644
index 345f7b4..0000000
--- a/c/include/mojo/bindings/union.h
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_UNION_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_UNION_H_
-
-#include <mojo/bindings/buffer.h>
-#include <mojo/bindings/internal/type_descriptor.h>
-#include <mojo/bindings/internal/util.h>
-#include <mojo/macros.h>
-#include <stddef.h>
-#include <stdint.h>
-
-MOJO_BEGIN_EXTERN_C
-
-struct MojomUnionLayout {
- // |num_bytes|, the number of bytes used in this union, includes the size of
- // the |num_bytes| and |tag| fields, along with data.
- uint32_t size;
- uint32_t tag;
- union {
- // To be used when the data is a pointer.
- union MojomPointer pointer;
-
- // This is here to force this union data to be at least 8 bytes.
- uint64_t force_size_;
- } data;
-};
-MOJO_STATIC_ASSERT(sizeof(struct MojomUnionLayout) == 16,
- "struct MojomUnionLayout must be 16 bytes.");
-
-// Returns the number of bytes required to serialize |in_union_data|'s active
-// field, not including the union layout (as described by |struct
-// MojomUnionLayout|) itself.
-// |in_type_desc| is the generated type that describes the tags of the pointer
-// and handle types in the given union.
-size_t MojomUnion_ComputeSerializedSize(
- const struct MojomTypeDescriptorUnion* in_type_desc,
- const struct MojomUnionLayout* in_union_data);
-
-// Encodes the mojom union described by the |inout_union| buffer; note that any
-// references from the union are also in the buffer backed by |inout_union|, and
-// they are recursively encoded. Encodes all pointers to relative offsets, and
-// encodes all handles by moving them into |inout_handles_buffer| and encoding
-// the index into the handle.
-// |in_type_desc|: Describes the pointer and handle fields of the mojom union.
-// |inout_union|: Contains the union, and any other references outside the
-// union.
-// |in_union_size|: Size of the buffer backed by |inout_union| in bytes.
-// |inout_handles_buffer|:
-// A buffer used to record handles during encoding. The |num_handles_used|
-// field can be used to determine how many handles were moved into this
-// buffer.
-void MojomUnion_EncodePointersAndHandles(
- const struct MojomTypeDescriptorUnion* in_type_desc,
- struct MojomUnionLayout* inout_union,
- uint32_t in_union_size,
- struct MojomHandleBuffer* inout_handles_buffer);
-
-// Decodes the mojom union described by the |inout_union| buffer; note that any
-// references from the union are also in the buffer backed by |inout_union|, and
-// they are recursively decoded. Decodes all offsets to pointers, and decodes
-// all handles by moving them out of |inout_handles| using the encoded index.
-// |in_type_desc|: Describes the pointer and handle fields of the mojom union.
-// |inout_union|: Contains the union, and any other references outside the
-// union.
-// |in_union_size|: Size of the buffer backed by |inout_union| in bytes.
-// |inout_handles|: Mojo handles are moved out of this array and into
-// |inout_union|, using the encoded index into this array.
-// |in_num_handles|: Size in # of number elements available in |inout_handles|.
-void MojomUnion_DecodePointersAndHandles(
- const struct MojomTypeDescriptorUnion* in_type_desc,
- struct MojomUnionLayout* inout_union,
- uint32_t in_union_size,
- MojoHandle* inout_handles,
- uint32_t in_num_handles);
-
-// Validates the mojom union described by the |in_union| buffer. Any
-// references from the union are also recursively validated, and are expected to
-// be in the same buffer backing |in_union|.
-// |in_type_desc|: Describes the pointer and handle fields of the mojom union.
-// |in_union|: Buffer containing the union, and any other references
-// outside of the union.
-// |in_union_size|: Size of the buffer backed by |in_union| in bytes.
-// |in_num_handles|: Number of valid handles expected to be referenced from
-// |in_union|.
-// |inout_context|: An initialized context that contains the expected location
-// of the next pointer and next offset. This is used to
-// validate that no two pointers or handles are shared.
-MojomValidationResult MojomUnion_Validate(
- const struct MojomTypeDescriptorUnion* in_type_desc,
- bool in_nullable,
- const struct MojomUnionLayout* in_union,
- uint32_t in_union_size,
- uint32_t in_num_handles,
- struct MojomValidationContext* inout_context);
-
-// Copies over |in_union_data| into |out_union_data|, recursively copying any
-// references from |in_union_data| using |buffer| to allocate space, and
-// updating the references to point to the new copies. Note that a space is
-// never allocated for the new union data in this function -- |out_union_data|
-// should already be allocated for this function ahead of time. Returns false if
-// the copy couldn't be made (insufficient space, or unrecognized tag), in which
-// case the buffer may be partially used.
-// |buffer|: A mojom buffer used to allocate space for any references from the
-// union.
-// |in_type_desc|: Describes the pointer and handle fields of the mojom union.
-// |in_union_data|: The unencoded mojom union to be copied.
-// |out_union_data|: Where |in_union_data| should be copied to.
-bool MojomUnion_DeepCopy(struct MojomBuffer* buffer,
- const struct MojomTypeDescriptorUnion* in_type_desc,
- const struct MojomUnionLayout* in_union_data,
- struct MojomUnionLayout* out_union_data);
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_UNION_H_
diff --git a/c/include/mojo/bindings/validation.h b/c/include/mojo/bindings/validation.h
deleted file mode 100644
index 681a4e9..0000000
--- a/c/include/mojo/bindings/validation.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_VALIDATION_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_VALIDATION_H_
-
-#include <mojo/macros.h>
-#include <stdint.h>
-
-MOJO_BEGIN_EXTERN_C
-
-// One of MOJOM_VALIDATION_* codes; See below.
-typedef uint32_t MojomValidationResult;
-
-// No error; successful validation.
-#define MOJOM_VALIDATION_ERROR_NONE ((MojomValidationResult)0)
-// An object (struct or array) is not 8-byte aligned.
-#define MOJOM_VALIDATION_MISALIGNED_OBJECT ((MojomValidationResult)1)
-// An object is not contained inside the message data, or it overlaps other
-// objects.
-#define MOJOM_VALIDATION_ILLEGAL_MEMORY_RANGE ((MojomValidationResult)2)
-// A struct header doesn't make sense, for example:
-// - |num_bytes| is smaller than the size of the struct header.
-// - |num_bytes| and |version| don't match.
-#define MOJOM_VALIDATION_UNEXPECTED_STRUCT_HEADER ((MojomValidationResult)3)
-// An array header doesn't make sense, for example:
-// - |num_bytes| is smaller than the size of the header plus the size required
-// to store |num_elements| elements.
-// - For fixed-size arrays, |num_elements| is different than the specified
-// size.
-#define MOJOM_VALIDATION_UNEXPECTED_ARRAY_HEADER ((MojomValidationResult)4)
-// An encoded handle is illegal.
-#define MOJOM_VALIDATION_ILLEGAL_HANDLE ((MojomValidationResult)5)
-// A non-nullable handle field is set to invalid handle.
-#define MOJOM_VALIDATION_UNEXPECTED_INVALID_HANDLE ((MojomValidationResult)6)
-// An encoded pointer is illegal.
-#define MOJOM_VALIDATION_ILLEGAL_POINTER ((MojomValidationResult)7)
-// A non-nullable pointer field is set to null.
-#define MOJOM_VALIDATION_UNEXPECTED_NULL_POINTER ((MojomValidationResult)8)
-// |flags| in the message header is invalid. The flags are either
-// inconsistent with one another, inconsistent with other parts of the
-// message, or unexpected for the message receiver. For example the
-// receiver is expecting a request message but the flags indicate that
-// the message is a response message.
-#define MOJOM_VALIDATION_MESSAGE_HEADER_INVALID_FLAGS ((MojomValidationResult)9)
-// |flags| in the message header indicates that a request ID is required but
-// there isn't one.
-#define MOJOM_VALIDATION_MESSAGE_HEADER_MISSING_REQUEST_ID \
- ((MojomValidationResult)10)
-// The |name| field in a message header contains an unexpected value.
-#define MOJOM_VALIDATION_MESSAGE_HEADER_UNKNOWN_METHOD \
- ((MojomValidationResult)11)
-// Two parallel arrays which are supposed to represent a map have different
-// lengths.
-#define MOJOM_VALIDATION_DIFFERENT_SIZED_ARRAYS_IN_MAP \
- ((MojomValidationResult)12)
-// A non-nullable union is set to null. (Has size 0)
-#define MOJOM_VALIDATION_UNEXPECTED_NULL_UNION ((MojomValidationResult)13)
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_VALIDATION_H_
diff --git a/c/include/mojo/environment/async_waiter.h b/c/include/mojo/environment/async_waiter.h
deleted file mode 100644
index 461bafb..0000000
--- a/c/include/mojo/environment/async_waiter.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_ENVIRONMENT_ASYNC_WAITER_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_ENVIRONMENT_ASYNC_WAITER_H_
-
-#include <mojo/macros.h>
-#include <mojo/result.h>
-#include <mojo/system/handle.h>
-#include <mojo/system/time.h>
-#include <stdint.h>
-
-typedef uint64_t MojoAsyncWaitID;
-MOJO_STATIC_ASSERT(sizeof(uintptr_t) <= sizeof(uint64_t),
- "uintptr_t larger than uint64_t!");
-
-typedef void (*MojoAsyncWaitCallback)(void* closure, MojoResult result);
-
-// Functions for asynchronously waiting (and cancelling asynchronous waits) on a
-// handle.
-//
-// Thread-safety:
-// - |CancelWait(wait_id)| may only be called on the same thread as the
-// |AsyncWait()| that provided |wait_id| was called on.
-// - A given |MojoAsyncWaiter|'s functions may only be called on the thread(s)
-// that it is defined to be valid on (typically including the thread on
-// which the |MojoAsyncWaiter| was provided). E.g., a library may require
-// initialization with a single |MojoAsyncWaiter| and stipulate that it only
-// be used on threads on which that |MojoAsyncWaiter| is valid.
-// - If a |MojoAsyncWaiter| is valid on multiple threads, then its functions
-// must be thread-safe (subject to the first restriction above).
-struct MojoAsyncWaiter {
- // Arranges for |callback| to be called on the current thread at some future
- // when |handle| satisfies |signals| or it is known that it will never satisfy
- // |signals| (with the same behavior as |MojoWait()|).
- //
- // |callback| will not be called in the nested context of |AsyncWait()|, but
- // only, e.g., from some run loop. |callback| is provided with the |closure|
- // argument as well as the result of the wait. For each call to |AsyncWait()|,
- // |callback| will be called at most once.
- //
- // |handle| must not be closed or transferred (via |MojoWriteMessage()|; this
- // is equivalent to closing the handle) until either the callback has been
- // executed or the async wait has been cancelled using the returned (nonzero)
- // |MojoAsyncWaitID| (see |CancelWait()|). Otherwise, an invalid (or, worse,
- // re-used) handle may be waited on by the implementation of this
- // |MojoAsyncWaiter|.
- //
- // Note that once the callback has been called, the returned |MojoAsyncWaitID|
- // becomes invalid.
- MojoAsyncWaitID (*AsyncWait)(MojoHandle handle,
- MojoHandleSignals signals,
- MojoDeadline deadline,
- MojoAsyncWaitCallback callback,
- void* closure);
-
- // Cancels an outstanding async wait (specified by |wait_id|) initiated by
- // |AsyncWait()|. This may only be called from the same thread on which the
- // corresponding |AsyncWait()| was called, and may only be called if the
- // callback to |AsyncWait()| has not been called.
- //
- // Once this has been called, the callback provided to |AsyncWait()| will not
- // be called. Moreover, it is then immediately safe to close or transfer the
- // handle provided to |AsyncWait()|. (I.e., the implementation of this
- // |MojoAsyncWaiter| will no longer wait on, or do anything else with, the
- // handle.)
- void (*CancelWait)(MojoAsyncWaitID wait_id);
-};
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_ENVIRONMENT_ASYNC_WAITER_H_
diff --git a/c/include/mojo/environment/logger.h b/c/include/mojo/environment/logger.h
deleted file mode 100644
index 670879a..0000000
--- a/c/include/mojo/environment/logger.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_ENVIRONMENT_LOGGER_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_ENVIRONMENT_LOGGER_H_
-
-#include <stdint.h>
-
-// |MojoLogLevel|: Used to specify the type of log message. Values are ordered
-// by severity (i.e., higher numerical values are more severe).
-
-typedef int32_t MojoLogLevel;
-
-#ifdef __cplusplus
-const MojoLogLevel MOJO_LOG_LEVEL_VERBOSE = -1;
-const MojoLogLevel MOJO_LOG_LEVEL_INFO = 0;
-const MojoLogLevel MOJO_LOG_LEVEL_WARNING = 1;
-const MojoLogLevel MOJO_LOG_LEVEL_ERROR = 2;
-const MojoLogLevel MOJO_LOG_LEVEL_FATAL = 3;
-#else
-#define MOJO_LOG_LEVEL_VERBOSE ((MojoLogLevel)-1)
-#define MOJO_LOG_LEVEL_INFO ((MojoLogLevel)0)
-#define MOJO_LOG_LEVEL_WARNING ((MojoLogLevel)1)
-#define MOJO_LOG_LEVEL_ERROR ((MojoLogLevel)2)
-#define MOJO_LOG_LEVEL_FATAL ((MojoLogLevel)3)
-#endif
-
-// Structure with basic logging functions (on top of which more friendly logging
-// macros may be built). The functions are thread-safe, except for
-// |SetMinimumLogLevel()| (see below).
-struct MojoLogger {
- // Logs |message| (which must not be null) at level |log_level| if |log_level|
- // is at least the current minimum log level. If |log_level| is
- // |MOJO_LOG_LEVEL_FATAL| (or greater), aborts the application/process.
- // |source_file| and |source_line| indicate the source file and (1-based) line
- // number, respectively; they are optional: |source_file| may be null and
- // |source_line| may be zero (if |source_file| is null, then |source_line| may
- // be ignored).
- void (*LogMessage)(MojoLogLevel log_level,
- const char* source_file,
- uint32_t source_line,
- const char* message);
-
- // Gets the minimum log level (see above), which will always be at most
- // |MOJO_LOG_LEVEL_FATAL|. (Though |LogMessage()| will automatically avoid
- // logging messages below the minimum log level, this may be used to avoid
- // extra work.)
- MojoLogLevel (*GetMinimumLogLevel)(void);
-
- // Sets the minimum log level (see above) to the lesser of |minimum_log_level|
- // and |MOJO_LOG_LEVEL_FATAL|.
- //
- // Warning: This function may not be thread-safe, and should not be called
- // concurrently with other |MojoLogger| functions. (In some environments --
- // such as Chromium -- that share a logger across applications, this may mean
- // that it is almost never safe to call this.)
- void (*SetMinimumLogLevel)(MojoLogLevel minimum_log_level);
-};
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_ENVIRONMENT_LOGGER_H_
diff --git a/c/include/mojo/macros.h b/c/include/mojo/macros.h
deleted file mode 100644
index 886ed04..0000000
--- a/c/include/mojo/macros.h
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_MACROS_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_MACROS_H_
-
-#include <stddef.h>
-
-// Annotate a variable indicating it's okay if it's unused.
-// Use like:
-// int x = ...;
-// MOJO_ALLOW_UNUSED_LOCAL(x);
-#define MOJO_ALLOW_UNUSED_LOCAL(x) false ? (void)x : (void)0
-
-// Annotate a function indicating that the caller must examine the return value.
-// Use like:
-// int foo() MOJO_WARN_UNUSED_RESULT;
-// Note that it can only be used on the prototype, and not the definition.
-#if defined(__GNUC__)
-#define MOJO_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
-#else
-#define MOJO_WARN_UNUSED_RESULT
-#endif
-
-// Assert things at compile time. (|msg| should be a valid identifier name.)
-// Use like:
-// MOJO_STATIC_ASSERT(sizeof(Foo) == 12, "Foo has invalid size");
-#if defined(__cplusplus)
-#define MOJO_STATIC_ASSERT(expr, msg) static_assert(expr, msg)
-#else
-#define MOJO_STATIC_ASSERT(expr, msg) _Static_assert(expr, msg)
-#endif
-
-// Like the C++11 |alignof| operator.
-#if defined(__cplusplus) && __cplusplus >= 201103L
-#define MOJO_ALIGNOF(type) alignof(type)
-#elif defined(__GNUC__)
-#define MOJO_ALIGNOF(type) __alignof__(type)
-#elif defined(_MSC_VER)
-// The use of |sizeof| is to work around a bug in MSVC 2010 (see
-// http://goo.gl/isH0C; supposedly fixed since then).
-#define MOJO_ALIGNOF(type) (sizeof(type) - sizeof(type) + __alignof(type))
-#else
-#error "Please define MOJO_ALIGNOF() for your compiler."
-#endif
-
-// Specify the alignment of a |struct|, etc.
-// Use like:
-// struct MOJO_ALIGNAS(8) Foo { ... };
-// Unlike the C++11 |alignas()|, |alignment| must be an integer. It may not be a
-// type, nor can it be an expression like |MOJO_ALIGNOF(type)| (due to the
-// non-C++11 MSVS version).
-#if defined(__cplusplus) && __cplusplus >= 201103L
-#define MOJO_ALIGNAS(alignment) alignas(alignment)
-#elif defined(__GNUC__)
-#define MOJO_ALIGNAS(alignment) __attribute__((aligned(alignment)))
-#elif defined(_MSC_VER)
-#define MOJO_ALIGNAS(alignment) __declspec(align(alignment))
-#else
-#error "Please define MOJO_ALIGNAS() for your compiler."
-#endif
-
-// Use these to declare functions in C header files so that they'll be usable
-// from C++.
-#if defined(__cplusplus)
-#define MOJO_BEGIN_EXTERN_C extern "C" {
-#define MOJO_END_EXTERN_C }
-#else
-#define MOJO_BEGIN_EXTERN_C
-#define MOJO_END_EXTERN_C
-#endif
-
-// Use |MOJO_RESTRICT| (in C function declarations) in place of C99's
-// |restrict|, to work properly with C++. (It allows certain optimizations, but
-// more importantly it serves a documentary purpose for the caller.)
-//
-// Recommendation: If a function has multiple pointer parameters at least one of
-// which is to non-const, then all the pointer parameters should be declared
-// using |MOJO_RESTRICT| unless aliasing is explicitly allowed.
-#if defined(__GNUC__) || defined(_MSC_VER)
-// Use |__restrict|, since it works both in C++ and when compiling as C90
-// (|restrict| is only available in C99 and later, and never in C++).
-#define MOJO_RESTRICT __restrict
-#else
-#error "Please define MOJO_RESTRICT for your compiler."
-#endif
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_MACROS_H_
diff --git a/c/include/mojo/result.h b/c/include/mojo/result.h
deleted file mode 100644
index def3792..0000000
--- a/c/include/mojo/result.h
+++ /dev/null
@@ -1,217 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file contains the definition of |MojoResult| and related macros.
-//
-// Note: This header should be compilable as C.
-//
-// TODO(vtl): Should separate out "system" error space stuff to a separate
-// header, mojo/system/result.h.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_RESULT_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_RESULT_H_
-
-#include <stdint.h>
-
-// |MojoResult|: A type to hold error codes, which are composed of a generic
-// portion (the base error code) and a more specific portion (the error subcode
-// and the error space).
-//
-// The format of a |MojoResult| is, bitwise (least significant bits on the
-// right):
-//
-// sSSSSSSSSSSSSSSSeeeeeeeeeeeeEEEE
-//
-// where:
-// - EEEE is the base error code (4 bits, 0-15);
-// - eeeeeeeeeeee is the error subcode (12 bits, 0-4095); and
-// - sSSSSSSSSSSSSSSS (16 bits, 0-65535) is the error space.
-//
-// The meaning of the base error codes is always the same. |MOJO_ERROR_CODE_OK|,
-// 0, always means "OK"; for this case, both the error subcode and error space
-// must also be 0. See the definitions of the |MOJO_ERROR_CODE_...| below for
-// information on the other base error codes.
-//
-// The meaning of the error subcode depends on both the error space and also the
-// base error code, though |MOJO_ERROR_SUBCODE_GENERIC|, 0, always means
-// "generic"/"unspecified".
-//
-// The error space gives meaning to error subcodes:
-// - Error spaces with the high ('s') bit set (i.e., greater than or equal to
-// 32768) are reserved for private use, i.e., should not be used in public
-// interfaces.
-// - Error spaces without the high bit set are assigned "centrally", with
-// error subcodes within them assigned by their "owners". (TODO(vtl): Figure
-// out what all of this means.)
-// - |MOJO_ERROR_SPACE_SYSTEM|, 0, is the system/generic error space. Error
-// subcodes for this error space are assigned below.
-
-typedef uint32_t MojoResult;
-
-// |MOJO_RESULT_MAKE()|: Helper macro to make a |MojoResult| from the base error
-// code, the error space, and the error subcode.
-#define MOJO_RESULT_MAKE(base_error_code, error_space, error_subcode) \
- ((base_error_code) | ((error_space) << 16u) | ((error_subcode) << 4u))
-
-// |MOJO_RESULT_GET_{CODE,SPACE,SUBCODE}()|: Helper macros to get the base error
-// code, the error space, and the error subcode from a |MojoResult|.
-#define MOJO_RESULT_GET_CODE(result) ((result) & ((MojoResult)0xfu))
-#define MOJO_RESULT_GET_SPACE(result) \
- (((result) & ((MojoResult)0xffff0000u)) >> 16u)
-#define MOJO_RESULT_GET_SUBCODE(result) \
- (((result) & ((MojoResult)0xfff0u)) >> 4u)
-
-// Base error codes ------------------------------------------------------------
-
-// The base error code indicates the general type of error (as described below).
-// For non-success codes, additional information may be conveyed via the error
-// space and error subcodes (for |MOJO_ERROR_CODE_OK|, the error space and error
-// subcode must be zero):
-// |MOJO_ERROR_CODE_OK| - Not an error; returned on success.
-// |MOJO_ERROR_CODE_CANCELLED| - Operation was cancelled, typically by the
-// caller.
-// |MOJO_ERROR_CODE_UNKNOWN| - Unknown error (e.g., if not enough information
-// is available for a more specific error).
-// |MOJO_ERROR_CODE_INVALID_ARGUMENT| - Caller specified an invalid argument.
-// This differs from |MOJO_ERROR_CODE_FAILED_PRECONDITION| in that the
-// former indicates arguments that are invalid regardless of the state of
-// the system.
-// |MOJO_ERROR_CODE_DEADLINE_EXCEEDED| - Deadline expired before the operation
-// could complete.
-// |MOJO_ERROR_CODE_NOT_FOUND| - Some requested entity was not found (i.e.,
-// does not exist).
-// |MOJO_ERROR_CODE_ALREADY_EXISTS| - Some entity or condition that we
-// attempted to create already exists.
-// |MOJO_ERROR_CODE_PERMISSION_DENIED| - The caller does not have permission
-// to for the operation (use |MOJO_ERROR_CODE_RESOURCE_EXHAUSTED| for
-// rejections caused by exhausting some resource instead).
-// |MOJO_ERROR_CODE_RESOURCE_EXHAUSTED| - Some resource required for the call
-// (possibly some quota) has been exhausted.
-// |MOJO_ERROR_CODE_FAILED_PRECONDITION| - The system is not in a state
-// required for the operation (use this if the caller must do something to
-// rectify the state before retrying).
-// |MOJO_ERROR_CODE_ABORTED| - The operation was aborted by the system,
-// possibly due to a concurrency issue (use this if the caller may retry
-// at a higher level).
-// |MOJO_ERROR_CODE_OUT_OF_RANGE| - The operation was attempted past the valid
-// range. Unlike |MOJO_ERROR_CODE_INVALID_ARGUMENT|, this indicates that
-// the operation may be/become valid depending on the system state. (This
-// error is similar to |MOJO_ERROR_CODE_FAILED_PRECONDITION|, but is more
-// specific.)
-// |MOJO_ERROR_CODE_UNIMPLEMENTED| - The operation is not implemented,
-// supported, or enabled.
-// |MOJO_ERROR_CODE_INTERNAL| - Internal error: this should never happen and
-// indicates that some invariant expected by the system has been broken.
-// |MOJO_ERROR_CODE_UNAVAILABLE| - The operation is (temporarily) currently
-// unavailable. The caller may simply retry the operation (possibly with a
-// backoff).
-// |MOJO_ERROR_CODE_DATA_LOSS| - Unrecoverable data loss or corruption.
-//
-// The codes correspond to Google3's canonical error codes.
-
-#define MOJO_ERROR_CODE_OK ((MojoResult)0x0u)
-#define MOJO_ERROR_CODE_CANCELLED ((MojoResult)0x1u)
-#define MOJO_ERROR_CODE_UNKNOWN ((MojoResult)0x2u)
-#define MOJO_ERROR_CODE_INVALID_ARGUMENT ((MojoResult)0x3u)
-#define MOJO_ERROR_CODE_DEADLINE_EXCEEDED ((MojoResult)0x4u)
-#define MOJO_ERROR_CODE_NOT_FOUND ((MojoResult)0x5u)
-#define MOJO_ERROR_CODE_ALREADY_EXISTS ((MojoResult)0x6u)
-#define MOJO_ERROR_CODE_PERMISSION_DENIED ((MojoResult)0x7u)
-#define MOJO_ERROR_CODE_RESOURCE_EXHAUSTED ((MojoResult)0x8u)
-#define MOJO_ERROR_CODE_FAILED_PRECONDITION ((MojoResult)0x9u)
-#define MOJO_ERROR_CODE_ABORTED ((MojoResult)0xau)
-#define MOJO_ERROR_CODE_OUT_OF_RANGE ((MojoResult)0xbu)
-#define MOJO_ERROR_CODE_UNIMPLEMENTED ((MojoResult)0xcu)
-#define MOJO_ERROR_CODE_INTERNAL ((MojoResult)0xdu)
-#define MOJO_ERROR_CODE_UNAVAILABLE ((MojoResult)0xeu)
-#define MOJO_ERROR_CODE_DATA_LOSS ((MojoResult)0xfu)
-
-// System/generic error space --------------------------------------------------
-
-#define MOJO_ERROR_SPACE_SYSTEM ((MojoResult)0x0000u)
-
-// Common/generic subcode, valid for all error codes:
-// |MOJO_ERROR_SUBCODE_GENERIC| - No additional details about the error are
-// specified.
-#define MOJO_ERROR_SUBCODE_GENERIC ((MojoResult)0x000u)
-
-// Subcodes valid for |MOJO_ERROR_CODE_FAILED_PRECONDITION|:
-// |MOJO_ERROR_CODE_FAILED_PRECONDITION_SUBCODE_BUSY| - One of the resources
-// involved is currently being used (possibly on another thread) in a way
-// that prevents the current operation from proceeding, e.g., if the other
-// operation may result in the resource being invalidated. TODO(vtl): We
-// should probably get rid of this, and report "invalid argument" instead
-// (with a different subcode scheme). This is here now for ease of
-// conversion with the existing |MOJO_RESULT_BUSY|.
-#define MOJO_ERROR_CODE_FAILED_PRECONDITION_SUBCODE_BUSY ((MojoResult)0x001u)
-
-// Subcodes valid for MOJO_ERROR_CODE_UNAVAILABLE:
-// |MOJO_ERROR_CODE_UNAVAILABLE_SUBCODE_SHOULD_WAIT| - The request cannot
-// currently be completed (e.g., if the data requested is not yet
-// available). The caller should wait for it to be feasible using one of
-// the wait primitives.
-#define MOJO_ERROR_CODE_UNAVAILABLE_SUBCODE_SHOULD_WAIT ((MojoResult)0x001u)
-
-// Complete results:
-
-// Generic results:
-#define MOJO_RESULT_OK \
- MOJO_RESULT_MAKE(MOJO_ERROR_CODE_OK, MOJO_ERROR_SPACE_SYSTEM, \
- MOJO_ERROR_SUBCODE_GENERIC)
-#define MOJO_RESULT_CANCELLED \
- MOJO_RESULT_MAKE(MOJO_ERROR_CODE_CANCELLED, MOJO_ERROR_SPACE_SYSTEM, \
- MOJO_ERROR_SUBCODE_GENERIC)
-#define MOJO_RESULT_UNKNOWN \
- MOJO_RESULT_MAKE(MOJO_ERROR_CODE_UNKNOWN, MOJO_ERROR_SPACE_SYSTEM, \
- MOJO_ERROR_SUBCODE_GENERIC)
-#define MOJO_RESULT_INVALID_ARGUMENT \
- MOJO_RESULT_MAKE(MOJO_ERROR_CODE_INVALID_ARGUMENT, MOJO_ERROR_SPACE_SYSTEM, \
- MOJO_ERROR_SUBCODE_GENERIC)
-#define MOJO_RESULT_DEADLINE_EXCEEDED \
- MOJO_RESULT_MAKE(MOJO_ERROR_CODE_DEADLINE_EXCEEDED, MOJO_ERROR_SPACE_SYSTEM, \
- MOJO_ERROR_SUBCODE_GENERIC)
-#define MOJO_RESULT_NOT_FOUND \
- MOJO_RESULT_MAKE(MOJO_ERROR_CODE_NOT_FOUND, MOJO_ERROR_SPACE_SYSTEM, \
- MOJO_ERROR_SUBCODE_GENERIC)
-#define MOJO_RESULT_ALREADY_EXISTS \
- MOJO_RESULT_MAKE(MOJO_ERROR_CODE_ALREADY_EXISTS, MOJO_ERROR_SPACE_SYSTEM, \
- MOJO_ERROR_SUBCODE_GENERIC)
-#define MOJO_RESULT_PERMISSION_DENIED \
- MOJO_RESULT_MAKE(MOJO_ERROR_CODE_PERMISSION_DENIED, MOJO_ERROR_SPACE_SYSTEM, \
- MOJO_ERROR_SUBCODE_GENERIC)
-#define MOJO_RESULT_RESOURCE_EXHAUSTED \
- MOJO_RESULT_MAKE(MOJO_ERROR_CODE_RESOURCE_EXHAUSTED, \
- MOJO_ERROR_SPACE_SYSTEM, MOJO_ERROR_SUBCODE_GENERIC)
-#define MOJO_RESULT_FAILED_PRECONDITION \
- MOJO_RESULT_MAKE(MOJO_ERROR_CODE_FAILED_PRECONDITION, \
- MOJO_ERROR_SPACE_SYSTEM, MOJO_ERROR_SUBCODE_GENERIC)
-#define MOJO_RESULT_ABORTED \
- MOJO_RESULT_MAKE(MOJO_ERROR_CODE_ABORTED, MOJO_ERROR_SPACE_SYSTEM, \
- MOJO_ERROR_SUBCODE_GENERIC)
-#define MOJO_RESULT_OUT_OF_RANGE \
- MOJO_RESULT_MAKE(MOJO_ERROR_CODE_OUT_OF_RANGE, MOJO_ERROR_SPACE_SYSTEM, \
- MOJO_ERROR_SUBCODE_GENERIC)
-#define MOJO_RESULT_UNIMPLEMENTED \
- MOJO_RESULT_MAKE(MOJO_ERROR_CODE_UNIMPLEMENTED, MOJO_ERROR_SPACE_SYSTEM, \
- MOJO_ERROR_SUBCODE_GENERIC)
-#define MOJO_RESULT_INTERNAL \
- MOJO_RESULT_MAKE(MOJO_ERROR_CODE_INTERNAL, MOJO_ERROR_SPACE_SYSTEM, \
- MOJO_ERROR_SUBCODE_GENERIC)
-#define MOJO_RESULT_UNAVAILABLE \
- MOJO_RESULT_MAKE(MOJO_ERROR_CODE_UNAVAILABLE, MOJO_ERROR_SPACE_SYSTEM, \
- MOJO_ERROR_SUBCODE_GENERIC)
-#define MOJO_RESULT_DATA_LOSS \
- MOJO_RESULT_MAKE(MOJO_ERROR_CODE_DATA_LOSS, MOJO_ERROR_SPACE_SYSTEM, \
- MOJO_ERROR_SUBCODE_GENERIC)
-
-// Specific results (for backwards compatibility):
-#define MOJO_RESULT_BUSY \
- MOJO_RESULT_MAKE(MOJO_ERROR_CODE_FAILED_PRECONDITION, \
- MOJO_ERROR_SPACE_SYSTEM, \
- MOJO_ERROR_CODE_FAILED_PRECONDITION_SUBCODE_BUSY)
-#define MOJO_RESULT_SHOULD_WAIT \
- MOJO_RESULT_MAKE(MOJO_ERROR_CODE_UNAVAILABLE, MOJO_ERROR_SPACE_SYSTEM, \
- MOJO_ERROR_CODE_UNAVAILABLE_SUBCODE_SHOULD_WAIT)
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_RESULT_H_
diff --git a/c/include/mojo/system/buffer.h b/c/include/mojo/system/buffer.h
deleted file mode 100644
index 7c9ea43..0000000
--- a/c/include/mojo/system/buffer.h
+++ /dev/null
@@ -1,236 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file contains types/constants and functions specific to buffers (and in
-// particular shared buffers).
-// TODO(vtl): Reorganize this file (etc.) to separate general buffer functions
-// from (shared) buffer creation.
-//
-// Note: This header should be compilable as C.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_BUFFER_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_BUFFER_H_
-
-#include <mojo/macros.h>
-#include <mojo/result.h>
-#include <mojo/system/handle.h>
-
-// |MojoCreateSharedBufferOptions|: Used to specify creation parameters for a
-// shared buffer to |MojoCreateSharedBuffer()|.
-// |uint32_t struct_size|: Set to the size of the
-// |MojoCreateSharedBufferOptions| struct. (Used to allow for future
-// extensions.)
-// |MojoCreateSharedBufferOptionsFlags flags|: Reserved for future use.
-// |MOJO_CREATE_SHARED_BUFFER_OPTIONS_FLAG_NONE|: No flags; default mode.
-//
-// TODO(vtl): Maybe add a flag to indicate whether the memory should be
-// executable or not?
-// TODO(vtl): Also a flag for discardable (ashmem-style) buffers.
-
-typedef uint32_t MojoCreateSharedBufferOptionsFlags;
-
-#define MOJO_CREATE_SHARED_BUFFER_OPTIONS_FLAG_NONE \
- ((MojoCreateSharedBufferOptionsFlags)0)
-
-MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment");
-struct MOJO_ALIGNAS(8) MojoCreateSharedBufferOptions {
- uint32_t struct_size;
- MojoCreateSharedBufferOptionsFlags flags;
-};
-MOJO_STATIC_ASSERT(sizeof(struct MojoCreateSharedBufferOptions) == 8,
- "MojoCreateSharedBufferOptions has wrong size");
-
-// |MojoDuplicateBufferHandleOptions|: Used to specify parameters in duplicating
-// access to a buffer to |MojoDuplicateBufferHandle()|.
-// |uint32_t struct_size|: Set to the size of the
-// |MojoDuplicateBufferHandleOptions| struct. (Used to allow for future
-// extensions.)
-// |MojoDuplicateBufferHandleOptionsFlags flags|: Reserved for future use.
-// |MOJO_DUPLICATE_BUFFER_HANDLE_OPTIONS_FLAG_NONE|: No flags; default
-// mode.
-//
-// TODO(vtl): Add flags to remove writability (and executability)? Also, COW?
-
-typedef uint32_t MojoDuplicateBufferHandleOptionsFlags;
-
-#define MOJO_DUPLICATE_BUFFER_HANDLE_OPTIONS_FLAG_NONE \
- ((MojoDuplicateBufferHandleOptionsFlags)0)
-
-struct MOJO_ALIGNAS(8) MojoDuplicateBufferHandleOptions {
- uint32_t struct_size;
- MojoDuplicateBufferHandleOptionsFlags flags;
-};
-MOJO_STATIC_ASSERT(sizeof(struct MojoDuplicateBufferHandleOptions) == 8,
- "MojoDuplicateBufferHandleOptions has wrong size");
-
-// |MojoBufferInformation|: Used to provide information about a buffer (see
-// |MojoGetBufferInformation()|.
-// |uint32_t struct_size|: Set to the size of the |MojoBufferInformation|
-// struct. (Used to allow for future extensions.)
-// |MojoBufferInformationFlags flags|: Reserved for future use.
-// |uint64_t num_bytes|: Size of the buffer.
-//
-// TODO(vtl): Add flags to indicate writability, etc.? Also, type of buffer?
-
-typedef uint32_t MojoBufferInformationFlags;
-
-#define MOJO_BUFFER_INFORMATION_FLAG_NONE ((MojoBufferInformationFlags)0)
-
-struct MOJO_ALIGNAS(8) MojoBufferInformation {
- uint32_t struct_size;
- MojoBufferInformationFlags flags;
- uint64_t num_bytes;
-};
-MOJO_STATIC_ASSERT(sizeof(struct MojoBufferInformation) == 16,
- "MojoBufferInformation has wrong size");
-
-// |MojoMapBufferFlags|: Used to specify different modes to |MojoMapBuffer()|.
-// |MOJO_MAP_BUFFER_FLAG_NONE| - No flags; default mode.
-
-typedef uint32_t MojoMapBufferFlags;
-
-#define MOJO_MAP_BUFFER_FLAG_NONE ((MojoMapBufferFlags)0)
-
-MOJO_BEGIN_EXTERN_C
-
-// |MojoCreateSharedBuffer()|: Creates a buffer of size |num_bytes| bytes that
-// can be shared between applications (by duplicating the handle -- see
-// |MojoDuplicateBufferHandle()| -- and passing it over a message pipe). To
-// access the buffer, one must call |MojoMapBuffer()|.
-//
-// |options| may be set to null for a shared buffer with the default options.
-//
-// On success, |*shared_buffer_handle| will be set to the handle for the shared
-// buffer. (On failure, it is not modified.) The handle has (at least) the
-// following rights: |MOJO_HANDLE_RIGHT_DUPLICATE|,
-// |MOJO_HANDLE_RIGHT_TRANSFER|, |MOJO_HANDLE_RIGHT_GET_OPTIONS|,
-// |MOJO_HANDLE_RIGHT_SET_OPTIONS|, |MOJO_HANDLE_RIGHT_MAP_READABLE|,
-// |MOJO_HANDLE_RIGHT_MAP_WRITABLE|, and |MOJO_HANDLE_RIGHT_MAP_EXECUTABLE|.
-//
-// Note: While more than |num_bytes| bytes may apparently be
-// available/visible/readable/writable, trying to use those extra bytes is
-// undefined behavior.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if some argument was invalid (e.g.,
-// |*options| is invalid).
-// |MOJO_RESULT_RESOURCE_EXHAUSTED| if a process/system/quota/etc. limit has
-// been reached (e.g., if the requested size was too large, or if the
-// maximum number of handles was exceeded).
-// |MOJO_RESULT_UNIMPLEMENTED| if an unsupported flag was set in |*options|.
-MojoResult MojoCreateSharedBuffer(
- const struct MojoCreateSharedBufferOptions* MOJO_RESTRICT
- options, // Optional in.
- uint64_t num_bytes, // In.
- MojoHandle* MOJO_RESTRICT shared_buffer_handle); // Out.
-
-// DEPRECATED: Use |MojoDuplicateHandle[WithReducedRights]()| instead.
-// TODO(vtl): Remove this function.
-//
-// |MojoDuplicateBufferHandle()|: Duplicates the handle |buffer_handle| (which
-// must have the |MOJO_HANDLE_RIGHT_DUPLICATE| right) to a buffer. This creates
-// another handle (returned in |*new_buffer_handle| on success), which can then
-// be sent to another application over a message pipe, while retaining access to
-// the |buffer_handle| (and any mappings that it may have).
-//
-// |options| may be set to null to duplicate the buffer handle with the default
-// options.
-//
-// On success, |*shared_buffer_handle| will be set to the handle for the new
-// buffer handle. (On failure, it is not modified.)
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if some argument was invalid (e.g.,
-// |buffer_handle| is not a valid buffer handle or |*options| is invalid).
-// |MOJO_RESULT_PERMISSION_DENIED| if |buffer_handle| does not have the
-// |MOJO_HANDLE_RIGHT_DUPLICATE| right.
-// |MOJO_RESULT_UNIMPLEMENTED| if an unsupported flag was set in |*options|.
-// |MOJO_RESULT_BUSY| if |buffer_handle| is currently in use in some
-// transaction (that, e.g., may result in it being invalidated, such as
-// being sent in a message).
-MojoResult MojoDuplicateBufferHandle(
- MojoHandle buffer_handle, // In.
- const struct MojoDuplicateBufferHandleOptions* MOJO_RESTRICT
- options, // Optional in.
- MojoHandle* MOJO_RESTRICT new_buffer_handle); // Out.
-
-// |MojoGetBufferInformation()|: Gets information about the buffer with handle
-// |buffer_handle| (which must have the |MOJO_HANDLE_RIGHT_GET_OPTIONS| right).
-// |info| should be non-null and point to a buffer of size |info_num_bytes|;
-// |info_num_bytes| should be at least 16 (the size of the first, and currently
-// only, version of |struct MojoBufferInformation|).
-//
-// On success, |*info| will be filled with information about the given buffer.
-// Note that if additional (larger) versions of |struct MojoBufferInformation|
-// are defined, the largest version permitted by |info_num_bytes| that is
-// supported by the implementation will be filled. Callers expecting more than
-// the first 16-byte version must check the resulting |info->struct_size|.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if some argument was invalid (e.g.,
-// |buffer_handle| is not a valid buffer handle, |*info| is null, or
-// |info_num_bytes| is too small).
-// |MOJO_RESULT_PERMISSION_DENIED| if |buffer_handle| does not have the
-// |MOJO_HANDLE_RIGHT_GET_OPTIONS| right.
-// |MOJO_RESULT_BUSY| if |buffer_handle| is currently in use in some
-// transaction (that, e.g., may result in it being invalidated, such as
-// being sent in a message).
-MojoResult MojoGetBufferInformation(MojoHandle buffer_handle, // In.
- struct MojoBufferInformation* info, // Out.
- uint32_t info_num_bytes); // In.
-
-// |MojoMapBuffer()|: Maps the part (at offset |offset| of length |num_bytes|)
-// of the buffer given by |buffer_handle| (which must have both the
-// |MOJO_HANDLE_RIGHT_MAP_READABLE| and |MOJO_HANDLE_RIGHT_MAP_WRITABLE| rights)
-// into memory, with options specified by |flags|. |offset + num_bytes| must be
-// less than or equal to the size of the buffer. On success, |*buffer| points to
-// memory with the requested part of the buffer. (On failure, it is not
-// modified.)
-//
-// A single buffer handle may have multiple active mappings (possibly depending
-// on the buffer type). The permissions (e.g., writable or executable) of the
-// returned memory may depend on the properties of the buffer and properties
-// attached to the buffer handle as well as |flags|.
-//
-// Note: Though data outside the specified range may apparently be
-// available/visible/readable/writable, trying to use those extra bytes is
-// undefined behavior.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if some argument was invalid (e.g.,
-// |buffer_handle| is not a valid buffer handle or the range specified by
-// |offset| and |num_bytes| is not valid).
-// |MOJO_RESULT_PERMISSION_DENIED| if |buffer_handle| does not have both the
-// |MOJO_HANDLE_RIGHT_MAP_READABLE| and |MOJO_HANDLE_RIGHT_MAP_WRITABLE|
-// rights.
-// |MOJO_RESULT_RESOURCE_EXHAUSTED| if the mapping operation itself failed
-// (e.g., due to not having appropriate address space available).
-// |MOJO_RESULT_BUSY| if |buffer_handle| is currently in use in some
-// transaction (that, e.g., may result in it being invalidated, such as
-// being sent in a message).
-MojoResult MojoMapBuffer(MojoHandle buffer_handle, // In.
- uint64_t offset, // In.
- uint64_t num_bytes, // In.
- void** buffer, // Out.
- MojoMapBufferFlags flags); // In.
-
-// |MojoUnmapBuffer()|: Unmaps a buffer pointer that was mapped by
-// |MojoMapBuffer()|. |buffer| must have been the result of |MojoMapBuffer()|
-// (not some other pointer inside the mapped memory), and the entire mapping
-// will be removed (partial unmapping is not supported). A mapping may only be
-// unmapped once.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if |buffer| is invalid (e.g., is not the
-// result of |MojoMapBuffer()| or has already been unmapped).
-MojoResult MojoUnmapBuffer(void* buffer); // In.
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_BUFFER_H_
diff --git a/c/include/mojo/system/data_pipe.h b/c/include/mojo/system/data_pipe.h
deleted file mode 100644
index cc16ad3..0000000
--- a/c/include/mojo/system/data_pipe.h
+++ /dev/null
@@ -1,511 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file contains types/constants and functions specific to data pipes.
-//
-// Note: This header should be compilable as C.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_DATA_PIPE_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_DATA_PIPE_H_
-
-#include <mojo/macros.h>
-#include <mojo/result.h>
-#include <mojo/system/handle.h>
-
-// |MojoCreateDataPipeOptions|: Used to specify creation parameters for a data
-// pipe to |MojoCreateDataPipe()|.
-// |uint32_t struct_size|: Set to the size of the |MojoCreateDataPipeOptions|
-// struct. (Used to allow for future extensions.)
-// |MojoCreateDataPipeOptionsFlags flags|: Used to specify different modes of
-// operation.
-// |MOJO_CREATE_DATA_PIPE_OPTIONS_FLAG_NONE|: No flags; default mode.
-// |uint32_t element_num_bytes|: The size of an element, in bytes. All
-// transactions and buffers will consist of an integral number of
-// elements. Must be nonzero.
-// |uint32_t capacity_num_bytes|: The capacity of the data pipe, in number of
-// bytes; must be a multiple of |element_num_bytes|. The data pipe will
-// always be able to queue AT LEAST this much data. Set to zero to opt for
-// a system-dependent automatically-calculated capacity (which will always
-// be at least one element).
-
-typedef uint32_t MojoCreateDataPipeOptionsFlags;
-
-#define MOJO_CREATE_DATA_PIPE_OPTIONS_FLAG_NONE \
- ((MojoCreateDataPipeOptionsFlags)0)
-
-MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment");
-struct MOJO_ALIGNAS(8) MojoCreateDataPipeOptions {
- uint32_t struct_size;
- MojoCreateDataPipeOptionsFlags flags;
- uint32_t element_num_bytes;
- uint32_t capacity_num_bytes;
-};
-MOJO_STATIC_ASSERT(sizeof(struct MojoCreateDataPipeOptions) == 16,
- "MojoCreateDataPipeOptions has wrong size");
-
-// |MojoDataPipeProducerOptions|: Used to specify data pipe producer options (to
-// |MojoSetDataPipeProducerOptions()| and from
-// |MojoGetDataPipeProducerOptions()|).
-// |uint32_t struct_size|: Set to the size of the
-// |MojoDataPipeProducerOptions| struct. (Used to allow for future
-// extensions.)
-// |uint32_t write_threshold_num_bytes|: Set to the minimum amount of space
-// required to be available, in number of bytes, for the handle to be
-// signaled with |MOJO_HANDLE_SIGNAL_WRITE_THRESHOLD|; must be a multiple
-// of the data pipe's element size. Set to zero to opt for the default,
-// which is the size of a single element.
-
-struct MOJO_ALIGNAS(8) MojoDataPipeProducerOptions {
- uint32_t struct_size;
- uint32_t write_threshold_num_bytes;
-};
-MOJO_STATIC_ASSERT(sizeof(struct MojoDataPipeProducerOptions) == 8,
- "MojoDataPipeProducerOptions has wrong size");
-
-// |MojoWriteDataFlags|: Used to specify different modes to |MojoWriteData()|
-// and |MojoBeginWriteData()|.
-// |MOJO_WRITE_DATA_FLAG_NONE| - No flags; default mode.
-// |MOJO_WRITE_DATA_FLAG_ALL_OR_NONE| - Write either all the elements
-// requested or none of them.
-
-typedef uint32_t MojoWriteDataFlags;
-
-#define MOJO_WRITE_DATA_FLAG_NONE ((MojoWriteDataFlags)0)
-#define MOJO_WRITE_DATA_FLAG_ALL_OR_NONE ((MojoWriteDataFlags)1 << 0)
-
-// |MojoDataPipeConsumerOptions|: Used to specify data pipe consumer options (to
-// |MojoSetDataPipeConsumerOptions()| and from
-// |MojoGetDataPipeConsumerOptions()|).
-// |uint32_t struct_size|: Set to the size of the
-// |MojoDataPipeConsumerOptions| struct. (Used to allow for future
-// extensions.)
-// |uint32_t read_threshold_num_bytes|: Set to the minimum number of bytes
-// required to be available for the handle to be signaled with
-// |MOJO_HANDLE_SIGNAL_READ_THRESHOLD|; must be a multiple
-// of the data pipe's element size. Set to zero to opt for the default,
-// which is the size of a single element. Note: If the producer handle is
-// closed with less than this amount of data in the data pipe, the
-// consumer's |MOJO_HANDLE_SIGNAL_READ_THRESHOLD| will be considered
-// unsatisfiable; if there is actually some data remaining in the data
-// pipe, the status of this signal may be changed if this value is
-// modified.
-
-struct MOJO_ALIGNAS(8) MojoDataPipeConsumerOptions {
- uint32_t struct_size;
- uint32_t read_threshold_num_bytes;
-};
-MOJO_STATIC_ASSERT(sizeof(struct MojoDataPipeConsumerOptions) == 8,
- "MojoDataPipeConsumerOptions has wrong size");
-
-// |MojoReadDataFlags|: Used to specify different modes to |MojoReadData()| and
-// |MojoBeginReadData()|.
-// |MOJO_READ_DATA_FLAG_NONE| - No flags; default mode.
-// |MOJO_READ_DATA_FLAG_ALL_OR_NONE| - Read (or discard) either the requested
-// number of elements or none.
-// |MOJO_READ_DATA_FLAG_DISCARD| - Discard (up to) the requested number of
-// elements.
-// |MOJO_READ_DATA_FLAG_QUERY| - Query the number of elements available to
-// read. For use with |MojoReadData()| only. Mutually exclusive with
-// |MOJO_READ_DATA_FLAG_DISCARD|, and |MOJO_READ_DATA_FLAG_ALL_OR_NONE|
-// is ignored if this flag is set.
-// |MOJO_READ_DATA_FLAG_PEEK| - Read elements without removing them. For use
-// with |MojoReadData()| only. Mutually exclusive with
-// |MOJO_READ_DATA_FLAG_DISCARD| and |MOJO_READ_DATA_FLAG_QUERY|.
-
-typedef uint32_t MojoReadDataFlags;
-
-#define MOJO_READ_DATA_FLAG_NONE ((MojoReadDataFlags)0)
-#define MOJO_READ_DATA_FLAG_ALL_OR_NONE ((MojoReadDataFlags)1 << 0)
-#define MOJO_READ_DATA_FLAG_DISCARD ((MojoReadDataFlags)1 << 1)
-#define MOJO_READ_DATA_FLAG_QUERY ((MojoReadDataFlags)1 << 2)
-#define MOJO_READ_DATA_FLAG_PEEK ((MojoReadDataFlags)1 << 3)
-
-MOJO_BEGIN_EXTERN_C
-
-// |MojoCreateDataPipe()|: Creates a data pipe, which is a unidirectional
-// communication channel for unframed data, with the given options. Data is
-// unframed, but must come as (multiples of) discrete elements, of the size
-// given in |options|. See |MojoCreateDataPipeOptions| for a description of the
-// different options available for data pipes.
-//
-// |options| may be set to null for a data pipe with the default options (which
-// will have an element size of one byte and have some system-dependent
-// capacity).
-//
-// On success, |*data_pipe_producer_handle| will be set to the handle for the
-// producer and |*data_pipe_consumer_handle| will be set to the handle for the
-// consumer. (On failure, they are not modified.) The producer handle will have
-// (at least) the following rights: |MOJO_HANDLE_RIGHT_TRANSFER|,
-// |MOJO_HANDLE_RIGHT_WRITE|, |MOJO_HANDLE_RIGHT_GET_OPTIONS|, and
-// |MOJO_HANDLE_RIGHT_SET_OPTIONS|. The consumer handle will have (at least) the
-// following rights: |MOJO_HANDLE_RIGHT_TRANSFER|, |MOJO_HANDLE_RIGHT_READ|,
-// |MOJO_HANDLE_RIGHT_GET_OPTIONS|, and |MOJO_HANDLE_RIGHT_SET_OPTIONS|
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if some argument was invalid (e.g.,
-// |*options| is invalid).
-// |MOJO_RESULT_RESOURCE_EXHAUSTED| if a process/system/quota/etc. limit has
-// been reached (e.g., if the requested capacity was too large, or if the
-// maximum number of handles was exceeded).
-// |MOJO_RESULT_UNIMPLEMENTED| if an unsupported flag was set in |*options|.
-MojoResult MojoCreateDataPipe(
- const struct MojoCreateDataPipeOptions* MOJO_RESTRICT
- options, // Optional in.
- MojoHandle* MOJO_RESTRICT data_pipe_producer_handle, // Out.
- MojoHandle* MOJO_RESTRICT data_pipe_consumer_handle); // Out.
-
-// TODO(vtl): Probably should have a way of getting the
-// |MojoCreateDataPipeOptions| (maybe just rename it to |MojoDataPipeOptions|?)
-// from either handle as well.
-
-// |MojoSetDataPipeProducerOptions()|: Sets options for the data pipe producer
-// handle |data_pipe_producer_handle| (which must have the
-// |MOJO_HANDLE_RIGHT_SET_OPTIONS| right).
-//
-// |options| may be set to null to reset back to the default options.
-//
-// Note that changing the write threshold may also result in the state (both
-// satisfied or satisfiable) of the |MOJO_HANDLE_SIGNAL_WRITE_THRESHOLD| handle
-// signal being changed.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if some argument was invalid (e.g.,
-// |data_pipe_producer_handle| is not a valid data pipe producer handle or
-// |*options| is invalid).
-// |MOJO_RESULT_PERMISSION_DENIED| if |data_pipe_producer_handle| does not
-// have the |MOJO_HANDLE_RIGHT_SET_OPTIONS| right.
-// |MOJO_RESULT_BUSY| if |data_pipe_producer_handle| is currently in use in
-// some transaction (that, e.g., may result in it being invalidated, such
-// as being sent in a message).
-MojoResult MojoSetDataPipeProducerOptions(
- MojoHandle data_pipe_producer_handle, // In.
- const struct MojoDataPipeProducerOptions* options); // Optional in.
-
-// |MojoGetDataPipeProducerOptions()|: Gets options for the data pipe producer
-// handle |data_pipe_producer_handle| (which must have the
-// |MOJO_HANDLE_RIGHT_GET_OPTIONS| right). |options| should be non-null and
-// point to a buffer of size |options_num_bytes|; |options_num_bytes| should be
-// at least 8 (the size of the first, and currently only, version of
-// |MojoDataPipeProducerOptions|).
-//
-// On success, |*options| will be filled with information about the given
-// buffer. Note that if additional (larger) versions of
-// |MojoDataPipeProducerOptions| are defined, the largest version permitted by
-// |options_num_bytes| that is supported by the implementation will be filled.
-// Callers expecting more than the first 16-byte version must check the
-// resulting |options->struct_size|.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if some argument was invalid (e.g.,
-// |data_pipe_producer_handle| is not a valid data pipe producer handle,
-// |*options| is null, or |options_num_bytes| is too small).
-// |MOJO_RESULT_PERMISSION_DENIED| if |data_pipe_producer_handle| does not
-// have the |MOJO_HANDLE_RIGHT_GET_OPTIONS| right.
-// |MOJO_RESULT_BUSY| if |data_pipe_producer_handle| is currently in use in
-// some transaction (that, e.g., may result in it being invalidated, such
-// as being sent in a message).
-MojoResult MojoGetDataPipeProducerOptions(
- MojoHandle data_pipe_producer_handle, // In.
- struct MojoDataPipeProducerOptions* options, // Out.
- uint32_t options_num_bytes); // In.
-
-// |MojoWriteData()|: Writes the given data to the data pipe producer given by
-// |data_pipe_producer_handle| (which must have the |MOJO_HANDLE_RIGHT_WRITE|
-// right). |elements| points to data of size |*num_bytes|; |*num_bytes| should
-// be a multiple of the data pipe's element size. If
-// |MOJO_WRITE_DATA_FLAG_ALL_OR_NONE| is set in |flags|, either all the data
-// will be written or none is.
-//
-// On success, |*num_bytes| is set to the amount of data that was actually
-// written.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if some argument was invalid (e.g.,
-// |data_pipe_producer_handle| is not a handle to a data pipe producer or
-// |*num_bytes| is not a multiple of the data pipe's element size).
-// |MOJO_RESULT_PERMISSION_DENIED| if |data_pipe_producer_handle| does not
-// have the |MOJO_HANDLE_RIGHT_WRITE| right.
-// |MOJO_RESULT_FAILED_PRECONDITION| if the data pipe consumer handle has been
-// closed.
-// |MOJO_RESULT_OUT_OF_RANGE| if |flags| has
-// |MOJO_WRITE_DATA_FLAG_ALL_OR_NONE| set and the required amount of data
-// (specified by |*num_bytes|) could not be written.
-// |MOJO_RESULT_BUSY| if |data_pipe_producer_handle| is currently in use in
-// some transaction (that, e.g., may result in it being invalidated, such
-// as being sent in a message), or if there is a two-phase write ongoing
-// with |data_pipe_producer_handle| (i.e., |MojoBeginWriteData()| has been
-// called, but not yet the matching |MojoEndWriteData()|).
-// |MOJO_RESULT_SHOULD_WAIT| if no data can currently be written (and the
-// consumer is still open) and |flags| does *not* have
-// |MOJO_WRITE_DATA_FLAG_ALL_OR_NONE| set.
-//
-// TODO(vtl): Should there be a way of querying how much data can be written?
-MojoResult MojoWriteData(MojoHandle data_pipe_producer_handle, // In.
- const void* MOJO_RESTRICT elements, // In.
- uint32_t* MOJO_RESTRICT num_bytes, // In/out.
- MojoWriteDataFlags flags); // In.
-
-// |MojoBeginWriteData()|: Begins a two-phase write to the data pipe producer
-// given by |data_pipe_producer_handle| (which must have the
-// |MOJO_HANDLE_RIGHT_WRITE| right). On success, |*buffer| will be a pointer to
-// which the caller can write |*buffer_num_bytes| bytes of data. There are
-// currently no flags allowed, so |flags| should be |MOJO_WRITE_DATA_FLAG_NONE|.
-//
-// During a two-phase write, |data_pipe_producer_handle| is *not* writable.
-// E.g., if another thread tries to write to it, it will get |MOJO_RESULT_BUSY|;
-// that thread can then wait for |data_pipe_producer_handle| to become writable
-// again.
-//
-// When |MojoBeginWriteData()| returns |MOJO_RESULT_OK|, and the caller has
-// finished writing data to |*buffer|, it should call |MojoEndWriteData()| to
-// specify the amount written and to complete the two-phase write.
-// |MojoEndWriteData()| need not be called for other return values.
-//
-// Note: After a successful |MojoBeginWriteData()| on a given handle and before
-// a corresponding |MojoEndWriteData()|, any operation that invalidates the
-// handle (such as closing the handle, replacing the handle with one with
-// reduced rights, or transferring the handle over a message pipe) will abort
-// the two-phase write. That is, the behavior is equivalent to ending the
-// two-phase write with no data written. That operation will also invalidate the
-// buffer pointer: the behavior if data continues to be written to the buffer is
-// undefined.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if some argument was invalid (e.g.,
-// |data_pipe_producer_handle| is not a handle to a data pipe producer or
-// flags has |MOJO_WRITE_DATA_FLAG_ALL_OR_NONE| set).
-// |MOJO_RESULT_PERMISSION_DENIED| if |data_pipe_producer_handle| does not
-// have the |MOJO_HANDLE_RIGHT_WRITE| right.
-// |MOJO_RESULT_FAILED_PRECONDITION| if the data pipe consumer handle has been
-// closed.
-// |MOJO_RESULT_BUSY| if |data_pipe_producer_handle| is currently in use in
-// some transaction (that, e.g., may result in it being invalidated, such
-// as being sent in a message), or if there is already a two-phase write
-// ongoing with |data_pipe_producer_handle| (i.e., |MojoBeginWriteData()|
-// has been called, but not yet the matching |MojoEndWriteData()|).
-// |MOJO_RESULT_SHOULD_WAIT| if no data can currently be written (and the
-// consumer is still open).
-MojoResult MojoBeginWriteData(MojoHandle data_pipe_producer_handle, // In.
- void** MOJO_RESTRICT buffer, // Out.
- uint32_t* MOJO_RESTRICT buffer_num_bytes, // Out.
- MojoWriteDataFlags flags); // In.
-
-// |MojoEndWriteData()|: Ends a two-phase write to the data pipe producer given
-// by |data_pipe_producer_handle| (which must have the |MOJO_HANDLE_RIGHT_WRITE|
-// right) that was begun by a call to |MojoBeginWriteData()| on the same handle.
-// |num_bytes_written| should indicate the amount of data actually written; it
-// must be less than or equal to the value of |*buffer_num_bytes| output by
-// |MojoBeginWriteData()| and must be a multiple of the element size. The buffer
-// given by |*buffer| from |MojoBeginWriteData()| must have been filled with
-// exactly |num_bytes_written| bytes of data.
-//
-// On failure, the two-phase write (if any) is ended (so the handle may become
-// writable again, if there's space available) but no data written to |*buffer|
-// is "put into" the data pipe.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if some argument was invalid (e.g.,
-// |data_pipe_producer_handle| is not a handle to a data pipe producer or
-// |num_bytes_written| is invalid (greater than the maximum value provided
-// by |MojoBeginWriteData()| or not a multiple of the element size).
-// |MOJO_RESULT_PERMISSION_DENIED| if |data_pipe_producer_handle| does not
-// have the |MOJO_HANDLE_RIGHT_WRITE| right.
-// |MOJO_RESULT_FAILED_PRECONDITION| if the data pipe producer is not in a
-// two-phase write (e.g., |MojoBeginWriteData()| was not called or
-// |MojoEndWriteData()| has already been called).
-// |MOJO_RESULT_BUSY| if |data_pipe_producer_handle| is currently in use in
-// some transaction (that, e.g., may result in it being invalidated, such
-// as being sent in a message).
-MojoResult MojoEndWriteData(MojoHandle data_pipe_producer_handle, // In.
- uint32_t num_bytes_written); // In.
-
-// |MojoSetDataPipeConsumerOptions()|: Sets options for the data pipe consumer
-// handle |data_pipe_consumer_handle| (which must have the
-// |MOJO_HANDLE_RIGHT_SET_OPTIONS| right).
-//
-// |options| may be set to null to reset back to the default options.
-//
-// Note that changing the read threshold may also result in the state (both
-// satisfied or satisfiable) of the |MOJO_HANDLE_SIGNAL_READ_THRESHOLD| handle
-// signal being changed.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if some argument was invalid (e.g.,
-// |data_pipe_consumer_handle| is not a valid data pipe consumer handle or
-// |*options| is invalid).
-// |MOJO_RESULT_PERMISSION_DENIED| if |data_pipe_consumer_handle| does not
-// have the |MOJO_HANDLE_RIGHT_SET_OPTIONS| right.
-// |MOJO_RESULT_BUSY| if |data_pipe_consumer_handle| is currently in use in
-// some transaction (that, e.g., may result in it being invalidated, such
-// as being sent in a message).
-MojoResult MojoSetDataPipeConsumerOptions(
- MojoHandle data_pipe_consumer_handle, // In.
- const struct MojoDataPipeConsumerOptions* options); // Optional in.
-
-// |MojoGetDataPipeConsumerOptions()|: Gets options for the data pipe consumer
-// handle |data_pipe_consumer_handle| (which must have the
-// |MOJO_HANDLE_RIGHT_GET_OPTIONS| right). |options| should be non-null and
-// point to a buffer of size |options_num_bytes|; |options_num_bytes| should be
-// at least 8 (the size of the first, and currently only, version of
-// |MojoDataPipeConsumerOptions|).
-//
-// On success, |*options| will be filled with information about the given
-// buffer. Note that if additional (larger) versions of
-// |MojoDataPipeConsumerOptions| are defined, the largest version permitted by
-// |options_num_bytes| that is supported by the implementation will be filled.
-// Callers expecting more than the first 16-byte version must check the
-// resulting |options->struct_size|.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if some argument was invalid (e.g.,
-// |data_pipe_consumer_handle| is not a valid data pipe consumer handle,
-// |*options| is null, or |options_num_bytes| is too small).
-// |MOJO_RESULT_PERMISSION_DENIED| if |data_pipe_consumer_handle| does not
-// have the |MOJO_HANDLE_RIGHT_GET_OPTIONS| right.
-// |MOJO_RESULT_BUSY| if |data_pipe_consumer_handle| is currently in use in
-// some transaction (that, e.g., may result in it being invalidated, such
-// as being sent in a message).
-MojoResult MojoGetDataPipeConsumerOptions(
- MojoHandle data_pipe_consumer_handle, // In.
- struct MojoDataPipeConsumerOptions* options, // Out.
- uint32_t options_num_bytes); // In.
-
-// |MojoReadData()|: Reads data from the data pipe consumer given by
-// |data_pipe_consumer_handle| (which must have the |MOJO_HANDLE_RIGHT_READ|
-// right). May also be used to discard data or query the amount of data
-// available.
-//
-// If |flags| has neither |MOJO_READ_DATA_FLAG_DISCARD| nor
-// |MOJO_READ_DATA_FLAG_QUERY| set, this tries to read up to |*num_bytes| (which
-// must be a multiple of the data pipe's element size) bytes of data to
-// |elements| and set |*num_bytes| to the amount actually read. If flags has
-// |MOJO_READ_DATA_FLAG_ALL_OR_NONE| set, it will either read exactly
-// |*num_bytes| bytes of data or none. Additionally, if flags has
-// |MOJO_READ_DATA_FLAG_PEEK| set, the data read will remain in the pipe and be
-// available to future reads.
-//
-// If flags has |MOJO_READ_DATA_FLAG_DISCARD| set, it discards up to
-// |*num_bytes| (which again must be a multiple of the element size) bytes of
-// data, setting |*num_bytes| to the amount actually discarded. If flags has
-// |MOJO_READ_DATA_FLAG_ALL_OR_NONE|, it will either discard exactly
-// |*num_bytes| bytes of data or none. In this case, |MOJO_READ_DATA_FLAG_QUERY|
-// must not be set, and |elements| is ignored (and should typically be set to
-// null).
-//
-// If flags has |MOJO_READ_DATA_FLAG_QUERY| set, it queries the amount of data
-// available, setting |*num_bytes| to the number of bytes available. In this
-// case, |MOJO_READ_DATA_FLAG_DISCARD| must not be set, and
-// |MOJO_READ_DATA_FLAG_ALL_OR_NONE| is ignored, as are |elements| and the input
-// value of |*num_bytes|.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success (see above for a description of the different
-// operations).
-// |MOJO_RESULT_INVALID_ARGUMENT| if some argument was invalid (e.g.,
-// |data_pipe_consumer_handle| is invalid, the combination of flags in
-// |flags| is invalid, etc.).
-// |MOJO_RESULT_PERMISSION_DENIED| if |data_pipe_consumer_handle| does not
-// have the |MOJO_HANDLE_RIGHT_READ| right.
-// |MOJO_RESULT_FAILED_PRECONDITION| if the data pipe producer handle has been
-// closed and data (or the required amount of data) was not available to
-// be read or discarded.
-// |MOJO_RESULT_OUT_OF_RANGE| if |flags| has |MOJO_READ_DATA_FLAG_ALL_OR_NONE|
-// set and the required amount of data is not available to be read or
-// discarded (and the producer is still open).
-// |MOJO_RESULT_BUSY| if |data_pipe_consumer_handle| is currently in use in
-// some transaction (that, e.g., may result in it being invalidated, such
-// as being sent in a message), or if there is a two-phase read ongoing
-// with |data_pipe_consumer_handle| (i.e., |MojoBeginReadData()| has been
-// called, but not yet the matching |MojoEndReadData()|).
-// |MOJO_RESULT_SHOULD_WAIT| if there is no data to be read or discarded (and
-// the producer is still open) and |flags| does *not* have
-// |MOJO_READ_DATA_FLAG_ALL_OR_NONE| set.
-MojoResult MojoReadData(MojoHandle data_pipe_consumer_handle, // In.
- void* MOJO_RESTRICT elements, // Out.
- uint32_t* MOJO_RESTRICT num_bytes, // In/out.
- MojoReadDataFlags flags); // In.
-
-// |MojoBeginReadData()|: Begins a two-phase read from the data pipe consumer
-// given by |data_pipe_consumer_handle| (which must have the
-// |MOJO_HANDLE_RIGHT_READ| right). On success, |*buffer| will be a pointer from
-// which the caller can read |*buffer_num_bytes| bytes of data. There are
-// currently no valid flags, so |flags| must be |MOJO_READ_DATA_FLAG_NONE|.
-//
-// During a two-phase read, |data_pipe_consumer_handle| is *not* readable.
-// E.g., if another thread tries to read from it, it will get
-// |MOJO_RESULT_BUSY|; that thread can then wait for |data_pipe_consumer_handle|
-// to become readable again.
-//
-// Once the caller has finished reading data from |*buffer|, it should call
-// |MojoEndReadData()| to specify the amount read and to complete the two-phase
-// read.
-//
-// Note: After a successful |MojoBeginReadData()| on a given handle and before a
-// corresponding |MojoEndReadData()|, any operation that invalidates the handle
-// (such as closing the handle, replacing the handle with one with reduced
-// rights, or transferring the handle over a message pipe) will abort the
-// two-phase read. That is, the behavior is equivalent to ending the two-phase
-// read with no data consumed. That operation will also invalidate the buffer
-// pointer: the behavior if data continues to be read from the buffer is
-// undefined.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if some argument was invalid (e.g.,
-// |data_pipe_consumer_handle| is not a handle to a data pipe consumer,
-// or |flags| has invalid flags set).
-// |MOJO_RESULT_PERMISSION_DENIED| if |data_pipe_consumer_handle| does not
-// have the |MOJO_HANDLE_RIGHT_READ| right.
-// |MOJO_RESULT_FAILED_PRECONDITION| if the data pipe producer handle has been
-// closed.
-// |MOJO_RESULT_BUSY| if |data_pipe_consumer_handle| is currently in use in
-// some transaction (that, e.g., may result in it being invalidated, such
-// as being sent in a message), or if there is already a two-phase read
-// ongoing with |data_pipe_consumer_handle| (i.e., |MojoBeginReadData()|
-// has been called, but not yet the matching |MojoEndReadData()|).
-// |MOJO_RESULT_SHOULD_WAIT| if no data can currently be read (and the
-// producer is still open).
-MojoResult MojoBeginReadData(MojoHandle data_pipe_consumer_handle, // In.
- const void** MOJO_RESTRICT buffer, // Out.
- uint32_t* MOJO_RESTRICT buffer_num_bytes, // Out.
- MojoReadDataFlags flags); // In.
-
-// |MojoEndReadData()|: Ends a two-phase read from the data pipe consumer given
-// by |data_pipe_consumer_handle| (which must have the |MOJO_HANDLE_RIGHT_READ|
-// right) that was begun by a call to |MojoBeginReadData()| on the same handle.
-// |num_bytes_read| should indicate the amount of data actually read; it must be
-// less than or equal to the value of |*buffer_num_bytes| output by
-// |MojoBeginReadData()| and must be a multiple of the element size.
-//
-// On failure, the two-phase read (if any) is ended (so the handle may become
-// readable again) but no data is "removed" from the data pipe.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if some argument was invalid (e.g.,
-// |data_pipe_consumer_handle| is not a handle to a data pipe consumer or
-// |num_bytes_written| is greater than the maximum value provided by
-// |MojoBeginReadData()| or not a multiple of the element size).
-// |MOJO_RESULT_PERMISSION_DENIED| if |data_pipe_consumer_handle| does not
-// have the |MOJO_HANDLE_RIGHT_READ| right.
-// |MOJO_RESULT_FAILED_PRECONDITION| if the data pipe consumer is not in a
-// two-phase read (e.g., |MojoBeginReadData()| was not called or
-// |MojoEndReadData()| has already been called).
-// |MOJO_RESULT_BUSY| if |data_pipe_consumer_handle| is currently in use in
-// some transaction (that, e.g., may result in it being invalidated, such
-// as being sent in a message).
-MojoResult MojoEndReadData(MojoHandle data_pipe_consumer_handle, // In.
- uint32_t num_bytes_read); // In.
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_DATA_PIPE_H_
diff --git a/c/include/mojo/system/handle.h b/c/include/mojo/system/handle.h
deleted file mode 100644
index aa567b1..0000000
--- a/c/include/mojo/system/handle.h
+++ /dev/null
@@ -1,204 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file contains Mojo system handle-related declarations/definitions.
-//
-// Note: This header should be compilable as C.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_HANDLE_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_HANDLE_H_
-
-#include <mojo/macros.h>
-#include <mojo/result.h>
-#include <stdint.h>
-
-// |MojoHandle|: Handles to Mojo objects.
-// |MOJO_HANDLE_INVALID| - A value that is never a valid handle.
-
-typedef uint32_t MojoHandle;
-
-#define MOJO_HANDLE_INVALID ((MojoHandle)0)
-
-// |MojoHandleRights|: Rights ("permissions") for handles. Each handle has a
-// bitset of rights flags, which subsequently only be reduced. See each function
-// for details about the right(s) required (some, like |MojoClose()|, require no
-// rights).
-// |MOJO_HANDLE_RIGHT_NONE| - No rights.
-// |MOJO_HANDLE_RIGHT_DUPLICATE| - Right to duplicate a handle.
-// |MOJO_HANDLE_RIGHT_TRANSFER| - Right to transfer a handle (e.g., include in
-// a message).
-// |MOJO_HANDLE_RIGHT_READ| - Right to "read" from the handle (e.g., read a
-// message).
-// |MOJO_HANDLE_RIGHT_WRITE| - Right to "write" to the handle (e.g., write a
-// message).
-// |MOJO_HANDLE_RIGHT_GET_OPTIONS| - Right to get a handle's options.
-// |MOJO_HANDLE_RIGHT_SET_OPTIONS| - Right to set a handle's options.
-// |MOJO_HANDLE_RIGHT_MAP_READABLE| - Right to "map" a (e.g., buffer) handle
-// as readable memory.
-// |MOJO_HANDLE_RIGHT_MAP_WRITABLE| - Right to "map" a (e.g., buffer) handle
-// as writable memory.
-// |MOJO_HANDLE_RIGHT_MAP_EXECUTABLE| - Right to "map" a (e.g., buffer) handle
-// as executable memory.
-//
-// TODO(vtl): Add rights support/checking to existing handle types.
-
-typedef uint32_t MojoHandleRights;
-
-#define MOJO_HANDLE_RIGHT_NONE ((MojoHandleRights)0)
-#define MOJO_HANDLE_RIGHT_DUPLICATE ((MojoHandleRights)1 << 0)
-#define MOJO_HANDLE_RIGHT_TRANSFER ((MojoHandleRights)1 << 1)
-#define MOJO_HANDLE_RIGHT_READ ((MojoHandleRights)1 << 2)
-#define MOJO_HANDLE_RIGHT_WRITE ((MojoHandleRights)1 << 3)
-#define MOJO_HANDLE_RIGHT_GET_OPTIONS ((MojoHandleRights)1 << 4)
-#define MOJO_HANDLE_RIGHT_SET_OPTIONS ((MojoHandleRights)1 << 5)
-#define MOJO_HANDLE_RIGHT_MAP_READABLE ((MojoHandleRights)1 << 6)
-#define MOJO_HANDLE_RIGHT_MAP_WRITABLE ((MojoHandleRights)1 << 7)
-#define MOJO_HANDLE_RIGHT_MAP_EXECUTABLE ((MojoHandleRights)1 << 8)
-
-// |MojoHandleSignals|: Used to specify signals that can be waited on for a
-// handle (and which can be triggered), e.g., the ability to read or write to
-// the handle.
-// |MOJO_HANDLE_SIGNAL_NONE| - No flags. |MojoWait()|, etc. will return
-// |MOJO_RESULT_FAILED_PRECONDITION| if you attempt to wait on this.
-// |MOJO_HANDLE_SIGNAL_READABLE| - Can read (e.g., a message) from the handle.
-// |MOJO_HANDLE_SIGNAL_WRITABLE| - Can write (e.g., a message) to the handle.
-// |MOJO_HANDLE_SIGNAL_PEER_CLOSED| - The peer handle is closed.
-// |MOJO_HANDLE_SIGNAL_READ_THRESHOLD| - Can read a certain amount of data
-// from the handle (e.g., a data pipe consumer; see
-// |MojoDataPipeConsumerOptions|).
-
-typedef uint32_t MojoHandleSignals;
-
-#define MOJO_HANDLE_SIGNAL_NONE ((MojoHandleSignals)0)
-#define MOJO_HANDLE_SIGNAL_READABLE ((MojoHandleSignals)1 << 0)
-#define MOJO_HANDLE_SIGNAL_WRITABLE ((MojoHandleSignals)1 << 1)
-#define MOJO_HANDLE_SIGNAL_PEER_CLOSED ((MojoHandleSignals)1 << 2)
-#define MOJO_HANDLE_SIGNAL_READ_THRESHOLD ((MojoHandleSignals)1 << 3)
-#define MOJO_HANDLE_SIGNAL_WRITE_THRESHOLD ((MojoHandleSignals)1 << 4)
-
-// |MojoHandleSignalsState|: Returned by wait functions to indicate the
-// signaling state of handles. Members are as follows:
-// - |satisfied signals|: Bitmask of signals that were satisfied at some time
-// before the call returned.
-// - |satisfiable signals|: These are the signals that are possible to
-// satisfy. For example, if the return value was
-// |MOJO_RESULT_FAILED_PRECONDITION|, you can use this field to
-// determine which, if any, of the signals can still be satisfied.
-// Note: This struct is not extensible (and only has 32-bit quantities), so it's
-// 32-bit-aligned.
-
-MOJO_STATIC_ASSERT(MOJO_ALIGNOF(uint32_t) == 4, "uint32_t has weird alignment");
-struct MOJO_ALIGNAS(4) MojoHandleSignalsState {
- MojoHandleSignals satisfied_signals;
- MojoHandleSignals satisfiable_signals;
-};
-MOJO_STATIC_ASSERT(sizeof(struct MojoHandleSignalsState) == 8,
- "MojoHandleSignalsState has wrong size");
-
-MOJO_BEGIN_EXTERN_C
-
-// |MojoClose()|: Closes the given |handle|.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if |handle| is not a valid handle.
-// |MOJO_RESULT_BUSY| if |handle| is currently in use in some transaction
-// (that, e.g., may result in it being invalidated, such as being sent in
-// a message).
-//
-// Concurrent operations on |handle| may succeed (or fail as usual) if they
-// happen before the close, be cancelled with result |MOJO_RESULT_CANCELLED| if
-// they properly overlap (this is likely the case with |MojoWait()|, etc.), or
-// fail with |MOJO_RESULT_INVALID_ARGUMENT| if they happen after.
-MojoResult MojoClose(MojoHandle handle); // In.
-
-// |MojoGetRights()|: Gets the given |handle|'s rights.
-//
-// On success, |*rights| (|rights| must be non-null) will be set to |handle|'s
-// rights.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if |handle| is not a valid handle.
-// |MOJO_RESULT_BUSY| if |handle| is currently in use in some transaction
-// (that, e.g., may result in it being invalidated, such as being sent in
-// a message).
-MojoResult MojoGetRights(MojoHandle handle, MojoHandleRights* rights); // Out.
-
-// |MojoReplaceHandleWithReducedRights()|: Replaces |handle| with an equivalent
-// one with reduced rights.
-//
-// On success, |*replacement_handle| will be a handle that is equivalent to
-// |handle| (before the call), but with:
-//
-// replacement handle rights = current rights & ~rights_to_remove.
-//
-// |handle| will be invalidated and any ongoing two-phase operations (e.g., for
-// data pipes) on |handle| will be aborted.
-//
-// On failure, |handle| will remain valid and unchanged (with any ongoing
-// two-phase operations undisturbed) and |*replacement_handle| will not be set.
-//
-// Note that it is not an error to "remove" rights that the handle does not
-// (currently) possess.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if |handle| is not a valid handle.
-// |MOJO_RESULT_RESOURCE_EXHAUSTED| if a process/system/quota/etc. limit has
-// been reached.
-// |MOJO_RESULT_BUSY| if |handle| is currently in use in some transaction
-// (that, e.g., may result in it being invalidated, such as being sent in
-// a message).
-MojoResult MojoReplaceHandleWithReducedRights(
- MojoHandle handle,
- MojoHandleRights rights_to_remove,
- MojoHandle* replacement_handle); // Out.
-
-// |MojoDuplicateHandleWithReducedRights()|: Duplicates |handle| to a new handle
-// with reduced rights. This requires |handle| to have the
-// |MOJO_HANDLE_RIGHT_DUPLICATE| (note that some handle types may never have
-// this right).
-//
-// The rights for the new handle are determined as in
-// |MojoReplaceHandleWithReducedRights()|. That is, on success:
-//
-// new handle rights = original handle rights & ~rights_to_remove.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if |handle| is not a valid handle.
-// |MOJO_RESULT_PERMISSION_DENIED| if |handle| does not have the
-// |MOJO_HANDLE_RIGHT_DUPLICATE| right.
-// |MOJO_RESULT_RESOURCE_EXHAUSTED| if a process/system/quota/etc. limit has
-// been reached.
-// |MOJO_RESULT_BUSY| if |handle| is currently in use in some transaction
-// (that, e.g., may result in it being invalidated, such as being sent in
-// a message).
-MojoResult MojoDuplicateHandleWithReducedRights(
- MojoHandle handle,
- MojoHandleRights rights_to_remove,
- MojoHandle* new_handle); // Out.
-
-// |MojoDuplicateHandle()|: Duplicates |handle| to a new handle with equivalent
-// rights. This requires |handle| to have the |MOJO_HANDLE_RIGHT_DUPLICATE|.
-// This is equivalent to |MojoDuplicateHandleWithReducedRights(handle,
-// MOJO_HANDLE_RIGHT_NONE, new_handle)|.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if |handle| is not a valid handle.
-// |MOJO_RESULT_PERMISSION_DENIED| if |handle| does not have the
-// |MOJO_HANDLE_RIGHT_DUPLICATE| right.
-// |MOJO_RESULT_RESOURCE_EXHAUSTED| if a process/system/quota/etc. limit has
-// been reached.
-// |MOJO_RESULT_BUSY| if |handle| is currently in use in some transaction
-// (that, e.g., may result in it being invalidated, such as being sent in
-// a message).
-MojoResult MojoDuplicateHandle(MojoHandle handle,
- MojoHandle* new_handle); // Out.
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_HANDLE_H_
diff --git a/c/include/mojo/system/main.h b/c/include/mojo/system/main.h
deleted file mode 100644
index 23cbc21..0000000
--- a/c/include/mojo/system/main.h
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_MAIN_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_MAIN_H_
-
-#include <mojo/macros.h>
-#include <mojo/result.h>
-#include <mojo/system/handle.h>
-
-// Implement MojoMain directly as the entry point for an application.
-//
-// MojoResult MojoMain(MojoHandle application_request) {
-// ...
-// }
-
-MOJO_BEGIN_EXTERN_C
-
-__attribute__((visibility("default"))) MojoResult MojoMain(
- MojoHandle application_request);
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_MAIN_H_
diff --git a/c/include/mojo/system/message_pipe.h b/c/include/mojo/system/message_pipe.h
deleted file mode 100644
index eed2e52..0000000
--- a/c/include/mojo/system/message_pipe.h
+++ /dev/null
@@ -1,185 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file contains types/constants and functions specific to message pipes.
-//
-// Note: This header should be compilable as C.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_MESSAGE_PIPE_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_MESSAGE_PIPE_H_
-
-#include <mojo/macros.h>
-#include <mojo/result.h>
-#include <mojo/system/handle.h>
-
-// |MojoCreateMessagePipeOptions|: Used to specify creation parameters for a
-// message pipe to |MojoCreateMessagePipe()|.
-// |uint32_t struct_size|: Set to the size of the
-// |MojoCreateMessagePipeOptions| struct. (Used to allow for future
-// extensions.)
-// |MojoCreateMessagePipeOptionsFlags flags|: Reserved for future use.
-// |MOJO_CREATE_MESSAGE_PIPE_OPTIONS_FLAG_NONE|: No flags; default mode.
-
-typedef uint32_t MojoCreateMessagePipeOptionsFlags;
-
-#define MOJO_CREATE_MESSAGE_PIPE_OPTIONS_FLAG_NONE \
- ((MojoCreateMessagePipeOptionsFlags)0)
-
-MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment");
-struct MOJO_ALIGNAS(8) MojoCreateMessagePipeOptions {
- uint32_t struct_size;
- MojoCreateMessagePipeOptionsFlags flags;
-};
-MOJO_STATIC_ASSERT(sizeof(struct MojoCreateMessagePipeOptions) == 8,
- "MojoCreateMessagePipeOptions has wrong size");
-
-// |MojoWriteMessageFlags|: Used to specify different modes to
-// |MojoWriteMessage()|.
-// |MOJO_WRITE_MESSAGE_FLAG_NONE| - No flags; default mode.
-
-typedef uint32_t MojoWriteMessageFlags;
-
-#define MOJO_WRITE_MESSAGE_FLAG_NONE ((MojoWriteMessageFlags)0)
-
-// |MojoReadMessageFlags|: Used to specify different modes to
-// |MojoReadMessage()|.
-// |MOJO_READ_MESSAGE_FLAG_NONE| - No flags; default mode.
-// |MOJO_READ_MESSAGE_FLAG_MAY_DISCARD| - If the message is unable to be read
-// for whatever reason (e.g., the caller-supplied buffer is too small),
-// discard the message (i.e., simply dequeue it).
-
-typedef uint32_t MojoReadMessageFlags;
-
-#define MOJO_READ_MESSAGE_FLAG_NONE ((MojoReadMessageFlags)0)
-#define MOJO_READ_MESSAGE_FLAG_MAY_DISCARD ((MojoReadMessageFlags)1 << 0)
-
-MOJO_BEGIN_EXTERN_C
-
-// |MojoCreateMessagePipe()|: Creates a message pipe, which is a bidirectional
-// communication channel for framed data (i.e., messages). Messages can contain
-// plain data and/or Mojo handles.
-//
-// |options| may be set to null for a message pipe with the default options.
-//
-// On success, |*message_pipe_handle0| and |*message_pipe_handle1| are set to
-// handles for the two endpoints (ports) for the message pipe. Both handles have
-// (at least) the following rights: |MOJO_HANDLE_RIGHT_TRANSFER|,
-// |MOJO_HANDLE_RIGHT_READ|, |MOJO_HANDLE_RIGHT_WRITE|,
-// |MOJO_HANDLE_RIGHT_GET_OPTIONS|, and |MOJO_HANDLE_RIGHT_SET_OPTIONS|.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success.
-// |MOJO_RESULT_INVALID_ARGUMENT| if some argument was invalid (e.g.,
-// |*options| is invalid).
-// |MOJO_RESULT_RESOURCE_EXHAUSTED| if a process/system/quota/etc. limit has
-// been reached.
-// |MOJO_RESULT_UNIMPLEMENTED| if an unsupported flag was set in |*options|.
-MojoResult MojoCreateMessagePipe(
- const struct MojoCreateMessagePipeOptions* MOJO_RESTRICT
- options, // Optional in.
- MojoHandle* MOJO_RESTRICT message_pipe_handle0, // Out.
- MojoHandle* MOJO_RESTRICT message_pipe_handle1); // Out.
-
-// |MojoWriteMessage()|: Writes a message to the message pipe endpoint given by
-// |message_pipe_handle| (which must have the |MOJO_HANDLE_RIGHT_WRITE| right),
-// with message data specified by |bytes| of size |num_bytes| and attached
-// handles specified by |handles| of count |num_handles|, and options specified
-// by |flags|. If there is no message data, |bytes| may be null, in which case
-// |num_bytes| must be zero. If there are no attached handles, |handles| may be
-// null, in which case |num_handles| must be zero.
-//
-// If handles are attached, on success the handles will no longer be valid (the
-// receiver will receive equivalent, but logically different, handles) and any
-// ongoing two-phase operations (e.g., for data pipes) on them will be aborted.
-// Handles to be sent should not be in simultaneous use (e.g., on another
-// thread). On failure, any handles to be attached will remain valid (and
-// two-phase operations will not be aborted).
-//
-// Returns:
-// |MOJO_RESULT_OK| on success (i.e., the message was enqueued).
-// |MOJO_RESULT_INVALID_ARGUMENT| if some argument was invalid (e.g., if
-// |message_pipe_handle| is not a valid handle, or some of the
-// requirements above are not satisfied).
-// |MOJO_RESULT_PERMISSION_DENIED| if |message_pipe_handle| does not have the
-// |MOJO_HANDLE_RIGHT_WRITE| right or if one of the handles to be sent
-// does not have the |MOJO_HANDLE_RIGHT_TRANSFER| right.
-// |MOJO_RESULT_RESOURCE_EXHAUSTED| if some system limit has been reached, or
-// the number of handles to send is too large (TODO(vtl): reconsider the
-// latter case).
-// |MOJO_RESULT_FAILED_PRECONDITION| if the other endpoint has been closed.
-// Note that closing an endpoint is not necessarily synchronous (e.g.,
-// across processes), so this function may succeed even if the other
-// endpoint has been closed (in which case the message would be dropped).
-// |MOJO_RESULT_UNIMPLEMENTED| if an unsupported flag was set in |*options|.
-// |MOJO_RESULT_BUSY| if |message_pipe_handle| is currently in use in some
-// transaction (that, e.g., may result in it being invalidated, such as
-// being sent in a message), or if some handle to be sent is currently in
-// use.
-//
-// Note: |MOJO_RESULT_BUSY| is generally "preferred" over
-// |MOJO_RESULT_PERMISSION_DENIED|. E.g., if a handle to be sent both is busy
-// and does not have the transfer right, then the result will be "busy".
-//
-// TODO(vtl): We'll also report |MOJO_RESULT_BUSY| if a (data pipe
-// producer/consumer) handle to be sent is in a two-phase write/read). But
-// should we? (For comparison, there's no such provision in |MojoClose()|.)
-// https://github.com/domokit/mojo/issues/782
-//
-// TODO(vtl): Add a notion of capacity for message pipes, and return
-// |MOJO_RESULT_SHOULD_WAIT| if the message pipe is full.
-MojoResult MojoWriteMessage(MojoHandle message_pipe_handle, // In.
- const void* bytes, // Optional in.
- uint32_t num_bytes, // In.
- const MojoHandle* handles, // Optional in.
- uint32_t num_handles, // In.
- MojoWriteMessageFlags flags); // In.
-
-// |MojoReadMessage()|: Reads the next message from the message pipe endpoint
-// given by |message_pipe_handle| (which must have the |MOJO_HANDLE_RIGHT_READ|
-// right) or indicates the size of the message if it cannot fit in the provided
-// buffers. The message will be read in its entirety or not at all; if it is
-// not, it will remain enqueued unless the |MOJO_READ_MESSAGE_FLAG_MAY_DISCARD|
-// flag was passed. At most one message will be consumed from the queue, and the
-// return value will indicate whether a message was successfully read.
-//
-// |num_bytes| and |num_handles| are optional in/out parameters that on input
-// must be set to the sizes of the |bytes| and |handles| arrays, and on output
-// will be set to the actual number of bytes or handles contained in the
-// message (even if the message was not retrieved due to being too large).
-// Either |num_bytes| or |num_handles| may be null if the message is not
-// expected to contain the corresponding type of data, but such a call would
-// fail with |MOJO_RESULT_RESOURCE_EXHAUSTED| if the message in fact did
-// contain that type of data.
-//
-// |bytes| and |handles| will receive the contents of the message, if it is
-// retrieved. Either or both may be null, in which case the corresponding size
-// parameter(s) must also be set to zero or passed as null.
-//
-// Returns:
-// |MOJO_RESULT_OK| on success (i.e., a message was actually read).
-// |MOJO_RESULT_INVALID_ARGUMENT| if some argument was invalid.
-// |MOJO_RESULT_FAILED_PRECONDITION| if the other endpoint has been closed.
-// |MOJO_RESULT_PERMISSION_DENIED| if |message_pipe_handle| does not have the
-// |MOJO_HANDLE_RIGHT_READ| right.
-// |MOJO_RESULT_RESOURCE_EXHAUSTED| if the message was too large to fit in the
-// provided buffer(s). The message will have been left in the queue or
-// discarded, depending on flags.
-// |MOJO_RESULT_SHOULD_WAIT| if no message was available to be read.
-// |MOJO_RESULT_BUSY| if |message_pipe_handle| is currently in use in some
-// transaction (that, e.g., may result in it being invalidated, such as
-// being sent in a message).
-//
-// TODO(vtl): Reconsider the |MOJO_RESULT_RESOURCE_EXHAUSTED| error code; should
-// distinguish this from the hitting-system-limits case.
-MojoResult MojoReadMessage(
- MojoHandle message_pipe_handle, // In.
- void* MOJO_RESTRICT bytes, // Optional out.
- uint32_t* MOJO_RESTRICT num_bytes, // Optional in/out.
- MojoHandle* MOJO_RESTRICT handles, // Optional out.
- uint32_t* MOJO_RESTRICT num_handles, // Optional in/out.
- MojoReadMessageFlags flags); // In.
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_MESSAGE_PIPE_H_
diff --git a/c/include/mojo/system/time.h b/c/include/mojo/system/time.h
deleted file mode 100644
index 35cdcb7..0000000
--- a/c/include/mojo/system/time.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file contains Mojo system time-related declarations/definitions.
-//
-// Note: This header should be compilable as C.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_TIME_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_TIME_H_
-
-#include <mojo/macros.h>
-#include <stdint.h>
-
-// |MojoTimeTicks|: A time delta, in microseconds, the meaning of which is
-// source-dependent.
-
-typedef int64_t MojoTimeTicks;
-
-// |MojoDeadline|: Used to specify deadlines (timeouts), in microseconds (except
-// for |MOJO_DEADLINE_INDEFINITE|).
-// |MOJO_DEADLINE_INDEFINITE| - Used to indicate "forever".
-
-typedef uint64_t MojoDeadline;
-
-#define MOJO_DEADLINE_INDEFINITE ((MojoDeadline)-1)
-
-MOJO_BEGIN_EXTERN_C
-
-// |MojoGetTimeTicksNow()|: Returns the time, in microseconds, since some
-// undefined point in the past. The values are only meaningful relative to other
-// values that were obtained from the same device without an intervening system
-// restart. Such values are guaranteed to be monotonically non-decreasing with
-// the passage of real time. Although the units are microseconds, the resolution
-// of the clock may vary and is typically in the range of ~1-15 ms.
-MojoTimeTicks MojoGetTimeTicksNow(void);
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_TIME_H_
diff --git a/c/include/mojo/system/wait.h b/c/include/mojo/system/wait.h
deleted file mode 100644
index 5d8c955..0000000
--- a/c/include/mojo/system/wait.h
+++ /dev/null
@@ -1,120 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file contains functions for waiting on handles (directly).
-//
-// Note: This header should be compilable as C.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_WAIT_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_WAIT_H_
-
-#include <mojo/macros.h>
-#include <mojo/result.h>
-#include <mojo/system/handle.h>
-#include <mojo/system/time.h>
-
-MOJO_BEGIN_EXTERN_C
-
-// |MojoWait()|: Waits on the given handle until one of the following happens:
-// - A signal indicated by |signals| is satisfied.
-// - It becomes known that no signal indicated by |signals| will ever be
-// satisfied. (See the description of the |MOJO_RESULT_CANCELLED| and
-// |MOJO_RESULT_FAILED_PRECONDITION| return values below.)
-// - Until |deadline| has passed.
-//
-// If |deadline| is |MOJO_DEADLINE_INDEFINITE|, this will wait "forever" (until
-// one of the other wait termination conditions is satisfied). If |deadline| is
-// 0, this will return |MOJO_RESULT_DEADLINE_EXCEEDED| only if one of the other
-// termination conditions (e.g., a signal is satisfied, or all signals are
-// unsatisfiable) is not already satisfied.
-//
-// |signals_state| (optional): See documentation for |MojoHandleSignalsState|.
-//
-// Returns:
-// |MOJO_RESULT_OK| if some signal in |signals| was satisfied (or is already
-// satisfied).
-// |MOJO_RESULT_CANCELLED| if |handle| was closed (necessarily from another
-// thread) during the wait.
-// |MOJO_RESULT_INVALID_ARGUMENT| if |handle| is not a valid handle (e.g., if
-// it has already been closed). The |signals_state| value is unchanged.
-// |MOJO_RESULT_DEADLINE_EXCEEDED| if the deadline has passed without any of
-// the signals being satisfied.
-// |MOJO_RESULT_FAILED_PRECONDITION| if it becomes known that none of the
-// signals in |signals| can ever be satisfied (e.g., when waiting on one
-// end of a message pipe and the other end is closed), at least not
-// without performing some action on |handle| (see, e.g., |struct
-// MojoDataPipeConsumerOptions|).
-// |MOJO_RESULT_BUSY| if |handle| is currently in use in some transaction
-// (that, e.g., may result in it being invalidated, such as being sent in
-// a message).
-//
-// If there are multiple waiters (on different threads, obviously) waiting on
-// the same handle and signal, and that signal becomes satisfied, all waiters
-// will be awoken.
-MojoResult MojoWait(
- MojoHandle handle, // In.
- MojoHandleSignals signals, // In.
- MojoDeadline deadline, // In.
- struct MojoHandleSignalsState* signals_state); // Optional out.
-
-// |MojoWaitMany()|: Waits on |handles[0]|, ..., |handles[num_handles-1]| until:
-// - (At least) one handle satisfies a signal indicated in its respective
-// |signals[0]|, ..., |signals[num_handles-1]|.
-// - It becomes known that no signal in some |signals[i]| will ever be
-// satisfied.
-// - |deadline| has passed.
-//
-// This means that |MojoWaitMany()| behaves as if |MojoWait()| were called on
-// each handle/signals pair simultaneously, completing when the first
-// |MojoWait()| would complete.
-//
-// See |MojoWait()| for more details about |deadline|.
-//
-// Note that if |num_handles| is 0, this will wait until |deadline| has passed
-// (possibly forever if it is |MOJO_DEADLINE_INDEFINITE|), and handles|,
-// |signals|, |result_index|, and |signals_states| will all be ignored (so they
-// may be null or invalid pointers).
-//
-// |result_index| (optional) is used to return the index of the handle that
-// caused the call to return. For example, the index |i| (from 0 to
-// |num_handles-1|) if |handle[i]| satisfies a signal from |signals[i]|. You
-// must manually initialize this to a suitable sentinel value (e.g. -1)
-// before you make this call because this value is not updated if there is
-// no specific handle that causes the function to return. Pass null if you
-// don't need this value to be returned.
-//
-// |signals_states| (optional) points to an array of size |num_handles| of
-// MojoHandleSignalsState. See |MojoHandleSignalsState| for more details
-// about the meaning of each array entry. This array is not an atomic
-// snapshot. The array will be updated if the function does not return
-// |MOJO_RESULT_INVALID_ARGUMENT| or |MOJO_RESULT_RESOURCE_EXHAUSTED|.
-//
-// Returns:
-// |MOJO_RESULT_CANCELLED| if some |handle[i]| was closed (necessarily from
-// another thread) during the wait.
-// |MOJO_RESULT_RESOURCE_EXHAUSTED| if there are too many handles. The
-// |signals_state| array is unchanged.
-// |MOJO_RESULT_INVALID_ARGUMENT| if some |handle[i]| is not a valid handle
-// (e.g., if it is zero or if it has already been closed). The
-// |signals_state| array is unchanged.
-// |MOJO_RESULT_DEADLINE_EXCEEDED| if the deadline has passed without any of
-// handles satisfying any of its signals.
-// |MOJO_RESULT_FAILED_PRECONDITION| if it is or becomes impossible that SOME
-// |handle[i]| will ever satisfy any of the signals in |signals[i]|, at
-// least not without some action on |handle[i]| (see, e.g., |struct
-// MojoDataPipeConsumerOptions|).
-// |MOJO_RESULT_BUSY| if some |handle[i]| is currently in use in some
-// transaction (that, e.g., may result in it being invalidated, such as
-// being sent in a message).
-MojoResult MojoWaitMany(const MojoHandle* MOJO_RESTRICT handles, // In.
- const MojoHandleSignals* MOJO_RESTRICT signals, // In.
- uint32_t num_handles, // In.
- MojoDeadline deadline, // In.
- uint32_t* MOJO_RESTRICT result_index, // Optional out.
- struct MojoHandleSignalsState* MOJO_RESTRICT
- signals_states); // Optional out.
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_WAIT_H_
diff --git a/c/include/mojo/system/wait_set.h b/c/include/mojo/system/wait_set.h
deleted file mode 100644
index 74c2285..0000000
--- a/c/include/mojo/system/wait_set.h
+++ /dev/null
@@ -1,190 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file contains functions for waiting on multiple handles using wait sets.
-//
-// Note: This header should be compilable as C.
-
-#ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_WAIT_SET_H_
-#define MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_WAIT_SET_H_
-
-#include <mojo/macros.h>
-#include <mojo/result.h>
-#include <mojo/system/handle.h>
-#include <mojo/system/time.h>
-#include <stdint.h>
-
-// |MojoCreateWaitSetOptions|: Used to specify creation parameters for a wait
-// set to |MojoCreateWaitSet()|.
-// |uint32_t struct_size|: Set to the size of the |MojoCreateWaitSetOptions|
-// struct. (Used to allow for future extensions.)
-// |MojoCreateWaitSetOptionsFlags flags|: Reserved for future use
-// |MOJO_CREATE_WAIT_SET_OPTIONS_FLAGS_NONE|: No flags, default mode.
-
-typedef uint32_t MojoCreateWaitSetOptionsFlags;
-
-#define MOJO_CREATE_WAIT_SET_OPTIONS_FLAG_NONE \
- ((MojoCreateWaitSetOptionsFlags)0)
-
-struct MOJO_ALIGNAS(8) MojoCreateWaitSetOptions {
- uint32_t struct_size;
- MojoCreateWaitSetOptionsFlags flags;
-};
-MOJO_STATIC_ASSERT(sizeof(struct MojoCreateWaitSetOptions) == 8,
- "MojoCreateWaitSetOptions has wrong size");
-
-// |MojoWaitSetAddOptions|: Used to specify parameters in adding an entry to a
-// wait set with |MojoWaitSetAdd()|.
-// |uint32_t struct_size|: Set to the size of the |MojoWaitSetAddOptions|
-// struct. (Used to allow for future extensions.)
-// |MojoWaitSetAddOptionsFlags flags|: Reserved for future use.
-// |MOJO_WAIT_SET_ADD_OPTIONS_FLAGS_NONE|: No flags, default mode.
-
-typedef uint32_t MojoWaitSetAddOptionsFlags;
-
-#define MOJO_WAIT_SET_ADD_OPTIONS_FLAG_NONE ((MojoWaitSetAddOptionsFlags)0)
-
-struct MOJO_ALIGNAS(8) MojoWaitSetAddOptions {
- uint32_t struct_size;
- MojoWaitSetAddOptionsFlags flags;
-};
-MOJO_STATIC_ASSERT(sizeof(struct MojoWaitSetAddOptions) == 8,
- "MojoWaitSetAddOptions has wrong size");
-
-// |MojoWaitSetResult|: Returned by |MojoWaitSetWait()| to indicate the state of
-// entries. See |MojoWaitSetWait()| for the values of these fields.
-
-struct MOJO_ALIGNAS(8) MojoWaitSetResult {
- uint64_t cookie;
- MojoResult wait_result;
- uint32_t reserved;
- struct MojoHandleSignalsState signals_state;
-};
-MOJO_STATIC_ASSERT(sizeof(struct MojoWaitSetResult) == 24,
- "MojoWaitSetResult has wrong size");
-
-MOJO_BEGIN_EXTERN_C
-
-// |MojoCreateWaitSet()|: Creates a new wait set.
-//
-// A wait set is an object that can be used to wait for a set of handles to
-// satisfy some set of signals simultaneously.
-//
-// If |options| is null, the default options will be used.
-//
-// Returns:
-// |MOJO_RESULT_OK| if a wait set was successfully created. On success,
-// |*handle| will be the handle of the wait set.
-// |MOJO_RESULT_INVALID_ARGUMENT| if some argument was invalid (e.g.,
-// |options| is non null and |*options| is invalid).
-// |MOJO_RESULT_RESOURCE_EXHAUSTED| if a process/system/quota/etc. limit has
-// been reached.
-// |MOJO_RESULT_UNIMPLEMENTED| if an unsupported flag was set in |*options|.
-MojoResult MojoCreateWaitSet(const struct MojoCreateWaitSetOptions*
- MOJO_RESTRICT options, // Optional in.
- MojoHandle* handle); // Out.
-
-// |MojoWaitSetAdd()|: Adds an entry to watch for to the wait set specified by
-// |wait_set_handle| (which must have the |MOJO_HANDLE_RIGHT_WRITE| right).
-//
-// An entry in a wait set is composed of a handle, a signal set, and a
-// caller-specified cookie value. The cookie value must be unique across all
-// entries in a particular wait set but is otherwise opaque and can be any value
-// that is useful to the caller. If |options| is null the default options will
-// be used.
-//
-// In all failure cases the wait set is unchanged.
-//
-// Returns:
-// |MOJO_RESULT_OK| if the handle was added to the wait set.
-// |MOJO_RESULT_INVALID_ARGUMENT| if |wait_set_handle| or |handle| do not
-// refer to valid handles, |wait_set_handle| is not a handle to a wait
-// set, or |options| is not null and |*options| is not a valid options
-// structure.
-// |MOJO_RESULT_ALREADY_EXISTS| if there is already an entry in the wait set
-// with the same |cookie| value.
-// |MOJO_RESULT_BUSY| if |wait_set_handle| or |handle| are currently in use in
-// some transaction.
-// |MOJO_RESULT_RESOURCE_EXHAUSTED| if the handle could not be added due to
-// hitting a system or quota limitation.
-// |MOJO_ERROR_CODE_UNIMPLEMENTED| if some unknown/unsupported option has been
-// specified in |*options|.
-MojoResult MojoWaitSetAdd(MojoHandle wait_set_handle, // In.
- MojoHandle handle, // In.
- MojoHandleSignals signals, // In.
- uint64_t cookie, // In.
- const struct MojoWaitSetAddOptions* MOJO_RESTRICT
- options); // Optional in.
-
-// |MojoWaitSetRemove()|: Removes an entry from the wait set specified by
-// |wait_set_handle| (which must have the |MOJO_HANDLE_RIGHT_WRITE| right).
-//
-// Returns:
-// |MOJO_RESULT_OK| if the entry was successfully removed.
-// |MOJO_RESULT_INVALID_ARGUMENT| if |wait_set_handle| does not refer to a
-// valid wait set.
-// |MOJO_RESULT_NOT_FOUND| if |cookie| does not identify an entry within the
-// wait set.
-MojoResult MojoWaitSetRemove(MojoHandle wait_set_handle, // In.
- uint64_t cookie); // In.
-
-// |MojoWaitSetWait()|: Waits on all entries in the wait set specified by
-// |wait_set_handle| (which must have the |MOJO_HANDLE_RIGHT_READ| right) for at
-// least one of the following:
-// - At least one entry's handle satisfies a signal in that entry's signal
-// set.
-// - At least one entry's handle can never satisfy a signal in that entry's
-// signal set.
-// - |deadline| expires.
-// - The wait set is closed.
-//
-// On success, sets |*max_results| to the total number of possible results at
-// the time of the call. Also returns information for up to |*num_results|
-// entries in |*results| and sets |*num_results| to the number of entries the
-// system populated. In particular, |results[0]|, ..., |results[*num_results-1]|
-// will be populated as follows:
-// - |cookie| is the cookie value specified when the entry was added
-// - |wait_result| is set to one of the following:
-// - |MOJO_RESULT_OK| if the handle referred to by the entry satisfies one
-// or more of the signals in the entry
-// - |MOJO_RESULT_CANCELLED| if the handle referred to by the entry was
-// closed
-// - |MOJO_RESULT_BUSY| if the handle referred to by the entry is currently
-// in use in some transaction
-// - |MOJO_RESULT_FAILED_PRECONDITION| if it becomes impossible that the
-// handle referred to by the entry will ever satisfy any of entry's
-// signals
-// - |reserved| is set to 0
-//
-// When |wait_result| is |MOJO_RESULT_OK| or |MOJO_RESULT_FAILED_PRECONDITION|
-// |signals_state| is set to the handle's current signal state; otherwise, it
-// is set to a zeroed |MojoHandleSignalsState| (in particular, both fields
-// will then be |MOJO_HANDLE_SIGNALS_NONE|).
-//
-// On any result other than |MOJO_RESULT_OK|, |*num_results|, |*results| and
-// |*max_results| are not modified.
-//
-// Returns:
-// |MOJO_RESULT_OK| if one or more entries in the wait set become satisfied or
-// unsatisfiable.
-// |MOJO_RESULT_INVALID_ARGUMENT| if |wait_set_handle| does not refer to a
-// valid wait set handle.
-// |MOJO_RESULT_CANCELLED| if |wait_set_handle| is closed during the wait.
-// |MOJO_RESULT_RESOURCE_EXHAUSTED| if a system/quota/etc. limit was reached.
-// |MOJO_RESULT_BUSY| if |wait_set_handle| is in use in some transaction. Note
-// that waiting on a wait set handle does not count as a transaction. It
-// is valid to call |MojoWaitSetWait()| on the same wait set handle
-// concurrently from different threads.
-// |MOJO_RESULT_DEADLINE_EXCEEDED| if the deadline is passed without any
-// entries in the wait set becoming satisfied or unsatisfiable.
-MojoResult MojoWaitSetWait(
- MojoHandle wait_set_handle, // In.
- MojoDeadline deadline, // In.
- uint32_t* MOJO_RESTRICT num_results, // In/out.
- struct MojoWaitSetResult* MOJO_RESTRICT results, // Out.
- uint32_t* MOJO_RESTRICT max_results); // Optional out.
-
-MOJO_END_EXTERN_C
-
-#endif // MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_WAIT_SET_H_
diff --git a/c/lib/bindings/array.c b/c/lib/bindings/array.c
deleted file mode 100644
index 84b808c..0000000
--- a/c/lib/bindings/array.c
+++ /dev/null
@@ -1,253 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <mojo/bindings/array.h>
-
-#include <assert.h>
-#include <mojo/bindings/buffer.h>
-#include <mojo/bindings/interface.h>
-#include <mojo/bindings/internal/type_descriptor.h>
-#include <mojo/bindings/internal/util.h>
-#include <mojo/bindings/union.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <string.h>
-
-struct MojomArrayHeader* MojomArray_New(struct MojomBuffer* buf,
- uint32_t num_elements,
- uint32_t element_byte_size) {
- assert(buf);
-
- uint64_t num_bytes = sizeof(struct MojomArrayHeader) +
- (uint64_t)num_elements * element_byte_size;
- if (num_bytes > UINT32_MAX)
- return NULL;
-
- struct MojomArrayHeader* arr =
- (struct MojomArrayHeader*)MojomBuffer_Allocate(buf, (uint32_t)num_bytes);
- if (arr == NULL)
- return NULL;
-
- assert((uintptr_t)arr + MOJOM_INTERNAL_ROUND_TO_8(num_bytes) ==
- (uintptr_t)buf->buf + buf->num_bytes_used);
-
- arr->num_elements = num_elements;
- arr->num_bytes = MOJOM_INTERNAL_ROUND_TO_8((uint32_t)num_bytes);
-
- return arr;
-}
-
-// Gets the |index|th element (whose type is described by |type|) of |array|.
-// Only supports non-POD types.
-static void* array_index_by_type(const struct MojomArrayHeader* array,
- enum MojomTypeDescriptorType type,
- size_t index) {
- switch (type) {
- case MOJOM_TYPE_DESCRIPTOR_TYPE_STRUCT_PTR:
- case MOJOM_TYPE_DESCRIPTOR_TYPE_MAP_PTR:
- case MOJOM_TYPE_DESCRIPTOR_TYPE_ARRAY_PTR:
- return MOJOM_ARRAY_INDEX(array, union MojomPointer, index);
- case MOJOM_TYPE_DESCRIPTOR_TYPE_UNION:
- return MOJOM_ARRAY_INDEX(array, struct MojomUnionLayout, index);
- case MOJOM_TYPE_DESCRIPTOR_TYPE_HANDLE:
- return MOJOM_ARRAY_INDEX(array, MojoHandle, index);
- case MOJOM_TYPE_DESCRIPTOR_TYPE_INTERFACE:
- return MOJOM_ARRAY_INDEX(array, struct MojomInterfaceData, index);
- case MOJOM_TYPE_DESCRIPTOR_TYPE_UNION_PTR:
- case MOJOM_TYPE_DESCRIPTOR_TYPE_POD:
- // This is a type that isn't supported in an array.
- assert(0);
- break;
- }
- return NULL;
-}
-
-size_t MojomArray_ComputeSerializedSize(
- const struct MojomTypeDescriptorArray* in_type_desc,
- const struct MojomArrayHeader* in_array) {
- assert(in_array);
- assert(in_type_desc);
-
- size_t size = in_array->num_bytes;
- if (!MojomType_IsPointer(in_type_desc->elem_type) &&
- in_type_desc->elem_type != MOJOM_TYPE_DESCRIPTOR_TYPE_UNION)
- return size;
-
- for (uint32_t i = 0; i < in_array->num_elements; i++) {
- size += MojomType_DispatchComputeSerializedSize(
- in_type_desc->elem_type,
- in_type_desc->elem_descriptor,
- in_type_desc->nullable,
- array_index_by_type(in_array, in_type_desc->elem_type, i));
- }
-
- return size;
-}
-
-void MojomArray_EncodePointersAndHandles(
- const struct MojomTypeDescriptorArray* in_type_desc,
- struct MojomArrayHeader* inout_array,
- uint32_t in_array_size,
- struct MojomHandleBuffer* inout_handles_buffer) {
- assert(in_type_desc);
- assert(inout_array);
- assert(in_array_size >= sizeof(struct MojomArrayHeader));
- assert(in_array_size >= inout_array->num_bytes);
-
- // Nothing to encode for POD types.
- if (in_type_desc->elem_type == MOJOM_TYPE_DESCRIPTOR_TYPE_POD)
- return;
-
- for (size_t i = 0; i < inout_array->num_elements; i++) {
- char* elem_data =
- array_index_by_type(inout_array, in_type_desc->elem_type, i);
- assert(elem_data < (char*)inout_array + in_array_size);
-
- MojomType_DispatchEncodePointersAndHandles(
- in_type_desc->elem_type,
- in_type_desc->elem_descriptor,
- in_type_desc->nullable,
- elem_data,
- in_array_size - (uint32_t)(elem_data - (char*)inout_array),
- inout_handles_buffer);
- }
-}
-
-void MojomArray_DecodePointersAndHandles(
- const struct MojomTypeDescriptorArray* in_type_desc,
- struct MojomArrayHeader* inout_array,
- uint32_t in_array_size,
- MojoHandle* inout_handles,
- uint32_t in_num_handles) {
- assert(in_type_desc);
- assert(inout_array);
- assert(inout_handles != NULL || in_num_handles == 0);
-
- // Nothing to encode for POD types.
- if (in_type_desc->elem_type == MOJOM_TYPE_DESCRIPTOR_TYPE_POD)
- return;
-
- for (size_t i = 0; i < inout_array->num_elements; i++) {
- char* elem_data =
- array_index_by_type(inout_array, in_type_desc->elem_type, i);
- assert(elem_data < (char*)inout_array + in_array_size);
-
- MojomType_DispatchDecodePointersAndHandles(
- in_type_desc->elem_type,
- in_type_desc->elem_descriptor,
- in_type_desc->nullable,
- elem_data,
- in_array_size - (uint32_t)(elem_data - (char*)inout_array),
- inout_handles,
- in_num_handles);
- }
-}
-
-// Rounds up to nearest byte.
-static uint64_t bits_to_bytes(uint64_t bits) {
- return (bits + 7) / 8;
-}
-
-static MojomValidationResult validate_array_header(
- const struct MojomTypeDescriptorArray* in_type_desc,
- const struct MojomArrayHeader* in_array,
- uint32_t in_buf_size) {
- if (in_buf_size < sizeof(struct MojomArrayHeader))
- return MOJOM_VALIDATION_ILLEGAL_MEMORY_RANGE;
-
- if (in_array->num_bytes < sizeof(struct MojomArrayHeader))
- return MOJOM_VALIDATION_UNEXPECTED_ARRAY_HEADER;
-
- if (in_array->num_bytes > in_buf_size)
- return MOJOM_VALIDATION_ILLEGAL_MEMORY_RANGE;
-
- if (in_type_desc->num_elements != 0 &&
- in_array->num_elements != in_type_desc->num_elements)
- return MOJOM_VALIDATION_UNEXPECTED_ARRAY_HEADER;
-
- // Array size is less than what we need to fit the elements.
- if (in_array->num_bytes <
- sizeof(struct MojomArrayHeader) +
- bits_to_bytes((uint64_t)in_type_desc->elem_num_bits *
- (uint64_t)in_array->num_elements)) {
- return MOJOM_VALIDATION_UNEXPECTED_ARRAY_HEADER;
- }
-
- return MOJOM_VALIDATION_ERROR_NONE;
-}
-
-MojomValidationResult MojomArray_Validate(
- const struct MojomTypeDescriptorArray* in_type_desc,
- const struct MojomArrayHeader* in_array,
- uint32_t in_array_size,
- uint32_t in_num_handles,
- struct MojomValidationContext* inout_context) {
- assert(in_type_desc);
- assert(in_array);
-
- MojomValidationResult result =
- validate_array_header(in_type_desc, in_array, in_array_size);
- if (result != MOJOM_VALIDATION_ERROR_NONE)
- return result;
-
- // From here on out, all pointers need to point past the end of this struct.
- inout_context->next_pointer = (char*)in_array + in_array->num_bytes;
-
- // Nothing to validate for POD types.
- if (in_type_desc->elem_type == MOJOM_TYPE_DESCRIPTOR_TYPE_POD)
- return MOJOM_VALIDATION_ERROR_NONE;
-
- for (size_t i = 0; i < in_array->num_elements; i++) {
- char* elem_data =
- array_index_by_type(in_array, in_type_desc->elem_type, i);
-
- MojomValidationResult result = MojomType_DispatchValidate(
- in_type_desc->elem_type,
- in_type_desc->elem_descriptor,
- in_type_desc->nullable,
- elem_data,
- in_array_size - (uint32_t)(elem_data - (char*)in_array),
- in_num_handles,
- inout_context);
- if (result != MOJOM_VALIDATION_ERROR_NONE)
- return result;
- }
-
- return MOJOM_VALIDATION_ERROR_NONE;
-}
-
-bool MojomArray_DeepCopy(
- struct MojomBuffer* buffer,
- const struct MojomTypeDescriptorArray* in_type_desc,
- const struct MojomArrayHeader* in_array,
- struct MojomArrayHeader** out_array) {
- assert(in_type_desc);
- assert(in_array);
- assert(out_array);
-
- *out_array = MojomBuffer_Allocate(buffer, in_array->num_bytes);
- if (*out_array == NULL)
- return false;
-
- memcpy(*out_array, in_array, in_array->num_bytes);
-
- // Nothing else to copy for POD types.
- if (in_type_desc->elem_type == MOJOM_TYPE_DESCRIPTOR_TYPE_POD)
- return true;
-
- for (size_t i = 0; i < in_array->num_elements; i++) {
- void* in_elem_data =
- array_index_by_type(in_array, in_type_desc->elem_type, i);
- void* out_elem_data =
- array_index_by_type(*out_array, in_type_desc->elem_type, i);
-
- if (!MojomType_DispatchDeepCopy(buffer, in_type_desc->elem_type,
- in_type_desc->elem_descriptor, in_elem_data,
- out_elem_data)) {
- return false;
- }
- }
-
- return true;
-}
diff --git a/c/lib/bindings/buffer.c b/c/lib/bindings/buffer.c
deleted file mode 100644
index 8a76bec..0000000
--- a/c/lib/bindings/buffer.c
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <mojo/bindings/buffer.h>
-
-#include <assert.h>
-#include <mojo/bindings/internal/util.h>
-#include <stddef.h>
-
-void* MojomBuffer_Allocate(struct MojomBuffer* buf, uint32_t num_bytes) {
- assert(buf);
-
- const uint32_t bytes_used = buf->num_bytes_used;
- const uint64_t size = MOJOM_INTERNAL_ROUND_TO_8((uint64_t)num_bytes);
- if (bytes_used + size > buf->buf_size)
- return NULL;
-
- buf->num_bytes_used += size;
- return buf->buf + bytes_used;
-}
diff --git a/c/lib/bindings/map.c b/c/lib/bindings/map.c
deleted file mode 100644
index 86bc3d2..0000000
--- a/c/lib/bindings/map.c
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <mojo/bindings/map.h>
-
-#include <mojo/macros.h>
-
-struct MojomMapLayout {
- struct MojomStructHeader header_;
- union MojomArrayHeaderPtr keys;
- union MojomArrayHeaderPtr values;
-};
-MOJO_STATIC_ASSERT(sizeof(struct MojomMapLayout) == 24u,
- "MojomMapLayout is an invalid size.");
-
-MojomValidationResult MojomMap_Validate(
- const struct MojomTypeDescriptorStruct* in_type_desc,
- const struct MojomStructHeader* in_struct,
- uint32_t in_buf_size,
- uint32_t in_num_handles,
- struct MojomValidationContext* inout_context) {
- // A mojom map consists of 2 arrays (pointers), both of equal size.
- const struct MojomMapLayout* map = (const struct MojomMapLayout*)in_struct;
- struct MojomArrayHeader* keys_arr =
- (struct MojomArrayHeader*)((char*)map +
- (offsetof(struct MojomMapLayout, keys) +
- map->keys.offset));
- struct MojomArrayHeader* values_arr =
- (struct MojomArrayHeader*)((char*)map +
- (offsetof(struct MojomMapLayout, values) +
- map->values.offset));
-
- if (keys_arr->num_elements != values_arr->num_elements)
- return MOJOM_VALIDATION_DIFFERENT_SIZED_ARRAYS_IN_MAP;
-
- return MOJOM_VALIDATION_ERROR_NONE;
-}
diff --git a/c/lib/bindings/message.c b/c/lib/bindings/message.c
deleted file mode 100644
index 3efc171..0000000
--- a/c/lib/bindings/message.c
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <mojo/bindings/message.h>
-
-#include <mojo/bindings/struct.h>
-#include <stdint.h>
-
-MojomValidationResult MojomMessage_ValidateHeader(const void* in_buf,
- uint32_t in_buf_size) {
- const struct MojomStructHeader* header =
- (const struct MojomStructHeader*)in_buf;
-
- if (in_buf_size < sizeof(struct MojomStructHeader) ||
- in_buf_size < header->num_bytes)
- return MOJOM_VALIDATION_ILLEGAL_MEMORY_RANGE;
-
- const struct MojomMessage* msg = (const struct MojomMessage*)in_buf;
- if (header->version == 0u) {
- if (header->num_bytes != sizeof(struct MojomMessage)) {
- return MOJOM_VALIDATION_UNEXPECTED_STRUCT_HEADER;
- }
-
- // Version 0 has no request id and should not have either of these flags.
- if ((msg->flags & MOJOM_MESSAGE_FLAGS_EXPECTS_RESPONSE) ||
- (msg->flags & MOJOM_MESSAGE_FLAGS_IS_RESPONSE)) {
- return MOJOM_VALIDATION_MESSAGE_HEADER_MISSING_REQUEST_ID;
- }
- } else if (header->version == 1u) {
- if (header->num_bytes != sizeof(struct MojomMessageWithRequestId)) {
- return MOJOM_VALIDATION_UNEXPECTED_STRUCT_HEADER;
- }
- } else if (header->version > 1u) {
- if (header->num_bytes < sizeof(struct MojomMessageWithRequestId)) {
- return MOJOM_VALIDATION_UNEXPECTED_STRUCT_HEADER;
- }
- }
-
- // Mutually exclusive flags.
- if ((msg->flags & MOJOM_MESSAGE_FLAGS_EXPECTS_RESPONSE) &&
- (msg->flags & MOJOM_MESSAGE_FLAGS_IS_RESPONSE)) {
- return MOJOM_VALIDATION_MESSAGE_HEADER_INVALID_FLAGS;
- }
-
- // Accept unknown versions of the message header to be future-proof.
- return MOJOM_VALIDATION_ERROR_NONE;
-}
-
-MojomValidationResult MojomMessage_ValidateRequestExpectingResponse(
- const void* in_buf) {
- const struct MojomMessage* msg = (const struct MojomMessage*)in_buf;
- return (msg->flags & MOJOM_MESSAGE_FLAGS_EXPECTS_RESPONSE)
- ? MOJOM_VALIDATION_ERROR_NONE
- : MOJOM_VALIDATION_MESSAGE_HEADER_INVALID_FLAGS;
-}
-
-MojomValidationResult MojomMessage_ValidateRequestWithoutResponse(
- const void* in_buf) {
- const struct MojomMessage* msg = (const struct MojomMessage*)in_buf;
- return (!(msg->flags & MOJOM_MESSAGE_FLAGS_EXPECTS_RESPONSE) &&
- !(msg->flags & MOJOM_MESSAGE_FLAGS_IS_RESPONSE))
- ? MOJOM_VALIDATION_ERROR_NONE
- : MOJOM_VALIDATION_MESSAGE_HEADER_INVALID_FLAGS;
-}
-
-MojomValidationResult MojomMessage_ValidateResponse(
- const void* in_buf) {
- const struct MojomMessage* msg = (const struct MojomMessage*)in_buf;
- return (msg->flags & MOJOM_MESSAGE_FLAGS_IS_RESPONSE)
- ? MOJOM_VALIDATION_ERROR_NONE
- : MOJOM_VALIDATION_MESSAGE_HEADER_INVALID_FLAGS;
-}
diff --git a/c/lib/bindings/struct.c b/c/lib/bindings/struct.c
deleted file mode 100644
index d678dff..0000000
--- a/c/lib/bindings/struct.c
+++ /dev/null
@@ -1,204 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <mojo/bindings/struct.h>
-
-#include <assert.h>
-#include <mojo/bindings/internal/type_descriptor.h>
-#include <mojo/bindings/union.h>
-#include <string.h>
-
-size_t MojomStruct_ComputeSerializedSize(
- const struct MojomTypeDescriptorStruct* in_type_desc,
- const struct MojomStructHeader* in_struct) {
- assert(in_struct);
- assert(in_type_desc);
-
- size_t size = in_struct->num_bytes;
- for (size_t i = 0; i < in_type_desc->num_entries; i++) {
- const struct MojomTypeDescriptorStructEntry* entry =
- &(in_type_desc->entries[i]);
-
- if (!MojomType_IsPointer(entry->elem_type) &&
- entry->elem_type != MOJOM_TYPE_DESCRIPTOR_TYPE_UNION)
- continue;
-
- if (in_struct->version < entry->min_version)
- continue;
-
- size += MojomType_DispatchComputeSerializedSize(
- entry->elem_type, entry->elem_descriptor, entry->nullable,
- (char*)in_struct + sizeof(struct MojomStructHeader) + entry->offset);
- }
- return size;
-}
-
-void MojomStruct_EncodePointersAndHandles(
- const struct MojomTypeDescriptorStruct* in_type_desc,
- struct MojomStructHeader* inout_struct,
- uint32_t in_struct_size,
- struct MojomHandleBuffer* inout_handles_buffer) {
- assert(in_type_desc);
- assert(inout_struct);
- assert(in_struct_size >= sizeof(struct MojomStructHeader));
-
- for (size_t i = 0; i < in_type_desc->num_entries; i++) {
- const struct MojomTypeDescriptorStructEntry* entry =
- &(in_type_desc->entries[i]);
-
- if (inout_struct->version < entry->min_version)
- continue;
-
- assert(sizeof(struct MojomStructHeader) + entry->offset < in_struct_size);
- void* elem_data = ((char*)inout_struct + sizeof(struct MojomStructHeader) +
- entry->offset);
-
- MojomType_DispatchEncodePointersAndHandles(
- entry->elem_type,
- entry->elem_descriptor,
- entry->nullable,
- elem_data,
- in_struct_size - ((char*)elem_data - (char*)inout_struct),
- inout_handles_buffer);
- }
-}
-
-void MojomStruct_DecodePointersAndHandles(
- const struct MojomTypeDescriptorStruct* in_type_desc,
- struct MojomStructHeader* inout_struct,
- uint32_t in_struct_size,
- MojoHandle* inout_handles,
- uint32_t in_num_handles) {
- assert(in_type_desc);
- assert(inout_struct);
- assert(inout_handles != NULL || in_num_handles == 0);
-
- for (size_t i = 0; i < in_type_desc->num_entries; i++) {
- const struct MojomTypeDescriptorStructEntry* entry =
- &(in_type_desc->entries[i]);
-
- if (inout_struct->version < entry->min_version)
- continue;
-
- assert(sizeof(struct MojomStructHeader) + entry->offset < in_struct_size);
- void* elem_data = ((char*)inout_struct + sizeof(struct MojomStructHeader) +
- entry->offset);
-
- MojomType_DispatchDecodePointersAndHandles(
- entry->elem_type,
- entry->elem_descriptor,
- entry->nullable,
- elem_data,
- in_struct_size - ((char*)elem_data - (char*)inout_struct),
- inout_handles,
- in_num_handles);
- }