Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 504 Bytes

README.md

File metadata and controls

28 lines (19 loc) · 504 Bytes

cocoa

Ruby FFI bindings for the OSX Cocoa API

Installation

gem install cocoa

Usage

require 'cocoa'

Cocoa::NSAutoreleasePool.new

app = Cocoa::NSApplication.sharedApplication
app.setActivationPolicy Cocoa::NSApplicationActivationPolicyRegular
app.activateIgnoringOtherApps true

alert = Cocoa::NSAlert.alloc.init.autorelease
alert.setMessageText "Hello world!"
alert.runModal

alt tag