|
From: John M M. <jo...@us...> - 2003-12-02 05:02:01
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm
In directory sc8-pr-cvs1:/tmp/cvs-serv14663/squeak/platforms/Mac OS/vm
Modified Files:
sqMacWindow.c
Log Message:
3.7.0b2 Changes for file name encoding. Ensure we use current encoding when working with file names. Change logic in vmPath, imageName, shortImageName, documentName to support CFString which we convert to desired encoding at read time.
Index: sqMacWindow.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/sqMacWindow.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** sqMacWindow.c 20 Nov 2003 01:35:47 -0000 1.29
--- sqMacWindow.c 2 Dec 2003 04:53:12 -0000 1.30
***************
*** 16,19 ****
--- 16,20 ----
3.2.8b1 July 24th, 2002 JMM support for os-x plugin under IE 5.x
3.5.1b5 June 25th, 2003 JMM fix memory leak on color table free, pull preferences from Info.plist under os-x
+ 3.7.0bx Nov 24th, 2003 JMM move preferences to main, the proper place.
*****************************************************************************/
***************
*** 59,63 ****
extern struct VirtualMachine *interpreterProxy;
int ioSetFullScreenActual(int fullScreen);
- void fetchPrefrencesForWindow(int *windowType,int *windowAttributes);
void SetupSurface(void);
--- 60,63 ----
***************
*** 356,360 ****
out += pixPitch;
}
! } else if (depth == 16 && pixDepth == 8) { // Untested, perhaps will not get called
SetPort(windowPort);
while (affectedH--) {
--- 356,360 ----
out += pixPitch;
}
! } else if (depth == 16 && pixDepth == 8) { //Tested by Steve Moffitt <st...@ci...> not all machines do true 8bit windows, some the GPU does and window stays as 16bits
SetPort(windowPort);
while (affectedH--) {
***************
*** 521,527 ****
if ((Ptr)CreateNewWindow != (Ptr)kUnresolvedCFragSymbolAddress) {
! int windowType,windowAttributes;
! fetchPrefrencesForWindow(&windowType,&windowAttributes);
! CreateNewWindow(windowType,windowAttributes,&windowBounds,&stWindow);
} else
#endif
--- 521,527 ----
if ((Ptr)CreateNewWindow != (Ptr)kUnresolvedCFragSymbolAddress) {
! extern UInt32 gSqueakWindowType,gSqueakWindowAttributes;
!
! CreateNewWindow(gSqueakWindowType,gSqueakWindowAttributes,&windowBounds,&stWindow);
} else
#endif
***************
*** 1149,1203 ****
}
- #if TARGET_API_MAC_CARBON
- void fetchPrefrencesForWindow(int *windowType,int *windowAttributes) {
- CFBundleRef myBundle;
- CFDictionaryRef myDictionary;
- CFNumberRef SqueakWindowType,SqueakMaxHeapSizeType;
- CFBooleanRef SqueakWindowHasTitleType,SqueakFloatingWindowGetsFocusType;
- CFDataRef SqueakWindowAttributeType;
- extern Boolean gSqueakWindowIsFloating,gSqueakWindowHasTitle,gSqueakFloatingWindowGetsFocus;
- extern UInt32 gMaxHeapSize;
-
- myBundle = CFBundleGetMainBundle();
- myDictionary = CFBundleGetInfoDictionary(myBundle);
- SqueakWindowType = CFDictionaryGetValue(myDictionary, CFSTR("SqueakWindowType"));
- SqueakWindowAttributeType = CFDictionaryGetValue(myDictionary, CFSTR("SqueakWindowAttribute"));
- SqueakWindowHasTitleType = CFDictionaryGetValue(myDictionary, CFSTR("SqueakWindowHasTitle"));
- SqueakFloatingWindowGetsFocusType = CFDictionaryGetValue(myDictionary, CFSTR("SqueakFloatingWindowGetsFocus"));
- SqueakMaxHeapSizeType = CFDictionaryGetValue(myDictionary, CFSTR("SqueakMaxHeapSize"));
-
- if (SqueakWindowType)
- CFNumberGetValue(SqueakWindowType,kCFNumberLongType,windowType);
- else
- *windowType = kDocumentWindowClass;
-
- gSqueakWindowIsFloating = *windowType == kUtilityWindowClass;
-
- if (SqueakWindowAttributeType && CFDataGetLength(SqueakWindowAttributeType) == 4) {
- const UInt8 *where;
- where = CFDataGetBytePtr(SqueakWindowAttributeType);
- memmove(windowAttributes,where,4);
- } else {
- *windowAttributes = kWindowStandardDocumentAttributes
- +kWindowStandardHandlerAttribute
- +kWindowNoConstrainAttribute
- -kWindowCloseBoxAttribute;
- }
-
- if (SqueakWindowHasTitleType)
- gSqueakWindowHasTitle = CFBooleanGetValue(SqueakWindowHasTitleType);
- else
- gSqueakWindowHasTitle = true;
-
- if (SqueakFloatingWindowGetsFocusType)
- gSqueakFloatingWindowGetsFocus = CFBooleanGetValue(SqueakFloatingWindowGetsFocusType);
- else
- gSqueakFloatingWindowGetsFocus = false;
-
- if (SqueakMaxHeapSizeType)
- CFNumberGetValue(SqueakMaxHeapSizeType,kCFNumberLongType,(long *) &gMaxHeapSize);
-
- }
- #endif
#ifdef JMMFOO2
--- 1149,1152 ----
|