mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:00:48 +00:00
Clean up includes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30009 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
808f778c16
commit
fa7360af1e
13 changed files with 160 additions and 102 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
||||||
|
2010-03-20 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* gui/Headers/AppKit/NSNib.h,
|
||||||
|
* gui/Headers/AppKit/NSNibConnector.h,
|
||||||
|
* gui/Headers/AppKit/NSNibLoading.h,
|
||||||
|
* gui/Headers/Additions/GNUstepGUI/GSModelLoaderFactory.h,
|
||||||
|
* gui/Headers/Additions/GNUstepGUI/GSInstantiator.h,
|
||||||
|
* gui/Headers/Additions/GNUstepGUI/GSNibLoading.h,
|
||||||
|
* gui/Source/GSXibLoader.m,
|
||||||
|
* gui/Source/GSNibLoader.m,
|
||||||
|
* gui/Source/GSNibLoading.m,
|
||||||
|
* gui/Source/GSModelLoaderFactory.m,
|
||||||
|
* gui/Source/NSBundleAdditions.m: Clean up includes.
|
||||||
|
* gui/Source/NSNib.m: Add loading of NIB files via URL.
|
||||||
|
|
||||||
2010-03-19 Fred Kiefer <FredKiefer@gmx.de>
|
2010-03-19 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSButtonCell.m,
|
* Source/NSButtonCell.m,
|
||||||
|
|
|
@ -28,9 +28,8 @@
|
||||||
#ifndef _GNUstep_H_GSInstantiator
|
#ifndef _GNUstep_H_GSInstantiator
|
||||||
#define _GNUstep_H_GSInstantiator
|
#define _GNUstep_H_GSInstantiator
|
||||||
|
|
||||||
#include <Foundation/NSObject.h>
|
#import <Foundation/NSObject.h>
|
||||||
#include <AppKit/NSNibLoading.h>
|
#import <AppKit/NSNibConnector.h>
|
||||||
#include <AppKit/NSNibConnector.h>
|
|
||||||
|
|
||||||
// instantiator
|
// instantiator
|
||||||
@protocol GSInstantiator
|
@protocol GSInstantiator
|
||||||
|
|
|
@ -29,7 +29,13 @@
|
||||||
#ifndef _GNUstep_H_GSModelLoaderFactory
|
#ifndef _GNUstep_H_GSModelLoaderFactory
|
||||||
#define _GNUstep_H_GSModelLoaderFactory
|
#define _GNUstep_H_GSModelLoaderFactory
|
||||||
|
|
||||||
#include <Foundation/Foundation.h>
|
#import <Foundation/NSObject.h>
|
||||||
|
#import <Foundation/NSZone.h>
|
||||||
|
|
||||||
|
@class NSData;
|
||||||
|
@class NSDictionary;
|
||||||
|
@class NSString;
|
||||||
|
@class NSBundle;
|
||||||
|
|
||||||
@interface GSModelLoader : NSObject
|
@interface GSModelLoader : NSObject
|
||||||
+ (NSString *) type;
|
+ (NSString *) type;
|
||||||
|
|
|
@ -28,23 +28,29 @@
|
||||||
#ifndef _GNUstep_H_GSNibCompatibility
|
#ifndef _GNUstep_H_GSNibCompatibility
|
||||||
#define _GNUstep_H_GSNibCompatibility
|
#define _GNUstep_H_GSNibCompatibility
|
||||||
|
|
||||||
#include <Foundation/NSObject.h>
|
#import <Foundation/NSObject.h>
|
||||||
|
|
||||||
#include <AppKit/NSWindow.h>
|
#import <AppKit/NSButton.h>
|
||||||
#include <AppKit/NSMenu.h>
|
#import <AppKit/NSControl.h>
|
||||||
#include <AppKit/NSView.h>
|
#import <AppKit/NSEvent.h>
|
||||||
#include <AppKit/NSText.h>
|
#import <AppKit/NSGraphicsContext.h>
|
||||||
#include <AppKit/NSTextView.h>
|
#import <AppKit/NSGraphics.h>
|
||||||
#include <AppKit/NSControl.h>
|
#import <AppKit/NSMenu.h>
|
||||||
#include <AppKit/NSButton.h>
|
#import <AppKit/NSNibConnector.h>
|
||||||
#include <AppKit/NSGraphicsContext.h>
|
#import <AppKit/NSResponder.h>
|
||||||
#include <AppKit/NSGraphics.h>
|
#import <AppKit/NSText.h>
|
||||||
#include <AppKit/NSResponder.h>
|
#import <AppKit/NSTextView.h>
|
||||||
#include <AppKit/NSEvent.h>
|
#import <AppKit/NSView.h>
|
||||||
#include <AppKit/NSNibConnector.h>
|
#import <AppKit/NSWindow.h>
|
||||||
|
|
||||||
#include "GNUstepGUI/GSNibContainer.h"
|
#import "GNUstepGUI/GSNibContainer.h"
|
||||||
#include "GNUstepGUI/GSInstantiator.h"
|
#import "GNUstepGUI/GSInstantiator.h"
|
||||||
|
|
||||||
|
@class NSDictionary;
|
||||||
|
@class NSMapTable;
|
||||||
|
@class NSMutableArray;
|
||||||
|
@class NSMutableSet;
|
||||||
|
@class NSString;
|
||||||
|
|
||||||
// templates
|
// templates
|
||||||
@protocol OSXNibTemplate
|
@protocol OSXNibTemplate
|
||||||
|
|
|
@ -43,8 +43,8 @@
|
||||||
#define _GNUstep_H_NSNib
|
#define _GNUstep_H_NSNib
|
||||||
#import <GNUstepBase/GSVersionMacros.h>
|
#import <GNUstepBase/GSVersionMacros.h>
|
||||||
|
|
||||||
#include <Foundation/NSObject.h>
|
#import <Foundation/NSObject.h>
|
||||||
#include <Foundation/NSZone.h>
|
#import <Foundation/NSZone.h>
|
||||||
|
|
||||||
@class NSData;
|
@class NSData;
|
||||||
@class NSDictionary;
|
@class NSDictionary;
|
||||||
|
@ -59,6 +59,7 @@
|
||||||
NSData *_nibData;
|
NSData *_nibData;
|
||||||
id _loader;
|
id _loader;
|
||||||
NSURL *_url;
|
NSURL *_url;
|
||||||
|
NSBundle *_bundle;
|
||||||
}
|
}
|
||||||
|
|
||||||
// reading the data...
|
// reading the data...
|
||||||
|
|
|
@ -29,11 +29,9 @@
|
||||||
#define _GNUstep_H_NSNibConnector
|
#define _GNUstep_H_NSNibConnector
|
||||||
#import <GNUstepBase/GSVersionMacros.h>
|
#import <GNUstepBase/GSVersionMacros.h>
|
||||||
|
|
||||||
#ifndef GNUSTEP
|
#import <Foundation/NSObject.h>
|
||||||
#include <Foundation/Foundation.h>
|
|
||||||
#else
|
@class NSString;
|
||||||
#include <Foundation/NSObject.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@interface NSNibConnector : NSObject <NSCoding>
|
@interface NSNibConnector : NSObject <NSCoding>
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,14 +31,13 @@
|
||||||
#define _GNUstep_H_NSNibLoading
|
#define _GNUstep_H_NSNibLoading
|
||||||
#import <GNUstepBase/GSVersionMacros.h>
|
#import <GNUstepBase/GSVersionMacros.h>
|
||||||
|
|
||||||
#include <Foundation/NSObject.h>
|
#import <Foundation/NSObject.h>
|
||||||
#include <Foundation/NSBundle.h>
|
#import <Foundation/NSBundle.h>
|
||||||
#include <Foundation/NSArray.h>
|
#import <Foundation/NSZone.h>
|
||||||
#include <Foundation/NSGeometry.h>
|
|
||||||
|
|
||||||
@class NSString;
|
@class NSString;
|
||||||
@class NSDictionary;
|
@class NSDictionary;
|
||||||
@class NSMutableDictionary;
|
@class NSMutableDictionary;
|
||||||
|
|
||||||
@interface NSObject (NSNibAwaking)
|
@interface NSObject (NSNibAwaking)
|
||||||
|
|
||||||
|
|
|
@ -26,10 +26,15 @@
|
||||||
Boston, MA 02110-1301, USA.
|
Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <Foundation/Foundation.h>
|
#import "config.h"
|
||||||
#include <AppKit/AppKit.h>
|
#import <Foundation/NSArray.h>
|
||||||
#include "GNUstepGUI/GSModelLoaderFactory.h"
|
#import <Foundation/NSDictionary.h>
|
||||||
#include "GNUstepBase/GSObjCRuntime.h"
|
#import <Foundation/NSEnumerator.h>
|
||||||
|
#import <Foundation/NSException.h>
|
||||||
|
#import <Foundation/NSFileManager.h>
|
||||||
|
#import <Foundation/NSString.h>
|
||||||
|
|
||||||
|
#import "GNUstepGUI/GSModelLoaderFactory.h"
|
||||||
|
|
||||||
@implementation GSModelLoader
|
@implementation GSModelLoader
|
||||||
+ (NSString *) type
|
+ (NSString *) type
|
||||||
|
|
|
@ -26,11 +26,18 @@
|
||||||
Boston, MA 02110-1301, USA.
|
Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <Foundation/Foundation.h>
|
#import "config.h"
|
||||||
#include <AppKit/AppKit.h>
|
#import <Foundation/NSArchiver.h>
|
||||||
|
#import <Foundation/NSData.h>
|
||||||
|
#import <Foundation/NSDebug.h>
|
||||||
|
#import <Foundation/NSDictionary.h>
|
||||||
|
#import <Foundation/NSException.h>
|
||||||
|
#import <Foundation/NSFileManager.h>
|
||||||
|
#import <Foundation/NSKeyedArchiver.h>
|
||||||
|
#import <Foundation/NSString.h>
|
||||||
|
|
||||||
#include "GNUstepGUI/GSModelLoaderFactory.h"
|
#import "GNUstepGUI/GSModelLoaderFactory.h"
|
||||||
#include "GNUstepGUI/GSNibLoading.h"
|
#import "GNUstepGUI/GSNibLoading.h"
|
||||||
|
|
||||||
@interface GSNibLoader : GSModelLoader
|
@interface GSNibLoader : GSModelLoader
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -29,40 +29,39 @@
|
||||||
Boston, MA 02110-1301, USA.
|
Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <Foundation/NSClassDescription.h>
|
#import <Foundation/NSArchiver.h>
|
||||||
#include <Foundation/NSArchiver.h>
|
#import <Foundation/NSArray.h>
|
||||||
#include <Foundation/NSArray.h>
|
#import <Foundation/NSBundle.h>
|
||||||
#include <Foundation/NSBundle.h>
|
#import <Foundation/NSByteOrder.h>
|
||||||
#include <Foundation/NSByteOrder.h>
|
#import <Foundation/NSCoder.h>
|
||||||
#include <Foundation/NSCoder.h>
|
#import <Foundation/NSData.h>
|
||||||
#include <Foundation/NSData.h>
|
#import <Foundation/NSDecimalNumber.h>
|
||||||
#include <Foundation/NSDecimalNumber.h>
|
#import <Foundation/NSDictionary.h>
|
||||||
#include <Foundation/NSDictionary.h>
|
#import <Foundation/NSDebug.h>
|
||||||
#include <Foundation/NSDebug.h>
|
#import <Foundation/NSEnumerator.h>
|
||||||
#include <Foundation/NSEnumerator.h>
|
#import <Foundation/NSException.h>
|
||||||
#include <Foundation/NSException.h>
|
#import <Foundation/NSKeyedArchiver.h>
|
||||||
#include <Foundation/NSInvocation.h>
|
#import <Foundation/NSObjCRuntime.h>
|
||||||
#include <Foundation/NSObjCRuntime.h>
|
#import <Foundation/NSString.h>
|
||||||
#include <Foundation/NSPathUtilities.h>
|
|
||||||
#include <Foundation/NSFileManager.h>
|
|
||||||
#include <Foundation/NSString.h>
|
|
||||||
#include <Foundation/NSUserDefaults.h>
|
|
||||||
#include <Foundation/NSKeyValueCoding.h>
|
|
||||||
#include <Foundation/NSKeyedArchiver.h>
|
|
||||||
#include "AppKit/AppKit.h"
|
|
||||||
#include <GNUstepBase/GSObjCRuntime.h>
|
|
||||||
#include "GSGuiPrivate.h"
|
|
||||||
|
|
||||||
|
// FIXME: Used for NSKeyedArchiver access. All this should be moved into base.
|
||||||
/*
|
/*
|
||||||
* Setup for inline operation of arrays.
|
* Setup for inline operation of arrays.
|
||||||
*/
|
*/
|
||||||
#define GSI_ARRAY_RETAIN(A, X) RETAIN((X).obj)
|
#define GSI_ARRAY_RETAIN(A, X) RETAIN((X).obj)
|
||||||
#define GSI_ARRAY_RELEASE(A, X) RELEASE((X).obj)
|
#define GSI_ARRAY_RELEASE(A, X) RELEASE((X).obj)
|
||||||
#define GSI_ARRAY_TYPES GSUNION_OBJ
|
#define GSI_ARRAY_TYPES GSUNION_OBJ
|
||||||
#include <GNUstepBase/GSIArray.h>
|
#import <GNUstepBase/GSIArray.h>
|
||||||
|
|
||||||
#include <GNUstepGUI/GSNibLoading.h>
|
#import "GNUstepGUI/GSNibLoading.h"
|
||||||
#include <GNUstepGUI/GSInstantiator.h>
|
#import "AppKit/NSApplication.h"
|
||||||
|
#import "AppKit/NSImage.h"
|
||||||
|
#import "AppKit/NSMenuItem.h"
|
||||||
|
#import "AppKit/NSMenuView.h"
|
||||||
|
#import "AppKit/NSScreen.h"
|
||||||
|
#import "AppKit/NSSound.h"
|
||||||
|
#import "GNUstepGUI/GSInstantiator.h"
|
||||||
|
#import "GSGuiPrivate.h"
|
||||||
|
|
||||||
static BOOL _isInInterfaceBuilder = NO;
|
static BOOL _isInInterfaceBuilder = NO;
|
||||||
|
|
||||||
|
@ -98,7 +97,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
||||||
@interface NSMenu (NibCompatibility)
|
@interface NSMenu (NibCompatibility)
|
||||||
- (void) _setMain: (BOOL)isMain;
|
- (void) _setMain: (BOOL)isMain;
|
||||||
@end
|
@end
|
||||||
@interface NSMenu (GNUstepPrivate)
|
@interface NSMenu (GNUstepPrivate)
|
||||||
- (void) _setGeometry;
|
- (void) _setGeometry;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#import <GNUstepBase/GSMime.h>
|
#import <GNUstepBase/GSMime.h>
|
||||||
|
|
||||||
#import "AppKit/NSApplication.h"
|
#import "AppKit/NSApplication.h"
|
||||||
|
#import "AppKit/NSNibLoading.h"
|
||||||
#import "GNUstepGUI/GSModelLoaderFactory.h"
|
#import "GNUstepGUI/GSModelLoaderFactory.h"
|
||||||
#import "GNUstepGUI/GSNibLoading.h"
|
#import "GNUstepGUI/GSNibLoading.h"
|
||||||
|
|
||||||
|
|
|
@ -30,19 +30,20 @@
|
||||||
Boston, MA 02110-1301, USA.
|
Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#import "config.h"
|
||||||
#include <Foundation/NSArray.h>
|
#import <Foundation/NSArray.h>
|
||||||
#include <Foundation/NSBundle.h>
|
#import <Foundation/NSBundle.h>
|
||||||
#include <Foundation/NSCoder.h>
|
#import <Foundation/NSCoder.h>
|
||||||
#include <Foundation/NSDictionary.h>
|
#import <Foundation/NSDictionary.h>
|
||||||
#include <Foundation/NSEnumerator.h>
|
#import <Foundation/NSEnumerator.h>
|
||||||
#include <Foundation/NSString.h>
|
#import <Foundation/NSException.h>
|
||||||
#include <Foundation/NSUserDefaults.h>
|
#import <Foundation/NSString.h>
|
||||||
#include <Foundation/NSKeyValueCoding.h>
|
#import <Foundation/NSUserDefaults.h>
|
||||||
#include <AppKit/NSControl.h>
|
#import <Foundation/NSKeyValueCoding.h>
|
||||||
#include "AppKit/NSNibConnector.h"
|
#import <AppKit/NSControl.h>
|
||||||
#include "AppKit/NSNibLoading.h"
|
#import "AppKit/NSNibConnector.h"
|
||||||
#include "GNUstepGUI/GSModelLoaderFactory.h"
|
#import "AppKit/NSNibLoading.h"
|
||||||
|
#import "GNUstepGUI/GSModelLoaderFactory.h"
|
||||||
|
|
||||||
@implementation NSNibConnector
|
@implementation NSNibConnector
|
||||||
|
|
||||||
|
|
|
@ -38,23 +38,22 @@
|
||||||
Boston, MA 02110-1301, USA.
|
Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <AppKit/NSNib.h>
|
#import "config.h"
|
||||||
#include <AppKit/NSNibLoading.h>
|
#import <Foundation/NSArray.h>
|
||||||
#include <Foundation/NSData.h>
|
#import <Foundation/NSArchiver.h>
|
||||||
#include <Foundation/NSDictionary.h>
|
#import <Foundation/NSBundle.h>
|
||||||
#include <Foundation/NSString.h>
|
#import <Foundation/NSData.h>
|
||||||
#include <Foundation/NSBundle.h>
|
#import <Foundation/NSDebug.h>
|
||||||
#include <Foundation/NSURL.h>
|
#import <Foundation/NSDictionary.h>
|
||||||
#include <Foundation/NSArray.h>
|
#import <Foundation/NSException.h>
|
||||||
#include <Foundation/NSNotification.h>
|
#import <Foundation/NSString.h>
|
||||||
#include <Foundation/NSArchiver.h>
|
#import <Foundation/NSURL.h>
|
||||||
#include <Foundation/NSFileManager.h>
|
|
||||||
#include <Foundation/NSDebug.h>
|
|
||||||
#include <Foundation/NSException.h>
|
|
||||||
|
|
||||||
#include "GNUstepGUI/GSModelLoaderFactory.h"
|
#import "AppKit/NSNib.h"
|
||||||
#include "GNUstepGUI/GSGormLoading.h"
|
#import "AppKit/NSNibLoading.h"
|
||||||
#include "GNUstepGUI/IMLoading.h"
|
#import "GNUstepGUI/GSModelLoaderFactory.h"
|
||||||
|
#import "GNUstepGUI/GSGormLoading.h"
|
||||||
|
#import "GNUstepGUI/IMLoading.h"
|
||||||
|
|
||||||
@implementation NSNib
|
@implementation NSNib
|
||||||
|
|
||||||
|
@ -66,12 +65,12 @@
|
||||||
{
|
{
|
||||||
NSString *newFileName = [GSModelLoaderFactory supportedModelFileAtPath: fileName];
|
NSString *newFileName = [GSModelLoaderFactory supportedModelFileAtPath: fileName];
|
||||||
ASSIGN(_nibData, [NSData dataWithContentsOfFile: newFileName]);
|
ASSIGN(_nibData, [NSData dataWithContentsOfFile: newFileName]);
|
||||||
ASSIGN(_loader, [GSModelLoaderFactory modelLoaderForFileName: newFileName]);
|
ASSIGN(_loader, [GSModelLoaderFactory modelLoaderForFileType: [newFileName pathExtension]]);
|
||||||
NSDebugLog(@"Loaded data from %@...",newFileName);
|
NSDebugLog(@"Loaded data from %@...", newFileName);
|
||||||
}
|
}
|
||||||
NS_HANDLER
|
NS_HANDLER
|
||||||
{
|
{
|
||||||
NSLog(@"Exception occured while loading model: %@",[localException reason]);
|
NSLog(@"Exception occured while loading model: %@", [localException reason]);
|
||||||
}
|
}
|
||||||
NS_ENDHANDLER
|
NS_ENDHANDLER
|
||||||
}
|
}
|
||||||
|
@ -118,9 +117,27 @@
|
||||||
{
|
{
|
||||||
if ((self = [super init]) != nil)
|
if ((self = [super init]) != nil)
|
||||||
{
|
{
|
||||||
// load the nib data into memory...
|
|
||||||
_nibData = [NSData dataWithContentsOfURL: nibFileURL];
|
|
||||||
ASSIGN(_url, nibFileURL);
|
ASSIGN(_url, nibFileURL);
|
||||||
|
|
||||||
|
if ([nibFileURL isFileURL])
|
||||||
|
{
|
||||||
|
[self _readNibData: [nibFileURL path]];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NS_DURING
|
||||||
|
{
|
||||||
|
// load the nib data into memory...
|
||||||
|
_nibData = [NSData dataWithContentsOfURL: nibFileURL];
|
||||||
|
ASSIGN(_loader, [GSModelLoaderFactory modelLoaderForFileType:
|
||||||
|
[[nibFileURL path] pathExtension]]);
|
||||||
|
}
|
||||||
|
NS_HANDLER
|
||||||
|
{
|
||||||
|
NSLog(@"Exception occured while loading model: %@", [localException reason]);
|
||||||
|
}
|
||||||
|
NS_ENDHANDLER
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -136,6 +153,9 @@
|
||||||
{
|
{
|
||||||
NSString *fileName = nil;
|
NSString *fileName = nil;
|
||||||
|
|
||||||
|
// Keep the bundle for resource creation
|
||||||
|
ASSIGN(_bundle, bundle);
|
||||||
|
|
||||||
if (bundle == nil)
|
if (bundle == nil)
|
||||||
{
|
{
|
||||||
bundle = [NSBundle mainBundle];
|
bundle = [NSBundle mainBundle];
|
||||||
|
@ -243,6 +263,7 @@
|
||||||
{
|
{
|
||||||
RELEASE(_nibData);
|
RELEASE(_nibData);
|
||||||
RELEASE(_loader);
|
RELEASE(_loader);
|
||||||
|
TEST_RELEASE(_bundle);
|
||||||
TEST_RELEASE(_url);
|
TEST_RELEASE(_url);
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue