ScreenUnlock

Unlocks work page's framebuffer

Syntax
	KeyPgDeclareDeclare KeyPgSubSub ScreenUnlock ( KeyPgByvalByVal startline KeyPgAsAs KeyPgLongLong = -1, KeyPgByvalByVal endline KeyPgAsAs
	KeyPgLongLong = -1 )

Usage
	ScreenUnlock [ start_line ] [, end_line ]

Parameters
	startline
		optional argument specifying first screen line to be updated. If 
		omitted, top screen line is assumed.
	endline
		optional argument specifying last screen line to be updated. If 
		omitted, bottom screen line is assumed.

Description
	ScreenUnlock unlocks the current work page assuming it was previously 
	locked by calling KeyPgScreenlockScreenLock and lets the system restart updating the 
	screen regularly. When called with start_line and end_line , only the 
	screen area between those lines is assumed to have changed, and will be 
	updated. 

	An internal counter exists that remembers the screen lock state, thus 
	ScreenUnlock has an effect only on a screen that is locked.  A screen 
	that has not been locked with ScreenLock cannot get unlocked, however 
	ScreenUnlock still will force an update of given area or full screen.   

	Calls to ScreenUnlock must be paired with matching calls to KeyPgScreenlockScreenLock.  
	Only the first call to KeyPgScreenlockScreenLock actually performs a locking operation. 
	Subsequent calls to ScreenLock only increment the lock counter.  
	Conversely, ScreenUnlock only decrements the lock counter until it 
	reaches zero at which time the actual unlock operation will be 
	performed.  Using KeyPgScreengraphicsScreen (Graphics) or KeyPgScreenresScreenRes will release all locks 
	and set the lock counter back to zero before changing screen modes.

	All graphic statements automatically lock the screen before the function 
	call, and unlock the screen afterwards, so you do not need to do this 
	explicitly using KeyPgScreenlockScreenLock and ScreenUnlock. You only need to lock the 
	screen when you wish to access the screen (framebuffer) directly using 
	KeyPgScreenptrScreenPtr  or when you wish to group several graphic statements together 
	so their effects appear simultaneously on screen, thus avoiding 
	potential screen flicker during screen updates.

	Warning (Win32, Linux) : The screen is locked by stopping the thread 
	that processes also the OS' events. This means the screen should be 
	locked only for the short time required to redraw it, and no user input 
	will be received while the screen is locked. When the induced lock time 
	becomes too long, use preferably the method of double buffering (with 
	KeyPgScreencopyScreenCopy).

Example
	See KeyPgScreenptrScreenPtr example.

Dialect Differences
	* Not available in the CompilerOptlang-lang qb dialect unless referenced with the 
	  alias __Screenunlock.

Differences from QB
	* New to FreeBASIC

See also
	* KeyPgScreengraphicsScreen (Graphics)
	* KeyPgScreenlockScreenLock
	* KeyPgScreenptrScreenPtr

