VitaShell/settings.h

85 lines
1.8 KiB
C
Raw Normal View History

2016-10-31 18:35:25 +00:00
/*
2017-10-13 10:42:36 +00:00
VitaShell
2017-12-30 10:43:37 +00:00
Copyright (C) 2015-2018, TheFloW
2016-10-31 18:35:25 +00:00
2017-10-13 10:42:36 +00:00
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
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
2016-10-31 18:35:25 +00:00
2017-10-13 10:42:36 +00:00
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
2016-10-31 18:35:25 +00:00
2017-10-13 10:42:36 +00:00
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
2016-10-31 18:35:25 +00:00
*/
#ifndef __SETTINGS_H__
#define __SETTINGS_H__
2017-03-13 20:45:04 +00:00
#define MAX_THEMES 64
#define MAX_THEME_LENGTH 64
2016-11-01 15:34:15 +00:00
enum SettingsAgreement {
2017-10-13 10:42:36 +00:00
SETTINGS_AGREEMENT_NONE,
SETTINGS_AGREEMENT_AGREE,
SETTINGS_AGREEMENT_DISAGREE,
2016-11-01 15:34:15 +00:00
};
2016-10-31 18:35:25 +00:00
enum SettingsOptionType {
2017-10-13 10:42:36 +00:00
SETTINGS_OPTION_TYPE_BOOLEAN,
SETTINGS_OPTION_TYPE_INTEGER,
SETTINGS_OPTION_TYPE_STRING,
SETTINGS_OPTION_TYPE_CALLBACK,
SETTINGS_OPTION_TYPE_OPTIONS,
2016-10-31 18:35:25 +00:00
};
enum SettingsMenuStatus {
2017-10-13 10:42:36 +00:00
SETTINGS_MENU_CLOSED,
SETTINGS_MENU_CLOSING,
SETTINGS_MENU_OPENED,
SETTINGS_MENU_OPENING,
2016-10-31 18:35:25 +00:00
};
2016-10-31 19:31:44 +00:00
typedef struct {
2017-10-13 10:42:36 +00:00
int status;
float cur_pos;
int entry_sel;
int option_sel;
int n_options;
2016-10-31 19:31:44 +00:00
} SettingsMenu;
typedef struct {
2017-10-13 10:42:36 +00:00
int name;
int type;
int (* callback)();
char *string;
int size_string;
char **options;
int n_options;
int *value;
2016-10-31 19:31:44 +00:00
} SettingsMenuOption;
typedef struct {
2017-10-13 10:42:36 +00:00
int name;
SettingsMenuOption *options;
int n_options;
2016-10-31 19:31:44 +00:00
} SettingsMenuEntry;
2016-11-02 18:54:40 +00:00
void loadSettingsConfig();
void saveSettingsConfig();
2016-10-31 18:35:25 +00:00
void initSettingsMenu();
void openSettingsMenu();
2016-11-01 17:25:42 +00:00
void closeSettingsMenu();
2016-10-31 18:35:25 +00:00
int getSettingsMenuStatus();
void drawSettingsMenu();
void settingsMenuCtrl();
2016-11-01 15:34:15 +00:00
void settingsAgree();
void settingsDisagree();
#endif