filename | src/gui.h |
changeset | 1015:ad448bedc48a |
prev | 839:51f1c4195790 |
next | 1019:87f191f92f8f |
author | nkeynes |
date | Tue Jun 02 23:16:26 2009 +0000 (14 years ago) |
permissions | -rw-r--r-- |
last change | "MythTV" patch from Wahrhaft, thanks!: * Add support for LIRC input devices * Add hotkey input support * Add command-line option for immediate fullscreen |
view | annotate | diff | log | raw |
1 /**
2 * $Id$
3 *
4 * Public GUI declarations (used from elsewhere in the system)
5 *
6 * Copyright (c) 2005 Nathan Keynes.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 */
19 #ifndef lxdream_gui_H
20 #define lxdream_gui_H
22 #include <glib/gtypes.h>
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 /* Base GUI clock is 10ms */
29 #define GUI_TICK_PERIOD 10000000
31 /**
32 * GUI-provided method to scan the command line for standard arguments,
33 * invoked prior to regular command line processing. The command line
34 * is modified to remove any arguments handled by the UI.
35 * @return TRUE on success, FALSE on failure.
36 */
37 gboolean gui_parse_cmdline( int *argc, char **argv[] );
39 /**
40 * Initialize the GUI system and create any windows needed. This method
41 * should also register the GUI module with the module manager (if the
42 * GUI has one).
43 *
44 * @param debug TRUE if the system should start in debugging mode.
45 * @param fullscreen TRUE if the system should start in fullscreen mode.
46 */
47 gboolean gui_init( gboolean debug, gboolean fullscreen );
49 /**
50 * Enter the GUI main loop. If this method ever returns, the system will
51 * exit normally.
52 *
53 * @param run TRUE if the system should start running immediately, otherwise
54 */
55 void gui_main_loop( gboolean run );
57 gboolean gui_error_dialog( const char *fmt, ... );
59 typedef enum { IO_IDE, IO_NETWORK } io_activity_type;
61 /**
62 * Notify the GUI of state changes (eg binary was loaded and PC changed)
63 */
64 void gui_update_state();
66 /**
67 * Notify the GUI to enable/disable mouse grabs according to the flag value.
68 * If the parameter is FALSE and the grab is currently active, the GUI should
69 * immediately cancel the grab.
70 */
71 void gui_set_use_grab( gboolean grab );
73 /**
74 * Notify the GUI of I/O activity.
75 * @param activity the type of IO activity being reported.
76 * @param active TRUE if the I/O device is becoming active, FALSE if inactive.
77 */
78 void gui_update_io_activity( io_activity_type activity, gboolean active );
80 /**
81 * Queue an event to call dreamcast_run() at the next opportunity (used to
82 * avoid invoking dreamcast_run() directly from the middle of things.
83 */
84 void gui_run_later(void);
86 #ifdef __cplusplus
87 }
88 #endif
90 #endif /* lxdream_gui_H */
.