2005-01-21 21:43 Alexander Malmberg <alexander@malmberg.org>

Various whitespace cleanups, comment type fixes, and changes
	to avoid warnings from recent versions of gcc.

	* Headers/Additions/GNUstepGUI/GSToolbar.h (-_toolbars): Declare.
	* Source/NSWindow+Toolbar.m: Remove conflicting declaration of
	[NSToolbar -_toolbars].

	* Headers/Additions/GNUstepGUI/GSServicesManager.h,
 	Source/GSServicesMananger.m (-item2title:, -validateMenuItem:):
	Adjust argument types.
	* Headers/AppKit/NSMenu.h (-validateMenuItem:): Adjust argument
	type.

	* Source/NSTextView.m (-sizeToFit): Don't use size uninitialized
	if neither resizable flags is set.
	(-insertText:): Adjust argument type.
	* Headers/AppKit/NSResponder.h, Source/NSResponder.m (-insertText:):
	Adjust argument type. Document.

	* Headers/AppKit/NSView.h: Change type of ivar _window to NSWindow *.

	* Source/GSTitleView.m (-mouseDown:): Always initialize
	startWindowOrigin.
	* Source/NSApplication.m (-setApplicationIconImage:): Add casts
	to avoid warnings.
	* Source/NSCell.m (-cellSize): Add default: case.
	* Source/NSPasteboard.m
	([GSFiltered -pasteboard:provideDataForType:]): Detect and warn if we
	can't find a filter that will get us the desired type.
	* Source/NSProgressIndicator.m: Comment out unused variable 'images'.
	* Source/NSBezierPath.m: Declare GSBezierPath fully before using it.
	(-bezierPathByFlatteningPath, -bezierPathByReversingPath): Make sure
	variables are always initialized.

	* Source/NSMenuView.m,
	* Source/NSPrintOperation.m,
	* Source/NSSplitView.m,
	* Source/NSTableHeaderView.m: Make sure variables are always
	initialized.

	* Source/NSBox.m,
	* Source/NSImageview.m,
	* Source/NSText.m,
	* Source/NSTextStorage.m: Add missing includes.

	* Source/GSKeyBindingTable.m,
	* Source/GSLayoutManager.m,
	* Source/NSBitmapImageRep+PNM.m,
	* Source/NSBundleAdditions.m,
	* Source/NSLayoutManager.m,
	* Source/nsimage-tiff.h,
	* Source/tiff.m,
	* Headers/Additions/GNUstepGUI/GSDisplayServer.h,
	* Source/GSDisplayServer.m: Change signedness of various variables.

	* Source/NSPanel.m (-sendEvent:): Remove.
	* Source/NSWindow.m (-becomesKeyOnlyIfNeeded): New method.
	(-_sendEvent:becomesKeyOnlyIfNeeded:): Remove. Move code ...
	(-sendEvent:): ... here. Use -becomesKeyOnlyIfNeeded instead
	of the argument.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20590 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
alexm 2005-01-21 20:39:18 +00:00
parent bbf693d751
commit 8b0730a303
38 changed files with 199 additions and 116 deletions

View file

@ -56,13 +56,36 @@ static NSLineCapStyle default_line_cap_style = NSButtLineCapStyle;
static float default_miter_limit = 10.0;
@interface NSBezierPath (PrivateMethods)
- (void)_invalidateCache;
- (void)_recalculateBounds;
@end
@class GSBezierPath;
typedef struct _PathElement
{
NSBezierPathElement type;
NSPoint points[3];
} PathElement;
//#define GSUNION_TYPES GSUNION_OBJ
#define GSI_ARRAY_TYPES 0
#define GSI_ARRAY_TYPE PathElement
#define GSI_ARRAY_NO_RETAIN
#define GSI_ARRAY_NO_RELEASE
#ifdef GSIArray
#undef GSIArray
#endif
#include <GNUstepBase/GSIArray.h>
@interface GSBezierPath : NSBezierPath
{
GSIArray pathElements;
BOOL flat;
}
@end
@implementation NSBezierPath
@ -541,6 +564,10 @@ static float default_miter_limit = 10.0;
int i, count;
BOOL first = YES;
/* Silence compiler warnings. */
p = NSZeroPoint;
last_p = NSZeroPoint;
count = [self elementCount];
for(i = 0; i < count; i++)
{
@ -566,10 +593,10 @@ static float default_miter_limit = 10.0;
coeff[1] = pts[0];
coeff[2] = pts[1];
coeff[3] = pts[2];
flatten(coeff, [self flatness], path);
flatten(coeff, [self flatness], path);
p = pts[2];
if (first)
{
{
last_p = pts[2];
first = NO;
}
@ -595,6 +622,9 @@ static float default_miter_limit = 10.0;
int i, j, count;
BOOL closed = NO;
/* Silence compiler warnings. */
p = NSZeroPoint;
last_type = NSMoveToBezierPathElement;
count = [self elementCount];
for(i = count - 1; i >= 0; i--)
@ -1778,32 +1808,6 @@ static NSPoint point_on_curve(double t, NSPoint a, NSPoint b, NSPoint c,
@end
typedef struct _PathElement
{
NSBezierPathElement type;
NSPoint points[3];
} PathElement;
//#define GSUNION_TYPES GSUNION_OBJ
#define GSI_ARRAY_TYPES 0
#define GSI_ARRAY_TYPE PathElement
#define GSI_ARRAY_NO_RETAIN
#define GSI_ARRAY_NO_RELEASE
#ifdef GSIArray
#undef GSIArray
#endif
#include <GNUstepBase/GSIArray.h>
@interface GSBezierPath : NSBezierPath
{
GSIArray pathElements;
BOOL flat;
}
@end
@implementation GSBezierPath
- (id)init