summaryrefslogtreecommitdiff
path: root/devdocs/elisp/window-systems.html
diff options
context:
space:
mode:
Diffstat (limited to 'devdocs/elisp/window-systems.html')
-rw-r--r--devdocs/elisp/window-systems.html15
1 files changed, 15 insertions, 0 deletions
diff --git a/devdocs/elisp/window-systems.html b/devdocs/elisp/window-systems.html
new file mode 100644
index 00000000..d10a418e
--- /dev/null
+++ b/devdocs/elisp/window-systems.html
@@ -0,0 +1,15 @@
+ <h3 class="section">Window Systems</h3> <p>Emacs works with several window systems, most notably the X Window System. Both Emacs and X use the term “window”, but use it differently. An Emacs frame is a single window as far as X is concerned; the individual Emacs windows are not known to X at all. </p> <dl> <dt id="window-system">Variable: <strong>window-system</strong>
+</dt> <dd>
+<p>This terminal-local variable tells Lisp programs what window system Emacs is using for displaying the frame. The possible values are </p> <dl compact> <dt><code>x</code></dt> <dd>
+ <p>Emacs is displaying the frame using X. </p>
+</dd> <dt><code>w32</code></dt> <dd><p>Emacs is displaying the frame using native MS-Windows GUI. </p></dd> <dt><code>ns</code></dt> <dd><p>Emacs is displaying the frame using the Nextstep interface (used on GNUstep and macOS). </p></dd> <dt><code>pc</code></dt> <dd><p>Emacs is displaying the frame using MS-DOS direct screen writes. </p></dd> <dt><code>nil</code></dt> <dd><p>Emacs is displaying the frame on a character-based terminal. </p></dd> </dl> </dd>
+</dl> <dl> <dt id="initial-window-system">Variable: <strong>initial-window-system</strong>
+</dt> <dd><p>This variable holds the value of <code>window-system</code> used for the first frame created by Emacs during startup. (When Emacs is invoked as a daemon, it does not create any initial frames, so <code>initial-window-system</code> is <code>nil</code>, except on MS-Windows, where it is still <code>w32</code>. See <a href="https://www.gnu.org/software/emacs/manual/html_node/emacs/Initial-Options.html#Initial-Options">daemon</a> in <cite>The GNU Emacs Manual</cite>.) </p></dd>
+</dl> <dl> <dt id="window-system">Function: <strong>window-system</strong> <em>&amp;optional frame</em>
+</dt> <dd><p>This function returns a symbol whose name tells what window system is used for displaying <var>frame</var> (which defaults to the currently selected frame). The list of possible symbols it returns is the same one documented for the variable <code>window-system</code> above. </p></dd>
+</dl> <p>Do <em>not</em> use <code>window-system</code> and <code>initial-window-system</code> as predicates or boolean flag variables, if you want to write code that works differently on text terminals and graphic displays. That is because <code>window-system</code> is not a good indicator of Emacs capabilities on a given display type. Instead, use <code>display-graphic-p</code> or any of the other <code>display-*-p</code> predicates described in <a href="display-feature-testing">Display Feature Testing</a>. </p><div class="_attribution">
+ <p class="_attribution-p">
+ Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
+ <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Window-Systems.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Window-Systems.html</a>
+ </p>
+</div>