You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

158 lines
7.8 KiB

  1. /* gtkstatusicon.h:
  2. *
  3. * Copyright (C) 2003 Sun Microsystems, Inc.
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Lesser General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General Public
  16. * License along with this library; if not, write to the
  17. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  18. * Boston, MA 02111-1307, USA.
  19. *
  20. * Authors:
  21. * Mark McLoughlin <mark@skynet.ie>
  22. */
  23. #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
  24. #error "Only <gtk/gtk.h> can be included directly."
  25. #endif
  26. #ifndef __GTK_STATUS_ICON_H__
  27. #define __GTK_STATUS_ICON_H__
  28. #include <gtk/gtkimage.h>
  29. #include <gtk/gtkmenu.h>
  30. G_BEGIN_DECLS
  31. #define GTK_TYPE_STATUS_ICON (gtk_status_icon_get_type ())
  32. #define GTK_STATUS_ICON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_STATUS_ICON, GtkStatusIcon))
  33. #define GTK_STATUS_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GTK_TYPE_STATUS_ICON, GtkStatusIconClass))
  34. #define GTK_IS_STATUS_ICON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_STATUS_ICON))
  35. #define GTK_IS_STATUS_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_TYPE_STATUS_ICON))
  36. #define GTK_STATUS_ICON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_STATUS_ICON, GtkStatusIconClass))
  37. typedef struct _GtkStatusIcon GtkStatusIcon;
  38. typedef struct _GtkStatusIconClass GtkStatusIconClass;
  39. typedef struct _GtkStatusIconPrivate GtkStatusIconPrivate;
  40. struct _GtkStatusIcon
  41. {
  42. GObject parent_instance;
  43. GtkStatusIconPrivate *GSEAL (priv);
  44. };
  45. struct _GtkStatusIconClass
  46. {
  47. GObjectClass parent_class;
  48. void (* activate) (GtkStatusIcon *status_icon);
  49. void (* popup_menu) (GtkStatusIcon *status_icon,
  50. guint button,
  51. guint32 activate_time);
  52. gboolean (* size_changed) (GtkStatusIcon *status_icon,
  53. gint size);
  54. gboolean (* button_press_event) (GtkStatusIcon *status_icon,
  55. GdkEventButton *event);
  56. gboolean (* button_release_event) (GtkStatusIcon *status_icon,
  57. GdkEventButton *event);
  58. gboolean (* scroll_event) (GtkStatusIcon *status_icon,
  59. GdkEventScroll *event);
  60. gboolean (* query_tooltip) (GtkStatusIcon *status_icon,
  61. gint x,
  62. gint y,
  63. gboolean keyboard_mode,
  64. GtkTooltip *tooltip);
  65. void (*__gtk_reserved1);
  66. void (*__gtk_reserved2);
  67. };
  68. GType gtk_status_icon_get_type (void) G_GNUC_CONST;
  69. GtkStatusIcon *gtk_status_icon_new (void);
  70. GtkStatusIcon *gtk_status_icon_new_from_pixbuf (GdkPixbuf *pixbuf);
  71. GtkStatusIcon *gtk_status_icon_new_from_file (const gchar *filename);
  72. GtkStatusIcon *gtk_status_icon_new_from_stock (const gchar *stock_id);
  73. GtkStatusIcon *gtk_status_icon_new_from_icon_name (const gchar *icon_name);
  74. GtkStatusIcon *gtk_status_icon_new_from_gicon (GIcon *icon);
  75. void gtk_status_icon_set_from_pixbuf (GtkStatusIcon *status_icon,
  76. GdkPixbuf *pixbuf);
  77. void gtk_status_icon_set_from_file (GtkStatusIcon *status_icon,
  78. const gchar *filename);
  79. void gtk_status_icon_set_from_stock (GtkStatusIcon *status_icon,
  80. const gchar *stock_id);
  81. void gtk_status_icon_set_from_icon_name (GtkStatusIcon *status_icon,
  82. const gchar *icon_name);
  83. void gtk_status_icon_set_from_gicon (GtkStatusIcon *status_icon,
  84. GIcon *icon);
  85. GtkImageType gtk_status_icon_get_storage_type (GtkStatusIcon *status_icon);
  86. GdkPixbuf *gtk_status_icon_get_pixbuf (GtkStatusIcon *status_icon);
  87. G_CONST_RETURN gchar *gtk_status_icon_get_stock (GtkStatusIcon *status_icon);
  88. G_CONST_RETURN gchar *gtk_status_icon_get_icon_name (GtkStatusIcon *status_icon);
  89. GIcon *gtk_status_icon_get_gicon (GtkStatusIcon *status_icon);
  90. gint gtk_status_icon_get_size (GtkStatusIcon *status_icon);
  91. void gtk_status_icon_set_screen (GtkStatusIcon *status_icon,
  92. GdkScreen *screen);
  93. GdkScreen *gtk_status_icon_get_screen (GtkStatusIcon *status_icon);
  94. #ifndef GTK_DISABLE_DEPRECATED
  95. void gtk_status_icon_set_tooltip (GtkStatusIcon *status_icon,
  96. const gchar *tooltip_text);
  97. #endif
  98. void gtk_status_icon_set_has_tooltip (GtkStatusIcon *status_icon,
  99. gboolean has_tooltip);
  100. void gtk_status_icon_set_tooltip_text (GtkStatusIcon *status_icon,
  101. const gchar *text);
  102. void gtk_status_icon_set_tooltip_markup (GtkStatusIcon *status_icon,
  103. const gchar *markup);
  104. void gtk_status_icon_set_title (GtkStatusIcon *status_icon,
  105. const gchar *title);
  106. G_CONST_RETURN gchar *gtk_status_icon_get_title (GtkStatusIcon *status_icon);
  107. void gtk_status_icon_set_name (GtkStatusIcon *status_icon,
  108. const gchar *name);
  109. void gtk_status_icon_set_visible (GtkStatusIcon *status_icon,
  110. gboolean visible);
  111. gboolean gtk_status_icon_get_visible (GtkStatusIcon *status_icon);
  112. #if !defined (GTK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
  113. void gtk_status_icon_set_blinking (GtkStatusIcon *status_icon,
  114. gboolean blinking);
  115. gboolean gtk_status_icon_get_blinking (GtkStatusIcon *status_icon);
  116. #endif
  117. gboolean gtk_status_icon_is_embedded (GtkStatusIcon *status_icon);
  118. void gtk_status_icon_position_menu (GtkMenu *menu,
  119. gint *x,
  120. gint *y,
  121. gboolean *push_in,
  122. gpointer user_data);
  123. gboolean gtk_status_icon_get_geometry (GtkStatusIcon *status_icon,
  124. GdkScreen **screen,
  125. GdkRectangle *area,
  126. GtkOrientation *orientation);
  127. gboolean gtk_status_icon_get_has_tooltip (GtkStatusIcon *status_icon);
  128. gchar *gtk_status_icon_get_tooltip_text (GtkStatusIcon *status_icon);
  129. gchar *gtk_status_icon_get_tooltip_markup (GtkStatusIcon *status_icon);
  130. guint32 gtk_status_icon_get_x11_window_id (GtkStatusIcon *status_icon);
  131. G_END_DECLS
  132. #endif /* __GTK_STATUS_ICON_H__ */