summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheJackiMonster <thejackimonster@gmail.com>2022-04-23 19:13:29 +0200
committerTheJackiMonster <thejackimonster@gmail.com>2022-04-23 19:13:29 +0200
commit8f53a6e879f360e80941cb6e9d502d7522bbeeba (patch)
tree272195e4de223342ed88a69cc20137f9b0440da2
parentfc56c6148f22d363a27c7a39d8d97a2d4d908a92 (diff)
Added doxygen comments to all functions in the headers
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
-rw-r--r--src/ui/about.h13
-rw-r--r--src/ui/account_entry.h30
-rw-r--r--src/ui/accounts.h20
-rw-r--r--src/ui/chat.h55
-rw-r--r--src/ui/chat_entry.h33
-rw-r--r--src/ui/contact_entry.h24
-rw-r--r--src/ui/contact_info.h23
-rw-r--r--src/ui/contacts.h13
-rw-r--r--src/ui/delete_messages.h22
-rw-r--r--src/ui/file_load_entry.h14
-rw-r--r--src/ui/invite_contact.h13
-rw-r--r--src/ui/message.h30
-rw-r--r--src/ui/messenger.h31
-rw-r--r--src/ui/new_account.h13
-rw-r--r--src/ui/new_contact.h13
-rw-r--r--src/ui/new_group.h15
-rw-r--r--src/ui/new_lobby.h13
-rw-r--r--src/ui/new_platform.h15
-rw-r--r--src/ui/picker.h17
-rw-r--r--src/ui/send_file.h21
-rw-r--r--src/ui/settings.h15
21 files changed, 437 insertions, 6 deletions
diff --git a/src/ui/about.h b/src/ui/about.h
index 86e7fe0..e96641a 100644
--- a/src/ui/about.h
+++ b/src/ui/about.h
@@ -35,10 +35,23 @@ typedef struct UI_ABOUT_Handle
GtkButton *close_button;
} UI_ABOUT_Handle;
+/**
+ * Initializes a handle for the about dialog of
+ * a given messenger application.
+ *
+ * @param app Messenger application
+ * @param handle About dialog handle
+ */
void
ui_about_dialog_init(MESSENGER_Application *app,
UI_ABOUT_Handle *handle);
+/**
+ * Cleans up the allocated resources and resets the
+ * state of a given about dialog handle.
+ *
+ * @param handle About dialog handle
+ */
void
ui_about_dialog_cleanup(UI_ABOUT_Handle *handle);
diff --git a/src/ui/account_entry.h b/src/ui/account_entry.h
index fa9bc32..ef79fb2 100644
--- a/src/ui/account_entry.h
+++ b/src/ui/account_entry.h
@@ -37,17 +37,47 @@ typedef struct UI_ACCOUNT_ENTRY_Handle
GtkLabel *entry_label;
} UI_ACCOUNT_ENTRY_Handle;
+/**
+ * Allocates and creates a new account entry
+ * handle to manage an account in a list for
+ * a given messenger application.
+ *
+ * @param app Messenger application
+ * @return New account entry handle
+ */
UI_ACCOUNT_ENTRY_Handle*
ui_account_entry_new(MESSENGER_Application *app);
+/**
+ * Sets the content of the given account entry
+ * handle respectively to visually represent a
+ * selected chat account.
+ *
+ * @param handle Account entry handle
+ * @param account Chat account
+ */
void
ui_account_entry_set_account(UI_ACCOUNT_ENTRY_Handle* handle,
const struct GNUNET_CHAT_Account *account);
+/**
+ * Sets the content of the given account entry
+ * handle respectively to visually represent a
+ * selected chat contact.
+ *
+ * @param handle Account entry handle
+ * @param contact Chat contact
+ */
void
ui_account_entry_set_contact(UI_ACCOUNT_ENTRY_Handle* handle,
const struct GNUNET_CHAT_Contact *contact);
+/**
+ * Frees its resources and destroys a given
+ * account entry handle.
+ *
+ * @param handle Account entry handle
+ */
void
ui_account_entry_delete(UI_ACCOUNT_ENTRY_Handle *handle);
diff --git a/src/ui/accounts.h b/src/ui/accounts.h
index a71e31e..9bfedff 100644
--- a/src/ui/accounts.h
+++ b/src/ui/accounts.h
@@ -39,14 +39,34 @@ typedef struct UI_ACCOUNTS_Handle
GtkButton *close_button;
} UI_ACCOUNTS_Handle;
+/**
+ * Initializes a handle for the accounts dialog
+ * of a given messenger application.
+ *
+ * @param app Messenger application
+ * @param handle Accounts dialog handle
+ */
void
ui_accounts_dialog_init(MESSENGER_Application *app,
UI_ACCOUNTS_Handle *handle);
+/**
+ * Refreshes a given accounts dialog handle with the
+ * current list of accounts from a messenger application.
+ *
+ * @param app Messenger application
+ * @param handle Accounts dialog handle
+ */
void
ui_accounts_dialog_refresh(MESSENGER_Application *app,
UI_ACCOUNTS_Handle *handle);
+/**
+ * Cleans up the allocated resources and resets the
+ * state of a given accounts dialog handle.
+ *
+ * @param handle Accounts dialog handle
+ */
void
ui_accounts_dialog_cleanup(UI_ACCOUNTS_Handle *handle);
diff --git a/src/ui/chat.h b/src/ui/chat.h
index e28374c..626bd1d 100644
--- a/src/ui/chat.h
+++ b/src/ui/chat.h
@@ -130,31 +130,86 @@ typedef struct UI_CHAT_Handle
UI_PICKER_Handle *picker;
} UI_CHAT_Handle;
+/**
+ * Allocates and creates a new chat handle
+ * to manage a chat for a given messenger
+ * application.
+ *
+ * @param app Messenger application
+ * @return New chat handle
+ */
UI_CHAT_Handle*
ui_chat_new(MESSENGER_Application *app);
+/**
+ * Updates a given chat handle with the current
+ * state of a messenger application and the chat
+ * context the chat is representing.
+ *
+ * @param handle Chat handle
+ * @param app Messenger application
+ * @param context Chat context
+ */
void
ui_chat_update(UI_CHAT_Handle *handle,
MESSENGER_Application *app,
struct GNUNET_CHAT_Context* context);
+/**
+ * Frees its resources and destroys a given
+ * chat handle.
+ *
+ * @param handle Chat handle
+ */
void
ui_chat_delete(UI_CHAT_Handle *handle);
+/**
+ * Add a message handle to a given chat handle
+ * to get listed by it for a messenger
+ * application.
+ *
+ * @param handle Chat handle
+ * @param app Messenger application
+ * @param message Message handle
+ */
void
ui_chat_add_message(UI_CHAT_Handle *handle,
MESSENGER_Application *app,
UI_MESSAGE_Handle *message);
+/**
+ * Removes a message handle from a given chat
+ * handle to remove it from its list for a
+ * messenger application.
+ *
+ * @param handle Chat handle
+ * @param app Messenger application
+ * @param message Message handle
+ */
void
ui_chat_remove_message(UI_CHAT_Handle *handle,
MESSENGER_Application *app,
UI_MESSAGE_Handle *message);
+/**
+ * Add a file load entry handle to a given chat
+ * handle to get listed by it.
+ *
+ * @param handle Chat handle
+ * @param file_load File load entry handle
+ */
void
ui_chat_add_file_load(UI_CHAT_Handle *handle,
UI_FILE_LOAD_ENTRY_Handle *file_load);
+/**
+ * Removes a file load entry handle from a given
+ * chat handle to remove it from its list.
+ *
+ * @param handle Chat handle
+ * @param file_load File load entry handle
+ */
void
ui_chat_remove_file_load(UI_CHAT_Handle *handle,
UI_FILE_LOAD_ENTRY_Handle *file_load);
diff --git a/src/ui/chat_entry.h b/src/ui/chat_entry.h
index 1e2896f..4eb5431 100644
--- a/src/ui/chat_entry.h
+++ b/src/ui/chat_entry.h
@@ -47,17 +47,50 @@ typedef struct UI_CHAT_ENTRY_Handle
GtkImage *read_receipt_image;
} UI_CHAT_ENTRY_Handle;
+/**
+ * Allocates and creates a new chat entry
+ * handle to manage a chat in a list for
+ * a given messenger application.
+ *
+ * @param app Messenger application
+ * @return New chat entry handle
+ */
UI_CHAT_ENTRY_Handle*
ui_chat_entry_new(MESSENGER_Application *app);
+/**
+ * Updates a given chat entry handle with the
+ * current state of a messenger application and
+ * the chat context the chat entry is
+ * representing.
+ *
+ * @param handle Chat entry handle
+ * @param app Messenger application
+ * @param context Chat context
+ */
void
ui_chat_entry_update(UI_CHAT_ENTRY_Handle *handle,
MESSENGER_Application *app,
struct GNUNET_CHAT_Context *context);
+/**
+ * Frees its resources and destroys a given
+ * chat entry handle.
+ *
+ * @param handle Chat entry handle
+ */
void
ui_chat_entry_delete(UI_CHAT_ENTRY_Handle *handle);
+/**
+ * Fully disposes all resources and handles
+ * which are linked to a given chat entry
+ * handle by a messenger application. The chat
+ * entry handle will be deleted as well.
+ *
+ * @param handle Chat entry handle
+ * @param app Messenger application
+ */
void
ui_chat_entry_dispose(UI_CHAT_ENTRY_Handle *handle,
MESSENGER_Application *app);
diff --git a/src/ui/contact_entry.h b/src/ui/contact_entry.h
index a9ff9dd..dc692de 100644
--- a/src/ui/contact_entry.h
+++ b/src/ui/contact_entry.h
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2021 GNUnet e.V.
+ Copyright (C) 2021--2022 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -39,13 +39,35 @@ typedef struct UI_CONTACT_ENTRY_Handle
GtkLabel *subtitle_label;
} UI_CONTACT_ENTRY_Handle;
+/**
+ * Allocates and creates a new contact entry
+ * handle to manage a contact in a list for
+ * a given messenger application.
+ *
+ * @param app Messenger application
+ * @return New contact entry handle
+ */
UI_CONTACT_ENTRY_Handle*
ui_contact_entry_new(MESSENGER_Application *app);
+/**
+ * Sets the content of the given contact entry
+ * handle respectively to visually represent a
+ * selected chat contact.
+ *
+ * @param handle Contact entry handle
+ * @param contact Chat contact
+ */
void
ui_contact_entry_set_contact(UI_CONTACT_ENTRY_Handle* handle,
const struct GNUNET_CHAT_Contact *contact);
+/**
+ * Frees its resources and destroys a given
+ * contact entry handle.
+ *
+ * @param handle Contact entry handle
+ */
void
ui_contact_entry_delete(UI_CONTACT_ENTRY_Handle *handle);
diff --git a/src/ui/contact_info.h b/src/ui/contact_info.h
index f602073..82f0d43 100644
--- a/src/ui/contact_info.h
+++ b/src/ui/contact_info.h
@@ -63,15 +63,38 @@ typedef struct UI_CONTACT_INFO_Handle
QRcode *qr;
} UI_CONTACT_INFO_Handle;
+/**
+ * Initializes a handle for the contact info dialog
+ * of a given messenger application.
+ *
+ * @param app Messenger application
+ * @param handle Contact info dialog handle
+ */
void
ui_contact_info_dialog_init(MESSENGER_Application *app,
UI_CONTACT_INFO_Handle *handle);
+/**
+ * Updates a given contact info dialog handle with
+ * current data of a certain chat contact and whether
+ * their identity should be visually revealed in the
+ * dialog.
+ *
+ * @param handle Contact info dialog handle
+ * @param contact Chat contact
+ * @param reveal Flag to reveal QR code of identity key
+ */
void
ui_contact_info_dialog_update(UI_CONTACT_INFO_Handle *handle,
struct GNUNET_CHAT_Contact *contact,
gboolean reveal);
+/**
+ * Cleans up the allocated resources and resets the
+ * state of a given contact info dialog handle.
+ *
+ * @param handle Contact info dialog handle
+ */
void
ui_contact_info_dialog_cleanup(UI_CONTACT_INFO_Handle *handle);
diff --git a/src/ui/contacts.h b/src/ui/contacts.h
index 6bb3475..f63b554 100644
--- a/src/ui/contacts.h
+++ b/src/ui/contacts.h
@@ -39,10 +39,23 @@ typedef struct UI_CONTACTS_Handle
GtkButton *close_button;
} UI_CONTACTS_Handle;
+/**
+ * Initializes a handle for the contacts dialog
+ * of a given messenger application.
+ *
+ * @param app Messenger application
+ * @param handle Contacts dialog handle
+ */
void
ui_contacts_dialog_init(MESSENGER_Application *app,
UI_CONTACTS_Handle *handle);
+/**
+ * Cleans up the allocated resources and resets the
+ * state of a given contacts dialog handle.
+ *
+ * @param handle Contacts dialog handle
+ */
void
ui_contacts_dialog_cleanup(UI_CONTACTS_Handle *handle);
diff --git a/src/ui/delete_messages.h b/src/ui/delete_messages.h
index b0c04e0..4f5474c 100644
--- a/src/ui/delete_messages.h
+++ b/src/ui/delete_messages.h
@@ -50,15 +50,37 @@ typedef struct UI_DELETE_MESSAGES_Handle
GtkButton *confirm_button;
} UI_DELETE_MESSAGES_Handle;
+/**
+ * Initializes a handle for the delete messages
+ * dialog of a given messenger application.
+ *
+ * @param app Messenger application
+ * @param handle Delete messages dialog handle
+ */
void
ui_delete_messages_dialog_init(MESSENGER_Application *app,
UI_DELETE_MESSAGES_Handle *handle);
+/**
+ * Links a custom list and a callback to a
+ * given delete messages dialog which will be
+ * used to handle the event of deletion.
+ *
+ * @param handle Delete messages dialog handle
+ * @param callback Delete messages callback
+ * @param selected Selected messages
+ */
void
ui_delete_messages_dialog_link(UI_DELETE_MESSAGES_Handle *handle,
UI_DELETE_MESSAGES_Callback callback,
GList *selected);
+/**
+ * Cleans up the allocated resources and resets the
+ * state of a given delete messages dialog handle.
+ *
+ * @param handle Delete messages dialog handle
+ */
void
ui_delete_messages_dialog_cleanup(UI_DELETE_MESSAGES_Handle *handle);
diff --git a/src/ui/file_load_entry.h b/src/ui/file_load_entry.h
index f24d3d5..dbcea62 100644
--- a/src/ui/file_load_entry.h
+++ b/src/ui/file_load_entry.h
@@ -47,9 +47,23 @@ typedef struct UI_FILE_LOAD_ENTRY_Handle
GtkButton *cancel_button;
} UI_FILE_LOAD_ENTRY_Handle;
+/**
+ * Allocates and creates a new file load entry
+ * handle to manage loading files for a given
+ * messenger application.
+ *
+ * @param app Messenger application
+ * @return New file load entry handle
+ */
UI_FILE_LOAD_ENTRY_Handle*
ui_file_load_entry_new(MESSENGER_Application *app);
+/**
+ * Frees its resources and destroys a given file
+ * load entry handle.
+ *
+ * @param handle File load entry handle
+ */
void
ui_file_load_entry_delete(UI_FILE_LOAD_ENTRY_Handle *handle);
diff --git a/src/ui/invite_contact.h b/src/ui/invite_contact.h
index 3c3175a..2630c84 100644
--- a/src/ui/invite_contact.h
+++ b/src/ui/invite_contact.h
@@ -39,10 +39,23 @@ typedef struct UI_INVITE_CONTACT_Handle
GtkButton *close_button;
} UI_INVITE_CONTACT_Handle;
+/**
+ * Initializes a handle for the invite contact dialog
+ * of a given messenger application.
+ *
+ * @param app Messenger application
+ * @param handle Invite contact dialog handle
+ */
void
ui_invite_contact_dialog_init(MESSENGER_Application *app,
UI_INVITE_CONTACT_Handle *handle);
+/**
+ * Cleans up the allocated resources and resets the
+ * state of a given invite contact dialog handle.
+ *
+ * @param handle Invite contact dialog handle
+ */
void
ui_invite_contact_dialog_cleanup(UI_INVITE_CONTACT_Handle *handle);
diff --git a/src/ui/message.h b/src/ui/message.h
index f86ac3b..84ec7e8 100644
--- a/src/ui/message.h
+++ b/src/ui/message.h
@@ -84,18 +84,48 @@ typedef struct UI_MESSAGE_Handle
guint redraw_animation;
} UI_MESSAGE_Handle;
+/**
+ * Allocates and creates a new message handle
+ * to represent a message for a given messenger
+ * application by selected message type.
+ *
+ * @param app Messenger application
+ * @param type Message type
+ * @return New message handle
+ */
UI_MESSAGE_Handle*
ui_message_new(MESSENGER_Application *app,
UI_MESSAGE_Type type);
+/**
+ * Refreshes the visual state of the read receipt
+ * from a given message handle.
+ *
+ * @param handle Message handle
+ */
void
ui_message_refresh(UI_MESSAGE_Handle *handle);
+/**
+ * Updates a given message handle with the
+ * current data from a messenger application
+ * and a selected chat message.
+ *
+ * @param handle Message handle
+ * @param app Messenger application
+ * @param message Chat message
+ */
void
ui_message_update(UI_MESSAGE_Handle *handle,
MESSENGER_Application *app,
const struct GNUNET_CHAT_Message *message);
+/**
+ * Frees its resources and destroys a given
+ * message handle.
+ *
+ * @param handle Message handle
+ */
void
ui_message_delete(UI_MESSAGE_Handle *handle);
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 @@
/*
This file is part of GNUnet.
- Copyright (C) 2021 GNUnet e.V.
+ Copyright (C) 2021--2022 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -77,18 +77,47 @@ typedef struct UI_MESSENGER_Handle
GtkWidget *no_chat_box;
} UI_MESSENGER_Handle;
+/**
+ * Initializes a handle for the messenger main
+ * window of a given messenger application.
+ *
+ * @param app Messenger application
+ * @param handle Messenger window handle
+ */
void
ui_messenger_init(MESSENGER_Application *app,
UI_MESSENGER_Handle *handle);
+/**
+ * Refreshes a given messenger window handle with
+ * the data of the current state from a given
+ * messenger application.
+ *
+ * @param app Messenger application
+ * @param handle Messenger window handle
+ */
void
ui_messenger_refresh(MESSENGER_Application *app,
UI_MESSENGER_Handle *handle);
+/**
+ * Returns whether a certain chat context is currently
+ * visually represented via a chat UI handle.
+ *
+ * @param handle Messenger window handle
+ * @param context Chat context
+ * @return true if the context is viewed, otherwise false
+ */
gboolean
ui_messenger_is_context_active(UI_MESSENGER_Handle *handle,
struct GNUNET_CHAT_Context *context);
+/**
+ * Cleans up the allocated resources and resets the
+ * state of a given messenger window handle.
+ *
+ * @param handle Messenger window handle
+ */
void
ui_messenger_cleanup(UI_MESSENGER_Handle *handle);
diff --git a/src/ui/new_account.h b/src/ui/new_account.h
index 703f28d..917bf24 100644
--- a/src/ui/new_account.h
+++ b/src/ui/new_account.h
@@ -43,10 +43,23 @@ typedef struct UI_NEW_ACCOUNT_Handle
GtkButton *confirm_button;
} UI_NEW_ACCOUNT_Handle;
+/**
+ * Initializes a handle for the new account dialog
+ * of a given messenger application.
+ *
+ * @param app Messenger application
+ * @param handle New account dialog handle
+ */
void
ui_new_account_dialog_init(MESSENGER_Application *app,
UI_NEW_ACCOUNT_Handle *handle);
+/**
+ * Cleans up the allocated resources and resets the
+ * state of a given new account dialog handle.
+ *
+ * @param handle New account dialog handle
+ */
void
ui_new_account_dialog_cleanup(UI_NEW_ACCOUNT_Handle *handle);
diff --git a/src/ui/new_contact.h b/src/ui/new_contact.h
index 173b674..7a7ff96 100644
--- a/src/ui/new_contact.h
+++ b/src/ui/new_contact.h
@@ -56,10 +56,23 @@ typedef struct UI_NEW_CONTACT_Handle
guint idle_processing;
} UI_NEW_CONTACT_Handle;
+/**
+ * Initializes a handle for the new contact dialog
+ * of a given messenger application.
+ *
+ * @param app Messenger application
+ * @param handle New contact dialog handle
+ */
void
ui_new_contact_dialog_init(MESSENGER_Application *app,
UI_NEW_CONTACT_Handle *handle);
+/**
+ * Cleans up the allocated resources and resets the
+ * state of a given new contact dialog handle.
+ *
+ * @param handle New contact dialog handle
+ */
void
ui_new_contact_dialog_cleanup(UI_NEW_CONTACT_Handle *handle);
diff --git a/src/ui/new_group.h b/src/ui/new_group.h
index 0b8dd44..dbf6797 100644
--- a/src/ui/new_group.h
+++ b/src/ui/new_group.h
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2021 GNUnet e.V.
+ Copyright (C) 2021--2022 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -53,10 +53,23 @@ typedef struct UI_NEW_GROUP_Handle
GtkButton *confirm_button;
} UI_NEW_GROUP_Handle;
+/**
+ * Initializes a handle for the new group dialog
+ * of a given messenger application.
+ *
+ * @param app Messenger application
+ * @param handle New group dialog handle
+ */
void
ui_new_group_dialog_init(MESSENGER_Application *app,
UI_NEW_GROUP_Handle *handle);
+/**
+ * Cleans up the allocated resources and resets the
+ * state of a given new group dialog handle.
+ *
+ * @param handle New group dialog handle
+ */
void
ui_new_group_dialog_cleanup(UI_NEW_GROUP_Handle *handle);
diff --git a/src/ui/new_lobby.h b/src/ui/new_lobby.h
index 9d100b6..ea2e09c 100644
--- a/src/ui/new_lobby.h
+++ b/src/ui/new_lobby.h
@@ -61,10 +61,23 @@ typedef struct UI_NEW_LOBBY_Handle
QRcode *qr;
} UI_NEW_LOBBY_Handle;
+/**
+ * Initializes a handle for the new lobby dialog
+ * of a given messenger application.
+ *
+ * @param app Messenger application
+ * @param handle New lobby dialog handle
+ */
void
ui_new_lobby_dialog_init(MESSENGER_Application *app,
UI_NEW_LOBBY_Handle *handle);
+/**
+ * Cleans up the allocated resources and resets the
+ * state of a given new lobby dialog handle.
+ *
+ * @param handle New lobby dialog handle
+ */
void
ui_new_lobby_dialog_cleanup(UI_NEW_LOBBY_Handle *handle);
diff --git a/src/ui/new_platform.h b/src/ui/new_platform.h
index e2ec288..be2d481 100644
--- a/src/ui/new_platform.h
+++ b/src/ui/new_platform.h
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2021 GNUnet e.V.
+ Copyright (C) 2021--2022 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -41,10 +41,23 @@ typedef struct UI_NEW_PLATFORM_Handle
GtkButton *confirm_button;
} UI_NEW_PLATFORM_Handle;
+/**
+ * Initializes a handle for the new platform dialog
+ * of a given messenger application.
+ *
+ * @param app Messenger application
+ * @param handle New platform dialog handle
+ */
void
ui_new_platform_dialog_init(MESSENGER_Application *app,
UI_NEW_PLATFORM_Handle *handle);
+/**
+ * Cleans up the allocated resources and resets the
+ * state of a given new platform dialog handle.
+ *
+ * @param handle New platform dialog handle
+ */
void
ui_new_platform_dialog_cleanup(UI_NEW_PLATFORM_Handle *handle);
diff --git a/src/ui/picker.h b/src/ui/picker.h
index 3313956..9c21bc9 100644
--- a/src/ui/picker.h
+++ b/src/ui/picker.h
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2021 GNUnet e.V.
+ Copyright (C) 2021--2022 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -57,10 +57,25 @@ typedef struct UI_PICKER_Handle
GtkButton *settings_button;
} UI_PICKER_Handle;
+/**
+ * Allocates and creates a new picker handle to
+ * manage emoji selection in a chat for a given
+ * messenger application.
+ *
+ * @param app Messenger application
+ * @param chat Chat handle
+ * @return New picker handle
+ */
UI_PICKER_Handle*
ui_picker_new(MESSENGER_Application *app,
UI_CHAT_Handle *chat);
+/**
+ * Frees its resources and destroys a given picker
+ * handle.
+ *
+ * @param handle Picker handle
+ */
void
ui_picker_delete(UI_PICKER_Handle *handle);
diff --git a/src/ui/send_file.h b/src/ui/send_file.h
index 138426a..a4cad4f 100644
--- a/src/ui/send_file.h
+++ b/src/ui/send_file.h
@@ -49,14 +49,35 @@ typedef struct UI_SEND_FILE_Handle
guint redraw_animation;
} UI_SEND_FILE_Handle;
+/**
+ * Initializes a handle for the send file dialog
+ * of a given messenger application.
+ *
+ * @param app Messenger application
+ * @param handle Send file dialog handle
+ */
void
ui_send_file_dialog_init(MESSENGER_Application *app,
UI_SEND_FILE_Handle *handle);
+/**
+ * Updates a given send file dialog handle with
+ * a certain filename to pre-determine which file
+ * gets selected by the dialog as default.
+ *
+ * @param handle Send file dialog handle
+ * @param filename Custom filename
+ */
void
ui_send_file_dialog_update(UI_SEND_FILE_Handle *handle,
const gchar *filename);
+/**
+ * Cleans up the allocated resources and resets the
+ * state of a given send file dialog handle.
+ *
+ * @param handle Send file dialog handle
+ */
void
ui_send_file_dialog_cleanup(UI_SEND_FILE_Handle *handle);
diff --git a/src/ui/settings.h b/src/ui/settings.h
index b2b7486..87e7263 100644
--- a/src/ui/settings.h
+++ b/src/ui/settings.h
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2021 GNUnet e.V.
+ Copyright (C) 2021--2022 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -52,10 +52,23 @@ typedef struct UI_SETTINGS_Handle
GtkButton *leave_chats_button;
} UI_SETTINGS_Handle;
+/**
+ * Initializes a handle for the settings dialog
+ * of a given messenger application.
+ *
+ * @param app Messenger application
+ * @param handle Settings dialog handle
+ */
void
ui_settings_dialog_init(MESSENGER_Application *app,
UI_SETTINGS_Handle *handle);
+/**
+ * Cleans up the allocated resources and resets the
+ * state of a given settings dialog handle.
+ *
+ * @param handle Settings dialog handle
+ */
void
ui_settings_dialog_cleanup(UI_SETTINGS_Handle *handle);