FFI: FFI-Examples-mt.4.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

FFI: FFI-Examples-mt.4.mcz

commits-2
Marcel Taeumel uploaded a new version of FFI-Examples to project FFI:
http://source.squeak.org/FFI/FFI-Examples-mt.4.mcz

==================== Summary ====================

Name: FFI-Examples-mt.4
Author: mt
Time: 20 May 2020, 11:45:32.16054 am
UUID: 39250631-a7ef-614a-8c0c-0c10476923f0
Ancestors: FFI-Examples-eem.3

reorganize examples package after X11 examples have long been moved to "FFI-Unix" and MacOS examples have long been moved to "FFI-MacOS".

=============== Diff against FFI-Examples-eem.3 ===============

Item was removed:
- ExternalStructure subclass: #MacPixPatPtr
- instanceVariableNames: ''
- classVariableNames: ''
- poolDictionaries: ''
- category: 'FFI-Examples-MacOS'!
-
- !MacPixPatPtr commentStamp: 'spd 5/16/2010 22:32' prior: 0!
- See class comment for MacRect.!

Item was removed:
- ----- Method: MacPixPatPtr class>>fields (in category 'field definition') -----
- fields
- "MacPixPatPtr defineFields"
- "The following really means
- typedef void* MacPixPatPtr;
- "
- ^#(nil 'void*') "For now this is just an opaque handle"!

Item was removed:
- ----- Method: MacPixPatPtr class>>newPixPat (in category 'instance creation') -----
- newPixPat
- <apicall: MacPixPatPtr* 'NewPixPat' (void) module:'InterfaceLib'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: MacPixPatPtr>>apiDisposePixPat: (in category 'api calls') -----
- apiDisposePixPat: aPixPat
- <apicall: void 'DisposePixPat' (MacPixPatPtr*) module:'InterfaceLib'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: MacPixPatPtr>>apiMakeRGBPat:with: (in category 'api calls') -----
- apiMakeRGBPat: aPixPat with: aRGBColor
- <apicall: void 'MakeRGBPat' (MacPixPatPtr* MacRGBColor*) module: 'InterfaceLib'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: MacPixPatPtr>>dispose (in category 'initialize-release') -----
- dispose
- handle == nil ifFalse:[
- self apiDisposePixPat: self.
- handle := nil.
- ].!

Item was removed:
- ----- Method: MacPixPatPtr>>makeRGBPattern: (in category 'accessing') -----
- makeRGBPattern: aColor
- ^self apiMakeRGBPat: self with: (MacRGBColor fromColor: aColor)!

Item was removed:
- ExternalStructure subclass: #MacPoint
- instanceVariableNames: ''
- classVariableNames: ''
- poolDictionaries: ''
- category: 'FFI-Examples-MacOS'!
-
- !MacPoint commentStamp: 'spd 5/16/2010 22:32' prior: 0!
- See class comment for MacRect.!

Item was removed:
- ----- Method: MacPoint class>>apiLineTo:with: (in category 'api calls') -----
- apiLineTo: x with: y
- <apicall: void 'LineTo' (short short) module:'InterfaceLib'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: MacPoint class>>apiMoveTo:with: (in category 'api calls') -----
- apiMoveTo: x with: y
- <apicall: void 'MoveTo' (short short) module:'InterfaceLib'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: MacPoint class>>fields (in category 'field definition') -----
- fields
- "MacPoint defineFields"
- ^#(
- (v 'short')
- (h 'short')
- )!

Item was removed:
- ----- Method: MacPoint class>>lineTo: (in category 'examples') -----
- lineTo: aPoint
- "MacPoint moveTo: 0@0; lineTo: 100@100"
- ^self apiLineTo: aPoint x with: aPoint y
- !

Item was removed:
- ----- Method: MacPoint class>>macDraw (in category 'examples') -----
- macDraw
- "MacPoint macDraw"
- | pt |
- pt := self new.
- pt getMousePoint.
- self moveTo: pt.
- [Sensor anyButtonPressed] whileFalse:[
- pt getMousePoint.
- self lineTo: pt.
- ].
- Display forceToScreen.!

Item was removed:
- ----- Method: MacPoint class>>moveTo: (in category 'examples') -----
- moveTo: aPoint
- "MacPoint moveTo: 0@0; lineTo: 100@100"
- ^self apiMoveTo: aPoint x with: aPoint y
- !

Item was removed:
- ----- Method: MacPoint>>apiGetMousePoint: (in category 'api calls') -----
- apiGetMousePoint: aMacPoint
- <apicall: void 'GetMouse' (MacPoint*) module:'InterfaceLib'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: MacPoint>>getMousePoint (in category 'accessing') -----
- getMousePoint
- ^self apiGetMousePoint: self!

Item was removed:
- ----- Method: MacPoint>>h (in category 'accessing') -----
- h
- "This method was automatically generated"
- ^handle signedShortAt: 3!

Item was removed:
- ----- Method: MacPoint>>h: (in category 'accessing') -----
- h: anObject
- "This method was automatically generated"
- handle signedShortAt: 3 put: anObject!

Item was removed:
- ----- Method: MacPoint>>v (in category 'accessing') -----
- v
- "This method was automatically generated"
- ^handle signedShortAt: 1!

Item was removed:
- ----- Method: MacPoint>>v: (in category 'accessing') -----
- v: anObject
- "This method was automatically generated"
- handle signedShortAt: 1 put: anObject!

Item was removed:
- ----- Method: MacPoint>>x (in category 'accessing') -----
- x
- ^self h!

Item was removed:
- ----- Method: MacPoint>>x: (in category 'accessing') -----
- x: anObject
- ^self h: anObject!

Item was removed:
- ----- Method: MacPoint>>y (in category 'accessing') -----
- y
- ^self v!

Item was removed:
- ----- Method: MacPoint>>y: (in category 'accessing') -----
- y: anObject
- ^self v: anObject!

Item was removed:
- ExternalStructure subclass: #MacRGBColor
- instanceVariableNames: ''
- classVariableNames: ''
- poolDictionaries: ''
- category: 'FFI-Examples-MacOS'!
-
- !MacRGBColor commentStamp: 'spd 5/16/2010 22:31' prior: 0!
- See class comment for MacRect.!

Item was removed:
- ----- Method: MacRGBColor class>>fields (in category 'field definition') -----
- fields
- "MacRGBColor defineFields"
- ^#(
- (red 'ushort')
- (green 'ushort')
- (blue 'ushort')
- )!

Item was removed:
- ----- Method: MacRGBColor class>>fromColor: (in category 'instance creation') -----
- fromColor: aColor
- ^(self new)
- red: (aColor red * 16rFFFF) rounded;
- green: (aColor green * 16rFFFF) rounded;
- blue: (aColor blue * 16rFFFF) rounded;
- yourself!

Item was removed:
- ----- Method: MacRGBColor>>blue (in category 'accessing') -----
- blue
- "This method was automatically generated"
- ^handle unsignedShortAt: 5!

Item was removed:
- ----- Method: MacRGBColor>>blue: (in category 'accessing') -----
- blue: anObject
- "This method was automatically generated"
- handle unsignedShortAt: 5 put: anObject!

Item was removed:
- ----- Method: MacRGBColor>>green (in category 'accessing') -----
- green
- "This method was automatically generated"
- ^handle unsignedShortAt: 3!

Item was removed:
- ----- Method: MacRGBColor>>green: (in category 'accessing') -----
- green: anObject
- "This method was automatically generated"
- handle unsignedShortAt: 3 put: anObject!

Item was removed:
- ----- Method: MacRGBColor>>red (in category 'accessing') -----
- red
- "This method was automatically generated"
- ^handle unsignedShortAt: 1!

Item was removed:
- ----- Method: MacRGBColor>>red: (in category 'accessing') -----
- red: anObject
- "This method was automatically generated"
- handle unsignedShortAt: 1 put: anObject!

Item was removed:
- ExternalStructure subclass: #MacRect
- instanceVariableNames: ''
- classVariableNames: ''
- poolDictionaries: ''
- category: 'FFI-Examples-MacOS'!
-
- !MacRect commentStamp: 'spd 5/16/2010 22:42' prior: 0!
- I, with my friends (MacPixPatPtr, MacPoint and MacRGBColor), show how to make calls into a Mac OS framework.
-
- The particular library I use in my examples, QuickDraw, is depreciated in OS X 10.4, but the examples still run as of OS X 10.6.2
- See http://developer.apple.com/legacy/mac/library/documentation/Carbon/Reference/QuickDraw_Ref/Reference/reference.html for more information.
-
- WARNING: for Snow Leopard, see warning in MacOSShell!

Item was removed:
- ----- Method: MacRect class>>apiFillCOval:with: (in category 'api calls') -----
- apiFillCOval: r with: pat
- <apicall: void 'FillCOval' (MacRect* MacPixPatPtr*) module:'InterfaceLib'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: MacRect class>>apiFillCRect:with: (in category 'api calls') -----
- apiFillCRect: r with: pat
- <apicall: void 'FillCRect' (MacRect* MacPixPatPtr*) module:'InterfaceLib'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: MacRect class>>apiFrameOval: (in category 'api calls') -----
- apiFrameOval: r
- <apicall: void 'FrameOval' (MacRect*) module:'InterfaceLib'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: MacRect class>>apiFrameRect: (in category 'api calls') -----
- apiFrameRect: r
- <apicall: void 'FrameRect' (MacRect*) module:'InterfaceLib'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: MacRect class>>coloredEllipses (in category 'examples') -----
- coloredEllipses "MacRect coloredEllipses"
- | rnd w h colors n r pat v0 v1 |
- colors := Color colorNames collect:[:cName| (Color perform: cName)].
- "convert to PixPats"
- colors := colors collect:[:c| MacPixPatPtr newPixPat makeRGBPattern: c].
- rnd := Random new.
- w := Display width.
- h := Display height.
- n := 0.
- r := MacRect new.
- [Sensor anyButtonPressed] whileFalse:[
- pat := colors atRandom.
- v0 := (rnd next * w) asInteger.
- v1 := (rnd next * w) asInteger.
- v0 < v1 ifTrue:[r left: v0; right: v1] ifFalse:[r left: v1; right: v0].
- v0 := (rnd next * h) asInteger.
- v1 := (rnd next * h) asInteger.
- v0 < v1 ifTrue:[r top: v0; bottom: v1] ifFalse:[r top: v1; bottom: v0].
- self apiFillCOval: r with: pat.
- self apiFrameOval: r.
- n := n + 1.
- (n \\ 10) = 0 ifTrue:[n printString displayAt: 0@0].
- ].
- colors do:[:c| c dispose].
- Display forceToScreen.!

Item was removed:
- ----- Method: MacRect class>>coloredRectangles (in category 'examples') -----
- coloredRectangles "MacRect coloredRectangles"
- | rnd w h colors n r pat v0 v1 nPixels time |
- colors := Color colorNames collect:[:cName| (Color perform: cName)].
- "convert to PixPats"
- colors := colors collect:[:c| MacPixPatPtr newPixPat makeRGBPattern: c].
- rnd := Random new.
- w := Display width.
- h := Display height.
- n := 0.
- r := MacRect new.
- nPixels := 0.
- time := Time millisecondClockValue.
- [Sensor anyButtonPressed] whileFalse:[
- pat := colors atRandom.
- v0 := (rnd next * w) asInteger.
- v1 := (rnd next * w) asInteger.
- v0 < v1 ifTrue:[r left: v0; right: v1] ifFalse:[r left: v1; right: v0].
- v0 := (rnd next * h) asInteger.
- v1 := (rnd next * h) asInteger.
- v0 < v1 ifTrue:[r top: v0; bottom: v1] ifFalse:[r top: v1; bottom: v0].
- self apiFillCRect: r with: pat.
- self apiFrameRect: r.
- n := n + 1.
- nPixels := nPixels + ((r right - r left) * (r bottom - r top)).
- (n \\ 100) = 0 ifTrue:[
- 'Pixel fillRate: ', (nPixels * 1000 // (Time millisecondClockValue - time))
- asStringWithCommas displayAt: 0@0].
- ].
- colors do:[:c| c dispose].
- Display forceToScreen.!

Item was removed:
- ----- Method: MacRect class>>fields (in category 'field definition') -----
- fields
- "MacRect defineFields"
- ^#(
- (top 'short')
- (left 'short')
- (bottom 'short')
- (right 'short')
- )!

Item was removed:
- ----- Method: MacRect class>>macDraw (in category 'examples') -----
- macDraw
- "MacRect macDraw"
- ^MacPoint macDraw!

Item was removed:
- ----- Method: MacRect>>bottom (in category 'accessing') -----
- bottom
- "This method was automatically generated"
- ^handle signedShortAt: 5!

Item was removed:
- ----- Method: MacRect>>bottom: (in category 'accessing') -----
- bottom: anObject
- "This method was automatically generated"
- handle signedShortAt: 5 put: anObject!

Item was removed:
- ----- Method: MacRect>>left (in category 'accessing') -----
- left
- "This method was automatically generated"
- ^handle signedShortAt: 3!

Item was removed:
- ----- Method: MacRect>>left: (in category 'accessing') -----
- left: anObject
- "This method was automatically generated"
- handle signedShortAt: 3 put: anObject!

Item was removed:
- ----- Method: MacRect>>right (in category 'accessing') -----
- right
- "This method was automatically generated"
- ^handle signedShortAt: 7!

Item was removed:
- ----- Method: MacRect>>right: (in category 'accessing') -----
- right: anObject
- "This method was automatically generated"
- handle signedShortAt: 7 put: anObject!

Item was removed:
- ----- Method: MacRect>>top (in category 'accessing') -----
- top
- "This method was automatically generated"
- ^handle signedShortAt: 1!

Item was removed:
- ----- Method: MacRect>>top: (in category 'accessing') -----
- top: anObject
- "This method was automatically generated"
- handle signedShortAt: 1 put: anObject!

Item was removed:
- ExternalStructure subclass: #X11Display
- instanceVariableNames: ''
- classVariableNames: ''
- poolDictionaries: ''
- category: 'FFI-Examples-X11'!

Item was removed:
- ----- Method: X11Display class>>XOpenDisplay: (in category 'instance creation') -----
- XOpenDisplay: displayName
- "X11Display XOpenDisplay: nil"
- <cdecl: X11Display* 'XOpenDisplay' (char*) module:'X11'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: X11Display class>>coloredEllipses (in category 'examples') -----
- coloredEllipses
- "X11Display coloredEllipses"
- | display window gc colors rnd w h pt1 pt2 r |
- display := X11Display XOpenDisplay: nil.
- window := display ourWindow.
- gc := X11GC on: window.
- colors := Color colorNames collect:[:n| (Color perform: n) pixelWordForDepth: 32].
- rnd := Random new.
- w := Display width.
- h := Display height.
- [Sensor anyButtonPressed] whileFalse:[
- pt1 := (rnd next * w) asInteger @ (rnd next * h) asInteger.
- pt2 := (rnd next * w) asInteger @ (rnd next * h) asInteger.
- r := Rectangle encompassing: (Array with: pt1 with: pt2).
- gc foreground: colors atRandom.
- gc fillOval: r.
- gc foreground: 0.
- gc drawOval: r.
- display sync.
- ].
- gc free.
- display closeDisplay.
- Display forceToScreen.!

Item was removed:
- ----- Method: X11Display class>>coloredRectangles (in category 'examples') -----
- coloredRectangles
- "X11Display coloredRectangles"
- | display window gc colors rnd w h pt1 pt2 r nPixels time n |
- display := X11Display XOpenDisplay: nil.
- window := display ourWindow.
- gc := X11GC on: window.
- colors := Color colorNames collect:[:cn| (Color perform: cn) pixelWordForDepth: 32].
- rnd := Random new.
- w := Display width.
- h := Display height.
- n := 0.
- nPixels := 0.
- time := Time millisecondClockValue.
- [Sensor anyButtonPressed] whileFalse:[
- pt1 := (rnd next * w) asInteger @ (rnd next * h) asInteger.
- pt2 := (rnd next * w) asInteger @ (rnd next * h) asInteger.
- r := Rectangle encompassing: (Array with: pt1 with: pt2).
- gc foreground: colors atRandom.
- gc fillRectangle: r.
- gc foreground: 0.
- gc drawRectangle: r.
- display sync.
- n := n + 1.
- nPixels := nPixels + ((r right - r left) * (r bottom - r top)).
- (n \\ 100) = 0 ifTrue:[
- 'Pixel fillRate: ', (nPixels * 1000 // (Time millisecondClockValue - time))
- asStringWithCommas displayAt: 0@0].
- ].
- gc free.
- display closeDisplay.
- Display forceToScreen.!

Item was removed:
- ----- Method: X11Display class>>fields (in category 'field definition') -----
- fields
- "X11Display defineFields"
- "Note: The structure of Display is internal and only pointers to X11Display are used"
- ^#()!

Item was removed:
- ----- Method: X11Display class>>new (in category 'instance creation') -----
- new
- ^ self on: nil!

Item was removed:
- ----- Method: X11Display class>>on: (in category 'instance creation') -----
- on: aStringOrNil
- ^ self XOpenDisplay: aStringOrNil!

Item was removed:
- ----- Method: X11Display class>>x11Draw (in category 'examples') -----
- x11Draw
- "X11Display x11Draw"
- | display window gc nextPt lastPt ptr |
- display := X11Display XOpenDisplay: nil.
- window := display ourWindow.
- gc := X11GC on: window.
- gc foreground: 0.
- lastPt := nil.
- [ptr := display queryPointer: window. "{root. child. root pos. win pos. mask}"
- ptr last anyMask: 256] whileFalse:[
- nextPt := ptr fourth.
- nextPt = lastPt ifFalse:[
- lastPt ifNotNil: [
- gc drawLineFrom: lastPt to: nextPt.
- display sync].
- lastPt := nextPt].
- ].
- gc free.
- display closeDisplay.
- Display forceToScreen.!

Item was removed:
- ----- Method: X11Display>>None (in category 'xlib calls') -----
- None
- ^ 0!

Item was removed:
- ----- Method: X11Display>>XCloseDisplay: (in category 'xlib calls') -----
- XCloseDisplay: aDisplay
- <cdecl: void 'XCloseDisplay' (X11Display*) module:'X11'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: X11Display>>XDisplayString: (in category 'xlib calls') -----
- XDisplayString: aDisplay
- <cdecl: char* 'XDisplayString' (X11Display*) module:'X11'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: X11Display>>XFlush: (in category 'xlib calls') -----
- XFlush: xDisplay
- <cdecl: void 'XFlush' (X11Display*) module:'X11'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: X11Display>>XGetInputFocus:with:with: (in category 'xlib calls') -----
- XGetInputFocus: display with: focus with: revert
- <cdecl: void 'XGetInputFocus' (X11Display* X11Window* long*) module: 'X11'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: X11Display>>XQueryPointer:window:returnRoot:child:rootX:rootY:winX:winY:mask: (in category 'xlib calls') -----
- XQueryPointer: display window: w returnRoot: root child: child rootX: rootX rootY: rootY winX: winX winY: winY mask: mask
- <cdecl: bool 'XQueryPointer' (X11Display* X11Window X11Window* X11Window* long* long* long* long* long*) module: 'X11'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: X11Display>>XSync: (in category 'xlib calls') -----
- XSync: xDisplay
- <cdecl: void 'XSync' (X11Display*) module:'X11'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: X11Display>>XWarpPointer:sourceWindow:destWindow:sourceX:sourceY:sourceWidth:sourceHeight:destX:destY: (in category 'xlib calls') -----
- XWarpPointer: display sourceWindow: srcWindowID destWindow: destWindowID sourceX: srcX sourceY: srcY sourceWidth: srcWidth sourceHeight: srcHeight destX: destX destY: destY
- <cdecl: bool 'XWarpPointer' (X11Display* ulong ulong long long ulong ulong long long) module: 'X11'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: X11Display>>closeDisplay (in category 'initialize-release') -----
- closeDisplay
- handle == nil ifFalse:[
- self XCloseDisplay: self.
- handle := nil].!

Item was removed:
- ----- Method: X11Display>>displayString (in category 'accessing') -----
- displayString
- ^self XDisplayString: self!

Item was removed:
- ----- Method: X11Display>>flush (in category 'initialize-release') -----
- flush
- self XFlush: self!

Item was removed:
- ----- Method: X11Display>>getInputFocus (in category 'accessing') -----
- getInputFocus
- | focus revert |
- focus := X11Window display: self.
- revert := WordArray new: 1.
- self XGetInputFocus: self with: focus with: revert.
- ^focus!

Item was removed:
- ----- Method: X11Display>>ourWindow (in category 'accessing') -----
- ourWindow
- "Guess the window to draw on."
- | window ptr child |
- window := self getInputFocus.
- ptr := self queryPointer: window. "{root. child. root pos. win pos. mask}"
- child := ptr second.
- child xid = 0 ifTrue: [^ window].
- ^ child!

Item was removed:
- ----- Method: X11Display>>queryPointer: (in category 'accessing') -----
- queryPointer: aX11Window
- | root child rootX rootY winX winY mask |
- root := X11Window display: self.
- child := X11Window display: self.
- rootX := WordArray new: 1.
- rootY := WordArray new: 1.
- winX := WordArray new: 1.
- winY := WordArray new: 1.
- mask := WordArray new: 1.
- self XQueryPointer: self window: aX11Window returnRoot: root child: child
- rootX: rootX rootY: rootY winX: winX winY: winY mask: mask.
- ^{root. child. rootX first @ rootY first. winX first @ winY first. mask first}!

Item was removed:
- ----- Method: X11Display>>sync (in category 'initialize-release') -----
- sync
- ^self XSync: self!

Item was removed:
- ----- Method: X11Display>>warpPointerBy: (in category 'accessing') -----
- warpPointerBy: aPoint
- "Moves the mouse pointer from its current location to its current location + aPoint. Generates a mouse move event if the squeak window is active"
-
- ^ self XWarpPointer: self
- sourceWindow: self None
- destWindow: self None
- sourceX: 0 sourceY: 0 sourceWidth: 0 sourceHeight: 0
- destX: aPoint x destY: aPoint y!

Item was removed:
- ----- Method: X11Display>>warpPointerFrom:in:To:in: (in category 'accessing') -----
- warpPointerFrom: aRectangle in: sourceWindow To: aPoint in: destWindow
- "Moves the mouse pointer to aPoint relative to the top-left corner of a window"
-
- ^ self XWarpPointer: self
- sourceWindow: sourceWindow xid
- destWindow: destWindow xid
- sourceX: aRectangle left sourceY: aRectangle top
- sourceWidth: aRectangle width sourceHeight: aRectangle height
- destX: aPoint x destY: aPoint y!

Item was removed:
- ----- Method: X11Display>>warpPointerTo:in: (in category 'accessing') -----
- warpPointerTo: aPoint in: aWindow
- "Moves the mouse pointer to aPoint relative to the top-left corner of a window"
-
- ^ self XWarpPointer: self
- sourceWindow: self None
- destWindow: aWindow xid
- sourceX: 0 sourceY: 0 sourceWidth: 0 sourceHeight: 0
- destX: aPoint x destY: aPoint y!

Item was removed:
- ExternalStructure subclass: #X11Drawable
- instanceVariableNames: 'display'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'FFI-Examples-X11'!

Item was removed:
- ----- Method: X11Drawable class>>display: (in category 'instance creation') -----
- display: aX11Display
- ^ self new display: aX11Display!

Item was removed:
- ----- Method: X11Drawable class>>fields (in category 'field definition') -----
- fields
- "X11Drawable defineFields"
- ^#( nil 'void*' )!

Item was removed:
- ----- Method: X11Drawable class>>none (in category 'instance creation') -----
- none
- "Universal null resource or null atom"
- ^ self new!

Item was removed:
- ----- Method: X11Drawable>>display (in category 'accessing') -----
- display
- ^display!

Item was removed:
- ----- Method: X11Drawable>>display: (in category 'accessing') -----
- display: aDisplay
- display := aDisplay!

Item was removed:
- ----- Method: X11Drawable>>printOn: (in category 'printing') -----
- printOn: aStream
- aStream
- nextPutAll: self class name;
- nextPut: $(;
- nextPutAll: self xid printStringHex;
- nextPut: $) !

Item was removed:
- ----- Method: X11Drawable>>xid (in category 'accessing') -----
- xid
- ^ handle unsignedLongAt: 1!

Item was removed:
- ----- Method: X11Drawable>>xid: (in category 'accessing') -----
- xid: anUnsignedInteger
- xid := anUnsignedInteger!

Item was removed:
- ExternalStructure subclass: #X11GC
- instanceVariableNames: 'drawable'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'FFI-Examples-X11'!

Item was removed:
- ----- Method: X11GC class>>XCreateGC:with:with:with: (in category 'xlib calls') -----
- XCreateGC: xDisplay with: aDrawable with: valueMask with: values
- <cdecl: X11GC 'XCreateGC' (X11Display* X11Drawable ulong long*) module: 'X11'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: X11GC class>>fields (in category 'field definition') -----
- fields
- "X11GC defineFields"
- ^#( nil 'void*' )!

Item was removed:
- ----- Method: X11GC class>>on: (in category 'instance creation') -----
- on: aDrawable
- | xgc |
- xgc := self XCreateGC: aDrawable display with: aDrawable with: 0 with: nil.
- xgc drawable: aDrawable.
- ^xgc!

Item was removed:
- ----- Method: X11GC>>XDrawArc:with:with:with:with:with:with:with:with: (in category 'xlib calls') -----
- XDrawArc: xDisplay with: xDrawable with: xGC with: x with: y with: w with: h with: a1 with: a2
- <cdecl: void 'XDrawArc' (X11Display* X11Drawable X11GC long long ulong ulong long long) module: 'X11'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: X11GC>>XDrawLine:with:with:with:with:with:with: (in category 'xlib calls') -----
- XDrawLine: xDisplay with: aDrawable with: xGC with: x0 with: y0 with: x1 with: y1
- <cdecl: long 'XDrawLine' (X11Display* X11Drawable X11GC long long long long) module: 'X11'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: X11GC>>XDrawRectangle:with:with:with:with:with:with: (in category 'xlib calls') -----
- XDrawRectangle: xDisplay with: xDrawable with: xGC with: x with: y with: w with: h
- <cdecl: void 'XDrawRectangle' (X11Display* X11Drawable X11GC long long ulong ulong) module: 'X11'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: X11GC>>XFillArc:with:with:with:with:with:with:with:with: (in category 'xlib calls') -----
- XFillArc: xDisplay with: xDrawable with: xGC with: x with: y with: w with: h with: a1 with: a2
- <cdecl: void 'XFillArc' (X11Display* X11Drawable X11GC long long ulong ulong long long) module: 'X11'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: X11GC>>XFillRectangle:with:with:with:with:with:with: (in category 'xlib calls') -----
- XFillRectangle: xDisplay with: xDrawable with: xGC with: x with: y with: w with: h
- <cdecl: void 'XFillRectangle' (X11Display* X11Drawable X11GC long long ulong ulong) module: 'X11'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: X11GC>>XFreeGC:with: (in category 'xlib calls') -----
- XFreeGC: xDisplay with: xGC
- <cdecl: long 'XFreeGC' (X11Display* X11GC) module: 'X11'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: X11GC>>XSetBackground:with:with: (in category 'xlib calls') -----
- XSetBackground: xDisplay with: xGC with: bg
- <cdecl: void 'XSetBackground' (X11Display* X11GC long) module: 'X11'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: X11GC>>XSetForeground:with:with: (in category 'xlib calls') -----
- XSetForeground: xDisplay with: xGC with: fg
- <cdecl: void 'XSetForeground' (X11Display* X11GC long) module: 'X11'>
- ^self externalCallFailed!

Item was removed:
- ----- Method: X11GC>>background: (in category 'drawing') -----
- background: pixelValue
- self XSetBackground: self display with: self with: pixelValue!

Item was removed:
- ----- Method: X11GC>>display (in category 'accessing') -----
- display
- ^drawable display!

Item was removed:
- ----- Method: X11GC>>drawLineFrom:to: (in category 'drawing') -----
- drawLineFrom: pt1 to: pt2
- self XDrawLine: self display
- with: drawable
- with: self
- with: pt1 x
- with: pt1 y
- with: pt2 x
- with: pt2 y!

Item was removed:
- ----- Method: X11GC>>drawOval: (in category 'drawing') -----
- drawOval: aRectangle
- self
- XDrawArc: self display
- with: drawable
- with: self
- with: aRectangle left
- with: aRectangle top
- with: aRectangle width
- with: aRectangle height
- with: 0
- with: 64*360!

Item was removed:
- ----- Method: X11GC>>drawRectangle: (in category 'drawing') -----
- drawRectangle: aRectangle
- self
- XDrawRectangle: self display
- with: drawable
- with: self
- with: aRectangle left
- with: aRectangle top
- with: aRectangle width
- with: aRectangle height!

Item was removed:
- ----- Method: X11GC>>drawable (in category 'accessing') -----
- drawable
- ^drawable!

Item was removed:
- ----- Method: X11GC>>drawable: (in category 'accessing') -----
- drawable: aDrawable
- drawable := aDrawable!

Item was removed:
- ----- Method: X11GC>>fillOval: (in category 'drawing') -----
- fillOval: aRectangle
- self
- XFillArc: self display
- with: drawable
- with: self
- with: aRectangle left
- with: aRectangle top
- with: aRectangle width
- with: aRectangle height
- with: 0
- with: 64*360!

Item was removed:
- ----- Method: X11GC>>fillRectangle: (in category 'drawing') -----
- fillRectangle: aRectangle
- self
- XFillRectangle: self display
- with: drawable
- with: self
- with: aRectangle left
- with: aRectangle top
- with: aRectangle width
- with: aRectangle height!

Item was removed:
- ----- Method: X11GC>>foreground: (in category 'drawing') -----
- foreground: pixelValue
- self XSetForeground: self display with: self with: pixelValue
- !

Item was removed:
- ----- Method: X11GC>>free (in category 'initialize-release') -----
- free
- handle == nil ifFalse:[
- self XFreeGC: self display with: self.
- handle := nil.
- ].!

Item was removed:
- X11Drawable subclass: #X11Window
- instanceVariableNames: ''
- classVariableNames: ''
- poolDictionaries: ''
- category: 'FFI-Examples-X11'!