Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Unified Diff: ppapi/generators/test_cgen/structs.h

Issue 7477056: Add base class for generators (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/generators/test_cgen/stdint.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/generators/test_cgen/structs.h
===================================================================
--- ppapi/generators/test_cgen/structs.h (revision 0)
+++ ppapi/generators/test_cgen/structs.h (revision 0)
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2011 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.
+ */
+
+/* From test_cgen/structs.idl modified Mon Aug 22 15:15:38 2011. */
+
+#ifndef PPAPI_C_TEST_CGEN_STRUCTS_H_
+#define PPAPI_C_TEST_CGEN_STRUCTS_H_
+
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/test_cgen/stdint.h"
+
+/**
+ * @file
+ * This file will test that the IDL snippet matches the comment.
+ */
+
+
+/**
+ * @addtogroup Typedefs
+ * @{
+ */
+/* typedef uint8_t s_array[3]; */
+typedef uint8_t s_array[3];
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup Enums
+ * @{
+ */
+/* typedef enum { esv1 = 1, esv2 = 2 } senum; */
+typedef enum {
+ esv1 = 1,
+ esv2 = 2
+} senum;
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup Structs
+ * @{
+ */
+/* struct st1 { int32_t i; senum j; }; */
+struct st1 {
+ int32_t i;
+ senum j;
+};
+
+/* struct st2 { s_array pixels[640][480]; }; */
+struct st2 {
+ s_array pixels[640][480];
+};
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup Typedefs
+ * @{
+ */
+/* typedef float (*func_t)(const s_array data); */
+typedef float (*func_t)(const s_array data);
+
+/* typedef func_t (*findfunc_t)(const char* x); */
+typedef func_t (*findfunc_t)(const char* x);
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup Structs
+ * @{
+ */
+/*
+ * struct sfoo {
+ * s_array screen[480][640];
+ * findfunc_t myfunc;
+ * };
+ */
+struct sfoo {
+ s_array screen[480][640];
+ findfunc_t myfunc;
+};
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_TEST_CGEN_STRUCTS_H_ */
+
Property changes on: ppapi/generators/test_cgen/structs.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « ppapi/generators/test_cgen/stdint.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698