|
From: John M M. <jo...@us...> - 2002-05-09 19:24:11
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm
In directory usw-pr-cvs1:/tmp/cvs-serv29731/squeak/platforms/Mac OS/vm
Modified Files:
sqMacNSPlugin.c
Log Message:
3.2.7b4 Fixes to build this plugin again. Last version was a few years old, time to update the source.
Index: sqMacNSPlugin.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/sqMacNSPlugin.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** sqMacNSPlugin.c 1 Mar 2002 00:22:59 -0000 1.4
--- sqMacNSPlugin.c 9 May 2002 19:24:09 -0000 1.5
***************
*** 63,69 ****
May 27th 2001 JMM 3.0.22, fix bug in mailto: string size, added logic to deal with back behavior in IE to avoid crashes.
Jun 2001 JMM 3.0.23, added seteventhook logic to enable HW acceleration plugin to get notification of events
! Aug 2001 JMM 3.0.24 rework of security logic, remove explicit call **********/
#include "sq.h"
#include "FilePlugin.h"
#include "npapi.h"
--- 63,73 ----
May 27th 2001 JMM 3.0.22, fix bug in mailto: string size, added logic to deal with back behavior in IE to avoid crashes.
Jun 2001 JMM 3.0.23, added seteventhook logic to enable HW acceleration plugin to get notification of events
! Aug 2001 JMM 3.0.24 rework of security logic, remove explicit call
! May 2002 JMM 3.2.7b1 Ok lets see if the sucker will compile again
! **********/
#include "sq.h"
+ #include "sqMacUIEvents.h"
+ #include "sqMacFileLogic.h"
#include "FilePlugin.h"
#include "npapi.h"
***************
*** 145,154 ****
/*** Imported Variables ***/
- extern int interruptKeycode;
extern unsigned char *memory;
extern WindowPtr stWindow;
- extern int fullScreenFlag;
- extern int successFlag;
extern int gButtonIsDown;
extern char documentName[]; /* full path to document file */
--- 149,158 ----
/*** Imported Variables ***/
extern unsigned char *memory;
extern WindowPtr stWindow;
extern int gButtonIsDown;
+ extern int getFullScreenFlag();
+ extern int setInterruptKeycode(int value);
+ extern int setFullScreenFlag(int value);
extern char documentName[]; /* full path to document file */
***************
*** 198,204 ****
/*** Functions Imported from sqMacWindow ***/
- int recordKeystroke(EventRecord *theEvent);
- int recordModifierButtons(EventRecord *theEvent);
- int recordMouseDown(EventRecord *theEvent);
void ioSetFullScreenRestore();
--- 202,205 ----
***************
*** 242,246 ****
int AbortIfFileURL(char *url);
int URLPostCreate(char *url, char *buffer, char * window,int semaIndex);
- WindowPtr getSTWindow(void);
NP_Port *getNP_Port(void);
--- 243,246 ----
***************
*** 666,670 ****
}
if (needsUpdate && (netscapeWindow != nil) && (memory)) {
! if (fullScreenFlag) {
BeginUpdate((WindowPtr) eventPtr->message);
}
--- 666,670 ----
}
if (needsUpdate && (netscapeWindow != nil) && (memory)) {
! if (getFullScreenFlag()) {
BeginUpdate((WindowPtr) eventPtr->message);
}
***************
*** 672,676 ****
fullDisplayUpdate(); /* ask VM to call ioShowDisplay */
! if (fullScreenFlag) {
EndUpdate((WindowPtr) eventPtr->message);
}
--- 672,676 ----
fullDisplayUpdate(); /* ask VM to call ioShowDisplay */
! if (getFullScreenFlag()) {
EndUpdate((WindowPtr) eventPtr->message);
}
***************
*** 680,693 ****
if(postMessageHook) postMessageHook(eventPtr);
! if (ignoreFirstEvent && fullScreenFlag) {
ignoreFirstEvent = false;
return true;
}
! if (fullScreenFlag) {
ok = WaitNextEvent(everyEvent, &theEvent,0,null);
eventPtr = &theEvent;
SqueakYieldToAnyThread();
}
! } while (fullScreenFlag);
return true;
}
--- 680,693 ----
if(postMessageHook) postMessageHook(eventPtr);
! if (ignoreFirstEvent && getFullScreenFlag()) {
ignoreFirstEvent = false;
return true;
}
! if (getFullScreenFlag()) {
ok = WaitNextEvent(everyEvent, &theEvent,0,null);
eventPtr = &theEvent;
SqueakYieldToAnyThread();
}
! } while (getFullScreenFlag());
return true;
}
***************
*** 840,845 ****
readImageFromFileHeapSizeStartingAt(f, squeakHeapMBytes, 0);
sqImageFileClose(f);
! interruptKeycode = 515; /* ctrl-C, since Netscape blocks cmd-. */
! fullScreenFlag=false; //Note image can be saved with true
}
--- 840,845 ----
readImageFromFileHeapSizeStartingAt(f, squeakHeapMBytes, 0);
sqImageFileClose(f);
! setInterruptKeycode(515); /* ctrl-C, since Netscape blocks cmd-. */
! setFullScreenFlag(false); //Note image can be saved with true
}
***************
*** 1054,1058 ****
if (fullScreen) {
! if (fullScreenFlag) return;
desiredWidth = 0;
desiredHeight = 0;
--- 1054,1058 ----
if (fullScreen) {
! if (getFullScreenFlag()) return;
desiredWidth = 0;
desiredHeight = 0;
***************
*** 1062,1066 ****
GetWindowGreatestAreaDevice(stWindow,kWindowContentRgn,&dominantGDevice,&windRect);
#else
! dominantGDevice = getDominateDevice(stWindow,&windRect)
#endif
BeginFullScreen (&gRestorableStateForScreen,dominantGDevice,
--- 1062,1066 ----
GetWindowGreatestAreaDevice(stWindow,kWindowContentRgn,&dominantGDevice,&windRect);
#else
! dominantGDevice = getDominateDevice(stWindow,&windRect);
#endif
BeginFullScreen (&gRestorableStateForScreen,dominantGDevice,
***************
*** 1070,1074 ****
nil,
fullScreenAllowEvents);
! fullScreenFlag = true;
stWindow = gAFullscreenWindow;
gFullScreenNPPort.port = GetWindowPort(gAFullscreenWindow);
--- 1070,1074 ----
nil,
fullScreenAllowEvents);
! setFullScreenFlag(true);
stWindow = gAFullscreenWindow;
gFullScreenNPPort.port = GetWindowPort(gAFullscreenWindow);
***************
*** 1088,1093 ****
ignoreFirstEvent = true;
} else {
! if (!fullScreenFlag) return;
! fullScreenFlag = false;
ioSetFullScreenRestore();
}
--- 1088,1093 ----
ignoreFirstEvent = true;
} else {
! if (!getFullScreenFlag()) return;
! setFullScreenFlag(false);
ioSetFullScreenRestore();
}
|