Language-Haskell
view release on metacpan or search on metacpan
hugs98-Nov2003/src/winhugs/winhugs.c view on Meta::CPAN
#include "WinFrame.h"
#include "WinToolB.h"
#include "WinSTLN.h"
#include "WinUtils.h"
/* --------------------------------------------------------------------------
* Local functions prototypes
* ------------------------------------------------------------------------*/
#ifndef __WINHUGS_H
#include "WinHugs.h"
#endif
/* --------------------------------------------------------------------------
* Nonlocal functions prototypes
* ------------------------------------------------------------------------*/
INT APIENTRY WinMain (HINSTANCE, HINSTANCE, LPSTR, INT);
/* --------------------------------------------------------------------------
* CALLBACK functions prototypes:
* ------------------------------------------------------------------------*/
LRESULT CALLBACK AboutDlgProc (HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK BrowseClassesDlgProc (HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK BrowseTyconsDlgProc (HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK BrowseNamesDlgProc (HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK MainGUIWndProc (HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK OptionsDlgProc (HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK ClassesWndProc (HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK ScriptManDlgProc (HWND, UINT, WPARAM, LPARAM);
/* --------------------------------------------------------------------------
* Default interpreter options
* ------------------------------------------------------------------------*/
#define DEFAULT_ROWS 25
#define DEFAULT_COLS 80
#define DEFAULT_FONT "Courier New"
#define DEFAULT_FONT_SIZE 9
#define DEFAULT_FONT_WEIGHT FW_NORMAL
#define DEFAULT_DIALOGFONT "MS Sans Serif"
#define DEFAULT_DIALOGFONT_SIZE 8
#define DEFAULT_PROMPT "%s> "
#define DEFAULT_REPEATSTR "$$"
#define DEFAULT_PREPROCESSOR ""
#define DEFAULT_DOC_DIR "{Hugs}\\docs"
#define HASKELL_REPORT "report\\index.html"
#define HASKELL_LIBS "library\\index.html"
#define HASKELL_GENTLE "tutorial\\index.html"
#define HUGS_EXTS "libs\\libs.html"
#define HUGS_DOCS "hugsman\\index.html"
#define HASKELL_ORG "http:\\\\haskell.org"
#define HUGS_HELP_FILE "hugs.hlp"
/* --------------------------------------------------------------------------
* Local Macros:
* ------------------------------------------------------------------------*/
#define DlgSendMessage(h,c,w,l) SendMessage((h),(c),MAKEWPARAM(w,(HIWORD(l))),(LOWORD(l)))
#define AbortInterpreter input(BREAK); WinPuts(hWndText, "\n")
#define GotoInterpreter longjmp(catch_error, 1);
/* --------------------------------------------------------------------------
* Local Variables:
* ------------------------------------------------------------------------*/
#if DOS
String appName = "Hugs for Windows"; /* Text for application name */
#else
String appName = "Hugs for Windows 32"; /* Text for application name */
#endif
HANDLE hThisInstance; /* Windows instance for the application */
HWND hWndMain = NULL; /* Main Window handle */
HWND hWndText = NULL; /* Hugs Text Window handle */
HWND hWndClasses = NULL; /* Classes Hierarchy Window handle */
static HANDLE hAccelTable; /* Accelerators table */
HCURSOR GarbageCursor = NULL; /* GC mouse cursor */
HCURSOR SaveCursor = NULL; /* Used to save current cursor */
static INT FrameWinWidth = 0,
FrameWinHeight = 0; /* Size of Main Window */
static INT FrameWinX, FrameWinY; /* Pos of Main Window in Screen */
static INT ScreenRows = 0,
ScreenCols = 0; /* Text Window size in chars */
static WNDPROC PrevWndProc; /* Window Proc of Frame class */
static CHAR **hugs_argv; /* Command line args */
static INT hugs_argc;
static HFONT hDialogFont = NULL; /* Font to use in Dialogs */
#include "menusbm.c"
/* --------------------------------------------------------------------------
* Browse dialogs and classes hierarchy:
* ------------------------------------------------------------------------*/
#include "WinBrows.c"
/* --------------------------------------------------------------------------
* Responses to messages:
* ------------------------------------------------------------------------*/
/* About Hugs ... */
static VOID local DoAbout(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
ExecDialog(hThisInstance, ABOUTDLGBOX, AboutDlgProc);
}
/* Browse Classes ... */
static VOID local DoBrowseClasses(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
ExecDialog(hThisInstance, BROWSECLASSESDLGBOX, BrowseClassesDlgProc);
}
( run in 2.018 seconds using v1.01-cache-2.11-cpan-75ffa21a3d4 )