mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 06:51:44 +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
4b4cc7452c
commit
1399765d96
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>
|
||||
|
||||
* Source/NSButtonCell.m,
|
||||
|
|
|
@ -28,9 +28,8 @@
|
|||
#ifndef _GNUstep_H_GSInstantiator
|
||||
#define _GNUstep_H_GSInstantiator
|
||||
|
||||
#include <Foundation/NSObject.h>
|
||||
#include <AppKit/NSNibLoading.h>
|
||||
#include <AppKit/NSNibConnector.h>
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <AppKit/NSNibConnector.h>
|
||||
|
||||
// instantiator
|
||||
@protocol GSInstantiator
|
||||
|
|
|
@ -29,7 +29,13 @@
|
|||
#ifndef _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
|
||||
+ (NSString *) type;
|
||||
|
|
|
@ -28,23 +28,29 @@
|
|||
#ifndef _GNUstep_H_GSNibCompatibility
|
||||
#define _GNUstep_H_GSNibCompatibility
|
||||
|
||||
#include <Foundation/NSObject.h>
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
#include <AppKit/NSWindow.h>
|
||||
#include <AppKit/NSMenu.h>
|
||||
#include <AppKit/NSView.h>
|
||||
#include <AppKit/NSText.h>
|
||||
#include <AppKit/NSTextView.h>
|
||||
#include <AppKit/NSControl.h>
|
||||
#include <AppKit/NSButton.h>
|
||||
#include <AppKit/NSGraphicsContext.h>
|
||||
#include <AppKit/NSGraphics.h>
|
||||
#include <AppKit/NSResponder.h>
|
||||
#include <AppKit/NSEvent.h>
|
||||
#include <AppKit/NSNibConnector.h>
|
||||
#import <AppKit/NSButton.h>
|
||||
#import <AppKit/NSControl.h>
|
||||
#import <AppKit/NSEvent.h>
|
||||
#import <AppKit/NSGraphicsContext.h>
|
||||
#import <AppKit/NSGraphics.h>
|
||||
#import <AppKit/NSMenu.h>
|
||||
#import <AppKit/NSNibConnector.h>
|
||||
#import <AppKit/NSResponder.h>
|
||||
#import <AppKit/NSText.h>
|
||||
#import <AppKit/NSTextView.h>
|
||||
#import <AppKit/NSView.h>
|
||||
#import <AppKit/NSWindow.h>
|
||||
|
||||
#include "GNUstepGUI/GSNibContainer.h"
|
||||
#include "GNUstepGUI/GSInstantiator.h"
|
||||
#import "GNUstepGUI/GSNibContainer.h"
|
||||
#import "GNUstepGUI/GSInstantiator.h"
|
||||
|
||||
@class NSDictionary;
|
||||
@class NSMapTable;
|
||||
@class NSMutableArray;
|
||||
@class NSMutableSet;
|
||||
@class NSString;
|
||||
|
||||
// templates
|
||||
@protocol OSXNibTemplate
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
#define _GNUstep_H_NSNib
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#include <Foundation/NSObject.h>
|
||||
#include <Foundation/NSZone.h>
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSZone.h>
|
||||
|
||||
@class NSData;
|
||||
@class NSDictionary;
|
||||
|
@ -59,6 +59,7 @@
|
|||
NSData *_nibData;
|
||||
id _loader;
|
||||
NSURL *_url;
|
||||
NSBundle *_bundle;
|
||||
}
|
||||
|
||||
// reading the data...
|
||||
|
|
|
@ -29,11 +29,9 @@
|
|||
#define _GNUstep_H_NSNibConnector
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#ifndef GNUSTEP
|
||||
#include <Foundation/Foundation.h>
|
||||
#else
|
||||
#include <Foundation/NSObject.h>
|
||||
#endif
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
@class NSString;
|
||||
|
||||
@interface NSNibConnector : NSObject <NSCoding>
|
||||
{
|
||||
|
|
|
@ -31,14 +31,13 @@
|
|||
#define _GNUstep_H_NSNibLoading
|
||||
#import <GNUstepBase/GSVersionMacros.h>
|
||||
|
||||
#include <Foundation/NSObject.h>
|
||||
#include <Foundation/NSBundle.h>
|
||||
#include <Foundation/NSArray.h>
|
||||
#include <Foundation/NSGeometry.h>
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSBundle.h>
|
||||
#import <Foundation/NSZone.h>
|
||||
|
||||
@class NSString;
|
||||
@class NSDictionary;
|
||||
@class NSMutableDictionary;
|
||||
@class NSString;
|
||||
@class NSDictionary;
|
||||
@class NSMutableDictionary;
|
||||
|
||||
@interface NSObject (NSNibAwaking)
|
||||
|
||||
|
|
|
@ -26,10 +26,15 @@
|
|||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <Foundation/Foundation.h>
|
||||
#include <AppKit/AppKit.h>
|
||||
#include "GNUstepGUI/GSModelLoaderFactory.h"
|
||||
#include "GNUstepBase/GSObjCRuntime.h"
|
||||
#import "config.h"
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
#import <Foundation/NSException.h>
|
||||
#import <Foundation/NSFileManager.h>
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
#import "GNUstepGUI/GSModelLoaderFactory.h"
|
||||
|
||||
@implementation GSModelLoader
|
||||
+ (NSString *) type
|
||||
|
|
|
@ -26,11 +26,18 @@
|
|||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <Foundation/Foundation.h>
|
||||
#include <AppKit/AppKit.h>
|
||||
#import "config.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"
|
||||
#include "GNUstepGUI/GSNibLoading.h"
|
||||
#import "GNUstepGUI/GSModelLoaderFactory.h"
|
||||
#import "GNUstepGUI/GSNibLoading.h"
|
||||
|
||||
@interface GSNibLoader : GSModelLoader
|
||||
@end
|
||||
|
|
|
@ -29,40 +29,39 @@
|
|||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <Foundation/NSClassDescription.h>
|
||||
#include <Foundation/NSArchiver.h>
|
||||
#include <Foundation/NSArray.h>
|
||||
#include <Foundation/NSBundle.h>
|
||||
#include <Foundation/NSByteOrder.h>
|
||||
#include <Foundation/NSCoder.h>
|
||||
#include <Foundation/NSData.h>
|
||||
#include <Foundation/NSDecimalNumber.h>
|
||||
#include <Foundation/NSDictionary.h>
|
||||
#include <Foundation/NSDebug.h>
|
||||
#include <Foundation/NSEnumerator.h>
|
||||
#include <Foundation/NSException.h>
|
||||
#include <Foundation/NSInvocation.h>
|
||||
#include <Foundation/NSObjCRuntime.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"
|
||||
#import <Foundation/NSArchiver.h>
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSBundle.h>
|
||||
#import <Foundation/NSByteOrder.h>
|
||||
#import <Foundation/NSCoder.h>
|
||||
#import <Foundation/NSData.h>
|
||||
#import <Foundation/NSDecimalNumber.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSDebug.h>
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
#import <Foundation/NSException.h>
|
||||
#import <Foundation/NSKeyedArchiver.h>
|
||||
#import <Foundation/NSObjCRuntime.h>
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
// FIXME: Used for NSKeyedArchiver access. All this should be moved into base.
|
||||
/*
|
||||
* Setup for inline operation of arrays.
|
||||
*/
|
||||
#define GSI_ARRAY_RETAIN(A, X) RETAIN((X).obj)
|
||||
#define GSI_ARRAY_RELEASE(A, X) RELEASE((X).obj)
|
||||
#define GSI_ARRAY_TYPES GSUNION_OBJ
|
||||
#include <GNUstepBase/GSIArray.h>
|
||||
#import <GNUstepBase/GSIArray.h>
|
||||
|
||||
#include <GNUstepGUI/GSNibLoading.h>
|
||||
#include <GNUstepGUI/GSInstantiator.h>
|
||||
#import "GNUstepGUI/GSNibLoading.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;
|
||||
|
||||
|
@ -98,7 +97,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
@interface NSMenu (NibCompatibility)
|
||||
- (void) _setMain: (BOOL)isMain;
|
||||
@end
|
||||
@interface NSMenu (GNUstepPrivate)
|
||||
@interface NSMenu (GNUstepPrivate)
|
||||
- (void) _setGeometry;
|
||||
@end
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#import <GNUstepBase/GSMime.h>
|
||||
|
||||
#import "AppKit/NSApplication.h"
|
||||
#import "AppKit/NSNibLoading.h"
|
||||
#import "GNUstepGUI/GSModelLoaderFactory.h"
|
||||
#import "GNUstepGUI/GSNibLoading.h"
|
||||
|
||||
|
|
|
@ -30,19 +30,20 @@
|
|||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <Foundation/NSArray.h>
|
||||
#include <Foundation/NSBundle.h>
|
||||
#include <Foundation/NSCoder.h>
|
||||
#include <Foundation/NSDictionary.h>
|
||||
#include <Foundation/NSEnumerator.h>
|
||||
#include <Foundation/NSString.h>
|
||||
#include <Foundation/NSUserDefaults.h>
|
||||
#include <Foundation/NSKeyValueCoding.h>
|
||||
#include <AppKit/NSControl.h>
|
||||
#include "AppKit/NSNibConnector.h"
|
||||
#include "AppKit/NSNibLoading.h"
|
||||
#include "GNUstepGUI/GSModelLoaderFactory.h"
|
||||
#import "config.h"
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSBundle.h>
|
||||
#import <Foundation/NSCoder.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
#import <Foundation/NSException.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
#import <Foundation/NSKeyValueCoding.h>
|
||||
#import <AppKit/NSControl.h>
|
||||
#import "AppKit/NSNibConnector.h"
|
||||
#import "AppKit/NSNibLoading.h"
|
||||
#import "GNUstepGUI/GSModelLoaderFactory.h"
|
||||
|
||||
@implementation NSNibConnector
|
||||
|
||||
|
|
|
@ -38,23 +38,22 @@
|
|||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <AppKit/NSNib.h>
|
||||
#include <AppKit/NSNibLoading.h>
|
||||
#include <Foundation/NSData.h>
|
||||
#include <Foundation/NSDictionary.h>
|
||||
#include <Foundation/NSString.h>
|
||||
#include <Foundation/NSBundle.h>
|
||||
#include <Foundation/NSURL.h>
|
||||
#include <Foundation/NSArray.h>
|
||||
#include <Foundation/NSNotification.h>
|
||||
#include <Foundation/NSArchiver.h>
|
||||
#include <Foundation/NSFileManager.h>
|
||||
#include <Foundation/NSDebug.h>
|
||||
#include <Foundation/NSException.h>
|
||||
#import "config.h"
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSArchiver.h>
|
||||
#import <Foundation/NSBundle.h>
|
||||
#import <Foundation/NSData.h>
|
||||
#import <Foundation/NSDebug.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSException.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSURL.h>
|
||||
|
||||
#include "GNUstepGUI/GSModelLoaderFactory.h"
|
||||
#include "GNUstepGUI/GSGormLoading.h"
|
||||
#include "GNUstepGUI/IMLoading.h"
|
||||
#import "AppKit/NSNib.h"
|
||||
#import "AppKit/NSNibLoading.h"
|
||||
#import "GNUstepGUI/GSModelLoaderFactory.h"
|
||||
#import "GNUstepGUI/GSGormLoading.h"
|
||||
#import "GNUstepGUI/IMLoading.h"
|
||||
|
||||
@implementation NSNib
|
||||
|
||||
|
@ -66,12 +65,12 @@
|
|||
{
|
||||
NSString *newFileName = [GSModelLoaderFactory supportedModelFileAtPath: fileName];
|
||||
ASSIGN(_nibData, [NSData dataWithContentsOfFile: newFileName]);
|
||||
ASSIGN(_loader, [GSModelLoaderFactory modelLoaderForFileName: newFileName]);
|
||||
NSDebugLog(@"Loaded data from %@...",newFileName);
|
||||
ASSIGN(_loader, [GSModelLoaderFactory modelLoaderForFileType: [newFileName pathExtension]]);
|
||||
NSDebugLog(@"Loaded data from %@...", newFileName);
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSLog(@"Exception occured while loading model: %@",[localException reason]);
|
||||
NSLog(@"Exception occured while loading model: %@", [localException reason]);
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
}
|
||||
|
@ -118,9 +117,27 @@
|
|||
{
|
||||
if ((self = [super init]) != nil)
|
||||
{
|
||||
// load the nib data into memory...
|
||||
_nibData = [NSData dataWithContentsOfURL: 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;
|
||||
}
|
||||
|
@ -136,6 +153,9 @@
|
|||
{
|
||||
NSString *fileName = nil;
|
||||
|
||||
// Keep the bundle for resource creation
|
||||
ASSIGN(_bundle, bundle);
|
||||
|
||||
if (bundle == nil)
|
||||
{
|
||||
bundle = [NSBundle mainBundle];
|
||||
|
@ -243,6 +263,7 @@
|
|||
{
|
||||
RELEASE(_nibData);
|
||||
RELEASE(_loader);
|
||||
TEST_RELEASE(_bundle);
|
||||
TEST_RELEASE(_url);
|
||||
[super dealloc];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue