Exemple #1
0
/* atexit procedure */
void
WinExit(void)
{
    LPGW lpgw;

    /* Last chance, call before anything else to avoid a crash. */
    WinCloseHelp();

    /* clean-up call for printing system */
    PrintingCleanup();

    term_reset();

    _fcloseall();

    /* Close all graph windows */
    for (lpgw = listgraphs; lpgw != NULL; lpgw = lpgw->next) {
	if (GraphHasWindow(lpgw))
	    GraphClose(lpgw);
    }

#ifndef WGP_CONSOLE
    TextMessage();  /* process messages */
# ifndef __WATCOMC__
    /* revert C++ stream redirection */
    RedirectOutputStreams(FALSE);
# endif
#endif
#ifdef HAVE_GDIPLUS
    gdiplusCleanup();
#endif
    return;
}
Exemple #2
0
TBOOLEAN
MousableWindowOpened(void)
{
	TBOOLEAN result = FALSE;

#ifdef USE_MOUSE
	/* only pause-for-mouse when a window is open */
	/* FIXME: we might want to have a terminal entry for that */
	if (term != NULL) {
		if ((strcmp(term->name, "windows") == 0) && GraphHasWindow(graphwin))
			result = TRUE;
#ifdef WXWIDGETS
		/* FIXME: this does not test if the current window is open */
		else if ((strcmp(term->name, "wxt") == 0) && wxt_active_window_opened())
			result = TRUE;
#endif
#ifdef HAVE_LIBCACA
		else if ((strcmp(term->name, "caca") == 0) && CACA_window_opened())
			result = TRUE;
#endif
#ifdef QTTERM
# if 0 /* FIXME: qt_window_opened() not yet implemented */
		if ((strcmp(term->name, "qt") == 0) && !qt_active_window_opened())
#else
		if ((strcmp(term->name, "qt") == 0))
# endif
			result = TRUE;
#endif
	}
#endif

	return result;
}
Exemple #3
0
/* returns true if there are any graph windows open (win terminal) */
static TBOOLEAN
WinWindowOpened(void)
{
	LPGW lpgw;

	lpgw = listgraphs;
	while (lpgw != NULL) {
		if (GraphHasWindow(lpgw))
			return TRUE;
		lpgw = lpgw->next;
	}
	return FALSE;
}
Exemple #4
0
/* atexit procedure */
void
WinExit(void)
{
	LPGW lpgw;

    /* Last chance, call before anything else to avoid a crash. */
    WinCloseHelp();

    term_reset();

#ifndef __MINGW32__ /* HBB 980809: FIXME: doesn't exist for MinGW32. So...? */
    fcloseall();
#endif

	/* Close all graph windows */
	for (lpgw = listgraphs; lpgw != NULL; lpgw = lpgw->next) {
		if (GraphHasWindow(lpgw))
			GraphClose(lpgw);
	}

#ifndef WGP_CONSOLE
    TextMessage();  /* process messages */
#ifndef WITH_HTML_HELP
    WinHelp(textwin.hWndText,(LPSTR)winhelpname,HELP_QUIT,(DWORD)NULL);
#endif
    TextMessage();  /* process messages */
#else
#ifndef WITH_HTML_HELP
    WinHelp(GetDesktopWindow(), (LPSTR)winhelpname, HELP_QUIT, (DWORD)NULL);
#endif
#ifdef CONSOLE_SWITCH_CP
    /* restore console codepages */
    if (cp_changed) {
		SetConsoleCP(cp_input);
		SetConsoleOutputCP(cp_output);
		/* file APIs are per process */
    }
#endif
#endif
#ifdef HAVE_GDIPLUS
    gdiplusCleanup();
#endif
    return;
}
Exemple #5
0
/* atexit procedure */
void
WinExit(void)
{
	LPGW lpgw;

    /* Last chance, call before anything else to avoid a crash. */
    WinCloseHelp();

    term_reset();

#ifndef __MINGW32__ /* HBB 980809: FIXME: doesn't exist for MinGW32. So...? */
    fcloseall();
#endif

	/* Close all graph windows */
	for (lpgw = listgraphs; lpgw != NULL; lpgw = lpgw->next) {
		if (GraphHasWindow(lpgw))
			GraphClose(lpgw);
	}

#ifndef WGP_CONSOLE
    TextMessage();  /* process messages */
# ifndef __WATCOMC__
    /* revert C++ stream redirection */
    RedirectOutputStreams(FALSE);
# endif
#else
#ifdef CONSOLE_SWITCH_CP
    /* restore console codepages */
    if (cp_changed) {
		SetConsoleCP(cp_input);
		SetConsoleOutputCP(cp_output);
		/* file APIs are per process */
    }
#endif
#endif
#ifdef HAVE_GDIPLUS
    gdiplusCleanup();
#endif
    return;
}