pidgin/gtk3compat.h

Fri, 14 Dec 2018 17:21:16 -0600

author
Mike Ruprecht <cmaiku@gmail.com>
date
Fri, 14 Dec 2018 17:21:16 -0600
changeset 39394
837a999f0ee3
parent 38707
6f4d3ab2f2ed
child 39673
d02350b7261b
permissions
-rw-r--r--

pidgin: Add documentation for functions in pidgintalkatu.h

This patch adds documentation and therefore annotations to the
functions in pidgin/pidgintalkatu.h. Doing so silences a couple
of warnings when building our GObject introspection.

33170
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
1 /* pidgin
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
2 *
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
3 * Pidgin is the legal property of its developers, whose names are too numerous
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
4 * to list here. Please refer to the COPYRIGHT file distributed with this
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
5 * source distribution.
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
6 *
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
10 * (at your option) any later version.
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
11 *
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
15 * GNU General Public License for more details.
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
16 *
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
20 */
35487
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35455
diff changeset
21
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35455
diff changeset
22 #ifndef _PIDGINGTK3COMPAT_H_
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35455
diff changeset
23 #define _PIDGINGTK3COMPAT_H_
35455
216a37403c5b Fix a bunch of gtk-doc warnings in pidgin
Ankit Vani <a@nevitus.org>
parents: 35451
diff changeset
24 /*
35451
206524351826 Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents: 33892
diff changeset
25 * SECTION:gtk3compat
206524351826 Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents: 33892
diff changeset
26 * @section_id: pidgin-gtk3compat
206524351826 Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents: 33892
diff changeset
27 * @short_description: <filename>gtk3compat.h</filename>
206524351826 Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents: 33892
diff changeset
28 * @title: GTK3 version-dependent definitions
206524351826 Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents: 33892
diff changeset
29 *
206524351826 Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents: 33892
diff changeset
30 * This file is internal to Pidgin. Do not use!
206524351826 Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents: 33892
diff changeset
31 * Also, any public API should not depend on this file.
206524351826 Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents: 33892
diff changeset
32 */
206524351826 Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents: 33892
diff changeset
33
35534
8e72593def2c Fix gtk_[hv]box_new gtk3 deprecation warnings in unity plugin
Ankit Vani <a@nevitus.org>
parents: 35532
diff changeset
34 #include <gtk/gtk.h>
35547
561418a41b08 Replace gtk_color_selection with gtk_color_chooser
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35542
diff changeset
35
38707
6f4d3ab2f2ed Use gtk_menu_popup_at_pointer instead of gtk_menu_popup.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38007
diff changeset
36 #if !GTK_CHECK_VERSION(3,22,0)
6f4d3ab2f2ed Use gtk_menu_popup_at_pointer instead of gtk_menu_popup.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38007
diff changeset
37
6f4d3ab2f2ed Use gtk_menu_popup_at_pointer instead of gtk_menu_popup.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38007
diff changeset
38 static inline void
6f4d3ab2f2ed Use gtk_menu_popup_at_pointer instead of gtk_menu_popup.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38007
diff changeset
39 gtk_menu_popup_at_pointer(GtkMenu *menu, const GdkEvent *trigger_event)
6f4d3ab2f2ed Use gtk_menu_popup_at_pointer instead of gtk_menu_popup.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38007
diff changeset
40 {
6f4d3ab2f2ed Use gtk_menu_popup_at_pointer instead of gtk_menu_popup.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38007
diff changeset
41 const GdkEventButton *event = (const GdkEventButton *)trigger_event;
6f4d3ab2f2ed Use gtk_menu_popup_at_pointer instead of gtk_menu_popup.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38007
diff changeset
42 gtk_menu_popup(menu, NULL, NULL, NULL, NULL,
6f4d3ab2f2ed Use gtk_menu_popup_at_pointer instead of gtk_menu_popup.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38007
diff changeset
43 event ? event->button : 0, gdk_event_get_time(event));
6f4d3ab2f2ed Use gtk_menu_popup_at_pointer instead of gtk_menu_popup.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38007
diff changeset
44 }
6f4d3ab2f2ed Use gtk_menu_popup_at_pointer instead of gtk_menu_popup.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38007
diff changeset
45
38007
3b971d2ecae1 Simplify gtk_label_set_[xy]align calls.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 37992
diff changeset
46 #if !GTK_CHECK_VERSION(3,16,0)
37990
710f725725a8 Replace the deprecated gtk_misc_set_alignment function.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 37989
diff changeset
47
710f725725a8 Replace the deprecated gtk_misc_set_alignment function.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 37989
diff changeset
48 static inline void
38007
3b971d2ecae1 Simplify gtk_label_set_[xy]align calls.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 37992
diff changeset
49 gtk_label_set_xalign(GtkLabel *label, gfloat xalign)
37990
710f725725a8 Replace the deprecated gtk_misc_set_alignment function.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 37989
diff changeset
50 {
38007
3b971d2ecae1 Simplify gtk_label_set_[xy]align calls.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 37992
diff changeset
51 g_object_set(label, "xalign", xalign, NULL);
37990
710f725725a8 Replace the deprecated gtk_misc_set_alignment function.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 37989
diff changeset
52 }
710f725725a8 Replace the deprecated gtk_misc_set_alignment function.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 37989
diff changeset
53
710f725725a8 Replace the deprecated gtk_misc_set_alignment function.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 37989
diff changeset
54 static inline void
38007
3b971d2ecae1 Simplify gtk_label_set_[xy]align calls.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 37992
diff changeset
55 gtk_label_set_yalign(GtkLabel *label, gfloat yalign)
37990
710f725725a8 Replace the deprecated gtk_misc_set_alignment function.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 37989
diff changeset
56 {
38007
3b971d2ecae1 Simplify gtk_label_set_[xy]align calls.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 37992
diff changeset
57 g_object_set(label, "yalign", yalign, NULL);
37990
710f725725a8 Replace the deprecated gtk_misc_set_alignment function.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 37989
diff changeset
58 }
710f725725a8 Replace the deprecated gtk_misc_set_alignment function.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 37989
diff changeset
59
710f725725a8 Replace the deprecated gtk_misc_set_alignment function.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 37989
diff changeset
60 #endif /* 3.16.0 */
710f725725a8 Replace the deprecated gtk_misc_set_alignment function.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 37989
diff changeset
61
38707
6f4d3ab2f2ed Use gtk_menu_popup_at_pointer instead of gtk_menu_popup.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38007
diff changeset
62 #endif /* 3.22.0 */
6f4d3ab2f2ed Use gtk_menu_popup_at_pointer instead of gtk_menu_popup.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38007
diff changeset
63
33170
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
64 #endif /* _PIDGINGTK3COMPAT_H_ */
ce4447562d64 Add checks for old GTK+2 stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
65

mercurial