Fill out implementation of NSFont, NSColor, and NSMenu.

Library now requires tiff and DPSclient libraries.
Remove a number of functions which should be implemented in backend.
Correct many method definitions that should use NSNotification.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@1762 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Scott Christley 1996-09-12 19:24:32 +00:00
parent 6991ce1d91
commit 2c37af52c9
37 changed files with 1354 additions and 749 deletions

View file

@ -1,3 +1,56 @@
Thu Sep 12 13:49:53 1996 GNUstep Development <gnustep@ocbi.com>
* Headers/gnustep/gui/NSFontPrivate.h: New file.
* Headers/gnustep/gui/NSFont.h: Add typeface and weight variables.
* Source/NSFont.m: Fill out implementation.
* Source/NSFontManager.m: Likewise.
* Headers/gnustep/gui/NSMenuPrivate.h: New file.
* Headers/gnustep/gui/NSMenu.h: Add instance variables to fill
out implementation.
* Source/NSMenu.m: Fill out implementation.
* Version (GNUSTEP_GUI_LIBTIFF): Required tiff library version.
(GNUSTEP_GUI_DPSCLIENT): Required DPSclient library version.
* configure: Run autoconf for configure.in changes.
* configure.in: Add check for tiff library. Add check for
DPSclient library.
* Headers/gnustep/dps/DPSOperators.h: include in header
file from DPSclient library.
* Headers/gnustep/dps/NSDPSContext.h: Include DPS operators.
* Headers/gnustep/dps/TypesandConstants.h: Don't define some
typedefs if we have the DPSclient library.
* Headers/gnustep/gui/Functions.h (NSRectFill): Correct definition.
* Headers/gnustep/gui/config.h.in (HAVE_TIFF): Add definition for
tiff library.
(HAVE_DPSCLIENT): Add definition for DPSclient library.
* Headers/gnustep/gui/nsimage-tiff.h (HAVE_TIFF): Correct definition.
* Source/Makefile.in: Remove definition.
* Source/NSDPSContext.m: Specify default language and name encoding.
* Source/tiff.c: Delete include of non-existent header file.
* Source/Functions.m: Remove all function declarations that
belong in the backend implementation.
* Source/NSBox.m (-drawRect:): Remove use of DPS functions that
should be in backend.
* Source/NSView.m (-drawRect:): Likewise.
* Headers/gnustep/gui/NSApplication.h: Correct method definitions
that should be using NSNotification.
* Headers/gnustep/gui/NSWindow.h: Likewise.
* Source/NSApplication.m: Likewise.
* Source/NSWindow.m: Likewise.
* Headers/gnustep/gui/NSClipView.h: Include NSNotification.
* Headers/gnustep/gui/NSControl.h: Likewise.
* Headers/gnustep/gui/NSMatrix.h: Likewise.
* Headers/gnustep/gui/NSSplitView.h: Likewise.
* Headers/gnustep/gui/NSTextField.h: Likewise.
* Headers/gnustep/gui/NSWorkspace.h: Likewise.
* Headers/gnustep/gui/NSColorPrivate.h: New file.
* Headers/gnustep/gui/NSColor.h: Implement HSB colors.
* Source/NSColor.m: Implement HSB, CMYK, and grayscale methods.
Tue Sep 3 15:24:41 1996 Adam Fedor <fedor@pulse.Colorado.edu>
* NSBitmapImageRep.h: "Hide" instance variable names.

View file

@ -31,6 +31,13 @@
#ifndef _GNUstep_H_DPSOperators
#define _GNUstep_H_DPSOperators
// Use the DPSclient library if we have it
#ifdef HAVE_DPSCLIENT
#include <DPS/dpsclient.h>
#else
#include <Foundation/NSObject.h>
#include <DPSClient/TypesandConstants.h>
#include <Foundation/NSGeometry.h>
@ -130,4 +137,5 @@ PSrectstroke(float x, float y, float width, float height);
void
PSrectfill(float x, float y, float width, float height);
#endif /* HAVE_DPSCLIENT */
#endif /* _GNUstep_H_DPSOperators */

View file

@ -34,6 +34,7 @@
#include <AppKit/stdappkit.h>
#include <DPSClient/TypesandConstants.h>
#include <Foundation/NSData.h>
#include <DPSClient/DPSOperators.h>
//
// NSDPSContextNotification

View file

@ -31,12 +31,15 @@
#ifndef _GNUstep_H_DPSTypes
#define _GNUstep_H_DPSTypes
// These are already defined in the DPSclient headers
#ifndef HAVE_DPSCLIENT
typedef void *DPSProgramEncoding;
typedef void *DPSNameEncoding;
typedef void *DPSTextProc;
typedef void *DPSErrorProc;
typedef void DPSBinObjSeqRec;
typedef unsigned int DPSDefinedType;
#endif /* HAVE_DPSCLIENT */
//
// Backing Store Types

View file

@ -46,8 +46,7 @@ void NSEraseRect(NSRect aRect);
void NSHighlightRect(NSRect aRect);
void NSRectClip(NSRect aRect);
void NSRectClipList(const NSRect *rects, int count);
void NS__RectFill(id self, NSRect aRect);
#define NSRectFill(ARECT) NS__RectFill(self,ARECT)
void NSRectFill(NSRect aRect);
void NSRectFillList(const NSRect *rects, int count);
void NSRectFillListWithGrays(const NSRect *rects,
const float *grays, int count);

View file

@ -43,6 +43,7 @@
#include <gnustep/base/Queue.h>
#include <Foundation/NSCoder.h>
#include <DPSClient/NSDPSContext.h>
#include <Foundation/NSNotification.h>
@interface NSApplication : NSResponder <NSCoding>
@ -222,20 +223,20 @@
- (BOOL)application:sender openFileWithoutUI:(NSString *)filename;
- (BOOL)application:(NSApplication *)app openFile:(NSString *)filename;
- (BOOL)application:(NSApplication *)app openTempFile:(NSString *)filename;
- (void)applicationDidBecomeActive:sender;
- (void)applicationDidFinishLaunching:sender;
- (void)applicationDidHide:sender;
- (void)applicationDidResignActive:sender;
- (void)applicationDidUnhide:sender;
- (void)applicationDidUpdate:sender;
- (void)applicationDidBecomeActive:(NSNotification *)aNotification;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification;
- (void)applicationDidHide:(NSNotification *)aNotification;
- (void)applicationDidResignActive:(NSNotification *)aNotification;
- (void)applicationDidUnhide:(NSNotification *)aNotification;
- (void)applicationDidUpdate:(NSNotification *)aNotification;
- (BOOL)applicationOpenUntitledFile:(NSApplication *)app;
- (BOOL)applicationShouldTerminate:sender;
- (void)applicationWillBecomeActive:sender;
- (void)applicationWillFinishLaunching:sender;
- (void)applicationWillHide:sender;
- (void)applicationWillResignActive:sender;
- (void)applicationWillUnhide:sender;
- (void)applicationWillUpdate:sender;
- (void)applicationWillBecomeActive:(NSNotification *)aNotification;
- (void)applicationWillFinishLaunching:(NSNotification *)aNotification;
- (void)applicationWillHide:(NSNotification *)aNotification;
- (void)applicationWillResignActive:(NSNotification *)aNotification;
- (void)applicationWillUnhide:(NSNotification *)aNotification;
- (void)applicationWillUpdate:(NSNotification *)aNotification;
//
// NSCoding protocol

View file

@ -36,6 +36,7 @@
#include <AppKit/NSCursor.h>
#include <AppKit/NSColor.h>
#include <Foundation/NSCoder.h>
#include <Foundation/NSNotification.h>
@interface NSClipView : NSView <NSCoding>

View file

@ -36,6 +36,12 @@
@class NSPasteboard;
// What component should we take values from
#define GNUSTEP_GUI_RGB_ACTIVE 1
#define GNUSTEP_GUI_CMYK_ACTIVE 2
#define GNUSTEP_GUI_HSB_ACTIVE 3
#define GNUSTEP_GUI_WHITE_ACTIVE 4
@interface NSColor : NSObject <NSCoding>
{
@ -59,11 +65,17 @@
float black;
} CMYK_component;
float alpha_component;
struct _GNU_HSB_component
{
float hue;
float saturation;
float brightness;
} HSB_component;
float white_component;
float hue_component;
float brightness_component;
float saturation_component;
int active_component;
float alpha_component;
BOOL is_clear;
@ -76,11 +88,11 @@
//
+ (NSColor *)colorWithCalibratedHue:(float)hue
saturation:(float)saturation
brightness:(float)brightness
alpha:(float)alpha;
brightness:(float)brightness
alpha:(float)alpha;
+ (NSColor *)colorWithCalibratedRed:(float)red
green:(float)green
blue:(float)blue
blue:(float)blue
alpha:(float)alpha;
+ (NSColor *)colorWithCalibratedWhite:(float)white
alpha:(float)alpha;
@ -88,16 +100,16 @@ blue:(float)blue
colorName:(NSString *)colorName;
+ (NSColor *)colorWithDeviceCyan:(float)cyan
magenta:(float)magenta
yellow:(float)yellow
black:(float)black
alpha:(float)alpha;
yellow:(float)yellow
black:(float)black
alpha:(float)alpha;
+ (NSColor *)colorWithDeviceHue:(float)hue
saturation:(float)saturation
brightness:(float)brightness
alpha:(float)alpha;
brightness:(float)brightness
alpha:(float)alpha;
+ (NSColor *)colorWithDeviceRed:(float)red
green:(float)green
blue:(float)blue
blue:(float)blue
alpha:(float)alpha;
+ (NSColor *)colorWithDeviceWhite:(float)white
alpha:(float)alpha;
@ -132,16 +144,16 @@ blue:(float)blue
//
- (void)getCyan:(float *)cyan
magenta:(float *)magenta
yellow:(float *)yellow
black:(float *)black
alpha:(float *)alpha;
yellow:(float *)yellow
black:(float *)black
alpha:(float *)alpha;
- (void)getHue:(float *)hue
saturation:(float *)saturation
brightness:(float *)brightness
alpha:(float *)alpha;
brightness:(float *)brightness
alpha:(float *)alpha;
- (void)getRed:(float *)red
green:(float *)green
blue:(float *)blue
blue:(float *)blue
alpha:(float *)alpha;
- (void)getWhite:(float *)white
alpha:(float *)alpha;

View file

@ -0,0 +1,67 @@
/*
NSColorPrivate.h
Private methods for the color class
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: September 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSColorPrivate
#define _GNUstep_H_NSColorPrivate
#include <gnustep/gui/NSColor.h>
@interface NSColor (GNUstepPrivate)
- (void)setColorSpaceName:(NSString *)str;
- (void)setCatalogName:(NSString *)str;
- (void)setColorName:(NSString *)str;
// RGB component values
- (void)setRed:(float)value;
- (void)setGreen:(float)value;
- (void)setBlue:(float)value;
// CMYK component values
- (void)setCyan:(float)value;
- (void)setMagenta:(float)value;
- (void)setYellow:(float)value;
- (void)setBlack:(float)value;
// HSB component values
- (void)setHue:(float)value;
- (void)setSaturation:(float)value;
- (void)setBrightness:(float)value;
// Grayscale
- (void)setWhite:(float)value;
- (void)setAlpha:(float)value;
- (void)setActiveComponent:(int)value;
- (void)setClear:(BOOL)flag;
@end
#endif // _GNUstep_H_NSColorPrivate

View file

@ -35,6 +35,7 @@
#include <AppKit/NSView.h>
#include <AppKit/NSCell.h>
#include <Foundation/NSCoder.h>
#include <Foundation/NSNotification.h>
@interface NSControl : NSView <NSCoding>

View file

@ -40,8 +40,10 @@
// Attributes
NSString *family_name;
NSString *font_name;
NSString *type_face;
float point_size;
NSFontTraitMask font_traits;
int font_weight;
// Reserved for back-end use
void *be_font_reserved;
@ -75,18 +77,14 @@
- (NSRect)boundingRectForFont;
- (NSString *)displayName;
- (NSString *)familyName;
- (void)setFamilyName:(NSString *)familyName;
- (NSString *)fontName;
- (BOOL)isBaseFont;
- (const float *)matrix;
- (float)pointSize;
- (void)setPointSize:(float)value;
- (NSFont *)printerFont;
- (NSFont *)screenFont;
- (float)widthOfString:(NSString *)string;
- (float *)widths;
- (NSFontTraitMask)traits;
- (void)setTraits:(NSFontTraitMask)traits;
//
// Manipulating Glyphs
@ -96,7 +94,7 @@
- (BOOL)glyphIsEncoded:(NSGlyph)aGlyph;
- (NSPoint)positionOfGlyph:(NSGlyph)curGlyph
precededByGlyph:(NSGlyph)prevGlyph
isNominal:(BOOL *)nominal;
isNominal:(BOOL *)nominal;
//
// NSCoding protocol

View file

@ -79,8 +79,8 @@
ofFont:(NSFont *)fontObject;
- (NSFont *)fontWithFamily:(NSString *)family
traits:(NSFontTraitMask)traits
weight:(int)weight
size:(float)size;
weight:(int)weight
size:(float)size;
//
// Setting and Getting Parameters

View file

@ -0,0 +1,50 @@
/*
NSFontPrivate.h
Private methods for the font class.
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: September 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSFontPrivate
#define _GNUstep_H_NSFontPrivate
#include <gnustep/gui/NSFont.h>
@interface NSFont (GNUstepPrivate)
- (void)setFamilyName:(NSString *)familyName;
- (void)setFontName:(NSString *)fontName;
- (void)setPointSize:(float)value;
- (NSFontTraitMask)traits;
- (void)setTraits:(NSFontTraitMask)traits;
- (int)weight;
- (void)setWeight:(int)value;
- (NSString *)typeface;
- (void)setTypeface:(NSString *)str;
@end
#endif /* _GNUstep_H_NSFontPrivate */

View file

@ -36,6 +36,7 @@
#include <AppKit/stdappkit.h>
#include <AppKit/NSControl.h>
#include <Foundation/NSCoder.h>
#include <Foundation/NSNotification.h>
@interface NSMatrix : NSControl <NSCoding>

View file

@ -37,12 +37,17 @@
#include <AppKit/NSMenuCell.h>
#include <AppKit/NSMatrix.h>
#include <Foundation/NSCoder.h>
#include <Foundation/NSZone.h>
@interface NSMenu : NSWindow <NSCoding>
{
// Attributes
NSMutableArray *menu_items;
NSMenu *super_menu;
BOOL autoenables_items;
NSMatrix *menu_matrix;
BOOL is_torn_off;
// Reserved for back-end use
void *be_menu_reserved;
@ -64,11 +69,11 @@
//
- (id)addItemWithTitle:(NSString *)aString
action:(SEL)aSelector
keyEquivalent:(NSString *)charCode;
keyEquivalent:(NSString *)charCode;
- (id)insertItemWithTitle:(NSString *)aString
action:(SEL)aSelector
keyEquivalent:(NSString *)charCode
atIndex:(unsigned int)index;
keyEquivalent:(NSString *)charCode
atIndex:(unsigned int)index;
- (NSArray *)itemArray;
- (NSMatrix *)itemMatrix;
- (void)setItemMatrix:(NSMatrix *)aMatrix;

View file

@ -0,0 +1,39 @@
/*
NSMenuPrivate.h
Private methods for the menu class
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: September 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSMenuPrivate
#define _GNUstep_H_NSMenuPrivate
#include <gnustep/gui/NSMenu.h>
@interface NSMenu (GNUstepPrivate)
- (void)setSupermenu:(NSMenu *)obj;
@end
#endif // _GNUstep_H_NSMenuPrivate

View file

@ -34,6 +34,7 @@
#include <AppKit/stdappkit.h>
#include <AppKit/NSView.h>
#include <Foundation/NSCoder.h>
#include <Foundation/NSNotification.h>
@interface NSSplitView : NSView <NSCoding>
@ -59,8 +60,8 @@
//
- (void)splitView:(NSSplitView *)splitView
constrainMinCoordinate:(float *)min
maxCoordinate:(float *)max
ofSubviewAt:(int)offset;
maxCoordinate:(float *)max
ofSubviewAt:(int)offset;
- (void)splitView:(NSSplitView *)sender
resizeSubviewsWithOldSize:(NSSize)oldSize;
- (void)splitViewDidResizeSubviews:(NSNotification *)notification;

View file

@ -35,6 +35,7 @@
#include <AppKit/NSControl.h>
#include <AppKit/NSColor.h>
#include <Foundation/NSCoder.h>
#include <Foundation/NSNotification.h>
@interface NSTextField : NSControl <NSCoding>

View file

@ -42,6 +42,7 @@
#include <AppKit/NSText.h>
#include <Foundation/NSCoder.h>
#include <AppKit/NSScreen.h>
#include <Foundation/NSNotification.h>
@interface NSWindow : NSResponder <NSCoding>
@ -99,14 +100,14 @@
//
- initWithContentRect:(NSRect)contentRect
styleMask:(unsigned int)aStyle
backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag;
backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag;
- initWithContentRect:(NSRect)contentRect
styleMask:(unsigned int)aStyle
backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag
screen:aScreen;
backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag
screen:aScreen;
//
// Accessing the content view
@ -271,8 +272,8 @@ screen:aScreen;
- (NSEvent *)nextEventMatchingMask:(unsigned int)mask;
- (NSEvent *)nextEventMatchingMask:(unsigned int)mask
untilDate:(NSDate *)expiration
inMode:(NSString *)mode
dequeue:(BOOL)deqFlag;
inMode:(NSString *)mode
dequeue:(BOOL)deqFlag;
- (void)postEvent:(NSEvent *)event
atStart:(BOOL)flag;
- (void)setAcceptsMouseMovedEvents:(BOOL)flag;
@ -285,11 +286,11 @@ inMode:(NSString *)mode
//
- (void)dragImage:(NSImage *)anImage
at:(NSPoint)baseLocation
offset:(NSSize)initialOffset
event:(NSEvent *)event
pasteboard:(NSPasteboard *)pboard
source:sourceObject
slideBack:(BOOL)slideFlag;
offset:(NSSize)initialOffset
event:(NSEvent *)event
pasteboard:(NSPasteboard *)pboard
source:sourceObject
slideBack:(BOOL)slideFlag;
- (void)registerForDraggedTypes:(NSArray *)newTypes;
- (void)unregisterDraggedTypes;
@ -332,20 +333,20 @@ pasteboard:(NSPasteboard *)pboard
toSize:(NSSize)frameSize;
- windowWillReturnFieldEditor:(NSWindow *)sender
toObject:client;
- (void)windowDidBecomeKey:sender;
- (void)windowDidBecomeMain:sender;
- (void)windowDidChangeScreen:sender;
- (void)windowDidDeminiaturize:sender;
- (void)windowDidExpose:sender;
- (void)windowDidMiniaturize:sender;
- (void)windowDidMove:sender;
- (void)windowDidResignKey:sender;
- (void)windowDidResignMain:sender;
- (void)windowDidResize:sender;
- (void)windowDidUpdate:sender;
- (void)windowWillClose:sender;
- (void)windowWillMiniaturize:sender;
- (void)windowWillMove:sender;
- (void)windowDidBecomeKey:(NSNotification *)aNotification;
- (void)windowDidBecomeMain:(NSNotification *)aNotification;
- (void)windowDidChangeScreen:(NSNotification *)aNotification;
- (void)windowDidDeminiaturize:(NSNotification *)aNotification;
- (void)windowDidExpose:(NSNotification *)aNotification;
- (void)windowDidMiniaturize:(NSNotification *)aNotification;
- (void)windowDidMove:(NSNotification *)aNotification;
- (void)windowDidResignKey:(NSNotification *)aNotification;
- (void)windowDidResignMain:(NSNotification *)aNotification;
- (void)windowDidResize:(NSNotification *)aNotification;
- (void)windowDidUpdate:(NSNotification *)aNotification;
- (void)windowWillClose:(NSNotification *)aNotification;
- (void)windowWillMiniaturize:(NSNotification *)aNotification;
- (void)windowWillMove:(NSNotification *)aNotification;
//
// NSCoding methods
@ -362,7 +363,10 @@ pasteboard:(NSPasteboard *)pboard
- (void)captureMouse: sender;
- (void)releaseMouse: sender;
// Allow subclasses to init without the backend class
// attempting to create an actual window
- cleanInit;
@end
#endif // _GNUstep_H_NSWindow

View file

@ -34,6 +34,7 @@
#include <AppKit/stdappkit.h>
#include <AppKit/NSImage.h>
#include <AppKit/NSView.h>
#include <Foundation/NSNotification.h>
@interface NSWorkspace : NSObject

View file

@ -35,11 +35,10 @@
#include <Foundation/NSGeometry.h>
// Until they have been added to libobjects
//#define NSNotification void
//#define NSNotificationCenter void
@config_include@
#define HAVE_TIFF @HAVE_TIFF@
#define HAVE_DPSCLIENT @HAVE_DPSCLIENT@
#endif /* _GNUstep_H_AppKitConfig */

View file

@ -36,7 +36,7 @@
#ifndef _GNUstep_H_tiff
#define _GNUstep_H_tiff
#ifdef HAVE_LIBTIFF
#ifdef HAVE_TIFF
#include <tiffio.h>
#else
#define TIFF void

View file

@ -57,386 +57,3 @@ void NSLog(NSString *format, ...)
void NSNullLog(NSString *format, ...)
{
}
//
// Rectangle Drawing Functions
//
//
// Optimize Drawing
//
void NSEraseRect(NSRect aRect)
{}
void NSHighlightRect(NSRect aRect)
{}
void NSRectClip(NSRect aRect)
{}
void NSRectClipList(const NSRect *rects, int count)
{}
void NS__RectFill(id self, NSRect aRect)
{
char out[80];
sprintf(out, "DPS: rect: %f %f %f %f\n", aRect.origin.x,
aRect.origin.y, aRect.size.width, aRect.size.height);
NSDebugLog([NSString stringWithCString: out]);
PSrectfill(aRect.origin.x, aRect.origin.y,
aRect.size.width, aRect.size.height);
}
void NSRectFillList(const NSRect *rects, int count)
{}
void NSRectFillListWithGrays(const NSRect *rects,
const float *grays, int count)
{}
//
// Draw a Bordered Rectangle
//
void NSDrawButton(NSRect aRect, NSRect clipRect)
{}
void NSDrawGrayBezel(NSRect aRect, NSRect clipRect)
{}
void NSDrawGroove(NSRect aRect, NSRect clipRect)
{}
NSRect NSDrawTiledRects(NSRect boundsRect, NSRect clipRect,
const NSRectEdge *sides, const float *grays,
int count)
{
return NSZeroRect;
}
void NSDrawWhiteBezel(NSRect aRect, NSRect clipRect)
{}
void NSFrameRect(NSRect aRect)
{}
void NSFrameRectWithWidth(NSRect aRect, float frameWidth)
{}
//
// Color Functions
//
//
// Get Information About Color Space and Window Depth
//
const NSWindowDepth *NSAvailableWindowDepths(void)
{
return NULL;
}
NSWindowDepth NSBestDepth(NSString *colorSpace,
int bitsPerSample, int bitsPerPixel,
BOOL planar, BOOL *exactMatch)
{
return 0;
}
int NSBitsPerPixelFromDepth(NSWindowDepth depth)
{
return 0;
}
int NSBitsPerSampleFromDepth(NSWindowDepth depth)
{
return 0;
}
NSString *NSColorSpaceFromDepth(NSWindowDepth depth)
{
return nil;
}
int NSNumberOfColorComponents(NSString *colorSpaceName)
{
return 0;
}
BOOL NSPlanarFromDepth(NSWindowDepth depth)
{
return NO;
}
//
// Read the Color at a Screen Position
//
NSColor *NSReadPixel(NSPoint location)
{
return nil;
}
//
// Text Functions
//
//
// Filter Characters Entered into a Text Object
//
unsigned short NSEditorFilter(unsigned short theChar,
int flags, NSStringEncoding theEncoding)
{
return 0;
}
unsigned short NSFieldFilter(unsigned short theChar,
int flags, NSStringEncoding theEncoding)
{
return 0;
}
//
// Calculate or Draw a Line of Text (in Text Object)
//
int NSDrawALine(id self, NSLayInfo *layInfo)
{
return 0;
}
int NSScanALine(id self, NSLayInfo *layInfo)
{
return 0;
}
//
// Calculate Font Ascender, Descender, and Line Height (in Text Object)
//
void NSTextFontInfo(id fid,
float *ascender, float *descender,
float *lineHeight)
{}
//
// Access Text Object's Word Tables
//
NSData * NSDataWithWordTable(const unsigned char *smartLeft,
const unsigned char *smartRight,
const unsigned char *charClasses,
const NSFSM *wrapBreaks,
int wrapBreaksCount,
const NSFSM *clickBreaks,
int clickBreaksCount,
BOOL charWrap)
{
return nil;
}
void NSReadWordTable(NSZone *zone,
NSData *data,
unsigned char **smartLeft,
unsigned char **smartRight,
unsigned char **charClasses,
NSFSM **wrapBreaks,
int *wrapBreaksCount,
NSFSM **clickBreaks,
int *clickBreaksCount,
BOOL *charWrap)
{}
//
// Array Allocation Functions for Use by the NSText Class
//
NSTextChunk *NSChunkCopy(NSTextChunk *pc, NSTextChunk *dpc)
{
return NULL;
}
NSTextChunk *NSChunkGrow(NSTextChunk *pc, int newUsed)
{
return NULL;
}
NSTextChunk *NSChunkMalloc(int growBy, int initUsed)
{
return NULL;
}
NSTextChunk *NSChunkRealloc(NSTextChunk *pc)
{
return NULL;
}
NSTextChunk *NSChunkZoneCopy(NSTextChunk *pc,
NSTextChunk *dpc,
NSZone *zone)
{
return NULL;
}
NSTextChunk *NSChunkZoneGrow(NSTextChunk *pc, int newUsed, NSZone *zone)
{
return NULL;
}
NSTextChunk *NSChunkZoneMalloc(int growBy, int initUsed, NSZone *zone)
{
return NULL;
}
NSTextChunk *NSChunkZoneRealloc(NSTextChunk *pc, NSZone *zone)
{
return NULL;
}
//
// Imaging Functions
//
//
// Copy an image
//
void NSCopyBitmapFromGState(int srcGstate, NSRect srcRect, NSRect destRect)
{}
void NSCopyBits(int srcGstate, NSRect srcRect, NSPoint destPoint)
{}
//
// Render Bitmap Images
//
void NSDrawBitmap(NSRect rect,
int pixelsWide,
int pixelsHigh,
int bitsPerSample,
int samplesPerPixel,
int bitsPerPixel,
int bytesPerRow,
BOOL isPlanar,
BOOL hasAlpha,
NSString *colorSpaceName,
const unsigned char *const data[5])
{}
//
// Attention Panel Functions
//
//
// Create an Attention Panel without Running It Yet
//
id NSGetAlertPanel(NSString *title,
NSString *msg,
NSString *defaultButton,
NSString *alternateButton,
NSString *otherButton, ...)
{
return nil;
}
//
// Create and Run an Attention Panel
//
int NSRunAlertPanel(NSString *title,
NSString *msg,
NSString *defaultButton,
NSString *alternateButton,
NSString *otherButton, ...)
{
return 0;
}
int NSRunLocalizedAlertPanel(NSString *table,
NSString *title,
NSString *msg,
NSString *defaultButton,
NSString *alternateButton,
NSString *otherButton, ...)
{
return 0;
}
//
// Release an Attention Panel
//
void NSReleaseAlertPanel(id panel)
{}
//
// Services Menu Functions
//
//
// Determine Whether an Item Is Included in Services Menus
//
int NSSetShowsServicesMenuItem(NSString *item, BOOL showService)
{
return 0;
}
BOOL NSShowsServicesMenuItem(NSString *item)
{
return NO;
}
//
// Programmatically Invoke a Service
//
BOOL NSPerformService(NSString *item, NSPasteboard *pboard)
{
return NO;
}
//
// Force Services Menu to Update Based on New Services
//
void NSUpdateDynamicServices(void)
{}
//
// Other Application Kit Functions
//
//
// Play the System Beep
//
void NSBeep(void)
{
#ifdef WIN32
MessageBeep(MB_OK);
#endif
}
//
// Return File-related Pasteboard Types
//
NSString *NSCreateFileContentsPboardType(NSString *fileType)
{
return nil;
}
NSString *NSCreateFilenamePboardType(NSString *filename)
{
return nil;
}
NSString *NSGetFileType(NSString *pboardType)
{
return nil;
}
NSArray *NSGetFileTypes(NSArray *pboardTypes)
{
return nil;
}
//
// Draw a Distinctive Outline around Linked Data
//
void NSFrameLinkRect(NSRect aRect, BOOL isDestination)
{}
float NSLinkFrameThickness(void)
{
return 0;
}
//
// Convert an Event Mask Type to a Mask
//
unsigned int NSEventMaskFromType(NSEventType type)
{
return 0;
}

View file

@ -42,7 +42,7 @@ includedir = $(prefix)/include
MAKEDEFINES =
CC = @CC@ -g -DHAVE_LIBTIFF
CC = @CC@ -g
CPPFLAGS = @CPPFLAGS@
CFLAGS = -c $(GCCFLAGS) -I../Headers $(CPPFLAGS)

View file

@ -869,40 +869,40 @@ NSString *NSApplicationWillUpdateNotification;
return result;
}
- (void)applicationDidBecomeActive:sender
- (void)applicationDidBecomeActive:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(applicationDidBecomeActive:)])
[delegate applicationDidBecomeActive:sender];
[delegate applicationDidBecomeActive:aNotification];
}
- (void)applicationDidFinishLaunching:sender
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(applicationDidFinishLaunching:)])
[delegate applicationDidFinishLaunching:sender];
[delegate applicationDidFinishLaunching:aNotification];
}
- (void)applicationDidHide:sender
- (void)applicationDidHide:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(applicationDidHide:)])
[delegate applicationDidHide:sender];
[delegate applicationDidHide:aNotification];
}
- (void)applicationDidResignActive:sender
- (void)applicationDidResignActive:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(applicationDidResignActive:)])
[delegate applicationDidResignActive:sender];
[delegate applicationDidResignActive:aNotification];
}
- (void)applicationDidUnhide:sender
- (void)applicationDidUnhide:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(applicationDidUnhide:)])
[delegate applicationDidUnhide:sender];
[delegate applicationDidUnhide:aNotification];
}
- (void)applicationDidUpdate:sender
- (void)applicationDidUpdate:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(applicationDidUpdate:)])
[delegate applicationDidUpdate:sender];
[delegate applicationDidUpdate:aNotification];
}
- (BOOL)applicationOpenUntitledFile:(NSApplication *)app
@ -925,40 +925,40 @@ NSString *NSApplicationWillUpdateNotification;
return result;
}
- (void)applicationWillBecomeActive:sender
- (void)applicationWillBecomeActive:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(applicationWillBecomeActive:)])
[delegate applicationWillBecomeActive:sender];
[delegate applicationWillBecomeActive:aNotification];
}
- (void)applicationWillFinishLaunching:sender
- (void)applicationWillFinishLaunching:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(applicationWillFinishLaunching:)])
[delegate applicationWillFinishLaunching:sender];
[delegate applicationWillFinishLaunching:aNotification];
}
- (void)applicationWillHide:sender
- (void)applicationWillHide:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(applicationWillHide:)])
[delegate applicationWillHide:sender];
[delegate applicationWillHide:aNotification];
}
- (void)applicationWillResignActive:sender
- (void)applicationWillResignActive:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(applicationWillResignActive:)])
[delegate applicationWillResignActive:sender];
[delegate applicationWillResignActive:aNotification];
}
- (void)applicationWillUnhide:sender
- (void)applicationWillUnhide:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(applicationWillUnhide:)])
[delegate applicationWillUnhide:sender];
[delegate applicationWillUnhide:aNotification];
}
- (void)applicationWillUpdate:sender
- (void)applicationWillUpdate:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(applicationWillUpdate:)])
[delegate applicationWillUpdate:sender];
[delegate applicationWillUpdate:aNotification];
}
//

View file

@ -202,11 +202,6 @@
//
- (void)drawRect:(NSRect)rect
{
NSColor *c = [NSColor redColor];
PSsetcolor(c);
PSrectstroke(border_rect.origin.x, border_rect.origin.y,
border_rect.size.width, border_rect.size.height);
}
//

View file

@ -29,58 +29,32 @@
*/
#include <gnustep/gui/NSColor.h>
#include <gnustep/gui/NSColorPrivate.h>
#include <gnustep/gui/NSView.h>
// Class variables
BOOL gnustep_gui_ignores_alpha;
// Global strings
NSString *NSCalibratedWhiteColorSpace;
NSString *NSCalibratedBlackColorSpace;
NSString *NSCalibratedRGBColorSpace;
NSString *NSDeviceWhiteColorSpace;
NSString *NSDeviceBlackColorSpace;
NSString *NSDeviceRGBColorSpace;
NSString *NSDeviceCMYKColorSpace;
NSString *NSNamedColorSpace;
NSString *NSCustomColorSpace;
NSString *NSCalibratedWhiteColorSpace = @"NSCalibratedWhiteColorSpace";
NSString *NSCalibratedBlackColorSpace = @"NSCalibratedBlackColorSpace";
NSString *NSCalibratedRGBColorSpace = @"NSCalibratedRGBColorSpace";
NSString *NSDeviceWhiteColorSpace = @"NSDeviceWhiteColorSpace";
NSString *NSDeviceBlackColorSpace = @"NSDeviceBlackColorSpace";
NSString *NSDeviceRGBColorSpace = @"NSDeviceRGBColorSpace";
NSString *NSDeviceCMYKColorSpace = @"NSDeviceCMYKColorSpace";
NSString *NSNamedColorSpace = @"NSNamedColorSpace";
NSString *NSCustomColorSpace = @"NSCustomColorSpace";
// Global gray values
const float NSBlack = 0;
const float NSDarkGray = .502;
const float NSDarkGray = .333;
const float NSGray = 0.5;
const float NSLightGray = .667;
const float NSWhite = 1;
const float NSLightGray = .753;
@implementation NSColor
////////////////////////////////////////////////////////////
//
// Internal methods
//
- (void)setRed:(float)value
{
if (value < 0) value = 0;
if (value > 1) value = 1;
RGB_component.red = value;
}
- (void)setGreen:(float)value
{
if (value < 0) value = 0;
if (value > 1) value = 1;
RGB_component.green = value;
}
- (void)setBlue:(float)value
{
if (value < 0) value = 0;
if (value > 1) value = 1;
RGB_component.blue = value;
}
- (void)setClear:(BOOL)flag
{
is_clear = flag;
}
////////////////////////////////////////////////////////////
//
// Class methods
//
@ -88,8 +62,11 @@ const float NSLightGray = .753;
{
if (self == [NSColor class])
{
// Initial version
[self setVersion:1];
// Set the version number
[self setVersion:2];
// ignore alpha by default
gnustep_gui_ignores_alpha = YES;
}
}
@ -101,7 +78,17 @@ const float NSLightGray = .753;
brightness:(float)brightness
alpha:(float)alpha
{
return nil;
NSColor *c;
c = [[[NSColor alloc] init] autorelease];
[c setColorSpaceName: NSCalibratedRGBColorSpace];
[c setActiveComponent: GNUSTEP_GUI_HSB_ACTIVE];
[c setHue: hue];
[c setSaturation: saturation];
[c setBrightness: brightness];
[c setAlpha: alpha];
return c;
}
+ (NSColor *)colorWithCalibratedRed:(float)red
@ -112,17 +99,28 @@ const float NSLightGray = .753;
NSColor *c;
c = [[[NSColor alloc] init] autorelease];
[c setRed:red];
[c setGreen:green];
[c setBlue:blue];
[c setClear:NO];
[c setColorSpaceName: NSCalibratedRGBColorSpace];
[c setActiveComponent: GNUSTEP_GUI_RGB_ACTIVE];
[c setRed: red];
[c setGreen: green];
[c setBlue: blue];
[c setAlpha: alpha];
return c;
}
+ (NSColor *)colorWithCalibratedWhite:(float)white
alpha:(float)alpha
{
return nil;
NSColor *c;
c = [[[NSColor alloc] init] autorelease];
[c setColorSpaceName: NSCalibratedWhiteColorSpace];
[c setActiveComponent: GNUSTEP_GUI_WHITE_ACTIVE];
[c setWhite: white];
[c setAlpha: alpha];
return c;
}
+ (NSColor *)colorWithCatalogName:(NSString *)listName
@ -137,7 +135,18 @@ const float NSLightGray = .753;
black:(float)black
alpha:(float)alpha
{
return nil;
NSColor *c;
c = [[[NSColor alloc] init] autorelease];
[c setColorSpaceName: NSDeviceCMYKColorSpace];
[c setActiveComponent: GNUSTEP_GUI_CMYK_ACTIVE];
[c setCyan: cyan];
[c setMagenta: magenta];
[c setYellow: yellow];
[c setBlack: black];
[c setAlpha: alpha];
return c;
}
+ (NSColor *)colorWithDeviceHue:(float)hue
@ -145,7 +154,17 @@ const float NSLightGray = .753;
brightness:(float)brightness
alpha:(float)alpha
{
return nil;
NSColor *c;
c = [[[NSColor alloc] init] autorelease];
[c setColorSpaceName: NSDeviceRGBColorSpace];
[c setActiveComponent: GNUSTEP_GUI_HSB_ACTIVE];
[c setHue: hue];
[c setSaturation: saturation];
[c setBrightness: brightness];
[c setAlpha: alpha];
return c;
}
+ (NSColor *)colorWithDeviceRed:(float)red
@ -153,13 +172,31 @@ const float NSLightGray = .753;
blue:(float)blue
alpha:(float)alpha
{
return self;
NSColor *c;
c = [[[NSColor alloc] init] autorelease];
[c setColorSpaceName: NSDeviceRGBColorSpace];
[c setActiveComponent: GNUSTEP_GUI_RGB_ACTIVE];
[c setRed: red];
[c setGreen: green];
[c setBlue: blue];
[c setAlpha: alpha];
return c;
}
+ (NSColor *)colorWithDeviceWhite:(float)white
alpha:(float)alpha
{
return nil;
NSColor *c;
c = [[[NSColor alloc] init] autorelease];
[c setColorSpaceName: NSDeviceWhiteColorSpace];
[c setActiveComponent: GNUSTEP_GUI_WHITE_ACTIVE];
[c setWhite: white];
[c setAlpha: alpha];
return c;
}
//
@ -167,10 +204,7 @@ const float NSLightGray = .753;
//
+ (NSColor *)blackColor
{
return [self colorWithCalibratedRed:0
green:0
blue:0
alpha:1];
return [self colorWithCalibratedWhite: NSBlack alpha: 1.0];
}
+ (NSColor *)blueColor
@ -178,7 +212,7 @@ const float NSLightGray = .753;
return [self colorWithCalibratedRed:0
green:0
blue:1.0
alpha:1];
alpha:1.0];
}
+ (NSColor *)brownColor
@ -186,7 +220,7 @@ const float NSLightGray = .753;
return [self colorWithCalibratedRed:0.6
green:0.4
blue:0.2
alpha:1];
alpha:1.0];
}
+ (NSColor *)clearColor
@ -195,33 +229,35 @@ const float NSLightGray = .753;
c = [self colorWithCalibratedRed:0
green:1.0
blue:1.0
alpha:1];
alpha:1.0];
[c setClear:YES];
return c;
}
+ (NSColor *)cyanColor
{
// Why does OpenStep say RGB color space instead of CMYK?
return [self colorWithCalibratedRed:0
green:1.0
blue:1.0
alpha:1];
alpha:1.0];
#if 0
return [self colorWithCalibratedCyan: 1.0
magenta:0
yellow:0
black:0
alpha:1.0];
#endif
}
+ (NSColor *)darkGrayColor
{
return [self colorWithCalibratedRed:0.502
green:0.502
blue:0.502
alpha:1];
return [self colorWithCalibratedWhite: NSDarkGray alpha: 1.0];
}
+ (NSColor *)grayColor
{
return [self colorWithCalibratedRed:0.753
green:0.753
blue:0.753
alpha:1];
return [self colorWithCalibratedWhite: NSGray alpha: 1.0];
}
+ (NSColor *)greenColor
@ -229,23 +265,28 @@ const float NSLightGray = .753;
return [self colorWithCalibratedRed:0
green:1.0
blue:0
alpha:1];
alpha:1.0];
}
+ (NSColor *)lightGrayColor
{
return [self colorWithCalibratedRed:0.9
green:0.9
blue:0.9
alpha:1];
return [self colorWithCalibratedWhite: NSLightGray alpha: 1];
}
+ (NSColor *)magentaColor
{
// Why does OpenStep say RGB color space instead of CMYK?
return [self colorWithCalibratedRed:1.0
green:0
blue:1.0
alpha:1];
alpha:1.0];
#if 0
return [self colorWithCalibratedCyan:0
magenta:1.0
yellow:0
black:0
alpha:1.0];
#endif
}
+ (NSColor *)orangeColor;
@ -253,7 +294,7 @@ const float NSLightGray = .753;
return [self colorWithCalibratedRed:1.0
green:0.5
blue:0
alpha:1];
alpha:1.0];
}
+ (NSColor *)purpleColor;
@ -261,7 +302,7 @@ const float NSLightGray = .753;
return [self colorWithCalibratedRed:0.5
green:0
blue:0.5
alpha:1];
alpha:1.0];
}
+ (NSColor *)redColor;
@ -269,23 +310,28 @@ const float NSLightGray = .753;
return [self colorWithCalibratedRed:1.0
green:0
blue:0
alpha:1];
alpha:1.0];
}
+ (NSColor *)whiteColor;
{
return [self colorWithCalibratedRed:1.0
green:1.0
blue:1.0
alpha:1];
return [self colorWithCalibratedWhite: NSWhite alpha: 1.0];
}
+ (NSColor *)yellowColor
{
// Why does OpenStep say RGB color space instead of CMYK?
return [self colorWithCalibratedRed:1.0
green:1.0
blue:0
alpha:1.0];
#if 0
return [self colorWithCalibratedCyan:0
magenta:0
yellow:1.0
black:0
alpha:1];
#endif
}
//
@ -293,11 +339,13 @@ const float NSLightGray = .753;
//
+ (BOOL)ignoresAlpha
{
return YES;
return gnustep_gui_ignores_alpha;
}
+ (void)setIgnoresAlpha:(BOOL)flag
{}
{
gnustep_gui_ignores_alpha = flag;
}
//
// Copying and Pasting
@ -311,6 +359,16 @@ const float NSLightGray = .753;
//
// Instance methods
//
- init
{
[super init];
colorspace_name = @"";
catalog_name = @"";
color_name = @"";
return self;
}
//
// Retrieving a Set of Components
//
@ -319,23 +377,65 @@ const float NSLightGray = .753;
yellow:(float *)yellow
black:(float *)black
alpha:(float *)alpha
{}
{
// Only set what is wanted
// If not a CMYK color then you get bogus values
if (cyan)
*cyan = CMYK_component.cyan;
if (magenta)
*magenta = CMYK_component.magenta;
if (yellow)
*yellow = CMYK_component.yellow;
if (black)
*black = CMYK_component.black;
if (alpha)
*alpha = alpha_component;
}
- (void)getHue:(float *)hue
saturation:(float *)saturation
brightness:(float *)brightness
alpha:(float *)alpha
{}
{
// Only set what is wanted
// If not an HSB color then you get bogus values
if (hue)
*hue = HSB_component.hue;
if (saturation)
*saturation = HSB_component.saturation;
if (brightness)
*brightness = HSB_component.brightness;
if (alpha)
*alpha = alpha_component;
}
- (void)getRed:(float *)red
green:(float *)green
blue:(float *)blue
alpha:(float *)alpha
{}
{
// Only set what is wanted
// If not an RGB color then you get bogus values
if (red)
*red = RGB_component.red;
if (green)
*green = RGB_component.green;
if (blue)
*blue = RGB_component.blue;
if (alpha)
*alpha = alpha_component;
}
- (void)getWhite:(float *)white
alpha:(float *)alpha
{}
{
// Only set what is wanted
// If not a grayscale color then you get bogus values
if (white)
*white = white_component;
if (alpha)
*alpha = alpha_component;
}
//
// Retrieving Individual Components
@ -347,7 +447,7 @@ const float NSLightGray = .753;
- (float)blackComponent
{
return 0;
return CMYK_component.black;
}
- (float)blueComponent
@ -357,22 +457,22 @@ const float NSLightGray = .753;
- (float)brightnessComponent
{
return 0;
return HSB_component.brightness;
}
- (NSString *)catalogNameComponent
{
return nil;
return catalog_name;
}
- (NSString *)colorNameComponent
{
return nil;
return color_name;
}
- (float)cyanComponent
{
return 0;
return CMYK_component.cyan;
}
- (float)greenComponent
@ -382,22 +482,24 @@ const float NSLightGray = .753;
- (float)hueComponent
{
return 0;
return HSB_component.hue;
}
- (NSString *)localizedCatalogNameComponent
{
return nil;
// +++ how do we localize?
return catalog_name;
}
- (NSString *)localizedColorNameComponent
{
return nil;
// +++ how do we localize?
return color_name;
}
- (float)magentaComponent
{
return 0;
return CMYK_component.magenta;
}
- (float)redComponent
@ -407,17 +509,17 @@ const float NSLightGray = .753;
- (float)saturationComponent
{
return 0;
return HSB_component.saturation;
}
- (float)whiteComponent
{
return 0;
return white_component;
}
- (float)yellowComponent
{
return 0;
return CMYK_component.yellow;
}
//
@ -425,7 +527,7 @@ const float NSLightGray = .753;
//
- (NSString *)colorSpaceName
{
return nil;
return colorspace_name;
}
- (NSColor *)colorUsingColorSpaceName:(NSString *)colorSpace
@ -484,24 +586,181 @@ const float NSLightGray = .753;
{
[super encodeWithCoder:aCoder];
// Version 1
[aCoder encodeValueOfObjCType: "f" at: &RGB_component.red];
[aCoder encodeValueOfObjCType: "f" at: &RGB_component.green];
[aCoder encodeValueOfObjCType: "f" at: &RGB_component.blue];
[aCoder encodeValueOfObjCType: "f" at: &alpha_component];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_clear];
// Version 2
[aCoder encodeObject: colorspace_name];
[aCoder encodeObject: catalog_name];
[aCoder encodeObject: color_name];
[aCoder encodeValueOfObjCType: "f" at: &CMYK_component.cyan];
[aCoder encodeValueOfObjCType: "f" at: &CMYK_component.magenta];
[aCoder encodeValueOfObjCType: "f" at: &CMYK_component.yellow];
[aCoder encodeValueOfObjCType: "f" at: &CMYK_component.black];
[aCoder encodeValueOfObjCType: "f" at: &HSB_component.hue];
[aCoder encodeValueOfObjCType: "f" at: &HSB_component.saturation];
[aCoder encodeValueOfObjCType: "f" at: &HSB_component.brightness];
[aCoder encodeValueOfObjCType: "f" at: &white_component];
[aCoder encodeValueOfObjCType: "i" at: &active_component];
}
- initWithCoder:aDecoder
{
NSString *s;
[super initWithCoder:aDecoder];
// Version 1
[aDecoder decodeValueOfObjCType: "f" at: &RGB_component.red];
[aDecoder decodeValueOfObjCType: "f" at: &RGB_component.green];
[aDecoder decodeValueOfObjCType: "f" at: &RGB_component.blue];
[aDecoder decodeValueOfObjCType: "f" at: &alpha_component];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_clear];
// Get our class name
s = [NSString stringWithCString: object_get_class_name(self)];
// Version 2
if ([aDecoder versionForClassName: s] > 1)
{
colorspace_name = [aDecoder decodeObject];
catalog_name = [aDecoder decodeObject];
color_name = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: "f" at: &CMYK_component.cyan];
[aDecoder decodeValueOfObjCType: "f" at: &CMYK_component.magenta];
[aDecoder decodeValueOfObjCType: "f" at: &CMYK_component.yellow];
[aDecoder decodeValueOfObjCType: "f" at: &CMYK_component.black];
[aDecoder decodeValueOfObjCType: "f" at: &HSB_component.hue];
[aDecoder decodeValueOfObjCType: "f" at: &HSB_component.saturation];
[aDecoder decodeValueOfObjCType: "f" at: &HSB_component.brightness];
[aDecoder decodeValueOfObjCType: "f" at: &white_component];
[aDecoder decodeValueOfObjCType: "i" at: &active_component];
}
return self;
}
@end
//
// Private methods
//
@implementation NSColor (GNUstepPrivate)
- (void)setColorSpaceName:(NSString *)str
{
colorspace_name = str;
}
- (void)setCatalogName:(NSString *)str
{
catalog_name = str;
}
- (void)setColorName:(NSString *)str
{
color_name = str;
}
// RGB component values
- (void)setRed:(float)value
{
if (value < 0) value = 0;
if (value > 1) value = 1;
RGB_component.red = value;
}
- (void)setGreen:(float)value
{
if (value < 0) value = 0;
if (value > 1) value = 1;
RGB_component.green = value;
}
- (void)setBlue:(float)value
{
if (value < 0) value = 0;
if (value > 1) value = 1;
RGB_component.blue = value;
}
// CMYK component values
- (void)setCyan:(float)value
{
if (value < 0) value = 0;
if (value > 1) value = 1;
CMYK_component.cyan = value;
}
- (void)setMagenta:(float)value
{
if (value < 0) value = 0;
if (value > 1) value = 1;
CMYK_component.magenta = value;
}
- (void)setYellow:(float)value
{
if (value < 0) value = 0;
if (value > 1) value = 1;
CMYK_component.yellow = value;
}
- (void)setBlack:(float)value
{
if (value < 0) value = 0;
if (value > 1) value = 1;
CMYK_component.black = value;
}
// HSB component values
- (void)setHue:(float)value
{
if (value < 0) value = 0;
if (value > 1) value = 1;
HSB_component.hue = value;
}
- (void)setSaturation:(float)value
{
if (value < 0) value = 0;
if (value > 1) value = 1;
HSB_component.saturation = value;
}
- (void)setBrightness:(float)value
{
if (value < 0) value = 0;
if (value > 1) value = 1;
HSB_component.brightness = value;
}
// Grayscale
- (void)setWhite:(float)value
{
if (value < 0) value = 0;
if (value > 1) value = 1;
white_component = value;
}
- (void)setAlpha:(float)value
{
if (value < 0) value = 0;
if (value > 1) value = 1;
alpha_component = value;
}
- (void)setActiveComponent:(int)value
{
active_component = value;
}
- (void)setClear:(BOOL)flag
{
is_clear = flag;
}
@end

View file

@ -88,8 +88,8 @@ BOOL GNU_CONTEXT_SYNCHRONIZED;
return [self initWithMutableData: data
forDebugging: NO
languageEncoding: NULL
nameEncoding: NULL
languageEncoding: dps_ascii
nameEncoding: dps_strings
textProc: NULL
errorProc: NULL];
}

View file

@ -30,28 +30,30 @@
#include <gnustep/gui/NSFont.h>
#include <gnustep/gui/NSFontManager.h>
#include <gnustep/gui/NSFontPrivate.h>
NSFont *gnustep_gui_user_fixed_font;
NSFont *gnustep_gui_user_font;
NSString *gnustep_gui_system_family = @"";
// Global Strings
NSString *NSAFMAscender;
NSString *NSAFMCapHeight;
NSString *NSAFMCharacterSet;
NSString *NSAFMDescender;
NSString *NSAFMEncodingScheme;
NSString *NSAFMFamilyName;
NSString *NSAFMFontName;
NSString *NSAFMFormatVersion;
NSString *NSAFMFullName;
NSString *NSAFMItalicAngle;
NSString *NSAFMMappingScheme;
NSString *NSAFMNotice;
NSString *NSAFMUnderlinePosition;
NSString *NSAFMUnderlineThickness;
NSString *NSAFMVersion;
NSString *NSAFMWeight;
NSString *NSAFMXHeight;
NSString *NSAFMAscender = @"AFMAscender";
NSString *NSAFMCapHeight = @"AFMCapHeight";
NSString *NSAFMCharacterSet = @"AFMCharacterSet";
NSString *NSAFMDescender = @"AFMDescender";
NSString *NSAFMEncodingScheme = @"AFMEncodingScheme";
NSString *NSAFMFamilyName = @"AFMFamilyName";
NSString *NSAFMFontName = @"AFMFontName";
NSString *NSAFMFormatVersion = @"AFMFormatVersion";
NSString *NSAFMFullName = @"AFMFullName";
NSString *NSAFMItalicAngle = @"AFMItalicAngle";
NSString *NSAFMMappingScheme = @"AFMMappingScheme";
NSString *NSAFMNotice = @"AFMNotice";
NSString *NSAFMUnderlinePosition = @"AFMUnderlinePosition";
NSString *NSAFMUnderlineThickness = @"AFMUnderlineThickness";
NSString *NSAFMVersion = @"AFMVersion";
NSString *NSAFMWeight = @"AFMWeight";
NSString *NSAFMXHeight = @"AFMXHeight";
@implementation NSFont
@ -77,7 +79,7 @@ NSString *NSAFMXHeight;
NSFontManager *fm = [NSFontManager sharedFontManager];
NSFont *f;
f = [fm fontWithFamily:@"Times New Roman" traits:NSBoldFontMask
f = [fm fontWithFamily:gnustep_gui_system_family traits:NSBoldFontMask
weight:0 size:fontSize];
return f;
}
@ -94,7 +96,8 @@ NSString *NSAFMXHeight;
NSFontManager *fm = [NSFontManager sharedFontManager];
NSFont *f;
f = [fm fontWithFamily:fontName traits:0 weight:0 size:fontSize];
// +++ We need to extract the family name from the font name
f = [fm fontWithFamily:fontName traits:0 weight:400 size:fontSize];
return f;
}
@ -103,7 +106,8 @@ NSString *NSAFMXHeight;
NSFontManager *fm = [NSFontManager sharedFontManager];
NSFont *f;
f = [fm fontWithFamily:@"Times New Roman" traits:0 weight:0 size:fontSize];
f = [fm fontWithFamily:gnustep_gui_system_family traits:0
weight:400 size:fontSize];
return f;
}
@ -138,6 +142,17 @@ NSString *NSAFMXHeight;
//
// Instance methods
//
- init
{
[super init];
family_name = @"";
font_name = @"";
type_face = @"";
return self;
}
- (void)dealloc
{
[super dealloc];
@ -178,11 +193,6 @@ NSString *NSAFMXHeight;
return family_name;
}
- (void)setFamilyName:(NSString *)familyName
{
family_name = familyName;
}
- (NSString *)fontName
{
return font_name;
@ -203,43 +213,25 @@ NSString *NSAFMXHeight;
return point_size;
}
- (void)setPointSize:(float)value
{
point_size = value;
}
- (NSFont *)printerFont
{
return nil;
return self;
}
- (NSFont *)screenFont
{
return nil;
return self;
}
- (float)widthOfString:(NSString *)string
{
/* bogus estimate */
if (string)
return (8.0 * (float)[string length]);
else
return 0;
return 0;
}
- (float *)widths
{
return NULL;
}
- (NSFontTraitMask)traits
{
return font_traits;
}
- (void)setTraits:(NSFontTraitMask)traits
{
font_traits = traits;
}
//
// Manipulating Glyphs
@ -292,3 +284,100 @@ NSString *NSAFMXHeight;
}
@end
@implementation NSFont (GNUstepPrivate)
- (void)setFamilyName:(NSString *)familyName
{
NSMutableString *s = [NSMutableString stringWithCString: ""];
// New family name so new font name
// Format is family name, dash, typeface
family_name = familyName;
[s appendString: family_name];
if ([type_face compare: @""] != NSOrderedSame)
{
[s appendString: @"-"];
[s appendString: type_face];
}
font_name = s;
}
- (void)setFontName:(NSString *)fontName
{
font_name = fontName;
}
- (void)setPointSize:(float)value
{
point_size = value;
}
- (NSFontTraitMask)traits
{
return font_traits;
}
- (void)setTraits:(NSFontTraitMask)traits
{
// Only if the traits have changed
if (font_traits != traits)
{
// Figure out a new typeface
NSMutableString *s = [NSMutableString stringWithCString: ""];
// Bold
if (traits & NSBoldFontMask)
[s appendString: @"Bold"];
// +++ How do we determine whether to use Italic or Oblique?
if (traits & NSItalicFontMask)
[s appendString: @"Italic"];
[self setTypeface: s];
}
font_traits = traits;
}
- (int)weight
{
return font_weight;
}
- (void)setWeight:(int)value
{
NSFontTraitMask t = font_traits;
font_weight = value;
// Make the font bold or unbold based upon the weight
if (font_weight <= 400)
t = t ^ NSUnboldFontMask;
else
t = t ^ NSBoldFontMask;
[self setTraits:t];
}
- (NSString *)typeface
{
return type_face;
}
- (void)setTypeface:(NSString *)str
{
NSMutableString *s = [NSMutableString stringWithCString: ""];
// New typeface so new font name
// Format is family name, dash, typeface
type_face = str;
[s appendString: family_name];
if ([type_face compare: @""] != NSOrderedSame)
{
[s appendString: @"-"];
[s appendString: type_face];
}
font_name = s;
}
@end

View file

@ -30,6 +30,7 @@
#include <gnustep/gui/NSFontManager.h>
#include <gnustep/gui/NSApplication.h>
#include <gnustep/gui/NSFontPrivate.h>
//
// Class variables
@ -133,6 +134,7 @@ id MB_THE_FONT_PANEL_FACTORY;
- (NSFont *)convertFont:(NSFont *)fontObject
toFace:(NSString *)typeface
{
// +++ How to do this conversion?
return fontObject;
}
@ -196,19 +198,41 @@ id MB_THE_FONT_PANEL_FACTORY;
- (NSFont *)convertWeight:(BOOL)upFlag
ofFont:(NSFont *)fontObject
{
return fontObject;
int w = [fontObject weight];
NSFont *f = [fontObject mutableCopy];
// Weight are sort of arbitrary, so we will use
// 0 - light, 400 - normal, 700 - bold
if (upFlag)
{
if (w == 0)
w = 400;
else if (w == 400)
w = 700;
}
else
{
if (w == 700)
w = 400;
else if (w == 400)
w = 0;
}
[f setWeight: w];
return f;
}
- (NSFont *)fontWithFamily:(NSString *)family
traits:(NSFontTraitMask)traits
weight:(int)weight
size:(float)size
weight:(int)weight
size:(float)size
{
int i, j;
BOOL found = NO;
NSString *name;
NSFont *f;
// Make sure it is a legitimate family name
j = [family_list count];
for (i = 0;i < j; ++i)
{
@ -220,12 +244,14 @@ weight:(int)weight
}
}
// Create the font
if (found)
{
f = [[NSFont alloc] init];
[f setFamilyName:family];
[f setTraits:traits];
[f setPointSize:size];
[f setFamilyName: family];
[f setTraits: traits];
[f setWeight: weight];
[f setPointSize: size];
return f;
}
else
@ -296,11 +322,12 @@ weight:(int)weight
- (NSFontTraitMask)traitsOfFont:(NSFont *)fontObject
{
return 0;
return [fontObject traits];
}
- (int)weightOfFont:(NSFont *)fontObject
{
return [fontObject weight];
}
//

View file

@ -29,9 +29,12 @@
*/
#include <gnustep/gui/NSMenu.h>
#include <gnustep/gui/NSMenuPrivate.h>
#include <Foundation/NSLock.h>
#include <gnustep/base/NSCoder.h>
NSZone *gnustep_gui_nsmenu_zone = NULL;
@implementation NSMenu
//
@ -51,11 +54,13 @@
//
+ (NSZone *)menuZone
{
return NULL;
return gnustep_gui_nsmenu_zone;
}
+ (void)setMenuZone:(NSZone *)zone
{}
{
gnustep_gui_nsmenu_zone = zone;
}
//
// Instance methods
@ -68,10 +73,19 @@
return [self initWithTitle:@""];
}
// Default initializer
- (id)initWithTitle:(NSString *)aTitle
{
// Init our superclass but skip any of its backend implementation
[super cleanInit];
window_title = aTitle;
menu_items = [NSMutableArray array];
super_menu = nil;
autoenables_items = NO;
menu_matrix = nil;
is_torn_off = NO;
return self;
}
@ -80,7 +94,7 @@
//
- (id)addItemWithTitle:(NSString *)aString
action:(SEL)aSelector
keyEquivalent:(NSString *)charCode
keyEquivalent:(NSString *)charCode
{
NSMenuCell *m;
unsigned int mi;
@ -94,8 +108,8 @@ keyEquivalent:(NSString *)charCode
- (id)insertItemWithTitle:(NSString *)aString
action:(SEL)aSelector
keyEquivalent:(NSString *)charCode
atIndex:(unsigned int)index
keyEquivalent:(NSString *)charCode
atIndex:(unsigned int)index
{
NSMenuCell *m;
unsigned int mi;
@ -114,11 +128,13 @@ keyEquivalent:(NSString *)charCode
- (NSMatrix *)itemMatrix
{
return nil;
return menu_matrix;
}
- (void)setItemMatrix:(NSMatrix *)aMatrix
{}
{
menu_matrix = aMatrix;
}
//
// Finding Menu Items
@ -128,6 +144,7 @@ keyEquivalent:(NSString *)charCode
int i, j;
NSMenuCell *m, *found;
// Recursively find the menu cell with the tag
found = nil;
j = [menu_items count];
for (i = 0;i < j; ++i)
@ -159,6 +176,9 @@ keyEquivalent:(NSString *)charCode
// Set the menucell's submenu
[m setSubmenu:aMenu];
// Tell the submenu we are its supermenu
[aMenu setSupermenu: self];
// Return the menucell
return m;
}
@ -174,17 +194,17 @@ keyEquivalent:(NSString *)charCode
//
- (NSMenu *)attachedMenu
{
return nil;
return self;
}
- (BOOL)isAttached
{
return NO;
return !is_torn_off;
}
- (BOOL)isTornOff
{
return NO;
return is_torn_off;
}
- (NSPoint)locationForSubmenu:(NSMenu *)aSubmenu
@ -197,7 +217,7 @@ keyEquivalent:(NSString *)charCode
- (NSMenu *)supermenu
{
return nil;
return super_menu;
}
//
@ -205,11 +225,13 @@ keyEquivalent:(NSString *)charCode
//
- (BOOL)autoenablesItems
{
return NO;
return autoenables_items;
}
- (void)setAutoenablesItems:(BOOL)flag
{}
{
autoenables_items = flag;
}
//
// NSCoding protocol
@ -231,3 +253,12 @@ keyEquivalent:(NSString *)charCode
}
@end
@implementation NSMenu (GNUstepPrivate)
- (void)setSupermenu:(NSMenu *)obj
{
super_menu = obj;
}
@end

View file

@ -740,11 +740,6 @@ NSString *NSViewFocusChangedNotification;
- (void)drawRect:(NSRect)rect
{
NSColor *col;
col = [window backgroundColor];
PSsetcolor(col);
NSRectFill(rect);
}
- (NSRect)visibleRect
@ -930,8 +925,8 @@ NSString *NSViewFocusChangedNotification;
- (NSTrackingRectTag)addTrackingRect:(NSRect)aRect
owner:(id)anObject
userData:(void *)data
assumeInside:(BOOL)flag
userData:(void *)data
assumeInside:(BOOL)flag
{
NSTrackingRectTag t;
int i, j;
@ -964,19 +959,19 @@ userData:(void *)data
//
- (BOOL)dragFile:(NSString *)filename
fromRect:(NSRect)rect
slideBack:(BOOL)slideFlag
event:(NSEvent *)event
slideBack:(BOOL)slideFlag
event:(NSEvent *)event
{
return NO;
}
- (void)dragImage:(NSImage *)anImage
at:(NSPoint)viewLocation
offset:(NSSize)initialOffset
event:(NSEvent *)event
pasteboard:(NSPasteboard *)pboard
source:(id)sourceObject
slideBack:(BOOL)slideFlag
offset:(NSSize)initialOffset
event:(NSEvent *)event
pasteboard:(NSPasteboard *)pboard
source:(id)sourceObject
slideBack:(BOOL)slideFlag
{}
- (void)registerForDraggedTypes:(NSArray *)newTypes
@ -1008,14 +1003,14 @@ slideBack:(BOOL)slideFlag
//
- (void)adjustPageHeightNew:(float *)newBottom
top:(float)oldTop
bottom:(float)oldBottom
limit:(float)bottomLimit
bottom:(float)oldBottom
limit:(float)bottomLimit
{}
- (void)adjustPageWidthNew:(float *)newRight
left:(float)oldLeft
right:(float)oldRight
limit:(float)rightLimit
right:(float)oldRight
limit:(float)rightLimit
{}
- (float)heightAdjustLimit
@ -1052,7 +1047,7 @@ right:(float)oldRight
- (void)beginPage:(int)ordinalNum
label:(NSString *)aString
bBox:(NSRect)pageRect
bBox:(NSRect)pageRect
fonts:(NSString *)fontNames
{}
@ -1062,11 +1057,11 @@ bBox:(NSRect)pageRect
- (void)beginPrologueBBox:(NSRect)boundingBox
creationDate:(NSString *)dateCreated
createdBy:(NSString *)anApplication
fonts:(NSString *)fontNames
forWhom:(NSString *)user
pages:(int)numPages
title:(NSString *)aTitle
createdBy:(NSString *)anApplication
fonts:(NSString *)fontNames
forWhom:(NSString *)user
pages:(int)numPages
title:(NSString *)aTitle
{}
- (void)beginSetup

View file

@ -1166,88 +1166,88 @@ NSString *NSWindowWillMoveNotification;
return nil;
}
- (void)windowDidBecomeKey:sender
- (void)windowDidBecomeKey:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(windowDidBecomeKey:)])
return [delegate windowDidBecomeKey:sender];
return [delegate windowDidBecomeKey:aNotification];
}
- (void)windowDidBecomeMain:sender
- (void)windowDidBecomeMain:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(windowDidBecomeMain:)])
return [delegate windowDidBecomeMain:sender];
return [delegate windowDidBecomeMain:aNotification];
}
- (void)windowDidChangeScreen:sender
- (void)windowDidChangeScreen:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(windowDidChangeScreen:)])
return [delegate windowDidChangeScreen:sender];
return [delegate windowDidChangeScreen:aNotification];
}
- (void)windowDidDeminiaturize:sender
- (void)windowDidDeminiaturize:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(windowDidDeminiaturize:)])
return [delegate windowDidDeminiaturize:sender];
return [delegate windowDidDeminiaturize:aNotification];
}
- (void)windowDidExpose:sender
- (void)windowDidExpose:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(windowDidExpose:)])
return [delegate windowDidExpose:sender];
return [delegate windowDidExpose:aNotification];
}
- (void)windowDidMiniaturize:sender
- (void)windowDidMiniaturize:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(windowDidMiniaturize:)])
return [delegate windowDidMiniaturize:sender];
return [delegate windowDidMiniaturize:aNotification];
}
- (void)windowDidMove:sender
- (void)windowDidMove:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(windowDidMove:)])
return [delegate windowDidMove:sender];
return [delegate windowDidMove:aNotification];
}
- (void)windowDidResignKey:sender
- (void)windowDidResignKey:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(windowDidResignKey:)])
return [delegate windowDidResignKey:sender];
return [delegate windowDidResignKey:aNotification];
}
- (void)windowDidResignMain:sender
- (void)windowDidResignMain:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(windowDidResignMain:)])
return [delegate windowDidResignMain:sender];
return [delegate windowDidResignMain:aNotification];
}
- (void)windowDidResize:sender
- (void)windowDidResize:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(windowDidResize:)])
return [delegate windowDidResize:sender];
return [delegate windowDidResize:aNotification];
}
- (void)windowDidUpdate:sender
- (void)windowDidUpdate:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(windowDidUpdate:)])
return [delegate windowDidUpdate:sender];
return [delegate windowDidUpdate:aNotification];
}
- (void)windowWillClose:sender
- (void)windowWillClose:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(windowWillClose:)])
return [delegate windowWillClose:sender];
return [delegate windowWillClose:aNotification];
}
- (void)windowWillMiniaturize:sender
- (void)windowWillMiniaturize:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(windowWillMiniaturize:)])
return [delegate windowWillMiniaturize:sender];
return [delegate windowWillMiniaturize:aNotification];
}
- (void)windowWillMove:sender
- (void)windowWillMove:(NSNotification *)aNotification
{
if ([delegate respondsTo:@selector(windowWillMove:)])
return [delegate windowWillMove:sender];
return [delegate windowWillMove:aNotification];
}
//
@ -1336,4 +1336,12 @@ NSString *NSWindowWillMoveNotification;
// Do nothing, should be overridden by back-end
}
// Allow subclasses to init without the backend class
// attempting to create an actual window
- cleanInit
{
[super init];
return self;
}
@end

View file

@ -53,7 +53,6 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h> /* for L_SET, etc definitions */
#include <gnustep/base/objc-malloc.h>
#include <AppKit/nsimage-tiff.h>
typedef struct {

View file

@ -3,6 +3,10 @@
# The gcc version required to compile the library.
GNUSTEP_GUI_GCC_VERSION = 2.7.0
# Versions for libraries that gnustep-gui is dependent upon
GNUSTEP_GUI_LIBTIFF = 3.4
GNUSTEP_GUI_DPSCLIENT = 6.1
# The version number of this release.
GNUSTEP_GUI_MAJOR_VERSION = 0
GNUSTEP_GUI_MINOR_VERSION = 1

373
configure vendored
View file

@ -1,8 +1,8 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.4
# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
# Generated automatically using autoconf version 2.10
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
@ -33,9 +33,22 @@ target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
ac_prev=
for ac_option
@ -57,9 +70,14 @@ do
case "$ac_option" in
-build | --build | --buil | --bui | --bu | --b)
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bindir="$ac_optarg" ;;
-build | --build | --buil | --bui | --bu)
ac_prev=build ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
build="$ac_optarg" ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
@ -69,6 +87,12 @@ do
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
cache_file="$ac_optarg" ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
datadir="$ac_optarg" ;;
-disable-* | --disable-*)
ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
# Reject names that are not valid shell variable names.
@ -119,12 +143,29 @@ Configuration:
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
[$ac_default_prefix]
--exec-prefix=PREFIX install architecture-dependent files in PREFIX
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[same as prefix]
--bindir=DIR user executables in DIR [EPREFIX/bin]
--sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
--libexecdir=DIR program executables in DIR [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data in DIR
[PREFIX/share]
--sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data in DIR
[PREFIX/com]
--localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
--includedir=DIR C header files in DIR [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
--infodir=DIR info documentation in DIR [PREFIX/info]
--mandir=DIR man documentation in DIR [PREFIX/man]
--srcdir=DIR find the sources in DIR [configure dir or ..]
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
--program-transform-name=PROGRAM
run sed PROGRAM on installed program names
EOF
cat << EOF
Host type:
--build=BUILD configure for building on BUILD [BUILD=HOST]
--host=HOST configure for HOST [guessed]
@ -136,8 +177,10 @@ Features and packages:
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR
--enable and --with options recognized:$ac_help
EOF
if test -n "$ac_help"; then
echo "--enable and --with options recognized:$ac_help"
fi
exit 0 ;;
-host | --host | --hos | --ho)
@ -145,6 +188,44 @@ EOF
-host=* | --host=* | --hos=* | --ho=*)
host="$ac_optarg" ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
includedir="$ac_optarg" ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
infodir="$ac_optarg" ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
libdir="$ac_optarg" ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
libexecdir="$ac_optarg" ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
| --locals | --local | --loca | --loc | --lo)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
localstatedir="$ac_optarg" ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
mandir="$ac_optarg" ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
@ -157,6 +238,15 @@ EOF
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
no_recursion=yes ;;
-oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
| --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
| --oldin | --oldi | --old | --ol | --o)
ac_prev=oldincludedir ;;
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
oldincludedir="$ac_optarg" ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
@ -197,6 +287,23 @@ EOF
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
sbindir="$ac_optarg" ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
| --sharedst | --shareds | --shared | --share | --shar \
| --sha | --sh)
ac_prev=sharedstatedir ;;
-sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
sharedstatedir="$ac_optarg" ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
@ -207,6 +314,13 @@ EOF
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
srcdir="$ac_optarg" ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
sysconfdir="$ac_optarg" ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
ac_prev=target ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
@ -216,7 +330,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 2.4"
echo "configure generated by autoconf version 2.10"
exit 0 ;;
-with-* | --with-*)
@ -262,7 +376,7 @@ EOF
-*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
;;
*)
*)
if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
echo "configure: warning: $ac_option: invalid host type" 1>&2
fi
@ -382,8 +496,8 @@ fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
@ -444,7 +558,6 @@ else
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
fi
fi
CC="$ac_cv_prog_CC"
@ -454,6 +567,55 @@ else
echo "$ac_t""no" 1>&6
fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
ac_prog_rejected=no
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
break
fi
done
IFS="$ac_save_ifs"
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_CC
shift
if test $# -gt 0; then
# We chose a different compiler from the bogus one.
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
set dummy "$ac_dir/$ac_word" "$@"
shift
ac_cv_prog_CC="$@"
fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
@ -464,12 +626,13 @@ else
yes;
#endif
EOF
if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
fi
fi
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
if test $ac_cv_prog_gcc = yes; then
GCC=yes
@ -487,7 +650,8 @@ fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
if test $ac_cv_prog_gcc_g = yes; then
CFLAGS="-g -O"
else
@ -514,12 +678,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 518 "configure"
#line 682 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@ -528,12 +693,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 532 "configure"
#line 697 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@ -615,10 +781,17 @@ else
esac
done
IFS="$ac_save_ifs"
# As a last resort, use the slow shell script.
test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
fi
INSTALL="$ac_cv_path_install"
if test "${ac_cv_path_install+set}" = set; then
INSTALL="$ac_cv_path_install"
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
INSTALL="$ac_install_sh"
fi
fi
echo "$ac_t""$INSTALL" 1>&6
@ -689,11 +862,11 @@ else
ac_cv_c_cross=yes
else
cat > conftest.$ac_ext <<EOF
#line 693 "configure"
#line 866 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
eval $ac_link
{ (eval echo configure:870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
if test -s conftest && (./conftest; exit) 2>/dev/null; then
ac_cv_c_cross=no
else
@ -702,22 +875,24 @@ fi
fi
rm -fr conftest*
fi
cross_compiling=$ac_cv_c_cross
echo "$ac_t""$ac_cv_c_cross" 1>&6
cross_compiling=$ac_cv_c_cross
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 714 "configure"
#line 888 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -732,7 +907,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 736 "configure"
#line 911 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@ -750,7 +925,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 754 "configure"
#line 929 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@ -768,10 +943,10 @@ fi
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
ac_cv_header_stdc=no
:
else
cat > conftest.$ac_ext <<EOF
#line 775 "configure"
#line 950 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@ -782,7 +957,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
eval $ac_link
{ (eval echo configure:961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
if test -s conftest && (./conftest; exit) 2>/dev/null; then
:
else
@ -792,6 +967,7 @@ fi
rm -fr conftest*
fi
fi
echo "$ac_t""$ac_cv_header_stdc" 1>&6
if test $ac_cv_header_stdc = yes; then
cat >> confdefs.h <<\EOF
@ -801,6 +977,115 @@ EOF
fi
#--------------------------------------------------------------------
# Look for the TIFF library
#--------------------------------------------------------------------
for ac_hdr in tiff.h
do
ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 992 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
HAVE_TIFF=1
else
echo "$ac_t""no" 1>&6
HAVE_TIFF=1
fi
done
if test "x$HAVE_TIFF" = "x0"
then
echo You must have the TIFF library installed.
echo The most recent version "(v3.4)" should be available at:
echo
echo ftp://ftp.sgi.com/graphics/tiff
echo
echo Configuration of the GNUstep GUI Library cannot continue.
exit 1
fi
#--------------------------------------------------------------------
# Look for the DPSClient library
#--------------------------------------------------------------------
for ac_hdr in DPS/dpsclient.h
do
ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1046 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
HAVE_DPSCLIENT=1
else
echo "$ac_t""no" 1>&6
HAVE_DPSCLIENT=0
fi
done
if test "x$HAVE_DPSCLIENT" = "x0"
then
echo You must have the DPSClient library installed.
echo The most recent version "(R6)", patched for GNUstep,
echo should be available at:
echo
echo ftp://ftp.ocbi.com/pub/GNUstep
echo
echo Configuration of the GNUstep GUI Library cannot continue.
exit 1
fi
#--------------------------------------------------------------------
# Operating system configuration
#--------------------------------------------------------------------
@ -863,7 +1148,7 @@ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
cat > conftest.defs <<\EOF
s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
s%\[%\\&%g
s%\]%\\&%g
@ -898,7 +1183,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "$CONFIG_STATUS generated by autoconf version 2.4"
echo "$CONFIG_STATUS generated by autoconf version 2.10"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@ -910,10 +1195,12 @@ ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
trap 'rm -fr `echo "Makefile Source/Makefile Testing/Makefile Headers/gnustep/gui/config.h Documentation/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@CFLAGS@%$CFLAGS%g
@ -925,12 +1212,26 @@ s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@sbindir@%$sbindir%g
s%@libexecdir@%$libexecdir%g
s%@datadir@%$datadir%g
s%@sysconfdir@%$sysconfdir%g
s%@sharedstatedir@%$sharedstatedir%g
s%@localstatedir@%$localstatedir%g
s%@libdir@%$libdir%g
s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@RANLIB@%$RANLIB%g
s%@LN_S@%$LN_S%g
s%@HAVE_TIFF@%$HAVE_TIFF%g
s%@HAVE_DPSCLIENT@%$HAVE_DPSCLIENT%g
s%@config_include@%$config_include%g
CEOF

View file

@ -42,6 +42,41 @@ AC_LN_S
#--------------------------------------------------------------------
AC_HEADER_STDC
#--------------------------------------------------------------------
# Look for the TIFF library
#--------------------------------------------------------------------
AC_CHECK_HEADERS(tiff.h, HAVE_TIFF=1, HAVE_TIFF=1)
if test "x$HAVE_TIFF" = "x0"
then
echo You must have the TIFF library installed.
echo The most recent version "(v3.4)" should be available at:
echo
echo ftp://ftp.sgi.com/graphics/tiff
echo
echo Configuration of the GNUstep GUI Library cannot continue.
exit 1
fi
AC_SUBST(HAVE_TIFF)
#--------------------------------------------------------------------
# Look for the DPSClient library
#--------------------------------------------------------------------
AC_CHECK_HEADERS(DPS/dpsclient.h, HAVE_DPSCLIENT=1, HAVE_DPSCLIENT=0)
if test "x$HAVE_DPSCLIENT" = "x0"
then
echo You must have the DPSClient library installed.
echo The most recent version "(R6)", patched for GNUstep,
echo should be available at:
echo
echo ftp://ftp.ocbi.com/pub/GNUstep
echo
echo Configuration of the GNUstep GUI Library cannot continue.
exit 1
fi
AC_SUBST(HAVE_DPSCLIENT)
#--------------------------------------------------------------------
# Operating system configuration
#--------------------------------------------------------------------