2
* @brief EEK preview stuff
4
/* ***** BEGIN LICENSE BLOCK *****
5
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
7
* The contents of this file are subject to the Mozilla Public License Version
8
* 1.1 (the "License"); you may not use this file except in compliance with
9
* the License. You may obtain a copy of the License at
10
* http://www.mozilla.org/MPL/
12
* Software distributed under the License is distributed on an "AS IS" basis,
13
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14
* for the specific language governing rights and limitations under the
17
* The Original Code is Eek Preview Stuffs.
19
* The Initial Developer of the Original Code is
21
* Portions created by the Initial Developer are Copyright (C) 2005-2008
22
* the Initial Developer. All Rights Reserved.
26
* Alternatively, the contents of this file may be used under the terms of
27
* either the GNU General Public License Version 2 or later (the "GPL"), or
28
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29
* in which case the provisions of the GPL or the LGPL are applicable instead
30
* of those above. If you wish to allow use of your version of this file only
31
* under the terms of either the GPL or the LGPL, and not to allow others to
32
* use your version of this file under the terms of the MPL, indicate your
33
* decision by deleting the provisions above and replace them with the notice
34
* and other provisions required by the GPL or the LGPL. If you do not delete
35
* the provisions above, a recipient may use your version of this file under
36
* the terms of any one of the MPL, the GPL or the LGPL.
38
* ***** END LICENSE BLOCK ***** */
40
#ifndef SEEN_EEK_PREVIEW_H
41
#define SEEN_EEK_PREVIEW_H
43
#include <gdk/gdkpixbuf.h>
44
#include <gtk/gtkdrawingarea.h>
49
#define EEK_PREVIEW_TYPE (eek_preview_get_type())
50
#define EEK_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST( (obj), EEK_PREVIEW_TYPE, EekPreview))
51
#define EEK_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST( (klass), EEK_PREVIEW_TYPE, EekPreviewClass))
52
#define IS_EEK_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE( (obj), EEK_PREVIEW_TYPE))
53
#define IS_EEK_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE( (klass), EEK_PREVIEW_TYPE))
54
#define EEK_PREVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS( (obj), EEK_PREVIEW_TYPE, EekPreviewClass))
57
PREVIEW_STYLE_ICON = 0,
58
PREVIEW_STYLE_PREVIEW,
61
PREVIEW_STYLE_ICON_NAME,
62
PREVIEW_STYLE_ICON_BLURB,
63
PREVIEW_STYLE_PREVIEW_NAME,
64
PREVIEW_STYLE_PREVIEW_BLURB
73
PREVIEW_SIZE_TINY = 0,
82
PREVIEW_LINK_NONE = 0,
85
PREVIEW_LINK_OTHER = 4,
91
typedef struct _EekPreview EekPreview;
92
typedef struct _EekPreviewClass EekPreviewClass;
97
GtkDrawingArea drawing;
107
gboolean _takesFocus;
109
PreviewStyle _prevstyle;
114
GdkPixbuf* _previewPixbuf;
118
struct _EekPreviewClass
120
GtkDrawingAreaClass parent_class;
122
void (*clicked) (EekPreview* splat);
126
GType eek_preview_get_type(void) G_GNUC_CONST;
127
GtkWidget* eek_preview_new(void);
129
void eek_preview_set_details( EekPreview* splat, PreviewStyle prevstyle, ViewType view, PreviewSize size, guint ratio );
130
void eek_preview_set_color( EekPreview* splat, int r, int g, int b );
131
void eek_preview_set_pixbuf( EekPreview* splat, GdkPixbuf* pixbuf );
133
void eek_preview_set_linked( EekPreview* splat, LinkType link );
134
LinkType eek_preview_get_linked( EekPreview* splat );
136
gboolean eek_preview_get_focus_on_click( EekPreview* preview );
137
void eek_preview_set_focus_on_click( EekPreview* preview, gboolean focus_on_click );
139
void eek_preview_set_size_mappings( guint count, GtkIconSize const* sizes );
143
#endif /* SEEN_EEK_PREVIEW_H */
148
c-file-style:"stroustrup"
149
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
154
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :