[gsettings-desktop-schemas/gtk-doc: 2/2] Add gtk-doc API docs infrastructure
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gsettings-desktop-schemas/gtk-doc: 2/2] Add gtk-doc API docs infrastructure
- Date: Sat, 24 Jul 2010 11:40:32 +0000 (UTC)
commit 35a809cc578b3687b86826036252c4586692ba25
Author: Christian Persch <chpe gnome org>
Date: Mon Jul 5 20:00:07 2010 +0200
Add gtk-doc API docs infrastructure
Makefile.am | 7 +-
configure.ac | 58 ++++++++-
docs/Makefile.am | 3 +
docs/reference/Makefile.am | 116 ++++++++++++++++++
docs/reference/gsettings-desktop-schemas-docs.xml | 124 ++++++++++++++++++++
.../gsettings-desktop-schemas-sections.txt | 24 ++++
docs/reference/gsettings-desktop-schemas.types | 5 +
docs/reference/version.xml.in | 1 +
headers/Makefile.am | 2 -
headers/gdesktop-enums.h | 44 -------
schemas/Makefile.am | 2 +-
src/Makefile.am | 42 +++++++
src/gdesktop-enums.h | 101 ++++++++++++++++
src/gdesktop-type-builtins.c.template | 42 +++++++
src/gdesktop-type-builtins.h.template | 28 +++++
15 files changed, 544 insertions(+), 55 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 7ce2f0c..7bdeeec 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,9 +1,11 @@
NULL =
-SUBDIRS = headers schemas po
+SUBDIRS = schemas src docs po
ACLOCAL_AMFLAGS = -I m4
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
+
EXTRA_DIST = \
HACKING \
MAINTAINERS \
@@ -15,7 +17,10 @@ MAINTAINERCLEANFILES = \
$(srcdir)/aclocal.m4 \
$(srcdir)/config.guess \
$(srcdir)/config.sub \
+ $(srcdir)/depcomp \
+ $(srcdir)/gtk-doc.make \
$(srcdir)/install-sh \
+ $(srcdir)/ltmain.sh \
$(srcdir)/missing \
$(srcdir)/mkinstalldirs \
`find "$(srcdir)" -type f -name Makefile.in -print` \
diff --git a/configure.ac b/configure.ac
index 26f18f2..19ad185 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,36 +1,80 @@
+m4_define([gds_major_version],[0])
+m4_define([gds_minor_version],[0])
+m4_define([gds_micro_version],[1])
+m4_define([gds_extra_version],[])
+m4_define([gds_version],[gds_major_version.gds_minor_version.gds_micro_version()gds_extra_version])
+
+m4_define([gds_api_version],[1.0])
+
AC_PREREQ(2.53)
-AC_INIT([gsettings-desktop-schemas], [0.0.1],
- [http://bugzilla.gnome.org/enter_bug.cgi?product=gsettings-desktop-schemas])
+AC_INIT([GNOME Desktop GSettings Schemas],
+ [gds_version],
+ [http://bugzilla.gnome.org/enter_bug.cgi?product=gsettings-desktop-schemas],
+ [gsettings-desktop-schemas])
+
AC_CONFIG_SRCDIR(schemas/org.gnome.desktop.default-applications.gschema.xml)
AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-bzip2])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_MACRO_DIR([m4])
-AM_MAINTAINER_MODE
+AM_MAINTAINER_MODE([enable])
dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")
+# -----------------------------------------------------------------------------
+
AC_PROG_SED
+PKG_PROG_PKG_CONFIG
+
+LT_PREREQ([2.2])
+LT_INIT
GLIB_GSETTINGS
+GLIB_MKENUMS="$($PKG_CONFIG --variable=glib_mkenums glib-2.0)"
+AC_SUBST([GLIB_MKENUMS])
+
+PKG_CHECK_MODULES([GOBJECT],[gobject-2.0])
+
+# -----------------------------------------------------------------------------
+# i18n
+# -----------------------------------------------------------------------------
+
GETTEXT_PACKAGE=gsettings-desktop-schemas
AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT
IT_PROG_INTLTOOL([0.40.0])
+# -----------------------------------------------------------------------------
+# API documentation
+# -----------------------------------------------------------------------------
+
+GTK_DOC_CHECK([1.13],[--flavour no-tmpl])
+
+AC_SUBST([GLIB_PREFIX],[$($PKG_CONFIG --variable=prefix glib-2.0)])
+
+# -----------------------------------------------------------------------------
+
+AC_SUBST([GDS_API_VERSION],[gds_api_version])
+
+# -----------------------------------------------------------------------------
+# -----------------------------------------------------------------------------
+
AC_OUTPUT([
Makefile
+docs/Makefile
+docs/reference/Makefile
+docs/reference/version.xml
gsettings-desktop-schemas.pc
-headers/Makefile
schemas/Makefile
+src/Makefile
po/Makefile.in
])
-dnl ---------------------------------------------------------------------------
-dnl - Show summary
-dnl ---------------------------------------------------------------------------
+# -----------------------------------------------------------------------------
+# Show summary
+# -----------------------------------------------------------------------------
echo "
gsettings-desktop-schemas $VERSION
diff --git a/docs/Makefile.am b/docs/Makefile.am
new file mode 100644
index 0000000..034926c
--- /dev/null
+++ b/docs/Makefile.am
@@ -0,0 +1,3 @@
+SUBDIRS = reference
+
+-include $(top_srcdir)/git.mk
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
new file mode 100644
index 0000000..17a3b5c
--- /dev/null
+++ b/docs/reference/Makefile.am
@@ -0,0 +1,116 @@
+# We require automake 1.10 for $(abs_builddir)
+AUTOMAKE_OPTIONS = 1.10
+
+# This is a blank Makefile.am for using gtk-doc.
+# Copy this to your project's API docs directory and modify the variables to
+# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
+# of using the various options.
+
+# The name of the module, e.g. 'glib'.
+DOC_MODULE = gsettings-desktop-schemas
+
+# Uncomment for versioned docs and specify the version of the module, e.g. '2'.
+# DOC_MODULE_VERSION = $(GSETTINGS_DESKTOP_SCHEMAS_API_VERSION)
+
+# The top-level SGML file. You can change this if you want to.
+DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.xml
+
+# The directory containing the source code. Relative to $(srcdir).
+# gtk-doc will search all .c & .h files beneath here for inline comments
+# documenting the functions and macros.
+# e.g. DOC_SOURCE_DIR=../../../gtk
+DOC_SOURCE_DIR = ../../src
+
+# Extra options to pass to gtkdoc-scangobj. Not normally needed.
+SCANGOBJ_OPTIONS =
+
+# Extra options to supply to gtkdoc-scan.
+# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
+SCAN_OPTIONS =
+
+# Extra options to supply to gtkdoc-mkdb.
+# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
+MKDB_OPTIONS = --sgml-mode --output-format=xml --name-space=g_settings_desktop_schemas
+
+# Extra options to supply to gtkdoc-mktmpl
+# e.g. MKTMPL_OPTIONS=--only-section-tmpl
+MKTMPL_OPTIONS =
+
+# Extra options to supply to gtkdoc-mkhtml
+# Add the builddir to the HTML path so that version.xml is found
+MKHTML_OPTIONS = --path="$(abs_builddir)"
+
+# Extra options to supply to gtkdoc-fixref. Not normally needed.
+# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
+FIXXREF_OPTIONS = \
+ --extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/glib \
+ --extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/gobject \
+ --extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/gio
+
+# Used for dependencies. The docs will be rebuilt if any of these change.
+# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
+# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
+HFILE_GLOB = \
+ $(top_srcdir)/src/*.h \
+ $(top_builddir)/src/*.h
+
+CFILE_GLOB = \
+ $(top_srcdir)/src/*.c
+
+# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
+# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
+EXTRA_HFILES =
+
+# Header files to ignore when scanning. Use base file name, no paths
+# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
+IGNORE_HFILES = \
+ config.h
+
+# Images to copy into HTML directory.
+# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
+HTML_IMAGES =
+
+# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
+# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
+content_files = \
+ version.xml
+
+# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
+# These files must be listed here *and* in content_files
+# e.g. expand_content_files=running.sgml
+expand_content_files =
+
+# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
+# Only needed if you are using gtkdoc-scangobj to dynamically query widget
+# signals and properties.
+# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
+# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
+GTKDOC_CFLAGS = \
+ -I$(top_srcdir)/src \
+ -I$(top_builddir)/src \
+ $(GOBJECT_CFLAGS)
+
+GTKDOC_LIBS = \
+ $(top_builddir)/src/libgdesktoptypebuiltins.la \
+ $(GOBJECT_LIBS)
+
+# This includes the standard gtk-doc make rules, copied by gtkdocize.
+include $(top_srcdir)/gtk-doc.make
+
+# Other files to distribute
+# e.g. EXTRA_DIST += version.xml.in
+EXTRA_DIST += \
+ version.xml.in
+
+# Files not to distribute
+# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
+# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
+#DISTCLEANFILES +=
+
+# Comment this out if you want your docs-status tested during 'make check'
+if ENABLE_GTK_DOC
+#TESTS_ENVIRONMENT = cd $(srcsrc) &&
+#TESTS = $(GTKDOC_CHECK)
+endif
+
+-include $(top_srcdir)/git.mk
diff --git a/docs/reference/gsettings-desktop-schemas-docs.xml b/docs/reference/gsettings-desktop-schemas-docs.xml
new file mode 100644
index 0000000..76c22ac
--- /dev/null
+++ b/docs/reference/gsettings-desktop-schemas-docs.xml
@@ -0,0 +1,124 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+<!ENTITY version SYSTEM "version.xml">
+]>
+<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
+ <!--
+ Copyright © 2010 Christian Persch
+
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.2
+ or (at your option) any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+
+ A copy of the license is included in the COPYING.DOC file.
+ -->
+
+ <bookinfo>
+ <title>GNOME Desktop GSettings Schemas Reference Manual</title>
+ <releaseinfo>
+ Documentation for GNOME Desktop GSettings Schemas version &version;<!-- -->.
+ The latest version of this documentation can be found on-line at the
+ <ulink role="online-location" url="http://library.gnome.org/devel/gsettings-desktop-schemas/">GNOME Library</ulink>.
+ </releaseinfo>
+
+ <copyright>
+ <year>2010</year>
+ <holder>Christian Persch</holder>
+ </copyright>
+
+ <legalnotice>
+ <para>
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the <citetitle>GNU Free Documentation Licence</citetitle>, Version 1.2
+ or (at your option) any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+ A copy of the licence is included in the section entitled "GNU
+ Free Documentation Licence".
+
+ You may obtain a copy of the <citetitle>GNU Free
+ Documentation Licence</citetitle> from the Free Software
+ Foundation at <ulink type="http" url="http://www.gnu.org/licences/">GNU Licences web site</ulink>
+ or by writing to:
+
+ <address>
+ The Free Software Foundation, Inc.,
+ <street>51 Franklin St</street> â?? Fifth Floor,
+ <city>Boston</city>, <state>MA</state> <postcode>02110-1301</postcode>,
+ <country>USA</country>
+ </address>
+ </para>
+ </legalnotice>
+ </bookinfo>
+
+ <part>
+ <title>API Reference</title>
+ <chapter>
+ <xi:include href="xml/gdesktop-enums.xml"/>
+ </chapter>
+<!-- <chapter>
+ <xi:include href="xml/.xml"/>
+ </chapter>
+ <chapter>
+ <xi:include href="xml/iglu-version.xml"/>
+ </chapter>-->
+ </part>
+
+ <!--
+ <chapter id="object-hierarchy">
+ <title>Object Hierarchy</title>
+ <xi:include href="xml/tree_index.sgml"/>
+ </chapter>
+ -->
+
+ <index id="api-index-full">
+ <title id="index-all">Index</title>
+ <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
+ </index>
+ <!-- <index id="api-index-2-32" role="2.32">
+ <title>Index of new symbols in 2.32</title>
+ <xi:include href="xml/api-index-2.32.xml"><xi:fallback /></xi:include>
+ </index>
+ -->
+ <!--
+ <index id="api-index-deprecated" role="deprecated">
+ <title>Index of deprecated symbols</title>
+ <xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
+ </index>
+ -->
+
+ <appendix id="licence">
+ <title>Licence</title>
+
+ <para>
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the <citetitle>GNU Lesser General Public
+ Licence</citetitle> as published by the Free Software Foundation; either
+ version 2.1 of the Licence, or (at your option) any later version.
+ </para>
+
+ <para>
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ <citetitle>GNU Lesser General Public Licence</citetitle> for
+ more details.
+ </para>
+
+ <para>
+ You may obtain a copy of the <citetitle>GNU Lesser General Public Licence</citetitle>
+ from the Free Software Foundation at
+ <ulink type="http" url="http://www.gnu.org/licences/">GNU Licences web site</ulink>
+ or by writing to:
+
+ <address>
+ The Free Software Foundation, Inc.,
+ <street>51 Franklin St</street> â?? Fifth Floor,
+ <city>Boston</city>, <state>MA</state> <postcode>02110-1301</postcode>,
+ <country>USA</country>
+ </address>
+ </para>
+ </appendix>
+
+</book>
diff --git a/docs/reference/gsettings-desktop-schemas-overrides.txt b/docs/reference/gsettings-desktop-schemas-overrides.txt
new file mode 100644
index 0000000..e69de29
diff --git a/docs/reference/gsettings-desktop-schemas-sections.txt b/docs/reference/gsettings-desktop-schemas-sections.txt
new file mode 100644
index 0000000..bc64bde
--- /dev/null
+++ b/docs/reference/gsettings-desktop-schemas-sections.txt
@@ -0,0 +1,24 @@
+<SECTION>
+<FILE>gdesktop-enums</FILE>
+GDesktopProxyMode
+GDesktopToolbarStyle
+GDesktopToolbarIconSize
+GDesktopBackgroundStyle
+GDesktopBackgroundShading
+</SECTION>
+
+<SECTION>
+<FILE>gdesktop-type-builtins</FILE>
+<SUBSECTION Standard>
+g_desktop_proxy_mode_get_type
+GDESKTOP_TYPE_DESKTOP_PROXY_MODE
+g_desktop_toolbar_style_get_type
+GDESKTOP_TYPE_DESKTOP_TOOLBAR_STYLE
+g_desktop_toolbar_icon_size_get_type
+GDESKTOP_TYPE_DESKTOP_TOOLBAR_ICON_SIZE
+g_desktop_background_style_get_type
+GDESKTOP_TYPE_DESKTOP_BACKGROUND_STYLE
+g_desktop_background_shading_get_type
+GDESKTOP_TYPE_DESKTOP_BACKGROUND_SHADING
+</SECTION>
+
diff --git a/docs/reference/gsettings-desktop-schemas.types b/docs/reference/gsettings-desktop-schemas.types
new file mode 100644
index 0000000..db38052
--- /dev/null
+++ b/docs/reference/gsettings-desktop-schemas.types
@@ -0,0 +1,5 @@
+g_desktop_background_shading_get_type
+g_desktop_background_style_get_type
+g_desktop_proxy_mode_get_type
+g_desktop_toolbar_icon_size_get_type
+g_desktop_toolbar_style_get_type
diff --git a/docs/reference/version.xml.in b/docs/reference/version.xml.in
new file mode 100644
index 0000000..d78bda9
--- /dev/null
+++ b/docs/reference/version.xml.in
@@ -0,0 +1 @@
+ VERSION@
diff --git a/schemas/Makefile.am b/schemas/Makefile.am
index abeefc6..ae38db2 100644
--- a/schemas/Makefile.am
+++ b/schemas/Makefile.am
@@ -15,7 +15,7 @@ desktop_gschemas_in = \
desktop_gschemas_in_processed = $(desktop_gschemas_in:.gschema.xml.in=.gschema.xml)
gsettings_ENUM_NAMESPACE = org.gnome.desktop
-gsettings_ENUM_FILES = $(top_srcdir)/headers/*.h
+gsettings_ENUM_FILES = $(top_srcdir)/src/gdesktop-enums.h
gsettings_SCHEMAS = \
$(desktop_gschemas) \
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..f831961
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,42 @@
+gdesktopincludedir = $(includedir)/gsettings-desktop-schemas
+
+gdesktopinclude_HEADERS = \
+ gdesktop-enums.h
+
+nodist_gdesktopinclude_HEADERS = \
+ gdesktop-type-builtins.h \
+ gdesktop-type-builtins.c
+
+gdesktop-type-builtins.h: gdesktop-type-builtins.h.template $(gdesktopinclude_HEADERS) Makefile
+ $(AM_V_GEN) $(GLIB_MKENUMS) --template $< $(filter %.h,$^) > xgen-gtbh \
+ && (cmp -s xgen-gtbh gdesktop-type-builtins.h || cp xgen-gtbh gdesktop-type-builtins.h ) \
+ && rm -f xgen-gtbh
+
+gdesktop-type-builtins.c: gdesktop-type-builtins.c.template $(gdesktopinclude_HEADERS) Makefile
+ $(AM_V_GEN) $(GLIB_MKENUMS) --template $< $(filter %.h,$^) > xgen-gtbc \
+ && (cmp -s xgen-gtbc gdesktop-type-builtins.c || cp xgen-gtbc gdesktop-type-builtins.c ) \
+ && rm -f xgen-gtbc
+
+# Note: this library only exists so we can use gtk-doc
+
+noinst_LTLIBRARIES = libgdesktoptypebuiltins.la
+
+BUILT_SOURCES = \
+ gdesktop-type-builtins.h \
+ gdesktop-type-builtins.c
+
+libgdesktoptypebuiltins_la_SOURCES = \
+ $(top_builddir)/src/gdesktop-type-builtins.c \
+ $(top_builddir)/src/gdesktop-type-builtins.h
+libgdesktoptypebuiltins_la_CPPFLAGS = \
+ -DGDESKTOP_COMPILATION \
+ $(AM_CPPFLAGS)
+libgdesktoptypebuiltins_la_CFLAGS = \
+ $(GOBJECT_CFLAGS) \
+ $(AM_CFLAGS)
+libgdesktoptypebuiltins_la_LIBADD = \
+ $(GOBJECT_LIBS)
+
+CLEANFILES = $(BUILT_SOURCES)
+
+-include $(top_srcdir)/git.mk
diff --git a/src/gdesktop-enums.h b/src/gdesktop-enums.h
new file mode 100644
index 0000000..3f2d6f7
--- /dev/null
+++ b/src/gdesktop-enums.h
@@ -0,0 +1,101 @@
+/*
+ * Copyright © 2010 Codethink Limited
+ *
+ * This is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/**
+ * SECTION:gdesktop-enums
+ * @short_description:
+ *
+ * Long description.
+ */
+#ifndef __gdesktop_enums_h__
+#define __gdesktop_enums_h__
+
+/**
+ * GDesktopProxyMode:
+ * @G_DESKTOP_PROXY_MODE_NONE:
+ * @G_DESKTOP_PROXY_MODE_MANUAL:
+ * @G_DESKTOP_PROXY_MODE_AUTO:
+ */
+typedef enum
+{
+ G_DESKTOP_PROXY_MODE_NONE,
+ G_DESKTOP_PROXY_MODE_MANUAL,
+ G_DESKTOP_PROXY_MODE_AUTO
+} GDesktopProxyMode;
+
+/**
+ * GDesktopToolbarStyle:
+ * @G_DESKTOP_TOOLBAR_STYLE_BOTH:
+ * @G_DESKTOP_TOOLBAR_STYLE_BOTH_HORIZ:
+ * @G_DESKTOP_TOOLBAR_STYLE_ICONS:
+ * @G_DESKTOP_TOOLBAR_STYLE_TEXT:
+ */
+typedef enum
+{
+ G_DESKTOP_TOOLBAR_STYLE_BOTH,
+ G_DESKTOP_TOOLBAR_STYLE_BOTH_HORIZ,
+ G_DESKTOP_TOOLBAR_STYLE_ICONS,
+ G_DESKTOP_TOOLBAR_STYLE_TEXT
+} GDesktopToolbarStyle;
+
+/**
+ * GDesktopToolbarIconSize:
+ * @G_DESKTOP_TOOLBAR_ICON_SIZE_SMALL:
+ * @G_DESKTOP_TOOLBAR_ICON_SIZE_LARGE:
+ */
+typedef enum
+{
+ G_DESKTOP_TOOLBAR_ICON_SIZE_SMALL,
+ G_DESKTOP_TOOLBAR_ICON_SIZE_LARGE
+} GDesktopToolbarIconSize;
+
+/**
+ * GDesktopBackgroundStyle:
+ * @G_DESKTOP_BACKGROUND_STYLE_NONE:
+ * @G_DESKTOP_BACKGROUND_STYLE_WALLPAPER:
+ * @G_DESKTOP_BACKGROUND_STYLE_CENTERED:
+ * @G_DESKTOP_BACKGROUND_STYLE_SCALED:
+ * @G_DESKTOP_BACKGROUND_STYLE_STRETCHED:
+ * @G_DESKTOP_BACKGROUND_STYLE_ZOOM:
+ * @G_DESKTOP_BACKGROUND_STYLE_SPANNED:
+ */
+typedef enum
+{
+ G_DESKTOP_BACKGROUND_STYLE_NONE,
+ G_DESKTOP_BACKGROUND_STYLE_WALLPAPER,
+ G_DESKTOP_BACKGROUND_STYLE_CENTERED,
+ G_DESKTOP_BACKGROUND_STYLE_SCALED,
+ G_DESKTOP_BACKGROUND_STYLE_STRETCHED,
+ G_DESKTOP_BACKGROUND_STYLE_ZOOM,
+ G_DESKTOP_BACKGROUND_STYLE_SPANNED
+} GDesktopBackgroundStyle;
+
+/**
+ * GDesktopBackgroundShading:
+ * @G_DESKTOP_BACKGROUND_SHADING_SOLID,
+ * @G_DESKTOP_BACKGROUND_SHADING_VERTICAL,
+ * @G_DESKTOP_BACKGROUND_SHADING_HORIZONTAL
+ */
+typedef enum
+{
+ G_DESKTOP_BACKGROUND_SHADING_SOLID,
+ G_DESKTOP_BACKGROUND_SHADING_VERTICAL,
+ G_DESKTOP_BACKGROUND_SHADING_HORIZONTAL
+} GDesktopBackgroundShading;
+
+#endif /* __gdesktop_enums_h__ */
diff --git a/src/gdesktop-type-builtins.c.template b/src/gdesktop-type-builtins.c.template
new file mode 100644
index 0000000..9a7bfb5
--- /dev/null
+++ b/src/gdesktop-type-builtins.c.template
@@ -0,0 +1,42 @@
+/*** BEGIN file-header ***/
+#include <glib-object.h>
+#include "gdesktop-enums.h"
+#include "gdesktop-type-builtins.h"
+
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+/* enumerations from "@filename@" */
+/*** END file-production ***/
+
+/*** BEGIN value-header ***/
+GType
+ enum_name@_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const G Type@Value values[] = {
+/*** END value-header ***/
+
+/*** BEGIN value-production ***/
+ { @VALUENAME@, "@VALUENAME@", "@valuenick@" },
+/*** END value-production ***/
+
+/*** BEGIN value-tail ***/
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id = \
+ g_ type@_register_static (g_intern_static_string ("@EnumName@"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+/*** END value-tail ***/
+
+/*** BEGIN file-tail ***/
+
+/*** END file-tail ***/
diff --git a/src/gdesktop-type-builtins.h.template b/src/gdesktop-type-builtins.h.template
new file mode 100644
index 0000000..f95a1e1
--- /dev/null
+++ b/src/gdesktop-type-builtins.h.template
@@ -0,0 +1,28 @@
+/*** BEGIN file-header ***/
+#if !defined (__GDESKTOP_GDESKTOP_H_INSIDE__) && !defined (GDESKTOP_COMPILATION)
+#error "Only <gsettings-desktop-schemas.h> can be included directly."
+#endif
+
+#ifndef GDESKTOP_TYPE_BUILTINS_H
+#define GDESKTOP_TYPE_BUILTINS_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+
+/* enumerations from "@filename@" */
+/*** END file-production ***/
+
+/*** BEGIN value-header ***/
+GType @enum_name _get_type (void);
+#define GDESKTOP_TYPE_ ENUMSHORT@ (@enum_name _get_type ())
+/*** END value-header ***/
+
+/*** BEGIN file-tail ***/
+G_END_DECLS
+
+#endif /* !GDESKTOP_TYPE_BUILTINS_H */
+/*** END file-tail ***/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]