/* 
 * Copyright (C) 2003 Tim Martin
 *
 * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 */

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

#include "game.h"
#include "map.h"

void
on_new1_activate                       (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_quit1_activate                      (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_about1_activate                     (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_about2_activate                     (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_about1_activate                     (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

gboolean
on_maindrawingarea_key_press_event     (GtkWidget       *widget,
                                        GdkEventKey     *event,
                                        gpointer         user_data);

gboolean
on_maindrawingarea_configure_event     (GtkWidget       *widget,
                                        GdkEventConfigure *event,
                                        gpointer         user_data);


gboolean
on_maindrawingarea_button_press_event  (GtkWidget       *widget,
                                        GdkEventButton  *event,
                                        gpointer         user_data);

gboolean
on_maindrawingarea_expose_event        (GtkWidget       *widget,
                                        GdkEventExpose  *event,
                                        gpointer         user_data);

gboolean
on_maindrawingarea_button_press_event  (GtkWidget       *widget,
                                        GdkEventButton  *event,
                                        gpointer         user_data);

void
on_RoadButton_clicked                  (GtkButton       *button,
                                        gpointer         user_data);

void
on_RaiseButton_clicked                 (GtkButton       *button,
                                        gpointer         user_data);

void
on_LowerButton_clicked                 (GtkButton       *button,
                                        gpointer         user_data);

void
on_TreeButton_clicked                  (GtkButton       *button,
                                        gpointer         user_data);

void
on_zoomin_clicked                      (GtkButton       *button,
                                        gpointer         user_data);

void
on_zoomout_clicked                     (GtkButton       *button,
                                        gpointer         user_data);

gboolean
on_maindrawingarea_motion_notify_event (GtkWidget       *widget,
                                        GdkEventMotion  *event,
                                        gpointer         user_data);

gboolean
on_maindrawingarea_button_release_event
                                        (GtkWidget       *widget,
                                        GdkEventButton  *event,
                                        gpointer         user_data);

gboolean
on_maindrawingarea_button_press_event  (GtkWidget       *widget,
                                        GdkEventButton  *event,
                                        gpointer         user_data);

void
on_show_grid1_activate                 (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_HouseButton_clicked                 (GtkButton       *button,
                                        gpointer         user_data);

void
on_WaterButton_clicked                 (GtkButton       *button,
                                        gpointer         user_data);

void
on_about_ok_button_clicked             (GtkButton       *button,
                                        gpointer         user_data);

void
on_buyland_clicked                     (GtkButton       *button,
                                        gpointer         user_data);

void
on_RotateButton_clicked                (GtkButton       *button,
                                        gpointer         user_data);

void
on_menu_normal_view_activate           (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_menu_owner_view_activate            (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_startgamebutton_clicked             (GtkButton       *button,
                                        gpointer         user_data);

void
on_gamesizey_spinbutton_changed        (GtkEditable     *editable,
                                        gpointer         user_data);

void
on_gamesizex_spinbutton_changed        (GtkEditable     *editable,
                                        gpointer         user_data);
void
set_current_time(time_t curtime);

void
set_current_weather(char *weather, int temp);

gboolean
on_mapsize_optionmenu_configure_event  (GtkWidget       *widget,
                                        GdkEventConfigure *event,
                                        gpointer         user_data);

void
on_population_report_activate          (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_popreport_okbutton_clicked          (GtkButton       *button,
                                        gpointer         user_data);

void
on_finances_activate                   (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_finances_okay_clicked               (GtkButton       *button,
                                        gpointer         user_data);

void
on_workbutton_clicked                  (GtkButton       *button,
                                        gpointer         user_data);

void
on_fastest1_activate                   (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_fast1_activate                      (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_normal1_activate                    (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_slow1_activate                      (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_paused1_activate                    (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_demolish_button_clicked             (GtkButton       *button,
                                        gpointer         user_data);

void
on_RaiseButton_clicked                 (GtkButton       *button,
                                        gpointer         user_data);

void
on_farm_button_clicked                 (GtkButton       *button,
                                        gpointer         user_data);

void
on_info_okay_buttom_clicked            (GtkButton       *button,
                                        gpointer         user_data);

void
on_borrow_button_clicked               (GtkButton       *button,
                                        gpointer         user_data);

gboolean
on_maindrawingarea_leave_notify_event  (GtkWidget       *widget,
                                        GdkEventCrossing *event,
                                        gpointer         user_data);

void
on_govern_button_clicked               (GtkButton       *button,
                                        gpointer         user_data);

void
on_login_button_clicked                (GtkButton       *button,
                                        gpointer         user_data);

void
on_startgame_button_clicked            (GtkButton       *button,
                                        gpointer         user_data);

void
on_gamelist_select_row                 (GtkCList        *clist,
                                        gint             row,
                                        gint             column,
                                        GdkEvent        *event,
                                        gpointer         user_data);

void
on_menu_report_goal_activate           (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

extern void
screen_center_on_xy(map_t *map, int mapx, int mapy);

void
on_goal_window_okay_button_clicked     (GtkButton       *button,
                                        gpointer         user_data);

void
on_payoff_button_clicked               (GtkButton       *button,
                                        gpointer         user_data);

void
on_loans_list_select_row               (GtkCList        *clist,
                                        gint             row,
                                        gint             column,
                                        GdkEvent        *event,
                                        gpointer         user_data);

gboolean
on_popreport_window_destroy_event      (GtkWidget       *widget,
                                        GdkEvent        *event,
                                        gpointer         user_data);

void
on_popreport_window_remove             (GtkContainer    *container,
                                        GtkWidget       *widget,
                                        gpointer         user_data);

void
on_Finances_remove                     (GtkContainer    *container,
                                        GtkWidget       *widget,
                                        gpointer         user_data);

void
on_stats_activate                      (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_stats_okay_buttom_clicked           (GtkButton       *button,
                                        gpointer         user_data);
extern int
server_connect(const char *username, const char *servername);

extern void show_select_game(void);

extern int select_game(const char *game);

extern void start_local_server(void);

void
on_zoom_in1_activate                   (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_zoom_out1_activate                  (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_rotate1_activate                    (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_buy_land1_activate                  (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_zone_housing1_activate              (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_zone_office1_activate               (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_zone_industrial1_activate           (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_zone_commercial1_activate           (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_zone_farm1_activate                 (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_road2_activate                      (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_trees1_activate                     (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_park1_activate                      (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_pool1_activate                      (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_school1_activate                    (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_police1_activate                    (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_hospital1_activate                  (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_fire_station1_activate              (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_tax_rates_activate                  (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_button1_clicked                     (GtkButton       *button,
                                        gpointer         user_data);

void
on_taxes_okbutton_clicked              (GtkButton       *button,
                                        gpointer         user_data);

void
on_buy_all1_activate                   (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_sell1_activate                      (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_demolish1_activate                  (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_zone_view1_activate                 (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_police_coverage1_activate           (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_show_buildings_activate             (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_hospital_coverage1_activate         (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_fire_station_coverage1_activate     (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_gamelistwindow_remove               (GtkContainer    *container,
                                        GtkWidget       *widget,
                                        gpointer         user_data);

void
on_goal_window_remove                  (GtkContainer    *container,
                                        GtkWidget       *widget,
                                        gpointer         user_data);

void
on_stats_window_remove                 (GtkContainer    *container,
                                        GtkWidget       *widget,
                                        gpointer         user_data);

void
on_happiness_activate                  (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_flatten_activate                    (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_raise_activate                      (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_lower_activate                      (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_golf_course1_activate               (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void set_speed_ui(game_speeds_t speed);

void
on_window1_destroy                     (GtkObject       *object,
                                        gpointer         user_data);

void
on_localserverbutton_clicked           (GtkButton       *button,
                                        gpointer         user_data);

void
on_info_window_remove                  (GtkContainer    *container,
                                        GtkWidget       *widget,
                                        gpointer         user_data);

void
on_menu_mine_view_activate             (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_coal_power_plant_activate           (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_water_well_activate                 (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_garbage_dump_activate               (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_port_activate                       (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_sewage_treatment_plant_activate     (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_small_school_activate               (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_school1_activate                    (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_quick_help_activate                 (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_gas_power_activate                  (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_well_activate                       (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_tower_activate                      (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_landfill_activate                   (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_sheriff_activate                    (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_police_station_activate             (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_clinic_activate                     (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_hospital_activate                   (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_nuclear_power_plant_activate        (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_university_activate                 (GtkMenuItem     *menuitem,
                                        gpointer         user_data);

void
on_about_ok_button_clicked             (GtkButton       *button,
                                        gpointer         user_data);

void
on_localserverbutton_clicked           (GtkButton       *button,
                                        gpointer         user_data);

void
on_StartGameButton_clicked             (GtkButton       *button,
                                        gpointer         user_data);

void
on_about_ok_clicked                    (GtkButton       *button,
                                        gpointer         user_data);

void
on_textdisp_okay_button_clicked        (GtkButton       *button,
                                        gpointer         user_data);

void
on_textdisp_window_remove              (GtkContainer    *container,
                                        GtkWidget       *widget,
                                        gpointer         user_data);

void
on_finances_okay_button_clicked        (GtkButton       *button,
                                        gpointer         user_data);

void
on_payoff_button_clicked               (GtkButton       *button,
                                        gpointer         user_data);

void
on_borrow_button_clicked               (GtkButton       *button,
                                        gpointer         user_data);
