pidgin/pidginapplication.h

Fri, 19 Aug 2022 02:27:18 -0500

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Fri, 19 Aug 2022 02:27:18 -0500
branch
gtk4
changeset 41565
2ee402c27fcf
parent 41353
2b364a6512cc
child 41748
fb13b6986266
permissions
-rw-r--r--

Port gtkaccount to GTK4

We should still port to `GtkBuilder`, but this seems small enough to fix now.

Testing Done:
Compile only.

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

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
40553
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 G_END_DECLS
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77
892459990bb7 Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78 #endif /* PIDGIN_APPLICATION_H */

mercurial