home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
windows
/
winccdem.zip
/
DEMO3.C
< prev
next >
Wrap
Text File
|
1987-08-15
|
3KB
|
96 lines
/*
************************************************************************
* FILE NAME...... DEMO3.C *
* DESCRIPTION.... WINCC demo *
* *
* Copyright (c) 1987 by Doug J. Lieu *
* All rights reserved. *
************************************************************************
This program demonstrates the speed and the imaginative movement
of window.
*/
#include "stdio.h"
#include "win_hd.h"
int wtab[][5] = { /* table of position to zoom and move window */
1, 5, 2, 50, 1,
0, 5, 62, 79, 1,
1, 20, 74, 78, 1,
18, 24, 62, 79, 1,
19, 22, 22, 77, 1,
15, 24, 0, 20, 1,
5, 22, 0, 5, 1,
1, 5, 2, 50, 0,
0, 5, 62, 79, 0,
1, 20, 74, 78, 0,
18, 24, 64, 79, 0,
19, 22, 22, 77, 0,
19, 24, 0, 20, 0,
5, 22, 0, 5, 0,
10, 14, 15, 65, 0,
3, 21, 38, 42, 0,
10, 14, 15, 65, 0,
3, 21, 38, 42, 0,
10, 14, 15, 65, 0,
3, 21, 38, 42, 0,
10, 14, 15, 65, 0,
3, 21, 38, 42, 0,
10, 14, 15, 65, 0,
3, 21, 38, 42, 0,
10, 14, 15, 65, 0,
3, 21, 38, 42, 0,
-1 /* end of table */
};
void
main()
{
int i, j, max, w;
char title[30];
winitial(); /* initialize the window environment */
strcpy(title, " TEST OF ZOOM-MOVE ");
w = wopen(9, 14, 20, 60, RED_LGRN, BDR_SLN, RED_BLK, title, "demo3.c");
wmode(CTRL_ON);
i = message(NULL, " Press Ctrl-Break to stop ", STAY);
delay(2);
wclose(i);
for (max = 0; wtab[max][0] != -1; max++) /* get the size of table */
;
while (1) {
for (i = 0; i < max; i++) { /* an imaginative movement */
wz_move(wtab[i][0], wtab[i][1], wtab[i][2], wtab[i][3]);
wrefresh(ESC);
delay(wtab[i][4]);
}
wz_move(0, 4, 0, 8);
for (j = 0; j < 2; j++) { /* demonstrate the speed of moving windwo */
while (wshift(RIGHT) != ERROR)
;
while (wshift(DOWN) != ERROR)
;
while (wshift(LEFT) != ERROR)
;
while (wshift(UP) != ERROR)
;
}
for (j = 0; j < 2; j++) {
while (wshift(DOWN) != ERROR)
;
while (wshift(RIGHT) != ERROR)
;
while (wshift(UP) != ERROR)
;
while (wshift(LEFT) != ERROR)
;
}
}
}