aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-gtk/menuitem.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-09-02 13:50:29 -0500
committerTed Gould <ted@canonical.com>2009-09-02 13:50:29 -0500
commite5356b61c7d7238157fb275b4b17c2d7536f92be (patch)
tree2296f98d1a89642d7e7dead729d1539142c21752 /libdbusmenu-gtk/menuitem.c
parent1f70c55fcaab52f5d81650b98c05fec134861b9f (diff)
downloadlibdbusmenu-e5356b61c7d7238157fb275b4b17c2d7536f92be.tar.gz
libdbusmenu-e5356b61c7d7238157fb275b4b17c2d7536f92be.tar.bz2
libdbusmenu-e5356b61c7d7238157fb275b4b17c2d7536f92be.zip
Some comments in gtk-doc style.
Diffstat (limited to 'libdbusmenu-gtk/menuitem.c')
-rw-r--r--libdbusmenu-gtk/menuitem.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/libdbusmenu-gtk/menuitem.c b/libdbusmenu-gtk/menuitem.c
index 48576f9..deded06 100644
--- a/libdbusmenu-gtk/menuitem.c
+++ b/libdbusmenu-gtk/menuitem.c
@@ -28,6 +28,19 @@ License version 3 and version 2.1 along with this program. If not, see
#include "menuitem.h"
+/**
+ dbusmenu_menuitem_property_set_image:
+ @menuitem: The #DbusmenuMenuitem to set the property on.
+ @property: Name of the property to set.
+ @data: The image to place on the property.
+
+ This function takes the pixbuf that is stored in @data and
+ turns it into a base64 encoded PNG so that it can be placed
+ onto a standard #DbusmenuMenuitem property.
+
+ Return value: Whether the function was able to set the property
+ or not.
+*/
gboolean
dbusmenu_menuitem_property_set_image (DbusmenuMenuitem * menuitem, const gchar * property, const GdkPixbuf * data)
{
@@ -61,6 +74,18 @@ dbusmenu_menuitem_property_set_image (DbusmenuMenuitem * menuitem, const gchar *
return propreturn;
}
+/**
+ dbusmenu_menuitem_property_get_image:
+ @menuitem: The #DbusmenuMenuite to look for the property on
+ @property: The name of the property to look for.
+
+ This function looks on the menu item for a property by the
+ name of @property. If one exists it tries to turn it into
+ a #GdkPixbuf. It assumes that the property is a base64 encoded
+ PNG file like the one created by #dbusmenu_menuite_property_set_image.
+
+ Return value: A pixbuf or #NULL to signal error.
+*/
GdkPixbuf *
dbusmenu_menuitem_property_get_image (DbusmenuMenuitem * menuitem, const gchar * property)
{