libgnomeuimm  2.28.0
thumbnail.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _LIBGNOMEUIMM_THUMBNAIL_H
4 #define _LIBGNOMEUIMM_THUMBNAIL_H
5 
6 
7 #include <glibmm.h>
8 
9 /* thumbnail.hg
10  *
11  * Copyright (C) 1999 The Gtk-- Development Team
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free Software Foundation; either
16  * version 2.1 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  * Lesser General Public License for more details.
22  *
23  * You should have received a copy of the GNU Lesser General Public
24  * License along with this library; if not, write to the Free
25  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26  */
27 
28 #include <glibmm/object.h>
29 #include <gdkmm/pixbuf.h>
30 
31 
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 typedef struct _GnomeThumbnailFactory GnomeThumbnailFactory;
34 typedef struct _GnomeThumbnailFactoryClass GnomeThumbnailFactoryClass;
35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
36 
37 
38 namespace Gnome
39 {
40 
41 namespace UI
42 { class ThumbnailFactory_Class; } // namespace UI
43 
44 } // namespace Gnome
45 namespace Gnome
46 {
47 
48 namespace UI
49 {
50 
57 {
60 };
61 
62 
63 class ThumbnailFactory : public Glib::Object
64 {
65 
66 #ifndef DOXYGEN_SHOULD_SKIP_THIS
67 
68 public:
69  typedef ThumbnailFactory CppObjectType;
70  typedef ThumbnailFactory_Class CppClassType;
71  typedef GnomeThumbnailFactory BaseObjectType;
72  typedef GnomeThumbnailFactoryClass BaseClassType;
73 
74 private: friend class ThumbnailFactory_Class;
75  static CppClassType thumbnailfactory_class_;
76 
77 private:
78  // noncopyable
80  ThumbnailFactory& operator=(const ThumbnailFactory&);
81 
82 protected:
83  explicit ThumbnailFactory(const Glib::ConstructParams& construct_params);
84  explicit ThumbnailFactory(GnomeThumbnailFactory* castitem);
85 
86 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
87 
88 public:
89  virtual ~ThumbnailFactory();
90 
91 #ifndef DOXYGEN_SHOULD_SKIP_THIS
92  static GType get_type() G_GNUC_CONST;
93 
94 
95  static GType get_base_type() G_GNUC_CONST;
96 #endif
97 
99  GnomeThumbnailFactory* gobj() { return reinterpret_cast<GnomeThumbnailFactory*>(gobject_); }
100 
102  const GnomeThumbnailFactory* gobj() const { return reinterpret_cast<GnomeThumbnailFactory*>(gobject_); }
103 
105  GnomeThumbnailFactory* gobj_copy();
106 
107 private:
108 
109 public:
110  static Glib::RefPtr<ThumbnailFactory> create(ThumbnailSize size);
111 
112 
113  Glib::ustring lookup(const Glib::ustring& uri, time_t mtime) const;
114 
115  bool has_valid_failed_thumbnail(const Glib::ustring& uri, time_t mtime) const;
116 
117  bool can_thumbnail(const Glib::ustring& uri, const Glib::ustring& mime_type, time_t mtime) const;
118 
119  Glib::RefPtr<Gdk::Pixbuf> generate_thumbnail(const Glib::ustring& uri, const Glib::ustring& mime_type) const;
120 
121  void save_thumbnail(const Glib::RefPtr<Gdk::Pixbuf>& thumbnail, const Glib::ustring& uri, time_t original_mtime);
122 
123  void create_failed_thumbnail(const Glib::ustring& uri, time_t mtime) const;
124 
125 
126 public:
127 
128 public:
129  //C++ methods used to invoke GTK+ virtual functions:
130 #ifdef GLIBMM_VFUNCS_ENABLED
131 #endif //GLIBMM_VFUNCS_ENABLED
132 
133 protected:
134  //GTK+ Virtual Functions (override these to change behaviour):
135 #ifdef GLIBMM_VFUNCS_ENABLED
136 #endif //GLIBMM_VFUNCS_ENABLED
137 
138  //Default Signal Handlers::
139 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
140 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
141 
142 
143 };
144 
145 /* Thumbnailing utils: */
146 bool thumbnail_has_uri(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf, const Glib::ustring& uri);
147 bool thumbnail_is_valid(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf, const Glib::ustring& uri, time_t mtime);
148 
149 Glib::ustring thumbnail_md5(const Glib::ustring& uri);
150 Glib::ustring thumbnail_path_for_uri(const Glib::ustring& uri, ThumbnailSize size);
151 
152 /* Pixbuf utils: */
153 Glib::RefPtr<Gdk::Pixbuf> thumbnail_scale_down_pixbuf(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf, int dest_width, int dest_height);
154 
155 } /* namespace UI */
156 } /* namespace Gnome */
157 
158 
159 namespace Glib
160 {
169  Glib::RefPtr<Gnome::UI::ThumbnailFactory> wrap(GnomeThumbnailFactory* object, bool take_copy = false);
170 }
171 
172 
173 #endif /* _LIBGNOMEUIMM_THUMBNAIL_H */
174 
bool has_valid_failed_thumbnail(const Glib::ustring &uri, time_t mtime) const
Glib::ustring lookup(const Glib::ustring &uri, time_t mtime) const
Glib::ustring thumbnail_md5(const Glib::ustring &uri)
static Glib::RefPtr< ThumbnailFactory > create(ThumbnailSize size)
Glib::RefPtr< Gdk::Pixbuf > generate_thumbnail(const Glib::ustring &uri, const Glib::ustring &mime_type) const
Glib::RefPtr< Gdk::Pixbuf > thumbnail_scale_down_pixbuf(const Glib::RefPtr< Gdk::Pixbuf > &pixbuf, int dest_width, int dest_height)
GnomeThumbnailFactory * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it...
Definition: thumbnail.h:63
bool can_thumbnail(const Glib::ustring &uri, const Glib::ustring &mime_type, time_t mtime) const
ThumbnailSize
Definition: thumbnail.h:56
Definition: thumbnail.h:58
bool thumbnail_is_valid(const Glib::RefPtr< Gdk::Pixbuf > &pixbuf, const Glib::ustring &uri, time_t mtime)
Glib::ustring thumbnail_path_for_uri(const Glib::ustring &uri, ThumbnailSize size)
void create_failed_thumbnail(const Glib::ustring &uri, time_t mtime) const
bool thumbnail_has_uri(const Glib::RefPtr< Gdk::Pixbuf > &pixbuf, const Glib::ustring &uri)
const GnomeThumbnailFactory * gobj() const
Provides access to the underlying C GObject.
Definition: thumbnail.h:102
void save_thumbnail(const Glib::RefPtr< Gdk::Pixbuf > &thumbnail, const Glib::ustring &uri, time_t original_mtime)
Definition: thumbnail.h:59
GnomeThumbnailFactory * gobj()
Provides access to the underlying C GObject.
Definition: thumbnail.h:99