Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

90 rader
3.6 KiB

  1. /* GTK - The GIMP Toolkit
  2. *
  3. * Copyright (C) 2003 Ricardo Fernandez Pascual
  4. * Copyright (C) 2004 Paolo Borelli
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, write to the
  18. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19. * Boston, MA 02111-1307, USA.
  20. */
  21. #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
  22. #error "Only <gtk/gtk.h> can be included directly."
  23. #endif
  24. #ifndef __GTK_MENU_TOOL_BUTTON_H__
  25. #define __GTK_MENU_TOOL_BUTTON_H__
  26. #include <gtk/gtkmenu.h>
  27. #include <gtk/gtktoolbutton.h>
  28. G_BEGIN_DECLS
  29. #define GTK_TYPE_MENU_TOOL_BUTTON (gtk_menu_tool_button_get_type ())
  30. #define GTK_MENU_TOOL_BUTTON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_MENU_TOOL_BUTTON, GtkMenuToolButton))
  31. #define GTK_MENU_TOOL_BUTTON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GTK_TYPE_MENU_TOOL_BUTTON, GtkMenuToolButtonClass))
  32. #define GTK_IS_MENU_TOOL_BUTTON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_MENU_TOOL_BUTTON))
  33. #define GTK_IS_MENU_TOOL_BUTTON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_TYPE_MENU_TOOL_BUTTON))
  34. #define GTK_MENU_TOOL_BUTTON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_MENU_TOOL_BUTTON, GtkMenuToolButtonClass))
  35. typedef struct _GtkMenuToolButtonClass GtkMenuToolButtonClass;
  36. typedef struct _GtkMenuToolButton GtkMenuToolButton;
  37. typedef struct _GtkMenuToolButtonPrivate GtkMenuToolButtonPrivate;
  38. struct _GtkMenuToolButton
  39. {
  40. GtkToolButton parent;
  41. /*< private >*/
  42. GtkMenuToolButtonPrivate *GSEAL (priv);
  43. };
  44. struct _GtkMenuToolButtonClass
  45. {
  46. GtkToolButtonClass parent_class;
  47. void (*show_menu) (GtkMenuToolButton *button);
  48. /* Padding for future expansion */
  49. void (*_gtk_reserved1) (void);
  50. void (*_gtk_reserved2) (void);
  51. void (*_gtk_reserved3) (void);
  52. void (*_gtk_reserved4) (void);
  53. };
  54. GType gtk_menu_tool_button_get_type (void) G_GNUC_CONST;
  55. GtkToolItem *gtk_menu_tool_button_new (GtkWidget *icon_widget,
  56. const gchar *label);
  57. GtkToolItem *gtk_menu_tool_button_new_from_stock (const gchar *stock_id);
  58. void gtk_menu_tool_button_set_menu (GtkMenuToolButton *button,
  59. GtkWidget *menu);
  60. GtkWidget *gtk_menu_tool_button_get_menu (GtkMenuToolButton *button);
  61. #ifndef GTK_DISABLE_DEPRECATED
  62. void gtk_menu_tool_button_set_arrow_tooltip (GtkMenuToolButton *button,
  63. GtkTooltips *tooltips,
  64. const gchar *tip_text,
  65. const gchar *tip_private);
  66. #endif /* GTK_DISABLE_DEPRECATED */
  67. void gtk_menu_tool_button_set_arrow_tooltip_text (GtkMenuToolButton *button,
  68. const gchar *text);
  69. void gtk_menu_tool_button_set_arrow_tooltip_markup (GtkMenuToolButton *button,
  70. const gchar *markup);
  71. G_END_DECLS
  72. #endif /* __GTK_MENU_TOOL_BUTTON_H__ */