enum_typedef.h revision 2a99a7e74a7f215066514fe81d2bfa6639d9eddd
1/*
2 * Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
5 */
6
7/* From test_cgen/enum_typedef.idl modified Wed Dec  5 13:08:05 2012. */
8
9#ifndef PPAPI_C_TEST_CGEN_ENUM_TYPEDEF_H_
10#define PPAPI_C_TEST_CGEN_ENUM_TYPEDEF_H_
11
12#include "ppapi/c/pp_macros.h"
13#include "ppapi/c/test_cgen/stdint.h"
14
15/**
16 * @file
17 * This file will test that the IDL snippet matches the comment.
18 */
19
20
21/**
22 * @addtogroup Enums
23 * @{
24 */
25/* typedef enum { A = 1, B = 2, C = 3, D = A + B, E = ~D } et1; */
26typedef enum {
27  A = 1,
28  B = 2,
29  C = 3,
30  D = A + B,
31  E = ~D
32} et1;
33/**
34 * @}
35 */
36
37/**
38 * @addtogroup Typedefs
39 * @{
40 */
41/* typedef int32_t i; */
42typedef int32_t i;
43
44/* typedef int32_t i2[3]; */
45typedef int32_t i2[3];
46
47/* typedef int32_t (*i_func)(void); */
48typedef int32_t (*i_func)(void);
49
50/* typedef int32_t (*i_func_i)(int32_t i); */
51typedef int32_t (*i_func_i)(int32_t i);
52
53/* typedef et1 et4[4]; */
54typedef et1 et4[4];
55
56/*
57 * typedef int8_t (*PPB_Audio_Callback)(const void* sample_buffer,
58 *                                   uint32_t buffer_size_in_bytes,
59 *                                   const void* user_data);
60 */
61typedef int8_t (*PPB_Audio_Callback)(const void* sample_buffer,
62                                     uint32_t buffer_size_in_bytes,
63                                     const void* user_data);
64/**
65 * @}
66 */
67
68#endif  /* PPAPI_C_TEST_CGEN_ENUM_TYPEDEF_H_ */
69
70