1 // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 /* Copyright (C) 2007 The giomm Development Team
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the Free
17 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include <glibmm/interface.h>
23 _PINCLUDE(glibmm/private/interface_p.h)
25 #ifndef DOXYGEN_SHOULD_SKIP_THIS
26 typedef struct _GIconIface GIconIface;
27 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
32 /** This is a very minimal interface for icons. It provides functions for checking the equality of two icons and hashing of icons.
33 * Glib::Icon does not provide the actual pixmap for the icon as this is out of GIO's scope. However implementations of Icon may contain the name of an
34 * icon (see ThemedIcon), or the path to an icon (see LoadableIcon).
36 * To obtain a hash of an Icon instance, see hash().
38 * To check if two Icon instances are equal, see equal().
42 class Icon : public Glib::Interface
44 _CLASS_INTERFACE(Icon, GIcon, G_ICON, GIconIface)
47 _WRAP_METHOD(guint hash() const, g_icon_hash)
50 // TODO: should this, and File's equal(), be virtual, in order to
51 // be available to derived classes?
52 bool equal(const Glib::RefPtr<Icon>& other) const;
54 //_WRAP_VFUNC(guint hash() const, "hash")
56 // TODO: also kind of related to equal() being virtual or not,
57 // do we need to have equal_vfunc()? Or rather, why would we want
58 // to have it generally...