pidgin/pidginprotocolchooser.h

Mon, 23 Oct 2023 22:08:37 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Mon, 23 Oct 2023 22:08:37 -0500
changeset 42383
e8302a55fddb
parent 41691
83849603277b
child 42465
b7d530551c1b
permissions
-rw-r--r--

Create PurpleIdleManager for managing idle states

Testing Done:
Ran the unit tests

Bugs closed: PIDGIN-17818

Reviewed at https://reviews.imfreedom.org/r/2586/

40297
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Pidgin - Internet Messenger
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * Pidgin is the legal property of its developers, whose names are too numerous
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * source distribution.
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 *
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * (at your option) any later version.
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * GNU General Public License for more details.
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 *
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 * along with this program; if not, write to the Free Software
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22 */
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23
40502
875489636847 pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents: 40300
diff changeset
24 #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION)
875489636847 pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents: 40300
diff changeset
25 # error "only <pidgin.h> may be included directly"
875489636847 pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents: 40300
diff changeset
26 #endif
875489636847 pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents: 40300
diff changeset
27
40297
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #ifndef PIDGIN_PROTOCOL_CHOOSER_H
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29 #define PIDGIN_PROTOCOL_CHOOSER_H
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 #include <gtk/gtk.h>
41649
35733be03440 Convert the protocol chooser to a GtkDropDown
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41645
diff changeset
32 #include <adwaita.h>
40297
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33
40299
e2f8638bac5a Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents: 40297
diff changeset
34 #include <purple.h>
e2f8638bac5a Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents: 40297
diff changeset
35
40297
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 G_BEGIN_DECLS
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 #define PIDGIN_TYPE_PROTOCOL_CHOOSER (pidgin_protocol_chooser_get_type())
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 G_DECLARE_FINAL_TYPE(PidginProtocolChooser, pidgin_protocol_chooser, PIDGIN,
41691
83849603277b Convert PidginProtocolChooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41649
diff changeset
41 PROTOCOL_CHOOSER, AdwComboRow)
40297
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 /**
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 * pidgin_protocol_chooser_new:
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45 *
41649
35733be03440 Convert the protocol chooser to a GtkDropDown
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41645
diff changeset
46 * Creates a drop down for a user to select a protocol from.
40297
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 *
41649
35733be03440 Convert the protocol chooser to a GtkDropDown
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41645
diff changeset
48 * Returns: (transfer full): The protocol chooser drop down.
40297
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49 *
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 * Since: 3.0.0
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 */
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 GtkWidget *pidgin_protocol_chooser_new(void);
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54 /**
41645
fb8bfbd95195 Add a PidginProtocolChooser::protocol property
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41187
diff changeset
55 * pidgin_protocol_chooser_get_protocol:
40297
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 * @chooser: The #PidginProtocolChooser instance.
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 *
40299
e2f8638bac5a Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents: 40297
diff changeset
58 * Gets the currently selected protocol from @chooser.
40297
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59 *
41649
35733be03440 Convert the protocol chooser to a GtkDropDown
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41645
diff changeset
60 * Returns: (transfer none): The selected [class@Purple.Protocol] or %NULL if
41645
fb8bfbd95195 Add a PidginProtocolChooser::protocol property
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41187
diff changeset
61 * nothing is selected.
40297
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62 *
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63 * Since: 3.0.0
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 */
41645
fb8bfbd95195 Add a PidginProtocolChooser::protocol property
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41187
diff changeset
65 PurpleProtocol *pidgin_protocol_chooser_get_protocol(PidginProtocolChooser *chooser);
40297
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 /**
41645
fb8bfbd95195 Add a PidginProtocolChooser::protocol property
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41187
diff changeset
68 * pidgin_protocol_chooser_set_protocol:
40297
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69 * @chooser: The #PidginProtocolChooser instance.
41645
fb8bfbd95195 Add a PidginProtocolChooser::protocol property
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41187
diff changeset
70 * @protocol: (transfer none): The protocol to select.
40299
e2f8638bac5a Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents: 40297
diff changeset
71 *
41645
fb8bfbd95195 Add a PidginProtocolChooser::protocol property
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41187
diff changeset
72 * Sets the currently selected protocol of @chooser to the given
fb8bfbd95195 Add a PidginProtocolChooser::protocol property
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41187
diff changeset
73 * [class@Purple.Protocol].
40299
e2f8638bac5a Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents: 40297
diff changeset
74 *
e2f8638bac5a Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents: 40297
diff changeset
75 * Since: 3.0.0
e2f8638bac5a Clean up set_account_protocol_cb and change some accessors for PidginProtocolChooser
Gary Kramlich <grim@reaperworld.com>
parents: 40297
diff changeset
76 */
41645
fb8bfbd95195 Add a PidginProtocolChooser::protocol property
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41187
diff changeset
77 void pidgin_protocol_chooser_set_protocol(PidginProtocolChooser *chooser, PurpleProtocol *protocol);
40297
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
79 G_END_DECLS
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80
082c07053a79 Add the new PidginProtocolChooser and implement it in account dialog
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 #endif /* PIDGIN_PROTOCOL_CHOOSER_H */

mercurial