void Draw::Unselect0() { DrawLock __; if(orgPen) SelectObject(handle, orgPen); if(orgBrush) SelectObject(handle, orgBrush); if(orgFont) SelectObject(handle, orgFont); if(actPen) DeleteObject(actPen); if(actBrush) DeleteObject(actBrush); Cinit(); }
void Draw::Init() { DrawLock __; Cinit(); SetBkMode(handle, TRANSPARENT); ::SetTextAlign(handle, TA_BASELINE); #ifdef PLATFORM_WINCE actual_offset = Point(0, 0); #else ::GetViewportOrgEx(handle, actual_offset); #endif LoadCaps(); }
void stereo_init (char *name) { CInitData stereo_startup = { 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; stereo_startup.height_plus = 900; stereo_startup.lines = 0; stereo_startup.width_plus = 700; stereo_startup.columns = 0; stereo_startup.options |= CINIT_OPTION_USE_GREY; stereo_startup.name = name; /* initialise: */ Cinit (&stereo_startup); }
int main (int argc, char **argv) { Tobj co; Psrc_t src; #ifdef MTRACE extern int Mt_certify; Mt_certify = 1; #endif #ifdef STATS stime = time (NULL); #endif idlerunmode = 0; exprstr = NULL; fp = NULL; init (argv[0]); Minit (GFXprune); Ginit (); FD_SET (Gxfd, &inputfds); Eerrlevel = 1; Estackdepth = 2; Eshowbody = 1; Eshowcalls = 1; processstr (leftyoptions); argv++, argc--; processargs (argc, argv); if (setjmp (exitljbuf)) goto eop; Cinit (); IOinit (); Tinit (); Pinit (); Einit (); Sinit (); Dinit (); Iinit (); TXTinit (txtcoords); GFXinit (); #ifdef FEATURE_GMAP gmapon = TRUE, G2Linit (); #endif if (exprstr) { src.flag = CHARSRC, src.s = exprstr, src.fp = NULL; src.tok = -1, src.lnum = 1; while ((co = Punit (&src))) Eunit (co); } if (fp) { src.flag = FILESRC, src.s = NULL, src.fp = fp; src.tok = -1, src.lnum = 1; while ((co = Punit (&src))) Eunit (co); } if (endflag) goto eop; TXTupdate (); Gneedredraw = FALSE; for (;;) { if (Gneedredraw) GFXredraw (), Gneedredraw = FALSE; if (Gbuttonsdown > 0) { GFXmove (), Gprocessevents (FALSE, G_ONEEVENT); processinput (FALSE); } else { if (Mcouldgc) { if (!processinput (FALSE)) Mdogc (M_GCINCR); } if (idlerunmode) { if (!processinput (FALSE)) GFXidle (); #ifdef FEATURE_GMAP } else if (GMAPneedupdate) { processinput (FALSE); #endif } else processinput (TRUE); } #ifdef FEATURE_GMAP if (gmapon) GMAPupdate (); #endif if (Erun) TXTupdate (), Erun = FALSE; } eop: #ifdef PARANOID #ifdef FEATURE_GMAP if (gmapon) G2Lterm (); #endif GFXterm (); TXTterm (); Iterm (); Dterm (); Sterm (); Eterm (); Pterm (); Tterm (); IOterm (); Cterm (); Gterm (); Mterm (); FD_CLR (Gxfd, &inputfds); term (); #endif printusage (); return 0; }
int APIENTRY WinMain ( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) { Tobj co; Psrc_t src; hinstance = hInstance; hprevinstance = hPrevInstance; idlerunmode = 0; exprstr = NULL; fp = NULL; init (NULL); Ginit (); #ifndef FEATURE_MS FD_SET (Gxfd, &inputfds); #endif Eerrlevel = 1; Estackdepth = 2; Eshowbody = 1; Eshowcalls = 1; processstr (leftyoptions); __argv++, __argc--; processargs (__argc, __argv); if (setjmp (exitljbuf)) goto eop; Cinit (); IOinit (); Minit (GFXprune); Tinit (); Pinit (); Einit (); Sinit (); Dinit (); Iinit (); TXTinit (txtcoords); GFXinit (); if (exprstr) { src.flag = CHARSRC, src.s = exprstr, src.fp = NULL; src.tok = -1, src.lnum = 1; while ((co = Punit (&src))) Eunit (co); } if (fp) { src.flag = FILESRC, src.s = NULL, src.fp = fp; src.tok = -1, src.lnum = 1; while ((co = Punit (&src))) Eunit (co); } if (endflag) goto eop; TXTupdate (); Gneedredraw = FALSE; for (;;) { if (Gneedredraw) GFXredraw (), Gneedredraw = FALSE; if (Gbuttonsdown > 0) GFXmove (), Gprocessevents (FALSE, G_ONEEVENT); else { if (Mcouldgc) { if (!processinput (FALSE)) Mdogc (M_GCINCR); } else if (idlerunmode) { if (!processinput (FALSE)) GFXidle (); } else processinput (TRUE); } if (Erun) TXTupdate (), Erun = FALSE; } eop: #ifdef PARANOID GFXterm (); TXTterm (); Iterm (); Dterm (); Sterm (); Eterm (); Pterm (); Tterm (); Mterm (); IOterm (); Cterm (); Gterm (); term (); #endif printusage (); exit (0); }