diff options
author | Tor Lillqvist <tml@novell.com> | 2005-12-18 00:58:55 +0800 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2005-12-18 00:58:55 +0800 |
commit | 52ff11927a7bd7592e70de379e05b4d2b9c669c7 (patch) | |
tree | e41131ba03e6eeeab680fbc834031771c87e1973 /e-util/eggtrayicon.h | |
parent | d0742036000286cd5ec17e1624f0242530e761db (diff) | |
download | gsoc2013-evolution-52ff11927a7bd7592e70de379e05b4d2b9c669c7.tar.gz gsoc2013-evolution-52ff11927a7bd7592e70de379e05b4d2b9c669c7.tar.zst gsoc2013-evolution-52ff11927a7bd7592e70de379e05b4d2b9c669c7.zip |
For building on Win32 against GTK+ 2.8, include a copy of the
2005-12-17 Tor Lillqvist <tml@novell.com>
* eggtrayicon.c: For building on Win32 against GTK+ 2.8, include a
copy of the GtkStatusIcon code from GTK+ HEAD (i.e., what will be
GTK+ 2.10) and some helper functions from gdk/win32. Eventually
when GTK+ 2.10 is released and Evo no longer needs to support
older GTK+ versions, eggtrayicon.[ch] can be removed completely
from here, as the use of eggtrayicon in ../calendar/gui/
alarm-notify/alarm-queue.c will automatically switch to using
GtkStatusIcon instead.
* eggtrayicon.h: Ditto, for building on Win32 against GTK+ 2.8,
include a copy of gtkstatusicon.h from GTK+ HEAD.
svn path=/trunk/; revision=30827
Diffstat (limited to 'e-util/eggtrayicon.h')
-rw-r--r-- | e-util/eggtrayicon.h | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/e-util/eggtrayicon.h b/e-util/eggtrayicon.h index e467894e34..2a8f87b249 100644 --- a/e-util/eggtrayicon.h +++ b/e-util/eggtrayicon.h @@ -21,6 +21,15 @@ #ifndef __EGG_TRAY_ICON_H__ #define __EGG_TRAY_ICON_H__ +#include <gdkconfig.h> + +/* The EggTrayIcon API is implementable only on X11. GTK+ 2.10 will + * have a cross-platform status icon API. That code has been borrowed + * into Evolution for Win32, see after the ifdef GDK_WINDOWING_X11 + * block. + */ +#ifdef GDK_WINDOWING_X11 + #include <gtk/gtkplug.h> #include <gdk/gdkx.h> @@ -76,4 +85,120 @@ GtkOrientation egg_tray_icon_get_orientation (EggTrayIcon *icon); G_END_DECLS +#endif /* GDK_WINDOWING_X11 */ + +#ifdef GDK_WINDOWING_WIN32 + +#include <gtk/gtk.h> + +#if !GTK_CHECK_VERSION (2, 9, 0) + +/* gtkstatusicon.h: + * + * Copyright (C) 2003 Sun Microsystems, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Authors: + * Mark McLoughlin <mark@skynet.ie> + */ + +#include <gtk/gtkimage.h> + +G_BEGIN_DECLS + +#define GTK_TYPE_STATUS_ICON (gtk_status_icon_get_type ()) +#define GTK_STATUS_ICON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_STATUS_ICON, GtkStatusIcon)) +#define GTK_STATUS_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GTK_TYPE_STATUS_ICON, GtkStatusIconClass)) +#define GTK_IS_STATUS_ICON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_STATUS_ICON)) +#define GTK_IS_STATUS_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_TYPE_STATUS_ICON)) +#define GTK_STATUS_ICON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_STATUS_ICON, GtkStatusIconClass)) + +typedef struct _GtkStatusIcon GtkStatusIcon; +typedef struct _GtkStatusIconClass GtkStatusIconClass; +typedef struct _GtkStatusIconPrivate GtkStatusIconPrivate; + +struct _GtkStatusIcon +{ + GObject parent_instance; + + GtkStatusIconPrivate *priv; +}; + +struct _GtkStatusIconClass +{ + GObjectClass parent_class; + + void (* activate) (GtkStatusIcon *status_icon); + void (* popup_menu) (GtkStatusIcon *status_icon, + guint button, + guint32 activate_time); + gboolean (* size_changed) (GtkStatusIcon *status_icon, + gint size); + + void (*__gtk_reserved1); + void (*__gtk_reserved2); + void (*__gtk_reserved3); + void (*__gtk_reserved4); + void (*__gtk_reserved5); + void (*__gtk_reserved6); +}; + +GType gtk_status_icon_get_type (void) G_GNUC_CONST; + +GtkStatusIcon *gtk_status_icon_new (void); +GtkStatusIcon *gtk_status_icon_new_from_pixbuf (GdkPixbuf *pixbuf); +GtkStatusIcon *gtk_status_icon_new_from_file (const gchar *filename); +GtkStatusIcon *gtk_status_icon_new_from_stock (const gchar *stock_id); +GtkStatusIcon *gtk_status_icon_new_from_icon_name (const gchar *icon_name); + +void gtk_status_icon_set_from_pixbuf (GtkStatusIcon *status_icon, + GdkPixbuf *pixbuf); +void gtk_status_icon_set_from_file (GtkStatusIcon *status_icon, + const gchar *filename); +void gtk_status_icon_set_from_stock (GtkStatusIcon *status_icon, + const gchar *stock_id); +void gtk_status_icon_set_from_icon_name (GtkStatusIcon *status_icon, + const gchar *icon_name); + +GtkImageType gtk_status_icon_get_storage_type (GtkStatusIcon *status_icon); + +GdkPixbuf *gtk_status_icon_get_pixbuf (GtkStatusIcon *status_icon); +G_CONST_RETURN gchar *gtk_status_icon_get_stock (GtkStatusIcon *status_icon); +G_CONST_RETURN gchar *gtk_status_icon_get_icon_name (GtkStatusIcon *status_icon); + +gint gtk_status_icon_get_size (GtkStatusIcon *status_icon); + +void gtk_status_icon_set_tooltip (GtkStatusIcon *status_icon, + const gchar *tooltip_text); + +void gtk_status_icon_set_visible (GtkStatusIcon *status_icon, + gboolean visible); +gboolean gtk_status_icon_get_visible (GtkStatusIcon *status_icon); + +void gtk_status_icon_set_blinking (GtkStatusIcon *status_icon, + gboolean blinking); +gboolean gtk_status_icon_get_blinking (GtkStatusIcon *status_icon); + +gboolean gtk_status_icon_is_embedded (GtkStatusIcon *status_icon); + +G_END_DECLS + +#endif /* !GTK_CHECK_VERSION (2, 9, 0) */ + +#endif /* GDK_WINDOWING_WIN32 */ + #endif /* __EGG_TRAY_ICON_H__ */ |