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
length: (int)length
on: (cairo_t*)ct;
on: (cairo_t*)ct;
@end
#endif

View file

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

View file

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

View file

@ -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;
@ -155,4 +155,3 @@ struct XGGeneric {
#define _NET_WM_STATE_TOGGLE 2 /* toggle property */
#endif

View file

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

View file

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

View file

@ -68,7 +68,7 @@ typedef enum {
- (XGDrawMechanism) drawMechanismForScreen: (int)screen_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;
- (XColor) xColorFromColor: (XColor)color forScreen: (int)screen_number;

View file

@ -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

View file

@ -35,4 +35,3 @@ typedef unsigned long long XIMStyle;
#define False 0
#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.
*/
+ 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

View file

@ -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

View file

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

View file

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

View file

@ -1,4 +1,3 @@
/*
HeadlessGState.m
@ -287,20 +286,20 @@
}
- (void) compositeGState: (HeadlessGState *)source
fromRect: (NSRect)srcRect
toPoint: (NSPoint)destPoint
op: (NSCompositingOperation)op
fraction: (CGFloat)delta
fromRect: (NSRect)srcRect
toPoint: (NSPoint)destPoint
op: (NSCompositingOperation)op
fraction: (CGFloat)delta
{
}
/** 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
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
{
}

View file

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

View file

@ -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

View file

@ -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;
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;
forContext: (NSGraphicsContext *)gcontext;
@end
@ -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
{
}
@ -217,7 +217,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
* WM is asking us to take the keyboard focus
*/
- (NSEvent *)_handleTakeFocusAtom: (XEvent)xEvent
forContext: (NSGraphicsContext *)gcontext
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
@ -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.
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

View file

@ -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)
@ -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
{
}
@ -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
{
}