structs.idl revision 5821806d5e7f356e8fa4b058a389a808ea183019
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/** 8 * This file will test that the IDL snippet matches the comment. 9 */ 10 11/* typedef uint8_t s_array[3]; */ 12typedef uint8_t[3] s_array; 13 14/* typedef enum { esv1 = 1, esv2 = 2 } senum; */ 15enum senum { 16 esv1=1, 17 esv2=2 18}; 19 20/* struct st1 { int32_t i; senum j; }; */ 21struct st1 { 22 int32_t i; 23 senum j; 24}; 25 26/* struct st2 { s_array pixels[640][480]; }; */ 27struct st2 { 28 s_array[640][480] pixels; 29}; 30 31/* typedef float (*func_t)(const s_array data); */ 32typedef float_t func_t([in] s_array data); 33 34/* typedef func_t (*findfunc_t)(const char* x); */ 35typedef func_t findfunc_t([in] str_t x); 36 37/* 38 * struct sfoo { 39 * s_array screen[480][640]; 40 * findfunc_t myfunc; 41 * }; 42 */ 43struct sfoo { 44 s_array[480][640] screen; 45 findfunc_t myfunc; 46}; 47