FreeBASIC
0.91.0
Main Page
Data Structures
Files
File List
Globals
hook_width.c
Go to the documentation of this file.
1
/* width entrypoint, default to console mode */
2
3
#include "
fb.h
"
4
5
/*:::::*/
6
FBCALL
int
fb_Width
(
int
cols,
int
rows )
7
{
8
int
cur;
9
10
fb_DevScrnInit_NoOpen
( );
11
12
FB_LOCK
();
13
14
if
(
__fb_ctx
.
hooks
.
widthproc
)
15
cur =
__fb_ctx
.
hooks
.
widthproc
( cols, rows );
16
else
17
cur =
fb_ConsoleWidth
( cols, rows );
18
19
if
( cols>0 )
20
FB_HANDLE_SCREEN
->width = cols;
21
22
/* Reset VIEW PRINT */
23
if
( (cols > 0) || (rows > 0) )
24
fb_ConsoleView
( 0, 0 );
25
26
FB_UNLOCK
();
27
28
return
((cols<1 && rows<1) ? cur : 0);
29
}
rtlib
hook_width.c
Generated on Thu Jan 23 2014 19:40:12 for FreeBASIC by
1.8.4