1 /* HexChat 2 * Copyright (C) 1998-2010 Peter Zelezny. 3 * Copyright (C) 2009-2013 Berke Viktor. 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 18 */ 19 20 #ifndef HEXCHAT_MENU_H 21 #define HEXCHAT_MENU_H 22 23 GtkWidget *menu_create_main (void *accel_group, int bar, int away, int toplevel, GtkWidget **menu_widgets); 24 void menu_urlmenu (GdkEventButton * event, char *url); 25 void menu_chanmenu (session *sess, GdkEventButton * event, char *chan); 26 void menu_addfavoritemenu (server *serv, GtkWidget *menu, char *channel, gboolean istree); 27 void menu_addconnectmenu (server *serv, GtkWidget *menu); 28 void menu_nickmenu (session *sess, GdkEventButton * event, char *nick, int num_sel); 29 void menu_middlemenu (session *sess, GdkEventButton *event); 30 void userlist_button_cb (GtkWidget * button, char *cmd); 31 void nick_command_parse (session *sess, char *cmd, char *nick, char *allnick); 32 void usermenu_update (void); 33 GtkWidget *menu_toggle_item (char *label, GtkWidget *menu, void *callback, void *userdata, int state); 34 GtkWidget *menu_quick_item (char *cmd, char *label, GtkWidget * menu, int flags, gpointer userdata, char *icon); 35 GtkWidget *menu_quick_sub (char *name, GtkWidget *menu, GtkWidget **sub_item_ret, int flags, int pos); 36 GtkWidget *create_icon_menu (char *labeltext, void *stock_name, int is_stock); 37 void menu_create (GtkWidget *menu, GSList *list, char *target, int check_path); 38 void menu_bar_toggle (void); 39 void menu_add_plugin_items (GtkWidget *menu, char *root, char *target); 40 void menu_change_layout (void); 41 42 void menu_set_away (session_gui *gui, int away); 43 void menu_set_fullscreen (session_gui *gui, int fullscreen); 44 45 /* for menu_quick functions */ 46 #define XCMENU_DOLIST 1 47 #define XCMENU_SHADED 1 48 #define XCMENU_MARKUP 2 49 #define XCMENU_MNEMONIC 4 50 51 /* menu items we keep a GtkWidget* for (to change their state) */ 52 #define MENU_ID_AWAY 1 53 #define MENU_ID_MENUBAR 2 54 #define MENU_ID_TOPICBAR 3 55 #define MENU_ID_USERLIST 4 56 #define MENU_ID_ULBUTTONS 5 57 #define MENU_ID_MODEBUTTONS 6 58 #define MENU_ID_LAYOUT_TABS 7 59 #define MENU_ID_LAYOUT_TREE 8 60 #define MENU_ID_DISCONNECT 9 61 #define MENU_ID_RECONNECT 10 62 #define MENU_ID_JOIN 11 63 #define MENU_ID_USERMENU 12 64 #define MENU_ID_FULLSCREEN 13 65 #define MENU_ID_HEXCHAT 14 66 67 #if (MENU_ID_NUM < MENU_ID_HEXCHAT) 68 #error MENU_ID_NUM is set wrong 69 #endif 70 71 #endif 72