Mercurial > pidgin
annotate libpurple/sound-theme.h @ 32819:2c6510167895 default tip
propagate from branch 'im.pidgin.pidgin.2.x.y' (head 3315c5dfbd0ad16511bdcf865e5b07c02d07df24)
to branch 'im.pidgin.pidgin' (head cbd1eda6bcbf0565ae7766396bb8f6f419cb6a9a)
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sat, 02 Jun 2012 02:30:49 +0000 |
parents | 4d92a431d0a1 |
children |
rev | line source |
---|---|
25082
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
1 /** |
1cf10adc9b32
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 |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
3 */ |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
4 |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
5 /* purple |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
6 * |
1cf10adc9b32
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 |
1cf10adc9b32
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 |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
9 * source distribution. |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
10 * |
1cf10adc9b32
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 |
1cf10adc9b32
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 |
1cf10adc9b32
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 |
1cf10adc9b32
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. |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
15 * |
1cf10adc9b32
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, |
1cf10adc9b32
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 |
1cf10adc9b32
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 |
1cf10adc9b32
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. |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
20 * |
1cf10adc9b32
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 |
1cf10adc9b32
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 |
1cf10adc9b32
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 |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
24 */ |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
25 |
25911
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
25096
diff
changeset
|
26 #ifndef PURPLE_SOUND_THEME_H |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
25096
diff
changeset
|
27 #define PURPLE_SOUND_THEME_H |
25082
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
28 |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
29 #include <glib.h> |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
30 #include <glib-object.h> |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
31 #include "theme.h" |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
32 #include "sound.h" |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
33 |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
34 /** |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
35 * extends PurpleTheme (theme.h) |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
36 * A purple sound theme. |
1cf10adc9b32
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. |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
38 * |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
39 * PurpleSoundTheme is a PurpleTheme Object. |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
40 */ |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
41 typedef struct _PurpleSoundTheme PurpleSoundTheme; |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
42 typedef struct _PurpleSoundThemeClass PurpleSoundThemeClass; |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
43 |
25911
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
25096
diff
changeset
|
44 #define PURPLE_TYPE_SOUND_THEME (purple_sound_theme_get_type()) |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
25096
diff
changeset
|
45 #define PURPLE_SOUND_THEME(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_SOUND_THEME, PurpleSoundTheme)) |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
25096
diff
changeset
|
46 #define PURPLE_SOUND_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_SOUND_THEME, PurpleSoundThemeClass)) |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
25096
diff
changeset
|
47 #define PURPLE_IS_SOUND_THEME(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_SOUND_THEME)) |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
25096
diff
changeset
|
48 #define PURPLE_IS_SOUND_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_SOUND_THEME)) |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
25096
diff
changeset
|
49 #define PURPLE_SOUND_THEME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_SOUND_THEME, PurpleSoundThemeClass)) |
25082
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
50 |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
51 struct _PurpleSoundTheme |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
52 { |
25089
d60c3d1c6966
fixed some gobject stuff
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
25085
diff
changeset
|
53 PurpleTheme parent; |
25082
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
54 }; |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
55 |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
56 struct _PurpleSoundThemeClass |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
57 { |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
58 PurpleThemeClass parent_class; |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
59 }; |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
60 |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
61 /**************************************************************************/ |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
62 /** @name Purple Sound Theme API */ |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
63 /**************************************************************************/ |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
64 G_BEGIN_DECLS |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
65 |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
66 /** |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
67 * GObject foo. |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
68 * @internal. |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
69 */ |
1cf10adc9b32
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); |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
71 |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
72 /** |
25911
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
25096
diff
changeset
|
73 * Returns a copy of the filename for the sound event. |
25082
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
74 * |
26669
b1c8ffbd48f9
Fix more `make docs` warnings
Paul Aurich <paul@darkrain42.org>
parents:
25911
diff
changeset
|
75 * @param theme The theme. |
25911
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
25096
diff
changeset
|
76 * @param event The purple sound event to look up. |
25082
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
77 * |
25911
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
25096
diff
changeset
|
78 * @returns The filename of the sound event. |
25082
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
79 */ |
25096
fbf72bbd1084
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:
25092
diff
changeset
|
80 const gchar *purple_sound_theme_get_file(PurpleSoundTheme *theme, |
25911
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
25096
diff
changeset
|
81 const gchar *event); |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
25096
diff
changeset
|
82 |
25082
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
83 /** |
1cf10adc9b32
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 |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
85 * |
26669
b1c8ffbd48f9
Fix more `make docs` warnings
Paul Aurich <paul@darkrain42.org>
parents:
25911
diff
changeset
|
86 * @param theme The theme. |
25911
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
25096
diff
changeset
|
87 * @param event The purple sound event to look up |
25082
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
88 * |
25911
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
25096
diff
changeset
|
89 * @returns The directory + '/' + filename of the sound event. This is |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
25096
diff
changeset
|
90 * a newly allocated string that should be freed with g_free. |
25082
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
91 */ |
1cf10adc9b32
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, |
25911
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
25096
diff
changeset
|
93 const gchar *event); |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
25096
diff
changeset
|
94 |
25082
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
95 /** |
1cf10adc9b32
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 |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
97 * |
26669
b1c8ffbd48f9
Fix more `make docs` warnings
Paul Aurich <paul@darkrain42.org>
parents:
25911
diff
changeset
|
98 * @param theme The theme. |
b1c8ffbd48f9
Fix more `make docs` warnings
Paul Aurich <paul@darkrain42.org>
parents:
25911
diff
changeset
|
99 * @param event the purple sound event to look up |
b1c8ffbd48f9
Fix more `make docs` warnings
Paul Aurich <paul@darkrain42.org>
parents:
25911
diff
changeset
|
100 * @param filename the name of the file to be used for the event |
25082
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
101 */ |
1cf10adc9b32
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, |
25911
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
25096
diff
changeset
|
103 const gchar *event, |
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
25096
diff
changeset
|
104 const gchar *filename); |
25082
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
105 |
1cf10adc9b32
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
106 G_END_DECLS |
25911
0c7b74fc558e
Lots of minor whitespace and comment changes:
Mark Doliner <mark@kingant.net>
parents:
25096
diff
changeset
|
107 #endif /* PURPLE_SOUND_THEME_H */ |