From 4030602b66c77f59f997ca2ba8296f637b369af5 Mon Sep 17 00:00:00 2001 From: Gregory Casamento Date: Wed, 2 Aug 2023 09:22:08 -0400 Subject: [PATCH] Cleanup formatting and whitespace --- Headers/headlesslib/HeadlessContext.h | 6 +- Headers/headlesslib/HeadlessFaceInfo.h | 8 +-- Headers/headlesslib/HeadlessFontEnumerator.h | 4 +- Headers/headlesslib/HeadlessFontInfo.h | 8 +-- Headers/headlesslib/HeadlessGState.h | 4 +- Headers/headlesslib/HeadlessModernSurface.h | 5 +- Headers/headlesslib/HeadlessSurface.h | 5 +- Headers/xheadless/XGGeneric.h | 11 ++-- Headers/xheadless/XGInputServer.h | 10 +-- Headers/xheadless/XGOpenGL.h | 8 +-- Headers/xheadless/XGServer.h | 12 ++-- Headers/xheadless/XGServerWindow.h | 8 +-- Headers/xheadless/XHeadless.h | 1 - Headers/xheadless/XWindowBuffer.h | 7 +- Source/headlesslib/HeadlessContext.m | 21 +++--- Source/headlesslib/HeadlessFaceInfo.m | 10 +-- Source/headlesslib/HeadlessFontEnumerator.m | 11 ++-- Source/headlesslib/HeadlessFontInfo.m | 26 ++++---- Source/headlesslib/HeadlessGState.m | 51 +++++++-------- Source/headlesslib/HeadlessModernSurface.m | 5 +- Source/headlesslib/HeadlessSurface.m | 6 +- Source/xheadless/XGServer.m | 2 +- Source/xheadless/XGServerEvent.m | 69 ++++++++++---------- Source/xheadless/XGServerWindow.m | 62 +++++++++--------- 24 files changed, 175 insertions(+), 185 deletions(-) diff --git a/Headers/headlesslib/HeadlessContext.h b/Headers/headlesslib/HeadlessContext.h index d31a474..0d40f6e 100644 --- a/Headers/headlesslib/HeadlessContext.h +++ b/Headers/headlesslib/HeadlessContext.h @@ -1,6 +1,6 @@ /* HeadlessContext.h - + Copyright (C) 2003 Free Software Foundation, Inc. August 31, 2003 @@ -20,8 +20,8 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ diff --git a/Headers/headlesslib/HeadlessFaceInfo.h b/Headers/headlesslib/HeadlessFaceInfo.h index a4d24c4..3fbe1d5 100644 --- a/Headers/headlesslib/HeadlessFaceInfo.h +++ b/Headers/headlesslib/HeadlessFaceInfo.h @@ -8,7 +8,7 @@ Base on code by Alexander Malmberg Rewrite: Fred Kiefer Date: Jan 2006 - + This file is part of GNUstep. This library is free software; you can redistribute it and/or @@ -23,8 +23,8 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ @@ -35,7 +35,7 @@ @interface HeadlessFaceInfo : NSObject { - void *_fontFace; + void *_fontFace; } - (void *)fontFace; diff --git a/Headers/headlesslib/HeadlessFontEnumerator.h b/Headers/headlesslib/HeadlessFontEnumerator.h index 5848abd..0c8a5a2 100644 --- a/Headers/headlesslib/HeadlessFontEnumerator.h +++ b/Headers/headlesslib/HeadlessFontEnumerator.h @@ -19,8 +19,8 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ diff --git a/Headers/headlesslib/HeadlessFontInfo.h b/Headers/headlesslib/HeadlessFontInfo.h index a85860f..25aecdd 100644 --- a/Headers/headlesslib/HeadlessFontInfo.h +++ b/Headers/headlesslib/HeadlessFontInfo.h @@ -20,8 +20,8 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ @@ -40,8 +40,8 @@ typedef void *cairo_t; } - (void) drawGlyphs: (const NSGlyph*)glyphs - length: (int)length - on: (cairo_t*)ct; + length: (int)length + on: (cairo_t*)ct; @end #endif diff --git a/Headers/headlesslib/HeadlessGState.h b/Headers/headlesslib/HeadlessGState.h index b083e9e..884a2b3 100644 --- a/Headers/headlesslib/HeadlessGState.h +++ b/Headers/headlesslib/HeadlessGState.h @@ -17,8 +17,8 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ diff --git a/Headers/headlesslib/HeadlessModernSurface.h b/Headers/headlesslib/HeadlessModernSurface.h index 174480f..61d2507 100644 --- a/Headers/headlesslib/HeadlessModernSurface.h +++ b/Headers/headlesslib/HeadlessModernSurface.h @@ -17,8 +17,8 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ @@ -35,4 +35,3 @@ @end #endif - diff --git a/Headers/headlesslib/HeadlessSurface.h b/Headers/headlesslib/HeadlessSurface.h index def3e1d..68bdc26 100644 --- a/Headers/headlesslib/HeadlessSurface.h +++ b/Headers/headlesslib/HeadlessSurface.h @@ -17,8 +17,8 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ @@ -50,4 +50,3 @@ typedef void *cairo_surface_t; @end #endif - diff --git a/Headers/xheadless/XGGeneric.h b/Headers/xheadless/XGGeneric.h index 1f9564d..b0a032b 100644 --- a/Headers/xheadless/XGGeneric.h +++ b/Headers/xheadless/XGGeneric.h @@ -4,7 +4,7 @@ Written by: Richard Frith-Macdonald Date: Mar 2000 - + This file is part of the GNUstep project This library is free software; you can redistribute it and/or @@ -19,8 +19,8 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ @@ -90,7 +90,7 @@ typedef struct { * Structure containing ivars that are common to all X backend contexts. */ struct XGGeneric { - int wm; + int wm; struct { unsigned useWindowMakerIcons:1; unsigned appOwnsMiniwindow:1; @@ -98,7 +98,7 @@ struct XGGeneric { } flags; // Time of last X event Time lastTime; - // Approximate local time for last X event, used to decide + // Approximate local time for last X event, used to decide // if the last X event time is still valid. NSTimeInterval lastTimeStamp; // last reference time on X server, used to prevent time drift between @@ -155,4 +155,3 @@ struct XGGeneric { #define _NET_WM_STATE_TOGGLE 2 /* toggle property */ #endif - diff --git a/Headers/xheadless/XGInputServer.h b/Headers/xheadless/XGInputServer.h index 7bc3b94..f6bbdb7 100644 --- a/Headers/xheadless/XGInputServer.h +++ b/Headers/xheadless/XGInputServer.h @@ -19,10 +19,10 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ +*/ #ifndef _GNUstep_H_XGInputServer #define _GNUstep_H_XGInputServer @@ -32,9 +32,9 @@ @protocol XInputFiltering - (BOOL) filterEvent: (XEvent *)event; -- (NSString *) lookupStringForEvent: (XKeyEvent *)event +- (NSString *) lookupStringForEvent: (XKeyEvent *)event window: (gswindow_device_t *)window - keysym: (KeySym *)keysymptr; + keysym: (KeySym *)keysymptr; @end diff --git a/Headers/xheadless/XGOpenGL.h b/Headers/xheadless/XGOpenGL.h index 3ec933e..2ec79d4 100644 --- a/Headers/xheadless/XGOpenGL.h +++ b/Headers/xheadless/XGOpenGL.h @@ -1,4 +1,4 @@ -/* -*-ObjC-*- */ +/* -*-ObjC-*- */ /* XGOpenGL - openGL management using glX Copyright (C) 2002 Free Software Foundation, Inc. @@ -20,10 +20,10 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ +*/ #ifndef _GNUstep_H_XGOpenGL_ #define _GNUstep_H_XGOpenGL_ diff --git a/Headers/xheadless/XGServer.h b/Headers/xheadless/XGServer.h index 96bd06e..8f6f75b 100644 --- a/Headers/xheadless/XGServer.h +++ b/Headers/xheadless/XGServer.h @@ -6,7 +6,7 @@ Author: Adam Fedor Date: Mar 2002 - + This file is part of the GNUstep Backend. This library is free software; you can redistribute it and/or @@ -21,8 +21,8 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ @@ -67,8 +67,8 @@ typedef enum { - (int) depthForScreen: (int)screen_number; - (XGDrawMechanism) drawMechanismForScreen: (int)screen_number; -- (void) getForScreen: (int)screen_number pixelFormat: (int *)bpp_number - masks: (int *)red_mask : (int *)green_mask : (int *)blue_mask; +- (void) getForScreen: (int)screen_number pixelFormat: (int *)bpp_number + masks: (int *)red_mask : (int *)green_mask : (int *)blue_mask; - (Window) xDisplayRootWindowForScreen: (int)screen_number; - (XColor) xColorFromColor: (XColor)color forScreen: (int)screen_number; @@ -90,7 +90,7 @@ typedef enum { - (NSRect) _XFrameToXHints: (NSRect)o for: (void*)window; @end -// Public interface for the input methods. +// Public interface for the input methods. @interface XGServer (InputMethod) - (NSString *) inputMethodStyle; - (NSString *) fontSize: (int *)size; diff --git a/Headers/xheadless/XGServerWindow.h b/Headers/xheadless/XGServerWindow.h index 24440fa..0e5a39b 100644 --- a/Headers/xheadless/XGServerWindow.h +++ b/Headers/xheadless/XGServerWindow.h @@ -4,7 +4,7 @@ Written by: Adam Fedor Date: Nov 1999 - + This file is part of the GNU Objective C User Interface library. This library is free software; you can redistribute it and/or @@ -19,8 +19,8 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ @@ -64,7 +64,7 @@ typedef struct { #define GSDocumentEditedFlag (1<<0) #define GSWindowWillResizeNotificationsFlag (1<<1) -#define GSWindowWillMoveNotificationsFlag (1<<2) +#define GSWindowWillMoveNotificationsFlag (1<<2) #define GSNoApplicationIconFlag (1<<5) #define WMFHideOtherApplications 10 #define WMFHideApplication 12 diff --git a/Headers/xheadless/XHeadless.h b/Headers/xheadless/XHeadless.h index b6d6ef3..79ff922 100644 --- a/Headers/xheadless/XHeadless.h +++ b/Headers/xheadless/XHeadless.h @@ -35,4 +35,3 @@ typedef unsigned long long XIMStyle; #define False 0 #endif - diff --git a/Headers/xheadless/XWindowBuffer.h b/Headers/xheadless/XWindowBuffer.h index 0ce512b..48b0511 100644 --- a/Headers/xheadless/XWindowBuffer.h +++ b/Headers/xheadless/XWindowBuffer.h @@ -17,8 +17,8 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ @@ -124,7 +124,7 @@ Returns a _retained_ XWindowBuffer for the specified gswindow_device_t. The depth info is only used if a new XWindowBuffer needs to be allocated. */ + windowBufferForWindow: (gswindow_device_t *)awindow - depthInfo: (struct XWindowBuffer_depth_info_s *)aDI; + depthInfo: (struct XWindowBuffer_depth_info_s *)aDI; /* Note that alpha is _not_ guaranteed to exist after this has been called; @@ -147,4 +147,3 @@ created. #endif - diff --git a/Source/headlesslib/HeadlessContext.m b/Source/headlesslib/HeadlessContext.m index 4cc72de..32f86f0 100644 --- a/Source/headlesslib/HeadlessContext.m +++ b/Source/headlesslib/HeadlessContext.m @@ -20,8 +20,8 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ @@ -112,9 +112,9 @@ #endif // BUILD_SERVER = SERVER_x11 -@end +@end -@implementation HeadlessContext (Ops) +@implementation HeadlessContext (Ops) - (BOOL) isCompatibleBitmap: (NSBitmapImageRep*)bitmap { @@ -169,12 +169,12 @@ } - (void) beginPrologueBBox: (NSRect)boundingBox - creationDate: (NSString*)dateCreated - createdBy: (NSString*)anApplication - fonts: (NSString*)fontNames - forWhom: (NSString*)user - pages: (int)numPages - title: (NSString*)aTitle + creationDate: (NSString*)dateCreated + createdBy: (NSString*)anApplication + fonts: (NSString*)fontNames + forWhom: (NSString*)user + pages: (int)numPages + title: (NSString*)aTitle { } @@ -187,4 +187,3 @@ #undef _CAIRO_SURFACE_CLASSNAME #undef _CAIRO_GSTATE_CLASSNAME - diff --git a/Source/headlesslib/HeadlessFaceInfo.m b/Source/headlesslib/HeadlessFaceInfo.m index 211ee5d..b405352 100644 --- a/Source/headlesslib/HeadlessFaceInfo.m +++ b/Source/headlesslib/HeadlessFaceInfo.m @@ -1,6 +1,6 @@ /* CairoFaceInfo.m - + Copyright (C) 2003 Free Software Foundation, Inc. August 31, 2003 @@ -8,7 +8,7 @@ Base on original code of Alex Malmberg Rewrite: Fred Kiefer Date: Jan 2006 - + This file is part of GNUstep. This library is free software; you can redistribute it and/or @@ -23,14 +23,14 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "headlesslib/HeadlessFaceInfo.h" -@implementation HeadlessFaceInfo +@implementation HeadlessFaceInfo - (void) dealloc { diff --git a/Source/headlesslib/HeadlessFontEnumerator.m b/Source/headlesslib/HeadlessFontEnumerator.m index 176847d..f69355d 100644 --- a/Source/headlesslib/HeadlessFontEnumerator.m +++ b/Source/headlesslib/HeadlessFontEnumerator.m @@ -1,6 +1,6 @@ /* HeadlessFontEnumerator.m - + Copyright (C) 2003 Free Software Foundation, Inc. August 31, 2003 @@ -8,7 +8,7 @@ Base on original code of Alex Malmberg Rewrite: Fred Kiefer Date: Jan 2006 - + This file is part of GNUstep. This library is free software; you can redistribute it and/or @@ -23,15 +23,15 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "headlesslib/HeadlessFontEnumerator.h" #include "headlesslib/HeadlessFontInfo.h" -@implementation HeadlessFontEnumerator +@implementation HeadlessFontEnumerator + (Class) faceInfoClass { @@ -48,4 +48,3 @@ } @end - diff --git a/Source/headlesslib/HeadlessFontInfo.m b/Source/headlesslib/HeadlessFontInfo.m index 112feb3..848aea0 100644 --- a/Source/headlesslib/HeadlessFontInfo.m +++ b/Source/headlesslib/HeadlessFontInfo.m @@ -1,6 +1,6 @@ /* HeadlessFontInfo.m - + Copyright (C) 2003 Free Software Foundation, Inc. August 31, 2003 @@ -21,8 +21,8 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ @@ -36,16 +36,16 @@ typedef void *cairo_t; -@implementation HeadlessFontInfo +@implementation HeadlessFontInfo - (BOOL) setupAttributes { return YES; } -- (id) initWithFontName: (NSString *)name - matrix: (const CGFloat *)fmatrix - screenFont: (BOOL)p_screenFont +- (id) initWithFontName: (NSString *)name + matrix: (const CGFloat *)fmatrix + screenFont: (BOOL)p_screenFont { self = [super init]; if (!self) @@ -71,7 +71,7 @@ typedef void *cairo_t; - (BOOL) glyphIsEncoded: (NSGlyph)glyph { /* FIXME: There is no proper way to determine with the toy font API, - whether a glyph is supported or not. We will just ignore ligatures + whether a glyph is supported or not. We will just ignore ligatures and report all other glyph as existing. return !NSEqualSizes([self advancementForGlyph: glyph], NSZeroSize); */ @@ -96,15 +96,15 @@ typedef void *cairo_t; return 0.0; } -- (void) appendBezierPathWithGlyphs: (NSGlyph *)glyphs - count: (int)length - toBezierPath: (NSBezierPath *)path +- (void) appendBezierPathWithGlyphs: (NSGlyph *)glyphs + count: (int)length + toBezierPath: (NSBezierPath *)path { } - (void) drawGlyphs: (const NSGlyph*)glyphs - length: (int)length - on: (cairo_t*)ct + length: (int)length + on: (cairo_t*)ct { } diff --git a/Source/headlesslib/HeadlessGState.m b/Source/headlesslib/HeadlessGState.m index c808df8..fb3d9bd 100644 --- a/Source/headlesslib/HeadlessGState.m +++ b/Source/headlesslib/HeadlessGState.m @@ -1,4 +1,3 @@ - /* HeadlessGState.m @@ -8,7 +7,7 @@ Written by Banlu Kemiyatorn Rewrite: Fred Kiefer Date: Jan 2006 - + This file is part of GNUstep. This library is free software; you can redistribute it and/or @@ -23,8 +22,8 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ @@ -74,7 +73,7 @@ NSZoneFree(NSDefaultMallocZone(), _base); \ } -@implementation HeadlessGState +@implementation HeadlessGState + (void) initialize { @@ -135,7 +134,7 @@ /* * Color operations */ -- (void) GSSetPatterColor: (NSImage*)image +- (void) GSSetPatterColor: (NSImage*)image { // FIXME: Create a cairo surface from the image and set it as source. [super GSSetPatterColor: image]; @@ -274,7 +273,7 @@ } - (void) DPSimage: (NSAffineTransform *)matrix : (NSInteger)pixelsWide - : (NSInteger)pixelsHigh : (NSInteger)bitsPerSample + : (NSInteger)pixelsHigh : (NSInteger)bitsPerSample : (NSInteger)samplesPerPixel : (NSInteger)bitsPerPixel : (NSInteger)bytesPerRow : (BOOL)isPlanar : (BOOL)hasAlpha : (NSString *)colorSpaceName @@ -286,21 +285,21 @@ { } -- (void) compositeGState: (HeadlessGState *)source - fromRect: (NSRect)srcRect - toPoint: (NSPoint)destPoint - op: (NSCompositingOperation)op - fraction: (CGFloat)delta +- (void) compositeGState: (HeadlessGState *)source + fromRect: (NSRect)srcRect + toPoint: (NSPoint)destPoint + op: (NSCompositingOperation)op + fraction: (CGFloat)delta { } -/** Unlike -compositeGState, -drawGSstate fully respects the AppKit CTM but +/** Unlike -compositeGState, -drawGSstate fully respects the AppKit CTM but doesn't support to use the receiver cairo target as the source. */ -- (void) drawGState: (HeadlessGState *)source - fromRect: (NSRect)aRect - toPoint: (NSPoint)aPoint - op: (NSCompositingOperation)op - fraction: (CGFloat)delta +- (void) drawGState: (HeadlessGState *)source + fromRect: (NSRect)aRect + toPoint: (NSPoint)aPoint + op: (NSCompositingOperation)op + fraction: (CGFloat)delta { } @@ -322,18 +321,18 @@ doesn't support to use the receiver cairo target as the source. */ @implementation HeadlessGState (NSGradient) - (void) drawGradient: (NSGradient*)gradient - fromCenter: (NSPoint)startCenter - radius: (CGFloat)startRadius - toCenter: (NSPoint)endCenter - radius: (CGFloat)endRadius - options: (NSUInteger)options + fromCenter: (NSPoint)startCenter + radius: (CGFloat)startRadius + toCenter: (NSPoint)endCenter + radius: (CGFloat)endRadius + options: (NSUInteger)options { } - (void) drawGradient: (NSGradient*)gradient - fromPoint: (NSPoint)startPoint - toPoint: (NSPoint)endPoint - options: (NSUInteger)options + fromPoint: (NSPoint)startPoint + toPoint: (NSPoint)endPoint + options: (NSUInteger)options { } diff --git a/Source/headlesslib/HeadlessModernSurface.m b/Source/headlesslib/HeadlessModernSurface.m index a9968be..0967867 100644 --- a/Source/headlesslib/HeadlessModernSurface.m +++ b/Source/headlesslib/HeadlessModernSurface.m @@ -17,8 +17,8 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ @@ -51,4 +51,3 @@ } @end - diff --git a/Source/headlesslib/HeadlessSurface.m b/Source/headlesslib/HeadlessSurface.m index b351991..95fa685 100644 --- a/Source/headlesslib/HeadlessSurface.m +++ b/Source/headlesslib/HeadlessSurface.m @@ -17,14 +17,14 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "headlesslib/HeadlessSurface.h" -@implementation HeadlessSurface +@implementation HeadlessSurface - (id) initWithDevice: (void *) device { diff --git a/Source/xheadless/XGServer.m b/Source/xheadless/XGServer.m index d3bf047..e257ae1 100644 --- a/Source/xheadless/XGServer.m +++ b/Source/xheadless/XGServer.m @@ -75,7 +75,7 @@ extern int XGErrorHandler(Display *display, XErrorEvent *err); XGDrawMechanism drawMechanism; } -- initForDisplay: (Display *)dpy screen: (int)screen_number; +- (instancetype) initForDisplay: (Display *)dpy screen: (int)screen_number; - (XGDrawMechanism) drawMechanism; - (RContext *) context; @end diff --git a/Source/xheadless/XGServerEvent.m b/Source/xheadless/XGServerEvent.m index 043272d..9c80b74 100644 --- a/Source/xheadless/XGServerEvent.m +++ b/Source/xheadless/XGServerEvent.m @@ -5,7 +5,7 @@ Written by: Adam Fedor Date: Nov 1998 - + This file is part of the GNU Objective C User Interface Library. This library is free software; you can redistribute it and/or @@ -20,8 +20,8 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, */ #include "config.h" @@ -99,17 +99,17 @@ void __objc_xgcontextevent_linking (void) @interface XGServer (Private) - (void) receivedEvent: (void*)data - type: (RunLoopEventType)type - extra: (void*)extra - forMode: (NSString*)mode; -- (void) setupRunLoopInputSourcesForMode: (NSString*)mode; + type: (RunLoopEventType)type + extra: (void*)extra + forMode: (NSString*)mode; +- (void) setupRunLoopInputSourcesForMode: (NSString*)mode; - (NSDate*) timedOutEvent: (void*)data - type: (RunLoopEventType)type - forMode: (NSString*)mode; + type: (RunLoopEventType)type + forMode: (NSString*)mode; - (int) XGErrorHandler: (Display*)display : (XErrorEvent*)err; - (void) processEvent: (XEvent *) event; -- (NSEvent *)_handleTakeFocusAtom: (XEvent)xEvent - forContext: (NSGraphicsContext *)gcontext; +- (NSEvent *)_handleTakeFocusAtom: (XEvent)xEvent + forContext: (NSGraphicsContext *)gcontext; @end @@ -122,7 +122,7 @@ XGErrorHandler(Display *display, XErrorEvent *err) } #if 0 -static NSEvent*process_key_event (XEvent* xEvent, XGServer* ctxt, +static NSEvent*process_key_event (XEvent* xEvent, XGServer* ctxt, NSEventType eventType, NSMutableArray *event_queue); static unichar process_char (KeySym keysym, unsigned *eventModifierFlags); @@ -140,7 +140,7 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym) char *key_vector; int by,bi; int key_code = XKeysymToKeycode(xEvent->xkeymap.display, key_sym); - + if (key_code != NoSymbol) { by = key_code / 8; @@ -154,7 +154,7 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym) @interface XGServer (WindowOps) - (void) styleoffsets: (float *) l : (float *) r : (float *) t : (float *) b - : (unsigned int) style : (Window) win; + : (unsigned int) style : (Window) win; - (NSRect) _XWinRectToOSWinRect: (NSRect)r for: (void*)windowNumber; @end @@ -182,7 +182,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor id runLoopMode = [[NSRunLoop currentRunLoop] currentMode]; [fileDescriptor waitForDataInBackgroundAndNotifyForModes: - [NSArray arrayWithObject: runLoopMode]]; + [NSArray arrayWithObject: runLoopMode]]; [self receivedEvent: 0 type: 0 extra: 0 forMode: nil]; } #endif @@ -194,9 +194,9 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor } - (void) receivedEvent: (void*)data - type: (RunLoopEventType)type - extra: (void*)extra - forMode: (NSString*)mode + type: (RunLoopEventType)type + extra: (void*)extra + forMode: (NSString*)mode { } @@ -216,8 +216,8 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor /* * WM is asking us to take the keyboard focus */ -- (NSEvent *)_handleTakeFocusAtom: (XEvent)xEvent - forContext: (NSGraphicsContext *)gcontext +- (NSEvent *)_handleTakeFocusAtom: (XEvent)xEvent + forContext: (NSGraphicsContext *)gcontext { return nil; } @@ -226,7 +226,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor // Return the key_sym corresponding to the user defaults string given, // or fallback if no default is registered. static KeySym key_sym_from_defaults (Display *display, NSUserDefaults *defaults, - NSString *keyDefaultKey, KeySym fallback) + NSString *keyDefaultKey, KeySym fallback) { return fallback; } @@ -267,8 +267,8 @@ static unsigned int process_modifier_flags(unsigned int state) #endif - (NSDate*) timedOutEvent: (void*)data - type: (RunLoopEventType)type - forMode: (NSString*)mode + type: (RunLoopEventType)type + forMode: (NSString*)mode { return nil; } @@ -304,23 +304,23 @@ static unsigned int process_modifier_flags(unsigned int state) } - (NSEvent*) getEventMatchingMask: (unsigned)mask - beforeDate: (NSDate*)limit - inMode: (NSString*)mode - dequeue: (BOOL)flag + beforeDate: (NSDate*)limit + inMode: (NSString*)mode + dequeue: (BOOL)flag { [self receivedEvent: 0 type: 0 extra: 0 forMode: nil]; return [super getEventMatchingMask: mask - beforeDate: limit - inMode: mode - dequeue: flag]; + beforeDate: limit + inMode: mode + dequeue: flag]; } - (void) discardEventsMatchingMask: (unsigned)mask - beforeEvent: (NSEvent*)limit + beforeEvent: (NSEvent*)limit { [self receivedEvent: 0 type: 0 extra: 0 forMode: nil]; [super discardEventsMatchingMask: mask - beforeEvent: limit]; + beforeEvent: limit]; } @end @@ -333,7 +333,7 @@ static unsigned int process_modifier_flags(unsigned int state) - (void) setLastTime: (Time)last { - if (generic.lastTimeStamp == 0 + if (generic.lastTimeStamp == 0 || generic.baseXServerTime + MAX_TIME_DIFF * 1000 < last) { // We have not sync'ed with the clock for at least @@ -353,9 +353,9 @@ static unsigned int process_modifier_flags(unsigned int state) - (Time) lastTime { // In the case of activation via DO the lastTime is outdated and cannot be used. - if (generic.lastTimeStamp == 0 + if (generic.lastTimeStamp == 0 || ((generic.lastTimeStamp + OUT_DATE_TIME_DIFF) - < [NSDate timeIntervalSinceReferenceDate])) + < [NSDate timeIntervalSinceReferenceDate])) { return [[NSDate date] timeIntervalSince1970]; } @@ -366,4 +366,3 @@ static unsigned int process_modifier_flags(unsigned int state) } @end - diff --git a/Source/xheadless/XGServerWindow.m b/Source/xheadless/XGServerWindow.m index 1f811b8..38a35b1 100644 --- a/Source/xheadless/XGServerWindow.m +++ b/Source/xheadless/XGServerWindow.m @@ -4,7 +4,7 @@ Written by: Adam Fedor Date: Nov 1999 - + This file is part of GNUstep This library is free software; you can redistribute it and/or @@ -19,8 +19,8 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ @@ -74,13 +74,13 @@ static int last_win_num = 0; @interface NSBitmapImageRep (GSPrivate) - (NSBitmapImageRep *) _convertToFormatBitsPerSample: (NSInteger)bps - samplesPerPixel: (NSInteger)spp - hasAlpha: (BOOL)alpha - isPlanar: (BOOL)isPlanar - colorSpaceName: (NSString*)colorSpaceName - bitmapFormat: (NSBitmapFormat)bitmapFormat - bytesPerRow: (NSInteger)rowBytes - bitsPerPixel: (NSInteger)pixelBits; + samplesPerPixel: (NSInteger)spp + hasAlpha: (BOOL)alpha + isPlanar: (BOOL)isPlanar + colorSpaceName: (NSString*)colorSpaceName + bitmapFormat: (NSBitmapFormat)bitmapFormat + bytesPerRow: (NSInteger)rowBytes + bitsPerPixel: (NSInteger)pixelBits; @end void __objc_xgcontextwindow_linking (void) @@ -101,7 +101,7 @@ static unsigned char*PropGetCheckProperty(Display *dpy, Window window, Atom hint */ /* - * Motif window hints to communicate to a window manager + * Motif window hints to communicate to a window manager * that we want a window to have a titlebar/resize button/etc. */ @@ -169,7 +169,7 @@ typedef struct { @interface XGServer (WindowOps) - (gswindow_device_t *) _rootWindowForScreen: (int)screen; - (void) styleoffsets: (float *) l : (float *) r : (float *) t : (float *) b - : (unsigned int) style : (Window) win; + : (unsigned int) style : (Window) win; - (void) _setSupportedWMProtocols: (gswindow_device_t *) window; @end @@ -264,12 +264,12 @@ typedef struct { } - (void)_sendRoot: (Window)root - type: (Atom)type - window: (Window)window - data0: (long)data0 - data1: (long)data1 - data2: (long)data2 - data3: (long)data3 + type: (Atom)type + window: (Window)window + data0: (long)data0 + data1: (long)data1 + data2: (long)data2 + data3: (long)data3 { } @@ -400,12 +400,12 @@ Bool _get_next_prop_new_event(Display *display, XEvent *event, char *arg) * Code to build up a NET WM icon from our application icon */ --(BOOL) _createNetIcon: (NSImage*)image - result: (long**)pixeldata +-(BOOL) _createNetIcon: (NSImage*)image + result: (long**)pixeldata size: (int*)size { return NO; -} +} - (void) _setNetWMIconFor: (Window) window { @@ -455,13 +455,13 @@ Bool _get_next_prop_new_event(Display *display, XEvent *event, char *arg) * Return the offsets between the window content-view and it's frame * depending on the window style. */ -- (void) styleoffsets: (float *) l : (float *) r : (float *) t : (float *) b +- (void) styleoffsets: (float *) l : (float *) r : (float *) t : (float *) b : (unsigned int) style { [self styleoffsets: l : r : t : b : style : (Window) 0]; } -- (void) styleoffsets: (float *) l : (float *) r : (float *) t : (float *) b +- (void) styleoffsets: (float *) l : (float *) r : (float *) t : (float *) b : (unsigned int) style : (Window) win { } @@ -506,7 +506,7 @@ Bool _get_next_prop_new_event(Display *display, XEvent *event, char *arg) -(int) _createAppIconPixmaps { return 1; -} +} - (void) orderwindow: (int)op : (NSInteger)otherWin : (NSInteger)winNum { @@ -515,13 +515,13 @@ Bool _get_next_prop_new_event(Display *display, XEvent *event, char *arg) #define ALPHA_THRESHOLD 158 /* Restrict the displayed part of the window to the given image. - This only yields usefull results if the window is borderless and + This only yields usefull results if the window is borderless and displays the image itself */ - (void) restrictWindow: (NSInteger)win toImage: (NSImage*)image { } -/* This method is a fast implementation of move that only works +/* This method is a fast implementation of move that only works correctly for borderless windows. Use with caution. */ - (void) movewindow: (NSPoint)loc : (NSInteger)win { @@ -668,7 +668,7 @@ xgps_cursor_mask(Display *xdpy, Drawable draw, const unsigned char *data, } Pixmap -xgps_cursor_image(Display *xdpy, Drawable draw, const unsigned char *data, +xgps_cursor_image(Display *xdpy, Drawable draw, const unsigned char *data, int w, int h, int colors, XColor *fg, XColor *bg) { return None; @@ -714,17 +714,17 @@ xgps_cursor_image(Display *xdpy, Drawable draw, const unsigned char *data, } - (NSWindowDepth) windowDepthForScreen: (int) screen_num -{ +{ return 0; } - (const NSWindowDepth *) availableDepthsForScreen: (int) screen_num -{ +{ return NULL; } - (NSSize) resolutionForScreen: (int)screen_num -{ +{ // NOTE: // -gui now trusts the return value of resolutionForScreen:, // so if it is not {72, 72} then the entire UI will be scaled. @@ -811,7 +811,7 @@ xgps_cursor_image(Display *xdpy, Drawable draw, const unsigned char *data, } - (void) setParentWindow: (NSInteger)parentWin - forChildWindow: (NSInteger)childWin + forChildWindow: (NSInteger)childWin { }