Home | History | Annotate | Download | only in test_cgen
      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/interface.idl modified Wed Nov 21 14:22:50 2012. */
      8 
      9 #ifndef PPAPI_C_TEST_CGEN_INTERFACE_H_
     10 #define PPAPI_C_TEST_CGEN_INTERFACE_H_
     11 
     12 #include "ppapi/c/pp_macros.h"
     13 #include "ppapi/c/test_cgen/stdint.h"
     14 
     15 #define IFACEFOO_INTERFACE_1_0 "ifaceFoo;1.0"
     16 #define IFACEFOO_INTERFACE IFACEFOO_INTERFACE_1_0
     17 
     18 #define IFACEBAR_INTERFACE_1_0 "ifaceBar;1.0"
     19 #define IFACEBAR_INTERFACE IFACEBAR_INTERFACE_1_0
     20 
     21 /**
     22  * @file
     23  * This file will test that the IDL snippet matches the comment.
     24  */
     25 
     26 
     27 /**
     28  * @addtogroup Structs
     29  * @{
     30  */
     31 /* struct ist { void* X; }; */
     32 struct ist {
     33   void* X;
     34 };
     35 /**
     36  * @}
     37  */
     38 
     39 /**
     40  * @addtogroup Interfaces
     41  * @{
     42  */
     43 /*
     44  * struct ifaceFoo_1_0 {
     45  * int8_t (*mem1)(int16_t x, int32_t y);
     46  * int32_t (*mem2)(const struct ist* a);
     47  * int32_t (*mem3)(struct ist* b);
     48  * int32_t (*mem4)(const void** ptr);
     49  * int32_t (*mem5)(void** ptr);
     50  * };
     51  * typedef struct ifaceFoo_1_0 ifaceFoo;
     52  */
     53 struct ifaceFoo_1_0 {
     54   int8_t (*mem1)(int16_t x, int32_t y);
     55   int32_t (*mem2)(const struct ist* a);
     56   int32_t (*mem3)(struct ist* b);
     57   int32_t (*mem4)(const void** ptr);
     58   int32_t (*mem5)(void** ptr);
     59 };
     60 
     61 typedef struct ifaceFoo_1_0 ifaceFoo;
     62 
     63 struct ifaceBar_1_0 {
     64   int8_t (*testIface)(const struct ifaceFoo_1_0* foo, int32_t y);
     65   struct ifaceFoo_1_0* (*createIface)(const char* name);
     66 };
     67 
     68 typedef struct ifaceBar_1_0 ifaceBar;
     69 /**
     70  * @}
     71  */
     72 
     73 /**
     74  * @addtogroup Structs
     75  * @{
     76  */
     77 struct struct2 {
     78   struct ifaceBar_1_0* bar;
     79 };
     80 /**
     81  * @}
     82  */
     83 
     84 #endif  /* PPAPI_C_TEST_CGEN_INTERFACE_H_ */
     85 
     86