コード例 #1
0
ファイル: WINDOWS.C プロジェクト: daemqn/Atari_ST_Sources
int PASCAL WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
	int	result;
	int     argc;
        char*	argv[20];

        if (!setjmp(jmpb))
	{             
#ifdef ONLY_ONCE
		if (hPrevInstance)
		{
			BringWindowToTop(FindWindow(NOM_CLASSE,NOM_FENETRE));
			return 0;
		}
#endif
		initcursor(hInstance);

		if (!hPrevInstance)
			if (!InitApplication(hInstance))
			{
	                	killcursor();
				return (FALSE);
	                }


		if (!InitInstance(hInstance, nCmdShow))
		{
        		killcursor();
			return (FALSE);
        	}

		initwindow();

		strcpy(commandline,lpCmdLine);
		argc=get_args(argv,commandline);
		result=main(argc,argv);

	}

	/* meme en cas d'arret brutal on passera par ici */

#ifdef USER_FREE_FUNCTION
	free_all();
#endif
	/* pour liberer les zones allouees par VOTRE programme */

        return result;
}
コード例 #2
0
ファイル: glyphviewer.c プロジェクト: barak/ivtools-cvs
GlyphViewer::GlyphViewer(
    float w, float h
) : InputHandler(
    new Target(_root = new GraphicMaster ,TargetAlwaysHit), 
    Session::instance()->style()
) {
    Color* mg = new Color(0.7, 0.7, 0.7, 1.0);
    _root->background(mg->brightness(-0.33));
    delete mg;
    _x = -1.0;
    _y = -1.0;
    _lx = -1.0;
    _ly = -1.0;
    _width = w;
    _height = h;
    _grabber = new GlyphGrabber(this, &_a);
    _grabber->ref();

    _zoom = _pan = _grab = false;
    initshape();
    initgraphic();
    initcursor();
    inittimer();
}