[gtk+] inspector: Add more GL information



commit 592a0d46b43d70d8e67cc57e8670e97feb9f6a66
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Nov 8 02:16:35 2014 -0500

    inspector: Add more GL information
    
    Add version and extension information to the general tab.

 gtk/inspector/general.c    |  198 +++++++++++++++-
 gtk/inspector/general.h    |    6 +-
 gtk/inspector/general.ui   |  568 +++++++++++++++++++++++++------------------
 gtk/inspector/general.ui.h |    2 +
 4 files changed, 530 insertions(+), 244 deletions(-)
---
diff --git a/gtk/inspector/general.c b/gtk/inspector/general.c
index 8e30189..c7c726f 100644
--- a/gtk/inspector/general.c
+++ b/gtk/inspector/general.c
@@ -26,9 +26,14 @@
 #include "gtkswitch.h"
 #include "gtklistbox.h"
 #include "gtkprivate.h"
+#include "gtksizegroup.h"
+#include "gtkimage.h"
+#include "gtkadjustment.h"
+#include "gtkbox.h"
 
 #ifdef GDK_WINDOWING_X11
 #include "x11/gdkx.h"
+#include <epoxy/glx.h>
 #endif
 
 #ifdef GDK_WINDOWING_WIN32
@@ -41,18 +46,22 @@
 
 #ifdef GDK_WINDOWING_WAYLAND
 #include "wayland/gdkwayland.h"
+#include <epoxy/egl.h>
 #endif
 
 #ifdef GDK_WINDOWING_BROADWAY
 #include "broadway/gdkbroadway.h"
 #endif
 
-
 struct _GtkInspectorGeneralPrivate
 {
+  GtkWidget *version_box;
+  GtkWidget *env_box;
+  GtkWidget *gl_box;
   GtkWidget *gtk_version;
   GtkWidget *gdk_backend;
-
+  GtkWidget *gl_version;
+  GtkWidget *gl_vendor;
   GtkWidget *prefix;
   GtkWidget *xdg_data_home;
   GtkWidget *xdg_data_dirs;
@@ -60,9 +69,11 @@ struct _GtkInspectorGeneralPrivate
   GtkWidget *gtk_exe_prefix;
   GtkWidget *gtk_data_prefix;
   GtkWidget *gsettings_schema_dir;
+  GtkSizeGroup *labels;
+  GtkAdjustment *focus_adjustment;
 };
 
-G_DEFINE_TYPE_WITH_PRIVATE (GtkInspectorGeneral, gtk_inspector_general, GTK_TYPE_BOX)
+G_DEFINE_TYPE_WITH_PRIVATE (GtkInspectorGeneral, gtk_inspector_general, GTK_TYPE_SCROLLED_WINDOW)
 
 static void
 init_version (GtkInspectorGeneral *gen)
@@ -104,6 +115,115 @@ init_version (GtkInspectorGeneral *gen)
 }
 
 static void
+append_extension_row (GtkInspectorGeneral *gen,
+                      const gchar         *ext,
+                      gboolean             have_ext)
+{
+  GtkWidget *row, *box, *label, *check;
+
+  row = gtk_list_box_row_new ();
+  box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 40);
+  g_object_set (box, "margin", 10, NULL);
+  gtk_container_add (GTK_CONTAINER (row), box);
+  label = gtk_label_new (ext);
+  gtk_widget_set_halign (label, GTK_ALIGN_START);
+  gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
+  gtk_label_set_xalign (GTK_LABEL (label), 0.0);
+  gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
+  check = gtk_image_new_from_icon_name ("object-select-symbolic", GTK_ICON_SIZE_MENU);
+  gtk_widget_set_halign (check, GTK_ALIGN_END);
+  gtk_widget_set_valign (check, GTK_ALIGN_BASELINE);
+  gtk_widget_set_opacity (check, have_ext ? 1.0 : 0.0);
+  gtk_box_pack_start (GTK_BOX (box), check, TRUE, TRUE, 0);
+  gtk_widget_show_all (row);
+  gtk_list_box_insert (GTK_LIST_BOX (gen->priv->gl_box), row, -1);
+
+  gtk_size_group_add_widget (GTK_SIZE_GROUP (gen->priv->labels), label);
+}
+
+#ifdef GDK_WINDOWING_X11
+static void
+append_glx_extension_row (GtkInspectorGeneral *gen,
+                          Display             *dpy,
+                          const gchar         *ext)
+{
+  append_extension_row (gen, ext, epoxy_has_glx_extension (dpy, 0, ext));
+}
+#endif
+
+#ifdef GDK_WINDOWING_WAYLAND
+static void
+append_egl_extension_row (GtkInspectorGeneral *gen,
+                          EGLDisplay          *dpy,
+                          const gchar         *ext)
+{
+  append_extension_row (gen, ext, epoxy_has_egl_extension (dpy, ext));
+}
+#endif
+
+static void
+init_gl (GtkInspectorGeneral *gen)
+{
+  GdkDisplay *display;
+  gchar *version;
+
+  display = gdk_display_get_default ();
+
+#ifdef GDK_WINDOWING_X11
+  if (GDK_IS_X11_DISPLAY (display))
+    {
+      Display *dpy = GDK_DISPLAY_XDISPLAY (display);
+      int error_base, event_base;
+
+      if (!glXQueryExtension (dpy, &error_base, &event_base))
+        return;
+
+      version = g_strconcat ("GLX ", glXGetClientString (dpy, GLX_VERSION), NULL);
+      gtk_label_set_text (GTK_LABEL (gen->priv->gl_version), version);
+      g_free (version);
+      gtk_label_set_text (GTK_LABEL (gen->priv->gl_vendor), glXGetClientString (dpy, GLX_VENDOR));
+
+      append_glx_extension_row (gen, dpy, "GLX_ARB_create_context_profile");
+      append_glx_extension_row (gen, dpy, "GLX_SGI_swap_control");
+      append_glx_extension_row (gen, dpy, "GLX_EXT_texture_from_pixmap");
+      append_glx_extension_row (gen, dpy, "GLX_SGI_video_sync");
+      append_glx_extension_row (gen, dpy, "GLX_EXT_buffer_age");
+      append_glx_extension_row (gen, dpy, "GLX_OML_sync_control");
+      append_glx_extension_row (gen, dpy, "GLX_ARB_multisample");
+      append_glx_extension_row (gen, dpy, "GLX_EXT_visual_rating");
+    }
+  else
+#endif
+#ifdef GDK_WINDOWING_WAYLAND
+  if (GDK_IS_WAYLAND_DISPLAY (display))
+    {
+      EGLDisplay *dpy;
+      EGLint major, minor;
+
+      dpy = eglGetDisplay ((EGLNativeDisplayType)gdk_wayland_display_get_wl_display (display));
+
+      if (!eglInitialize (dpy, &major, &minor))
+        return;
+
+      version = g_strconcat ("EGL ", eglQueryString (dpy, EGL_VERSION), NULL);
+      gtk_label_set_text (GTK_LABEL (gen->priv->gl_version), version);
+      g_free (version);
+      gtk_label_set_text (GTK_LABEL (gen->priv->gl_vendor), eglQueryString (dpy, EGL_VENDOR));
+
+      append_egl_extension_row (gen, dpy, "EGL_KHR_create_context");
+      append_egl_extension_row (gen, dpy, "EGL_EXT_buffer_age");
+      append_egl_extension_row (gen, dpy, "EGL_EXT_swap_buffers_with_damage");
+      append_egl_extension_row (gen, dpy, "EGL_KHR_surfaceless_context");
+    }
+  else
+#endif
+    {
+      gtk_label_set_text (GTK_LABEL (gen->priv->gl_version), _("None"));
+      gtk_label_set_text (GTK_LABEL (gen->priv->gl_vendor), _("None"));
+    }
+}
+
+static void
 set_monospace_font (GtkWidget *w)
 {
   PangoAttrList *attrs;
@@ -154,17 +274,88 @@ gtk_inspector_general_init (GtkInspectorGeneral *gen)
   gen->priv = gtk_inspector_general_get_instance_private (gen);
   gtk_widget_init_template (GTK_WIDGET (gen));
   init_version (gen);
+  init_gl (gen);
   init_env (gen);
 }
 
+static gboolean
+keynav_failed (GtkWidget *widget, GtkDirectionType direction, GtkInspectorGeneral *gen)
+{
+  GtkWidget *next;
+  gdouble value, lower, upper, page;
+
+  if (direction == GTK_DIR_DOWN &&
+      widget == gen->priv->version_box)
+    next = gen->priv->env_box;
+  else if (direction == GTK_DIR_DOWN &&
+      widget == gen->priv->env_box)
+    next = gen->priv->gl_box;
+  else if (direction == GTK_DIR_UP &&
+           widget == gen->priv->env_box)
+    next = gen->priv->version_box;
+  else if (direction == GTK_DIR_UP &&
+           widget == gen->priv->gl_box)
+    next = gen->priv->env_box;
+  else
+    next = NULL;
+
+  if (next)
+    {
+      gtk_widget_child_focus (next, direction);
+      return TRUE;
+    }
+
+  value = gtk_adjustment_get_value (gen->priv->focus_adjustment);
+  lower = gtk_adjustment_get_lower (gen->priv->focus_adjustment);
+  upper = gtk_adjustment_get_upper (gen->priv->focus_adjustment);
+  page  = gtk_adjustment_get_page_size (gen->priv->focus_adjustment);
+
+  if (direction == GTK_DIR_UP && value > lower)
+    {
+      gtk_adjustment_set_value (gen->priv->focus_adjustment, lower);
+      return TRUE;
+    }
+  else if (direction == GTK_DIR_DOWN && value < upper - page)
+    {
+      gtk_adjustment_set_value (gen->priv->focus_adjustment, upper - page);
+      return TRUE;
+    }
+
+  return FALSE;
+}
+
+static void
+gtk_inspector_general_constructed (GObject *object)
+{
+  GtkInspectorGeneral *gen = GTK_INSPECTOR_GENERAL (object);
+
+  G_OBJECT_CLASS (gtk_inspector_general_parent_class)->constructed (object);
+
+  gen->priv->focus_adjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (gen));
+  gtk_container_set_focus_vadjustment (GTK_CONTAINER (gtk_bin_get_child (GTK_BIN (gen))),
+                                       gen->priv->focus_adjustment);
+
+   g_signal_connect (gen->priv->version_box, "keynav-failed", G_CALLBACK (keynav_failed), gen);
+   g_signal_connect (gen->priv->env_box, "keynav-failed", G_CALLBACK (keynav_failed), gen);
+   g_signal_connect (gen->priv->gl_box, "keynav-failed", G_CALLBACK (keynav_failed), gen);
+}
+
 static void
 gtk_inspector_general_class_init (GtkInspectorGeneralClass *klass)
 {
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
   GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
 
+  object_class->constructed = gtk_inspector_general_constructed;
+
   gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/inspector/general.ui");
+  gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, version_box);
+  gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, env_box);
+  gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, gl_box);
   gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, gtk_version);
   gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, gdk_backend);
+  gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, gl_version);
+  gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, gl_vendor);
   gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, prefix);
   gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, xdg_data_home);
   gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, xdg_data_dirs);
@@ -172,6 +363,7 @@ gtk_inspector_general_class_init (GtkInspectorGeneralClass *klass)
   gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, gtk_exe_prefix);
   gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, gtk_data_prefix);
   gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, gsettings_schema_dir);
+  gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorGeneral, labels);
 }
 
 // vim: set et sw=2 ts=2:
diff --git a/gtk/inspector/general.h b/gtk/inspector/general.h
index c83c04b..e397f35 100644
--- a/gtk/inspector/general.h
+++ b/gtk/inspector/general.h
@@ -18,7 +18,7 @@
 #ifndef _GTK_INSPECTOR_GENERAL_H_
 #define _GTK_INSPECTOR_GENERAL_H_
 
-#include <gtk/gtkbox.h>
+#include <gtk/gtkscrolledwindow.h>
 
 #define GTK_TYPE_INSPECTOR_GENERAL            (gtk_inspector_general_get_type())
 #define GTK_INSPECTOR_GENERAL(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_INSPECTOR_GENERAL, 
GtkInspectorGeneral))
@@ -32,13 +32,13 @@ typedef struct _GtkInspectorGeneralPrivate GtkInspectorGeneralPrivate;
 
 typedef struct _GtkInspectorGeneral
 {
-  GtkBox parent;
+  GtkScrolledWindow parent;
   GtkInspectorGeneralPrivate *priv;
 } GtkInspectorGeneral;
 
 typedef struct _GtkInspectorGeneralClass
 {
-  GtkBoxClass parent;
+  GtkScrolledWindowClass parent;
 } GtkInspectorGeneralClass;
 
 G_BEGIN_DECLS
diff --git a/gtk/inspector/general.ui b/gtk/inspector/general.ui
index f755c90..2ff6cb8 100644
--- a/gtk/inspector/general.ui
+++ b/gtk/inspector/general.ui
@@ -1,80 +1,87 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface domain="gtk30">
-  <template class="GtkInspectorGeneral" parent="GtkBox">
-    <property name="orientation">vertical</property>
-    <property name="margin">60</property>
-    <property name="spacing">10</property>
+  <template class="GtkInspectorGeneral" parent="GtkScrolledWindow">
+    <property name="hscrollbar-policy">never</property>
+    <property name="vscrollbar-policy">automatic</property>
     <child>
-      <object class="GtkFrame" id="version_frame">
+      <object class="GtkBox">
         <property name="visible">True</property>
-        <property name="halign">center</property>
+        <property name="orientation">vertical</property>
+        <property name="margin">60</property>
+        <property name="spacing">10</property>
         <child>
-          <object class="GtkListBox">
+          <object class="GtkFrame" id="version_frame">
             <property name="visible">True</property>
-            <property name="selection-mode">none</property>
+            <property name="halign">center</property>
             <child>
-              <object class="GtkListBoxRow">
+              <object class="GtkListBox" id="version_box">
                 <property name="visible">True</property>
-                <property name="activatable">False</property>
+                <property name="selection-mode">none</property>
                 <child>
-                  <object class="GtkBox">
+                  <object class="GtkListBoxRow">
                     <property name="visible">True</property>
-                    <property name="orientation">horizontal</property>
-                    <property name="margin">10</property>
-                    <property name="spacing">40</property>
+                    <property name="activatable">False</property>
                     <child>
-                      <object class="GtkLabel" id="gtk_version_label">
+                      <object class="GtkBox">
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes">GTK+ Version</property>
-                        <property name="halign">start</property>
-                        <property name="valign">baseline</property>
-                        <property name="xalign">0.0</property>
+                        <property name="orientation">horizontal</property>
+                        <property name="margin">10</property>
+                        <property name="spacing">40</property>
+                        <child>
+                          <object class="GtkLabel" id="gtk_version_label">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">GTK+ Version</property>
+                            <property name="halign">start</property>
+                            <property name="valign">baseline</property>
+                            <property name="xalign">0.0</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="gtk_version">
+                            <property name="visible">True</property>
+                            <property name="selectable">True</property>
+                            <property name="halign">end</property>
+                            <property name="valign">baseline</property>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                          </packing>
+                        </child>
                       </object>
                     </child>
-                    <child>
-                      <object class="GtkLabel" id="gtk_version">
-                        <property name="visible">True</property>
-                        <property name="selectable">True</property>
-                        <property name="halign">end</property>
-                        <property name="valign">baseline</property>
-                      </object>
-                      <packing>
-                        <property name="expand">True</property>
-                      </packing>
-                    </child>
                   </object>
                 </child>
-              </object>
-            </child>
-            <child>
-              <object class="GtkListBoxRow">
-                <property name="visible">True</property>
-                <property name="activatable">False</property>
                 <child>
-                  <object class="GtkBox">
+                  <object class="GtkListBoxRow">
                     <property name="visible">True</property>
-                    <property name="orientation">horizontal</property>
-                    <property name="margin">10</property>
-                    <property name="spacing">40</property>
-                    <child>
-                      <object class="GtkLabel" id="gdk_backend_label">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">GDK Backend</property>
-                        <property name="halign">start</property>
-                        <property name="valign">baseline</property>
-                        <property name="xalign">0.0</property>
-                      </object>
-                    </child>
+                    <property name="activatable">False</property>
                     <child>
-                      <object class="GtkLabel" id="gdk_backend">
+                      <object class="GtkBox">
                         <property name="visible">True</property>
-                        <property name="selectable">True</property>
-                        <property name="halign">end</property>
-                        <property name="valign">baseline</property>
+                        <property name="orientation">horizontal</property>
+                        <property name="margin">10</property>
+                        <property name="spacing">40</property>
+                        <child>
+                          <object class="GtkLabel" id="gdk_backend_label">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">GDK Backend</property>
+                            <property name="halign">start</property>
+                            <property name="valign">baseline</property>
+                            <property name="xalign">0.0</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="gdk_backend">
+                            <property name="visible">True</property>
+                            <property name="selectable">True</property>
+                            <property name="halign">end</property>
+                            <property name="valign">baseline</property>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                          </packing>
+                        </child>
                       </object>
-                      <packing>
-                        <property name="expand">True</property>
-                      </packing>
                     </child>
                   </object>
                 </child>
@@ -82,256 +89,338 @@
             </child>
           </object>
         </child>
-      </object>
-    </child>
-    <child>
-      <object class="GtkFrame" id="env_frame">
-        <property name="visible">True</property>
-        <property name="halign">center</property>
         <child>
-          <object class="GtkListBox">
+          <object class="GtkFrame" id="env_frame">
             <property name="visible">True</property>
-            <property name="selection-mode">none</property>
+            <property name="halign">center</property>
             <child>
-              <object class="GtkListBoxRow">
+              <object class="GtkListBox" id="env_box">
                 <property name="visible">True</property>
-                <property name="activatable">False</property>
+                <property name="selection-mode">none</property>
                 <child>
-                  <object class="GtkBox">
+                  <object class="GtkListBoxRow">
                     <property name="visible">True</property>
-                    <property name="orientation">horizontal</property>
-                    <property name="margin">10</property>
-                    <property name="spacing">40</property>
+                    <property name="activatable">False</property>
                     <child>
-                      <object class="GtkLabel" id="prefix_label">
+                      <object class="GtkBox">
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes">Prefix</property>
-                        <property name="halign">start</property>
-                        <property name="valign">baseline</property>
-                        <property name="xalign">0.0</property>
+                        <property name="orientation">horizontal</property>
+                        <property name="margin">10</property>
+                        <property name="spacing">40</property>
+                        <child>
+                          <object class="GtkLabel" id="prefix_label">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">Prefix</property>
+                            <property name="halign">start</property>
+                            <property name="valign">baseline</property>
+                            <property name="xalign">0.0</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="prefix">
+                            <property name="visible">True</property>
+                            <property name="selectable">True</property>
+                            <property name="halign">end</property>
+                            <property name="valign">baseline</property>
+                            <property name="ellipsize">end</property>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                          </packing>
+                        </child>
                       </object>
                     </child>
-                    <child>
-                      <object class="GtkLabel" id="prefix">
-                        <property name="visible">True</property>
-                        <property name="selectable">True</property>
-                        <property name="halign">end</property>
-                        <property name="valign">baseline</property>
-                        <property name="ellipsize">end</property>
-                      </object>
-                      <packing>
-                        <property name="expand">True</property>
-                      </packing>
-                    </child>
                   </object>
                 </child>
-              </object>
-            </child>
-            <child>
-              <object class="GtkListBoxRow">
-                <property name="visible">True</property>
-                <property name="activatable">False</property>
                 <child>
-                  <object class="GtkBox">
+                  <object class="GtkListBoxRow">
                     <property name="visible">True</property>
-                    <property name="orientation">horizontal</property>
-                    <property name="margin">10</property>
-                    <property name="spacing">40</property>
+                    <property name="activatable">False</property>
                     <child>
-                      <object class="GtkLabel" id="xdg_data_home_label">
+                      <object class="GtkBox">
                         <property name="visible">True</property>
-                        <property name="label">XDG_DATA_HOME</property>
-                        <property name="halign">start</property>
-                        <property name="valign">baseline</property>
-                        <property name="xalign">0.0</property>
+                        <property name="orientation">horizontal</property>
+                        <property name="margin">10</property>
+                        <property name="spacing">40</property>
+                        <child>
+                          <object class="GtkLabel" id="xdg_data_home_label">
+                            <property name="visible">True</property>
+                            <property name="label">XDG_DATA_HOME</property>
+                            <property name="halign">start</property>
+                            <property name="valign">baseline</property>
+                            <property name="xalign">0.0</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="xdg_data_home">
+                            <property name="visible">True</property>
+                            <property name="selectable">True</property>
+                            <property name="halign">end</property>
+                            <property name="valign">baseline</property>
+                            <property name="ellipsize">end</property>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                          </packing>
+                        </child>
                       </object>
                     </child>
-                    <child>
-                      <object class="GtkLabel" id="xdg_data_home">
-                        <property name="visible">True</property>
-                        <property name="selectable">True</property>
-                        <property name="halign">end</property>
-                        <property name="valign">baseline</property>
-                        <property name="ellipsize">end</property>
-                      </object>
-                      <packing>
-                        <property name="expand">True</property>
-                      </packing>
-                    </child>
                   </object>
                 </child>
-              </object>
-            </child>
-            <child>
-              <object class="GtkListBoxRow">
-                <property name="visible">True</property>
-                <property name="activatable">False</property>
                 <child>
-                  <object class="GtkBox">
+                  <object class="GtkListBoxRow">
                     <property name="visible">True</property>
-                    <property name="orientation">horizontal</property>
-                    <property name="margin">10</property>
-                    <property name="spacing">40</property>
+                    <property name="activatable">False</property>
                     <child>
-                      <object class="GtkLabel" id="xdg_data_dirs_label">
+                      <object class="GtkBox">
                         <property name="visible">True</property>
-                        <property name="label">XDG_DATA_DIRS</property>
-                        <property name="halign">start</property>
-                        <property name="valign">baseline</property>
-                        <property name="xalign">0.0</property>
+                        <property name="orientation">horizontal</property>
+                        <property name="margin">10</property>
+                        <property name="spacing">40</property>
+                        <child>
+                          <object class="GtkLabel" id="xdg_data_dirs_label">
+                            <property name="visible">True</property>
+                            <property name="label">XDG_DATA_DIRS</property>
+                            <property name="halign">start</property>
+                            <property name="valign">baseline</property>
+                            <property name="xalign">0.0</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="xdg_data_dirs">
+                            <property name="visible">True</property>
+                            <property name="selectable">True</property>
+                            <property name="halign">end</property>
+                            <property name="valign">baseline</property>
+                            <property name="ellipsize">end</property>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                          </packing>
+                        </child>
                       </object>
                     </child>
-                    <child>
-                      <object class="GtkLabel" id="xdg_data_dirs">
-                        <property name="visible">True</property>
-                        <property name="selectable">True</property>
-                        <property name="halign">end</property>
-                        <property name="valign">baseline</property>
-                        <property name="ellipsize">end</property>
-                      </object>
-                      <packing>
-                        <property name="expand">True</property>
-                      </packing>
-                    </child>
                   </object>
                 </child>
-              </object>
-            </child>
-            <child>
-              <object class="GtkListBoxRow">
-                <property name="visible">True</property>
-                <property name="activatable">False</property>
                 <child>
-                  <object class="GtkBox">
+                  <object class="GtkListBoxRow">
                     <property name="visible">True</property>
-                    <property name="orientation">horizontal</property>
-                    <property name="margin">10</property>
-                    <property name="spacing">40</property>
-                    <child>
-                      <object class="GtkLabel" id="gtk_path_label">
-                        <property name="visible">True</property>
-                        <property name="label">GTK_PATH</property>
-                        <property name="halign">start</property>
-                        <property name="valign">baseline</property>
-                        <property name="xalign">0.0</property>
-                      </object>
-                    </child>
+                    <property name="activatable">False</property>
                     <child>
-                      <object class="GtkLabel" id="gtk_path">
+                      <object class="GtkBox">
                         <property name="visible">True</property>
-                        <property name="selectable">True</property>
-                        <property name="halign">end</property>
-                        <property name="valign">baseline</property>
-                        <property name="ellipsize">end</property>
+                        <property name="orientation">horizontal</property>
+                        <property name="margin">10</property>
+                        <property name="spacing">40</property>
+                        <child>
+                          <object class="GtkLabel" id="gtk_path_label">
+                            <property name="visible">True</property>
+                            <property name="label">GTK_PATH</property>
+                            <property name="halign">start</property>
+                            <property name="valign">baseline</property>
+                            <property name="xalign">0.0</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="gtk_path">
+                            <property name="visible">True</property>
+                            <property name="selectable">True</property>
+                            <property name="halign">end</property>
+                            <property name="valign">baseline</property>
+                            <property name="ellipsize">end</property>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                          </packing>
+                        </child>
                       </object>
-                      <packing>
-                        <property name="expand">True</property>
-                      </packing>
                     </child>
                   </object>
                 </child>
-              </object>
-            </child>
-            <child>
-              <object class="GtkListBoxRow">
-                <property name="visible">True</property>
-                <property name="activatable">False</property>
                 <child>
-                  <object class="GtkBox">
+                  <object class="GtkListBoxRow">
                     <property name="visible">True</property>
-                    <property name="orientation">horizontal</property>
-                    <property name="margin">10</property>
-                    <property name="spacing">40</property>
-                    <child>
-                      <object class="GtkLabel" id="gtk_exe_prefix_label">
-                        <property name="visible">True</property>
-                        <property name="label">GTK_EXE_PREFIX</property>
-                        <property name="halign">start</property>
-                        <property name="valign">baseline</property>
-                        <property name="xalign">0.0</property>
-                      </object>
-                    </child>
+                    <property name="activatable">False</property>
                     <child>
-                      <object class="GtkLabel" id="gtk_exe_prefix">
+                      <object class="GtkBox">
                         <property name="visible">True</property>
-                        <property name="selectable">True</property>
-                        <property name="halign">end</property>
-                        <property name="valign">baseline</property>
-                        <property name="ellipsize">end</property>
+                        <property name="orientation">horizontal</property>
+                        <property name="margin">10</property>
+                        <property name="spacing">40</property>
+                        <child>
+                          <object class="GtkLabel" id="gtk_exe_prefix_label">
+                            <property name="visible">True</property>
+                            <property name="label">GTK_EXE_PREFIX</property>
+                            <property name="halign">start</property>
+                            <property name="valign">baseline</property>
+                            <property name="xalign">0.0</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="gtk_exe_prefix">
+                            <property name="visible">True</property>
+                            <property name="selectable">True</property>
+                            <property name="halign">end</property>
+                            <property name="valign">baseline</property>
+                            <property name="ellipsize">end</property>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                          </packing>
+                        </child>
                       </object>
-                      <packing>
-                        <property name="expand">True</property>
-                      </packing>
                     </child>
                   </object>
                 </child>
-              </object>
-            </child>
-            <child>
-              <object class="GtkListBoxRow">
-                <property name="visible">True</property>
-                <property name="activatable">False</property>
                 <child>
-                  <object class="GtkBox">
+                  <object class="GtkListBoxRow">
                     <property name="visible">True</property>
-                    <property name="orientation">horizontal</property>
-                    <property name="margin">10</property>
-                    <property name="spacing">40</property>
+                    <property name="activatable">False</property>
                     <child>
-                      <object class="GtkLabel" id="gtk_data_prefix_label">
+                      <object class="GtkBox">
                         <property name="visible">True</property>
-                        <property name="label">GTK_DATA_PREFIX</property>
-                        <property name="halign">start</property>
-                        <property name="valign">baseline</property>
-                        <property name="xalign">0.0</property>
+                        <property name="orientation">horizontal</property>
+                        <property name="margin">10</property>
+                        <property name="spacing">40</property>
+                        <child>
+                          <object class="GtkLabel" id="gtk_data_prefix_label">
+                            <property name="visible">True</property>
+                            <property name="label">GTK_DATA_PREFIX</property>
+                            <property name="halign">start</property>
+                            <property name="valign">baseline</property>
+                            <property name="xalign">0.0</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="gtk_data_prefix">
+                            <property name="visible">True</property>
+                            <property name="selectable">True</property>
+                            <property name="halign">end</property>
+                            <property name="valign">baseline</property>
+                            <property name="ellipsize">end</property>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                          </packing>
+                        </child>
                       </object>
                     </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkListBoxRow">
+                    <property name="visible">True</property>
+                    <property name="activatable">False</property>
                     <child>
-                      <object class="GtkLabel" id="gtk_data_prefix">
+                      <object class="GtkBox">
                         <property name="visible">True</property>
-                        <property name="selectable">True</property>
-                        <property name="halign">end</property>
-                        <property name="valign">baseline</property>
-                        <property name="ellipsize">end</property>
+                        <property name="orientation">horizontal</property>
+                        <property name="margin">10</property>
+                        <property name="spacing">40</property>
+                        <child>
+                          <object class="GtkLabel" id="gsettings_schema_dir_label">
+                            <property name="visible">True</property>
+                            <property name="label">GSETTINGS_SCHEMA_DIR</property>
+                            <property name="halign">start</property>
+                            <property name="valign">baseline</property>
+                            <property name="xalign">0.0</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="gsettings_schema_dir">
+                            <property name="visible">True</property>
+                            <property name="selectable">True</property>
+                            <property name="halign">end</property>
+                            <property name="valign">baseline</property>
+                            <property name="ellipsize">end</property>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                          </packing>
+                        </child>
                       </object>
-                      <packing>
-                        <property name="expand">True</property>
-                      </packing>
                     </child>
                   </object>
                 </child>
               </object>
             </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkFrame" id="gl_frame">
+            <property name="visible">True</property>
+            <property name="halign">center</property>
             <child>
-              <object class="GtkListBoxRow">
+              <object class="GtkListBox" id="gl_box">
                 <property name="visible">True</property>
-                <property name="activatable">False</property>
+                <property name="selection-mode">none</property>
                 <child>
-                  <object class="GtkBox">
+                  <object class="GtkListBoxRow">
                     <property name="visible">True</property>
-                    <property name="orientation">horizontal</property>
-                    <property name="margin">10</property>
-                    <property name="spacing">40</property>
+                    <property name="activatable">False</property>
                     <child>
-                      <object class="GtkLabel" id="gsettings_schema_dir_label">
+                      <object class="GtkBox">
                         <property name="visible">True</property>
-                        <property name="label">GSETTINGS_SCHEMA_DIR</property>
-                        <property name="halign">start</property>
-                        <property name="valign">baseline</property>
-                        <property name="xalign">0.0</property>
+                        <property name="orientation">horizontal</property>
+                        <property name="margin">10</property>
+                        <property name="spacing">40</property>
+                        <child>
+                          <object class="GtkLabel" id="gl_version_label">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">GL Version</property>
+                            <property name="halign">start</property>
+                            <property name="valign">baseline</property>
+                            <property name="xalign">0.0</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="gl_version">
+                            <property name="visible">True</property>
+                            <property name="selectable">True</property>
+                            <property name="halign">end</property>
+                            <property name="valign">baseline</property>
+                            <property name="ellipsize">end</property>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                          </packing>
+                        </child>
                       </object>
                     </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkListBoxRow">
+                    <property name="visible">True</property>
+                    <property name="activatable">False</property>
                     <child>
-                      <object class="GtkLabel" id="gsettings_schema_dir">
+                      <object class="GtkBox">
                         <property name="visible">True</property>
-                        <property name="selectable">True</property>
-                        <property name="halign">end</property>
-                        <property name="valign">baseline</property>
-                        <property name="ellipsize">end</property>
+                        <property name="orientation">horizontal</property>
+                        <property name="margin">10</property>
+                        <property name="spacing">40</property>
+                        <child>
+                          <object class="GtkLabel" id="gl_vendor_label">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">GL Vendor</property>
+                            <property name="halign">start</property>
+                            <property name="valign">baseline</property>
+                            <property name="xalign">0.0</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="gl_vendor">
+                            <property name="visible">True</property>
+                            <property name="selectable">True</property>
+                            <property name="halign">end</property>
+                            <property name="valign">baseline</property>
+                            <property name="ellipsize">end</property>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                          </packing>
+                        </child>
                       </object>
-                      <packing>
-                        <property name="expand">True</property>
-                      </packing>
                     </child>
                   </object>
                 </child>
@@ -342,11 +431,13 @@
       </object>
     </child>
   </template>
-  <object class="GtkSizeGroup">
+  <object class="GtkSizeGroup" id="labels">
     <property name="mode">horizontal</property>
     <widgets>
       <widget name="gtk_version_label"/>
       <widget name="gdk_backend_label"/>
+      <widget name="gl_version_label"/>
+      <widget name="gl_vendor_label"/>
       <widget name="prefix_label"/>
       <widget name="xdg_data_home_label"/>
       <widget name="xdg_data_dirs_label"/>
@@ -360,6 +451,7 @@
     <property name="mode">horizontal</property>
     <widgets>
       <widget name="version_frame"/>
+      <widget name="gl_frame"/>
       <widget name="env_frame"/>
     </widgets>
   </object>
diff --git a/gtk/inspector/general.ui.h b/gtk/inspector/general.ui.h
index 34434f0..421ff76 100644
--- a/gtk/inspector/general.ui.h
+++ b/gtk/inspector/general.ui.h
@@ -1,3 +1,5 @@
 N_("GTK+ Version");
 N_("GDK Backend");
 N_("Prefix");
+N_("GL Version");
+N_("GL Vendor");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]