- static const char *exts[][2] = {
- { "SCREEN_SAVER", "SGI Screen-Saver" },
- { "SCREEN-SAVER", "SGI Screen-Saver" },
- { "MIT-SCREEN-SAVER", "MIT Screen-Saver" },
- { "XIDLE", "XIdle" },
- { "SGI-VIDEO-CONTROL", "SGI Video-Control" },
- { "READDISPLAY", "SGI Read-Display" },
- { "MIT-SHM", "Shared Memory" },
- { "DOUBLE-BUFFER", "Double-Buffering" },
- { "DPMS", "Power Management" },
- { "GLX", "GLX" },
- { "XFree86-VidModeExtension", "XF86 Video-Mode" },
- { "XINERAMA", "Xinerama" }
+ static struct {
+ const char *name; const char *desc;
+ Bool useful_p;
+ Status (*version_fn) (Display *, int *majP, int *minP);
+ } exts[] = {
+
+ { "SCREEN_SAVER", /* underscore */ "SGI Screen-Saver",
+# ifdef HAVE_SGI_SAVER_EXTENSION
+ True, 0
+# else
+ False, 0
+# endif
+ }, { "SCREEN-SAVER", /* dash */ "SGI Screen-Saver",
+# ifdef HAVE_SGI_SAVER_EXTENSION
+ True, 0
+# else
+ False, 0
+# endif
+ }, { "MIT-SCREEN-SAVER", "MIT Screen-Saver",
+# ifdef HAVE_MIT_SAVER_EXTENSION
+ True, XScreenSaverQueryVersion
+# else
+ False, 0
+# endif
+ }, { "XIDLE", "XIdle",
+# ifdef HAVE_XIDLE_EXTENSION
+ True, 0
+# else
+ False, 0
+# endif
+ }, { "SGI-VIDEO-CONTROL", "SGI Video-Control",
+# ifdef HAVE_SGI_VC_EXTENSION
+ True, XSGIvcQueryVersion
+# else
+ False, 0
+# endif
+ }, { "READDISPLAY", "SGI Read-Display",
+# ifdef HAVE_READ_DISPLAY_EXTENSION
+ True, XReadDisplayQueryVersion
+# else
+ False, 0
+# endif
+ }, { "MIT-SHM", "Shared Memory",
+# ifdef HAVE_XSHM_EXTENSION
+ True, (Status (*) (Display*,int*,int*)) XShmQueryVersion /* 4 args */
+# else
+ False, 0
+# endif
+ }, { "DOUBLE-BUFFER", "Double-Buffering",
+# ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+ True, XdbeQueryExtension
+# else
+ False, 0
+# endif
+ }, { "DPMS", "Power Management",
+# ifdef HAVE_DPMS_EXTENSION
+ True, DPMSGetVersion
+# else
+ False, 0
+# endif
+ }, { "GLX", "GLX",
+# ifdef HAVE_GL
+ True, 0
+# else
+ False, 0
+# endif
+ }, { "XFree86-VidModeExtension", "XF86 Video-Mode",
+# ifdef HAVE_XF86VMODE
+ True, XF86VidModeQueryVersion
+# else
+ False, 0
+# endif
+ }, { "XC-VidModeExtension", "XC Video-Mode",
+# ifdef HAVE_XF86VMODE
+ True, XF86VidModeQueryVersion
+# else
+ False, 0
+# endif
+ }, { "XFree86-MISC", "XF86 Misc",
+# ifdef HAVE_XF86MISCSETGRABKEYSSTATE
+ True, XF86MiscQueryVersion
+# else
+ False, 0
+# endif
+ }, { "XC-MISC", "XC Misc",
+# ifdef HAVE_XF86MISCSETGRABKEYSSTATE
+ True, XF86MiscQueryVersion
+# else
+ False, 0
+# endif
+ }, { "XINERAMA", "Xinerama",
+# ifdef HAVE_XINERAMA
+ True, XineramaQueryVersion
+# else
+ False, 0
+# endif
+ }, { "RANDR", "Resize-and-Rotate",
+# ifdef HAVE_RANDR
+ True, XRRQueryVersion
+# else
+ False, 0
+# endif
+ }, { "DRI", "DRI",
+ True, 0
+ }, { "NV-CONTROL", "NVidia",
+ True, 0
+ }, { "NV-GLX", "NVidia GLX",
+ True, 0
+ }, { "Apple-DRI", "Apple-DRI (XDarwin)",
+ True, 0
+ }, { "XInputExtension", "XInput",
+ True, 0
+ },