Skip to content

Commit

Permalink
Merge pull request #501 from marceltaeumel/marceltaeumel/patch-3
Browse files Browse the repository at this point in the history
Removes support for NSPlugin and browser mode on win32
  • Loading branch information
nicolas-cellier-aka-nice committed Jun 13, 2020
2 parents d716e76 + 39670ca commit 07161bc
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 648 deletions.
4 changes: 0 additions & 4 deletions platforms/win32/plugins/DropPlugin/sqWin32Drop.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,14 +776,10 @@ char *dropRequestFileName(int dropIndex) {

sqInt dropRequestFileHandle(sqInt dropIndex) {
sqInt fileHandle;
int wasBrowserMode;
char *dropName = dropRequestFileName(dropIndex);
if(!dropName)
return interpreterProxy->nilObject();
fileHandle = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());
wasBrowserMode = fBrowserMode;
fBrowserMode = false;
sqFileOpen(fileValueOf(fileHandle),dropName, strlen(dropName), 0);
fBrowserMode = wasBrowserMode;
return fileHandle;
}
8 changes: 0 additions & 8 deletions platforms/win32/vm/sqWin32.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ extern HWND consoleWindow; /* console */


extern HWND stWindow; /* the squeak window */
extern HWND browserWindow; /* the browser window */
extern HINSTANCE hInstance; /* the instance of squeak running */
extern HCURSOR currentCursor; /* current cursor displayed by squeak */
extern HPALETTE palette; /* the palette (might be unused) */
Expand All @@ -240,7 +239,6 @@ extern BOOL fIsConsole; /* Are we running as a console app? */
/* Startup options */
extern BOOL fHeadlessImage; /* Do we run headless? */
extern BOOL fRunService; /* Do we run as NT service? */
extern BOOL fBrowserMode; /* Do we run in a web browser? */
extern DWORD dwMemorySize; /* How much memory do we use? */
extern BOOL fUseDirectSound;/* Do we use DirectSound?! */
extern BOOL fUseOpenGL; /* Do we use OpenGL?! */
Expand Down Expand Up @@ -313,12 +311,6 @@ void vprintLastError(TCHAR *fmt, ...);
DWORD SqueakImageLength(WCHAR *fileName);
int isLocalFileName(TCHAR *fileName);

#ifndef NO_PLUGIN_SUPPORT
void pluginInit(void);
void pluginExit(void);
void pluginHandleEvent(MSG* msg);
#endif /* NO_PLUGIN_SUPPORT */

#ifndef NO_DROP
int recordDragDropEvent(HWND wnd, int dragType, int x, int y, int numFiles);
#endif
Expand Down
25 changes: 0 additions & 25 deletions platforms/win32/vm/sqWin32Main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1395,9 +1395,6 @@ void __cdecl Cleanup(void)
dumpStackIfInMainThread(0);
}
ioShutdownAllModules();
#ifndef NO_PLUGIN_SUPPORT
pluginExit();
#endif
ioReleaseTime();
/* tricky ... we have no systray icon when running
headfull or when running as service on NT */
Expand Down Expand Up @@ -1773,9 +1770,6 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
/* get us the instance handle */
hInstance = hInst;

#ifndef NO_PLUGIN_SUPPORT
pluginInit();
#endif
#ifndef NO_SERVICE
/* Find out if we're running from a service.
That's a bit tricky since there is no difference between
Expand Down Expand Up @@ -1833,9 +1827,6 @@ main(int argc, char *argv[])
/* open all streams in binary mode */
_fmode = _O_BINARY;

#ifndef NO_PLUGIN_SUPPORT
pluginInit();
#endif
#ifndef NO_SERVICE
/* Find out if we're running from a service.
That's a bit tricky since there is no difference between
Expand Down Expand Up @@ -2064,22 +2055,6 @@ parseVMArgument(int argc, char *argv[])
}
#endif

/* NOTE: the following flags are "undocumented" */
else if (argc > 1 && !strcmp(argv[0], VMOPTION("browserWindow"))) {
#if SQ_HOST32
browserWindow = (HWND)atoi(argv[1]);
#else
browserWindow = (HWND)atoll(argv[1]);
#endif
return 2; }
else if (!strncmp(argv[0], VMOPTION("browserWindow:"), strlen(VMOPTION("browserWindow:")))) {
#if SQ_HOST32
browserWindow = (HWND)atoi(argv[0]+strlen(VMOPTION("browserWindow:")));
#else
browserWindow = (HWND)atoll(argv[0]+strlen(VMOPTION("browserWindow:")));
#endif
return 1; }

return 0; /* option not recognised */
}

Expand Down
Loading

0 comments on commit 07161bc

Please sign in to comment.