Merged revisions 6293,6296-6306,6308 via svnmerge from
[ardour.git] / libs / glibmm2 / gio / src / icon.hg
1 // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2
3 /* Copyright (C) 2007 The giomm Development Team
4  *
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.
9  *
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.
14  *
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.
18  */
19
20 #include <glibmm/interface.h>
21
22 _DEFS(giomm,gio)
23 _PINCLUDE(glibmm/private/interface_p.h)
24
25 #ifndef DOXYGEN_SHOULD_SKIP_THIS
26 typedef struct _GIconIface GIconIface;
27 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
28
29 namespace Gio
30 {
31
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).
35  *
36  * To obtain a hash of an Icon instance, see hash().
37  *
38  * To check if two Icon instances are equal, see equal().
39  *
40  * @newin2p16
41  */
42 class Icon : public Glib::Interface
43 {
44   _CLASS_INTERFACE(Icon, GIcon, G_ICON, GIconIface)
45
46 public:
47   _WRAP_METHOD(guint hash() const, g_icon_hash)
48
49   _IGNORE(g_icon_equal)
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;
53
54   //_WRAP_VFUNC(guint hash() const, "hash")
55
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...
59 };
60
61 } // namespace Gio
62