1 /* 2 * Copyright © 2004 Noah Levitt 3 * Copyright © 2007, 2008 Christian Persch 4 * 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License as published by the 7 * Free Software Foundation; either version 3 of the License, or (at your 8 * option) any later version. 9 * 10 * This program 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 * General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License along 16 * with this program; if not, write to the Free Software Foundation, Inc., 17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 18 */ 19 20 #ifndef GUCHARMAP_WINDOW_H 21 #define GUCHARMAP_WINDOW_H 22 23 #include <gtk/gtk.h> 24 #include <gucharmap/gucharmap.h> 25 #include "gucharmap-mini-fontsel.h" 26 27 G_BEGIN_DECLS 28 29 #define GUCHARMAP_TYPE_WINDOW (gucharmap_window_get_type ()) 30 #define GUCHARMAP_WINDOW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GUCHARMAP_TYPE_WINDOW, GucharmapWindow)) 31 #define GUCHARMAP_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GUCHARMAP_TYPE_WINDOW, GucharmapWindowClass)) 32 #define GUCHARMAP_IS_WINDOW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GUCHARMAP_TYPE_WINDOW)) 33 #define GUCHARMAP_IS_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_WINDOW)) 34 #define GUCHARMAP_WINDOW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_WINDOW, GucharmapWindowClass)) 35 36 typedef struct _GucharmapWindow GucharmapWindow; 37 typedef struct _GucharmapWindowClass GucharmapWindowClass; 38 39 struct _GucharmapWindow 40 { 41 GtkApplicationWindow parent; 42 43 GSettings *settings; 44 GucharmapCharmap *charmap; 45 GtkWidget *status; 46 47 GtkWidget *fontsel; 48 GtkWidget *text_to_copy_entry; 49 50 GtkWidget *search_dialog; /* takes care of all aspects of searching */ 51 52 GtkPageSetup *page_setup; 53 GtkPrintSettings *print_settings; 54 55 guint in_notification : 1; 56 }; 57 58 struct _GucharmapWindowClass 59 { 60 GtkApplicationWindowClass parent_class; 61 }; 62 63 #define GUCHARMAP_ICON_NAME "accessories-character-map" 64 65 GType gucharmap_window_get_type (void); 66 67 GtkWidget * gucharmap_window_new (GtkApplication *application); 68 69 void gucharmap_window_set_font (GucharmapWindow *guw, 70 const char *font); 71 72 void gucharmap_window_search (GucharmapWindow *guw, 73 const char *str); 74 75 G_END_DECLS 76 77 #endif /* #ifndef GUCHARMAP_WINDOW_H */ 78