|
|
1.1 root 1: /* -----------------------------------------------------------------*\
2: /* File Browser Demo Headers
3: /* Version 1.0
4: /* Created by Microsoft Corp. 1988
5: /* -----------------------------------------------------------------*/
6:
7: #define WINDOW hVPS
8:
9: /* ------------------------------------ */
10: /* forward declarations */
11: /* ------------------------------------ */
12:
13: /* -- top-level */
14: SHORT Initialize(int argc, char *argv[]);
15: SHORT ReadFile( void );
16:
17: /* -- line-level */
18: SHORT StoreLine( char * );
19: SHORT RetrieveLine( char ** , USHORT );
20:
21: /* -- screen */
22: void DisplayScreen( USHORT , BOOL );
23: void ClearScreen( void );
24: void VidRefresh ( USHORT LineFrom, USHORT NumLines, USHORT VidRowStart);
25: void ScrollDown(int Nlines);
26: void ScrollUp(int Nlines);
27:
28: /* -- user input */
29: VOID ExecuteAction( CHAR ch , USHORT usSliderPos );
30: UCHAR GetScanCode( void );
31: CHAR GetKbdInput( void );
32:
33: /* ------------------------------------ */
34: /* constant definitions */
35: /* ------------------------------------ */
36: #define NUM_DATA_LINES 4096
37: #define SLIDER_RANGE 1000
38: #define HIGHEST_HSCROLL 128
39: #define HSCROLL_PAGESIZE 8
40: /* -- action codes */
41: #define EXIT 10
42: #define LINE_UP 11
43: #define LINE_DOWN 12
44: #define PAGE_UP 13
45: #define PAGE_DOWN 14
46: #define CHAR_RIGHT 15
47: #define CHAR_LEFT 16
48: #define PAGE_RIGHT 17
49: #define PAGE_LEFT 18
50: #define GOTO_TOP 19
51: #define GOTO_BOTTOM 20
52: #define GOTO_LINE 21
53: #define GOTO_HSCROLL 22
54: #define GOTO_LINE_TRACK 23
55: #define GOTO_HSCROLL_TRACK 24
56:
57: #define MAX_START_LINE (USHORT)(HighestLine-Vid_Rows+1)
58: #define CATTRBYTES 1
59: #define VIO_PS_ROWS 50
60: #define VIO_PS_COLUMNS 255
61:
62: /**********************************************************************\
63: * following are includes for PM Skeleton
64: *
65: *
66: \**********************************************************************/
67:
68: /**********************************************************************\
69: * Color definitions for background fill
70: \**********************************************************************/
71:
72: #define LT_BLUE 0x0000007FL
73: #define WHITE 0x00FFFFFFL
74:
75:
76: /**********************************************************************\
77: * Size of maximum string size allocated
78: \**********************************************************************/
79:
80: #define CCHMAXSTRING 50
81:
82:
83: /**********************************************************************\
84: * Resource Ids
85: \**********************************************************************/
86:
87: #define ID_SKEL 1
88: #define IDD_ABOUT 2
89: #define IDD_SKEL 3
90:
91:
92: /**********************************************************************\
93: * IDD - ID for Dialog item
94: * IDM - ID for Menu commands
95: * IDS - ID for String table
96: * IDT - ID for Timers
97: \**********************************************************************/
98:
99: #define IDNULL -1
100:
101: #define IDMOPTIONS 10
102: #define IDMFLASH 11
103: #define IDMABOUT 12
104: #define IDMCOMMANDS 20
105: #define IDMCOLOR 21
106: #define IDMBLACK 22
107: #define IDMDIALOG 23
108: #define IDMSTART 24
109: #define IDMEND 25
110:
111: #define IDSCONTENT 10
112: #define IDSCLOSE 11
113: #define IDSOKCLOSE 12
114: #define IDSSAVE 13
115: #define IDSOKSAVE 14
116: #define IDSASYNC 15
117: #define IDSOKASYNC 16
118: #define IDSABOUT 18
119: #define IDSTITLE 19
120: #define IDSDEFAULT 20
121:
122: #define IDTASYNC 18
123: #define IDTFLASH 19
124:
125: /********************\
126: * The main procedure *
127: \********************/
128:
129: SHORT cdecl main( int, char *[]);
130:
131: /********************************************************************\
132: * These procedures must be declared FAR because they are exported
133: * and called by OS/2 Windows Presentation Manager.
134: \********************************************************************/
135:
136: ULONG FAR PASCAL SkelAboutDlg( HWND, USHORT, MPARAM, MPARAM );
137: ULONG FAR PASCAL SkelWndProc ( HWND, USHORT, MPARAM, MPARAM );
138: BOOL FAR PASCAL SkelInitApp ( VOID );
139:
140:
141: /********************************************************************\
142: * These procedures are declared here to get type and parameter
143: * checking for calls between modules. The compiler switches -AS and
144: * -AM for SMALL and MIDDLE model will make them NEAR and FAR
145: * respectively, so there is no explicit declaration as NEAR or FAR.
146: \********************************************************************/
147:
148: VOID SkelCharInput ( HWND, SHORT, SHORT, SHORT );
149: VOID SkelCommand ( HWND, SHORT, SHORT, BOOL );
150: VOID SkelCreate ( HWND, LONG );
151: VOID SkelEndSession( HWND, BOOL );
152: VOID SkelSetFocus ( HWND );
153: VOID SkelHorzScroll( HWND, SHORT, SHORT );
154: VOID SkelPaint ( HWND, HPS );
155: VOID SkelQueryQuit ( HWND );
156: VOID SkelTimer ( HWND, USHORT );
157: VOID SkelVertScroll( HWND, SHORT, USHORT );
158: VOID SetScrollPosVert( SHORT, SHORT );
159: VOID SetScrollPosHorz( SHORT, SHORT );
160: VOID GetWinCharSize( VOID );
161: VOID InvisoCursor( VOID );
162:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.