This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSRect rect = [self bounds]; | |
CGRect bounds = CGRectInset(*(CGRect *)&rect, SHADOW_HORIZONTAL_INSET - 0.5, SHADOW_VERTICAL_INSET - 0.5); | |
NSShadow * shadow = [[NSShadow alloc] init]; | |
[shadow setShadowColor:[NSColor colorWithCalibratedWhite:0.0 alpha:0.5]]; | |
[shadow setShadowOffset:NSMakeSize(0.0, -10.0)]; | |
[shadow setShadowBlurRadius:100.0]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSWindow * window = [[NSWindow alloc] initWithContentRect:NSMakeRect(100.0, 100.0, 300.0, 400.0) styleMask:NSTitledWindowMask | NSClosableWindowMask backing:NSBackingStoreBuffered defer:YES]; | |
NSWindow * windowp = [[NSWindow alloc] initWithContentRect:NSMakeRect(100.0, 100.0, 500.0, 400.0) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]; | |
[windowp setContentView:[[View alloc] init]]; | |
[window addChildWindow:windowp ordered:NSWindowBelow]; | |
[windowp orderFront:self]; | |
[window makeKeyAndOrderFront:self]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSWindow * ontop = [[NSWindow alloc] initWithContentRect:NSMakeRect(100.0, 100.0, 300.0, 400.0) styleMask:NSTitledWindowMask | NSClosableWindowMask backing:NSBackingStoreBuffered defer:YES]; | |
NSWindow * onback = [[NSWindow alloc] initWithContentRect:NSMakeRect(100.0, 100.0, 500.0, 400.0) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]; | |
[onback setContentView:[[View alloc] init]]; | |
[ontop makeKeyAndOrderFront:self]; | |
[ontop addChildWindow:onback ordered:NSWindowBelow]; | |
[ontop setLevel:3]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort]; | |
CGRect bounds = CGRectInset(*(CGRect *)&aRect, OUTlINE_HORIZONTAL_INSET - 0.5, OUTlINE_VERTICAL_INSET - 0.5); | |
CGColorRef shadowColor = CGColorCreateGenericGray(0.0, 0.5); | |
CGContextSetShadowWithColor (context, CGSizeMake(0.0, -10.0), 30.0, shadowColor); | |
CGColorRelease(shadowColor); | |
CGColorRef fillColor = CGColorCreateGenericGray(1.0, 1.0); | |
CGColorRef strokeColor = CGColorCreateGenericGray(0.0, 0.2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* AppController.j | |
* takeTwo | |
* | |
* Created by Stefan Wallström on November 17, 2009. | |
* Copyright 2009, 280 North, Inc. All rights reserved. | |
*/ | |
@import <Foundation/CPObject.j> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
By default, a JavaScript method name is produced by concatenating the | |
components of an ObjectiveC method name, replacing ':' with '_', and | |
escaping '_' and '$' with a leading '$', such that '_' becomes "$_" and | |
'$' becomes "$$". For example: | |
ObjectiveC name Default JavaScript name | |
moveTo:: moveTo__ | |
moveTo_ moveTo$_ | |
moveTo$_ moveTo$$$_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void renderSubtreeToImage(ImageBuffer* image, RenderObject* item) | |
{ | |
ASSERT(item); | |
ASSERT(image); | |
ASSERT(image->context()); | |
RenderObject::PaintInfo info(image->context(), IntRect(), PaintPhaseForeground, 0, 0, 0); | |
// FIXME: isSVGContainer returns true for RenderSVGViewportContainer, so if this is ever | |
// called with one of those, we will read from the wrong offset in an object due to a bad cast. | |
RenderSVGContainer* svgContainer = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dict> | |
<key>begin</key> | |
<string>\b(id)\s*(?=<)</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>storage.type.js.objj</string> | |
</dict> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dict> | |
<key>begin</key> | |
<string>(?<=[=(:]|^|return)\s*(/)(?![/*+{}?])</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.begin.js</string> | |
</dict> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while (event = [NSApp nextEventMatchingMask:blah inMode:NSDefaultRunLoopMode]) | |
{ | |
while (event = [NSApp nextEventMatchingMask:blah inMode:NSEventTrackingRunLoopMode]) | |
{ | |
while (event = [NSApp nextEventMatchingMask:blah inMode:NSEventTrackingRunLoopMode]) | |
{ | |
performs; |