FreeBASIC  0.91.0
gfx_access.c
Go to the documentation of this file.
1 /* low level screen access routines */
2 
3 #include "fb_gfx.h"
4 
5 
6 /*:::::*/
7 FBCALL void fb_GfxLock(void)
8 {
9  if (!__fb_gfx)
10  return;
11 
12  if (__fb_gfx->lock_count == 0)
13  __fb_gfx->driver->lock();
14 
16 }
17 
18 
19 /*:::::*/
20 FBCALL void fb_GfxUnlock(int start_line, int end_line)
21 {
23 
24  if (!__fb_gfx)
25  return;
26  if (start_line < 0)
27  start_line = 0;
28  if (end_line < 0)
29  end_line = __fb_gfx->h - 1;
30  if ((__fb_gfx->visible_page == context->work_page) && (start_line <= end_line) && (end_line < __fb_gfx->h))
31  fb_hMemSet(__fb_gfx->dirty + start_line, TRUE, end_line - start_line + 1);
32 
33  if (__fb_gfx->lock_count != 0) {
35  if (__fb_gfx->lock_count == 0)
37  }
38 }
39 
40 
41 /*:::::*/
43 {
45 
46  if (!__fb_gfx)
47  return NULL;
48  fb_hPrepareTarget(context, NULL);
50 
51  return context->line[0];
52 }