From 190cece94e3e97cd85e61e994214cb01ea2d610f Mon Sep 17 00:00:00 2001 From: Nicolas Bruguier Date: Sat, 29 Nov 2008 14:08:26 +0100 Subject: [glitz] Add doc skeleton. Add gtk-doc skeleton, documentation is really a missing piece of glitz. --- Makefile.am | 4 +- configure.in | 17 +- doc/Makefile.am | 4 + doc/reference/Makefile.am | 67 ++++++ doc/reference/check-doc-coverage.sh | 45 ++++ doc/reference/check-doc-syntax.sh | 11 + doc/reference/glitz-docs.xml | 32 +++ doc/reference/glitz-overrides.txt | 0 doc/reference/glitz-sections.txt | 272 ++++++++++++++++++++++ doc/reference/glitz-undeclared.txt | 0 doc/reference/glitz-undocumented.txt | 239 +++++++++++++++++++ doc/reference/glitz.types | 0 doc/reference/tmpl/glitz-agl.sgml | 78 +++++++ doc/reference/tmpl/glitz-buffer.sgml | 139 +++++++++++ doc/reference/tmpl/glitz-context.sgml | 157 +++++++++++++ doc/reference/tmpl/glitz-drawable.sgml | 159 +++++++++++++ doc/reference/tmpl/glitz-drawing.sgml | 259 +++++++++++++++++++++ doc/reference/tmpl/glitz-egl.sgml | 87 +++++++ doc/reference/tmpl/glitz-formats.sgml | 228 ++++++++++++++++++ doc/reference/tmpl/glitz-formats.sgml.sgml | 228 ++++++++++++++++++ doc/reference/tmpl/glitz-glx.sgml | 155 +++++++++++++ doc/reference/tmpl/glitz-pixels.sgml | 78 +++++++ doc/reference/tmpl/glitz-surface.sgml | 241 +++++++++++++++++++ doc/reference/tmpl/glitz-texture.sgml | 135 +++++++++++ doc/reference/tmpl/glitz-types.sgml | 356 +++++++++++++++++++++++++++++ doc/reference/tmpl/glitz-unused.sgml | 0 doc/reference/tmpl/glitz-wgl.sgml | 96 ++++++++ doc/reference/version.xml.in | 1 + gtk-doc.make | 157 +++++++++++++ 29 files changed, 3241 insertions(+), 4 deletions(-) create mode 100644 doc/Makefile.am create mode 100644 doc/reference/Makefile.am create mode 100755 doc/reference/check-doc-coverage.sh create mode 100755 doc/reference/check-doc-syntax.sh create mode 100644 doc/reference/glitz-docs.xml create mode 100644 doc/reference/glitz-overrides.txt create mode 100644 doc/reference/glitz-sections.txt create mode 100644 doc/reference/glitz-undeclared.txt create mode 100644 doc/reference/glitz-undocumented.txt create mode 100644 doc/reference/glitz.types create mode 100644 doc/reference/tmpl/glitz-agl.sgml create mode 100644 doc/reference/tmpl/glitz-buffer.sgml create mode 100644 doc/reference/tmpl/glitz-context.sgml create mode 100644 doc/reference/tmpl/glitz-drawable.sgml create mode 100644 doc/reference/tmpl/glitz-drawing.sgml create mode 100644 doc/reference/tmpl/glitz-egl.sgml create mode 100644 doc/reference/tmpl/glitz-formats.sgml create mode 100644 doc/reference/tmpl/glitz-formats.sgml.sgml create mode 100644 doc/reference/tmpl/glitz-glx.sgml create mode 100644 doc/reference/tmpl/glitz-pixels.sgml create mode 100644 doc/reference/tmpl/glitz-surface.sgml create mode 100644 doc/reference/tmpl/glitz-texture.sgml create mode 100644 doc/reference/tmpl/glitz-types.sgml create mode 100644 doc/reference/tmpl/glitz-unused.sgml create mode 100644 doc/reference/tmpl/glitz-wgl.sgml create mode 100644 doc/reference/version.xml.in create mode 100644 gtk-doc.make diff --git a/Makefile.am b/Makefile.am index 9a7a255..a27bf61 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,3 @@ -SUBDIRS = . src examples +SUBDIRS = . src doc examples -EXTRA_DIST = COPYING +EXTRA_DIST = COPYING gtk-doc.make diff --git a/configure.in b/configure.in index 7e8461f..e2394cc 100644 --- a/configure.in +++ b/configure.in @@ -2,9 +2,11 @@ # Package version number, (as distinct from shared library version) # This must be manually synchronized with the version in src/glitz.h -m4_define([GLITZ_VERSION], 0.5.7) +m4_define(glitz_version_major, 0) +m4_define(glitz_version_minor, 5) +m4_define(glitz_version_micro, 7) -AC_INIT(glitz, [GLITZ_VERSION]) +AC_INIT(glitz, [glitz_version_major.glitz_version_minor.glitz_version_micro]) AC_CONFIG_AUX_DIR(config) @@ -13,6 +15,9 @@ AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE +GLITZ_VERSION=glitz_version_major().glitz_version_minor().glitz_version_micro() +AC_SUBST(GLITZ_VERSION) + dnl =========================================================================== # libtool shared library version @@ -100,6 +105,11 @@ GLITZ_INC='-I$(top_builddir)/src' AC_SUBST(GLITZ_LIB) AC_SUBST(GLITZ_INC) +dnl =========================================================================== +dnl Check for gtk-doc and docbook + +GTK_DOC_CHECK([1.6]) + dnl =========================================================================== PKG_PROG_PKG_CONFIG @@ -333,6 +343,9 @@ src/glx/glitz-glx.pc src/agl/glitz-agl.pc src/egl/glitz-egl.pc src/wgl/glitz-wgl.pc +doc/Makefile +doc/reference/Makefile +doc/reference/version.xml examples/Makefile examples/cairogears/Makefile examples/glitzinfo/Makefile diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..b4e27b3 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,4 @@ +SUBDIRS=reference +.PHONY: doc +doc: + cd reference && $(MAKE) $(AM_MAKEFLAGS) doc diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am new file mode 100644 index 0000000..1158612 --- /dev/null +++ b/doc/reference/Makefile.am @@ -0,0 +1,67 @@ +## Process this file with automake to create Makefile.in. + +# The name of the module. +DOC_MODULE=glitz + +# The top-level SGML file. +DOC_MAIN_SGML_FILE=glitz-docs.xml + +# Extra options to supply to gtkdoc-scan +SCAN_OPTIONS= + +# The directory containing the source code. Relative to $(srcdir) +DOC_SOURCE_DIR=../../src + +# Used for dependencies +HFILE_GLOB=$(top_srcdir)/src/*.h $(top_srcdir)/src/glx/*.h +CFILE_GLOB=$(top_srcdir)/src/*.c $(top_srcdir)/src/*.h $(top_srcdir)/src/glx/*.c $(top_srcdir)/src/glx/*.h + +UNSUPPORTED_HFILES= glitzint.h \ + glitz_gl.h \ + glitz_trapimp.h \ + glitz_glxext.h \ + glitz_glxint.h \ + glitz_aglext.h \ + glitz_aglint.h \ + glitz_eglext.h \ + glitz_eglint.h \ + glitz_wglext.h \ + glitz_wglint.h + +# Headers to ignore +IGNORE_HFILES= \ + $(UNSUPPORTED_HFILES) + +# CFLAGS and LDFLAGS for compiling scan program. Only needed +# if $(DOC_MODULE).types is non-empty. +INCLUDES = +GTKDOC_LIBS = + +# Extra options to supply to gtkdoc-mkdb +MKDB_OPTIONS=--sgml-mode --output-format=xml + +# Extra options to supply to gtkdoc-mktmpl +MKTMPL_OPTIONS= + +# Non-autogenerated SGML files to be included in $(DOC_MAIN_SGML_FILE) +content_files = \ + version.xml + +# Images to copy into HTML directory +HTML_IMAGES = + +# Extra options to supply to gtkdoc-fixref +FIXXREF_OPTIONS= + +include $(top_srcdir)/gtk-doc.make + +# Version information for marking the documentation +EXTRA_DIST += version.xml.in + +if ENABLE_GTK_DOC +check: doc +endif + +TESTS_ENVIRONMENT = srcdir="$(srcdir)" top_srcdir="$(top_srcdir)" MAKE="$(MAKE)" +TESTS = check-doc-coverage.sh check-doc-syntax.sh +EXTRA_DIST += $(TESTS) diff --git a/doc/reference/check-doc-coverage.sh b/doc/reference/check-doc-coverage.sh new file mode 100755 index 0000000..aa1ee52 --- /dev/null +++ b/doc/reference/check-doc-coverage.sh @@ -0,0 +1,45 @@ +#!/bin/sh + +LANG=C +if test -z "$DOC_MODULE"; then + # extract from Makefile + eval `grep '^DOC_MODULE' Makefile | sed 's/ //g'` + if test -z "$DOC_MODULE"; then + echo Failed extracting DOC_MODULE from Makefile 1>&2 + echo Try setting DOC_MODULE env var manually 1>&2 + exit 1 + fi +fi + + +test -z "$srcdir" && srcdir=. +stat=0 + +if test -f "$DOC_MODULE-undocumented.txt" -a -f "$DOC_MODULE-unused.txt"; then + : +else + echo At least one of "$DOC_MODULE-undocumented.txt" and "$DOC_MODULE-unused.txt" not found. + echo Skipping test. + exit 0 +fi + +if test -f "$DOC_MODULE-unused.txt"; then + unused=`cat "$DOC_MODULE-unused.txt"` + if test -n "$unused"; then + echo Unused documentated symbols: 1>&2 + cat "$DOC_MODULE-unused.txt" 1>&2 + stat=1 + fi +fi +if test -f "$DOC_MODULE-undocumented.txt"; then + if grep '^0 symbols incomplete' "$DOC_MODULE-undocumented.txt" >/dev/null && + grep '^0 not documented' "$DOC_MODULE-undocumented.txt" >/dev/null; then + : + else + echo Incomplete or undocumented symbols: 1>&2 + cat "$DOC_MODULE-undocumented.txt" 1>&2 + stat=1 + fi +fi + +exit $stat diff --git a/doc/reference/check-doc-syntax.sh b/doc/reference/check-doc-syntax.sh new file mode 100755 index 0000000..c446d26 --- /dev/null +++ b/doc/reference/check-doc-syntax.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +LANG=C + +test -z "$srcdir" && srcdir=. +test -z "$top_srcdir" && top_srcdir=$srcdir/../.. + +SGML_DOCS=true +FILES=`echo $srcdir/tmpl/*.sgml` + +. "$top_srcdir/src/check-doc-syntax.sh" diff --git a/doc/reference/glitz-docs.xml b/doc/reference/glitz-docs.xml new file mode 100644 index 0000000..e8fff21 --- /dev/null +++ b/doc/reference/glitz-docs.xml @@ -0,0 +1,32 @@ + + +]> + +Glitz: An OpenGL image compositing Library + + Glitz: An OpenGL image compositing Library + for Glitz &version; + + + + Glitz core + + + + + + + + + + + + Glitz backends + + + + + + diff --git a/doc/reference/glitz-overrides.txt b/doc/reference/glitz-overrides.txt new file mode 100644 index 0000000..e69de29 diff --git a/doc/reference/glitz-sections.txt b/doc/reference/glitz-sections.txt new file mode 100644 index 0000000..5f4bdd5 --- /dev/null +++ b/doc/reference/glitz-sections.txt @@ -0,0 +1,272 @@ +
+glitz-types +Types +glitz_bool_t +glitz_short_t +glitz_int_t +glitz_float_t +glitz_double_t +glitz_fixed16_16_t +glitz_drawable_t +glitz_surface_t +glitz_rectangle_t +glitz_box_t +glitz_point_fixed_t +glitz_line_fixed_t +glitz_trapezoid_t +glitz_span_fixed_t +glitz_trap_t +glitz_transform_t +glitz_color_t +glitz_filter_t +glitz_operator_t +glitz_status_t +glitz_status_string +glitz_gl_string_t +glitz_fill_t +GLITZ_FEATURE_TEXTURE_RECTANGLE_MASK +GLITZ_FEATURE_TEXTURE_NON_POWER_OF_TWO_MASK +GLITZ_FEATURE_TEXTURE_MIRRORED_REPEAT_MASK +GLITZ_FEATURE_TEXTURE_BORDER_CLAMP_MASK +GLITZ_FEATURE_MULTISAMPLE_MASK +GLITZ_FEATURE_MULTISAMPLE_FILTER_HINT_MASK +GLITZ_FEATURE_MULTITEXTURE_MASK +GLITZ_FEATURE_TEXTURE_ENV_COMBINE_MASK +GLITZ_FEATURE_TEXTURE_ENV_DOT3_MASK +GLITZ_FEATURE_FRAGMENT_PROGRAM_MASK +GLITZ_FEATURE_VERTEX_BUFFER_OBJECT_MASK +GLITZ_FEATURE_PIXEL_BUFFER_OBJECT_MASK +GLITZ_FEATURE_PER_COMPONENT_RENDERING_MASK +GLITZ_FEATURE_BLEND_COLOR_MASK +GLITZ_FEATURE_PACKED_PIXELS_MASK +GLITZ_FEATURE_MULTI_DRAW_ARRAYS_MASK +GLITZ_FEATURE_FRAMEBUFFER_OBJECT_MASK +GLITZ_FEATURE_COPY_SUB_BUFFER_MASK +GLITZ_FEATURE_DIRECT_RENDERING_MASK +GLITZ_FEATURE_TEXTURE_FROM_PIXMAP_MASK +
+ +
+glitz-formats +Formats +glitz_format_name_t +GLITZ_FORMAT_ID_MASK +GLITZ_FORMAT_RED_SIZE_MASK +GLITZ_FORMAT_GREEN_SIZE_MASK +GLITZ_FORMAT_BLUE_SIZE_MASK +GLITZ_FORMAT_ALPHA_SIZE_MASK +glitz_format_id_t +glitz_fourcc_t +GLITZ_FORMAT_FOURCC_MASK +GLITZ_FOURCC +GLITZ_FOURCC_RGB +GLITZ_FOURCC_YV12 +GLITZ_FOURCC_YUY2 +glitz_color_format_t +GLITZ_FORMAT_DEPTH_SIZE_MASK +GLITZ_FORMAT_STENCIL_SIZE_MASK +GLITZ_FORMAT_DOUBLEBUFFER_MASK +GLITZ_FORMAT_SAMPLES_MASK +GLITZ_FORMAT_Y_INVERTED_MASK +glitz_drawable_format_t +glitz_format_t +glitz_find_standard_format +glitz_find_format +glitz_find_drawable_format +glitz_find_pbuffer_format +
+ + +
+glitz-drawable +Drawable +glitz_drawable_buffer_t +glitz_create_drawable +glitz_create_pbuffer_drawable +glitz_drawable_destroy +glitz_drawable_reference +glitz_drawable_update_size +glitz_drawable_get_width +glitz_drawable_get_height +glitz_drawable_swap_buffer_region +glitz_drawable_swap_buffers +glitz_drawable_flush +glitz_drawable_finish +glitz_drawable_get_features +glitz_drawable_get_format +glitz_drawable_get_gl_string +
+ +
+glitz-surface +Surface +GLITZ_SURFACE_UNNORMALIZED_MASK +glitz_surface_attributes_t +glitz_surface_create +glitz_surface_destroy +glitz_surface_reference +glitz_surface_attach +glitz_surface_detach +glitz_surface_flush +glitz_surface_get_drawable +glitz_surface_get_attached_drawable +glitz_surface_set_transform +glitz_surface_set_fill +glitz_surface_set_component_alpha +glitz_surface_set_filter +glitz_surface_set_dither +glitz_surface_get_width +glitz_surface_get_height +glitz_surface_get_status +glitz_surface_get_format +glitz_surface_translate_point +glitz_surface_set_clip_region +glitz_surface_valid_target +glitz_surface_bind_tex_image +glitz_surface_release_tex_image +
+ +
+glitz-texture +Texture +glitz_texture_object_t +glitz_texture_object_create +glitz_texture_object_destroy +glitz_texture_object_reference +glitz_texture_filter_type_t +glitz_texture_filter_t +glitz_texture_object_set_filter +glitz_texture_wrap_type_t +glitz_texture_wrap_t +glitz_texture_object_set_wrap +glitz_texture_object_set_border_color +glitz_texture_target_t +glitz_texture_object_get_target +
+ +
+glitz-context +Context +glitz_context_t +glitz_context_create +glitz_context_destroy +glitz_context_reference +glitz_context_copy +glitz_lose_current_function_t +glitz_context_set_user_data +glitz_function_pointer_t +glitz_context_get_proc_address +glitz_context_make_current +glitz_context_bind_texture +glitz_context_draw_buffers +glitz_context_read_buffer +glitz_set_rectangle +glitz_set_rectangles +
+ +
+glitz-buffer +Buffer +glitz_buffer_t +glitz_buffer_hint_t +glitz_buffer_access_t +glitz_vertex_buffer_create +glitz_pixel_buffer_create +glitz_buffer_create_for_data +glitz_buffer_destroy +glitz_buffer_reference +glitz_buffer_set_data +glitz_buffer_get_data +glitz_buffer_map +glitz_buffer_unmap +
+ +
+glitz-pixels +Pixel operations +glitz_pixel_scanline_order_t +glitz_pixel_masks_t +glitz_pixel_format_t +glitz_set_pixels +glitz_get_pixels +
+ +
+glitz-drawing +Drawing +glitz_primitive_t +glitz_data_type_t +glitz_coordinate_size_t +glitz_coordinate_attribute_t +GLITZ_VERTEX_ATTRIBUTE_SRC_COORD_MASK +GLITZ_VERTEX_ATTRIBUTE_MASK_COORD_MASK +glitz_vertex_format_t +glitz_bitmap_format_t +glitz_geometry_type_t +glitz_set_geometry +glitz_set_array +glitz_multi_array_t +glitz_multi_array_create +glitz_multi_array_destroy +glitz_multi_array_reference +glitz_multi_array_add +glitz_multi_array_reset +glitz_set_multi_array +glitz_add_trapezoids +glitz_add_traps +glitz_composite +glitz_copy_area +
+ +
+glitz-agl +AGL Backend +glitz_agl_init +glitz_agl_fini +glitz_agl_find_window_format +glitz_agl_find_pbuffer_format +glitz_agl_create_drawable_for_window +glitz_agl_create_pbuffer_drawable +
+ +
+glitz-egl +EGL Backend +glitz_egl_init +glitz_egl_fini +glitz_egl_find_window_config +glitz_egl_find_pbuffer_config +glitz_egl_create_surface +glitz_egl_create_pbuffer_surface +
+ +
+glitz-glx +GLX Backend +glitz_glx_init +glitz_glx_fini +glitz_glx_set_render_type +glitz_glx_find_window_format +glitz_glx_find_pbuffer_format +glitz_glx_find_drawable_format_for_visual +glitz_glx_get_visual_info_from_format +glitz_glx_get_xdrawable +glitz_glx_create_drawable_for_window +glitz_glx_create_drawable_for_pixmap +glitz_glx_create_pixmap_drawable +glitz_glx_create_pbuffer_drawable +
+ +
+glitz-wgl +WGL Backend +glitz_wgl_thread_starter_arg_t +glitz_wgl_thread_starter +glitz_wgl_init +glitz_wgl_fini +glitz_wgl_find_window_format +glitz_wgl_find_pbuffer_format +glitz_wgl_create_drawable_for_window +glitz_wgl_create_pbuffer_drawable +
+ diff --git a/doc/reference/glitz-undeclared.txt b/doc/reference/glitz-undeclared.txt new file mode 100644 index 0000000..e69de29 diff --git a/doc/reference/glitz-undocumented.txt b/doc/reference/glitz-undocumented.txt new file mode 100644 index 0000000..7ef258c --- /dev/null +++ b/doc/reference/glitz-undocumented.txt @@ -0,0 +1,239 @@ +0% symbol docs coverage. +1 symbols documented. +0 symbols incomplete. +231 not documented. + + +GLITZ_FEATURE_BLEND_COLOR_MASK +GLITZ_FEATURE_COPY_SUB_BUFFER_MASK +GLITZ_FEATURE_DIRECT_RENDERING_MASK +GLITZ_FEATURE_FRAGMENT_PROGRAM_MASK +GLITZ_FEATURE_FRAMEBUFFER_OBJECT_MASK +GLITZ_FEATURE_MULTISAMPLE_FILTER_HINT_MASK +GLITZ_FEATURE_MULTISAMPLE_MASK +GLITZ_FEATURE_MULTITEXTURE_MASK +GLITZ_FEATURE_MULTI_DRAW_ARRAYS_MASK +GLITZ_FEATURE_PACKED_PIXELS_MASK +GLITZ_FEATURE_PER_COMPONENT_RENDERING_MASK +GLITZ_FEATURE_PIXEL_BUFFER_OBJECT_MASK +GLITZ_FEATURE_TEXTURE_BORDER_CLAMP_MASK +GLITZ_FEATURE_TEXTURE_ENV_COMBINE_MASK +GLITZ_FEATURE_TEXTURE_ENV_DOT3_MASK +GLITZ_FEATURE_TEXTURE_FROM_PIXMAP_MASK +GLITZ_FEATURE_TEXTURE_MIRRORED_REPEAT_MASK +GLITZ_FEATURE_TEXTURE_NON_POWER_OF_TWO_MASK +GLITZ_FEATURE_TEXTURE_RECTANGLE_MASK +GLITZ_FEATURE_VERTEX_BUFFER_OBJECT_MASK +GLITZ_FORMAT_ALPHA_SIZE_MASK +GLITZ_FORMAT_BLUE_SIZE_MASK +GLITZ_FORMAT_DEPTH_SIZE_MASK +GLITZ_FORMAT_DOUBLEBUFFER_MASK +GLITZ_FORMAT_FOURCC_MASK +GLITZ_FORMAT_GREEN_SIZE_MASK +GLITZ_FORMAT_ID_MASK +GLITZ_FORMAT_RED_SIZE_MASK +GLITZ_FORMAT_SAMPLES_MASK +GLITZ_FORMAT_STENCIL_SIZE_MASK +GLITZ_FORMAT_Y_INVERTED_MASK +GLITZ_FOURCC +GLITZ_FOURCC_RGB +GLITZ_FOURCC_YUY2 +GLITZ_FOURCC_YV12 +GLITZ_SURFACE_UNNORMALIZED_MASK +GLITZ_VERTEX_ATTRIBUTE_MASK_COORD_MASK +GLITZ_VERTEX_ATTRIBUTE_SRC_COORD_MASK +glitz_add_trapezoids +glitz_add_traps +glitz_agl_create_drawable_for_window +glitz_agl_create_pbuffer_drawable +glitz_agl_find_pbuffer_format +glitz_agl_find_window_format +glitz_agl_fini +glitz_agl_init +glitz_bitmap_format_t +glitz_bool_t +glitz_box_t +glitz_buffer_access_t +glitz_buffer_create_for_data +glitz_buffer_destroy +glitz_buffer_get_data +glitz_buffer_hint_t +glitz_buffer_map +glitz_buffer_reference +glitz_buffer_set_data +glitz_buffer_t +glitz_buffer_unmap +glitz_color_format_t +glitz_color_t +glitz_composite +glitz_context_bind_texture +glitz_context_copy +glitz_context_create +glitz_context_destroy +glitz_context_draw_buffers +glitz_context_get_proc_address +glitz_context_make_current +glitz_context_read_buffer +glitz_context_reference +glitz_context_set_user_data +glitz_context_t +glitz_coordinate_attribute_t +glitz_coordinate_size_t +glitz_copy_area +glitz_create_drawable +glitz_create_pbuffer_drawable +glitz_data_type_t +glitz_double_t +glitz_drawable_buffer_t +glitz_drawable_destroy +glitz_drawable_finish +glitz_drawable_flush +glitz_drawable_format_t +glitz_drawable_get_features +glitz_drawable_get_format +glitz_drawable_get_gl_string +glitz_drawable_get_height +glitz_drawable_get_width +glitz_drawable_reference +glitz_drawable_swap_buffer_region +glitz_drawable_swap_buffers +glitz_drawable_t +glitz_drawable_update_size +glitz_egl_create_pbuffer_surface +glitz_egl_create_surface +glitz_egl_find_pbuffer_config +glitz_egl_find_window_config +glitz_egl_fini +glitz_egl_init +glitz_fill_t +glitz_filter_t +glitz_find_drawable_format +glitz_find_format +glitz_find_pbuffer_format +glitz_find_standard_format +glitz_fixed16_16_t +glitz_float_t +glitz_format_id_t +glitz_format_name_t +glitz_format_t +glitz_fourcc_t +glitz_function_pointer_t +glitz_geometry_type_t +glitz_get_pixels +glitz_gl_string_t +glitz_glx_create_drawable_for_pixmap +glitz_glx_create_drawable_for_window +glitz_glx_create_pbuffer_drawable +glitz_glx_create_pixmap_drawable +glitz_glx_find_drawable_format_for_visual +glitz_glx_find_pbuffer_format +glitz_glx_find_window_format +glitz_glx_fini +glitz_glx_get_visual_info_from_format +glitz_glx_get_xdrawable +glitz_glx_init +glitz_glx_set_render_type +glitz_int_t +glitz_line_fixed_t +glitz_lose_current_function_t +glitz_multi_array_add +glitz_multi_array_create +glitz_multi_array_destroy +glitz_multi_array_reference +glitz_multi_array_reset +glitz_multi_array_t +glitz_operator_t +glitz_pixel_buffer_create +glitz_pixel_format_t +glitz_pixel_masks_t +glitz_pixel_scanline_order_t +glitz_point_fixed_t +glitz_primitive_t +glitz_rectangle_t +glitz_set_array +glitz_set_geometry +glitz_set_multi_array +glitz_set_pixels +glitz_set_rectangle +glitz_set_rectangles +glitz_short_t +glitz_span_fixed_t +glitz_status_string +glitz_status_t +glitz_surface_attach +glitz_surface_attributes_t +glitz_surface_bind_tex_image +glitz_surface_create +glitz_surface_destroy +glitz_surface_detach +glitz_surface_flush +glitz_surface_get_attached_drawable +glitz_surface_get_drawable +glitz_surface_get_format +glitz_surface_get_height +glitz_surface_get_status +glitz_surface_get_width +glitz_surface_reference +glitz_surface_release_tex_image +glitz_surface_set_clip_region +glitz_surface_set_component_alpha +glitz_surface_set_dither +glitz_surface_set_fill +glitz_surface_set_filter +glitz_surface_set_transform +glitz_surface_t +glitz_surface_translate_point +glitz_surface_valid_target +glitz_texture_filter_t +glitz_texture_filter_type_t +glitz_texture_object_create +glitz_texture_object_destroy +glitz_texture_object_get_target +glitz_texture_object_reference +glitz_texture_object_set_border_color +glitz_texture_object_set_filter +glitz_texture_object_set_wrap +glitz_texture_object_t +glitz_texture_target_t +glitz_texture_wrap_t +glitz_texture_wrap_type_t +glitz_transform_t +glitz_trap_t +glitz_trapezoid_t +glitz_vertex_buffer_create +glitz_vertex_format_t +glitz_wgl_create_drawable_for_window +glitz_wgl_create_pbuffer_drawable +glitz_wgl_find_pbuffer_format +glitz_wgl_find_window_format +glitz_wgl_fini +glitz_wgl_init +glitz_wgl_thread_starter +glitz_wgl_thread_starter_arg_t + + +glitz-agl:Long_Description +glitz-agl:Short_Description +glitz-buffer:Long_Description +glitz-buffer:Short_Description +glitz-context:Long_Description +glitz-context:Short_Description +glitz-drawable:Long_Description +glitz-drawable:Short_Description +glitz-drawing:Long_Description +glitz-drawing:Short_Description +glitz-egl:Long_Description +glitz-egl:Short_Description +glitz-formats:Long_Description +glitz-formats:Short_Description +glitz-glx:Long_Description +glitz-glx:Short_Description +glitz-pixels:Long_Description +glitz-pixels:Short_Description +glitz-surface:Long_Description +glitz-surface:Short_Description +glitz-texture:Long_Description +glitz-texture:Short_Description +glitz-types:Long_Description +glitz-types:Short_Description +glitz-wgl:Short_Description diff --git a/doc/reference/glitz.types b/doc/reference/glitz.types new file mode 100644 index 0000000..e69de29 diff --git a/doc/reference/tmpl/glitz-agl.sgml b/doc/reference/tmpl/glitz-agl.sgml new file mode 100644 index 0000000..9addef7 --- /dev/null +++ b/doc/reference/tmpl/glitz-agl.sgml @@ -0,0 +1,78 @@ + +AGL Backend + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@mask: +@templ: +@count: +@Returns: + + + + + + + +@mask: +@templ: +@count: +@Returns: + + + + + + + +@format: +@window: +@width: +@height: +@Returns: + + + + + + + +@format: +@width: +@height: +@Returns: + + diff --git a/doc/reference/tmpl/glitz-buffer.sgml b/doc/reference/tmpl/glitz-buffer.sgml new file mode 100644 index 0000000..373be3a --- /dev/null +++ b/doc/reference/tmpl/glitz-buffer.sgml @@ -0,0 +1,139 @@ + +Buffer + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@GLITZ_BUFFER_HINT_STREAM_DRAW: +@GLITZ_BUFFER_HINT_STREAM_READ: +@GLITZ_BUFFER_HINT_STREAM_COPY: +@GLITZ_BUFFER_HINT_STATIC_DRAW: +@GLITZ_BUFFER_HINT_STATIC_READ: +@GLITZ_BUFFER_HINT_STATIC_COPY: +@GLITZ_BUFFER_HINT_DYNAMIC_DRAW: +@GLITZ_BUFFER_HINT_DYNAMIC_READ: +@GLITZ_BUFFER_HINT_DYNAMIC_COPY: + + + + + + +@GLITZ_BUFFER_ACCESS_READ_ONLY: +@GLITZ_BUFFER_ACCESS_WRITE_ONLY: +@GLITZ_BUFFER_ACCESS_READ_WRITE: + + + + + + +@drawable: +@data: +@size: +@hint: +@Returns: + + + + + + + +@drawable: +@data: +@size: +@hint: +@Returns: + + + + + + + +@data: +@Returns: + + + + + + + +@buffer: + + + + + + + +@buffer: + + + + + + + +@buffer: +@offset: +@size: +@data: + + + + + + + +@buffer: +@offset: +@size: +@data: + + + + + + + +@buffer: +@access: +@Returns: + + + + + + + +@buffer: +@Returns: + + diff --git a/doc/reference/tmpl/glitz-context.sgml b/doc/reference/tmpl/glitz-context.sgml new file mode 100644 index 0000000..26a45c4 --- /dev/null +++ b/doc/reference/tmpl/glitz-context.sgml @@ -0,0 +1,157 @@ + +Context + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@drawable: +@format: +@Returns: + + + + + + + +@context: + + + + + + + +@context: + + + + + + + +@src: +@dst: +@mask: + + + + + + + +@closure: + + + + + + + +@context: +@closure: +@lose_current: + + + + + + + + + + + + + + +@context: +@name: +@Returns: + + + + + + + +@context: +@drawable: + + + + + + + +@context: +@texture: + + + + + + + +@context: +@buffers: +@n: + + + + + + + +@context: +@buffer: + + + + + + + +@dst: +@color: +@x: +@y: +@width: +@height: + + + + + + + +@dst: +@color: +@rects: +@n_rects: + + diff --git a/doc/reference/tmpl/glitz-drawable.sgml b/doc/reference/tmpl/glitz-drawable.sgml new file mode 100644 index 0000000..59640bc --- /dev/null +++ b/doc/reference/tmpl/glitz-drawable.sgml @@ -0,0 +1,159 @@ + +Drawable + + + + + + + + + + + + + + + + + + + + + + +@GLITZ_DRAWABLE_BUFFER_FRONT_COLOR: +@GLITZ_DRAWABLE_BUFFER_BACK_COLOR: + + + + + + +@other: +@format: +@width: +@height: +@Returns: + + + + + + + +@other: +@format: +@width: +@height: +@Returns: + + + + + + + +@drawable: + + + + + + + +@drawable: + + + + + + + +@drawable: +@width: +@height: + + + + + + + +@drawable: +@Returns: + + + + + + + +@drawable: +@Returns: + + + + + + + +@drawable: +@x_origin: +@y_origin: +@box: +@n_box: + + + + + + + +@drawable: + + + + + + + +@drawable: + + + + + + + +@drawable: + + + + + + + +@drawable: +@Returns: + + + + + + + +@drawable: +@Returns: + + + + + + + +@drawable: +@name: +@Returns: + + diff --git a/doc/reference/tmpl/glitz-drawing.sgml b/doc/reference/tmpl/glitz-drawing.sgml new file mode 100644 index 0000000..3c6252a --- /dev/null +++ b/doc/reference/tmpl/glitz-drawing.sgml @@ -0,0 +1,259 @@ + +Drawing + + + + + + + + + + + + + + + + + + + + + + +@GLITZ_PRIMITIVE_POINTS: +@GLITZ_PRIMITIVE_LINES: +@GLITZ_PRIMITIVE_LINE_STRIP: +@GLITZ_PRIMITIVE_LINE_LOOP: +@GLITZ_PRIMITIVE_TRIANGLES: +@GLITZ_PRIMITIVE_TRIANGLE_STRIP: +@GLITZ_PRIMITIVE_TRIANGLE_FAN: +@GLITZ_PRIMITIVE_QUADS: +@GLITZ_PRIMITIVE_QUAD_STRIP: +@GLITZ_PRIMITIVE_POLYGON: + + + + + + +@GLITZ_DATA_TYPE_SHORT: +@GLITZ_DATA_TYPE_INT: +@GLITZ_DATA_TYPE_FLOAT: +@GLITZ_DATA_TYPE_DOUBLE: + + + + + + +@GLITZ_COORDINATE_SIZE_X: +@GLITZ_COORDINATE_SIZE_XY: + + + + + + +@type: +@size: +@offset: + + + + + + + + + + + + + + + + + + + + +@primitive: +@type: +@bytes_per_vertex: +@attributes: +@src: +@mask: + + + + + + +@scanline_order: +@bytes_per_line: +@pad: + + + + + + +@GLITZ_GEOMETRY_TYPE_NONE: +@GLITZ_GEOMETRY_TYPE_VERTEX: +@GLITZ_GEOMETRY_TYPE_BITMAP: + + + + + + +@dst: +@type: +@format: +@buffer: + + + + + + + +@dst: +@first: +@size: +@count: +@x_off: +@y_off: + + + + + + + + + + + + + +@size: +@Returns: + + + + + + + +@array: + + + + + + + +@array: + + + + + + + +@array: +@first: +@size: +@count: +@x_off: +@y_off: + + + + + + + +@array: + + + + + + + +@dst: +@array: +@x_off: +@y_off: + + + + + + + +@buffer: +@offset: +@size: +@type: +@mask: +@traps: +@n_traps: +@n_added: +@Returns: + + + + + + + +@buffer: +@offset: +@size: +@type: +@mask: +@traps: +@n_traps: +@n_added: +@Returns: + + + + + + + +@op: +@src: +@mask: +@dst: +@x_src: +@y_src: +@x_mask: +@y_mask: +@x_dst: +@y_dst: +@width: +@height: + + + + + + + +@src: +@dst: +@x_src: +@y_src: +@width: +@height: +@x_dst: +@y_dst: + + diff --git a/doc/reference/tmpl/glitz-egl.sgml b/doc/reference/tmpl/glitz-egl.sgml new file mode 100644 index 0000000..973443e --- /dev/null +++ b/doc/reference/tmpl/glitz-egl.sgml @@ -0,0 +1,87 @@ + +EGL Backend + + + + + + + + + + + + + + + + + + + + + + +@gl_library: + + + + + + + + + + + + + + +@egl_display: +@egl_screen: +@mask: +@templ: +@count: +@Returns: + + + + + + + +@egl_display: +@egl_screen: +@mask: +@templ: +@count: +@Returns: + + + + + + + +@egl_display: +@egl_screen: +@format: +@egl_surface: +@width: +@height: +@Returns: + + + + + + + +@egl_display: +@egl_screen: +@format: +@width: +@height: +@Returns: + + diff --git a/doc/reference/tmpl/glitz-formats.sgml b/doc/reference/tmpl/glitz-formats.sgml new file mode 100644 index 0000000..937c253 --- /dev/null +++ b/doc/reference/tmpl/glitz-formats.sgml @@ -0,0 +1,228 @@ + +Formats + + + + + + + + + + + + + + + + + + + + + + +@GLITZ_STANDARD_ARGB32: +@GLITZ_STANDARD_RGB24: +@GLITZ_STANDARD_A8: +@GLITZ_STANDARD_A1: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@a: +@b: +@c: +@d: + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@fourcc: +@red_size: +@green_size: +@blue_size: +@alpha_size: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@id: +@color: +@depth_size: +@stencil_size: +@samples: +@doublebuffer: +@y_inverted: + + + + + + +@id: +@color: + + + + + + +@drawable: +@format_name: +@Returns: + + + + + + + +@drawable: +@mask: +@templ: +@count: +@Returns: + + + + + + + +@other: +@mask: +@templ: +@count: +@Returns: + + + + + + + +@other: +@mask: +@templ: +@count: +@Returns: + + diff --git a/doc/reference/tmpl/glitz-formats.sgml.sgml b/doc/reference/tmpl/glitz-formats.sgml.sgml new file mode 100644 index 0000000..dc5b2cb --- /dev/null +++ b/doc/reference/tmpl/glitz-formats.sgml.sgml @@ -0,0 +1,228 @@ + +glitz-formats.sgml + + + + + + + + + + + + + + + + + + + + + + +@GLITZ_STANDARD_ARGB32: +@GLITZ_STANDARD_RGB24: +@GLITZ_STANDARD_A8: +@GLITZ_STANDARD_A1: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@a: +@b: +@c: +@d: + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@fourcc: +@red_size: +@green_size: +@blue_size: +@alpha_size: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@id: +@color: +@depth_size: +@stencil_size: +@samples: +@doublebuffer: +@y_inverted: + + + + + + +@id: +@color: + + + + + + +@drawable: +@format_name: +@Returns: + + + + + + + +@drawable: +@mask: +@templ: +@count: +@Returns: + + + + + + + +@other: +@mask: +@templ: +@count: +@Returns: + + + + + + + +@other: +@mask: +@templ: +@count: +@Returns: + + diff --git a/doc/reference/tmpl/glitz-glx.sgml b/doc/reference/tmpl/glitz-glx.sgml new file mode 100644 index 0000000..2bd9294 --- /dev/null +++ b/doc/reference/tmpl/glitz-glx.sgml @@ -0,0 +1,155 @@ + +GLX Backend + + + + + + + + + + + + + + + + + + + + + + +@gl_library: + + + + + + + + + + + + + + +@display: +@screen: +@direct: + + + + + + + +@display: +@screen: +@mask: +@templ: +@count: +@Returns: + + + + + + + +@display: +@screen: +@mask: +@templ: +@count: +@Returns: + + + + + + + +@display: +@screen: +@visual_id: +@Returns: + + + + + + + +@display: +@screen: +@format: +@Returns: + + + + + + + +@drawable: +@Returns: + + + + + + + +@display: +@screen: +@format: +@window: +@width: +@height: +@Returns: + + + + + + + +@display: +@screen: +@format: +@pixmap: +@width: +@height: +@Returns: + + + + + + + +@display: +@screen: +@format: +@width: +@height: +@Returns: + + + + + + + +@display: +@screen: +@format: +@width: +@height: +@Returns: + + diff --git a/doc/reference/tmpl/glitz-pixels.sgml b/doc/reference/tmpl/glitz-pixels.sgml new file mode 100644 index 0000000..9f4b7d3 --- /dev/null +++ b/doc/reference/tmpl/glitz-pixels.sgml @@ -0,0 +1,78 @@ + +Pixel operations + + + + + + + + + + + + + + + + + + + + + + +@GLITZ_PIXEL_SCANLINE_ORDER_TOP_DOWN: +@GLITZ_PIXEL_SCANLINE_ORDER_BOTTOM_UP: + + + + + + +@bpp: +@alpha_mask: +@red_mask: +@green_mask: +@blue_mask: + + + + + + +@fourcc: +@masks: +@xoffset: +@skip_lines: +@bytes_per_line: +@scanline_order: + + + + + + +@dst: +@x_dst: +@y_dst: +@width: +@height: +@format: +@buffer: + + + + + + + +@src: +@x_src: +@y_src: +@width: +@height: +@format: +@buffer: + + diff --git a/doc/reference/tmpl/glitz-surface.sgml b/doc/reference/tmpl/glitz-surface.sgml new file mode 100644 index 0000000..9604c03 --- /dev/null +++ b/doc/reference/tmpl/glitz-surface.sgml @@ -0,0 +1,241 @@ + +Surface + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@unnormalized: + + + + + + +@drawable: +@format: +@width: +@height: +@mask: +@attributes: +@Returns: + + + + + + + +@surface: + + + + + + + +@surface: + + + + + + + +@surface: +@drawable: +@buffer: + + + + + + + +@surface: + + + + + + + +@surface: + + + + + + + +@surface: +@Returns: + + + + + + + +@surface: +@Returns: + + + + + + + +@surface: +@transform: + + + + + + + +@surface: +@fill: + + + + + + + +@surface: +@component_alpha: + + + + + + + +@surface: +@filter: +@params: +@n_params: + + + + + + + +@surface: +@dither: + + + + + + + +@surface: +@Returns: + + + + + + + +@surface: +@Returns: + + + + + + + +@surface: +@Returns: + + + + + + + +@surface: +@Returns: + + + + + + + +@surface: +@src: +@dst: + + + + + + + +@surface: +@x_origin: +@y_origin: +@box: +@n_box: + + + + + + + +@surface: +@Returns: + + + + + + + +@surface: +@drawable: +@Returns: + + + + + + + +@surface: +@drawable: +@Returns: + + diff --git a/doc/reference/tmpl/glitz-texture.sgml b/doc/reference/tmpl/glitz-texture.sgml new file mode 100644 index 0000000..a8b844e --- /dev/null +++ b/doc/reference/tmpl/glitz-texture.sgml @@ -0,0 +1,135 @@ + +Texture + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@surface: +@Returns: + + + + + + + +@texture: + + + + + + + +@texture: + + + + + + + +@GLITZ_TEXTURE_FILTER_TYPE_MAG: +@GLITZ_TEXTURE_FILTER_TYPE_MIN: + + + + + + +@GLITZ_TEXTURE_FILTER_NEAREST: +@GLITZ_TEXTURE_FILTER_LINEAR: +@GLITZ_TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST: +@GLITZ_TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST: +@GLITZ_TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR: +@GLITZ_TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR: + + + + + + +@texture: +@type: +@filter: + + + + + + + +@GLITZ_TEXTURE_WRAP_TYPE_S: +@GLITZ_TEXTURE_WRAP_TYPE_T: + + + + + + +@GLITZ_TEXTURE_WRAP_CLAMP: +@GLITZ_TEXTURE_WRAP_CLAMP_TO_EDGE: +@GLITZ_TEXTURE_WRAP_CLAMP_TO_BORDER: +@GLITZ_TEXTURE_WRAP_REPEAT: +@GLITZ_TEXTURE_WRAP_MIRRORED_REPEAT: + + + + + + +@texture: +@type: +@wrap: + + + + + + + +@texture: +@color: + + + + + + + +@GLITZ_TEXTURE_TARGET_2D: +@GLITZ_TEXTURE_TARGET_RECT: + + + + + + +@texture: +@Returns: + + diff --git a/doc/reference/tmpl/glitz-types.sgml b/doc/reference/tmpl/glitz-types.sgml new file mode 100644 index 0000000..e3e64ed --- /dev/null +++ b/doc/reference/tmpl/glitz-types.sgml @@ -0,0 +1,356 @@ + +Types + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@y: +@width: +@height: + + + + + + +@y1: +@x2: +@y2: + + + + + + +@x: +@y: + + + + + + +@p1: +@p2: + + + + + + +@top: +@bottom: +@left: +@right: + + + + + + +@left: +@right: +@y: + + + + + + +@top: +@bottom: + + + + + + +@matrix: + + + + + + +@red: +@green: +@blue: +@alpha: + + + + + + +@GLITZ_FILTER_NEAREST: +@GLITZ_FILTER_BILINEAR: +@GLITZ_FILTER_CONVOLUTION: +@GLITZ_FILTER_GAUSSIAN: +@GLITZ_FILTER_LINEAR_GRADIENT: +@GLITZ_FILTER_RADIAL_GRADIENT: + + + + + + +@GLITZ_OPERATOR_CLEAR: +@GLITZ_OPERATOR_SRC: +@GLITZ_OPERATOR_DST: +@GLITZ_OPERATOR_OVER: +@GLITZ_OPERATOR_OVER_REVERSE: +@GLITZ_OPERATOR_IN: +@GLITZ_OPERATOR_IN_REVERSE: +@GLITZ_OPERATOR_OUT: +@GLITZ_OPERATOR_OUT_REVERSE: +@GLITZ_OPERATOR_ATOP: +@GLITZ_OPERATOR_ATOP_REVERSE: +@GLITZ_OPERATOR_XOR: +@GLITZ_OPERATOR_ADD: + + + + + + +@GLITZ_STATUS_SUCCESS: +@GLITZ_STATUS_NO_MEMORY: +@GLITZ_STATUS_BAD_COORDINATE: +@GLITZ_STATUS_NOT_SUPPORTED: +@GLITZ_STATUS_CONTENT_DESTROYED: + + + + + + +@status: +@Returns: + + + + + + + +@GLITZ_GL_STRING_VENDOR: +@GLITZ_GL_STRING_RENDERER: +@GLITZ_GL_STRING_VERSION: +@GLITZ_GL_STRING_EXTENSIONS: + + + + + + +@GLITZ_FILL_TRANSPARENT: +@GLITZ_FILL_NEAREST: +@GLITZ_FILL_REPEAT: +@GLITZ_FILL_REFLECT: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/reference/tmpl/glitz-unused.sgml b/doc/reference/tmpl/glitz-unused.sgml new file mode 100644 index 0000000..e69de29 diff --git a/doc/reference/tmpl/glitz-wgl.sgml b/doc/reference/tmpl/glitz-wgl.sgml new file mode 100644 index 0000000..de235a5 --- /dev/null +++ b/doc/reference/tmpl/glitz-wgl.sgml @@ -0,0 +1,96 @@ + +WGL Backend + + + + + + + + + + + + + + + + + + + + + + +@user_thread_function: +@user_thread_function_arg: + + + + + + +@arg: +@Returns: + + + + + + + +@gl_library: + + + + + + + + + + + + + + +@mask: +@templ: +@count: +@Returns: + + + + + + + +@mask: +@templ: +@count: +@Returns: + + + + + + + +@format: +@window: +@width: +@height: +@Returns: + + + + + + + +@format: +@width: +@height: +@Returns: + + diff --git a/doc/reference/version.xml.in b/doc/reference/version.xml.in new file mode 100644 index 0000000..e23a16d --- /dev/null +++ b/doc/reference/version.xml.in @@ -0,0 +1 @@ +@GLITZ_VERSION@ diff --git a/gtk-doc.make b/gtk-doc.make new file mode 100644 index 0000000..02fc218 --- /dev/null +++ b/gtk-doc.make @@ -0,0 +1,157 @@ +# -*- mode: makefile -*- + +#################################### +# Everything below here is generic # +#################################### + +if GTK_DOC_USE_LIBTOOL +GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) +else +GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) +endif + +# We set GPATH here; this gives us semantics for GNU make +# which are more like other make's VPATH, when it comes to +# whether a source that is a target of one rule is then +# searched for in VPATH/GPATH. +# +GPATH = $(srcdir) + +TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) + +EXTRA_DIST = \ + $(content_files) \ + $(HTML_IMAGES) \ + $(DOC_MAIN_SGML_FILE) \ + $(DOC_MODULE)-sections.txt \ + $(DOC_MODULE)-overrides.txt + +DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ + $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp + +SCANOBJ_FILES = \ + $(DOC_MODULE).args \ + $(DOC_MODULE).hierarchy \ + $(DOC_MODULE).interfaces \ + $(DOC_MODULE).prerequisites \ + $(DOC_MODULE).signals + +CLEANFILES = $(SCANOBJ_FILES) $(DOC_MODULE)-unused.txt $(DOC_STAMPS) + +if ENABLE_GTK_DOC +doc: html-build.stamp + +#### scan #### + +scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) + @echo 'gtk-doc: Scanning header files' + @-chmod -R u+w $(srcdir) + if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ + CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ + else \ + cd $(srcdir) ; \ + for i in $(SCANOBJ_FILES) ; do \ + test -f $$i || touch $$i ; \ + done \ + fi + cd $(srcdir) && \ + gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) + touch scan-build.stamp + +$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp + @true + +#### templates #### + +tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt + @echo 'gtk-doc: Rebuilding template files' + @-chmod -R u+w $(srcdir) + cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) + touch tmpl-build.stamp + +tmpl.stamp: tmpl-build.stamp + @true + +#### xml #### + +sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml $(expand_content_files) + @echo 'gtk-doc: Building XML' + @-chmod -R u+w $(srcdir) + cd $(srcdir) && \ + gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) + touch sgml-build.stamp + +sgml.stamp: sgml-build.stamp + @true + +#### html #### + +dist-hook-local: html-build.stamp + +html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) + @echo 'gtk-doc: Building HTML' + @-chmod -R u+w $(srcdir) + rm -rf $(srcdir)/html + mkdir $(srcdir)/html + cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) + test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) + @echo 'gtk-doc: Fixing cross-references' + cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) + touch html-build.stamp +else +doc: + @echo "*** gtk-doc must be installed and enabled in order to make doc" + @false +endif + +############## + +clean-local: + rm -f *~ *.bak + rm -rf .libs + +maintainer-clean-local: clean + cd $(srcdir) && rm -rf xml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + +install-data-local: + installfiles=`echo $(srcdir)/html/*`; \ + if test "$$installfiles" = '$(srcdir)/html/*'; \ + then echo '-- Nothing to install' ; \ + else \ + $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \ + for i in $$installfiles; do \ + echo '-- Installing '$$i ; \ + $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \ + done; \ + echo '-- Installing $(srcdir)/html/index.sgml' ; \ + $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \ + fi + +uninstall-local: + rm -f $(DESTDIR)$(TARGET_DIR)/* + +# +# Require gtk-doc when making dist +# +if ENABLE_GTK_DOC +dist-check-gtkdoc: +else +dist-check-gtkdoc: + @echo "*** gtk-doc must be installed and enabled in order to make dist" + @false +endif + +dist-hook: dist-check-gtkdoc dist-hook-local + mkdir $(distdir)/tmpl + mkdir $(distdir)/xml + mkdir $(distdir)/html + -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl + -cp $(srcdir)/xml/*.xml $(distdir)/xml + -cp $(srcdir)/html/* $(distdir)/html + if test -f $(srcdir)/$(DOC_MODULE).types; then \ + cp $(srcdir)/$(DOC_MODULE).types $(distdir)/$(DOC_MODULE).types; \ + fi + +.PHONY : dist-hook-local -- cgit v1.2.3