~ubuntu-branches/ubuntu/quantal/nvidia-settings-updates/quantal

« back to all changes in this revision

Viewing changes to src/gtk+-2.x/ctkglx.c

  • Committer: Bazaar Package Importer
  • Author(s): Alberto Milone
  • Date: 2011-08-11 13:21:52 UTC
  • Revision ID: james.westby@ubuntu.com-20110811132152-xzu2r0334maugi2s
Tags: upstream-280.13
ImportĀ upstreamĀ versionĀ 280.13

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * nvidia-settings: A tool for configuring the NVIDIA X driver on Unix
 
3
 * and Linux systems.
 
4
 *
 
5
 * Copyright (C) 2004 NVIDIA Corporation.
 
6
 *
 
7
 * This program is free software; you can redistribute it and/or
 
8
 * modify it under the terms of Version 2 of the GNU General Public
 
9
 * License as published by the Free Software Foundation.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful, but
 
12
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See Version 2
 
14
 * of the GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program; if not, write to the:
 
18
 *
 
19
 *           Free Software Foundation, Inc.
 
20
 *           59 Temple Place - Suite 330
 
21
 *           Boston, MA 02111-1307, USA
 
22
 *
 
23
 */
 
24
 
 
25
#include <stdlib.h>
 
26
#include <stdio.h>
 
27
#include <unistd.h>
 
28
#include <gtk/gtk.h>
 
29
#include <NvCtrlAttributes.h>
 
30
 
 
31
#include "glxinfo.h" /* xxx_abbrev functions */
 
32
 
 
33
#include "ctkbanner.h"
 
34
#include "ctkglx.h"
 
35
#include "ctkutils.h"
 
36
#include "ctkconfig.h"
 
37
#include "ctkhelp.h"
 
38
#include "ctkconstants.h"
 
39
 
 
40
#include <GL/glx.h> /* GLX #defines */
 
41
 
 
42
 
 
43
/* Number of FBConfigs attributes reported in gui */
 
44
#define NUM_FBCONFIG_ATTRIBS  32
 
45
 
 
46
 
 
47
/* FBConfig tooltips */
 
48
static const char * __show_fbc_help =
 
49
  "Show the GLX Frame Buffer Configurations table in a new window.";
 
50
static const char * __fid_help  =
 
51
  "fid (Frame buffer ID) - Frame Buffer Configuration ID.";
 
52
static const char * __vid_help  =
 
53
  "vid (XVisual ID) -  ID of the associated X Visual.";
 
54
static const char * __vt_help  =
 
55
  "vt (XVisual Type) -  Type of the associated X Visual.  "
 
56
  "Possible X visual types are 'tc', 'dc', 'pc', 'sc', 'gs', 'sg' and '.' "
 
57
  "which mean TrueColor, DirectColor, PseudoColor, StaticColor, GrayScale, "
 
58
  "StaticGray and None, respectively.";
 
59
static const char * __bfs_help =
 
60
  "bfs (buffer size) - Number of bits per color in the color buffer.";
 
61
static const char * __lvl_help =
 
62
  "lvl (level) - Frame buffer level.  Level zero is the default frame "
 
63
  "buffer.  Positive levels are the overlay frame buffers (on top of the "
 
64
  "default frame buffer).  Negative levels are the underlay frame buffers "
 
65
  "(under the default frame buffer).";
 
66
static const char * __bf_help =
 
67
  "bf (Buffer format) - Color buffer format.  'rgb' means each element of the "
 
68
  "pixel buffer holds red, green, blue, and alpha values.  'ci' means each "
 
69
  "element of the pixel buffer holds a color index value, where the actual "
 
70
  "color is defined by a color map.";
 
71
static const char * __db_help =
 
72
  "db (Double buffer) - 'y' if the configuration has front and back color "
 
73
  "buffers that are swappable.  '-' if this is not supported.";
 
74
static const char * __st_help =
 
75
  "st (Stereo buffer) - 'y' if the configuration has left and right color "
 
76
  "buffers that are rendered to in stereo.  '-' if this is not supported.";
 
77
static const char * __rs_help =
 
78
  "rs (Red size) - Number of bits per color used for red.  "
 
79
  "Undefined for configurations that use color indexing.";
 
80
static const char * __gs_help =
 
81
  "gs (Green size) - Number of bits per color used for green.  "
 
82
  "Undefined for configurations that use color indexing.";
 
83
static const char * __bs_help =
 
84
  "bs (Blue size) - Number of bits per color used for blue.  "
 
85
  "Undefined for configurations that use color indexing.";
 
86
static const char * __as_help =
 
87
  "as (Alpha size) - Number of bits per color used for alpha.  "
 
88
  "Undefined for configurations that use color indexing.";
 
89
static const char * __aux_help =
 
90
  "aux (Auxiliary buffers) - Number of available auxiliary color buffers.";
 
91
static const char * __dpt_help =
 
92
  "dpt (Depth buffer size) - Number of bits per color in the depth buffer.";
 
93
static const char * __stn_help =
 
94
  "stn (Stencil size) - Number of bits per element in the stencil buffer.";
 
95
static const char * __acr_help =
 
96
  "acr (Accumulator red size) - Number of bits per color used for red "
 
97
  "in the accumulator buffer.";
 
98
static const char * __acg_help =
 
99
  "acg (Accumulator green size) - Number of bits per color used for green "
 
100
  "in the accumulator buffer.";
 
101
static const char * __acb_help =
 
102
  "acb (Accumulator blue size) - Number of bits per color used for blue "
 
103
  "in the accumulator buffer.";
 
104
static const char * __aca_help =
 
105
  "aca (Accumulator alpha size) - Number of bits per color used for alpha "
 
106
  "in the accumulator buffer.";
 
107
static const char * __mvs_help =
 
108
  "mvs (Multisample coverage samples) - Number of coverage samples per multisample.";
 
109
static const char * __mcs_help =
 
110
  "mcs (Multisample color samples) - Number of color samples per multisample.";
 
111
static const char * __mb_help =
 
112
  "mb (Multisample buffer count) - Number of multisample buffers.";
 
113
static const char * __cav_help =
 
114
  "cav (Caveats) - Caveats for this configuration.  A frame buffer "
 
115
  "configuration may have the following caveats: 'NonC' if it supports "
 
116
  "any non-conformant visual extension.  'Slow' if it has reduced "
 
117
  "preformance.  '-' if it has no caveats.";
 
118
static const char * __pbw_help =
 
119
  "pbw (Pbuffer width) - Width of pbuffer (in hexadecimal).";
 
120
static const char * __pbh_help =
 
121
  "pbh (Pbuffer height) - Height of pbuffer (in hexadecimal).";
 
122
static const char * __pbp_help =
 
123
  "pbp (Pbuffer max pixels) - Max number of pixels in pbuffer (in "
 
124
  "hexadecimal).";
 
125
static const char * __trt_help =
 
126
  "trt (Transparency type) - Type of transparency (RGBA or Index).";
 
127
static const char * __trr_help =
 
128
  "trr (Transparency red value) - Red value consided transparent.";
 
129
static const char * __trg_help =
 
130
  "trg (Transparency green value) - Green value consided transparent.";
 
131
static const char * __trb_help =
 
132
  "trb (Transparency blue value) - Blue value consided transparent.";
 
133
static const char * __tra_help =
 
134
  "tra (Transparency alpha value) - Alpha value consided transparent.";
 
135
static const char * __tri_help =
 
136
  "tri (Transparency index value) - Color index value consided transparent.";
 
137
 
 
138
 
 
139
GType ctk_glx_get_type(void)
 
140
{
 
141
    static GType ctk_glx_type = 0;
 
142
 
 
143
    if (!ctk_glx_type) {
 
144
        static const GTypeInfo ctk_glx_info = {
 
145
            sizeof (CtkGLXClass),
 
146
            NULL, /* base_init */
 
147
            NULL, /* base_finalize */
 
148
            NULL, /* class_init, */
 
149
            NULL, /* class_finalize */
 
150
            NULL, /* class_data */
 
151
            sizeof (CtkGLX),
 
152
            0, /* n_preallocs */
 
153
            NULL, /* instance_init */
 
154
        };
 
155
 
 
156
        ctk_glx_type = g_type_register_static (GTK_TYPE_VBOX,
 
157
                "CtkGLX", &ctk_glx_info, 0);
 
158
    }
 
159
 
 
160
    return ctk_glx_type;
 
161
} /* ctk_glx_get_type() */
 
162
 
 
163
 
 
164
static void dummy_button_signal(GtkWidget *widget,
 
165
                                 gpointer user_data)
 
166
{
 
167
    /* This is a dummy function so tooltips are enabled
 
168
     * for the fbconfig table column titles
 
169
     */
 
170
}
 
171
 
 
172
 
 
173
/*
 
174
 * show_fbc_toggled() - called when the show GLX Frame Buffer Configurations
 
175
 * button has been toggled.
 
176
 */
 
177
 
 
178
static void show_fbc_toggled(GtkWidget *widget, gpointer user_data)
 
179
{
 
180
    CtkGLX *ctk_glx = user_data;
 
181
    gboolean enabled;
 
182
 
 
183
    /* get the enabled state */
 
184
 
 
185
    enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
 
186
 
 
187
    if (enabled) {
 
188
        gtk_widget_show_all(ctk_glx->fbc_window);
 
189
    } else {
 
190
        gtk_widget_hide(ctk_glx->fbc_window);
 
191
    }
 
192
 
 
193
    ctk_config_statusbar_message(ctk_glx->ctk_config,
 
194
                                 "Show GLX Frame Buffer Configurations button %s.",
 
195
                                 enabled ? "enabled" : "disabled");
 
196
 
 
197
} /* show_fbc_toggled() */
 
198
 
 
199
 
 
200
/*
 
201
 * fbc_window_destroy() - called when the window displaying the
 
202
 * GLX Frame Buffer Configurations table is closed.
 
203
 */
 
204
static gboolean
 
205
fbc_window_destroy(GtkWidget *widget, GdkEvent *event, gpointer user_data)
 
206
{
 
207
    CtkGLX *ctk_glx = user_data;
 
208
 
 
209
    gtk_toggle_button_set_active
 
210
        (GTK_TOGGLE_BUTTON(ctk_glx->show_fbc_button),
 
211
         FALSE);
 
212
 
 
213
    return TRUE;
 
214
 
 
215
} /* fbc_window_destroy() */
 
216
 
 
217
 
 
218
/* Creates the GLX information widget
 
219
 * 
 
220
 * NOTE: The GLX information other than the FBConfigs will
 
221
 *       be setup when this page is hooked up and the "parent-set"
 
222
 *       signal is thrown.  This will result in calling the
 
223
 *       ctk_glx_probe_info() function.
 
224
 */
 
225
 
 
226
typedef struct WidgetSizeRec {
 
227
    GtkWidget *widget;
 
228
    int width;
 
229
} WidgetSize;
 
230
 
 
231
GtkWidget* ctk_glx_new(NvCtrlAttributeHandle *handle,
 
232
                       CtkConfig *ctk_config, CtkEvent *ctk_event)
 
233
{
 
234
    GObject *object;
 
235
    CtkGLX *ctk_glx;
 
236
    GtkWidget *label;
 
237
    GtkWidget *banner;
 
238
    GtkWidget *hseparator;
 
239
    GtkWidget *hbox;
 
240
    GtkWidget *vbox, *vbox2;
 
241
    GtkWidget *scrollWin;
 
242
    GtkWidget *event;    /* For setting the background color to white */
 
243
    GtkWidget *data_table, *header_table;
 
244
    GtkWidget *data_viewport, *full_viewport;
 
245
    GtkWidget *vscrollbar, *hscrollbar;
 
246
    GtkWidget *show_fbc_button, *window;
 
247
    GtkRequisition req;
 
248
    ReturnStatus ret;
 
249
 
 
250
    char * glx_info_str = NULL;               /* Test if GLX supported */
 
251
    GLXFBConfigAttr *fbconfig_attribs = NULL; /* FBConfig data */
 
252
    int i;                                    /* Iterator */
 
253
    int num_fbconfigs = 0;
 
254
    char *err_str = NULL;
 
255
 
 
256
    gchar *fbconfig_titles[NUM_FBCONFIG_ATTRIBS] = {
 
257
        "fid",  "vid",  "vt", "bfs",  "lvl",
 
258
        "bf",   "db",   "st",
 
259
        "rs",   "gs",   "bs",   "as",
 
260
        "aux",  "dpt",  "stn",
 
261
        "acr",  "acg",  "acb",  "aca",
 
262
        "mvs",  "mcs",  "mb",
 
263
        "cav",
 
264
        "pbw",  "pbh",  "pbp",
 
265
        "trt",  "trr",  "trg",  "trb",  "tra",  "tri"
 
266
    };
 
267
 
 
268
    WidgetSize fbconfig_header_sizes[NUM_FBCONFIG_ATTRIBS];
 
269
 
 
270
    const char *fbconfig_tooltips[NUM_FBCONFIG_ATTRIBS] = {
 
271
        __fid_help, __vid_help, __vt_help, __bfs_help, __lvl_help,
 
272
        __bf_help,  __db_help,  __st_help,
 
273
        __rs_help,  __gs_help,  __bs_help,  __as_help,
 
274
        __aux_help, __dpt_help, __stn_help,
 
275
        __acr_help, __acg_help, __acb_help, __aca_help,
 
276
        __mvs_help, __mcs_help, __mb_help,
 
277
        __cav_help,
 
278
        __pbw_help, __pbh_help, __pbp_help,
 
279
        __trt_help, __trr_help, __trg_help,
 
280
        __trb_help, __tra_help, __tri_help
 
281
    };
 
282
 
 
283
 
 
284
    /* Create the ctk glx object */
 
285
    object = g_object_new(CTK_TYPE_GLX, NULL);
 
286
    ctk_glx = CTK_GLX(object);
 
287
 
 
288
 
 
289
    /* Cache the attribute handle */
 
290
    ctk_glx->handle = handle;
 
291
 
 
292
    /* Set container properties of the object */
 
293
    ctk_glx->ctk_config = ctk_config;
 
294
    gtk_box_set_spacing(GTK_BOX(ctk_glx), 10);
 
295
 
 
296
    /* Image banner */
 
297
 
 
298
    banner = ctk_banner_image_new(BANNER_ARTWORK_GLX);
 
299
    gtk_box_pack_start(GTK_BOX(ctk_glx), banner, FALSE, FALSE, 0);
 
300
 
 
301
    /* Determine if GLX is supported */
 
302
    ret = NvCtrlGetStringAttribute(ctk_glx->handle,
 
303
                                   NV_CTRL_STRING_GLX_SERVER_VENDOR,
 
304
                                   &glx_info_str);
 
305
    free(glx_info_str);
 
306
    if ( ret != NvCtrlSuccess ) {
 
307
        err_str = "Failed to query the GLX server vendor.";
 
308
        goto fail;
 
309
    }
 
310
 
 
311
 
 
312
    /* Information Scroll Box */
 
313
    scrollWin = gtk_scrolled_window_new(NULL, NULL);
 
314
    hbox = gtk_hbox_new(FALSE, 0);
 
315
    vbox = gtk_vbox_new(FALSE, 5);
 
316
    event = gtk_event_box_new();
 
317
    gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollWin),
 
318
                                   GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
 
319
    gtk_widget_modify_fg(event, GTK_STATE_NORMAL, &(event->style->text[GTK_STATE_NORMAL]));
 
320
    gtk_widget_modify_bg(event, GTK_STATE_NORMAL, &(event->style->base[GTK_STATE_NORMAL]));
 
321
    gtk_container_add(GTK_CONTAINER(event), hbox);
 
322
    gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollWin),
 
323
                                          event);
 
324
    gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5);
 
325
    ctk_glx->glxinfo_vpane = vbox;
 
326
    gtk_widget_set_size_request(scrollWin, -1, 50);
 
327
 
 
328
 
 
329
    /* GLX 1.3 supports frame buffer configurations */
 
330
#ifdef GLX_VERSION_1_3
 
331
 
 
332
    /* Grab the FBConfigs */
 
333
    ret = NvCtrlGetVoidAttribute(handle, NV_CTRL_ATTR_GLX_FBCONFIG_ATTRIBS,
 
334
                                 (void *)(&fbconfig_attribs));
 
335
    if ( ret != NvCtrlSuccess ) {
 
336
        err_str = "Failed to query list of GLX frame buffer configurations.";
 
337
        goto fail;
 
338
    }
 
339
 
 
340
    /* Count the number of fbconfigs */
 
341
    if ( fbconfig_attribs ) {
 
342
        for (num_fbconfigs = 0;
 
343
             fbconfig_attribs[num_fbconfigs].fbconfig_id != 0;
 
344
             num_fbconfigs++);
 
345
    }
 
346
    if ( ! num_fbconfigs ) {
 
347
        err_str = "No frame buffer configurations found.";
 
348
        
 
349
        goto fail;
 
350
    }
 
351
 
 
352
    show_fbc_button = gtk_toggle_button_new_with_label(
 
353
                          "Show GLX Frame Buffer Configurations");
 
354
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(show_fbc_button), FALSE);
 
355
    ctk_config_set_tooltip(ctk_config, show_fbc_button, __show_fbc_help);
 
356
    g_signal_connect(G_OBJECT(show_fbc_button),
 
357
                     "clicked", G_CALLBACK(show_fbc_toggled),
 
358
                     (gpointer) ctk_glx);
 
359
 
 
360
    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
 
361
    gtk_window_set_title(GTK_WINDOW(window), "GLX Frame Buffer Configurations");
 
362
    gtk_container_set_border_width(GTK_CONTAINER(window), CTK_WINDOW_PAD);
 
363
    gtk_widget_set_size_request(window, 400, 200);
 
364
    g_signal_connect(G_OBJECT(window), "destroy-event",
 
365
                     G_CALLBACK(fbc_window_destroy),
 
366
                     (gpointer) ctk_glx);
 
367
    g_signal_connect(G_OBJECT(window), "delete-event",
 
368
                     G_CALLBACK(fbc_window_destroy),
 
369
                     (gpointer) ctk_glx);
 
370
 
 
371
    ctk_glx->fbc_window = window;
 
372
    ctk_glx->show_fbc_button = show_fbc_button;
 
373
 
 
374
    hbox      = gtk_hbox_new(FALSE, 0);
 
375
    vbox      = gtk_vbox_new(FALSE, 10);
 
376
    vbox2     = gtk_vbox_new(FALSE, 10);
 
377
 
 
378
    data_viewport = gtk_viewport_new(NULL, NULL);
 
379
    gtk_widget_set_size_request(data_viewport, 400, 50);
 
380
    vscrollbar = gtk_vscrollbar_new(gtk_viewport_get_vadjustment
 
381
                                        (GTK_VIEWPORT(data_viewport)));
 
382
    
 
383
    full_viewport = gtk_viewport_new(NULL, NULL);
 
384
    gtk_widget_set_size_request(full_viewport, 400, 50);
 
385
    hscrollbar = gtk_hscrollbar_new(gtk_viewport_get_hadjustment
 
386
                                     (GTK_VIEWPORT(full_viewport)));
 
387
    /*
 
388
     * NODE: Because clists have a hard time displaying tooltips in their
 
389
     *       column labels/buttons, we make the fbconfig table using a
 
390
     *       table widget.
 
391
     */
 
392
 
 
393
    /* Create the header table */
 
394
 
 
395
    header_table = gtk_table_new(num_fbconfigs, NUM_FBCONFIG_ATTRIBS, FALSE);
 
396
    
 
397
    for ( i = 0; i < NUM_FBCONFIG_ATTRIBS; i++ ) {
 
398
        GtkWidget * btn  = gtk_button_new_with_label(fbconfig_titles[i]);
 
399
        g_signal_connect(G_OBJECT(btn), "clicked",
 
400
                         G_CALLBACK(dummy_button_signal),
 
401
                         (gpointer) ctk_glx);
 
402
        ctk_config_set_tooltip(ctk_config, btn, fbconfig_tooltips[i]);
 
403
        gtk_table_attach(GTK_TABLE(header_table), btn,  i, i+1, 0, 1,
 
404
                         GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0);
 
405
        
 
406
        fbconfig_header_sizes[i].widget = btn;
 
407
        gtk_widget_size_request(btn, &req);
 
408
        fbconfig_header_sizes[i].width = req.width;
 
409
    }
 
410
    
 
411
    /* Create the data table */
 
412
 
 
413
    data_table = gtk_table_new(num_fbconfigs, NUM_FBCONFIG_ATTRIBS, FALSE);
 
414
    event = gtk_event_box_new();
 
415
    
 
416
    gtk_widget_modify_fg(data_table, GTK_STATE_NORMAL, 
 
417
                         &(data_table->style->text[GTK_STATE_NORMAL]));
 
418
    gtk_widget_modify_bg(data_table, GTK_STATE_NORMAL, 
 
419
                         &(data_table->style->base[GTK_STATE_NORMAL]));
 
420
    gtk_container_add (GTK_CONTAINER(event), data_table);
 
421
    gtk_widget_modify_fg(event, GTK_STATE_NORMAL, 
 
422
                         &(event->style->text[GTK_STATE_NORMAL]));
 
423
    gtk_widget_modify_bg(event, GTK_STATE_NORMAL, 
 
424
                         &(event->style->base[GTK_STATE_NORMAL]));
 
425
    gtk_container_add(GTK_CONTAINER(data_viewport), event);
 
426
 
 
427
    /* Pack the fbconfig header and data tables */
 
428
 
 
429
    vbox = gtk_vbox_new(FALSE, 0);
 
430
    gtk_box_pack_start(GTK_BOX(vbox), header_table, FALSE, FALSE, 0);
 
431
    gtk_box_pack_start(GTK_BOX(vbox), data_viewport, TRUE, TRUE, 0);
 
432
    gtk_container_add (GTK_CONTAINER(full_viewport), vbox);
 
433
 
 
434
    vbox = gtk_vbox_new(FALSE, 0);
 
435
    gtk_box_pack_start(GTK_BOX(vbox), full_viewport, TRUE, TRUE, 0);
 
436
    gtk_box_pack_start(GTK_BOX(vbox), hscrollbar, FALSE, FALSE, 0);
 
437
    
 
438
    hbox = gtk_hbox_new(FALSE, 0);
 
439
    gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 0);
 
440
    gtk_box_pack_start(GTK_BOX(hbox), vscrollbar, FALSE, FALSE, 0);
 
441
    
 
442
    gtk_container_add(GTK_CONTAINER(window), hbox);
 
443
 
 
444
    vbox = gtk_vbox_new(FALSE, 0);
 
445
    gtk_box_pack_start(GTK_BOX(vbox), show_fbc_button, FALSE, FALSE, 0);
 
446
    hbox = gtk_hbox_new(FALSE, 0);
 
447
    gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0);
 
448
 
 
449
    hseparator = gtk_hseparator_new();
 
450
 
 
451
    vbox = gtk_vbox_new(FALSE, 5);
 
452
    gtk_box_pack_start(GTK_BOX(vbox), scrollWin, TRUE, TRUE, 0);
 
453
    gtk_box_pack_start(GTK_BOX(vbox), hseparator, FALSE, FALSE, 0);
 
454
    gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
 
455
 
 
456
    gtk_box_pack_start(GTK_BOX(ctk_glx), vbox, TRUE, TRUE, 0);
 
457
    
 
458
    /* Fill the data table */
 
459
 
 
460
    if ( fbconfig_attribs ) {
 
461
 
 
462
        /* Populate FBConfig table */
 
463
        i = 0;
 
464
        while ( fbconfig_attribs[i].fbconfig_id != 0 ) {
 
465
            char str[NUM_FBCONFIG_ATTRIBS + 1][16];
 
466
            int  cell = 0; /* Used for putting information into cells */
 
467
            
 
468
            if ( fbconfig_attribs[i].fbconfig_id )  {
 
469
                snprintf((char *) (&(str[cell++])), 16, "0x%02X",
 
470
                         fbconfig_attribs[i].fbconfig_id);
 
471
            } else {
 
472
                sprintf((char *) (&(str[cell++])),".");
 
473
            }
 
474
            
 
475
            if ( fbconfig_attribs[i].visual_id )  {
 
476
                snprintf((char *) (&(str[cell++])), 16, "0x%02X",
 
477
                         fbconfig_attribs[i].visual_id);
 
478
            } else {
 
479
                sprintf((char *) (&(str[cell++])),".");
 
480
            }
 
481
            snprintf((char *) (&(str[cell++])), 16, "%s",
 
482
                     x_visual_type_abbrev(fbconfig_attribs[i].x_visual_type));
 
483
            snprintf((char *) (&(str[cell++])), 16, "%3d",
 
484
                     fbconfig_attribs[i].buffer_size);
 
485
            snprintf((char *) (&(str[cell++])), 16, "%2d",
 
486
                     fbconfig_attribs[i].level);
 
487
            snprintf((char *) (&(str[cell++])), 16, "%s",
 
488
                     render_type_abbrev(fbconfig_attribs[i].render_type) );
 
489
            snprintf((char *) (&(str[cell++])), 16, "%c",
 
490
                     fbconfig_attribs[i].doublebuffer ? 'y' : '.');
 
491
            snprintf((char *) (&(str[cell++])), 16, "%c",
 
492
                     fbconfig_attribs[i].stereo ? 'y' : '.');
 
493
            snprintf((char *) (&(str[cell++])), 16, "%2d",
 
494
                     fbconfig_attribs[i].red_size);
 
495
            snprintf((char *) (&(str[cell++])), 16, "%2d",
 
496
                     fbconfig_attribs[i].green_size);
 
497
            snprintf((char *) (&(str[cell++])), 16, "%2d",
 
498
                     fbconfig_attribs[i].blue_size);
 
499
            snprintf((char *) (&(str[cell++])), 16, "%2d",
 
500
                     fbconfig_attribs[i].alpha_size);
 
501
            snprintf((char *) (&(str[cell++])), 16, "%2d",
 
502
                     fbconfig_attribs[i].aux_buffers);
 
503
            snprintf((char *) (&(str[cell++])), 16, "%2d",
 
504
                     fbconfig_attribs[i].depth_size);
 
505
            snprintf((char *) (&(str[cell++])), 16, "%2d",
 
506
                     fbconfig_attribs[i].stencil_size);
 
507
            snprintf((char *) (&(str[cell++])), 16, "%2d",
 
508
                     fbconfig_attribs[i].accum_red_size);
 
509
            snprintf((char *) (&(str[cell++])), 16, "%2d",
 
510
                     fbconfig_attribs[i].accum_green_size);
 
511
            snprintf((char *) (&(str[cell++])), 16, "%2d",
 
512
                     fbconfig_attribs[i].accum_blue_size);
 
513
            snprintf((char *) (&(str[cell++])), 16, "%2d",
 
514
                     fbconfig_attribs[i].accum_alpha_size);
 
515
            if (fbconfig_attribs[i].multi_sample_valid) {
 
516
                snprintf((char *) (&(str[cell++])), 16, "%2d",
 
517
                         fbconfig_attribs[i].multi_samples);
 
518
                if (fbconfig_attribs[i].multi_sample_coverage_valid) {
 
519
                    snprintf((char *) (&(str[cell++])), 16, "%2d",
 
520
                             fbconfig_attribs[i].multi_samples_color);
 
521
                } else {
 
522
                    snprintf((char *) (&(str[cell++])), 16, "%2d",
 
523
                             fbconfig_attribs[i].multi_samples);
 
524
                }
 
525
            } else {
 
526
                snprintf((char *) (&(str[cell++])), 16, " 0");
 
527
                snprintf((char *) (&(str[cell++])), 16, " 0");
 
528
            }
 
529
            snprintf((char *) (&(str[cell++])), 16, "%1d",
 
530
                     fbconfig_attribs[i].multi_sample_buffers);
 
531
            snprintf((char *) (&(str[cell++])), 16, "%s",
 
532
                     caveat_abbrev( fbconfig_attribs[i].config_caveat) );
 
533
            snprintf((char *) (&(str[cell++])), 16, "0x%04X",
 
534
                     fbconfig_attribs[i].pbuffer_width);
 
535
            snprintf((char *) (&(str[cell++])), 16, "0x%04X",
 
536
                     fbconfig_attribs[i].pbuffer_height);
 
537
            snprintf((char *) (&(str[cell++])), 16, "0x%07X",
 
538
                     fbconfig_attribs[i].pbuffer_max);
 
539
            snprintf((char *) (&(str[cell++])), 16, "%s",
 
540
                     transparent_type_abbrev(fbconfig_attribs[i].transparent_type));
 
541
            snprintf((char *) (&(str[cell++])), 16, "%3d",
 
542
                     fbconfig_attribs[i].transparent_red_value);
 
543
            snprintf((char *) (&(str[cell++])), 16, "%3d",
 
544
                     fbconfig_attribs[i].transparent_green_value);
 
545
            snprintf((char *) (&(str[cell++])), 16, "%3d",
 
546
                     fbconfig_attribs[i].transparent_blue_value);
 
547
            snprintf((char *) (&(str[cell++])), 16, "%3d",
 
548
                     fbconfig_attribs[i].transparent_alpha_value);
 
549
            snprintf((char *) (&(str[cell++])), 16, "%3d",
 
550
                     fbconfig_attribs[i].transparent_index_value);
 
551
            str[NUM_FBCONFIG_ATTRIBS][0] = '\0';
 
552
        
 
553
            /* Populate row cells */
 
554
            for ( cell = 0; cell < NUM_FBCONFIG_ATTRIBS ; cell++) {
 
555
                GtkWidget * label = gtk_label_new( str[cell] );
 
556
                gtk_label_set_justify( GTK_LABEL(label), GTK_JUSTIFY_CENTER);
 
557
                gtk_table_attach(GTK_TABLE(data_table), label,
 
558
                                 cell, cell+1, 
 
559
                                 i+1, i+2,
 
560
                                 GTK_EXPAND, GTK_EXPAND, 0, 0);
 
561
 
 
562
                /* Make sure the table headers are the same width
 
563
                 * as their table data column
 
564
                 */
 
565
                gtk_widget_size_request(label, &req);
 
566
                
 
567
                if ( fbconfig_header_sizes[cell].width > req.width ) {
 
568
                    gtk_widget_set_size_request(label,
 
569
                                                fbconfig_header_sizes[cell].width,
 
570
                                                -1);
 
571
                } else if ( fbconfig_header_sizes[cell].width < req.width ) {
 
572
                    fbconfig_header_sizes[cell].width = req.width + 6;
 
573
                    gtk_widget_set_size_request(fbconfig_header_sizes[cell].widget,
 
574
                                                fbconfig_header_sizes[cell].width,
 
575
                                                -1);
 
576
                }
 
577
            }
 
578
            i++;
 
579
 
 
580
        } /* Done - Populating FBconfig table */
 
581
 
 
582
 
 
583
        free(fbconfig_attribs);
 
584
 
 
585
    } /* Done - FBConfigs exist */
 
586
        
 
587
#endif /* GLX_VERSION_1_3 */
 
588
 
 
589
 
 
590
    gtk_widget_show_all(GTK_WIDGET(object));
 
591
 
 
592
    return GTK_WIDGET(object);
 
593
 
 
594
 
 
595
    /* Failure (no GLX) */
 
596
 fail:
 
597
    if (err_str) {
 
598
        label = gtk_label_new(err_str);
 
599
        gtk_label_set_selectable(GTK_LABEL(label), TRUE);
 
600
 
 
601
        gtk_container_add(GTK_CONTAINER(ctk_glx), label);
 
602
    }
 
603
 
 
604
    /* Free memory that may have been allocated */
 
605
    free(fbconfig_attribs);
 
606
    
 
607
    gtk_widget_show_all(GTK_WIDGET(object));
 
608
    return GTK_WIDGET(object);
 
609
 
 
610
} /* ctk_glx_new */
 
611
 
 
612
 
 
613
 
 
614
 
 
615
/* Probes for GLX information and sets up the results
 
616
 * in the GLX widget.
 
617
 */
 
618
void ctk_glx_probe_info(GtkWidget *widget)
 
619
{
 
620
    CtkGLX *ctk_glx = CTK_GLX(widget);
 
621
 
 
622
    ReturnStatus ret;
 
623
 
 
624
    char *direct_rendering  = NULL;
 
625
    char *glx_extensions    = NULL;
 
626
    char *server_vendor     = NULL;
 
627
    char *server_version    = NULL;
 
628
    char *server_extensions = NULL;
 
629
    char *client_vendor     = NULL;
 
630
    char *client_version    = NULL;
 
631
    char *client_extensions = NULL;
 
632
    char *opengl_vendor     = NULL;
 
633
    char *opengl_renderer   = NULL;
 
634
    char *opengl_version    = NULL;
 
635
    char *opengl_extensions = NULL;
 
636
    char *ptr;
 
637
 
 
638
    GtkWidget *hseparator;
 
639
    GtkWidget *hbox, *hbox2;
 
640
    GtkWidget *vbox, *vbox2;
 
641
    GtkWidget *label;
 
642
    GtkWidget *table;
 
643
 
 
644
 
 
645
    /* Make sure the widget was initialized and that glx information
 
646
     * has not yet been initialized.
 
647
     */
 
648
    if ( !ctk_glx || !ctk_glx->glxinfo_vpane ||
 
649
         ctk_glx->glxinfo_initialized ) {
 
650
        return;
 
651
    }
 
652
 
 
653
 
 
654
    /* Get GLX information */
 
655
    ret = NvCtrlGetStringAttribute(ctk_glx->handle,
 
656
                                   NV_CTRL_STRING_GLX_DIRECT_RENDERING,
 
657
                                   &direct_rendering);
 
658
    if ( ret != NvCtrlSuccess ) { goto done; }
 
659
    ret = NvCtrlGetStringAttribute(ctk_glx->handle,
 
660
                                   NV_CTRL_STRING_GLX_GLX_EXTENSIONS,
 
661
                                   &glx_extensions);
 
662
    if ( ret != NvCtrlSuccess ) { goto done; }
 
663
 
 
664
 
 
665
    /* Get Server GLX information */
 
666
    ret = NvCtrlGetStringAttribute(ctk_glx->handle,
 
667
                                   NV_CTRL_STRING_GLX_SERVER_VENDOR,
 
668
                                   &server_vendor);
 
669
    if ( ret != NvCtrlSuccess ) { goto done; }
 
670
    ret = NvCtrlGetStringAttribute(ctk_glx->handle,
 
671
                                   NV_CTRL_STRING_GLX_SERVER_VERSION,
 
672
                                   &server_version);
 
673
    if ( ret != NvCtrlSuccess ) { goto done; }
 
674
    ret = NvCtrlGetStringAttribute(ctk_glx->handle,
 
675
                                   NV_CTRL_STRING_GLX_SERVER_EXTENSIONS,
 
676
                                   &server_extensions);
 
677
    if ( ret != NvCtrlSuccess ) { goto done; }
 
678
 
 
679
 
 
680
    /* Get Client GLX information */
 
681
    ret = NvCtrlGetStringAttribute(ctk_glx->handle,
 
682
                                   NV_CTRL_STRING_GLX_CLIENT_VENDOR,
 
683
                                   &client_vendor);
 
684
    if ( ret != NvCtrlSuccess ) { goto done; }
 
685
    ret = NvCtrlGetStringAttribute(ctk_glx->handle,
 
686
                                   NV_CTRL_STRING_GLX_CLIENT_VERSION,
 
687
                                   &client_version);
 
688
    if ( ret != NvCtrlSuccess ) { goto done; }
 
689
    ret = NvCtrlGetStringAttribute(ctk_glx->handle,
 
690
                                   NV_CTRL_STRING_GLX_CLIENT_EXTENSIONS,
 
691
                                   &client_extensions);
 
692
    if ( ret != NvCtrlSuccess ) { goto done; }
 
693
 
 
694
 
 
695
    /* Get OpenGL information */
 
696
    ret = NvCtrlGetStringAttribute(ctk_glx->handle,
 
697
                                   NV_CTRL_STRING_GLX_OPENGL_VENDOR,
 
698
                                   &opengl_vendor);
 
699
    if ( ret != NvCtrlSuccess ) { goto done; }
 
700
    ret = NvCtrlGetStringAttribute(ctk_glx->handle,
 
701
                                   NV_CTRL_STRING_GLX_OPENGL_RENDERER,
 
702
                                   &opengl_renderer);
 
703
    if ( ret != NvCtrlSuccess ) { goto done; }
 
704
    ret = NvCtrlGetStringAttribute(ctk_glx->handle,
 
705
                                   NV_CTRL_STRING_GLX_OPENGL_VERSION,
 
706
                                   &opengl_version);
 
707
    if ( ret != NvCtrlSuccess ) { goto done; }
 
708
    ret = NvCtrlGetStringAttribute(ctk_glx->handle,
 
709
                                   NV_CTRL_STRING_GLX_OPENGL_EXTENSIONS,
 
710
                                   &opengl_extensions);
 
711
    if ( ret != NvCtrlSuccess ) { goto done; }
 
712
 
 
713
 
 
714
    /* Modify extension lists so they show only one name per line */
 
715
    for ( ptr = glx_extensions; ptr != NULL && ptr[0] != '\0'; ptr++ ) {
 
716
        if ( ptr[0] == ' ' ) ptr[0] = '\n';
 
717
    }
 
718
    for ( ptr = server_extensions; ptr != NULL && ptr[0] != '\0'; ptr++ ) {
 
719
        if ( ptr[0] == ' ' ) ptr[0] = '\n';
 
720
    }
 
721
    for ( ptr = client_extensions; ptr != NULL && ptr[0] != '\0'; ptr++ ) {
 
722
        if ( ptr[0] == ' ' ) ptr[0] = '\n';
 
723
    }
 
724
    for ( ptr = opengl_extensions; ptr != NULL && ptr[0] != '\0'; ptr++ ) {
 
725
        if ( ptr[0] == ' ' ) ptr[0] = '\n';
 
726
    }
 
727
 
 
728
 
 
729
    /* Add (Shared) GLX information to widget */
 
730
    vbox       = ctk_glx->glxinfo_vpane;
 
731
    vbox2      = gtk_vbox_new(FALSE, 0);
 
732
    hbox       = gtk_hbox_new(FALSE, 0);
 
733
    label      = gtk_label_new("GLX Information");
 
734
    hseparator = gtk_hseparator_new();
 
735
    gtk_box_pack_start(GTK_BOX(vbox), vbox2, TRUE, TRUE, 2);
 
736
    gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
 
737
    gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
 
738
    gtk_box_pack_start(GTK_BOX(hbox), hseparator, TRUE, TRUE, 5);
 
739
 
 
740
    hbox  = gtk_hbox_new(FALSE, 0);
 
741
    hbox2 = gtk_hbox_new(FALSE, 0);
 
742
    table = gtk_table_new(2, 2, FALSE);
 
743
    gtk_table_set_row_spacings(GTK_TABLE(table), 3);
 
744
    gtk_table_set_col_spacings(GTK_TABLE(table), 15);
 
745
    add_table_row(table, 0,
 
746
                  0, 0, "Direct Rendering:",
 
747
                  0, 0,  direct_rendering);
 
748
    add_table_row(table, 1,
 
749
                  0, 0, "GLX Extensions:",
 
750
                  0, 0,  glx_extensions);
 
751
    gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
 
752
    gtk_box_pack_start(GTK_BOX(hbox), hbox2, FALSE, FALSE, 5);
 
753
    gtk_box_pack_start(GTK_BOX(hbox), table, FALSE, FALSE, 0);
 
754
 
 
755
 
 
756
    /* Add server GLX information to widget */   
 
757
    hbox       = gtk_hbox_new(FALSE, 0);
 
758
    label      = gtk_label_new("Server GLX Information");
 
759
    hseparator = gtk_hseparator_new();
 
760
    gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
 
761
    gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
 
762
    gtk_box_pack_start(GTK_BOX(hbox), hseparator, TRUE, TRUE, 5);
 
763
 
 
764
    hbox  = gtk_hbox_new(FALSE, 0);
 
765
    hbox2 = gtk_hbox_new(FALSE, 0);
 
766
    table = gtk_table_new(3, 2, FALSE);
 
767
    gtk_table_set_row_spacings(GTK_TABLE(table), 3);
 
768
    gtk_table_set_col_spacings(GTK_TABLE(table), 15);
 
769
    add_table_row(table, 0,
 
770
                  0, 0, "Vendor:",
 
771
                  0, 0, server_vendor);
 
772
    add_table_row(table, 1,
 
773
                  0, 0, "Version:",
 
774
                  0, 0, server_version);
 
775
    add_table_row(table, 2,
 
776
                  0, 0, "Extensions:",
 
777
                  0, 0, server_extensions);
 
778
    gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
 
779
    gtk_box_pack_start(GTK_BOX(hbox), hbox2, FALSE, FALSE, 5);
 
780
    gtk_box_pack_start(GTK_BOX(hbox), table, FALSE, FALSE, 0);
 
781
 
 
782
 
 
783
    /* Add client GLX information to widget */
 
784
    hbox       = gtk_hbox_new(FALSE, 0);
 
785
    label      = gtk_label_new("Client GLX Information");
 
786
    hseparator = gtk_hseparator_new();
 
787
    gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
 
788
    gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
 
789
    gtk_box_pack_start(GTK_BOX(hbox), hseparator, TRUE, TRUE, 5);
 
790
 
 
791
    hbox  = gtk_hbox_new(FALSE, 0);
 
792
    hbox2 = gtk_hbox_new(FALSE, 0);
 
793
    table = gtk_table_new(3, 2, FALSE);
 
794
    gtk_table_set_row_spacings(GTK_TABLE(table), 3);
 
795
    gtk_table_set_col_spacings(GTK_TABLE(table), 15);
 
796
    add_table_row(table, 0,
 
797
                  0, 0, "Vendor:",
 
798
                  0, 0, client_vendor);
 
799
    add_table_row(table, 1,
 
800
                  0, 0, "Version:",
 
801
                  0, 0, client_version);
 
802
    add_table_row(table, 2,
 
803
                  0, 0, "Extensions:",
 
804
                  0, 0, client_extensions);
 
805
    gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
 
806
    gtk_box_pack_start(GTK_BOX(hbox), hbox2, FALSE, FALSE, 5);
 
807
    gtk_box_pack_start(GTK_BOX(hbox), table, FALSE, FALSE, 0);
 
808
    
 
809
 
 
810
    /* Add OpenGL information to widget */
 
811
    hbox       = gtk_hbox_new(FALSE, 0);
 
812
    label      = gtk_label_new("OpenGL Information");
 
813
    hseparator = gtk_hseparator_new();
 
814
    gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
 
815
    gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
 
816
    gtk_box_pack_start(GTK_BOX(hbox), hseparator, TRUE, TRUE, 5);
 
817
 
 
818
    hbox  = gtk_hbox_new(FALSE, 0);
 
819
    hbox2 = gtk_hbox_new(FALSE, 0);
 
820
    table = gtk_table_new(4, 2, FALSE);
 
821
    vbox2 = gtk_vbox_new(FALSE, 0);
 
822
    gtk_table_set_row_spacings(GTK_TABLE(table), 3);
 
823
    gtk_table_set_col_spacings(GTK_TABLE(table), 15);
 
824
    add_table_row(table, 0,
 
825
                  0, 0, "Vendor:",
 
826
                  0, 0, opengl_vendor);
 
827
    add_table_row(table, 1,
 
828
                  0, 0, "Renderer:",
 
829
                  0, 0, opengl_renderer);
 
830
    add_table_row(table, 2,
 
831
                  0, 0, "Version:",
 
832
                  0, 0, opengl_version);
 
833
    add_table_row(table, 3,
 
834
                  0, 0, "Extensions:",
 
835
                  0, 0, opengl_extensions);
 
836
    gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
 
837
    gtk_box_pack_start(GTK_BOX(hbox), hbox2, FALSE, FALSE, 5);
 
838
    gtk_box_pack_start(GTK_BOX(hbox), table, FALSE, FALSE, 0);
 
839
    gtk_box_pack_start(GTK_BOX(vbox), vbox2, TRUE, TRUE, 2);
 
840
 
 
841
 
 
842
    /* Show the information */
 
843
    gtk_widget_show_all(GTK_WIDGET(ctk_glx));
 
844
 
 
845
    ctk_glx->glxinfo_initialized = True;
 
846
 
 
847
    /* Fall through */
 
848
 done:
 
849
 
 
850
    /* Free temp strings */
 
851
    free(direct_rendering);
 
852
    free(glx_extensions);
 
853
    free(server_vendor);
 
854
    free(server_version);
 
855
    free(server_extensions);
 
856
    free(client_vendor);
 
857
    free(client_version);
 
858
    free(client_extensions);
 
859
    free(opengl_vendor);
 
860
    free(opengl_renderer);
 
861
    free(opengl_version);
 
862
    free(opengl_extensions);
 
863
    
 
864
} /* ctk_glx_probe_info() */
 
865
 
 
866
 
 
867
 
 
868
GtkTextBuffer *ctk_glx_create_help(GtkTextTagTable *table,
 
869
                                   CtkGLX *ctk_glx)
 
870
{
 
871
    GtkTextIter i;
 
872
    GtkTextBuffer *b;
 
873
 
 
874
    b = gtk_text_buffer_new(table);
 
875
    
 
876
    gtk_text_buffer_get_iter_at_offset(b, &i, 0);
 
877
 
 
878
    ctk_help_title(b, &i, "GLX Help");
 
879
    ctk_help_para(b, &i,
 
880
                  "This page in the NVIDIA X Server Control Panel describes "
 
881
                  "information about the OpenGL extension to the X Server "
 
882
                  "(GLX)."
 
883
                  );
 
884
 
 
885
    ctk_help_heading(b, &i, "Direct Rendering");
 
886
    ctk_help_para(b, &i,
 
887
                  "This will tell you if direct rendering is available.  If "
 
888
                  "direct rendering is available, then a program running on "
 
889
                  "the same computer that the control panel is running on "
 
890
                  "will be able to bypass the X Server and take advantage of "
 
891
                  "faster rendering.  If direct rendering is not available, "
 
892
                  "then indirect rendering will be used and all rendering "
 
893
                  "will happen through the X Server."
 
894
                  );
 
895
    ctk_help_heading(b, &i, "GLX Extensions");
 
896
    ctk_help_para(b, &i,
 
897
                  "This is the list of GLX extensions that are supported by "
 
898
                  "both the client (libraries) and server (GLX extension to "
 
899
                  "the X Server)."
 
900
                  );
 
901
 
 
902
    ctk_help_heading(b, &i, "Server GLX Vendor String");
 
903
    ctk_help_para(b, &i,
 
904
                  "This is the vendor supplying the GLX extension running on "
 
905
                  "the X Server."
 
906
                  );
 
907
    ctk_help_heading(b, &i, "Server GLX Version String");
 
908
    ctk_help_para(b, &i,
 
909
                  "This is the version of the GLX extension running on the X "
 
910
                  "Server."
 
911
                  );
 
912
    ctk_help_heading(b, &i, "Server GLX Extensions");
 
913
    ctk_help_para(b, &i,
 
914
                  "This is the list of extensions supported by the GLX "
 
915
                  "extension running on the X Server."
 
916
                  );
 
917
 
 
918
    ctk_help_heading(b, &i, "Client GLX Vendor String");
 
919
    ctk_help_para(b, &i,
 
920
                  "This is the vendor supplying the GLX libraries."
 
921
                  );
 
922
    ctk_help_heading(b, &i, "Client GLX Version String");
 
923
    ctk_help_para(b, &i,
 
924
                  "This is the version of the GLX libraries."
 
925
                  );
 
926
    ctk_help_heading(b, &i, "Client GLX Extensions");
 
927
    ctk_help_para(b, &i,
 
928
                  "This is the list of extensions supported by the GLX "
 
929
                  "libraries."
 
930
                  );
 
931
 
 
932
    ctk_help_heading(b, &i, "OpenGL Vendor String");
 
933
    ctk_help_para(b, &i,
 
934
                  "This is the name of the vendor providing the OpenGL "
 
935
                  "implementation."
 
936
                 );
 
937
    ctk_help_heading(b, &i, "OpenGL Renderer String");
 
938
    ctk_help_para(b, &i,
 
939
                  "This shows the details of the graphics card on which "
 
940
                  "OpenGL is running."
 
941
                 );
 
942
    ctk_help_heading(b, &i, "OpenGL Version String");
 
943
    ctk_help_para(b, &i,
 
944
                  "This is the version of the OpenGL implementation."
 
945
                 );
 
946
    ctk_help_heading(b, &i, "OpenGL Extensions");
 
947
    ctk_help_para(b, &i,
 
948
                  "This is the list of OpenGL extensions that are supported "
 
949
                  "by this driver."
 
950
                 );
 
951
 
 
952
    ctk_help_heading(b, &i, "Show GLX Frame Buffer Configurations");
 
953
    ctk_help_para(b, &i, __show_fbc_help);
 
954
 
 
955
    ctk_help_heading(b, &i, "GLX Frame Buffer Configurations");
 
956
    ctk_help_para(b, &i, "This table lists the supported frame buffer "
 
957
                  "configurations for the display.");
 
958
    ctk_help_para(b, &i,
 
959
                  "\t%s\n\n"
 
960
                  "\t%s\n\n"
 
961
                  "\t%s\n\n"
 
962
                  "\t%s\n\n"
 
963
                  "\t%s\n\n"
 
964
                  "\t%s\n\n"
 
965
                  "\t%s\n\n"
 
966
                  "\t%s\n\n"
 
967
                  "\t%s\n\n"
 
968
                  "\t%s\n\n"
 
969
                  "\t%s\n\n"
 
970
 
 
971
                  "\t%s\n\n"
 
972
                  "\t%s\n\n"
 
973
                  "\t%s\n\n"
 
974
                  "\t%s\n\n"
 
975
                  "\t%s\n\n"
 
976
                  "\t%s\n\n"
 
977
                  "\t%s\n\n"
 
978
                  "\t%s\n\n"
 
979
                  "\t%s\n\n"
 
980
                  "\t%s\n\n"
 
981
                  "\t%s\n\n"
 
982
 
 
983
                  "\t%s\n\n"
 
984
                  "\t%s\n\n"
 
985
                  "\t%s\n\n"
 
986
                  "\t%s\n\n"
 
987
                  "\t%s\n\n"
 
988
                  "\t%s\n\n"
 
989
                  "\t%s\n\n"
 
990
                  "\t%s\n\n"
 
991
                  "\t%s\n\n"
 
992
                  "\t%s\n\n",
 
993
 
 
994
                  __fid_help,
 
995
                  __vid_help,
 
996
                  __vt_help,
 
997
                  __bfs_help,
 
998
                  __lvl_help,
 
999
                  __bf_help,
 
1000
                  __db_help,
 
1001
                  __st_help,
 
1002
                  __rs_help,
 
1003
                  __gs_help,
 
1004
                  __bs_help,
 
1005
 
 
1006
                  __as_help,
 
1007
                  __aux_help,
 
1008
                  __dpt_help,
 
1009
                  __stn_help,
 
1010
                  __acr_help,
 
1011
                  __acg_help,
 
1012
                  __acb_help,
 
1013
                  __aca_help,
 
1014
                  __mvs_help,
 
1015
                  __mcs_help,
 
1016
                  __mb_help,
 
1017
 
 
1018
                  __cav_help,
 
1019
                  __pbw_help,
 
1020
                  __pbh_help,
 
1021
                  __pbp_help,
 
1022
                  __trt_help,
 
1023
                  __trr_help,
 
1024
                  __trg_help,
 
1025
                  __trb_help,
 
1026
                  __tra_help,
 
1027
                  __tri_help
 
1028
                 );
 
1029
 
 
1030
    ctk_help_finish(b);
 
1031
 
 
1032
    return b;
 
1033
 
 
1034
} /* ctk_glx_create_help() */
 
1035
 
 
1036