Mon, 22 Aug 2022 21:40:04 -0500
Inline pidgin_make_scrollable
We need to change it for GTK4, and there are few enough that it can be inlined. Eventually, that code might be a `.ui` anyway.
Testing Done:
Compile only.
Reviewed at https://reviews.imfreedom.org/r/1615/
|
41136
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * This program is free software; you can redistribute it and/or modify |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * it under the terms of the GNU General Public License as published by |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * the Free Software Foundation; either version 2 of the License, or |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * (at your option) any later version. |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * This program is distributed in the hope that it will be useful, |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * GNU General Public License for more details. |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * You should have received a copy of the GNU General Public License |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | */ |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION) |
|
41276
03f98ece6b26
Fix a ton of missing and incorrect global header guards
Gary Kramlich <grim@reaperworld.com>
parents:
41168
diff
changeset
|
20 | # error "only <purple.h> may be included directly" |
|
41136
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | #endif |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #ifndef PURPLE_IDLE_UI_H |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | #define PURPLE_IDLE_UI_H |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | #include <glib.h> |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #include <glib-object.h> |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | #include <time.h> |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | G_BEGIN_DECLS |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | #define PURPLE_TYPE_IDLE_UI (purple_idle_ui_get_type()) |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | G_DECLARE_INTERFACE(PurpleIdleUi, purple_idle_ui, PURPLE, IDLE_UI, GObject) |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | /** |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | * PurpleIdleUiInterface: |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | * @get_idle_time: vfunc to get the time that the user interface has been idle. |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | * |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | * An interface that a user interface can implement to let the core determine |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | * idle times. |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | * |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | * Since: 3.0.0 |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | */ |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | struct _PurpleIdleUiInterface { |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | /*< private >*/ |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | GTypeInterface parent; |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | /*< public >*/ |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | time_t (*get_idle_time)(PurpleIdleUi *ui); |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | /*< private >*/ |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | gpointer reserved[4]; |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | }; |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | /** |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | * purple_idle_ui_get_idle_time: |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | * @ui: The idle ui instance. |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | * |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | * Gets the idle time from the user interface. |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | * |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | * Returns: The time that the user interface went idle. |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
63 | * |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
64 | * Since: 3.0.0 |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
65 | */ |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
66 | time_t purple_idle_ui_get_idle_time(PurpleIdleUi *ui); |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
67 | |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
68 | G_END_DECLS |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
69 | |
|
41168
ef6d6a257756
Fix a typo in the purpleidleui.h header guard comment
Gary Kramlich <grim@reaperworld.com>
parents:
41136
diff
changeset
|
70 | #endif /* PURPLE_IDLE_UI_H */ |