mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-26 11:08:27 +02:00
Minimized gmenu2x.h.
Everything that does not need to be shared was moved to gmenu2x.cpp.
This commit is contained in:
parent
aea1c44020
commit
f28e4f6d89
@ -3,8 +3,8 @@
|
||||
#include "FastDelegate.h"
|
||||
#include "filelister.h"
|
||||
#include "gmenu2x.h"
|
||||
|
||||
#include <string>
|
||||
#include "iconbutton.h"
|
||||
#include "utilities.h"
|
||||
|
||||
using namespace fastdelegate;
|
||||
using std::string;
|
||||
|
@ -60,6 +60,8 @@
|
||||
#include "gmenu2x.h"
|
||||
#include "filelister.h"
|
||||
#include "cpu.h"
|
||||
#include "utilities.h"
|
||||
#include "powersaver.h"
|
||||
|
||||
#include "iconbutton.h"
|
||||
#include "messagebox.h"
|
||||
@ -86,9 +88,30 @@
|
||||
//#include <pnd_discovery.h>
|
||||
#endif
|
||||
|
||||
typedef fastdelegate::FastDelegate0<> MenuAction;
|
||||
struct MenuOption {
|
||||
std::string text;
|
||||
MenuAction action;
|
||||
};
|
||||
|
||||
using namespace std;
|
||||
using namespace fastdelegate;
|
||||
|
||||
#ifndef DEFAULT_WALLPAPER_PATH
|
||||
#define DEFAULT_WALLPAPER_PATH \
|
||||
GMENU2X_SYSTEM_DIR "/skins/Default/wallpapers/default.png"
|
||||
#endif
|
||||
|
||||
const int MAX_VOLUME_SCALE_FACTOR = 200;
|
||||
// Default values - going to add settings adjustment, saving, loading and such
|
||||
const int VOLUME_SCALER_MUTE = 0;
|
||||
const int VOLUME_SCALER_PHONES = 65;
|
||||
const int VOLUME_SCALER_NORMAL = 100;
|
||||
const int VOLUME_MODE_MUTE = 0;
|
||||
const int VOLUME_MODE_PHONES = 1;
|
||||
const int VOLUME_MODE_NORMAL = 2;
|
||||
const int BATTERY_READS = 10;
|
||||
|
||||
#ifdef _CARD_ROOT
|
||||
const char *CARD_ROOT = _CARD_ROOT;
|
||||
#elif defined(PLATFORM_DINGUX)
|
||||
@ -1964,6 +1987,11 @@ void GMenu2X::scanPath(string path, vector<string> *files) {
|
||||
closedir(dirp);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
unsigned short batt;
|
||||
unsigned short remocon;
|
||||
} MMSP2ADC;
|
||||
|
||||
unsigned short GMenu2X::getBatteryLevel() {
|
||||
#ifdef PLATFORM_GP2X
|
||||
/* if (batteryHandle<=0) return 0;
|
||||
|
@ -22,41 +22,27 @@
|
||||
#define GMENU2X_H
|
||||
|
||||
#include "surfacecollection.h"
|
||||
#include "iconbutton.h"
|
||||
#include "translator.h"
|
||||
#include "FastDelegate.h"
|
||||
#include "utilities.h"
|
||||
#include "touchscreen.h"
|
||||
#include "inputmanager.h"
|
||||
#include "asfont.h"
|
||||
#include "surface.h"
|
||||
#include "powersaver.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tr1/unordered_map>
|
||||
|
||||
class ASFont;
|
||||
class Button;
|
||||
class Menu;
|
||||
class Surface;
|
||||
|
||||
#ifndef GMENU2X_SYSTEM_DIR
|
||||
#define GMENU2X_SYSTEM_DIR "/usr/share/gmenu2x"
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_WALLPAPER_PATH
|
||||
#define DEFAULT_WALLPAPER_PATH \
|
||||
GMENU2X_SYSTEM_DIR "/skins/Default/wallpapers/default.png"
|
||||
#endif
|
||||
|
||||
const int MAX_VOLUME_SCALE_FACTOR = 200;
|
||||
// Default values - going to add settings adjustment, saving, loading and such
|
||||
const int VOLUME_SCALER_MUTE = 0;
|
||||
const int VOLUME_SCALER_PHONES = 65;
|
||||
const int VOLUME_SCALER_NORMAL = 100;
|
||||
const int VOLUME_MODE_MUTE = 0;
|
||||
const int VOLUME_MODE_PHONES = 1;
|
||||
const int VOLUME_MODE_NORMAL = 2;
|
||||
const int BATTERY_READS = 10;
|
||||
|
||||
const int LOOP_DELAY=30000;
|
||||
const int LOOP_DELAY = 30000;
|
||||
|
||||
extern const char *CARD_ROOT;
|
||||
extern const int CARD_ROOT_LEN;
|
||||
@ -73,22 +59,9 @@ enum color {
|
||||
NUM_COLORS,
|
||||
};
|
||||
|
||||
typedef fastdelegate::FastDelegate0<> MenuAction;
|
||||
typedef std::tr1::unordered_map<std::string, std::string, std::tr1::hash<std::string> > ConfStrHash;
|
||||
typedef std::tr1::unordered_map<std::string, int, std::tr1::hash<std::string> > ConfIntHash;
|
||||
|
||||
typedef struct {
|
||||
unsigned short batt;
|
||||
unsigned short remocon;
|
||||
} MMSP2ADC;
|
||||
|
||||
struct MenuOption {
|
||||
std::string text;
|
||||
MenuAction action;
|
||||
};
|
||||
|
||||
class Menu;
|
||||
|
||||
class GMenu2X {
|
||||
private:
|
||||
std::string path; //!< Contains the working directory of GMenu2X
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "filelister.h"
|
||||
#include "gmenu2x.h"
|
||||
#include "utilities.h"
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL_gfxPrimitives.h>
|
||||
|
@ -22,6 +22,8 @@
|
||||
|
||||
#include "buttonbox.h"
|
||||
#include "gmenu2x.h"
|
||||
#include "iconbutton.h"
|
||||
#include "utilities.h"
|
||||
|
||||
#include <SDL_gfxPrimitives.h>
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "gmenu2x.h"
|
||||
#include "menu.h"
|
||||
#include "selector.h"
|
||||
#include "utilities.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "menu.h"
|
||||
#include "selector.h"
|
||||
#include "textmanualdialog.h"
|
||||
#include "utilities.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2006 by Massimiliano Torromeo *
|
||||
* massimiliano.torromeo@gmail.com *
|
||||
* Copyright (C) 2006 by Massimiliano Torromeo *
|
||||
* massimiliano.torromeo@gmail.com *
|
||||
* *
|
||||
* 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 *
|
||||
@ -17,8 +17,11 @@
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "menusettingbool.h"
|
||||
|
||||
#include "gmenu2x.h"
|
||||
#include "iconbutton.h"
|
||||
#include "utilities.h"
|
||||
|
||||
#include <sstream>
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2006 by Massimiliano Torromeo *
|
||||
* massimiliano.torromeo@gmail.com *
|
||||
* Copyright (C) 2006 by Massimiliano Torromeo *
|
||||
* massimiliano.torromeo@gmail.com *
|
||||
* *
|
||||
* 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 *
|
||||
@ -17,8 +17,11 @@
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "menusettingint.h"
|
||||
|
||||
#include "gmenu2x.h"
|
||||
#include "iconbutton.h"
|
||||
#include "utilities.h"
|
||||
|
||||
#include <sstream>
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2006 by Massimiliano Torromeo *
|
||||
* massimiliano.torromeo@gmail.com *
|
||||
* Copyright (C) 2006 by Massimiliano Torromeo *
|
||||
* massimiliano.torromeo@gmail.com *
|
||||
* *
|
||||
* 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 *
|
||||
@ -17,8 +17,12 @@
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "menusettingrgba.h"
|
||||
|
||||
#include "gmenu2x.h"
|
||||
#include "iconbutton.h"
|
||||
#include "utilities.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2006 by Massimiliano Torromeo *
|
||||
* massimiliano.torromeo@gmail.com *
|
||||
* Copyright (C) 2006 by Massimiliano Torromeo *
|
||||
* massimiliano.torromeo@gmail.com *
|
||||
* *
|
||||
* 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 *
|
||||
@ -17,6 +17,7 @@
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef MENUSETTINGRGBA_H
|
||||
#define MENUSETTINGRGBA_H
|
||||
|
||||
|
@ -18,6 +18,15 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "selector.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "filelister.h"
|
||||
#include "gmenu2x.h"
|
||||
#include "linkapp.h"
|
||||
#include "menu.h"
|
||||
#include "utilities.h"
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL_gfxPrimitives.h>
|
||||
#include <algorithm>
|
||||
@ -28,13 +37,6 @@
|
||||
#include <dirent.h>
|
||||
#include <fstream>
|
||||
|
||||
#include "menu.h"
|
||||
#include "linkapp.h"
|
||||
#include "selector.h"
|
||||
#include "filelister.h"
|
||||
#include "gmenu2x.h"
|
||||
#include "debug.h"
|
||||
|
||||
using namespace std;
|
||||
using std::tr1::unordered_map;
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "dialog.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tr1/unordered_map>
|
||||
|
||||
class LinkApp;
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "textdialog.h"
|
||||
|
||||
#include "gmenu2x.h"
|
||||
#include "utilities.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "textmanualdialog.h"
|
||||
|
||||
#include "gmenu2x.h"
|
||||
#include "utilities.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <sstream>
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "debug.h"
|
||||
#include "gmenu2x.h"
|
||||
#include "utilities.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include "buttonbox.h"
|
||||
#include "filelister.h"
|
||||
#include "gmenu2x.h"
|
||||
#include "iconbutton.h"
|
||||
#include "utilities.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user