|
|
|
Aug 29th, 2007
|
Squeak Info.plist Magic Values
|
Thoughts on plist entries
Also see http://wiki.squeak.org/squeak/105 for thoughts on command line options
Browser plugin additional options. As of Nov 14th, 2006 the new browser plugin for os-x carbon VM for PPC and MacIntel has these options, the plugin is only a stub so it controls just the traffice between the browser and the headless VM, however the parms let you choose the name and location of the VM, and the name and location of the image to use.
SqueakImageName
Name of the Squeak Image.
SqueakPlugin.image
SqueakImagePath
Path to the image.
/Applications/SqueakLand/Squeak/Internet/
SqueakVMName
Name of the Squeak Image.
Squeak VM Opt
SqueakVMPath
Path to the image.
/Applications/SqueakLand/Squeak/Internet/Squeak 3.8.14beta2U.app/Contents/MacOS/
SqueakWindowMaxLength
Number.
2048
The maximum number of pixels square (2048x2048) the drawing area can be, if you require a bigger area use a larger number, most screens aren't 2048 pixels in size yet. This limits the amount of shared memory allocated and saved the overhead of reallocating and dealing with race conditions between the plugin and the VM when you resize a browser window with a frame that follows the window size, versus using a fixed size entity.
The Squeak Application has these info.plist entires
NSServices
This is the interface to the Mac Services interface for squeak. There is one message at the moment, "Squeak DoIt" which tells Squeak to execute the contents of the clipboard and return the results. You must have the Squeak MacServices.bundle installed and have put Squeak in your Application Folder and restarted your os-x machine.
SqueakEncodingType
the SqueakEncodingType using the ICANA readable names to
designate how Squeak file names should be encoded.
macintosh -> macRoman
UTF-8 -> UTF-8
SqueakFloatingWindowGetsFocus
If the floating window should get focus and accept typing on a click
event.
set to true
SqueakMaxHeapSize
Max virtual memory size, sizes > 1GB have VM limitations (This issue was fixed in the 3.8.18 series mac carbon VM that is 32bit clean
set to 536870912
SqueakImageName
Name of the Squeak Image.
Squeak.image
For example if I set this to
foobar.thing
Then we will look for foobar.thing first in the application resource directory, then the
directory the application is in, then the Plugins directory in the directory the folder is in.
~/foobar.thing
Then we will look for foobar.thing in the user's root directory
/volume/user/foo/foobar.thing
Will look in that absolute path.
subdir/foobar.thing
Will look in the subdir of the directory the application is in.
Failure to find the image will result in a dialog selection box.
SqueakMouseCmdButton1, OptionButton1, ControlButton1, NoneButton1
3
This logic maps the buttons pressed with modifier keys to the buttons given to the VM. Normally a three button mouse would read buttons 1,2,3. However confused wi ndows programers when they designed the common scroll button mouse think the buttons read 1,3,2 .Thus SqueakMouseNoneButton1 maps to 1, NoneButton2 to 3, and NoneButton3 to 2 inorder to get the correct historical Smalltalk feel. Now when you use the apple-cmd key buttons 1,2,3 map to 3, 3, 2. And when you use the Control-key buttons 1,2,3 map to 1,3,2 and finally the option key maps to 2,3,2. So this *should* give the same button behavior as historical macintosh carbon squeak VMs when you have a one button mouse and use the modifier keys to signal different button colors, and then also give the correct behavior when you have a three button scroll mouse. Lastly before anyone asks, the Squeak VM logic only understands 3 buttons, and the logic as supplied could be wrong, if so let me know, and of course now you have full control to map buttons anyway you want.
SqueakPluginsBuiltInOrLocalOnly
when set to true makes the lookup logic only consider unix libraries or os-x bundles in
the ./Plugins folder in the same directory as the app, or the application Resources folder,
or as a foo.framework in the /System/Library/Frameworks/.
To turn this feature off and then consider the other 80+ choices of library locations and
library names set SqueakPluginsBuiltInOrLocalOnly to false.Turning the feature on
avoids a couple of hundred stat calls at startup time as the VM hunts for external versions
of internal plugins. It was added to reduce overhead and help the macIntel migration were
we provided new universal binaries that live in the application Resources folder since we cann't
load powerpc plugins on macintel machines if we found them first in the ./Pugins folder
SqueakWindowHasTitle
Squeak window has title? true/false
set to true
I've added logic to allow you to alter quartz flush logic and post
flush logic ms times. In the info.plist within the application you
will find 4 keys which alter this behavior.
SqueakUIFlushPrimaryDeferNMilliseconds = 20
Attempt to accumulate draw events in a 20 ms window. If a draw occurs
and the time is greater than 20 ms from the last draw we draw and
flush. If the draw is in the 20ms window we draw, and do a CGSync
(once) and do not do the flush. The sync should schedule an flush by
the carbon event handler within 20ms or so. Setting this value
towards 0 will flush on every draw. I will note setting to 16ms
causes the hilbert test to draw each pixel, versus clumps of pixels.
Altering this value will affect the frame rate of your squeak animation.
SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds = 20
Check no faster than 20 ms for possible pending flush events. This
reduces CPU overhead. The value of this key has a relationship to the
other two keys, but making it smaller might not improve thing.
Because of how the checking is done there is no guarantee it will
achieve a rate under say 16ms, but it will always occur within N
seconds. This value can effect how menus item highlighting is done.
SqueakUIFlushSecondaryCleanupDelayMilliseconds = 25
When N ms occur based on
SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds and we
have a flush pending and the flush has not occurred within this key
value of 25ms we force a flush. This value should be more than
SqueakUIFlushPrimaryDeferNMilliseconds to avoid conflicts with the
draw loop. If for example we have a draw and a draw then no further
drawing, the first draw should be flushed, then next cached for
upwards of 20-40ms based on
SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds then we
would see it exceeds this key value and cause the flush.
SqueakUIFlushUseHighPercisionClock = true
Use a more expensive ms accurate clock when set to true. If false we
use the 16ms based cheap clock. This is set to true to give higher
accuracy and does not seem to affect CPU usage based on statistical
sampling of production VMs.
Squeakers are welcome to alter these values to obtain best behaviour
which might change based on versions of OS-X.
Note:
Altering SqueakUIFlushPrimaryDeferNMilliseconds will affect frame rate.
Altering SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds
& SqueakUIFlushSecondaryCleanupDelayMilliseconds will affect menu
drawing.
SqueakWindowType
These control the window types and behavior
set to 6
SqueakWindowAttribute
<8200001e >
{See long explanation at the end}
SqueakWindowAttribute is normally
kWindowHorizontalZoomAttribute+ kWindowVerticalZoomAttribute+
kWindowCollapseBoxAttribute+ kWindowResizableAttribute+
kWindowNoConstrainAttribute+ kWindowStandardHandlerAttribute
The SqueakWindowType of 6 is the standard document window, a type of 8
is the floating utility window. The attributes control with window
attributes and behavior according to
http://developer.apple.com/documentation/Carbon/Reference/Window_Manager/wind_mgr_ref/chapter_1.4_section_3.html#//apple_ref/doc/uid/TP30000176-DontLinkChapterID_4-C015461
http://developer.apple.com/documentation/Carbon/Reference/Window_Manager/wind_mgr_ref/chapter_1.4_section_2.html
typedef UInt32 WindowClass;
enum {
kAlertWindowClass = 1,
kMovableAlertWindowClass = 2,
kModalWindowClass = 3,
kMovableModalWindowClass = 4,
kFloatingWindowClass = 5,
kDocumentWindowClass = 6,
kUtilityWindowClass = 8,
kHelpWindowClass = 10,
kSheetWindowClass = 11,
kToolbarWindowClass = 12,
kPlainWindowClass = 13,
kOverlayWindowClass = 14,
kSheetAlertWindowClass = 15,
kAltPlainWindowClass = 16,
kDrawerWindowClass = 20,
kAllWindowClasses = 0xFFFFFFFF
};
typedef UInt32 WindowAttributes;
enum {
kWindowNoAttributes = 0,
kWindowCloseBoxAttribute = (1L << 0),
kWindowHorizontalZoomAttribute = (1L << 1),
kWindowVerticalZoomAttribute = (1L << 2),
kWindowFullZoomAttribute = (kWindowVerticalZoomAttribute |
kWindowHorizontalZoomAttribute),
kWindowCollapseBoxAttribute = (1L << 3),
kWindowResizableAttribute = (1L << 4),
kWindowSideTitlebarAttribute = (1L << 5),
kWindowToolbarButtonAttribute = (1L << 6),
kWindowMetalAttribute = (1L << 8),
kWindowNoUpdatesAttribute = (1L << 16),
kWindowNoActivatesAttribute = (1L << 17),
kWindowOpaqueForEventsAttribute = (1L << 18),
kWindowCompositingAttribute = (1L << 19),
kWindowNoShadowAttribute = (1L << 21),
kWindowHideOnSuspendAttribute = (1L << 24),
kWindowStandardHandlerAttribute = (1L << 25),
kWindowHideOnFullScreenAttribute = (1L << 26),
kWindowInWindowMenuAttribute = (1L << 27),
kWindowLiveResizeAttribute = (1L << 28),
kWindowIgnoreClicksAttribute = (1L << 29),
kWindowNoConstrainAttribute = (1L << 31),
kWindowStandardDocumentAttributes = (kWindowCloseBoxAttribute
| kWindowFullZoomAttribute | kWindowCollapseBoxAttribute |
kWindowResizableAttribute),
kWindowStandardFloatingAttributes = (kWindowCloseBoxAttribute
| kWindowCollapseBoxAttribute)
};
|