diff options
Diffstat (limited to 'src/ui/messenger.h')
-rw-r--r-- | src/ui/messenger.h | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/ui/messenger.h b/src/ui/messenger.h index 6c36ed9..5088947 100644 --- a/src/ui/messenger.h +++ b/src/ui/messenger.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | Copyright (C) 2021 GNUnet e.V. | 3 | Copyright (C) 2021--2022 GNUnet e.V. |
4 | 4 | ||
5 | GNUnet is free software: you can redistribute it and/or modify it | 5 | GNUnet is free software: you can redistribute it and/or modify it |
6 | under the terms of the GNU Affero General Public License as published | 6 | under the terms of the GNU Affero General Public License as published |
@@ -77,18 +77,47 @@ typedef struct UI_MESSENGER_Handle | |||
77 | GtkWidget *no_chat_box; | 77 | GtkWidget *no_chat_box; |
78 | } UI_MESSENGER_Handle; | 78 | } UI_MESSENGER_Handle; |
79 | 79 | ||
80 | /** | ||
81 | * Initializes a handle for the messenger main | ||
82 | * window of a given messenger application. | ||
83 | * | ||
84 | * @param app Messenger application | ||
85 | * @param handle Messenger window handle | ||
86 | */ | ||
80 | void | 87 | void |
81 | ui_messenger_init(MESSENGER_Application *app, | 88 | ui_messenger_init(MESSENGER_Application *app, |
82 | UI_MESSENGER_Handle *handle); | 89 | UI_MESSENGER_Handle *handle); |
83 | 90 | ||
91 | /** | ||
92 | * Refreshes a given messenger window handle with | ||
93 | * the data of the current state from a given | ||
94 | * messenger application. | ||
95 | * | ||
96 | * @param app Messenger application | ||
97 | * @param handle Messenger window handle | ||
98 | */ | ||
84 | void | 99 | void |
85 | ui_messenger_refresh(MESSENGER_Application *app, | 100 | ui_messenger_refresh(MESSENGER_Application *app, |
86 | UI_MESSENGER_Handle *handle); | 101 | UI_MESSENGER_Handle *handle); |
87 | 102 | ||
103 | /** | ||
104 | * Returns whether a certain chat context is currently | ||
105 | * visually represented via a chat UI handle. | ||
106 | * | ||
107 | * @param handle Messenger window handle | ||
108 | * @param context Chat context | ||
109 | * @return true if the context is viewed, otherwise false | ||
110 | */ | ||
88 | gboolean | 111 | gboolean |
89 | ui_messenger_is_context_active(UI_MESSENGER_Handle *handle, | 112 | ui_messenger_is_context_active(UI_MESSENGER_Handle *handle, |
90 | struct GNUNET_CHAT_Context *context); | 113 | struct GNUNET_CHAT_Context *context); |
91 | 114 | ||
115 | /** | ||
116 | * Cleans up the allocated resources and resets the | ||
117 | * state of a given messenger window handle. | ||
118 | * | ||
119 | * @param handle Messenger window handle | ||
120 | */ | ||
92 | void | 121 | void |
93 | ui_messenger_cleanup(UI_MESSENGER_Handle *handle); | 122 | ui_messenger_cleanup(UI_MESSENGER_Handle *handle); |
94 | 123 | ||