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
//Lion にあって Snow Leopard にないメソッドや変数 | |
@interface BrowserWindowControllerMac : WindowController{ | |
BOOL _isObservingFrameChangeNotifications; | |
int _fullScreenState; | |
struct CGRect _windowFrameBeforeFullScreen; | |
struct CGPoint _browserViewScreenOriginBeforeFullScreen; | |
NSMutableSet *_fullScreenAutoShowingBars; | |
NSMutableSet *_fullScreenAlwaysVisibleBars; | |
double _fullScreenAuxiliaryViewMinHeight; |
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
//i386 x86_64用 | |
//needs CoreServices.framework | |
BOOL setFileTypeAndCreator(NSString* asFilePath, const char* typeStr, const char* creatorStr); | |
UInt32 OSTypeFromString(const char* inStr); | |
UInt32 OSTypeFromString(const char* inStr) | |
{ | |
UInt32 outType; | |
char *buff; |
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
// | |
// STWKClientHook.m | |
#import "STWKClientHook.h" | |
#import <objc/message.h> | |
struct STWKOrderedClientCluster{ | |
struct WKPageLoaderClient loader; | |
struct WKPagePolicyClient policy; | |
struct WKPageFormClient form; |
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
//ScriptingBridge で make new Finder window | |
FinderApplication* app = [SBApplication applicationWithBundleIdentifier:@"com.apple.finder"]; | |
FinderFinderWindow* w = [app sendEvent:'core' id:'crel' parameters:'kocl', @"brow", 0]; | |
//表示するフォルダを指定したい場合はこう(文字列で直接指定する場合旧式の:区切りパス) | |
FinderFinderWindow* w = [app sendEvent:'core' id:'crel' parameters:'kocl', @"brow", | |
'to ', @"Path:to:folder", | |
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
//Same as "target of window as Unicode text" | |
FinderFinderWindow* window; | |
FinderFolder* folder=window.target; | |
NSString* str = [folder sendEvent:'core' id:'getd' parameters:'rtyp', @"utxt", 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
+ (void)showNotificationString:(NSString*)label inView:(NSView*)parentView | |
{ | |
NSRect frame=parentView.frame; | |
frame.origin=NSZeroPoint; | |
frame.size.height=20; | |
frame.origin.y-=frame.size.height; | |
DTNotificationView* noteView=[[DTNotificationView alloc]initWithFrame:frame]; | |
noteView.label=label; | |
[parentView addSubview:noteView]; |
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
#!/usr/bin/php | |
<?php | |
/* | |
Sequel Pro のプラグイン(bundles)サンプル | |
needs PHP 5.3 or later because of str_getcsv() | |
copy field names to clipboard | |
*/ | |
$table = $_ENV['SP_SELECTED_TABLE']; |
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
@interface SSRefrectingScrollView : NSScrollView | |
@property BOOL inRefrecting; | |
@property (assign)IBOutlet SSRefrectingScrollView* counterPartView; | |
@end | |
@implementation SSRefrectingScrollView |
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
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>FKEY to Shift_L</name> | |
<appendix>(+ When you type FKEY only, send FKEY)</appendix> | |
<identifier>private.fkey2shiftL_fkey</identifier> | |
<autogen>__KeyOverlaidModifier__ KeyCode::F1, KeyCode::SHIFT_L, KeyCode::F1</autogen> | |
<autogen>__KeyOverlaidModifier__ KeyCode::F2, KeyCode::SHIFT_L, KeyCode::F2</autogen> | |
<autogen>__KeyOverlaidModifier__ KeyCode::F3, KeyCode::SHIFT_L, KeyCode::F3</autogen> | |
<autogen>__KeyOverlaidModifier__ KeyCode::F4, KeyCode::SHIFT_L, KeyCode::F4</autogen> |
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
NSImage* lightImage; | |
{ | |
lightImage=[[NSImage alloc]initWithSize:[image size]]; | |
[lightImage lockFocus]; | |
NSRect rect=NSZeroRect; | |
rect.size=[image size]; | |
[image drawAtPoint:NSZeroPoint fromRect:rect operation:NSCompositeCopy fraction:0.4]; | |
[lightImage unlockFocus]; | |
} |