1 /* This file is part of Cawbird, a Gtk+ linux Twitter client forked from Corebird. 2 * Copyright (C) 2017 Timm Bäder (Corebird) 3 * 4 * Cawbird is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation, either version 3 of the License, or 7 * (at your option) any later version. 8 * 9 * Cawbird is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with cawbird. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #ifndef __CB_EMOJI_CHOOSER_H__ 19 #define __CB_EMOJI_CHOOSER_H__ 20 21 #include <gtk/gtk.h> 22 23 typedef struct { 24 GtkWidget *box; 25 GtkWidget *heading; 26 GtkWidget *button; 27 const char *first; 28 gunichar label; 29 gboolean empty; 30 } EmojiSection; 31 32 struct _CbEmojiChooser 33 { 34 GtkBox parent_instance; 35 36 guint populated : 1; 37 guint populate_idle_id; 38 39 GtkWidget *search_entry; 40 GtkWidget *stack; 41 GtkWidget *scrolled_window; 42 43 EmojiSection recent; 44 EmojiSection people; 45 EmojiSection body; 46 EmojiSection nature; 47 EmojiSection food; 48 EmojiSection travel; 49 EmojiSection activities; 50 EmojiSection objects; 51 EmojiSection symbols; 52 EmojiSection flags; 53 54 GVariant *data; 55 56 GSettings *settings; 57 }; 58 typedef struct _CbEmojiChooser CbEmojiChooser; 59 60 #define CB_TYPE_EMOJI_CHOOSER cb_emoji_chooser_get_type () 61 G_DECLARE_FINAL_TYPE (CbEmojiChooser, cb_emoji_chooser, CB, EMOJI_CHOOSER, GtkBox); 62 63 GtkWidget * cb_emoji_chooser_new (void); 64 gboolean cb_emoji_chooser_try_init (CbEmojiChooser *self); 65 void cb_emoji_chooser_populate (CbEmojiChooser *self); 66 67 #endif 68