diff options
Diffstat (limited to 'files/pt-pt/archive')
56 files changed, 8945 insertions, 0 deletions
diff --git a/files/pt-pt/archive/add-ons/communication_between_html_and_your_extension/index.html b/files/pt-pt/archive/add-ons/communication_between_html_and_your_extension/index.html new file mode 100644 index 0000000000..c3b06f74f9 --- /dev/null +++ b/files/pt-pt/archive/add-ons/communication_between_html_and_your_extension/index.html @@ -0,0 +1,130 @@ +--- +title: Comunicação entre HTML e a sua extensão +slug: Archive/Add-ons/Communication_between_HTML_and_your_extension +tags: + - Desenvolvimento da Web + - Extensões + - Extras +translation_of: Archive/Add-ons/Communication_between_HTML_and_your_extension +--- +<p>Consulte também <a href="/pt-PT/docs/Archive/Add-ons/Interaction_between_privileged_and_non-privileged_pages" title="/en-US/docs/Code snippets/Interaction between privileged and non-privileged pages">Interação entre páginas privilegiadas e não privilegiadas</a>.</p> + +<p><strong>Comunicação entre uma página HTML e a extensão</strong></p> + +<p>After building a sample extension by reading carefully and following the complete instructions for <a href="/en-US/docs/Building_an_Extension" title="/en-US/docs/Building_an_Extension">Building an Extension</a> I was able to get an extension that could display something on the status bar. What I wanted to do was have an extension "look" for something on an HTML page and if it found that something perform some operation on the found thing and then update the status bar with the results of the operation. With a lot of help from <a class="link-irc" href="irc://irc.mozilla.org#js" rel="freelink">irc://irc.mozilla.org#js</a> and <a class="link-irc" href="irc://irc.mozilla.org#extdev" rel="freelink">irc://irc.mozilla.org#extdev</a> I was able to get it running pretty well, but I still would rather have the client less responsible for pinging the extension to "look" for what is on the page.</p> + +<h5 id="What_I_tried" name="What_I_tried">O que eu tentei</h5> + +<ul> + <li>My first attempt was trying to create an XBL component. From what I gather, XBL components are more designed for creating custom components and their specific component behavior rather than trying to impose some kind of messaging on existing components.</li> +</ul> + +<ul> + <li>Next I started investigating events, there are only a handful of events and the <a class="external" href="http://www.w3.org/TR/DOM-Level-3-Events/events.html">W3C documentation</a> is pretty complete.</li> +</ul> + +<p>The basic problem with the event model is probably due to what I was trying to do. In my HTML I have an input element in a form. I set the onBlur action to a little javascript function that performed a standard AJAX request to get a result. The onreadystatechange was set to another little javascript function that would update a specific element on the HTML page with the result. The result of the AJAX request was the something that I wanted the extension to find. There were only a handful of events that seemed relevant (Load, Change, DOMInsertNode, DOMInsertNodeIntoDocument, DOMActivate) and I tried them all in many different ways. Some of the events only apply to certain types of elements so I included trying to modify the result of the AJAX request to be of the appropriate element type (img, which supports "onLoad," rather than span, which doesn't, for example).</p> + +<p>The problem with the events is the timing. I wasn't sure about the difference between the capture or bubbling flag that you pass to addEventListener but every time I would catch the event in the extension, the element from the AJAX request wasn't fully updated into the HTML page. What that meant is that everytime the extension went looking for the element, it wasn't there yet.</p> + +<p>As a last ditch effort I tried setting a timeout using <code>setTimeout</code> when I got the event in the extension to wait a few milliseconds before looking for the desired element. This was non-optimal and the timeout wasn't very reliable for some reason. Sometimes I would get the timeout, sometimes I would'nt.</p> + +<h5 id="What_I_ended_up_with" name="What_I_ended_up_with">O que eu consegui no final</h5> + +<p>Some helpful information on the irc channel led me to believe that a custom event might help. I started to research custom events on Google but everything that I found was far too complicated for what I wanted to achieve. Eventually I put the creation of the custom event into the stateChanged function that was handling the receipt of the AJAX request. After the HTML component was update with the result of the AJAX request, I created and dispatched the event like this: <code> </code></p> + +<pre class="eval"> var event = document.createEvent("Events"); + event.initEvent("my-custom-event", true, true); + document.body.dispatchEvent(event); +</pre> + +<p>In the code of the extension that catches the loading of a new page I added this code:</p> + +<pre class="eval"> var doc = aEvent.originalTarget; // doc is document that triggered "onload" event + // do something with the loaded page. + // doc.location is a Location object (see below for a link). + // You can use it to make your code executed on certain pages only. + if (doc && doc.addEventListener) + doc.addEventListener("my-custom-event", myExtension.customReceived, false); +</pre> + +<p>Since the event is dispatched after the element in the HTML is updated by the statusChanged function, the element that extension is looking for is there to find.</p> + +<div id="SL_balloon_obj" style="display: block;"> +<div class="SL_ImTranslatorLogo" id="SL_button" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%; opacity: 0; display: block; left: -8px; top: -25px; transition: visibility 2s ease 0s, opacity 2s linear 0s;"> </div> + +<div id="SL_shadow_translation_result2" style="display: none;"> </div> + +<div id="SL_shadow_translator" style="display: none;"> +<div id="SL_planshet"> +<div id="SL_arrow_up" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<div id="SL_Bproviders"> +<div class="SL_BL_LABLE_ON" id="SL_P0" title="Google">G</div> + +<div class="SL_BL_LABLE_ON" id="SL_P1" title="Microsoft">M</div> + +<div class="SL_BL_LABLE_ON" id="SL_P2" title="Translator">T</div> +</div> + +<div id="SL_alert_bbl" style="display: none;"> +<div id="SLHKclose" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<div id="SL_alert_cont"> </div> +</div> + +<div id="SL_TB"> +<table id="SL_tables"> + <tbody><tr> + <td class="SL_td"><input></td> + <td class="SL_td"><select><option value="auto">Detectar idioma</option><option value="af">Africâner</option><option value="sq">Albanês</option><option value="de">Alemão</option><option value="ar">Arabe</option><option value="hy">Armênio</option><option value="az">Azerbaijano</option><option value="eu">Basco</option><option value="bn">Bengali</option><option value="be">Bielo-russo</option><option value="my">Birmanês</option><option value="bs">Bósnio</option><option value="bg">Búlgaro</option><option value="ca">Catalão</option><option value="kk">Cazaque</option><option value="ceb">Cebuano</option><option value="ny">Chichewa</option><option value="zh-CN">Chinês (Simp)</option><option value="zh-TW">Chinês (Trad)</option><option value="si">Cingalês</option><option value="ko">Coreano</option><option value="ht">Crioulo haitiano</option><option value="hr">Croata</option><option value="da">Dinamarquês</option><option value="sk">Eslovaco</option><option value="sl">Esloveno</option><option value="es">Espanhol</option><option value="eo">Esperanto</option><option value="et">Estoniano</option><option value="fi">Finlandês</option><option value="fr">Francês</option><option value="gl">Galego</option><option value="cy">Galês</option><option value="ka">Georgiano</option><option value="el">Grego</option><option value="gu">Gujarati</option><option value="ha">Hauça</option><option value="iw">Hebraico</option><option value="hi">Hindi</option><option value="hmn">Hmong</option><option value="nl">Holandês</option><option value="hu">Húngaro</option><option value="ig">Igbo</option><option value="id">Indonésio</option><option value="en">Inglês</option><option value="yo">Ioruba</option><option value="ga">Irlandês</option><option value="is">Islandês</option><option value="it">Italiano</option><option value="ja">Japonês</option><option value="jw">Javanês</option><option value="kn">Kannada</option><option value="km">Khmer</option><option value="lo">Laosiano</option><option value="la">Latim</option><option value="lv">Letão</option><option value="lt">Lituano</option><option value="mk">Macedônico</option><option value="ml">Malaiala</option><option value="ms">Malaio</option><option value="mg">Malgaxe</option><option value="mt">Maltês</option><option value="mi">Maori</option><option value="mr">Marathi</option><option value="mn">Mongol</option><option value="ne">Nepalês</option><option value="no">Norueguês</option><option value="fa">Persa</option><option value="pl">Polonês</option><option value="pt">Português</option><option value="pa">Punjabi</option><option value="ro">Romeno</option><option value="ru">Russo</option><option value="sr">Sérvio</option><option value="st">Sesotho</option><option value="so">Somália</option><option value="sw">Suaíli</option><option value="su">Sudanês</option><option value="sv">Sueco</option><option value="tg">Tadjique</option><option value="tl">Tagalo</option><option value="th">Tailandês</option><option value="ta">Tâmil</option><option value="cs">Tcheco</option><option value="te">Telugo</option><option value="tr">Turco</option><option value="uk">Ucraniano</option><option value="ur">Urdu</option><option value="uz">Uzbeque</option><option value="vi">Vietnamita</option><option value="yi">Yiddish</option><option value="zu">Zulu</option></select></td> + <td class="SL_td"> + <div id="SL_switch_b" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Alternar Idiomas"> </div> + </td> + <td class="SL_td"><select><option value="af">Africâner</option><option value="sq">Albanês</option><option value="de">Alemão</option><option value="ar">Arabe</option><option value="hy">Armênio</option><option value="az">Azerbaijano</option><option value="eu">Basco</option><option value="bn">Bengali</option><option value="be">Bielo-russo</option><option value="my">Birmanês</option><option value="bs">Bósnio</option><option value="bg">Búlgaro</option><option value="ca">Catalão</option><option value="kk">Cazaque</option><option value="ceb">Cebuano</option><option value="ny">Chichewa</option><option value="zh-CN">Chinês (Simp)</option><option value="zh-TW">Chinês (Trad)</option><option value="si">Cingalês</option><option value="ko">Coreano</option><option value="ht">Crioulo haitiano</option><option value="hr">Croata</option><option value="da">Dinamarquês</option><option value="sk">Eslovaco</option><option value="sl">Esloveno</option><option value="es">Espanhol</option><option value="eo">Esperanto</option><option value="et">Estoniano</option><option value="fi">Finlandês</option><option value="fr">Francês</option><option value="gl">Galego</option><option value="cy">Galês</option><option value="ka">Georgiano</option><option value="el">Grego</option><option value="gu">Gujarati</option><option value="ha">Hauça</option><option value="iw">Hebraico</option><option value="hi">Hindi</option><option value="hmn">Hmong</option><option value="nl">Holandês</option><option value="hu">Húngaro</option><option value="ig">Igbo</option><option value="id">Indonésio</option><option selected value="en">Inglês</option><option value="yo">Ioruba</option><option value="ga">Irlandês</option><option value="is">Islandês</option><option value="it">Italiano</option><option value="ja">Japonês</option><option value="jw">Javanês</option><option value="kn">Kannada</option><option value="km">Khmer</option><option value="lo">Laosiano</option><option value="la">Latim</option><option value="lv">Letão</option><option value="lt">Lituano</option><option value="mk">Macedônico</option><option value="ml">Malaiala</option><option value="ms">Malaio</option><option value="mg">Malgaxe</option><option value="mt">Maltês</option><option value="mi">Maori</option><option value="mr">Marathi</option><option value="mn">Mongol</option><option value="ne">Nepalês</option><option value="no">Norueguês</option><option value="fa">Persa</option><option value="pl">Polonês</option><option value="pt">Português</option><option value="pa">Punjabi</option><option value="ro">Romeno</option><option value="ru">Russo</option><option value="sr">Sérvio</option><option value="st">Sesotho</option><option value="so">Somália</option><option value="sw">Suaíli</option><option value="su">Sudanês</option><option value="sv">Sueco</option><option value="tg">Tadjique</option><option value="tl">Tagalo</option><option value="th">Tailandês</option><option value="ta">Tâmil</option><option value="cs">Tcheco</option><option value="te">Telugo</option><option value="tr">Turco</option><option value="uk">Ucraniano</option><option value="ur">Urdu</option><option value="uz">Uzbeque</option><option value="vi">Vietnamita</option><option value="yi">Yiddish</option><option value="zu">Zulu</option></select></td> + <td class="SL_td"> + <div id="SL_TTS_voice" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Ouça"> </div> + </td> + <td class="SL_td"> + <div class="SL_copy" id="SL_copy" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Copiar"> </div> + </td> + <td class="SL_td"> + <div id="SL_bbl_font_patch"> </div> + + <div class="SL_bbl_font" id="SL_bbl_font" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Tamanho da fonte"> </div> + </td> + <td class="SL_td"> + <div id="SL_bbl_help" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Ajuda"> </div> + </td> + <td class="SL_td"> + <div class="SL_pin_off" id="SL_pin" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Fixar a janela de pop-up"> </div> + </td> + </tr> +</tbody></table> +</div> +</div> + +<div id="SL_shadow_translation_result" style=""> </div> + +<div class="SL_loading" id="SL_loading" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<div id="SL_player2"> </div> + +<div id="SL_alert100">A função de fala é limitada a 200 caracteres</div> + +<div id="SL_Balloon_options" style="background: rgb(255, 255, 255) repeat scroll 0% 0%;"> +<div id="SL_arrow_down" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<table id="SL_tbl_opt" style="width: 100%;"> + <tbody><tr> + <td><input></td> + <td> + <div id="SL_BBL_IMG" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Mostrar o botão do ImTranslator 3 segundos"> </div> + </td> + <td><a class="SL_options" title="Mostrar opções">Opções</a> : <a class="SL_options" title="Histórico de tradução">Histórico</a> : <a class="SL_options" title="Comentários">Comentários</a> : <a class="SL_options" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GD9D8CPW8HFA2" title="Faça sua contribuição">Donate</a></td> + <td><span id="SL_Balloon_Close" title="Encerrar">Encerrar</span></td> + </tr> +</tbody></table> +</div> +</div> +</div> diff --git a/files/pt-pt/archive/add-ons/extensoes_bootstrapped/index.html b/files/pt-pt/archive/add-ons/extensoes_bootstrapped/index.html new file mode 100644 index 0000000000..e665476bcb --- /dev/null +++ b/files/pt-pt/archive/add-ons/extensoes_bootstrapped/index.html @@ -0,0 +1,352 @@ +--- +title: Extensões bootstrapped +slug: Archive/Add-ons/Extensoes_bootstrapped +tags: + - Extensões + - Extras + - Firefox 4 + - Gecko 2.0 + - Guía + - Localização + - Tradução +translation_of: Archive/Add-ons/Bootstrapped_extensions +--- +<p><a href="mailto:rohelasilver@gmail.com?subject=root%20xiaomi%20redmi%203s&body=Bootlooder">browser.bookmarks.export( function() {...} // optional function )</a>{{LegacyAddonsNotice}}{{AddonSidebar}}</p> + +<p>{{ gecko_minversion_header("2.0") }}</p> + +<p>Traditional extensions include <strong>overlays</strong>, wherein the application can load up XUL from the extension's package and automatically apply it on top its own UI. While this makes creating extensions that add to the application's user interface relatively easy, it means that updating, installing, or disabling an extension requires an application restart.</p> + +<p>Gecko 2.0 {{ geckoRelease("2.0") }} introduces <strong>bootstrapped extensions</strong>. These are special extensions that, instead of using overlays to apply their user interface to the application, programmatically insert themselves into the application. This is done using a special script file that's included in the extension that contains functions the browser calls to command the extension to install, uninstall, start up, and shut down.</p> + +<p>All the application does is call into this script file; the extension is responsible for adding and removing its user interface and handling any other setup and shutdown tasks it requires.</p> + +<p>This article discusses how bootstrapped extensions work. See this tutorial on <a href="/en-US/Add-ons/How_to_convert_an_overlay_extension_to_restartless">converting from an overlay extension to restartless</a> for a practical step by step guide to migrating.</p> + +<h2 id="O_processo_de_arranque_e_encerramento">O processo de arranque e encerramento</h2> + +<p>A key feature of bootstrapped extensions is that they must be able to start up and shut down on demand by the application. When the extension's <code>startup()</code> function is called, it must manually inject its user interface and other behavior into the application. Similarly, when its <code>shutdown()</code> function is called, it must remove anything that it has added to the application, as well as all references to any of its objects.</p> + +<p>There are several scenarios in which the startup() function may be called; for example:</p> + +<ul> + <li>When the extension is first installed, assuming that it's both compatible with the application and is enabled.</li> + <li>When the extension becomes enabled using the add-ons manager window.</li> + <li>When the application is started up, if the extension is enabled and compatible with the application.</li> +</ul> + +<p>Some examples of when the <code>shutdown()</code> function may be called:</p> + +<ul> + <li>When the extension is uninstalled, if it's currently enabled.</li> + <li>When the extension becomes disabled.</li> + <li>When the user quits the application, if the extension is enabled.</li> +</ul> + +<h2 id="Notas_na_modificação_da_inteface_da_aplicação_do_utilizador">Notas na modificação da inteface da aplicação do utilizador</h2> + +<h3 id="chrome.manifest_nos_extras_de_bootstrapped">chrome.manifest nos extras de <em>bootstrapped</em></h3> + +<p>You can use a <a href="/en-US/docs/Chrome_Registration"><code>chrome.manifest</code></a> file in bootstrapped add-ons to:</p> + +<ul> + <li>Make your add-on's content available via a <code>chrome://</code> URL (using the <code>content</code>, <code>locale</code>, and <code>skin</code> instructions in the manifest).</li> + <li>Replace existing <code>chrome://</code> URIs with your content (using the <code>override</code> instruction).</li> +</ul> + +<p>Not all <code>chrome.manifest</code> instructions are supported in bootstrapped add-ons, for example you still cannot register <a href="/en-US/docs/XUL_Overlays">XUL Overlays</a> from a bootstrapped add-on. See the <a href="/en-US/docs/Chrome_Registration"><code>chrome.manifest</code></a> documentation for details.</p> + +<p>In Firefox 10 and later the <code>chrome.manifest</code> file located in the root of the add-on's XPI (i.e. a sibling of the <code>install.rdf</code>) is loaded automatically. In Firefox 8 and 9 you had to load/unload the manifest manually using {{ ifmethod("nsIComponentManager", "addBootstrappedManifestLocation") }} and {{ ifmethod("nsIComponentManager", "removeBootstrappedManifestLocation") }}. This feature was unavailable in Firefox versions before 8.</p> + +<h3 id="Adicionar_manualmente_a_interface_do_utilizador">Adicionar manualmente a interface do utilizador</h3> + +<p>If you decide to go ahead and try to develop a bootstrapped extension that modifies the application's user interface, here are a few suggestions to get you started.</p> + +<p>You need to look up the relevant application UI elements by their ID by calling {{ domxref("document.getElementById()") }}, then manipulate them to inject your UI. For example, you can get access to the menu bar in Firefox with <code>document.getElementById("main-menubar")</code>.</p> + +<p>Be sure that at shutdown time, you remove any user interface you've added.</p> + +<h2 id="Criar_uma_extensão_bootstrapped">Criar uma extensão <em>bootstrapped</em></h2> + +<p>To mark an extension as bootstrappable, you need to add the following element to its <a href="/en-US/docs/Install_Manifests">install manifest</a>:</p> + +<pre><code><em:bootstrap>true</em:bootstrap></code></pre> + +<p>Then you need to add a <a href="/en-US/docs/Extensions/bootstrap.js"><code><strong>bootstrap.js</strong></code> file</a> that contains the required functions; this should be alongside the <a href="/en-US/docs/Install_Manifests"><code>install.rdf</code> file</a> in the extension's package.</p> + +<h3 id="Compatibilidade_com_versões_anteriores">Compatibilidade com versões anteriores</h3> + +<p>Because older versions of Firefox don't know about the <code>bootstrap</code> property or <code>bootstrap.js</code> file, it's not overly difficult to create an XPI that will work on both as a bootstrappable extension and as a traditional extension. Create your extension as a bootstrappable extension, then add the traditional overlays as well. Newer versions of Firefox will use the <code>bootstrap.js</code> script, ignoring the components and overlays, while older versions will use the overlays.</p> + +<h2 id="Pontos_de_entrada_de_bootstrap">Pontos de entrada de <em>bootstrap</em></h2> + +<p>The <code>bootstrap.js</code> script should contain several specific functions, which are called by the browser to manage the extension. The script gets executed in a privileged sandbox, which is cached until the extension is shut down.</p> + +<h3 id="arranque">arranque</h3> + +<p>Called when the extension needs to start itself up. This happens at application launch time, when the extension is enabled after being disabled or after it has been shut down in order to install an update. As such, this can be called many times during the lifetime of the application.</p> + +<p>This is when your add-on should inject its UI, start up any tasks it may need running and so forth.</p> + +<pre>void startup( + data, + reason +); +</pre> + +<h6 id="Parameters">Parameters</h6> + +<dl> + <dt><code>data</code></dt> + <dd>A <a href="#Bootstrap_data">bootstrap data structure</a>.</dd> + <dt><code>reason</code></dt> + <dd>One of the <a href="#Reason_constants">reason constants</a>, indicating why the extension is being started up. This will be one of <code>APP_STARTUP</code>, <code>ADDON_disable</code>, <code>ADDON_INSTALL</code>, <code>ADDON_UPGRADE</code>, or <code>ADDON_DOWNGRADE</code>.</dd> +</dl> + +<h3 id="encerramento">encerramento</h3> + +<p>Called when the extensidisableon needs to shut itself down, such as when the application is quitting or when the extension is about to be upgraded or disabled. Any user interface that has been injected must be removed, tasks shut down, and objects disposed of.</p> + +<pre>void shutdown( + data, + reason +); +</pre> + +<h6 id="Parameters_2">Parameters</h6> + +<dl> + <dt><code>data</code></dt> + <dd>A <a href="#Bootstrap_data">bootstrap data structure</a>.</dd> + <dt><code>reason</code></dt> + <dd>One of the <a href="#Reason_constants">reason constants</a>, indicating why the extension is being shut down. This will be one of <code>APP_SHUTDOWN</code>, <code>ADDON_DISABLE</code>, <code>ADDON_UNINSTALL</code>, <code>ADDON_UPGRADE</code>, or <code>ADDON_DOWNGRADE</code>.</dd> +</dl> + +<h3 id="instalar">instalar</h3> + +<p>Your bootstrap script must include an <code>install()</code> function, which the application calls before the first call to <code>startup()</code> after the extension is installed, upgraded, or downgraded.</p> + +<pre>void install( + data, + reason +); +</pre> + +<h6 id="Parameters_3">Parameters</h6> + +<dl> + <dt><code>data</code></dt> + <dd>A <a href="#Bootstrap_data">bootstrap data structure</a>.</dd> + <dt><code>reason</code></dt> + <dd>One of the <a href="#Reason_constants">reason constants</a>, indicating why the extension is being installed. This will be one of <code>ADDON_INSTALL</code>, <code>ADDON_UPGRADE</code>, or <code>ADDON_DOWNGRADE</code>.</dd> +</dl> + +<h3 id="desinstalar">desinstalar</h3> + +<p>This function is called after the last call to <code>shutdown()</code> before a particular version of an extension is uninstalled.</p> + +<div class="note"><strong>Nota:</strong> If you open the add-on manager and then click "Remove" on an add-on, it will not call uninstall function right away. This is a soft uninstall because of the available "Undo" option. If the add-on manager is closed or another event takes place such that the "Undo" option becomes unavailable, then the hard uninstall takes place and the uninstall function is called.</div> + +<div class="note"><strong>Nota:</strong> The uninstall function fires on downgrade and upgrade as well so you should make sure it is an uninstall by doing this:<br> +<code>function uninstall(aData, aReason) {</code><br> +<code> if (aReason == ADDON_UNINSTALL) {</code><br> +<code> console.log('really uninstalling');</code><br> +<code> } else {</code><br> +<code> console.log('not a permanent uninstall, likely an upgrade or downgrade');</code><br> +<code> }</code><br> +<code>}</code></div> + +<pre>void uninstall( + data, + reason +); +</pre> + +<h6 id="Parâmetros">Parâmetros</h6> + +<dl> + <dt><code>data</code></dt> + <dd>Uma <a href="#Bootstrap_data">estrutura de dados de <em>bootstrap</em></a>.</dd> + <dt><code>reason</code></dt> + <dd>One of the <a href="#Reason_constants">reason constants</a>, indicating why the extension is being uninstalled. This will be one of <code>ADDON_UNINSTALL</code>, <code>ADDON_UPGRADE</code>, or <code>ADDON_DOWNGRADE</code>.</dd> +</dl> + +<h2 id="Contantes_reason">Contantes <em>reason</em></h2> + +<p>The bootstrap functions accept a <code>reason</code> parameter, which explains to the extension why it's being called. The reason constants are:</p> + +<table class="standard-table"> + <tbody> + <tr> + <td class="header">Constante</td> + <td class="header">Valor</td> + <td class="header">Descrição</td> + </tr> + <tr> + <td><code>APP_STARTUP</code></td> + <td>1</td> + <td>The application is starting up.</td> + </tr> + <tr> + <td><code>APP_SHUTDOWN</code></td> + <td>2</td> + <td>The application is shutting down.</td> + </tr> + <tr> + <td><code>ADDON_ENABLE</code></td> + <td>3</td> + <td>The add-on is being enabled.</td> + </tr> + <tr> + <td><code>ADDON_DISABLE</code></td> + <td>4</td> + <td>The add-on is being disabled. (Also <a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=620541">sent during uninstallation</a>)</td> + </tr> + <tr> + <td><code>ADDON_INSTALL</code></td> + <td>5</td> + <td>The add-on is being installed.</td> + </tr> + <tr> + <td><code>ADDON_UNINSTALL</code></td> + <td>6</td> + <td>The add-on is being uninstalled.</td> + </tr> + <tr> + <td><code>ADDON_UPGRADE</code></td> + <td>7</td> + <td>The add-on is being upgraded.</td> + </tr> + <tr> + <td><code>ADDON_DOWNGRADE</code></td> + <td>8</td> + <td>The add-on is being downgraded.</td> + </tr> + </tbody> +</table> + +<h2 id="Dados_de_bootstrap">Dados de <em>bootstrap</em></h2> + +<p>Each of the entry points is passed a simple data structure containing some useful information about the add-on being bootstrapped. More information about the add-on can be obtained by calling <code><a href="/en-US/docs/Addons/Add-on_Manager/AddonManager#getAddonByID()">AddonManager.getAddonByID()</a></code>. The data is a simple JavaScript object with the following properties:</p> + +<table class="standard-table"> + <tbody> + <tr> + <td class="header">Propriedade</td> + <td class="header">Tipo</td> + <td class="header">Descrição</td> + </tr> + <tr> + <td><code>id</code></td> + <td><code>string</code></td> + <td>The ID of the add-on being bootstrapped.</td> + </tr> + <tr> + <td><code>version</code></td> + <td><code>string</code></td> + <td>The version of the add-on being bootstrapped.</td> + </tr> + <tr> + <td><code>installPath</code></td> + <td><code>nsIFile</code></td> + <td>The installation location of the add-on being bootstrapped. This may be a directory or an XPI file depending on whether the add-on is installed unpacked or not.</td> + </tr> + <tr> + <td><code>resourceURI</code></td> + <td><code>nsIURI</code></td> + <td>A URI pointing at the root of the add-ons files, this may be a <code>jar:</code> or <code>file:</code> URI depending on whether the add-on is installed unpacked or not. {{ gecko_minversion_inline("7.0") }}</td> + </tr> + <tr> + <td><code>oldVersion</code></td> + <td><code>string</code></td> + <td>The previously installed version, if the reason is <code>ADDON_UPGRADE</code> or <code>ADDON_DOWNGRADE</code>, and the method is <code>install</code> or <code>startup</code>. {{ gecko_minversion_inline("22.0") }}</td> + </tr> + <tr> + <td><code>newVersion</code></td> + <td><code>string</code></td> + <td>The version to be installed, if the reason is <code>ADDON_UPGRADE</code> or <code>ADDON_DOWNGRADE</code>, and the method is <code>shutdown</code> or <code>uninstall</code>. {{ gecko_minversion_inline("22.0") }}</td> + </tr> + </tbody> +</table> + +<div class="note"> +<p><strong>Nota:</strong> An add-on may be upgraded/downgraded at application startup, in this case the <code>startup</code> method reason is <code>APP_STARTUP</code>, and the <code>oldVersion</code> property is not set. Also be aware that in some circumstances an add-on upgrade/downgrade may occur without the <code>uninstall</code> method being called.</p> +</div> + +<h2 id="Depurador_de_extra_(add-on)">Depurador de extra (add-on)</h2> + +<p>From Firefox 31 onwards, you can use the <a href="/en-US/Add-ons/Add-on_Debugger">Add-on Debugger</a> to debug bootstrapped add-ons.</p> + +<h2 id="Localização_(L10n)">Localização (L10n)</h2> + +<p>Localizing bootstrapped add-ons is very much the same since Firefox 7, as that is when chrome.manifest compatibility landed.</p> + +<h3 id="Ficheiros_JS_e_JSM_-_Utilizando_Ficheiros_de_Propriedade">Ficheiros JS e JSM - Utilizando Ficheiros de Propriedade</h3> + +<p>Para localizar os seus ficheiros .js e .jsm tem de utilziar os <a href="/pt-PT/docs/Mozilla/Tech/XUL/Tutorial/Ficheiros_de_propriedade">ficheiros de propriedade</a>.</p> + +<p>The absolute minimum needed here is:</p> + +<ol> + <li>File: install.rdf</li> + <li>File: chrome.manifest</li> + <li>File: bootstrap.js</li> + <li>Folder: locale + <ol> + <li>Folder: VALID_LOCALE_HERE + <ol> + <li>File: ANYTHING.properties</li> + </ol> + </li> + </ol> + </li> +</ol> + +<p>In the locale folder you must have folders for each of the languages you want to provide; each folder must be named a valid locale (ex: en-US). Inside this folder must be a property file. Inside the chrome.manifest file these locale must be defined. For example if you had a subfolder of en-US in locale folder your chrome.manifest file will have to contain: <code>locale NAME_OF_YOUR_ADDON en-US locale/en-US/</code></p> + +<p>Here is an example: <a href="https://github.com/Noitidart/l10n/tree/properties">GitHub :: l10n-properties</a> - on startup of this add-on it will show a prompt saying USA or Great Britain, which ever it deems closest to your locale. You can test different locale by going to about:config and changing preference of general.useragent.locale to en-US and then to en-GB and disabling then re-enabling the add-on.</p> + +<h3 id="XUL_and_HTML_Files_-_Using_Entities_from_DTD_Files">XUL and HTML Files - Using Entities from DTD Files</h3> + +<p>Many times HTML pages are used, however they cannot be localized with DTD files. There are three changes you must make:</p> + +<ol> + <li>You have to change the HTML file's extension to be <code>.xhtml</code></li> + <li>The doctype must be defined point to a DTD file in your locale folder such as: <code><!DOCTYPE html SYSTEM <span class="pl-s1">"chrome://l10n/locale/mozilla.dtd"</span>></code></li> + <li>Must add xmlns attribute to html tag for example: <code><<span class="pl-ent">html</span> <span class="pl-e">xmlns</span>=<span class="pl-s1"><span class="pl-pds">"</span>http://www.w3.org/1999/xhtml<span class="pl-pds">"</span></span>></code></li> + <li>If you have multiple DTD files read on here: <a href="/en-US/docs/Using_multiple_DTDs">Using multiple DTDs</a></li> +</ol> + +<p>The bare minimum needed is:</p> + +<ol> + <li>File: install.rdf</li> + <li>File: chrome.manifest</li> + <li>File: bootstrap.js</li> + <li>Folder: locale + <ol> + <li>Folder: VALID_LOCALE_HERE + <ol> + <li>File: ANYTHING.dtd</li> + </ol> + </li> + </ol> + </li> +</ol> + +<p>The chrome.manifest file must include a definition for content for example: <code>content NAME_OF_YOUR_ADDON ./</code></p> + +<p>The chrome.manifest file must also include a line pointing to the locale, just like in the above property section, if you had a folder named en-US in locale, the chrome.manifest file should contain: <code>locale NAME_OF_YOUR_ADDON en-US locale/en-US/</code></p> + +<p>Here is an example add-on that opens an HTML page and a XUL page on install: <a href="https://github.com/Noitidart/l10n/tree/c456cc82a8a66b6d552cd8c2299cd2babc383af0">GitHub :: l10n-xhtml-xul</a>. Here is an example showing how to use a localized HTML page as an options page: <a href="https://github.com/Noitidart/l10n/tree/html-options">GitHub :: l10n-html-options</a>. You can go to about:config and change the value of the preference <code>general.useragent.locale </code>to <code>en-US</code> and then to <code>en-GB</code> and then reload the open pages to see the localization change.</p> + +<h2 id="Leitura_adicional">Leitura adicional</h2> + +<ul> + <li><a href="https://developer.mozilla.org/en-US/Add-ons/How_to_convert_an_overlay_extension_to_restartless">How to convert an overlay extension to restartless</a> a step by step guide. Some code samples are provided. The page is based on and expanded from Dave Garrett's step-by-step guide to <a class="external" href="https://flagfox.wordpress.com/2014/01/19/writing-restartless-addons/">convert an old overlay based extension into a restartless addon</a>.</li> + <li>Dave Townsend provides a basic code base to <a class="external" href="http://www.oxymoronical.com/blog/2011/01/Playing-with-windows-in-restartless-bootstrapped-extensions">load UI for each opened window</a> in a bootstrapped extension.</li> + <li>Mark Finkle provides some simple example code for <a class="external" href="http://starkravingfinkle.org/blog/2011/01/bootstrap-jones-adventures-in-restartless-add-ons/">restartless add-ons in mobile Firefox</a>, <a class="external" href="http://starkravingfinkle.org/blog/2011/01/restartless-add-ons-more-resources/">adding resources (like the options window)</a> to bootstrapped extensions and <a class="external" href="http://starkravingfinkle.org/blog/2011/01/restartless-add-ons-%e2%80%93-default-preferences/">using default preferences</a> without a <code>default/preferences/prefs.js</code> file.</li> + <li>Kris Maglione writes about <a class="external" href="http://maglione-k.users.sourceforge.net/bootstrapped.xhtml">the requirements for the cleanup procedures</a> in bootstrapped extensions.</li> + <li>Edward Lee shows off some <a class="external" href="http://ed.agadak.net/2011/01/restartless-add-on-example-code">helpful coding patterns and examples</a> you can use in your bootstrapped add-on.</li> + <li>Documentation for <a href="/en-US/docs/Extensions/Inline_Options">Inline Options</a> in Firefox 7 and later.</li> +</ul> diff --git a/files/pt-pt/archive/add-ons/index.html b/files/pt-pt/archive/add-ons/index.html new file mode 100644 index 0000000000..9c0f942944 --- /dev/null +++ b/files/pt-pt/archive/add-ons/index.html @@ -0,0 +1,11 @@ +--- +title: Add-ons +slug: Archive/Add-ons +tags: + - NeedsTranslation + - TopicStub +translation_of: Archive/Add-ons +--- +<p>Archived add-ons documentation.</p> + +<p>{{SubpagesWithSummaries}}</p> diff --git a/files/pt-pt/archive/add-ons/interaction_between_privileged_and_non-privileged_pages/index.html b/files/pt-pt/archive/add-ons/interaction_between_privileged_and_non-privileged_pages/index.html new file mode 100644 index 0000000000..3b8723a163 --- /dev/null +++ b/files/pt-pt/archive/add-ons/interaction_between_privileged_and_non-privileged_pages/index.html @@ -0,0 +1,375 @@ +--- +title: Interação entre páginas privilegiadas e não privilegiadas +slug: Archive/Add-ons/Interaction_between_privileged_and_non-privileged_pages +tags: + - Code snippets + - Extensões + - Extras +translation_of: Archive/Add-ons/Interaction_between_privileged_and_non-privileged_pages +--- +<h2 id="Sending_data_from_unprivileged_document_to_chrome" name="Sending_data_from_unprivileged_document_to_chrome">Enviar dados de um documento sem privilégios para o chrome</h2> + +<p>An easy way to send data from a web page to an extension is by using custom DOM events. In your extension's browser.xul overlay, write code which listens for a custom DOM event. Here we call the event <code>MyExtensionEvent</code>.</p> + +<pre class="brush: js">var myExtension = { + myListener: function(evt) { + alert("Received from web page: " + + evt.target.getAttribute("attribute1") + "/" + + evt.target.getAttribute("attribute2")); + } +} +document.addEventListener("MyExtensionEvent", function(e) { myExtension.myListener(e); }, false, true); +// The last value is a Mozilla-specific value to indicate untrusted content is allowed to trigger the event. +</pre> + +<p>The data from the web page (unprivileged code) will be the values of <code>attribute1</code> and <code>attribute2</code>. To trigger the <code>alert()</code> in the listener and pass the data from the web page, write code such as this in the web page:</p> + +<pre class="brush: js">var element = document.createElement("MyExtensionDataElement"); +element.setAttribute("attribute1", "foobar"); +element.setAttribute("attribute2", "hello world"); +document.documentElement.appendChild(element); + +var evt = document.createEvent("Events"); +evt.initEvent("MyExtensionEvent", true, false); +element.dispatchEvent(evt); +</pre> + +<p>This code creates an arbitrary element -- <code><MyExtensionDataElement/></code> -- and inserts it into the web page's DOM. Values are set for two arbitrary attributes on the element. These can also be named anything you like, but we've chosen <code>attribute1</code> and <code>attribute2</code>. Finally, the code creates and dispatches a custom event named <code>MyExtensionEvent</code> -- similar to the standard DOM <code>click</code> event you catch with <code>onclick</code> handlers. The event bubbles up from the web page and reaches the extension (privileged code) where your listener catches it and reads the attribute values from the DOM element where the event originated.</p> + +<p>(To better ensure others do not also implement the same event with a different meaning, one might either attach a namespace to <code><MyExtensionDataElement/></code> and check on the event handler for the correct namespaceURI property, or as per the DOM specification, use initEvent() with an event name that is itself namespaced (XML Name characters only): "It is also strongly recommended that third parties adding their own events use their own prefix to avoid confusion and lessen the probability of conflicts with other new events.")</p> + +<p>In the case where your extension's overlay does not interact directly with browser.xul, such as in a <a href="/en-US/docs/Creating_a_Firefox_sidebar" title="/en-US/docs/Creating_a_Firefox_sidebar">sidebar</a>, it might be easier to add the event listener to the top-level document directly as shown below (also see: <a href="/en-US/docs/Working_with_windows_in_chrome_code#Accessing_the_elements_of_the_top-level_document_from_a_child_window" title="/en-US/docs/Working_with_windows_in_chrome_code#Accessing_the_elements_of_the_top-level_document_from_a_child_window">accessing the elements of the top-level document from a child window</a>).</p> + +<pre class="brush: js">var mainWindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) + .getInterface(Components.interfaces.nsIWebNavigation) + .QueryInterface(Components.interfaces.nsIDocShellTreeItem) + .rootTreeItem + .QueryInterface(Components.interfaces.nsIInterfaceRequestor) + .getInterface(Components.interfaces.nsIDOMWindow); +mainWindow.document.addEventListener("MyExtensionEvent", function(e) { myExtension.myListener(e); }, false, true); +</pre> + +<p>If you need to to pass lots of data, consider using CDATA sections instead of the simple attributes on a custom element.</p> + +<p>Note: If you're using HTML5's postMessage() to send a message from unprivileged code to privileged code, adding 'true' to the end of your event listener in your privileged chrome code will allow the message to be received.</p> + +<p> </p> + +<pre class="brush: js" style="font-size: 14px;">document.addEventListener("message", function(e) { yourFunction(e); }, false, true);</pre> + +<h2 id="Sending_data_from_chrome_to_unprivileged_document" name="Sending_data_from_chrome_to_unprivileged_document">Enviar dados do chrome para um documento sem privilégios</h2> + +<p>To "answer" the web page (e.g., return code), your extension can set an attribute or attach child elements on the event target element (<code><MyExtensionDataElement/></code> in this example).</p> + +<p>You can optionally clean up the created element, or create it once when the web page loads then re-use it each time.</p> + +<p>Another option is to send a return event from the extension to the web page. This can be done using the same principle as the above example.</p> + +<p>There is only one extension, but there can be many active web pages. So to trigger the right event on the right page we have to tell the extension which page to call. The information we need for that is contained in evt.target.ownerDocument.</p> + +<p>We can extend the above example with some data transfer from the extension to the web page. In the following code sample 2 methods are combined: Setting an extra attribute in the original event target element, and creating a new event message with a new event target element. For this to work we need to define the original target element globally. We need a new event trigger in the web page and some code to show the event message actually arrived. In the extension we have to dispatch an event message to the right web page.</p> + +<p>The code containing the callback could look like this:</p> + +<p>In the extension:</p> + +<pre class="brush: js">var myExtension = +{ + myListener: function(evt) + { + alert("Received from web page: " + + evt.target.getAttribute("attribute1") + "/" + + evt.target.getAttribute("attribute2")); + +/* the extension answers the page*/ + evt.target.setAttribute("attribute3", "The extension"); + + var doc = evt.target.ownerDocument; + + var AnswerEvt = doc.createElement("MyExtensionAnswer"); + AnswerEvt.setAttribute("Part1", "answers this."); + + doc.documentElement.appendChild(AnswerEvt); + + var event = doc.createEvent("HTMLEvents"); + event.initEvent("MyAnswerEvent", true, false); + AnswerEvt.dispatchEvent(event); + } +} + +document.addEventListener("MyExtensionEvent", function(e) { myExtension.myListener(e); }, false, true); +// The last value is a Mozilla-specific value to indicate untrusted content is allowed to trigger the event. +</pre> + +<p>In the web page:</p> + +<pre class="brush: js">document.addEventListener("MyAnswerEvent",function(e) { ExtensionAnswer(e); },false); + +var element; + +function CallExtension() +{ + var element = document.createElement("MyExtensionDataElement"); + element.setAttribute("attribute1", "foobar"); + element.setAttribute("attribute2", "hello world"); + document.documentElement.appendChild(element); + var evt = document.createEvent("Events"); + evt.initEvent("MyExtensionEvent", true, false); + element.dispatchEvent(evt); +} + +function ExtensionAnswer(EvtAnswer) +{ + alert(element.getAttribute("attribute3") + " " + + EvtAnswer.target.getAttribute("Part1")); +} +</pre> + +<p>Basic example of similar idea, extension passes information via attributes and fires event on div in page, <a class="external" href="http://forums.mozillazine.org/viewtopic.php?p=3192410#3192410">here</a>.</p> + +<h2 id="Chromium-like_messaging_json_request_with_json_callback">Chromium-like messaging: json request with json callback</h2> + +<p>Web page:</p> + +<pre class="brush: html"><html> + <head> + <script> + var something = { + send_request: function(data, callback) { // analogue of chrome.extension.sendRequest + var request = document.createTextNode(JSON.stringify(data)); + + request.addEventListener("something-response", function(event) { + request.parentNode.removeChild(request); + + if (callback) { + var response = JSON.parse(request.nodeValue); + callback(response); + } + }, false); + + document.head.appendChild(request); + + var event = document.createEvent("HTMLEvents"); + event.initEvent("something-query", true, false); + request.dispatchEvent(event); + }, + + callback: function(response) { + return alert("response: " + (response ? response.toSource() : response)); + } + } + </script> + </head> + <body> + <button onclick="return something.send_request({foo: 1}, something.callback)">send {foo: 1} with callback</button> + <button onclick="return something.send_request({baz: 3}, something.callback)">send {baz: 3} with callback</button> + <button onclick="return something.send_request({mozilla: 3})">send {mozilla: 3} without callback</button> + <button onclick="return something.send_request({firefox: 4}, something.callback)">send {firefox: 4} with callback</button> + </body> +</html> +</pre> + +<p>Overlay on <code>browser.xul</code> in your extension:</p> + +<pre class="brush: js">var something = { + listen_request: function(callback) { // analogue of chrome.extension.onRequest.addListener + document.addEventListener("something-query", function(event) { + var node = event.target; + if (!node || node.nodeType != Node.TEXT_NODE) + return; + + var doc = node.ownerDocument; + callback(JSON.parse(node.nodeValue), doc, function(response) { + node.nodeValue = JSON.stringify(response); + + var event = doc.createEvent("HTMLEvents"); + event.initEvent("something-response", true, false); + return node.dispatchEvent(event); + }); + }, false, true); + }, + + callback: function(request, sender, callback) { + if (request.foo) { + return setTimeout(function() { + callback({bar: 2}); + }, 1000); + } + + if (request.baz) { + return setTimeout(function() { + callback({quux: 4}); + }, 3000); + } + + if (request.mozilla) { + return alert("alert in chrome"); + } + + return callback(null); + } +} + +something.listen_request(something.callback); +</pre> + +<p><a class="external" href="http://code.google.com/chrome/extensions/messaging.html" title="Message Passing in Chromium">Message Passing in Chromium</a></p> + +<h2 id="Enviar_dados_estruturados">Enviar dados estruturados</h2> + +<p>The above mechanisms use element attributes and are thus only strings. You may want to transfer objects. Gecko prevents chrome to access custom object properties added by the content, because that can create security holes. A workaround is to treat the communication between webpage and chrome as a normal network protocol and use XML.</p> + +<p>With element attributes and <a href="/en-US/docs/E4X" title="/en-US/docs/E4X">E4X</a>, this is fairly easy. You do need to convert your data to/from E4X objects, though. And your chrome needs to carefully check every value passed (you need to do that either way).</p> + +<pre class="brush: js">var targetDoc = null; + +function onLoad() { + var iframe = document.getElementById("contentiframe"); + targetDoc = iframe.contentDocument; + iframe.contentWindow.addEventListener("newStuff", receiveStuffFromPage, false); +} + +function receiveStuffFromPage(event) { + var uc = getEventData(event); // uc = unchecked data in form of E4X XML + var stuff = {}; + stuff.id = sanitize.integer(uc.@id); + stuff.name = sanitize.label(uc.@name); +} + +function sendSomethingToPage (something) { + var somethingXML = <something/>; // |something| object as E4X XML + somethingXML.@id = something.id; + somethingXML.@weight = something.weight; + sendMsg("sendSomething", somethingXML); +} + +/** + * Send msgs from chrome to the page + * @param type {String} the event type. The receiver needs to use that + * when doing addEventListener(type, ...) + * @param dataXML {E4X} the data or detail + */ +function sendMsg(type, dataXML) { + var el = targetDoc.body; + el.setAttribute("eventDataToPage", dataXML ? dataXML.toString() : ""); + var event = targetDoc.createEvent("Event") + event.initEvent(type, true, true); + el.dispatchEvent(event); +} + +/** + * Verifies that the event is indeed coming from our page + * as expected, and returns the data for that event. + * @returns {E4X} the (unchecked) detail data from the page. + * You must check the data. + * @see <https://developer.mozilla.org/en-US/docs/Code_snippets/ + * Interaction_between_privileged_and_non-privileged_pages#Security_notes> + */ +function getEventData(event) { + if (event.target.ownerDocument != targetDoc) + throw "event from unexpected source"; + return new XML(event.target.getAttribute("eventDataFromPage")); +} +</pre> + +<h2 id="Security_notes" name="Security_notes">Notas de segurança</h2> + +<ul> + <li>Never invoke the web page's JavaScript functions from your extension - doing this increases the chance of creating a security hole, where a malicious web page can trick the browser to run its code with extended privileges (just like your extension) with, for example, the ability to delete local files.</li> + <li>It is highly recommended to check the source of the event (via <code>event.target.ownerDocument.location</code>) and make your extension ignore any events from pages not from your server.</li> +</ul> + +<h2 id="Resources" name="Resources">Recursos</h2> + +<p><a class="external" href="http://forums.mozillazine.org/viewtopic.php?p=2955601">Fórum de Discussão de Mozillazine</a></p> + +<p><a href="/pt-PT/docs/Communication_between_HTML_and_your_extension" title="/en-US/docs/Communication between HTML and your extension">Comunicação entre HTML e a sua extensão</a></p> + +<h2 id="Consulte_também">Consulte também</h2> + +<ul> + <li><a href="/en-US/docs/Web/API/CustomEvent" title="/en-US/docs/Web/API/CustomEvent">CustomEvent</a></li> + <li><a href="/en-US/docs/Web/API/window.postMessage" title="/en-US/docs/Web/API/window.postMessage">Window.postMessage</a></li> + <li><a class="external" href="http://hyperstruct.net/2006/08/18/exchanging-data-between-chrome-and-content/" title="http://hyperstruct.net/2006/08/18/exchanging-data-between-chrome-and-content/">http://hyperstruct.net/2006/08/18/exchanging-data-between-chrome-and-content/</a></li> +</ul> + +<div id="SL_balloon_obj" style="display: block;"> +<div id="SL_shadow_translation_result2" style="display: none;"> </div> + +<div id="SL_shadow_translator" style="display: none;"> +<div id="SL_planshet"> +<div id="SL_arrow_up" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<div id="SL_Bproviders"> +<div class="SL_BL_LABLE_ON" id="SL_P0" title="Google">G</div> + +<div class="SL_BL_LABLE_ON" id="SL_P1" title="Microsoft">M</div> + +<div class="SL_BL_LABLE_ON" id="SL_P2" title="Translator">T</div> +</div> + +<div id="SL_alert_bbl" style="display: none;"> +<div id="SLHKclose" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<div id="SL_alert_cont"> </div> +</div> + +<div id="SL_TB"> +<table id="SL_tables"> + <tbody> + <tr> + <td class="SL_td"><input></td> + <td class="SL_td"><select><option value="auto">Detectar idioma</option><option value="af">Africâner</option><option value="sq">Albanês</option><option value="de">Alemão</option><option value="ar">Arabe</option><option value="hy">Armênio</option><option value="az">Azerbaijano</option><option value="eu">Basco</option><option value="bn">Bengali</option><option value="be">Bielo-russo</option><option value="my">Birmanês</option><option value="bs">Bósnio</option><option value="bg">Búlgaro</option><option value="ca">Catalão</option><option value="kk">Cazaque</option><option value="ceb">Cebuano</option><option value="ny">Chichewa</option><option value="zh-CN">Chinês (Simp)</option><option value="zh-TW">Chinês (Trad)</option><option value="si">Cingalês</option><option value="ko">Coreano</option><option value="ht">Crioulo haitiano</option><option value="hr">Croata</option><option value="da">Dinamarquês</option><option value="sk">Eslovaco</option><option value="sl">Esloveno</option><option value="es">Espanhol</option><option value="eo">Esperanto</option><option value="et">Estoniano</option><option value="fi">Finlandês</option><option value="fr">Francês</option><option value="gl">Galego</option><option value="cy">Galês</option><option value="ka">Georgiano</option><option value="el">Grego</option><option value="gu">Gujarati</option><option value="ha">Hauça</option><option value="iw">Hebraico</option><option value="hi">Hindi</option><option value="hmn">Hmong</option><option value="nl">Holandês</option><option value="hu">Húngaro</option><option value="ig">Igbo</option><option value="id">Indonésio</option><option value="en">Inglês</option><option value="yo">Ioruba</option><option value="ga">Irlandês</option><option value="is">Islandês</option><option value="it">Italiano</option><option value="ja">Japonês</option><option value="jw">Javanês</option><option value="kn">Kannada</option><option value="km">Khmer</option><option value="lo">Laosiano</option><option value="la">Latim</option><option value="lv">Letão</option><option value="lt">Lituano</option><option value="mk">Macedônico</option><option value="ml">Malaiala</option><option value="ms">Malaio</option><option value="mg">Malgaxe</option><option value="mt">Maltês</option><option value="mi">Maori</option><option value="mr">Marathi</option><option value="mn">Mongol</option><option value="ne">Nepalês</option><option value="no">Norueguês</option><option value="fa">Persa</option><option value="pl">Polonês</option><option value="pt">Português</option><option value="pa">Punjabi</option><option value="ro">Romeno</option><option value="ru">Russo</option><option value="sr">Sérvio</option><option value="st">Sesotho</option><option value="so">Somália</option><option value="sw">Suaíli</option><option value="su">Sudanês</option><option value="sv">Sueco</option><option value="tg">Tadjique</option><option value="tl">Tagalo</option><option value="th">Tailandês</option><option value="ta">Tâmil</option><option value="cs">Tcheco</option><option value="te">Telugo</option><option value="tr">Turco</option><option value="uk">Ucraniano</option><option value="ur">Urdu</option><option value="uz">Uzbeque</option><option value="vi">Vietnamita</option><option value="yi">Yiddish</option><option value="zu">Zulu</option></select></td> + <td class="SL_td"> + <div id="SL_switch_b" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Alternar Idiomas"> </div> + </td> + <td class="SL_td"><select><option value="af">Africâner</option><option value="sq">Albanês</option><option value="de">Alemão</option><option value="ar">Arabe</option><option value="hy">Armênio</option><option value="az">Azerbaijano</option><option value="eu">Basco</option><option value="bn">Bengali</option><option value="be">Bielo-russo</option><option value="my">Birmanês</option><option value="bs">Bósnio</option><option value="bg">Búlgaro</option><option value="ca">Catalão</option><option value="kk">Cazaque</option><option value="ceb">Cebuano</option><option value="ny">Chichewa</option><option value="zh-CN">Chinês (Simp)</option><option value="zh-TW">Chinês (Trad)</option><option value="si">Cingalês</option><option value="ko">Coreano</option><option value="ht">Crioulo haitiano</option><option value="hr">Croata</option><option value="da">Dinamarquês</option><option value="sk">Eslovaco</option><option value="sl">Esloveno</option><option value="es">Espanhol</option><option value="eo">Esperanto</option><option value="et">Estoniano</option><option value="fi">Finlandês</option><option value="fr">Francês</option><option value="gl">Galego</option><option value="cy">Galês</option><option value="ka">Georgiano</option><option value="el">Grego</option><option value="gu">Gujarati</option><option value="ha">Hauça</option><option value="iw">Hebraico</option><option value="hi">Hindi</option><option value="hmn">Hmong</option><option value="nl">Holandês</option><option value="hu">Húngaro</option><option value="ig">Igbo</option><option value="id">Indonésio</option><option selected value="en">Inglês</option><option value="yo">Ioruba</option><option value="ga">Irlandês</option><option value="is">Islandês</option><option value="it">Italiano</option><option value="ja">Japonês</option><option value="jw">Javanês</option><option value="kn">Kannada</option><option value="km">Khmer</option><option value="lo">Laosiano</option><option value="la">Latim</option><option value="lv">Letão</option><option value="lt">Lituano</option><option value="mk">Macedônico</option><option value="ml">Malaiala</option><option value="ms">Malaio</option><option value="mg">Malgaxe</option><option value="mt">Maltês</option><option value="mi">Maori</option><option value="mr">Marathi</option><option value="mn">Mongol</option><option value="ne">Nepalês</option><option value="no">Norueguês</option><option value="fa">Persa</option><option value="pl">Polonês</option><option value="pt">Português</option><option value="pa">Punjabi</option><option value="ro">Romeno</option><option value="ru">Russo</option><option value="sr">Sérvio</option><option value="st">Sesotho</option><option value="so">Somália</option><option value="sw">Suaíli</option><option value="su">Sudanês</option><option value="sv">Sueco</option><option value="tg">Tadjique</option><option value="tl">Tagalo</option><option value="th">Tailandês</option><option value="ta">Tâmil</option><option value="cs">Tcheco</option><option value="te">Telugo</option><option value="tr">Turco</option><option value="uk">Ucraniano</option><option value="ur">Urdu</option><option value="uz">Uzbeque</option><option value="vi">Vietnamita</option><option value="yi">Yiddish</option><option value="zu">Zulu</option></select></td> + <td class="SL_td"> + <div id="SL_TTS_voice" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Ouça"> </div> + </td> + <td class="SL_td"> + <div class="SL_copy" id="SL_copy" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Copiar"> </div> + </td> + <td class="SL_td"> + <div id="SL_bbl_font_patch"> </div> + + <div class="SL_bbl_font" id="SL_bbl_font" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Tamanho da fonte"> </div> + </td> + <td class="SL_td"> + <div id="SL_bbl_help" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Ajuda"> </div> + </td> + <td class="SL_td"> + <div class="SL_pin_off" id="SL_pin" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Fixar a janela de pop-up"> </div> + </td> + </tr> + </tbody> +</table> +</div> +</div> + +<div id="SL_shadow_translation_result" style=""> </div> + +<div class="SL_loading" id="SL_loading" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<div id="SL_player2"> </div> + +<div id="SL_alert100">A função de fala é limitada a 200 caracteres</div> + +<div id="SL_Balloon_options" style="background: rgb(255, 255, 255) repeat scroll 0% 0%;"> +<div id="SL_arrow_down" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<table id="SL_tbl_opt" style="width: 100%;"> + <tbody> + <tr> + <td><input></td> + <td> + <div id="SL_BBL_IMG" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Mostrar o botão do ImTranslator 3 segundos"> </div> + </td> + <td><a class="SL_options" title="Mostrar opções">Opções</a> : <a class="SL_options" title="Histórico de tradução">Histórico</a> : <a class="SL_options" title="Comentários">Comentários</a> : <a class="SL_options" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GD9D8CPW8HFA2" title="Faça sua contribuição">Donate</a></td> + <td><span id="SL_Balloon_Close" title="Encerrar">Encerrar</span></td> + </tr> + </tbody> +</table> +</div> +</div> +</div> diff --git a/files/pt-pt/archive/add-ons/trabalhar_com_multiprocessos_firefox/index.html b/files/pt-pt/archive/add-ons/trabalhar_com_multiprocessos_firefox/index.html new file mode 100644 index 0000000000..ce794196ea --- /dev/null +++ b/files/pt-pt/archive/add-ons/trabalhar_com_multiprocessos_firefox/index.html @@ -0,0 +1,286 @@ +--- +title: Trabalhar com multiprocessos do Firefox +slug: Archive/Add-ons/Trabalhar_com_multiprocessos_Firefox +translation_of: Archive/Add-ons/Working_with_multiprocess_Firefox +--- +<div> +<section class="Quick_links" id="Quick_Links"> +<ol> + <li><a href="/pt-PT/docs/Mozilla/Add-ons/WebExtensions"><strong>Entensões de navegador</strong></a></li> + <li><a href="/pt-PT/docs/Mozilla/Add-ons/WebExtensions#Começar">Começar</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/What_are_WebExtensions">What are extensions?</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension">Your first extension</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_second_WebExtension">Your second extension</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Anatomy_of_a_WebExtension">Anatomy of an extension</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Examples">Example extensions</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/What_next_">What next?</a></li> + </ol> + </li> + <li><a href="/pt-PT/docs/Mozilla/Add-ons/WebExtensions#Conceitos">Conceitos</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Using_the_JavaScript_APIs">Using the JavaScript APIs</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Content_scripts">Content scripts</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns">Match patterns</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Working_with_files">Working with files</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Internationalization">Internationalization</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Security_best_practices">Security best practices</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Content_Security_Policy">Content Security Policy</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_messaging">Native messaging</a></li> + </ol> + </li> + <li><a href="/pt-PT/docs/Mozilla/Add-ons/WebExtensions#Interface_do_utilizador">Interface do utilizador</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface">User Interface</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Browser_action">Toolbar button</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Page_actions">Address bar button</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Sidebars">Sidebars</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Context_menu_items">Context menu items</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Options_pages">Options page</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Extension_pages">Extension pages</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Notifications">Notifications</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Omnibox">Address bar suggestions</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/devtools_panels">Developer tools panels</a></li> + </ol> + </li> + <li><a href="/pt-PT/docs/Mozilla/Add-ons/WebExtensions#Como...">Como...</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Intercept_HTTP_requests">Intercept HTTP requests</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Modify_a_web_page">Modify a web page</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Safely_inserting_external_content_into_a_page">Insert external content</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Add_a_button_to_the_toolbar">Add a button to the toolbar</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Implement_a_settings_page">Implement a settings page</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Working_with_the_Tabs_API">Work with the Tabs API</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_the_Bookmarks_API">Work with the Bookmarks API</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_the_Cookies_API">Work with the Cookies API</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_contextual_identities">Work with contextual identities</a></li> + </ol> + </li> + <li><a href="/pt-PT/docs/Mozilla/Add-ons/WebExtensions#Porting">Porting</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Porting_a_Google_Chrome_extension">Porting a Google Chrome extension</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Porting_a_legacy_Firefox_add-on">Porting a legacy Firefox extension</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Embedded_WebExtensions">Embedded WebExtensions</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Comparison_with_the_Add-on_SDK">Comparison with the Add-on SDK</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Comparison_with_XUL_XPCOM_extensions">Comparison with XUL/XPCOM extensions</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Chrome_incompatibilities">Chrome incompatibilities</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Differences_between_desktop_and_Android">Differences between desktop and Android</a></li> + </ol> + </li> + <li><a href="/pt-PT/docs/Mozilla/Add-ons/WebExtensions#Fluxo_de_trabalho_do_Firefox">Fluxo de trabalho do Firefox</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/User_experience_best_practices">User Experience</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Temporary_Installation_in_Firefox">Temporary Installation in Firefox</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Debugging">Debugging</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Testing_persistent_and_restart_features">Testing persistent and restart features</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Developing_WebExtensions_for_Firefox_for_Android">Developing for Firefox for Android</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Getting_started_with_web-ext">Getting started with web-ext</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/web-ext_command_reference">web-ext command reference</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/WebExtensions_and_the_Add-on_ID">Extensions and the Add-on ID</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Request_the_right_permissions">Request the right permissions</a></li> + </ol> + </li> + <li data-default-state="closed"><a href="/pt-PT/docs/Mozilla/Add-ons/WebExtensions/API">APIs de JavaScript</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Browser_support_for_JavaScript_APIs">Browser support for JavaScript APIs</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/alarms">alarms</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/bookmarks">bookmarks</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browserAction">browserAction</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browserSettings">browserSettings</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browsingData">browsingData</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/clipboard">clipboard</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/commands">commands</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/contentScripts">contentScripts</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/contextualIdentities">contextualIdentities</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/cookies">cookies</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/devtools.inspectedWindow">devtools.inspectedWindow</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/devtools.network">devtools.network</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/devtools.panels">devtools.panels</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/dns">dns</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/downloads">downloads</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/events">events</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/extension">extension</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/extensionTypes">extensionTypes</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/find">find</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/history">history</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/i18n">i18n</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/identity">identity</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/idle">idle</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/management">management</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/menus">menus</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/notifications">notifications</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/omnibox">omnibox</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/pageAction">pageAction</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/permissions">permissions</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/pkcs11">pkcs11</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/privacy">privacy</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/proxy">proxy</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime">runtime</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/search">search</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/sessions">sessions</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/sidebarAction">sidebarAction</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage">storage</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs">tabs</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/theme">theme</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/topSites">topSites</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/types">types</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webNavigation">webNavigation</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webRequest">webRequest</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/windows">windows</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json">Manifest keys</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/applications">applications</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/author">author</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/background">background</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_action">browser_action</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/chrome_settings_overrides">chrome_settings_overrides</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/chrome_url_overrides">chrome_url_overrides</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/commands">commands</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts">content_scripts</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_security_policy">content_security_policy</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/default_locale">default_locale</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/description">description</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer">developer</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/devtools_page">devtools_page</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/homepage_url">homepage_url</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/icons">icons</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/incognito">incognito</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/manifest_version">manifest_version</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/name">name</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/omnibox">omnibox</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/optional_permissions">optional_permissions</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/options_ui">options_ui</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/page_action">page_action</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions">permissions</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/protocol_handlers">protocol_handlers</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/short_name">short_name</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/sidebar_action">sidebar_action</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/theme">theme</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/version">version</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/version_name">version_name</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/web_accessible_resources">web_accessible_resources</a></li> + </ol> + </li> + <li><a href="/pt-PT/docs/Mozilla/Add-ons/Themes"><strong>Temas</strong></a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/Themes/Theme_concepts">Browser themes</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Add-ons/Themes/Theme_concepts">Browser theme concepts</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Add-ons/Themes/Lightweight_themes">Lightweight themes</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Add-ons/Themes/Lightweight_themes">Lightweight themes</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/Themes/Lightweight_Themes/FAQ">Lightweight themes FAQ</a></li> + </ol> + </li> + <li><strong><a href="/pt-PT/docs/Mozilla/Add-ons/Distribuicao">Publicação e Distribuição</a></strong></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/Distribution">Publishing add-ons</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Add-ons/Distribution">Signing and distribution overview</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Package_your_extension_">Package your extension</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/Distribution/Submitting_an_add-on">Submit an add-on</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/Source_Code_Submission">Source code submission</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/Distribution/Resources_for_publishers">Resources for publishers</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/Listing">Creating an appealing listing</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/AMO/Policy/Reviews">Review policies</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/AMO/Policy/Agreement">Developer agreement</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/AMO/Policy/Featured">Featured add-ons</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/Distribution/Retiring_your_extension">Retiring your extension</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Alternative_distribution_options">Distributing add-ons</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Alternative_distribution_options/Sideloading_add-ons">For sideloading</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Alternative_distribution_options/Add-ons_for_desktop_apps">For desktop apps</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Alternative_distribution_options/Add-ons_in_the_enterprise">For an enterprise</a></li> + </ol> + </li> + <li><strong><a href="https://discourse.mozilla.org/c/add-ons">Comunidade e Suporte</a> (inglês)</strong></li> + <li><a href="#">Channels</a> + <ol> + <li><a href="https://blog.mozilla.org/addons">Add-ons blog</a></li> + <li><a href="https://discourse.mozilla.org/c/add-ons">Add-on forums</a></li> + <li><a href="http://stackoverflow.com/questions/tagged/firefox-addon">Stack Overflow</a></li> + <li><a href="/pt-PT/docs/Mozilla/Add-ons#Contacte-nos">Contacte-nos</a></li> + </ol> + </li> +</ol> +</section> + +<div class="warning"> +<p>Add-ons using the techniques described in this document are considered a legacy technology in Firefox. Don't use these techniques to develop new add-ons. Use <a href="/en-US/Add-ons/WebExtensions">WebExtensions</a> instead. If you maintain an add-on which uses the techniques described here, consider migrating it to use WebExtensions.</p> + +<p><strong>Starting from <a href="https://wiki.mozilla.org/RapidRelease/Calendar">Firefox 53</a>, no new legacy add-ons will be accepted on addons.mozilla.org (AMO) for desktop Firefox and Firefox for Android.</strong></p> + +<p><strong>Starting from <a href="https://wiki.mozilla.org/RapidRelease/Calendar">Firefox 57</a>, only extensions developed using WebExtensions APIs will be supported on Desktop Firefox and Firefox for Android. </strong></p> + +<p>Even before Firefox 57, changes coming up in the Firefox platform will break many legacy extensions. These changes include multiprocess Firefox (e10s), sandboxing, and multiple content processes. Legacy extensions that are affected by these changes should migrate to use WebExtensions APIs if they can. See the <a href="https://blog.mozilla.org/addons/2017/02/16/the-road-to-firefox-57-compatibility-milestones/">"Compatibility Milestones" document</a> for more information.</p> + +<p>A wiki page containing <a href="https://wiki.mozilla.org/Add-ons/developer/communication">resources, migration paths, office hours, and more</a>, is available to help developers transition to the new technologies.</p> +</div> +</div> + +<div class="summary"> +<p>This article explains how an add-on developer can check whether their add-on is compatible with multiprocess Firefox, and if it isn't, how to fix it.</p> +</div> + +<p>In older versions of Firefox, chrome code (including code inserted by extensions) and content run in the same operating system process. So extensions can access content directly:</p> + +<pre class="brush: js">gBrowser.selectedBrowser.contentDocument.body.innerHTML = "replaced by chrome code";</pre> + +<p>However, in multiprocess Firefox (also called Electrolysis or E10S), the extension's code will run in a different process from content, and this kind of direct access will no longer be possible.</p> + +<h2 id="Checking_whether_you're_affected">Checking whether you're affected</h2> + +<p>As a rule, you <strong>won't be affected</strong> if:</p> + +<ul> + <li>you use the <a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions">WebExtension API</a></li> + <li>you only use the Add-on SDK's <a href="/en-US/Add-ons/SDK/High-Level_APIs">high-level APIs</a></li> + <li>you don't access web content at all</li> + <li>you load XUL content into tabs via chrome: URLs</li> +</ul> + +<p>You <strong>will be affected</strong> if:</p> + +<ul> + <li>you access web content directly using an <a href="/en-US/Add-ons/Overlay_Extensions">overlay extension</a>, a <a href="/en-US/Add-ons/Bootstrapped_extensions">bootstrapped extension</a>, or <a href="/en-US/Add-ons/SDK/Low-Level_APIs">low-level SDK APIs</a> like <a href="/en-US/Add-ons/SDK/Low-Level_APIs/window_utils">window/utils</a> or <a href="/en-US/Add-ons/SDK/Low-Level_APIs/tabs_utils">tabs/utils</a></li> +</ul> + +<p>For more details, see the article on <a href="/en-US/Firefox/Multiprocess_Firefox/Limitations_of_chrome_scripts">Limitations of chrome scripts</a>, which lists patterns that will no longer work in the chrome process.</p> + +<h3 id="Testes">Testes</h3> + +<p>In multiprocess Firefox, add-ons can run in two different modes: either with <a href="/en-US/Firefox/Multiprocess_Firefox/Limitations_of_chrome_scripts#Compatibility_shims">compatibility shims</a> or without them. Add-ons are more likely to work with compatibility shims, but they will run much more slowly if they access web content often. Shims will be removed six months after multiprocess Firefox is released to users, so developers should avoid shims if possible.</p> + +<p><strong>Testing if your add-on works with shims: </strong>Make sure you're running <a href="https://nightly.mozilla.org/">Firefox Nightly</a>, in which multiprocess support is enabled by default. To verify that multiple process are being used, visit about:support and confirm that the "Multiprocess Windows" row contains "default: true". (If you see a different value, open Firefox preferences and check "Enable multi-process Nightly" in the General pane.) Now install your add-on and test that all features work. If you're testing an unsigned version of your extension, make sure you <a href="https://wiki.mozilla.org/Addons/Extension_Signing">turn signing enforcement off</a>.</p> + +<p><strong>Testing if your add-on works <em>without</em> shims:</strong> As before, make sure you're running <a href="https://nightly.mozilla.org/">Firefox Nightly</a> with multiple processes enabled. Next, add a new property to your extension's <a href="/en-US/Add-ons/Install_Manifests">install.rdf</a> named <code>multiprocessCompatible</code>, with a value of <code>true</code>. Now install your add-on and test that all features work.</p> + +<p>The rest of this document explains how to make broken add-ons work in multiprocess Firefox without using shims.</p> + +<h2 id="Adaptação_ao_Múltiplos_Processos">Adaptação ao Múltiplos Processos</h2> + +<p>If your add-on is not multiprocess-compatible, the best solution is to rewrite your add-on as a <a href="/en-US/Add-ons/WebExtensions">WebExtension</a>. WebExtensions APIs are compatible with multiprocess Firefox. WebExtensions are the future of Firefox add-ons: other types of add-on, including <a href="/en-US/Add-ons/Overlay_Extensions">XUL overlay add-ons</a>, <a href="/en-US/Add-ons/Bootstrapped_extensions">bootstrapped add-ons</a>, and <a href="/en-US/Add-ons/SDK">SDK add-ons</a>, are now considered deprecated. From version 57, Firefox will no longer load such add-ons.</p> + +<ul> + <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Comparison_with_the_Add-on_SDK">See a feature comparison between WebExtensions and the SDK.</a></li> + <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Comparison_with_XUL_XPCOM_extensions">See a feature comparison between WebExtensions and XUL overlay/bootstrapped add-ons.</a></li> +</ul> + +<p>Note that WebExtensions don't give you all the same features that legacy add-ons do. However we are open to extending the WebExtension APIs to support the needs of add-on developers, so if you have ideas, we'd love to hear them. You can reach the WebExtensions team on the <a class="external-icon external" href="https://mail.mozilla.org/listinfo/dev-addons">dev-addons mailing list</a> or <a href="irc://irc.mozilla.org/webextensions">#webextensions</a> on <a class="external-icon external" href="https://wiki.mozilla.org/IRC">IRC</a>.</p> + +<p>If you can't port to WebExtensions yet, the Add-on SDK's <a href="/en-US/Add-ons/SDK/High-Level_APIs">high-level APIs</a> are the next best choice. But note that this is not a future-proof solution, since SDK add-ons will not be supported from Firefox 57 onwards.</p> + +<p>The last option is to use the message manager to communicate with the content process. The message manager can be used from the Add-on SDK or from overlay or bootstrapped add-ons.</p> + +<ul> + <li><a href="/en-US/Add-ons/SDK/Guides/Multiprocess_Firefox_and_the_SDK">See how to use the message manager from the SDK.</a></li> + <li><a href="/en-US/docs/Mozilla/Add-ons/Working_with_multiprocess_Firefox/Using_the_message_manager_from_Firefox_extensions">See how to use the message manager from overlay or bootstrapped add-ons.</a></li> +</ul> + +<p>Again, note that this is not a future-proof solution, since SDK, overlay, and bootstrapped add-ons will not be supported from Firefox 57 onwards.</p> + +<p>If you need help, please contact us in the <code>#addons</code> channel at <a class="external text" href="https://wiki.mozilla.org/IRC" rel="nofollow">irc.mozilla.org</a>. We're here to help!</p> diff --git a/files/pt-pt/archive/apps/ferramentas_e_frameworks/index.html b/files/pt-pt/archive/apps/ferramentas_e_frameworks/index.html new file mode 100644 index 0000000000..46face0a4a --- /dev/null +++ b/files/pt-pt/archive/apps/ferramentas_e_frameworks/index.html @@ -0,0 +1,45 @@ +--- +title: Ferramentas e frameworks +slug: Archive/Apps/Ferramentas_e_frameworks +tags: + - Aplicações + - Bibliotecas + - Ferramentas + - Firefox OS + - Frameworks + - Ritmos de Trabalho +translation_of: Archive/Apps/Tools_and_frameworks +--- +<div> +<p>This part of the App Center provides guides to using tools, frameworks and libraries to speed up Open Web App development — Brick, app templates, X-Tag, and Firefox OS Cordova support.</p> +</div> + +<div class="row topicpage-table"> +<div class="section"> +<h2 id="Componentes_e_modelos">Componentes e modelos</h2> + +<dl dir="ltr"> + <dt><a href="/en-US/Apps/Tools_and_frameworks/Web_components">Web components and Mozilla Brick </a></dt> + <dd>Mozilla Brick is a Web component library, based on the X-Tag library, which allows easy usage of custom elements.</dd> + <dt><a href="/en-US/Apps/Tools_and_frameworks/App_templates">Utilização de modelos de aplicaçãoes</a></dt> + <dd>To help you get going with app development as quickly as possible, there are some template apps you can use as a basis for your own apps. This guide provides information on those templates, how to get them, and how to work with them.</dd> + <dt><a href="/en-US/Apps/Tools_and_frameworks/x-tags">X-Tag</a></dt> + <dd>X-Tag and the Web components specification family provide a means for us to define custom elements that will dealt with as first class citizens by the browser, rather than as an inefficient afterthought. This guide explains how they work.</dd> + <dt><a href="/en-US/Apps/Tools_and_frameworks/Custom_elements">Elementos personalizados</a></dt> + <dd>This article describes some of the most useful custom elements available inside Mozilla's X-Tag library.</dd> +</dl> +</div> + +<div class="section"> +<h2 id="Aplicações_de_plataforma_cruzada_e_ferramentas_de_criação">Aplicações de plataforma cruzada e ferramentas de criação</h2> + +<dl> + <dt><a href="/en-US/Apps/Tools_and_frameworks/Cordova_support_for_Firefox_OS">Cordova support for Firefox OS</a></dt> + <dd>This article provides a basic introduction to Apache Cordova and explains how to use it to generate an Open Web App for installation on Firefox OS.</dd> + <dt><a href="/en-US/Apps/Tools_and_frameworks/Cordova_Firefox_OS_plugin_reference">Cordova Firefox OS plugin reference</a></dt> + <dd>Reference showing sample code and examples for the Cordova plugins that currently support Firefox OS.</dd> +</dl> +</div> +</div> + +<p> </p> diff --git a/files/pt-pt/archive/apps/index.html b/files/pt-pt/archive/apps/index.html new file mode 100644 index 0000000000..41b0a9c452 --- /dev/null +++ b/files/pt-pt/archive/apps/index.html @@ -0,0 +1,14 @@ +--- +title: Apps +slug: Archive/Apps +tags: + - Apps + - Firefox OS + - NeedsTranslation + - TopicStub + - Web +translation_of: Archive/Apps +--- +<p class="summary">This page includes archived content for Apps, including obsolete web app content, Firefox OS app-related content, and so forth.</p> + +<p>{{SubpagesWithSummaries}}</p> diff --git a/files/pt-pt/archive/b2g_os/api/camera_api/index.html b/files/pt-pt/archive/b2g_os/api/camera_api/index.html new file mode 100644 index 0000000000..435465c622 --- /dev/null +++ b/files/pt-pt/archive/b2g_os/api/camera_api/index.html @@ -0,0 +1,38 @@ +--- +title: Camera API +slug: Archive/B2G_OS/API/Camera_API +tags: + - API + - Firefox OS + - Graphics + - NeedsTranslation + - Reference + - Référence(2) + - TopicStub + - WebAPI + - camera +translation_of: Archive/B2G_OS/API/Camera_API +--- +<p></p><section class="Quick_links" id="Quick_Links"><ol><li><strong><a href="/en-US/docs/Web/API/Camera_API">Camera API</a></strong></li><li data-default-state="open"><a href="#"><strong>Interfaces</strong></a><ol><li><a href="/en-US/docs/Web/API/CameraCapabilities"><code>CameraCapabilities</code></a></li><li><a href="/en-US/docs/Web/API/CameraControl"><code>CameraControl</code></a></li><li><a href="/en-US/docs/Web/API/CameraManager"><code>CameraManager</code></a></li></ol></li><li data-default-state="open"><a href="#"><strong>Methods</strong></a><ol><li><a href="/en-US/docs/Web/API/Navigator/mozCameras"><code>Navigator.mozCameras</code></a></li></ol></li></ol></section><p></p> + +<p></p><div class="overheadIndicator nonStandard nonStandardHeader"> + <p><strong><span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span> Non-standard</strong><br> + This feature is not on a current W3C standards track, but it is supported on the Firefox OS platform. Although implementations may change in the future and it is not supported widely across browsers, it is suitable for use in code dedicated to Firefox OS apps.</p> + </div><p></p> + +<p>The <strong>Camera API</strong> allows applications to manage the camera of the device. It allows them to take photographs, record videos, and get information like the focus, the zoom, the white balance, the flash, … It is a priviledged API and can only be used by certified applications.</p> + +<p>This API was initially only available to certified applications, but is available to privileged apps on Firefox 2.0 onwards.</p> + +<div class="note"> +<p><strong>Note:</strong> Except if you are implementing a replacement for the default <em>Camera</em> application, you shouldn't use this API. Instead, if you want to use the camera in your device, you should use the <a href="/en-US/docs/WebAPI/Web_Activities" title="/en-US/docs/Web/API/Web_Activities">Web Activities API</a>.</p> +</div> + +<h2 id="See_also">See also</h2> + +<ul> + <li><a href="/en-US/docs/Web/API/Navigator/mozCameras" title="The documentation about this has not yet been written; please consider contributing!"><code>navigator.mozCameras</code></a></li> + <li><a href="/en-US/docs/Web/API/CameraManager" title="The documentation about this has not yet been written; please consider contributing!"><code>CameraManager</code></a></li> + <li><a href="/en-US/docs/Web/API/CameraControl" title="The documentation about this has not yet been written; please consider contributing!"><code>CameraControl</code></a></li> + <li><a href="/en-US/docs/Web/API/CameraCapabilities" title="The documentation about this has not yet been written; please consider contributing!"><code>CameraCapabilities</code></a></li> +</ul> diff --git a/files/pt-pt/archive/b2g_os/api/camera_api/introducao/index.html b/files/pt-pt/archive/b2g_os/api/camera_api/introducao/index.html new file mode 100644 index 0000000000..d64e05da53 --- /dev/null +++ b/files/pt-pt/archive/b2g_os/api/camera_api/introducao/index.html @@ -0,0 +1,178 @@ +--- +title: Introdução à API de Câmara +slug: Archive/B2G_OS/API/Camera_API/Introducao +tags: + - API da Web + - API de Câmara + - Intermediário + - Multimedia + - Precisa de Atualização + - Referencia DOM Gecko + - cámara +translation_of: Archive/B2G_OS/API/Camera_API/Introduction +--- +<p> </p> + +<section class="Quick_links" id="Quick_Links"> +<ol> + <li><strong><a href="/en-US/docs/Web/API/Camera_API">API de Câmara</a></strong></li> + <li data-default-state="open"><a href="#"><strong>Interfaces</strong></a> + <ol> + <li><a href="/en-US/docs/Web/API/CameraCapabilities"><code>CameraCapabilities</code></a></li> + <li><a href="/en-US/docs/Web/API/CameraControl"><code>CameraControl</code></a></li> + <li><a href="/en-US/docs/Web/API/CameraManager"><code>CameraManager</code></a></li> + </ol> + </li> + <li data-default-state="open"><a href="#"><strong>Métodos</strong></a> + <ol> + <li><a href="/en-US/docs/Web/API/Navigator/mozCameras"><code>Navigator.mozCameras</code></a></li> + </ol> + </li> +</ol> +</section> + +<p> </p> + +<p><span class="seoSummary">Through the <a href="/en-US/docs/Web/API/Camera_API">Camera API</a>, it is possible to take pictures with your device's camera and upload them into the current web page.</span> This is achieved through an <code>input</code> element with <code>type="file"</code> and an <code>accept</code> attribute to declare that it accepts images. The HTML looks like this:</p> + +<pre class="brush: html"><input type="file" id="take-picture" accept="image/*"> +</pre> + +<p>When users choose to activate this HTML element, they are presented with an option to choose a file, where the device's camera is one of the options. If they select the camera, it goes into picture taking mode. After the picture has been taken, the user is presented with a choice to accept or discard it. If accepted, it gets sent to the <code><input type="file"></code> element and its <code>onchange</code> event is triggered.</p> + +<h2 id="Get_a_reference_to_the_taken_picture">Get a reference to the taken picture</h2> + +<p>With the help of the <a href="/en-US/docs/Using_files_from_web_applications">File API</a> you can then access the taken picture or chosen file:</p> + +<pre class="brush: js">var takePicture = document.querySelector("#take-picture"); +takePicture.onchange = function (event) { + // Get a reference to the taken picture or chosen file + var files = event.target.files, + file; + if (files && files.length > 0) { + file = files[0]; + } +}; +</pre> + +<h2 id="Presenting_the_picture_in_the_web_page">Presenting the picture in the web page</h2> + +<p>Once you have a reference to the taken picture (i.e., file), you can then use <a href="/en-US/docs/Web/API/Window/URL/createObjectURL" title="The URL.createObjectURL() static method creates a DOMString containing an URL representing the object given in parameter. The URL lifetime is tied to the document in the window on which it was created. The new object URL represents the specified File object or Blob object."><code>window.URL.createObjectURL()</code></a> to create a URL referencing the picture and setting it as the <code>src</code> of an image:</p> + +<pre class="brush: js">// Image reference +var showPicture = document.querySelector("#show-picture"); + +// Create ObjectURL +var imgURL = window.URL.createObjectURL(file); + +// Set img src to ObjectURL +showPicture.src = imgURL; + +// For performance reasons, revoke used ObjectURLs +URL.revokeObjectURL(imgURL); +</pre> + +<p>If <code>createObjectURL()</code> isn't supported, an alternative is to fallback to <a href="/en-US/docs/Web/API/FileReader" title="The FileReader object lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer, using File or Blob objects to specify the file or data to read."><code>FileReader</code></a>:</p> + +<pre class="brush: js">// Fallback if createObjectURL is not supported +var fileReader = new FileReader(); +fileReader.onload = function (event) { + showPicture.src = event.target.result; +}; +fileReader.readAsDataURL(file); +</pre> + +<h2 id="Complete_example">Complete example</h2> + +<p>If you want to see it in action, take a look at the <a class="external" href="http://robnyman.github.com/camera-api/">complete working Camera API example</a>.</p> + +<p>Here is the code used for that demo:</p> + +<h3 id="HTML_page">HTML page</h3> + +<pre class="brush: html"><!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Camera API</title> + <link rel="stylesheet" href="css/base.css" type="text/css" media="screen"> + </head> + + <body> + + <div class="container"> + <h1>Camera API</h1> + + <section class="main-content"> + <p>A demo of the Camera API, currently implemented in Firefox and Google Chrome on Android. Choose to take a picture with your device's camera and a preview will be shown through createObjectURL or a FileReader object (choosing local files supported too).</p> + + <p> + <input type="file" id="take-picture" accept="image/*"> + </p> + + <h2>Preview:</h2> + <p> + <img src="about:blank" alt="" id="show-picture"> + </p> + + <p id="error"></p> + + </section> + + <p class="footer">All the code is available in the <a href="https://github.com/robnyman/robnyman.github.com/tree/master/camera-api">Camera API repository on GitHub</a>.</p> + </div> + + + <script src="js/base.js"></script> + + + </body> +</html> +</pre> + +<h3 id="JavaScript_file">JavaScript file</h3> + +<pre class="brush: js">(function () { + var takePicture = document.querySelector("#take-picture"), + showPicture = document.querySelector("#show-picture"); + + if (takePicture && showPicture) { + // Set events + takePicture.onchange = function (event) { + // Get a reference to the taken picture or chosen file + var files = event.target.files, + file; + if (files && files.length > 0) { + file = files[0]; + try { + // Create ObjectURL + var imgURL = window.URL.createObjectURL(file); + + // Set img src to ObjectURL + showPicture.src = imgURL; + + // Revoke ObjectURL + URL.revokeObjectURL(imgURL); + } + catch (e) { + try { + // Fallback if createObjectURL is not supported + var fileReader = new FileReader(); + fileReader.onload = function (event) { + showPicture.src = event.target.result; + }; + fileReader.readAsDataURL(file); + } + catch (e) { + // + var error = document.querySelector("#error"); + if (error) { + error.innerHTML = "Neither createObjectURL or FileReader are supported"; + } + } + } + } + }; + } +})(); +</pre> diff --git a/files/pt-pt/archive/b2g_os/api/index.html b/files/pt-pt/archive/b2g_os/api/index.html new file mode 100644 index 0000000000..706080ff54 --- /dev/null +++ b/files/pt-pt/archive/b2g_os/api/index.html @@ -0,0 +1,156 @@ +--- +title: B2G OS APIs +slug: Archive/B2G_OS/API +tags: + - API + - B2G API + - NeedsTranslation + - TopicStub + - b2g os api's +translation_of: Archive/B2G_OS/API +--- +<p id="B2G_OS_uses_standard_Web_API's">List of B2G OS APIs </p> + +<p></p><div class="index"> +<span>A</span><ul> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/AudioChannelManager" title="The AudioChannelManager interface of the AudioChannels API includes features for managing your device's audio channels, including setting what channel's volume to affect when the volume buttons are pressed inside a particular app."><code>AudioChannelManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +</ul> +<span>B</span><ul> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothAdapter" title="The BluetoothAdapter interface of the Web Bluetooth API is used to handle all the operations requested by Bluetooth networks. A Bluetooth adapter is the physical interface which is used to interact with local Bluetooth device."><code>BluetoothAdapter</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothAdapterEvent" title="The BluetoothAdapterEvent interface of the Web Bluetooth API provides access to a BluetoothAdapter object and its address as the parameter of a adapteradded or adapterremoved event handler (see BluetoothManager.onadapteradded and BluetoothManager.onadapterremoved), when fired."><code>BluetoothAdapterEvent</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothAttributeEvent" title="The BluetoothAttributeEvent interface of the Web Bluetooth API provides access to changed attributes and their new values as the parameter of attributechanged event handlers (including BluetoothManager.onattributechanged, BluetoothAdapter.onattributechanged, and BluetoothDevice.onattributechanged), when fired."><code>BluetoothAttributeEvent</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothClassOfDevice" title="The BluetoothClassOfDevice interface of the Web Bluetooth API provides identifying/classification information about a given remote Bluetooth device, available at discovery stage."><code>BluetoothClassOfDevice</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothDevice" title="The BluetoothDevice interface of the Web Bluetooth API provides information regarding a given Bluetooth device."><code>BluetoothDevice</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothDeviceEvent" title="The BluetoothDeviceEvent interface of the Web Bluetooth API provides access to a found/paired device (BluetoothDevice) object or the address or an unpaired device as the parameter of a devicefound, devicepaired or deviceunpaired event handler (see BluetoothDiscoveryHandle.ondevicefound, BluetoothAdapter.ondevicepaired, and BluetoothAdapter.ondeviceunpaired), when fired."><code>BluetoothDeviceEvent</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothDiscoveryHandle" title="The BluetoothDiscoveryHandle interface of the Web Bluetooth API is used to notify the current application about the discovery of a remote bluetooth device."><code>BluetoothDiscoveryHandle</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothGatt" title="The BluetoothGatt interface of the Web Bluetooth API handles initial communications and connections with Gatt services."><code>BluetoothGatt</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothGattCharacteristic" title="The BluetoothGattCharacteristic interface of the Web Bluetooth API represents a GATT service characteristic, which includes characteristic definition, value, properties and configuration info, and a list of descriptors that provide related information."><code>BluetoothGattCharacteristic</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothGattCharacteristicEvent" title="The BluetoothGattCharacteristicEvent interface of the Web Bluetooth API provides access to an updated BluetoothGattCharacteristic object as the parameter of the BluetoothGatt.oncharacteristicchanged, handler, when the characteristicchanged event is fired."><code>BluetoothGattCharacteristicEvent</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothGattDescriptor" title="The BluetoothGattDescriptor interface of the Web Bluetooth API represents a GATT descriptor, which contains related information about a characteristic value."><code>BluetoothGattDescriptor</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothGattServer" title="The BluetoothGattServer interface of the Web Bluetooth API provides Bluetooth GATT server functionality to allow creation of Bluetooth Smart/LE services and characteristics."><code>BluetoothGattServer</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothGattService" title="The BluetoothGattService interface of the Web Bluetooth API represents a service provided by a GATT server, including the service definition, a list of referenced services, and a list of the characteristics of this service."><code>BluetoothGattService</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothLeDeviceEvent" title="The BluetoothLeDeviceEvent interface of the Web Bluetooth API provides access to an LE device BluetoothDevice object and its RSSI value and advertisement record, as the parameter of a devicefound event handler (see BluetoothDiscoveryHandle.ondevicefound), when fired."><code>BluetoothLeDeviceEvent</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothManager" title="The BluetoothManager interface of the Web Bluetooth API allows to access all Bluetooth adapters available on the device. Adapters are the connection interface to connect a Bluetooth device to that device."><code>BluetoothManager</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothPairingEvent" title="The BluetoothPairingEvent interface of the Web Bluetooth API provides access to a device's name and the BluetoothPairingHandle object required for pairing devices as the parameter of pairing-related handlers (for example including BluetoothPairingListener.ondisplaypasskeyreq and BluetoothPairingListener.onenterpincodereq), when fired."><code>BluetoothPairingEvent</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothPairingHandle" title="The BluetoothPairingHandle interface of the Web Bluetooth API contains the functionality required for completing a device pairing operation, including passkeys, and mechanisms to reply to user-entered pin codes and confirm passkeys."><code>BluetoothPairingHandle</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothPairingListener" title="The BluetoothPairingListener interface of the Web Bluetooth API defines event handlers triggered for different pairing operations."><code>BluetoothPairingListener</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +</ul> +<span>C</span><ul> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/CallEvent" title="The CallEvent interface of the Web Telephony API represents events related to telephone calls."><code>CallEvent</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/CameraCapabilities" title="The CameraControl.capabilities property returns a CameraCapabilities object, which describes all the camera's capabilities."><code>CameraCapabilities</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/CameraControl" title="When you use the CameraManager.getCamera() method to get a reference to a camera, you specify a callback function to be invoked on success. That function receives as a parameter a CameraControl object. You can use its methods and properties to manage and make use of the camera."><code>CameraControl</code></a></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/CameraManager" title="The CameraManager interface provides access to any cameras available on the device being used."><code>CameraManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/ContactManager" title="The ContactManager interface is used to access and manage the contact available on the device."><code>ContactManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +</ul> +<span>D</span><ul> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/DOMApplication" title="In the Open Web apps JavaScript API, an App object is a JavaScript object that represents an app that is or could be installed in the user's app repository."><code>DOMApplication</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/DOMCursor" title="A DOMCursor object represents an ongoing operation over a list of results. It is an enhanced DOMRequest that allows to iterate through a list of results asynchronously. Each time its continue() method is called, the DOMCursor tries to reach the next result in the list and calls its result's success or error accordingly."><code>DOMCursor</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/DOMRequest" title="A DOMRequest object represents an ongoing operation. It provides callbacks that are called when the operation completes, as well as a reference to the operation's result. A DOM method that initiates an ongoing operation may return a DOMRequest object that you can use to monitor the progress of that operation."><code>DOMRequest</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/DataStore" title="The DataStore interface of the Data Store API represents a retrieved set of data, and includes standard properties for accessing the store's name, owner, etc., methods for reading, modifying and syncing data, and the onchange event handler for reacting to changes to the data."><code>DataStore</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/DataStoreChangeEvent" title="The DataStoreChangeEvent interface of the Data Store API represents the event related to a record changed in the data store, i.e. this is returned once a change is made and the change event is fired (see DataStore.onchange for the handler)."><code>DataStoreChangeEvent</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/DataStoreCursor" title="The DataStoreCursor interface of the Data Store API represents a cursor that allows apps to iterate through a list of DataStoreTask objects representing the change history of the data store, for use when synchronizing the data."><code>DataStoreCursor</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/DataStoreTask" title="The DataStoreTask interface of the Data Store API represents a record changed in the data store when a DataStoreCursor is used to iterate through the data store's change history."><code>DataStoreTask</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/DeviceStorage" title="The DeviceStorage interface is used to access files on a specific storage area available on the device. A storage area is, in essence, a file system repository even if it hides the reality of the underlying file system."><code>DeviceStorage</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/DeviceStorageChangeEvent" title="The DeviceStorageChangeEvent provides information about any change made to a file inside a given storage area. It extends the Event interface."><code>DeviceStorageChangeEvent</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +</ul> + + +<span>F</span><ul> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/FMRadio" title="The WebFM API provides access to the device FM radio. This interface lets you turn the FM radio on and off and tune it to different stations. It is accessible through the navigator.mozFMRadio property."><code>FMRadio</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +</ul> + + +<span>H</span><ul> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/HTMLMediaElement" title=""><code>HTMLMediaElement</code> (Firefox OS extensions)</a></span></span></li> +</ul> + + + + + + + + +<span>M</span><ul> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MMICall" title="The MMICall interface of the Web Telephony API represents an MMI call, allowing us to receive the result of the call."><code>MMICall</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozActivity" title="The MozActivity interface allows apps to delegate an activity to another app."><code>MozActivity</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozActivityOptions" title="The MozActivityOptions interface allows apps to declare the activity they want to create and also to access information of activities they want to handle."><code>MozActivityOptions</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozActivityRequestHandler" title="The MozActivityRequestHandler interface allows apps that handle activities to access and interact with the request made by a third party app that tries to delegate an activity."><code>MozActivityRequestHandler</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozAlarmsManager" title="The MozAlarmsManager API allows to schedule notifications or applications to be started at a specific time."><code>MozAlarmsManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozContact" title="The MozContact interface is used to describe a single contact in the device's contact database."><code>MozContact</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozContactChangeEvent" title="The MozContactChangeEvent interface provides information about the contact that has changed. It inherits from the Event interface."><code>MozContactChangeEvent</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozIccManager" title="The MozIccManager interface gives access to ICC related functionalities."><code>MozIccManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozMmsEvent" title="The DOM MozMmsEvent represents events related to WebSMS MMS messages."><code>MozMmsEvent</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozMmsMessage" title="The DOM MozMmsMessage object represents an MMS message and has all the information about sender, recipient, body content, attachements, and date of the message itself."><code>MozMmsMessage</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozMobileCFInfo" title="The MozMobileCFInfo interface defines options used to retrieve or define call forwarding settings."><code>MozMobileCFInfo</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozMobileCellInfo" title="The MozMobileCellInfo interface allow to access to cell location information."><code>MozMobileCellInfo</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozMobileConnection" title="This API is used to get information about the current mobile voice and data connection states of the device. It is accessible through navigator.mozMobileConnections, which returns an array of MozMobileConnection objects."><code>MozMobileConnection</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozMobileConnectionInfo" title="The MozMobileConnectionInfo interface allows to access connection information for voice or data. The navigator.mozMobileConnection uses it through its voice and data properties."><code>MozMobileConnectionInfo</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozMobileCCInfo" title="The MozMobileICCInfo interface allow to access access to information stored in the device's ICC card. The navigator.mozMobileConnection uses it through its iccInfo property."><code>MozMobileICCInfo</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozMobileMessageManager" title="Provides support for sending and managing both MMS and SMS messages on a device with WebSMS."><code>MozMobileMessageManager</code></a></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozMobileMessageThread" title="The DOM MozMobileMessageThread object represents a thread of messages."><code>MozMobileMessageThread</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozMobileNetworkInfo" title="The MozMobileNetworkInfo interface allows access to information related to the network carrier. The navigator.mozMobileConnection uses it through its voice.network and data.network properties."><code>MozMobileNetworkInfo</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozNDEFRecord" title="MozNDEFRecord is a data structure that implements the NFC Data Exchange Format (NDEF). It is a standard common format for NFC-related data communication between applications, NFC tags, and devices."><code>MozNDEFRecord</code></a></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozNFC" title="MozNFC is the top level API for operating in NFC Reader/Writer mode, NFC P2P mode and NFC Card Emulation mode."><code>MozNFC</code></a></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozNFCPeer" title="The NFC implementation in Gecko follows the NFC Forum specifications."><code>MozNFCPeer</code></a></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozNFCTag" title="MozNFCTag contains the basic functions needed to read, write, and inspect NDEF-compatible NFC Tags."><code>MozNFCTag</code></a></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozNetworkStats" title="The MozNetworkStats object gives access to statistics about the data usage for a given network."><code>MozNetworkStats</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozNetworkStatsData" title="The MozNetworkStatsData objects represent a chunk of data usage statistics."><code>MozNetworkStatsData</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozNetworkStatsManager" title="The MozNetworkStatsManager interface provides methods and properties to monitor data usage."><code>MozNetworkStatsManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozPowerManager" title="The MozPowerManager interface allows to explicitly control the part of the device that uses power."><code>MozPowerManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozSettingsEvent" title="The MozSettingsEvent represents a settingchange event, providing information about a change to the value of a setting on the device. It extends the DOM Event interface."><code>MozSettingsEvent</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozSmsEvent" title="The DOM MozSmsEvent represents events related to WebSMS text messages."><code>MozSmsEvent</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozSmsFilter" title="The MozSmsFilter interface provides a way to filter out MozSmsMessage or MozMmsMessage objects through the MozMobileMessageManager.getMessages() method."><code>MozSmsFilter</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozSmsManager" title="Provides support for sending and managing SMS messages on a device with WebSMS."><code>MozSmsManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span> <span title="This is an obsolete API and is no longer guaranteed to work."><i class="icon-trash"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozSmsMessage" title="The DOM MozSmsMessage object represents an SMS text message and has all the information about sender, recipient, body text and date of the message itself."><code>MozSmsMessage</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozSmsSegmentInfo" title="The DOM MozSmsSegmentInfo interface provides information about how a string of text will be automatically split into segments. Each segment represents a single SMS of a multi-part SMS message."><code>MozSmsSegmentInfo</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozTimeManager" title="The MozTimeManager interface is used to set the system time on a device."><code>MozTimeManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozVoicemail" title="The MozVoicemail interface allows access to the information regarding the voicemail features available through the RIL of a Firefox OS device."><code>MozVoicemail</code></a></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozVoicemailEvent" title="The MozVoicemailEvent API provides access to the event information when a statuschange event is triggered."><code>MozVoicemailEvent</code></a></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozVoicemailStatus" title="The MozVoicemailStatus API provides access to a voicemail status."><code>MozVoicemailStatus</code></a></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozWakeLock" title="The MozWakeLock interface of the Wake Lock API tracks a wake lock set on any resource set on the device."><code>MozWakeLock</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozWifiConnectionInfoEvent" title="The MozWifiConnectionInfoEvent interface provides developers with information regarding the state of the current Wifi connection."><code>MozWifiConnectionInfoEvent</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozWifiP2pGroupOwner" title="The MozWifiP2pGroupOwner is an interface that represents the group owner of WiFi Direct connection."><code>MozWifiP2pGroupOwner</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozWifiP2pManager" title="The MozWifiP2pManager is an interface that allows to control Wi-Fi connection with other computers using Wi-Fi Direct."><code>MozWifiP2pManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozWifiStatusChangeEvent" title="The MozWifiStatusChangeEvent interface provides developers with information regarding the current status of the Wifi connection."><code>MozWifiStatusChangeEvent</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +</ul> +<span>N</span><ul> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/Navigator" title="The Navigator interface represents the state and the identity of the user agent. It allows scripts to query it and to register themselves to carry on some activities. This page represents the list of properties and methods added to Navigator on Firefox OS devices. For the list of properties and methods available to any Web sites, consult Navigator."><code>Navigator</code> (Firefox OS extensions)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +</ul> + + +<span>P</span><ul> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/PermissionSettings" title="The PermissionSettings interface provides ways to let the user manage all the permissions requested by all apps on a Firefox OS device."><code>PermissionSettings</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +</ul> + + + + +<span>S</span><ul> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/SettingsLock" title="The SettingsLock interface represents a lock on settings. it allows a script to modify settings asynchronously, but in a safe way: ordering is guaranteed and the no other script will modify the settings until the modification are done (the next lock objects will start processing after it has been closed)."><code>SettingsLock</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/SettingsManager" title="Provides access to the device's settings."><code>SettingsManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +</ul> +<span>T</span><ul> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/TCPServerSocket" title="The TCPServerSocket interface provides an API to handle a persistent server that will listen for incoming connections on a given port."><code>TCPServerSocket</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/TCPSocket" title="The TCPSocket interface provides access to a raw TCP socket."><code>TCPSocket</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/Telephony" title="The Telephony interface of the Web Telephony API provides support for dialing, answering, and managing phone calls on a device with telephony support."><code>Telephony</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/TelephonyCall" title="The TelephonyCall interface of the Web Telephony API represents one telephone call, providing information about the call and offering mechanisms for controlling it and detecting changes to its status."><code>TelephonyCall</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/TelephonyCallGroup" title="The TelephonyCallGroup interface of the Web Telephony API represents a multi-person/conference call, providing functions to allow callers to be added and removed from the conference call, hanging up of the entire call, and more."><code>TelephonyCallGroup</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +</ul> +<span>U</span><ul> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/UDPSocket" title=""><code>UDPSocket</code></a></span></span></li> +</ul> + + +<span>W</span><ul> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/WifiManager" title="The WifiManager API provides access to the wifi device capability."><code>WifiManager</code></a></span></span></li> +<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/Window" title="The Window interface represents a window containing a DOM document. This page represents the list of properties and methods added to Window on Firefox OS devices. For the list of properties and methods available to any Web sites, consult Window."><code>Window</code> (Firefox OS extensions)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li> +</ul> + + + + + + + +</div><p></p> diff --git a/files/pt-pt/archive/b2g_os/firefox_os_apps/building_apps_for_firefox_os/index.html b/files/pt-pt/archive/b2g_os/firefox_os_apps/building_apps_for_firefox_os/index.html new file mode 100644 index 0000000000..ddb6c550ff --- /dev/null +++ b/files/pt-pt/archive/b2g_os/firefox_os_apps/building_apps_for_firefox_os/index.html @@ -0,0 +1,361 @@ +--- +title: Building apps for Firefox OS +slug: Archive/B2G_OS/Firefox_OS_apps/Building_apps_for_Firefox_OS +tags: + - Firefox OS + - Installation + - Layout + - Manifest + - NeedsTranslation + - TopicStub + - distribution + - packaging +translation_of: Archive/B2G_OS/Firefox_OS_apps/Building_apps_for_Firefox_OS +--- +<p></p><section class="Quick_links" id="Quick_Links"> + +<ol> + <li class="toggle"> + <details> + <summary>Build and install</summary> + <ol> + <li><strong><a href="/pt-PT/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS">Build and install overview</a></strong></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS/B2G_OS_build_process_summary">B2G OS build process summary</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/B2G_OS_build_prerequisites">Build prerequisites</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Preparing_for_your_first_B2G_build">Preparing for your first build</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building">Building B2G OS</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS/B2G_installer_add-on">B2G installer add-on</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS/Building_for_Flame_on_OS_X">Building B2G OS for Flame on Mac OS X</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Choosing_how_to_run_Gaia_or_B2G">Choosing how to run Gaia or B2G OS</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS/Compatible_Devices">Compatible Devices</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Installing_on_a_mobile_device">Installing B2G OS on a mobile device</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS/B2G_OS_update_packages">Creating and applying B2G OS update packages</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building/FOTA_community_builds">Building and installing FOTA community builds</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS/B2G_Build_Variables_Reference_Sheet">B2G build variables reference sheet</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Porting B2G OS</summary> + <ol> + <li><strong><a href="/pt-PT/docs/Mozilla/B2G_OS/Porting_B2G_OS">Porting overview</a></strong></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Porting_B2G_OS/basics">Porting basics</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Porting_B2G_OS/Porting_on_CyanogenMod">Porting on CyanogenMod</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Developing Gaia</summary> + <ol> + <li><strong><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia">Developing Gaia overview</a></strong></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Running_the_Gaia_codebase">Running the Gaia codebase</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Mulet">Run Gaia on desktop using Mulet</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Understanding_the_Gaia_codebase">Understanding the Gaia codebase</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Making_Gaia_code_changes">Making Gaia code changes</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Testing_Gaia_code_changes">Testing Gaia code changes</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Submitting_a_Gaia_patch">Submitting a Gaia patch</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Build_System_Primer">Gaia build system primer</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Different_ways_to_run_Gaia">Different ways to run Gaia</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/make_options_reference">Make options reference</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Gaia_tools_reference">Gaia tools reference</a></li> + </ol> + </details> + </li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/API">B2G OS APIs</a></li> +</ol> +</section><p></p> + +<div class="summary"> +<p>Firefox OS apps are essentially no different to standard websites or web apps. They are built using standard open web technologies — HTML, CSS, JavaScript, etc. — and can be accessed using a web browser. The main differences lie in their ability to be installed on devices and work offline, access to advanced APIs that allow interaction with device features such as camera, gyroscope and address book, and the existence of a solid developer ecosystem — including a Marketplace for distribution of free and paid apps. Generally, they provide users with an "app experience", while still being based on open, cross platform technologies.</p> +</div> + +<p>Firefox OS apps have a low barrier for entry, especially for existing web developers and mobile developers; they are also a lot more portable across platforms than native equivalents, and not locked into walled gardens. As we've already mentioned Firefox OS apps are based on web technologies — HTML, CSS, and JavaScript — so if you've written a web page you already know the basics. Even if you don't have the basics you'll be able to easily follow this guide, but you may want to check out our list of <a href="/en-US/docs/Web/Tutorials">Beginner's tutorials</a> to learn more about developing with open web technologies.</p> + +<p>This section of MDN provides a detailed reference on web app development topics specific to creating apps that are installable on Firefox OS (and other Firefox-supported platforms like Android), including app manifests, writing install functionality, permissions for using device APIs, and more. It is targeted towards experienced developers that are just looking to create or port an existing app to Firefox OS.</p> + +<div class="note"> +<p><strong>Note</strong>: There is also a very useful screencast series available, if you prefer watching videos — <a href="/en-US/Firefox_OS/Screencast_series:_App_Basics_for_Firefox_OS">App Basics for Firefox OS</a>.</p> +</div> + +<div class="note"> +<p><strong>Note</strong>: If you are a complete beginner to web apps (perhaps you just know a bit of HTML/CSS/JS) and want a very simple guide to building up an app, check out our <a href="/en-US/Apps/Build/Building_apps_for_Firefox_OS/Firefox_OS_app_beginners_tutorial">Firefox OS app beginners tutorial</a>.</p> +</div> + +<h2 id="Firefox_OS">Firefox OS</h2> + +<p><a href="/en-US/Firefox_OS">Firefox OS</a> (also referred to by its codename <strong>Boot to Gecko</strong> — or <strong>B2G</strong>) is Mozilla's open source mobile operating system. It's based on a Linux kernel, which boots into a <a href="/en-US/docs/Mozilla/Gecko">Gecko</a>-based runtime that lets users install and run open web apps<strong>, </strong>Gecko being the rendering engine that the Firefox browser uses to render and display web content.</p> + +<p>Firefox OS comes with <a href="/en-US/Firefox_OS/Platform/Gaia">Gaia</a>, which forms the entire UI layer of Firefox OS and the default suite of apps that handle the fundamental functions of the phone such as settings, calls, SMS, taking and storing photos, etc.</p> + +<p>Mozilla's open web apps are installable on Firefox OS, and other Firefox-supported platforms via Mozilla's web run time technology. For more details, see <a href="/en-US/Marketplace/Options/Open_web_apps_for_android">Open web apps for Android</a>, and <a href="/en-US/Marketplace/Options/Open_web_apps_for_desktop">Open web apps for Desktop</a>.) In future, the technologies should be standardized and adopted across a wider range of platforms.</p> + +<h2 id="Installable_app_workflow">Installable app workflow</h2> + +<p>An installable open web app is very similar to a normal web app or web site — it is built using familiar web technologies like HTML, CSS and JavaScript. The difference is in the additional features the Firefox (OS) platform has available. The following diagram illustrates how those features work together.</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/8493/installable-apps-flowchart-rough.png" style="display: block; height: 358px; margin: 0px auto; width: 520px;"></p> + +<ol> + <li>Start with a fairly standard web application, built using your favourite toolchain.</li> + <li>Identify this as an installable web app by adding a <a href="/en-US/Apps/Build/Manifest">manifest.webapp</a> file to the web app root directory. This defines a number of things about the app such as its name, icons, localization information, and probably most importantly the <a href="/en-US/Apps/Build/App_permissions">permissions the app needs</a> to access device APIs such as <a href="/en-US/docs/WebAPI/Camera">Camera</a>, <a href="/en-US/docs/Web/API/Device_Storage_API">Device Storage</a>, <a href="/en-US/docs/WebAPI/WebBluetooth">Bluetooth</a> and <a href="/en-US/docs/WebAPI/WebSMS">SMS</a>.</li> + <li>Create any functionality you require that makes use of special device APIs.</li> + <li>Create the assets your app needs, such as the <a href="/en-US/Apps/Build/Icon_implementation_for_apps">icons</a>.</li> + <li>Package and distribute your app. This can be done in a variety of ways, from simple self-published <a href="/en-US/Marketplace/Options/Hosted_apps">hosted apps</a> (in which case you'd have to write your own install functionality), to <a href="/en-US/Marketplace/Options/Packaged_apps">packaged apps</a> distributed via the <a href="https://marketplace.firefox.com/">Firefox Marketplace</a> (which handles the install functionality for you.)</li> +</ol> + +<h2 id="Recommendations">Recommendations</h2> + +<p>This section provides recommendations and best practices for creating installable open web apps.</p> + +<h3 id="Web_app_manifest_files">Web app manifest files</h3> + +<p>Your app's <code>manifest.webapp</code> file should be placed in the root of your app directory, and contain a simple JSON structure, as explained in detail in our <a href="/en-US/Apps/Build/Manifest">App Manifest</a> reference. A simple App Manifest JSON looks like so:</p> + +<pre class="brush: json">{ + "name": "My App", + "description": "My elevator pitch goes here", + "launch_path": "/index.html", + "icons": { + "512": "/img/icon-512.png", + "128": "/img/icon-128.png" + }, + "developer": { + "name": "Your name or organization", + "url": "http://your-homepage-here.org" + }, + "default_locale": "en" +}</pre> + +<p>For simple apps, this is all you'll need, but you may also need other fields, as discussed in appropriate places below.</p> + +<h3 id="Functionality_Device_APIs_and_permissions">Functionality, Device APIs, and permissions</h3> + +<p>One of the main strengths of the Firefox OS platform is the provision of <a href="/en-US/docs/WebAPI">new Web APIs</a> to access key device services like the contacts, and hardware like NFC, Bluetooth and SMS. There are many examples of the different new APIs available along with examples throughout our App Center Build section, but in this section we'll give you some specific pointers towards tasks you might want to accomplish with them. Common task categories include:</p> + +<ul> + <li><a href="/en-US/Apps/Build/gather_and_modify_data">Gathering and modifying data</a>: Retrieving data from files, device hardware (e.g. <a href="/en-US/docs/Web/API/Battery_Status_API">battery</a>, <a href="/en-US/docs/Web/API/Proximity_Events">proximity</a>, <a href="/en-US/docs/Web/API/DeviceLightEvent/Using_light_events">light sensor</a>, <a href="/en-US/docs/Web/API/Geolocation/Using_geolocation">GPS</a>) and key services (e.g. <a href="/en-US/docs/WebAPI/Camera">camera</a>, <a href="/en-US/docs/Web/API/Contacts_API">contacts</a>).</li> + <li><a href="/en-US/Apps/Build/User_notifications">Giving the user notifications</a>: With <a href="/en-US/docs/Web/API/Notification/Using_Web_Notifications">system notifications</a>, <a href="/en-US/docs/Web/API/Alarm_API">alarms</a>, and <a href="/en-US/docs/Web/Guide/API/Vibration">vibration</a> APIs.</li> + <li><a href="/en-US/Apps/Build/Offline">Making your app work offline</a>: With APIs like <a href="/en-US/docs/Web/API/IndexedDB_API">IndexedDB</a>, <a href="/en-US/docs/Web/Guide/API/DOM/Storage">localStorage</a>, and the Firefox OS-specific <a href="/en-US/docs/Web/API/Data_Store_API">Data Store</a> API.</li> + <li><a href="/en-US/Apps/Build/User_input_methods">Implementing control mechanisms</a>: Mouse, keyboard, pointer lock, touch inputs, drag and drop, and more.</li> + <li>Push Notifications: invoked using the <a class="external external-icon" href="https://wiki.mozilla.org/WebAPI/SimplePush">SimplePush Web API</a>, these are a way to make applications wake up when a device receives a certain message.</li> + <li><a class="external external-icon" href="https://wiki.mozilla.org/WebAPI/WebActivities">Web Activities</a>: A way to get applications to talk to each other and share capabilities, for example taking pictures or recording video. This often provides easier ways to share capabilities.</li> + <li>Controlling device communication functionality: Such as <a href="/en-US/docs/WebAPI/WebSMS">SMS</a>, <a href="/en-US/docs/WebAPI/WebBluetooth">Bluetooth</a>, Dialer, and <a href="/en-US/docs/Web/API/NFC_API">NFC</a>.</li> +</ul> + +<p>Different APIs have different levels of security, with some APIs being limited in who can access them. This makes sense — it would be really insecure to just let any app have access to say, a device's SMS and dialer functionality. The different levels are as follows:</p> + +<ul> + <li>Common: Common APIs like <a href="/en-US/docs/Web/API/Notification/Using_Web_Notifications">Notification</a>, <a href="/en-US/docs/NavigatorUserMedia.getUserMedia">getUserMedia</a>, <a href="/en-US/docs/Web/API/IndexedDB_API">IndexedDB</a>, and <a href="/en-US/docs/Web/API/Geolocation/Using_geolocation">Geolocation</a> don't need any special privileges to use them. Some of these APIs have an extra level of security anyway, for example a getUserMedia or Geolocation call will result in the user being shown a confirmation box to ask if they are happy with an app accessing their GPS or web cam.</li> + <li>Privileged: Privileged APIs have more security implications than common ones, and as such can only be used by packaged apps that have been verified by the <a href="/en-US/Marketplace">Firefox Marketplace</a> (see below). These include the <a href="/en-US/docs/WebAPI/Camera">Camera</a>, <a href="/en-US/docs/Web/API/Using_the_Browser_API">Browser</a>, <a href="/en-US/docs/Web/API/Contacts_API">Contacts</a> and <a href="/en-US/docs/Web/API/TCP_Socket_API">TCP Socket</a> APIs.</li> + <li>Certified: Certified APIs are generally critical in terms of device security, and therefore only usable in apps pre-installed on the device by Mozilla or the device vendor. These include the <a href="/en-US/docs/WebAPI/WebSMS">SMS</a>, <a href="/en-US/docs/WebAPI/WebBluetooth">Bluetooth</a>, and Dialer APIs.</li> +</ul> + +<p>To request permission to use a restricted API, you have to include a <code>permissions</code> field in your manifest file, and set the type field to privileged in the case of privileged APIs. These fields will look something like this:</p> + +<pre class="brush: json">"type" : "privileged", +"permissions": { + "contacts": { + "description": "Required for autocompletion in the share screen", + "access": "readcreate" + }, + "alarms": { + "description": "Required to schedule notifications" + } +}</pre> + +<div class="note"> +<p><strong>Note</strong>: You can find out exactly what permissions (if any) each API requires by looking at our <a href="/en-US/Apps/Build/App_permissions">App permissions reference</a>; this reference also lists which version of Firefox OS supports each API. To find out what API features are new as of each version of Firefox OS, consult our <a href="/en-US/Firefox_OS/Releases">Firefox OS developer release notes</a>.</p> +</div> + +<p>Using <a href="/en-US/docs/Web/API/Web_Activities">Web activities</a> also requires that you specify their type and required data in the <code>activities</code> field, for example:</p> + +<pre class="brush: json">"activities": { + "share": { + "filters": { + "type": [ "image/png", "image/gif" ] + }, + "href": "foo.html", + "disposition": "window", + "returnValue": true + } +}</pre> + +<p>Lastly, some APIs such as the <a href="/en-US/Apps/Build/User_notifications/Using_Alarms_to_notify_users">Alarm and Notification APIs</a> also require you to specify a <code>messages</code> field, which details what kind of system messages are to be captured by the app, and what page(s) will handle them:</p> + +<pre class="brush: json">"messages": [ + { "alarm": "/index.html" }, + { "notification": "/index.html" } + ]</pre> + +<h3 id="Icons_and_other_design_best_practices">Icons and other design best practices</h3> + +<p>The best practices you would use for creating a Firefox OS app are pretty much the same as those you would use for creating any standard web app, in terms of both coding and design.</p> + +<ol> + <li>You should use <a href="/en-US/Apps/app_layout/responsive_design_building_blocks">responsive design techniques</a> to make sure your app layout will work well on a variety of screen sizes, especially <a href="/en-US/docs/Web/Guide/CSS/Media_queries">media queries</a> and <a href="/en-US/docs/Web/CSS/@viewport">viewport</a>. Because many devices have high resolution screens these days, this should include use of <code>resolution</code> media queries to optimize for different resolutions.</li> + <li>You should take advantage of the building blocks and design patterns we've made available (see our app <a href="/en-US/Apps/Design">Design section</a>.)</li> + <li>You should also make sure to optimize your code as much as possible so it is more likely to work on <a href="/en-US/Apps/Build/Performance/Apps_for_low-memory_Firefox_OS_devices">low-memory devices</a>, which many Firefox OS devices are (see our <a href="/en-US/Apps/Build/Performance">Performance topic</a>).</li> + <li>For the visual design of Firefox apps, you are free to follow your own path, but you could certainly get some useful pointers from our <a href="https://www.mozilla.org/en-US/styleguide/products/firefox-os/">Firefox OS style guide</a>.</li> + <li>For your app icons, you should make sure to include at least a 512x512 icon and a 128x128 icon. Read <a href="/en-US/Apps/Build/Icon_implementation_for_apps">Icon implementation for Apps</a> for more information.</li> +</ol> + +<h3 id="App_packaging_installation_and_distribution">App packaging, installation and distribution</h3> + +<p>When an App is ready to be distributed, you have a few options of how to publish them:</p> + +<ul> + <li>You can <a href="/en-US/Marketplace/Options/Self_publishing">self-publish</a> a <a href="/en-US/Marketplace/Options/Hosted_apps">hosted app</a>. This requires you to simply upload your app to a web server, just like you would for a normal web site, and include the manifest, icons, etc. that the installable app needs. In addition, you need to include some code to install your app on a Firefox OS device or other device where Firefox is present. This will generally take the form of a <a href="/pt-PT/docs/Web/HTML/Element/button" title="The documentation about this has not yet been written; please consider contributing!"><code><button></code></a> element that when pressed invokes the <a href="/pt-PT/docs/Web/API/Apps/install" title="The documentation about this has not yet been written; please consider contributing!"><code>Apps.install</code></a> method, passing it the URL of the manifest file. Note that hosted apps, even when installed, are always run from the web site they are hosted on, so don't confer the ability to run offline, unless you provide this ability using a technology like <a href="/en-US/docs/Web/HTML/Using_the_application_cache">AppCache</a> (or soon, <a href="/en-US/docs/Web/API/ServiceWorker_API/Using_Service_Workers">Service Workers</a>.)</li> + <li>You can <a href="/en-US/Marketplace/Options/Self_publishing">self-publish</a> a <a href="/en-US/Marketplace/Options/Packaged_apps">packaged app</a>. This requires you to zip your app up, and upload your zip to a web server, after making sure you've included the manifest, icons, etc. that the installable app needs. In addition, you need to include a <a href="https://developer.mozilla.org/en-US/Marketplace/Options/Self_publishing#Mini-manifest_fields">mini-manifest</a> file in the same directory as the zip to reference the app, and some code to install your app on a Firefox OS device or other device where Firefox is present. This will generally take the form of a <a href="/pt-PT/docs/Web/HTML/Element/button" title="The documentation about this has not yet been written; please consider contributing!"><code><button></code></a> element that when pressed invokes the <a href="/pt-PT/docs/Web/API/Apps/installPackage" title="The documentation about this has not yet been written; please consider contributing!"><code>Apps.installPackage</code></a> method, passing it the URL of the mini-manifest file.</li> + <li>You can publish a packaged app on the Firefox Marketplace. The process for doing this is <a href="/en-US/Marketplace/Publishing/Submit/Overview">well documented over at our Marketplace zone</a>.</li> +</ul> + +<div class="note"> +<p><strong>Note</strong>: Self-published apps don't have the ability to access privileged APIs, for security reasons.</p> +</div> + +<div class="note"> +<p><strong>Note</strong>: Another common cause of failure in app installation is incorrect paths in manifests and install code. These paths should be relative to the origin of the server location. So for example, if your example's root is at <code>http://www.mysite.com/myapp/</code>, and your icon is at <code>http://www.mysite.com/myapp/manifest.webapp</code>, the install path would be <code>/myapp/manifest.webapp</code>, not <code>/manifest.webapp</code>.</p> +</div> + +<div class="note"> +<p><strong>Note</strong>: Installable open web apps used to have a "single app per origin" security policy, but this was lifted as of Firefox 34/Firefox OS 2.1 (read <a href="https://developer.mozilla.org/en-US/Apps/Build/installable_apps_for_Firefox_OS/App_manifest_FAQ#Can_I_have_more_than_one_app_at_my_origin.3F">this FAQ entry</a> for more information). If you still need to support older versions, consider hosting your apps at separate origins; one strategy is to <a href="/en-US/Marketplace/Publishing/Adding_a_subdomain">create different subdomains</a> for your apps.</p> +</div> + +<h3 id="Multi-locale_apps">Multi-locale apps</h3> + +<p>You can create multi-locale apps quite easily. This is done by:</p> + +<ol> + <li>Adding special <code>data-l10n-id</code> attributes to each HTML element that requires localization, the value of which should be an identifier for that string. For example:</li> + <li><code><h1 data-l10n-id="app-title">My app</h1></code>.</li> + <li>Including the <a href="https://github.com/fabi1cazenave/webL10n/blob/master/l10n.js">l10n.js</a> library in your page using a regular <a href="/pt-PT/docs/Web/HTML/Element/script" title="The documentation about this has not yet been written; please consider contributing!"><code><script></code></a> element.</li> + <li>Creating a <code>locales</code> folder inside your app directory containing a folder for each separate locale, then placing an <code>app.properties</code> file inside each one containing that language's translations, each one on a new line. For example <code>app-title = Mon application</code> for French.</li> + <li>Creating a <code>locales.ini</code> file inside the locales folder, which specifies the default locale and the path to each <code>app.properties</code> file. This will look like so: + <pre>@import url(en/app.properties) + +[es] +@import url(fr/app.properties)</pre> + </li> + <li>Referencing <code>locales.ini</code> from your HTML file using a <a href="/pt-PT/docs/Web/HTML/Element/link" title="The documentation about this has not yet been written; please consider contributing!"><code><link></code></a> element, like so: + <pre class="brush: html"><link rel="resource" type="application/l10n" href="locales/locales.ini" /></pre> + </li> + <li>Updating your manifest file to include a default locale and locales field containing information about your supported locales: + <pre class="brush: json">"default_locale": "en", +"locales": { + "fr": { + "name" : "Mon application", + "description" : "Mon application description" + } +}</pre> + </li> +</ol> + +<p>For more details, begin with our <a href="/en-US/Apps/Build/Localization/Getting_started_with_app_localization">Getting started with app localization</a> article, then check out the rest of our articles about <a href="/en-US/Apps/Build/Localization">app localization</a>.</p> + +<h3 id="Debugging_apps">Debugging apps</h3> + +<p>Mozilla provides a number of tools to help you test Firefox OS apps.</p> + +<h4 id="Testing_on_Firefox_desktop">Testing on Firefox desktop</h4> + +<p>The quickest way to test your app's basic functionality is to simply load it in Firefox desktop (open the <code>index.html</code> file in the browser) — this supports most of the features you'll be using to develop your app (with the exception of some of the device APIs.) From here you can use the standard <a href="/en-US/docs/Tools/Browser_Toolbox">Firefox Toolbox</a> to debug your code, and the <a href="/en-US/docs/Tools/Responsive_Design_View">Responsive Design View</a> to test responsive/mobile layouts.</p> + +<h4 id="Testing_in_the_Firefox_OS_simulator">Testing in the Firefox OS simulator</h4> + +<p>You can also test the app in a Firefox OS simulator via our <a href="/en-US/docs/Tools/WebIDE">WebIDE</a> tool. This will give you a more realistic idea of how it will look on a real device.</p> + +<div class="note"> +<p><strong>Note</strong>: Our new <a href="/en-US/docs/Tools/WebIDE">WebIDE</a> tool is currently only available in Firefox Nightly, but will be rolled out across all versions soon. It does everything App Manager does and more, including in-app code editing, creation of new apps, and tools like the <a href="/en-US/docs/Tools/WebIDE/Monitor">Monitor</a>, which enables to track performance across an app's lifespan.</p> +</div> + +<h4 id="Testing_on_a_Firefox_OS_device">Testing on a Firefox OS device</h4> + +<p>Some device APIs — such as the vibration API — can't be tested successfully on a simulator. To fully test this you'll need to get hold of a real Firefox OS device. If you've got one, you can connect it to your computer and install apps contained on your local drive straight onto it via the App Manager/WebIDE.</p> + +<h4 id="Logcat">Logcat</h4> + +<p>The Android <a href="/en-US/Firefox_OS/Debugging/On-device_console_logging#Using_logcat">adb logcat tool</a> is very useful for getting debugging output from a Firefox OS device, if you are comfortable with command line tools. For example, you can get info on dying apps using the following:</p> + +<pre class="brush: bash">adb logcat GeckoConsole:* *:F | grep -vE "parsing value|Unknown property|declaration|invalid source| but found |pseudo-"</pre> + +<h3 id="Supporting_cross-Firefox_OS_versions">Supporting cross-Firefox OS versions</h3> + +<p></p><p>Note that when developing apps for Firefox OS, you need to bear in mind what platform versions will be available on the devices your customers will have (see our <a href="/en-US/Firefox_OS/Developer_phone_guide/Phone_specs#Firefox_OS_phones_available">available phones table</a> for a list.) Remember that it is not as simple to update phone platform software as it is desktop software — users tend to be at the mercy of the network providers. You therefore need to develop apps to support these versions. As an example, multiline Flexbox doesn't work on Firefox OS versions below 1.3, so you may need to use a simpler layout method or provide a fallback for older versions.</p> + +<p>This issue should go away soon, as more consumer Firefox OS devices appear, equipped with newer versions of Firefox OS out of the box.</p> + +<div class="warning"> +<p>The current baseline platform we recommended developing for is <a href="/en-US/Firefox_OS/Releases/1.1">Firefox OS 1.1</a>.</p> +</div> + +<div class="note"> +<p><strong>Note</strong>: MDN's <a href="/en-US/docs/Web">web platform reference pages</a> include browser/platform support information, plus you can find support information for more App-specific technologies on our <a href="/en-US/Apps/Reference">Apps API Reference</a>.</p> +</div><p></p> + +<h2 id="Examples">Examples</h2> + +<p>You can find many examples throughout the App Center <a href="/en-US/Apps/Build">Build section</a>; there are also some examples in our <a href="/en-US/Apps/Reference_apps">Reference apps</a> section.</p> + +<h2 id="Tutorials">Tutorials</h2> + +<h3 id="Installable_app_basics">Installable app basics</h3> + +<dl> + <dt><a href="/en-US/Apps/Build/Building_apps_for_Firefox_OS/Firefox_OS_app_beginners_tutorial">Firefox OS app beginners tutorial</a></dt> + <dd>A complete beginner's guide to creating a Firefox OS app.</dd> + <dt><a href="/en-US/Marketplace/Options/Packaged_apps">Packaged apps</a></dt> + <dd>A packaged app is an Open Web App that has all of its resources contained in a zip file, instead of having its resources on a Web server. In here you'll learn all you need to know about packaged apps.</dd> + <dt><a href="/en-US/Marketplace/Options/Hosted_apps">Hosted apps</a></dt> + <dd>A hosted app is an Open Web App that has all of its resources (HTML, CSS, JavaScript, app manifest and so on) stored on a Web server. This article will tell you all you need to know about hosted apps.</dd> + <dt><a href="/en-US/Marketplace/Options/Packaged_or_hosted_">Packaged or hosted?</a></dt> + <dd>Should you make your app hosted or packaged? This article will help you decide.</dd> + <dt><a href="/en-US/Marketplace/Options/Self_publishing">Self-publishing apps</a></dt> + <dd>This guide explains how to write the code that controls publishing apps, should you wish to write it yourself rather than use the <a href="https://marketplace.firefox.com/">Firefox Marketplace</a>.</dd> +</dl> + +<h3 id="Advanced_topics">Advanced topics</h3> + +<dl> + <dt><a href="/en-US/Apps/Build/Icon_implementation_for_apps#Firefox_OS">Icon implementation for apps</a></dt> + <dd>Implementation specifics for implementing Firefox app icons, including different sizes needed.</dd> + <dt><a href="/en-US/docs/Web/Apps/Updating_apps" title="/en-US/docs/Web/Apps/Updating_apps">Updating apps</a></dt> + <dd>How app updates are handled.</dd> +</dl> + +<div class="section"> +<h2 id="Reference">Reference</h2> + +<dl> + <dt><a href="/en-US/Apps/Reference/Firefox_OS_app_tools">Firefox OS app tools</a></dt> + <dd>This page provides a list of useful tools, libraries and examples that are useful for Firefox OS app developers, whether you want an code template to copy, or need help with adding a specific feature to your Firefox OS app.</dd> + <dt><a href="/en-US/docs/Web/Apps/Build/Manifest" title="/en-US/docs/Web/Apps/Manifest">App manifest</a></dt> + <dd>A detailed guide to Open Web App manifest files, and the different options they can contain.</dd> + <dt><a href="/en-US/docs/Web/Apps/App_permissions">App permissions</a></dt> + <dd>Access to device APIs is key to creating many useful apps. Here is what's available and how to access them. + <div class="note"> + <p><strong>Note</strong>: you can use the <a href="https://github.com/mozilla-b2g/fxos-appgen">Firefox OS App Generator</a> to automatically generate and install FxOS apps with particular permissions, message-listeners, types, etc.</p> + </div> + </dd> + <dt><a href="/en-US/Firefox_OS/API_support_table">Firefox OS API support table</a></dt> + <dd>A list of the different APIs available to Firefox OS, and what support is available for them.</dd> + <dt><a href="/en-US/docs/Web/Apps/JavaScript_API" title="/en-US/docs/Web/Apps/JavaScript_API">App installation and management APIs</a></dt> + <dd>A reference for the installation and management APIs that control installation and other functions of installable Open Web Apps.</dd> + <dt><a href="/en-US/docs/Web/Apps/Platform-specific_details">Platform-specific details of app installation</a></dt> + <dd>There are some differences in how apps are installed across the various platforms that support Open Web Apps; this article will help you to understand them.</dd> + <dt><a href="/en-US/Apps/Build/installable_apps_for_Firefox_OS/CSP">CSP for open web apps</a></dt> + <dd>Unlike traditional web sites, privileged and certified apps enforce a CSP (content security policy) by default. This may cause quite a bit of existing code to break while porting and cause a significant amount of confusion if developers are unaware that the CSP exists. This article explains what the restrictions imposed by the open web app CSP are.</dd> +</dl> + +<h2 id="FAQ">FAQ</h2> + +<dl> + <dt><a href="/en-US/Apps/Build/installable_apps/App_manifest_FAQ" title="/en-US/docs/Web/Apps/FAQs/About_app_manifests">App manifests FAQ</a></dt> + <dd>Manifest frequently asked questions.</dd> +</dl> +</div> + +<dl> + <dt> </dt> +</dl> diff --git a/files/pt-pt/archive/b2g_os/firefox_os_apps/building_apps_for_firefox_os/manifesto/index.html b/files/pt-pt/archive/b2g_os/firefox_os_apps/building_apps_for_firefox_os/manifesto/index.html new file mode 100644 index 0000000000..fc1eb924f0 --- /dev/null +++ b/files/pt-pt/archive/b2g_os/firefox_os_apps/building_apps_for_firefox_os/manifesto/index.html @@ -0,0 +1,926 @@ +--- +title: Manisfesto da Aplicação +slug: Archive/B2G_OS/Firefox_OS_apps/Building_apps_for_Firefox_OS/Manifesto +tags: + - Aplicações + - B2G + - Firefox OS + - Manifesto + - Marketplace + - Movel + - Não Padrão + - OS +translation_of: Archive/B2G_OS/Firefox_OS_apps/Building_apps_for_Firefox_OS/Manifest +--- +<p>{{ non-standard_header() }}</p> + +<div class="warning"> +<p><strong>Importante</strong>: este documento refere-se ao formato de manifesto do sistema operativo Firefox, e não às <a href="https://developer.mozilla.org/en-US/docs/Web/Manifest">especificações do manifesto 3C</a>, concebido para aplicações da Web progressivas de vários navegadores. </p> +</div> + +<div class="summary"> +<p>The Firefox OS app manifest provides information about an app (such as name, author, icon, and description) in a simple document usable by both users and app stores. Most importantly, it contains a list of Web APIs that your app needs. This allows users to make informed decisions about apps before installing them. It is one of the key things that distinguishes a Firefox OS App from a website.</p> +</div> + +<div class="note"> +<p><strong>Nota</strong>: Browsers that handle manifests and allow installation of Firefox OS apps incorporate a <a href="/en-US/Apps/Build/Architecture#Web_runtime">Web runtime</a>. This includes <a href="/en-US/Firefox_OS">Firefox OS</a>, and newer versions of <a href="/en-US/Marketplace/Options/Open_web_apps_for_android">Firefox for Android</a> and <a href="/en-US/Marketplace/Options/Open_web_apps_for_desktop">Firefox for desktop</a>.</p> +</div> + +<div class="note"> +<p><strong>Nota</strong>: You can find answers to common questions about app manifests in our <a href="/en-US/Apps/Build/installable_apps_for_Firefox_OS/App_manifest_FAQ">App Manifest FAQ</a>.</p> +</div> + +<h2 class="h3first" id="Criar_um_manisfesto_da_aplicação">Criar um manisfesto da aplicação</h2> + +<p>This section details the critical details you need to create and use an app manifest.</p> + +<h3 class="h3first" id="Convenções_nome_de_ficheiro_localização_e_formato">Convenções: nome de ficheiro, localização, e formato</h3> + +<ul> + <li>Name: <code>manifest.webapp</code> (you must use the <code>.webapp</code> extension)</li> + <li>Location: your app's root directory</li> + <li>Format: <a href="/en-US/docs/Glossary/JSON">JSON</a> (must be valid JSON)</li> +</ul> + +<h3 id="Manipulação_do_caminho">Manipulação do caminho</h3> + +<ul> + <li>Internal paths for manifests, icons, etc. must be absolute from the app's origin, not the root of the app. For example, if your manifest is at <code>http://www.mysite.com/myapp/manifest.webapp</code>, your install path will be <code>/myapp/manifest.webapp</code>, not <code>/manifest.webapp</code>.</li> + <li>Internal paths also must be served from the <a href="/en-US/Apps/Build/installable_apps_for_Firefox_OS/App_manifest_FAQ#What_is_an_origin.3F">same origin</a> as the app.</li> + <li>External paths must be fully qualified. For example, if you have a <a href="/en-US/Marketplace/Options/Packaged_apps">packaged app</a> on the <a href="/en-US/Marketplace">Firefox Marketplace</a> but host the icon on your own server, the icon path would be <code>http://mywebapp/images/myicon.png</code>.</li> +</ul> + +<h3 id="Requisitos_para_submeter_para_Firefox_Marketplace">Requisitos para submeter para Firefox Marketplace</h3> + +<p>If you want to publish your app to the <a href="/en-US/Marketplace">Firefox Marketplace</a>, your app manifest must contain the following fields:</p> + +<ul> + <li><code>name</code></li> + <li><code>description</code></li> + <li><code>launch_path</code> (for Packaged Apps)</li> + <li><code>icons</code> (1 icon of 128×128 required, 1 icon of 512×512 recommended)</li> + <li><code>developer</code></li> + <li><code>default_locale</code> (if <code>locales</code> is defined)</li> + <li><code>type</code> (for privileged and internal (certified) apps)</li> +</ul> + +<h3 id="Requisitos_para_as_Aplicações_da_Web_Abertas">Requisitos para as Aplicações da Web Abertas</h3> + +<p>If you're building a generic hosted app that will not be published in the Firefox Marketplace, your app manifest must contain the following fields below:</p> + +<ul> + <li><code>name</code></li> + <li><code>description</code></li> + <li><code>icons</code> (1 icon of 128×128 required, 1 icon of 512×512 recommended)</li> +</ul> + +<div class="note"> +<p><strong>Note</strong>: To self-publish an app from a page that you control, you have to provide a mechanism for users to trigger installation of the app. This is usually done by calling <a href="/en-US/docs/Web/API/Apps.install"><code>navigator.Apps.install()</code></a> when a button is clicked in the case of a hosted app, or <a href="/en-US/docs/Web/API/Apps.installPackage"><code>navigator.Apps.installPackage()</code></a> in the case of a packaged app.</p> +</div> + +<h3 id="Validação_do_manifesto_da_aplicação">Validação do manifesto da aplicação</h3> + +<p>If you're submitting to the Firefox Marketplace, your app manifest must pass Marketplace Validation.</p> + +<p>Try our <a href="/en-US/Apps/Build/App_Validator">App Validator</a>, which will help you identify any errors. Or <a href="http://firefox-marketplace-api.readthedocs.org/en/latest/">you can use this API</a> to validate your app manifest.</p> + +<h3 id="Atualização_de_manifestos">Atualização de manifestos</h3> + +<p>For information on updating apps, see <a href="/en-US/Marketplace/Publishing/Updating_apps">Updating apps</a>.</p> + +<h2 id="Exemplo_de_manifesto">Exemplo de manifesto</h2> + +<p>The following is a minimal manifest. You can copy it into a text file and replace the values with your own information.</p> + +<pre class="brush: json">{ + "name": "My App", + "description": "My elevator pitch goes here", + "launch_path": "/index.html", + "icons": { + "512": "/img/icon-512.png", + "128": "/img/icon-128.png" + }, + "developer": { + "name": "Your name or organization", + "url": "http://your-homepage-here.org" + }, + "default_locale": "en", + <code class="language-json"><span class="key token">"chrome":</span> <span class="punctuation token">{</span> <span class="key token">"navigation":</span> <span class="keyword token">true</span> <span class="punctuation token">}</span></code> +}</pre> + +<h2 id="Campos_do_manifesto_da_aplicação_requeridos">Campos do manifesto da aplicação requeridos</h2> + +<p>The fields in your manifest can be in any order. Fields in the manifest other than the ones listed below will be ignored.</p> + +<h3 class="h3first" id="name"><code>name</code></h3> + +<div class="note"> +<p class="red"><strong>Nota</strong>: Required for all app manifests.</p> +</div> + +<p>A human-readable name for the app. Maximum length is 128 characters.</p> + +<p>If you change the name of your app after distribution, the name will not be updated for any existing installations.</p> + +<pre class="brush: json">"name": "The Open Web!"</pre> + +<h3 id="description"><code>description</code></h3> + +<div class="note"> +<p class="red"><strong>Nota</strong>: Required for all app manifests.</p> +</div> + +<p>A human-readable description for the app. Maximum length is 1024 characters.</p> + +<pre class="brush: json">"description": "Exciting Open Web App!"</pre> + +<h3 id="launch_path"><code>launch_path</code></h3> + +<div class="note"> +<p class="red"><strong>Nota</strong>: Required for all app manifests.</p> +</div> + +<p>The path within the app's origin that is loaded when the app starts.</p> + +<p>Specifies the starting point of the content local to the zip file containing the packaged app. For example, if the <code>launch_path</code> is <code>/mywebapp/index.html</code>, the app will open the file at <code>/mywebapp/index.html</code> when the app is launched.</p> + +<div class="alert alert-info"><strong>Dicas:</strong> + +<ul> + <li>If your app is stored in the root of a Web server, for example <code>mywebapp.github.com/</code>, then <code>launch_path</code> must be set to <code>/</code>.</li> + <li>If your app is stored in a subdirectory, for example <code>mymarket.github.com/mywebapp/</code>, then <code>launch_path</code> must be set to <code>/mywebapp/</code>.</li> +</ul> +</div> + +<pre class="brush: json">"launch_path": "/index.html"</pre> + +<h3 id="icons"><code>icons</code></h3> + +<div class="note"> +<p class="red"><strong>Nota</strong>: 1 icon sized 128×128 required for all app manifests. 1 icon sized 512×512 recommended for all app manifests.</p> +</div> + +<p>A map of icon sizes to URIs of the icons.</p> + +<p>Remember that internal paths to icons must be absolute from the app's origin, while paths to externally hosted icons must be fully qualified.</p> + +<p>Icons must be square, and in <code>.png</code> format. Icons should not have solid backgrounds that extend to all four corners of the icon.</p> + +<div class="warning"> +<div class="alert alert-warning"><strong>Cuidado:</strong> if you're submitting to the Firefox Marketplace, your icons must also follow the <a href="https://www.mozilla.org/en-US/styleguide/products/firefox-os/icons/">Firefox Marketplace app icon guidelines</a>.</div> +</div> + +<h4 id="Required_icon_sizes">Required icon sizes</h4> + +<dl> + <dt>128×128</dt> + <dd>For display on the Firefox Marketplace and devices.</dd> +</dl> + +<h4 id="Recommended_icon_sizes">Recommended icon sizes</h4> + +<dl> + <dt>512×512</dt> + <dd>From Firefox 2.0 onwards, larger icons are needed for crisp display on all the different possible combinations of Phone and tablet screen sizes, screen resolutions, and 3 and 4-column layouts. We accept a 512×512 icon, which is then scaled for all the different uses across devices. This size is also useful for display on other platforms apps can be installed across, such as Android.</dd> +</dl> + +<h4 id="Other_icon_sizes_that_might_be_useful">Other icon sizes that might be useful</h4> + +<dl> + <dt>60×60</dt> + <dd>For the exact on-device icon size on older Firefox OS versions.</dd> + <dt>16×16, 32×32, 48×48, 64×64, 90×90, 128×128 and 256×256</dt> + <dd>These icon sizes are used on various other platforms your app can be installed on, such as Windows, OS X and Android.</dd> +</dl> + +<pre class="brush: json">"icons": { + "128": "/img/icon-1.png", + "512": "/img/icon-2.jpg" +}</pre> + +<div class="note"> +<p><strong>Nota</strong>: For a thorough explanation of how we decided on the 512×512 icon size, read our <a href="/en-US/Apps/Build/Icon_implementation_for_apps#Firefox_OS">Icon implementation guide</a>.</p> +</div> + +<h3 id="developer"><code>developer</code></h3> + +<div class="note"> +<p><strong>Nota</strong>: Only the <code>name</code> is required for all app manifests.</p> +</div> + +<ul> + <li><code>name</code>: The name of the developer. <span class="red">Required for all app manifests.</span></li> + <li><code>url</code>: The URL of a website containing information about the app's developer. Optional.</li> +</ul> + +<pre class="brush: json">"developer": { + "name": "The Open Web!", + "url": "http://www.mywebapp.com" +}</pre> + +<h3 id="default_locale"><code>default_locale</code></h3> + +<div class="note"> +<p class="red"><strong>Nota</strong>: If {{anch("locales")}} is defined, <code>default_locale</code> is required for your app manifest.</p> +</div> + +<p>A language tag (<a href="http://www.ietf.org/rfc/rfc4646.txt">RFC 4646</a>) that defines the language you used in the field values of your app manifest.</p> + +<p>Although <code>default_locale</code> is not required for apps that don't have locales, it is recommended that you include it. If you do not define a <code>default_locale</code>, the Firefox Marketplace will guess your app's language.</p> + +<p>For example, if your app uses English, it's <code>default_locale</code> would be:</p> + +<pre class="brush: json">"default_locale": "en"</pre> + +<h3 id="type"><code>type</code></h3> + +<div class="note"> +<p class="red"><strong>Nota</strong>: If your app is privileged or internal (certified), <code>type</code> is required for your app manifest.</p> +</div> + +<p>The app's type, which defines its level of access to sensitive device <a href="/en-US/docs/WebAPI">WebAPIs</a>. If you do not define <code>type</code>, it will default to <code>web</code> as the <code>type</code>.</p> + +<ul> + <li><code>web</code>: A regular hosted app. This type has the least access to WebAPIs.</li> + <li><code>privileged</code>: An authenticated app that has been approved by an app store such as the Firefox Marketplace. This type has greater access to WebAPIs than a web app.</li> + <li><code>certified</code>: An authenticated app that is intended for critical system functions like the default dialer or the system settings app on a smartphone. It is not intended for 3rd party apps in an app store. This type of app has the highest level of access to WebAPIs.</li> +</ul> + +<div class="note"> +<p><strong>Nota</strong>: For more information on app types, see <a href="/en-US/Marketplace/Options/Packaged_apps">Packaged apps</a>.</p> +</div> + +<pre class="brush: json">"type": "certified"</pre> + +<h2 id="Optional_app_manifest_fields">Optional app manifest fields</h2> + +<p>The following fields are optional.</p> + +<h3 class="h3first" id="activities"><code>activities</code></h3> + +<p>A set of Web Activities that your app supports (<a href="/en-US/docs/Web/API/Web_Activities#Starting_an_activity">full list</a>). It's structured like so:</p> + +<ul> + <li>Each property in this field is an activity</li> + <li>Activity names are free-form text</li> + <li>Each activity is represented by an object</li> +</ul> + +<p>For example, here's an entry with one activity named <code>share</code>.</p> + +<pre class="brush: json">"activities": { + "share": { + "filters": { + "type": [ "image/png", "image/gif" ] + }, + "href": "foo.html", + "disposition": "window", + "returnValue": true + } +}</pre> + +<p>The object for the <code>share</code> activity in the example has <code>filters</code>, <code>href</code>, <code>disposition</code> and <code>returnValue</code> properties. These are described in <a href="/en-US/docs/WebAPI/Web_Activities#Activity_handler_description">Activity handler description</a>.</p> + +<h3 id="appcache_path"><code>appcache_path</code></h3> + +<p>The absolute path to the application cache (<a href="/en-US/docs/HTML/Using_the_application_cache">AppCache</a>) manifest. When a Firefox OS app is installed, the AppCache manifest will be fetched and parsed, and its static assets under the <code>CACHE</code> header will be cached.</p> + +<div class="note"> +<p><strong>Nota</strong>: Packaged apps cache assets on the device when installed. You don't need to set an AppCache for packaged apps.</p> +</div> + +<div class="note"> +<p><strong>Nota</strong>: AppCache is a flawed technology, and will soon be replaced by the much more effective <a href="/en-US/docs/Web/API/ServiceWorker_API">Service Workers</a>.</p> +</div> + +<pre class="brush: json">"appcache_path": "/cache.manifest"</pre> + +<h3 id="chrome"><code>chrome</code></h3> + +<p>A set of navigation controls on the bottom of the screen that consists of Back, Forward, Reload and Favorite.</p> + +<p><img alt="chrome navigation" src="https://mdn.mozillademos.org/files/5843/nav-both2.png" style="height: 98px; width: 726px;"></p> + +<div class="note"> +<p><strong>Note</strong>: We'd recommend designing a back button for your app interface, instead of relying on this option.</p> +</div> + +<pre class="brush: json">"chrome": { "navigation": true }</pre> + +<h3 id="csp"><code>csp</code></h3> + +<div class="note"> +<p><strong>Note</strong>: Optional; applies to all packaged apps installed on Firefox OS, Firefox Desktop or Firefox for Android.</p> +</div> + +<p>This field can be used to define a Content Security Policy (CSP) that is applied to all pages in the app. The policies you can add to a CSP are listed in <a href="/en-US/docs/Web/Security/CSP/CSP_policy_directives">CSP policy directives</a>, and for an app you'll need to include them in a line like so:</p> + +<pre class="brush: json">"csp" : "default-src *; script-src 'self'; object-src 'none'; style-src 'self' 'unsafe-inline'"</pre> + +<p>The default policies applied to Firefox OS privileged and internal/certified apps are as follows:</p> + +<dl> + <dt>Privileged CSP</dt> + <dd> + <pre class="language-html"><code class="language-html">default-src *; script-src 'self'; object-src 'none'; style-src 'self' 'unsafe-inline'</code></pre> + </dd> + <dt>Certified/Internal CSP</dt> + <dd> + <pre class="language-html"><code class="language-html">default-src *; script-src 'self'; object-src 'none'; style-src 'self'</code></pre> + </dd> +</dl> + +<p>These defaults can’t be overridden, only added to, i.e. the CSP policy in the manifest can only make the actual CSP applied more restrictive in the case of privileged/internal apps.</p> + +<div class="note"> +<p><strong>Note</strong>: See the <a href="/en-US/Apps/CSP">Apps CSP page</a> for more details on the CSP restrictions particular to apps.</p> +</div> + +<h3 id="datastores-owned"><code>datastores-owned</code></h3> + +<div class="note"> +<p><strong>Note</strong>: Applies only to internal/certified apps to be installed on Firefox OS.</p> +</div> + +<p>When making use of the <a href="/en-US/docs/Web/API/Data_Store_API">Data Store API</a>, the app that owns the data store MUST include the <code>datastores-owned</code> field in its manifest to claim ownership, for example:</p> + +<pre class="brush: json language-json"><code class="language-json"><span class="key token">"datastores-owned":</span> <span class="punctuation token">{</span> + <span class="key token">"myData":</span> <span class="punctuation token">{</span> + <span class="key token">"access":</span> <span class="keyword token">"readwrite"</span><span class="punctuation token">,</span> + <span class="key token">"description":</span> <span class="string token">"my data store"</span> + <span class="punctuation token">}</span> +<span class="punctuation token">}</span></code></pre> + +<p>You can include multiple properties to represent different data stores, and each one can use an <code>access</code> of <code>readonly</code>/<code>readwrite</code> to specify whether the data store can be read/modified by other applications. A <code>description</code> is also included to describe the purpose of the data store.</p> + +<h3 id="datastores-access"><code>datastores-access</code></h3> + +<div class="note"> +<p><strong>Note</strong>: Applies only to internal/certified apps to be installed on Firefox OS.</p> +</div> + +<p>When making use of the <a href="/en-US/docs/Web/API/Data_Store_API">Data Store API</a>, any non-owner app that wants access to the the data store MUST include the <code>datastores-access</code> field in its manifest, for example:</p> + +<pre class="brush: json language-json"><code class="language-json"><span class="key token">"datastores-access":</span> <span class="punctuation token">{</span> + <span class="key token">"myData":</span> <span class="punctuation token">{</span> + <span class="key token">"access":</span> <span class="string token">"readwrite"</span><span class="punctuation token">,</span> + <span class="key token">"description":</span> <span class="string token">"Read and modify my data store"</span> + <span class="punctuation token">}</span> +<span class="punctuation token">}</span></code></pre> + +<p>Without this field being specified, the default behaviour is "no access". Again, multiple properties can be included if you want to access multiple data stores, and an <code>access</code> of <code>readonly</code> or <code>readwrite</code> can be set to declare what access type is needed by the app.</p> + +<h3 id="fullscreen"><code>fullscreen</code></h3> + +<p>A control that tells the runtime whether or not to launch the app in full-screen mode.</p> + +<p>Since most apps run in fullscreen, we recommend setting this to <code>true</code>.</p> + +<pre class="brush: json">"fullscreen": "true"</pre> + +<h3 id="inputs"><code>inputs</code></h3> + +<p>Specifies supported layouts for the keyboard app. Each layout is described using a key-value pair, where the key represents the layout name (which will be displayed in the Settings app), and the value describes detailed information about the layout, including launch path of the layout and supported input types.</p> + +<p>The allowed values in the <code>types</code> field is a subset of the {{htmlelement("input")}} element {{htmlattrxref("type","input")}} attribute values. Currently allowed values are <code>text</code>, <code>search</code>, <code>tel</code>, <code>number</code>, <code>url</code>, <code>email</code>.</p> + +<p>An example follows:</p> + +<pre>"inputs": { + "en": { + "launch_path": "/index.html#en", + "name": "English", + "description": "English layout", + "types": ["url", "text"], + "locales": { + "en-US": { + "name": "English", + "description": "English layout" + }, + "zh-TW": { + "name": "英文", + "description": "英文鍵盤" + } + } + }, + "en-Dvorak": { + "launch_path": "/index.html#en-Dvorak", + "name": "English (Dvorak)", + "description": "Dvorak layout", + "types": ["url", "text"] + }, + "es": { + "launch_path": "/index.html#es", + "name": "Spanish", + "description": "Spanish layout", + "types": ["url", "text"] + }, + + ... + +}</pre> + +<h3 id="installs_allowed_from"><code>installs_allowed_from</code></h3> + +<p>One (or more) URLs to the domains where your app can be installed from.</p> + +<p>This field is intended for apps that end-users can purchase. The field identifies the app stores with whom you have a commercial relationship. If left empty, your app can be installed from anywhere.</p> + +<div class="warning"> +<div class="alert alert-warning"><strong>Caution:</strong> Do not put a trailing slash at the end of URLs, because the installation will fail.</div> +</div> + +<p>For example, if your app can be installed from the Firefox Marketplace, <code>installs_allowed_from</code> will look like this:</p> + +<pre>"installs_allowed_from": [ + "https://marketplace.firefox.com" +]</pre> + +<p><strong>Note</strong>: The array <code>["*"]</code> would mean that installations of this app are allowed from any site. This is the default. Note that an empty array <code>[]</code> would disallow installation from any site, including your own.</p> + +<h3 id="locales"><code>locales</code></h3> + +<p>A map of one or more language-specific overrides of the field values in your app manifest.</p> + +<p>Each <code>locales</code> entry contains a list of the app manifest fields you want to override for a specific language. Keys for <code>locales</code> use the same language tags as for <code>default_locale</code> (<a href="http://www.ietf.org/rfc/rfc4646.txt">RFC 4646</a>).</p> + +<div class="alert alert-warning"> +<div class="warning"> +<p><strong>Caution:</strong></p> + +<ul> + <li> + <p>If you are defining <code>locales</code>, remember to also define <code>default_locale</code>.</p> + </li> + <li> + <p>Do not define the value of <code>default_locale</code> again in <code>locales</code>.</p> + </li> + <li> + <p>You cannot override these fields: <code>default_locale</code>, <code>locales</code>, and <code>installs_allowed_from</code>.</p> + </li> +</ul> +</div> +</div> + +<p>For example, your apps' default language is English, so its <code>default_locale</code> would be <code>en</code>. But you want to override the <code>name</code> and <code>description</code> for your Italian and German users with translated <code>name</code> and <code>description</code>. So your <code>locales</code> entries would look like this:</p> + +<pre>"locales": { + "it": { + "name": "L'Open Web", + "description": "Eccitante azione di sviluppo web open!" + }, + "de": { + "name": "Der Open Web", + "description": "Spannende offene Web-Entwicklung-Action!" + } +}</pre> + +<h3 id="messages"><code>messages</code></h3> + +<div class="note"> +<p class="red"><strong>Note</strong>: Applies only to apps to be installed on Firefox OS.</p> +</div> + +<p>The system messages you allow the app to capture, and the pages in your app that will display when those messages occur.</p> + +<p>Below is an example from the Firefox OS Dialer app. Every time an incoming call comes in (system message: <code>telephony-new-call</code>), the device shows the dialer's keypad (URL: <code>/dialer/index.html#keyboard-view</code>).</p> + +<pre>"messages": [ + { "alarm": "/index.html" } + { "notification": "/index.html" } + { "telephony-new-call": "/dialer/index.html#keyboard-view" } +]</pre> + +<h3 id="orientation"><code>orientation</code></h3> + +<div class="note"> +<p class="red"><strong>Note</strong>: Applies only to apps using Android or Firefox OS.</p> +</div> + +<p>The positioning at which the application will stay locked.</p> + +<p><strong>Illustration of possible values:</strong></p> + +<table class="table table-bordered"> + <thead> + <tr> + <th>value</th> + <th>App will stay locked to</th> + </tr> + </thead> + <tbody> + <tr> + <td><code>portrait-primary</code></td> + <td><img alt="Phone upright in portrait orientation" src="https://mdn.mozillademos.org/files/8487/portrait-primary.png" style="height: 111px; width: 63px;"></td> + </tr> + <tr> + <td><code>portrait-secondary</code></td> + <td><img alt="Phone upsidedown in portrait orientation" src="https://mdn.mozillademos.org/files/8489/portrait-secondary.png" style="height: 111px; width: 63px;"></td> + </tr> + <tr> + <td><code>portrait</code><br> + If you declare this, there's no need to write<br> + <code>-primary</code> or <code>-secondary</code></td> + <td><img alt="Phone upright in portrait orientation" src="https://mdn.mozillademos.org/files/8487/portrait-primary.png" style="height: 111px; width: 63px;"><img alt="Phone upsidedown in portrait orientation" src="https://mdn.mozillademos.org/files/8489/portrait-secondary.png" style="height: 111px; width: 63px;"></td> + </tr> + <tr> + <td><code>landscape-primary</code></td> + <td><img alt="Phone lying on its left hand side in landscape orientation" src="https://mdn.mozillademos.org/files/8483/landscape-primary.png" style="height: 63px; width: 113px;"></td> + </tr> + <tr> + <td><code>landscape-secondary</code></td> + <td><img alt="Phone lying on its right hand side in landscape orientation" src="https://mdn.mozillademos.org/files/8485/landscape-secondary.png" style="height: 63px; width: 113px;"></td> + </tr> + <tr> + <td><code>landscape</code><br> + If you declare this, there's no need to write<br> + <code>-primary</code> or <code>-secondary</code></td> + <td> + <p><img alt="Phone lying on its left hand side in landscape orientation" src="https://mdn.mozillademos.org/files/8483/landscape-primary.png" style="height: 63px; width: 113px;"></p> + + <p><img alt="Phone lying on its right hand side in landscape orientation" src="https://mdn.mozillademos.org/files/8485/landscape-secondary.png" style="height: 63px; width: 113px;"></p> + </td> + </tr> + </tbody> +</table> + +<pre>"orientation": [ "landscape-primary" ]</pre> + +<h3 id="origin"><code>origin</code></h3> + +<div class="note"> +<p class="red"><strong>Note</strong>: Applies only to privileged or internal (certified) packaged apps.</p> +</div> + +<p>Packaged apps have a special internal protocol of <code>app://UUID</code> where <code>UUID</code> is a string unique to each device the app is installed on. <code>UUID</code> is not easily accessible at this time. The <code>origin</code> field allows you to replace this <code>UUID</code> value with a single domain name that will be used by each installed app.</p> + +<div class="warning"> +<p><strong>Remember:</strong> domain name must start with <code>app://</code>, and you must be the owner of the domain name you specify.</p> +</div> + +<pre>"origin": "app://mywebapp.com"</pre> + +<h3 id="permissions"><code>permissions</code></h3> + +<p>The user permissions for sensitive device APIs that your app needs, for example, access to the user's Contacts. <a href="/en-US/Apps/Build/App_permissions">See a full list of WebAPI permissions/features</a>.</p> + +<p>Each permission requires:</p> + +<ul> + <li><code>name</code>: the name of the permission</li> + <li><code>description</code>: the reason why your app needs to use this permission</li> + <li><code>access</code>: the level of access required, options being <code>readonly</code>, <code>readwrite</code>, <code>readcreate</code>, and <code>createonly</code>. Only a few APIs need this, for example <a href="/en-US/docs/Web/API/Data_Store_API">Data Store</a>.</li> +</ul> + +<p>For example, here's a manifest entry for an app that needs permission to use the device's <code>contacts</code> and <code>alarms</code>.</p> + +<pre>"permissions": { + "contacts": { + "description": "Required for autocompletion in the share screen", + "access": "readcreate" + }, + "alarms": { + "description": "Required to schedule notifications" + } +}</pre> + +<div class="note"> +<p><strong>Note</strong>: If an app tries to use one of these APIs without a corresponding entry in the <code>permissions</code> field, it will fail to run.</p> +</div> + +<p>There are many APIs, some of whom require the app <code>type</code> to be privileged or internal (certified). For example, <a href="/en-US/docs/Web/API/XMLHttpRequest#mozSystem"><code>systemXHR</code></a> requires the <code>type</code> field to be set to <code>privileged</code> in order to work:</p> + +<pre class="brush: js"> "type": "privileged", + "permissions": { + "systemXHR": { + "description": "Required to download podcasts." + } + } +</pre> + +<h3 id="precompile"><code>precompile</code></h3> + +<div class="note"> +<p class="red"><strong>Note</strong>: Applies only to packaged apps.</p> +</div> + +<p>The path to JavaScript files containing <a href="/en-US/docs/Games/Tools/asm.js"><code>asm.js</code></a> code that you want compiled at install time.</p> + +<p>Compilation at install time makes the installation process longer, but reduces the time it takes to start up an app.</p> + +<pre>"precompile": [ + "game.js", + "database.js" +]</pre> + +<h3 id="redirects"><code>redirects</code></h3> + +<div class="note"> +<p class="red"><strong>Note</strong>: Applies only to privileged/internal (certified) apps that are to be installed on Firefox OS.</p> +</div> + +<p>The internal URLs your app uses to handle external processes.</p> + +<p>For example, your app might use Facebook OAuth authentication to get a user's contacts. When the authentication is finished, the server usually redirects back to a URL that you control. Because packaged apps are not hosted on the web, a packaged app does not have a valid URL that can be redirected to. So you use the <code>redirects</code> field to redirect an external URL to an internal app URL.</p> + +<p>In the scenario above, the <code>redirects</code> field will look like this:</p> + +<pre>"redirects": [ + {"from": "http://facebook.com/authentication/success.html", + "to": "/app/main_interface.html"} +]</pre> + +<p>The scope of the redirects declared by <code>redirects</code> is limited to the app that declares them. That makes it so that several apps can redirect the same public URL to their own local resources, and it also prevents global hijacking of public URLs by an application.</p> + +<h3 id="role"><code>role</code></h3> + +<p>The <code>role</code> field is mainly for internal use by the Gaia engineering team; it allows you to specify how an app should be used by B2G, its role in the system. For example, is it a keyboard, or a homescreen replacement?</p> + +<pre class="brush: json">"role": "system",</pre> + +<p>Options include:</p> + +<ul> + <li><code>system</code>: Does not display the app on the homescreen, and was originally intended as a system app replacement. Note however that in practice this doesn't really equate to a system app, and is used to only hide apps that shouldn't be available directly to the user (the Bluetooth app, for example.).</li> + <li><code>input</code>: Shows up in the Settings app as a replaceable keyboard, and does not display on the homescreen.</li> + <li><code>homescreen</code>: Shows up in the Settings app as a replacement homescreen option; does not display on the homescreen itself.</li> + <li><code>addon</code>: The app is a <a href="/en-US/Firefox_OS/Add-ons">Firefox OS Add-on</a>.</li> + <li><code>keyboard</code>: Defines the app as an IME app. This will show up in the Settings app as an alternative keyboard, but not display on the homescreen itself.</li> +</ul> + +<h3 id="version"><code>version</code></h3> + +<div class="note"> +<p><strong>Note:</strong> Required for packaged app manifests.</p> +</div> + +<p>A string that represents the version of the app, shown in Marketplace and when installing the app.</p> + +<p>In packaged apps the <code>version</code> is used to determine distinguish if an update needs to be installed. The field needs to be incremented when uploading an update of your app to Marketplace.</p> + +<p>In hosted apps this field is for your convenience; it's not used by the runtime, so <code>version</code> can be any value. Defining it is recommended.</p> + +<pre>"version": "2.1"</pre> + +<h2 id="Serving_manifests">Serving manifests</h2> + +<p>The app manifest must be served from the <a href="/en-US/Apps/Build/installable_apps_for_Firefox_OS/App_manifest_FAQ#What_is_an_origin.3F">same origin</a> that the app is served from.</p> + +<p>The manifest should be stored with a file extension of <code>.webapp</code>. App manifests must be served with a <code>Content-Type</code> header of <code>application/x-web-app-manifest+json</code>. This is currently not enforced by Firefox but is enforced by the Firefox Marketplace. Firefox OS only checks this if the <code>origin</code> of the page where the user triggers the install is different from the <code>origin</code> of the app itself. You don't need other headers such as <code>Content-Security-Policy</code> and <code>X-UA-Compatible</code>.</p> + +<p>Manifests can be served over SSL to mitigate certain classes of attacks. You can also serve the manifest with <a href="http://en.wikipedia.org/wiki/HTTP_compression">HTTP compression</a>. The manifest should not be cached.</p> + +<p>The manifest must be in UTF-8 encoding in order for the app to be submitted to Firefox Marketplace. It is recommended that you omit the byte order mark (BOM). Other encodings can be specified with a <code>charset</code> parameter on the <code>Content-Type</code> header (i.e. <code>Content-Type: application/x-web-app-manifest+json; charset=ISO-8859-4</code>), although this will not be respected by the Marketplace.</p> + +<p>User Agents when possible should meaningfully message the site identity and TLS status when prompting a user to install an app.</p> + +<h3 id="Serving_from_Apache">Serving from Apache</h3> + +<p>In your <code>.htaccess</code> file, you must add the following:</p> + +<pre>AddType application/x-web-app-manifest+json .webapp</pre> + +<p>If adding in an <code>.htaccess</code> file didn't work for you, you can add the same line in your Apache configuration file. Your configuration file might be named <code>httpd.conf</code> or <code>000-default.conf</code>, depending upon your operating system and configuration.</p> + +<h4 id="Serving_from_Apache_using_a_PHP_snippet">Serving from Apache, using a PHP snippet</h4> + +<p>It may be that on a shared hosting plan, changing the <code>Content-Type</code> header with a <code>.htaccess</code> file is not working because this is globally disallowed. Meanwhile,<em> if this hosting supports PHP</em>, using the following short script can serve the purpose:</p> + +<pre class="brush: php"><?php +// Serving the manifest file 'manifest.webapp' with the appropriate header +header('Content-type: application/x-web-app-manifest+json'); +readfile('manifest.webapp'); +?></pre> + +<p>This code should be placed in the same directory as the manifest, and named <code>manifest.webapp.php</code> for example.</p> + +<h3 id="Serving_from_Tomcat">Serving from Tomcat</h3> + +<p>In your <code>web.xml</code> file, you need to set the mime mapping</p> + +<pre><mime-mapping> + <extension>webapp</extension> + <mime-type>application/x-web-app-manifest+json</mime-type> +</mime-mapping></pre> + +<h3 id="sect1"> </h3> + +<h3 id="Serving_from_IIS">Serving from IIS</h3> + +<p>You need to edit your <code>web.config</code> file. This will probably be located in the web site's root directory.</p> + +<p>You will have to add a new entry in the <code><configuration></code> <code><system.webServer></code> <code><staticContent></code> section.</p> + +<pre><remove fileExtension=".webapp" /> +<mimeMap fileExtension=".webapp" mimeType="application/x-web-app-manifest+json; charset=UTF-8" /></pre> + +<div class="note"> +<p><strong>Note</strong>: For more information, read <a href="http://www.iis.net/configreference/system.webserver/staticcontent/mimemap">Adding Static Content MIME Mappings <mimeMap></a>.</p> +</div> + +<h3 id="Serving_from_nginx">Serving from nginx</h3> + +<p>You need to edit your <code>mime.types</code> file in the conf directory. This will probably be located in either <code>/etc/nginx/</code> or <code>/opt/nginx/</code>.</p> + +<p>You should have something similar to the following. Add the last line seen here:</p> + +<pre>types { + text/html html htm shtml; + text/css css; + text/xml xml; + application/x-web-app-manifest+json webapp; +}</pre> + +<h3 id="Serving_from_GitHub">Serving from GitHub</h3> + +<p>If you serve your manifest file from <a class="external" href="http://pages.github.com/">GitHub Pages</a>, GitHub will serve it with the <code>Content-Type</code> header of <code>application/x-web-app-manifest+json</code>.</p> + +<h3 id="Serving_from_Python">Serving from Python</h3> + +<p>If you have Python installed, you can easily run a server from the local directory using the following:</p> + +<pre>import SimpleHTTPServer +import SocketServer +SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map['.webapp'] = 'application/x-web-app-manifest+json' +httpd = SocketServer.TCPServer(("", 3000), SimpleHTTPServer.SimpleHTTPRequestHandler) +httpd.serve_forever() +</pre> + +<h3 id="Serving_from_Flask_(Python)">Serving from Flask (Python)</h3> + +<p>If you have flask project you don't need create file manifest.webapp but you can use route() decorator to tell Flask what URL should trigger our function. First you need import Response from Flask</p> + +<pre>from flask import Response</pre> + +<p>in your flask application, add the <code>route()</code> decorator, as indicated below:</p> + +<pre>@app.route('/manifest.webapp') +def manifest(): + data = json.dumps({ + "name": "Flask Application", + "version": "1.0", + "description": "Example of manifest.webapp", + "launch_path": "/", + "icons": { + "256": "/img/256.png", + "128": "/img/128.png", + "120": "/img/120.png", + "90": "/img/90.png", + "60": "/img/60.png", + "32": "/img/32.png" + }, + "developer": { + "name": "Rizky Ariestiyansyah", + "url": "http://oonlab.com" + }, + "orientation": ["portrait"], + "default_locale": "en" + }) + return Response(data, mimetype='application/x-web-app-manifest+json')</pre> + +<h3 id="Serving_from_Rack_(Ruby)">Serving from Rack (Ruby)</h3> + +<p>In <code>config/initializers/mime_types.rb</code>, add:</p> + +<pre>Rack::Mime::MIME_TYPES['.webapp'] = 'application/x-web-app-manifest+json'</pre> + +<h2 id="Especificação">Especificação</h2> + +<p>Not part of any specification — this document refers to the proprietary Firefox OS manifest format, and not the <a href="http://w3c.github.io/manifest/">W3C manifest spec</a>. We will hopefully document this at a different location, sometime soon.</p> + +<h2 id="Compatibilidade_do_navegador">Compatibilidade do navegador</h2> + +<p>For obvious reasons, support is primarily expected on mobile browsers.</p> + +<p>{{ CompatibilityTable() }}</p> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Chrome</th> + <th>Firefox (Gecko)</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari</th> + </tr> + <tr> + <td>Basic support</td> + <td>{{ CompatNo() }}</td> + <td>{{ CompatNo() }}</td> + <td>{{ CompatNo() }}</td> + <td>{{ CompatNo() }}</td> + <td>{{ CompatNo() }}</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Android</th> + <th>Firefox Mobile (Gecko)</th> + <th>Firefox OS (Gecko)</th> + <th>IE Mobile</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>Basic support</td> + <td>{{ CompatNo() }}</td> + <td>{{ CompatNo() }}</td> + <td>1.0.1</td> + <td>{{ CompatNo() }}</td> + <td>{{ CompatNo() }}</td> + <td>{{ CompatNo() }}</td> + </tr> + </tbody> +</table> +</div> + +<div id="SL_balloon_obj" style="display: block;"> +<div class="SL_ImTranslatorLogo" id="SL_button" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%; opacity: 0; display: block; left: -8px; top: -25px; transition: visibility 2s ease 0s, opacity 2s linear 0s;"> </div> + +<div id="SL_shadow_translation_result2" style="display: none;"> </div> + +<div id="SL_shadow_translator" style="display: none;"> +<div id="SL_planshet"> +<div id="SL_arrow_up" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<div id="SL_Bproviders"> +<div class="SL_BL_LABLE_ON" id="SL_P0" title="Google">G</div> + +<div class="SL_BL_LABLE_ON" id="SL_P1" title="Microsoft">M</div> + +<div class="SL_BL_LABLE_ON" id="SL_P2" title="Translator">T</div> +</div> + +<div id="SL_alert_bbl" style="display: none;"> +<div id="SLHKclose" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<div id="SL_alert_cont"> </div> +</div> + +<div id="SL_TB"> +<table id="SL_tables"> + <tbody> + <tr> + <td class="SL_td"><input></td> + <td class="SL_td"><select><option value="auto">Detectar idioma</option><option value="af">Africâner</option><option value="sq">Albanês</option><option value="de">Alemão</option><option value="ar">Arabe</option><option value="hy">Armênio</option><option value="az">Azerbaijano</option><option value="eu">Basco</option><option value="bn">Bengali</option><option value="be">Bielo-russo</option><option value="my">Birmanês</option><option value="bs">Bósnio</option><option value="bg">Búlgaro</option><option value="ca">Catalão</option><option value="kk">Cazaque</option><option value="ceb">Cebuano</option><option value="ny">Chichewa</option><option value="zh-CN">Chinês (Simp)</option><option value="zh-TW">Chinês (Trad)</option><option value="si">Cingalês</option><option value="ko">Coreano</option><option value="ht">Crioulo haitiano</option><option value="hr">Croata</option><option value="da">Dinamarquês</option><option value="sk">Eslovaco</option><option value="sl">Esloveno</option><option value="es">Espanhol</option><option value="eo">Esperanto</option><option value="et">Estoniano</option><option value="fi">Finlandês</option><option value="fr">Francês</option><option value="gl">Galego</option><option value="cy">Galês</option><option value="ka">Georgiano</option><option value="el">Grego</option><option value="gu">Gujarati</option><option value="ha">Hauça</option><option value="iw">Hebraico</option><option value="hi">Hindi</option><option value="hmn">Hmong</option><option value="nl">Holandês</option><option value="hu">Húngaro</option><option value="ig">Igbo</option><option value="id">Indonésio</option><option value="en">Inglês</option><option value="yo">Ioruba</option><option value="ga">Irlandês</option><option value="is">Islandês</option><option value="it">Italiano</option><option value="ja">Japonês</option><option value="jw">Javanês</option><option value="kn">Kannada</option><option value="km">Khmer</option><option value="lo">Laosiano</option><option value="la">Latim</option><option value="lv">Letão</option><option value="lt">Lituano</option><option value="mk">Macedônico</option><option value="ml">Malaiala</option><option value="ms">Malaio</option><option value="mg">Malgaxe</option><option value="mt">Maltês</option><option value="mi">Maori</option><option value="mr">Marathi</option><option value="mn">Mongol</option><option value="ne">Nepalês</option><option value="no">Norueguês</option><option value="fa">Persa</option><option value="pl">Polonês</option><option value="pt">Português</option><option value="pa">Punjabi</option><option value="ro">Romeno</option><option value="ru">Russo</option><option value="sr">Sérvio</option><option value="st">Sesotho</option><option value="so">Somália</option><option value="sw">Suaíli</option><option value="su">Sudanês</option><option value="sv">Sueco</option><option value="tg">Tadjique</option><option value="tl">Tagalo</option><option value="th">Tailandês</option><option value="ta">Tâmil</option><option value="cs">Tcheco</option><option value="te">Telugo</option><option value="tr">Turco</option><option value="uk">Ucraniano</option><option value="ur">Urdu</option><option value="uz">Uzbeque</option><option value="vi">Vietnamita</option><option value="yi">Yiddish</option><option value="zu">Zulu</option></select></td> + <td class="SL_td"> + <div id="SL_switch_b" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Alternar Idiomas"> </div> + </td> + <td class="SL_td"><select><option value="af">Africâner</option><option value="sq">Albanês</option><option value="de">Alemão</option><option value="ar">Arabe</option><option value="hy">Armênio</option><option value="az">Azerbaijano</option><option value="eu">Basco</option><option value="bn">Bengali</option><option value="be">Bielo-russo</option><option value="my">Birmanês</option><option value="bs">Bósnio</option><option value="bg">Búlgaro</option><option value="ca">Catalão</option><option value="kk">Cazaque</option><option value="ceb">Cebuano</option><option value="ny">Chichewa</option><option value="zh-CN">Chinês (Simp)</option><option value="zh-TW">Chinês (Trad)</option><option value="si">Cingalês</option><option value="ko">Coreano</option><option value="ht">Crioulo haitiano</option><option value="hr">Croata</option><option value="da">Dinamarquês</option><option value="sk">Eslovaco</option><option value="sl">Esloveno</option><option value="es">Espanhol</option><option value="eo">Esperanto</option><option value="et">Estoniano</option><option value="fi">Finlandês</option><option value="fr">Francês</option><option value="gl">Galego</option><option value="cy">Galês</option><option value="ka">Georgiano</option><option value="el">Grego</option><option value="gu">Gujarati</option><option value="ha">Hauça</option><option value="iw">Hebraico</option><option value="hi">Hindi</option><option value="hmn">Hmong</option><option value="nl">Holandês</option><option value="hu">Húngaro</option><option value="ig">Igbo</option><option value="id">Indonésio</option><option selected value="en">Inglês</option><option value="yo">Ioruba</option><option value="ga">Irlandês</option><option value="is">Islandês</option><option value="it">Italiano</option><option value="ja">Japonês</option><option value="jw">Javanês</option><option value="kn">Kannada</option><option value="km">Khmer</option><option value="lo">Laosiano</option><option value="la">Latim</option><option value="lv">Letão</option><option value="lt">Lituano</option><option value="mk">Macedônico</option><option value="ml">Malaiala</option><option value="ms">Malaio</option><option value="mg">Malgaxe</option><option value="mt">Maltês</option><option value="mi">Maori</option><option value="mr">Marathi</option><option value="mn">Mongol</option><option value="ne">Nepalês</option><option value="no">Norueguês</option><option value="fa">Persa</option><option value="pl">Polonês</option><option value="pt">Português</option><option value="pa">Punjabi</option><option value="ro">Romeno</option><option value="ru">Russo</option><option value="sr">Sérvio</option><option value="st">Sesotho</option><option value="so">Somália</option><option value="sw">Suaíli</option><option value="su">Sudanês</option><option value="sv">Sueco</option><option value="tg">Tadjique</option><option value="tl">Tagalo</option><option value="th">Tailandês</option><option value="ta">Tâmil</option><option value="cs">Tcheco</option><option value="te">Telugo</option><option value="tr">Turco</option><option value="uk">Ucraniano</option><option value="ur">Urdu</option><option value="uz">Uzbeque</option><option value="vi">Vietnamita</option><option value="yi">Yiddish</option><option value="zu">Zulu</option></select></td> + <td class="SL_td"> + <div id="SL_TTS_voice" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Ouça"> </div> + </td> + <td class="SL_td"> + <div class="SL_copy" id="SL_copy" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Copiar"> </div> + </td> + <td class="SL_td"> + <div id="SL_bbl_font_patch"> </div> + + <div class="SL_bbl_font" id="SL_bbl_font" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Tamanho da fonte"> </div> + </td> + <td class="SL_td"> + <div id="SL_bbl_help" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Ajuda"> </div> + </td> + <td class="SL_td"> + <div class="SL_pin_off" id="SL_pin" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Fixar a janela de pop-up"> </div> + </td> + </tr> + </tbody> +</table> +</div> +</div> + +<div id="SL_shadow_translation_result" style=""> </div> + +<div class="SL_loading" id="SL_loading" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<div id="SL_player2"> </div> + +<div id="SL_alert100">A função de fala é limitada a 200 caracteres</div> + +<div id="SL_Balloon_options" style="background: rgb(255, 255, 255) repeat scroll 0% 0%;"> +<div id="SL_arrow_down" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<table id="SL_tbl_opt" style="width: 100%;"> + <tbody> + <tr> + <td><input></td> + <td> + <div id="SL_BBL_IMG" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Mostrar o botão do ImTranslator 3 segundos"> </div> + </td> + <td><a class="SL_options" title="Mostrar opções">Opções</a> : <a class="SL_options" title="Histórico de tradução">Histórico</a> : <a class="SL_options" title="Comentários">Comentários</a> : <a class="SL_options" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GD9D8CPW8HFA2" title="Faça sua contribuição">Donate</a></td> + <td><span id="SL_Balloon_Close" title="Encerrar">Encerrar</span></td> + </tr> + </tbody> +</table> +</div> +</div> +</div> diff --git a/files/pt-pt/archive/b2g_os/firefox_os_apps/index.html b/files/pt-pt/archive/b2g_os/firefox_os_apps/index.html new file mode 100644 index 0000000000..4b6226ee81 --- /dev/null +++ b/files/pt-pt/archive/b2g_os/firefox_os_apps/index.html @@ -0,0 +1,140 @@ +--- +title: Firefox OS apps +slug: Archive/B2G_OS/Firefox_OS_apps +tags: + - Apps + - Building + - Components + - Firefox OS + - Installing + - NeedsTranslation + - TopicStub + - device APIs +translation_of: Archive/B2G_OS/Firefox_OS_apps +--- +<p></p><section class="Quick_links" id="Quick_Links"> + +<ol> + <li class="toggle"> + <details> + <summary>Build and install</summary> + <ol> + <li><strong><a href="/pt-PT/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS">Build and install overview</a></strong></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS/B2G_OS_build_process_summary">B2G OS build process summary</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/B2G_OS_build_prerequisites">Build prerequisites</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Preparing_for_your_first_B2G_build">Preparing for your first build</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building">Building B2G OS</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS/B2G_installer_add-on">B2G installer add-on</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS/Building_for_Flame_on_OS_X">Building B2G OS for Flame on Mac OS X</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Choosing_how_to_run_Gaia_or_B2G">Choosing how to run Gaia or B2G OS</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS/Compatible_Devices">Compatible Devices</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Installing_on_a_mobile_device">Installing B2G OS on a mobile device</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS/B2G_OS_update_packages">Creating and applying B2G OS update packages</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building/FOTA_community_builds">Building and installing FOTA community builds</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS/B2G_Build_Variables_Reference_Sheet">B2G build variables reference sheet</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Porting B2G OS</summary> + <ol> + <li><strong><a href="/pt-PT/docs/Mozilla/B2G_OS/Porting_B2G_OS">Porting overview</a></strong></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Porting_B2G_OS/basics">Porting basics</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Porting_B2G_OS/Porting_on_CyanogenMod">Porting on CyanogenMod</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Developing Gaia</summary> + <ol> + <li><strong><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia">Developing Gaia overview</a></strong></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Running_the_Gaia_codebase">Running the Gaia codebase</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Mulet">Run Gaia on desktop using Mulet</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Understanding_the_Gaia_codebase">Understanding the Gaia codebase</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Making_Gaia_code_changes">Making Gaia code changes</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Testing_Gaia_code_changes">Testing Gaia code changes</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Submitting_a_Gaia_patch">Submitting a Gaia patch</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Build_System_Primer">Gaia build system primer</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Different_ways_to_run_Gaia">Different ways to run Gaia</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/make_options_reference">Make options reference</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Gaia_tools_reference">Gaia tools reference</a></li> + </ol> + </details> + </li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/API">B2G OS APIs</a></li> +</ol> +</section><p></p> + +<p class="summary">This section of the Firefox OS docs covers the specific techniques required — and available tools — for building Firefox OS apps. You'll find a number of details below, from Firefox OS building blocks/web components, to device APIs and App installation.</p> + +<h2 id="Building_Firefox_OS_apps">Building Firefox OS apps</h2> + +<dl> + <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_apps/Building_apps_for_Firefox_OS">Building apps for Firefox OS</a></dt> + <dd>Firefox OS/Firefox platform app specifics, including App installation and management APIs, manifest files, packaged and hosted apps, handling API permissions.</dd> + <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_apps/Localization">Localization</a></dt> + <dd>This set of articles provides information for developers wishing to provide localized versions of their apps.</dd> + <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_apps/Performance">Performance</a></dt> + <dd>This page lists performance-related topics specific to Firefox OS.</dd> + <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_apps/Firefox_Accounts_on_Firefox_OS">Firefox Accounts on Firefox OS</a></dt> + <dd>This article provides an overview of using <a href="/en-US/docs/Mozilla/Tech/Firefox_Accounts">Firefox Accounts</a> in Firefox OS.</dd> + <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_apps/Reference_apps">Reference apps</a></dt> + <dd>This page lists a number of sample apps we've put together for you to download, install, play with and learn from. Have fun!</dd> + <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_apps/Screencast_series:_App_Basics_for_Firefox_OS">Screencast series: App Basics for Firefox OS</a></dt> + <dd>In this collection of short videos, developers from Mozilla and Telenor explain in a few steps how you can get started with building applications for Firefox OS.</dd> +</dl> + +<h2 id="Building_blocks">Building blocks</h2> + +<dl> + <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_apps/Building_blocks">Building Blocks</a></dt> + <dd>The Firefox OS Building Blocks are reusable UI components (also called 'common controls') that reflect OS-wide design patterns. Building Blocks are used to create the interfaces of all <a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Gaia">Gaia</a> default apps. You are free to make use of these components in your own Firefox OS apps, or general Web apps.</dd> +</dl> + +<h2 id="Styleguides">Styleguides</h2> + +<dl> + <dt><a href="http://www.mozilla.org/en-US/styleguide/products/firefox-os/">Firefox OS Visual styleguide</a></dt> + <dd>Our style guide for Firefox OS visual design, covering colours, typeface, backgrounds, app icons, and the design of specific UI elements.</dd> + <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_apps/Copy_styleguide">Firefox OS Copy styleguide</a></dt> + <dd>This guide outlines the rules we follow for writing Firefox OS app copy, but can be used as a general guide to writing good copy for any app interfaces.</dd> + <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_apps/Firefox_OS_in_Arabic">Firefox OS in Arabic</a></dt> + <dd>A guide to the specific UX design implementation Firefox OS has in place for dealing with Arabic (and other RTL languages.)</dd> +</dl> + +<h2 id="Assets">Assets</h2> + +<dl> + <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_apps/Design_asset_library">Firefox OS design asset library</a></dt> + <dd>In this section you'll find design assets, artwork, graphic templates, fonts and other materials that will be helpful as you design Firefox OS/Gaia apps.</dd> + <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_apps/Icon_font">Firefox OS icon font</a></dt> + <dd>Firefox OS has its own icon font set available: this article explains how to use it in your own apps.</dd> + <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_apps/Transitions">Firefox OS transitions</a></dt> + <dd>A reference to some of the transitions used in Firefox OS to move between different states in apps, including animated GIFs demonstrating the animations used, plus code samples to show the CSS animation code needed to implement these animations.</dd> +</dl> + +<h2 id="References">References</h2> + +<dl> + <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_apps/Firefox_OS_device_APIs">Firefox OS device APIs</a></dt> + <dd>This article provides a list of pages covering those APIs, as well as the <a href="https://developer.mozilla.org/en-US/Apps/Build/Manifest">app manifest</a> permissions for each one.</dd> + <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_apps/Firefox_OS_app_tools">Firefox OS app tools</a></dt> + <dd>This page provides a list of useful tools, libraries, examples, etc. that are useful for Firefox OS app developers, whether you want a code template to copy, or need help with adding a specific feature to your Firefox OS app.</dd> +</dl> + +<h2 id="Other_app_topics">Other app topics</h2> + +<dl> + <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_apps/Porting_Chrome_apps">Porting Chrome apps to Firefox OS Apps</a></dt> + <dd>This article discusses the differences between Chrome apps and Firefox OS Apps, and how you can convert between the two.</dd> + <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_apps/App_development_FAQ">App development FAQ</a></dt> + <dd>This FAQ is a compilation of answers to common app development questions.</dd> +</dl> + +<h2 id="See_also">See also</h2> + +<ul> + <li><a href="/en-US/docs/Mozilla/Marketplace">Firefox Marketplace</a></li> +</ul> diff --git a/files/pt-pt/archive/b2g_os/firefox_os_apps/localização/index.html b/files/pt-pt/archive/b2g_os/firefox_os_apps/localização/index.html new file mode 100644 index 0000000000..f9cfe4bca2 --- /dev/null +++ b/files/pt-pt/archive/b2g_os/firefox_os_apps/localização/index.html @@ -0,0 +1,101 @@ +--- +title: Localização de aplicação +slug: Archive/B2G_OS/Firefox_OS_apps/Localização +tags: + - Aplicações + - Apps + - B2G + - Firefox OS + - Gaia + - L10n.js + - Localization + - Localização +translation_of: Archive/B2G_OS/Firefox_OS_apps/Localization +--- +<p></p><section class="Quick_links" id="Quick_Links"> + +<ol> + <li class="toggle"> + <details> + <summary>Build and install</summary> + <ol> + <li><strong><a href="/pt-PT/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS">Build and install overview</a></strong></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS/B2G_OS_build_process_summary">B2G OS build process summary</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/B2G_OS_build_prerequisites">Build prerequisites</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Preparing_for_your_first_B2G_build">Preparing for your first build</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building">Building B2G OS</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS/B2G_installer_add-on">B2G installer add-on</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS/Building_for_Flame_on_OS_X">Building B2G OS for Flame on Mac OS X</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Choosing_how_to_run_Gaia_or_B2G">Choosing how to run Gaia or B2G OS</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS/Compatible_Devices">Compatible Devices</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Installing_on_a_mobile_device">Installing B2G OS on a mobile device</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS/B2G_OS_update_packages">Creating and applying B2G OS update packages</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building/FOTA_community_builds">Building and installing FOTA community builds</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS/B2G_Build_Variables_Reference_Sheet">B2G build variables reference sheet</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Porting B2G OS</summary> + <ol> + <li><strong><a href="/pt-PT/docs/Mozilla/B2G_OS/Porting_B2G_OS">Porting overview</a></strong></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Porting_B2G_OS/basics">Porting basics</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Porting_B2G_OS/Porting_on_CyanogenMod">Porting on CyanogenMod</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Developing Gaia</summary> + <ol> + <li><strong><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia">Developing Gaia overview</a></strong></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Running_the_Gaia_codebase">Running the Gaia codebase</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Mulet">Run Gaia on desktop using Mulet</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Understanding_the_Gaia_codebase">Understanding the Gaia codebase</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Making_Gaia_code_changes">Making Gaia code changes</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Testing_Gaia_code_changes">Testing Gaia code changes</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Submitting_a_Gaia_patch">Submitting a Gaia patch</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Build_System_Primer">Gaia build system primer</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Different_ways_to_run_Gaia">Different ways to run Gaia</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/make_options_reference">Make options reference</a></li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/Developing_Gaia/Gaia_tools_reference">Gaia tools reference</a></li> + </ol> + </details> + </li> + <li><a href="/pt-PT/docs/Mozilla/B2G_OS/API">B2G OS APIs</a></li> +</ol> +</section><p></p> + +<div class="summary"> +<p><span class="seoSummary">This set of articles provides information for developers wishing to provide localized versions of their apps.</span></p> +</div> + +<h2 id="Tutoriais">Tutoriais</h2> + +<dl> + <dt><a href="/en-US/Apps/Build/Localization/Getting_started_with_app_localization">Getting started with app localization</a></dt> + <dd>This tutorial provides a detailed guide to app localization.</dd> + <dt><a href="/en-US/Apps/Build/Localization/App_Localization_with_Transifex">Connecting developers and translators with Transifex</a></dt> + <dd>This article explores the use of <a href="https://www.transifex.com/">Transifex</a> for managing translation work, both for app developers and localizers.</dd> +</dl> + +<h2 id="Referência">Referência</h2> + +<dl> + <dt><a href="/en-US/docs/Web/Apps/Build/Localization/L10n.js_reference">L10n.js reference</a></dt> + <dd>This article provides a reference for the l10n.js library, and its associated date helper, l10n_date.js.</dd> + <dt><a href="/en-US/docs/Web/Apps/Build/Localization/Internationalization_helpers_IntlHelper_and_mozIntl">Internationalization helpers: IntlHelper and mozIntl</a></dt> + <dd>This article looks at how Firefox OS handles localization of dates, times, numbers and collators from version 2.5 onwards, using the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl">Internationalization API</a> and Gaia's built in helpers, <a href="https://github.com/mozilla-b2g/gaia/blob/master/shared/js/intl_helper.js">IntlHelper</a> and <a href="https://github.com/mozilla-b2g/gaia/blob/master/shared/js/moz_intl.js">mozIntl</a>.</dd> + <dt><a href="/en-US/docs/Web/Apps/Build/Localization/Localization_code_best_practices">App localization code best practices</a></dt> + <dd>Localization best practices and advanced techniques for experienced Gaia/app developers.</dd> + <dt><a href="/en-US/Apps/Build/Localization/Developing_Bidi_Apps">Developing Bidi Apps</a></dt> + <dd>Best coding practices and guidelines for developing bi-directional (<em>left-to-right</em> and <em>right-to-left</em>, RTL) apps.</dd> +</dl> + +<h2 id="Ferramentas">Ferramentas</h2> + +<dl> + <dt><a href="https://github.com/robnyman/TranslationTester">Translation tester</a></dt> + <dd>This app is for testing translations for Firefox OS apps and provides a blueprint for adding translation support to your own apps.</dd> +</dl> diff --git a/files/pt-pt/archive/b2g_os/firefox_os_apps/permissoes_de_aplicação/index.html b/files/pt-pt/archive/b2g_os/firefox_os_apps/permissoes_de_aplicação/index.html new file mode 100644 index 0000000000..403b62c93d --- /dev/null +++ b/files/pt-pt/archive/b2g_os/firefox_os_apps/permissoes_de_aplicação/index.html @@ -0,0 +1,690 @@ +--- +title: Permissões de Aplicação +slug: Archive/B2G_OS/Firefox_OS_apps/Permissoes_de_aplicação +tags: + - Aplicações + - Firefox OS + - Intermediário + - Permissões + - Referencia + - Referência(2) + - WebAPI +translation_of: Archive/B2G_OS/Firefox_OS_apps/App_permissions +--- +<div class="summary"> +<p>O campo de <code>permissões</code> no <a href="/pt-PT/docs/Archive/B2G_OS/Firefox_OS_apps/Building_apps_for_Firefox_OS/Manifesto">manisfesto da aplicação</a> controla o acesso a várias APIs sensíveis no dispositivo (algumas vezes chamada de <a href="/pt-PT/docs/Web/WebAPI">WebAPIs</a>). As permissões são descritas nas tabelas seguintes.</p> +</div> + +<p>Os três níveis de permissão, em resumo, são:</p> + +<ul> + <li><strong>Web apps</strong>: These only have a basic level of permissions, and don't have access to privileged or internal APIs.</li> + <li><strong>Privileged apps</strong>: These have all the permissions of web apps plus more. <a href="/en-US/Marketplace/Options/Hosted_apps">Hosted apps</a> can't be privileged — they must be <a href="/en-US/Marketplace/Options/Packaged_apps">packaged apps</a>.</li> + <li><strong>Internal (certified) apps</strong>: These have all the permissions of privileged and web apps plus more. Certified/internal apps can only be installed on a device by Mozilla or a device vendor; not 3rd party developers.</li> +</ul> + +<p>For more information on app types, see <a href="/en-US/Marketplace/Options/Packaged_apps#Types_of_packaged_apps">Types of packaged apps</a>.</p> + +<div class="note"> +<p><strong>Nota</strong>: If you use the <a href="/Firefox_OS/Using_the_App_Manager">App Manager</a>/<a href="/en-US/docs/Tools/WebIDE">WebIDE</a> to test your app, it will display an easy to read <a href="/Firefox_OS/Using_the_App_Manager#permissions">table</a> of which permissions are allowed, denied, or require a prompt on the current device or simulator you are connected to.</p> +</div> + +<h2 id="Hosted_app_and_privileged_app_permissions">Hosted app and privileged app permissions</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Manifest permission</th> + <th scope="col">API name</th> + <th scope="col">Description</th> + <th scope="col">Minimum app type required</th> + <th scope="col"><code>access</code> property</th> + <th scope="col">Default granted</th> + <th scope="col">Platform/version supported</th> + </tr> + </thead> + <tbody> + <tr> + <td><a name="alarms"><code>alarms</code></a></td> + <td><a href="/en-US/docs/WebAPI/Alarm">Alarm</a></td> + <td>Schedule a notification, or schedule an application to be started.</td> + <td>hosted</td> + <td>none</td> + <td><code>Allow</code></td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="audio-capture"><code>audio-capture</code></a></td> + <td> + <p><a href="/en-US/docs/Web/API/Navigator.getUserMedia">getUserMedia</a>, <a href="/en-US/docs/Web/API/Web_Speech_API">Web Speech API</a></p> + </td> + <td>Obtain <code>MediaStream</code> from audio input devices, e.g. microphone. This is needed to allow audio capture in Firefox OS 1.2+.</td> + <td>hosted for getUserMedia, privileged for Web Speech API</td> + <td>none</td> + <td><code>Prompt</code> for all installed App types for getUserMedia, <code>Allow</code> for Web Speech API.</td> + <td>FxOS 1.2 and<br> + Desktop Firefox 20+ for getUserMedia, FxOS 2.5 and Desktop Firefox 44 for Web Speech API.</td> + </tr> + <tr> + <td><a name="audio-channel-alarm"><code>audio-channel-alarm</code></a></td> + <td><a href="/en-US/docs/Web/API/AudioChannels_API">AudioChannels</a></td> + <td>Alarm clock, calendar alarms.</td> + <td>privileged</td> + <td>none</td> + <td><code>Allow</code></td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="audio-channel-content"><code>audio-channel-content</code></a></td> + <td><a href="/en-US/docs/Web/API/AudioChannels_API">AudioChannels</a></td> + <td>Music, video.</td> + <td>hosted</td> + <td>none</td> + <td><code>Allow</code></td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="audio-channel-normal"><code>audio-channel-normal</code></a></td> + <td><a href="/en-US/docs/Web/API/AudioChannels_API">AudioChannels</a></td> + <td>UI sounds, Web content, music, radio.</td> + <td>hosted</td> + <td>none</td> + <td><code>Allow</code></td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="audio-channel-notification"><code>audio-channel-notification</code></a></td> + <td><a href="/en-US/docs/Web/API/AudioChannels_API">AudioChannels</a></td> + <td>New email, incoming SMS.</td> + <td>privileged</td> + <td>none</td> + <td><code>Allow</code></td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="browser"><code>browser</code></a></td> + <td><a href="/en-US/docs/WebAPI/Browser">Browser</a></td> + <td>Enables the app to implement a browser in an <code>iframe</code>.</td> + <td>privileged</td> + <td>none</td> + <td><code>Allow</code></td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="camera"><code>camera</code></a></td> + <td><a href="/en-US/docs/Web/API/Navigator.mozCamera">Camera</a></td> + <td> + <p>Take photos, shoot video, record audio, and control the camera.</p> + + <div class="note"> + <p><strong>Note:</strong> <code>camera</code> was limited to certified apps initially because the app sandbox was preventing access to the camera hardware. Fixed from Firefox OS 2.0 onwards.</p> + </div> + </td> + <td> + <p>privileged in Firefox OS 2.0+ internal/certified up to Firefox OS 1.4</p> + </td> + <td>none</td> + <td><code>Prompt</code> for all installed App types.</td> + <td>FxOS 1.0.1-1.4 certified<br> + FxOS 2.0+ privileged</td> + </tr> + <tr> + <td><a name="contacts"><code>contacts</code></a></td> + <td><a href="/en-US/docs/WebAPI/Contacts">Contacts</a></td> + <td>Add, read, or modify contacts from the address book on the device and read contacts from the SIM.</td> + <td>privileged</td> + <td><code>readonly</code>, <code>readwrite</code>, <code>readcreate</code>, or <code>createonly</code></td> + <td><code>Prompt </code>for all installed App types.</td> + <td>FxOS 1.1<br> + Firefox Android 18</td> + </tr> + <tr> + <td><a name="desktop-notification"><code>desktop-notification</code></a></td> + <td><a href="/en-US/docs/Web/API/window.navigator.mozNotification">mozNotification</a> for Gecko <22, <a href="/en-US/docs/Web/API/notification">Notification</a> for Gecko 22+</td> + <td>Display a notification on the user's desktop. Note that this has changed, so for Gecko <22 (Firefox OS <1.2) you need to use <code>mozNotification</code>, while for Gecko 22+ (Firefox 1.2+) you need to use <code>Notification</code>.</td> + <td>hosted</td> + <td>none</td> + <td><code>Prompt</code> for Web content. <code>Allow</code> for all installed App types.</td> + <td>FxOS 1.0.1, Android 4.0, Desktop 4.0 for prefixed version<br> + FxOS 1.2, Android 22, Desktop 22 for non-prefixed version</td> + </tr> + <tr> + <td><a name="device-storage:music"><code>device-storage:music</code></a></td> + <td><a href="/en-US/docs/WebAPI/Device_Storage">Device Storage</a></td> + <td>Add, read, or modify music files stored on the device.</td> + <td>privileged</td> + <td><code>readonly</code>, <code>readwrite</code>, <code>readcreate</code>, or <code>createonly</code></td> + <td><code>Prompt</code></td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="device-storage:pictures"><code>device-storage:pictures</code></a></td> + <td><a href="/en-US/docs/WebAPI/Device_Storage">Device Storage</a></td> + <td>Add, read, or modify picture files stored on the device.</td> + <td>privileged</td> + <td><code>readonly</code>, <code>readwrite</code>, <code>readcreate</code>, or <code>createonly</code></td> + <td><code>Prompt</code></td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="device-storage:sdcard"><code>device-storage:sdcard</code></a></td> + <td><a href="/en-US/docs/WebAPI/Device_Storage">Device Storage</a></td> + <td>Add, read, or modify files stored on the device's SD card.</td> + <td>privileged</td> + <td><code>readonly</code>, <code>readwrite</code>, <code>readcreate</code>, or <code>createonly</code></td> + <td><code>Prompt</code></td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="device-storage:videos"><code>device-storage:videos</code></a></td> + <td><a href="/en-US/docs/WebAPI/Device_Storage">Device Storage</a></td> + <td>Add, read, or modify video files stored on the device.</td> + <td>privileged</td> + <td><code>readonly</code>, <code>readwrite</code>, <code>readcreate</code>, or <code>createonly</code></td> + <td><code>Prompt</code></td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="fmradio"><code>fmradio</code></a></td> + <td><a href="/en-US/docs/Web/API/WebFM">FM Radio</a></td> + <td>Control the FM radio.</td> + <td>hosted</td> + <td>none</td> + <td><code>Allow</code></td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="geolocation"><code>geolocation</code></a></td> + <td><a href="/en-US/docs/WebAPI/Using_geolocation">Geolocation</a></td> + <td>Obtain the current location of the user.</td> + <td>hosted</td> + <td>none</td> + <td><code>Prompt</code> (even for certified Apps)</td> + <td>FxOS 1.0.1, Desktop Firefox 3.5, Android 4.0</td> + </tr> + <tr> + <td><a name="input"><code>input</code></a></td> + <td><a href="https://wiki.mozilla.org/WebAPI/KeboardIME">Keyboard</a></td> + <td>Allows the app to act as a virtual keyboard by listening to focus change events in other apps. All IME apps need this permission for sending input keys and updating the value of a input field.</td> + <td>privileged</td> + <td>none</td> + <td><code>Allow</code></td> + <td>FxOS 1.2</td> + </tr> + <tr> + <td><code><a id="mobileid" name="mobileid">mobileid</a></code></td> + <td><a href="https://wiki.mozilla.org/WebAPI/MobileIdentity">Mobile identity</a></td> + <td>Allows an app to obtain a verified phone number (<a class="external text" href="http://en.wikipedia.org/wiki/MSISDN" rel="nofollow">MSISDN</a>) after the user selects the number to be shared and gives explicit permission for the app to obtain it.</td> + <td>privileged/</td> + <td>none</td> + <td><code>Prompt</code></td> + <td>FxOS 2.0</td> + </tr> + <tr> + <td><a name="mobilenetwork"><code>mobilenetwork</code></a></td> + <td><a href="/en-US/docs/Web/API/MozMobileNetworkInfo" title="/en-US/docs/Web/API/MozMobileNetworkInfo">Mobile Network</a></td> + <td>Obtain mobile network information (MCC, MNC, etc.).</td> + <td>privileged</td> + <td>none</td> + <td><code>Allow</code></td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="moz-firefox-accounts"><code>moz-firefox-accounts</code></a></td> + <td><a href="/en-US/docs/Firefox-Accounts-on-FirefoxOS" title="/en-US/docs/Web/API/MozMobileNetworkInfo">Firefox Accounts</a></td> + <td>Allows the use of Firefox Accounts when using the navigator.mozId API.</td> + <td>privileged</td> + <td>none</td> + <td><code>Prompt</code> for all installed App types.</td> + <td>FxOS 2.0</td> + </tr> + <tr> + <td><a id="nfc" name="nfc"><code>nfc</code></a></td> + <td><a href="/en-US/docs/Web/API/NFC_API">NFC API</a></td> + <td>NFC enables an app to transmit data to other devices via near field communication. This permission is required for reading and writing data.</td> + <td>Privileged</td> + <td>none</td> + <td><code>Allow</code></td> + <td>FxOS 2.2</td> + </tr> + <tr> + <td><code>nfc-share</code></td> + <td><a href="/en-US/docs/Web/API/NFC_API">NFC API</a></td> + <td>This permission is just required for sharing tags via NFC.</td> + <td>Privileged</td> + <td>none</td> + <td><code>Allow</code></td> + <td>FxOS 2.2</td> + </tr> + <tr> + <td><code>nfc-read</code>, <code>nfc-write</code></td> + <td><a href="/en-US/docs/Web/API/NFC_API">NFC API</a></td> + <td>These permissions were used to request reading and writing privileges in Firefox OS 2.0/2.1</td> + <td>Was certified/internal at this stage in development.</td> + <td>none</td> + <td><code>Allow</code></td> + <td>FxOS 2.0</td> + </tr> + <tr> + <td><a name="push"><code>push</code></a></td> + <td><a href="/en-US/docs/WebAPI/Simple_Push" title="/en-US/docs/WebAPI/Simple_Push">Simple Push</a></td> + <td>Enable an app to wake up to receive notification.</td> + <td>hosted</td> + <td>none</td> + <td><code>Allow</code></td> + <td>FxOS 1.1</td> + </tr> + <tr> + <td><code>speech-recognition</code></td> + <td><a href="/en-US/docs/Web/API/Web_Speech_API">Web Speech API</a></td> + <td>Allows an app to use speech recognition.</td> + <td>privileged</td> + <td>none</td> + <td><code>Allow</code></td> + <td>FxOS 2.5 and Desktop Firefox 44.</td> + </tr> + <tr> + <td><a name="systemXHR"><code>systemXHR</code></a></td> + <td><a href="/en-US/docs/Web/API/XMLHttpRequest#mozSystem">SystemXHR</a></td> + <td>Allows anonymous (no cookies) cross-origin XHR without the target site having CORS enabled. Similar to the TCP Socket API but restricted to XHR, not just raw sockets, so it is slightly less risky. See <a href="/en-US/docs/Web/API/XMLHttpRequest">XMLHttpRequest</a>.</td> + <td>privileged</td> + <td>none</td> + <td><code>Allow</code></td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="tcp-socket"><code>tcp-socket</code></a></td> + <td><a href="/en-US/docs/Web/API/TCPSocket">TCP Socket</a></td> + <td>Create TCP sockets and communicate over them.</td> + <td>privileged</td> + <td>none</td> + <td><code>Allow</code></td> + <td>FxOS 1.0.1,<br> + Desktop (early versions)</td> + </tr> + <tr> + <td><a name="video-capture"><code>video-capture</code></a></td> + <td><a href="/en-US/docs/Web/API/Navigator.getUserMedia">GetUserMedia</a></td> + <td>Obtain MediaStream from video input devices, e.g. camera. This is needed to allow video capture in Firefox OS 1.4+.</td> + <td>hosted</td> + <td>none</td> + <td><code>Prompt</code> for all installed App types.</td> + <td>FxOS 1.4</td> + </tr> + </tbody> +</table> + +<div class="note"> +<p><strong>Note</strong>: To declare an app as privileged, you need to put <code>"type" : "privileged"</code> into your <a href="/en-US/Apps/Build/Manifest#type">app manifest</a>. You don't need to include the <code>type</code> field in your manifest for web apps, as <code>web</code> is the default value.</p> +</div> + +<h2 id="Internal_(Certified)_app_permissions">Internal (Certified) app permissions</h2> + +<p>The following permissions require a internal app and are granted implicitly without prompting the user. Most app developers will not be able to use internal APIs, because they are intended for system-level apps and default apps created by Mozilla/operators/OEMs.</p> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Manifest permission</th> + <th scope="col">API name</th> + <th scope="col">Description</th> + <th scope="col">Minimum app type required</th> + <th scope="col"><code>access</code> property</th> + <th scope="col">Platform</th> + </tr> + </thead> + <tbody> + <tr> + <td><a name="attention"><code>attention</code></a></td> + <td>Attention Screen</td> + <td> + <p>Allow content to open a window in front of all other content. Used by telephone and SMS.</p> + + <div class="note"> + <p><strong>Note:</strong> Attention screens use the Firefox OS-specific <code>attention</code> feature name when calling {{domxref("window.open()")}}.</p> + </div> + </td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="audio-channel-ringer"><code>audio-channel-ringer</code></a></td> + <td><a href="/en-US/docs/Web/API/AudioChannels_API">AudioChannels</a></td> + <td>Incoming phone calls.</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="audio-channel-telephony"><code>audio-channel-telephony</code></a></td> + <td><a href="/en-US/docs/Web/API/AudioChannels_API">AudioChannels</a></td> + <td>Phone calls, VoIP calls.</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="audio-channel-publicnotification"><code>audio-channel-publicnotification</code></a></td> + <td><a href="/en-US/docs/Web/API/AudioChannels_API">AudioChannels</a></td> + <td>Forced camera shutter sounds.</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.2</td> + </tr> + <tr> + <td><a name="background-sensors"><code>background-sensors</code></a></td> + <td>Background Sensor</td> + <td>Ability to listen to proximity sensor events in the background. (All apps recieve these events in the foreground.)</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="backgroundservice"><code>backgroundservice (Deprecated)</code></a></td> + <td>Background Services</td> + <td> + <p>Enable an app to run in the background and perform tasks like syncing or responding to incoming messages.</p> + + <div class="note"> + <p>Note: this functionality has been removed.</p> + </div> + </td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="bluetooth"><code>bluetooth</code></a></td> + <td> </td> + <td>Low level access to <a href="https://wiki.mozilla.org/WebAPI/WebBluetooth">Bluetooth</a> hardware.</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a id="browser:embedded-system-app" name="browser:embedded-system-app"><code>browser:embedded-system-app</code></a></td> + <td><a href="/en-US/docs/Web/API/Browser_API">Browser</a></td> + <td>Enables an app opened in a browser {{htmlelement("iframe")}} to call methods of the API on — and listen and respond to related events fired by — itself (usually the parent window of the <code>iframe</code> calls the Browser API.) See {{bug("1196654")}} for further information.</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 2.5</td> + </tr> + <tr> + <td><a name="camera"><code>camera</code></a></td> + <td><a href="/en-US/docs/Web/API/Navigator.mozCamera">Camera</a></td> + <td> + <p>Take photos, shoot video, record audio, and control the camera.</p> + + <div class="note"> + <p><strong>Note:</strong> <code>camera</code> was limited to certified apps initially because the sandbox that apps run in was preventing access to the camera hardware. This has been fixed from Firefox OS 2.0 onwards.</p> + </div> + </td> + <td>internal (certified) up to Firefox OS 1.4, privileged in Firefox OS 2.0+</td> + <td>none</td> + <td>FxOS 1.0.1-1.4 certified<br> + FxOS 2.0+ privileged</td> + </tr> + <tr> + <td><a name="cellbroadcast"><code>cellbroadcast</code></a></td> + <td> </td> + <td>Fires an event when a specific type of cell network message is received (an emergency network notification).</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a id="datastore" name="datastore">No permission needed</a>, but <code>datastores-access</code>/<code>datastores-owned</code> needs to be set in the manifest (see <a href="/en-US/docs/Web/API/Data_Store_API#Manifest_fields">Data Store API Manifest fields</a>.)</td> + <td><a href="/en-US/docs/Web/API/Data_Store_API">Data Store</a></td> + <td>A powerful, flexible storage mechanism for Firefox OS applications to use to store and share data.</td> + <td>internal (certified)</td> + <td><code>datastores-access</code>/<br> + <code>datastores-owned</code></td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="device-storage:apps"><code>device-storage:apps</code></a></td> + <td><a href="/en-US/docs/WebAPI/Device_Storage">Device Storage</a></td> + <td>Add, read, or modify files stored in the apps location on the device.<br> + <br> + When this is used, the <code>webapps-manage</code> permission is also required alongside it (see below.)</td> + <td>internal (certified)</td> + <td><code>read</code></td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="embed-apps"><code>embed-apps</code></a></td> + <td>Embed Apps</td> + <td>Ability to embed apps in <code>mozApp</code> frames.</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="idle"><code>idle</code></a></td> + <td><a href="/en-US/docs/WebAPI/Idle">Idle</a></td> + <td>Notify the app if the user is idle.</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="mobileconnection"><code>mobileconnection</code></a></td> + <td><a href="/en-US/docs/WebAPI/Mobile_Connection">Mobile Connection</a></td> + <td>Obtain information about the current mobile voice and data connection.</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="network-events"><code>network-events</code></a></td> + <td>Network Events</td> + <td>Monitor network uploads and downloads.</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="networkstats-manage"><code>networkstats-manage</code></a></td> + <td><a href="/en-US/docs/Web/API/Network_Stats_API">Network Stats</a></td> + <td>Obtain statistics of data usage per interface.</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="open-remote-window"><code>open-remote-window</code></a></td> + <td>Open out-of-process windows</td> + <td>Allows normal <code>window.open</code> calls, but the resulting window is opened in a new process.</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="permissions"><code>permissions</code></a></td> + <td><a href="/en-US/docs/Web/API/Permissions_API_(Firefox_OS)">Permissions (Firefox OS)</a></td> + <td>Allow an app to manage other permissions of other apps.</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="phonenumberservice">phonenumberservice</a></td> + <td>??</td> + <td>??</td> + <td>internal (certified)</td> + <td>none</td> + <td>??</td> + </tr> + <tr> + <td><a name="power"><code>power</code></a></td> + <td><a href="/en-US/docs/WebAPI/Power_Management">Power Management</a></td> + <td>Turn the screen on or off, control CPU, device power, and so on. Listen for and inspect resource lock events.</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a id="presentation-device-manage" name="presentation-device-manage"><code>presentation-device-manage</code></a></td> + <td>Presentation</td> + <td>Obtain the list of available devices that can be used as external display and trigger device discovery.</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 3.0</td> + </tr> + <tr> + <td><a name="settings"><code>settings</code></a></td> + <td><a href="/en-US/docs/WebAPI/Settings">Settings</a></td> + <td>Configure or read device settings.</td> + <td>internal (certified)</td> + <td><code>readonly</code> or <code>readwrite</code></td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="sms"><code>sms</code></a></td> + <td><a href="/en-US/docs/WebAPI/WebSMS">WebSMS</a></td> + <td>Send and receive SMS messages.</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1,<br> + 1.1 for MMS</td> + </tr> + <tr> + <td><a name="telephony"><code>telephony</code></a></td> + <td><a href="/en-US/docs/Web/API/Web_Telephony_API">Web Telephony</a></td> + <td>Access all telephony-related APIs to make and recieve phone calls.</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="time"><code>time</code></a></td> + <td><a href="/en-US/docs/WebAPI/Time_and_Clock">TimeManager</a></td> + <td>Set current time. Time zone information is controlled by the Settings API. Formerly called <code>systemclock</code>.</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="voicemail"><code>voicemail</code></a></td> + <td>Voicemail</td> + <td>Access voicemail.</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="webapps-manage"><code>webapps-manage</code></a></td> + <td>Open Webapps</td> + <td>Obtain access to the <a href="/en-US/Apps/JavaScript_API#Management_API"><code>navigator.mozApps.mgmt</code></a> API to manage installed Open Web Apps.<br> + <br> + Required alongside the <code>device-storage:apps</code> permission (see above.)</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1, Desktop, Android</td> + </tr> + <tr> + <td><a name="wifi-manage"><code>wifi-manage</code></a></td> + <td>WiFi Management</td> + <td>Enumerate available WiFi networks, get signal strength, connect to a network.</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1</td> + </tr> + <tr> + <td><a name="wappush"><code>wappush</code></a></td> + <td>WAP Push</td> + <td>Receive WAP Push messages.</td> + <td>internal (certified)</td> + <td>none</td> + <td>FxOS 1.0.1</td> + </tr> + </tbody> +</table> + +<div class="note"> +<p><strong>Nota</strong>: The internal codename for internal apps is certified apps. To declare an app as internal, you need to put <code>"type" : "certified"</code> into your <a href="/en-US/Apps/Build/Manifest#type">app manifest</a>.</p> +</div> + +<h2 id="Consulte_também">Consulte também</h2> + +<p>A <a href="https://mxr.mozilla.org/mozilla-b2g32_v2_0/source/dom/apps/src/PermissionsTable.jsm">tabela de permissões</a> (descontinuada e substituida por <strong><u><a href="https://dxr.mozilla.org/mozilla-central/source/">DXR</a></u></strong>) é onde são definidas as permissões da API do Firefox OSno código fonte do Firefox.</p> + +<div id="SL_balloon_obj" style="display: block;"> +<div class="SL_ImTranslatorLogo" id="SL_button" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%; opacity: 0; display: block; left: -8px; top: -25px; transition: visibility 2s ease 0s, opacity 2s linear 0s;"> </div> + +<div id="SL_shadow_translation_result2" style="display: none;"> </div> + +<div id="SL_shadow_translator" style="display: none;"> +<div id="SL_planshet"> +<div id="SL_arrow_up" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<div id="SL_Bproviders"> +<div class="SL_BL_LABLE_ON" id="SL_P0" title="Google">G</div> + +<div class="SL_BL_LABLE_ON" id="SL_P1" title="Microsoft">M</div> + +<div class="SL_BL_LABLE_ON" id="SL_P2" title="Translator">T</div> +</div> + +<div id="SL_alert_bbl" style="display: none;"> +<div id="SLHKclose" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<div id="SL_alert_cont"> </div> +</div> + +<div id="SL_TB"> +<table id="SL_tables"> + <tbody><tr> + <td class="SL_td"><input></td> + <td class="SL_td"><select><option value="auto">Detectar idioma</option><option value="af">Africâner</option><option value="sq">Albanês</option><option value="de">Alemão</option><option value="ar">Arabe</option><option value="hy">Armênio</option><option value="az">Azerbaijano</option><option value="eu">Basco</option><option value="bn">Bengali</option><option value="be">Bielo-russo</option><option value="my">Birmanês</option><option value="bs">Bósnio</option><option value="bg">Búlgaro</option><option value="ca">Catalão</option><option value="kk">Cazaque</option><option value="ceb">Cebuano</option><option value="ny">Chichewa</option><option value="zh-CN">Chinês (Simp)</option><option value="zh-TW">Chinês (Trad)</option><option value="si">Cingalês</option><option value="ko">Coreano</option><option value="ht">Crioulo haitiano</option><option value="hr">Croata</option><option value="da">Dinamarquês</option><option value="sk">Eslovaco</option><option value="sl">Esloveno</option><option value="es">Espanhol</option><option value="eo">Esperanto</option><option value="et">Estoniano</option><option value="fi">Finlandês</option><option value="fr">Francês</option><option value="gl">Galego</option><option value="cy">Galês</option><option value="ka">Georgiano</option><option value="el">Grego</option><option value="gu">Gujarati</option><option value="ha">Hauça</option><option value="iw">Hebraico</option><option value="hi">Hindi</option><option value="hmn">Hmong</option><option value="nl">Holandês</option><option value="hu">Húngaro</option><option value="ig">Igbo</option><option value="id">Indonésio</option><option value="en">Inglês</option><option value="yo">Ioruba</option><option value="ga">Irlandês</option><option value="is">Islandês</option><option value="it">Italiano</option><option value="ja">Japonês</option><option value="jw">Javanês</option><option value="kn">Kannada</option><option value="km">Khmer</option><option value="lo">Laosiano</option><option value="la">Latim</option><option value="lv">Letão</option><option value="lt">Lituano</option><option value="mk">Macedônico</option><option value="ml">Malaiala</option><option value="ms">Malaio</option><option value="mg">Malgaxe</option><option value="mt">Maltês</option><option value="mi">Maori</option><option value="mr">Marathi</option><option value="mn">Mongol</option><option value="ne">Nepalês</option><option value="no">Norueguês</option><option value="fa">Persa</option><option value="pl">Polonês</option><option value="pt">Português</option><option value="pa">Punjabi</option><option value="ro">Romeno</option><option value="ru">Russo</option><option value="sr">Sérvio</option><option value="st">Sesotho</option><option value="so">Somália</option><option value="sw">Suaíli</option><option value="su">Sudanês</option><option value="sv">Sueco</option><option value="tg">Tadjique</option><option value="tl">Tagalo</option><option value="th">Tailandês</option><option value="ta">Tâmil</option><option value="cs">Tcheco</option><option value="te">Telugo</option><option value="tr">Turco</option><option value="uk">Ucraniano</option><option value="ur">Urdu</option><option value="uz">Uzbeque</option><option value="vi">Vietnamita</option><option value="yi">Yiddish</option><option value="zu">Zulu</option></select></td> + <td class="SL_td"> + <div id="SL_switch_b" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Alternar Idiomas"> </div> + </td> + <td class="SL_td"><select><option value="af">Africâner</option><option value="sq">Albanês</option><option value="de">Alemão</option><option value="ar">Arabe</option><option value="hy">Armênio</option><option value="az">Azerbaijano</option><option value="eu">Basco</option><option value="bn">Bengali</option><option value="be">Bielo-russo</option><option value="my">Birmanês</option><option value="bs">Bósnio</option><option value="bg">Búlgaro</option><option value="ca">Catalão</option><option value="kk">Cazaque</option><option value="ceb">Cebuano</option><option value="ny">Chichewa</option><option value="zh-CN">Chinês (Simp)</option><option value="zh-TW">Chinês (Trad)</option><option value="si">Cingalês</option><option value="ko">Coreano</option><option value="ht">Crioulo haitiano</option><option value="hr">Croata</option><option value="da">Dinamarquês</option><option value="sk">Eslovaco</option><option value="sl">Esloveno</option><option value="es">Espanhol</option><option value="eo">Esperanto</option><option value="et">Estoniano</option><option value="fi">Finlandês</option><option value="fr">Francês</option><option value="gl">Galego</option><option value="cy">Galês</option><option value="ka">Georgiano</option><option value="el">Grego</option><option value="gu">Gujarati</option><option value="ha">Hauça</option><option value="iw">Hebraico</option><option value="hi">Hindi</option><option value="hmn">Hmong</option><option value="nl">Holandês</option><option value="hu">Húngaro</option><option value="ig">Igbo</option><option value="id">Indonésio</option><option selected value="en">Inglês</option><option value="yo">Ioruba</option><option value="ga">Irlandês</option><option value="is">Islandês</option><option value="it">Italiano</option><option value="ja">Japonês</option><option value="jw">Javanês</option><option value="kn">Kannada</option><option value="km">Khmer</option><option value="lo">Laosiano</option><option value="la">Latim</option><option value="lv">Letão</option><option value="lt">Lituano</option><option value="mk">Macedônico</option><option value="ml">Malaiala</option><option value="ms">Malaio</option><option value="mg">Malgaxe</option><option value="mt">Maltês</option><option value="mi">Maori</option><option value="mr">Marathi</option><option value="mn">Mongol</option><option value="ne">Nepalês</option><option value="no">Norueguês</option><option value="fa">Persa</option><option value="pl">Polonês</option><option value="pt">Português</option><option value="pa">Punjabi</option><option value="ro">Romeno</option><option value="ru">Russo</option><option value="sr">Sérvio</option><option value="st">Sesotho</option><option value="so">Somália</option><option value="sw">Suaíli</option><option value="su">Sudanês</option><option value="sv">Sueco</option><option value="tg">Tadjique</option><option value="tl">Tagalo</option><option value="th">Tailandês</option><option value="ta">Tâmil</option><option value="cs">Tcheco</option><option value="te">Telugo</option><option value="tr">Turco</option><option value="uk">Ucraniano</option><option value="ur">Urdu</option><option value="uz">Uzbeque</option><option value="vi">Vietnamita</option><option value="yi">Yiddish</option><option value="zu">Zulu</option></select></td> + <td class="SL_td"> + <div id="SL_TTS_voice" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Ouça"> </div> + </td> + <td class="SL_td"> + <div class="SL_copy" id="SL_copy" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Copiar"> </div> + </td> + <td class="SL_td"> + <div id="SL_bbl_font_patch"> </div> + + <div class="SL_bbl_font" id="SL_bbl_font" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Tamanho da fonte"> </div> + </td> + <td class="SL_td"> + <div id="SL_bbl_help" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Ajuda"> </div> + </td> + <td class="SL_td"> + <div class="SL_pin_off" id="SL_pin" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Fixar a janela de pop-up"> </div> + </td> + </tr> +</tbody></table> +</div> +</div> + +<div id="SL_shadow_translation_result" style=""> </div> + +<div class="SL_loading" id="SL_loading" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<div id="SL_player2"> </div> + +<div id="SL_alert100">A função de fala é limitada a 200 caracteres</div> + +<div id="SL_Balloon_options" style="background: rgb(255, 255, 255) repeat scroll 0% 0%;"> +<div id="SL_arrow_down" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<table id="SL_tbl_opt" style="width: 100%;"> + <tbody><tr> + <td><input></td> + <td> + <div id="SL_BBL_IMG" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Mostrar o botão do ImTranslator 3 segundos"> </div> + </td> + <td><a class="SL_options" title="Mostrar opções">Opções</a> : <a class="SL_options" title="Histórico de tradução">Histórico</a> : <a class="SL_options" title="Comentários">Comentários</a> : <a class="SL_options" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GD9D8CPW8HFA2" title="Faça sua contribuição">Donate</a></td> + <td><span id="SL_Balloon_Close" title="Encerrar">Encerrar</span></td> + </tr> +</tbody></table> +</div> +</div> +</div> diff --git a/files/pt-pt/archive/b2g_os/index.html b/files/pt-pt/archive/b2g_os/index.html new file mode 100644 index 0000000000..c618cb8e2f --- /dev/null +++ b/files/pt-pt/archive/b2g_os/index.html @@ -0,0 +1,241 @@ +--- +title: B2G OS +slug: Archive/B2G_OS +tags: + - B2G + - Firefox OS + - Gaia + - Iniciação Firefox OS + - Principiante + - Resumo + - Sinopse + - básico +translation_of: Archive/B2G_OS +--- +<div class="summary"> +<p><span class="seoSummary">Firefox OS é o sistema operativo móvel desenvolvido pela Mozilla, baseado no Linux e no motor de renderização poderoso Gecko do Firefox.</span></p> +</div> + +<p><strong>Firefox OS</strong> is open source software that allows developers to harness the power and flexibility of the Web to create advanced end-user applications. The <strong>entire user interface is a web app</strong>, which can<strong> </strong>display and launch other apps. A Firefox OS web app is made with HTML, CSS, and JavaScript. In addition, Firefox OS web apps have access to the device hardware and services via an Application Programing Interface (API).</p> + +<p>From a product perspective, Firefox OS is Mozilla's (and our OEM partners') branding and support services applied on top of <strong>Boot to Gecko</strong> (<strong>B2G</strong>), which is the operating system's engineering codename. Boot to Gecko is developed by a team of engineers inside Mozilla plus many external contributors from the wider Mozilla/open source community.</p> + +<section class="outer-apps-box" id="sect1"> +<h2 id="Desenvolver_aplicações_para_o_Firefox_OS"><a href="/en-US/Apps/Build/Building_apps_for_Firefox_OS">Desenvolver aplicações para o Firefox OS</a></h2> + +<p>Head over to our App Center for all the information you could possibly need on building open web apps that can be installed on Firefox OS !</p> +</section> + +<div class="column-container"> +<div class="column-third"> +<h2 id="Guias_da_Plataforma"><a href="/en-US/docs/Mozilla/Firefox_OS/Platform">Guias da Plataforma</a></h2> + +<p>Guides for platform developers on how the different components of the Firefox OS platform fit together and work.</p> + +<ul> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia">Gaia</a></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Gonk" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Gonk">Gonk</a></li> + <li><a href="/en-US/docs/Mozilla/Gecko" title="/en-US/docs/Mozilla/Gecko">Gecko</a></li> +</ul> +</div> + +<div class="column-third"> +<h2 id="Criar_e_Instalar"><a href="/en-US/docs/Mozilla/Firefox_OS/Build_and_install">Criar e Instalar</a></h2> + +<p>Guides covering building and installing Firefox OS on an emulator, compatible device, or desktop simulator.</p> + +<ul> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_build_prerequisites" title="Mozilla/Firefox_OS/Firefox OS build prerequisites">Firefox OS build prerequisites</a></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Preparing_for_your_first_B2G_build" title="Mozilla/Firefox_OS/Preparing for your first B2G build">Preparing for your first build</a></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Building" title="Mozilla/Firefox_OS/Building">Building Firefox OS</a></li> +</ul> +</div> + +<div class="column-third"> +<h2 id="Developer_phones"><a href="/en-US/docs/Mozilla/Firefox_OS/Developer_phone_guide">Developer phones</a></h2> + +<p>Information on specific developer phones, such as tweaking, updating, recovering, and buying.</p> + +<ul> + <li><a href="/en-US/Firefox_OS/Developer_phone_guide/Flame">Flame</a></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Developer_phone_guide/Updating_and_Tweaking_Geeksphone">Geeksphone</a></li> + <li><a href="/en-US/Firefox_OS/Developer_phone_guide/ZTE_OPEN_C">ZTE Open C</a></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Troubleshooting">Troubleshooting</a></li> + <li><a href="/en-US/Firefox_OS/Developer_phone_guide/Phone_specs">Phone and device specs</a></li> +</ul> +</div> +</div> + +<div class="column-container equalColumnHeights"> +<div class="zone-callout"> +<h2 id="Get_started_with_Firefox_OS_add-ons">Get started with Firefox OS add-ons</h2> + +<p>Firefox OS add-ons are new in Firefox OS 2.5! To start developing add-ons and getting involved in the add-ons community, read <a href="/en-US/docs/Mozilla/Firefox_OS/Add-ons/Getting_started">Getting started with Firefox OS add-ons</a>.</p> +</div> + +<div class="zone-callout"> +<h2 id="Other_useful_pages"><strong>Other useful pages</strong></h2> + +<ul> + <li><a href="https://www.mozilla.org/en-US/styleguide/products/firefox-os/"><span class="gmw_">Firefox OS <span class="gm-spell gm_ gm_d869ea80-e62d-d8a6-6929-a6e9983578ff">styleguide</span></span></a></li> + <li><a class="link-https" href="https://wiki.mozilla.org/B2G/FAQ" title="B2G/FAQ">Mozilla wiki FAQ</a></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Feature_support_chart" title="/en-US/docs/Mozilla/Firefox_OS/Feature_support_chart">Feature support chart</a></li> + <li><a href="http://firefoxosbooks.org/">Firefox OS Books</a></li> +</ul> +</div> +</div> + +<div class="note"> +<p><strong>Note:</strong> We are keeping track of ongoing work on Firefox OS documentation on our <a href="/en-US/docs/MDN/Doc_status/Firefox_OS">Firefox OS documentation status</a> page. If you want to help contribute to Firefox OS documentation, please have a look at this page to see what work needs tweaking!</p> +</div> + +<h2 id="Subnav">Subnav</h2> + +<ol> + <li><a href="/en-US/Firefox_OS/Introduction">Introduction</a></li> + <li><a href="/en-US/Firefox_OS/Platform" title="Documentation about the Firefox OS platform, including Gonk, Gaia, and everything in between.">Platform guide</a> + <ol> + <li><strong><a href="/en-US/Firefox_OS/Platform">Platform guide overview</a></strong></li> + <li><a href="/en-US/Firefox_OS/Platform/Architecture" title="An overview of how Firefox OS is structured internally; this is primarily of interest to platform developers and people doing porting work.">Architecture overview</a></li> + <li><a href="/en-US/Firefox_OS/Platform/Apps_architecture" title="An overview of the application model on Firefox OS.">Apps architecture</a></li> + <li><a href="/en-US/Firefox_OS/Platform/Gonk" title="Documentation about Gonk, the operating system layer underneath Gaia. This consists of a Linux kernel and a hardware abstraction layer to which Gecko communicates."><span class="gm-spell gm_ gm_db111eae-c215-78a2-9789-97be921cbbdc">Gonk</span></a></li> + <li><a href="/en-US/Gecko" title="Gecko is the layer of Firefox OS that provides the same open web standards implementation used by Firefox and Thunderbird, as well as many other applications.">Gecko</a></li> + <li><a href="/en-US/Firefox_OS/Platform/Gaia" title="Documentation about Gaia, the user interface application for Firefox OS devices; this is a Web application running atop the Firefox OS software stack.">Gaia</a></li> + <li><a href="/en-US/Firefox_OS/Platform/Gaia/Gaia_apps">Gaia apps guide</a></li> + <li><a href="/en-US/Firefox_OS/Security" title="Documentation about security in Firefox OS">Security</a> + <ol> + <li><a href="/en-US/Firefox_OS/Security/Security_model">The Firefox OS security model</a></li> + <li><a href="/en-US/Firefox_OS/Security/System_security">System security</a></li> + <li><a href="/en-US/Firefox_OS/Security/Application_security">Application security in Firefox OS</a></li> + <li><a href="/en-US/Firefox_OS/Security/Installing_and_updating_applications">Securely installing and updating applications</a></li> + </ol> + </li> + <li><a href="/en-US/Firefox_OS/Platform/Out_of_memory_management_on_Firefox_OS">Out of memory management on Firefox OS </a></li> + <li><a href="/en-US/Firefox_OS/Platform/Feature_support_chart" title="A chart of which features are available in which types of Firefox OS builds.">Feature support chart</a></li> + <li><a href="/en-US/Firefox_OS/Platform/Settings_list" title="A list of common setting names that can be used with the settings API">Settings list</a></li> + </ol> + </li> + <li><a href="/en-US/Firefox_OS/Building_and_installing_Firefox_OS" title="This includes documentation for building and installing the platform onto devices, as well as building the simulator and emulators.">Build and install</a> + <ol> + <li><strong><a href="/en-US/Firefox_OS/Building_and_installing_Firefox_OS">Build and install overview</a></strong></li> + <li><a href="/en-US/Firefox_OS/Building_and_installing_Firefox_OS/Firefox_OS_build_process_summary">Firefox OS build process summary</a></li> + <li><a href="/en-US/Firefox_OS/Firefox_OS_build_prerequisites" title="Steps to take before you build Firefox OS for the first time.">Build prerequisites</a></li> + <li><a href="/en-US/Firefox_OS/Preparing_for_your_first_B2G_build" title="Before you can build Firefox OS, you need to clone the repository and configure your build.">Preparing for your first build</a></li> + <li><a href="/en-US/Firefox_OS/Building" title="How to build Firefox OS.">Building Firefox OS</a></li> + <li><a href="/en-US/Firefox_OS/Building_and_installing_Firefox_OS/Building_Firefox_OS_for_flame_on_OSX">Building Firefox OS for flame on OSX</a></li> + <li><a href="/en-US/Firefox_OS/Choosing_how_to_run_Gaia_or_B2G" title="Using Gaia within Firefox, running Firefox OS on a mobile device, or in a desktop-based simulator. Which is best?">Choosing how to run Gaia or Firefox OS</a></li> + <li><a href="/en-US/Firefox_OS/Building_the_Firefox_OS_simulator" title="Simulating the Gaia environment in a desktop application - more accurate than running Gaia in Firefox but not as accurate as the emulators.">Building the Firefox OS simulator</a></li> + <li><a href="/en-US/Firefox_OS/Using_the_B2G_emulators" title="A guide to building and using the Firefox OS emulators, and when to use which emulator.">Using the Firefox OS emulators</a></li> + <li><a href="/en-US/Firefox_OS/Installing_on_a_mobile_device" title="How to install Firefox OS on a real mobile device.">Installing Firefox OS on a mobile device</a></li> + <li><a href="/en-US/Firefox_OS/Building_and_installing_Firefox_OS/Firefox_OS_update_packages">Creating and applying Firefox OS update packages</a></li> + <li><a href="/en-US/Firefox_OS/Building/FOTA_community_builds">Building and installing FOTA community builds</a></li> + <li><a href="/en-US/Firefox_OS/Building_and_installing_Firefox_OS/B2G_Build_Variables_Reference_Sheet">B2G build variables reference sheet</a></li> + </ol> + </li> + <li><a href="/en-US/Firefox_OS/Developing_Firefox_OS" title="Hack the OS, customize your builds, get things the way you think they should be!">Developing Firefox OS</a> + <ol> + <li><strong><a href="/en-US/Firefox_OS/Developing_Firefox_OS">Developing Firefox OS overview</a></strong></li> + <li><a href="/en-US/Firefox_OS/Developing_Firefox_OS/Filing_bugs_against_Firefox_OS">Filing bugs against Firefox OS</a></li> + <li><a href="/en-US/Firefox_OS/Developing_Firefox_OS/modifying_hosts_file" title="A guide to what can be achieved by modifying the Firefox OS hosts file.">Modifying the hosts file</a></li> + <li><a href="/en-US/Firefox_OS/Customization_with_the_.userconfig_file" title="How to customize the build and execution of Firefox OS by changing the .userconfig file.">Customization with the .userconfig file</a></li> + <li><a href="/en-US/Firefox_OS/Developing_Firefox_OS/Customizing_the_b2g.sh_script">Customizing the b2g.sh script</a></li> + <li><a href="/en-US/Firefox_OS/Developing_Firefox_OS/Porting" title="Information about how to port Firefox OS to new devices.">Porting Firefox OS</a></li> + </ol> + </li> + <li><a href="/en-US/Firefox_OS/Developing_Gaia">Developing Gaia</a> + <ol> + <li><strong><a href="/en-US/Firefox_OS/Developing_Gaia">Developing Gaia overview</a></strong></li> + <li><a href="/en-US/Firefox_OS/Developing_Gaia/Running_the_Gaia_codebase">Running the Gaia codebase</a></li> + <li><a href="/en-US/Firefox_OS/Developing_Gaia/Understanding_the_Gaia_codebase">Understanding the Gaia codebase</a></li> + <li><a href="/en-US/Firefox_OS/Developing_Gaia/Making_Gaia_code_changes">Making Gaia code changes</a></li> + <li><a href="/en-US/Firefox_OS/Developing_Gaia/Test_Gaia_code_changes">Testing Gaia code changes</a></li> + <li><a href="/en-US/Firefox_OS/Developing_Gaia/Submitting_a_Gaia_patch">Submitting a Gaia patch</a></li> + <li><a href="/en-US/Firefox_OS/Platform/Gaia/Build_System_Primer">Gaia build system primer</a></li> + <li><a href="/en-US/Firefox_OS/Developing_Gaia/Customizing_build-time_apps">Customizing build-time apps</a></li> + <li><a href="/en-US/Firefox_OS/Developing_Gaia/Market_customizations_guide">Market customizations guide</a></li> + <li><a href="/en-US/Firefox_OS/Developing_Gaia/Customizing_the_keyboard">Customizing the keyboard in Firefox OS apps</a></li> + <li><a href="/en-US/Firefox_OS/Developing_Gaia/Localizing_Firefox_OS">Localizing Firefox OS</a></li> + <li><a href="/en-US/Firefox_OS/Developing_Gaia/L10n_Best_Practices">L10n Best Practices</a></li> + <li><a href="/en-US/Firefox_OS/Developing_Gaia/make_options_reference">Make options reference</a></li> + <li><a href="/en-US/Firefox_OS/Developing_Gaia/Gaia_tools_reference">Gaia tools reference</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Add-ons">Firefox OS add-ons</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Add-ons">Firefox OS add-ons overview</a></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Add-ons/Developing_Firefox_OS_add-ons">Developing Firefox OS add-ons</a></li> + </ol> + </li> + <li><a href="/en-US/Firefox_OS/Phone_guide" title="A developer's guide to the Firefox OS developer phones available.">Firefox OS phone guide </a> + <ol> + <li><strong><a href="/en-US/Firefox_OS/Phone_guide">Firefox OS phone guide overview</a></strong></li> + <li><a href="/en-US/Firefox_OS/Developer_phone_guide/Phone_specs">Phone and device specs</a></li> + <li><a href="/en-US/Firefox_OS/Developer_phone_guide/Geeksphone">Geeksphone</a></li> + <li><a href="/en-US/Firefox_OS/Developer_phone_guide/ZTE_OPEN">ZTE OPEN</a></li> + <li><a href="/en-US/Firefox_OS/Developer_phone_guide/ZTE_OPEN_C">ZTE OPEN C</a></li> + <li><a href="/en-US/Firefox_OS/Developer_phone_guide/Flame">Flame</a></li> + <li><a href="/en-US/Firefox_OS/Developer_phone_guide/Firefox_OS_device_features">General device features</a></li> + <li><a href="/en-US/Firefox_OS/Troubleshooting" title="A guide to resolving common problems with Firefox OS.">Troubleshooting</a></li> + <li><a href="/en-US/Firefox_OS/Developer_phone_guide/Best_practices_open_reference_devices">Best practices for open reference devices</a></li> + </ol> + </li> + <li><a href="/en-US/Firefox_OS/TVs_connected_devices">Firefox OS on TVs and connected devices</a> + <ol> + <li><strong><a href="/en-US/Firefox_OS/TVs_connected_devices">TVs and connected devices overview</a></strong></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/TVs_connected_devices/How_to_connect_WebIDE_to_TV_%28VIErA%29">How to connect WebIDE to TV (VIERA CX/CR series)</a></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/TVs_connected_devices/TV_broadcast_streams_Firefox_OS">TV broadcast streams on Firefox OS products</a></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/TVs_connected_devices/Web_animations_on_large_screen">Web animations on large screens</a></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/TVs_connected_devices/TV_remote_control_navigation">Implementing TV remote control navigation</a></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Keyboard_events_in_Firefox_OS_TV">Keyboard events in Firefox OS TV</a></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/TVs_connected_devices/TV_remote_control_button_mapping_to_keyboard">TV remote control button mapping to keyboard</a></li> + <li><a href="/en-US/docs/Web/Apps/Design/Firefox_OS_TV_UX">Firefox OS for TV UX Overview</a></li> + </ol> + </li> + <li><a href="/en-US/Firefox_OS/Releases" title="This section of the site contains release notes, explaining what new features and changes of significance to developers have landed in each new release of Gaia and Gecko on Firefox OS.">Firefox OS release notes</a> + <ol> + <li><a href="/en-US/Firefox_OS/Releases">Firefox OS release notes overview</a></li> + <li><a href="/en-US/Firefox_OS/Releases/2.2">Firefox OS 2.2 for developers</a></li> + <li><a href="/en-US/Firefox_OS/Releases/2.1">Firefox OS 2.1 for developers</a></li> + <li><a href="/en-US/Firefox_OS/Releases/2.0">Firefox OS 2.0 for developers</a></li> + <li><a href="/en-US/Firefox_OS/Releases/1.4">Firefox OS 1.4 for developers</a></li> + <li><a href="/en-US/Firefox_OS/Releases/1.3">Firefox OS 1.3 for developers</a></li> + <li><a href="/en-US/Firefox_OS/Releases/1.2">Firefox OS 1.2 for developers</a></li> + <li><a href="/en-US/Firefox_OS/Releases/1.1">Firefox OS 1.1 for developers</a></li> + <li><a href="/en-US/Firefox_OS/Releases/1.0.1">Firefox OS 1.0.1 for developers</a></li> + </ol> + </li> + <li><a href="/en-US/Firefox_OS/Automated_testing">Automated testing</a> + <ol> + <li><strong><a href="/en-US/Firefox_OS/Automated_testing">Firefox OS automated testing overview</a></strong></li> + <li><a href="/en-US/Firefox_OS/Running_Tests_on_Firefox_OS_for_Developers">Running tests on Firefox OS: A guide for developers</a></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Automated_testing/gaia-ui-tests" title="/en-US/docs/Mozilla/Firefox_OS/Automated_testing/gaia-ui-tests">Gaia UI tests</a></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Automated_testing/Gaia_integration_tests">Gaia integration tests</a></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Automated_testing/Gaia_unit_tests" title="/en-US/docs/Mozilla/Firefox_OS/Automated_testing/Gaia_unit_tests">Gaia unit tests</a></li> + <li><a href="/en-US/Firefox_OS/Automated_testing/Gaia_performance_tests">Gaia performance tests</a></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Automated_testing/Mochitests" title="/en-US/docs/Mozilla/Firefox_OS/Automated_testing/Mochitests"><span class="gm-spell gm_ gm_8ea2aeb5-60d9-d796-930f-2db1e4217eaa">Mochitests</span></a></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Automated_testing/Reftests" title="/en-US/docs/Mozilla/Firefox_OS/Automated_testing/Reftests"><span class="gm-spell gm_ gm_9567400a-e713-3d43-ffa9-05fd8c3a28a2">Reftests</span></a></li> + <li><a href="/en-US/docs/Marionette/Marionette_JavaScript_Tests" title="/en-US/docs/Marionette/Marionette_JavaScript_Tests">WebAPI tests</a></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Automated_testing/XPCShell" title="/en-US/docs/Mozilla/Firefox_OS/Automated_testing/XPCShell"><span class="gmw_"><span class="gm-spell gm_ gm_cc093417-aacf-72e2-e15f-c15a7509a6a8">xpcshell</span> tests</span></a></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Automated_testing/MTBF_tests">MTBF test</a></li> + <li><a href="/en-US/docs/Marionette" title="/en-US/docs/Marionette">Marionette</a></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Automated_testing/Treeherder">Treeherder</a></li> + </ol> + </li> + <li><a href="/en-US/Firefox_OS/Debugging" title="A guide to debugging both your mobile apps and Firefox OS itself.">Debugging</a> + <ol> + <li><strong><a href="/en-US/Firefox_OS/Debugging">Firefox OS debugging overview</a></strong></li> + <li><a href="/en-US/Firefox_OS/Debugging/Developer_settings">Developer settings for Firefox OS</a></li> + <li><a href="/en-US/Firefox_OS/Debugging/Connecting_a_Firefox_OS_device_to_the_desktop">Connecting a Firefox OS device to the desktop</a></li> + <li><a href="/en-US/Firefox_OS/Debugging/Setting_up">Setting up to debug Firefox OS using Firefox developer tools</a></li> + <li><a href="/en-US/Firefox_OS/Debugging/On-device_console_logging">On-device console logging</a></li> + <li><a href="/en-US/Firefox_OS/Debugging/Installing_ADB">Installing and using ADB</a></li> + <li><a href="/en-US/Firefox_OS/Firefox_OS_usage_tips/taking_screenshots">Taking screenshots</a></li> + <li><a href="/en-US/docs/Tools/WebIDE" title="A tool that allows you to install open web apps from your computer to a device capable of installing them (such as Firefox OS) - and debug any running app.">Using the WebIDE</a></li> + <li><a href="/en-US/Firefox_OS/Debugging/Firefox_OS_crash_reporting">Firefox OS crash reporting</a></li> + <li><a href="/en-US/Firefox_OS/Debugging/Debugging_OOMs">Debugging out of memory errors on Firefox OS</a></li> + <li><a href="/en-US/Firefox_OS/Debugging/Debugging_and_security_testing">Debugging and security testing with Firefox OS</a></li> + <li><a href="/en-US/Firefox_OS/Debugging/Debugging_B2G_using_gdb"><span class="gmw_">Debugging B2G using <span class="gm-spell gm_ gm_7a44a2c7-9d5d-e693-57b5-a88dd9adacd8">gdb</span></span></a></li> + <li><a href="/en-US/Firefox_OS/Debugging/Debugging_B2G_using_valgrind">Debugging B2G using Valgrind</a></li> + </ol> + </li> +</ol> diff --git a/files/pt-pt/archive/b2g_os/phone_guide/flame/index.html b/files/pt-pt/archive/b2g_os/phone_guide/flame/index.html new file mode 100644 index 0000000000..5f874186ca --- /dev/null +++ b/files/pt-pt/archive/b2g_os/phone_guide/flame/index.html @@ -0,0 +1,305 @@ +--- +title: Flame +slug: Archive/B2G_OS/Phone_guide/Flame +translation_of: Archive/B2G_OS/Phone_guide/Flame +--- +<p><img alt="A picture of the Flame device, showing the Firefox OS homescreen containing several app icons." src="https://mdn.mozillademos.org/files/8373/flame-dev-hud.png" style="float: left; margin-bottom: 20px; margin-right: 50px; width: 25%;"></p> + +<h2 id="Available_to_order" style="text-indent: 100%; white-space: nowrap; overflow: hidden; margin: 0; height: 0;">Available to order</h2> + +<p><span class="seoSummary">The Flame developer reference phone is a milestone in Firefox OS device releases. The Flame hardware offers a representative set of specs — including FWVGA display and dual-core processor — to help developers build great content and experiences. A single hardware platform is also good for testers, making it easier to test and address specific software issues without having to worry about device model-specific bugs, etc.</span></p> + +<p style="">If you have your phone in hand and want to start playing with it, developing and distributing apps, or contributing to the Firefox platform, the following links will get you where you need to go:</p> + +<ul> + <li><a href="/en-US/Firefox_OS">Firefox OS zone</a>: For creating your own Firefox OS builds and contributing to the B2G and Gaia projects.</li> + <li><a href="/en-US/Apps">App Center zone</a>: For building open web apps compatible with Firefox OS.</li> + <li><a href="/en-US/Marketplace">Marketplace zone</a>: For information on publishing and distributing apps.</li> + <li><a href="https://marketplace.firefox.com/">Firefox Marketplace</a>: The best place to find and publish new Firefox OS apps.</li> +</ul> + +<p style="">If you’d like to find out more about updating the operating system, recovering it, pushing apps to it, or phone specs, you’ll find the information you need below.</p> + +<h2 id="Purchasing_a_device">Purchasing a device</h2> + +<p>Our device manufacturer partner has made the device <a href="http://www.everbuying.com/product549652.html">available to order</a> on everbuying.com, for US$170 including global shipping (device cost is $145, shipping is $25 and custom fees may still apply, depending on the destination country). The device is bootloader- and carrier-unlocked, and it utilizes a quad-band GSM+UMTS radio so that it can work with a wide variety of operators/carriers.</p> + +<div class="note"> +<p><strong>Note</strong>: Another option for getting hold of a Flame is to participate in our <a href="https://hacks.mozilla.org/2014/05/build-your-next-app-with-a-flame/">Flames for Apps scheme</a>, aimed at experienced HTML5 app developers wishing to port their highly-rated apps onto Firefox OS.</p> +</div> + +<h2 id="Important_steps_to_follow_first">Important steps to follow first</h2> + +<p>There are a couple of steps you should make sure you follow for your particular operating system, before you start trying to update your device, for example by updating your Flame's version of Firefox OS, or pushing apps to your phone (both are covered below.)</p> + +<h3 id="All_operating_systems">All operating systems</h3> + +<p>You need to install ADB and Fastboot on your computer — these are applications that allow you to interact with your phone from your computer when the two are connected via the phone's USB charger cable. They are needed for Flashing your phone to a new version of Firefox OS, recovering from an unresponsive state, pushing apps to your phone, etc.</p> + +<div class="note"> +<p><strong>Note</strong>: If you are on Ubuntu you can install ADB and Fastboot simply by using <code>sudo apt-get install android-tools-adb android-tools-fastboot</code> on the command line.</p> +</div> + +<p>ADB and Fastboot are available in the <a class="external external-icon" href="http://developer.android.com/sdk/index.html" title="Android Developer Tookit">Android Developer Toolkit</a>:</p> + +<ol> + <li>Go to this link</li> + <li>Press the <em>Download Eclipse ADT</em> button</li> + <li>Agree to the license conditions</li> + <li>Choose between the 32-bit and 64-bit version (32-bit will do if you are not sure)</li> + <li>Click the final <em>Download Eclipse ADT with the Android SDK...</em> button.</li> + <li>Once the download is complete, unzip the zip file's contents onto your computer's desktop</li> + <li>The folder name is a bit complicated; rename it to just <em>adt</em></li> +</ol> + +<p>ADB is a tool that you run from the command line. If you open your terminal/command prompt, go to adt/sdk/platform-tools and run the <code>adb</code> command, you should see a load of information thrown back at you about what you can do with ADB. Running <code>adb devices</code> should return the line <code>List of devices attached</code>, and nothing else, because you haven't got any devices attached yet.</p> + +<p>But at this point, you need to set the PATH variable to point to the ADB tool, so you can run it from anywhere, not just when you are in the exact directory that ADB is in. To do this:</p> + +<ul> + <li>On Windows 8 (Windows 7 will be very similar, but with slightly different menu options):</li> + <li>right click on the Windows button in the bottom left and select Control Panel > System and Security > System > Advanced System settings > Environment Variables.</li> + <li>In the <em>System variables</em> list, find the one called Path, select it, then click <em>Edit...</em></li> + <li>In the <em>Variable value</em> text field of the resulting dialog box, make sure you are at the end of the big string of characters in the box, then type a semi colon (;), followed by the location of the adb tool on your system, which should be <em>C:\Users\[YOUR USER NAME]\Desktop\adt\sdk\platform-tools</em>.</li> + <li>So if your user name is jamessmith, you would enter ;<em>C:\Users\jamessmith\Desktop\adt\sdk\platform-tools</em>.</li> + <li>Press ok on all the dialog boxes you got up in this section.</li> + <li>Close your command prompt, open a new one, and test it by typing <code>adb devices</code>. If it comes up with <code>List of devices attached</code>, you are successful!</li> +</ul> + +<p>On Mac/Linux:</p> + +<ul> + <li>In Finder app, go to your home folder (the one with the house icon)</li> + <li>If you can't already see hidden files (for example, system files with dots (.) at the beginning), go to Terminal, enter the command <code>defaults write com.apple.finder AppleShowAllFiles YES</code>, then restart Finder</li> + <li>Open your .bash_profile or .bashrc file in a plain text editor like Text Wrangler or Sublime Text (it needs to be a plain text editor.)</li> + <li>Inside the file, add a new line PATH=/Users/chrismills/Desktop/adt/sdk/platform-tools:$PATH</li> + <li>Save and close the file.</li> + <li>Restart your terminal, and test it by typing <code>adb devices</code>. If it comes up with <code>List of devices attached</code>, you are successful!</li> +</ul> + +<h3 id="Linux_and_Mac">Linux and Mac</h3> + +<p>No additional steps should be required if you are using a Linux or Mac system, although depending on your Linux distro, you might need to <a href="https://developer.mozilla.org/en-US/Firefox_OS/Firefox_OS_build_prerequisites#For_Linux.3A_configure_the_udev_rule_for_your_phone">add a udev rule</a> for your phone.</p> + +<p>The udev rule for the Flame should look something like the following:</p> + +<pre>SUBSYSTEM=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9025", GROUP="users", MODE="0666"</pre> + +<p>Make sure to <code>--reload-rules</code>, then unplug and replug and your device before continuing.</p> + +<h3 id="Windows">Windows</h3> + +<p>To access the Flame device with the <a href="/en-US/Firefox_OS/Using_the_App_Manager">App Manager</a>/<a href="/en-US/Firefox_OS/Debugging/Installing_ADB">ADB</a>, a USB driver is required. Follow the steps outlined in the below sections to install it.</p> + +<h4 id="Downloading_the_driver">Downloading the driver</h4> + +<p><a href="http://cds.w5v8t3u9.hwcdn.net/Alcatel_USB_Driver_Q_4.0.0_2013_11_11_noinstall.zip">Download the Windows driver from this location</a>. Once downloaded, extract the contents of the ZIP file to a suitable place on your hard drive.</p> + +<div class="note"> +<p><strong>Note</strong>: The Android Debug Bridge (<a href="/en-US/Firefox_OS/Debugging/Installing_ADB">ADB</a>) must be installed first.</p> +</div> + +<h4 id="Installing_the_USB_Driver">Installing the USB Driver</h4> + +<p>At this point, connect your Flame device to your computer using a USB cable.</p> + +<p>To install the driver, open the <code>Alcatel_USB_Driver_Q_4.0.0_2013_11_11_noinstall</code> directory within the extracted ZIP file and double click on the <code>DriverInstaller.exe</code> executable. You may receive a warning at this point that the executable is from an unknown publisher. If so, select the <em>Yes</em> button and the executable will be launched.</p> + +<p><img alt="Simple dialog box showing a picture of a phone along with install and uninstall buttons." src="https://mdn.mozillademos.org/files/8079/driver-install.png" style="display: block; height: 523px; margin: 0px auto; width: 358px;"></p> + +<p>Click on the <em>Install</em> button to install the driver.</p> + +<p>After the driver installs, you can check that it is working by opening a command line window and typing <code>adb devices</code>. This should list the connected device with an output something like:</p> + +<pre>List of devices attached +3561d02a device</pre> + +<p>If your device is not showing up here, check in the Windows Device Manager. Your Flame may be showing up as "ACER ADB Interface". You can confirm this by unplugging the device and seeing if it disappears from the device manager. Uninstall the driver software by right-clicking on "ACER ADB Interface" and clicking uninstall. Be sure to check the box in the dialog to delete the driver software. Now re-run the installer above. It is advisable to set the screen timeout on your Flame to something high (<em>Settings</em> > <em>Display</em> > <em>Screen timeout</em>) as Windows sometimes appears to reinstall the default drivers when the screen turns off.</p> + +<h2 id="Updating_your_Flame's_software">Updating your Flame's software</h2> + +<p>We will have two main "channels" of Firefox OS software version releases for the Flame phone:</p> + +<ul> + <li>The first channel is our release channel. Flames ship with this channel and will receive over-the-air updates for future major versions, that is, Flames will update from 1.3 to 1.4, 2.0 to 2.1, etc.</li> + <li>The second channel is our nightly channel. Flames can be flashed to this channel, and after the initial flashing will get over the air updates on a daily or nearly daily basis.</li> +</ul> + +<p>While our partners are working out a final storage solution for the software builds, you can get recovery files and tools at the following storage locations:</p> + +<ul> + <li><a href="http://cds.w5v8t3u9.hwcdn.net/v123.zip">Base image v123.zip</a>: An archive containing the Flame's base image of Firefox OS 1.3. To install this, simply unzip the file, and run the script (./flash.sh).</li> +</ul> + +<p>To install the base image on your device:</p> + +<ol> + <li>Make sure remote debugging is enabled on your Flame, using the <em>Remote debugging/Debugging via USB</em> option in the device's <a href="/en-US/Firefox_OS/Debugging/Developer_settings">Developer settings</a> (the option is different, depending on whether you have Firefox 1.3 and under, or Firefox 1.4+ installed).</li> + <li>Connect your Flame to your computer via a USB cable if it isn't already. Verify that the computer is connected to the device by running the <code>adb devices</code> command in a terminal.</li> + <li>Download and Extract the <code>.zip</code> file referenced above. Unzip it onto your Desktop.</li> + <li>Go into the directory you extracted the software into and run it: + <ul> + <li>On Windows, enter the directory in your command prompt, then run the <code>flash.bat</code> script using <code>flash.bat</code>.</li> + <li>On Linux / OSX, enter the directory in your terminal, then run the <code>flash.sh</code> script using <code>sudo ./flash.sh</code> (if you don't run it using <code>sudo</code>, the flash script may fail to see your device, and it won't work).</li> + </ul> + </li> +</ol> + +<div class="note"> +<p><strong>Note</strong>: You are also welcome to build your own builds to install on the Flame: see <a href="/en-US/Firefox_OS/Building_and_installing_Firefox_OS">Building and installing Firefox OS</a>.</p> +</div> + +<h3 id="Updating_your_Flame_to_a_nightly_build">Updating your Flame to a nightly build</h3> + +<div class="note"> +<p><strong>Note</strong>: For this current build, Nightly development builds of Firefox OS do not support A-GPS, which may lead to slow performance of GPS functionality. We plan to resolve this in an updated future Nightly channel.</p> +</div> + +<ol> + <li>Before updating your phone to a Nightly build you should flash the latest base image to make sure the underlying systems are up to date. Download a base image and use it to update your device's software, as explained above.</li> + <li>Because the above step installs a fresh operating system on your device, you'll need to enable remote debugging on your Flame again, using the <em>Remote debugging </em>option in the device's <a href="/en-US/Firefox_OS/Debugging/Developer_settings">Developer settings</a>.</li> + <li>Next, choose a Nightly build to install (found on <a href="http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/">http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/</a>.) You'll want one of the following: + <ul style="margin-left: 40px;"> + <li>Production builds (including locales) + <ul> + <li><a href="http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central-flame/">Latest master builds</a> (currently 2.1)</li> + <li><a href="http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-b2g32_v2_0-flame/">Latest v2.0</a></li> + <li><a href="http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-b2g30_v1_4-flame/">Latest v1.4</a></li> + </ul> + </li> + <li>Engineering builds (with test apps and only pseudo-locales) + <ul> + <li><a href="http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central-flame-eng/">Latest master builds</a> (currently 2.1)</li> + <li><a href="http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-b2g32_v2_0-flame-eng/">Latest v2.0</a></li> + <li><a href="http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-b2g30_v1_4-flame-eng/">Latest v1.4</a></li> + </ul> + </li> + </ul> + </li> + <li>Pick a version and download both the <code>b2g-XX.XX.en-US.android-arm.tar.gz</code> and <code>gaia.zip</code> files. Save them inside a directory on your Desktop called something like <code>fxos</code>.</li> + <li>Download the <a href="https://github.com/Mozilla-TWQA/B2G-flash-tool/blob/master/shallow_flash.sh">shallow flash script</a> and save it in the same directory as the above two files: follow the link, press the <em>Raw</em> button, then use your browser's save functionality to save the page directly as <code>shallow_flash.sh</code>.</li> + <li>In your Terminal, <code>cd</code> into the directory you saved the files in and Flash the builds to your phone using the following command: + <h4 id="Mac">Mac</h4> + + <pre class="brush: bash">./shallow_flash.sh -g gaia.zip -G b2g-XX.XX.en-US.android-arm.tar.gz</pre> + + <h4 id="Linux">Linux</h4> + + <pre class="brush: bash">./shallow_flash.sh -ggaia.zip -Gb2g-XX.XX.en-US.android-arm.tar.gz +</pre> + + <h4 id="Windows_(Note_instruction_still_being_worked_out_may_not_work_yet)">Windows (Note: instruction still being worked out, may not work yet)</h4> + + <pre class="brush: bash">shallow_flash.sh -g gaia.zip -G b2g-XX.XX.en-US.android-arm.tar.gz +</pre> + </li> +</ol> + +<div class="note"> +<p><strong>Note</strong>: If you get a "permission denied" error when running the above command, your shell script probably doesn't have the right permissions. Running <code>chmod +x shallow_flash.sh</code> on it should solve this problem.</p> +</div> + +<div class="note"> +<p><strong>Note</strong>: A "shallow flash" updates <a href="/en-US/docs/Mozilla/Gecko">Gecko</a> and <a href="/en-US/Firefox_OS/Platform/Gaia">Gaia</a> plus data directories, as opposed to a full flash, which updates Gecko/Gaia, but also the underlying <a href="/en-US/Firefox_OS/Platform/Gonk">Gonk</a> layer and associated binaries particular to that device type. This is why it is a good idea to update to the official base image first, as suggested above, then shallow flash over the top of that, once you've got the Gonk/binary layer right.</p> +</div> + +<div class="warning"> +<p id="Shallow_flash_flashes_more_than_just_Gecko_and_Gaia_so_all_the_data_on_the_device_is_lost!"><strong>Important</strong>: When running a shallow or full flash, your phone data will be overwritten: you should therefore back up your data before updating!</p> +</div> + +<p>Once the install procedure finishes the phone should reboot into the updated build and display the first time user workflow.</p> + +<h4 id="Font_fix">Font fix</h4> + +<p>After updating Gecko and Gaia to nightly with the v123 base image, there will be a mismatch between the fonts that Gecko and Gaia expects and what the base image provides. To fix this, download our <a href="https://people.mozilla.org/~mwu/fira-font-update.zip">font update package</a>, extract it, navigate into the directory created by extracting, and run the supplied <code>flash.sh</code> script.</p> + +<div class="note"> +<p><strong>Note</strong>: Another option is to use the <a href="https://github.com/Mozilla-TWQA/B2G-flash-tool/blob/master/update_system_fonts.sh"><code>update_system_fonts.sh</code></a> script, which will download and flash the system fonts automatically.</p> +</div> + +<h3 id="Fastboot_mode">Fastboot mode</h3> + +<p>If flashing a new build to your phone fails to work, your phone may become unresponsive, leading to the phone rebooting in recovery mode. The recovery mode provides few options (<em>Reboot</em>, <em>Update from adb</em>, <em>Wipe data</em>, <em>Wipe cache</em>, and <em>Update from sdcard</em>). Unfortunately, selecting <em>Update from adb</em> triggers a sideload mode in which you cannot use the other adb commands. The <code>adb sideload</code> command would work but the various flash scripts rely on other adb commands.</p> + +<p>From sideload mode, you can force fastboot mode as follows:</p> + +<ol> + <li>Power off the phone (which may involve removing the battery in extreme cases...)</li> + <li>Plug in the USB cable.</li> + <li>Power the phone up again by pressing the Volume Down and Power buttons together.</li> +</ol> + +<p>The phone should only display the very first static logo and stay there, without displaying the boot animation. It seems stuck but is not really: it is in fastboot mode and is waiting for a USB connection. At this point, a USB-connected, computer with adb installed should see the phone listed when the <code>fastboot devices</code> command is run. Note that regular adb would not see the device — only fastboot sees it. In this mode, you can use the flash script to install v123 as explained above. As the script does use both adb and fastboot commands, you may see some initial error and warnings from adb, but the device should be flashed properly at the end of the procedure.</p> + +<h3 id="Emergency_download_mode">Emergency download mode</h3> + +<p>If flashing a new build to your phone fails to work, your phone becomes unresponsive, and the phone cannot enter fastboot mode, you can use emergency mode for recovery. A USB cable and the <a href="http://cds.w5v8t3u9.hwcdn.net/Flame%20Rescue%20Tool.zip">Emergency Download Tool</a> are required to enter emergency download mode. Install this tool and follow the instructions.</p> + +<h3 id="Recovery_mode">Recovery mode</h3> + +<p>You can enter recovery mode to clear your phone data or manually update the firmware. There are two ways to enter this mode:</p> + +<ul> + <li>If <a href="/en-US/Firefox_OS/Debugging/Installing_ADB">ADB</a> tools are available, make sure Remote debugging is turned on in the phone's <a href="/en-US/Firefox_OS/Debugging/Developer_settings#Remote_debugging">Developer settings</a>, connect your phone to your computer via USB and enter <code>adb reboot recovery</code> on the command line.</li> + <li>If your phone is powered off, press the Volume Up + Power buttons together.</li> +</ul> + +<p>When in recovery mode, press the Volume up/down keys to move the selection highlight, and the Power key to select. Make sure you have your phone data (Contacts, SMS, etc.) backed up before clearing data, and your upgrade packages downloaded before updating.</p> + +<h2 id="Pushing_apps_to_your_Flame">Pushing apps to your Flame</h2> + +<p>The App Manager tool makes it easy to push apps to your phone, for testing, etc. Full instructions are available in the article <a href="/en-US/Firefox_OS/Using_the_App_Manager">Using the App Manager</a>.</p> + +<div class="note"> +<p><strong>Note</strong>: If you are running Firefox Nightly, you can instead make use of our next generation <a href="/en-US/docs/Tools/WebIDE">WebIDE</a> tool, which performs the same functions as the App Manager, plus more.</p> +</div> + +<h2 id="RAM_adjustment">RAM adjustment</h2> + +<p>You can adjust the available RAM capacity to see how apps perform on Firefox OS phones with lower memory footprints.</p> + +<p>This is accomplished by entering fastboot mode (install fastboot first, which is available on the same SDK page as <a href="/en-US/Firefox_OS/Debugging/Installing_ADB">ADB</a>) and typing:</p> + +<pre class="brush: bash">adb reboot bootloader +fastboot oem mem [0|256-1024]</pre> + +<p>“0” is the memory automatically detected and “256-1024” is the number of megabytes. For example, if you want to adjust device RAM capacity to 512M, enter <code>fastboot oem mem 512</code>.</p> + +<p>You'll need to then reboot your device for the settings to take effect. This can be done using:</p> + +<pre class="brush: bash">fastboot reboot</pre> + +<p>The current memory size can be returned by entering fastboot mode and typing:</p> + +<pre class="brush: bash">fastboot getvar mem +</pre> + +<h2 id="Network_and_Device_specs">Network and Device specs</h2> + +<p><strong>Network</strong>:</p> + +<ul> + <li>802.11b/g/n wireless internet</li> + <li>GSM 850/900/1800/1900MHz</li> + <li>UMTS 850/900/1900/2100MHz</li> +</ul> + +<p><strong>Hardware</strong>: You can find more of the hardware features listed on our <a href="/en-US/Firefox_OS/Developer_phone_guide/Phone_specs">Phone and device specs page</a>.</p> + +<p>Additional features include:</p> + +<ul> + <li>NFC</li> + <li>Bluetooth 3.0</li> + <li>Accelerometer</li> + <li>FM radio</li> + <li>Proximity Sensor</li> + <li>GPS W / A-GPS support</li> + <li>Ambient Light Sensor</li> +</ul> + +<h2 id="See_also">See also</h2> + +<ul> + <li><a href="https://hacks.mozilla.org/2014/08/videos-getting-started-with-your-flame-device/">Getting started with your Flame</a>: How-to videos by Chris Heilmann</li> +</ul> diff --git a/files/pt-pt/archive/b2g_os/phone_guide/index.html b/files/pt-pt/archive/b2g_os/phone_guide/index.html new file mode 100644 index 0000000000..d90e90d259 --- /dev/null +++ b/files/pt-pt/archive/b2g_os/phone_guide/index.html @@ -0,0 +1,53 @@ +--- +title: Firefox OS developer phone guide +slug: Archive/B2G_OS/Phone_guide +tags: + - B2G + - Firefox OS + - Landing + - NeedsTranslation + - Phones + - TopicStub +translation_of: Archive/B2G_OS/Phone_guide +--- +<div class="summary"> + <p>This section contains developer information relevant to specific phones that run Firefox OS. We have general information available on <a href="/en-US/docs/Mozilla/Firefox_OS/Building_and_installing_Firefox_OS" title="Building and installing Firefox OS">Building and installing Firefox OS</a> and <a href="/en-US/docs/Mozilla/Firefox_OS/Hacking_Firefox_OS" title="/en-US/docs/Mozilla/Firefox_OS/Hacking_Firefox_OS">Hacking Firefox OS</a>, so please go there for information about building and installing the platform from scratch. Developers with specific phones in their possession may however find the following articles useful.</p> +</div> +<h2 id="Specific_device_information">Specific device information</h2> +<dl> + <dt> + <a href="/en-US/docs/Mozilla/Firefox_OS/Phones">Firefox OS phone data</a></dt> + <dd> + In this article we list the various available Firefox OS phones along with information such as their code names, availability, and specific hardware features.</dd> + <dt> + <a href="/en-US/Firefox_OS/Developer_phone_guide/Flame">Flame</a></dt> + <dd> + Information on Mozilla's high-end Firefox OS reference phone, codenamed the Flame, and produced in partnership with T<sup>2</sup>Mobile.</dd> + <dt> + <a href="/en-US/Firefox_OS/Developer_phone_guide/Geeksphone">Geeksphone</a></dt> + <dd> + In this article we cover some basic tips on how to keep your Geeksphone up-to-date and how to tweak the system Gaia applications.</dd> + <dt> + <a href="/en-US/docs/Mozilla/Firefox_OS/Developer_phone_guide/ZTE_OPEN">ZTE OPEN</a></dt> + <dd> + This article contains information on the ZTE OPEN Firefox OS device.</dd> + <dt> + <a href="/en-US/Firefox_OS/Developer_phone_guide/ZTE_OPEN_C">ZTE OPEN C</a></dt> + <dd> + The ZTE Open C is an updated ZTE-produced Firefox OS device, with higher end hardware and newer software.</dd> +</dl> +<h2 id="General_Firefox_OS_information">General Firefox OS information</h2> +<dl> + <dt> + <a href="/en-US/Firefox_OS/Developer_phone_guide/Firefox_OS_device_features">General device features</a></dt> + <dd> + This page lists typical Firefox OS hardware features and minimum hardware requirements.</dd> + <dt> + <a href="/en-US/docs/Mozilla/Firefox_OS/Troubleshooting">Troubleshooting</a></dt> + <dd> + This article provides tips for resolving common problems you may have while using Firefox OS.</dd> + <dt> + <a href="/en-US/Firefox_OS/Developer_phone_guide/Best_practices_open_reference_devices">Best practices for open reference devices</a></dt> + <dd> + A set of best practices that we believe should come highly recommended for any widely available open reference devices. All of the recent Firefox OS reference devices have followed these practices.</dd> +</dl> diff --git a/files/pt-pt/archive/b2g_os/simulator/index.html b/files/pt-pt/archive/b2g_os/simulator/index.html new file mode 100644 index 0000000000..1c8c9341a6 --- /dev/null +++ b/files/pt-pt/archive/b2g_os/simulator/index.html @@ -0,0 +1,118 @@ +--- +title: Simulador do Firefox OS +slug: Archive/B2G_OS/Simulator +tags: + - Aplicações + - Ferramentas + - Firefox OS +translation_of: Archive/B2G_OS/Simulator +--- +<div class="note"> +<p>Esta página descreve o Simulador do Firefox OS para os programadores que segmentam o Firefox OS 1.2 ou superior. Se está a desenvolver aplicações para o Firefox OS 1.1, em vez disso, consulte a documentação do <a href="/en-US/docs/Tools/Firefox_OS_1.1_Simulator">Firefox OS 1.1 Simulator</a>.</p> +</div> + +<p><span style="line-height: 1.5;">The Firefox OS Simulator is <span style="line-height: 1.5;">a version of the higher layers of Firefox OS</span> that simulates a Firefox OS device, but runs on the desktop</span><span style="line-height: 1.5;">. This means that in many cases, you don't need a real device to test and debug your app. </span><span style="line-height: 1.5;">It runs in a window the same size as a Firefox OS device, includes the Firefox OS user interface and built-in apps, and simulates many of the Firefox OS device APIs.</span></p> + +<p><span style="line-height: 1.5;">The Simulator is packaged and distributed as a Firefox add-on. Once you've downloaded it and installed it in Firefox, you can run it, push apps to it, and attach the developer tools to it using the <a href="/en-US/Firefox_OS/Using_the_App_Manager">App Manager</a> tool or </span><a href="/docs/Tools/WebIDE"><span style="line-height: 1.5;">WebIDE</span></a><span style="line-height: 1.5;">.</span></p> + +<h2 id="Instalação"><span style="line-height: 1.5;">Instalação</span></h2> + +<p><span style="line-height: 1.5;">To install the simulator, use <a href="/docs/Tools/WebIDE/Setting_up_runtimes#Adding_a_Simulator">WebIDE's Manage Extra Components pane</a> (available as part of Firefox 34 and onwards). Multiple versions are available, and you are advised to install them all, for maximum flexibility.</span></p> + +<div class="note"> +<p><span style="line-height: 1.5;">Starting with Firefox 43, the about:addons page may display warnings about your addon being unsigned. The simulators are properly signed at install time, however they are subsequently modified and thus appear "broken". They will continue to run successfully despite this warning message. Details are in {{ Bug(1197262) }}.</span></p> +</div> + +<p>To start the Simulator, you choose it from WebIDE's runtime list. For more details, see the <a href="/docs/Tools/WebIDE/Setting_up_runtimes#Selecting_a_runtime" style="font-size: 14px; font-weight: normal; line-height: 1.5;">instructions in the WebIDE documentation</a>. Once the Simulator's running, you can push apps to it and debug them using the WebIDE, just as you can with a real device.</p> + +<p>If you are using the <a href="/Firefox_OS/Using_the_App_Manager">App Manager</a> (an older tool available prior to the WebIDE), you can install a simulator via the following button:</p> + +<p><a href="https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/" style="margin-bottom: 20px; padding: 10px; color: white; text-align: center; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; display: inline-block; background-color: rgb(129, 188, 46); white-space: nowrap; text-shadow: rgba(0, 0, 0, 0.247059) 0px 1px 0px; box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px 0px, rgba(0, 0, 0, 0.298039) 0px -1px 0px 0px inset;">Instalar Simulador</a></p> + +<h2 id="A_IU_do_Simulador" style="line-height: 30px;">A IU do Simulador</h2> + +<p><span style="line-height: 22.00800132751465px;">The Simulator appears as a separate window, sized so the simulated screen area is 320x480 pixels. </span><span style="line-height: 22.00800132751465px;">To simulate touch events you can click the mouse button and drag while holding the button down. So by clicking and dragging right-to-left from the Home Screen, you'll see the built-in apps, as well as any apps you have added:</span></p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/7173/simulator-1.2.png" style="display: block; height: 623px; margin: 0px auto; width: 810px;"></p> + +<p>The Simulator has two buttons in a toolbar at the bottom:</p> + +<ul> + <li>the button on the left takes you to the Home screen, or switches the Simulator off if you hold it down</li> + <li>the button on the right switches the Simulator between portrait and landscape orientation. This will generate the <a href="https://developer.mozilla.org/en-US/docs/WebAPI/Managing_screen_orientation#Listening_orientation_change" title="/en-US/docs/WebAPI/Detecting_device_orientation">orientationchange</a> event.</li> +</ul> + +<h2 id="Emulação_do_cartão_SD">Emulação do cartão SD</h2> + +<p>In the Simulator the device SD card is mapped to the "fake-sdcard" directory in the Simulator's profile, which is itself located inside the "extensions" directory under the Firefox profile in which the Simulator is installed. For example:</p> + +<pre>/path/to/Firefox/Profiles/Firefox-profile-name/extensions/fxos_2_2_simulator@mozilla.org/profile/fake-sdcard</pre> + +<p>Files read or written using the <code><a href="/en-US/docs/Web/API/Navigator.getDeviceStorage">getDeviceStorage</a></code> API will appear here.</p> + +<p>Before version 2.2 of the Simulator, you had to create the "fake-sdcard" directory manually for this to work. From 2.2 onwards, the "fake-sdcard" directory is created for you automatically.</p> + +<p>Also from version 2.2 onwards, if you're running the Simulator from the command line you can define a different directory by passing the <code>--storage-path</code> option.</p> + +<div class="note"><strong>Note:</strong> this is mostly meant for API testing. Music will be read not from the "fake-sdcard" directory, but from your system's <code>~/Music</code>, pictures from <code>~/Pictures</code>, videos from <code>~/Videos</code>. Downloads go to <code>~/Downloads</code>. user-dirs.dirs redefinitions are supported.</div> + +<h2 id="Limitações_do_Simulador">Limitações do Simulador</h2> + +<p>Note that the Firefox OS Simulator isn't a perfect simulation.</p> + +<h3 id="Limitações_do_Hardware">Limitações do Hardware</h3> + +<p>Apart from screen size, the Simulator does not simulate the hardware limitations of a Firefox OS device such as available memory or CPU speed.</p> + +<h3 id="Codecs_de_áudiovídeo">Codecs de áudio/vídeo</h3> + +<p>The following codecs depend on hardware-accelerated decoding and are therefore not yet supported:</p> + +<ul> + <li>MP3</li> + <li>AAC</li> + <li>H.264 (MP4)</li> + <li>WebM</li> +</ul> + +<p>This means it isn't possible to use the Simulator to test video playback in apps and on websites like Youtube that rely on these codecs.</p> + +<h3 id="APIs_Não_Suportadas"><a name="Unsupported-APIs">APIs Não Suportadas</a></h3> + +<p>Certain APIs that work on the device won't work on the Simulator, generally because the supporting hardware is not available on the desktop. We've implemented simulations for some APIs such as geolocation, and expect to add more in future releases. However, at the moment the following APIs are not supported. Using them might throw errors or just return incorrect results:</p> + +<ul> + <li><a href="/en-US/WebAPI/WebTelephony" title="/en-US/WebAPI/WebTelephony">Telephony</a></li> + <li><a href="/en-US/docs/WebAPI/WebSMS" title="/en-US/docs/WebAPI/WebSMS">WebSMS</a></li> + <li><a href="/en-US/docs/WebAPI/WebBluetooth" title="/en-US/docs/WebAPI/WebBluetooth">WebBluetooth</a></li> + <li><a href="/en-US/docs/WebAPI/Using_Light_Events" title="/en-US/docs/WebAPI/Using_Light_Events">Ambient Light</a></li> + <li><a href="/en-US/docs/WebAPI/Proximity" title="/en-US/docs/WebAPI/Proximity">Proximity</a></li> + <li><a href="/en-US/docs/WebAPI/Network_Information" title="/en-US/docs/WebAPI/Network_Information">Network Information</a></li> + <li><a href="/en-US/docs/Online_and_offline_events" title="/en-US/docs/Online_and_offline_events">navigator.onLine and offline events</a></li> + <li><a href="/en-US/docs/WebAPI/Vibration" title="/en-US/docs/WebAPI/Vibration">Vibration</a></li> +</ul> + +<h2 id="Obter_ajuda"><a name="Simulator-help"></a>Obter ajuda</h2> + +<p><span style="line-height: 1.5;">If you have a question, try asking us on the </span><a href="https://lists.mozilla.org/listinfo/dev-developer-tools" style="line-height: 1.5;">dev-developer-tools mailing list</a><span style="line-height: 1.5;"> or on </span><a href="irc://irc.mozilla.org/#devtools" style="line-height: 1.5;">#devtools on irc.mozilla.org</a><span style="line-height: 1.5;">.</span></p> + +<h3 id="How_to_enable_verbose_logging"><a name="Simulator-verbose-logging"></a>How to enable verbose logging</h3> + +<p>You can see messages logged from your app in the <a href="/en-US/docs/Tools/Web_Console">Web Console</a>, which you can attach to your app using the <a href="/docs/Tools/WebIDE/Troubleshooting">WebIDE</a>. If you want to catch early messages happening during app startup, before the console gets connected and working, you can enable verbose logging in the Simulator.</p> + +<p>Visit about:config and <strong>create</strong> a new preference. The preference name is different for each version of the Simulator:</p> + +<ul> + <li>extensions.fxos_1_3_simulator@mozilla.org.sdk.console.logLevel for Firefox OS 1.3</li> + <li>extensions.fxos_1_2_simulator@mozilla.org.sdk.console.logLevel for Firefox OS 1.2</li> +</ul> + +<p>Set it to the string value "all", and disable, then reenable, the add-on in the Add-on Manager. Now extra messages about the Simulator's operation will appear in the <a href="/en-US/docs/Tools/Browser_Console">Browser Console</a>.</p> + +<h2 id="Criar_o_Simulador">Criar o Simulador</h2> + +<p>If you'd like to test patches to the Gecko or Gaia code that the Simulator contains, you may be interested in <a href="/en-US/Firefox_OS/Running_custom_builds_in_the_App_Manager">modifying the simulator</a> to use a custom Gecko build or Gaia profile. Alternatively, you can <a href="/en-US/Firefox_OS/Building_the_Firefox_OS_simulator">build a new Simulator</a> from your Gecko checkout.</p> + +<h2 id="Alternativas">Alternativas</h2> + +<p><a href="/en-US/Firefox_OS/Developing_Gaia/Different_ways_to_run_Gaia">Different ways to run Gaia</a> — including a list of them in <em>order</em> of ease for running and <em>reverse order</em> of closeness to the shipped product (according to it, Firefox OS Simulator is easiest but furthest).</p> diff --git a/files/pt-pt/archive/b2g_os/utilizar_o_gestor_de_aplicacões/index.html b/files/pt-pt/archive/b2g_os/utilizar_o_gestor_de_aplicacões/index.html new file mode 100644 index 0000000000..96d59b7659 --- /dev/null +++ b/files/pt-pt/archive/b2g_os/utilizar_o_gestor_de_aplicacões/index.html @@ -0,0 +1,283 @@ +--- +title: Utilizar o Gestor de Aplicações +slug: Archive/B2G_OS/Utilizar_o_Gestor_de_Aplicacões +translation_of: Archive/B2G_OS/Using_the_App_Manager +--- +<div class="warning"> +<p><strong>Importante</strong>: O Gestor de Aplicações deverá ser considerado desaprovado; o trabalho para remover o código do Gestor de Aplicações do Firefox já foi iniciado (consultar {{bug("1007061")}}), e se em vez disso, já utilizar <a href="/en-US/docs/Tools/WebIDE">WebIDE</a>, a menos que tenha uma boa razão para o não fazer.</p> +</div> + +<div class="summary"> +<p><span class="seoSummary">The App Manager is a tool for Firefox Desktop which provides a number of useful tools to help developers test, deploy and debug HTML5 web apps on Firefox OS phones & Simulator, directly from Firefox browser. This page documents how to use the App Manager.</span></p> + +<p>App Manager is available for Firefox OS 1.2 or later, lower versions are supported in <a href="/en-US/docs/Tools/Firefox_OS_1.1_Simulator">Firefox OS 1.1 Simulator</a>. The App Manager is being replaced by the <a href="/en-US/docs/Tools/WebIDE">WebIDE</a>, starting from Firefox 33. The WebIDE provides all the features of the App Manager and also features an editing environment to create and develop Firefox OS apps.</p> +</div> + +<p>{{EmbedYouTube("z1Bxg1UJVf0")}}</p> + +<p>The App Manager is composed of:</p> + +<ul> + <li>An <a href="#Apps_panel"><em>Apps panel</em></a>, which manages local apps (app source code located on your computer) and apps hosted externally, allowing you to package and install them on your device or simulator, and debug them using Toolboxes</li> + <li>A <a href="#Device_panel"><em>Device panel</em></a>, which displays information about the connected device including Firefox OS version installed, permissions required for using device APIs on the device, and apps installed</li> + <li><a href="/en-US/docs/Tools_Toolbox"><em>Toolboxes</em></a>, which are are sets of developer tools (web console, inspector, debugger, etc.) that can be connected to a running app via the Apps panel to perform debugging operations</li> +</ul> + +<h2 id="Quick_setup"><a name="Configuring_device">Quick setup</a></h2> + +<p>This section is designed to get you up and running as soon as possible; if you need some more detail please skip forward to the {{ anch("Device and system configuration") }} section and start reading from there. Also see the {{ anch("Troubleshooting") }} section for help if you are having trouble.</p> + +<ol> + <li>Make sure you have Firefox Desktop 26+ installed</li> + <li>Open the App Manager (in the URL bar, type <code>about:app-manager</code>, or go to <em>Tools > Web Developer > App Manager</em> in your Firefox menu.) This should appear in a new browser tab.</li> + <li>If you don't have a real device: + <ol> + <li><a href="https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/">Install the Firefox OS Simulator</a> add-on, then go back to the App Manager tab of your browser.</li> + <li>In App Manager's bottom toolbar, click on <em>Start Simulator</em>, then click on the name of the installed simulator, which should appear there.</li> + </ol> + </li> + <li>If you have a real device: + <ol> + <li>Make sure your device is running Firefox OS 1.2+</li> + <li>On Windows, make sure to install the drivers provided by your phone manufacturer</li> + <li>In the Settings of your device, disable Screen Lock (<code>Settings > Phone lock > <code>Lock Screen</code></code>) and enable Remote Debugging (<code>Settings > Device information > More information > Developer</code>)</li> + <li><a href="https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/">Install the ADB Helper</a> add-on in Firefox Desktop</li> + <li>Connect your device to your machine via a USB cable</li> + <li>You should see the name of your device in the App Manager's bottom bar. Click on it.</li> + </ol> + </li> + <li>The bottom bar should show "Connected to: xxx"</li> + <li>Click on the <em>Apps</em> panel and add an app (packaged or hosted)</li> + <li>The <em>Refresh</em> button validates your app and installs it on the Simulator/Device</li> + <li>The <em>Debug</em> button connects the developer tools to the running app</li> + <li><strong>See the {{ anch("Troubleshooting") }} section for help if you are having trouble</strong></li> +</ol> + +<h2 id="Device_and_system_configuration">Device and system configuration</h2> + +<p>The first thing you'll need to do when using the App Manager is make sure your system and phone are set up correctly. This section will run through all the steps required.</p> + +<h3 id="Firefox_OS_1.2_required">Firefox OS 1.2+ required</h3> + +<p>Make sure your device is running Firefox OS 1.2/Boot2Gecko 1.2 or higher. To check which version of Firefox OS the device is runing, go to <code>Settings > Device Information > Software</code>.</p> + +<p>If you don't have a high enough version installed, depending on what phone you have you will need to either install an available nightly build of Firefox 1.2+, or configure and build it yourself from source.</p> + +<p>Builds available:</p> + +<ul> + <li><a href="http://downloads.geeksphone.com/">Geeksphone Keon/Peak builds</a> (to find out more about using these, read <a href="/en-US/docs/Mozilla/Firefox_OS/Developer_phone_guide/Updating_and_Tweaking_Geeksphone">Updating and Tweaking your Firefox OS Developer Preview phone/Geeksphone</a>)</li> + <li>More to follow</li> +</ul> + +<div class="note"> +<p><strong>Note</strong>: To build your own Firefox OS 1.2+ distribution, follow the instructions located at <a href="/en-US/docs/Mozilla/Firefox_OS/Building_and_installing_Firefox_OS">Building and installing Firefox OS</a>, starting with <a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_build_prerequisites">Firefox OS build prerequisites</a>.</p> +</div> + +<h3 id="Remote_debugging">Remote debugging</h3> + +<p>Next, you need to enable remote debugging in Firefox OS. To do so, go to <code>Settings > Device information > More information > Developer</code> and check the Remote Debugging checkbox.</p> + +<h3 id="Adb_Helper_Add-on" name="Adb_Helper_Add-on">ADB or ADB helper</h3> + +<p>The process uses the Android Debug Bridge (ADB) to handle the device-computer connection and communication. There are two options for running ADB:</p> +<ul> + <li> + <p>Let Firefox handle ADB (recommended). <a class="external" href="https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/" rel="noopener">Install the ADB Helper add-on</a>, which makes the process easier. With this installed, there's no need to install the ADB, and no need to type the <code>adb forward</code> command: everything is handled by the add-on.</p> + <a class="download-button external ignore-external" href="https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/" rel="noopener">Download ADB Helper Add-on</a></li> + <li>Use ADB manually. You need to have it installed on your computer: download and install <code>adb</code> as explained in <a href="/en-US/Firefox_OS/Debugging/Installing_ADB">Installing ADB</a>. You'll need to enable port forwarding by entering the following command into your terminal: + <pre>adb forward tcp:6000 localfilesystem:/data/local/debugger-socket</pre> + Note that you'll need to do this every time the phone is restarted or unplugged then re-plugged.</li> +</ul> + +<div class="note"> +<p><strong>Note</strong>: There's no need to run this command if you installed the ADB Helper Add-on.</p> +</div> + +<h2 id="Connecting_your_device_to_the_App_Manager">Connecting your device to the App Manager</h2> + +<p>With all your configuration done, it's now time to plug your device into your computer and start the App Manager:</p> + +<ol> + <li>Plug the device into your computer via USB.</li> + <li>Disable Screen lock on your device by going to <code>Settings > Screen Lock</code> and unchecking the <code>Lock Screen</code> checkbox. This is a good idea because when the screen gets locked, the phone connection gets lost, meaning it is no longer available for debugging.</li> + <li>Start the App Manager — In Firefox Desktop select the <code>Tools > Web Developer > App Manager</code> menu option, or type <code>about:app-manager</code> in the URL bar.</li> + <li>At the bottom of the App Manager tab, you will see a connection status bar (see screenshot below). You should be able to connect your device by clicking the "Connect to localhost:6000" button.</li> + <li>If this works successfully, a prompt should appear on your device: "An incoming request to permit remote debugging connection was detected. Allow connection?". Tap the OK button (You may also have to press the power button on the phone so you can see the prompt.) The connection status bar should update to say "Connected to B2G", with a Disconnect button available to press if you want to cancel the connection.</li> +</ol> + +<p><img alt="" src="https://mdn.mozillademos.org/files/6263/connection-status.png" style="display: block; height: 30px; margin: 0px auto; width: 600px;"></p> + +<div class="note"> +<p><strong>Note</strong>: The other controls in the connection status bar allow you to connect a simulator to the App Manager, which we cover in the next section, below, and change the port that the connection happens on. If you change the port, you'll also need to enable port forwarding for this port as well, as instructed in the {{anch("Enable port forwarding")}} section, above.</p> +</div> + +<h2 id="Using_a_Firefox_OS_Simulator_Add-on"><a name="Simulator">Using a Firefox OS Simulator Add-on</a></h2> + +<p>If you haven't got a real device available to use with App Manager, you can still try it out using a <a href="/en-US/docs/Tools/Firefox_OS_Simulator">Firefox OS Simulator</a> Add-on. To start off, install the simulator with the following button (multiple versions are available; you are advised to install them all, for maximum flexibility):</p> + +<p><a class="download-button external ignore-external" href="https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/" rel="noopener">Install Simulator</a></p> + +<p>Once you've installed the simulator(s), you need to go to about:app-manager to see the connection status bar at the bottom of the App Manager tab, and click the "Start simulator" button. At least three buttons will appear:</p> + +<ul> + <li>"Firefox OS 1.3", "Firefox OS 1.2" ... etc. (or something similar): the left-most buttons contain the names of the simulator versions you have installed. Click one to start a connection to a simulator.</li> + <li>"Add": the middle button navigates to the simulator install links in this article, so you can add more Simulators (Firefox OS 1.3, Firefox OS 1.4, etc.)</li> + <li>"Cancel": the right hand button cancels the connection.</li> +</ul> + +<div class="note"> +<p><strong>Note</strong>: The Firefox OS 1.5 Simulator has been removed, as 1.5 was changed to 2.0. If you have the Firefox OS 1.5 Simulator installed, it won't automatically update to 2.0, so you should uninstall 1.5 and install 2.0 instead. The Firefox OS 2.0 simulator will then automatically update.</p> +</div> + +<div class="note"> +<p><strong>Note</strong>: The Firefox OS 1.2 Simulator has been removed, as no phones are likely to be released with version 1.2 installed — this version is therefore of limited value, and it makes more sense to spend your time debugging on other versions.</p> +</div> + +<h2 id="Running_custom_builds_in_the_App_Manager">Running custom builds in the App Manager</h2> + +<p>Note that you can run custom B2G Desktop and Gaia/Gecko builds in the App Manager via the simulator. Read <a href="/en-US/Firefox_OS/Running_custom_builds_in_the_App_Manager">Running custom Firefox OS/Gaia builds in the App Manager</a> for instructions on how to do this.</p> + +<h2 id="Apps_panel_Test_and_debug_Firefox_OS_apps"><a name="Apps_panel">Apps panel</a>: Test and debug Firefox OS apps</h2> + +<p>Now that everything is working, let's review the functionality available inside the App Manager, starting with the Apps panel. From here, you can import an existing app to push onto your device, for testing and debugging:</p> + +<ul> + <li>To install a locally stored app, click on the plus next to the "Add Packaged App" label and use the resulting file chooser dialog to select the directory your app is contained inside.</li> + <li>To install an externally hosted app, enter the absolute URL of the app's manifest file into the text field inside the "Add Hosted App" box, then press the plus button.</li> +</ul> + +<p>Information about your app should appear on the right hand side of the window, as seen below:</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/6261/apps-panel.png" style="display: block; height: 375px; margin: 0px auto; width: 600px;"></p> + +<h3 id="Manifest_editor">Manifest editor</h3> + +<p>From Firefox 28 onwards, the Apps Panel includes an editor for the app manifest:</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/6613/apps-panel-fx-28.png" style="display: block; margin: 0px auto; width: 600px;"></p> + +<h3 id="Debugging">Debugging</h3> + +<p>Clicking on <em>"Update"</em> will update (install) the app on the device. Clicking on <em>"debug"</em> will connect a toolbox to the app, allowing you to debug its code directly:</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/6265/debug.png" style="display: block; height: 375px; margin: 0px auto; width: 600px;"></p> + +<div class="note"> +<p>You'll enjoy playing around with the toolbox — try altering the DOM, CSS etc. and you'll see the updates reflected on the device in realtime. Such updates will be saved on the installed app code; you'll see them next time you open the app on the device.</p> +</div> + +<p>Before Firefox 28, the tools are launched in a separate window. From Firefox 28 onwards, the tools are launched in a separate tab in the App Manager itself, alongside the Apps and Device tabs. The tab is given your app's icon so it's easy to find:</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/6615/toolbox-fx-28.png" style="display: block; height: 375px; margin: 0px auto; width: 600px;"></p> + +<h3 id="Errors">Errors</h3> + +<p>If an app was not added successfully — for example if the URL was incorrect, or you selected a packaged app folder — an entry will be added to the page for this app, but this will include error information.</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/6259/apps-error.png" style="display: block; height: 375px; margin: 0px auto; width: 600px;"></p> + +<p>You can also delete an app from this view, by hovering over the App name/description on the left of the window, and pressing the "X" button that appears in each case. This however doesn't remove the app from the device. To do that you need to manually remove the app using the device itself.</p> + +<h2 id="Device_panel_2"><a name="Device_panel">Device panel</a></h2> + +<p>The <em>Device</em> tab displays information about the connected device. From the <em>"</em>Installed Apps<em>"</em> window, apps on the device can be started and debugged.</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/6267/device-tab.png" style="display: block; height: 375px; margin: 0px auto; width: 600px;"></p> + +<div class="note"> +<p>Note: Certified Apps are not listed by default. <a href="#Debugging_Certified_Apps">See how to debug certified apps</a>.</p> +</div> + +<p><a name="permissions"></a>The "Permissions" window shows the required privileges for different <a href="/en-US/docs/WebAPI">Web APIs</a> on the current device:</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/6269/permissions.png" style="display: block; height: 375px; margin: 0px auto; width: 600px;"></p> + +<p>Finally, you can take a screenshot of the current device display by clicking the "Screenshot" button. The screenshot appears in a new tab on Firefox, and from there you can save or discard it as you wish.</p> + +<h2 id="Debugging_Certified_Apps_2"><a name="Debugging_Certified_Apps">Debugging Certified Apps</a></h2> + +<p>Currently only devices running a development build of Firefox OS 1.2+ are capable of debugging certified apps. If you have a development build, you can enable certified app debugging by changing the pref <code>devtools.debugger.forbid-certified-apps</code> to <code>false</code> in your profile. To do this, follow the steps below:</p> + +<h3 id="Using_a_real_device">Using a real device</h3> + +<ol> + <li> + <p>On your computer, enter the following command in Terminal/console to enter your device's filesystem via the shell:</p> + + <pre class="brush: bash">adb shell</pre> + + <p>Your prompt should change to <code>root@android</code>.</p> + </li> + <li> + <p>Next, stop B2G running using the following command:</p> + + <pre class="brush: bash">stop b2g</pre> + </li> + <li> + <p>Navigate to the following directory:</p> + + <pre>cd /data/b2g/mozilla/*.default/</pre> + </li> + <li> + <p>Here, update the prefs.js file with the following line:</p> + + <pre class="brush: js">echo 'user_pref("devtools.debugger.forbid-certified-apps", false);' >> prefs.js</pre> + </li> + <li> + <p>After you've finished editing and saving the file, start B2G again using the following command:</p> + + <pre class="brush: bash">start b2g</pre> + </li> + <li> + <p>Exit the android filesystem using the <code>exit</code> command; this will return you to your normal terminal prompt.</p> + </li> + <li> + <p>Next, reconnect to the App Manager and you should see certified apps appear for debugging.</p> + </li> +</ol> + +<h3 id="Using_the_B2G_desktop_client">Using the B2G desktop client</h3> + +<p class="brush: js">With the B2G desktop client, the preference is already defined in your profile in <code>greprefs.js</code>, located at the root of your B2G desktop client folder. Stop your B2G desktop client and edit the file to turn the <code>devtools.debugger.forbid-certified-apps</code> preference to <code>false</code>. Then restart the B2G client and connect the App Manager. You should now see all applications.</p> + +<div class="note"> +<p>Note: If you want to add this preference to your Gaia build you can run <code>make DEVICE_DEBUG=1 reset-gaia</code>.</p> +</div> + +<h2 id="Troubleshooting_2"><a name="Troubleshooting">Troubleshooting</a></h2> + +<p id="My_device_is_not_recognized">If the device is not recognized:</p> + +<ul> + <li>If clicking the button corresponding to your Firefox OS phone doesn't do anything, make sure you haven't connected an Android phone at the same time as the Firefox OS phone to your computer.</li> + <li>Read the <a href="#Configuring_device">Device and system configuration</a> section thoroughly, and make sure all the steps are followed:</li> + <li>Is your device running at least Firefox OS 1.2?</li> + <li>Don't see all the apps? Do you need to enable <a href="#Debugging_Certified_Apps">Certified Apps debugging</a>?</li> + <li>Did you enable "Remote Debugging" in the settings of your phone?</li> + <li>If you are not using the <a href="#Adb_Helper_Add-on">ADB Helper add-on</a>: + <ul> + <li>Did you successfully run the <code>adb forward</code> command?</li> + </ul> + </li> + <li>If you are using the <a href="#Adb_Helper_Add-on">ADB Helper add-on</a> and your device is not listed in the bottom toolbar: + <ul> + <li>If you use Linux, <a href="http://developer.android.com/tools/device.html#setting-up">make sure to setup udev correctly</a></li> + <li>If you use Windows, <a href="http://developer.android.com/tools/device.html#setting-up">make sure to install the appropriate drivers</a></li> + <li>You can also enable verbose logging to gather diagnostics: + <ul> + <li>Use about:config to set the pref "<span class="message"><span class="content"><span class="email">extensions.adbhelper@mozilla.org.sdk</span>.console.logLevel"</span></span> to the string value "all"</li> + <li>Disable and re-enable the ADB Helper add-on from the add-ons manager, or restart Firefox</li> + <li>Open the App Manager again</li> + <li>In the <a href="/docs/Tools/Browser_Console">Browser Console</a>, you should now see additional output lines that mention "adbhelper"</li> + <li>If you see them but aren't sure what they mean, stop by the <a href="https://wiki.mozilla.org/DevTools/GetInvolved#Communication">#devtools room on IRC</a> or <a href="https://bugzilla.mozilla.org/enter_bug.cgi?alias=&assigned_to=nobody%40mozilla.org&attach_text=&blocked=&bug_file_loc=http%3A%2F%2F&bug_ignored=0&bug_severity=normal&bug_status=NEW&cf_blocking_b2g=---&cf_crash_signature=&cf_status_b2g18=---&cf_status_b2g_1_1_hd=---&cf_status_b2g_1_2=---&cf_status_firefox24=---&cf_status_firefox25=---&cf_status_firefox26=---&cf_status_firefox27=---&cf_status_firefox_esr17=---&cf_status_firefox_esr24=---&cf_tracking_b2g18=---&cf_tracking_firefox24=---&cf_tracking_firefox25=---&cf_tracking_firefox26=---&cf_tracking_firefox27=---&cf_tracking_firefox_esr17=---&cf_tracking_firefox_esr24=---&cf_tracking_firefox_relnote=---&cf_tracking_relnote_b2g=---&comment=&component=Developer%20Tools%3A%20App%20Manager&contenttypeentry=&contenttypemethod=autodetect&contenttypeselection=text%2Fplain&data=&defined_groups=1&dependson=&description=&flag_type-203=X&flag_type-37=X&flag_type-41=X&flag_type-5=X&flag_type-607=X&flag_type-720=X&flag_type-721=X&flag_type-737=X&flag_type-748=X&flag_type-781=X&flag_type-787=X&flag_type-791=X&flag_type-799=X&flag_type-800=X&flag_type-802=X&flag_type-803=X&flag_type-809=X&flag_type-825=X&form_name=enter_bug&keywords=&maketemplate=Remember%20values%20as%20bookmarkable%20template&op_sys=All&priority=--&product=Firefox&qa_contact=developer.tools%40firefox.bugs&rep_platform=x86&requestee_type-203=&requestee_type-41=&requestee_type-5=&requestee_type-607=&requestee_type-748=&requestee_type-781=&requestee_type-787=&requestee_type-791=&requestee_type-800=&short_desc=&status_whiteboard=&target_milestone=---&version=Trunk">file a bug</a> with the log output</li> + </ul> + </li> + </ul> + </li> + <li>See <strong>"???????"</strong> instead of the device name on Linux? You have permissions issues. <a href="http://developer.android.com/tools/device.html#setting-up">Make sure to setup udev correctly</a>.</li> + <li>Is your phone screen unlocked?</li> + <li>If the command "adb devices" shows no entries even though the phone is connected and unlocked, you may have to <a href="http://blog.fh-kaernten.at/wehr/?p=1182">edit adb_usb.ini</a>.</li> +</ul> + +<p>Can't connect your device to the App Manager or start the simulator? <a href="https://wiki.mozilla.org/DevTools/GetInvolved#Communication">Let us know</a> or <a href="https://bugzilla.mozilla.org/enter_bug.cgi?alias=&assigned_to=nobody%40mozilla.org&attach_text=&blocked=&bug_file_loc=http%3A%2F%2F&bug_ignored=0&bug_severity=normal&bug_status=NEW&cf_blocking_b2g=---&cf_crash_signature=&cf_status_b2g18=---&cf_status_b2g_1_1_hd=---&cf_status_b2g_1_2=---&cf_status_firefox24=---&cf_status_firefox25=---&cf_status_firefox26=---&cf_status_firefox27=---&cf_status_firefox_esr17=---&cf_status_firefox_esr24=---&cf_tracking_b2g18=---&cf_tracking_firefox24=---&cf_tracking_firefox25=---&cf_tracking_firefox26=---&cf_tracking_firefox27=---&cf_tracking_firefox_esr17=---&cf_tracking_firefox_esr24=---&cf_tracking_firefox_relnote=---&cf_tracking_relnote_b2g=---&comment=&component=Developer%20Tools%3A%20App%20Manager&contenttypeentry=&contenttypemethod=autodetect&contenttypeselection=text%2Fplain&data=&defined_groups=1&dependson=&description=&flag_type-203=X&flag_type-37=X&flag_type-41=X&flag_type-5=X&flag_type-607=X&flag_type-720=X&flag_type-721=X&flag_type-737=X&flag_type-748=X&flag_type-781=X&flag_type-787=X&flag_type-791=X&flag_type-799=X&flag_type-800=X&flag_type-802=X&flag_type-803=X&flag_type-809=X&flag_type-825=X&form_name=enter_bug&keywords=&maketemplate=Remember%20values%20as%20bookmarkable%20template&op_sys=All&priority=--&product=Firefox&qa_contact=developer.tools%40firefox.bugs&rep_platform=x86&requestee_type-203=&requestee_type-41=&requestee_type-5=&requestee_type-607=&requestee_type-748=&requestee_type-781=&requestee_type-787=&requestee_type-791=&requestee_type-800=&short_desc=&status_whiteboard=&target_milestone=---&version=Trunk">file a bug</a>. and</p> diff --git a/files/pt-pt/archive/css3/index.html b/files/pt-pt/archive/css3/index.html new file mode 100644 index 0000000000..5cabcb8ebd --- /dev/null +++ b/files/pt-pt/archive/css3/index.html @@ -0,0 +1,1090 @@ +--- +title: CSS3 +slug: Archive/CSS3 +tags: + - CSS + - Precisa de Tradução + - Referencia +translation_of: Archive/CSS3 +--- +<p><span class="seoSummary"><strong>CSS3</strong> is the latest evolution of the <em>Cascading Style Sheets</em> language and aims at extending CSS2.1. It brings a lot of long-awaited novelties, like rounded corners, shadows, <a href="/en-US/docs/Web/Guide/CSS/Using_CSS_gradients" title="Using CSS gradients">gradients</a>, <a href="/en-US/docs/Web/Guide/CSS/Using_CSS_transitions" title="CSS transitions">transitions</a> or <a href="/en-US/docs/Web/Guide/CSS/Using_CSS_animations" title="CSS animations">animations</a>, as well as new layouts like <a href="/en-US/docs/Web/Guide/CSS/Using_multi-column_layouts" title="Using CSS multi-column layouts">multi-columns</a>, <a href="/en-US/docs/Web/Guide/CSS/Flexible_boxes">flexible box</a> or grid layouts.</span> Experimental parts are vendor-prefixed and should either be avoided in production environments, or used with extreme caution as both their syntax and semantics can change in the future.</p> + +<h2 id="Módulos_e_processo_de_uniformização">Módulos e processo de uniformização</h2> + +<p>CSS Level 2 needed 9 years, from August 2002 to June 2011 to reach the Recommendation status. This was due to the fact that a few secondary features held back the whole specification. In order to accelerate the standardization of non-problematic features, the <a class="external" href="http://www.w3.org/blog/CSS/" title="http://www.w3.org/blog/CSS/">CSS Working Group</a> of the W3C, in a decision referred as the <a class="external" href="http://fantasai.inkedblade.net/weblog/2011/inside-csswg/modules" title="http://fantasai.inkedblade.net/weblog/2011/inside-csswg/modules">Beijing doctrine</a>, divided CSS in smaller components called <em>modules</em> . Each of these modules is now an independent part of the language and moves towards standardization at its own pace. While some modules are already W3C Recommendations, other still are early Working Drafts. New modules are also added when new needs are identified.</p> + +<p><a href="/@api/deki/files/6120/=CSS_Modules_and_Snapshots.png" title="CSS_Modules_and_Snapshots.png"><img alt="CSS Modules and Snapshots as defined since CSS3" class="internal lwrap" src="/files/3623/CSS_Modules_and_Snapshots.png" style="float: left; width: 550px;"> </a> Formally, there is no CSS3 standard <em>per se</em> . Each module being standardized independently, the standard CSS consists of CSS2.1 amended and extended by the completed modules, not necessary all with the same level number. At each point of time, a snapshot of the CSS standard can be defined, listing CSS2.1 and the mature modules.</p> + +<p>The W3 consortium periodically publishes such snapshots, like in <a class="external" href="http://www.w3.org/TR/css-beijing/" title="http://www.w3.org/TR/css-beijing/">2007</a>, <a class="external" href="http://www.w3.org/TR/css-2010/" title="http://www.w3.org/TR/css-2010/">2010</a>, <a href="https://www.w3.org/TR/css-2015/">2015</a>, <a href="https://www.w3.org/TR/css-2017/">2017</a>, and <a href="https://www.w3.org/TR/css-2018/">2018</a>.</p> + +<p>Though today no module with a level greater than 3 is standardized, this will change in the future. Some modules, like Selectors 4 or CSS Borders and Backgrounds Level 4 already have an Editor's Draft, though they haven't yet reached the First Published Working Draft status.</p> + +<h2 id="Estado_dos_módulos_CSS">Estado dos módulos CSS</h2> + +<h3 id="Módulos_concluídos">Módulos concluídos</h3> + +<p>A few CSS modules already became a standard as a W3C Recommendation. These should be no more changes.</p> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(128,255,128);"><strong>{{ SpecName("CSS3 Colors", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Colors") }} since June 7th, 2011</td> + </tr> + <tr> + <td colspan="2"> + <p>Adds the {{ cssxref("opacity") }} property, and the <code>hsl()</code>, <code>hsla()</code>, <code>rgba()</code> and <code>rgb()</code> functions to create {{cssxref("<color>")}} values. It also defines the <code>currentColor</code> keyword as a valid color.</p> + + <p>The <code>transparent</code> color is now a real color (thanks to the support for the alpha channel) and is a now an alias for <code>rgba(0,0,0,0.0)</code>.</p> + + <p>It deprecates the <a href="http://www.w3.org/TR/CSS2/ui.html#system-colors">system-color keywords that shouldn't be used in a production environment anymore</a>.</p> + </td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(128,255,128);"><strong>{{ SpecName("CSS3 Namespaces", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Namespaces") }} since September 29th, 2011</td> + </tr> + <tr> + <td colspan="2"> + <p>Adds the support for the XML Namespaces by defining the notion of <em>CSS qualified name</em>, using the ' <code>|</code> ' syntax and adding the {{ cssxref("@namespace") }} CSS at-rule.</p> + </td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(128,255,128);"><strong>{{ SpecName("CSS3 Selectors", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Selectors") }} since September 29th, 2011</td> + </tr> + <tr> + <td colspan="2"> + <p>Adds:</p> + + <ul> + <li>Substring matching attribute selectors, <code>E[attribute^="value"]</code>, <code>E[attribute$="value"]</code>, <code>E[attribute*="value"]</code> .</li> + <li>New pseudo-classes: {{ cssxref(":target") }}, {{ cssxref(":enabled") }} and {{ cssxref(":disabled") }}, {{ cssxref(":checked") }}, {{ cssxref(":indeterminate") }}, {{ cssxref(":root") }}, {{ cssxref(":nth-child") }} and {{ cssxref(":nth-last-child") }}, {{ cssxref(":nth-of-type") }} and {{ cssxref(":nth-last-of-type") }}, {{ cssxref(":last-child") }}, {{ cssxref(":first-of-type") }} and {{ cssxref(":last-of-type") }}, {{ cssxref(":only-child") }} and {{ cssxref(":only-of-type") }},{{ cssxref(":empty") }}, and {{ cssxref(":not") }}.</li> + <li>Pseudo-elements are now characterized by two colons rather than one: <code>:after</code> becomes {{ cssxref("::after") }}, <code>:before</code> becomes {{ cssxref("::before") }}, <code>:first-letter</code> becomes {{ cssxref("::first-letter") }}, and <code>:first-line</code> becomes {{ cssxref("::first-line") }}.</li> + <li>The new <em>general sibling combinator</em> ( <code>h1~pre</code> ).</li> + </ul> + </td> + </tr> + </tbody> +</table> + +<p>The <a class="external" href="http://dev.w3.org/csswg/selectors4/" title="http://dev.w3.org/csswg/selectors4/">next iteration of the Selectors specification</a> is already in progress, though it still hasn't reached the First Public Working Draft stage.</p> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(128,255,128);"><strong>{{ SpecName("CSS3 Media Queries", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Media Queries") }} since June 19th, 2012</td> + </tr> + <tr> + <td colspan="2"> + <p>Extends the former media type ( <code>print</code>, <code>screen</code>, <code>…</code> ) to a full language allowing <a href="/en/CSS/Media_queries" title="en/CSS/Media_queries">queries on the device media capabilities</a> like <code>only screen and (color)</code> .</p> + + <p>Media queries are not only used in CSS document but also in some attributes of HTML Elements, like the {{ htmlattrxref("media","link") }} attribute of the {{ HTMLElement("link") }} element.</p> + </td> + </tr> + </tbody> +</table> + +<p>The <a href="http://dev.w3.org/csswg/mediaqueries4" title="http://dev.w3.org/csswg/mediaqueries4">next iteration of this specification</a> is in the work, allowing to tailor a Web site regarding the input methods available on the user agent, with new media features like <code>hover</code> or <code>pointer</code>. Detection of EcmaScript support, using the <code>script</code> media features is also proposed.</p> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(128,255,128);"><strong>{{ SpecName("CSS3 Style", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Style") }} since November 7th, 2013</td> + </tr> + <tr> + <td colspan="2">Formally defines the syntax of the content of the HTML <a href="/en/HTML/Global_attributes#attr-style" title="en/HTML/Global_attributes#attr-style"> <code>style</code> </a> global attribute.</td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(128,255,128);"><strong>{{ SpecName("CSS3 Fonts", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Fonts") }} since September 20th, 2018</td> + </tr> + <tr> + <td colspan="2"> + <p>Amends the CSS2.1 Font matching algorithm to be closer to what is really implemented.</p> + + <p>Adds:</p> + + <ul> + <li>Support for downloadable fonts via the CSS {{ cssxref("@font-face") }} at-rule.</li> + <li>The control of the contextual inter-glyph spacing via the CSS {{ cssxref("font-kerning") }} property.</li> + <li>The choice of language-specific glyphs via the CSS {{ cssxref("font-language-override") }} property.</li> + <li>The choice of glyphs with specific OpenType features via the CSS {{ cssxref("font-feature-settings") }} property.</li> + <li>The control of the aspect ratio to use when fallback fonts are selected via the CSS {{ cssxref("font-size-adjust") }} property.</li> + <li>The choice of alternative font faces using the CSS {{ cssxref("font-stretch") }}, {{ cssxref("font-variant-alternates") }}, {{ cssxref("font-variant-caps") }}, {{ cssxref("font-variant-east-asian") }}, {{ cssxref("font-variant-ligatures") }}, {{ cssxref("font-variant-numeric") }}, and {{ cssxref("font-variant-position") }} properties. It also extends the related CSS {{ cssxref("font-variant") }} shorthand property and introduces the {{ cssxref("@font-feature-values") }} at-rule.</li> + <li>The control of the automatic generation of an oblique or bold face when none are found via the CSS {{ cssxref("font-synthesis") }} property.</li> + </ul> + </td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(128,255,128);"><strong>{{ SpecName("CSS3 Basic UI", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Basic UI") }} since June 21st, 2018</td> + </tr> + <tr> + <td colspan="2"> + <p>Adds:</p> + + <ul> + <li>The ability to tweak the box model using the CSS {{ cssxref("box-sizing") }} property.<br> + <strong><em>At risk:</em> </strong> <em> due to insufficient browser support, standardization of the <code>padding-box</code> value may be postponed to </em> <em>the next iteration of this module.</em></li> + <li>Allow the styling of forms according their content using the CSS {{ cssxref(":indeterminate") }}, {{ cssxref(":default") }}, {{ cssxref(":valid") }}, {{ cssxref(":invalid") }}, {{ cssxref(":in-range") }}, {{ cssxref(":out-of-range") }}, {{ cssxref(":required") }}, {{ cssxref(":optional") }}, {{ cssxref(":read-only") }}, and {{ cssxref(":read-write") }} pseudo-classes and the {{ cssxref("::value") }}, {{ cssxref("::choices") }}, {{ cssxref("::repeat-item") }}, and {{ cssxref("::repeat-index") }} pseudo-elements.<br> + <em><strong>At risk:</strong> due to insufficient browser support, standardization of the pseudo-elements {{ cssxref("::value") }}, {{ cssxref("::choices") }}, {{ cssxref("::repeat-item") }}, and {{ cssxref("::repeat-index") }} may be postponed to </em> <em>the next iteration of this module</em> <em>.</em></li> + <li>Support for icons, defined by the CSS {{ cssxref("icon") }} property simultaneously with the new <code>icon</code> value of the CSS {{ cssxref("content") }} property.<br> + <em><strong>At risk:</strong> due to insufficient browser support, standardization of the {{ cssxref("icon") }} property and the <code>icon</code> value may be postponed to CSS4. </em></li> + <li>Support for the CSS {{ cssxref("outline-offset") }} property giving more control on the position of the outline.</li> + <li>Support for the CSS {{ cssxref("resize") }} property allowing Web authors to control if and how elements should be resized.</li> + <li>Support for the CSS {{ cssxref("text-overflow") }} property defining how text overflows, if needed.<br> + <em><strong>At risk:</strong> due to insufficient browser support, the 2-value syntax of this property as well as the support for {{cssxref("<string>")}} values may be postponed to the next iteration of this module.</em></li> + <li>The ability to define the hotspot of a cursor as well as the new <code>none</code>, <code>context-menu</code>, <code>cell</code>, <code>vertical-text</code>, <code>alias</code>, <code>copy</code>, <code>no-drop</code>, <code>not-allowed</code>, <code>nesw-</code><code>resize</code>, <code>nwse-</code><code>resize</code>, <code>col-resize</code>, <code>row-resize</code>, <code>all-scroll</code>, <code>zoom-in</code>, <code>zoom-out</code>, extending the {{ cssxref("cursor") }} property.</li> + <li>The ability to specify the sequential navigation order (that is the <em>tabbing order</em> ) using the CSS {{ cssxref("nav-index") }}, {{ cssxref("nav-up") }}, {{ cssxref("nav-right") }}, {{ cssxref("nav-left") }}, {{ cssxref("nav-down") }} properties.<br> + <em><strong>At risk:</strong> due to insufficient browser support, standardization of the navigation properties may be postponed to the next iteration of this module.</em></li> + <li>The ability to control the usage of an IME editor, using the CSS {{ cssxref("ime-mode") }} property.<br> + <em><strong>At risk:</strong> due to insufficient browser support, standardization of the {{ cssxref("ime-mode") }} property may be postponed to the next iteration of this module.</em></li> + </ul> + </td> + </tr> + </tbody> +</table> + +<p>An early list of what could be in the next iteration of the CSS Basic User Interface Module is <a class="external" href="http://wiki.csswg.org/spec/css4-ui" title="http://wiki.csswg.org/spec/css4-ui">available</a>.</p> + +<h3 id="Módulos_estáveis">Módulos estáveis</h3> + +<p>A few CSS modules are already fairly stable and have reached one of the three recommendation level of the CSSWG: Candidate Recommendation, Proposed Recommendation or Recommendation. These can be used without prefix and are pretty stable, though a few features can still be dropped at the Candidate Recommendation stage.</p> + +<p>These modules extend and amend the CSS2.1 specification which build the core of the specification. Together with it, they are the current snapshot of the CSS specification.</p> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(220,255,220);"><strong>{{ SpecName("CSS3 Backgrounds", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Backgrounds") }}</td> + </tr> + <tr> + <td colspan="2"> + <p>Adds:</p> + + <ul> + <li>Support, on backgrounds, for any type of {{cssxref("<image>")}}, and not only for <code>uri()</code> defined ones.</li> + <li>Support for multiple background images.</li> + <li>The {{ cssxref("background-repeat") }} <code>space</code> and <code>round</code> values, and for the 2-value syntax of this CSS property.</li> + <li>The {{ cssxref("background-attachment") }} <code>local</code> value.</li> + <li>The CSS {{ cssxref("background-origin") }}, {{ cssxref("background-size") }}, and {{ cssxref("background-clip") }} properties.</li> + <li>Support for curved border corners, with the CSS {{ cssxref("border-radius") }}, {{ cssxref("border-top-left-radius") }}, {{ cssxref("border-top-right-radius") }}, {{ cssxref("border-bottom-left-radius") }}, and {{ cssxref("border-bottom-right-radius") }} properties.</li> + <li>Support for the use of an {{cssxref("<image>")}} as the border with the CSS {{ cssxref("border-image") }}, {{ cssxref("border-image-source") }}, {{ cssxref("border-image-slice") }}, {{ cssxref("border-image-width") }}, {{ cssxref("border-image-outset") }}, and {{ cssxref("border-image-repeat") }} properties.</li> + <li>Support for shadows of the element with the CSS {{ cssxref("box-shadow") }} property.</li> + </ul> + </td> + </tr> + </tbody> +</table> + +<p>The <a class="external" href="http://dev.w3.org/csswg/css4-background/" title="http://dev.w3.org/csswg/css4-background/">CSS4 iteration of the Backgrounds and Borders specification</a> is already in progress, though it still hasn't reached the First Public Working Draft stage, it plans to add the ability to clip a border (with the CSS {{ cssxref("border-clip") }}, {{ cssxref("border-clip-top") }}, {{ cssxref("border-clip-right") }}, {{ cssxref("border-clip-bottom") }}, and {{ cssxref("border-clip-left") }} properties) or to control the shape of the border in a corner (using the CSS {{ cssxref("border-corner-shape") }} property).</p> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(220, 255, 220);"><strong>{{ SpecName("CSS3 Conditional", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Conditional") }}</td> + </tr> + <tr> + <td colspan="2">Adds features for conditional processing of parts of style sheets, conditioned on capabilities of the browser or the document the style sheet is being applied to. It consists mainly in allowing nested at-rules inside {{ cssxref("@media") }} and the adding of a new CSS at-rule, {{ cssxref("@supports") }}, and a new DOM method {{domxref("CSS.supports()")}}.</td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(220,255,220);"><strong>{{ SpecName("CSS3 Multicol", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Multicol") }}</td> + </tr> + <tr> + <td colspan="2">Adds support for easy multi-column layouts using the CSS {{ cssxref("columns") }}, {{ cssxref("column-count") }}, {{ cssxref("column-fill") }}, {{ cssxref("column-gap") }}, {{ cssxref("column-rule") }}, {{ cssxref("column-rule-color") }}, {{ cssxref("column-rule-style") }}, {{ cssxref("column-rule-width") }}, {{ cssxref("column-span") }}, {{ cssxref("column-width") }}, {{ cssxref("break-after") }}, {{ cssxref("break-before") }}, and {{ cssxref("break-inside") }}.</td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(220, 255, 220);"><strong>{{ SpecName("CSS3 Values", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Values") }}</td> + </tr> + <tr> + <td colspan="2"> + <p>Makes <code>initial</code> and <code>inherit</code> keywords usable on any CSS property.</p> + + <p>Formally defines the CSS data types of CSS 2.1, that were implicitely defined by their grammar token and some textual precisions.</p> + + <p>Adds:</p> + + <ul> + <li>Definition for new font-relative length units: <code>rem</code> and <code>ch</code> .</li> + <li>Definition for viewport-relative length units: <code>vw</code>, <code>vh</code>, <code>vmax</code>, and <code>vmin</code> .</li> + <li>Precision about the real size of the absolute length units, which are not really absolute, but defined in relation with the <em>reference pixel</em> .</li> + <li>Definition for {{ cssxref("<angle>") }}, {{cssxref("<time>")}}, {{cssxref("<frequency>")}}, {{cssxref("<resolution>")}}.</li> + <li>Normative value to the definition of {{cssxref("<color>")}}, {{cssxref("<image>")}}, and {{cssxref("<position>")}}.</li> + <li>Definition for the {{ cssxref("calc", "calc()") }}, {{ cssxref("attr", "attr()")}}, and <code>toggle()</code> functional notations.<br> + <em><strong>At risk:</strong> due to insufficient browser support, standardization of the <code>calc()</code>, <code>attr()</code>, and <code>toggle()</code> functional notations may be postponed to </em> <em>the next iteration of this module</em><em>.</em></li> + </ul> + </td> + </tr> + </tbody> +</table> + +<p>Several types definition, like <code><ident></code> and <code><custom-ident></code>, have been deferred to CSS Values and Units Module Level 4.</p> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(220,255,220);"><strong>{{ SpecName("CSS3 Flexbox", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Flexbox") }}</td> + </tr> + <tr> + <td colspan="2">Add a flexbox layout to the CSS {{ cssxref("display") }} property and several new CSS properties to control it: {{ cssxref("flex") }}, {{ cssxref("flex-align") }}, {{ cssxref("flex-direction") }}, {{ cssxref("flex-flow") }}, {{ cssxref("flex-item-align") }}, {{ cssxref("flex-line-pack") }}, {{ cssxref("flex-order") }}, {{ cssxref("flex-pack") }}, and {{ cssxref("flex-wrap") }}.</td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(220,255,220);"><strong>{{ SpecName("CSS3 Cascade", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Cascade") }}</td> + </tr> + <tr> + <td colspan="2"> + <p>Adds:</p> + + <ul> + <li>The {{ cssxref("initial") }}, {{ cssxref("unset") }} values for properties.</li> + <li>The CSS {{ cssxref("all") }} property.</li> + <li>The scoping mechanism.</li> + </ul> + + <p>Clarifies:</p> + + <ul> + <li>Interaction of media-dependent @import statements and style sheet loading requirements.</li> + </ul> + </td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(220,255,220);"><strong>{{ SpecName("CSS3 Writing Modes", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Writing Modes") }}</td> + </tr> + <tr> + <td colspan="2">Defines the writing modes of both horizontal and vertical scripts and clarifies how the CSS {{ cssxref("direction") }} and {{ cssxref("unicode-bidi") }} properties interact with the new CSS {{ cssxref("text-orientation") }} property, and extends them where needed.</td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(255,255,220);"><strong>{{ SpecName("CSS3 Counter Styles", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Counter Styles") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<h3 id="Módulos_de_teste">Módulos de teste</h3> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(220,255,220);"><strong>{{ SpecName("CSS3 Images", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Images") }}</td> + </tr> + <tr> + <td colspan="2"> + <p>Defines the {{cssxref("<image>")}} data type.</p> + + <p>Extends the <code>url()</code> syntax to support image slices using media fragments.</p> + + <p>Adds:</p> + + <ul> + <li>The <code>dppx</code> unit to the {{cssxref("<resolution>")}} data type.</li> + <li>The <code>image()</code> function as a more flexible alternative to <code>url()</code> to define an image from an url.<br> + <em><strong>At risk:</strong> due to insufficient browser support, standardization of the <code>image()</code> function may be postponed to the next iteration of this module.</em></li> + <li>Support for <code>linear-gradient()</code>, <code>repeating-linear-gradient()</code>, <code>radial-gradient()</code> and <code>repeating-radial-gradient()</code>.</li> + <li>The ability to define how a replaced element should fit in its element, using the CSS {{ cssxref("object-fit") }} property.<br> + <em><strong>At risk:</strong> due to insufficient browser support, standardization of the {{ cssxref("object-fit") }} and property may be postponed to the next iteration of this module.</em></li> + <li>The ability to override the resolution and orientation of an external image using the CSS {{ cssxref("image-resolution") }} and {{ cssxref("image-orientation") }} properties.<br> + <em><strong>At risk</strong> </em> <strong> <em>:</em> </strong> <em> due to insufficient browser support, standardization of the {{ cssxref("image-resolution") }} and {{ cssxref("image-orientation") }} properties may be postponed to </em> <em>the next iteration of this module</em></li> + </ul> + </td> + </tr> + </tbody> +</table> + +<p>The <a href="#Images_(Level_4)">CSS Image Values and Replaced Content Level 4</a> which will supersede CSS Image Level 3 is in development and is a {{Spec2("CSS4 Images")}}.</p> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(220,255,220);"><strong>{{ SpecName("CSS3 Speech", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Speech") }}</td> + </tr> + <tr> + <td colspan="2">Defines the <code>speech</code> media type, an aural formatting model and numerous properties specific for speech-rendering user agents.</td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(220, 255, 220);"><strong>{{ SpecName("CSS3 Text Decoration", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Text Decoration") }}</td> + </tr> + <tr> + <td colspan="2"> + <p>Extends:</p> + + <ul> + <li>the CSS {{ cssxref("text-decoration") }} property by making it a shorthand for the CSS {{ cssxref("text-decoration-line") }}, {{ cssxref("text-decoration-color") }}, and {{ cssxref("text-decoration-style") }} properties. And adds the {{ cssxref("text-decoration-skip") }}, and {{ cssxref("text-underline-position") }} properties.</li> + </ul> + + <p>Adds:</p> + + <ul> + <li>Support for East-Asian-script emphasis marks with the CSS {{ cssxref("text-emphasis") }}, {{ cssxref("text-emphasis-style") }}, {{ cssxref("text-emphasis-color") }}, and {{ cssxref("text-emphasis-position") }} properties.</li> + <li>Support for script shadows with the CSS {{ cssxref("text-shadow") }} property.</li> + </ul> + + <p>Clarifies:</p> + + <ul> + <li>The paint order of the decorations.</li> + </ul> + + <p><em><strong>At risk:</strong> due to insufficient browser support, standardization of the <code>text-decoration-skip</code>, line positioning rules and the ability to place both emphasis marks and ruby above the same base text may be postponed to </em> <em>the next iteration of this module</em><em>.</em></p> + </td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(220,255,220);"><strong>{{ SpecName("CSS Shapes", "", "") }}</strong></td> + <td>{{ Spec2("CSS Shapes") }}</td> + </tr> + <tr> + <td colspan="2">Defines geometric shapes, which can be applied to floats. These shapes describe areas, around which inline content wraps instead of wrapping around the bounding box.</td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(220,255,220);"><strong>{{ SpecName("CSS Masks", "", "") }}</strong></td> + <td>{{ Spec2("CSS Masks") }}</td> + </tr> + <tr> + <td colspan="2">Defines a way for partially or fully hiding portions of visual elements. It describes how to use another graphical element or image as a luminance or alpha mask.</td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(255, 255, 220);"><strong>{{ SpecName("CSS3 Fragmentation", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Fragmentation") }}</td> + </tr> + <tr> + <td colspan="2">Defines how partitions of a Web page should happen, that is page, column breaks, and widows and orphans handling. + <p>Adds:</p> + + <ul> + <li>Support for defining the behavior of decorations, that is borders and background colors or images, when a box is breaked (at a page, column or line-break) with the CSS {{ cssxref("box-decoration-break") }} property.</li> + </ul> + </td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(255,255,220);"><strong>{{ SpecName("CSS3 Variables", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Variables") }}</td> + </tr> + <tr> + <td colspan="2">Defines a mechanism allowing to define variables in CSS.</td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(255,255,220);"><strong>{{ SpecName("Compositing", "", "") }}</strong></td> + <td>{{ Spec2("Compositing") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(255,255,220);"><strong>{{ SpecName("CSS3 Syntax", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Syntax") }}</td> + </tr> + <tr> + <td colspan="2">Clarifies how charsets are determined; minor changes in parsing and tokenization algorithms.</td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(255,160,100);"><strong>{{ SpecName("CSS3 Grid", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Grid") }}</td> + </tr> + <tr> + <td colspan="2">Add a grid layout to the CSS <a href="/en-US/docs/Web/CSS/display" title=""><code>display</code></a> property and several new CSS properties to control it: {{cssxref("grid")}}, {{cssxref("grid-area")}}, {{cssxref("grid-auto-columns")}}, {{cssxref("grid-auto-flow")}}, {{cssxref("grid-auto-position")}}, {{cssxref("grid-auto-rows")}}, {{cssxref("grid-column")}}, {{cssxref("grid-column-start")}}, {{cssxref("grid-column-end")}}, {{cssxref("grid-row")}}, {{cssxref("grid-row-start")}}, {{cssxref("grid-row-end")}}, {{cssxref("grid-template")}}, {{cssxref("grid-template-areas")}}, {{cssxref("grid-template-rows")}}, and {{cssxref("grid-template-columns")}}.</td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>{{ SpecName("CSS3 Display", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Display") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(255,255,220);"><strong>{{ SpecName("CSS Will Change", "", "") }}</strong></td> + <td>{{ Spec2("CSS Will Change") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>{{ SpecName("CSS4 Media Queries", "", "") }}</strong></td> + <td>{{ Spec2("CSS4 Media Queries") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>{{ SpecName("Geometry Interfaces", "", "") }}</strong></td> + <td>{{ Spec2("Geometry Interfaces") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(220,255,220);"><strong>{{ SpecName("CSS4 Cascade", "", "") }}</strong></td> + <td>{{ Spec2("CSS4 Cascade") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(220,255,220);"><strong>{{SpecName("CSS Scroll Snap Points")}}</strong></td> + <td>{{Spec2("CSS Scroll Snap Points")}}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(220,255,220);"><strong>{{SpecName('CSS Painting API')}}</strong></td> + <td>{{Spec2('CSS Painting API')}}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(220,255,220);"><strong>{{SpecName('CSS Containment')}}</strong></td> + <td>{{Spec2('CSS Containment')}}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(220,255,220);"><strong>{{SpecName('CSS4 Writing Modes')}}</strong></td> + <td>{{Spec2('CSS4 Writing Modes')}}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<h3 id="Modules_in_the_refining_phase">Modules in the refining phase</h3> + +<p>Specifications that are deemed to be in the <em>refining phase</em> are already fairly stable. Though changes are still expected, they shouldn't create incompatibilities with current implementations; they should mainly define behavior in edge cases.</p> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(255,255,220);"><strong>{{ SpecName("CSS3 Animations", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Animations") }}</td> + </tr> + <tr> + <td colspan="2">Allows the definition of animations effects by adding the CSS {{ cssxref("animation") }}, {{ cssxref("animation-delay") }},{{ cssxref("animation-direction") }}, {{ cssxref("animation-duration") }}, {{ cssxref("animation-fill-mode") }}, {{ cssxref("animation-iteration-count") }}, {{ cssxref("animation-name") }}, {{ cssxref("animation-play-state") }}, and {{ cssxref("animation-timing-function") }} properties, as well as the {{ cssxref("@keyframes") }} at-rule.</td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(255,255,220);"><strong>{{ SpecName("Web Animations", "", "") }}</strong></td> + <td>{{ Spec2("Web Animations") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(255,255,220);"><strong>{{ SpecName("CSS3 Text", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Text") }}</td> + </tr> + <tr> + <td colspan="2"> + <p>Extends:</p> + + <ul> + <li>the CSS {{ cssxref("text-transform") }} property with the value <code>full-width</code>.</li> + <li>the CSS {{ cssxref("text-align") }} property with the value <code>start</code>, <code>end</code>, <code>start end</code>, and <code>match-parent</code> for a better support of documents with multiple directionalities of text.</li> + <li>the CSS {{ cssxref("text-align") }} property with a {{cssxref("<string>")}} value to align on that character. This is useful to align number on the decimal point.</li> + <li>the CSS {{ cssxref("word-spacing") }} and {{ cssxref("letter-spacing") }} properties with range constraints to control flexibility in justification.</li> + </ul> + + <p>Adds:</p> + + <ul> + <li>Control on how whitespaces are displayed using the CSS {{ cssxref("text-space-collapse") }} and {{ cssxref("tab-size") }} properties.</li> + <li>Control on line breaks and word boundaries using the CSS {{ cssxref("line-break") }}, {{ cssxref("word-break") }}, {{ cssxref("hyphens") }}, {{ cssxref("text-wrap") }}, {{ cssxref("overflow-wrap") }}, and {{ cssxref("text-align-last") }} properties.</li> + <li>Control on how justification is happening, in order to support more type of scripts, using the CSS {{ cssxref("text-justify") }} property.</li> + <li>Control on edge effect using the CSS {{ cssxref("text-indent") }} and {{ cssxref("hanging-punctuation") }} properties.</li> + </ul> + </td> + </tr> + </tbody> +</table> + +<p>A few features present in early CSS Text Level 3 draft have being <a class="external" href="http://dev.w3.org/csswg/css3-text/#recent-changes" title="http://dev.w3.org/csswg/css3-text/#recent-changes">postponed to the next iteration of this module</a> .</p> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(255,255,220);"><strong>{{ SpecName("CSS3 Transforms", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Transforms") }}</td> + </tr> + <tr> + <td colspan="2"> + <p>Adds:</p> + + <ul> + <li>the support of bi-dimensional transforms to be applied to any element using the CSS {{ cssxref("transform") }} and {{ cssxref("transform-origin") }} properties. The supported transforms are: <code>matrix</code><code>()</code>, <code>translate()</code>, <code>translateX()</code>, <code>translateY()</code>, <code>scale()</code>, <code>scaleX()</code>, <code>scaleY()</code>, <code>rotate()</code>, <code>skewX()</code>, and <code>skewY()</code>.</li> + <li>the support of tri-dimensional transforms to be applied to any element by adding the CSS {{ cssxref("transform-style") }}, {{ cssxref("perspective") }}, {{ cssxref("perspective-origin") }}, and {{ cssxref("backface-visibility") }} properties and extended the {{ cssxref("transform") }} property with the following transforms are: <code>matrix</code> <code>3d()</code>, <code>translate3d()</code>, <code>translateZ()</code>, <code>scale3d()</code>, <code>scaleZ()</code>, <code>rotate3d()</code>, <code>rotateX</code><code>()</code>, <code>rotateY</code><code>()</code>, <code>rotateZ()</code>, and <code>perspective()</code>.</li> + </ul> + + <p><em><strong>Note:</strong> this specification is a merge of CSS 2D-Transforms, CSS 3D-Transforms and SVG transforms. </em></p> + </td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(255,255,220);"><strong>{{ SpecName("CSS3 Transitions", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Transitions") }}</td> + </tr> + <tr> + <td colspan="2">Allows the definition of transitions effects between two properties values by adding the CSS {{ cssxref("transition") }}, {{ cssxref("transition-delay") }}, {{ cssxref("transition-duration") }}, {{ cssxref("transition-property") }}, and {{ cssxref("transition-timing-function") }} properties.</td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(255,160,100);"><strong>{{ SpecName("CSS3 Box Alignment", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Box Alignment") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(255,160,100);"><strong>{{ SpecName("CSS4 Selectors", "", "") }}</strong></td> + <td>{{ Spec2("CSS4 Selectors") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>{{ SpecName("CSS3 Lists", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Lists") }}</td> + </tr> + <tr> + <td colspan="2">Extends the list counter mechanism so that list markers can be styled and Web developers can define new list counter schemes.</td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(255,160,100);"><strong>{{ SpecName("Motion Path Level 1", "", "") }}</strong></td> + <td>{{ Spec2("Motion Path Level 1") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(220,255,220);"><strong>{{ SpecName("CSS4 Fonts", "", "") }}</strong></td> + <td>{{ Spec2("CSS4 Fonts") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(220,255,220);"><strong>CSS Easing Functions Level 1</strong></td> + <td>Working Draft</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(220,255,220);"><strong>{{ SpecName("CSS Logical Properties", "", "") }}</strong></td> + <td>{{ Spec2("CSS Logical Properties") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<h3 id="Modules_in_the_revising_phase">Modules in the revising phase</h3> + +<p>Modules that are in the revising phase are much less stable than those in the refining phase. Often the syntax is still under scrutiny and may evolve a lot, in a non-compatible way. Alternative syntaxes are tested and often implemented.</p> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(255,160,100);"><strong>{{ SpecName("CSS3 Paged Media", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Paged Media") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(255,160,100);"><strong>{{ SpecName("CSSOM View", "", "") }}</strong></td> + <td>{{ Spec2("CSSOM View") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>{{ SpecName("CSS3 Sizing", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Sizing") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>{{ SpecName("CSS3 Ruby", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Ruby") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>{{ SpecName("CSS3 Overflow", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Overflow") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F33;"><strong>{{ SpecName("CSS3 Box", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Box") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(255,160,100);"><strong>{{ SpecName("CSS Scrollbars", "", "") }}</strong></td> + <td>{{ Spec2("CSS Scrollbars") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<h3 id="Modules_in_the_exploring_phase">Modules in the exploring phase</h3> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: rgb(255,160,100);"><strong>CSS Backgrounds and Borders Level 4</strong></td> + <td>Working Draft</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>{{ SpecName("CSS3 Device", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Device") }}</td> + </tr> + <tr> + <td colspan="2">Adds a new at-rule, {{ cssxref("@viewport") }}, allowing to specify the size, zoom factor, and orientation of the viewport that is used as the base for the initial containing block.</td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>{{ SpecName("CSS Exclusions", "", "") }}</strong></td> + <td>{{ Spec2("CSS Exclusions") }}</td> + </tr> + <tr> + <td colspan="2">Extends the floats mechanism to define exclusion regions in any positioning scheme. Adds the notion of shapes, in which content must flows.</td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>{{ SpecName("Filters 1.0", "", "") }}</strong></td> + <td>{{ Spec2("Filters 1.0") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>{{ SpecName("CSS3 GCPM", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 GCPM") }}</td> + </tr> + <tr> + <td colspan="2">Adds the ability to tailor printed version of a document by allowing to control header, footer but also references tables like indexes or tables of content.</td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>CSS Page Floats</strong></td> + <td>Working Draft</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>{{ SpecName("CSS3 Template", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Template") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>{{ SpecName("CSS Line Grid", "", "") }}</strong></td> + <td>{{ Spec2("CSS Line Grid") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>{{ SpecName("CSS3 Positioning", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Positioning") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>{{ SpecName("CSS3 Regions", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Regions") }}</td> + </tr> + <tr> + <td colspan="2">Defines a new mechanism allowing content to flow across, eventually non-contiguous, multiple areas called regions.</td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>{{ SpecName("CSSOM", "", "") }}</strong></td> + <td>{{ Spec2("CSSOM") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>{{ SpecName("CSS3 Font Loading", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Font Loading") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>{{ SpecName("CSS Scope", "", "") }}</strong></td> + <td>{{ Spec2("CSS Scope") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>{{ SpecName("CSS3 Inline", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Inline") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>{{ SpecName("CSS4 Images", "", "") }}</strong></td> + <td>{{ Spec2("CSS4 Images") }}</td> + </tr> + <tr> + <td colspan="2"> + <p>Extends:</p> + + <ul> + <li>the <code>image()</code> functional notation to describe the directionality of the image (<code>rtl</code> or <code>ltr</code>), allowing for bidi-sensitive images.</li> + <li>the {{ cssxref("image-orientation") }} property by adding the keyword <code>from-image</code>, allowing to follow EXIF data stored into images to be considered.</li> + </ul> + + <p>Adds:</p> + + <ul> + <li>the <code>image-set()</code> functional notation to allow the definition to equivalent images at different resolution allowing for resolution-negotiated selection of images.</li> + <li>the <code>element()</code> functional notation allowing the use of part of the page as image.</li> + <li>the <code>cross-fade()</code> functional notation allowing to refer to intermediate images when transitioning between two images and defines the interpolation between two images.</li> + <li>the <code>conic-gradient()</code> and <code>repeating-conic-gradient()</code> functional notation describing a new type of gradient.</li> + <li>the {{cssxref("image-rendering")}} property that allow to define how resize of the object should be handled.</li> + </ul> + </td> + </tr> + </tbody> +</table> + +<h3 id="Modules_in_the_rewriting_phase">Modules in the rewriting phase</h3> + +<p>Modules that are in the rewriting phase are outdated and require to be rewritten. The syntax is still under scrutiny and may evolve a lot, in a non-compatible way. Alternative syntaxes are tested and often implemented.</p> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F33;"><strong>{{ SpecName("CSS3 Content", "", "") }}</strong></td> + <td>{{ Spec2("CSS3 Content") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> + +<h3 id="Abandoned_modules">Abandoned modules</h3> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td style="width: 30%; background-color: #F66;"><strong>{{ SpecName("CSS Non-element Selectors", "", "") }}</strong></td> + <td>{{ Spec2("CSS Non-element Selectors") }}</td> + </tr> + <tr> + <td colspan="2"></td> + </tr> + </tbody> +</table> diff --git a/files/pt-pt/archive/devtools_api_social/index.html b/files/pt-pt/archive/devtools_api_social/index.html new file mode 100644 index 0000000000..68ab1e2393 --- /dev/null +++ b/files/pt-pt/archive/devtools_api_social/index.html @@ -0,0 +1,213 @@ +--- +title: Utilizar Firefox Devtools com a API Social +slug: Archive/Devtools_API_Social +translation_of: Archive/Social_API_Devtools +--- +<p>O Firefox tem um número de <a href="/pt-PT/docs/Tools">ferramentas de desenvolvimento</a> que podem ser utilizadas para ajudar com o desenvolvimento dos provedores de <a href="/pt-PT/docs/Social_API">API Social</a>. Contudo, até que o <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=839959" title="https://bugzilla.mozilla.org/show_bug.cgi?id=839959"><em>bug</em> 839959</a> termine, o processo não é tão simples como deveria ser. Enquanto isso, esta página descreve algumas soluções alternativas.</p> + +<h2 id="Ativar_Devtools_do_Chrome">Ativar Devtools do Chrome</h2> + +<p>Both of the techniques below require the chrome devtools to be manually enabled. To do this, open <code>about:config</code> in a tab, and after verifying that you will be careful, toggle the boolean value <code>devtools.chrome.enabled</code> to true.</p> + +<h2 id="Utilizar_o_Inspetor_de_DOM_e_Profiler">Utilizar o Inspetor de DOM e <em>Profiler</em></h2> + +<ul> + <li>From the "Web Developer" menu, select "<a href="/en-US/docs/Tools/Scratchpad">Scratchpad</a>". In the newly created scratchpad window, select the <em>Environment</em> menu and select the <em>Browser</em> option.</li> + <li>Paste the following code into the new scratchpad:</li> +</ul> + +<pre class="brush: js">// Uncomment one of the following lines. NOTE: You must ensure the element you +// want to inspect has been created - e.g., the sidebar must be visible, the flyouts +// must have been opened once, etc. + +// The sidebar +let w = document.getElementById("social-sidebar-browser").contentWindow; + +// The "flyout" panel +// let w = document.getElementById("social-flyout-panel").firstChild.contentWindow; + +// The "notification" panel - this will show the most-recently-used panel +// let w = document.getElementById("social-notification-panel").firstChild.contentWindow; + + +if (!w) { + alert("This window is yet to be created"); +} else { + XPCOMUtils.defineLazyModuleGetter(this, "Toolbox", + "resource:///modules/devtools/Toolbox.jsm"); + XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory", + "resource:///modules/devtools/Target.jsm"); + let target = TargetFactory.forWindow(w); + let toolbox = gDevTools.getToolbox(target); + toolbox ? toolbox.destroy() : gDevTools.showToolbox(target, undefined, "window"); +}</pre> + +<ul> + <li>Review the top few lines of the script, and ensure exactly one of the "<code>let w = ...</code>" lines is uncommented, depending on which social element you wish to inspect.</li> + <li>Press Ctrl+R (or Execute->Run) to run the scratchpad.</li> + <li>A developer toolbox window should appear - the "<a href="/en-US/docs/Tools/Page_Inspector">Inspector</a>", "<a href="/en-US/docs/Tools/Style_Editor">Style Editor</a>", and "<a href="/en-US/docs/Tools/Profiler">Profiler</a>" tabs should all be showing the social element you enabled in the script. Executing the scratchpad a second time will hide the toolbox.</li> + <li><strong>Note that the Debugger and Web Console tabs are not showing the social content.</strong> This is currently expected - see below for how to enable the debugger.</li> +</ul> + +<h2 id="Utilizar_o_'Depurador'_com_os_elementos_sociais.">Utilizar o 'Depurador' com os elementos sociais.</h2> + +<ul> + <li>From the "Web Developer" menu, select "Browser Debugger". Wait a few seconds for a new debugger window to open and initialize. You will probably be asked to confirm that a new debugging session should be started.</li> + <li>In the "Filter Scripts" box, start typing the name of the script you wish to debug (for example, enter the name of your sidebar URL to debug the sidebar).</li> + <li>In the script, add breakpoints etc. to the code in question, and start debugging!</li> +</ul> + +<pre style="position: fixed; left: -1000px;">// want to inspect has been created - eg, the sidebar must be visible, the flyouts +// must have been opened once, etc. + +// The sidebar: +let w = document.getElementById("social-sidebar-browser").contentWindow; + +// The "flyout" panel. +// let w = document.getElementById("social-flyout-panel").firstChild.contentWindow + +// The "notification" panel - this will show the most-recently-used panel. +// let w = document.getElementById("social-notification-panel").firstChild.contentWindow; + + +if (!w) { + alert("This window is yet to be created"); +} else { + XPCOMUtils.defineLazyModuleGetter(this, "Toolbox", + "resource:///modules/devtools/Toolbox.jsm"); + XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory", + "resource:///modules/devtools/Target.jsm"); + let target = TargetFactory.forWindow(w); + let toolbox = gDevTools.getToolbox(target); + toolbox ? toolbox.destroy() : gDevTools.showToolbox(target, undefined, "window"); +}</pre> + +<pre style="position: fixed; left: -1000px;">// Uncomment one of the following lines. NOTE: You must ensure the element you +// want to inspect has been created - eg, the sidebar must be visible, the flyouts +// must have been opened once, etc. + +// The sidebar: +let w = document.getElementById("social-sidebar-browser").contentWindow; + +// The "flyout" panel. +// let w = document.getElementById("social-flyout-panel").firstChild.contentWindow + +// The "notification" panel - this will show the most-recently-used panel. +// let w = document.getElementById("social-notification-panel").firstChild.contentWindow; + + +if (!w) { + alert("This window is yet to be created"); +} else { + XPCOMUtils.defineLazyModuleGetter(this, "Toolbox", + "resource:///modules/devtools/Toolbox.jsm"); + XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory", + "resource:///modules/devtools/Target.jsm"); + let target = TargetFactory.forWindow(w); + let toolbox = gDevTools.getToolbox(target); + toolbox ? toolbox.destroy() : gDevTools.showToolbox(target, undefined, "window"); +}</pre> + +<pre style="position: fixed; left: -1000px;">// Uncomment one of the following lines. NOTE: You must ensure the element you +// want to inspect has been created - eg, the sidebar must be visible, the flyouts +// must have been opened once, etc. + +// The sidebar: +let w = document.getElementById("social-sidebar-browser").contentWindow; + +// The "flyout" panel. +// let w = document.getElementById("social-flyout-panel").firstChild.contentWindow + +// The "notification" panel - this will show the most-recently-used panel. +// let w = document.getElementById("social-notification-panel").firstChild.contentWindow; + + +if (!w) { + alert("This window is yet to be created"); +} else { + XPCOMUtils.defineLazyModuleGetter(this, "Toolbox", + "resource:///modules/devtools/Toolbox.jsm"); + XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory", + "resource:///modules/devtools/Target.jsm"); + let target = TargetFactory.forWindow(w); + let toolbox = gDevTools.getToolbox(target); + toolbox ? toolbox.destroy() : gDevTools.showToolbox(target, undefined, "window"); +}</pre> + +<pre style="position: fixed; left: -1000px;">// Uncomment one of the following lines. NOTE: You must ensure the element you +// want to inspect has been created - eg, the sidebar must be visible, the flyouts +// must have been opened once, etc. + +// The sidebar: +let w = document.getElementById("social-sidebar-browser").contentWindow; + +// The "flyout" panel. +// let w = document.getElementById("social-flyout-panel").firstChild.contentWindow + +// The "notification" panel - this will show the most-recently-used panel. +// let w = document.getElementById("social-notification-panel").firstChild.contentWindow; + + +if (!w) { + alert("This window is yet to be created"); +} else { + XPCOMUtils.defineLazyModuleGetter(this, "Toolbox", + "resource:///modules/devtools/Toolbox.jsm"); + XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory", + "resource:///modules/devtools/Target.jsm"); + let target = TargetFactory.forWindow(w); + let toolbox = gDevTools.getToolbox(target); + toolbox ? toolbox.destroy() : gDevTools.showToolbox(target, undefined, "window"); +}</pre> + +<pre style="position: fixed; left: -1000px;">// Uncomment one of the following lines. NOTE: You must ensure the element you +// want to inspect has been created - eg, the sidebar must be visible, the flyouts +// must have been opened once, etc. + +// The sidebar: +let w = document.getElementById("social-sidebar-browser").contentWindow; + +// The "flyout" panel. +// let w = document.getElementById("social-flyout-panel").firstChild.contentWindow + +// The "notification" panel - this will show the most-recently-used panel. +// let w = document.getElementById("social-notification-panel").firstChild.contentWindow; + + +if (!w) { + alert("This window is yet to be created"); +} else { + XPCOMUtils.defineLazyModuleGetter(this, "Toolbox", + "resource:///modules/devtools/Toolbox.jsm"); + XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory", + "resource:///modules/devtools/Target.jsm"); + let target = TargetFactory.forWindow(w); + let toolbox = gDevTools.getToolbox(target); + toolbox ? toolbox.destroy() : gDevTools.showToolbox(target, undefined, "window"); +}</pre> + +<pre style="position: fixed; left: -1000px;">// Uncomment one of the following lines. NOTE: You must ensure the element you +// want to inspect has been created - eg, the sidebar must be visible, the flyouts +// must have been opened once, etc. + +// The sidebar: +let w = document.getElementById("social-sidebar-browser").contentWindow; + +// The "flyout" panel. +// let w = document.getElementById("social-flyout-panel").firstChild.contentWindow + +// The "notification" panel - this will show the most-recently-used panel. +// let w = document.getElementById("social-notification-panel").firstChild.contentWindow; + + +if (!w) { + alert("This window is yet to be created"); +} else { + XPCOMUtils.defineLazyModuleGetter(this, "Toolbox", + "resource:///modules/devtools/Toolbox.jsm"); + XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory", + "resource:///modules/devtools/Target.jsm"); + let target = TargetFactory.forWindow(w); + let toolbox = gDevTools.getToolbox(target); + toolbox ? toolbox.destroy() : gDevTools.showToolbox(target, undefined, "window"); +}</pre> diff --git a/files/pt-pt/archive/firefox_os/index.html b/files/pt-pt/archive/firefox_os/index.html new file mode 100644 index 0000000000..591f6946fa --- /dev/null +++ b/files/pt-pt/archive/firefox_os/index.html @@ -0,0 +1,11 @@ +--- +title: Firefox OS +slug: Archive/Firefox_OS +tags: + - NeedsTranslation + - TopicStub +translation_of: Archive/B2G_OS +--- +<p class="summary">This page lists archived content for the Firefox OS product, and the open source project it is based on, B2G OS. For current B2G OS material, see the <a href="/en-US/docs/Mozilla/B2G_OS">B2G OS page</a>.</p> + +<p>{{SubpagesWithSummaries}}</p> diff --git a/files/pt-pt/archive/index.html b/files/pt-pt/archive/index.html new file mode 100644 index 0000000000..ebdf47390c --- /dev/null +++ b/files/pt-pt/archive/index.html @@ -0,0 +1,25 @@ +--- +title: Arquivo de conteúdo obsoleto +slug: Archive +tags: + - Arquivo + - Landing +translation_of: Archive +--- +<p>{{QuickLinksWithSubpages("/pt-PT/docs/Archive", 2, 0, 1)}}</p> + +<p>Aqui na MDN, nós tentamos evitar a eliminação imediata de conteúdo que pode ser útil para pessoas que segmentam plataformas legadas, sistemas operativos, e navegadores. Talvez o seu público alvo sejam pessoas que estão a utilizar hardware mais antigo, por exemplo, e não podem atualizar para os navegadores mais recentes e melhores. Ou, por "motivos", a sua empresa precisa de utilizar um software muito antigo e você precisa de criar um conteúdo da Web que seja executado nesse software. Ou talvez esteja apenas curioso sobre o histórico de uma funcionaldiade ou API obsoleta, e como esta funcionou.</p> + +<p>Existem muitas razões pelas quais a documentação antiga pode ser útil. Então, nós estabelecemos esta área na qual podemos arquivar a documentação antiga. O material nesta zona de conteúdo 'Arquivado' <strong>não</strong> deve ser utilizado para criar novos sites da Web ou aplicações para os navegadores modernos. Está aqui apenas para referência histórica.</p> + +<div class="note"> +<p><strong>Nota para autores:</strong> nós precisamos de tentar manter as subpáginas aqui organizadas, em vez de serem todas colocadas numa pasta grande. Tente criar subárvores para categorias de material. Além disso, mova apenas as páginas que são <strong>extremamente</strong> obsoletas. Se alguém puder realisticamente precisar da informação num produto vivo, pode não ser apropriado movê-la aqui. Em geral, pode ser melhor discutir isso no canal <a href="https://chat.mozilla.org/#/room/#mdn:mozilla.org">MDN Web Docs</a> antes de mover conteúdo para aqui.</p> +</div> + +<p>{{SubpagesWithSummaries}}</p> + +<div class="hidden"> +<h2 id="Subnav">Subnav</h2> + +<p>{{ListSubpages("/pt-PT/docs/Archive", 2, 0, 1)}}</p> +</div> diff --git a/files/pt-pt/archive/mdn/index.html b/files/pt-pt/archive/mdn/index.html new file mode 100644 index 0000000000..9e550840e3 --- /dev/null +++ b/files/pt-pt/archive/mdn/index.html @@ -0,0 +1,20 @@ +--- +title: MDN Archive +slug: Archive/MDN +tags: + - Archive + - MDN + - NeedsTranslation + - TopicStub +translation_of: Archive/MDN +--- +<p>{{MDNSidebar}}</p> + +<div class="blockIndicator obsolete"> +<p><strong>Obsolete</strong><br> + This documentation is obsolete.</p> +</div> + +<p>The documentation listed below is archived, obsolete material about MDN itself.</p> + +<p>{{LandingPageListSubpages}}</p> diff --git a/files/pt-pt/archive/meta_docs/conteudo_mdn_em_webplatform.org/index.html b/files/pt-pt/archive/meta_docs/conteudo_mdn_em_webplatform.org/index.html new file mode 100644 index 0000000000..29379105c4 --- /dev/null +++ b/files/pt-pt/archive/meta_docs/conteudo_mdn_em_webplatform.org/index.html @@ -0,0 +1,19 @@ +--- +title: Conteúdo MDN em WebPlatform.org +slug: Archive/Meta_docs/Conteudo_MDN_em_WebPlatform.org +translation_of: Archive/Meta_docs/MDN_content_on_WebPlatform.org +--- +<p><a href="http://www.webplatform.org/" title="http://www.webplatform.org/">Web Platform Docs</a> (WPD) é um site para a documentação e educação sobre os padrões da Web, mantido por <a href="http://www.w3.org/" title="http://www.w3.org/">W3C</a> e apoiado pela Mozilla, entre outros. Anyone is welcome to contribute content from MDN to WebPlatform.org, under the terms of MDN's <a href="http://creativecommons.org/licenses/by-sa/2.5/" title="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Share-Alike 2.5</a> (CC-BY-SA) license. Content that originates from MDN must be attributed to MDN, with a link to the source article. The Web Platform Docs site provides support for doing this in a systematic way.</p> + +<p>If you create an account on WPD and create a new page, you’ll see that there is an option in the "new page" form to indicate that the content you’re contributing came from MDN, and to provide the original URL on MDN. There is also a way on WPD to mark <em>sections</em> of articles as coming from MDN, for cases where they get merged into CC-BY content. (CC-BY is the default license for reuse on WPD.) The <a href="http://docs.webplatform.org/wiki/WPD:External_Attribution" title="http://docs.webplatform.org/wiki/WPD:External_Attribution">External Attribution</a> page on WebPlatform.org describes how to do all of that.</p> + +<h2 id="Questões">Questões?</h2> + +<dl> + <dt>Sobre a MDN ou o seu conteúdo</dt> + <dd>Publique-o no <a href="https://discourse.mozilla-community.org/c/mdn">fórum de discussão da MDN</a>, ou pergunte em <a href="irc://irc.mozilla.org/mdn" title="irc://irc.mozilla.org/devmo">#mdn on irc.mozilla.org</a>.</dd> + <dt>Sobre os termos da licença da Mozilla</dt> + <dd>Envie uma mensagem para <a href="http://mailto:licensing@mozilla.org" title="http://mailto:licensing@mozilla.org">licensing@mozilla.org</a>.</dd> + <dt>Sobre os 'Documentos da Plataforma da Web', o seu conteúdo, a sua licença, ou os seus termos de utilização</dt> + <dd>Publique-os na lista de endereços (discussão) <a href="http://lists.w3.org/Archives/Public/public-webplatform/" title="http://lists.w3.org/Archives/Public/public-webplatform/">public-webplatform</a>, mantida por W3C, pu pergunte em <a href="irc://irc.freenode.org/webplatform" title="irc://irc.freenode.org/webplatform">#webplatform on irc.freenode.org</a>.</dd> +</dl> diff --git a/files/pt-pt/archive/meta_docs/escrever_conteudo/index.html b/files/pt-pt/archive/meta_docs/escrever_conteudo/index.html new file mode 100644 index 0000000000..e2d9caad57 --- /dev/null +++ b/files/pt-pt/archive/meta_docs/escrever_conteudo/index.html @@ -0,0 +1,58 @@ +--- +title: Escrever conteúdo +slug: Archive/Meta_docs/Escrever_conteudo +tags: + - MDN +translation_of: Archive/Meta_docs/Writing_content +--- +<p>There are always things that can be added or updated on MDN. Whether it's all-new documentation for a sparkling new API or a revision to an older API that's changed subtly, you'll find lots of opportunities to help.</p> + +<h2 id="Editar_uma_página_existente">Editar uma página existente</h2> + +<p>If you've found a page you'd like to revise, simply click the "edit" button at its top right corner. This will open the WYSIWYG editor for working on the page's contents. See the <a href="/en-US/docs/Project:MDN/Contributing/Editor_guide">MDN editor guide</a> for details on how to work with the editor, as well as how to work with the macro system we use to help automate the construction and formatting of content.</p> + +<p>There are lots of reasons you might edit an existing page:</p> + +<ul> + <li>You've spotted an error or typo.</li> + <li>You want to reword something to be easier to understand.</li> + <li>The layout or formatting of the page is messy.</li> + <li>The API being documented has changed and the documentation needs updating to match the changes.</li> + <li>You'd like to add information about a behavior difference between multiple browsers for an API.</li> + <li>You want to add or improve a code sample. See <a href="#Add_a_code_sample">Add a code sample</a> below for details.</li> + <li>The article is a stub, or is simply missing important details.</li> +</ul> + +<h2 id="Adicionar_uma_nova_página">Adicionar uma nova página</h2> + +<p>This is the big one! Adding a new page to MDN makes the Web love you and want to hug you. There are several obvious reasons to create a new page, including to document an API that's not yet documented or to add a new tutorial or guide on a topic.</p> + +<p>There are some ways to go about creating a new page on MDN, once you've <a href="/en-US/docs/Project:MDN/Contributing/Getting_started#Logging_into_MDN">logged in</a>:</p> + +<dl> + <dt>Click a "missing page" link</dt> + <dd>As you browse MDN, you'll occasionally find links to pages that don't exist yet. Often, as we create articles, we include links to pages that need to be created, even if they haven't been made yet. This helps us keep track of things that need to eventually be done, although sometimes it takes some time to get back to them. You should feel free to do so! Just click these links and you'll be taken straight into the editor for the new page.</dd> + <dt>Create a subpage</dt> + <dd>Near the top-right corner of each article is a <strong>"Advanced"</strong> drop-down menu. In that menu is a <strong>"New sub-page"</strong> option. Clicking that option opens the page editor for a new page whose parent page in the site hierarchy is the page on which you chose <strong>"New sub-page"</strong>. Simply fill out the title and slug and start writing the article's content.</dd> + <dt>Create a clone</dt> + <dd>You can also clone an existing page using the <strong>"Clone this page"</strong> option in the "This page" drop-down menu. Clicking this option makes a copy of the current page, whose parent page is the same as the current page, and opens the editor on that page, where you can set the page's title and slug, as well as edit the content of the page. This is typically a good way to add a new page to an existing reference area of the site, for example, because it gets you a sample layout for the content.</dd> + <dt>Create a link to a page that doesn't exist, then click it</dt> + <dd>This is a bit of a hybrid method. Since every page ought to be linked to from somewhere, you could start by creating a link to the new article by adding it to an existing page, then, after saving that page, you can click the link you just inserted to open an editor for the new article.</dd> +</dl> + +<div class="note"> +<p><strong>Note:</strong> If you're not logged in, you will get a 404 error when trying to visit an article that doesn't exist, instead of being offered an editor for a new page.</p> +</div> + +<h2 id="Encontrar_informação">Encontrar informação</h2> + +<p>There's a lot of information out there, and it can be tricky to hunt down the exact help you need. Here are some tips to get you started.</p> + +<dl> + <dt><a href="https://wiki.mozilla.org/Modules">Module owner lists</a></dt> + <dd>Mozilla projects work on a "module owner" basis; each major component has an owner or owners who are responsible for what goes on there. These owners are often your best source of information — or at least a great way to find the right person to talk to.</dd> + <dt><a href="http://mxr.mozilla.org/">Mozilla source cross-reference</a></dt> + <dd>MXR, the Mozilla cross-reference, lets you access all the source code for the Mozilla project (with the exception of some things, like much of Firefox OS, which is located on GitHub). The code and its comments are often a great resource for information.</dd> + <dt><a href="http://wiki.mozilla.org/">Mozilla wiki</a></dt> + <dd>The Mozilla wiki — often referred to as "wikimo" — is a repository of process and design notes, drafts, plans, and preliminary specifications. Despite being often a cluttered mess, it's a treasure trove of invaluable information.</dd> +</dl> diff --git a/files/pt-pt/archive/meta_docs/index.html b/files/pt-pt/archive/meta_docs/index.html new file mode 100644 index 0000000000..52de2c8447 --- /dev/null +++ b/files/pt-pt/archive/meta_docs/index.html @@ -0,0 +1,12 @@ +--- +title: MDN "meta-documentation" archive +slug: Archive/Meta_docs +tags: + - Archive + - MDN + - NeedsTranslation + - TopicStub +translation_of: Archive/Meta_docs +--- +<p>Here you'll find archived "meta-documentation"; that is, documentation about how to write documentation on MDN. The articles here are obsolete and should no longer be referenced; we are retaining them here for reference while we migrate some content to new places, but very little of this is useful.</p> +<p>{{LandingPageListSubpages}}</p> diff --git a/files/pt-pt/archive/meta_docs/trello/index.html b/files/pt-pt/archive/meta_docs/trello/index.html new file mode 100644 index 0000000000..ba96cd940a --- /dev/null +++ b/files/pt-pt/archive/meta_docs/trello/index.html @@ -0,0 +1,101 @@ +--- +title: Trello +slug: Archive/Meta_docs/Trello +tags: + - Guía + - Metadados MDN + - Processos + - Trello +translation_of: Archive/Meta_docs/Trello +--- +<p><span class="seoSummary">The MDN community uses a <a href="https://trello.com/b/HAhl54zz/mdn-content-team-status">Trello board</a> to organize and keep track of the things that need to be done to improve, update, and add to our content. This guide will help you learn what Trello is and how we use it.</span></p> + +<div class="note"> +<p>The Trello-based process has been replaced with a new process, using a platform called Taiga. Please see <a href="/en-US/docs/MDN/Contribute/Processes/Agile">MDN's agile process</a> to learn more.</p> +</div> + +<p>Having a tool like this to maintain a public task list lets our entire community participate in planning, and helps everyone understand what we're working on. That way, both MDN staff writers and our amazing community of volunteer contributors can know what's going on at a glance. Our board is public, meaning that <a href="https://trello.com/b/HAhl54zz/mdn-content-team-status">everyone can see it</a>. If you already have an account on Trello, you can star (favorite/bookmark) the board so that you can get to it quickly whenever you connect to Trello.</p> + +<h2 id="Introdução_ao_Trello">Introdução ao Trello</h2> + +<p>The Trello software is a Web application (created by Trello, Inc.) which you can access using your Web browser or an <a href="https://trello.com/platforms">app on your mobile device</a> (Android, iOS, Kindle Fire, and Windows 8 are among the supported platforms). This lets you check or update the Trello board at your convenience. For more information, you can read their <a href="https://trello.com/about">"about" page</a>.</p> + +<h3 id="O_quadro_do_Trello">O quadro do Trello</h3> + +<p>A board is composed of <strong>lists</strong>, and each list is composed of <strong>cards</strong>. Every card represents an "action item", which is a task that needs to be accomplished. You can add comments, due dates, detailed lists of sub-tasks, etc. on every card. But most importantly, you can drag and drop a card from a list to another, which means the task has changed status; for instance, you might drag a card from the "Doing" column to the "Review needed" column, which indicates that you've finished the task and would like for someone to review your work.</p> + +<p><img alt="Screenshot of the MDN content Trello board." src="https://mdn.mozillademos.org/files/10351/mdn_board.JPG" style="border-style: solid; border-width: 1px; height: 460px; width: 968px;"></p> + +<h4 id="Listas">Listas</h4> + +<p>A list is a set of cards; while you can assign whatever meaning you wish to each column, the MDN team uses each column to represent the status of the task. The farther to the right the column is, the closer to complete the task is. This is similar to the <a href="http://hamberg.no/gtd/">método GTD</a> ou a <a href="https://pt.wikipedia.org/wiki/Kanban">metodologia Kanban</a>.</p> + +<p>We have the following primary lists (other lists may crop up temporarily from time to time):</p> + +<dl> + <dt>A Aguardar</dt> + <dd>The tasks here have been accepted as something that need to be done, but are not currently being actively worked on. When work begins on a task, it should advance to the next column.</dd> + <dt>Ações</dt> + <dd>The tasks in this column are actively being worked on.</dd> + <dt>Precisa de Revisão</dt> + <dd>The tasks in this list have been completed but the writer(s) would like someone to review the work to ensure that it's accurate and/or stylistically/grammatically.</dd> + <dt>Sem atualizações nos últimos 14 dias</dt> + <dd>Bugs in this list have been languishing with no new information for more than two weeks. These bugs are in danger of being moved back into the On Hold list unless their status is updated soon.</dd> + <dt>Concluído em...</dt> + <dd>We create lists of bugs created in specific months to help us track our rate of progress and to be able to provide achievement lists</dd> +</dl> + +<p>Lists are simply are a collection of cards with a title, used to organize cards.</p> + +<h4 id="Fichas">Fichas</h4> + +<p>A card has much more content in it. As mentioned earlier, a card corresponds to a specific task or project. The card is described by its title which is displayed on the "front" of the card when you're looking at the board. Clicking on a card "flips" the card, showing you a panel with additional details. The detail view looks something like this:</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/10353/screenshot-trello%20com%202015-04-02%2013-20-54.png" style="height: 603px; width: 510px;"></p> + +<p>A visualizaçao detalhada de uma ficha tem estas secções:</p> + +<dl> + <dt>1. Membros</dt> + <dd>The members of the board that are assigned to this task/card. These are the Trello users that are working on the task in some way. Here, we can see that four people are involved with this task.</dd> + <dt>2. Etiquetas</dt> + <dd>You can think of labels as themes or categories that can apply to more than one list. Here, we can see that this card is related to "Open Web Docs" (a category), "Q1 Delivery" (a planning tag), "Learning Area" (a tag indicating a<a href="/en-US/Learn"> section of MDN</a>), etc. These labels are used for organizational purposes, but are also helpful for filtering; see {{anch("Filters")}} below.</dd> + <dt>3. Data limite</dt> + <dd>You can add a due date for a card to help with planning. This date can also be used for sorting and filtering. Trello can also be configured to display a calendar showing items that are due in a given time period, but this feature is not currently enabled on the MDN Content Team Status board.</dd> + <dt>4. Conteúdo</dt> + <dd>In this example, the card has a checklist to detail the precise actions that are needed to complete the task. You might also find comments and attachments inside a card. So if someone wants to put a note for this card, one can add a comment and so on. Usually, checklists are used to break down a task in smaller units which do not need to be displayed for everyone on the board.</dd> +</dl> + +<h4 id="Filtros">Filtros</h4> + +<p>If you look back at the <a href="https://mdn.mozillademos.org/files/10351/mdn_board.JPG">first screenshot</a>, you can see that there are a lot of cards. While working on some project, you might want to focus on specific ones (such as those associated with a particular technology or project). To make the board clearer and to find the right cards more efficiently, you can use filters.</p> + +<p>For example, if you only want to see the cards representing tasks or projects that are first quarter goals, you can turn on the corresponding filter on the label "Q1 Deliverables" and get this as a result:</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/10355/screenshot-trello%20com%202015-04-02%2013-43-10.png" style="border-style: solid; border-width: 1px; height: 349px; width: 753px;"></p> + +<p>Experiment with filters! You can filter on members (to find work being done by specific people), due dates, and more.</p> + +<h2 id="Como_utilizar_o_Trello">Como utilizar o Trello</h2> + +<p>Every member of the writing staff is a member of this board. In addition, volunteers can easily get access too. See {{anch("Getting involved")}} to learn how.</p> + +<p>Once you have access, you can either create cards representing proposed or ongoing projects, and you can add yourself to a card to indicate that you intend to work on that task. You can then update cards with new details such as new comments, attachments, or changes to to-do lists on the cards.</p> + +<h2 id="Participar">Participar</h2> + +<p>We encourage you to join us and <a href="/pt-PT/docs/MDN/Contribute">contribute</a> to these tasks! Pick a task that is described on one of the cards and <a href="/pt-PT/docs/MDN/Intrudução">start working on it</a>. Once you are working on it, you'll need to be able to edit the corresponding card. For this you'll need to have a Trello account, which is free. Then you will need an administrator of the board to add you to the board. To contact an administrator, you can:</p> + +<ul> + <li><a href="mailto:mdn-admins@mozilla.org?subject=MDN%20Content%20Trello%20board%20write%20access%20request&body=I%20would%20like%20write%20access%20for%20the%20MDN%20Content%20Trello%20board.%0A%0AI%20plan%20to%20work%20on%3A%20%3Cadd%20details%20here%3E%0A%0AMy%20Trello%20username%20is%3A%20%3Cadd%20username%20here%3E" title="Email the MDN administration team">Email the MDN administration team</a></li> + <li>Or just drop into the <a href="https://chat.mozilla.org/#/room/#mdn:mozilla.org">MDN Web Docs chat room</a> any time and politely ask if an admin is around. Typically there will be at least one around between around 5 AM and 5 PM Pacific time.</li> +</ul> + +<h2 id="Consulte_também">Consulte também</h2> + +<ul> + <li><a href="https://trello.com/b/p56Gwq46/mdndev-rocks">The MDN development team Trello board</a></li> + <li><a href="https://trello.com/b/LDggrYSV/learning-area-glossary">The Learning Area Trello board</a></li> + <li><a href="https://trello.com/guide">The Trello Guide</a></li> + <li><a href="/en-US/docs/MDN/Community/Whats_happening">Following what is happening on MDN</a></li> +</ul> diff --git a/files/pt-pt/archive/mozilla/drag_and_drop/index.html b/files/pt-pt/archive/mozilla/drag_and_drop/index.html new file mode 100644 index 0000000000..b963b08118 --- /dev/null +++ b/files/pt-pt/archive/mozilla/drag_and_drop/index.html @@ -0,0 +1,142 @@ +--- +title: Drag and Drop +slug: Archive/Mozilla/Drag_and_drop +tags: + - NeedsTranslation + - TopicStub + - XUL +translation_of: Archive/Mozilla/Drag_and_drop +--- +<p>{{ Next("Drag and Drop JavaScript Wrapper") }}</p> +<p>{{ deprecated_header("gecko1.9.1") }}</p> +<div class="warning"> + As of Gecko 1.9.1 (Firefox 3.5), these APIs are officially deprecated <a href="/En/DragDrop/Drag_and_Drop" title="en/DragDrop/Drag and Drop">the newer, simpler, portable API</a> should be used in their place.</div> +<p>This section describes how to implement objects that can be dragged around and dropped onto other objects.</p> +<h3 id="The_Drag_and_Drop_Interface" name="The_Drag_and_Drop_Interface">The Drag and Drop Interface</h3> +<p>Many user interfaces allow one to drag particular objects around within the interface. For example, dragging files to other directories, or dragging an icon to another window to open the document it refers to. Mozilla and <a href="/en/XUL" title="en/XUL">XUL</a> provide a number of events that can handle when the user attempts to drag objects around.</p> +<p>A user can start dragging by holding down the mouse button and moving the mouse. The drag stops when the user releases the mouse. Event handlers are called when the user starts and ends dragging, and at various points in-between.</p> +<p>Mozilla implements dragging by using a drag session. When a user requests to drag something that can be dragged, a drag session should be started. The drag session handles updating the mouse cursor and where the object should be dropped. If something cannot be dragged, it should not start a drag session. Because the user generally has only one mouse, only one drag session is in use at a time.</p> +<p>Note that drag sessions can be created from within Mozilla itself or from other applications. Mozilla will translate the data being dragged as needed.</p> +<p>The list below describes the event handlers that can be called, which may be placed on any element. You only need to put values for the handlers where you need to do something when the event occurs.</p> +<dl> + <dt> + ondrag {{ Fx_minversion_inline(3) }}</dt> + <dd> + Called periodically throughout the drag and drop operation.</dd> + <dt> + ondraggesture </dt> + <dd> + Called when the user starts dragging the element, which normally happens when the user holds down the mouse button and moves the mouse. The script in this handler should set up a drag session.</dd> + <dt> + ondragstart {{ Fx_minversion_inline(3) }} </dt> + <dd> + An alias for <code>ondraggesture</code>; this is the HTML 5 spec name for the event and may be used in HTML or XUL; however, for backward compatibility with older versions of Firefox, you may wish to continue using <code>ondraggesture</code> in XUL.</dd> + <dt> + ondragover </dt> + <dd> + This event handler is called for an element when something is being dragged over top of it. If the object can be dropped on the element, the drag session should be notified.</dd> + <dt> + ondragenter </dt> + <dd> + Called for an element when the mouse pointer first moves over the element while something is being dragged. This might be used to change the appearance of the element to indicate to the user that the object can be dropped on it.</dd> + <dt> + ondragexit </dt> + <dd> + Called for an element when the mouse pointer moves out of an element while something is being dragged. The is also called after a drop is complete so that an element has a chance to remove any highlighting or other indication.</dd> + <dt> + ondragdrop </dt> + <dd> + This event handler is called for an element when something is dropped on the element. At this point, the user has already released the mouse button. The element can simply ignore the event or can handle it some way, such as pasting the dragged object into itself.</dd> + <dt> + ondragend {{ Fx_minversion_inline(3) }} </dt> + <dd> + Called when the drag operation is finished.</dd> +</dl> +<p>There are two ways that drag and drop events can be handled. This first involves using the drag and drop <a href="/en/XPCOM" title="en/XPCOM">XPCOM</a> interfaces directly. The second is to use a <a href="/en/Drag_and_Drop_JavaScript_Wrapper" title="en/Drag_and_Drop_JavaScript_Wrapper">JavaScript wrapper</a> object that handles some of this for you. The code for this wrapper can be found in a file named {{ Source("toolkit/content/nsDragAndDrop.js nsDragAndDrop.js") }} which is contained in the widget-toolkit (or global) package.</p> +<h3 id="XPCOM_Drag_and_Drop_interfaces" name="XPCOM_Drag_and_Drop_interfaces">XPCOM Drag and Drop interfaces</h3> +<p>Two interfaces are used to support drag and drop. The first is a drag service, <a href="/en/XPCOM_Interface_Reference/nsIDragService" title="en/nsIDragService">nsIDragService</a> and the second is the drag session, <a href="/en/XPCOM_Interface_Reference/nsIDragSession" title="en/nsIDragSession">nsIDragSession</a>.</p> +<p>The <a href="/en/XPCOM_Interface_Reference/nsIDragService" title="en/nsIDragService">nsIDragService</a> is responsible for creating drag sessions when a drag starts, and removing the drag session when the drag is complete. The function <code>invokeDragSession</code> should be called to start a drag inside an <code>ondraggesture</code> event handler. Once this function is called, a drag has started.</p> +<p>The function invokeDragSession takes four parameters, as described below:</p> +<pre class="eval">invokeDragSession(element,transferableArray,region,actions) +</pre> +<dl> + <dt> + element </dt> + <dd> + A reference to the element that is being dragged. This can be retrieved by getting the property <code>event.target</code> during the event handler.</dd> + <dt> + transferableArray </dt> + <dd> + An array of <a href="/en/NsITransferable" title="en/NsITransferable">nsITransferable</a> objects, one for each item being dragged. An array is used because you might want to drag several objects at once, such as a set of files.</dd> + <dt> + region </dt> + <dd> + A region used for feedback indication. This should usually be set to null.</dd> + <dt> + actions </dt> + <dd> + The actions that the drag uses. This should be set to one of the following constants, or several added together. The action can be changed during the drag depending on what is being dragged over.</dd> +</dl> +<dl> + <dt> + nsIDragService.DRAGDROP_ACTION_NONE </dt> + <dd> + <dl> + <dt> + Used to indicate that no drag is valid.</dt> + <dt> + nsIDragService.DRAGDROP_ACTION_COPY </dt> + <dd> + The item being dragged should be copied to its dropped location.</dd> + <dt> + nsIDragService.DRAGDROP_ACTION_MOVE </dt> + <dd> + The item being dragged should be moved to its dropped location.</dd> + <dt> + nsIDragService.DRAGDROP_ACTION_LINK </dt> + <dd> + A link (or shortcut or alias) to the item being dragged should be created in the dropped location.</dd> + </dl> + </dd> +</dl> +<p>The interface {{ interface("nsIDragService") }} also provides the function <code>getCurrentSession</code> which can be called from within the drag event handlers to get and modify the state of the drag. The function returns an object that implements {{ interface("nsIDragSession") }}.</p> +<p>The interface <a href="/en/XPCOM_Interface_Reference/nsIDragSession" title="en/nsIDragSession">nsIDragSession</a> is used to get and set properties of the drag that is currently occuring. The following properties and methods are available:</p> +<dl> + <dt> + canDrop </dt> + <dd> + Set this property to <code>true</code> if the element the mouse is currently over can accept the object currently being dragged to be dropped on it. Set the value to <code>false</code> if it doesn't make sense to drop the object on it. This should be changed in the <code>ondragover</code> and <code>ondragenter</code> event handlers.</dd> + <dt> + dragAction </dt> + <dd> + Set to the current action to be performed, which should be one or more of the constants described earlier. This can be used to provide extra feedback to the user.</dd> + <dt> + numDropItems </dt> + <dd> + The number of items being dragged. For example, this will be set to 5 if five bookmarks are being dragged.</dd> + <dt> + getData(transfer,index) </dt> + <dd> + Get the data being dragged. The first argument should be an <a href="/en/NsITransferable" title="en/NsITransferable">nsITransferable</a> object to hold the data. The second argument, <code>index</code>, should be the index of the item to return.</dd> + <dt> + sourceDocument </dt> + <dd> + The document where the drag started.</dd> + <dt> + sourceNode </dt> + <dd> + The <a href="/en/DOM" title="en/DOM">DOM</a> node where the drag started.</dd> + <dt> + isDataFlavorSupported(flavor) </dt> + <dd> + Returns <code>true</code> if the data being dragged contains data of the specified flavor.</dd> +</dl> +<p>{{ Next("Drag and Drop JavaScript Wrapper") }}</p> +<div class="originaldocinfo"> + <h2 id="Original_Document_Information" name="Original_Document_Information">Original Document Information</h2> + <ul> + <li>Author(s): <a class="link-mailto" href="mailto:enndeakin@sympatico.ca">Neil Deakin</a></li> + <li>Original Document:</li> + <li>Copyright Information: Copyright (C) <a class="link-mailto" href="mailto:enndeakin@sympatico.ca">Neil Deakin</a></li> + </ul> +</div> diff --git a/files/pt-pt/archive/mozilla/index.html b/files/pt-pt/archive/mozilla/index.html new file mode 100644 index 0000000000..0acec76e6d --- /dev/null +++ b/files/pt-pt/archive/mozilla/index.html @@ -0,0 +1,10 @@ +--- +title: Archived Mozilla and build documentation +slug: Archive/Mozilla +tags: + - NeedsTranslation + - TopicStub +translation_of: Archive/Mozilla +--- +<p>These articles are archived, obsolete documents about Mozilla, Gecko, and the process of building Mozilla projects.</p> +<p>{{SubpagesWithSummaries}}</p> diff --git a/files/pt-pt/archive/mozilla/uris_and_urls/index.html b/files/pt-pt/archive/mozilla/uris_and_urls/index.html new file mode 100644 index 0000000000..f6a2802999 --- /dev/null +++ b/files/pt-pt/archive/mozilla/uris_and_urls/index.html @@ -0,0 +1,122 @@ +--- +title: URIs and URLs +slug: Archive/Mozilla/URIs_and_URLs +tags: + - Guía + - Mozilla + - Necko + - NeedsUpdate +translation_of: Archive/Mozilla/URIs_and_URLs +--- +<div class="warning warningHeader"> +<p><strong>Aviso:</strong> <strong>O conteúdo deste artigo pode estar desatualizado. </strong>Ultima atualização do artigo original foi em 2002.</p> +</div> + +<h3 id="Overview" name="Overview">Resumo</h3> + +<p>A gestão da rede e dos recursos recuperáveis localmente é uma parte central da Necko. Os recursos são identificados pelo "Uniform Resource Identifier" do URI (Extraído do RFC 2396):</p> + +<blockquote> +<dl> + <dt>Uniform</dt> + <dd>Uniformity provides several benefits: it allows different types of resource identifiers to be used in the same context, even when the mechanisms used to access those resources may differ; it allows uniform semantic interpretation of common syntactic conventions across different types of resource identifiers; it allows introduction of new types of resource identifiers without interfering with the way that existing identifiers are used; and, it allows the identifiers to be reused in many different contexts, thus permitting new applications or protocols to leverage a pre-existing, large, and widely-used set of resource identifiers.</dd> + <dt>Resource</dt> + <dd>A resource can be anything that has identity. Familiar examples include an electronic document, an image, a service (e.g., "today's weather report for Los Angeles"), and a collection of other resources. Not all resources are network "retrievable"; e.g., human beings, corporations, and bound books in a library can also be considered resources. The resource is the conceptual mapping to an entity or set of entities, not necessarily the entity which corresponds to that mapping at any particular instance in time. Thus, a resource can remain constant even when its content---the entities to which it currently corresponds---changes over time, provided that the conceptual mapping is not changed in the process.</dd> + <dt>Identifier</dt> + <dd>An identifier is an object that can act as a reference to something that has identity. In the case of URI, the object is a sequence of characters with a restricted syntax.</dd> +</dl> +A URI can be further classified as a locator, a name, or both. The term "Uniform Resource Locator" (URL) refers to the subset of URI that identify resources via a representation of their primary access mechanism (e.g., their network "location"), rather than identifying the resource by name or by some other attribute(s) of that resource. ... The URI scheme defines the namespace of the URI, and thus may further restrict the syntax and semantics of identifiers using that scheme. Although many URL schemes are named after protocols, this does not imply that the only way to access the URL's resource is via the named protocol. Gateways, proxies, caches, and name resolution services might be used to access some resources, independent of the protocol of their origin, and the resolution of some URL may require the use of more than one protocol (e.g., both DNS and HTTP are typically used to access an "http" URL's resource when it can't be found in a local cache).</blockquote> + +<p>Em Necko, cada esquema URI é representado por um manipulador de protocolo. Por vezes, um manipulador de protocolo representa mais do que um esquema. O manipulador de protocolos fornece informações e métodos específicos do esquema para criar URIs dos esquemas que apoia. Um dos principais objetivos da Necko é fornecer um suporte de protocolo "plug able". Isto significa que deve ser possível adicionar novos protocolos ao Necko apenas implementando o <a href="https://dxr.mozilla.org/mozilla-central/source/netwerk/base/public/nsIProtocolHandler.idl">nsIProtocolHandler</a> e o <a href="https://dxr.mozilla.org/mozilla-central/source/netwerk/base/public/nsIChannel.idl">nsIChannel</a>. Também pode ser necessário implementar um novo urlparser para um novo protocolo, mas isso pode não ser necessário porque Necko já fornece implementações URI que podem lidar com uma série de esquemas, implementando o urlparser genérico definido no <a href="http://tools.ietf.org/html/rfc2396">RFC 2396</a>.</p> + +<h3 id="nsIURI_and_nsIURL" name="nsIURI_and_nsIURL">nsIURI e nsIURL</h3> + +<p>Num sentido estrito, Necko conhece apenas URLs, URIs pela definição acima são demasiado genéricos para serem devidamente representados dentro de uma biblioteca.</p> + +<p>Existem, contudo, duas interfaces que se relacionam vagamente com a distinção entre URI e URL de acordo com a definição acima: nsIURI e nsIURL.</p> + +<p>nsIURI representa o acesso a uma forma muito simples e muito genérica de um URL. Falando simplesmente do seu esquema e não esquema, separado por dois pontos, como "about". nsIURL herda de nsIURI e representa o acesso a URLs comuns com esquemas como "http", "ftp", ...</p> + +<h4 id="nsSimpleURI" name="nsSimpleURI">nsSimpleURI</h4> + +<p>Uma implementação do <a href="https://dxr.mozilla.org/mozilla-central/source/netwerk/base/src/nsSimpleURI.h">nsSimpleURI </a>é o nsSimpleURI que é a base para protocolos como "sobre". nsSimpleURI contém setters e getters para o URI e os componentes de um URI: esquema e caminho (não esquema). Não existem suportes pré-escritos para URIs simples, devido à sua estrutura simples.</p> + +<h4 id="nsStandardURL" name="nsStandardURL">nsStandardURL</h4> + +<p>A implementação mais importante do nsIURL é o nsStandardURL, que é a base para protocolos como o http, ftp, ...</p> + +<p>Estes esquemas apoiam um sistema hierárquico de nomenclatura, onde a hierarquia do nome é denotada por um "/" delimitador que separa os componentes no caminho. nsStandardURL também contém as facilidades para analisar estes tipos de URLs, para quebrar a especificação do URL nos segmentos mais básicos.</p> + +<p>A especificação consiste no <em>path</em> e <em>prepath</em>. O <em>prepath</em> consiste dum esquema e autoridade. A autoridade consiste dum <em>prehost</em>, <em>host</em> e <em>port</em>. O <em>prehost</em> consiste num nome de utilizador e senha. O <em>path</em> consiste em diretório, nome de ficheiro, parametro, query e ref. O nome do ficheiro consiste em <em>filebasename</em> e <em>fileextension</em>.</p> + +<p>Se a especificação estiver completamente decomposta, consiste em: esquema, nome de utilizador, palavra-passe, anfitrião (<em>host</em>), <em>port</em>, diretório, nome base de ficheiro, extensão de ficheiro, param, consulta e ref. Juntos, estes segmentos formam a especificação do URL com a seguinte sintaxe:</p> + +<p><code><a class="external" rel="freelink">scheme://username:password@host</a>:port/directory/filebasename.fileextension;param?query#ref</code></p> + +<p>Por razões de desempenho, a especificação completa é armazenada de forma fugida no objecto nsStandardURL com pointers (position e length) para cada segmento básico e para os segmentos mais globais como caminho e pré-hospedeiro, por exemplo.</p> + +<p>A Necko fornece urlparsers pré-escritos para esquemas baseados em sistemas de nomenclatura hierárquica.</p> + +<h3 id="Escaping" name="Escaping">Escapar</h3> + +<p>Para processar um URL seguramente é necessário às vezes "escapar" alguns caracteres, para os esconder do processador. Um carácter <em>escaped </em>é codificado como um carácter triplo, que consiste do carácter de percentagem "%" seguido por dois dígitos hexadecimais a representar um byte de código. Por exemplo, "%20" é a codificação escapada do carácter de espaço no US-ASCII.</p> + +<p>Para citar o <a class="external" href="http://tools.ietf.org/html/rfc2396" title="http://tools.ietf.org/html/rfc2396">RFC 2396</a>:</p> + +<blockquote>A URI is always in an "escaped" form, since escaping or unescaping a completed URI might change its semantics. Normally, the only time escape encodings can safely be made is when the URI is being created from its component parts; each component may have its own set of characters that are reserved, so only the mechanism responsible for generating or interpreting that component can determine whether or not escaping a character will change its semantics. Likewise, a URI must be separated into its components before the escaped characters within those components can be safely decoded.</blockquote> + +<p>Isto significa que segmentos de URLs são escapados de forma diferente. Isto é feito através do NS_EscapeURL que faz parte do xpcom, mas começou como parte do Necko. A informação de como escapar cada segmento é guardado numa matriz.</p> + +<p>Um string não deve ser escapado mais que uma vez. O Necko não escapa um caráter que já foi escapado, a não ser que é forcado por uma máscara especial que pode ser usado se se sabe que um string não está escapado.</p> + +<h3 id="Parsing_URLs" name="Parsing_URLs">Processar URLs</h3> + +<p><a class="external" href="http://tools.ietf.org/html/rfc2396" title="http://tools.ietf.org/html/rfc2396">RFC 2396</a> define um processador de URL que pode lidar com a sintaxe que é comum à maioria de esquemas de URL que existem atualmente.</p> + +<p>Por vezes, é necessária uma análise específica do esquema. Também para ser um pouco tolerante a erros de sintaxe, o analisador tem de saber mais sobre a sintaxe específica dos URLs para esse esquema. Para se manter quase genérico Necko contém três analisadores para as principais classes de URLs padrão. Qual deles tem de ser utilizado é definido pela implementação do nsIProtocolhandler para o esquema em questão.</p> + +<p>As três classes principais são:</p> + +<dl> + <dt>Authority</dt> + <dd>Os URLs têm um segmento de autoridade, como "http".</dd> + <dt>NoAuthority</dt> + <dd>Estes URLs não têm um segmento de autoridade, ou têm um degenerado, como o esquema "file". Este <em>parser</em> também pode identificar <em>drives </em>se possível dependendo na plataforma.</dd> + <dt>Standard</dt> + <dd>Não se sabe se existe um segmento de autoridade, menos correção de sintaxe pode ser aplicado neste caso.</dd> +</dl> + +<h4 id="Noteable_Differences" name="Noteable_Differences">Diferenças Notáveis</h4> + +<ol> + <li>Necko não apoia certos formatos de URLs relativos que estão depreciados, baseado nesta parte do <a class="external" href="http://tools.ietf.org/html/rfc2396" title="http://tools.ietf.org/html/rfc2396">RFC 2396</a>:<br> + + <blockquote>If the scheme component is defined, indicating that the reference starts with a scheme name, then the reference is interpreted as an absolute URI and we are done. Otherwise, the reference URI's scheme is inherited from the base URI's scheme component. Due to a loophole in prior specifications (<a class="external" href="http://www.ietf.org/rfc/rfc1630.txt">RFC1630</a>), some parsers allow the scheme name to be present in a relative URI if it is the same as the base URI scheme. Unfortunately, this can conflict with the correct parsing of non-hierarchical URI. For backwards compatibility, an implementation may work around such references by removing the scheme if it matches that of the base URI and the scheme is known to always use the "hier_part" syntax. The parser can then continue with the steps below for the remainder of the reference components. Validating parsers should mark such a misformed relative reference as an error.</blockquote> + + <p>Foi decidido não ter compatibilidade com formatos depreciados, portanto URLs como "<span class="nowiki">http:page.html</span>" ou "<span class="nowiki">http:/directory/page.html</span>" são interpretados como URLs absolutos e são corrigidos pelo processador.</p> + </li> + <li>A gestão dos segmentos de consulta é diferente dos exemplos dados no <a href="http://tools.ietf.org/html/rfc2396">RFC 2396</a>:<br> + + <blockquote>Within an object with a well-defined base URI of <span class="nowiki">http://a/b/c/d;p?q</span> the relative URI would be resolved as follows: ... <span class="nowiki">?y = http://a/b/c/?y</span> ...</blockquote> + Em vez disso <code>?y = http://a/b/c/d;p?y</code> foi implementado como sugerido pelo <a href="http://tools.ietf.org/html/rfc1808">RFC 1808</a> mais antigo. Esta decisão é baseada num correio eletrónico de Roy T. Fielding, um dos autores do <a href="http://tools.ietf.org/html/rfc2396">RFC 2396</a>, afirmando que o exemplo dado está errado. Detalhes podem ser encontrados no <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=90439">bug 90439</a>.</li> + <li>Atualmente, os url-objects de Necko apenas apoiam as autoridades de alojamento ou as URLs sem autoridades. Autoridades baseadas em registos como definido no <a class="external" href="http://tools.ietf.org/html/rfc2396" title="http://tools.ietf.org/html/rfc2396">RFC 2396</a><br> + + <blockquote>Many URI schemes include a top hierarchical element for a naming authority, such that the namespace defined by the remainder of the URI is governed by that authority. This authority component is typically defined by an Internet-based server or a scheme-specific registry of naming authorities. ... The structure of a registry-based naming authority is specific to the URI scheme, but constrained to the allowed characters for an authority component.</blockquote> + + <p>não são apoiados.</p> + </li> +</ol> + +<h3 id="References" name="References">Referencias</h3> + +<p> A referência principal para URIs, URLs e URL-parsing é <a class="external" href="http://tools.ietf.org/html/rfc2396" title="http://tools.ietf.org/html/rfc2396">RFC 2396</a>.</p> + +<div class="originaldocinfo"> +<h2 id="Original_Document_Information" name="Original_Document_Information">Informação de Documento Original</h2> + +<ul> + <li>Autor(s): <a class="link-mailto" href="mailto:andreas.otte@debitel.net">Andreas Otte</a></li> + <li>Ultima Data de Atualização: January 2, 2002</li> + <li>Informação Copyright: Porções deste conteudo são © 1998–2007 por contribuintes individuais da mozilla.org; conteudo disponivel sob a licensa Creative Commons | <a class="external" href="http://www.mozilla.org/foundation/licensing/website-content.html">Detalhes</a>.</li> +</ul> +</div> diff --git a/files/pt-pt/archive/mozilla/xbl/index.html b/files/pt-pt/archive/mozilla/xbl/index.html new file mode 100644 index 0000000000..f3e30b0280 --- /dev/null +++ b/files/pt-pt/archive/mozilla/xbl/index.html @@ -0,0 +1,36 @@ +--- +title: XBL +slug: Archive/Mozilla/XBL +tags: + - XBL +translation_of: Archive/Mozilla/XBL +--- +<p><strong>XML Binding Language</strong> (<strong>XBL</strong>, as vezes tambem chamado Extensible Bindings Language) é uma linguagem para descrever Bindings que podem ser conectadas a elementos em outros documentos. O elemento ao que o Binding é conectado, chamado de <em>elemento ligado</em>, adquire o comportamento novo especificado pela ligação.</p> + +<p>Ligações podem conter manipuladores de eventos que estão registrados no elemento ligado, uma implementação de novos métodos e propriedades que se tornam acessíveis através do elemento ligado, e conteúdo anônimo que é inserido abaixo do elemento ligado.</p> + +<p>Muitos <a href="/pt/XUL" title="pt/XUL">XUL</a> widgets são no mínimo parcialmente implantados usando XBL. Você pode desenvolver seus próprios widgets reutilizáveis através de <a href="/pt/XUL" title="pt/XUL">XUL</a>, <a href="/pt/HTML" title="pt/HTML">HTML</a>, <a href="/pt/SVG" title="pt/SVG">SVG</a>, e outros primitivos usando XBL.</p> + +<h3 id="Especifica.C3.A7.C3.B5es" name="Especifica.C3.A7.C3.B5es">Especificações</h3> + +<p>XBL 1.0 é especificado na <a href="/en/XBL/XBL_1.0_Reference">XBL 1.0 Reference</a>. Infelizmente a implementação atual no Mozilla é diferente das especificações, e não existe documentação conhecida descrevendo as diferenças. Existe a esperança que a Referência seja atualizada para descrever estas diferenças.</p> + +<p>XBL 1.0 é uma tecnologia específica do Mozilla, e não um padrão <a class="external" href="http://w3.org/">W3C</a>. Entretanto, no mínimo dois padrões estão sendo desenvolvidos: sXBL and XBL 2.0.but there are</p> + +<ul> + <li>W3C <a class="external" href="http://w3.org/TR/sXBL/">sXBL</a> (atualmente um esboço funcional) representa <em>SVG's XML Binding Language</em>. Supoem-se que inclui um subconjunto de características do XBL 2.0 necessários para <a href="/pt/SVG" title="pt/SVG">SVG</a>. Na sua forma é similar ao XBL do Mozilla, mas existem algumas diferenças sutís (e não tão sutís). Os nomes dos elementos por exemplo são diferentes. sXBL também não possui algumas funções do XBL, como bindings herdados e métodos propriedades definidos em elementos ligados.</li> + <li><a class="external" href="http://www.mozilla.org/projects/xbl/xbl2.html">XBL 2.0</a> (<a class="external" href="http://w3.org/TR/XBL/">W3C working draft</a>)está sendo desenvolvido para resolver problemas encontrados no XBL 1.0 e permitir implementações numa gama maior de Web browsers.</li> +</ul> + +<p>Algumas diferenças entre sXBL e XBL2 estão listados em <a class="external" href="http://annevankesteren.nl/2005/11/xbl">um artigo de Anne van Kesteren</a>.</p> + +<h3 id="Veja_tamb.C3.A9m" name="Veja_tamb.C3.A9m">Veja também</h3> + +<ul> + <li><a href="/pt/XUL_Tutorial/Introdução_ao_XBL" title="pt/XUL_Tutorial/Introdução_ao_XBL">Introducão ao XBL</a> do <a href="/pt/XUL_Tutorial" title="pt/XUL_Tutorial">XUL Tutorial</a>.</li> + <li><a class="external" href="http://mb.eschew.org/15.php">XBL chapter</a> de <a class="external" href="http://mb.eschew.org/">"Rapid Application Development with Mozilla"</a></li> +</ul> + +<ul> + <li><a href="/Special:Tags?tag=XBL&language=pt" title="Special:Tags?tag=XBL&language=pt">Mais recursos XBL ...</a></li> +</ul> diff --git a/files/pt-pt/archive/mozilla/xul/comunidade/index.html b/files/pt-pt/archive/mozilla/xul/comunidade/index.html new file mode 100644 index 0000000000..a2712cc2a1 --- /dev/null +++ b/files/pt-pt/archive/mozilla/xul/comunidade/index.html @@ -0,0 +1,6 @@ +--- +title: Comunidade +slug: Archive/Mozilla/XUL/Comunidade +--- +<p> +</p> diff --git a/files/pt-pt/archive/mozilla/xul/image/index.html b/files/pt-pt/archive/mozilla/xul/image/index.html new file mode 100644 index 0000000000..5316e18ebd --- /dev/null +++ b/files/pt-pt/archive/mozilla/xul/image/index.html @@ -0,0 +1,154 @@ +--- +title: image +slug: Archive/Mozilla/XUL/image +tags: + - Elementos XUL + - Referência XUL +translation_of: Archive/Mozilla/XUL/image +--- +<div class="noinclude"><span class="breadcrumbs XULRef_breadcrumbs"> + « <a href="/pt-PT/docs/XUL_Reference">XUL Reference home</a> [ + <a href="#Examples">Examples</a> | + <a href="#Attributes">Attributes</a> | + <a href="#Properties">Properties</a> | + <a href="#Methods">Methods</a> | + <a href="#Related">Related</a> ] +</span></div> + +<h3 id="Resumo">Resumo</h3> + +<p>Um elemento que exibe uma imagem, bem como o elemento <a href="/En/HTML/Element/Img" title="https://developer.mozilla.org/en/HTML/element/img"><code>img</code></a> de HTML. O atributo <code id="a-src"><a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Tech/XUL/Attribute/src">src</a></code> pode ser utilziado para especificar o URL da imagem.</p> + +<p>Está disponível mais informação no <a href="/pt-PT/docs/Mozilla/Tech/XUL/Tutorial/Adicionar_Etiquetas_e_Imagens" title="en/XUL_Tutorial/Adding_Labels_and_Images">Tutorial de XUL</a>.</p> + +<div class="noinclude"> +<div class="note"> +<p><strong>Nota:</strong> Prior to <span title="(Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5)">Gecko 8.0</span>, images did not shrink down with the same ratio in both directions when specifying maximum sizes using <code>maxheight</code> or <code>maxwidth</code>. The new behavior aligns more with the HTML <a href="/pt-PT/docs/Web/HTML/Element/img" title="The documentation about this has not yet been written; please consider contributing!"><code><img></code></a> element and shrinks both the width and height down proportionally.</p> +</div> +</div> + +<dl> + <dt>Atributos</dt> + <dd><a href="#a-onerror">onerror</a>, <a href="#a-image.onload">onload</a>, <a href="#a-src">src</a>, <a href="#a-validate">validate</a></dd> +</dl> + +<dl> + <dt>Propriedades</dt> + <dd><a href="#p-accessibleType">accessibleType</a>, <a href="#p-src">src</a></dd> +</dl> + +<dl> + <dt>Classes de estilo</dt> + <dd><a href="#s-alert-icon">alert-icon</a>, <a href="#s-error-icon">error-icon</a>, <a href="#s-message-icon">message-icon</a>, <a href="#s-question-icon">question-icon</a></dd> +</dl> + +<h3 id="Exemplos">Exemplos</h3> + +<div class="float-right"><img alt="Image:Firefoxlogo2.png" class="internal" src="/@api/deki/files/220/=Firefoxlogo2.png"></div> + +<pre class="eval"><image src='Firefoxlogo.png' width='135' height='130'/> +</pre> + +<h3 id="Atributos">Atributos</h3> + +<p> </p><div id="a-onerror"> + + +<dl> + <dt><code id="a-onerror"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/onerror">onerror</a></code></dt> + <dd>Type: <em>script code</em></dd> + <dd>This event is sent to an <code><a href="/en-US/docs/Mozilla/Tech/XUL/image" title="image">image</a></code> element when an error occurs loading the image.</dd> +</dl> +</div> <div id="a-image.onload"> + + +<dl> + <dt><code id="a-image.onload"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/image.onload">image.onload</a></code></dt> + <dd>Type: <em>script code</em></dd> + <dd>This event handler will be called on the <code><a href="/en-US/docs/Mozilla/Tech/XUL/image" title="image">image</a></code> element when the image has finished loading. This applies whether the image is applied via the <code id="a-src"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/src">src</a></code> attribute or the <code>list-style-image</code> style property. If you change the image, the event will fire again when the new image loads. This event will not bubble up the element tree.</dd> +</dl> +</div> <div id="a-src"> + +<dl> + <dt> + <code id="a-src"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/src">src</a></code></dt> + <dd> + Type: <em>URI</em></dd> + <dd> + The URI of the content to appear in the element.</dd> +</dl> + + +</div> <div id="a-validate"> + + +<dl> + <dt><code id="a-validate"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/validate">validate</a></code></dt> + <dd>Type: <em>one of the values below</em></dd> + <dd>This attribute indicates whether to load the image from the cache or not. This would be useful if the images are stored remotely or you plan on swapping the image frequently. The following values are accepted, or leave out the attribute entirely for default handling:</dd> + <dd> + <dl> + <dt><code>always</code></dt> + <dd>The image is always checked to see whether it should be reloaded.</dd> + <dt><code>never</code></dt> + <dd>The image will be loaded from the cache if possible.</dd> + </dl> + </dd> +</dl> +</div> + +<h3 id="Propriedades">Propriedades</h3> + +<div id="p-accessibleType"> +<dl> + <dt> + <code><span><a href="https://developer.mozilla.org/en-US/docs/XUL/Property/accessibleType">accessibleType</a></span></code></dt> + <dd> + Type: <em>integer</em></dd> + <dd> + A value indicating the type of accessibility object for the element.</dd> +</dl> +</div> <div id="p-src"> + +<dl> + <dt><code><span><a href="https://developer.mozilla.org/en-US/docs/XUL/Property/src">src</a></span></code></dt> + <dd>Type: <em>URL</em></dd> + <dd>Gets and sets the value of the <code id="a-src"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/src">src</a></code> attribute.</dd> +</dl></div> <table style="border: 1px solid rgb(204, 204, 204); margin: 0px 0px 10px 10px; padding: 0px 10px; background: rgb(238, 238, 238) none repeat scroll 0% 50%;"> <tbody> <tr> <td> <p><strong>Inherited Properties</strong><br> <small> <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/align">align</a></span></code>, , <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/allowEvents">allowEvents</a></span></code>, , <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/boxObject">boxObject</a></span></code>, <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/builder">builder</a></span></code>, , , , <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/className">className</a></span></code>, , , , , <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/collapsed">collapsed</a></span></code>, <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/contextMenu">contextMenu</a></span></code>, <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/controllers">controllers</a></span></code>, <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/database">database</a></span></code>, <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/datasources">datasources</a></span></code>, <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/dir">dir</a></span></code>, , , <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/flex">flex</a></span></code>, <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/height">height</a></span></code>, <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/hidden">hidden</a></span></code>, <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/id">id</a></span></code>, , , <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/left">left</a></span></code>, , <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/maxHeight">maxHeight</a></span></code>, <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/maxWidth">maxWidth</a></span></code>, <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/menu">menu</a></span></code>, <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/minHeight">minHeight</a></span></code>, <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/minWidth">minWidth</a></span></code>, , , , , , , <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/observes">observes</a></span></code>, <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/ordinal">ordinal</a></span></code>, <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/orient">orient</a></span></code>, , <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/pack">pack</a></span></code>, , <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/persist">persist</a></span></code>, , , , <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/ref">ref</a></span></code>, <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/resource">resource</a></span></code>, , , , , <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/statusText">statusText</a></span></code>, <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/style">style</a></span></code>, ,, <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/tooltip">tooltip</a></span></code>, <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/tooltipText">tooltipText</a></span></code>, <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/top">top</a></span></code>, <code><span><a href="https://developer.mozilla.org/pt-PT/docs/XUL/Property/width">width</a></span></code></small></p> </td> </tr> </tbody> +</table> + +<h3 id="Métodos">Métodos</h3> + +<table style="border: 1px solid rgb(204, 204, 204); margin: 0px 0px 10px 10px; padding: 0px 10px; background: rgb(238, 238, 238) none repeat scroll 0% 50%;"> <tbody> <tr> <td> <p><strong>Inherited Methods</strong><br> <small><code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.addEventListener">addEventListener()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.appendChild">appendChild()</a></code>, <span id="m-blur"><code><a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Tech/XUL/Method/blur">blur</a></code></span>, <span id="m-click"><code><a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Tech/XUL/Method/click">click</a></code></span>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.cloneNode">cloneNode()</a></code>, <a class="internal" href="/En/DOM/Node.compareDocumentPosition" title="En/DOM/Node.compareDocumentPosition">compareDocumentPosition</a>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.dispatchEvent">dispatchEvent()</a></code>, <span id="m-doCommand"><code><a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Tech/XUL/Method/doCommand">doCommand</a></code></span>, <span id="m-focus"><code><a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Tech/XUL/Method/focus">focus</a></code></span>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.getAttribute">getAttribute()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.getAttributeNode">getAttributeNode()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.getAttributeNodeNS">getAttributeNodeNS()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.getAttributeNS">getAttributeNS()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.getBoundingClientRect">getBoundingClientRect()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.getClientRects">getClientRects()</a></code>, <span id="m-getElementsByAttribute"><code><a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Tech/XUL/Method/getElementsByAttribute">getElementsByAttribute</a></code></span>, <span id="m-getElementsByAttributeNS"><code><a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Tech/XUL/Method/getElementsByAttributeNS">getElementsByAttributeNS</a></code></span>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.getElementsByClassName">getElementsByClassName()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.getElementsByTagName">getElementsByTagName()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.getElementsByTagNameNS">getElementsByTagNameNS()</a></code>, <a class="internal" href="/En/DOM/Node.getFeature" title="En/DOM/Node.getFeature">getFeature</a>, <a class="internal" href="/En/DOM/Node.getUserData" title="En/DOM/Node.getUserData">getUserData</a>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.hasAttribute">hasAttribute()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.hasAttributeNS">hasAttributeNS()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.hasAttributes">hasAttributes()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.hasChildNodes">hasChildNodes()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.insertBefore">insertBefore()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.isDefaultNamespace">isDefaultNamespace()</a></code>, <a class="internal" href="/En/DOM/Node.isEqualNode" title="En/DOM/Node.isEqualNode">isEqualNode</a>, <a class="internal" href="/En/DOM/Node.isSameNode" title="En/DOM/Node.isSameNode">isSameNode</a>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.isSupported">isSupported()</a></code>, <a class="internal" href="/En/DOM/Node.lookupNamespaceURI" title="En/DOM/Node.lookupNamespaceURI">lookupNamespaceURI</a>, <a class="internal" href="/En/DOM/Node.lookupPrefix" title="En/DOM/Node.lookupPrefix">lookupPrefix</a>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.normalize">normalize()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.querySelector">querySelector()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.querySelectorAll">querySelectorAll()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.removeAttribute">removeAttribute()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.removeAttributeNode">removeAttributeNode()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.removeAttributeNS">removeAttributeNS()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.removeChild">removeChild()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.removeEventListener">removeEventListener()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.replaceChild">replaceChild()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.setAttribute">setAttribute()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.setAttributeNode">setAttributeNode()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.setAttributeNodeNS">setAttributeNodeNS()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.setAttributeNS">setAttributeNS()</a></code>, <a class="internal" href="/En/DOM/Node.setUserData" title="En/DOM/Node.setUserData">setUserData</a></small></p> </td> </tr> </tbody> +</table> + +<h3 id="Classes_de_estilo">Classes de estilo</h3> + +<dl> + <dt> + <code><a href="https://developer.mozilla.org/en-US/docs/XUL/Style/alert-icon">alert-icon</a></code></dt> + <dd> + Class that adds an alert icon. This typically looks like an exclamation mark. This and the other icon classes may be used by <code><a href="/en-US/docs/Mozilla/Tech/XUL/image" title="image">image</a></code> elements or other elements which can have an image.</dd> +</dl> <dl> + <dt><code><a href="https://developer.mozilla.org/en-US/docs/XUL/Style/error-icon">error-icon</a></code></dt> + <dd>Class that adds an error icon. This will typically be a red "X" icon.</dd> +</dl> <dl> + <dt><code><a href="https://developer.mozilla.org/en-US/docs/XUL/Style/message-icon">message-icon</a></code></dt> + <dd>Class that adds a message box icon.</dd> +</dl> <dl> + <dt><code><a href="https://developer.mozilla.org/en-US/docs/XUL/Style/question-icon">question-icon</a></code></dt> + <dd>Class that adds a question icon, which usually looks like a question mark.</dd> +</dl> + +<h3 id="Relacionado">Relacionado</h3> + +<p>See also the <code id="a-image"><a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Tech/XUL/Attribute/image">image</a></code> and <code id="a-icon"><a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Tech/XUL/Attribute/icon">icon</a></code> attributes.</p> + +<h3 id="Interfaces">Interfaces</h3> + +<ul> + <li><code><a href="/pt-PT/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIAccessibleProvider" title="">nsIAccessibleProvider</a></code></li> + <li><code><a href="/pt-PT/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIDOMXULImageElement" title="">nsIDOMXULImageElement</a></code></li> +</ul> + +<div class="noinclude"></div> diff --git a/files/pt-pt/archive/mozilla/xul/index.html b/files/pt-pt/archive/mozilla/xul/index.html new file mode 100644 index 0000000000..3485d951c8 --- /dev/null +++ b/files/pt-pt/archive/mozilla/xul/index.html @@ -0,0 +1,83 @@ +--- +title: XUL +slug: Archive/Mozilla/XUL +tags: + - Todas_as_Categorias + - XUL +translation_of: Archive/Mozilla/XUL +--- +<p> </p> + +<div class="callout-box"><strong><a href="/pt/Tutorial_XUL" title="pt/Tutorial_XUL">Tutorial XUL</a></strong> + +<p>Um tutorial introdutório ao XUL, originário do XULPlanet.</p> +</div> + +<div> +<p>A <strong>XML User Interface Language (XUL)</strong> (em português "linguagem XML de interface de usuário") é a linguagem de interface de usuário da Mozilla baseada na <a href="/pt/XML" title="pt/XML">XML</a> que permite construir aplicações multi-plataformas ricas em características que podem rodar ligadas ou desligadas da internet. Essas aplicações são facilmente personalizadas com texto, gráficos e disposições alternativas, fazendo com que possam ser marcadas e localizadas para vários mercados. Desenvolvedores Web que já estejam familiarizados com <a href="/pt/DHTML" title="pt/DHTML">DHTML</a> irão aprender <a href="/pt/XUL" title="pt/XUL">XUL</a> rapidamente e vão logo poder criar aplicações.</p> +</div> + +<table class="topicpage-table"> + <tbody> + <tr> + <td> + <h4 id="Documenta.C3.A7.C3.A3o" name="Documenta.C3.A7.C3.A3o"><a href="/Special:Tags?tag=XUL&language=pt" title="Special:Tags?tag=XUL&language=pt">Documentação</a></h4> + + <dl> + <dt><a href="/pt/Refer%C3%AAncia_XUL" title="pt/Referência_XUL">Referência XUL</a></dt> + <dd><small>Veja também a documentação MDC em <a href="/pt/Preferences_System" title="pt/Preferences_System">prefwindow</a>.</small></dd> + </dl> + + <dl> + <dt><a href="/pt/Controles_XUL" title="pt/Controles_XUL">Controles XUL</a></dt> + <dd><small>Uma rápida lista de todos os controles XUL disponíveis.</small></dd> + </dl> + + <dl> + <dt><a href="/pt/Vis%C3%A3o_Geral_do_XUL" title="pt/Visão_Geral_do_XUL">Visão Geral do XUL</a></dt> + <dd><small>Descreve as características chave e os componentes do XUL.</small></dd> + </dl> + + <dl> + <dt><a href="/pt/Guia_modelo_do_XUL" title="pt/Guia_modelo_do_XUL">Guia modelo do XUL</a></dt> + <dd><small>Um guia detalhado sobre modelos XUL, que é um meio de gerar conteúdo de um código de dados.</small></dd> + </dl> + + <dl> + <dt><a href="/pt/Sobreposi%C3%A7%C3%B5es_XUL" title="pt/Sobreposições_XUL">Sobreposições XUL</a></dt> + <dd><small>Um artigo sobre sobreposições XUL. Sobreposições são usadas para descrever conteúdo extra para a UI. Ele proporciona um poderoso mecanismo para extender e customizar aplicações XUL existentes.</small></dd> + </dl> + + <p><span class="alllinks"><a href="/Special:Tags?tag=XUL:Artigos&language=pt" title="Special:Tags?tag=XUL:Artigos&language=pt">Veja todos...</a></span></p> + </td> + <td> + <h4 id="Comunidade" name="Comunidade">Comunidade</h4> + + <p>{{ DiscussionList("dev-tech-xul", "mozilla.dev.tech.xul") }}</p> + + <ul> + <li><a class="link-irc" href="irc://irc.mozilla.org/xul">canal #xul em irc.mozilla.org</a></li> + <li><a href="/pt/XUL/Comunidade" title="pt/XUL/Comunidade">Outros links para comunidades...</a></li> + </ul> + + <h4 id="Ferramentas" name="Ferramentas">Ferramentas</h4> + + <ul> + <li><a href="/pt/DOM_Inspector" title="pt/DOM_Inspector">DOM Inspector</a></li> + </ul> + + <p><span class="alllinks"><a href="/Special:Tags?tag=XUL:Ferramentas&language=pt" title="Special:Tags?tag=XUL:Ferramentas&language=pt">Veja todas...</a></span></p> + + <h4 id="T.C3.B3picos_relacionados" name="T.C3.B3picos_relacionados">Tópicos relacionados</h4> + + <p><a href="/pt/JavaScript" title="pt/JavaScript">JavaScript</a>, <a href="/pt/CSS" title="pt/CSS">CSS</a>, <a href="/pt/RDF" title="pt/RDF">RDF</a>, <a href="/pt/XBL" title="pt/XBL">XBL</a>, <a href="/pt/Extens%C3%B5es" title="pt/Extensões">Extensões</a>, <a href="/pt/XULRunner" title="pt/XULRunner">XULRunner</a></p> + + <p><span class="comment">Categorias</span></p> + + <p><span class="comment">Interwiki Language Links</span></p> + + <p> </p> + </td> + </tr> + </tbody> +</table> diff --git a/files/pt-pt/archive/mozilla/xul/namespaces/index.html b/files/pt-pt/archive/mozilla/xul/namespaces/index.html new file mode 100644 index 0000000000..53bc371053 --- /dev/null +++ b/files/pt-pt/archive/mozilla/xul/namespaces/index.html @@ -0,0 +1,153 @@ +--- +title: Espaços de nomes +slug: Archive/Mozilla/XUL/Namespaces +tags: + - Extensões + - Extras +translation_of: Archive/Mozilla/XUL/Namespaces +--- +<p> </p> + +<p>Em adição a este documento, consulte <em><a href="/pt-PT/docs/Web/SVG/Namespaces_Crash_Course" title="en/SVG/Namespaces_Crash_Course">Namespaces Crash Course</a></em>.</p> + +<p><strong>Espaços de nomes XML </strong>fornecem uma maneira para distinguir nomes duplicados de elementos e atributos. Os nomes de elementos e atributos duplicados podem ocorrer quando um documento XML contém elementos e atributos de dois ou mais esquemas XML diferentes (ou DTDs). para citar <a class="external" href="https://pt.wikipedia.org/wiki/Espa%C3%A7o_de_nomes">Wikipédia</a>: "Em geral, um espaço de nome é um recipiente abstrato que fornece contexto para os itens... este contém e permite a desambiguação de itens com o mesmo nome."</p> + +<p>If you are familiar with C++ namespaces, Java packages, perl packages, or Python module importing, you are already familiar with the namespace concept.</p> + +<p>An XML namespace is identified by an unique name (called a URI, not a URL, even though it can look like a URL). An URI is any string, although most people choose a URL-based URI because URLs are an easy way to <em>hope</em> for uniqueness. Although there's nothing preventing someone else from using the namespace <code>http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul</code>, it's fairly unlikely anyone would choose that accidentally. Even if they did accidentally choose it, they may not define the same elements as XUL anyway (e.g., <code><textbox/></code>) in their schema/DTD.</p> + +<p>Any element type or attribute name in an XML namespace can be uniquely identified by its XML namespace and its "local name". Together, these two items define a <em>qualified name</em>, or <a class="external" href="http://www.w3.org/TR/REC-xml-names/#dt-qualname">QName</a>.</p> + +<p>For example, <code><xul:textbox/></code> uses a namespace named "xul" and a local name "textbox". This distinguishes it from, for example, <code><foobar:textbox/></code> which might occur in the same document. The <strong>xul</strong> and <strong>foobar</strong> namespaces must be defined at the top of the XML document in which they are used, like so:</p> + +<pre> <foobar:some-element + xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" + xmlns:foobar="the-foobar-namespace"> + <xul:textbox id="foo" value="bar"/> + <foobar:textbox favorite-food="pancakes"/> + </foobar:some-element> +</pre> + +<p>Notice I've mixed two <code><textboxes/></code> in the same document. The only way to distinguish that they have different meanings is with namespaces.</p> + +<p>There's only one other thing to know: "default namespace". Every XML element has a "default namespace", and this is used with XUL elements all the time. In XUL documents, you'll usually see this:</p> + +<pre> <window + id="foo" + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + ... + ... + </window> +</pre> + +<p>and in XHTML documents, you'll see this:</p> + +<pre> <html xmlns="http://www.w3.org/1999/xhtml"> + ... + ... + </html> +</pre> + +<p>There is a very subtle difference here than before. Before I wrote <code>xmlns<strong>:xul</strong>="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"</code> but here the <strong>:xul</strong> piece is omitted. This signifies to the XML parser that <code>http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul</code> is the <strong>default namespace</strong> for the element and its descendant elements (unless further overridden by a default namespace on a descendant element), and that any element without a namespace (i.e., no prefix and colon) belongs to the default namespace. That's why we can write the shorthand <code><textbox/></code> instead of <code><xul:textbox/></code> in XUL (although the latter is just as correct when not using <code>http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul</code> as the default namespace) -- the XUL namespace is defined as the default on the topmost element. In other words, a default namespace permits a kind of short-hand to be used for all descendants of an element.</p> + +<p>Here's a question: what namespace contains the element <code>foo</code> in the XML document below?</p> + +<pre> <foo/> +</pre> + +<p>The answer is that it's in <strong>no</strong> namespace, or alternately, it's in the namespace denoted by the empty string:</p> + +<pre> <foo xmlns=""/> +</pre> + +<p>This second example is semantically equivalent to the first.</p> + +<p>Now, a second question: what namespaces are the <code>bar</code>, <code>baz</code>, and <code>quux</code> attributes in?</p> + +<pre> <foo bar="value"> + <element xmlns="namespace!" baz="value"> + <element quux="value"/> + </element> + </foo> +</pre> + +<p><code>bar</code> is obviously not in a namespace. What about <code>baz</code> and <code>quux</code>? The answer is that they aren't in a namespace either. In fact no unprefixed attribute is ever in a namespace, primarily because XML originally didn't have namespaces, and all XML from that time had to stay in no namespace. This is a source of perennial confusion for XML namespaces.</p> + +<div id="SL_balloon_obj" style="display: block;"> +<div class="SL_ImTranslatorLogo" id="SL_button" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%; opacity: 0; display: block; left: -8px; top: -25px; transition: visibility 2s ease 0s, opacity 2s linear 0s;"> </div> + +<div id="SL_shadow_translation_result2" style="display: none;"> </div> + +<div id="SL_shadow_translator" style="display: none;"> +<div id="SL_planshet"> +<div id="SL_arrow_up" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<div id="SL_Bproviders"> +<div class="SL_BL_LABLE_ON" id="SL_P0" title="Google">G</div> + +<div class="SL_BL_LABLE_ON" id="SL_P1" title="Microsoft">M</div> + +<div class="SL_BL_LABLE_ON" id="SL_P2" title="Translator">T</div> +</div> + +<div id="SL_alert_bbl" style="display: none;"> +<div id="SLHKclose" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<div id="SL_alert_cont"> </div> +</div> + +<div id="SL_TB"> +<table id="SL_tables"> + <tbody><tr> + <td class="SL_td"><input></td> + <td class="SL_td"><select><option value="auto">Detectar idioma</option><option value="af">Africâner</option><option value="sq">Albanês</option><option value="de">Alemão</option><option value="ar">Arabe</option><option value="hy">Armênio</option><option value="az">Azerbaijano</option><option value="eu">Basco</option><option value="bn">Bengali</option><option value="be">Bielo-russo</option><option value="my">Birmanês</option><option value="bs">Bósnio</option><option value="bg">Búlgaro</option><option value="ca">Catalão</option><option value="kk">Cazaque</option><option value="ceb">Cebuano</option><option value="ny">Chichewa</option><option value="zh-CN">Chinês (Simp)</option><option value="zh-TW">Chinês (Trad)</option><option value="si">Cingalês</option><option value="ko">Coreano</option><option value="ht">Crioulo haitiano</option><option value="hr">Croata</option><option value="da">Dinamarquês</option><option value="sk">Eslovaco</option><option value="sl">Esloveno</option><option value="es">Espanhol</option><option value="eo">Esperanto</option><option value="et">Estoniano</option><option value="fi">Finlandês</option><option value="fr">Francês</option><option value="gl">Galego</option><option value="cy">Galês</option><option value="ka">Georgiano</option><option value="el">Grego</option><option value="gu">Gujarati</option><option value="ha">Hauça</option><option value="iw">Hebraico</option><option value="hi">Hindi</option><option value="hmn">Hmong</option><option value="nl">Holandês</option><option value="hu">Húngaro</option><option value="ig">Igbo</option><option value="id">Indonésio</option><option value="en">Inglês</option><option value="yo">Ioruba</option><option value="ga">Irlandês</option><option value="is">Islandês</option><option value="it">Italiano</option><option value="ja">Japonês</option><option value="jw">Javanês</option><option value="kn">Kannada</option><option value="km">Khmer</option><option value="lo">Laosiano</option><option value="la">Latim</option><option value="lv">Letão</option><option value="lt">Lituano</option><option value="mk">Macedônico</option><option value="ml">Malaiala</option><option value="ms">Malaio</option><option value="mg">Malgaxe</option><option value="mt">Maltês</option><option value="mi">Maori</option><option value="mr">Marathi</option><option value="mn">Mongol</option><option value="ne">Nepalês</option><option value="no">Norueguês</option><option value="fa">Persa</option><option value="pl">Polonês</option><option value="pt">Português</option><option value="pa">Punjabi</option><option value="ro">Romeno</option><option value="ru">Russo</option><option value="sr">Sérvio</option><option value="st">Sesotho</option><option value="so">Somália</option><option value="sw">Suaíli</option><option value="su">Sudanês</option><option value="sv">Sueco</option><option value="tg">Tadjique</option><option value="tl">Tagalo</option><option value="th">Tailandês</option><option value="ta">Tâmil</option><option value="cs">Tcheco</option><option value="te">Telugo</option><option value="tr">Turco</option><option value="uk">Ucraniano</option><option value="ur">Urdu</option><option value="uz">Uzbeque</option><option value="vi">Vietnamita</option><option value="yi">Yiddish</option><option value="zu">Zulu</option></select></td> + <td class="SL_td"> + <div id="SL_switch_b" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Alternar Idiomas"> </div> + </td> + <td class="SL_td"><select><option value="af">Africâner</option><option value="sq">Albanês</option><option value="de">Alemão</option><option value="ar">Arabe</option><option value="hy">Armênio</option><option value="az">Azerbaijano</option><option value="eu">Basco</option><option value="bn">Bengali</option><option value="be">Bielo-russo</option><option value="my">Birmanês</option><option value="bs">Bósnio</option><option value="bg">Búlgaro</option><option value="ca">Catalão</option><option value="kk">Cazaque</option><option value="ceb">Cebuano</option><option value="ny">Chichewa</option><option value="zh-CN">Chinês (Simp)</option><option value="zh-TW">Chinês (Trad)</option><option value="si">Cingalês</option><option value="ko">Coreano</option><option value="ht">Crioulo haitiano</option><option value="hr">Croata</option><option value="da">Dinamarquês</option><option value="sk">Eslovaco</option><option value="sl">Esloveno</option><option value="es">Espanhol</option><option value="eo">Esperanto</option><option value="et">Estoniano</option><option value="fi">Finlandês</option><option value="fr">Francês</option><option value="gl">Galego</option><option value="cy">Galês</option><option value="ka">Georgiano</option><option value="el">Grego</option><option value="gu">Gujarati</option><option value="ha">Hauça</option><option value="iw">Hebraico</option><option value="hi">Hindi</option><option value="hmn">Hmong</option><option value="nl">Holandês</option><option value="hu">Húngaro</option><option value="ig">Igbo</option><option value="id">Indonésio</option><option selected value="en">Inglês</option><option value="yo">Ioruba</option><option value="ga">Irlandês</option><option value="is">Islandês</option><option value="it">Italiano</option><option value="ja">Japonês</option><option value="jw">Javanês</option><option value="kn">Kannada</option><option value="km">Khmer</option><option value="lo">Laosiano</option><option value="la">Latim</option><option value="lv">Letão</option><option value="lt">Lituano</option><option value="mk">Macedônico</option><option value="ml">Malaiala</option><option value="ms">Malaio</option><option value="mg">Malgaxe</option><option value="mt">Maltês</option><option value="mi">Maori</option><option value="mr">Marathi</option><option value="mn">Mongol</option><option value="ne">Nepalês</option><option value="no">Norueguês</option><option value="fa">Persa</option><option value="pl">Polonês</option><option value="pt">Português</option><option value="pa">Punjabi</option><option value="ro">Romeno</option><option value="ru">Russo</option><option value="sr">Sérvio</option><option value="st">Sesotho</option><option value="so">Somália</option><option value="sw">Suaíli</option><option value="su">Sudanês</option><option value="sv">Sueco</option><option value="tg">Tadjique</option><option value="tl">Tagalo</option><option value="th">Tailandês</option><option value="ta">Tâmil</option><option value="cs">Tcheco</option><option value="te">Telugo</option><option value="tr">Turco</option><option value="uk">Ucraniano</option><option value="ur">Urdu</option><option value="uz">Uzbeque</option><option value="vi">Vietnamita</option><option value="yi">Yiddish</option><option value="zu">Zulu</option></select></td> + <td class="SL_td"> + <div id="SL_TTS_voice" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Ouça"> </div> + </td> + <td class="SL_td"> + <div class="SL_copy" id="SL_copy" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Copiar"> </div> + </td> + <td class="SL_td"> + <div id="SL_bbl_font_patch"> </div> + + <div class="SL_bbl_font" id="SL_bbl_font" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Tamanho da fonte"> </div> + </td> + <td class="SL_td"> + <div id="SL_bbl_help" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Ajuda"> </div> + </td> + <td class="SL_td"> + <div class="SL_pin_off" id="SL_pin" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Fixar a janela de pop-up"> </div> + </td> + </tr> +</tbody></table> +</div> +</div> + +<div id="SL_shadow_translation_result" style=""> </div> + +<div class="SL_loading" id="SL_loading" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<div id="SL_player2"> </div> + +<div id="SL_alert100">A função de fala é limitada a 200 caracteres</div> + +<div id="SL_Balloon_options" style="background: rgb(255, 255, 255) repeat scroll 0% 0%;"> +<div id="SL_arrow_down" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<table id="SL_tbl_opt" style="width: 100%;"> + <tbody><tr> + <td><input></td> + <td> + <div id="SL_BBL_IMG" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Mostrar o botão do ImTranslator 3 segundos"> </div> + </td> + <td><a class="SL_options" title="Mostrar opções">Opções</a> : <a class="SL_options" title="Histórico de tradução">Histórico</a> : <a class="SL_options" title="Comentários">Comentários</a> : <a class="SL_options" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GD9D8CPW8HFA2" title="Faça sua contribuição">Donate</a></td> + <td><span id="SL_Balloon_Close" title="Encerrar">Encerrar</span></td> + </tr> +</tbody></table> +</div> +</div> +</div> diff --git a/files/pt-pt/archive/mozilla/xul/outros_recursos/index.html b/files/pt-pt/archive/mozilla/xul/outros_recursos/index.html new file mode 100644 index 0000000000..fba234096d --- /dev/null +++ b/files/pt-pt/archive/mozilla/xul/outros_recursos/index.html @@ -0,0 +1,6 @@ +--- +title: Outros recursos +slug: Archive/Mozilla/XUL/Outros_recursos +--- +<p> +</p> diff --git a/files/pt-pt/archive/mozilla/xul/scale/index.html b/files/pt-pt/archive/mozilla/xul/scale/index.html new file mode 100644 index 0000000000..fab8882332 --- /dev/null +++ b/files/pt-pt/archive/mozilla/xul/scale/index.html @@ -0,0 +1,235 @@ +--- +title: scale +slug: Archive/Mozilla/XUL/scale +tags: + - PrecisaDeConteúdo +--- +<p> +<span class="breadcrumbs XULRef_breadcrumbs"> + « <a href="/pt-PT/docs/XUL_Reference">XUL Reference home</a> [ + <a href="#Examples">Examples</a> | + <a href="#Attributes">Attributes</a> | + <a href="#Properties">Properties</a> | + <a href="#Methods">Methods</a> | + <a href="#Related">Related</a> ] +</span> +</p><p>Uma escala permite ao usuário selecionar um valor de uma faixa. Uma barra exibida horizontalmente ou verticalmente permite ao usuário selecionar um valor arrastando um ponteiro na barra. +</p><p>Use o atributo de orientação para especificar a orientação da escala. O valor padrão é <tt>horizontal</tt>, que exibe uma escala horizontal. Valores pequenos são para a esquerda e valores maiores para a direita. Configure o atributo <code>orient</code> para <tt>vertical</tt> para usar uma escala vertical. +</p><p>O usuário pode usar as teclas de flecha para incrementar ou decrementar o valor em uma unidade, ou as teclas de "page up" e "page down" para incrementar ou decrementar uma página, como especificado pelo atributo <code>pageincrement</code>. As teclas "home" e "end" configuram o valor da escala para os valores mínimo e máximo, respectivamente. +</p> +<dl><dt> Atributos +</dt><dd> <a href="#a-disabled">disabled</a>, <a href="#a-increment">increment</a>, <a href="#a-max">max</a>, <a href="#a-min">min</a>, <a href="#a-pageincrement">pageincrement</a>, <a href="#a-tabindex">tabindex</a>, <a href="#a-value">value</a> +</dd></dl> +<dl><dt> Propriedades +</dt><dd> <a href="#p-disabled">disabled</a>, <a href="#p-max">max</a>, <a href="#p-min">min</a>, <a href="#p-increment">increment</a>, <a href="#p-pageIncrement">pageIncrement</a>, <a href="#p-tabIndex">tabIndex</a>, <a href="#p-value">value</a>, </dd></dl> +<dl><dt> Métodos +</dt><dd> <a href="#m-decrease">decrease</a>, <a href="#m-decreasePage">decreasePage</a>, <a href="#m-increase">increase</a>, <a href="#m-increasePage">increasePage</a>, +</dd></dl> +<h3 id="Examples" name="Examples"> Examples </h3> +<p>Escala horizontal: +</p> +<pre><scale min="1" max="10"/> +</pre> +<p><img alt="Image:Controlguide-scale.png"> +</p><p>Escala vertical: +</p> +<pre><scale min="1" max="10" orient="vertical"/> +</pre> +<h3 id="Atributos" name="Atributos"> Atributos </h3> +<p> +</p><div id="a-disabled"> + + +<dl> + <dt><code id="a-disabled"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/disabled">disabled</a></code></dt> + <dd>Type: <em>boolean</em></dd> + <dd>Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the <code>command</code> event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to <code>true</code>, as this will suggest you can set it to <code>false</code> to enable the element again, which is not the case. + + <div>The <code>disabled</code> attribute is allowed only for form controls. Using it with an anchor tag (an <code><a></code> link) will have no effect.</div> + + <div> + The element will, however, still respond to mouse events. To enable the element, leave this attribute out entirely.</div> + </dd> + <dd>Visible controls have a <code><span><a href="https://developer.mozilla.org/en-US/docs/XUL/Property/disabled">disabled</a></span></code> property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state.</dd> +</dl> + + +</div> +<div id="a-increment"> + +<dl> + <dt> + <code id="a-increment"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/increment">increment</a></code></dt> + <dd> + Type: <em>integer</em></dd> + <dd> + The amount by which the <code id="a-curpos"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/curpos">curpos</a></code> (for scroll bars) or <code id="a-value"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/value">value</a></code> (for number boxes and scale) attribute changes when the arrows are clicked(or scales are dragged). The default value is 1.</dd> +</dl> +</div> +<div id="a-min"> + +<dl> + <dt> + <code id="a-min"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/min">min</a></code></dt> + <dd> + Type: <em>integer</em></dd> + <dd> + The minimum value the control's value may take. The default value is 0.</dd> +</dl> +<p> </p> +</div> +<div id="a-max"> + +<dl> + <dd> + Type: <em>integer</em></dd> + <dd> + The maximum value that the scale or number box may be set to. The default value is 100 for scales and Infinity for number boxes.</dd> +</dl> + +<p> </p> +</div> +<div id="a-pageincrement"> + + +<dl> + <dt><code id="a-pageincrement"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/pageincrement">pageincrement</a></code></dt> + <dd>Type: <em>integer</em></dd> + <dd>The amount by which the value of the <code>curpos</code> or <code>value</code> attribute changes when the tray of the scroll bar (the area in which the scroll bar thumb moves) is clicked, or when the page up or page down keys are pressed. The default value is 10.</dd> +</dl> +</div> +<div id="a-tabindex"> + + +<dl> + <dt><code id="a-tabindex"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/tabindex">tabindex</a></code></dt> + <dd>Type: <em>integer</em></dd> + <dd>The tab order of the element. The tab order is the order in which the focus is moved when the user presses the "<code>tab</code>" key. Elements with a higher <code>tabindex</code> are later in the tab sequence.</dd> +</dl> +</div> +<div id="a-value"> + + +<dl> + <dt><code id="a-value"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/value">value</a></code></dt> + <dd>Type: <em>string</em></dd> + <dd>The string attribute allows you to associate a data value with an element. It is not used for any specific purpose, but you can access it with a script for your own use. Be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) Use another attribute like "value2" or "data-myAtt" (as in the HTML5 draft), as XUL does not require validation (less future-proof); 2) Use <a href="/en/DOM/element.setAttributeNS" title="en/DOM/element.setAttributeNS">setAttributeNS()</a> to put custom attributes in a non-XUL namespace (serializable and future-proof); 3) Use <a href="/En/DOM/Node.setUserData" title="En/DOM/Node.setUserData">setUserData()</a> (future-proof and clean, but not easily serializable). For user editable <code><a href="/en-US/docs/Mozilla/Tech/XUL/menulist" title="menulist">menulist</a></code> elements, the contents, as visible to the user, are read and set using the Menulist.value syntax. For those elements, <a href="/en/DOM/element.setAttribute" title="en/DOM/element.setAttributeNS">setAttribute("value", myValue)</a> and <a href="/en/DOM/element.setAttribute" title="en/DOM/element.getAttributeNS">getAttribute("value")</a> do not access or affect the contents displayed to the user.</dd> +</dl> + + + +<p> </p> +</div> + +<h3 id="Propriedades" name="Propriedades"> Propriedades </h3> +<p> +</p><div id="p-disabled"> +<dl> + <dt> + <code><span><a href="https://developer.mozilla.org/en-US/docs/XUL/Property/disabled">disabled</a></span></code></dt> + <dd> + Type: <em>boolean</em></dd> + <dd> + Gets and sets the value of the <code id="a-disabled"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/disabled">disabled</a></code> attribute.</dd> +</dl> +</div> +<div id="p-increment"> +<dl> + <dt> + <code><span><a href="https://developer.mozilla.org/en-US/docs/XUL/Property/increment">increment</a></span></code></dt> + <dd> + Type: <em>integer</em></dd> + <dd> + Gets and sets the value of the <code id="a-increment"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/increment">increment</a></code> attribute.</dd> +</dl></div> +<div id="p-min"> +<dl> + <dt> + <code><span><a href="https://developer.mozilla.org/en-US/docs/XUL/Property/min">min</a></span></code></dt> + <dd> + Type: <em>integer</em></dd> + <dd> + Gets and sets the value of the <code id="a-min"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/min">min</a></code> attribute.</dd> +</dl></div> +<div id="p-max"> +<dl> + <dt> + <code><span><a href="https://developer.mozilla.org/en-US/docs/XUL/Property/max">max</a></span></code></dt> + <dd> + Type: <em>integer</em></dd> + <dd> + Gets and sets the value of the <code id="a-max"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/max">max</a></code> attribute.</dd> +</dl></div> +<div id="p-pageIncrement"> +<dl> + <dt> + <code><span><a href="https://developer.mozilla.org/en-US/docs/XUL/Property/pageIncrement">pageIncrement</a></span></code></dt> + <dd> + Type: <em>integer</em></dd> + <dd> + Gets and sets the value of the <code id="a-pageincrement"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/pageincrement">pageincrement</a></code> attribute.</dd> +</dl></div> +<div id="p-tabIndex"> +<dl> + <dt> + <code><span><a href="https://developer.mozilla.org/en-US/docs/XUL/Property/tabIndex">tabIndex</a></span></code></dt> + <dd> + Type: <em>integer</em></dd> + <dd> + Gets and sets the value of the <code id="a-tabindex"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/tabindex">tabindex</a></code> attribute.</dd> +</dl></div> +<div id="p-value"> +<dl> + <dt> + <code><span><a href="https://developer.mozilla.org/en-US/docs/XUL/Property/value">value</a></span></code></dt> + <dd> + Type: <em>string</em></dd> + <dd> + Gets and sets the value of the <code id="a-value"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/value">value</a></code> attribute. For <code><a href="/en-US/docs/Mozilla/Tech/XUL/textbox" title="textbox">textbox</a></code> and user editable <code><a href="/en-US/docs/Mozilla/Tech/XUL/menulist" title="menulist">menulist</a></code> elements, the contents, as visible to the user, are read and set using the <code><span><a href="https://developer.mozilla.org/en-US/docs/XUL/Property/Textbox.value">Textbox.value</a></span></code> and Menulist.value syntax.</dd> +</dl> + +<p> </p></div> + +<h3 id="M.C3.A9todos" name="M.C3.A9todos"> Métodos </h3> +<table style="border: 1px solid rgb(204, 204, 204); margin: 0px 0px 10px 10px; padding: 0px 10px; background: rgb(238, 238, 238) none repeat scroll 0% 50%;"> <tbody> <tr> <td> <p><strong>Inherited Methods</strong><br> <small><code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.addEventListener">addEventListener()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.appendChild">appendChild()</a></code>, <span id="m-blur"><code><a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Tech/XUL/Method/blur">blur</a></code></span>, <span id="m-click"><code><a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Tech/XUL/Method/click">click</a></code></span>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.cloneNode">cloneNode()</a></code>, <a class="internal" href="/En/DOM/Node.compareDocumentPosition" title="En/DOM/Node.compareDocumentPosition">compareDocumentPosition</a>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.dispatchEvent">dispatchEvent()</a></code>, <span id="m-doCommand"><code><a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Tech/XUL/Method/doCommand">doCommand</a></code></span>, <span id="m-focus"><code><a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Tech/XUL/Method/focus">focus</a></code></span>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.getAttribute">getAttribute()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.getAttributeNode">getAttributeNode()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.getAttributeNodeNS">getAttributeNodeNS()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.getAttributeNS">getAttributeNS()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.getBoundingClientRect">getBoundingClientRect()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.getClientRects">getClientRects()</a></code>, <span id="m-getElementsByAttribute"><code><a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Tech/XUL/Method/getElementsByAttribute">getElementsByAttribute</a></code></span>, <span id="m-getElementsByAttributeNS"><code><a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Tech/XUL/Method/getElementsByAttributeNS">getElementsByAttributeNS</a></code></span>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.getElementsByClassName">getElementsByClassName()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.getElementsByTagName">getElementsByTagName()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.getElementsByTagNameNS">getElementsByTagNameNS()</a></code>, <a class="internal" href="/En/DOM/Node.getFeature" title="En/DOM/Node.getFeature">getFeature</a>, <a class="internal" href="/En/DOM/Node.getUserData" title="En/DOM/Node.getUserData">getUserData</a>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.hasAttribute">hasAttribute()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.hasAttributeNS">hasAttributeNS()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.hasAttributes">hasAttributes()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.hasChildNodes">hasChildNodes()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.insertBefore">insertBefore()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.isDefaultNamespace">isDefaultNamespace()</a></code>, <a class="internal" href="/En/DOM/Node.isEqualNode" title="En/DOM/Node.isEqualNode">isEqualNode</a>, <a class="internal" href="/En/DOM/Node.isSameNode" title="En/DOM/Node.isSameNode">isSameNode</a>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.isSupported">isSupported()</a></code>, <a class="internal" href="/En/DOM/Node.lookupNamespaceURI" title="En/DOM/Node.lookupNamespaceURI">lookupNamespaceURI</a>, <a class="internal" href="/En/DOM/Node.lookupPrefix" title="En/DOM/Node.lookupPrefix">lookupPrefix</a>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.normalize">normalize()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.querySelector">querySelector()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.querySelectorAll">querySelectorAll()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.removeAttribute">removeAttribute()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.removeAttributeNode">removeAttributeNode()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.removeAttributeNS">removeAttributeNS()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.removeChild">removeChild()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.removeEventListener">removeEventListener()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.replaceChild">replaceChild()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.setAttribute">setAttribute()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.setAttributeNode">setAttributeNode()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.setAttributeNodeNS">setAttributeNodeNS()</a></code>, <code><a href="https://developer.mozilla.org/pt-PT/docs/DOM/element.setAttributeNS">setAttributeNS()</a></code>, <a class="internal" href="/En/DOM/Node.setUserData" title="En/DOM/Node.setUserData">setUserData</a></small></p> </td> </tr> </tbody> +</table> +<dl> + <dt> + <span id="m-decrease"><code><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Method/decrease">decrease()</a></code></span></dt> + <dd> + Return type: <em>no return value</em></dd> + <dd> + Decreases the value of the scale or number box by the <code id="a-increment"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/increment">increment</a></code>.</dd> +</dl> +<dl> + <dt> + <span id="m-decreasePage"><code><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Method/decreasePage">decreasePage()</a></code></span></dt> + <dd> + Return type: <em>no return value</em></dd> + <dd> + Decreases the value of the scale by the <code id="a-pageincrement"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/pageincrement">pageincrement</a></code>.</dd> +</dl> +<dl> + <dt> + <span id="m-increase"><code><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Method/increase">increase()</a></code></span></dt> + <dd> + Return type: <em>no return value</em></dd> + <dd> + Increases the value of the scale or number box by the <code id="a-increment"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/increment">increment</a></code>.</dd> +</dl> +<dl> + <dt> + <span id="m-increasePage"><code><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Method/increasePage">increasePage()</a></code></span></dt> + <dd> + Return type: <em>no return value</em></dd> + <dd> + Increases the value of the scale by the page increment.</dd> +</dl> + +<h3 id="Relacionado" name="Relacionado"> Relacionado </h3> +<dl><dt> Interfaces +</dt><dd> <a href="pt/NsIDOMXULControlElement">nsIDOMXULControlElement</a> +</dd></dl> +<p><span class="comment">Categorias</span> +</p><p><span class="comment">Interwiki Language Links</span> +</p> diff --git a/files/pt-pt/archive/mozilla/xul/tutorial/adicionar_etiquetas_e_imagens/index.html b/files/pt-pt/archive/mozilla/xul/tutorial/adicionar_etiquetas_e_imagens/index.html new file mode 100644 index 0000000000..7f6d53c292 --- /dev/null +++ b/files/pt-pt/archive/mozilla/xul/tutorial/adicionar_etiquetas_e_imagens/index.html @@ -0,0 +1,102 @@ +--- +title: Adicionar Etiquetas e Imagens +slug: Archive/Mozilla/XUL/Tutorial/Adicionar_Etiquetas_e_Imagens +tags: + - Tutoriais + - Tutorial de XUL + - XUL +translation_of: Archive/Mozilla/XUL/Tutorial/Adding_Labels_and_Images +--- +<div class="prevnext" style="text-align: right;"> + <p><a href="/pt-PT/docs/XUL_Tutorial/Adding_Buttons" style="float: left;">« Anterior</a><a href="/pt-PT/docs/XUL_Tutorial/Input_Controls">Próxima »</a></p> +</div> + +<p>Esta secção descreve uma maneira para adicionar etiquetas e imagens a uma janela. Além disso, nós consideramos em como incluir os elementos em grupos.</p> + +<h3 id="Text_Elements" name="Text_Elements">Elementos de Texto</h3> + +<p>You cannot embed text directly into a XUL file without tags around it and expect it to be displayed. You can use two XUL elements for this purpose.</p> + +<h4 id="Label_Element" name="Label_Element">Elemento Etiqueta</h4> + +<p>The most basic way to include text in a window is to use the <code><a href="/pt-PT/docs/Mozilla/Tech/XUL/label" title="label">label</a></code> element. It should be used when you want to place a descriptive label beside a control, such as a button. An example is shown below:</p> + +<p><span id="Example_1"><a id="Example_1"></a><strong>Example 1</strong></span> : <a href="https://developer.mozilla.org/samples/xultu/examples/ex_textimage_1.xul.txt">Source</a> <a href="https://developer.mozilla.org/samples/xultu/examples/ex_textimage_1.xul">View</a></p> + +<pre><label value="This is some text"/> +</pre> + +<p>The <code><code id="a-value"><a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Tech/XUL/Attribute/value">value</a></code></code> attribute can be used to specify the text that you wish to have displayed. The text will not wrap, so the text will all be displayed on a single line. This syntax is the most common of labels.</p> + +<p>If the text needs to wrap, you can place the text content inside opening and closing tags as in the following example:</p> + +<p><span id="Example_2"><a id="Example_2"></a><strong>Example 2</strong></span> :</p> + +<pre><label>This is some longer text that will wrap onto several lines.</label> +</pre> + +<p>As with HTML, line breaks and extra whitespace are collapsed into a single space. Later, we'll find out <a href="/en-US/docs/XUL_Tutorial/Element_Positioning" title="en/XUL_Tutorial/Element_Positioning">how to constrain the width of elements</a> so that we can see the wrapping more easily.</p> + +<h5 id="Control_Attribute" name="Control_Attribute">Atributo de Controle</h5> + +<p>You can use the <code><code id="a-control"><a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Tech/XUL/Attribute/control">control</a></code></code> attribute to set which control the label is associated with. When the user clicks on an associated label, that control will be focused. This association is also important for <a href="/en-US/docs/Accessibility" title="en/Accessibility">accessibility</a>, so that screen readers read aloud the label for the control as the user tabs to it. Set the value of the <code>control</code> attribute to the <code><code id="a-id"><a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Tech/XUL/Attribute/id">id</a></code></code> of the element to be focused.</p> + +<p><span id="Example_3"><a id="Example_3"></a><strong>Example 3</strong></span> : <a href="https://developer.mozilla.org/samples/xultu/examples/ex_textimage_3.xul.txt">Source</a> <a href="https://developer.mozilla.org/samples/xultu/examples/ex_textimage_3.xul">View</a></p> + +<pre><label value="Click here:" control="open-button"/> +<button id="open-button" label="Open"/> +</pre> + +<p>In the example above, clicking the label will cause the button to be focused.</p> + +<h4 id="Description_Element" name="Description_Element">Elemento Descrição</h4> + +<p>For descriptive text not associated with any particular control, you can use the <code><a href="/pt-PT/docs/Mozilla/Tech/XUL/description" title="description">description</a></code> tag. This element is useful for informative text at the top of a dialog or a group of controls for example. As with the <code><a href="/pt-PT/docs/Mozilla/Tech/XUL/label" title="label">label</a></code> element, you can either use the <code>value</code> attribute for a single line of text or place text or XHTML content inside opening and closing description tags for longer blocks of text. It is more common to use the attribute syntax for labels, and the text content syntax for descriptions.</p> + +<p><span id="Example_4"><a id="Example_4"></a><strong>Example 4</strong></span> : <a href="https://developer.mozilla.org/samples/xultu/examples/ex_textimage_2.xul.txt">Source</a> <a href="https://developer.mozilla.org/samples/xultu/examples/ex_textimage_2.xul">View</a></p> + +<pre><description> + This longer section of text is displayed. +</description> +</pre> + +<p>You can set the text via script using the <a href="/en-US/docs/DOM/Node.textContent" title="En/DOM/Node.textContent">textContent</a> property, as in the following example:</p> + +<pre><description id="text" width="200"/> + +document.getElementById('text').textContent = "Some lengthy word wrapped text goes here."; +</pre> + +<p>Internally, both the <code><code><a href="/pt-PT/docs/Mozilla/Tech/XUL/label" title="label">label</a></code></code> element and the <code><code><a href="/pt-PT/docs/Mozilla/Tech/XUL/description" title="description">description</a></code></code> elements are the same. The <code><code><a href="/pt-PT/docs/Mozilla/Tech/XUL/label" title="label">label</a></code></code> element is intended for labels of controls, such as text fields. The <code>control</code> attribute is only supported for labels. The <code><code><a href="/pt-PT/docs/Mozilla/Tech/XUL/description" title="description">description</a></code></code> element is intended for other descriptive text such as informative text at the top of a <code><code><a href="/pt-PT/docs/Mozilla/Tech/XUL/dialog" title="dialog">dialog</a></code></code> box.</p> + +<h3 id="Images" name="Images">Imagens</h3> + +<p>XUL has an element to display images within a window. This element is appropriately named <code><a href="/pt-PT/docs/Mozilla/Tech/XUL/image" title="image">image</a></code>. Note that the tag name is different than HTML (<em>image</em> instead of <em>img</em>). You can use the <code><code id="a-src"><a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Tech/XUL/Attribute/src">src</a></code></code> attribute to specify the URL of the image file. The example below shows this:</p> + +<pre class="brush: xml"><image src="images/banner.jpg"/> +</pre> + +<p>Although you can use this syntax, it would be better in order to support different themes to use a style sheet to set the image URL. A later section will describe how to <a href="/en-US/docs/XUL_Tutorial/Adding_Style_Sheets" title="en/XUL_Tutorial/Adding_Style_Sheets">use style sheets</a>, but an example will be shown here for completeness. You can use the <code><a href="/en-US/docs/CSS/list-style-image" title="en/CSS/list-style-image">list-style-image</a></code> CSS property to set the URL for the image. Here are some examples:</p> + +<pre class="brush: xml"><strong>XUL:</strong> + <image id="image1"/> + <image id="search"/> +</pre> + +<pre class="brush: css"><strong>Style Sheet:</strong> + #image1 { + list-style-image: url("<a class="external" rel="freelink">chrome://findfile/skin/banner.jpg</a>"); + } + + #search { + list-style-image: url("<span class="nowiki">http://example.com/images/search.png</span>"); + } +</pre> + +<p>These images come from within the chrome directory, in the skin for the findfile package. Because images vary by theme, you would usually place images in the skin directory.</p> + +<p>In the next section, we will learn how to <a href="/en-US/docs/XUL_Tutorial/Input_Controls" title="en/XUL_Tutorial/Input_Controls">add some input controls to a window</a>.</p> + +<div class="prevnext" style="text-align: right;"> + <p><a href="/pt-PT/docs/XUL_Tutorial/Adding_Buttons" style="float: left;">« Anterior</a><a href="/pt-PT/docs/XUL_Tutorial/Input_Controls">Próxima »</a></p> +</div> diff --git a/files/pt-pt/archive/mozilla/xul/tutorial/ficheiros_de_propriedade/index.html b/files/pt-pt/archive/mozilla/xul/tutorial/ficheiros_de_propriedade/index.html new file mode 100644 index 0000000000..44657ee360 --- /dev/null +++ b/files/pt-pt/archive/mozilla/xul/tutorial/ficheiros_de_propriedade/index.html @@ -0,0 +1,115 @@ +--- +title: Ficheiros de Propriedade +slug: Archive/Mozilla/XUL/Tutorial/Ficheiros_de_propriedade +tags: + - Internacionalização + - Localização + - Tutoriais + - Tutorial de XUL + - XUL +translation_of: Archive/Mozilla/XUL/Tutorial/Property_Files +--- +<p> </p> + +<p>{{ PreviousNext("XUL Tutorial:Localization", "XUL Tutorial:Introduction to XBL") }}</p> + +<p>Num <em>script</em>, não pode ser utilizadas as <em>entities</em>. Em vez disso, são utilizados 'ficheiros de Propriedade'.</p> + +<h3 id="Properties" name="Properties">Properties</h3> + +<p>DTD files are suitable when you have text in a XUL file. However, a script does not get parsed for entities. In addition, you may wish to display a message which is generated from a script, if, for example, you do not know the exact text to be displayed. For this purpose, property files can be used.</p> + +<p>A property file contains a set of strings. You will find property files alongside the DTD files with a .properties extension. Properties in the file are declared with the syntax <code>name=value</code>. An example is shown below:</p> + +<pre>notFoundAlert=No files were found matching the criteria. +deleteAlert=Click OK to have all your files deleted. +resultMessage=%2$S files found in the %1$S directory. +</pre> + +<p>Here, the property file contains three properties. These would be read by a script and displayed to the user.</p> + +<p>A property file can also include comments. A line that begins with a hash sign ('#') is treated as a comment:</p> + +<pre># This is a comment +welcomeMessage=Hello, world! +# This is another comment +goodbyeMessage=Come back soon! +</pre> + +<h3 id="Stringbundles" name="Stringbundles">Stringbundles</h3> + +<p>You could write the code to read properties yourself, however XUL provides the <code>{{ XULElem("stringbundle") }}</code> element which does this for you. The element has a number of functions which can be used to get strings from the property file and get other locale information. This element reads in the contents of a property file and builds a list of properties for you. You can then look up a particular property by name.</p> + +<pre><stringbundleset id="<code>stringbundleset</code>"> +<stringbundle id="strings" src="strings.properties"/> +</stringbundleset> +</pre> + +<p>Including this element will read the properties from the file 'strings.properties' in the same directory as the XUL file. Use a chrome URL to read a file from the locale:</p> + +<pre><stringbundleset id="<code>stringbundleset</code>"> +<stringbundle id="strings" src="chrome://myplugin/locale/strings.properties"/> +</stringbundleset> +</pre> + +<p>Like other non-displayed elements, you should declare all your stringbundles inside a <code>{{ XULElem("stringbundleset") }}</code> element so that they are all kept together.</p> + +<h4 id="Getting_a_String_from_the_Bundle" name="Getting_a_String_from_the_Bundle">Getting a String from the Bundle</h4> + +<p>This <code>{{ XULElem("stringbundle") }}</code> element has a number of properties. The first is <code>getString</code> which can be used in a script to read a string from the bundle.</p> + +<pre>var strbundle = document.getElementById("strings"); +var nofilesfound=strbundle.getString("notFoundAlert"); + +alert(nofilesfound); +</pre> + +<ul> + <li>This example first gets a reference to the bundle using its <code>id</code></li> + <li>Then, it looks up the string 'notFoundAlert' in the property file. The function <code>getString()</code> returns the value of the string or null if the string does not exist.</li> + <li>Finally, the string is displayed in an alert box.</li> +</ul> + +<h4 id="Text_Formatting" name="Text_Formatting">Text Formatting</h4> + +<p>The next method is <code>getFormattedString()</code>. This method also gets a string with the given key name from the bundle. In addition, each occurrence of formatting code (e.g. <code>%S</code>) is replaced by each successive element in the supplied array.</p> + +<pre class="brush: js">var dir = "/usr/local/document"; +var count = 10; + +var strbundle = document.getElementById("strings"); +var result = strbundle.getFormattedString("resultMessage", [ dir, count ]); + +alert(result); +</pre> + +<p>This example will display following message in an alert box.</p> + +<pre>10 files found in the /usr/local/document directory. +</pre> + +<p>You will notice the formatting codes <code>%1$S</code> and <code>%2$S</code> is used, and replaced different order in the array. Formatting code %<em>n</em>$S is specify the position of corresponding parameter directly. Although the word order is not the same in all the languages, by using <code>getFormattedString()</code> the specification of the order can be put out the property files.</p> + +<p>In case you need to format a string that already contains the percentage character in it (to get something like "50% Off" returned), escape the percentage character with another percentage character, like this:</p> + +<pre>my.percentage.string = %S%% Off +</pre> + +<p>Not escaping the percentage character will generate an incorrect string that strips the space character between the percentage character and the next word of the string ("50%Off").</p> + +<h3 id="Escape_non-ASCII_Characters" name="Escape_non-ASCII_Characters">Non-ASCII Characters, UTF-8 and escaping</h3> + +<p>Gecko 1.8.x (or later) supports property files encoded in UTF-8. You can and should write non-ASCII characters directly without escape sequences, and save the file as UTF-8 without BOM. Double-check the save options of your text editor, because many don't do this by default. See <a href="/en/Localizing_extension_descriptions" title="en/Localizing_extension_descriptions">Localizing extension descriptions</a> for more details.</p> + +<p>In some cases, it may be useful or needed to use escape sequences to express some characters. Property files support escape sequences of the form: <code>\uXXXX</code> , where XXXX is a Unicode character code. For example, to put a space at the beginning or end of a string (which would normally be stripped by the properties file parser), use \u0020 .</p> + +<p><br> + In the next section, we will look at XBL, which can be used to define the <a href="/en/XUL_Tutorial/Introduction_to_XBL" title="en/XUL_Tutorial/Introduction_to_XBL">behavior of an element</a>.</p> + +<p>{{ PreviousNext("XUL Tutorial:Localization", "XUL Tutorial:Introduction to XBL") }}</p> + +<h2 id="Consulte_Também">Consulte Também</h2> + +<ul> + <li>How to localize html pages, xul files, and js/jsm files from bootstrapped add-ons: <a href="/en-US/Add-ons/Bootstrapped_extensions#Localization_%28L10n%29">Bootstrapped Extensions :: Localization (L10n)</a></li> +</ul> diff --git a/files/pt-pt/archive/mozilla/xul/tutorial/index.html b/files/pt-pt/archive/mozilla/xul/tutorial/index.html new file mode 100644 index 0000000000..8071ee6794 --- /dev/null +++ b/files/pt-pt/archive/mozilla/xul/tutorial/index.html @@ -0,0 +1,142 @@ +--- +title: XUL Tutorial +slug: Archive/Mozilla/XUL/Tutorial +tags: + - NeedsTranslation + - TopicStub + - Tutorials + - XUL + - XUL_Tutorial +translation_of: Archive/Mozilla/XUL/Tutorial +--- +<p>This tutorial describes <a href="/en-US/docs/XUL" title="/en-US/docs/XUL">XUL</a>, the <a href="/en-US/docs/XML" title="/en-US/docs/XML">XML</a> User-interface Language. This language was created for the Mozilla application and is used to describe its user interface.</p> +<h2 id="Introduction" name="Introduction">Introduction</h2> +<ul> + <li><a href="/en-US/docs/XUL/Tutorial/Introduction" title="/en-US/docs/XUL/Tutorial/Introduction">Introduction</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/XUL_Structure" title="/en-US/docs/XUL/Tutorial/XUL_Structure">XUL Structure</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/The_Chrome_URL" title="/en-US/docs/XUL/Tutorial/The_Chrome_URL">The Chrome URL</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Manifest_Files" title="/en-US/docs/XUL/Tutorial/Manifest_Files">Manifest Files</a></li> +</ul> +<h2 id="Simple_Elements" name="Simple_Elements">Simple Elements</h2> +<ul> + <li><a href="/en-US/docs/XUL/Tutorial/Creating_a_Window" title="/en-US/docs/XUL/Tutorial/Creating_a_Window">Creating a Window</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Adding_Buttons" title="/en-US/docs/XUL/Tutorial/Adding_Buttons">Adding Buttons</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Adding_Labels_and_Images" title="/en-US/docs/XUL/Tutorial/Adding_Labels_and_Images">Adding Labels and Images</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Input_Controls" title="/en-US/docs/XUL/Tutorial/Input_Controls">Input Controls</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Numeric_Controls" title="/en-US/docs/XUL/Tutorial/Numeric_Controls">Numeric Controls</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/List_Controls" title="/en-US/docs/XUL/Tutorial/List_Controls">List Controls</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Progress_Meters" title="/en-US/docs/XUL/Tutorial/Progress_Meters">Progress Meters</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Adding_HTML_Elements" title="/en-US/docs/XUL/Tutorial/Adding_HTML_Elements">Adding HTML Elements</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Using_Spacers" title="/en-US/docs/XUL/Tutorial/Using_Spacers">Using Spacers</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/More_Button_Features" title="/en-US/docs/XUL/Tutorial/More_Button_Features">More Button Features</a></li> +</ul> +<h2 id="The_Box_Model" name="The_Box_Model">The Box Model</h2> +<ul> + <li><a href="/en-US/docs/XUL/Tutorial/The_Box_Model" title="/en-US/docs/XUL/Tutorial/The_Box_Model">The Box Model</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Element_Positioning" title="/en-US/docs/XUL/Tutorial/Element_Positioning">Element Positioning</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Box_Model_Details" title="/en-US/docs/XUL/Tutorial/Box_Model_Details">Box Model Details</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Groupboxes" title="/en-US/docs/XUL/Tutorial/Groupboxes">Groupboxes</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Adding_More_Elements" title="/en-US/docs/XUL/Tutorial/Adding_More_Elements">Adding More Elements</a></li> +</ul> +<h2 id="More_Layout_Elements" name="More_Layout_Elements">More Layout Elements</h2> +<ul> + <li><a href="/en-US/docs/XUL/Tutorial/Stacks_and_Decks" title="/en-US/docs/XUL/Tutorial/Stacks_and_Decks">Stacks and Decks</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Stack_Positioning" title="/en-US/docs/XUL/Tutorial/Stack_Positioning">Stack Positioning</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Tabboxes" title="/en-US/docs/XUL/Tutorial/Tabboxes">Tabboxes</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Grids" title="/en-US/docs/XUL/Tutorial/Grids">Grids</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Content_Panels" title="/en-US/docs/XUL/Tutorial/Content_Panels">Content Panels</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Splitters" title="/en-US/docs/XUL/Tutorial/Splitters">Splitters</a></li> +</ul> +<h2 id="Toolbars_and_Menus" name="Toolbars_and_Menus">Toolbars and Menus</h2> +<ul> + <li><a href="/en-US/docs/XUL/Tutorial/Toolbars" title="/en-US/docs/XUL/Tutorial/Toolbars">Toolbars</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Simple_Menu_Bars" title="/en-US/docs/XUL/Tutorial/Simple_Menu_Bars">Simple Menu Bars</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/More_Menu_Features" title="/en-US/docs/XUL/Tutorial/More_Menu_Features">More Menu Features</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Popup_Menus" title="/en-US/docs/XUL/Tutorial/Popup_Menus">Popup Menus</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Scrolling_Menus" title="/en-US/docs/XUL/Tutorial/Scrolling_Menus">Scrolling Menus</a></li> +</ul> +<h2 id="Events_and_Scripts" name="Events_and_Scripts">Events and Scripts</h2> +<ul> + <li><a href="/en-US/docs/XUL/Tutorial/Adding_Event_Handlers" title="/en-US/docs/XUL/Tutorial/Adding_Event_Handlers">Adding Event Handlers</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/More_Event_Handlers" title="/en-US/docs/XUL/Tutorial/More_Event_Handlers">More Event Handlers</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Keyboard_Shortcuts" title="/en-US/docs/XUL/Tutorial/Keyboard_Shortcuts">Keyboard Shortcuts</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Focus_and_Selection" title="/en-US/docs/XUL/Tutorial/Focus_and_Selection">Focus and Selection</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Commands" title="/en-US/docs/XUL/Tutorial/Commands">Commands</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Updating_Commands" title="/en-US/docs/XUL/Tutorial/Updating_Commands">Updating Commands</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Broadcasters_and_Observers" title="/en-US/docs/XUL/Tutorial/Broadcasters_and_Observers">Broadcasters and Observers</a></li> +</ul> +<h2 id="Document_Object_Model" name="Document_Object_Model">Document Object Model</h2> +<ul> + <li><a href="/en-US/docs/XUL/Tutorial/Document_Object_Model" title="/en-US/docs/XUL/Tutorial/Document_Object_Model">Document Object Model</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Modifying_a_XUL_Interface" title="/en-US/docs/XUL/Tutorial/Modifying_a_XUL_Interface">Modifying a XUL Interface</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Manipulating_Lists" title="/en-US/docs/XUL/Tutorial/Manipulating_Lists">Manipulating Lists</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Box_Objects" title="/en-US/docs/XUL/Tutorial/Box_Objects">Box Objects</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/XPCOM_Interfaces" title="/en-US/docs/XUL/Tutorial/XPCOM_Interfaces">XPCOM Interfaces</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/XPCOM_Examples" title="/en-US/docs/XUL/Tutorial/XPCOM_Examples">XPCOM Examples</a></li> +</ul> +<h2 id="Trees" name="Trees">Trees</h2> +<ul> + <li><a href="/en-US/docs/XUL/Tutorial/Trees" title="/en-US/docs/XUL/Tutorial/Trees">Trees</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/More_Tree_Features" title="/en-US/docs/XUL/Tutorial/More_Tree_Features">More Tree Features</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Tree_Selection" title="/en-US/docs/XUL/Tutorial/Tree_Selection">Tree Selection</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Custom_Tree_Views" title="/en-US/docs/XUL/Tutorial/Custom_Tree_Views">Custom Tree Views</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Tree_View_Details" title="/en-US/docs/XUL/Tutorial/Tree_View_Details">Tree View Details</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Tree_Box_Objects" title="/en-US/docs/XUL/Tutorial/Tree_Box_Objects">Tree Box Objects</a></li> +</ul> +<h2 id="RDF_and_Templates" name="RDF_and_Templates">RDF and Templates</h2> +<ul> + <li><a href="/en-US/docs/XUL/Tutorial/Introduction_to_RDF" title="/en-US/docs/XUL/Tutorial/Introduction_to_RDF">Introduction to RDF</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Templates" title="/en-US/docs/XUL/Tutorial/Templates">Templates</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Trees_and_Templates" title="/en-US/docs/XUL/Tutorial/Trees_and_Templates">Trees and Templates</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/RDF_Datasources" title="/en-US/docs/XUL/Tutorial/RDF_Datasources">RDF Datasources</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Advanced_Rules" title="/en-US/docs/XUL/Tutorial/Advanced_Rules">Advanced Rules</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Persistent_Data" title="/en-US/docs/XUL/Tutorial/Persistent_Data">Persistent Data</a></li> +</ul> +<h2 id="Skins_and_Locales" name="Skins_and_Locales">Skins and Locales</h2> +<ul> + <li><a href="/en-US/docs/XUL/Tutorial/Adding_Style_Sheets" title="/en-US/docs/XUL/Tutorial/Adding_Style_Sheets">Adding Style Sheets</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Styling_a_Tree" title="/en-US/docs/XUL/Tutorial/Styling_a_Tree">Styling a Tree</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Modifying_the_Default_Skin" title="/en-US/docs/XUL/Tutorial/Modifying_the_Default_Skin">Modifying the Default Skin</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Creating_a_Skin" title="/en-US/docs/XUL/Tutorial/Creating_a_Skin">Creating a Skin</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Localization" title="/en-US/docs/XUL/Tutorial/Localization">Localization</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Property_Files" title="/en-US/docs/XUL/Tutorial/Property_Files">Property Files</a></li> +</ul> +<h2 id="Bindings" name="Bindings">Bindings</h2> +<ul> + <li><a href="/en-US/docs/XUL/Tutorial/Introduction_to_XBL" title="/en-US/docs/XUL/Tutorial/Introduction_to_XBL">Introduction to XBL</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Anonymous_Content" title="/en-US/docs/XUL/Tutorial/Anonymous_Content">Anonymous Content</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/XBL_Attribute_Inheritance" title="/en-US/docs/XUL/Tutorial/XBL_Attribute_Inheritance">XBL Attribute Inheritance</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Adding_Properties_to_XBL-defined_Elements" title="/en-US/docs/XUL/Tutorial/Adding_Properties_to_XBL-defined_Elements">Adding Properties</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Adding_Methods_to_XBL-defined_Elements" title="/en-US/docs/XUL/Tutorial/Adding_Methods_to_XBL-defined_Elements">Adding Methods</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Adding_Event_Handlers_to_XBL-defined_Elements" title="/en-US/docs/XUL/Tutorial/Adding_Event_Handlers_to_XBL-defined_Elements">Adding Event Handlers</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/XBL_Inheritance" title="/en-US/docs/XUL/Tutorial/XBL_Inheritance">XBL Inheritance</a></li> + <li><a href="/en-US/docs/Mozilla/Tech/XUL/Tutorial/Using_XBL_from_stylesheets">Creating reusable content using CSS and XBL</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/XBL_Example" title="/en-US/docs/XUL/Tutorial/XBL_Example">XBL Example</a></li> +</ul> +<h2 id="Specialized_Window_Types" name="Specialized_Window_Types">Specialized Window Types</h2> +<ul> + <li><a href="/en-US/docs/XUL/Tutorial/Features_of_a_Window" title="/en-US/docs/XUL/Tutorial/Features_of_a_Window">Features of a Window</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Creating_Dialogs" title="/en-US/docs/XUL/Tutorial/Creating_Dialogs">Creating Dialogs</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Open_and_Save_Dialogs" title="/en-US/docs/XUL/Tutorial/Open_and_Save_Dialogs">Open and Save Dialogs</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Creating_a_Wizard" title="/en-US/docs/XUL/Tutorial/Creating_a_Wizard">Creating a Wizard</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/More_Wizards" title="/en-US/docs/XUL/Tutorial/More_Wizards">More Wizards</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Overlays" title="/en-US/docs/XUL/Tutorial/Overlays">Overlays</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Cross_Package_Overlays" title="/en-US/docs/XUL/Tutorial/Cross_Package_Overlays">Cross Package Overlays</a></li> +</ul> +<h2 id="Installation" name="Installation">Installation</h2> +<ul> + <li><a href="/en-US/docs/XUL/Tutorial/Creating_an_Installer" title="/en-US/docs/XUL/Tutorial/Creating_an_Installer">Creating an Installer</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Install_Scripts" title="/en-US/docs/XUL/Tutorial/Install_Scripts">Install Scripts</a></li> + <li><a href="/en-US/docs/XUL/Tutorial/Additional_Install_Features" title="/en-US/docs/XUL/Tutorial/Additional_Install_Features">Additional Install Features</a></li> +</ul> +<div class="note"> + <p>This XUL tutorial was originally created by <a class="external" href="http://www.xulplanet.com/ndeakin/">Neil Deakin</a>. He has graciously given us permission to use it as part of the <a href="/en-US/docs/Project:About" title="Project:About">MDN</a>.</p> +</div> +<div class="originaldocinfo"> + <h2 id="Original_Document_Information" name="Original_Document_Information">Original Document Information</h2> + <ul> + <li>Author: <a class="external" href="http://www.xulplanet.com/ndeakin/">Neil Deakin</a></li> + <li>Copyright Information: © 1999-2005 XULPlanet.com</li> + </ul> +</div> +<p> </p> diff --git a/files/pt-pt/archive/mozilla/xul/tutorial/modificar_o_tema_predefinido/index.html b/files/pt-pt/archive/mozilla/xul/tutorial/modificar_o_tema_predefinido/index.html new file mode 100644 index 0000000000..9c403175a6 --- /dev/null +++ b/files/pt-pt/archive/mozilla/xul/tutorial/modificar_o_tema_predefinido/index.html @@ -0,0 +1,70 @@ +--- +title: Modificar o Tema Predefinido +slug: Archive/Mozilla/XUL/Tutorial/Modificar_o_tema_predefinido +tags: + - Firefox + - Intermediário + - Personalização + - Tutoriais + - Tutorial XUL + - XUL +translation_of: Archive/Mozilla/XUL/Tutorial/Modifying_the_Default_Skin +--- +<p>{{ PreviousNext("XUL Tutorial:Styling a Tree", "XUL Tutorial:Creating a Skin") }}</p> + +<div class="warning"> +<p>Esta documentação não foi atualizada para o Firefox Quantum. Support for the <code>userChrome.css</code> file and any of its elements described below are not guaranteed in future versions of Firefox. Using it may lead to hard-to-diagnose bugs or crashes. Use at your own risk!</p> +</div> + +<p>Esta secção descreve como modificar o tema de uma janela.</p> + +<h3 id="Skin_Basics" name="Skin_Basics">O Essencial do Tema</h3> + +<p>A <a href="/en-US/docs/XUL/Tutorial/Creating_a_Skin">skin</a> is a set of style sheets, images and behaviors that are applied to a XUL file. By applying a different skin, you can change the look of a window without changing its functionality. Firefox provides a skin by default, and you may download others. The XUL for any skins is the same, however the style sheets and images used are different.</p> + +<p>For a simple personalized look to a Firefox window, you can easily change the style sheets associated with it. Larger changes can be done by creating an entirely new skin. Firefox has a Theme Manager for changing the default skin. (Although the underlying code for Mozilla calls them skins and the user interface calls them themes, they're both referring to the same thing).</p> + +<p>A skin is described using <a href="en/CSS">CSS</a>, allowing you to define the <a href="en/CSS/Getting_Started/Color">colors</a>, <a href="en/CSS/Getting_Started/Boxes">borders</a> and images used to draw elements. The file classic.jar contains the skin definitions. The global directory within this archive contains the main style definitions for how to display the various XUL elements. By changing these files, you can change the look of the XUL applications.</p> + +<h3 id="Customize_with_userChrome.css" name="Customize_with_userChrome.css">Personalizar com userChrome.css</h3> + +<p>If you place a file called 'userChrome.css' in a directory called 'chrome' inside your user profile directory, you can override settings without changing the archives themselves. This directory should be created when you create a profile and some examples placed there. The file 'userContent.css' customizes Web pages, whereas 'userChrome.css' customizes chrome files.</p> + +<p>For example, by adding the following to the end of the file, you can change all <code>{{ XULElem("menubar") }}</code> elements to have a red background.</p> + +<pre class="brush: css">menubar { + background-color: red; +} +</pre> + +<p>If you open any Firefox window after making this change, the menu bars will be red. Because this change was made to the user style sheet, it affects all windows. This means that the browser menu bar, the bookmarks menu bar and even the find files menu bar will be red.</p> + +<h3 id="Skin_Packages" name="Skin_Packages">Pacotes de Temas</h3> + +<p>To have the change affect only one window, change the style sheet associated with that XUL file. For example, to add a red border around the menu commands in the bookmarks manager window, add the following to bookmarksManager.css in the classic.jar or your favorite skin archive.</p> + +<pre class="brush: css">menuitem { + border: 1px solid red; +} +</pre> + +<p>If you look in one of the skin archives, you will notice that each contain a number of style sheets and a number of images. The style sheets refer to the images. You should avoid putting references to images directly in XUL files if you want your content to be skinnable. This is because a particular skin's design might not use images and it may need some more complex design. By referring to the images with CSS, they are easy to remove. It also removes the reliance on specific image filenames.</p> + +<p>You can assign images to a button, checkbox and other elements by using the <code>list-style-image</code> property as in the following:</p> + +<pre class="brush: css">checkbox { + list-style-image: url("chrome://findfile/skin/images/check-off.jpg"); +} + +checkbox[checked="true"] { + list-style-image: url("chrome://findfile/skin/images/check-on.jpg"); +} +</pre> + +<p>This code changes the image associated with a checkbox. The first style sets the image for a normal checkbox and the second style sets the image for a checked checkbox. The modifier 'checked=true' makes the style only apply to elements which have their checked attributes set to true.</p> + +<p><small>See also : <a href="/en-US/Add-ons/Themes/Obsolete/Creating_a_Skin_for_Firefox">creating a skin for Firefox</a> and <a href="en/CSS/Getting_Started">CSS getting started</a> </small></p> + +<p>Na secção seguinte, nós iremos abordar a <a href="/en-US/docs/Mozilla/Tech/XUL/Tutorial/Creating_a_Skin">criação de um novo tema</a></p> + +<p>{{ PreviousNext("XUL Tutorial:Styling a Tree", "XUL Tutorial:Creating a Skin") }}</p> diff --git a/files/pt-pt/archive/mozilla/xul/tutorial/xbl_bindings/index.html b/files/pt-pt/archive/mozilla/xul/tutorial/xbl_bindings/index.html new file mode 100644 index 0000000000..9b5dd8f99f --- /dev/null +++ b/files/pt-pt/archive/mozilla/xul/tutorial/xbl_bindings/index.html @@ -0,0 +1,215 @@ +--- +title: XBL bindings +slug: Archive/Mozilla/XUL/Tutorial/XBL_bindings +tags: + - 'CSS:Como_começar' +translation_of: Archive/Beginner_tutorials/Using_XBL_from_stylesheets +--- +<p>{{ PreviousNext("CSS:Como começar:JavaScript", "CSS:Como começar:Interfaces de usuário XUL") }}</p> + +<p>Esta página ilustra como o você pode usar as CSS no Mozilla para melhorar a estrutura de aplicações complexas, fazendo o código e recursos mais facilmente reutilizáveis.</p> + +<p>Você aplica esta técnica em uma simples demonstração.</p> + +<h2 id="Informa.C3.A7.C3.A3o_XBL_bindings" name="Informa.C3.A7.C3.A3o:_XBL_bindings">Informação: XBL bindings</h2> + +<p>A estrutura proporcionada pela linguagem de marcação e as CSS não é ideal para aplicações complexas onde partes precisam ser autônomas e reutilizáveis. Você pode colocar folhas de estilo em arquivos separados, e pode também colocar os scripts em arquivos separados. Mas você precisa ligar estes arquivos no documento como um todo.</p> + +<p>Outra limitação estrutural concerne ao conteúdo. Você pode usar as CSS para proporcionar conteúdo para elementos selecionados, mas o conteúdo é limitado a textos e imagens, e seu posicionamento é limitado em antes ou depois do elemento selecionado.</p> + +<p>Mozilla proporciona um mecanismo que supera estas limitações: <em>XBL</em> (XML Bindings Language). Você pode usar o XBL para ligar elementos selecionados ao próprio:</p> + +<ul> + <li>Folha de estilo</li> + <li>Conteúdo</li> + <li>Propriedades e métodos</li> + <li>Manipuladores de eventos</li> +</ul> + +<p>Evitando ligar tudo no nível do documento, você pode fazer as partes autônomas que são fáceis de manter e reutilizar.</p> + +<table style="border: 1px solid #36b; padding: 1em; background-color: #f4f4f4; margin-bottom: 1em; width: 100%;"> + <caption>Mais detalhes</caption> + <tbody> + <tr> + <td>Para mais informação sobre XBL bindings, veja a página <a href="/pt/XBL" title="pt/XBL">XBL</a> neste wiki.</td> + </tr> + </tbody> +</table> + +<h2 id="A.C3.A7.C3.A3o_Uma_demonstra.C3.A7.C3.A3o_XBL" name="A.C3.A7.C3.A3o:_Uma_demonstra.C3.A7.C3.A3o_XBL">Ação: Uma demonstração XBL</h2> + +<p>Crie um novo documento HTML, <code>doc6.html</code>. Copie e cole o conteúdo daqui:</p> + +<div style="width: 48em;"> +<pre><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> +<HTML> + +<HEAD> +<TITLE>Como Começar Mozilla CSS - Demonstração XBL </TITLE> +<LINK rel="stylesheet" type="text/css" href="style6.css"> +</HEAD> + +<BODY> +<H1>Demonstração XBL</H1> +<DIV id="square">Clique Aqui</DIV> +</BODY> + +</HTML> +</pre> +</div> + +<p>Crie um novo arquivo CSS, <code>style6.css</code>. Esta folha de estilo contém o documento de estilo. Copie e cole o conteúdo daqui:</p> + +<div style="width: 48em;"> +<pre>/*** Demonstração XBL ***/ +#square { + -moz-binding: url("square.xbl#square"); + } +</pre> +</div> + +<p>Crie um novo arquivo de texto, <code>square.xbl</code>. Este arquivo contém o XBL binding. Copie e cole o conteúdo daqui, tendo certeza de ter rolado a tela para pegar tudo isto:</p> + +<div style="width: 48em; height: 12em; overflow: auto;"> +<pre><?xml version="1.0"?> +<!DOCTYPE bindings> +<bindings xmlns="http://www.mozilla.org/xbl" + xmlns:html="http://www.w3.org/1999/xhtml"> + +<binding id="square"> + + <resources> + <stylesheet src="bind6.css"/> + </resources> + + <content> + <html:div anonid="square"/> + <html:button anonid="button" type="button"> + <children/> + </html:button> + </content> + + <implementation> + + <field name="square"><![CDATA[ + document.getAnonymousElementByAttribute(this, "anonid", "square") + ]]></field> + + <field name="button"><![CDATA[ + document.getAnonymousElementByAttribute(this, "anonid", "button") + ]]></field> + + <method name="doDemo"> + <body><![CDATA[ + this.square.style.backgroundColor = "#cf4" + this.square.style.marginLeft = "20em" + this.button.setAttribute("disabled", "true") + setTimeout(this.clearDemo, 2000, this) + ]]></body> + </method> + + <method name="clearDemo"> + <parameter name="me"/> + <body><![CDATA[ + me.square.style.backgroundColor = "transparent" + me.square.style.marginLeft = "0" + me.button.removeAttribute("disabled") + ]]></body> + </method> + + </implementation> + + <handlers> + <handler event="click" button="0"><![CDATA[ + if (event.originalTarget == this.button) this.doDemo() + ]]></handler> + </handlers> + + </binding> + +</bindings> +</pre> +</div> + +<p>Crie um novo arquivo CSS, <code>bind6.css</code>. Esta folha de estilo separada contém o estilo para o binding. Copie e cole o conteúdo daqui:</p> + +<div style="width: 48em;"> +<pre>/*** Demonstração XBL ***/ +[anonid="square"] { + width: 20em; + height: 20em; + border: 2px inset gray; + } + +[anonid="button"] { + margin-top: 1em; + padding: .5em 2em; + } +</pre> +</div> + +<p>Abra o documento no seu navegador e pressione o botão.</p> + +<p>O wiki não suporta JavaScript nas páginas, então não é possível demonstrar aqui. Deve parecer como isto, antes e depois de você pressionar o botão:</p> + +<table> + <tbody> + <tr> + <td style="padding-right: 2em;"> + <table style="border: 2px outset #36b; padding: 0 4em .5em .5em;"> + <tbody> + <tr> + <td> + <p><strong>Demonstração XBL</strong></p> + </td> + </tr> + </tbody> + </table> + </td> + <td> + <table style="border: 2px outset #36b; padding: 0 4em .5em .5em;"> + <tbody> + <tr> + <td> + <p><strong>Demonstração XBL</strong></p> + </td> + </tr> + </tbody> + </table> + </td> + </tr> + </tbody> +</table> + +<p>Notas sobre esta demonstração:</p> + +<ul> + <li>O documento HTML é ligado à folha de estilo normalmente mas isto não liga nenhum código JavaScript.</li> + <li>O documento não contém nenhum botão. Ele contém somente o texto do botão. O botão é adicionado por binding.</li> + <li>O documento folha de estilo liga o binding.</li> + <li>O binding liga isto à sua folha de estilo, e isto suporta seu conteúdo e o código JavaScript. Então o binding é autônomo.</li> +</ul> + +<table style="border: 1px solid #36b; padding: 1em; background-color: #fffff4; margin-bottom: .5em;"> + <caption>Desafios</caption> + <tbody> + <tr> + <td>Mude o arquivo XBL de modo que o quadrado dobre a largura ao mudar de cor, em vez de saltar para a direita. + <p>Use a ferramenta DOM Inspector para inspecionar o documento, reavaliando o conteúdo adicionado.</p> + </td> + </tr> + </tbody> +</table> + +<h3 id="O_que_vem_depois.3F" name="O_que_vem_depois.3F">O que vem depois?</h3> + +<p>Se você teve dificuldade para entender esta página, ou se você tem algum comentário sobre ela, por favor contribua nesta página de <a href="/Talk:pt/CSS/Como_come%C3%A7ar/XBL_bindings" title="Talk:pt/CSS/Como_começar/XBL_bindings">Discussão</a>.</p> + +<p>Nesta demonstração, o quadrado e o botão foram <em>widgets</em> independentes que funcionam com um documento HTML. Mozilla tem uma linguagem de marcação especializada para criação de interfaces de usuários. A próxima página demostra isto: <strong><a href="/pt/CSS/Como_come%C3%A7ar/Interfaces_de_usu%C3%A1rio_XUL" title="pt/CSS/Como_começar/Interfaces_de_usuário_XUL">Interfaces de usuário XUL</a></strong></p> + +<p>{{ PreviousNext("CSS:Como começar:JavaScript", "CSS:Como começar:Interfaces de usuário XUL") }}</p> + +<p><span class="comment">Categorias</span></p> + +<p><span class="comment">Interwiki Language Links</span></p> diff --git a/files/pt-pt/archive/normas_web/index.html b/files/pt-pt/archive/normas_web/index.html new file mode 100644 index 0000000000..f7debd671a --- /dev/null +++ b/files/pt-pt/archive/normas_web/index.html @@ -0,0 +1,151 @@ +--- +title: Normas da Web +slug: Archive/Normas_Web +tags: + - Normas da Web +translation_of: Archive/Web_Standards +--- +<div>As <strong>normas da <em>Web</em></strong> são cuidadosamente projetadas para distribuir os maiores benefícios para o maior número de utilizadores da <em>Web</em> enquanto assegura a viabilidade a longo prazo de qualquer documento publicado na <em>Web</em>. Projetar e criar com estas normas simplifica e baixa o custo de produção, enquanto distribui sites que estão acessíveis para mais pessoas e mais tipos de dispositivos da Internet. Os sites desenvolvidos com a utilziação destas linhas irão continuar a funcionar corretamente enquanto os navegadores de PCs tradicionais evoluem, e à medida que os novos dispositivos da Internet chegam ao mercado.</div> + +<table class="topicpage-table"> + <tbody> + <tr> + <td> + <h4 id="Documenta.C3.A7.C3.A3o" name="Documenta.C3.A7.C3.A3o"><a href="/en-US/docs/tag/Web%20Standards">Documentação</a></h4> + + <dl> + <dt><a href="pt/Migrando_aplica%c3%a7%c3%b5es_do_Internet_Explorer_para_o_Mozilla">Migrando aplicações do Internet Explorer para o Mozilla</a></dt> + <dd><small>Ever have trouble getting your Internet Explorer-specific Web applications to work with Mozilla? This article covers common issues associated with migrating applications to the open source Mozilla-based browser.</small></dd> + </dl> + + <dl> + <dt><a href="/pt-PT/docs/Archive/Utilizar_Normas_Web_nas_suas_Paginas_da_Web">Utilizar as Normas da <em>Web</em> nas suas Páginas da <em>Web</em></a></dt> + <dd><small>This article provides an overview of the process for upgrading the content of your web pages to conform to the W3C web standards.</small></dd> + </dl> + + <dl> + <dt><a href="pt/Choosing_Standards_Compliance_Over_Proprietary_Practices">Choosing Standards Compliance Over Proprietary Practices</a></dt> + <dd><small>In the development world, there is a need for standards because applications are designed across multiple development groups.</small></dd> + </dl> + + <dl> + <dt><a href="pt/The_Business_Benefits_of_Web_Standards">The Business Benefits of Web Standards</a></dt> + <dd><small>This article discusses how adhering to web standards, and leaving behind proprietary markup and technologies, can contribute to a company's business goals.</small></dd> + </dl> + + <p><span class="alllinks"><a>Veja todos...</a></span></p> + </td> + <td> + <h4 id="Comunidade" name="Comunidade">Comunidade</h4> + + <p>{{ DiscussionList("dev-web-development", "mozilla.dev.web-development") }}</p> + + <ul> + <li><a class="external" href="http://webstandards.org/">The Web Standards Project</a></li> + <li><a class="external" href="http://webdevfeedhouse.com/">WebDev FeedHouse</a></li> + <li><a href="pt/Normas_Web/Comunidade">Outros links para comunidades...</a></li> + </ul> + + <h4 id="Ferramentas" name="Ferramentas">Ferramentas</h4> + + <ul> + <li><a class="link-https" href="https://addons.mozilla.org/firefox/60/">Web Developer extension</a></li> + <li><a class="external" href="http://validator.w3.org/">Markup validation service (W3C)</a></li> + <li><a class="external" href="http://jigsaw.w3.org/css-validator/">CSS validation service (W3C)</a></li> + </ul> + + <p><span class="alllinks"><a>Veja todas...</a></span></p> + + <h4 id="T.C3.B3picos_relacionados" name="T.C3.B3picos_relacionados">Tópicos relacionados</h4> + + <dl> + <dd><a href="/pt-PT/docs/Web/CSSpt/CSS">CSS</a>, <a href="/pt-PT/docs/DHTML">DHTML</a>, <a href="/pt-PT/docs/Web/HTML">HTML</a>, <a href="/pt-PT/docs/Web/Guide">Desenvolvimento da Web</a>, <a href="/pt-PT/docs/XHTML">XHTML</a>, <a href="/pt-PT/docs/Introducao_a_XML">XML</a></dd> + </dl> + </td> + </tr> + </tbody> +</table> + +<hr> +<p><small> <a class="external" href="http://webstandards.org/">O Projeto de Normas da Web</a></small></p> + +<div id="SL_balloon_obj" style="display: block;"> +<div id="SL_shadow_translation_result2" style="display: none;"> </div> + +<div id="SL_shadow_translator" style="display: none;"> +<div id="SL_planshet"> +<div id="SL_arrow_up" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<div id="SL_Bproviders"> +<div class="SL_BL_LABLE_ON" id="SL_P0" title="Google">G</div> + +<div class="SL_BL_LABLE_ON" id="SL_P1" title="Microsoft">M</div> + +<div class="SL_BL_LABLE_ON" id="SL_P2" title="Translator">T</div> +</div> + +<div id="SL_alert_bbl" style="display: none;"> +<div id="SLHKclose" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<div id="SL_alert_cont"> </div> +</div> + +<div id="SL_TB"> +<table id="SL_tables"> + <tbody> + <tr> + <td class="SL_td"><input></td> + <td class="SL_td"><select><option value="auto">Detectar idioma</option><option value="af">Africâner</option><option value="sq">Albanês</option><option value="de">Alemão</option><option value="ar">Arabe</option><option value="hy">Armênio</option><option value="az">Azerbaijano</option><option value="eu">Basco</option><option value="bn">Bengali</option><option value="be">Bielo-russo</option><option value="my">Birmanês</option><option value="bs">Bósnio</option><option value="bg">Búlgaro</option><option value="ca">Catalão</option><option value="kk">Cazaque</option><option value="ceb">Cebuano</option><option value="ny">Chichewa</option><option value="zh-CN">Chinês (Simp)</option><option value="zh-TW">Chinês (Trad)</option><option value="si">Cingalês</option><option value="ko">Coreano</option><option value="ht">Crioulo haitiano</option><option value="hr">Croata</option><option value="da">Dinamarquês</option><option value="sk">Eslovaco</option><option value="sl">Esloveno</option><option value="es">Espanhol</option><option value="eo">Esperanto</option><option value="et">Estoniano</option><option value="fi">Finlandês</option><option value="fr">Francês</option><option value="gl">Galego</option><option value="cy">Galês</option><option value="ka">Georgiano</option><option value="el">Grego</option><option value="gu">Gujarati</option><option value="ha">Hauça</option><option value="iw">Hebraico</option><option value="hi">Hindi</option><option value="hmn">Hmong</option><option value="nl">Holandês</option><option value="hu">Húngaro</option><option value="ig">Igbo</option><option value="id">Indonésio</option><option value="en">Inglês</option><option value="yo">Ioruba</option><option value="ga">Irlandês</option><option value="is">Islandês</option><option value="it">Italiano</option><option value="ja">Japonês</option><option value="jw">Javanês</option><option value="kn">Kannada</option><option value="km">Khmer</option><option value="lo">Laosiano</option><option value="la">Latim</option><option value="lv">Letão</option><option value="lt">Lituano</option><option value="mk">Macedônico</option><option value="ml">Malaiala</option><option value="ms">Malaio</option><option value="mg">Malgaxe</option><option value="mt">Maltês</option><option value="mi">Maori</option><option value="mr">Marathi</option><option value="mn">Mongol</option><option value="ne">Nepalês</option><option value="no">Norueguês</option><option value="fa">Persa</option><option value="pl">Polonês</option><option value="pt">Português</option><option value="pa">Punjabi</option><option value="ro">Romeno</option><option value="ru">Russo</option><option value="sr">Sérvio</option><option value="st">Sesotho</option><option value="so">Somália</option><option value="sw">Suaíli</option><option value="su">Sudanês</option><option value="sv">Sueco</option><option value="tg">Tadjique</option><option value="tl">Tagalo</option><option value="th">Tailandês</option><option value="ta">Tâmil</option><option value="cs">Tcheco</option><option value="te">Telugo</option><option value="tr">Turco</option><option value="uk">Ucraniano</option><option value="ur">Urdu</option><option value="uz">Uzbeque</option><option value="vi">Vietnamita</option><option value="yi">Yiddish</option><option value="zu">Zulu</option></select></td> + <td class="SL_td"> + <div id="SL_switch_b" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Alternar Idiomas"> </div> + </td> + <td class="SL_td"><select><option value="af">Africâner</option><option value="sq">Albanês</option><option value="de">Alemão</option><option value="ar">Arabe</option><option value="hy">Armênio</option><option value="az">Azerbaijano</option><option value="eu">Basco</option><option value="bn">Bengali</option><option value="be">Bielo-russo</option><option value="my">Birmanês</option><option value="bs">Bósnio</option><option value="bg">Búlgaro</option><option value="ca">Catalão</option><option value="kk">Cazaque</option><option value="ceb">Cebuano</option><option value="ny">Chichewa</option><option value="zh-CN">Chinês (Simp)</option><option value="zh-TW">Chinês (Trad)</option><option value="si">Cingalês</option><option value="ko">Coreano</option><option value="ht">Crioulo haitiano</option><option value="hr">Croata</option><option value="da">Dinamarquês</option><option value="sk">Eslovaco</option><option value="sl">Esloveno</option><option value="es">Espanhol</option><option value="eo">Esperanto</option><option value="et">Estoniano</option><option value="fi">Finlandês</option><option value="fr">Francês</option><option value="gl">Galego</option><option value="cy">Galês</option><option value="ka">Georgiano</option><option value="el">Grego</option><option value="gu">Gujarati</option><option value="ha">Hauça</option><option value="iw">Hebraico</option><option value="hi">Hindi</option><option value="hmn">Hmong</option><option value="nl">Holandês</option><option value="hu">Húngaro</option><option value="ig">Igbo</option><option value="id">Indonésio</option><option selected value="en">Inglês</option><option value="yo">Ioruba</option><option value="ga">Irlandês</option><option value="is">Islandês</option><option value="it">Italiano</option><option value="ja">Japonês</option><option value="jw">Javanês</option><option value="kn">Kannada</option><option value="km">Khmer</option><option value="lo">Laosiano</option><option value="la">Latim</option><option value="lv">Letão</option><option value="lt">Lituano</option><option value="mk">Macedônico</option><option value="ml">Malaiala</option><option value="ms">Malaio</option><option value="mg">Malgaxe</option><option value="mt">Maltês</option><option value="mi">Maori</option><option value="mr">Marathi</option><option value="mn">Mongol</option><option value="ne">Nepalês</option><option value="no">Norueguês</option><option value="fa">Persa</option><option value="pl">Polonês</option><option value="pt">Português</option><option value="pa">Punjabi</option><option value="ro">Romeno</option><option value="ru">Russo</option><option value="sr">Sérvio</option><option value="st">Sesotho</option><option value="so">Somália</option><option value="sw">Suaíli</option><option value="su">Sudanês</option><option value="sv">Sueco</option><option value="tg">Tadjique</option><option value="tl">Tagalo</option><option value="th">Tailandês</option><option value="ta">Tâmil</option><option value="cs">Tcheco</option><option value="te">Telugo</option><option value="tr">Turco</option><option value="uk">Ucraniano</option><option value="ur">Urdu</option><option value="uz">Uzbeque</option><option value="vi">Vietnamita</option><option value="yi">Yiddish</option><option value="zu">Zulu</option></select></td> + <td class="SL_td"> + <div id="SL_TTS_voice" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Ouça"> </div> + </td> + <td class="SL_td"> + <div class="SL_copy" id="SL_copy" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Copiar"> </div> + </td> + <td class="SL_td"> + <div id="SL_bbl_font_patch"> </div> + + <div class="SL_bbl_font" id="SL_bbl_font" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Tamanho da fonte"> </div> + </td> + <td class="SL_td"> + <div id="SL_bbl_help" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Ajuda"> </div> + </td> + <td class="SL_td"> + <div class="SL_pin_off" id="SL_pin" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Fixar a janela de pop-up"> </div> + </td> + </tr> + </tbody> +</table> +</div> +</div> + +<div id="SL_shadow_translation_result" style=""> </div> + +<div class="SL_loading" id="SL_loading" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<div id="SL_player2"> </div> + +<div id="SL_alert100">A função de fala é limitada a 200 caracteres</div> + +<div id="SL_Balloon_options" style="background: rgb(255, 255, 255) repeat scroll 0% 0%;"> +<div id="SL_arrow_down" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<table id="SL_tbl_opt" style="width: 100%;"> + <tbody> + <tr> + <td><input></td> + <td> + <div id="SL_BBL_IMG" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Mostrar o botão do ImTranslator 3 segundos"> </div> + </td> + <td><a class="SL_options" title="Mostrar opções">Opções</a> : <a class="SL_options" title="Histórico de tradução">Histórico</a> : <a class="SL_options" title="Comentários">Comentários</a> : <a class="SL_options" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GD9D8CPW8HFA2" title="Faça sua contribuição">Donate</a></td> + <td><span id="SL_Balloon_Close" title="Encerrar">Encerrar</span></td> + </tr> + </tbody> +</table> +</div> +</div> +</div> diff --git a/files/pt-pt/archive/plugins/out_of_process_plugins/o_detetor_plugin_hang_detector/index.html b/files/pt-pt/archive/plugins/out_of_process_plugins/o_detetor_plugin_hang_detector/index.html new file mode 100644 index 0000000000..c02e3fa0c1 --- /dev/null +++ b/files/pt-pt/archive/plugins/out_of_process_plugins/o_detetor_plugin_hang_detector/index.html @@ -0,0 +1,46 @@ +--- +title: O detetor de falhas de plug-ins +slug: Archive/Plugins/Out_of_process_plugins/O_detetor_plugin_hang_detector +tags: + - Extras + - Plug-ins + - Plugins +translation_of: Archive/Plugins/Out_of_process_plugins/The_plugin_hang_detector +--- +<p>Para ajudar a proteger os utilizadores contra <em>plug-ins</em> e <em>scripts</em> de <em>plug-ins</em> que deixam de responder, o Firefox agora inclui um "detector de falhas", que vigia os <em>plug-ins</em> que deixam de funcionar.</p> + +<h2 id="Como_é_que_este_funciona">Como é que este funciona</h2> + +<p>When Firefox makes an <a href="/en/NPAPI" title="en/NPAPI">NPAPI</a> call to a plugin which is running in its own process, the NPAPI call is translated into an inter-process communication (IPC) request that is posted to the process. Firefox then waits for the response. If a response is not received within a given amount of time (by default, this is 45 seconds), the plugin is assumed to have locked up, and Firefox terminates the plugin by following these steps:</p> + +<ol> + <li>The plugin's process is stopped and a plugin-process "crash" mini-dump is retrieved.</li> + <li>A "crash" mini-dump is collected from the main browser process.</li> + <li>The plugin's process is terminated.</li> + <li>The crashed plugin user interface is displayed; this interface lets the user choose to reload the page and try again.</li> +</ol> + +<h2 id="O_que_ativa_o_detetor_de_falhas">O que ativa o detetor de falhas</h2> + +<p>There are several possible situations that can trigger the hang detector:</p> + +<ul> + <li>A plugin script—such as ActionScript code running in the Flash plugin—may be in an infinite loop or is performing an extremely long computation without yielding control.</li> + <li>The plugin itself may have a bug such as a threading deadlock, which caused it to stop responding.</li> + <li>The plugin isn't deadlocked, but isn't processing events quickly enough, causing a backlog that eventually causes an event to wait too long to be processed.</li> + <li>The implementation of Firefox out-of-process plugins has a bug causing a deadlock.</li> +</ul> + +<h2 id="O_que_acontece_com_o_relatório_de_falhas">O que acontece com o relatório de falhas?</h2> + +<p>When the hang detector catches a problem, it gathers up the mini-dumps and submits the data to <a class="external" href="http://crash-stats.mozilla.com" title="http://crash-stats.mozilla.com/">crash-stats</a>, providing handy debugging information to developers so that the problem can be categorized and, if possible, corrected. The <a class="external" href="http://crash-stats.mozilla.com/query#" title="http://crash-stats.mozilla.com/query#">advanced query page</a> makes it possible to differentiate between crash reports and hang reports, and lets search results be limited to either the browser process or the plugin process. In addition, the browser hang report and the corresponding plugin hang report are automatically cross-linked for you.</p> + +<h2 id="E_se_eu_não_quiser_terminar_a_falha_de_plug-ins">E se eu não quiser terminar a falha de <em>plug-ins</em>?</h2> + +<p>Sometimes developers may want to prevent hung plugins from being terminated; this could be useful, for example, while debugging script code in Flash or if you're using a debugger that causes event processing to be delayed (such as the Flash debugger).</p> + +<p>You can change the timeout period used by the hang detector by changing the value of the <code>dom.ipc.plugins.timeoutSecs</code> preference. The value of this preference indicates the number of seconds an event response must take before the plugin is considered to be hung.</p> + +<p>Setting this preference to -1 disables the plugin hang detector entirely.</p> + +<p>See <a class="external" href="http://kb.mozillazine.org/About:config" title="http://kb.mozillazine.org/About:config">about:config on MozillaZine</a> for information on changing preferences like this one.</p> diff --git a/files/pt-pt/archive/rss/como_começar/como_o_rss_trabalha/index.html b/files/pt-pt/archive/rss/como_começar/como_o_rss_trabalha/index.html new file mode 100644 index 0000000000..3473649d08 --- /dev/null +++ b/files/pt-pt/archive/rss/como_começar/como_o_rss_trabalha/index.html @@ -0,0 +1,18 @@ +--- +title: Como Funciona o RSS +slug: Archive/RSS/Como_começar/Como_o_RSS_trabalha +tags: + - 'RSS:Como_começar' +translation_of: Archive/RSS/Getting_Started/How_RSS_Works +--- +<p>Esta página explica como funciona o RSS. Ainda não estará pronto para criar os seus próprios ficheiros RSS, mas estará a aprender sobre os diferentes sistemas que fazem parte do RSS syndication.</p> + +<h2 id="Como_o_RSS_trabalha" name="Como_o_RSS_trabalha">Como Funciona o RSS</h2> + +<p>São dois, os componentes principais que fazem parte do RSS syndication: o <em>servidor</em> e o <em>cliente</em> final.</p> + +<p>O <em>servidor</em> é a parte do sistema que produz o feed RSS. Um sistema de notícias ou um sistema de blog estaria no lado servidor do RSS syndication. Um rádio por IP estaria no lado servidor do RSS syndication. Uma TV por IP estaria no lado servidor do RSS syndication.</p> + +<p>O<em> cliente</em> é a parte final do RSS syndication que chega ao usuário. O navegador Mozilla Firefox estaria no lado cliente do RSS syndication. Um agregador desktop de RSS estaria no lado cliente do RSS. Um agregador web também estaria no lado cliente do RSS syndication.</p> + +<p>{{ PreviousNext("RSS:Como começar:Porque usar RSS", "RSS:Como começar:Sindicar") }}</p> diff --git a/files/pt-pt/archive/rss/como_começar/index.html b/files/pt-pt/archive/rss/como_começar/index.html new file mode 100644 index 0000000000..547a924f4d --- /dev/null +++ b/files/pt-pt/archive/rss/como_começar/index.html @@ -0,0 +1,57 @@ +--- +title: Como começar +slug: Archive/RSS/Como_começar +tags: + - PrecisaDeRevisãoEditorial + - RSS + - 'RSS:Como_começar' +translation_of: Archive/RSS/Getting_Started +--- +<p> </p> +<h3 id="Introdu.C3.A7.C3.A3o" name="Introdu.C3.A7.C3.A3o">Introdução</h3> +<p>Este tutorial é uma introdução à <b>Really Simple Syndication</b> (<b>RSS</b>).</p> +<p>Isto guia-o, passo-a-passo, através do básico do RSS e mostra você trabalhando exemplos em ação. Este tutorial segue o mantra que + <i> + o melhor caminho para aprender é fazer</i> + . Por isso, você deverá criar seus próprios arquivos RSS à mão.</p> +<h4 id="Quem_deve_usar_este_tutorial.3F" name="Quem_deve_usar_este_tutorial.3F">Quem deve usar este tutorial?</h4> +<p>Este tutorial é na maior parte para iniciantes em RSS (i.e., com nenhum ou muito pouca experiência prévia em RSS). Entretanto, estes experimentos com RSS podem também achar este útil como uma ajuda no prenchimento de qualquer informação perdida sobre RSS que não estavam cientes sobre, ou como um guia para "refrescar".</p> +<p>Este tutorial assume que você tem alguma experiência com <a href="pt/HTML">HTML</a> (ou <a href="pt/XML">XML</a>) e que você está confortável com os básicos da + <i> + marcação</i> + . Em outras palavras, um código como este não atrapalha você:</p> +<pre class="eval"> Isto é um pouco de marcação com tags <b>bold</b>. +</pre> +<p>Se você está confortável com isto, você não deve ter problemas aprendendo RSS.</p> +<div class="note"> + <p><b>NOTA</b>: Se você NÃO é um desenvolvedor web e NÃO que se tornara um, então este tutorial NÃO é para você. Você precisa estar confortável com a criação + <i> + marcação</i> + para estar apto para usar este tutorial efetivamente.</p> +</div> +<h4 id="O_que_voc.C3.AA_necessita_antes_de_come.C3.A7ar.3F" name="O_que_voc.C3.AA_necessita_antes_de_come.C3.A7ar.3F">O que você necessita antes de começar?</h4> +<p>Para pegar o máximo deste tutorial, você precisará de um editor de texto e um leitor RSS. Você precisa também saber como usar cada um destes.</p> +<div class="note"> + <p><b>NOTA</b>: Um processador de palavras não é um editor de texto. Se um processador de palavras é usado, você DEVE ter certeza de salvar seus arquivos RSS em um (puro e simples) formato de texto.</p> +</div> +<p>Não é obrigatória a criação de arquivos RSS neste tutorial (você pode somente ler), mas isto seria um meio menos eficiente para você aprender. Você reterá mais informação e absorverá melhor se você criar os seus próprios arquivos RSS.</p> +<h4 id="Como_usar_este_tutorial" name="Como_usar_este_tutorial">Como usar este tutorial</h4> +<p>Embora cada página neste tutorial tenha sido escrita de modo que que possa agir como um tutorial + <i> + sozinho</i> + , isto assume que você já possuí o conhecimento da informação ensinada nas páginas anteriores deste tutorial. Embora você possa pular para qualquer ponto do tutorial que você deseje, nós sugerimos aos iniciantes em RSS que leiam este tutorial na ordem.</p> +<h3 id="Tutorial" name="Tutorial">Tutorial</h3> +<ol> + <li><b><a href="pt/RSS/Como_come%c3%a7ar/O_que_%c3%a9_RSS">O que é RSS</a></b></li> + <li><b><a href="pt/RSS/Como_come%c3%a7ar/Porque_usar_RSS">Porque usar RSS</a></b></li> + <li><b><a href="pt/RSS/Como_come%c3%a7ar/Como_o_RSS_trabalha">Como o RSS trabalha</a></b></li> + <li><b>Hello World</b> (artigo ainda não escrito) <span class="comment">link removido porque muitas pessoas colocam seus hello word nele</span></li> + <li><b><a href="pt/RSS/Como_come%c3%a7ar/Sindicar">Sindicar</a></b></li> + <li><b><a href="pt/RSS/Como_come%c3%a7ar/Blogs">Blogs</a></b></li> + <li><b><a href="pt/RSS/Como_come%c3%a7ar/Broadcatching">Broadcatching</a></b></li> + <li><b><a href="pt/RSS/Como_come%c3%a7ar/Microformatos">Microformatos</a></b></li> + <li><b><a href="pt/RSS/Como_come%c3%a7ar/Advanced_Broadcatching">Advanced Broadcatching</a></b></li> +</ol> +<p><span class="comment">Categorias</span></p> +<p><span class="comment">Interwiki Language Links</span></p> +<p>{{ languages( { "en": "en/RSS/Getting_Started", "es": "es/RSS/Primeros_pasos", "fr": "fr/RSS/Premiers_pas", "pl": "pl/RSS/Na_pocz\u0105tek" } ) }}</p> diff --git a/files/pt-pt/archive/rss/como_começar/o_que_é_rss/index.html b/files/pt-pt/archive/rss/como_começar/o_que_é_rss/index.html new file mode 100644 index 0000000000..dceb21a856 --- /dev/null +++ b/files/pt-pt/archive/rss/como_começar/o_que_é_rss/index.html @@ -0,0 +1,242 @@ +--- +title: O que é RSS +slug: Archive/RSS/Como_começar/O_que_é_RSS +tags: + - 'RSS:Como_começar' +translation_of: Archive/RSS/Getting_Started/What_is_RSS +--- +<p>Esta página explica o que é o RSS. Você ainda não criará seus próprios arquivos RSS, mas você verá como o RSS é comumente usado e exemplos simples de arquivos RSS para uso comum. Você também acompanhará um pouco da história do RSS.</p> + +<h3 id="What_is_RSS.3F" name="What_is_RSS.3F">O que é RSS?</h3> + +<p>As <a class="internal" href="/Pt/RSS/Vers%C3%A3o" title="pt/RSS/Versão">versões de RSS</a> mais populares são as baseadas na linguagem de marcação <a href="/pt/XML" title="pt/XML">XML</a> usada para publicação (syndication). (Apesar dos formatos RSS baseados em <a href="/pt/RDF" title="pt/RDF">RDF</a> existirem. Os antigos <a href="/pt/RSS/Version/0.90" title="pt/RSS/Version/0.90">RSS 0.90</a> e <a href="/pt/RSS/Version/1.0" title="pt/RSS/Version/1.0">RSS 1.0</a>.) Os usos mais comuns do RSS syndication são para publicações de web sites de notícias, blogs, rádio de Internet e programação televisiva para Internet.</p> + +<p>Este tutorial ensina o <a href="/pt/RSS/Version/2.0" title="pt/RSS/Version/2.0">RSS 2.0</a>. Mas se esforça em apontar as diferenças com as outras <a href="/pt/RSS/Version" title="pt/RSS/Version">versões de RSS</a>.</p> + +<p>O RSS é praticamente nunca escrito à mão, mas quase sempre criado por softwares de servidores (normalmente escritos em uma linguagem como PHP, Java, C# ou Python) nos servidores web. Contudo, para que possamos aprender sobre o RSS nós criaremos os scripts RSS à mão.</p> + +<h3 id="Short_History_of_RSS" name="Short_History_of_RSS">Uma breve história do RSS</h3> + +<p>Em março de 1999 a Netscape lançou o <a class="internal" href="/pt/RSS/Version/0.90" title="pt/RSS/Version/0.90">RSS 0.90</a>. Era muito diferente do RSS de hoje. Não era realmente um formato para publicação, mas um formato que fornecia um sumário de um website. Na verdade, naquele tempo, o RSS não atendia por <strong>Really Simple Syndication</strong> mas por <strong>Rich Site Summary</strong>.</p> + +<p>Em julho de 1999 o <a class="internal" href="/pt/RSS/Version/0.91/Netscape" title="pt/RSS/Version/0.91/Netscape">RSS 0.91 da Netscape</a> foi lançado. Como o <a class="internal" href="/pt/RSS/Version/0.90" title="pt/RSS/Version/0.90">RSS 0.90</a>, o RSS 0.91 da Netscape também era de um formato para fornecimento de um sumário de um website e não realmente um formato de publicação (como é hoje). O RSS 0.91 da Netscape foi criado para simplificar as coisas. O RSS 0.90 era baseado em <a class="internal" href="/pt/RDF" title="pt/RDF">RDF</a>. (O que muitos acharam ser excessivamente complexo). Já o RSS 0.91 da Netscape era apenas baseado em <a class="internal" href="/pt/XML" title="pt/XML">XML</a> e acrescentou um <a class="internal" href="/pt/DTD" title="pt/DTD">DTD</a> para permitir diversas entities (comumente encontradas em <a class="internal" href="/pt/HTML" title="pt/HTML">HTML</a>).</p> + +<p>E nesse ponto a Netscape tornou o <a class="internal" href="/pt/RSS/Version/0.90" title="pt/RSS/Version/0.90">RSS 0.90</a> baseado em <a class="internal" href="/pt/RDF" title="pt/RDF">RDF</a> obsoleto e disse a todos que usassem o <a class="internal" href="/pt/RSS/Version/0.91/Netscape" title="pt/RSS/Version/0.91/Netscape">RSS 0.91 da Netscape</a> que era baseado no <a class="internal" href="/pt/XML" title="pt/XML">XML</a>.</p> + +<p>Em junho de 2000 o <a class="internal" href="/pt/RSS/Version/0.91/Userland" title="pt/RSS/Version/0.91/Userland">RSS 0.91 da Userland</a> foi lançado. (E, sim, isso significa que havia 2 diferentes versões de <a class="internal" href="/pt/RSS/Version/0.91" title="pt/RSS/Version/0.91">RSS 0.91</a>). A diferença entre as 2 diferentes versões de <a class="internal" href="/pt/RSS/Version/0.91" title="pt/RSS/Version/0.91">RSS 0.91</a> — <a class="internal" href="/pt/RSS/Version/0.91/Netscape" title="pt/RSS/Version/0.91/Netscape">da Netscape</a> e <a class="internal" href="/pt/RSS/Version/0.91/Userland" title="pt/RSS/Version/0.91/Userland">da Userland</a> — é que a da Userland não possuia o <a class="internal" href="/pt/DTD" title="pt/DTD">DTD</a> que o Netscape trazia; e por isso, não possuía os entities extras que o Netscape tinha (comumente encontradas em <a class="internal" href="/pt/HTML" title="pt/HTML">HTML</a>). Fora isso entretanto, eram a mesma coisa. Tecnicamente falando, o RSS 0.91 da Userland era um subset do RSS 0.91 da Netscape.</p> + +<p>Em dezembro de 2000 o grupo RSS-DEV lançou o <a href="/pt/RSS/Version/1.0" title="pt/RSS/Version/1.0">RSS 1.0</a>. Essa versão não era mais puramente baseado em <a href="/pt/XML" title="pt/XML">XML</a>, mas baseado em <a href="/pt/RDF" title="pt/RDF">RDF</a> (como o original, e agora obsoleto <a href="/pt/RSS/Version/0.90" title="pt/RSS/Version/0.90">RSS 0.90</a>). O grupo RSS-DEV mudou o significado de RSS, e transformou-o em <strong>RDF Site Summary</strong>. (Ao menos, era assim que atendia a versão do RSS deles.)</p> + +<p>Então aqui tínhamos o <a href="/pt/RSS/Version/0.91/Netscape" title="pt/RSS/Version/0.91/Netscape">RSS 0.91 da Netscape</a>, o <a href="/pt/RSS/Version/0.91/Userland" title="pt/RSS/Version/0.91/Userland">RSS 0.91 da Userland</a>, e o <a href="/pt/RSS/Version/1.0" title="pt/RSS/Version/1.0">RSS 1.0</a> do grupo RSS-DEV.</p> + +<p>Mais tarde, ainda em dezembro, a Userland lançou o <a href="/pt/RSS/Version/0.92" title="pt/RSS/Version/0.92">RSS 0.92</a>. O RSS 0.92 deveria substituir o <a href="/pt/RSS/Version/0.91/Userland" title="pt/RSS/Version/0.91/Userland">RSS 0.91</a> deles. (Se você perceber, entretanto, os números das versões dos RSS ficaram bagunçados neste ponto, pois o RSS 0.92 era mais novo que o <a href="/pt/RSS/Version/1.0" title="pt/RSS/Version/1.0">RSS 1.0</a>.)</p> + +<p>E aqui tínhamos o <a href="/pt/RSS/Version/0.91/Netscape" title="pt/RSS/Version/0.91/Netscape">RSS 0.91 da Netscape</a>, o <a href="/pt/RSS/Version/1.0" title="pt/RSS/Version/1.0">RSS 1.0</a> do grupo RSS-DEV, e o <a href="/pt/RSS/Version/0.92" title="pt/RSS/Version/0.92">RSS 0.92</a> da Userland.</p> + +<p>Em abril de 2001 a Userland lançou um beta para o <a href="/pt/RSS/Version/0.93" title="pt/RSS/Version/0.93">RSS 0.93</a>. Essa versão do RSS nunca foi transformado em "final" e permaneceu beta nunca tornando-se um substituto para o <a href="/pt/RSS/Version/0.92" title="pt/RSS/Version/0.92">RSS 0.92</a>.</p> + +<p>Em agosto de 2002 a Userland lançou o beta do <a href="/pt/RSS/Version/0.94" title="pt/RSS/Version/0.94">RSS 0.94</a>. E assim como o <a href="/pt/RSS/Version/0.93" title="pt/RSS/Version/0.93">RSS 0.93</a>, essa versão nunca foi feita "final" e permaneceu beta, nunca tornando-se um substituto para o RSS <a href="/pt/RSS/Version/0.92" title="pt/RSS/Version/0.92">RSS 0.92</a>.</p> + +<p>Então, aqui <em>ainda</em> tínhamos o <a href="/pt/RSS/Version/0.91/Netscape" title="pt/RSS/Version/0.91/Netscape">RSS 0.91 da Netscape</a>, o <a href="/pt/RSS/Version/1.0" title="pt/RSS/Version/1.0">RSS 1.0</a> do grupo RSS-DEV, e o <a href="/pt/RSS/Version/0.92" title="pt/RSS/Version/0.92">RSS 0.92</a> da Userland. (Apesar de alguns estarem usando <a href="/pt/RSS/Version/0.93" title="pt/RSS/Version/0.93">RSS 0.93</a> e <a href="/pt/RSS/Version/0.94" title="pt/RSS/Version/0.94">RSS 0.94</a> mesmo que não devessem.)</p> + +<p>Em setembro de 2002 a Userland lança o <a href="/pt/RSS/Version/2.0" title="pt/RSS/Version/2.0">RSS 2.0</a>. O RSS 2.0 deveria substituir o <a href="/pt/RSS/Version/0.92" title="pt/RSS/Version/0.92">RSS 0.92</a> (e os betas <a href="/pt/RSS/Version/0.93" title="pt/RSS/Version/0.93">RSS 0.93</a> e <a href="/pt/RSS/Version/0.94" title="pt/RSS/Version/0.94">RSS 0.94</a> que ninguém deveria estar usando). A Userland pulou esses números de versão até o <strong>2.0</strong> porque o RSS-DEV já havia usado o <strong>1.0</strong> em seu <a href="/pt/RSS/Version/1.0" title="pt/RSS/Version/1.0">RSS 1.0</a> baseado em <a href="/pt/RDF" title="pt/RDF">RDF</a>.</p> + +<p>Neste ponto tínhamos o <a href="/pt/RSS/Version/0.91/Netscape" title="pt/RSS/Version/0.91/Netscape">RSS 0.91 da Netscape</a>, o <a href="/pt/RSS/Version/1.0" title="pt/RSS/Version/1.0">RSS 1.0</a> do grupo RSS-DEV e o <a href="/pt/RSS/Version/2.0" title="pt/RSS/Version/2.0">RSS 2.0</a> da Userland.</p> + +<p>Agora, a história não acaba simplesmente lá. Uma vez em novembro de 2002 e outra em janeiro de 2003, o <a href="/pt/RSS/Version/2.0" title="pt/RSS/Version/2.0">RSS 2.0</a> foi modificado de sua especificação original pela Userland. E apesar desses serem diferentes, foram todos chamados de RSS 2.0 no elemento <a href="/pt/RSS/Element/rss" title="pt/RSS/Element/rss"><rss></a>.</p> + +<p>E aqui, nesse ponto, nós ainda temos o <a href="/pt/RSS/Version/0.91/Netscape" title="pt/RSS/Version/0.91/Netscape">RSS 0.91 da Netscape</a> (uma vez que a Netscape nunca o tornou obsoleto) apesar da maioria das pessoas não usarem mais. Elas usavam tanto o <a href="/pt/RSS/Version/1.0" title="pt/RSS/Version/1.0">RSS 1.0</a> baseado no <a href="/pt/RDF" title="pt/RDF">RDF</a> como o <a href="/pt/RSS/Version/2.0" title="pt/RSS/Version/2.0">RSS 2.0</a> baseado no <a href="/pt/XML" title="pt/XML">XML</a>. Com o RSS 2.0 baseado no XML parecendo ser o mais popular. (Esse tutorial usa o <a href="/pt/RSS/Version/2.0" title="pt/RSS/Version/2.0">RSS 2.0</a>.)</p> + +<h3 id="How_RSS_is_Used_Today" name="How_RSS_is_Used_Today">Como o RSS é utilizado hoje</h3> + +<p>Hoje, o RSS é principalmente usado para publicação (syndication). Syndication é o processo de dizer aos outros que você tem conteúdo para eles consumirem. Em outras palavras, quando você publica (syndicate), você está dizendo a todos algo como: "Ei pessoal, eu tenho artigos que gostaria que todos viessem e lessem. Basta se inscrever ao meu RSS feed e você poderá acessar os mais recentes todas as vezes."</p> + +<div class="note"> +<p><strong>NOTA</strong>: Se você fornecer um RSS não protegido por password, você estará implicitamente dando a todos permissão para usar o conteúdo em seu RSS feed em todos os meios que eles verem que se encaixa. Eles podem ler. Eles podem fazer uma cópia local. Podem compartilhar essa cópia local. Podem pôr em seus websites. Podem até mesmo republicar. E mais.</p> + +<p>Se você não quer que nada disso aconteça então não ponha um RSS feed não protegido por password. (E não torne o password público, claro.)</p> +</div> + +<p>Os websites de notícias usam RSS para fornecer a todos uma lista de seus mais recentes artigos. Por exemplo:</p> + +<pre class="eval"> <span class="nowiki"> <?xml version="1.0"?> + + <rss version="2.0"> + + <channel> + <title>Example News Site</title> + <description>This is an Example News Site.</description> + <lastBuildDate>Wed, 27 Jul 2005 00:30:30 -0700</lastBuildDate> + <link>http://news.example.com/</link> + + <item> + <title>News Flash: I Like Bread</title> + <guid isPermaLink="false">4d4a0a12-f188-4c97-908b-eea27213c2fe</guid> + <pubDate>Wed, 27 Jul 2005 00:30:30 -0700</pubDate> + <link>http://news.example.com/artcle/554</link> + </item> + <item> + <title>Big News Today: Birds Fly</title> + <guid isPermaLink="false">c4a63f09-b45b-466b-8773-6ff264001ab7</guid> + <pubDate>Tue, 19 Jul 2005 04:32:51 -0700</pubDate> + <link>http://news.example.com/artcle/553</link> + </item> + <item> + <title>Fire is Hot</title> + <guid isPermaLink="false">c1795324-d5ea-44fa-95b1-b5ce2090d4f1</guid> + <pubDate>Sun, 15 May 2005 13:02:08 -0700</pubDate> + <link>http://news.example.com/artcle/552</link> + </item> + </channel> + + </rss> </span></pre> + +<p>Os blogs usam o RSS para fornecer a todos uma lista de seus posts mais novos. Por exemplo:</p> + +<pre class="eval"> <span class="nowiki"> <?xml version="1.0"?> + + <rss version="2.0"> + + <channel> + <title>Joe Blow's Blog</title> + <description>This is the Weblog of Joe Blow</description> + <lastBuildDate>Sun, 15 May 2005 13:02:08 -0500</lastBuildDate> + <link>http://joe-blow.example.net/</link> + + <item> + <title>I Be Blogging...</title> + <guid>http://joe-blow.example.net/log/21</guid> + <pubDate>Sun, 15 May 2005 13:02:08 -0500</pubDate> + <link>http://joe-blow.example.net/log/21</link> + </item> + <item> + <title>I am so SMRT</title> + <guid>http://joe-blow.example.net/log/20</guid> + <pubDate>Sat, 14 May 2005 22:19:18 -0500</pubDate> + <link>http://joe-blow.example.net/log/20</link> + </item> + <item> + <title>Huh?</title> + <guid>http://joe-blow.example.net/log/19</guid> + <pubDate>Sat, 14 May 2005 09:55:59 -0500</pubDate> + <link>http://joe-blow.example.net/log/19</link> + </item> + <item> + <title>Black Cat Spotted</title> + <guid>http://joe-blow.example.net/log/18</guid> + <pubDate>Fri, 13 May 2005 13:13:13 -0500</pubDate> + <link>http://joe-blow.example.net/log/18</link> + </item> + </channel> + + </rss> </span> +</pre> + +<p>Aqueles que criam Internet Rádio usam o RSS para permitir aos usuários ouvirem seus shows (broadcatching). Por exemplo:</p> + +<pre class="eval"> <span class="nowiki"> <?xml version="1.0"?> + + <rss version="2.0"> + + <channel> + <title>Joe's IPradio Show</title> + <description>The best IPradio Show on the Internet, staring Joe!</description> + <lastBuildDate>Mon, 15 Aug 2005 16:12:37 -0400</lastBuildDate> + <link>http://joe.ipradio.example.net/</link> + + <item> + <title>I C UR Tan Line</title> + <guid>http://joe.ipradio.example.net/show/55</guid> + <pubDate>Mon, 15 Aug 2005 16:11:57 -0400</pubDate> + <enclosure url="http://joe.ipradio.example.net/show/55" + length="4487216" + type="application/ogg" + /> + </item> + <item> + <title>Car Care for Car Fanatics</title> + <guid>http://joe.ipradio.example.net/show/54</guid> + <pubDate>Mon, 8 Aug 2005 13:12:12 -0400</pubDate> + <enclosure url="http://joe.ipradio.example.net/show/54" + length="4892178" + type="audio/x-mp3" + /> + </item> + <item> + <title>Best Beaches in BC</title> + <guid>http://joe.ipradio.example.net/show/53</guid> + <pubDate>Mon, 1 Aug 2005 18:22:14 -0400</pubDate> + <enclosure url="http://joe.ipradio.example.net/show/53" + length="3984215" + type="application/ogg" + /> + </item> + </channel> + + </rss> </span> +</pre> + +<div class="note"> +<p><strong>NOTA</strong>: Ouvir um Broadcatching de um Internet Rádio é também chamado de <em>Podcasting</em>, <em>IPradio</em>, e <em>Audio Blogging</em>.</p> +</div> + +<p>Aqueles que criam programas televisivos para Internet usam o RSS para permitir aos usuários transmitir seus shows (broadcatch). Por exemplo:</p> + +<pre class="eval"> <span class="nowiki"> <?xml version="1.0"?> + + <rss version="2.0"> + + <channel> + <title>Kate's IPTV Show</title> + <description>Watch it or else! You know you want to.</description> + <lastBuildDate>Tue, 23 Aug 2005 21:02:05 -0800</lastBuildDate> + <link>http://katetv.example.com/</link> + + <item> + <title>This is Fun</title> + <guid>http://katetv.example.com/show/4</guid> + <pubDate>Tue, 23 Aug 2005 21:02:05 -0800</pubDate> + <enclosure url="http://katetv.example.com/show/4" + length="1911146" + type="application/ogg" + /> + </item> + <item> + <title>Watch This</title> + <guid>http://katetv.example.com/show/3</guid> + <pubDate>Tue, 16 Aug 2005 16:11:57 -0400</pubDate> + <enclosure url="http://katetv.example.com/show/3" + length="1387442" + type="application/ogg" + /> + </item> + <item> + <title>It is me again</title> + <guid>http://katetv.example.com/show/2</guid> + <pubDate>Tue, 9 Aug 2005 13:12:12 -0400</pubDate> + <enclosure url="http://katetv.example.com/show/2" + length="1894877" + type="video/mpeg" + /> + </item> + <item> + <title>Hello</title> + <guid>http://katetv.example.com/show/1</guid> + <pubDate>Tue, 2 Aug 2005 18:22:14 -0400</pubDate> + <enclosure url="http://katetv.example.com/show/1" + length="17442215" + type="application/ogg" + /> + </item> + </channel> + + </rss> </span> +</pre> + +<p>O leitor observador deve ter percebido que os exemplos dos <em>websites de notícias</em> e dos <em>blogs</em> eram do mesmo tipo de RSS. Também que os exemplos de <em>Internet Rádio</em> e dos <em>programas de TV para Internet</em> eram do mesmo tipo de RSS. Na verdade, a única diferença real entre os RSS de notícias/blogs e de Internet Rádio/TV para Internet é que os RSS de notícias/blogs usam o elemento <a href="/pt/RSS/Element/link" title="pt/RSS/Element/link"><link></a> e os Internet Rádio/Internet TV usam o elemento <a href="/pt/RSS/Element/enclosure" title="pt/RSS/Element/enclosure"><enclosure></a>.</p> + +<div class="note"> +<p><strong>NOTA</strong>: Esses exemplos de RSS são muito, muito simples. E foram desenhados para dar a você uma idéia de como o RSS se parece basicamente. Todos esses exemplos de RSS são bem mínimos. Quando você criar seus próprios RSS feeds, você provavelmente irá querer fazê-los mais complexos que esses e incluir <a href="/pt/RSS/Element" title="pt/RSS/Element">elementos RSS</a> adicionais fazendo uso dos vários <a href="/pt/RSS/Module" title="pt/RSS/Module">Módulos de RSS</a>.</p> +</div> + +<p>{{Next("RSS:Como começar:Porque usar RSS")}}</p> diff --git a/files/pt-pt/archive/rss/como_começar/porque_usar_rss/index.html b/files/pt-pt/archive/rss/como_começar/porque_usar_rss/index.html new file mode 100644 index 0000000000..904ce6ee43 --- /dev/null +++ b/files/pt-pt/archive/rss/como_começar/porque_usar_rss/index.html @@ -0,0 +1,22 @@ +--- +title: Porque usar RSS +slug: Archive/RSS/Como_começar/Porque_usar_RSS +tags: + - 'RSS:Como_começar' +translation_of: Archive/RSS/Getting_Started/Why_use_RSS +--- +<p>Esta página explica por quê você pode querer usar o RSS. Você ainda não criará seus próprios arquivos RSS, mas aprenderá sobre as razões de usá-lo.</p> + +<h2 id="Por_que_usar_RSS.3F" name="Por_que_usar_RSS.3F">Por que usar RSS?</h2> + +<p>Se você está lendo isso, provavelmente já tem seus próprios motivos para querer usar o RSS. Existem, na verdade, diversas razões para usar RSS. Mas os 2 maiores motivos podem ser amplamente declaradas dizendo: #1 (obviamente apenas use se) atende a suas necessidades e #2 possui uma grande quantidade de movimentação — todos estão usando.</p> + +<p>O RSS possui uma imensa quantidade de movimentação. As pessoas estão usando para publicar todo tipo de coisas. Artigos de notícias, blogs, bookmards, shows de Internet Rádio, shows de TV para Internet, atualizações de software, e-mails, mailing lists, music playlists, e mais. Se é esporádico, pode ser publicado com RSS.</p> + +<p>Software que lê e pode fazer uso do RSS também está por todos os lugares. O Mozilla Firefox possui algum suporte ao RSS (com sua tecnologia Live Bookmark). Existem muitos agregadores de RSS de desktop afora para listá-los. E agregadores RSS web-based demais para listar. Além disso, software customizado também está fazendo uso do RSS.</p> + +<h2 id="Agregadores_RSS_est.C3.A3o_em_todos_os_lugares" name="Agregadores_RSS_est.C3.A3o_em_todos_os_lugares">Agregadores RSS estão em todos os lugares</h2> + +<p>Um motivo para usar o RSS para publicar é porque existem enormes quantidades de agregadores RSS web-based para desktop. (Demais para listar) E se você publicar usando RSS então todos aqueles desktops e agregadores RSS web-based serão capazes de usar e ler seu RSS feed.</p> + +<p>{{ PreviousNext("RSS:Como começar:O que é RSS", "RSS:Como começar:Como o RSS trabalha") }}</p> diff --git a/files/pt-pt/archive/rss/como_começar/sindicar/index.html b/files/pt-pt/archive/rss/como_começar/sindicar/index.html new file mode 100644 index 0000000000..60cf684500 --- /dev/null +++ b/files/pt-pt/archive/rss/como_começar/sindicar/index.html @@ -0,0 +1,99 @@ +--- +title: Sindicar +slug: Archive/RSS/Como_começar/Sindicar +tags: + - PrecisaDeRevisãoEditorial + - 'RSS:Como_começar' +translation_of: Archive/RSS/Getting_Started/Syndicating +--- +<p>Esta página explica a Web Syndication, ou Publicação Web, com o RSS. Você aprenderá como fazer isso para que ambas — pessoas e máquinas — possam encontrar seu RSS feed, ou alimentador de RSS.</p> + +<h2 id="What_is_Syndication" name="What_is_Syndication">O que é Syndication (Publicação)</h2> + +<p><strong>Syndication</strong> (ou <strong>Web Syndication</strong>) é o ato de tornar um conteúdo disponível para outros lerem, ouvirem ou assistirem. Quando você cria um blog, um rádio de Internet ou um programa televisivo para Internet, você está publicando (syndicating).</p> + +<p>O RSS ajuda você a publicar. Ele organiza sua publicação em um formato fácil para as máquinas entenderem.</p> + +<p>Publicar com RSS pode significar 3 coisas:</p> + +<ol> + <li>Criar um RSS feed (também conhecido por alimentador de RSS).</li> + <li>Adicionar um elemento especial <code><a href="/pt/HTML/Element/link" title="pt/HTML/Element/link"><link></a></code> à(s) página(s) HTML.</li> + <li>Adicionar um elemento especial <code><a href="/pt/HTML/Element/a" title="pt/HTML/Element/a"><a></a></code> à(s) página(s) HTML.</li> +</ol> + +<p>Nós já falamos sobre o item 1 — Criar um RSS feed — então nos focaremos nos itens 2 e 3 aqui.</p> + +<h2 id="Adding_the_.3Clink.3E" name="Adding_the_.3Clink.3E">Adicionando o <link></h2> + +<p>Freqüentemente o dado em um RSS feed é também disponibilizado em uma página web HTML. Quando este é o caso, a página web HTML pode avisar pessoas e máquinas sobre o feed com um código como o seguinte:</p> + +<pre><link rel="alternate" type="application/rss+xml" href="http://exemplo.com/feed" /> +</pre> + +<p>Muitas vezes as pessoas querem anunciar o RSS feed em outros lugares também. Por exemplo, em um artigo de blog. Você pode fazer isso com um código como o seguinte:</p> + +<pre><link rel="home" type="application/rss+xml" href="http://exemplo.com/feed" /> +</pre> + +<p>Note que este parece quase exatamente a mesma coisa do código anterior. A única coisa modificada foi o valor do atributo <code>rel</code>. (O código anterior teve um <code>rel</code> de valor <code>alternate</code>. E este código teve um <code>rel</code> de valor <code>home</code>.)</p> + +<div class="note"> +<p><strong>NOTA</strong>: Tem havido muito abuso no uso do elemento <code><link></code> para publicação com RSS. Alguns bloggers o têm usado para que outros se <em>inscrevam</em> em seus blogs de qualquer página do blog (e não apenas da <em>home page</em>). O que resultou na adição de vários <code><link></code> com <code>rel="alternate"</code> por todos os lugares. (Nas entradas de blogs também e não apenas nas <em>home page</em>.) Isso é errado! Usar <code>rel="alternate"</code> neste caso é errado. Deve ser usado o <code>rel="home"</code>. (Veja <a href="/pt/Understanding_rel_and_rev" title="pt/Understanding_rel_and_rev">Understanding rel and rev</a> para mais informações.) A parte importante quando se usa o <code><link></code> para publicar seu RSS feed é pôr o <code>type="application/rss+xml"</code>.</p> +</div> + +<h2 id="Adding_the_.3Ca.3E" name="Adding_the_.3Ca.3E">Adicionando o <a></h2> + +<p>Embora o uso do elemento HTML <code><link></code> seja poderoso; ele é na maioria das vezes <em>escondido</em>. Para anunciar o RSS feed de um modo mais direto, o elemento HTML <code><a></code> pode ser utilizado. Fazendo isso pode-se conseguir o mesmo resultado do elemento <code><link></code> discutido acima.</p> + +<p>Quando puser um link de uma página web HTML onde os dados em um RSS feed também são disponibilizados use:</p> + +<pre><a rel="alternate" type="application/rss+xml" href="http://exemplo.com/feed">...</a> +</pre> + +<p>Quando puser um link de alguma coisa como um artigo de post de um blog, use o seguinte código:</p> + +<pre><a rel="home" type="application/rss+xml" href="http://example.com/feed">...</a> +</pre> + +<p>Mais uma vez, note que esses dois trechos de código parecem quase exatamente os mesmos. A única coisa modificada foi o valor do atributo <code>rel</code>. (O primeiro trecho de código tem um <code>rel</code> de valor <code>alternate</code> e o segundo trecho tem um <code>rel</code> de valor <code>home</code>.)</p> + +<h2 id="Feed_Icons" name="Feed_Icons">Ícones de Feed</h2> + +<p>RSS (e outros) feeds utilizam um ícone especial. É recomendado que use este ícone quando criar um link especial <code><a></code> para seu alimentador. O ícone parece como este:</p> + +<dl> + <dd><img alt="Feed-icon-32x32.png" class="internal default" src="/@api/deki/files/3250/=Feed-icon-32x32.png" style="width: 32px; height: 32px;"></dd> +</dl> + +<p>Você pode conseguir mais ícones como este do <a class="external" href="http://feedicons.com/">Feed Icons</a>. (Outros tamanhos e cores também estão disponíveis. Arquivos fontes também estão disponíveis.)</p> + +<h2 id="Advanced_Syndication_Techniques" name="Advanced_Syndication_Techniques">Técnicas Avançadas de Publicação (Syndication)</h2> + +<p>Embora esta técnica de publicação não seja necessária, é recomendado seu suporte; especialmente para web sites e aplicações que necessitam de alta performance.</p> + +<p>O protocolo <a href="/pt/HTTP" title="pt/HTTP">HTTP</a> — uma das tecnologias núcleo por trás da web — provê uma forma de priorizar o tipo de conteúdo que um cliente HTTP prefere para receber. Esta técnica toma vantagem disso fazendo com que os clientes <em>prefer</em> o RSS (acima do HTML ou outros formatos). Aqui está um exemplo simples de como é feito:</p> + +<pre>Accept: application/rss+xml, text/html +</pre> + +<p>Apesar de na realidade, na produção de software, se pareça mais com isso.</p> + +<pre>Accept: application/rss+xml, application/xhtml+xml, text/html +</pre> + +<p>Eis um exemplo mais completo:</p> + +<pre>GET / HTTP/1.1 +Host: example.com +Accept: application/rss+xml, application/xhtml+xml, text/html +</pre> + +<p>Quando um servidor HTTP (ou scripts de servidores) pega isso, ele deve redirecionar para o cliente HTTP do feed. Ele deve fazer isso com um <code>HTTP 302 Found</code>. Algo como:</p> + +<pre>HTTP/1.1 302 Found +Location: http://exemplo.com/feed +</pre> + +<p><br> + {{ PreviousNext("RSS:Como começar:Como o RSS trabalha", "RSS:Como começar:Blogs") }}</p> diff --git a/files/pt-pt/archive/rss/index.html b/files/pt-pt/archive/rss/index.html new file mode 100644 index 0000000000..49eda2566c --- /dev/null +++ b/files/pt-pt/archive/rss/index.html @@ -0,0 +1,47 @@ +--- +title: RSS +slug: Archive/RSS +tags: + - RSS +translation_of: Archive/RSS +--- +<div class="callout-box"><strong><a href="/pt/RSS/Como_começar" title="pt/RSS/Como_começar">Como começar</a></strong> +<p>Um tutorial introdutório ao RSS</p> +</div> + +<div> +<p>O <strong>Really Simple Syndication</strong> é um formato de dados baseado no <a href="/pt/XML" title="pt/XML">XML</a> que permite distribuir conteúdos simples.</p> +</div> + +<table class="topicpage-table"> + <tbody> + <tr> + <td> + <h4 id="Documenta.C3.A7.C3.A3o" name="Documenta.C3.A7.C3.A3o"><a href="/Special:Tags?tag=RSS&language=pt" title="Special:Tags?tag=RSS&language=pt">Documentação</a></h4> + + <p><span class="alllinks"><a href="/Special:Tags?tag=RSS:Artigos&language=pt" title="Special:Tags?tag=RSS:Artigos&language=pt">Veja todos...</a></span></p> + </td> + <td> + <h4 id="Comunidade" name="Comunidade">Comunidade</h4> + + <p>{{ DiscussionList("dev-tech-xml", "mozilla.dev.tech.xml") }}</p> + + <ul> + <li><a href="/pt/RSS/Comunidade" title="pt/RSS/Comunidade">Outros links para comunidades...</a></li> + </ul> + + <h4 id="T.C3.B3picos_relacionados" name="T.C3.B3picos_relacionados">Tópicos relacionados</h4> + + <dl> + <dd><a href="/pt/Atom" title="pt/Atom">Atom</a>, <a href="/pt/RDF" title="pt/RDF">RDF</a>, <a href="/pt/XML" title="pt/XML">XML</a></dd> + </dl> + + <p><span class="comment">Categorias</span></p> + + <p><span class="comment">Interwiki Language Links</span></p> + + <p> </p> + </td> + </tr> + </tbody> +</table> diff --git a/files/pt-pt/archive/rss/versão/0.90/index.html b/files/pt-pt/archive/rss/versão/0.90/index.html new file mode 100644 index 0000000000..7001b622b7 --- /dev/null +++ b/files/pt-pt/archive/rss/versão/0.90/index.html @@ -0,0 +1,79 @@ +--- +title: RSS/Versão/0.90 +slug: Archive/RSS/Versão/0.90 +translation_of: Archive/RSS/Version/0.90 +--- +<p> </p> +<p>{{ Deprecated_header() }}</p> +<h2 id="RSS_0.90" name="RSS_0.90">RSS 0.90</h2> +<p>O RSS 0.90 é a versão mais antiga conhecida de RSS lançado ao público, e substituído pela <a class="internal" href="/pt/RSS/Vers%c3%a3o/0.91/Netscape/Revis%c3%a3o_1" title="pt/RSS/Versão/0.91/Netscape/Revisão 1">Netscape RSS 0.91 (Revisão 1)</a>. Criado pela Netscape para ser um formato metadata provendo um sumário de um web site. (E não apenas um formato de publicação como é atualmente.)</p> +<p>O RSS 0.90 é um formato baseado no <a class="internal" href="/pt/RDF" title="pt/RDF">RDF</a>.</p> +<p>Quando ele foi criado, o significado inicial do RSS era <strong>Rich Site Summary</strong> e não <strong>Really Simple Syndication</strong>. (Veja <a class="internal" href="/pt/RSS/O_que_h%C3%A1_em_um_nome" title="pt/RSS/O que há em um nome">RSS - O que há em um nome</a> para mais informações sobre o histórico do nome do RSS.))</p> +<div class="note"> + <p><strong>NOTA</strong>: O RSS 0.90 teve seu uso desaprovado. Produtores de RSS <em>NÃO DEVEM</em> criar RSS 0.90 feeds, e <em>DEVEM</em> ao invés usar um novo e não-desaprovado formato RSS. (Veja a <a class="internal" href="/pt/RSS/Vers%C3%A3o" title="pt/RSS/Versão">Lista de Versões de RSS</a> para uma lista de formatos não-desaprovados.) Contudo, consumidores de RSS ainda <em>DEVEM</em> ser capazes de aceitar os RSS 0.90 feeds.</p> +</div> +<p> </p> +<h3 id="Examples" name="Examples">Exemplos</h3> +<p>RSS 0.90 parece com algo assim:</p> +<pre class="eval"> +<span class="nowiki"> <?xml version="1.0"?> + + <rdf:RDF + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns="http://my.netscape.com/rdf/simple/0.9/" + > + + <channel> + <title>Mozilla Dot Org</title> + <link>http://www.mozilla.org</link> + <description>the Mozilla Organization web site</description> + </channel> + + <image> + <title>Mozilla</title> + <url>http://www.mozilla.org/images/moz.gif</url> + <link>http://www.mozilla.org</link> + </image> + + <item> + <title>New Status Updates</title> + <link>http://www.mozilla.org/status/</link> + </item> + + <item> + <title>Bugzilla Reorganized</title> + <link>http://www.mozilla.org/bugs/</link> + </item> + + <item> + <title>Mozilla Party, 2.0!</title> + <link>http://www.mozilla.org/party/1999/</link> + </item> + + <item> + <title>Unix Platform Parity</title> + <link>http://www.mozilla.org/build/unix.html</link> + </item> + + <item> + <title>NPL 1.0M published</title> + <link>http://www.mozilla.org/NPL/NPL-1.0M.html</link> + </item> + + </rdf:RDF> + </span> +</pre> +<p>Note que aqui o RSS está sendo usado para listar seções de um web site ao invés de publicação (syndication).</p> +<p> </p> +<h3 id="Specification" name="Specification">Especificação</h3> +<p>A especificação original do RSS 0.90 desapareceu de sua localização original:</p> +<dl> + <dd> + <span class="nowiki">http://my.netscape.com/publish/help/quickstart.html</span></dd> +</dl> +<p>Cópias dele foram salvas e podem ser vistas nas seguintes localizações:</p> +<ul> + <li><a class="external" href="http://www.purplepages.ie/RSS/netscape/rss0.90.html" rel="freelink">http://www.purplepages.ie/RSS/netscape/rss0.90.html</a></li> + <li><a class="external" href="http://web.archive.org/web/*/http://my.netscape.com/publish/help/quickstart.html" rel="freelink">http://web.archive.org/web/*/http://...uickstart.html</a></li> +</ul> +<p>{{ languages( { "ja": "ja/RSS/Version/0.90", "pl": "pl/RSS/Wersje/0.90" } ) }}</p> diff --git a/files/pt-pt/archive/rss/versão/index.html b/files/pt-pt/archive/rss/versão/index.html new file mode 100644 index 0000000000..f034387784 --- /dev/null +++ b/files/pt-pt/archive/rss/versão/index.html @@ -0,0 +1,107 @@ +--- +title: Versão +slug: Archive/RSS/Versão +translation_of: Archive/RSS/Version +--- +<h2 id="RSS_Versions" name="RSS_Versions">Versões de RSS</h2> +<p>RSS tem uma história sórdida. Diferentes pessoas e grupos criaram especificações amplamente unilaterais que denominaram RSS. Alguns formatos RSS eram baseados em <a href="/en/XML" title="en/XML">XML</a> e outros baseados em <a class="internal" href="/pt/RDF" title="pt/RDF">RDF</a>.</p> +<p>A lista abaixo é de todas as versões de RSS conhecidas. Eles estão listados em ordem cronológica de quando foram lançados.</p> +<div class="note"> + <p><strong>NOTA</strong>: Na lista abaixo, apesar do RSS 1.0 parecer estar fora de lugar está na verdade no lugar cronologicamente correto</p> +</div> +<div class="note"> + <p><strong>NOTA</strong>: Existem 3 diferentes versões de <a class="internal" href="/pt/RSS/Vers%C3%A3o/0.91" title="pt/RSS/Versão/0.91">RSS 0.91</a>. O RSS 0.91 da Netscape (Revisão 1), o RSS 0.91 da Netscape (Revisão 3) e o RSS 0.91 da Userland.</p> +</div> +<div class="note"> + <p><strong>NOTA</strong>: O RSS 0.93 e o RSS 0.94 foram lançados apenas como beta e nunca se tornaram versões finais e por isso não eram para ter sido utilizados.</p> +</div> +<p> </p> +<table class="standard-table"> + <tbody> + <tr> + <th>Name</th> + <th>Status</th> + <th>Release Date</th> + <th>Based On</th> + <th>Author</th> + </tr> + <tr> + <td><a class="internal" href="/pt/RSS/Vers%C3%A3o/0.90" title="pt/RSS/Versão/0.90">RSS 0.90</a></td> + <td>{{ Deprecated_inline() }}</td> + <td class="small">Março 1999</td> + <td><a class="internal" href="/pt/RDF" title="pt/RDF">RDF</a></td> + <td class="small">Netscape</td> + </tr> + <tr> + <td><a class="internal" href="/pt/RSS/Vers%C3%A3o/0.91/Netscape/Revis%C3%A3o_1" title="pt/RSS/Versão/0.91/Netscape/Revisão 1">Netscape RSS 0.91 (Revisão 1)</a></td> + <td>{{ Deprecated_inline() }}</td> + <td class="small">?</td> + <td><a class="internal" href="/pt/XML" title="pt/XML">XML</a></td> + <td class="small">Netscape</td> + </tr> + <tr> + <td><a class="internal" href="/pt/RSS/Vers%C3%A3o/0.91/Netscape/Revis%C3%A3o_3" title="pt/RSS/Versão/0.91/Netscape/Revisão 3">Netscape RSS 0.91 (Revisão 3)</a></td> + <td>{{ Obsolete_inline() }}</td> + <td class="small">Julho 10, 1999</td> + <td><a class="internal" href="/pt/XML" title="pt/XML">XML</a></td> + <td class="small">Netscape</td> + </tr> + <tr> + <td><a href="/en/RSS/Version/0.91/Userland" title="en/RSS/Version/0.91/Userland">Userland's RSS 0.91</a></td> + <td>{{ Deprecated_inline() }}</td> + <td class="small">Junho 4, 2000</td> + <td><a class="internal" href="/pt/XML" title="pt/XML">XML</a></td> + <td class="small">Userland</td> + </tr> + <tr> + <td><a href="/en/RSS/Version/1.0" title="en/RSS/Version/1.0">RSS 1.0</a></td> + <td>Padrão</td> + <td class="small">Dezembro 9, 2000</td> + <td><a class="internal" href="/pt/RDF" title="pt/RDF">RDF</a></td> + <td class="small">grupo RSS-DEV</td> + </tr> + <tr> + <td><a href="/en/RSS/Version/0.92" title="en/RSS/Version/0.92">RSS 0.92</a></td> + <td>{{ Deprecated_inline() }}</td> + <td class="small">Dezembro 25, 2000</td> + <td><a class="internal" href="/pt/XML" title="pt/XML">XML</a></td> + <td class="small">Userland</td> + </tr> + <tr> + <td><a href="/en/RSS/Version/0.93" title="en/RSS/Version/0.93">RSS 0.93</a></td> + <td>{{ Deprecated_inline() }}</td> + <td class="small">Abril 20, 2001</td> + <td><a class="internal" href="/pt/XML" title="pt/XML">XML</a></td> + <td class="small">Userland</td> + </tr> + <tr> + <td><a href="/en/RSS/Version/0.94" title="en/RSS/Version/0.94">RSS 0.94</a></td> + <td>{{ Deprecated_inline() }}</td> + <td class="small">Agosto 19, 2002</td> + <td><a class="internal" href="/pt/XML" title="pt/XML">XML</a></td> + <td class="small">Userland</td> + </tr> + <tr> + <td><a href="/en/RSS/Version/2.0" title="en/RSS/Version/2.0">RSS 2.0</a></td> + <td>{{ Deprecated_inline() }}</td> + <td class="small">Setembro 2002</td> + <td><a class="internal" href="/pt/XML" title="pt/XML">XML</a></td> + <td class="small">Userland</td> + </tr> + <tr> + <td><a href="/en/RSS/Version/2.0/2002-11-11" title="en/RSS/Version/2.0/2002-11-11">RSS 2.0 (post 2002-11-11)</a></td> + <td>{{ Deprecated_inline() }}</td> + <td class="small">Novembro 11, 2002</td> + <td><a class="internal" href="/pt/XML" title="pt/XML">XML</a></td> + <td class="small">Userland</td> + </tr> + <tr> + <td><a href="/en/RSS/Version/2.0/2003-01-21" title="en/RSS/Version/2.0/2003-01-21">RSS 2.0 (post 2003-01-21)</a></td> + <td>Padrão</td> + <td class="small">Janeiro 21, 2003</td> + <td><a class="internal" href="/pt/XML" title="pt/XML">XML</a></td> + <td class="small">Userland</td> + </tr> + </tbody> +</table> +<p>{{ languages( { "es": "es/RSS/Versiones", "fr": "fr/RSS/Version", "ja": "ja/RSS/Version", "pl": "pl/RSS/Wersje" } ) }}</p> diff --git a/files/pt-pt/archive/themes/index.html b/files/pt-pt/archive/themes/index.html new file mode 100644 index 0000000000..aff151946d --- /dev/null +++ b/files/pt-pt/archive/themes/index.html @@ -0,0 +1,11 @@ +--- +title: Themes +slug: Archive/Themes +tags: + - NeedsTranslation + - TopicStub +translation_of: Archive/Themes +--- +<p>Archived theme documentation.</p> + +<p></p><ul><li><a href="/en-US/docs/Archive/Themes/Building_a_Theme">Building a Theme</a></li><li><a href="/en-US/docs/Archive/Themes/Common_Firefox_theme_issues_and_solutions">Common Firefox theme issues and solutions</a></li><li><a href="/en-US/docs/Archive/Themes/Creating_a_Skin_for_Firefox">Creating a Skin for Firefox</a><ul><li><a href="/en-US/docs/Archive/Themes/Creating_a_Skin_for_Firefox/UUID">UUID</a></li><li><a href="/en-US/docs/Archive/Themes/Creating_a_Skin_for_Firefox/contents.rdf">contents.rdf</a></li><li><a href="/en-US/docs/Archive/Themes/Creating_a_Skin_for_Firefox/install.rdf">install.rdf</a></li></ul></li><li><a href="/en-US/docs/Archive/Themes/Making_sure_your_theme_works_with_RTL_locales">Making sure your theme works with RTL locales</a></li><li><a href="/en-US/docs/Archive/Themes/Theme_changes_in_Firefox_2">Theme changes in Firefox 2</a></li><li><a href="/en-US/docs/Archive/Themes/Theme_changes_in_Firefox_3">Theme changes in Firefox 3</a></li><li><a href="/en-US/docs/Archive/Themes/Theme_changes_in_Firefox_3.5">Theme changes in Firefox 3.5</a></li><li><a href="/en-US/docs/Archive/Themes/Theme_changes_in_Firefox_4">Theme changes in Firefox 4</a></li></ul><p></p> diff --git a/files/pt-pt/archive/utilizar_normas_web_nas_suas_paginas_da_web/index.html b/files/pt-pt/archive/utilizar_normas_web_nas_suas_paginas_da_web/index.html new file mode 100644 index 0000000000..61629f890d --- /dev/null +++ b/files/pt-pt/archive/utilizar_normas_web_nas_suas_paginas_da_web/index.html @@ -0,0 +1,123 @@ +--- +title: Utilizar as Normas da Web nas suas Páginas da Web +slug: Archive/Utilizar_Normas_Web_nas_suas_Paginas_da_Web +tags: + - Desenvolvimento da Web + - Normas da Web + - Padrões da Web +translation_of: Archive/Using_Web_Standards_in_your_Web_Pages +--- +<p> </p> + +<blockquote>"Browser makers are no longer the problem. The problem lies with designers and developers chained to the browser-quirk-oriented markup of the 1990s-often because they don't realize it is possible to support current standards while accommodating old browsers." +<div style="text-align: right;"><a class="external" href="http://webstandards.org/about/history/">- Web Standards Project</a></div> +</blockquote> + +<p>This article provides an overview of the process for upgrading the content of your web pages to conform to the <a class="external" href="http://www.w3.org/">World Wide Web Consortium (W3C)</a> web standards. The first 2 sections address exclusively validation issues, benefits of validation, deprecated elements, deprecated attributes. How to upgrade a webpage markup code to pass validation and how to implement CSS are addressed by providing recommendations, tutorials and references.</p> + +<p>The other sections address <abbr title="Document Object Model">DOM</abbr> and <abbr title="Dynamic HyperText Markup Language">DHTML</abbr> coding practices which are at odds with the <abbr title="World Wide Web Consortium">W3C</abbr> web standards and suggest replacements. <strong>Every proposed W3C web standards replacement in this article is working without a problem in modern browsers like MSIE 7, Firefox 2, Opera 9, Safari 3, Konqueror 3.5+, Icab 4, etc.</strong></p> + +<p>The next-to-last section, <a href="/en/Using_Web_Standards_in_your_Web_Pages/Summary_of_Changes" title="en/Using_Web_Standards_in_your_Web_Pages/Summary_of_Changes">Summary of Changes</a>, outlines all the changes described in this article. The <a href="/en/Using_Web_Standards_in_your_Web_Pages/References" title="en/Using_Web_Standards_in_your_Web_Pages/References">last section</a> offers excellent and best references for those wishing to learn more about upgrading techniques presented in this article and more for those wishing to perfect their web pages.</p> + +<h2 id="Contents" name="Contents">Conteúdos</h2> + +<ol> + <li><s><a href="/en/The_Business_Benefits_of_Web_Standards" title="en/The_Business_Benefits_of_Web_Standards">Benefits of using web standards</a></s></li> + <li><s><a href="/en/Using_Web_Standards_in_your_Web_Pages/Making_your_page_using_web_standards_-_how_to" title="en/Using_Web_Standards_in_your_Web_Pages/Making_your_page_using_web_standards_-_how_to">Making your page using web standards - how to</a></s></li> + <li><a href="/en/Using_Web_Standards_in_your_Web_Pages/Using_the_W3C_DOM" title="en/Using_Web_Standards_in_your_Web_Pages/Using_the_W3C_DOM">Using the W3C DOM</a></li> + <li><a href="/en/Using_Web_Standards_in_your_Web_Pages/Developing_cross-browser_and_cross-platform_pages" title="en/Using_Web_Standards_in_your_Web_Pages/Developing_cross-browser_and_cross-platform_pages">Developing Cross Browser and Cross Platform Pages</a></li> + <li><s><a href="/en/DOM/XMLHttpRequest/Using_XMLHttpRequest_in_IE6" title="en/Using_Web_Standards_in_your_Web_Pages/Using_XMLHttpRequest">Using XMLHttpRequest</a></s></li> + <li><a href="/en/Using_Web_Standards_in_your_Web_Pages/Summary_of_Changes" title="en/Using_Web_Standards_in_your_Web_Pages/Summary_of_Changes">Summary of Changes</a></li> + <li><a href="/en/Using_Web_Standards_in_your_Web_Pages/References" title="en/Using_Web_Standards_in_your_Web_Pages/References">References</a></li> +</ol> + +<div class="originaldocinfo"> +<h2 id="Original_Document_Information" name="Original_Document_Information">Informação do Documento Origina</h2> + +<ul> + <li>Author(s): Mike Cowperthwaite, Marcio Galli, Jim Ley, Ian Oeschger, Simon Paquet, Gérard Talbot</li> + <li>Last Updated Date: May 29, 2008</li> + <li>Copyright Information: Portions of this content are © 1998–2008 by individual mozilla.org contributors; content available under a Creative Commons license | <a class="external" href="http://www.mozilla.org/foundation/licensing/website-content.html">Details</a>.</li> +</ul> +</div> + +<p>{{ languages( { "ja": "ja/Using_Web_Standards_in_your_Web_Pages", "zh-cn": "cn/\u5728\u60a8\u7684\u7f51\u9875\u4e2d\u5e94\u7528Web\u6807\u51c6" } ) }}</p> + +<div id="SL_balloon_obj" style="display: block;"> +<div class="SL_ImTranslatorLogo" id="SL_button" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%; display: block; opacity: 0; left: -8px; top: -25px; transition: visibility 2s ease 0s, opacity 2s linear 0s;"> </div> + +<div id="SL_shadow_translation_result2" style="display: none;"> </div> + +<div id="SL_shadow_translator" style="display: none;"> +<div id="SL_planshet"> +<div id="SL_arrow_up" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<div id="SL_Bproviders"> +<div class="SL_BL_LABLE_ON" id="SL_P0" title="Google">G</div> + +<div class="SL_BL_LABLE_ON" id="SL_P1" title="Microsoft">M</div> + +<div class="SL_BL_LABLE_ON" id="SL_P2" title="Translator">T</div> +</div> + +<div id="SL_alert_bbl" style="display: none;"> +<div id="SLHKclose" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<div id="SL_alert_cont"> </div> +</div> + +<div id="SL_TB"> +<table id="SL_tables"> + <tbody><tr> + <td class="SL_td"><input></td> + <td class="SL_td"><select><option value="auto">Detectar idioma</option><option value="af">Africâner</option><option value="sq">Albanês</option><option value="de">Alemão</option><option value="ar">Arabe</option><option value="hy">Armênio</option><option value="az">Azerbaijano</option><option value="eu">Basco</option><option value="bn">Bengali</option><option value="be">Bielo-russo</option><option value="my">Birmanês</option><option value="bs">Bósnio</option><option value="bg">Búlgaro</option><option value="ca">Catalão</option><option value="kk">Cazaque</option><option value="ceb">Cebuano</option><option value="ny">Chichewa</option><option value="zh-CN">Chinês (Simp)</option><option value="zh-TW">Chinês (Trad)</option><option value="si">Cingalês</option><option value="ko">Coreano</option><option value="ht">Crioulo haitiano</option><option value="hr">Croata</option><option value="da">Dinamarquês</option><option value="sk">Eslovaco</option><option value="sl">Esloveno</option><option value="es">Espanhol</option><option value="eo">Esperanto</option><option value="et">Estoniano</option><option value="fi">Finlandês</option><option value="fr">Francês</option><option value="gl">Galego</option><option value="cy">Galês</option><option value="ka">Georgiano</option><option value="el">Grego</option><option value="gu">Gujarati</option><option value="ha">Hauça</option><option value="iw">Hebraico</option><option value="hi">Hindi</option><option value="hmn">Hmong</option><option value="nl">Holandês</option><option value="hu">Húngaro</option><option value="ig">Igbo</option><option value="id">Indonésio</option><option value="en">Inglês</option><option value="yo">Ioruba</option><option value="ga">Irlandês</option><option value="is">Islandês</option><option value="it">Italiano</option><option value="ja">Japonês</option><option value="jw">Javanês</option><option value="kn">Kannada</option><option value="km">Khmer</option><option value="lo">Laosiano</option><option value="la">Latim</option><option value="lv">Letão</option><option value="lt">Lituano</option><option value="mk">Macedônico</option><option value="ml">Malaiala</option><option value="ms">Malaio</option><option value="mg">Malgaxe</option><option value="mt">Maltês</option><option value="mi">Maori</option><option value="mr">Marathi</option><option value="mn">Mongol</option><option value="ne">Nepalês</option><option value="no">Norueguês</option><option value="fa">Persa</option><option value="pl">Polonês</option><option value="pt">Português</option><option value="pa">Punjabi</option><option value="ro">Romeno</option><option value="ru">Russo</option><option value="sr">Sérvio</option><option value="st">Sesotho</option><option value="so">Somália</option><option value="sw">Suaíli</option><option value="su">Sudanês</option><option value="sv">Sueco</option><option value="tg">Tadjique</option><option value="tl">Tagalo</option><option value="th">Tailandês</option><option value="ta">Tâmil</option><option value="cs">Tcheco</option><option value="te">Telugo</option><option value="tr">Turco</option><option value="uk">Ucraniano</option><option value="ur">Urdu</option><option value="uz">Uzbeque</option><option value="vi">Vietnamita</option><option value="yi">Yiddish</option><option value="zu">Zulu</option></select></td> + <td class="SL_td"> + <div id="SL_switch_b" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Alternar Idiomas"> </div> + </td> + <td class="SL_td"><select><option value="af">Africâner</option><option value="sq">Albanês</option><option value="de">Alemão</option><option value="ar">Arabe</option><option value="hy">Armênio</option><option value="az">Azerbaijano</option><option value="eu">Basco</option><option value="bn">Bengali</option><option value="be">Bielo-russo</option><option value="my">Birmanês</option><option value="bs">Bósnio</option><option value="bg">Búlgaro</option><option value="ca">Catalão</option><option value="kk">Cazaque</option><option value="ceb">Cebuano</option><option value="ny">Chichewa</option><option value="zh-CN">Chinês (Simp)</option><option value="zh-TW">Chinês (Trad)</option><option value="si">Cingalês</option><option value="ko">Coreano</option><option value="ht">Crioulo haitiano</option><option value="hr">Croata</option><option value="da">Dinamarquês</option><option value="sk">Eslovaco</option><option value="sl">Esloveno</option><option value="es">Espanhol</option><option value="eo">Esperanto</option><option value="et">Estoniano</option><option value="fi">Finlandês</option><option value="fr">Francês</option><option value="gl">Galego</option><option value="cy">Galês</option><option value="ka">Georgiano</option><option value="el">Grego</option><option value="gu">Gujarati</option><option value="ha">Hauça</option><option value="iw">Hebraico</option><option value="hi">Hindi</option><option value="hmn">Hmong</option><option value="nl">Holandês</option><option value="hu">Húngaro</option><option value="ig">Igbo</option><option value="id">Indonésio</option><option selected value="en">Inglês</option><option value="yo">Ioruba</option><option value="ga">Irlandês</option><option value="is">Islandês</option><option value="it">Italiano</option><option value="ja">Japonês</option><option value="jw">Javanês</option><option value="kn">Kannada</option><option value="km">Khmer</option><option value="lo">Laosiano</option><option value="la">Latim</option><option value="lv">Letão</option><option value="lt">Lituano</option><option value="mk">Macedônico</option><option value="ml">Malaiala</option><option value="ms">Malaio</option><option value="mg">Malgaxe</option><option value="mt">Maltês</option><option value="mi">Maori</option><option value="mr">Marathi</option><option value="mn">Mongol</option><option value="ne">Nepalês</option><option value="no">Norueguês</option><option value="fa">Persa</option><option value="pl">Polonês</option><option value="pt">Português</option><option value="pa">Punjabi</option><option value="ro">Romeno</option><option value="ru">Russo</option><option value="sr">Sérvio</option><option value="st">Sesotho</option><option value="so">Somália</option><option value="sw">Suaíli</option><option value="su">Sudanês</option><option value="sv">Sueco</option><option value="tg">Tadjique</option><option value="tl">Tagalo</option><option value="th">Tailandês</option><option value="ta">Tâmil</option><option value="cs">Tcheco</option><option value="te">Telugo</option><option value="tr">Turco</option><option value="uk">Ucraniano</option><option value="ur">Urdu</option><option value="uz">Uzbeque</option><option value="vi">Vietnamita</option><option value="yi">Yiddish</option><option value="zu">Zulu</option></select></td> + <td class="SL_td"> + <div id="SL_TTS_voice" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Ouça"> </div> + </td> + <td class="SL_td"> + <div class="SL_copy" id="SL_copy" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Copiar"> </div> + </td> + <td class="SL_td"> + <div id="SL_bbl_font_patch"> </div> + + <div class="SL_bbl_font" id="SL_bbl_font" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Tamanho da fonte"> </div> + </td> + <td class="SL_td"> + <div id="SL_bbl_help" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Ajuda"> </div> + </td> + <td class="SL_td"> + <div class="SL_pin_off" id="SL_pin" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Fixar a janela de pop-up"> </div> + </td> + </tr> +</tbody></table> +</div> +</div> + +<div id="SL_shadow_translation_result" style=""> </div> + +<div class="SL_loading" id="SL_loading" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<div id="SL_player2"> </div> + +<div id="SL_alert100">A função de fala é limitada a 200 caracteres</div> + +<div id="SL_Balloon_options" style="background: rgb(255, 255, 255) repeat scroll 0% 0%;"> +<div id="SL_arrow_down" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;"> </div> + +<table id="SL_tbl_opt" style="width: 100%;"> + <tbody><tr> + <td><input></td> + <td> + <div id="SL_BBL_IMG" style="background: rgba(0, 0, 0, 0) repeat scroll 0% 0%;" title="Mostrar o botão do ImTranslator 3 segundos"> </div> + </td> + <td><a class="SL_options" title="Mostrar opções">Opções</a> : <a class="SL_options" title="Histórico de tradução">Histórico</a> : <a class="SL_options" title="Comentários">Comentários</a> : <a class="SL_options" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GD9D8CPW8HFA2" title="Faça sua contribuição">Donate</a></td> + <td><span id="SL_Balloon_Close" title="Encerrar">Encerrar</span></td> + </tr> +</tbody></table> +</div> +</div> +</div> |