Adding upstream version 0.9.0.
[debian/lxpanel.git] / plugins / launch-button.h
1 /**
2 * Copyright (C) 2016 Andriy Grytsenko <andrej@rep.kiev.ua>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19 #ifndef __LAUNCH_BUTTON_H__
20 #define __LAUNCH_BUTTON_H__ 1
21
22 #include "plugin.h"
23
24 #include <gtk/gtk.h>
25
26 G_BEGIN_DECLS
27
28 #define PANEL_TYPE_LAUNCH_BUTTON (launch_button_get_type())
29 #define PANEL_LAUNCH_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
30 PANEL_TYPE_LAUNCH_BUTTON, LaunchButton))
31 #define PANEL_LAUNCH_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
32 PANEL_TYPE_LAUNCH_BUTTON, LaunchButtonClass))
33 #define PANEL_IS_LAUNCH_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
34 PANEL_TYPE_LAUNCH_BUTTON))
35 #define PANEL_IS_LAUNCH_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
36 PANEL_TYPE_LAUNCH_BUTTON))
37
38 extern GType launch_button_get_type (void) G_GNUC_CONST;
39
40 typedef struct _LaunchButton LaunchButton;
41 typedef struct _LaunchButtonClass LaunchButtonClass;
42
43 struct _LaunchButtonClass
44 {
45 GtkEventBoxClass parent_class;
46 };
47
48 /* creates new button */
49 LaunchButton *launch_button_new(LXPanel *panel, GtkWidget *plugin, FmPath *path, config_setting_t *settings);
50 FmFileInfo *launch_button_get_file_info(LaunchButton *btn);
51 const char *launch_button_get_disp_name(LaunchButton *btn);
52 FmIcon *launch_button_get_icon(LaunchButton *btn);
53 config_setting_t *launch_button_get_settings(LaunchButton *btn);
54 void launch_button_set_settings(LaunchButton *btn, config_setting_t *settings);
55 gboolean launch_button_wait_load(LaunchButton *btn);
56
57 G_END_DECLS
58
59 #endif /* __LAUNCH_BUTTON_H__ */