'From SqueakNihongo6.1 of 17 April 2004 [latest update: #0] on 11 June 2004 at 2:19:34 am'! !Win32Window class methodsFor: 'utilities' stamp: 'minami 6/11/2004 02:15'! flashWindow " Win32Window flashWindow " | hWnd | hWnd _ Win32Window getCurrentHandle. ^ Win32Window flashWindow: hWnd with: 2! ! !Win32Window class methodsFor: 'utilities' stamp: 'minami 6/2/2004 01:01'! getCurrentHandle " Win32Window getCurrentHandle " | title | title _ 'Squeak!! (' , Smalltalk imageName , ')'. ^ Win32Window findWindow: nil with: title.! ! !Win32Window class methodsFor: 'utilities' stamp: 'minami 6/2/2004 00:59'! maximizeWindow " Win32Window maximizeWindow " | hWnd | hWnd _ Win32Window getCurrentHandle. ^ Win32Window showWindow: hWnd with: 3! ! !Win32Window class methodsFor: 'utilities' stamp: 'minami 6/2/2004 01:00'! minimizeWindow " Win32Window minimizeWindow " | hWnd | hWnd _ Win32Window getCurrentHandle. ^ Win32Window closeWindow: hWnd! ! !Win32Window class methodsFor: 'utilities' stamp: 'minami 6/2/2004 01:00'! moveWindow: originPoint extent: extentPoint " Win32Window moveWindow: 50@100 extent: 800@600 " | hWnd | hWnd _ Win32Window getCurrentHandle. ^ Win32Window moveWindow: hWnd x: originPoint x y: originPoint y width: extentPoint x height: extentPoint y repaint: 1! ! !Win32Window class methodsFor: 'utilities' stamp: 'minami 6/2/2004 01:00'! setWindowText: aString " Win32Window setWindowText: 'Squeak!! (Win32Window >> setWindowText:)' " | hWnd | hWnd _ Win32Window getCurrentHandle. ^ Win32Window setWindowText: hWnd with: aString! ! !Win32Window class methodsFor: 'operations' stamp: 'minami 6/11/2004 02:12'! closeWindow: hWnd ^ (self apiCloseWindow: hWnd) ~= 0! ! !Win32Window class methodsFor: 'operations' stamp: 'minami 6/11/2004 02:17'! findWindow: className with: windowName | cls win | cls := self convertToSystemString: className. win := self convertToSystemString: windowName. ^ self apiFindWindow: cls with: win! ! !Win32Window class methodsFor: 'operations' stamp: 'minami 6/11/2004 02:12'! flashWindow: hWnd with: flag ^ self apiFlashWindow: hWnd with: flag! ! !Win32Window class methodsFor: 'operations' stamp: 'minami 6/1/2004 13:19'! getForegroundWindow ^ self apiGetForegroundWindow! ! !Win32Window class methodsFor: 'operations' stamp: 'minami 6/11/2004 02:12'! isIconic: hWnd ^ (self apiIsIconic: hWnd) == 1! ! !Win32Window class methodsFor: 'operations' stamp: 'minami 6/11/2004 02:12'! isZoomed: hWnd ^ (self apiIsZoomed: hWnd) ~= 0! ! !Win32Window class methodsFor: 'operations' stamp: 'minami 6/11/2004 02:11'! moveWindow: hWnd x: x y: y width: width height: height repaint: repaintFlag ^ (self apiMoveWindow: hWnd with: x with: y with: width with: height with: repaintFlag) ~= 0! ! !Win32Window class methodsFor: 'operations' stamp: 'minami 6/1/2004 01:45'! setWindowPos: hWnd after: hWndInsertAfter x: x y: y width: width height: height flags: flags ^ (self apiSetWindowPos: hWnd with: hWndInsertAfter with: x with: y with: width with: height with: flags) ~= 0! ! !Win32Window class methodsFor: 'operations' stamp: 'minami 6/1/2004 02:08'! setWindowPos: hWnd x: x y: y width: width height: height ^ (self apiSetWindowPos: hWnd with: nil with: x with: y with: width with: height with: 64) ~= 0! ! !Win32Window class methodsFor: 'operations' stamp: 'minami 6/11/2004 02:12'! setWindowText: hWnd with: newTitle | nTitle | nTitle := self convertToSystemString: newTitle. ^ (self apiSetWindowText: hWnd with: nTitle) ~= 0! ! !Win32Window class methodsFor: 'operations' stamp: 'minami 6/11/2004 02:12'! showWindow: hWnd with: flag ^ (self apiShowWindow: hWnd with: flag) ~= 0! ! !Win32Window class methodsFor: 'api calls' stamp: 'minami 6/1/2004 13:09'! apiCloseWindow: hWnd ^self externalCallFailed! ! !Win32Window class methodsFor: 'api calls' stamp: 'minami 6/1/2004 01:59'! apiFindWindow: className with: windowName ^self externalCallFailed! ! !Win32Window class methodsFor: 'api calls' stamp: 'minami 6/1/2004 13:12'! apiFlashWindow: hWnd with: flag ^self externalCallFailed! ! !Win32Window class methodsFor: 'api calls' stamp: 'minami 6/1/2004 13:18'! apiGetForegroundWindow ^self externalCallFailed! ! !Win32Window class methodsFor: 'api calls' stamp: 'minami 6/1/2004 13:22'! apiIsIconic: hWnd ^self externalCallFailed! ! !Win32Window class methodsFor: 'api calls' stamp: 'minami 6/1/2004 13:04'! apiIsZoomed: hWnd ^self externalCallFailed! ! !Win32Window class methodsFor: 'api calls' stamp: 'minami 6/1/2004 23:58'! apiMoveWindow: hWnd with: x with: y with: width with: height with: repaintFlag ^self externalCallFailed! ! !Win32Window class methodsFor: 'api calls' stamp: 'minami 6/1/2004 02:00'! apiSetWindowPos: hWnd with: hWndInsertAfter with: x with: y with: width with: height with: flags ^self externalCallFailed! ! !Win32Window class methodsFor: 'api calls' stamp: 'minami 6/1/2004 13:30'! apiSetWindowText: hWnd with: newTitle ^self externalCallFailed! ! !Win32Window class methodsFor: 'api calls' stamp: 'minami 6/1/2004 01:59'! apiShowWindow: hWnd with: flag ^self externalCallFailed! ! !Win32Window class methodsFor: 'private utilities' stamp: 'minami 6/11/2004 02:14'! convertFromSystemString: aString ^ (aString respondsTo: #convertFromSystemString) ifTrue: [aString perform: #convertFromSystemString] ifFalse: [aString]! ! !Win32Window class methodsFor: 'private utilities' stamp: 'minami 6/11/2004 02:15'! convertToSystemString: aString ^ (aString respondsTo: #convertToSystemString) ifTrue: [aString perform: #convertToSystemString] ifFalse: [aString]! ! !Win32Window class reorganize! ('accessing' getDesktopWindow getFocus) ('examples' coloredEllipses coloredRectangles win32Draw) ('utilities' flashWindow getCurrentHandle maximizeWindow minimizeWindow moveWindow:extent: setWindowText:) ('operations' closeWindow: findWindow:with: flashWindow:with: getForegroundWindow isIconic: isZoomed: moveWindow:x:y:width:height:repaint: setWindowPos:after:x:y:width:height:flags: setWindowPos:x:y:width:height: setWindowText:with: showWindow:with:) ('api calls' apiCloseWindow: apiFindWindow:with: apiFlashWindow:with: apiGetForegroundWindow apiIsIconic: apiIsZoomed: apiMoveWindow:with:with:with:with:with: apiSetWindowPos:with:with:with:with:with:with: apiSetWindowText:with: apiShowWindow:with:) ('private utilities' convertFromSystemString: convertToSystemString:) !