Merge branch 'experimental_class_and_global_implementation' of https://github.com/cappuccino/cappuccino into objj_compiler2

Conflicts:
	Tools/capp/Configuration.j
This commit is contained in:
Martin Carlberg committed 2013-01-18 23:51:36 +01:00
commit f435a15b43
17 files changed
+51 -26

No files matched your search

+1 -1
View File
@@ -826,7 +826,7 @@ var copyRangeEntry = function copyRangeEntry(/*RangeEntry*/aRangeEntry)
return makeRangeEntry(CPMakeRangeCopy(aRangeEntry.range), [aRangeEntry.attributes copy]);
};
var splitRangeEntry = function splitRangeEntryAtIndex(/*RangeEntry*/aRangeEntry, /*unsigned*/anIndex)
var splitRangeEntryAtIndex = function splitRangeEntryAtIndex(/*RangeEntry*/aRangeEntry, /*unsigned*/anIndex)
{
var newRangeEntry = copyRangeEntry(aRangeEntry),
cachedIndex = CPMaxRange(aRangeEntry.range);
+1
View File
@@ -4,6 +4,7 @@
@import <Foundation/CPObject.j>
@import <Foundation/CPSet.j>
var FILE = require("file"),
SYSTEM = require("system");
+4 -3
View File
@@ -22,6 +22,8 @@
@import "Converter.j"
@import "Nib2CibKeyedUnarchiver.j"
@import "NSFont.j"
@implementation Converter (Mac)
@@ -55,9 +57,8 @@
[object setFrameOrigin:CGPointMake(CGRectGetMinX(frame), superviewHeight - CGRectGetMaxY(frame))];
var NS_autoresizingMask = [object autoresizingMask];
autoresizingMask = NS_autoresizingMask & ~(CPViewMaxYMargin | CPViewMinYMargin);
var NS_autoresizingMask = [object autoresizingMask],
autoresizingMask = NS_autoresizingMask & ~(CPViewMaxYMargin | CPViewMinYMargin);
if (!(NS_autoresizingMask & (CPViewMaxYMargin | CPViewMinYMargin | CPViewHeightSizable)))
autoresizingMask |= CPViewMinYMargin;
+2
View File
@@ -24,6 +24,8 @@
@import <AppKit/AppKit.j>
@import <BlendKit/BlendKit.j>
@global java
var FILE = require("file"),
OS = require("os"),
+2
View File
@@ -30,6 +30,8 @@
@import "NSCell.j"
@import "NSControl.j"
@global NIB_CONNECTION_EQUIVALENCY_TABLE
var NSButtonIsBorderedMask = 0x00800000,
NSButtonAllowsMixedStateMask = 0x1000000,
+2
View File
@@ -22,6 +22,8 @@
@import "Converter.j"
@global CP_NSMapClassName
var NSClassSwapperClassNames = {},
NSClassSwapperOriginalClassNames = {};
+1 -1
View File
@@ -120,7 +120,7 @@ var NSUnknownColorSpaceModel = -1,
break;
default:
CPLog.warn(@"-[%@ %s] unknown color space %d", isa, _cmd, colorSpace);
CPLog.warn(@"-[%@ %s] unknown color space %d", self.isa, _cmd, colorSpace);
result = [CPColor blackColor];
break;
}
+2 -1
View File
@@ -22,6 +22,7 @@
@import <AppKit/_CPCibCustomObject.j>
@global CP_NSMapClassName
@implementation _CPCibCustomObject (NSCoding)
@@ -51,4 +52,4 @@
return [_CPCibCustomObject class];
}
@end
@end
+2
View File
@@ -25,6 +25,8 @@
@import <AppKit/_CPCibCustomResource.j>
@global CP_NSMapClassName
var FILE = require("file"),
imageSize = require("cappuccino/imagesize").imagesize;
+2
View File
@@ -24,6 +24,8 @@
@import "NSView.j"
@global CP_NSMapClassName
var _CPCibCustomViewClassNameKey = @"_CPCibCustomViewClassNameKey";
+1
View File
@@ -25,6 +25,7 @@
@import "NSView.j"
@global NIB_CONNECTION_EQUIVALENCY_TABLE
var NSMatrixRadioModeMask = 0x40000000,
NSMatrixDrawsBackgroundMask = 0x01000000;
+3
View File
@@ -22,6 +22,9 @@
@import <AppKit/CPObjectController.j>
@global CP_NSMapClassName
@implementation CPObjectController (NSCoding)
- (id)NS_initWithCoder:(CPCoder)aCoder
+6 -6
View File
@@ -84,14 +84,14 @@
if (self)
{
_objectValue = [aCoder decodeDoubleForKey:@"NSValue"];
self._objectValue = [aCoder decodeDoubleForKey:@"NSValue"];
_minValue = [aCoder decodeDoubleForKey:@"NSMinValue"];
_maxValue = [aCoder decodeDoubleForKey:@"NSMaxValue"];
_altIncrementValue = [aCoder decodeDoubleForKey:@"NSAltIncValue"];
_isVertical = [aCoder decodeBoolForKey:@"NSVertical"];
self._minValue = [aCoder decodeDoubleForKey:@"NSMinValue"];
self._maxValue = [aCoder decodeDoubleForKey:@"NSMaxValue"];
self._altIncrementValue = [aCoder decodeDoubleForKey:@"NSAltIncValue"];
self._isVertical = [aCoder decodeBoolForKey:@"NSVertical"];
_sliderType = [aCoder decodeIntForKey:@"NSSliderType"];
self._sliderType = [aCoder decodeIntForKey:@"NSSliderType"];
}
return self;
+3 -3
View File
@@ -30,14 +30,14 @@ var NSThinDividerStyle = 2;
{
if (self = [super NS_initWithCoder:aCoder])
{
_isVertical = [aCoder decodeBoolForKey:@"NSIsVertical"];
self._isVertical = [aCoder decodeBoolForKey:@"NSIsVertical"];
// The possible values appear to be: no value (thick divider), 2 (thin divider) and 3 (pane splitter). For
// Cappuccino's purposes we treat thick divider and pane splitter as the same thing since the only difference
// seems to be graphical.
_isPaneSplitter = [aCoder decodeIntForKey:@"NSDividerStyle"] != NSThinDividerStyle;
self._isPaneSplitter = [aCoder decodeIntForKey:@"NSDividerStyle"] != NSThinDividerStyle;
_autosaveName = [aCoder decodeObjectForKey:@"NSAutosaveName"];
self._autosaveName = [aCoder decodeObjectForKey:@"NSAutosaveName"];
}
return self;
+9 -9
View File
@@ -32,17 +32,17 @@
{
var cell = [aCoder decodeObjectForKey:@"NSCell"];
_minValue = [cell minValue];
_maxValue = [cell maxValue];
_increment = [cell increment];
_valueWraps = [cell valueWraps];
_autorepeat = [cell autorepeat];
_objectValue = [cell objectValue];
self._minValue = [cell minValue];
self._maxValue = [cell maxValue];
self._increment = [cell increment];
self._valueWraps = [cell valueWraps];
self._autorepeat = [cell autorepeat];
self._objectValue = [cell objectValue];
// Convert Cocoa normal size to Cappuccino normal size.
_frame.origin.y += 2;
_frame.size.height -= 2;
_bounds.size.height -= 2;
self._frame.origin.y += 2;
self._frame.size.height -= 2;
self._bounds.size.height -= 2;
}
return self;
+6 -2
View File
@@ -22,6 +22,7 @@
@import <AppKit/_CPCibWindowTemplate.j>
@global CP_NSMapClassName
var NSBorderlessWindowMask = 0x00,
NSTitledWindowMask = 0x01,
@@ -58,7 +59,10 @@ var NSBorderlessWindowMask = 0x00,
_viewClass = [aCoder decodeObjectForKey:@"NSViewClass"]; // references the toolbar if present (anything else?)
_wtFlags = [aCoder decodeIntForKey:@"NSWTFlags"];
_windowAutorecalculatesKeyViewLoop = !!(_wtFlags & NSAutorecalculatesKeyViewLoopWTFlag);
_windowBacking = [aCoder decodeIntForKey:@"NSWindowBacking"];
// @TODO: this seems to not be used anywhere, maybe we should safely remove this
// from Antoine the 18 Jan 2013
// _windowBacking = [aCoder decodeIntForKey:@"NSWindowBacking"];
// Convert NSWindows to CPWindows.
_windowClass = CP_NSMapClassName([aCoder decodeObjectForKey:@"NSWindowClass"]);
@@ -83,7 +87,7 @@ var NSBorderlessWindowMask = 0x00,
(_windowStyleMask & NSDocModalWindowMask ? CPDocModalWindowMask : 0) |
(_windowStyleMask & NSHUDBackgroundWindowMask ? CPHUDBackgroundWindowMask : 0);
_windowIsFullBridge = [aCoder decodeObjectForKey:"NSFrameAutosaveName"] === "CPBorderlessBridgeWindowMask";
[self setFullBridge:([aCoder decodeObjectForKey:"NSFrameAutosaveName"] === "CPBorderlessBridgeWindowMask")];
/*if (![_windowClass isEqualToString:@"NSPanel"])
_windowRect.origin.y -= [NSMainMenuView menuHeight]; // compensation for the additional menu bar
+4
View File
@@ -391,6 +391,8 @@ var FILE = require("file"),
- (void)printOptions:options
{
var option;
for (option in options)
{
var value = options[option];
@@ -408,6 +410,8 @@ var FILE = require("file"),
// Merges properties in sourceOptions into targetOptions, overriding properties in targetOptions
- (void)mergeOptions:(JSObject)sourceOptions with:(JSObject)targetOptions
{
var option;
for (option in sourceOptions)
{
// Make sure only a supported option is given