您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

121 行
4.5 KiB

  1. /*
  2. * gtkinfobar.h
  3. * This file is part of GTK+
  4. *
  5. * Copyright (C) 2005 - Paolo Maggi
  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 gedit Team, 2005. See the gedit AUTHORS file for a
  24. * list of people on the gedit Team.
  25. * See the gedit ChangeLog files for a list of changes.
  26. *
  27. * Modified by the GTK+ Team, 2008-2009.
  28. */
  29. #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
  30. #error "Only <gtk/gtk.h> can be included directly."
  31. #endif
  32. #ifndef __GTK_INFO_BAR_H__
  33. #define __GTK_INFO_BAR_H__
  34. #include <gtk/gtkhbox.h>
  35. #include <gtk/gtkenums.h>
  36. G_BEGIN_DECLS
  37. /*
  38. * Type checking and casting macros
  39. */
  40. #define GTK_TYPE_INFO_BAR (gtk_info_bar_get_type())
  41. #define GTK_INFO_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_INFO_BAR, GtkInfoBar))
  42. #define GTK_INFO_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_INFO_BAR, GtkInfoBarClass))
  43. #define GTK_IS_INFO_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_INFO_BAR))
  44. #define GTK_IS_INFO_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_INFO_BAR))
  45. #define GTK_INFO_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_INFO_BAR, GtkInfoBarClass))
  46. typedef struct _GtkInfoBarPrivate GtkInfoBarPrivate;
  47. typedef struct _GtkInfoBarClass GtkInfoBarClass;
  48. typedef struct _GtkInfoBar GtkInfoBar;
  49. struct _GtkInfoBar
  50. {
  51. GtkHBox parent;
  52. /*< private > */
  53. GtkInfoBarPrivate *priv;
  54. };
  55. struct _GtkInfoBarClass
  56. {
  57. GtkHBoxClass parent_class;
  58. /* Signals */
  59. void (* response) (GtkInfoBar *info_bar, gint response_id);
  60. /* Keybinding signals */
  61. void (* close) (GtkInfoBar *info_bar);
  62. /* Padding for future expansion */
  63. void (*_gtk_reserved1) (void);
  64. void (*_gtk_reserved2) (void);
  65. void (*_gtk_reserved3) (void);
  66. void (*_gtk_reserved4) (void);
  67. void (*_gtk_reserved5) (void);
  68. void (*_gtk_reserved6) (void);
  69. };
  70. GType gtk_info_bar_get_type (void) G_GNUC_CONST;
  71. GtkWidget *gtk_info_bar_new (void);
  72. GtkWidget *gtk_info_bar_new_with_buttons (const gchar *first_button_text,
  73. ...);
  74. GtkWidget *gtk_info_bar_get_action_area (GtkInfoBar *info_bar);
  75. GtkWidget *gtk_info_bar_get_content_area (GtkInfoBar *info_bar);
  76. void gtk_info_bar_add_action_widget (GtkInfoBar *info_bar,
  77. GtkWidget *child,
  78. gint response_id);
  79. GtkWidget *gtk_info_bar_add_button (GtkInfoBar *info_bar,
  80. const gchar *button_text,
  81. gint response_id);
  82. void gtk_info_bar_add_buttons (GtkInfoBar *info_bar,
  83. const gchar *first_button_text,
  84. ...);
  85. void gtk_info_bar_set_response_sensitive (GtkInfoBar *info_bar,
  86. gint response_id,
  87. gboolean setting);
  88. void gtk_info_bar_set_default_response (GtkInfoBar *info_bar,
  89. gint response_id);
  90. /* Emit response signal */
  91. void gtk_info_bar_response (GtkInfoBar *info_bar,
  92. gint response_id);
  93. void gtk_info_bar_set_message_type (GtkInfoBar *info_bar,
  94. GtkMessageType message_type);
  95. GtkMessageType gtk_info_bar_get_message_type (GtkInfoBar *info_bar);
  96. G_END_DECLS
  97. #endif /* __GTK_INFO_BAR_H__ */