Commit graph

115 commits

Author SHA1 Message Date
rfm
7a98157dc7 gnustep_global_lock is removed 2024-05-30 10:35:02 +01:00
Frederik Carlier
c6082e31db
NSGraphicsContext: Suppress incompatible pointer type warning (#250)
```
NSGraphicsContext.m:349:50: warning: incompatible pointer types sending 'Class' to parameter of type 'id<NSCopying>' [-Wincompatible-pointer-types]
      methods = [[classMethodTable objectForKey: [self class]] pointerValue];
                                                 ^~~~~~~~~~~~
/usr/local/include/Foundation/NSDictionary.h:115:26: note: passing argument to parameter 'aKey' here
  (GS_GENERIC_TYPE(KeyT))aKey;                          // Primitive
                         ^
NSGraphicsContext.m:354:37: warning: incompatible pointer types sending 'Class' to parameter of type 'id<NSCopying>' [-Wincompatible-pointer-types]
                            forKey: [self class]];
                                    ^~~~~~~~~~~~
```
2024-04-01 22:54:57 +02:00
Gregory John Casamento
969fe4c870 Add getting, additional change from branch, quick fix 2023-12-28 11:20:12 -05:00
Gregory John Casamento
9fab419042 Add shadow method to NSGraphicsContext and add set method to NSShadow 2023-12-28 06:47:25 -05:00
Riccardo Mottola
bdcced992c fix redundant semicolons 2023-11-20 22:43:49 +01:00
Frederik Carlier
bcc8011580
Avoid accessing instance variables in inline functions when compiling with msvc (#205)
* Rename `DPSshfill` to `DPSshfill_`

This method takes one argument, so by convention, the name of the variable in the method table should end with a single underscore

* DPSOperators.h: Use macros to define inline functions

* Don't access instance variables when compiling with Visual Studio
2023-10-01 22:56:02 +02:00
Frederik Carlier
eb480b7748
NSGraphicsContext: Add methods method (#179)
gnustep-back uses the `NSGraphicsContext->methods` _variable_, but using an instance variable across module boundaries is not supported when building with Visual Studio.

This commits adds a `[NSGraphicsContext methods]` _method_, which can be accessed across module boundaries (and hence when building with Visual Studio).
2023-08-01 22:39:46 +02:00
fredkiefer
b90d3a341e * Source/NSGraphicsContext.m (+graphicsContextWithGraphicsPort:flipped:):
Rewrite using an init method.
2018-09-14 22:18:16 +02:00
Richard Frith-Macdonald
ec19a2de9a Workaround for apparent clang bug calculating ivar offset into NSThread object. 2017-12-27 12:15:31 +00:00
Daniel Ferreira
257017c65f NSGraphicsContext: create -CGContext methods
Create methods which allow a graphics context to be created with a
CGContext as an equivalent to a graphics port. The context set through
this property will be used in gnustep-back.
2017-07-31 11:41:11 +01:00
Fred Kiefer
9e7ea1d911 * Source/NSGraphicsContext.m (-initWithContextInfo:): Move the
default setting into back.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@39045 72102866-910b-0410-8b05-ffd578937521
2015-10-09 00:12:47 +00:00
Fred Kiefer
c6ff85bf23 * Source/NSGraphicsContext.m (-initWithContextInfo:): Set some
default values for the graphics context.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@39017 72102866-910b-0410-8b05-ffd578937521
2015-09-25 08:34:25 +00:00
Fred Kiefer
340c7eb879 Change DPS/PS functions to CGFloat and NSInteger.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36063 72102866-910b-0410-8b05-ffd578937521
2013-02-05 19:18:49 +00:00
Fred Kiefer
e62fddeea0 Change NSBezierPath to use NSInteger and CGFloat and adjust uses to
this.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36054 72102866-910b-0410-8b05-ffd578937521
2013-02-01 14:03:08 +00:00
David Chisnall
4850a9feac Fix all current compiler warnings on FreeBSD/x86-64.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36038 72102866-910b-0410-8b05-ffd578937521
2013-01-30 09:48:54 +00:00
Eric Wasylishen
25c6770196 * Source/NSBitmapImageRep.m:
* Source/NSColor.m:
* Source/GSThemeTools.m:
* Source/NSGraphicsContext.m:
* Headers/AppKit/NSColor.h:
* Headers/AppKit/NSGraphicsContext.h:
* ColorPickers/GSGrayColorPicker.m:
* ColorPickers/GSCMYKColorPicker.m:
* ColorPickers/GSWheelColorPicker.m:
* ColorPickers/GSRGBColorPicker.m:
* ColorPickers/GSHSBColorPicker.m: Migrate float to CGFloat in
NSColor


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34070 72102866-910b-0410-8b05-ffd578937521
2011-10-26 00:21:57 +00:00
Eric Wasylishen
5f73c3f623 * Source/NSLayoutManager.m:
* Source/NSGraphicsContext.m:
* Headers/AppKit/DPSOperators.h:
* Headers/AppKit/NSGraphicsContext.h:
* Headers/Additions/GNUstepGUI/GSMethodTable.h:
New GSShowGlyphsWithAdvances, which replaces
GSShowGlyphs as the primitive text drawing method.
(used by -[NSLayoutManager drawGlyphsForGlyphRange:atPoint:])

Requires r33121 in -back.

Note that the advances aren't actually used by -back yet so
text output should be unchanged.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33122 72102866-910b-0410-8b05-ffd578937521
2011-05-26 03:55:55 +00:00
Fred Kiefer
2223f0009b Release the stack, as it is retained in the thread dictionary.
Leak found by static code analyser.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32493 72102866-910b-0410-8b05-ffd578937521
2011-03-07 21:18:19 +00:00
Nicola Pero
05820e79ac Minor tidyup for new Objective-C runtimes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31786 72102866-910b-0410-8b05-ffd578937521
2010-12-27 12:03:56 +00:00
David Chisnall
8e026b8e66 Remove use of old runtime function.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31284 72102866-910b-0410-8b05-ffd578937521
2010-09-09 23:39:23 +00:00
Quentin Mathe
9be1f4da8e Fixed many drawing issues (many ones being related to the flipping).
See bug report #27782

In particular, fixed -[NSImage drawXXX] and -[NSImage composite/dissolveXXX] 
methods to work exactly as Cocoa when the Cairo backend is used.
Added a new draw operator (in addition to composite) to the backend. Cairo is 
the only backend that implements it for now.
Eliminated as many flipping checks as possible.

Warning: Untested with the winlib backend. 
You must update, recompile and install both Back and Gui.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30523 72102866-910b-0410-8b05-ffd578937521
2010-06-01 11:04:36 +00:00
David Chisnall
c6866f8c8a Lots of small tweaks to make -gui compile without warnings with clang.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30119 72102866-910b-0410-8b05-ffd578937521
2010-04-10 20:33:30 +00:00
David Chisnall
a9ba2e5e77 Removed all uses of @defs() from -gui, so it now compiles cleanly with the non-fragile ABI. All ivars that must be accessed from other classes are now wrapped in PACKAGE_SCOPE. With clang, this expands to @package, with GCC it expands to @public.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30045 72102866-910b-0410-8b05-ffd578937521
2010-03-27 00:01:03 +00:00
Fred Kiefer
00ab729bdd Next bit of #include -> #import replacement.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30029 72102866-910b-0410-8b05-ffd578937521
2010-03-24 09:18:14 +00:00
Fred Kiefer
054405e8f3 Add gradient methods on graphics context.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28872 72102866-910b-0410-8b05-ffd578937521
2009-10-23 19:58:22 +00:00
Fred Kiefer
b9b3df0631 Try to deal with the case when there is no current context.
May happen in secondard threads. Fixes #25943.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28133 72102866-910b-0410-8b05-ffd578937521
2009-03-25 08:40:38 +00:00
Adam Fedor
7afdd32ac1 Revert library license version to 2 until applications can be converted
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26619 72102866-910b-0410-8b05-ffd578937521
2008-06-10 04:01:49 +00:00
Fred Kiefer
dc90d0fdfd Better handling of the circular references between the graphics context
and the window.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26539 72102866-910b-0410-8b05-ffd578937521
2008-05-18 23:12:24 +00:00
Fred Kiefer
e87446b5cb Implement basic appendBezierPathWithPackedGlyphs: handling to forward to
the backend.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26435 72102866-910b-0410-8b05-ffd578937521
2008-04-07 13:45:41 +00:00
Fred Kiefer
99e9f5a69e New Apple methods on NSGraphicsContext and rework of window device
setting. Requires corresponding change in back!


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25980 72102866-910b-0410-8b05-ffd578937521
2008-01-19 13:11:16 +00:00
Richard Frith-MacDonald
daadcc3536 Fixup for visibility correction in latest NSThread
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25609 72102866-910b-0410-8b05-ffd578937521
2007-11-25 14:49:23 +00:00
Fred Kiefer
00a7c05d91 Add binding implementation.
Clean up table view decoding.
Move image draw code to back.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25602 72102866-910b-0410-8b05-ffd578937521
2007-11-22 12:15:50 +00:00
Fred Kiefer
56b6a0ff3e Do all bitmap image drawing via GSDrawImage:: to allow better
implementations in backends.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25600 72102866-910b-0410-8b05-ffd578937521
2007-11-22 10:47:33 +00:00
Fred Kiefer
193e31e678 Change all files to use GPL 3 and LGPL 3.
Prepare for next release.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25536 72102866-910b-0410-8b05-ffd578937521
2007-10-29 21:16:17 +00:00
Fred Kiefer
86d97a419f Moved all printing output code to NSGraphicsContext.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25268 72102866-910b-0410-8b05-ffd578937521
2007-06-18 12:49:04 +00:00
Richard Frith-MacDonald
2eede887c5 Window frame/coordinate handling cleanups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23460 72102866-910b-0410-8b05-ffd578937521
2006-09-12 09:49:54 +00:00
Richard Frith-Macdonald
7971a89c72 Coding style fixups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22019 72102866-910b-0410-8b05-ffd578937521
2005-11-16 11:34:25 +00:00
Fred Kiefer
d54180c5bb Added methods for pattern colour and alpha image composition.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21436 72102866-910b-0410-8b05-ffd578937521
2005-07-08 23:51:49 +00:00
Adam Fedor
303dd1baf9 Update FSF Address.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21259 72102866-910b-0410-8b05-ffd578937521
2005-05-26 02:52:46 +00:00
Adrian Robert
f90da49627 undeprecate DPSxshow, yshow, xyshow, ashow, widthshow, awidthshow
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21001 72102866-910b-0410-8b05-ffd578937521
2005-03-29 14:07:38 +00:00
Alexander Malmberg
9cd4d1cc7f Document GSReadRect and update users.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19801 72102866-910b-0410-8b05-ffd578937521
2004-07-30 13:58:03 +00:00
Adam Fedor
50ed66958a Implement GSReadRect and initWithFocusedViewRect:
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17687 72102866-910b-0410-8b05-ffd578937521
2003-09-20 02:57:45 +00:00
David Ayers
b18f1c4ac4 Header reorganization - Please refer to ChangeLog
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17408 72102866-910b-0410-8b05-ffd578937521
2003-07-31 23:52:10 +00:00
Richard Frith-Macdonald
32fce62555 Final tweaks?
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17305 72102866-910b-0410-8b05-ffd578937521
2003-07-22 17:25:32 +00:00
Richard Frith-Macdonald
5d38cbe75d Tidyups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17276 72102866-910b-0410-8b05-ffd578937521
2003-07-21 09:59:52 +00:00
Adam Fedor
6be9174933 Include <> -> ""
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16917 72102866-910b-0410-8b05-ffd578937521
2003-06-13 15:01:12 +00:00
Alexander Malmberg
52308a0016 Add shfill operator.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16743 72102866-910b-0410-8b05-ffd578937521
2003-05-17 22:04:00 +00:00
Alexander Malmberg
9b5e901493 Clean up some prototypes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15714 72102866-910b-0410-8b05-ffd578937521
2003-01-26 17:49:35 +00:00
Fred Kiefer
2322b909f3 Rewrote [GSSendBezierPath:] to send the full path to the
backend. Code comes from [NSBezierPath _doPath].


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15037 72102866-910b-0410-8b05-ffd578937521
2002-11-21 20:27:44 +00:00
Adam Fedor
06a5c62fa5 Load prolog.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14863 72102866-910b-0410-8b05-ffd578937521
2002-10-29 03:46:39 +00:00