Add GtkGLArea to the widget gallery

This commit is contained in:
Matthias Clasen 2014-10-22 00:55:39 -04:00
parent fc13ff501d
commit 247f2c9192
5 changed files with 28 additions and 1 deletions

View File

@ -206,6 +206,7 @@ HTML_IMAGES = \
$(srcdir)/images/font-button.png \
$(srcdir)/images/fontchooser.png \
$(srcdir)/images/frame.png \
$(srcdir)/images/glarea.png \
$(srcdir)/images/headerbar.png \
$(srcdir)/images/icon-view.png \
$(srcdir)/images/image.png \

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -42,6 +42,9 @@
<link linkend="GtkScale">
<inlinegraphic fileref="scales.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkGLArea">
<inlinegraphic fileref="glarea.png" format="PNG"></inlinegraphic>
</link>
</para>
</section>

View File

@ -5,6 +5,7 @@ AM_CPPFLAGS = \
-I$(top_builddir)/gdk \
-I$(top_srcdir)/gdk \
-I$(top_srcdir)/gdk/x11 \
-I$(top_srcdir)/tests \
$(GTK_DEBUG_FLAGS) \
$(GTK_DEP_CFLAGS)
@ -30,7 +31,9 @@ doc_shooter_SOURCES= \
shadow.h \
shooter.c \
widgets.c \
widgets.h
widgets.h \
$(top_srcdir)/tests/gtkgears.c \
$(top_srcdir)/tests/gtkgears.h
clean-local:
for file in *.png; do \

View File

@ -8,6 +8,7 @@
#include <X11/Xatom.h>
#include <gdkx.h>
#include "widgets.h"
#include "gtkgears.h"
#define SMALL_WIDTH 240
#define SMALL_HEIGHT 75
@ -1480,6 +1481,24 @@ create_flow_box (void)
return info;
}
static WidgetInfo *
create_gl_area (void)
{
WidgetInfo *info;
GtkWidget *widget;
GtkWidget *gears;
widget = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (widget), GTK_SHADOW_IN);
gears = gtk_gears_new ();
gtk_container_add (GTK_CONTAINER (widget), gears);
info = new_widget_info ("glarea", widget, MEDIUM);
return info;
}
GList *
get_all_widgets (void)
{
@ -1544,6 +1563,7 @@ get_all_widgets (void)
retval = g_list_prepend (retval, create_search_entry ());
retval = g_list_prepend (retval, create_level_bar ());
retval = g_list_prepend (retval, create_info_bar ());
retval = g_list_prepend (retval, create_gl_area ());
return retval;
}