aboutsummaryrefslogtreecommitdiff
path: root/files/pl/web/api/screen
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
commit074785cea106179cb3305637055ab0a009ca74f2 (patch)
treee6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/pl/web/api/screen
parentda78a9e329e272dedb2400b79a3bdeebff387d47 (diff)
downloadtranslated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz
translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2
translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip
initial commit
Diffstat (limited to 'files/pl/web/api/screen')
-rw-r--r--files/pl/web/api/screen/colordepth/index.html43
-rw-r--r--files/pl/web/api/screen/index.html74
-rw-r--r--files/pl/web/api/screen/width/index.html108
3 files changed, 225 insertions, 0 deletions
diff --git a/files/pl/web/api/screen/colordepth/index.html b/files/pl/web/api/screen/colordepth/index.html
new file mode 100644
index 0000000000..89c06c4b8c
--- /dev/null
+++ b/files/pl/web/api/screen/colordepth/index.html
@@ -0,0 +1,43 @@
+---
+title: Screen.colorDepth
+slug: Web/API/Screen/colorDepth
+tags:
+ - DOM
+ - DOM_0
+ - Dokumentacja_Gecko_DOM
+ - Gecko
+ - Wszystkie_kategorie
+translation_of: Web/API/Screen/colorDepth
+---
+<p>{{ ApiRef() }}</p>
+
+<h3 id="Podsumowanie" name="Podsumowanie">Podsumowanie</h3>
+
+<p>Zwraca głębię koloru ekranu.</p>
+
+<h3 id="Sk.C5.82adnia" name="Sk.C5.82adnia">Składnia</h3>
+
+<pre class="eval">bitDepth = window.screen.colorDepth
+</pre>
+
+<h3 id="Przyk.C5.82ad" name="Przyk.C5.82ad">Przykład</h3>
+
+<pre class="eval">// Sprawdzenie głębi koloru ekranu
+if ( window.screen.colorDepth &lt; 8) {
+ // Użycie wersji strony z małą ilością kolorów
+} else {
+ // Użycie prawidłowej wersji strony, o pełnej głębi kolorów
+}
+</pre>
+
+<h3 id="Uwagi" name="Uwagi">Uwagi</h3>
+
+<p>Zobacz także <code><a href="pl/DOM/window.screen.pixelDepth">window.screen.pixelDepth</a></code>.</p>
+
+<h3 id="Specyfikacja" name="Specyfikacja">Specyfikacja</h3>
+
+<p>{{ DOM0() }}</p>
+
+<div class="noinclude"> </div>
+
+<p>{{ languages( { "en": "en/DOM/window.screen.colorDepth", "ja": "ja/DOM/window.screen.colorDepth" } ) }}</p>
diff --git a/files/pl/web/api/screen/index.html b/files/pl/web/api/screen/index.html
new file mode 100644
index 0000000000..91ce6c3476
--- /dev/null
+++ b/files/pl/web/api/screen/index.html
@@ -0,0 +1,74 @@
+---
+title: Screen
+slug: Web/API/Screen
+translation_of: Web/API/Screen
+---
+<div>{{APIRef("CSSOM View")}}</div>
+
+<p>The <code>Screen</code> interface represents a screen, usually the one on which the current window is being rendered.</p>
+
+<p>Usually it is the one on which the current window is being rendered, obtained using <code>window.screen</code>.</p>
+
+<h2 id="Example" name="Example">Properties</h2>
+
+<dl>
+ <dt>{{domxref("Screen.availTop")}}</dt>
+ <dd>Specifies the y-coordinate of the first pixel that is not allocated to permanent or semipermanent user interface features.</dd>
+ <dt>{{domxref("Screen.availLeft")}}</dt>
+ <dd>Returns the first available pixel available from the left side of the screen.</dd>
+ <dt>{{domxref("Screen.availHeight")}}</dt>
+ <dd>Specifies the height of the screen, in pixels, minus permanent or semipermanent user interface features displayed by the operating system, such as the Taskbar on Windows.</dd>
+ <dt>{{domxref("Screen.availWidth")}}</dt>
+ <dd>Returns the amount of horizontal space in pixels available to the window.</dd>
+ <dt>{{domxref("Screen.colorDepth")}}</dt>
+ <dd>Returns the color depth of the screen.</dd>
+ <dt>{{domxref("Screen.height")}}</dt>
+ <dd>Returns the height of the screen in pixels.</dd>
+ <dt>{{domxref("Screen.left")}}</dt>
+ <dd>Returns the distance in pixels from the left side of the main screen to the left side of the current screen.</dd>
+ <dt>{{domxref("Screen.orientation")}}</dt>
+ <dd>Returns the current orientation of the screen.</dd>
+ <dt>{{domxref("Screen.pixelDepth")}}</dt>
+ <dd>Gets the bit depth of the screen.</dd>
+ <dt>{{domxref("Screen.top")}}</dt>
+ <dd>Returns the distance in pixels from the top side of the current screen.</dd>
+ <dt>{{domxref("Screen.width")}}</dt>
+ <dd>Returns the width of the screen.</dd>
+ <dt>{{domxref("Screen.mozEnabled")}} {{gecko_minversion_inline("12.0")}}</dt>
+ <dd>Boolean. Setting to false will turn off the device's screen.</dd>
+ <dt>{{domxref("Screen.mozBrightness")}} {{gecko_minversion_inline("12.0")}}</dt>
+ <dd>Controls the brightness of a device's screen. A double between 0 and 1.0 is expected.</dd>
+</dl>
+
+<h3 id="Events_handler">Events handler</h3>
+
+<dl>
+ <dt>{{domxref("Screen.onorientationchange")}}</dt>
+ <dd>A handler for the {{event("orientationchange")}} events.</dd>
+</dl>
+
+<h2 id="Methods">Methods</h2>
+
+<dl>
+ <dt>{{domxref("Screen.lockOrientation")}}</dt>
+ <dd>Lock the screen orientation (only works in fullscreen or for installed apps)</dd>
+ <dt>{{domxref("Screen.unlockOrientation")}}</dt>
+ <dd>Unlock the screen orientation (only works in fullscreen or for installed apps)</dd>
+</dl>
+
+<p>Methods inherit from {{domxref("EventTarget")}}</p>
+
+<p>{{page("/en-US/docs/Web/API/EventTarget","Methods")}}</p>
+
+<h2 id="Example" name="Example">Example</h2>
+
+<pre class="brush:js">if (screen.pixelDepth &lt; 8) {
+ // use low-color version of page
+} else {
+ // use regular, colorful page
+}
+</pre>
+
+<h2 id="Specification" name="Specification">Specification</h2>
+
+<p>CSSOM View</p>
diff --git a/files/pl/web/api/screen/width/index.html b/files/pl/web/api/screen/width/index.html
new file mode 100644
index 0000000000..352f6cfbf3
--- /dev/null
+++ b/files/pl/web/api/screen/width/index.html
@@ -0,0 +1,108 @@
+---
+title: Screen.width
+slug: Web/API/Screen/width
+translation_of: Web/API/Screen/width
+---
+<div>
+<div>{{APIRef("CSSOM View")}}</div>
+</div>
+
+<p>Zwraca szerokość ekranu.</p>
+
+<h2 id="Syntax" name="Syntax">Składnia</h2>
+
+<pre class="syntaxbox"><var>lWidth</var> = window.screen.width
+</pre>
+
+<h2 id="Example" name="Example">Przykład</h2>
+
+<pre class="brush:js">// crude way to check that the screen is at least 1024x768
+if (window.screen.width &gt;= 1024 &amp;&amp; window.screen.height &gt;= 768) {
+ // resolution is 1024x768 or above
+}
+</pre>
+
+<h2 id="Notes" name="Notes">Notes</h2>
+
+<p>Note that not all of the width given by this property may be available to the window itself. When other widgets occupy space that cannot be used by the <code>window</code> object, there is a difference in <code>window.screen.width</code> and <code>window.screen.availWidth</code>. See also {{domxref("window.screen.height")}}.</p>
+
+<p>Internet Explorer will take into account the zoom setting when reporting the screen width. It will only return the real width of the screen if the zoom is set to 100%.</p>
+
+<h2 id="Specification" name="Specification">Specyfikacja</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specyfikacja</th>
+ <th scope="col">Status</th>
+ <th scope="col">Komentarz</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{ SpecName('CSSOM View', '#dom-screen-width', 'Screen.width') }}</td>
+ <td>{{ Spec2('CSSOM View') }}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Kompatybilność_przeglądarek">Kompatybilność przeglądarek</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Edge</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari (WebKit)</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>6</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Android Webview</th>
+ <th>Edge</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>Firefox OS</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ <th>Chrome for Android</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>