Remove unused RendererTiles::tile_cols
[geeqie.git] / src / ui-menu.h
1 /*
2  * Copyright (C) 2004 John Ellis
3  * Copyright (C) 2008 - 2016 The Geeqie Team
4  *
5  * Author: John Ellis
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program 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
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21
22 #ifndef UI_MENU_H
23 #define UI_MENU_H
24
25 #include <gdk/gdk.h>
26 #include <glib-object.h>
27 #include <glib.h>
28 #include <gtk/gtk.h>
29
30 /**
31  * @struct hard_coded_window_keys
32  * @brief hard coded window shortcut keys
33  *
34  * Used for two purposes:\n
35  * to display the shortcuts keys in popup menus\n
36  * used by ./doc/create-shortcuts-xml.sh to generate shortcut documentation in the Help files
37  *
38  */
39 struct hard_coded_window_keys {
40         GdkModifierType mask; /**< modifier key mask */
41         guint key_value;  /**< GDK_keyval */
42         const gchar *text;  /**< menu item label - NULL if end of list */
43 };
44
45 GtkWidget *menu_item_add(GtkWidget *menu, const gchar *label,
46                          GCallback func, gpointer data);
47 GtkWidget *menu_item_add_stock(GtkWidget *menu, const gchar *label, const gchar *stock_id,
48                                GCallback func, gpointer data);
49 GtkWidget *menu_item_add_icon(GtkWidget *menu, const gchar *label, const gchar *icon_name,
50                                GCallback func, gpointer data);
51 GtkWidget *menu_item_add_sensitive(GtkWidget *menu, const gchar *label, gboolean sensitive,
52                                    GCallback func, gpointer data);
53 GtkWidget *menu_item_add_icon_sensitive(GtkWidget *menu, const gchar *label, const gchar *icon_name, gboolean sensitive,
54                                          GCallback func, gpointer data);
55 GtkWidget *menu_item_add_stock_sensitive(GtkWidget *menu, const gchar *label, const gchar *stock_id, gboolean sensitive,
56                                          GCallback func, gpointer data);
57 GtkWidget *menu_item_add_check(GtkWidget *menu, const gchar *label, gboolean active,
58                                GCallback func, gpointer data);
59 GtkWidget *menu_item_add_radio(GtkWidget *menu, const gchar *label, gpointer item_data, gboolean active,
60                                GCallback func, gpointer data);
61 void menu_item_add_divider(GtkWidget *menu);
62
63 /**
64  * @headerfile menu_item_add_simple
65  * use to avoid mnemonics, for example filenames
66  */
67 GtkWidget *menu_item_add_simple(GtkWidget *menu, const gchar *label,
68                                 GCallback func, gpointer data);
69
70 GtkWidget *popup_menu_short_lived();
71
72 /**
73  * @headerfile popup_menu_position_clamp
74  * clamp a menu's position to within the screen
75  * if menu will attempt to stay out of region y to y+height
76  */
77 gboolean popup_menu_position_clamp(GtkMenu *menu, gint *x, gint *y, gint height);
78
79
80 #endif
81 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */