summaryrefslogtreecommitdiff
path: root/gtk/gtkfontchooserdialog.h
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@gnome.org>2011-05-11 22:52:39 +0200
committerMatthias Clasen <mclasen@redhat.com>2011-08-15 18:57:55 -0400
commit4add47946bf225ae6c1a9d51808c5e561faef68d (patch)
tree9cde30348ade33bdffdf51a914816ea2dd491020 /gtk/gtkfontchooserdialog.h
parent8e621f593e4a61c95c93d0f7dcfcd1eed15194e5 (diff)
downloadgtk+-4add47946bf225ae6c1a9d51808c5e561faef68d.tar.gz
GtkFontChooserDialog: Split the dialog out of gtkfontchooser.[ch] to gtkfontchooserdialog.[ch]
Diffstat (limited to 'gtk/gtkfontchooserdialog.h')
-rw-r--r--gtk/gtkfontchooserdialog.h89
1 files changed, 89 insertions, 0 deletions
diff --git a/gtk/gtkfontchooserdialog.h b/gtk/gtkfontchooserdialog.h
new file mode 100644
index 0000000000..0e5f89c685
--- /dev/null
+++ b/gtk/gtkfontchooserdialog.h
@@ -0,0 +1,89 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2011 Alberto Ruiz <aruiz@gnome.org>
+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ *
+ * GtkFontChooser widget for Gtk+, by Damon Chaplin, May 1998.
+ * Based on the GnomeFontSelector widget, by Elliot Lee, but major changes.
+ * The GnomeFontSelector was derived from app/text_tool.c in the GIMP.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <gtk/gtk.h> can be included directly."
+#endif
+
+#ifndef __GTK_FONT_CHOOSER_DIALOG_H__
+#define __GTK_FONT_CHOOSER_DIALOG_H__
+
+#include <gtk/gtkdialog.h>
+
+G_BEGIN_DECLS
+
+#define GTK_TYPE_FONT_CHOOSER_DIALOG (gtk_font_chooser_dialog_get_type ())
+#define GTK_FONT_CHOOSER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FONT_CHOOSER_DIALOG, GtkFontChooserDialog))
+#define GTK_FONT_CHOOSER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_FONT_CHOOSER_DIALOG, GtkFontChooserDialogClass))
+#define GTK_IS_FONT_CHOOSER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_FONT_CHOOSER_DIALOG))
+#define GTK_IS_FONT_CHOOSER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FONT_CHOOSER_DIALOG))
+#define GTK_FONT_CHOOSER_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_FONT_CHOOSER_DIALOG, GtkFontChooserDialogClass))
+
+typedef struct _GtkFontChooserDialog GtkFontChooserDialog;
+typedef struct _GtkFontChooserDialogPrivate GtkFontChooserDialogPrivate;
+typedef struct _GtkFontChooserDialogClass GtkFontChooserDialogClass;
+
+struct _GtkFontChooserDialog
+{
+ GtkDialog parent_instance;
+
+ /*< private >*/
+ GtkFontChooserDialogPrivate *priv;
+};
+
+struct _GtkFontChooserDialogClass
+{
+ GtkDialogClass parent_class;
+
+ /* Padding for future expansion */
+ void (*_gtk_reserved1) (void);
+ void (*_gtk_reserved2) (void);
+ void (*_gtk_reserved3) (void);
+ void (*_gtk_reserved4) (void);
+};
+
+/*****************************************************************************
+ * GtkFontChooserDialog functions.
+ * most of these functions simply call the corresponding function in the
+ * GtkFontChooser.
+ *****************************************************************************/
+
+GType gtk_font_chooser_dialog_get_type (void) G_GNUC_CONST;
+GtkWidget* gtk_font_chooser_dialog_new (const gchar *title);
+
+GtkWidget* gtk_font_chooser_dialog_get_font_selection (GtkFontChooserDialog *fcd);
+
+gchar* gtk_font_chooser_dialog_get_font_name (GtkFontChooserDialog *fcd);
+
+gboolean gtk_font_chooser_dialog_set_font_name (GtkFontChooserDialog *fcd,
+ const gchar *fontname);
+G_CONST_RETURN gchar*
+ gtk_font_chooser_dialog_get_preview_text (GtkFontChooserDialog *fcd);
+
+void gtk_font_chooser_dialog_set_preview_text (GtkFontChooserDialog *fcd,
+ const gchar *text);
+
+G_END_DECLS
+
+#endif /* __GTK_FONT_CHOOSER_DIALOG_H__ */