23 #if defined (HAVE_CONFIG_H) 29 #if defined (OCTAVE_USE_WINDOWS_API) 31 #elif defined (HAVE_FRAMEWORK_CARBON) 32 # include <Carbon/Carbon.h> 33 #elif defined (HAVE_X_WINDOWS) 34 # include <X11/Xlib.h> 44 const char *err_msg =
"";
46 #if defined (OCTAVE_USE_WINDOWS_API) 53 err_msg =
"no graphical display found";
55 #elif defined (HAVE_FRAMEWORK_CARBON) 57 CGDirectDisplayID display = CGMainDisplayID ();
62 err_msg =
"no graphical display found";
64 #elif defined (HAVE_X_WINDOWS) 66 const char *display_name = getenv (
"DISPLAY");
68 if (display_name && *display_name)
70 Display *display = XOpenDisplay (display_name);
74 Screen *screen = DefaultScreenOfDisplay (display);
77 err_msg =
"X11 display has no default screen";
79 XCloseDisplay (display);
84 err_msg =
"unable to open X11 DISPLAY";
87 err_msg =
"X11 DISPLAY environment variable not set";
91 err_msg =
"no graphical display found";
An image of characters with associated attributes.
const char * display_available(int *dpy_avail)