Cleanup formatting and whitespace

This commit is contained in:
Gregory Casamento 2023-08-02 09:22:08 -04:00
parent 4c8524a209
commit 4030602b66
24 changed files with 175 additions and 185 deletions

View file

@ -41,7 +41,7 @@ typedef void *cairo_t;
- (void) drawGlyphs: (const NSGlyph*)glyphs - (void) drawGlyphs: (const NSGlyph*)glyphs
length: (int)length length: (int)length
on: (cairo_t*)ct; on: (cairo_t*)ct;
@end @end
#endif #endif

View file

@ -35,4 +35,3 @@
@end @end
#endif #endif

View file

@ -50,4 +50,3 @@ typedef void *cairo_surface_t;
@end @end
#endif #endif

View file

@ -90,7 +90,7 @@ typedef struct {
* Structure containing ivars that are common to all X backend contexts. * Structure containing ivars that are common to all X backend contexts.
*/ */
struct XGGeneric { struct XGGeneric {
int wm; int wm;
struct { struct {
unsigned useWindowMakerIcons:1; unsigned useWindowMakerIcons:1;
unsigned appOwnsMiniwindow:1; unsigned appOwnsMiniwindow:1;
@ -155,4 +155,3 @@ struct XGGeneric {
#define _NET_WM_STATE_TOGGLE 2 /* toggle property */ #define _NET_WM_STATE_TOGGLE 2 /* toggle property */
#endif #endif

View file

@ -34,7 +34,7 @@
- (BOOL) filterEvent: (XEvent *)event; - (BOOL) filterEvent: (XEvent *)event;
- (NSString *) lookupStringForEvent: (XKeyEvent *)event - (NSString *) lookupStringForEvent: (XKeyEvent *)event
window: (gswindow_device_t *)window window: (gswindow_device_t *)window
keysym: (KeySym *)keysymptr; keysym: (KeySym *)keysymptr;
@end @end

View file

@ -1,4 +1,4 @@
/* -*-ObjC-*- */ /* -*-ObjC-*- */
/* XGOpenGL - openGL management using glX /* XGOpenGL - openGL management using glX
Copyright (C) 2002 Free Software Foundation, Inc. Copyright (C) 2002 Free Software Foundation, Inc.

View file

@ -68,7 +68,7 @@ typedef enum {
- (XGDrawMechanism) drawMechanismForScreen: (int)screen_number; - (XGDrawMechanism) drawMechanismForScreen: (int)screen_number;
- (void) getForScreen: (int)screen_number pixelFormat: (int *)bpp_number - (void) getForScreen: (int)screen_number pixelFormat: (int *)bpp_number
masks: (int *)red_mask : (int *)green_mask : (int *)blue_mask; masks: (int *)red_mask : (int *)green_mask : (int *)blue_mask;
- (Window) xDisplayRootWindowForScreen: (int)screen_number; - (Window) xDisplayRootWindowForScreen: (int)screen_number;
- (XColor) xColorFromColor: (XColor)color forScreen: (int)screen_number; - (XColor) xColorFromColor: (XColor)color forScreen: (int)screen_number;

View file

@ -64,7 +64,7 @@ typedef struct {
#define GSDocumentEditedFlag (1<<0) #define GSDocumentEditedFlag (1<<0)
#define GSWindowWillResizeNotificationsFlag (1<<1) #define GSWindowWillResizeNotificationsFlag (1<<1)
#define GSWindowWillMoveNotificationsFlag (1<<2) #define GSWindowWillMoveNotificationsFlag (1<<2)
#define GSNoApplicationIconFlag (1<<5) #define GSNoApplicationIconFlag (1<<5)
#define WMFHideOtherApplications 10 #define WMFHideOtherApplications 10
#define WMFHideApplication 12 #define WMFHideApplication 12

View file

@ -35,4 +35,3 @@ typedef unsigned long long XIMStyle;
#define False 0 #define False 0
#endif #endif

View file

@ -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. The depth info is only used if a new XWindowBuffer needs to be allocated.
*/ */
+ windowBufferForWindow: (gswindow_device_t *)awindow + 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; Note that alpha is _not_ guaranteed to exist after this has been called;
@ -147,4 +147,3 @@ created.
#endif #endif

View file

@ -169,12 +169,12 @@
} }
- (void) beginPrologueBBox: (NSRect)boundingBox - (void) beginPrologueBBox: (NSRect)boundingBox
creationDate: (NSString*)dateCreated creationDate: (NSString*)dateCreated
createdBy: (NSString*)anApplication createdBy: (NSString*)anApplication
fonts: (NSString*)fontNames fonts: (NSString*)fontNames
forWhom: (NSString*)user forWhom: (NSString*)user
pages: (int)numPages pages: (int)numPages
title: (NSString*)aTitle title: (NSString*)aTitle
{ {
} }
@ -187,4 +187,3 @@
#undef _CAIRO_SURFACE_CLASSNAME #undef _CAIRO_SURFACE_CLASSNAME
#undef _CAIRO_GSTATE_CLASSNAME #undef _CAIRO_GSTATE_CLASSNAME

View file

@ -48,4 +48,3 @@
} }
@end @end

View file

@ -44,8 +44,8 @@ typedef void *cairo_t;
} }
- (id) initWithFontName: (NSString *)name - (id) initWithFontName: (NSString *)name
matrix: (const CGFloat *)fmatrix matrix: (const CGFloat *)fmatrix
screenFont: (BOOL)p_screenFont screenFont: (BOOL)p_screenFont
{ {
self = [super init]; self = [super init];
if (!self) if (!self)
@ -97,14 +97,14 @@ typedef void *cairo_t;
} }
- (void) appendBezierPathWithGlyphs: (NSGlyph *)glyphs - (void) appendBezierPathWithGlyphs: (NSGlyph *)glyphs
count: (int)length count: (int)length
toBezierPath: (NSBezierPath *)path toBezierPath: (NSBezierPath *)path
{ {
} }
- (void) drawGlyphs: (const NSGlyph*)glyphs - (void) drawGlyphs: (const NSGlyph*)glyphs
length: (int)length length: (int)length
on: (cairo_t*)ct on: (cairo_t*)ct
{ {
} }

View file

@ -1,4 +1,3 @@
/* /*
HeadlessGState.m HeadlessGState.m
@ -287,20 +286,20 @@
} }
- (void) compositeGState: (HeadlessGState *)source - (void) compositeGState: (HeadlessGState *)source
fromRect: (NSRect)srcRect fromRect: (NSRect)srcRect
toPoint: (NSPoint)destPoint toPoint: (NSPoint)destPoint
op: (NSCompositingOperation)op op: (NSCompositingOperation)op
fraction: (CGFloat)delta 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. */ doesn't support to use the receiver cairo target as the source. */
- (void) drawGState: (HeadlessGState *)source - (void) drawGState: (HeadlessGState *)source
fromRect: (NSRect)aRect fromRect: (NSRect)aRect
toPoint: (NSPoint)aPoint toPoint: (NSPoint)aPoint
op: (NSCompositingOperation)op op: (NSCompositingOperation)op
fraction: (CGFloat)delta fraction: (CGFloat)delta
{ {
} }
@ -322,18 +321,18 @@ doesn't support to use the receiver cairo target as the source. */
@implementation HeadlessGState (NSGradient) @implementation HeadlessGState (NSGradient)
- (void) drawGradient: (NSGradient*)gradient - (void) drawGradient: (NSGradient*)gradient
fromCenter: (NSPoint)startCenter fromCenter: (NSPoint)startCenter
radius: (CGFloat)startRadius radius: (CGFloat)startRadius
toCenter: (NSPoint)endCenter toCenter: (NSPoint)endCenter
radius: (CGFloat)endRadius radius: (CGFloat)endRadius
options: (NSUInteger)options options: (NSUInteger)options
{ {
} }
- (void) drawGradient: (NSGradient*)gradient - (void) drawGradient: (NSGradient*)gradient
fromPoint: (NSPoint)startPoint fromPoint: (NSPoint)startPoint
toPoint: (NSPoint)endPoint toPoint: (NSPoint)endPoint
options: (NSUInteger)options options: (NSUInteger)options
{ {
} }

View file

@ -51,4 +51,3 @@
} }
@end @end

View file

@ -75,7 +75,7 @@ extern int XGErrorHandler(Display *display, XErrorEvent *err);
XGDrawMechanism drawMechanism; XGDrawMechanism drawMechanism;
} }
- initForDisplay: (Display *)dpy screen: (int)screen_number; - (instancetype) initForDisplay: (Display *)dpy screen: (int)screen_number;
- (XGDrawMechanism) drawMechanism; - (XGDrawMechanism) drawMechanism;
- (RContext *) context; - (RContext *) context;
@end @end

View file

@ -99,17 +99,17 @@ void __objc_xgcontextevent_linking (void)
@interface XGServer (Private) @interface XGServer (Private)
- (void) receivedEvent: (void*)data - (void) receivedEvent: (void*)data
type: (RunLoopEventType)type type: (RunLoopEventType)type
extra: (void*)extra extra: (void*)extra
forMode: (NSString*)mode; forMode: (NSString*)mode;
- (void) setupRunLoopInputSourcesForMode: (NSString*)mode; - (void) setupRunLoopInputSourcesForMode: (NSString*)mode;
- (NSDate*) timedOutEvent: (void*)data - (NSDate*) timedOutEvent: (void*)data
type: (RunLoopEventType)type type: (RunLoopEventType)type
forMode: (NSString*)mode; forMode: (NSString*)mode;
- (int) XGErrorHandler: (Display*)display : (XErrorEvent*)err; - (int) XGErrorHandler: (Display*)display : (XErrorEvent*)err;
- (void) processEvent: (XEvent *) event; - (void) processEvent: (XEvent *) event;
- (NSEvent *)_handleTakeFocusAtom: (XEvent)xEvent - (NSEvent *)_handleTakeFocusAtom: (XEvent)xEvent
forContext: (NSGraphicsContext *)gcontext; forContext: (NSGraphicsContext *)gcontext;
@end @end
@ -154,7 +154,7 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym)
@interface XGServer (WindowOps) @interface XGServer (WindowOps)
- (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; : (unsigned int) style : (Window) win;
- (NSRect) _XWinRectToOSWinRect: (NSRect)r for: (void*)windowNumber; - (NSRect) _XWinRectToOSWinRect: (NSRect)r for: (void*)windowNumber;
@end @end
@ -182,7 +182,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
id runLoopMode = [[NSRunLoop currentRunLoop] currentMode]; id runLoopMode = [[NSRunLoop currentRunLoop] currentMode];
[fileDescriptor waitForDataInBackgroundAndNotifyForModes: [fileDescriptor waitForDataInBackgroundAndNotifyForModes:
[NSArray arrayWithObject: runLoopMode]]; [NSArray arrayWithObject: runLoopMode]];
[self receivedEvent: 0 type: 0 extra: 0 forMode: nil]; [self receivedEvent: 0 type: 0 extra: 0 forMode: nil];
} }
#endif #endif
@ -194,9 +194,9 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
} }
- (void) receivedEvent: (void*)data - (void) receivedEvent: (void*)data
type: (RunLoopEventType)type type: (RunLoopEventType)type
extra: (void*)extra extra: (void*)extra
forMode: (NSString*)mode forMode: (NSString*)mode
{ {
} }
@ -217,7 +217,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
* WM is asking us to take the keyboard focus * WM is asking us to take the keyboard focus
*/ */
- (NSEvent *)_handleTakeFocusAtom: (XEvent)xEvent - (NSEvent *)_handleTakeFocusAtom: (XEvent)xEvent
forContext: (NSGraphicsContext *)gcontext forContext: (NSGraphicsContext *)gcontext
{ {
return nil; return nil;
} }
@ -226,7 +226,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
// Return the key_sym corresponding to the user defaults string given, // Return the key_sym corresponding to the user defaults string given,
// or fallback if no default is registered. // or fallback if no default is registered.
static KeySym key_sym_from_defaults (Display *display, NSUserDefaults *defaults, static KeySym key_sym_from_defaults (Display *display, NSUserDefaults *defaults,
NSString *keyDefaultKey, KeySym fallback) NSString *keyDefaultKey, KeySym fallback)
{ {
return fallback; return fallback;
} }
@ -267,8 +267,8 @@ static unsigned int process_modifier_flags(unsigned int state)
#endif #endif
- (NSDate*) timedOutEvent: (void*)data - (NSDate*) timedOutEvent: (void*)data
type: (RunLoopEventType)type type: (RunLoopEventType)type
forMode: (NSString*)mode forMode: (NSString*)mode
{ {
return nil; return nil;
} }
@ -304,23 +304,23 @@ static unsigned int process_modifier_flags(unsigned int state)
} }
- (NSEvent*) getEventMatchingMask: (unsigned)mask - (NSEvent*) getEventMatchingMask: (unsigned)mask
beforeDate: (NSDate*)limit beforeDate: (NSDate*)limit
inMode: (NSString*)mode inMode: (NSString*)mode
dequeue: (BOOL)flag dequeue: (BOOL)flag
{ {
[self receivedEvent: 0 type: 0 extra: 0 forMode: nil]; [self receivedEvent: 0 type: 0 extra: 0 forMode: nil];
return [super getEventMatchingMask: mask return [super getEventMatchingMask: mask
beforeDate: limit beforeDate: limit
inMode: mode inMode: mode
dequeue: flag]; dequeue: flag];
} }
- (void) discardEventsMatchingMask: (unsigned)mask - (void) discardEventsMatchingMask: (unsigned)mask
beforeEvent: (NSEvent*)limit beforeEvent: (NSEvent*)limit
{ {
[self receivedEvent: 0 type: 0 extra: 0 forMode: nil]; [self receivedEvent: 0 type: 0 extra: 0 forMode: nil];
[super discardEventsMatchingMask: mask [super discardEventsMatchingMask: mask
beforeEvent: limit]; beforeEvent: limit];
} }
@end @end
@ -355,7 +355,7 @@ static unsigned int process_modifier_flags(unsigned int state)
// In the case of activation via DO the lastTime is outdated and cannot be used. // 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) || ((generic.lastTimeStamp + OUT_DATE_TIME_DIFF)
< [NSDate timeIntervalSinceReferenceDate])) < [NSDate timeIntervalSinceReferenceDate]))
{ {
return [[NSDate date] timeIntervalSince1970]; return [[NSDate date] timeIntervalSince1970];
} }
@ -366,4 +366,3 @@ static unsigned int process_modifier_flags(unsigned int state)
} }
@end @end

View file

@ -74,13 +74,13 @@ static int last_win_num = 0;
@interface NSBitmapImageRep (GSPrivate) @interface NSBitmapImageRep (GSPrivate)
- (NSBitmapImageRep *) _convertToFormatBitsPerSample: (NSInteger)bps - (NSBitmapImageRep *) _convertToFormatBitsPerSample: (NSInteger)bps
samplesPerPixel: (NSInteger)spp samplesPerPixel: (NSInteger)spp
hasAlpha: (BOOL)alpha hasAlpha: (BOOL)alpha
isPlanar: (BOOL)isPlanar isPlanar: (BOOL)isPlanar
colorSpaceName: (NSString*)colorSpaceName colorSpaceName: (NSString*)colorSpaceName
bitmapFormat: (NSBitmapFormat)bitmapFormat bitmapFormat: (NSBitmapFormat)bitmapFormat
bytesPerRow: (NSInteger)rowBytes bytesPerRow: (NSInteger)rowBytes
bitsPerPixel: (NSInteger)pixelBits; bitsPerPixel: (NSInteger)pixelBits;
@end @end
void __objc_xgcontextwindow_linking (void) void __objc_xgcontextwindow_linking (void)
@ -169,7 +169,7 @@ typedef struct {
@interface XGServer (WindowOps) @interface XGServer (WindowOps)
- (gswindow_device_t *) _rootWindowForScreen: (int)screen; - (gswindow_device_t *) _rootWindowForScreen: (int)screen;
- (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; : (unsigned int) style : (Window) win;
- (void) _setSupportedWMProtocols: (gswindow_device_t *) window; - (void) _setSupportedWMProtocols: (gswindow_device_t *) window;
@end @end
@ -264,12 +264,12 @@ typedef struct {
} }
- (void)_sendRoot: (Window)root - (void)_sendRoot: (Window)root
type: (Atom)type type: (Atom)type
window: (Window)window window: (Window)window
data0: (long)data0 data0: (long)data0
data1: (long)data1 data1: (long)data1
data2: (long)data2 data2: (long)data2
data3: (long)data3 data3: (long)data3
{ {
} }
@ -811,7 +811,7 @@ xgps_cursor_image(Display *xdpy, Drawable draw, const unsigned char *data,
} }
- (void) setParentWindow: (NSInteger)parentWin - (void) setParentWindow: (NSInteger)parentWin
forChildWindow: (NSInteger)childWin forChildWindow: (NSInteger)childWin
{ {
} }