diff --git a/AppKit/CPDragServer.j b/AppKit/CPDragServer.j index bd2b09a74..5190defd3 100644 --- a/AppKit/CPDragServer.j +++ b/AppKit/CPDragServer.j @@ -33,7 +33,10 @@ @global CPApp -#define DRAGGING_WINDOW(anObject) ([anObject isKindOfClass:[CPWindow class]] ? anObject : [anObject window]) +function DRAGGING_WINDOW(anObject) +{ + return ([anObject isKindOfClass:[CPWindow class]] ? anObject : [anObject window]); +} var CPDragServerPreviousEvent = nil, CPDragServerPeriodicUpdateInterval = 0.05; diff --git a/AppKit/CPOutlineView.j b/AppKit/CPOutlineView.j index 8fbd06d38..79f1cad5d 100644 --- a/AppKit/CPOutlineView.j +++ b/AppKit/CPOutlineView.j @@ -86,9 +86,15 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0, CPOutlineViewCoalesceSelectionNotificationStateOn = 1, CPOutlineViewCoalesceSelectionNotificationStateDid = 2; -#define SELECTION_SHOULD_CHANGE(anOutlineView) (!((anOutlineView)._implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_selectionShouldChangeInOutlineView_) || [(anOutlineView)._outlineViewDelegate selectionShouldChangeInOutlineView:(anOutlineView)]) +function SELECTION_SHOULD_CHANGE(anOutlineView) +{ + return (!((anOutlineView)._implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_selectionShouldChangeInOutlineView_) || [(anOutlineView)._outlineViewDelegate selectionShouldChangeInOutlineView:(anOutlineView)]); +} -#define SHOULD_SELECT_ITEM(anOutlineView, anItem) (!((anOutlineView)._implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_outlineView_shouldSelectItem_) || [(anOutlineView)._outlineViewDelegate outlineView:(anOutlineView) shouldSelectItem:(anItem)]) +function SHOULD_SELECT_ITEM(anOutlineView, anItem) +{ + return (!((anOutlineView)._implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_outlineView_shouldSelectItem_) || [(anOutlineView)._outlineViewDelegate outlineView:(anOutlineView) shouldSelectItem:(anItem)]); +} @protocol CPOutlineViewDelegate diff --git a/AppKit/CoreAnimation/CABackingStore.j b/AppKit/CoreAnimation/CABackingStore.j index 847430f62..7cde15601 100644 --- a/AppKit/CoreAnimation/CABackingStore.j +++ b/AppKit/CoreAnimation/CABackingStore.j @@ -23,7 +23,10 @@ @import "CGGeometry.j" @import "CPCompatibility.j" -#define PIXEL(pixels) pixels + "px"; +function PIXEL(pixels) +{ + return pixels + "px"; +} function CABackingStoreGetContext(aBackingStore)