41 lines
6.9 KiB
HTML
41 lines
6.9 KiB
HTML
<?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 Application 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="TheApplicationKit_Overview.html" title="The Application Kit" /><link rel="prev" href="BClipboard_Overview.html" title="BClipboard" /><link rel="next" href="BHandler_Overview.html" title="BHandler" /></head><body><div id="header"><div id="headerT"><div id="headerTL"><a accesskey="p" href="BClipboard_Overview.html" title="BClipboard"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a accesskey="u" href="TheApplicationKit_Overview.html" title="The Application Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a accesskey="n" href="BHandler_Overview.html" title="BHandler"><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 Application Kit</div></div><div id="headerB">Prev: <a href="BClipboard_Overview.html">BClipboard</a> Up: <a href="TheApplicationKit_Overview.html">The Application Kit</a> Next: <a href="BHandler_Overview.html">BHandler</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="BCursor_Overview"></a>BCursor</h2></div></div></div><a id="id443838" class="indexterm"></a><p>
|
||
You can use a
|
||
<a class="link" href="BCursor.html" title="BCursor"><code class="classname">BCursor</code></a> to represent a mouse cursor as
|
||
an object instead of as a block of pixel data; this can be more convenient
|
||
in some situations. Also, if you want to call <a class="link" href="BApplication.html#BApplication_SetCursor" title="SetCursor(), HideCursor(), ShowCursor(), ObscureCursor(), IsCursorHidden()"><code class="methodname">BApplication::SetCursor()</code></a>
|
||
without forcing an immediate sync of the Application Server,
|
||
you have to use a <a class="link" href="BCursor.html" title="BCursor"><code class="classname">BCursor</code></a>.
|
||
</p><p>
|
||
The default <a class="link" href="BCursor.html" title="BCursor"><code class="classname">BCursor</code></a>s are
|
||
<a class="link" href="BCursor.html#B_CURSOR_SYSTEM_DEFAULT"><code class="constant">B_CURSOR_SYSTEM_DEFAULT</code></a>
|
||
for the hand cursor and
|
||
<a class="link" href="BCursor.html#B_CURSOR_I_BEAM"><code class="constant">B_CURSOR_I_BEAM</code></a>
|
||
for the I-beam
|
||
text editing cursor.
|
||
</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="BCursor_Overview_CursorDataFormat"></a>Cursor Data Format</h3></div></div></div><p>
|
||
The first four bytes of cursor data give information about the cursor:
|
||
</p><table class="variablelist"><tbody><tr><td><p><span class="term">Byte 1</span></p></td><td><p>Size in pixels-per-side. Cursors are always square; currently, only
|
||
16-by-16 cursors are allowed.</p></td></tr><tr><td><p><span class="term">Byte 2</span></p></td><td><p>Color depth in bits-per-pixel. Currently, only one-bit monochrome
|
||
is allowed.</p></td></tr><tr><td><p><span class="term">Bytes 3 & 4</span></p></td><td><p>Hot spot coordinates. Given in "cursor
|
||
coordinates" where (0,0) is the upper left corner of the cursor grid,
|
||
byte 3 is the hot spot's y coordinate, and byte 4 is its x coordinate. The
|
||
hot spot is a single pixel that's "activated" when the user
|
||
clicks the mouse. To push a button, for example, the hot spot must be
|
||
within the button's bounds.</p></td></tr></tbody></table><p>
|
||
Next comes an array of pixel color data. Pixels are specified from left to
|
||
right in rows starting at the top of the image and working downward. The
|
||
size of an array element is the depth of the image. In one-bit depth…
|
||
</p><p>
|
||
the 16x16 array fits in 32 bytes. 1 is black and 0 is white.
|
||
</p><p>
|
||
Then comes the pixel transparency bitmask, given left-to-right and
|
||
top-to-bottom. 1 is opaque, 0 is transparent. Transparency only applies to
|
||
white pixels, black pixels are always opaque.
|
||
</p></div></div><div id="footer"><hr /><div id="footerT">Prev: <a href="BClipboard_Overview.html">BClipboard</a> Up: <a href="TheApplicationKit_Overview.html">The Application Kit</a> Next: <a href="BHandler_Overview.html">BHandler</a> </div><div id="footerB"><div id="footerBL"><a href="BClipboard_Overview.html" title="BClipboard"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a href="TheApplicationKit_Overview.html" title="The Application Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a href="BHandler_Overview.html" title="BHandler"><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>
|