Mercurial > octave
diff libinterp/corefcn/display.cc @ 24442:98a03a1097b4
move have_window_system function from sysdep.cc to display.cc
* display.cc (Fhave_window_system): Move here from sysdep.cc.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 21 Dec 2017 12:13:04 -0500 |
parents | 7f176909ab86 |
children | 194eb4bd202b |
line wrap: on
line diff
--- a/libinterp/corefcn/display.cc Thu Dec 21 03:45:09 2017 -0800 +++ b/libinterp/corefcn/display.cc Thu Dec 21 12:13:04 2017 -0500 @@ -27,8 +27,11 @@ #include "singleton-cleanup.h" #include "cdisplay.h" +#include "defun.h" #include "display.h" #include "error.h" +#include "ov.h" +#include "ovl.h" namespace octave { @@ -74,3 +77,14 @@ return retval; } } + +DEFUN (have_window_system, , , + doc: /* -*- texinfo -*- +@deftypefn {} {} have_window_system () +Return true if a window system is available (X11, Windows, or Apple OS X) +and false otherwise. +@seealso{isguirunning} +@end deftypefn */) +{ + return ovl (octave::display_info::display_available ()); +}