glibmm r758 - in trunk: . gio/src tools/m4
- From: jjongsma svn gnome org
- To: svn-commits-list gnome org
- Subject: glibmm r758 - in trunk: . gio/src tools/m4
- Date: Fri, 12 Dec 2008 02:43:09 +0000 (UTC)
Author: jjongsma
Date: Fri Dec 12 02:43:09 2008
New Revision: 758
URL: http://svn.gnome.org/viewvc/glibmm?rev=758&view=rev
Log:
Add Emblem and EmblemedIcon classes
Added:
trunk/gio/src/emblem.ccg
trunk/gio/src/emblem.hg
trunk/gio/src/emblemedicon.ccg
trunk/gio/src/emblemedicon.hg
Modified:
trunk/ChangeLog
trunk/gio/src/Makefile_list_of_hg.am_fragment
trunk/tools/m4/convert_gio.m4
Modified: trunk/gio/src/Makefile_list_of_hg.am_fragment
==============================================================================
--- trunk/gio/src/Makefile_list_of_hg.am_fragment (original)
+++ trunk/gio/src/Makefile_list_of_hg.am_fragment Fri Dec 12 02:43:09 2008
@@ -5,10 +5,10 @@
files_posix_hg = unixinputstream.hg unixoutputstream.hg desktopappinfo.hg
files_win32_hg =
-files_general_hg = appinfo.hg asyncresult.hg cancellable.hg drive.hg error.hg file.hg fileattributeinfo.hg \
+files_general_hg = appinfo.hg asyncresult.hg cancellable.hg drive.hg emblem.hg emblemedicon.hg error.hg file.hg fileattributeinfo.hg \
fileattributeinfolist.hg fileenumerator.hg fileicon.hg fileinfo.hg fileinputstream.hg fileoutputstream.hg \
filemonitor.hg filterinputstream.hg filteroutputstream.hg filenamecompleter.hg \
- icon.hg inputstream.hg loadableicon.hg mount.hg mountoperation.hg outputstream.hg \
+ icon.hg inputstream.hg loadableicon.hg memoryoutputstream.hg mount.hg mountoperation.hg outputstream.hg \
seekable.hg volume.hg volumemonitor.hg bufferedinputstream.hg \
bufferedoutputstream.hg datainputstream.hg dataoutputstream.hg enums.hg \
memoryinputstream.hg themedicon.hg
Added: trunk/gio/src/emblem.ccg
==============================================================================
--- (empty file)
+++ trunk/gio/src/emblem.ccg Fri Dec 12 02:43:09 2008
@@ -0,0 +1,25 @@
+// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+
+/* Copyright (C) 2008 Jonathon Jongsma
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gio/gio.h>
+
+namespace Gio
+{
+
+} //namespace Gio
Added: trunk/gio/src/emblem.hg
==============================================================================
--- (empty file)
+++ trunk/gio/src/emblem.hg Fri Dec 12 02:43:09 2008
@@ -0,0 +1,64 @@
+// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+
+/* Copyright (C) 2007 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/object.h>
+#include <giomm/icon.h>
+
+_DEFS(giomm,gio)
+_PINCLUDE(glibmm/private/object_p.h)
+
+namespace Gio
+{
+
+_WRAP_ENUM(EmblemOrigin, GEmblemOrigin, NO_GTYPE)
+
+/** An object for emblems
+ *
+ * Emblem is an implementation of GIcon that supports having an emblem, which
+ * is an icon with additional properties. It can than be added to a
+ * EmblemedIcon.
+ *
+ * Currently, only metainformation about the emblem's origin is supported. More
+ * may be added in the future.
+ *
+ * @newin2p20
+ */
+class Emblem
+: public Glib::Object,
+ public Icon
+{
+ _CLASS_GOBJECT(Emblem, GEmblem, G_EMBLEM, Glib::Object, GObject)
+ _IMPLEMENTS_INTERFACE(Icon)
+
+protected:
+ //TODO: Documentation:
+ _WRAP_CTOR(Emblem(const Glib::RefPtr<Icon>& icon), g_emblem_new)
+ _WRAP_CTOR(Emblem(const Glib::RefPtr<Icon>& icon, EmblemOrigin origin), g_emblem_new_with_origin)
+
+public:
+ _WRAP_CREATE(const Glib::RefPtr<Icon>& icon)
+ _WRAP_CREATE(const Glib::RefPtr<Icon>& icon, EmblemOrigin origin)
+
+ _WRAP_METHOD(Glib::RefPtr<Icon> get_icon(), g_emblem_get_icon)
+ _WRAP_METHOD(Glib::RefPtr<const Icon> get_icon() const, g_emblem_get_icon, constversion)
+ _WRAP_METHOD(EmblemOrigin get_origin() const, g_emblem_get_origin)
+
+};
+
+} // namespace Gio
Added: trunk/gio/src/emblemedicon.ccg
==============================================================================
--- (empty file)
+++ trunk/gio/src/emblemedicon.ccg Fri Dec 12 02:43:09 2008
@@ -0,0 +1,25 @@
+// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+
+/* Copyright (C) 2008 Jonathon Jongsma
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gio/gio.h>
+
+namespace Gio
+{
+
+} //namespace Gio
Added: trunk/gio/src/emblemedicon.hg
==============================================================================
--- (empty file)
+++ trunk/gio/src/emblemedicon.hg Fri Dec 12 02:43:09 2008
@@ -0,0 +1,63 @@
+// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+
+/* Copyright (C) 2007 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/object.h>
+#include <giomm/icon.h>
+#include <giomm/emblem.h>
+
+_DEFS(giomm,gio)
+_PINCLUDE(glibmm/private/object_p.h)
+
+namespace Gio
+{
+
+/** Icons with Emblems
+ *
+ * EmblemedIcon is an implementation of Icon that supports adding an emblem to
+ * an icon. Adding multiple emblems to an icon is ensured via add_emblem().
+ *
+ * Note that EmblemedIcon allows no control over the position of the emblems.
+ * See also Emblem for more information.
+ *
+ * @newin2p20
+ */
+class EmblemedIcon
+: public Glib::Object,
+ public Icon
+{
+ _CLASS_GOBJECT(EmblemedIcon, GEmblemedIcon, G_EMBLEMED_ICON, Glib::Object, GObject)
+ _IMPLEMENTS_INTERFACE(Icon)
+
+protected:
+ //TODO: Documentation:
+ _WRAP_CTOR(EmblemedIcon(const Glib::RefPtr<Icon>& icon, const Glib::RefPtr<Emblem>& emblem), g_emblemed_icon_new)
+
+public:
+ _WRAP_CREATE(const Glib::RefPtr<Icon>& icon, const Glib::RefPtr<Emblem>& emblem)
+
+ _WRAP_METHOD(Glib::RefPtr<Icon> get_icon(), g_emblemed_icon_get_icon);
+ _WRAP_METHOD(Glib::RefPtr<const Icon> get_icon() const, g_emblemed_icon_get_icon, constversion);
+#m4 _CONVERSION(`GList*',`Glib::ListHandle<Glib::RefPtr<Emblem> >',`$2($3, Glib::OWNERSHIP_NONE)')
+ _WRAP_METHOD(Glib::ListHandle<Glib::RefPtr<Emblem> > get_emblems(), g_emblemed_icon_get_emblems);
+ // TODO: need constversion?
+ //_WRAP_METHOD(Glib::ListHandle<Glib::RefPtr<const Emblem> > get_emblems() const, g_emblemed_icon_get_emblems, constversion);
+ _WRAP_METHOD(void add_emblem(const Glib::RefPtr<Emblem>& emblem), g_emblemed_icon_add_emblem);
+};
+
+} // namespace Gio
Modified: trunk/tools/m4/convert_gio.m4
==============================================================================
--- trunk/tools/m4/convert_gio.m4 (original)
+++ trunk/tools/m4/convert_gio.m4 Fri Dec 12 02:43:09 2008
@@ -15,6 +15,7 @@
_CONV_ENUM(G,AppInfoCreateFlags)
_CONV_ENUM(G,DataStreamByteOrder)
_CONV_ENUM(G,DataStreamNewlineType)
+_CONV_ENUM(G,EmblemOrigin)
# AppInfo
@@ -84,6 +85,10 @@
_CONVERSION(`GIcon*',`Glib::RefPtr<Icon>',`Glib::wrap($3)')
_CONVERSION(`const Glib::RefPtr<Icon>&',`GIcon*',__CONVERT_CONST_REFPTR_TO_P)
_CONVERSION(`Glib::RefPtr<Icon>',`GIcon*',__CONVERT_REFPTR_TO_P)
+_CONVERSION(`Glib::RefPtr<const Icon>',`GIcon*',__CONVERT_CONST_REFPTR_TO_P)
+
+_CONVERSION(`const Glib::RefPtr<Emblem>&',`GEmblem*',__CONVERT_CONST_REFPTR_TO_P)
+_CONVERSION(`const Glib::RefPtr<Emblem>&',`GEmblem*',__CONVERT_CONST_REFPTR_TO_P)
# InputStream
_CONVERSION(`const Glib::RefPtr<InputStream>&',`GInputStream*',__CONVERT_CONST_REFPTR_TO_P)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]