VincentBlondeau uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-VB.2364.mcz==================== Summary ====================
Name: VMMaker.oscog-VB.2364
Author: VB
Time: 14 April 2018, 12:21:14.814622 pm
UUID: d084ec90-dd2d-0048-a171-0dadc3e52888
Ancestors: VMMaker.oscog-eem.2363
- Add new primitive: primitiveHostWindowIcon
-> able to change the main window icon at runtime
See
https://pharo.fogbugz.com/f/cases/21701/Add-primitive-to-change-the-window-icon- Add a new case in the SmartSyntaxSimulator >> ccgValBlock:
=============== Diff against VMMaker.oscog-eem.2363 ===============
Item was added:
+ ----- Method: HostWindowPlugin>>primitiveHostWindowIcon:path: (in category 'system primitives') -----
+ primitiveHostWindowIcon: id path: pathString
+ "Set the icon of the window by fetching the logo in given path. Fail if the windowIndex is invalid or the platform routine returns -1 to indicate failure"
+ | res pathLength |
+ self primitive: 'primitiveHostWindowIcon'
+ parameters: #(SmallInteger ByteArray).
+ pathLength := interpreterProxy slotSizeOf: pathString cPtrAsOop.
+ res := self cCode: 'ioSetIconOfWindow(id, pathString, pathLength)'.
+ res = 0 ifTrue: [^ self ].
+ res = -1 ifTrue: [^ interpreterProxy primitiveFailFor: PrimErrBadArgument ].
+ "As the GetLastError function can return 0, but it is still an error, 1 is added to all the GetLastError error codes."
+ ^ interpreterProxy primitiveFail!
Item was changed:
----- Method: SmartSyntaxPluginSimulator>>ccgValBlock: (in category 'simulation') -----
ccgValBlock: aString
^aString caseOf: {
['isBytes'] -> [ [:oop|
interpreterProxy success: (interpreterProxy isBytes: oop).
oop]].
+ ['isWords'] -> [ [:oop|
+ interpreterProxy success: (interpreterProxy isWords: oop).
+ oop]].
['isWordsOrBytes'] -> [ [:oop|
interpreterProxy success: (interpreterProxy isWordsOrBytes: oop).
oop]] }!