This repository has been archived on 2024-07-15. You can view files and clone it, but cannot push or open issues or pull requests.
hedera/vn/vn-gui.h

81 lines
2.3 KiB
C

/*
* Copyright (C) 2012 - Juan Ferrer Toribio
*
* 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 3 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 VN_GUI_H
#define VN_GUI_H
#include <gtk/gtk.h>
#include <db/db.h>
#define VN_TYPE_GUI (vn_gui_get_type ())
#define VN_GUI(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, VN_TYPE_GUI, VnGui))
#define VN_IS_GUI(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, VN_TYPE_GUI))
#define VN_GUI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, VN_TYPE_GUI, VnGuiClass))
#define VN_IS_GUI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE (klass, VN_TYPE_GUI))
#define VN_GUI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, VN_TYPE_GUI, VnGuiClass))
typedef struct _VnGui VnGui;
typedef struct _VnGuiClass VnGuiClass;
typedef struct _VnWindow VnWindow;
#include "vn-mod.h"
#include "vn-form.h"
/*
* @windows: (element-type VnWindow):
* @modules: (element-type ModData):
*/
struct _VnGui
{
GObject parent;
DbConn * conn;
GtkApplication * app;
gchar * app_title;
VnWindow * main_window;
GtkTreeStore * tree;
GtkTreeView * menu;
GtkSpinner * spinner;
GtkDialog * about;
GtkLabel * status_label;
GHashTable * forms;
GSList * windows;
GSList * modules;
gchar * config_file;
gchar ** lib_dirs;
gchar ** data_dirs;
};
struct _VnGuiClass
{
GObjectClass parent;
};
GType vn_gui_get_type ();
VnGui * vn_gui_new (GtkApplication * app, DbConn * conn);
void vn_gui_open (VnGui * obj);
void vn_gui_save (VnGui * obj);
VnWindow * vn_gui_create_window (VnGui * obj, gint x, gint y);
VnForm * vn_gui_open_form_at_window (VnGui * obj, const gchar * form_name, VnWindow * window);
VnForm * vn_gui_open_form (VnGui * obj, const gchar * form_name);
void vn_gui_close_form (VnGui * obj, VnForm * form);
DbConn * vn_gui_get_conn (VnGui * obj);
#endif