gp-menu-utils.h 1.51 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/*
 * Copyright (C) 2018 Alberts Muktupāvels
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef GP_MENU_UTILS_H
#define GP_MENU_UTILS_H

#include <gio/gdesktopappinfo.h>
22
#include <gtk/gtk.h>
23 24 25

G_BEGIN_DECLS

26 27 28
typedef void (* GpAppendMenuItemsFunc) (GtkMenu  *menu,
                                        gpointer  user_data);

29
void   gp_menu_utils_app_info_launch       (GDesktopAppInfo *app_info);
30

31
void   gp_menu_utils_launch_uri            (const gchar     *uri);
32

33
GIcon *gp_menu_utils_get_icon_for_file     (GFile           *file);
34

35
gchar *gp_menu_utils_get_label_for_file    (GFile           *file);
36

37 38
void   gp_menu_utils_show_error_dialog     (const gchar     *message,
                                            GError          *error);
39

40
gchar *gp_menu_utils_get_user_name         (void);
41

42 43 44
gchar *gp_menu_utils_get_applications_menu (void);

void   append_separator_if_needed          (GtkMenu         *menu);
45

46 47 48
G_END_DECLS

#endif