trunk 20080912
[gitenigma.git] / boot / bootmenue / bootmenue.h
blob41c5c3e90355ab115da34531196002937bd2f633
1 /*
2 * $Id: bootmenue.h,v 1.14 2005/11/26 14:40:19 digi_casi Exp $
4 * (C) 2005 by digi_casi <digi_casi@tuxbox.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #include <errno.h>
23 #include <fcntl.h>
24 #include <stdio.h>
25 #include <stdlib.h>
26 #include <unistd.h>
27 #include <string>
28 #include <vector>
29 #include <dirent.h>
31 #include "my_fb.h"
32 #include "my_lcd.h"
33 #include "my_rc.h"
34 #include "my_timer.h"
35 #include <bootmenue/bmconfig.h>
36 #include <bootmenue/bmimage.h>
37 #include <bootmenue/bmboot.h>
39 #define BMVERSION "0.5"
41 class stmenu: public Object
43 static stmenu *instance;
44 fbClass *display;
45 CLCDDisplay *lcd;
46 bmconfig *config;
47 bmimages *img;
48 bmboot *bmgr;
50 int ver_x, ver_y, ver_font, ver_r, ver_g, ver_b;
51 int menu_x, menu_y, menu_xs, menu_ys;
52 int str_r, str_g, str_b;
53 int sel_r, sel_g, sel_b;
54 int skinIndex, skinMax;
56 int selentry, maxentry;
58 void rc_event(unsigned short key);
59 void mainloop();
60 void loadSkin(eString skin);
61 int loadImageList();
62 void timeout();
64 void startscript(eString image);
65 void goscript(eString image);
67 void drawversion();
68 void drawmenu();
69 void showpic(eString pic);
71 public:
72 static stmenu *getInstance() {return (instance) ? instance : instance = new stmenu();}
73 stmenu();
74 ~stmenu();
75 private:
76 static void timeout(int);