Commit 6d15af34 authored by Chad Versace's avatar Chad Versace

doxygen: Place everything into a module

To ensure this, each file is enclosed in one of two blocks: @defgroup or
@addtogroup.
Signed-off-by: default avatarChad Versace <chad.versace@linux.intel.com>
parent d7c5e21a
......@@ -680,7 +680,10 @@ INPUT_ENCODING = UTF-8
# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
# *.f90 *.f *.for *.vhd *.vhdl
FILE_PATTERNS =
FILE_PATTERNS = \
*.c \
*.doxy_include \
*.h \
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
# should be searched for input files as well. Possible values are YES and NO.
......
......@@ -12,11 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
/// @defgroup waffle_api waffle_api
///
/// @brief Waffle's public API
/// @{
/// @file
/// @brief Convenience header to include all waffle headers.
#pragma once
#include "waffle_attrib_list.h"
#include "waffle_config.h"
#include "waffle_context.h"
......@@ -27,3 +32,5 @@
#include "waffle_init.h"
#include "waffle_visibility.h"
#include "waffle_window.h"
/// @}
\ No newline at end of file
......@@ -12,6 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @defgroup waffle_attrib_list waffle_attrib_list
/// @ingroup waffle_api
/// @{
/// @file
#pragma once
#include <stdbool.h>
......@@ -55,3 +61,5 @@ waffle_attrib_list_update(
#ifdef __cplusplus
} // end extern "C"
#endif
/// @}
......@@ -12,6 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @defgroup waffle_config waffle_config
/// @ingroup waffle_api
/// @{
/// @file
#pragma once
#include <stdbool.h>
......@@ -81,3 +87,5 @@ waffle_config_destroy(struct waffle_config *self);
#ifdef __cplusplus
} // end extern "C"
#endif
/// @}
......@@ -12,6 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @defgroup waffle_context waffle_context
/// @ingroup waffle_api
/// @{
/// @file
#pragma once
#include <stdbool.h>
......@@ -36,3 +42,5 @@ waffle_context_destroy(struct waffle_context *self);
#ifdef __cplusplus
} // end extern "C"
#endif
/// @}
......@@ -12,6 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @defgroup waffle_display waffle_display
/// @ingroup waffle_api
/// @{
/// @file
#pragma once
#include <stdbool.h>
......@@ -34,3 +40,5 @@ waffle_display_disconnect(struct waffle_display *self);
#ifdef __cplusplus
} // end extern "C"
#endif
/// @}
\ No newline at end of file
......@@ -12,6 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @defgroup waffle_enum waffle_enum
/// @ingroup waffle_api
/// @{
/// @file
#pragma once
#include <stddef.h>
......@@ -80,3 +86,5 @@ enum waffle_enum {
#ifdef __cplusplus
} // end extern "C"
#endif
/// @}
\ No newline at end of file
......@@ -12,6 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @defgroup waffle_error waffle_error
/// @ingroup waffle_api
/// @{
/// @file
#pragma once
#include <stdint.h>
......@@ -121,3 +127,5 @@ enum waffle_error {
#ifdef __cplusplus
} // end extern "C"
#endif
/// @}
\ No newline at end of file
......@@ -12,6 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @defgroup waffle_gl_misc waffle_gl_misc
/// @ingroup waffle_api
/// @{
/// @file
#pragma once
#include <stdbool.h>
......@@ -41,3 +47,5 @@ waffle_dlsym_gl(const char *name);
#ifdef __cplusplus
} // end extern "C"
#endif
/// @}
......@@ -12,8 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @file
/// @defgroup waffle_init waffle_init
/// @ingroup waffle_api
///
/// @brief Initializing and terminating global library state.
/// @{
#pragma once
......@@ -126,3 +129,5 @@ waffle_finish(void);
#ifdef __cplusplus
} // end extern "C"
#endif
/// @}
\ No newline at end of file
......@@ -12,8 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @file
/// @defgroup waffle_visibility waffle_visibility
/// @ingroup waffle_api
///
/// @brief Macros for visibility of shared library symbols.
/// @{
#pragma once
......@@ -45,3 +48,5 @@ extern "C" {
#ifdef __cplusplus
} // end extern "C"
#endif
/// @}
......@@ -12,6 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @defgroup waffle_window waffle_window
/// @ingroup waffle_api
/// @{
#pragma once
#include <stdbool.h>
......@@ -41,3 +45,5 @@ waffle_window_swap_buffers(struct waffle_window *self);
#ifdef __cplusplus
} // end extern "C"
#endif
/// @}
......@@ -12,6 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @addtogroup api_priv
/// @{
/// @file
#include <stdio.h>
#include <stdlib.h>
......@@ -62,4 +67,6 @@ api_new_object_id(void)
}
return counter++;
}
\ No newline at end of file
}
/// @}
\ No newline at end of file
......@@ -12,6 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @defgroup api_priv api_priv
/// @ingroup waffle_api
///
/// @brief Private bits for implementing Waffle's API.
/// @{
/// @file
#pragma once
#include <stdbool.h>
......@@ -38,9 +46,6 @@ api_check_entry(const struct api_object *obj_list[], int length);
size_t
api_new_object_id(void);
/// @defgroup API Types
/// @{
struct api_object {
size_t platform_id;
size_t object_id;
......
......@@ -12,6 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @addtogroup waffle_attrib_list
/// @{
/// @file
/// @ingroup api
#include <waffle/waffle_attrib_list.h>
int32_t
......@@ -79,3 +85,5 @@ waffle_attrib_list_update(
return false;
}
}
/// @}
\ No newline at end of file
......@@ -12,6 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @addtogroup waffle_config
/// @{
/// @file
#include <waffle/waffle_config.h>
#include <stdlib.h>
......@@ -81,3 +86,5 @@ waffle_config_destroy(struct waffle_config *self)
free(self);
return ok;
}
/// @}
......@@ -12,6 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @addtogroup waffle_context
/// @{
/// @file
#include <waffle/waffle_context.h>
#include <stdlib.h>
......@@ -80,3 +85,5 @@ waffle_context_destroy(struct waffle_context *self)
free(self);
return ok;
}
/// @}
\ No newline at end of file
......@@ -12,6 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @addtogroup waffle_display
/// @{
/// @file
#include <waffle/waffle_display.h>
#include <stdlib.h>
......@@ -67,3 +72,5 @@ waffle_display_disconnect(struct waffle_display *self)
free(self);
return ok;
}
/// @}
\ No newline at end of file
......@@ -12,6 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @addtogroup waffle_enum
/// @{
/// @file
#include <waffle/waffle_enum.h>
const char*
......@@ -44,3 +49,5 @@ waffle_enum_to_string(int32_t e)
#undef CASE
}
}
/// @}
\ No newline at end of file
......@@ -12,9 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @addtogroup waffle_error
/// @{
/// @file
#include <string.h>
#include <waffle/core/wcore_error.h>
static int
min(int x, int y)
{
......@@ -70,3 +76,5 @@ waffle_error_to_string(int32_t e)
#undef CASE
}
}
/// @}
......@@ -12,6 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @addtogroup waffle_gl_misc
/// @{
/// @file
#include <waffle/waffle_gl_misc.h>
#include <stddef.h>
......@@ -68,3 +73,5 @@ waffle_dlsym_gl(const char *name)
return api_current_platform->dispatch->
dlsym_gl(api_current_platform->native, name);
}
/// @}
\ No newline at end of file
......@@ -12,6 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @addtogroup waffle_init
/// @{
/// @file
#include <waffle/waffle_init.h>
#include <waffle/waffle_enum.h>
......@@ -130,3 +135,5 @@ waffle_finish(void)
api_current_platform = NULL;
return ok;
}
/// @}
\ No newline at end of file
......@@ -12,6 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @addtogroup waffle_window
/// @{
/// @file
#include <waffle/waffle_window.h>
#include <stdlib.h>
......@@ -88,3 +93,5 @@ waffle_window_swap_buffers(struct waffle_window *self)
return api_current_platform->dispatch->
window_swap_buffers(self->native);
}
/// @}
\ No newline at end of file
// Copyright 2012 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/// @defgroup wcore wcore
/// @brief Core infrastructure
\ No newline at end of file
......@@ -12,6 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @addtogroup wcore_config_attrs
/// @{
/// @file
#include "wcore_config_attrs.h"
#include <stdlib.h>
......@@ -113,4 +118,6 @@ wcore_config_attrs_parse(
attrs->color_buffer_size += attrs->alpha_size;
return attrs;
}
\ No newline at end of file
}
/// @}
\ No newline at end of file
......@@ -12,6 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @defgroup wcore_config_attrs wcore_config_attrs
/// @ingroup wcore
///
/// @brief Process the attribute list given to waffle_config_choose().
/// @{
/// @file
#pragma once
#include <stdbool.h>
......@@ -37,4 +45,6 @@ struct wcore_config_attrs {
bool
wcore_config_attrs_parse(
const int32_t waffle_attrib_list[],
struct wcore_config_attrs *attrs);
\ No newline at end of file
struct wcore_config_attrs *attrs);
/// @}
\ No newline at end of file
......@@ -12,6 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @addtogroup wcore_error
/// @{
/// @file
#include "wcore_error.h"
#include <stdarg.h>
......@@ -137,4 +142,6 @@ const char*
wcore_error_get_message(void)
{
return wcore_tinfo_get()->error->message;
}
\ No newline at end of file
}
/// @}
\ No newline at end of file
......@@ -12,17 +12,23 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @defgroup wcore_error wcore_error
/// @ingroup wcore
///
/// @brief Error handling and reporting
///
/// All functions operate on thread-local storage.
///
/// @{
/// @file
#pragma once
#include <stdbool.h>
#include <waffle/waffle_error.h>
/// @defgroup wcore_error
///
/// All functions operate on thread-local storage.
///
/// @{
/// @brief Thread-local info for the wcore_error module.
struct wcore_error_tinfo;
......
......@@ -12,6 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @addtogroup wcore_platform
/// @{
/// @file
#include "wcore_platform.h"
#include <stdbool.h>
......@@ -118,3 +123,5 @@ wcore_platform_destroy(struct wcore_platform *self)
return ok;
}
/// @}
\ No newline at end of file
......@@ -12,6 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @defgroup wcore_platform wcore_platform
/// @ingroup wcore
///
/// @brief Abstract native platform.
/// @{
/// @file
#pragma once
#include <stdbool.h>
......@@ -38,4 +46,6 @@ struct wcore_platform*
wcore_platform_create(int platform, int gl_api);
bool
wcore_platform_destroy(struct wcore_platform *self);
\ No newline at end of file
wcore_platform_destroy(struct wcore_platform *self);
/// @}
\ No newline at end of file
......@@ -12,8 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @file wcore_tinfo.c
/// @ingroup wcore_tinfo
/// @addtogroup wcore_tinfo
/// @{
/// @file
#include "wcore_tinfo.h"
......@@ -25,13 +27,6 @@
#include "wcore_error.h"
/// @addtogroup wcore_tinfo
/// @{
// ---------------------------------------------------------------------------
/// @name Private
/// @{
/// @brief Key for @ref wcore_tinfo_tl_singleton.
static pthread_key_t wcore_tinfo_key;
......@@ -119,9 +114,6 @@ wcore_tinfo_key_init(void)
pthread_mutex_unlock(&mutex);
}
/// @} name Private
// ---------------------------------------------------------------------------
struct wcore_tinfo*
wcore_tinfo_get(void)
{
......@@ -147,4 +139,4 @@ wcore_tinfo_get(void)
return wcore_tinfo_tl_singleton;
}
/// @} addtogroup wcore_tinfo
/// @}
......@@ -12,20 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @defgroup wcore_tinfo wcore_tinfo
/// @ingroup wcore
///
/// @brief Thread-local info.
/// @{
/// @file
/// @ingroup wcore_tinfo
#pragma once
struct wcore_error_tinfo;
/// @defgroup wcore_tinfo
/// @brief Thread-local info.
/// @{
/// @name Public
/// @{
/// @brief Thread-local info for all of Waffle.
struct wcore_tinfo {
/// @brief Info for @ref wcore_error.
......@@ -35,5 +33,4 @@ struct wcore_tinfo {
/// @brief Get the thread-local info for the current thread.
struct wcore_tinfo* wcore_tinfo_get(void);
/// @} name Public
/// @} defgroup wcore_tinfo
/// @}
......@@ -12,13 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @file
/// @brief Wrappers for EGL functions.
/// @defgroup egl egl
///
/// @brief Wrappers for EGL functions.
/// @{
/// @file
/// Waffle supports multiple EGL platforms (Android, Wayland, X11/EGL). This
/// header declares all common code.
#pragma once
#include "egl_native_template.h"
#include "egl_no_native.h"
\ No newline at end of file
#include "egl_no_native.h"
/// @}
\ No newline at end of file
......@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @addtogroup egl_native_template
/// @{
#include "egl_native_template.h"
#include <stdbool.h>
......@@ -61,4 +64,6 @@ NATIVE_EGL(create_window_surface)(
egl_get_error("eglCreateWindowSurface");
return surf;
}
\ No newline at end of file
}
/// @}
\ No newline at end of file
......@@ -12,9 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @file
/// @brief Wrappers for EGL functions that have EGLNative parameters.
/// @defgroup egl_native_template egl_native_template
/// @ingroup egl
///
/// @brief Wrappers for EGL functions that have EGLNative parameters.
/// @{
/// @file
/// This header follows the same order as the official EGL header.
#pragma once
......@@ -34,4 +38,6 @@ NATIVE_EGL(create_window_surface)(
EGLDisplay dpy,
EGLConfig config,
EGLNativeWindowType native_window,
EGLint render_buffer_attrib);
\ No newline at end of file
EGLint render_buffer_attrib);
/// @}
\ No newline at end of file
......@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/// @addtogroup egl_no_native
/// @{
#include "egl_no_native.h"
#include <stdlib.h>
......@@ -253,4 +256,6 @@ egl_get_render_buffer_attrib(
wcore_error_internal("%s", "attrs->double_buffered has bad value");
return false;
}
}
\ No newline at end of file
}
/// @}
\ No newline at end of file