Mon, 01 Apr 2019 21:57:01 -0400
Fixup typo in sound theme title.
|
23639
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
1 | /* purple |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
2 | * |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
3 | * 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
|
4 | * 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
|
5 | * source distribution. |
|
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 | * 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
|
8 | * 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
|
9 | * 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
|
10 | * (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
|
11 | * |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
12 | * 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
|
13 | * 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
|
14 | * 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
|
15 | * 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
|
16 | * |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
17 | * 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
|
18 | * 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
|
19 | * 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
|
20 | */ |
|
35487
494f09f7f331
Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents:
35474
diff
changeset
|
21 | |
|
494f09f7f331
Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents:
35474
diff
changeset
|
22 | #ifndef PURPLE_SOUND_THEME_H |
|
494f09f7f331
Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents:
35474
diff
changeset
|
23 | #define PURPLE_SOUND_THEME_H |
|
35442
84e906df98dd
Add section blocks for purple-socket.h to xmlnode.h
Ankit Vani <a@nevitus.org>
parents:
35403
diff
changeset
|
24 | /** |
|
84e906df98dd
Add section blocks for purple-socket.h to xmlnode.h
Ankit Vani <a@nevitus.org>
parents:
35403
diff
changeset
|
25 | * SECTION:sound-theme |
|
84e906df98dd
Add section blocks for purple-socket.h to xmlnode.h
Ankit Vani <a@nevitus.org>
parents:
35403
diff
changeset
|
26 | * @section_id: libpurple-sound-theme |
|
84e906df98dd
Add section blocks for purple-socket.h to xmlnode.h
Ankit Vani <a@nevitus.org>
parents:
35403
diff
changeset
|
27 | * @short_description: <filename>sound-theme.h</filename> |
|
39555
1f7690fa7761
Fixup typo in sound theme title.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39547
diff
changeset
|
28 | * @title: Sound Theme Class |
|
35442
84e906df98dd
Add section blocks for purple-socket.h to xmlnode.h
Ankit Vani <a@nevitus.org>
parents:
35403
diff
changeset
|
29 | */ |
|
23639
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
30 | |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
31 | #include <glib.h> |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
32 | #include <glib-object.h> |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
33 | #include "theme.h" |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
34 | #include "sound.h" |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
35 | |
|
39547
5c68828a566a
Use G_DECLARE* in themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
37094
diff
changeset
|
36 | #define PURPLE_TYPE_SOUND_THEME purple_sound_theme_get_type() |
|
23639
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
37 | |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
38 | /**************************************************************************/ |
| 35472 | 39 | /* Purple Sound Theme API */ |
|
23639
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 | G_BEGIN_DECLS |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
42 | |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
43 | /** |
|
35403
9282701d7aa9
Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
44 | * purple_sound_theme_get_type: |
|
9282701d7aa9
Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
45 | * |
| 35474 | 46 | * Returns: The #GType for a sound theme. |
|
23639
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
47 | */ |
|
39547
5c68828a566a
Use G_DECLARE* in themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
37094
diff
changeset
|
48 | G_DECLARE_FINAL_TYPE(PurpleSoundTheme, purple_sound_theme, PURPLE, SOUND_THEME, |
|
5c68828a566a
Use G_DECLARE* in themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
37094
diff
changeset
|
49 | PurpleTheme) |
|
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 | /** |
|
35403
9282701d7aa9
Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
52 | * purple_sound_theme_get_file: |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
34994
diff
changeset
|
53 | * @theme: The theme. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
34994
diff
changeset
|
54 | * @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
|
55 | * |
|
35403
9282701d7aa9
Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
56 | * Returns a copy of the filename for the sound event. |
|
9282701d7aa9
Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
57 | * |
| 35395 | 58 | * 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
|
59 | */ |
|
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
|
60 | 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
|
61 | const gchar *event); |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
62 | |
|
23639
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
63 | /** |
|
35403
9282701d7aa9
Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
64 | * purple_sound_theme_get_file_full: |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
34994
diff
changeset
|
65 | * @theme: The theme. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
34994
diff
changeset
|
66 | * @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
|
67 | * |
|
35403
9282701d7aa9
Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
68 | * Returns a copy of the directory and filename for the sound event |
|
9282701d7aa9
Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
69 | * |
| 35395 | 70 | * Returns: The directory + '/' + filename of the sound event. This is |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
71 | * 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
|
72 | */ |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
73 | 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
|
74 | const gchar *event); |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
75 | |
|
23639
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
76 | /** |
|
35403
9282701d7aa9
Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
77 | * purple_sound_theme_set_file: |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
34994
diff
changeset
|
78 | * @theme: The theme. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
34994
diff
changeset
|
79 | * @event: the purple sound event to look up |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
34994
diff
changeset
|
80 | * @filename: the name of the file to be used for the event |
|
35403
9282701d7aa9
Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
81 | * |
|
9282701d7aa9
Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
82 | * Sets the filename for a given sound event |
|
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 | 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
|
85 | const gchar *event, |
|
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
86 | const gchar *filename); |
|
23639
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
87 | |
|
c59dd2e328c3
Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff
changeset
|
88 | G_END_DECLS |
|
35403
9282701d7aa9
Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
89 | |
|
25875
a98b16817658
Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents:
23653
diff
changeset
|
90 | #endif /* PURPLE_SOUND_THEME_H */ |