picker.h (2085B)
1 /* 2 This file is part of GNUnet. 3 Copyright (C) 2021--2024 GNUnet e.V. 4 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 7 by the Free Software Foundation, either version 3 of the License, 8 or (at your option) any later version. 9 10 GNUnet is distributed in the hope that it will be useful, but 11 WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Affero General Public License for more details. 14 15 You should have received a copy of the GNU Affero General Public License 16 along with this program. If not, see <http://www.gnu.org/licenses/>. 17 18 SPDX-License-Identifier: AGPL3.0-or-later 19 */ 20 /* 21 * @author Tobias Frisch 22 * @file ui/picker.h 23 */ 24 25 #ifndef UI_PICKER_H_ 26 #define UI_PICKER_H_ 27 28 #include "chat.h" 29 30 typedef struct UI_PICKER_Handle 31 { 32 GtkBuilder *builder; 33 GtkWidget *picker_box; 34 35 GtkStack *picker_stack; 36 GtkStack *emoji_stack; 37 38 GtkWidget *recent_emoji_page; 39 40 HdyViewSwitcherBar *picker_switcher_bar; 41 HdyViewSwitcherBar *emoji_switcher_bar; 42 43 GtkFlowBox *recent_flow_box; 44 GtkFlowBox *people_flow_box; 45 GtkFlowBox *nature_flow_box; 46 GtkFlowBox *food_flow_box; 47 GtkFlowBox *activities_flow_box; 48 GtkFlowBox *travel_flow_box; 49 GtkFlowBox *objects_flow_box; 50 GtkFlowBox *symbols_flow_box; 51 GtkFlowBox *flags_flow_box; 52 53 HdySearchBar *emoji_search_bar; 54 GtkSearchEntry *emoji_search_entry; 55 56 GtkButton *search_button; 57 GtkButton *settings_button; 58 } UI_PICKER_Handle; 59 60 /** 61 * Allocates and creates a new picker handle to 62 * manage emoji selection in a chat for a given 63 * messenger application. 64 * 65 * @param app Messenger application 66 * @param chat Chat handle 67 * @return New picker handle 68 */ 69 UI_PICKER_Handle* 70 ui_picker_new(MESSENGER_Application *app, 71 UI_CHAT_Handle *chat); 72 73 /** 74 * Frees its resources and destroys a given picker 75 * handle. 76 * 77 * @param handle Picker handle 78 */ 79 void 80 ui_picker_delete(UI_PICKER_Handle *handle); 81 82 #endif /* UI_PICKER_H_ */