Sun, 02 Jun 2013 22:17:12 +0200
VV: win32 support. No runtimes dependencies in dep-bundle yet. Refs #11075
|
23639
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
1 | /** |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
2 | * @file sound-theme.h Purple Sound Theme Abstact Class API |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
3 | */ |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
4 | |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
5 | /* purple |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
6 | * |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
7 | * Purple is the legal property of its developers, whose names are too numerous |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
8 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
9 | * source distribution. |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
10 | * |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
11 | * This program is free software; you can redistribute it and/or modify |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
12 | * it under the terms of the GNU General Public License as published by |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
13 | * the Free Software Foundation; either version 2 of the License, or |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
14 | * (at your option) any later version. |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
15 | * |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
16 | * This program is distributed in the hope that it will be useful, |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
19 | * GNU General Public License for more details. |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
20 | * |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
21 | * You should have received a copy of the GNU General Public License |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
22 | * along with this program; if not, write to the Free Software |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
23 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
24 | */ |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
25 | |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
26 | #ifndef PURPLE_SOUND_THEME_H |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
27 | #define PURPLE_SOUND_THEME_H |
|
23639
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
28 | |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
29 | #include <glib.h> |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
30 | #include <glib-object.h> |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
31 | #include "theme.h" |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
32 | #include "sound.h" |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
33 | |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
34 | /** |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
35 | * extends PurpleTheme (theme.h) |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
36 | * A purple sound theme. |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
37 | * This is an object for Purple to represent a sound theme. |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
38 | * |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
39 | * PurpleSoundTheme is a PurpleTheme Object. |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
40 | */ |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
41 | typedef struct _PurpleSoundTheme PurpleSoundTheme; |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
42 | typedef struct _PurpleSoundThemeClass PurpleSoundThemeClass; |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
43 | |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
44 | #define PURPLE_TYPE_SOUND_THEME (purple_sound_theme_get_type()) |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
45 | #define PURPLE_SOUND_THEME(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_SOUND_THEME, PurpleSoundTheme)) |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
46 | #define PURPLE_SOUND_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_SOUND_THEME, PurpleSoundThemeClass)) |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
47 | #define PURPLE_IS_SOUND_THEME(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_SOUND_THEME)) |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
48 | #define PURPLE_IS_SOUND_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_SOUND_THEME)) |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
49 | #define PURPLE_SOUND_THEME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_SOUND_THEME, PurpleSoundThemeClass)) |
|
23639
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
50 | |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
51 | struct _PurpleSoundTheme |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
52 | { |
|
23646
ec4f4e6508b1
fixed some gobject stuff
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23642
diff
changeset
|
53 | PurpleTheme parent; |
|
23639
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
54 | }; |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
55 | |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
56 | struct _PurpleSoundThemeClass |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
57 | { |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
58 | PurpleThemeClass parent_class; |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
59 | }; |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
60 | |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
61 | /**************************************************************************/ |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
62 | /** @name Purple Sound Theme API */ |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
63 | /**************************************************************************/ |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
64 | G_BEGIN_DECLS |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
65 | |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
66 | /** |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
67 | * GObject foo. |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
68 | * @internal. |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
69 | */ |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
70 | GType purple_sound_theme_get_type(void); |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
71 | |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
72 | /** |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
73 | * Returns a copy of the filename for the sound event. |
|
23639
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
74 | * |
|
26385
91c16c785e03
Fix more `make docs` warnings
Paul Aurich <darkrain42@pidgin.im>
parents:
25875
diff
changeset
|
75 | * @param theme The theme. |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
76 | * @param event The purple sound event to look up. |
|
23639
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
77 | * |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
78 | * @returns The filename of the sound event. |
|
23639
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
79 | */ |
|
23653
79934bf9a349
Fixed up a few typos, readability, leaks, and bugs, all minor and mostly in theme and theme loader classes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
23649
diff
changeset
|
80 | const gchar *purple_sound_theme_get_file(PurpleSoundTheme *theme, |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
81 | const gchar *event); |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
82 | |
|
23639
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
83 | /** |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
84 | * Returns a copy of the directory and filename for the sound event |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
85 | * |
|
26385
91c16c785e03
Fix more `make docs` warnings
Paul Aurich <darkrain42@pidgin.im>
parents:
25875
diff
changeset
|
86 | * @param theme The theme. |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
87 | * @param event The purple sound event to look up |
|
23639
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
88 | * |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
89 | * @returns The directory + '/' + filename of the sound event. This is |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
90 | * a newly allocated string that should be freed with g_free. |
|
23639
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
91 | */ |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
92 | gchar *purple_sound_theme_get_file_full(PurpleSoundTheme *theme, |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
93 | const gchar *event); |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
94 | |
|
23639
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
95 | /** |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
96 | * Sets the filename for a given sound event |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
97 | * |
|
26385
91c16c785e03
Fix more `make docs` warnings
Paul Aurich <darkrain42@pidgin.im>
parents:
25875
diff
changeset
|
98 | * @param theme The theme. |
|
91c16c785e03
Fix more `make docs` warnings
Paul Aurich <darkrain42@pidgin.im>
parents:
25875
diff
changeset
|
99 | * @param event the purple sound event to look up |
|
91c16c785e03
Fix more `make docs` warnings
Paul Aurich <darkrain42@pidgin.im>
parents:
25875
diff
changeset
|
100 | * @param filename the name of the file to be used for the event |
|
23639
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
101 | */ |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
102 | void purple_sound_theme_set_file(PurpleSoundTheme *theme, |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
103 | const gchar *event, |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
104 | const gchar *filename); |
|
23639
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
105 | |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
106 | G_END_DECLS |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
107 | #endif /* PURPLE_SOUND_THEME_H */ |