Skip to content

Commit

Permalink
Merge 75b9999 into ef56e6a
Browse files Browse the repository at this point in the history
  • Loading branch information
demarey committed Sep 25, 2020
2 parents ef56e6a + 75b9999 commit db1bd1c
Show file tree
Hide file tree
Showing 18 changed files with 6,362 additions and 11 deletions.
4 changes: 2 additions & 2 deletions build.macos32x86/common/Makefile.app
Expand Up @@ -155,13 +155,13 @@ $(VMLOCALIZATION): $(OSXCOMMONDIR)/English.lproj/$(SYSTEM)-Localizable.strings
@mkdir -p $(dir $@)
cp -p $< $@

$(VMMENUNIB): $(PLATDIR)/iOS/vm/English.lproj/MainMenu.xib
$(VMMENUNIB): $(PLATDIR)/iOS/vm/English.lproj/$(SYSTEM)-MainMenu.xib
@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 \
--compile $(VMMENUNIB) \
$(PLATDIR)/iOS/vm/English.lproj/MainMenu.xib
$(PLATDIR)/iOS/vm/English.lproj/$(SYSTEM)-MainMenu.xib

$(APP)/Contents/Resources/%.icns: $(OSXDIR)/%.icns
@mkdir -p $(APP)/Contents/Resources
Expand Down
2 changes: 1 addition & 1 deletion build.macos32x86/pharo.cog.spur.lowcode/Makefile
Expand Up @@ -11,7 +11,7 @@ APPNAMEDEF:=$(APPNAME)
APPIDENTIFIER:=org.pharo.$(APPNAME)
USEPLUGINASDYLIB:=TRUE
THIRDPARTYLIBS:=pkgconfig freetype2 openssl libssh2 libgit2 libsdl2 pixman libpng cairo

#CFLAGS=$(CFLAGS) -DNSZombieEnabled=YES

# Now include the Makefile proper, which is common to all Mac OS builds.
Expand Down
2 changes: 1 addition & 1 deletion build.macos32x86/pharo.cog.spur.minheadless/Makefile
Expand Up @@ -11,7 +11,7 @@ APPNAMEDEF:=$(APPNAME)
APPIDENTIFIER:=org.pharo.$(APPNAME)
USEPLUGINASDYLIB:=TRUE
THIRDPARTYLIBS:=pkgconfig freetype2 openssl libssh2 libgit2 libsdl2 pixman libpng cairo
EXTRAVMLIBS=libsdl2
EXTRAVMLIBS=libsdl2

# Now include the Makefile proper, which is common to all Mac OS builds.
#
Expand Down
2 changes: 1 addition & 1 deletion build.macos32x86/pharo.cog.v3/Makefile
Expand Up @@ -10,7 +10,7 @@ APPNAME:=Pharo
APPNAMEDEF:=$(APPNAME)
APPIDENTIFIER:=org.pharo.$(APPNAME)
USEPLUGINASDYLIB:=TRUE
THIRDPARTYLIBS:=pkgconfig freetype2 openssl libssh2 libgit2 libsdl2 pixman libpng cairo
THIRDPARTYLIBS:=pkgconfig freetype2 openssl libssh2 libgit2 libsdl2 pixman libpng cairo

#CFLAGS=$(CFLAGS) -DNSZombieEnabled=YES

Expand Down
4 changes: 2 additions & 2 deletions build.macos64x64/common/Makefile.app
Expand Up @@ -155,13 +155,13 @@ $(VMLOCALIZATION): $(OSXCOMMONDIR)/English.lproj/$(SYSTEM)-Localizable.strings
@mkdir -p $(dir $@)
cp -p $< $@

$(VMMENUNIB): $(PLATDIR)/iOS/vm/English.lproj/MainMenu.xib
$(VMMENUNIB): $(PLATDIR)/iOS/vm/English.lproj/$(SYSTEM)-MainMenu.xib
@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 \
--compile $(VMMENUNIB) \
$(PLATDIR)/iOS/vm/English.lproj/MainMenu.xib
$(PLATDIR)/iOS/vm/English.lproj/$(SYSTEM)-MainMenu.xib

$(APP)/Contents/Resources/%.icns: $(OSXDIR)/%.icns
@mkdir -p $(APP)/Contents/Resources
Expand Down
File renamed without changes.
1,261 changes: 1,261 additions & 0 deletions platforms/iOS/vm/English.lproj/Pharo-MainMenu-opengl.xib

Large diffs are not rendered by default.

1,261 changes: 1,261 additions & 0 deletions platforms/iOS/vm/English.lproj/Pharo-MainMenu.xib

Large diffs are not rendered by default.

1,261 changes: 1,261 additions & 0 deletions platforms/iOS/vm/English.lproj/Squeak-MainMenu-cg.xib

Large diffs are not rendered by default.

1,261 changes: 1,261 additions & 0 deletions platforms/iOS/vm/English.lproj/Squeak-MainMenu-opengl.xib

Large diffs are not rendered by default.

1,261 changes: 1,261 additions & 0 deletions platforms/iOS/vm/English.lproj/Squeak-MainMenu.xib

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions platforms/iOS/vm/OSX/Pharo-Info.plist
Expand Up @@ -534,5 +534,7 @@
<false/>
<key>SqueakUIFadeForFullScreenInSeconds</key>
<real>0.5</real>
<key>PharoHelpURL</key>
<string>https://www.pharo.org/documentation</string>
</dict>
</plist>
30 changes: 28 additions & 2 deletions platforms/iOS/vm/OSX/SqueakOSXApplication.m
Expand Up @@ -38,8 +38,12 @@ Some of this code was funded via a grant from the European Smalltalk User Group

#import "SqueakOSXApplication.h"
#import "sqSqueakOSXScreenAndWindow.h"
#import "SqueakOSXAppDelegate.h"
#import "sqSqueakOSXApplication.h"

@implementation SqueakOSXApplication
@implementation SqueakOSXApplication

extern SqueakOSXAppDelegate *gDelegateApp;

-(void)sendEvent:(NSEvent*)anEvent
{
Expand All @@ -49,5 +53,27 @@ -(void)sendEvent:(NSEvent*)anEvent
} else {
[super sendEvent:anEvent];
}
}
}
#ifdef PharoVM
- (void)showHelp:(id)sender;
{
NSBundle *mainBundle = [NSBundle mainBundle];
NSDictionary *infoDictionary = [mainBundle infoDictionary];

id urlString = infoDictionary[@"PharoHelpURL"];

if(urlString == Nil){
urlString = @"https://www.pharo.org";
}

NSURL *url = [NSURL URLWithString: urlString];
[[NSWorkspace sharedWorkspace] openURL: url];
}
#endif

- (void)orderFrontStandardAboutPanel:(id)sender;
{
[super orderFrontStandardAboutPanel: sender];
[gDelegateApp.squeakApplication setAboutWindow: [self keyWindow]];
}
@end
16 changes: 15 additions & 1 deletion platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m
Expand Up @@ -67,6 +67,20 @@ - (sqButton) resolveModifier:(sqModifier)modifier forMouseButton:(sqButton)mouse

@implementation sqSqueakOSXApplication (events)

// This method filters the event that should not be processed by the Squeak Application.
// This events are related to windows that are launched from a third party library (as SDL)
// Check pumpRunLoopEventSendAndSignal:(BOOL)signal for more details.

// The events processed by the VM are the ones in the main window or in the about window.
- (BOOL) shouldFilterEvent: (NSEvent*)event {

sqSqueakOSXApplication * sqApplication = (sqSqueakOSXApplication*)gDelegateApp.squeakApplication;

return event.window
&& event.window != gDelegateApp.window
&& event.window != [sqApplication aboutWindow];
}

- (void) pumpRunLoopEventSendAndSignal:(BOOL)signal {

#ifdef PharoVM
Expand All @@ -84,7 +98,7 @@ - (void) pumpRunLoopEventSendAndSignal:(BOOL)signal {
dequeue:YES])) {
// If the event is not a system event or an event of *this* window, queue the event
// Otherwise treat the event normally and send it to the app
if (event.window && event.window != gDelegateApp.window){
if ([self shouldFilterEvent: event]){
[alienEventQueue addObject: event];
}else{
[NSApp sendEvent: event];
Expand Down
5 changes: 4 additions & 1 deletion platforms/iOS/vm/OSX/sqSqueakOSXApplication.h
Expand Up @@ -41,9 +41,12 @@
#import "sqSqueakMainApplication.h"

@interface sqSqueakOSXApplication : sqSqueakMainApplication {
NSCursor *squeakCursor;
NSWindow __weak *aboutWindow;
NSCursor *squeakCursor;

}
@property (nonatomic,strong) NSCursor *squeakCursor;
@property (nonatomic,weak) NSWindow *aboutWindow;

- (int) parseArgument: (NSString *) argData peek: (char *) peek;
- (void) parseArgs: (NSArray *) args;
Expand Down
1 change: 1 addition & 0 deletions platforms/iOS/vm/OSX/sqSqueakOSXApplication.m
Expand Up @@ -104,6 +104,7 @@ void mtfsfi(unsigned long long fpscr) {}

@implementation sqSqueakOSXApplication
@synthesize squeakCursor;
@synthesize aboutWindow;

- (void) setupFloat {
fldcw(0x12bf); /* signed infinity, round to nearest, REAL8, disable intrs, disable signals */
Expand Down

0 comments on commit db1bd1c

Please sign in to comment.