From 04fbedfcddb5b41d1556bbd534ac8a04345a215b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 19 Apr 2015 20:19:49 +0200 Subject: [PATCH] Remove more header files - include more of it inside RetroArch_Apple.h --- apple/common/RetroArch_Apple.h | 97 ++++++++++++++++++++++++++- apple/iOS/menu.h | 117 --------------------------------- 2 files changed, 95 insertions(+), 119 deletions(-) delete mode 100644 apple/iOS/menu.h diff --git a/apple/common/RetroArch_Apple.h b/apple/common/RetroArch_Apple.h index 1b2d44cd37..66c814b635 100644 --- a/apple/common/RetroArch_Apple.h +++ b/apple/common/RetroArch_Apple.h @@ -69,6 +69,7 @@ void CFSearchPathForDirectoriesInDomains(unsigned flags, void CFTemporaryDirectory(char *buf, size_t sizeof_buf); #include "../../core_info.h" +#include "../../playlist.h" #include "../../settings.h" #include "../../menu/menu.h" @@ -82,7 +83,100 @@ void CFTemporaryDirectory(char *buf, size_t sizeof_buf); #include #import -#include "../iOS/menu.h" + +@protocol RAMenuItemBase +- (UITableViewCell*)cellForTableView:(UITableView*)tableView; +- (void)wasSelectedOnTableView:(UITableView*)tableView ofController:(UIViewController*)controller; +@end + +/*********************************************/ +/* RAMenuBase */ +/* A menu class that displays RAMenuItemBase */ +/* objects. */ +/*********************************************/ +@interface RAMenuBase : UITableViewController +@property (nonatomic) NSMutableArray* sections; +@property (nonatomic) BOOL hidesHeaders; + +- (id)initWithStyle:(UITableViewStyle)style; +- (id)itemForIndexPath:(NSIndexPath*)indexPath; + +@end + +/*********************************************/ +/* RAMenuItemBasic */ +/* A simple menu item that displays a text */ +/* description and calls a block object when */ +/* selected. */ +/*********************************************/ +@interface RAMenuItemBasic : NSObject +@property (nonatomic) NSString* description; +@property (nonatomic) id userdata; +@property (copy) void (^action)(id userdata); +@property (copy) NSString* (^detail)(id userdata); + ++ (RAMenuItemBasic*)itemWithDescription:(NSString*)description action:(void (^)())action; ++ (RAMenuItemBasic*)itemWithDescription:(NSString*)description action:(void (^)())action detail:(NSString* (^)())detail; ++ (RAMenuItemBasic*)itemWithDescription:(NSString*)description association:(id)userdata action:(void (^)())action detail:(NSString* (^)())detail; + +@end + +/*********************************************/ +/* RAMenuItemGeneralSetting */ +/* A simple menu item that displays the */ +/* state, and allows editing, of a string or */ +/* numeric setting. */ +/*********************************************/ +@interface RAMenuItemGeneralSetting : NSObject +@property (nonatomic) rarch_setting_t* setting; +@property (copy) void (^action)(); +@property (nonatomic, weak) UITableView* parentTable; ++ (id)itemForSetting:(rarch_setting_t*)setting action:(void (^)())action; +- (id)initWithSetting:(rarch_setting_t*)setting action:(void (^)())action; +@end + +/*********************************************/ +/* RAMenuItemBooleanSetting */ +/* A simple menu item that displays the */ +/* state, and allows editing, of a boolean */ +/* setting. */ +/*********************************************/ +@interface RAMenuItemBooleanSetting : NSObject +@property (nonatomic) rarch_setting_t* setting; +@property (copy) void (^action)(); +- (id)initWithSetting:(rarch_setting_t*)setting action:(void (^)())action; +@end + +/*********************************************/ +/* RAMenuItemPathSetting */ +/* A menu item that displays and allows */ +/* browsing for a path setting. */ +/*********************************************/ +@interface RAMenuItemPathSetting : RAMenuItemGeneralSetting @end + +/*********************************************/ +/* RAMenuItemEnumSetting */ +/* A menu item that displays and allows */ +/* a setting to be set from a list of */ +/* allowed choices. */ +/*********************************************/ +@interface RAMenuItemEnumSetting : RAMenuItemGeneralSetting @end + +/*********************************************/ +/* RAMenuItemBindSetting */ +/* A menu item that displays and allows */ +/* mapping of a keybinding. */ +/*********************************************/ +@interface RAMenuItemBindSetting : RAMenuItemGeneralSetting @end + +/*********************************************/ +/* RAMainMenu */ +/* Menu object that is displayed immediately */ +/* after startup. */ +/*********************************************/ +@interface RAMainMenu : RAMenuBase +@property (nonatomic) NSString* core; +@end @interface RADirectoryItem : NSObject @property (nonatomic) NSString* path; @@ -103,7 +197,6 @@ void CFTemporaryDirectory(char *buf, size_t sizeof_buf); - (void)browseTo:(NSString*)path; @end -// browser.m @interface RAFoldersList : RAMenuBase - (id) initWithFilePath:(NSString*)path; @end diff --git a/apple/iOS/menu.h b/apple/iOS/menu.h deleted file mode 100644 index 83b3a0606c..0000000000 --- a/apple/iOS/menu.h +++ /dev/null @@ -1,117 +0,0 @@ -/* RetroArch - A frontend for libretro. - * Copyright (C) 2013-2014 - Jason Fetters - * Copyright (C) 2014-2015 - Jay McCarthy - * - * RetroArch 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 Found- - * ation, either version 3 of the License, or (at your option) any later version. - * - * RetroArch 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. - * - * You should have received a copy of the GNU General Public License along with RetroArch. - * If not, see . - */ - -#ifndef __APPLE_RARCH_IOS_MENU_H__ -#define __APPLE_RARCH_IOS_MENU_H__ - -#include "../../playlist.h" -#include "../../settings.h" - -@protocol RAMenuItemBase -- (UITableViewCell*)cellForTableView:(UITableView*)tableView; -- (void)wasSelectedOnTableView:(UITableView*)tableView ofController:(UIViewController*)controller; -@end - -/*********************************************/ -/* RAMenuBase */ -/* A menu class that displays RAMenuItemBase */ -/* objects. */ -/*********************************************/ -@interface RAMenuBase : UITableViewController -@property (nonatomic) NSMutableArray* sections; -@property (nonatomic) BOOL hidesHeaders; - -- (id)initWithStyle:(UITableViewStyle)style; -- (id)itemForIndexPath:(NSIndexPath*)indexPath; - -@end - -/*********************************************/ -/* RAMenuItemBasic */ -/* A simple menu item that displays a text */ -/* description and calls a block object when */ -/* selected. */ -/*********************************************/ -@interface RAMenuItemBasic : NSObject -@property (nonatomic) NSString* description; -@property (nonatomic) id userdata; -@property (copy) void (^action)(id userdata); -@property (copy) NSString* (^detail)(id userdata); - -+ (RAMenuItemBasic*)itemWithDescription:(NSString*)description action:(void (^)())action; -+ (RAMenuItemBasic*)itemWithDescription:(NSString*)description action:(void (^)())action detail:(NSString* (^)())detail; -+ (RAMenuItemBasic*)itemWithDescription:(NSString*)description association:(id)userdata action:(void (^)())action detail:(NSString* (^)())detail; - -@end - -/*********************************************/ -/* RAMenuItemGeneralSetting */ -/* A simple menu item that displays the */ -/* state, and allows editing, of a string or */ -/* numeric setting. */ -/*********************************************/ -@interface RAMenuItemGeneralSetting : NSObject -@property (nonatomic) rarch_setting_t* setting; -@property (copy) void (^action)(); -@property (nonatomic, weak) UITableView* parentTable; -+ (id)itemForSetting:(rarch_setting_t*)setting action:(void (^)())action; -- (id)initWithSetting:(rarch_setting_t*)setting action:(void (^)())action; -@end - -/*********************************************/ -/* RAMenuItemBooleanSetting */ -/* A simple menu item that displays the */ -/* state, and allows editing, of a boolean */ -/* setting. */ -/*********************************************/ -@interface RAMenuItemBooleanSetting : NSObject -@property (nonatomic) rarch_setting_t* setting; -@property (copy) void (^action)(); -- (id)initWithSetting:(rarch_setting_t*)setting action:(void (^)())action; -@end - -/*********************************************/ -/* RAMenuItemPathSetting */ -/* A menu item that displays and allows */ -/* browsing for a path setting. */ -/*********************************************/ -@interface RAMenuItemPathSetting : RAMenuItemGeneralSetting @end - -/*********************************************/ -/* RAMenuItemEnumSetting */ -/* A menu item that displays and allows */ -/* a setting to be set from a list of */ -/* allowed choices. */ -/*********************************************/ -@interface RAMenuItemEnumSetting : RAMenuItemGeneralSetting @end - -/*********************************************/ -/* RAMenuItemBindSetting */ -/* A menu item that displays and allows */ -/* mapping of a keybinding. */ -/*********************************************/ -@interface RAMenuItemBindSetting : RAMenuItemGeneralSetting @end - -/*********************************************/ -/* RAMainMenu */ -/* Menu object that is displayed immediately */ -/* after startup. */ -/*********************************************/ -@interface RAMainMenu : RAMenuBase -@property (nonatomic) NSString* core; -@end - -#endif