pidgin/pidginapplication.h

Sat, 29 Oct 2022 01:14:13 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Sat, 29 Oct 2022 01:14:13 -0500
changeset 41859
ed82ab63d15a
parent 41748
fb13b6986266
child 42361
59f54c17c61f
permissions
-rw-r--r--

Convert PidginProxyPrefs to Adwaita 1.2

Testing Done:
Set all the values via the ui and the config file and tested bad values in the port in both as well. Bad values in the ui will store whatever atoi returned, but bad values in the config file will fallback to the default.

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

40553
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Pidgin - Internet Messenger
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * Pidgin is the legal property of its developers, whose names are too numerous
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * source distribution.
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 *
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * (at your option) any later version.
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * GNU General Public License for more details.
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 *
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 * along with this program; if not, see <https://www.gnu.org/licenses/>.
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION)
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 # error "only <pidgin.h> may be included directly"
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 #endif
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #ifndef PIDGIN_APPLICATION_H
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #define PIDGIN_APPLICATION_H
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 #include <glib.h>
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 #include <gtk/gtk.h>
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 G_BEGIN_DECLS
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34
41124
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40553
diff changeset
35 /**
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40553
diff changeset
36 * PidginApplication:
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40553
diff changeset
37 *
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40553
diff changeset
38 * #PidginApplication is a subclass of #GtkApplication that holds all of the
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40553
diff changeset
39 * application wide actions.
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40553
diff changeset
40 *
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40553
diff changeset
41 * Since: 3.0.0
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40553
diff changeset
42 */
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40553
diff changeset
43
40553
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 #define PIDGIN_TYPE_APPLICATION (pidgin_application_get_type())
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45 G_DECLARE_FINAL_TYPE(PidginApplication, pidgin_application, PIDGIN,
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 APPLICATION, GtkApplication)
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48 /**
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49 * pidgin_application_new:
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 *
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 * Creates a new #PidginApplication instance.
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 *
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53 * Returns: (transfer full): The new #PidginApplication instance.
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54 *
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 * Since: 3.0.0
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 */
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 GApplication *pidgin_application_new(void);
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58
41353
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
59 /**
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
60 * pidgin_application_add_action_group:
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
61 * @application: The [class@Application] instance.
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
62 * @prefix: The action prefix.
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
63 * @action_group: The [iface@Gio.ActionGroup] to add.
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
64 *
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
65 * Adds @action_group to all of the windows that @application knows about and
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
66 * will automatically add @action_group to any newly created application
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
67 * windows.
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
68 *
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
69 * To remove @action_group from every window, call this function with the same
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
70 * prefix, but %NULL for @action_group.
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
71 *
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
72 * Since: 3.0.0
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
73 */
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
74 void pidgin_application_add_action_group(PidginApplication *application, const gchar *prefix, GActionGroup *action_group);
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
75
41748
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
76 /**
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
77 * pidgin_application_get_active_window:
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
78 * @application: The instance.
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
79 *
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
80 * Calls [method@Gtk.Application.get_active_window] to get the active window.
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
81 * If that returns %NULL, fallback to the first window of
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
82 * [method@Gtk.Application.get_windows], and if that fails, return %NULL.
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
83 *
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
84 * Returns: (transfer none) (nullable): The active window or %NULL if one could
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
85 * not be found.
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
86 *
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
87 * Since: 3.0.0
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
88 */
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
89 GtkWindow *pidgin_application_get_active_window(PidginApplication *application);
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
90
40553
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
91 G_END_DECLS
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
92
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
93 #endif /* PIDGIN_APPLICATION_H */

mercurial