Revision: 3614 Author: eliot Date: 2016-02-19 14:23:01 -0800 (Fri, 19 Feb 2016) Log Message: ----------- Have the Mac OS X build install Localizable.strings. Add versions for Newspeak, Pharo and Squeak. Rename the key to SelectImagePanePrompt. Temporarily disable the Serial plugin in the Pharo Mac VM until we can track down the relevant platforms/iOS support for the Pharo extensions. Modify sqSCCSVersion.h's version program to answer all keys when given TAGS as an arg to allow the edits in the Mac makefiles to be done via a loop over the keys.
Modified Paths: -------------- branches/Cog/build.macos32x86/common/Makefile.app branches/Cog/build.macos32x86/pharo.cog.spur/Makefile branches/Cog/build.macos32x86/pharo.cog.spur/plugins.int branches/Cog/build.macos64x64/common/Makefile.app branches/Cog/build.macos64x64/pharo.cog.spur/Makefile branches/Cog/platforms/Cross/vm/sq.h branches/Cog/platforms/Cross/vm/sqSCCSVersion.h branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+imageReadWrite.m
Added Paths: ----------- branches/Cog/platforms/iOS/vm/Common/English.lproj/Squeak-Localizable.strings
Removed Paths: ------------- branches/Cog/platforms/iOS/vm/Common/English.lproj/Localizable.strings
Property Changed: ---------------- branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
Modified: branches/Cog/build.macos32x86/common/Makefile.app =================================================================== --- branches/Cog/build.macos32x86/common/Makefile.app 2016-02-18 19:54:22 UTC (rev 3613) +++ branches/Cog/build.macos32x86/common/Makefile.app 2016-02-19 22:23:01 UTC (rev 3614) @@ -53,6 +53,7 @@ OSXICONS:=$(OSXDIR)/$(VM).icns $(wildcard $(OSXDIR)/$(SYSTEM)*.icns) VMICONS:=$(addprefix $(APP)/Contents/Resources/,$(notdir $(OSXICONS))) VMMENUNIB:=$(APP)/Contents/Resources/English.lproj/MainMenu.nib +VMLOCALIZATION:=$(APP)/Contents/Resources/English.lproj/Localizable.strings SOURCES:= ifneq ($(SOURCEFILE),) SOURCES:=./$(SOURCEFILE) @@ -62,7 +63,8 @@ endif
-$(APP): cleanbundles $(VMEXE) $(VMBUNDLES) $(VMPLIST) $(VMMENUNIB) $(VMICONS) \ +$(APP): cleanbundles $(VMEXE) $(VMBUNDLES) \ + $(VMPLIST) $(VMLOCALIZATION) $(VMMENUNIB) $(VMICONS) \ $(SOURCES) $(APPPOST) signapp touchapp
# Bundles with missing prerequisites won't be built. But we need to force the @@ -74,7 +76,7 @@ -touch $(OBJDIR)/*.ignore
$(VMEXE): $(OBJDIR)/$(VM) - mkdir -p $(APP)/Contents/MacOS + @mkdir -p $(APP)/Contents/MacOS cp -p $(OBJDIR)/$(VM) $(APP)/Contents/MacOS
$(APP)/Contents/Resources/%.bundle: $(BLDDIR)/vm/%.bundle @@ -88,15 +90,19 @@ fi
$(VMPLIST): $(OSXDIR)/$(SYSTEM)-Info.plist getversion - mkdir -p $(APP)/Contents + @mkdir -p $(APP)/Contents sed "s/$$(VERSION)/`getversion VERSION_TAG`/" $< | \ sed "s/$$(VERSION_NUMBER)/`getversion VERSION_NUMBER`/" | \ sed "s/$$(VERSION_TAG)/`getversion VERSION_TAG`/" | \ sed "s/$$(VIRTUAL_MACHINE_NICKNAME)/`getversion VIRTUAL_MACHINE_NICKNAME`/" | \ sed "s/$$(VM_NICKNAME)/`getversion VM_NICKNAME`/" > $@
+$(VMLOCALIZATION): $(OSXCOMMONDIR)/English.lproj/$(SYSTEM)-Localizable.strings + @mkdir -p $(dir $@) + cp -p $< $@ + $(VMMENUNIB): $(PLATDIR)/iOS/vm/English.lproj/MainMenu.xib - mkdir -p $(dir $@) + @mkdir -p $(dir $@) $(XCUB)/ibtool --errors --warnings --notices --module $(VM) \ --minimum-deployment-target $(TARGET_VERSION_MIN) \ --auto-activate-custom-fonts --output-format human-readable-text \ @@ -104,7 +110,7 @@ $(PLATDIR)/iOS/vm/English.lproj/MainMenu.xib
$(APP)/Contents/Resources/%.icns: $(OSXDIR)/%.icns - mkdir -p $(APP)/Contents/Resources + @mkdir -p $(APP)/Contents/Resources cp -p $< $(APP)/Contents/Resources
# To sign the app, set SIGNING_IDENTITY in the environment, e.g.
Modified: branches/Cog/build.macos32x86/pharo.cog.spur/Makefile =================================================================== --- branches/Cog/build.macos32x86/pharo.cog.spur/Makefile 2016-02-18 19:54:22 UTC (rev 3613) +++ branches/Cog/build.macos32x86/pharo.cog.spur/Makefile 2016-02-19 22:23:01 UTC (rev 3614) @@ -5,7 +5,7 @@
VMSRCDIR:= ../../spursrc/vm VM:=Pharo -CFLAGS:=-DPharoVM=1 +COGDEFS:=-DPharoVM=1
# Now include the Makefile proper, which is common to all Mac OS builds. #
Modified: branches/Cog/build.macos32x86/pharo.cog.spur/plugins.int =================================================================== --- branches/Cog/build.macos32x86/pharo.cog.spur/plugins.int 2016-02-18 19:54:22 UTC (rev 3613) +++ branches/Cog/build.macos32x86/pharo.cog.spur/plugins.int 2016-02-19 22:23:01 UTC (rev 3614) @@ -22,7 +22,6 @@ MiscPrimitivePlugin \ RePlugin \ SecurityPlugin \ -SerialPlugin \ SocketPlugin \ SoundCodecPrims \ SoundGenerationPlugin \ @@ -31,4 +30,5 @@ SurfacePlugin \ UUIDPlugin \ VMProfileMacSupportPlugin \ +# SerialPlugin \ # JoystickTabletPlugin
Modified: branches/Cog/build.macos64x64/common/Makefile.app =================================================================== --- branches/Cog/build.macos64x64/common/Makefile.app 2016-02-18 19:54:22 UTC (rev 3613) +++ branches/Cog/build.macos64x64/common/Makefile.app 2016-02-19 22:23:01 UTC (rev 3614) @@ -53,6 +53,7 @@ OSXICONS:=$(OSXDIR)/$(VM).icns $(wildcard $(OSXDIR)/$(SYSTEM)*.icns) VMICONS:=$(addprefix $(APP)/Contents/Resources/,$(notdir $(OSXICONS))) VMMENUNIB:=$(APP)/Contents/Resources/English.lproj/MainMenu.nib +VMLOCALIZATION:=$(APP)/Contents/Resources/English.lproj/Localizable.strings SOURCES:= ifneq ($(SOURCEFILE),) SOURCES:=./$(SOURCEFILE) @@ -62,7 +63,8 @@ endif
-$(APP): cleanbundles $(VMEXE) $(VMBUNDLES) $(VMPLIST) $(VMMENUNIB) $(VMICONS) \ +$(APP): cleanbundles $(VMEXE) $(VMBUNDLES) \ + $(VMPLIST) $(VMLOCALIZATION) $(VMMENUNIB) $(VMICONS) \ $(SOURCES) $(APPPOST) signapp touchapp
# Bundles with missing prerequisites won't be built. But we need to force the @@ -74,7 +76,7 @@ -touch $(OBJDIR)/*.ignore
$(VMEXE): $(OBJDIR)/$(VM) - mkdir -p $(APP)/Contents/MacOS + @mkdir -p $(APP)/Contents/MacOS cp -p $(OBJDIR)/$(VM) $(APP)/Contents/MacOS
$(APP)/Contents/Resources/%.bundle: $(BLDDIR)/vm/%.bundle @@ -88,15 +90,19 @@ fi
$(VMPLIST): $(OSXDIR)/$(SYSTEM)-Info.plist getversion - mkdir -p $(APP)/Contents + @mkdir -p $(APP)/Contents sed "s/$$(VERSION)/`getversion VERSION_TAG`/" $< | \ sed "s/$$(VERSION_NUMBER)/`getversion VERSION_NUMBER`/" | \ sed "s/$$(VERSION_TAG)/`getversion VERSION_TAG`/" | \ sed "s/$$(VIRTUAL_MACHINE_NICKNAME)/`getversion VIRTUAL_MACHINE_NICKNAME`/" | \ sed "s/$$(VM_NICKNAME)/`getversion VM_NICKNAME`/" > $@
+$(VMLOCALIZATION): $(OSXCOMMONDIR)/English.lproj/$(SYSTEM)-Localizable.strings + @mkdir -p $(dir $@) + cp -p $< $@ + $(VMMENUNIB): $(PLATDIR)/iOS/vm/English.lproj/MainMenu.xib - mkdir -p $(dir $@) + @mkdir -p $(dir $@) $(XCUB)/ibtool --errors --warnings --notices --module $(VM) \ --minimum-deployment-target $(TARGET_VERSION_MIN) \ --auto-activate-custom-fonts --output-format human-readable-text \ @@ -104,7 +110,7 @@ $(PLATDIR)/iOS/vm/English.lproj/MainMenu.xib
$(APP)/Contents/Resources/%.icns: $(OSXDIR)/%.icns - mkdir -p $(APP)/Contents/Resources + @mkdir -p $(APP)/Contents/Resources cp -p $< $(APP)/Contents/Resources
# To sign the app, set SIGNING_IDENTITY in the environment, e.g.
Modified: branches/Cog/build.macos64x64/pharo.cog.spur/Makefile =================================================================== --- branches/Cog/build.macos64x64/pharo.cog.spur/Makefile 2016-02-18 19:54:22 UTC (rev 3613) +++ branches/Cog/build.macos64x64/pharo.cog.spur/Makefile 2016-02-19 22:23:01 UTC (rev 3614) @@ -5,7 +5,7 @@
VMSRCDIR:= ../../spur64src/vm VM:=Pharo -CFLAGS:=-DPharoVM=1 +COGDEFS:=-DPharoVM=1
# Now include the Makefile proper, which is common to all Mac OS builds. #
Modified: branches/Cog/platforms/Cross/vm/sq.h =================================================================== --- branches/Cog/platforms/Cross/vm/sq.h 2016-02-18 19:54:22 UTC (rev 3613) +++ branches/Cog/platforms/Cross/vm/sq.h 2016-02-19 22:23:01 UTC (rev 3614) @@ -28,6 +28,10 @@ # define IMAGE_DIALECT_NAME "Newspeak" # define DEFAULT_IMAGE_NAME "newspeak.image" # define IMAGE_ENV_NAME "NEWSPEAK_IMAGE" +# elif PharoVM +# define IMAGE_DIALECT_NAME "Pharo" +# define DEFAULT_IMAGE_NAME "Pharo.image" +# define IMAGE_ENV_NAME "PHARO_IMAGE" # else # define IMAGE_DIALECT_NAME "Squeak" # define DEFAULT_IMAGE_NAME "squeak.image"
Modified: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h =================================================================== --- branches/Cog/platforms/Cross/vm/sqSCCSVersion.h 2016-02-18 19:54:22 UTC (rev 3613) +++ branches/Cog/platforms/Cross/vm/sqSCCSVersion.h 2016-02-19 22:23:01 UTC (rev 3614) @@ -120,13 +120,19 @@
int argc = 0; char **argv = 0; +int justPrintTags = 0;
/* printit allows that with no arguments print all key/value pairs - * and with one argument print the value of a particular key. + * and with one argument print the value of a particular key, or with + * the one argument TAGS to print all keys. */ int printit(const char *what) { + if (justPrintTags) { + printf("%s ", what); + return 0; + } if (argc == 1) { printf("%s: ", what); return 1; @@ -142,6 +148,8 @@ argc = _argc; argv = _argv;
+ justPrintTags = argc == 2 && !strcmp(argv[1], "TAGS"); + if (printit("VM_NICKNAME")) printf("%s\n", NICKNAME " " OBJMEM " VM"); if (printit("VIRTUAL_MACHINE_NICKNAME")) @@ -160,7 +168,16 @@ printf("%s-%s\n", vm_version, revisionAsString()); if (printit("VERSION_NUMBER")) printf("%s.%s\n", vm_version, revisionAsString()); + if (printit("NICKNAME")) + printf("%s\n", NICKNAME); + if (printit("OBJMEM")) + printf("%s\n", OBJMEM); + if (printit("DEFAULT_IMAGE_NAME")) + printf("%s\n", DEFAULT_IMAGE_NAME);
+ if (justPrintTags) + printf("\n"); + return 0; } #endif /* VERSION_PROGRAM */
Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h ___________________________________________________________________ Modified: checkindate - Mon Feb 15 21:33:16 PST 2016 + Fri Feb 19 14:19:29 PST 2016
Deleted: branches/Cog/platforms/iOS/vm/Common/English.lproj/Localizable.strings =================================================================== --- branches/Cog/platforms/iOS/vm/Common/English.lproj/Localizable.strings 2016-02-18 19:54:22 UTC (rev 3613) +++ branches/Cog/platforms/iOS/vm/Common/English.lproj/Localizable.strings 2016-02-19 22:23:01 UTC (rev 3614) @@ -1,9 +0,0 @@ -/* - Localizable.strings - SqueakPureObjc - - Created by John M McIntosh on 09-11-24. - Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved. - */ - -"SqueakSelectImagePanePrompt" = "Select a Squeak image file to open"; \ No newline at end of file
Copied: branches/Cog/platforms/iOS/vm/Common/English.lproj/Squeak-Localizable.strings (from rev 3604, branches/Cog/platforms/iOS/vm/Common/English.lproj/Localizable.strings) =================================================================== --- branches/Cog/platforms/iOS/vm/Common/English.lproj/Squeak-Localizable.strings (rev 0) +++ branches/Cog/platforms/iOS/vm/Common/English.lproj/Squeak-Localizable.strings 2016-02-19 22:23:01 UTC (rev 3614) @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +"SelectImagePanePrompt" = "Select a Newspeak image file to open";
Modified: branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m =================================================================== --- branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m 2016-02-18 19:54:22 UTC (rev 3613) +++ branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m 2016-02-19 22:23:01 UTC (rev 3614) @@ -15,10 +15,10 @@ copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -27,7 +27,7 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - + The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) and its contributors", in the same place and form as other third-party acknowledgments. @@ -51,7 +51,7 @@ bits. (The Mac shift and caps lock keys are both mapped to the single Squeak shift bit). This was true for squeak upto 3.0.7. Then in 3.0.8 we decided to not map the cap lock key to shift - + Mac bits: <control><option><caps lock><shift><command> ST bits: <command><option><control><shift> */ @@ -108,7 +108,7 @@
- (void) pumpRunLoopEventSendAndSignal:(BOOL)signal { NSEvent *event; - + while ((event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:nil @@ -133,16 +133,16 @@ using the runloop, but if you just run the runloop on the main thread, events won't get processed. You have to explicitly run this in order to get them to be processed. - + Note that using the default runloop mode with this is generally a bad idea. By running in the default mode you allow *everything* else to run, which means that some other code might decide that *it* wants an inner event loop as well. If you then want to quit before that other code has finished, tough cookies. Much better to control things more tightly by using a different runloop mode. - + */ - + }
- (void ) processAsOldEventOrComplexEvent: (id) event placeIn: (sqInputEvent *) evt { @@ -166,17 +166,17 @@ NSInteger i; NSRange picker; NSUInteger totaLength; - + evt.type = EventTypeKeyboard; - evt.timeStamp = (int) ioMSecs(); + evt.timeStamp = ioMSecs(); picker.location = 0; picker.length = 1; totaLength = [unicodeString length]; for (i=0;i < totaLength;i++) { - - + + unicode = [unicodeString characterAtIndex: i]; - + if (mainView.lastSeenKeyBoardStrokeDetails) { evt.modifiers = [self translateCocoaModifiersToSqueakModifiers: mainView.lastSeenKeyBoardStrokeDetails.modifierFlags]; evt.charCode = mainView.lastSeenKeyBoardStrokeDetails.keyCode; @@ -184,32 +184,32 @@ evt.modifiers = 0; evt.charCode = 0; } - + if ((evt.modifiers & CommandKeyBit) && (evt.modifiers & ShiftKeyBit)) { /* command and shift */ if ((unicode >= 97) && (unicode <= 122)) { /* convert ascii code of command-shift-letter to upper case */ unicode = unicode - 32; } } - + NSString *lookupString = AUTORELEASEOBJ([[NSString alloc] initWithCharacters: &unicode length: 1]); [lookupString getBytes: &macRomanCharacter maxLength: 1 usedLength: NULL encoding: NSMacOSRomanStringEncoding options: 0 range: picker remainingRange: NULL]; - + evt.pressCode = EventKeyDown; unsigned short keyCodeRemembered = evt.charCode; evt.utf32Code = 0; evt.reserved1 = 0; - evt.windowIndex = (int) mainView.windowLogic.windowIndex; + evt.windowIndex = mainView.windowLogic.windowIndex; [self pushEventToQueue: (sqInputEvent *)&evt]; - + evt.charCode = macRomanCharacter; evt.pressCode = EventKeyChar; evt.modifiers = evt.modifiers; evt.utf32Code = unicode; - + [self pushEventToQueue: (sqInputEvent *) &evt]; - + if (i > 1 || !mainView.lastSeenKeyBoardStrokeDetails) { evt.pressCode = EventKeyUp; evt.charCode = keyCodeRemembered; @@ -217,22 +217,22 @@ [self pushEventToQueue: (sqInputEvent *) &evt]; } } - + interpreterProxy->signalSemaphoreWithIndex(gDelegateApp.squeakApplication.inputSemaphoreIndex);
}
- (void) recordKeyDownEvent:(NSEvent *)theEvent fromView: (sqSqueakOSXOpenGLView *) aView { sqKeyboardEvent evt; - + evt.type = EventTypeKeyboard; - evt.timeStamp = (int) ioMSecs(); + evt.timeStamp = ioMSecs(); evt.charCode = [theEvent keyCode]; evt.pressCode = EventKeyDown; evt.modifiers = [self translateCocoaModifiersToSqueakModifiers: [theEvent modifierFlags]]; evt.utf32Code = 0; evt.reserved1 = 0; - evt.windowIndex = (int)[[aView windowLogic] windowIndex]; + evt.windowIndex = [[aView windowLogic] windowIndex]; [self pushEventToQueue: (sqInputEvent *) &evt];
interpreterProxy->signalSemaphoreWithIndex(gDelegateApp.squeakApplication.inputSemaphoreIndex); @@ -240,15 +240,15 @@
- (void) recordKeyUpEvent:(NSEvent *)theEvent fromView: (sqSqueakOSXOpenGLView *) aView { sqKeyboardEvent evt; - + evt.type = EventTypeKeyboard; - evt.timeStamp = (int) ioMSecs(); + evt.timeStamp = ioMSecs(); evt.charCode = [theEvent keyCode]; evt.pressCode = EventKeyUp; evt.modifiers = [self translateCocoaModifiersToSqueakModifiers: [theEvent modifierFlags]]; evt.utf32Code = 0; evt.reserved1 = 0; - evt.windowIndex = (int) aView.windowLogic.windowIndex; + evt.windowIndex = aView.windowLogic.windowIndex; [self pushEventToQueue: (sqInputEvent *) &evt];
interpreterProxy->signalSemaphoreWithIndex(gDelegateApp.squeakApplication.inputSemaphoreIndex); @@ -256,15 +256,15 @@
- (void) recordMouseEvent:(NSEvent *)theEvent fromView: (sqSqueakOSXOpenGLView *) aView{ sqMouseEvent evt; - + evt.type = EventTypeMouse; - evt.timeStamp = (int) ioMSecs(); - + evt.timeStamp = ioMSecs(); + NSPoint local_point = [aView convertPoint: [theEvent locationInWindow] fromView:nil]; - - evt.x = (int) lrintf(local_point.x); - evt.y = (int) lrintf(local_point.y); - + + evt.x = (sqInt) lrintf(local_point.x); + evt.y = (sqInt) lrintf(local_point.y); + int buttonAndModifiers = [self mapMouseAndModifierStateToSqueakBits: theEvent]; evt.buttons = buttonAndModifiers & 0x07; evt.modifiers = buttonAndModifiers >> 3; @@ -273,32 +273,32 @@ #else evt.reserved1 = 0; #endif - evt.windowIndex = (int) aView.windowLogic.windowIndex; - + evt.windowIndex = aView.windowLogic.windowIndex; + [self pushEventToQueue:(sqInputEvent *) &evt]; //NSLog(@"mouse hit x %i y %i buttons %i mods %i",evt.x,evt.y,evt.buttons,evt.modifiers); interpreterProxy->signalSemaphoreWithIndex(gDelegateApp.squeakApplication.inputSemaphoreIndex); } - + - (void) recordWheelEvent:(NSEvent *) theEvent fromView: (sqSqueakOSXOpenGLView *) aView{ - + [self recordMouseEvent: theEvent fromView: aView]; CGFloat x = [theEvent deltaX]; CGFloat y = [theEvent deltaY];
if (x != 0.0f) { - [self fakeMouseWheelKeyboardEventsKeyCode: (x < 0 ? 124 : 123) ascii: (x < 0 ? 29 : 28) windowIndex: (int) aView.windowLogic.windowIndex]; + [self fakeMouseWheelKeyboardEventsKeyCode: (x < 0 ? 124 : 123) ascii: (x < 0 ? 29 : 28) windowIndex: aView.windowLogic.windowIndex]; } if (y != 0.0f) { - [self fakeMouseWheelKeyboardEventsKeyCode: (y < 0 ? 125 : 126) ascii: (y < 0 ? 31 : 30) windowIndex: (int) aView.windowLogic.windowIndex]; + [self fakeMouseWheelKeyboardEventsKeyCode: (y < 0 ? 125 : 126) ascii: (y < 0 ? 31 : 30) windowIndex: aView.windowLogic.windowIndex]; } } - -- (void) fakeMouseWheelKeyboardEventsKeyCode: (int) keyCode ascii: (int) ascii windowIndex: (int) windowIndex { + +- (void) fakeMouseWheelKeyboardEventsKeyCode: (int) keyCode ascii: (int) ascii windowIndex: (sqInt) windowIndex { sqKeyboardEvent evt;
evt.type = EventTypeKeyboard; - evt.timeStamp = (int) ioMSecs(); + evt.timeStamp = ioMSecs(); evt.pressCode = EventKeyDown; evt.charCode = keyCode; evt.utf32Code = 0; @@ -311,12 +311,12 @@ evt.charCode = ascii; evt.utf32Code = ascii; [self pushEventToQueue:(sqInputEvent *) &evt]; - + evt.pressCode = EventKeyUp; evt.charCode = keyCode; evt.utf32Code = 0; [self pushEventToQueue:(sqInputEvent *) &evt]; - + }
- (int) translateCocoaModifiersToSqueakModifiers: (NSUInteger) modifiers { @@ -337,23 +337,23 @@ if (modifiers & NSCommandKeyMask) keyBoardModifiers |= cmdKey; return keyBoardModifiers; - + } - + - (int) mapMouseAndModifierStateToSqueakBits: (NSEvent *) event { /* On a two- or three-button mouse, the left button is normally considered primary and the right button secondary, but left-handed users can reverse these settings as a matter of preference. The middle button on a three-button mouse is always the tertiary button. ' - + But mapping assumes 1,2,3 red, yellow, blue */ - + NSInteger stButtons,modifier,mappedButton; NSInteger mouseButton=0; - + static NSInteger buttonStateBits[4] = {0,0,0,0}; - + stButtons = buttonState; NSUInteger keyBoardCarbonModifiers = [self translateCocoaModifiersToCarbonModifiers: [event modifierFlags]]; NSInteger whatHappened = [event type]; @@ -366,9 +366,9 @@ mouseButton = 2; if (!mouseButton) mouseButton = [event buttonNumber] + 1; //buttonNumber seems to count from 0. - + if (mouseButton > 0 && mouseButton < 4) { - + modifier = 0; if (keyBoardCarbonModifiers & cmdKey ) modifier = 1; @@ -376,7 +376,7 @@ modifier = 2; if (keyBoardCarbonModifiers & controlKey) modifier = 3; - + if (browserActiveAndDrawingContextOkAndNOTInFullScreenMode()) mappedButton = [(sqSqueakOSXInfoPlistInterface *) self.infoPlistInterfaceLogic getSqueakBrowserMouseMappingsAt: modifier by: mouseButton]; else @@ -390,7 +390,7 @@ stButtons |= mappedButton == 3 ? (buttonStateBits[mappedButton] ? BlueButtonBit : 0) : 0; } } - + // button state: low three bits are mouse buttons; next 8 bits are modifier bits buttonState = (int) (modifierMap[((keyBoardCarbonModifiers & 0xFFFF) >> 8)] << 3) | (int) (stButtons & 0x7); return buttonState; @@ -398,27 +398,27 @@
- (void) recordDragEvent:(int)dragType numberOfFiles:(int)numFiles where:(NSPoint)point windowIndex:(sqInt)windowIndex view:(NSView *)aView{ sqDragDropFilesEvent evt; - + NSPoint local_point = [aView convertPoint:point fromView:nil]; - + evt.type= EventTypeDragDropFiles; - evt.timeStamp= (int) ioMSecs(); + evt.timeStamp= ioMSecs(); evt.dragType= dragType; - evt.x = (int) lrintf(local_point.x); - evt.y = (int) lrintf(local_point.y); + evt.x = (sqInt) lrintf(local_point.x); + evt.y = (sqInt) lrintf(local_point.y); evt.modifiers= (buttonState >> 3); evt.numFiles= numFiles; - evt.windowIndex = (int) windowIndex; + evt.windowIndex = windowIndex; [self pushEventToQueue: (sqInputEvent *) &evt]; - + interpreterProxy->signalSemaphoreWithIndex(gDelegateApp.squeakApplication.inputSemaphoreIndex); }
- (void) recordWindowEvent: (int) windowType window: (NSWIndow *) window { sqWindowEvent evt; - + evt.type= EventTypeWindow; - evt.timeStamp= (int) ioMSecs(); + evt.timeStamp= ioMSecs(); evt.action= windowType; evt.value1 = 0; evt.value2 = 0; @@ -426,7 +426,7 @@ evt.value4 = 0; evt.windowIndex = windowIndexFromHandle((wHandleType)window); [self pushEventToQueue: (sqInputEvent *) &evt]; - + interpreterProxy->signalSemaphoreWithIndex(gDelegateApp.squeakApplication.inputSemaphoreIndex); }
Modified: branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+imageReadWrite.m =================================================================== --- branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+imageReadWrite.m 2016-02-18 19:54:22 UTC (rev 3613) +++ branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+imageReadWrite.m 2016-02-19 22:23:01 UTC (rev 3614) @@ -46,7 +46,7 @@ @implementation sqSqueakOSXApplication (imageReadWrite) - (void) attempToOpenImageFromOpenPanel { NSOpenPanel *panel= [NSOpenPanel openPanel]; - [panel setTitle: NSLocalizedString(@"SqueakSelectImagePanePrompt",nil)]; + [panel setTitle: NSLocalizedString(@"SelectImagePanePrompt",nil)]; [panel setFloatingPanel: YES]; [panel setOneShot: YES]; [panel setReleasedWhenClosed: YES];
vm-dev@lists.squeakfoundation.org