Mercurial > audlegacy
annotate src/audacious/vfs_buffer.h @ 3421:9d6f17ceebb3 trunk
ui_skinselector: don't call gtk_main_iteration() here, as it's unsafe to do so from within the main loop.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Sun, 02 Sep 2007 23:44:59 -0500 |
parents | f1c756f39e6c |
children | 2eee464379dc |
rev | line source |
---|---|
2896
51dda959be4d
Backed out changeset 7d3beedf1db8677dab2327bc8d85af4746344f6e
William Pitcock <nenolod@atheme.org>
parents:
2861
diff
changeset
|
1 /* Audacious |
51dda959be4d
Backed out changeset 7d3beedf1db8677dab2327bc8d85af4746344f6e
William Pitcock <nenolod@atheme.org>
parents:
2861
diff
changeset
|
2 * Copyright (c) 2006-2007 William Pitcock |
2313 | 3 * |
2896
51dda959be4d
Backed out changeset 7d3beedf1db8677dab2327bc8d85af4746344f6e
William Pitcock <nenolod@atheme.org>
parents:
2861
diff
changeset
|
4 * This program is free software; you can redistribute it and/or modify |
51dda959be4d
Backed out changeset 7d3beedf1db8677dab2327bc8d85af4746344f6e
William Pitcock <nenolod@atheme.org>
parents:
2861
diff
changeset
|
5 * it under the terms of the GNU General Public License as published by |
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
2896
diff
changeset
|
6 * the Free Software Foundation; under version 3 of the License. |
2313 | 7 * |
2896
51dda959be4d
Backed out changeset 7d3beedf1db8677dab2327bc8d85af4746344f6e
William Pitcock <nenolod@atheme.org>
parents:
2861
diff
changeset
|
8 * This program is distributed in the hope that it will be useful, |
51dda959be4d
Backed out changeset 7d3beedf1db8677dab2327bc8d85af4746344f6e
William Pitcock <nenolod@atheme.org>
parents:
2861
diff
changeset
|
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
51dda959be4d
Backed out changeset 7d3beedf1db8677dab2327bc8d85af4746344f6e
William Pitcock <nenolod@atheme.org>
parents:
2861
diff
changeset
|
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
51dda959be4d
Backed out changeset 7d3beedf1db8677dab2327bc8d85af4746344f6e
William Pitcock <nenolod@atheme.org>
parents:
2861
diff
changeset
|
11 * GNU General Public License for more details. |
2313 | 12 * |
2896
51dda959be4d
Backed out changeset 7d3beedf1db8677dab2327bc8d85af4746344f6e
William Pitcock <nenolod@atheme.org>
parents:
2861
diff
changeset
|
13 * You should have received a copy of the GNU General Public License |
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
2896
diff
changeset
|
14 * along with this program. If not, see <http://www.gnu.org/licenses>. |
3123
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
15 * |
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
16 * The Audacious team does not consider modular code linking to |
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
17 * Audacious or using our public API to be a derived work. |
2313 | 18 */ |
19 | |
20 #ifndef AUDACIOUS_VFS_BUFFER_H | |
21 #define AUDACIOUS_VFS_BUFFER_H | |
22 | |
23 #include <glib.h> | |
24 #include "vfs.h" | |
25 | |
26 G_BEGIN_DECLS | |
27 | |
28 /** | |
29 * VFSBuffer: | |
30 * @data: The data inside the VFSBuffer. | |
31 * @iter: The current position of the VFS buffer iterator. | |
32 * @begin: The beginning of the memory segment that the VFS buffer uses. | |
33 * @end: The end of the memory segment that the VFS buffer uses. | |
34 * @size: The size of the memory segment. | |
35 * | |
36 * Private data for the VFS memorybuffer class. | |
37 **/ | |
38 | |
39 typedef struct { | |
40 guchar *data; | |
41 guchar *iter; | |
42 guchar *end; | |
43 gsize size; | |
44 } VFSBuffer; | |
45 | |
46 /** | |
47 * vfs_buffer_new: | |
48 * @data: Pointer to data to use. | |
49 * @size: Size of data to use. | |
50 * | |
51 * Creates a VFS buffer for reading/writing to a memory segment. | |
52 * | |
53 * Return value: A VFSFile handle for the memory segment's stream | |
54 * representation. | |
55 **/ | |
56 VFSFile *vfs_buffer_new(gpointer data, gsize size); | |
57 | |
58 /** | |
59 * vfs_buffer_new_from_string: | |
60 * @str: String to use. | |
61 * | |
62 * Creates a VFS buffer for reading/writing to a string. | |
63 * | |
64 * Return value: A VFSFile handle for the memory segment's stream | |
65 * representation. | |
66 **/ | |
67 VFSFile *vfs_buffer_new_from_string(gchar *str); | |
68 | |
69 G_END_DECLS | |
70 | |
71 #endif |