pidgin/pidginapplication.h

Fri, 27 Oct 2023 00:25:10 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Fri, 27 Oct 2023 00:25:10 -0500
changeset 42445
f7838d462608
parent 42361
59f54c17c61f
child 42465
b7d530551c1b
permissions
-rw-r--r--

Remove Talkatu from the status editor

Testing Done:
Created a status, modified it a few times, and made sure everything worked right with the message.

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

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
40553
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 G_BEGIN_DECLS
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36
41124
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:
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 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
41 * application wide actions.
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 * Since: 3.0.0
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40553
diff changeset
44 */
95555046173e Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40553
diff changeset
45
40553
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 #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
47 G_DECLARE_FINAL_TYPE(PidginApplication, pidgin_application, PIDGIN,
42361
59f54c17c61f Make PidginApplication subclass AdwApplication
Gary Kramlich <grim@reaperworld.com>
parents: 41748
diff changeset
48 APPLICATION, AdwApplication)
40553
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49
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 * pidgin_application_new:
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 * Creates a 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 * 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
56 *
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 * Since: 3.0.0
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 GApplication *pidgin_application_new(void);
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60
41353
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
61 /**
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
62 * pidgin_application_add_action_group:
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
63 * @application: The [class@Application] instance.
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
64 * @prefix: The action prefix.
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
65 * @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
66 *
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
67 * 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
68 * 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
69 * windows.
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
70 *
2b364a6512cc Make PidginApplication manage action groups for all windows
Gary Kramlich <grim@reaperworld.com>
parents: 41124
diff changeset
71 * 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
72 * prefix, but %NULL for @action_group.
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 * Since: 3.0.0
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 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
77
41748
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
78 /**
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
79 * 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
80 * @application: The instance.
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
81 *
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
82 * 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
83 * 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
84 * [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
85 *
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
86 * 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
87 * not be found.
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 * Since: 3.0.0
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
90 */
fb13b6986266 Make the debug window transient for whatever window created it.
Gary Kramlich <grim@reaperworld.com>
parents: 41353
diff changeset
91 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
92
40553
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
93 G_END_DECLS
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
94
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
95 #endif /* PIDGIN_APPLICATION_H */

mercurial