No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

111 líneas
3.4 KiB

  1. /* GTK - The GIMP Toolkit
  2. * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
  3. *
  4. * GtkQueryTips: Query onscreen widgets for their tooltips
  5. * Copyright (C) 1998 Tim Janik
  6. *
  7. * This library is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2 of the License, or (at your option) any later version.
  11. *
  12. * This library is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with this library; if not, write to the
  19. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  20. * Boston, MA 02111-1307, USA.
  21. */
  22. /*
  23. * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
  24. * file for a list of people on the GTK+ Team. See the ChangeLog
  25. * files for a list of changes. These files are distributed with
  26. * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  27. */
  28. #ifndef GTK_DISABLE_DEPRECATED
  29. #ifndef __GTK_TIPS_QUERY_H__
  30. #define __GTK_TIPS_QUERY_H__
  31. #include <gtk/gtk.h>
  32. G_BEGIN_DECLS
  33. /* --- type macros --- */
  34. #define GTK_TYPE_TIPS_QUERY (gtk_tips_query_get_type ())
  35. #define GTK_TIPS_QUERY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TIPS_QUERY, GtkTipsQuery))
  36. #define GTK_TIPS_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TIPS_QUERY, GtkTipsQueryClass))
  37. #define GTK_IS_TIPS_QUERY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TIPS_QUERY))
  38. #define GTK_IS_TIPS_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TIPS_QUERY))
  39. #define GTK_TIPS_QUERY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TIPS_QUERY, GtkTipsQueryClass))
  40. /* --- typedefs --- */
  41. typedef struct _GtkTipsQuery GtkTipsQuery;
  42. typedef struct _GtkTipsQueryClass GtkTipsQueryClass;
  43. /* --- structures --- */
  44. struct _GtkTipsQuery
  45. {
  46. GtkLabel label;
  47. guint emit_always : 1;
  48. guint in_query : 1;
  49. gchar *label_inactive;
  50. gchar *label_no_tip;
  51. GtkWidget *caller;
  52. GtkWidget *last_crossed;
  53. GdkCursor *query_cursor;
  54. };
  55. struct _GtkTipsQueryClass
  56. {
  57. GtkLabelClass parent_class;
  58. void (*start_query) (GtkTipsQuery *tips_query);
  59. void (*stop_query) (GtkTipsQuery *tips_query);
  60. void (*widget_entered) (GtkTipsQuery *tips_query,
  61. GtkWidget *widget,
  62. const gchar *tip_text,
  63. const gchar *tip_private);
  64. gint (*widget_selected) (GtkTipsQuery *tips_query,
  65. GtkWidget *widget,
  66. const gchar *tip_text,
  67. const gchar *tip_private,
  68. GdkEventButton *event);
  69. /* Padding for future expansion */
  70. void (*_gtk_reserved1) (void);
  71. void (*_gtk_reserved2) (void);
  72. void (*_gtk_reserved3) (void);
  73. void (*_gtk_reserved4) (void);
  74. };
  75. /* --- prototypes --- */
  76. GType gtk_tips_query_get_type (void) G_GNUC_CONST;
  77. GtkWidget* gtk_tips_query_new (void);
  78. void gtk_tips_query_start_query (GtkTipsQuery *tips_query);
  79. void gtk_tips_query_stop_query (GtkTipsQuery *tips_query);
  80. void gtk_tips_query_set_caller (GtkTipsQuery *tips_query,
  81. GtkWidget *caller);
  82. void gtk_tips_query_set_labels (GtkTipsQuery *tips_query,
  83. const gchar *label_inactive,
  84. const gchar *label_no_tip);
  85. G_END_DECLS
  86. #endif /* __GTK_TIPS_QUERY_H__ */
  87. #endif /* GTK_DISABLE_DEPRECATED */