/*  ----------------------------------------------------------------------

    gtail -- A "tail -f" for GTK+.
    Copyright (c) 1999 Colin Marquardt <colin.marquardt@gmx.de>

    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, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

    ---------------------------------------------------------------------- */

#ifndef __GTAIL_H__
#define __GTAIL_H__

#include <fcntl.h>
#include <sys/stat.h>

#define MEM_PROFILE
#define MEM_CHECK

#define FILES_MAX 4

typedef struct {
  FILE *fp;
  time_t mtime;
  gchar name[PATH_MAX];
  guint slot_no;
  guint page_no;
}
Log;

/* global variables --------------------------------- */
Log *FileLog[FILES_MAX];
gint tag[FILES_MAX];
GtkWidget *TextWidget[FILES_MAX];
GtkWidget *Notebook;
guint OpenFiles;
gboolean FileSlotIsFree[FILES_MAX];

GtkWidget *Menubar;
GtkWidget *menuContainer_File;
GtkWidget *menuItemTop_File;
GtkWidget *menuItem_Close;
GtkWidget *menuContainer_Help;
GtkWidget *menuItemTop_Help;
GtkWidget *menuItem_About;
GtkWidget *menuItem_Add;
GtkWidget *menuItem_Remove;


void close_application(GtkWidget *widget, gpointer data);
void on_add_activate (GtkMenuItem *menuitem, gpointer user_data);
void on_remove_activate (GtkMenuItem *menuitem, gpointer user_data);
void on_about_activate (GtkMenuItem *menuitem, gpointer user_data);
GtkWidget* draw_notebook (guint FileNo, guint PageNo, GString *FileName, GtkWidget *Notebook);
void add_file (GString *FileName);
void remove_file (void);

#endif /* __GTAIL_H__ */
