Commit Graph

46 Commits

Author SHA1 Message Date
Christopher Lloyd
a73db3310f - split CoreGraphics out into it's own framework project. AppKit still embeds CoreGraphics but it is also built standalone on Foundation. (don't link against both)
- new experimental AppKit-MacOS-i386 target which sits on Apple's Foundation, ApplicationServices (not operational). Header&api usage fixes to clean this up.
- Redid NSBezierPath so it doesn't rely on private Cocotron CoreGraphics API.
- Change the NSRaise macros/functions to be inline so AppKit can just include it instead of depending on them in Foundation since they aren't present in OSX.
- split NSRaiseException() into it's own Foundation private header and removed use from AppKit.
- changed use of NSRangeEntries so AppKit can embed it on MacOS
- switched NSOutlineView use of NSInt*CallBacks to NSInteger*CallBacks
- added CGPDFContext and CGDataConsumer
2009-06-05 03:16:46 +00:00
Christopher Lloyd
e52ddce7e3 More NS(U)Integer conversion, missing va_end's 2009-05-21 15:44:14 +00:00
Christopher Lloyd
53acf47923 - mass change of unsigned/int to NSUInteger/NSInteger in Foundation and assorted type changes for 64-bit
- Added Darwin x86_64 Foundation/objc target for 64-bit compile testing
2009-05-19 17:14:03 +00:00
Christopher Lloyd
97a4048fb2 Updated towards Objective-C 2.0 runtime API and some decoupling of objc runtime from Foundation
- added 2.0 objc/runtime.h, message.h with most of the declarations
- added deprecated.h for deprecated declarations
- cleanup objc-class.h to use standard naming for structs
- moved FOUNDATION_EXPORT to NSObjCRuntime.h
- deleted ObjCTypes.h, ObjectiveC.h
- moved Object.h/Protocol.h to objc headers
- added method.m, ivar.m for method_ and ivar_ functions
- Changed all use of deprecated SELNAME to sel_getName
- Changed use of OBJCLog in Foundation to replacement NSCLog
- Changed most all the equivalent OBJC* names to 2.0 function names
- rename OBJCIsKindOfClass to NSObjectIsKindOfClass, move to NSObject.m
- removed empty OBJCReportStatistics, objc_lock.h
2009-04-07 00:17:26 +00:00
Johannes Fortmann
4eb6a80fdb _NSObservableArray unit test and many fixes
KVO now ignores '.' in keypaths starting with '@'
2009-02-10 18:04:33 +00:00
Johannes Fortmann
e0a2271ee0 added objc_allocateClassPair/objc_registerClassPair; use them in KVO 2009-02-08 13:50:30 +00:00
Johannes Fortmann
e128ab7814 don't touch methodLists anymore 2009-02-08 13:33:24 +00:00
Christopher Lloyd
1c63fe1afe - Issue #250 patch by tobias at platen-software.de, NSURLConnection, KVC, string patch. 2009-01-31 14:56:04 +00:00
Johannes Fortmann
a1ace363cb - NSBundle memory leak fix
- NSObject memory leak fix (LookupAndCache assumes cache has been checked)
- spin lock fix
- plist writing accepts NSNumbers
- KVO doesn't call out for setObservationInfo:
- TTFFont cache
- CairoContext etc. deallocs
- various X11 fixes
2009-01-02 12:04:01 +00:00
Johannes Fortmann
de8c881d98 - made descriptionWithLocale:indent: slightly more sensible
- NSNull is now singleton
- KVC now throws NSUndefinedKeyException
- KVO now throws correct exceptions on unknown observed keys; cleans up in failure case
- ObjCHashTable.h unix line endings; sensible string compare (before was downright wacky)
2008-12-09 12:19:43 +00:00
Johannes Fortmann
3f1a57e96d - first take on NSDictionaryController
- bugfix in NSString+KVCAdditions
- NSOpenGLView initWithFrame:pixelFormat: calls super initWithFrame:
- NSBinder conditionallySetsEnabled checks for setEnabled: method, not setEditable:
- NSMultipleValueBinder catches exceptions during per-cell set
- NSNib tries to load nibs compiled from .xib file
2008-12-03 11:51:16 +00:00
Johannes Fortmann
bd7bac37fa some more KVO selectors
NSPopUpButton selectedObject/selectedValue bindings
plugtwo's table view fix
2008-12-02 10:52:22 +00:00
Johannes Fortmann
6c63c1bff6 small fixes in NSMutableArray private function and KVC 2008-10-12 09:50:41 +00:00
Johannes Fortmann
0bfcf7f5b2 NSUserDefaultsController implemented
fix for direct instance variable access without automatic notification
NSButtonCell now accepts numerical value of strings as object value
2008-09-26 14:40:02 +00:00
Johannes Fortmann
4d5bbae1b0 small fix for KVO -className
Retain/Release and message torture test
cmpxchg in method caching
2008-09-23 16:46:32 +00:00
Johannes Fortmann
2e78ea50f8 - reduced @synchronized lock contention by using several locks depending on object address; no lock needed for release
- some warning fixes
- NSSegmentedControl/Cell implemented (no images yet)
2008-09-14 20:34:48 +00:00
Christopher Lloyd
2af7a837be - Some initial work for NSURLConnection supporting http, added NSCachedURLResponse, NSURLProtocol_http,NSURLConnectionState classes.
- Changed use of KGPDFPage to CGPDFPageRef in AppKit
- Support in KGDataProvider loading from a file
- Support in KGImage for releasing underlying data if reloadable from data provider
- KGPaint_radialGradient fixups
2008-07-18 17:07:22 +00:00
Johannes Fortmann
289c66689a - several KVC/KVO fixes for the new compiler's signatures (which include stack offsets; it's no longer a good idea to compare function call signatures with @encode signatures)
- small improvements to NSRecursiveLock and NSValue
2008-07-09 19:44:16 +00:00
Johannes Fortmann
eadf769593 fix for KVO: removing the last observer would trigger a setObservationInfo:nil,
which would access the already-released observationInfo dictionary
2008-05-17 13:08:22 +00:00
Christopher Lloyd
d1f381cc6f - Issue #114 patch by steph...@sente.ch, fixes for compiler warnings 2008-05-15 14:00:27 +00:00
Christopher Lloyd
e64bcd2609 - NSAlert implemented
- NSButton expanded to match doc.s, NSCell, NSButtonCell attributedTitle work
2008-05-13 18:43:48 +00:00
Johannes Fortmann
adf903d705 assorted stuff:
- NSThread memory race fix
- trivial hash implemented for several classes
- NSSet setByAddingObjectsFromSet:, NSCountedSet isEqual:
- KVC optimizations, support for keyPathsForValuesAffectingValueForKey: and KVO notifications for subclasses of NSMutableDictionary
2008-05-13 17:23:00 +00:00
Christopher Lloyd
98306ebf1a - Issue #79,m John Engelhart's NSPlatform_darwin.m additions
- Cleaned up Linux/Darwin build warnings/errors
2008-05-01 14:34:20 +00:00
Johannes Fortmann
78c737cd18 Fix for KVC memory leak; found by Dirk Theisen 2008-04-30 13:25:47 +00:00
Johannes Fortmann
aa7eae87c1 - KVO fix for @encode expressions with offsets
- NSMenu doesn't call setEnabled: if "enabled" is bound
2008-04-27 15:02:13 +00:00
Johannes Fortmann
883037c847 Unit tests are back, this time without any BSD code.
NSDistributedNotificationCenter to have SenTestingKit compile cleanly
NSString stringByAppendingPathExtension won't build strings like SomeDir\.extension, making them SomeDir.extension instead to match Apple impl.
2008-04-18 13:27:16 +00:00
Johannes Fortmann
8c40b0c046 - license boilerplate fixes
- NSDelayedPerform, NSOrderedPerform wrap exceptions, retain arguments
- NSSavePanel beginSheetForDirectory: implemented. Running the panel is detached to another thread to preserve instant-return semantics of Apple AppKit; this is experimental.
- some other small stuff
2008-04-15 14:03:15 +00:00
Johannes Fortmann
532e5084c3 setProperty now releases old property
fix for c++ destructors in Linux
renamed instance variables in binder classes
2008-03-31 16:11:19 +00:00
Johannes Fortmann
7c822ee1dc - NSAutoreleasePool -drain as alias for -release
- _NSPrintForDebugger (so po works in gdb)
- NSFastEnumerationState, countByEnumeratingWithState: in NSArray and NSEnumerator (protocol probably needs its own file)
- KVC accessors _key, isKey, _isKey
- objc_setProperty
- C++ constructors are only called if CLASS_HAS_CXX_STRUCTORS is set on the class
- small NSObjectController KVO deps fix
2008-03-28 18:47:18 +00:00
Johannes Fortmann
d54accc0e9 - KVO dependent key would overwrite each other before. Fixed.
- if NSDebugEnabled is set, KVO will emit diagnostics for methods which look like setters but have the wrong signature
- NSArrayController selectionIndex and friends now fire the right change messages
- NSPopUpButton content, contentValues and selectionIndex bindings now work
2008-03-20 17:26:13 +00:00
Christopher Lloyd
d204ace317 - Issue #75, Johannes Fortmann's C++ constructor and bindings patch:
With this patch, the .cxx_construct and .cxx_destruct methods will be called on NSAllocateObject/NSDeallocateObject. Note that you'll have to run gcc with -fobjc-call-cxx-cdtors to have these methods created.
Additionally, there are some KVO and bindings fixes:
- observing a change inside a hierarchy would give the wrong object as being changed
- array operator @sum implemented
- NSArrayController selectedObjects now depends on selection
- some additional binding parameters implemented
2008-03-12 19:25:28 +00:00
Christopher Lloyd
e331c69257 - Issue #74, Johannes Fortmann's To-Many support for KVO patch:
Attached patch will enable KVO to act on insertIn<Key>, removeFrom<Key> and replaceIn<Key> messages. Old/New values and index sets will be attached to the change dictionary as documented by Apple. Also implemented are the Leopard options NSKeyValueObservingOptionPrior and NSKeyValueObservingOptionInitial.
2008-03-12 18:06:32 +00:00
Christopher Lloyd
6ba570c3fc - Johannes Fortmann's Nov 8, 2007 patch and NSControllerSelectionProxy.h/.m for binding and controllers
- Rolf Jansen's fixes for r56 regression
2007-11-11 02:21:42 +00:00
Christopher Lloyd
e5c2e1c5b5 - Issue 47 fix by Rolf Jansen, %f formatting bug fixes
- NSApplication*ActiveNotification's behavior implemented
- gcc 4.2.1 compiler warnings reduced
- First pass at PDF output, -[NSView dataWithPDFInsideRect:], and underlying NSPrintOperation, KGPDFContext and KGPDF* code functional but not complete (text, images and shadings not functional)
- Cleanup of KGContext,KGGraphicsState to be more general/abstract, moved KGRendering/DeviceContext into Win32
- NSCachedImageRep changed to use NSWindow instead of CGLayer
2007-10-15 18:08:57 +00:00
Christopher Lloyd
a286b26947 - Added Darwin-i386 and Darwin-ppc targets to Foundation and objc
- Added platform_darwin and appropriate classes
- Reduced compiler warnings for the Linux, Solaris, Darwin targets.
2007-07-05 19:06:44 +00:00
Christopher Lloyd
4303498e18 + Johannes Fortmann's bindings patch:
- deep KVO is routed through public addObserver: function now, which
means that observing values on an array now throws the exception as it
should.
- NSArrayController now returns _NSObservableArray class, which allows
observing values on array objects. Observing operators is supported,
but will fire change notifications even though no change (i.e.
@max.value fires everytime a value changes, not only in case the
maximum changes)
- binding options are respected for a few values
- defaults for binding options can be specified on a per-class basis
through a plist
- multi-value bindings work (in an extremely limited way)
- binding a table column against an array not provided by the table's
NSArrayController works
- column bindings create suitable sort descriptor prototypes
- clicking a column header changes the table view's sort descriptors
2007-05-19 03:47:03 +00:00
Christopher Lloyd
cd3770ede4 + Johannes Fortmann's bindings patch:
- deep KVO is routed through public addObserver: function now, which
means that observing values on an array now throws the exception as it
should.
- NSArrayController now returns _NSObservableArray class, which allows
observing values on array objects. Observing operators is supported,
but will fire change notifications even though no change (i.e.
@max.value fires everytime a value changes, not only in case the
maximum changes)
- binding options are respected for a few values
- defaults for binding options can be specified on a per-class basis
through a plist
- multi-value bindings work (in an extremely limited way)
- binding a table column against an array not provided by the table's
NSArrayController works
- column bindings create suitable sort descriptor prototypes
- clicking a column header changes the table view's sort descriptors
2007-05-17 15:01:54 +00:00
Christopher Lloyd
e346fd856b + Johannes Fortmann's patch:
- table view editing
- fine-grained bindings for table columns
- NSArray objectsAtIndexes:
- some fixes for KVO

+ Rolf Jansen's NSSortDescriptor initWithCoder/encodeWithCoder
+ Rolf Jansen's NSCell/NSButtonCell controlSize patch
2007-05-14 13:15:31 +00:00
Christopher Lloyd
f365a502da - NSGeometry.m, Rolf Jansen's NSIntegralRect, NSOffsetRect implementation
- cleaned up warnings
2007-05-12 16:17:43 +00:00
Christopher Lloyd
ccf3b51e72 Johannes Fortmann's KVC/KVO/KVB patch:
- KVC now works for methods prefixed with '_'
- KVC works properly on NSDictionary, NSArray
- KVO on NSArray throws; addObserver:toObjectsAtIndexes implemented
- NSArrayController arrangedObjects property; probably many bugs,
incomplete
- NSArrayController selection property; dito. set and get work; merges
values to NSMultipleValuesMarker etc.
- NSBinder now has support for a replacement key path. e.g. on a color
well, you bind against "value", but the corresponding key is named
"color". The method -(NSString*)_replacementKeyPathForBinding:
(NSString*)binding should return "color" in this case if "value" is
passed in.
- helper methods to get all used bindings; moved
_binderClassForBinding: to class scope
- _NSTableColumnBinder as supporting class for bindings of the form
column -> arrangedObjects.name
- _NSTableViewContentBinder as supporting class for bindings of the
form tableView.content -> arrangedObjects
- changes for NSTableView to use NSIndexSet for row selection
- changes for NSTableView to utilize the support classes instead of
its data source if applicable
- NSNull copyWithZone implemented
2007-05-11 12:49:23 +00:00
Christopher Lloyd
1ceab3e309 - Added Johannes Fortmann's NSNibBindingConnector, Binders.zip changes into AppKit/binders/ and KVO fixes
- Added Rolf Jansen's color and font panel nibs which fix layout issues with the new button frame adjustment

- Moved nib loading functionality to NSNib, NSNibLoading now uses NSNib
- Fixed NSFileHandle_posix.m not importing NSRaise.h
- NS*Controller header templates
- First pass at NSSortDescriptor
- Preliminary work on NSPredicate et al
2007-04-10 16:31:07 +00:00
Christopher Lloyd
d170ea9a3c - Fixed build warnings in NSTextView and KVO 2007-04-06 02:39:50 +00:00
Christopher Lloyd
1e6d2bb42a - Added Rolf Jansen's NSCell, NSButtonCell, NSButton patches for more button types and mixed state
- Implemented NSDisclosureBezelStyle in NSButtonCell in default theme

- Improved layout and more drawing with UxTheme

- Added Johannes Fortmann's KVO fixes from April 5th

- Fixed Linux/Unix header, linking and runtime problems reported by Anthony Beurivé
2007-04-06 01:43:26 +00:00
Christopher Lloyd
64055fe034 - Added Johannes Fortmann's KVC fixes and KVO implementation
- Cleaned up objc runtime/headers so that the differences between the KVO implementation for Cocotron vs. Apple runtime are a much smaller.

- Fixed issue 20 for pointer and non-retained object NSValue's.

- Fixed issue 19, NSSelectorFromString so that it registers unknown selectors

- Added Dirk Theisen's concrete NSDirectoryEnumerator and NSClassDescription implementation

- added more NSURL* methods.

- moved some control drawing into a new class NSGraphicsStyle which is responsible for control drawing in the current theme. NSGraphicsStyle implements the default theme and subclasses draw whatever look they want.

- preliminary support for the XP and above UxTheme API in the class NSGraphicsStyle_uxtheme, some controls will do native themed drawing now. Layout/highlighting is not perfect.
2007-04-02 14:40:36 +00:00
Christopher Lloyd
333c7fba83 NSFileWrapper - Dirk Theisen has contributed an initial NSFileWrapper implementation. Thanks Dirk!
NSAssertionHandler - header added for NSFileWrapper

The various NSStream concrete classes have a first pass implementation: NSInputStream_socket, NSOutputStream_socket, NSInputStream_data, NSOutputStream_data , NSOutputStream_buffer, NSInputStream_file, NSOutputStream_file

The socket monitor/callback system has been overhauled to fix known problems going forward with socket based streams and distributed objects. This consists mainly of decoupling the select() management from the callback management allowing for accurate select() status across run loop mode changes and multiple callback monitors per socket. The major platform differences (windows vs. unix) were separated into their own files instead of the previous #ifdef mess. The NSInputSource system in the run loop was cleaned up to accommodate the new socket system and future additions.

These classes were deleted: NSSocketSet, NSSocketMonitorSet, NSSocketDescriptor, NSSocketMonitor, NSSocketMonitorSet_Windows, NSSocketInputSource_windows, NSSocketMonitorSet_Unix

And were replaced with: NSSocket, NSSocket_windows, NSSocket_bsd, NSSelectSet, NSSelectSet_windows, NSSelectSet_bsd , NSSelectInputSourceSet, NSSelectInputSource

NSTask and NSFileHandle on Linux/Solaris are affected by this as they were using the old socket monitoring system to look for background events and have been upgraded to the new one.

NSHandleMonitorSet_win32 upgraded with NSInputSource upgrade.

NSError - first pass implemented to assist with NSStream implementation.

-[NSMutableSet setSet:] - implemented

Cleared up some of the Linux/Solaris compiler warnings
2007-01-17 04:23:24 +00:00
Christopher Lloyd
d971345b27 First pass at key value coding from issues 6 and 7, addition of objc framework 2007-01-02 17:52:07 +00:00