1 /** \file   ui.h
2  * \brief   Main Gtk3 UI code - header
3  *
4  * \author  Marco van den Heuvel <blackystardust68@yahoo.com>
5  */
6 
7 /*
8  * This file is part of VICE, the Versatile Commodore Emulator.
9  * See README for copyright notice.
10  *
11  *  This program is free software; you can redistribute it and/or modify
12  *  it under the terms of the GNU General Public License as published by
13  *  the Free Software Foundation; either version 2 of the License, or
14  *  (at your option) any later version.
15  *
16  *  This program is distributed in the hope that it will be useful,
17  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  *  GNU General Public License for more details.
20  *
21  *  You should have received a copy of the GNU General Public License
22  *  along with this program; if not, write to the Free Software
23  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
24  *  02111-1307  USA.
25  *
26  */
27 
28 #ifndef VICE_UI_H
29 #define VICE_UI_H
30 
31 #include "vice.h"
32 
33 #include <gtk/gtk.h>
34 
35 #include "videoarch.h"
36 #include "palette.h"
37 
38 
39 /** \brief  Number of drives we support in the UI
40  */
41 #define NUM_DRIVES 4
42 
43 
44 /** \brief  Number of GtkWindow's in the ui_resources
45  */
46 #define NUM_WINDOWS 3
47 
48 
49 /** \brief  Window indices
50  */
51 enum {
52     PRIMARY_WINDOW,     /**< primary window, all emulators */
53     SECONDARY_WINDOW,   /**< secondary window, C128's VDC */
54     MONITOR_WINDOW      /**< optional monitor window/terminal */
55 };
56 
57 
58 /* ------------------------------------------------------------------------- */
59 /* Prototypes */
60 
61 void ui_set_handle_dropped_files_func(int (*func)(const char *));
62 void ui_set_create_window_func(void (*func)(video_canvas_t *));
63 void ui_set_identify_canvas_func(int (*func)(video_canvas_t *));
64 void ui_set_create_controls_widget_func(GtkWidget *(*func)(int));
65 
66 void ui_create_main_window(video_canvas_t *canvas);
67 void ui_display_main_window(int index);
68 void ui_destroy_main_window(int index);
69 
70 void ui_display_paused(int flag);
71 void ui_dispatch_events(void);
72 void ui_exit(void);
73 void ui_show_text(const char *title, const char *text, int width, int height);
74 
75 void ui_display_paused(int flag);
76 void ui_pause_emulation(int flag);
77 int  ui_emulation_is_paused(void);
78 int  ui_is_fullscreen(void);
79 void ui_trigger_resize(void);
80 void ui_fullscreen_callback(GtkWidget *widget, gpointer user_data);
81 void ui_fullscreen_decorations_callback(GtkWidget *widget, gpointer user_data);
82 
83 GtkWindow *ui_get_active_window(void);
84 video_canvas_t *ui_get_active_canvas(void);
85 
86 gboolean ui_toggle_pause(void);
87 gboolean ui_advance_frame(void);
88 
89 void ui_update_lightpen(void);
90 
91 void ui_enable_crt_controls(int enabled);
92 void ui_enable_mixer_controls(int enabled);
93 
94 GtkWidget *ui_get_window_by_index(int index);
95 
96 #endif
97