├── Tools ├── steam │ ├── sjheader.txt │ ├── steam.xml │ ├── htaccess │ ├── steam │ └── build.xml ├── Utilities │ ├── bsf.jar │ ├── js.jar │ ├── commons-logging-1.1.jar │ ├── ant-apache-bsf-1.7.0.jar │ └── regex-bridge.js ├── objjc │ ├── shrinksafe.jar │ ├── objjc │ └── build.xml ├── NibApp │ ├── Resources │ │ └── spinner.gif │ ├── MainMenu.nib │ │ └── keyedobjects.nib │ ├── main.j │ ├── Info.plist │ ├── index.html │ └── AppController.j ├── SubEthaEdit │ └── Objective-J.mode.zip ├── TextMate │ └── JavaScript Objective-J.tmbundle.zip ├── ojunit │ ├── README │ ├── ojtest │ └── build.xml ├── NewApplication │ ├── main.j │ ├── Info.plist │ ├── index.html │ ├── index-debug.html │ └── AppController.j ├── nib2cib │ ├── NSFoundation.j │ ├── build.xml │ ├── nib2cib.steam │ ├── NSArray.j │ ├── NSSet.j │ ├── WebView.j │ ├── NSResponder.j │ ├── NSMenu.j │ ├── NSSplitView.j │ ├── NSCustomObject.j │ ├── NSColorWell.j │ ├── NSCustomView.j │ ├── NSClipView.j │ ├── NSFont.j │ ├── NSTabViewItem.j │ ├── NSCustomResource.j │ ├── NSControl.j │ ├── nib2cib │ ├── NSTabView.j │ ├── NSScroller.j │ ├── NSAppKit.j │ ├── NSScrollView.j │ ├── NSToolbar.j │ ├── NSNibConnector.j │ ├── NSPopUpButton.j │ ├── NSTextField.j │ ├── NSSlider.j │ └── NSMenuItem.j ├── build.xml ├── bake │ ├── bake │ ├── build.xml │ ├── example.bakefile │ └── bake_template.html ├── cplutil │ ├── cplutil │ ├── build.xml │ └── cplutil.js ├── press │ ├── press │ └── build.xml ├── READMEs │ └── STARTER-README ├── Install │ └── install-tools └── objj │ ├── objj │ └── build.xml ├── .gitignore ├── AppKit ├── CPControl.j ├── Resources │ ├── wheel.png │ ├── color_well.png │ ├── kuler_button.png │ ├── slider_button.png │ ├── wheel_black.png │ ├── wheel_button.png │ ├── brightness_bar.png │ ├── kuler_button_h.png │ ├── slider_button_h.png │ ├── wheel_button_h.png │ ├── CPApplication │ │ ├── New.png │ │ ├── Open.png │ │ ├── Save.png │ │ ├── NewHighlighted.png │ │ ├── OpenHighlighted.png │ │ └── SaveHighlighted.png │ ├── FIXME_ImageShadow.png │ ├── CPAlert │ │ ├── dialog-error.png │ │ ├── dialog-warning.png │ │ └── dialog-information.png │ ├── HUDTheme │ │ ├── WindowClose.png │ │ └── WindowCloseActive.png │ ├── CPWindowResizeIndicator.png │ ├── CPWindow │ │ ├── CPWindowShadow0.png │ │ ├── CPWindowShadow1.png │ │ ├── CPWindowShadow2.png │ │ ├── CPWindowShadow3.png │ │ ├── CPWindowShadow4.png │ │ ├── CPWindowShadow5.png │ │ ├── CPWindowShadow6.png │ │ ├── CPWindowShadow7.png │ │ ├── CPWindowShadow8.png │ │ ├── HUD │ │ │ ├── CPWindowHUDBackground0.png │ │ │ ├── CPWindowHUDBackground1.png │ │ │ ├── CPWindowHUDBackground2.png │ │ │ ├── CPWindowHUDBackground3.png │ │ │ ├── CPWindowHUDBackground4.png │ │ │ ├── CPWindowHUDBackground5.png │ │ │ ├── CPWindowHUDBackground6.png │ │ │ ├── CPWindowHUDBackground7.png │ │ │ └── CPWindowHUDBackground8.png │ │ └── Standard │ │ │ ├── CPWindowStandardTop0.png │ │ │ ├── CPWindowStandardTop1.png │ │ │ ├── CPWindowStandardTop2.png │ │ │ ├── CPWindowStandardCloseButton.png │ │ │ └── CPWindowStandardCLoseButtonHighlighted.png │ ├── CPButton │ │ ├── CPButtonHUDRegular0.png │ │ ├── CPButtonHUDRegular1.png │ │ ├── CPButtonHUDRegular2.png │ │ ├── CPButtonRoundRectRegular0.png │ │ ├── CPButtonRoundRectRegular1.png │ │ ├── CPButtonRoundRectRegular2.png │ │ ├── CPButtonHUDRegularHighlighted0.png │ │ ├── CPButtonHUDRegularHighlighted1.png │ │ ├── CPButtonHUDRegularHighlighted2.png │ │ ├── CPButtonTexturedRoundedRegular0.png │ │ ├── CPButtonTexturedRoundedRegular1.png │ │ ├── CPButtonTexturedRoundedRegular2.png │ │ ├── CPButtonRoundRectRegularHighlighted0.png │ │ ├── CPButtonRoundRectRegularHighlighted1.png │ │ ├── CPButtonRoundRectRegularHighlighted2.png │ │ ├── CPButtonTexturedRoundedRegularHighlighted0.png │ │ ├── CPButtonTexturedRoundedRegularHighlighted1.png │ │ └── CPButtonTexturedRoundedRegularHighlighted2.png │ ├── CPMenuItem │ │ ├── CPMenuItemOnState.png │ │ └── CPMenuItemOnStateHighlighted.png │ ├── CPSlider │ │ ├── CPSliderKnobRegular.png │ │ ├── CPSliderKnobRegularPushed.png │ │ ├── CPSliderTrackHorizontalCenter.png │ │ ├── CPSliderTrackHorizontalLeft.png │ │ └── CPSliderTrackHorizontalRight.png │ ├── _CPMenuWindow │ │ ├── _CPMenuWindow1.png │ │ ├── _CPMenuWindow3.png │ │ ├── _CPMenuWindow4.png │ │ ├── _CPMenuWindow5.png │ │ ├── _CPMenuWindow7.png │ │ ├── _CPMenuWindowRounded0.png │ │ ├── _CPMenuWindowRounded2.png │ │ ├── _CPMenuWindowRounded6.png │ │ ├── _CPMenuWindowRounded8.png │ │ ├── _CPMenuWindowMoreAbove.png │ │ └── _CPMenuWindowMoreBelow.png │ ├── CPTabView │ │ ├── CPTabViewBezelBorder.png │ │ ├── _CPTabLabelsViewLeft.png │ │ ├── _CPTabLabelSelectedLeft.png │ │ ├── _CPTabLabelsViewCenter.png │ │ ├── _CPTabLabelsViewRight.png │ │ ├── CPTabViewBezelBorderLeft.png │ │ ├── CPTabViewBezelBorderRight.png │ │ ├── _CPTabLabelBackgroundLeft.png │ │ ├── _CPTabLabelSelectedCenter.png │ │ ├── _CPTabLabelSelectedRight.png │ │ ├── _CPTabLabelBackgroundCenter.png │ │ ├── _CPTabLabelBackgroundRight.png │ │ └── CPTabViewBezelBackgroundCenter.png │ ├── CPImageView │ │ ├── CPImageViewLeftShadow.png │ │ ├── CPImageViewTopShadow.png │ │ ├── CPImageViewBottomShadow.png │ │ ├── CPImageViewRightShadow.png │ │ ├── CPImageViewTopLeftShadow.png │ │ ├── CPImageViewTopRightShadow.png │ │ ├── CPImageViewBottomLeftShadow.png │ │ └── CPImageViewBottomRightShadow.png │ ├── CPPopUpButton │ │ └── CPPopUpButtonArrows.png │ ├── CPShadowView │ │ ├── CPShadowViewHeavyTop.png │ │ ├── CPShadowViewLightTop.png │ │ ├── CPShadowViewHeavyLeft.png │ │ ├── CPShadowViewHeavyRight.png │ │ ├── CPShadowViewLightLeft.png │ │ ├── CPShadowViewLightRight.png │ │ ├── CPShadowViewHeavyBottom.png │ │ ├── CPShadowViewHeavyTopLeft.png │ │ ├── CPShadowViewHeavyTopRight.png │ │ ├── CPShadowViewLightBottom.png │ │ ├── CPShadowViewLightTopLeft.png │ │ ├── CPShadowViewLightTopRight.png │ │ ├── CPShadowViewHeavyBottomLeft.png │ │ ├── CPShadowViewLightBottomLeft.png │ │ ├── CPShadowViewHeavyBottomRight.png │ │ └── CPShadowViewLightBottomRight.png │ ├── CPSplitView │ │ ├── CPSplitViewHorizontal.png │ │ └── CPSplitViewVertical.png │ ├── CPTextField │ │ ├── CPTextFieldBezelSquare0.png │ │ ├── CPTextFieldBezelSquare1.png │ │ ├── CPTextFieldBezelSquare2.png │ │ ├── CPTextFieldBezelSquare3.png │ │ ├── CPTextFieldBezelSquare4.png │ │ ├── CPTextFieldBezelSquare5.png │ │ ├── CPTextFieldBezelSquare6.png │ │ ├── CPTextFieldBezelSquare7.png │ │ ├── CPTextFieldBezelSquare8.png │ │ ├── CPTextFieldBezelRounded0.png │ │ ├── CPTextFieldBezelRounded1.png │ │ └── CPTextFieldBezelRounded2.png │ ├── CPToolbarItem │ │ ├── CPToolbarItemSeparator0.png │ │ ├── CPToolbarItemSeparator1.png │ │ └── CPToolbarItemSeparator2.png │ ├── CPScroller │ │ ├── CPScrollerKnobVerticalSmall0.png │ │ ├── CPScrollerKnobVerticalSmall1.png │ │ ├── CPScrollerKnobVerticalSmall2.png │ │ ├── CPScrollerKnobHorizontalRegular0.png │ │ ├── CPScrollerKnobHorizontalRegular1.png │ │ ├── CPScrollerKnobHorizontalRegular2.png │ │ ├── CPScrollerKnobSlotVerticalSmall.png │ │ ├── CPScrollerKnobVerticalRegular0.png │ │ ├── CPScrollerKnobVerticalRegular1.png │ │ ├── CPScrollerKnobVerticalRegular2.png │ │ ├── CPScrollerKnobSlotVerticalRegular.png │ │ ├── CPScrollerDecrementArrowVerticalSmall.png │ │ ├── CPScrollerIncrementArrowVerticalSmall.png │ │ ├── CPScrollerKnobSlotHorizontalRegular.png │ │ ├── CPScrollerDecrementArrowVerticalRegular.png │ │ ├── CPScrollerIncrementArrowVerticalRegular.png │ │ ├── CPScrollerDecrementArrowHorizontalRegular.png │ │ ├── CPScrollerIncrementArrowHorizontalRegular.png │ │ ├── CPScrollerDecrementArrowVerticalSmallHighlighted.png │ │ ├── CPScrollerIncrementArrowVerticalSmallHighlighted.png │ │ ├── CPScrollerDecrementArrowHorizontalRegularHighlighted.png │ │ ├── CPScrollerDecrementArrowVerticalRegularHighlighted.png │ │ ├── CPScrollerIncrementArrowHorizontalRegularHighlighted.png │ │ └── CPScrollerIncrementArrowVerticalRegularHighlighted.png │ ├── _CPToolbarView │ │ ├── _CPToolbarViewBackground.png │ │ ├── _CPToolbarViewExtraItemsImage.png │ │ └── _CPToolbarViewExtraItemsAlternateImage.png │ ├── _CPMenuBarWindow │ │ └── _CPMenuBarWindowBackground.png │ ├── _CPWindowView │ │ └── _CPWindowViewResizeIndicator.png │ └── CPProgressIndicator │ │ ├── CPProgressIndicatorBarBarRegular.png │ │ ├── CPProgressIndicatorBarHUDBarSmall.png │ │ ├── CPProgressIndicatorSpinningStyleRegular.gif │ │ ├── CPProgressIndicatorBezelBorderBarRegular0.png │ │ ├── CPProgressIndicatorBezelBorderBarRegular1.png │ │ ├── CPProgressIndicatorBezelBorderBarRegular2.png │ │ ├── CPProgressIndicatorBezelBorderHUDBarSmall0.png │ │ ├── CPProgressIndicatorBezelBorderHUDBarSmall1.png │ │ └── CPProgressIndicatorBezelBorderHUDBarSmall2.png ├── Info.plist ├── Cib │ ├── _CPCibKeyedUnarchiver.j │ ├── _CPCibCustomObject.j │ ├── _CPCibLoading.j │ └── _CPCibCustomResource.j ├── Platform │ └── Platform.h ├── build.xml ├── CPWindow │ ├── _CPBorderlessWindowView.j │ └── _CPBorderlessBridgeWindowView.j ├── CPFlashMovie.j ├── CoreAnimation │ ├── CAFlashLayer.j │ └── CABackingStore.j ├── CoreGraphics │ └── CGGradient.j ├── AppKit.steam ├── AppKit.j ├── CPGraphicsContext.j └── CPShadow.j ├── Tests ├── README ├── Objective-J │ ├── sprintfTest.j │ └── base64Test.j └── Foundation │ ├── CPDateTest.j │ └── CPCountedSetTest.j ├── Foundation ├── Info.plist ├── build.xml ├── Foundation.steam ├── CPCountedSet.j ├── CPEnumerator.j ├── Resources │ └── log.css ├── CPPropertyListSerialization.j ├── CPNull.j ├── CPObjJRuntime.j ├── CPURLResponse.j ├── Foundation.j ├── CPData.j └── CPUserSessionManager.j └── Objective-J ├── license.txt ├── bootstrap.js ├── Object.j ├── exception.js └── build.xml /Tools/steam/sjheader.txt: -------------------------------------------------------------------------------- 1 | @STATIC;1.0; -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | Frameworks 3 | -------------------------------------------------------------------------------- /AppKit/CPControl.j: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/CPControl.j -------------------------------------------------------------------------------- /Tools/Utilities/bsf.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/Tools/Utilities/bsf.jar -------------------------------------------------------------------------------- /Tools/Utilities/js.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/Tools/Utilities/js.jar -------------------------------------------------------------------------------- /AppKit/Resources/wheel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/wheel.png -------------------------------------------------------------------------------- /Tools/objjc/shrinksafe.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/Tools/objjc/shrinksafe.jar -------------------------------------------------------------------------------- /AppKit/Resources/color_well.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/color_well.png -------------------------------------------------------------------------------- /AppKit/Resources/kuler_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/kuler_button.png -------------------------------------------------------------------------------- /AppKit/Resources/slider_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/slider_button.png -------------------------------------------------------------------------------- /AppKit/Resources/wheel_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/wheel_black.png -------------------------------------------------------------------------------- /AppKit/Resources/wheel_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/wheel_button.png -------------------------------------------------------------------------------- /Tools/NibApp/Resources/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/Tools/NibApp/Resources/spinner.gif -------------------------------------------------------------------------------- /AppKit/Resources/brightness_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/brightness_bar.png -------------------------------------------------------------------------------- /AppKit/Resources/kuler_button_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/kuler_button_h.png -------------------------------------------------------------------------------- /AppKit/Resources/slider_button_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/slider_button_h.png -------------------------------------------------------------------------------- /AppKit/Resources/wheel_button_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/wheel_button_h.png -------------------------------------------------------------------------------- /AppKit/Resources/CPApplication/New.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPApplication/New.png -------------------------------------------------------------------------------- /AppKit/Resources/CPApplication/Open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPApplication/Open.png -------------------------------------------------------------------------------- /AppKit/Resources/CPApplication/Save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPApplication/Save.png -------------------------------------------------------------------------------- /AppKit/Resources/FIXME_ImageShadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/FIXME_ImageShadow.png -------------------------------------------------------------------------------- /Tools/SubEthaEdit/Objective-J.mode.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/Tools/SubEthaEdit/Objective-J.mode.zip -------------------------------------------------------------------------------- /Tools/Utilities/commons-logging-1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/Tools/Utilities/commons-logging-1.1.jar -------------------------------------------------------------------------------- /AppKit/Resources/CPAlert/dialog-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPAlert/dialog-error.png -------------------------------------------------------------------------------- /AppKit/Resources/HUDTheme/WindowClose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/HUDTheme/WindowClose.png -------------------------------------------------------------------------------- /Tools/Utilities/ant-apache-bsf-1.7.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/Tools/Utilities/ant-apache-bsf-1.7.0.jar -------------------------------------------------------------------------------- /AppKit/Resources/CPAlert/dialog-warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPAlert/dialog-warning.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindowResizeIndicator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindowResizeIndicator.png -------------------------------------------------------------------------------- /Tools/NibApp/MainMenu.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/Tools/NibApp/MainMenu.nib/keyedobjects.nib -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/CPWindowShadow0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/CPWindowShadow0.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/CPWindowShadow1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/CPWindowShadow1.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/CPWindowShadow2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/CPWindowShadow2.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/CPWindowShadow3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/CPWindowShadow3.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/CPWindowShadow4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/CPWindowShadow4.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/CPWindowShadow5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/CPWindowShadow5.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/CPWindowShadow6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/CPWindowShadow6.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/CPWindowShadow7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/CPWindowShadow7.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/CPWindowShadow8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/CPWindowShadow8.png -------------------------------------------------------------------------------- /AppKit/Resources/CPAlert/dialog-information.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPAlert/dialog-information.png -------------------------------------------------------------------------------- /AppKit/Resources/CPApplication/NewHighlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPApplication/NewHighlighted.png -------------------------------------------------------------------------------- /AppKit/Resources/CPButton/CPButtonHUDRegular0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPButton/CPButtonHUDRegular0.png -------------------------------------------------------------------------------- /AppKit/Resources/CPButton/CPButtonHUDRegular1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPButton/CPButtonHUDRegular1.png -------------------------------------------------------------------------------- /AppKit/Resources/CPButton/CPButtonHUDRegular2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPButton/CPButtonHUDRegular2.png -------------------------------------------------------------------------------- /AppKit/Resources/CPMenuItem/CPMenuItemOnState.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPMenuItem/CPMenuItemOnState.png -------------------------------------------------------------------------------- /AppKit/Resources/CPSlider/CPSliderKnobRegular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPSlider/CPSliderKnobRegular.png -------------------------------------------------------------------------------- /AppKit/Resources/HUDTheme/WindowCloseActive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/HUDTheme/WindowCloseActive.png -------------------------------------------------------------------------------- /AppKit/Resources/_CPMenuWindow/_CPMenuWindow1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/_CPMenuWindow/_CPMenuWindow1.png -------------------------------------------------------------------------------- /AppKit/Resources/_CPMenuWindow/_CPMenuWindow3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/_CPMenuWindow/_CPMenuWindow3.png -------------------------------------------------------------------------------- /AppKit/Resources/_CPMenuWindow/_CPMenuWindow4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/_CPMenuWindow/_CPMenuWindow4.png -------------------------------------------------------------------------------- /AppKit/Resources/_CPMenuWindow/_CPMenuWindow5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/_CPMenuWindow/_CPMenuWindow5.png -------------------------------------------------------------------------------- /AppKit/Resources/_CPMenuWindow/_CPMenuWindow7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/_CPMenuWindow/_CPMenuWindow7.png -------------------------------------------------------------------------------- /AppKit/Resources/CPApplication/OpenHighlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPApplication/OpenHighlighted.png -------------------------------------------------------------------------------- /AppKit/Resources/CPApplication/SaveHighlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPApplication/SaveHighlighted.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTabView/CPTabViewBezelBorder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTabView/CPTabViewBezelBorder.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTabView/_CPTabLabelsViewLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTabView/_CPTabLabelsViewLeft.png -------------------------------------------------------------------------------- /Tools/TextMate/JavaScript Objective-J.tmbundle.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/Tools/TextMate/JavaScript Objective-J.tmbundle.zip -------------------------------------------------------------------------------- /AppKit/Resources/CPImageView/CPImageViewLeftShadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPImageView/CPImageViewLeftShadow.png -------------------------------------------------------------------------------- /AppKit/Resources/CPImageView/CPImageViewTopShadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPImageView/CPImageViewTopShadow.png -------------------------------------------------------------------------------- /AppKit/Resources/CPPopUpButton/CPPopUpButtonArrows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPPopUpButton/CPPopUpButtonArrows.png -------------------------------------------------------------------------------- /AppKit/Resources/CPShadowView/CPShadowViewHeavyTop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPShadowView/CPShadowViewHeavyTop.png -------------------------------------------------------------------------------- /AppKit/Resources/CPShadowView/CPShadowViewLightTop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPShadowView/CPShadowViewLightTop.png -------------------------------------------------------------------------------- /AppKit/Resources/CPSplitView/CPSplitViewHorizontal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPSplitView/CPSplitViewHorizontal.png -------------------------------------------------------------------------------- /AppKit/Resources/CPSplitView/CPSplitViewVertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPSplitView/CPSplitViewVertical.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTabView/_CPTabLabelSelectedLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTabView/_CPTabLabelSelectedLeft.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTabView/_CPTabLabelsViewCenter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTabView/_CPTabLabelsViewCenter.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTabView/_CPTabLabelsViewRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTabView/_CPTabLabelsViewRight.png -------------------------------------------------------------------------------- /AppKit/Resources/CPButton/CPButtonRoundRectRegular0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPButton/CPButtonRoundRectRegular0.png -------------------------------------------------------------------------------- /AppKit/Resources/CPButton/CPButtonRoundRectRegular1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPButton/CPButtonRoundRectRegular1.png -------------------------------------------------------------------------------- /AppKit/Resources/CPButton/CPButtonRoundRectRegular2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPButton/CPButtonRoundRectRegular2.png -------------------------------------------------------------------------------- /AppKit/Resources/CPImageView/CPImageViewBottomShadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPImageView/CPImageViewBottomShadow.png -------------------------------------------------------------------------------- /AppKit/Resources/CPImageView/CPImageViewRightShadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPImageView/CPImageViewRightShadow.png -------------------------------------------------------------------------------- /AppKit/Resources/CPShadowView/CPShadowViewHeavyLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPShadowView/CPShadowViewHeavyLeft.png -------------------------------------------------------------------------------- /AppKit/Resources/CPShadowView/CPShadowViewHeavyRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPShadowView/CPShadowViewHeavyRight.png -------------------------------------------------------------------------------- /AppKit/Resources/CPShadowView/CPShadowViewLightLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPShadowView/CPShadowViewLightLeft.png -------------------------------------------------------------------------------- /AppKit/Resources/CPShadowView/CPShadowViewLightRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPShadowView/CPShadowViewLightRight.png -------------------------------------------------------------------------------- /AppKit/Resources/CPSlider/CPSliderKnobRegularPushed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPSlider/CPSliderKnobRegularPushed.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTabView/CPTabViewBezelBorderLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTabView/CPTabViewBezelBorderLeft.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTabView/CPTabViewBezelBorderRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTabView/CPTabViewBezelBorderRight.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTabView/_CPTabLabelBackgroundLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTabView/_CPTabLabelBackgroundLeft.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTabView/_CPTabLabelSelectedCenter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTabView/_CPTabLabelSelectedCenter.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTabView/_CPTabLabelSelectedRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTabView/_CPTabLabelSelectedRight.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTextField/CPTextFieldBezelSquare0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTextField/CPTextFieldBezelSquare0.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTextField/CPTextFieldBezelSquare1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTextField/CPTextFieldBezelSquare1.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTextField/CPTextFieldBezelSquare2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTextField/CPTextFieldBezelSquare2.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTextField/CPTextFieldBezelSquare3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTextField/CPTextFieldBezelSquare3.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTextField/CPTextFieldBezelSquare4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTextField/CPTextFieldBezelSquare4.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTextField/CPTextFieldBezelSquare5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTextField/CPTextFieldBezelSquare5.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTextField/CPTextFieldBezelSquare6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTextField/CPTextFieldBezelSquare6.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTextField/CPTextFieldBezelSquare7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTextField/CPTextFieldBezelSquare7.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTextField/CPTextFieldBezelSquare8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTextField/CPTextFieldBezelSquare8.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground0.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground1.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground2.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground3.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground4.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground5.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground6.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground7.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/HUD/CPWindowHUDBackground8.png -------------------------------------------------------------------------------- /AppKit/Resources/_CPMenuWindow/_CPMenuWindowRounded0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/_CPMenuWindow/_CPMenuWindowRounded0.png -------------------------------------------------------------------------------- /AppKit/Resources/_CPMenuWindow/_CPMenuWindowRounded2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/_CPMenuWindow/_CPMenuWindowRounded2.png -------------------------------------------------------------------------------- /AppKit/Resources/_CPMenuWindow/_CPMenuWindowRounded6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/_CPMenuWindow/_CPMenuWindowRounded6.png -------------------------------------------------------------------------------- /AppKit/Resources/_CPMenuWindow/_CPMenuWindowRounded8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/_CPMenuWindow/_CPMenuWindowRounded8.png -------------------------------------------------------------------------------- /AppKit/Resources/CPImageView/CPImageViewTopLeftShadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPImageView/CPImageViewTopLeftShadow.png -------------------------------------------------------------------------------- /AppKit/Resources/CPImageView/CPImageViewTopRightShadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPImageView/CPImageViewTopRightShadow.png -------------------------------------------------------------------------------- /AppKit/Resources/CPShadowView/CPShadowViewHeavyBottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPShadowView/CPShadowViewHeavyBottom.png -------------------------------------------------------------------------------- /AppKit/Resources/CPShadowView/CPShadowViewHeavyTopLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPShadowView/CPShadowViewHeavyTopLeft.png -------------------------------------------------------------------------------- /AppKit/Resources/CPShadowView/CPShadowViewHeavyTopRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPShadowView/CPShadowViewHeavyTopRight.png -------------------------------------------------------------------------------- /AppKit/Resources/CPShadowView/CPShadowViewLightBottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPShadowView/CPShadowViewLightBottom.png -------------------------------------------------------------------------------- /AppKit/Resources/CPShadowView/CPShadowViewLightTopLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPShadowView/CPShadowViewLightTopLeft.png -------------------------------------------------------------------------------- /AppKit/Resources/CPShadowView/CPShadowViewLightTopRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPShadowView/CPShadowViewLightTopRight.png -------------------------------------------------------------------------------- /AppKit/Resources/CPSlider/CPSliderTrackHorizontalCenter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPSlider/CPSliderTrackHorizontalCenter.png -------------------------------------------------------------------------------- /AppKit/Resources/CPSlider/CPSliderTrackHorizontalLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPSlider/CPSliderTrackHorizontalLeft.png -------------------------------------------------------------------------------- /AppKit/Resources/CPSlider/CPSliderTrackHorizontalRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPSlider/CPSliderTrackHorizontalRight.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTabView/_CPTabLabelBackgroundCenter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTabView/_CPTabLabelBackgroundCenter.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTabView/_CPTabLabelBackgroundRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTabView/_CPTabLabelBackgroundRight.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTextField/CPTextFieldBezelRounded0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTextField/CPTextFieldBezelRounded0.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTextField/CPTextFieldBezelRounded1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTextField/CPTextFieldBezelRounded1.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTextField/CPTextFieldBezelRounded2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTextField/CPTextFieldBezelRounded2.png -------------------------------------------------------------------------------- /AppKit/Resources/CPToolbarItem/CPToolbarItemSeparator0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPToolbarItem/CPToolbarItemSeparator0.png -------------------------------------------------------------------------------- /AppKit/Resources/CPToolbarItem/CPToolbarItemSeparator1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPToolbarItem/CPToolbarItemSeparator1.png -------------------------------------------------------------------------------- /AppKit/Resources/CPToolbarItem/CPToolbarItemSeparator2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPToolbarItem/CPToolbarItemSeparator2.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/Standard/CPWindowStandardTop0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/Standard/CPWindowStandardTop0.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/Standard/CPWindowStandardTop1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/Standard/CPWindowStandardTop1.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/Standard/CPWindowStandardTop2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/Standard/CPWindowStandardTop2.png -------------------------------------------------------------------------------- /AppKit/Resources/_CPMenuWindow/_CPMenuWindowMoreAbove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/_CPMenuWindow/_CPMenuWindowMoreAbove.png -------------------------------------------------------------------------------- /AppKit/Resources/_CPMenuWindow/_CPMenuWindowMoreBelow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/_CPMenuWindow/_CPMenuWindowMoreBelow.png -------------------------------------------------------------------------------- /AppKit/Resources/CPButton/CPButtonHUDRegularHighlighted0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPButton/CPButtonHUDRegularHighlighted0.png -------------------------------------------------------------------------------- /AppKit/Resources/CPButton/CPButtonHUDRegularHighlighted1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPButton/CPButtonHUDRegularHighlighted1.png -------------------------------------------------------------------------------- /AppKit/Resources/CPButton/CPButtonHUDRegularHighlighted2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPButton/CPButtonHUDRegularHighlighted2.png -------------------------------------------------------------------------------- /AppKit/Resources/CPButton/CPButtonTexturedRoundedRegular0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPButton/CPButtonTexturedRoundedRegular0.png -------------------------------------------------------------------------------- /AppKit/Resources/CPButton/CPButtonTexturedRoundedRegular1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPButton/CPButtonTexturedRoundedRegular1.png -------------------------------------------------------------------------------- /AppKit/Resources/CPButton/CPButtonTexturedRoundedRegular2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPButton/CPButtonTexturedRoundedRegular2.png -------------------------------------------------------------------------------- /AppKit/Resources/CPImageView/CPImageViewBottomLeftShadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPImageView/CPImageViewBottomLeftShadow.png -------------------------------------------------------------------------------- /AppKit/Resources/CPImageView/CPImageViewBottomRightShadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPImageView/CPImageViewBottomRightShadow.png -------------------------------------------------------------------------------- /AppKit/Resources/CPMenuItem/CPMenuItemOnStateHighlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPMenuItem/CPMenuItemOnStateHighlighted.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerKnobVerticalSmall0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerKnobVerticalSmall0.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerKnobVerticalSmall1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerKnobVerticalSmall1.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerKnobVerticalSmall2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerKnobVerticalSmall2.png -------------------------------------------------------------------------------- /AppKit/Resources/CPShadowView/CPShadowViewHeavyBottomLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPShadowView/CPShadowViewHeavyBottomLeft.png -------------------------------------------------------------------------------- /AppKit/Resources/CPShadowView/CPShadowViewLightBottomLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPShadowView/CPShadowViewLightBottomLeft.png -------------------------------------------------------------------------------- /AppKit/Resources/CPTabView/CPTabViewBezelBackgroundCenter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPTabView/CPTabViewBezelBackgroundCenter.png -------------------------------------------------------------------------------- /AppKit/Resources/_CPToolbarView/_CPToolbarViewBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/_CPToolbarView/_CPToolbarViewBackground.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerKnobHorizontalRegular0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerKnobHorizontalRegular0.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerKnobHorizontalRegular1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerKnobHorizontalRegular1.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerKnobHorizontalRegular2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerKnobHorizontalRegular2.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerKnobSlotVerticalSmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerKnobSlotVerticalSmall.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerKnobVerticalRegular0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerKnobVerticalRegular0.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerKnobVerticalRegular1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerKnobVerticalRegular1.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerKnobVerticalRegular2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerKnobVerticalRegular2.png -------------------------------------------------------------------------------- /AppKit/Resources/CPShadowView/CPShadowViewHeavyBottomRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPShadowView/CPShadowViewHeavyBottomRight.png -------------------------------------------------------------------------------- /AppKit/Resources/CPShadowView/CPShadowViewLightBottomRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPShadowView/CPShadowViewLightBottomRight.png -------------------------------------------------------------------------------- /AppKit/Resources/_CPMenuBarWindow/_CPMenuBarWindowBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/_CPMenuBarWindow/_CPMenuBarWindowBackground.png -------------------------------------------------------------------------------- /AppKit/Resources/_CPWindowView/_CPWindowViewResizeIndicator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/_CPWindowView/_CPWindowViewResizeIndicator.png -------------------------------------------------------------------------------- /AppKit/Resources/CPButton/CPButtonRoundRectRegularHighlighted0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPButton/CPButtonRoundRectRegularHighlighted0.png -------------------------------------------------------------------------------- /AppKit/Resources/CPButton/CPButtonRoundRectRegularHighlighted1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPButton/CPButtonRoundRectRegularHighlighted1.png -------------------------------------------------------------------------------- /AppKit/Resources/CPButton/CPButtonRoundRectRegularHighlighted2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPButton/CPButtonRoundRectRegularHighlighted2.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerKnobSlotVerticalRegular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerKnobSlotVerticalRegular.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/Standard/CPWindowStandardCloseButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/Standard/CPWindowStandardCloseButton.png -------------------------------------------------------------------------------- /AppKit/Resources/_CPToolbarView/_CPToolbarViewExtraItemsImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/_CPToolbarView/_CPToolbarViewExtraItemsImage.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerDecrementArrowVerticalSmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerDecrementArrowVerticalSmall.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerIncrementArrowVerticalSmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerIncrementArrowVerticalSmall.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerKnobSlotHorizontalRegular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerKnobSlotHorizontalRegular.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerDecrementArrowVerticalRegular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerDecrementArrowVerticalRegular.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerIncrementArrowVerticalRegular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerIncrementArrowVerticalRegular.png -------------------------------------------------------------------------------- /AppKit/Resources/CPButton/CPButtonTexturedRoundedRegularHighlighted0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPButton/CPButtonTexturedRoundedRegularHighlighted0.png -------------------------------------------------------------------------------- /AppKit/Resources/CPButton/CPButtonTexturedRoundedRegularHighlighted1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPButton/CPButtonTexturedRoundedRegularHighlighted1.png -------------------------------------------------------------------------------- /AppKit/Resources/CPButton/CPButtonTexturedRoundedRegularHighlighted2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPButton/CPButtonTexturedRoundedRegularHighlighted2.png -------------------------------------------------------------------------------- /AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarBarRegular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarBarRegular.png -------------------------------------------------------------------------------- /AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarHUDBarSmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBarHUDBarSmall.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerDecrementArrowHorizontalRegular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerDecrementArrowHorizontalRegular.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerIncrementArrowHorizontalRegular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerIncrementArrowHorizontalRegular.png -------------------------------------------------------------------------------- /AppKit/Resources/_CPToolbarView/_CPToolbarViewExtraItemsAlternateImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/_CPToolbarView/_CPToolbarViewExtraItemsAlternateImage.png -------------------------------------------------------------------------------- /AppKit/Resources/CPWindow/Standard/CPWindowStandardCLoseButtonHighlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPWindow/Standard/CPWindowStandardCLoseButtonHighlighted.png -------------------------------------------------------------------------------- /Tools/ojunit/README: -------------------------------------------------------------------------------- 1 | OJUnit resides in a separate repository. This build.xml pulls it from that repo: 2 | 3 | git://github.com/280north/ojunit.git 4 | 5 | Project page: 6 | 7 | http://github.com/280north/ojunit -------------------------------------------------------------------------------- /AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleRegular.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleRegular.gif -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerDecrementArrowVerticalSmallHighlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerDecrementArrowVerticalSmallHighlighted.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerIncrementArrowVerticalSmallHighlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerIncrementArrowVerticalSmallHighlighted.png -------------------------------------------------------------------------------- /AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderBarRegular0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderBarRegular0.png -------------------------------------------------------------------------------- /AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderBarRegular1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderBarRegular1.png -------------------------------------------------------------------------------- /AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderBarRegular2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderBarRegular2.png -------------------------------------------------------------------------------- /AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderHUDBarSmall0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderHUDBarSmall0.png -------------------------------------------------------------------------------- /AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderHUDBarSmall1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderHUDBarSmall1.png -------------------------------------------------------------------------------- /AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderHUDBarSmall2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorBezelBorderHUDBarSmall2.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerDecrementArrowHorizontalRegularHighlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerDecrementArrowHorizontalRegularHighlighted.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerDecrementArrowVerticalRegularHighlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerDecrementArrowVerticalRegularHighlighted.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerIncrementArrowHorizontalRegularHighlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerIncrementArrowHorizontalRegularHighlighted.png -------------------------------------------------------------------------------- /AppKit/Resources/CPScroller/CPScrollerIncrementArrowVerticalRegularHighlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/cappuccino/master/AppKit/Resources/CPScroller/CPScrollerIncrementArrowVerticalRegularHighlighted.png -------------------------------------------------------------------------------- /Tests/README: -------------------------------------------------------------------------------- 1 | Requires objj be installed, as well as ojunit, located at http://github.com/280north/ojunit 2 | 3 | Run individual tests using a command similar to the following: 4 | 5 | objj ojunit/OJTestRunnerText.j cappuccino/Tests/Foundation/CPDateTest.j 6 | -------------------------------------------------------------------------------- /Tools/NewApplication/main.j: -------------------------------------------------------------------------------- 1 | /* 2 | * main.j 3 | * 4 | * Created by __Me__ on __Date__. 5 | * Copyright 2008 __MyCompanyName__. All rights reserved. 6 | */ 7 | 8 | @import 9 | @import 10 | 11 | @import "AppController.j" 12 | 13 | 14 | function main(args, namedArgs) 15 | { 16 | CPApplicationMain(args, namedArgs); 17 | } 18 | -------------------------------------------------------------------------------- /Tools/NibApp/main.j: -------------------------------------------------------------------------------- 1 | // 2 | // main.j 3 | // Editor 4 | // 5 | // Created by Francisco Tolmasky on May 21, 2008. 6 | // Copyright 2005 - 2008, 280 North, Inc. All rights reserved. 7 | // 8 | 9 | import 10 | import 11 | 12 | import "AppController.j" 13 | 14 | 15 | CPLogRegister(CPLogPopup); 16 | 17 | function main(args, namedArgs) 18 | { 19 | CPApplicationMain(args, namedArgs); 20 | } -------------------------------------------------------------------------------- /Tools/NibApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CPApplicationDelegateClass 6 | AppController 7 | CPBundleName 8 | NibApp 9 | CPPrincipalClass 10 | CPApplication 11 | 12 | 13 | -------------------------------------------------------------------------------- /Tools/NewApplication/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CPApplicationDelegateClass 6 | AppController 7 | CPBundleName 8 | Hello World 9 | CPPrincipalClass 10 | CPApplication 11 | 12 | 13 | -------------------------------------------------------------------------------- /Tools/steam/steam.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /AppKit/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CPBundleIdentifier 6 | com.280n.AppKit 7 | CPBundleInfoDictionaryVersion 8 | 6.0 9 | CPBundleName 10 | AppKit 11 | CPBundlePackageType 12 | FMWK 13 | 14 | 15 | -------------------------------------------------------------------------------- /Foundation/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CPBundleIdentifier 6 | com.280n.Foundation 7 | CPBundleInfoDictionaryVersion 8 | 6.0 9 | CPBundleName 10 | Foundation 11 | CPBundlePackageType 12 | FMWK 13 | 14 | 15 | -------------------------------------------------------------------------------- /Tools/steam/htaccess: -------------------------------------------------------------------------------- 1 | Options +FollowSymLinks 2 | 3 | AddEncoding x-gzip .gz 4 | AddType text/plain .gz 5 | 6 | RewriteEngine on 7 | 8 | # These conditions slow down the requests significantly. We can probably assume they're always true. 9 | # We should ensure the gzipped version always exists if we include this .htaccess. All supported browsers accept gzip encoding. 10 | #RewriteCond %{REQUEST_FILENAME}.gz -f 11 | #RewriteCond %{HTTP:Accept-Encoding} gzip 12 | RewriteRule ^(.*\.(sj|js))$ %{REQUEST_URI}/../$1.gz 13 | -------------------------------------------------------------------------------- /Tests/Objective-J/sprintfTest.j: -------------------------------------------------------------------------------- 1 | // TODO: add many many more of these... 2 | var sprintfTestCases = [ 3 | [["[%@]", "hello world"], "[hello world]"], 4 | [["[%d]", 123], "[123]"], 5 | [["[%f]", 123.1234], "[123.1234]"], 6 | [["[%d]", 123.1234], "[123]"] 7 | ]; 8 | 9 | @implementation sprintfTest : OJTestCase 10 | 11 | - (void)test_sprintf 12 | { 13 | for (var i = 0; i < sprintfTestCases.length; i++) 14 | { 15 | [self assert:sprintf.apply(null, sprintfTestCases[i][0]) equals:sprintfTestCases[i][1]]; 16 | } 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Foundation/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Foundation/Foundation.steam: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Name 6 | Foundation 7 | Targets 8 | 9 | 10 | Name 11 | Foundation 12 | 13 | 14 | Configurations 15 | 16 | 17 | Name 18 | Debug 19 | Flags 20 | -DDEBUG -g 21 | 22 | 23 | Name 24 | Release 25 | Flags 26 | -O 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Tools/NibApp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 15 | 16 | 17 | Nib App 18 | 19 | 20 | 21 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /Objective-J/license.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * Objective-J.js 3 | * Objective-J 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | -------------------------------------------------------------------------------- /Tools/nib2cib/NSFoundation.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSFoundation.j 3 | * nib2cib 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import "NSArray.j" 24 | -------------------------------------------------------------------------------- /Tools/nib2cib/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /AppKit/Cib/_CPCibKeyedUnarchiver.j: -------------------------------------------------------------------------------- 1 | 2 | @import 3 | 4 | 5 | @implementation _CPCibKeyedUnarchiver : CPKeyedUnarchiver 6 | { 7 | CPBundle _bundle; 8 | } 9 | 10 | - (id)initForReadingWithData:(CPData)data bundle:(CPBundle)aBundle 11 | { 12 | self = [super initForReadingWithData:data]; 13 | 14 | if (self) 15 | { 16 | _bundle = aBundle; 17 | 18 | [self setDelegate:self]; 19 | } 20 | 21 | return self; 22 | } 23 | 24 | - (CPBundle)bundle 25 | { 26 | return _bundle; 27 | } 28 | 29 | - (id)unarchiver:(CPKeyedUnarchiver)aKeyedUnarchiver didDecodeObject:(id)anObject 30 | { 31 | if ([anObject respondsToSelector:@selector(_cibInstantiate)]) 32 | return [anObject _cibInstantiate]; 33 | 34 | return anObject; 35 | } 36 | 37 | - (void)replaceObjectAtUID:(int)aUID withObject:(id)anObject 38 | { 39 | _objects[aUID] = anObject; 40 | } 41 | 42 | - (id)objectAtUID:(int)aUID 43 | { 44 | return _objects[aUID]; 45 | } 46 | 47 | @end -------------------------------------------------------------------------------- /AppKit/Platform/Platform.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Platform.j 3 | * AppKit 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | #define PLATFORM(FEATURE) (defined( PLATFORM_##FEATURE ) && PLATFORM_##FEATURE) 24 | -------------------------------------------------------------------------------- /Tools/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Tools/NibApp/AppController.j: -------------------------------------------------------------------------------- 1 | 2 | import 3 | import 4 | 5 | 6 | @implementation AppController : CPObject 7 | { 8 | CPWindow _window; 9 | CPView _view; 10 | } 11 | 12 | - (void)applicationDidFinishLaunching:(CPNotification)aNotification 13 | { 14 | var cib = [[CPCib alloc] initWithContentsOfURL:@"MainMenu.cib"], 15 | theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask], 16 | contentView = [theWindow contentView]; 17 | 18 | [cib instantiateCibWithExternalNameTable:[CPDictionary dictionaryWithObject:self forKey:CPCibOwner]]; 19 | 20 | [_view setBackgroundColor:[CPColor colorWithCalibratedRed:0.7 green:0.77 blue:0.85 alpha:1.0]]; 21 | 22 | [contentView addSubview:_view]; 23 | [theWindow orderFront:self]; 24 | 25 | // HACK: shift the window down to accomodate for menubar 26 | [theWindow setFrameOrigin:CGPointMake([theWindow frame].origin.x, [theWindow frame].origin.y + 29)]; 27 | } 28 | 29 | @end -------------------------------------------------------------------------------- /Objective-J/bootstrap.js: -------------------------------------------------------------------------------- 1 | /* 2 | * bootstrap.js 3 | * Objective-J 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | if (window.OBJJ_MAIN_FILE) 24 | objj_import(OBJJ_MAIN_FILE, YES, function() { main(); }); 25 | -------------------------------------------------------------------------------- /Tools/objjc/objjc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # if OBJJ_HOME isn't set, try to determine it 4 | if [ -z $OBJJ_HOME ]; then 5 | # get path of the executable 6 | SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH=$SELF_PATH/$(basename -- "$0") 7 | 8 | # resolve symlinks 9 | if [ -h $SELF_PATH ]; then 10 | SELF_PATH=`readlink $SELF_PATH` 11 | fi 12 | 13 | # get second ancestor directory 14 | SELF_DIR=`dirname $SELF_PATH` 15 | export OBJJ_HOME=`dirname $SELF_DIR` 16 | 17 | # check to ensure it exists, print message 18 | if [ -d $OBJJ_HOME ]; then 19 | echo "OBJJ_HOME not set, defaulting to $OBJJ_HOME" 1>&2 20 | else 21 | echo "OBJJ_HOME not set, default at $OBJJ_HOME doesn't exist, exiting" 1>&2 22 | exit 2 23 | fi 24 | fi 25 | 26 | OBJJ_LIB="$OBJJ_HOME/lib" 27 | CLASSPATH="$OBJJ_LIB:$OBJJ_LIB/js.jar" 28 | 29 | # convert paths for Cygwin 30 | if [[ `uname` == CYGWIN* ]]; then 31 | CLASSPATH=`cygpath -wp "$CLASSPATH"` 32 | fi 33 | 34 | java -classpath $CLASSPATH objjc $@ 35 | -------------------------------------------------------------------------------- /Tools/bake/bake: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # if OBJJ_HOME isn't set, try to determine it 4 | if [ -z $OBJJ_HOME ]; then 5 | # get path of the executable 6 | SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH=$SELF_PATH/$(basename -- "$0") 7 | 8 | # resolve symlinks 9 | if [ -h $SELF_PATH ]; then 10 | SELF_PATH=`readlink $SELF_PATH` 11 | fi 12 | 13 | # get second ancestor directory 14 | SELF_DIR=`dirname $SELF_PATH` 15 | export OBJJ_HOME=`dirname $SELF_DIR` 16 | 17 | # check to ensure it exists, print message 18 | if [ -d $OBJJ_HOME ]; then 19 | echo "OBJJ_HOME not set, defaulting to $OBJJ_HOME" 1>&2 20 | else 21 | echo "OBJJ_HOME not set, default at $OBJJ_HOME doesn't exist, exiting" 1>&2 22 | exit 2 23 | fi 24 | fi 25 | 26 | OBJJ_LIB="$OBJJ_HOME/lib" 27 | 28 | BAKE="$OBJJ_LIB/bake.j" 29 | 30 | # convert paths for Cygwin 31 | if [[ `uname` == CYGWIN* ]]; then 32 | OBJJ_HOME=`cygpath -w "$OBJJ_HOME"` 33 | BAKE=`cygpath -w "$BAKE"` 34 | fi 35 | 36 | objj $BAKE $@ 37 | -------------------------------------------------------------------------------- /Tools/cplutil/cplutil: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # if OBJJ_HOME isn't set, try to determine it 4 | if [ -z $OBJJ_HOME ]; then 5 | # get path of the executable 6 | SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH=$SELF_PATH/$(basename -- "$0") 7 | 8 | # resolve symlinks 9 | if [ -h $SELF_PATH ]; then 10 | SELF_PATH=`readlink $SELF_PATH` 11 | fi 12 | 13 | # get second ancestor directory 14 | SELF_DIR=`dirname $SELF_PATH` 15 | export OBJJ_HOME=`dirname $SELF_DIR` 16 | 17 | # check to ensure it exists, print message 18 | if [ -d $OBJJ_HOME ]; then 19 | echo "OBJJ_HOME not set, defaulting to $OBJJ_HOME" 1>&2 20 | else 21 | echo "OBJJ_HOME not set, default at $OBJJ_HOME doesn't exist, exiting" 1>&2 22 | exit 2 23 | fi 24 | fi 25 | 26 | OBJJ_LIB="$OBJJ_HOME/lib" 27 | CLASSPATH="$OBJJ_LIB:$OBJJ_LIB/js.jar" 28 | 29 | # convert paths for Cygwin 30 | if [[ `uname` == CYGWIN* ]]; then 31 | CLASSPATH=`cygpath -wp "$CLASSPATH"` 32 | fi 33 | 34 | java -classpath $CLASSPATH cplutil $@ 35 | -------------------------------------------------------------------------------- /Tools/press/press: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # if OBJJ_HOME isn't set, try to determine it 4 | if [ -z $OBJJ_HOME ]; then 5 | # get path of the executable 6 | SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH=$SELF_PATH/$(basename -- "$0") 7 | 8 | # resolve symlinks 9 | if [ -h $SELF_PATH ]; then 10 | SELF_PATH=`readlink $SELF_PATH` 11 | fi 12 | 13 | # get second ancestor directory 14 | SELF_DIR=`dirname $SELF_PATH` 15 | export OBJJ_HOME=`dirname $SELF_DIR` 16 | 17 | # check to ensure it exists, print message 18 | if [ -d $OBJJ_HOME ]; then 19 | echo "OBJJ_HOME not set, defaulting to $OBJJ_HOME" 1>&2 20 | else 21 | echo "OBJJ_HOME not set, default at $OBJJ_HOME doesn't exist, exiting" 1>&2 22 | exit 2 23 | fi 24 | fi 25 | 26 | OBJJ_LIB="$OBJJ_HOME/lib" 27 | 28 | PRESS="$OBJJ_LIB/press.j" 29 | 30 | # convert paths for Cygwin 31 | if [[ `uname` == CYGWIN* ]]; then 32 | OBJJ_HOME=`cygpath -w "$OBJJ_HOME"` 33 | PRESS=`cygpath -w "$PRESS"` 34 | fi 35 | 36 | objj $PRESS $@ 37 | -------------------------------------------------------------------------------- /Tests/Foundation/CPDateTest.j: -------------------------------------------------------------------------------- 1 | import 2 | 3 | @implementation CPDateTest : OJTestCase 4 | 5 | - (void)testSince1970 6 | { 7 | /* These two dates should be equal to Fri Feb 13 2009 15:31:30 GMT-0800 */ 8 | unixDate = [CPDate dateWithTimeIntervalSince1970: 1234567890]; 9 | cocoaDate = [CPDate dateWithTimeIntervalSinceReferenceDate: 253582290]; 10 | [self assertTrue:[unixDate isEqualToDate: cocoaDate]]; 11 | } 12 | 13 | - (void)testDate 14 | { 15 | var before = new Date(); 16 | var middle = [CPDate date]; 17 | var after = new Date(); 18 | var future = [CPDate distantFuture]; 19 | var past = [CPDate distantPast]; 20 | 21 | [self assertTrue:(before <= middle) message:"before not less than middle"]; 22 | [self assertTrue:(middle <= after) message:"middle not less than after ("+middle+","+after+")"]; 23 | 24 | [self assert:middle equals:[middle earlierDate:future] message:"earlierDate incorrect"]; 25 | [self assert:middle equals:[middle laterDate:past] message:"laterDate incorrect"]; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Tools/press/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /AppKit/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Tools/READMEs/STARTER-README: -------------------------------------------------------------------------------- 1 | Welcome to the Cappuccino Starter Package! 2 | 3 | Included you should find the following: 4 | 5 | 1. Documentation 6 | 2. NewApplication 7 | 3. README 8 | 9 | NewApplication is a stand alone Cappuccino application that you can use as a template to start building your own apps. To get started, just open up NewApplication/index.html in your favorite web browser. A great place to go from there is to read the "Downloading and Getting Started" tutorial found at http://cappuccino.org/learn/tutorials/starter-tutorial.php. This will walk you through these initial steps as well as getting you to do a little coding. If you want to debug your application, try running it with index-debug.html instead, which should make it easier. 10 | 11 | You can build your entire application right from this sample project, but if you want to dig a little deeper, you can also download the Tools package found at http://cappuccino.org/download/. This will set you up with some great additions like syntax modules for certain text editors and build tools to get extra performance. 12 | 13 | -------------------------------------------------------------------------------- /AppKit/CPWindow/_CPBorderlessWindowView.j: -------------------------------------------------------------------------------- 1 | /* 2 | * _CPBorderlessWindowView.j 3 | * AppKit 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import "_CPWindowView.j" 24 | 25 | 26 | @implementation _CPBorderlessWindowView : _CPWindowView 27 | { 28 | } 29 | @end -------------------------------------------------------------------------------- /Tools/ojunit/ojtest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # if OBJJ_HOME isn't set, try to determine it 4 | if [ -z $OBJJ_HOME ]; then 5 | # get path of the executable 6 | SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH=$SELF_PATH/$(basename -- "$0") 7 | 8 | # resolve symlinks 9 | if [ -h $SELF_PATH ]; then 10 | SELF_PATH=`readlink $SELF_PATH` 11 | fi 12 | 13 | # get second ancestor directory 14 | SELF_DIR=`dirname $SELF_PATH` 15 | export OBJJ_HOME=`dirname $SELF_DIR` 16 | 17 | # check to ensure it exists, print message 18 | if [ -d $OBJJ_HOME ]; then 19 | echo "OBJJ_HOME not set, defaulting to $OBJJ_HOME" 1>&2 20 | else 21 | echo "OBJJ_HOME not set, default at $OBJJ_HOME doesn't exist, exiting" 1>&2 22 | exit 2 23 | fi 24 | fi 25 | 26 | OBJJ_LIB="$OBJJ_HOME/lib" 27 | 28 | OJTEST="$OBJJ_LIB/ojunit/OJTestRunnerText.j" 29 | 30 | # convert paths for Cygwin 31 | if [[ `uname` == CYGWIN* ]]; then 32 | OBJJ_HOME=`cygpath -w "$OBJJ_HOME"` 33 | OJTEST=`cygpath -w "$OJTEST"` 34 | fi 35 | 36 | objj $OJTEST $@ 37 | -------------------------------------------------------------------------------- /Tools/bake/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Tools/NewApplication/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 14 | 15 | 16 | Hello World 17 | 18 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 | 31 |
32 |
33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /AppKit/Cib/_CPCibCustomObject.j: -------------------------------------------------------------------------------- 1 | 2 | @import 3 | 4 | 5 | var _CPCibCustomObjectClassName = @"_CPCibCustomObjectClassName"; 6 | 7 | @implementation _CPCibCustomObject : CPObject 8 | { 9 | CPString _className; 10 | } 11 | 12 | - (CPString)customClassName 13 | { 14 | return _className; 15 | } 16 | 17 | @end 18 | 19 | @implementation _CPCibCustomObject (CPCoding) 20 | 21 | - (id)initWithCoder:(CPCoder)aCoder 22 | { 23 | self = [super init]; 24 | 25 | if (self) 26 | _className = [aCoder decodeObjectForKey:_CPCibCustomObjectClassName]; 27 | 28 | return self; 29 | } 30 | 31 | - (void)encodeWithCoder:(CPCoder)aCoder 32 | { 33 | [aCoder encodeObject:_className forKey:_CPCibCustomObjectClassName]; 34 | } 35 | 36 | - (id)_cibInstantiate 37 | { 38 | var theClass = CPClassFromString(_className); 39 | 40 | if (!theClass) 41 | CPLog("Unknown class \"" + _className + "\" in cib file"); 42 | 43 | if (theClass === [CPApplication class]) 44 | return [CPApplication sharedApplication]; 45 | 46 | return [[theClass alloc] init]; 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Tools/steam/steam: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # if OBJJ_HOME isn't set, try to determine it 4 | if [ -z $OBJJ_HOME ]; then 5 | # get path of the executable 6 | SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH=$SELF_PATH/$(basename -- "$0") 7 | 8 | # resolve symlinks 9 | if [ -h $SELF_PATH ]; then 10 | SELF_PATH=`readlink $SELF_PATH` 11 | fi 12 | 13 | # get second ancestor directory 14 | SELF_DIR=`dirname $SELF_PATH` 15 | export OBJJ_HOME=`dirname $SELF_DIR` 16 | 17 | # check to ensure it exists, print message 18 | if [ -d $OBJJ_HOME ]; then 19 | echo "OBJJ_HOME not set, defaulting to $OBJJ_HOME" 1>&2 20 | else 21 | echo "OBJJ_HOME not set, default at $OBJJ_HOME doesn't exist, exiting" 1>&2 22 | exit 2 23 | fi 24 | fi 25 | 26 | OBJJ_LIB="$OBJJ_HOME/lib" 27 | CLASSPATH="$OBJJ_LIB:$OBJJ_LIB/js.jar" 28 | 29 | # convert paths for Cygwin 30 | if [[ `uname` == CYGWIN* ]]; then 31 | CLASSPATH=`cygpath -wp "$CLASSPATH"` 32 | STEAM_BUILD=`cygpath -wp "$STEAM_BUILD"` 33 | fi 34 | 35 | export OBJJ_LIB 36 | 37 | java -classpath $CLASSPATH steam $@ 38 | -------------------------------------------------------------------------------- /Tools/nib2cib/nib2cib.steam: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Name 6 | nib2cib 7 | Targets 8 | 9 | 10 | Name 11 | nib2cib 12 | 13 | 14 | Configurations 15 | 16 | 17 | Name 18 | Debug 19 | Settings 20 | 21 | PREPROCESS 22 | 23 | FLAGS 24 | -DDEBUG 25 | 26 | 27 | 28 | Name 29 | Release 30 | Settings 31 | 32 | PREPROCESS 33 | 34 | PREINTERPRET 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Tools/NewApplication/index-debug.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 14 | 15 | 16 | Hello World 17 | 18 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 | 31 |
32 |
33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Objective-J/Object.j: -------------------------------------------------------------------------------- 1 | /* 2 | * Object.j 3 | * Objective-J 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @implementation Object 24 | { 25 | Class isa; 26 | } 27 | 28 | + (void)initialize 29 | { 30 | } 31 | 32 | - (void)doesNotRecognizeSelector:(SEL)aSelector 33 | { 34 | } 35 | 36 | - (id)forwardSelector:(SEL)selector arguments:(void)args 37 | { 38 | return nil; 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /Tools/nib2cib/NSArray.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSArray.j 3 | * nib2cib 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | 25 | 26 | @implementation NSArray : CPObject 27 | { 28 | } 29 | 30 | - (id)initWithCoder:(CPCoder)aCoder 31 | { 32 | return [aCoder decodeObjectForKey:@"NS.objects"]; 33 | } 34 | 35 | @end 36 | 37 | @implementation NSMutableArray : NSArray 38 | { 39 | } 40 | @end 41 | -------------------------------------------------------------------------------- /Tools/NewApplication/AppController.j: -------------------------------------------------------------------------------- 1 | /* 2 | * AppController.j 3 | * 4 | * Created by __Me__ on __Date__. 5 | * Copyright 2008 __MyCompanyName__. All rights reserved. 6 | */ 7 | 8 | @import 9 | 10 | 11 | @implementation AppController : CPObject 12 | { 13 | } 14 | 15 | - (void)applicationDidFinishLaunching:(CPNotification)aNotification 16 | { 17 | var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask], 18 | contentView = [theWindow contentView]; 19 | 20 | var label = [[CPTextField alloc] initWithFrame:CGRectMakeZero()]; 21 | 22 | [label setStringValue:@"Hello World!"]; 23 | [label setFont:[CPFont boldSystemFontOfSize:24.0]]; 24 | 25 | [label sizeToFit]; 26 | 27 | [label setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMinYMargin | CPViewMaxYMargin]; 28 | [label setFrameOrigin:CGPointMake((CGRectGetWidth([contentView bounds]) - CGRectGetWidth([label frame])) / 2.0, (CGRectGetHeight([contentView bounds]) - CGRectGetHeight([label frame])) / 2.0)]; 29 | 30 | [contentView addSubview:label]; 31 | 32 | [theWindow orderFront:self]; 33 | 34 | // Uncomment the following line to turn on the standard menu bar. 35 | //[CPMenu setMenuBarVisible:YES]; 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /Tools/nib2cib/NSSet.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSSet.j 3 | * nib2cib 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2009, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | @import 25 | 26 | 27 | @implementation NSSet : CPObject 28 | { 29 | } 30 | 31 | - (id)initWithCoder:(CPCoder)aCoder 32 | { 33 | return [[CPSet alloc] initWithArray:[aCoder decodeObjectForKey:@"NS.objects"]]; 34 | } 35 | 36 | @end 37 | 38 | @implementation NSMutableSet : NSSet 39 | { 40 | } 41 | @end 42 | -------------------------------------------------------------------------------- /AppKit/CPFlashMovie.j: -------------------------------------------------------------------------------- 1 | /* 2 | * CPFlashMovie.j 3 | * AppKit 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | 25 | 26 | @implementation CPFlashMovie : CPObject 27 | { 28 | CPString _fileName; 29 | } 30 | 31 | + (id)flashMovieWithFile:(CPString)aFileName 32 | { 33 | return [[self alloc] initWithFile:aFileName]; 34 | } 35 | 36 | - (id)initWithFile:(CPString)aFileName 37 | { 38 | self = [super init]; 39 | 40 | if (self) 41 | _fileName = aFileName; 42 | 43 | return self; 44 | } 45 | 46 | @end -------------------------------------------------------------------------------- /Tools/nib2cib/WebView.j: -------------------------------------------------------------------------------- 1 | /* 2 | * WebView.j 3 | * nib2cib 4 | * 5 | * Created by Thomas Robinson. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | 25 | 26 | @implementation CPWebView (CPCoding) 27 | 28 | - (id)NS_initWithCoder:(CPCoder)aCoder 29 | { 30 | if (self = [super NS_initWithCoder:aCoder]) 31 | { 32 | } 33 | 34 | return self; 35 | } 36 | 37 | @end 38 | 39 | @implementation WebView : CPWebView 40 | { 41 | } 42 | 43 | - (id)initWithCoder:(CPCoder)aCoder 44 | { 45 | return [self NS_initWithCoder:aCoder]; 46 | } 47 | 48 | - (Class)classForKeyedArchiver 49 | { 50 | return [CPWebView class]; 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /Tools/ojunit/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /Tools/Install/install-tools: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | usage() 4 | { 5 | echo "$0 [--prefix install_directory]" 6 | exit 1 7 | } 8 | 9 | INSTALL_DIR="/usr/local" 10 | 11 | # Parse parameters 12 | while [ $# -ge 1 ]; do 13 | case $1 in 14 | --prefix) 15 | INSTALL_DIR=$2 16 | shift 17 | ;; 18 | *) 19 | usage 20 | ;; 21 | esac 22 | shift 23 | done 24 | 25 | mkdir -p $INSTALL_DIR/bin 26 | mkdir -p $INSTALL_DIR/share/objj 27 | 28 | cp -fR objj/* $INSTALL_DIR/share/objj/. 29 | 30 | BINS=`ls objj/bin` 31 | for BIN in $BINS 32 | do 33 | ln -sf $INSTALL_DIR/share/objj/bin/$BIN $INSTALL_DIR/bin/$BIN 34 | chmod +x $INSTALL_DIR/bin/$BIN 35 | done 36 | 37 | chmod +x $INSTALL_DIR/share/objj/bin/* 38 | 39 | cat < 24 | 25 | 26 | @implementation CPResponder (NSCoding) 27 | 28 | - (id)NS_initWithCoder:(CPCoder)aCoder 29 | { 30 | self = [super init]; 31 | 32 | if (self) 33 | [self setNextResponder:[aCoder decodeObjectForKey:@"NSNextResponder"]]; 34 | 35 | return self; 36 | } 37 | 38 | @end 39 | 40 | @implementation NSResponder : CPResponder 41 | { 42 | } 43 | 44 | - (id)initWithCoder:(CPCoder)aCoder 45 | { 46 | return [self NS_initWithCoder:aCoder]; 47 | } 48 | 49 | - (Class)classForKeyedArchiver 50 | { 51 | return [CPResponder class]; 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /Tests/Objective-J/base64Test.j: -------------------------------------------------------------------------------- 1 | var base64TestStrings = [ 2 | ["leasure.", "bGVhc3VyZS4="], 3 | ["easure.", "ZWFzdXJlLg=="], 4 | ["asure.", "YXN1cmUu"], 5 | ["sure.", "c3VyZS4="] 6 | ]; 7 | 8 | @implementation base64Test : OJTestCase 9 | 10 | - (void)test_base64_encode_string 11 | { 12 | for (var i = 0; i < base64TestStrings.length; i++) 13 | [self assert:base64_encode_string(base64TestStrings[i][0]) equals:base64TestStrings[i][1]]; 14 | } 15 | 16 | - (void)test_base64_encode_array 17 | { 18 | for (var i = 0; i < base64TestStrings.length; i++) 19 | { 20 | var input = []; 21 | for (var j = 0; j < base64TestStrings[i][0].length; j++) 22 | input.push(base64TestStrings[i][0].charCodeAt(j)); 23 | [self assert:base64_encode_array(input) equals:base64TestStrings[i][1]]; 24 | } 25 | } 26 | 27 | - (void)test_base64_decode_to_string 28 | { 29 | for (var i = 0; i < base64TestStrings.length; i++) 30 | { 31 | var result = base64_decode_to_string(base64TestStrings[i][1]), 32 | expected = base64TestStrings[i][0]; 33 | [self assert:result equals:expected]; 34 | } 35 | } 36 | 37 | - (void)test_base64_decode_to_array 38 | { 39 | for (var i = 0; i < base64TestStrings.length; i++) 40 | { 41 | var result = base64_decode_to_array(base64TestStrings[i][1]), 42 | expected = base64TestStrings[i][0]; 43 | 44 | for (var j = 0; j < expected.length || j < result.length; j++) 45 | [self assert:result[j] equals:expected.charCodeAt(j)]; 46 | } 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Tools/nib2cib/NSMenu.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSMenu.j 3 | * nib2cib 4 | * 5 | * Created by Thomas Robinson. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | 25 | @import "NSMenuItem.j" 26 | 27 | 28 | @implementation CPMenu (NSCoding) 29 | 30 | - (id)NS_initWithCoder:(CPCoder)aCoder 31 | { 32 | self = [super init]; 33 | 34 | if (self) 35 | { 36 | _title = [aCoder decodeObjectForKey:"NSTitle"]; 37 | _items = [aCoder decodeObjectForKey:"NSMenuItems"]; 38 | } 39 | 40 | return self; 41 | } 42 | 43 | @end 44 | 45 | @implementation NSMenu : CPMenu 46 | { 47 | } 48 | 49 | - (id)initWithCoder:(CPCoder)aCoder 50 | { 51 | return [self NS_initWithCoder:aCoder]; 52 | } 53 | 54 | - (Class)classForKeyedArchiver 55 | { 56 | return [CPMenu class]; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /Tools/nib2cib/NSSplitView.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSSplitView.j 3 | * nib2cib 4 | * 5 | * Created by Thomas Robinson. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | 25 | 26 | @implementation CPSplitView (CPCoding) 27 | 28 | - (id)NS_initWithCoder:(CPCoder)aCoder 29 | { 30 | if (self = [super NS_initWithCoder:aCoder]) 31 | { 32 | _isVertical = [aCoder decodeBoolForKey:@"NSIsVertical"]; 33 | _isPaneSplitter = [aCoder decodeIntForKey:@"NSDividerStyle"] == 2 ? YES : NO; 34 | } 35 | 36 | return self; 37 | } 38 | 39 | @end 40 | 41 | @implementation NSSplitView : CPSplitView 42 | { 43 | } 44 | 45 | - (id)initWithCoder:(CPCoder)aCoder 46 | { 47 | return [self NS_initWithCoder:aCoder]; 48 | } 49 | 50 | - (Class)classForKeyedArchiver 51 | { 52 | return [CPSplitView class]; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /Tools/nib2cib/NSCustomObject.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSCustomObject.j 3 | * nib2cib 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | 25 | 26 | @implementation _CPCibCustomObject (NSCoding) 27 | 28 | - (id)NS_initWithCoder:(CPCoder)aCoder 29 | { 30 | self = [super init]; 31 | 32 | if (self){ 33 | _className = CP_NSMapClassName([aCoder decodeObjectForKey:@"NSClassName"]); 34 | print(":::"+_className); 35 | } 36 | return self; 37 | } 38 | 39 | @end 40 | 41 | @implementation NSCustomObject : _CPCibCustomObject 42 | { 43 | } 44 | 45 | - (id)initWithCoder:(CPCoder)aCoder 46 | {print("i-nit form coder"); 47 | return [self NS_initWithCoder:aCoder]; 48 | } 49 | 50 | - (Class)classForKeyedArchiver 51 | { 52 | return [_CPCibCustomObject class]; 53 | } 54 | 55 | @end -------------------------------------------------------------------------------- /Foundation/CPCountedSet.j: -------------------------------------------------------------------------------- 1 | 2 | @import "CPSet.j" 3 | 4 | @implementation CPCountedSet : CPMutableSet 5 | { 6 | Object _counts; 7 | } 8 | 9 | - (void)addObject:(id)anObject 10 | { 11 | if (!_counts) 12 | _counts = {}; 13 | 14 | [super addObject:anObject]; 15 | 16 | var hash = [anObject hash]; 17 | 18 | if (_counts[hash] === undefined) 19 | _counts[hash] = 1; 20 | else 21 | ++_counts[hash]; 22 | } 23 | 24 | - (void)removeObject:(id)anObject 25 | { 26 | if (!_counts) 27 | return; 28 | 29 | var hash = [anObject hash]; 30 | 31 | if (_counts[hash] === undefined) 32 | return; 33 | 34 | else 35 | { 36 | --_counts[hash]; 37 | 38 | if (_counts[hash] === 0) 39 | { 40 | delete _counts[hash]; 41 | [super removeObject:anObject]; 42 | } 43 | } 44 | } 45 | 46 | - (void)removeAllObjects 47 | { 48 | [super removeAllObjects]; 49 | _counts = {}; 50 | } 51 | 52 | /* 53 | Returns the number of times anObject appears in the receiver. 54 | @param anObject The object to check the count for. 55 | */ 56 | - (unsigned)countForObject:(id)anObject 57 | { 58 | if (!_counts) 59 | _counts = {}; 60 | 61 | var hash = [anObject hash]; 62 | 63 | if (_counts[hash] === undefined) 64 | return 0; 65 | 66 | return _counts[hash]; 67 | } 68 | 69 | 70 | /* 71 | 72 | Eventually we should see what these are supposed to do, and then do that. 73 | 74 | - (void)intersectSet:(CPSet)set 75 | 76 | - (void)minusSet:(CPSet)set 77 | 78 | - (void)unionSet:(CPSet)set 79 | 80 | */ 81 | 82 | @end 83 | -------------------------------------------------------------------------------- /Foundation/CPEnumerator.j: -------------------------------------------------------------------------------- 1 | /* 2 | * CPEnumerator.j 3 | * Foundation 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import "CPObject.j" 24 | 25 | 26 | /*! @class CPEnumerator 27 | CPEnumerator is a superclass (with useless method bodies) 28 | that defines an interface for subclasses to follow. The purpose of an 29 | enumerator is to be a convenient system for traversing over the elements 30 | of a collection of objects. 31 | */ 32 | @implementation CPEnumerator : CPObject 33 | 34 | /*! 35 | Returns the next object in the collection. 36 | No particular ordering is guaranteed. 37 | */ 38 | - (id)nextObject 39 | { 40 | return nil; 41 | } 42 | 43 | /*! 44 | Returns all objects in the collection in an array. 45 | No particular ordering is guaranteed. 46 | */ 47 | - (CPArray)allObjects 48 | { 49 | return []; 50 | } 51 | 52 | @end -------------------------------------------------------------------------------- /Foundation/Resources/log.css: -------------------------------------------------------------------------------- 1 | body { 2 | font: 10px Monaco, Courier, "Courier New", monospace, mono; 3 | padding-top: 15px; 4 | } 5 | 6 | div > .fatal, div > .error, div > .warn, div > .info, div > .debug, div > .trace { 7 | display: none; 8 | overflow: hidden; 9 | white-space: pre; 10 | padding: 0px 5px 0px 5px; 11 | margin-top: 2px; 12 | -moz-border-radius: 5px; 13 | -webkit-border-radius: 5px; 14 | } 15 | 16 | div[wrap="yes"] > div { 17 | white-space: normal; 18 | } 19 | 20 | .fatal { background-color: #ffb2b3; } 21 | .error { background-color: #ffe2b2; } 22 | .warn { background-color: #fdffb2; } 23 | .info { background-color: #e4ffb2; } 24 | .debug { background-color: #a0e5a0; } 25 | .trace { background-color: #99b9ff; } 26 | 27 | .enfatal .fatal, .enerror .error, .enwarn .warn, .eninfo .info, .endebug .debug, .entrace .trace { display: block; } 28 | 29 | div#header { 30 | background-color: rgba(240,240,240,0.82); 31 | position: fixed; 32 | top: 0px; 33 | left: 0px; 34 | width: 100%; 35 | border-bottom: 1px solid rgba(0,0,0,0.33); 36 | text-align: center; 37 | /*opacity: 0.2;*/ 38 | } 39 | /* 40 | div#header:hover { 41 | opacity: 1.0; 42 | } 43 | */ 44 | ul#enablers { 45 | display: inline-block; 46 | margin: 1px 15px 0 15px; 47 | padding: 2px 0 2px 0; 48 | } 49 | 50 | ul#enablers li { 51 | display: inline; 52 | padding: 0px 5px 0px 5px; 53 | margin-left: 4px; 54 | -moz-border-radius: 5px; 55 | -webkit-border-radius: 5px; 56 | } 57 | 58 | [enabled="no"] { 59 | opacity: 0.25; 60 | } 61 | 62 | ul#options { 63 | display: inline-block; 64 | margin: 0 15px 0px 15px; 65 | padding: 0 0px; 66 | } 67 | 68 | ul#options li { 69 | margin: 0 0 0 0; 70 | padding: 0 0 0 0; 71 | display: inline; 72 | } -------------------------------------------------------------------------------- /Tools/nib2cib/NSColorWell.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSColorWell.j 3 | * nib2cib 4 | * 5 | * Created by Thomas Robinson. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | 25 | @import "NSCell.j" 26 | @import "NSControl.j" 27 | 28 | 29 | @implementation CPColorWell (NSCoding) 30 | 31 | - (id)NS_initWithCoder:(CPCoder)aCoder 32 | { 33 | self = [super NS_initWithCoder:aCoder]; 34 | 35 | if (self) 36 | { 37 | [self setBordered:[aCoder decodeBoolForKey:"NSIsBordered"]]; 38 | [self setColor:[aCoder decodeBoolForKey:"NSColor"]]; 39 | } 40 | 41 | return self; 42 | } 43 | 44 | @end 45 | 46 | @implementation NSColorWell : CPColorWell 47 | { 48 | } 49 | 50 | - (id)initWithCoder:(CPCoder)aCoder 51 | { 52 | return [self NS_initWithCoder:aCoder]; 53 | } 54 | 55 | - (Class)classForKeyedArchiver 56 | { 57 | return [CPColorWell class]; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /Tools/objj/objj: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # if OBJJ_HOME isn't set, try to determine it out 4 | if [ -z $OBJJ_HOME ]; then 5 | # get path of the executable 6 | SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH=$SELF_PATH/$(basename -- "$0") 7 | 8 | # resolve symlinks 9 | if [ -h $SELF_PATH ]; then 10 | SELF_PATH=`readlink $SELF_PATH` 11 | fi 12 | 13 | # get second ancestor directory 14 | SELF_DIR=`dirname $SELF_PATH` 15 | export OBJJ_HOME=`dirname $SELF_DIR` 16 | 17 | # check to ensure it exists, print message 18 | if [ -d $OBJJ_HOME ]; then 19 | echo "OBJJ_HOME not set, defaulting to $OBJJ_HOME" 1>&2 20 | else 21 | echo "OBJJ_HOME not set, default at $OBJJ_HOME doesn't exist, exiting" 1>&2 22 | exit 2 23 | fi 24 | fi 25 | 26 | OBJJ_LIB="$OBJJ_HOME/lib" 27 | CLASSPATH="$OBJJ_LIB:$OBJJ_LIB/js.jar" 28 | 29 | OBJJ="$OBJJ_LIB/objj.js" 30 | RLWRAP=`which rlwrap` 31 | 32 | # if there's a "lib" directory, add all the jars from it 33 | if [ -d "lib" ]; then 34 | JARS=`find ./lib -name '*.jar' 2> /dev/null | tr "\n" ":"` 35 | CLASSPATH="$JARS:$CLASSPATH" 36 | fi 37 | 38 | # convert paths for Cygwin 39 | if [[ `uname` == CYGWIN* ]]; then 40 | OBJJ_HOME=`cygpath -wp "$OBJJ_HOME"` 41 | OBJJ_LIB=`cygpath -wp "$OBJJ_LIB"` 42 | OBJJ=`cygpath -wp "$OBJJ"` 43 | CLASSPATH=`cygpath -wp "$CLASSPATH"` 44 | fi 45 | 46 | export OBJJ_LIB 47 | 48 | #if [ -e $STEAM_BUILD/Objective-J.build/Release/Rhino ]; then 49 | $RLWRAP java -classpath $CLASSPATH objj $@ 50 | #$RLWRAP java -classpath $CLASSPATH org.mozilla.javascript.tools.shell.Main $OBJJ $@ 51 | #else 52 | # echo "Missing frameworks at $STEAM_BUILD/Objective-J.build/Release/Rhino" 1>&2 53 | #fi 54 | -------------------------------------------------------------------------------- /Tools/nib2cib/NSCustomView.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSCustomView.j 3 | * nib2cib 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | 25 | @import "NSView.j" 26 | 27 | 28 | var _CPCibCustomViewClassNameKey = @"_CPCibCustomViewClassNameKey"; 29 | 30 | @implementation NSCustomView : CPView 31 | { 32 | CPString _className; 33 | } 34 | 35 | - (id)initWithCoder:(CPCoder)aCoder 36 | { 37 | self = [super NS_initWithCoder:aCoder]; 38 | 39 | if (self) 40 | _className = [aCoder decodeObjectForKey:@"NSClassName"]; 41 | 42 | return self; 43 | } 44 | 45 | - (void)encodeWithCoder:(CPCoder)aCoder 46 | { 47 | [super encodeWithCoder:aCoder]; 48 | 49 | [aCoder encodeObject:CP_NSMapClassName(_className) forKey:_CPCibCustomViewClassNameKey]; 50 | } 51 | 52 | - (CPString)classForKeyedArchiver 53 | { 54 | return [_CPCibCustomView class]; 55 | } 56 | 57 | @end 58 | 59 | -------------------------------------------------------------------------------- /Tools/nib2cib/NSClipView.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSClipView.j 3 | * nib2cib 4 | * 5 | * Created by Thomas Robinson. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | 25 | 26 | @implementation CPClipView (CPCoding) 27 | 28 | - (id)NS_initWithCoder:(CPCoder)aCoder 29 | { 30 | if (self = [super NS_initWithCoder:aCoder]) 31 | { 32 | _documentView = [aCoder decodeObjectForKey:"NSDocView"]; 33 | 34 | if ([aCoder containsValueForKey:"NSBGColor"]) 35 | [self setBackgroundColor:[aCoder decodeObjectForKey:"NSBGColor"]]; 36 | 37 | //var flags = [aCoder decodeIntForKey:"NScvFlags"]; 38 | } 39 | 40 | return self; 41 | } 42 | 43 | @end 44 | 45 | @implementation NSClipView : CPClipView 46 | { 47 | } 48 | 49 | - (id)initWithCoder:(CPCoder)aCoder 50 | { 51 | return [self NS_initWithCoder:aCoder]; 52 | } 53 | 54 | - (Class)classForKeyedArchiver 55 | { 56 | return [CPClipView class]; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /Foundation/CPPropertyListSerialization.j: -------------------------------------------------------------------------------- 1 | /* 2 | * CPPropertyListSerialization.j 3 | * Foundation 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import "CPObject.j" 24 | 25 | 26 | CPPropertyListOpenStepFormat = kCFPropertyListOpenStepFormat; 27 | CPPropertyListXMLFormat_v1_0 = kCFPropertyListXMLFormat_v1_0; 28 | CPPropertyListBinaryFormat_v1_0 = kCFPropertyListBinaryFormat_v1_0; 29 | CPPropertyList280NorthFormat_v1_0 = kCFPropertyList280NorthFormat_v1_0; 30 | 31 | @implementation CPPropertyListSerialization : CPObject 32 | { 33 | } 34 | 35 | + (CPData)dataFromPropertyList:(id)aPlist format:(CPPropertyListFormat)aFormat errorDescription:({CPString})anErrorString 36 | { 37 | return CPPropertyListCreateData(aPlist, aFormat); 38 | } 39 | 40 | + (id)propertyListFromData:(CPData)data format:(CSPropertyListFormat)aFormat errorDescription:({CPString})errorString 41 | { 42 | return CPPropertyListCreateFromData(data, aFormat); 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Tools/nib2cib/NSFont.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSFont.j 3 | * nib2cib 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | 25 | 26 | @implementation CPFont (NSCoding) 27 | 28 | - (id)NS_initWithCoder:(CPCoder)aCoder 29 | { 30 | var isBold = NO, 31 | fontName = [aCoder decodeObjectForKey:@"NSName"]; 32 | 33 | // FIXME: Is this alwasy true? 34 | if (fontName.indexOf("-Bold") === fontName.length - "-Bold".length) 35 | isBold = YES; 36 | 37 | if (fontName === "LucidaGrande" || fontName === "LucidaGrande-Bold") 38 | fontName = "Arial"; 39 | 40 | return [self _initWithName:fontName size:[aCoder decodeDoubleForKey:@"NSSize"] bold:isBold]; 41 | } 42 | 43 | @end 44 | 45 | @implementation NSFont : CPFont 46 | { 47 | } 48 | 49 | - (id)initWithCoder:(CPCoder)aCoder 50 | { 51 | return [self NS_initWithCoder:aCoder]; 52 | } 53 | 54 | - (Class)classForKeyedArchiver 55 | { 56 | return [CPFont class]; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /Foundation/CPNull.j: -------------------------------------------------------------------------------- 1 | /* 2 | * CPNull.j 3 | * Foundation 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import "CPObject.j" 24 | 25 | 26 | var CPNullSharedNull = nil; 27 | 28 | /*! @class CPNull 29 | This class is used as an object representation of nil. This is handy when a collection 30 | only accepts objects as values, but you would like a nil representation in there. 31 | */ 32 | @implementation CPNull : CPObject 33 | { 34 | } 35 | 36 | /*+ (id)alloc 37 | { 38 | if (CPNullSharedNull) 39 | return CPNullSharedNull; 40 | 41 | return [super alloc]; 42 | }*/ 43 | /*! 44 | Returns the singleton instance of the CPNull 45 | object. While CPNull and nil should 46 | be interpreted as the same, they are not equal ('=='). 47 | */ 48 | + (CPNull)null 49 | { 50 | if (!CPNullSharedNull) 51 | CPNullSharedNull = [[CPNull alloc] init]; 52 | 53 | return CPNullSharedNull; 54 | } 55 | 56 | @end -------------------------------------------------------------------------------- /Tools/objj/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Foundation/CPObjJRuntime.j: -------------------------------------------------------------------------------- 1 | /* 2 | * CPObjJRuntime.j 3 | * Foundation 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import "CPLog.j" 24 | 25 | 26 | function CPStringFromSelector(aSelector) 27 | { 28 | return sel_getName(aSelector); 29 | } 30 | 31 | function CPSelectorFromString(aSelectorName) 32 | { 33 | return sel_registerName(aSelectorName); 34 | } 35 | 36 | function CPClassFromString(aClassName) 37 | { 38 | return objj_getClass(aClassName); 39 | } 40 | 41 | function CPStringFromClass(aClass) 42 | { 43 | return class_getName(aClass); 44 | } 45 | 46 | CPOrderedAscending = -1; 47 | CPOrderedSame = 0; 48 | CPOrderedDescending = 1; 49 | 50 | CPNotFound = -1; 51 | 52 | MIN = Math.min; 53 | MAX = Math.max; 54 | ABS = Math.abs; 55 | 56 | /*function MIN(lhs, rhs) 57 | { 58 | return Math.min(lhs, rhs); 59 | } 60 | 61 | function MAX(lhs, rhs) 62 | { 63 | return Math.max(lhs, rhs); 64 | } 65 | 66 | function ABS(argument) 67 | { 68 | return Math.abs(argument); 69 | }*/ 70 | -------------------------------------------------------------------------------- /Tools/nib2cib/NSTabViewItem.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSTabViewItem.j 3 | * nib2cib 4 | * 5 | * Created by Thomas Robinson. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | 25 | 26 | @implementation CPTabViewItem (CPCoding) 27 | 28 | - (id)NS_initWithCoder:(CPCoder)aCoder 29 | { 30 | if (self = [super init]) 31 | { 32 | _identifier = [aCoder decodeObjectForKey:"NSIdentifier"]; 33 | _label = [aCoder decodeObjectForKey:"NSLabel"]; 34 | 35 | _view = [aCoder decodeObjectForKey:"NSView"]; 36 | 37 | // doesn't exist in Cocoa 38 | //_auxiliaryView = [aCoder decodeObjectForKey:CPTabViewItemAuxViewKey] 39 | } 40 | 41 | return self; 42 | } 43 | 44 | @end 45 | 46 | @implementation NSTabViewItem : CPTabViewItem 47 | { 48 | } 49 | 50 | - (id)initWithCoder:(CPCoder)aCoder 51 | { 52 | return [self NS_initWithCoder:aCoder]; 53 | } 54 | 55 | - (Class)classForKeyedArchiver 56 | { 57 | return [CPTabViewItem class]; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /AppKit/CoreAnimation/CAFlashLayer.j: -------------------------------------------------------------------------------- 1 | /* 2 | * CAFlashLayer.j 3 | * AppKit 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import "CALayer.j" 24 | @import "CPFlashMovie.j" 25 | 26 | 27 | @implementation CAFlashLayer : CALayer 28 | { 29 | CPFlashMovie _flashMovie; 30 | } 31 | 32 | - (void)setFlashMovie:(CPFlashMovie)aFlashMovie 33 | { 34 | if (_flashMovie == aFlashMovie) 35 | return; 36 | 37 | _flashMovie = aFlashMovie; 38 | 39 | _DOMElement.innerHTML = ""; 43 | } 44 | 45 | - (CPFlashMovie)flashMovie 46 | { 47 | return _flashMovie; 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Tools/nib2cib/NSCustomResource.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSCustomResource.j 3 | * nib2cib 4 | * 5 | * Portions based on NSCustomResource.m (01/08/2009) in Cocotron (http://www.cocotron.org/) 6 | * Copyright (c) 2006-2007 Christopher J. W. Lloyd 7 | * 8 | * Created by Francisco Tolmasky. 9 | * Copyright 2008, 280 North, Inc. 10 | * 11 | * This library is free software; you can redistribute it and/or 12 | * modify it under the terms of the GNU Lesser General Public 13 | * License as published by the Free Software Foundation; either 14 | * version 2.1 of the License, or (at your option) any later version. 15 | * 16 | * This library is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public 22 | * License along with this library; if not, write to the Free Software 23 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 24 | */ 25 | 26 | @import 27 | 28 | 29 | @implementation _CPCibCustomResource (NSCoding) 30 | 31 | - (id)NS_initWithCoder:(CPCoder)aCoder 32 | { 33 | self = [super init]; 34 | 35 | if (self) 36 | { 37 | _className = CP_NSMapClassName([aCoder decodeObjectForKey:@"NSClassName"]); 38 | _resourceName = [aCoder decodeObjectForKey:@"NSResourceName"]; 39 | } 40 | 41 | return self; 42 | } 43 | 44 | @end 45 | 46 | @implementation NSCustomResource : _CPCibCustomResource 47 | { 48 | } 49 | 50 | - (id)initWithCoder:(CPCoder)aCoder 51 | { 52 | return [self NS_initWithCoder:aCoder]; 53 | } 54 | 55 | - (Class)classForKeyedArchiver 56 | { 57 | return [_CPCibCustomResource class]; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /AppKit/CoreGraphics/CGGradient.j: -------------------------------------------------------------------------------- 1 | /* 2 | * CGGradient.j 3 | * AppKit 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import "CGColor.j" 24 | @import "CGColorSpace.j" 25 | 26 | 27 | kCGGradientDrawsBeforeStartLocation = 1 << 0; 28 | kCGGradientDrawsAfterEndLocation = 1 << 1; 29 | 30 | function CGGradientCreateWithColorComponents(aColorSpace, components, locations, count) 31 | { 32 | if (arguments["count"] == NULL) 33 | var count = locations.length; 34 | 35 | var colors = []; 36 | 37 | while (count--) 38 | { 39 | var offset = count * 4; 40 | colors[count] = CGColorCreate(aColorSpace, components.slice(offset, offset + 4)); 41 | } 42 | 43 | return CGGradientCreateWithColors(aColorSpace, colors, locations); 44 | } 45 | 46 | function CGGradientCreateWithColors(aColorSpace, colors, locations) 47 | { 48 | return { colorspace:aColorSpace, colors:colors, locations:locations }; 49 | } 50 | 51 | function CGGradientRelease() 52 | { 53 | } 54 | 55 | function CGGradientRetain(aGradient) 56 | { 57 | return aGradient; 58 | } -------------------------------------------------------------------------------- /Tools/bake/example.bakefile: -------------------------------------------------------------------------------- 1 | { 2 | "sources" : [ 3 | { 4 | "type" : "git", 5 | "path" : "git://github.com/280north/cappuccino.git", 6 | "parts" : [ 7 | { 8 | "src" : "Objective-J", 9 | "dst" : "Frameworks/Objective-J", 10 | "build" : "ant -DBuild=BUILD_PATH", 11 | "copyFrom" : "Release/Objective-J" 12 | }, 13 | { 14 | "src" : "Foundation", 15 | "dst" : "Frameworks/Foundation", 16 | "build" : "steam build -c Release -b BUILD_PATH", 17 | "copyFrom" : "Release/Foundation" 18 | }, 19 | { 20 | "src" : "AppKit", 21 | "dst" : "Frameworks/AppKit", 22 | "build" : "steam build -c Release -b BUILD_PATH", 23 | "copyFrom" : "Release/AppKit" 24 | } 25 | ] 26 | }, 27 | { 28 | "type" : "rsync", 29 | "path" : "/Users/username/projects/NewApplication", 30 | "parts" : [ 31 | { 32 | "src" : "", 33 | "dst" : "Blah" 34 | } 35 | ] 36 | }, 37 | { 38 | "type" : "svn", 39 | "path" : "https://svn.youserver.com/Project/trunk", 40 | "parts" : [ 41 | { 42 | "src" : "subdirectory", 43 | "dst" : "Something" 44 | } 45 | ] 46 | } 47 | ], 48 | "deployments" : [ 49 | { "host" : "deploy@myserver.com", "path" : "/var/www/mysite/public" } 50 | ], 51 | "templateVars" : { 52 | "APPLICATION_NAME" : "My Application", 53 | "BACKGROUND_COLOR" : "black", 54 | "TEXT_COLOR" : "black" 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /AppKit/AppKit.steam: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Name 6 | AppKit 7 | Targets 8 | 9 | 10 | Name 11 | AppKit 12 | Excluded 13 | 14 | CPOutlineView.j 15 | CPTableColumn.j 16 | CPTableView.j 17 | 18 | CoreGraphics/CGContextCanvas.j 19 | CoreGraphics/CGContextVML.j 20 | 21 | Flags 22 | -DPLATFORM_DOM 23 | 24 | 25 | Name 26 | AppKit-Rhino 27 | Excluded 28 | 29 | CPOutlineView.j 30 | CPTableColumn.j 31 | CPTableView.j 32 | 33 | CoreGraphics/CGContextCanvas.j 34 | CoreGraphics/CGContextVML.j 35 | 36 | 37 | 38 | Configurations 39 | 40 | 41 | Name 42 | Debug 43 | Flags 44 | -DDEBUG -g 45 | 46 | 47 | Name 48 | Release 49 | Flags 50 | -O 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /Tools/objjc/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Tools/cplutil/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Tools/nib2cib/NSControl.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSControl.j 3 | * nib2cib 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | 25 | @import "NSCell.j" 26 | @import "NSView.j" 27 | 28 | 29 | @implementation CPControl (NSCoding) 30 | 31 | - (id)NS_initWithCoder:(CPCoder)aCoder 32 | { 33 | self = [super NS_initWithCoder:aCoder]; 34 | 35 | if (self) 36 | { 37 | [self sendActionOn:CPLeftMouseUpMask]; 38 | 39 | var cell = [aCoder decodeObjectForKey:@"NSCell"]; 40 | 41 | [self setObjectValue:[cell objectValue]]; 42 | 43 | [self setFont:[cell font]]; 44 | [self setAlignment:[cell alignment]]; 45 | 46 | [self setEnabled:[aCoder decodeObjectForKey:@"NSEnabled"]]; 47 | [self setContinuous:[cell isContinuous]]; 48 | } 49 | 50 | return self; 51 | } 52 | 53 | @end 54 | 55 | @implementation NSControl : CPControl 56 | { 57 | } 58 | 59 | - (id)initWithCoder:(CPCoder)aCoder 60 | { 61 | return [self NS_initWithCoder:aCoder]; 62 | } 63 | 64 | - (Class)classForKeyedArchiver 65 | { 66 | return [CPControl class]; 67 | } 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /Tools/nib2cib/nib2cib: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # nib2cib 5 | # nib2cib 6 | # 7 | # Created by Francisco Tolmasky. 8 | # Copyright 2008, 280 North, Inc. 9 | # 10 | # This library is free software; you can redistribute it and/or 11 | # modify it under the terms of the GNU Lesser General Public 12 | # License as published by the Free Software Foundation; either 13 | # version 2.1 of the License, or (at your option) any later version. 14 | # 15 | # This library is distributed in the hope that it will be useful, 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | # Lesser General Public License for more details. 19 | # 20 | # You should have received a copy of the GNU Lesser General Public 21 | # License along with this library; if not, write to the Free Software 22 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 23 | # 24 | 25 | # if OBJJ_HOME isn't set, try to determine it 26 | if [ -z $OBJJ_HOME ]; then 27 | # get path of the executable 28 | SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH=$SELF_PATH/$(basename -- "$0") 29 | 30 | # resolve symlinks 31 | if [ -h $SELF_PATH ]; then 32 | SELF_PATH=`readlink $SELF_PATH` 33 | fi 34 | 35 | # get second ancestor directory 36 | SELF_DIR=`dirname $SELF_PATH` 37 | export OBJJ_HOME=`dirname $SELF_DIR` 38 | 39 | # check to ensure it exists, print message 40 | if [ -d $OBJJ_HOME ]; then 41 | echo "OBJJ_HOME not set, defaulting to $OBJJ_HOME" 1>&2 42 | else 43 | echo "OBJJ_HOME not set, default at $OBJJ_HOME doesn't exist, exiting" 1>&2 44 | exit 2 45 | fi 46 | fi 47 | 48 | OBJJ_LIB="$OBJJ_HOME/lib" 49 | 50 | NIB2CIB="$OBJJ_LIB/nib2cib/main.j" 51 | 52 | # convert paths for Cygwin 53 | if [[ `uname` == CYGWIN* ]]; then 54 | OBJJ_HOME=`cygpath -w "$OBJJ_HOME"` 55 | BAKE=`cygpath -w "$NIB2CIB"` 56 | fi 57 | 58 | objj $NIB2CIB $@ 59 | -------------------------------------------------------------------------------- /Tools/steam/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Objective-J/exception.js: -------------------------------------------------------------------------------- 1 | /* 2 | * exception.js 3 | * Objective-J 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | var OBJJ_EXCEPTION_OUTPUT_STREAM = NULL; 24 | 25 | function objj_exception(aName, aReason, aUserInfo) 26 | { 27 | this.name = aName; 28 | this.reason = aReason; 29 | this.userInfo = aUserInfo; 30 | this.__address = _objj_generateObjectHash(); 31 | } 32 | 33 | objj_exception.prototype.toString = function() 34 | { 35 | return this.reason; 36 | } 37 | 38 | function objj_exception_throw(anException) 39 | { 40 | throw anException; 41 | } 42 | 43 | function objj_exception_report(anException, aSourceFile) 44 | { 45 | objj_fprintf(OBJJ_EXCEPTION_OUTPUT_STREAM, aSourceFile.path + "\n" + anException); 46 | 47 | throw anException; 48 | } 49 | 50 | function objj_exception_setOutputStream(aStream) 51 | { 52 | OBJJ_EXCEPTION_OUTPUT_STREAM = aStream; 53 | } 54 | 55 | #if RHINO 56 | objj_exception_setOutputStream(warning_stream); 57 | #elif DEBUG 58 | if (window.console && window.console.error) 59 | objj_exception_setOutputStream(function (aString) { console.error(aString) } ); 60 | else 61 | objj_exception_setOutputStream(alert); 62 | #else 63 | objj_exception_setOutputStream(function(aString) { }); 64 | #endif 65 | -------------------------------------------------------------------------------- /Tools/nib2cib/NSTabView.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSTabView.j 3 | * nib2cib 4 | * 5 | * Created by Thomas Robinson. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | 25 | @import "NSTabViewItem.j" 26 | 27 | 28 | @implementation CPTabView (CPCoding) 29 | 30 | - (id)NS_initWithCoder:(CPCoder)aCoder 31 | { 32 | if (self = [super NS_initWithCoder:aCoder]) 33 | { 34 | var flags = [aCoder decodeObjectForKey:@"NSTvFlags"]; 35 | 36 | _tabViewType = flags & 0x7; 37 | 38 | _tabViewItems = [aCoder decodeObjectForKey:@"NSTabViewItems"]; 39 | _selectedTabViewItem = [aCoder decodeObjectForKey:@"NSSelectedTabViewItem"]; 40 | 41 | //_delegate = [aCoder decodeObjectForKey:@""]; 42 | 43 | // not yet supported: 44 | //_allowsTruncatedLabels = [aCoder decodeBoolForKey:@"NSAllowTruncatedLabels"]; 45 | //_drawsBackground = [aCoder decodeBoolForKey:@"NSDrawsBackground"]; 46 | } 47 | 48 | return self; 49 | } 50 | 51 | @end 52 | 53 | @implementation NSTabView : CPTabView 54 | { 55 | } 56 | 57 | - (id)initWithCoder:(CPCoder)aCoder 58 | { 59 | return [self NS_initWithCoder:aCoder]; 60 | } 61 | 62 | - (Class)classForKeyedArchiver 63 | { 64 | return [CPTabView class]; 65 | } 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /Tools/nib2cib/NSScroller.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSScroller.j 3 | * nib2cib 4 | * 5 | * Created by Thomas Robinson. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | 25 | 26 | @implementation CPScroller (CPCoding) 27 | 28 | - (id)NS_initWithCoder:(CPCoder)aCoder 29 | { 30 | if (self = [super NS_initWithCoder:aCoder]) 31 | { 32 | //"NSsFlags" 33 | //"NSArrowsLoc" 34 | 35 | _controlSize = CPRegularControlSize; 36 | //if ([aCoder containsValueForKey:CPScrollerControlSizeKey]) 37 | // _controlSize = [aCoder decodeIntForKey:CPScrollerControlSizeKey]; 38 | 39 | _knobProportion = 1.0; 40 | if ([aCoder containsValueForKey:"NSPercent"]) 41 | _knobProportion = [aCoder decodeFloatForKey:"NSPercent"]; 42 | 43 | _value = 0.0; 44 | // Cocoa uses NSCurValue instead of NSControl's NSContents 45 | if ([aCoder containsValueForKey:"NSCurValue"]) 46 | _value = [aCoder decodeFloatForKey:"NSCurValue"]; 47 | } 48 | 49 | return self; 50 | } 51 | 52 | @end 53 | 54 | @implementation NSScroller : CPScroller 55 | { 56 | } 57 | 58 | - (id)initWithCoder:(CPCoder)aCoder 59 | { 60 | return [self NS_initWithCoder:aCoder]; 61 | } 62 | 63 | - (Class)classForKeyedArchiver 64 | { 65 | return [CPScroller class]; 66 | } 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /AppKit/CoreAnimation/CABackingStore.j: -------------------------------------------------------------------------------- 1 | /* 2 | * CABackingStore.j 3 | * AppKit 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import "CGGeometry.j" 24 | @import "CPCompatibility.j" 25 | 26 | #define PIXEL(pixels) pixels + "px"; 27 | 28 | 29 | function CABackingStoreGetContext(aBackingStore) 30 | { 31 | return aBackingStore.context; 32 | } 33 | 34 | if (CPFeatureIsCompatible(CPHTMLCanvasFeature)) 35 | { 36 | 37 | CABackingStoreCreate = function() 38 | { 39 | var DOMElement = document.createElement("canvas"); 40 | 41 | DOMElement.style.position = "absolute"; 42 | 43 | // FIXME: Consolidate drawImage to support this. 44 | return { context:DOMElement.getContext("2d"), buffer:DOMElement, _image:DOMElement }; 45 | } 46 | 47 | CABackingStoreSetSize = function(aBackingStore, aSize) 48 | { 49 | var buffer = aBackingStore.buffer; 50 | 51 | buffer.width = aSize.width; 52 | buffer.height = aSize.height; 53 | buffer.style.width = PIXEL(aSize.width); 54 | buffer.style.height = PIXEL(aSize.height); 55 | } 56 | } 57 | else 58 | { 59 | 60 | CABackingStoreCreate = function() 61 | { 62 | var context = CGBitmapGraphicsContextCreate(); 63 | 64 | context.buffer = ""; 65 | 66 | return { context:context }; 67 | } 68 | 69 | CABackingStoreSetSize = function(aBackingStore, aSize) 70 | { 71 | } 72 | 73 | } -------------------------------------------------------------------------------- /AppKit/AppKit.j: -------------------------------------------------------------------------------- 1 | /* 2 | * AppKit.j 3 | * AppKit 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import "CALayer.j" 24 | @import "CPAlert.j" 25 | @import "CPAnimation.j" 26 | @import "CPApplication.j" 27 | @import "CPButton.j" 28 | @import "CPClipView.j" 29 | @import "CPCollectionView.j" 30 | @import "CPColor.j" 31 | @import "CPColorPanel.j" 32 | @import "CPColorWell.j" 33 | @import "CPCompatibility.j" 34 | @import "CPControl.j" 35 | @import "CPCookie.j" 36 | @import "CPDocument.j" 37 | @import "CPDocumentController.j" 38 | @import "CPEvent.j" 39 | @import "CPFlashMovie.j" 40 | @import "CPFlashView.j" 41 | @import "CPFont.j" 42 | @import "CPFontManager.j" 43 | @import "CPGeometry.j" 44 | @import "CPImage.j" 45 | @import "CPImageView.j" 46 | @import "CPMenu.j" 47 | @import "CPMenuItem.j" 48 | @import "CPPanel.j" 49 | @import "CPPasteboard.j" 50 | @import "CPPopUpButton.j" 51 | @import "CPProgressIndicator.j" 52 | @import "CPResponder.j" 53 | @import "CPScrollView.j" 54 | @import "CPScroller.j" 55 | @import "CPSecureTextField.j" 56 | @import "CPSegmentedControl.j" 57 | @import "CPShadow.j" 58 | @import "CPSlider.j" 59 | @import "CPSplitView.j" 60 | @import "CPTabView.j" 61 | @import "CPTextField.j" 62 | @import "CPToolbar.j" 63 | @import "CPToolbarItem.j" 64 | @import "CPView.j" 65 | @import "CPWebView.j" 66 | @import "CPWindow.j" 67 | @import "CPWindowController.j" 68 | -------------------------------------------------------------------------------- /Tools/nib2cib/NSAppKit.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSAppKit.j 3 | * nib2cib 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import "NSButton.j" 24 | @import "NSCell.j" 25 | @import "NSClipView.j" 26 | @import "NSColor.j" 27 | @import "NSColorWell.j" 28 | @import "NSControl.j" 29 | @import "NSCustomObject.j" 30 | @import "NSCustomResource.j" 31 | @import "NSCustomView.j" 32 | @import "NSFont.j" 33 | @import "NSIBObjectData.j" 34 | @import "NSImageView.j" 35 | @import "NSMenu.j" 36 | @import "NSMenuItem.j" 37 | @import "NSNibConnector.j" 38 | @import "NSPopUpButton.j" 39 | @import "NSResponder.j" 40 | @import "NSScrollView.j" 41 | @import "NSScroller.j" 42 | @import "NSSet.j" 43 | @import "NSSegmentedControl.j" 44 | @import "NSSlider.j" 45 | @import "NSSplitView.j" 46 | @import "NSTabView.j" 47 | @import "NSTabViewItem.j" 48 | @import "NSTextField.j" 49 | @import "NSToolbar.j" 50 | @import "NSView.j" 51 | @import "NSWindowTemplate.j" 52 | @import "WebView.j" 53 | 54 | 55 | function CP_NSMapClassName(aClassName) 56 | { 57 | if (aClassName.indexOf("NS") === 0) 58 | { 59 | var mappedClassName = @"CP" + aClassName.substr(2); 60 | 61 | if (window[mappedClassName]) 62 | { 63 | CPLog.warn("Mapping " + aClassName + " to " + mappedClassName); 64 | 65 | return mappedClassName; 66 | } 67 | } 68 | 69 | return aClassName; 70 | } 71 | -------------------------------------------------------------------------------- /Foundation/CPURLResponse.j: -------------------------------------------------------------------------------- 1 | /* 2 | * CPURLResponse.j 3 | * Foundation 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import "CPObject.j" 24 | 25 | 26 | /* 27 | CPURL _URL; 28 | CPString _MIMEType; 29 | unsigned _expectedContentLength; 30 | CPString _textEncodingName; 31 | */ 32 | /*! 33 | Contains protocol agnostic information about a request to a specific URL. 34 | */ 35 | @implementation CPURLResponse : CPObject 36 | { 37 | CPURL _URL; 38 | } 39 | 40 | - (id)initWithURL:(CPURL)aURL 41 | { 42 | self = [super init]; 43 | 44 | if (self) 45 | _URL = aURL; 46 | 47 | return self; 48 | } 49 | 50 | - (CPURL)URL 51 | { 52 | return _URL; 53 | } 54 | /* 55 | Creating a Response 56 | initWithURL:MIMEType:expectedContentLength:textEncodingName: 57 | Getting the Response Properties 58 | expectedContentLength 59 | suggestedFilename 60 | MIMEType 61 | textEncodingName 62 | URL 63 | */ 64 | @end 65 | 66 | /*! 67 | Represents the response to an http request. 68 | */ 69 | @implementation CPHTTPURLResponse : CPURLResponse 70 | { 71 | int _statusCode; 72 | } 73 | 74 | /* @ignore */ 75 | - (id)_setStatusCode:(int)aStatusCode 76 | { 77 | _statusCode = aStatusCode; 78 | } 79 | 80 | /*! 81 | Returns the HTTP status code. 82 | */ 83 | - (int)statusCode 84 | { 85 | return _statusCode; 86 | } 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /Tools/nib2cib/NSScrollView.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSScrollView.j 3 | * nib2cib 4 | * 5 | * Created by Thomas Robinson. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | 25 | 26 | @implementation CPScrollView (CPCoding) 27 | 28 | - (id)NS_initWithCoder:(CPCoder)aCoder 29 | { 30 | if (self = [super NS_initWithCoder:aCoder]) 31 | { 32 | var flags = [aCoder decodeIntForKey:"NSsFlags"]; 33 | 34 | _hasVerticalScroller = Boolean(flags & (1 << 4)); 35 | _hasHorizontalScroller = Boolean(flags & (1 << 5)); 36 | _autohidesScrollers = Boolean(flags & (1 << 9)); 37 | 38 | _verticalScroller = [aCoder decodeObjectForKey:"NSVScroller"]; 39 | _horizontalScroller = [aCoder decodeObjectForKey:"NSHScroller"]; 40 | _contentView = [aCoder decodeObjectForKey:"NSContentView"]; 41 | 42 | //[aCoder decodeBytesForKey:"NSScrollAmts"]; 43 | _verticalLineScroll = 10.0; 44 | _verticalPageScroll = 10.0; 45 | _horizontalLineScroll = 10.0; 46 | _horizontalPageScroll = 10.0; 47 | } 48 | 49 | return self; 50 | } 51 | 52 | @end 53 | 54 | @implementation NSScrollView : CPScrollView 55 | { 56 | } 57 | 58 | - (id)initWithCoder:(CPCoder)aCoder 59 | { 60 | return [self NS_initWithCoder:aCoder]; 61 | } 62 | 63 | - (Class)classForKeyedArchiver 64 | { 65 | return [CPScrollView class]; 66 | } 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /Tools/Utilities/regex-bridge.js: -------------------------------------------------------------------------------- 1 | importClass(java.util.ArrayList); 2 | importClass(java.util.List); 3 | importClass(java.util.regex.Matcher); 4 | importClass(java.util.regex.Pattern); 5 | importClass(java.util.regex.PatternSyntaxException); 6 | 7 | var CachedRegexData = []; 8 | 9 | function regexDataFromRegex(aRegex) 10 | { 11 | var source = "", 12 | flags = ""; 13 | 14 | if (typeof aRegex == "string") 15 | { 16 | if (CachedRegexData[aRegex]) 17 | return CachedRegexData[aRegex]; 18 | 19 | string = aRegex; 20 | source = aRegex; 21 | } 22 | else 23 | { 24 | string = aRegex.toString(); 25 | 26 | if (CachedRegexData[string]) 27 | return CachedRegexData[string]; 28 | 29 | var index = string.lastIndexOf('/'); 30 | 31 | source = string.substr(0, index); 32 | flags = string.substr(index + 1); 33 | } 34 | 35 | source = source.replace("\\[\\^\\\\\\d\\]", ".", "g"); 36 | source = source.replace("\\[([^\\]]*)\\\\b([^\\]]*)\\]", "[$1\\\\cH$2]", "g") // [...\b...] -> [...\cH...] 37 | source = source.replace("(? 24 | @import 25 | @import 26 | 27 | 28 | var CPCibOwner = @"CPCibOwner"; 29 | 30 | @implementation CPObject (CPCibLoading) 31 | 32 | -(void)awakeFromCib 33 | { 34 | } 35 | 36 | @end 37 | 38 | @implementation CPBundle (CPCibLoading) 39 | 40 | + (BOOL)loadCibFile:(CPString)aPath externalNameTable:(CPDictionary)aNameTable 41 | { 42 | return [[[CPCib alloc] initWithContentsOfFile:aPath] instantiateCibWithExternalNameTable:aNameTable]; 43 | } 44 | 45 | + (BOOL)loadCibNamed:(CPString)aName owner:(id)anOwner 46 | { 47 | var bundle = [CPBundle bundleForClass:[anOwner class]]; 48 | 49 | /*NSString *path; 50 | 51 | path=[bundle pathForResource:name ofType:@"cib"]; 52 | if(path==nil) 53 | path=[[NSBundle mainBundle] pathForResource:name ofType:@"cib"]; 54 | 55 | if(path==nil) 56 | return NO; 57 | */ 58 | var path = [bundle pathForResource:aName]; 59 | 60 | return [CPBundle loadCibFile:aPath externalNameTable:[CPDictionary dictionaryWithObject:anOwner forKey:CPCibOwner]]; 61 | } 62 | 63 | - (BOOL)loadCibFile:(CPString)aPath externalNameTable:(CPDictionary)aNameTable 64 | { 65 | return [[[CPCib alloc] initWithContentsOfFile:aPath] instantiateCibWithExternalNameTable:aNameTable]; 66 | } 67 | 68 | @end 69 | 70 | -------------------------------------------------------------------------------- /Objective-J/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /Foundation/Foundation.j: -------------------------------------------------------------------------------- 1 | /* 2 | * Foundation.j 3 | * Foundation 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import "CPArray.j" 24 | @import "CPBundle.j" 25 | @import "CPCoder.j" 26 | @import "CPData.j" 27 | @import "CPDate.j" 28 | @import "CPDictionary.j" 29 | @import "CPEnumerator.j" 30 | @import "CPException.j" 31 | @import "CPIndexSet.j" 32 | @import "CPInvocation.j" 33 | @import "CPJSONPConnection.j" 34 | @import "CPKeyedArchiver.j" 35 | @import "CPKeyedUnarchiver.j" 36 | @import "CPKeyValueCoding.j" 37 | @import "CPKeyValueObserving.j" 38 | @import "CPLog.j" 39 | @import "CPNotification.j" 40 | @import "CPNotificationCenter.j" 41 | @import "CPNull.j" 42 | @import "CPNumber.j" 43 | @import "CPObject.j" 44 | @import "CPObjJRuntime.j" 45 | @import "CPPropertyListSerialization.j" 46 | @import "CPRange.j" 47 | @import "CPRunLoop.j" 48 | @import "CPSet.j" 49 | @import "CPSortDescriptor.j" 50 | @import "CPString.j" 51 | @import "CPTimer.j" 52 | @import "CPUndoManager.j" 53 | @import "CPURLConnection.j" 54 | @import "CPURLRequest.j" 55 | @import "CPURLResponse.j" 56 | @import "CPUserSessionManager.j" 57 | @import "CPValue.j" 58 | 59 | /*! @mainpage 60 | Cappuccino is distributed under the @ref license "GNU LGPL". 61 | 62 | @htmlonly
@endhtmlonly
63 |     @htmlinclude README
64 |     @htmlonly 
@endhtmlonly 65 | 66 | @page license License 67 | @htmlonly
@endhtmlonly
68 |     @htmlinclude LICENSE
69 |     @htmlonly 
@endhtmlonly 70 | 71 | @defgroup appkit AppKit 72 | @defgroup foundation Foundation 73 | */ 74 | -------------------------------------------------------------------------------- /Tools/bake/bake_template.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 15 | 16 | 17 | $APPLICATION_NAME 18 | 19 | 44 | 45 | 46 | 47 | 48 | 49 |
50 | 51 |
52 |
53 |
54 |

Loading $APPLICATION_NAME...

55 |
56 | 57 | 58 | -------------------------------------------------------------------------------- /Tools/nib2cib/NSToolbar.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSToolbar.j 3 | * nib2cib 4 | * 5 | * Created by Thomas Robinson. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | 25 | 26 | @implementation CPToolbar (NSCoding) 27 | 28 | - (id)NS_initWithCoder:(CPCoder)aCoder 29 | { 30 | if (self) 31 | { 32 | _identifier = [aCoder decodeObjectForKey:"NSToolbarIdentifier"]; 33 | _displayMode = [aCoder decodeIntForKey:"NSToolbarDisplayMode"]; 34 | _showsBaselineSeparator = [aCoder decodeBoolForKey:"NSToolbarShowsBaselineSeparator"]; 35 | _allowsUserCustomization = [aCoder decodeBoolForKey:"NSToolbarAllowsUserCustomization"]; 36 | _isVisible = [aCoder decodeBoolForKey:"NSToolbarPrefersToBeShown"]; 37 | 38 | _identifiedItems = [aCoder decodeObjectForKey:"NSToolbarIBIdentifiedItems"]; 39 | _defaultItems = [aCoder decodeObjectForKey:"NSToolbarIBDefaultItems"]; 40 | _allowedItems = [aCoder decodeObjectForKey:"NSToolbarIBAllowedItems"]; 41 | _selectableItems = [aCoder decodeObjectForKey:"NSToolbarIBSelectableItems"]; 42 | 43 | _delegate = [aCoder decodeObjectForKey:"NSToolbarDelegate"]; 44 | } 45 | 46 | return self; 47 | } 48 | 49 | @end 50 | 51 | @implementation NSToolbar : CPToolbar 52 | { 53 | } 54 | 55 | - (id)initWithCoder:(CPCoder)aCoder 56 | { 57 | return [self NS_initWithCoder:aCoder]; 58 | } 59 | 60 | - (Class)classForKeyedArchiver 61 | { 62 | return [CPToolbar class]; 63 | } 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /Tools/nib2cib/NSNibConnector.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSNibConnector.j 3 | * nib2cib 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | 25 | 26 | @implementation _CPCibConnector (NSCoding) 27 | 28 | - (id)NS_initWithCoder:(CPCoder)aCoder 29 | { 30 | self = [super init]; 31 | 32 | if (self) 33 | { 34 | _source = [aCoder decodeObjectForKey:@"NSSource"]; 35 | _destination = [aCoder decodeObjectForKey:@"NSDestination"]; 36 | _label = [aCoder decodeObjectForKey:@"NSLabel"]; 37 | 38 | CPLog.debug(@"Connection: " + [_source description] + " " + [_destination description] + " " + _label); 39 | } 40 | 41 | return self; 42 | } 43 | 44 | @end 45 | 46 | @implementation NSNibConnector : _CPCibConnector 47 | { 48 | } 49 | 50 | - (id)initWithCoder:(CPCoder)aCoder 51 | { 52 | return [self NS_initWithCoder:aCoder]; 53 | } 54 | 55 | - (Class)classForKeyedArchiver 56 | { 57 | return [_CPCibConnector class]; 58 | } 59 | 60 | @end 61 | 62 | @implementation NSNibControlConnector : _CPCibControlConnector 63 | { 64 | } 65 | 66 | - (id)initWithCoder:(CPCoder)aCoder 67 | { 68 | return [self NS_initWithCoder:aCoder]; 69 | } 70 | 71 | - (Class)classForKeyedArchiver 72 | { 73 | return [_CPCibControlConnector class]; 74 | } 75 | 76 | @end 77 | 78 | @implementation NSNibOutletConnector : _CPCibOutletConnector 79 | { 80 | } 81 | 82 | - (id)initWithCoder:(CPCoder)aCoder 83 | { 84 | return [self NS_initWithCoder:aCoder]; 85 | } 86 | 87 | - (Class)classForKeyedArchiver 88 | { 89 | return [_CPCibOutletConnector class]; 90 | } 91 | 92 | @end 93 | -------------------------------------------------------------------------------- /AppKit/CPGraphicsContext.j: -------------------------------------------------------------------------------- 1 | /* 2 | * CPGraphicsContext.j 3 | * AppKit 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | var CPGraphicsContextCurrent = nil; 24 | 25 | /*! 26 | Provides an interface for drawing to the screen. 27 | */ 28 | @implementation CPGraphicsContext : CPObject 29 | { 30 | CPContext _graphicsPort; 31 | } 32 | 33 | /*! 34 | Returns the current graphics context. 35 | */ 36 | + (CPGraphicsContext)currentContext 37 | { 38 | return CPGraphicsContextCurrent; 39 | } 40 | 41 | /*! 42 | Sets the current graphics context 43 | */ 44 | + (void)setCurrentContext:(CPGraphicsContext)aGraphicsContext 45 | { 46 | CPGraphicsContextCurrent = aGraphicsContext; 47 | } 48 | 49 | /*! 50 | Creates a graphics context with a provided port. 51 | @param aContext the context to initialize with 52 | @param aFlag whether the context should be flipped 53 | @return the initialized graphics context 54 | */ 55 | + (CPGraphicsContext)graphicsContextWithGraphicsPort:(CGContext)aContext flipped:(BOOL)aFlag 56 | { 57 | return [[self alloc] initWithGraphicsPort:aContext]; 58 | } 59 | 60 | /*! 61 | Initializes the context with a graphics port. 62 | @param aGraphicsPort the graphics port to initialize with 63 | @return the initialized context 64 | */ 65 | - (id)initWithGraphicsPort:(CPContext)aGraphicsPort 66 | { 67 | self = [super init]; 68 | 69 | if (self) 70 | _graphicsPort = aGraphicsPort; 71 | 72 | return self; 73 | } 74 | 75 | /*! 76 | Returns the graphics context's port. 77 | */ 78 | - (CGContext)graphicsPort 79 | { 80 | return _graphicsPort; 81 | } 82 | 83 | @end 84 | -------------------------------------------------------------------------------- /AppKit/Cib/_CPCibCustomResource.j: -------------------------------------------------------------------------------- 1 | /* 2 | * _CPCibCustomResource.j 3 | * AppKit 4 | * 5 | * Portions based on NSCustomResource.m (01/08/2009) in Cocotron (http://www.cocotron.org/) 6 | * Copyright (c) 2006-2007 Christopher J. W. Lloyd 7 | * 8 | * Created by Francisco Tolmasky. 9 | * Copyright 2009, 280 North, Inc. 10 | * 11 | * This library is free software; you can redistribute it and/or 12 | * modify it under the terms of the GNU Lesser General Public 13 | * License as published by the Free Software Foundation; either 14 | * version 2.1 of the License, or (at your option) any later version. 15 | * 16 | * This library is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public 22 | * License along with this library; if not, write to the Free Software 23 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 24 | */ 25 | 26 | @import 27 | @import 28 | 29 | 30 | var _CPCibCustomResourceClassNameKey = @"_CPCibCustomResourceClassNameKey", 31 | _CPCibCustomResourceResourceNameKey = @"_CPCibCustomResourceResourceNameKey"; 32 | 33 | @implementation _CPCibCustomResource : CPObject 34 | { 35 | CPString _className; 36 | CPString _resourceName; 37 | } 38 | 39 | - (CPString)filename 40 | { 41 | return ""; 42 | } 43 | 44 | - (CGSize)size 45 | { 46 | return CGSizeMakeZero(); 47 | } 48 | 49 | - (id)initWithCoder:(CPCoder)aCoder 50 | { 51 | self = [super init]; 52 | 53 | if (self) 54 | { 55 | _className = [aCoder decodeObjectForKey:_CPCibCustomResourceClassNameKey]; 56 | _resourceName = [aCoder decodeObjectForKey:_CPCibCustomResourceResourceNameKey]; 57 | } 58 | 59 | return self; 60 | } 61 | 62 | - (void)encodeWithCoder:(CPCoder)aCoder 63 | { 64 | [aCoder encodeObject:_className forKey:_CPCibCustomResourceClassNameKey]; 65 | [aCoder encodeObject:_resourceName forKey:_CPCibCustomResourceResourceNameKey]; 66 | } 67 | 68 | - (id)awakeAfterUsingCoder:(CPCoder)aCoder 69 | { 70 | if ([aCoder isKindOfClass:[_CPCibKeyedUnarchiver class]]) 71 | if (_className === @"CPImage") 72 | return [[CPImage alloc] initWithContentsOfFile:[[aCoder bundle] pathForResource:_resourceName]]; 73 | 74 | return self; 75 | } 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /Tools/nib2cib/NSPopUpButton.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSPopUpButton.j 3 | * nib2cib 4 | * 5 | * Created by Thomas Robinson. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | 25 | @import "NSMenu.j" 26 | 27 | @implementation CPPopUpButton (CPCoding) 28 | 29 | - (id)NS_initWithCoder:(CPCoder)aCoder 30 | { 31 | if (self = [super NS_initWithCoder:aCoder]) 32 | { 33 | var cell = [aCoder decodeObjectForKey:@"NSCell"]; 34 | 35 | _menu = [cell menu]; 36 | 37 | // make sure it's not null/undefined 38 | //FIXME push this check to CPPopUpButton? 39 | _selectedIndex = [cell selectedIndex] || 0; 40 | 41 | _pullsDown = [cell pullsDown]; 42 | _preferredEdge = [cell preferredEdge]; 43 | } 44 | 45 | return self; 46 | } 47 | 48 | @end 49 | 50 | @implementation NSPopUpButton : CPPopUpButton 51 | { 52 | } 53 | 54 | - (id)initWithCoder:(CPCoder)aCoder 55 | { 56 | return [self NS_initWithCoder:aCoder]; 57 | } 58 | 59 | - (Class)classForKeyedArchiver 60 | { 61 | return [CPPopUpButton class]; 62 | } 63 | 64 | @end 65 | 66 | 67 | @implementation NSPopUpButtonCell : NSMenuItemCell 68 | { 69 | BOOL pullsDown @accessors(readonly); 70 | int selectedIndex @accessors(readonly); 71 | int preferredEdge @accessors(readonly); 72 | CPMenu menu @accessors(readonly); 73 | } 74 | 75 | - (id)initWithCoder:(CPCoder)aCoder 76 | { 77 | self = [super initWithCoder:aCoder]; 78 | 79 | if (self) 80 | { 81 | pullsDown = [aCoder decodeBoolForKey:@"NSPullDown"]; 82 | selectedIndex = [aCoder decodeIntForKey:@"NSSelectedIndex"]; 83 | preferredEdge = [aCoder decodeIntForKey:@"NSPreferredEdge"]; 84 | menu = [aCoder decodeObjectForKey:@"NSMenu"]; 85 | } 86 | 87 | return self; 88 | } 89 | 90 | @end -------------------------------------------------------------------------------- /Tools/nib2cib/NSTextField.j: -------------------------------------------------------------------------------- 1 | @import 2 | 3 | @import "NSControl.j" 4 | @import "NSCell.j" 5 | 6 | @implementation CPTextField (NSCoding) 7 | 8 | - (id)NS_initWithCoder:(CPCoder)aCoder 9 | { 10 | self = [super NS_initWithCoder:aCoder]; 11 | 12 | if (self) 13 | { 14 | var cell = [aCoder decodeObjectForKey:@"NSCell"]; 15 | 16 | [self sendActionOn:CPKeyUpMask|CPKeyDownMask]; 17 | 18 | [self setEditable:[cell isEditable]]; 19 | [self setSelectable:[cell isSelectable]]; 20 | 21 | [self setBordered:[cell isBordered]]; 22 | [self setBezeled:[cell isBezeled]]; 23 | [self setBezelStyle:[cell bezelStyle]]; 24 | [self setDrawsBackground:[cell drawsBackground]]; 25 | 26 | //[self setLineBreakMode:???]; 27 | [self setTextFieldBackgroundColor:[cell backgroundColor]]; 28 | 29 | [self setPlaceholderString:[cell placeholderString]]; 30 | 31 | [self setTextColor:[cell textColor]]; 32 | 33 | CPLog.debug([self stringValue] + " => isBordered=" + [self isBordered] + ", isBezeled=" + [self isBezeled] + ", bezelStyle=" + [self bezelStyle] + "("+[cell stringValue]+", " + [cell placeholderString] + ")"); 34 | } 35 | 36 | return self; 37 | } 38 | 39 | @end 40 | 41 | @implementation NSTextField : CPTextField 42 | { 43 | } 44 | 45 | - (id)initWithCoder:(CPCoder)aCoder 46 | { 47 | return [self NS_initWithCoder:aCoder]; 48 | } 49 | 50 | - (Class)classForKeyedArchiver 51 | { 52 | return [CPTextField class]; 53 | } 54 | 55 | @end 56 | 57 | @implementation NSTextFieldCell : NSCell 58 | { 59 | CPTextFieldBezelStyle _bezelStyle @accessors(readonly, getter=bezelStyle); 60 | BOOL _drawsBackground @accessors(readonly, getter=drawsBackground); 61 | CPColor _backgroundColor @accessors(readonly, getter=backgroundColor); 62 | CPColor _textColor @accessors(readonly, getter=textColor); 63 | CPString _placeholderString @accessors(readonly, getter=placeholderString); 64 | } 65 | 66 | - (id)initWithCoder:(CPCoder)aCoder 67 | { 68 | self = [super initWithCoder:aCoder]; 69 | 70 | if (self) 71 | { 72 | _bezelStyle = [aCoder decodeObjectForKey:@"NSTextBezelStyle"] || CPTextFieldSquareBezel; 73 | _drawsBackground = [aCoder decodeBoolForKey:@"NSDrawsBackground"]; 74 | _backgroundColor = [aCoder decodeObjectForKey:@"NSBackgroundColor"]; 75 | _textColor = [aCoder decodeObjectForKey:@"NSTextColor"]; 76 | _placeholderString = [aCoder decodeObjectForKey:@"NSPlaceholderString"]; 77 | } 78 | 79 | return self; 80 | } 81 | 82 | @end 83 | -------------------------------------------------------------------------------- /Tools/nib2cib/NSSlider.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSSlider.j 3 | * nib2cib 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | 25 | @import "NSSlider.j" 26 | 27 | 28 | @implementation CPSlider (CPCoding) 29 | 30 | - (id)NS_initWithCoder:(CPCoder)aCoder 31 | { 32 | self = [super NS_initWithCoder:aCoder]; 33 | 34 | if (self) 35 | { 36 | var cell = [aCoder decodeObjectForKey:@"NSCell"]; 37 | 38 | _minValue = [cell minValue]; 39 | _maxValue = [cell maxValue]; 40 | _altIncrementValue = [cell altIncrementValue]; 41 | _isVertical = [cell isVertical]; 42 | } 43 | 44 | return self; 45 | } 46 | 47 | @end 48 | 49 | @implementation NSSlider : CPSlider 50 | { 51 | } 52 | 53 | - (id)initWithCoder:(CPCoder)aCoder 54 | { 55 | return [self NS_initWithCoder:aCoder]; 56 | } 57 | 58 | - (Class)classForKeyedArchiver 59 | { 60 | return [CPSlider class]; 61 | } 62 | 63 | @end 64 | 65 | @implementation NSSliderCell : NSCell 66 | { 67 | double _minValue @accessors(readonly, getter=minValue); 68 | double _maxValue @accessors(readonly, getter=maxValue); 69 | double _altIncrementValue @accessors(readonly, getter=altIncrementValue); 70 | BOOL _vertical @accessors(readonly, getter=isVertical); 71 | } 72 | 73 | - (id)initWithCoder:(CPCoder)aCoder 74 | { 75 | self = [super initWithCoder:aCoder]; 76 | 77 | if (self) 78 | { 79 | _objectValue = [aCoder decodeDoubleForKey:@"NSValue"]; 80 | 81 | _minValue = [aCoder decodeDoubleForKey:@"NSMinValue"]; 82 | _maxValue = [aCoder decodeDoubleForKey:@"NSMaxValue"]; 83 | _altIncrementValue = [aCoder decodeDoubleForKey:@"NSAltIncValue"]; 84 | _isVertical = [aCoder decodeBoolForKey:@"NSVertical"]; 85 | } 86 | 87 | return self; 88 | } 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /AppKit/CPWindow/_CPBorderlessBridgeWindowView.j: -------------------------------------------------------------------------------- 1 | /* 2 | * _CPBorderlessWindowView.j 3 | * AppKit 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import "_CPWindowView.j" 24 | 25 | 26 | var _CPToolbarViewBackgroundColor = nil; 27 | 28 | @implementation _CPBorderlessBridgeWindowView : _CPWindowView 29 | { 30 | CPView _toolbarBackgroundView; 31 | } 32 | 33 | + (CPColor)toolbarBackgroundColor 34 | { 35 | if (!_CPToolbarViewBackgroundColor) 36 | _CPToolbarViewBackgroundColor = [CPColor colorWithPatternImage:[[CPImage alloc] initWithContentsOfFile:[[CPBundle bundleForClass:[_CPBorderlessBridgeWindowView class]] pathForResource:@"_CPToolbarView/_CPToolbarViewBackground.png"] size:CGSizeMake(1.0, 59.0)]]; 37 | 38 | return _CPToolbarViewBackgroundColor; 39 | } 40 | 41 | - (void)tile 42 | { 43 | [super tile]; 44 | 45 | var owningWindow = [self owningWindow], 46 | bounds = [self bounds]; 47 | 48 | [[owningWindow contentView] setFrame:CGRectMake(0.0, [self toolbarMaxY], CGRectGetWidth(bounds), CGRectGetHeight(bounds) - [self toolbarMaxY])]; 49 | 50 | if (![[owningWindow toolbar] isVisible]) 51 | { 52 | [_toolbarBackgroundView removeFromSuperview]; 53 | 54 | _toolbarBackgroundView = nil; 55 | 56 | return; 57 | } 58 | 59 | if (!_toolbarBackgroundView) 60 | { 61 | _toolbarBackgroundView = [[CPView alloc] initWithFrame:CGRectMakeZero()]; 62 | 63 | [_toolbarBackgroundView setBackgroundColor:[[self class] toolbarBackgroundColor]]; 64 | [_toolbarBackgroundView setAutoresizingMask:CPViewWidthSizable]; 65 | 66 | [self addSubview:_toolbarBackgroundView positioned:CPWindowBelow relativeTo:nil]; 67 | } 68 | 69 | var frame = CGRectMakeZero(); 70 | 71 | frame.origin = CGPointMakeCopy([self toolbarOffset]); 72 | frame.size = [_toolbarView frame].size; 73 | 74 | [_toolbarBackgroundView setFrame:frame]; 75 | } 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /Tests/Foundation/CPCountedSetTest.j: -------------------------------------------------------------------------------- 1 | 2 | @import 3 | @import 4 | @import 5 | 6 | @implementation CPCountedSetTest : OJTestCase 7 | 8 | - (void)testCountForObject 9 | { 10 | var set = [CPCountedSet setWithArray:[1, 2, 3]]; 11 | 12 | [self assertTrue:[set countForObject:[CPNull null]] === 0 message:"Expected count of 0, got: "+[set countForObject:[CPNull null]]]; 13 | [self assertTrue:[set countForObject:3] === 1 message:"Expected count of 1, got: "+[set countForObject:0]]; 14 | 15 | [set addObject:1]; 16 | 17 | [self assertTrue:[set countForObject:1] === 2 message:"Expected count of 2, got: "+[set countForObject:1]]; 18 | 19 | [set addObject:2]; 20 | [set addObject:2]; 21 | 22 | [self assertTrue:[set countForObject:2] === 3 message:"Expected count of 3, got: "+[set countForObject:2]]; 23 | } 24 | 25 | - (void)testAddObject 26 | { 27 | var set = [CPCountedSet new]; 28 | 29 | [self assertTrue:[set countForObject:"foo"] === 0 message:"Expected count of 0, got: "+[set countForObject:"foo"]]; 30 | 31 | [set addObject:"foo"]; 32 | 33 | [self assertTrue:[set countForObject:"foo"] === 1 message:"Expected count of 1, got: "+[set countForObject:"foo"]]; 34 | 35 | [set addObject:"foo"]; 36 | [set addObject:"foo"]; 37 | [set addObject:"foo"]; 38 | 39 | [self assertTrue:[set countForObject:"foo"] === 4 message:"Expected count of 4, got: "+[set countForObject:"foo"]]; 40 | } 41 | 42 | - (void)testRemoveObject 43 | { 44 | var set = [CPCountedSet new]; 45 | 46 | [self assertTrue:[set countForObject:"foo"] === 0 message:"Expected count of 0, got: "+[set countForObject:"foo"]]; 47 | 48 | [set addObject:"foo"]; 49 | [set addObject:"foo"]; 50 | [set addObject:"foo"]; 51 | [set addObject:"foo"]; 52 | 53 | [self assertTrue:[set countForObject:"foo"] === 4 message:"Expected count of 4, got: "+[set countForObject:"foo"]]; 54 | 55 | [set removeObject:"foo"]; 56 | 57 | [self assertTrue:[set countForObject:"foo"] === 3 message:"Expected count of 3, got: "+[set countForObject:"foo"]]; 58 | 59 | [set removeObject:"foo"]; 60 | [set removeObject:"foo"]; 61 | 62 | [self assertTrue:[set countForObject:"foo"] === 1 message:"Expected count of 1, got: "+[set countForObject:"foo"]]; 63 | 64 | [set removeObject:"foo"]; 65 | 66 | [self assertTrue:[set countForObject:"foo"] === 0 message:"Expected count of 0, got: "+[set countForObject:"foo"]]; 67 | 68 | [set removeObject:"foo"]; 69 | [set removeObject:"foo"]; 70 | 71 | [self assertTrue:[set countForObject:"foo"] === 0 message:"Expected count of 0, got: "+[set countForObject:"foo"]]; 72 | } 73 | 74 | // FIXME: add an archiving test 75 | // FIXME: add union/intersection/minus tests? 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /AppKit/CPShadow.j: -------------------------------------------------------------------------------- 1 | /* 2 | * CPShadow.j 3 | * AppKit 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | 25 | 26 | /*! @class CPShadow 27 | 28 | Instances of this class contain the attributes of a drop shadow used in Cappuccino. 29 | */ 30 | @implementation CPShadow : CPObject 31 | { 32 | CPSize _offset; 33 | float _blurRadius; 34 | CPColor _color; 35 | 36 | CPString _cssString; 37 | } 38 | 39 | /*! 40 | Creates a shadow with the specified attributes. 41 | @param anOffset the shadow's offset 42 | @param aBlurRadius the shadow's blur radius 43 | @param aColor the shadow's color 44 | @return the new shadow 45 | */ 46 | + (id)shadowWithOffset:(CGSize)anOffset blurRadius:(float)aBlurRadius color:(CPColor)aColor 47 | { 48 | return [[CPShadow alloc] _initWithOffset:anOffset blurRadius:aBlurRadius color:aColor]; 49 | } 50 | 51 | /* @ignore */ 52 | - (id)_initWithOffset:(CPSize)anOffset blurRadius:(float)aBlurRadius color:(CPColor)aColor 53 | { 54 | self = [super init]; 55 | 56 | if (self) 57 | { 58 | _offset = anOffset; 59 | _blurRadius = aBlurRadius; 60 | _color = aColor; 61 | 62 | _cssString = [_color cssString] + " " + Math.round(anOffset.width) + @"px " + Math.round(anOffset.height) + @"px " + Math.round(_blurRadius) + @"px"; 63 | } 64 | 65 | return self; 66 | } 67 | 68 | /*! 69 | Returns the shadow's offset. 70 | */ 71 | - (CGSize)shadowOffset 72 | { 73 | return _offset; 74 | } 75 | 76 | /*! 77 | Returns the shadow's blur radius 78 | */ 79 | - (float)shadowBlurRadius 80 | { 81 | return _blurRadius; 82 | } 83 | 84 | /*! 85 | Returns the shadow's color. 86 | */ 87 | - (CPColor)shadowColor 88 | { 89 | return _color; 90 | } 91 | 92 | /*! 93 | Returns a CSS string representation of the shadow. 94 | */ 95 | - (CPString)cssString 96 | { 97 | return _cssString; 98 | } 99 | 100 | @end -------------------------------------------------------------------------------- /Foundation/CPData.j: -------------------------------------------------------------------------------- 1 | /* 2 | * CPData.j 3 | * Foundation 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import "CPObject.j" 24 | @import "CPString.j" 25 | 26 | 27 | @implementation CPData : CPObject 28 | { 29 | id _plistObject; 30 | } 31 | 32 | + (id)alloc 33 | { 34 | return new objj_data(); 35 | } 36 | 37 | + (CPData)data 38 | { 39 | return [[self alloc] initWithPlistObject:nil]; 40 | } 41 | 42 | + (CPData)dataWithString:(CPString)aString 43 | { 44 | return [[self alloc] initWithString:aString]; 45 | } 46 | 47 | + (CPData)dataWithPlistObject:(id)aPlistObject 48 | { 49 | return [[self alloc] initWithPlistObject:aPlistObject]; 50 | } 51 | 52 | - (id)initWithString:(CPString)aString 53 | { 54 | self = [super init]; 55 | 56 | if (self) 57 | string = aString; 58 | 59 | return self; 60 | } 61 | 62 | - (id)initWithPlistObject:(id)aPlistObject 63 | { 64 | self = [super init]; 65 | 66 | if (self) 67 | _plistObject = aPlistObject; 68 | 69 | return self; 70 | } 71 | 72 | - (int)length 73 | { 74 | return [[self string] length]; 75 | } 76 | 77 | - (CPString)description 78 | { 79 | return string; 80 | } 81 | 82 | - (CPString)string 83 | { 84 | if (!string && _plistObject) 85 | string = [[CPPropertyListSerialization dataFromPropertyList:_plistObject format:CPPropertyList280NorthFormat_v1_0 errorDescription:NULL] string]; 86 | 87 | return string; 88 | } 89 | 90 | - (void)setString:(CPString)aString 91 | { 92 | string = aString; 93 | _plistObject = nil; 94 | } 95 | 96 | - (id)plistObject 97 | { 98 | if (string && !_plistObject) 99 | // Attempt to autodetect the format. 100 | _plistObject = [CPPropertyListSerialization propertyListFromData:self format:0 errorDescription:NULL]; 101 | 102 | return _plistObject; 103 | } 104 | 105 | - (void)setPlistObject:(id)aPlistObject 106 | { 107 | string = nil; 108 | _plistObject = aPlistObject; 109 | } 110 | 111 | @end 112 | 113 | objj_data.prototype.isa = CPData; 114 | -------------------------------------------------------------------------------- /Foundation/CPUserSessionManager.j: -------------------------------------------------------------------------------- 1 | /* 2 | * CPUserSessionManager.j 3 | * Foundation 4 | * 5 | * Created by Francisco Tolmasky. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | @import 25 | 26 | 27 | CPUserSessionUndeterminedStatus = 0; 28 | CPUserSessionLoggedInStatus = 1; 29 | CPUserSessionLoggedOutStatus = 2; 30 | 31 | CPUserSessionManagerStatusDidChangeNotification = @"CPUserSessionManagerStatusDidChangeNotification"; 32 | CPUserSessionManagerUserIdentifierDidChangeNotification = @"CPUserSessionManagerUserIdentifierDidChangeNotification"; 33 | 34 | var CPDefaultUserSessionManager = nil; 35 | 36 | @implementation CPUserSessionManager : CPObject 37 | { 38 | CPUserSessionStatus _status; 39 | 40 | CPString _userIdentifier; 41 | } 42 | 43 | + (id)defaultManager 44 | { 45 | if (!CPDefaultUserSessionManager) 46 | CPDefaultUserSessionManager = [[CPUserSessionManager alloc] init]; 47 | 48 | return CPDefaultUserSessionManager; 49 | } 50 | 51 | - (id)init 52 | { 53 | self = [super init]; 54 | 55 | if (self) 56 | _status = CPUserSessionUndeterminedStatus; 57 | 58 | return self; 59 | } 60 | 61 | - (CPUserSessionStatus)status 62 | { 63 | return _status; 64 | } 65 | 66 | - (void)setStatus:(CPUserSessionStatus)aStatus 67 | { 68 | if (_status == aStatus) 69 | return; 70 | 71 | _status = aStatus; 72 | 73 | [[CPNotificationCenter defaultCenter] 74 | postNotificationName:CPUserSessionManagerStatusDidChangeNotification 75 | object:self]; 76 | 77 | if (_status != CPUserSessionLoggedInStatus) 78 | [self setUserIdentifier:nil]; 79 | } 80 | 81 | - (CPString)userIdentifier 82 | { 83 | return _userIdentifier; 84 | } 85 | 86 | - (void)setUserIdentifier:(CPString)anIdentifier 87 | { 88 | if (_userIdentifier == anIdentifier) 89 | return; 90 | 91 | _userIdentifier = anIdentifier; 92 | 93 | [[CPNotificationCenter defaultCenter] 94 | postNotificationName:CPUserSessionManagerUserIdentifierDidChangeNotification 95 | object:self]; 96 | } 97 | 98 | @end 99 | -------------------------------------------------------------------------------- /Tools/cplutil/cplutil.js: -------------------------------------------------------------------------------- 1 | 2 | importPackage(java.lang); 3 | 4 | importClass(java.io.File); 5 | importClass(java.io.BufferedReader); 6 | importClass(java.io.FileReader); 7 | importClass(java.io.BufferedWriter); 8 | importClass(java.io.FileWriter); 9 | 10 | 11 | function printUsage() 12 | { 13 | print("this is where you say the usage"); 14 | } 15 | 16 | function main() 17 | { 18 | if (arguments.length < 1) 19 | return printUsage(); 20 | 21 | var allFiles = NO, 22 | format = nil, 23 | filePaths = [], 24 | outPath = nil, 25 | outExtension = nil; 26 | 27 | index = 0, 28 | count = arguments.length; 29 | 30 | for (; index < count; ++index) 31 | { 32 | var argument = arguments[index]; 33 | 34 | if (argument.charAt(0) === '-' && !allFiles) 35 | { 36 | if (filePaths.length > 0) 37 | return printUsage(); 38 | 39 | else if (argument === "-convert") 40 | format = arguments[++index]; 41 | 42 | else if (argument === "-o") 43 | outPath = arguments[++index]; 44 | 45 | else if (argument === "-e") 46 | outExtension = arguments[++index]; 47 | 48 | else if (argument === "--") 49 | allFiles = YES; 50 | 51 | else if (argument === "-help") 52 | return printUsage(); 53 | } 54 | else 55 | filePaths.push(arguments[index]); 56 | } 57 | 58 | index = 0; 59 | count = filePaths.length; 60 | 61 | for (; index < count; ++index) 62 | { 63 | // Read the plist file 64 | var file = new File(filePaths[index]), 65 | reader = new BufferedReader(new FileReader(file)), 66 | fileContents = ""; 67 | 68 | // Get contents of the file 69 | while (reader.ready()) 70 | fileContents += reader.readLine() + '\n'; 71 | 72 | reader.close(); 73 | 74 | var data = new objj_data(); 75 | 76 | data.string = fileContents; 77 | 78 | var plistObject = new CPPropertyListCreateFromData(data); 79 | 80 | if (format === "280north1") 81 | data = CPPropertyListCreate280NorthData(plistObject); 82 | 83 | else if (format === "xml1") 84 | data = CPPropertyListCreateXMLData(plistObject); 85 | 86 | var outFile = file; 87 | 88 | if (outPath) 89 | outFile = new File(outPath); 90 | 91 | // else if (outExtension) 92 | 93 | 94 | // Write out file 95 | var writer = new BufferedWriter(new FileWriter(outFile)); 96 | 97 | writer.write(data.string); 98 | 99 | writer.close(); 100 | } 101 | } 102 | 103 | main.apply(main, args); 104 | -------------------------------------------------------------------------------- /Tools/nib2cib/NSMenuItem.j: -------------------------------------------------------------------------------- 1 | /* 2 | * NSMenuItem.j 3 | * nib2cib 4 | * 5 | * Created by Thomas Robinson. 6 | * Copyright 2008, 280 North, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | @import 24 | 25 | @import "NSMenu.j" 26 | 27 | 28 | @implementation CPMenuItem (NSCoding) 29 | 30 | - (id)NS_initWithCoder:(CPCoder)aCoder 31 | { 32 | self = [super init]; 33 | 34 | if (self) 35 | { 36 | _title = [aCoder decodeObjectForKey:"NSTitle"]; 37 | 38 | // _font = [aCoder decodeObjectForKey:"NSTitle"]; 39 | 40 | _target = [aCoder decodeObjectForKey:"NSTarget"]; 41 | _action = [aCoder decodeObjectForKey:"NSAction"]; 42 | 43 | _isEnabled = ![aCoder decodeBoolForKey:"NSIsDisabled"]; 44 | _isHidden = [aCoder decodeBoolForKey:"NSIsHidden"]; 45 | 46 | // _tag = [aCoder decodeIntForKey:"NSTag"]; 47 | // _state = [aCoder decodeIntForKey:"NSState"]; 48 | 49 | // _image = [aCoder decodeObjectForKey:"NSImage"]; 50 | // _alternateImage = [aCoder decodeObjectForKey:""]; 51 | // _onStateImage = [aCoder decodeObjectForKey:"NSOnImage"]; 52 | // _offStateImage = [aCoder decodeObjectForKey:"NSOffImage"]; 53 | // _mixedStateImage = [aCoder decodeObjectForKey:"NSMixedImage"]; 54 | 55 | _submenu = [aCoder decodeObjectForKey:"NSSubmenu"]; 56 | _menu = [aCoder decodeObjectForKey:"NSMenu"]; 57 | 58 | // _keyEquivalent = [aCoder decodeObjectForKey:"NSKeyEquiv"]; 59 | // _keyEquivalentModifierMask = [aCoder decodeObjectForKey:"NSKeyEquivModMask"]; 60 | 61 | // _mnemonicLocation = [aCoder decodeObjectForKey:"NSMnemonicLoc"]; 62 | 63 | // _isAlternate = [aCoder decodeBoolForKey:"NSIsAlternate"]; 64 | // _indentationLevel = [aCoder decodeBoolForKey:"NSIndent"]; 65 | 66 | // _toolTip; 67 | 68 | // _representedObject = [aCoder decodeObjectForKey:CPMenuItemRepresentedObjectKey]; 69 | } 70 | 71 | return self; 72 | } 73 | 74 | @end 75 | 76 | @implementation NSMenuItem : CPMenuItem 77 | { 78 | } 79 | 80 | - (id)initWithCoder:(CPCoder)aCoder 81 | { 82 | return [self NS_initWithCoder:aCoder]; 83 | } 84 | 85 | - (Class)classForKeyedArchiver 86 | { 87 | return [CPMenuItem class]; 88 | } 89 | 90 | @end 91 | 92 | 93 | @implementation NSMenuItemCell : NSButtonCell 94 | { 95 | } 96 | 97 | @end --------------------------------------------------------------------------------