
------------------------------------------------------------------------------
1.26 Select saving method of graphic contents. <Main>
------------------------------------------------------------------------------
[Name]
crt_setgsvmode
[Syntax]
#include <crt.h>
int crt_setgsvmode( unsigned int flag ) ;
[Arguments]
flag CRT_GSV_SAVE0 Save contents of page #0.
CRT_GSV_SAVE1 Save contents of page #1.
CRT_GSV_SAVE01 Save contents of page #0 and #1.
CRT_GSV_NOSAVE Not save any contents.
[Return]
0 Successful.
1 Invalid value of "flag".
2 Insufficient memory for graphic contents.
[Description]
Selects whether graphic contents are saved or not.
Graphic contents drawn by the application program on C-EXE screen will
be cleared if the NC software draws any graphics after switching to NC
screen. This is due to that the graphic buffer is shared by all soft-
wares on the NC equipment. The application program must draw the
graphics again after switching the screen.
If you select "Save graphic contents" by this function, the graphic
contents will be saved and restored every time the screen is switched
between NC and C-EXE.
The screen switching procedure executes the following process under
selected "Save graphic contents" by this function.
* C-EXE -> NC
(1) Save contents of text screen.
(2) Save contents of graphic page into memory if "crt_opengr()"
function has been executed.
(3) Save graphic environment.
* NC -> C-EXE
(1) Restore contents of text screen.
(2) Execute equivalent process to "crt_opengr()".
(3) Execute equivalent process to "_setvideomode()".
(4) Restore graphic environment.
(5) Restore saved contents of graphic page.
After this process, the application program can continue to draw
any graphics without reconfigure graphic environment.