Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ppapi / generators / test_cgen / structs.h
blob352e08e890c7416401aa83741e02af103d16166f
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 */
7 /* From test_cgen/structs.idl modified Wed Nov 21 11:02:50 2012. */
9 #ifndef PPAPI_C_TEST_CGEN_STRUCTS_H_
10 #define PPAPI_C_TEST_CGEN_STRUCTS_H_
12 #include "ppapi/c/pp_macros.h"
13 #include "ppapi/c/test_cgen/stdint.h"
15 /**
16 * @file
17 * This file will test that the IDL snippet matches the comment.
21 /**
22 * @addtogroup Typedefs
23 * @{
25 /* typedef uint8_t s_array[3]; */
26 typedef uint8_t s_array[3];
27 /**
28 * @}
31 /**
32 * @addtogroup Enums
33 * @{
35 /* typedef enum { esv1 = 1, esv2 = 2 } senum; */
36 typedef enum {
37 esv1 = 1,
38 esv2 = 2
39 } senum;
40 /**
41 * @}
44 /**
45 * @addtogroup Structs
46 * @{
48 /* struct st1 { int32_t i; senum j; }; */
49 struct st1 {
50 int32_t i;
51 senum j;
54 /* struct st2 { s_array pixels[640][480]; }; */
55 struct st2 {
56 s_array pixels[640][480];
58 /**
59 * @}
62 /**
63 * @addtogroup Typedefs
64 * @{
66 /* typedef float (*func_t)(const s_array data); */
67 typedef float (*func_t)(const s_array data);
69 /* typedef func_t (*findfunc_t)(const char* x); */
70 typedef func_t (*findfunc_t)(const char* x);
71 /**
72 * @}
75 /**
76 * @addtogroup Structs
77 * @{
80 * struct sfoo {
81 * s_array screen[480][640];
82 * findfunc_t myfunc;
83 * };
85 struct sfoo {
86 s_array screen[480][640];
87 findfunc_t myfunc;
89 /**
90 * @}
93 #endif /* PPAPI_C_TEST_CGEN_STRUCTS_H_ */