preview-widget.h

Go to the documentation of this file.
00001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
00002 
00003 /* Metacity theme preview widget */
00004 
00005 /* 
00006  * Copyright (C) 2002 Havoc Pennington
00007  * 
00008  * This program is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU General Public License as
00010  * published by the Free Software Foundation; either version 2 of the
00011  * License, or (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * General Public License for more details.
00017  * 
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00021  * 02111-1307, USA.
00022  */
00023 
00024 #include "theme.h"
00025 #include <gtk/gtkbin.h>
00026 
00027 #ifndef META_PREVIEW_WIDGET_H
00028 #define META_PREVIEW_WIDGET_H
00029 
00030 #define META_TYPE_PREVIEW                        (meta_preview_get_type ())
00031 #define META_PREVIEW(obj)                        (GTK_CHECK_CAST ((obj), META_TYPE_PREVIEW, MetaPreview))
00032 #define META_PREVIEW_CLASS(klass)                (GTK_CHECK_CLASS_CAST ((klass), META_TYPE_PREVIEW, MetaPreviewClass))
00033 #define META_IS_PREVIEW(obj)             (GTK_CHECK_TYPE ((obj), META_TYPE_PREVIEW))
00034 #define META_IS_PREVIEW_CLASS(klass)     (GTK_CHECK_CLASS_TYPE ((klass), META_TYPE_PREVIEW))
00035 #define META_PREVIEW_GET_CLASS(obj)         (GTK_CHECK_GET_CLASS ((obj), META_TYPE_PREVIEW, MetaPreviewClass))
00036 
00037 typedef struct _MetaPreview     MetaPreview;
00038 typedef struct _MetaPreviewClass        MetaPreviewClass;
00039 
00040 struct _MetaPreview
00041 {
00042   GtkBin bin;
00043 
00044   MetaTheme *theme;
00045   char *title;
00046   MetaFrameType type;
00047   MetaFrameFlags flags;  
00048 
00049   PangoLayout *layout;
00050   int text_height;
00051 
00052   int left_width;
00053   int right_width;
00054   int top_height;
00055   int bottom_height;
00056 
00057   MetaButtonLayout button_layout;
00058 };
00059 
00060 struct _MetaPreviewClass
00061 {
00062   GtkBinClass parent_class;
00063 };
00064 
00065 
00066 GtkType    meta_preview_get_type (void) G_GNUC_CONST;
00067 GtkWidget* meta_preview_new      (void);
00068 
00069 void meta_preview_set_theme         (MetaPreview            *preview,
00070                                      MetaTheme              *theme);
00071 void meta_preview_set_title         (MetaPreview            *preview,
00072                                      const char             *title);
00073 void meta_preview_set_frame_type    (MetaPreview            *preview,
00074                                      MetaFrameType           type);
00075 void meta_preview_set_frame_flags   (MetaPreview            *preview,
00076                                      MetaFrameFlags          flags);
00077 void meta_preview_set_button_layout (MetaPreview            *preview,
00078                                      const MetaButtonLayout *button_layout);
00079 
00080 GdkRegion * meta_preview_get_clip_region (MetaPreview *preview,
00081                                           gint new_window_width,
00082                                           gint new_window_height);
00083 
00084 GdkPixbuf* meta_preview_get_icon (void);
00085 GdkPixbuf* meta_preview_get_mini_icon (void);
00086 
00087 #endif

Generated on Sat Aug 23 22:04:18 2008 for metacity by  doxygen 1.5.5