/*  This file is part of lscomp.

    lscomp 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.

    lscomp 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 lsnet.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef __GTK_FUN_H__
#define __GTK_FUN_H__ 1

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <gtk/gtk.h>
#include <cairo/cairo.h>
#include <math.h>
#include "gtk_structs.h"

gboolean on_destroy(GtkWidget *widget, GdkEventButton *event, gpointer data);
gboolean on_comp(GtkWidget *widget, GdkEventButton *event, gpointer data);
gboolean on_comp_s(GtkWidget *widget, GdkEventButton *event,  gpointer data);
gboolean on_recoup(GtkWidget *widget, GdkEventButton *event, gpointer data);

void on_font_chng(GtkSpinButton *widget, gpointer data);
void on_row_chng(GtkSpinButton  *widget, gpointer data);
void on_col_chng(GtkSpinButton  *widget, gpointer data);
void on_commission_chng(GtkSpinButton  *widget, gpointer data);

gboolean on_calculate(GtkWidget *widget, GdkEventButton *event, gpointer data);
void port_adj_row(void);
void port_adj_col(void);
void load_portfolio(gchar *filename);
void save_portfolio(gchar *filename);
gboolean on_file_load(GtkWidget *widget, GdkEventButton *event, gpointer data);
gboolean on_file_save(GtkWidget *widget, GdkEventButton *event, gpointer data);



#endif
