haiku-website/static/legacy-docs/bebook/BWindowScreen_Overview.html

66 lines
9.6 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The Be Book - System Overview - The Game Kit</title><link rel="stylesheet" href="be_book.css" type="text/css" media="all" /><link rel="shortcut icon" type="image/vnd.microsoft.icon" href="./images/favicon.ico" /><!--[if IE]>
<link rel="stylesheet" type="text/css" href="be_book_ie.css" />
<![endif]--><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="Access, BeOS, BeBook, API" /><link rel="start" href="index.html" title="The Be Book" /><link rel="up" href="TheGameKit_Overview.html" title="The Game Kit" /><link rel="prev" href="BStreamingGameSound_Overview.html" title="BStreamingGameSound" /><link rel="next" href="TheGameKit_CardHooks_Overview.html" title="Graphics Card Hook Functions" /></head><body><div id="header"><div id="headerT"><div id="headerTL"><a accesskey="p" href="BStreamingGameSound_Overview.html" title="BStreamingGameSound"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a accesskey="u" href="TheGameKit_Overview.html" title="The Game Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a accesskey="n" href="TheGameKit_CardHooks_Overview.html" title="Graphics Card Hook Functions"><img src="./images/navigation/next.png" alt="Next" /></a></div><div id="headerTR"><div id="navigpeople"><a href="http://www.haiku-os.org"><img src="./images/People_24.png" alt="haiku-os.org" title="Visit The Haiku Website" /></a></div><div class="navighome" title="Home"><a accesskey="h" href="index.html"><img src="./images/navigation/home.png" alt="Home" /></a></div><div class="navigboxed" id="navigindex"><a accesskey="i" href="ClassIndex.html" title="Index">I</a></div><div class="navigboxed" id="naviglang" title="English">en</div></div><div id="headerTC">The Be Book - System Overview - The Game Kit</div></div><div id="headerB">Prev: <a href="BStreamingGameSound_Overview.html">BStreamingGameSound</a>  Up: <a href="TheGameKit_Overview.html">The Game Kit</a>  Next: <a href="TheGameKit_CardHooks_Overview.html">Graphics Card Hook Functions</a></div><hr /></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h2 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BWindowScreen_Overview"></a>BWindowScreen</h2></div></div></div><a id="id530335" class="indexterm"></a><p>
A <a class="link" href="BWindowScreen.html" title="BWindowScreen"><code class="classname">BWindowScreen</code></a>
object provides exclusive access to the entire screen,
bypassing the Application Server's window system. The object has direct
access to the graphics card driver: It can set up the graphics
environment on the graphics card, call driver-implemented drawing
functions, and directly manipulate the frame buffer.
</p><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><hr /><div xmlns:d="http://docbook.org/ns/docbook"><h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BWindowScreen_Overview_Screen_Access"></a>Screen Access</h3></div></div></div><p>
Like all windows, a <a class="link" href="BWindowScreen.html" title="BWindowScreen"><code class="classname">BWindowScreen</code></a>
is hidden (off-screen) when it's
constructed. By calling
<a class="link" href="BWindowScreen.html#BWindowScreen_Show"><code class="methodname">Show()</code></a>
to put it on-screen and make it the active
window, an application takes over the whole screen. While the
<a class="link" href="BWindowScreen.html" title="BWindowScreen"><code class="classname">BWindowScreen</code></a>
is active, the Application Server's graphics operations are
suspended—this means that you can't use any
<a class="link" href="BView.html" title="BView"><code class="classname">BView</code></a> functions, nor
any functions in classes derived from
<a class="link" href="BView.html" title="BView"><code class="classname">BView</code></a>; you have to draw directly
into the screen's frame buffer, and nothing except what the application
draws will be visible to the user—no other windows and no desktop.
When the <a class="link" href="BWindowScreen.html" title="BWindowScreen"><code class="classname">BWindowScreen</code></a>
gives up active status, the Application Server
automatically refreshes the screen with its old contents.
</p><p>
Although the <a class="link" href="BWindowScreen.html" title="BWindowScreen"><code class="classname">BWindowScreen</code></a>
object provides a connection to the screen,
you shouldn't draw from the
<a class="link" href="BWindowScreen.html" title="BWindowScreen"><code class="classname">BWindowScreen</code></a>'s
thread. Use the thread only
to regulate the access of other threads to the frame buffer.
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><hr /><div xmlns:d="http://docbook.org/ns/docbook"><h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BWindowScreen_Overview_Keyboard_Mouse"></a>Keyboard and Mouse</h3></div></div></div><p>
A <a class="link" href="BWindowScreen.html" title="BWindowScreen"><code class="classname">BWindowScreen</code></a>
object remains a window while it has control of the
screen; it stays attached to the Application Server and its message loop
continues to function. It gets messages reporting the user's actions on
the keyboard and mouse, just like any other active window. Because it
covers the whole screen, it's notified of all mouse and keyboard events.
You can attach filters to the window to get the messages as they arrive.
Or you can call the Interface Kit's
<a class="link" href="TheInputServer_Functions.html#get_key_info" title="get_key_info()"><code class="function">get_key_info()</code></a>
function to poll the state of the keyboard and construct a nominal
<a class="link" href="BView.html" title="BView"><code class="classname">BView</code></a> so that you can call
<a class="link" href="BView.html#BView_GetMouse" title="GetMouse()"><code class="methodname">GetMouse()</code></a> to poll the mouse.
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><hr /><div xmlns:d="http://docbook.org/ns/docbook"><h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BWindowScreen_Overview_Workspaces"></a>Workspaces</h3></div></div></div><p>
This class respects workspaces. A
<a class="link" href="BWindowScreen.html" title="BWindowScreen"><code class="classname">BWindowScreen</code></a> object releases its grip
on the screen when the user turns to another workspace and reestablishes
its control when the user returns to the workspace in which it's the
active window.
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><hr /><div xmlns:d="http://docbook.org/ns/docbook"><h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BWindowScreen_Overview_Debugging"></a>Debugging</h3></div></div></div><p>
A <a class="link" href="BWindowScreen.html" title="BWindowScreen"><code class="classname">BWindowScreen</code></a>
object can be constructed in a debugging mode that lets
you switch back and forth between the workspace in which the game is
running and a workspace where error messages are printed. See the
<a class="link" href="BWindowScreen.html#BWindowScreen_Constructor" title="BWindowScreen()">constructor</a> and the
<a class="link" href="BWindowScreen.html#BWindowScreen_RegisterThread" title="RegisterThread(), Suspend(), SuspensionHook()"><code class="methodname">RegisterThread()</code></a> function for details.
</p></div></div><div id="footer"><hr /><div id="footerT">Prev: <a href="BStreamingGameSound_Overview.html">BStreamingGameSound</a>  Up: <a href="TheGameKit_Overview.html">The Game Kit</a>  Next: <a href="TheGameKit_CardHooks_Overview.html">Graphics Card Hook Functions</a> </div><div id="footerB"><div id="footerBL"><a href="BStreamingGameSound_Overview.html" title="BStreamingGameSound"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a href="TheGameKit_Overview.html" title="The Game Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a href="TheGameKit_CardHooks_Overview.html" title="Graphics Card Hook Functions"><img src="./images/navigation/next.png" alt="Next" /></a></div><div id="footerBR"><div><a href="http://www.haiku-os.org"><img src="./images/People_24.png" alt="haiku-os.org" title="Visit The Haiku Website" /></a></div><div class="navighome" title="Home"><a accesskey="h" href="index.html"><img src="./images/navigation/home.png" alt="Home" /></a></div></div><div id="footerBC"><a href="http://www.access-company.com/home.html" title="ACCESS Co."><img alt="Access Company" src="./images/access_logo.png" /></a></div></div></div><div id="licenseFooter"><div id="licenseFooterBL"><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/" title="Creative Commons License"><img alt="Creative Commons License" style="border-width:0" src="https://licensebuttons.net/l/by-nc-nd/3.0/88x31.png" /></a></div><div id="licenseFooterBR"><a href="./LegalNotice.html">Legal Notice</a></div><div id="licenseFooterBC"><span id="licenseText">This work is licensed under a
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative
Commons Attribution-Non commercial-No Derivative Works 3.0 License</a>.</span></div></div></body></html>