diff options
author | marha <marha@users.sourceforge.net> | 2012-06-08 14:29:46 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-06-08 14:50:37 +0200 |
commit | 72ec0e3bb2d7fc6b77b2a75873792f781679da6a (patch) | |
tree | 0a736ab9a8c26276929ab077dc661e3625b54884 /mesalib/src/gallium/auxiliary/util/u_handle_table.h | |
parent | 5e865910f0ce672295bd60460631339be5e311a0 (diff) | |
parent | 990bc3f015a4f8fce2eb918375defcd44980a845 (diff) | |
download | vcxsrv-72ec0e3bb2d7fc6b77b2a75873792f781679da6a.tar.gz vcxsrv-72ec0e3bb2d7fc6b77b2a75873792f781679da6a.tar.bz2 vcxsrv-72ec0e3bb2d7fc6b77b2a75873792f781679da6a.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
fontconfig/.gitignore
libX11/src/ConvSel.c
libX11/src/CrGlCur.c
libX11/src/CrWindow.c
libX11/src/GetDflt.c
libX11/src/Window.c
libX11/src/xlibi18n/XimProto.h
libX11/src/xlibi18n/lcDynamic.c
libxcb/src/.gitignore
libxcb/src/xcb_ext.c
libxcb/src/xcb_xid.c
mesalib/src/glsl/.gitignore
mesalib/src/glsl/glcpp/.gitignore
mesalib/src/mapi/glapi/gen/glX_API.xml
mesalib/src/mapi/glapi/glapi_getproc.c
mesalib/src/mesa/main/.gitignore
mesalib/src/mesa/main/syncobj.c
mesalib/src/mesa/program/.gitignore
xkbcomp/listing.c
xkbcomp/xkbpath.c
xorg-server/.gitignore
xorg-server/Xext/xvmain.c
xorg-server/dix/dispatch.c
xorg-server/hw/xwin/glx/winpriv.h
xorg-server/hw/xwin/winprefsyacc.y
xorg-server/hw/xwin/winscrinit.c
xorg-server/xkeyboard-config/rules/bin/ml1_s.sh
xorg-server/xkeyboard-config/rules/bin/ml1v1_s.sh
xorg-server/xkeyboard-config/rules/bin/ml1v_s.sh
xorg-server/xkeyboard-config/rules/bin/ml_s.sh
xorg-server/xkeyboard-config/rules/bin/mlv_s.sh
xorg-server/xkeyboard-config/rules/compat/.gitignore
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_handle_table.h')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_handle_table.h | 232 |
1 files changed, 116 insertions, 116 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_handle_table.h b/mesalib/src/gallium/auxiliary/util/u_handle_table.h index a7320830e..d080135c9 100644 --- a/mesalib/src/gallium/auxiliary/util/u_handle_table.h +++ b/mesalib/src/gallium/auxiliary/util/u_handle_table.h @@ -1,116 +1,116 @@ -/**************************************************************************
- *
- * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- **************************************************************************/
-
-/**
- * @file
- * Generic handle table.
- *
- * @author José Fonseca <jrfonseca@tungstengraphics.com>
- */
-
-#ifndef U_HANDLE_TABLE_H_
-#define U_HANDLE_TABLE_H_
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/**
- * Abstract data type to map integer handles to objects.
- *
- * Also referred as "pointer array".
- */
-struct handle_table;
-
-
-struct handle_table *
-handle_table_create(void);
-
-
-/**
- * Set an optional destructor callback.
- *
- * If set, it will be called during handle_table_remove and
- * handle_table_destroy calls.
- */
-void
-handle_table_set_destroy(struct handle_table *ht,
- void (*destroy)(void *object));
-
-
-/**
- * Add a new object.
- *
- * Returns a zero handle on failure (out of memory).
- */
-unsigned
-handle_table_add(struct handle_table *ht,
- void *object);
-
-/**
- * Returns zero on failure (out of memory).
- */
-unsigned
-handle_table_set(struct handle_table *ht,
- unsigned handle,
- void *object);
-
-/**
- * Fetch an existing object.
- *
- * Returns NULL for an invalid handle.
- */
-void *
-handle_table_get(struct handle_table *ht,
- unsigned handle);
-
-
-void
-handle_table_remove(struct handle_table *ht,
- unsigned handle);
-
-
-void
-handle_table_destroy(struct handle_table *ht);
-
-
-unsigned
-handle_table_get_first_handle(struct handle_table *ht);
-
-
-unsigned
-handle_table_get_next_handle(struct handle_table *ht,
- unsigned handle);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* U_HANDLE_TABLE_H_ */
+/************************************************************************** + * + * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +/** + * @file + * Generic handle table. + * + * @author José Fonseca <jrfonseca@tungstengraphics.com> + */ + +#ifndef U_HANDLE_TABLE_H_ +#define U_HANDLE_TABLE_H_ + + +#ifdef __cplusplus +extern "C" { +#endif + + +/** + * Abstract data type to map integer handles to objects. + * + * Also referred as "pointer array". + */ +struct handle_table; + + +struct handle_table * +handle_table_create(void); + + +/** + * Set an optional destructor callback. + * + * If set, it will be called during handle_table_remove and + * handle_table_destroy calls. + */ +void +handle_table_set_destroy(struct handle_table *ht, + void (*destroy)(void *object)); + + +/** + * Add a new object. + * + * Returns a zero handle on failure (out of memory). + */ +unsigned +handle_table_add(struct handle_table *ht, + void *object); + +/** + * Returns zero on failure (out of memory). + */ +unsigned +handle_table_set(struct handle_table *ht, + unsigned handle, + void *object); + +/** + * Fetch an existing object. + * + * Returns NULL for an invalid handle. + */ +void * +handle_table_get(struct handle_table *ht, + unsigned handle); + + +void +handle_table_remove(struct handle_table *ht, + unsigned handle); + + +void +handle_table_destroy(struct handle_table *ht); + + +unsigned +handle_table_get_first_handle(struct handle_table *ht); + + +unsigned +handle_table_get_next_handle(struct handle_table *ht, + unsigned handle); + + +#ifdef __cplusplus +} +#endif + +#endif /* U_HANDLE_TABLE_H_ */ |