annotate src/sord-0.12.0/src/zix/common.h @ 13:e66e9011ec93

Add Rubber Band build
author Chris Cannam
date Wed, 20 Mar 2013 15:58:55 +0000
parents c7265573341e
children
rev   line source
Chris@0 1 /*
Chris@0 2 Copyright 2011 David Robillard <http://drobilla.net>
Chris@0 3
Chris@0 4 Permission to use, copy, modify, and/or distribute this software for any
Chris@0 5 purpose with or without fee is hereby granted, provided that the above
Chris@0 6 copyright notice and this permission notice appear in all copies.
Chris@0 7
Chris@0 8 THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
Chris@0 9 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
Chris@0 10 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
Chris@0 11 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
Chris@0 12 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
Chris@0 13 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
Chris@0 14 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Chris@0 15 */
Chris@0 16
Chris@0 17 #ifndef ZIX_COMMON_H
Chris@0 18 #define ZIX_COMMON_H
Chris@0 19
Chris@0 20 /**
Chris@0 21 @addtogroup zix
Chris@0 22 @{
Chris@0 23 */
Chris@0 24
Chris@0 25 /** @cond */
Chris@0 26 #ifdef ZIX_SHARED
Chris@0 27 # ifdef _WIN32
Chris@0 28 # define ZIX_LIB_IMPORT __declspec(dllimport)
Chris@0 29 # define ZIX_LIB_EXPORT __declspec(dllexport)
Chris@0 30 # else
Chris@0 31 # define ZIX_LIB_IMPORT __attribute__((visibility("default")))
Chris@0 32 # define ZIX_LIB_EXPORT __attribute__((visibility("default")))
Chris@0 33 # endif
Chris@0 34 # ifdef ZIX_INTERNAL
Chris@0 35 # define ZIX_API ZIX_LIB_EXPORT
Chris@0 36 # else
Chris@0 37 # define ZIX_API ZIX_LIB_IMPORT
Chris@0 38 # endif
Chris@0 39 # define ZIX_PRIVATE static
Chris@0 40 #elif defined(ZIX_INLINE)
Chris@0 41 # define ZIX_API static inline
Chris@0 42 # define ZIX_PRIVATE static inline
Chris@0 43 #else
Chris@0 44 # define ZIX_API
Chris@0 45 # define ZIX_PRIVATE static
Chris@0 46 #endif
Chris@0 47 /** @endcond */
Chris@0 48
Chris@0 49 #ifdef __cplusplus
Chris@0 50 extern "C" {
Chris@0 51 #else
Chris@0 52 # include <stdbool.h>
Chris@0 53 #endif
Chris@0 54
Chris@0 55 typedef enum {
Chris@0 56 ZIX_STATUS_SUCCESS,
Chris@0 57 ZIX_STATUS_ERROR,
Chris@0 58 ZIX_STATUS_NO_MEM,
Chris@0 59 ZIX_STATUS_NOT_FOUND,
Chris@0 60 ZIX_STATUS_EXISTS,
Chris@0 61 ZIX_STATUS_BAD_ARG,
Chris@0 62 ZIX_STATUS_BAD_PERMS,
Chris@0 63 } ZixStatus;
Chris@0 64
Chris@0 65 /**
Chris@0 66 Function for comparing two elements.
Chris@0 67 */
Chris@0 68 typedef int (*ZixComparator)(const void* a, const void* b, void* user_data);
Chris@0 69
Chris@0 70 /**
Chris@0 71 Function for testing equality of two elements.
Chris@0 72 */
Chris@0 73 typedef bool (*ZixEqualFunc)(const void* a, const void* b);
Chris@0 74
Chris@0 75 /**
Chris@0 76 Function to destroy an element.
Chris@0 77 */
Chris@0 78 typedef void (*ZixDestroyFunc)(void* ptr);
Chris@0 79
Chris@0 80 /**
Chris@0 81 @}
Chris@0 82 */
Chris@0 83
Chris@0 84 #ifdef __cplusplus
Chris@0 85 } /* extern "C" */
Chris@0 86 #endif
Chris@0 87
Chris@0 88 #endif /* ZIX_COMMON_H */