33 lines
6.8 KiB
HTML
33 lines
6.8 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 Media 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="TheMediaKit_Overview.html" title="The Media Kit" /><link rel="prev" href="BMediaFile_Overview.html" title="BMediaFile" /><link rel="next" href="BMediaFormats_Overview.html" title="BMediaFormats" /></head><body><div id="header"><div id="headerT"><div id="headerTL"><a accesskey="p" href="BMediaFile_Overview.html" title="BMediaFile"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a accesskey="u" href="TheMediaKit_Overview.html" title="The Media Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a accesskey="n" href="BMediaFormats_Overview.html" title="BMediaFormats"><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 Media Kit</div></div><div id="headerB">Prev: <a href="BMediaFile_Overview.html">BMediaFile</a> Up: <a href="TheMediaKit_Overview.html">The Media Kit</a> Next: <a href="BMediaFormats_Overview.html">BMediaFormats</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="BMediaFiles_Overview"></a>BMediaFiles</h2></div></div></div><a id="id586352" class="indexterm"></a><p>One feature provided by the Media Kit is the ability to assign media
|
||
files (sounds and graphics files, for example) to named elements, which
|
||
can then be used to locate user-configured sound and graphics options.</p><p>That's the technical way of saying that the Media Kit provides the
|
||
ability to assign sounds and bitmap graphics to events and system
|
||
attributes, so you can configure the appearance and behavior of your BeOS
|
||
computer's user interface.</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="id586384"></a>Identifying an Entry</h3></div></div></div><p>Each entry in the media files registry consists of three elements: a
|
||
type, an item name, and an
|
||
<a class="link" href="BEntry.html#entry_ref" title="entry_ref"><span class="type">entry_ref</span></a>. The type is the type of media data
|
||
the entry represents. For example, this could be "sound" or "bitmap." The
|
||
item name is the actual name of the entry in the registry, such as
|
||
"Startup" or "desktop image." The
|
||
<a class="link" href="BEntry.html#entry_ref" title="entry_ref"><span class="type">entry_ref</span></a>
|
||
identifies the file that's been assigned to that particular entry.</p><p>An application can instantiate a
|
||
<a class="link" href="BMediaFiles.html" title="BMediaFiles"><code class="classname">BMediaFiles</code></a> object and then use the
|
||
<a class="link" href="BMediaFiles.html#BMediaFiles_GetRefFor" title="GetRefFor(), SetRefFor(), RemoveRefFor()"><code class="methodname">GetRefFor()</code></a>
|
||
function to find out what file is assigned to a particular
|
||
registry entry. For instance, if your application needs to access the
|
||
desktop image file, you can get this information as follows:</p><pre class="programlisting example cpp"><span class="type">entry_ref</span> <code class="varname">ref</code>;
|
||
|
||
if (<code class="methodname">GetRefFor</code>("bitmap", "desktop image", &<code class="varname">ref</code>) == <code class="constant">B_OK</code>) {
|
||
<span class="comment">/* have your way with the desktop image file */</span>
|
||
}</pre><p>The user uses the Sounds preference application to assign sound files to
|
||
events, such as the system beep and the startup sound. These are named
|
||
"Beep" and "Startup" respectively. The
|
||
<a class="link" href="TheSupportKit_Functions.html#beep" title="beep(), system_beep(), add_system_beep_event()"><code class="function">beep()</code></a>
|
||
function will always play whatever sound is assigned to the Beep event.</p></div></div><div id="footer"><hr /><div id="footerT">Prev: <a href="BMediaFile_Overview.html">BMediaFile</a> Up: <a href="TheMediaKit_Overview.html">The Media Kit</a> Next: <a href="BMediaFormats_Overview.html">BMediaFormats</a> </div><div id="footerB"><div id="footerBL"><a href="BMediaFile_Overview.html" title="BMediaFile"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a href="TheMediaKit_Overview.html" title="The Media Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a href="BMediaFormats_Overview.html" title="BMediaFormats"><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>
|