/*
 *  CWStation
 *  Copyright (c) 2004 by Thierry Leconte (F4DWV)
 *
 *      $Id: image.c,v 1.10 2004/04/24 07:19:48 f4dwv Exp $
 *
 *   This library is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Library 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 Library General Public License for more details.
 *
 *   You should have received a copy of the GNU Library General Public
 *   License along with this library; if not, write to the Free Software
 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 */
                                                                                                                              
/*
 * Initial main.c file generated by Glade. Edit as required.
 * Glade will not overwrite this file.
 */

#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

#include <gtk/gtk.h>
#include <glib.h>

#include <pthread.h>
#include "interface.h"
#include "support.h"

extern void load_data(void);
extern void cwdit_init(void);
extern void open_snd(gchar *dev,guint rate);
extern gpointer txthread(GtkWidget *app);

GtkWidget *window1;
  
int
main (int argc, char *argv[])
{

#ifdef ENABLE_NLS
  bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
  textdomain (GETTEXT_PACKAGE);
#endif

  g_thread_init(NULL);
  gdk_threads_init ();
  gtk_set_locale ();
  gtk_init (&argc, &argv);

  add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");

  open_snd("/dev/dsp",8000);

  window1 = create_window1();

  g_thread_create(txthread,window1,FALSE,NULL);

  gtk_widget_show (window1);

  gtk_widget_grab_focus(lookup_widget(window1,"TxText"));

  load_data();

  gdk_threads_enter();
  gtk_main ();
  gdk_threads_leave();

  return 0;
}

