Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
FFI Examples
Last updated at 5:05 pm UTC on 16 January 2006
There are a good number of FFI examples for Windows, Mac and Unix platforms in the image. See the classes in categories FFI-Examples-MacOS, FFI-Examples-Win32, FFI-Examples-X11. (or in the modules under Technology-FFI-Examples)

For example, here's an example Better Debugging which brings up a Win32 native message box window on Windows platforms:

Win32Window getFocus messageBox: 'This is a Windows-native message box!' "which quits squeak on confirmation"

Here is an actual FFI api call in Win32Window class>>getFocus...

getFocus
	"Return the HWND currently having the input focus"
	<apicall: Win32Window 'GetFocus' (void) module: 'user32.dll'>
	^self externalCallFailed


Add additional FFI Examples here.