1 /* 2 * fm-menu-tool-item.h 3 * 4 * Copyright (C) 2003 Ricardo Fernandez Pascual 5 * Copyright (C) 2004 Paolo Borelli 6 * 7 * Copyright (C) 2013 Andriy Grytsenko (LStranger) <andrej@rep.kiev.ua> 8 * 9 * This library is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU Lesser General Public 11 * License as published by the Free Software Foundation; either 12 * version 2 of the License, or (at your option) any later version. 13 * 14 * This library is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * Lesser General Public License for more details. 18 * 19 * You should have received a copy of the GNU Lesser General Public 20 * License along with this library; if not, write to the 21 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 22 * Boston, MA 02111-1307, USA. 23 */ 24 25 #ifndef __FM_MENU_TOOL_ITEM_H__ 26 #define __FM_MENU_TOOL_ITEM_H__ 27 28 #include <gtk/gtk.h> 29 30 #include "fm-seal.h" 31 32 G_BEGIN_DECLS 33 34 #define FM_TYPE_MENU_TOOL_ITEM (fm_menu_tool_item_get_type ()) 35 #define FM_MENU_TOOL_ITEM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), FM_TYPE_MENU_TOOL_ITEM, FmMenuToolItem)) 36 #define FM_MENU_TOOL_ITEM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), FM_TYPE_MENU_TOOL_ITEM, FmMenuToolItemClass)) 37 #define FM_IS_MENU_TOOL_ITEM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), FM_TYPE_MENU_TOOL_ITEM)) 38 #define FM_IS_MENU_TOOL_ITEM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), FM_TYPE_MENU_TOOL_ITEM)) 39 40 typedef struct _FmMenuToolItemClass FmMenuToolItemClass; 41 typedef struct _FmMenuToolItem FmMenuToolItem; 42 typedef struct _FmMenuToolItemPrivate FmMenuToolItemPrivate; 43 44 struct _FmMenuToolItem 45 { 46 GtkToolItem parent; 47 48 /*< private >*/ 49 FmMenuToolItemPrivate *FM_SEAL (priv); 50 }; 51 52 /** 53 * FmMenuToolItemClass: 54 * @parent_class: the parent class 55 * @show_menu: the class closure for the #FmMenuToolItem::show-menu signal 56 */ 57 struct _FmMenuToolItemClass 58 { 59 GtkToolItemClass parent_class; 60 61 void (*show_menu) (FmMenuToolItem *button); 62 63 /*< private >*/ 64 /* Padding for future expansion */ 65 void (*_fm_reserved1) (void); 66 void (*_fm_reserved2) (void); 67 void (*_fm_reserved3) (void); 68 void (*_fm_reserved4) (void); 69 }; 70 71 GType fm_menu_tool_item_get_type(void); 72 GtkToolItem *fm_menu_tool_item_new(void); 73 void fm_menu_tool_item_set_menu(FmMenuToolItem *button, GtkWidget *menu); 74 GtkWidget *fm_menu_tool_item_get_menu(FmMenuToolItem *button); 75 76 G_END_DECLS 77 78 #endif /* __FM_MENU_TOOL_ITEM_H__ */ 79