Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

gtktooltips.h 3.5 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /* GTK - The GIMP Toolkit
  2. * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the
  16. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  17. * Boston, MA 02111-1307, USA.
  18. */
  19. /*
  20. * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
  21. * file for a list of people on the GTK+ Team. See the ChangeLog
  22. * files for a list of changes. These files are distributed with
  23. * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  24. */
  25. #ifndef GTK_DISABLE_DEPRECATED
  26. #ifndef __GTK_TOOLTIPS_H__
  27. #define __GTK_TOOLTIPS_H__
  28. #include <gtk/gtkwidget.h>
  29. #include <gtk/gtkwindow.h>
  30. G_BEGIN_DECLS
  31. #define GTK_TYPE_TOOLTIPS (gtk_tooltips_get_type ())
  32. #define GTK_TOOLTIPS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TOOLTIPS, GtkTooltips))
  33. #define GTK_TOOLTIPS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TOOLTIPS, GtkTooltipsClass))
  34. #define GTK_IS_TOOLTIPS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TOOLTIPS))
  35. #define GTK_IS_TOOLTIPS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TOOLTIPS))
  36. #define GTK_TOOLTIPS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TOOLTIPS, GtkTooltipsClass))
  37. typedef struct _GtkTooltips GtkTooltips;
  38. typedef struct _GtkTooltipsClass GtkTooltipsClass;
  39. typedef struct _GtkTooltipsData GtkTooltipsData;
  40. struct _GtkTooltipsData
  41. {
  42. GtkTooltips *tooltips;
  43. GtkWidget *widget;
  44. gchar *tip_text;
  45. gchar *tip_private;
  46. };
  47. struct _GtkTooltips
  48. {
  49. GtkObject parent_instance;
  50. /*< private >*/
  51. GtkWidget *tip_window;
  52. GtkWidget *tip_label;
  53. GtkTooltipsData *active_tips_data;
  54. GList *tips_data_list; /* unused */
  55. guint delay : 30;
  56. guint enabled : 1;
  57. guint have_grab : 1;
  58. guint use_sticky_delay : 1;
  59. gint timer_tag;
  60. GTimeVal last_popdown;
  61. };
  62. struct _GtkTooltipsClass
  63. {
  64. GtkObjectClass parent_class;
  65. /* Padding for future expansion */
  66. void (*_gtk_reserved1) (void);
  67. void (*_gtk_reserved2) (void);
  68. void (*_gtk_reserved3) (void);
  69. void (*_gtk_reserved4) (void);
  70. };
  71. GType gtk_tooltips_get_type (void) G_GNUC_CONST;
  72. GtkTooltips* gtk_tooltips_new (void);
  73. void gtk_tooltips_enable (GtkTooltips *tooltips);
  74. void gtk_tooltips_disable (GtkTooltips *tooltips);
  75. void gtk_tooltips_set_delay (GtkTooltips *tooltips,
  76. guint delay);
  77. void gtk_tooltips_set_tip (GtkTooltips *tooltips,
  78. GtkWidget *widget,
  79. const gchar *tip_text,
  80. const gchar *tip_private);
  81. GtkTooltipsData* gtk_tooltips_data_get (GtkWidget *widget);
  82. void gtk_tooltips_force_window (GtkTooltips *tooltips);
  83. gboolean gtk_tooltips_get_info_from_tip_window (GtkWindow *tip_window,
  84. GtkTooltips **tooltips,
  85. GtkWidget **current_widget);
  86. G_END_DECLS
  87. #endif /* __GTK_TOOLTIPS_H__ */
  88. #endif /* GTK_DISABLE_DEPRECATED */