1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 2011 Alberto Ruiz <aruiz@gnome.org>
3 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
5 * GtkFontChooser widget for Gtk+, by Damon Chaplin, May 1998.
6 * Based on the GnomeFontSelector widget, by Elliot Lee, but major changes.
7 * The GnomeFontSelector was derived from app/text_tool.c in the GIMP.
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the
21 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 * Boston, MA 02111-1307, USA.
25 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
26 #error "Only <gtk/gtk.h> can be included directly."
29 #ifndef __GTK_FONT_CHOOSER_DIALOG_H__
30 #define __GTK_FONT_CHOOSER_DIALOG_H__
32 #include <gtk/gtkdialog.h>
36 #define GTK_TYPE_FONT_CHOOSER_DIALOG (gtk_font_chooser_dialog_get_type ())
37 #define GTK_FONT_CHOOSER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FONT_CHOOSER_DIALOG, GtkFontChooserDialog))
38 #define GTK_FONT_CHOOSER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_FONT_CHOOSER_DIALOG, GtkFontChooserDialogClass))
39 #define GTK_IS_FONT_CHOOSER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_FONT_CHOOSER_DIALOG))
40 #define GTK_IS_FONT_CHOOSER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FONT_CHOOSER_DIALOG))
41 #define GTK_FONT_CHOOSER_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_FONT_CHOOSER_DIALOG, GtkFontChooserDialogClass))
43 typedef struct _GtkFontChooserDialog GtkFontChooserDialog;
44 typedef struct _GtkFontChooserDialogPrivate GtkFontChooserDialogPrivate;
45 typedef struct _GtkFontChooserDialogClass GtkFontChooserDialogClass;
47 struct _GtkFontChooserDialog
49 GtkDialog parent_instance;
52 GtkFontChooserDialogPrivate *priv;
55 struct _GtkFontChooserDialogClass
57 GtkDialogClass parent_class;
59 /* Padding for future expansion */
60 void (*_gtk_reserved1) (void);
61 void (*_gtk_reserved2) (void);
62 void (*_gtk_reserved3) (void);
63 void (*_gtk_reserved4) (void);
66 /*****************************************************************************
67 * GtkFontChooserDialog functions.
68 * most of these functions simply call the corresponding function in the
70 *****************************************************************************/
72 GType gtk_font_chooser_dialog_get_type (void) G_GNUC_CONST;
73 GtkWidget* gtk_font_chooser_dialog_new (const gchar *title);
75 GtkWidget* gtk_font_chooser_dialog_get_font_selection (GtkFontChooserDialog *fcd);
77 gchar* gtk_font_chooser_dialog_get_font_name (GtkFontChooserDialog *fcd);
79 gboolean gtk_font_chooser_dialog_set_font_name (GtkFontChooserDialog *fcd,
80 const gchar *fontname);
82 gtk_font_chooser_dialog_get_preview_text (GtkFontChooserDialog *fcd);
84 void gtk_font_chooser_dialog_set_preview_text (GtkFontChooserDialog *fcd,
89 #endif /* __GTK_FONT_CHOOSER_DIALOG_H__ */