summaryrefslogtreecommitdiff
path: root/libxfce4panel/xfce-panel-image.h
diff options
context:
space:
mode:
authorNick Schermer <nick@xfce.org>2010-02-26 14:08:19 +0100
committerNick Schermer <nick@xfce.org>2010-02-26 14:11:42 +0100
commitd3d2a87fe0f8caa11e7990a98ca166e1664b2c6f (patch)
tree8a9f43b02c7c5099e5bc47a449b57832354070ab /libxfce4panel/xfce-panel-image.h
parent67c40280596a1ad36204e36c08a8fa741b1caed6 (diff)
Rename XfceScaledImage to XfcePanelImage.
This to avoid conflicts between panel and libxfcegui4. Also changed the calls to the function. You can now set a filename or icon-name through _set_source() function, the object will figure out what the source is. This to reduce code dupplication for loading files or (weird) icon names.
Diffstat (limited to 'libxfce4panel/xfce-panel-image.h')
-rw-r--r--libxfce4panel/xfce-panel-image.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/libxfce4panel/xfce-panel-image.h b/libxfce4panel/xfce-panel-image.h
new file mode 100644
index 00000000..64dd823f
--- /dev/null
+++ b/libxfce4panel/xfce-panel-image.h
@@ -0,0 +1,80 @@
+/* $Id$ */
+/*
+ * Copyright (C) 2008-2009 Nick Schermer <nick@xfce.org>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#if !defined(LIBXFCE4PANEL_INSIDE_LIBXFCE4PANEL_H) && !defined(LIBXFCE4PANEL_COMPILATION)
+#error "Only <libxfce4panel/libxfce4panel.h> can be included directly, this file may disappear or change contents"
+#endif
+
+#ifndef __XFCE_PANEL_IMAGE_H__
+#define __XFCE_PANEL_IMAGE_H__
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+typedef struct _XfcePanelImageClass XfcePanelImageClass;
+typedef struct _XfcePanelImage XfcePanelImage;
+typedef struct _XfcePanelImagePrivate XfcePanelImagePrivate;
+
+struct _XfcePanelImageClass
+{
+ /*< private >*/
+ GtkWidgetClass __parent__;
+
+ /*< private >*/
+ void (*reserved1) (void);
+ void (*reserved2) (void);
+};
+
+struct _XfcePanelImage
+{
+ /*< private >*/
+ GtkWidget __parent__;
+
+ /*< private >*/
+ XfcePanelImagePrivate *priv;
+};
+
+#define XFCE_TYPE_PANEL_IMAGE (xfce_panel_image_get_type ())
+#define XFCE_PANEL_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_PANEL_IMAGE, XfcePanelImage))
+#define XFCE_PANEL_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_PANEL_IMAGE, XfcePanelImageClass))
+#define XFCE_IS_PANEL_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_PANEL_IMAGE))
+#define XFCE_IS_PANEL_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_PANEL_IMAGE))
+#define XFCE_PANEL_IMAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_PANEL_IMAGE, XfcePanelImageClass))
+
+PANEL_SYMBOL_EXPORT
+GType xfce_panel_image_get_type (void) G_GNUC_CONST;
+
+GtkWidget *xfce_panel_image_new (void) G_GNUC_MALLOC;
+
+GtkWidget *xfce_panel_image_new_from_pixbuf (GdkPixbuf *pixbuf) G_GNUC_MALLOC;
+
+GtkWidget *xfce_panel_image_new_from_source (const gchar *source) G_GNUC_MALLOC;
+
+void xfce_panel_image_set_from_pixbuf (XfcePanelImage *image,
+ GdkPixbuf *pixbuf);
+
+void xfce_panel_image_set_from_source (XfcePanelImage *image,
+ const gchar *source);
+
+void xfce_panel_image_clear (XfcePanelImage *image);
+
+G_END_DECLS
+
+#endif /* !__XFCE_PANEL_IMAGE_H__ */