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

@ -1,6 +1,6 @@
/* /*
HeadlessContext.h HeadlessContext.h
Copyright (C) 2003 Free Software Foundation, Inc. Copyright (C) 2003 Free Software Foundation, Inc.
August 31, 2003 August 31, 2003
@ -20,8 +20,8 @@
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */

View file

@ -8,7 +8,7 @@
Base on code by Alexander Malmberg <alexander@malmberg.org> Base on code by Alexander Malmberg <alexander@malmberg.org>
Rewrite: Fred Kiefer <fredkiefer@gmx.de> Rewrite: Fred Kiefer <fredkiefer@gmx.de>
Date: Jan 2006 Date: Jan 2006
This file is part of GNUstep. This file is part of GNUstep.
This library is free software; you can redistribute it and/or 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 You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
@ -35,7 +35,7 @@
@interface HeadlessFaceInfo : NSObject @interface HeadlessFaceInfo : NSObject
{ {
void *_fontFace; void *_fontFace;
} }
- (void *)fontFace; - (void *)fontFace;

View file

@ -19,8 +19,8 @@
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */

View file

@ -20,8 +20,8 @@
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
@ -40,8 +40,8 @@ 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

@ -17,8 +17,8 @@
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */

View file

@ -17,8 +17,8 @@
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
@ -35,4 +35,3 @@
@end @end
#endif #endif

View file

@ -17,8 +17,8 @@
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
@ -50,4 +50,3 @@ typedef void *cairo_surface_t;
@end @end
#endif #endif

View file

@ -4,7 +4,7 @@
Written by: Richard Frith-Macdonald <rfm@gnu.org> Written by: Richard Frith-Macdonald <rfm@gnu.org>
Date: Mar 2000 Date: Mar 2000
This file is part of the GNUstep project This file is part of the GNUstep project
This library is free software; you can redistribute it and/or 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 You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
@ -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;
@ -98,7 +98,7 @@ struct XGGeneric {
} flags; } flags;
// Time of last X event // Time of last X event
Time lastTime; 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. // if the last X event time is still valid.
NSTimeInterval lastTimeStamp; NSTimeInterval lastTimeStamp;
// last reference time on X server, used to prevent time drift between // 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 */ #define _NET_WM_STATE_TOGGLE 2 /* toggle property */
#endif #endif

View file

@ -19,10 +19,10 @@
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifndef _GNUstep_H_XGInputServer #ifndef _GNUstep_H_XGInputServer
#define _GNUstep_H_XGInputServer #define _GNUstep_H_XGInputServer
@ -32,9 +32,9 @@
@protocol XInputFiltering @protocol XInputFiltering
- (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.
@ -20,10 +20,10 @@
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifndef _GNUstep_H_XGOpenGL_ #ifndef _GNUstep_H_XGOpenGL_
#define _GNUstep_H_XGOpenGL_ #define _GNUstep_H_XGOpenGL_

View file

@ -6,7 +6,7 @@
Author: Adam Fedor <fedor@gnu.org> Author: Adam Fedor <fedor@gnu.org>
Date: Mar 2002 Date: Mar 2002
This file is part of the GNUstep Backend. This file is part of the GNUstep Backend.
This library is free software; you can redistribute it and/or 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 You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
@ -67,8 +67,8 @@ typedef enum {
- (int) depthForScreen: (int)screen_number; - (int) depthForScreen: (int)screen_number;
- (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;
@ -90,7 +90,7 @@ typedef enum {
- (NSRect) _XFrameToXHints: (NSRect)o for: (void*)window; - (NSRect) _XFrameToXHints: (NSRect)o for: (void*)window;
@end @end
// Public interface for the input methods. // Public interface for the input methods.
@interface XGServer (InputMethod) @interface XGServer (InputMethod)
- (NSString *) inputMethodStyle; - (NSString *) inputMethodStyle;
- (NSString *) fontSize: (int *)size; - (NSString *) fontSize: (int *)size;

View file

@ -4,7 +4,7 @@
Written by: Adam Fedor <fedor@gnu.org> Written by: Adam Fedor <fedor@gnu.org>
Date: Nov 1999 Date: Nov 1999
This file is part of the GNU Objective C User Interface library. This file is part of the GNU Objective C User Interface library.
This library is free software; you can redistribute it and/or 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 You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
@ -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

@ -17,8 +17,8 @@
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. 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. 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

@ -20,8 +20,8 @@
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
@ -112,9 +112,9 @@
#endif // BUILD_SERVER = SERVER_x11 #endif // BUILD_SERVER = SERVER_x11
@end @end
@implementation HeadlessContext (Ops) @implementation HeadlessContext (Ops)
- (BOOL) isCompatibleBitmap: (NSBitmapImageRep*)bitmap - (BOOL) isCompatibleBitmap: (NSBitmapImageRep*)bitmap
{ {
@ -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

@ -1,6 +1,6 @@
/* /*
CairoFaceInfo.m CairoFaceInfo.m
Copyright (C) 2003 Free Software Foundation, Inc. Copyright (C) 2003 Free Software Foundation, Inc.
August 31, 2003 August 31, 2003
@ -8,7 +8,7 @@
Base on original code of Alex Malmberg Base on original code of Alex Malmberg
Rewrite: Fred Kiefer <fredkiefer@gmx.de> Rewrite: Fred Kiefer <fredkiefer@gmx.de>
Date: Jan 2006 Date: Jan 2006
This file is part of GNUstep. This file is part of GNUstep.
This library is free software; you can redistribute it and/or 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 You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include "headlesslib/HeadlessFaceInfo.h" #include "headlesslib/HeadlessFaceInfo.h"
@implementation HeadlessFaceInfo @implementation HeadlessFaceInfo
- (void) dealloc - (void) dealloc
{ {

View file

@ -1,6 +1,6 @@
/* /*
HeadlessFontEnumerator.m HeadlessFontEnumerator.m
Copyright (C) 2003 Free Software Foundation, Inc. Copyright (C) 2003 Free Software Foundation, Inc.
August 31, 2003 August 31, 2003
@ -8,7 +8,7 @@
Base on original code of Alex Malmberg Base on original code of Alex Malmberg
Rewrite: Fred Kiefer <fredkiefer@gmx.de> Rewrite: Fred Kiefer <fredkiefer@gmx.de>
Date: Jan 2006 Date: Jan 2006
This file is part of GNUstep. This file is part of GNUstep.
This library is free software; you can redistribute it and/or 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 You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include "headlesslib/HeadlessFontEnumerator.h" #include "headlesslib/HeadlessFontEnumerator.h"
#include "headlesslib/HeadlessFontInfo.h" #include "headlesslib/HeadlessFontInfo.h"
@implementation HeadlessFontEnumerator @implementation HeadlessFontEnumerator
+ (Class) faceInfoClass + (Class) faceInfoClass
{ {
@ -48,4 +48,3 @@
} }
@end @end

View file

@ -1,6 +1,6 @@
/* /*
HeadlessFontInfo.m HeadlessFontInfo.m
Copyright (C) 2003 Free Software Foundation, Inc. Copyright (C) 2003 Free Software Foundation, Inc.
August 31, 2003 August 31, 2003
@ -21,8 +21,8 @@
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
@ -36,16 +36,16 @@
typedef void *cairo_t; typedef void *cairo_t;
@implementation HeadlessFontInfo @implementation HeadlessFontInfo
- (BOOL) setupAttributes - (BOOL) setupAttributes
{ {
return YES; return YES;
} }
- (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)
@ -71,7 +71,7 @@ typedef void *cairo_t;
- (BOOL) glyphIsEncoded: (NSGlyph)glyph - (BOOL) glyphIsEncoded: (NSGlyph)glyph
{ {
/* FIXME: There is no proper way to determine with the toy font API, /* 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. and report all other glyph as existing.
return !NSEqualSizes([self advancementForGlyph: glyph], NSZeroSize); return !NSEqualSizes([self advancementForGlyph: glyph], NSZeroSize);
*/ */
@ -96,15 +96,15 @@ typedef void *cairo_t;
return 0.0; return 0.0;
} }
- (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
@ -8,7 +7,7 @@
Written by Banlu Kemiyatorn <object at gmail dot com> Written by Banlu Kemiyatorn <object at gmail dot com>
Rewrite: Fred Kiefer <fredkiefer@gmx.de> Rewrite: Fred Kiefer <fredkiefer@gmx.de>
Date: Jan 2006 Date: Jan 2006
This file is part of GNUstep. This file is part of GNUstep.
This library is free software; you can redistribute it and/or 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 You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
@ -74,7 +73,7 @@
NSZoneFree(NSDefaultMallocZone(), _base); \ NSZoneFree(NSDefaultMallocZone(), _base); \
} }
@implementation HeadlessGState @implementation HeadlessGState
+ (void) initialize + (void) initialize
{ {
@ -135,7 +134,7 @@
/* /*
* Color operations * Color operations
*/ */
- (void) GSSetPatterColor: (NSImage*)image - (void) GSSetPatterColor: (NSImage*)image
{ {
// FIXME: Create a cairo surface from the image and set it as source. // FIXME: Create a cairo surface from the image and set it as source.
[super GSSetPatterColor: image]; [super GSSetPatterColor: image];
@ -274,7 +273,7 @@
} }
- (void) DPSimage: (NSAffineTransform *)matrix : (NSInteger)pixelsWide - (void) DPSimage: (NSAffineTransform *)matrix : (NSInteger)pixelsWide
: (NSInteger)pixelsHigh : (NSInteger)bitsPerSample : (NSInteger)pixelsHigh : (NSInteger)bitsPerSample
: (NSInteger)samplesPerPixel : (NSInteger)bitsPerPixel : (NSInteger)samplesPerPixel : (NSInteger)bitsPerPixel
: (NSInteger)bytesPerRow : (BOOL)isPlanar : (NSInteger)bytesPerRow : (BOOL)isPlanar
: (BOOL)hasAlpha : (NSString *)colorSpaceName : (BOOL)hasAlpha : (NSString *)colorSpaceName
@ -286,21 +285,21 @@
{ {
} }
- (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

@ -17,8 +17,8 @@
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
@ -51,4 +51,3 @@
} }
@end @end

View file

@ -17,14 +17,14 @@
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include "headlesslib/HeadlessSurface.h" #include "headlesslib/HeadlessSurface.h"
@implementation HeadlessSurface @implementation HeadlessSurface
- (id) initWithDevice: (void *) device - (id) initWithDevice: (void *) device
{ {

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

@ -5,7 +5,7 @@
Written by: Adam Fedor <fedor@boulder.colorado.edu> Written by: Adam Fedor <fedor@boulder.colorado.edu>
Date: Nov 1998 Date: Nov 1998
This file is part of the GNU Objective C User Interface Library. This file is part of the GNU Objective C User Interface Library.
This library is free software; you can redistribute it and/or 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 You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
*/ */
#include "config.h" #include "config.h"
@ -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
@ -122,7 +122,7 @@ XGErrorHandler(Display *display, XErrorEvent *err)
} }
#if 0 #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); NSEventType eventType, NSMutableArray *event_queue);
static unichar process_char (KeySym keysym, unsigned *eventModifierFlags); static unichar process_char (KeySym keysym, unsigned *eventModifierFlags);
@ -140,7 +140,7 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym)
char *key_vector; char *key_vector;
int by,bi; int by,bi;
int key_code = XKeysymToKeycode(xEvent->xkeymap.display, key_sym); int key_code = XKeysymToKeycode(xEvent->xkeymap.display, key_sym);
if (key_code != NoSymbol) if (key_code != NoSymbol)
{ {
by = key_code / 8; by = key_code / 8;
@ -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
{ {
} }
@ -216,8 +216,8 @@ 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
@ -333,7 +333,7 @@ static unsigned int process_modifier_flags(unsigned int state)
- (void) setLastTime: (Time)last - (void) setLastTime: (Time)last
{ {
if (generic.lastTimeStamp == 0 if (generic.lastTimeStamp == 0
|| generic.baseXServerTime + MAX_TIME_DIFF * 1000 < last) || generic.baseXServerTime + MAX_TIME_DIFF * 1000 < last)
{ {
// We have not sync'ed with the clock for at least // 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 - (Time) lastTime
{ {
// 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

@ -4,7 +4,7 @@
Written by: Adam Fedor <fedor@gnu.org> Written by: Adam Fedor <fedor@gnu.org>
Date: Nov 1999 Date: Nov 1999
This file is part of GNUstep This file is part of GNUstep
This library is free software; you can redistribute it and/or 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 You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB. License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor, Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
@ -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)
@ -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. * that we want a window to have a titlebar/resize button/etc.
*/ */
@ -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
{ {
} }
@ -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 * Code to build up a NET WM icon from our application icon
*/ */
-(BOOL) _createNetIcon: (NSImage*)image -(BOOL) _createNetIcon: (NSImage*)image
result: (long**)pixeldata result: (long**)pixeldata
size: (int*)size size: (int*)size
{ {
return NO; return NO;
} }
- (void) _setNetWMIconFor: (Window) window - (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 * Return the offsets between the window content-view and it's frame
* depending on the window style. * 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 : (unsigned int) style
{ {
[self styleoffsets: l : r : t : b : style : (Window) 0]; [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 : (unsigned int) style : (Window) win
{ {
} }
@ -506,7 +506,7 @@ Bool _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
-(int) _createAppIconPixmaps -(int) _createAppIconPixmaps
{ {
return 1; return 1;
} }
- (void) orderwindow: (int)op : (NSInteger)otherWin : (NSInteger)winNum - (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 #define ALPHA_THRESHOLD 158
/* Restrict the displayed part of the window to the given image. /* 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 */ displays the image itself */
- (void) restrictWindow: (NSInteger)win toImage: (NSImage*)image - (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. */ correctly for borderless windows. Use with caution. */
- (void) movewindow: (NSPoint)loc : (NSInteger)win - (void) movewindow: (NSPoint)loc : (NSInteger)win
{ {
@ -668,7 +668,7 @@ xgps_cursor_mask(Display *xdpy, Drawable draw, const unsigned char *data,
} }
Pixmap 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) int w, int h, int colors, XColor *fg, XColor *bg)
{ {
return None; return None;
@ -714,17 +714,17 @@ xgps_cursor_image(Display *xdpy, Drawable draw, const unsigned char *data,
} }
- (NSWindowDepth) windowDepthForScreen: (int) screen_num - (NSWindowDepth) windowDepthForScreen: (int) screen_num
{ {
return 0; return 0;
} }
- (const NSWindowDepth *) availableDepthsForScreen: (int) screen_num - (const NSWindowDepth *) availableDepthsForScreen: (int) screen_num
{ {
return NULL; return NULL;
} }
- (NSSize) resolutionForScreen: (int)screen_num - (NSSize) resolutionForScreen: (int)screen_num
{ {
// NOTE: // NOTE:
// -gui now trusts the return value of resolutionForScreen:, // -gui now trusts the return value of resolutionForScreen:,
// so if it is not {72, 72} then the entire UI will be scaled. // 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 - (void) setParentWindow: (NSInteger)parentWin
forChildWindow: (NSInteger)childWin forChildWindow: (NSInteger)childWin
{ {
} }