aboutsummaryrefslogtreecommitdiff
path: root/helper
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-10 22:06:56 -0600
committerTed Gould <ted@gould.cx>2010-03-10 22:06:56 -0600
commitfc87fda00e8e42d5a212a199a6f9e8d350388905 (patch)
tree8787d836c971b9a08afe3976256da89b7b45a783 /helper
parent8e12685bab175ee6d494d7545c5c4187385e41eb (diff)
parent5867fa760a390d48f30e8794f6292601c61cefad (diff)
downloadlibayatana-indicator-fc87fda00e8e42d5a212a199a6f9e8d350388905.tar.gz
libayatana-indicator-fc87fda00e8e42d5a212a199a6f9e8d350388905.tar.bz2
libayatana-indicator-fc87fda00e8e42d5a212a199a6f9e8d350388905.zip
Add a small helper for loading images.
Diffstat (limited to 'helper')
-rwxr-xr-xhelper/test-loader-build3
-rw-r--r--helper/test-loader.c18
2 files changed, 21 insertions, 0 deletions
diff --git a/helper/test-loader-build b/helper/test-loader-build
new file mode 100755
index 0000000..fa1e006
--- /dev/null
+++ b/helper/test-loader-build
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+gcc `pkg-config --cflags --libs gtk+-2.0` -I../libindicator/ test-loader.c ../libindicator/indicator-image-helper.c -o test-loader
diff --git a/helper/test-loader.c b/helper/test-loader.c
new file mode 100644
index 0000000..6a06248
--- /dev/null
+++ b/helper/test-loader.c
@@ -0,0 +1,18 @@
+
+#include <gtk/gtk.h>
+#include "indicator-image-helper.h"
+
+int
+main (int argv, char * argc[])
+{
+ gtk_init(&argv, &argc);
+
+ GtkImage * image = indicator_image_helper(argc[1]);
+
+ GdkPixbuf * pixbuf = gtk_image_get_pixbuf(image);
+
+ g_debug("Pixbuf width: %d", gdk_pixbuf_get_width(pixbuf));
+ g_debug("Pixbuf height: %d", gdk_pixbuf_get_height(pixbuf));
+
+ return;
+}