From 4e87de4e7abff2000370d1475f142316c6d05a26 Mon Sep 17 00:00:00 2001 From: CaS Date: Sat, 5 Apr 2003 03:38:53 +0000 Subject: [PATCH] STRICT_OPENSTEP fixes git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16367 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 13 +++++++++++++ Headers/gnustep/gui/NSAttributedString.h | 4 ++++ Headers/gnustep/gui/NSDocumentController.h | 4 ++++ Headers/gnustep/gui/NSGraphicsContext.h | 12 ++++++++---- Headers/gnustep/gui/NSResponder.h | 6 ++++++ Headers/gnustep/gui/NSStringDrawing.h | 6 ++++++ Headers/gnustep/gui/NSTextView.h | 2 ++ Headers/gnustep/gui/NSWindow.h | 2 -- 8 files changed, 43 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7f92970de..77a96e246 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2003-04-05 Richard Frith-Macdonald + + * Headers/gnustep/gui/NSAttributedString.h: + * Headers/gnustep/gui/NSDocumentController.h: + * Headers/gnustep/gui/NSGraphicsContext.h: + * Headers/gnustep/gui/NSResponder.h: + * Headers/gnustep/gui/NSStringDrawing.h: + * Headers/gnustep/gui/NSTextView.h: + * Headers/gnustep/gui/NSWindow.h: + Fixes to allow compliation of apps with STRICT_OPENSTEP defined. + This does *NOT* mean I've checked that STRICT_OPENSTEP is defined + where it should be, just that I've stopped it preventing compilation. + 2003-03-28 Serg Stoyan * Source/NSMenuView.m: diff --git a/Headers/gnustep/gui/NSAttributedString.h b/Headers/gnustep/gui/NSAttributedString.h index d26b5dac4..4ea2d09b7 100644 --- a/Headers/gnustep/gui/NSAttributedString.h +++ b/Headers/gnustep/gui/NSAttributedString.h @@ -28,6 +28,8 @@ #ifndef _GNUstep_H_NSAttributedString #define _GNUstep_H_NSAttributedString +#ifndef STRICT_OPENSTEP + #include #include #include @@ -116,3 +118,5 @@ enum #endif +#endif + diff --git a/Headers/gnustep/gui/NSDocumentController.h b/Headers/gnustep/gui/NSDocumentController.h index ccc9172df..7f68feec2 100644 --- a/Headers/gnustep/gui/NSDocumentController.h +++ b/Headers/gnustep/gui/NSDocumentController.h @@ -28,6 +28,8 @@ #ifndef _GNUstep_H_NSDocumentController #define _GNUstep_H_NSDocumentController +#ifndef STRICT_OPENSTEP + #include #include #include @@ -117,5 +119,7 @@ @end +#endif // STRICT_OPENSTEP + #endif // _GNUstep_H_NSDocumentController diff --git a/Headers/gnustep/gui/NSGraphicsContext.h b/Headers/gnustep/gui/NSGraphicsContext.h index 7c0c01df4..986ef9f79 100644 --- a/Headers/gnustep/gui/NSGraphicsContext.h +++ b/Headers/gnustep/gui/NSGraphicsContext.h @@ -89,7 +89,12 @@ typedef enum _NSImageInterpolation NSImageInterpolationHigh } NSImageInterpolation; -#ifndef STRICT_OPENSTEP + +/* + * The following graphics context stuff is needed by inline functions, + * so it must always be available even when STRICT_OPENSTEP is defined. + */ + typedef enum _GSTextDrawingMode { @@ -180,9 +185,10 @@ typedef enum _GSColorSpace @end -#ifndef NO_GNUSTEP APPKIT_EXPORT NSGraphicsContext *GSCurrentContext(void); +#ifndef NO_GNUSTEP + @interface NSGraphicsContext (GNUstep) + (void) setDefaultContextClass: (Class)defaultContextClass; @@ -404,5 +410,3 @@ APPKIT_EXPORT NSString *GSColorSpaceColorTable; #endif /* _NSGraphicsContext_h_INCLUDE */ -#endif /* STRICT_OPENSTEP */ - diff --git a/Headers/gnustep/gui/NSResponder.h b/Headers/gnustep/gui/NSResponder.h index 9503739e9..e0d6513a6 100644 --- a/Headers/gnustep/gui/NSResponder.h +++ b/Headers/gnustep/gui/NSResponder.h @@ -41,7 +41,11 @@ @interface NSResponder : NSObject { +#ifdef STRICT_OPENSTEP + int _interface_style; +#else NSInterfaceStyle _interface_style; +#endif NSResponder *_next_responder; NSMenu *_menu; /* @@ -146,8 +150,10 @@ */ - (NSInterfaceStyle) interfaceStyle; - (void) setInterfaceStyle: (NSInterfaceStyle)aStyle; +#endif @end +#ifndef STRICT_OPENSTEP @interface NSResponder (OptionalActionMethods) - (void) capitalizeWord: (id)sender; - (void) centerSelectionInVisibleArea: (id)sender; diff --git a/Headers/gnustep/gui/NSStringDrawing.h b/Headers/gnustep/gui/NSStringDrawing.h index 4a1686516..ca26e7f9f 100644 --- a/Headers/gnustep/gui/NSStringDrawing.h +++ b/Headers/gnustep/gui/NSStringDrawing.h @@ -32,6 +32,8 @@ #ifndef _GNUstep_H_NSStringDrawing #define _GNUstep_H_NSStringDrawing +#ifndef STRICT_OPENSTEP + #include #include #include @@ -53,4 +55,8 @@ @end +#else +@class NSAttributedString; +#endif + #endif /* _GNUstep_H_NSStringDrawing */ diff --git a/Headers/gnustep/gui/NSTextView.h b/Headers/gnustep/gui/NSTextView.h index c41ab1e60..8ff0fffaa 100644 --- a/Headers/gnustep/gui/NSTextView.h +++ b/Headers/gnustep/gui/NSTextView.h @@ -537,6 +537,7 @@ for that text view has been invalidated. /* Note that all delegation messages come from the first text view of a layout manager. */ +#ifndef STRICT_OPENSTEP @interface NSObject (NSTextViewDelegate) -(void) textView: (NSTextView *)textView @@ -587,6 +588,7 @@ replacementString will be nil. */ -(NSUndoManager *) undoManagerForTextView: (NSTextView *)view; @end +#endif // STRICT_OPENSTEP /* NSOldNotifyingTextView -> the old view, NSNewNotifyingTextView -> the new view. The text view delegate is not automatically diff --git a/Headers/gnustep/gui/NSWindow.h b/Headers/gnustep/gui/NSWindow.h index b53fb69e6..d679ed9ff 100644 --- a/Headers/gnustep/gui/NSWindow.h +++ b/Headers/gnustep/gui/NSWindow.h @@ -90,13 +90,11 @@ enum { NSMiniWindowMask = 128 /* GNUstep extension - miniwindows */ }; -#ifndef STRICT_OPENSTEP typedef enum _NSSelectionDirection { NSDirectSelection, NSSelectingNext, NSSelectingPrevious } NSSelectionDirection; -#endif APPKIT_EXPORT NSSize NSIconSize; APPKIT_EXPORT NSSize NSTokenSize;