libpurple/dbus-maybe.h

Wed, 20 Jun 2018 02:13:44 -0400

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Wed, 20 Jun 2018 02:13:44 -0400
changeset 39181
f0cd633d86d4
parent 38057
41f47eb1aa19
permissions
-rw-r--r--

prefs: Add binding versions of pref widget functions.

These just bind settings to existing widgets and copy the saved value to
the widget, except for combos which are produced from runtime lists.
Those are populated in a similar way as before.

There are some extra _bind_ words that will probably be dropped once the
other functions are unused.

38057
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
1 /*
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
2 * purple
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
3 *
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
4 * Purple is the legal property of its developers, whose names are too numerous
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
5 * to list here. Please refer to the COPYRIGHT file distributed with this
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
6 * source distribution.
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
7 *
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
8 * This program is free software; you can redistribute it and/or modify
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
9 * it under the terms of the GNU General Public License as published by
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
11 * (at your option) any later version.
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
12 *
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
13 * This program is distributed in the hope that it will be useful,
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
16 * GNU General Public License for more details.
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
17 *
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
18 * You should have received a copy of the GNU General Public License
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
19 * along with this program; if not, write to the Free Software
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
21 *
41f47eb1aa19 Add our license spiel to a bunch of files
Gary Kramlich <grim@reaperworld.com>
parents: 35487
diff changeset
22 */
35487
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35468
diff changeset
23 #ifndef _PURPLE_DBUS_MAYBE_H_
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35468
diff changeset
24 #define _PURPLE_DBUS_MAYBE_H_
35437
1f82cf8c8378 Add section blocks for conversation.h to dbus-server.h
Ankit Vani <a@nevitus.org>
parents: 24231
diff changeset
25 /**
1f82cf8c8378 Add section blocks for conversation.h to dbus-server.h
Ankit Vani <a@nevitus.org>
parents: 24231
diff changeset
26 * SECTION:dbus-maybe
1f82cf8c8378 Add section blocks for conversation.h to dbus-server.h
Ankit Vani <a@nevitus.org>
parents: 24231
diff changeset
27 * @section_id: libpurple-dbus-maybe
1f82cf8c8378 Add section blocks for conversation.h to dbus-server.h
Ankit Vani <a@nevitus.org>
parents: 24231
diff changeset
28 * @short_description: <filename>dbus-maybe.h</filename>
35444
a4ece5a5565a Use upper-case first letters
Ankit Vani <a@nevitus.org>
parents: 35437
diff changeset
29 * @title: DBUS Wrappers
35437
1f82cf8c8378 Add section blocks for conversation.h to dbus-server.h
Ankit Vani <a@nevitus.org>
parents: 24231
diff changeset
30 *
1f82cf8c8378 Add section blocks for conversation.h to dbus-server.h
Ankit Vani <a@nevitus.org>
parents: 24231
diff changeset
31 * This file contains macros that wrap calls to the purple dbus module.
1f82cf8c8378 Add section blocks for conversation.h to dbus-server.h
Ankit Vani <a@nevitus.org>
parents: 24231
diff changeset
32 * These macros call the appropriate functions if the build includes
1f82cf8c8378 Add section blocks for conversation.h to dbus-server.h
Ankit Vani <a@nevitus.org>
parents: 24231
diff changeset
33 * dbus support and do nothing otherwise. See "dbus-server.h" for
1f82cf8c8378 Add section blocks for conversation.h to dbus-server.h
Ankit Vani <a@nevitus.org>
parents: 24231
diff changeset
34 * documentation.
1f82cf8c8378 Add section blocks for conversation.h to dbus-server.h
Ankit Vani <a@nevitus.org>
parents: 24231
diff changeset
35 */
11067
b6353889a9ba [gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff changeset
36
b6353889a9ba [gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff changeset
37 #ifdef HAVE_DBUS
b6353889a9ba [gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff changeset
38
23146
9dc49c4bc4c9 I have no idea why this only started being an issue now, but as I was
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 15884
diff changeset
39 #ifndef DBUS_API_SUBJECT_TO_CHANGE
9dc49c4bc4c9 I have no idea why this only started being an issue now, but as I was
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 15884
diff changeset
40 #define DBUS_API_SUBJECT_TO_CHANGE
9dc49c4bc4c9 I have no idea why this only started being an issue now, but as I was
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 15884
diff changeset
41 #endif
9dc49c4bc4c9 I have no idea why this only started being an issue now, but as I was
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 15884
diff changeset
42
11067
b6353889a9ba [gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff changeset
43 #include "dbus-server.h"
b6353889a9ba [gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff changeset
44
11146
c56333373e3c [gaim-migrate @ 13217]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents: 11067
diff changeset
45 /* this provides a type check */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
46 #define PURPLE_DBUS_REGISTER_POINTER(ptr, type) { \
11146
c56333373e3c [gaim-migrate @ 13217]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents: 11067
diff changeset
47 type *typed_ptr = ptr; \
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
48 purple_dbus_register_pointer(typed_ptr, PURPLE_DBUS_TYPE(type)); \
11146
c56333373e3c [gaim-migrate @ 13217]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents: 11067
diff changeset
49 }
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
50 #define PURPLE_DBUS_UNREGISTER_POINTER(ptr) purple_dbus_unregister_pointer(ptr)
11067
b6353889a9ba [gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff changeset
51
b6353889a9ba [gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff changeset
52 #else /* !HAVE_DBUS */
b6353889a9ba [gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff changeset
53
24231
6907b62f25fe Warnings cleanup from Lee Roach. Fixes #6242.
Daniel Atallah <datallah@pidgin.im>
parents: 23146
diff changeset
54 #define PURPLE_DBUS_REGISTER_POINTER(ptr, type) { \
6907b62f25fe Warnings cleanup from Lee Roach. Fixes #6242.
Daniel Atallah <datallah@pidgin.im>
parents: 23146
diff changeset
55 if (ptr) {} \
6907b62f25fe Warnings cleanup from Lee Roach. Fixes #6242.
Daniel Atallah <datallah@pidgin.im>
parents: 23146
diff changeset
56 }
6907b62f25fe Warnings cleanup from Lee Roach. Fixes #6242.
Daniel Atallah <datallah@pidgin.im>
parents: 23146
diff changeset
57
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
58 #define PURPLE_DBUS_UNREGISTER_POINTER(ptr)
11067
b6353889a9ba [gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff changeset
59
b6353889a9ba [gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff changeset
60 #endif /* HAVE_DBUS */
b6353889a9ba [gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff changeset
61
b6353889a9ba [gaim-migrate @ 13048]
Piotr Zielinski <zielaj@users.sourceforge.net>
parents:
diff changeset
62 #endif

mercurial