summaryrefslogtreecommitdiff
path: root/src/iconthemewrapper.h
blob: 81222b961a6f40abfcdc800faa67d5fe30879a67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef H_PROCMAN_ICONTHEMEWRAPPER_H_1185707711
#define H_PROCMAN_ICONTHEMEWRAPPER_H_1185707711

#include <glibmm/refptr.h>
#include <glibmm/ustring.h>
#include <gtkmm/icontheme.h>
#include <gdkmm/pixbuf.h>

namespace procman
{
    class IconThemeWrapper
    {
      public:
        // returns 0 instead of raising an exception
        Glib::RefPtr<Gdk::Pixbuf>
            load_icon(const Glib::ustring& icon_name, int size) const;
        Glib::RefPtr<Gdk::Pixbuf>
            load_gicon(const Glib::RefPtr<Gio::Icon>& gicon, int size, Gtk::IconLookupFlags flags) const;

        const IconThemeWrapper* operator->() const
        { return this; }
    };
}

#endif // H_PROCMAN_ICONTHEMEWRAPPER_H_1185707711