pidgin/pidginapplication.h

Sun, 03 Nov 2024 00:05:44 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Sun, 03 Nov 2024 00:05:44 -0500
changeset 43045
308e8d0ce68c
parent 42620
72178a341eb8
child 43177
595a5f31003a
permissions
-rw-r--r--

remove purple3-url-handler.desktop.in.in

The application that did the launching was removed long ago. Also this should
be implemented by the user interfaces and they might provide separate files to
groups schemas as well.

Testing Done:
Called in the turtles.

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

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
42361
59f54c17c61f Make PidginApplication subclass AdwApplication
Gary Kramlich <grim@reaperworld.com>
parents: 41748
diff changeset
33 #include <adwaita.h>
59f54c17c61f Make PidginApplication subclass AdwApplication
Gary Kramlich <grim@reaperworld.com>
parents: 41748
diff changeset
34
42465
b7d530551c1b Tag declared Pidgin types with symbol visibility
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42361
diff changeset
35 #include "pidginversion.h"
b7d530551c1b Tag declared Pidgin types with symbol visibility
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42361
diff changeset
36
40553
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37 G_BEGIN_DECLS
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38
41124
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40553
diff changeset
39 /**
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40553
diff changeset
40 * PidginApplication:
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40553
diff changeset
41 *
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40553
diff changeset
42 * #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
43 * application wide actions.
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40553
diff changeset
44 *
42620
72178a341eb8 Remove minor versions from Since tags in Pidgin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42466
diff changeset
45 * Since: 3.0
41124
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40553
diff changeset
46 */
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40553
diff changeset
47
40553
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48 #define PIDGIN_TYPE_APPLICATION (pidgin_application_get_type())
42465
b7d530551c1b Tag declared Pidgin types with symbol visibility
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42361
diff changeset
49
b7d530551c1b Tag declared Pidgin types with symbol visibility
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42361
diff changeset
50 PIDGIN_AVAILABLE_IN_3_0
40553
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 G_DECLARE_FINAL_TYPE(PidginApplication, pidgin_application, PIDGIN,
42361
59f54c17c61f Make PidginApplication subclass AdwApplication
Gary Kramlich <grim@reaperworld.com>
parents: 41748
diff changeset
52 APPLICATION, AdwApplication)
40553
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53
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 * pidgin_application_new:
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 * Creates a new #PidginApplication instance.
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 *
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59 * 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
60 *
42620
72178a341eb8 Remove minor versions from Since tags in Pidgin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42466
diff changeset
61 * Since: 3.0
40553
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62 */
42466
ca3374c1cdba Add visibility to all Pidgin symbols tagged with Since 3.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42465
diff changeset
63 PIDGIN_AVAILABLE_IN_3_0
40553
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 GApplication *pidgin_application_new(void);
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65
41353
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
66 /**
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
67 * pidgin_application_add_action_group:
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
68 * @application: The [class@Application] instance.
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
69 * @prefix: The action prefix.
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
70 * @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
71 *
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
72 * 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
73 * 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
74 * windows.
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
75 *
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
76 * 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
77 * prefix, but %NULL for @action_group.
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
78 *
42620
72178a341eb8 Remove minor versions from Since tags in Pidgin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42466
diff changeset
79 * Since: 3.0
41353
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
80 */
42466
ca3374c1cdba Add visibility to all Pidgin symbols tagged with Since 3.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42465
diff changeset
81 PIDGIN_AVAILABLE_IN_3_0
41353
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
82 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
83
41748
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
84 /**
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
85 * 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
86 * @application: The instance.
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
87 *
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
88 * 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
89 * 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
90 * [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
91 *
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
92 * 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
93 * not be found.
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
94 *
42620
72178a341eb8 Remove minor versions from Since tags in Pidgin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42466
diff changeset
95 * Since: 3.0
41748
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
96 */
42466
ca3374c1cdba Add visibility to all Pidgin symbols tagged with Since 3.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42465
diff changeset
97 PIDGIN_AVAILABLE_IN_3_0
41748
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
98 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
99
40553
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
100 G_END_DECLS
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
101
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
102 #endif /* PIDGIN_APPLICATION_H */

mercurial