From c168afb6f6d631a61c2ba764eec7218d25b838a5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 7 Jan 2022 16:38:47 +0200 Subject: [PATCH] Minor improvements for 'pgtk' documentation * src/dispnew.c (syms_of_display) : * src/frame.c (Fwindow_system): * doc/lispref/display.texi (Defining Faces, Window Systems): * doc/lispref/frames.texi (Frames): Mention/explain 'pgtk'/'haiku'. * doc/lispref/commands.texi (Misc Events): Fix @example and markup. --- doc/lispref/commands.texi | 26 ++++++++++++++++++-------- doc/lispref/display.texi | 4 +++- doc/lispref/frames.texi | 2 ++ src/dispnew.c | 4 ++++ src/frame.c | 2 ++ 5 files changed, 29 insertions(+), 9 deletions(-) diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index fdbc05ce3d6..01aa1e1fa4b 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi @@ -2139,19 +2139,29 @@ On X, @var{arg} is a string describing some text to place behind the cursor. It can be @code{nil}, which means to remove any text previously displayed. -On PGTK, @var{arg} is a list of strings with color information. Its -structure is as follows: +On PGTK frames (@pxref{Frames}), @var{arg} is a list of strings with +information about their color and underline attributes. It has the +following form: @example - ( - (TEXT (ul . COLOR) (bg . COLOR) (fg . COLOR)) - ; ... +@group + ((@var{string1} + (ul . @var{underline-color}) + (bg . @var{background-color}) + (fg . @var{foreground-color})) + (@var{string2} + (ul . @var{underline-color}) + (bg . @var{background-color}) + (fg . @var{foreground-color})) + @dots{} ) +@end group @end example -Color information can be omitted. @code{COLOR} of @code{ul} can be -@code{t} or a string. @var{arg} can be @code{nil}, which means to -remove any text previously displayed. +Color information can be omitted, leaving just the text of the +strings. @var{underline-color} can be @code{t}, meaning underlined +text with default underline color, or it can be a string, the name of +the color to draw the underline. This is a special event (@pxref{Special Events}), which normally should not be bound by the user to any command. Emacs will typically diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 4bc7884e9ed..f191c400abc 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -2802,7 +2802,7 @@ apply to. Here are the possible values of @var{characteristic}: The kind of window system the terminal uses---either @code{graphic} (any graphics-capable display), @code{x}, @code{pc} (for the MS-DOS console), @code{w32} (for MS Windows 9X/NT/2K/XP), @code{haiku} (for -Haiku), @code{pgtk} (for GTK), or @code{tty} (a non-graphics-capable +Haiku), @code{pgtk} (for pure GTK), or @code{tty} (a non-graphics-capable display). @xref{Window Systems, window-system}. @item class @@ -8386,6 +8386,8 @@ GNUstep and macOS). Emacs is displaying the frame using MS-DOS direct screen writes. @item haiku Emacs is displaying the frame using the Application Kit on Haiku. +@item pgtk +Emacs is displaying the frame using pure GTK facilities. @item nil Emacs is displaying the frame on a character-based terminal. @end table diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index ceaa11529f7..ca7d9ada0ba 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -60,6 +60,8 @@ The frame is displayed on a GNUstep or Macintosh Cocoa graphical terminal. @item pc The frame is displayed on an MS-DOS terminal. +@item pgtk +The frame is displayed using pure GTK facilities. @end table @end defun diff --git a/src/dispnew.c b/src/dispnew.c index 178d5caffb2..6337bcf1303 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -6662,6 +6662,8 @@ The value is a symbol: `w32' for an Emacs frame that is a window on MS-Windows display, `ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display, `pc' for a direct-write MS-DOS frame. + `pgtk' for an Emacs frame using pure GTK facilities. + `haiku' for an Emacs frame running in Haiku. Use of this variable as a boolean is deprecated. Instead, use `display-graphic-p' or any of the other `display-*-p' @@ -6675,6 +6677,8 @@ The value is a symbol: `w32' for an Emacs frame that is a window on MS-Windows display, `ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display, `pc' for a direct-write MS-DOS frame. + `pgtk' for an Emacs frame using pure GTK facilities. + `haiku' for an Emacs frame running in Haiku. Use of this variable as a boolean is deprecated. Instead, use `display-graphic-p' or any of the other `display-*-p' diff --git a/src/frame.c b/src/frame.c index 92120792f8f..c0f4f3ecde3 100644 --- a/src/frame.c +++ b/src/frame.c @@ -277,6 +277,8 @@ The value is a symbol: `w32' for an Emacs frame that is a window on MS-Windows display, `ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display, `pc' for a direct-write MS-DOS frame. + `pgtk' for an Emacs frame using pure GTK facilities. + `haiku' for an Emacs frame running in Haiku. FRAME defaults to the currently selected frame. -- 2.39.2