]> git.lyx.org Git - lyx.git/blob - src/frontends/lyx_gui.h
remove io callback on shutdown
[lyx.git] / src / frontends / lyx_gui.h
1 // -*- C++ -*-
2 /**
3  * \file lyx_gui.h
4  * Copyright 2002 the LyX Team
5  * Read the file COPYING
6  *
7  * \author John Levon <moz@compsoc.man.ac.uk>
8  */
9
10 #ifndef LYX_GUI_H
11 #define LYX_GUI_H
12  
13 #include "LColor.h"
14 #include "LString.h" 
15 #include <vector>
16
17 class Dialogs;
18 class LyXFont;
19 class LyXComm;
20
21 /// GUI interaction
22 namespace lyx_gui {
23
24         /// parse command line and do basic initialisation
25         void parse_init(int & argc, char * argv[]);
26
27         /**
28          * set up GUI parameters. At this point lyxrc may
29          * be used.
30          */
31         void parse_lyxrc();
32
33         /**
34          * Start the main event loop, after executing the given
35          * batch commands, and loading the given documents
36          */
37         void start(string const & batch, std::vector<std::string> files);
38
39         /**
40          * quit running LyX
41          */
42         void exit();
43  
44         /** Eg, passing LColor::black returns "000000",
45          *      passing LColor::white returns "ffffff".
46          */
47         string const hexname(LColor::color col);
48
49         /**
50          * update an altered GUI color
51          */
52         void update_color(LColor::color col);
53
54         /**
55          * update the font cache
56          */
57         void update_fonts();
58
59         /**
60          * is the given font available ?
61          */
62         bool font_available(LyXFont const & font);
63
64         /**
65          * add a callback for I/O read notification
66          */
67         void set_read_callback(int fd, LyXComm * comm);
68
69         /**
70          * remove a I/O read callback
71          */
72         void remove_read_callback(int fd);
73 }
74
75 #endif // LYX_GUI_H