~ubuntu-branches/ubuntu/vivid/marco/vivid

« back to all changes in this revision

Viewing changes to src/ui/preview-widget.h

  • Committer: Package Import Robot
  • Author(s): Mike Gabriel
  • Date: 2014-01-21 19:52:39 UTC
  • Revision ID: package-import@ubuntu.com-20140121195239-c4k1v8umdw1u4n29
Tags: upstream-1.6.2
ImportĀ upstreamĀ versionĀ 1.6.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
 
2
 
 
3
/* Marco theme preview widget */
 
4
 
 
5
/* 
 
6
 * Copyright (C) 2002 Havoc Pennington
 
7
 * 
 
8
 * This program is free software; you can redistribute it and/or
 
9
 * modify it under the terms of the GNU General Public License as
 
10
 * published by the Free Software Foundation; either version 2 of the
 
11
 * License, or (at your option) any later version.
 
12
 *
 
13
 * This program is distributed in the hope that it will be useful, but
 
14
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
16
 * General Public License for more details.
 
17
 * 
 
18
 * You should have received a copy of the GNU General Public License
 
19
 * along with this program; if not, write to the Free Software
 
20
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 
21
 * 02110-1301, USA.
 
22
 */
 
23
 
 
24
#include "theme.h"
 
25
#include <gtk/gtk.h>
 
26
 
 
27
#ifndef META_PREVIEW_WIDGET_H
 
28
#define META_PREVIEW_WIDGET_H
 
29
 
 
30
#define META_TYPE_PREVIEW                        (meta_preview_get_type ())
 
31
#define META_PREVIEW(obj)                        (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_PREVIEW, MetaPreview))
 
32
#define META_PREVIEW_CLASS(klass)                (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_PREVIEW, MetaPreviewClass))
 
33
#define META_IS_PREVIEW(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_PREVIEW))
 
34
#define META_IS_PREVIEW_CLASS(klass)     (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_PREVIEW))
 
35
#define META_PREVIEW_GET_CLASS(obj)         (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_PREVIEW, MetaPreviewClass))
 
36
 
 
37
typedef struct _MetaPreview     MetaPreview;
 
38
typedef struct _MetaPreviewClass        MetaPreviewClass;
 
39
 
 
40
struct _MetaPreview
 
41
{
 
42
  GtkBin bin;
 
43
 
 
44
  MetaTheme *theme;
 
45
  char *title;
 
46
  MetaFrameType type;
 
47
  MetaFrameFlags flags;  
 
48
 
 
49
  PangoLayout *layout;
 
50
  int text_height;
 
51
 
 
52
  int left_width;
 
53
  int right_width;
 
54
  int top_height;
 
55
  int bottom_height;
 
56
 
 
57
  MetaButtonLayout button_layout;
 
58
};
 
59
 
 
60
struct _MetaPreviewClass
 
61
{
 
62
  GtkBinClass parent_class;
 
63
};
 
64
 
 
65
 
 
66
GType    meta_preview_get_type (void) G_GNUC_CONST;
 
67
GtkWidget* meta_preview_new      (void);
 
68
 
 
69
void meta_preview_set_theme         (MetaPreview            *preview,
 
70
                                     MetaTheme              *theme);
 
71
void meta_preview_set_title         (MetaPreview            *preview,
 
72
                                     const char             *title);
 
73
void meta_preview_set_frame_type    (MetaPreview            *preview,
 
74
                                     MetaFrameType           type);
 
75
void meta_preview_set_frame_flags   (MetaPreview            *preview,
 
76
                                     MetaFrameFlags          flags);
 
77
void meta_preview_set_button_layout (MetaPreview            *preview,
 
78
                                     const MetaButtonLayout *button_layout);
 
79
 
 
80
GdkRegion * meta_preview_get_clip_region (MetaPreview *preview,
 
81
                                          gint new_window_width,
 
82
                                          gint new_window_height);
 
83
 
 
84
GdkPixbuf* meta_preview_get_icon (void);
 
85
GdkPixbuf* meta_preview_get_mini_icon (void);
 
86
 
 
87
#endif