eggtrayicon.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. Permission to use this file under wxWindows licence granted by
  3. the copyright holder, see eggtrayicon.c for details.
  4. */
  5. /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
  6. /* eggtrayicon.h
  7. * Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation; either
  12. * version 2 of the License, or (at your option) any later version.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the
  21. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  22. * Boston, MA 02111-1307, USA.
  23. */
  24. #ifndef __EGG_TRAY_ICON_H__
  25. #define __EGG_TRAY_ICON_H__
  26. #include <gtk/gtk.h>
  27. #ifdef GDK_WINDOWING_X11
  28. #include <gdk/gdkx.h>
  29. #endif
  30. G_BEGIN_DECLS
  31. #define EGG_TYPE_TRAY_ICON (egg_tray_icon_get_type ())
  32. #define EGG_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TRAY_ICON, EggTrayIcon))
  33. #define EGG_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
  34. #define EGG_IS_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TRAY_ICON))
  35. #define EGG_IS_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TRAY_ICON))
  36. #define EGG_TRAY_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
  37. typedef struct _EggTrayIcon EggTrayIcon;
  38. typedef struct _EggTrayIconClass EggTrayIconClass;
  39. struct _EggTrayIcon
  40. {
  41. GtkPlug parent_instance;
  42. guint stamp;
  43. #ifdef GDK_WINDOWING_X11
  44. Atom selection_atom;
  45. Atom manager_atom;
  46. Atom system_tray_opcode_atom;
  47. Atom orientation_atom;
  48. Window manager_window;
  49. #endif
  50. GtkOrientation orientation;
  51. };
  52. struct _EggTrayIconClass
  53. {
  54. GtkPlugClass parent_class;
  55. };
  56. GType egg_tray_icon_get_type (void);
  57. EggTrayIcon *egg_tray_icon_new_for_screen (GdkScreen *screen,
  58. const gchar *name);
  59. EggTrayIcon *egg_tray_icon_new (const gchar *name);
  60. guint egg_tray_icon_send_message (EggTrayIcon *icon,
  61. gint timeout,
  62. const char *message,
  63. gint len);
  64. void egg_tray_icon_cancel_message (EggTrayIcon *icon,
  65. guint id);
  66. GtkOrientation egg_tray_icon_get_orientation (EggTrayIcon *icon);
  67. G_END_DECLS
  68. #endif /* __EGG_TRAY_ICON_H__ */