[Vm-dev] [commit][3722] JMM ensure awakeFromNib code works on 64bit
compile.
commits at squeakvm.org
commits at squeakvm.org
Tue May 17 17:14:48 UTC 2016
Revision: 3722
Author: johnmci
Date: 2016-05-17 10:14:46 -0700 (Tue, 17 May 2016)
Log Message:
-----------
JMM ensure awakeFromNib code works on 64bit compile. Also move Null Screen class to common versus os-x tree
Modified Paths:
--------------
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXOpenGLView.m
Added Paths:
-----------
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakNullScreenAndWindow.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakNullScreenAndWindow.m
Removed Paths:
-------------
branches/Cog/platforms/iOS/vm/OSX/sqSqueakNullScreenAndWindow.h
branches/Cog/platforms/iOS/vm/OSX/sqSqueakNullScreenAndWindow.m
Added: branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakNullScreenAndWindow.h
===================================================================
--- branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakNullScreenAndWindow.h (rev 0)
+++ branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakNullScreenAndWindow.h 2016-05-17 17:14:46 UTC (rev 3722)
@@ -0,0 +1,69 @@
+//
+// sqSqueakNullScreenAndWindow.h
+// SqueakPureObjc
+//
+// Created by John M McIntosh on 2016-05-14.
+/*
+ Copyright (c) 2016 Corporate Smalltalk Consulting Ltd. All rights reserved.
+ MIT License
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ 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
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ 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.
+ Alternately, this acknowledgment may appear in the software itself, in the same form and location as other
+ such third-party acknowledgments.
+
+ */
+//
+//
+
+#import <Foundation/Foundation.h>
+#import "sq.h"
+
+ at interface sqSqueakNullScreenAndWindow : NSObject {
+ sqInt windowIndex;
+ BOOL forceUpdateFlush;
+}
+
+- (sqInt) ioScreenSize;
+- (sqInt) ioScreenDepth;
+- (sqInt) ioHasDisplayDepth: (sqInt) depth;
+- (void) ioForceDisplayUpdate;
+- (void) ioSetFullScreen: (sqInt) fullScreen;
+- (int) ioShowDisplayOnWindow: (unsigned char*) dispBitsIndex
+ width: (int) width
+ height: (int) height
+ depth: (int) depth
+ affectedL: (int) affectedL
+ affectedR: (int) affectedR
+ affectedT: (int) affectedT
+ affectedB: (int) affectedB
+ windowIndex: (int) windowIndex;
+- (id) getMainView;
+- (void) ioForceDisplayUpdateFlush: (NSTimer*)theTimer;
+- (id) getMainViewOnWindow;
+- (void) mainViewOnWindow: (id) aView;
+
+ at property (nonatomic,assign) sqInt windowIndex;
+ at property (nonatomic,assign) BOOL forceUpdateFlush;
+ at end
Added: branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakNullScreenAndWindow.m
===================================================================
--- branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakNullScreenAndWindow.m (rev 0)
+++ branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakNullScreenAndWindow.m 2016-05-17 17:14:46 UTC (rev 3722)
@@ -0,0 +1,103 @@
+//
+// sqSqueakNullScreenAndWindow.m
+// SqueakPureObjc
+//
+// Created by John M McIntosh on 2016-05-14.
+/*
+ Copyright (c) 2016 Corporate Smalltalk Consulting Ltd. All rights reserved.
+ MIT License
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ 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
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ 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.
+ Alternately, this acknowledgment may appear in the software itself, in the same form and location as other
+ such third-party acknowledgments.
+
+ */
+
+//
+//
+
+#import "sqSqueakNullScreenAndWindow.h"
+
+ at implementation sqSqueakNullScreenAndWindow
+ at synthesize windowIndex,forceUpdateFlush;
+
+- (instancetype)init {
+ self = [super init];
+ if (self) {
+ }
+ return self;
+}
+
+- (id) getMainViewOnWindow {
+ return NULL;
+}
+
+- (void) mainViewOnWindow: (id) aView {
+}
+
+- (id) getMainView {
+ return NULL;
+}
+
+- (void) ioSetFullScreen: (sqInt) fullScreen {
+}
+
+- (sqInt) ioScreenSize {
+ return (10 << 16) | (10 & 0xFFFF); /* w is high 16 bits; h is low 16 bits */
+}
+
+- (sqInt) ioScreenDepth {
+ return 32;
+}
+
+- (sqInt) ioHasDisplayDepth: (sqInt) depth {
+ if (depth == 2 || depth == 4 || depth == 8 || depth == 16 || depth == 32 ||
+ depth == -2 || depth == -4 || depth == -8 || depth == -16 || depth == -32) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+- (void) ioForceDisplayUpdate {
+}
+
+- (void) ioForceDisplayUpdateFlush: (NSTimer*)theTimer {
+
+}
+
+- (int) ioShowDisplayOnWindow: (unsigned char*) dispBitsIndex
+ width: (int) width
+ height: (int) height
+ depth: (int) depth
+ affectedL: (int) affectedL
+ affectedR: (int) affectedR
+ affectedT: (int) affectedT
+ affectedB: (int) affectedB
+ windowIndex: (int) passedWindowIndex {
+ return 0;
+}
+
+ at end
Deleted: branches/Cog/platforms/iOS/vm/OSX/sqSqueakNullScreenAndWindow.h
===================================================================
--- branches/Cog/platforms/iOS/vm/OSX/sqSqueakNullScreenAndWindow.h 2016-05-17 07:02:33 UTC (rev 3721)
+++ branches/Cog/platforms/iOS/vm/OSX/sqSqueakNullScreenAndWindow.h 2016-05-17 17:14:46 UTC (rev 3722)
@@ -1,69 +0,0 @@
-//
-// sqSqueakNullScreenAndWindow.h
-// SqueakPureObjc
-//
-// Created by John M McIntosh on 2016-05-14.
-/*
- Copyright (c) 2016 Corporate Smalltalk Consulting Ltd. All rights reserved.
- MIT License
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the "Software"), to deal in the Software without
- restriction, including without limitation the rights to use,
- copy, modify, merge, publish, distribute, sublicense, and/or sell
- 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
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- 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.
- Alternately, this acknowledgment may appear in the software itself, in the same form and location as other
- such third-party acknowledgments.
-
- */
-//
-//
-
-#import <Foundation/Foundation.h>
-#import "sq.h"
-
- at interface sqSqueakNullScreenAndWindow : NSObject {
- sqInt windowIndex;
- BOOL forceUpdateFlush;
-}
-
-- (sqInt) ioScreenSize;
-- (sqInt) ioScreenDepth;
-- (sqInt) ioHasDisplayDepth: (sqInt) depth;
-- (void) ioForceDisplayUpdate;
-- (void) ioSetFullScreen: (sqInt) fullScreen;
-- (int) ioShowDisplayOnWindow: (unsigned char*) dispBitsIndex
- width: (int) width
- height: (int) height
- depth: (int) depth
- affectedL: (int) affectedL
- affectedR: (int) affectedR
- affectedT: (int) affectedT
- affectedB: (int) affectedB
- windowIndex: (int) windowIndex;
-- (id) getMainView;
-- (void) ioForceDisplayUpdateFlush: (NSTimer*)theTimer;
-- (id) getMainViewOnWindow;
-- (void) mainViewOnWindow: (id) aView;
-
- at property (nonatomic,assign) sqInt windowIndex;
- at property (nonatomic,assign) BOOL forceUpdateFlush;
- at end
Deleted: branches/Cog/platforms/iOS/vm/OSX/sqSqueakNullScreenAndWindow.m
===================================================================
--- branches/Cog/platforms/iOS/vm/OSX/sqSqueakNullScreenAndWindow.m 2016-05-17 07:02:33 UTC (rev 3721)
+++ branches/Cog/platforms/iOS/vm/OSX/sqSqueakNullScreenAndWindow.m 2016-05-17 17:14:46 UTC (rev 3722)
@@ -1,103 +0,0 @@
-//
-// sqSqueakNullScreenAndWindow.m
-// SqueakPureObjc
-//
-// Created by John M McIntosh on 2016-05-14.
-/*
- Copyright (c) 2016 Corporate Smalltalk Consulting Ltd. All rights reserved.
- MIT License
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the "Software"), to deal in the Software without
- restriction, including without limitation the rights to use,
- copy, modify, merge, publish, distribute, sublicense, and/or sell
- 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
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- 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.
- Alternately, this acknowledgment may appear in the software itself, in the same form and location as other
- such third-party acknowledgments.
-
- */
-
-//
-//
-
-#import "sqSqueakNullScreenAndWindow.h"
-
- at implementation sqSqueakNullScreenAndWindow
- at synthesize windowIndex,forceUpdateFlush;
-
-- (instancetype)init {
- self = [super init];
- if (self) {
- }
- return self;
-}
-
-- (id) getMainViewOnWindow {
- return NULL;
-}
-
-- (void) mainViewOnWindow: (id) aView {
-}
-
-- (id) getMainView {
- return NULL;
-}
-
-- (void) ioSetFullScreen: (sqInt) fullScreen {
-}
-
-- (sqInt) ioScreenSize {
- return (10 << 16) | (10 & 0xFFFF); /* w is high 16 bits; h is low 16 bits */
-}
-
-- (sqInt) ioScreenDepth {
- return 32;
-}
-
-- (sqInt) ioHasDisplayDepth: (sqInt) depth {
- if (depth == 2 || depth == 4 || depth == 8 || depth == 16 || depth == 32 ||
- depth == -2 || depth == -4 || depth == -8 || depth == -16 || depth == -32) {
- return true;
- } else {
- return false;
- }
-}
-
-- (void) ioForceDisplayUpdate {
-}
-
-- (void) ioForceDisplayUpdateFlush: (NSTimer*)theTimer {
-
-}
-
-- (int) ioShowDisplayOnWindow: (unsigned char*) dispBitsIndex
- width: (int) width
- height: (int) height
- depth: (int) depth
- affectedL: (int) affectedL
- affectedR: (int) affectedR
- affectedT: (int) affectedT
- affectedB: (int) affectedB
- windowIndex: (int) passedWindowIndex {
- return 0;
-}
-
- at end
Modified: branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXOpenGLView.m
===================================================================
--- branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXOpenGLView.m 2016-05-17 07:02:33 UTC (rev 3721)
+++ branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXOpenGLView.m 2016-05-17 17:14:46 UTC (rev 3722)
@@ -85,19 +85,18 @@
- (id)initWithFrame:(NSRect)frameRect {
self = [self initWithFrame:frameRect pixelFormat:[[self class] defaultPixelFormat]];
- [self setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
- [self setAutoresizesSubviews:YES];
-
[self initialize];
return self;
}
- (void)awakeFromNib {
- self = [self initWithFrame: self.frame pixelFormat: [[self class] defaultPixelFormat] ];
[self initialize];
}
- (void)initialize {
+ [self setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
+ [self setAutoresizesSubviews:YES];
+
inputMark = NSMakeRange(NSNotFound, 0);
inputSelection = NSMakeRange(0, 0);
[self registerForDraggedTypes: [NSArray arrayWithObjects: NSFilenamesPboardType, nil]];
More information about the Vm-dev
mailing list