summaryrefslogtreecommitdiff
path: root/gtk/gtkfontsel.h
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>1998-08-17 14:48:51 +0000
committerTim Janik <timj@src.gnome.org>1998-08-17 14:48:51 +0000
commit47215ba40332127afcaed8c9b7f21d9591af59a0 (patch)
treed20b932ea561a5eeb76718e18f5abb7740ecaff0 /gtk/gtkfontsel.h
parent690a18f03288d8053a6c3f32f38b288ade30cde9 (diff)
downloadgtk+-47215ba40332127afcaed8c9b7f21d9591af59a0.tar.gz
removed gtk_input_add_interp.merge-to-themes-2-2
Mon Aug 17 15:31:38 1998 Tim Janik <timj@gtk.org> * gtk/gtkmain.c: removed gtk_input_add_interp. * gtk/gtkeditable.c (gtk_editable_set_position): fixed bogus "return" keyword. (gtk_editable_get_event_time): fix default: case. * gtk/gtkclist.c (gtk_clist_swap_rows): fixes for lvalue casts. * gdk/gdkpixmap.c: made a bunch of unexported functions static. * gdk/gdkcolor.c: * gdk/gdkvisual.c: include "gdkx.h", since it exports prototypes of our functions. * various minor compilation cleanups, such as bogus commas in enums and similar things. M
Diffstat (limited to 'gtk/gtkfontsel.h')
-rw-r--r--gtk/gtkfontsel.h72
1 files changed, 36 insertions, 36 deletions
diff --git a/gtk/gtkfontsel.h b/gtk/gtkfontsel.h
index 01af04e03d..a162c10b8e 100644
--- a/gtk/gtkfontsel.h
+++ b/gtk/gtkfontsel.h
@@ -12,7 +12,7 @@
*
* 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
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
@@ -35,13 +35,17 @@ extern "C" {
#pragma }
#endif /* __cplusplus */
-#define GTK_FONT_SELECTION(obj) GTK_CHECK_CAST(obj, gtk_font_selection_get_type(), GtkFontSelection)
-#define GTK_FONT_SELECTION_CLASS(klass) GTK_CHECK_CLASS_CAST(klass, gtk_font_selection_get_type(), GtkFontSelectionClass)
-#define GTK_IS_FONT_SELECTION(obj) GTK_CHECK_TYPE(obj, gtk_font_selection_get_type())
+#define GTK_TYPE_FONT_SELECTION (gtk_font_selection_get_type ())
+#define GTK_FONT_SELECTION(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_FONT_SELECTION, GtkFontSelection))
+#define GTK_FONT_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FONT_SELECTION, GtkFontSelectionClass))
+#define GTK_IS_FONT_SELECTION(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FONT_SELECTION))
+#define GTK_IS_FONT_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FONT_SELECTION))
-#define GTK_FONT_SELECTION_DIALOG(obj) GTK_CHECK_CAST (obj, gtk_font_selection_dialog_get_type (), GtkFontSelectionDialog)
-#define GTK_FONT_SELECTION_DIALOG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_font_selection_dialog_get_type (), GtkFontSelectionDialogClass)
-#define GTK_IS_FONT_SELECTION_DIALOG(obj) GTK_CHECK_TYPE (obj, gtk_font_selection_dialog_get_type ())
+#define GTK_TYPE_FONT_SELECTION_DIALOG (gtk_font_selection_dialog_get_type ())
+#define GTK_FONT_SELECTION_DIALOG(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_FONT_SELECTION_DIALOG, GtkFontSelectionDialog))
+#define GTK_FONT_SELECTION_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FONT_SELECTION_DIALOG, GtkFontSelectionDialogClass))
+#define GTK_IS_FONT_SELECTION_DIALOG(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FONT_SELECTION_DIALOG))
+#define GTK_IS_FONT_SELECTION_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FONT_SELECTION_DIALOG))
typedef struct _GtkFontSelection GtkFontSelection;
typedef struct _GtkFontSelectionClass GtkFontSelectionClass;
@@ -54,7 +58,7 @@ typedef struct _GtkFontSelectionDialogClass GtkFontSelectionDialogClass;
/* This is the number of properties which we keep in the properties array,
i.e. Weight, Slant, Set Width, Spacing, Charset & Foundry. */
-#define GTK_NUM_FONT_PROPERTIES 6
+#define GTK_NUM_FONT_PROPERTIES 6
/* This is the number of properties each style has i.e. Weight, Slant,
Set Width, Spacing & Charset. Note that Foundry is not included,
@@ -73,7 +77,7 @@ typedef enum
struct _GtkFontSelection
{
GtkNotebook notebook;
-
+
/* These are on the font page. */
GtkWidget *main_vbox;
GtkWidget *font_label;
@@ -89,41 +93,41 @@ struct _GtkFontSelection
GtkWidget *scaled_bitmaps_button;
GtkWidget *preview_entry;
GtkWidget *message_label;
-
+
/* These are on the font info page. */
GtkWidget *info_vbox;
GtkWidget *info_clist;
GtkWidget *requested_font_name;
GtkWidget *actual_font_name;
-
+
/* These are on the filter page. */
GtkWidget *filter_vbox;
GtkWidget *filter_clists[GTK_NUM_FONT_PROPERTIES];
-
+
GdkFont *font;
gint font_index;
gint style;
GtkFontMetricType metric;
/* The size is either in pixels or deci-points, depending on the metric. */
gint size;
-
+
/* This is the last size explicitly selected. When the user selects different
fonts we try to find the nearest size to this. */
gint selected_size;
-
+
/* This flag determines if scaled bitmapped fonts are acceptable. */
gboolean scale_bitmapped_fonts;
-
+
/* These are the current property settings. They are indexes into the
strings in the GtkFontSelInfo properties array. */
guint16 property_values[GTK_NUM_STYLE_PROPERTIES];
-
+
/* These hold the arrays of current filter settings for each property.
If nfilters is 0 then all values of the property are OK. If not the
filters array contains the indexes of the valid property values. */
guint16 *property_filters[GTK_NUM_FONT_PROPERTIES];
guint16 property_nfilters[GTK_NUM_FONT_PROPERTIES];
-
+
/* This flags is set to scroll the clist to the selected value as soon as
it appears. There might be a better way of doing this. */
gboolean scroll_on_expose;
@@ -139,16 +143,16 @@ struct _GtkFontSelectionClass
struct _GtkFontSelectionDialog
{
GtkWindow window;
-
+
GtkWidget *fontsel;
-
+
GtkWidget *main_vbox;
GtkWidget *action_area;
GtkWidget *ok_button;
/* The 'Apply' button is not shown by default but you can show/hide it. */
GtkWidget *apply_button;
GtkWidget *cancel_button;
-
+
/* If the user changes the width of the dialog, we turn auto-shrink off. */
gint dialog_width;
gboolean auto_resize;
@@ -163,7 +167,7 @@ struct _GtkFontSelectionDialogClass
/* FontSelection */
-guint gtk_font_selection_get_type (void);
+GtkType gtk_font_selection_get_type (void);
GtkWidget* gtk_font_selection_new (void);
/* This returns the X Logical Font Description fontname, or NULL if no font
@@ -182,37 +186,33 @@ GdkFont* gtk_font_selection_get_font (GtkFontSelection *fontsel);
Font Description font name (anything else will be ignored), e.g.
"-adobe-courier-bold-o-normal--25-*-*-*-*-*-*-*"
It returns TRUE on success. */
-gboolean gtk_font_selection_set_font_name (GtkFontSelection *fontsel,
+gboolean gtk_font_selection_set_font_name (GtkFontSelection *fontsel,
const gchar *fontname);
/* This returns the text in the preview entry. You should copy the returned
text if you need it. */
-gchar* gtk_font_selection_get_preview_text (GtkFontSelection *fontsel);
+gchar* gtk_font_selection_get_preview_text (GtkFontSelection *fontsel);
/* This sets the text in the preview entry. It will be copied by the entry,
so there's no need to g_strdup() it first. */
-void gtk_font_selection_set_preview_text (GtkFontSelection *fontsel,
+void gtk_font_selection_set_preview_text (GtkFontSelection *fontsel,
const gchar *text);
/* FontSelectionDialog */
-guint gtk_font_selection_dialog_get_type (void);
+GtkType gtk_font_selection_dialog_get_type (void);
GtkWidget* gtk_font_selection_dialog_new (const gchar *title);
/* These simply call the corresponding FontSelection function. */
-gchar* gtk_font_selection_dialog_get_font_name
- (GtkFontSelectionDialog *fsd);
-GdkFont* gtk_font_selection_dialog_get_font (GtkFontSelectionDialog *fsd);
-gboolean gtk_font_selection_dialog_set_font_name
- (GtkFontSelectionDialog *fsd,
- const gchar *fontname);
-gchar* gtk_font_selection_dialog_get_preview_text
- (GtkFontSelectionDialog *fsd);
-void gtk_font_selection_dialog_set_preview_text
- (GtkFontSelectionDialog *fsd,
- const gchar *text);
+gchar* gtk_font_selection_dialog_get_font_name (GtkFontSelectionDialog *fsd);
+GdkFont* gtk_font_selection_dialog_get_font (GtkFontSelectionDialog *fsd);
+gboolean gtk_font_selection_dialog_set_font_name (GtkFontSelectionDialog *fsd,
+ const gchar *fontname);
+gchar* gtk_font_selection_dialog_get_preview_text (GtkFontSelectionDialog *fsd);
+void gtk_font_selection_dialog_set_preview_text (GtkFontSelectionDialog *fsd,
+ const gchar *text);
#ifdef __cplusplus