1 /*
2  * vala-panel-appmenu
3  * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation, either version 3 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 Lesser General Public License
16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef MODEL_H
20 #define MODEL_H
21 
22 #include "dbusmenu-interface.h"
23 #include <gio/gio.h>
24 #include <stdbool.h>
25 
26 G_BEGIN_DECLS
27 
28 G_DECLARE_FINAL_TYPE(DBusMenuModel, dbus_menu_model, DBUS_MENU, MODEL, GMenuModel)
29 G_GNUC_INTERNAL DBusMenuModel *dbus_menu_model_new(uint parent_id, DBusMenuModel *parent,
30                                                    DBusMenuXml *xml, GActionGroup *action_group);
31 G_GNUC_INTERNAL void dbus_menu_model_update_layout(DBusMenuModel *menu);
32 G_GNUC_INTERNAL void dbus_menu_model_update_layout_sync(DBusMenuModel *menu);
33 G_GNUC_INTERNAL bool dbus_menu_model_is_layout_update_required(DBusMenuModel *model);
34 G_GNUC_INTERNAL void dbus_menu_model_set_layout_update_required(DBusMenuModel *model,
35                                                                 bool required);
36 
37 G_GNUC_INTERNAL GSequence *dbus_menu_model_items(DBusMenuModel *model);
38 
39 G_END_DECLS
40 
41 #endif
42