aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/mimesh/libg3d-0.0.8/include/g3d/read.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/mimesh/libg3d-0.0.8/include/g3d/read.h')
-rw-r--r--src/others/mimesh/libg3d-0.0.8/include/g3d/read.h156
1 files changed, 156 insertions, 0 deletions
diff --git a/src/others/mimesh/libg3d-0.0.8/include/g3d/read.h b/src/others/mimesh/libg3d-0.0.8/include/g3d/read.h
new file mode 100644
index 0000000..08211e3
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/include/g3d/read.h
@@ -0,0 +1,156 @@
1/* $Id$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22
23#ifndef __G3D_READ_H__
24#define __G3D_READ_H__
25
26#ifndef G3D_DISABLE_DEPRECATED
27
28#include <stdio.h>
29#include <glib.h>
30
31#ifdef __cplusplus
32extern "C" {
33#endif /* ifdef __cplusplus */
34
35/**
36 * SECTION:read
37 * @short_description: file reading abstraction (deprecated)
38 * @see_also: g3d_stream_open_file
39 * @include: g3d/read.h
40 *
41 * The g3d_read_* family of functions is deprecated in favour of the #G3DStream
42 * interface.
43 */
44
45
46/**
47 * g3d_read_int8:
48 * @f: the file to read from
49 *
50 * Read a 1 byte signed integer from file.
51 *
52 * Returns: The read value, 0 in case of error
53 */
54gint32 g3d_read_int8(FILE *f);
55
56/**
57 * g3d_read_int16_be:
58 * @f: the file to read from
59 *
60 * Read a 2 byte big-endian signed integer from file.
61 *
62 * Returns: The read value, 0 in case of error
63 */
64gint32 g3d_read_int16_be(FILE *f);
65
66/**
67 * g3d_read_int16_le:
68 * @f: the file to read from
69 *
70 * Read a 2 byte little-endian signed integer from file.
71 *
72 * Returns: The read value, 0 in case of error
73 */
74gint32 g3d_read_int16_le(FILE *f);
75
76/**
77 * g3d_read_int32_be:
78 * @f: the file to read from
79 *
80 * Read a 4 byte big-endian signed integer from file.
81 *
82 * Returns: The read value, 0 in case of error
83 */
84gint32 g3d_read_int32_be(FILE *f);
85
86/**
87 * g3d_read_int32_le:
88 * @f: the file to read from
89 *
90 * Read a 4 byte little-endian signed integer from file.
91 *
92 * Returns: The read value, 0 in case of error
93 */
94gint32 g3d_read_int32_le(FILE *f);
95
96/**
97 * g3d_read_float_be:
98 * @f: the file to read from
99 *
100 * Read a 4 byte big-endian floating point number from file.
101 *
102 * Returns: The read value, 0 in case of error
103 */
104G3DFloat g3d_read_float_be(FILE *f);
105
106/**
107 * g3d_read_float_le:
108 * @f: the file to read from
109 *
110 * Read a 4 byte little-endian floating point number from file.
111 *
112 * Returns: The read value, 0 in case of error
113 */
114G3DFloat g3d_read_float_le(FILE *f);
115
116/**
117 * g3d_read_double_be:
118 * @f: the file to read from
119 *
120 * Read a 8 byte big-endian double-precision floating point number from file.
121 *
122 * Returns: The read value, 0 in case of error
123 */
124G3DDouble g3d_read_double_be(FILE *f);
125
126/**
127 * g3d_read_double_le:
128 * @f: the file to read from
129 *
130 * Read a 8 byte little-endian double-precision floating point number from
131 * file.
132 *
133 * Returns: The read value, 0 in case of error
134 */
135G3DDouble g3d_read_double_le(FILE *f);
136
137/**
138 * g3d_read_cstr:
139 * @f: the file to read from
140 * @buffer: the buffer to store line in
141 * @max_len: maximum length of string including termination character
142 *
143 * Read a zero-terminated string from file.
144 *
145 * Returns: number of bytes read from file.
146 */
147gint32 g3d_read_cstr(FILE *f, gchar *buffer, gint32 max_len);
148
149#ifdef __cplusplus
150}
151#endif /* ifdef __cplusplus */
152
153#endif /* G3D_DISABLE_DEPRECATED */
154
155#endif /* __G3D_READ_H__ */
156