diff --git a/Minetest_MSVC_Win32_libraries_compiled_170104.7z b/Minetest_MSVC_Win32_libraries_compiled_170104.7z deleted file mode 100644 index 9d4c1d5..0000000 Binary files a/Minetest_MSVC_Win32_libraries_compiled_170104.7z and /dev/null differ diff --git a/builddir/LuaJIT-master/COPYRIGHT b/builddir/LuaJIT-master/COPYRIGHT deleted file mode 100644 index b614d3e..0000000 --- a/builddir/LuaJIT-master/COPYRIGHT +++ /dev/null @@ -1,56 +0,0 @@ -=============================================================================== -LuaJIT -- a Just-In-Time Compiler for Lua. http://luajit.org/ - -Copyright (C) 2005-2016 Mike Pall. 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, sublicense, 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 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 NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS 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. - -[ MIT license: http://www.opensource.org/licenses/mit-license.php ] - -=============================================================================== -[ LuaJIT includes code from Lua 5.1/5.2, which has this license statement: ] - -Copyright (C) 1994-2012 Lua.org, PUC-Rio. - -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, sublicense, 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 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 NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS 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. - -=============================================================================== -[ LuaJIT includes code from dlmalloc, which has this license statement: ] - -This is a version (aka dlmalloc) of malloc/free/realloc written by -Doug Lea and released to the public domain, as explained at -http://creativecommons.org/licenses/publicdomain - -=============================================================================== diff --git a/builddir/LuaJIT-master/bin/lua51.dll b/builddir/LuaJIT-master/bin/lua51.dll deleted file mode 100644 index 44995a7..0000000 Binary files a/builddir/LuaJIT-master/bin/lua51.dll and /dev/null differ diff --git a/builddir/LuaJIT-master/bin/lua51.lib b/builddir/LuaJIT-master/bin/lua51.lib deleted file mode 100644 index 87aa1a8..0000000 Binary files a/builddir/LuaJIT-master/bin/lua51.lib and /dev/null differ diff --git a/builddir/LuaJIT-master/bin/luajit.exe b/builddir/LuaJIT-master/bin/luajit.exe deleted file mode 100644 index 5cbab1d..0000000 Binary files a/builddir/LuaJIT-master/bin/luajit.exe and /dev/null differ diff --git a/builddir/LuaJIT-master/include/lua.h b/builddir/LuaJIT-master/include/lua.h deleted file mode 100644 index c83fd3b..0000000 --- a/builddir/LuaJIT-master/include/lua.h +++ /dev/null @@ -1,393 +0,0 @@ -/* -** $Id: lua.h,v 1.218.1.5 2008/08/06 13:30:12 roberto Exp $ -** Lua - An Extensible Extension Language -** Lua.org, PUC-Rio, Brazil (http://www.lua.org) -** See Copyright Notice at the end of this file -*/ - - -#ifndef lua_h -#define lua_h - -#include -#include - - -#include "luaconf.h" - - -#define LUA_VERSION "Lua 5.1" -#define LUA_RELEASE "Lua 5.1.4" -#define LUA_VERSION_NUM 501 -#define LUA_COPYRIGHT "Copyright (C) 1994-2008 Lua.org, PUC-Rio" -#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo & W. Celes" - - -/* mark for precompiled code (`Lua') */ -#define LUA_SIGNATURE "\033Lua" - -/* option for multiple returns in `lua_pcall' and `lua_call' */ -#define LUA_MULTRET (-1) - - -/* -** pseudo-indices -*/ -#define LUA_REGISTRYINDEX (-10000) -#define LUA_ENVIRONINDEX (-10001) -#define LUA_GLOBALSINDEX (-10002) -#define lua_upvalueindex(i) (LUA_GLOBALSINDEX-(i)) - - -/* thread status; 0 is OK */ -#define LUA_YIELD 1 -#define LUA_ERRRUN 2 -#define LUA_ERRSYNTAX 3 -#define LUA_ERRMEM 4 -#define LUA_ERRERR 5 - - -typedef struct lua_State lua_State; - -typedef int (*lua_CFunction) (lua_State *L); - - -/* -** functions that read/write blocks when loading/dumping Lua chunks -*/ -typedef const char * (*lua_Reader) (lua_State *L, void *ud, size_t *sz); - -typedef int (*lua_Writer) (lua_State *L, const void* p, size_t sz, void* ud); - - -/* -** prototype for memory-allocation functions -*/ -typedef void * (*lua_Alloc) (void *ud, void *ptr, size_t osize, size_t nsize); - - -/* -** basic types -*/ -#define LUA_TNONE (-1) - -#define LUA_TNIL 0 -#define LUA_TBOOLEAN 1 -#define LUA_TLIGHTUSERDATA 2 -#define LUA_TNUMBER 3 -#define LUA_TSTRING 4 -#define LUA_TTABLE 5 -#define LUA_TFUNCTION 6 -#define LUA_TUSERDATA 7 -#define LUA_TTHREAD 8 - - - -/* minimum Lua stack available to a C function */ -#define LUA_MINSTACK 20 - - -/* -** generic extra include file -*/ -#if defined(LUA_USER_H) -#include LUA_USER_H -#endif - - -/* type of numbers in Lua */ -typedef LUA_NUMBER lua_Number; - - -/* type for integer functions */ -typedef LUA_INTEGER lua_Integer; - - - -/* -** state manipulation -*/ -LUA_API lua_State *(lua_newstate) (lua_Alloc f, void *ud); -LUA_API void (lua_close) (lua_State *L); -LUA_API lua_State *(lua_newthread) (lua_State *L); - -LUA_API lua_CFunction (lua_atpanic) (lua_State *L, lua_CFunction panicf); - - -/* -** basic stack manipulation -*/ -LUA_API int (lua_gettop) (lua_State *L); -LUA_API void (lua_settop) (lua_State *L, int idx); -LUA_API void (lua_pushvalue) (lua_State *L, int idx); -LUA_API void (lua_remove) (lua_State *L, int idx); -LUA_API void (lua_insert) (lua_State *L, int idx); -LUA_API void (lua_replace) (lua_State *L, int idx); -LUA_API int (lua_checkstack) (lua_State *L, int sz); - -LUA_API void (lua_xmove) (lua_State *from, lua_State *to, int n); - - -/* -** access functions (stack -> C) -*/ - -LUA_API int (lua_isnumber) (lua_State *L, int idx); -LUA_API int (lua_isstring) (lua_State *L, int idx); -LUA_API int (lua_iscfunction) (lua_State *L, int idx); -LUA_API int (lua_isuserdata) (lua_State *L, int idx); -LUA_API int (lua_type) (lua_State *L, int idx); -LUA_API const char *(lua_typename) (lua_State *L, int tp); - -LUA_API int (lua_equal) (lua_State *L, int idx1, int idx2); -LUA_API int (lua_rawequal) (lua_State *L, int idx1, int idx2); -LUA_API int (lua_lessthan) (lua_State *L, int idx1, int idx2); - -LUA_API lua_Number (lua_tonumber) (lua_State *L, int idx); -LUA_API lua_Integer (lua_tointeger) (lua_State *L, int idx); -LUA_API int (lua_toboolean) (lua_State *L, int idx); -LUA_API const char *(lua_tolstring) (lua_State *L, int idx, size_t *len); -LUA_API size_t (lua_objlen) (lua_State *L, int idx); -LUA_API lua_CFunction (lua_tocfunction) (lua_State *L, int idx); -LUA_API void *(lua_touserdata) (lua_State *L, int idx); -LUA_API lua_State *(lua_tothread) (lua_State *L, int idx); -LUA_API const void *(lua_topointer) (lua_State *L, int idx); - - -/* -** push functions (C -> stack) -*/ -LUA_API void (lua_pushnil) (lua_State *L); -LUA_API void (lua_pushnumber) (lua_State *L, lua_Number n); -LUA_API void (lua_pushinteger) (lua_State *L, lua_Integer n); -LUA_API void (lua_pushlstring) (lua_State *L, const char *s, size_t l); -LUA_API void (lua_pushstring) (lua_State *L, const char *s); -LUA_API const char *(lua_pushvfstring) (lua_State *L, const char *fmt, - va_list argp); -LUA_API const char *(lua_pushfstring) (lua_State *L, const char *fmt, ...); -LUA_API void (lua_pushcclosure) (lua_State *L, lua_CFunction fn, int n); -LUA_API void (lua_pushboolean) (lua_State *L, int b); -LUA_API void (lua_pushlightuserdata) (lua_State *L, void *p); -LUA_API int (lua_pushthread) (lua_State *L); - - -/* -** get functions (Lua -> stack) -*/ -LUA_API void (lua_gettable) (lua_State *L, int idx); -LUA_API void (lua_getfield) (lua_State *L, int idx, const char *k); -LUA_API void (lua_rawget) (lua_State *L, int idx); -LUA_API void (lua_rawgeti) (lua_State *L, int idx, int n); -LUA_API void (lua_createtable) (lua_State *L, int narr, int nrec); -LUA_API void *(lua_newuserdata) (lua_State *L, size_t sz); -LUA_API int (lua_getmetatable) (lua_State *L, int objindex); -LUA_API void (lua_getfenv) (lua_State *L, int idx); - - -/* -** set functions (stack -> Lua) -*/ -LUA_API void (lua_settable) (lua_State *L, int idx); -LUA_API void (lua_setfield) (lua_State *L, int idx, const char *k); -LUA_API void (lua_rawset) (lua_State *L, int idx); -LUA_API void (lua_rawseti) (lua_State *L, int idx, int n); -LUA_API int (lua_setmetatable) (lua_State *L, int objindex); -LUA_API int (lua_setfenv) (lua_State *L, int idx); - - -/* -** `load' and `call' functions (load and run Lua code) -*/ -LUA_API void (lua_call) (lua_State *L, int nargs, int nresults); -LUA_API int (lua_pcall) (lua_State *L, int nargs, int nresults, int errfunc); -LUA_API int (lua_cpcall) (lua_State *L, lua_CFunction func, void *ud); -LUA_API int (lua_load) (lua_State *L, lua_Reader reader, void *dt, - const char *chunkname); - -LUA_API int (lua_dump) (lua_State *L, lua_Writer writer, void *data); - - -/* -** coroutine functions -*/ -LUA_API int (lua_yield) (lua_State *L, int nresults); -LUA_API int (lua_resume) (lua_State *L, int narg); -LUA_API int (lua_status) (lua_State *L); - -/* -** garbage-collection function and options -*/ - -#define LUA_GCSTOP 0 -#define LUA_GCRESTART 1 -#define LUA_GCCOLLECT 2 -#define LUA_GCCOUNT 3 -#define LUA_GCCOUNTB 4 -#define LUA_GCSTEP 5 -#define LUA_GCSETPAUSE 6 -#define LUA_GCSETSTEPMUL 7 - -LUA_API int (lua_gc) (lua_State *L, int what, int data); - - -/* -** miscellaneous functions -*/ - -LUA_API int (lua_error) (lua_State *L); - -LUA_API int (lua_next) (lua_State *L, int idx); - -LUA_API void (lua_concat) (lua_State *L, int n); - -LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud); -LUA_API void lua_setallocf (lua_State *L, lua_Alloc f, void *ud); - - - -/* -** =============================================================== -** some useful macros -** =============================================================== -*/ - -#define lua_pop(L,n) lua_settop(L, -(n)-1) - -#define lua_newtable(L) lua_createtable(L, 0, 0) - -#define lua_register(L,n,f) (lua_pushcfunction(L, (f)), lua_setglobal(L, (n))) - -#define lua_pushcfunction(L,f) lua_pushcclosure(L, (f), 0) - -#define lua_strlen(L,i) lua_objlen(L, (i)) - -#define lua_isfunction(L,n) (lua_type(L, (n)) == LUA_TFUNCTION) -#define lua_istable(L,n) (lua_type(L, (n)) == LUA_TTABLE) -#define lua_islightuserdata(L,n) (lua_type(L, (n)) == LUA_TLIGHTUSERDATA) -#define lua_isnil(L,n) (lua_type(L, (n)) == LUA_TNIL) -#define lua_isboolean(L,n) (lua_type(L, (n)) == LUA_TBOOLEAN) -#define lua_isthread(L,n) (lua_type(L, (n)) == LUA_TTHREAD) -#define lua_isnone(L,n) (lua_type(L, (n)) == LUA_TNONE) -#define lua_isnoneornil(L, n) (lua_type(L, (n)) <= 0) - -#define lua_pushliteral(L, s) \ - lua_pushlstring(L, "" s, (sizeof(s)/sizeof(char))-1) - -#define lua_setglobal(L,s) lua_setfield(L, LUA_GLOBALSINDEX, (s)) -#define lua_getglobal(L,s) lua_getfield(L, LUA_GLOBALSINDEX, (s)) - -#define lua_tostring(L,i) lua_tolstring(L, (i), NULL) - - - -/* -** compatibility macros and functions -*/ - -#define lua_open() luaL_newstate() - -#define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX) - -#define lua_getgccount(L) lua_gc(L, LUA_GCCOUNT, 0) - -#define lua_Chunkreader lua_Reader -#define lua_Chunkwriter lua_Writer - - -/* hack */ -LUA_API void lua_setlevel (lua_State *from, lua_State *to); - - -/* -** {====================================================================== -** Debug API -** ======================================================================= -*/ - - -/* -** Event codes -*/ -#define LUA_HOOKCALL 0 -#define LUA_HOOKRET 1 -#define LUA_HOOKLINE 2 -#define LUA_HOOKCOUNT 3 -#define LUA_HOOKTAILRET 4 - - -/* -** Event masks -*/ -#define LUA_MASKCALL (1 << LUA_HOOKCALL) -#define LUA_MASKRET (1 << LUA_HOOKRET) -#define LUA_MASKLINE (1 << LUA_HOOKLINE) -#define LUA_MASKCOUNT (1 << LUA_HOOKCOUNT) - -typedef struct lua_Debug lua_Debug; /* activation record */ - - -/* Functions to be called by the debuger in specific events */ -typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar); - - -LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar); -LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar); -LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n); -LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n); -LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n); -LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n); -LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask, int count); -LUA_API lua_Hook lua_gethook (lua_State *L); -LUA_API int lua_gethookmask (lua_State *L); -LUA_API int lua_gethookcount (lua_State *L); - -/* From Lua 5.2. */ -LUA_API void *lua_upvalueid (lua_State *L, int idx, int n); -LUA_API void lua_upvaluejoin (lua_State *L, int idx1, int n1, int idx2, int n2); -LUA_API int lua_loadx (lua_State *L, lua_Reader reader, void *dt, - const char *chunkname, const char *mode); - - -struct lua_Debug { - int event; - const char *name; /* (n) */ - const char *namewhat; /* (n) `global', `local', `field', `method' */ - const char *what; /* (S) `Lua', `C', `main', `tail' */ - const char *source; /* (S) */ - int currentline; /* (l) */ - int nups; /* (u) number of upvalues */ - int linedefined; /* (S) */ - int lastlinedefined; /* (S) */ - char short_src[LUA_IDSIZE]; /* (S) */ - /* private part */ - int i_ci; /* active function */ -}; - -/* }====================================================================== */ - - -/****************************************************************************** -* Copyright (C) 1994-2008 Lua.org, PUC-Rio. 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, sublicense, 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 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 NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - - -#endif diff --git a/builddir/LuaJIT-master/include/lua.hpp b/builddir/LuaJIT-master/include/lua.hpp deleted file mode 100644 index 07e9002..0000000 --- a/builddir/LuaJIT-master/include/lua.hpp +++ /dev/null @@ -1,9 +0,0 @@ -// C++ wrapper for LuaJIT header files. - -extern "C" { -#include "lua.h" -#include "lauxlib.h" -#include "lualib.h" -#include "luajit.h" -} - diff --git a/builddir/LuaJIT-master/include/luaconf.h b/builddir/LuaJIT-master/include/luaconf.h deleted file mode 100644 index 6d9bbaa..0000000 --- a/builddir/LuaJIT-master/include/luaconf.h +++ /dev/null @@ -1,156 +0,0 @@ -/* -** Configuration header. -** Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h -*/ - -#ifndef luaconf_h -#define luaconf_h - -#ifndef WINVER -#define WINVER 0x0501 -#endif -#include -#include - -/* Default path for loading Lua and C modules with require(). */ -#if defined(_WIN32) -/* -** In Windows, any exclamation mark ('!') in the path is replaced by the -** path of the directory of the executable file of the current process. -*/ -#define LUA_LDIR "!\\lua\\" -#define LUA_CDIR "!\\" -#define LUA_PATH_DEFAULT \ - ".\\?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?\\init.lua;" -#define LUA_CPATH_DEFAULT \ - ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll" -#else -/* -** Note to distribution maintainers: do NOT patch the following lines! -** Please read ../doc/install.html#distro and pass PREFIX=/usr instead. -*/ -#ifndef LUA_MULTILIB -#define LUA_MULTILIB "lib" -#endif -#ifndef LUA_LMULTILIB -#define LUA_LMULTILIB "lib" -#endif -#define LUA_LROOT "/usr/local" -#define LUA_LUADIR "/lua/5.1/" -#define LUA_LJDIR "/luajit-2.0.4/" - -#ifdef LUA_ROOT -#define LUA_JROOT LUA_ROOT -#define LUA_RLDIR LUA_ROOT "/share" LUA_LUADIR -#define LUA_RCDIR LUA_ROOT "/" LUA_MULTILIB LUA_LUADIR -#define LUA_RLPATH ";" LUA_RLDIR "?.lua;" LUA_RLDIR "?/init.lua" -#define LUA_RCPATH ";" LUA_RCDIR "?.so" -#else -#define LUA_JROOT LUA_LROOT -#define LUA_RLPATH -#define LUA_RCPATH -#endif - -#define LUA_JPATH ";" LUA_JROOT "/share" LUA_LJDIR "?.lua" -#define LUA_LLDIR LUA_LROOT "/share" LUA_LUADIR -#define LUA_LCDIR LUA_LROOT "/" LUA_LMULTILIB LUA_LUADIR -#define LUA_LLPATH ";" LUA_LLDIR "?.lua;" LUA_LLDIR "?/init.lua" -#define LUA_LCPATH1 ";" LUA_LCDIR "?.so" -#define LUA_LCPATH2 ";" LUA_LCDIR "loadall.so" - -#define LUA_PATH_DEFAULT "./?.lua" LUA_JPATH LUA_LLPATH LUA_RLPATH -#define LUA_CPATH_DEFAULT "./?.so" LUA_LCPATH1 LUA_RCPATH LUA_LCPATH2 -#endif - -/* Environment variable names for path overrides and initialization code. */ -#define LUA_PATH "LUA_PATH" -#define LUA_CPATH "LUA_CPATH" -#define LUA_INIT "LUA_INIT" - -/* Special file system characters. */ -#if defined(_WIN32) -#define LUA_DIRSEP "\\" -#else -#define LUA_DIRSEP "/" -#endif -#define LUA_PATHSEP ";" -#define LUA_PATH_MARK "?" -#define LUA_EXECDIR "!" -#define LUA_IGMARK "-" -#define LUA_PATH_CONFIG \ - LUA_DIRSEP "\n" LUA_PATHSEP "\n" LUA_PATH_MARK "\n" \ - LUA_EXECDIR "\n" LUA_IGMARK - -/* Quoting in error messages. */ -#define LUA_QL(x) "'" x "'" -#define LUA_QS LUA_QL("%s") - -/* Various tunables. */ -#define LUAI_MAXSTACK 65500 /* Max. # of stack slots for a thread (<64K). */ -#define LUAI_MAXCSTACK 8000 /* Max. # of stack slots for a C func (<10K). */ -#define LUAI_GCPAUSE 200 /* Pause GC until memory is at 200%. */ -#define LUAI_GCMUL 200 /* Run GC at 200% of allocation speed. */ -#define LUA_MAXCAPTURES 32 /* Max. pattern captures. */ - -/* Compatibility with older library function names. */ -#define LUA_COMPAT_MOD /* OLD: math.mod, NEW: math.fmod */ -#define LUA_COMPAT_GFIND /* OLD: string.gfind, NEW: string.gmatch */ - -/* Configuration for the frontend (the luajit executable). */ -#if defined(luajit_c) -#define LUA_PROGNAME "luajit" /* Fallback frontend name. */ -#define LUA_PROMPT "> " /* Interactive prompt. */ -#define LUA_PROMPT2 ">> " /* Continuation prompt. */ -#define LUA_MAXINPUT 512 /* Max. input line length. */ -#endif - -/* Note: changing the following defines breaks the Lua 5.1 ABI. */ -#define LUA_INTEGER ptrdiff_t -#define LUA_IDSIZE 60 /* Size of lua_Debug.short_src. */ -/* -** Size of lauxlib and io.* on-stack buffers. Weird workaround to avoid using -** unreasonable amounts of stack space, but still retain ABI compatibility. -** Blame Lua for depending on BUFSIZ in the ABI, blame **** for wrecking it. -*/ -#define LUAL_BUFFERSIZE (BUFSIZ > 16384 ? 8192 : BUFSIZ) - -/* The following defines are here only for compatibility with luaconf.h -** from the standard Lua distribution. They must not be changed for LuaJIT. -*/ -#define LUA_NUMBER_DOUBLE -#define LUA_NUMBER double -#define LUAI_UACNUMBER double -#define LUA_NUMBER_SCAN "%lf" -#define LUA_NUMBER_FMT "%.14g" -#define lua_number2str(s, n) sprintf((s), LUA_NUMBER_FMT, (n)) -#define LUAI_MAXNUMBER2STR 32 -#define LUA_INTFRMLEN "l" -#define LUA_INTFRM_T long - -/* Linkage of public API functions. */ -#if defined(LUA_BUILD_AS_DLL) -#if defined(LUA_CORE) || defined(LUA_LIB) -#define LUA_API __declspec(dllexport) -#else -#define LUA_API __declspec(dllimport) -#endif -#else -#define LUA_API extern -#endif - -#define LUALIB_API LUA_API - -/* Support for internal assertions. */ -#if defined(LUA_USE_ASSERT) || defined(LUA_USE_APICHECK) -#include -#endif -#ifdef LUA_USE_ASSERT -#define lua_assert(x) assert(x) -#endif -#ifdef LUA_USE_APICHECK -#define luai_apicheck(L, o) { (void)L; assert(o); } -#else -#define luai_apicheck(L, o) { (void)L; } -#endif - -#endif diff --git a/builddir/LuaJIT-master/include/luajit.h b/builddir/LuaJIT-master/include/luajit.h deleted file mode 100644 index e7adbab..0000000 --- a/builddir/LuaJIT-master/include/luajit.h +++ /dev/null @@ -1,70 +0,0 @@ -/* -** LuaJIT -- a Just-In-Time Compiler for Lua. http://luajit.org/ -** -** Copyright (C) 2005-2016 Mike Pall. 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, sublicense, 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 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 NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 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. -** -** [ MIT license: http://www.opensource.org/licenses/mit-license.php ] -*/ - -#ifndef _LUAJIT_H -#define _LUAJIT_H - -#include "lua.h" - -#define LUAJIT_VERSION "LuaJIT 2.0.4" -#define LUAJIT_VERSION_NUM 20004 /* Version 2.0.4 = 02.00.04. */ -#define LUAJIT_VERSION_SYM luaJIT_version_2_0_4 -#define LUAJIT_COPYRIGHT "Copyright (C) 2005-2016 Mike Pall" -#define LUAJIT_URL "http://luajit.org/" - -/* Modes for luaJIT_setmode. */ -#define LUAJIT_MODE_MASK 0x00ff - -enum { - LUAJIT_MODE_ENGINE, /* Set mode for whole JIT engine. */ - LUAJIT_MODE_DEBUG, /* Set debug mode (idx = level). */ - - LUAJIT_MODE_FUNC, /* Change mode for a function. */ - LUAJIT_MODE_ALLFUNC, /* Recurse into subroutine protos. */ - LUAJIT_MODE_ALLSUBFUNC, /* Change only the subroutines. */ - - LUAJIT_MODE_TRACE, /* Flush a compiled trace. */ - - LUAJIT_MODE_WRAPCFUNC = 0x10, /* Set wrapper mode for C function calls. */ - - LUAJIT_MODE_MAX -}; - -/* Flags or'ed in to the mode. */ -#define LUAJIT_MODE_OFF 0x0000 /* Turn feature off. */ -#define LUAJIT_MODE_ON 0x0100 /* Turn feature on. */ -#define LUAJIT_MODE_FLUSH 0x0200 /* Flush JIT-compiled code. */ - -/* LuaJIT public C API. */ - -/* Control the JIT engine. */ -LUA_API int luaJIT_setmode(lua_State *L, int idx, int mode); - -/* Enforce (dynamic) linker error for version mismatches. Call from main. */ -LUA_API void LUAJIT_VERSION_SYM(void); - -#endif diff --git a/builddir/LuaJIT-master/include/lualib.h b/builddir/LuaJIT-master/include/lualib.h deleted file mode 100644 index 3a54955..0000000 --- a/builddir/LuaJIT-master/include/lualib.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -** Standard library header. -** Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h -*/ - -#ifndef _LUALIB_H -#define _LUALIB_H - -#include "lua.h" - -#define LUA_FILEHANDLE "FILE*" - -#define LUA_COLIBNAME "coroutine" -#define LUA_MATHLIBNAME "math" -#define LUA_STRLIBNAME "string" -#define LUA_TABLIBNAME "table" -#define LUA_IOLIBNAME "io" -#define LUA_OSLIBNAME "os" -#define LUA_LOADLIBNAME "package" -#define LUA_DBLIBNAME "debug" -#define LUA_BITLIBNAME "bit" -#define LUA_JITLIBNAME "jit" -#define LUA_FFILIBNAME "ffi" - -LUALIB_API int luaopen_base(lua_State *L); -LUALIB_API int luaopen_math(lua_State *L); -LUALIB_API int luaopen_string(lua_State *L); -LUALIB_API int luaopen_table(lua_State *L); -LUALIB_API int luaopen_io(lua_State *L); -LUALIB_API int luaopen_os(lua_State *L); -LUALIB_API int luaopen_package(lua_State *L); -LUALIB_API int luaopen_debug(lua_State *L); -LUALIB_API int luaopen_bit(lua_State *L); -LUALIB_API int luaopen_jit(lua_State *L); -LUALIB_API int luaopen_ffi(lua_State *L); - -LUALIB_API void luaL_openlibs(lua_State *L); - -#ifndef lua_assert -#define lua_assert(x) ((void)0) -#endif - -#endif diff --git a/builddir/curl-master/COPYING b/builddir/curl-master/COPYING deleted file mode 100644 index 6b5d59f..0000000 --- a/builddir/curl-master/COPYING +++ /dev/null @@ -1,21 +0,0 @@ -COPYRIGHT AND PERMISSION NOTICE - -Copyright (c) 1996 - 2015, Daniel Stenberg, . - -All rights reserved. - -Permission to use, copy, modify, and distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright -notice and this permission notice appear in all copies. - -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 NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 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. - -Except as contained in this notice, the name of a copyright holder shall not -be used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization of the copyright holder. diff --git a/builddir/curl-master/bin/libcurl.dll b/builddir/curl-master/bin/libcurl.dll deleted file mode 100644 index a806f31..0000000 Binary files a/builddir/curl-master/bin/libcurl.dll and /dev/null differ diff --git a/builddir/curl-master/bin/libcurl_imp.exp b/builddir/curl-master/bin/libcurl_imp.exp deleted file mode 100644 index 0da082b..0000000 Binary files a/builddir/curl-master/bin/libcurl_imp.exp and /dev/null differ diff --git a/builddir/curl-master/bin/libcurl_imp.lib b/builddir/curl-master/bin/libcurl_imp.lib deleted file mode 100644 index 4abb115..0000000 Binary files a/builddir/curl-master/bin/libcurl_imp.lib and /dev/null differ diff --git a/builddir/curl-master/include/README b/builddir/curl-master/include/README deleted file mode 100644 index 3e52a1d..0000000 --- a/builddir/curl-master/include/README +++ /dev/null @@ -1,55 +0,0 @@ - _ _ ____ _ - ___| | | | _ \| | - / __| | | | |_) | | - | (__| |_| | _ <| |___ - \___|\___/|_| \_\_____| - -Include files for libcurl, external users. - -They're all placed in the curl subdirectory here for better fit in any kind -of environment. You must include files from here using... - - #include - -... style and point the compiler's include path to the directory holding the -curl subdirectory. It makes it more likely to survive future modifications. - -NOTE FOR LIBCURL HACKERS - -The following notes apply to libcurl version 7.19.0 and later. - -* The distributed curl/curlbuild.h file is only intended to be used on systems - which can not run the also distributed configure script. - -* The distributed curlbuild.h file is generated as a copy of curlbuild.h.dist - when the libcurl source code distribution archive file is originally created. - -* If you check out from git on a non-configure platform, you must run the - appropriate buildconf* script to set up curlbuild.h and other local files - before being able of compiling the library. - -* On systems capable of running the configure script, the configure process - will overwrite the distributed include/curl/curlbuild.h file with one that - is suitable and specific to the library being configured and built, which - is generated from the include/curl/curlbuild.h.in template file. - -* If you intend to distribute an already compiled libcurl library you _MUST_ - also distribute along with it the generated curl/curlbuild.h which has been - used to compile it. Otherwise the library will be of no use for the users of - the library that you have built. It is _your_ responsibility to provide this - file. No one at the cURL project can know how you have built the library. - -* File curl/curlbuild.h includes platform and configuration dependent info, - and must not be modified by anyone. Configure script generates it for you. - -* We cannot assume anything else but very basic compiler features being - present. While libcurl requires an ANSI C compiler to build, some of the - earlier ANSI compilers clearly can't deal with some preprocessor operators. - -* Newlines must remain unix-style for older compilers' sake. - -* Comments must be written in the old-style /* unnested C-fashion */ - -To figure out how to do good and portable checks for features, operating -systems or specific hardwarare, a very good resource is Bjorn Reese's -collection at http://predef.sf.net/ diff --git a/builddir/curl-master/include/curl/curl.h b/builddir/curl-master/include/curl/curl.h deleted file mode 100644 index 516ede6..0000000 --- a/builddir/curl-master/include/curl/curl.h +++ /dev/null @@ -1,2440 +0,0 @@ -#ifndef __CURL_CURL_H -#define __CURL_CURL_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * If you have libcurl problems, all docs and details are found here: - * https://curl.haxx.se/libcurl/ - * - * curl-library mailing list subscription and unsubscription web interface: - * https://cool.haxx.se/mailman/listinfo/curl-library/ - */ - -#include "curlver.h" /* libcurl version defines */ -#include "curlbuild.h" /* libcurl build definitions */ -#include "curlrules.h" /* libcurl rules enforcement */ - -/* - * Define WIN32 when build target is Win32 API - */ - -#if (defined(_WIN32) || defined(__WIN32__)) && \ - !defined(WIN32) && !defined(__SYMBIAN32__) -#define WIN32 -#endif - -#include -#include - -#if defined(__FreeBSD__) && (__FreeBSD__ >= 2) -/* Needed for __FreeBSD_version symbol definition */ -#include -#endif - -/* The include stuff here below is mainly for time_t! */ -#include -#include - -#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__) -#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || \ - defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H)) -/* The check above prevents the winsock2 inclusion if winsock.h already was - included, since they can't co-exist without problems */ -#include -#include -#endif -#endif - -/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish - libc5-based Linux systems. Only include it on systems that are known to - require it! */ -#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ - defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ - defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \ - (defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) -#include -#endif - -#if !defined(WIN32) && !defined(_WIN32_WCE) -#include -#endif - -#if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__) -#include -#endif - -#ifdef __BEOS__ -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct Curl_easy CURL; - -/* - * libcurl external API function linkage decorations. - */ - -#ifdef CURL_STATICLIB -# define CURL_EXTERN -#elif defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__) -# if defined(BUILDING_LIBCURL) -# define CURL_EXTERN __declspec(dllexport) -# else -# define CURL_EXTERN __declspec(dllimport) -# endif -#elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS) -# define CURL_EXTERN CURL_EXTERN_SYMBOL -#else -# define CURL_EXTERN -#endif - -#ifndef curl_socket_typedef -/* socket typedef */ -#if defined(WIN32) && !defined(__LWIP_OPT_H__) && !defined(LWIP_HDR_OPT_H) -typedef SOCKET curl_socket_t; -#define CURL_SOCKET_BAD INVALID_SOCKET -#else -typedef int curl_socket_t; -#define CURL_SOCKET_BAD -1 -#endif -#define curl_socket_typedef -#endif /* curl_socket_typedef */ - -struct curl_httppost { - struct curl_httppost *next; /* next entry in the list */ - char *name; /* pointer to allocated name */ - long namelength; /* length of name length */ - char *contents; /* pointer to allocated data contents */ - long contentslength; /* length of contents field, see also - CURL_HTTPPOST_LARGE */ - char *buffer; /* pointer to allocated buffer contents */ - long bufferlength; /* length of buffer field */ - char *contenttype; /* Content-Type */ - struct curl_slist* contentheader; /* list of extra headers for this form */ - struct curl_httppost *more; /* if one field name has more than one - file, this link should link to following - files */ - long flags; /* as defined below */ - -/* specified content is a file name */ -#define CURL_HTTPPOST_FILENAME (1<<0) -/* specified content is a file name */ -#define CURL_HTTPPOST_READFILE (1<<1) -/* name is only stored pointer do not free in formfree */ -#define CURL_HTTPPOST_PTRNAME (1<<2) -/* contents is only stored pointer do not free in formfree */ -#define CURL_HTTPPOST_PTRCONTENTS (1<<3) -/* upload file from buffer */ -#define CURL_HTTPPOST_BUFFER (1<<4) -/* upload file from pointer contents */ -#define CURL_HTTPPOST_PTRBUFFER (1<<5) -/* upload file contents by using the regular read callback to get the data and - pass the given pointer as custom pointer */ -#define CURL_HTTPPOST_CALLBACK (1<<6) -/* use size in 'contentlen', added in 7.46.0 */ -#define CURL_HTTPPOST_LARGE (1<<7) - - char *showfilename; /* The file name to show. If not set, the - actual file name will be used (if this - is a file part) */ - void *userp; /* custom pointer used for - HTTPPOST_CALLBACK posts */ - curl_off_t contentlen; /* alternative length of contents - field. Used if CURL_HTTPPOST_LARGE is - set. Added in 7.46.0 */ -}; - -/* This is the CURLOPT_PROGRESSFUNCTION callback proto. It is now considered - deprecated but was the only choice up until 7.31.0 */ -typedef int (*curl_progress_callback)(void *clientp, - double dltotal, - double dlnow, - double ultotal, - double ulnow); - -/* This is the CURLOPT_XFERINFOFUNCTION callback proto. It was introduced in - 7.32.0, it avoids floating point and provides more detailed information. */ -typedef int (*curl_xferinfo_callback)(void *clientp, - curl_off_t dltotal, - curl_off_t dlnow, - curl_off_t ultotal, - curl_off_t ulnow); - -#ifndef CURL_MAX_WRITE_SIZE - /* Tests have proven that 20K is a very bad buffer size for uploads on - Windows, while 16K for some odd reason performed a lot better. - We do the ifndef check to allow this value to easier be changed at build - time for those who feel adventurous. The practical minimum is about - 400 bytes since libcurl uses a buffer of this size as a scratch area - (unrelated to network send operations). */ -#define CURL_MAX_WRITE_SIZE 16384 -#endif - -#ifndef CURL_MAX_HTTP_HEADER -/* The only reason to have a max limit for this is to avoid the risk of a bad - server feeding libcurl with a never-ending header that will cause reallocs - infinitely */ -#define CURL_MAX_HTTP_HEADER (100*1024) -#endif - -/* This is a magic return code for the write callback that, when returned, - will signal libcurl to pause receiving on the current transfer. */ -#define CURL_WRITEFUNC_PAUSE 0x10000001 - -typedef size_t (*curl_write_callback)(char *buffer, - size_t size, - size_t nitems, - void *outstream); - - - -/* enumeration of file types */ -typedef enum { - CURLFILETYPE_FILE = 0, - CURLFILETYPE_DIRECTORY, - CURLFILETYPE_SYMLINK, - CURLFILETYPE_DEVICE_BLOCK, - CURLFILETYPE_DEVICE_CHAR, - CURLFILETYPE_NAMEDPIPE, - CURLFILETYPE_SOCKET, - CURLFILETYPE_DOOR, /* is possible only on Sun Solaris now */ - - CURLFILETYPE_UNKNOWN /* should never occur */ -} curlfiletype; - -#define CURLFINFOFLAG_KNOWN_FILENAME (1<<0) -#define CURLFINFOFLAG_KNOWN_FILETYPE (1<<1) -#define CURLFINFOFLAG_KNOWN_TIME (1<<2) -#define CURLFINFOFLAG_KNOWN_PERM (1<<3) -#define CURLFINFOFLAG_KNOWN_UID (1<<4) -#define CURLFINFOFLAG_KNOWN_GID (1<<5) -#define CURLFINFOFLAG_KNOWN_SIZE (1<<6) -#define CURLFINFOFLAG_KNOWN_HLINKCOUNT (1<<7) - -/* Content of this structure depends on information which is known and is - achievable (e.g. by FTP LIST parsing). Please see the url_easy_setopt(3) man - page for callbacks returning this structure -- some fields are mandatory, - some others are optional. The FLAG field has special meaning. */ -struct curl_fileinfo { - char *filename; - curlfiletype filetype; - time_t time; - unsigned int perm; - int uid; - int gid; - curl_off_t size; - long int hardlinks; - - struct { - /* If some of these fields is not NULL, it is a pointer to b_data. */ - char *time; - char *perm; - char *user; - char *group; - char *target; /* pointer to the target filename of a symlink */ - } strings; - - unsigned int flags; - - /* used internally */ - char * b_data; - size_t b_size; - size_t b_used; -}; - -/* return codes for CURLOPT_CHUNK_BGN_FUNCTION */ -#define CURL_CHUNK_BGN_FUNC_OK 0 -#define CURL_CHUNK_BGN_FUNC_FAIL 1 /* tell the lib to end the task */ -#define CURL_CHUNK_BGN_FUNC_SKIP 2 /* skip this chunk over */ - -/* if splitting of data transfer is enabled, this callback is called before - download of an individual chunk started. Note that parameter "remains" works - only for FTP wildcard downloading (for now), otherwise is not used */ -typedef long (*curl_chunk_bgn_callback)(const void *transfer_info, - void *ptr, - int remains); - -/* return codes for CURLOPT_CHUNK_END_FUNCTION */ -#define CURL_CHUNK_END_FUNC_OK 0 -#define CURL_CHUNK_END_FUNC_FAIL 1 /* tell the lib to end the task */ - -/* If splitting of data transfer is enabled this callback is called after - download of an individual chunk finished. - Note! After this callback was set then it have to be called FOR ALL chunks. - Even if downloading of this chunk was skipped in CHUNK_BGN_FUNC. - This is the reason why we don't need "transfer_info" parameter in this - callback and we are not interested in "remains" parameter too. */ -typedef long (*curl_chunk_end_callback)(void *ptr); - -/* return codes for FNMATCHFUNCTION */ -#define CURL_FNMATCHFUNC_MATCH 0 /* string corresponds to the pattern */ -#define CURL_FNMATCHFUNC_NOMATCH 1 /* pattern doesn't match the string */ -#define CURL_FNMATCHFUNC_FAIL 2 /* an error occurred */ - -/* callback type for wildcard downloading pattern matching. If the - string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc. */ -typedef int (*curl_fnmatch_callback)(void *ptr, - const char *pattern, - const char *string); - -/* These are the return codes for the seek callbacks */ -#define CURL_SEEKFUNC_OK 0 -#define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */ -#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so - libcurl might try other means instead */ -typedef int (*curl_seek_callback)(void *instream, - curl_off_t offset, - int origin); /* 'whence' */ - -/* This is a return code for the read callback that, when returned, will - signal libcurl to immediately abort the current transfer. */ -#define CURL_READFUNC_ABORT 0x10000000 -/* This is a return code for the read callback that, when returned, will - signal libcurl to pause sending data on the current transfer. */ -#define CURL_READFUNC_PAUSE 0x10000001 - -typedef size_t (*curl_read_callback)(char *buffer, - size_t size, - size_t nitems, - void *instream); - -typedef enum { - CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */ - CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */ - CURLSOCKTYPE_LAST /* never use */ -} curlsocktype; - -/* The return code from the sockopt_callback can signal information back - to libcurl: */ -#define CURL_SOCKOPT_OK 0 -#define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return - CURLE_ABORTED_BY_CALLBACK */ -#define CURL_SOCKOPT_ALREADY_CONNECTED 2 - -typedef int (*curl_sockopt_callback)(void *clientp, - curl_socket_t curlfd, - curlsocktype purpose); - -struct curl_sockaddr { - int family; - int socktype; - int protocol; - unsigned int addrlen; /* addrlen was a socklen_t type before 7.18.0 but it - turned really ugly and painful on the systems that - lack this type */ - struct sockaddr addr; -}; - -typedef curl_socket_t -(*curl_opensocket_callback)(void *clientp, - curlsocktype purpose, - struct curl_sockaddr *address); - -typedef int -(*curl_closesocket_callback)(void *clientp, curl_socket_t item); - -typedef enum { - CURLIOE_OK, /* I/O operation successful */ - CURLIOE_UNKNOWNCMD, /* command was unknown to callback */ - CURLIOE_FAILRESTART, /* failed to restart the read */ - CURLIOE_LAST /* never use */ -} curlioerr; - -typedef enum { - CURLIOCMD_NOP, /* no operation */ - CURLIOCMD_RESTARTREAD, /* restart the read stream from start */ - CURLIOCMD_LAST /* never use */ -} curliocmd; - -typedef curlioerr (*curl_ioctl_callback)(CURL *handle, - int cmd, - void *clientp); - -#ifndef CURL_DID_MEMORY_FUNC_TYPEDEFS -/* - * The following typedef's are signatures of malloc, free, realloc, strdup and - * calloc respectively. Function pointers of these types can be passed to the - * curl_global_init_mem() function to set user defined memory management - * callback routines. - */ -typedef void *(*curl_malloc_callback)(size_t size); -typedef void (*curl_free_callback)(void *ptr); -typedef void *(*curl_realloc_callback)(void *ptr, size_t size); -typedef char *(*curl_strdup_callback)(const char *str); -typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size); - -#define CURL_DID_MEMORY_FUNC_TYPEDEFS -#endif - -/* the kind of data that is passed to information_callback*/ -typedef enum { - CURLINFO_TEXT = 0, - CURLINFO_HEADER_IN, /* 1 */ - CURLINFO_HEADER_OUT, /* 2 */ - CURLINFO_DATA_IN, /* 3 */ - CURLINFO_DATA_OUT, /* 4 */ - CURLINFO_SSL_DATA_IN, /* 5 */ - CURLINFO_SSL_DATA_OUT, /* 6 */ - CURLINFO_END -} curl_infotype; - -typedef int (*curl_debug_callback) - (CURL *handle, /* the handle/transfer this concerns */ - curl_infotype type, /* what kind of data */ - char *data, /* points to the data */ - size_t size, /* size of the data pointed to */ - void *userptr); /* whatever the user please */ - -/* All possible error codes from all sorts of curl functions. Future versions - may return other values, stay prepared. - - Always add new return codes last. Never *EVER* remove any. The return - codes must remain the same! - */ - -typedef enum { - CURLE_OK = 0, - CURLE_UNSUPPORTED_PROTOCOL, /* 1 */ - CURLE_FAILED_INIT, /* 2 */ - CURLE_URL_MALFORMAT, /* 3 */ - CURLE_NOT_BUILT_IN, /* 4 - [was obsoleted in August 2007 for - 7.17.0, reused in April 2011 for 7.21.5] */ - CURLE_COULDNT_RESOLVE_PROXY, /* 5 */ - CURLE_COULDNT_RESOLVE_HOST, /* 6 */ - CURLE_COULDNT_CONNECT, /* 7 */ - CURLE_FTP_WEIRD_SERVER_REPLY, /* 8 */ - CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server - due to lack of access - when login fails - this is not returned. */ - CURLE_FTP_ACCEPT_FAILED, /* 10 - [was obsoleted in April 2006 for - 7.15.4, reused in Dec 2011 for 7.24.0]*/ - CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */ - CURLE_FTP_ACCEPT_TIMEOUT, /* 12 - timeout occurred accepting server - [was obsoleted in August 2007 for 7.17.0, - reused in Dec 2011 for 7.24.0]*/ - CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */ - CURLE_FTP_WEIRD_227_FORMAT, /* 14 */ - CURLE_FTP_CANT_GET_HOST, /* 15 */ - CURLE_HTTP2, /* 16 - A problem in the http2 framing layer. - [was obsoleted in August 2007 for 7.17.0, - reused in July 2014 for 7.38.0] */ - CURLE_FTP_COULDNT_SET_TYPE, /* 17 */ - CURLE_PARTIAL_FILE, /* 18 */ - CURLE_FTP_COULDNT_RETR_FILE, /* 19 */ - CURLE_OBSOLETE20, /* 20 - NOT USED */ - CURLE_QUOTE_ERROR, /* 21 - quote command failure */ - CURLE_HTTP_RETURNED_ERROR, /* 22 */ - CURLE_WRITE_ERROR, /* 23 */ - CURLE_OBSOLETE24, /* 24 - NOT USED */ - CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */ - CURLE_READ_ERROR, /* 26 - couldn't open/read from file */ - CURLE_OUT_OF_MEMORY, /* 27 */ - /* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error - instead of a memory allocation error if CURL_DOES_CONVERSIONS - is defined - */ - CURLE_OPERATION_TIMEDOUT, /* 28 - the timeout time was reached */ - CURLE_OBSOLETE29, /* 29 - NOT USED */ - CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */ - CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */ - CURLE_OBSOLETE32, /* 32 - NOT USED */ - CURLE_RANGE_ERROR, /* 33 - RANGE "command" didn't work */ - CURLE_HTTP_POST_ERROR, /* 34 */ - CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */ - CURLE_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */ - CURLE_FILE_COULDNT_READ_FILE, /* 37 */ - CURLE_LDAP_CANNOT_BIND, /* 38 */ - CURLE_LDAP_SEARCH_FAILED, /* 39 */ - CURLE_OBSOLETE40, /* 40 - NOT USED */ - CURLE_FUNCTION_NOT_FOUND, /* 41 */ - CURLE_ABORTED_BY_CALLBACK, /* 42 */ - CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */ - CURLE_OBSOLETE44, /* 44 - NOT USED */ - CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */ - CURLE_OBSOLETE46, /* 46 - NOT USED */ - CURLE_TOO_MANY_REDIRECTS, /* 47 - catch endless re-direct loops */ - CURLE_UNKNOWN_OPTION, /* 48 - User specified an unknown option */ - CURLE_TELNET_OPTION_SYNTAX, /* 49 - Malformed telnet option */ - CURLE_OBSOLETE50, /* 50 - NOT USED */ - CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint - wasn't verified fine */ - CURLE_GOT_NOTHING, /* 52 - when this is a specific error */ - CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */ - CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as - default */ - CURLE_SEND_ERROR, /* 55 - failed sending network data */ - CURLE_RECV_ERROR, /* 56 - failure in receiving network data */ - CURLE_OBSOLETE57, /* 57 - NOT IN USE */ - CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */ - CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */ - CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */ - CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized/bad encoding */ - CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */ - CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */ - CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ - CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind - that failed */ - CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */ - CURLE_LOGIN_DENIED, /* 67 - user, password or similar was not - accepted and we failed to login */ - CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */ - CURLE_TFTP_PERM, /* 69 - permission problem on server */ - CURLE_REMOTE_DISK_FULL, /* 70 - out of disk space on server */ - CURLE_TFTP_ILLEGAL, /* 71 - Illegal TFTP operation */ - CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */ - CURLE_REMOTE_FILE_EXISTS, /* 73 - File already exists */ - CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */ - CURLE_CONV_FAILED, /* 75 - conversion failed */ - CURLE_CONV_REQD, /* 76 - caller must register conversion - callbacks using curl_easy_setopt options - CURLOPT_CONV_FROM_NETWORK_FUNCTION, - CURLOPT_CONV_TO_NETWORK_FUNCTION, and - CURLOPT_CONV_FROM_UTF8_FUNCTION */ - CURLE_SSL_CACERT_BADFILE, /* 77 - could not load CACERT file, missing - or wrong format */ - CURLE_REMOTE_FILE_NOT_FOUND, /* 78 - remote file not found */ - CURLE_SSH, /* 79 - error from the SSH layer, somewhat - generic so the error message will be of - interest when this has happened */ - - CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL - connection */ - CURLE_AGAIN, /* 81 - socket is not ready for send/recv, - wait till it's ready and try again (Added - in 7.18.2) */ - CURLE_SSL_CRL_BADFILE, /* 82 - could not load CRL file, missing or - wrong format (Added in 7.19.0) */ - CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in - 7.19.0) */ - CURLE_FTP_PRET_FAILED, /* 84 - a PRET command failed */ - CURLE_RTSP_CSEQ_ERROR, /* 85 - mismatch of RTSP CSeq numbers */ - CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Ids */ - CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */ - CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */ - CURLE_NO_CONNECTION_AVAILABLE, /* 89 - No connection available, the - session will be queued */ - CURLE_SSL_PINNEDPUBKEYNOTMATCH, /* 90 - specified pinned public key did not - match */ - CURLE_SSL_INVALIDCERTSTATUS, /* 91 - invalid certificate status */ - CURLE_HTTP2_STREAM, /* 92 - stream error in HTTP/2 framing layer - */ - CURL_LAST /* never use! */ -} CURLcode; - -#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all - the obsolete stuff removed! */ - -/* Previously obsolete error code re-used in 7.38.0 */ -#define CURLE_OBSOLETE16 CURLE_HTTP2 - -/* Previously obsolete error codes re-used in 7.24.0 */ -#define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED -#define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT - -/* compatibility with older names */ -#define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING - -/* The following were added in 7.21.5, April 2011 */ -#define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION - -/* The following were added in 7.17.1 */ -/* These are scheduled to disappear by 2009 */ -#define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION - -/* The following were added in 7.17.0 */ -/* These are scheduled to disappear by 2009 */ -#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* no one should be using this! */ -#define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46 -#define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44 -#define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10 -#define CURLE_FTP_CANT_RECONNECT CURLE_OBSOLETE16 -#define CURLE_FTP_COULDNT_GET_SIZE CURLE_OBSOLETE32 -#define CURLE_FTP_COULDNT_SET_ASCII CURLE_OBSOLETE29 -#define CURLE_FTP_WEIRD_USER_REPLY CURLE_OBSOLETE12 -#define CURLE_FTP_WRITE_ERROR CURLE_OBSOLETE20 -#define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40 -#define CURLE_MALFORMAT_USER CURLE_OBSOLETE24 -#define CURLE_SHARE_IN_USE CURLE_OBSOLETE57 -#define CURLE_URL_MALFORMAT_USER CURLE_NOT_BUILT_IN - -#define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED -#define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE -#define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR -#define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL -#define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS -#define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR -#define CURLE_FTP_SSL_FAILED CURLE_USE_SSL_FAILED - -/* The following were added earlier */ - -#define CURLE_OPERATION_TIMEOUTED CURLE_OPERATION_TIMEDOUT - -#define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR -#define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED -#define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED - -#define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE -#define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME - -/* This was the error code 50 in 7.7.3 and a few earlier versions, this - is no longer used by libcurl but is instead #defined here only to not - make programs break */ -#define CURLE_ALREADY_COMPLETE 99999 - -/* Provide defines for really old option names */ -#define CURLOPT_FILE CURLOPT_WRITEDATA /* name changed in 7.9.7 */ -#define CURLOPT_INFILE CURLOPT_READDATA /* name changed in 7.9.7 */ -#define CURLOPT_WRITEHEADER CURLOPT_HEADERDATA - -/* Since long deprecated options with no code in the lib that does anything - with them. */ -#define CURLOPT_WRITEINFO CURLOPT_OBSOLETE40 -#define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72 - -#endif /*!CURL_NO_OLDIES*/ - -/* This prototype applies to all conversion callbacks */ -typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length); - -typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */ - void *ssl_ctx, /* actually an - OpenSSL SSL_CTX */ - void *userptr); - -typedef enum { - CURLPROXY_HTTP = 0, /* added in 7.10, new in 7.19.4 default is to use - CONNECT HTTP/1.1 */ - CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT - HTTP/1.0 */ - CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already - in 7.10 */ - CURLPROXY_SOCKS5 = 5, /* added in 7.10 */ - CURLPROXY_SOCKS4A = 6, /* added in 7.18.0 */ - CURLPROXY_SOCKS5_HOSTNAME = 7 /* Use the SOCKS5 protocol but pass along the - host name rather than the IP address. added - in 7.18.0 */ -} curl_proxytype; /* this enum was added in 7.10 */ - -/* - * Bitmasks for CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH options: - * - * CURLAUTH_NONE - No HTTP authentication - * CURLAUTH_BASIC - HTTP Basic authentication (default) - * CURLAUTH_DIGEST - HTTP Digest authentication - * CURLAUTH_NEGOTIATE - HTTP Negotiate (SPNEGO) authentication - * CURLAUTH_GSSNEGOTIATE - Alias for CURLAUTH_NEGOTIATE (deprecated) - * CURLAUTH_NTLM - HTTP NTLM authentication - * CURLAUTH_DIGEST_IE - HTTP Digest authentication with IE flavour - * CURLAUTH_NTLM_WB - HTTP NTLM authentication delegated to winbind helper - * CURLAUTH_ONLY - Use together with a single other type to force no - * authentication or just that single type - * CURLAUTH_ANY - All fine types set - * CURLAUTH_ANYSAFE - All fine types except Basic - */ - -#define CURLAUTH_NONE ((unsigned long)0) -#define CURLAUTH_BASIC (((unsigned long)1)<<0) -#define CURLAUTH_DIGEST (((unsigned long)1)<<1) -#define CURLAUTH_NEGOTIATE (((unsigned long)1)<<2) -/* Deprecated since the advent of CURLAUTH_NEGOTIATE */ -#define CURLAUTH_GSSNEGOTIATE CURLAUTH_NEGOTIATE -#define CURLAUTH_NTLM (((unsigned long)1)<<3) -#define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4) -#define CURLAUTH_NTLM_WB (((unsigned long)1)<<5) -#define CURLAUTH_ONLY (((unsigned long)1)<<31) -#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) -#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) - -#define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */ -#define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */ -#define CURLSSH_AUTH_PUBLICKEY (1<<0) /* public/private key files */ -#define CURLSSH_AUTH_PASSWORD (1<<1) /* password */ -#define CURLSSH_AUTH_HOST (1<<2) /* host key files */ -#define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */ -#define CURLSSH_AUTH_AGENT (1<<4) /* agent (ssh-agent, pageant...) */ -#define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY - -#define CURLGSSAPI_DELEGATION_NONE 0 /* no delegation (default) */ -#define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0) /* if permitted by policy */ -#define CURLGSSAPI_DELEGATION_FLAG (1<<1) /* delegate always */ - -#define CURL_ERROR_SIZE 256 - -enum curl_khtype { - CURLKHTYPE_UNKNOWN, - CURLKHTYPE_RSA1, - CURLKHTYPE_RSA, - CURLKHTYPE_DSS -}; - -struct curl_khkey { - const char *key; /* points to a zero-terminated string encoded with base64 - if len is zero, otherwise to the "raw" data */ - size_t len; - enum curl_khtype keytype; -}; - -/* this is the set of return values expected from the curl_sshkeycallback - callback */ -enum curl_khstat { - CURLKHSTAT_FINE_ADD_TO_FILE, - CURLKHSTAT_FINE, - CURLKHSTAT_REJECT, /* reject the connection, return an error */ - CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now so - this causes a CURLE_DEFER error but otherwise the - connection will be left intact etc */ - CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */ -}; - -/* this is the set of status codes pass in to the callback */ -enum curl_khmatch { - CURLKHMATCH_OK, /* match */ - CURLKHMATCH_MISMATCH, /* host found, key mismatch! */ - CURLKHMATCH_MISSING, /* no matching host/key found */ - CURLKHMATCH_LAST /* not for use, only a marker for last-in-list */ -}; - -typedef int - (*curl_sshkeycallback) (CURL *easy, /* easy handle */ - const struct curl_khkey *knownkey, /* known */ - const struct curl_khkey *foundkey, /* found */ - enum curl_khmatch, /* libcurl's view on the keys */ - void *clientp); /* custom pointer passed from app */ - -/* parameter for the CURLOPT_USE_SSL option */ -typedef enum { - CURLUSESSL_NONE, /* do not attempt to use SSL */ - CURLUSESSL_TRY, /* try using SSL, proceed anyway otherwise */ - CURLUSESSL_CONTROL, /* SSL for the control connection or fail */ - CURLUSESSL_ALL, /* SSL for all communication or fail */ - CURLUSESSL_LAST /* not an option, never use */ -} curl_usessl; - -/* Definition of bits for the CURLOPT_SSL_OPTIONS argument: */ - -/* - ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the - name of improving interoperability with older servers. Some SSL libraries - have introduced work-arounds for this flaw but those work-arounds sometimes - make the SSL communication fail. To regain functionality with those broken - servers, a user can this way allow the vulnerability back. */ -#define CURLSSLOPT_ALLOW_BEAST (1<<0) - -/* - NO_REVOKE tells libcurl to disable certificate revocation checks for those - SSL backends where such behavior is present. */ -#define CURLSSLOPT_NO_REVOKE (1<<1) - -#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all - the obsolete stuff removed! */ - -/* Backwards compatibility with older names */ -/* These are scheduled to disappear by 2009 */ - -#define CURLFTPSSL_NONE CURLUSESSL_NONE -#define CURLFTPSSL_TRY CURLUSESSL_TRY -#define CURLFTPSSL_CONTROL CURLUSESSL_CONTROL -#define CURLFTPSSL_ALL CURLUSESSL_ALL -#define CURLFTPSSL_LAST CURLUSESSL_LAST -#define curl_ftpssl curl_usessl -#endif /*!CURL_NO_OLDIES*/ - -/* parameter for the CURLOPT_FTP_SSL_CCC option */ -typedef enum { - CURLFTPSSL_CCC_NONE, /* do not send CCC */ - CURLFTPSSL_CCC_PASSIVE, /* Let the server initiate the shutdown */ - CURLFTPSSL_CCC_ACTIVE, /* Initiate the shutdown */ - CURLFTPSSL_CCC_LAST /* not an option, never use */ -} curl_ftpccc; - -/* parameter for the CURLOPT_FTPSSLAUTH option */ -typedef enum { - CURLFTPAUTH_DEFAULT, /* let libcurl decide */ - CURLFTPAUTH_SSL, /* use "AUTH SSL" */ - CURLFTPAUTH_TLS, /* use "AUTH TLS" */ - CURLFTPAUTH_LAST /* not an option, never use */ -} curl_ftpauth; - -/* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */ -typedef enum { - CURLFTP_CREATE_DIR_NONE, /* do NOT create missing dirs! */ - CURLFTP_CREATE_DIR, /* (FTP/SFTP) if CWD fails, try MKD and then CWD - again if MKD succeeded, for SFTP this does - similar magic */ - CURLFTP_CREATE_DIR_RETRY, /* (FTP only) if CWD fails, try MKD and then CWD - again even if MKD failed! */ - CURLFTP_CREATE_DIR_LAST /* not an option, never use */ -} curl_ftpcreatedir; - -/* parameter for the CURLOPT_FTP_FILEMETHOD option */ -typedef enum { - CURLFTPMETHOD_DEFAULT, /* let libcurl pick */ - CURLFTPMETHOD_MULTICWD, /* single CWD operation for each path part */ - CURLFTPMETHOD_NOCWD, /* no CWD at all */ - CURLFTPMETHOD_SINGLECWD, /* one CWD to full dir, then work on file */ - CURLFTPMETHOD_LAST /* not an option, never use */ -} curl_ftpmethod; - -/* bitmask defines for CURLOPT_HEADEROPT */ -#define CURLHEADER_UNIFIED 0 -#define CURLHEADER_SEPARATE (1<<0) - -/* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */ -#define CURLPROTO_HTTP (1<<0) -#define CURLPROTO_HTTPS (1<<1) -#define CURLPROTO_FTP (1<<2) -#define CURLPROTO_FTPS (1<<3) -#define CURLPROTO_SCP (1<<4) -#define CURLPROTO_SFTP (1<<5) -#define CURLPROTO_TELNET (1<<6) -#define CURLPROTO_LDAP (1<<7) -#define CURLPROTO_LDAPS (1<<8) -#define CURLPROTO_DICT (1<<9) -#define CURLPROTO_FILE (1<<10) -#define CURLPROTO_TFTP (1<<11) -#define CURLPROTO_IMAP (1<<12) -#define CURLPROTO_IMAPS (1<<13) -#define CURLPROTO_POP3 (1<<14) -#define CURLPROTO_POP3S (1<<15) -#define CURLPROTO_SMTP (1<<16) -#define CURLPROTO_SMTPS (1<<17) -#define CURLPROTO_RTSP (1<<18) -#define CURLPROTO_RTMP (1<<19) -#define CURLPROTO_RTMPT (1<<20) -#define CURLPROTO_RTMPE (1<<21) -#define CURLPROTO_RTMPTE (1<<22) -#define CURLPROTO_RTMPS (1<<23) -#define CURLPROTO_RTMPTS (1<<24) -#define CURLPROTO_GOPHER (1<<25) -#define CURLPROTO_SMB (1<<26) -#define CURLPROTO_SMBS (1<<27) -#define CURLPROTO_ALL (~0) /* enable everything */ - -/* long may be 32 or 64 bits, but we should never depend on anything else - but 32 */ -#define CURLOPTTYPE_LONG 0 -#define CURLOPTTYPE_OBJECTPOINT 10000 -#define CURLOPTTYPE_STRINGPOINT 10000 -#define CURLOPTTYPE_FUNCTIONPOINT 20000 -#define CURLOPTTYPE_OFF_T 30000 - -/* *STRINGPOINT is an alias for OBJECTPOINT to allow tools to extract the - string options from the header file */ - -/* name is uppercase CURLOPT_, - type is one of the defined CURLOPTTYPE_ - number is unique identifier */ -#ifdef CINIT -#undef CINIT -#endif - -#ifdef CURL_ISOCPP -#define CINIT(na,t,nu) CURLOPT_ ## na = CURLOPTTYPE_ ## t + nu -#else -/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ -#define LONG CURLOPTTYPE_LONG -#define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT -#define STRINGPOINT CURLOPTTYPE_OBJECTPOINT -#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT -#define OFF_T CURLOPTTYPE_OFF_T -#define CINIT(name,type,number) CURLOPT_/**/name = type + number -#endif - -/* - * This macro-mania below setups the CURLOPT_[what] enum, to be used with - * curl_easy_setopt(). The first argument in the CINIT() macro is the [what] - * word. - */ - -typedef enum { - /* This is the FILE * or void * the regular output should be written to. */ - CINIT(WRITEDATA, OBJECTPOINT, 1), - - /* The full URL to get/put */ - CINIT(URL, STRINGPOINT, 2), - - /* Port number to connect to, if other than default. */ - CINIT(PORT, LONG, 3), - - /* Name of proxy to use. */ - CINIT(PROXY, STRINGPOINT, 4), - - /* "user:password;options" to use when fetching. */ - CINIT(USERPWD, STRINGPOINT, 5), - - /* "user:password" to use with proxy. */ - CINIT(PROXYUSERPWD, STRINGPOINT, 6), - - /* Range to get, specified as an ASCII string. */ - CINIT(RANGE, STRINGPOINT, 7), - - /* not used */ - - /* Specified file stream to upload from (use as input): */ - CINIT(READDATA, OBJECTPOINT, 9), - - /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE - * bytes big. If this is not used, error messages go to stderr instead: */ - CINIT(ERRORBUFFER, OBJECTPOINT, 10), - - /* Function that will be called to store the output (instead of fwrite). The - * parameters will use fwrite() syntax, make sure to follow them. */ - CINIT(WRITEFUNCTION, FUNCTIONPOINT, 11), - - /* Function that will be called to read the input (instead of fread). The - * parameters will use fread() syntax, make sure to follow them. */ - CINIT(READFUNCTION, FUNCTIONPOINT, 12), - - /* Time-out the read operation after this amount of seconds */ - CINIT(TIMEOUT, LONG, 13), - - /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about - * how large the file being sent really is. That allows better error - * checking and better verifies that the upload was successful. -1 means - * unknown size. - * - * For large file support, there is also a _LARGE version of the key - * which takes an off_t type, allowing platforms with larger off_t - * sizes to handle larger files. See below for INFILESIZE_LARGE. - */ - CINIT(INFILESIZE, LONG, 14), - - /* POST static input fields. */ - CINIT(POSTFIELDS, OBJECTPOINT, 15), - - /* Set the referrer page (needed by some CGIs) */ - CINIT(REFERER, STRINGPOINT, 16), - - /* Set the FTP PORT string (interface name, named or numerical IP address) - Use i.e '-' to use default address. */ - CINIT(FTPPORT, STRINGPOINT, 17), - - /* Set the User-Agent string (examined by some CGIs) */ - CINIT(USERAGENT, STRINGPOINT, 18), - - /* If the download receives less than "low speed limit" bytes/second - * during "low speed time" seconds, the operations is aborted. - * You could i.e if you have a pretty high speed connection, abort if - * it is less than 2000 bytes/sec during 20 seconds. - */ - - /* Set the "low speed limit" */ - CINIT(LOW_SPEED_LIMIT, LONG, 19), - - /* Set the "low speed time" */ - CINIT(LOW_SPEED_TIME, LONG, 20), - - /* Set the continuation offset. - * - * Note there is also a _LARGE version of this key which uses - * off_t types, allowing for large file offsets on platforms which - * use larger-than-32-bit off_t's. Look below for RESUME_FROM_LARGE. - */ - CINIT(RESUME_FROM, LONG, 21), - - /* Set cookie in request: */ - CINIT(COOKIE, STRINGPOINT, 22), - - /* This points to a linked list of headers, struct curl_slist kind. This - list is also used for RTSP (in spite of its name) */ - CINIT(HTTPHEADER, OBJECTPOINT, 23), - - /* This points to a linked list of post entries, struct curl_httppost */ - CINIT(HTTPPOST, OBJECTPOINT, 24), - - /* name of the file keeping your private SSL-certificate */ - CINIT(SSLCERT, STRINGPOINT, 25), - - /* password for the SSL or SSH private key */ - CINIT(KEYPASSWD, STRINGPOINT, 26), - - /* send TYPE parameter? */ - CINIT(CRLF, LONG, 27), - - /* send linked-list of QUOTE commands */ - CINIT(QUOTE, OBJECTPOINT, 28), - - /* send FILE * or void * to store headers to, if you use a callback it - is simply passed to the callback unmodified */ - CINIT(HEADERDATA, OBJECTPOINT, 29), - - /* point to a file to read the initial cookies from, also enables - "cookie awareness" */ - CINIT(COOKIEFILE, STRINGPOINT, 31), - - /* What version to specifically try to use. - See CURL_SSLVERSION defines below. */ - CINIT(SSLVERSION, LONG, 32), - - /* What kind of HTTP time condition to use, see defines */ - CINIT(TIMECONDITION, LONG, 33), - - /* Time to use with the above condition. Specified in number of seconds - since 1 Jan 1970 */ - CINIT(TIMEVALUE, LONG, 34), - - /* 35 = OBSOLETE */ - - /* Custom request, for customizing the get command like - HTTP: DELETE, TRACE and others - FTP: to use a different list command - */ - CINIT(CUSTOMREQUEST, STRINGPOINT, 36), - - /* FILE handle to use instead of stderr */ - CINIT(STDERR, OBJECTPOINT, 37), - - /* 38 is not used */ - - /* send linked-list of post-transfer QUOTE commands */ - CINIT(POSTQUOTE, OBJECTPOINT, 39), - - CINIT(OBSOLETE40, OBJECTPOINT, 40), /* OBSOLETE, do not use! */ - - CINIT(VERBOSE, LONG, 41), /* talk a lot */ - CINIT(HEADER, LONG, 42), /* throw the header out too */ - CINIT(NOPROGRESS, LONG, 43), /* shut off the progress meter */ - CINIT(NOBODY, LONG, 44), /* use HEAD to get http document */ - CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 400 */ - CINIT(UPLOAD, LONG, 46), /* this is an upload */ - CINIT(POST, LONG, 47), /* HTTP POST method */ - CINIT(DIRLISTONLY, LONG, 48), /* bare names when listing directories */ - - CINIT(APPEND, LONG, 50), /* Append instead of overwrite on upload! */ - - /* Specify whether to read the user+password from the .netrc or the URL. - * This must be one of the CURL_NETRC_* enums below. */ - CINIT(NETRC, LONG, 51), - - CINIT(FOLLOWLOCATION, LONG, 52), /* use Location: Luke! */ - - CINIT(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */ - CINIT(PUT, LONG, 54), /* HTTP PUT */ - - /* 55 = OBSOLETE */ - - /* DEPRECATED - * Function that will be called instead of the internal progress display - * function. This function should be defined as the curl_progress_callback - * prototype defines. */ - CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56), - - /* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION - callbacks */ - CINIT(PROGRESSDATA, OBJECTPOINT, 57), -#define CURLOPT_XFERINFODATA CURLOPT_PROGRESSDATA - - /* We want the referrer field set automatically when following locations */ - CINIT(AUTOREFERER, LONG, 58), - - /* Port of the proxy, can be set in the proxy string as well with: - "[host]:[port]" */ - CINIT(PROXYPORT, LONG, 59), - - /* size of the POST input data, if strlen() is not good to use */ - CINIT(POSTFIELDSIZE, LONG, 60), - - /* tunnel non-http operations through a HTTP proxy */ - CINIT(HTTPPROXYTUNNEL, LONG, 61), - - /* Set the interface string to use as outgoing network interface */ - CINIT(INTERFACE, STRINGPOINT, 62), - - /* Set the krb4/5 security level, this also enables krb4/5 awareness. This - * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string - * is set but doesn't match one of these, 'private' will be used. */ - CINIT(KRBLEVEL, STRINGPOINT, 63), - - /* Set if we should verify the peer in ssl handshake, set 1 to verify. */ - CINIT(SSL_VERIFYPEER, LONG, 64), - - /* The CApath or CAfile used to validate the peer certificate - this option is used only if SSL_VERIFYPEER is true */ - CINIT(CAINFO, STRINGPOINT, 65), - - /* 66 = OBSOLETE */ - /* 67 = OBSOLETE */ - - /* Maximum number of http redirects to follow */ - CINIT(MAXREDIRS, LONG, 68), - - /* Pass a long set to 1 to get the date of the requested document (if - possible)! Pass a zero to shut it off. */ - CINIT(FILETIME, LONG, 69), - - /* This points to a linked list of telnet options */ - CINIT(TELNETOPTIONS, OBJECTPOINT, 70), - - /* Max amount of cached alive connections */ - CINIT(MAXCONNECTS, LONG, 71), - - CINIT(OBSOLETE72, LONG, 72), /* OBSOLETE, do not use! */ - - /* 73 = OBSOLETE */ - - /* Set to explicitly use a new connection for the upcoming transfer. - Do not use this unless you're absolutely sure of this, as it makes the - operation slower and is less friendly for the network. */ - CINIT(FRESH_CONNECT, LONG, 74), - - /* Set to explicitly forbid the upcoming transfer's connection to be re-used - when done. Do not use this unless you're absolutely sure of this, as it - makes the operation slower and is less friendly for the network. */ - CINIT(FORBID_REUSE, LONG, 75), - - /* Set to a file name that contains random data for libcurl to use to - seed the random engine when doing SSL connects. */ - CINIT(RANDOM_FILE, STRINGPOINT, 76), - - /* Set to the Entropy Gathering Daemon socket pathname */ - CINIT(EGDSOCKET, STRINGPOINT, 77), - - /* Time-out connect operations after this amount of seconds, if connects are - OK within this time, then fine... This only aborts the connect phase. */ - CINIT(CONNECTTIMEOUT, LONG, 78), - - /* Function that will be called to store headers (instead of fwrite). The - * parameters will use fwrite() syntax, make sure to follow them. */ - CINIT(HEADERFUNCTION, FUNCTIONPOINT, 79), - - /* Set this to force the HTTP request to get back to GET. Only really usable - if POST, PUT or a custom request have been used first. - */ - CINIT(HTTPGET, LONG, 80), - - /* Set if we should verify the Common name from the peer certificate in ssl - * handshake, set 1 to check existence, 2 to ensure that it matches the - * provided hostname. */ - CINIT(SSL_VERIFYHOST, LONG, 81), - - /* Specify which file name to write all known cookies in after completed - operation. Set file name to "-" (dash) to make it go to stdout. */ - CINIT(COOKIEJAR, STRINGPOINT, 82), - - /* Specify which SSL ciphers to use */ - CINIT(SSL_CIPHER_LIST, STRINGPOINT, 83), - - /* Specify which HTTP version to use! This must be set to one of the - CURL_HTTP_VERSION* enums set below. */ - CINIT(HTTP_VERSION, LONG, 84), - - /* Specifically switch on or off the FTP engine's use of the EPSV command. By - default, that one will always be attempted before the more traditional - PASV command. */ - CINIT(FTP_USE_EPSV, LONG, 85), - - /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */ - CINIT(SSLCERTTYPE, STRINGPOINT, 86), - - /* name of the file keeping your private SSL-key */ - CINIT(SSLKEY, STRINGPOINT, 87), - - /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */ - CINIT(SSLKEYTYPE, STRINGPOINT, 88), - - /* crypto engine for the SSL-sub system */ - CINIT(SSLENGINE, STRINGPOINT, 89), - - /* set the crypto engine for the SSL-sub system as default - the param has no meaning... - */ - CINIT(SSLENGINE_DEFAULT, LONG, 90), - - /* Non-zero value means to use the global dns cache */ - CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* DEPRECATED, do not use! */ - - /* DNS cache timeout */ - CINIT(DNS_CACHE_TIMEOUT, LONG, 92), - - /* send linked-list of pre-transfer QUOTE commands */ - CINIT(PREQUOTE, OBJECTPOINT, 93), - - /* set the debug function */ - CINIT(DEBUGFUNCTION, FUNCTIONPOINT, 94), - - /* set the data for the debug function */ - CINIT(DEBUGDATA, OBJECTPOINT, 95), - - /* mark this as start of a cookie session */ - CINIT(COOKIESESSION, LONG, 96), - - /* The CApath directory used to validate the peer certificate - this option is used only if SSL_VERIFYPEER is true */ - CINIT(CAPATH, STRINGPOINT, 97), - - /* Instruct libcurl to use a smaller receive buffer */ - CINIT(BUFFERSIZE, LONG, 98), - - /* Instruct libcurl to not use any signal/alarm handlers, even when using - timeouts. This option is useful for multi-threaded applications. - See libcurl-the-guide for more background information. */ - CINIT(NOSIGNAL, LONG, 99), - - /* Provide a CURLShare for mutexing non-ts data */ - CINIT(SHARE, OBJECTPOINT, 100), - - /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default), - CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5. */ - CINIT(PROXYTYPE, LONG, 101), - - /* Set the Accept-Encoding string. Use this to tell a server you would like - the response to be compressed. Before 7.21.6, this was known as - CURLOPT_ENCODING */ - CINIT(ACCEPT_ENCODING, STRINGPOINT, 102), - - /* Set pointer to private data */ - CINIT(PRIVATE, OBJECTPOINT, 103), - - /* Set aliases for HTTP 200 in the HTTP Response header */ - CINIT(HTTP200ALIASES, OBJECTPOINT, 104), - - /* Continue to send authentication (user+password) when following locations, - even when hostname changed. This can potentially send off the name - and password to whatever host the server decides. */ - CINIT(UNRESTRICTED_AUTH, LONG, 105), - - /* Specifically switch on or off the FTP engine's use of the EPRT command ( - it also disables the LPRT attempt). By default, those ones will always be - attempted before the good old traditional PORT command. */ - CINIT(FTP_USE_EPRT, LONG, 106), - - /* Set this to a bitmask value to enable the particular authentications - methods you like. Use this in combination with CURLOPT_USERPWD. - Note that setting multiple bits may cause extra network round-trips. */ - CINIT(HTTPAUTH, LONG, 107), - - /* Set the ssl context callback function, currently only for OpenSSL ssl_ctx - in second argument. The function must be matching the - curl_ssl_ctx_callback proto. */ - CINIT(SSL_CTX_FUNCTION, FUNCTIONPOINT, 108), - - /* Set the userdata for the ssl context callback function's third - argument */ - CINIT(SSL_CTX_DATA, OBJECTPOINT, 109), - - /* FTP Option that causes missing dirs to be created on the remote server. - In 7.19.4 we introduced the convenience enums for this option using the - CURLFTP_CREATE_DIR prefix. - */ - CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110), - - /* Set this to a bitmask value to enable the particular authentications - methods you like. Use this in combination with CURLOPT_PROXYUSERPWD. - Note that setting multiple bits may cause extra network round-trips. */ - CINIT(PROXYAUTH, LONG, 111), - - /* FTP option that changes the timeout, in seconds, associated with - getting a response. This is different from transfer timeout time and - essentially places a demand on the FTP server to acknowledge commands - in a timely manner. */ - CINIT(FTP_RESPONSE_TIMEOUT, LONG, 112), -#define CURLOPT_SERVER_RESPONSE_TIMEOUT CURLOPT_FTP_RESPONSE_TIMEOUT - - /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to - tell libcurl to resolve names to those IP versions only. This only has - affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */ - CINIT(IPRESOLVE, LONG, 113), - - /* Set this option to limit the size of a file that will be downloaded from - an HTTP or FTP server. - - Note there is also _LARGE version which adds large file support for - platforms which have larger off_t sizes. See MAXFILESIZE_LARGE below. */ - CINIT(MAXFILESIZE, LONG, 114), - - /* See the comment for INFILESIZE above, but in short, specifies - * the size of the file being uploaded. -1 means unknown. - */ - CINIT(INFILESIZE_LARGE, OFF_T, 115), - - /* Sets the continuation offset. There is also a LONG version of this; - * look above for RESUME_FROM. - */ - CINIT(RESUME_FROM_LARGE, OFF_T, 116), - - /* Sets the maximum size of data that will be downloaded from - * an HTTP or FTP server. See MAXFILESIZE above for the LONG version. - */ - CINIT(MAXFILESIZE_LARGE, OFF_T, 117), - - /* Set this option to the file name of your .netrc file you want libcurl - to parse (using the CURLOPT_NETRC option). If not set, libcurl will do - a poor attempt to find the user's home directory and check for a .netrc - file in there. */ - CINIT(NETRC_FILE, STRINGPOINT, 118), - - /* Enable SSL/TLS for FTP, pick one of: - CURLUSESSL_TRY - try using SSL, proceed anyway otherwise - CURLUSESSL_CONTROL - SSL for the control connection or fail - CURLUSESSL_ALL - SSL for all communication or fail - */ - CINIT(USE_SSL, LONG, 119), - - /* The _LARGE version of the standard POSTFIELDSIZE option */ - CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120), - - /* Enable/disable the TCP Nagle algorithm */ - CINIT(TCP_NODELAY, LONG, 121), - - /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ - /* 123 OBSOLETE. Gone in 7.16.0 */ - /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ - /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ - /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ - /* 127 OBSOLETE. Gone in 7.16.0 */ - /* 128 OBSOLETE. Gone in 7.16.0 */ - - /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option - can be used to change libcurl's default action which is to first try - "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK - response has been received. - - Available parameters are: - CURLFTPAUTH_DEFAULT - let libcurl decide - CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS - CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL - */ - CINIT(FTPSSLAUTH, LONG, 129), - - CINIT(IOCTLFUNCTION, FUNCTIONPOINT, 130), - CINIT(IOCTLDATA, OBJECTPOINT, 131), - - /* 132 OBSOLETE. Gone in 7.16.0 */ - /* 133 OBSOLETE. Gone in 7.16.0 */ - - /* zero terminated string for pass on to the FTP server when asked for - "account" info */ - CINIT(FTP_ACCOUNT, STRINGPOINT, 134), - - /* feed cookie into cookie engine */ - CINIT(COOKIELIST, STRINGPOINT, 135), - - /* ignore Content-Length */ - CINIT(IGNORE_CONTENT_LENGTH, LONG, 136), - - /* Set to non-zero to skip the IP address received in a 227 PASV FTP server - response. Typically used for FTP-SSL purposes but is not restricted to - that. libcurl will then instead use the same IP address it used for the - control connection. */ - CINIT(FTP_SKIP_PASV_IP, LONG, 137), - - /* Select "file method" to use when doing FTP, see the curl_ftpmethod - above. */ - CINIT(FTP_FILEMETHOD, LONG, 138), - - /* Local port number to bind the socket to */ - CINIT(LOCALPORT, LONG, 139), - - /* Number of ports to try, including the first one set with LOCALPORT. - Thus, setting it to 1 will make no additional attempts but the first. - */ - CINIT(LOCALPORTRANGE, LONG, 140), - - /* no transfer, set up connection and let application use the socket by - extracting it with CURLINFO_LASTSOCKET */ - CINIT(CONNECT_ONLY, LONG, 141), - - /* Function that will be called to convert from the - network encoding (instead of using the iconv calls in libcurl) */ - CINIT(CONV_FROM_NETWORK_FUNCTION, FUNCTIONPOINT, 142), - - /* Function that will be called to convert to the - network encoding (instead of using the iconv calls in libcurl) */ - CINIT(CONV_TO_NETWORK_FUNCTION, FUNCTIONPOINT, 143), - - /* Function that will be called to convert from UTF8 - (instead of using the iconv calls in libcurl) - Note that this is used only for SSL certificate processing */ - CINIT(CONV_FROM_UTF8_FUNCTION, FUNCTIONPOINT, 144), - - /* if the connection proceeds too quickly then need to slow it down */ - /* limit-rate: maximum number of bytes per second to send or receive */ - CINIT(MAX_SEND_SPEED_LARGE, OFF_T, 145), - CINIT(MAX_RECV_SPEED_LARGE, OFF_T, 146), - - /* Pointer to command string to send if USER/PASS fails. */ - CINIT(FTP_ALTERNATIVE_TO_USER, STRINGPOINT, 147), - - /* callback function for setting socket options */ - CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148), - CINIT(SOCKOPTDATA, OBJECTPOINT, 149), - - /* set to 0 to disable session ID re-use for this transfer, default is - enabled (== 1) */ - CINIT(SSL_SESSIONID_CACHE, LONG, 150), - - /* allowed SSH authentication methods */ - CINIT(SSH_AUTH_TYPES, LONG, 151), - - /* Used by scp/sftp to do public/private key authentication */ - CINIT(SSH_PUBLIC_KEYFILE, STRINGPOINT, 152), - CINIT(SSH_PRIVATE_KEYFILE, STRINGPOINT, 153), - - /* Send CCC (Clear Command Channel) after authentication */ - CINIT(FTP_SSL_CCC, LONG, 154), - - /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */ - CINIT(TIMEOUT_MS, LONG, 155), - CINIT(CONNECTTIMEOUT_MS, LONG, 156), - - /* set to zero to disable the libcurl's decoding and thus pass the raw body - data to the application even when it is encoded/compressed */ - CINIT(HTTP_TRANSFER_DECODING, LONG, 157), - CINIT(HTTP_CONTENT_DECODING, LONG, 158), - - /* Permission used when creating new files and directories on the remote - server for protocols that support it, SFTP/SCP/FILE */ - CINIT(NEW_FILE_PERMS, LONG, 159), - CINIT(NEW_DIRECTORY_PERMS, LONG, 160), - - /* Set the behaviour of POST when redirecting. Values must be set to one - of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */ - CINIT(POSTREDIR, LONG, 161), - - /* used by scp/sftp to verify the host's public key */ - CINIT(SSH_HOST_PUBLIC_KEY_MD5, STRINGPOINT, 162), - - /* Callback function for opening socket (instead of socket(2)). Optionally, - callback is able change the address or refuse to connect returning - CURL_SOCKET_BAD. The callback should have type - curl_opensocket_callback */ - CINIT(OPENSOCKETFUNCTION, FUNCTIONPOINT, 163), - CINIT(OPENSOCKETDATA, OBJECTPOINT, 164), - - /* POST volatile input fields. */ - CINIT(COPYPOSTFIELDS, OBJECTPOINT, 165), - - /* set transfer mode (;type=) when doing FTP via an HTTP proxy */ - CINIT(PROXY_TRANSFER_MODE, LONG, 166), - - /* Callback function for seeking in the input stream */ - CINIT(SEEKFUNCTION, FUNCTIONPOINT, 167), - CINIT(SEEKDATA, OBJECTPOINT, 168), - - /* CRL file */ - CINIT(CRLFILE, STRINGPOINT, 169), - - /* Issuer certificate */ - CINIT(ISSUERCERT, STRINGPOINT, 170), - - /* (IPv6) Address scope */ - CINIT(ADDRESS_SCOPE, LONG, 171), - - /* Collect certificate chain info and allow it to get retrievable with - CURLINFO_CERTINFO after the transfer is complete. */ - CINIT(CERTINFO, LONG, 172), - - /* "name" and "pwd" to use when fetching. */ - CINIT(USERNAME, STRINGPOINT, 173), - CINIT(PASSWORD, STRINGPOINT, 174), - - /* "name" and "pwd" to use with Proxy when fetching. */ - CINIT(PROXYUSERNAME, STRINGPOINT, 175), - CINIT(PROXYPASSWORD, STRINGPOINT, 176), - - /* Comma separated list of hostnames defining no-proxy zones. These should - match both hostnames directly, and hostnames within a domain. For - example, local.com will match local.com and www.local.com, but NOT - notlocal.com or www.notlocal.com. For compatibility with other - implementations of this, .local.com will be considered to be the same as - local.com. A single * is the only valid wildcard, and effectively - disables the use of proxy. */ - CINIT(NOPROXY, STRINGPOINT, 177), - - /* block size for TFTP transfers */ - CINIT(TFTP_BLKSIZE, LONG, 178), - - /* Socks Service */ - CINIT(SOCKS5_GSSAPI_SERVICE, STRINGPOINT, 179), /* DEPRECATED, do not use! */ - - /* Socks Service */ - CINIT(SOCKS5_GSSAPI_NEC, LONG, 180), - - /* set the bitmask for the protocols that are allowed to be used for the - transfer, which thus helps the app which takes URLs from users or other - external inputs and want to restrict what protocol(s) to deal - with. Defaults to CURLPROTO_ALL. */ - CINIT(PROTOCOLS, LONG, 181), - - /* set the bitmask for the protocols that libcurl is allowed to follow to, - as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs - to be set in both bitmasks to be allowed to get redirected to. Defaults - to all protocols except FILE and SCP. */ - CINIT(REDIR_PROTOCOLS, LONG, 182), - - /* set the SSH knownhost file name to use */ - CINIT(SSH_KNOWNHOSTS, STRINGPOINT, 183), - - /* set the SSH host key callback, must point to a curl_sshkeycallback - function */ - CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184), - - /* set the SSH host key callback custom pointer */ - CINIT(SSH_KEYDATA, OBJECTPOINT, 185), - - /* set the SMTP mail originator */ - CINIT(MAIL_FROM, STRINGPOINT, 186), - - /* set the list of SMTP mail receiver(s) */ - CINIT(MAIL_RCPT, OBJECTPOINT, 187), - - /* FTP: send PRET before PASV */ - CINIT(FTP_USE_PRET, LONG, 188), - - /* RTSP request method (OPTIONS, SETUP, PLAY, etc...) */ - CINIT(RTSP_REQUEST, LONG, 189), - - /* The RTSP session identifier */ - CINIT(RTSP_SESSION_ID, STRINGPOINT, 190), - - /* The RTSP stream URI */ - CINIT(RTSP_STREAM_URI, STRINGPOINT, 191), - - /* The Transport: header to use in RTSP requests */ - CINIT(RTSP_TRANSPORT, STRINGPOINT, 192), - - /* Manually initialize the client RTSP CSeq for this handle */ - CINIT(RTSP_CLIENT_CSEQ, LONG, 193), - - /* Manually initialize the server RTSP CSeq for this handle */ - CINIT(RTSP_SERVER_CSEQ, LONG, 194), - - /* The stream to pass to INTERLEAVEFUNCTION. */ - CINIT(INTERLEAVEDATA, OBJECTPOINT, 195), - - /* Let the application define a custom write method for RTP data */ - CINIT(INTERLEAVEFUNCTION, FUNCTIONPOINT, 196), - - /* Turn on wildcard matching */ - CINIT(WILDCARDMATCH, LONG, 197), - - /* Directory matching callback called before downloading of an - individual file (chunk) started */ - CINIT(CHUNK_BGN_FUNCTION, FUNCTIONPOINT, 198), - - /* Directory matching callback called after the file (chunk) - was downloaded, or skipped */ - CINIT(CHUNK_END_FUNCTION, FUNCTIONPOINT, 199), - - /* Change match (fnmatch-like) callback for wildcard matching */ - CINIT(FNMATCH_FUNCTION, FUNCTIONPOINT, 200), - - /* Let the application define custom chunk data pointer */ - CINIT(CHUNK_DATA, OBJECTPOINT, 201), - - /* FNMATCH_FUNCTION user pointer */ - CINIT(FNMATCH_DATA, OBJECTPOINT, 202), - - /* send linked-list of name:port:address sets */ - CINIT(RESOLVE, OBJECTPOINT, 203), - - /* Set a username for authenticated TLS */ - CINIT(TLSAUTH_USERNAME, STRINGPOINT, 204), - - /* Set a password for authenticated TLS */ - CINIT(TLSAUTH_PASSWORD, STRINGPOINT, 205), - - /* Set authentication type for authenticated TLS */ - CINIT(TLSAUTH_TYPE, STRINGPOINT, 206), - - /* Set to 1 to enable the "TE:" header in HTTP requests to ask for - compressed transfer-encoded responses. Set to 0 to disable the use of TE: - in outgoing requests. The current default is 0, but it might change in a - future libcurl release. - - libcurl will ask for the compressed methods it knows of, and if that - isn't any, it will not ask for transfer-encoding at all even if this - option is set to 1. - - */ - CINIT(TRANSFER_ENCODING, LONG, 207), - - /* Callback function for closing socket (instead of close(2)). The callback - should have type curl_closesocket_callback */ - CINIT(CLOSESOCKETFUNCTION, FUNCTIONPOINT, 208), - CINIT(CLOSESOCKETDATA, OBJECTPOINT, 209), - - /* allow GSSAPI credential delegation */ - CINIT(GSSAPI_DELEGATION, LONG, 210), - - /* Set the name servers to use for DNS resolution */ - CINIT(DNS_SERVERS, STRINGPOINT, 211), - - /* Time-out accept operations (currently for FTP only) after this amount - of miliseconds. */ - CINIT(ACCEPTTIMEOUT_MS, LONG, 212), - - /* Set TCP keepalive */ - CINIT(TCP_KEEPALIVE, LONG, 213), - - /* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */ - CINIT(TCP_KEEPIDLE, LONG, 214), - CINIT(TCP_KEEPINTVL, LONG, 215), - - /* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */ - CINIT(SSL_OPTIONS, LONG, 216), - - /* Set the SMTP auth originator */ - CINIT(MAIL_AUTH, STRINGPOINT, 217), - - /* Enable/disable SASL initial response */ - CINIT(SASL_IR, LONG, 218), - - /* Function that will be called instead of the internal progress display - * function. This function should be defined as the curl_xferinfo_callback - * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */ - CINIT(XFERINFOFUNCTION, FUNCTIONPOINT, 219), - - /* The XOAUTH2 bearer token */ - CINIT(XOAUTH2_BEARER, STRINGPOINT, 220), - - /* Set the interface string to use as outgoing network - * interface for DNS requests. - * Only supported by the c-ares DNS backend */ - CINIT(DNS_INTERFACE, STRINGPOINT, 221), - - /* Set the local IPv4 address to use for outgoing DNS requests. - * Only supported by the c-ares DNS backend */ - CINIT(DNS_LOCAL_IP4, STRINGPOINT, 222), - - /* Set the local IPv4 address to use for outgoing DNS requests. - * Only supported by the c-ares DNS backend */ - CINIT(DNS_LOCAL_IP6, STRINGPOINT, 223), - - /* Set authentication options directly */ - CINIT(LOGIN_OPTIONS, STRINGPOINT, 224), - - /* Enable/disable TLS NPN extension (http2 over ssl might fail without) */ - CINIT(SSL_ENABLE_NPN, LONG, 225), - - /* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */ - CINIT(SSL_ENABLE_ALPN, LONG, 226), - - /* Time to wait for a response to a HTTP request containing an - * Expect: 100-continue header before sending the data anyway. */ - CINIT(EXPECT_100_TIMEOUT_MS, LONG, 227), - - /* This points to a linked list of headers used for proxy requests only, - struct curl_slist kind */ - CINIT(PROXYHEADER, OBJECTPOINT, 228), - - /* Pass in a bitmask of "header options" */ - CINIT(HEADEROPT, LONG, 229), - - /* The public key in DER form used to validate the peer public key - this option is used only if SSL_VERIFYPEER is true */ - CINIT(PINNEDPUBLICKEY, STRINGPOINT, 230), - - /* Path to Unix domain socket */ - CINIT(UNIX_SOCKET_PATH, STRINGPOINT, 231), - - /* Set if we should verify the certificate status. */ - CINIT(SSL_VERIFYSTATUS, LONG, 232), - - /* Set if we should enable TLS false start. */ - CINIT(SSL_FALSESTART, LONG, 233), - - /* Do not squash dot-dot sequences */ - CINIT(PATH_AS_IS, LONG, 234), - - /* Proxy Service Name */ - CINIT(PROXY_SERVICE_NAME, STRINGPOINT, 235), - - /* Service Name */ - CINIT(SERVICE_NAME, STRINGPOINT, 236), - - /* Wait/don't wait for pipe/mutex to clarify */ - CINIT(PIPEWAIT, LONG, 237), - - /* Set the protocol used when curl is given a URL without a protocol */ - CINIT(DEFAULT_PROTOCOL, STRINGPOINT, 238), - - /* Set stream weight, 1 - 256 (default is 16) */ - CINIT(STREAM_WEIGHT, LONG, 239), - - /* Set stream dependency on another CURL handle */ - CINIT(STREAM_DEPENDS, OBJECTPOINT, 240), - - /* Set E-xclusive stream dependency on another CURL handle */ - CINIT(STREAM_DEPENDS_E, OBJECTPOINT, 241), - - /* Do not send any tftp option requests to the server */ - CINIT(TFTP_NO_OPTIONS, LONG, 242), - - /* Linked-list of host:port:connect-to-host:connect-to-port, - overrides the URL's host:port (only for the network layer) */ - CINIT(CONNECT_TO, OBJECTPOINT, 243), - - /* Set TCP Fast Open */ - CINIT(TCP_FASTOPEN, LONG, 244), - - CURLOPT_LASTENTRY /* the last unused */ -} CURLoption; - -#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all - the obsolete stuff removed! */ - -/* Backwards compatibility with older names */ -/* These are scheduled to disappear by 2011 */ - -/* This was added in version 7.19.1 */ -#define CURLOPT_POST301 CURLOPT_POSTREDIR - -/* These are scheduled to disappear by 2009 */ - -/* The following were added in 7.17.0 */ -#define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD -#define CURLOPT_FTPAPPEND CURLOPT_APPEND -#define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY -#define CURLOPT_FTP_SSL CURLOPT_USE_SSL - -/* The following were added earlier */ - -#define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD -#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL - -#else -/* This is set if CURL_NO_OLDIES is defined at compile-time */ -#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */ -#endif - - - /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host - name resolves addresses using more than one IP protocol version, this - option might be handy to force libcurl to use a specific IP version. */ -#define CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP - versions that your system allows */ -#define CURL_IPRESOLVE_V4 1 /* resolve to IPv4 addresses */ -#define CURL_IPRESOLVE_V6 2 /* resolve to IPv6 addresses */ - - /* three convenient "aliases" that follow the name scheme better */ -#define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER - - /* These enums are for use with the CURLOPT_HTTP_VERSION option. */ -enum { - CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd - like the library to choose the best possible - for us! */ - CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */ - CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */ - CURL_HTTP_VERSION_2_0, /* please use HTTP 2 in the request */ - CURL_HTTP_VERSION_2TLS, /* use version 2 for HTTPS, version 1.1 for HTTP */ - CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, /* please use HTTP 2 without HTTP/1.1 - Upgrade */ - - CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */ -}; - -/* Convenience definition simple because the name of the version is HTTP/2 and - not 2.0. The 2_0 version of the enum name was set while the version was - still planned to be 2.0 and we stick to it for compatibility. */ -#define CURL_HTTP_VERSION_2 CURL_HTTP_VERSION_2_0 - -/* - * Public API enums for RTSP requests - */ -enum { - CURL_RTSPREQ_NONE, /* first in list */ - CURL_RTSPREQ_OPTIONS, - CURL_RTSPREQ_DESCRIBE, - CURL_RTSPREQ_ANNOUNCE, - CURL_RTSPREQ_SETUP, - CURL_RTSPREQ_PLAY, - CURL_RTSPREQ_PAUSE, - CURL_RTSPREQ_TEARDOWN, - CURL_RTSPREQ_GET_PARAMETER, - CURL_RTSPREQ_SET_PARAMETER, - CURL_RTSPREQ_RECORD, - CURL_RTSPREQ_RECEIVE, - CURL_RTSPREQ_LAST /* last in list */ -}; - - /* These enums are for use with the CURLOPT_NETRC option. */ -enum CURL_NETRC_OPTION { - CURL_NETRC_IGNORED, /* The .netrc will never be read. - * This is the default. */ - CURL_NETRC_OPTIONAL, /* A user:password in the URL will be preferred - * to one in the .netrc. */ - CURL_NETRC_REQUIRED, /* A user:password in the URL will be ignored. - * Unless one is set programmatically, the .netrc - * will be queried. */ - CURL_NETRC_LAST -}; - -enum { - CURL_SSLVERSION_DEFAULT, - CURL_SSLVERSION_TLSv1, /* TLS 1.x */ - CURL_SSLVERSION_SSLv2, - CURL_SSLVERSION_SSLv3, - CURL_SSLVERSION_TLSv1_0, - CURL_SSLVERSION_TLSv1_1, - CURL_SSLVERSION_TLSv1_2, - - CURL_SSLVERSION_LAST /* never use, keep last */ -}; - -enum CURL_TLSAUTH { - CURL_TLSAUTH_NONE, - CURL_TLSAUTH_SRP, - CURL_TLSAUTH_LAST /* never use, keep last */ -}; - -/* symbols to use with CURLOPT_POSTREDIR. - CURL_REDIR_POST_301, CURL_REDIR_POST_302 and CURL_REDIR_POST_303 - can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_302 - | CURL_REDIR_POST_303 == CURL_REDIR_POST_ALL */ - -#define CURL_REDIR_GET_ALL 0 -#define CURL_REDIR_POST_301 1 -#define CURL_REDIR_POST_302 2 -#define CURL_REDIR_POST_303 4 -#define CURL_REDIR_POST_ALL \ - (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303) - -typedef enum { - CURL_TIMECOND_NONE, - - CURL_TIMECOND_IFMODSINCE, - CURL_TIMECOND_IFUNMODSINCE, - CURL_TIMECOND_LASTMOD, - - CURL_TIMECOND_LAST -} curl_TimeCond; - - -/* curl_strequal() and curl_strnequal() are subject for removal in a future - libcurl, see lib/README.curlx for details */ -CURL_EXTERN int (curl_strequal)(const char *s1, const char *s2); -CURL_EXTERN int (curl_strnequal)(const char *s1, const char *s2, size_t n); - -/* name is uppercase CURLFORM_ */ -#ifdef CFINIT -#undef CFINIT -#endif - -#ifdef CURL_ISOCPP -#define CFINIT(name) CURLFORM_ ## name -#else -/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ -#define CFINIT(name) CURLFORM_/**/name -#endif - -typedef enum { - CFINIT(NOTHING), /********* the first one is unused ************/ - - /* */ - CFINIT(COPYNAME), - CFINIT(PTRNAME), - CFINIT(NAMELENGTH), - CFINIT(COPYCONTENTS), - CFINIT(PTRCONTENTS), - CFINIT(CONTENTSLENGTH), - CFINIT(FILECONTENT), - CFINIT(ARRAY), - CFINIT(OBSOLETE), - CFINIT(FILE), - - CFINIT(BUFFER), - CFINIT(BUFFERPTR), - CFINIT(BUFFERLENGTH), - - CFINIT(CONTENTTYPE), - CFINIT(CONTENTHEADER), - CFINIT(FILENAME), - CFINIT(END), - CFINIT(OBSOLETE2), - - CFINIT(STREAM), - CFINIT(CONTENTLEN), /* added in 7.46.0, provide a curl_off_t length */ - - CURLFORM_LASTENTRY /* the last unused */ -} CURLformoption; - -#undef CFINIT /* done */ - -/* structure to be used as parameter for CURLFORM_ARRAY */ -struct curl_forms { - CURLformoption option; - const char *value; -}; - -/* use this for multipart formpost building */ -/* Returns code for curl_formadd() - * - * Returns: - * CURL_FORMADD_OK on success - * CURL_FORMADD_MEMORY if the FormInfo allocation fails - * CURL_FORMADD_OPTION_TWICE if one option is given twice for one Form - * CURL_FORMADD_NULL if a null pointer was given for a char - * CURL_FORMADD_MEMORY if the allocation of a FormInfo struct failed - * CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used - * CURL_FORMADD_INCOMPLETE if the some FormInfo is not complete (or error) - * CURL_FORMADD_MEMORY if a curl_httppost struct cannot be allocated - * CURL_FORMADD_MEMORY if some allocation for string copying failed. - * CURL_FORMADD_ILLEGAL_ARRAY if an illegal option is used in an array - * - ***************************************************************************/ -typedef enum { - CURL_FORMADD_OK, /* first, no error */ - - CURL_FORMADD_MEMORY, - CURL_FORMADD_OPTION_TWICE, - CURL_FORMADD_NULL, - CURL_FORMADD_UNKNOWN_OPTION, - CURL_FORMADD_INCOMPLETE, - CURL_FORMADD_ILLEGAL_ARRAY, - CURL_FORMADD_DISABLED, /* libcurl was built with this disabled */ - - CURL_FORMADD_LAST /* last */ -} CURLFORMcode; - -/* - * NAME curl_formadd() - * - * DESCRIPTION - * - * Pretty advanced function for building multi-part formposts. Each invoke - * adds one part that together construct a full post. Then use - * CURLOPT_HTTPPOST to send it off to libcurl. - */ -CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost, - struct curl_httppost **last_post, - ...); - -/* - * callback function for curl_formget() - * The void *arg pointer will be the one passed as second argument to - * curl_formget(). - * The character buffer passed to it must not be freed. - * Should return the buffer length passed to it as the argument "len" on - * success. - */ -typedef size_t (*curl_formget_callback)(void *arg, const char *buf, - size_t len); - -/* - * NAME curl_formget() - * - * DESCRIPTION - * - * Serialize a curl_httppost struct built with curl_formadd(). - * Accepts a void pointer as second argument which will be passed to - * the curl_formget_callback function. - * Returns 0 on success. - */ -CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg, - curl_formget_callback append); -/* - * NAME curl_formfree() - * - * DESCRIPTION - * - * Free a multipart formpost previously built with curl_formadd(). - */ -CURL_EXTERN void curl_formfree(struct curl_httppost *form); - -/* - * NAME curl_getenv() - * - * DESCRIPTION - * - * Returns a malloc()'ed string that MUST be curl_free()ed after usage is - * complete. DEPRECATED - see lib/README.curlx - */ -CURL_EXTERN char *curl_getenv(const char *variable); - -/* - * NAME curl_version() - * - * DESCRIPTION - * - * Returns a static ascii string of the libcurl version. - */ -CURL_EXTERN char *curl_version(void); - -/* - * NAME curl_easy_escape() - * - * DESCRIPTION - * - * Escapes URL strings (converts all letters consider illegal in URLs to their - * %XX versions). This function returns a new allocated string or NULL if an - * error occurred. - */ -CURL_EXTERN char *curl_easy_escape(CURL *handle, - const char *string, - int length); - -/* the previous version: */ -CURL_EXTERN char *curl_escape(const char *string, - int length); - - -/* - * NAME curl_easy_unescape() - * - * DESCRIPTION - * - * Unescapes URL encoding in strings (converts all %XX codes to their 8bit - * versions). This function returns a new allocated string or NULL if an error - * occurred. - * Conversion Note: On non-ASCII platforms the ASCII %XX codes are - * converted into the host encoding. - */ -CURL_EXTERN char *curl_easy_unescape(CURL *handle, - const char *string, - int length, - int *outlength); - -/* the previous version */ -CURL_EXTERN char *curl_unescape(const char *string, - int length); - -/* - * NAME curl_free() - * - * DESCRIPTION - * - * Provided for de-allocation in the same translation unit that did the - * allocation. Added in libcurl 7.10 - */ -CURL_EXTERN void curl_free(void *p); - -/* - * NAME curl_global_init() - * - * DESCRIPTION - * - * curl_global_init() should be invoked exactly once for each application that - * uses libcurl and before any call of other libcurl functions. - * - * This function is not thread-safe! - */ -CURL_EXTERN CURLcode curl_global_init(long flags); - -/* - * NAME curl_global_init_mem() - * - * DESCRIPTION - * - * curl_global_init() or curl_global_init_mem() should be invoked exactly once - * for each application that uses libcurl. This function can be used to - * initialize libcurl and set user defined memory management callback - * functions. Users can implement memory management routines to check for - * memory leaks, check for mis-use of the curl library etc. User registered - * callback routines with be invoked by this library instead of the system - * memory management routines like malloc, free etc. - */ -CURL_EXTERN CURLcode curl_global_init_mem(long flags, - curl_malloc_callback m, - curl_free_callback f, - curl_realloc_callback r, - curl_strdup_callback s, - curl_calloc_callback c); - -/* - * NAME curl_global_cleanup() - * - * DESCRIPTION - * - * curl_global_cleanup() should be invoked exactly once for each application - * that uses libcurl - */ -CURL_EXTERN void curl_global_cleanup(void); - -/* linked-list structure for the CURLOPT_QUOTE option (and other) */ -struct curl_slist { - char *data; - struct curl_slist *next; -}; - -/* - * NAME curl_slist_append() - * - * DESCRIPTION - * - * Appends a string to a linked list. If no list exists, it will be created - * first. Returns the new list, after appending. - */ -CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *, - const char *); - -/* - * NAME curl_slist_free_all() - * - * DESCRIPTION - * - * free a previously built curl_slist. - */ -CURL_EXTERN void curl_slist_free_all(struct curl_slist *); - -/* - * NAME curl_getdate() - * - * DESCRIPTION - * - * Returns the time, in seconds since 1 Jan 1970 of the time string given in - * the first argument. The time argument in the second parameter is unused - * and should be set to NULL. - */ -CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused); - -/* info about the certificate chain, only for OpenSSL builds. Asked - for with CURLOPT_CERTINFO / CURLINFO_CERTINFO */ -struct curl_certinfo { - int num_of_certs; /* number of certificates with information */ - struct curl_slist **certinfo; /* for each index in this array, there's a - linked list with textual information in the - format "name: value" */ -}; - -/* enum for the different supported SSL backends */ -typedef enum { - CURLSSLBACKEND_NONE = 0, - CURLSSLBACKEND_OPENSSL = 1, - CURLSSLBACKEND_GNUTLS = 2, - CURLSSLBACKEND_NSS = 3, - CURLSSLBACKEND_OBSOLETE4 = 4, /* Was QSOSSL. */ - CURLSSLBACKEND_GSKIT = 5, - CURLSSLBACKEND_POLARSSL = 6, - CURLSSLBACKEND_CYASSL = 7, - CURLSSLBACKEND_SCHANNEL = 8, - CURLSSLBACKEND_DARWINSSL = 9, - CURLSSLBACKEND_AXTLS = 10, - CURLSSLBACKEND_MBEDTLS = 11 -} curl_sslbackend; - -/* aliases for library clones and renames */ -#define CURLSSLBACKEND_LIBRESSL 1 -#define CURLSSLBACKEND_BORINGSSL 1 -#define CURLSSLBACKEND_WOLFSSL 6 - -/* Information about the SSL library used and the respective internal SSL - handle, which can be used to obtain further information regarding the - connection. Asked for with CURLINFO_TLS_SSL_PTR or CURLINFO_TLS_SESSION. */ -struct curl_tlssessioninfo { - curl_sslbackend backend; - void *internals; -}; - -#define CURLINFO_STRING 0x100000 -#define CURLINFO_LONG 0x200000 -#define CURLINFO_DOUBLE 0x300000 -#define CURLINFO_SLIST 0x400000 -#define CURLINFO_SOCKET 0x500000 -#define CURLINFO_MASK 0x0fffff -#define CURLINFO_TYPEMASK 0xf00000 - -typedef enum { - CURLINFO_NONE, /* first, never use this */ - CURLINFO_EFFECTIVE_URL = CURLINFO_STRING + 1, - CURLINFO_RESPONSE_CODE = CURLINFO_LONG + 2, - CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE + 3, - CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4, - CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5, - CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6, - CURLINFO_SIZE_UPLOAD = CURLINFO_DOUBLE + 7, - CURLINFO_SIZE_DOWNLOAD = CURLINFO_DOUBLE + 8, - CURLINFO_SPEED_DOWNLOAD = CURLINFO_DOUBLE + 9, - CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE + 10, - CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11, - CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12, - CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13, - CURLINFO_FILETIME = CURLINFO_LONG + 14, - CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15, - CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE + 16, - CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17, - CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18, - CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19, - CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20, - CURLINFO_PRIVATE = CURLINFO_STRING + 21, - CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22, - CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23, - CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24, - CURLINFO_OS_ERRNO = CURLINFO_LONG + 25, - CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26, - CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27, - CURLINFO_COOKIELIST = CURLINFO_SLIST + 28, - CURLINFO_LASTSOCKET = CURLINFO_LONG + 29, - CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30, - CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31, - CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32, - CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33, - CURLINFO_CERTINFO = CURLINFO_SLIST + 34, - CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35, - CURLINFO_RTSP_SESSION_ID = CURLINFO_STRING + 36, - CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG + 37, - CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG + 38, - CURLINFO_RTSP_CSEQ_RECV = CURLINFO_LONG + 39, - CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40, - CURLINFO_LOCAL_IP = CURLINFO_STRING + 41, - CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42, - CURLINFO_TLS_SESSION = CURLINFO_SLIST + 43, - CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44, - CURLINFO_TLS_SSL_PTR = CURLINFO_SLIST + 45, - CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46, - /* Fill in new entries below here! */ - - CURLINFO_LASTONE = 46 -} CURLINFO; - -/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as - CURLINFO_HTTP_CODE */ -#define CURLINFO_HTTP_CODE CURLINFO_RESPONSE_CODE - -typedef enum { - CURLCLOSEPOLICY_NONE, /* first, never use this */ - - CURLCLOSEPOLICY_OLDEST, - CURLCLOSEPOLICY_LEAST_RECENTLY_USED, - CURLCLOSEPOLICY_LEAST_TRAFFIC, - CURLCLOSEPOLICY_SLOWEST, - CURLCLOSEPOLICY_CALLBACK, - - CURLCLOSEPOLICY_LAST /* last, never use this */ -} curl_closepolicy; - -#define CURL_GLOBAL_SSL (1<<0) -#define CURL_GLOBAL_WIN32 (1<<1) -#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32) -#define CURL_GLOBAL_NOTHING 0 -#define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL -#define CURL_GLOBAL_ACK_EINTR (1<<2) - - -/***************************************************************************** - * Setup defines, protos etc for the sharing stuff. - */ - -/* Different data locks for a single share */ -typedef enum { - CURL_LOCK_DATA_NONE = 0, - /* CURL_LOCK_DATA_SHARE is used internally to say that - * the locking is just made to change the internal state of the share - * itself. - */ - CURL_LOCK_DATA_SHARE, - CURL_LOCK_DATA_COOKIE, - CURL_LOCK_DATA_DNS, - CURL_LOCK_DATA_SSL_SESSION, - CURL_LOCK_DATA_CONNECT, - CURL_LOCK_DATA_LAST -} curl_lock_data; - -/* Different lock access types */ -typedef enum { - CURL_LOCK_ACCESS_NONE = 0, /* unspecified action */ - CURL_LOCK_ACCESS_SHARED = 1, /* for read perhaps */ - CURL_LOCK_ACCESS_SINGLE = 2, /* for write perhaps */ - CURL_LOCK_ACCESS_LAST /* never use */ -} curl_lock_access; - -typedef void (*curl_lock_function)(CURL *handle, - curl_lock_data data, - curl_lock_access locktype, - void *userptr); -typedef void (*curl_unlock_function)(CURL *handle, - curl_lock_data data, - void *userptr); - -typedef struct Curl_share CURLSH; - -typedef enum { - CURLSHE_OK, /* all is fine */ - CURLSHE_BAD_OPTION, /* 1 */ - CURLSHE_IN_USE, /* 2 */ - CURLSHE_INVALID, /* 3 */ - CURLSHE_NOMEM, /* 4 out of memory */ - CURLSHE_NOT_BUILT_IN, /* 5 feature not present in lib */ - CURLSHE_LAST /* never use */ -} CURLSHcode; - -typedef enum { - CURLSHOPT_NONE, /* don't use */ - CURLSHOPT_SHARE, /* specify a data type to share */ - CURLSHOPT_UNSHARE, /* specify which data type to stop sharing */ - CURLSHOPT_LOCKFUNC, /* pass in a 'curl_lock_function' pointer */ - CURLSHOPT_UNLOCKFUNC, /* pass in a 'curl_unlock_function' pointer */ - CURLSHOPT_USERDATA, /* pass in a user data pointer used in the lock/unlock - callback functions */ - CURLSHOPT_LAST /* never use */ -} CURLSHoption; - -CURL_EXTERN CURLSH *curl_share_init(void); -CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *, CURLSHoption option, ...); -CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *); - -/**************************************************************************** - * Structures for querying information about the curl library at runtime. - */ - -typedef enum { - CURLVERSION_FIRST, - CURLVERSION_SECOND, - CURLVERSION_THIRD, - CURLVERSION_FOURTH, - CURLVERSION_LAST /* never actually use this */ -} CURLversion; - -/* The 'CURLVERSION_NOW' is the symbolic name meant to be used by - basically all programs ever that want to get version information. It is - meant to be a built-in version number for what kind of struct the caller - expects. If the struct ever changes, we redefine the NOW to another enum - from above. */ -#define CURLVERSION_NOW CURLVERSION_FOURTH - -typedef struct { - CURLversion age; /* age of the returned struct */ - const char *version; /* LIBCURL_VERSION */ - unsigned int version_num; /* LIBCURL_VERSION_NUM */ - const char *host; /* OS/host/cpu/machine when configured */ - int features; /* bitmask, see defines below */ - const char *ssl_version; /* human readable string */ - long ssl_version_num; /* not used anymore, always 0 */ - const char *libz_version; /* human readable string */ - /* protocols is terminated by an entry with a NULL protoname */ - const char * const *protocols; - - /* The fields below this were added in CURLVERSION_SECOND */ - const char *ares; - int ares_num; - - /* This field was added in CURLVERSION_THIRD */ - const char *libidn; - - /* These field were added in CURLVERSION_FOURTH */ - - /* Same as '_libiconv_version' if built with HAVE_ICONV */ - int iconv_ver_num; - - const char *libssh_version; /* human readable string */ - -} curl_version_info_data; - -#define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */ -#define CURL_VERSION_KERBEROS4 (1<<1) /* Kerberos V4 auth is supported - (deprecated) */ -#define CURL_VERSION_SSL (1<<2) /* SSL options are present */ -#define CURL_VERSION_LIBZ (1<<3) /* libz features are present */ -#define CURL_VERSION_NTLM (1<<4) /* NTLM auth is supported */ -#define CURL_VERSION_GSSNEGOTIATE (1<<5) /* Negotiate auth is supported - (deprecated) */ -#define CURL_VERSION_DEBUG (1<<6) /* Built with debug capabilities */ -#define CURL_VERSION_ASYNCHDNS (1<<7) /* Asynchronous DNS resolves */ -#define CURL_VERSION_SPNEGO (1<<8) /* SPNEGO auth is supported */ -#define CURL_VERSION_LARGEFILE (1<<9) /* Supports files larger than 2GB */ -#define CURL_VERSION_IDN (1<<10) /* Internationized Domain Names are - supported */ -#define CURL_VERSION_SSPI (1<<11) /* Built against Windows SSPI */ -#define CURL_VERSION_CONV (1<<12) /* Character conversions supported */ -#define CURL_VERSION_CURLDEBUG (1<<13) /* Debug memory tracking supported */ -#define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */ -#define CURL_VERSION_NTLM_WB (1<<15) /* NTLM delegation to winbind helper - is suported */ -#define CURL_VERSION_HTTP2 (1<<16) /* HTTP2 support built-in */ -#define CURL_VERSION_GSSAPI (1<<17) /* Built against a GSS-API library */ -#define CURL_VERSION_KERBEROS5 (1<<18) /* Kerberos V5 auth is supported */ -#define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */ -#define CURL_VERSION_PSL (1<<20) /* Mozilla's Public Suffix List, used - for cookie domain verification */ - - /* - * NAME curl_version_info() - * - * DESCRIPTION - * - * This function returns a pointer to a static copy of the version info - * struct. See above. - */ -CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion); - -/* - * NAME curl_easy_strerror() - * - * DESCRIPTION - * - * The curl_easy_strerror function may be used to turn a CURLcode value - * into the equivalent human readable error string. This is useful - * for printing meaningful error messages. - */ -CURL_EXTERN const char *curl_easy_strerror(CURLcode); - -/* - * NAME curl_share_strerror() - * - * DESCRIPTION - * - * The curl_share_strerror function may be used to turn a CURLSHcode value - * into the equivalent human readable error string. This is useful - * for printing meaningful error messages. - */ -CURL_EXTERN const char *curl_share_strerror(CURLSHcode); - -/* - * NAME curl_easy_pause() - * - * DESCRIPTION - * - * The curl_easy_pause function pauses or unpauses transfers. Select the new - * state by setting the bitmask, use the convenience defines below. - * - */ -CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); - -#define CURLPAUSE_RECV (1<<0) -#define CURLPAUSE_RECV_CONT (0) - -#define CURLPAUSE_SEND (1<<2) -#define CURLPAUSE_SEND_CONT (0) - -#define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND) -#define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT) - -#ifdef __cplusplus -} -#endif - -/* unfortunately, the easy.h and multi.h include files need options and info - stuff before they can be included! */ -#include "easy.h" /* nothing in curl is fun without the easy stuff */ -#include "multi.h" - -/* the typechecker doesn't work in C++ (yet) */ -#if defined(__GNUC__) && defined(__GNUC_MINOR__) && \ - ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \ - !defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK) -#include "typecheck-gcc.h" -#else -#if defined(__STDC__) && (__STDC__ >= 1) -/* This preprocessor magic that replaces a call with the exact same call is - only done to make sure application authors pass exactly three arguments - to these functions. */ -#define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param) -#define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg) -#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) -#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param) -#endif /* __STDC__ >= 1 */ -#endif /* gcc >= 4.3 && !__cplusplus */ - -#endif /* __CURL_CURL_H */ diff --git a/builddir/curl-master/include/curl/curlbuild.h b/builddir/curl-master/include/curl/curlbuild.h deleted file mode 100644 index eb3afab..0000000 --- a/builddir/curl-master/include/curl/curlbuild.h +++ /dev/null @@ -1,197 +0,0 @@ -#ifndef __CURL_CURLBUILD_H -#define __CURL_CURLBUILD_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2008, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* ================================================================ */ -/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ -/* ================================================================ */ - -/* - * NOTE 1: - * ------- - * - * Nothing in this file is intended to be modified or adjusted by the - * curl library user nor by the curl library builder. - * - * If you think that something actually needs to be changed, adjusted - * or fixed in this file, then, report it on the libcurl development - * mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/ - * - * This header file shall only export symbols which are 'curl' or 'CURL' - * prefixed, otherwise public name space would be polluted. - * - * NOTE 2: - * ------- - * - * Right now you might be staring at file include/curl/curlbuild.h.in or - * at file include/curl/curlbuild.h, this is due to the following reason: - * - * On systems capable of running the configure script, the configure process - * will overwrite the distributed include/curl/curlbuild.h file with one that - * is suitable and specific to the library being configured and built, which - * is generated from the include/curl/curlbuild.h.in template file. - * - */ - -/* ================================================================ */ -/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ -/* ================================================================ */ - -#ifdef CURL_SIZEOF_LONG -#error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined -#endif - -#ifdef CURL_TYPEOF_CURL_SOCKLEN_T -#error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined -#endif - -#ifdef CURL_SIZEOF_CURL_SOCKLEN_T -#error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined -#endif - -#ifdef CURL_TYPEOF_CURL_OFF_T -#error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_FORMAT_CURL_OFF_T -#error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_FORMAT_CURL_OFF_TU -#error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined -#endif - -#ifdef CURL_FORMAT_OFF_T -#error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined -#endif - -#ifdef CURL_SIZEOF_CURL_OFF_T -#error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_SUFFIX_CURL_OFF_T -#error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_SUFFIX_CURL_OFF_TU -#error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined -#endif - -/* ================================================================ */ -/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ -/* ================================================================ */ - -/* Configure process defines this to 1 when it finds out that system */ -/* header file ws2tcpip.h must be included by the external interface. */ -#define CURL_PULL_WS2TCPIP_H -#ifdef CURL_PULL_WS2TCPIP_H -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# include -# include -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/types.h must be included by the external interface. */ -/* #undef CURL_PULL_SYS_TYPES_H */ -#ifdef CURL_PULL_SYS_TYPES_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file stdint.h must be included by the external interface. */ -/* #undef CURL_PULL_STDINT_H */ -#ifdef CURL_PULL_STDINT_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file inttypes.h must be included by the external interface. */ -/* #undef CURL_PULL_INTTYPES_H */ -#ifdef CURL_PULL_INTTYPES_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/socket.h must be included by the external interface. */ -/* #undef CURL_PULL_SYS_SOCKET_H */ -#ifdef CURL_PULL_SYS_SOCKET_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/poll.h must be included by the external interface. */ -/* #undef CURL_PULL_SYS_POLL_H */ -#ifdef CURL_PULL_SYS_POLL_H -# include -#endif - -/* The size of `long', as computed by sizeof. */ -#define CURL_SIZEOF_LONG 4 - -/* Integral data type used for curl_socklen_t. */ -#define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t - -/* The size of `curl_socklen_t', as computed by sizeof. */ -#define CURL_SIZEOF_CURL_SOCKLEN_T 4 - -/* Data type definition of curl_socklen_t. */ -typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; - -/* Signed integral data type used for curl_off_t. */ -#define CURL_TYPEOF_CURL_OFF_T long long - -/* Data type definition of curl_off_t. */ -typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; - -/* curl_off_t formatting string directive without "%" conversion specifier. */ -#define CURL_FORMAT_CURL_OFF_T "lld" - -/* unsigned curl_off_t formatting string without "%" conversion specifier. */ -#define CURL_FORMAT_CURL_OFF_TU "llu" - -/* curl_off_t formatting string directive with "%" conversion specifier. */ -#define CURL_FORMAT_OFF_T "%lld" - -/* The size of `curl_off_t', as computed by sizeof. */ -#define CURL_SIZEOF_CURL_OFF_T 8 - -/* curl_off_t constant suffix. */ -#define CURL_SUFFIX_CURL_OFF_T LL - -/* unsigned curl_off_t constant suffix. */ -#define CURL_SUFFIX_CURL_OFF_TU ULL - -#endif /* __CURL_CURLBUILD_H */ diff --git a/builddir/curl-master/include/curl/curlrules.h b/builddir/curl-master/include/curl/curlrules.h deleted file mode 100644 index 55d21f6..0000000 --- a/builddir/curl-master/include/curl/curlrules.h +++ /dev/null @@ -1,262 +0,0 @@ -#ifndef __CURL_CURLRULES_H -#define __CURL_CURLRULES_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* ================================================================ */ -/* COMPILE TIME SANITY CHECKS */ -/* ================================================================ */ - -/* - * NOTE 1: - * ------- - * - * All checks done in this file are intentionally placed in a public - * header file which is pulled by curl/curl.h when an application is - * being built using an already built libcurl library. Additionally - * this file is also included and used when building the library. - * - * If compilation fails on this file it is certainly sure that the - * problem is elsewhere. It could be a problem in the curlbuild.h - * header file, or simply that you are using different compilation - * settings than those used to build the library. - * - * Nothing in this file is intended to be modified or adjusted by the - * curl library user nor by the curl library builder. - * - * Do not deactivate any check, these are done to make sure that the - * library is properly built and used. - * - * You can find further help on the libcurl development mailing list: - * https://cool.haxx.se/mailman/listinfo/curl-library/ - * - * NOTE 2 - * ------ - * - * Some of the following compile time checks are based on the fact - * that the dimension of a constant array can not be a negative one. - * In this way if the compile time verification fails, the compilation - * will fail issuing an error. The error description wording is compiler - * dependent but it will be quite similar to one of the following: - * - * "negative subscript or subscript is too large" - * "array must have at least one element" - * "-1 is an illegal array size" - * "size of array is negative" - * - * If you are building an application which tries to use an already - * built libcurl library and you are getting this kind of errors on - * this file, it is a clear indication that there is a mismatch between - * how the library was built and how you are trying to use it for your - * application. Your already compiled or binary library provider is the - * only one who can give you the details you need to properly use it. - */ - -/* - * Verify that some macros are actually defined. - */ - -#ifndef CURL_SIZEOF_LONG -# error "CURL_SIZEOF_LONG definition is missing!" - Error Compilation_aborted_CURL_SIZEOF_LONG_is_missing -#endif - -#ifndef CURL_TYPEOF_CURL_SOCKLEN_T -# error "CURL_TYPEOF_CURL_SOCKLEN_T definition is missing!" - Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_is_missing -#endif - -#ifndef CURL_SIZEOF_CURL_SOCKLEN_T -# error "CURL_SIZEOF_CURL_SOCKLEN_T definition is missing!" - Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_is_missing -#endif - -#ifndef CURL_TYPEOF_CURL_OFF_T -# error "CURL_TYPEOF_CURL_OFF_T definition is missing!" - Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_is_missing -#endif - -#ifndef CURL_FORMAT_CURL_OFF_T -# error "CURL_FORMAT_CURL_OFF_T definition is missing!" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_is_missing -#endif - -#ifndef CURL_FORMAT_CURL_OFF_TU -# error "CURL_FORMAT_CURL_OFF_TU definition is missing!" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_is_missing -#endif - -#ifndef CURL_FORMAT_OFF_T -# error "CURL_FORMAT_OFF_T definition is missing!" - Error Compilation_aborted_CURL_FORMAT_OFF_T_is_missing -#endif - -#ifndef CURL_SIZEOF_CURL_OFF_T -# error "CURL_SIZEOF_CURL_OFF_T definition is missing!" - Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_is_missing -#endif - -#ifndef CURL_SUFFIX_CURL_OFF_T -# error "CURL_SUFFIX_CURL_OFF_T definition is missing!" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_is_missing -#endif - -#ifndef CURL_SUFFIX_CURL_OFF_TU -# error "CURL_SUFFIX_CURL_OFF_TU definition is missing!" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_is_missing -#endif - -/* - * Macros private to this header file. - */ - -#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1 - -#define CurlchkszGE(t1, t2) sizeof(t1) >= sizeof(t2) ? 1 : -1 - -/* - * Verify that the size previously defined and expected for long - * is the same as the one reported by sizeof() at compile time. - */ - -typedef char - __curl_rule_01__ - [CurlchkszEQ(long, CURL_SIZEOF_LONG)]; - -/* - * Verify that the size previously defined and expected for - * curl_off_t is actually the the same as the one reported - * by sizeof() at compile time. - */ - -typedef char - __curl_rule_02__ - [CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)]; - -/* - * Verify at compile time that the size of curl_off_t as reported - * by sizeof() is greater or equal than the one reported for long - * for the current compilation. - */ - -typedef char - __curl_rule_03__ - [CurlchkszGE(curl_off_t, long)]; - -/* - * Verify that the size previously defined and expected for - * curl_socklen_t is actually the the same as the one reported - * by sizeof() at compile time. - */ - -typedef char - __curl_rule_04__ - [CurlchkszEQ(curl_socklen_t, CURL_SIZEOF_CURL_SOCKLEN_T)]; - -/* - * Verify at compile time that the size of curl_socklen_t as reported - * by sizeof() is greater or equal than the one reported for int for - * the current compilation. - */ - -typedef char - __curl_rule_05__ - [CurlchkszGE(curl_socklen_t, int)]; - -/* ================================================================ */ -/* EXTERNALLY AND INTERNALLY VISIBLE DEFINITIONS */ -/* ================================================================ */ - -/* - * CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow - * these to be visible and exported by the external libcurl interface API, - * while also making them visible to the library internals, simply including - * curl_setup.h, without actually needing to include curl.h internally. - * If some day this section would grow big enough, all this should be moved - * to its own header file. - */ - -/* - * Figure out if we can use the ## preprocessor operator, which is supported - * by ISO/ANSI C and C++. Some compilers support it without setting __STDC__ - * or __cplusplus so we need to carefully check for them too. - */ - -#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ - defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \ - defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \ - defined(__ILEC400__) - /* This compiler is believed to have an ISO compatible preprocessor */ -#define CURL_ISOCPP -#else - /* This compiler is believed NOT to have an ISO compatible preprocessor */ -#undef CURL_ISOCPP -#endif - -/* - * Macros for minimum-width signed and unsigned curl_off_t integer constants. - */ - -#if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551) -# define __CURL_OFF_T_C_HLPR2(x) x -# define __CURL_OFF_T_C_HLPR1(x) __CURL_OFF_T_C_HLPR2(x) -# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \ - __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T) -# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \ - __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU) -#else -# ifdef CURL_ISOCPP -# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix -# else -# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix -# endif -# define __CURL_OFF_T_C_HLPR1(Val,Suffix) __CURL_OFF_T_C_HLPR2(Val,Suffix) -# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T) -# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU) -#endif - -/* - * Get rid of macros private to this header file. - */ - -#undef CurlchkszEQ -#undef CurlchkszGE - -/* - * Get rid of macros not intended to exist beyond this point. - */ - -#undef CURL_PULL_WS2TCPIP_H -#undef CURL_PULL_SYS_TYPES_H -#undef CURL_PULL_SYS_SOCKET_H -#undef CURL_PULL_SYS_POLL_H -#undef CURL_PULL_STDINT_H -#undef CURL_PULL_INTTYPES_H - -#undef CURL_TYPEOF_CURL_SOCKLEN_T -#undef CURL_TYPEOF_CURL_OFF_T - -#ifdef CURL_NO_OLDIES -#undef CURL_FORMAT_OFF_T /* not required since 7.19.0 - obsoleted in 7.20.0 */ -#endif - -#endif /* __CURL_CURLRULES_H */ diff --git a/builddir/curl-master/include/curl/curlver.h b/builddir/curl-master/include/curl/curlver.h deleted file mode 100644 index f5f9564..0000000 --- a/builddir/curl-master/include/curl/curlver.h +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef __CURL_CURLVER_H -#define __CURL_CURLVER_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* This header file contains nothing but libcurl version info, generated by - a script at release-time. This was made its own header file in 7.11.2 */ - -/* This is the global package copyright */ -#define LIBCURL_COPYRIGHT "1996 - 2016 Daniel Stenberg, ." - -/* This is the version number of the libcurl package from which this header - file origins: */ -#define LIBCURL_VERSION "7.50.0-DEV" - -/* The numeric version number is also available "in parts" by using these - defines: */ -#define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 50 -#define LIBCURL_VERSION_PATCH 0 - -/* This is the numeric version of the libcurl version number, meant for easier - parsing and comparions by programs. The LIBCURL_VERSION_NUM define will - always follow this syntax: - - 0xXXYYZZ - - Where XX, YY and ZZ are the main version, release and patch numbers in - hexadecimal (using 8 bits each). All three numbers are always represented - using two digits. 1.2 would appear as "0x010200" while version 9.11.7 - appears as "0x090b07". - - This 6-digit (24 bits) hexadecimal number does not show pre-release number, - and it is always a greater number in a more recent release. It makes - comparisons with greater than and less than work. - - Note: This define is the full hex number and _does not_ use the - CURL_VERSION_BITS() macro since curl's own configure script greps for it - and needs it to contain the full number. -*/ -#define LIBCURL_VERSION_NUM 0x073200 - -/* - * This is the date and time when the full source package was created. The - * timestamp is not stored in git, as the timestamp is properly set in the - * tarballs by the maketgz script. - * - * The format of the date should follow this template: - * - * "Mon Feb 12 11:35:33 UTC 2007" - */ -#define LIBCURL_TIMESTAMP "DEV" - -#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|z) -#define CURL_AT_LEAST_VERSION(x,y,z) \ - (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z)) - -#endif /* __CURL_CURLVER_H */ diff --git a/builddir/curl-master/include/curl/easy.h b/builddir/curl-master/include/curl/easy.h deleted file mode 100644 index afc766c..0000000 --- a/builddir/curl-master/include/curl/easy.h +++ /dev/null @@ -1,102 +0,0 @@ -#ifndef __CURL_EASY_H -#define __CURL_EASY_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2008, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#ifdef __cplusplus -extern "C" { -#endif - -CURL_EXTERN CURL *curl_easy_init(void); -CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...); -CURL_EXTERN CURLcode curl_easy_perform(CURL *curl); -CURL_EXTERN void curl_easy_cleanup(CURL *curl); - -/* - * NAME curl_easy_getinfo() - * - * DESCRIPTION - * - * Request internal information from the curl session with this function. The - * third argument MUST be a pointer to a long, a pointer to a char * or a - * pointer to a double (as the documentation describes elsewhere). The data - * pointed to will be filled in accordingly and can be relied upon only if the - * function returns CURLE_OK. This function is intended to get used *AFTER* a - * performed transfer, all results from this function are undefined until the - * transfer is completed. - */ -CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); - - -/* - * NAME curl_easy_duphandle() - * - * DESCRIPTION - * - * Creates a new curl session handle with the same options set for the handle - * passed in. Duplicating a handle could only be a matter of cloning data and - * options, internal state info and things like persistent connections cannot - * be transferred. It is useful in multithreaded applications when you can run - * curl_easy_duphandle() for each new thread to avoid a series of identical - * curl_easy_setopt() invokes in every thread. - */ -CURL_EXTERN CURL* curl_easy_duphandle(CURL *curl); - -/* - * NAME curl_easy_reset() - * - * DESCRIPTION - * - * Re-initializes a CURL handle to the default values. This puts back the - * handle to the same state as it was in when it was just created. - * - * It does keep: live connections, the Session ID cache, the DNS cache and the - * cookies. - */ -CURL_EXTERN void curl_easy_reset(CURL *curl); - -/* - * NAME curl_easy_recv() - * - * DESCRIPTION - * - * Receives data from the connected socket. Use after successful - * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. - */ -CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, - size_t *n); - -/* - * NAME curl_easy_send() - * - * DESCRIPTION - * - * Sends data over the connected socket. Use after successful - * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. - */ -CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer, - size_t buflen, size_t *n); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/builddir/curl-master/include/curl/mprintf.h b/builddir/curl-master/include/curl/mprintf.h deleted file mode 100644 index e20f546..0000000 --- a/builddir/curl-master/include/curl/mprintf.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __CURL_MPRINTF_H -#define __CURL_MPRINTF_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include -#include /* needed for FILE */ -#include "curl.h" /* for CURL_EXTERN */ - -#ifdef __cplusplus -extern "C" { -#endif - -CURL_EXTERN int curl_mprintf(const char *format, ...); -CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...); -CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...); -CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, - const char *format, ...); -CURL_EXTERN int curl_mvprintf(const char *format, va_list args); -CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args); -CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args); -CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, - const char *format, va_list args); -CURL_EXTERN char *curl_maprintf(const char *format, ...); -CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); - -#ifdef __cplusplus -} -#endif - -#endif /* __CURL_MPRINTF_H */ diff --git a/builddir/curl-master/include/curl/multi.h b/builddir/curl-master/include/curl/multi.h deleted file mode 100644 index 7a1040f..0000000 --- a/builddir/curl-master/include/curl/multi.h +++ /dev/null @@ -1,435 +0,0 @@ -#ifndef __CURL_MULTI_H -#define __CURL_MULTI_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -/* - This is an "external" header file. Don't give away any internals here! - - GOALS - - o Enable a "pull" interface. The application that uses libcurl decides where - and when to ask libcurl to get/send data. - - o Enable multiple simultaneous transfers in the same thread without making it - complicated for the application. - - o Enable the application to select() on its own file descriptors and curl's - file descriptors simultaneous easily. - -*/ - -/* - * This header file should not really need to include "curl.h" since curl.h - * itself includes this file and we expect user applications to do #include - * without the need for especially including multi.h. - * - * For some reason we added this include here at one point, and rather than to - * break existing (wrongly written) libcurl applications, we leave it as-is - * but with this warning attached. - */ -#include "curl.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct Curl_multi CURLM; - -typedef enum { - CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or - curl_multi_socket*() soon */ - CURLM_OK, - CURLM_BAD_HANDLE, /* the passed-in handle is not a valid CURLM handle */ - CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */ - CURLM_OUT_OF_MEMORY, /* if you ever get this, you're in deep sh*t */ - CURLM_INTERNAL_ERROR, /* this is a libcurl bug */ - CURLM_BAD_SOCKET, /* the passed in socket argument did not match */ - CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */ - CURLM_ADDED_ALREADY, /* an easy handle already added to a multi handle was - attempted to get added - again */ - CURLM_LAST -} CURLMcode; - -/* just to make code nicer when using curl_multi_socket() you can now check - for CURLM_CALL_MULTI_SOCKET too in the same style it works for - curl_multi_perform() and CURLM_CALL_MULTI_PERFORM */ -#define CURLM_CALL_MULTI_SOCKET CURLM_CALL_MULTI_PERFORM - -/* bitmask bits for CURLMOPT_PIPELINING */ -#define CURLPIPE_NOTHING 0L -#define CURLPIPE_HTTP1 1L -#define CURLPIPE_MULTIPLEX 2L - -typedef enum { - CURLMSG_NONE, /* first, not used */ - CURLMSG_DONE, /* This easy handle has completed. 'result' contains - the CURLcode of the transfer */ - CURLMSG_LAST /* last, not used */ -} CURLMSG; - -struct CURLMsg { - CURLMSG msg; /* what this message means */ - CURL *easy_handle; /* the handle it concerns */ - union { - void *whatever; /* message-specific data */ - CURLcode result; /* return code for transfer */ - } data; -}; -typedef struct CURLMsg CURLMsg; - -/* Based on poll(2) structure and values. - * We don't use pollfd and POLL* constants explicitly - * to cover platforms without poll(). */ -#define CURL_WAIT_POLLIN 0x0001 -#define CURL_WAIT_POLLPRI 0x0002 -#define CURL_WAIT_POLLOUT 0x0004 - -struct curl_waitfd { - curl_socket_t fd; - short events; - short revents; /* not supported yet */ -}; - -/* - * Name: curl_multi_init() - * - * Desc: inititalize multi-style curl usage - * - * Returns: a new CURLM handle to use in all 'curl_multi' functions. - */ -CURL_EXTERN CURLM *curl_multi_init(void); - -/* - * Name: curl_multi_add_handle() - * - * Desc: add a standard curl handle to the multi stack - * - * Returns: CURLMcode type, general multi error code. - */ -CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle, - CURL *curl_handle); - - /* - * Name: curl_multi_remove_handle() - * - * Desc: removes a curl handle from the multi stack again - * - * Returns: CURLMcode type, general multi error code. - */ -CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle, - CURL *curl_handle); - - /* - * Name: curl_multi_fdset() - * - * Desc: Ask curl for its fd_set sets. The app can use these to select() or - * poll() on. We want curl_multi_perform() called as soon as one of - * them are ready. - * - * Returns: CURLMcode type, general multi error code. - */ -CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle, - fd_set *read_fd_set, - fd_set *write_fd_set, - fd_set *exc_fd_set, - int *max_fd); - -/* - * Name: curl_multi_wait() - * - * Desc: Poll on all fds within a CURLM set as well as any - * additional fds passed to the function. - * - * Returns: CURLMcode type, general multi error code. - */ -CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle, - struct curl_waitfd extra_fds[], - unsigned int extra_nfds, - int timeout_ms, - int *ret); - - /* - * Name: curl_multi_perform() - * - * Desc: When the app thinks there's data available for curl it calls this - * function to read/write whatever there is right now. This returns - * as soon as the reads and writes are done. This function does not - * require that there actually is data available for reading or that - * data can be written, it can be called just in case. It returns - * the number of handles that still transfer data in the second - * argument's integer-pointer. - * - * Returns: CURLMcode type, general multi error code. *NOTE* that this only - * returns errors etc regarding the whole multi stack. There might - * still have occurred problems on invidual transfers even when this - * returns OK. - */ -CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle, - int *running_handles); - - /* - * Name: curl_multi_cleanup() - * - * Desc: Cleans up and removes a whole multi stack. It does not free or - * touch any individual easy handles in any way. We need to define - * in what state those handles will be if this function is called - * in the middle of a transfer. - * - * Returns: CURLMcode type, general multi error code. - */ -CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle); - -/* - * Name: curl_multi_info_read() - * - * Desc: Ask the multi handle if there's any messages/informationals from - * the individual transfers. Messages include informationals such as - * error code from the transfer or just the fact that a transfer is - * completed. More details on these should be written down as well. - * - * Repeated calls to this function will return a new struct each - * time, until a special "end of msgs" struct is returned as a signal - * that there is no more to get at this point. - * - * The data the returned pointer points to will not survive calling - * curl_multi_cleanup(). - * - * The 'CURLMsg' struct is meant to be very simple and only contain - * very basic informations. If more involved information is wanted, - * we will provide the particular "transfer handle" in that struct - * and that should/could/would be used in subsequent - * curl_easy_getinfo() calls (or similar). The point being that we - * must never expose complex structs to applications, as then we'll - * undoubtably get backwards compatibility problems in the future. - * - * Returns: A pointer to a filled-in struct, or NULL if it failed or ran out - * of structs. It also writes the number of messages left in the - * queue (after this read) in the integer the second argument points - * to. - */ -CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle, - int *msgs_in_queue); - -/* - * Name: curl_multi_strerror() - * - * Desc: The curl_multi_strerror function may be used to turn a CURLMcode - * value into the equivalent human readable error string. This is - * useful for printing meaningful error messages. - * - * Returns: A pointer to a zero-terminated error message. - */ -CURL_EXTERN const char *curl_multi_strerror(CURLMcode); - -/* - * Name: curl_multi_socket() and - * curl_multi_socket_all() - * - * Desc: An alternative version of curl_multi_perform() that allows the - * application to pass in one of the file descriptors that have been - * detected to have "action" on them and let libcurl perform. - * See man page for details. - */ -#define CURL_POLL_NONE 0 -#define CURL_POLL_IN 1 -#define CURL_POLL_OUT 2 -#define CURL_POLL_INOUT 3 -#define CURL_POLL_REMOVE 4 - -#define CURL_SOCKET_TIMEOUT CURL_SOCKET_BAD - -#define CURL_CSELECT_IN 0x01 -#define CURL_CSELECT_OUT 0x02 -#define CURL_CSELECT_ERR 0x04 - -typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */ - curl_socket_t s, /* socket */ - int what, /* see above */ - void *userp, /* private callback - pointer */ - void *socketp); /* private socket - pointer */ -/* - * Name: curl_multi_timer_callback - * - * Desc: Called by libcurl whenever the library detects a change in the - * maximum number of milliseconds the app is allowed to wait before - * curl_multi_socket() or curl_multi_perform() must be called - * (to allow libcurl's timed events to take place). - * - * Returns: The callback should return zero. - */ -typedef int (*curl_multi_timer_callback)(CURLM *multi, /* multi handle */ - long timeout_ms, /* see above */ - void *userp); /* private callback - pointer */ - -CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s, - int *running_handles); - -CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle, - curl_socket_t s, - int ev_bitmask, - int *running_handles); - -CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle, - int *running_handles); - -#ifndef CURL_ALLOW_OLD_MULTI_SOCKET -/* This macro below was added in 7.16.3 to push users who recompile to use - the new curl_multi_socket_action() instead of the old curl_multi_socket() -*/ -#define curl_multi_socket(x,y,z) curl_multi_socket_action(x,y,0,z) -#endif - -/* - * Name: curl_multi_timeout() - * - * Desc: Returns the maximum number of milliseconds the app is allowed to - * wait before curl_multi_socket() or curl_multi_perform() must be - * called (to allow libcurl's timed events to take place). - * - * Returns: CURLM error code. - */ -CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle, - long *milliseconds); - -#undef CINIT /* re-using the same name as in curl.h */ - -#ifdef CURL_ISOCPP -#define CINIT(name,type,num) CURLMOPT_ ## name = CURLOPTTYPE_ ## type + num -#else -/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ -#define LONG CURLOPTTYPE_LONG -#define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT -#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT -#define OFF_T CURLOPTTYPE_OFF_T -#define CINIT(name,type,number) CURLMOPT_/**/name = type + number -#endif - -typedef enum { - /* This is the socket callback function pointer */ - CINIT(SOCKETFUNCTION, FUNCTIONPOINT, 1), - - /* This is the argument passed to the socket callback */ - CINIT(SOCKETDATA, OBJECTPOINT, 2), - - /* set to 1 to enable pipelining for this multi handle */ - CINIT(PIPELINING, LONG, 3), - - /* This is the timer callback function pointer */ - CINIT(TIMERFUNCTION, FUNCTIONPOINT, 4), - - /* This is the argument passed to the timer callback */ - CINIT(TIMERDATA, OBJECTPOINT, 5), - - /* maximum number of entries in the connection cache */ - CINIT(MAXCONNECTS, LONG, 6), - - /* maximum number of (pipelining) connections to one host */ - CINIT(MAX_HOST_CONNECTIONS, LONG, 7), - - /* maximum number of requests in a pipeline */ - CINIT(MAX_PIPELINE_LENGTH, LONG, 8), - - /* a connection with a content-length longer than this - will not be considered for pipelining */ - CINIT(CONTENT_LENGTH_PENALTY_SIZE, OFF_T, 9), - - /* a connection with a chunk length longer than this - will not be considered for pipelining */ - CINIT(CHUNK_LENGTH_PENALTY_SIZE, OFF_T, 10), - - /* a list of site names(+port) that are blacklisted from - pipelining */ - CINIT(PIPELINING_SITE_BL, OBJECTPOINT, 11), - - /* a list of server types that are blacklisted from - pipelining */ - CINIT(PIPELINING_SERVER_BL, OBJECTPOINT, 12), - - /* maximum number of open connections in total */ - CINIT(MAX_TOTAL_CONNECTIONS, LONG, 13), - - /* This is the server push callback function pointer */ - CINIT(PUSHFUNCTION, FUNCTIONPOINT, 14), - - /* This is the argument passed to the server push callback */ - CINIT(PUSHDATA, OBJECTPOINT, 15), - - CURLMOPT_LASTENTRY /* the last unused */ -} CURLMoption; - - -/* - * Name: curl_multi_setopt() - * - * Desc: Sets options for the multi handle. - * - * Returns: CURLM error code. - */ -CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle, - CURLMoption option, ...); - - -/* - * Name: curl_multi_assign() - * - * Desc: This function sets an association in the multi handle between the - * given socket and a private pointer of the application. This is - * (only) useful for curl_multi_socket uses. - * - * Returns: CURLM error code. - */ -CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle, - curl_socket_t sockfd, void *sockp); - - -/* - * Name: curl_push_callback - * - * Desc: This callback gets called when a new stream is being pushed by the - * server. It approves or denies the new stream. - * - * Returns: CURL_PUSH_OK or CURL_PUSH_DENY. - */ -#define CURL_PUSH_OK 0 -#define CURL_PUSH_DENY 1 - -struct curl_pushheaders; /* forward declaration only */ - -CURL_EXTERN char *curl_pushheader_bynum(struct curl_pushheaders *h, - size_t num); -CURL_EXTERN char *curl_pushheader_byname(struct curl_pushheaders *h, - const char *name); - -typedef int (*curl_push_callback)(CURL *parent, - CURL *easy, - size_t num_headers, - struct curl_pushheaders *headers, - void *userp); - -#ifdef __cplusplus -} /* end of extern "C" */ -#endif - -#endif diff --git a/builddir/curl-master/include/curl/stdcheaders.h b/builddir/curl-master/include/curl/stdcheaders.h deleted file mode 100644 index 6f0f7f3..0000000 --- a/builddir/curl-master/include/curl/stdcheaders.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef __STDC_HEADERS_H -#define __STDC_HEADERS_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include - -size_t fread (void *, size_t, size_t, FILE *); -size_t fwrite (const void *, size_t, size_t, FILE *); - -int strcasecmp(const char *, const char *); -int strncasecmp(const char *, const char *, size_t); - -#endif /* __STDC_HEADERS_H */ diff --git a/builddir/curl-master/include/curl/typecheck-gcc.h b/builddir/curl-master/include/curl/typecheck-gcc.h deleted file mode 100644 index 6ec8bcf..0000000 --- a/builddir/curl-master/include/curl/typecheck-gcc.h +++ /dev/null @@ -1,622 +0,0 @@ -#ifndef __CURL_TYPECHECK_GCC_H -#define __CURL_TYPECHECK_GCC_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* wraps curl_easy_setopt() with typechecking */ - -/* To add a new kind of warning, add an - * if(_curl_is_sometype_option(_curl_opt)) - * if(!_curl_is_sometype(value)) - * _curl_easy_setopt_err_sometype(); - * block and define _curl_is_sometype_option, _curl_is_sometype and - * _curl_easy_setopt_err_sometype below - * - * NOTE: We use two nested 'if' statements here instead of the && operator, in - * order to work around gcc bug #32061. It affects only gcc 4.3.x/4.4.x - * when compiling with -Wlogical-op. - * - * To add an option that uses the same type as an existing option, you'll just - * need to extend the appropriate _curl_*_option macro - */ -#define curl_easy_setopt(handle, option, value) \ -__extension__ ({ \ - __typeof__ (option) _curl_opt = option; \ - if(__builtin_constant_p(_curl_opt)) { \ - if(_curl_is_long_option(_curl_opt)) \ - if(!_curl_is_long(value)) \ - _curl_easy_setopt_err_long(); \ - if(_curl_is_off_t_option(_curl_opt)) \ - if(!_curl_is_off_t(value)) \ - _curl_easy_setopt_err_curl_off_t(); \ - if(_curl_is_string_option(_curl_opt)) \ - if(!_curl_is_string(value)) \ - _curl_easy_setopt_err_string(); \ - if(_curl_is_write_cb_option(_curl_opt)) \ - if(!_curl_is_write_cb(value)) \ - _curl_easy_setopt_err_write_callback(); \ - if((_curl_opt) == CURLOPT_READFUNCTION) \ - if(!_curl_is_read_cb(value)) \ - _curl_easy_setopt_err_read_cb(); \ - if((_curl_opt) == CURLOPT_IOCTLFUNCTION) \ - if(!_curl_is_ioctl_cb(value)) \ - _curl_easy_setopt_err_ioctl_cb(); \ - if((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \ - if(!_curl_is_sockopt_cb(value)) \ - _curl_easy_setopt_err_sockopt_cb(); \ - if((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \ - if(!_curl_is_opensocket_cb(value)) \ - _curl_easy_setopt_err_opensocket_cb(); \ - if((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \ - if(!_curl_is_progress_cb(value)) \ - _curl_easy_setopt_err_progress_cb(); \ - if((_curl_opt) == CURLOPT_DEBUGFUNCTION) \ - if(!_curl_is_debug_cb(value)) \ - _curl_easy_setopt_err_debug_cb(); \ - if((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \ - if(!_curl_is_ssl_ctx_cb(value)) \ - _curl_easy_setopt_err_ssl_ctx_cb(); \ - if(_curl_is_conv_cb_option(_curl_opt)) \ - if(!_curl_is_conv_cb(value)) \ - _curl_easy_setopt_err_conv_cb(); \ - if((_curl_opt) == CURLOPT_SEEKFUNCTION) \ - if(!_curl_is_seek_cb(value)) \ - _curl_easy_setopt_err_seek_cb(); \ - if(_curl_is_cb_data_option(_curl_opt)) \ - if(!_curl_is_cb_data(value)) \ - _curl_easy_setopt_err_cb_data(); \ - if((_curl_opt) == CURLOPT_ERRORBUFFER) \ - if(!_curl_is_error_buffer(value)) \ - _curl_easy_setopt_err_error_buffer(); \ - if((_curl_opt) == CURLOPT_STDERR) \ - if(!_curl_is_FILE(value)) \ - _curl_easy_setopt_err_FILE(); \ - if(_curl_is_postfields_option(_curl_opt)) \ - if(!_curl_is_postfields(value)) \ - _curl_easy_setopt_err_postfields(); \ - if((_curl_opt) == CURLOPT_HTTPPOST) \ - if(!_curl_is_arr((value), struct curl_httppost)) \ - _curl_easy_setopt_err_curl_httpost(); \ - if(_curl_is_slist_option(_curl_opt)) \ - if(!_curl_is_arr((value), struct curl_slist)) \ - _curl_easy_setopt_err_curl_slist(); \ - if((_curl_opt) == CURLOPT_SHARE) \ - if(!_curl_is_ptr((value), CURLSH)) \ - _curl_easy_setopt_err_CURLSH(); \ - } \ - curl_easy_setopt(handle, _curl_opt, value); \ -}) - -/* wraps curl_easy_getinfo() with typechecking */ -/* FIXME: don't allow const pointers */ -#define curl_easy_getinfo(handle, info, arg) \ -__extension__ ({ \ - __typeof__ (info) _curl_info = info; \ - if(__builtin_constant_p(_curl_info)) { \ - if(_curl_is_string_info(_curl_info)) \ - if(!_curl_is_arr((arg), char *)) \ - _curl_easy_getinfo_err_string(); \ - if(_curl_is_long_info(_curl_info)) \ - if(!_curl_is_arr((arg), long)) \ - _curl_easy_getinfo_err_long(); \ - if(_curl_is_double_info(_curl_info)) \ - if(!_curl_is_arr((arg), double)) \ - _curl_easy_getinfo_err_double(); \ - if(_curl_is_slist_info(_curl_info)) \ - if(!_curl_is_arr((arg), struct curl_slist *)) \ - _curl_easy_getinfo_err_curl_slist(); \ - } \ - curl_easy_getinfo(handle, _curl_info, arg); \ -}) - -/* TODO: typechecking for curl_share_setopt() and curl_multi_setopt(), - * for now just make sure that the functions are called with three - * arguments - */ -#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) -#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param) - - -/* the actual warnings, triggered by calling the _curl_easy_setopt_err* - * functions */ - -/* To define a new warning, use _CURL_WARNING(identifier, "message") */ -#define _CURL_WARNING(id, message) \ - static void __attribute__((__warning__(message))) \ - __attribute__((__unused__)) __attribute__((__noinline__)) \ - id(void) { __asm__(""); } - -_CURL_WARNING(_curl_easy_setopt_err_long, - "curl_easy_setopt expects a long argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_curl_off_t, - "curl_easy_setopt expects a curl_off_t argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_string, - "curl_easy_setopt expects a " - "string (char* or char[]) argument for this option" - ) -_CURL_WARNING(_curl_easy_setopt_err_write_callback, - "curl_easy_setopt expects a curl_write_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_read_cb, - "curl_easy_setopt expects a curl_read_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_ioctl_cb, - "curl_easy_setopt expects a curl_ioctl_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_sockopt_cb, - "curl_easy_setopt expects a curl_sockopt_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_opensocket_cb, - "curl_easy_setopt expects a " - "curl_opensocket_callback argument for this option" - ) -_CURL_WARNING(_curl_easy_setopt_err_progress_cb, - "curl_easy_setopt expects a curl_progress_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_debug_cb, - "curl_easy_setopt expects a curl_debug_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_ssl_ctx_cb, - "curl_easy_setopt expects a curl_ssl_ctx_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_conv_cb, - "curl_easy_setopt expects a curl_conv_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_seek_cb, - "curl_easy_setopt expects a curl_seek_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_cb_data, - "curl_easy_setopt expects a " - "private data pointer as argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_error_buffer, - "curl_easy_setopt expects a " - "char buffer of CURL_ERROR_SIZE as argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_FILE, - "curl_easy_setopt expects a FILE* argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_postfields, - "curl_easy_setopt expects a void* or char* argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_curl_httpost, - "curl_easy_setopt expects a struct curl_httppost* argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_curl_slist, - "curl_easy_setopt expects a struct curl_slist* argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_CURLSH, - "curl_easy_setopt expects a CURLSH* argument for this option") - -_CURL_WARNING(_curl_easy_getinfo_err_string, - "curl_easy_getinfo expects a pointer to char * for this info") -_CURL_WARNING(_curl_easy_getinfo_err_long, - "curl_easy_getinfo expects a pointer to long for this info") -_CURL_WARNING(_curl_easy_getinfo_err_double, - "curl_easy_getinfo expects a pointer to double for this info") -_CURL_WARNING(_curl_easy_getinfo_err_curl_slist, - "curl_easy_getinfo expects a pointer to struct curl_slist * for this info") - -/* groups of curl_easy_setops options that take the same type of argument */ - -/* To add a new option to one of the groups, just add - * (option) == CURLOPT_SOMETHING - * to the or-expression. If the option takes a long or curl_off_t, you don't - * have to do anything - */ - -/* evaluates to true if option takes a long argument */ -#define _curl_is_long_option(option) \ - (0 < (option) && (option) < CURLOPTTYPE_OBJECTPOINT) - -#define _curl_is_off_t_option(option) \ - ((option) > CURLOPTTYPE_OFF_T) - -/* evaluates to true if option takes a char* argument */ -#define _curl_is_string_option(option) \ - ((option) == CURLOPT_ACCEPT_ENCODING || \ - (option) == CURLOPT_CAINFO || \ - (option) == CURLOPT_CAPATH || \ - (option) == CURLOPT_COOKIE || \ - (option) == CURLOPT_COOKIEFILE || \ - (option) == CURLOPT_COOKIEJAR || \ - (option) == CURLOPT_COOKIELIST || \ - (option) == CURLOPT_CRLFILE || \ - (option) == CURLOPT_CUSTOMREQUEST || \ - (option) == CURLOPT_DEFAULT_PROTOCOL || \ - (option) == CURLOPT_DNS_INTERFACE || \ - (option) == CURLOPT_DNS_LOCAL_IP4 || \ - (option) == CURLOPT_DNS_LOCAL_IP6 || \ - (option) == CURLOPT_DNS_SERVERS || \ - (option) == CURLOPT_EGDSOCKET || \ - (option) == CURLOPT_FTPPORT || \ - (option) == CURLOPT_FTP_ACCOUNT || \ - (option) == CURLOPT_FTP_ALTERNATIVE_TO_USER || \ - (option) == CURLOPT_INTERFACE || \ - (option) == CURLOPT_ISSUERCERT || \ - (option) == CURLOPT_KEYPASSWD || \ - (option) == CURLOPT_KRBLEVEL || \ - (option) == CURLOPT_LOGIN_OPTIONS || \ - (option) == CURLOPT_MAIL_AUTH || \ - (option) == CURLOPT_MAIL_FROM || \ - (option) == CURLOPT_NETRC_FILE || \ - (option) == CURLOPT_NOPROXY || \ - (option) == CURLOPT_PASSWORD || \ - (option) == CURLOPT_PINNEDPUBLICKEY || \ - (option) == CURLOPT_PROXY || \ - (option) == CURLOPT_PROXYPASSWORD || \ - (option) == CURLOPT_PROXYUSERNAME || \ - (option) == CURLOPT_PROXYUSERPWD || \ - (option) == CURLOPT_PROXY_SERVICE_NAME || \ - (option) == CURLOPT_RANDOM_FILE || \ - (option) == CURLOPT_RANGE || \ - (option) == CURLOPT_REFERER || \ - (option) == CURLOPT_RTSP_SESSION_ID || \ - (option) == CURLOPT_RTSP_STREAM_URI || \ - (option) == CURLOPT_RTSP_TRANSPORT || \ - (option) == CURLOPT_SERVICE_NAME || \ - (option) == CURLOPT_SOCKS5_GSSAPI_SERVICE || \ - (option) == CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 || \ - (option) == CURLOPT_SSH_KNOWNHOSTS || \ - (option) == CURLOPT_SSH_PRIVATE_KEYFILE || \ - (option) == CURLOPT_SSH_PUBLIC_KEYFILE || \ - (option) == CURLOPT_SSLCERT || \ - (option) == CURLOPT_SSLCERTTYPE || \ - (option) == CURLOPT_SSLENGINE || \ - (option) == CURLOPT_SSLKEY || \ - (option) == CURLOPT_SSLKEYTYPE || \ - (option) == CURLOPT_SSL_CIPHER_LIST || \ - (option) == CURLOPT_TLSAUTH_PASSWORD || \ - (option) == CURLOPT_TLSAUTH_TYPE || \ - (option) == CURLOPT_TLSAUTH_USERNAME || \ - (option) == CURLOPT_UNIX_SOCKET_PATH || \ - (option) == CURLOPT_URL || \ - (option) == CURLOPT_USERAGENT || \ - (option) == CURLOPT_USERNAME || \ - (option) == CURLOPT_USERPWD || \ - (option) == CURLOPT_XOAUTH2_BEARER || \ - 0) - -/* evaluates to true if option takes a curl_write_callback argument */ -#define _curl_is_write_cb_option(option) \ - ((option) == CURLOPT_HEADERFUNCTION || \ - (option) == CURLOPT_WRITEFUNCTION) - -/* evaluates to true if option takes a curl_conv_callback argument */ -#define _curl_is_conv_cb_option(option) \ - ((option) == CURLOPT_CONV_TO_NETWORK_FUNCTION || \ - (option) == CURLOPT_CONV_FROM_NETWORK_FUNCTION || \ - (option) == CURLOPT_CONV_FROM_UTF8_FUNCTION) - -/* evaluates to true if option takes a data argument to pass to a callback */ -#define _curl_is_cb_data_option(option) \ - ((option) == CURLOPT_CHUNK_DATA || \ - (option) == CURLOPT_CLOSESOCKETDATA || \ - (option) == CURLOPT_DEBUGDATA || \ - (option) == CURLOPT_FNMATCH_DATA || \ - (option) == CURLOPT_HEADERDATA || \ - (option) == CURLOPT_INTERLEAVEDATA || \ - (option) == CURLOPT_IOCTLDATA || \ - (option) == CURLOPT_OPENSOCKETDATA || \ - (option) == CURLOPT_PRIVATE || \ - (option) == CURLOPT_PROGRESSDATA || \ - (option) == CURLOPT_READDATA || \ - (option) == CURLOPT_SEEKDATA || \ - (option) == CURLOPT_SOCKOPTDATA || \ - (option) == CURLOPT_SSH_KEYDATA || \ - (option) == CURLOPT_SSL_CTX_DATA || \ - (option) == CURLOPT_WRITEDATA || \ - 0) - -/* evaluates to true if option takes a POST data argument (void* or char*) */ -#define _curl_is_postfields_option(option) \ - ((option) == CURLOPT_POSTFIELDS || \ - (option) == CURLOPT_COPYPOSTFIELDS || \ - 0) - -/* evaluates to true if option takes a struct curl_slist * argument */ -#define _curl_is_slist_option(option) \ - ((option) == CURLOPT_HTTP200ALIASES || \ - (option) == CURLOPT_HTTPHEADER || \ - (option) == CURLOPT_MAIL_RCPT || \ - (option) == CURLOPT_POSTQUOTE || \ - (option) == CURLOPT_PREQUOTE || \ - (option) == CURLOPT_PROXYHEADER || \ - (option) == CURLOPT_QUOTE || \ - (option) == CURLOPT_RESOLVE || \ - (option) == CURLOPT_TELNETOPTIONS || \ - 0) - -/* groups of curl_easy_getinfo infos that take the same type of argument */ - -/* evaluates to true if info expects a pointer to char * argument */ -#define _curl_is_string_info(info) \ - (CURLINFO_STRING < (info) && (info) < CURLINFO_LONG) - -/* evaluates to true if info expects a pointer to long argument */ -#define _curl_is_long_info(info) \ - (CURLINFO_LONG < (info) && (info) < CURLINFO_DOUBLE) - -/* evaluates to true if info expects a pointer to double argument */ -#define _curl_is_double_info(info) \ - (CURLINFO_DOUBLE < (info) && (info) < CURLINFO_SLIST) - -/* true if info expects a pointer to struct curl_slist * argument */ -#define _curl_is_slist_info(info) \ - (CURLINFO_SLIST < (info)) - - -/* typecheck helpers -- check whether given expression has requested type*/ - -/* For pointers, you can use the _curl_is_ptr/_curl_is_arr macros, - * otherwise define a new macro. Search for __builtin_types_compatible_p - * in the GCC manual. - * NOTE: these macros MUST NOT EVALUATE their arguments! The argument is - * the actual expression passed to the curl_easy_setopt macro. This - * means that you can only apply the sizeof and __typeof__ operators, no - * == or whatsoever. - */ - -/* XXX: should evaluate to true iff expr is a pointer */ -#define _curl_is_any_ptr(expr) \ - (sizeof(expr) == sizeof(void*)) - -/* evaluates to true if expr is NULL */ -/* XXX: must not evaluate expr, so this check is not accurate */ -#define _curl_is_NULL(expr) \ - (__builtin_types_compatible_p(__typeof__(expr), __typeof__(NULL))) - -/* evaluates to true if expr is type*, const type* or NULL */ -#define _curl_is_ptr(expr, type) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), type *) || \ - __builtin_types_compatible_p(__typeof__(expr), const type *)) - -/* evaluates to true if expr is one of type[], type*, NULL or const type* */ -#define _curl_is_arr(expr, type) \ - (_curl_is_ptr((expr), type) || \ - __builtin_types_compatible_p(__typeof__(expr), type [])) - -/* evaluates to true if expr is a string */ -#define _curl_is_string(expr) \ - (_curl_is_arr((expr), char) || \ - _curl_is_arr((expr), signed char) || \ - _curl_is_arr((expr), unsigned char)) - -/* evaluates to true if expr is a long (no matter the signedness) - * XXX: for now, int is also accepted (and therefore short and char, which - * are promoted to int when passed to a variadic function) */ -#define _curl_is_long(expr) \ - (__builtin_types_compatible_p(__typeof__(expr), long) || \ - __builtin_types_compatible_p(__typeof__(expr), signed long) || \ - __builtin_types_compatible_p(__typeof__(expr), unsigned long) || \ - __builtin_types_compatible_p(__typeof__(expr), int) || \ - __builtin_types_compatible_p(__typeof__(expr), signed int) || \ - __builtin_types_compatible_p(__typeof__(expr), unsigned int) || \ - __builtin_types_compatible_p(__typeof__(expr), short) || \ - __builtin_types_compatible_p(__typeof__(expr), signed short) || \ - __builtin_types_compatible_p(__typeof__(expr), unsigned short) || \ - __builtin_types_compatible_p(__typeof__(expr), char) || \ - __builtin_types_compatible_p(__typeof__(expr), signed char) || \ - __builtin_types_compatible_p(__typeof__(expr), unsigned char)) - -/* evaluates to true if expr is of type curl_off_t */ -#define _curl_is_off_t(expr) \ - (__builtin_types_compatible_p(__typeof__(expr), curl_off_t)) - -/* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */ -/* XXX: also check size of an char[] array? */ -#define _curl_is_error_buffer(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), char *) || \ - __builtin_types_compatible_p(__typeof__(expr), char[])) - -/* evaluates to true if expr is of type (const) void* or (const) FILE* */ -#if 0 -#define _curl_is_cb_data(expr) \ - (_curl_is_ptr((expr), void) || \ - _curl_is_ptr((expr), FILE)) -#else /* be less strict */ -#define _curl_is_cb_data(expr) \ - _curl_is_any_ptr(expr) -#endif - -/* evaluates to true if expr is of type FILE* */ -#define _curl_is_FILE(expr) \ - (__builtin_types_compatible_p(__typeof__(expr), FILE *)) - -/* evaluates to true if expr can be passed as POST data (void* or char*) */ -#define _curl_is_postfields(expr) \ - (_curl_is_ptr((expr), void) || \ - _curl_is_arr((expr), char)) - -/* FIXME: the whole callback checking is messy... - * The idea is to tolerate char vs. void and const vs. not const - * pointers in arguments at least - */ -/* helper: __builtin_types_compatible_p distinguishes between functions and - * function pointers, hide it */ -#define _curl_callback_compatible(func, type) \ - (__builtin_types_compatible_p(__typeof__(func), type) || \ - __builtin_types_compatible_p(__typeof__(func), type*)) - -/* evaluates to true if expr is of type curl_read_callback or "similar" */ -#define _curl_is_read_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), __typeof__(fread)) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_read_callback) || \ - _curl_callback_compatible((expr), _curl_read_callback1) || \ - _curl_callback_compatible((expr), _curl_read_callback2) || \ - _curl_callback_compatible((expr), _curl_read_callback3) || \ - _curl_callback_compatible((expr), _curl_read_callback4) || \ - _curl_callback_compatible((expr), _curl_read_callback5) || \ - _curl_callback_compatible((expr), _curl_read_callback6)) -typedef size_t (_curl_read_callback1)(char *, size_t, size_t, void*); -typedef size_t (_curl_read_callback2)(char *, size_t, size_t, const void*); -typedef size_t (_curl_read_callback3)(char *, size_t, size_t, FILE*); -typedef size_t (_curl_read_callback4)(void *, size_t, size_t, void*); -typedef size_t (_curl_read_callback5)(void *, size_t, size_t, const void*); -typedef size_t (_curl_read_callback6)(void *, size_t, size_t, FILE*); - -/* evaluates to true if expr is of type curl_write_callback or "similar" */ -#define _curl_is_write_cb(expr) \ - (_curl_is_read_cb(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), __typeof__(fwrite)) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_write_callback) || \ - _curl_callback_compatible((expr), _curl_write_callback1) || \ - _curl_callback_compatible((expr), _curl_write_callback2) || \ - _curl_callback_compatible((expr), _curl_write_callback3) || \ - _curl_callback_compatible((expr), _curl_write_callback4) || \ - _curl_callback_compatible((expr), _curl_write_callback5) || \ - _curl_callback_compatible((expr), _curl_write_callback6)) -typedef size_t (_curl_write_callback1)(const char *, size_t, size_t, void*); -typedef size_t (_curl_write_callback2)(const char *, size_t, size_t, - const void*); -typedef size_t (_curl_write_callback3)(const char *, size_t, size_t, FILE*); -typedef size_t (_curl_write_callback4)(const void *, size_t, size_t, void*); -typedef size_t (_curl_write_callback5)(const void *, size_t, size_t, - const void*); -typedef size_t (_curl_write_callback6)(const void *, size_t, size_t, FILE*); - -/* evaluates to true if expr is of type curl_ioctl_callback or "similar" */ -#define _curl_is_ioctl_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_ioctl_callback) || \ - _curl_callback_compatible((expr), _curl_ioctl_callback1) || \ - _curl_callback_compatible((expr), _curl_ioctl_callback2) || \ - _curl_callback_compatible((expr), _curl_ioctl_callback3) || \ - _curl_callback_compatible((expr), _curl_ioctl_callback4)) -typedef curlioerr (_curl_ioctl_callback1)(CURL *, int, void*); -typedef curlioerr (_curl_ioctl_callback2)(CURL *, int, const void*); -typedef curlioerr (_curl_ioctl_callback3)(CURL *, curliocmd, void*); -typedef curlioerr (_curl_ioctl_callback4)(CURL *, curliocmd, const void*); - -/* evaluates to true if expr is of type curl_sockopt_callback or "similar" */ -#define _curl_is_sockopt_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_sockopt_callback) || \ - _curl_callback_compatible((expr), _curl_sockopt_callback1) || \ - _curl_callback_compatible((expr), _curl_sockopt_callback2)) -typedef int (_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype); -typedef int (_curl_sockopt_callback2)(const void *, curl_socket_t, - curlsocktype); - -/* evaluates to true if expr is of type curl_opensocket_callback or - "similar" */ -#define _curl_is_opensocket_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_opensocket_callback) ||\ - _curl_callback_compatible((expr), _curl_opensocket_callback1) || \ - _curl_callback_compatible((expr), _curl_opensocket_callback2) || \ - _curl_callback_compatible((expr), _curl_opensocket_callback3) || \ - _curl_callback_compatible((expr), _curl_opensocket_callback4)) -typedef curl_socket_t (_curl_opensocket_callback1) - (void *, curlsocktype, struct curl_sockaddr *); -typedef curl_socket_t (_curl_opensocket_callback2) - (void *, curlsocktype, const struct curl_sockaddr *); -typedef curl_socket_t (_curl_opensocket_callback3) - (const void *, curlsocktype, struct curl_sockaddr *); -typedef curl_socket_t (_curl_opensocket_callback4) - (const void *, curlsocktype, const struct curl_sockaddr *); - -/* evaluates to true if expr is of type curl_progress_callback or "similar" */ -#define _curl_is_progress_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_progress_callback) || \ - _curl_callback_compatible((expr), _curl_progress_callback1) || \ - _curl_callback_compatible((expr), _curl_progress_callback2)) -typedef int (_curl_progress_callback1)(void *, - double, double, double, double); -typedef int (_curl_progress_callback2)(const void *, - double, double, double, double); - -/* evaluates to true if expr is of type curl_debug_callback or "similar" */ -#define _curl_is_debug_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_debug_callback) || \ - _curl_callback_compatible((expr), _curl_debug_callback1) || \ - _curl_callback_compatible((expr), _curl_debug_callback2) || \ - _curl_callback_compatible((expr), _curl_debug_callback3) || \ - _curl_callback_compatible((expr), _curl_debug_callback4) || \ - _curl_callback_compatible((expr), _curl_debug_callback5) || \ - _curl_callback_compatible((expr), _curl_debug_callback6) || \ - _curl_callback_compatible((expr), _curl_debug_callback7) || \ - _curl_callback_compatible((expr), _curl_debug_callback8)) -typedef int (_curl_debug_callback1) (CURL *, - curl_infotype, char *, size_t, void *); -typedef int (_curl_debug_callback2) (CURL *, - curl_infotype, char *, size_t, const void *); -typedef int (_curl_debug_callback3) (CURL *, - curl_infotype, const char *, size_t, void *); -typedef int (_curl_debug_callback4) (CURL *, - curl_infotype, const char *, size_t, const void *); -typedef int (_curl_debug_callback5) (CURL *, - curl_infotype, unsigned char *, size_t, void *); -typedef int (_curl_debug_callback6) (CURL *, - curl_infotype, unsigned char *, size_t, const void *); -typedef int (_curl_debug_callback7) (CURL *, - curl_infotype, const unsigned char *, size_t, void *); -typedef int (_curl_debug_callback8) (CURL *, - curl_infotype, const unsigned char *, size_t, const void *); - -/* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */ -/* this is getting even messier... */ -#define _curl_is_ssl_ctx_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_ssl_ctx_callback) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback1) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback2) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback3) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback4) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback5) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback6) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback7) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback8)) -typedef CURLcode (_curl_ssl_ctx_callback1)(CURL *, void *, void *); -typedef CURLcode (_curl_ssl_ctx_callback2)(CURL *, void *, const void *); -typedef CURLcode (_curl_ssl_ctx_callback3)(CURL *, const void *, void *); -typedef CURLcode (_curl_ssl_ctx_callback4)(CURL *, const void *, const void *); -#ifdef HEADER_SSL_H -/* hack: if we included OpenSSL's ssl.h, we know about SSL_CTX - * this will of course break if we're included before OpenSSL headers... - */ -typedef CURLcode (_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *); -typedef CURLcode (_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *); -typedef CURLcode (_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *); -typedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX, - const void *); -#else -typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5; -typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6; -typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback7; -typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback8; -#endif - -/* evaluates to true if expr is of type curl_conv_callback or "similar" */ -#define _curl_is_conv_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_conv_callback) || \ - _curl_callback_compatible((expr), _curl_conv_callback1) || \ - _curl_callback_compatible((expr), _curl_conv_callback2) || \ - _curl_callback_compatible((expr), _curl_conv_callback3) || \ - _curl_callback_compatible((expr), _curl_conv_callback4)) -typedef CURLcode (*_curl_conv_callback1)(char *, size_t length); -typedef CURLcode (*_curl_conv_callback2)(const char *, size_t length); -typedef CURLcode (*_curl_conv_callback3)(void *, size_t length); -typedef CURLcode (*_curl_conv_callback4)(const void *, size_t length); - -/* evaluates to true if expr is of type curl_seek_callback or "similar" */ -#define _curl_is_seek_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_seek_callback) || \ - _curl_callback_compatible((expr), _curl_seek_callback1) || \ - _curl_callback_compatible((expr), _curl_seek_callback2)) -typedef CURLcode (*_curl_seek_callback1)(void *, curl_off_t, int); -typedef CURLcode (*_curl_seek_callback2)(const void *, curl_off_t, int); - - -#endif /* __CURL_TYPECHECK_GCC_H */ diff --git a/builddir/freetype-2.7.0/README b/builddir/freetype-2.7.0/README deleted file mode 100644 index 5a49290..0000000 --- a/builddir/freetype-2.7.0/README +++ /dev/null @@ -1,84 +0,0 @@ - FreeType 2.7 - ============ - - Homepage: http://www.freetype.org - - FreeType is a freely available software library to render fonts. - - It is written in C, designed to be small, efficient, highly - customizable, and portable while capable of producing high-quality - output (glyph images) of most vector and bitmap font formats. - - Please read the docs/CHANGES file, it contains IMPORTANT - INFORMATION. - - Read the files `docs/INSTALL*' for installation instructions; see - the file `docs/LICENSE.TXT' for the available licenses. - - The FreeType 2 API reference is located in `docs/reference'; use the - file `ft2-toc.html' as the top entry point. Additional - documentation is available as a separate package from our sites. Go - to - - http://download.savannah.gnu.org/releases/freetype/ - - and download one of the following files. - - freetype-doc-2.7.tar.bz2 - freetype-doc-2.7.tar.gz - ftdoc27.zip - - To view the documentation online, go to - - http://www.freetype.org/freetype2/documentation.html - - - Mailing Lists - ============= - - The preferred way of communication with the FreeType team is using - e-mail lists. - - general use and discussion: freetype@nongnu.org - engine internals, porting, etc.: freetype-devel@nongnu.org - announcements: freetype-announce@nongnu.org - git repository tracker: freetype-commit@nongnu.org - - The lists are moderated; see - - http://www.freetype.org/contact.html - - how to subscribe. - - - Bugs - ==== - - Please submit bug reports at - - https://savannah.nongnu.org/bugs/?group=freetype - - Alternatively, you might report bugs by e-mail to - `freetype-devel@nongnu.org'. Don't forget to send a detailed - explanation of the problem -- there is nothing worse than receiving - a terse message that only says `it doesn't work'. - - - Enjoy! - - - The FreeType Team - ----------------------------------------------------------------------- - -Copyright 2006-2016 by -David Turner, Robert Wilhelm, and Werner Lemberg. - -This file is part of the FreeType project, and may only be used, -modified, and distributed under the terms of the FreeType project -license, LICENSE.TXT. By continuing to use, modify, or distribute -this file you indicate that you have read the license and understand -and accept it fully. - - ---- end of README --- diff --git a/builddir/freetype-2.7.0/bin/freetype27.lib b/builddir/freetype-2.7.0/bin/freetype27.lib deleted file mode 100644 index ebee509..0000000 Binary files a/builddir/freetype-2.7.0/bin/freetype27.lib and /dev/null differ diff --git a/builddir/freetype-2.7.0/include/freetype/config/ftconfig.h b/builddir/freetype-2.7.0/include/freetype/config/ftconfig.h deleted file mode 100644 index 157a704..0000000 --- a/builddir/freetype-2.7.0/include/freetype/config/ftconfig.h +++ /dev/null @@ -1,473 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftconfig.h */ -/* */ -/* ANSI-specific configuration file (specification only). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /*************************************************************************/ - /* */ - /* This header file contains a number of macro definitions that are used */ - /* by the rest of the engine. Most of the macros here are automatically */ - /* determined at compile time, and you should not need to change it to */ - /* port FreeType, except to compile the library with a non-ANSI */ - /* compiler. */ - /* */ - /* Note however that if some specific modifications are needed, we */ - /* advise you to place a modified copy in your build directory. */ - /* */ - /* The build directory is usually `builds/', and contains */ - /* system-specific files that are always included first when building */ - /* the library. */ - /* */ - /* This ANSI version should stay in `include/config/'. */ - /* */ - /*************************************************************************/ - -#ifndef FTCONFIG_H_ -#define FTCONFIG_H_ - -#include -#include FT_CONFIG_OPTIONS_H -#include FT_CONFIG_STANDARD_LIBRARY_H - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* PLATFORM-SPECIFIC CONFIGURATION MACROS */ - /* */ - /* These macros can be toggled to suit a specific system. The current */ - /* ones are defaults used to compile FreeType in an ANSI C environment */ - /* (16bit compilers are also supported). Copy this file to your own */ - /* `builds/' directory, and edit it to port the engine. */ - /* */ - /*************************************************************************/ - - - /* There are systems (like the Texas Instruments 'C54x) where a `char' */ - /* has 16 bits. ANSI C says that sizeof(char) is always 1. Since an */ - /* `int' has 16 bits also for this system, sizeof(int) gives 1 which */ - /* is probably unexpected. */ - /* */ - /* `CHAR_BIT' (defined in limits.h) gives the number of bits in a */ - /* `char' type. */ - -#ifndef FT_CHAR_BIT -#define FT_CHAR_BIT CHAR_BIT -#endif - - - /* The size of an `int' type. */ -#if FT_UINT_MAX == 0xFFFFUL -#define FT_SIZEOF_INT (16 / FT_CHAR_BIT) -#elif FT_UINT_MAX == 0xFFFFFFFFUL -#define FT_SIZEOF_INT (32 / FT_CHAR_BIT) -#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL -#define FT_SIZEOF_INT (64 / FT_CHAR_BIT) -#else -#error "Unsupported size of `int' type!" -#endif - - /* The size of a `long' type. A five-byte `long' (as used e.g. on the */ - /* DM642) is recognized but avoided. */ -#if FT_ULONG_MAX == 0xFFFFFFFFUL -#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT) -#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL -#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT) -#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL -#define FT_SIZEOF_LONG (64 / FT_CHAR_BIT) -#else -#error "Unsupported size of `long' type!" -#endif - - - /* FT_UNUSED is a macro used to indicate that a given parameter is not */ - /* used -- this is only used to get rid of unpleasant compiler warnings */ -#ifndef FT_UNUSED -#define FT_UNUSED( arg ) ( (arg) = (arg) ) -#endif - - - /*************************************************************************/ - /* */ - /* AUTOMATIC CONFIGURATION MACROS */ - /* */ - /* These macros are computed from the ones defined above. Don't touch */ - /* their definition, unless you know precisely what you are doing. No */ - /* porter should need to mess with them. */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* Mac support */ - /* */ - /* This is the only necessary change, so it is defined here instead */ - /* providing a new configuration file. */ - /* */ -#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) ) - /* no Carbon frameworks for 64bit 10.4.x */ - /* AvailabilityMacros.h is available since Mac OS X 10.2, */ - /* so guess the system version by maximum errno before inclusion */ -#include -#ifdef ECANCELED /* defined since 10.2 */ -#include "AvailabilityMacros.h" -#endif -#if defined( __LP64__ ) && \ - ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 ) -#undef FT_MACINTOSH -#endif - -#elif defined( __SC__ ) || defined( __MRC__ ) - /* Classic MacOS compilers */ -#include "ConditionalMacros.h" -#if TARGET_OS_MAC -#define FT_MACINTOSH 1 -#endif - -#endif - - - /*************************************************************************/ - /* */ - /*
*/ - /* basic_types */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* */ - /* FT_Int16 */ - /* */ - /* */ - /* A typedef for a 16bit signed integer type. */ - /* */ - typedef signed short FT_Int16; - - - /*************************************************************************/ - /* */ - /* */ - /* FT_UInt16 */ - /* */ - /* */ - /* A typedef for a 16bit unsigned integer type. */ - /* */ - typedef unsigned short FT_UInt16; - - /* */ - - - /* this #if 0 ... #endif clause is for documentation purposes */ -#if 0 - - /*************************************************************************/ - /* */ - /* */ - /* FT_Int32 */ - /* */ - /* */ - /* A typedef for a 32bit signed integer type. The size depends on */ - /* the configuration. */ - /* */ - typedef signed XXX FT_Int32; - - - /*************************************************************************/ - /* */ - /* */ - /* FT_UInt32 */ - /* */ - /* A typedef for a 32bit unsigned integer type. The size depends on */ - /* the configuration. */ - /* */ - typedef unsigned XXX FT_UInt32; - - - /*************************************************************************/ - /* */ - /* */ - /* FT_Int64 */ - /* */ - /* A typedef for a 64bit signed integer type. The size depends on */ - /* the configuration. Only defined if there is real 64bit support; */ - /* otherwise, it gets emulated with a structure (if necessary). */ - /* */ - typedef signed XXX FT_Int64; - - - /*************************************************************************/ - /* */ - /* */ - /* FT_UInt64 */ - /* */ - /* A typedef for a 64bit unsigned integer type. The size depends on */ - /* the configuration. Only defined if there is real 64bit support; */ - /* otherwise, it gets emulated with a structure (if necessary). */ - /* */ - typedef unsigned XXX FT_UInt64; - - /* */ - -#endif - -#if FT_SIZEOF_INT == (32 / FT_CHAR_BIT) - - typedef signed int FT_Int32; - typedef unsigned int FT_UInt32; - -#elif FT_SIZEOF_LONG == (32 / FT_CHAR_BIT) - - typedef signed long FT_Int32; - typedef unsigned long FT_UInt32; - -#else -#error "no 32bit type found -- please check your configuration files" -#endif - - - /* look up an integer type that is at least 32 bits */ -#if FT_SIZEOF_INT >= (32 / FT_CHAR_BIT) - - typedef int FT_Fast; - typedef unsigned int FT_UFast; - -#elif FT_SIZEOF_LONG >= (32 / FT_CHAR_BIT) - - typedef long FT_Fast; - typedef unsigned long FT_UFast; - -#endif - - - /* determine whether we have a 64-bit int type for platforms without */ - /* Autoconf */ -#if FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) - - /* FT_LONG64 must be defined if a 64-bit type is available */ -#define FT_LONG64 -#define FT_INT64 long -#define FT_UINT64 unsigned long - - /*************************************************************************/ - /* */ - /* A 64-bit data type may create compilation problems if you compile */ - /* in strict ANSI mode. To avoid them, we disable other 64-bit data */ - /* types if __STDC__ is defined. You can however ignore this rule */ - /* by defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ - /* */ -#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 ) - -#if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L - -#define FT_LONG64 -#define FT_INT64 long long int -#define FT_UINT64 unsigned long long int - -#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ - - /* this compiler provides the __int64 type */ -#define FT_LONG64 -#define FT_INT64 __int64 -#define FT_UINT64 unsigned __int64 - -#elif defined( __BORLANDC__ ) /* Borland C++ */ - - /* XXXX: We should probably check the value of __BORLANDC__ in order */ - /* to test the compiler version. */ - - /* this compiler provides the __int64 type */ -#define FT_LONG64 -#define FT_INT64 __int64 -#define FT_UINT64 unsigned __int64 - -#elif defined( __WATCOMC__ ) /* Watcom C++ */ - - /* Watcom doesn't provide 64-bit data types */ - -#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */ - -#define FT_LONG64 -#define FT_INT64 long long int -#define FT_UINT64 unsigned long long int - -#elif defined( __GNUC__ ) - - /* GCC provides the `long long' type */ -#define FT_LONG64 -#define FT_INT64 long long int -#define FT_UINT64 unsigned long long int - -#endif /* __STDC_VERSION__ >= 199901L */ - -#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */ - -#ifdef FT_LONG64 - typedef FT_INT64 FT_Int64; - typedef FT_UINT64 FT_UInt64; -#endif - - - /*************************************************************************/ - /* */ - /* miscellaneous */ - /* */ - /*************************************************************************/ - - -#define FT_BEGIN_STMNT do { -#define FT_END_STMNT } while ( 0 ) -#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT - - - /* typeof condition taken from gnulib's `intprops.h' header file */ -#if ( __GNUC__ >= 2 || \ - defined( __IBM__TYPEOF__ ) || \ - ( __SUNPRO_C >= 0x5110 && !__STDC__ ) ) -#define FT_TYPEOF( type ) (__typeof__ (type)) -#else -#define FT_TYPEOF( type ) /* empty */ -#endif - - -#ifdef FT_MAKE_OPTION_SINGLE_OBJECT - -#define FT_LOCAL( x ) static x -#define FT_LOCAL_DEF( x ) static x - -#else - -#ifdef __cplusplus -#define FT_LOCAL( x ) extern "C" x -#define FT_LOCAL_DEF( x ) extern "C" x -#else -#define FT_LOCAL( x ) extern x -#define FT_LOCAL_DEF( x ) x -#endif - -#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */ - -#define FT_LOCAL_ARRAY( x ) extern const x -#define FT_LOCAL_ARRAY_DEF( x ) const x - - -#ifndef FT_BASE - -#ifdef __cplusplus -#define FT_BASE( x ) extern "C" x -#else -#define FT_BASE( x ) extern x -#endif - -#endif /* !FT_BASE */ - - -#ifndef FT_BASE_DEF - -#ifdef __cplusplus -#define FT_BASE_DEF( x ) x -#else -#define FT_BASE_DEF( x ) x -#endif - -#endif /* !FT_BASE_DEF */ - - -#ifndef FT_EXPORT - -#ifdef __cplusplus -#define FT_EXPORT( x ) extern "C" x -#else -#define FT_EXPORT( x ) extern x -#endif - -#endif /* !FT_EXPORT */ - - -#ifndef FT_EXPORT_DEF - -#ifdef __cplusplus -#define FT_EXPORT_DEF( x ) extern "C" x -#else -#define FT_EXPORT_DEF( x ) extern x -#endif - -#endif /* !FT_EXPORT_DEF */ - - -#ifndef FT_EXPORT_VAR - -#ifdef __cplusplus -#define FT_EXPORT_VAR( x ) extern "C" x -#else -#define FT_EXPORT_VAR( x ) extern x -#endif - -#endif /* !FT_EXPORT_VAR */ - - /* The following macros are needed to compile the library with a */ - /* C++ compiler and with 16bit compilers. */ - /* */ - - /* This is special. Within C++, you must specify `extern "C"' for */ - /* functions which are used via function pointers, and you also */ - /* must do that for structures which contain function pointers to */ - /* assure C linkage -- it's not possible to have (local) anonymous */ - /* functions which are accessed by (global) function pointers. */ - /* */ - /* */ - /* FT_CALLBACK_DEF is used to _define_ a callback function. */ - /* */ - /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */ - /* contains pointers to callback functions. */ - /* */ - /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */ - /* that contains pointers to callback functions. */ - /* */ - /* */ - /* Some 16bit compilers have to redefine these macros to insert */ - /* the infamous `_cdecl' or `__fastcall' declarations. */ - /* */ -#ifndef FT_CALLBACK_DEF -#ifdef __cplusplus -#define FT_CALLBACK_DEF( x ) extern "C" x -#else -#define FT_CALLBACK_DEF( x ) static x -#endif -#endif /* FT_CALLBACK_DEF */ - -#ifndef FT_CALLBACK_TABLE -#ifdef __cplusplus -#define FT_CALLBACK_TABLE extern "C" -#define FT_CALLBACK_TABLE_DEF extern "C" -#else -#define FT_CALLBACK_TABLE extern -#define FT_CALLBACK_TABLE_DEF /* nothing */ -#endif -#endif /* FT_CALLBACK_TABLE */ - - -FT_END_HEADER - - -#endif /* FTCONFIG_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/config/ftheader.h b/builddir/freetype-2.7.0/include/freetype/config/ftheader.h deleted file mode 100644 index 68e1483..0000000 --- a/builddir/freetype-2.7.0/include/freetype/config/ftheader.h +++ /dev/null @@ -1,833 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftheader.h */ -/* */ -/* Build macros of the FreeType 2 library. */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - -#ifndef FTHEADER_H_ -#define FTHEADER_H_ - - - /*@***********************************************************************/ - /* */ - /* */ - /* FT_BEGIN_HEADER */ - /* */ - /* */ - /* This macro is used in association with @FT_END_HEADER in header */ - /* files to ensure that the declarations within are properly */ - /* encapsulated in an `extern "C" { .. }' block when included from a */ - /* C++ compiler. */ - /* */ -#ifdef __cplusplus -#define FT_BEGIN_HEADER extern "C" { -#else -#define FT_BEGIN_HEADER /* nothing */ -#endif - - - /*@***********************************************************************/ - /* */ - /* */ - /* FT_END_HEADER */ - /* */ - /* */ - /* This macro is used in association with @FT_BEGIN_HEADER in header */ - /* files to ensure that the declarations within are properly */ - /* encapsulated in an `extern "C" { .. }' block when included from a */ - /* C++ compiler. */ - /* */ -#ifdef __cplusplus -#define FT_END_HEADER } -#else -#define FT_END_HEADER /* nothing */ -#endif - - - /*************************************************************************/ - /* */ - /* Aliases for the FreeType 2 public and configuration files. */ - /* */ - /*************************************************************************/ - - /*************************************************************************/ - /* */ - /*
*/ - /* header_file_macros */ - /* */ - /* */ - /* Header File Macros */ - /* */ - /* <Abstract> */ - /* Macro definitions used to #include specific header files. */ - /* */ - /* <Description> */ - /* The following macros are defined to the name of specific */ - /* FreeType~2 header files. They can be used directly in #include */ - /* statements as in: */ - /* */ - /* { */ - /* #include FT_FREETYPE_H */ - /* #include FT_MULTIPLE_MASTERS_H */ - /* #include FT_GLYPH_H */ - /* } */ - /* */ - /* There are several reasons why we are now using macros to name */ - /* public header files. The first one is that such macros are not */ - /* limited to the infamous 8.3~naming rule required by DOS (and */ - /* `FT_MULTIPLE_MASTERS_H' is a lot more meaningful than `ftmm.h'). */ - /* */ - /* The second reason is that it allows for more flexibility in the */ - /* way FreeType~2 is installed on a given system. */ - /* */ - /*************************************************************************/ - - - /* configuration files */ - - /************************************************************************* - * - * @macro: - * FT_CONFIG_CONFIG_H - * - * @description: - * A macro used in #include statements to name the file containing - * FreeType~2 configuration data. - * - */ -#ifndef FT_CONFIG_CONFIG_H -#define FT_CONFIG_CONFIG_H <freetype/config/ftconfig.h> -#endif - - - /************************************************************************* - * - * @macro: - * FT_CONFIG_STANDARD_LIBRARY_H - * - * @description: - * A macro used in #include statements to name the file containing - * FreeType~2 interface to the standard C library functions. - * - */ -#ifndef FT_CONFIG_STANDARD_LIBRARY_H -#define FT_CONFIG_STANDARD_LIBRARY_H <freetype/config/ftstdlib.h> -#endif - - - /************************************************************************* - * - * @macro: - * FT_CONFIG_OPTIONS_H - * - * @description: - * A macro used in #include statements to name the file containing - * FreeType~2 project-specific configuration options. - * - */ -#ifndef FT_CONFIG_OPTIONS_H -#define FT_CONFIG_OPTIONS_H <freetype/config/ftoption.h> -#endif - - - /************************************************************************* - * - * @macro: - * FT_CONFIG_MODULES_H - * - * @description: - * A macro used in #include statements to name the file containing the - * list of FreeType~2 modules that are statically linked to new library - * instances in @FT_Init_FreeType. - * - */ -#ifndef FT_CONFIG_MODULES_H -#define FT_CONFIG_MODULES_H <freetype/config/ftmodule.h> -#endif - - /* */ - - /* public headers */ - - /************************************************************************* - * - * @macro: - * FT_FREETYPE_H - * - * @description: - * A macro used in #include statements to name the file containing the - * base FreeType~2 API. - * - */ -#define FT_FREETYPE_H <freetype/freetype.h> - - - /************************************************************************* - * - * @macro: - * FT_ERRORS_H - * - * @description: - * A macro used in #include statements to name the file containing the - * list of FreeType~2 error codes (and messages). - * - * It is included by @FT_FREETYPE_H. - * - */ -#define FT_ERRORS_H <freetype/fterrors.h> - - - /************************************************************************* - * - * @macro: - * FT_MODULE_ERRORS_H - * - * @description: - * A macro used in #include statements to name the file containing the - * list of FreeType~2 module error offsets (and messages). - * - */ -#define FT_MODULE_ERRORS_H <freetype/ftmoderr.h> - - - /************************************************************************* - * - * @macro: - * FT_SYSTEM_H - * - * @description: - * A macro used in #include statements to name the file containing the - * FreeType~2 interface to low-level operations (i.e., memory management - * and stream i/o). - * - * It is included by @FT_FREETYPE_H. - * - */ -#define FT_SYSTEM_H <freetype/ftsystem.h> - - - /************************************************************************* - * - * @macro: - * FT_IMAGE_H - * - * @description: - * A macro used in #include statements to name the file containing type - * definitions related to glyph images (i.e., bitmaps, outlines, - * scan-converter parameters). - * - * It is included by @FT_FREETYPE_H. - * - */ -#define FT_IMAGE_H <freetype/ftimage.h> - - - /************************************************************************* - * - * @macro: - * FT_TYPES_H - * - * @description: - * A macro used in #include statements to name the file containing the - * basic data types defined by FreeType~2. - * - * It is included by @FT_FREETYPE_H. - * - */ -#define FT_TYPES_H <freetype/fttypes.h> - - - /************************************************************************* - * - * @macro: - * FT_LIST_H - * - * @description: - * A macro used in #include statements to name the file containing the - * list management API of FreeType~2. - * - * (Most applications will never need to include this file.) - * - */ -#define FT_LIST_H <freetype/ftlist.h> - - - /************************************************************************* - * - * @macro: - * FT_OUTLINE_H - * - * @description: - * A macro used in #include statements to name the file containing the - * scalable outline management API of FreeType~2. - * - */ -#define FT_OUTLINE_H <freetype/ftoutln.h> - - - /************************************************************************* - * - * @macro: - * FT_SIZES_H - * - * @description: - * A macro used in #include statements to name the file containing the - * API which manages multiple @FT_Size objects per face. - * - */ -#define FT_SIZES_H <freetype/ftsizes.h> - - - /************************************************************************* - * - * @macro: - * FT_MODULE_H - * - * @description: - * A macro used in #include statements to name the file containing the - * module management API of FreeType~2. - * - */ -#define FT_MODULE_H <freetype/ftmodapi.h> - - - /************************************************************************* - * - * @macro: - * FT_RENDER_H - * - * @description: - * A macro used in #include statements to name the file containing the - * renderer module management API of FreeType~2. - * - */ -#define FT_RENDER_H <freetype/ftrender.h> - - - /************************************************************************* - * - * @macro: - * FT_AUTOHINTER_H - * - * @description: - * A macro used in #include statements to name the file containing - * structures and macros related to the auto-hinting module. - * - */ -#define FT_AUTOHINTER_H <freetype/ftautoh.h> - - - /************************************************************************* - * - * @macro: - * FT_CFF_DRIVER_H - * - * @description: - * A macro used in #include statements to name the file containing - * structures and macros related to the CFF driver module. - * - */ -#define FT_CFF_DRIVER_H <freetype/ftcffdrv.h> - - - /************************************************************************* - * - * @macro: - * FT_TRUETYPE_DRIVER_H - * - * @description: - * A macro used in #include statements to name the file containing - * structures and macros related to the TrueType driver module. - * - */ -#define FT_TRUETYPE_DRIVER_H <freetype/ftttdrv.h> - - - /************************************************************************* - * - * @macro: - * FT_TYPE1_TABLES_H - * - * @description: - * A macro used in #include statements to name the file containing the - * types and API specific to the Type~1 format. - * - */ -#define FT_TYPE1_TABLES_H <freetype/t1tables.h> - - - /************************************************************************* - * - * @macro: - * FT_TRUETYPE_IDS_H - * - * @description: - * A macro used in #include statements to name the file containing the - * enumeration values which identify name strings, languages, encodings, - * etc. This file really contains a _large_ set of constant macro - * definitions, taken from the TrueType and OpenType specifications. - * - */ -#define FT_TRUETYPE_IDS_H <freetype/ttnameid.h> - - - /************************************************************************* - * - * @macro: - * FT_TRUETYPE_TABLES_H - * - * @description: - * A macro used in #include statements to name the file containing the - * types and API specific to the TrueType (as well as OpenType) format. - * - */ -#define FT_TRUETYPE_TABLES_H <freetype/tttables.h> - - - /************************************************************************* - * - * @macro: - * FT_TRUETYPE_TAGS_H - * - * @description: - * A macro used in #include statements to name the file containing the - * definitions of TrueType four-byte `tags' which identify blocks in - * SFNT-based font formats (i.e., TrueType and OpenType). - * - */ -#define FT_TRUETYPE_TAGS_H <freetype/tttags.h> - - - /************************************************************************* - * - * @macro: - * FT_BDF_H - * - * @description: - * A macro used in #include statements to name the file containing the - * definitions of an API which accesses BDF-specific strings from a - * face. - * - */ -#define FT_BDF_H <freetype/ftbdf.h> - - - /************************************************************************* - * - * @macro: - * FT_CID_H - * - * @description: - * A macro used in #include statements to name the file containing the - * definitions of an API which access CID font information from a - * face. - * - */ -#define FT_CID_H <freetype/ftcid.h> - - - /************************************************************************* - * - * @macro: - * FT_GZIP_H - * - * @description: - * A macro used in #include statements to name the file containing the - * definitions of an API which supports gzip-compressed files. - * - */ -#define FT_GZIP_H <freetype/ftgzip.h> - - - /************************************************************************* - * - * @macro: - * FT_LZW_H - * - * @description: - * A macro used in #include statements to name the file containing the - * definitions of an API which supports LZW-compressed files. - * - */ -#define FT_LZW_H <freetype/ftlzw.h> - - - /************************************************************************* - * - * @macro: - * FT_BZIP2_H - * - * @description: - * A macro used in #include statements to name the file containing the - * definitions of an API which supports bzip2-compressed files. - * - */ -#define FT_BZIP2_H <freetype/ftbzip2.h> - - - /************************************************************************* - * - * @macro: - * FT_WINFONTS_H - * - * @description: - * A macro used in #include statements to name the file containing the - * definitions of an API which supports Windows FNT files. - * - */ -#define FT_WINFONTS_H <freetype/ftwinfnt.h> - - - /************************************************************************* - * - * @macro: - * FT_GLYPH_H - * - * @description: - * A macro used in #include statements to name the file containing the - * API of the optional glyph management component. - * - */ -#define FT_GLYPH_H <freetype/ftglyph.h> - - - /************************************************************************* - * - * @macro: - * FT_BITMAP_H - * - * @description: - * A macro used in #include statements to name the file containing the - * API of the optional bitmap conversion component. - * - */ -#define FT_BITMAP_H <freetype/ftbitmap.h> - - - /************************************************************************* - * - * @macro: - * FT_BBOX_H - * - * @description: - * A macro used in #include statements to name the file containing the - * API of the optional exact bounding box computation routines. - * - */ -#define FT_BBOX_H <freetype/ftbbox.h> - - - /************************************************************************* - * - * @macro: - * FT_CACHE_H - * - * @description: - * A macro used in #include statements to name the file containing the - * API of the optional FreeType~2 cache sub-system. - * - */ -#define FT_CACHE_H <freetype/ftcache.h> - - - /************************************************************************* - * - * @macro: - * FT_CACHE_IMAGE_H - * - * @description: - * A macro used in #include statements to name the file containing the - * `glyph image' API of the FreeType~2 cache sub-system. - * - * It is used to define a cache for @FT_Glyph elements. You can also - * use the API defined in @FT_CACHE_SMALL_BITMAPS_H if you only need to - * store small glyph bitmaps, as it will use less memory. - * - * This macro is deprecated. Simply include @FT_CACHE_H to have all - * glyph image-related cache declarations. - * - */ -#define FT_CACHE_IMAGE_H FT_CACHE_H - - - /************************************************************************* - * - * @macro: - * FT_CACHE_SMALL_BITMAPS_H - * - * @description: - * A macro used in #include statements to name the file containing the - * `small bitmaps' API of the FreeType~2 cache sub-system. - * - * It is used to define a cache for small glyph bitmaps in a relatively - * memory-efficient way. You can also use the API defined in - * @FT_CACHE_IMAGE_H if you want to cache arbitrary glyph images, - * including scalable outlines. - * - * This macro is deprecated. Simply include @FT_CACHE_H to have all - * small bitmaps-related cache declarations. - * - */ -#define FT_CACHE_SMALL_BITMAPS_H FT_CACHE_H - - - /************************************************************************* - * - * @macro: - * FT_CACHE_CHARMAP_H - * - * @description: - * A macro used in #include statements to name the file containing the - * `charmap' API of the FreeType~2 cache sub-system. - * - * This macro is deprecated. Simply include @FT_CACHE_H to have all - * charmap-based cache declarations. - * - */ -#define FT_CACHE_CHARMAP_H FT_CACHE_H - - - /************************************************************************* - * - * @macro: - * FT_MAC_H - * - * @description: - * A macro used in #include statements to name the file containing the - * Macintosh-specific FreeType~2 API. The latter is used to access - * fonts embedded in resource forks. - * - * This header file must be explicitly included by client applications - * compiled on the Mac (note that the base API still works though). - * - */ -#define FT_MAC_H <freetype/ftmac.h> - - - /************************************************************************* - * - * @macro: - * FT_MULTIPLE_MASTERS_H - * - * @description: - * A macro used in #include statements to name the file containing the - * optional multiple-masters management API of FreeType~2. - * - */ -#define FT_MULTIPLE_MASTERS_H <freetype/ftmm.h> - - - /************************************************************************* - * - * @macro: - * FT_SFNT_NAMES_H - * - * @description: - * A macro used in #include statements to name the file containing the - * optional FreeType~2 API which accesses embedded `name' strings in - * SFNT-based font formats (i.e., TrueType and OpenType). - * - */ -#define FT_SFNT_NAMES_H <freetype/ftsnames.h> - - - /************************************************************************* - * - * @macro: - * FT_OPENTYPE_VALIDATE_H - * - * @description: - * A macro used in #include statements to name the file containing the - * optional FreeType~2 API which validates OpenType tables (BASE, GDEF, - * GPOS, GSUB, JSTF). - * - */ -#define FT_OPENTYPE_VALIDATE_H <freetype/ftotval.h> - - - /************************************************************************* - * - * @macro: - * FT_GX_VALIDATE_H - * - * @description: - * A macro used in #include statements to name the file containing the - * optional FreeType~2 API which validates TrueTypeGX/AAT tables (feat, - * mort, morx, bsln, just, kern, opbd, trak, prop). - * - */ -#define FT_GX_VALIDATE_H <freetype/ftgxval.h> - - - /************************************************************************* - * - * @macro: - * FT_PFR_H - * - * @description: - * A macro used in #include statements to name the file containing the - * FreeType~2 API which accesses PFR-specific data. - * - */ -#define FT_PFR_H <freetype/ftpfr.h> - - - /************************************************************************* - * - * @macro: - * FT_STROKER_H - * - * @description: - * A macro used in #include statements to name the file containing the - * FreeType~2 API which provides functions to stroke outline paths. - */ -#define FT_STROKER_H <freetype/ftstroke.h> - - - /************************************************************************* - * - * @macro: - * FT_SYNTHESIS_H - * - * @description: - * A macro used in #include statements to name the file containing the - * FreeType~2 API which performs artificial obliquing and emboldening. - */ -#define FT_SYNTHESIS_H <freetype/ftsynth.h> - - - /************************************************************************* - * - * @macro: - * FT_FONT_FORMATS_H - * - * @description: - * A macro used in #include statements to name the file containing the - * FreeType~2 API which provides functions specific to font formats. - */ -#define FT_FONT_FORMATS_H <freetype/ftfntfmt.h> - - /* deprecated */ -#define FT_XFREE86_H FT_FONT_FORMATS_H - - - /************************************************************************* - * - * @macro: - * FT_TRIGONOMETRY_H - * - * @description: - * A macro used in #include statements to name the file containing the - * FreeType~2 API which performs trigonometric computations (e.g., - * cosines and arc tangents). - */ -#define FT_TRIGONOMETRY_H <freetype/fttrigon.h> - - - /************************************************************************* - * - * @macro: - * FT_LCD_FILTER_H - * - * @description: - * A macro used in #include statements to name the file containing the - * FreeType~2 API which performs color filtering for subpixel rendering. - */ -#define FT_LCD_FILTER_H <freetype/ftlcdfil.h> - - - /************************************************************************* - * - * @macro: - * FT_UNPATENTED_HINTING_H - * - * @description: - * Deprecated. - */ -#define FT_UNPATENTED_HINTING_H <freetype/ttunpat.h> - - - /************************************************************************* - * - * @macro: - * FT_INCREMENTAL_H - * - * @description: - * A macro used in #include statements to name the file containing the - * FreeType~2 API which performs incremental glyph loading. - */ -#define FT_INCREMENTAL_H <freetype/ftincrem.h> - - - /************************************************************************* - * - * @macro: - * FT_GASP_H - * - * @description: - * A macro used in #include statements to name the file containing the - * FreeType~2 API which returns entries from the TrueType GASP table. - */ -#define FT_GASP_H <freetype/ftgasp.h> - - - /************************************************************************* - * - * @macro: - * FT_ADVANCES_H - * - * @description: - * A macro used in #include statements to name the file containing the - * FreeType~2 API which returns individual and ranged glyph advances. - */ -#define FT_ADVANCES_H <freetype/ftadvanc.h> - - - /* */ - -#define FT_ERROR_DEFINITIONS_H <freetype/fterrdef.h> - - - /* The internals of the cache sub-system are no longer exposed. We */ - /* default to FT_CACHE_H at the moment just in case, but we know of */ - /* no rogue client that uses them. */ - /* */ -#define FT_CACHE_MANAGER_H <freetype/ftcache.h> -#define FT_CACHE_INTERNAL_MRU_H <freetype/ftcache.h> -#define FT_CACHE_INTERNAL_MANAGER_H <freetype/ftcache.h> -#define FT_CACHE_INTERNAL_CACHE_H <freetype/ftcache.h> -#define FT_CACHE_INTERNAL_GLYPH_H <freetype/ftcache.h> -#define FT_CACHE_INTERNAL_IMAGE_H <freetype/ftcache.h> -#define FT_CACHE_INTERNAL_SBITS_H <freetype/ftcache.h> - - -#define FT_INCREMENTAL_H <freetype/ftincrem.h> - -#define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h> - - - /* - * Include internal headers definitions from <internal/...> - * only when building the library. - */ -#ifdef FT2_BUILD_LIBRARY -#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h> -#include FT_INTERNAL_INTERNAL_H -#endif /* FT2_BUILD_LIBRARY */ - - -#endif /* FTHEADER_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/config/ftmodule.h b/builddir/freetype-2.7.0/include/freetype/config/ftmodule.h deleted file mode 100644 index 76d271a..0000000 --- a/builddir/freetype-2.7.0/include/freetype/config/ftmodule.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This file registers the FreeType modules compiled into the library. - * - * If you use GNU make, this file IS NOT USED! Instead, it is created in - * the objects directory (normally `<topdir>/objs/') based on information - * from `<topdir>/modules.cfg'. - * - * Please read `docs/INSTALL.ANY' and `docs/CUSTOMIZE' how to compile - * FreeType without GNU make. - * - */ - -FT_USE_MODULE( FT_Module_Class, autofit_module_class ) -FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) -FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) -FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) -FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) -FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) -FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) -FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) -FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) -FT_USE_MODULE( FT_Module_Class, psaux_module_class ) -FT_USE_MODULE( FT_Module_Class, psnames_module_class ) -FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) -FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) -FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) -FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) -FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class ) -FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class ) -FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) - -/* EOF */ diff --git a/builddir/freetype-2.7.0/include/freetype/config/ftoption.h b/builddir/freetype-2.7.0/include/freetype/config/ftoption.h deleted file mode 100644 index 90c123e..0000000 --- a/builddir/freetype-2.7.0/include/freetype/config/ftoption.h +++ /dev/null @@ -1,933 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftoption.h */ -/* */ -/* User-selectable configuration macros (specification only). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTOPTION_H_ -#define FTOPTION_H_ - - -#include <ft2build.h> - - -FT_BEGIN_HEADER - - /*************************************************************************/ - /* */ - /* USER-SELECTABLE CONFIGURATION MACROS */ - /* */ - /* This file contains the default configuration macro definitions for */ - /* a standard build of the FreeType library. There are three ways to */ - /* use this file to build project-specific versions of the library: */ - /* */ - /* - You can modify this file by hand, but this is not recommended in */ - /* cases where you would like to build several versions of the */ - /* library from a single source directory. */ - /* */ - /* - You can put a copy of this file in your build directory, more */ - /* precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD' */ - /* is the name of a directory that is included _before_ the FreeType */ - /* include path during compilation. */ - /* */ - /* The default FreeType Makefiles and Jamfiles use the build */ - /* directory `builds/<system>' by default, but you can easily change */ - /* that for your own projects. */ - /* */ - /* - Copy the file <ft2build.h> to `$BUILD/ft2build.h' and modify it */ - /* slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to */ - /* locate this file during the build. For example, */ - /* */ - /* #define FT_CONFIG_OPTIONS_H <myftoptions.h> */ - /* #include <freetype/config/ftheader.h> */ - /* */ - /* will use `$BUILD/myftoptions.h' instead of this file for macro */ - /* definitions. */ - /* */ - /* Note also that you can similarly pre-define the macro */ - /* FT_CONFIG_MODULES_H used to locate the file listing of the modules */ - /* that are statically linked to the library at compile time. By */ - /* default, this file is <freetype/config/ftmodule.h>. */ - /* */ - /* We highly recommend using the third method whenever possible. */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** G E N E R A L F R E E T Y P E 2 C O N F I G U R A T I O N ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* If you enable this configuration option, FreeType recognizes an */ - /* environment variable called `FREETYPE_PROPERTIES', which can be used */ - /* to control the various font drivers and modules. The controllable */ - /* properties are listed in the section `Controlling FreeType Modules' */ - /* in the reference's table of contents; currently there are properties */ - /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), and */ - /* TrueType (file `ftttdrv.h'). */ - /* */ - /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */ - /* multiple lines for better readability). */ - /* */ - /* <optional whitespace> */ - /* <module-name1> ':' */ - /* <property-name1> '=' <property-value1> */ - /* <whitespace> */ - /* <module-name2> ':' */ - /* <property-name2> '=' <property-value2> */ - /* ... */ - /* */ - /* Example: */ - /* */ - /* FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ */ - /* cff:no-stem-darkening=1 \ */ - /* autofitter:warping=1 */ - /* */ -#define FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES - - - /*************************************************************************/ - /* */ - /* Uncomment the line below if you want to activate sub-pixel rendering */ - /* (a.k.a. LCD rendering, or ClearType) in this build of the library. */ - /* */ - /* Note that this feature is covered by several Microsoft patents */ - /* and should not be activated in any default build of the library. */ - /* */ - /* This macro has no impact on the FreeType API, only on its */ - /* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */ - /* FT_Render_Glyph still generates a bitmap that is 3 times wider than */ - /* the original size in case this macro isn't defined; however, each */ - /* triplet of subpixels has R=G=B. */ - /* */ - /* This is done to allow FreeType clients to run unmodified, forcing */ - /* them to display normal gray-level anti-aliased glyphs. */ - /* */ -/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ - - - /*************************************************************************/ - /* */ - /* Many compilers provide a non-ANSI 64-bit data type that can be used */ - /* by FreeType to speed up some computations. However, this will create */ - /* some problems when compiling the library in strict ANSI mode. */ - /* */ - /* For this reason, the use of 64-bit integers is normally disabled when */ - /* the __STDC__ macro is defined. You can however disable this by */ - /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here. */ - /* */ - /* For most compilers, this will only create compilation warnings when */ - /* building the library. */ - /* */ - /* ObNote: The compiler-specific 64-bit integers are detected in the */ - /* file `ftconfig.h' either statically or through the */ - /* `configure' script on supported platforms. */ - /* */ -#undef FT_CONFIG_OPTION_FORCE_INT64 - - - /*************************************************************************/ - /* */ - /* If this macro is defined, do not try to use an assembler version of */ - /* performance-critical functions (e.g. FT_MulFix). You should only do */ - /* that to verify that the assembler function works properly, or to */ - /* execute benchmark tests of the various implementations. */ -/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */ - - - /*************************************************************************/ - /* */ - /* If this macro is defined, try to use an inlined assembler version of */ - /* the `FT_MulFix' function, which is a `hotspot' when loading and */ - /* hinting glyphs, and which should be executed as fast as possible. */ - /* */ - /* Note that if your compiler or CPU is not supported, this will default */ - /* to the standard and portable implementation found in `ftcalc.c'. */ - /* */ -#define FT_CONFIG_OPTION_INLINE_MULFIX - - - /*************************************************************************/ - /* */ - /* LZW-compressed file support. */ - /* */ - /* FreeType now handles font files that have been compressed with the */ - /* `compress' program. This is mostly used to parse many of the PCF */ - /* files that come with various X11 distributions. The implementation */ - /* uses NetBSD's `zopen' to partially uncompress the file on the fly */ - /* (see src/lzw/ftgzip.c). */ - /* */ - /* Define this macro if you want to enable this `feature'. */ - /* */ -#define FT_CONFIG_OPTION_USE_LZW - - - /*************************************************************************/ - /* */ - /* Gzip-compressed file support. */ - /* */ - /* FreeType now handles font files that have been compressed with the */ - /* `gzip' program. This is mostly used to parse many of the PCF files */ - /* that come with XFree86. The implementation uses `zlib' to */ - /* partially uncompress the file on the fly (see src/gzip/ftgzip.c). */ - /* */ - /* Define this macro if you want to enable this `feature'. See also */ - /* the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below. */ - /* */ -#define FT_CONFIG_OPTION_USE_ZLIB - - - /*************************************************************************/ - /* */ - /* ZLib library selection */ - /* */ - /* This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined. */ - /* It allows FreeType's `ftgzip' component to link to the system's */ - /* installation of the ZLib library. This is useful on systems like */ - /* Unix or VMS where it generally is already available. */ - /* */ - /* If you let it undefined, the component will use its own copy */ - /* of the zlib sources instead. These have been modified to be */ - /* included directly within the component and *not* export external */ - /* function names. This allows you to link any program with FreeType */ - /* _and_ ZLib without linking conflicts. */ - /* */ - /* Do not #undef this macro here since the build system might define */ - /* it for certain configurations only. */ - /* */ -/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */ - - - /*************************************************************************/ - /* */ - /* Bzip2-compressed file support. */ - /* */ - /* FreeType now handles font files that have been compressed with the */ - /* `bzip2' program. This is mostly used to parse many of the PCF */ - /* files that come with XFree86. The implementation uses `libbz2' to */ - /* partially uncompress the file on the fly (see src/bzip2/ftbzip2.c). */ - /* Contrary to gzip, bzip2 currently is not included and need to use */ - /* the system available bzip2 implementation. */ - /* */ - /* Define this macro if you want to enable this `feature'. */ - /* */ -/* #define FT_CONFIG_OPTION_USE_BZIP2 */ - - - /*************************************************************************/ - /* */ - /* Define to disable the use of file stream functions and types, FILE, */ - /* fopen() etc. Enables the use of smaller system libraries on embedded */ - /* systems that have multiple system libraries, some with or without */ - /* file stream support, in the cases where file stream support is not */ - /* necessary such as memory loading of font files. */ - /* */ -/* #define FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT */ - - - /*************************************************************************/ - /* */ - /* PNG bitmap support. */ - /* */ - /* FreeType now handles loading color bitmap glyphs in the PNG format. */ - /* This requires help from the external libpng library. Uncompressed */ - /* color bitmaps do not need any external libraries and will be */ - /* supported regardless of this configuration. */ - /* */ - /* Define this macro if you want to enable this `feature'. */ - /* */ -/* #define FT_CONFIG_OPTION_USE_PNG */ - - - /*************************************************************************/ - /* */ - /* HarfBuzz support. */ - /* */ - /* FreeType uses the HarfBuzz library to improve auto-hinting of */ - /* OpenType fonts. If available, many glyphs not directly addressable */ - /* by a font's character map will be hinted also. */ - /* */ - /* Define this macro if you want to enable this `feature'. */ - /* */ -/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */ - - - /*************************************************************************/ - /* */ - /* DLL export compilation */ - /* */ - /* When compiling FreeType as a DLL, some systems/compilers need a */ - /* special keyword in front OR after the return type of function */ - /* declarations. */ - /* */ - /* Two macros are used within the FreeType source code to define */ - /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */ - /* */ - /* FT_EXPORT( return_type ) */ - /* */ - /* is used in a function declaration, as in */ - /* */ - /* FT_EXPORT( FT_Error ) */ - /* FT_Init_FreeType( FT_Library* alibrary ); */ - /* */ - /* */ - /* FT_EXPORT_DEF( return_type ) */ - /* */ - /* is used in a function definition, as in */ - /* */ - /* FT_EXPORT_DEF( FT_Error ) */ - /* FT_Init_FreeType( FT_Library* alibrary ) */ - /* { */ - /* ... some code ... */ - /* return FT_Err_Ok; */ - /* } */ - /* */ - /* You can provide your own implementation of FT_EXPORT and */ - /* FT_EXPORT_DEF here if you want. If you leave them undefined, they */ - /* will be later automatically defined as `extern return_type' to */ - /* allow normal compilation. */ - /* */ - /* Do not #undef these macros here since the build system might define */ - /* them for certain configurations only. */ - /* */ -/* #define FT_EXPORT(x) extern x */ -/* #define FT_EXPORT_DEF(x) x */ - - - /*************************************************************************/ - /* */ - /* Glyph Postscript Names handling */ - /* */ - /* By default, FreeType 2 is compiled with the `psnames' module. This */ - /* module is in charge of converting a glyph name string into a */ - /* Unicode value, or return a Macintosh standard glyph name for the */ - /* use with the TrueType `post' table. */ - /* */ - /* Undefine this macro if you do not want `psnames' compiled in your */ - /* build of FreeType. This has the following effects: */ - /* */ - /* - The TrueType driver will provide its own set of glyph names, */ - /* if you build it to support postscript names in the TrueType */ - /* `post' table. */ - /* */ - /* - The Type 1 driver will not be able to synthesize a Unicode */ - /* charmap out of the glyphs found in the fonts. */ - /* */ - /* You would normally undefine this configuration macro when building */ - /* a version of FreeType that doesn't contain a Type 1 or CFF driver. */ - /* */ -#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES - - - /*************************************************************************/ - /* */ - /* Postscript Names to Unicode Values support */ - /* */ - /* By default, FreeType 2 is built with the `PSNames' module compiled */ - /* in. Among other things, the module is used to convert a glyph name */ - /* into a Unicode value. This is especially useful in order to */ - /* synthesize on the fly a Unicode charmap from the CFF/Type 1 driver */ - /* through a big table named the `Adobe Glyph List' (AGL). */ - /* */ - /* Undefine this macro if you do not want the Adobe Glyph List */ - /* compiled in your `PSNames' module. The Type 1 driver will not be */ - /* able to synthesize a Unicode charmap out of the glyphs found in the */ - /* fonts. */ - /* */ -#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST - - - /*************************************************************************/ - /* */ - /* Support for Mac fonts */ - /* */ - /* Define this macro if you want support for outline fonts in Mac */ - /* format (mac dfont, mac resource, macbinary containing a mac */ - /* resource) on non-Mac platforms. */ - /* */ - /* Note that the `FOND' resource isn't checked. */ - /* */ -#define FT_CONFIG_OPTION_MAC_FONTS - - - /*************************************************************************/ - /* */ - /* Guessing methods to access embedded resource forks */ - /* */ - /* Enable extra Mac fonts support on non-Mac platforms (e.g. */ - /* GNU/Linux). */ - /* */ - /* Resource forks which include fonts data are stored sometimes in */ - /* locations which users or developers don't expected. In some cases, */ - /* resource forks start with some offset from the head of a file. In */ - /* other cases, the actual resource fork is stored in file different */ - /* from what the user specifies. If this option is activated, */ - /* FreeType tries to guess whether such offsets or different file */ - /* names must be used. */ - /* */ - /* Note that normal, direct access of resource forks is controlled via */ - /* the FT_CONFIG_OPTION_MAC_FONTS option. */ - /* */ -#ifdef FT_CONFIG_OPTION_MAC_FONTS -#define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK -#endif - - - /*************************************************************************/ - /* */ - /* Allow the use of FT_Incremental_Interface to load typefaces that */ - /* contain no glyph data, but supply it via a callback function. */ - /* This is required by clients supporting document formats which */ - /* supply font data incrementally as the document is parsed, such */ - /* as the Ghostscript interpreter for the PostScript language. */ - /* */ -#define FT_CONFIG_OPTION_INCREMENTAL - - - /*************************************************************************/ - /* */ - /* The size in bytes of the render pool used by the scan-line converter */ - /* to do all of its work. */ - /* */ -#define FT_RENDER_POOL_SIZE 16384L - - - /*************************************************************************/ - /* */ - /* FT_MAX_MODULES */ - /* */ - /* The maximum number of modules that can be registered in a single */ - /* FreeType library object. 32 is the default. */ - /* */ -#define FT_MAX_MODULES 32 - - - /*************************************************************************/ - /* */ - /* Debug level */ - /* */ - /* FreeType can be compiled in debug or trace mode. In debug mode, */ - /* errors are reported through the `ftdebug' component. In trace */ - /* mode, additional messages are sent to the standard output during */ - /* execution. */ - /* */ - /* Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode. */ - /* Define FT_DEBUG_LEVEL_TRACE to build it in trace mode. */ - /* */ - /* Don't define any of these macros to compile in `release' mode! */ - /* */ - /* Do not #undef these macros here since the build system might define */ - /* them for certain configurations only. */ - /* */ -/* #define FT_DEBUG_LEVEL_ERROR */ -/* #define FT_DEBUG_LEVEL_TRACE */ - - - /*************************************************************************/ - /* */ - /* Autofitter debugging */ - /* */ - /* If FT_DEBUG_AUTOFIT is defined, FreeType provides some means to */ - /* control the autofitter behaviour for debugging purposes with global */ - /* boolean variables (consequently, you should *never* enable this */ - /* while compiling in `release' mode): */ - /* */ - /* _af_debug_disable_horz_hints */ - /* _af_debug_disable_vert_hints */ - /* _af_debug_disable_blue_hints */ - /* */ - /* Additionally, the following functions provide dumps of various */ - /* internal autofit structures to stdout (using `printf'): */ - /* */ - /* af_glyph_hints_dump_points */ - /* af_glyph_hints_dump_segments */ - /* af_glyph_hints_dump_edges */ - /* af_glyph_hints_get_num_segments */ - /* af_glyph_hints_get_segment_offset */ - /* */ - /* As an argument, they use another global variable: */ - /* */ - /* _af_debug_hints */ - /* */ - /* Please have a look at the `ftgrid' demo program to see how those */ - /* variables and macros should be used. */ - /* */ - /* Do not #undef these macros here since the build system might define */ - /* them for certain configurations only. */ - /* */ -/* #define FT_DEBUG_AUTOFIT */ - - - /*************************************************************************/ - /* */ - /* Memory Debugging */ - /* */ - /* FreeType now comes with an integrated memory debugger that is */ - /* capable of detecting simple errors like memory leaks or double */ - /* deletes. To compile it within your build of the library, you */ - /* should define FT_DEBUG_MEMORY here. */ - /* */ - /* Note that the memory debugger is only activated at runtime when */ - /* when the _environment_ variable `FT2_DEBUG_MEMORY' is defined also! */ - /* */ - /* Do not #undef this macro here since the build system might define */ - /* it for certain configurations only. */ - /* */ -/* #define FT_DEBUG_MEMORY */ - - - /*************************************************************************/ - /* */ - /* Module errors */ - /* */ - /* If this macro is set (which is _not_ the default), the higher byte */ - /* of an error code gives the module in which the error has occurred, */ - /* while the lower byte is the real error code. */ - /* */ - /* Setting this macro makes sense for debugging purposes only, since */ - /* it would break source compatibility of certain programs that use */ - /* FreeType 2. */ - /* */ - /* More details can be found in the files ftmoderr.h and fterrors.h. */ - /* */ -#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS - - - /*************************************************************************/ - /* */ - /* Position Independent Code */ - /* */ - /* If this macro is set (which is _not_ the default), FreeType2 will */ - /* avoid creating constants that require address fixups. Instead the */ - /* constants will be moved into a struct and additional intialization */ - /* code will be used. */ - /* */ - /* Setting this macro is needed for systems that prohibit address */ - /* fixups, such as BREW. [Note that standard compilers like gcc or */ - /* clang handle PIC generation automatically; you don't have to set */ - /* FT_CONFIG_OPTION_PIC, which is only necessary for very special */ - /* compilers.] */ - /* */ - /* Note that FT_CONFIG_OPTION_PIC support is not available for all */ - /* modules (see `modules.cfg' for a complete list). For building with */ - /* FT_CONFIG_OPTION_PIC support, do the following. */ - /* */ - /* 0. Clone the repository. */ - /* 1. Define FT_CONFIG_OPTION_PIC. */ - /* 2. Remove all subdirectories in `src' that don't have */ - /* FT_CONFIG_OPTION_PIC support. */ - /* 3. Comment out the corresponding modules in `modules.cfg'. */ - /* 4. Compile. */ - /* */ -/* #define FT_CONFIG_OPTION_PIC */ - - - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** S F N T D R I V E R C O N F I G U R A T I O N ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support */ - /* embedded bitmaps in all formats using the SFNT module (namely */ - /* TrueType & OpenType). */ - /* */ -#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS - - - /*************************************************************************/ - /* */ - /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to */ - /* load and enumerate the glyph Postscript names in a TrueType or */ - /* OpenType file. */ - /* */ - /* Note that when you do not compile the `PSNames' module by undefining */ - /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will */ - /* contain additional code used to read the PS Names table from a font. */ - /* */ - /* (By default, the module uses `PSNames' to extract glyph names.) */ - /* */ -#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES - - - /*************************************************************************/ - /* */ - /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to */ - /* access the internal name table in a SFNT-based format like TrueType */ - /* or OpenType. The name table contains various strings used to */ - /* describe the font, like family name, copyright, version, etc. It */ - /* does not contain any glyph name though. */ - /* */ - /* Accessing SFNT names is done through the functions declared in */ - /* `ftsnames.h'. */ - /* */ -#define TT_CONFIG_OPTION_SFNT_NAMES - - - /*************************************************************************/ - /* */ - /* TrueType CMap support */ - /* */ - /* Here you can fine-tune which TrueType CMap table format shall be */ - /* supported. */ -#define TT_CONFIG_CMAP_FORMAT_0 -#define TT_CONFIG_CMAP_FORMAT_2 -#define TT_CONFIG_CMAP_FORMAT_4 -#define TT_CONFIG_CMAP_FORMAT_6 -#define TT_CONFIG_CMAP_FORMAT_8 -#define TT_CONFIG_CMAP_FORMAT_10 -#define TT_CONFIG_CMAP_FORMAT_12 -#define TT_CONFIG_CMAP_FORMAT_13 -#define TT_CONFIG_CMAP_FORMAT_14 - - - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** T R U E T Y P E D R I V E R C O N F I G U R A T I O N ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - - /*************************************************************************/ - /* */ - /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */ - /* a bytecode interpreter in the TrueType driver. */ - /* */ - /* By undefining this, you will only compile the code necessary to load */ - /* TrueType glyphs without hinting. */ - /* */ - /* Do not #undef this macro here, since the build system might */ - /* define it for certain configurations only. */ - /* */ -#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER - - - /*************************************************************************/ - /* */ - /* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile */ - /* subpixel hinting support into the TrueType driver. This modifies the */ - /* TrueType hinting mechanism when anything but FT_RENDER_MODE_MONO is */ - /* requested. */ - /* */ - /* In particular, it modifies the bytecode interpreter to interpret (or */ - /* not) instructions in a certain way so that all TrueType fonts look */ - /* like they do in a Windows ClearType (DirectWrite) environment. See */ - /* [1] for a technical overview on what this means. See `ttinterp.h' */ - /* for more details on the LEAN option. */ - /* */ - /* There are three options. */ - /* */ - /* 1. This option is associated with the `Infinality' moniker. */ - /* Contributed by an individual nicknamed Infinality with the goal of */ - /* making TrueType fonts render better than on Windows. A high */ - /* amount of configurability and flexibility, down to rules for */ - /* single glyphs in fonts, but also very slow. Its experimental and */ - /* slow nature and the original developer losing interest meant that */ - /* this option was never enabled in default builds. */ - /* */ - /* 2. The new default mode for the TrueType driver. The Infinality code */ - /* base was stripped to the bare minimum and all configurability */ - /* removed in the name of speed and simplicity. The configurability */ - /* was mainly aimed at legacy fonts like Arial, Times New Roman, or */ - /* Courier. Legacy fonts are fonts that modify vertical stems to */ - /* achieve clean black-and-white bitmaps. The new mode focuses on */ - /* applying a minimal set of rules to all fonts indiscriminately so */ - /* that modern and web fonts render well while legacy fonts render */ - /* okay. */ - /* */ - /* 3. Compile both. */ - /* */ - /* By undefining these, you get rendering behavior like on Windows */ - /* without ClearType, i.e., Windows XP without ClearType enabled and */ - /* Win9x (interpreter version v35). Or not, depending on how much */ - /* hinting blood and testing tears the font designer put into a given */ - /* font. If you define one or both subpixel hinting options, you can */ - /* switch between between v35 and the ones you define. */ - /* */ - /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */ - /* defined. */ - /* */ - /* [1] http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */ - /* */ -/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */ -#define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2 -/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) */ - - - /*************************************************************************/ - /* */ - /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the */ - /* TrueType glyph loader to use Apple's definition of how to handle */ - /* component offsets in composite glyphs. */ - /* */ - /* Apple and MS disagree on the default behavior of component offsets */ - /* in composites. Apple says that they should be scaled by the scaling */ - /* factors in the transformation matrix (roughly, it's more complex) */ - /* while MS says they should not. OpenType defines two bits in the */ - /* composite flags array which can be used to disambiguate, but old */ - /* fonts will not have them. */ - /* */ - /* http://www.microsoft.com/typography/otspec/glyf.htm */ - /* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html */ - /* */ -#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED - - - /*************************************************************************/ - /* */ - /* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include */ - /* support for Apple's distortable font technology (fvar, gvar, cvar, */ - /* and avar tables). This has many similarities to Type 1 Multiple */ - /* Masters support. */ - /* */ -#define TT_CONFIG_OPTION_GX_VAR_SUPPORT - - - /*************************************************************************/ - /* */ - /* Define TT_CONFIG_OPTION_BDF if you want to include support for */ - /* an embedded `BDF ' table within SFNT-based bitmap formats. */ - /* */ -#define TT_CONFIG_OPTION_BDF - - - /*************************************************************************/ - /* */ - /* Option TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES controls the maximum */ - /* number of bytecode instructions executed for a single run of the */ - /* bytecode interpreter, needed to prevent infinite loops. You don't */ - /* want to change this except for very special situations (e.g., making */ - /* a library fuzzer spend less time to handle broken fonts). */ - /* */ - /* It is not expected that this value is ever modified by a configuring */ - /* script; instead, it gets surrounded with #ifndef ... #endif so that */ - /* the value can be set as a preprocessor option on the compiler's */ - /* command line. */ - /* */ -#ifndef TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES -#define TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES 1000000L -#endif - - - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* T1_MAX_DICT_DEPTH is the maximum depth of nest dictionaries and */ - /* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */ - /* required. */ - /* */ -#define T1_MAX_DICT_DEPTH 5 - - - /*************************************************************************/ - /* */ - /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */ - /* calls during glyph loading. */ - /* */ -#define T1_MAX_SUBRS_CALLS 16 - - - /*************************************************************************/ - /* */ - /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A */ - /* minimum of 16 is required. */ - /* */ - /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */ - /* */ -#define T1_MAX_CHARSTRINGS_OPERANDS 256 - - - /*************************************************************************/ - /* */ - /* Define this configuration macro if you want to prevent the */ - /* compilation of `t1afm', which is in charge of reading Type 1 AFM */ - /* files into an existing face. Note that if set, the T1 driver will be */ - /* unable to produce kerning distances. */ - /* */ -#undef T1_CONFIG_OPTION_NO_AFM - - - /*************************************************************************/ - /* */ - /* Define this configuration macro if you want to prevent the */ - /* compilation of the Multiple Masters font support in the Type 1 */ - /* driver. */ - /* */ -#undef T1_CONFIG_OPTION_NO_MM_SUPPORT - - - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** C F F D R I V E R C O N F I G U R A T I O N ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* Using CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4} it is */ - /* possible to set up the default values of the four control points that */ - /* define the stem darkening behaviour of the (new) CFF engine. For */ - /* more details please read the documentation of the */ - /* `darkening-parameters' property of the cff driver module (file */ - /* `ftcffdrv.h'), which allows the control at run-time. */ - /* */ - /* Do *not* undefine these macros! */ - /* */ -#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 500 -#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 400 - -#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 1000 -#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 275 - -#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 1667 -#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 275 - -#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 2333 -#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 0 - - - /*************************************************************************/ - /* */ - /* CFF_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe CFF */ - /* engine gets compiled into FreeType. If defined, it is possible to */ - /* switch between the two engines using the `hinting-engine' property of */ - /* the cff driver module. */ - /* */ -/* #define CFF_CONFIG_OPTION_OLD_ENGINE */ - - - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* Compile autofit module with CJK (Chinese, Japanese, Korean) script */ - /* support. */ - /* */ -#define AF_CONFIG_OPTION_CJK - - /*************************************************************************/ - /* */ - /* Compile autofit module with Indic script support. */ - /* */ -#define AF_CONFIG_OPTION_INDIC - - /*************************************************************************/ - /* */ - /* Compile autofit module with warp hinting. The idea of the warping */ - /* code is to slightly scale and shift a glyph within a single dimension */ - /* so that as much of its segments are aligned (more or less) on the */ - /* grid. To find out the optimal scaling and shifting value, various */ - /* parameter combinations are tried and scored. */ - /* */ - /* This experimental option is active only if the rendering mode is */ - /* FT_RENDER_MODE_LIGHT; you can switch warping on and off with the */ - /* `warping' property of the auto-hinter (see file `ftautoh.h' for more */ - /* information; by default it is switched off). */ - /* */ -#define AF_CONFIG_OPTION_USE_WARPER - - /* */ - - - /* - * This macro is obsolete. Support has been removed in FreeType - * version 2.5. - */ -/* #define FT_CONFIG_OPTION_OLD_INTERNALS */ - - - /* - * This macro is defined if native TrueType hinting is requested by the - * definitions above. - */ -#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER -#define TT_USE_BYTECODE_INTERPRETER - -#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 1 -#define TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY -#endif - -#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 2 -#define TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL -#endif -#endif - - - /* - * Check CFF darkening parameters. The checks are the same as in function - * `cff_property_set' in file `cffdrivr.c'. - */ -#if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0 || \ - CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0 || \ - CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0 || \ - CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0 || \ - \ - CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 < 0 || \ - CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 < 0 || \ - CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 < 0 || \ - CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 < 0 || \ - \ - CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 > \ - CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 || \ - CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 > \ - CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 || \ - CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 > \ - CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 || \ - \ - CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 > 500 || \ - CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 > 500 || \ - CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 > 500 || \ - CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 > 500 -#error "Invalid CFF darkening parameters!" -#endif - -FT_END_HEADER - - -#endif /* FTOPTION_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/config/ftstdlib.h b/builddir/freetype-2.7.0/include/freetype/config/ftstdlib.h deleted file mode 100644 index 6eefa9f..0000000 --- a/builddir/freetype-2.7.0/include/freetype/config/ftstdlib.h +++ /dev/null @@ -1,175 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftstdlib.h */ -/* */ -/* ANSI-specific library and header configuration file (specification */ -/* only). */ -/* */ -/* Copyright 2002-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /*************************************************************************/ - /* */ - /* This file is used to group all #includes to the ANSI C library that */ - /* FreeType normally requires. It also defines macros to rename the */ - /* standard functions within the FreeType source code. */ - /* */ - /* Load a file which defines FTSTDLIB_H_ before this one to override it. */ - /* */ - /*************************************************************************/ - - -#ifndef FTSTDLIB_H_ -#define FTSTDLIB_H_ - - -#include <stddef.h> - -#define ft_ptrdiff_t ptrdiff_t - - - /**********************************************************************/ - /* */ - /* integer limits */ - /* */ - /* UINT_MAX and ULONG_MAX are used to automatically compute the size */ - /* of `int' and `long' in bytes at compile-time. So far, this works */ - /* for all platforms the library has been tested on. */ - /* */ - /* Note that on the extremely rare platforms that do not provide */ - /* integer types that are _exactly_ 16 and 32 bits wide (e.g. some */ - /* old Crays where `int' is 36 bits), we do not make any guarantee */ - /* about the correct behaviour of FT2 with all fonts. */ - /* */ - /* In these case, `ftconfig.h' will refuse to compile anyway with a */ - /* message like `couldn't find 32-bit type' or something similar. */ - /* */ - /**********************************************************************/ - - -#include <limits.h> - -#define FT_CHAR_BIT CHAR_BIT -#define FT_USHORT_MAX USHRT_MAX -#define FT_INT_MAX INT_MAX -#define FT_INT_MIN INT_MIN -#define FT_UINT_MAX UINT_MAX -#define FT_LONG_MIN LONG_MIN -#define FT_LONG_MAX LONG_MAX -#define FT_ULONG_MAX ULONG_MAX - - - /**********************************************************************/ - /* */ - /* character and string processing */ - /* */ - /**********************************************************************/ - - -#include <string.h> - -#define ft_memchr memchr -#define ft_memcmp memcmp -#define ft_memcpy memcpy -#define ft_memmove memmove -#define ft_memset memset -#define ft_strcat strcat -#define ft_strcmp strcmp -#define ft_strcpy strcpy -#define ft_strlen strlen -#define ft_strncmp strncmp -#define ft_strncpy strncpy -#define ft_strrchr strrchr -#define ft_strstr strstr - - - /**********************************************************************/ - /* */ - /* file handling */ - /* */ - /**********************************************************************/ - - -#include <stdio.h> - -#define FT_FILE FILE -#define ft_fclose fclose -#define ft_fopen fopen -#define ft_fread fread -#define ft_fseek fseek -#define ft_ftell ftell -#define ft_sprintf sprintf - - - /**********************************************************************/ - /* */ - /* sorting */ - /* */ - /**********************************************************************/ - - -#include <stdlib.h> - -#define ft_qsort qsort - - - /**********************************************************************/ - /* */ - /* memory allocation */ - /* */ - /**********************************************************************/ - - -#define ft_scalloc calloc -#define ft_sfree free -#define ft_smalloc malloc -#define ft_srealloc realloc - - - /**********************************************************************/ - /* */ - /* miscellaneous */ - /* */ - /**********************************************************************/ - - -#define ft_strtol strtol -#define ft_getenv getenv - - - /**********************************************************************/ - /* */ - /* execution control */ - /* */ - /**********************************************************************/ - - -#include <setjmp.h> - -#define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */ - /* jmp_buf is defined as a macro */ - /* on certain platforms */ - -#define ft_longjmp longjmp -#define ft_setjmp( b ) setjmp( *(ft_jmp_buf*) &(b) ) /* same thing here */ - - - /* the following is only used for debugging purposes, i.e., if */ - /* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined */ - -#include <stdarg.h> - - -#endif /* FTSTDLIB_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/freetype.h b/builddir/freetype-2.7.0/include/freetype/freetype.h deleted file mode 100644 index 3a50734..0000000 --- a/builddir/freetype-2.7.0/include/freetype/freetype.h +++ /dev/null @@ -1,4306 +0,0 @@ -/***************************************************************************/ -/* */ -/* freetype.h */ -/* */ -/* FreeType high-level API and common types (specification only). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FREETYPE_H_ -#define FREETYPE_H_ - - -#ifndef FT_FREETYPE_H -#error "`ft2build.h' hasn't been included yet!" -#error "Please always use macros to include FreeType header files." -#error "Example:" -#error " #include <ft2build.h>" -#error " #include FT_FREETYPE_H" -#endif - - -#include <ft2build.h> -#include FT_CONFIG_CONFIG_H -#include FT_TYPES_H -#include FT_ERRORS_H - - -FT_BEGIN_HEADER - - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* header_inclusion */ - /* */ - /* <Title> */ - /* FreeType's header inclusion scheme */ - /* */ - /* <Abstract> */ - /* How client applications should include FreeType header files. */ - /* */ - /* <Description> */ - /* To be as flexible as possible (and for historical reasons), */ - /* FreeType uses a very special inclusion scheme to load header */ - /* files, for example */ - /* */ - /* { */ - /* #include <ft2build.h> */ - /* */ - /* #include FT_FREETYPE_H */ - /* #include FT_OUTLINE_H */ - /* } */ - /* */ - /* A compiler and its preprocessor only needs an include path to find */ - /* the file `ft2build.h'; the exact locations and names of the other */ - /* FreeType header files are hidden by preprocessor macro names, */ - /* loaded by `ft2build.h'. The API documentation always gives the */ - /* header macro name needed for a particular function. */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* user_allocation */ - /* */ - /* <Title> */ - /* User allocation */ - /* */ - /* <Abstract> */ - /* How client applications should allocate FreeType data structures. */ - /* */ - /* <Description> */ - /* FreeType assumes that structures allocated by the user and passed */ - /* as arguments are zeroed out except for the actual data. In other */ - /* words, it is recommended to use `calloc' (or variants of it) */ - /* instead of `malloc' for allocation. */ - /* */ - /*************************************************************************/ - - - - /*************************************************************************/ - /*************************************************************************/ - /* */ - /* B A S I C T Y P E S */ - /* */ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* base_interface */ - /* */ - /* <Title> */ - /* Base Interface */ - /* */ - /* <Abstract> */ - /* The FreeType~2 base font interface. */ - /* */ - /* <Description> */ - /* This section describes the most important public high-level API */ - /* functions of FreeType~2. */ - /* */ - /* <Order> */ - /* FT_Library */ - /* FT_Face */ - /* FT_Size */ - /* FT_GlyphSlot */ - /* FT_CharMap */ - /* FT_Encoding */ - /* FT_ENC_TAG */ - /* */ - /* FT_FaceRec */ - /* */ - /* FT_FACE_FLAG_SCALABLE */ - /* FT_FACE_FLAG_FIXED_SIZES */ - /* FT_FACE_FLAG_FIXED_WIDTH */ - /* FT_FACE_FLAG_HORIZONTAL */ - /* FT_FACE_FLAG_VERTICAL */ - /* FT_FACE_FLAG_COLOR */ - /* FT_FACE_FLAG_SFNT */ - /* FT_FACE_FLAG_CID_KEYED */ - /* FT_FACE_FLAG_TRICKY */ - /* FT_FACE_FLAG_KERNING */ - /* FT_FACE_FLAG_MULTIPLE_MASTERS */ - /* FT_FACE_FLAG_GLYPH_NAMES */ - /* FT_FACE_FLAG_EXTERNAL_STREAM */ - /* FT_FACE_FLAG_HINTER */ - /* */ - /* FT_HAS_HORIZONTAL */ - /* FT_HAS_VERTICAL */ - /* FT_HAS_KERNING */ - /* FT_HAS_FIXED_SIZES */ - /* FT_HAS_GLYPH_NAMES */ - /* FT_HAS_MULTIPLE_MASTERS */ - /* FT_HAS_COLOR */ - /* */ - /* FT_IS_SFNT */ - /* FT_IS_SCALABLE */ - /* FT_IS_FIXED_WIDTH */ - /* FT_IS_CID_KEYED */ - /* FT_IS_TRICKY */ - /* */ - /* FT_STYLE_FLAG_BOLD */ - /* FT_STYLE_FLAG_ITALIC */ - /* */ - /* FT_SizeRec */ - /* FT_Size_Metrics */ - /* */ - /* FT_GlyphSlotRec */ - /* FT_Glyph_Metrics */ - /* FT_SubGlyph */ - /* */ - /* FT_Bitmap_Size */ - /* */ - /* FT_Init_FreeType */ - /* FT_Done_FreeType */ - /* */ - /* FT_New_Face */ - /* FT_Done_Face */ - /* FT_Reference_Face */ - /* FT_New_Memory_Face */ - /* FT_Open_Face */ - /* FT_Open_Args */ - /* FT_Parameter */ - /* FT_Attach_File */ - /* FT_Attach_Stream */ - /* */ - /* FT_Set_Char_Size */ - /* FT_Set_Pixel_Sizes */ - /* FT_Request_Size */ - /* FT_Select_Size */ - /* FT_Size_Request_Type */ - /* FT_Size_RequestRec */ - /* FT_Size_Request */ - /* FT_Set_Transform */ - /* FT_Load_Glyph */ - /* FT_Get_Char_Index */ - /* FT_Get_First_Char */ - /* FT_Get_Next_Char */ - /* FT_Get_Name_Index */ - /* FT_Load_Char */ - /* */ - /* FT_OPEN_MEMORY */ - /* FT_OPEN_STREAM */ - /* FT_OPEN_PATHNAME */ - /* FT_OPEN_DRIVER */ - /* FT_OPEN_PARAMS */ - /* */ - /* FT_LOAD_DEFAULT */ - /* FT_LOAD_RENDER */ - /* FT_LOAD_MONOCHROME */ - /* FT_LOAD_LINEAR_DESIGN */ - /* FT_LOAD_NO_SCALE */ - /* FT_LOAD_NO_HINTING */ - /* FT_LOAD_NO_BITMAP */ - /* FT_LOAD_NO_AUTOHINT */ - /* FT_LOAD_COLOR */ - /* */ - /* FT_LOAD_VERTICAL_LAYOUT */ - /* FT_LOAD_IGNORE_TRANSFORM */ - /* FT_LOAD_FORCE_AUTOHINT */ - /* FT_LOAD_NO_RECURSE */ - /* FT_LOAD_PEDANTIC */ - /* */ - /* FT_LOAD_TARGET_NORMAL */ - /* FT_LOAD_TARGET_LIGHT */ - /* FT_LOAD_TARGET_MONO */ - /* FT_LOAD_TARGET_LCD */ - /* FT_LOAD_TARGET_LCD_V */ - /* */ - /* FT_LOAD_TARGET_MODE */ - /* */ - /* FT_Render_Glyph */ - /* FT_Render_Mode */ - /* FT_Get_Kerning */ - /* FT_Kerning_Mode */ - /* FT_Get_Track_Kerning */ - /* FT_Get_Glyph_Name */ - /* FT_Get_Postscript_Name */ - /* */ - /* FT_CharMapRec */ - /* FT_Select_Charmap */ - /* FT_Set_Charmap */ - /* FT_Get_Charmap_Index */ - /* */ - /* FT_Get_FSType_Flags */ - /* FT_Get_SubGlyph_Info */ - /* */ - /* FT_Face_Internal */ - /* FT_Size_Internal */ - /* FT_Slot_Internal */ - /* */ - /* FT_FACE_FLAG_XXX */ - /* FT_STYLE_FLAG_XXX */ - /* FT_OPEN_XXX */ - /* FT_LOAD_XXX */ - /* FT_LOAD_TARGET_XXX */ - /* FT_SUBGLYPH_FLAG_XXX */ - /* FT_FSTYPE_XXX */ - /* */ - /* FT_HAS_FAST_GLYPHS */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Glyph_Metrics */ - /* */ - /* <Description> */ - /* A structure used to model the metrics of a single glyph. The */ - /* values are expressed in 26.6 fractional pixel format; if the flag */ - /* @FT_LOAD_NO_SCALE has been used while loading the glyph, values */ - /* are expressed in font units instead. */ - /* */ - /* <Fields> */ - /* width :: */ - /* The glyph's width. */ - /* */ - /* height :: */ - /* The glyph's height. */ - /* */ - /* horiBearingX :: */ - /* Left side bearing for horizontal layout. */ - /* */ - /* horiBearingY :: */ - /* Top side bearing for horizontal layout. */ - /* */ - /* horiAdvance :: */ - /* Advance width for horizontal layout. */ - /* */ - /* vertBearingX :: */ - /* Left side bearing for vertical layout. */ - /* */ - /* vertBearingY :: */ - /* Top side bearing for vertical layout. Larger positive values */ - /* mean further below the vertical glyph origin. */ - /* */ - /* vertAdvance :: */ - /* Advance height for vertical layout. Positive values mean the */ - /* glyph has a positive advance downward. */ - /* */ - /* <Note> */ - /* If not disabled with @FT_LOAD_NO_HINTING, the values represent */ - /* dimensions of the hinted glyph (in case hinting is applicable). */ - /* */ - /* Stroking a glyph with an outside border does not increase */ - /* `horiAdvance' or `vertAdvance'; you have to manually adjust these */ - /* values to account for the added width and height. */ - /* */ - typedef struct FT_Glyph_Metrics_ - { - FT_Pos width; - FT_Pos height; - - FT_Pos horiBearingX; - FT_Pos horiBearingY; - FT_Pos horiAdvance; - - FT_Pos vertBearingX; - FT_Pos vertBearingY; - FT_Pos vertAdvance; - - } FT_Glyph_Metrics; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Bitmap_Size */ - /* */ - /* <Description> */ - /* This structure models the metrics of a bitmap strike (i.e., a set */ - /* of glyphs for a given point size and resolution) in a bitmap font. */ - /* It is used for the `available_sizes' field of @FT_Face. */ - /* */ - /* <Fields> */ - /* height :: The vertical distance, in pixels, between two */ - /* consecutive baselines. It is always positive. */ - /* */ - /* width :: The average width, in pixels, of all glyphs in the */ - /* strike. */ - /* */ - /* size :: The nominal size of the strike in 26.6 fractional */ - /* points. This field is not very useful. */ - /* */ - /* x_ppem :: The horizontal ppem (nominal width) in 26.6 fractional */ - /* pixels. */ - /* */ - /* y_ppem :: The vertical ppem (nominal height) in 26.6 fractional */ - /* pixels. */ - /* */ - /* <Note> */ - /* Windows FNT: */ - /* The nominal size given in a FNT font is not reliable. Thus when */ - /* the driver finds it incorrect, it sets `size' to some calculated */ - /* values and sets `x_ppem' and `y_ppem' to the pixel width and */ - /* height given in the font, respectively. */ - /* */ - /* TrueType embedded bitmaps: */ - /* `size', `width', and `height' values are not contained in the */ - /* bitmap strike itself. They are computed from the global font */ - /* parameters. */ - /* */ - typedef struct FT_Bitmap_Size_ - { - FT_Short height; - FT_Short width; - - FT_Pos size; - - FT_Pos x_ppem; - FT_Pos y_ppem; - - } FT_Bitmap_Size; - - - /*************************************************************************/ - /*************************************************************************/ - /* */ - /* O B J E C T C L A S S E S */ - /* */ - /*************************************************************************/ - /*************************************************************************/ - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Library */ - /* */ - /* <Description> */ - /* A handle to a FreeType library instance. Each `library' is */ - /* completely independent from the others; it is the `root' of a set */ - /* of objects like fonts, faces, sizes, etc. */ - /* */ - /* It also embeds a memory manager (see @FT_Memory), as well as a */ - /* scan-line converter object (see @FT_Raster). */ - /* */ - /* In multi-threaded applications it is easiest to use one */ - /* `FT_Library' object per thread. In case this is too cumbersome, */ - /* a single `FT_Library' object across threads is possible also */ - /* (since FreeType version 2.5.6), as long as a mutex lock is used */ - /* around @FT_New_Face and @FT_Done_Face. */ - /* */ - /* <Note> */ - /* Library objects are normally created by @FT_Init_FreeType, and */ - /* destroyed with @FT_Done_FreeType. If you need reference-counting */ - /* (cf. @FT_Reference_Library), use @FT_New_Library and */ - /* @FT_Done_Library. */ - /* */ - typedef struct FT_LibraryRec_ *FT_Library; - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* module_management */ - /* */ - /*************************************************************************/ - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Module */ - /* */ - /* <Description> */ - /* A handle to a given FreeType module object. Each module can be a */ - /* font driver, a renderer, or anything else that provides services */ - /* to the formers. */ - /* */ - typedef struct FT_ModuleRec_* FT_Module; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Driver */ - /* */ - /* <Description> */ - /* A handle to a given FreeType font driver object. Each font driver */ - /* is a special module capable of creating faces from font files. */ - /* */ - typedef struct FT_DriverRec_* FT_Driver; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Renderer */ - /* */ - /* <Description> */ - /* A handle to a given FreeType renderer. A renderer is a special */ - /* module in charge of converting a glyph image to a bitmap, when */ - /* necessary. Each renderer supports a given glyph image format, and */ - /* one or more target surface depths. */ - /* */ - typedef struct FT_RendererRec_* FT_Renderer; - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* base_interface */ - /* */ - /*************************************************************************/ - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Face */ - /* */ - /* <Description> */ - /* A handle to a given typographic face object. A face object models */ - /* a given typeface, in a given style. */ - /* */ - /* <Note> */ - /* Each face object also owns a single @FT_GlyphSlot object, as well */ - /* as one or more @FT_Size objects. */ - /* */ - /* Use @FT_New_Face or @FT_Open_Face to create a new face object from */ - /* a given filepathname or a custom input stream. */ - /* */ - /* Use @FT_Done_Face to destroy it (along with its slot and sizes). */ - /* */ - /* An `FT_Face' object can only be safely used from one thread at a */ - /* time. Similarly, creation and destruction of `FT_Face' with the */ - /* same @FT_Library object can only be done from one thread at a */ - /* time. On the other hand, functions like @FT_Load_Glyph and its */ - /* siblings are thread-safe and do not need the lock to be held as */ - /* long as the same `FT_Face' object is not used from multiple */ - /* threads at the same time. */ - /* */ - /* <Also> */ - /* See @FT_FaceRec for the publicly accessible fields of a given face */ - /* object. */ - /* */ - typedef struct FT_FaceRec_* FT_Face; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Size */ - /* */ - /* <Description> */ - /* A handle to an object used to model a face scaled to a given */ - /* character size. */ - /* */ - /* <Note> */ - /* Each @FT_Face has an _active_ @FT_Size object that is used by */ - /* functions like @FT_Load_Glyph to determine the scaling */ - /* transformation that in turn is used to load and hint glyphs and */ - /* metrics. */ - /* */ - /* You can use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes, */ - /* @FT_Request_Size or even @FT_Select_Size to change the content */ - /* (i.e., the scaling values) of the active @FT_Size. */ - /* */ - /* You can use @FT_New_Size to create additional size objects for a */ - /* given @FT_Face, but they won't be used by other functions until */ - /* you activate it through @FT_Activate_Size. Only one size can be */ - /* activated at any given time per face. */ - /* */ - /* <Also> */ - /* See @FT_SizeRec for the publicly accessible fields of a given size */ - /* object. */ - /* */ - typedef struct FT_SizeRec_* FT_Size; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_GlyphSlot */ - /* */ - /* <Description> */ - /* A handle to a given `glyph slot'. A slot is a container where it */ - /* is possible to load any of the glyphs contained in its parent */ - /* face. */ - /* */ - /* In other words, each time you call @FT_Load_Glyph or */ - /* @FT_Load_Char, the slot's content is erased by the new glyph data, */ - /* i.e., the glyph's metrics, its image (bitmap or outline), and */ - /* other control information. */ - /* */ - /* <Also> */ - /* See @FT_GlyphSlotRec for the publicly accessible glyph fields. */ - /* */ - typedef struct FT_GlyphSlotRec_* FT_GlyphSlot; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_CharMap */ - /* */ - /* <Description> */ - /* A handle to a given character map. A charmap is used to translate */ - /* character codes in a given encoding into glyph indexes for its */ - /* parent's face. Some font formats may provide several charmaps per */ - /* font. */ - /* */ - /* Each face object owns zero or more charmaps, but only one of them */ - /* can be `active' and used by @FT_Get_Char_Index or @FT_Load_Char. */ - /* */ - /* The list of available charmaps in a face is available through the */ - /* `face->num_charmaps' and `face->charmaps' fields of @FT_FaceRec. */ - /* */ - /* The currently active charmap is available as `face->charmap'. */ - /* You should call @FT_Set_Charmap to change it. */ - /* */ - /* <Note> */ - /* When a new face is created (either through @FT_New_Face or */ - /* @FT_Open_Face), the library looks for a Unicode charmap within */ - /* the list and automatically activates it. */ - /* */ - /* <Also> */ - /* See @FT_CharMapRec for the publicly accessible fields of a given */ - /* character map. */ - /* */ - typedef struct FT_CharMapRec_* FT_CharMap; - - - /*************************************************************************/ - /* */ - /* <Macro> */ - /* FT_ENC_TAG */ - /* */ - /* <Description> */ - /* This macro converts four-letter tags into an unsigned long. It is */ - /* used to define `encoding' identifiers (see @FT_Encoding). */ - /* */ - /* <Note> */ - /* Since many 16-bit compilers don't like 32-bit enumerations, you */ - /* should redefine this macro in case of problems to something like */ - /* this: */ - /* */ - /* { */ - /* #define FT_ENC_TAG( value, a, b, c, d ) value */ - /* } */ - /* */ - /* to get a simple enumeration without assigning special numbers. */ - /* */ - -#ifndef FT_ENC_TAG -#define FT_ENC_TAG( value, a, b, c, d ) \ - value = ( ( (FT_UInt32)(a) << 24 ) | \ - ( (FT_UInt32)(b) << 16 ) | \ - ( (FT_UInt32)(c) << 8 ) | \ - (FT_UInt32)(d) ) - -#endif /* FT_ENC_TAG */ - - - /*************************************************************************/ - /* */ - /* <Enum> */ - /* FT_Encoding */ - /* */ - /* <Description> */ - /* An enumeration used to specify character sets supported by */ - /* charmaps. Used in the @FT_Select_Charmap API function. */ - /* */ - /* <Note> */ - /* Despite the name, this enumeration lists specific character */ - /* repertories (i.e., charsets), and not text encoding methods (e.g., */ - /* UTF-8, UTF-16, etc.). */ - /* */ - /* Other encodings might be defined in the future. */ - /* */ - /* <Values> */ - /* FT_ENCODING_NONE :: */ - /* The encoding value~0 is reserved. */ - /* */ - /* FT_ENCODING_UNICODE :: */ - /* Corresponds to the Unicode character set. This value covers */ - /* all versions of the Unicode repertoire, including ASCII and */ - /* Latin-1. Most fonts include a Unicode charmap, but not all */ - /* of them. */ - /* */ - /* For example, if you want to access Unicode value U+1F028 (and */ - /* the font contains it), use value 0x1F028 as the input value for */ - /* @FT_Get_Char_Index. */ - /* */ - /* FT_ENCODING_MS_SYMBOL :: */ - /* Corresponds to the Microsoft Symbol encoding, used to encode */ - /* mathematical symbols and wingdings. For more information, see */ - /* `http://www.microsoft.com/typography/otspec/recom.htm', */ - /* `http://www.kostis.net/charsets/symbol.htm', and */ - /* `http://www.kostis.net/charsets/wingding.htm'. */ - /* */ - /* This encoding uses character codes from the PUA (Private Unicode */ - /* Area) in the range U+F020-U+F0FF. */ - /* */ - /* FT_ENCODING_SJIS :: */ - /* Corresponds to Japanese SJIS encoding. More info at */ - /* `http://en.wikipedia.org/wiki/Shift_JIS'. */ - /* See note on multi-byte encodings below. */ - /* */ - /* FT_ENCODING_GB2312 :: */ - /* Corresponds to an encoding system for Simplified Chinese as */ - /* used in mainland China. */ - /* */ - /* FT_ENCODING_BIG5 :: */ - /* Corresponds to an encoding system for Traditional Chinese as */ - /* used in Taiwan and Hong Kong. */ - /* */ - /* FT_ENCODING_WANSUNG :: */ - /* Corresponds to the Korean encoding system known as Wansung. */ - /* For more information see */ - /* `https://msdn.microsoft.com/en-US/goglobal/cc305154'. */ - /* */ - /* FT_ENCODING_JOHAB :: */ - /* The Korean standard character set (KS~C 5601-1992), which */ - /* corresponds to MS Windows code page 1361. This character set */ - /* includes all possible Hangeul character combinations. */ - /* */ - /* FT_ENCODING_ADOBE_LATIN_1 :: */ - /* Corresponds to a Latin-1 encoding as defined in a Type~1 */ - /* PostScript font. It is limited to 256 character codes. */ - /* */ - /* FT_ENCODING_ADOBE_STANDARD :: */ - /* Corresponds to the Adobe Standard encoding, as found in Type~1, */ - /* CFF, and OpenType/CFF fonts. It is limited to 256 character */ - /* codes. */ - /* */ - /* FT_ENCODING_ADOBE_EXPERT :: */ - /* Corresponds to the Adobe Expert encoding, as found in Type~1, */ - /* CFF, and OpenType/CFF fonts. It is limited to 256 character */ - /* codes. */ - /* */ - /* FT_ENCODING_ADOBE_CUSTOM :: */ - /* Corresponds to a custom encoding, as found in Type~1, CFF, and */ - /* OpenType/CFF fonts. It is limited to 256 character codes. */ - /* */ - /* FT_ENCODING_APPLE_ROMAN :: */ - /* Corresponds to the 8-bit Apple roman encoding. Many TrueType */ - /* and OpenType fonts contain a charmap for this encoding, since */ - /* older versions of Mac OS are able to use it. */ - /* */ - /* FT_ENCODING_OLD_LATIN_2 :: */ - /* This value is deprecated and was never used nor reported by */ - /* FreeType. Don't use or test for it. */ - /* */ - /* FT_ENCODING_MS_SJIS :: */ - /* Same as FT_ENCODING_SJIS. Deprecated. */ - /* */ - /* FT_ENCODING_MS_GB2312 :: */ - /* Same as FT_ENCODING_GB2312. Deprecated. */ - /* */ - /* FT_ENCODING_MS_BIG5 :: */ - /* Same as FT_ENCODING_BIG5. Deprecated. */ - /* */ - /* FT_ENCODING_MS_WANSUNG :: */ - /* Same as FT_ENCODING_WANSUNG. Deprecated. */ - /* */ - /* FT_ENCODING_MS_JOHAB :: */ - /* Same as FT_ENCODING_JOHAB. Deprecated. */ - /* */ - /* <Note> */ - /* By default, FreeType automatically synthesizes a Unicode charmap */ - /* for PostScript fonts, using their glyph names dictionaries. */ - /* However, it also reports the encodings defined explicitly in the */ - /* font file, for the cases when they are needed, with the Adobe */ - /* values as well. */ - /* */ - /* FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap */ - /* is neither Unicode nor ISO-8859-1 (otherwise it is set to */ - /* FT_ENCODING_UNICODE). Use @FT_Get_BDF_Charset_ID to find out */ - /* which encoding is really present. If, for example, the */ - /* `cs_registry' field is `KOI8' and the `cs_encoding' field is `R', */ - /* the font is encoded in KOI8-R. */ - /* */ - /* FT_ENCODING_NONE is always set (with a single exception) by the */ - /* winfonts driver. Use @FT_Get_WinFNT_Header and examine the */ - /* `charset' field of the @FT_WinFNT_HeaderRec structure to find out */ - /* which encoding is really present. For example, */ - /* @FT_WinFNT_ID_CP1251 (204) means Windows code page 1251 (for */ - /* Russian). */ - /* */ - /* FT_ENCODING_NONE is set if `platform_id' is @TT_PLATFORM_MACINTOSH */ - /* and `encoding_id' is not @TT_MAC_ID_ROMAN (otherwise it is set to */ - /* FT_ENCODING_APPLE_ROMAN). */ - /* */ - /* If `platform_id' is @TT_PLATFORM_MACINTOSH, use the function */ - /* @FT_Get_CMap_Language_ID to query the Mac language ID that may */ - /* be needed to be able to distinguish Apple encoding variants. See */ - /* */ - /* http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt */ - /* */ - /* to get an idea how to do that. Basically, if the language ID */ - /* is~0, don't use it, otherwise subtract 1 from the language ID. */ - /* Then examine `encoding_id'. If, for example, `encoding_id' is */ - /* @TT_MAC_ID_ROMAN and the language ID (minus~1) is */ - /* `TT_MAC_LANGID_GREEK', it is the Greek encoding, not Roman. */ - /* @TT_MAC_ID_ARABIC with `TT_MAC_LANGID_FARSI' means the Farsi */ - /* variant the Arabic encoding. */ - /* */ - typedef enum FT_Encoding_ - { - FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ), - - FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ), - FT_ENC_TAG( FT_ENCODING_UNICODE, 'u', 'n', 'i', 'c' ), - - FT_ENC_TAG( FT_ENCODING_SJIS, 's', 'j', 'i', 's' ), - FT_ENC_TAG( FT_ENCODING_GB2312, 'g', 'b', ' ', ' ' ), - FT_ENC_TAG( FT_ENCODING_BIG5, 'b', 'i', 'g', '5' ), - FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ), - FT_ENC_TAG( FT_ENCODING_JOHAB, 'j', 'o', 'h', 'a' ), - - /* for backwards compatibility */ - FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS, - FT_ENCODING_MS_GB2312 = FT_ENCODING_GB2312, - FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5, - FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG, - FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB, - - FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ), - FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT, 'A', 'D', 'B', 'E' ), - FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM, 'A', 'D', 'B', 'C' ), - FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1, 'l', 'a', 't', '1' ), - - FT_ENC_TAG( FT_ENCODING_OLD_LATIN_2, 'l', 'a', 't', '2' ), - - FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' ) - - } FT_Encoding; - - - /* these constants are deprecated; use the corresponding `FT_Encoding' */ - /* values instead */ -#define ft_encoding_none FT_ENCODING_NONE -#define ft_encoding_unicode FT_ENCODING_UNICODE -#define ft_encoding_symbol FT_ENCODING_MS_SYMBOL -#define ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1 -#define ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2 -#define ft_encoding_sjis FT_ENCODING_SJIS -#define ft_encoding_gb2312 FT_ENCODING_GB2312 -#define ft_encoding_big5 FT_ENCODING_BIG5 -#define ft_encoding_wansung FT_ENCODING_WANSUNG -#define ft_encoding_johab FT_ENCODING_JOHAB - -#define ft_encoding_adobe_standard FT_ENCODING_ADOBE_STANDARD -#define ft_encoding_adobe_expert FT_ENCODING_ADOBE_EXPERT -#define ft_encoding_adobe_custom FT_ENCODING_ADOBE_CUSTOM -#define ft_encoding_apple_roman FT_ENCODING_APPLE_ROMAN - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_CharMapRec */ - /* */ - /* <Description> */ - /* The base charmap structure. */ - /* */ - /* <Fields> */ - /* face :: A handle to the parent face object. */ - /* */ - /* encoding :: An @FT_Encoding tag identifying the charmap. Use */ - /* this with @FT_Select_Charmap. */ - /* */ - /* platform_id :: An ID number describing the platform for the */ - /* following encoding ID. This comes directly from */ - /* the TrueType specification and should be emulated */ - /* for other formats. */ - /* */ - /* encoding_id :: A platform specific encoding number. This also */ - /* comes from the TrueType specification and should be */ - /* emulated similarly. */ - /* */ - typedef struct FT_CharMapRec_ - { - FT_Face face; - FT_Encoding encoding; - FT_UShort platform_id; - FT_UShort encoding_id; - - } FT_CharMapRec; - - - /*************************************************************************/ - /*************************************************************************/ - /* */ - /* B A S E O B J E C T C L A S S E S */ - /* */ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Face_Internal */ - /* */ - /* <Description> */ - /* An opaque handle to an `FT_Face_InternalRec' structure, used to */ - /* model private data of a given @FT_Face object. */ - /* */ - /* This structure might change between releases of FreeType~2 and is */ - /* not generally available to client applications. */ - /* */ - typedef struct FT_Face_InternalRec_* FT_Face_Internal; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_FaceRec */ - /* */ - /* <Description> */ - /* FreeType root face class structure. A face object models a */ - /* typeface in a font file. */ - /* */ - /* <Fields> */ - /* num_faces :: The number of faces in the font file. Some */ - /* font formats can have multiple faces in */ - /* a font file. */ - /* */ - /* face_index :: This field holds two different values. */ - /* Bits 0-15 are the index of the face in the */ - /* font file (starting with value~0). They */ - /* are set to~0 if there is only one face in */ - /* the font file. */ - /* */ - /* Bits 16-30 are relevant to GX variation */ - /* fonts only, holding the named instance */ - /* index for the current face index (starting */ - /* with value~1; value~0 indicates font access */ - /* without GX variation data). For non-GX */ - /* fonts, bits 16-30 are ignored. If we have */ - /* the third named instance of face~4, say, */ - /* `face_index' is set to 0x00030004. */ - /* */ - /* Bit 31 is always zero (this is, */ - /* `face_index' is always a positive value). */ - /* */ - /* face_flags :: A set of bit flags that give important */ - /* information about the face; see */ - /* @FT_FACE_FLAG_XXX for the details. */ - /* */ - /* style_flags :: The lower 16~bits contain a set of bit */ - /* flags indicating the style of the face; see */ - /* @FT_STYLE_FLAG_XXX for the details. Bits */ - /* 16-30 hold the number of named instances */ - /* available for the current face if we have a */ - /* GX variation (sub)font. Bit 31 is always */ - /* zero (this is, `style_flags' is always a */ - /* positive value). */ - /* */ - /* num_glyphs :: The number of glyphs in the face. If the */ - /* face is scalable and has sbits (see */ - /* `num_fixed_sizes'), it is set to the number */ - /* of outline glyphs. */ - /* */ - /* For CID-keyed fonts, this value gives the */ - /* highest CID used in the font. */ - /* */ - /* family_name :: The face's family name. This is an ASCII */ - /* string, usually in English, that describes */ - /* the typeface's family (like `Times New */ - /* Roman', `Bodoni', `Garamond', etc). This */ - /* is a least common denominator used to list */ - /* fonts. Some formats (TrueType & OpenType) */ - /* provide localized and Unicode versions of */ - /* this string. Applications should use the */ - /* format specific interface to access them. */ - /* Can be NULL (e.g., in fonts embedded in a */ - /* PDF file). */ - /* */ - /* In case the font doesn't provide a specific */ - /* family name entry, FreeType tries to */ - /* synthesize one, deriving it from other name */ - /* entries. */ - /* */ - /* style_name :: The face's style name. This is an ASCII */ - /* string, usually in English, that describes */ - /* the typeface's style (like `Italic', */ - /* `Bold', `Condensed', etc). Not all font */ - /* formats provide a style name, so this field */ - /* is optional, and can be set to NULL. As */ - /* for `family_name', some formats provide */ - /* localized and Unicode versions of this */ - /* string. Applications should use the format */ - /* specific interface to access them. */ - /* */ - /* num_fixed_sizes :: The number of bitmap strikes in the face. */ - /* Even if the face is scalable, there might */ - /* still be bitmap strikes, which are called */ - /* `sbits' in that case. */ - /* */ - /* available_sizes :: An array of @FT_Bitmap_Size for all bitmap */ - /* strikes in the face. It is set to NULL if */ - /* there is no bitmap strike. */ - /* */ - /* num_charmaps :: The number of charmaps in the face. */ - /* */ - /* charmaps :: An array of the charmaps of the face. */ - /* */ - /* generic :: A field reserved for client uses. See the */ - /* @FT_Generic type description. */ - /* */ - /* bbox :: The font bounding box. Coordinates are */ - /* expressed in font units (see */ - /* `units_per_EM'). The box is large enough */ - /* to contain any glyph from the font. Thus, */ - /* `bbox.yMax' can be seen as the `maximum */ - /* ascender', and `bbox.yMin' as the `minimum */ - /* descender'. Only relevant for scalable */ - /* formats. */ - /* */ - /* Note that the bounding box might be off by */ - /* (at least) one pixel for hinted fonts. See */ - /* @FT_Size_Metrics for further discussion. */ - /* */ - /* units_per_EM :: The number of font units per EM square for */ - /* this face. This is typically 2048 for */ - /* TrueType fonts, and 1000 for Type~1 fonts. */ - /* Only relevant for scalable formats. */ - /* */ - /* ascender :: The typographic ascender of the face, */ - /* expressed in font units. For font formats */ - /* not having this information, it is set to */ - /* `bbox.yMax'. Only relevant for scalable */ - /* formats. */ - /* */ - /* descender :: The typographic descender of the face, */ - /* expressed in font units. For font formats */ - /* not having this information, it is set to */ - /* `bbox.yMin'. Note that this field is */ - /* usually negative. Only relevant for */ - /* scalable formats. */ - /* */ - /* height :: This value is the vertical distance */ - /* between two consecutive baselines, */ - /* expressed in font units. It is always */ - /* positive. Only relevant for scalable */ - /* formats. */ - /* */ - /* If you want the global glyph height, use */ - /* `ascender - descender'. */ - /* */ - /* max_advance_width :: The maximum advance width, in font units, */ - /* for all glyphs in this face. This can be */ - /* used to make word wrapping computations */ - /* faster. Only relevant for scalable */ - /* formats. */ - /* */ - /* max_advance_height :: The maximum advance height, in font units, */ - /* for all glyphs in this face. This is only */ - /* relevant for vertical layouts, and is set */ - /* to `height' for fonts that do not provide */ - /* vertical metrics. Only relevant for */ - /* scalable formats. */ - /* */ - /* underline_position :: The position, in font units, of the */ - /* underline line for this face. It is the */ - /* center of the underlining stem. Only */ - /* relevant for scalable formats. */ - /* */ - /* underline_thickness :: The thickness, in font units, of the */ - /* underline for this face. Only relevant for */ - /* scalable formats. */ - /* */ - /* glyph :: The face's associated glyph slot(s). */ - /* */ - /* size :: The current active size for this face. */ - /* */ - /* charmap :: The current active charmap for this face. */ - /* */ - /* <Note> */ - /* Fields may be changed after a call to @FT_Attach_File or */ - /* @FT_Attach_Stream. */ - /* */ - typedef struct FT_FaceRec_ - { - FT_Long num_faces; - FT_Long face_index; - - FT_Long face_flags; - FT_Long style_flags; - - FT_Long num_glyphs; - - FT_String* family_name; - FT_String* style_name; - - FT_Int num_fixed_sizes; - FT_Bitmap_Size* available_sizes; - - FT_Int num_charmaps; - FT_CharMap* charmaps; - - FT_Generic generic; - - /*# The following member variables (down to `underline_thickness') */ - /*# are only relevant to scalable outlines; cf. @FT_Bitmap_Size */ - /*# for bitmap fonts. */ - FT_BBox bbox; - - FT_UShort units_per_EM; - FT_Short ascender; - FT_Short descender; - FT_Short height; - - FT_Short max_advance_width; - FT_Short max_advance_height; - - FT_Short underline_position; - FT_Short underline_thickness; - - FT_GlyphSlot glyph; - FT_Size size; - FT_CharMap charmap; - - /*@private begin */ - - FT_Driver driver; - FT_Memory memory; - FT_Stream stream; - - FT_ListRec sizes_list; - - FT_Generic autohint; /* face-specific auto-hinter data */ - void* extensions; /* unused */ - - FT_Face_Internal internal; - - /*@private end */ - - } FT_FaceRec; - - - /*************************************************************************/ - /* */ - /* <Enum> */ - /* FT_FACE_FLAG_XXX */ - /* */ - /* <Description> */ - /* A list of bit flags used in the `face_flags' field of the */ - /* @FT_FaceRec structure. They inform client applications of */ - /* properties of the corresponding face. */ - /* */ - /* <Values> */ - /* FT_FACE_FLAG_SCALABLE :: */ - /* Indicates that the face contains outline glyphs. This doesn't */ - /* prevent bitmap strikes, i.e., a face can have both this and */ - /* @FT_FACE_FLAG_FIXED_SIZES set. */ - /* */ - /* FT_FACE_FLAG_FIXED_SIZES :: */ - /* Indicates that the face contains bitmap strikes. See also the */ - /* `num_fixed_sizes' and `available_sizes' fields of @FT_FaceRec. */ - /* */ - /* FT_FACE_FLAG_FIXED_WIDTH :: */ - /* Indicates that the face contains fixed-width characters (like */ - /* Courier, Lucido, MonoType, etc.). */ - /* */ - /* FT_FACE_FLAG_SFNT :: */ - /* Indicates that the face uses the `sfnt' storage scheme. For */ - /* now, this means TrueType and OpenType. */ - /* */ - /* FT_FACE_FLAG_HORIZONTAL :: */ - /* Indicates that the face contains horizontal glyph metrics. This */ - /* should be set for all common formats. */ - /* */ - /* FT_FACE_FLAG_VERTICAL :: */ - /* Indicates that the face contains vertical glyph metrics. This */ - /* is only available in some formats, not all of them. */ - /* */ - /* FT_FACE_FLAG_KERNING :: */ - /* Indicates that the face contains kerning information. If set, */ - /* the kerning distance can be retrieved through the function */ - /* @FT_Get_Kerning. Otherwise the function always return the */ - /* vector (0,0). Note that FreeType doesn't handle kerning data */ - /* from the `GPOS' table (as present in some OpenType fonts). */ - /* */ - /* FT_FACE_FLAG_FAST_GLYPHS :: */ - /* THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT. */ - /* */ - /* FT_FACE_FLAG_MULTIPLE_MASTERS :: */ - /* Indicates that the font contains multiple masters and is capable */ - /* of interpolating between them. See the multiple-masters */ - /* specific API for details. */ - /* */ - /* FT_FACE_FLAG_GLYPH_NAMES :: */ - /* Indicates that the font contains glyph names that can be */ - /* retrieved through @FT_Get_Glyph_Name. Note that some TrueType */ - /* fonts contain broken glyph name tables. Use the function */ - /* @FT_Has_PS_Glyph_Names when needed. */ - /* */ - /* FT_FACE_FLAG_EXTERNAL_STREAM :: */ - /* Used internally by FreeType to indicate that a face's stream was */ - /* provided by the client application and should not be destroyed */ - /* when @FT_Done_Face is called. Don't read or test this flag. */ - /* */ - /* FT_FACE_FLAG_HINTER :: */ - /* Set if the font driver has a hinting machine of its own. For */ - /* example, with TrueType fonts, it makes sense to use data from */ - /* the SFNT `gasp' table only if the native TrueType hinting engine */ - /* (with the bytecode interpreter) is available and active. */ - /* */ - /* FT_FACE_FLAG_CID_KEYED :: */ - /* Set if the font is CID-keyed. In that case, the font is not */ - /* accessed by glyph indices but by CID values. For subsetted */ - /* CID-keyed fonts this has the consequence that not all index */ - /* values are a valid argument to FT_Load_Glyph. Only the CID */ - /* values for which corresponding glyphs in the subsetted font */ - /* exist make FT_Load_Glyph return successfully; in all other cases */ - /* you get an `FT_Err_Invalid_Argument' error. */ - /* */ - /* Note that CID-keyed fonts that are in an SFNT wrapper don't */ - /* have this flag set since the glyphs are accessed in the normal */ - /* way (using contiguous indices); the `CID-ness' isn't visible to */ - /* the application. */ - /* */ - /* FT_FACE_FLAG_TRICKY :: */ - /* Set if the font is `tricky', this is, it always needs the */ - /* font format's native hinting engine to get a reasonable result. */ - /* A typical example is the Chinese font `mingli.ttf' that uses */ - /* TrueType bytecode instructions to move and scale all of its */ - /* subglyphs. */ - /* */ - /* It is not possible to auto-hint such fonts using */ - /* @FT_LOAD_FORCE_AUTOHINT; it will also ignore */ - /* @FT_LOAD_NO_HINTING. You have to set both @FT_LOAD_NO_HINTING */ - /* and @FT_LOAD_NO_AUTOHINT to really disable hinting; however, you */ - /* probably never want this except for demonstration purposes. */ - /* */ - /* Currently, there are about a dozen TrueType fonts in the list of */ - /* tricky fonts; they are hard-coded in file `ttobjs.c'. */ - /* */ - /* FT_FACE_FLAG_COLOR :: */ - /* Set if the font has color glyph tables. To access color glyphs */ - /* use @FT_LOAD_COLOR. */ - /* */ -#define FT_FACE_FLAG_SCALABLE ( 1L << 0 ) -#define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 ) -#define FT_FACE_FLAG_FIXED_WIDTH ( 1L << 2 ) -#define FT_FACE_FLAG_SFNT ( 1L << 3 ) -#define FT_FACE_FLAG_HORIZONTAL ( 1L << 4 ) -#define FT_FACE_FLAG_VERTICAL ( 1L << 5 ) -#define FT_FACE_FLAG_KERNING ( 1L << 6 ) -#define FT_FACE_FLAG_FAST_GLYPHS ( 1L << 7 ) -#define FT_FACE_FLAG_MULTIPLE_MASTERS ( 1L << 8 ) -#define FT_FACE_FLAG_GLYPH_NAMES ( 1L << 9 ) -#define FT_FACE_FLAG_EXTERNAL_STREAM ( 1L << 10 ) -#define FT_FACE_FLAG_HINTER ( 1L << 11 ) -#define FT_FACE_FLAG_CID_KEYED ( 1L << 12 ) -#define FT_FACE_FLAG_TRICKY ( 1L << 13 ) -#define FT_FACE_FLAG_COLOR ( 1L << 14 ) - - - /************************************************************************* - * - * @macro: - * FT_HAS_HORIZONTAL( face ) - * - * @description: - * A macro that returns true whenever a face object contains - * horizontal metrics (this is true for all font formats though). - * - * @also: - * @FT_HAS_VERTICAL can be used to check for vertical metrics. - * - */ -#define FT_HAS_HORIZONTAL( face ) \ - ( (face)->face_flags & FT_FACE_FLAG_HORIZONTAL ) - - - /************************************************************************* - * - * @macro: - * FT_HAS_VERTICAL( face ) - * - * @description: - * A macro that returns true whenever a face object contains real - * vertical metrics (and not only synthesized ones). - * - */ -#define FT_HAS_VERTICAL( face ) \ - ( (face)->face_flags & FT_FACE_FLAG_VERTICAL ) - - - /************************************************************************* - * - * @macro: - * FT_HAS_KERNING( face ) - * - * @description: - * A macro that returns true whenever a face object contains kerning - * data that can be accessed with @FT_Get_Kerning. - * - */ -#define FT_HAS_KERNING( face ) \ - ( (face)->face_flags & FT_FACE_FLAG_KERNING ) - - - /************************************************************************* - * - * @macro: - * FT_IS_SCALABLE( face ) - * - * @description: - * A macro that returns true whenever a face object contains a scalable - * font face (true for TrueType, Type~1, Type~42, CID, OpenType/CFF, - * and PFR font formats. - * - */ -#define FT_IS_SCALABLE( face ) \ - ( (face)->face_flags & FT_FACE_FLAG_SCALABLE ) - - - /************************************************************************* - * - * @macro: - * FT_IS_SFNT( face ) - * - * @description: - * A macro that returns true whenever a face object contains a font - * whose format is based on the SFNT storage scheme. This usually - * means: TrueType fonts, OpenType fonts, as well as SFNT-based embedded - * bitmap fonts. - * - * If this macro is true, all functions defined in @FT_SFNT_NAMES_H and - * @FT_TRUETYPE_TABLES_H are available. - * - */ -#define FT_IS_SFNT( face ) \ - ( (face)->face_flags & FT_FACE_FLAG_SFNT ) - - - /************************************************************************* - * - * @macro: - * FT_IS_FIXED_WIDTH( face ) - * - * @description: - * A macro that returns true whenever a face object contains a font face - * that contains fixed-width (or `monospace', `fixed-pitch', etc.) - * glyphs. - * - */ -#define FT_IS_FIXED_WIDTH( face ) \ - ( (face)->face_flags & FT_FACE_FLAG_FIXED_WIDTH ) - - - /************************************************************************* - * - * @macro: - * FT_HAS_FIXED_SIZES( face ) - * - * @description: - * A macro that returns true whenever a face object contains some - * embedded bitmaps. See the `available_sizes' field of the - * @FT_FaceRec structure. - * - */ -#define FT_HAS_FIXED_SIZES( face ) \ - ( (face)->face_flags & FT_FACE_FLAG_FIXED_SIZES ) - - - /************************************************************************* - * - * @macro: - * FT_HAS_FAST_GLYPHS( face ) - * - * @description: - * Deprecated. - * - */ -#define FT_HAS_FAST_GLYPHS( face ) 0 - - - /************************************************************************* - * - * @macro: - * FT_HAS_GLYPH_NAMES( face ) - * - * @description: - * A macro that returns true whenever a face object contains some glyph - * names that can be accessed through @FT_Get_Glyph_Name. - * - */ -#define FT_HAS_GLYPH_NAMES( face ) \ - ( (face)->face_flags & FT_FACE_FLAG_GLYPH_NAMES ) - - - /************************************************************************* - * - * @macro: - * FT_HAS_MULTIPLE_MASTERS( face ) - * - * @description: - * A macro that returns true whenever a face object contains some - * multiple masters. The functions provided by @FT_MULTIPLE_MASTERS_H - * are then available to choose the exact design you want. - * - */ -#define FT_HAS_MULTIPLE_MASTERS( face ) \ - ( (face)->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS ) - - - /************************************************************************* - * - * @macro: - * FT_IS_NAMED_INSTANCE( face ) - * - * @description: - * A macro that returns true whenever a face object is a named instance - * of a GX variation font. - * - */ -#define FT_IS_NAMED_INSTANCE( face ) \ - ( (face)->face_index & 0x7FFF0000L ) - - - /************************************************************************* - * - * @macro: - * FT_IS_CID_KEYED( face ) - * - * @description: - * A macro that returns true whenever a face object contains a CID-keyed - * font. See the discussion of @FT_FACE_FLAG_CID_KEYED for more - * details. - * - * If this macro is true, all functions defined in @FT_CID_H are - * available. - * - */ -#define FT_IS_CID_KEYED( face ) \ - ( (face)->face_flags & FT_FACE_FLAG_CID_KEYED ) - - - /************************************************************************* - * - * @macro: - * FT_IS_TRICKY( face ) - * - * @description: - * A macro that returns true whenever a face represents a `tricky' font. - * See the discussion of @FT_FACE_FLAG_TRICKY for more details. - * - */ -#define FT_IS_TRICKY( face ) \ - ( (face)->face_flags & FT_FACE_FLAG_TRICKY ) - - - /************************************************************************* - * - * @macro: - * FT_HAS_COLOR( face ) - * - * @description: - * A macro that returns true whenever a face object contains - * tables for color glyphs. - * - */ -#define FT_HAS_COLOR( face ) \ - ( (face)->face_flags & FT_FACE_FLAG_COLOR ) - - - /*************************************************************************/ - /* */ - /* <Const> */ - /* FT_STYLE_FLAG_XXX */ - /* */ - /* <Description> */ - /* A list of bit flags used to indicate the style of a given face. */ - /* These are used in the `style_flags' field of @FT_FaceRec. */ - /* */ - /* <Values> */ - /* FT_STYLE_FLAG_ITALIC :: */ - /* Indicates that a given face style is italic or oblique. */ - /* */ - /* FT_STYLE_FLAG_BOLD :: */ - /* Indicates that a given face is bold. */ - /* */ - /* <Note> */ - /* The style information as provided by FreeType is very basic. More */ - /* details are beyond the scope and should be done on a higher level */ - /* (for example, by analyzing various fields of the `OS/2' table in */ - /* SFNT based fonts). */ - /* */ -#define FT_STYLE_FLAG_ITALIC ( 1 << 0 ) -#define FT_STYLE_FLAG_BOLD ( 1 << 1 ) - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Size_Internal */ - /* */ - /* <Description> */ - /* An opaque handle to an `FT_Size_InternalRec' structure, used to */ - /* model private data of a given @FT_Size object. */ - /* */ - typedef struct FT_Size_InternalRec_* FT_Size_Internal; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Size_Metrics */ - /* */ - /* <Description> */ - /* The size metrics structure gives the metrics of a size object. */ - /* */ - /* <Fields> */ - /* x_ppem :: The width of the scaled EM square in pixels, hence */ - /* the term `ppem' (pixels per EM). It is also */ - /* referred to as `nominal width'. */ - /* */ - /* y_ppem :: The height of the scaled EM square in pixels, */ - /* hence the term `ppem' (pixels per EM). It is also */ - /* referred to as `nominal height'. */ - /* */ - /* x_scale :: A 16.16 fractional scaling value used to convert */ - /* horizontal metrics from font units to 26.6 */ - /* fractional pixels. Only relevant for scalable */ - /* font formats. */ - /* */ - /* y_scale :: A 16.16 fractional scaling value used to convert */ - /* vertical metrics from font units to 26.6 */ - /* fractional pixels. Only relevant for scalable */ - /* font formats. */ - /* */ - /* ascender :: The ascender in 26.6 fractional pixels. See */ - /* @FT_FaceRec for the details. */ - /* */ - /* descender :: The descender in 26.6 fractional pixels. See */ - /* @FT_FaceRec for the details. */ - /* */ - /* height :: The height in 26.6 fractional pixels. See */ - /* @FT_FaceRec for the details. */ - /* */ - /* max_advance :: The maximum advance width in 26.6 fractional */ - /* pixels. See @FT_FaceRec for the details. */ - /* */ - /* <Note> */ - /* The scaling values, if relevant, are determined first during a */ - /* size changing operation. The remaining fields are then set by the */ - /* driver. For scalable formats, they are usually set to scaled */ - /* values of the corresponding fields in @FT_FaceRec. */ - /* */ - /* Note that due to glyph hinting, these values might not be exact */ - /* for certain fonts. Thus they must be treated as unreliable */ - /* with an error margin of at least one pixel! */ - /* */ - /* Indeed, the only way to get the exact metrics is to render _all_ */ - /* glyphs. As this would be a definite performance hit, it is up to */ - /* client applications to perform such computations. */ - /* */ - /* The FT_Size_Metrics structure is valid for bitmap fonts also. */ - /* */ - typedef struct FT_Size_Metrics_ - { - FT_UShort x_ppem; /* horizontal pixels per EM */ - FT_UShort y_ppem; /* vertical pixels per EM */ - - FT_Fixed x_scale; /* scaling values used to convert font */ - FT_Fixed y_scale; /* units to 26.6 fractional pixels */ - - FT_Pos ascender; /* ascender in 26.6 frac. pixels */ - FT_Pos descender; /* descender in 26.6 frac. pixels */ - FT_Pos height; /* text height in 26.6 frac. pixels */ - FT_Pos max_advance; /* max horizontal advance, in 26.6 pixels */ - - } FT_Size_Metrics; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_SizeRec */ - /* */ - /* <Description> */ - /* FreeType root size class structure. A size object models a face */ - /* object at a given size. */ - /* */ - /* <Fields> */ - /* face :: Handle to the parent face object. */ - /* */ - /* generic :: A typeless pointer, unused by the FreeType library or */ - /* any of its drivers. It can be used by client */ - /* applications to link their own data to each size */ - /* object. */ - /* */ - /* metrics :: Metrics for this size object. This field is read-only. */ - /* */ - typedef struct FT_SizeRec_ - { - FT_Face face; /* parent face object */ - FT_Generic generic; /* generic pointer for client uses */ - FT_Size_Metrics metrics; /* size metrics */ - FT_Size_Internal internal; - - } FT_SizeRec; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_SubGlyph */ - /* */ - /* <Description> */ - /* The subglyph structure is an internal object used to describe */ - /* subglyphs (for example, in the case of composites). */ - /* */ - /* <Note> */ - /* The subglyph implementation is not part of the high-level API, */ - /* hence the forward structure declaration. */ - /* */ - /* You can however retrieve subglyph information with */ - /* @FT_Get_SubGlyph_Info. */ - /* */ - typedef struct FT_SubGlyphRec_* FT_SubGlyph; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Slot_Internal */ - /* */ - /* <Description> */ - /* An opaque handle to an `FT_Slot_InternalRec' structure, used to */ - /* model private data of a given @FT_GlyphSlot object. */ - /* */ - typedef struct FT_Slot_InternalRec_* FT_Slot_Internal; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_GlyphSlotRec */ - /* */ - /* <Description> */ - /* FreeType root glyph slot class structure. A glyph slot is a */ - /* container where individual glyphs can be loaded, be they in */ - /* outline or bitmap format. */ - /* */ - /* <Fields> */ - /* library :: A handle to the FreeType library instance */ - /* this slot belongs to. */ - /* */ - /* face :: A handle to the parent face object. */ - /* */ - /* next :: In some cases (like some font tools), several */ - /* glyph slots per face object can be a good */ - /* thing. As this is rare, the glyph slots are */ - /* listed through a direct, single-linked list */ - /* using its `next' field. */ - /* */ - /* generic :: A typeless pointer unused by the FreeType */ - /* library or any of its drivers. It can be */ - /* used by client applications to link their own */ - /* data to each glyph slot object. */ - /* */ - /* metrics :: The metrics of the last loaded glyph in the */ - /* slot. The returned values depend on the last */ - /* load flags (see the @FT_Load_Glyph API */ - /* function) and can be expressed either in 26.6 */ - /* fractional pixels or font units. */ - /* */ - /* Note that even when the glyph image is */ - /* transformed, the metrics are not. */ - /* */ - /* linearHoriAdvance :: The advance width of the unhinted glyph. */ - /* Its value is expressed in 16.16 fractional */ - /* pixels, unless @FT_LOAD_LINEAR_DESIGN is set */ - /* when loading the glyph. This field can be */ - /* important to perform correct WYSIWYG layout. */ - /* Only relevant for outline glyphs. */ - /* */ - /* linearVertAdvance :: The advance height of the unhinted glyph. */ - /* Its value is expressed in 16.16 fractional */ - /* pixels, unless @FT_LOAD_LINEAR_DESIGN is set */ - /* when loading the glyph. This field can be */ - /* important to perform correct WYSIWYG layout. */ - /* Only relevant for outline glyphs. */ - /* */ - /* advance :: This shorthand is, depending on */ - /* @FT_LOAD_IGNORE_TRANSFORM, the transformed */ - /* (hinted) advance width for the glyph, in 26.6 */ - /* fractional pixel format. As specified with */ - /* @FT_LOAD_VERTICAL_LAYOUT, it uses either the */ - /* `horiAdvance' or the `vertAdvance' value of */ - /* `metrics' field. */ - /* */ - /* format :: This field indicates the format of the image */ - /* contained in the glyph slot. Typically */ - /* @FT_GLYPH_FORMAT_BITMAP, */ - /* @FT_GLYPH_FORMAT_OUTLINE, or */ - /* @FT_GLYPH_FORMAT_COMPOSITE, but others are */ - /* possible. */ - /* */ - /* bitmap :: This field is used as a bitmap descriptor */ - /* when the slot format is */ - /* @FT_GLYPH_FORMAT_BITMAP. Note that the */ - /* address and content of the bitmap buffer can */ - /* change between calls of @FT_Load_Glyph and a */ - /* few other functions. */ - /* */ - /* bitmap_left :: The bitmap's left bearing expressed in */ - /* integer pixels. Only valid if the format is */ - /* @FT_GLYPH_FORMAT_BITMAP, this is, if the */ - /* glyph slot contains a bitmap. */ - /* */ - /* bitmap_top :: The bitmap's top bearing expressed in integer */ - /* pixels. Remember that this is the distance */ - /* from the baseline to the top-most glyph */ - /* scanline, upwards y~coordinates being */ - /* *positive*. */ - /* */ - /* outline :: The outline descriptor for the current glyph */ - /* image if its format is */ - /* @FT_GLYPH_FORMAT_OUTLINE. Once a glyph is */ - /* loaded, `outline' can be transformed, */ - /* distorted, embolded, etc. However, it must */ - /* not be freed. */ - /* */ - /* num_subglyphs :: The number of subglyphs in a composite glyph. */ - /* This field is only valid for the composite */ - /* glyph format that should normally only be */ - /* loaded with the @FT_LOAD_NO_RECURSE flag. */ - /* */ - /* subglyphs :: An array of subglyph descriptors for */ - /* composite glyphs. There are `num_subglyphs' */ - /* elements in there. Currently internal to */ - /* FreeType. */ - /* */ - /* control_data :: Certain font drivers can also return the */ - /* control data for a given glyph image (e.g. */ - /* TrueType bytecode, Type~1 charstrings, etc.). */ - /* This field is a pointer to such data. */ - /* */ - /* control_len :: This is the length in bytes of the control */ - /* data. */ - /* */ - /* other :: Really wicked formats can use this pointer to */ - /* present their own glyph image to client */ - /* applications. Note that the application */ - /* needs to know about the image format. */ - /* */ - /* lsb_delta :: The difference between hinted and unhinted */ - /* left side bearing while auto-hinting is */ - /* active. Zero otherwise. */ - /* */ - /* rsb_delta :: The difference between hinted and unhinted */ - /* right side bearing while auto-hinting is */ - /* active. Zero otherwise. */ - /* */ - /* <Note> */ - /* If @FT_Load_Glyph is called with default flags (see */ - /* @FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in */ - /* its native format (e.g., an outline glyph for TrueType and Type~1 */ - /* formats). */ - /* */ - /* This image can later be converted into a bitmap by calling */ - /* @FT_Render_Glyph. This function finds the current renderer for */ - /* the native image's format, then invokes it. */ - /* */ - /* The renderer is in charge of transforming the native image through */ - /* the slot's face transformation fields, then converting it into a */ - /* bitmap that is returned in `slot->bitmap'. */ - /* */ - /* Note that `slot->bitmap_left' and `slot->bitmap_top' are also used */ - /* to specify the position of the bitmap relative to the current pen */ - /* position (e.g., coordinates (0,0) on the baseline). Of course, */ - /* `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP. */ - /* */ - /* <Note> */ - /* Here is a small pseudo code fragment that shows how to use */ - /* `lsb_delta' and `rsb_delta': */ - /* */ - /* { */ - /* FT_Pos origin_x = 0; */ - /* FT_Pos prev_rsb_delta = 0; */ - /* */ - /* */ - /* for all glyphs do */ - /* <compute kern between current and previous glyph and add it to */ - /* `origin_x'> */ - /* */ - /* <load glyph with `FT_Load_Glyph'> */ - /* */ - /* if ( prev_rsb_delta - face->glyph->lsb_delta >= 32 ) */ - /* origin_x -= 64; */ - /* else if ( prev_rsb_delta - face->glyph->lsb_delta < -32 ) */ - /* origin_x += 64; */ - /* */ - /* prev_rsb_delta = face->glyph->rsb_delta; */ - /* */ - /* <save glyph image, or render glyph, or ...> */ - /* */ - /* origin_x += face->glyph->advance.x; */ - /* endfor */ - /* } */ - /* */ - typedef struct FT_GlyphSlotRec_ - { - FT_Library library; - FT_Face face; - FT_GlyphSlot next; - FT_UInt reserved; /* retained for binary compatibility */ - FT_Generic generic; - - FT_Glyph_Metrics metrics; - FT_Fixed linearHoriAdvance; - FT_Fixed linearVertAdvance; - FT_Vector advance; - - FT_Glyph_Format format; - - FT_Bitmap bitmap; - FT_Int bitmap_left; - FT_Int bitmap_top; - - FT_Outline outline; - - FT_UInt num_subglyphs; - FT_SubGlyph subglyphs; - - void* control_data; - long control_len; - - FT_Pos lsb_delta; - FT_Pos rsb_delta; - - void* other; - - FT_Slot_Internal internal; - - } FT_GlyphSlotRec; - - - /*************************************************************************/ - /*************************************************************************/ - /* */ - /* F U N C T I O N S */ - /* */ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Init_FreeType */ - /* */ - /* <Description> */ - /* Initialize a new FreeType library object. The set of modules */ - /* that are registered by this function is determined at build time. */ - /* */ - /* <Output> */ - /* alibrary :: A handle to a new library object. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* In case you want to provide your own memory allocating routines, */ - /* use @FT_New_Library instead, followed by a call to */ - /* @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module). */ - /* */ - /* See the documentation of @FT_Library and @FT_Face for */ - /* multi-threading issues. */ - /* */ - /* If you need reference-counting (cf. @FT_Reference_Library), use */ - /* @FT_New_Library and @FT_Done_Library. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Init_FreeType( FT_Library *alibrary ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Done_FreeType */ - /* */ - /* <Description> */ - /* Destroy a given FreeType library object and all of its children, */ - /* including resources, drivers, faces, sizes, etc. */ - /* */ - /* <Input> */ - /* library :: A handle to the target library object. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Done_FreeType( FT_Library library ); - - - /*************************************************************************/ - /* */ - /* <Enum> */ - /* FT_OPEN_XXX */ - /* */ - /* <Description> */ - /* A list of bit field constants used within the `flags' field of the */ - /* @FT_Open_Args structure. */ - /* */ - /* <Values> */ - /* FT_OPEN_MEMORY :: This is a memory-based stream. */ - /* */ - /* FT_OPEN_STREAM :: Copy the stream from the `stream' field. */ - /* */ - /* FT_OPEN_PATHNAME :: Create a new input stream from a C~path */ - /* name. */ - /* */ - /* FT_OPEN_DRIVER :: Use the `driver' field. */ - /* */ - /* FT_OPEN_PARAMS :: Use the `num_params' and `params' fields. */ - /* */ - /* <Note> */ - /* The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME' */ - /* flags are mutually exclusive. */ - /* */ -#define FT_OPEN_MEMORY 0x1 -#define FT_OPEN_STREAM 0x2 -#define FT_OPEN_PATHNAME 0x4 -#define FT_OPEN_DRIVER 0x8 -#define FT_OPEN_PARAMS 0x10 - - - /* these constants are deprecated; use the corresponding `FT_OPEN_XXX' */ - /* values instead */ -#define ft_open_memory FT_OPEN_MEMORY -#define ft_open_stream FT_OPEN_STREAM -#define ft_open_pathname FT_OPEN_PATHNAME -#define ft_open_driver FT_OPEN_DRIVER -#define ft_open_params FT_OPEN_PARAMS - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Parameter */ - /* */ - /* <Description> */ - /* A simple structure used to pass more or less generic parameters to */ - /* @FT_Open_Face. */ - /* */ - /* <Fields> */ - /* tag :: A four-byte identification tag. */ - /* */ - /* data :: A pointer to the parameter data. */ - /* */ - /* <Note> */ - /* The ID and function of parameters are driver-specific. See the */ - /* various FT_PARAM_TAG_XXX flags for more information. */ - /* */ - typedef struct FT_Parameter_ - { - FT_ULong tag; - FT_Pointer data; - - } FT_Parameter; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Open_Args */ - /* */ - /* <Description> */ - /* A structure used to indicate how to open a new font file or */ - /* stream. A pointer to such a structure can be used as a parameter */ - /* for the functions @FT_Open_Face and @FT_Attach_Stream. */ - /* */ - /* <Fields> */ - /* flags :: A set of bit flags indicating how to use the */ - /* structure. */ - /* */ - /* memory_base :: The first byte of the file in memory. */ - /* */ - /* memory_size :: The size in bytes of the file in memory. */ - /* */ - /* pathname :: A pointer to an 8-bit file pathname. */ - /* */ - /* stream :: A handle to a source stream object. */ - /* */ - /* driver :: This field is exclusively used by @FT_Open_Face; */ - /* it simply specifies the font driver to use to open */ - /* the face. If set to~0, FreeType tries to load the */ - /* face with each one of the drivers in its list. */ - /* */ - /* num_params :: The number of extra parameters. */ - /* */ - /* params :: Extra parameters passed to the font driver when */ - /* opening a new face. */ - /* */ - /* <Note> */ - /* The stream type is determined by the contents of `flags' that */ - /* are tested in the following order by @FT_Open_Face: */ - /* */ - /* If the @FT_OPEN_MEMORY bit is set, assume that this is a */ - /* memory file of `memory_size' bytes, located at `memory_address'. */ - /* The data are not copied, and the client is responsible for */ - /* releasing and destroying them _after_ the corresponding call to */ - /* @FT_Done_Face. */ - /* */ - /* Otherwise, if the @FT_OPEN_STREAM bit is set, assume that a */ - /* custom input stream `stream' is used. */ - /* */ - /* Otherwise, if the @FT_OPEN_PATHNAME bit is set, assume that this */ - /* is a normal file and use `pathname' to open it. */ - /* */ - /* If the @FT_OPEN_DRIVER bit is set, @FT_Open_Face only tries to */ - /* open the file with the driver whose handler is in `driver'. */ - /* */ - /* If the @FT_OPEN_PARAMS bit is set, the parameters given by */ - /* `num_params' and `params' is used. They are ignored otherwise. */ - /* */ - /* Ideally, both the `pathname' and `params' fields should be tagged */ - /* as `const'; this is missing for API backwards compatibility. In */ - /* other words, applications should treat them as read-only. */ - /* */ - typedef struct FT_Open_Args_ - { - FT_UInt flags; - const FT_Byte* memory_base; - FT_Long memory_size; - FT_String* pathname; - FT_Stream stream; - FT_Module driver; - FT_Int num_params; - FT_Parameter* params; - - } FT_Open_Args; - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_New_Face */ - /* */ - /* <Description> */ - /* This function calls @FT_Open_Face to open a font by its pathname. */ - /* */ - /* <InOut> */ - /* library :: A handle to the library resource. */ - /* */ - /* <Input> */ - /* pathname :: A path to the font file. */ - /* */ - /* face_index :: See @FT_Open_Face for a detailed description of this */ - /* parameter. */ - /* */ - /* <Output> */ - /* aface :: A handle to a new face object. If `face_index' is */ - /* greater than or equal to zero, it must be non-NULL. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* Use @FT_Done_Face to destroy the created @FT_Face object (along */ - /* with its slot and sizes). */ - /* */ - FT_EXPORT( FT_Error ) - FT_New_Face( FT_Library library, - const char* filepathname, - FT_Long face_index, - FT_Face *aface ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_New_Memory_Face */ - /* */ - /* <Description> */ - /* This function calls @FT_Open_Face to open a font that has been */ - /* loaded into memory. */ - /* */ - /* <InOut> */ - /* library :: A handle to the library resource. */ - /* */ - /* <Input> */ - /* file_base :: A pointer to the beginning of the font data. */ - /* */ - /* file_size :: The size of the memory chunk used by the font data. */ - /* */ - /* face_index :: See @FT_Open_Face for a detailed description of this */ - /* parameter. */ - /* */ - /* <Output> */ - /* aface :: A handle to a new face object. If `face_index' is */ - /* greater than or equal to zero, it must be non-NULL. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* You must not deallocate the memory before calling @FT_Done_Face. */ - /* */ - FT_EXPORT( FT_Error ) - FT_New_Memory_Face( FT_Library library, - const FT_Byte* file_base, - FT_Long file_size, - FT_Long face_index, - FT_Face *aface ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Open_Face */ - /* */ - /* <Description> */ - /* Create a face object from a given resource described by */ - /* @FT_Open_Args. */ - /* */ - /* <InOut> */ - /* library :: A handle to the library resource. */ - /* */ - /* <Input> */ - /* args :: A pointer to an `FT_Open_Args' structure that must */ - /* be filled by the caller. */ - /* */ - /* face_index :: This field holds two different values. Bits 0-15 */ - /* are the index of the face in the font file (starting */ - /* with value~0). Set it to~0 if there is only one */ - /* face in the font file. */ - /* */ - /* Bits 16-30 are relevant to GX variation fonts only, */ - /* specifying the named instance index for the current */ - /* face index (starting with value~1; value~0 makes */ - /* FreeType ignore named instances). For non-GX fonts, */ - /* bits 16-30 are ignored. Assuming that you want to */ - /* access the third named instance in face~4, */ - /* `face_index' should be set to 0x00030004. If you */ - /* want to access face~4 without GX variation handling, */ - /* simply set `face_index' to value~4. */ - /* */ - /* FT_Open_Face and its siblings can be used to quickly */ - /* check whether the font format of a given font */ - /* resource is supported by FreeType. In general, if */ - /* the `face_index' argument is negative, the */ - /* function's return value is~0 if the font format is */ - /* recognized, or non-zero otherwise. The function */ - /* allocates a more or less empty face handle in */ - /* `*aface' (if `aface' isn't NULL); the only two */ - /* useful fields in this special case are */ - /* `face->num_faces' and `face->style_flags'. For any */ - /* negative value of `face_index', `face->num_faces' */ - /* gives the number of faces within the font file. For */ - /* the negative value `-(N+1)' (with `N' a 16-bit */ - /* value), bits 16-30 in `face->style_flags' give the */ - /* number of named instances in face `N' if we have a */ - /* GX variation font (or zero otherwise). After */ - /* examination, the returned @FT_Face structure should */ - /* be deallocated with a call to @FT_Done_Face. */ - /* */ - /* <Output> */ - /* aface :: A handle to a new face object. If `face_index' is */ - /* greater than or equal to zero, it must be non-NULL. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* Unlike FreeType 1.x, this function automatically creates a glyph */ - /* slot for the face object that can be accessed directly through */ - /* `face->glyph'. */ - /* */ - /* Each new face object created with this function also owns a */ - /* default @FT_Size object, accessible as `face->size'. */ - /* */ - /* One @FT_Library instance can have multiple face objects, this is, */ - /* @FT_Open_Face and its siblings can be called multiple times using */ - /* the same `library' argument. */ - /* */ - /* See the discussion of reference counters in the description of */ - /* @FT_Reference_Face. */ - /* */ - /* To loop over all faces, use code similar to the following snippet */ - /* (omitting the error handling). */ - /* */ - /* { */ - /* ... */ - /* FT_Face face; */ - /* FT_Long i, num_faces; */ - /* */ - /* */ - /* error = FT_Open_Face( library, args, -1, &face ); */ - /* if ( error ) { ... } */ - /* */ - /* num_faces = face->num_faces; */ - /* FT_Done_Face( face ); */ - /* */ - /* for ( i = 0; i < num_faces; i++ ) */ - /* { */ - /* ... */ - /* error = FT_Open_Face( library, args, i, &face ); */ - /* ... */ - /* FT_Done_Face( face ); */ - /* ... */ - /* } */ - /* } */ - /* */ - /* To loop over all valid values for `face_index', use something */ - /* similar to the following snippet, again without error handling. */ - /* The code accesses all faces immediately (thus only a single call */ - /* of `FT_Open_Face' within the do-loop), with and without named */ - /* instances. */ - /* */ - /* { */ - /* ... */ - /* FT_Face face; */ - /* */ - /* FT_Long num_faces = 0; */ - /* FT_Long num_instances = 0; */ - /* */ - /* FT_Long face_idx = 0; */ - /* FT_Long instance_idx = 0; */ - /* */ - /* */ - /* do */ - /* { */ - /* FT_Long id = ( instance_idx << 16 ) + face_idx; */ - /* */ - /* */ - /* error = FT_Open_Face( library, args, id, &face ); */ - /* if ( error ) { ... } */ - /* */ - /* num_faces = face->num_faces; */ - /* num_instances = face->style_flags >> 16; */ - /* */ - /* ... */ - /* */ - /* FT_Done_Face( face ); */ - /* */ - /* if ( instance_idx < num_instances ) */ - /* instance_idx++; */ - /* else */ - /* { */ - /* face_idx++; */ - /* instance_idx = 0; */ - /* } */ - /* */ - /* } while ( face_idx < num_faces ) */ - /* } */ - /* */ - FT_EXPORT( FT_Error ) - FT_Open_Face( FT_Library library, - const FT_Open_Args* args, - FT_Long face_index, - FT_Face *aface ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Attach_File */ - /* */ - /* <Description> */ - /* This function calls @FT_Attach_Stream to attach a file. */ - /* */ - /* <InOut> */ - /* face :: The target face object. */ - /* */ - /* <Input> */ - /* filepathname :: The pathname. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Attach_File( FT_Face face, - const char* filepathname ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Attach_Stream */ - /* */ - /* <Description> */ - /* `Attach' data to a face object. Normally, this is used to read */ - /* additional information for the face object. For example, you can */ - /* attach an AFM file that comes with a Type~1 font to get the */ - /* kerning values and other metrics. */ - /* */ - /* <InOut> */ - /* face :: The target face object. */ - /* */ - /* <Input> */ - /* parameters :: A pointer to @FT_Open_Args that must be filled by */ - /* the caller. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* The meaning of the `attach' (i.e., what really happens when the */ - /* new file is read) is not fixed by FreeType itself. It really */ - /* depends on the font format (and thus the font driver). */ - /* */ - /* Client applications are expected to know what they are doing */ - /* when invoking this function. Most drivers simply do not implement */ - /* file attachments. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Attach_Stream( FT_Face face, - FT_Open_Args* parameters ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Reference_Face */ - /* */ - /* <Description> */ - /* A counter gets initialized to~1 at the time an @FT_Face structure */ - /* is created. This function increments the counter. @FT_Done_Face */ - /* then only destroys a face if the counter is~1, otherwise it simply */ - /* decrements the counter. */ - /* */ - /* This function helps in managing life-cycles of structures that */ - /* reference @FT_Face objects. */ - /* */ - /* <Input> */ - /* face :: A handle to a target face object. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Since> */ - /* 2.4.2 */ - /* */ - FT_EXPORT( FT_Error ) - FT_Reference_Face( FT_Face face ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Done_Face */ - /* */ - /* <Description> */ - /* Discard a given face object, as well as all of its child slots and */ - /* sizes. */ - /* */ - /* <Input> */ - /* face :: A handle to a target face object. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* See the discussion of reference counters in the description of */ - /* @FT_Reference_Face. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Done_Face( FT_Face face ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Select_Size */ - /* */ - /* <Description> */ - /* Select a bitmap strike. */ - /* */ - /* <InOut> */ - /* face :: A handle to a target face object. */ - /* */ - /* <Input> */ - /* strike_index :: The index of the bitmap strike in the */ - /* `available_sizes' field of @FT_FaceRec structure. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Select_Size( FT_Face face, - FT_Int strike_index ); - - - /*************************************************************************/ - /* */ - /* <Enum> */ - /* FT_Size_Request_Type */ - /* */ - /* <Description> */ - /* An enumeration type that lists the supported size request types, */ - /* i.e., what input size (in font units) maps to the requested output */ - /* size (in pixels, as computed from the arguments of */ - /* @FT_Size_Request). */ - /* */ - /* <Values> */ - /* FT_SIZE_REQUEST_TYPE_NOMINAL :: */ - /* The nominal size. The `units_per_EM' field of @FT_FaceRec is */ - /* used to determine both scaling values. */ - /* */ - /* This is the standard scaling found in most applications. In */ - /* particular, use this size request type for TrueType fonts if */ - /* they provide optical scaling or something similar. Note, */ - /* however, that `units_per_EM' is a rather abstract value which */ - /* bears no relation to the actual size of the glyphs in a font. */ - /* */ - /* FT_SIZE_REQUEST_TYPE_REAL_DIM :: */ - /* The real dimension. The sum of the `ascender' and (minus of) */ - /* the `descender' fields of @FT_FaceRec are used to determine both */ - /* scaling values. */ - /* */ - /* FT_SIZE_REQUEST_TYPE_BBOX :: */ - /* The font bounding box. The width and height of the `bbox' field */ - /* of @FT_FaceRec are used to determine the horizontal and vertical */ - /* scaling value, respectively. */ - /* */ - /* FT_SIZE_REQUEST_TYPE_CELL :: */ - /* The `max_advance_width' field of @FT_FaceRec is used to */ - /* determine the horizontal scaling value; the vertical scaling */ - /* value is determined the same way as */ - /* @FT_SIZE_REQUEST_TYPE_REAL_DIM does. Finally, both scaling */ - /* values are set to the smaller one. This type is useful if you */ - /* want to specify the font size for, say, a window of a given */ - /* dimension and 80x24 cells. */ - /* */ - /* FT_SIZE_REQUEST_TYPE_SCALES :: */ - /* Specify the scaling values directly. */ - /* */ - /* <Note> */ - /* The above descriptions only apply to scalable formats. For bitmap */ - /* formats, the behaviour is up to the driver. */ - /* */ - /* See the note section of @FT_Size_Metrics if you wonder how size */ - /* requesting relates to scaling values. */ - /* */ - typedef enum FT_Size_Request_Type_ - { - FT_SIZE_REQUEST_TYPE_NOMINAL, - FT_SIZE_REQUEST_TYPE_REAL_DIM, - FT_SIZE_REQUEST_TYPE_BBOX, - FT_SIZE_REQUEST_TYPE_CELL, - FT_SIZE_REQUEST_TYPE_SCALES, - - FT_SIZE_REQUEST_TYPE_MAX - - } FT_Size_Request_Type; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Size_RequestRec */ - /* */ - /* <Description> */ - /* A structure used to model a size request. */ - /* */ - /* <Fields> */ - /* type :: See @FT_Size_Request_Type. */ - /* */ - /* width :: The desired width, given as a 26.6 fractional */ - /* point value (with 72pt = 1in). */ - /* */ - /* height :: The desired height, given as a 26.6 fractional */ - /* point value (with 72pt = 1in). */ - /* */ - /* horiResolution :: The horizontal resolution (dpi, i.e., pixels per */ - /* inch). If set to zero, `width' is treated as a */ - /* 26.6 fractional *pixel* value. */ - /* */ - /* vertResolution :: The vertical resolution (dpi, i.e., pixels per */ - /* inch). If set to zero, `height' is treated as a */ - /* 26.6 fractional *pixel* value. */ - /* */ - /* <Note> */ - /* If `width' is zero, then the horizontal scaling value is set equal */ - /* to the vertical scaling value, and vice versa. */ - /* */ - /* If `type' is FT_SIZE_REQUEST_TYPE_SCALES, `width' and `height' are */ - /* interpreted directly as 16.16 fractional scaling values, without */ - /* any further modification, and both `horiResolution' and */ - /* `vertResolution' are ignored. */ - /* */ - typedef struct FT_Size_RequestRec_ - { - FT_Size_Request_Type type; - FT_Long width; - FT_Long height; - FT_UInt horiResolution; - FT_UInt vertResolution; - - } FT_Size_RequestRec; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Size_Request */ - /* */ - /* <Description> */ - /* A handle to a size request structure. */ - /* */ - typedef struct FT_Size_RequestRec_ *FT_Size_Request; - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Request_Size */ - /* */ - /* <Description> */ - /* Resize the scale of the active @FT_Size object in a face. */ - /* */ - /* <InOut> */ - /* face :: A handle to a target face object. */ - /* */ - /* <Input> */ - /* req :: A pointer to a @FT_Size_RequestRec. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* Although drivers may select the bitmap strike matching the */ - /* request, you should not rely on this if you intend to select a */ - /* particular bitmap strike. Use @FT_Select_Size instead in that */ - /* case. */ - /* */ - /* The relation between the requested size and the resulting glyph */ - /* size is dependent entirely on how the size is defined in the */ - /* source face. The font designer chooses the final size of each */ - /* glyph relative to this size. For more information refer to */ - /* `http://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html' */ - /* */ - /* Don't use this function if you are using the FreeType cache API. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Request_Size( FT_Face face, - FT_Size_Request req ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Set_Char_Size */ - /* */ - /* <Description> */ - /* This function calls @FT_Request_Size to request the nominal size */ - /* (in points). */ - /* */ - /* <InOut> */ - /* face :: A handle to a target face object. */ - /* */ - /* <Input> */ - /* char_width :: The nominal width, in 26.6 fractional points. */ - /* */ - /* char_height :: The nominal height, in 26.6 fractional points. */ - /* */ - /* horz_resolution :: The horizontal resolution in dpi. */ - /* */ - /* vert_resolution :: The vertical resolution in dpi. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* If either the character width or height is zero, it is set equal */ - /* to the other value. */ - /* */ - /* If either the horizontal or vertical resolution is zero, it is set */ - /* equal to the other value. */ - /* */ - /* A character width or height smaller than 1pt is set to 1pt; if */ - /* both resolution values are zero, they are set to 72dpi. */ - /* */ - /* Don't use this function if you are using the FreeType cache API. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Set_Char_Size( FT_Face face, - FT_F26Dot6 char_width, - FT_F26Dot6 char_height, - FT_UInt horz_resolution, - FT_UInt vert_resolution ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Set_Pixel_Sizes */ - /* */ - /* <Description> */ - /* This function calls @FT_Request_Size to request the nominal size */ - /* (in pixels). */ - /* */ - /* <InOut> */ - /* face :: A handle to the target face object. */ - /* */ - /* <Input> */ - /* pixel_width :: The nominal width, in pixels. */ - /* */ - /* pixel_height :: The nominal height, in pixels. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* You should not rely on the resulting glyphs matching, or being */ - /* constrained, to this pixel size. Refer to @FT_Request_Size to */ - /* understand how requested sizes relate to actual sizes. */ - /* */ - /* Don't use this function if you are using the FreeType cache API. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Set_Pixel_Sizes( FT_Face face, - FT_UInt pixel_width, - FT_UInt pixel_height ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Load_Glyph */ - /* */ - /* <Description> */ - /* A function used to load a single glyph into the glyph slot of a */ - /* face object. */ - /* */ - /* <InOut> */ - /* face :: A handle to the target face object where the glyph */ - /* is loaded. */ - /* */ - /* <Input> */ - /* glyph_index :: The index of the glyph in the font file. For */ - /* CID-keyed fonts (either in PS or in CFF format) */ - /* this argument specifies the CID value. */ - /* */ - /* load_flags :: A flag indicating what to load for this glyph. The */ - /* @FT_LOAD_XXX constants can be used to control the */ - /* glyph loading process (e.g., whether the outline */ - /* should be scaled, whether to load bitmaps or not, */ - /* whether to hint the outline, etc). */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* The loaded glyph may be transformed. See @FT_Set_Transform for */ - /* the details. */ - /* */ - /* For subsetted CID-keyed fonts, `FT_Err_Invalid_Argument' is */ - /* returned for invalid CID values (this is, for CID values that */ - /* don't have a corresponding glyph in the font). See the discussion */ - /* of the @FT_FACE_FLAG_CID_KEYED flag for more details. */ - /* */ - /* If you receive `FT_Err_Glyph_Too_Big', try getting the glyph */ - /* outline at EM size, then scale it manually and fill it as a */ - /* graphics operation. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Load_Glyph( FT_Face face, - FT_UInt glyph_index, - FT_Int32 load_flags ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Load_Char */ - /* */ - /* <Description> */ - /* A function used to load a single glyph into the glyph slot of a */ - /* face object, according to its character code. */ - /* */ - /* <InOut> */ - /* face :: A handle to a target face object where the glyph */ - /* is loaded. */ - /* */ - /* <Input> */ - /* char_code :: The glyph's character code, according to the */ - /* current charmap used in the face. */ - /* */ - /* load_flags :: A flag indicating what to load for this glyph. The */ - /* @FT_LOAD_XXX constants can be used to control the */ - /* glyph loading process (e.g., whether the outline */ - /* should be scaled, whether to load bitmaps or not, */ - /* whether to hint the outline, etc). */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* This function simply calls @FT_Get_Char_Index and @FT_Load_Glyph. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Load_Char( FT_Face face, - FT_ULong char_code, - FT_Int32 load_flags ); - - - /************************************************************************* - * - * @enum: - * FT_LOAD_XXX - * - * @description: - * A list of bit field constants used with @FT_Load_Glyph to indicate - * what kind of operations to perform during glyph loading. - * - * @values: - * FT_LOAD_DEFAULT :: - * Corresponding to~0, this value is used as the default glyph load - * operation. In this case, the following happens: - * - * 1. FreeType looks for a bitmap for the glyph corresponding to the - * face's current size. If one is found, the function returns. - * The bitmap data can be accessed from the glyph slot (see note - * below). - * - * 2. If no embedded bitmap is searched or found, FreeType looks for a - * scalable outline. If one is found, it is loaded from the font - * file, scaled to device pixels, then `hinted' to the pixel grid - * in order to optimize it. The outline data can be accessed from - * the glyph slot (see note below). - * - * Note that by default, the glyph loader doesn't render outlines into - * bitmaps. The following flags are used to modify this default - * behaviour to more specific and useful cases. - * - * FT_LOAD_NO_SCALE :: - * Don't scale the loaded outline glyph but keep it in font units. - * - * This flag implies @FT_LOAD_NO_HINTING and @FT_LOAD_NO_BITMAP, and - * unsets @FT_LOAD_RENDER. - * - * If the font is `tricky' (see @FT_FACE_FLAG_TRICKY for more), using - * FT_LOAD_NO_SCALE usually yields meaningless outlines because the - * subglyphs must be scaled and positioned with hinting instructions. - * This can be solved by loading the font without FT_LOAD_NO_SCALE and - * setting the character size to `font->units_per_EM'. - * - * FT_LOAD_NO_HINTING :: - * Disable hinting. This generally generates `blurrier' bitmap glyphs - * when the glyph are rendered in any of the anti-aliased modes. See - * also the note below. - * - * This flag is implied by @FT_LOAD_NO_SCALE. - * - * FT_LOAD_RENDER :: - * Call @FT_Render_Glyph after the glyph is loaded. By default, the - * glyph is rendered in @FT_RENDER_MODE_NORMAL mode. This can be - * overridden by @FT_LOAD_TARGET_XXX or @FT_LOAD_MONOCHROME. - * - * This flag is unset by @FT_LOAD_NO_SCALE. - * - * FT_LOAD_NO_BITMAP :: - * Ignore bitmap strikes when loading. Bitmap-only fonts ignore this - * flag. - * - * @FT_LOAD_NO_SCALE always sets this flag. - * - * FT_LOAD_VERTICAL_LAYOUT :: - * Load the glyph for vertical text layout. In particular, the - * `advance' value in the @FT_GlyphSlotRec structure is set to the - * `vertAdvance' value of the `metrics' field. - * - * In case @FT_HAS_VERTICAL doesn't return true, you shouldn't use - * this flag currently. Reason is that in this case vertical metrics - * get synthesized, and those values are not always consistent across - * various font formats. - * - * FT_LOAD_FORCE_AUTOHINT :: - * Indicates that the auto-hinter is preferred over the font's native - * hinter. See also the note below. - * - * FT_LOAD_PEDANTIC :: - * Indicates that the font driver should perform pedantic verifications - * during glyph loading. This is mostly used to detect broken glyphs - * in fonts. By default, FreeType tries to handle broken fonts also. - * - * In particular, errors from the TrueType bytecode engine are not - * passed to the application if this flag is not set; this might - * result in partially hinted or distorted glyphs in case a glyph's - * bytecode is buggy. - * - * FT_LOAD_NO_RECURSE :: - * Indicate that the font driver should not load composite glyphs - * recursively. Instead, it should set the `num_subglyph' and - * `subglyphs' values of the glyph slot accordingly, and set - * `glyph->format' to @FT_GLYPH_FORMAT_COMPOSITE. The description of - * subglyphs can then be accessed with @FT_Get_SubGlyph_Info. - * - * This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM. - * - * FT_LOAD_IGNORE_TRANSFORM :: - * Indicates that the transform matrix set by @FT_Set_Transform should - * be ignored. - * - * FT_LOAD_MONOCHROME :: - * This flag is used with @FT_LOAD_RENDER to indicate that you want to - * render an outline glyph to a 1-bit monochrome bitmap glyph, with - * 8~pixels packed into each byte of the bitmap data. - * - * Note that this has no effect on the hinting algorithm used. You - * should rather use @FT_LOAD_TARGET_MONO so that the - * monochrome-optimized hinting algorithm is used. - * - * FT_LOAD_LINEAR_DESIGN :: - * Indicates that the `linearHoriAdvance' and `linearVertAdvance' - * fields of @FT_GlyphSlotRec should be kept in font units. See - * @FT_GlyphSlotRec for details. - * - * FT_LOAD_NO_AUTOHINT :: - * Disable auto-hinter. See also the note below. - * - * FT_LOAD_COLOR :: - * This flag is used to request loading of color embedded-bitmap - * images. The resulting color bitmaps, if available, will have the - * @FT_PIXEL_MODE_BGRA format. When the flag is not used and color - * bitmaps are found, they will be converted to 256-level gray - * bitmaps transparently. Those bitmaps will be in the - * @FT_PIXEL_MODE_GRAY format. - * - * FT_LOAD_COMPUTE_METRICS :: - * This flag sets computing glyph metrics without the use of bundled - * metrics tables (for example, the `hdmx' table in TrueType fonts). - * Well-behaving fonts have optimized bundled metrics and these should - * be used. This flag is mainly used by font validating or font - * editing applications, which need to ignore, verify, or edit those - * tables. - * - * Currently, this flag is only implemented for TrueType fonts. - * - * FT_LOAD_CROP_BITMAP :: - * Ignored. Deprecated. - * - * FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH :: - * Ignored. Deprecated. - * - * @note: - * By default, hinting is enabled and the font's native hinter (see - * @FT_FACE_FLAG_HINTER) is preferred over the auto-hinter. You can - * disable hinting by setting @FT_LOAD_NO_HINTING or change the - * precedence by setting @FT_LOAD_FORCE_AUTOHINT. You can also set - * @FT_LOAD_NO_AUTOHINT in case you don't want the auto-hinter to be - * used at all. - * - * See the description of @FT_FACE_FLAG_TRICKY for a special exception - * (affecting only a handful of Asian fonts). - * - * Besides deciding which hinter to use, you can also decide which - * hinting algorithm to use. See @FT_LOAD_TARGET_XXX for details. - * - * Note that the auto-hinter needs a valid Unicode cmap (either a native - * one or synthesized by FreeType) for producing correct results. If a - * font provides an incorrect mapping (for example, assigning the - * character code U+005A, LATIN CAPITAL LETTER Z, to a glyph depicting a - * mathematical integral sign), the auto-hinter might produce useless - * results. - * - */ -#define FT_LOAD_DEFAULT 0x0 -#define FT_LOAD_NO_SCALE ( 1L << 0 ) -#define FT_LOAD_NO_HINTING ( 1L << 1 ) -#define FT_LOAD_RENDER ( 1L << 2 ) -#define FT_LOAD_NO_BITMAP ( 1L << 3 ) -#define FT_LOAD_VERTICAL_LAYOUT ( 1L << 4 ) -#define FT_LOAD_FORCE_AUTOHINT ( 1L << 5 ) -#define FT_LOAD_CROP_BITMAP ( 1L << 6 ) -#define FT_LOAD_PEDANTIC ( 1L << 7 ) -#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ( 1L << 9 ) -#define FT_LOAD_NO_RECURSE ( 1L << 10 ) -#define FT_LOAD_IGNORE_TRANSFORM ( 1L << 11 ) -#define FT_LOAD_MONOCHROME ( 1L << 12 ) -#define FT_LOAD_LINEAR_DESIGN ( 1L << 13 ) -#define FT_LOAD_NO_AUTOHINT ( 1L << 15 ) - /* Bits 16..19 are used by `FT_LOAD_TARGET_' */ -#define FT_LOAD_COLOR ( 1L << 20 ) -#define FT_LOAD_COMPUTE_METRICS ( 1L << 21 ) - - /* */ - - /* used internally only by certain font drivers! */ -#define FT_LOAD_ADVANCE_ONLY ( 1L << 8 ) -#define FT_LOAD_SBITS_ONLY ( 1L << 14 ) - - - /************************************************************************** - * - * @enum: - * FT_LOAD_TARGET_XXX - * - * @description: - * A list of values that are used to select a specific hinting algorithm - * to use by the hinter. You should OR one of these values to your - * `load_flags' when calling @FT_Load_Glyph. - * - * Note that font's native hinters may ignore the hinting algorithm you - * have specified (e.g., the TrueType bytecode interpreter). You can set - * @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used. - * - * @values: - * FT_LOAD_TARGET_NORMAL :: - * This corresponds to the default hinting algorithm, optimized for - * standard gray-level rendering. For monochrome output, use - * @FT_LOAD_TARGET_MONO instead. - * - * FT_LOAD_TARGET_LIGHT :: - * A lighter hinting algorithm for gray-level modes. Many generated - * glyphs are fuzzier but better resemble their original shape. This - * is achieved by snapping glyphs to the pixel grid only vertically - * (Y-axis), as is done by Microsoft's ClearType and Adobe's - * proprietary font renderer. This preserves inter-glyph spacing in - * horizontal text. The snapping is done either by the native font - * driver if the driver itself and the font support it or by the - * auto-hinter. - * - * FT_LOAD_TARGET_MONO :: - * Strong hinting algorithm that should only be used for monochrome - * output. The result is probably unpleasant if the glyph is rendered - * in non-monochrome modes. - * - * FT_LOAD_TARGET_LCD :: - * A variant of @FT_LOAD_TARGET_NORMAL optimized for horizontally - * decimated LCD displays. - * - * FT_LOAD_TARGET_LCD_V :: - * A variant of @FT_LOAD_TARGET_NORMAL optimized for vertically - * decimated LCD displays. - * - * @note: - * You should use only _one_ of the FT_LOAD_TARGET_XXX values in your - * `load_flags'. They can't be ORed. - * - * If @FT_LOAD_RENDER is also set, the glyph is rendered in the - * corresponding mode (i.e., the mode that matches the used algorithm - * best). An exception is FT_LOAD_TARGET_MONO since it implies - * @FT_LOAD_MONOCHROME. - * - * You can use a hinting algorithm that doesn't correspond to the same - * rendering mode. As an example, it is possible to use the `light' - * hinting algorithm and have the results rendered in horizontal LCD - * pixel mode, with code like - * - * { - * FT_Load_Glyph( face, glyph_index, - * load_flags | FT_LOAD_TARGET_LIGHT ); - * - * FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD ); - * } - * - */ -#define FT_LOAD_TARGET_( x ) ( (FT_Int32)( (x) & 15 ) << 16 ) - -#define FT_LOAD_TARGET_NORMAL FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL ) -#define FT_LOAD_TARGET_LIGHT FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT ) -#define FT_LOAD_TARGET_MONO FT_LOAD_TARGET_( FT_RENDER_MODE_MONO ) -#define FT_LOAD_TARGET_LCD FT_LOAD_TARGET_( FT_RENDER_MODE_LCD ) -#define FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V ) - - - /************************************************************************** - * - * @macro: - * FT_LOAD_TARGET_MODE - * - * @description: - * Return the @FT_Render_Mode corresponding to a given - * @FT_LOAD_TARGET_XXX value. - * - */ -#define FT_LOAD_TARGET_MODE( x ) ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) ) - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Set_Transform */ - /* */ - /* <Description> */ - /* A function used to set the transformation that is applied to glyph */ - /* images when they are loaded into a glyph slot through */ - /* @FT_Load_Glyph. */ - /* */ - /* <InOut> */ - /* face :: A handle to the source face object. */ - /* */ - /* <Input> */ - /* matrix :: A pointer to the transformation's 2x2 matrix. Use~0 for */ - /* the identity matrix. */ - /* delta :: A pointer to the translation vector. Use~0 for the null */ - /* vector. */ - /* */ - /* <Note> */ - /* The transformation is only applied to scalable image formats after */ - /* the glyph has been loaded. It means that hinting is unaltered by */ - /* the transformation and is performed on the character size given in */ - /* the last call to @FT_Set_Char_Size or @FT_Set_Pixel_Sizes. */ - /* */ - /* Note that this also transforms the `face.glyph.advance' field, but */ - /* *not* the values in `face.glyph.metrics'. */ - /* */ - FT_EXPORT( void ) - FT_Set_Transform( FT_Face face, - FT_Matrix* matrix, - FT_Vector* delta ); - - - /*************************************************************************/ - /* */ - /* <Enum> */ - /* FT_Render_Mode */ - /* */ - /* <Description> */ - /* An enumeration type that lists the render modes supported by */ - /* FreeType~2. Each mode corresponds to a specific type of scanline */ - /* conversion performed on the outline. */ - /* */ - /* For bitmap fonts and embedded bitmaps the `bitmap->pixel_mode' */ - /* field in the @FT_GlyphSlotRec structure gives the format of the */ - /* returned bitmap. */ - /* */ - /* All modes except @FT_RENDER_MODE_MONO use 256 levels of opacity, */ - /* indicating pixel coverage. Use linear alpha blending and gamma */ - /* correction to correctly render non-monochrome glyph bitmaps onto a */ - /* surface; see @FT_Render_Glyph. */ - /* */ - /* <Values> */ - /* FT_RENDER_MODE_NORMAL :: */ - /* This is the default render mode; it corresponds to 8-bit */ - /* anti-aliased bitmaps. */ - /* */ - /* FT_RENDER_MODE_LIGHT :: */ - /* This is equivalent to @FT_RENDER_MODE_NORMAL. It is only */ - /* defined as a separate value because render modes are also used */ - /* indirectly to define hinting algorithm selectors. See */ - /* @FT_LOAD_TARGET_XXX for details. */ - /* */ - /* FT_RENDER_MODE_MONO :: */ - /* This mode corresponds to 1-bit bitmaps (with 2~levels of */ - /* opacity). */ - /* */ - /* FT_RENDER_MODE_LCD :: */ - /* This mode corresponds to horizontal RGB and BGR sub-pixel */ - /* displays like LCD screens. It produces 8-bit bitmaps that are */ - /* 3~times the width of the original glyph outline in pixels, and */ - /* which use the @FT_PIXEL_MODE_LCD mode. */ - /* */ - /* FT_RENDER_MODE_LCD_V :: */ - /* This mode corresponds to vertical RGB and BGR sub-pixel displays */ - /* (like PDA screens, rotated LCD displays, etc.). It produces */ - /* 8-bit bitmaps that are 3~times the height of the original */ - /* glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode. */ - /* */ - /* <Note> */ - /* The LCD-optimized glyph bitmaps produced by FT_Render_Glyph can be */ - /* filtered to reduce color-fringes by using @FT_Library_SetLcdFilter */ - /* (not active in the default builds). It is up to the caller to */ - /* either call @FT_Library_SetLcdFilter (if available) or do the */ - /* filtering itself. */ - /* */ - /* The selected render mode only affects vector glyphs of a font. */ - /* Embedded bitmaps often have a different pixel mode like */ - /* @FT_PIXEL_MODE_MONO. You can use @FT_Bitmap_Convert to transform */ - /* them into 8-bit pixmaps. */ - /* */ - typedef enum FT_Render_Mode_ - { - FT_RENDER_MODE_NORMAL = 0, - FT_RENDER_MODE_LIGHT, - FT_RENDER_MODE_MONO, - FT_RENDER_MODE_LCD, - FT_RENDER_MODE_LCD_V, - - FT_RENDER_MODE_MAX - - } FT_Render_Mode; - - - /* these constants are deprecated; use the corresponding */ - /* `FT_Render_Mode' values instead */ -#define ft_render_mode_normal FT_RENDER_MODE_NORMAL -#define ft_render_mode_mono FT_RENDER_MODE_MONO - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Render_Glyph */ - /* */ - /* <Description> */ - /* Convert a given glyph image to a bitmap. It does so by inspecting */ - /* the glyph image format, finding the relevant renderer, and */ - /* invoking it. */ - /* */ - /* <InOut> */ - /* slot :: A handle to the glyph slot containing the image to */ - /* convert. */ - /* */ - /* <Input> */ - /* render_mode :: This is the render mode used to render the glyph */ - /* image into a bitmap. See @FT_Render_Mode for a */ - /* list of possible values. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* To get meaningful results, font scaling values must be set with */ - /* functions like @FT_Set_Char_Size before calling FT_Render_Glyph. */ - /* */ - /* When FreeType outputs a bitmap of a glyph, it really outputs an */ - /* alpha coverage map. If a pixel is completely covered by a */ - /* filled-in outline, the bitmap contains 0xFF at that pixel, meaning */ - /* that 0xFF/0xFF fraction of that pixel is covered, meaning the */ - /* pixel is 100% black (or 0% bright). If a pixel is only 50% */ - /* covered (value 0x80), the pixel is made 50% black (50% bright or a */ - /* middle shade of grey). 0% covered means 0% black (100% bright or */ - /* white). */ - /* */ - /* On high-DPI screens like on smartphones and tablets, the pixels */ - /* are so small that their chance of being completely covered and */ - /* therefore completely black are fairly good. On the low-DPI */ - /* screens, however, the situation is different. The pixels are too */ - /* large for most of the details of a glyph and shades of gray are */ - /* the norm rather than the exception. */ - /* */ - /* This is relevant because all our screens have a second problem: */ - /* they are not linear. 1~+~1 is not~2. Twice the value does not */ - /* result in twice the brightness. When a pixel is only 50% covered, */ - /* the coverage map says 50% black, and this translates to a pixel */ - /* value of 128 when you use 8~bits per channel (0-255). However, */ - /* this does not translate to 50% brightness for that pixel on our */ - /* sRGB and gamma~2.2 screens. Due to their non-linearity, they */ - /* dwell longer in the darks and only a pixel value of about 186 */ - /* results in 50% brightness – 128 ends up too dark on both bright */ - /* and dark backgrounds. The net result is that dark text looks */ - /* burnt-out, pixely and blotchy on bright background, bright text */ - /* too frail on dark backgrounds, and colored text on colored */ - /* background (for example, red on green) seems to have dark halos or */ - /* `dirt' around it. The situation is especially ugly for diagonal */ - /* stems like in `w' glyph shapes where the quality of FreeType's */ - /* anti-aliasing depends on the correct display of grays. On */ - /* high-DPI screens where smaller, fully black pixels reign supreme, */ - /* this doesn't matter, but on our low-DPI screens with all the gray */ - /* shades, it does. 0% and 100% brightness are the same things in */ - /* linear and non-linear space, just all the shades in-between */ - /* aren't. */ - /* */ - /* The blending function for placing text over a background is */ - /* */ - /* { */ - /* dst = alpha * src + (1 - alpha) * dst , */ - /* } */ - /* */ - /* which is known as the OVER operator. */ - /* */ - /* To correctly composite an antialiased pixel of a glyph onto a */ - /* surface, */ - /* */ - /* 1. take the foreground and background colors (e.g., in sRGB space) */ - /* and apply gamma to get them in a linear space, */ - /* */ - /* 2. use OVER to blend the two linear colors using the glyph pixel */ - /* as the alpha value (remember, the glyph bitmap is an alpha */ - /* coverage bitmap), and */ - /* */ - /* 3. apply inverse gamma to the blended pixel and write it back to */ - /* the image. */ - /* */ - /* Internal testing at Adobe found that a target inverse gamma of~1.8 */ - /* for step~3 gives good results across a wide range of displays with */ - /* an sRGB gamma curve or a similar one. */ - /* */ - /* This process can cost performance. There is an approximation that */ - /* does not need to know about the background color; see */ - /* https://bel.fi/alankila/lcd/ and */ - /* https://bel.fi/alankila/lcd/alpcor.html for details. */ - /* */ - /* *ATTENTION*: Linear blending is even more important when dealing */ - /* with subpixel-rendered glyphs to prevent color-fringing! A */ - /* subpixel-rendered glyph must first be filtered with a filter that */ - /* gives equal weight to the three color primaries and does not */ - /* exceed a sum of 0x100, see section @lcd_filtering. Then the */ - /* only difference to gray linear blending is that subpixel-rendered */ - /* linear blending is done 3~times per pixel: red foreground subpixel */ - /* to red background subpixel and so on for green and blue. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Render_Glyph( FT_GlyphSlot slot, - FT_Render_Mode render_mode ); - - - /*************************************************************************/ - /* */ - /* <Enum> */ - /* FT_Kerning_Mode */ - /* */ - /* <Description> */ - /* An enumeration used to specify which kerning values to return in */ - /* @FT_Get_Kerning. */ - /* */ - /* <Values> */ - /* FT_KERNING_DEFAULT :: Return grid-fitted kerning distances in */ - /* pixels (value is~0). Whether they are */ - /* scaled depends on @FT_LOAD_NO_SCALE. */ - /* */ - /* FT_KERNING_UNFITTED :: Return un-grid-fitted kerning distances in */ - /* 26.6 fractional pixels. Whether they are */ - /* scaled depends on @FT_LOAD_NO_SCALE. */ - /* */ - /* FT_KERNING_UNSCALED :: Return the kerning vector in original font */ - /* units. */ - /* */ - /* <Note> */ - /* FT_KERNING_DEFAULT returns full pixel values; it also makes */ - /* FreeType heuristically scale down kerning distances at small ppem */ - /* values so that they don't become too big. */ - /* */ - typedef enum FT_Kerning_Mode_ - { - FT_KERNING_DEFAULT = 0, - FT_KERNING_UNFITTED, - FT_KERNING_UNSCALED - - } FT_Kerning_Mode; - - - /* these constants are deprecated; use the corresponding */ - /* `FT_Kerning_Mode' values instead */ -#define ft_kerning_default FT_KERNING_DEFAULT -#define ft_kerning_unfitted FT_KERNING_UNFITTED -#define ft_kerning_unscaled FT_KERNING_UNSCALED - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Kerning */ - /* */ - /* <Description> */ - /* Return the kerning vector between two glyphs of a same face. */ - /* */ - /* <Input> */ - /* face :: A handle to a source face object. */ - /* */ - /* left_glyph :: The index of the left glyph in the kern pair. */ - /* */ - /* right_glyph :: The index of the right glyph in the kern pair. */ - /* */ - /* kern_mode :: See @FT_Kerning_Mode for more information. */ - /* Determines the scale and dimension of the returned */ - /* kerning vector. */ - /* */ - /* <Output> */ - /* akerning :: The kerning vector. This is either in font units, */ - /* fractional pixels (26.6 format), or pixels for */ - /* scalable formats, and in pixels for fixed-sizes */ - /* formats. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* Only horizontal layouts (left-to-right & right-to-left) are */ - /* supported by this method. Other layouts, or more sophisticated */ - /* kernings, are out of the scope of this API function -- they can be */ - /* implemented through format-specific interfaces. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Get_Kerning( FT_Face face, - FT_UInt left_glyph, - FT_UInt right_glyph, - FT_UInt kern_mode, - FT_Vector *akerning ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Track_Kerning */ - /* */ - /* <Description> */ - /* Return the track kerning for a given face object at a given size. */ - /* */ - /* <Input> */ - /* face :: A handle to a source face object. */ - /* */ - /* point_size :: The point size in 16.16 fractional points. */ - /* */ - /* degree :: The degree of tightness. Increasingly negative */ - /* values represent tighter track kerning, while */ - /* increasingly positive values represent looser track */ - /* kerning. Value zero means no track kerning. */ - /* */ - /* <Output> */ - /* akerning :: The kerning in 16.16 fractional points, to be */ - /* uniformly applied between all glyphs. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* Currently, only the Type~1 font driver supports track kerning, */ - /* using data from AFM files (if attached with @FT_Attach_File or */ - /* @FT_Attach_Stream). */ - /* */ - /* Only very few AFM files come with track kerning data; please refer */ - /* to the Adobe's AFM specification for more details. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Get_Track_Kerning( FT_Face face, - FT_Fixed point_size, - FT_Int degree, - FT_Fixed* akerning ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Glyph_Name */ - /* */ - /* <Description> */ - /* Retrieve the ASCII name of a given glyph in a face. This only */ - /* works for those faces where @FT_HAS_GLYPH_NAMES(face) returns~1. */ - /* */ - /* <Input> */ - /* face :: A handle to a source face object. */ - /* */ - /* glyph_index :: The glyph index. */ - /* */ - /* buffer_max :: The maximum number of bytes available in the */ - /* buffer. */ - /* */ - /* <Output> */ - /* buffer :: A pointer to a target buffer where the name is */ - /* copied to. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* An error is returned if the face doesn't provide glyph names or if */ - /* the glyph index is invalid. In all cases of failure, the first */ - /* byte of `buffer' is set to~0 to indicate an empty name. */ - /* */ - /* The glyph name is truncated to fit within the buffer if it is too */ - /* long. The returned string is always zero-terminated. */ - /* */ - /* Be aware that FreeType reorders glyph indices internally so that */ - /* glyph index~0 always corresponds to the `missing glyph' (called */ - /* `.notdef'). */ - /* */ - /* This function always returns an error if the config macro */ - /* `FT_CONFIG_OPTION_NO_GLYPH_NAMES' is not defined in `ftoption.h'. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Get_Glyph_Name( FT_Face face, - FT_UInt glyph_index, - FT_Pointer buffer, - FT_UInt buffer_max ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Postscript_Name */ - /* */ - /* <Description> */ - /* Retrieve the ASCII PostScript name of a given face, if available. */ - /* This only works with PostScript and TrueType fonts. */ - /* */ - /* <Input> */ - /* face :: A handle to the source face object. */ - /* */ - /* <Return> */ - /* A pointer to the face's PostScript name. NULL if unavailable. */ - /* */ - /* <Note> */ - /* The returned pointer is owned by the face and is destroyed with */ - /* it. */ - /* */ - FT_EXPORT( const char* ) - FT_Get_Postscript_Name( FT_Face face ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Select_Charmap */ - /* */ - /* <Description> */ - /* Select a given charmap by its encoding tag (as listed in */ - /* `freetype.h'). */ - /* */ - /* <InOut> */ - /* face :: A handle to the source face object. */ - /* */ - /* <Input> */ - /* encoding :: A handle to the selected encoding. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* This function returns an error if no charmap in the face */ - /* corresponds to the encoding queried here. */ - /* */ - /* Because many fonts contain more than a single cmap for Unicode */ - /* encoding, this function has some special code to select the one */ - /* that covers Unicode best (`best' in the sense that a UCS-4 cmap is */ - /* preferred to a UCS-2 cmap). It is thus preferable to */ - /* @FT_Set_Charmap in this case. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Select_Charmap( FT_Face face, - FT_Encoding encoding ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Set_Charmap */ - /* */ - /* <Description> */ - /* Select a given charmap for character code to glyph index mapping. */ - /* */ - /* <InOut> */ - /* face :: A handle to the source face object. */ - /* */ - /* <Input> */ - /* charmap :: A handle to the selected charmap. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* This function returns an error if the charmap is not part of */ - /* the face (i.e., if it is not listed in the `face->charmaps' */ - /* table). */ - /* */ - /* It also fails if a type~14 charmap is selected. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Set_Charmap( FT_Face face, - FT_CharMap charmap ); - - - /************************************************************************* - * - * @function: - * FT_Get_Charmap_Index - * - * @description: - * Retrieve index of a given charmap. - * - * @input: - * charmap :: - * A handle to a charmap. - * - * @return: - * The index into the array of character maps within the face to which - * `charmap' belongs. If an error occurs, -1 is returned. - * - */ - FT_EXPORT( FT_Int ) - FT_Get_Charmap_Index( FT_CharMap charmap ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Char_Index */ - /* */ - /* <Description> */ - /* Return the glyph index of a given character code. This function */ - /* uses a charmap object to do the mapping. */ - /* */ - /* <Input> */ - /* face :: A handle to the source face object. */ - /* */ - /* charcode :: The character code. */ - /* */ - /* <Return> */ - /* The glyph index. 0~means `undefined character code'. */ - /* */ - /* <Note> */ - /* If you use FreeType to manipulate the contents of font files */ - /* directly, be aware that the glyph index returned by this function */ - /* doesn't always correspond to the internal indices used within the */ - /* file. This is done to ensure that value~0 always corresponds to */ - /* the `missing glyph'. If the first glyph is not named `.notdef', */ - /* then for Type~1 and Type~42 fonts, `.notdef' will be moved into */ - /* the glyph ID~0 position, and whatever was there will be moved to */ - /* the position `.notdef' had. For Type~1 fonts, if there is no */ - /* `.notdef' glyph at all, then one will be created at index~0 and */ - /* whatever was there will be moved to the last index -- Type~42 */ - /* fonts are considered invalid under this condition. */ - /* */ - FT_EXPORT( FT_UInt ) - FT_Get_Char_Index( FT_Face face, - FT_ULong charcode ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_First_Char */ - /* */ - /* <Description> */ - /* This function is used to return the first character code in the */ - /* current charmap of a given face. It also returns the */ - /* corresponding glyph index. */ - /* */ - /* <Input> */ - /* face :: A handle to the source face object. */ - /* */ - /* <Output> */ - /* agindex :: Glyph index of first character code. 0~if charmap is */ - /* empty. */ - /* */ - /* <Return> */ - /* The charmap's first character code. */ - /* */ - /* <Note> */ - /* You should use this function with @FT_Get_Next_Char to be able to */ - /* parse all character codes available in a given charmap. The code */ - /* should look like this: */ - /* */ - /* { */ - /* FT_ULong charcode; */ - /* FT_UInt gindex; */ - /* */ - /* */ - /* charcode = FT_Get_First_Char( face, &gindex ); */ - /* while ( gindex != 0 ) */ - /* { */ - /* ... do something with (charcode,gindex) pair ... */ - /* */ - /* charcode = FT_Get_Next_Char( face, charcode, &gindex ); */ - /* } */ - /* } */ - /* */ - /* Be aware that character codes can have values up to 0xFFFFFFFF; */ - /* this might happen for non-Unicode or malformed cmaps. However, */ - /* even with regular Unicode encoding, so-called `last resort fonts' */ - /* (using SFNT cmap format 13, see function @FT_Get_CMap_Format) */ - /* normally have entries for all Unicode characters up to 0x1FFFFF, */ - /* which can cause *a lot* of iterations. */ - /* */ - /* Note that `*agindex' is set to~0 if the charmap is empty. The */ - /* result itself can be~0 in two cases: if the charmap is empty or */ - /* if the value~0 is the first valid character code. */ - /* */ - FT_EXPORT( FT_ULong ) - FT_Get_First_Char( FT_Face face, - FT_UInt *agindex ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Next_Char */ - /* */ - /* <Description> */ - /* This function is used to return the next character code in the */ - /* current charmap of a given face following the value `char_code', */ - /* as well as the corresponding glyph index. */ - /* */ - /* <Input> */ - /* face :: A handle to the source face object. */ - /* char_code :: The starting character code. */ - /* */ - /* <Output> */ - /* agindex :: Glyph index of next character code. 0~if charmap */ - /* is empty. */ - /* */ - /* <Return> */ - /* The charmap's next character code. */ - /* */ - /* <Note> */ - /* You should use this function with @FT_Get_First_Char to walk */ - /* over all character codes available in a given charmap. See the */ - /* note for this function for a simple code example. */ - /* */ - /* Note that `*agindex' is set to~0 when there are no more codes in */ - /* the charmap. */ - /* */ - FT_EXPORT( FT_ULong ) - FT_Get_Next_Char( FT_Face face, - FT_ULong char_code, - FT_UInt *agindex ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Name_Index */ - /* */ - /* <Description> */ - /* Return the glyph index of a given glyph name. This function uses */ - /* driver specific objects to do the translation. */ - /* */ - /* <Input> */ - /* face :: A handle to the source face object. */ - /* */ - /* glyph_name :: The glyph name. */ - /* */ - /* <Return> */ - /* The glyph index. 0~means `undefined character code'. */ - /* */ - FT_EXPORT( FT_UInt ) - FT_Get_Name_Index( FT_Face face, - FT_String* glyph_name ); - - - /************************************************************************* - * - * @macro: - * FT_SUBGLYPH_FLAG_XXX - * - * @description: - * A list of constants used to describe subglyphs. Please refer to the - * TrueType specification for the meaning of the various flags. - * - * @values: - * FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS :: - * FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES :: - * FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID :: - * FT_SUBGLYPH_FLAG_SCALE :: - * FT_SUBGLYPH_FLAG_XY_SCALE :: - * FT_SUBGLYPH_FLAG_2X2 :: - * FT_SUBGLYPH_FLAG_USE_MY_METRICS :: - * - */ -#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS 1 -#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES 2 -#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID 4 -#define FT_SUBGLYPH_FLAG_SCALE 8 -#define FT_SUBGLYPH_FLAG_XY_SCALE 0x40 -#define FT_SUBGLYPH_FLAG_2X2 0x80 -#define FT_SUBGLYPH_FLAG_USE_MY_METRICS 0x200 - - - /************************************************************************* - * - * @func: - * FT_Get_SubGlyph_Info - * - * @description: - * Retrieve a description of a given subglyph. Only use it if - * `glyph->format' is @FT_GLYPH_FORMAT_COMPOSITE; an error is - * returned otherwise. - * - * @input: - * glyph :: - * The source glyph slot. - * - * sub_index :: - * The index of the subglyph. Must be less than - * `glyph->num_subglyphs'. - * - * @output: - * p_index :: - * The glyph index of the subglyph. - * - * p_flags :: - * The subglyph flags, see @FT_SUBGLYPH_FLAG_XXX. - * - * p_arg1 :: - * The subglyph's first argument (if any). - * - * p_arg2 :: - * The subglyph's second argument (if any). - * - * p_transform :: - * The subglyph transformation (if any). - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * The values of `*p_arg1', `*p_arg2', and `*p_transform' must be - * interpreted depending on the flags returned in `*p_flags'. See the - * TrueType specification for details. - * - */ - FT_EXPORT( FT_Error ) - FT_Get_SubGlyph_Info( FT_GlyphSlot glyph, - FT_UInt sub_index, - FT_Int *p_index, - FT_UInt *p_flags, - FT_Int *p_arg1, - FT_Int *p_arg2, - FT_Matrix *p_transform ); - - - /*************************************************************************/ - /* */ - /* <Enum> */ - /* FT_FSTYPE_XXX */ - /* */ - /* <Description> */ - /* A list of bit flags used in the `fsType' field of the OS/2 table */ - /* in a TrueType or OpenType font and the `FSType' entry in a */ - /* PostScript font. These bit flags are returned by */ - /* @FT_Get_FSType_Flags; they inform client applications of embedding */ - /* and subsetting restrictions associated with a font. */ - /* */ - /* See */ - /* http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf */ - /* for more details. */ - /* */ - /* <Values> */ - /* FT_FSTYPE_INSTALLABLE_EMBEDDING :: */ - /* Fonts with no fsType bit set may be embedded and permanently */ - /* installed on the remote system by an application. */ - /* */ - /* FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING :: */ - /* Fonts that have only this bit set must not be modified, embedded */ - /* or exchanged in any manner without first obtaining permission of */ - /* the font software copyright owner. */ - /* */ - /* FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING :: */ - /* If this bit is set, the font may be embedded and temporarily */ - /* loaded on the remote system. Documents containing Preview & */ - /* Print fonts must be opened `read-only'; no edits can be applied */ - /* to the document. */ - /* */ - /* FT_FSTYPE_EDITABLE_EMBEDDING :: */ - /* If this bit is set, the font may be embedded but must only be */ - /* installed temporarily on other systems. In contrast to Preview */ - /* & Print fonts, documents containing editable fonts may be opened */ - /* for reading, editing is permitted, and changes may be saved. */ - /* */ - /* FT_FSTYPE_NO_SUBSETTING :: */ - /* If this bit is set, the font may not be subsetted prior to */ - /* embedding. */ - /* */ - /* FT_FSTYPE_BITMAP_EMBEDDING_ONLY :: */ - /* If this bit is set, only bitmaps contained in the font may be */ - /* embedded; no outline data may be embedded. If there are no */ - /* bitmaps available in the font, then the font is unembeddable. */ - /* */ - /* <Note> */ - /* The flags are ORed together, thus more than a single value can be */ - /* returned. */ - /* */ - /* While the fsType flags can indicate that a font may be embedded, a */ - /* license with the font vendor may be separately required to use the */ - /* font in this way. */ - /* */ -#define FT_FSTYPE_INSTALLABLE_EMBEDDING 0x0000 -#define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING 0x0002 -#define FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING 0x0004 -#define FT_FSTYPE_EDITABLE_EMBEDDING 0x0008 -#define FT_FSTYPE_NO_SUBSETTING 0x0100 -#define FT_FSTYPE_BITMAP_EMBEDDING_ONLY 0x0200 - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_FSType_Flags */ - /* */ - /* <Description> */ - /* Return the fsType flags for a font. */ - /* */ - /* <Input> */ - /* face :: A handle to the source face object. */ - /* */ - /* <Return> */ - /* The fsType flags, @FT_FSTYPE_XXX. */ - /* */ - /* <Note> */ - /* Use this function rather than directly reading the `fs_type' field */ - /* in the @PS_FontInfoRec structure, which is only guaranteed to */ - /* return the correct results for Type~1 fonts. */ - /* */ - /* <Since> */ - /* 2.3.8 */ - /* */ - FT_EXPORT( FT_UShort ) - FT_Get_FSType_Flags( FT_Face face ); - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* glyph_variants */ - /* */ - /* <Title> */ - /* Glyph Variants */ - /* */ - /* <Abstract> */ - /* The FreeType~2 interface to Unicode Ideographic Variation */ - /* Sequences (IVS), using the SFNT cmap format~14. */ - /* */ - /* <Description> */ - /* Many CJK characters have variant forms. They are a sort of grey */ - /* area somewhere between being totally irrelevant and semantically */ - /* distinct; for this reason, the Unicode consortium decided to */ - /* introduce Ideographic Variation Sequences (IVS), consisting of a */ - /* Unicode base character and one of 240 variant selectors */ - /* (U+E0100-U+E01EF), instead of further extending the already huge */ - /* code range for CJK characters. */ - /* */ - /* An IVS is registered and unique; for further details please refer */ - /* to Unicode Technical Standard #37, the Ideographic Variation */ - /* Database: */ - /* */ - /* http://www.unicode.org/reports/tr37/ */ - /* */ - /* To date (November 2014), the character with the most variants is */ - /* U+9089, having 32 such IVS. */ - /* */ - /* Adobe and MS decided to support IVS with a new cmap subtable */ - /* (format~14). It is an odd subtable because it is not a mapping of */ - /* input code points to glyphs, but contains lists of all variants */ - /* supported by the font. */ - /* */ - /* A variant may be either `default' or `non-default'. A default */ - /* variant is the one you will get for that code point if you look it */ - /* up in the standard Unicode cmap. A non-default variant is a */ - /* different glyph. */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Face_GetCharVariantIndex */ - /* */ - /* <Description> */ - /* Return the glyph index of a given character code as modified by */ - /* the variation selector. */ - /* */ - /* <Input> */ - /* face :: */ - /* A handle to the source face object. */ - /* */ - /* charcode :: */ - /* The character code point in Unicode. */ - /* */ - /* variantSelector :: */ - /* The Unicode code point of the variation selector. */ - /* */ - /* <Return> */ - /* The glyph index. 0~means either `undefined character code', or */ - /* `undefined selector code', or `no variation selector cmap */ - /* subtable', or `current CharMap is not Unicode'. */ - /* */ - /* <Note> */ - /* If you use FreeType to manipulate the contents of font files */ - /* directly, be aware that the glyph index returned by this function */ - /* doesn't always correspond to the internal indices used within */ - /* the file. This is done to ensure that value~0 always corresponds */ - /* to the `missing glyph'. */ - /* */ - /* This function is only meaningful if */ - /* a) the font has a variation selector cmap sub table, */ - /* and */ - /* b) the current charmap has a Unicode encoding. */ - /* */ - /* <Since> */ - /* 2.3.6 */ - /* */ - FT_EXPORT( FT_UInt ) - FT_Face_GetCharVariantIndex( FT_Face face, - FT_ULong charcode, - FT_ULong variantSelector ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Face_GetCharVariantIsDefault */ - /* */ - /* <Description> */ - /* Check whether this variant of this Unicode character is the one to */ - /* be found in the `cmap'. */ - /* */ - /* <Input> */ - /* face :: */ - /* A handle to the source face object. */ - /* */ - /* charcode :: */ - /* The character codepoint in Unicode. */ - /* */ - /* variantSelector :: */ - /* The Unicode codepoint of the variation selector. */ - /* */ - /* <Return> */ - /* 1~if found in the standard (Unicode) cmap, 0~if found in the */ - /* variation selector cmap, or -1 if it is not a variant. */ - /* */ - /* <Note> */ - /* This function is only meaningful if the font has a variation */ - /* selector cmap subtable. */ - /* */ - /* <Since> */ - /* 2.3.6 */ - /* */ - FT_EXPORT( FT_Int ) - FT_Face_GetCharVariantIsDefault( FT_Face face, - FT_ULong charcode, - FT_ULong variantSelector ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Face_GetVariantSelectors */ - /* */ - /* <Description> */ - /* Return a zero-terminated list of Unicode variant selectors found */ - /* in the font. */ - /* */ - /* <Input> */ - /* face :: */ - /* A handle to the source face object. */ - /* */ - /* <Return> */ - /* A pointer to an array of selector code points, or NULL if there is */ - /* no valid variant selector cmap subtable. */ - /* */ - /* <Note> */ - /* The last item in the array is~0; the array is owned by the */ - /* @FT_Face object but can be overwritten or released on the next */ - /* call to a FreeType function. */ - /* */ - /* <Since> */ - /* 2.3.6 */ - /* */ - FT_EXPORT( FT_UInt32* ) - FT_Face_GetVariantSelectors( FT_Face face ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Face_GetVariantsOfChar */ - /* */ - /* <Description> */ - /* Return a zero-terminated list of Unicode variant selectors found */ - /* for the specified character code. */ - /* */ - /* <Input> */ - /* face :: */ - /* A handle to the source face object. */ - /* */ - /* charcode :: */ - /* The character codepoint in Unicode. */ - /* */ - /* <Return> */ - /* A pointer to an array of variant selector code points that are */ - /* active for the given character, or NULL if the corresponding list */ - /* is empty. */ - /* */ - /* <Note> */ - /* The last item in the array is~0; the array is owned by the */ - /* @FT_Face object but can be overwritten or released on the next */ - /* call to a FreeType function. */ - /* */ - /* <Since> */ - /* 2.3.6 */ - /* */ - FT_EXPORT( FT_UInt32* ) - FT_Face_GetVariantsOfChar( FT_Face face, - FT_ULong charcode ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Face_GetCharsOfVariant */ - /* */ - /* <Description> */ - /* Return a zero-terminated list of Unicode character codes found for */ - /* the specified variant selector. */ - /* */ - /* <Input> */ - /* face :: */ - /* A handle to the source face object. */ - /* */ - /* variantSelector :: */ - /* The variant selector code point in Unicode. */ - /* */ - /* <Return> */ - /* A list of all the code points that are specified by this selector */ - /* (both default and non-default codes are returned) or NULL if there */ - /* is no valid cmap or the variant selector is invalid. */ - /* */ - /* <Note> */ - /* The last item in the array is~0; the array is owned by the */ - /* @FT_Face object but can be overwritten or released on the next */ - /* call to a FreeType function. */ - /* */ - /* <Since> */ - /* 2.3.6 */ - /* */ - FT_EXPORT( FT_UInt32* ) - FT_Face_GetCharsOfVariant( FT_Face face, - FT_ULong variantSelector ); - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* computations */ - /* */ - /* <Title> */ - /* Computations */ - /* */ - /* <Abstract> */ - /* Crunching fixed numbers and vectors. */ - /* */ - /* <Description> */ - /* This section contains various functions used to perform */ - /* computations on 16.16 fixed-float numbers or 2d vectors. */ - /* */ - /* <Order> */ - /* FT_MulDiv */ - /* FT_MulFix */ - /* FT_DivFix */ - /* FT_RoundFix */ - /* FT_CeilFix */ - /* FT_FloorFix */ - /* FT_Vector_Transform */ - /* FT_Matrix_Multiply */ - /* FT_Matrix_Invert */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_MulDiv */ - /* */ - /* <Description> */ - /* A very simple function used to perform the computation `(a*b)/c' */ - /* with maximum accuracy (it uses a 64-bit intermediate integer */ - /* whenever necessary). */ - /* */ - /* This function isn't necessarily as fast as some processor specific */ - /* operations, but is at least completely portable. */ - /* */ - /* <Input> */ - /* a :: The first multiplier. */ - /* b :: The second multiplier. */ - /* c :: The divisor. */ - /* */ - /* <Return> */ - /* The result of `(a*b)/c'. This function never traps when trying to */ - /* divide by zero; it simply returns `MaxInt' or `MinInt' depending */ - /* on the signs of `a' and `b'. */ - /* */ - FT_EXPORT( FT_Long ) - FT_MulDiv( FT_Long a, - FT_Long b, - FT_Long c ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_MulFix */ - /* */ - /* <Description> */ - /* A very simple function used to perform the computation */ - /* `(a*b)/0x10000' with maximum accuracy. Most of the time this is */ - /* used to multiply a given value by a 16.16 fixed-point factor. */ - /* */ - /* <Input> */ - /* a :: The first multiplier. */ - /* b :: The second multiplier. Use a 16.16 factor here whenever */ - /* possible (see note below). */ - /* */ - /* <Return> */ - /* The result of `(a*b)/0x10000'. */ - /* */ - /* <Note> */ - /* This function has been optimized for the case where the absolute */ - /* value of `a' is less than 2048, and `b' is a 16.16 scaling factor. */ - /* As this happens mainly when scaling from notional units to */ - /* fractional pixels in FreeType, it resulted in noticeable speed */ - /* improvements between versions 2.x and 1.x. */ - /* */ - /* As a conclusion, always try to place a 16.16 factor as the */ - /* _second_ argument of this function; this can make a great */ - /* difference. */ - /* */ - FT_EXPORT( FT_Long ) - FT_MulFix( FT_Long a, - FT_Long b ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_DivFix */ - /* */ - /* <Description> */ - /* A very simple function used to perform the computation */ - /* `(a*0x10000)/b' with maximum accuracy. Most of the time, this is */ - /* used to divide a given value by a 16.16 fixed-point factor. */ - /* */ - /* <Input> */ - /* a :: The numerator. */ - /* b :: The denominator. Use a 16.16 factor here. */ - /* */ - /* <Return> */ - /* The result of `(a*0x10000)/b'. */ - /* */ - FT_EXPORT( FT_Long ) - FT_DivFix( FT_Long a, - FT_Long b ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_RoundFix */ - /* */ - /* <Description> */ - /* A very simple function used to round a 16.16 fixed number. */ - /* */ - /* <Input> */ - /* a :: The number to be rounded. */ - /* */ - /* <Return> */ - /* `a' rounded to nearest 16.16 fixed integer, halfway cases away */ - /* from zero. */ - /* */ - FT_EXPORT( FT_Fixed ) - FT_RoundFix( FT_Fixed a ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_CeilFix */ - /* */ - /* <Description> */ - /* A very simple function used to compute the ceiling function of a */ - /* 16.16 fixed number. */ - /* */ - /* <Input> */ - /* a :: The number for which the ceiling function is to be computed. */ - /* */ - /* <Return> */ - /* `a' rounded towards plus infinity. */ - /* */ - FT_EXPORT( FT_Fixed ) - FT_CeilFix( FT_Fixed a ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_FloorFix */ - /* */ - /* <Description> */ - /* A very simple function used to compute the floor function of a */ - /* 16.16 fixed number. */ - /* */ - /* <Input> */ - /* a :: The number for which the floor function is to be computed. */ - /* */ - /* <Return> */ - /* `a' rounded towards minus infinity. */ - /* */ - FT_EXPORT( FT_Fixed ) - FT_FloorFix( FT_Fixed a ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Vector_Transform */ - /* */ - /* <Description> */ - /* Transform a single vector through a 2x2 matrix. */ - /* */ - /* <InOut> */ - /* vector :: The target vector to transform. */ - /* */ - /* <Input> */ - /* matrix :: A pointer to the source 2x2 matrix. */ - /* */ - /* <Note> */ - /* The result is undefined if either `vector' or `matrix' is invalid. */ - /* */ - FT_EXPORT( void ) - FT_Vector_Transform( FT_Vector* vec, - const FT_Matrix* matrix ); - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* version */ - /* */ - /* <Title> */ - /* FreeType Version */ - /* */ - /* <Abstract> */ - /* Functions and macros related to FreeType versions. */ - /* */ - /* <Description> */ - /* Note that those functions and macros are of limited use because */ - /* even a new release of FreeType with only documentation changes */ - /* increases the version number. */ - /* */ - /* <Order> */ - /* FT_Library_Version */ - /* */ - /* FREETYPE_MAJOR */ - /* FREETYPE_MINOR */ - /* FREETYPE_PATCH */ - /* */ - /* FT_Face_CheckTrueTypePatents */ - /* FT_Face_SetUnpatentedHinting */ - /* */ - /* FREETYPE_XXX */ - /* */ - /*************************************************************************/ - - - /************************************************************************* - * - * @enum: - * FREETYPE_XXX - * - * @description: - * These three macros identify the FreeType source code version. - * Use @FT_Library_Version to access them at runtime. - * - * @values: - * FREETYPE_MAJOR :: The major version number. - * FREETYPE_MINOR :: The minor version number. - * FREETYPE_PATCH :: The patch level. - * - * @note: - * The version number of FreeType if built as a dynamic link library - * with the `libtool' package is _not_ controlled by these three - * macros. - * - */ -#define FREETYPE_MAJOR 2 -#define FREETYPE_MINOR 7 -#define FREETYPE_PATCH 0 - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Library_Version */ - /* */ - /* <Description> */ - /* Return the version of the FreeType library being used. This is */ - /* useful when dynamically linking to the library, since one cannot */ - /* use the macros @FREETYPE_MAJOR, @FREETYPE_MINOR, and */ - /* @FREETYPE_PATCH. */ - /* */ - /* <Input> */ - /* library :: A source library handle. */ - /* */ - /* <Output> */ - /* amajor :: The major version number. */ - /* */ - /* aminor :: The minor version number. */ - /* */ - /* apatch :: The patch version number. */ - /* */ - /* <Note> */ - /* The reason why this function takes a `library' argument is because */ - /* certain programs implement library initialization in a custom way */ - /* that doesn't use @FT_Init_FreeType. */ - /* */ - /* In such cases, the library version might not be available before */ - /* the library object has been created. */ - /* */ - FT_EXPORT( void ) - FT_Library_Version( FT_Library library, - FT_Int *amajor, - FT_Int *aminor, - FT_Int *apatch ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Face_CheckTrueTypePatents */ - /* */ - /* <Description> */ - /* Deprecated, does nothing. */ - /* */ - /* <Input> */ - /* face :: A face handle. */ - /* */ - /* <Return> */ - /* Always returns false. */ - /* */ - /* <Note> */ - /* Since May 2010, TrueType hinting is no longer patented. */ - /* */ - /* <Since> */ - /* 2.3.5 */ - /* */ - FT_EXPORT( FT_Bool ) - FT_Face_CheckTrueTypePatents( FT_Face face ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Face_SetUnpatentedHinting */ - /* */ - /* <Description> */ - /* Deprecated, does nothing. */ - /* */ - /* <Input> */ - /* face :: A face handle. */ - /* */ - /* value :: New boolean setting. */ - /* */ - /* <Return> */ - /* Always returns false. */ - /* */ - /* <Note> */ - /* Since May 2010, TrueType hinting is no longer patented. */ - /* */ - /* <Since> */ - /* 2.3.5 */ - /* */ - FT_EXPORT( FT_Bool ) - FT_Face_SetUnpatentedHinting( FT_Face face, - FT_Bool value ); - - /* */ - - -FT_END_HEADER - -#endif /* FREETYPE_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftadvanc.h b/builddir/freetype-2.7.0/include/freetype/ftadvanc.h deleted file mode 100644 index 023dd84..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftadvanc.h +++ /dev/null @@ -1,187 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftadvanc.h */ -/* */ -/* Quick computation of advance widths (specification only). */ -/* */ -/* Copyright 2008-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTADVANC_H_ -#define FTADVANC_H_ - - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /************************************************************************** - * - * @section: - * quick_advance - * - * @title: - * Quick retrieval of advance values - * - * @abstract: - * Retrieve horizontal and vertical advance values without processing - * glyph outlines, if possible. - * - * @description: - * This section contains functions to quickly extract advance values - * without handling glyph outlines, if possible. - * - * @order: - * FT_Get_Advance - * FT_Get_Advances - * - */ - - - /*************************************************************************/ - /* */ - /* <Const> */ - /* FT_ADVANCE_FLAG_FAST_ONLY */ - /* */ - /* <Description> */ - /* A bit-flag to be OR-ed with the `flags' parameter of the */ - /* @FT_Get_Advance and @FT_Get_Advances functions. */ - /* */ - /* If set, it indicates that you want these functions to fail if the */ - /* corresponding hinting mode or font driver doesn't allow for very */ - /* quick advance computation. */ - /* */ - /* Typically, glyphs that are either unscaled, unhinted, bitmapped, */ - /* or light-hinted can have their advance width computed very */ - /* quickly. */ - /* */ - /* Normal and bytecode hinted modes that require loading, scaling, */ - /* and hinting of the glyph outline, are extremely slow by */ - /* comparison. */ - /* */ -#define FT_ADVANCE_FLAG_FAST_ONLY 0x20000000L - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Advance */ - /* */ - /* <Description> */ - /* Retrieve the advance value of a given glyph outline in an */ - /* @FT_Face. */ - /* */ - /* <Input> */ - /* face :: The source @FT_Face handle. */ - /* */ - /* gindex :: The glyph index. */ - /* */ - /* load_flags :: A set of bit flags similar to those used when */ - /* calling @FT_Load_Glyph, used to determine what kind */ - /* of advances you need. */ - /* <Output> */ - /* padvance :: The advance value. If scaling is performed (based on */ - /* the value of `load_flags'), the advance value is in */ - /* 16.16 format. Otherwise, it is in font units. */ - /* */ - /* If @FT_LOAD_VERTICAL_LAYOUT is set, this is the */ - /* vertical advance corresponding to a vertical layout. */ - /* Otherwise, it is the horizontal advance in a */ - /* horizontal layout. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - /* <Note> */ - /* This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and */ - /* if the corresponding font backend doesn't have a quick way to */ - /* retrieve the advances. */ - /* */ - /* A scaled advance is returned in 16.16 format but isn't transformed */ - /* by the affine transformation specified by @FT_Set_Transform. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Get_Advance( FT_Face face, - FT_UInt gindex, - FT_Int32 load_flags, - FT_Fixed *padvance ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Advances */ - /* */ - /* <Description> */ - /* Retrieve the advance values of several glyph outlines in an */ - /* @FT_Face. */ - /* */ - /* <Input> */ - /* face :: The source @FT_Face handle. */ - /* */ - /* start :: The first glyph index. */ - /* */ - /* count :: The number of advance values you want to retrieve. */ - /* */ - /* load_flags :: A set of bit flags similar to those used when */ - /* calling @FT_Load_Glyph. */ - /* */ - /* <Output> */ - /* padvance :: The advance values. This array, to be provided by the */ - /* caller, must contain at least `count' elements. */ - /* */ - /* If scaling is performed (based on the value of */ - /* `load_flags'), the advance values are in 16.16 format. */ - /* Otherwise, they are in font units. */ - /* */ - /* If @FT_LOAD_VERTICAL_LAYOUT is set, these are the */ - /* vertical advances corresponding to a vertical layout. */ - /* Otherwise, they are the horizontal advances in a */ - /* horizontal layout. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - /* <Note> */ - /* This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and */ - /* if the corresponding font backend doesn't have a quick way to */ - /* retrieve the advances. */ - /* */ - /* Scaled advances are returned in 16.16 format but aren't */ - /* transformed by the affine transformation specified by */ - /* @FT_Set_Transform. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Get_Advances( FT_Face face, - FT_UInt start, - FT_UInt count, - FT_Int32 load_flags, - FT_Fixed *padvances ); - - /* */ - - -FT_END_HEADER - -#endif /* FTADVANC_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftautoh.h b/builddir/freetype-2.7.0/include/freetype/ftautoh.h deleted file mode 100644 index 48ff1aa..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftautoh.h +++ /dev/null @@ -1,511 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftautoh.h */ -/* */ -/* FreeType API for controlling the auto-hinter (specification only). */ -/* */ -/* Copyright 2012-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTAUTOH_H_ -#define FTAUTOH_H_ - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /************************************************************************** - * - * @section: - * auto_hinter - * - * @title: - * The auto-hinter - * - * @abstract: - * Controlling the auto-hinting module. - * - * @description: - * While FreeType's auto-hinter doesn't expose API functions by itself, - * it is possible to control its behaviour with @FT_Property_Set and - * @FT_Property_Get. The following lists the available properties - * together with the necessary macros and structures. - * - * Note that the auto-hinter's module name is `autofitter' for - * historical reasons. - * - */ - - - /************************************************************************** - * - * @property: - * glyph-to-script-map - * - * @description: - * *Experimental* *only* - * - * The auto-hinter provides various script modules to hint glyphs. - * Examples of supported scripts are Latin or CJK. Before a glyph is - * auto-hinted, the Unicode character map of the font gets examined, and - * the script is then determined based on Unicode character ranges, see - * below. - * - * OpenType fonts, however, often provide much more glyphs than - * character codes (small caps, superscripts, ligatures, swashes, etc.), - * to be controlled by so-called `features'. Handling OpenType features - * can be quite complicated and thus needs a separate library on top of - * FreeType. - * - * The mapping between glyph indices and scripts (in the auto-hinter - * sense, see the @FT_AUTOHINTER_SCRIPT_XXX values) is stored as an - * array with `num_glyphs' elements, as found in the font's @FT_Face - * structure. The `glyph-to-script-map' property returns a pointer to - * this array, which can be modified as needed. Note that the - * modification should happen before the first glyph gets processed by - * the auto-hinter so that the global analysis of the font shapes - * actually uses the modified mapping. - * - * The following example code demonstrates how to access it (omitting - * the error handling). - * - * { - * FT_Library library; - * FT_Face face; - * FT_Prop_GlyphToScriptMap prop; - * - * - * FT_Init_FreeType( &library ); - * FT_New_Face( library, "foo.ttf", 0, &face ); - * - * prop.face = face; - * - * FT_Property_Get( library, "autofitter", - * "glyph-to-script-map", &prop ); - * - * // adjust `prop.map' as needed right here - * - * FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT ); - * } - * - */ - - - /************************************************************************** - * - * @enum: - * FT_AUTOHINTER_SCRIPT_XXX - * - * @description: - * *Experimental* *only* - * - * A list of constants used for the @glyph-to-script-map property to - * specify the script submodule the auto-hinter should use for hinting a - * particular glyph. - * - * @values: - * FT_AUTOHINTER_SCRIPT_NONE :: - * Don't auto-hint this glyph. - * - * FT_AUTOHINTER_SCRIPT_LATIN :: - * Apply the latin auto-hinter. For the auto-hinter, `latin' is a - * very broad term, including Cyrillic and Greek also since characters - * from those scripts share the same design constraints. - * - * By default, characters from the following Unicode ranges are - * assigned to this submodule. - * - * { - * U+0020 - U+007F // Basic Latin (no control characters) - * U+00A0 - U+00FF // Latin-1 Supplement (no control characters) - * U+0100 - U+017F // Latin Extended-A - * U+0180 - U+024F // Latin Extended-B - * U+0250 - U+02AF // IPA Extensions - * U+02B0 - U+02FF // Spacing Modifier Letters - * U+0300 - U+036F // Combining Diacritical Marks - * U+0370 - U+03FF // Greek and Coptic - * U+0400 - U+04FF // Cyrillic - * U+0500 - U+052F // Cyrillic Supplement - * U+1D00 - U+1D7F // Phonetic Extensions - * U+1D80 - U+1DBF // Phonetic Extensions Supplement - * U+1DC0 - U+1DFF // Combining Diacritical Marks Supplement - * U+1E00 - U+1EFF // Latin Extended Additional - * U+1F00 - U+1FFF // Greek Extended - * U+2000 - U+206F // General Punctuation - * U+2070 - U+209F // Superscripts and Subscripts - * U+20A0 - U+20CF // Currency Symbols - * U+2150 - U+218F // Number Forms - * U+2460 - U+24FF // Enclosed Alphanumerics - * U+2C60 - U+2C7F // Latin Extended-C - * U+2DE0 - U+2DFF // Cyrillic Extended-A - * U+2E00 - U+2E7F // Supplemental Punctuation - * U+A640 - U+A69F // Cyrillic Extended-B - * U+A720 - U+A7FF // Latin Extended-D - * U+FB00 - U+FB06 // Alphab. Present. Forms (Latin Ligatures) - * U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols - * U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement - * } - * - * FT_AUTOHINTER_SCRIPT_CJK :: - * Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old - * Vietnamese, and some other scripts. - * - * By default, characters from the following Unicode ranges are - * assigned to this submodule. - * - * { - * U+1100 - U+11FF // Hangul Jamo - * U+2E80 - U+2EFF // CJK Radicals Supplement - * U+2F00 - U+2FDF // Kangxi Radicals - * U+2FF0 - U+2FFF // Ideographic Description Characters - * U+3000 - U+303F // CJK Symbols and Punctuation - * U+3040 - U+309F // Hiragana - * U+30A0 - U+30FF // Katakana - * U+3100 - U+312F // Bopomofo - * U+3130 - U+318F // Hangul Compatibility Jamo - * U+3190 - U+319F // Kanbun - * U+31A0 - U+31BF // Bopomofo Extended - * U+31C0 - U+31EF // CJK Strokes - * U+31F0 - U+31FF // Katakana Phonetic Extensions - * U+3200 - U+32FF // Enclosed CJK Letters and Months - * U+3300 - U+33FF // CJK Compatibility - * U+3400 - U+4DBF // CJK Unified Ideographs Extension A - * U+4DC0 - U+4DFF // Yijing Hexagram Symbols - * U+4E00 - U+9FFF // CJK Unified Ideographs - * U+A960 - U+A97F // Hangul Jamo Extended-A - * U+AC00 - U+D7AF // Hangul Syllables - * U+D7B0 - U+D7FF // Hangul Jamo Extended-B - * U+F900 - U+FAFF // CJK Compatibility Ideographs - * U+FE10 - U+FE1F // Vertical forms - * U+FE30 - U+FE4F // CJK Compatibility Forms - * U+FF00 - U+FFEF // Halfwidth and Fullwidth Forms - * U+1B000 - U+1B0FF // Kana Supplement - * U+1D300 - U+1D35F // Tai Xuan Hing Symbols - * U+1F200 - U+1F2FF // Enclosed Ideographic Supplement - * U+20000 - U+2A6DF // CJK Unified Ideographs Extension B - * U+2A700 - U+2B73F // CJK Unified Ideographs Extension C - * U+2B740 - U+2B81F // CJK Unified Ideographs Extension D - * U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement - * } - * - * FT_AUTOHINTER_SCRIPT_INDIC :: - * Apply the indic auto-hinter, covering all major scripts from the - * Indian sub-continent and some other related scripts like Thai, Lao, - * or Tibetan. - * - * By default, characters from the following Unicode ranges are - * assigned to this submodule. - * - * { - * U+0900 - U+0DFF // Indic Range - * U+0F00 - U+0FFF // Tibetan - * U+1900 - U+194F // Limbu - * U+1B80 - U+1BBF // Sundanese - * U+A800 - U+A82F // Syloti Nagri - * U+ABC0 - U+ABFF // Meetei Mayek - * U+11800 - U+118DF // Sharada - * } - * - * Note that currently Indic support is rudimentary only, missing blue - * zone support. - * - */ -#define FT_AUTOHINTER_SCRIPT_NONE 0 -#define FT_AUTOHINTER_SCRIPT_LATIN 1 -#define FT_AUTOHINTER_SCRIPT_CJK 2 -#define FT_AUTOHINTER_SCRIPT_INDIC 3 - - - /************************************************************************** - * - * @struct: - * FT_Prop_GlyphToScriptMap - * - * @description: - * *Experimental* *only* - * - * The data exchange structure for the @glyph-to-script-map property. - * - */ - typedef struct FT_Prop_GlyphToScriptMap_ - { - FT_Face face; - FT_UShort* map; - - } FT_Prop_GlyphToScriptMap; - - - /************************************************************************** - * - * @property: - * fallback-script - * - * @description: - * *Experimental* *only* - * - * If no auto-hinter script module can be assigned to a glyph, a - * fallback script gets assigned to it (see also the - * @glyph-to-script-map property). By default, this is - * @FT_AUTOHINTER_SCRIPT_CJK. Using the `fallback-script' property, - * this fallback value can be changed. - * - * { - * FT_Library library; - * FT_UInt fallback_script = FT_AUTOHINTER_SCRIPT_NONE; - * - * - * FT_Init_FreeType( &library ); - * - * FT_Property_Set( library, "autofitter", - * "fallback-script", &fallback_script ); - * } - * - * @note: - * This property can be used with @FT_Property_Get also. - * - * It's important to use the right timing for changing this value: The - * creation of the glyph-to-script map that eventually uses the - * fallback script value gets triggered either by setting or reading a - * face-specific property like @glyph-to-script-map, or by auto-hinting - * any glyph from that face. In particular, if you have already created - * an @FT_Face structure but not loaded any glyph (using the - * auto-hinter), a change of the fallback script will affect this face. - * - */ - - - /************************************************************************** - * - * @property: - * default-script - * - * @description: - * *Experimental* *only* - * - * If FreeType gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make - * the HarfBuzz library access OpenType features for getting better - * glyph coverages, this property sets the (auto-fitter) script to be - * used for the default (OpenType) script data of a font's GSUB table. - * Features for the default script are intended for all scripts not - * explicitly handled in GSUB; an example is a `dlig' feature, - * containing the combination of the characters `T', `E', and `L' to - * form a `TEL' ligature. - * - * By default, this is @FT_AUTOHINTER_SCRIPT_LATIN. Using the - * `default-script' property, this default value can be changed. - * - * { - * FT_Library library; - * FT_UInt default_script = FT_AUTOHINTER_SCRIPT_NONE; - * - * - * FT_Init_FreeType( &library ); - * - * FT_Property_Set( library, "autofitter", - * "default-script", &default_script ); - * } - * - * @note: - * This property can be used with @FT_Property_Get also. - * - * It's important to use the right timing for changing this value: The - * creation of the glyph-to-script map that eventually uses the - * default script value gets triggered either by setting or reading a - * face-specific property like @glyph-to-script-map, or by auto-hinting - * any glyph from that face. In particular, if you have already created - * an @FT_Face structure but not loaded any glyph (using the - * auto-hinter), a change of the default script will affect this face. - * - */ - - - /************************************************************************** - * - * @property: - * increase-x-height - * - * @description: - * For ppem values in the range 6~<= ppem <= `increase-x-height', round - * up the font's x~height much more often than normally. If the value - * is set to~0, which is the default, this feature is switched off. Use - * this property to improve the legibility of small font sizes if - * necessary. - * - * { - * FT_Library library; - * FT_Face face; - * FT_Prop_IncreaseXHeight prop; - * - * - * FT_Init_FreeType( &library ); - * FT_New_Face( library, "foo.ttf", 0, &face ); - * FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 ); - * - * prop.face = face; - * prop.limit = 14; - * - * FT_Property_Set( library, "autofitter", - * "increase-x-height", &prop ); - * } - * - * @note: - * This property can be used with @FT_Property_Get also. - * - * Set this value right after calling @FT_Set_Char_Size, but before - * loading any glyph (using the auto-hinter). - * - */ - - - /************************************************************************** - * - * @struct: - * FT_Prop_IncreaseXHeight - * - * @description: - * The data exchange structure for the @increase-x-height property. - * - */ - typedef struct FT_Prop_IncreaseXHeight_ - { - FT_Face face; - FT_UInt limit; - - } FT_Prop_IncreaseXHeight; - - - /************************************************************************** - * - * @property: - * warping - * - * @description: - * *Experimental* *only* - * - * If FreeType gets compiled with option AF_CONFIG_OPTION_USE_WARPER to - * activate the warp hinting code in the auto-hinter, this property - * switches warping on and off. - * - * Warping only works in `light' auto-hinting mode. The idea of the - * code is to slightly scale and shift a glyph along the non-hinted - * dimension (which is usually the horizontal axis) so that as much of - * its segments are aligned (more or less) to the grid. To find out a - * glyph's optimal scaling and shifting value, various parameter - * combinations are tried and scored. - * - * By default, warping is off. The example below shows how to switch on - * warping (omitting the error handling). - * - * { - * FT_Library library; - * FT_Bool warping = 1; - * - * - * FT_Init_FreeType( &library ); - * - * FT_Property_Set( library, "autofitter", - * "warping", &warping ); - * } - * - * @note: - * This property can be used with @FT_Property_Get also. - * - * This property can be set via the `FREETYPE_PROPERTIES' environment - * variable (using values 1 and 0 for `on' and `off', respectively). - * - * The warping code can also change advance widths. Have a look at the - * `lsb_delta' and `rsb_delta' fields in the @FT_GlyphSlotRec structure - * for details on improving inter-glyph distances while rendering. - * - * Since warping is a global property of the auto-hinter it is best to - * change its value before rendering any face. Otherwise, you should - * reload all faces that get auto-hinted in `light' hinting mode. - * - */ - - - /************************************************************************** - * - * @property: - * no-stem-darkening[autofit] - * - * @description: - * *Experimental* *only,* *requires* *linear* *alpha* *blending* *and* - * *gamma* *correction* - * - * Stem darkening emboldens glyphs at smaller sizes to make them more - * readable on common low-DPI screens when using linear alpha blending - * and gamma correction, see @FT_Render_Glyph. When not using linear - * alpha blending and gamma correction, glyphs will appear heavy and - * fuzzy! - * - * Gamma correction essentially lightens fonts since shades of grey are - * shifted to higher pixel values (=~higher brightness) to match the - * original intention to the reality of our screens. The side-effect is - * that glyphs `thin out'. Mac OS~X and Adobe's proprietary font - * rendering library implement a counter-measure: stem darkening at - * smaller sizes where shades of gray dominate. By emboldening a glyph - * slightly in relation to its pixel size, individual pixels get higher - * coverage of filled-in outlines and are therefore `blacker'. This - * counteracts the `thinning out' of glyphs, making text remain readable - * at smaller sizes. All glyphs that pass through the auto-hinter will - * be emboldened unless this property is set to TRUE. - * - * See the description of the CFF driver for algorithmic details. Total - * consistency with the CFF driver is currently not achieved because the - * emboldening method differs and glyphs must be scaled down on the - * Y-axis to keep outline points inside their precomputed blue zones. - * The smaller the size (especially 9ppem and down), the higher the loss - * of emboldening versus the CFF driver. - * - * This property can be set via the `FREETYPE_PROPERTIES' environment - * variable similar to the CFF driver. - * - */ - - - /************************************************************************** - * - * @property: - * darkening-parameters[autofit] - * - * @description: - * *Experimental* *only* - * - * See the description of the CFF driver for details. This - * implementation appropriates the - * CFF_CONFIG_OPTION_DARKENING_PARAMETER_* #defines for consistency. - * Note the differences described in @no-stem-darkening[autofit]. - * - * This property can be set via the `FREETYPE_PROPERTIES' environment - * variable similar to the CFF driver. - */ - - - /* */ - - -FT_END_HEADER - -#endif /* FTAUTOH_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftbbox.h b/builddir/freetype-2.7.0/include/freetype/ftbbox.h deleted file mode 100644 index 2a4d214..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftbbox.h +++ /dev/null @@ -1,101 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftbbox.h */ -/* */ -/* FreeType exact bbox computation (specification). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /*************************************************************************/ - /* */ - /* This component has a _single_ role: to compute exact outline bounding */ - /* boxes. */ - /* */ - /* It is separated from the rest of the engine for various technical */ - /* reasons. It may well be integrated in `ftoutln' later. */ - /* */ - /*************************************************************************/ - - -#ifndef FTBBOX_H_ -#define FTBBOX_H_ - - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* outline_processing */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Outline_Get_BBox */ - /* */ - /* <Description> */ - /* Compute the exact bounding box of an outline. This is slower */ - /* than computing the control box. However, it uses an advanced */ - /* algorithm that returns _very_ quickly when the two boxes */ - /* coincide. Otherwise, the outline Bézier arcs are traversed to */ - /* extract their extrema. */ - /* */ - /* <Input> */ - /* outline :: A pointer to the source outline. */ - /* */ - /* <Output> */ - /* abbox :: The outline's exact bounding box. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* If the font is tricky and the glyph has been loaded with */ - /* @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get */ - /* reasonable values for the BBox it is necessary to load the glyph */ - /* at a large ppem value (so that the hinting instructions can */ - /* properly shift and scale the subglyphs), then extracting the BBox, */ - /* which can be eventually converted back to font units. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Outline_Get_BBox( FT_Outline* outline, - FT_BBox *abbox ); - - /* */ - - -FT_END_HEADER - -#endif /* FTBBOX_H_ */ - - -/* END */ - - -/* Local Variables: */ -/* coding: utf-8 */ -/* End: */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftbdf.h b/builddir/freetype-2.7.0/include/freetype/ftbdf.h deleted file mode 100644 index 016dba0..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftbdf.h +++ /dev/null @@ -1,210 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftbdf.h */ -/* */ -/* FreeType API for accessing BDF-specific strings (specification). */ -/* */ -/* Copyright 2002-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTBDF_H_ -#define FTBDF_H_ - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* bdf_fonts */ - /* */ - /* <Title> */ - /* BDF and PCF Files */ - /* */ - /* <Abstract> */ - /* BDF and PCF specific API. */ - /* */ - /* <Description> */ - /* This section contains the declaration of functions specific to BDF */ - /* and PCF fonts. */ - /* */ - /*************************************************************************/ - - - /********************************************************************** - * - * @enum: - * BDF_PropertyType - * - * @description: - * A list of BDF property types. - * - * @values: - * BDF_PROPERTY_TYPE_NONE :: - * Value~0 is used to indicate a missing property. - * - * BDF_PROPERTY_TYPE_ATOM :: - * Property is a string atom. - * - * BDF_PROPERTY_TYPE_INTEGER :: - * Property is a 32-bit signed integer. - * - * BDF_PROPERTY_TYPE_CARDINAL :: - * Property is a 32-bit unsigned integer. - */ - typedef enum BDF_PropertyType_ - { - BDF_PROPERTY_TYPE_NONE = 0, - BDF_PROPERTY_TYPE_ATOM = 1, - BDF_PROPERTY_TYPE_INTEGER = 2, - BDF_PROPERTY_TYPE_CARDINAL = 3 - - } BDF_PropertyType; - - - /********************************************************************** - * - * @type: - * BDF_Property - * - * @description: - * A handle to a @BDF_PropertyRec structure to model a given - * BDF/PCF property. - */ - typedef struct BDF_PropertyRec_* BDF_Property; - - - /********************************************************************** - * - * @struct: - * BDF_PropertyRec - * - * @description: - * This structure models a given BDF/PCF property. - * - * @fields: - * type :: - * The property type. - * - * u.atom :: - * The atom string, if type is @BDF_PROPERTY_TYPE_ATOM. May be - * NULL, indicating an empty string. - * - * u.integer :: - * A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER. - * - * u.cardinal :: - * An unsigned integer, if type is @BDF_PROPERTY_TYPE_CARDINAL. - */ - typedef struct BDF_PropertyRec_ - { - BDF_PropertyType type; - union { - const char* atom; - FT_Int32 integer; - FT_UInt32 cardinal; - - } u; - - } BDF_PropertyRec; - - - /********************************************************************** - * - * @function: - * FT_Get_BDF_Charset_ID - * - * @description: - * Retrieve a BDF font character set identity, according to - * the BDF specification. - * - * @input: - * face :: - * A handle to the input face. - * - * @output: - * acharset_encoding :: - * Charset encoding, as a C~string, owned by the face. - * - * acharset_registry :: - * Charset registry, as a C~string, owned by the face. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * This function only works with BDF faces, returning an error otherwise. - */ - FT_EXPORT( FT_Error ) - FT_Get_BDF_Charset_ID( FT_Face face, - const char* *acharset_encoding, - const char* *acharset_registry ); - - - /********************************************************************** - * - * @function: - * FT_Get_BDF_Property - * - * @description: - * Retrieve a BDF property from a BDF or PCF font file. - * - * @input: - * face :: A handle to the input face. - * - * name :: The property name. - * - * @output: - * aproperty :: The property. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * This function works with BDF _and_ PCF fonts. It returns an error - * otherwise. It also returns an error if the property is not in the - * font. - * - * A `property' is a either key-value pair within the STARTPROPERTIES - * ... ENDPROPERTIES block of a BDF font or a key-value pair from the - * `info->props' array within a `FontRec' structure of a PCF font. - * - * Integer properties are always stored as `signed' within PCF fonts; - * consequently, @BDF_PROPERTY_TYPE_CARDINAL is a possible return value - * for BDF fonts only. - * - * In case of error, `aproperty->type' is always set to - * @BDF_PROPERTY_TYPE_NONE. - */ - FT_EXPORT( FT_Error ) - FT_Get_BDF_Property( FT_Face face, - const char* prop_name, - BDF_PropertyRec *aproperty ); - - /* */ - -FT_END_HEADER - -#endif /* FTBDF_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftbitmap.h b/builddir/freetype-2.7.0/include/freetype/ftbitmap.h deleted file mode 100644 index 0eac7b9..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftbitmap.h +++ /dev/null @@ -1,240 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftbitmap.h */ -/* */ -/* FreeType utility functions for bitmaps (specification). */ -/* */ -/* Copyright 2004-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTBITMAP_H_ -#define FTBITMAP_H_ - - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* bitmap_handling */ - /* */ - /* <Title> */ - /* Bitmap Handling */ - /* */ - /* <Abstract> */ - /* Handling FT_Bitmap objects. */ - /* */ - /* <Description> */ - /* This section contains functions for handling @FT_Bitmap objects. */ - /* Note that none of the functions changes the bitmap's `flow' (as */ - /* indicated by the sign of the `pitch' field in `FT_Bitmap'). */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Bitmap_Init */ - /* */ - /* <Description> */ - /* Initialize a pointer to an @FT_Bitmap structure. */ - /* */ - /* <InOut> */ - /* abitmap :: A pointer to the bitmap structure. */ - /* */ - /* <Note> */ - /* A deprecated name for the same function is `FT_Bitmap_New'. */ - /* */ - FT_EXPORT( void ) - FT_Bitmap_Init( FT_Bitmap *abitmap ); - - - /* deprecated */ - FT_EXPORT( void ) - FT_Bitmap_New( FT_Bitmap *abitmap ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Bitmap_Copy */ - /* */ - /* <Description> */ - /* Copy a bitmap into another one. */ - /* */ - /* <Input> */ - /* library :: A handle to a library object. */ - /* */ - /* source :: A handle to the source bitmap. */ - /* */ - /* <Output> */ - /* target :: A handle to the target bitmap. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Bitmap_Copy( FT_Library library, - const FT_Bitmap *source, - FT_Bitmap *target); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Bitmap_Embolden */ - /* */ - /* <Description> */ - /* Embolden a bitmap. The new bitmap will be about `xStrength' */ - /* pixels wider and `yStrength' pixels higher. The left and bottom */ - /* borders are kept unchanged. */ - /* */ - /* <Input> */ - /* library :: A handle to a library object. */ - /* */ - /* xStrength :: How strong the glyph is emboldened horizontally. */ - /* Expressed in 26.6 pixel format. */ - /* */ - /* yStrength :: How strong the glyph is emboldened vertically. */ - /* Expressed in 26.6 pixel format. */ - /* */ - /* <InOut> */ - /* bitmap :: A handle to the target bitmap. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* The current implementation restricts `xStrength' to be less than */ - /* or equal to~8 if bitmap is of pixel_mode @FT_PIXEL_MODE_MONO. */ - /* */ - /* If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, */ - /* you should call @FT_GlyphSlot_Own_Bitmap on the slot first. */ - /* */ - /* Bitmaps in @FT_PIXEL_MODE_GRAY2 and @FT_PIXEL_MODE_GRAY@ format */ - /* are converted to @FT_PIXEL_MODE_GRAY format (i.e., 8bpp). */ - /* */ - FT_EXPORT( FT_Error ) - FT_Bitmap_Embolden( FT_Library library, - FT_Bitmap* bitmap, - FT_Pos xStrength, - FT_Pos yStrength ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Bitmap_Convert */ - /* */ - /* <Description> */ - /* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, 8bpp or 32bpp */ - /* to a bitmap object with depth 8bpp, making the number of used */ - /* bytes line (a.k.a. the `pitch') a multiple of `alignment'. */ - /* */ - /* <Input> */ - /* library :: A handle to a library object. */ - /* */ - /* source :: The source bitmap. */ - /* */ - /* alignment :: The pitch of the bitmap is a multiple of this */ - /* parameter. Common values are 1, 2, or 4. */ - /* */ - /* <Output> */ - /* target :: The target bitmap. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* It is possible to call @FT_Bitmap_Convert multiple times without */ - /* calling @FT_Bitmap_Done (the memory is simply reallocated). */ - /* */ - /* Use @FT_Bitmap_Done to finally remove the bitmap object. */ - /* */ - /* The `library' argument is taken to have access to FreeType's */ - /* memory handling functions. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Bitmap_Convert( FT_Library library, - const FT_Bitmap *source, - FT_Bitmap *target, - FT_Int alignment ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_GlyphSlot_Own_Bitmap */ - /* */ - /* <Description> */ - /* Make sure that a glyph slot owns `slot->bitmap'. */ - /* */ - /* <Input> */ - /* slot :: The glyph slot. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* This function is to be used in combination with */ - /* @FT_Bitmap_Embolden. */ - /* */ - FT_EXPORT( FT_Error ) - FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot slot ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Bitmap_Done */ - /* */ - /* <Description> */ - /* Destroy a bitmap object initialized with @FT_Bitmap_Init. */ - /* */ - /* <Input> */ - /* library :: A handle to a library object. */ - /* */ - /* bitmap :: The bitmap object to be freed. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* The `library' argument is taken to have access to FreeType's */ - /* memory handling functions. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Bitmap_Done( FT_Library library, - FT_Bitmap *bitmap ); - - - /* */ - - -FT_END_HEADER - -#endif /* FTBITMAP_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftbzip2.h b/builddir/freetype-2.7.0/include/freetype/ftbzip2.h deleted file mode 100644 index b7f2eee..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftbzip2.h +++ /dev/null @@ -1,102 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftbzip2.h */ -/* */ -/* Bzip2-compressed stream support. */ -/* */ -/* Copyright 2010-2016 by */ -/* Joel Klinghed. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTBZIP2_H_ -#define FTBZIP2_H_ - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - /*************************************************************************/ - /* */ - /* <Section> */ - /* bzip2 */ - /* */ - /* <Title> */ - /* BZIP2 Streams */ - /* */ - /* <Abstract> */ - /* Using bzip2-compressed font files. */ - /* */ - /* <Description> */ - /* This section contains the declaration of Bzip2-specific functions. */ - /* */ - /*************************************************************************/ - - - /************************************************************************ - * - * @function: - * FT_Stream_OpenBzip2 - * - * @description: - * Open a new stream to parse bzip2-compressed font files. This is - * mainly used to support the compressed `*.pcf.bz2' fonts that come - * with XFree86. - * - * @input: - * stream :: - * The target embedding stream. - * - * source :: - * The source stream. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * The source stream must be opened _before_ calling this function. - * - * Calling the internal function `FT_Stream_Close' on the new stream will - * *not* call `FT_Stream_Close' on the source stream. None of the stream - * objects will be released to the heap. - * - * The stream implementation is very basic and resets the decompression - * process each time seeking backwards is needed within the stream. - * - * In certain builds of the library, bzip2 compression recognition is - * automatically handled when calling @FT_New_Face or @FT_Open_Face. - * This means that if no font driver is capable of handling the raw - * compressed file, the library will try to open a bzip2 compressed stream - * from it and re-open the face with it. - * - * This function may return `FT_Err_Unimplemented_Feature' if your build - * of FreeType was not compiled with bzip2 support. - */ - FT_EXPORT( FT_Error ) - FT_Stream_OpenBzip2( FT_Stream stream, - FT_Stream source ); - - /* */ - - -FT_END_HEADER - -#endif /* FTBZIP2_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftcache.h b/builddir/freetype-2.7.0/include/freetype/ftcache.h deleted file mode 100644 index 883c88d..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftcache.h +++ /dev/null @@ -1,1057 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftcache.h */ -/* */ -/* FreeType Cache subsystem (specification). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTCACHE_H_ -#define FTCACHE_H_ - - -#include <ft2build.h> -#include FT_GLYPH_H - - -FT_BEGIN_HEADER - - - /************************************************************************* - * - * <Section> - * cache_subsystem - * - * <Title> - * Cache Sub-System - * - * <Abstract> - * How to cache face, size, and glyph data with FreeType~2. - * - * <Description> - * This section describes the FreeType~2 cache sub-system, which is used - * to limit the number of concurrently opened @FT_Face and @FT_Size - * objects, as well as caching information like character maps and glyph - * images while limiting their maximum memory usage. - * - * Note that all types and functions begin with the `FTC_' prefix. - * - * The cache is highly portable and thus doesn't know anything about the - * fonts installed on your system, or how to access them. This implies - * the following scheme: - * - * First, available or installed font faces are uniquely identified by - * @FTC_FaceID values, provided to the cache by the client. Note that - * the cache only stores and compares these values, and doesn't try to - * interpret them in any way. - * - * Second, the cache calls, only when needed, a client-provided function - * to convert an @FTC_FaceID into a new @FT_Face object. The latter is - * then completely managed by the cache, including its termination - * through @FT_Done_Face. To monitor termination of face objects, the - * finalizer callback in the `generic' field of the @FT_Face object can - * be used, which might also be used to store the @FTC_FaceID of the - * face. - * - * Clients are free to map face IDs to anything else. The most simple - * usage is to associate them to a (pathname,face_index) pair that is - * used to call @FT_New_Face. However, more complex schemes are also - * possible. - * - * Note that for the cache to work correctly, the face ID values must be - * *persistent*, which means that the contents they point to should not - * change at runtime, or that their value should not become invalid. - * - * If this is unavoidable (e.g., when a font is uninstalled at runtime), - * you should call @FTC_Manager_RemoveFaceID as soon as possible, to let - * the cache get rid of any references to the old @FTC_FaceID it may - * keep internally. Failure to do so will lead to incorrect behaviour - * or even crashes. - * - * To use the cache, start with calling @FTC_Manager_New to create a new - * @FTC_Manager object, which models a single cache instance. You can - * then look up @FT_Face and @FT_Size objects with - * @FTC_Manager_LookupFace and @FTC_Manager_LookupSize, respectively. - * - * If you want to use the charmap caching, call @FTC_CMapCache_New, then - * later use @FTC_CMapCache_Lookup to perform the equivalent of - * @FT_Get_Char_Index, only much faster. - * - * If you want to use the @FT_Glyph caching, call @FTC_ImageCache, then - * later use @FTC_ImageCache_Lookup to retrieve the corresponding - * @FT_Glyph objects from the cache. - * - * If you need lots of small bitmaps, it is much more memory efficient - * to call @FTC_SBitCache_New followed by @FTC_SBitCache_Lookup. This - * returns @FTC_SBitRec structures, which are used to store small - * bitmaps directly. (A small bitmap is one whose metrics and - * dimensions all fit into 8-bit integers). - * - * We hope to also provide a kerning cache in the near future. - * - * - * <Order> - * FTC_Manager - * FTC_FaceID - * FTC_Face_Requester - * - * FTC_Manager_New - * FTC_Manager_Reset - * FTC_Manager_Done - * FTC_Manager_LookupFace - * FTC_Manager_LookupSize - * FTC_Manager_RemoveFaceID - * - * FTC_Node - * FTC_Node_Unref - * - * FTC_ImageCache - * FTC_ImageCache_New - * FTC_ImageCache_Lookup - * - * FTC_SBit - * FTC_SBitCache - * FTC_SBitCache_New - * FTC_SBitCache_Lookup - * - * FTC_CMapCache - * FTC_CMapCache_New - * FTC_CMapCache_Lookup - * - *************************************************************************/ - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** BASIC TYPE DEFINITIONS *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - - /************************************************************************* - * - * @type: FTC_FaceID - * - * @description: - * An opaque pointer type that is used to identity face objects. The - * contents of such objects is application-dependent. - * - * These pointers are typically used to point to a user-defined - * structure containing a font file path, and face index. - * - * @note: - * Never use NULL as a valid @FTC_FaceID. - * - * Face IDs are passed by the client to the cache manager that calls, - * when needed, the @FTC_Face_Requester to translate them into new - * @FT_Face objects. - * - * If the content of a given face ID changes at runtime, or if the value - * becomes invalid (e.g., when uninstalling a font), you should - * immediately call @FTC_Manager_RemoveFaceID before any other cache - * function. - * - * Failure to do so will result in incorrect behaviour or even - * memory leaks and crashes. - */ - typedef FT_Pointer FTC_FaceID; - - - /************************************************************************ - * - * @functype: - * FTC_Face_Requester - * - * @description: - * A callback function provided by client applications. It is used by - * the cache manager to translate a given @FTC_FaceID into a new valid - * @FT_Face object, on demand. - * - * <Input> - * face_id :: - * The face ID to resolve. - * - * library :: - * A handle to a FreeType library object. - * - * req_data :: - * Application-provided request data (see note below). - * - * <Output> - * aface :: - * A new @FT_Face handle. - * - * <Return> - * FreeType error code. 0~means success. - * - * <Note> - * The third parameter `req_data' is the same as the one passed by the - * client when @FTC_Manager_New is called. - * - * The face requester should not perform funny things on the returned - * face object, like creating a new @FT_Size for it, or setting a - * transformation through @FT_Set_Transform! - */ - typedef FT_Error - (*FTC_Face_Requester)( FTC_FaceID face_id, - FT_Library library, - FT_Pointer req_data, - FT_Face* aface ); - - /* */ - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** CACHE MANAGER OBJECT *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FTC_Manager */ - /* */ - /* <Description> */ - /* This object corresponds to one instance of the cache-subsystem. */ - /* It is used to cache one or more @FT_Face objects, along with */ - /* corresponding @FT_Size objects. */ - /* */ - /* The manager intentionally limits the total number of opened */ - /* @FT_Face and @FT_Size objects to control memory usage. See the */ - /* `max_faces' and `max_sizes' parameters of @FTC_Manager_New. */ - /* */ - /* The manager is also used to cache `nodes' of various types while */ - /* limiting their total memory usage. */ - /* */ - /* All limitations are enforced by keeping lists of managed objects */ - /* in most-recently-used order, and flushing old nodes to make room */ - /* for new ones. */ - /* */ - typedef struct FTC_ManagerRec_* FTC_Manager; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FTC_Node */ - /* */ - /* <Description> */ - /* An opaque handle to a cache node object. Each cache node is */ - /* reference-counted. A node with a count of~0 might be flushed */ - /* out of a full cache whenever a lookup request is performed. */ - /* */ - /* If you look up nodes, you have the ability to `acquire' them, */ - /* i.e., to increment their reference count. This will prevent the */ - /* node from being flushed out of the cache until you explicitly */ - /* `release' it (see @FTC_Node_Unref). */ - /* */ - /* See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup. */ - /* */ - typedef struct FTC_NodeRec_* FTC_Node; - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FTC_Manager_New */ - /* */ - /* <Description> */ - /* Create a new cache manager. */ - /* */ - /* <Input> */ - /* library :: The parent FreeType library handle to use. */ - /* */ - /* max_faces :: Maximum number of opened @FT_Face objects managed by */ - /* this cache instance. Use~0 for defaults. */ - /* */ - /* max_sizes :: Maximum number of opened @FT_Size objects managed by */ - /* this cache instance. Use~0 for defaults. */ - /* */ - /* max_bytes :: Maximum number of bytes to use for cached data nodes. */ - /* Use~0 for defaults. Note that this value does not */ - /* account for managed @FT_Face and @FT_Size objects. */ - /* */ - /* requester :: An application-provided callback used to translate */ - /* face IDs into real @FT_Face objects. */ - /* */ - /* req_data :: A generic pointer that is passed to the requester */ - /* each time it is called (see @FTC_Face_Requester). */ - /* */ - /* <Output> */ - /* amanager :: A handle to a new manager object. 0~in case of */ - /* failure. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FTC_Manager_New( FT_Library library, - FT_UInt max_faces, - FT_UInt max_sizes, - FT_ULong max_bytes, - FTC_Face_Requester requester, - FT_Pointer req_data, - FTC_Manager *amanager ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FTC_Manager_Reset */ - /* */ - /* <Description> */ - /* Empty a given cache manager. This simply gets rid of all the */ - /* currently cached @FT_Face and @FT_Size objects within the manager. */ - /* */ - /* <InOut> */ - /* manager :: A handle to the manager. */ - /* */ - FT_EXPORT( void ) - FTC_Manager_Reset( FTC_Manager manager ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FTC_Manager_Done */ - /* */ - /* <Description> */ - /* Destroy a given manager after emptying it. */ - /* */ - /* <Input> */ - /* manager :: A handle to the target cache manager object. */ - /* */ - FT_EXPORT( void ) - FTC_Manager_Done( FTC_Manager manager ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FTC_Manager_LookupFace */ - /* */ - /* <Description> */ - /* Retrieve the @FT_Face object that corresponds to a given face ID */ - /* through a cache manager. */ - /* */ - /* <Input> */ - /* manager :: A handle to the cache manager. */ - /* */ - /* face_id :: The ID of the face object. */ - /* */ - /* <Output> */ - /* aface :: A handle to the face object. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* The returned @FT_Face object is always owned by the manager. You */ - /* should never try to discard it yourself. */ - /* */ - /* The @FT_Face object doesn't necessarily have a current size object */ - /* (i.e., face->size can be~0). If you need a specific `font size', */ - /* use @FTC_Manager_LookupSize instead. */ - /* */ - /* Never change the face's transformation matrix (i.e., never call */ - /* the @FT_Set_Transform function) on a returned face! If you need */ - /* to transform glyphs, do it yourself after glyph loading. */ - /* */ - /* When you perform a lookup, out-of-memory errors are detected */ - /* _within_ the lookup and force incremental flushes of the cache */ - /* until enough memory is released for the lookup to succeed. */ - /* */ - /* If a lookup fails with `FT_Err_Out_Of_Memory' the cache has */ - /* already been completely flushed, and still no memory was available */ - /* for the operation. */ - /* */ - FT_EXPORT( FT_Error ) - FTC_Manager_LookupFace( FTC_Manager manager, - FTC_FaceID face_id, - FT_Face *aface ); - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FTC_ScalerRec */ - /* */ - /* <Description> */ - /* A structure used to describe a given character size in either */ - /* pixels or points to the cache manager. See */ - /* @FTC_Manager_LookupSize. */ - /* */ - /* <Fields> */ - /* face_id :: The source face ID. */ - /* */ - /* width :: The character width. */ - /* */ - /* height :: The character height. */ - /* */ - /* pixel :: A Boolean. If 1, the `width' and `height' fields are */ - /* interpreted as integer pixel character sizes. */ - /* Otherwise, they are expressed as 1/64th of points. */ - /* */ - /* x_res :: Only used when `pixel' is value~0 to indicate the */ - /* horizontal resolution in dpi. */ - /* */ - /* y_res :: Only used when `pixel' is value~0 to indicate the */ - /* vertical resolution in dpi. */ - /* */ - /* <Note> */ - /* This type is mainly used to retrieve @FT_Size objects through the */ - /* cache manager. */ - /* */ - typedef struct FTC_ScalerRec_ - { - FTC_FaceID face_id; - FT_UInt width; - FT_UInt height; - FT_Int pixel; - FT_UInt x_res; - FT_UInt y_res; - - } FTC_ScalerRec; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FTC_Scaler */ - /* */ - /* <Description> */ - /* A handle to an @FTC_ScalerRec structure. */ - /* */ - typedef struct FTC_ScalerRec_* FTC_Scaler; - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FTC_Manager_LookupSize */ - /* */ - /* <Description> */ - /* Retrieve the @FT_Size object that corresponds to a given */ - /* @FTC_ScalerRec pointer through a cache manager. */ - /* */ - /* <Input> */ - /* manager :: A handle to the cache manager. */ - /* */ - /* scaler :: A scaler handle. */ - /* */ - /* <Output> */ - /* asize :: A handle to the size object. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* The returned @FT_Size object is always owned by the manager. You */ - /* should never try to discard it by yourself. */ - /* */ - /* You can access the parent @FT_Face object simply as `size->face' */ - /* if you need it. Note that this object is also owned by the */ - /* manager. */ - /* */ - /* <Note> */ - /* When you perform a lookup, out-of-memory errors are detected */ - /* _within_ the lookup and force incremental flushes of the cache */ - /* until enough memory is released for the lookup to succeed. */ - /* */ - /* If a lookup fails with `FT_Err_Out_Of_Memory' the cache has */ - /* already been completely flushed, and still no memory is available */ - /* for the operation. */ - /* */ - FT_EXPORT( FT_Error ) - FTC_Manager_LookupSize( FTC_Manager manager, - FTC_Scaler scaler, - FT_Size *asize ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FTC_Node_Unref */ - /* */ - /* <Description> */ - /* Decrement a cache node's internal reference count. When the count */ - /* reaches 0, it is not destroyed but becomes eligible for subsequent */ - /* cache flushes. */ - /* */ - /* <Input> */ - /* node :: The cache node handle. */ - /* */ - /* manager :: The cache manager handle. */ - /* */ - FT_EXPORT( void ) - FTC_Node_Unref( FTC_Node node, - FTC_Manager manager ); - - - /************************************************************************* - * - * @function: - * FTC_Manager_RemoveFaceID - * - * @description: - * A special function used to indicate to the cache manager that - * a given @FTC_FaceID is no longer valid, either because its - * content changed, or because it was deallocated or uninstalled. - * - * @input: - * manager :: - * The cache manager handle. - * - * face_id :: - * The @FTC_FaceID to be removed. - * - * @note: - * This function flushes all nodes from the cache corresponding to this - * `face_id', with the exception of nodes with a non-null reference - * count. - * - * Such nodes are however modified internally so as to never appear - * in later lookups with the same `face_id' value, and to be immediately - * destroyed when released by all their users. - * - */ - FT_EXPORT( void ) - FTC_Manager_RemoveFaceID( FTC_Manager manager, - FTC_FaceID face_id ); - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* cache_subsystem */ - /* */ - /*************************************************************************/ - - /************************************************************************* - * - * @type: - * FTC_CMapCache - * - * @description: - * An opaque handle used to model a charmap cache. This cache is to - * hold character codes -> glyph indices mappings. - * - */ - typedef struct FTC_CMapCacheRec_* FTC_CMapCache; - - - /************************************************************************* - * - * @function: - * FTC_CMapCache_New - * - * @description: - * Create a new charmap cache. - * - * @input: - * manager :: - * A handle to the cache manager. - * - * @output: - * acache :: - * A new cache handle. NULL in case of error. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * Like all other caches, this one will be destroyed with the cache - * manager. - * - */ - FT_EXPORT( FT_Error ) - FTC_CMapCache_New( FTC_Manager manager, - FTC_CMapCache *acache ); - - - /************************************************************************ - * - * @function: - * FTC_CMapCache_Lookup - * - * @description: - * Translate a character code into a glyph index, using the charmap - * cache. - * - * @input: - * cache :: - * A charmap cache handle. - * - * face_id :: - * The source face ID. - * - * cmap_index :: - * The index of the charmap in the source face. Any negative value - * means to use the cache @FT_Face's default charmap. - * - * char_code :: - * The character code (in the corresponding charmap). - * - * @return: - * Glyph index. 0~means `no glyph'. - * - */ - FT_EXPORT( FT_UInt ) - FTC_CMapCache_Lookup( FTC_CMapCache cache, - FTC_FaceID face_id, - FT_Int cmap_index, - FT_UInt32 char_code ); - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* cache_subsystem */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** IMAGE CACHE OBJECT *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - - /************************************************************************* - * - * @struct: - * FTC_ImageTypeRec - * - * @description: - * A structure used to model the type of images in a glyph cache. - * - * @fields: - * face_id :: - * The face ID. - * - * width :: - * The width in pixels. - * - * height :: - * The height in pixels. - * - * flags :: - * The load flags, as in @FT_Load_Glyph. - * - */ - typedef struct FTC_ImageTypeRec_ - { - FTC_FaceID face_id; - FT_UInt width; - FT_UInt height; - FT_Int32 flags; - - } FTC_ImageTypeRec; - - - /************************************************************************* - * - * @type: - * FTC_ImageType - * - * @description: - * A handle to an @FTC_ImageTypeRec structure. - * - */ - typedef struct FTC_ImageTypeRec_* FTC_ImageType; - - - /* */ - - -#define FTC_IMAGE_TYPE_COMPARE( d1, d2 ) \ - ( (d1)->face_id == (d2)->face_id && \ - (d1)->width == (d2)->width && \ - (d1)->flags == (d2)->flags ) - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FTC_ImageCache */ - /* */ - /* <Description> */ - /* A handle to a glyph image cache object. They are designed to */ - /* hold many distinct glyph images while not exceeding a certain */ - /* memory threshold. */ - /* */ - typedef struct FTC_ImageCacheRec_* FTC_ImageCache; - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FTC_ImageCache_New */ - /* */ - /* <Description> */ - /* Create a new glyph image cache. */ - /* */ - /* <Input> */ - /* manager :: The parent manager for the image cache. */ - /* */ - /* <Output> */ - /* acache :: A handle to the new glyph image cache object. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FTC_ImageCache_New( FTC_Manager manager, - FTC_ImageCache *acache ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FTC_ImageCache_Lookup */ - /* */ - /* <Description> */ - /* Retrieve a given glyph image from a glyph image cache. */ - /* */ - /* <Input> */ - /* cache :: A handle to the source glyph image cache. */ - /* */ - /* type :: A pointer to a glyph image type descriptor. */ - /* */ - /* gindex :: The glyph index to retrieve. */ - /* */ - /* <Output> */ - /* aglyph :: The corresponding @FT_Glyph object. 0~in case of */ - /* failure. */ - /* */ - /* anode :: Used to return the address of the corresponding cache */ - /* node after incrementing its reference count (see note */ - /* below). */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* The returned glyph is owned and managed by the glyph image cache. */ - /* Never try to transform or discard it manually! You can however */ - /* create a copy with @FT_Glyph_Copy and modify the new one. */ - /* */ - /* If `anode' is _not_ NULL, it receives the address of the cache */ - /* node containing the glyph image, after increasing its reference */ - /* count. This ensures that the node (as well as the @FT_Glyph) will */ - /* always be kept in the cache until you call @FTC_Node_Unref to */ - /* `release' it. */ - /* */ - /* If `anode' is NULL, the cache node is left unchanged, which means */ - /* that the @FT_Glyph could be flushed out of the cache on the next */ - /* call to one of the caching sub-system APIs. Don't assume that it */ - /* is persistent! */ - /* */ - FT_EXPORT( FT_Error ) - FTC_ImageCache_Lookup( FTC_ImageCache cache, - FTC_ImageType type, - FT_UInt gindex, - FT_Glyph *aglyph, - FTC_Node *anode ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FTC_ImageCache_LookupScaler */ - /* */ - /* <Description> */ - /* A variant of @FTC_ImageCache_Lookup that uses an @FTC_ScalerRec */ - /* to specify the face ID and its size. */ - /* */ - /* <Input> */ - /* cache :: A handle to the source glyph image cache. */ - /* */ - /* scaler :: A pointer to a scaler descriptor. */ - /* */ - /* load_flags :: The corresponding load flags. */ - /* */ - /* gindex :: The glyph index to retrieve. */ - /* */ - /* <Output> */ - /* aglyph :: The corresponding @FT_Glyph object. 0~in case of */ - /* failure. */ - /* */ - /* anode :: Used to return the address of the corresponding */ - /* cache node after incrementing its reference count */ - /* (see note below). */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* The returned glyph is owned and managed by the glyph image cache. */ - /* Never try to transform or discard it manually! You can however */ - /* create a copy with @FT_Glyph_Copy and modify the new one. */ - /* */ - /* If `anode' is _not_ NULL, it receives the address of the cache */ - /* node containing the glyph image, after increasing its reference */ - /* count. This ensures that the node (as well as the @FT_Glyph) will */ - /* always be kept in the cache until you call @FTC_Node_Unref to */ - /* `release' it. */ - /* */ - /* If `anode' is NULL, the cache node is left unchanged, which means */ - /* that the @FT_Glyph could be flushed out of the cache on the next */ - /* call to one of the caching sub-system APIs. Don't assume that it */ - /* is persistent! */ - /* */ - /* Calls to @FT_Set_Char_Size and friends have no effect on cached */ - /* glyphs; you should always use the FreeType cache API instead. */ - /* */ - FT_EXPORT( FT_Error ) - FTC_ImageCache_LookupScaler( FTC_ImageCache cache, - FTC_Scaler scaler, - FT_ULong load_flags, - FT_UInt gindex, - FT_Glyph *aglyph, - FTC_Node *anode ); - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FTC_SBit */ - /* */ - /* <Description> */ - /* A handle to a small bitmap descriptor. See the @FTC_SBitRec */ - /* structure for details. */ - /* */ - typedef struct FTC_SBitRec_* FTC_SBit; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FTC_SBitRec */ - /* */ - /* <Description> */ - /* A very compact structure used to describe a small glyph bitmap. */ - /* */ - /* <Fields> */ - /* width :: The bitmap width in pixels. */ - /* */ - /* height :: The bitmap height in pixels. */ - /* */ - /* left :: The horizontal distance from the pen position to the */ - /* left bitmap border (a.k.a. `left side bearing', or */ - /* `lsb'). */ - /* */ - /* top :: The vertical distance from the pen position (on the */ - /* baseline) to the upper bitmap border (a.k.a. `top */ - /* side bearing'). The distance is positive for upwards */ - /* y~coordinates. */ - /* */ - /* format :: The format of the glyph bitmap (monochrome or gray). */ - /* */ - /* max_grays :: Maximum gray level value (in the range 1 to~255). */ - /* */ - /* pitch :: The number of bytes per bitmap line. May be positive */ - /* or negative. */ - /* */ - /* xadvance :: The horizontal advance width in pixels. */ - /* */ - /* yadvance :: The vertical advance height in pixels. */ - /* */ - /* buffer :: A pointer to the bitmap pixels. */ - /* */ - typedef struct FTC_SBitRec_ - { - FT_Byte width; - FT_Byte height; - FT_Char left; - FT_Char top; - - FT_Byte format; - FT_Byte max_grays; - FT_Short pitch; - FT_Char xadvance; - FT_Char yadvance; - - FT_Byte* buffer; - - } FTC_SBitRec; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FTC_SBitCache */ - /* */ - /* <Description> */ - /* A handle to a small bitmap cache. These are special cache objects */ - /* used to store small glyph bitmaps (and anti-aliased pixmaps) in a */ - /* much more efficient way than the traditional glyph image cache */ - /* implemented by @FTC_ImageCache. */ - /* */ - typedef struct FTC_SBitCacheRec_* FTC_SBitCache; - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FTC_SBitCache_New */ - /* */ - /* <Description> */ - /* Create a new cache to store small glyph bitmaps. */ - /* */ - /* <Input> */ - /* manager :: A handle to the source cache manager. */ - /* */ - /* <Output> */ - /* acache :: A handle to the new sbit cache. NULL in case of error. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FTC_SBitCache_New( FTC_Manager manager, - FTC_SBitCache *acache ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FTC_SBitCache_Lookup */ - /* */ - /* <Description> */ - /* Look up a given small glyph bitmap in a given sbit cache and */ - /* `lock' it to prevent its flushing from the cache until needed. */ - /* */ - /* <Input> */ - /* cache :: A handle to the source sbit cache. */ - /* */ - /* type :: A pointer to the glyph image type descriptor. */ - /* */ - /* gindex :: The glyph index. */ - /* */ - /* <Output> */ - /* sbit :: A handle to a small bitmap descriptor. */ - /* */ - /* anode :: Used to return the address of the corresponding cache */ - /* node after incrementing its reference count (see note */ - /* below). */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* The small bitmap descriptor and its bit buffer are owned by the */ - /* cache and should never be freed by the application. They might */ - /* as well disappear from memory on the next cache lookup, so don't */ - /* treat them as persistent data. */ - /* */ - /* The descriptor's `buffer' field is set to~0 to indicate a missing */ - /* glyph bitmap. */ - /* */ - /* If `anode' is _not_ NULL, it receives the address of the cache */ - /* node containing the bitmap, after increasing its reference count. */ - /* This ensures that the node (as well as the image) will always be */ - /* kept in the cache until you call @FTC_Node_Unref to `release' it. */ - /* */ - /* If `anode' is NULL, the cache node is left unchanged, which means */ - /* that the bitmap could be flushed out of the cache on the next */ - /* call to one of the caching sub-system APIs. Don't assume that it */ - /* is persistent! */ - /* */ - FT_EXPORT( FT_Error ) - FTC_SBitCache_Lookup( FTC_SBitCache cache, - FTC_ImageType type, - FT_UInt gindex, - FTC_SBit *sbit, - FTC_Node *anode ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FTC_SBitCache_LookupScaler */ - /* */ - /* <Description> */ - /* A variant of @FTC_SBitCache_Lookup that uses an @FTC_ScalerRec */ - /* to specify the face ID and its size. */ - /* */ - /* <Input> */ - /* cache :: A handle to the source sbit cache. */ - /* */ - /* scaler :: A pointer to the scaler descriptor. */ - /* */ - /* load_flags :: The corresponding load flags. */ - /* */ - /* gindex :: The glyph index. */ - /* */ - /* <Output> */ - /* sbit :: A handle to a small bitmap descriptor. */ - /* */ - /* anode :: Used to return the address of the corresponding */ - /* cache node after incrementing its reference count */ - /* (see note below). */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* The small bitmap descriptor and its bit buffer are owned by the */ - /* cache and should never be freed by the application. They might */ - /* as well disappear from memory on the next cache lookup, so don't */ - /* treat them as persistent data. */ - /* */ - /* The descriptor's `buffer' field is set to~0 to indicate a missing */ - /* glyph bitmap. */ - /* */ - /* If `anode' is _not_ NULL, it receives the address of the cache */ - /* node containing the bitmap, after increasing its reference count. */ - /* This ensures that the node (as well as the image) will always be */ - /* kept in the cache until you call @FTC_Node_Unref to `release' it. */ - /* */ - /* If `anode' is NULL, the cache node is left unchanged, which means */ - /* that the bitmap could be flushed out of the cache on the next */ - /* call to one of the caching sub-system APIs. Don't assume that it */ - /* is persistent! */ - /* */ - FT_EXPORT( FT_Error ) - FTC_SBitCache_LookupScaler( FTC_SBitCache cache, - FTC_Scaler scaler, - FT_ULong load_flags, - FT_UInt gindex, - FTC_SBit *sbit, - FTC_Node *anode ); - - /* */ - - -FT_END_HEADER - -#endif /* FTCACHE_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftcffdrv.h b/builddir/freetype-2.7.0/include/freetype/ftcffdrv.h deleted file mode 100644 index 8f88cc4..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftcffdrv.h +++ /dev/null @@ -1,275 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftcffdrv.h */ -/* */ -/* FreeType API for controlling the CFF driver (specification only). */ -/* */ -/* Copyright 2013-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTCFFDRV_H_ -#define FTCFFDRV_H_ - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /************************************************************************** - * - * @section: - * cff_driver - * - * @title: - * The CFF driver - * - * @abstract: - * Controlling the CFF driver module. - * - * @description: - * While FreeType's CFF driver doesn't expose API functions by itself, - * it is possible to control its behaviour with @FT_Property_Set and - * @FT_Property_Get. The list below gives the available properties - * together with the necessary macros and structures. - * - * The CFF driver's module name is `cff'. - * - * *Hinting* *and* *antialiasing* *principles* *of* *the* *new* *engine* - * - * The rasterizer is positioning horizontal features (e.g., ascender - * height & x-height, or crossbars) on the pixel grid and minimizing the - * amount of antialiasing applied to them, while placing vertical - * features (vertical stems) on the pixel grid without hinting, thus - * representing the stem position and weight accurately. Sometimes the - * vertical stems may be only partially black. In this context, - * `antialiasing' means that stems are not positioned exactly on pixel - * borders, causing a fuzzy appearance. - * - * There are two principles behind this approach. - * - * 1) No hinting in the horizontal direction: Unlike `superhinted' - * TrueType, which changes glyph widths to accommodate regular - * inter-glyph spacing, Adobe's approach is `faithful to the design' in - * representing both the glyph width and the inter-glyph spacing - * designed for the font. This makes the screen display as close as it - * can be to the result one would get with infinite resolution, while - * preserving what is considered the key characteristics of each glyph. - * Note that the distances between unhinted and grid-fitted positions at - * small sizes are comparable to kerning values and thus would be - * noticeable (and distracting) while reading if hinting were applied. - * - * One of the reasons to not hint horizontally is antialiasing for LCD - * screens: The pixel geometry of modern displays supplies three - * vertical sub-pixels as the eye moves horizontally across each visible - * pixel. On devices where we can be certain this characteristic is - * present a rasterizer can take advantage of the sub-pixels to add - * increments of weight. In Western writing systems this turns out to - * be the more critical direction anyway; the weights and spacing of - * vertical stems (see above) are central to Armenian, Cyrillic, Greek, - * and Latin type designs. Even when the rasterizer uses greyscale - * antialiasing instead of color (a necessary compromise when one - * doesn't know the screen characteristics), the unhinted vertical - * features preserve the design's weight and spacing much better than - * aliased type would. - * - * 2) Alignment in the vertical direction: Weights and spacing along the - * y~axis are less critical; what is much more important is the visual - * alignment of related features (like cap-height and x-height). The - * sense of alignment for these is enhanced by the sharpness of grid-fit - * edges, while the cruder vertical resolution (full pixels instead of - * 1/3 pixels) is less of a problem. - * - * On the technical side, horizontal alignment zones for ascender, - * x-height, and other important height values (traditionally called - * `blue zones') as defined in the font are positioned independently, - * each being rounded to the nearest pixel edge, taking care of - * overshoot suppression at small sizes, stem darkening, and scaling. - * - * Hstems (this is, hint values defined in the font to help align - * horizontal features) that fall within a blue zone are said to be - * `captured' and are aligned to that zone. Uncaptured stems are moved - * in one of four ways, top edge up or down, bottom edge up or down. - * Unless there are conflicting hstems, the smallest movement is taken - * to minimize distortion. - * - * @order: - * hinting-engine[cff] - * no-stem-darkening[cff] - * darkening-parameters[cff] - * - */ - - - /************************************************************************** - * - * @property: - * hinting-engine[cff] - * - * @description: - * Thanks to Adobe, which contributed a new hinting (and parsing) - * engine, an application can select between `freetype' and `adobe' if - * compiled with CFF_CONFIG_OPTION_OLD_ENGINE. If this configuration - * macro isn't defined, `hinting-engine' does nothing. - * - * The default engine is `freetype' if CFF_CONFIG_OPTION_OLD_ENGINE is - * defined, and `adobe' otherwise. - * - * The following example code demonstrates how to select Adobe's hinting - * engine (omitting the error handling). - * - * { - * FT_Library library; - * FT_UInt hinting_engine = FT_CFF_HINTING_ADOBE; - * - * - * FT_Init_FreeType( &library ); - * - * FT_Property_Set( library, "cff", - * "hinting-engine", &hinting_engine ); - * } - * - * @note: - * This property can be used with @FT_Property_Get also. - * - * This property can be set via the `FREETYPE_PROPERTIES' environment - * variable (using values `adobe' or `freetype'). - */ - - - /************************************************************************** - * - * @enum: - * FT_CFF_HINTING_XXX - * - * @description: - * A list of constants used for the @hinting-engine[cff] property to - * select the hinting engine for CFF fonts. - * - * @values: - * FT_CFF_HINTING_FREETYPE :: - * Use the old FreeType hinting engine. - * - * FT_CFF_HINTING_ADOBE :: - * Use the hinting engine contributed by Adobe. - * - */ -#define FT_CFF_HINTING_FREETYPE 0 -#define FT_CFF_HINTING_ADOBE 1 - - - /************************************************************************** - * - * @property: - * no-stem-darkening[cff] - * - * @description: - * By default, the Adobe CFF engine darkens stems at smaller sizes, - * regardless of hinting, to enhance contrast. This feature requires - * a rendering system with proper gamma correction. Setting this - * property, stem darkening gets switched off. - * - * Note that stem darkening is never applied if @FT_LOAD_NO_SCALE is set. - * - * { - * FT_Library library; - * FT_Bool no_stem_darkening = TRUE; - * - * - * FT_Init_FreeType( &library ); - * - * FT_Property_Set( library, "cff", - * "no-stem-darkening", &no_stem_darkening ); - * } - * - * @note: - * This property can be used with @FT_Property_Get also. - * - * This property can be set via the `FREETYPE_PROPERTIES' environment - * variable (using values 1 and 0 for `on' and `off', respectively). - * - */ - - - /************************************************************************** - * - * @property: - * darkening-parameters[cff] - * - * @description: - * By default, the Adobe CFF engine darkens stems as follows (if the - * `no-stem-darkening' property isn't set): - * - * { - * stem width <= 0.5px: darkening amount = 0.4px - * stem width = 1px: darkening amount = 0.275px - * stem width = 1.667px: darkening amount = 0.275px - * stem width >= 2.333px: darkening amount = 0px - * } - * - * and piecewise linear in-between. At configuration time, these four - * control points can be set with the macro - * `CFF_CONFIG_OPTION_DARKENING_PARAMETERS'. At runtime, the control - * points can be changed using the `darkening-parameters' property, as - * the following example demonstrates. - * - * { - * FT_Library library; - * FT_Int darken_params[8] = { 500, 300, // x1, y1 - * 1000, 200, // x2, y2 - * 1500, 100, // x3, y3 - * 2000, 0 }; // x4, y4 - * - * - * FT_Init_FreeType( &library ); - * - * FT_Property_Set( library, "cff", - * "darkening-parameters", darken_params ); - * } - * - * The x~values give the stem width, and the y~values the darkening - * amount. The unit is 1000th of pixels. All coordinate values must be - * positive; the x~values must be monotonically increasing; the - * y~values must be monotonically decreasing and smaller than or - * equal to 500 (corresponding to half a pixel); the slope of each - * linear piece must be shallower than -1 (e.g., -.4). - * - * @note: - * This property can be used with @FT_Property_Get also. - * - * This property can be set via the `FREETYPE_PROPERTIES' environment - * variable, using eight comma-separated integers without spaces. Here - * the above example, using `\' to break the line for readability. - * - * { - * FREETYPE_PROPERTIES=\ - * cff:darkening-parameters=500,300,1000,200,1500,100,2000,0 - * } - */ - - /* */ - - -FT_END_HEADER - - -#endif /* FTCFFDRV_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftchapters.h b/builddir/freetype-2.7.0/include/freetype/ftchapters.h deleted file mode 100644 index ab43895..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftchapters.h +++ /dev/null @@ -1,135 +0,0 @@ -/***************************************************************************/ -/* */ -/* This file defines the structure of the FreeType reference. */ -/* It is used by the python script that generates the HTML files. */ -/* */ -/***************************************************************************/ - - -/***************************************************************************/ -/* */ -/* <Chapter> */ -/* general_remarks */ -/* */ -/* <Title> */ -/* General Remarks */ -/* */ -/* <Sections> */ -/* header_inclusion */ -/* user_allocation */ -/* */ -/***************************************************************************/ - - -/***************************************************************************/ -/* */ -/* <Chapter> */ -/* core_api */ -/* */ -/* <Title> */ -/* Core API */ -/* */ -/* <Sections> */ -/* version */ -/* basic_types */ -/* base_interface */ -/* glyph_variants */ -/* glyph_management */ -/* mac_specific */ -/* sizes_management */ -/* header_file_macros */ -/* */ -/***************************************************************************/ - - -/***************************************************************************/ -/* */ -/* <Chapter> */ -/* format_specific */ -/* */ -/* <Title> */ -/* Format-Specific API */ -/* */ -/* <Sections> */ -/* multiple_masters */ -/* truetype_tables */ -/* type1_tables */ -/* sfnt_names */ -/* bdf_fonts */ -/* cid_fonts */ -/* pfr_fonts */ -/* winfnt_fonts */ -/* font_formats */ -/* gasp_table */ -/* */ -/***************************************************************************/ - - -/***************************************************************************/ -/* */ -/* <Chapter> */ -/* module_specific */ -/* */ -/* <Title> */ -/* Controlling FreeType Modules */ -/* */ -/* <Sections> */ -/* auto_hinter */ -/* cff_driver */ -/* tt_driver */ -/* */ -/***************************************************************************/ - - -/***************************************************************************/ -/* */ -/* <Chapter> */ -/* cache_subsystem */ -/* */ -/* <Title> */ -/* Cache Sub-System */ -/* */ -/* <Sections> */ -/* cache_subsystem */ -/* */ -/***************************************************************************/ - - -/***************************************************************************/ -/* */ -/* <Chapter> */ -/* support_api */ -/* */ -/* <Title> */ -/* Support API */ -/* */ -/* <Sections> */ -/* computations */ -/* list_processing */ -/* outline_processing */ -/* quick_advance */ -/* bitmap_handling */ -/* raster */ -/* glyph_stroker */ -/* system_interface */ -/* module_management */ -/* gzip */ -/* lzw */ -/* bzip2 */ -/* lcd_filtering */ -/* */ -/***************************************************************************/ - -/***************************************************************************/ -/* */ -/* <Chapter> */ -/* error_codes */ -/* */ -/* <Title> */ -/* Error Codes */ -/* */ -/* <Sections> */ -/* error_enumerations */ -/* error_code_values */ -/* */ -/***************************************************************************/ diff --git a/builddir/freetype-2.7.0/include/freetype/ftcid.h b/builddir/freetype-2.7.0/include/freetype/ftcid.h deleted file mode 100644 index e1bc9fe..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftcid.h +++ /dev/null @@ -1,168 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftcid.h */ -/* */ -/* FreeType API for accessing CID font information (specification). */ -/* */ -/* Copyright 2007-2016 by */ -/* Dereg Clegg and Michael Toftdal. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTCID_H_ -#define FTCID_H_ - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* cid_fonts */ - /* */ - /* <Title> */ - /* CID Fonts */ - /* */ - /* <Abstract> */ - /* CID-keyed font specific API. */ - /* */ - /* <Description> */ - /* This section contains the declaration of CID-keyed font specific */ - /* functions. */ - /* */ - /*************************************************************************/ - - - /********************************************************************** - * - * @function: - * FT_Get_CID_Registry_Ordering_Supplement - * - * @description: - * Retrieve the Registry/Ordering/Supplement triple (also known as the - * "R/O/S") from a CID-keyed font. - * - * @input: - * face :: - * A handle to the input face. - * - * @output: - * registry :: - * The registry, as a C~string, owned by the face. - * - * ordering :: - * The ordering, as a C~string, owned by the face. - * - * supplement :: - * The supplement. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * This function only works with CID faces, returning an error - * otherwise. - * - * @since: - * 2.3.6 - */ - FT_EXPORT( FT_Error ) - FT_Get_CID_Registry_Ordering_Supplement( FT_Face face, - const char* *registry, - const char* *ordering, - FT_Int *supplement); - - - /********************************************************************** - * - * @function: - * FT_Get_CID_Is_Internally_CID_Keyed - * - * @description: - * Retrieve the type of the input face, CID keyed or not. In - * contrast to the @FT_IS_CID_KEYED macro this function returns - * successfully also for CID-keyed fonts in an SFNT wrapper. - * - * @input: - * face :: - * A handle to the input face. - * - * @output: - * is_cid :: - * The type of the face as an @FT_Bool. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * This function only works with CID faces and OpenType fonts, - * returning an error otherwise. - * - * @since: - * 2.3.9 - */ - FT_EXPORT( FT_Error ) - FT_Get_CID_Is_Internally_CID_Keyed( FT_Face face, - FT_Bool *is_cid ); - - - /********************************************************************** - * - * @function: - * FT_Get_CID_From_Glyph_Index - * - * @description: - * Retrieve the CID of the input glyph index. - * - * @input: - * face :: - * A handle to the input face. - * - * glyph_index :: - * The input glyph index. - * - * @output: - * cid :: - * The CID as an @FT_UInt. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * This function only works with CID faces and OpenType fonts, - * returning an error otherwise. - * - * @since: - * 2.3.9 - */ - FT_EXPORT( FT_Error ) - FT_Get_CID_From_Glyph_Index( FT_Face face, - FT_UInt glyph_index, - FT_UInt *cid ); - - /* */ - - -FT_END_HEADER - -#endif /* FTCID_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/fterrdef.h b/builddir/freetype-2.7.0/include/freetype/fterrdef.h deleted file mode 100644 index 3f53dd5..0000000 --- a/builddir/freetype-2.7.0/include/freetype/fterrdef.h +++ /dev/null @@ -1,276 +0,0 @@ -/***************************************************************************/ -/* */ -/* fterrdef.h */ -/* */ -/* FreeType error codes (specification). */ -/* */ -/* Copyright 2002-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* error_code_values */ - /* */ - /* <Title> */ - /* Error Code Values */ - /* */ - /* <Abstract> */ - /* All possible error codes returned by FreeType functions. */ - /* */ - /* <Description> */ - /* The list below is taken verbatim from the file `fterrdef.h' */ - /* (loaded automatically by including `FT_FREETYPE_H'). The first */ - /* argument of the `FT_ERROR_DEF_' macro is the error label; by */ - /* default, the prefix `FT_Err_' gets added so that you get error */ - /* names like `FT_Err_Cannot_Open_Resource'. The second argument is */ - /* the error code, and the last argument an error string, which is not */ - /* used by FreeType. */ - /* */ - /* Within your application you should *only* use error names and */ - /* *never* its numeric values! The latter might (and actually do) */ - /* change in forthcoming FreeType versions. */ - /* */ - /* Macro `FT_NOERRORDEF_' defines `FT_Err_Ok', which is always zero. */ - /* See the `Error Enumerations' subsection how to automatically */ - /* generate a list of error strings. */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Enum> */ - /* FT_Err_XXX */ - /* */ - /*************************************************************************/ - - /* generic errors */ - - FT_NOERRORDEF_( Ok, 0x00, - "no error" ) - - FT_ERRORDEF_( Cannot_Open_Resource, 0x01, - "cannot open resource" ) - FT_ERRORDEF_( Unknown_File_Format, 0x02, - "unknown file format" ) - FT_ERRORDEF_( Invalid_File_Format, 0x03, - "broken file" ) - FT_ERRORDEF_( Invalid_Version, 0x04, - "invalid FreeType version" ) - FT_ERRORDEF_( Lower_Module_Version, 0x05, - "module version is too low" ) - FT_ERRORDEF_( Invalid_Argument, 0x06, - "invalid argument" ) - FT_ERRORDEF_( Unimplemented_Feature, 0x07, - "unimplemented feature" ) - FT_ERRORDEF_( Invalid_Table, 0x08, - "broken table" ) - FT_ERRORDEF_( Invalid_Offset, 0x09, - "broken offset within table" ) - FT_ERRORDEF_( Array_Too_Large, 0x0A, - "array allocation size too large" ) - FT_ERRORDEF_( Missing_Module, 0x0B, - "missing module" ) - FT_ERRORDEF_( Missing_Property, 0x0C, - "missing property" ) - - /* glyph/character errors */ - - FT_ERRORDEF_( Invalid_Glyph_Index, 0x10, - "invalid glyph index" ) - FT_ERRORDEF_( Invalid_Character_Code, 0x11, - "invalid character code" ) - FT_ERRORDEF_( Invalid_Glyph_Format, 0x12, - "unsupported glyph image format" ) - FT_ERRORDEF_( Cannot_Render_Glyph, 0x13, - "cannot render this glyph format" ) - FT_ERRORDEF_( Invalid_Outline, 0x14, - "invalid outline" ) - FT_ERRORDEF_( Invalid_Composite, 0x15, - "invalid composite glyph" ) - FT_ERRORDEF_( Too_Many_Hints, 0x16, - "too many hints" ) - FT_ERRORDEF_( Invalid_Pixel_Size, 0x17, - "invalid pixel size" ) - - /* handle errors */ - - FT_ERRORDEF_( Invalid_Handle, 0x20, - "invalid object handle" ) - FT_ERRORDEF_( Invalid_Library_Handle, 0x21, - "invalid library handle" ) - FT_ERRORDEF_( Invalid_Driver_Handle, 0x22, - "invalid module handle" ) - FT_ERRORDEF_( Invalid_Face_Handle, 0x23, - "invalid face handle" ) - FT_ERRORDEF_( Invalid_Size_Handle, 0x24, - "invalid size handle" ) - FT_ERRORDEF_( Invalid_Slot_Handle, 0x25, - "invalid glyph slot handle" ) - FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26, - "invalid charmap handle" ) - FT_ERRORDEF_( Invalid_Cache_Handle, 0x27, - "invalid cache manager handle" ) - FT_ERRORDEF_( Invalid_Stream_Handle, 0x28, - "invalid stream handle" ) - - /* driver errors */ - - FT_ERRORDEF_( Too_Many_Drivers, 0x30, - "too many modules" ) - FT_ERRORDEF_( Too_Many_Extensions, 0x31, - "too many extensions" ) - - /* memory errors */ - - FT_ERRORDEF_( Out_Of_Memory, 0x40, - "out of memory" ) - FT_ERRORDEF_( Unlisted_Object, 0x41, - "unlisted object" ) - - /* stream errors */ - - FT_ERRORDEF_( Cannot_Open_Stream, 0x51, - "cannot open stream" ) - FT_ERRORDEF_( Invalid_Stream_Seek, 0x52, - "invalid stream seek" ) - FT_ERRORDEF_( Invalid_Stream_Skip, 0x53, - "invalid stream skip" ) - FT_ERRORDEF_( Invalid_Stream_Read, 0x54, - "invalid stream read" ) - FT_ERRORDEF_( Invalid_Stream_Operation, 0x55, - "invalid stream operation" ) - FT_ERRORDEF_( Invalid_Frame_Operation, 0x56, - "invalid frame operation" ) - FT_ERRORDEF_( Nested_Frame_Access, 0x57, - "nested frame access" ) - FT_ERRORDEF_( Invalid_Frame_Read, 0x58, - "invalid frame read" ) - - /* raster errors */ - - FT_ERRORDEF_( Raster_Uninitialized, 0x60, - "raster uninitialized" ) - FT_ERRORDEF_( Raster_Corrupted, 0x61, - "raster corrupted" ) - FT_ERRORDEF_( Raster_Overflow, 0x62, - "raster overflow" ) - FT_ERRORDEF_( Raster_Negative_Height, 0x63, - "negative height while rastering" ) - - /* cache errors */ - - FT_ERRORDEF_( Too_Many_Caches, 0x70, - "too many registered caches" ) - - /* TrueType and SFNT errors */ - - FT_ERRORDEF_( Invalid_Opcode, 0x80, - "invalid opcode" ) - FT_ERRORDEF_( Too_Few_Arguments, 0x81, - "too few arguments" ) - FT_ERRORDEF_( Stack_Overflow, 0x82, - "stack overflow" ) - FT_ERRORDEF_( Code_Overflow, 0x83, - "code overflow" ) - FT_ERRORDEF_( Bad_Argument, 0x84, - "bad argument" ) - FT_ERRORDEF_( Divide_By_Zero, 0x85, - "division by zero" ) - FT_ERRORDEF_( Invalid_Reference, 0x86, - "invalid reference" ) - FT_ERRORDEF_( Debug_OpCode, 0x87, - "found debug opcode" ) - FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88, - "found ENDF opcode in execution stream" ) - FT_ERRORDEF_( Nested_DEFS, 0x89, - "nested DEFS" ) - FT_ERRORDEF_( Invalid_CodeRange, 0x8A, - "invalid code range" ) - FT_ERRORDEF_( Execution_Too_Long, 0x8B, - "execution context too long" ) - FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C, - "too many function definitions" ) - FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D, - "too many instruction definitions" ) - FT_ERRORDEF_( Table_Missing, 0x8E, - "SFNT font table missing" ) - FT_ERRORDEF_( Horiz_Header_Missing, 0x8F, - "horizontal header (hhea) table missing" ) - FT_ERRORDEF_( Locations_Missing, 0x90, - "locations (loca) table missing" ) - FT_ERRORDEF_( Name_Table_Missing, 0x91, - "name table missing" ) - FT_ERRORDEF_( CMap_Table_Missing, 0x92, - "character map (cmap) table missing" ) - FT_ERRORDEF_( Hmtx_Table_Missing, 0x93, - "horizontal metrics (hmtx) table missing" ) - FT_ERRORDEF_( Post_Table_Missing, 0x94, - "PostScript (post) table missing" ) - FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95, - "invalid horizontal metrics" ) - FT_ERRORDEF_( Invalid_CharMap_Format, 0x96, - "invalid character map (cmap) format" ) - FT_ERRORDEF_( Invalid_PPem, 0x97, - "invalid ppem value" ) - FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98, - "invalid vertical metrics" ) - FT_ERRORDEF_( Could_Not_Find_Context, 0x99, - "could not find context" ) - FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A, - "invalid PostScript (post) table format" ) - FT_ERRORDEF_( Invalid_Post_Table, 0x9B, - "invalid PostScript (post) table" ) - - /* CFF, CID, and Type 1 errors */ - - FT_ERRORDEF_( Syntax_Error, 0xA0, - "opcode syntax error" ) - FT_ERRORDEF_( Stack_Underflow, 0xA1, - "argument stack underflow" ) - FT_ERRORDEF_( Ignore, 0xA2, - "ignore" ) - FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, - "no Unicode glyph name found" ) - FT_ERRORDEF_( Glyph_Too_Big, 0xA4, - "glyph too big for hinting" ) - - /* BDF errors */ - - FT_ERRORDEF_( Missing_Startfont_Field, 0xB0, - "`STARTFONT' field missing" ) - FT_ERRORDEF_( Missing_Font_Field, 0xB1, - "`FONT' field missing" ) - FT_ERRORDEF_( Missing_Size_Field, 0xB2, - "`SIZE' field missing" ) - FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3, - "`FONTBOUNDINGBOX' field missing" ) - FT_ERRORDEF_( Missing_Chars_Field, 0xB4, - "`CHARS' field missing" ) - FT_ERRORDEF_( Missing_Startchar_Field, 0xB5, - "`STARTCHAR' field missing" ) - FT_ERRORDEF_( Missing_Encoding_Field, 0xB6, - "`ENCODING' field missing" ) - FT_ERRORDEF_( Missing_Bbx_Field, 0xB7, - "`BBX' field missing" ) - FT_ERRORDEF_( Bbx_Too_Big, 0xB8, - "`BBX' too big" ) - FT_ERRORDEF_( Corrupted_Font_Header, 0xB9, - "Font header corrupted or missing fields" ) - FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA, - "Font glyphs corrupted or missing fields" ) - - /* */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/fterrors.h b/builddir/freetype-2.7.0/include/freetype/fterrors.h deleted file mode 100644 index e15bfb0..0000000 --- a/builddir/freetype-2.7.0/include/freetype/fterrors.h +++ /dev/null @@ -1,226 +0,0 @@ -/***************************************************************************/ -/* */ -/* fterrors.h */ -/* */ -/* FreeType error code handling (specification). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* error_enumerations */ - /* */ - /* <Title> */ - /* Error Enumerations */ - /* */ - /* <Abstract> */ - /* How to handle errors and error strings. */ - /* */ - /* <Description> */ - /* The header file `fterrors.h' (which is automatically included by */ - /* `freetype.h' defines the handling of FreeType's enumeration */ - /* constants. It can also be used to generate error message strings */ - /* with a small macro trick explained below. */ - /* */ - /* *Error* *Formats* */ - /* */ - /* The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be */ - /* defined in `ftoption.h' in order to make the higher byte indicate */ - /* the module where the error has happened (this is not compatible */ - /* with standard builds of FreeType 2, however). See the file */ - /* `ftmoderr.h' for more details. */ - /* */ - /* *Error* *Message* *Strings* */ - /* */ - /* Error definitions are set up with special macros that allow client */ - /* applications to build a table of error message strings. The */ - /* strings are not included in a normal build of FreeType 2 to */ - /* save space (most client applications do not use them). */ - /* */ - /* To do so, you have to define the following macros before including */ - /* this file. */ - /* */ - /* { */ - /* FT_ERROR_START_LIST */ - /* } */ - /* */ - /* This macro is called before anything else to define the start of */ - /* the error list. It is followed by several FT_ERROR_DEF calls. */ - /* */ - /* { */ - /* FT_ERROR_DEF( e, v, s ) */ - /* } */ - /* */ - /* This macro is called to define one single error. `e' is the error */ - /* code identifier (e.g., `Invalid_Argument'), `v' is the error's */ - /* numerical value, and `s' is the corresponding error string. */ - /* */ - /* { */ - /* FT_ERROR_END_LIST */ - /* } */ - /* */ - /* This macro ends the list. */ - /* */ - /* Additionally, you have to undefine `FTERRORS_H_' before #including */ - /* this file. */ - /* */ - /* Here is a simple example. */ - /* */ - /* { */ - /* #undef FTERRORS_H_ */ - /* #define FT_ERRORDEF( e, v, s ) { e, s }, */ - /* #define FT_ERROR_START_LIST { */ - /* #define FT_ERROR_END_LIST { 0, NULL } }; */ - /* */ - /* const struct */ - /* { */ - /* int err_code; */ - /* const char* err_msg; */ - /* } ft_errors[] = */ - /* */ - /* #include FT_ERRORS_H */ - /* } */ - /* */ - /* Note that `FT_Err_Ok' is _not_ defined with `FT_ERRORDEF' but with */ - /* `FT_NOERRORDEF'; it is always zero. */ - /* */ - /*************************************************************************/ - - /* */ - - /* In previous FreeType versions we used `__FTERRORS_H__'. However, */ - /* using two successive underscores in a non-system symbol name */ - /* violates the C (and C++) standard, so it was changed to the */ - /* current form. In spite of this, we have to make */ - /* */ - /* #undefine __FTERRORS_H__ */ - /* */ - /* work for backwards compatibility. */ - /* */ -#if !( defined( FTERRORS_H_ ) && defined ( __FTERRORS_H__ ) ) -#define FTERRORS_H_ -#define __FTERRORS_H__ - - - /* include module base error codes */ -#include FT_MODULE_ERRORS_H - - - /*******************************************************************/ - /*******************************************************************/ - /***** *****/ - /***** SETUP MACROS *****/ - /***** *****/ - /*******************************************************************/ - /*******************************************************************/ - - -#undef FT_NEED_EXTERN_C - - - /* FT_ERR_PREFIX is used as a prefix for error identifiers. */ - /* By default, we use `FT_Err_'. */ - /* */ -#ifndef FT_ERR_PREFIX -#define FT_ERR_PREFIX FT_Err_ -#endif - - - /* FT_ERR_BASE is used as the base for module-specific errors. */ - /* */ -#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS - -#ifndef FT_ERR_BASE -#define FT_ERR_BASE FT_Mod_Err_Base -#endif - -#else - -#undef FT_ERR_BASE -#define FT_ERR_BASE 0 - -#endif /* FT_CONFIG_OPTION_USE_MODULE_ERRORS */ - - - /* If FT_ERRORDEF is not defined, we need to define a simple */ - /* enumeration type. */ - /* */ -#ifndef FT_ERRORDEF - -#define FT_ERRORDEF( e, v, s ) e = v, -#define FT_ERROR_START_LIST enum { -#define FT_ERROR_END_LIST FT_ERR_CAT( FT_ERR_PREFIX, Max ) }; - -#ifdef __cplusplus -#define FT_NEED_EXTERN_C - extern "C" { -#endif - -#endif /* !FT_ERRORDEF */ - - - /* this macro is used to define an error */ -#define FT_ERRORDEF_( e, v, s ) \ - FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s ) - - /* this is only used for <module>_Err_Ok, which must be 0! */ -#define FT_NOERRORDEF_( e, v, s ) \ - FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s ) - - -#ifdef FT_ERROR_START_LIST - FT_ERROR_START_LIST -#endif - - - /* now include the error codes */ -#include FT_ERROR_DEFINITIONS_H - - -#ifdef FT_ERROR_END_LIST - FT_ERROR_END_LIST -#endif - - - /*******************************************************************/ - /*******************************************************************/ - /***** *****/ - /***** SIMPLE CLEANUP *****/ - /***** *****/ - /*******************************************************************/ - /*******************************************************************/ - -#ifdef FT_NEED_EXTERN_C - } -#endif - -#undef FT_ERROR_START_LIST -#undef FT_ERROR_END_LIST - -#undef FT_ERRORDEF -#undef FT_ERRORDEF_ -#undef FT_NOERRORDEF_ - -#undef FT_NEED_EXTERN_C -#undef FT_ERR_BASE - - /* FT_ERR_PREFIX is needed internally */ -#ifndef FT2_BUILD_LIBRARY -#undef FT_ERR_PREFIX -#endif - -#endif /* !(FTERRORS_H_ && __FTERRORS_H__) */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftfntfmt.h b/builddir/freetype-2.7.0/include/freetype/ftfntfmt.h deleted file mode 100644 index bd42324..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftfntfmt.h +++ /dev/null @@ -1,95 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftfntfmt.h */ -/* */ -/* Support functions for font formats. */ -/* */ -/* Copyright 2002-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTFNTFMT_H_ -#define FTFNTFMT_H_ - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* font_formats */ - /* */ - /* <Title> */ - /* Font Formats */ - /* */ - /* <Abstract> */ - /* Getting the font format. */ - /* */ - /* <Description> */ - /* The single function in this section can be used to get the font */ - /* format. Note that this information is not needed normally; */ - /* however, there are special cases (like in PDF devices) where it is */ - /* important to differentiate, in spite of FreeType's uniform API. */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Font_Format */ - /* */ - /* <Description> */ - /* Return a string describing the format of a given face. Possible */ - /* values are `TrueType', `Type~1', `BDF', `PCF', `Type~42', */ - /* `CID~Type~1', `CFF', `PFR', and `Windows~FNT'. */ - /* */ - /* The return value is suitable to be used as an X11 FONT_PROPERTY. */ - /* */ - /* <Input> */ - /* face :: */ - /* Input face handle. */ - /* */ - /* <Return> */ - /* Font format string. NULL in case of error. */ - /* */ - /* <Note> */ - /* A deprecated name for the same function is */ - /* `FT_Get_X11_Font_Format'. */ - /* */ - FT_EXPORT( const char* ) - FT_Get_Font_Format( FT_Face face ); - - - /* deprecated */ - FT_EXPORT( const char* ) - FT_Get_X11_Font_Format( FT_Face face ); - - - /* */ - - -FT_END_HEADER - -#endif /* FTFNTFMT_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftgasp.h b/builddir/freetype-2.7.0/include/freetype/ftgasp.h deleted file mode 100644 index 3f5b3bc..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftgasp.h +++ /dev/null @@ -1,129 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftgasp.h */ -/* */ -/* Access of TrueType's `gasp' table (specification). */ -/* */ -/* Copyright 2007-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTGASP_H_ -#define FTGASP_H_ - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - - /*************************************************************************** - * - * @section: - * gasp_table - * - * @title: - * Gasp Table - * - * @abstract: - * Retrieving TrueType `gasp' table entries. - * - * @description: - * The function @FT_Get_Gasp can be used to query a TrueType or OpenType - * font for specific entries in its `gasp' table, if any. This is - * mainly useful when implementing native TrueType hinting with the - * bytecode interpreter to duplicate the Windows text rendering results. - */ - - /************************************************************************* - * - * @enum: - * FT_GASP_XXX - * - * @description: - * A list of values and/or bit-flags returned by the @FT_Get_Gasp - * function. - * - * @values: - * FT_GASP_NO_TABLE :: - * This special value means that there is no GASP table in this face. - * It is up to the client to decide what to do. - * - * FT_GASP_DO_GRIDFIT :: - * Grid-fitting and hinting should be performed at the specified ppem. - * This *really* means TrueType bytecode interpretation. If this bit - * is not set, no hinting gets applied. - * - * FT_GASP_DO_GRAY :: - * Anti-aliased rendering should be performed at the specified ppem. - * If not set, do monochrome rendering. - * - * FT_GASP_SYMMETRIC_SMOOTHING :: - * If set, smoothing along multiple axes must be used with ClearType. - * - * FT_GASP_SYMMETRIC_GRIDFIT :: - * Grid-fitting must be used with ClearType's symmetric smoothing. - * - * @note: - * The bit-flags `FT_GASP_DO_GRIDFIT' and `FT_GASP_DO_GRAY' are to be - * used for standard font rasterization only. Independently of that, - * `FT_GASP_SYMMETRIC_SMOOTHING' and `FT_GASP_SYMMETRIC_GRIDFIT' are to - * be used if ClearType is enabled (and `FT_GASP_DO_GRIDFIT' and - * `FT_GASP_DO_GRAY' are consequently ignored). - * - * `ClearType' is Microsoft's implementation of LCD rendering, partly - * protected by patents. - * - * @since: - * 2.3.0 - */ -#define FT_GASP_NO_TABLE -1 -#define FT_GASP_DO_GRIDFIT 0x01 -#define FT_GASP_DO_GRAY 0x02 -#define FT_GASP_SYMMETRIC_SMOOTHING 0x08 -#define FT_GASP_SYMMETRIC_GRIDFIT 0x10 - - - /************************************************************************* - * - * @func: - * FT_Get_Gasp - * - * @description: - * Read the `gasp' table from a TrueType or OpenType font file and - * return the entry corresponding to a given character pixel size. - * - * @input: - * face :: The source face handle. - * ppem :: The vertical character pixel size. - * - * @return: - * Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no - * `gasp' table in the face. - * - * @since: - * 2.3.0 - */ - FT_EXPORT( FT_Int ) - FT_Get_Gasp( FT_Face face, - FT_UInt ppem ); - - /* */ - - -#endif /* FTGASP_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftglyph.h b/builddir/freetype-2.7.0/include/freetype/ftglyph.h deleted file mode 100644 index d9840a8..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftglyph.h +++ /dev/null @@ -1,605 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftglyph.h */ -/* */ -/* FreeType convenience functions to handle glyphs (specification). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /*************************************************************************/ - /* */ - /* This file contains the definition of several convenience functions */ - /* that can be used by client applications to easily retrieve glyph */ - /* bitmaps and outlines from a given face. */ - /* */ - /* These functions should be optional if you are writing a font server */ - /* or text layout engine on top of FreeType. However, they are pretty */ - /* handy for many other simple uses of the library. */ - /* */ - /*************************************************************************/ - - -#ifndef FTGLYPH_H_ -#define FTGLYPH_H_ - - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* glyph_management */ - /* */ - /* <Title> */ - /* Glyph Management */ - /* */ - /* <Abstract> */ - /* Generic interface to manage individual glyph data. */ - /* */ - /* <Description> */ - /* This section contains definitions used to manage glyph data */ - /* through generic FT_Glyph objects. Each of them can contain a */ - /* bitmap, a vector outline, or even images in other formats. */ - /* */ - /*************************************************************************/ - - - /* forward declaration to a private type */ - typedef struct FT_Glyph_Class_ FT_Glyph_Class; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Glyph */ - /* */ - /* <Description> */ - /* Handle to an object used to model generic glyph images. It is a */ - /* pointer to the @FT_GlyphRec structure and can contain a glyph */ - /* bitmap or pointer. */ - /* */ - /* <Note> */ - /* Glyph objects are not owned by the library. You must thus release */ - /* them manually (through @FT_Done_Glyph) _before_ calling */ - /* @FT_Done_FreeType. */ - /* */ - typedef struct FT_GlyphRec_* FT_Glyph; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_GlyphRec */ - /* */ - /* <Description> */ - /* The root glyph structure contains a given glyph image plus its */ - /* advance width in 16.16 fixed-point format. */ - /* */ - /* <Fields> */ - /* library :: A handle to the FreeType library object. */ - /* */ - /* clazz :: A pointer to the glyph's class. Private. */ - /* */ - /* format :: The format of the glyph's image. */ - /* */ - /* advance :: A 16.16 vector that gives the glyph's advance width. */ - /* */ - typedef struct FT_GlyphRec_ - { - FT_Library library; - const FT_Glyph_Class* clazz; - FT_Glyph_Format format; - FT_Vector advance; - - } FT_GlyphRec; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_BitmapGlyph */ - /* */ - /* <Description> */ - /* A handle to an object used to model a bitmap glyph image. This is */ - /* a sub-class of @FT_Glyph, and a pointer to @FT_BitmapGlyphRec. */ - /* */ - typedef struct FT_BitmapGlyphRec_* FT_BitmapGlyph; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_BitmapGlyphRec */ - /* */ - /* <Description> */ - /* A structure used for bitmap glyph images. This really is a */ - /* `sub-class' of @FT_GlyphRec. */ - /* */ - /* <Fields> */ - /* root :: The root @FT_Glyph fields. */ - /* */ - /* left :: The left-side bearing, i.e., the horizontal distance */ - /* from the current pen position to the left border of the */ - /* glyph bitmap. */ - /* */ - /* top :: The top-side bearing, i.e., the vertical distance from */ - /* the current pen position to the top border of the glyph */ - /* bitmap. This distance is positive for upwards~y! */ - /* */ - /* bitmap :: A descriptor for the bitmap. */ - /* */ - /* <Note> */ - /* You can typecast an @FT_Glyph to @FT_BitmapGlyph if you have */ - /* `glyph->format == FT_GLYPH_FORMAT_BITMAP'. This lets you access */ - /* the bitmap's contents easily. */ - /* */ - /* The corresponding pixel buffer is always owned by @FT_BitmapGlyph */ - /* and is thus created and destroyed with it. */ - /* */ - typedef struct FT_BitmapGlyphRec_ - { - FT_GlyphRec root; - FT_Int left; - FT_Int top; - FT_Bitmap bitmap; - - } FT_BitmapGlyphRec; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_OutlineGlyph */ - /* */ - /* <Description> */ - /* A handle to an object used to model an outline glyph image. This */ - /* is a sub-class of @FT_Glyph, and a pointer to @FT_OutlineGlyphRec. */ - /* */ - typedef struct FT_OutlineGlyphRec_* FT_OutlineGlyph; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_OutlineGlyphRec */ - /* */ - /* <Description> */ - /* A structure used for outline (vectorial) glyph images. This */ - /* really is a `sub-class' of @FT_GlyphRec. */ - /* */ - /* <Fields> */ - /* root :: The root @FT_Glyph fields. */ - /* */ - /* outline :: A descriptor for the outline. */ - /* */ - /* <Note> */ - /* You can typecast an @FT_Glyph to @FT_OutlineGlyph if you have */ - /* `glyph->format == FT_GLYPH_FORMAT_OUTLINE'. This lets you access */ - /* the outline's content easily. */ - /* */ - /* As the outline is extracted from a glyph slot, its coordinates are */ - /* expressed normally in 26.6 pixels, unless the flag */ - /* @FT_LOAD_NO_SCALE was used in @FT_Load_Glyph() or @FT_Load_Char(). */ - /* */ - /* The outline's tables are always owned by the object and are */ - /* destroyed with it. */ - /* */ - typedef struct FT_OutlineGlyphRec_ - { - FT_GlyphRec root; - FT_Outline outline; - - } FT_OutlineGlyphRec; - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Glyph */ - /* */ - /* <Description> */ - /* A function used to extract a glyph image from a slot. Note that */ - /* the created @FT_Glyph object must be released with @FT_Done_Glyph. */ - /* */ - /* <Input> */ - /* slot :: A handle to the source glyph slot. */ - /* */ - /* <Output> */ - /* aglyph :: A handle to the glyph object. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Get_Glyph( FT_GlyphSlot slot, - FT_Glyph *aglyph ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Glyph_Copy */ - /* */ - /* <Description> */ - /* A function used to copy a glyph image. Note that the created */ - /* @FT_Glyph object must be released with @FT_Done_Glyph. */ - /* */ - /* <Input> */ - /* source :: A handle to the source glyph object. */ - /* */ - /* <Output> */ - /* target :: A handle to the target glyph object. 0~in case of */ - /* error. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Glyph_Copy( FT_Glyph source, - FT_Glyph *target ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Glyph_Transform */ - /* */ - /* <Description> */ - /* Transform a glyph image if its format is scalable. */ - /* */ - /* <InOut> */ - /* glyph :: A handle to the target glyph object. */ - /* */ - /* <Input> */ - /* matrix :: A pointer to a 2x2 matrix to apply. */ - /* */ - /* delta :: A pointer to a 2d vector to apply. Coordinates are */ - /* expressed in 1/64th of a pixel. */ - /* */ - /* <Return> */ - /* FreeType error code (if not 0, the glyph format is not scalable). */ - /* */ - /* <Note> */ - /* The 2x2 transformation matrix is also applied to the glyph's */ - /* advance vector. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Glyph_Transform( FT_Glyph glyph, - FT_Matrix* matrix, - FT_Vector* delta ); - - - /*************************************************************************/ - /* */ - /* <Enum> */ - /* FT_Glyph_BBox_Mode */ - /* */ - /* <Description> */ - /* The mode how the values of @FT_Glyph_Get_CBox are returned. */ - /* */ - /* <Values> */ - /* FT_GLYPH_BBOX_UNSCALED :: */ - /* Return unscaled font units. */ - /* */ - /* FT_GLYPH_BBOX_SUBPIXELS :: */ - /* Return unfitted 26.6 coordinates. */ - /* */ - /* FT_GLYPH_BBOX_GRIDFIT :: */ - /* Return grid-fitted 26.6 coordinates. */ - /* */ - /* FT_GLYPH_BBOX_TRUNCATE :: */ - /* Return coordinates in integer pixels. */ - /* */ - /* FT_GLYPH_BBOX_PIXELS :: */ - /* Return grid-fitted pixel coordinates. */ - /* */ - typedef enum FT_Glyph_BBox_Mode_ - { - FT_GLYPH_BBOX_UNSCALED = 0, - FT_GLYPH_BBOX_SUBPIXELS = 0, - FT_GLYPH_BBOX_GRIDFIT = 1, - FT_GLYPH_BBOX_TRUNCATE = 2, - FT_GLYPH_BBOX_PIXELS = 3 - - } FT_Glyph_BBox_Mode; - - - /* these constants are deprecated; use the corresponding */ - /* `FT_Glyph_BBox_Mode' values instead */ -#define ft_glyph_bbox_unscaled FT_GLYPH_BBOX_UNSCALED -#define ft_glyph_bbox_subpixels FT_GLYPH_BBOX_SUBPIXELS -#define ft_glyph_bbox_gridfit FT_GLYPH_BBOX_GRIDFIT -#define ft_glyph_bbox_truncate FT_GLYPH_BBOX_TRUNCATE -#define ft_glyph_bbox_pixels FT_GLYPH_BBOX_PIXELS - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Glyph_Get_CBox */ - /* */ - /* <Description> */ - /* Return a glyph's `control box'. The control box encloses all the */ - /* outline's points, including Bézier control points. Though it */ - /* coincides with the exact bounding box for most glyphs, it can be */ - /* slightly larger in some situations (like when rotating an outline */ - /* that contains Bézier outside arcs). */ - /* */ - /* Computing the control box is very fast, while getting the bounding */ - /* box can take much more time as it needs to walk over all segments */ - /* and arcs in the outline. To get the latter, you can use the */ - /* `ftbbox' component, which is dedicated to this single task. */ - /* */ - /* <Input> */ - /* glyph :: A handle to the source glyph object. */ - /* */ - /* mode :: The mode that indicates how to interpret the returned */ - /* bounding box values. */ - /* */ - /* <Output> */ - /* acbox :: The glyph coordinate bounding box. Coordinates are */ - /* expressed in 1/64th of pixels if it is grid-fitted. */ - /* */ - /* <Note> */ - /* Coordinates are relative to the glyph origin, using the y~upwards */ - /* convention. */ - /* */ - /* If the glyph has been loaded with @FT_LOAD_NO_SCALE, `bbox_mode' */ - /* must be set to @FT_GLYPH_BBOX_UNSCALED to get unscaled font */ - /* units in 26.6 pixel format. The value @FT_GLYPH_BBOX_SUBPIXELS */ - /* is another name for this constant. */ - /* */ - /* If the font is tricky and the glyph has been loaded with */ - /* @FT_LOAD_NO_SCALE, the resulting CBox is meaningless. To get */ - /* reasonable values for the CBox it is necessary to load the glyph */ - /* at a large ppem value (so that the hinting instructions can */ - /* properly shift and scale the subglyphs), then extracting the CBox, */ - /* which can be eventually converted back to font units. */ - /* */ - /* Note that the maximum coordinates are exclusive, which means that */ - /* one can compute the width and height of the glyph image (be it in */ - /* integer or 26.6 pixels) as: */ - /* */ - /* { */ - /* width = bbox.xMax - bbox.xMin; */ - /* height = bbox.yMax - bbox.yMin; */ - /* } */ - /* */ - /* Note also that for 26.6 coordinates, if `bbox_mode' is set to */ - /* @FT_GLYPH_BBOX_GRIDFIT, the coordinates will also be grid-fitted, */ - /* which corresponds to: */ - /* */ - /* { */ - /* bbox.xMin = FLOOR(bbox.xMin); */ - /* bbox.yMin = FLOOR(bbox.yMin); */ - /* bbox.xMax = CEILING(bbox.xMax); */ - /* bbox.yMax = CEILING(bbox.yMax); */ - /* } */ - /* */ - /* To get the bbox in pixel coordinates, set `bbox_mode' to */ - /* @FT_GLYPH_BBOX_TRUNCATE. */ - /* */ - /* To get the bbox in grid-fitted pixel coordinates, set `bbox_mode' */ - /* to @FT_GLYPH_BBOX_PIXELS. */ - /* */ - FT_EXPORT( void ) - FT_Glyph_Get_CBox( FT_Glyph glyph, - FT_UInt bbox_mode, - FT_BBox *acbox ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Glyph_To_Bitmap */ - /* */ - /* <Description> */ - /* Convert a given glyph object to a bitmap glyph object. */ - /* */ - /* <InOut> */ - /* the_glyph :: A pointer to a handle to the target glyph. */ - /* */ - /* <Input> */ - /* render_mode :: An enumeration that describes how the data is */ - /* rendered. */ - /* */ - /* origin :: A pointer to a vector used to translate the glyph */ - /* image before rendering. Can be~0 (if no */ - /* translation). The origin is expressed in */ - /* 26.6 pixels. */ - /* */ - /* destroy :: A boolean that indicates that the original glyph */ - /* image should be destroyed by this function. It is */ - /* never destroyed in case of error. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* This function does nothing if the glyph format isn't scalable. */ - /* */ - /* The glyph image is translated with the `origin' vector before */ - /* rendering. */ - /* */ - /* The first parameter is a pointer to an @FT_Glyph handle, that will */ - /* be _replaced_ by this function (with newly allocated data). */ - /* Typically, you would use (omitting error handling): */ - /* */ - /* */ - /* { */ - /* FT_Glyph glyph; */ - /* FT_BitmapGlyph glyph_bitmap; */ - /* */ - /* */ - /* // load glyph */ - /* error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT ); */ - /* */ - /* // extract glyph image */ - /* error = FT_Get_Glyph( face->glyph, &glyph ); */ - /* */ - /* // convert to a bitmap (default render mode + destroying old) */ - /* if ( glyph->format != FT_GLYPH_FORMAT_BITMAP ) */ - /* { */ - /* error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL, */ - /* 0, 1 ); */ - /* if ( error ) // `glyph' unchanged */ - /* ... */ - /* } */ - /* */ - /* // access bitmap content by typecasting */ - /* glyph_bitmap = (FT_BitmapGlyph)glyph; */ - /* */ - /* // do funny stuff with it, like blitting/drawing */ - /* ... */ - /* */ - /* // discard glyph image (bitmap or not) */ - /* FT_Done_Glyph( glyph ); */ - /* } */ - /* */ - /* */ - /* Here another example, again without error handling: */ - /* */ - /* */ - /* { */ - /* FT_Glyph glyphs[MAX_GLYPHS] */ - /* */ - /* */ - /* ... */ - /* */ - /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ - /* error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) || */ - /* FT_Get_Glyph ( face->glyph, &glyph[idx] ); */ - /* */ - /* ... */ - /* */ - /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ - /* { */ - /* FT_Glyph bitmap = glyphs[idx]; */ - /* */ - /* */ - /* ... */ - /* */ - /* // after this call, `bitmap' no longer points into */ - /* // the `glyphs' array (and the old value isn't destroyed) */ - /* FT_Glyph_To_Bitmap( &bitmap, FT_RENDER_MODE_MONO, 0, 0 ); */ - /* */ - /* ... */ - /* */ - /* FT_Done_Glyph( bitmap ); */ - /* } */ - /* */ - /* ... */ - /* */ - /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ - /* FT_Done_Glyph( glyphs[idx] ); */ - /* } */ - /* */ - FT_EXPORT( FT_Error ) - FT_Glyph_To_Bitmap( FT_Glyph* the_glyph, - FT_Render_Mode render_mode, - FT_Vector* origin, - FT_Bool destroy ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Done_Glyph */ - /* */ - /* <Description> */ - /* Destroy a given glyph. */ - /* */ - /* <Input> */ - /* glyph :: A handle to the target glyph object. */ - /* */ - FT_EXPORT( void ) - FT_Done_Glyph( FT_Glyph glyph ); - - /* */ - - - /* other helpful functions */ - - /*************************************************************************/ - /* */ - /* <Section> */ - /* computations */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Matrix_Multiply */ - /* */ - /* <Description> */ - /* Perform the matrix operation `b = a*b'. */ - /* */ - /* <Input> */ - /* a :: A pointer to matrix `a'. */ - /* */ - /* <InOut> */ - /* b :: A pointer to matrix `b'. */ - /* */ - /* <Note> */ - /* The result is undefined if either `a' or `b' is zero. */ - /* */ - FT_EXPORT( void ) - FT_Matrix_Multiply( const FT_Matrix* a, - FT_Matrix* b ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Matrix_Invert */ - /* */ - /* <Description> */ - /* Invert a 2x2 matrix. Return an error if it can't be inverted. */ - /* */ - /* <InOut> */ - /* matrix :: A pointer to the target matrix. Remains untouched in */ - /* case of error. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Matrix_Invert( FT_Matrix* matrix ); - - /* */ - - -FT_END_HEADER - -#endif /* FTGLYPH_H_ */ - - -/* END */ - - -/* Local Variables: */ -/* coding: utf-8 */ -/* End: */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftgxval.h b/builddir/freetype-2.7.0/include/freetype/ftgxval.h deleted file mode 100644 index a58e86a..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftgxval.h +++ /dev/null @@ -1,357 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftgxval.h */ -/* */ -/* FreeType API for validating TrueTypeGX/AAT tables (specification). */ -/* */ -/* Copyright 2004-2016 by */ -/* Masatake YAMATO, Redhat K.K, */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - -/***************************************************************************/ -/* */ -/* gxvalid is derived from both gxlayout module and otvalid module. */ -/* Development of gxlayout is supported by the Information-technology */ -/* Promotion Agency(IPA), Japan. */ -/* */ -/***************************************************************************/ - - -#ifndef FTGXVAL_H_ -#define FTGXVAL_H_ - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* gx_validation */ - /* */ - /* <Title> */ - /* TrueTypeGX/AAT Validation */ - /* */ - /* <Abstract> */ - /* An API to validate TrueTypeGX/AAT tables. */ - /* */ - /* <Description> */ - /* This section contains the declaration of functions to validate */ - /* some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, */ - /* trak, prop, lcar). */ - /* */ - /* <Order> */ - /* FT_TrueTypeGX_Validate */ - /* FT_TrueTypeGX_Free */ - /* */ - /* FT_ClassicKern_Validate */ - /* FT_ClassicKern_Free */ - /* */ - /* FT_VALIDATE_GX_LENGTH */ - /* FT_VALIDATE_GXXXX */ - /* FT_VALIDATE_CKERNXXX */ - /* */ - /*************************************************************************/ - - /*************************************************************************/ - /* */ - /* */ - /* Warning: Use FT_VALIDATE_XXX to validate a table. */ - /* Following definitions are for gxvalid developers. */ - /* */ - /* */ - /*************************************************************************/ - -#define FT_VALIDATE_feat_INDEX 0 -#define FT_VALIDATE_mort_INDEX 1 -#define FT_VALIDATE_morx_INDEX 2 -#define FT_VALIDATE_bsln_INDEX 3 -#define FT_VALIDATE_just_INDEX 4 -#define FT_VALIDATE_kern_INDEX 5 -#define FT_VALIDATE_opbd_INDEX 6 -#define FT_VALIDATE_trak_INDEX 7 -#define FT_VALIDATE_prop_INDEX 8 -#define FT_VALIDATE_lcar_INDEX 9 -#define FT_VALIDATE_GX_LAST_INDEX FT_VALIDATE_lcar_INDEX - - - /************************************************************************* - * - * @macro: - * FT_VALIDATE_GX_LENGTH - * - * @description: - * The number of tables checked in this module. Use it as a parameter - * for the `table-length' argument of function @FT_TrueTypeGX_Validate. - */ -#define FT_VALIDATE_GX_LENGTH (FT_VALIDATE_GX_LAST_INDEX + 1) - - /* */ - - /* Up to 0x1000 is used by otvalid. - Ox2xxx is reserved for feature OT extension. */ -#define FT_VALIDATE_GX_START 0x4000 -#define FT_VALIDATE_GX_BITFIELD( tag ) \ - ( FT_VALIDATE_GX_START << FT_VALIDATE_##tag##_INDEX ) - - - /********************************************************************** - * - * @enum: - * FT_VALIDATE_GXXXX - * - * @description: - * A list of bit-field constants used with @FT_TrueTypeGX_Validate to - * indicate which TrueTypeGX/AAT Type tables should be validated. - * - * @values: - * FT_VALIDATE_feat :: - * Validate `feat' table. - * - * FT_VALIDATE_mort :: - * Validate `mort' table. - * - * FT_VALIDATE_morx :: - * Validate `morx' table. - * - * FT_VALIDATE_bsln :: - * Validate `bsln' table. - * - * FT_VALIDATE_just :: - * Validate `just' table. - * - * FT_VALIDATE_kern :: - * Validate `kern' table. - * - * FT_VALIDATE_opbd :: - * Validate `opbd' table. - * - * FT_VALIDATE_trak :: - * Validate `trak' table. - * - * FT_VALIDATE_prop :: - * Validate `prop' table. - * - * FT_VALIDATE_lcar :: - * Validate `lcar' table. - * - * FT_VALIDATE_GX :: - * Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern, - * opbd, trak, prop and lcar). - * - */ - -#define FT_VALIDATE_feat FT_VALIDATE_GX_BITFIELD( feat ) -#define FT_VALIDATE_mort FT_VALIDATE_GX_BITFIELD( mort ) -#define FT_VALIDATE_morx FT_VALIDATE_GX_BITFIELD( morx ) -#define FT_VALIDATE_bsln FT_VALIDATE_GX_BITFIELD( bsln ) -#define FT_VALIDATE_just FT_VALIDATE_GX_BITFIELD( just ) -#define FT_VALIDATE_kern FT_VALIDATE_GX_BITFIELD( kern ) -#define FT_VALIDATE_opbd FT_VALIDATE_GX_BITFIELD( opbd ) -#define FT_VALIDATE_trak FT_VALIDATE_GX_BITFIELD( trak ) -#define FT_VALIDATE_prop FT_VALIDATE_GX_BITFIELD( prop ) -#define FT_VALIDATE_lcar FT_VALIDATE_GX_BITFIELD( lcar ) - -#define FT_VALIDATE_GX ( FT_VALIDATE_feat | \ - FT_VALIDATE_mort | \ - FT_VALIDATE_morx | \ - FT_VALIDATE_bsln | \ - FT_VALIDATE_just | \ - FT_VALIDATE_kern | \ - FT_VALIDATE_opbd | \ - FT_VALIDATE_trak | \ - FT_VALIDATE_prop | \ - FT_VALIDATE_lcar ) - - - /********************************************************************** - * - * @function: - * FT_TrueTypeGX_Validate - * - * @description: - * Validate various TrueTypeGX tables to assure that all offsets and - * indices are valid. The idea is that a higher-level library that - * actually does the text layout can access those tables without - * error checking (which can be quite time consuming). - * - * @input: - * face :: - * A handle to the input face. - * - * validation_flags :: - * A bit field that specifies the tables to be validated. See - * @FT_VALIDATE_GXXXX for possible values. - * - * table_length :: - * The size of the `tables' array. Normally, @FT_VALIDATE_GX_LENGTH - * should be passed. - * - * @output: - * tables :: - * The array where all validated sfnt tables are stored. - * The array itself must be allocated by a client. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * This function only works with TrueTypeGX fonts, returning an error - * otherwise. - * - * After use, the application should deallocate the buffers pointed to by - * each `tables' element, by calling @FT_TrueTypeGX_Free. A NULL value - * indicates that the table either doesn't exist in the font, the - * application hasn't asked for validation, or the validator doesn't have - * the ability to validate the sfnt table. - */ - FT_EXPORT( FT_Error ) - FT_TrueTypeGX_Validate( FT_Face face, - FT_UInt validation_flags, - FT_Bytes tables[FT_VALIDATE_GX_LENGTH], - FT_UInt table_length ); - - - /********************************************************************** - * - * @function: - * FT_TrueTypeGX_Free - * - * @description: - * Free the buffer allocated by TrueTypeGX validator. - * - * @input: - * face :: - * A handle to the input face. - * - * table :: - * The pointer to the buffer allocated by - * @FT_TrueTypeGX_Validate. - * - * @note: - * This function must be used to free the buffer allocated by - * @FT_TrueTypeGX_Validate only. - */ - FT_EXPORT( void ) - FT_TrueTypeGX_Free( FT_Face face, - FT_Bytes table ); - - - /********************************************************************** - * - * @enum: - * FT_VALIDATE_CKERNXXX - * - * @description: - * A list of bit-field constants used with @FT_ClassicKern_Validate - * to indicate the classic kern dialect or dialects. If the selected - * type doesn't fit, @FT_ClassicKern_Validate regards the table as - * invalid. - * - * @values: - * FT_VALIDATE_MS :: - * Handle the `kern' table as a classic Microsoft kern table. - * - * FT_VALIDATE_APPLE :: - * Handle the `kern' table as a classic Apple kern table. - * - * FT_VALIDATE_CKERN :: - * Handle the `kern' as either classic Apple or Microsoft kern table. - */ -#define FT_VALIDATE_MS ( FT_VALIDATE_GX_START << 0 ) -#define FT_VALIDATE_APPLE ( FT_VALIDATE_GX_START << 1 ) - -#define FT_VALIDATE_CKERN ( FT_VALIDATE_MS | FT_VALIDATE_APPLE ) - - - /********************************************************************** - * - * @function: - * FT_ClassicKern_Validate - * - * @description: - * Validate classic (16-bit format) kern table to assure that the offsets - * and indices are valid. The idea is that a higher-level library that - * actually does the text layout can access those tables without error - * checking (which can be quite time consuming). - * - * The `kern' table validator in @FT_TrueTypeGX_Validate deals with both - * the new 32-bit format and the classic 16-bit format, while - * FT_ClassicKern_Validate only supports the classic 16-bit format. - * - * @input: - * face :: - * A handle to the input face. - * - * validation_flags :: - * A bit field that specifies the dialect to be validated. See - * @FT_VALIDATE_CKERNXXX for possible values. - * - * @output: - * ckern_table :: - * A pointer to the kern table. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * After use, the application should deallocate the buffers pointed to by - * `ckern_table', by calling @FT_ClassicKern_Free. A NULL value - * indicates that the table doesn't exist in the font. - */ - FT_EXPORT( FT_Error ) - FT_ClassicKern_Validate( FT_Face face, - FT_UInt validation_flags, - FT_Bytes *ckern_table ); - - - /********************************************************************** - * - * @function: - * FT_ClassicKern_Free - * - * @description: - * Free the buffer allocated by classic Kern validator. - * - * @input: - * face :: - * A handle to the input face. - * - * table :: - * The pointer to the buffer that is allocated by - * @FT_ClassicKern_Validate. - * - * @note: - * This function must be used to free the buffer allocated by - * @FT_ClassicKern_Validate only. - */ - FT_EXPORT( void ) - FT_ClassicKern_Free( FT_Face face, - FT_Bytes table ); - - /* */ - - -FT_END_HEADER - -#endif /* FTGXVAL_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftgzip.h b/builddir/freetype-2.7.0/include/freetype/ftgzip.h deleted file mode 100644 index 3932ce6..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftgzip.h +++ /dev/null @@ -1,148 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftgzip.h */ -/* */ -/* Gzip-compressed stream support. */ -/* */ -/* Copyright 2002-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTGZIP_H_ -#define FTGZIP_H_ - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - /*************************************************************************/ - /* */ - /* <Section> */ - /* gzip */ - /* */ - /* <Title> */ - /* GZIP Streams */ - /* */ - /* <Abstract> */ - /* Using gzip-compressed font files. */ - /* */ - /* <Description> */ - /* This section contains the declaration of Gzip-specific functions. */ - /* */ - /*************************************************************************/ - - - /************************************************************************ - * - * @function: - * FT_Stream_OpenGzip - * - * @description: - * Open a new stream to parse gzip-compressed font files. This is - * mainly used to support the compressed `*.pcf.gz' fonts that come - * with XFree86. - * - * @input: - * stream :: - * The target embedding stream. - * - * source :: - * The source stream. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * The source stream must be opened _before_ calling this function. - * - * Calling the internal function `FT_Stream_Close' on the new stream will - * *not* call `FT_Stream_Close' on the source stream. None of the stream - * objects will be released to the heap. - * - * The stream implementation is very basic and resets the decompression - * process each time seeking backwards is needed within the stream. - * - * In certain builds of the library, gzip compression recognition is - * automatically handled when calling @FT_New_Face or @FT_Open_Face. - * This means that if no font driver is capable of handling the raw - * compressed file, the library will try to open a gzipped stream from - * it and re-open the face with it. - * - * This function may return `FT_Err_Unimplemented_Feature' if your build - * of FreeType was not compiled with zlib support. - */ - FT_EXPORT( FT_Error ) - FT_Stream_OpenGzip( FT_Stream stream, - FT_Stream source ); - - - /************************************************************************ - * - * @function: - * FT_Gzip_Uncompress - * - * @description: - * Decompress a zipped input buffer into an output buffer. This function - * is modeled after zlib's `uncompress' function. - * - * @input: - * memory :: - * A FreeType memory handle. - * - * input :: - * The input buffer. - * - * input_len :: - * The length of the input buffer. - * - * @output: - * output:: - * The output buffer. - * - * @inout: - * output_len :: - * Before calling the function, this is the total size of the output - * buffer, which must be large enough to hold the entire uncompressed - * data (so the size of the uncompressed data must be known in - * advance). After calling the function, `output_len' is the size of - * the used data in `output'. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * This function may return `FT_Err_Unimplemented_Feature' if your build - * of FreeType was not compiled with zlib support. - */ - FT_EXPORT( FT_Error ) - FT_Gzip_Uncompress( FT_Memory memory, - FT_Byte* output, - FT_ULong* output_len, - const FT_Byte* input, - FT_ULong input_len ); - - /* */ - - -FT_END_HEADER - -#endif /* FTGZIP_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftimage.h b/builddir/freetype-2.7.0/include/freetype/ftimage.h deleted file mode 100644 index 4f86c56..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftimage.h +++ /dev/null @@ -1,1204 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftimage.h */ -/* */ -/* FreeType glyph image formats and default raster interface */ -/* (specification). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - /*************************************************************************/ - /* */ - /* Note: A `raster' is simply a scan-line converter, used to render */ - /* FT_Outlines into FT_Bitmaps. */ - /* */ - /*************************************************************************/ - - -#ifndef FTIMAGE_H_ -#define FTIMAGE_H_ - - - /* STANDALONE_ is from ftgrays.c */ -#ifndef STANDALONE_ -#include <ft2build.h> -#endif - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* basic_types */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Pos */ - /* */ - /* <Description> */ - /* The type FT_Pos is used to store vectorial coordinates. Depending */ - /* on the context, these can represent distances in integer font */ - /* units, or 16.16, or 26.6 fixed-point pixel coordinates. */ - /* */ - typedef signed long FT_Pos; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Vector */ - /* */ - /* <Description> */ - /* A simple structure used to store a 2D vector; coordinates are of */ - /* the FT_Pos type. */ - /* */ - /* <Fields> */ - /* x :: The horizontal coordinate. */ - /* y :: The vertical coordinate. */ - /* */ - typedef struct FT_Vector_ - { - FT_Pos x; - FT_Pos y; - - } FT_Vector; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_BBox */ - /* */ - /* <Description> */ - /* A structure used to hold an outline's bounding box, i.e., the */ - /* coordinates of its extrema in the horizontal and vertical */ - /* directions. */ - /* */ - /* <Fields> */ - /* xMin :: The horizontal minimum (left-most). */ - /* */ - /* yMin :: The vertical minimum (bottom-most). */ - /* */ - /* xMax :: The horizontal maximum (right-most). */ - /* */ - /* yMax :: The vertical maximum (top-most). */ - /* */ - /* <Note> */ - /* The bounding box is specified with the coordinates of the lower */ - /* left and the upper right corner. In PostScript, those values are */ - /* often called (llx,lly) and (urx,ury), respectively. */ - /* */ - /* If `yMin' is negative, this value gives the glyph's descender. */ - /* Otherwise, the glyph doesn't descend below the baseline. */ - /* Similarly, if `ymax' is positive, this value gives the glyph's */ - /* ascender. */ - /* */ - /* `xMin' gives the horizontal distance from the glyph's origin to */ - /* the left edge of the glyph's bounding box. If `xMin' is negative, */ - /* the glyph extends to the left of the origin. */ - /* */ - typedef struct FT_BBox_ - { - FT_Pos xMin, yMin; - FT_Pos xMax, yMax; - - } FT_BBox; - - - /*************************************************************************/ - /* */ - /* <Enum> */ - /* FT_Pixel_Mode */ - /* */ - /* <Description> */ - /* An enumeration type used to describe the format of pixels in a */ - /* given bitmap. Note that additional formats may be added in the */ - /* future. */ - /* */ - /* <Values> */ - /* FT_PIXEL_MODE_NONE :: */ - /* Value~0 is reserved. */ - /* */ - /* FT_PIXEL_MODE_MONO :: */ - /* A monochrome bitmap, using 1~bit per pixel. Note that pixels */ - /* are stored in most-significant order (MSB), which means that */ - /* the left-most pixel in a byte has value 128. */ - /* */ - /* FT_PIXEL_MODE_GRAY :: */ - /* An 8-bit bitmap, generally used to represent anti-aliased glyph */ - /* images. Each pixel is stored in one byte. Note that the number */ - /* of `gray' levels is stored in the `num_grays' field of the */ - /* @FT_Bitmap structure (it generally is 256). */ - /* */ - /* FT_PIXEL_MODE_GRAY2 :: */ - /* A 2-bit per pixel bitmap, used to represent embedded */ - /* anti-aliased bitmaps in font files according to the OpenType */ - /* specification. We haven't found a single font using this */ - /* format, however. */ - /* */ - /* FT_PIXEL_MODE_GRAY4 :: */ - /* A 4-bit per pixel bitmap, representing embedded anti-aliased */ - /* bitmaps in font files according to the OpenType specification. */ - /* We haven't found a single font using this format, however. */ - /* */ - /* FT_PIXEL_MODE_LCD :: */ - /* An 8-bit bitmap, representing RGB or BGR decimated glyph images */ - /* used for display on LCD displays; the bitmap is three times */ - /* wider than the original glyph image. See also */ - /* @FT_RENDER_MODE_LCD. */ - /* */ - /* FT_PIXEL_MODE_LCD_V :: */ - /* An 8-bit bitmap, representing RGB or BGR decimated glyph images */ - /* used for display on rotated LCD displays; the bitmap is three */ - /* times taller than the original glyph image. See also */ - /* @FT_RENDER_MODE_LCD_V. */ - /* */ - /* FT_PIXEL_MODE_BGRA :: */ - /* An image with four 8-bit channels per pixel, representing a */ - /* color image (such as emoticons) with alpha channel. For each */ - /* pixel, the format is BGRA, which means, the blue channel comes */ - /* first in memory. The color channels are pre-multiplied and in */ - /* the sRGB colorspace. For example, full red at half-translucent */ - /* opacity will be represented as `00,00,80,80', not `00,00,FF,80'. */ - /* See also @FT_LOAD_COLOR. */ - /* */ - typedef enum FT_Pixel_Mode_ - { - FT_PIXEL_MODE_NONE = 0, - FT_PIXEL_MODE_MONO, - FT_PIXEL_MODE_GRAY, - FT_PIXEL_MODE_GRAY2, - FT_PIXEL_MODE_GRAY4, - FT_PIXEL_MODE_LCD, - FT_PIXEL_MODE_LCD_V, - FT_PIXEL_MODE_BGRA, - - FT_PIXEL_MODE_MAX /* do not remove */ - - } FT_Pixel_Mode; - - - /* these constants are deprecated; use the corresponding `FT_Pixel_Mode' */ - /* values instead. */ -#define ft_pixel_mode_none FT_PIXEL_MODE_NONE -#define ft_pixel_mode_mono FT_PIXEL_MODE_MONO -#define ft_pixel_mode_grays FT_PIXEL_MODE_GRAY -#define ft_pixel_mode_pal2 FT_PIXEL_MODE_GRAY2 -#define ft_pixel_mode_pal4 FT_PIXEL_MODE_GRAY4 - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Bitmap */ - /* */ - /* <Description> */ - /* A structure used to describe a bitmap or pixmap to the raster. */ - /* Note that we now manage pixmaps of various depths through the */ - /* `pixel_mode' field. */ - /* */ - /* <Fields> */ - /* rows :: The number of bitmap rows. */ - /* */ - /* width :: The number of pixels in bitmap row. */ - /* */ - /* pitch :: The pitch's absolute value is the number of bytes */ - /* taken by one bitmap row, including padding. */ - /* However, the pitch is positive when the bitmap has */ - /* a `down' flow, and negative when it has an `up' */ - /* flow. In all cases, the pitch is an offset to add */ - /* to a bitmap pointer in order to go down one row. */ - /* */ - /* Note that `padding' means the alignment of a */ - /* bitmap to a byte border, and FreeType functions */ - /* normally align to the smallest possible integer */ - /* value. */ - /* */ - /* For the B/W rasterizer, `pitch' is always an even */ - /* number. */ - /* */ - /* To change the pitch of a bitmap (say, to make it a */ - /* multiple of 4), use @FT_Bitmap_Convert. */ - /* Alternatively, you might use callback functions to */ - /* directly render to the application's surface; see */ - /* the file `example2.cpp' in the tutorial for a */ - /* demonstration. */ - /* */ - /* buffer :: A typeless pointer to the bitmap buffer. This */ - /* value should be aligned on 32-bit boundaries in */ - /* most cases. */ - /* */ - /* num_grays :: This field is only used with */ - /* @FT_PIXEL_MODE_GRAY; it gives the number of gray */ - /* levels used in the bitmap. */ - /* */ - /* pixel_mode :: The pixel mode, i.e., how pixel bits are stored. */ - /* See @FT_Pixel_Mode for possible values. */ - /* */ - /* palette_mode :: This field is intended for paletted pixel modes; */ - /* it indicates how the palette is stored. Not */ - /* used currently. */ - /* */ - /* palette :: A typeless pointer to the bitmap palette; this */ - /* field is intended for paletted pixel modes. Not */ - /* used currently. */ - /* */ - typedef struct FT_Bitmap_ - { - unsigned int rows; - unsigned int width; - int pitch; - unsigned char* buffer; - unsigned short num_grays; - unsigned char pixel_mode; - unsigned char palette_mode; - void* palette; - - } FT_Bitmap; - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* outline_processing */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Outline */ - /* */ - /* <Description> */ - /* This structure is used to describe an outline to the scan-line */ - /* converter. */ - /* */ - /* <Fields> */ - /* n_contours :: The number of contours in the outline. */ - /* */ - /* n_points :: The number of points in the outline. */ - /* */ - /* points :: A pointer to an array of `n_points' @FT_Vector */ - /* elements, giving the outline's point coordinates. */ - /* */ - /* tags :: A pointer to an array of `n_points' chars, giving */ - /* each outline point's type. */ - /* */ - /* If bit~0 is unset, the point is `off' the curve, */ - /* i.e., a Bézier control point, while it is `on' if */ - /* set. */ - /* */ - /* Bit~1 is meaningful for `off' points only. If set, */ - /* it indicates a third-order Bézier arc control point; */ - /* and a second-order control point if unset. */ - /* */ - /* If bit~2 is set, bits 5-7 contain the drop-out mode */ - /* (as defined in the OpenType specification; the value */ - /* is the same as the argument to the SCANMODE */ - /* instruction). */ - /* */ - /* Bits 3 and~4 are reserved for internal purposes. */ - /* */ - /* contours :: An array of `n_contours' shorts, giving the end */ - /* point of each contour within the outline. For */ - /* example, the first contour is defined by the points */ - /* `0' to `contours[0]', the second one is defined by */ - /* the points `contours[0]+1' to `contours[1]', etc. */ - /* */ - /* flags :: A set of bit flags used to characterize the outline */ - /* and give hints to the scan-converter and hinter on */ - /* how to convert/grid-fit it. See @FT_OUTLINE_XXX. */ - /* */ - /* <Note> */ - /* The B/W rasterizer only checks bit~2 in the `tags' array for the */ - /* first point of each contour. The drop-out mode as given with */ - /* @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, and */ - /* @FT_OUTLINE_INCLUDE_STUBS in `flags' is then overridden. */ - /* */ - typedef struct FT_Outline_ - { - short n_contours; /* number of contours in glyph */ - short n_points; /* number of points in the glyph */ - - FT_Vector* points; /* the outline's points */ - char* tags; /* the points flags */ - short* contours; /* the contour end points */ - - int flags; /* outline masks */ - - } FT_Outline; - - /* */ - - /* Following limits must be consistent with */ - /* FT_Outline.{n_contours,n_points} */ -#define FT_OUTLINE_CONTOURS_MAX SHRT_MAX -#define FT_OUTLINE_POINTS_MAX SHRT_MAX - - - /*************************************************************************/ - /* */ - /* <Enum> */ - /* FT_OUTLINE_XXX */ - /* */ - /* <Description> */ - /* A list of bit-field constants use for the flags in an outline's */ - /* `flags' field. */ - /* */ - /* <Values> */ - /* FT_OUTLINE_NONE :: */ - /* Value~0 is reserved. */ - /* */ - /* FT_OUTLINE_OWNER :: */ - /* If set, this flag indicates that the outline's field arrays */ - /* (i.e., `points', `flags', and `contours') are `owned' by the */ - /* outline object, and should thus be freed when it is destroyed. */ - /* */ - /* FT_OUTLINE_EVEN_ODD_FILL :: */ - /* By default, outlines are filled using the non-zero winding rule. */ - /* If set to 1, the outline will be filled using the even-odd fill */ - /* rule (only works with the smooth rasterizer). */ - /* */ - /* FT_OUTLINE_REVERSE_FILL :: */ - /* By default, outside contours of an outline are oriented in */ - /* clock-wise direction, as defined in the TrueType specification. */ - /* This flag is set if the outline uses the opposite direction */ - /* (typically for Type~1 fonts). This flag is ignored by the scan */ - /* converter. */ - /* */ - /* FT_OUTLINE_IGNORE_DROPOUTS :: */ - /* By default, the scan converter will try to detect drop-outs in */ - /* an outline and correct the glyph bitmap to ensure consistent */ - /* shape continuity. If set, this flag hints the scan-line */ - /* converter to ignore such cases. See below for more information. */ - /* */ - /* FT_OUTLINE_SMART_DROPOUTS :: */ - /* Select smart dropout control. If unset, use simple dropout */ - /* control. Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See */ - /* below for more information. */ - /* */ - /* FT_OUTLINE_INCLUDE_STUBS :: */ - /* If set, turn pixels on for `stubs', otherwise exclude them. */ - /* Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See below for */ - /* more information. */ - /* */ - /* FT_OUTLINE_HIGH_PRECISION :: */ - /* This flag indicates that the scan-line converter should try to */ - /* convert this outline to bitmaps with the highest possible */ - /* quality. It is typically set for small character sizes. Note */ - /* that this is only a hint that might be completely ignored by a */ - /* given scan-converter. */ - /* */ - /* FT_OUTLINE_SINGLE_PASS :: */ - /* This flag is set to force a given scan-converter to only use a */ - /* single pass over the outline to render a bitmap glyph image. */ - /* Normally, it is set for very large character sizes. It is only */ - /* a hint that might be completely ignored by a given */ - /* scan-converter. */ - /* */ - /* <Note> */ - /* The flags @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, */ - /* and @FT_OUTLINE_INCLUDE_STUBS are ignored by the smooth */ - /* rasterizer. */ - /* */ - /* There exists a second mechanism to pass the drop-out mode to the */ - /* B/W rasterizer; see the `tags' field in @FT_Outline. */ - /* */ - /* Please refer to the description of the `SCANTYPE' instruction in */ - /* the OpenType specification (in file `ttinst1.doc') how simple */ - /* drop-outs, smart drop-outs, and stubs are defined. */ - /* */ -#define FT_OUTLINE_NONE 0x0 -#define FT_OUTLINE_OWNER 0x1 -#define FT_OUTLINE_EVEN_ODD_FILL 0x2 -#define FT_OUTLINE_REVERSE_FILL 0x4 -#define FT_OUTLINE_IGNORE_DROPOUTS 0x8 -#define FT_OUTLINE_SMART_DROPOUTS 0x10 -#define FT_OUTLINE_INCLUDE_STUBS 0x20 - -#define FT_OUTLINE_HIGH_PRECISION 0x100 -#define FT_OUTLINE_SINGLE_PASS 0x200 - - - /* these constants are deprecated; use the corresponding */ - /* `FT_OUTLINE_XXX' values instead */ -#define ft_outline_none FT_OUTLINE_NONE -#define ft_outline_owner FT_OUTLINE_OWNER -#define ft_outline_even_odd_fill FT_OUTLINE_EVEN_ODD_FILL -#define ft_outline_reverse_fill FT_OUTLINE_REVERSE_FILL -#define ft_outline_ignore_dropouts FT_OUTLINE_IGNORE_DROPOUTS -#define ft_outline_high_precision FT_OUTLINE_HIGH_PRECISION -#define ft_outline_single_pass FT_OUTLINE_SINGLE_PASS - - /* */ - -#define FT_CURVE_TAG( flag ) ( flag & 3 ) - -#define FT_CURVE_TAG_ON 1 -#define FT_CURVE_TAG_CONIC 0 -#define FT_CURVE_TAG_CUBIC 2 - -#define FT_CURVE_TAG_HAS_SCANMODE 4 - -#define FT_CURVE_TAG_TOUCH_X 8 /* reserved for the TrueType hinter */ -#define FT_CURVE_TAG_TOUCH_Y 16 /* reserved for the TrueType hinter */ - -#define FT_CURVE_TAG_TOUCH_BOTH ( FT_CURVE_TAG_TOUCH_X | \ - FT_CURVE_TAG_TOUCH_Y ) - -#define FT_Curve_Tag_On FT_CURVE_TAG_ON -#define FT_Curve_Tag_Conic FT_CURVE_TAG_CONIC -#define FT_Curve_Tag_Cubic FT_CURVE_TAG_CUBIC -#define FT_Curve_Tag_Touch_X FT_CURVE_TAG_TOUCH_X -#define FT_Curve_Tag_Touch_Y FT_CURVE_TAG_TOUCH_Y - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_Outline_MoveToFunc */ - /* */ - /* <Description> */ - /* A function pointer type used to describe the signature of a `move */ - /* to' function during outline walking/decomposition. */ - /* */ - /* A `move to' is emitted to start a new contour in an outline. */ - /* */ - /* <Input> */ - /* to :: A pointer to the target point of the `move to'. */ - /* */ - /* user :: A typeless pointer, which is passed from the caller of the */ - /* decomposition function. */ - /* */ - /* <Return> */ - /* Error code. 0~means success. */ - /* */ - typedef int - (*FT_Outline_MoveToFunc)( const FT_Vector* to, - void* user ); - -#define FT_Outline_MoveTo_Func FT_Outline_MoveToFunc - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_Outline_LineToFunc */ - /* */ - /* <Description> */ - /* A function pointer type used to describe the signature of a `line */ - /* to' function during outline walking/decomposition. */ - /* */ - /* A `line to' is emitted to indicate a segment in the outline. */ - /* */ - /* <Input> */ - /* to :: A pointer to the target point of the `line to'. */ - /* */ - /* user :: A typeless pointer, which is passed from the caller of the */ - /* decomposition function. */ - /* */ - /* <Return> */ - /* Error code. 0~means success. */ - /* */ - typedef int - (*FT_Outline_LineToFunc)( const FT_Vector* to, - void* user ); - -#define FT_Outline_LineTo_Func FT_Outline_LineToFunc - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_Outline_ConicToFunc */ - /* */ - /* <Description> */ - /* A function pointer type used to describe the signature of a `conic */ - /* to' function during outline walking or decomposition. */ - /* */ - /* A `conic to' is emitted to indicate a second-order Bézier arc in */ - /* the outline. */ - /* */ - /* <Input> */ - /* control :: An intermediate control point between the last position */ - /* and the new target in `to'. */ - /* */ - /* to :: A pointer to the target end point of the conic arc. */ - /* */ - /* user :: A typeless pointer, which is passed from the caller of */ - /* the decomposition function. */ - /* */ - /* <Return> */ - /* Error code. 0~means success. */ - /* */ - typedef int - (*FT_Outline_ConicToFunc)( const FT_Vector* control, - const FT_Vector* to, - void* user ); - -#define FT_Outline_ConicTo_Func FT_Outline_ConicToFunc - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_Outline_CubicToFunc */ - /* */ - /* <Description> */ - /* A function pointer type used to describe the signature of a `cubic */ - /* to' function during outline walking or decomposition. */ - /* */ - /* A `cubic to' is emitted to indicate a third-order Bézier arc. */ - /* */ - /* <Input> */ - /* control1 :: A pointer to the first Bézier control point. */ - /* */ - /* control2 :: A pointer to the second Bézier control point. */ - /* */ - /* to :: A pointer to the target end point. */ - /* */ - /* user :: A typeless pointer, which is passed from the caller of */ - /* the decomposition function. */ - /* */ - /* <Return> */ - /* Error code. 0~means success. */ - /* */ - typedef int - (*FT_Outline_CubicToFunc)( const FT_Vector* control1, - const FT_Vector* control2, - const FT_Vector* to, - void* user ); - -#define FT_Outline_CubicTo_Func FT_Outline_CubicToFunc - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Outline_Funcs */ - /* */ - /* <Description> */ - /* A structure to hold various function pointers used during outline */ - /* decomposition in order to emit segments, conic, and cubic Béziers. */ - /* */ - /* <Fields> */ - /* move_to :: The `move to' emitter. */ - /* */ - /* line_to :: The segment emitter. */ - /* */ - /* conic_to :: The second-order Bézier arc emitter. */ - /* */ - /* cubic_to :: The third-order Bézier arc emitter. */ - /* */ - /* shift :: The shift that is applied to coordinates before they */ - /* are sent to the emitter. */ - /* */ - /* delta :: The delta that is applied to coordinates before they */ - /* are sent to the emitter, but after the shift. */ - /* */ - /* <Note> */ - /* The point coordinates sent to the emitters are the transformed */ - /* version of the original coordinates (this is important for high */ - /* accuracy during scan-conversion). The transformation is simple: */ - /* */ - /* { */ - /* x' = (x << shift) - delta */ - /* y' = (x << shift) - delta */ - /* } */ - /* */ - /* Set the values of `shift' and `delta' to~0 to get the original */ - /* point coordinates. */ - /* */ - typedef struct FT_Outline_Funcs_ - { - FT_Outline_MoveToFunc move_to; - FT_Outline_LineToFunc line_to; - FT_Outline_ConicToFunc conic_to; - FT_Outline_CubicToFunc cubic_to; - - int shift; - FT_Pos delta; - - } FT_Outline_Funcs; - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* basic_types */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Macro> */ - /* FT_IMAGE_TAG */ - /* */ - /* <Description> */ - /* This macro converts four-letter tags to an unsigned long type. */ - /* */ - /* <Note> */ - /* Since many 16-bit compilers don't like 32-bit enumerations, you */ - /* should redefine this macro in case of problems to something like */ - /* this: */ - /* */ - /* { */ - /* #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value */ - /* } */ - /* */ - /* to get a simple enumeration without assigning special numbers. */ - /* */ -#ifndef FT_IMAGE_TAG -#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) \ - value = ( ( (unsigned long)_x1 << 24 ) | \ - ( (unsigned long)_x2 << 16 ) | \ - ( (unsigned long)_x3 << 8 ) | \ - (unsigned long)_x4 ) -#endif /* FT_IMAGE_TAG */ - - - /*************************************************************************/ - /* */ - /* <Enum> */ - /* FT_Glyph_Format */ - /* */ - /* <Description> */ - /* An enumeration type used to describe the format of a given glyph */ - /* image. Note that this version of FreeType only supports two image */ - /* formats, even though future font drivers will be able to register */ - /* their own format. */ - /* */ - /* <Values> */ - /* FT_GLYPH_FORMAT_NONE :: */ - /* The value~0 is reserved. */ - /* */ - /* FT_GLYPH_FORMAT_COMPOSITE :: */ - /* The glyph image is a composite of several other images. This */ - /* format is _only_ used with @FT_LOAD_NO_RECURSE, and is used to */ - /* report compound glyphs (like accented characters). */ - /* */ - /* FT_GLYPH_FORMAT_BITMAP :: */ - /* The glyph image is a bitmap, and can be described as an */ - /* @FT_Bitmap. You generally need to access the `bitmap' field of */ - /* the @FT_GlyphSlotRec structure to read it. */ - /* */ - /* FT_GLYPH_FORMAT_OUTLINE :: */ - /* The glyph image is a vectorial outline made of line segments */ - /* and Bézier arcs; it can be described as an @FT_Outline; you */ - /* generally want to access the `outline' field of the */ - /* @FT_GlyphSlotRec structure to read it. */ - /* */ - /* FT_GLYPH_FORMAT_PLOTTER :: */ - /* The glyph image is a vectorial path with no inside and outside */ - /* contours. Some Type~1 fonts, like those in the Hershey family, */ - /* contain glyphs in this format. These are described as */ - /* @FT_Outline, but FreeType isn't currently capable of rendering */ - /* them correctly. */ - /* */ - typedef enum FT_Glyph_Format_ - { - FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ), - - FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ), - FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP, 'b', 'i', 't', 's' ), - FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE, 'o', 'u', 't', 'l' ), - FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER, 'p', 'l', 'o', 't' ) - - } FT_Glyph_Format; - - - /* these constants are deprecated; use the corresponding */ - /* `FT_Glyph_Format' values instead. */ -#define ft_glyph_format_none FT_GLYPH_FORMAT_NONE -#define ft_glyph_format_composite FT_GLYPH_FORMAT_COMPOSITE -#define ft_glyph_format_bitmap FT_GLYPH_FORMAT_BITMAP -#define ft_glyph_format_outline FT_GLYPH_FORMAT_OUTLINE -#define ft_glyph_format_plotter FT_GLYPH_FORMAT_PLOTTER - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** R A S T E R D E F I N I T I O N S *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* A raster is a scan converter, in charge of rendering an outline into */ - /* a bitmap. This section contains the public API for rasters. */ - /* */ - /* Note that in FreeType 2, all rasters are now encapsulated within */ - /* specific modules called `renderers'. See `ftrender.h' for more */ - /* details on renderers. */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* raster */ - /* */ - /* <Title> */ - /* Scanline Converter */ - /* */ - /* <Abstract> */ - /* How vectorial outlines are converted into bitmaps and pixmaps. */ - /* */ - /* <Description> */ - /* This section contains technical definitions. */ - /* */ - /* <Order> */ - /* FT_Raster */ - /* FT_Span */ - /* FT_SpanFunc */ - /* */ - /* FT_Raster_Params */ - /* FT_RASTER_FLAG_XXX */ - /* */ - /* FT_Raster_NewFunc */ - /* FT_Raster_DoneFunc */ - /* FT_Raster_ResetFunc */ - /* FT_Raster_SetModeFunc */ - /* FT_Raster_RenderFunc */ - /* FT_Raster_Funcs */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Raster */ - /* */ - /* <Description> */ - /* An opaque handle (pointer) to a raster object. Each object can be */ - /* used independently to convert an outline into a bitmap or pixmap. */ - /* */ - typedef struct FT_RasterRec_* FT_Raster; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Span */ - /* */ - /* <Description> */ - /* A structure used to model a single span of gray pixels when */ - /* rendering an anti-aliased bitmap. */ - /* */ - /* <Fields> */ - /* x :: The span's horizontal start position. */ - /* */ - /* len :: The span's length in pixels. */ - /* */ - /* coverage :: The span color/coverage, ranging from 0 (background) */ - /* to 255 (foreground). */ - /* */ - /* <Note> */ - /* This structure is used by the span drawing callback type named */ - /* @FT_SpanFunc that takes the y~coordinate of the span as a */ - /* parameter. */ - /* */ - /* The coverage value is always between 0 and 255. If you want less */ - /* gray values, the callback function has to reduce them. */ - /* */ - typedef struct FT_Span_ - { - short x; - unsigned short len; - unsigned char coverage; - - } FT_Span; - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_SpanFunc */ - /* */ - /* <Description> */ - /* A function used as a call-back by the anti-aliased renderer in */ - /* order to let client applications draw themselves the gray pixel */ - /* spans on each scan line. */ - /* */ - /* <Input> */ - /* y :: The scanline's y~coordinate. */ - /* */ - /* count :: The number of spans to draw on this scanline. */ - /* */ - /* spans :: A table of `count' spans to draw on the scanline. */ - /* */ - /* user :: User-supplied data that is passed to the callback. */ - /* */ - /* <Note> */ - /* This callback allows client applications to directly render the */ - /* gray spans of the anti-aliased bitmap to any kind of surfaces. */ - /* */ - /* This can be used to write anti-aliased outlines directly to a */ - /* given background bitmap, and even perform translucency. */ - /* */ - typedef void - (*FT_SpanFunc)( int y, - int count, - const FT_Span* spans, - void* user ); - -#define FT_Raster_Span_Func FT_SpanFunc - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_Raster_BitTest_Func */ - /* */ - /* <Description> */ - /* Deprecated, unimplemented. */ - /* */ - typedef int - (*FT_Raster_BitTest_Func)( int y, - int x, - void* user ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_Raster_BitSet_Func */ - /* */ - /* <Description> */ - /* Deprecated, unimplemented. */ - /* */ - typedef void - (*FT_Raster_BitSet_Func)( int y, - int x, - void* user ); - - - /*************************************************************************/ - /* */ - /* <Enum> */ - /* FT_RASTER_FLAG_XXX */ - /* */ - /* <Description> */ - /* A list of bit flag constants as used in the `flags' field of a */ - /* @FT_Raster_Params structure. */ - /* */ - /* <Values> */ - /* FT_RASTER_FLAG_DEFAULT :: This value is 0. */ - /* */ - /* FT_RASTER_FLAG_AA :: This flag is set to indicate that an */ - /* anti-aliased glyph image should be */ - /* generated. Otherwise, it will be */ - /* monochrome (1-bit). */ - /* */ - /* FT_RASTER_FLAG_DIRECT :: This flag is set to indicate direct */ - /* rendering. In this mode, client */ - /* applications must provide their own span */ - /* callback. This lets them directly */ - /* draw or compose over an existing bitmap. */ - /* If this bit is not set, the target */ - /* pixmap's buffer _must_ be zeroed before */ - /* rendering. */ - /* */ - /* Direct rendering is only possible with */ - /* anti-aliased glyphs. */ - /* */ - /* FT_RASTER_FLAG_CLIP :: This flag is only used in direct */ - /* rendering mode. If set, the output will */ - /* be clipped to a box specified in the */ - /* `clip_box' field of the */ - /* @FT_Raster_Params structure. */ - /* */ - /* Note that by default, the glyph bitmap */ - /* is clipped to the target pixmap, except */ - /* in direct rendering mode where all spans */ - /* are generated if no clipping box is set. */ - /* */ -#define FT_RASTER_FLAG_DEFAULT 0x0 -#define FT_RASTER_FLAG_AA 0x1 -#define FT_RASTER_FLAG_DIRECT 0x2 -#define FT_RASTER_FLAG_CLIP 0x4 - - /* these constants are deprecated; use the corresponding */ - /* `FT_RASTER_FLAG_XXX' values instead */ -#define ft_raster_flag_default FT_RASTER_FLAG_DEFAULT -#define ft_raster_flag_aa FT_RASTER_FLAG_AA -#define ft_raster_flag_direct FT_RASTER_FLAG_DIRECT -#define ft_raster_flag_clip FT_RASTER_FLAG_CLIP - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Raster_Params */ - /* */ - /* <Description> */ - /* A structure to hold the arguments used by a raster's render */ - /* function. */ - /* */ - /* <Fields> */ - /* target :: The target bitmap. */ - /* */ - /* source :: A pointer to the source glyph image (e.g., an */ - /* @FT_Outline). */ - /* */ - /* flags :: The rendering flags. */ - /* */ - /* gray_spans :: The gray span drawing callback. */ - /* */ - /* black_spans :: Unused. */ - /* */ - /* bit_test :: Unused. */ - /* */ - /* bit_set :: Unused. */ - /* */ - /* user :: User-supplied data that is passed to each drawing */ - /* callback. */ - /* */ - /* clip_box :: An optional clipping box. It is only used in */ - /* direct rendering mode. Note that coordinates here */ - /* should be expressed in _integer_ pixels (and not in */ - /* 26.6 fixed-point units). */ - /* */ - /* <Note> */ - /* An anti-aliased glyph bitmap is drawn if the @FT_RASTER_FLAG_AA */ - /* bit flag is set in the `flags' field, otherwise a monochrome */ - /* bitmap is generated. */ - /* */ - /* If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the */ - /* raster will call the `gray_spans' callback to draw gray pixel */ - /* spans. This allows direct composition over a pre-existing bitmap */ - /* through user-provided callbacks to perform the span drawing and */ - /* composition. Not supported by the monochrome rasterizer. */ - /* */ - typedef struct FT_Raster_Params_ - { - const FT_Bitmap* target; - const void* source; - int flags; - FT_SpanFunc gray_spans; - FT_SpanFunc black_spans; /* unused */ - FT_Raster_BitTest_Func bit_test; /* unused */ - FT_Raster_BitSet_Func bit_set; /* unused */ - void* user; - FT_BBox clip_box; - - } FT_Raster_Params; - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_Raster_NewFunc */ - /* */ - /* <Description> */ - /* A function used to create a new raster object. */ - /* */ - /* <Input> */ - /* memory :: A handle to the memory allocator. */ - /* */ - /* <Output> */ - /* raster :: A handle to the new raster object. */ - /* */ - /* <Return> */ - /* Error code. 0~means success. */ - /* */ - /* <Note> */ - /* The `memory' parameter is a typeless pointer in order to avoid */ - /* un-wanted dependencies on the rest of the FreeType code. In */ - /* practice, it is an @FT_Memory object, i.e., a handle to the */ - /* standard FreeType memory allocator. However, this field can be */ - /* completely ignored by a given raster implementation. */ - /* */ - typedef int - (*FT_Raster_NewFunc)( void* memory, - FT_Raster* raster ); - -#define FT_Raster_New_Func FT_Raster_NewFunc - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_Raster_DoneFunc */ - /* */ - /* <Description> */ - /* A function used to destroy a given raster object. */ - /* */ - /* <Input> */ - /* raster :: A handle to the raster object. */ - /* */ - typedef void - (*FT_Raster_DoneFunc)( FT_Raster raster ); - -#define FT_Raster_Done_Func FT_Raster_DoneFunc - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_Raster_ResetFunc */ - /* */ - /* <Description> */ - /* FreeType used to provide an area of memory called the `render */ - /* pool' available to all registered rasters. This was not thread */ - /* safe however and now FreeType never allocates this pool. NULL */ - /* is always passed in as pool_base. */ - /* */ - /* This function is called each time the render pool changes, or just */ - /* after a new raster object is created. */ - /* */ - /* <Input> */ - /* raster :: A handle to the new raster object. */ - /* */ - /* pool_base :: The address in memory of the render pool. */ - /* */ - /* pool_size :: The size in bytes of the render pool. */ - /* */ - /* <Note> */ - /* Rasters should ignore the render pool and rely on dynamic or stack */ - /* allocation if they want to (a handle to the memory allocator is */ - /* passed to the raster constructor). */ - /* */ - typedef void - (*FT_Raster_ResetFunc)( FT_Raster raster, - unsigned char* pool_base, - unsigned long pool_size ); - -#define FT_Raster_Reset_Func FT_Raster_ResetFunc - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_Raster_SetModeFunc */ - /* */ - /* <Description> */ - /* This function is a generic facility to change modes or attributes */ - /* in a given raster. This can be used for debugging purposes, or */ - /* simply to allow implementation-specific `features' in a given */ - /* raster module. */ - /* */ - /* <Input> */ - /* raster :: A handle to the new raster object. */ - /* */ - /* mode :: A 4-byte tag used to name the mode or property. */ - /* */ - /* args :: A pointer to the new mode/property to use. */ - /* */ - typedef int - (*FT_Raster_SetModeFunc)( FT_Raster raster, - unsigned long mode, - void* args ); - -#define FT_Raster_Set_Mode_Func FT_Raster_SetModeFunc - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_Raster_RenderFunc */ - /* */ - /* <Description> */ - /* Invoke a given raster to scan-convert a given glyph image into a */ - /* target bitmap. */ - /* */ - /* <Input> */ - /* raster :: A handle to the raster object. */ - /* */ - /* params :: A pointer to an @FT_Raster_Params structure used to */ - /* store the rendering parameters. */ - /* */ - /* <Return> */ - /* Error code. 0~means success. */ - /* */ - /* <Note> */ - /* The exact format of the source image depends on the raster's glyph */ - /* format defined in its @FT_Raster_Funcs structure. It can be an */ - /* @FT_Outline or anything else in order to support a large array of */ - /* glyph formats. */ - /* */ - /* Note also that the render function can fail and return a */ - /* `FT_Err_Unimplemented_Feature' error code if the raster used does */ - /* not support direct composition. */ - /* */ - /* XXX: For now, the standard raster doesn't support direct */ - /* composition but this should change for the final release (see */ - /* the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c' */ - /* for examples of distinct implementations that support direct */ - /* composition). */ - /* */ - typedef int - (*FT_Raster_RenderFunc)( FT_Raster raster, - const FT_Raster_Params* params ); - -#define FT_Raster_Render_Func FT_Raster_RenderFunc - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Raster_Funcs */ - /* */ - /* <Description> */ - /* A structure used to describe a given raster class to the library. */ - /* */ - /* <Fields> */ - /* glyph_format :: The supported glyph format for this raster. */ - /* */ - /* raster_new :: The raster constructor. */ - /* */ - /* raster_reset :: Used to reset the render pool within the raster. */ - /* */ - /* raster_render :: A function to render a glyph into a given bitmap. */ - /* */ - /* raster_done :: The raster destructor. */ - /* */ - typedef struct FT_Raster_Funcs_ - { - FT_Glyph_Format glyph_format; - FT_Raster_NewFunc raster_new; - FT_Raster_ResetFunc raster_reset; - FT_Raster_SetModeFunc raster_set_mode; - FT_Raster_RenderFunc raster_render; - FT_Raster_DoneFunc raster_done; - - } FT_Raster_Funcs; - - /* */ - - -FT_END_HEADER - -#endif /* FTIMAGE_H_ */ - - -/* END */ - - -/* Local Variables: */ -/* coding: utf-8 */ -/* End: */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftincrem.h b/builddir/freetype-2.7.0/include/freetype/ftincrem.h deleted file mode 100644 index 46b58b7..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftincrem.h +++ /dev/null @@ -1,354 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftincrem.h */ -/* */ -/* FreeType incremental loading (specification). */ -/* */ -/* Copyright 2002-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTINCREM_H_ -#define FTINCREM_H_ - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - /*************************************************************************** - * - * @section: - * incremental - * - * @title: - * Incremental Loading - * - * @abstract: - * Custom Glyph Loading. - * - * @description: - * This section contains various functions used to perform so-called - * `incremental' glyph loading. This is a mode where all glyphs loaded - * from a given @FT_Face are provided by the client application. - * - * Apart from that, all other tables are loaded normally from the font - * file. This mode is useful when FreeType is used within another - * engine, e.g., a PostScript Imaging Processor. - * - * To enable this mode, you must use @FT_Open_Face, passing an - * @FT_Parameter with the @FT_PARAM_TAG_INCREMENTAL tag and an - * @FT_Incremental_Interface value. See the comments for - * @FT_Incremental_InterfaceRec for an example. - * - */ - - - /*************************************************************************** - * - * @type: - * FT_Incremental - * - * @description: - * An opaque type describing a user-provided object used to implement - * `incremental' glyph loading within FreeType. This is used to support - * embedded fonts in certain environments (e.g., PostScript interpreters), - * where the glyph data isn't in the font file, or must be overridden by - * different values. - * - * @note: - * It is up to client applications to create and implement @FT_Incremental - * objects, as long as they provide implementations for the methods - * @FT_Incremental_GetGlyphDataFunc, @FT_Incremental_FreeGlyphDataFunc - * and @FT_Incremental_GetGlyphMetricsFunc. - * - * See the description of @FT_Incremental_InterfaceRec to understand how - * to use incremental objects with FreeType. - * - */ - typedef struct FT_IncrementalRec_* FT_Incremental; - - - /*************************************************************************** - * - * @struct: - * FT_Incremental_MetricsRec - * - * @description: - * A small structure used to contain the basic glyph metrics returned - * by the @FT_Incremental_GetGlyphMetricsFunc method. - * - * @fields: - * bearing_x :: - * Left bearing, in font units. - * - * bearing_y :: - * Top bearing, in font units. - * - * advance :: - * Horizontal component of glyph advance, in font units. - * - * advance_v :: - * Vertical component of glyph advance, in font units. - * - * @note: - * These correspond to horizontal or vertical metrics depending on the - * value of the `vertical' argument to the function - * @FT_Incremental_GetGlyphMetricsFunc. - * - */ - typedef struct FT_Incremental_MetricsRec_ - { - FT_Long bearing_x; - FT_Long bearing_y; - FT_Long advance; - FT_Long advance_v; /* since 2.3.12 */ - - } FT_Incremental_MetricsRec; - - - /*************************************************************************** - * - * @struct: - * FT_Incremental_Metrics - * - * @description: - * A handle to an @FT_Incremental_MetricsRec structure. - * - */ - typedef struct FT_Incremental_MetricsRec_* FT_Incremental_Metrics; - - - /*************************************************************************** - * - * @type: - * FT_Incremental_GetGlyphDataFunc - * - * @description: - * A function called by FreeType to access a given glyph's data bytes - * during @FT_Load_Glyph or @FT_Load_Char if incremental loading is - * enabled. - * - * Note that the format of the glyph's data bytes depends on the font - * file format. For TrueType, it must correspond to the raw bytes within - * the `glyf' table. For PostScript formats, it must correspond to the - * *unencrypted* charstring bytes, without any `lenIV' header. It is - * undefined for any other format. - * - * @input: - * incremental :: - * Handle to an opaque @FT_Incremental handle provided by the client - * application. - * - * glyph_index :: - * Index of relevant glyph. - * - * @output: - * adata :: - * A structure describing the returned glyph data bytes (which will be - * accessed as a read-only byte block). - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * If this function returns successfully the method - * @FT_Incremental_FreeGlyphDataFunc will be called later to release - * the data bytes. - * - * Nested calls to @FT_Incremental_GetGlyphDataFunc can happen for - * compound glyphs. - * - */ - typedef FT_Error - (*FT_Incremental_GetGlyphDataFunc)( FT_Incremental incremental, - FT_UInt glyph_index, - FT_Data* adata ); - - - /*************************************************************************** - * - * @type: - * FT_Incremental_FreeGlyphDataFunc - * - * @description: - * A function used to release the glyph data bytes returned by a - * successful call to @FT_Incremental_GetGlyphDataFunc. - * - * @input: - * incremental :: - * A handle to an opaque @FT_Incremental handle provided by the client - * application. - * - * data :: - * A structure describing the glyph data bytes (which will be accessed - * as a read-only byte block). - * - */ - typedef void - (*FT_Incremental_FreeGlyphDataFunc)( FT_Incremental incremental, - FT_Data* data ); - - - /*************************************************************************** - * - * @type: - * FT_Incremental_GetGlyphMetricsFunc - * - * @description: - * A function used to retrieve the basic metrics of a given glyph index - * before accessing its data. This is necessary because, in certain - * formats like TrueType, the metrics are stored in a different place from - * the glyph images proper. - * - * @input: - * incremental :: - * A handle to an opaque @FT_Incremental handle provided by the client - * application. - * - * glyph_index :: - * Index of relevant glyph. - * - * vertical :: - * If true, return vertical metrics. - * - * ametrics :: - * This parameter is used for both input and output. - * The original glyph metrics, if any, in font units. If metrics are - * not available all the values must be set to zero. - * - * @output: - * ametrics :: - * The replacement glyph metrics in font units. - * - */ - typedef FT_Error - (*FT_Incremental_GetGlyphMetricsFunc) - ( FT_Incremental incremental, - FT_UInt glyph_index, - FT_Bool vertical, - FT_Incremental_MetricsRec *ametrics ); - - - /************************************************************************** - * - * @struct: - * FT_Incremental_FuncsRec - * - * @description: - * A table of functions for accessing fonts that load data - * incrementally. Used in @FT_Incremental_InterfaceRec. - * - * @fields: - * get_glyph_data :: - * The function to get glyph data. Must not be null. - * - * free_glyph_data :: - * The function to release glyph data. Must not be null. - * - * get_glyph_metrics :: - * The function to get glyph metrics. May be null if the font does - * not provide overriding glyph metrics. - * - */ - typedef struct FT_Incremental_FuncsRec_ - { - FT_Incremental_GetGlyphDataFunc get_glyph_data; - FT_Incremental_FreeGlyphDataFunc free_glyph_data; - FT_Incremental_GetGlyphMetricsFunc get_glyph_metrics; - - } FT_Incremental_FuncsRec; - - - /*************************************************************************** - * - * @struct: - * FT_Incremental_InterfaceRec - * - * @description: - * A structure to be used with @FT_Open_Face to indicate that the user - * wants to support incremental glyph loading. You should use it with - * @FT_PARAM_TAG_INCREMENTAL as in the following example: - * - * { - * FT_Incremental_InterfaceRec inc_int; - * FT_Parameter parameter; - * FT_Open_Args open_args; - * - * - * // set up incremental descriptor - * inc_int.funcs = my_funcs; - * inc_int.object = my_object; - * - * // set up optional parameter - * parameter.tag = FT_PARAM_TAG_INCREMENTAL; - * parameter.data = &inc_int; - * - * // set up FT_Open_Args structure - * open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS; - * open_args.pathname = my_font_pathname; - * open_args.num_params = 1; - * open_args.params = ¶meter; // we use one optional argument - * - * // open the font - * error = FT_Open_Face( library, &open_args, index, &face ); - * ... - * } - * - */ - typedef struct FT_Incremental_InterfaceRec_ - { - const FT_Incremental_FuncsRec* funcs; - FT_Incremental object; - - } FT_Incremental_InterfaceRec; - - - /*************************************************************************** - * - * @type: - * FT_Incremental_Interface - * - * @description: - * A pointer to an @FT_Incremental_InterfaceRec structure. - * - */ - typedef FT_Incremental_InterfaceRec* FT_Incremental_Interface; - - - /*************************************************************************** - * - * @constant: - * FT_PARAM_TAG_INCREMENTAL - * - * @description: - * A constant used as the tag of @FT_Parameter structures to indicate - * an incremental loading object to be used by FreeType. - * - */ -#define FT_PARAM_TAG_INCREMENTAL FT_MAKE_TAG( 'i', 'n', 'c', 'r' ) - - /* */ - - -FT_END_HEADER - -#endif /* FTINCREM_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftlcdfil.h b/builddir/freetype-2.7.0/include/freetype/ftlcdfil.h deleted file mode 100644 index e06a895..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftlcdfil.h +++ /dev/null @@ -1,286 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftlcdfil.h */ -/* */ -/* FreeType API for color filtering of subpixel bitmap glyphs */ -/* (specification). */ -/* */ -/* Copyright 2006-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTLCDFIL_H_ -#define FTLCDFIL_H_ - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - /*************************************************************************** - * - * @section: - * lcd_filtering - * - * @title: - * LCD Filtering - * - * @abstract: - * Reduce color fringes of subpixel-rendered bitmaps. - * - * @description: - * Subpixel rendering exploits the color-striped structure of LCD - * pixels, increasing the available resolution in the direction of the - * stripe (usually horizontal RGB) by a factor of~3. Since these - * subpixels are color pixels, using them unfiltered creates severe - * color fringes. Use the @FT_Library_SetLcdFilter API to specify a - * low-pass filter, which is then applied to subpixel-rendered bitmaps - * generated through @FT_Render_Glyph. The filter sacrifices some of - * the higher resolution to reduce color fringes, making the glyph image - * slightly blurrier. Positional improvements will remain. - * - * Note that no filter is active by default, and that this function is - * *not* implemented in default builds of the library. You need to - * #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file - * in order to activate it and explicitly call @FT_Library_SetLcdFilter - * to enable it. - * - * A filter should have two properties: - * - * 1) It should be normalized, meaning the sum of the 5~components - * should be 256 (0x100). It is possible to go above or under this - * target sum, however: going under means tossing out contrast, going - * over means invoking clamping and thereby non-linearities that - * increase contrast somewhat at the expense of greater distortion - * and color-fringing. Contrast is better enhanced through stem - * darkening. - * - * 2) It should be color-balanced, meaning a filter `{~a, b, c, b, a~}' - * where a~+ b~=~c. It distributes the computed coverage for one - * subpixel to all subpixels equally, sacrificing some won resolution - * but drastically reducing color-fringing. Positioning improvements - * remain! Note that color-fringing can only really be minimized - * when using a color-balanced filter and alpha-blending the glyph - * onto a surface in linear space; see @FT_Render_Glyph. - * - * Regarding the form, a filter can be a `boxy' filter or a `beveled' - * filter. Boxy filters are sharper but are less forgiving of non-ideal - * gamma curves of a screen (viewing angles!), beveled filters are - * fuzzier but more tolerant. - * - * Examples: - * - * - [0x10 0x40 0x70 0x40 0x10] is beveled and neither balanced nor - * normalized. - * - * - [0x1A 0x33 0x4D 0x33 0x1A] is beveled and balanced but not - * normalized. - * - * - [0x19 0x33 0x66 0x4c 0x19] is beveled and normalized but not - * balanced. - * - * - [0x00 0x4c 0x66 0x4c 0x00] is boxily beveled and normalized but not - * balanced. - * - * - [0x00 0x55 0x56 0x55 0x00] is boxy, normalized, and almost - * balanced. - * - * - [0x08 0x4D 0x56 0x4D 0x08] is beveled, normalized and, almost - * balanced. - * - * The filter affects glyph bitmaps rendered through @FT_Render_Glyph, - * @FT_Load_Glyph, and @FT_Load_Char. It does _not_ affect the output - * of @FT_Outline_Render and @FT_Outline_Get_Bitmap. - * - * If this feature is activated, the dimensions of LCD glyph bitmaps are - * either wider or taller than the dimensions of the corresponding - * outline with regard to the pixel grid. For example, for - * @FT_RENDER_MODE_LCD, the filter adds 3~subpixels to the left, and - * 3~subpixels to the right. The bitmap offset values are adjusted - * accordingly, so clients shouldn't need to modify their layout and - * glyph positioning code when enabling the filter. - * - * It is important to understand that linear alpha blending and gamma - * correction is critical for correctly rendering glyphs onto surfaces - * without artifacts and even more critical when subpixel rendering is - * involved. - * - * Each of the 3~alpha values (subpixels) is independently used to blend - * one color channel. That is, red alpha blends the red channel of the - * text color with the red channel of the background pixel. The - * distribution of density values by the color-balanced filter assumes - * alpha blending is done in linear space; only then color artifacts - * cancel out. - */ - - - /**************************************************************************** - * - * @enum: - * FT_LcdFilter - * - * @description: - * A list of values to identify various types of LCD filters. - * - * @values: - * FT_LCD_FILTER_NONE :: - * Do not perform filtering. When used with subpixel rendering, this - * results in sometimes severe color fringes. - * - * FT_LCD_FILTER_DEFAULT :: - * The default filter reduces color fringes considerably, at the cost - * of a slight blurriness in the output. - * - * It is a beveled, normalized, and color-balanced five-tap filter - * that is more forgiving to screens with non-ideal gamma curves and - * viewing angles. Note that while color-fringing is reduced, it can - * only be minimized by using linear alpha blending and gamma - * correction to render glyphs onto surfaces. The default filter - * weights are [0x08 0x4D 0x56 0x4D 0x08]. - * - * FT_LCD_FILTER_LIGHT :: - * The light filter is a variant that is sharper at the cost of - * slightly more color fringes than the default one. - * - * It is a boxy, normalized, and color-balanced three-tap filter that - * is less forgiving to screens with non-ideal gamma curves and - * viewing angles. This filter works best when the rendering system - * uses linear alpha blending and gamma correction to render glyphs - * onto surfaces. The light filter weights are - * [0x00 0x55 0x56 0x55 0x00]. - * - * FT_LCD_FILTER_LEGACY :: - * This filter corresponds to the original libXft color filter. It - * provides high contrast output but can exhibit really bad color - * fringes if glyphs are not extremely well hinted to the pixel grid. - * In other words, it only works well if the TrueType bytecode - * interpreter is enabled *and* high-quality hinted fonts are used. - * - * This filter is only provided for comparison purposes, and might be - * disabled or stay unsupported in the future. - * - * FT_LCD_FILTER_LEGACY1 :: - * For historical reasons, the FontConfig library returns a different - * enumeration value for legacy LCD filtering. To make code work that - * (incorrectly) forwards FontConfig's enumeration value to - * @FT_Library_SetLcdFilter without proper mapping, it is thus easiest - * to have another enumeration value, which is completely equal to - * `FT_LCD_FILTER_LEGACY'. - * - * @since: - * 2.3.0 (`FT_LCD_FILTER_LEGACY1' since 2.6.2) - */ - typedef enum FT_LcdFilter_ - { - FT_LCD_FILTER_NONE = 0, - FT_LCD_FILTER_DEFAULT = 1, - FT_LCD_FILTER_LIGHT = 2, - FT_LCD_FILTER_LEGACY1 = 3, - FT_LCD_FILTER_LEGACY = 16, - - FT_LCD_FILTER_MAX /* do not remove */ - - } FT_LcdFilter; - - - /************************************************************************** - * - * @func: - * FT_Library_SetLcdFilter - * - * @description: - * This function is used to apply color filtering to LCD decimated - * bitmaps, like the ones used when calling @FT_Render_Glyph with - * @FT_RENDER_MODE_LCD or @FT_RENDER_MODE_LCD_V. - * - * @input: - * library :: - * A handle to the target library instance. - * - * filter :: - * The filter type. - * - * You can use @FT_LCD_FILTER_NONE here to disable this feature, or - * @FT_LCD_FILTER_DEFAULT to use a default filter that should work - * well on most LCD screens. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * This feature is always disabled by default. Clients must make an - * explicit call to this function with a `filter' value other than - * @FT_LCD_FILTER_NONE in order to enable it. - * - * Due to *PATENTS* covering subpixel rendering, this function doesn't - * do anything except returning `FT_Err_Unimplemented_Feature' if the - * configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not - * defined in your build of the library, which should correspond to all - * default builds of FreeType. - * - * @since: - * 2.3.0 - */ - FT_EXPORT( FT_Error ) - FT_Library_SetLcdFilter( FT_Library library, - FT_LcdFilter filter ); - - - /************************************************************************** - * - * @func: - * FT_Library_SetLcdFilterWeights - * - * @description: - * This function can be used to enable LCD filter with custom weights, - * instead of using presets in @FT_Library_SetLcdFilter. - * - * @input: - * library :: - * A handle to the target library instance. - * - * weights :: - * A pointer to an array; the function copies the first five bytes and - * uses them to specify the filter weights. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * Due to *PATENTS* covering subpixel rendering, this function doesn't - * do anything except returning `FT_Err_Unimplemented_Feature' if the - * configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not - * defined in your build of the library, which should correspond to all - * default builds of FreeType. - * - * @since: - * 2.4.0 - */ - FT_EXPORT( FT_Error ) - FT_Library_SetLcdFilterWeights( FT_Library library, - unsigned char *weights ); - - /* */ - - -FT_END_HEADER - -#endif /* FTLCDFIL_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftlist.h b/builddir/freetype-2.7.0/include/freetype/ftlist.h deleted file mode 100644 index 82f437a..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftlist.h +++ /dev/null @@ -1,276 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftlist.h */ -/* */ -/* Generic list support for FreeType (specification). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /*************************************************************************/ - /* */ - /* This file implements functions relative to list processing. Its */ - /* data structures are defined in `freetype.h'. */ - /* */ - /*************************************************************************/ - - -#ifndef FTLIST_H_ -#define FTLIST_H_ - - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* list_processing */ - /* */ - /* <Title> */ - /* List Processing */ - /* */ - /* <Abstract> */ - /* Simple management of lists. */ - /* */ - /* <Description> */ - /* This section contains various definitions related to list */ - /* processing using doubly-linked nodes. */ - /* */ - /* <Order> */ - /* FT_List */ - /* FT_ListNode */ - /* FT_ListRec */ - /* FT_ListNodeRec */ - /* */ - /* FT_List_Add */ - /* FT_List_Insert */ - /* FT_List_Find */ - /* FT_List_Remove */ - /* FT_List_Up */ - /* FT_List_Iterate */ - /* FT_List_Iterator */ - /* FT_List_Finalize */ - /* FT_List_Destructor */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_List_Find */ - /* */ - /* <Description> */ - /* Find the list node for a given listed object. */ - /* */ - /* <Input> */ - /* list :: A pointer to the parent list. */ - /* data :: The address of the listed object. */ - /* */ - /* <Return> */ - /* List node. NULL if it wasn't found. */ - /* */ - FT_EXPORT( FT_ListNode ) - FT_List_Find( FT_List list, - void* data ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_List_Add */ - /* */ - /* <Description> */ - /* Append an element to the end of a list. */ - /* */ - /* <InOut> */ - /* list :: A pointer to the parent list. */ - /* node :: The node to append. */ - /* */ - FT_EXPORT( void ) - FT_List_Add( FT_List list, - FT_ListNode node ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_List_Insert */ - /* */ - /* <Description> */ - /* Insert an element at the head of a list. */ - /* */ - /* <InOut> */ - /* list :: A pointer to parent list. */ - /* node :: The node to insert. */ - /* */ - FT_EXPORT( void ) - FT_List_Insert( FT_List list, - FT_ListNode node ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_List_Remove */ - /* */ - /* <Description> */ - /* Remove a node from a list. This function doesn't check whether */ - /* the node is in the list! */ - /* */ - /* <Input> */ - /* node :: The node to remove. */ - /* */ - /* <InOut> */ - /* list :: A pointer to the parent list. */ - /* */ - FT_EXPORT( void ) - FT_List_Remove( FT_List list, - FT_ListNode node ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_List_Up */ - /* */ - /* <Description> */ - /* Move a node to the head/top of a list. Used to maintain LRU */ - /* lists. */ - /* */ - /* <InOut> */ - /* list :: A pointer to the parent list. */ - /* node :: The node to move. */ - /* */ - FT_EXPORT( void ) - FT_List_Up( FT_List list, - FT_ListNode node ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_List_Iterator */ - /* */ - /* <Description> */ - /* An FT_List iterator function that is called during a list parse */ - /* by @FT_List_Iterate. */ - /* */ - /* <Input> */ - /* node :: The current iteration list node. */ - /* */ - /* user :: A typeless pointer passed to @FT_List_Iterate. */ - /* Can be used to point to the iteration's state. */ - /* */ - typedef FT_Error - (*FT_List_Iterator)( FT_ListNode node, - void* user ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_List_Iterate */ - /* */ - /* <Description> */ - /* Parse a list and calls a given iterator function on each element. */ - /* Note that parsing is stopped as soon as one of the iterator calls */ - /* returns a non-zero value. */ - /* */ - /* <Input> */ - /* list :: A handle to the list. */ - /* iterator :: An iterator function, called on each node of the list. */ - /* user :: A user-supplied field that is passed as the second */ - /* argument to the iterator. */ - /* */ - /* <Return> */ - /* The result (a FreeType error code) of the last iterator call. */ - /* */ - FT_EXPORT( FT_Error ) - FT_List_Iterate( FT_List list, - FT_List_Iterator iterator, - void* user ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_List_Destructor */ - /* */ - /* <Description> */ - /* An @FT_List iterator function that is called during a list */ - /* finalization by @FT_List_Finalize to destroy all elements in a */ - /* given list. */ - /* */ - /* <Input> */ - /* system :: The current system object. */ - /* */ - /* data :: The current object to destroy. */ - /* */ - /* user :: A typeless pointer passed to @FT_List_Iterate. It can */ - /* be used to point to the iteration's state. */ - /* */ - typedef void - (*FT_List_Destructor)( FT_Memory memory, - void* data, - void* user ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_List_Finalize */ - /* */ - /* <Description> */ - /* Destroy all elements in the list as well as the list itself. */ - /* */ - /* <Input> */ - /* list :: A handle to the list. */ - /* */ - /* destroy :: A list destructor that will be applied to each element */ - /* of the list. Set this to NULL if not needed. */ - /* */ - /* memory :: The current memory object that handles deallocation. */ - /* */ - /* user :: A user-supplied field that is passed as the last */ - /* argument to the destructor. */ - /* */ - /* <Note> */ - /* This function expects that all nodes added by @FT_List_Add or */ - /* @FT_List_Insert have been dynamically allocated. */ - /* */ - FT_EXPORT( void ) - FT_List_Finalize( FT_List list, - FT_List_Destructor destroy, - FT_Memory memory, - void* user ); - - /* */ - - -FT_END_HEADER - -#endif /* FTLIST_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftlzw.h b/builddir/freetype-2.7.0/include/freetype/ftlzw.h deleted file mode 100644 index 582e2c1..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftlzw.h +++ /dev/null @@ -1,99 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftlzw.h */ -/* */ -/* LZW-compressed stream support. */ -/* */ -/* Copyright 2004-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTLZW_H_ -#define FTLZW_H_ - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - /*************************************************************************/ - /* */ - /* <Section> */ - /* lzw */ - /* */ - /* <Title> */ - /* LZW Streams */ - /* */ - /* <Abstract> */ - /* Using LZW-compressed font files. */ - /* */ - /* <Description> */ - /* This section contains the declaration of LZW-specific functions. */ - /* */ - /*************************************************************************/ - - /************************************************************************ - * - * @function: - * FT_Stream_OpenLZW - * - * @description: - * Open a new stream to parse LZW-compressed font files. This is - * mainly used to support the compressed `*.pcf.Z' fonts that come - * with XFree86. - * - * @input: - * stream :: The target embedding stream. - * - * source :: The source stream. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * The source stream must be opened _before_ calling this function. - * - * Calling the internal function `FT_Stream_Close' on the new stream will - * *not* call `FT_Stream_Close' on the source stream. None of the stream - * objects will be released to the heap. - * - * The stream implementation is very basic and resets the decompression - * process each time seeking backwards is needed within the stream - * - * In certain builds of the library, LZW compression recognition is - * automatically handled when calling @FT_New_Face or @FT_Open_Face. - * This means that if no font driver is capable of handling the raw - * compressed file, the library will try to open a LZW stream from it - * and re-open the face with it. - * - * This function may return `FT_Err_Unimplemented_Feature' if your build - * of FreeType was not compiled with LZW support. - */ - FT_EXPORT( FT_Error ) - FT_Stream_OpenLZW( FT_Stream stream, - FT_Stream source ); - - /* */ - - -FT_END_HEADER - -#endif /* FTLZW_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftmac.h b/builddir/freetype-2.7.0/include/freetype/ftmac.h deleted file mode 100644 index adb15ca..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftmac.h +++ /dev/null @@ -1,274 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftmac.h */ -/* */ -/* Additional Mac-specific API. */ -/* */ -/* Copyright 1996-2016 by */ -/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -/***************************************************************************/ -/* */ -/* NOTE: Include this file after FT_FREETYPE_H and after any */ -/* Mac-specific headers (because this header uses Mac types such as */ -/* Handle, FSSpec, FSRef, etc.) */ -/* */ -/***************************************************************************/ - - -#ifndef FTMAC_H_ -#define FTMAC_H_ - - -#include <ft2build.h> - - -FT_BEGIN_HEADER - - -/* gcc-3.4.1 and later can warn about functions tagged as deprecated */ -#ifndef FT_DEPRECATED_ATTRIBUTE -#if defined(__GNUC__) && \ - ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -#define FT_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) -#else -#define FT_DEPRECATED_ATTRIBUTE -#endif -#endif - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* mac_specific */ - /* */ - /* <Title> */ - /* Mac Specific Interface */ - /* */ - /* <Abstract> */ - /* Only available on the Macintosh. */ - /* */ - /* <Description> */ - /* The following definitions are only available if FreeType is */ - /* compiled on a Macintosh. */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_New_Face_From_FOND */ - /* */ - /* <Description> */ - /* Create a new face object from a FOND resource. */ - /* */ - /* <InOut> */ - /* library :: A handle to the library resource. */ - /* */ - /* <Input> */ - /* fond :: A FOND resource. */ - /* */ - /* face_index :: Only supported for the -1 `sanity check' special */ - /* case. */ - /* */ - /* <Output> */ - /* aface :: A handle to a new face object. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Notes> */ - /* This function can be used to create @FT_Face objects from fonts */ - /* that are installed in the system as follows. */ - /* */ - /* { */ - /* fond = GetResource( 'FOND', fontName ); */ - /* error = FT_New_Face_From_FOND( library, fond, 0, &face ); */ - /* } */ - /* */ - FT_EXPORT( FT_Error ) - FT_New_Face_From_FOND( FT_Library library, - Handle fond, - FT_Long face_index, - FT_Face *aface ) - FT_DEPRECATED_ATTRIBUTE; - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_GetFile_From_Mac_Name */ - /* */ - /* <Description> */ - /* Return an FSSpec for the disk file containing the named font. */ - /* */ - /* <Input> */ - /* fontName :: Mac OS name of the font (e.g., Times New Roman */ - /* Bold). */ - /* */ - /* <Output> */ - /* pathSpec :: FSSpec to the file. For passing to */ - /* @FT_New_Face_From_FSSpec. */ - /* */ - /* face_index :: Index of the face. For passing to */ - /* @FT_New_Face_From_FSSpec. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FT_GetFile_From_Mac_Name( const char* fontName, - FSSpec* pathSpec, - FT_Long* face_index ) - FT_DEPRECATED_ATTRIBUTE; - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_GetFile_From_Mac_ATS_Name */ - /* */ - /* <Description> */ - /* Return an FSSpec for the disk file containing the named font. */ - /* */ - /* <Input> */ - /* fontName :: Mac OS name of the font in ATS framework. */ - /* */ - /* <Output> */ - /* pathSpec :: FSSpec to the file. For passing to */ - /* @FT_New_Face_From_FSSpec. */ - /* */ - /* face_index :: Index of the face. For passing to */ - /* @FT_New_Face_From_FSSpec. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FT_GetFile_From_Mac_ATS_Name( const char* fontName, - FSSpec* pathSpec, - FT_Long* face_index ) - FT_DEPRECATED_ATTRIBUTE; - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_GetFilePath_From_Mac_ATS_Name */ - /* */ - /* <Description> */ - /* Return a pathname of the disk file and face index for given font */ - /* name that is handled by ATS framework. */ - /* */ - /* <Input> */ - /* fontName :: Mac OS name of the font in ATS framework. */ - /* */ - /* <Output> */ - /* path :: Buffer to store pathname of the file. For passing */ - /* to @FT_New_Face. The client must allocate this */ - /* buffer before calling this function. */ - /* */ - /* maxPathSize :: Lengths of the buffer `path' that client allocated. */ - /* */ - /* face_index :: Index of the face. For passing to @FT_New_Face. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FT_GetFilePath_From_Mac_ATS_Name( const char* fontName, - UInt8* path, - UInt32 maxPathSize, - FT_Long* face_index ) - FT_DEPRECATED_ATTRIBUTE; - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_New_Face_From_FSSpec */ - /* */ - /* <Description> */ - /* Create a new face object from a given resource and typeface index */ - /* using an FSSpec to the font file. */ - /* */ - /* <InOut> */ - /* library :: A handle to the library resource. */ - /* */ - /* <Input> */ - /* spec :: FSSpec to the font file. */ - /* */ - /* face_index :: The index of the face within the resource. The */ - /* first face has index~0. */ - /* <Output> */ - /* aface :: A handle to a new face object. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* @FT_New_Face_From_FSSpec is identical to @FT_New_Face except */ - /* it accepts an FSSpec instead of a path. */ - /* */ - FT_EXPORT( FT_Error ) - FT_New_Face_From_FSSpec( FT_Library library, - const FSSpec *spec, - FT_Long face_index, - FT_Face *aface ) - FT_DEPRECATED_ATTRIBUTE; - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_New_Face_From_FSRef */ - /* */ - /* <Description> */ - /* Create a new face object from a given resource and typeface index */ - /* using an FSRef to the font file. */ - /* */ - /* <InOut> */ - /* library :: A handle to the library resource. */ - /* */ - /* <Input> */ - /* spec :: FSRef to the font file. */ - /* */ - /* face_index :: The index of the face within the resource. The */ - /* first face has index~0. */ - /* <Output> */ - /* aface :: A handle to a new face object. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* @FT_New_Face_From_FSRef is identical to @FT_New_Face except */ - /* it accepts an FSRef instead of a path. */ - /* */ - FT_EXPORT( FT_Error ) - FT_New_Face_From_FSRef( FT_Library library, - const FSRef *ref, - FT_Long face_index, - FT_Face *aface ) - FT_DEPRECATED_ATTRIBUTE; - - /* */ - - -FT_END_HEADER - - -#endif /* FTMAC_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftmm.h b/builddir/freetype-2.7.0/include/freetype/ftmm.h deleted file mode 100644 index b5d6858..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftmm.h +++ /dev/null @@ -1,388 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftmm.h */ -/* */ -/* FreeType Multiple Master font interface (specification). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTMM_H_ -#define FTMM_H_ - - -#include <ft2build.h> -#include FT_TYPE1_TABLES_H - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* multiple_masters */ - /* */ - /* <Title> */ - /* Multiple Masters */ - /* */ - /* <Abstract> */ - /* How to manage Multiple Masters fonts. */ - /* */ - /* <Description> */ - /* The following types and functions are used to manage Multiple */ - /* Master fonts, i.e., the selection of specific design instances by */ - /* setting design axis coordinates. */ - /* */ - /* George Williams has extended this interface to make it work with */ - /* both Type~1 Multiple Masters fonts and GX distortable (var) */ - /* fonts. Some of these routines only work with MM fonts, others */ - /* will work with both types. They are similar enough that a */ - /* consistent interface makes sense. */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_MM_Axis */ - /* */ - /* <Description> */ - /* A simple structure used to model a given axis in design space for */ - /* Multiple Masters fonts. */ - /* */ - /* This structure can't be used for GX var fonts. */ - /* */ - /* <Fields> */ - /* name :: The axis's name. */ - /* */ - /* minimum :: The axis's minimum design coordinate. */ - /* */ - /* maximum :: The axis's maximum design coordinate. */ - /* */ - typedef struct FT_MM_Axis_ - { - FT_String* name; - FT_Long minimum; - FT_Long maximum; - - } FT_MM_Axis; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Multi_Master */ - /* */ - /* <Description> */ - /* A structure used to model the axes and space of a Multiple Masters */ - /* font. */ - /* */ - /* This structure can't be used for GX var fonts. */ - /* */ - /* <Fields> */ - /* num_axis :: Number of axes. Cannot exceed~4. */ - /* */ - /* num_designs :: Number of designs; should be normally 2^num_axis */ - /* even though the Type~1 specification strangely */ - /* allows for intermediate designs to be present. */ - /* This number cannot exceed~16. */ - /* */ - /* axis :: A table of axis descriptors. */ - /* */ - typedef struct FT_Multi_Master_ - { - FT_UInt num_axis; - FT_UInt num_designs; - FT_MM_Axis axis[T1_MAX_MM_AXIS]; - - } FT_Multi_Master; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Var_Axis */ - /* */ - /* <Description> */ - /* A simple structure used to model a given axis in design space for */ - /* Multiple Masters and GX var fonts. */ - /* */ - /* <Fields> */ - /* name :: The axis's name. */ - /* Not always meaningful for GX. */ - /* */ - /* minimum :: The axis's minimum design coordinate. */ - /* */ - /* def :: The axis's default design coordinate. */ - /* FreeType computes meaningful default values for MM; it */ - /* is then an integer value, not in 16.16 format. */ - /* */ - /* maximum :: The axis's maximum design coordinate. */ - /* */ - /* tag :: The axis's tag (the GX equivalent to `name'). */ - /* FreeType provides default values for MM if possible. */ - /* */ - /* strid :: The entry in `name' table (another GX version of */ - /* `name'). */ - /* Not meaningful for MM. */ - /* */ - typedef struct FT_Var_Axis_ - { - FT_String* name; - - FT_Fixed minimum; - FT_Fixed def; - FT_Fixed maximum; - - FT_ULong tag; - FT_UInt strid; - - } FT_Var_Axis; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Var_Named_Style */ - /* */ - /* <Description> */ - /* A simple structure used to model a named style in a GX var font. */ - /* */ - /* This structure can't be used for MM fonts. */ - /* */ - /* <Fields> */ - /* coords :: The design coordinates for this style. */ - /* This is an array with one entry for each axis. */ - /* */ - /* strid :: The entry in `name' table identifying this style. */ - /* */ - typedef struct FT_Var_Named_Style_ - { - FT_Fixed* coords; - FT_UInt strid; - - } FT_Var_Named_Style; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_MM_Var */ - /* */ - /* <Description> */ - /* A structure used to model the axes and space of a Multiple Masters */ - /* or GX var distortable font. */ - /* */ - /* Some fields are specific to one format and not to the other. */ - /* */ - /* <Fields> */ - /* num_axis :: The number of axes. The maximum value is~4 for */ - /* MM; no limit in GX. */ - /* */ - /* num_designs :: The number of designs; should be normally */ - /* 2^num_axis for MM fonts. Not meaningful for GX */ - /* (where every glyph could have a different */ - /* number of designs). */ - /* */ - /* num_namedstyles :: The number of named styles; a `named style' is */ - /* a tuple of design coordinates that has a string */ - /* ID (in the `name' table) associated with it. */ - /* The font can tell the user that, for example, */ - /* [Weight=1.5,Width=1.1] is `Bold'. */ - /* */ - /* For Type 1 Multiple Masters fonts, this value */ - /* is always zero because the format does not */ - /* support named styles. */ - /* */ - /* axis :: An axis descriptor table. */ - /* GX fonts contain slightly more data than MM. */ - /* Memory management of this pointer is done */ - /* internally by FreeType. */ - /* */ - /* namedstyle :: A named style table. */ - /* Only meaningful with GX. */ - /* Memory management of this pointer is done */ - /* internally by FreeType. */ - /* */ - typedef struct FT_MM_Var_ - { - FT_UInt num_axis; - FT_UInt num_designs; - FT_UInt num_namedstyles; - FT_Var_Axis* axis; - FT_Var_Named_Style* namedstyle; - - } FT_MM_Var; - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Multi_Master */ - /* */ - /* <Description> */ - /* Retrieve the Multiple Master descriptor of a given font. */ - /* */ - /* This function can't be used with GX fonts. */ - /* */ - /* <Input> */ - /* face :: A handle to the source face. */ - /* */ - /* <Output> */ - /* amaster :: The Multiple Masters descriptor. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Get_Multi_Master( FT_Face face, - FT_Multi_Master *amaster ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_MM_Var */ - /* */ - /* <Description> */ - /* Retrieve the Multiple Master/GX var descriptor of a given font. */ - /* */ - /* <Input> */ - /* face :: A handle to the source face. */ - /* */ - /* <Output> */ - /* amaster :: The Multiple Masters/GX var descriptor. */ - /* Allocates a data structure, which the user must */ - /* deallocate with `free' after use. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Get_MM_Var( FT_Face face, - FT_MM_Var* *amaster ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Set_MM_Design_Coordinates */ - /* */ - /* <Description> */ - /* For Multiple Masters fonts, choose an interpolated font design */ - /* through design coordinates. */ - /* */ - /* This function can't be used with GX fonts. */ - /* */ - /* <InOut> */ - /* face :: A handle to the source face. */ - /* */ - /* <Input> */ - /* num_coords :: The number of available design coordinates. If it */ - /* is larger than the number of axes, ignore the excess */ - /* values. If it is smaller than the number of axes, */ - /* use default values for the remaining axes. */ - /* */ - /* coords :: An array of design coordinates. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Set_MM_Design_Coordinates( FT_Face face, - FT_UInt num_coords, - FT_Long* coords ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Set_Var_Design_Coordinates */ - /* */ - /* <Description> */ - /* For Multiple Master or GX Var fonts, choose an interpolated font */ - /* design through design coordinates. */ - /* */ - /* <InOut> */ - /* face :: A handle to the source face. */ - /* */ - /* <Input> */ - /* num_coords :: The number of available design coordinates. If it */ - /* is larger than the number of axes, ignore the excess */ - /* values. If it is smaller than the number of axes, */ - /* use default values for the remaining axes. */ - /* */ - /* coords :: An array of design coordinates. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Set_Var_Design_Coordinates( FT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Set_MM_Blend_Coordinates */ - /* */ - /* <Description> */ - /* For Multiple Masters and GX var fonts, choose an interpolated font */ - /* design through normalized blend coordinates. */ - /* */ - /* <InOut> */ - /* face :: A handle to the source face. */ - /* */ - /* <Input> */ - /* num_coords :: The number of available design coordinates. If it */ - /* is larger than the number of axes, ignore the excess */ - /* values. If it is smaller than the number of axes, */ - /* use default values for the remaining axes. */ - /* */ - /* coords :: The design coordinates array (each element must be */ - /* between 0 and 1.0). */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Set_MM_Blend_Coordinates( FT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Set_Var_Blend_Coordinates */ - /* */ - /* <Description> */ - /* This is another name of @FT_Set_MM_Blend_Coordinates. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Set_Var_Blend_Coordinates( FT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ); - - /* */ - - -FT_END_HEADER - -#endif /* FTMM_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftmodapi.h b/builddir/freetype-2.7.0/include/freetype/ftmodapi.h deleted file mode 100644 index b4d2758..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftmodapi.h +++ /dev/null @@ -1,667 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftmodapi.h */ -/* */ -/* FreeType modules public interface (specification). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTMODAPI_H_ -#define FTMODAPI_H_ - - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* module_management */ - /* */ - /* <Title> */ - /* Module Management */ - /* */ - /* <Abstract> */ - /* How to add, upgrade, remove, and control modules from FreeType. */ - /* */ - /* <Description> */ - /* The definitions below are used to manage modules within FreeType. */ - /* Modules can be added, upgraded, and removed at runtime. */ - /* Additionally, some module properties can be controlled also. */ - /* */ - /* Here is a list of possible values of the `module_name' field in */ - /* the @FT_Module_Class structure. */ - /* */ - /* { */ - /* autofitter */ - /* bdf */ - /* cff */ - /* gxvalid */ - /* otvalid */ - /* pcf */ - /* pfr */ - /* psaux */ - /* pshinter */ - /* psnames */ - /* raster1 */ - /* sfnt */ - /* smooth, smooth-lcd, smooth-lcdv */ - /* truetype */ - /* type1 */ - /* type42 */ - /* t1cid */ - /* winfonts */ - /* } */ - /* */ - /* Note that the FreeType Cache sub-system is not a FreeType module. */ - /* */ - /* <Order> */ - /* FT_Module */ - /* FT_Module_Constructor */ - /* FT_Module_Destructor */ - /* FT_Module_Requester */ - /* FT_Module_Class */ - /* */ - /* FT_Add_Module */ - /* FT_Get_Module */ - /* FT_Remove_Module */ - /* FT_Add_Default_Modules */ - /* */ - /* FT_Property_Set */ - /* FT_Property_Get */ - /* */ - /* FT_New_Library */ - /* FT_Done_Library */ - /* FT_Reference_Library */ - /* */ - /* FT_Renderer */ - /* FT_Renderer_Class */ - /* */ - /* FT_Get_Renderer */ - /* FT_Set_Renderer */ - /* */ - /* FT_Set_Debug_Hook */ - /* */ - /*************************************************************************/ - - - /* module bit flags */ -#define FT_MODULE_FONT_DRIVER 1 /* this module is a font driver */ -#define FT_MODULE_RENDERER 2 /* this module is a renderer */ -#define FT_MODULE_HINTER 4 /* this module is a glyph hinter */ -#define FT_MODULE_STYLER 8 /* this module is a styler */ - -#define FT_MODULE_DRIVER_SCALABLE 0x100 /* the driver supports */ - /* scalable fonts */ -#define FT_MODULE_DRIVER_NO_OUTLINES 0x200 /* the driver does not */ - /* support vector outlines */ -#define FT_MODULE_DRIVER_HAS_HINTER 0x400 /* the driver provides its */ - /* own hinter */ -#define FT_MODULE_DRIVER_HINTS_LIGHTLY 0x800 /* the driver's hinter */ - /* produces LIGHT hints */ - - - /* deprecated values */ -#define ft_module_font_driver FT_MODULE_FONT_DRIVER -#define ft_module_renderer FT_MODULE_RENDERER -#define ft_module_hinter FT_MODULE_HINTER -#define ft_module_styler FT_MODULE_STYLER - -#define ft_module_driver_scalable FT_MODULE_DRIVER_SCALABLE -#define ft_module_driver_no_outlines FT_MODULE_DRIVER_NO_OUTLINES -#define ft_module_driver_has_hinter FT_MODULE_DRIVER_HAS_HINTER -#define ft_module_driver_hints_lightly FT_MODULE_DRIVER_HINTS_LIGHTLY - - - typedef FT_Pointer FT_Module_Interface; - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_Module_Constructor */ - /* */ - /* <Description> */ - /* A function used to initialize (not create) a new module object. */ - /* */ - /* <Input> */ - /* module :: The module to initialize. */ - /* */ - typedef FT_Error - (*FT_Module_Constructor)( FT_Module module ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_Module_Destructor */ - /* */ - /* <Description> */ - /* A function used to finalize (not destroy) a given module object. */ - /* */ - /* <Input> */ - /* module :: The module to finalize. */ - /* */ - typedef void - (*FT_Module_Destructor)( FT_Module module ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_Module_Requester */ - /* */ - /* <Description> */ - /* A function used to query a given module for a specific interface. */ - /* */ - /* <Input> */ - /* module :: The module to be searched. */ - /* */ - /* name :: The name of the interface in the module. */ - /* */ - typedef FT_Module_Interface - (*FT_Module_Requester)( FT_Module module, - const char* name ); - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Module_Class */ - /* */ - /* <Description> */ - /* The module class descriptor. */ - /* */ - /* <Fields> */ - /* module_flags :: Bit flags describing the module. */ - /* */ - /* module_size :: The size of one module object/instance in */ - /* bytes. */ - /* */ - /* module_name :: The name of the module. */ - /* */ - /* module_version :: The version, as a 16.16 fixed number */ - /* (major.minor). */ - /* */ - /* module_requires :: The version of FreeType this module requires, */ - /* as a 16.16 fixed number (major.minor). Starts */ - /* at version 2.0, i.e., 0x20000. */ - /* */ - /* module_init :: The initializing function. */ - /* */ - /* module_done :: The finalizing function. */ - /* */ - /* get_interface :: The interface requesting function. */ - /* */ - typedef struct FT_Module_Class_ - { - FT_ULong module_flags; - FT_Long module_size; - const FT_String* module_name; - FT_Fixed module_version; - FT_Fixed module_requires; - - const void* module_interface; - - FT_Module_Constructor module_init; - FT_Module_Destructor module_done; - FT_Module_Requester get_interface; - - } FT_Module_Class; - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Add_Module */ - /* */ - /* <Description> */ - /* Add a new module to a given library instance. */ - /* */ - /* <InOut> */ - /* library :: A handle to the library object. */ - /* */ - /* <Input> */ - /* clazz :: A pointer to class descriptor for the module. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* An error will be returned if a module already exists by that name, */ - /* or if the module requires a version of FreeType that is too great. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Add_Module( FT_Library library, - const FT_Module_Class* clazz ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Module */ - /* */ - /* <Description> */ - /* Find a module by its name. */ - /* */ - /* <Input> */ - /* library :: A handle to the library object. */ - /* */ - /* module_name :: The module's name (as an ASCII string). */ - /* */ - /* <Return> */ - /* A module handle. 0~if none was found. */ - /* */ - /* <Note> */ - /* FreeType's internal modules aren't documented very well, and you */ - /* should look up the source code for details. */ - /* */ - FT_EXPORT( FT_Module ) - FT_Get_Module( FT_Library library, - const char* module_name ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Remove_Module */ - /* */ - /* <Description> */ - /* Remove a given module from a library instance. */ - /* */ - /* <InOut> */ - /* library :: A handle to a library object. */ - /* */ - /* <Input> */ - /* module :: A handle to a module object. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* The module object is destroyed by the function in case of success. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Remove_Module( FT_Library library, - FT_Module module ); - - - /********************************************************************** - * - * @function: - * FT_Property_Set - * - * @description: - * Set a property for a given module. - * - * @input: - * library :: - * A handle to the library the module is part of. - * - * module_name :: - * The module name. - * - * property_name :: - * The property name. Properties are described in the `Synopsis' - * subsection of the module's documentation. - * - * Note that only a few modules have properties. - * - * value :: - * A generic pointer to a variable or structure that gives the new - * value of the property. The exact definition of `value' is - * dependent on the property; see the `Synopsis' subsection of the - * module's documentation. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * If `module_name' isn't a valid module name, or `property_name' - * doesn't specify a valid property, or if `value' doesn't represent a - * valid value for the given property, an error is returned. - * - * The following example sets property `bar' (a simple integer) in - * module `foo' to value~1. - * - * { - * FT_UInt bar; - * - * - * bar = 1; - * FT_Property_Set( library, "foo", "bar", &bar ); - * } - * - * Note that the FreeType Cache sub-system doesn't recognize module - * property changes. To avoid glyph lookup confusion within the cache - * you should call @FTC_Manager_Reset to completely flush the cache if - * a module property gets changed after @FTC_Manager_New has been - * called. - * - * It is not possible to set properties of the FreeType Cache - * sub-system itself with FT_Property_Set; use @FTC_Property_Set - * instead. - * - * @since: - * 2.4.11 - * - */ - FT_EXPORT( FT_Error ) - FT_Property_Set( FT_Library library, - const FT_String* module_name, - const FT_String* property_name, - const void* value ); - - - /********************************************************************** - * - * @function: - * FT_Property_Get - * - * @description: - * Get a module's property value. - * - * @input: - * library :: - * A handle to the library the module is part of. - * - * module_name :: - * The module name. - * - * property_name :: - * The property name. Properties are described in the `Synopsis' - * subsection of the module's documentation. - * - * @inout: - * value :: - * A generic pointer to a variable or structure that gives the - * value of the property. The exact definition of `value' is - * dependent on the property; see the `Synopsis' subsection of the - * module's documentation. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * If `module_name' isn't a valid module name, or `property_name' - * doesn't specify a valid property, or if `value' doesn't represent a - * valid value for the given property, an error is returned. - * - * The following example gets property `baz' (a range) in module `foo'. - * - * { - * typedef range_ - * { - * FT_Int32 min; - * FT_Int32 max; - * - * } range; - * - * range baz; - * - * - * FT_Property_Get( library, "foo", "baz", &baz ); - * } - * - * It is not possible to retrieve properties of the FreeType Cache - * sub-system with FT_Property_Get; use @FTC_Property_Get instead. - * - * @since: - * 2.4.11 - * - */ - FT_EXPORT( FT_Error ) - FT_Property_Get( FT_Library library, - const FT_String* module_name, - const FT_String* property_name, - void* value ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Reference_Library */ - /* */ - /* <Description> */ - /* A counter gets initialized to~1 at the time an @FT_Library */ - /* structure is created. This function increments the counter. */ - /* @FT_Done_Library then only destroys a library if the counter is~1, */ - /* otherwise it simply decrements the counter. */ - /* */ - /* This function helps in managing life-cycles of structures that */ - /* reference @FT_Library objects. */ - /* */ - /* <Input> */ - /* library :: A handle to a target library object. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Since> */ - /* 2.4.2 */ - /* */ - FT_EXPORT( FT_Error ) - FT_Reference_Library( FT_Library library ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_New_Library */ - /* */ - /* <Description> */ - /* This function is used to create a new FreeType library instance */ - /* from a given memory object. It is thus possible to use libraries */ - /* with distinct memory allocators within the same program. Note, */ - /* however, that the used @FT_Memory structure is expected to remain */ - /* valid for the life of the @FT_Library object. */ - /* */ - /* Normally, you would call this function (followed by a call to */ - /* @FT_Add_Default_Modules or a series of calls to @FT_Add_Module) */ - /* instead of @FT_Init_FreeType to initialize the FreeType library. */ - /* */ - /* Don't use @FT_Done_FreeType but @FT_Done_Library to destroy a */ - /* library instance. */ - /* */ - /* <Input> */ - /* memory :: A handle to the original memory object. */ - /* */ - /* <Output> */ - /* alibrary :: A pointer to handle of a new library object. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* See the discussion of reference counters in the description of */ - /* @FT_Reference_Library. */ - /* */ - FT_EXPORT( FT_Error ) - FT_New_Library( FT_Memory memory, - FT_Library *alibrary ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Done_Library */ - /* */ - /* <Description> */ - /* Discard a given library object. This closes all drivers and */ - /* discards all resource objects. */ - /* */ - /* <Input> */ - /* library :: A handle to the target library. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* See the discussion of reference counters in the description of */ - /* @FT_Reference_Library. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Done_Library( FT_Library library ); - - /* */ - - typedef void - (*FT_DebugHook_Func)( void* arg ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Set_Debug_Hook */ - /* */ - /* <Description> */ - /* Set a debug hook function for debugging the interpreter of a font */ - /* format. */ - /* */ - /* <InOut> */ - /* library :: A handle to the library object. */ - /* */ - /* <Input> */ - /* hook_index :: The index of the debug hook. You should use the */ - /* values defined in `ftobjs.h', e.g., */ - /* `FT_DEBUG_HOOK_TRUETYPE'. */ - /* */ - /* debug_hook :: The function used to debug the interpreter. */ - /* */ - /* <Note> */ - /* Currently, four debug hook slots are available, but only two (for */ - /* the TrueType and the Type~1 interpreter) are defined. */ - /* */ - /* Since the internal headers of FreeType are no longer installed, */ - /* the symbol `FT_DEBUG_HOOK_TRUETYPE' isn't available publicly. */ - /* This is a bug and will be fixed in a forthcoming release. */ - /* */ - FT_EXPORT( void ) - FT_Set_Debug_Hook( FT_Library library, - FT_UInt hook_index, - FT_DebugHook_Func debug_hook ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Add_Default_Modules */ - /* */ - /* <Description> */ - /* Add the set of default drivers to a given library object. */ - /* This is only useful when you create a library object with */ - /* @FT_New_Library (usually to plug a custom memory manager). */ - /* */ - /* <InOut> */ - /* library :: A handle to a new library object. */ - /* */ - FT_EXPORT( void ) - FT_Add_Default_Modules( FT_Library library ); - - - - /************************************************************************** - * - * @section: - * truetype_engine - * - * @title: - * The TrueType Engine - * - * @abstract: - * TrueType bytecode support. - * - * @description: - * This section contains a function used to query the level of TrueType - * bytecode support compiled in this version of the library. - * - */ - - - /************************************************************************** - * - * @enum: - * FT_TrueTypeEngineType - * - * @description: - * A list of values describing which kind of TrueType bytecode - * engine is implemented in a given FT_Library instance. It is used - * by the @FT_Get_TrueType_Engine_Type function. - * - * @values: - * FT_TRUETYPE_ENGINE_TYPE_NONE :: - * The library doesn't implement any kind of bytecode interpreter. - * - * FT_TRUETYPE_ENGINE_TYPE_UNPATENTED :: - * Deprecated and removed. - * - * FT_TRUETYPE_ENGINE_TYPE_PATENTED :: - * The library implements a bytecode interpreter that covers - * the full instruction set of the TrueType virtual machine (this - * was governed by patents until May 2010, hence the name). - * - * @since: - * 2.2 - * - */ - typedef enum FT_TrueTypeEngineType_ - { - FT_TRUETYPE_ENGINE_TYPE_NONE = 0, - FT_TRUETYPE_ENGINE_TYPE_UNPATENTED, - FT_TRUETYPE_ENGINE_TYPE_PATENTED - - } FT_TrueTypeEngineType; - - - /************************************************************************** - * - * @func: - * FT_Get_TrueType_Engine_Type - * - * @description: - * Return an @FT_TrueTypeEngineType value to indicate which level of - * the TrueType virtual machine a given library instance supports. - * - * @input: - * library :: - * A library instance. - * - * @return: - * A value indicating which level is supported. - * - * @since: - * 2.2 - * - */ - FT_EXPORT( FT_TrueTypeEngineType ) - FT_Get_TrueType_Engine_Type( FT_Library library ); - - /* */ - - -FT_END_HEADER - -#endif /* FTMODAPI_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftmoderr.h b/builddir/freetype-2.7.0/include/freetype/ftmoderr.h deleted file mode 100644 index 2a7671c..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftmoderr.h +++ /dev/null @@ -1,194 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftmoderr.h */ -/* */ -/* FreeType module error offsets (specification). */ -/* */ -/* Copyright 2001-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /*************************************************************************/ - /* */ - /* This file is used to define the FreeType module error codes. */ - /* */ - /* If the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in `ftoption.h' is */ - /* set, the lower byte of an error value identifies the error code as */ - /* usual. In addition, the higher byte identifies the module. For */ - /* example, the error `FT_Err_Invalid_File_Format' has value 0x0003, the */ - /* error `TT_Err_Invalid_File_Format' has value 0x1303, the error */ - /* `T1_Err_Invalid_File_Format' has value 0x1403, etc. */ - /* */ - /* Note that `FT_Err_Ok', `TT_Err_Ok', etc. are always equal to zero, */ - /* including the high byte. */ - /* */ - /* If FT_CONFIG_OPTION_USE_MODULE_ERRORS isn't set, the higher byte of */ - /* an error value is set to zero. */ - /* */ - /* To hide the various `XXX_Err_' prefixes in the source code, FreeType */ - /* provides some macros in `fttypes.h'. */ - /* */ - /* FT_ERR( err ) */ - /* Add current error module prefix (as defined with the */ - /* `FT_ERR_PREFIX' macro) to `err'. For example, in the BDF module */ - /* the line */ - /* */ - /* error = FT_ERR( Invalid_Outline ); */ - /* */ - /* expands to */ - /* */ - /* error = BDF_Err_Invalid_Outline; */ - /* */ - /* For simplicity, you can always use `FT_Err_Ok' directly instead */ - /* of `FT_ERR( Ok )'. */ - /* */ - /* FT_ERR_EQ( errcode, err ) */ - /* FT_ERR_NEQ( errcode, err ) */ - /* Compare error code `errcode' with the error `err' for equality */ - /* and inequality, respectively. Example: */ - /* */ - /* if ( FT_ERR_EQ( error, Invalid_Outline ) ) */ - /* ... */ - /* */ - /* Using this macro you don't have to think about error prefixes. */ - /* Of course, if module errors are not active, the above example is */ - /* the same as */ - /* */ - /* if ( error == FT_Err_Invalid_Outline ) */ - /* ... */ - /* */ - /* FT_ERROR_BASE( errcode ) */ - /* FT_ERROR_MODULE( errcode ) */ - /* Get base error and module error code, respectively. */ - /* */ - /* */ - /* It can also be used to create a module error message table easily */ - /* with something like */ - /* */ - /* { */ - /* #undef FTMODERR_H_ */ - /* #define FT_MODERRDEF( e, v, s ) { FT_Mod_Err_ ## e, s }, */ - /* #define FT_MODERR_START_LIST { */ - /* #define FT_MODERR_END_LIST { 0, 0 } }; */ - /* */ - /* const struct */ - /* { */ - /* int mod_err_offset; */ - /* const char* mod_err_msg */ - /* } ft_mod_errors[] = */ - /* */ - /* #include FT_MODULE_ERRORS_H */ - /* } */ - /* */ - /*************************************************************************/ - - -#ifndef FTMODERR_H_ -#define FTMODERR_H_ - - - /*******************************************************************/ - /*******************************************************************/ - /***** *****/ - /***** SETUP MACROS *****/ - /***** *****/ - /*******************************************************************/ - /*******************************************************************/ - - -#undef FT_NEED_EXTERN_C - -#ifndef FT_MODERRDEF - -#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS -#define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = v, -#else -#define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = 0, -#endif - -#define FT_MODERR_START_LIST enum { -#define FT_MODERR_END_LIST FT_Mod_Err_Max }; - -#ifdef __cplusplus -#define FT_NEED_EXTERN_C - extern "C" { -#endif - -#endif /* !FT_MODERRDEF */ - - - /*******************************************************************/ - /*******************************************************************/ - /***** *****/ - /***** LIST MODULE ERROR BASES *****/ - /***** *****/ - /*******************************************************************/ - /*******************************************************************/ - - -#ifdef FT_MODERR_START_LIST - FT_MODERR_START_LIST -#endif - - - FT_MODERRDEF( Base, 0x000, "base module" ) - FT_MODERRDEF( Autofit, 0x100, "autofitter module" ) - FT_MODERRDEF( BDF, 0x200, "BDF module" ) - FT_MODERRDEF( Bzip2, 0x300, "Bzip2 module" ) - FT_MODERRDEF( Cache, 0x400, "cache module" ) - FT_MODERRDEF( CFF, 0x500, "CFF module" ) - FT_MODERRDEF( CID, 0x600, "CID module" ) - FT_MODERRDEF( Gzip, 0x700, "Gzip module" ) - FT_MODERRDEF( LZW, 0x800, "LZW module" ) - FT_MODERRDEF( OTvalid, 0x900, "OpenType validation module" ) - FT_MODERRDEF( PCF, 0xA00, "PCF module" ) - FT_MODERRDEF( PFR, 0xB00, "PFR module" ) - FT_MODERRDEF( PSaux, 0xC00, "PS auxiliary module" ) - FT_MODERRDEF( PShinter, 0xD00, "PS hinter module" ) - FT_MODERRDEF( PSnames, 0xE00, "PS names module" ) - FT_MODERRDEF( Raster, 0xF00, "raster module" ) - FT_MODERRDEF( SFNT, 0x1000, "SFNT module" ) - FT_MODERRDEF( Smooth, 0x1100, "smooth raster module" ) - FT_MODERRDEF( TrueType, 0x1200, "TrueType module" ) - FT_MODERRDEF( Type1, 0x1300, "Type 1 module" ) - FT_MODERRDEF( Type42, 0x1400, "Type 42 module" ) - FT_MODERRDEF( Winfonts, 0x1500, "Windows FON/FNT module" ) - FT_MODERRDEF( GXvalid, 0x1600, "GX validation module" ) - - -#ifdef FT_MODERR_END_LIST - FT_MODERR_END_LIST -#endif - - - /*******************************************************************/ - /*******************************************************************/ - /***** *****/ - /***** CLEANUP *****/ - /***** *****/ - /*******************************************************************/ - /*******************************************************************/ - - -#ifdef FT_NEED_EXTERN_C - } -#endif - -#undef FT_MODERR_START_LIST -#undef FT_MODERR_END_LIST -#undef FT_MODERRDEF -#undef FT_NEED_EXTERN_C - - -#endif /* FTMODERR_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftotval.h b/builddir/freetype-2.7.0/include/freetype/ftotval.h deleted file mode 100644 index 3e6e18d..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftotval.h +++ /dev/null @@ -1,204 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftotval.h */ -/* */ -/* FreeType API for validating OpenType tables (specification). */ -/* */ -/* Copyright 2004-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -/***************************************************************************/ -/* */ -/* */ -/* Warning: This module might be moved to a different library in the */ -/* future to avoid a tight dependency between FreeType and the */ -/* OpenType specification. */ -/* */ -/* */ -/***************************************************************************/ - - -#ifndef FTOTVAL_H_ -#define FTOTVAL_H_ - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* ot_validation */ - /* */ - /* <Title> */ - /* OpenType Validation */ - /* */ - /* <Abstract> */ - /* An API to validate OpenType tables. */ - /* */ - /* <Description> */ - /* This section contains the declaration of functions to validate */ - /* some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). */ - /* */ - /* <Order> */ - /* FT_OpenType_Validate */ - /* FT_OpenType_Free */ - /* */ - /* FT_VALIDATE_OTXXX */ - /* */ - /*************************************************************************/ - - - /********************************************************************** - * - * @enum: - * FT_VALIDATE_OTXXX - * - * @description: - * A list of bit-field constants used with @FT_OpenType_Validate to - * indicate which OpenType tables should be validated. - * - * @values: - * FT_VALIDATE_BASE :: - * Validate BASE table. - * - * FT_VALIDATE_GDEF :: - * Validate GDEF table. - * - * FT_VALIDATE_GPOS :: - * Validate GPOS table. - * - * FT_VALIDATE_GSUB :: - * Validate GSUB table. - * - * FT_VALIDATE_JSTF :: - * Validate JSTF table. - * - * FT_VALIDATE_MATH :: - * Validate MATH table. - * - * FT_VALIDATE_OT :: - * Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). - * - */ -#define FT_VALIDATE_BASE 0x0100 -#define FT_VALIDATE_GDEF 0x0200 -#define FT_VALIDATE_GPOS 0x0400 -#define FT_VALIDATE_GSUB 0x0800 -#define FT_VALIDATE_JSTF 0x1000 -#define FT_VALIDATE_MATH 0x2000 - -#define FT_VALIDATE_OT ( FT_VALIDATE_BASE | \ - FT_VALIDATE_GDEF | \ - FT_VALIDATE_GPOS | \ - FT_VALIDATE_GSUB | \ - FT_VALIDATE_JSTF | \ - FT_VALIDATE_MATH ) - - /********************************************************************** - * - * @function: - * FT_OpenType_Validate - * - * @description: - * Validate various OpenType tables to assure that all offsets and - * indices are valid. The idea is that a higher-level library that - * actually does the text layout can access those tables without - * error checking (which can be quite time consuming). - * - * @input: - * face :: - * A handle to the input face. - * - * validation_flags :: - * A bit field that specifies the tables to be validated. See - * @FT_VALIDATE_OTXXX for possible values. - * - * @output: - * BASE_table :: - * A pointer to the BASE table. - * - * GDEF_table :: - * A pointer to the GDEF table. - * - * GPOS_table :: - * A pointer to the GPOS table. - * - * GSUB_table :: - * A pointer to the GSUB table. - * - * JSTF_table :: - * A pointer to the JSTF table. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * This function only works with OpenType fonts, returning an error - * otherwise. - * - * After use, the application should deallocate the five tables with - * @FT_OpenType_Free. A NULL value indicates that the table either - * doesn't exist in the font, or the application hasn't asked for - * validation. - */ - FT_EXPORT( FT_Error ) - FT_OpenType_Validate( FT_Face face, - FT_UInt validation_flags, - FT_Bytes *BASE_table, - FT_Bytes *GDEF_table, - FT_Bytes *GPOS_table, - FT_Bytes *GSUB_table, - FT_Bytes *JSTF_table ); - - /********************************************************************** - * - * @function: - * FT_OpenType_Free - * - * @description: - * Free the buffer allocated by OpenType validator. - * - * @input: - * face :: - * A handle to the input face. - * - * table :: - * The pointer to the buffer that is allocated by - * @FT_OpenType_Validate. - * - * @note: - * This function must be used to free the buffer allocated by - * @FT_OpenType_Validate only. - */ - FT_EXPORT( void ) - FT_OpenType_Free( FT_Face face, - FT_Bytes table ); - - /* */ - - -FT_END_HEADER - -#endif /* FTOTVAL_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftoutln.h b/builddir/freetype-2.7.0/include/freetype/ftoutln.h deleted file mode 100644 index ef66d48..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftoutln.h +++ /dev/null @@ -1,582 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftoutln.h */ -/* */ -/* Support for the FT_Outline type used to store glyph shapes of */ -/* most scalable font formats (specification). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTOUTLN_H_ -#define FTOUTLN_H_ - - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* outline_processing */ - /* */ - /* <Title> */ - /* Outline Processing */ - /* */ - /* <Abstract> */ - /* Functions to create, transform, and render vectorial glyph images. */ - /* */ - /* <Description> */ - /* This section contains routines used to create and destroy scalable */ - /* glyph images known as `outlines'. These can also be measured, */ - /* transformed, and converted into bitmaps and pixmaps. */ - /* */ - /* <Order> */ - /* FT_Outline */ - /* FT_Outline_New */ - /* FT_Outline_Done */ - /* FT_Outline_Copy */ - /* FT_Outline_Translate */ - /* FT_Outline_Transform */ - /* FT_Outline_Embolden */ - /* FT_Outline_EmboldenXY */ - /* FT_Outline_Reverse */ - /* FT_Outline_Check */ - /* */ - /* FT_Outline_Get_CBox */ - /* FT_Outline_Get_BBox */ - /* */ - /* FT_Outline_Get_Bitmap */ - /* FT_Outline_Render */ - /* FT_Outline_Decompose */ - /* FT_Outline_Funcs */ - /* FT_Outline_MoveToFunc */ - /* FT_Outline_LineToFunc */ - /* FT_Outline_ConicToFunc */ - /* FT_Outline_CubicToFunc */ - /* */ - /* FT_Orientation */ - /* FT_Outline_Get_Orientation */ - /* */ - /* FT_OUTLINE_XXX */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Outline_Decompose */ - /* */ - /* <Description> */ - /* Walk over an outline's structure to decompose it into individual */ - /* segments and Bézier arcs. This function also emits `move to' */ - /* operations to indicate the start of new contours in the outline. */ - /* */ - /* <Input> */ - /* outline :: A pointer to the source target. */ - /* */ - /* func_interface :: A table of `emitters', i.e., function pointers */ - /* called during decomposition to indicate path */ - /* operations. */ - /* */ - /* <InOut> */ - /* user :: A typeless pointer that is passed to each */ - /* emitter during the decomposition. It can be */ - /* used to store the state during the */ - /* decomposition. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* A contour that contains a single point only is represented by a */ - /* `move to' operation followed by `line to' to the same point. In */ - /* most cases, it is best to filter this out before using the */ - /* outline for stroking purposes (otherwise it would result in a */ - /* visible dot when round caps are used). */ - /* */ - /* Similarly, the function returns success for an empty outline also */ - /* (doing nothing, this is, not calling any emitter); if necessary, */ - /* you should filter this out, too. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Outline_Decompose( FT_Outline* outline, - const FT_Outline_Funcs* func_interface, - void* user ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Outline_New */ - /* */ - /* <Description> */ - /* Create a new outline of a given size. */ - /* */ - /* <Input> */ - /* library :: A handle to the library object from where the */ - /* outline is allocated. Note however that the new */ - /* outline will *not* necessarily be *freed*, when */ - /* destroying the library, by @FT_Done_FreeType. */ - /* */ - /* numPoints :: The maximum number of points within the outline. */ - /* Must be smaller than or equal to 0xFFFF (65535). */ - /* */ - /* numContours :: The maximum number of contours within the outline. */ - /* This value must be in the range 0 to `numPoints'. */ - /* */ - /* <Output> */ - /* anoutline :: A handle to the new outline. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* The reason why this function takes a `library' parameter is simply */ - /* to use the library's memory allocator. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Outline_New( FT_Library library, - FT_UInt numPoints, - FT_Int numContours, - FT_Outline *anoutline ); - - - FT_EXPORT( FT_Error ) - FT_Outline_New_Internal( FT_Memory memory, - FT_UInt numPoints, - FT_Int numContours, - FT_Outline *anoutline ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Outline_Done */ - /* */ - /* <Description> */ - /* Destroy an outline created with @FT_Outline_New. */ - /* */ - /* <Input> */ - /* library :: A handle of the library object used to allocate the */ - /* outline. */ - /* */ - /* outline :: A pointer to the outline object to be discarded. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* If the outline's `owner' field is not set, only the outline */ - /* descriptor will be released. */ - /* */ - /* The reason why this function takes an `library' parameter is */ - /* simply to use ft_mem_free(). */ - /* */ - FT_EXPORT( FT_Error ) - FT_Outline_Done( FT_Library library, - FT_Outline* outline ); - - - FT_EXPORT( FT_Error ) - FT_Outline_Done_Internal( FT_Memory memory, - FT_Outline* outline ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Outline_Check */ - /* */ - /* <Description> */ - /* Check the contents of an outline descriptor. */ - /* */ - /* <Input> */ - /* outline :: A handle to a source outline. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* An empty outline, or an outline with a single point only is also */ - /* valid. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Outline_Check( FT_Outline* outline ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Outline_Get_CBox */ - /* */ - /* <Description> */ - /* Return an outline's `control box'. The control box encloses all */ - /* the outline's points, including Bézier control points. Though it */ - /* coincides with the exact bounding box for most glyphs, it can be */ - /* slightly larger in some situations (like when rotating an outline */ - /* that contains Bézier outside arcs). */ - /* */ - /* Computing the control box is very fast, while getting the bounding */ - /* box can take much more time as it needs to walk over all segments */ - /* and arcs in the outline. To get the latter, you can use the */ - /* `ftbbox' component, which is dedicated to this single task. */ - /* */ - /* <Input> */ - /* outline :: A pointer to the source outline descriptor. */ - /* */ - /* <Output> */ - /* acbox :: The outline's control box. */ - /* */ - /* <Note> */ - /* See @FT_Glyph_Get_CBox for a discussion of tricky fonts. */ - /* */ - FT_EXPORT( void ) - FT_Outline_Get_CBox( const FT_Outline* outline, - FT_BBox *acbox ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Outline_Translate */ - /* */ - /* <Description> */ - /* Apply a simple translation to the points of an outline. */ - /* */ - /* <InOut> */ - /* outline :: A pointer to the target outline descriptor. */ - /* */ - /* <Input> */ - /* xOffset :: The horizontal offset. */ - /* */ - /* yOffset :: The vertical offset. */ - /* */ - FT_EXPORT( void ) - FT_Outline_Translate( const FT_Outline* outline, - FT_Pos xOffset, - FT_Pos yOffset ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Outline_Copy */ - /* */ - /* <Description> */ - /* Copy an outline into another one. Both objects must have the */ - /* same sizes (number of points & number of contours) when this */ - /* function is called. */ - /* */ - /* <Input> */ - /* source :: A handle to the source outline. */ - /* */ - /* <Output> */ - /* target :: A handle to the target outline. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Outline_Copy( const FT_Outline* source, - FT_Outline *target ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Outline_Transform */ - /* */ - /* <Description> */ - /* Apply a simple 2x2 matrix to all of an outline's points. Useful */ - /* for applying rotations, slanting, flipping, etc. */ - /* */ - /* <InOut> */ - /* outline :: A pointer to the target outline descriptor. */ - /* */ - /* <Input> */ - /* matrix :: A pointer to the transformation matrix. */ - /* */ - /* <Note> */ - /* You can use @FT_Outline_Translate if you need to translate the */ - /* outline's points. */ - /* */ - FT_EXPORT( void ) - FT_Outline_Transform( const FT_Outline* outline, - const FT_Matrix* matrix ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Outline_Embolden */ - /* */ - /* <Description> */ - /* Embolden an outline. The new outline will be at most 4~times */ - /* `strength' pixels wider and higher. You may think of the left and */ - /* bottom borders as unchanged. */ - /* */ - /* Negative `strength' values to reduce the outline thickness are */ - /* possible also. */ - /* */ - /* <InOut> */ - /* outline :: A handle to the target outline. */ - /* */ - /* <Input> */ - /* strength :: How strong the glyph is emboldened. Expressed in */ - /* 26.6 pixel format. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* The used algorithm to increase or decrease the thickness of the */ - /* glyph doesn't change the number of points; this means that certain */ - /* situations like acute angles or intersections are sometimes */ - /* handled incorrectly. */ - /* */ - /* If you need `better' metrics values you should call */ - /* @FT_Outline_Get_CBox or @FT_Outline_Get_BBox. */ - /* */ - /* Example call: */ - /* */ - /* { */ - /* FT_Load_Glyph( face, index, FT_LOAD_DEFAULT ); */ - /* if ( face->glyph->format == FT_GLYPH_FORMAT_OUTLINE ) */ - /* FT_Outline_Embolden( &face->glyph->outline, strength ); */ - /* } */ - /* */ - /* To get meaningful results, font scaling values must be set with */ - /* functions like @FT_Set_Char_Size before calling FT_Render_Glyph. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Outline_Embolden( FT_Outline* outline, - FT_Pos strength ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Outline_EmboldenXY */ - /* */ - /* <Description> */ - /* Embolden an outline. The new outline will be `xstrength' pixels */ - /* wider and `ystrength' pixels higher. Otherwise, it is similar to */ - /* @FT_Outline_Embolden, which uses the same strength in both */ - /* directions. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Outline_EmboldenXY( FT_Outline* outline, - FT_Pos xstrength, - FT_Pos ystrength ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Outline_Reverse */ - /* */ - /* <Description> */ - /* Reverse the drawing direction of an outline. This is used to */ - /* ensure consistent fill conventions for mirrored glyphs. */ - /* */ - /* <InOut> */ - /* outline :: A pointer to the target outline descriptor. */ - /* */ - /* <Note> */ - /* This function toggles the bit flag @FT_OUTLINE_REVERSE_FILL in */ - /* the outline's `flags' field. */ - /* */ - /* It shouldn't be used by a normal client application, unless it */ - /* knows what it is doing. */ - /* */ - FT_EXPORT( void ) - FT_Outline_Reverse( FT_Outline* outline ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Outline_Get_Bitmap */ - /* */ - /* <Description> */ - /* Render an outline within a bitmap. The outline's image is simply */ - /* OR-ed to the target bitmap. */ - /* */ - /* <Input> */ - /* library :: A handle to a FreeType library object. */ - /* */ - /* outline :: A pointer to the source outline descriptor. */ - /* */ - /* <InOut> */ - /* abitmap :: A pointer to the target bitmap descriptor. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* This function does NOT CREATE the bitmap, it only renders an */ - /* outline image within the one you pass to it! Consequently, the */ - /* various fields in `abitmap' should be set accordingly. */ - /* */ - /* It will use the raster corresponding to the default glyph format. */ - /* */ - /* The value of the `num_grays' field in `abitmap' is ignored. If */ - /* you select the gray-level rasterizer, and you want less than 256 */ - /* gray levels, you have to use @FT_Outline_Render directly. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Outline_Get_Bitmap( FT_Library library, - FT_Outline* outline, - const FT_Bitmap *abitmap ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Outline_Render */ - /* */ - /* <Description> */ - /* Render an outline within a bitmap using the current scan-convert. */ - /* This function uses an @FT_Raster_Params structure as an argument, */ - /* allowing advanced features like direct composition, translucency, */ - /* etc. */ - /* */ - /* <Input> */ - /* library :: A handle to a FreeType library object. */ - /* */ - /* outline :: A pointer to the source outline descriptor. */ - /* */ - /* <InOut> */ - /* params :: A pointer to an @FT_Raster_Params structure used to */ - /* describe the rendering operation. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* You should know what you are doing and how @FT_Raster_Params works */ - /* to use this function. */ - /* */ - /* The field `params.source' will be set to `outline' before the scan */ - /* converter is called, which means that the value you give to it is */ - /* actually ignored. */ - /* */ - /* The gray-level rasterizer always uses 256 gray levels. If you */ - /* want less gray levels, you have to provide your own span callback. */ - /* See the @FT_RASTER_FLAG_DIRECT value of the `flags' field in the */ - /* @FT_Raster_Params structure for more details. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Outline_Render( FT_Library library, - FT_Outline* outline, - FT_Raster_Params* params ); - - - /************************************************************************** - * - * @enum: - * FT_Orientation - * - * @description: - * A list of values used to describe an outline's contour orientation. - * - * The TrueType and PostScript specifications use different conventions - * to determine whether outline contours should be filled or unfilled. - * - * @values: - * FT_ORIENTATION_TRUETYPE :: - * According to the TrueType specification, clockwise contours must - * be filled, and counter-clockwise ones must be unfilled. - * - * FT_ORIENTATION_POSTSCRIPT :: - * According to the PostScript specification, counter-clockwise contours - * must be filled, and clockwise ones must be unfilled. - * - * FT_ORIENTATION_FILL_RIGHT :: - * This is identical to @FT_ORIENTATION_TRUETYPE, but is used to - * remember that in TrueType, everything that is to the right of - * the drawing direction of a contour must be filled. - * - * FT_ORIENTATION_FILL_LEFT :: - * This is identical to @FT_ORIENTATION_POSTSCRIPT, but is used to - * remember that in PostScript, everything that is to the left of - * the drawing direction of a contour must be filled. - * - * FT_ORIENTATION_NONE :: - * The orientation cannot be determined. That is, different parts of - * the glyph have different orientation. - * - */ - typedef enum FT_Orientation_ - { - FT_ORIENTATION_TRUETYPE = 0, - FT_ORIENTATION_POSTSCRIPT = 1, - FT_ORIENTATION_FILL_RIGHT = FT_ORIENTATION_TRUETYPE, - FT_ORIENTATION_FILL_LEFT = FT_ORIENTATION_POSTSCRIPT, - FT_ORIENTATION_NONE - - } FT_Orientation; - - - /************************************************************************** - * - * @function: - * FT_Outline_Get_Orientation - * - * @description: - * This function analyzes a glyph outline and tries to compute its - * fill orientation (see @FT_Orientation). This is done by integrating - * the total area covered by the outline. The positive integral - * corresponds to the clockwise orientation and @FT_ORIENTATION_POSTSCRIPT - * is returned. The negative integral corresponds to the counter-clockwise - * orientation and @FT_ORIENTATION_TRUETYPE is returned. - * - * Note that this will return @FT_ORIENTATION_TRUETYPE for empty - * outlines. - * - * @input: - * outline :: - * A handle to the source outline. - * - * @return: - * The orientation. - * - */ - FT_EXPORT( FT_Orientation ) - FT_Outline_Get_Orientation( FT_Outline* outline ); - - /* */ - - -FT_END_HEADER - -#endif /* FTOUTLN_H_ */ - - -/* END */ - - -/* Local Variables: */ -/* coding: utf-8 */ -/* End: */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftpfr.h b/builddir/freetype-2.7.0/include/freetype/ftpfr.h deleted file mode 100644 index 2e1bff2..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftpfr.h +++ /dev/null @@ -1,172 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftpfr.h */ -/* */ -/* FreeType API for accessing PFR-specific data (specification only). */ -/* */ -/* Copyright 2002-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTPFR_H_ -#define FTPFR_H_ - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* pfr_fonts */ - /* */ - /* <Title> */ - /* PFR Fonts */ - /* */ - /* <Abstract> */ - /* PFR/TrueDoc specific API. */ - /* */ - /* <Description> */ - /* This section contains the declaration of PFR-specific functions. */ - /* */ - /*************************************************************************/ - - - /********************************************************************** - * - * @function: - * FT_Get_PFR_Metrics - * - * @description: - * Return the outline and metrics resolutions of a given PFR face. - * - * @input: - * face :: Handle to the input face. It can be a non-PFR face. - * - * @output: - * aoutline_resolution :: - * Outline resolution. This is equivalent to `face->units_per_EM' - * for non-PFR fonts. Optional (parameter can be NULL). - * - * ametrics_resolution :: - * Metrics resolution. This is equivalent to `outline_resolution' - * for non-PFR fonts. Optional (parameter can be NULL). - * - * ametrics_x_scale :: - * A 16.16 fixed-point number used to scale distance expressed - * in metrics units to device sub-pixels. This is equivalent to - * `face->size->x_scale', but for metrics only. Optional (parameter - * can be NULL). - * - * ametrics_y_scale :: - * Same as `ametrics_x_scale' but for the vertical direction. - * optional (parameter can be NULL). - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * If the input face is not a PFR, this function will return an error. - * However, in all cases, it will return valid values. - */ - FT_EXPORT( FT_Error ) - FT_Get_PFR_Metrics( FT_Face face, - FT_UInt *aoutline_resolution, - FT_UInt *ametrics_resolution, - FT_Fixed *ametrics_x_scale, - FT_Fixed *ametrics_y_scale ); - - - /********************************************************************** - * - * @function: - * FT_Get_PFR_Kerning - * - * @description: - * Return the kerning pair corresponding to two glyphs in a PFR face. - * The distance is expressed in metrics units, unlike the result of - * @FT_Get_Kerning. - * - * @input: - * face :: A handle to the input face. - * - * left :: Index of the left glyph. - * - * right :: Index of the right glyph. - * - * @output: - * avector :: A kerning vector. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * This function always return distances in original PFR metrics - * units. This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED - * mode, which always returns distances converted to outline units. - * - * You can use the value of the `x_scale' and `y_scale' parameters - * returned by @FT_Get_PFR_Metrics to scale these to device sub-pixels. - */ - FT_EXPORT( FT_Error ) - FT_Get_PFR_Kerning( FT_Face face, - FT_UInt left, - FT_UInt right, - FT_Vector *avector ); - - - /********************************************************************** - * - * @function: - * FT_Get_PFR_Advance - * - * @description: - * Return a given glyph advance, expressed in original metrics units, - * from a PFR font. - * - * @input: - * face :: A handle to the input face. - * - * gindex :: The glyph index. - * - * @output: - * aadvance :: The glyph advance in metrics units. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics - * to convert the advance to device sub-pixels (i.e., 1/64th of pixels). - */ - FT_EXPORT( FT_Error ) - FT_Get_PFR_Advance( FT_Face face, - FT_UInt gindex, - FT_Pos *aadvance ); - - /* */ - - -FT_END_HEADER - -#endif /* FTPFR_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftrender.h b/builddir/freetype-2.7.0/include/freetype/ftrender.h deleted file mode 100644 index 9f7ed9e..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftrender.h +++ /dev/null @@ -1,232 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftrender.h */ -/* */ -/* FreeType renderer modules public interface (specification). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTRENDER_H_ -#define FTRENDER_H_ - - -#include <ft2build.h> -#include FT_MODULE_H -#include FT_GLYPH_H - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* module_management */ - /* */ - /*************************************************************************/ - - - /* create a new glyph object */ - typedef FT_Error - (*FT_Glyph_InitFunc)( FT_Glyph glyph, - FT_GlyphSlot slot ); - - /* destroys a given glyph object */ - typedef void - (*FT_Glyph_DoneFunc)( FT_Glyph glyph ); - - typedef void - (*FT_Glyph_TransformFunc)( FT_Glyph glyph, - const FT_Matrix* matrix, - const FT_Vector* delta ); - - typedef void - (*FT_Glyph_GetBBoxFunc)( FT_Glyph glyph, - FT_BBox* abbox ); - - typedef FT_Error - (*FT_Glyph_CopyFunc)( FT_Glyph source, - FT_Glyph target ); - - typedef FT_Error - (*FT_Glyph_PrepareFunc)( FT_Glyph glyph, - FT_GlyphSlot slot ); - -/* deprecated */ -#define FT_Glyph_Init_Func FT_Glyph_InitFunc -#define FT_Glyph_Done_Func FT_Glyph_DoneFunc -#define FT_Glyph_Transform_Func FT_Glyph_TransformFunc -#define FT_Glyph_BBox_Func FT_Glyph_GetBBoxFunc -#define FT_Glyph_Copy_Func FT_Glyph_CopyFunc -#define FT_Glyph_Prepare_Func FT_Glyph_PrepareFunc - - - struct FT_Glyph_Class_ - { - FT_Long glyph_size; - FT_Glyph_Format glyph_format; - FT_Glyph_InitFunc glyph_init; - FT_Glyph_DoneFunc glyph_done; - FT_Glyph_CopyFunc glyph_copy; - FT_Glyph_TransformFunc glyph_transform; - FT_Glyph_GetBBoxFunc glyph_bbox; - FT_Glyph_PrepareFunc glyph_prepare; - }; - - - typedef FT_Error - (*FT_Renderer_RenderFunc)( FT_Renderer renderer, - FT_GlyphSlot slot, - FT_UInt mode, - const FT_Vector* origin ); - - typedef FT_Error - (*FT_Renderer_TransformFunc)( FT_Renderer renderer, - FT_GlyphSlot slot, - const FT_Matrix* matrix, - const FT_Vector* delta ); - - - typedef void - (*FT_Renderer_GetCBoxFunc)( FT_Renderer renderer, - FT_GlyphSlot slot, - FT_BBox* cbox ); - - - typedef FT_Error - (*FT_Renderer_SetModeFunc)( FT_Renderer renderer, - FT_ULong mode_tag, - FT_Pointer mode_ptr ); - -/* deprecated identifiers */ -#define FTRenderer_render FT_Renderer_RenderFunc -#define FTRenderer_transform FT_Renderer_TransformFunc -#define FTRenderer_getCBox FT_Renderer_GetCBoxFunc -#define FTRenderer_setMode FT_Renderer_SetModeFunc - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Renderer_Class */ - /* */ - /* <Description> */ - /* The renderer module class descriptor. */ - /* */ - /* <Fields> */ - /* root :: The root @FT_Module_Class fields. */ - /* */ - /* glyph_format :: The glyph image format this renderer handles. */ - /* */ - /* render_glyph :: A method used to render the image that is in a */ - /* given glyph slot into a bitmap. */ - /* */ - /* transform_glyph :: A method used to transform the image that is in */ - /* a given glyph slot. */ - /* */ - /* get_glyph_cbox :: A method used to access the glyph's cbox. */ - /* */ - /* set_mode :: A method used to pass additional parameters. */ - /* */ - /* raster_class :: For @FT_GLYPH_FORMAT_OUTLINE renderers only. */ - /* This is a pointer to its raster's class. */ - /* */ - typedef struct FT_Renderer_Class_ - { - FT_Module_Class root; - - FT_Glyph_Format glyph_format; - - FT_Renderer_RenderFunc render_glyph; - FT_Renderer_TransformFunc transform_glyph; - FT_Renderer_GetCBoxFunc get_glyph_cbox; - FT_Renderer_SetModeFunc set_mode; - - FT_Raster_Funcs* raster_class; - - } FT_Renderer_Class; - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Renderer */ - /* */ - /* <Description> */ - /* Retrieve the current renderer for a given glyph format. */ - /* */ - /* <Input> */ - /* library :: A handle to the library object. */ - /* */ - /* format :: The glyph format. */ - /* */ - /* <Return> */ - /* A renderer handle. 0~if none found. */ - /* */ - /* <Note> */ - /* An error will be returned if a module already exists by that name, */ - /* or if the module requires a version of FreeType that is too great. */ - /* */ - /* To add a new renderer, simply use @FT_Add_Module. To retrieve a */ - /* renderer by its name, use @FT_Get_Module. */ - /* */ - FT_EXPORT( FT_Renderer ) - FT_Get_Renderer( FT_Library library, - FT_Glyph_Format format ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Set_Renderer */ - /* */ - /* <Description> */ - /* Set the current renderer to use, and set additional mode. */ - /* */ - /* <InOut> */ - /* library :: A handle to the library object. */ - /* */ - /* <Input> */ - /* renderer :: A handle to the renderer object. */ - /* */ - /* num_params :: The number of additional parameters. */ - /* */ - /* parameters :: Additional parameters. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* In case of success, the renderer will be used to convert glyph */ - /* images in the renderer's known format into bitmaps. */ - /* */ - /* This doesn't change the current renderer for other formats. */ - /* */ - /* Currently, no FreeType renderer module uses `parameters'; you */ - /* should thus always pass NULL as the value. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Set_Renderer( FT_Library library, - FT_Renderer renderer, - FT_UInt num_params, - FT_Parameter* parameters ); - - /* */ - - -FT_END_HEADER - -#endif /* FTRENDER_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftsizes.h b/builddir/freetype-2.7.0/include/freetype/ftsizes.h deleted file mode 100644 index 55e0d5c..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftsizes.h +++ /dev/null @@ -1,159 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftsizes.h */ -/* */ -/* FreeType size objects management (specification). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /*************************************************************************/ - /* */ - /* Typical application would normally not need to use these functions. */ - /* However, they have been placed in a public API for the rare cases */ - /* where they are needed. */ - /* */ - /*************************************************************************/ - - -#ifndef FTSIZES_H_ -#define FTSIZES_H_ - - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* sizes_management */ - /* */ - /* <Title> */ - /* Size Management */ - /* */ - /* <Abstract> */ - /* Managing multiple sizes per face. */ - /* */ - /* <Description> */ - /* When creating a new face object (e.g., with @FT_New_Face), an */ - /* @FT_Size object is automatically created and used to store all */ - /* pixel-size dependent information, available in the `face->size' */ - /* field. */ - /* */ - /* It is however possible to create more sizes for a given face, */ - /* mostly in order to manage several character pixel sizes of the */ - /* same font family and style. See @FT_New_Size and @FT_Done_Size. */ - /* */ - /* Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only */ - /* modify the contents of the current `active' size; you thus need */ - /* to use @FT_Activate_Size to change it. */ - /* */ - /* 99% of applications won't need the functions provided here, */ - /* especially if they use the caching sub-system, so be cautious */ - /* when using these. */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_New_Size */ - /* */ - /* <Description> */ - /* Create a new size object from a given face object. */ - /* */ - /* <Input> */ - /* face :: A handle to a parent face object. */ - /* */ - /* <Output> */ - /* asize :: A handle to a new size object. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* You need to call @FT_Activate_Size in order to select the new size */ - /* for upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size, */ - /* @FT_Load_Glyph, @FT_Load_Char, etc. */ - /* */ - FT_EXPORT( FT_Error ) - FT_New_Size( FT_Face face, - FT_Size* size ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Done_Size */ - /* */ - /* <Description> */ - /* Discard a given size object. Note that @FT_Done_Face */ - /* automatically discards all size objects allocated with */ - /* @FT_New_Size. */ - /* */ - /* <Input> */ - /* size :: A handle to a target size object. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Done_Size( FT_Size size ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Activate_Size */ - /* */ - /* <Description> */ - /* Even though it is possible to create several size objects for a */ - /* given face (see @FT_New_Size for details), functions like */ - /* @FT_Load_Glyph or @FT_Load_Char only use the one that has been */ - /* activated last to determine the `current character pixel size'. */ - /* */ - /* This function can be used to `activate' a previously created size */ - /* object. */ - /* */ - /* <Input> */ - /* size :: A handle to a target size object. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* If `face' is the size's parent face object, this function changes */ - /* the value of `face->size' to the input size handle. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Activate_Size( FT_Size size ); - - /* */ - - -FT_END_HEADER - -#endif /* FTSIZES_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftsnames.h b/builddir/freetype-2.7.0/include/freetype/ftsnames.h deleted file mode 100644 index a7b51c2..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftsnames.h +++ /dev/null @@ -1,200 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftsnames.h */ -/* */ -/* Simple interface to access SFNT name tables (which are used */ -/* to hold font names, copyright info, notices, etc.) (specification). */ -/* */ -/* This is _not_ used to retrieve glyph names! */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTSNAMES_H_ -#define FTSNAMES_H_ - - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* sfnt_names */ - /* */ - /* <Title> */ - /* SFNT Names */ - /* */ - /* <Abstract> */ - /* Access the names embedded in TrueType and OpenType files. */ - /* */ - /* <Description> */ - /* The TrueType and OpenType specifications allow the inclusion of */ - /* a special `names table' in font files. This table contains */ - /* textual (and internationalized) information regarding the font, */ - /* like family name, copyright, version, etc. */ - /* */ - /* The definitions below are used to access them if available. */ - /* */ - /* Note that this has nothing to do with glyph names! */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_SfntName */ - /* */ - /* <Description> */ - /* A structure used to model an SFNT `name' table entry. */ - /* */ - /* <Fields> */ - /* platform_id :: The platform ID for `string'. */ - /* */ - /* encoding_id :: The encoding ID for `string'. */ - /* */ - /* language_id :: The language ID for `string'. */ - /* */ - /* name_id :: An identifier for `string'. */ - /* */ - /* string :: The `name' string. Note that its format differs */ - /* depending on the (platform,encoding) pair. It can */ - /* be a Pascal String, a UTF-16 one, etc. */ - /* */ - /* Generally speaking, the string is not */ - /* zero-terminated. Please refer to the TrueType */ - /* specification for details. */ - /* */ - /* string_len :: The length of `string' in bytes. */ - /* */ - /* <Note> */ - /* Possible values for `platform_id', `encoding_id', `language_id', */ - /* and `name_id' are given in the file `ttnameid.h'. For details */ - /* please refer to the TrueType or OpenType specification. */ - /* */ - /* See also @TT_PLATFORM_XXX, @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX, */ - /* @TT_ISO_ID_XXX, and @TT_MS_ID_XXX. */ - /* */ - typedef struct FT_SfntName_ - { - FT_UShort platform_id; - FT_UShort encoding_id; - FT_UShort language_id; - FT_UShort name_id; - - FT_Byte* string; /* this string is *not* null-terminated! */ - FT_UInt string_len; /* in bytes */ - - } FT_SfntName; - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Sfnt_Name_Count */ - /* */ - /* <Description> */ - /* Retrieve the number of name strings in the SFNT `name' table. */ - /* */ - /* <Input> */ - /* face :: A handle to the source face. */ - /* */ - /* <Return> */ - /* The number of strings in the `name' table. */ - /* */ - FT_EXPORT( FT_UInt ) - FT_Get_Sfnt_Name_Count( FT_Face face ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Sfnt_Name */ - /* */ - /* <Description> */ - /* Retrieve a string of the SFNT `name' table for a given index. */ - /* */ - /* <Input> */ - /* face :: A handle to the source face. */ - /* */ - /* idx :: The index of the `name' string. */ - /* */ - /* <Output> */ - /* aname :: The indexed @FT_SfntName structure. */ - /* */ - /* <Return> */ - /* FreeType error code. 0~means success. */ - /* */ - /* <Note> */ - /* The `string' array returned in the `aname' structure is not */ - /* null-terminated. The application should deallocate it if it is no */ - /* longer in use. */ - /* */ - /* Use @FT_Get_Sfnt_Name_Count to get the total number of available */ - /* `name' table entries, then do a loop until you get the right */ - /* platform, encoding, and name ID. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Get_Sfnt_Name( FT_Face face, - FT_UInt idx, - FT_SfntName *aname ); - - - /*************************************************************************** - * - * @constant: - * FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY - * - * @description: - * A constant used as the tag of @FT_Parameter structures to make - * FT_Open_Face() ignore preferred family subfamily names in `name' - * table since OpenType version 1.4. For backwards compatibility with - * legacy systems that have a 4-face-per-family restriction. - * - */ -#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY FT_MAKE_TAG( 'i', 'g', 'p', 'f' ) - - - /*************************************************************************** - * - * @constant: - * FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY - * - * @description: - * A constant used as the tag of @FT_Parameter structures to make - * FT_Open_Face() ignore preferred subfamily names in `name' table since - * OpenType version 1.4. For backwards compatibility with legacy - * systems that have a 4-face-per-family restriction. - * - */ -#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY FT_MAKE_TAG( 'i', 'g', 'p', 's' ) - - /* */ - - -FT_END_HEADER - -#endif /* FTSNAMES_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftstroke.h b/builddir/freetype-2.7.0/include/freetype/ftstroke.h deleted file mode 100644 index b3b9922..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftstroke.h +++ /dev/null @@ -1,785 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftstroke.h */ -/* */ -/* FreeType path stroker (specification). */ -/* */ -/* Copyright 2002-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTSTROKE_H_ -#define FTSTROKE_H_ - -#include <ft2build.h> -#include FT_OUTLINE_H -#include FT_GLYPH_H - - -FT_BEGIN_HEADER - - - /************************************************************************ - * - * @section: - * glyph_stroker - * - * @title: - * Glyph Stroker - * - * @abstract: - * Generating bordered and stroked glyphs. - * - * @description: - * This component generates stroked outlines of a given vectorial - * glyph. It also allows you to retrieve the `outside' and/or the - * `inside' borders of the stroke. - * - * This can be useful to generate `bordered' glyph, i.e., glyphs - * displayed with a coloured (and anti-aliased) border around their - * shape. - * - * @order: - * FT_Stroker - * - * FT_Stroker_LineJoin - * FT_Stroker_LineCap - * FT_StrokerBorder - * - * FT_Outline_GetInsideBorder - * FT_Outline_GetOutsideBorder - * - * FT_Glyph_Stroke - * FT_Glyph_StrokeBorder - * - * FT_Stroker_New - * FT_Stroker_Set - * FT_Stroker_Rewind - * FT_Stroker_ParseOutline - * FT_Stroker_Done - * - * FT_Stroker_BeginSubPath - * FT_Stroker_EndSubPath - * - * FT_Stroker_LineTo - * FT_Stroker_ConicTo - * FT_Stroker_CubicTo - * - * FT_Stroker_GetBorderCounts - * FT_Stroker_ExportBorder - * FT_Stroker_GetCounts - * FT_Stroker_Export - * - */ - - - /************************************************************** - * - * @type: - * FT_Stroker - * - * @description: - * Opaque handle to a path stroker object. - */ - typedef struct FT_StrokerRec_* FT_Stroker; - - - /************************************************************** - * - * @enum: - * FT_Stroker_LineJoin - * - * @description: - * These values determine how two joining lines are rendered - * in a stroker. - * - * @values: - * FT_STROKER_LINEJOIN_ROUND :: - * Used to render rounded line joins. Circular arcs are used - * to join two lines smoothly. - * - * FT_STROKER_LINEJOIN_BEVEL :: - * Used to render beveled line joins. The outer corner of - * the joined lines is filled by enclosing the triangular - * region of the corner with a straight line between the - * outer corners of each stroke. - * - * FT_STROKER_LINEJOIN_MITER_FIXED :: - * Used to render mitered line joins, with fixed bevels if the - * miter limit is exceeded. The outer edges of the strokes - * for the two segments are extended until they meet at an - * angle. If the segments meet at too sharp an angle (such - * that the miter would extend from the intersection of the - * segments a distance greater than the product of the miter - * limit value and the border radius), then a bevel join (see - * above) is used instead. This prevents long spikes being - * created. FT_STROKER_LINEJOIN_MITER_FIXED generates a miter - * line join as used in PostScript and PDF. - * - * FT_STROKER_LINEJOIN_MITER_VARIABLE :: - * FT_STROKER_LINEJOIN_MITER :: - * Used to render mitered line joins, with variable bevels if - * the miter limit is exceeded. The intersection of the - * strokes is clipped at a line perpendicular to the bisector - * of the angle between the strokes, at the distance from the - * intersection of the segments equal to the product of the - * miter limit value and the border radius. This prevents - * long spikes being created. - * FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line - * join as used in XPS. FT_STROKER_LINEJOIN_MITER is an alias - * for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for - * backwards compatibility. - */ - typedef enum FT_Stroker_LineJoin_ - { - FT_STROKER_LINEJOIN_ROUND = 0, - FT_STROKER_LINEJOIN_BEVEL = 1, - FT_STROKER_LINEJOIN_MITER_VARIABLE = 2, - FT_STROKER_LINEJOIN_MITER = FT_STROKER_LINEJOIN_MITER_VARIABLE, - FT_STROKER_LINEJOIN_MITER_FIXED = 3 - - } FT_Stroker_LineJoin; - - - /************************************************************** - * - * @enum: - * FT_Stroker_LineCap - * - * @description: - * These values determine how the end of opened sub-paths are - * rendered in a stroke. - * - * @values: - * FT_STROKER_LINECAP_BUTT :: - * The end of lines is rendered as a full stop on the last - * point itself. - * - * FT_STROKER_LINECAP_ROUND :: - * The end of lines is rendered as a half-circle around the - * last point. - * - * FT_STROKER_LINECAP_SQUARE :: - * The end of lines is rendered as a square around the - * last point. - */ - typedef enum FT_Stroker_LineCap_ - { - FT_STROKER_LINECAP_BUTT = 0, - FT_STROKER_LINECAP_ROUND, - FT_STROKER_LINECAP_SQUARE - - } FT_Stroker_LineCap; - - - /************************************************************** - * - * @enum: - * FT_StrokerBorder - * - * @description: - * These values are used to select a given stroke border - * in @FT_Stroker_GetBorderCounts and @FT_Stroker_ExportBorder. - * - * @values: - * FT_STROKER_BORDER_LEFT :: - * Select the left border, relative to the drawing direction. - * - * FT_STROKER_BORDER_RIGHT :: - * Select the right border, relative to the drawing direction. - * - * @note: - * Applications are generally interested in the `inside' and `outside' - * borders. However, there is no direct mapping between these and the - * `left' and `right' ones, since this really depends on the glyph's - * drawing orientation, which varies between font formats. - * - * You can however use @FT_Outline_GetInsideBorder and - * @FT_Outline_GetOutsideBorder to get these. - */ - typedef enum FT_StrokerBorder_ - { - FT_STROKER_BORDER_LEFT = 0, - FT_STROKER_BORDER_RIGHT - - } FT_StrokerBorder; - - - /************************************************************** - * - * @function: - * FT_Outline_GetInsideBorder - * - * @description: - * Retrieve the @FT_StrokerBorder value corresponding to the - * `inside' borders of a given outline. - * - * @input: - * outline :: - * The source outline handle. - * - * @return: - * The border index. @FT_STROKER_BORDER_RIGHT for empty or invalid - * outlines. - */ - FT_EXPORT( FT_StrokerBorder ) - FT_Outline_GetInsideBorder( FT_Outline* outline ); - - - /************************************************************** - * - * @function: - * FT_Outline_GetOutsideBorder - * - * @description: - * Retrieve the @FT_StrokerBorder value corresponding to the - * `outside' borders of a given outline. - * - * @input: - * outline :: - * The source outline handle. - * - * @return: - * The border index. @FT_STROKER_BORDER_LEFT for empty or invalid - * outlines. - */ - FT_EXPORT( FT_StrokerBorder ) - FT_Outline_GetOutsideBorder( FT_Outline* outline ); - - - /************************************************************** - * - * @function: - * FT_Stroker_New - * - * @description: - * Create a new stroker object. - * - * @input: - * library :: - * FreeType library handle. - * - * @output: - * astroker :: - * A new stroker object handle. NULL in case of error. - * - * @return: - * FreeType error code. 0~means success. - */ - FT_EXPORT( FT_Error ) - FT_Stroker_New( FT_Library library, - FT_Stroker *astroker ); - - - /************************************************************** - * - * @function: - * FT_Stroker_Set - * - * @description: - * Reset a stroker object's attributes. - * - * @input: - * stroker :: - * The target stroker handle. - * - * radius :: - * The border radius. - * - * line_cap :: - * The line cap style. - * - * line_join :: - * The line join style. - * - * miter_limit :: - * The miter limit for the FT_STROKER_LINEJOIN_MITER_FIXED and - * FT_STROKER_LINEJOIN_MITER_VARIABLE line join styles, - * expressed as 16.16 fixed-point value. - * - * @note: - * The radius is expressed in the same units as the outline - * coordinates. - * - * This function calls @FT_Stroker_Rewind automatically. - */ - FT_EXPORT( void ) - FT_Stroker_Set( FT_Stroker stroker, - FT_Fixed radius, - FT_Stroker_LineCap line_cap, - FT_Stroker_LineJoin line_join, - FT_Fixed miter_limit ); - - - /************************************************************** - * - * @function: - * FT_Stroker_Rewind - * - * @description: - * Reset a stroker object without changing its attributes. - * You should call this function before beginning a new - * series of calls to @FT_Stroker_BeginSubPath or - * @FT_Stroker_EndSubPath. - * - * @input: - * stroker :: - * The target stroker handle. - */ - FT_EXPORT( void ) - FT_Stroker_Rewind( FT_Stroker stroker ); - - - /************************************************************** - * - * @function: - * FT_Stroker_ParseOutline - * - * @description: - * A convenience function used to parse a whole outline with - * the stroker. The resulting outline(s) can be retrieved - * later by functions like @FT_Stroker_GetCounts and @FT_Stroker_Export. - * - * @input: - * stroker :: - * The target stroker handle. - * - * outline :: - * The source outline. - * - * opened :: - * A boolean. If~1, the outline is treated as an open path instead - * of a closed one. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * If `opened' is~0 (the default), the outline is treated as a closed - * path, and the stroker generates two distinct `border' outlines. - * - * If `opened' is~1, the outline is processed as an open path, and the - * stroker generates a single `stroke' outline. - * - * This function calls @FT_Stroker_Rewind automatically. - */ - FT_EXPORT( FT_Error ) - FT_Stroker_ParseOutline( FT_Stroker stroker, - FT_Outline* outline, - FT_Bool opened ); - - - /************************************************************** - * - * @function: - * FT_Stroker_BeginSubPath - * - * @description: - * Start a new sub-path in the stroker. - * - * @input: - * stroker :: - * The target stroker handle. - * - * to :: - * A pointer to the start vector. - * - * open :: - * A boolean. If~1, the sub-path is treated as an open one. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * This function is useful when you need to stroke a path that is - * not stored as an @FT_Outline object. - */ - FT_EXPORT( FT_Error ) - FT_Stroker_BeginSubPath( FT_Stroker stroker, - FT_Vector* to, - FT_Bool open ); - - - /************************************************************** - * - * @function: - * FT_Stroker_EndSubPath - * - * @description: - * Close the current sub-path in the stroker. - * - * @input: - * stroker :: - * The target stroker handle. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * You should call this function after @FT_Stroker_BeginSubPath. - * If the subpath was not `opened', this function `draws' a - * single line segment to the start position when needed. - */ - FT_EXPORT( FT_Error ) - FT_Stroker_EndSubPath( FT_Stroker stroker ); - - - /************************************************************** - * - * @function: - * FT_Stroker_LineTo - * - * @description: - * `Draw' a single line segment in the stroker's current sub-path, - * from the last position. - * - * @input: - * stroker :: - * The target stroker handle. - * - * to :: - * A pointer to the destination point. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * You should call this function between @FT_Stroker_BeginSubPath and - * @FT_Stroker_EndSubPath. - */ - FT_EXPORT( FT_Error ) - FT_Stroker_LineTo( FT_Stroker stroker, - FT_Vector* to ); - - - /************************************************************** - * - * @function: - * FT_Stroker_ConicTo - * - * @description: - * `Draw' a single quadratic Bézier in the stroker's current sub-path, - * from the last position. - * - * @input: - * stroker :: - * The target stroker handle. - * - * control :: - * A pointer to a Bézier control point. - * - * to :: - * A pointer to the destination point. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * You should call this function between @FT_Stroker_BeginSubPath and - * @FT_Stroker_EndSubPath. - */ - FT_EXPORT( FT_Error ) - FT_Stroker_ConicTo( FT_Stroker stroker, - FT_Vector* control, - FT_Vector* to ); - - - /************************************************************** - * - * @function: - * FT_Stroker_CubicTo - * - * @description: - * `Draw' a single cubic Bézier in the stroker's current sub-path, - * from the last position. - * - * @input: - * stroker :: - * The target stroker handle. - * - * control1 :: - * A pointer to the first Bézier control point. - * - * control2 :: - * A pointer to second Bézier control point. - * - * to :: - * A pointer to the destination point. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * You should call this function between @FT_Stroker_BeginSubPath and - * @FT_Stroker_EndSubPath. - */ - FT_EXPORT( FT_Error ) - FT_Stroker_CubicTo( FT_Stroker stroker, - FT_Vector* control1, - FT_Vector* control2, - FT_Vector* to ); - - - /************************************************************** - * - * @function: - * FT_Stroker_GetBorderCounts - * - * @description: - * Call this function once you have finished parsing your paths - * with the stroker. It returns the number of points and - * contours necessary to export one of the `border' or `stroke' - * outlines generated by the stroker. - * - * @input: - * stroker :: - * The target stroker handle. - * - * border :: - * The border index. - * - * @output: - * anum_points :: - * The number of points. - * - * anum_contours :: - * The number of contours. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * When an outline, or a sub-path, is `closed', the stroker generates - * two independent `border' outlines, named `left' and `right'. - * - * When the outline, or a sub-path, is `opened', the stroker merges - * the `border' outlines with caps. The `left' border receives all - * points, while the `right' border becomes empty. - * - * Use the function @FT_Stroker_GetCounts instead if you want to - * retrieve the counts associated to both borders. - */ - FT_EXPORT( FT_Error ) - FT_Stroker_GetBorderCounts( FT_Stroker stroker, - FT_StrokerBorder border, - FT_UInt *anum_points, - FT_UInt *anum_contours ); - - - /************************************************************** - * - * @function: - * FT_Stroker_ExportBorder - * - * @description: - * Call this function after @FT_Stroker_GetBorderCounts to - * export the corresponding border to your own @FT_Outline - * structure. - * - * Note that this function appends the border points and - * contours to your outline, but does not try to resize its - * arrays. - * - * @input: - * stroker :: - * The target stroker handle. - * - * border :: - * The border index. - * - * outline :: - * The target outline handle. - * - * @note: - * Always call this function after @FT_Stroker_GetBorderCounts to - * get sure that there is enough room in your @FT_Outline object to - * receive all new data. - * - * When an outline, or a sub-path, is `closed', the stroker generates - * two independent `border' outlines, named `left' and `right'. - * - * When the outline, or a sub-path, is `opened', the stroker merges - * the `border' outlines with caps. The `left' border receives all - * points, while the `right' border becomes empty. - * - * Use the function @FT_Stroker_Export instead if you want to - * retrieve all borders at once. - */ - FT_EXPORT( void ) - FT_Stroker_ExportBorder( FT_Stroker stroker, - FT_StrokerBorder border, - FT_Outline* outline ); - - - /************************************************************** - * - * @function: - * FT_Stroker_GetCounts - * - * @description: - * Call this function once you have finished parsing your paths - * with the stroker. It returns the number of points and - * contours necessary to export all points/borders from the stroked - * outline/path. - * - * @input: - * stroker :: - * The target stroker handle. - * - * @output: - * anum_points :: - * The number of points. - * - * anum_contours :: - * The number of contours. - * - * @return: - * FreeType error code. 0~means success. - */ - FT_EXPORT( FT_Error ) - FT_Stroker_GetCounts( FT_Stroker stroker, - FT_UInt *anum_points, - FT_UInt *anum_contours ); - - - /************************************************************** - * - * @function: - * FT_Stroker_Export - * - * @description: - * Call this function after @FT_Stroker_GetBorderCounts to - * export all borders to your own @FT_Outline structure. - * - * Note that this function appends the border points and - * contours to your outline, but does not try to resize its - * arrays. - * - * @input: - * stroker :: - * The target stroker handle. - * - * outline :: - * The target outline handle. - */ - FT_EXPORT( void ) - FT_Stroker_Export( FT_Stroker stroker, - FT_Outline* outline ); - - - /************************************************************** - * - * @function: - * FT_Stroker_Done - * - * @description: - * Destroy a stroker object. - * - * @input: - * stroker :: - * A stroker handle. Can be NULL. - */ - FT_EXPORT( void ) - FT_Stroker_Done( FT_Stroker stroker ); - - - /************************************************************** - * - * @function: - * FT_Glyph_Stroke - * - * @description: - * Stroke a given outline glyph object with a given stroker. - * - * @inout: - * pglyph :: - * Source glyph handle on input, new glyph handle on output. - * - * @input: - * stroker :: - * A stroker handle. - * - * destroy :: - * A Boolean. If~1, the source glyph object is destroyed - * on success. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * The source glyph is untouched in case of error. - * - * Adding stroke may yield a significantly wider and taller glyph - * depending on how large of a radius was used to stroke the glyph. You - * may need to manually adjust horizontal and vertical advance amounts - * to account for this added size. - */ - FT_EXPORT( FT_Error ) - FT_Glyph_Stroke( FT_Glyph *pglyph, - FT_Stroker stroker, - FT_Bool destroy ); - - - /************************************************************** - * - * @function: - * FT_Glyph_StrokeBorder - * - * @description: - * Stroke a given outline glyph object with a given stroker, but - * only return either its inside or outside border. - * - * @inout: - * pglyph :: - * Source glyph handle on input, new glyph handle on output. - * - * @input: - * stroker :: - * A stroker handle. - * - * inside :: - * A Boolean. If~1, return the inside border, otherwise - * the outside border. - * - * destroy :: - * A Boolean. If~1, the source glyph object is destroyed - * on success. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * The source glyph is untouched in case of error. - * - * Adding stroke may yield a significantly wider and taller glyph - * depending on how large of a radius was used to stroke the glyph. You - * may need to manually adjust horizontal and vertical advance amounts - * to account for this added size. - */ - FT_EXPORT( FT_Error ) - FT_Glyph_StrokeBorder( FT_Glyph *pglyph, - FT_Stroker stroker, - FT_Bool inside, - FT_Bool destroy ); - - /* */ - -FT_END_HEADER - -#endif /* FTSTROKE_H_ */ - - -/* END */ - - -/* Local Variables: */ -/* coding: utf-8 */ -/* End: */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftsynth.h b/builddir/freetype-2.7.0/include/freetype/ftsynth.h deleted file mode 100644 index fdfcb69..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftsynth.h +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftsynth.h */ -/* */ -/* FreeType synthesizing code for emboldening and slanting */ -/* (specification). */ -/* */ -/* Copyright 2000-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /********* *********/ - /********* WARNING, THIS IS ALPHA CODE! THIS API *********/ - /********* IS DUE TO CHANGE UNTIL STRICTLY NOTIFIED BY THE *********/ - /********* FREETYPE DEVELOPMENT TEAM *********/ - /********* *********/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - - /* Main reason for not lifting the functions in this module to a */ - /* `standard' API is that the used parameters for emboldening and */ - /* slanting are not configurable. Consider the functions as a */ - /* code resource that should be copied into the application and */ - /* adapted to the particular needs. */ - - -#ifndef FTSYNTH_H_ -#define FTSYNTH_H_ - - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - /* Embolden a glyph by a `reasonable' value (which is highly a matter of */ - /* taste). This function is actually a convenience function, providing */ - /* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden. */ - /* */ - /* For emboldened outlines the height, width, and advance metrics are */ - /* increased by the strength of the emboldening -- this even affects */ - /* mono-width fonts! */ - /* */ - /* You can also call @FT_Outline_Get_CBox to get precise values. */ - FT_EXPORT( void ) - FT_GlyphSlot_Embolden( FT_GlyphSlot slot ); - - /* Slant an outline glyph to the right by about 12 degrees. */ - FT_EXPORT( void ) - FT_GlyphSlot_Oblique( FT_GlyphSlot slot ); - - /* */ - - -FT_END_HEADER - -#endif /* FTSYNTH_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftsystem.h b/builddir/freetype-2.7.0/include/freetype/ftsystem.h deleted file mode 100644 index a75f958..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftsystem.h +++ /dev/null @@ -1,355 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftsystem.h */ -/* */ -/* FreeType low-level system interface definition (specification). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTSYSTEM_H_ -#define FTSYSTEM_H_ - - -#include <ft2build.h> - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* system_interface */ - /* */ - /* <Title> */ - /* System Interface */ - /* */ - /* <Abstract> */ - /* How FreeType manages memory and i/o. */ - /* */ - /* <Description> */ - /* This section contains various definitions related to memory */ - /* management and i/o access. You need to understand this */ - /* information if you want to use a custom memory manager or you own */ - /* i/o streams. */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* M E M O R Y M A N A G E M E N T */ - /* */ - /*************************************************************************/ - - - /************************************************************************* - * - * @type: - * FT_Memory - * - * @description: - * A handle to a given memory manager object, defined with an - * @FT_MemoryRec structure. - * - */ - typedef struct FT_MemoryRec_* FT_Memory; - - - /************************************************************************* - * - * @functype: - * FT_Alloc_Func - * - * @description: - * A function used to allocate `size' bytes from `memory'. - * - * @input: - * memory :: - * A handle to the source memory manager. - * - * size :: - * The size in bytes to allocate. - * - * @return: - * Address of new memory block. 0~in case of failure. - * - */ - typedef void* - (*FT_Alloc_Func)( FT_Memory memory, - long size ); - - - /************************************************************************* - * - * @functype: - * FT_Free_Func - * - * @description: - * A function used to release a given block of memory. - * - * @input: - * memory :: - * A handle to the source memory manager. - * - * block :: - * The address of the target memory block. - * - */ - typedef void - (*FT_Free_Func)( FT_Memory memory, - void* block ); - - - /************************************************************************* - * - * @functype: - * FT_Realloc_Func - * - * @description: - * A function used to re-allocate a given block of memory. - * - * @input: - * memory :: - * A handle to the source memory manager. - * - * cur_size :: - * The block's current size in bytes. - * - * new_size :: - * The block's requested new size. - * - * block :: - * The block's current address. - * - * @return: - * New block address. 0~in case of memory shortage. - * - * @note: - * In case of error, the old block must still be available. - * - */ - typedef void* - (*FT_Realloc_Func)( FT_Memory memory, - long cur_size, - long new_size, - void* block ); - - - /************************************************************************* - * - * @struct: - * FT_MemoryRec - * - * @description: - * A structure used to describe a given memory manager to FreeType~2. - * - * @fields: - * user :: - * A generic typeless pointer for user data. - * - * alloc :: - * A pointer type to an allocation function. - * - * free :: - * A pointer type to an memory freeing function. - * - * realloc :: - * A pointer type to a reallocation function. - * - */ - struct FT_MemoryRec_ - { - void* user; - FT_Alloc_Func alloc; - FT_Free_Func free; - FT_Realloc_Func realloc; - }; - - - /*************************************************************************/ - /* */ - /* I / O M A N A G E M E N T */ - /* */ - /*************************************************************************/ - - - /************************************************************************* - * - * @type: - * FT_Stream - * - * @description: - * A handle to an input stream. - * - * @also: - * See @FT_StreamRec for the publicly accessible fields of a given - * stream object. - * - */ - typedef struct FT_StreamRec_* FT_Stream; - - - /************************************************************************* - * - * @struct: - * FT_StreamDesc - * - * @description: - * A union type used to store either a long or a pointer. This is used - * to store a file descriptor or a `FILE*' in an input stream. - * - */ - typedef union FT_StreamDesc_ - { - long value; - void* pointer; - - } FT_StreamDesc; - - - /************************************************************************* - * - * @functype: - * FT_Stream_IoFunc - * - * @description: - * A function used to seek and read data from a given input stream. - * - * @input: - * stream :: - * A handle to the source stream. - * - * offset :: - * The offset of read in stream (always from start). - * - * buffer :: - * The address of the read buffer. - * - * count :: - * The number of bytes to read from the stream. - * - * @return: - * The number of bytes effectively read by the stream. - * - * @note: - * This function might be called to perform a seek or skip operation - * with a `count' of~0. A non-zero return value then indicates an - * error. - * - */ - typedef unsigned long - (*FT_Stream_IoFunc)( FT_Stream stream, - unsigned long offset, - unsigned char* buffer, - unsigned long count ); - - - /************************************************************************* - * - * @functype: - * FT_Stream_CloseFunc - * - * @description: - * A function used to close a given input stream. - * - * @input: - * stream :: - * A handle to the target stream. - * - */ - typedef void - (*FT_Stream_CloseFunc)( FT_Stream stream ); - - - /************************************************************************* - * - * @struct: - * FT_StreamRec - * - * @description: - * A structure used to describe an input stream. - * - * @input: - * base :: - * For memory-based streams, this is the address of the first stream - * byte in memory. This field should always be set to NULL for - * disk-based streams. - * - * size :: - * The stream size in bytes. - * - * In case of compressed streams where the size is unknown before - * actually doing the decompression, the value is set to 0x7FFFFFFF. - * (Note that this size value can occur for normal streams also; it is - * thus just a hint.) - * - * pos :: - * The current position within the stream. - * - * descriptor :: - * This field is a union that can hold an integer or a pointer. It is - * used by stream implementations to store file descriptors or `FILE*' - * pointers. - * - * pathname :: - * This field is completely ignored by FreeType. However, it is often - * useful during debugging to use it to store the stream's filename - * (where available). - * - * read :: - * The stream's input function. - * - * close :: - * The stream's close function. - * - * memory :: - * The memory manager to use to preload frames. This is set - * internally by FreeType and shouldn't be touched by stream - * implementations. - * - * cursor :: - * This field is set and used internally by FreeType when parsing - * frames. - * - * limit :: - * This field is set and used internally by FreeType when parsing - * frames. - * - */ - typedef struct FT_StreamRec_ - { - unsigned char* base; - unsigned long size; - unsigned long pos; - - FT_StreamDesc descriptor; - FT_StreamDesc pathname; - FT_Stream_IoFunc read; - FT_Stream_CloseFunc close; - - FT_Memory memory; - unsigned char* cursor; - unsigned char* limit; - - } FT_StreamRec; - - /* */ - - -FT_END_HEADER - -#endif /* FTSYSTEM_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/fttrigon.h b/builddir/freetype-2.7.0/include/freetype/fttrigon.h deleted file mode 100644 index f789b52..0000000 --- a/builddir/freetype-2.7.0/include/freetype/fttrigon.h +++ /dev/null @@ -1,350 +0,0 @@ -/***************************************************************************/ -/* */ -/* fttrigon.h */ -/* */ -/* FreeType trigonometric functions (specification). */ -/* */ -/* Copyright 2001-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTTRIGON_H_ -#define FTTRIGON_H_ - -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* computations */ - /* */ - /*************************************************************************/ - - - /************************************************************************* - * - * @type: - * FT_Angle - * - * @description: - * This type is used to model angle values in FreeType. Note that the - * angle is a 16.16 fixed-point value expressed in degrees. - * - */ - typedef FT_Fixed FT_Angle; - - - /************************************************************************* - * - * @macro: - * FT_ANGLE_PI - * - * @description: - * The angle pi expressed in @FT_Angle units. - * - */ -#define FT_ANGLE_PI ( 180L << 16 ) - - - /************************************************************************* - * - * @macro: - * FT_ANGLE_2PI - * - * @description: - * The angle 2*pi expressed in @FT_Angle units. - * - */ -#define FT_ANGLE_2PI ( FT_ANGLE_PI * 2 ) - - - /************************************************************************* - * - * @macro: - * FT_ANGLE_PI2 - * - * @description: - * The angle pi/2 expressed in @FT_Angle units. - * - */ -#define FT_ANGLE_PI2 ( FT_ANGLE_PI / 2 ) - - - /************************************************************************* - * - * @macro: - * FT_ANGLE_PI4 - * - * @description: - * The angle pi/4 expressed in @FT_Angle units. - * - */ -#define FT_ANGLE_PI4 ( FT_ANGLE_PI / 4 ) - - - /************************************************************************* - * - * @function: - * FT_Sin - * - * @description: - * Return the sinus of a given angle in fixed-point format. - * - * @input: - * angle :: - * The input angle. - * - * @return: - * The sinus value. - * - * @note: - * If you need both the sinus and cosinus for a given angle, use the - * function @FT_Vector_Unit. - * - */ - FT_EXPORT( FT_Fixed ) - FT_Sin( FT_Angle angle ); - - - /************************************************************************* - * - * @function: - * FT_Cos - * - * @description: - * Return the cosinus of a given angle in fixed-point format. - * - * @input: - * angle :: - * The input angle. - * - * @return: - * The cosinus value. - * - * @note: - * If you need both the sinus and cosinus for a given angle, use the - * function @FT_Vector_Unit. - * - */ - FT_EXPORT( FT_Fixed ) - FT_Cos( FT_Angle angle ); - - - /************************************************************************* - * - * @function: - * FT_Tan - * - * @description: - * Return the tangent of a given angle in fixed-point format. - * - * @input: - * angle :: - * The input angle. - * - * @return: - * The tangent value. - * - */ - FT_EXPORT( FT_Fixed ) - FT_Tan( FT_Angle angle ); - - - /************************************************************************* - * - * @function: - * FT_Atan2 - * - * @description: - * Return the arc-tangent corresponding to a given vector (x,y) in - * the 2d plane. - * - * @input: - * x :: - * The horizontal vector coordinate. - * - * y :: - * The vertical vector coordinate. - * - * @return: - * The arc-tangent value (i.e. angle). - * - */ - FT_EXPORT( FT_Angle ) - FT_Atan2( FT_Fixed x, - FT_Fixed y ); - - - /************************************************************************* - * - * @function: - * FT_Angle_Diff - * - * @description: - * Return the difference between two angles. The result is always - * constrained to the ]-PI..PI] interval. - * - * @input: - * angle1 :: - * First angle. - * - * angle2 :: - * Second angle. - * - * @return: - * Constrained value of `value2-value1'. - * - */ - FT_EXPORT( FT_Angle ) - FT_Angle_Diff( FT_Angle angle1, - FT_Angle angle2 ); - - - /************************************************************************* - * - * @function: - * FT_Vector_Unit - * - * @description: - * Return the unit vector corresponding to a given angle. After the - * call, the value of `vec.x' will be `cos(angle)', and the value of - * `vec.y' will be `sin(angle)'. - * - * This function is useful to retrieve both the sinus and cosinus of a - * given angle quickly. - * - * @output: - * vec :: - * The address of target vector. - * - * @input: - * angle :: - * The input angle. - * - */ - FT_EXPORT( void ) - FT_Vector_Unit( FT_Vector* vec, - FT_Angle angle ); - - - /************************************************************************* - * - * @function: - * FT_Vector_Rotate - * - * @description: - * Rotate a vector by a given angle. - * - * @inout: - * vec :: - * The address of target vector. - * - * @input: - * angle :: - * The input angle. - * - */ - FT_EXPORT( void ) - FT_Vector_Rotate( FT_Vector* vec, - FT_Angle angle ); - - - /************************************************************************* - * - * @function: - * FT_Vector_Length - * - * @description: - * Return the length of a given vector. - * - * @input: - * vec :: - * The address of target vector. - * - * @return: - * The vector length, expressed in the same units that the original - * vector coordinates. - * - */ - FT_EXPORT( FT_Fixed ) - FT_Vector_Length( FT_Vector* vec ); - - - /************************************************************************* - * - * @function: - * FT_Vector_Polarize - * - * @description: - * Compute both the length and angle of a given vector. - * - * @input: - * vec :: - * The address of source vector. - * - * @output: - * length :: - * The vector length. - * - * angle :: - * The vector angle. - * - */ - FT_EXPORT( void ) - FT_Vector_Polarize( FT_Vector* vec, - FT_Fixed *length, - FT_Angle *angle ); - - - /************************************************************************* - * - * @function: - * FT_Vector_From_Polar - * - * @description: - * Compute vector coordinates from a length and angle. - * - * @output: - * vec :: - * The address of source vector. - * - * @input: - * length :: - * The vector length. - * - * angle :: - * The vector angle. - * - */ - FT_EXPORT( void ) - FT_Vector_From_Polar( FT_Vector* vec, - FT_Fixed length, - FT_Angle angle ); - - /* */ - - -FT_END_HEADER - -#endif /* FTTRIGON_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftttdrv.h b/builddir/freetype-2.7.0/include/freetype/ftttdrv.h deleted file mode 100644 index 22186ee..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftttdrv.h +++ /dev/null @@ -1,329 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftttdrv.h */ -/* */ -/* FreeType API for controlling the TrueType driver */ -/* (specification only). */ -/* */ -/* Copyright 2013-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTTTDRV_H_ -#define FTTTDRV_H_ - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /************************************************************************** - * - * @section: - * tt_driver - * - * @title: - * The TrueType driver - * - * @abstract: - * Controlling the TrueType driver module. - * - * @description: - * While FreeType's TrueType driver doesn't expose API functions by - * itself, it is possible to control its behaviour with @FT_Property_Set - * and @FT_Property_Get. The following lists the available properties - * together with the necessary macros and structures. - * - * The TrueType driver's module name is `truetype'. - * - * We start with a list of definitions, kindly provided by Greg - * Hitchcock. - * - * _Bi-Level_ _Rendering_ - * - * Monochromatic rendering, exclusively used in the early days of - * TrueType by both Apple and Microsoft. Microsoft's GDI interface - * supported hinting of the right-side bearing point, such that the - * advance width could be non-linear. Most often this was done to - * achieve some level of glyph symmetry. To enable reasonable - * performance (e.g., not having to run hinting on all glyphs just to - * get the widths) there was a bit in the head table indicating if the - * side bearing was hinted, and additional tables, `hdmx' and `LTSH', to - * cache hinting widths across multiple sizes and device aspect ratios. - * - * _Font_ _Smoothing_ - * - * Microsoft's GDI implementation of anti-aliasing. Not traditional - * anti-aliasing as the outlines were hinted before the sampling. The - * widths matched the bi-level rendering. - * - * _ClearType_ _Rendering_ - * - * Technique that uses physical subpixels to improve rendering on LCD - * (and other) displays. Because of the higher resolution, many methods - * of improving symmetry in glyphs through hinting the right-side - * bearing were no longer necessary. This lead to what GDI calls - * `natural widths' ClearType, see - * http://www.beatstamm.com/typography/RTRCh4.htm#Sec21. Since hinting - * has extra resolution, most non-linearity went away, but it is still - * possible for hints to change the advance widths in this mode. - * - * _ClearType_ _Compatible_ _Widths_ - * - * One of the earliest challenges with ClearType was allowing the - * implementation in GDI to be selected without requiring all UI and - * documents to reflow. To address this, a compatible method of - * rendering ClearType was added where the font hints are executed once - * to determine the width in bi-level rendering, and then re-run in - * ClearType, with the difference in widths being absorbed in the font - * hints for ClearType (mostly in the white space of hints); see - * http://www.beatstamm.com/typography/RTRCh4.htm#Sec20. Somewhat by - * definition, compatible width ClearType allows for non-linear widths, - * but only when the bi-level version has non-linear widths. - * - * _ClearType_ _Subpixel_ _Positioning_ - * - * One of the nice benefits of ClearType is the ability to more crisply - * display fractional widths; unfortunately, the GDI model of integer - * bitmaps did not support this. However, the WPF and Direct Write - * frameworks do support fractional widths. DWrite calls this `natural - * mode', not to be confused with GDI's `natural widths'. Subpixel - * positioning, in the current implementation of Direct Write, - * unfortunately does not support hinted advance widths, see - * http://www.beatstamm.com/typography/RTRCh4.htm#Sec22. Note that the - * TrueType interpreter fully allows the advance width to be adjusted in - * this mode, just the DWrite client will ignore those changes. - * - * _ClearType_ _Backwards_ _Compatibility_ - * - * This is a set of exceptions made in the TrueType interpreter to - * minimize hinting techniques that were problematic with the extra - * resolution of ClearType; see - * http://www.beatstamm.com/typography/RTRCh4.htm#Sec1 and - * http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx. - * This technique is not to be confused with ClearType compatible - * widths. ClearType backwards compatibility has no direct impact on - * changing advance widths, but there might be an indirect impact on - * disabling some deltas. This could be worked around in backwards - * compatibility mode. - * - * _Native_ _ClearType_ _Mode_ - * - * (Not to be confused with `natural widths'.) This mode removes all - * the exceptions in the TrueType interpreter when running with - * ClearType. Any issues on widths would still apply, though. - * - */ - - - /************************************************************************** - * - * @property: - * interpreter-version - * - * @description: - - * Currently, three versions are available, two representing the - * bytecode interpreter with subpixel hinting support (old `Infinality' - * code and new stripped-down and higher performance `minimal' code) and - * one without, respectively. The default is subpixel support if - * TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel support - * otherwise (since it isn't available then). - * - * If subpixel hinting is on, many TrueType bytecode instructions behave - * differently compared to B/W or grayscale rendering (except if `native - * ClearType' is selected by the font). Microsoft's main idea is to - * render at a much increased horizontal resolution, then sampling down - * the created output to subpixel precision. However, many older fonts - * are not suited to this and must be specially taken care of by - * applying (hardcoded) tweaks in Microsoft's interpreter. - * - * Details on subpixel hinting and some of the necessary tweaks can be - * found in Greg Hitchcock's whitepaper at - * `http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx'. - * Note that FreeType currently doesn't really `subpixel hint' (6x1, 6x2, - * or 6x5 supersampling) like discussed in the paper. Depending on the - * chosen interpreter, it simply ignores instructions on vertical stems - * to arrive at very similar results. - * - * The following example code demonstrates how to deactivate subpixel - * hinting (omitting the error handling). - * - * { - * FT_Library library; - * FT_Face face; - * FT_UInt interpreter_version = TT_INTERPRETER_VERSION_35; - * - * - * FT_Init_FreeType( &library ); - * - * FT_Property_Set( library, "truetype", - * "interpreter-version", - * &interpreter_version ); - * } - * - * @note: - * This property can be used with @FT_Property_Get also. - * - * This property can be set via the `FREETYPE_PROPERTIES' environment - * variable (using values `35', `38', or `40'). - */ - - - /************************************************************************** - * - * @enum: - * TT_INTERPRETER_VERSION_XXX - * - * @description: - * A list of constants used for the @interpreter-version property to - * select the hinting engine for Truetype fonts. - * - * The numeric value in the constant names represents the version - * number as returned by the `GETINFO' bytecode instruction. - * - * @values: - * TT_INTERPRETER_VERSION_35 :: - * Version~35 corresponds to MS rasterizer v.1.7 as used e.g. in - * Windows~98; only grayscale and B/W rasterizing is supported. - * - * TT_INTERPRETER_VERSION_38 :: - * Version~38 corresponds to MS rasterizer v.1.9; it is roughly - * equivalent to the hinting provided by DirectWrite ClearType (as can - * be found, for example, in the Internet Explorer~9 running on - * Windows~7). It is used in FreeType to select the `Infinality' - * subpixel hinting code. The code may be removed in a future - * version. - * - * TT_INTERPRETER_VERSION_40 :: - * Version~40 corresponds to MS rasterizer v.2.1; it is roughly - * equivalent to the hinting provided by DirectWrite ClearType (as can - * be found, for example, in Microsoft's Edge Browser on Windows~10). - * It is used in FreeType to select the `minimal' subpixel hinting - * code, a stripped-down and higher performance version of the - * `Infinality' code. - * - * @note: - * This property controls the behaviour of the bytecode interpreter - * and thus how outlines get hinted. It does *not* control how glyph - * get rasterized! In particular, it does not control subpixel color - * filtering. - * - * If FreeType has not been compiled with the configuration option - * FT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 or~40 causes - * an `FT_Err_Unimplemented_Feature' error. - * - * Depending on the graphics framework, Microsoft uses different - * bytecode and rendering engines. As a consequence, the version - * numbers returned by a call to the `GETINFO' bytecode instruction are - * more convoluted than desired. - * - * Here are two tables that try to shed some light on the possible - * values for the MS rasterizer engine, together with the additional - * features introduced by it. - * - * { - * GETINFO framework version feature - * ------------------------------------------------------------------- - * 3 GDI (Win 3.1), v1.0 16-bit, first version - * TrueImage - * 33 GDI (Win NT 3.1), v1.5 32-bit - * HP Laserjet - * 34 GDI (Win 95) v1.6 font smoothing, - * new SCANTYPE opcode - * 35 GDI (Win 98/2000) v1.7 (UN)SCALED_COMPONENT_OFFSET - * bits in composite glyphs - * 36 MGDI (Win CE 2) v1.6+ classic ClearType - * 37 GDI (XP and later), v1.8 ClearType - * GDI+ old (before Vista) - * 38 GDI+ old (Vista, Win 7), v1.9 subpixel ClearType, - * WPF Y-direction ClearType, - * additional error checking - * 39 DWrite (before Win 8) v2.0 subpixel ClearType flags - * in GETINFO opcode, - * bug fixes - * 40 GDI+ (after Win 7), v2.1 Y-direction ClearType flag - * DWrite (Win 8) in GETINFO opcode, - * Gray ClearType - * } - * - * The `version' field gives a rough orientation only, since some - * applications provided certain features much earlier (as an example, - * Microsoft Reader used subpixel and Y-direction ClearType already in - * Windows 2000). Similarly, updates to a given framework might include - * improved hinting support. - * - * { - * version sampling rendering comment - * x y x y - * -------------------------------------------------------------- - * v1.0 normal normal B/W B/W bi-level - * v1.6 high high gray gray grayscale - * v1.8 high normal color-filter B/W (GDI) ClearType - * v1.9 high high color-filter gray Color ClearType - * v2.1 high normal gray B/W Gray ClearType - * v2.1 high high gray gray Gray ClearType - * } - * - * Color and Gray ClearType are the two available variants of - * `Y-direction ClearType', meaning grayscale rasterization along the - * Y-direction; the name used in the TrueType specification for this - * feature is `symmetric smoothing'. `Classic ClearType' is the - * original algorithm used before introducing a modified version in - * Win~XP. Another name for v1.6's grayscale rendering is `font - * smoothing', and `Color ClearType' is sometimes also called `DWrite - * ClearType'. To differentiate between today's Color ClearType and the - * earlier ClearType variant with B/W rendering along the vertical axis, - * the latter is sometimes called `GDI ClearType'. - * - * `Normal' and `high' sampling describe the (virtual) resolution to - * access the rasterized outline after the hinting process. `Normal' - * means 1 sample per grid line (i.e., B/W). In the current Microsoft - * implementation, `high' means an extra virtual resolution of 16x16 (or - * 16x1) grid lines per pixel for bytecode instructions like `MIRP'. - * After hinting, these 16 grid lines are mapped to 6x5 (or 6x1) grid - * lines for color filtering if Color ClearType is activated. - * - * Note that `Gray ClearType' is essentially the same as v1.6's - * grayscale rendering. However, the GETINFO instruction handles it - * differently: v1.6 returns bit~12 (hinting for grayscale), while v2.1 - * returns bits~13 (hinting for ClearType), 18 (symmetrical smoothing), - * and~19 (Gray ClearType). Also, this mode respects bits 2 and~3 for - * the version~1 gasp table exclusively (like Color ClearType), while - * v1.6 only respects the values of version~0 (bits 0 and~1). - * - * Keep in mind that the features of the above interpreter versions - * might not map exactly to FreeType features or behavior because it is - * a fundamentally different library with different internals. - * - */ -#define TT_INTERPRETER_VERSION_35 35 -#define TT_INTERPRETER_VERSION_38 38 -#define TT_INTERPRETER_VERSION_40 40 - - /* */ - - -FT_END_HEADER - - -#endif /* FTTTDRV_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/fttypes.h b/builddir/freetype-2.7.0/include/freetype/fttypes.h deleted file mode 100644 index 2673e79..0000000 --- a/builddir/freetype-2.7.0/include/freetype/fttypes.h +++ /dev/null @@ -1,602 +0,0 @@ -/***************************************************************************/ -/* */ -/* fttypes.h */ -/* */ -/* FreeType simple types definitions (specification only). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTTYPES_H_ -#define FTTYPES_H_ - - -#include <ft2build.h> -#include FT_CONFIG_CONFIG_H -#include FT_SYSTEM_H -#include FT_IMAGE_H - -#include <stddef.h> - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* basic_types */ - /* */ - /* <Title> */ - /* Basic Data Types */ - /* */ - /* <Abstract> */ - /* The basic data types defined by the library. */ - /* */ - /* <Description> */ - /* This section contains the basic data types defined by FreeType~2, */ - /* ranging from simple scalar types to bitmap descriptors. More */ - /* font-specific structures are defined in a different section. */ - /* */ - /* <Order> */ - /* FT_Byte */ - /* FT_Bytes */ - /* FT_Char */ - /* FT_Int */ - /* FT_UInt */ - /* FT_Int16 */ - /* FT_UInt16 */ - /* FT_Int32 */ - /* FT_UInt32 */ - /* FT_Int64 */ - /* FT_UInt64 */ - /* FT_Short */ - /* FT_UShort */ - /* FT_Long */ - /* FT_ULong */ - /* FT_Bool */ - /* FT_Offset */ - /* FT_PtrDist */ - /* FT_String */ - /* FT_Tag */ - /* FT_Error */ - /* FT_Fixed */ - /* FT_Pointer */ - /* FT_Pos */ - /* FT_Vector */ - /* FT_BBox */ - /* FT_Matrix */ - /* FT_FWord */ - /* FT_UFWord */ - /* FT_F2Dot14 */ - /* FT_UnitVector */ - /* FT_F26Dot6 */ - /* FT_Data */ - /* */ - /* FT_MAKE_TAG */ - /* */ - /* FT_Generic */ - /* FT_Generic_Finalizer */ - /* */ - /* FT_Bitmap */ - /* FT_Pixel_Mode */ - /* FT_Palette_Mode */ - /* FT_Glyph_Format */ - /* FT_IMAGE_TAG */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Bool */ - /* */ - /* <Description> */ - /* A typedef of unsigned char, used for simple booleans. As usual, */ - /* values 1 and~0 represent true and false, respectively. */ - /* */ - typedef unsigned char FT_Bool; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_FWord */ - /* */ - /* <Description> */ - /* A signed 16-bit integer used to store a distance in original font */ - /* units. */ - /* */ - typedef signed short FT_FWord; /* distance in FUnits */ - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_UFWord */ - /* */ - /* <Description> */ - /* An unsigned 16-bit integer used to store a distance in original */ - /* font units. */ - /* */ - typedef unsigned short FT_UFWord; /* unsigned distance */ - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Char */ - /* */ - /* <Description> */ - /* A simple typedef for the _signed_ char type. */ - /* */ - typedef signed char FT_Char; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Byte */ - /* */ - /* <Description> */ - /* A simple typedef for the _unsigned_ char type. */ - /* */ - typedef unsigned char FT_Byte; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Bytes */ - /* */ - /* <Description> */ - /* A typedef for constant memory areas. */ - /* */ - typedef const FT_Byte* FT_Bytes; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Tag */ - /* */ - /* <Description> */ - /* A typedef for 32-bit tags (as used in the SFNT format). */ - /* */ - typedef FT_UInt32 FT_Tag; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_String */ - /* */ - /* <Description> */ - /* A simple typedef for the char type, usually used for strings. */ - /* */ - typedef char FT_String; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Short */ - /* */ - /* <Description> */ - /* A typedef for signed short. */ - /* */ - typedef signed short FT_Short; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_UShort */ - /* */ - /* <Description> */ - /* A typedef for unsigned short. */ - /* */ - typedef unsigned short FT_UShort; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Int */ - /* */ - /* <Description> */ - /* A typedef for the int type. */ - /* */ - typedef signed int FT_Int; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_UInt */ - /* */ - /* <Description> */ - /* A typedef for the unsigned int type. */ - /* */ - typedef unsigned int FT_UInt; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Long */ - /* */ - /* <Description> */ - /* A typedef for signed long. */ - /* */ - typedef signed long FT_Long; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_ULong */ - /* */ - /* <Description> */ - /* A typedef for unsigned long. */ - /* */ - typedef unsigned long FT_ULong; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_F2Dot14 */ - /* */ - /* <Description> */ - /* A signed 2.14 fixed-point type used for unit vectors. */ - /* */ - typedef signed short FT_F2Dot14; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_F26Dot6 */ - /* */ - /* <Description> */ - /* A signed 26.6 fixed-point type used for vectorial pixel */ - /* coordinates. */ - /* */ - typedef signed long FT_F26Dot6; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Fixed */ - /* */ - /* <Description> */ - /* This type is used to store 16.16 fixed-point values, like scaling */ - /* values or matrix coefficients. */ - /* */ - typedef signed long FT_Fixed; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Error */ - /* */ - /* <Description> */ - /* The FreeType error code type. A value of~0 is always interpreted */ - /* as a successful operation. */ - /* */ - typedef int FT_Error; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Pointer */ - /* */ - /* <Description> */ - /* A simple typedef for a typeless pointer. */ - /* */ - typedef void* FT_Pointer; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_Offset */ - /* */ - /* <Description> */ - /* This is equivalent to the ANSI~C `size_t' type, i.e., the largest */ - /* _unsigned_ integer type used to express a file size or position, */ - /* or a memory block size. */ - /* */ - typedef size_t FT_Offset; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_PtrDist */ - /* */ - /* <Description> */ - /* This is equivalent to the ANSI~C `ptrdiff_t' type, i.e., the */ - /* largest _signed_ integer type used to express the distance */ - /* between two pointers. */ - /* */ - typedef ft_ptrdiff_t FT_PtrDist; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_UnitVector */ - /* */ - /* <Description> */ - /* A simple structure used to store a 2D vector unit vector. Uses */ - /* FT_F2Dot14 types. */ - /* */ - /* <Fields> */ - /* x :: Horizontal coordinate. */ - /* */ - /* y :: Vertical coordinate. */ - /* */ - typedef struct FT_UnitVector_ - { - FT_F2Dot14 x; - FT_F2Dot14 y; - - } FT_UnitVector; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Matrix */ - /* */ - /* <Description> */ - /* A simple structure used to store a 2x2 matrix. Coefficients are */ - /* in 16.16 fixed-point format. The computation performed is: */ - /* */ - /* { */ - /* x' = x*xx + y*xy */ - /* y' = x*yx + y*yy */ - /* } */ - /* */ - /* <Fields> */ - /* xx :: Matrix coefficient. */ - /* */ - /* xy :: Matrix coefficient. */ - /* */ - /* yx :: Matrix coefficient. */ - /* */ - /* yy :: Matrix coefficient. */ - /* */ - typedef struct FT_Matrix_ - { - FT_Fixed xx, xy; - FT_Fixed yx, yy; - - } FT_Matrix; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Data */ - /* */ - /* <Description> */ - /* Read-only binary data represented as a pointer and a length. */ - /* */ - /* <Fields> */ - /* pointer :: The data. */ - /* */ - /* length :: The length of the data in bytes. */ - /* */ - typedef struct FT_Data_ - { - const FT_Byte* pointer; - FT_Int length; - - } FT_Data; - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_Generic_Finalizer */ - /* */ - /* <Description> */ - /* Describe a function used to destroy the `client' data of any */ - /* FreeType object. See the description of the @FT_Generic type for */ - /* details of usage. */ - /* */ - /* <Input> */ - /* The address of the FreeType object that is under finalization. */ - /* Its client data is accessed through its `generic' field. */ - /* */ - typedef void (*FT_Generic_Finalizer)(void* object); - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Generic */ - /* */ - /* <Description> */ - /* Client applications often need to associate their own data to a */ - /* variety of FreeType core objects. For example, a text layout API */ - /* might want to associate a glyph cache to a given size object. */ - /* */ - /* Some FreeType object contains a `generic' field, of type */ - /* FT_Generic, which usage is left to client applications and font */ - /* servers. */ - /* */ - /* It can be used to store a pointer to client-specific data, as well */ - /* as the address of a `finalizer' function, which will be called by */ - /* FreeType when the object is destroyed (for example, the previous */ - /* client example would put the address of the glyph cache destructor */ - /* in the `finalizer' field). */ - /* */ - /* <Fields> */ - /* data :: A typeless pointer to any client-specified data. This */ - /* field is completely ignored by the FreeType library. */ - /* */ - /* finalizer :: A pointer to a `generic finalizer' function, which */ - /* will be called when the object is destroyed. If this */ - /* field is set to NULL, no code will be called. */ - /* */ - typedef struct FT_Generic_ - { - void* data; - FT_Generic_Finalizer finalizer; - - } FT_Generic; - - - /*************************************************************************/ - /* */ - /* <Macro> */ - /* FT_MAKE_TAG */ - /* */ - /* <Description> */ - /* This macro converts four-letter tags that are used to label */ - /* TrueType tables into an unsigned long, to be used within FreeType. */ - /* */ - /* <Note> */ - /* The produced values *must* be 32-bit integers. Don't redefine */ - /* this macro. */ - /* */ -#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \ - (FT_Tag) \ - ( ( (FT_ULong)_x1 << 24 ) | \ - ( (FT_ULong)_x2 << 16 ) | \ - ( (FT_ULong)_x3 << 8 ) | \ - (FT_ULong)_x4 ) - - - /*************************************************************************/ - /*************************************************************************/ - /* */ - /* L I S T M A N A G E M E N T */ - /* */ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* list_processing */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_ListNode */ - /* */ - /* <Description> */ - /* Many elements and objects in FreeType are listed through an */ - /* @FT_List record (see @FT_ListRec). As its name suggests, an */ - /* FT_ListNode is a handle to a single list element. */ - /* */ - typedef struct FT_ListNodeRec_* FT_ListNode; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FT_List */ - /* */ - /* <Description> */ - /* A handle to a list record (see @FT_ListRec). */ - /* */ - typedef struct FT_ListRec_* FT_List; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_ListNodeRec */ - /* */ - /* <Description> */ - /* A structure used to hold a single list element. */ - /* */ - /* <Fields> */ - /* prev :: The previous element in the list. NULL if first. */ - /* */ - /* next :: The next element in the list. NULL if last. */ - /* */ - /* data :: A typeless pointer to the listed object. */ - /* */ - typedef struct FT_ListNodeRec_ - { - FT_ListNode prev; - FT_ListNode next; - void* data; - - } FT_ListNodeRec; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_ListRec */ - /* */ - /* <Description> */ - /* A structure used to hold a simple doubly-linked list. These are */ - /* used in many parts of FreeType. */ - /* */ - /* <Fields> */ - /* head :: The head (first element) of doubly-linked list. */ - /* */ - /* tail :: The tail (last element) of doubly-linked list. */ - /* */ - typedef struct FT_ListRec_ - { - FT_ListNode head; - FT_ListNode tail; - - } FT_ListRec; - - /* */ - - -#define FT_IS_EMPTY( list ) ( (list).head == 0 ) -#define FT_BOOL( x ) ( (FT_Bool)( x ) ) - - /* concatenate C tokens */ -#define FT_ERR_XCAT( x, y ) x ## y -#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y ) - - /* see `ftmoderr.h' for descriptions of the following macros */ - -#define FT_ERR( e ) FT_ERR_CAT( FT_ERR_PREFIX, e ) - -#define FT_ERROR_BASE( x ) ( (x) & 0xFF ) -#define FT_ERROR_MODULE( x ) ( (x) & 0xFF00U ) - -#define FT_ERR_EQ( x, e ) \ - ( FT_ERROR_BASE( x ) == FT_ERROR_BASE( FT_ERR( e ) ) ) -#define FT_ERR_NEQ( x, e ) \ - ( FT_ERROR_BASE( x ) != FT_ERROR_BASE( FT_ERR( e ) ) ) - - -FT_END_HEADER - -#endif /* FTTYPES_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ftwinfnt.h b/builddir/freetype-2.7.0/include/freetype/ftwinfnt.h deleted file mode 100644 index a1a715b..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ftwinfnt.h +++ /dev/null @@ -1,275 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftwinfnt.h */ -/* */ -/* FreeType API for accessing Windows fnt-specific data. */ -/* */ -/* Copyright 2003-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTWINFNT_H_ -#define FTWINFNT_H_ - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* winfnt_fonts */ - /* */ - /* <Title> */ - /* Window FNT Files */ - /* */ - /* <Abstract> */ - /* Windows FNT specific API. */ - /* */ - /* <Description> */ - /* This section contains the declaration of Windows FNT specific */ - /* functions. */ - /* */ - /*************************************************************************/ - - - /************************************************************************* - * - * @enum: - * FT_WinFNT_ID_XXX - * - * @description: - * A list of valid values for the `charset' byte in - * @FT_WinFNT_HeaderRec. Exact mapping tables for the various cpXXXX - * encodings (except for cp1361) can be found at - * ftp://ftp.unicode.org/Public in the MAPPINGS/VENDORS/MICSFT/WINDOWS - * subdirectory. cp1361 is roughly a superset of - * MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT. - * - * @values: - * FT_WinFNT_ID_DEFAULT :: - * This is used for font enumeration and font creation as a - * `don't care' value. Valid font files don't contain this value. - * When querying for information about the character set of the font - * that is currently selected into a specified device context, this - * return value (of the related Windows API) simply denotes failure. - * - * FT_WinFNT_ID_SYMBOL :: - * There is no known mapping table available. - * - * FT_WinFNT_ID_MAC :: - * Mac Roman encoding. - * - * FT_WinFNT_ID_OEM :: - * From Michael Pöttgen <michael@poettgen.de>: - * - * The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM - * is used for the charset of vector fonts, like `modern.fon', - * `roman.fon', and `script.fon' on Windows. - * - * The `CreateFont' documentation says: The FT_WinFNT_ID_OEM value - * specifies a character set that is operating-system dependent. - * - * The `IFIMETRICS' documentation from the `Windows Driver - * Development Kit' says: This font supports an OEM-specific - * character set. The OEM character set is system dependent. - * - * In general OEM, as opposed to ANSI (i.e., cp1252), denotes the - * second default codepage that most international versions of - * Windows have. It is one of the OEM codepages from - * - * https://msdn.microsoft.com/en-us/goglobal/bb964655, - * - * and is used for the `DOS boxes', to support legacy applications. - * A German Windows version for example usually uses ANSI codepage - * 1252 and OEM codepage 850. - * - * FT_WinFNT_ID_CP874 :: - * A superset of Thai TIS 620 and ISO 8859-11. - * - * FT_WinFNT_ID_CP932 :: - * A superset of Japanese Shift-JIS (with minor deviations). - * - * FT_WinFNT_ID_CP936 :: - * A superset of simplified Chinese GB 2312-1980 (with different - * ordering and minor deviations). - * - * FT_WinFNT_ID_CP949 :: - * A superset of Korean Hangul KS~C 5601-1987 (with different - * ordering and minor deviations). - * - * FT_WinFNT_ID_CP950 :: - * A superset of traditional Chinese Big~5 ETen (with different - * ordering and minor deviations). - * - * FT_WinFNT_ID_CP1250 :: - * A superset of East European ISO 8859-2 (with slightly different - * ordering). - * - * FT_WinFNT_ID_CP1251 :: - * A superset of Russian ISO 8859-5 (with different ordering). - * - * FT_WinFNT_ID_CP1252 :: - * ANSI encoding. A superset of ISO 8859-1. - * - * FT_WinFNT_ID_CP1253 :: - * A superset of Greek ISO 8859-7 (with minor modifications). - * - * FT_WinFNT_ID_CP1254 :: - * A superset of Turkish ISO 8859-9. - * - * FT_WinFNT_ID_CP1255 :: - * A superset of Hebrew ISO 8859-8 (with some modifications). - * - * FT_WinFNT_ID_CP1256 :: - * A superset of Arabic ISO 8859-6 (with different ordering). - * - * FT_WinFNT_ID_CP1257 :: - * A superset of Baltic ISO 8859-13 (with some deviations). - * - * FT_WinFNT_ID_CP1258 :: - * For Vietnamese. This encoding doesn't cover all necessary - * characters. - * - * FT_WinFNT_ID_CP1361 :: - * Korean (Johab). - */ - -#define FT_WinFNT_ID_CP1252 0 -#define FT_WinFNT_ID_DEFAULT 1 -#define FT_WinFNT_ID_SYMBOL 2 -#define FT_WinFNT_ID_MAC 77 -#define FT_WinFNT_ID_CP932 128 -#define FT_WinFNT_ID_CP949 129 -#define FT_WinFNT_ID_CP1361 130 -#define FT_WinFNT_ID_CP936 134 -#define FT_WinFNT_ID_CP950 136 -#define FT_WinFNT_ID_CP1253 161 -#define FT_WinFNT_ID_CP1254 162 -#define FT_WinFNT_ID_CP1258 163 -#define FT_WinFNT_ID_CP1255 177 -#define FT_WinFNT_ID_CP1256 178 -#define FT_WinFNT_ID_CP1257 186 -#define FT_WinFNT_ID_CP1251 204 -#define FT_WinFNT_ID_CP874 222 -#define FT_WinFNT_ID_CP1250 238 -#define FT_WinFNT_ID_OEM 255 - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_WinFNT_HeaderRec */ - /* */ - /* <Description> */ - /* Windows FNT Header info. */ - /* */ - typedef struct FT_WinFNT_HeaderRec_ - { - FT_UShort version; - FT_ULong file_size; - FT_Byte copyright[60]; - FT_UShort file_type; - FT_UShort nominal_point_size; - FT_UShort vertical_resolution; - FT_UShort horizontal_resolution; - FT_UShort ascent; - FT_UShort internal_leading; - FT_UShort external_leading; - FT_Byte italic; - FT_Byte underline; - FT_Byte strike_out; - FT_UShort weight; - FT_Byte charset; - FT_UShort pixel_width; - FT_UShort pixel_height; - FT_Byte pitch_and_family; - FT_UShort avg_width; - FT_UShort max_width; - FT_Byte first_char; - FT_Byte last_char; - FT_Byte default_char; - FT_Byte break_char; - FT_UShort bytes_per_row; - FT_ULong device_offset; - FT_ULong face_name_offset; - FT_ULong bits_pointer; - FT_ULong bits_offset; - FT_Byte reserved; - FT_ULong flags; - FT_UShort A_space; - FT_UShort B_space; - FT_UShort C_space; - FT_UShort color_table_offset; - FT_ULong reserved1[4]; - - } FT_WinFNT_HeaderRec; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_WinFNT_Header */ - /* */ - /* <Description> */ - /* A handle to an @FT_WinFNT_HeaderRec structure. */ - /* */ - typedef struct FT_WinFNT_HeaderRec_* FT_WinFNT_Header; - - - /********************************************************************** - * - * @function: - * FT_Get_WinFNT_Header - * - * @description: - * Retrieve a Windows FNT font info header. - * - * @input: - * face :: A handle to the input face. - * - * @output: - * aheader :: The WinFNT header. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * This function only works with Windows FNT faces, returning an error - * otherwise. - */ - FT_EXPORT( FT_Error ) - FT_Get_WinFNT_Header( FT_Face face, - FT_WinFNT_HeaderRec *aheader ); - - /* */ - - -FT_END_HEADER - -#endif /* FTWINFNT_H_ */ - - -/* END */ - - -/* Local Variables: */ -/* coding: utf-8 */ -/* End: */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/autohint.h b/builddir/freetype-2.7.0/include/freetype/internal/autohint.h deleted file mode 100644 index 7ef82b8..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/autohint.h +++ /dev/null @@ -1,244 +0,0 @@ -/***************************************************************************/ -/* */ -/* autohint.h */ -/* */ -/* High-level `autohint' module-specific interface (specification). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /*************************************************************************/ - /* */ - /* The auto-hinter is used to load and automatically hint glyphs if a */ - /* format-specific hinter isn't available. */ - /* */ - /*************************************************************************/ - - -#ifndef AUTOHINT_H_ -#define AUTOHINT_H_ - - - /*************************************************************************/ - /* */ - /* A small technical note regarding automatic hinting in order to */ - /* clarify this module interface. */ - /* */ - /* An automatic hinter might compute two kinds of data for a given face: */ - /* */ - /* - global hints: Usually some metrics that describe global properties */ - /* of the face. It is computed by scanning more or less */ - /* aggressively the glyphs in the face, and thus can be */ - /* very slow to compute (even if the size of global */ - /* hints is really small). */ - /* */ - /* - glyph hints: These describe some important features of the glyph */ - /* outline, as well as how to align them. They are */ - /* generally much faster to compute than global hints. */ - /* */ - /* The current FreeType auto-hinter does a pretty good job while */ - /* performing fast computations for both global and glyph hints. */ - /* However, we might be interested in introducing more complex and */ - /* powerful algorithms in the future, like the one described in the John */ - /* D. Hobby paper, which unfortunately requires a lot more horsepower. */ - /* */ - /* Because a sufficiently sophisticated font management system would */ - /* typically implement an LRU cache of opened face objects to reduce */ - /* memory usage, it is a good idea to be able to avoid recomputing */ - /* global hints every time the same face is re-opened. */ - /* */ - /* We thus provide the ability to cache global hints outside of the face */ - /* object, in order to speed up font re-opening time. Of course, this */ - /* feature is purely optional, so most client programs won't even notice */ - /* it. */ - /* */ - /* I initially thought that it would be a good idea to cache the glyph */ - /* hints too. However, my general idea now is that if you really need */ - /* to cache these too, you are simply in need of a new font format, */ - /* where all this information could be stored within the font file and */ - /* decoded on the fly. */ - /* */ - /*************************************************************************/ - - -#include <ft2build.h> -#include FT_FREETYPE_H - - -FT_BEGIN_HEADER - - - typedef struct FT_AutoHinterRec_ *FT_AutoHinter; - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_AutoHinter_GlobalGetFunc */ - /* */ - /* <Description> */ - /* Retrieve the global hints computed for a given face object. The */ - /* resulting data is dissociated from the face and will survive a */ - /* call to FT_Done_Face(). It must be discarded through the API */ - /* FT_AutoHinter_GlobalDoneFunc(). */ - /* */ - /* <Input> */ - /* hinter :: A handle to the source auto-hinter. */ - /* */ - /* face :: A handle to the source face object. */ - /* */ - /* <Output> */ - /* global_hints :: A typeless pointer to the global hints. */ - /* */ - /* global_len :: The size in bytes of the global hints. */ - /* */ - typedef void - (*FT_AutoHinter_GlobalGetFunc)( FT_AutoHinter hinter, - FT_Face face, - void** global_hints, - long* global_len ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_AutoHinter_GlobalDoneFunc */ - /* */ - /* <Description> */ - /* Discard the global hints retrieved through */ - /* FT_AutoHinter_GlobalGetFunc(). This is the only way these hints */ - /* are freed from memory. */ - /* */ - /* <Input> */ - /* hinter :: A handle to the auto-hinter module. */ - /* */ - /* global :: A pointer to retrieved global hints to discard. */ - /* */ - typedef void - (*FT_AutoHinter_GlobalDoneFunc)( FT_AutoHinter hinter, - void* global ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_AutoHinter_GlobalResetFunc */ - /* */ - /* <Description> */ - /* This function is used to recompute the global metrics in a given */ - /* font. This is useful when global font data changes (e.g. Multiple */ - /* Masters fonts where blend coordinates change). */ - /* */ - /* <Input> */ - /* hinter :: A handle to the source auto-hinter. */ - /* */ - /* face :: A handle to the face. */ - /* */ - typedef void - (*FT_AutoHinter_GlobalResetFunc)( FT_AutoHinter hinter, - FT_Face face ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_AutoHinter_GlyphLoadFunc */ - /* */ - /* <Description> */ - /* This function is used to load, scale, and automatically hint a */ - /* glyph from a given face. */ - /* */ - /* <Input> */ - /* face :: A handle to the face. */ - /* */ - /* glyph_index :: The glyph index. */ - /* */ - /* load_flags :: The load flags. */ - /* */ - /* <Note> */ - /* This function is capable of loading composite glyphs by hinting */ - /* each sub-glyph independently (which improves quality). */ - /* */ - /* It will call the font driver with @FT_Load_Glyph, with */ - /* @FT_LOAD_NO_SCALE set. */ - /* */ - typedef FT_Error - (*FT_AutoHinter_GlyphLoadFunc)( FT_AutoHinter hinter, - FT_GlyphSlot slot, - FT_Size size, - FT_UInt glyph_index, - FT_Int32 load_flags ); - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_AutoHinter_InterfaceRec */ - /* */ - /* <Description> */ - /* The auto-hinter module's interface. */ - /* */ - typedef struct FT_AutoHinter_InterfaceRec_ - { - FT_AutoHinter_GlobalResetFunc reset_face; - FT_AutoHinter_GlobalGetFunc get_global_hints; - FT_AutoHinter_GlobalDoneFunc done_global_hints; - FT_AutoHinter_GlyphLoadFunc load_glyph; - - } FT_AutoHinter_InterfaceRec, *FT_AutoHinter_Interface; - - -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DEFINE_AUTOHINTER_INTERFACE( \ - class_, \ - reset_face_, \ - get_global_hints_, \ - done_global_hints_, \ - load_glyph_ ) \ - FT_CALLBACK_TABLE_DEF \ - const FT_AutoHinter_InterfaceRec class_ = \ - { \ - reset_face_, \ - get_global_hints_, \ - done_global_hints_, \ - load_glyph_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_AUTOHINTER_INTERFACE( \ - class_, \ - reset_face_, \ - get_global_hints_, \ - done_global_hints_, \ - load_glyph_ ) \ - void \ - FT_Init_Class_ ## class_( FT_Library library, \ - FT_AutoHinter_InterfaceRec* clazz ) \ - { \ - FT_UNUSED( library ); \ - \ - clazz->reset_face = reset_face_; \ - clazz->get_global_hints = get_global_hints_; \ - clazz->done_global_hints = done_global_hints_; \ - clazz->load_glyph = load_glyph_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - -FT_END_HEADER - -#endif /* AUTOHINT_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/ftcalc.h b/builddir/freetype-2.7.0/include/freetype/internal/ftcalc.h deleted file mode 100644 index 8a884f6..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/ftcalc.h +++ /dev/null @@ -1,418 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftcalc.h */ -/* */ -/* Arithmetic computations (specification). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTCALC_H_ -#define FTCALC_H_ - - -#include <ft2build.h> -#include FT_FREETYPE_H - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* FT_MulDiv() and FT_MulFix() are declared in freetype.h. */ - /* */ - /*************************************************************************/ - -#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER - /* Provide assembler fragments for performance-critical functions. */ - /* These must be defined `static __inline__' with GCC. */ - -#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */ - -#define FT_MULFIX_ASSEMBLER FT_MulFix_arm - - /* documentation is in freetype.h */ - - static __inline FT_Int32 - FT_MulFix_arm( FT_Int32 a, - FT_Int32 b ) - { - FT_Int32 t, t2; - - - __asm - { - smull t2, t, b, a /* (lo=t2,hi=t) = a*b */ - mov a, t, asr #31 /* a = (hi >> 31) */ - add a, a, #0x8000 /* a += 0x8000 */ - adds t2, t2, a /* t2 += a */ - adc t, t, #0 /* t += carry */ - mov a, t2, lsr #16 /* a = t2 >> 16 */ - orr a, a, t, lsl #16 /* a |= t << 16 */ - } - return a; - } - -#endif /* __CC_ARM || __ARMCC__ */ - - -#ifdef __GNUC__ - -#if defined( __arm__ ) && \ - ( !defined( __thumb__ ) || defined( __thumb2__ ) ) && \ - !( defined( __CC_ARM ) || defined( __ARMCC__ ) ) - -#define FT_MULFIX_ASSEMBLER FT_MulFix_arm - - /* documentation is in freetype.h */ - - static __inline__ FT_Int32 - FT_MulFix_arm( FT_Int32 a, - FT_Int32 b ) - { - FT_Int32 t, t2; - - - __asm__ __volatile__ ( - "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ - "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */ -#if defined( __clang__ ) && defined( __thumb2__ ) - "add.w %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ -#else - "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ -#endif - "adds %1, %1, %0\n\t" /* %1 += %0 */ - "adc %2, %2, #0\n\t" /* %2 += carry */ - "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */ - "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */ - : "=r"(a), "=&r"(t2), "=&r"(t) - : "r"(a), "r"(b) - : "cc" ); - return a; - } - -#endif /* __arm__ && */ - /* ( __thumb2__ || !__thumb__ ) && */ - /* !( __CC_ARM || __ARMCC__ ) */ - - -#if defined( __i386__ ) - -#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 - - /* documentation is in freetype.h */ - - static __inline__ FT_Int32 - FT_MulFix_i386( FT_Int32 a, - FT_Int32 b ) - { - FT_Int32 result; - - - __asm__ __volatile__ ( - "imul %%edx\n" - "movl %%edx, %%ecx\n" - "sarl $31, %%ecx\n" - "addl $0x8000, %%ecx\n" - "addl %%ecx, %%eax\n" - "adcl $0, %%edx\n" - "shrl $16, %%eax\n" - "shll $16, %%edx\n" - "addl %%edx, %%eax\n" - : "=a"(result), "=d"(b) - : "a"(a), "d"(b) - : "%ecx", "cc" ); - return result; - } - -#endif /* i386 */ - -#endif /* __GNUC__ */ - - -#ifdef _MSC_VER /* Visual C++ */ - -#ifdef _M_IX86 - -#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 - - /* documentation is in freetype.h */ - - static __inline FT_Int32 - FT_MulFix_i386( FT_Int32 a, - FT_Int32 b ) - { - FT_Int32 result; - - __asm - { - mov eax, a - mov edx, b - imul edx - mov ecx, edx - sar ecx, 31 - add ecx, 8000h - add eax, ecx - adc edx, 0 - shr eax, 16 - shl edx, 16 - add eax, edx - mov result, eax - } - return result; - } - -#endif /* _M_IX86 */ - -#endif /* _MSC_VER */ - - -#if defined( __GNUC__ ) && defined( __x86_64__ ) - -#define FT_MULFIX_ASSEMBLER FT_MulFix_x86_64 - - static __inline__ FT_Int32 - FT_MulFix_x86_64( FT_Int32 a, - FT_Int32 b ) - { - /* Temporarily disable the warning that C90 doesn't support */ - /* `long long'. */ -#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 6 ) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wlong-long" -#endif - -#if 1 - /* Technically not an assembly fragment, but GCC does a really good */ - /* job at inlining it and generating good machine code for it. */ - long long ret, tmp; - - - ret = (long long)a * b; - tmp = ret >> 63; - ret += 0x8000 + tmp; - - return (FT_Int32)( ret >> 16 ); -#else - - /* For some reason, GCC 4.6 on Ubuntu 12.04 generates invalid machine */ - /* code from the lines below. The main issue is that `wide_a' is not */ - /* properly initialized by sign-extending `a'. Instead, the generated */ - /* machine code assumes that the register that contains `a' on input */ - /* can be used directly as a 64-bit value, which is wrong most of the */ - /* time. */ - long long wide_a = (long long)a; - long long wide_b = (long long)b; - long long result; - - - __asm__ __volatile__ ( - "imul %2, %1\n" - "mov %1, %0\n" - "sar $63, %0\n" - "lea 0x8000(%1, %0), %0\n" - "sar $16, %0\n" - : "=&r"(result), "=&r"(wide_a) - : "r"(wide_b) - : "cc" ); - - return (FT_Int32)result; -#endif - -#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 6 ) -#pragma GCC diagnostic pop -#endif - } - -#endif /* __GNUC__ && __x86_64__ */ - -#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ - - -#ifdef FT_CONFIG_OPTION_INLINE_MULFIX -#ifdef FT_MULFIX_ASSEMBLER -#define FT_MulFix( a, b ) FT_MULFIX_ASSEMBLER( (FT_Int32)(a), (FT_Int32)(b) ) -#endif -#endif - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_MulDiv_No_Round */ - /* */ - /* <Description> */ - /* A very simple function used to perform the computation `(a*b)/c' */ - /* (without rounding) with maximum accuracy (it uses a 64-bit */ - /* intermediate integer whenever necessary). */ - /* */ - /* This function isn't necessarily as fast as some processor specific */ - /* operations, but is at least completely portable. */ - /* */ - /* <Input> */ - /* a :: The first multiplier. */ - /* b :: The second multiplier. */ - /* c :: The divisor. */ - /* */ - /* <Return> */ - /* The result of `(a*b)/c'. This function never traps when trying to */ - /* divide by zero; it simply returns `MaxInt' or `MinInt' depending */ - /* on the signs of `a' and `b'. */ - /* */ - FT_BASE( FT_Long ) - FT_MulDiv_No_Round( FT_Long a, - FT_Long b, - FT_Long c ); - - - /* - * A variant of FT_Matrix_Multiply which scales its result afterwards. - * The idea is that both `a' and `b' are scaled by factors of 10 so that - * the values are as precise as possible to get a correct result during - * the 64bit multiplication. Let `sa' and `sb' be the scaling factors of - * `a' and `b', respectively, then the scaling factor of the result is - * `sa*sb'. - */ - FT_BASE( void ) - FT_Matrix_Multiply_Scaled( const FT_Matrix* a, - FT_Matrix *b, - FT_Long scaling ); - - - /* - * A variant of FT_Vector_Transform. See comments for - * FT_Matrix_Multiply_Scaled. - */ - FT_BASE( void ) - FT_Vector_Transform_Scaled( FT_Vector* vector, - const FT_Matrix* matrix, - FT_Long scaling ); - - - /* - * This function normalizes a vector and returns its original length. - * The normalized vector is a 16.16 fixed-point unit vector with length - * close to 0x10000. The accuracy of the returned length is limited to - * 16 bits also. The function utilizes quick inverse square root - * approximation without divisions and square roots relying on Newton's - * iterations instead. - */ - FT_BASE( FT_UInt32 ) - FT_Vector_NormLen( FT_Vector* vector ); - - - /* - * Return -1, 0, or +1, depending on the orientation of a given corner. - * We use the Cartesian coordinate system, with positive vertical values - * going upwards. The function returns +1 if the corner turns to the - * left, -1 to the right, and 0 for undecidable cases. - */ - FT_BASE( FT_Int ) - ft_corner_orientation( FT_Pos in_x, - FT_Pos in_y, - FT_Pos out_x, - FT_Pos out_y ); - - - /* - * Return TRUE if a corner is flat or nearly flat. This is equivalent to - * saying that the corner point is close to its neighbors, or inside an - * ellipse defined by the neighbor focal points to be more precise. - */ - FT_BASE( FT_Int ) - ft_corner_is_flat( FT_Pos in_x, - FT_Pos in_y, - FT_Pos out_x, - FT_Pos out_y ); - - - /* - * Return the most significant bit index. - */ - -#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER -#if defined( __GNUC__ ) && \ - ( __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 4 ) ) - -#if FT_SIZEOF_INT == 4 - -#define FT_MSB( x ) ( 31 - __builtin_clz( x ) ) - -#elif FT_SIZEOF_LONG == 4 - -#define FT_MSB( x ) ( 31 - __builtin_clzl( x ) ) - -#endif - -#endif /* __GNUC__ */ -#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ - -#ifndef FT_MSB - - FT_BASE( FT_Int ) - FT_MSB( FT_UInt32 z ); - -#endif - - - /* - * Return sqrt(x*x+y*y), which is the same as `FT_Vector_Length' but uses - * two fixed-point arguments instead. - */ - FT_BASE( FT_Fixed ) - FT_Hypot( FT_Fixed x, - FT_Fixed y ); - - -#if 0 - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_SqrtFixed */ - /* */ - /* <Description> */ - /* Computes the square root of a 16.16 fixed-point value. */ - /* */ - /* <Input> */ - /* x :: The value to compute the root for. */ - /* */ - /* <Return> */ - /* The result of `sqrt(x)'. */ - /* */ - /* <Note> */ - /* This function is not very fast. */ - /* */ - FT_BASE( FT_Int32 ) - FT_SqrtFixed( FT_Int32 x ); - -#endif /* 0 */ - - -#define INT_TO_F26DOT6( x ) ( (FT_Long)(x) << 6 ) -#define INT_TO_F2DOT14( x ) ( (FT_Long)(x) << 14 ) -#define INT_TO_FIXED( x ) ( (FT_Long)(x) << 16 ) -#define F2DOT14_TO_FIXED( x ) ( (FT_Long)(x) << 2 ) -#define FLOAT_TO_FIXED( x ) ( (FT_Long)( x * 65536.0 ) ) -#define FIXED_TO_INT( x ) ( FT_RoundFix( x ) >> 16 ) - -#define ROUND_F26DOT6( x ) ( x >= 0 ? ( ( (x) + 32 ) & -64 ) \ - : ( -( ( 32 - (x) ) & -64 ) ) ) - - -FT_END_HEADER - -#endif /* FTCALC_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/ftdebug.h b/builddir/freetype-2.7.0/include/freetype/internal/ftdebug.h deleted file mode 100644 index d110457..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/ftdebug.h +++ /dev/null @@ -1,255 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftdebug.h */ -/* */ -/* Debugging and logging component (specification). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/* */ -/* IMPORTANT: A description of FreeType's debugging support can be */ -/* found in `docs/DEBUG.TXT'. Read it if you need to use or */ -/* understand this code. */ -/* */ -/***************************************************************************/ - - -#ifndef FTDEBUG_H_ -#define FTDEBUG_H_ - - -#include <ft2build.h> -#include FT_CONFIG_CONFIG_H -#include FT_FREETYPE_H - - -FT_BEGIN_HEADER - - - /* force the definition of FT_DEBUG_LEVEL_ERROR if FT_DEBUG_LEVEL_TRACE */ - /* is already defined; this simplifies the following #ifdefs */ - /* */ -#ifdef FT_DEBUG_LEVEL_TRACE -#undef FT_DEBUG_LEVEL_ERROR -#define FT_DEBUG_LEVEL_ERROR -#endif - - - /*************************************************************************/ - /* */ - /* Define the trace enums as well as the trace levels array when they */ - /* are needed. */ - /* */ - /*************************************************************************/ - -#ifdef FT_DEBUG_LEVEL_TRACE - -#define FT_TRACE_DEF( x ) trace_ ## x , - - /* defining the enumeration */ - typedef enum FT_Trace_ - { -#include FT_INTERNAL_TRACE_H - trace_count - - } FT_Trace; - - - /* defining the array of trace levels, provided by `src/base/ftdebug.c' */ - extern int ft_trace_levels[trace_count]; - -#undef FT_TRACE_DEF - -#endif /* FT_DEBUG_LEVEL_TRACE */ - - - /*************************************************************************/ - /* */ - /* Define the FT_TRACE macro */ - /* */ - /* IMPORTANT! */ - /* */ - /* Each component must define the macro FT_COMPONENT to a valid FT_Trace */ - /* value before using any TRACE macro. */ - /* */ - /*************************************************************************/ - -#ifdef FT_DEBUG_LEVEL_TRACE - -#define FT_TRACE( level, varformat ) \ - do \ - { \ - if ( ft_trace_levels[FT_COMPONENT] >= level ) \ - FT_Message varformat; \ - } while ( 0 ) - -#else /* !FT_DEBUG_LEVEL_TRACE */ - -#define FT_TRACE( level, varformat ) do { } while ( 0 ) /* nothing */ - -#endif /* !FT_DEBUG_LEVEL_TRACE */ - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Trace_Get_Count */ - /* */ - /* <Description> */ - /* Return the number of available trace components. */ - /* */ - /* <Return> */ - /* The number of trace components. 0 if FreeType 2 is not built with */ - /* FT_DEBUG_LEVEL_TRACE definition. */ - /* */ - /* <Note> */ - /* This function may be useful if you want to access elements of */ - /* the internal `ft_trace_levels' array by an index. */ - /* */ - FT_BASE( FT_Int ) - FT_Trace_Get_Count( void ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Trace_Get_Name */ - /* */ - /* <Description> */ - /* Return the name of a trace component. */ - /* */ - /* <Input> */ - /* The index of the trace component. */ - /* */ - /* <Return> */ - /* The name of the trace component. This is a statically allocated */ - /* C string, so do not free it after use. NULL if FreeType 2 is not */ - /* built with FT_DEBUG_LEVEL_TRACE definition. */ - /* */ - /* <Note> */ - /* Use @FT_Trace_Get_Count to get the number of available trace */ - /* components. */ - /* */ - /* This function may be useful if you want to control FreeType 2's */ - /* debug level in your application. */ - /* */ - FT_BASE( const char* ) - FT_Trace_Get_Name( FT_Int idx ); - - - /*************************************************************************/ - /* */ - /* You need two opening and closing parentheses! */ - /* */ - /* Example: FT_TRACE0(( "Value is %i", foo )) */ - /* */ - /* Output of the FT_TRACEX macros is sent to stderr. */ - /* */ - /*************************************************************************/ - -#define FT_TRACE0( varformat ) FT_TRACE( 0, varformat ) -#define FT_TRACE1( varformat ) FT_TRACE( 1, varformat ) -#define FT_TRACE2( varformat ) FT_TRACE( 2, varformat ) -#define FT_TRACE3( varformat ) FT_TRACE( 3, varformat ) -#define FT_TRACE4( varformat ) FT_TRACE( 4, varformat ) -#define FT_TRACE5( varformat ) FT_TRACE( 5, varformat ) -#define FT_TRACE6( varformat ) FT_TRACE( 6, varformat ) -#define FT_TRACE7( varformat ) FT_TRACE( 7, varformat ) - - - /*************************************************************************/ - /* */ - /* Define the FT_ERROR macro. */ - /* */ - /* Output of this macro is sent to stderr. */ - /* */ - /*************************************************************************/ - -#ifdef FT_DEBUG_LEVEL_ERROR - -#define FT_ERROR( varformat ) FT_Message varformat - -#else /* !FT_DEBUG_LEVEL_ERROR */ - -#define FT_ERROR( varformat ) do { } while ( 0 ) /* nothing */ - -#endif /* !FT_DEBUG_LEVEL_ERROR */ - - - /*************************************************************************/ - /* */ - /* Define the FT_ASSERT and FT_THROW macros. The call to `FT_Throw' */ - /* makes it possible to easily set a breakpoint at this function. */ - /* */ - /*************************************************************************/ - -#ifdef FT_DEBUG_LEVEL_ERROR - -#define FT_ASSERT( condition ) \ - do \ - { \ - if ( !( condition ) ) \ - FT_Panic( "assertion failed on line %d of file %s\n", \ - __LINE__, __FILE__ ); \ - } while ( 0 ) - -#define FT_THROW( e ) \ - ( FT_Throw( FT_ERR_CAT( FT_ERR_PREFIX, e ), \ - __LINE__, \ - __FILE__ ) | \ - FT_ERR_CAT( FT_ERR_PREFIX, e ) ) - -#else /* !FT_DEBUG_LEVEL_ERROR */ - -#define FT_ASSERT( condition ) do { } while ( 0 ) - -#define FT_THROW( e ) FT_ERR_CAT( FT_ERR_PREFIX, e ) - -#endif /* !FT_DEBUG_LEVEL_ERROR */ - - - /*************************************************************************/ - /* */ - /* Define `FT_Message' and `FT_Panic' when needed. */ - /* */ - /*************************************************************************/ - -#ifdef FT_DEBUG_LEVEL_ERROR - -#include "stdio.h" /* for vfprintf() */ - - /* print a message */ - FT_BASE( void ) - FT_Message( const char* fmt, - ... ); - - /* print a message and exit */ - FT_BASE( void ) - FT_Panic( const char* fmt, - ... ); - - /* report file name and line number of an error */ - FT_BASE( int ) - FT_Throw( FT_Error error, - int line, - const char* file ); - -#endif /* FT_DEBUG_LEVEL_ERROR */ - - - FT_BASE( void ) - ft_debug_init( void ); - -FT_END_HEADER - -#endif /* FTDEBUG_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/ftdriver.h b/builddir/freetype-2.7.0/include/freetype/internal/ftdriver.h deleted file mode 100644 index 902f02f..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/ftdriver.h +++ /dev/null @@ -1,400 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftdriver.h */ -/* */ -/* FreeType font driver interface (specification). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTDRIVER_H_ -#define FTDRIVER_H_ - - -#include <ft2build.h> -#include FT_MODULE_H - - -FT_BEGIN_HEADER - - - typedef FT_Error - (*FT_Face_InitFunc)( FT_Stream stream, - FT_Face face, - FT_Int typeface_index, - FT_Int num_params, - FT_Parameter* parameters ); - - typedef void - (*FT_Face_DoneFunc)( FT_Face face ); - - - typedef FT_Error - (*FT_Size_InitFunc)( FT_Size size ); - - typedef void - (*FT_Size_DoneFunc)( FT_Size size ); - - - typedef FT_Error - (*FT_Slot_InitFunc)( FT_GlyphSlot slot ); - - typedef void - (*FT_Slot_DoneFunc)( FT_GlyphSlot slot ); - - - typedef FT_Error - (*FT_Size_RequestFunc)( FT_Size size, - FT_Size_Request req ); - - typedef FT_Error - (*FT_Size_SelectFunc)( FT_Size size, - FT_ULong size_index ); - - typedef FT_Error - (*FT_Slot_LoadFunc)( FT_GlyphSlot slot, - FT_Size size, - FT_UInt glyph_index, - FT_Int32 load_flags ); - - - typedef FT_Error - (*FT_Face_GetKerningFunc)( FT_Face face, - FT_UInt left_glyph, - FT_UInt right_glyph, - FT_Vector* kerning ); - - - typedef FT_Error - (*FT_Face_AttachFunc)( FT_Face face, - FT_Stream stream ); - - - typedef FT_Error - (*FT_Face_GetAdvancesFunc)( FT_Face face, - FT_UInt first, - FT_UInt count, - FT_Int32 flags, - FT_Fixed* advances ); - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Driver_ClassRec */ - /* */ - /* <Description> */ - /* The font driver class. This structure mostly contains pointers to */ - /* driver methods. */ - /* */ - /* <Fields> */ - /* root :: The parent module. */ - /* */ - /* face_object_size :: The size of a face object in bytes. */ - /* */ - /* size_object_size :: The size of a size object in bytes. */ - /* */ - /* slot_object_size :: The size of a glyph object in bytes. */ - /* */ - /* init_face :: The format-specific face constructor. */ - /* */ - /* done_face :: The format-specific face destructor. */ - /* */ - /* init_size :: The format-specific size constructor. */ - /* */ - /* done_size :: The format-specific size destructor. */ - /* */ - /* init_slot :: The format-specific slot constructor. */ - /* */ - /* done_slot :: The format-specific slot destructor. */ - /* */ - /* */ - /* load_glyph :: A function handle to load a glyph to a slot. */ - /* This field is mandatory! */ - /* */ - /* get_kerning :: A function handle to return the unscaled */ - /* kerning for a given pair of glyphs. Can be */ - /* set to 0 if the format doesn't support */ - /* kerning. */ - /* */ - /* attach_file :: This function handle is used to read */ - /* additional data for a face from another */ - /* file/stream. For example, this can be used to */ - /* add data from AFM or PFM files on a Type 1 */ - /* face, or a CIDMap on a CID-keyed face. */ - /* */ - /* get_advances :: A function handle used to return advance */ - /* widths of `count' glyphs (in font units), */ - /* starting at `first'. The `vertical' flag must */ - /* be set to get vertical advance heights. The */ - /* `advances' buffer is caller-allocated. */ - /* The idea of this function is to be able to */ - /* perform device-independent text layout without */ - /* loading a single glyph image. */ - /* */ - /* request_size :: A handle to a function used to request the new */ - /* character size. Can be set to 0 if the */ - /* scaling done in the base layer suffices. */ - /* */ - /* select_size :: A handle to a function used to select a new */ - /* fixed size. It is used only if */ - /* @FT_FACE_FLAG_FIXED_SIZES is set. Can be set */ - /* to 0 if the scaling done in the base layer */ - /* suffices. */ - /* <Note> */ - /* Most function pointers, with the exception of `load_glyph', can be */ - /* set to 0 to indicate a default behaviour. */ - /* */ - typedef struct FT_Driver_ClassRec_ - { - FT_Module_Class root; - - FT_Long face_object_size; - FT_Long size_object_size; - FT_Long slot_object_size; - - FT_Face_InitFunc init_face; - FT_Face_DoneFunc done_face; - - FT_Size_InitFunc init_size; - FT_Size_DoneFunc done_size; - - FT_Slot_InitFunc init_slot; - FT_Slot_DoneFunc done_slot; - - FT_Slot_LoadFunc load_glyph; - - FT_Face_GetKerningFunc get_kerning; - FT_Face_AttachFunc attach_file; - FT_Face_GetAdvancesFunc get_advances; - - /* since version 2.2 */ - FT_Size_RequestFunc request_size; - FT_Size_SelectFunc select_size; - - } FT_Driver_ClassRec, *FT_Driver_Class; - - - /*************************************************************************/ - /* */ - /* <Macro> */ - /* FT_DECLARE_DRIVER */ - /* */ - /* <Description> */ - /* Used to create a forward declaration of an FT_Driver_ClassRec */ - /* struct instance. */ - /* */ - /* <Macro> */ - /* FT_DEFINE_DRIVER */ - /* */ - /* <Description> */ - /* Used to initialize an instance of FT_Driver_ClassRec struct. */ - /* */ - /* When FT_CONFIG_OPTION_PIC is defined a `create' function has to be */ - /* called with a pointer where the allocated structure is returned. */ - /* And when it is no longer needed a `destroy' function needs to be */ - /* called to release that allocation. */ - /* */ - /* `ftinit.c' (ft_create_default_module_classes) already contains a */ - /* mechanism to call these functions for the default modules */ - /* described in `ftmodule.h'. */ - /* */ - /* Notice that the created `create' and `destroy' functions call */ - /* `pic_init' and `pic_free' to allow you to manually allocate and */ - /* initialize any additional global data, like a module specific */ - /* interface, and put them in the global pic container defined in */ - /* `ftpic.h'. If you don't need them just implement the functions as */ - /* empty to resolve the link error. Also the `pic_init' and */ - /* `pic_free' functions should be declared in `pic.h', to be referred */ - /* by driver definition calling `FT_DEFINE_DRIVER' in following. */ - /* */ - /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ - /* allocated in the global scope (or the scope where the macro is */ - /* used). */ - /* */ -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DECLARE_DRIVER( class_ ) \ - FT_CALLBACK_TABLE \ - const FT_Driver_ClassRec class_; - -#define FT_DEFINE_DRIVER( \ - class_, \ - flags_, \ - size_, \ - name_, \ - version_, \ - requires_, \ - interface_, \ - init_, \ - done_, \ - get_interface_, \ - face_object_size_, \ - size_object_size_, \ - slot_object_size_, \ - init_face_, \ - done_face_, \ - init_size_, \ - done_size_, \ - init_slot_, \ - done_slot_, \ - load_glyph_, \ - get_kerning_, \ - attach_file_, \ - get_advances_, \ - request_size_, \ - select_size_ ) \ - FT_CALLBACK_TABLE_DEF \ - const FT_Driver_ClassRec class_ = \ - { \ - FT_DEFINE_ROOT_MODULE( flags_, \ - size_, \ - name_, \ - version_, \ - requires_, \ - interface_, \ - init_, \ - done_, \ - get_interface_ ) \ - \ - face_object_size_, \ - size_object_size_, \ - slot_object_size_, \ - \ - init_face_, \ - done_face_, \ - \ - init_size_, \ - done_size_, \ - \ - init_slot_, \ - done_slot_, \ - \ - load_glyph_, \ - \ - get_kerning_, \ - attach_file_, \ - get_advances_, \ - \ - request_size_, \ - select_size_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DECLARE_DRIVER( class_ ) FT_DECLARE_MODULE( class_ ) - -#define FT_DEFINE_DRIVER( \ - class_, \ - flags_, \ - size_, \ - name_, \ - version_, \ - requires_, \ - interface_, \ - init_, \ - done_, \ - get_interface_, \ - face_object_size_, \ - size_object_size_, \ - slot_object_size_, \ - init_face_, \ - done_face_, \ - init_size_, \ - done_size_, \ - init_slot_, \ - done_slot_, \ - load_glyph_, \ - get_kerning_, \ - attach_file_, \ - get_advances_, \ - request_size_, \ - select_size_ ) \ - void \ - FT_Destroy_Class_ ## class_( FT_Library library, \ - FT_Module_Class* clazz ) \ - { \ - FT_Memory memory = library->memory; \ - FT_Driver_Class dclazz = (FT_Driver_Class)clazz; \ - \ - \ - class_ ## _pic_free( library ); \ - if ( dclazz ) \ - FT_FREE( dclazz ); \ - } \ - \ - \ - FT_Error \ - FT_Create_Class_ ## class_( FT_Library library, \ - FT_Module_Class** output_class ) \ - { \ - FT_Driver_Class clazz = NULL; \ - FT_Error error; \ - FT_Memory memory = library->memory; \ - \ - \ - if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) ) \ - return error; \ - \ - error = class_ ## _pic_init( library ); \ - if ( error ) \ - { \ - FT_FREE( clazz ); \ - return error; \ - } \ - \ - FT_DEFINE_ROOT_MODULE( flags_, \ - size_, \ - name_, \ - version_, \ - requires_, \ - interface_, \ - init_, \ - done_, \ - get_interface_ ) \ - \ - clazz->face_object_size = face_object_size_; \ - clazz->size_object_size = size_object_size_; \ - clazz->slot_object_size = slot_object_size_; \ - \ - clazz->init_face = init_face_; \ - clazz->done_face = done_face_; \ - \ - clazz->init_size = init_size_; \ - clazz->done_size = done_size_; \ - \ - clazz->init_slot = init_slot_; \ - clazz->done_slot = done_slot_; \ - \ - clazz->load_glyph = load_glyph_; \ - \ - clazz->get_kerning = get_kerning_; \ - clazz->attach_file = attach_file_; \ - clazz->get_advances = get_advances_; \ - \ - clazz->request_size = request_size_; \ - clazz->select_size = select_size_; \ - \ - *output_class = (FT_Module_Class*)clazz; \ - \ - return FT_Err_Ok; \ - } - - -#endif /* FT_CONFIG_OPTION_PIC */ - -FT_END_HEADER - -#endif /* FTDRIVER_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/ftgloadr.h b/builddir/freetype-2.7.0/include/freetype/internal/ftgloadr.h deleted file mode 100644 index bebf5db..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/ftgloadr.h +++ /dev/null @@ -1,154 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftgloadr.h */ -/* */ -/* The FreeType glyph loader (specification). */ -/* */ -/* Copyright 2002-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTGLOADR_H_ -#define FTGLOADR_H_ - - -#include <ft2build.h> -#include FT_FREETYPE_H - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_GlyphLoader */ - /* */ - /* <Description> */ - /* The glyph loader is an internal object used to load several glyphs */ - /* together (for example, in the case of composites). */ - /* */ - typedef struct FT_SubGlyphRec_ - { - FT_Int index; - FT_UShort flags; - FT_Int arg1; - FT_Int arg2; - FT_Matrix transform; - - } FT_SubGlyphRec; - - - typedef struct FT_GlyphLoadRec_ - { - FT_Outline outline; /* outline */ - FT_Vector* extra_points; /* extra points table */ - FT_Vector* extra_points2; /* second extra points table */ - FT_UInt num_subglyphs; /* number of subglyphs */ - FT_SubGlyph subglyphs; /* subglyphs */ - - } FT_GlyphLoadRec, *FT_GlyphLoad; - - - typedef struct FT_GlyphLoaderRec_ - { - FT_Memory memory; - FT_UInt max_points; - FT_UInt max_contours; - FT_UInt max_subglyphs; - FT_Bool use_extra; - - FT_GlyphLoadRec base; - FT_GlyphLoadRec current; - - void* other; /* for possible future extension? */ - - } FT_GlyphLoaderRec, *FT_GlyphLoader; - - - /* create new empty glyph loader */ - FT_BASE( FT_Error ) - FT_GlyphLoader_New( FT_Memory memory, - FT_GlyphLoader *aloader ); - - /* add an extra points table to a glyph loader */ - FT_BASE( FT_Error ) - FT_GlyphLoader_CreateExtra( FT_GlyphLoader loader ); - - /* destroy a glyph loader */ - FT_BASE( void ) - FT_GlyphLoader_Done( FT_GlyphLoader loader ); - - /* reset a glyph loader (frees everything int it) */ - FT_BASE( void ) - FT_GlyphLoader_Reset( FT_GlyphLoader loader ); - - /* rewind a glyph loader */ - FT_BASE( void ) - FT_GlyphLoader_Rewind( FT_GlyphLoader loader ); - - /* check that there is enough space to add `n_points' and `n_contours' */ - /* to the glyph loader */ - FT_BASE( FT_Error ) - FT_GlyphLoader_CheckPoints( FT_GlyphLoader loader, - FT_UInt n_points, - FT_UInt n_contours ); - - -#define FT_GLYPHLOADER_CHECK_P( _loader, _count ) \ - ( (_count) == 0 || \ - ( (FT_UInt)(_loader)->base.outline.n_points + \ - (FT_UInt)(_loader)->current.outline.n_points + \ - (FT_UInt)(_count) ) <= (_loader)->max_points ) - -#define FT_GLYPHLOADER_CHECK_C( _loader, _count ) \ - ( (_count) == 0 || \ - ( (FT_UInt)(_loader)->base.outline.n_contours + \ - (FT_UInt)(_loader)->current.outline.n_contours + \ - (FT_UInt)(_count) ) <= (_loader)->max_contours ) - -#define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points, _contours ) \ - ( ( FT_GLYPHLOADER_CHECK_P( _loader, _points ) && \ - FT_GLYPHLOADER_CHECK_C( _loader, _contours ) ) \ - ? 0 \ - : FT_GlyphLoader_CheckPoints( (_loader), \ - (FT_UInt)(_points), \ - (FT_UInt)(_contours) ) ) - - - /* check that there is enough space to add `n_subs' sub-glyphs to */ - /* a glyph loader */ - FT_BASE( FT_Error ) - FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader loader, - FT_UInt n_subs ); - - /* prepare a glyph loader, i.e. empty the current glyph */ - FT_BASE( void ) - FT_GlyphLoader_Prepare( FT_GlyphLoader loader ); - - /* add the current glyph to the base glyph */ - FT_BASE( void ) - FT_GlyphLoader_Add( FT_GlyphLoader loader ); - - /* copy points from one glyph loader to another */ - FT_BASE( FT_Error ) - FT_GlyphLoader_CopyPoints( FT_GlyphLoader target, - FT_GlyphLoader source ); - - /* */ - - -FT_END_HEADER - -#endif /* FTGLOADR_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/fthash.h b/builddir/freetype-2.7.0/include/freetype/internal/fthash.h deleted file mode 100644 index f22f9d5..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/fthash.h +++ /dev/null @@ -1,136 +0,0 @@ -/***************************************************************************/ -/* */ -/* fthash.h */ -/* */ -/* Hashing functions (specification). */ -/* */ -/***************************************************************************/ - -/* - * Copyright 2000 Computing Research Labs, New Mexico State University - * Copyright 2001-2015 - * Francesco Zappa Nardelli - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY 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. - */ - - /*************************************************************************/ - /* */ - /* This file is based on code from bdf.c,v 1.22 2000/03/16 20:08:50 */ - /* */ - /* taken from Mark Leisher's xmbdfed package */ - /* */ - /*************************************************************************/ - - -#ifndef FTHASH_H_ -#define FTHASH_H_ - - -#include <ft2build.h> -#include FT_FREETYPE_H - - -FT_BEGIN_HEADER - - - typedef union FT_Hashkey_ - { - FT_Int num; - const char* str; - - } FT_Hashkey; - - - typedef struct FT_HashnodeRec_ - { - FT_Hashkey key; - size_t data; - - } FT_HashnodeRec; - - typedef struct FT_HashnodeRec_ *FT_Hashnode; - - - typedef FT_ULong - (*FT_Hash_LookupFunc)( FT_Hashkey* key ); - - typedef FT_Bool - (*FT_Hash_CompareFunc)( FT_Hashkey* a, - FT_Hashkey* b ); - - - typedef struct FT_HashRec_ - { - FT_UInt limit; - FT_UInt size; - FT_UInt used; - - FT_Hash_LookupFunc lookup; - FT_Hash_CompareFunc compare; - - FT_Hashnode* table; - - } FT_HashRec; - - typedef struct FT_HashRec_ *FT_Hash; - - - FT_Error - ft_hash_str_init( FT_Hash hash, - FT_Memory memory ); - - FT_Error - ft_hash_num_init( FT_Hash hash, - FT_Memory memory ); - - void - ft_hash_str_free( FT_Hash hash, - FT_Memory memory ); - -#define ft_hash_num_free ft_hash_str_free - - FT_Error - ft_hash_str_insert( const char* key, - size_t data, - FT_Hash hash, - FT_Memory memory ); - - FT_Error - ft_hash_num_insert( FT_Int num, - size_t data, - FT_Hash hash, - FT_Memory memory ); - - size_t* - ft_hash_str_lookup( const char* key, - FT_Hash hash ); - - size_t* - ft_hash_num_lookup( FT_Int num, - FT_Hash hash ); - - -FT_END_HEADER - - -#endif /* FTHASH_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/ftmemory.h b/builddir/freetype-2.7.0/include/freetype/internal/ftmemory.h deleted file mode 100644 index fc33b2f..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/ftmemory.h +++ /dev/null @@ -1,393 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftmemory.h */ -/* */ -/* The FreeType memory management macros (specification). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTMEMORY_H_ -#define FTMEMORY_H_ - - -#include <ft2build.h> -#include FT_CONFIG_CONFIG_H -#include FT_TYPES_H - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Macro> */ - /* FT_SET_ERROR */ - /* */ - /* <Description> */ - /* This macro is used to set an implicit `error' variable to a given */ - /* expression's value (usually a function call), and convert it to a */ - /* boolean which is set whenever the value is != 0. */ - /* */ -#undef FT_SET_ERROR -#define FT_SET_ERROR( expression ) \ - ( ( error = (expression) ) != 0 ) - - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** ****/ - /**** M E M O R Y ****/ - /**** ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - - /* - * C++ refuses to handle statements like p = (void*)anything, with `p' a - * typed pointer. Since we don't have a `typeof' operator in standard - * C++, we have to use a template to emulate it. - */ - -#ifdef __cplusplus - -extern "C++" -{ - template <typename T> inline T* - cplusplus_typeof( T*, - void *v ) - { - return static_cast <T*> ( v ); - } -} - -#define FT_ASSIGNP( p, val ) (p) = cplusplus_typeof( (p), (val) ) - -#else - -#define FT_ASSIGNP( p, val ) (p) = (val) - -#endif - - - -#ifdef FT_DEBUG_MEMORY - - FT_BASE( const char* ) _ft_debug_file; - FT_BASE( long ) _ft_debug_lineno; - -#define FT_DEBUG_INNER( exp ) ( _ft_debug_file = __FILE__, \ - _ft_debug_lineno = __LINE__, \ - (exp) ) - -#define FT_ASSIGNP_INNER( p, exp ) ( _ft_debug_file = __FILE__, \ - _ft_debug_lineno = __LINE__, \ - FT_ASSIGNP( p, exp ) ) - -#else /* !FT_DEBUG_MEMORY */ - -#define FT_DEBUG_INNER( exp ) (exp) -#define FT_ASSIGNP_INNER( p, exp ) FT_ASSIGNP( p, exp ) - -#endif /* !FT_DEBUG_MEMORY */ - - - /* - * The allocation functions return a pointer, and the error code - * is written to through the `p_error' parameter. - */ - - /* The `q' variants of the functions below (`q' for `quick') don't fill */ - /* the allocated or reallocated memory with zero bytes. */ - - FT_BASE( FT_Pointer ) - ft_mem_alloc( FT_Memory memory, - FT_Long size, - FT_Error *p_error ); - - FT_BASE( FT_Pointer ) - ft_mem_qalloc( FT_Memory memory, - FT_Long size, - FT_Error *p_error ); - - FT_BASE( FT_Pointer ) - ft_mem_realloc( FT_Memory memory, - FT_Long item_size, - FT_Long cur_count, - FT_Long new_count, - void* block, - FT_Error *p_error ); - - FT_BASE( FT_Pointer ) - ft_mem_qrealloc( FT_Memory memory, - FT_Long item_size, - FT_Long cur_count, - FT_Long new_count, - void* block, - FT_Error *p_error ); - - FT_BASE( void ) - ft_mem_free( FT_Memory memory, - const void* P ); - - - /* The `Q' variants of the macros below (`Q' for `quick') don't fill */ - /* the allocated or reallocated memory with zero bytes. */ - -#define FT_MEM_ALLOC( ptr, size ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_alloc( memory, \ - (FT_Long)(size), \ - &error ) ) - -#define FT_MEM_FREE( ptr ) \ - FT_BEGIN_STMNT \ - ft_mem_free( memory, (ptr) ); \ - (ptr) = NULL; \ - FT_END_STMNT - -#define FT_MEM_NEW( ptr ) \ - FT_MEM_ALLOC( ptr, sizeof ( *(ptr) ) ) - -#define FT_MEM_REALLOC( ptr, cursz, newsz ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \ - 1, \ - (FT_Long)(cursz), \ - (FT_Long)(newsz), \ - (ptr), \ - &error ) ) - -#define FT_MEM_QALLOC( ptr, size ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_qalloc( memory, \ - (FT_Long)(size), \ - &error ) ) - -#define FT_MEM_QNEW( ptr ) \ - FT_MEM_QALLOC( ptr, sizeof ( *(ptr) ) ) - -#define FT_MEM_QREALLOC( ptr, cursz, newsz ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \ - 1, \ - (FT_Long)(cursz), \ - (FT_Long)(newsz), \ - (ptr), \ - &error ) ) - -#define FT_MEM_ALLOC_MULT( ptr, count, item_size ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \ - (FT_Long)(item_size), \ - 0, \ - (FT_Long)(count), \ - NULL, \ - &error ) ) - -#define FT_MEM_REALLOC_MULT( ptr, oldcnt, newcnt, itmsz ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \ - (FT_Long)(itmsz), \ - (FT_Long)(oldcnt), \ - (FT_Long)(newcnt), \ - (ptr), \ - &error ) ) - -#define FT_MEM_QALLOC_MULT( ptr, count, item_size ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \ - (FT_Long)(item_size), \ - 0, \ - (FT_Long)(count), \ - NULL, \ - &error ) ) - -#define FT_MEM_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz) \ - FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \ - (FT_Long)(itmsz), \ - (FT_Long)(oldcnt), \ - (FT_Long)(newcnt), \ - (ptr), \ - &error ) ) - - -#define FT_MEM_SET_ERROR( cond ) ( (cond), error != 0 ) - - -#define FT_MEM_SET( dest, byte, count ) \ - ft_memset( dest, byte, (FT_Offset)(count) ) - -#define FT_MEM_COPY( dest, source, count ) \ - ft_memcpy( dest, source, (FT_Offset)(count) ) - -#define FT_MEM_MOVE( dest, source, count ) \ - ft_memmove( dest, source, (FT_Offset)(count) ) - - -#define FT_MEM_ZERO( dest, count ) FT_MEM_SET( dest, 0, count ) - -#define FT_ZERO( p ) FT_MEM_ZERO( p, sizeof ( *(p) ) ) - - -#define FT_ARRAY_ZERO( dest, count ) \ - FT_MEM_ZERO( dest, \ - (FT_Offset)(count) * sizeof ( *(dest) ) ) - -#define FT_ARRAY_COPY( dest, source, count ) \ - FT_MEM_COPY( dest, \ - source, \ - (FT_Offset)(count) * sizeof ( *(dest) ) ) - -#define FT_ARRAY_MOVE( dest, source, count ) \ - FT_MEM_MOVE( dest, \ - source, \ - (FT_Offset)(count) * sizeof ( *(dest) ) ) - - - /* - * Return the maximum number of addressable elements in an array. - * We limit ourselves to INT_MAX, rather than UINT_MAX, to avoid - * any problems. - */ -#define FT_ARRAY_MAX( ptr ) ( FT_INT_MAX / sizeof ( *(ptr) ) ) - -#define FT_ARRAY_CHECK( ptr, count ) ( (count) <= FT_ARRAY_MAX( ptr ) ) - - - /*************************************************************************/ - /* */ - /* The following functions macros expect that their pointer argument is */ - /* _typed_ in order to automatically compute array element sizes. */ - /* */ - -#define FT_MEM_NEW_ARRAY( ptr, count ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \ - sizeof ( *(ptr) ), \ - 0, \ - (FT_Long)(count), \ - NULL, \ - &error ) ) - -#define FT_MEM_RENEW_ARRAY( ptr, cursz, newsz ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \ - sizeof ( *(ptr) ), \ - (FT_Long)(cursz), \ - (FT_Long)(newsz), \ - (ptr), \ - &error ) ) - -#define FT_MEM_QNEW_ARRAY( ptr, count ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \ - sizeof ( *(ptr) ), \ - 0, \ - (FT_Long)(count), \ - NULL, \ - &error ) ) - -#define FT_MEM_QRENEW_ARRAY( ptr, cursz, newsz ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \ - sizeof ( *(ptr) ), \ - (FT_Long)(cursz), \ - (FT_Long)(newsz), \ - (ptr), \ - &error ) ) - -#define FT_ALLOC( ptr, size ) \ - FT_MEM_SET_ERROR( FT_MEM_ALLOC( ptr, size ) ) - -#define FT_REALLOC( ptr, cursz, newsz ) \ - FT_MEM_SET_ERROR( FT_MEM_REALLOC( ptr, cursz, newsz ) ) - -#define FT_ALLOC_MULT( ptr, count, item_size ) \ - FT_MEM_SET_ERROR( FT_MEM_ALLOC_MULT( ptr, count, item_size ) ) - -#define FT_REALLOC_MULT( ptr, oldcnt, newcnt, itmsz ) \ - FT_MEM_SET_ERROR( FT_MEM_REALLOC_MULT( ptr, oldcnt, \ - newcnt, itmsz ) ) - -#define FT_QALLOC( ptr, size ) \ - FT_MEM_SET_ERROR( FT_MEM_QALLOC( ptr, size ) ) - -#define FT_QREALLOC( ptr, cursz, newsz ) \ - FT_MEM_SET_ERROR( FT_MEM_QREALLOC( ptr, cursz, newsz ) ) - -#define FT_QALLOC_MULT( ptr, count, item_size ) \ - FT_MEM_SET_ERROR( FT_MEM_QALLOC_MULT( ptr, count, item_size ) ) - -#define FT_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz ) \ - FT_MEM_SET_ERROR( FT_MEM_QREALLOC_MULT( ptr, oldcnt, \ - newcnt, itmsz ) ) - -#define FT_FREE( ptr ) FT_MEM_FREE( ptr ) - -#define FT_NEW( ptr ) FT_MEM_SET_ERROR( FT_MEM_NEW( ptr ) ) - -#define FT_NEW_ARRAY( ptr, count ) \ - FT_MEM_SET_ERROR( FT_MEM_NEW_ARRAY( ptr, count ) ) - -#define FT_RENEW_ARRAY( ptr, curcnt, newcnt ) \ - FT_MEM_SET_ERROR( FT_MEM_RENEW_ARRAY( ptr, curcnt, newcnt ) ) - -#define FT_QNEW( ptr ) \ - FT_MEM_SET_ERROR( FT_MEM_QNEW( ptr ) ) - -#define FT_QNEW_ARRAY( ptr, count ) \ - FT_MEM_SET_ERROR( FT_MEM_NEW_ARRAY( ptr, count ) ) - -#define FT_QRENEW_ARRAY( ptr, curcnt, newcnt ) \ - FT_MEM_SET_ERROR( FT_MEM_RENEW_ARRAY( ptr, curcnt, newcnt ) ) - - - FT_BASE( FT_Pointer ) - ft_mem_strdup( FT_Memory memory, - const char* str, - FT_Error *p_error ); - - FT_BASE( FT_Pointer ) - ft_mem_dup( FT_Memory memory, - const void* address, - FT_ULong size, - FT_Error *p_error ); - - -#define FT_MEM_STRDUP( dst, str ) \ - (dst) = (char*)ft_mem_strdup( memory, (const char*)(str), &error ) - -#define FT_STRDUP( dst, str ) \ - FT_MEM_SET_ERROR( FT_MEM_STRDUP( dst, str ) ) - -#define FT_MEM_DUP( dst, address, size ) \ - (dst) = ft_mem_dup( memory, (address), (FT_ULong)(size), &error ) - -#define FT_DUP( dst, address, size ) \ - FT_MEM_SET_ERROR( FT_MEM_DUP( dst, address, size ) ) - - - /* Return >= 1 if a truncation occurs. */ - /* Return 0 if the source string fits the buffer. */ - /* This is *not* the same as strlcpy(). */ - FT_BASE( FT_Int ) - ft_mem_strcpyn( char* dst, - const char* src, - FT_ULong size ); - -#define FT_STRCPYN( dst, src, size ) \ - ft_mem_strcpyn( (char*)dst, (const char*)(src), (FT_ULong)(size) ) - - /* */ - - -FT_END_HEADER - -#endif /* FTMEMORY_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/ftobjs.h b/builddir/freetype-2.7.0/include/freetype/internal/ftobjs.h deleted file mode 100644 index 0a9f2d4..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/ftobjs.h +++ /dev/null @@ -1,1568 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftobjs.h */ -/* */ -/* The FreeType private base classes (specification). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /*************************************************************************/ - /* */ - /* This file contains the definition of all internal FreeType classes. */ - /* */ - /*************************************************************************/ - - -#ifndef FTOBJS_H_ -#define FTOBJS_H_ - -#include <ft2build.h> -#include FT_RENDER_H -#include FT_SIZES_H -#include FT_LCD_FILTER_H -#include FT_INTERNAL_MEMORY_H -#include FT_INTERNAL_GLYPH_LOADER_H -#include FT_INTERNAL_DRIVER_H -#include FT_INTERNAL_AUTOHINT_H -#include FT_INTERNAL_SERVICE_H -#include FT_INTERNAL_PIC_H - -#ifdef FT_CONFIG_OPTION_INCREMENTAL -#include FT_INCREMENTAL_H -#endif - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* Some generic definitions. */ - /* */ -#ifndef TRUE -#define TRUE 1 -#endif - -#ifndef FALSE -#define FALSE 0 -#endif - -#ifndef NULL -#define NULL (void*)0 -#endif - - - /*************************************************************************/ - /* */ - /* The min and max functions missing in C. As usual, be careful not to */ - /* write things like FT_MIN( a++, b++ ) to avoid side effects. */ - /* */ -#define FT_MIN( a, b ) ( (a) < (b) ? (a) : (b) ) -#define FT_MAX( a, b ) ( (a) > (b) ? (a) : (b) ) - -#define FT_ABS( a ) ( (a) < 0 ? -(a) : (a) ) - - /* - * Approximate sqrt(x*x+y*y) using the `alpha max plus beta min' - * algorithm. We use alpha = 1, beta = 3/8, giving us results with a - * largest error less than 7% compared to the exact value. - */ -#define FT_HYPOT( x, y ) \ - ( x = FT_ABS( x ), \ - y = FT_ABS( y ), \ - x > y ? x + ( 3 * y >> 3 ) \ - : y + ( 3 * x >> 3 ) ) - - /* we use FT_TYPEOF to suppress signedness compilation warnings */ -#define FT_PAD_FLOOR( x, n ) ( (x) & ~FT_TYPEOF( x )( (n)-1 ) ) -#define FT_PAD_ROUND( x, n ) FT_PAD_FLOOR( (x) + ((n)/2), n ) -#define FT_PAD_CEIL( x, n ) FT_PAD_FLOOR( (x) + ((n)-1), n ) - -#define FT_PIX_FLOOR( x ) ( (x) & ~FT_TYPEOF( x )63 ) -#define FT_PIX_ROUND( x ) FT_PIX_FLOOR( (x) + 32 ) -#define FT_PIX_CEIL( x ) FT_PIX_FLOOR( (x) + 63 ) - - - /* - * character classification functions -- since these are used to parse - * font files, we must not use those in <ctypes.h> which are - * locale-dependent - */ -#define ft_isdigit( x ) ( ( (unsigned)(x) - '0' ) < 10U ) - -#define ft_isxdigit( x ) ( ( (unsigned)(x) - '0' ) < 10U || \ - ( (unsigned)(x) - 'a' ) < 6U || \ - ( (unsigned)(x) - 'A' ) < 6U ) - - /* the next two macros assume ASCII representation */ -#define ft_isupper( x ) ( ( (unsigned)(x) - 'A' ) < 26U ) -#define ft_islower( x ) ( ( (unsigned)(x) - 'a' ) < 26U ) - -#define ft_isalpha( x ) ( ft_isupper( x ) || ft_islower( x ) ) -#define ft_isalnum( x ) ( ft_isdigit( x ) || ft_isalpha( x ) ) - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** ****/ - /**** C H A R M A P S ****/ - /**** ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - /* handle to internal charmap object */ - typedef struct FT_CMapRec_* FT_CMap; - - /* handle to charmap class structure */ - typedef const struct FT_CMap_ClassRec_* FT_CMap_Class; - - /* internal charmap object structure */ - typedef struct FT_CMapRec_ - { - FT_CharMapRec charmap; - FT_CMap_Class clazz; - - } FT_CMapRec; - - /* typecase any pointer to a charmap handle */ -#define FT_CMAP( x ) ((FT_CMap)( x )) - - /* obvious macros */ -#define FT_CMAP_PLATFORM_ID( x ) FT_CMAP( x )->charmap.platform_id -#define FT_CMAP_ENCODING_ID( x ) FT_CMAP( x )->charmap.encoding_id -#define FT_CMAP_ENCODING( x ) FT_CMAP( x )->charmap.encoding -#define FT_CMAP_FACE( x ) FT_CMAP( x )->charmap.face - - - /* class method definitions */ - typedef FT_Error - (*FT_CMap_InitFunc)( FT_CMap cmap, - FT_Pointer init_data ); - - typedef void - (*FT_CMap_DoneFunc)( FT_CMap cmap ); - - typedef FT_UInt - (*FT_CMap_CharIndexFunc)( FT_CMap cmap, - FT_UInt32 char_code ); - - typedef FT_UInt - (*FT_CMap_CharNextFunc)( FT_CMap cmap, - FT_UInt32 *achar_code ); - - typedef FT_UInt - (*FT_CMap_CharVarIndexFunc)( FT_CMap cmap, - FT_CMap unicode_cmap, - FT_UInt32 char_code, - FT_UInt32 variant_selector ); - - typedef FT_Bool - (*FT_CMap_CharVarIsDefaultFunc)( FT_CMap cmap, - FT_UInt32 char_code, - FT_UInt32 variant_selector ); - - typedef FT_UInt32 * - (*FT_CMap_VariantListFunc)( FT_CMap cmap, - FT_Memory mem ); - - typedef FT_UInt32 * - (*FT_CMap_CharVariantListFunc)( FT_CMap cmap, - FT_Memory mem, - FT_UInt32 char_code ); - - typedef FT_UInt32 * - (*FT_CMap_VariantCharListFunc)( FT_CMap cmap, - FT_Memory mem, - FT_UInt32 variant_selector ); - - - typedef struct FT_CMap_ClassRec_ - { - FT_ULong size; - FT_CMap_InitFunc init; - FT_CMap_DoneFunc done; - FT_CMap_CharIndexFunc char_index; - FT_CMap_CharNextFunc char_next; - - /* Subsequent entries are special ones for format 14 -- the variant */ - /* selector subtable which behaves like no other */ - - FT_CMap_CharVarIndexFunc char_var_index; - FT_CMap_CharVarIsDefaultFunc char_var_default; - FT_CMap_VariantListFunc variant_list; - FT_CMap_CharVariantListFunc charvariant_list; - FT_CMap_VariantCharListFunc variantchar_list; - - } FT_CMap_ClassRec; - - -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DECLARE_CMAP_CLASS( class_ ) \ - FT_CALLBACK_TABLE const FT_CMap_ClassRec class_; - -#define FT_DEFINE_CMAP_CLASS( \ - class_, \ - size_, \ - init_, \ - done_, \ - char_index_, \ - char_next_, \ - char_var_index_, \ - char_var_default_, \ - variant_list_, \ - charvariant_list_, \ - variantchar_list_ ) \ - FT_CALLBACK_TABLE_DEF \ - const FT_CMap_ClassRec class_ = \ - { \ - size_, \ - init_, \ - done_, \ - char_index_, \ - char_next_, \ - char_var_index_, \ - char_var_default_, \ - variant_list_, \ - charvariant_list_, \ - variantchar_list_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DECLARE_CMAP_CLASS( class_ ) \ - void \ - FT_Init_Class_ ## class_( FT_Library library, \ - FT_CMap_ClassRec* clazz ); - -#define FT_DEFINE_CMAP_CLASS( \ - class_, \ - size_, \ - init_, \ - done_, \ - char_index_, \ - char_next_, \ - char_var_index_, \ - char_var_default_, \ - variant_list_, \ - charvariant_list_, \ - variantchar_list_ ) \ - void \ - FT_Init_Class_ ## class_( FT_Library library, \ - FT_CMap_ClassRec* clazz ) \ - { \ - FT_UNUSED( library ); \ - \ - clazz->size = size_; \ - clazz->init = init_; \ - clazz->done = done_; \ - clazz->char_index = char_index_; \ - clazz->char_next = char_next_; \ - clazz->char_var_index = char_var_index_; \ - clazz->char_var_default = char_var_default_; \ - clazz->variant_list = variant_list_; \ - clazz->charvariant_list = charvariant_list_; \ - clazz->variantchar_list = variantchar_list_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - - - /* create a new charmap and add it to charmap->face */ - FT_BASE( FT_Error ) - FT_CMap_New( FT_CMap_Class clazz, - FT_Pointer init_data, - FT_CharMap charmap, - FT_CMap *acmap ); - - /* destroy a charmap and remove it from face's list */ - FT_BASE( void ) - FT_CMap_Done( FT_CMap cmap ); - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Face_InternalRec */ - /* */ - /* <Description> */ - /* This structure contains the internal fields of each FT_Face */ - /* object. These fields may change between different releases of */ - /* FreeType. */ - /* */ - /* <Fields> */ - /* max_points :: */ - /* The maximum number of points used to store the vectorial outline */ - /* of any glyph in this face. If this value cannot be known in */ - /* advance, or if the face isn't scalable, this should be set to 0. */ - /* Only relevant for scalable formats. */ - /* */ - /* max_contours :: */ - /* The maximum number of contours used to store the vectorial */ - /* outline of any glyph in this face. If this value cannot be */ - /* known in advance, or if the face isn't scalable, this should be */ - /* set to 0. Only relevant for scalable formats. */ - /* */ - /* transform_matrix :: */ - /* A 2x2 matrix of 16.16 coefficients used to transform glyph */ - /* outlines after they are loaded from the font. Only used by the */ - /* convenience functions. */ - /* */ - /* transform_delta :: */ - /* A translation vector used to transform glyph outlines after they */ - /* are loaded from the font. Only used by the convenience */ - /* functions. */ - /* */ - /* transform_flags :: */ - /* Some flags used to classify the transform. Only used by the */ - /* convenience functions. */ - /* */ - /* services :: */ - /* A cache for frequently used services. It should be only */ - /* accessed with the macro `FT_FACE_LOOKUP_SERVICE'. */ - /* */ - /* incremental_interface :: */ - /* If non-null, the interface through which glyph data and metrics */ - /* are loaded incrementally for faces that do not provide all of */ - /* this data when first opened. This field exists only if */ - /* @FT_CONFIG_OPTION_INCREMENTAL is defined. */ - /* */ - /* refcount :: */ - /* A counter initialized to~1 at the time an @FT_Face structure is */ - /* created. @FT_Reference_Face increments this counter, and */ - /* @FT_Done_Face only destroys a face if the counter is~1, */ - /* otherwise it simply decrements it. */ - /* */ - typedef struct FT_Face_InternalRec_ - { - FT_Matrix transform_matrix; - FT_Vector transform_delta; - FT_Int transform_flags; - - FT_ServiceCacheRec services; - -#ifdef FT_CONFIG_OPTION_INCREMENTAL - FT_Incremental_InterfaceRec* incremental_interface; -#endif - - FT_Int refcount; - - } FT_Face_InternalRec; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Slot_InternalRec */ - /* */ - /* <Description> */ - /* This structure contains the internal fields of each FT_GlyphSlot */ - /* object. These fields may change between different releases of */ - /* FreeType. */ - /* */ - /* <Fields> */ - /* loader :: The glyph loader object used to load outlines */ - /* into the glyph slot. */ - /* */ - /* flags :: Possible values are zero or */ - /* FT_GLYPH_OWN_BITMAP. The latter indicates */ - /* that the FT_GlyphSlot structure owns the */ - /* bitmap buffer. */ - /* */ - /* glyph_transformed :: Boolean. Set to TRUE when the loaded glyph */ - /* must be transformed through a specific */ - /* font transformation. This is _not_ the same */ - /* as the face transform set through */ - /* FT_Set_Transform(). */ - /* */ - /* glyph_matrix :: The 2x2 matrix corresponding to the glyph */ - /* transformation, if necessary. */ - /* */ - /* glyph_delta :: The 2d translation vector corresponding to */ - /* the glyph transformation, if necessary. */ - /* */ - /* glyph_hints :: Format-specific glyph hints management. */ - /* */ - -#define FT_GLYPH_OWN_BITMAP 0x1U - - typedef struct FT_Slot_InternalRec_ - { - FT_GlyphLoader loader; - FT_UInt flags; - FT_Bool glyph_transformed; - FT_Matrix glyph_matrix; - FT_Vector glyph_delta; - void* glyph_hints; - - } FT_GlyphSlot_InternalRec; - - -#if 0 - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_Size_InternalRec */ - /* */ - /* <Description> */ - /* This structure contains the internal fields of each FT_Size */ - /* object. Currently, it's empty. */ - /* */ - /*************************************************************************/ - - typedef struct FT_Size_InternalRec_ - { - /* empty */ - - } FT_Size_InternalRec; - -#endif - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** ****/ - /**** M O D U L E S ****/ - /**** ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_ModuleRec */ - /* */ - /* <Description> */ - /* A module object instance. */ - /* */ - /* <Fields> */ - /* clazz :: A pointer to the module's class. */ - /* */ - /* library :: A handle to the parent library object. */ - /* */ - /* memory :: A handle to the memory manager. */ - /* */ - typedef struct FT_ModuleRec_ - { - FT_Module_Class* clazz; - FT_Library library; - FT_Memory memory; - - } FT_ModuleRec; - - - /* typecast an object to an FT_Module */ -#define FT_MODULE( x ) ((FT_Module)( x )) -#define FT_MODULE_CLASS( x ) FT_MODULE( x )->clazz -#define FT_MODULE_LIBRARY( x ) FT_MODULE( x )->library -#define FT_MODULE_MEMORY( x ) FT_MODULE( x )->memory - - -#define FT_MODULE_IS_DRIVER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ - FT_MODULE_FONT_DRIVER ) - -#define FT_MODULE_IS_RENDERER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ - FT_MODULE_RENDERER ) - -#define FT_MODULE_IS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ - FT_MODULE_HINTER ) - -#define FT_MODULE_IS_STYLER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ - FT_MODULE_STYLER ) - -#define FT_DRIVER_IS_SCALABLE( x ) ( FT_MODULE_CLASS( x )->module_flags & \ - FT_MODULE_DRIVER_SCALABLE ) - -#define FT_DRIVER_USES_OUTLINES( x ) !( FT_MODULE_CLASS( x )->module_flags & \ - FT_MODULE_DRIVER_NO_OUTLINES ) - -#define FT_DRIVER_HAS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \ - FT_MODULE_DRIVER_HAS_HINTER ) - -#define FT_DRIVER_HINTS_LIGHTLY( x ) ( FT_MODULE_CLASS( x )->module_flags & \ - FT_MODULE_DRIVER_HINTS_LIGHTLY ) - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Module_Interface */ - /* */ - /* <Description> */ - /* Finds a module and returns its specific interface as a typeless */ - /* pointer. */ - /* */ - /* <Input> */ - /* library :: A handle to the library object. */ - /* */ - /* module_name :: The module's name (as an ASCII string). */ - /* */ - /* <Return> */ - /* A module-specific interface if available, 0 otherwise. */ - /* */ - /* <Note> */ - /* You should better be familiar with FreeType internals to know */ - /* which module to look for, and what its interface is :-) */ - /* */ - FT_BASE( const void* ) - FT_Get_Module_Interface( FT_Library library, - const char* mod_name ); - - FT_BASE( FT_Pointer ) - ft_module_get_service( FT_Module module, - const char* service_id ); - -#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES - FT_BASE( FT_Error ) - ft_property_string_set( FT_Library library, - const FT_String* module_name, - const FT_String* property_name, - FT_String* value ); -#endif - - /* */ - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** ****/ - /**** F A C E, S I Z E & G L Y P H S L O T O B J E C T S ****/ - /**** ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - /* a few macros used to perform easy typecasts with minimal brain damage */ - -#define FT_FACE( x ) ((FT_Face)(x)) -#define FT_SIZE( x ) ((FT_Size)(x)) -#define FT_SLOT( x ) ((FT_GlyphSlot)(x)) - -#define FT_FACE_DRIVER( x ) FT_FACE( x )->driver -#define FT_FACE_LIBRARY( x ) FT_FACE_DRIVER( x )->root.library -#define FT_FACE_MEMORY( x ) FT_FACE( x )->memory -#define FT_FACE_STREAM( x ) FT_FACE( x )->stream - -#define FT_SIZE_FACE( x ) FT_SIZE( x )->face -#define FT_SLOT_FACE( x ) FT_SLOT( x )->face - -#define FT_FACE_SLOT( x ) FT_FACE( x )->glyph -#define FT_FACE_SIZE( x ) FT_FACE( x )->size - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_New_GlyphSlot */ - /* */ - /* <Description> */ - /* It is sometimes useful to have more than one glyph slot for a */ - /* given face object. This function is used to create additional */ - /* slots. All of them are automatically discarded when the face is */ - /* destroyed. */ - /* */ - /* <Input> */ - /* face :: A handle to a parent face object. */ - /* */ - /* <Output> */ - /* aslot :: A handle to a new glyph slot object. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - FT_BASE( FT_Error ) - FT_New_GlyphSlot( FT_Face face, - FT_GlyphSlot *aslot ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Done_GlyphSlot */ - /* */ - /* <Description> */ - /* Destroys a given glyph slot. Remember however that all slots are */ - /* automatically destroyed with its parent. Using this function is */ - /* not always mandatory. */ - /* */ - /* <Input> */ - /* slot :: A handle to a target glyph slot. */ - /* */ - FT_BASE( void ) - FT_Done_GlyphSlot( FT_GlyphSlot slot ); - - /* */ - -#define FT_REQUEST_WIDTH( req ) \ - ( (req)->horiResolution \ - ? ( (req)->width * (FT_Pos)(req)->horiResolution + 36 ) / 72 \ - : (req)->width ) - -#define FT_REQUEST_HEIGHT( req ) \ - ( (req)->vertResolution \ - ? ( (req)->height * (FT_Pos)(req)->vertResolution + 36 ) / 72 \ - : (req)->height ) - - - /* Set the metrics according to a bitmap strike. */ - FT_BASE( void ) - FT_Select_Metrics( FT_Face face, - FT_ULong strike_index ); - - - /* Set the metrics according to a size request. */ - FT_BASE( void ) - FT_Request_Metrics( FT_Face face, - FT_Size_Request req ); - - - /* Match a size request against `available_sizes'. */ - FT_BASE( FT_Error ) - FT_Match_Size( FT_Face face, - FT_Size_Request req, - FT_Bool ignore_width, - FT_ULong* size_index ); - - - /* Use the horizontal metrics to synthesize the vertical metrics. */ - /* If `advance' is zero, it is also synthesized. */ - FT_BASE( void ) - ft_synthesize_vertical_metrics( FT_Glyph_Metrics* metrics, - FT_Pos advance ); - - - /* Free the bitmap of a given glyphslot when needed (i.e., only when it */ - /* was allocated with ft_glyphslot_alloc_bitmap). */ - FT_BASE( void ) - ft_glyphslot_free_bitmap( FT_GlyphSlot slot ); - - - /* Allocate a new bitmap buffer in a glyph slot. */ - FT_BASE( FT_Error ) - ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot, - FT_ULong size ); - - - /* Set the bitmap buffer in a glyph slot to a given pointer. The buffer */ - /* will not be freed by a later call to ft_glyphslot_free_bitmap. */ - FT_BASE( void ) - ft_glyphslot_set_bitmap( FT_GlyphSlot slot, - FT_Byte* buffer ); - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** ****/ - /**** R E N D E R E R S ****/ - /**** ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - -#define FT_RENDERER( x ) ((FT_Renderer)( x )) -#define FT_GLYPH( x ) ((FT_Glyph)( x )) -#define FT_BITMAP_GLYPH( x ) ((FT_BitmapGlyph)( x )) -#define FT_OUTLINE_GLYPH( x ) ((FT_OutlineGlyph)( x )) - - - typedef struct FT_RendererRec_ - { - FT_ModuleRec root; - FT_Renderer_Class* clazz; - FT_Glyph_Format glyph_format; - FT_Glyph_Class glyph_class; - - FT_Raster raster; - FT_Raster_Render_Func raster_render; - FT_Renderer_RenderFunc render; - - } FT_RendererRec; - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** ****/ - /**** F O N T D R I V E R S ****/ - /**** ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - - /* typecast a module into a driver easily */ -#define FT_DRIVER( x ) ((FT_Driver)(x)) - - /* typecast a module as a driver, and get its driver class */ -#define FT_DRIVER_CLASS( x ) FT_DRIVER( x )->clazz - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_DriverRec */ - /* */ - /* <Description> */ - /* The root font driver class. A font driver is responsible for */ - /* managing and loading font files of a given format. */ - /* */ - /* <Fields> */ - /* root :: Contains the fields of the root module class. */ - /* */ - /* clazz :: A pointer to the font driver's class. Note that */ - /* this is NOT root.clazz. `class' wasn't used */ - /* as it is a reserved word in C++. */ - /* */ - /* faces_list :: The list of faces currently opened by this */ - /* driver. */ - /* */ - /* glyph_loader :: Unused. Used to be glyph loader for all faces */ - /* managed by this driver. */ - /* */ - typedef struct FT_DriverRec_ - { - FT_ModuleRec root; - FT_Driver_Class clazz; - FT_ListRec faces_list; - FT_GlyphLoader glyph_loader; - - } FT_DriverRec; - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** ****/ - /**** L I B R A R I E S ****/ - /**** ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - - /* This hook is used by the TrueType debugger. It must be set to an */ - /* alternate truetype bytecode interpreter function. */ -#define FT_DEBUG_HOOK_TRUETYPE 0 - - - typedef void (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap* bitmap, - FT_Render_Mode render_mode, - FT_Library library ); - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* FT_LibraryRec */ - /* */ - /* <Description> */ - /* The FreeType library class. This is the root of all FreeType */ - /* data. Use FT_New_Library() to create a library object, and */ - /* FT_Done_Library() to discard it and all child objects. */ - /* */ - /* <Fields> */ - /* memory :: The library's memory object. Manages memory */ - /* allocation. */ - /* */ - /* version_major :: The major version number of the library. */ - /* */ - /* version_minor :: The minor version number of the library. */ - /* */ - /* version_patch :: The current patch level of the library. */ - /* */ - /* num_modules :: The number of modules currently registered */ - /* within this library. This is set to 0 for new */ - /* libraries. New modules are added through the */ - /* FT_Add_Module() API function. */ - /* */ - /* modules :: A table used to store handles to the currently */ - /* registered modules. Note that each font driver */ - /* contains a list of its opened faces. */ - /* */ - /* renderers :: The list of renderers currently registered */ - /* within the library. */ - /* */ - /* cur_renderer :: The current outline renderer. This is a */ - /* shortcut used to avoid parsing the list on */ - /* each call to FT_Outline_Render(). It is a */ - /* handle to the current renderer for the */ - /* FT_GLYPH_FORMAT_OUTLINE format. */ - /* */ - /* auto_hinter :: XXX */ - /* */ - /* raster_pool :: The raster object's render pool. This can */ - /* ideally be changed dynamically at run-time. */ - /* */ - /* raster_pool_size :: The size of the render pool in bytes. */ - /* */ - /* debug_hooks :: XXX */ - /* */ - /* lcd_filter :: If subpixel rendering is activated, the */ - /* selected LCD filter mode. */ - /* */ - /* lcd_extra :: If subpixel rendering is activated, the number */ - /* of extra pixels needed for the LCD filter. */ - /* */ - /* lcd_weights :: If subpixel rendering is activated, the LCD */ - /* filter weights, if any. */ - /* */ - /* lcd_filter_func :: If subpixel rendering is activated, the LCD */ - /* filtering callback function. */ - /* */ - /* pic_container :: Contains global structs and tables, instead */ - /* of defining them globally. */ - /* */ - /* refcount :: A counter initialized to~1 at the time an */ - /* @FT_Library structure is created. */ - /* @FT_Reference_Library increments this counter, */ - /* and @FT_Done_Library only destroys a library */ - /* if the counter is~1, otherwise it simply */ - /* decrements it. */ - /* */ - typedef struct FT_LibraryRec_ - { - FT_Memory memory; /* library's memory manager */ - - FT_Int version_major; - FT_Int version_minor; - FT_Int version_patch; - - FT_UInt num_modules; - FT_Module modules[FT_MAX_MODULES]; /* module objects */ - - FT_ListRec renderers; /* list of renderers */ - FT_Renderer cur_renderer; /* current outline renderer */ - FT_Module auto_hinter; - - FT_Byte* raster_pool; /* scan-line conversion */ - /* render pool */ - FT_ULong raster_pool_size; /* size of render pool in bytes */ - - FT_DebugHook_Func debug_hooks[4]; - -#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING - FT_LcdFilter lcd_filter; - FT_Int lcd_extra; /* number of extra pixels */ - FT_Byte lcd_weights[7]; /* filter weights, if any */ - FT_Bitmap_LcdFilterFunc lcd_filter_func; /* filtering callback */ -#endif - -#ifdef FT_CONFIG_OPTION_PIC - FT_PIC_Container pic_container; -#endif - - FT_Int refcount; - - } FT_LibraryRec; - - - FT_BASE( FT_Renderer ) - FT_Lookup_Renderer( FT_Library library, - FT_Glyph_Format format, - FT_ListNode* node ); - - FT_BASE( FT_Error ) - FT_Render_Glyph_Internal( FT_Library library, - FT_GlyphSlot slot, - FT_Render_Mode render_mode ); - - typedef const char* - (*FT_Face_GetPostscriptNameFunc)( FT_Face face ); - - typedef FT_Error - (*FT_Face_GetGlyphNameFunc)( FT_Face face, - FT_UInt glyph_index, - FT_Pointer buffer, - FT_UInt buffer_max ); - - typedef FT_UInt - (*FT_Face_GetGlyphNameIndexFunc)( FT_Face face, - FT_String* glyph_name ); - - -#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_New_Memory */ - /* */ - /* <Description> */ - /* Creates a new memory object. */ - /* */ - /* <Return> */ - /* A pointer to the new memory object. 0 in case of error. */ - /* */ - FT_BASE( FT_Memory ) - FT_New_Memory( void ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Done_Memory */ - /* */ - /* <Description> */ - /* Discards memory manager. */ - /* */ - /* <Input> */ - /* memory :: A handle to the memory manager. */ - /* */ - FT_BASE( void ) - FT_Done_Memory( FT_Memory memory ); - -#endif /* !FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */ - - - /* Define default raster's interface. The default raster is located in */ - /* `src/base/ftraster.c'. */ - /* */ - /* Client applications can register new rasters through the */ - /* FT_Set_Raster() API. */ - -#ifndef FT_NO_DEFAULT_RASTER - FT_EXPORT_VAR( FT_Raster_Funcs ) ft_default_raster; -#endif - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** ****/ - /**** P I C S U P P O R T ****/ - /**** ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - - /* PIC support macros for ftimage.h */ - - - /*************************************************************************/ - /* */ - /* <Macro> */ - /* FT_DEFINE_OUTLINE_FUNCS */ - /* */ - /* <Description> */ - /* Used to initialize an instance of FT_Outline_Funcs struct. */ - /* When FT_CONFIG_OPTION_PIC is defined an init function will need */ - /* to be called with a pre-allocated structure to be filled. */ - /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ - /* allocated in the global scope (or the scope where the macro */ - /* is used). */ - /* */ -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DEFINE_OUTLINE_FUNCS( \ - class_, \ - move_to_, \ - line_to_, \ - conic_to_, \ - cubic_to_, \ - shift_, \ - delta_ ) \ - static const FT_Outline_Funcs class_ = \ - { \ - move_to_, \ - line_to_, \ - conic_to_, \ - cubic_to_, \ - shift_, \ - delta_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_OUTLINE_FUNCS( \ - class_, \ - move_to_, \ - line_to_, \ - conic_to_, \ - cubic_to_, \ - shift_, \ - delta_ ) \ - static FT_Error \ - Init_Class_ ## class_( FT_Outline_Funcs* clazz ) \ - { \ - clazz->move_to = move_to_; \ - clazz->line_to = line_to_; \ - clazz->conic_to = conic_to_; \ - clazz->cubic_to = cubic_to_; \ - clazz->shift = shift_; \ - clazz->delta = delta_; \ - \ - return FT_Err_Ok; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - - - /*************************************************************************/ - /* */ - /* <Macro> */ - /* FT_DEFINE_RASTER_FUNCS */ - /* */ - /* <Description> */ - /* Used to initialize an instance of FT_Raster_Funcs struct. */ - /* When FT_CONFIG_OPTION_PIC is defined an init function will need */ - /* to be called with a pre-allocated structure to be filled. */ - /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ - /* allocated in the global scope (or the scope where the macro */ - /* is used). */ - /* */ -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DEFINE_RASTER_FUNCS( \ - class_, \ - glyph_format_, \ - raster_new_, \ - raster_reset_, \ - raster_set_mode_, \ - raster_render_, \ - raster_done_ ) \ - const FT_Raster_Funcs class_ = \ - { \ - glyph_format_, \ - raster_new_, \ - raster_reset_, \ - raster_set_mode_, \ - raster_render_, \ - raster_done_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_RASTER_FUNCS( \ - class_, \ - glyph_format_, \ - raster_new_, \ - raster_reset_, \ - raster_set_mode_, \ - raster_render_, \ - raster_done_ ) \ - void \ - FT_Init_Class_ ## class_( FT_Raster_Funcs* clazz ) \ - { \ - clazz->glyph_format = glyph_format_; \ - clazz->raster_new = raster_new_; \ - clazz->raster_reset = raster_reset_; \ - clazz->raster_set_mode = raster_set_mode_; \ - clazz->raster_render = raster_render_; \ - clazz->raster_done = raster_done_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - - - /* PIC support macros for ftrender.h */ - - - /*************************************************************************/ - /* */ - /* <Macro> */ - /* FT_DEFINE_GLYPH */ - /* */ - /* <Description> */ - /* Used to initialize an instance of FT_Glyph_Class struct. */ - /* When FT_CONFIG_OPTION_PIC is defined an init function will need */ - /* to be called with a pre-allocated structure to be filled. */ - /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ - /* allocated in the global scope (or the scope where the macro */ - /* is used). */ - /* */ -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DEFINE_GLYPH( \ - class_, \ - size_, \ - format_, \ - init_, \ - done_, \ - copy_, \ - transform_, \ - bbox_, \ - prepare_ ) \ - FT_CALLBACK_TABLE_DEF \ - const FT_Glyph_Class class_ = \ - { \ - size_, \ - format_, \ - init_, \ - done_, \ - copy_, \ - transform_, \ - bbox_, \ - prepare_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_GLYPH( \ - class_, \ - size_, \ - format_, \ - init_, \ - done_, \ - copy_, \ - transform_, \ - bbox_, \ - prepare_ ) \ - void \ - FT_Init_Class_ ## class_( FT_Glyph_Class* clazz ) \ - { \ - clazz->glyph_size = size_; \ - clazz->glyph_format = format_; \ - clazz->glyph_init = init_; \ - clazz->glyph_done = done_; \ - clazz->glyph_copy = copy_; \ - clazz->glyph_transform = transform_; \ - clazz->glyph_bbox = bbox_; \ - clazz->glyph_prepare = prepare_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - - - /*************************************************************************/ - /* */ - /* <Macro> */ - /* FT_DECLARE_RENDERER */ - /* */ - /* <Description> */ - /* Used to create a forward declaration of a */ - /* FT_Renderer_Class struct instance. */ - /* */ - /* <Macro> */ - /* FT_DEFINE_RENDERER */ - /* */ - /* <Description> */ - /* Used to initialize an instance of FT_Renderer_Class struct. */ - /* */ - /* When FT_CONFIG_OPTION_PIC is defined a `create' function will */ - /* need to be called with a pointer where the allocated structure is */ - /* returned. And when it is no longer needed a `destroy' function */ - /* needs to be called to release that allocation. */ - /* `ftinit.c' (ft_create_default_module_classes) already contains */ - /* a mechanism to call these functions for the default modules */ - /* described in `ftmodule.h'. */ - /* */ - /* Notice that the created `create' and `destroy' functions call */ - /* `pic_init' and `pic_free' to allow you to manually allocate and */ - /* initialize any additional global data, like a module specific */ - /* interface, and put them in the global pic container defined in */ - /* `ftpic.h'. If you don't need them just implement the functions as */ - /* empty to resolve the link error. Also the `pic_init' and */ - /* `pic_free' functions should be declared in `pic.h', to be referred */ - /* by the renderer definition calling `FT_DEFINE_RENDERER' in the */ - /* following. */ - /* */ - /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ - /* allocated in the global scope (or the scope where the macro */ - /* is used). */ - /* */ -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DECLARE_RENDERER( class_ ) \ - FT_EXPORT_VAR( const FT_Renderer_Class ) class_; - -#define FT_DEFINE_RENDERER( \ - class_, \ - flags_, \ - size_, \ - name_, \ - version_, \ - requires_, \ - interface_, \ - init_, \ - done_, \ - get_interface_, \ - glyph_format_, \ - render_glyph_, \ - transform_glyph_, \ - get_glyph_cbox_, \ - set_mode_, \ - raster_class_ ) \ - FT_CALLBACK_TABLE_DEF \ - const FT_Renderer_Class class_ = \ - { \ - FT_DEFINE_ROOT_MODULE( flags_, \ - size_, \ - name_, \ - version_, \ - requires_, \ - interface_, \ - init_, \ - done_, \ - get_interface_ ) \ - glyph_format_, \ - \ - render_glyph_, \ - transform_glyph_, \ - get_glyph_cbox_, \ - set_mode_, \ - \ - raster_class_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DECLARE_RENDERER( class_ ) FT_DECLARE_MODULE( class_ ) - -#define FT_DEFINE_RENDERER( \ - class_, \ - flags_, \ - size_, \ - name_, \ - version_, \ - requires_, \ - interface_, \ - init_, \ - done_, \ - get_interface_, \ - glyph_format_, \ - render_glyph_, \ - transform_glyph_, \ - get_glyph_cbox_, \ - set_mode_, \ - raster_class_ ) \ - void \ - FT_Destroy_Class_ ## class_( FT_Library library, \ - FT_Module_Class* clazz ) \ - { \ - FT_Renderer_Class* rclazz = (FT_Renderer_Class*)clazz; \ - FT_Memory memory = library->memory; \ - \ - \ - class_ ## _pic_free( library ); \ - if ( rclazz ) \ - FT_FREE( rclazz ); \ - } \ - \ - \ - FT_Error \ - FT_Create_Class_ ## class_( FT_Library library, \ - FT_Module_Class** output_class ) \ - { \ - FT_Renderer_Class* clazz = NULL; \ - FT_Error error; \ - FT_Memory memory = library->memory; \ - \ - \ - if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) ) \ - return error; \ - \ - error = class_ ## _pic_init( library ); \ - if ( error ) \ - { \ - FT_FREE( clazz ); \ - return error; \ - } \ - \ - FT_DEFINE_ROOT_MODULE( flags_, \ - size_, \ - name_, \ - version_, \ - requires_, \ - interface_, \ - init_, \ - done_, \ - get_interface_ ) \ - \ - clazz->glyph_format = glyph_format_; \ - \ - clazz->render_glyph = render_glyph_; \ - clazz->transform_glyph = transform_glyph_; \ - clazz->get_glyph_cbox = get_glyph_cbox_; \ - clazz->set_mode = set_mode_; \ - \ - clazz->raster_class = raster_class_; \ - \ - *output_class = (FT_Module_Class*)clazz; \ - \ - return FT_Err_Ok; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - - - /* PIC support macros for ftmodapi.h **/ - - -#ifdef FT_CONFIG_OPTION_PIC - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_Module_Creator */ - /* */ - /* <Description> */ - /* A function used to create (allocate) a new module class object. */ - /* The object's members are initialized, but the module itself is */ - /* not. */ - /* */ - /* <Input> */ - /* memory :: A handle to the memory manager. */ - /* output_class :: Initialized with the newly allocated class. */ - /* */ - typedef FT_Error - (*FT_Module_Creator)( FT_Memory memory, - FT_Module_Class** output_class ); - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* FT_Module_Destroyer */ - /* */ - /* <Description> */ - /* A function used to destroy (deallocate) a module class object. */ - /* */ - /* <Input> */ - /* memory :: A handle to the memory manager. */ - /* clazz :: Module class to destroy. */ - /* */ - typedef void - (*FT_Module_Destroyer)( FT_Memory memory, - FT_Module_Class* clazz ); - -#endif - - - /*************************************************************************/ - /* */ - /* <Macro> */ - /* FT_DECLARE_MODULE */ - /* */ - /* <Description> */ - /* Used to create a forward declaration of a */ - /* FT_Module_Class struct instance. */ - /* */ - /* <Macro> */ - /* FT_DEFINE_MODULE */ - /* */ - /* <Description> */ - /* Used to initialize an instance of an FT_Module_Class struct. */ - /* */ - /* When FT_CONFIG_OPTION_PIC is defined a `create' function needs */ - /* to be called with a pointer where the allocated structure is */ - /* returned. And when it is no longer needed a `destroy' function */ - /* needs to be called to release that allocation. */ - /* `ftinit.c' (ft_create_default_module_classes) already contains */ - /* a mechanism to call these functions for the default modules */ - /* described in `ftmodule.h'. */ - /* */ - /* Notice that the created `create' and `destroy' functions call */ - /* `pic_init' and `pic_free' to allow you to manually allocate and */ - /* initialize any additional global data, like a module specific */ - /* interface, and put them in the global pic container defined in */ - /* `ftpic.h'. If you don't need them just implement the functions as */ - /* empty to resolve the link error. Also the `pic_init' and */ - /* `pic_free' functions should be declared in `pic.h', to be referred */ - /* by the module definition calling `FT_DEFINE_MODULE' in the */ - /* following. */ - /* */ - /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ - /* allocated in the global scope (or the scope where the macro */ - /* is used). */ - /* */ - /* <Macro> */ - /* FT_DEFINE_ROOT_MODULE */ - /* */ - /* <Description> */ - /* Used to initialize an instance of an FT_Module_Class struct inside */ - /* another struct that contains it or in a function that initializes */ - /* that containing struct. */ - /* */ -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DECLARE_MODULE( class_ ) \ - FT_CALLBACK_TABLE \ - const FT_Module_Class class_; - -#define FT_DEFINE_ROOT_MODULE( \ - flags_, \ - size_, \ - name_, \ - version_, \ - requires_, \ - interface_, \ - init_, \ - done_, \ - get_interface_ ) \ - { \ - flags_, \ - size_, \ - \ - name_, \ - version_, \ - requires_, \ - \ - interface_, \ - \ - init_, \ - done_, \ - get_interface_, \ - }, - -#define FT_DEFINE_MODULE( \ - class_, \ - flags_, \ - size_, \ - name_, \ - version_, \ - requires_, \ - interface_, \ - init_, \ - done_, \ - get_interface_ ) \ - FT_CALLBACK_TABLE_DEF \ - const FT_Module_Class class_ = \ - { \ - flags_, \ - size_, \ - \ - name_, \ - version_, \ - requires_, \ - \ - interface_, \ - \ - init_, \ - done_, \ - get_interface_, \ - }; - - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DECLARE_MODULE( class_ ) \ - FT_Error \ - FT_Create_Class_ ## class_( FT_Library library, \ - FT_Module_Class** output_class ); \ - void \ - FT_Destroy_Class_ ## class_( FT_Library library, \ - FT_Module_Class* clazz ); - -#define FT_DEFINE_ROOT_MODULE( \ - flags_, \ - size_, \ - name_, \ - version_, \ - requires_, \ - interface_, \ - init_, \ - done_, \ - get_interface_ ) \ - clazz->root.module_flags = flags_; \ - clazz->root.module_size = size_; \ - clazz->root.module_name = name_; \ - clazz->root.module_version = version_; \ - clazz->root.module_requires = requires_; \ - \ - clazz->root.module_interface = interface_; \ - \ - clazz->root.module_init = init_; \ - clazz->root.module_done = done_; \ - clazz->root.get_interface = get_interface_; - -#define FT_DEFINE_MODULE( \ - class_, \ - flags_, \ - size_, \ - name_, \ - version_, \ - requires_, \ - interface_, \ - init_, \ - done_, \ - get_interface_ ) \ - void \ - FT_Destroy_Class_ ## class_( FT_Library library, \ - FT_Module_Class* clazz ) \ - { \ - FT_Memory memory = library->memory; \ - \ - \ - class_ ## _pic_free( library ); \ - if ( clazz ) \ - FT_FREE( clazz ); \ - } \ - \ - \ - FT_Error \ - FT_Create_Class_ ## class_( FT_Library library, \ - FT_Module_Class** output_class ) \ - { \ - FT_Memory memory = library->memory; \ - FT_Module_Class* clazz = NULL; \ - FT_Error error; \ - \ - \ - if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) ) \ - return error; \ - error = class_ ## _pic_init( library ); \ - if ( error ) \ - { \ - FT_FREE( clazz ); \ - return error; \ - } \ - \ - clazz->module_flags = flags_; \ - clazz->module_size = size_; \ - clazz->module_name = name_; \ - clazz->module_version = version_; \ - clazz->module_requires = requires_; \ - \ - clazz->module_interface = interface_; \ - \ - clazz->module_init = init_; \ - clazz->module_done = done_; \ - clazz->get_interface = get_interface_; \ - \ - *output_class = clazz; \ - \ - return FT_Err_Ok; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - - -FT_END_HEADER - -#endif /* FTOBJS_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/ftpic.h b/builddir/freetype-2.7.0/include/freetype/internal/ftpic.h deleted file mode 100644 index 6d800a0..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/ftpic.h +++ /dev/null @@ -1,71 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftpic.h */ -/* */ -/* The FreeType position independent code services (declaration). */ -/* */ -/* Copyright 2009-2016 by */ -/* Oran Agra and Mickey Gabel. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - /*************************************************************************/ - /* */ - /* Modules that ordinarily have const global data that need address */ - /* can instead define pointers here. */ - /* */ - /*************************************************************************/ - - -#ifndef FTPIC_H_ -#define FTPIC_H_ - - -FT_BEGIN_HEADER - -#ifdef FT_CONFIG_OPTION_PIC - - typedef struct FT_PIC_Container_ - { - /* pic containers for base */ - void* base; - - /* pic containers for modules */ - void* autofit; - void* cff; - void* pshinter; - void* psnames; - void* raster; - void* sfnt; - void* smooth; - void* truetype; - - } FT_PIC_Container; - - - /* Initialize the various function tables, structs, etc. */ - /* stored in the container. */ - FT_BASE( FT_Error ) - ft_pic_container_init( FT_Library library ); - - - /* Destroy the contents of the container. */ - FT_BASE( void ) - ft_pic_container_destroy( FT_Library library ); - -#endif /* FT_CONFIG_OPTION_PIC */ - - /* */ - -FT_END_HEADER - -#endif /* FTPIC_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/ftrfork.h b/builddir/freetype-2.7.0/include/freetype/internal/ftrfork.h deleted file mode 100644 index b923401..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/ftrfork.h +++ /dev/null @@ -1,266 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftrfork.h */ -/* */ -/* Embedded resource forks accessor (specification). */ -/* */ -/* Copyright 2004-2016 by */ -/* Masatake YAMATO and Redhat K.K. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - -/***************************************************************************/ -/* Development of the code in this file is support of */ -/* Information-technology Promotion Agency, Japan. */ -/***************************************************************************/ - - -#ifndef FTRFORK_H_ -#define FTRFORK_H_ - - -#include <ft2build.h> -#include FT_INTERNAL_OBJECTS_H - - -FT_BEGIN_HEADER - - - /* Number of guessing rules supported in `FT_Raccess_Guess'. */ - /* Don't forget to increment the number if you add a new guessing rule. */ -#define FT_RACCESS_N_RULES 9 - - - /* A structure to describe a reference in a resource by its resource ID */ - /* and internal offset. The `POST' resource expects to be concatenated */ - /* by the order of resource IDs instead of its appearance in the file. */ - - typedef struct FT_RFork_Ref_ - { - FT_UShort res_id; - FT_Long offset; - - } FT_RFork_Ref; - -#ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK - typedef FT_Error - (*ft_raccess_guess_func)( FT_Library library, - FT_Stream stream, - char *base_file_name, - char **result_file_name, - FT_Long *result_offset ); - - typedef enum FT_RFork_Rule_ { - FT_RFork_Rule_invalid = -2, - FT_RFork_Rule_uknown, /* -1 */ - FT_RFork_Rule_apple_double, - FT_RFork_Rule_apple_single, - FT_RFork_Rule_darwin_ufs_export, - FT_RFork_Rule_darwin_newvfs, - FT_RFork_Rule_darwin_hfsplus, - FT_RFork_Rule_vfat, - FT_RFork_Rule_linux_cap, - FT_RFork_Rule_linux_double, - FT_RFork_Rule_linux_netatalk - } FT_RFork_Rule; - - /* For fast translation between rule index and rule type, - * the macros FT_RFORK_xxx should be kept consistent with - * the raccess_guess_funcs table - */ - typedef struct ft_raccess_guess_rec_ { - ft_raccess_guess_func func; - FT_RFork_Rule type; - } ft_raccess_guess_rec; - -#ifndef FT_CONFIG_OPTION_PIC - - /* this array is a storage in non-PIC mode, so ; is needed in END */ -#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \ - static const type name[] = { -#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \ - { raccess_guess_ ## func_suffix, \ - FT_RFork_Rule_ ## type_suffix }, -#define CONST_FT_RFORK_RULE_ARRAY_END }; - -#else /* FT_CONFIG_OPTION_PIC */ - - /* this array is a function in PIC mode, so no ; is needed in END */ -#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \ - void \ - FT_Init_Table_ ## name( type* storage ) \ - { \ - type* local = storage; \ - \ - \ - int i = 0; -#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \ - local[i].func = raccess_guess_ ## func_suffix; \ - local[i].type = FT_RFork_Rule_ ## type_suffix; \ - i++; -#define CONST_FT_RFORK_RULE_ARRAY_END } - -#endif /* FT_CONFIG_OPTION_PIC */ - -#endif /* FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK */ - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Raccess_Guess */ - /* */ - /* <Description> */ - /* Guess a file name and offset where the actual resource fork is */ - /* stored. The macro FT_RACCESS_N_RULES holds the number of */ - /* guessing rules; the guessed result for the Nth rule is */ - /* represented as a triplet: a new file name (new_names[N]), a file */ - /* offset (offsets[N]), and an error code (errors[N]). */ - /* */ - /* <Input> */ - /* library :: */ - /* A FreeType library instance. */ - /* */ - /* stream :: */ - /* A file stream containing the resource fork. */ - /* */ - /* base_name :: */ - /* The (base) file name of the resource fork used for some */ - /* guessing rules. */ - /* */ - /* <Output> */ - /* new_names :: */ - /* An array of guessed file names in which the resource forks may */ - /* exist. If `new_names[N]' is NULL, the guessed file name is */ - /* equal to `base_name'. */ - /* */ - /* offsets :: */ - /* An array of guessed file offsets. `offsets[N]' holds the file */ - /* offset of the possible start of the resource fork in file */ - /* `new_names[N]'. */ - /* */ - /* errors :: */ - /* An array of FreeType error codes. `errors[N]' is the error */ - /* code of Nth guessing rule function. If `errors[N]' is not */ - /* FT_Err_Ok, `new_names[N]' and `offsets[N]' are meaningless. */ - /* */ - FT_BASE( void ) - FT_Raccess_Guess( FT_Library library, - FT_Stream stream, - char* base_name, - char** new_names, - FT_Long* offsets, - FT_Error* errors ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Raccess_Get_HeaderInfo */ - /* */ - /* <Description> */ - /* Get the information from the header of resource fork. The */ - /* information includes the file offset where the resource map */ - /* starts, and the file offset where the resource data starts. */ - /* `FT_Raccess_Get_DataOffsets' requires these two data. */ - /* */ - /* <Input> */ - /* library :: */ - /* A FreeType library instance. */ - /* */ - /* stream :: */ - /* A file stream containing the resource fork. */ - /* */ - /* rfork_offset :: */ - /* The file offset where the resource fork starts. */ - /* */ - /* <Output> */ - /* map_offset :: */ - /* The file offset where the resource map starts. */ - /* */ - /* rdata_pos :: */ - /* The file offset where the resource data starts. */ - /* */ - /* <Return> */ - /* FreeType error code. FT_Err_Ok means success. */ - /* */ - FT_BASE( FT_Error ) - FT_Raccess_Get_HeaderInfo( FT_Library library, - FT_Stream stream, - FT_Long rfork_offset, - FT_Long *map_offset, - FT_Long *rdata_pos ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Raccess_Get_DataOffsets */ - /* */ - /* <Description> */ - /* Get the data offsets for a tag in a resource fork. Offsets are */ - /* stored in an array because, in some cases, resources in a resource */ - /* fork have the same tag. */ - /* */ - /* <Input> */ - /* library :: */ - /* A FreeType library instance. */ - /* */ - /* stream :: */ - /* A file stream containing the resource fork. */ - /* */ - /* map_offset :: */ - /* The file offset where the resource map starts. */ - /* */ - /* rdata_pos :: */ - /* The file offset where the resource data starts. */ - /* */ - /* tag :: */ - /* The resource tag. */ - /* */ - /* sort_by_res_id :: */ - /* A Boolean to sort the fragmented resource by their ids. */ - /* The fragmented resources for `POST' resource should be sorted */ - /* to restore Type1 font properly. For `sfnt' resources, sorting */ - /* may induce a different order of the faces in comparison to that */ - /* by QuickDraw API. */ - /* */ - /* <Output> */ - /* offsets :: */ - /* The stream offsets for the resource data specified by `tag'. */ - /* This array is allocated by the function, so you have to call */ - /* @ft_mem_free after use. */ - /* */ - /* count :: */ - /* The length of offsets array. */ - /* */ - /* <Return> */ - /* FreeType error code. FT_Err_Ok means success. */ - /* */ - /* <Note> */ - /* Normally you should use `FT_Raccess_Get_HeaderInfo' to get the */ - /* value for `map_offset' and `rdata_pos'. */ - /* */ - FT_BASE( FT_Error ) - FT_Raccess_Get_DataOffsets( FT_Library library, - FT_Stream stream, - FT_Long map_offset, - FT_Long rdata_pos, - FT_Long tag, - FT_Bool sort_by_res_id, - FT_Long **offsets, - FT_Long *count ); - - -FT_END_HEADER - -#endif /* FTRFORK_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/ftserv.h b/builddir/freetype-2.7.0/include/freetype/internal/ftserv.h deleted file mode 100644 index 9189717..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/ftserv.h +++ /dev/null @@ -1,763 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftserv.h */ -/* */ -/* The FreeType services (specification only). */ -/* */ -/* Copyright 2003-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - /*************************************************************************/ - /* */ - /* Each module can export one or more `services'. Each service is */ - /* identified by a constant string and modeled by a pointer; the latter */ - /* generally corresponds to a structure containing function pointers. */ - /* */ - /* Note that a service's data cannot be a mere function pointer because */ - /* in C it is possible that function pointers might be implemented */ - /* differently than data pointers (e.g. 48 bits instead of 32). */ - /* */ - /*************************************************************************/ - - -#ifndef FTSERV_H_ -#define FTSERV_H_ - - -FT_BEGIN_HEADER - - /* - * @macro: - * FT_FACE_FIND_SERVICE - * - * @description: - * This macro is used to look up a service from a face's driver module. - * - * @input: - * face :: - * The source face handle. - * - * id :: - * A string describing the service as defined in the service's - * header files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to - * `multi-masters'). It is automatically prefixed with - * `FT_SERVICE_ID_'. - * - * @output: - * ptr :: - * A variable that receives the service pointer. Will be NULL - * if not found. - */ -#ifdef __cplusplus - -#define FT_FACE_FIND_SERVICE( face, ptr, id ) \ - FT_BEGIN_STMNT \ - FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \ - FT_Pointer _tmp_ = NULL; \ - FT_Pointer* _pptr_ = (FT_Pointer*)&(ptr); \ - \ - \ - if ( module->clazz->get_interface ) \ - _tmp_ = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \ - *_pptr_ = _tmp_; \ - FT_END_STMNT - -#else /* !C++ */ - -#define FT_FACE_FIND_SERVICE( face, ptr, id ) \ - FT_BEGIN_STMNT \ - FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \ - FT_Pointer _tmp_ = NULL; \ - \ - if ( module->clazz->get_interface ) \ - _tmp_ = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \ - ptr = _tmp_; \ - FT_END_STMNT - -#endif /* !C++ */ - - - /* - * @macro: - * FT_FACE_FIND_GLOBAL_SERVICE - * - * @description: - * This macro is used to look up a service from all modules. - * - * @input: - * face :: - * The source face handle. - * - * id :: - * A string describing the service as defined in the service's - * header files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to - * `multi-masters'). It is automatically prefixed with - * `FT_SERVICE_ID_'. - * - * @output: - * ptr :: - * A variable that receives the service pointer. Will be NULL - * if not found. - */ -#ifdef __cplusplus - -#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id ) \ - FT_BEGIN_STMNT \ - FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \ - FT_Pointer _tmp_; \ - FT_Pointer* _pptr_ = (FT_Pointer*)&(ptr); \ - \ - \ - _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \ - *_pptr_ = _tmp_; \ - FT_END_STMNT - -#else /* !C++ */ - -#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id ) \ - FT_BEGIN_STMNT \ - FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \ - FT_Pointer _tmp_; \ - \ - \ - _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \ - ptr = _tmp_; \ - FT_END_STMNT - -#endif /* !C++ */ - - - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** S E R V I C E D E S C R I P T O R S *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - - /* - * The following structure is used to _describe_ a given service - * to the library. This is useful to build simple static service lists. - */ - typedef struct FT_ServiceDescRec_ - { - const char* serv_id; /* service name */ - const void* serv_data; /* service pointer/data */ - - } FT_ServiceDescRec; - - typedef const FT_ServiceDescRec* FT_ServiceDesc; - - - /*************************************************************************/ - /* */ - /* <Macro> */ - /* FT_DEFINE_SERVICEDESCREC1 */ - /* FT_DEFINE_SERVICEDESCREC2 */ - /* FT_DEFINE_SERVICEDESCREC3 */ - /* FT_DEFINE_SERVICEDESCREC4 */ - /* FT_DEFINE_SERVICEDESCREC5 */ - /* FT_DEFINE_SERVICEDESCREC6 */ - /* FT_DEFINE_SERVICEDESCREC7 */ - /* */ - /* <Description> */ - /* Used to initialize an array of FT_ServiceDescRec structures. */ - /* */ - /* When FT_CONFIG_OPTION_PIC is defined a `create' function needs to */ - /* be called with a pointer to return an allocated array. As soon as */ - /* it is no longer needed, a `destroy' function needs to be called to */ - /* release that allocation. */ - /* */ - /* These functions should be manually called from the `pic_init' and */ - /* `pic_free' functions of your module (see FT_DEFINE_MODULE). */ - /* */ - /* When FT_CONFIG_OPTION_PIC is not defined the array will be */ - /* allocated in the global scope (or the scope where the macro is */ - /* used). */ - /* */ -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DEFINE_SERVICEDESCREC1( class_, \ - serv_id_1, serv_data_1 ) \ - static const FT_ServiceDescRec class_[] = \ - { \ - { serv_id_1, serv_data_1 }, \ - { NULL, NULL } \ - }; - -#define FT_DEFINE_SERVICEDESCREC2( class_, \ - serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2 ) \ - static const FT_ServiceDescRec class_[] = \ - { \ - { serv_id_1, serv_data_1 }, \ - { serv_id_2, serv_data_2 }, \ - { NULL, NULL } \ - }; - -#define FT_DEFINE_SERVICEDESCREC3( class_, \ - serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2, \ - serv_id_3, serv_data_3 ) \ - static const FT_ServiceDescRec class_[] = \ - { \ - { serv_id_1, serv_data_1 }, \ - { serv_id_2, serv_data_2 }, \ - { serv_id_3, serv_data_3 }, \ - { NULL, NULL } \ - }; - -#define FT_DEFINE_SERVICEDESCREC4( class_, \ - serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2, \ - serv_id_3, serv_data_3, \ - serv_id_4, serv_data_4 ) \ - static const FT_ServiceDescRec class_[] = \ - { \ - { serv_id_1, serv_data_1 }, \ - { serv_id_2, serv_data_2 }, \ - { serv_id_3, serv_data_3 }, \ - { serv_id_4, serv_data_4 }, \ - { NULL, NULL } \ - }; - -#define FT_DEFINE_SERVICEDESCREC5( class_, \ - serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2, \ - serv_id_3, serv_data_3, \ - serv_id_4, serv_data_4, \ - serv_id_5, serv_data_5 ) \ - static const FT_ServiceDescRec class_[] = \ - { \ - { serv_id_1, serv_data_1 }, \ - { serv_id_2, serv_data_2 }, \ - { serv_id_3, serv_data_3 }, \ - { serv_id_4, serv_data_4 }, \ - { serv_id_5, serv_data_5 }, \ - { NULL, NULL } \ - }; - -#define FT_DEFINE_SERVICEDESCREC6( class_, \ - serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2, \ - serv_id_3, serv_data_3, \ - serv_id_4, serv_data_4, \ - serv_id_5, serv_data_5, \ - serv_id_6, serv_data_6 ) \ - static const FT_ServiceDescRec class_[] = \ - { \ - { serv_id_1, serv_data_1 }, \ - { serv_id_2, serv_data_2 }, \ - { serv_id_3, serv_data_3 }, \ - { serv_id_4, serv_data_4 }, \ - { serv_id_5, serv_data_5 }, \ - { serv_id_6, serv_data_6 }, \ - { NULL, NULL } \ - }; - -#define FT_DEFINE_SERVICEDESCREC7( class_, \ - serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2, \ - serv_id_3, serv_data_3, \ - serv_id_4, serv_data_4, \ - serv_id_5, serv_data_5, \ - serv_id_6, serv_data_6, \ - serv_id_7, serv_data_7 ) \ - static const FT_ServiceDescRec class_[] = \ - { \ - { serv_id_1, serv_data_1 }, \ - { serv_id_2, serv_data_2 }, \ - { serv_id_3, serv_data_3 }, \ - { serv_id_4, serv_data_4 }, \ - { serv_id_5, serv_data_5 }, \ - { serv_id_6, serv_data_6 }, \ - { serv_id_7, serv_data_7 }, \ - { NULL, NULL } \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_SERVICEDESCREC1( class_, \ - serv_id_1, serv_data_1 ) \ - void \ - FT_Destroy_Class_ ## class_( FT_Library library, \ - FT_ServiceDescRec* clazz ) \ - { \ - FT_Memory memory = library->memory; \ - \ - \ - if ( clazz ) \ - FT_FREE( clazz ); \ - } \ - \ - FT_Error \ - FT_Create_Class_ ## class_( FT_Library library, \ - FT_ServiceDescRec** output_class ) \ - { \ - FT_ServiceDescRec* clazz = NULL; \ - FT_Error error; \ - FT_Memory memory = library->memory; \ - \ - \ - if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 2 ) ) \ - return error; \ - \ - clazz[0].serv_id = serv_id_1; \ - clazz[0].serv_data = serv_data_1; \ - clazz[1].serv_id = NULL; \ - clazz[1].serv_data = NULL; \ - \ - *output_class = clazz; \ - \ - return FT_Err_Ok; \ - } - -#define FT_DEFINE_SERVICEDESCREC2( class_, \ - serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2 ) \ - void \ - FT_Destroy_Class_ ## class_( FT_Library library, \ - FT_ServiceDescRec* clazz ) \ - { \ - FT_Memory memory = library->memory; \ - \ - \ - if ( clazz ) \ - FT_FREE( clazz ); \ - } \ - \ - FT_Error \ - FT_Create_Class_ ## class_( FT_Library library, \ - FT_ServiceDescRec** output_class ) \ - { \ - FT_ServiceDescRec* clazz = NULL; \ - FT_Error error; \ - FT_Memory memory = library->memory; \ - \ - \ - if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 3 ) ) \ - return error; \ - \ - clazz[0].serv_id = serv_id_1; \ - clazz[0].serv_data = serv_data_1; \ - clazz[1].serv_id = serv_id_2; \ - clazz[1].serv_data = serv_data_2; \ - clazz[2].serv_id = NULL; \ - clazz[2].serv_data = NULL; \ - \ - *output_class = clazz; \ - \ - return FT_Err_Ok; \ - } - -#define FT_DEFINE_SERVICEDESCREC3( class_, \ - serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2, \ - serv_id_3, serv_data_3 ) \ - void \ - FT_Destroy_Class_ ## class_( FT_Library library, \ - FT_ServiceDescRec* clazz ) \ - { \ - FT_Memory memory = library->memory; \ - \ - \ - if ( clazz ) \ - FT_FREE( clazz ); \ - } \ - \ - FT_Error \ - FT_Create_Class_ ## class_( FT_Library library, \ - FT_ServiceDescRec** output_class ) \ - { \ - FT_ServiceDescRec* clazz = NULL; \ - FT_Error error; \ - FT_Memory memory = library->memory; \ - \ - \ - if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 4 ) ) \ - return error; \ - \ - clazz[0].serv_id = serv_id_1; \ - clazz[0].serv_data = serv_data_1; \ - clazz[1].serv_id = serv_id_2; \ - clazz[1].serv_data = serv_data_2; \ - clazz[2].serv_id = serv_id_3; \ - clazz[2].serv_data = serv_data_3; \ - clazz[3].serv_id = NULL; \ - clazz[3].serv_data = NULL; \ - \ - *output_class = clazz; \ - \ - return FT_Err_Ok; \ - } - -#define FT_DEFINE_SERVICEDESCREC4( class_, \ - serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2, \ - serv_id_3, serv_data_3, \ - serv_id_4, serv_data_4 ) \ - void \ - FT_Destroy_Class_ ## class_( FT_Library library, \ - FT_ServiceDescRec* clazz ) \ - { \ - FT_Memory memory = library->memory; \ - \ - \ - if ( clazz ) \ - FT_FREE( clazz ); \ - } \ - \ - FT_Error \ - FT_Create_Class_ ## class_( FT_Library library, \ - FT_ServiceDescRec** output_class ) \ - { \ - FT_ServiceDescRec* clazz = NULL; \ - FT_Error error; \ - FT_Memory memory = library->memory; \ - \ - \ - if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 5 ) ) \ - return error; \ - \ - clazz[0].serv_id = serv_id_1; \ - clazz[0].serv_data = serv_data_1; \ - clazz[1].serv_id = serv_id_2; \ - clazz[1].serv_data = serv_data_2; \ - clazz[2].serv_id = serv_id_3; \ - clazz[2].serv_data = serv_data_3; \ - clazz[3].serv_id = serv_id_4; \ - clazz[3].serv_data = serv_data_4; \ - clazz[4].serv_id = NULL; \ - clazz[4].serv_data = NULL; \ - \ - *output_class = clazz; \ - \ - return FT_Err_Ok; \ - } - -#define FT_DEFINE_SERVICEDESCREC5( class_, \ - serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2, \ - serv_id_3, serv_data_3, \ - serv_id_4, serv_data_4, \ - serv_id_5, serv_data_5 ) \ - void \ - FT_Destroy_Class_ ## class_( FT_Library library, \ - FT_ServiceDescRec* clazz ) \ - { \ - FT_Memory memory = library->memory; \ - \ - \ - if ( clazz ) \ - FT_FREE( clazz ); \ - } \ - \ - FT_Error \ - FT_Create_Class_ ## class_( FT_Library library, \ - FT_ServiceDescRec** output_class ) \ - { \ - FT_ServiceDescRec* clazz = NULL; \ - FT_Error error; \ - FT_Memory memory = library->memory; \ - \ - \ - if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 6 ) ) \ - return error; \ - \ - clazz[0].serv_id = serv_id_1; \ - clazz[0].serv_data = serv_data_1; \ - clazz[1].serv_id = serv_id_2; \ - clazz[1].serv_data = serv_data_2; \ - clazz[2].serv_id = serv_id_3; \ - clazz[2].serv_data = serv_data_3; \ - clazz[3].serv_id = serv_id_4; \ - clazz[3].serv_data = serv_data_4; \ - clazz[4].serv_id = serv_id_5; \ - clazz[4].serv_data = serv_data_5; \ - clazz[5].serv_id = NULL; \ - clazz[5].serv_data = NULL; \ - \ - *output_class = clazz; \ - \ - return FT_Err_Ok; \ - } - -#define FT_DEFINE_SERVICEDESCREC6( class_, \ - serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2, \ - serv_id_3, serv_data_3, \ - serv_id_4, serv_data_4, \ - serv_id_5, serv_data_5, \ - serv_id_6, serv_data_6 ) \ - void \ - FT_Destroy_Class_ ## class_( FT_Library library, \ - FT_ServiceDescRec* clazz ) \ - { \ - FT_Memory memory = library->memory; \ - \ - \ - if ( clazz ) \ - FT_FREE( clazz ); \ - } \ - \ - FT_Error \ - FT_Create_Class_ ## class_( FT_Library library, \ - FT_ServiceDescRec** output_class) \ - { \ - FT_ServiceDescRec* clazz = NULL; \ - FT_Error error; \ - FT_Memory memory = library->memory; \ - \ - \ - if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 7 ) ) \ - return error; \ - \ - clazz[0].serv_id = serv_id_1; \ - clazz[0].serv_data = serv_data_1; \ - clazz[1].serv_id = serv_id_2; \ - clazz[1].serv_data = serv_data_2; \ - clazz[2].serv_id = serv_id_3; \ - clazz[2].serv_data = serv_data_3; \ - clazz[3].serv_id = serv_id_4; \ - clazz[3].serv_data = serv_data_4; \ - clazz[4].serv_id = serv_id_5; \ - clazz[4].serv_data = serv_data_5; \ - clazz[5].serv_id = serv_id_6; \ - clazz[5].serv_data = serv_data_6; \ - clazz[6].serv_id = NULL; \ - clazz[6].serv_data = NULL; \ - \ - *output_class = clazz; \ - \ - return FT_Err_Ok; \ - } - -#define FT_DEFINE_SERVICEDESCREC7( class_, \ - serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2, \ - serv_id_3, serv_data_3, \ - serv_id_4, serv_data_4, \ - serv_id_5, serv_data_5, \ - serv_id_6, serv_data_6, \ - serv_id_7, serv_data_7 ) \ - void \ - FT_Destroy_Class_ ## class_( FT_Library library, \ - FT_ServiceDescRec* clazz ) \ - { \ - FT_Memory memory = library->memory; \ - \ - \ - if ( clazz ) \ - FT_FREE( clazz ); \ - } \ - \ - FT_Error \ - FT_Create_Class_ ## class_( FT_Library library, \ - FT_ServiceDescRec** output_class) \ - { \ - FT_ServiceDescRec* clazz = NULL; \ - FT_Error error; \ - FT_Memory memory = library->memory; \ - \ - \ - if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 8 ) ) \ - return error; \ - \ - clazz[0].serv_id = serv_id_1; \ - clazz[0].serv_data = serv_data_1; \ - clazz[1].serv_id = serv_id_2; \ - clazz[1].serv_data = serv_data_2; \ - clazz[2].serv_id = serv_id_3; \ - clazz[2].serv_data = serv_data_3; \ - clazz[3].serv_id = serv_id_4; \ - clazz[3].serv_data = serv_data_4; \ - clazz[4].serv_id = serv_id_5; \ - clazz[4].serv_data = serv_data_5; \ - clazz[5].serv_id = serv_id_6; \ - clazz[5].serv_data = serv_data_6; \ - clazz[6].serv_id = serv_id_7; \ - clazz[6].serv_data = serv_data_7; \ - clazz[7].serv_id = NULL; \ - clazz[7].serv_data = NULL; \ - \ - *output_class = clazz; \ - \ - return FT_Err_Ok; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - - - /* - * Parse a list of FT_ServiceDescRec descriptors and look for - * a specific service by ID. Note that the last element in the - * array must be { NULL, NULL }, and that the function should - * return NULL if the service isn't available. - * - * This function can be used by modules to implement their - * `get_service' method. - */ - FT_BASE( FT_Pointer ) - ft_service_list_lookup( FT_ServiceDesc service_descriptors, - const char* service_id ); - - - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** S E R V I C E S C A C H E *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - - /* - * This structure is used to store a cache for several frequently used - * services. It is the type of `face->internal->services'. You - * should only use FT_FACE_LOOKUP_SERVICE to access it. - * - * All fields should have the type FT_Pointer to relax compilation - * dependencies. We assume the developer isn't completely stupid. - * - * Each field must be named `service_XXXX' where `XXX' corresponds to - * the correct FT_SERVICE_ID_XXXX macro. See the definition of - * FT_FACE_LOOKUP_SERVICE below how this is implemented. - * - */ - typedef struct FT_ServiceCacheRec_ - { - FT_Pointer service_POSTSCRIPT_FONT_NAME; - FT_Pointer service_MULTI_MASTERS; - FT_Pointer service_GLYPH_DICT; - FT_Pointer service_PFR_METRICS; - FT_Pointer service_WINFNT; - - } FT_ServiceCacheRec, *FT_ServiceCache; - - - /* - * A magic number used within the services cache. - */ - - /* ensure that value `1' has the same width as a pointer */ -#define FT_SERVICE_UNAVAILABLE ((FT_Pointer)~(FT_PtrDist)1) - - - /* - * @macro: - * FT_FACE_LOOKUP_SERVICE - * - * @description: - * This macro is used to lookup a service from a face's driver module - * using its cache. - * - * @input: - * face:: - * The source face handle containing the cache. - * - * field :: - * The field name in the cache. - * - * id :: - * The service ID. - * - * @output: - * ptr :: - * A variable receiving the service data. NULL if not available. - */ -#ifdef __cplusplus - -#define FT_FACE_LOOKUP_SERVICE( face, ptr, id ) \ - FT_BEGIN_STMNT \ - FT_Pointer svc; \ - FT_Pointer* Pptr = (FT_Pointer*)&(ptr); \ - \ - \ - svc = FT_FACE( face )->internal->services. service_ ## id; \ - if ( svc == FT_SERVICE_UNAVAILABLE ) \ - svc = NULL; \ - else if ( svc == NULL ) \ - { \ - FT_FACE_FIND_SERVICE( face, svc, id ); \ - \ - FT_FACE( face )->internal->services. service_ ## id = \ - (FT_Pointer)( svc != NULL ? svc \ - : FT_SERVICE_UNAVAILABLE ); \ - } \ - *Pptr = svc; \ - FT_END_STMNT - -#else /* !C++ */ - -#define FT_FACE_LOOKUP_SERVICE( face, ptr, id ) \ - FT_BEGIN_STMNT \ - FT_Pointer svc; \ - \ - \ - svc = FT_FACE( face )->internal->services. service_ ## id; \ - if ( svc == FT_SERVICE_UNAVAILABLE ) \ - svc = NULL; \ - else if ( svc == NULL ) \ - { \ - FT_FACE_FIND_SERVICE( face, svc, id ); \ - \ - FT_FACE( face )->internal->services. service_ ## id = \ - (FT_Pointer)( svc != NULL ? svc \ - : FT_SERVICE_UNAVAILABLE ); \ - } \ - ptr = svc; \ - FT_END_STMNT - -#endif /* !C++ */ - - /* - * A macro used to define new service structure types. - */ - -#define FT_DEFINE_SERVICE( name ) \ - typedef struct FT_Service_ ## name ## Rec_ \ - FT_Service_ ## name ## Rec ; \ - typedef struct FT_Service_ ## name ## Rec_ \ - const * FT_Service_ ## name ; \ - struct FT_Service_ ## name ## Rec_ - - /* */ - - /* - * The header files containing the services. - */ - -#define FT_SERVICE_BDF_H <freetype/internal/services/svbdf.h> -#define FT_SERVICE_CID_H <freetype/internal/services/svcid.h> -#define FT_SERVICE_GLYPH_DICT_H <freetype/internal/services/svgldict.h> -#define FT_SERVICE_GX_VALIDATE_H <freetype/internal/services/svgxval.h> -#define FT_SERVICE_KERNING_H <freetype/internal/services/svkern.h> -#define FT_SERVICE_MULTIPLE_MASTERS_H <freetype/internal/services/svmm.h> -#define FT_SERVICE_OPENTYPE_VALIDATE_H <freetype/internal/services/svotval.h> -#define FT_SERVICE_PFR_H <freetype/internal/services/svpfr.h> -#define FT_SERVICE_POSTSCRIPT_CMAPS_H <freetype/internal/services/svpscmap.h> -#define FT_SERVICE_POSTSCRIPT_INFO_H <freetype/internal/services/svpsinfo.h> -#define FT_SERVICE_POSTSCRIPT_NAME_H <freetype/internal/services/svpostnm.h> -#define FT_SERVICE_PROPERTIES_H <freetype/internal/services/svprop.h> -#define FT_SERVICE_SFNT_H <freetype/internal/services/svsfnt.h> -#define FT_SERVICE_TRUETYPE_ENGINE_H <freetype/internal/services/svtteng.h> -#define FT_SERVICE_TT_CMAP_H <freetype/internal/services/svttcmap.h> -#define FT_SERVICE_WINFNT_H <freetype/internal/services/svwinfnt.h> -#define FT_SERVICE_FONT_FORMAT_H <freetype/internal/services/svfntfmt.h> -#define FT_SERVICE_TRUETYPE_GLYF_H <freetype/internal/services/svttglyf.h> - - /* */ - -FT_END_HEADER - -#endif /* FTSERV_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/ftstream.h b/builddir/freetype-2.7.0/include/freetype/internal/ftstream.h deleted file mode 100644 index 6d04875..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/ftstream.h +++ /dev/null @@ -1,536 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftstream.h */ -/* */ -/* Stream handling (specification). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTSTREAM_H_ -#define FTSTREAM_H_ - - -#include <ft2build.h> -#include FT_SYSTEM_H -#include FT_INTERNAL_OBJECTS_H - - -FT_BEGIN_HEADER - - - /* format of an 8-bit frame_op value: */ - /* */ - /* bit 76543210 */ - /* xxxxxxes */ - /* */ - /* s is set to 1 if the value is signed. */ - /* e is set to 1 if the value is little-endian. */ - /* xxx is a command. */ - -#define FT_FRAME_OP_SHIFT 2 -#define FT_FRAME_OP_SIGNED 1 -#define FT_FRAME_OP_LITTLE 2 -#define FT_FRAME_OP_COMMAND( x ) ( x >> FT_FRAME_OP_SHIFT ) - -#define FT_MAKE_FRAME_OP( command, little, sign ) \ - ( ( command << FT_FRAME_OP_SHIFT ) | ( little << 1 ) | sign ) - -#define FT_FRAME_OP_END 0 -#define FT_FRAME_OP_START 1 /* start a new frame */ -#define FT_FRAME_OP_BYTE 2 /* read 1-byte value */ -#define FT_FRAME_OP_SHORT 3 /* read 2-byte value */ -#define FT_FRAME_OP_LONG 4 /* read 4-byte value */ -#define FT_FRAME_OP_OFF3 5 /* read 3-byte value */ -#define FT_FRAME_OP_BYTES 6 /* read a bytes sequence */ - - - typedef enum FT_Frame_Op_ - { - ft_frame_end = 0, - ft_frame_start = FT_MAKE_FRAME_OP( FT_FRAME_OP_START, 0, 0 ), - - ft_frame_byte = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTE, 0, 0 ), - ft_frame_schar = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTE, 0, 1 ), - - ft_frame_ushort_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 0, 0 ), - ft_frame_short_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 0, 1 ), - ft_frame_ushort_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 1, 0 ), - ft_frame_short_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 1, 1 ), - - ft_frame_ulong_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 0, 0 ), - ft_frame_long_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 0, 1 ), - ft_frame_ulong_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 1, 0 ), - ft_frame_long_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 1, 1 ), - - ft_frame_uoff3_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 0 ), - ft_frame_off3_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 1 ), - ft_frame_uoff3_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 0 ), - ft_frame_off3_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 1 ), - - ft_frame_bytes = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTES, 0, 0 ), - ft_frame_skip = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTES, 0, 1 ) - - } FT_Frame_Op; - - - typedef struct FT_Frame_Field_ - { - FT_Byte value; - FT_Byte size; - FT_UShort offset; - - } FT_Frame_Field; - - - /* Construct an FT_Frame_Field out of a structure type and a field name. */ - /* The structure type must be set in the FT_STRUCTURE macro before */ - /* calling the FT_FRAME_START() macro. */ - /* */ -#define FT_FIELD_SIZE( f ) \ - (FT_Byte)sizeof ( ((FT_STRUCTURE*)0)->f ) - -#define FT_FIELD_SIZE_DELTA( f ) \ - (FT_Byte)sizeof ( ((FT_STRUCTURE*)0)->f[0] ) - -#define FT_FIELD_OFFSET( f ) \ - (FT_UShort)( offsetof( FT_STRUCTURE, f ) ) - -#define FT_FRAME_FIELD( frame_op, field ) \ - { \ - frame_op, \ - FT_FIELD_SIZE( field ), \ - FT_FIELD_OFFSET( field ) \ - } - -#define FT_MAKE_EMPTY_FIELD( frame_op ) { frame_op, 0, 0 } - -#define FT_FRAME_START( size ) { ft_frame_start, 0, size } -#define FT_FRAME_END { ft_frame_end, 0, 0 } - -#define FT_FRAME_LONG( f ) FT_FRAME_FIELD( ft_frame_long_be, f ) -#define FT_FRAME_ULONG( f ) FT_FRAME_FIELD( ft_frame_ulong_be, f ) -#define FT_FRAME_SHORT( f ) FT_FRAME_FIELD( ft_frame_short_be, f ) -#define FT_FRAME_USHORT( f ) FT_FRAME_FIELD( ft_frame_ushort_be, f ) -#define FT_FRAME_OFF3( f ) FT_FRAME_FIELD( ft_frame_off3_be, f ) -#define FT_FRAME_UOFF3( f ) FT_FRAME_FIELD( ft_frame_uoff3_be, f ) -#define FT_FRAME_BYTE( f ) FT_FRAME_FIELD( ft_frame_byte, f ) -#define FT_FRAME_CHAR( f ) FT_FRAME_FIELD( ft_frame_schar, f ) - -#define FT_FRAME_LONG_LE( f ) FT_FRAME_FIELD( ft_frame_long_le, f ) -#define FT_FRAME_ULONG_LE( f ) FT_FRAME_FIELD( ft_frame_ulong_le, f ) -#define FT_FRAME_SHORT_LE( f ) FT_FRAME_FIELD( ft_frame_short_le, f ) -#define FT_FRAME_USHORT_LE( f ) FT_FRAME_FIELD( ft_frame_ushort_le, f ) -#define FT_FRAME_OFF3_LE( f ) FT_FRAME_FIELD( ft_frame_off3_le, f ) -#define FT_FRAME_UOFF3_LE( f ) FT_FRAME_FIELD( ft_frame_uoff3_le, f ) - -#define FT_FRAME_SKIP_LONG { ft_frame_long_be, 0, 0 } -#define FT_FRAME_SKIP_SHORT { ft_frame_short_be, 0, 0 } -#define FT_FRAME_SKIP_BYTE { ft_frame_byte, 0, 0 } - -#define FT_FRAME_BYTES( field, count ) \ - { \ - ft_frame_bytes, \ - count, \ - FT_FIELD_OFFSET( field ) \ - } - -#define FT_FRAME_SKIP_BYTES( count ) { ft_frame_skip, count, 0 } - - - /*************************************************************************/ - /* */ - /* Integer extraction macros -- the `buffer' parameter must ALWAYS be of */ - /* type `char*' or equivalent (1-byte elements). */ - /* */ - -#define FT_BYTE_( p, i ) ( ((const FT_Byte*)(p))[(i)] ) - -#define FT_INT16( x ) ( (FT_Int16)(x) ) -#define FT_UINT16( x ) ( (FT_UInt16)(x) ) -#define FT_INT32( x ) ( (FT_Int32)(x) ) -#define FT_UINT32( x ) ( (FT_UInt32)(x) ) - - -#define FT_BYTE_U16( p, i, s ) ( FT_UINT16( FT_BYTE_( p, i ) ) << (s) ) -#define FT_BYTE_U32( p, i, s ) ( FT_UINT32( FT_BYTE_( p, i ) ) << (s) ) - - -#define FT_PEEK_SHORT( p ) FT_INT16( FT_BYTE_U16( p, 0, 8) | \ - FT_BYTE_U16( p, 1, 0) ) - -#define FT_PEEK_USHORT( p ) FT_UINT16( FT_BYTE_U16( p, 0, 8 ) | \ - FT_BYTE_U16( p, 1, 0 ) ) - -#define FT_PEEK_LONG( p ) FT_INT32( FT_BYTE_U32( p, 0, 24 ) | \ - FT_BYTE_U32( p, 1, 16 ) | \ - FT_BYTE_U32( p, 2, 8 ) | \ - FT_BYTE_U32( p, 3, 0 ) ) - -#define FT_PEEK_ULONG( p ) FT_UINT32( FT_BYTE_U32( p, 0, 24 ) | \ - FT_BYTE_U32( p, 1, 16 ) | \ - FT_BYTE_U32( p, 2, 8 ) | \ - FT_BYTE_U32( p, 3, 0 ) ) - -#define FT_PEEK_OFF3( p ) FT_INT32( FT_BYTE_U32( p, 0, 16 ) | \ - FT_BYTE_U32( p, 1, 8 ) | \ - FT_BYTE_U32( p, 2, 0 ) ) - -#define FT_PEEK_UOFF3( p ) FT_UINT32( FT_BYTE_U32( p, 0, 16 ) | \ - FT_BYTE_U32( p, 1, 8 ) | \ - FT_BYTE_U32( p, 2, 0 ) ) - -#define FT_PEEK_SHORT_LE( p ) FT_INT16( FT_BYTE_U16( p, 1, 8 ) | \ - FT_BYTE_U16( p, 0, 0 ) ) - -#define FT_PEEK_USHORT_LE( p ) FT_UINT16( FT_BYTE_U16( p, 1, 8 ) | \ - FT_BYTE_U16( p, 0, 0 ) ) - -#define FT_PEEK_LONG_LE( p ) FT_INT32( FT_BYTE_U32( p, 3, 24 ) | \ - FT_BYTE_U32( p, 2, 16 ) | \ - FT_BYTE_U32( p, 1, 8 ) | \ - FT_BYTE_U32( p, 0, 0 ) ) - -#define FT_PEEK_ULONG_LE( p ) FT_UINT32( FT_BYTE_U32( p, 3, 24 ) | \ - FT_BYTE_U32( p, 2, 16 ) | \ - FT_BYTE_U32( p, 1, 8 ) | \ - FT_BYTE_U32( p, 0, 0 ) ) - -#define FT_PEEK_OFF3_LE( p ) FT_INT32( FT_BYTE_U32( p, 2, 16 ) | \ - FT_BYTE_U32( p, 1, 8 ) | \ - FT_BYTE_U32( p, 0, 0 ) ) - -#define FT_PEEK_UOFF3_LE( p ) FT_UINT32( FT_BYTE_U32( p, 2, 16 ) | \ - FT_BYTE_U32( p, 1, 8 ) | \ - FT_BYTE_U32( p, 0, 0 ) ) - - -#define FT_NEXT_CHAR( buffer ) \ - ( (signed char)*buffer++ ) - -#define FT_NEXT_BYTE( buffer ) \ - ( (unsigned char)*buffer++ ) - -#define FT_NEXT_SHORT( buffer ) \ - ( (short)( buffer += 2, FT_PEEK_SHORT( buffer - 2 ) ) ) - -#define FT_NEXT_USHORT( buffer ) \ - ( (unsigned short)( buffer += 2, FT_PEEK_USHORT( buffer - 2 ) ) ) - -#define FT_NEXT_OFF3( buffer ) \ - ( (long)( buffer += 3, FT_PEEK_OFF3( buffer - 3 ) ) ) - -#define FT_NEXT_UOFF3( buffer ) \ - ( (unsigned long)( buffer += 3, FT_PEEK_UOFF3( buffer - 3 ) ) ) - -#define FT_NEXT_LONG( buffer ) \ - ( (long)( buffer += 4, FT_PEEK_LONG( buffer - 4 ) ) ) - -#define FT_NEXT_ULONG( buffer ) \ - ( (unsigned long)( buffer += 4, FT_PEEK_ULONG( buffer - 4 ) ) ) - - -#define FT_NEXT_SHORT_LE( buffer ) \ - ( (short)( buffer += 2, FT_PEEK_SHORT_LE( buffer - 2 ) ) ) - -#define FT_NEXT_USHORT_LE( buffer ) \ - ( (unsigned short)( buffer += 2, FT_PEEK_USHORT_LE( buffer - 2 ) ) ) - -#define FT_NEXT_OFF3_LE( buffer ) \ - ( (long)( buffer += 3, FT_PEEK_OFF3_LE( buffer - 3 ) ) ) - -#define FT_NEXT_UOFF3_LE( buffer ) \ - ( (unsigned long)( buffer += 3, FT_PEEK_UOFF3_LE( buffer - 3 ) ) ) - -#define FT_NEXT_LONG_LE( buffer ) \ - ( (long)( buffer += 4, FT_PEEK_LONG_LE( buffer - 4 ) ) ) - -#define FT_NEXT_ULONG_LE( buffer ) \ - ( (unsigned long)( buffer += 4, FT_PEEK_ULONG_LE( buffer - 4 ) ) ) - - - /*************************************************************************/ - /* */ - /* Each GET_xxxx() macro uses an implicit `stream' variable. */ - /* */ -#if 0 -#define FT_GET_MACRO( type ) FT_NEXT_ ## type ( stream->cursor ) - -#define FT_GET_CHAR() FT_GET_MACRO( CHAR ) -#define FT_GET_BYTE() FT_GET_MACRO( BYTE ) -#define FT_GET_SHORT() FT_GET_MACRO( SHORT ) -#define FT_GET_USHORT() FT_GET_MACRO( USHORT ) -#define FT_GET_OFF3() FT_GET_MACRO( OFF3 ) -#define FT_GET_UOFF3() FT_GET_MACRO( UOFF3 ) -#define FT_GET_LONG() FT_GET_MACRO( LONG ) -#define FT_GET_ULONG() FT_GET_MACRO( ULONG ) -#define FT_GET_TAG4() FT_GET_MACRO( ULONG ) - -#define FT_GET_SHORT_LE() FT_GET_MACRO( SHORT_LE ) -#define FT_GET_USHORT_LE() FT_GET_MACRO( USHORT_LE ) -#define FT_GET_LONG_LE() FT_GET_MACRO( LONG_LE ) -#define FT_GET_ULONG_LE() FT_GET_MACRO( ULONG_LE ) - -#else -#define FT_GET_MACRO( func, type ) ( (type)func( stream ) ) - -#define FT_GET_CHAR() FT_GET_MACRO( FT_Stream_GetChar, FT_Char ) -#define FT_GET_BYTE() FT_GET_MACRO( FT_Stream_GetChar, FT_Byte ) -#define FT_GET_SHORT() FT_GET_MACRO( FT_Stream_GetUShort, FT_Short ) -#define FT_GET_USHORT() FT_GET_MACRO( FT_Stream_GetUShort, FT_UShort ) -#define FT_GET_OFF3() FT_GET_MACRO( FT_Stream_GetUOffset, FT_Long ) -#define FT_GET_UOFF3() FT_GET_MACRO( FT_Stream_GetUOffset, FT_ULong ) -#define FT_GET_LONG() FT_GET_MACRO( FT_Stream_GetULong, FT_Long ) -#define FT_GET_ULONG() FT_GET_MACRO( FT_Stream_GetULong, FT_ULong ) -#define FT_GET_TAG4() FT_GET_MACRO( FT_Stream_GetULong, FT_ULong ) - -#define FT_GET_SHORT_LE() FT_GET_MACRO( FT_Stream_GetUShortLE, FT_Short ) -#define FT_GET_USHORT_LE() FT_GET_MACRO( FT_Stream_GetUShortLE, FT_UShort ) -#define FT_GET_LONG_LE() FT_GET_MACRO( FT_Stream_GetULongLE, FT_Long ) -#define FT_GET_ULONG_LE() FT_GET_MACRO( FT_Stream_GetULongLE, FT_ULong ) -#endif - -#define FT_READ_MACRO( func, type, var ) \ - ( var = (type)func( stream, &error ), \ - error != FT_Err_Ok ) - -#define FT_READ_BYTE( var ) FT_READ_MACRO( FT_Stream_ReadChar, FT_Byte, var ) -#define FT_READ_CHAR( var ) FT_READ_MACRO( FT_Stream_ReadChar, FT_Char, var ) -#define FT_READ_SHORT( var ) FT_READ_MACRO( FT_Stream_ReadUShort, FT_Short, var ) -#define FT_READ_USHORT( var ) FT_READ_MACRO( FT_Stream_ReadUShort, FT_UShort, var ) -#define FT_READ_OFF3( var ) FT_READ_MACRO( FT_Stream_ReadUOffset, FT_Long, var ) -#define FT_READ_UOFF3( var ) FT_READ_MACRO( FT_Stream_ReadUOffset, FT_ULong, var ) -#define FT_READ_LONG( var ) FT_READ_MACRO( FT_Stream_ReadULong, FT_Long, var ) -#define FT_READ_ULONG( var ) FT_READ_MACRO( FT_Stream_ReadULong, FT_ULong, var ) - -#define FT_READ_SHORT_LE( var ) FT_READ_MACRO( FT_Stream_ReadUShortLE, FT_Short, var ) -#define FT_READ_USHORT_LE( var ) FT_READ_MACRO( FT_Stream_ReadUShortLE, FT_UShort, var ) -#define FT_READ_LONG_LE( var ) FT_READ_MACRO( FT_Stream_ReadULongLE, FT_Long, var ) -#define FT_READ_ULONG_LE( var ) FT_READ_MACRO( FT_Stream_ReadULongLE, FT_ULong, var ) - - -#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM - - /* initialize a stream for reading a regular system stream */ - FT_BASE( FT_Error ) - FT_Stream_Open( FT_Stream stream, - const char* filepathname ); - -#endif /* FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */ - - - /* create a new (input) stream from an FT_Open_Args structure */ - FT_BASE( FT_Error ) - FT_Stream_New( FT_Library library, - const FT_Open_Args* args, - FT_Stream *astream ); - - /* free a stream */ - FT_BASE( void ) - FT_Stream_Free( FT_Stream stream, - FT_Int external ); - - /* initialize a stream for reading in-memory data */ - FT_BASE( void ) - FT_Stream_OpenMemory( FT_Stream stream, - const FT_Byte* base, - FT_ULong size ); - - /* close a stream (does not destroy the stream structure) */ - FT_BASE( void ) - FT_Stream_Close( FT_Stream stream ); - - - /* seek within a stream. position is relative to start of stream */ - FT_BASE( FT_Error ) - FT_Stream_Seek( FT_Stream stream, - FT_ULong pos ); - - /* skip bytes in a stream */ - FT_BASE( FT_Error ) - FT_Stream_Skip( FT_Stream stream, - FT_Long distance ); - - /* return current stream position */ - FT_BASE( FT_ULong ) - FT_Stream_Pos( FT_Stream stream ); - - /* read bytes from a stream into a user-allocated buffer, returns an */ - /* error if not all bytes could be read. */ - FT_BASE( FT_Error ) - FT_Stream_Read( FT_Stream stream, - FT_Byte* buffer, - FT_ULong count ); - - /* read bytes from a stream at a given position */ - FT_BASE( FT_Error ) - FT_Stream_ReadAt( FT_Stream stream, - FT_ULong pos, - FT_Byte* buffer, - FT_ULong count ); - - /* try to read bytes at the end of a stream; return number of bytes */ - /* really available */ - FT_BASE( FT_ULong ) - FT_Stream_TryRead( FT_Stream stream, - FT_Byte* buffer, - FT_ULong count ); - - /* Enter a frame of `count' consecutive bytes in a stream. Returns an */ - /* error if the frame could not be read/accessed. The caller can use */ - /* the FT_Stream_Get_XXX functions to retrieve frame data without */ - /* error checks. */ - /* */ - /* You must _always_ call FT_Stream_ExitFrame() once you have entered */ - /* a stream frame! */ - /* */ - FT_BASE( FT_Error ) - FT_Stream_EnterFrame( FT_Stream stream, - FT_ULong count ); - - /* exit a stream frame */ - FT_BASE( void ) - FT_Stream_ExitFrame( FT_Stream stream ); - - /* Extract a stream frame. If the stream is disk-based, a heap block */ - /* is allocated and the frame bytes are read into it. If the stream */ - /* is memory-based, this function simply set a pointer to the data. */ - /* */ - /* Useful to optimize access to memory-based streams transparently. */ - /* */ - /* All extracted frames must be `freed' with a call to the function */ - /* FT_Stream_ReleaseFrame(). */ - /* */ - FT_BASE( FT_Error ) - FT_Stream_ExtractFrame( FT_Stream stream, - FT_ULong count, - FT_Byte** pbytes ); - - /* release an extract frame (see FT_Stream_ExtractFrame) */ - FT_BASE( void ) - FT_Stream_ReleaseFrame( FT_Stream stream, - FT_Byte** pbytes ); - - /* read a byte from an entered frame */ - FT_BASE( FT_Char ) - FT_Stream_GetChar( FT_Stream stream ); - - /* read a 16-bit big-endian unsigned integer from an entered frame */ - FT_BASE( FT_UShort ) - FT_Stream_GetUShort( FT_Stream stream ); - - /* read a 24-bit big-endian unsigned integer from an entered frame */ - FT_BASE( FT_ULong ) - FT_Stream_GetUOffset( FT_Stream stream ); - - /* read a 32-bit big-endian unsigned integer from an entered frame */ - FT_BASE( FT_ULong ) - FT_Stream_GetULong( FT_Stream stream ); - - /* read a 16-bit little-endian unsigned integer from an entered frame */ - FT_BASE( FT_UShort ) - FT_Stream_GetUShortLE( FT_Stream stream ); - - /* read a 32-bit little-endian unsigned integer from an entered frame */ - FT_BASE( FT_ULong ) - FT_Stream_GetULongLE( FT_Stream stream ); - - - /* read a byte from a stream */ - FT_BASE( FT_Char ) - FT_Stream_ReadChar( FT_Stream stream, - FT_Error* error ); - - /* read a 16-bit big-endian unsigned integer from a stream */ - FT_BASE( FT_UShort ) - FT_Stream_ReadUShort( FT_Stream stream, - FT_Error* error ); - - /* read a 24-bit big-endian unsigned integer from a stream */ - FT_BASE( FT_ULong ) - FT_Stream_ReadUOffset( FT_Stream stream, - FT_Error* error ); - - /* read a 32-bit big-endian integer from a stream */ - FT_BASE( FT_ULong ) - FT_Stream_ReadULong( FT_Stream stream, - FT_Error* error ); - - /* read a 16-bit little-endian unsigned integer from a stream */ - FT_BASE( FT_UShort ) - FT_Stream_ReadUShortLE( FT_Stream stream, - FT_Error* error ); - - /* read a 32-bit little-endian unsigned integer from a stream */ - FT_BASE( FT_ULong ) - FT_Stream_ReadULongLE( FT_Stream stream, - FT_Error* error ); - - /* Read a structure from a stream. The structure must be described */ - /* by an array of FT_Frame_Field records. */ - FT_BASE( FT_Error ) - FT_Stream_ReadFields( FT_Stream stream, - const FT_Frame_Field* fields, - void* structure ); - - -#define FT_STREAM_POS() \ - FT_Stream_Pos( stream ) - -#define FT_STREAM_SEEK( position ) \ - FT_SET_ERROR( FT_Stream_Seek( stream, \ - (FT_ULong)(position) ) ) - -#define FT_STREAM_SKIP( distance ) \ - FT_SET_ERROR( FT_Stream_Skip( stream, \ - (FT_Long)(distance) ) ) - -#define FT_STREAM_READ( buffer, count ) \ - FT_SET_ERROR( FT_Stream_Read( stream, \ - (FT_Byte*)(buffer), \ - (FT_ULong)(count) ) ) - -#define FT_STREAM_READ_AT( position, buffer, count ) \ - FT_SET_ERROR( FT_Stream_ReadAt( stream, \ - (FT_ULong)(position), \ - (FT_Byte*)buffer, \ - (FT_ULong)(count) ) ) - -#define FT_STREAM_READ_FIELDS( fields, object ) \ - FT_SET_ERROR( FT_Stream_ReadFields( stream, fields, object ) ) - - -#define FT_FRAME_ENTER( size ) \ - FT_SET_ERROR( \ - FT_DEBUG_INNER( FT_Stream_EnterFrame( stream, \ - (FT_ULong)(size) ) ) ) - -#define FT_FRAME_EXIT() \ - FT_DEBUG_INNER( FT_Stream_ExitFrame( stream ) ) - -#define FT_FRAME_EXTRACT( size, bytes ) \ - FT_SET_ERROR( \ - FT_DEBUG_INNER( FT_Stream_ExtractFrame( stream, \ - (FT_ULong)(size), \ - (FT_Byte**)&(bytes) ) ) ) - -#define FT_FRAME_RELEASE( bytes ) \ - FT_DEBUG_INNER( FT_Stream_ReleaseFrame( stream, \ - (FT_Byte**)&(bytes) ) ) - - -FT_END_HEADER - -#endif /* FTSTREAM_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/fttrace.h b/builddir/freetype-2.7.0/include/freetype/internal/fttrace.h deleted file mode 100644 index efb3355..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/fttrace.h +++ /dev/null @@ -1,154 +0,0 @@ -/***************************************************************************/ -/* */ -/* fttrace.h */ -/* */ -/* Tracing handling (specification only). */ -/* */ -/* Copyright 2002-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /* definitions of trace levels for FreeType 2 */ - - /* the first level must always be `trace_any' */ -FT_TRACE_DEF( any ) - - /* base components */ -FT_TRACE_DEF( calc ) /* calculations (ftcalc.c) */ -FT_TRACE_DEF( memory ) /* memory manager (ftobjs.c) */ -FT_TRACE_DEF( stream ) /* stream manager (ftstream.c) */ -FT_TRACE_DEF( io ) /* i/o interface (ftsystem.c) */ -FT_TRACE_DEF( list ) /* list management (ftlist.c) */ -FT_TRACE_DEF( init ) /* initialization (ftinit.c) */ -FT_TRACE_DEF( objs ) /* base objects (ftobjs.c) */ -FT_TRACE_DEF( outline ) /* outline management (ftoutln.c) */ -FT_TRACE_DEF( glyph ) /* glyph management (ftglyph.c) */ -FT_TRACE_DEF( gloader ) /* glyph loader (ftgloadr.c) */ - -FT_TRACE_DEF( raster ) /* monochrome rasterizer (ftraster.c) */ -FT_TRACE_DEF( smooth ) /* anti-aliasing raster (ftgrays.c) */ -FT_TRACE_DEF( mm ) /* MM interface (ftmm.c) */ -FT_TRACE_DEF( raccess ) /* resource fork accessor (ftrfork.c) */ -FT_TRACE_DEF( synth ) /* bold/slant synthesizer (ftsynth.c) */ -FT_TRACE_DEF( bitmap ) /* bitmap checksum (ftobjs.c) */ - - /* Cache sub-system */ -FT_TRACE_DEF( cache ) /* cache sub-system (ftcache.c, etc.) */ - - /* SFNT driver components */ -FT_TRACE_DEF( sfdriver ) /* SFNT font driver (sfdriver.c) */ -FT_TRACE_DEF( sfobjs ) /* SFNT object handler (sfobjs.c) */ -FT_TRACE_DEF( ttcmap ) /* charmap handler (ttcmap.c) */ -FT_TRACE_DEF( ttkern ) /* kerning handler (ttkern.c) */ -FT_TRACE_DEF( ttload ) /* basic TrueType tables (ttload.c) */ -FT_TRACE_DEF( ttmtx ) /* metrics-related tables (ttmtx.c) */ -FT_TRACE_DEF( ttpost ) /* PS table processing (ttpost.c) */ -FT_TRACE_DEF( ttsbit ) /* TrueType sbit handling (ttsbit.c) */ -FT_TRACE_DEF( ttbdf ) /* TrueType embedded BDF (ttbdf.c) */ - - /* TrueType driver components */ -FT_TRACE_DEF( ttdriver ) /* TT font driver (ttdriver.c) */ -FT_TRACE_DEF( ttgload ) /* TT glyph loader (ttgload.c) */ -FT_TRACE_DEF( ttinterp ) /* bytecode interpreter (ttinterp.c) */ -FT_TRACE_DEF( ttobjs ) /* TT objects manager (ttobjs.c) */ -FT_TRACE_DEF( ttpload ) /* TT data/program loader (ttpload.c) */ -FT_TRACE_DEF( ttgxvar ) /* TrueType GX var handler (ttgxvar.c) */ - - /* Type 1 driver components */ -FT_TRACE_DEF( t1afm ) -FT_TRACE_DEF( t1driver ) -FT_TRACE_DEF( t1gload ) -FT_TRACE_DEF( t1hint ) -FT_TRACE_DEF( t1load ) -FT_TRACE_DEF( t1objs ) -FT_TRACE_DEF( t1parse ) - - /* PostScript helper module `psaux' */ -FT_TRACE_DEF( t1decode ) -FT_TRACE_DEF( psobjs ) -FT_TRACE_DEF( psconv ) - - /* PostScript hinting module `pshinter' */ -FT_TRACE_DEF( pshrec ) -FT_TRACE_DEF( pshalgo1 ) -FT_TRACE_DEF( pshalgo2 ) - - /* Type 2 driver components */ -FT_TRACE_DEF( cffdriver ) -FT_TRACE_DEF( cffgload ) -FT_TRACE_DEF( cffload ) -FT_TRACE_DEF( cffobjs ) -FT_TRACE_DEF( cffparse ) - -FT_TRACE_DEF( cf2blues ) -FT_TRACE_DEF( cf2hints ) -FT_TRACE_DEF( cf2interp ) - - /* Type 42 driver component */ -FT_TRACE_DEF( t42 ) - - /* CID driver components */ -FT_TRACE_DEF( cidafm ) -FT_TRACE_DEF( ciddriver ) -FT_TRACE_DEF( cidgload ) -FT_TRACE_DEF( cidload ) -FT_TRACE_DEF( cidobjs ) -FT_TRACE_DEF( cidparse ) - - /* Windows font component */ -FT_TRACE_DEF( winfnt ) - - /* PCF font components */ -FT_TRACE_DEF( pcfdriver ) -FT_TRACE_DEF( pcfread ) - - /* BDF font components */ -FT_TRACE_DEF( bdfdriver ) -FT_TRACE_DEF( bdflib ) - - /* PFR font component */ -FT_TRACE_DEF( pfr ) - - /* OpenType validation components */ -FT_TRACE_DEF( otvmodule ) -FT_TRACE_DEF( otvcommon ) -FT_TRACE_DEF( otvbase ) -FT_TRACE_DEF( otvgdef ) -FT_TRACE_DEF( otvgpos ) -FT_TRACE_DEF( otvgsub ) -FT_TRACE_DEF( otvjstf ) -FT_TRACE_DEF( otvmath ) - - /* TrueTypeGX/AAT validation components */ -FT_TRACE_DEF( gxvmodule ) -FT_TRACE_DEF( gxvcommon ) -FT_TRACE_DEF( gxvfeat ) -FT_TRACE_DEF( gxvmort ) -FT_TRACE_DEF( gxvmorx ) -FT_TRACE_DEF( gxvbsln ) -FT_TRACE_DEF( gxvjust ) -FT_TRACE_DEF( gxvkern ) -FT_TRACE_DEF( gxvopbd ) -FT_TRACE_DEF( gxvtrak ) -FT_TRACE_DEF( gxvprop ) -FT_TRACE_DEF( gxvlcar ) - - /* autofit components */ -FT_TRACE_DEF( afmodule ) -FT_TRACE_DEF( afhints ) -FT_TRACE_DEF( afcjk ) -FT_TRACE_DEF( aflatin ) -FT_TRACE_DEF( aflatin2 ) -FT_TRACE_DEF( afwarp ) -FT_TRACE_DEF( afshaper ) -FT_TRACE_DEF( afglobal ) - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/ftvalid.h b/builddir/freetype-2.7.0/include/freetype/internal/ftvalid.h deleted file mode 100644 index aac92c9..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/ftvalid.h +++ /dev/null @@ -1,159 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftvalid.h */ -/* */ -/* FreeType validation support (specification). */ -/* */ -/* Copyright 2004-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef FTVALID_H_ -#define FTVALID_H_ - -#include <ft2build.h> -#include FT_CONFIG_STANDARD_LIBRARY_H /* for ft_setjmp and ft_longjmp */ - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** ****/ - /**** V A L I D A T I O N ****/ - /**** ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - /* handle to a validation object */ - typedef struct FT_ValidatorRec_ volatile* FT_Validator; - - - /*************************************************************************/ - /* */ - /* There are three distinct validation levels defined here: */ - /* */ - /* FT_VALIDATE_DEFAULT :: */ - /* A table that passes this validation level can be used reliably by */ - /* FreeType. It generally means that all offsets have been checked to */ - /* prevent out-of-bound reads, that array counts are correct, etc. */ - /* */ - /* FT_VALIDATE_TIGHT :: */ - /* A table that passes this validation level can be used reliably and */ - /* doesn't contain invalid data. For example, a charmap table that */ - /* returns invalid glyph indices will not pass, even though it can */ - /* be used with FreeType in default mode (the library will simply */ - /* return an error later when trying to load the glyph). */ - /* */ - /* It also checks that fields which must be a multiple of 2, 4, or 8, */ - /* don't have incorrect values, etc. */ - /* */ - /* FT_VALIDATE_PARANOID :: */ - /* Only for font debugging. Checks that a table follows the */ - /* specification by 100%. Very few fonts will be able to pass this */ - /* level anyway but it can be useful for certain tools like font */ - /* editors/converters. */ - /* */ - typedef enum FT_ValidationLevel_ - { - FT_VALIDATE_DEFAULT = 0, - FT_VALIDATE_TIGHT, - FT_VALIDATE_PARANOID - - } FT_ValidationLevel; - - -#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */ - /* We disable the warning `structure was padded due to */ - /* __declspec(align())' in order to compile cleanly with */ - /* the maximum level of warnings. */ -#pragma warning( push ) -#pragma warning( disable : 4324 ) -#endif /* _MSC_VER */ - - /* validator structure */ - typedef struct FT_ValidatorRec_ - { - ft_jmp_buf jump_buffer; /* used for exception handling */ - - const FT_Byte* base; /* address of table in memory */ - const FT_Byte* limit; /* `base' + sizeof(table) in memory */ - FT_ValidationLevel level; /* validation level */ - FT_Error error; /* error returned. 0 means success */ - - } FT_ValidatorRec; - -#if defined( _MSC_VER ) -#pragma warning( pop ) -#endif - -#define FT_VALIDATOR( x ) ( (FT_Validator)( x ) ) - - - FT_BASE( void ) - ft_validator_init( FT_Validator valid, - const FT_Byte* base, - const FT_Byte* limit, - FT_ValidationLevel level ); - - /* Do not use this. It's broken and will cause your validator to crash */ - /* if you run it on an invalid font. */ - FT_BASE( FT_Int ) - ft_validator_run( FT_Validator valid ); - - /* Sets the error field in a validator, then calls `longjmp' to return */ - /* to high-level caller. Using `setjmp/longjmp' avoids many stupid */ - /* error checks within the validation routines. */ - /* */ - FT_BASE( void ) - ft_validator_error( FT_Validator valid, - FT_Error error ); - - - /* Calls ft_validate_error. Assumes that the `valid' local variable */ - /* holds a pointer to the current validator object. */ - /* */ -#define FT_INVALID( _error ) FT_INVALID_( _error ) -#define FT_INVALID_( _error ) \ - ft_validator_error( valid, FT_THROW( _error ) ) - - /* called when a broken table is detected */ -#define FT_INVALID_TOO_SHORT \ - FT_INVALID( Invalid_Table ) - - /* called when an invalid offset is detected */ -#define FT_INVALID_OFFSET \ - FT_INVALID( Invalid_Offset ) - - /* called when an invalid format/value is detected */ -#define FT_INVALID_FORMAT \ - FT_INVALID( Invalid_Table ) - - /* called when an invalid glyph index is detected */ -#define FT_INVALID_GLYPH_ID \ - FT_INVALID( Invalid_Glyph_Index ) - - /* called when an invalid field value is detected */ -#define FT_INVALID_DATA \ - FT_INVALID( Invalid_Table ) - - -FT_END_HEADER - -#endif /* FTVALID_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/internal.h b/builddir/freetype-2.7.0/include/freetype/internal/internal.h deleted file mode 100644 index 8c3c14c..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/internal.h +++ /dev/null @@ -1,63 +0,0 @@ -/***************************************************************************/ -/* */ -/* internal.h */ -/* */ -/* Internal header files (specification only). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /*************************************************************************/ - /* */ - /* This file is automatically included by `ft2build.h'. */ - /* Do not include it manually! */ - /* */ - /*************************************************************************/ - - -#define FT_INTERNAL_OBJECTS_H <freetype/internal/ftobjs.h> -#define FT_INTERNAL_PIC_H <freetype/internal/ftpic.h> -#define FT_INTERNAL_STREAM_H <freetype/internal/ftstream.h> -#define FT_INTERNAL_MEMORY_H <freetype/internal/ftmemory.h> -#define FT_INTERNAL_DEBUG_H <freetype/internal/ftdebug.h> -#define FT_INTERNAL_CALC_H <freetype/internal/ftcalc.h> -#define FT_INTERNAL_HASH_H <freetype/internal/fthash.h> -#define FT_INTERNAL_DRIVER_H <freetype/internal/ftdriver.h> -#define FT_INTERNAL_TRACE_H <freetype/internal/fttrace.h> -#define FT_INTERNAL_GLYPH_LOADER_H <freetype/internal/ftgloadr.h> -#define FT_INTERNAL_SFNT_H <freetype/internal/sfnt.h> -#define FT_INTERNAL_SERVICE_H <freetype/internal/ftserv.h> -#define FT_INTERNAL_RFORK_H <freetype/internal/ftrfork.h> -#define FT_INTERNAL_VALIDATE_H <freetype/internal/ftvalid.h> - -#define FT_INTERNAL_TRUETYPE_TYPES_H <freetype/internal/tttypes.h> -#define FT_INTERNAL_TYPE1_TYPES_H <freetype/internal/t1types.h> - -#define FT_INTERNAL_POSTSCRIPT_AUX_H <freetype/internal/psaux.h> -#define FT_INTERNAL_POSTSCRIPT_HINTS_H <freetype/internal/pshints.h> - -#define FT_INTERNAL_AUTOHINT_H <freetype/internal/autohint.h> - - -#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */ - - /* We disable the warning `conditional expression is constant' here */ - /* in order to compile cleanly with the maximum level of warnings. */ - /* In particular, the warning complains about stuff like `while(0)' */ - /* which is very useful in macro definitions. There is no benefit */ - /* in having it enabled. */ -#pragma warning( disable : 4127 ) - -#endif /* _MSC_VER */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/psaux.h b/builddir/freetype-2.7.0/include/freetype/internal/psaux.h deleted file mode 100644 index 15dedfd..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/psaux.h +++ /dev/null @@ -1,879 +0,0 @@ -/***************************************************************************/ -/* */ -/* psaux.h */ -/* */ -/* Auxiliary functions and data structures related to PostScript fonts */ -/* (specification). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef PSAUX_H_ -#define PSAUX_H_ - - -#include <ft2build.h> -#include FT_INTERNAL_OBJECTS_H -#include FT_INTERNAL_TYPE1_TYPES_H -#include FT_INTERNAL_HASH_H -#include FT_SERVICE_POSTSCRIPT_CMAPS_H - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** T1_TABLE *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - - - typedef struct PS_TableRec_* PS_Table; - typedef const struct PS_Table_FuncsRec_* PS_Table_Funcs; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* PS_Table_FuncsRec */ - /* */ - /* <Description> */ - /* A set of function pointers to manage PS_Table objects. */ - /* */ - /* <Fields> */ - /* table_init :: Used to initialize a table. */ - /* */ - /* table_done :: Finalizes resp. destroy a given table. */ - /* */ - /* table_add :: Adds a new object to a table. */ - /* */ - /* table_release :: Releases table data, then finalizes it. */ - /* */ - typedef struct PS_Table_FuncsRec_ - { - FT_Error - (*init)( PS_Table table, - FT_Int count, - FT_Memory memory ); - - void - (*done)( PS_Table table ); - - FT_Error - (*add)( PS_Table table, - FT_Int idx, - void* object, - FT_UInt length ); - - void - (*release)( PS_Table table ); - - } PS_Table_FuncsRec; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* PS_TableRec */ - /* */ - /* <Description> */ - /* A PS_Table is a simple object used to store an array of objects in */ - /* a single memory block. */ - /* */ - /* <Fields> */ - /* block :: The address in memory of the growheap's block. This */ - /* can change between two object adds, due to */ - /* reallocation. */ - /* */ - /* cursor :: The current top of the grow heap within its block. */ - /* */ - /* capacity :: The current size of the heap block. Increments by */ - /* 1kByte chunks. */ - /* */ - /* init :: Set to 0xDEADBEEF if `elements' and `lengths' have */ - /* been allocated. */ - /* */ - /* max_elems :: The maximum number of elements in table. */ - /* */ - /* num_elems :: The current number of elements in table. */ - /* */ - /* elements :: A table of element addresses within the block. */ - /* */ - /* lengths :: A table of element sizes within the block. */ - /* */ - /* memory :: The object used for memory operations */ - /* (alloc/realloc). */ - /* */ - /* funcs :: A table of method pointers for this object. */ - /* */ - typedef struct PS_TableRec_ - { - FT_Byte* block; /* current memory block */ - FT_Offset cursor; /* current cursor in memory block */ - FT_Offset capacity; /* current size of memory block */ - FT_ULong init; - - FT_Int max_elems; - FT_Int num_elems; - FT_Byte** elements; /* addresses of table elements */ - FT_UInt* lengths; /* lengths of table elements */ - - FT_Memory memory; - PS_Table_FuncsRec funcs; - - } PS_TableRec; - - - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** T1 FIELDS & TOKENS *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - - typedef struct PS_ParserRec_* PS_Parser; - - typedef struct T1_TokenRec_* T1_Token; - - typedef struct T1_FieldRec_* T1_Field; - - - /* simple enumeration type used to identify token types */ - typedef enum T1_TokenType_ - { - T1_TOKEN_TYPE_NONE = 0, - T1_TOKEN_TYPE_ANY, - T1_TOKEN_TYPE_STRING, - T1_TOKEN_TYPE_ARRAY, - T1_TOKEN_TYPE_KEY, /* aka `name' */ - - /* do not remove */ - T1_TOKEN_TYPE_MAX - - } T1_TokenType; - - - /* a simple structure used to identify tokens */ - typedef struct T1_TokenRec_ - { - FT_Byte* start; /* first character of token in input stream */ - FT_Byte* limit; /* first character after the token */ - T1_TokenType type; /* type of token */ - - } T1_TokenRec; - - - /* enumeration type used to identify object fields */ - typedef enum T1_FieldType_ - { - T1_FIELD_TYPE_NONE = 0, - T1_FIELD_TYPE_BOOL, - T1_FIELD_TYPE_INTEGER, - T1_FIELD_TYPE_FIXED, - T1_FIELD_TYPE_FIXED_1000, - T1_FIELD_TYPE_STRING, - T1_FIELD_TYPE_KEY, - T1_FIELD_TYPE_BBOX, - T1_FIELD_TYPE_MM_BBOX, - T1_FIELD_TYPE_INTEGER_ARRAY, - T1_FIELD_TYPE_FIXED_ARRAY, - T1_FIELD_TYPE_CALLBACK, - - /* do not remove */ - T1_FIELD_TYPE_MAX - - } T1_FieldType; - - - typedef enum T1_FieldLocation_ - { - T1_FIELD_LOCATION_CID_INFO, - T1_FIELD_LOCATION_FONT_DICT, - T1_FIELD_LOCATION_FONT_EXTRA, - T1_FIELD_LOCATION_FONT_INFO, - T1_FIELD_LOCATION_PRIVATE, - T1_FIELD_LOCATION_BBOX, - T1_FIELD_LOCATION_LOADER, - T1_FIELD_LOCATION_FACE, - T1_FIELD_LOCATION_BLEND, - - /* do not remove */ - T1_FIELD_LOCATION_MAX - - } T1_FieldLocation; - - - typedef void - (*T1_Field_ParseFunc)( FT_Face face, - FT_Pointer parser ); - - - /* structure type used to model object fields */ - typedef struct T1_FieldRec_ - { - const char* ident; /* field identifier */ - T1_FieldLocation location; - T1_FieldType type; /* type of field */ - T1_Field_ParseFunc reader; - FT_UInt offset; /* offset of field in object */ - FT_Byte size; /* size of field in bytes */ - FT_UInt array_max; /* maximum number of elements for */ - /* array */ - FT_UInt count_offset; /* offset of element count for */ - /* arrays; must not be zero if in */ - /* use -- in other words, a */ - /* `num_FOO' element must not */ - /* start the used structure if we */ - /* parse a `FOO' array */ - FT_UInt dict; /* where we expect it */ - } T1_FieldRec; - -#define T1_FIELD_DICT_FONTDICT ( 1 << 0 ) /* also FontInfo and FDArray */ -#define T1_FIELD_DICT_PRIVATE ( 1 << 1 ) - - - -#define T1_NEW_SIMPLE_FIELD( _ident, _type, _fname, _dict ) \ - { \ - _ident, T1CODE, _type, \ - 0, \ - FT_FIELD_OFFSET( _fname ), \ - FT_FIELD_SIZE( _fname ), \ - 0, 0, \ - _dict \ - }, - -#define T1_NEW_CALLBACK_FIELD( _ident, _reader, _dict ) \ - { \ - _ident, T1CODE, T1_FIELD_TYPE_CALLBACK, \ - (T1_Field_ParseFunc)_reader, \ - 0, 0, \ - 0, 0, \ - _dict \ - }, - -#define T1_NEW_TABLE_FIELD( _ident, _type, _fname, _max, _dict ) \ - { \ - _ident, T1CODE, _type, \ - 0, \ - FT_FIELD_OFFSET( _fname ), \ - FT_FIELD_SIZE_DELTA( _fname ), \ - _max, \ - FT_FIELD_OFFSET( num_ ## _fname ), \ - _dict \ - }, - -#define T1_NEW_TABLE_FIELD2( _ident, _type, _fname, _max, _dict ) \ - { \ - _ident, T1CODE, _type, \ - 0, \ - FT_FIELD_OFFSET( _fname ), \ - FT_FIELD_SIZE_DELTA( _fname ), \ - _max, 0, \ - _dict \ - }, - - -#define T1_FIELD_BOOL( _ident, _fname, _dict ) \ - T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BOOL, _fname, _dict ) - -#define T1_FIELD_NUM( _ident, _fname, _dict ) \ - T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER, _fname, _dict ) - -#define T1_FIELD_FIXED( _ident, _fname, _dict ) \ - T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED, _fname, _dict ) - -#define T1_FIELD_FIXED_1000( _ident, _fname, _dict ) \ - T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_1000, _fname, \ - _dict ) - -#define T1_FIELD_STRING( _ident, _fname, _dict ) \ - T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_STRING, _fname, _dict ) - -#define T1_FIELD_KEY( _ident, _fname, _dict ) \ - T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_KEY, _fname, _dict ) - -#define T1_FIELD_BBOX( _ident, _fname, _dict ) \ - T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BBOX, _fname, _dict ) - - -#define T1_FIELD_NUM_TABLE( _ident, _fname, _fmax, _dict ) \ - T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \ - _fname, _fmax, _dict ) - -#define T1_FIELD_FIXED_TABLE( _ident, _fname, _fmax, _dict ) \ - T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \ - _fname, _fmax, _dict ) - -#define T1_FIELD_NUM_TABLE2( _ident, _fname, _fmax, _dict ) \ - T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \ - _fname, _fmax, _dict ) - -#define T1_FIELD_FIXED_TABLE2( _ident, _fname, _fmax, _dict ) \ - T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \ - _fname, _fmax, _dict ) - -#define T1_FIELD_CALLBACK( _ident, _name, _dict ) \ - T1_NEW_CALLBACK_FIELD( _ident, _name, _dict ) - - - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** T1 PARSER *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - - typedef const struct PS_Parser_FuncsRec_* PS_Parser_Funcs; - - typedef struct PS_Parser_FuncsRec_ - { - void - (*init)( PS_Parser parser, - FT_Byte* base, - FT_Byte* limit, - FT_Memory memory ); - - void - (*done)( PS_Parser parser ); - - void - (*skip_spaces)( PS_Parser parser ); - void - (*skip_PS_token)( PS_Parser parser ); - - FT_Long - (*to_int)( PS_Parser parser ); - FT_Fixed - (*to_fixed)( PS_Parser parser, - FT_Int power_ten ); - - FT_Error - (*to_bytes)( PS_Parser parser, - FT_Byte* bytes, - FT_Offset max_bytes, - FT_ULong* pnum_bytes, - FT_Bool delimiters ); - - FT_Int - (*to_coord_array)( PS_Parser parser, - FT_Int max_coords, - FT_Short* coords ); - FT_Int - (*to_fixed_array)( PS_Parser parser, - FT_Int max_values, - FT_Fixed* values, - FT_Int power_ten ); - - void - (*to_token)( PS_Parser parser, - T1_Token token ); - void - (*to_token_array)( PS_Parser parser, - T1_Token tokens, - FT_UInt max_tokens, - FT_Int* pnum_tokens ); - - FT_Error - (*load_field)( PS_Parser parser, - const T1_Field field, - void** objects, - FT_UInt max_objects, - FT_ULong* pflags ); - - FT_Error - (*load_field_table)( PS_Parser parser, - const T1_Field field, - void** objects, - FT_UInt max_objects, - FT_ULong* pflags ); - - } PS_Parser_FuncsRec; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* PS_ParserRec */ - /* */ - /* <Description> */ - /* A PS_Parser is an object used to parse a Type 1 font very quickly. */ - /* */ - /* <Fields> */ - /* cursor :: The current position in the text. */ - /* */ - /* base :: Start of the processed text. */ - /* */ - /* limit :: End of the processed text. */ - /* */ - /* error :: The last error returned. */ - /* */ - /* memory :: The object used for memory operations (alloc/realloc). */ - /* */ - /* funcs :: A table of functions for the parser. */ - /* */ - typedef struct PS_ParserRec_ - { - FT_Byte* cursor; - FT_Byte* base; - FT_Byte* limit; - FT_Error error; - FT_Memory memory; - - PS_Parser_FuncsRec funcs; - - } PS_ParserRec; - - - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** T1 BUILDER *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - - - typedef struct T1_BuilderRec_* T1_Builder; - - - typedef FT_Error - (*T1_Builder_Check_Points_Func)( T1_Builder builder, - FT_Int count ); - - typedef void - (*T1_Builder_Add_Point_Func)( T1_Builder builder, - FT_Pos x, - FT_Pos y, - FT_Byte flag ); - - typedef FT_Error - (*T1_Builder_Add_Point1_Func)( T1_Builder builder, - FT_Pos x, - FT_Pos y ); - - typedef FT_Error - (*T1_Builder_Add_Contour_Func)( T1_Builder builder ); - - typedef FT_Error - (*T1_Builder_Start_Point_Func)( T1_Builder builder, - FT_Pos x, - FT_Pos y ); - - typedef void - (*T1_Builder_Close_Contour_Func)( T1_Builder builder ); - - - typedef const struct T1_Builder_FuncsRec_* T1_Builder_Funcs; - - typedef struct T1_Builder_FuncsRec_ - { - void - (*init)( T1_Builder builder, - FT_Face face, - FT_Size size, - FT_GlyphSlot slot, - FT_Bool hinting ); - - void - (*done)( T1_Builder builder ); - - T1_Builder_Check_Points_Func check_points; - T1_Builder_Add_Point_Func add_point; - T1_Builder_Add_Point1_Func add_point1; - T1_Builder_Add_Contour_Func add_contour; - T1_Builder_Start_Point_Func start_point; - T1_Builder_Close_Contour_Func close_contour; - - } T1_Builder_FuncsRec; - - - /* an enumeration type to handle charstring parsing states */ - typedef enum T1_ParseState_ - { - T1_Parse_Start, - T1_Parse_Have_Width, - T1_Parse_Have_Moveto, - T1_Parse_Have_Path - - } T1_ParseState; - - - /*************************************************************************/ - /* */ - /* <Structure> */ - /* T1_BuilderRec */ - /* */ - /* <Description> */ - /* A structure used during glyph loading to store its outline. */ - /* */ - /* <Fields> */ - /* memory :: The current memory object. */ - /* */ - /* face :: The current face object. */ - /* */ - /* glyph :: The current glyph slot. */ - /* */ - /* loader :: XXX */ - /* */ - /* base :: The base glyph outline. */ - /* */ - /* current :: The current glyph outline. */ - /* */ - /* max_points :: maximum points in builder outline */ - /* */ - /* max_contours :: Maximum number of contours in builder outline. */ - /* */ - /* pos_x :: The horizontal translation (if composite glyph). */ - /* */ - /* pos_y :: The vertical translation (if composite glyph). */ - /* */ - /* left_bearing :: The left side bearing point. */ - /* */ - /* advance :: The horizontal advance vector. */ - /* */ - /* bbox :: Unused. */ - /* */ - /* parse_state :: An enumeration which controls the charstring */ - /* parsing state. */ - /* */ - /* load_points :: If this flag is not set, no points are loaded. */ - /* */ - /* no_recurse :: Set but not used. */ - /* */ - /* metrics_only :: A boolean indicating that we only want to compute */ - /* the metrics of a given glyph, not load all of its */ - /* points. */ - /* */ - /* funcs :: An array of function pointers for the builder. */ - /* */ - typedef struct T1_BuilderRec_ - { - FT_Memory memory; - FT_Face face; - FT_GlyphSlot glyph; - FT_GlyphLoader loader; - FT_Outline* base; - FT_Outline* current; - - FT_Pos pos_x; - FT_Pos pos_y; - - FT_Vector left_bearing; - FT_Vector advance; - - FT_BBox bbox; /* bounding box */ - T1_ParseState parse_state; - FT_Bool load_points; - FT_Bool no_recurse; - - FT_Bool metrics_only; - - void* hints_funcs; /* hinter-specific */ - void* hints_globals; /* hinter-specific */ - - T1_Builder_FuncsRec funcs; - - } T1_BuilderRec; - - - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** T1 DECODER *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - -#if 0 - - /*************************************************************************/ - /* */ - /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */ - /* calls during glyph loading. */ - /* */ -#define T1_MAX_SUBRS_CALLS 8 - - - /*************************************************************************/ - /* */ - /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A */ - /* minimum of 16 is required. */ - /* */ -#define T1_MAX_CHARSTRINGS_OPERANDS 32 - -#endif /* 0 */ - - - typedef struct T1_Decoder_ZoneRec_ - { - FT_Byte* cursor; - FT_Byte* base; - FT_Byte* limit; - - } T1_Decoder_ZoneRec, *T1_Decoder_Zone; - - - typedef struct T1_DecoderRec_* T1_Decoder; - typedef const struct T1_Decoder_FuncsRec_* T1_Decoder_Funcs; - - - typedef FT_Error - (*T1_Decoder_Callback)( T1_Decoder decoder, - FT_UInt glyph_index ); - - - typedef struct T1_Decoder_FuncsRec_ - { - FT_Error - (*init)( T1_Decoder decoder, - FT_Face face, - FT_Size size, - FT_GlyphSlot slot, - FT_Byte** glyph_names, - PS_Blend blend, - FT_Bool hinting, - FT_Render_Mode hint_mode, - T1_Decoder_Callback callback ); - - void - (*done)( T1_Decoder decoder ); - - FT_Error - (*parse_charstrings)( T1_Decoder decoder, - FT_Byte* base, - FT_UInt len ); - - } T1_Decoder_FuncsRec; - - - typedef struct T1_DecoderRec_ - { - T1_BuilderRec builder; - - FT_Long stack[T1_MAX_CHARSTRINGS_OPERANDS]; - FT_Long* top; - - T1_Decoder_ZoneRec zones[T1_MAX_SUBRS_CALLS + 1]; - T1_Decoder_Zone zone; - - FT_Service_PsCMaps psnames; /* for seac */ - FT_UInt num_glyphs; - FT_Byte** glyph_names; - - FT_Int lenIV; /* internal for sub routine calls */ - FT_Int num_subrs; - FT_Byte** subrs; - FT_UInt* subrs_len; /* array of subrs length (optional) */ - FT_Hash subrs_hash; /* used if `num_subrs' was massaged */ - - FT_Matrix font_matrix; - FT_Vector font_offset; - - FT_Int flex_state; - FT_Int num_flex_vectors; - FT_Vector flex_vectors[7]; - - PS_Blend blend; /* for multiple master support */ - - FT_Render_Mode hint_mode; - - T1_Decoder_Callback parse_callback; - T1_Decoder_FuncsRec funcs; - - FT_Long* buildchar; - FT_UInt len_buildchar; - - FT_Bool seac; - - } T1_DecoderRec; - - - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** AFM PARSER *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - - typedef struct AFM_ParserRec_* AFM_Parser; - - typedef struct AFM_Parser_FuncsRec_ - { - FT_Error - (*init)( AFM_Parser parser, - FT_Memory memory, - FT_Byte* base, - FT_Byte* limit ); - - void - (*done)( AFM_Parser parser ); - - FT_Error - (*parse)( AFM_Parser parser ); - - } AFM_Parser_FuncsRec; - - - typedef struct AFM_StreamRec_* AFM_Stream; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* AFM_ParserRec */ - /* */ - /* <Description> */ - /* An AFM_Parser is a parser for the AFM files. */ - /* */ - /* <Fields> */ - /* memory :: The object used for memory operations (alloc and */ - /* realloc). */ - /* */ - /* stream :: This is an opaque object. */ - /* */ - /* FontInfo :: The result will be stored here. */ - /* */ - /* get_index :: A user provided function to get a glyph index by its */ - /* name. */ - /* */ - typedef struct AFM_ParserRec_ - { - FT_Memory memory; - AFM_Stream stream; - - AFM_FontInfo FontInfo; - - FT_Int - (*get_index)( const char* name, - FT_Offset len, - void* user_data ); - - void* user_data; - - } AFM_ParserRec; - - - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** TYPE1 CHARMAPS *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - - typedef const struct T1_CMap_ClassesRec_* T1_CMap_Classes; - - typedef struct T1_CMap_ClassesRec_ - { - FT_CMap_Class standard; - FT_CMap_Class expert; - FT_CMap_Class custom; - FT_CMap_Class unicode; - - } T1_CMap_ClassesRec; - - - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** PSAux Module Interface *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - - typedef struct PSAux_ServiceRec_ - { - /* don't use `PS_Table_Funcs' and friends to avoid compiler warnings */ - const PS_Table_FuncsRec* ps_table_funcs; - const PS_Parser_FuncsRec* ps_parser_funcs; - const T1_Builder_FuncsRec* t1_builder_funcs; - const T1_Decoder_FuncsRec* t1_decoder_funcs; - - void - (*t1_decrypt)( FT_Byte* buffer, - FT_Offset length, - FT_UShort seed ); - - T1_CMap_Classes t1_cmap_classes; - - /* fields after this comment line were added after version 2.1.10 */ - const AFM_Parser_FuncsRec* afm_parser_funcs; - - } PSAux_ServiceRec, *PSAux_Service; - - /* backwards-compatible type definition */ - typedef PSAux_ServiceRec PSAux_Interface; - - - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** Some convenience functions *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - -#define IS_PS_NEWLINE( ch ) \ - ( (ch) == '\r' || \ - (ch) == '\n' ) - -#define IS_PS_SPACE( ch ) \ - ( (ch) == ' ' || \ - IS_PS_NEWLINE( ch ) || \ - (ch) == '\t' || \ - (ch) == '\f' || \ - (ch) == '\0' ) - -#define IS_PS_SPECIAL( ch ) \ - ( (ch) == '/' || \ - (ch) == '(' || (ch) == ')' || \ - (ch) == '<' || (ch) == '>' || \ - (ch) == '[' || (ch) == ']' || \ - (ch) == '{' || (ch) == '}' || \ - (ch) == '%' ) - -#define IS_PS_DELIM( ch ) \ - ( IS_PS_SPACE( ch ) || \ - IS_PS_SPECIAL( ch ) ) - -#define IS_PS_DIGIT( ch ) \ - ( (ch) >= '0' && (ch) <= '9' ) - -#define IS_PS_XDIGIT( ch ) \ - ( IS_PS_DIGIT( ch ) || \ - ( (ch) >= 'A' && (ch) <= 'F' ) || \ - ( (ch) >= 'a' && (ch) <= 'f' ) ) - -#define IS_PS_BASE85( ch ) \ - ( (ch) >= '!' && (ch) <= 'u' ) - -#define IS_PS_TOKEN( cur, limit, token ) \ - ( (char)(cur)[0] == (token)[0] && \ - ( (cur) + sizeof ( (token) ) == (limit) || \ - ( (cur) + sizeof( (token) ) < (limit) && \ - IS_PS_DELIM( (cur)[sizeof ( (token) ) - 1] ) ) ) && \ - ft_strncmp( (char*)(cur), (token), sizeof ( (token) ) - 1 ) == 0 ) - - -FT_END_HEADER - -#endif /* PSAUX_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/pshints.h b/builddir/freetype-2.7.0/include/freetype/internal/pshints.h deleted file mode 100644 index e60dc9c..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/pshints.h +++ /dev/null @@ -1,722 +0,0 @@ -/***************************************************************************/ -/* */ -/* pshints.h */ -/* */ -/* Interface to Postscript-specific (Type 1 and Type 2) hints */ -/* recorders (specification only). These are used to support native */ -/* T1/T2 hints in the `type1', `cid', and `cff' font drivers. */ -/* */ -/* Copyright 2001-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef PSHINTS_H_ -#define PSHINTS_H_ - - -#include <ft2build.h> -#include FT_FREETYPE_H -#include FT_TYPE1_TABLES_H - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** INTERNAL REPRESENTATION OF GLOBALS *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - - typedef struct PSH_GlobalsRec_* PSH_Globals; - - typedef FT_Error - (*PSH_Globals_NewFunc)( FT_Memory memory, - T1_Private* private_dict, - PSH_Globals* aglobals ); - - typedef void - (*PSH_Globals_SetScaleFunc)( PSH_Globals globals, - FT_Fixed x_scale, - FT_Fixed y_scale, - FT_Fixed x_delta, - FT_Fixed y_delta ); - - typedef void - (*PSH_Globals_DestroyFunc)( PSH_Globals globals ); - - - typedef struct PSH_Globals_FuncsRec_ - { - PSH_Globals_NewFunc create; - PSH_Globals_SetScaleFunc set_scale; - PSH_Globals_DestroyFunc destroy; - - } PSH_Globals_FuncsRec, *PSH_Globals_Funcs; - - - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** PUBLIC TYPE 1 HINTS RECORDER *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - - /************************************************************************* - * - * @type: - * T1_Hints - * - * @description: - * This is a handle to an opaque structure used to record glyph hints - * from a Type 1 character glyph character string. - * - * The methods used to operate on this object are defined by the - * @T1_Hints_FuncsRec structure. Recording glyph hints is normally - * achieved through the following scheme: - * - * - Open a new hint recording session by calling the `open' method. - * This rewinds the recorder and prepare it for new input. - * - * - For each hint found in the glyph charstring, call the corresponding - * method (`stem', `stem3', or `reset'). Note that these functions do - * not return an error code. - * - * - Close the recording session by calling the `close' method. It - * returns an error code if the hints were invalid or something - * strange happened (e.g., memory shortage). - * - * The hints accumulated in the object can later be used by the - * PostScript hinter. - * - */ - typedef struct T1_HintsRec_* T1_Hints; - - - /************************************************************************* - * - * @type: - * T1_Hints_Funcs - * - * @description: - * A pointer to the @T1_Hints_FuncsRec structure that defines the API of - * a given @T1_Hints object. - * - */ - typedef const struct T1_Hints_FuncsRec_* T1_Hints_Funcs; - - - /************************************************************************* - * - * @functype: - * T1_Hints_OpenFunc - * - * @description: - * A method of the @T1_Hints class used to prepare it for a new Type 1 - * hints recording session. - * - * @input: - * hints :: - * A handle to the Type 1 hints recorder. - * - * @note: - * You should always call the @T1_Hints_CloseFunc method in order to - * close an opened recording session. - * - */ - typedef void - (*T1_Hints_OpenFunc)( T1_Hints hints ); - - - /************************************************************************* - * - * @functype: - * T1_Hints_SetStemFunc - * - * @description: - * A method of the @T1_Hints class used to record a new horizontal or - * vertical stem. This corresponds to the Type 1 `hstem' and `vstem' - * operators. - * - * @input: - * hints :: - * A handle to the Type 1 hints recorder. - * - * dimension :: - * 0 for horizontal stems (hstem), 1 for vertical ones (vstem). - * - * coords :: - * Array of 2 coordinates in 16.16 format, used as (position,length) - * stem descriptor. - * - * @note: - * Use vertical coordinates (y) for horizontal stems (dim=0). Use - * horizontal coordinates (x) for vertical stems (dim=1). - * - * `coords[0]' is the absolute stem position (lowest coordinate); - * `coords[1]' is the length. - * - * The length can be negative, in which case it must be either -20 or - * -21. It is interpreted as a `ghost' stem, according to the Type 1 - * specification. - * - * If the length is -21 (corresponding to a bottom ghost stem), then - * the real stem position is `coords[0]+coords[1]'. - * - */ - typedef void - (*T1_Hints_SetStemFunc)( T1_Hints hints, - FT_UInt dimension, - FT_Fixed* coords ); - - - /************************************************************************* - * - * @functype: - * T1_Hints_SetStem3Func - * - * @description: - * A method of the @T1_Hints class used to record three - * counter-controlled horizontal or vertical stems at once. - * - * @input: - * hints :: - * A handle to the Type 1 hints recorder. - * - * dimension :: - * 0 for horizontal stems, 1 for vertical ones. - * - * coords :: - * An array of 6 values in 16.16 format, holding 3 (position,length) - * pairs for the counter-controlled stems. - * - * @note: - * Use vertical coordinates (y) for horizontal stems (dim=0). Use - * horizontal coordinates (x) for vertical stems (dim=1). - * - * The lengths cannot be negative (ghost stems are never - * counter-controlled). - * - */ - typedef void - (*T1_Hints_SetStem3Func)( T1_Hints hints, - FT_UInt dimension, - FT_Fixed* coords ); - - - /************************************************************************* - * - * @functype: - * T1_Hints_ResetFunc - * - * @description: - * A method of the @T1_Hints class used to reset the stems hints in a - * recording session. - * - * @input: - * hints :: - * A handle to the Type 1 hints recorder. - * - * end_point :: - * The index of the last point in the input glyph in which the - * previously defined hints apply. - * - */ - typedef void - (*T1_Hints_ResetFunc)( T1_Hints hints, - FT_UInt end_point ); - - - /************************************************************************* - * - * @functype: - * T1_Hints_CloseFunc - * - * @description: - * A method of the @T1_Hints class used to close a hint recording - * session. - * - * @input: - * hints :: - * A handle to the Type 1 hints recorder. - * - * end_point :: - * The index of the last point in the input glyph. - * - * @return: - * FreeType error code. 0 means success. - * - * @note: - * The error code is set to indicate that an error occurred during the - * recording session. - * - */ - typedef FT_Error - (*T1_Hints_CloseFunc)( T1_Hints hints, - FT_UInt end_point ); - - - /************************************************************************* - * - * @functype: - * T1_Hints_ApplyFunc - * - * @description: - * A method of the @T1_Hints class used to apply hints to the - * corresponding glyph outline. Must be called once all hints have been - * recorded. - * - * @input: - * hints :: - * A handle to the Type 1 hints recorder. - * - * outline :: - * A pointer to the target outline descriptor. - * - * globals :: - * The hinter globals for this font. - * - * hint_mode :: - * Hinting information. - * - * @return: - * FreeType error code. 0 means success. - * - * @note: - * On input, all points within the outline are in font coordinates. On - * output, they are in 1/64th of pixels. - * - * The scaling transformation is taken from the `globals' object which - * must correspond to the same font as the glyph. - * - */ - typedef FT_Error - (*T1_Hints_ApplyFunc)( T1_Hints hints, - FT_Outline* outline, - PSH_Globals globals, - FT_Render_Mode hint_mode ); - - - /************************************************************************* - * - * @struct: - * T1_Hints_FuncsRec - * - * @description: - * The structure used to provide the API to @T1_Hints objects. - * - * @fields: - * hints :: - * A handle to the T1 Hints recorder. - * - * open :: - * The function to open a recording session. - * - * close :: - * The function to close a recording session. - * - * stem :: - * The function to set a simple stem. - * - * stem3 :: - * The function to set counter-controlled stems. - * - * reset :: - * The function to reset stem hints. - * - * apply :: - * The function to apply the hints to the corresponding glyph outline. - * - */ - typedef struct T1_Hints_FuncsRec_ - { - T1_Hints hints; - T1_Hints_OpenFunc open; - T1_Hints_CloseFunc close; - T1_Hints_SetStemFunc stem; - T1_Hints_SetStem3Func stem3; - T1_Hints_ResetFunc reset; - T1_Hints_ApplyFunc apply; - - } T1_Hints_FuncsRec; - - - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** PUBLIC TYPE 2 HINTS RECORDER *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - - /************************************************************************* - * - * @type: - * T2_Hints - * - * @description: - * This is a handle to an opaque structure used to record glyph hints - * from a Type 2 character glyph character string. - * - * The methods used to operate on this object are defined by the - * @T2_Hints_FuncsRec structure. Recording glyph hints is normally - * achieved through the following scheme: - * - * - Open a new hint recording session by calling the `open' method. - * This rewinds the recorder and prepare it for new input. - * - * - For each hint found in the glyph charstring, call the corresponding - * method (`stems', `hintmask', `counters'). Note that these - * functions do not return an error code. - * - * - Close the recording session by calling the `close' method. It - * returns an error code if the hints were invalid or something - * strange happened (e.g., memory shortage). - * - * The hints accumulated in the object can later be used by the - * Postscript hinter. - * - */ - typedef struct T2_HintsRec_* T2_Hints; - - - /************************************************************************* - * - * @type: - * T2_Hints_Funcs - * - * @description: - * A pointer to the @T2_Hints_FuncsRec structure that defines the API of - * a given @T2_Hints object. - * - */ - typedef const struct T2_Hints_FuncsRec_* T2_Hints_Funcs; - - - /************************************************************************* - * - * @functype: - * T2_Hints_OpenFunc - * - * @description: - * A method of the @T2_Hints class used to prepare it for a new Type 2 - * hints recording session. - * - * @input: - * hints :: - * A handle to the Type 2 hints recorder. - * - * @note: - * You should always call the @T2_Hints_CloseFunc method in order to - * close an opened recording session. - * - */ - typedef void - (*T2_Hints_OpenFunc)( T2_Hints hints ); - - - /************************************************************************* - * - * @functype: - * T2_Hints_StemsFunc - * - * @description: - * A method of the @T2_Hints class used to set the table of stems in - * either the vertical or horizontal dimension. Equivalent to the - * `hstem', `vstem', `hstemhm', and `vstemhm' Type 2 operators. - * - * @input: - * hints :: - * A handle to the Type 2 hints recorder. - * - * dimension :: - * 0 for horizontal stems (hstem), 1 for vertical ones (vstem). - * - * count :: - * The number of stems. - * - * coords :: - * An array of `count' (position,length) pairs in 16.16 format. - * - * @note: - * Use vertical coordinates (y) for horizontal stems (dim=0). Use - * horizontal coordinates (x) for vertical stems (dim=1). - * - * There are `2*count' elements in the `coords' array. Each even - * element is an absolute position in font units, each odd element is a - * length in font units. - * - * A length can be negative, in which case it must be either -20 or - * -21. It is interpreted as a `ghost' stem, according to the Type 1 - * specification. - * - */ - typedef void - (*T2_Hints_StemsFunc)( T2_Hints hints, - FT_UInt dimension, - FT_Int count, - FT_Fixed* coordinates ); - - - /************************************************************************* - * - * @functype: - * T2_Hints_MaskFunc - * - * @description: - * A method of the @T2_Hints class used to set a given hintmask (this - * corresponds to the `hintmask' Type 2 operator). - * - * @input: - * hints :: - * A handle to the Type 2 hints recorder. - * - * end_point :: - * The glyph index of the last point to which the previously defined - * or activated hints apply. - * - * bit_count :: - * The number of bits in the hint mask. - * - * bytes :: - * An array of bytes modelling the hint mask. - * - * @note: - * If the hintmask starts the charstring (before any glyph point - * definition), the value of `end_point' should be 0. - * - * `bit_count' is the number of meaningful bits in the `bytes' array; it - * must be equal to the total number of hints defined so far (i.e., - * horizontal+verticals). - * - * The `bytes' array can come directly from the Type 2 charstring and - * respects the same format. - * - */ - typedef void - (*T2_Hints_MaskFunc)( T2_Hints hints, - FT_UInt end_point, - FT_UInt bit_count, - const FT_Byte* bytes ); - - - /************************************************************************* - * - * @functype: - * T2_Hints_CounterFunc - * - * @description: - * A method of the @T2_Hints class used to set a given counter mask - * (this corresponds to the `hintmask' Type 2 operator). - * - * @input: - * hints :: - * A handle to the Type 2 hints recorder. - * - * end_point :: - * A glyph index of the last point to which the previously defined or - * active hints apply. - * - * bit_count :: - * The number of bits in the hint mask. - * - * bytes :: - * An array of bytes modelling the hint mask. - * - * @note: - * If the hintmask starts the charstring (before any glyph point - * definition), the value of `end_point' should be 0. - * - * `bit_count' is the number of meaningful bits in the `bytes' array; it - * must be equal to the total number of hints defined so far (i.e., - * horizontal+verticals). - * - * The `bytes' array can come directly from the Type 2 charstring and - * respects the same format. - * - */ - typedef void - (*T2_Hints_CounterFunc)( T2_Hints hints, - FT_UInt bit_count, - const FT_Byte* bytes ); - - - /************************************************************************* - * - * @functype: - * T2_Hints_CloseFunc - * - * @description: - * A method of the @T2_Hints class used to close a hint recording - * session. - * - * @input: - * hints :: - * A handle to the Type 2 hints recorder. - * - * end_point :: - * The index of the last point in the input glyph. - * - * @return: - * FreeType error code. 0 means success. - * - * @note: - * The error code is set to indicate that an error occurred during the - * recording session. - * - */ - typedef FT_Error - (*T2_Hints_CloseFunc)( T2_Hints hints, - FT_UInt end_point ); - - - /************************************************************************* - * - * @functype: - * T2_Hints_ApplyFunc - * - * @description: - * A method of the @T2_Hints class used to apply hints to the - * corresponding glyph outline. Must be called after the `close' - * method. - * - * @input: - * hints :: - * A handle to the Type 2 hints recorder. - * - * outline :: - * A pointer to the target outline descriptor. - * - * globals :: - * The hinter globals for this font. - * - * hint_mode :: - * Hinting information. - * - * @return: - * FreeType error code. 0 means success. - * - * @note: - * On input, all points within the outline are in font coordinates. On - * output, they are in 1/64th of pixels. - * - * The scaling transformation is taken from the `globals' object which - * must correspond to the same font than the glyph. - * - */ - typedef FT_Error - (*T2_Hints_ApplyFunc)( T2_Hints hints, - FT_Outline* outline, - PSH_Globals globals, - FT_Render_Mode hint_mode ); - - - /************************************************************************* - * - * @struct: - * T2_Hints_FuncsRec - * - * @description: - * The structure used to provide the API to @T2_Hints objects. - * - * @fields: - * hints :: - * A handle to the T2 hints recorder object. - * - * open :: - * The function to open a recording session. - * - * close :: - * The function to close a recording session. - * - * stems :: - * The function to set the dimension's stems table. - * - * hintmask :: - * The function to set hint masks. - * - * counter :: - * The function to set counter masks. - * - * apply :: - * The function to apply the hints on the corresponding glyph outline. - * - */ - typedef struct T2_Hints_FuncsRec_ - { - T2_Hints hints; - T2_Hints_OpenFunc open; - T2_Hints_CloseFunc close; - T2_Hints_StemsFunc stems; - T2_Hints_MaskFunc hintmask; - T2_Hints_CounterFunc counter; - T2_Hints_ApplyFunc apply; - - } T2_Hints_FuncsRec; - - - /* */ - - - typedef struct PSHinter_Interface_ - { - PSH_Globals_Funcs (*get_globals_funcs)( FT_Module module ); - T1_Hints_Funcs (*get_t1_funcs) ( FT_Module module ); - T2_Hints_Funcs (*get_t2_funcs) ( FT_Module module ); - - } PSHinter_Interface; - - typedef PSHinter_Interface* PSHinter_Service; - - -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DEFINE_PSHINTER_INTERFACE( \ - class_, \ - get_globals_funcs_, \ - get_t1_funcs_, \ - get_t2_funcs_ ) \ - static const PSHinter_Interface class_ = \ - { \ - get_globals_funcs_, \ - get_t1_funcs_, \ - get_t2_funcs_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_PSHINTER_INTERFACE( \ - class_, \ - get_globals_funcs_, \ - get_t1_funcs_, \ - get_t2_funcs_ ) \ - void \ - FT_Init_Class_ ## class_( FT_Library library, \ - PSHinter_Interface* clazz ) \ - { \ - FT_UNUSED( library ); \ - \ - clazz->get_globals_funcs = get_globals_funcs_; \ - clazz->get_t1_funcs = get_t1_funcs_; \ - clazz->get_t2_funcs = get_t2_funcs_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - -FT_END_HEADER - -#endif /* PSHINTS_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/services/svbdf.h b/builddir/freetype-2.7.0/include/freetype/internal/services/svbdf.h deleted file mode 100644 index c24475f..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/services/svbdf.h +++ /dev/null @@ -1,82 +0,0 @@ -/***************************************************************************/ -/* */ -/* svbdf.h */ -/* */ -/* The FreeType BDF services (specification). */ -/* */ -/* Copyright 2003-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef SVBDF_H_ -#define SVBDF_H_ - -#include FT_BDF_H -#include FT_INTERNAL_SERVICE_H - - -FT_BEGIN_HEADER - - -#define FT_SERVICE_ID_BDF "bdf" - - typedef FT_Error - (*FT_BDF_GetCharsetIdFunc)( FT_Face face, - const char* *acharset_encoding, - const char* *acharset_registry ); - - typedef FT_Error - (*FT_BDF_GetPropertyFunc)( FT_Face face, - const char* prop_name, - BDF_PropertyRec *aproperty ); - - - FT_DEFINE_SERVICE( BDF ) - { - FT_BDF_GetCharsetIdFunc get_charset_id; - FT_BDF_GetPropertyFunc get_property; - }; - - -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DEFINE_SERVICE_BDFRec( class_, \ - get_charset_id_, \ - get_property_ ) \ - static const FT_Service_BDFRec class_ = \ - { \ - get_charset_id_, get_property_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_SERVICE_BDFRec( class_, \ - get_charset_id_, \ - get_property_ ) \ - void \ - FT_Init_Class_ ## class_( FT_Service_BDFRec* clazz ) \ - { \ - clazz->get_charset_id = get_charset_id_; \ - clazz->get_property = get_property_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - - /* */ - - -FT_END_HEADER - - -#endif /* SVBDF_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/services/svcid.h b/builddir/freetype-2.7.0/include/freetype/internal/services/svcid.h deleted file mode 100644 index dbbe604..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/services/svcid.h +++ /dev/null @@ -1,90 +0,0 @@ -/***************************************************************************/ -/* */ -/* svcid.h */ -/* */ -/* The FreeType CID font services (specification). */ -/* */ -/* Copyright 2007-2016 by */ -/* Derek Clegg and Michael Toftdal. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef SVCID_H_ -#define SVCID_H_ - -#include FT_INTERNAL_SERVICE_H - - -FT_BEGIN_HEADER - - -#define FT_SERVICE_ID_CID "CID" - - typedef FT_Error - (*FT_CID_GetRegistryOrderingSupplementFunc)( FT_Face face, - const char* *registry, - const char* *ordering, - FT_Int *supplement ); - typedef FT_Error - (*FT_CID_GetIsInternallyCIDKeyedFunc)( FT_Face face, - FT_Bool *is_cid ); - typedef FT_Error - (*FT_CID_GetCIDFromGlyphIndexFunc)( FT_Face face, - FT_UInt glyph_index, - FT_UInt *cid ); - - FT_DEFINE_SERVICE( CID ) - { - FT_CID_GetRegistryOrderingSupplementFunc get_ros; - FT_CID_GetIsInternallyCIDKeyedFunc get_is_cid; - FT_CID_GetCIDFromGlyphIndexFunc get_cid_from_glyph_index; - }; - - -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DEFINE_SERVICE_CIDREC( class_, \ - get_ros_, \ - get_is_cid_, \ - get_cid_from_glyph_index_ ) \ - static const FT_Service_CIDRec class_ = \ - { \ - get_ros_, get_is_cid_, get_cid_from_glyph_index_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_SERVICE_CIDREC( class_, \ - get_ros_, \ - get_is_cid_, \ - get_cid_from_glyph_index_ ) \ - void \ - FT_Init_Class_ ## class_( FT_Library library, \ - FT_Service_CIDRec* clazz ) \ - { \ - FT_UNUSED( library ); \ - \ - clazz->get_ros = get_ros_; \ - clazz->get_is_cid = get_is_cid_; \ - clazz->get_cid_from_glyph_index = get_cid_from_glyph_index_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - - /* */ - - -FT_END_HEADER - - -#endif /* SVCID_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/services/svfntfmt.h b/builddir/freetype-2.7.0/include/freetype/internal/services/svfntfmt.h deleted file mode 100644 index bd295c9..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/services/svfntfmt.h +++ /dev/null @@ -1,55 +0,0 @@ -/***************************************************************************/ -/* */ -/* svfntfmt.h */ -/* */ -/* The FreeType font format service (specification only). */ -/* */ -/* Copyright 2003-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef SVFNTFMT_H_ -#define SVFNTFMT_H_ - -#include FT_INTERNAL_SERVICE_H - - -FT_BEGIN_HEADER - - - /* - * A trivial service used to return the name of a face's font driver, - * according to the XFree86 nomenclature. Note that the service data - * is a simple constant string pointer. - */ - -#define FT_SERVICE_ID_FONT_FORMAT "font-format" - -#define FT_FONT_FORMAT_TRUETYPE "TrueType" -#define FT_FONT_FORMAT_TYPE_1 "Type 1" -#define FT_FONT_FORMAT_BDF "BDF" -#define FT_FONT_FORMAT_PCF "PCF" -#define FT_FONT_FORMAT_TYPE_42 "Type 42" -#define FT_FONT_FORMAT_CID "CID Type 1" -#define FT_FONT_FORMAT_CFF "CFF" -#define FT_FONT_FORMAT_PFR "PFR" -#define FT_FONT_FORMAT_WINFNT "Windows FNT" - - /* */ - - -FT_END_HEADER - - -#endif /* SVFNTFMT_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/services/svgldict.h b/builddir/freetype-2.7.0/include/freetype/internal/services/svgldict.h deleted file mode 100644 index fff29bc..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/services/svgldict.h +++ /dev/null @@ -1,91 +0,0 @@ -/***************************************************************************/ -/* */ -/* svgldict.h */ -/* */ -/* The FreeType glyph dictionary services (specification). */ -/* */ -/* Copyright 2003-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef SVGLDICT_H_ -#define SVGLDICT_H_ - -#include FT_INTERNAL_SERVICE_H - - -FT_BEGIN_HEADER - - - /* - * A service used to retrieve glyph names, as well as to find the - * index of a given glyph name in a font. - * - */ - -#define FT_SERVICE_ID_GLYPH_DICT "glyph-dict" - - - typedef FT_Error - (*FT_GlyphDict_GetNameFunc)( FT_Face face, - FT_UInt glyph_index, - FT_Pointer buffer, - FT_UInt buffer_max ); - - typedef FT_UInt - (*FT_GlyphDict_NameIndexFunc)( FT_Face face, - FT_String* glyph_name ); - - - FT_DEFINE_SERVICE( GlyphDict ) - { - FT_GlyphDict_GetNameFunc get_name; - FT_GlyphDict_NameIndexFunc name_index; /* optional */ - }; - - -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DEFINE_SERVICE_GLYPHDICTREC( class_, \ - get_name_, \ - name_index_) \ - static const FT_Service_GlyphDictRec class_ = \ - { \ - get_name_, name_index_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_SERVICE_GLYPHDICTREC( class_, \ - get_name_, \ - name_index_) \ - void \ - FT_Init_Class_ ## class_( FT_Library library, \ - FT_Service_GlyphDictRec* clazz ) \ - { \ - FT_UNUSED( library ); \ - \ - clazz->get_name = get_name_; \ - clazz->name_index = name_index_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - - /* */ - - -FT_END_HEADER - - -#endif /* SVGLDICT_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/services/svgxval.h b/builddir/freetype-2.7.0/include/freetype/internal/services/svgxval.h deleted file mode 100644 index fb8ffba..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/services/svgxval.h +++ /dev/null @@ -1,72 +0,0 @@ -/***************************************************************************/ -/* */ -/* svgxval.h */ -/* */ -/* FreeType API for validating TrueTypeGX/AAT tables (specification). */ -/* */ -/* Copyright 2004-2016 by */ -/* Masatake YAMATO, Red Hat K.K., */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - -/***************************************************************************/ -/* */ -/* gxvalid is derived from both gxlayout module and otvalid module. */ -/* Development of gxlayout is supported by the Information-technology */ -/* Promotion Agency(IPA), Japan. */ -/* */ -/***************************************************************************/ - - -#ifndef SVGXVAL_H_ -#define SVGXVAL_H_ - -#include FT_GX_VALIDATE_H -#include FT_INTERNAL_VALIDATE_H - -FT_BEGIN_HEADER - - -#define FT_SERVICE_ID_GX_VALIDATE "truetypegx-validate" -#define FT_SERVICE_ID_CLASSICKERN_VALIDATE "classickern-validate" - - typedef FT_Error - (*gxv_validate_func)( FT_Face face, - FT_UInt gx_flags, - FT_Bytes tables[FT_VALIDATE_GX_LENGTH], - FT_UInt table_length ); - - - typedef FT_Error - (*ckern_validate_func)( FT_Face face, - FT_UInt ckern_flags, - FT_Bytes *ckern_table ); - - - FT_DEFINE_SERVICE( GXvalidate ) - { - gxv_validate_func validate; - }; - - FT_DEFINE_SERVICE( CKERNvalidate ) - { - ckern_validate_func validate; - }; - - /* */ - - -FT_END_HEADER - - -#endif /* SVGXVAL_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/services/svkern.h b/builddir/freetype-2.7.0/include/freetype/internal/services/svkern.h deleted file mode 100644 index a636f1a..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/services/svkern.h +++ /dev/null @@ -1,51 +0,0 @@ -/***************************************************************************/ -/* */ -/* svkern.h */ -/* */ -/* The FreeType Kerning service (specification). */ -/* */ -/* Copyright 2006-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef SVKERN_H_ -#define SVKERN_H_ - -#include FT_INTERNAL_SERVICE_H -#include FT_TRUETYPE_TABLES_H - - -FT_BEGIN_HEADER - -#define FT_SERVICE_ID_KERNING "kerning" - - - typedef FT_Error - (*FT_Kerning_TrackGetFunc)( FT_Face face, - FT_Fixed point_size, - FT_Int degree, - FT_Fixed* akerning ); - - FT_DEFINE_SERVICE( Kerning ) - { - FT_Kerning_TrackGetFunc get_track; - }; - - /* */ - - -FT_END_HEADER - - -#endif /* SVKERN_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/services/svmm.h b/builddir/freetype-2.7.0/include/freetype/internal/services/svmm.h deleted file mode 100644 index b78a19f..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/services/svmm.h +++ /dev/null @@ -1,113 +0,0 @@ -/***************************************************************************/ -/* */ -/* svmm.h */ -/* */ -/* The FreeType Multiple Masters and GX var services (specification). */ -/* */ -/* Copyright 2003-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef SVMM_H_ -#define SVMM_H_ - -#include FT_INTERNAL_SERVICE_H - - -FT_BEGIN_HEADER - - - /* - * A service used to manage multiple-masters data in a given face. - * - * See the related APIs in `ftmm.h' (FT_MULTIPLE_MASTERS_H). - * - */ - -#define FT_SERVICE_ID_MULTI_MASTERS "multi-masters" - - - typedef FT_Error - (*FT_Get_MM_Func)( FT_Face face, - FT_Multi_Master* master ); - - typedef FT_Error - (*FT_Get_MM_Var_Func)( FT_Face face, - FT_MM_Var* *master ); - - typedef FT_Error - (*FT_Set_MM_Design_Func)( FT_Face face, - FT_UInt num_coords, - FT_Long* coords ); - - typedef FT_Error - (*FT_Set_Var_Design_Func)( FT_Face face, - FT_UInt num_coords, - FT_Fixed* coords ); - - typedef FT_Error - (*FT_Set_MM_Blend_Func)( FT_Face face, - FT_UInt num_coords, - FT_Long* coords ); - - - FT_DEFINE_SERVICE( MultiMasters ) - { - FT_Get_MM_Func get_mm; - FT_Set_MM_Design_Func set_mm_design; - FT_Set_MM_Blend_Func set_mm_blend; - FT_Get_MM_Var_Func get_mm_var; - FT_Set_Var_Design_Func set_var_design; - }; - - -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_, \ - get_mm_, \ - set_mm_design_, \ - set_mm_blend_, \ - get_mm_var_, \ - set_var_design_ ) \ - static const FT_Service_MultiMastersRec class_ = \ - { \ - get_mm_, set_mm_design_, set_mm_blend_, get_mm_var_, set_var_design_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_, \ - get_mm_, \ - set_mm_design_, \ - set_mm_blend_, \ - get_mm_var_, \ - set_var_design_ ) \ - void \ - FT_Init_Class_ ## class_( FT_Service_MultiMastersRec* clazz ) \ - { \ - clazz->get_mm = get_mm_; \ - clazz->set_mm_design = set_mm_design_; \ - clazz->set_mm_blend = set_mm_blend_; \ - clazz->get_mm_var = get_mm_var_; \ - clazz->set_var_design = set_var_design_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - - /* */ - - -FT_END_HEADER - -#endif /* SVMM_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/services/svotval.h b/builddir/freetype-2.7.0/include/freetype/internal/services/svotval.h deleted file mode 100644 index bc929d4..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/services/svotval.h +++ /dev/null @@ -1,55 +0,0 @@ -/***************************************************************************/ -/* */ -/* svotval.h */ -/* */ -/* The FreeType OpenType validation service (specification). */ -/* */ -/* Copyright 2004-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef SVOTVAL_H_ -#define SVOTVAL_H_ - -#include FT_OPENTYPE_VALIDATE_H -#include FT_INTERNAL_VALIDATE_H - -FT_BEGIN_HEADER - - -#define FT_SERVICE_ID_OPENTYPE_VALIDATE "opentype-validate" - - - typedef FT_Error - (*otv_validate_func)( FT_Face volatile face, - FT_UInt ot_flags, - FT_Bytes *base, - FT_Bytes *gdef, - FT_Bytes *gpos, - FT_Bytes *gsub, - FT_Bytes *jstf ); - - - FT_DEFINE_SERVICE( OTvalidate ) - { - otv_validate_func validate; - }; - - /* */ - - -FT_END_HEADER - - -#endif /* SVOTVAL_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/services/svpfr.h b/builddir/freetype-2.7.0/include/freetype/internal/services/svpfr.h deleted file mode 100644 index d0f7c4d..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/services/svpfr.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************/ -/* */ -/* svpfr.h */ -/* */ -/* Internal PFR service functions (specification). */ -/* */ -/* Copyright 2003-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef SVPFR_H_ -#define SVPFR_H_ - -#include FT_PFR_H -#include FT_INTERNAL_SERVICE_H - - -FT_BEGIN_HEADER - - -#define FT_SERVICE_ID_PFR_METRICS "pfr-metrics" - - - typedef FT_Error - (*FT_PFR_GetMetricsFunc)( FT_Face face, - FT_UInt *aoutline, - FT_UInt *ametrics, - FT_Fixed *ax_scale, - FT_Fixed *ay_scale ); - - typedef FT_Error - (*FT_PFR_GetKerningFunc)( FT_Face face, - FT_UInt left, - FT_UInt right, - FT_Vector *avector ); - - typedef FT_Error - (*FT_PFR_GetAdvanceFunc)( FT_Face face, - FT_UInt gindex, - FT_Pos *aadvance ); - - - FT_DEFINE_SERVICE( PfrMetrics ) - { - FT_PFR_GetMetricsFunc get_metrics; - FT_PFR_GetKerningFunc get_kerning; - FT_PFR_GetAdvanceFunc get_advance; - - }; - - /* */ - -FT_END_HEADER - -#endif /* SVPFR_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/services/svpostnm.h b/builddir/freetype-2.7.0/include/freetype/internal/services/svpostnm.h deleted file mode 100644 index f124380..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/services/svpostnm.h +++ /dev/null @@ -1,81 +0,0 @@ -/***************************************************************************/ -/* */ -/* svpostnm.h */ -/* */ -/* The FreeType PostScript name services (specification). */ -/* */ -/* Copyright 2003-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef SVPOSTNM_H_ -#define SVPOSTNM_H_ - -#include FT_INTERNAL_SERVICE_H - - -FT_BEGIN_HEADER - - /* - * A trivial service used to retrieve the PostScript name of a given - * font when available. The `get_name' field should never be NULL. - * - * The corresponding function can return NULL to indicate that the - * PostScript name is not available. - * - * The name is owned by the face and will be destroyed with it. - */ - -#define FT_SERVICE_ID_POSTSCRIPT_FONT_NAME "postscript-font-name" - - - typedef const char* - (*FT_PsName_GetFunc)( FT_Face face ); - - - FT_DEFINE_SERVICE( PsFontName ) - { - FT_PsName_GetFunc get_ps_font_name; - }; - - -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DEFINE_SERVICE_PSFONTNAMEREC( class_, get_ps_font_name_ ) \ - static const FT_Service_PsFontNameRec class_ = \ - { \ - get_ps_font_name_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_SERVICE_PSFONTNAMEREC( class_, get_ps_font_name_ ) \ - void \ - FT_Init_Class_ ## class_( FT_Library library, \ - FT_Service_PsFontNameRec* clazz ) \ - { \ - FT_UNUSED( library ); \ - \ - clazz->get_ps_font_name = get_ps_font_name_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - - /* */ - - -FT_END_HEADER - - -#endif /* SVPOSTNM_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/services/svprop.h b/builddir/freetype-2.7.0/include/freetype/internal/services/svprop.h deleted file mode 100644 index 75e6244..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/services/svprop.h +++ /dev/null @@ -1,82 +0,0 @@ -/***************************************************************************/ -/* */ -/* svprop.h */ -/* */ -/* The FreeType property service (specification). */ -/* */ -/* Copyright 2012-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef SVPROP_H_ -#define SVPROP_H_ - - -FT_BEGIN_HEADER - - -#define FT_SERVICE_ID_PROPERTIES "properties" - - - typedef FT_Error - (*FT_Properties_SetFunc)( FT_Module module, - const char* property_name, - const void* value, - FT_Bool value_is_string ); - - typedef FT_Error - (*FT_Properties_GetFunc)( FT_Module module, - const char* property_name, - void* value ); - - - FT_DEFINE_SERVICE( Properties ) - { - FT_Properties_SetFunc set_property; - FT_Properties_GetFunc get_property; - }; - - -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DEFINE_SERVICE_PROPERTIESREC( class_, \ - set_property_, \ - get_property_ ) \ - static const FT_Service_PropertiesRec class_ = \ - { \ - set_property_, \ - get_property_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_SERVICE_PROPERTIESREC( class_, \ - set_property_, \ - get_property_ ) \ - void \ - FT_Init_Class_ ## class_( FT_Service_PropertiesRec* clazz ) \ - { \ - clazz->set_property = set_property_; \ - clazz->get_property = get_property_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - - /* */ - - -FT_END_HEADER - - -#endif /* SVPROP_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/services/svpscmap.h b/builddir/freetype-2.7.0/include/freetype/internal/services/svpscmap.h deleted file mode 100644 index 9acc216..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/services/svpscmap.h +++ /dev/null @@ -1,177 +0,0 @@ -/***************************************************************************/ -/* */ -/* svpscmap.h */ -/* */ -/* The FreeType PostScript charmap service (specification). */ -/* */ -/* Copyright 2003-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef SVPSCMAP_H_ -#define SVPSCMAP_H_ - -#include FT_INTERNAL_OBJECTS_H - - -FT_BEGIN_HEADER - - -#define FT_SERVICE_ID_POSTSCRIPT_CMAPS "postscript-cmaps" - - - /* - * Adobe glyph name to unicode value. - */ - typedef FT_UInt32 - (*PS_Unicode_ValueFunc)( const char* glyph_name ); - - /* - * Macintosh name id to glyph name. NULL if invalid index. - */ - typedef const char* - (*PS_Macintosh_NameFunc)( FT_UInt name_index ); - - /* - * Adobe standard string ID to glyph name. NULL if invalid index. - */ - typedef const char* - (*PS_Adobe_Std_StringsFunc)( FT_UInt string_index ); - - - /* - * Simple unicode -> glyph index charmap built from font glyph names - * table. - */ - typedef struct PS_UniMap_ - { - FT_UInt32 unicode; /* bit 31 set: is glyph variant */ - FT_UInt glyph_index; - - } PS_UniMap; - - - typedef struct PS_UnicodesRec_* PS_Unicodes; - - typedef struct PS_UnicodesRec_ - { - FT_CMapRec cmap; - FT_UInt num_maps; - PS_UniMap* maps; - - } PS_UnicodesRec; - - - /* - * A function which returns a glyph name for a given index. Returns - * NULL if invalid index. - */ - typedef const char* - (*PS_GetGlyphNameFunc)( FT_Pointer data, - FT_UInt string_index ); - - /* - * A function used to release the glyph name returned by - * PS_GetGlyphNameFunc, when needed - */ - typedef void - (*PS_FreeGlyphNameFunc)( FT_Pointer data, - const char* name ); - - typedef FT_Error - (*PS_Unicodes_InitFunc)( FT_Memory memory, - PS_Unicodes unicodes, - FT_UInt num_glyphs, - PS_GetGlyphNameFunc get_glyph_name, - PS_FreeGlyphNameFunc free_glyph_name, - FT_Pointer glyph_data ); - - typedef FT_UInt - (*PS_Unicodes_CharIndexFunc)( PS_Unicodes unicodes, - FT_UInt32 unicode ); - - typedef FT_UInt32 - (*PS_Unicodes_CharNextFunc)( PS_Unicodes unicodes, - FT_UInt32 *unicode ); - - - FT_DEFINE_SERVICE( PsCMaps ) - { - PS_Unicode_ValueFunc unicode_value; - - PS_Unicodes_InitFunc unicodes_init; - PS_Unicodes_CharIndexFunc unicodes_char_index; - PS_Unicodes_CharNextFunc unicodes_char_next; - - PS_Macintosh_NameFunc macintosh_name; - PS_Adobe_Std_StringsFunc adobe_std_strings; - const unsigned short* adobe_std_encoding; - const unsigned short* adobe_expert_encoding; - }; - - -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DEFINE_SERVICE_PSCMAPSREC( class_, \ - unicode_value_, \ - unicodes_init_, \ - unicodes_char_index_, \ - unicodes_char_next_, \ - macintosh_name_, \ - adobe_std_strings_, \ - adobe_std_encoding_, \ - adobe_expert_encoding_ ) \ - static const FT_Service_PsCMapsRec class_ = \ - { \ - unicode_value_, unicodes_init_, \ - unicodes_char_index_, unicodes_char_next_, macintosh_name_, \ - adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_SERVICE_PSCMAPSREC( class_, \ - unicode_value_, \ - unicodes_init_, \ - unicodes_char_index_, \ - unicodes_char_next_, \ - macintosh_name_, \ - adobe_std_strings_, \ - adobe_std_encoding_, \ - adobe_expert_encoding_ ) \ - void \ - FT_Init_Class_ ## class_( FT_Library library, \ - FT_Service_PsCMapsRec* clazz ) \ - { \ - FT_UNUSED( library ); \ - \ - clazz->unicode_value = unicode_value_; \ - clazz->unicodes_init = unicodes_init_; \ - clazz->unicodes_char_index = unicodes_char_index_; \ - clazz->unicodes_char_next = unicodes_char_next_; \ - clazz->macintosh_name = macintosh_name_; \ - clazz->adobe_std_strings = adobe_std_strings_; \ - clazz->adobe_std_encoding = adobe_std_encoding_; \ - clazz->adobe_expert_encoding = adobe_expert_encoding_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - - /* */ - - -FT_END_HEADER - - -#endif /* SVPSCMAP_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/services/svpsinfo.h b/builddir/freetype-2.7.0/include/freetype/internal/services/svpsinfo.h deleted file mode 100644 index f2c8060..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/services/svpsinfo.h +++ /dev/null @@ -1,111 +0,0 @@ -/***************************************************************************/ -/* */ -/* svpsinfo.h */ -/* */ -/* The FreeType PostScript info service (specification). */ -/* */ -/* Copyright 2003-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef SVPSINFO_H_ -#define SVPSINFO_H_ - -#include FT_INTERNAL_SERVICE_H -#include FT_INTERNAL_TYPE1_TYPES_H - - -FT_BEGIN_HEADER - - -#define FT_SERVICE_ID_POSTSCRIPT_INFO "postscript-info" - - - typedef FT_Error - (*PS_GetFontInfoFunc)( FT_Face face, - PS_FontInfoRec* afont_info ); - - typedef FT_Error - (*PS_GetFontExtraFunc)( FT_Face face, - PS_FontExtraRec* afont_extra ); - - typedef FT_Int - (*PS_HasGlyphNamesFunc)( FT_Face face ); - - typedef FT_Error - (*PS_GetFontPrivateFunc)( FT_Face face, - PS_PrivateRec* afont_private ); - - typedef FT_Long - (*PS_GetFontValueFunc)( FT_Face face, - PS_Dict_Keys key, - FT_UInt idx, - void *value, - FT_Long value_len ); - - - FT_DEFINE_SERVICE( PsInfo ) - { - PS_GetFontInfoFunc ps_get_font_info; - PS_GetFontExtraFunc ps_get_font_extra; - PS_HasGlyphNamesFunc ps_has_glyph_names; - PS_GetFontPrivateFunc ps_get_font_private; - PS_GetFontValueFunc ps_get_font_value; - }; - - -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DEFINE_SERVICE_PSINFOREC( class_, \ - get_font_info_, \ - ps_get_font_extra_, \ - has_glyph_names_, \ - get_font_private_, \ - get_font_value_ ) \ - static const FT_Service_PsInfoRec class_ = \ - { \ - get_font_info_, ps_get_font_extra_, has_glyph_names_, \ - get_font_private_, get_font_value_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_SERVICE_PSINFOREC( class_, \ - get_font_info_, \ - ps_get_font_extra_, \ - has_glyph_names_, \ - get_font_private_, \ - get_font_value_ ) \ - void \ - FT_Init_Class_ ## class_( FT_Library library, \ - FT_Service_PsInfoRec* clazz ) \ - { \ - FT_UNUSED( library ); \ - \ - clazz->ps_get_font_info = get_font_info_; \ - clazz->ps_get_font_extra = ps_get_font_extra_; \ - clazz->ps_has_glyph_names = has_glyph_names_; \ - clazz->ps_get_font_private = get_font_private_; \ - clazz->ps_get_font_value = get_font_value_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - - /* */ - - -FT_END_HEADER - - -#endif /* SVPSINFO_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/services/svsfnt.h b/builddir/freetype-2.7.0/include/freetype/internal/services/svsfnt.h deleted file mode 100644 index 0f38cf1..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/services/svsfnt.h +++ /dev/null @@ -1,103 +0,0 @@ -/***************************************************************************/ -/* */ -/* svsfnt.h */ -/* */ -/* The FreeType SFNT table loading service (specification). */ -/* */ -/* Copyright 2003-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef SVSFNT_H_ -#define SVSFNT_H_ - -#include FT_INTERNAL_SERVICE_H -#include FT_TRUETYPE_TABLES_H - - -FT_BEGIN_HEADER - - - /* - * SFNT table loading service. - */ - -#define FT_SERVICE_ID_SFNT_TABLE "sfnt-table" - - - /* - * Used to implement FT_Load_Sfnt_Table(). - */ - typedef FT_Error - (*FT_SFNT_TableLoadFunc)( FT_Face face, - FT_ULong tag, - FT_Long offset, - FT_Byte* buffer, - FT_ULong* length ); - - /* - * Used to implement FT_Get_Sfnt_Table(). - */ - typedef void* - (*FT_SFNT_TableGetFunc)( FT_Face face, - FT_Sfnt_Tag tag ); - - - /* - * Used to implement FT_Sfnt_Table_Info(). - */ - typedef FT_Error - (*FT_SFNT_TableInfoFunc)( FT_Face face, - FT_UInt idx, - FT_ULong *tag, - FT_ULong *offset, - FT_ULong *length ); - - - FT_DEFINE_SERVICE( SFNT_Table ) - { - FT_SFNT_TableLoadFunc load_table; - FT_SFNT_TableGetFunc get_table; - FT_SFNT_TableInfoFunc table_info; - }; - - -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DEFINE_SERVICE_SFNT_TABLEREC( class_, load_, get_, info_ ) \ - static const FT_Service_SFNT_TableRec class_ = \ - { \ - load_, get_, info_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_SERVICE_SFNT_TABLEREC( class_, load_, get_, info_ ) \ - void \ - FT_Init_Class_ ## class_( FT_Service_SFNT_TableRec* clazz ) \ - { \ - clazz->load_table = load_; \ - clazz->get_table = get_; \ - clazz->table_info = info_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - - /* */ - - -FT_END_HEADER - - -#endif /* SVSFNT_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/services/svttcmap.h b/builddir/freetype-2.7.0/include/freetype/internal/services/svttcmap.h deleted file mode 100644 index 772c721..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/services/svttcmap.h +++ /dev/null @@ -1,106 +0,0 @@ -/***************************************************************************/ -/* */ -/* svttcmap.h */ -/* */ -/* The FreeType TrueType/sfnt cmap extra information service. */ -/* */ -/* Copyright 2003-2016 by */ -/* Masatake YAMATO, Redhat K.K., */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - -/* Development of this service is support of - Information-technology Promotion Agency, Japan. */ - -#ifndef SVTTCMAP_H_ -#define SVTTCMAP_H_ - -#include FT_INTERNAL_SERVICE_H -#include FT_TRUETYPE_TABLES_H - - -FT_BEGIN_HEADER - - -#define FT_SERVICE_ID_TT_CMAP "tt-cmaps" - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_CMapInfo */ - /* */ - /* <Description> */ - /* A structure used to store TrueType/sfnt specific cmap information */ - /* which is not covered by the generic @FT_CharMap structure. This */ - /* structure can be accessed with the @FT_Get_TT_CMap_Info function. */ - /* */ - /* <Fields> */ - /* language :: */ - /* The language ID used in Mac fonts. Definitions of values are in */ - /* `ttnameid.h'. */ - /* */ - /* format :: */ - /* The cmap format. OpenType 1.6 defines the formats 0 (byte */ - /* encoding table), 2~(high-byte mapping through table), 4~(segment */ - /* mapping to delta values), 6~(trimmed table mapping), 8~(mixed */ - /* 16-bit and 32-bit coverage), 10~(trimmed array), 12~(segmented */ - /* coverage), 13~(last resort font), and 14 (Unicode Variation */ - /* Sequences). */ - /* */ - typedef struct TT_CMapInfo_ - { - FT_ULong language; - FT_Long format; - - } TT_CMapInfo; - - - typedef FT_Error - (*TT_CMap_Info_GetFunc)( FT_CharMap charmap, - TT_CMapInfo *cmap_info ); - - - FT_DEFINE_SERVICE( TTCMaps ) - { - TT_CMap_Info_GetFunc get_cmap_info; - }; - -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DEFINE_SERVICE_TTCMAPSREC( class_, get_cmap_info_ ) \ - static const FT_Service_TTCMapsRec class_ = \ - { \ - get_cmap_info_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_SERVICE_TTCMAPSREC( class_, get_cmap_info_ ) \ - void \ - FT_Init_Class_ ## class_( FT_Library library, \ - FT_Service_TTCMapsRec* clazz ) \ - { \ - FT_UNUSED( library ); \ - \ - clazz->get_cmap_info = get_cmap_info_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - - /* */ - - -FT_END_HEADER - -#endif /* SVTTCMAP_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/services/svtteng.h b/builddir/freetype-2.7.0/include/freetype/internal/services/svtteng.h deleted file mode 100644 index c55061a..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/services/svtteng.h +++ /dev/null @@ -1,53 +0,0 @@ -/***************************************************************************/ -/* */ -/* svtteng.h */ -/* */ -/* The FreeType TrueType engine query service (specification). */ -/* */ -/* Copyright 2006-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef SVTTENG_H_ -#define SVTTENG_H_ - -#include FT_INTERNAL_SERVICE_H -#include FT_MODULE_H - - -FT_BEGIN_HEADER - - - /* - * SFNT table loading service. - */ - -#define FT_SERVICE_ID_TRUETYPE_ENGINE "truetype-engine" - - /* - * Used to implement FT_Get_TrueType_Engine_Type - */ - - FT_DEFINE_SERVICE( TrueTypeEngine ) - { - FT_TrueTypeEngineType engine_type; - }; - - /* */ - - -FT_END_HEADER - - -#endif /* SVTTENG_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/services/svttglyf.h b/builddir/freetype-2.7.0/include/freetype/internal/services/svttglyf.h deleted file mode 100644 index c33edd4..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/services/svttglyf.h +++ /dev/null @@ -1,69 +0,0 @@ -/***************************************************************************/ -/* */ -/* svttglyf.h */ -/* */ -/* The FreeType TrueType glyph service. */ -/* */ -/* Copyright 2007-2016 by */ -/* David Turner. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - -#ifndef SVTTGLYF_H_ -#define SVTTGLYF_H_ - -#include FT_INTERNAL_SERVICE_H -#include FT_TRUETYPE_TABLES_H - - -FT_BEGIN_HEADER - - -#define FT_SERVICE_ID_TT_GLYF "tt-glyf" - - - typedef FT_ULong - (*TT_Glyf_GetLocationFunc)( FT_Face face, - FT_UInt gindex, - FT_ULong *psize ); - - FT_DEFINE_SERVICE( TTGlyf ) - { - TT_Glyf_GetLocationFunc get_location; - }; - - -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DEFINE_SERVICE_TTGLYFREC( class_, get_location_ ) \ - static const FT_Service_TTGlyfRec class_ = \ - { \ - get_location_ \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_SERVICE_TTGLYFREC( class_, get_location_ ) \ - void \ - FT_Init_Class_ ## class_( FT_Service_TTGlyfRec* clazz ) \ - { \ - clazz->get_location = get_location_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - - /* */ - - -FT_END_HEADER - -#endif /* SVTTGLYF_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/services/svwinfnt.h b/builddir/freetype-2.7.0/include/freetype/internal/services/svwinfnt.h deleted file mode 100644 index c2f6d4c..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/services/svwinfnt.h +++ /dev/null @@ -1,50 +0,0 @@ -/***************************************************************************/ -/* */ -/* svwinfnt.h */ -/* */ -/* The FreeType Windows FNT/FONT service (specification). */ -/* */ -/* Copyright 2003-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef SVWINFNT_H_ -#define SVWINFNT_H_ - -#include FT_INTERNAL_SERVICE_H -#include FT_WINFONTS_H - - -FT_BEGIN_HEADER - - -#define FT_SERVICE_ID_WINFNT "winfonts" - - typedef FT_Error - (*FT_WinFnt_GetHeaderFunc)( FT_Face face, - FT_WinFNT_HeaderRec *aheader ); - - - FT_DEFINE_SERVICE( WinFnt ) - { - FT_WinFnt_GetHeaderFunc get_header; - }; - - /* */ - - -FT_END_HEADER - - -#endif /* SVWINFNT_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/sfnt.h b/builddir/freetype-2.7.0/include/freetype/internal/sfnt.h deleted file mode 100644 index e139315..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/sfnt.h +++ /dev/null @@ -1,748 +0,0 @@ -/***************************************************************************/ -/* */ -/* sfnt.h */ -/* */ -/* High-level `sfnt' driver interface (specification). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef SFNT_H_ -#define SFNT_H_ - - -#include <ft2build.h> -#include FT_INTERNAL_DRIVER_H -#include FT_INTERNAL_TRUETYPE_TYPES_H - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Init_Face_Func */ - /* */ - /* <Description> */ - /* First part of the SFNT face object initialization. This finds */ - /* the face in a SFNT file or collection, and load its format tag in */ - /* face->format_tag. */ - /* */ - /* <Input> */ - /* stream :: The input stream. */ - /* */ - /* face :: A handle to the target face object. */ - /* */ - /* face_index :: The index of the TrueType font, if we are opening a */ - /* collection, in bits 0-15. The numbered instance */ - /* index~+~1 of a GX (sub)font, if applicable, in bits */ - /* 16-30. */ - /* */ - /* num_params :: The number of additional parameters. */ - /* */ - /* params :: Optional additional parameters. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - /* <Note> */ - /* The stream cursor must be at the font file's origin. */ - /* */ - /* This function recognizes fonts embedded in a `TrueType */ - /* collection'. */ - /* */ - /* Once the format tag has been validated by the font driver, it */ - /* should then call the TT_Load_Face_Func() callback to read the rest */ - /* of the SFNT tables in the object. */ - /* */ - typedef FT_Error - (*TT_Init_Face_Func)( FT_Stream stream, - TT_Face face, - FT_Int face_index, - FT_Int num_params, - FT_Parameter* params ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Load_Face_Func */ - /* */ - /* <Description> */ - /* Second part of the SFNT face object initialization. This loads */ - /* the common SFNT tables (head, OS/2, maxp, metrics, etc.) in the */ - /* face object. */ - /* */ - /* <Input> */ - /* stream :: The input stream. */ - /* */ - /* face :: A handle to the target face object. */ - /* */ - /* face_index :: The index of the TrueType font, if we are opening a */ - /* collection, in bits 0-15. The numbered instance */ - /* index~+~1 of a GX (sub)font, if applicable, in bits */ - /* 16-30. */ - /* */ - /* num_params :: The number of additional parameters. */ - /* */ - /* params :: Optional additional parameters. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - /* <Note> */ - /* This function must be called after TT_Init_Face_Func(). */ - /* */ - typedef FT_Error - (*TT_Load_Face_Func)( FT_Stream stream, - TT_Face face, - FT_Int face_index, - FT_Int num_params, - FT_Parameter* params ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Done_Face_Func */ - /* */ - /* <Description> */ - /* A callback used to delete the common SFNT data from a face. */ - /* */ - /* <Input> */ - /* face :: A handle to the target face object. */ - /* */ - /* <Note> */ - /* This function does NOT destroy the face object. */ - /* */ - typedef void - (*TT_Done_Face_Func)( TT_Face face ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Load_Any_Func */ - /* */ - /* <Description> */ - /* Load any font table into client memory. */ - /* */ - /* <Input> */ - /* face :: The face object to look for. */ - /* */ - /* tag :: The tag of table to load. Use the value 0 if you want */ - /* to access the whole font file, else set this parameter */ - /* to a valid TrueType table tag that you can forge with */ - /* the MAKE_TT_TAG macro. */ - /* */ - /* offset :: The starting offset in the table (or the file if */ - /* tag == 0). */ - /* */ - /* length :: The address of the decision variable: */ - /* */ - /* If length == NULL: */ - /* Loads the whole table. Returns an error if */ - /* `offset' == 0! */ - /* */ - /* If *length == 0: */ - /* Exits immediately; returning the length of the given */ - /* table or of the font file, depending on the value of */ - /* `tag'. */ - /* */ - /* If *length != 0: */ - /* Loads the next `length' bytes of table or font, */ - /* starting at offset `offset' (in table or font too). */ - /* */ - /* <Output> */ - /* buffer :: The address of target buffer. */ - /* */ - /* <Return> */ - /* TrueType error code. 0 means success. */ - /* */ - typedef FT_Error - (*TT_Load_Any_Func)( TT_Face face, - FT_ULong tag, - FT_Long offset, - FT_Byte *buffer, - FT_ULong* length ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Find_SBit_Image_Func */ - /* */ - /* <Description> */ - /* Check whether an embedded bitmap (an `sbit') exists for a given */ - /* glyph, at a given strike. */ - /* */ - /* <Input> */ - /* face :: The target face object. */ - /* */ - /* glyph_index :: The glyph index. */ - /* */ - /* strike_index :: The current strike index. */ - /* */ - /* <Output> */ - /* arange :: The SBit range containing the glyph index. */ - /* */ - /* astrike :: The SBit strike containing the glyph index. */ - /* */ - /* aglyph_offset :: The offset of the glyph data in `EBDT' table. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. Returns */ - /* SFNT_Err_Invalid_Argument if no sbit exists for the requested */ - /* glyph. */ - /* */ - typedef FT_Error - (*TT_Find_SBit_Image_Func)( TT_Face face, - FT_UInt glyph_index, - FT_ULong strike_index, - TT_SBit_Range *arange, - TT_SBit_Strike *astrike, - FT_ULong *aglyph_offset ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Load_SBit_Metrics_Func */ - /* */ - /* <Description> */ - /* Get the big metrics for a given embedded bitmap. */ - /* */ - /* <Input> */ - /* stream :: The input stream. */ - /* */ - /* range :: The SBit range containing the glyph. */ - /* */ - /* <Output> */ - /* big_metrics :: A big SBit metrics structure for the glyph. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - /* <Note> */ - /* The stream cursor must be positioned at the glyph's offset within */ - /* the `EBDT' table before the call. */ - /* */ - /* If the image format uses variable metrics, the stream cursor is */ - /* positioned just after the metrics header in the `EBDT' table on */ - /* function exit. */ - /* */ - typedef FT_Error - (*TT_Load_SBit_Metrics_Func)( FT_Stream stream, - TT_SBit_Range range, - TT_SBit_Metrics metrics ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Load_SBit_Image_Func */ - /* */ - /* <Description> */ - /* Load a given glyph sbit image from the font resource. This also */ - /* returns its metrics. */ - /* */ - /* <Input> */ - /* face :: */ - /* The target face object. */ - /* */ - /* strike_index :: */ - /* The strike index. */ - /* */ - /* glyph_index :: */ - /* The current glyph index. */ - /* */ - /* load_flags :: */ - /* The current load flags. */ - /* */ - /* stream :: */ - /* The input stream. */ - /* */ - /* <Output> */ - /* amap :: */ - /* The target pixmap. */ - /* */ - /* ametrics :: */ - /* A big sbit metrics structure for the glyph image. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. Returns an error if no */ - /* glyph sbit exists for the index. */ - /* */ - /* <Note> */ - /* The `map.buffer' field is always freed before the glyph is loaded. */ - /* */ - typedef FT_Error - (*TT_Load_SBit_Image_Func)( TT_Face face, - FT_ULong strike_index, - FT_UInt glyph_index, - FT_UInt load_flags, - FT_Stream stream, - FT_Bitmap *amap, - TT_SBit_MetricsRec *ametrics ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Set_SBit_Strike_Func */ - /* */ - /* <Description> */ - /* Select an sbit strike for a given size request. */ - /* */ - /* <Input> */ - /* face :: The target face object. */ - /* */ - /* req :: The size request. */ - /* */ - /* <Output> */ - /* astrike_index :: The index of the sbit strike. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. Returns an error if no */ - /* sbit strike exists for the selected ppem values. */ - /* */ - typedef FT_Error - (*TT_Set_SBit_Strike_Func)( TT_Face face, - FT_Size_Request req, - FT_ULong* astrike_index ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Load_Strike_Metrics_Func */ - /* */ - /* <Description> */ - /* Load the metrics of a given strike. */ - /* */ - /* <Input> */ - /* face :: The target face object. */ - /* */ - /* strike_index :: The strike index. */ - /* */ - /* <Output> */ - /* metrics :: the metrics of the strike. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. Returns an error if no */ - /* such sbit strike exists. */ - /* */ - typedef FT_Error - (*TT_Load_Strike_Metrics_Func)( TT_Face face, - FT_ULong strike_index, - FT_Size_Metrics* metrics ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Get_PS_Name_Func */ - /* */ - /* <Description> */ - /* Get the PostScript glyph name of a glyph. */ - /* */ - /* <Input> */ - /* idx :: The glyph index. */ - /* */ - /* PSname :: The address of a string pointer. Will be NULL in case */ - /* of error, otherwise it is a pointer to the glyph name. */ - /* */ - /* You must not modify the returned string! */ - /* */ - /* <Output> */ - /* FreeType error code. 0 means success. */ - /* */ - typedef FT_Error - (*TT_Get_PS_Name_Func)( TT_Face face, - FT_UInt idx, - FT_String** PSname ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Load_Metrics_Func */ - /* */ - /* <Description> */ - /* Load a metrics table, which is a table with a horizontal and a */ - /* vertical version. */ - /* */ - /* <Input> */ - /* face :: A handle to the target face object. */ - /* */ - /* stream :: The input stream. */ - /* */ - /* vertical :: A boolean flag. If set, load the vertical one. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - typedef FT_Error - (*TT_Load_Metrics_Func)( TT_Face face, - FT_Stream stream, - FT_Bool vertical ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Get_Metrics_Func */ - /* */ - /* <Description> */ - /* Load the horizontal or vertical header in a face object. */ - /* */ - /* <Input> */ - /* face :: A handle to the target face object. */ - /* */ - /* vertical :: A boolean flag. If set, load vertical metrics. */ - /* */ - /* gindex :: The glyph index. */ - /* */ - /* <Output> */ - /* abearing :: The horizontal (or vertical) bearing. Set to zero in */ - /* case of error. */ - /* */ - /* aadvance :: The horizontal (or vertical) advance. Set to zero in */ - /* case of error. */ - /* */ - typedef void - (*TT_Get_Metrics_Func)( TT_Face face, - FT_Bool vertical, - FT_UInt gindex, - FT_Short* abearing, - FT_UShort* aadvance ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Get_Name_Func */ - /* */ - /* <Description> */ - /* From the `name' table, return a given ENGLISH name record in */ - /* ASCII. */ - /* */ - /* <Input> */ - /* face :: A handle to the source face object. */ - /* */ - /* nameid :: The name id of the name record to return. */ - /* */ - /* <InOut> */ - /* name :: The address of an allocated string pointer. NULL if */ - /* no name is present. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - typedef FT_Error - (*TT_Get_Name_Func)( TT_Face face, - FT_UShort nameid, - FT_String** name ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Load_Table_Func */ - /* */ - /* <Description> */ - /* Load a given TrueType table. */ - /* */ - /* <Input> */ - /* face :: A handle to the target face object. */ - /* */ - /* stream :: The input stream. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - /* <Note> */ - /* The function uses `face->goto_table' to seek the stream to the */ - /* start of the table, except while loading the font directory. */ - /* */ - typedef FT_Error - (*TT_Load_Table_Func)( TT_Face face, - FT_Stream stream ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Free_Table_Func */ - /* */ - /* <Description> */ - /* Free a given TrueType table. */ - /* */ - /* <Input> */ - /* face :: A handle to the target face object. */ - /* */ - typedef void - (*TT_Free_Table_Func)( TT_Face face ); - - - /* - * @functype: - * TT_Face_GetKerningFunc - * - * @description: - * Return the horizontal kerning value between two glyphs. - * - * @input: - * face :: A handle to the source face object. - * left_glyph :: The left glyph index. - * right_glyph :: The right glyph index. - * - * @return: - * The kerning value in font units. - */ - typedef FT_Int - (*TT_Face_GetKerningFunc)( TT_Face face, - FT_UInt left_glyph, - FT_UInt right_glyph ); - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* SFNT_Interface */ - /* */ - /* <Description> */ - /* This structure holds pointers to the functions used to load and */ - /* free the basic tables that are required in a `sfnt' font file. */ - /* */ - /* <Fields> */ - /* Check the various xxx_Func() descriptions for details. */ - /* */ - typedef struct SFNT_Interface_ - { - TT_Loader_GotoTableFunc goto_table; - - TT_Init_Face_Func init_face; - TT_Load_Face_Func load_face; - TT_Done_Face_Func done_face; - FT_Module_Requester get_interface; - - TT_Load_Any_Func load_any; - - /* these functions are called by `load_face' but they can also */ - /* be called from external modules, if there is a need to do so */ - TT_Load_Table_Func load_head; - TT_Load_Metrics_Func load_hhea; - TT_Load_Table_Func load_cmap; - TT_Load_Table_Func load_maxp; - TT_Load_Table_Func load_os2; - TT_Load_Table_Func load_post; - - TT_Load_Table_Func load_name; - TT_Free_Table_Func free_name; - - /* this field was called `load_kerning' up to version 2.1.10 */ - TT_Load_Table_Func load_kern; - - TT_Load_Table_Func load_gasp; - TT_Load_Table_Func load_pclt; - - /* see `ttload.h'; this field was called `load_bitmap_header' up to */ - /* version 2.1.10 */ - TT_Load_Table_Func load_bhed; - - TT_Load_SBit_Image_Func load_sbit_image; - - /* see `ttpost.h' */ - TT_Get_PS_Name_Func get_psname; - TT_Free_Table_Func free_psnames; - - /* starting here, the structure differs from version 2.1.7 */ - - /* this field was introduced in version 2.1.8, named `get_psname' */ - TT_Face_GetKerningFunc get_kerning; - - /* new elements introduced after version 2.1.10 */ - - /* load the font directory, i.e., the offset table and */ - /* the table directory */ - TT_Load_Table_Func load_font_dir; - TT_Load_Metrics_Func load_hmtx; - - TT_Load_Table_Func load_eblc; - TT_Free_Table_Func free_eblc; - - TT_Set_SBit_Strike_Func set_sbit_strike; - TT_Load_Strike_Metrics_Func load_strike_metrics; - - TT_Get_Metrics_Func get_metrics; - - TT_Get_Name_Func get_name; - - } SFNT_Interface; - - - /* transitional */ - typedef SFNT_Interface* SFNT_Service; - -#ifndef FT_CONFIG_OPTION_PIC - -#define FT_DEFINE_SFNT_INTERFACE( \ - class_, \ - goto_table_, \ - init_face_, \ - load_face_, \ - done_face_, \ - get_interface_, \ - load_any_, \ - load_head_, \ - load_hhea_, \ - load_cmap_, \ - load_maxp_, \ - load_os2_, \ - load_post_, \ - load_name_, \ - free_name_, \ - load_kern_, \ - load_gasp_, \ - load_pclt_, \ - load_bhed_, \ - load_sbit_image_, \ - get_psname_, \ - free_psnames_, \ - get_kerning_, \ - load_font_dir_, \ - load_hmtx_, \ - load_eblc_, \ - free_eblc_, \ - set_sbit_strike_, \ - load_strike_metrics_, \ - get_metrics_, \ - get_name_ ) \ - static const SFNT_Interface class_ = \ - { \ - goto_table_, \ - init_face_, \ - load_face_, \ - done_face_, \ - get_interface_, \ - load_any_, \ - load_head_, \ - load_hhea_, \ - load_cmap_, \ - load_maxp_, \ - load_os2_, \ - load_post_, \ - load_name_, \ - free_name_, \ - load_kern_, \ - load_gasp_, \ - load_pclt_, \ - load_bhed_, \ - load_sbit_image_, \ - get_psname_, \ - free_psnames_, \ - get_kerning_, \ - load_font_dir_, \ - load_hmtx_, \ - load_eblc_, \ - free_eblc_, \ - set_sbit_strike_, \ - load_strike_metrics_, \ - get_metrics_, \ - get_name_, \ - }; - -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_INTERNAL( a, a_ ) \ - clazz->a = a_; - -#define FT_DEFINE_SFNT_INTERFACE( \ - class_, \ - goto_table_, \ - init_face_, \ - load_face_, \ - done_face_, \ - get_interface_, \ - load_any_, \ - load_head_, \ - load_hhea_, \ - load_cmap_, \ - load_maxp_, \ - load_os2_, \ - load_post_, \ - load_name_, \ - free_name_, \ - load_kern_, \ - load_gasp_, \ - load_pclt_, \ - load_bhed_, \ - load_sbit_image_, \ - get_psname_, \ - free_psnames_, \ - get_kerning_, \ - load_font_dir_, \ - load_hmtx_, \ - load_eblc_, \ - free_eblc_, \ - set_sbit_strike_, \ - load_strike_metrics_, \ - get_metrics_, \ - get_name_ ) \ - void \ - FT_Init_Class_ ## class_( FT_Library library, \ - SFNT_Interface* clazz ) \ - { \ - FT_UNUSED( library ); \ - \ - clazz->goto_table = goto_table_; \ - clazz->init_face = init_face_; \ - clazz->load_face = load_face_; \ - clazz->done_face = done_face_; \ - clazz->get_interface = get_interface_; \ - clazz->load_any = load_any_; \ - clazz->load_head = load_head_; \ - clazz->load_hhea = load_hhea_; \ - clazz->load_cmap = load_cmap_; \ - clazz->load_maxp = load_maxp_; \ - clazz->load_os2 = load_os2_; \ - clazz->load_post = load_post_; \ - clazz->load_name = load_name_; \ - clazz->free_name = free_name_; \ - clazz->load_kern = load_kern_; \ - clazz->load_gasp = load_gasp_; \ - clazz->load_pclt = load_pclt_; \ - clazz->load_bhed = load_bhed_; \ - clazz->load_sbit_image = load_sbit_image_; \ - clazz->get_psname = get_psname_; \ - clazz->free_psnames = free_psnames_; \ - clazz->get_kerning = get_kerning_; \ - clazz->load_font_dir = load_font_dir_; \ - clazz->load_hmtx = load_hmtx_; \ - clazz->load_eblc = load_eblc_; \ - clazz->free_eblc = free_eblc_; \ - clazz->set_sbit_strike = set_sbit_strike_; \ - clazz->load_strike_metrics = load_strike_metrics_; \ - clazz->get_metrics = get_metrics_; \ - clazz->get_name = get_name_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ - -FT_END_HEADER - -#endif /* SFNT_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/t1types.h b/builddir/freetype-2.7.0/include/freetype/internal/t1types.h deleted file mode 100644 index 494c011..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/t1types.h +++ /dev/null @@ -1,257 +0,0 @@ -/***************************************************************************/ -/* */ -/* t1types.h */ -/* */ -/* Basic Type1/Type2 type definitions and interface (specification */ -/* only). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef T1TYPES_H_ -#define T1TYPES_H_ - - -#include <ft2build.h> -#include FT_TYPE1_TABLES_H -#include FT_INTERNAL_POSTSCRIPT_HINTS_H -#include FT_INTERNAL_SERVICE_H -#include FT_INTERNAL_HASH_H -#include FT_SERVICE_POSTSCRIPT_CMAPS_H - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /*** ***/ - /*** ***/ - /*** REQUIRED TYPE1/TYPE2 TABLES DEFINITIONS ***/ - /*** ***/ - /*** ***/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* T1_EncodingRec */ - /* */ - /* <Description> */ - /* A structure modeling a custom encoding. */ - /* */ - /* <Fields> */ - /* num_chars :: The number of character codes in the encoding. */ - /* Usually 256. */ - /* */ - /* code_first :: The lowest valid character code in the encoding. */ - /* */ - /* code_last :: The highest valid character code in the encoding */ - /* + 1. When equal to code_first there are no valid */ - /* character codes. */ - /* */ - /* char_index :: An array of corresponding glyph indices. */ - /* */ - /* char_name :: An array of corresponding glyph names. */ - /* */ - typedef struct T1_EncodingRecRec_ - { - FT_Int num_chars; - FT_Int code_first; - FT_Int code_last; - - FT_UShort* char_index; - FT_String** char_name; - - } T1_EncodingRec, *T1_Encoding; - - - /* used to hold extra data of PS_FontInfoRec that - * cannot be stored in the publicly defined structure. - * - * Note these can't be blended with multiple-masters. - */ - typedef struct PS_FontExtraRec_ - { - FT_UShort fs_type; - - } PS_FontExtraRec; - - - typedef struct T1_FontRec_ - { - PS_FontInfoRec font_info; /* font info dictionary */ - PS_FontExtraRec font_extra; /* font info extra fields */ - PS_PrivateRec private_dict; /* private dictionary */ - FT_String* font_name; /* top-level dictionary */ - - T1_EncodingType encoding_type; - T1_EncodingRec encoding; - - FT_Byte* subrs_block; - FT_Byte* charstrings_block; - FT_Byte* glyph_names_block; - - FT_Int num_subrs; - FT_Byte** subrs; - FT_UInt* subrs_len; - FT_Hash subrs_hash; - - FT_Int num_glyphs; - FT_String** glyph_names; /* array of glyph names */ - FT_Byte** charstrings; /* array of glyph charstrings */ - FT_UInt* charstrings_len; - - FT_Byte paint_type; - FT_Byte font_type; - FT_Matrix font_matrix; - FT_Vector font_offset; - FT_BBox font_bbox; - FT_Long font_id; - - FT_Fixed stroke_width; - - } T1_FontRec, *T1_Font; - - - typedef struct CID_SubrsRec_ - { - FT_Int num_subrs; - FT_Byte** code; - - } CID_SubrsRec, *CID_Subrs; - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /*** ***/ - /*** ***/ - /*** AFM FONT INFORMATION STRUCTURES ***/ - /*** ***/ - /*** ***/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - typedef struct AFM_TrackKernRec_ - { - FT_Int degree; - FT_Fixed min_ptsize; - FT_Fixed min_kern; - FT_Fixed max_ptsize; - FT_Fixed max_kern; - - } AFM_TrackKernRec, *AFM_TrackKern; - - typedef struct AFM_KernPairRec_ - { - FT_UInt index1; - FT_UInt index2; - FT_Int x; - FT_Int y; - - } AFM_KernPairRec, *AFM_KernPair; - - typedef struct AFM_FontInfoRec_ - { - FT_Bool IsCIDFont; - FT_BBox FontBBox; - FT_Fixed Ascender; - FT_Fixed Descender; - AFM_TrackKern TrackKerns; /* free if non-NULL */ - FT_UInt NumTrackKern; - AFM_KernPair KernPairs; /* free if non-NULL */ - FT_UInt NumKernPair; - - } AFM_FontInfoRec, *AFM_FontInfo; - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /*** ***/ - /*** ***/ - /*** ORIGINAL T1_FACE CLASS DEFINITION ***/ - /*** ***/ - /*** ***/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - - typedef struct T1_FaceRec_* T1_Face; - typedef struct CID_FaceRec_* CID_Face; - - - typedef struct T1_FaceRec_ - { - FT_FaceRec root; - T1_FontRec type1; - const void* psnames; - const void* psaux; - const void* afm_data; - FT_CharMapRec charmaprecs[2]; - FT_CharMap charmaps[2]; - - /* support for Multiple Masters fonts */ - PS_Blend blend; - - /* undocumented, optional: indices of subroutines that express */ - /* the NormalizeDesignVector and the ConvertDesignVector procedure, */ - /* respectively, as Type 2 charstrings; -1 if keywords not present */ - FT_Int ndv_idx; - FT_Int cdv_idx; - - /* undocumented, optional: has the same meaning as len_buildchar */ - /* for Type 2 fonts; manipulated by othersubrs 19, 24, and 25 */ - FT_UInt len_buildchar; - FT_Long* buildchar; - - /* since version 2.1 - interface to PostScript hinter */ - const void* pshinter; - - } T1_FaceRec; - - - typedef struct CID_FaceRec_ - { - FT_FaceRec root; - void* psnames; - void* psaux; - CID_FaceInfoRec cid; - PS_FontExtraRec font_extra; -#if 0 - void* afm_data; -#endif - CID_Subrs subrs; - - /* since version 2.1 - interface to PostScript hinter */ - void* pshinter; - - /* since version 2.1.8, but was originally positioned after `afm_data' */ - FT_Byte* binary_data; /* used if hex data has been converted */ - FT_Stream cid_stream; - - } CID_FaceRec; - - -FT_END_HEADER - -#endif /* T1TYPES_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/internal/tttypes.h b/builddir/freetype-2.7.0/include/freetype/internal/tttypes.h deleted file mode 100644 index 4ed980b..0000000 --- a/builddir/freetype-2.7.0/include/freetype/internal/tttypes.h +++ /dev/null @@ -1,1528 +0,0 @@ -/***************************************************************************/ -/* */ -/* tttypes.h */ -/* */ -/* Basic SFNT/TrueType type definitions and interface (specification */ -/* only). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef TTTYPES_H_ -#define TTTYPES_H_ - - -#include <ft2build.h> -#include FT_TRUETYPE_TABLES_H -#include FT_INTERNAL_OBJECTS_H - -#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT -#include FT_MULTIPLE_MASTERS_H -#endif - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /*** ***/ - /*** ***/ - /*** REQUIRED TRUETYPE/OPENTYPE TABLES DEFINITIONS ***/ - /*** ***/ - /*** ***/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TTC_HeaderRec */ - /* */ - /* <Description> */ - /* TrueType collection header. This table contains the offsets of */ - /* the font headers of each distinct TrueType face in the file. */ - /* */ - /* <Fields> */ - /* tag :: Must be `ttc ' to indicate a TrueType collection. */ - /* */ - /* version :: The version number. */ - /* */ - /* count :: The number of faces in the collection. The */ - /* specification says this should be an unsigned long, but */ - /* we use a signed long since we need the value -1 for */ - /* specific purposes. */ - /* */ - /* offsets :: The offsets of the font headers, one per face. */ - /* */ - typedef struct TTC_HeaderRec_ - { - FT_ULong tag; - FT_Fixed version; - FT_Long count; - FT_ULong* offsets; - - } TTC_HeaderRec; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* SFNT_HeaderRec */ - /* */ - /* <Description> */ - /* SFNT file format header. */ - /* */ - /* <Fields> */ - /* format_tag :: The font format tag. */ - /* */ - /* num_tables :: The number of tables in file. */ - /* */ - /* search_range :: Must be `16 * (max power of 2 <= num_tables)'. */ - /* */ - /* entry_selector :: Must be log2 of `search_range / 16'. */ - /* */ - /* range_shift :: Must be `num_tables * 16 - search_range'. */ - /* */ - typedef struct SFNT_HeaderRec_ - { - FT_ULong format_tag; - FT_UShort num_tables; - FT_UShort search_range; - FT_UShort entry_selector; - FT_UShort range_shift; - - FT_ULong offset; /* not in file */ - - } SFNT_HeaderRec, *SFNT_Header; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_TableRec */ - /* */ - /* <Description> */ - /* This structure describes a given table of a TrueType font. */ - /* */ - /* <Fields> */ - /* Tag :: A four-bytes tag describing the table. */ - /* */ - /* CheckSum :: The table checksum. This value can be ignored. */ - /* */ - /* Offset :: The offset of the table from the start of the TrueType */ - /* font in its resource. */ - /* */ - /* Length :: The table length (in bytes). */ - /* */ - typedef struct TT_TableRec_ - { - FT_ULong Tag; /* table type */ - FT_ULong CheckSum; /* table checksum */ - FT_ULong Offset; /* table file offset */ - FT_ULong Length; /* table length */ - - } TT_TableRec, *TT_Table; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* WOFF_HeaderRec */ - /* */ - /* <Description> */ - /* WOFF file format header. */ - /* */ - /* <Fields> */ - /* See */ - /* */ - /* http://www.w3.org/TR/WOFF/#WOFFHeader */ - /* */ - typedef struct WOFF_HeaderRec_ - { - FT_ULong signature; - FT_ULong flavor; - FT_ULong length; - FT_UShort num_tables; - FT_UShort reserved; - FT_ULong totalSfntSize; - FT_UShort majorVersion; - FT_UShort minorVersion; - FT_ULong metaOffset; - FT_ULong metaLength; - FT_ULong metaOrigLength; - FT_ULong privOffset; - FT_ULong privLength; - - } WOFF_HeaderRec, *WOFF_Header; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* WOFF_TableRec */ - /* */ - /* <Description> */ - /* This structure describes a given table of a WOFF font. */ - /* */ - /* <Fields> */ - /* Tag :: A four-bytes tag describing the table. */ - /* */ - /* Offset :: The offset of the table from the start of the WOFF */ - /* font in its resource. */ - /* */ - /* CompLength :: Compressed table length (in bytes). */ - /* */ - /* OrigLength :: Uncompressed table length (in bytes). */ - /* */ - /* CheckSum :: The table checksum. This value can be ignored. */ - /* */ - /* OrigOffset :: The uncompressed table file offset. This value gets */ - /* computed while constructing the (uncompressed) SFNT */ - /* header. It is not contained in the WOFF file. */ - /* */ - typedef struct WOFF_TableRec_ - { - FT_ULong Tag; /* table ID */ - FT_ULong Offset; /* table file offset */ - FT_ULong CompLength; /* compressed table length */ - FT_ULong OrigLength; /* uncompressed table length */ - FT_ULong CheckSum; /* uncompressed checksum */ - - FT_ULong OrigOffset; /* uncompressed table file offset */ - /* (not in the WOFF file) */ - } WOFF_TableRec, *WOFF_Table; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_LongMetricsRec */ - /* */ - /* <Description> */ - /* A structure modeling the long metrics of the `hmtx' and `vmtx' */ - /* TrueType tables. The values are expressed in font units. */ - /* */ - /* <Fields> */ - /* advance :: The advance width or height for the glyph. */ - /* */ - /* bearing :: The left-side or top-side bearing for the glyph. */ - /* */ - typedef struct TT_LongMetricsRec_ - { - FT_UShort advance; - FT_Short bearing; - - } TT_LongMetricsRec, *TT_LongMetrics; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* TT_ShortMetrics */ - /* */ - /* <Description> */ - /* A simple type to model the short metrics of the `hmtx' and `vmtx' */ - /* tables. */ - /* */ - typedef FT_Short TT_ShortMetrics; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_NameEntryRec */ - /* */ - /* <Description> */ - /* A structure modeling TrueType name records. Name records are used */ - /* to store important strings like family name, style name, */ - /* copyright, etc. in _localized_ versions (i.e., language, encoding, */ - /* etc). */ - /* */ - /* <Fields> */ - /* platformID :: The ID of the name's encoding platform. */ - /* */ - /* encodingID :: The platform-specific ID for the name's encoding. */ - /* */ - /* languageID :: The platform-specific ID for the name's language. */ - /* */ - /* nameID :: The ID specifying what kind of name this is. */ - /* */ - /* stringLength :: The length of the string in bytes. */ - /* */ - /* stringOffset :: The offset to the string in the `name' table. */ - /* */ - /* string :: A pointer to the string's bytes. Note that these */ - /* are usually UTF-16 encoded characters. */ - /* */ - typedef struct TT_NameEntryRec_ - { - FT_UShort platformID; - FT_UShort encodingID; - FT_UShort languageID; - FT_UShort nameID; - FT_UShort stringLength; - FT_ULong stringOffset; - - /* this last field is not defined in the spec */ - /* but used by the FreeType engine */ - - FT_Byte* string; - - } TT_NameEntryRec, *TT_NameEntry; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_NameTableRec */ - /* */ - /* <Description> */ - /* A structure modeling the TrueType name table. */ - /* */ - /* <Fields> */ - /* format :: The format of the name table. */ - /* */ - /* numNameRecords :: The number of names in table. */ - /* */ - /* storageOffset :: The offset of the name table in the `name' */ - /* TrueType table. */ - /* */ - /* names :: An array of name records. */ - /* */ - /* stream :: the file's input stream. */ - /* */ - typedef struct TT_NameTableRec_ - { - FT_UShort format; - FT_UInt numNameRecords; - FT_UInt storageOffset; - TT_NameEntryRec* names; - FT_Stream stream; - - } TT_NameTableRec, *TT_NameTable; - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /*** ***/ - /*** ***/ - /*** OPTIONAL TRUETYPE/OPENTYPE TABLES DEFINITIONS ***/ - /*** ***/ - /*** ***/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_GaspRangeRec */ - /* */ - /* <Description> */ - /* A tiny structure used to model a gasp range according to the */ - /* TrueType specification. */ - /* */ - /* <Fields> */ - /* maxPPEM :: The maximum ppem value to which `gaspFlag' applies. */ - /* */ - /* gaspFlag :: A flag describing the grid-fitting and anti-aliasing */ - /* modes to be used. */ - /* */ - typedef struct TT_GaspRangeRec_ - { - FT_UShort maxPPEM; - FT_UShort gaspFlag; - - } TT_GaspRangeRec, *TT_GaspRange; - - -#define TT_GASP_GRIDFIT 0x01 -#define TT_GASP_DOGRAY 0x02 - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_GaspRec */ - /* */ - /* <Description> */ - /* A structure modeling the TrueType `gasp' table used to specify */ - /* grid-fitting and anti-aliasing behaviour. */ - /* */ - /* <Fields> */ - /* version :: The version number. */ - /* */ - /* numRanges :: The number of gasp ranges in table. */ - /* */ - /* gaspRanges :: An array of gasp ranges. */ - /* */ - typedef struct TT_Gasp_ - { - FT_UShort version; - FT_UShort numRanges; - TT_GaspRange gaspRanges; - - } TT_GaspRec; - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /*** ***/ - /*** ***/ - /*** EMBEDDED BITMAPS SUPPORT ***/ - /*** ***/ - /*** ***/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_SBit_MetricsRec */ - /* */ - /* <Description> */ - /* A structure used to hold the big metrics of a given glyph bitmap */ - /* in a TrueType or OpenType font. These are usually found in the */ - /* `EBDT' (Microsoft) or `bloc' (Apple) table. */ - /* */ - /* <Fields> */ - /* height :: The glyph height in pixels. */ - /* */ - /* width :: The glyph width in pixels. */ - /* */ - /* horiBearingX :: The horizontal left bearing. */ - /* */ - /* horiBearingY :: The horizontal top bearing. */ - /* */ - /* horiAdvance :: The horizontal advance. */ - /* */ - /* vertBearingX :: The vertical left bearing. */ - /* */ - /* vertBearingY :: The vertical top bearing. */ - /* */ - /* vertAdvance :: The vertical advance. */ - /* */ - typedef struct TT_SBit_MetricsRec_ - { - FT_UShort height; - FT_UShort width; - - FT_Short horiBearingX; - FT_Short horiBearingY; - FT_UShort horiAdvance; - - FT_Short vertBearingX; - FT_Short vertBearingY; - FT_UShort vertAdvance; - - } TT_SBit_MetricsRec, *TT_SBit_Metrics; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_SBit_SmallMetricsRec */ - /* */ - /* <Description> */ - /* A structure used to hold the small metrics of a given glyph bitmap */ - /* in a TrueType or OpenType font. These are usually found in the */ - /* `EBDT' (Microsoft) or the `bdat' (Apple) table. */ - /* */ - /* <Fields> */ - /* height :: The glyph height in pixels. */ - /* */ - /* width :: The glyph width in pixels. */ - /* */ - /* bearingX :: The left-side bearing. */ - /* */ - /* bearingY :: The top-side bearing. */ - /* */ - /* advance :: The advance width or height. */ - /* */ - typedef struct TT_SBit_Small_Metrics_ - { - FT_Byte height; - FT_Byte width; - - FT_Char bearingX; - FT_Char bearingY; - FT_Byte advance; - - } TT_SBit_SmallMetricsRec, *TT_SBit_SmallMetrics; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_SBit_LineMetricsRec */ - /* */ - /* <Description> */ - /* A structure used to describe the text line metrics of a given */ - /* bitmap strike, for either a horizontal or vertical layout. */ - /* */ - /* <Fields> */ - /* ascender :: The ascender in pixels. */ - /* */ - /* descender :: The descender in pixels. */ - /* */ - /* max_width :: The maximum glyph width in pixels. */ - /* */ - /* caret_slope_enumerator :: Rise of the caret slope, typically set */ - /* to 1 for non-italic fonts. */ - /* */ - /* caret_slope_denominator :: Rise of the caret slope, typically set */ - /* to 0 for non-italic fonts. */ - /* */ - /* caret_offset :: Offset in pixels to move the caret for */ - /* proper positioning. */ - /* */ - /* min_origin_SB :: Minimum of horiBearingX (resp. */ - /* vertBearingY). */ - /* min_advance_SB :: Minimum of */ - /* */ - /* horizontal advance - */ - /* ( horiBearingX + width ) */ - /* */ - /* resp. */ - /* */ - /* vertical advance - */ - /* ( vertBearingY + height ) */ - /* */ - /* max_before_BL :: Maximum of horiBearingY (resp. */ - /* vertBearingY). */ - /* */ - /* min_after_BL :: Minimum of */ - /* */ - /* horiBearingY - height */ - /* */ - /* resp. */ - /* */ - /* vertBearingX - width */ - /* */ - /* pads :: Unused (to make the size of the record */ - /* a multiple of 32 bits. */ - /* */ - typedef struct TT_SBit_LineMetricsRec_ - { - FT_Char ascender; - FT_Char descender; - FT_Byte max_width; - FT_Char caret_slope_numerator; - FT_Char caret_slope_denominator; - FT_Char caret_offset; - FT_Char min_origin_SB; - FT_Char min_advance_SB; - FT_Char max_before_BL; - FT_Char min_after_BL; - FT_Char pads[2]; - - } TT_SBit_LineMetricsRec, *TT_SBit_LineMetrics; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_SBit_RangeRec */ - /* */ - /* <Description> */ - /* A TrueType/OpenType subIndexTable as defined in the `EBLC' */ - /* (Microsoft) or `bloc' (Apple) tables. */ - /* */ - /* <Fields> */ - /* first_glyph :: The first glyph index in the range. */ - /* */ - /* last_glyph :: The last glyph index in the range. */ - /* */ - /* index_format :: The format of index table. Valid values are 1 */ - /* to 5. */ - /* */ - /* image_format :: The format of `EBDT' image data. */ - /* */ - /* image_offset :: The offset to image data in `EBDT'. */ - /* */ - /* image_size :: For index formats 2 and 5. This is the size in */ - /* bytes of each glyph bitmap. */ - /* */ - /* big_metrics :: For index formats 2 and 5. This is the big */ - /* metrics for each glyph bitmap. */ - /* */ - /* num_glyphs :: For index formats 4 and 5. This is the number of */ - /* glyphs in the code array. */ - /* */ - /* glyph_offsets :: For index formats 1 and 3. */ - /* */ - /* glyph_codes :: For index formats 4 and 5. */ - /* */ - /* table_offset :: The offset of the index table in the `EBLC' */ - /* table. Only used during strike loading. */ - /* */ - typedef struct TT_SBit_RangeRec_ - { - FT_UShort first_glyph; - FT_UShort last_glyph; - - FT_UShort index_format; - FT_UShort image_format; - FT_ULong image_offset; - - FT_ULong image_size; - TT_SBit_MetricsRec metrics; - FT_ULong num_glyphs; - - FT_ULong* glyph_offsets; - FT_UShort* glyph_codes; - - FT_ULong table_offset; - - } TT_SBit_RangeRec, *TT_SBit_Range; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_SBit_StrikeRec */ - /* */ - /* <Description> */ - /* A structure used describe a given bitmap strike in the `EBLC' */ - /* (Microsoft) or `bloc' (Apple) tables. */ - /* */ - /* <Fields> */ - /* num_index_ranges :: The number of index ranges. */ - /* */ - /* index_ranges :: An array of glyph index ranges. */ - /* */ - /* color_ref :: Unused. `color_ref' is put in for future */ - /* enhancements, but these fields are already */ - /* in use by other platforms (e.g. Newton). */ - /* For details, please see */ - /* */ - /* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6bloc.html */ - /* */ - /* hori :: The line metrics for horizontal layouts. */ - /* */ - /* vert :: The line metrics for vertical layouts. */ - /* */ - /* start_glyph :: The lowest glyph index for this strike. */ - /* */ - /* end_glyph :: The highest glyph index for this strike. */ - /* */ - /* x_ppem :: The number of horizontal pixels per EM. */ - /* */ - /* y_ppem :: The number of vertical pixels per EM. */ - /* */ - /* bit_depth :: The bit depth. Valid values are 1, 2, 4, */ - /* and 8. */ - /* */ - /* flags :: Is this a vertical or horizontal strike? For */ - /* details, please see */ - /* */ - /* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6bloc.html */ - /* */ - typedef struct TT_SBit_StrikeRec_ - { - FT_Int num_ranges; - TT_SBit_Range sbit_ranges; - FT_ULong ranges_offset; - - FT_ULong color_ref; - - TT_SBit_LineMetricsRec hori; - TT_SBit_LineMetricsRec vert; - - FT_UShort start_glyph; - FT_UShort end_glyph; - - FT_Byte x_ppem; - FT_Byte y_ppem; - - FT_Byte bit_depth; - FT_Char flags; - - } TT_SBit_StrikeRec, *TT_SBit_Strike; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_SBit_ComponentRec */ - /* */ - /* <Description> */ - /* A simple structure to describe a compound sbit element. */ - /* */ - /* <Fields> */ - /* glyph_code :: The element's glyph index. */ - /* */ - /* x_offset :: The element's left bearing. */ - /* */ - /* y_offset :: The element's top bearing. */ - /* */ - typedef struct TT_SBit_ComponentRec_ - { - FT_UShort glyph_code; - FT_Char x_offset; - FT_Char y_offset; - - } TT_SBit_ComponentRec, *TT_SBit_Component; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_SBit_ScaleRec */ - /* */ - /* <Description> */ - /* A structure used describe a given bitmap scaling table, as defined */ - /* in the `EBSC' table. */ - /* */ - /* <Fields> */ - /* hori :: The horizontal line metrics. */ - /* */ - /* vert :: The vertical line metrics. */ - /* */ - /* x_ppem :: The number of horizontal pixels per EM. */ - /* */ - /* y_ppem :: The number of vertical pixels per EM. */ - /* */ - /* x_ppem_substitute :: Substitution x_ppem value. */ - /* */ - /* y_ppem_substitute :: Substitution y_ppem value. */ - /* */ - typedef struct TT_SBit_ScaleRec_ - { - TT_SBit_LineMetricsRec hori; - TT_SBit_LineMetricsRec vert; - - FT_Byte x_ppem; - FT_Byte y_ppem; - - FT_Byte x_ppem_substitute; - FT_Byte y_ppem_substitute; - - } TT_SBit_ScaleRec, *TT_SBit_Scale; - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /*** ***/ - /*** ***/ - /*** POSTSCRIPT GLYPH NAMES SUPPORT ***/ - /*** ***/ - /*** ***/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_Post_20Rec */ - /* */ - /* <Description> */ - /* Postscript names sub-table, format 2.0. Stores the PS name of */ - /* each glyph in the font face. */ - /* */ - /* <Fields> */ - /* num_glyphs :: The number of named glyphs in the table. */ - /* */ - /* num_names :: The number of PS names stored in the table. */ - /* */ - /* glyph_indices :: The indices of the glyphs in the names arrays. */ - /* */ - /* glyph_names :: The PS names not in Mac Encoding. */ - /* */ - typedef struct TT_Post_20Rec_ - { - FT_UShort num_glyphs; - FT_UShort num_names; - FT_UShort* glyph_indices; - FT_Char** glyph_names; - - } TT_Post_20Rec, *TT_Post_20; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_Post_25Rec */ - /* */ - /* <Description> */ - /* Postscript names sub-table, format 2.5. Stores the PS name of */ - /* each glyph in the font face. */ - /* */ - /* <Fields> */ - /* num_glyphs :: The number of glyphs in the table. */ - /* */ - /* offsets :: An array of signed offsets in a normal Mac */ - /* Postscript name encoding. */ - /* */ - typedef struct TT_Post_25_ - { - FT_UShort num_glyphs; - FT_Char* offsets; - - } TT_Post_25Rec, *TT_Post_25; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_Post_NamesRec */ - /* */ - /* <Description> */ - /* Postscript names table, either format 2.0 or 2.5. */ - /* */ - /* <Fields> */ - /* loaded :: A flag to indicate whether the PS names are loaded. */ - /* */ - /* format_20 :: The sub-table used for format 2.0. */ - /* */ - /* format_25 :: The sub-table used for format 2.5. */ - /* */ - typedef struct TT_Post_NamesRec_ - { - FT_Bool loaded; - - union - { - TT_Post_20Rec format_20; - TT_Post_25Rec format_25; - - } names; - - } TT_Post_NamesRec, *TT_Post_Names; - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /*** ***/ - /*** ***/ - /*** GX VARIATION TABLE SUPPORT ***/ - /*** ***/ - /*** ***/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - -#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT - typedef struct GX_BlendRec_ *GX_Blend; -#endif - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /*** ***/ - /*** ***/ - /*** EMBEDDED BDF PROPERTIES TABLE SUPPORT ***/ - /*** ***/ - /*** ***/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - /* - * These types are used to support a `BDF ' table that isn't part of the - * official TrueType specification. It is mainly used in SFNT-based - * bitmap fonts that were generated from a set of BDF fonts. - * - * The format of the table is as follows. - * - * USHORT version `BDF ' table version number, should be 0x0001. - * USHORT strikeCount Number of strikes (bitmap sizes) in this table. - * ULONG stringTable Offset (from start of BDF table) to string - * table. - * - * This is followed by an array of `strikeCount' descriptors, having the - * following format. - * - * USHORT ppem Vertical pixels per EM for this strike. - * USHORT numItems Number of items for this strike (properties and - * atoms). Maximum is 255. - * - * This array in turn is followed by `strikeCount' value sets. Each - * `value set' is an array of `numItems' items with the following format. - * - * ULONG item_name Offset in string table to item name. - * USHORT item_type The item type. Possible values are - * 0 => string (e.g., COMMENT) - * 1 => atom (e.g., FONT or even SIZE) - * 2 => int32 - * 3 => uint32 - * 0x10 => A flag to indicate a properties. This - * is ORed with the above values. - * ULONG item_value For strings => Offset into string table without - * the corresponding double quotes. - * For atoms => Offset into string table. - * For integers => Direct value. - * - * All strings in the string table consist of bytes and are - * zero-terminated. - * - */ - -#ifdef TT_CONFIG_OPTION_BDF - - typedef struct TT_BDFRec_ - { - FT_Byte* table; - FT_Byte* table_end; - FT_Byte* strings; - FT_ULong strings_size; - FT_UInt num_strikes; - FT_Bool loaded; - - } TT_BDFRec, *TT_BDF; - -#endif /* TT_CONFIG_OPTION_BDF */ - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /*** ***/ - /*** ***/ - /*** ORIGINAL TT_FACE CLASS DEFINITION ***/ - /*** ***/ - /*** ***/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* This structure/class is defined here because it is common to the */ - /* following formats: TTF, OpenType-TT, and OpenType-CFF. */ - /* */ - /* Note, however, that the classes TT_Size and TT_GlyphSlot are not */ - /* shared between font drivers, and are thus defined in `ttobjs.h'. */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* TT_Face */ - /* */ - /* <Description> */ - /* A handle to a TrueType face/font object. A TT_Face encapsulates */ - /* the resolution and scaling independent parts of a TrueType font */ - /* resource. */ - /* */ - /* <Note> */ - /* The TT_Face structure is also used as a `parent class' for the */ - /* OpenType-CFF class (T2_Face). */ - /* */ - typedef struct TT_FaceRec_* TT_Face; - - - /* a function type used for the truetype bytecode interpreter hooks */ - typedef FT_Error - (*TT_Interpreter)( void* exec_context ); - - /* forward declaration */ - typedef struct TT_LoaderRec_* TT_Loader; - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Loader_GotoTableFunc */ - /* */ - /* <Description> */ - /* Seeks a stream to the start of a given TrueType table. */ - /* */ - /* <Input> */ - /* face :: A handle to the target face object. */ - /* */ - /* tag :: A 4-byte tag used to name the table. */ - /* */ - /* stream :: The input stream. */ - /* */ - /* <Output> */ - /* length :: The length of the table in bytes. Set to 0 if not */ - /* needed. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - /* <Note> */ - /* The stream cursor must be at the font file's origin. */ - /* */ - typedef FT_Error - (*TT_Loader_GotoTableFunc)( TT_Face face, - FT_ULong tag, - FT_Stream stream, - FT_ULong* length ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Loader_StartGlyphFunc */ - /* */ - /* <Description> */ - /* Seeks a stream to the start of a given glyph element, and opens a */ - /* frame for it. */ - /* */ - /* <Input> */ - /* loader :: The current TrueType glyph loader object. */ - /* */ - /* glyph index :: The index of the glyph to access. */ - /* */ - /* offset :: The offset of the glyph according to the */ - /* `locations' table. */ - /* */ - /* byte_count :: The size of the frame in bytes. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - /* <Note> */ - /* This function is normally equivalent to FT_STREAM_SEEK(offset) */ - /* followed by FT_FRAME_ENTER(byte_count) with the loader's stream, */ - /* but alternative formats (e.g. compressed ones) might use something */ - /* different. */ - /* */ - typedef FT_Error - (*TT_Loader_StartGlyphFunc)( TT_Loader loader, - FT_UInt glyph_index, - FT_ULong offset, - FT_UInt byte_count ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Loader_ReadGlyphFunc */ - /* */ - /* <Description> */ - /* Reads one glyph element (its header, a simple glyph, or a */ - /* composite) from the loader's current stream frame. */ - /* */ - /* <Input> */ - /* loader :: The current TrueType glyph loader object. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - typedef FT_Error - (*TT_Loader_ReadGlyphFunc)( TT_Loader loader ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Loader_EndGlyphFunc */ - /* */ - /* <Description> */ - /* Closes the current loader stream frame for the glyph. */ - /* */ - /* <Input> */ - /* loader :: The current TrueType glyph loader object. */ - /* */ - typedef void - (*TT_Loader_EndGlyphFunc)( TT_Loader loader ); - - - typedef enum TT_SbitTableType_ - { - TT_SBIT_TABLE_TYPE_NONE = 0, - TT_SBIT_TABLE_TYPE_EBLC, /* `EBLC' (Microsoft), */ - /* `bloc' (Apple) */ - TT_SBIT_TABLE_TYPE_CBLC, /* `CBLC' (Google) */ - TT_SBIT_TABLE_TYPE_SBIX, /* `sbix' (Apple) */ - - /* do not remove */ - TT_SBIT_TABLE_TYPE_MAX - - } TT_SbitTableType; - - - /*************************************************************************/ - /* */ - /* TrueType Face Type */ - /* */ - /* <Struct> */ - /* TT_Face */ - /* */ - /* <Description> */ - /* The TrueType face class. These objects model the resolution and */ - /* point-size independent data found in a TrueType font file. */ - /* */ - /* <Fields> */ - /* root :: The base FT_Face structure, managed by the */ - /* base layer. */ - /* */ - /* ttc_header :: The TrueType collection header, used when */ - /* the file is a `ttc' rather than a `ttf'. */ - /* For ordinary font files, the field */ - /* `ttc_header.count' is set to 0. */ - /* */ - /* format_tag :: The font format tag. */ - /* */ - /* num_tables :: The number of TrueType tables in this font */ - /* file. */ - /* */ - /* dir_tables :: The directory of TrueType tables for this */ - /* font file. */ - /* */ - /* header :: The font's font header (`head' table). */ - /* Read on font opening. */ - /* */ - /* horizontal :: The font's horizontal header (`hhea' */ - /* table). This field also contains the */ - /* associated horizontal metrics table */ - /* (`hmtx'). */ - /* */ - /* max_profile :: The font's maximum profile table. Read on */ - /* font opening. Note that some maximum */ - /* values cannot be taken directly from this */ - /* table. We thus define additional fields */ - /* below to hold the computed maxima. */ - /* */ - /* vertical_info :: A boolean which is set when the font file */ - /* contains vertical metrics. If not, the */ - /* value of the `vertical' field is */ - /* undefined. */ - /* */ - /* vertical :: The font's vertical header (`vhea' table). */ - /* This field also contains the associated */ - /* vertical metrics table (`vmtx'), if found. */ - /* IMPORTANT: The contents of this field is */ - /* undefined if the `vertical_info' field is */ - /* unset. */ - /* */ - /* num_names :: The number of name records within this */ - /* TrueType font. */ - /* */ - /* name_table :: The table of name records (`name'). */ - /* */ - /* os2 :: The font's OS/2 table (`OS/2'). */ - /* */ - /* postscript :: The font's PostScript table (`post' */ - /* table). The PostScript glyph names are */ - /* not loaded by the driver on face opening. */ - /* See the `ttpost' module for more details. */ - /* */ - /* cmap_table :: Address of the face's `cmap' SFNT table */ - /* in memory (it's an extracted frame). */ - /* */ - /* cmap_size :: The size in bytes of the `cmap_table' */ - /* described above. */ - /* */ - /* goto_table :: A function called by each TrueType table */ - /* loader to position a stream's cursor to */ - /* the start of a given table according to */ - /* its tag. It defaults to TT_Goto_Face but */ - /* can be different for strange formats (e.g. */ - /* Type 42). */ - /* */ - /* access_glyph_frame :: A function used to access the frame of a */ - /* given glyph within the face's font file. */ - /* */ - /* forget_glyph_frame :: A function used to forget the frame of a */ - /* given glyph when all data has been loaded. */ - /* */ - /* read_glyph_header :: A function used to read a glyph header. */ - /* It must be called between an `access' and */ - /* `forget'. */ - /* */ - /* read_simple_glyph :: A function used to read a simple glyph. */ - /* It must be called after the header was */ - /* read, and before the `forget'. */ - /* */ - /* read_composite_glyph :: A function used to read a composite glyph. */ - /* It must be called after the header was */ - /* read, and before the `forget'. */ - /* */ - /* sfnt :: A pointer to the SFNT service. */ - /* */ - /* psnames :: A pointer to the PostScript names service. */ - /* */ - /* hdmx :: The face's horizontal device metrics */ - /* (`hdmx' table). This table is optional in */ - /* TrueType/OpenType fonts. */ - /* */ - /* gasp :: The grid-fitting and scaling properties */ - /* table (`gasp'). This table is optional in */ - /* TrueType/OpenType fonts. */ - /* */ - /* pclt :: The `pclt' SFNT table. */ - /* */ - /* num_sbit_scales :: The number of sbit scales for this font. */ - /* */ - /* sbit_scales :: Array of sbit scales embedded in this */ - /* font. This table is optional in a */ - /* TrueType/OpenType font. */ - /* */ - /* postscript_names :: A table used to store the Postscript names */ - /* of the glyphs for this font. See the */ - /* file `ttconfig.h' for comments on the */ - /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES option. */ - /* */ - /* num_locations :: The number of glyph locations in this */ - /* TrueType file. This should be */ - /* identical to the number of glyphs. */ - /* Ignored for Type 2 fonts. */ - /* */ - /* glyph_locations :: An array of longs. These are offsets to */ - /* glyph data within the `glyf' table. */ - /* Ignored for Type 2 font faces. */ - /* */ - /* glyf_len :: The length of the `glyf' table. Needed */ - /* for malformed `loca' tables. */ - /* */ - /* font_program_size :: Size in bytecodes of the face's font */ - /* program. 0 if none defined. Ignored for */ - /* Type 2 fonts. */ - /* */ - /* font_program :: The face's font program (bytecode stream) */ - /* executed at load time, also used during */ - /* glyph rendering. Comes from the `fpgm' */ - /* table. Ignored for Type 2 font fonts. */ - /* */ - /* cvt_program_size :: The size in bytecodes of the face's cvt */ - /* program. Ignored for Type 2 fonts. */ - /* */ - /* cvt_program :: The face's cvt program (bytecode stream) */ - /* executed each time an instance/size is */ - /* changed/reset. Comes from the `prep' */ - /* table. Ignored for Type 2 fonts. */ - /* */ - /* cvt_size :: Size of the control value table (in */ - /* entries). Ignored for Type 2 fonts. */ - /* */ - /* cvt :: The face's original control value table. */ - /* Coordinates are expressed in unscaled font */ - /* units. Comes from the `cvt ' table. */ - /* Ignored for Type 2 fonts. */ - /* */ - /* num_kern_pairs :: The number of kerning pairs present in the */ - /* font file. The engine only loads the */ - /* first horizontal format 0 kern table it */ - /* finds in the font file. Ignored for */ - /* Type 2 fonts. */ - /* */ - /* kern_table_index :: The index of the kerning table in the font */ - /* kerning directory. Ignored for Type 2 */ - /* fonts. */ - /* */ - /* interpreter :: A pointer to the TrueType bytecode */ - /* interpreters field is also used to hook */ - /* the debugger in `ttdebug'. */ - /* */ - /* doblend :: A boolean which is set if the font should */ - /* be blended (this is for GX var). */ - /* */ - /* blend :: Contains the data needed to control GX */ - /* variation tables (rather like Multiple */ - /* Master data). */ - /* */ - /* extra :: Reserved for third-party font drivers. */ - /* */ - /* postscript_name :: The PS name of the font. Used by the */ - /* postscript name service. */ - /* */ - typedef struct TT_FaceRec_ - { - FT_FaceRec root; - - TTC_HeaderRec ttc_header; - - FT_ULong format_tag; - FT_UShort num_tables; - TT_Table dir_tables; - - TT_Header header; /* TrueType header table */ - TT_HoriHeader horizontal; /* TrueType horizontal header */ - - TT_MaxProfile max_profile; - - FT_Bool vertical_info; - TT_VertHeader vertical; /* TT Vertical header, if present */ - - FT_UShort num_names; /* number of name records */ - TT_NameTableRec name_table; /* name table */ - - TT_OS2 os2; /* TrueType OS/2 table */ - TT_Postscript postscript; /* TrueType Postscript table */ - - FT_Byte* cmap_table; /* extracted `cmap' table */ - FT_ULong cmap_size; - - TT_Loader_GotoTableFunc goto_table; - - TT_Loader_StartGlyphFunc access_glyph_frame; - TT_Loader_EndGlyphFunc forget_glyph_frame; - TT_Loader_ReadGlyphFunc read_glyph_header; - TT_Loader_ReadGlyphFunc read_simple_glyph; - TT_Loader_ReadGlyphFunc read_composite_glyph; - - /* a typeless pointer to the SFNT_Interface table used to load */ - /* the basic TrueType tables in the face object */ - void* sfnt; - - /* a typeless pointer to the FT_Service_PsCMapsRec table used to */ - /* handle glyph names <-> unicode & Mac values */ - void* psnames; - - - /***********************************************************************/ - /* */ - /* Optional TrueType/OpenType tables */ - /* */ - /***********************************************************************/ - - /* grid-fitting and scaling table */ - TT_GaspRec gasp; /* the `gasp' table */ - - /* PCL 5 table */ - TT_PCLT pclt; - - /* embedded bitmaps support */ - FT_ULong num_sbit_scales; - TT_SBit_Scale sbit_scales; - - /* postscript names table */ - TT_Post_NamesRec postscript_names; - - - /***********************************************************************/ - /* */ - /* TrueType-specific fields (ignored by the OTF-Type2 driver) */ - /* */ - /***********************************************************************/ - - /* the font program, if any */ - FT_ULong font_program_size; - FT_Byte* font_program; - - /* the cvt program, if any */ - FT_ULong cvt_program_size; - FT_Byte* cvt_program; - - /* the original, unscaled, control value table */ - FT_ULong cvt_size; - FT_Short* cvt; - - /* A pointer to the bytecode interpreter to use. This is also */ - /* used to hook the debugger for the `ttdebug' utility. */ - TT_Interpreter interpreter; - - - /***********************************************************************/ - /* */ - /* Other tables or fields. This is used by derivative formats like */ - /* OpenType. */ - /* */ - /***********************************************************************/ - - FT_Generic extra; - - const char* postscript_name; - - FT_ULong glyf_len; - -#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT - FT_Bool doblend; - GX_Blend blend; -#endif - - /* since version 2.2 */ - - FT_Byte* horz_metrics; - FT_ULong horz_metrics_size; - - FT_Byte* vert_metrics; - FT_ULong vert_metrics_size; - - FT_ULong num_locations; /* in broken TTF, gid > 0xFFFF */ - FT_Byte* glyph_locations; - - FT_Byte* hdmx_table; - FT_ULong hdmx_table_size; - FT_UInt hdmx_record_count; - FT_ULong hdmx_record_size; - FT_Byte* hdmx_record_sizes; - - FT_Byte* sbit_table; - FT_ULong sbit_table_size; - TT_SbitTableType sbit_table_type; - FT_UInt sbit_num_strikes; - - FT_Byte* kern_table; - FT_ULong kern_table_size; - FT_UInt num_kern_tables; - FT_UInt32 kern_avail_bits; - FT_UInt32 kern_order_bits; - -#ifdef TT_CONFIG_OPTION_BDF - TT_BDFRec bdf; -#endif /* TT_CONFIG_OPTION_BDF */ - - /* since 2.3.0 */ - FT_ULong horz_metrics_offset; - FT_ULong vert_metrics_offset; - -#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY - /* since 2.4.12 */ - FT_ULong sph_found_func_flags; /* special functions found */ - /* for this face */ - FT_Bool sph_compatibility_mode; -#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */ - -#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS - /* since 2.7 */ - FT_ULong ebdt_start; /* either `CBDT', `EBDT', or `bdat' */ - FT_ULong ebdt_size; -#endif - - } TT_FaceRec; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_GlyphZoneRec */ - /* */ - /* <Description> */ - /* A glyph zone is used to load, scale and hint glyph outline */ - /* coordinates. */ - /* */ - /* <Fields> */ - /* memory :: A handle to the memory manager. */ - /* */ - /* max_points :: The maximum size in points of the zone. */ - /* */ - /* max_contours :: Max size in links contours of the zone. */ - /* */ - /* n_points :: The current number of points in the zone. */ - /* */ - /* n_contours :: The current number of contours in the zone. */ - /* */ - /* org :: The original glyph coordinates (font */ - /* units/scaled). */ - /* */ - /* cur :: The current glyph coordinates (scaled/hinted). */ - /* */ - /* tags :: The point control tags. */ - /* */ - /* contours :: The contours end points. */ - /* */ - /* first_point :: Offset of the current subglyph's first point. */ - /* */ - typedef struct TT_GlyphZoneRec_ - { - FT_Memory memory; - FT_UShort max_points; - FT_Short max_contours; - FT_UShort n_points; /* number of points in zone */ - FT_Short n_contours; /* number of contours */ - - FT_Vector* org; /* original point coordinates */ - FT_Vector* cur; /* current point coordinates */ - FT_Vector* orus; /* original (unscaled) point coordinates */ - - FT_Byte* tags; /* current touch flags */ - FT_UShort* contours; /* contour end points */ - - FT_UShort first_point; /* offset of first (#0) point */ - - } TT_GlyphZoneRec, *TT_GlyphZone; - - - /* handle to execution context */ - typedef struct TT_ExecContextRec_* TT_ExecContext; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* TT_Size */ - /* */ - /* <Description> */ - /* A handle to a TrueType size object. */ - /* */ - typedef struct TT_SizeRec_* TT_Size; - - - /* glyph loader structure */ - typedef struct TT_LoaderRec_ - { - TT_Face face; - TT_Size size; - FT_GlyphSlot glyph; - FT_GlyphLoader gloader; - - FT_ULong load_flags; - FT_UInt glyph_index; - - FT_Stream stream; - FT_Int byte_len; - - FT_Short n_contours; - FT_BBox bbox; - FT_Int left_bearing; - FT_Int advance; - FT_Int linear; - FT_Bool linear_def; - FT_Vector pp1; - FT_Vector pp2; - - FT_ULong glyf_offset; - - /* the zone where we load our glyphs */ - TT_GlyphZoneRec base; - TT_GlyphZoneRec zone; - - TT_ExecContext exec; - FT_Byte* instructions; - FT_ULong ins_pos; - - /* for possible extensibility in other formats */ - void* other; - - /* since version 2.1.8 */ - FT_Int top_bearing; - FT_Int vadvance; - FT_Vector pp3; - FT_Vector pp4; - - /* since version 2.2.1 */ - FT_Byte* cursor; - FT_Byte* limit; - - /* since version 2.6.2 */ - FT_ListRec composites; - - } TT_LoaderRec; - - -FT_END_HEADER - -#endif /* TTTYPES_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/t1tables.h b/builddir/freetype-2.7.0/include/freetype/t1tables.h deleted file mode 100644 index e272324..0000000 --- a/builddir/freetype-2.7.0/include/freetype/t1tables.h +++ /dev/null @@ -1,761 +0,0 @@ -/***************************************************************************/ -/* */ -/* t1tables.h */ -/* */ -/* Basic Type 1/Type 2 tables definitions and interface (specification */ -/* only). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef T1TABLES_H_ -#define T1TABLES_H_ - - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* type1_tables */ - /* */ - /* <Title> */ - /* Type 1 Tables */ - /* */ - /* <Abstract> */ - /* Type~1 (PostScript) specific font tables. */ - /* */ - /* <Description> */ - /* This section contains the definition of Type 1-specific tables, */ - /* including structures related to other PostScript font formats. */ - /* */ - /* <Order> */ - /* PS_FontInfoRec */ - /* PS_FontInfo */ - /* PS_PrivateRec */ - /* PS_Private */ - /* */ - /* CID_FaceDictRec */ - /* CID_FaceDict */ - /* CID_FaceInfoRec */ - /* CID_FaceInfo */ - /* */ - /* FT_Has_PS_Glyph_Names */ - /* FT_Get_PS_Font_Info */ - /* FT_Get_PS_Font_Private */ - /* FT_Get_PS_Font_Value */ - /* */ - /* T1_Blend_Flags */ - /* T1_EncodingType */ - /* PS_Dict_Keys */ - /* */ - /*************************************************************************/ - - - /* Note that we separate font data in PS_FontInfoRec and PS_PrivateRec */ - /* structures in order to support Multiple Master fonts. */ - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* PS_FontInfoRec */ - /* */ - /* <Description> */ - /* A structure used to model a Type~1 or Type~2 FontInfo dictionary. */ - /* Note that for Multiple Master fonts, each instance has its own */ - /* FontInfo dictionary. */ - /* */ - typedef struct PS_FontInfoRec_ - { - FT_String* version; - FT_String* notice; - FT_String* full_name; - FT_String* family_name; - FT_String* weight; - FT_Long italic_angle; - FT_Bool is_fixed_pitch; - FT_Short underline_position; - FT_UShort underline_thickness; - - } PS_FontInfoRec; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* PS_FontInfo */ - /* */ - /* <Description> */ - /* A handle to a @PS_FontInfoRec structure. */ - /* */ - typedef struct PS_FontInfoRec_* PS_FontInfo; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* T1_FontInfo */ - /* */ - /* <Description> */ - /* This type is equivalent to @PS_FontInfoRec. It is deprecated but */ - /* kept to maintain source compatibility between various versions of */ - /* FreeType. */ - /* */ - typedef PS_FontInfoRec T1_FontInfo; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* PS_PrivateRec */ - /* */ - /* <Description> */ - /* A structure used to model a Type~1 or Type~2 private dictionary. */ - /* Note that for Multiple Master fonts, each instance has its own */ - /* Private dictionary. */ - /* */ - typedef struct PS_PrivateRec_ - { - FT_Int unique_id; - FT_Int lenIV; - - FT_Byte num_blue_values; - FT_Byte num_other_blues; - FT_Byte num_family_blues; - FT_Byte num_family_other_blues; - - FT_Short blue_values[14]; - FT_Short other_blues[10]; - - FT_Short family_blues [14]; - FT_Short family_other_blues[10]; - - FT_Fixed blue_scale; - FT_Int blue_shift; - FT_Int blue_fuzz; - - FT_UShort standard_width[1]; - FT_UShort standard_height[1]; - - FT_Byte num_snap_widths; - FT_Byte num_snap_heights; - FT_Bool force_bold; - FT_Bool round_stem_up; - - FT_Short snap_widths [13]; /* including std width */ - FT_Short snap_heights[13]; /* including std height */ - - FT_Fixed expansion_factor; - - FT_Long language_group; - FT_Long password; - - FT_Short min_feature[2]; - - } PS_PrivateRec; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* PS_Private */ - /* */ - /* <Description> */ - /* A handle to a @PS_PrivateRec structure. */ - /* */ - typedef struct PS_PrivateRec_* PS_Private; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* T1_Private */ - /* */ - /* <Description> */ - /* This type is equivalent to @PS_PrivateRec. It is deprecated but */ - /* kept to maintain source compatibility between various versions of */ - /* FreeType. */ - /* */ - typedef PS_PrivateRec T1_Private; - - - /*************************************************************************/ - /* */ - /* <Enum> */ - /* T1_Blend_Flags */ - /* */ - /* <Description> */ - /* A set of flags used to indicate which fields are present in a */ - /* given blend dictionary (font info or private). Used to support */ - /* Multiple Masters fonts. */ - /* */ - /* <Values> */ - /* T1_BLEND_UNDERLINE_POSITION :: */ - /* T1_BLEND_UNDERLINE_THICKNESS :: */ - /* T1_BLEND_ITALIC_ANGLE :: */ - /* T1_BLEND_BLUE_VALUES :: */ - /* T1_BLEND_OTHER_BLUES :: */ - /* T1_BLEND_STANDARD_WIDTH :: */ - /* T1_BLEND_STANDARD_HEIGHT :: */ - /* T1_BLEND_STEM_SNAP_WIDTHS :: */ - /* T1_BLEND_STEM_SNAP_HEIGHTS :: */ - /* T1_BLEND_BLUE_SCALE :: */ - /* T1_BLEND_BLUE_SHIFT :: */ - /* T1_BLEND_FAMILY_BLUES :: */ - /* T1_BLEND_FAMILY_OTHER_BLUES :: */ - /* T1_BLEND_FORCE_BOLD :: */ - /* */ - typedef enum T1_Blend_Flags_ - { - /* required fields in a FontInfo blend dictionary */ - T1_BLEND_UNDERLINE_POSITION = 0, - T1_BLEND_UNDERLINE_THICKNESS, - T1_BLEND_ITALIC_ANGLE, - - /* required fields in a Private blend dictionary */ - T1_BLEND_BLUE_VALUES, - T1_BLEND_OTHER_BLUES, - T1_BLEND_STANDARD_WIDTH, - T1_BLEND_STANDARD_HEIGHT, - T1_BLEND_STEM_SNAP_WIDTHS, - T1_BLEND_STEM_SNAP_HEIGHTS, - T1_BLEND_BLUE_SCALE, - T1_BLEND_BLUE_SHIFT, - T1_BLEND_FAMILY_BLUES, - T1_BLEND_FAMILY_OTHER_BLUES, - T1_BLEND_FORCE_BOLD, - - T1_BLEND_MAX /* do not remove */ - - } T1_Blend_Flags; - - - /* these constants are deprecated; use the corresponding */ - /* `T1_Blend_Flags' values instead */ -#define t1_blend_underline_position T1_BLEND_UNDERLINE_POSITION -#define t1_blend_underline_thickness T1_BLEND_UNDERLINE_THICKNESS -#define t1_blend_italic_angle T1_BLEND_ITALIC_ANGLE -#define t1_blend_blue_values T1_BLEND_BLUE_VALUES -#define t1_blend_other_blues T1_BLEND_OTHER_BLUES -#define t1_blend_standard_widths T1_BLEND_STANDARD_WIDTH -#define t1_blend_standard_height T1_BLEND_STANDARD_HEIGHT -#define t1_blend_stem_snap_widths T1_BLEND_STEM_SNAP_WIDTHS -#define t1_blend_stem_snap_heights T1_BLEND_STEM_SNAP_HEIGHTS -#define t1_blend_blue_scale T1_BLEND_BLUE_SCALE -#define t1_blend_blue_shift T1_BLEND_BLUE_SHIFT -#define t1_blend_family_blues T1_BLEND_FAMILY_BLUES -#define t1_blend_family_other_blues T1_BLEND_FAMILY_OTHER_BLUES -#define t1_blend_force_bold T1_BLEND_FORCE_BOLD -#define t1_blend_max T1_BLEND_MAX - - /* */ - - - /* maximum number of Multiple Masters designs, as defined in the spec */ -#define T1_MAX_MM_DESIGNS 16 - - /* maximum number of Multiple Masters axes, as defined in the spec */ -#define T1_MAX_MM_AXIS 4 - - /* maximum number of elements in a design map */ -#define T1_MAX_MM_MAP_POINTS 20 - - - /* this structure is used to store the BlendDesignMap entry for an axis */ - typedef struct PS_DesignMap_ - { - FT_Byte num_points; - FT_Long* design_points; - FT_Fixed* blend_points; - - } PS_DesignMapRec, *PS_DesignMap; - - /* backwards-compatible definition */ - typedef PS_DesignMapRec T1_DesignMap; - - - typedef struct PS_BlendRec_ - { - FT_UInt num_designs; - FT_UInt num_axis; - - FT_String* axis_names[T1_MAX_MM_AXIS]; - FT_Fixed* design_pos[T1_MAX_MM_DESIGNS]; - PS_DesignMapRec design_map[T1_MAX_MM_AXIS]; - - FT_Fixed* weight_vector; - FT_Fixed* default_weight_vector; - - PS_FontInfo font_infos[T1_MAX_MM_DESIGNS + 1]; - PS_Private privates [T1_MAX_MM_DESIGNS + 1]; - - FT_ULong blend_bitflags; - - FT_BBox* bboxes [T1_MAX_MM_DESIGNS + 1]; - - /* since 2.3.0 */ - - /* undocumented, optional: the default design instance; */ - /* corresponds to default_weight_vector -- */ - /* num_default_design_vector == 0 means it is not present */ - /* in the font and associated metrics files */ - FT_UInt default_design_vector[T1_MAX_MM_DESIGNS]; - FT_UInt num_default_design_vector; - - } PS_BlendRec, *PS_Blend; - - - /* backwards-compatible definition */ - typedef PS_BlendRec T1_Blend; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* CID_FaceDictRec */ - /* */ - /* <Description> */ - /* A structure used to represent data in a CID top-level dictionary. */ - /* */ - typedef struct CID_FaceDictRec_ - { - PS_PrivateRec private_dict; - - FT_UInt len_buildchar; - FT_Fixed forcebold_threshold; - FT_Pos stroke_width; - FT_Fixed expansion_factor; - - FT_Byte paint_type; - FT_Byte font_type; - FT_Matrix font_matrix; - FT_Vector font_offset; - - FT_UInt num_subrs; - FT_ULong subrmap_offset; - FT_Int sd_bytes; - - } CID_FaceDictRec; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* CID_FaceDict */ - /* */ - /* <Description> */ - /* A handle to a @CID_FaceDictRec structure. */ - /* */ - typedef struct CID_FaceDictRec_* CID_FaceDict; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* CID_FontDict */ - /* */ - /* <Description> */ - /* This type is equivalent to @CID_FaceDictRec. It is deprecated but */ - /* kept to maintain source compatibility between various versions of */ - /* FreeType. */ - /* */ - typedef CID_FaceDictRec CID_FontDict; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* CID_FaceInfoRec */ - /* */ - /* <Description> */ - /* A structure used to represent CID Face information. */ - /* */ - typedef struct CID_FaceInfoRec_ - { - FT_String* cid_font_name; - FT_Fixed cid_version; - FT_Int cid_font_type; - - FT_String* registry; - FT_String* ordering; - FT_Int supplement; - - PS_FontInfoRec font_info; - FT_BBox font_bbox; - FT_ULong uid_base; - - FT_Int num_xuid; - FT_ULong xuid[16]; - - FT_ULong cidmap_offset; - FT_Int fd_bytes; - FT_Int gd_bytes; - FT_ULong cid_count; - - FT_Int num_dicts; - CID_FaceDict font_dicts; - - FT_ULong data_offset; - - } CID_FaceInfoRec; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* CID_FaceInfo */ - /* */ - /* <Description> */ - /* A handle to a @CID_FaceInfoRec structure. */ - /* */ - typedef struct CID_FaceInfoRec_* CID_FaceInfo; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* CID_Info */ - /* */ - /* <Description> */ - /* This type is equivalent to @CID_FaceInfoRec. It is deprecated but */ - /* kept to maintain source compatibility between various versions of */ - /* FreeType. */ - /* */ - typedef CID_FaceInfoRec CID_Info; - - - /************************************************************************ - * - * @function: - * FT_Has_PS_Glyph_Names - * - * @description: - * Return true if a given face provides reliable PostScript glyph - * names. This is similar to using the @FT_HAS_GLYPH_NAMES macro, - * except that certain fonts (mostly TrueType) contain incorrect - * glyph name tables. - * - * When this function returns true, the caller is sure that the glyph - * names returned by @FT_Get_Glyph_Name are reliable. - * - * @input: - * face :: - * face handle - * - * @return: - * Boolean. True if glyph names are reliable. - * - */ - FT_EXPORT( FT_Int ) - FT_Has_PS_Glyph_Names( FT_Face face ); - - - /************************************************************************ - * - * @function: - * FT_Get_PS_Font_Info - * - * @description: - * Retrieve the @PS_FontInfoRec structure corresponding to a given - * PostScript font. - * - * @input: - * face :: - * PostScript face handle. - * - * @output: - * afont_info :: - * Output font info structure pointer. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * String pointers within the @PS_FontInfoRec structure are owned by - * the face and don't need to be freed by the caller. Missing entries - * in the font's FontInfo dictionary are represented by NULL pointers. - * - * If the font's format is not PostScript-based, this function will - * return the `FT_Err_Invalid_Argument' error code. - * - */ - FT_EXPORT( FT_Error ) - FT_Get_PS_Font_Info( FT_Face face, - PS_FontInfo afont_info ); - - - /************************************************************************ - * - * @function: - * FT_Get_PS_Font_Private - * - * @description: - * Retrieve the @PS_PrivateRec structure corresponding to a given - * PostScript font. - * - * @input: - * face :: - * PostScript face handle. - * - * @output: - * afont_private :: - * Output private dictionary structure pointer. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * The string pointers within the @PS_PrivateRec structure are owned by - * the face and don't need to be freed by the caller. - * - * If the font's format is not PostScript-based, this function returns - * the `FT_Err_Invalid_Argument' error code. - * - */ - FT_EXPORT( FT_Error ) - FT_Get_PS_Font_Private( FT_Face face, - PS_Private afont_private ); - - - /*************************************************************************/ - /* */ - /* <Enum> */ - /* T1_EncodingType */ - /* */ - /* <Description> */ - /* An enumeration describing the `Encoding' entry in a Type 1 */ - /* dictionary. */ - /* */ - /* <Values> */ - /* T1_ENCODING_TYPE_NONE :: */ - /* T1_ENCODING_TYPE_ARRAY :: */ - /* T1_ENCODING_TYPE_STANDARD :: */ - /* T1_ENCODING_TYPE_ISOLATIN1 :: */ - /* T1_ENCODING_TYPE_EXPERT :: */ - /* */ - typedef enum T1_EncodingType_ - { - T1_ENCODING_TYPE_NONE = 0, - T1_ENCODING_TYPE_ARRAY, - T1_ENCODING_TYPE_STANDARD, - T1_ENCODING_TYPE_ISOLATIN1, - T1_ENCODING_TYPE_EXPERT - - } T1_EncodingType; - - - /*************************************************************************/ - /* */ - /* <Enum> */ - /* PS_Dict_Keys */ - /* */ - /* <Description> */ - /* An enumeration used in calls to @FT_Get_PS_Font_Value to identify */ - /* the Type~1 dictionary entry to retrieve. */ - /* */ - /* <Values> */ - /* PS_DICT_FONT_TYPE :: */ - /* PS_DICT_FONT_MATRIX :: */ - /* PS_DICT_FONT_BBOX :: */ - /* PS_DICT_PAINT_TYPE :: */ - /* PS_DICT_FONT_NAME :: */ - /* PS_DICT_UNIQUE_ID :: */ - /* PS_DICT_NUM_CHAR_STRINGS :: */ - /* PS_DICT_CHAR_STRING_KEY :: */ - /* PS_DICT_CHAR_STRING :: */ - /* PS_DICT_ENCODING_TYPE :: */ - /* PS_DICT_ENCODING_ENTRY :: */ - /* PS_DICT_NUM_SUBRS :: */ - /* PS_DICT_SUBR :: */ - /* PS_DICT_STD_HW :: */ - /* PS_DICT_STD_VW :: */ - /* PS_DICT_NUM_BLUE_VALUES :: */ - /* PS_DICT_BLUE_VALUE :: */ - /* PS_DICT_BLUE_FUZZ :: */ - /* PS_DICT_NUM_OTHER_BLUES :: */ - /* PS_DICT_OTHER_BLUE :: */ - /* PS_DICT_NUM_FAMILY_BLUES :: */ - /* PS_DICT_FAMILY_BLUE :: */ - /* PS_DICT_NUM_FAMILY_OTHER_BLUES :: */ - /* PS_DICT_FAMILY_OTHER_BLUE :: */ - /* PS_DICT_BLUE_SCALE :: */ - /* PS_DICT_BLUE_SHIFT :: */ - /* PS_DICT_NUM_STEM_SNAP_H :: */ - /* PS_DICT_STEM_SNAP_H :: */ - /* PS_DICT_NUM_STEM_SNAP_V :: */ - /* PS_DICT_STEM_SNAP_V :: */ - /* PS_DICT_FORCE_BOLD :: */ - /* PS_DICT_RND_STEM_UP :: */ - /* PS_DICT_MIN_FEATURE :: */ - /* PS_DICT_LEN_IV :: */ - /* PS_DICT_PASSWORD :: */ - /* PS_DICT_LANGUAGE_GROUP :: */ - /* PS_DICT_VERSION :: */ - /* PS_DICT_NOTICE :: */ - /* PS_DICT_FULL_NAME :: */ - /* PS_DICT_FAMILY_NAME :: */ - /* PS_DICT_WEIGHT :: */ - /* PS_DICT_IS_FIXED_PITCH :: */ - /* PS_DICT_UNDERLINE_POSITION :: */ - /* PS_DICT_UNDERLINE_THICKNESS :: */ - /* PS_DICT_FS_TYPE :: */ - /* PS_DICT_ITALIC_ANGLE :: */ - /* */ - typedef enum PS_Dict_Keys_ - { - /* conventionally in the font dictionary */ - PS_DICT_FONT_TYPE, /* FT_Byte */ - PS_DICT_FONT_MATRIX, /* FT_Fixed */ - PS_DICT_FONT_BBOX, /* FT_Fixed */ - PS_DICT_PAINT_TYPE, /* FT_Byte */ - PS_DICT_FONT_NAME, /* FT_String* */ - PS_DICT_UNIQUE_ID, /* FT_Int */ - PS_DICT_NUM_CHAR_STRINGS, /* FT_Int */ - PS_DICT_CHAR_STRING_KEY, /* FT_String* */ - PS_DICT_CHAR_STRING, /* FT_String* */ - PS_DICT_ENCODING_TYPE, /* T1_EncodingType */ - PS_DICT_ENCODING_ENTRY, /* FT_String* */ - - /* conventionally in the font Private dictionary */ - PS_DICT_NUM_SUBRS, /* FT_Int */ - PS_DICT_SUBR, /* FT_String* */ - PS_DICT_STD_HW, /* FT_UShort */ - PS_DICT_STD_VW, /* FT_UShort */ - PS_DICT_NUM_BLUE_VALUES, /* FT_Byte */ - PS_DICT_BLUE_VALUE, /* FT_Short */ - PS_DICT_BLUE_FUZZ, /* FT_Int */ - PS_DICT_NUM_OTHER_BLUES, /* FT_Byte */ - PS_DICT_OTHER_BLUE, /* FT_Short */ - PS_DICT_NUM_FAMILY_BLUES, /* FT_Byte */ - PS_DICT_FAMILY_BLUE, /* FT_Short */ - PS_DICT_NUM_FAMILY_OTHER_BLUES, /* FT_Byte */ - PS_DICT_FAMILY_OTHER_BLUE, /* FT_Short */ - PS_DICT_BLUE_SCALE, /* FT_Fixed */ - PS_DICT_BLUE_SHIFT, /* FT_Int */ - PS_DICT_NUM_STEM_SNAP_H, /* FT_Byte */ - PS_DICT_STEM_SNAP_H, /* FT_Short */ - PS_DICT_NUM_STEM_SNAP_V, /* FT_Byte */ - PS_DICT_STEM_SNAP_V, /* FT_Short */ - PS_DICT_FORCE_BOLD, /* FT_Bool */ - PS_DICT_RND_STEM_UP, /* FT_Bool */ - PS_DICT_MIN_FEATURE, /* FT_Short */ - PS_DICT_LEN_IV, /* FT_Int */ - PS_DICT_PASSWORD, /* FT_Long */ - PS_DICT_LANGUAGE_GROUP, /* FT_Long */ - - /* conventionally in the font FontInfo dictionary */ - PS_DICT_VERSION, /* FT_String* */ - PS_DICT_NOTICE, /* FT_String* */ - PS_DICT_FULL_NAME, /* FT_String* */ - PS_DICT_FAMILY_NAME, /* FT_String* */ - PS_DICT_WEIGHT, /* FT_String* */ - PS_DICT_IS_FIXED_PITCH, /* FT_Bool */ - PS_DICT_UNDERLINE_POSITION, /* FT_Short */ - PS_DICT_UNDERLINE_THICKNESS, /* FT_UShort */ - PS_DICT_FS_TYPE, /* FT_UShort */ - PS_DICT_ITALIC_ANGLE, /* FT_Long */ - - PS_DICT_MAX = PS_DICT_ITALIC_ANGLE - - } PS_Dict_Keys; - - - /************************************************************************ - * - * @function: - * FT_Get_PS_Font_Value - * - * @description: - * Retrieve the value for the supplied key from a PostScript font. - * - * @input: - * face :: - * PostScript face handle. - * - * key :: - * An enumeration value representing the dictionary key to retrieve. - * - * idx :: - * For array values, this specifies the index to be returned. - * - * value :: - * A pointer to memory into which to write the value. - * - * valen_len :: - * The size, in bytes, of the memory supplied for the value. - * - * @output: - * value :: - * The value matching the above key, if it exists. - * - * @return: - * The amount of memory (in bytes) required to hold the requested - * value (if it exists, -1 otherwise). - * - * @note: - * The values returned are not pointers into the internal structures of - * the face, but are `fresh' copies, so that the memory containing them - * belongs to the calling application. This also enforces the - * `read-only' nature of these values, i.e., this function cannot be - * used to manipulate the face. - * - * `value' is a void pointer because the values returned can be of - * various types. - * - * If either `value' is NULL or `value_len' is too small, just the - * required memory size for the requested entry is returned. - * - * The `idx' parameter is used, not only to retrieve elements of, for - * example, the FontMatrix or FontBBox, but also to retrieve name keys - * from the CharStrings dictionary, and the charstrings themselves. It - * is ignored for atomic values. - * - * PS_DICT_BLUE_SCALE returns a value that is scaled up by 1000. To - * get the value as in the font stream, you need to divide by - * 65536000.0 (to remove the FT_Fixed scale, and the x1000 scale). - * - * IMPORTANT: Only key/value pairs read by the FreeType interpreter can - * be retrieved. So, for example, PostScript procedures such as NP, - * ND, and RD are not available. Arbitrary keys are, obviously, not be - * available either. - * - * If the font's format is not PostScript-based, this function returns - * the `FT_Err_Invalid_Argument' error code. - * - */ - FT_EXPORT( FT_Long ) - FT_Get_PS_Font_Value( FT_Face face, - PS_Dict_Keys key, - FT_UInt idx, - void *value, - FT_Long value_len ); - - /* */ - -FT_END_HEADER - -#endif /* T1TABLES_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ttnameid.h b/builddir/freetype-2.7.0/include/freetype/ttnameid.h deleted file mode 100644 index ce707f1..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ttnameid.h +++ /dev/null @@ -1,1237 +0,0 @@ -/***************************************************************************/ -/* */ -/* ttnameid.h */ -/* */ -/* TrueType name ID definitions (specification only). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef TTNAMEID_H_ -#define TTNAMEID_H_ - - -#include <ft2build.h> - - -FT_BEGIN_HEADER - - - /*************************************************************************/ - /* */ - /* <Section> */ - /* truetype_tables */ - /* */ - - - /*************************************************************************/ - /* */ - /* Possible values for the `platform' identifier code in the name */ - /* records of the TTF `name' table. */ - /* */ - /*************************************************************************/ - - - /*********************************************************************** - * - * @enum: - * TT_PLATFORM_XXX - * - * @description: - * A list of valid values for the `platform_id' identifier code in - * @FT_CharMapRec and @FT_SfntName structures. - * - * @values: - * TT_PLATFORM_APPLE_UNICODE :: - * Used by Apple to indicate a Unicode character map and/or name entry. - * See @TT_APPLE_ID_XXX for corresponding `encoding_id' values. Note - * that name entries in this format are coded as big-endian UCS-2 - * character codes _only_. - * - * TT_PLATFORM_MACINTOSH :: - * Used by Apple to indicate a MacOS-specific charmap and/or name entry. - * See @TT_MAC_ID_XXX for corresponding `encoding_id' values. Note that - * most TrueType fonts contain an Apple roman charmap to be usable on - * MacOS systems (even if they contain a Microsoft charmap as well). - * - * TT_PLATFORM_ISO :: - * This value was used to specify ISO/IEC 10646 charmaps. It is however - * now deprecated. See @TT_ISO_ID_XXX for a list of corresponding - * `encoding_id' values. - * - * TT_PLATFORM_MICROSOFT :: - * Used by Microsoft to indicate Windows-specific charmaps. See - * @TT_MS_ID_XXX for a list of corresponding `encoding_id' values. - * Note that most fonts contain a Unicode charmap using - * (TT_PLATFORM_MICROSOFT, @TT_MS_ID_UNICODE_CS). - * - * TT_PLATFORM_CUSTOM :: - * Used to indicate application-specific charmaps. - * - * TT_PLATFORM_ADOBE :: - * This value isn't part of any font format specification, but is used - * by FreeType to report Adobe-specific charmaps in an @FT_CharMapRec - * structure. See @TT_ADOBE_ID_XXX. - */ - -#define TT_PLATFORM_APPLE_UNICODE 0 -#define TT_PLATFORM_MACINTOSH 1 -#define TT_PLATFORM_ISO 2 /* deprecated */ -#define TT_PLATFORM_MICROSOFT 3 -#define TT_PLATFORM_CUSTOM 4 -#define TT_PLATFORM_ADOBE 7 /* artificial */ - - - /*********************************************************************** - * - * @enum: - * TT_APPLE_ID_XXX - * - * @description: - * A list of valid values for the `encoding_id' for - * @TT_PLATFORM_APPLE_UNICODE charmaps and name entries. - * - * @values: - * TT_APPLE_ID_DEFAULT :: - * Unicode version 1.0. - * - * TT_APPLE_ID_UNICODE_1_1 :: - * Unicode 1.1; specifies Hangul characters starting at U+34xx. - * - * TT_APPLE_ID_ISO_10646 :: - * Deprecated (identical to preceding). - * - * TT_APPLE_ID_UNICODE_2_0 :: - * Unicode 2.0 and beyond (UTF-16 BMP only). - * - * TT_APPLE_ID_UNICODE_32 :: - * Unicode 3.1 and beyond, using UTF-32. - * - * TT_APPLE_ID_VARIANT_SELECTOR :: - * From Adobe, not Apple. Not a normal cmap. Specifies variations - * on a real cmap. - */ - -#define TT_APPLE_ID_DEFAULT 0 /* Unicode 1.0 */ -#define TT_APPLE_ID_UNICODE_1_1 1 /* specify Hangul at U+34xx */ -#define TT_APPLE_ID_ISO_10646 2 /* deprecated */ -#define TT_APPLE_ID_UNICODE_2_0 3 /* or later */ -#define TT_APPLE_ID_UNICODE_32 4 /* 2.0 or later, full repertoire */ -#define TT_APPLE_ID_VARIANT_SELECTOR 5 /* variation selector data */ - - - /*********************************************************************** - * - * @enum: - * TT_MAC_ID_XXX - * - * @description: - * A list of valid values for the `encoding_id' for - * @TT_PLATFORM_MACINTOSH charmaps and name entries. - * - * @values: - * TT_MAC_ID_ROMAN :: - * TT_MAC_ID_JAPANESE :: - * TT_MAC_ID_TRADITIONAL_CHINESE :: - * TT_MAC_ID_KOREAN :: - * TT_MAC_ID_ARABIC :: - * TT_MAC_ID_HEBREW :: - * TT_MAC_ID_GREEK :: - * TT_MAC_ID_RUSSIAN :: - * TT_MAC_ID_RSYMBOL :: - * TT_MAC_ID_DEVANAGARI :: - * TT_MAC_ID_GURMUKHI :: - * TT_MAC_ID_GUJARATI :: - * TT_MAC_ID_ORIYA :: - * TT_MAC_ID_BENGALI :: - * TT_MAC_ID_TAMIL :: - * TT_MAC_ID_TELUGU :: - * TT_MAC_ID_KANNADA :: - * TT_MAC_ID_MALAYALAM :: - * TT_MAC_ID_SINHALESE :: - * TT_MAC_ID_BURMESE :: - * TT_MAC_ID_KHMER :: - * TT_MAC_ID_THAI :: - * TT_MAC_ID_LAOTIAN :: - * TT_MAC_ID_GEORGIAN :: - * TT_MAC_ID_ARMENIAN :: - * TT_MAC_ID_MALDIVIAN :: - * TT_MAC_ID_SIMPLIFIED_CHINESE :: - * TT_MAC_ID_TIBETAN :: - * TT_MAC_ID_MONGOLIAN :: - * TT_MAC_ID_GEEZ :: - * TT_MAC_ID_SLAVIC :: - * TT_MAC_ID_VIETNAMESE :: - * TT_MAC_ID_SINDHI :: - * TT_MAC_ID_UNINTERP :: - */ - -#define TT_MAC_ID_ROMAN 0 -#define TT_MAC_ID_JAPANESE 1 -#define TT_MAC_ID_TRADITIONAL_CHINESE 2 -#define TT_MAC_ID_KOREAN 3 -#define TT_MAC_ID_ARABIC 4 -#define TT_MAC_ID_HEBREW 5 -#define TT_MAC_ID_GREEK 6 -#define TT_MAC_ID_RUSSIAN 7 -#define TT_MAC_ID_RSYMBOL 8 -#define TT_MAC_ID_DEVANAGARI 9 -#define TT_MAC_ID_GURMUKHI 10 -#define TT_MAC_ID_GUJARATI 11 -#define TT_MAC_ID_ORIYA 12 -#define TT_MAC_ID_BENGALI 13 -#define TT_MAC_ID_TAMIL 14 -#define TT_MAC_ID_TELUGU 15 -#define TT_MAC_ID_KANNADA 16 -#define TT_MAC_ID_MALAYALAM 17 -#define TT_MAC_ID_SINHALESE 18 -#define TT_MAC_ID_BURMESE 19 -#define TT_MAC_ID_KHMER 20 -#define TT_MAC_ID_THAI 21 -#define TT_MAC_ID_LAOTIAN 22 -#define TT_MAC_ID_GEORGIAN 23 -#define TT_MAC_ID_ARMENIAN 24 -#define TT_MAC_ID_MALDIVIAN 25 -#define TT_MAC_ID_SIMPLIFIED_CHINESE 25 -#define TT_MAC_ID_TIBETAN 26 -#define TT_MAC_ID_MONGOLIAN 27 -#define TT_MAC_ID_GEEZ 28 -#define TT_MAC_ID_SLAVIC 29 -#define TT_MAC_ID_VIETNAMESE 30 -#define TT_MAC_ID_SINDHI 31 -#define TT_MAC_ID_UNINTERP 32 - - - /*********************************************************************** - * - * @enum: - * TT_ISO_ID_XXX - * - * @description: - * A list of valid values for the `encoding_id' for - * @TT_PLATFORM_ISO charmaps and name entries. - * - * Their use is now deprecated. - * - * @values: - * TT_ISO_ID_7BIT_ASCII :: - * ASCII. - * TT_ISO_ID_10646 :: - * ISO/10646. - * TT_ISO_ID_8859_1 :: - * Also known as Latin-1. - */ - -#define TT_ISO_ID_7BIT_ASCII 0 -#define TT_ISO_ID_10646 1 -#define TT_ISO_ID_8859_1 2 - - - /*********************************************************************** - * - * @enum: - * TT_MS_ID_XXX - * - * @description: - * A list of valid values for the `encoding_id' for - * @TT_PLATFORM_MICROSOFT charmaps and name entries. - * - * @values: - * TT_MS_ID_SYMBOL_CS :: - * Corresponds to Microsoft symbol encoding. See - * @FT_ENCODING_MS_SYMBOL. - * - * TT_MS_ID_UNICODE_CS :: - * Corresponds to a Microsoft WGL4 charmap, matching Unicode. See - * @FT_ENCODING_UNICODE. - * - * TT_MS_ID_SJIS :: - * Corresponds to SJIS Japanese encoding. See @FT_ENCODING_SJIS. - * - * TT_MS_ID_GB2312 :: - * Corresponds to Simplified Chinese as used in Mainland China. See - * @FT_ENCODING_GB2312. - * - * TT_MS_ID_BIG_5 :: - * Corresponds to Traditional Chinese as used in Taiwan and Hong Kong. - * See @FT_ENCODING_BIG5. - * - * TT_MS_ID_WANSUNG :: - * Corresponds to Korean Wansung encoding. See @FT_ENCODING_WANSUNG. - * - * TT_MS_ID_JOHAB :: - * Corresponds to Johab encoding. See @FT_ENCODING_JOHAB. - * - * TT_MS_ID_UCS_4 :: - * Corresponds to UCS-4 or UTF-32 charmaps. This has been added to - * the OpenType specification version 1.4 (mid-2001.) - */ - -#define TT_MS_ID_SYMBOL_CS 0 -#define TT_MS_ID_UNICODE_CS 1 -#define TT_MS_ID_SJIS 2 -#define TT_MS_ID_GB2312 3 -#define TT_MS_ID_BIG_5 4 -#define TT_MS_ID_WANSUNG 5 -#define TT_MS_ID_JOHAB 6 -#define TT_MS_ID_UCS_4 10 - - - /*********************************************************************** - * - * @enum: - * TT_ADOBE_ID_XXX - * - * @description: - * A list of valid values for the `encoding_id' for - * @TT_PLATFORM_ADOBE charmaps. This is a FreeType-specific extension! - * - * @values: - * TT_ADOBE_ID_STANDARD :: - * Adobe standard encoding. - * TT_ADOBE_ID_EXPERT :: - * Adobe expert encoding. - * TT_ADOBE_ID_CUSTOM :: - * Adobe custom encoding. - * TT_ADOBE_ID_LATIN_1 :: - * Adobe Latin~1 encoding. - */ - -#define TT_ADOBE_ID_STANDARD 0 -#define TT_ADOBE_ID_EXPERT 1 -#define TT_ADOBE_ID_CUSTOM 2 -#define TT_ADOBE_ID_LATIN_1 3 - - - /*************************************************************************/ - /* */ - /* Possible values of the language identifier field in the name records */ - /* of the TTF `name' table if the `platform' identifier code is */ - /* TT_PLATFORM_MACINTOSH. These values are also used as return values */ - /* for function @FT_Get_CMap_Language_ID. */ - /* */ - /* The canonical source for the Apple assigned Language ID's is at */ - /* */ - /* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html */ - /* */ -#define TT_MAC_LANGID_ENGLISH 0 -#define TT_MAC_LANGID_FRENCH 1 -#define TT_MAC_LANGID_GERMAN 2 -#define TT_MAC_LANGID_ITALIAN 3 -#define TT_MAC_LANGID_DUTCH 4 -#define TT_MAC_LANGID_SWEDISH 5 -#define TT_MAC_LANGID_SPANISH 6 -#define TT_MAC_LANGID_DANISH 7 -#define TT_MAC_LANGID_PORTUGUESE 8 -#define TT_MAC_LANGID_NORWEGIAN 9 -#define TT_MAC_LANGID_HEBREW 10 -#define TT_MAC_LANGID_JAPANESE 11 -#define TT_MAC_LANGID_ARABIC 12 -#define TT_MAC_LANGID_FINNISH 13 -#define TT_MAC_LANGID_GREEK 14 -#define TT_MAC_LANGID_ICELANDIC 15 -#define TT_MAC_LANGID_MALTESE 16 -#define TT_MAC_LANGID_TURKISH 17 -#define TT_MAC_LANGID_CROATIAN 18 -#define TT_MAC_LANGID_CHINESE_TRADITIONAL 19 -#define TT_MAC_LANGID_URDU 20 -#define TT_MAC_LANGID_HINDI 21 -#define TT_MAC_LANGID_THAI 22 -#define TT_MAC_LANGID_KOREAN 23 -#define TT_MAC_LANGID_LITHUANIAN 24 -#define TT_MAC_LANGID_POLISH 25 -#define TT_MAC_LANGID_HUNGARIAN 26 -#define TT_MAC_LANGID_ESTONIAN 27 -#define TT_MAC_LANGID_LETTISH 28 -#define TT_MAC_LANGID_SAAMISK 29 -#define TT_MAC_LANGID_FAEROESE 30 -#define TT_MAC_LANGID_FARSI 31 -#define TT_MAC_LANGID_RUSSIAN 32 -#define TT_MAC_LANGID_CHINESE_SIMPLIFIED 33 -#define TT_MAC_LANGID_FLEMISH 34 -#define TT_MAC_LANGID_IRISH 35 -#define TT_MAC_LANGID_ALBANIAN 36 -#define TT_MAC_LANGID_ROMANIAN 37 -#define TT_MAC_LANGID_CZECH 38 -#define TT_MAC_LANGID_SLOVAK 39 -#define TT_MAC_LANGID_SLOVENIAN 40 -#define TT_MAC_LANGID_YIDDISH 41 -#define TT_MAC_LANGID_SERBIAN 42 -#define TT_MAC_LANGID_MACEDONIAN 43 -#define TT_MAC_LANGID_BULGARIAN 44 -#define TT_MAC_LANGID_UKRAINIAN 45 -#define TT_MAC_LANGID_BYELORUSSIAN 46 -#define TT_MAC_LANGID_UZBEK 47 -#define TT_MAC_LANGID_KAZAKH 48 -#define TT_MAC_LANGID_AZERBAIJANI 49 -#define TT_MAC_LANGID_AZERBAIJANI_CYRILLIC_SCRIPT 49 -#define TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT 50 -#define TT_MAC_LANGID_ARMENIAN 51 -#define TT_MAC_LANGID_GEORGIAN 52 -#define TT_MAC_LANGID_MOLDAVIAN 53 -#define TT_MAC_LANGID_KIRGHIZ 54 -#define TT_MAC_LANGID_TAJIKI 55 -#define TT_MAC_LANGID_TURKMEN 56 -#define TT_MAC_LANGID_MONGOLIAN 57 -#define TT_MAC_LANGID_MONGOLIAN_MONGOLIAN_SCRIPT 57 -#define TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT 58 -#define TT_MAC_LANGID_PASHTO 59 -#define TT_MAC_LANGID_KURDISH 60 -#define TT_MAC_LANGID_KASHMIRI 61 -#define TT_MAC_LANGID_SINDHI 62 -#define TT_MAC_LANGID_TIBETAN 63 -#define TT_MAC_LANGID_NEPALI 64 -#define TT_MAC_LANGID_SANSKRIT 65 -#define TT_MAC_LANGID_MARATHI 66 -#define TT_MAC_LANGID_BENGALI 67 -#define TT_MAC_LANGID_ASSAMESE 68 -#define TT_MAC_LANGID_GUJARATI 69 -#define TT_MAC_LANGID_PUNJABI 70 -#define TT_MAC_LANGID_ORIYA 71 -#define TT_MAC_LANGID_MALAYALAM 72 -#define TT_MAC_LANGID_KANNADA 73 -#define TT_MAC_LANGID_TAMIL 74 -#define TT_MAC_LANGID_TELUGU 75 -#define TT_MAC_LANGID_SINHALESE 76 -#define TT_MAC_LANGID_BURMESE 77 -#define TT_MAC_LANGID_KHMER 78 -#define TT_MAC_LANGID_LAO 79 -#define TT_MAC_LANGID_VIETNAMESE 80 -#define TT_MAC_LANGID_INDONESIAN 81 -#define TT_MAC_LANGID_TAGALOG 82 -#define TT_MAC_LANGID_MALAY_ROMAN_SCRIPT 83 -#define TT_MAC_LANGID_MALAY_ARABIC_SCRIPT 84 -#define TT_MAC_LANGID_AMHARIC 85 -#define TT_MAC_LANGID_TIGRINYA 86 -#define TT_MAC_LANGID_GALLA 87 -#define TT_MAC_LANGID_SOMALI 88 -#define TT_MAC_LANGID_SWAHILI 89 -#define TT_MAC_LANGID_RUANDA 90 -#define TT_MAC_LANGID_RUNDI 91 -#define TT_MAC_LANGID_CHEWA 92 -#define TT_MAC_LANGID_MALAGASY 93 -#define TT_MAC_LANGID_ESPERANTO 94 -#define TT_MAC_LANGID_WELSH 128 -#define TT_MAC_LANGID_BASQUE 129 -#define TT_MAC_LANGID_CATALAN 130 -#define TT_MAC_LANGID_LATIN 131 -#define TT_MAC_LANGID_QUECHUA 132 -#define TT_MAC_LANGID_GUARANI 133 -#define TT_MAC_LANGID_AYMARA 134 -#define TT_MAC_LANGID_TATAR 135 -#define TT_MAC_LANGID_UIGHUR 136 -#define TT_MAC_LANGID_DZONGKHA 137 -#define TT_MAC_LANGID_JAVANESE 138 -#define TT_MAC_LANGID_SUNDANESE 139 - - -#if 0 /* these seem to be errors that have been dropped */ - -#define TT_MAC_LANGID_SCOTTISH_GAELIC 140 -#define TT_MAC_LANGID_IRISH_GAELIC 141 - -#endif - - - /* The following codes are new as of 2000-03-10 */ -#define TT_MAC_LANGID_GALICIAN 140 -#define TT_MAC_LANGID_AFRIKAANS 141 -#define TT_MAC_LANGID_BRETON 142 -#define TT_MAC_LANGID_INUKTITUT 143 -#define TT_MAC_LANGID_SCOTTISH_GAELIC 144 -#define TT_MAC_LANGID_MANX_GAELIC 145 -#define TT_MAC_LANGID_IRISH_GAELIC 146 -#define TT_MAC_LANGID_TONGAN 147 -#define TT_MAC_LANGID_GREEK_POLYTONIC 148 -#define TT_MAC_LANGID_GREELANDIC 149 -#define TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT 150 - - - /*************************************************************************/ - /* */ - /* Possible values of the language identifier field in the name records */ - /* of the TTF `name' table if the `platform' identifier code is */ - /* TT_PLATFORM_MICROSOFT. */ - /* */ - /* The canonical source for the MS assigned LCIDs is */ - /* */ - /* http://www.microsoft.com/globaldev/reference/lcid-all.mspx */ - /* */ - -#define TT_MS_LANGID_ARABIC_GENERAL 0x0001 -#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401 -#define TT_MS_LANGID_ARABIC_IRAQ 0x0801 -#define TT_MS_LANGID_ARABIC_EGYPT 0x0C01 -#define TT_MS_LANGID_ARABIC_LIBYA 0x1001 -#define TT_MS_LANGID_ARABIC_ALGERIA 0x1401 -#define TT_MS_LANGID_ARABIC_MOROCCO 0x1801 -#define TT_MS_LANGID_ARABIC_TUNISIA 0x1C01 -#define TT_MS_LANGID_ARABIC_OMAN 0x2001 -#define TT_MS_LANGID_ARABIC_YEMEN 0x2401 -#define TT_MS_LANGID_ARABIC_SYRIA 0x2801 -#define TT_MS_LANGID_ARABIC_JORDAN 0x2C01 -#define TT_MS_LANGID_ARABIC_LEBANON 0x3001 -#define TT_MS_LANGID_ARABIC_KUWAIT 0x3401 -#define TT_MS_LANGID_ARABIC_UAE 0x3801 -#define TT_MS_LANGID_ARABIC_BAHRAIN 0x3C01 -#define TT_MS_LANGID_ARABIC_QATAR 0x4001 -#define TT_MS_LANGID_BULGARIAN_BULGARIA 0x0402 -#define TT_MS_LANGID_CATALAN_SPAIN 0x0403 -#define TT_MS_LANGID_CHINESE_GENERAL 0x0004 -#define TT_MS_LANGID_CHINESE_TAIWAN 0x0404 -#define TT_MS_LANGID_CHINESE_PRC 0x0804 -#define TT_MS_LANGID_CHINESE_HONG_KONG 0x0C04 -#define TT_MS_LANGID_CHINESE_SINGAPORE 0x1004 - -#if 1 /* this looks like the correct value */ -#define TT_MS_LANGID_CHINESE_MACAU 0x1404 -#else /* but beware, Microsoft may change its mind... - the most recent Word reference has the following: */ -#define TT_MS_LANGID_CHINESE_MACAU TT_MS_LANGID_CHINESE_HONG_KONG -#endif - -#if 0 /* used only with .NET `cultures'; commented out */ -#define TT_MS_LANGID_CHINESE_TRADITIONAL 0x7C04 -#endif - -#define TT_MS_LANGID_CZECH_CZECH_REPUBLIC 0x0405 -#define TT_MS_LANGID_DANISH_DENMARK 0x0406 -#define TT_MS_LANGID_GERMAN_GERMANY 0x0407 -#define TT_MS_LANGID_GERMAN_SWITZERLAND 0x0807 -#define TT_MS_LANGID_GERMAN_AUSTRIA 0x0C07 -#define TT_MS_LANGID_GERMAN_LUXEMBOURG 0x1007 -#define TT_MS_LANGID_GERMAN_LIECHTENSTEI 0x1407 -#define TT_MS_LANGID_GREEK_GREECE 0x0408 - - /* don't ask what this one means... It is commented out currently. */ -#if 0 -#define TT_MS_LANGID_GREEK_GREECE2 0x2008 -#endif - -#define TT_MS_LANGID_ENGLISH_GENERAL 0x0009 -#define TT_MS_LANGID_ENGLISH_UNITED_STATES 0x0409 -#define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM 0x0809 -#define TT_MS_LANGID_ENGLISH_AUSTRALIA 0x0C09 -#define TT_MS_LANGID_ENGLISH_CANADA 0x1009 -#define TT_MS_LANGID_ENGLISH_NEW_ZEALAND 0x1409 -#define TT_MS_LANGID_ENGLISH_IRELAND 0x1809 -#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA 0x1C09 -#define TT_MS_LANGID_ENGLISH_JAMAICA 0x2009 -#define TT_MS_LANGID_ENGLISH_CARIBBEAN 0x2409 -#define TT_MS_LANGID_ENGLISH_BELIZE 0x2809 -#define TT_MS_LANGID_ENGLISH_TRINIDAD 0x2C09 -#define TT_MS_LANGID_ENGLISH_ZIMBABWE 0x3009 -#define TT_MS_LANGID_ENGLISH_PHILIPPINES 0x3409 -#define TT_MS_LANGID_ENGLISH_INDONESIA 0x3809 -#define TT_MS_LANGID_ENGLISH_HONG_KONG 0x3C09 -#define TT_MS_LANGID_ENGLISH_INDIA 0x4009 -#define TT_MS_LANGID_ENGLISH_MALAYSIA 0x4409 -#define TT_MS_LANGID_ENGLISH_SINGAPORE 0x4809 -#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT 0x040A -#define TT_MS_LANGID_SPANISH_MEXICO 0x080A -#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT 0x0C0A -#define TT_MS_LANGID_SPANISH_GUATEMALA 0x100A -#define TT_MS_LANGID_SPANISH_COSTA_RICA 0x140A -#define TT_MS_LANGID_SPANISH_PANAMA 0x180A -#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC 0x1C0A -#define TT_MS_LANGID_SPANISH_VENEZUELA 0x200A -#define TT_MS_LANGID_SPANISH_COLOMBIA 0x240A -#define TT_MS_LANGID_SPANISH_PERU 0x280A -#define TT_MS_LANGID_SPANISH_ARGENTINA 0x2C0A -#define TT_MS_LANGID_SPANISH_ECUADOR 0x300A -#define TT_MS_LANGID_SPANISH_CHILE 0x340A -#define TT_MS_LANGID_SPANISH_URUGUAY 0x380A -#define TT_MS_LANGID_SPANISH_PARAGUAY 0x3C0A -#define TT_MS_LANGID_SPANISH_BOLIVIA 0x400A -#define TT_MS_LANGID_SPANISH_EL_SALVADOR 0x440A -#define TT_MS_LANGID_SPANISH_HONDURAS 0x480A -#define TT_MS_LANGID_SPANISH_NICARAGUA 0x4C0A -#define TT_MS_LANGID_SPANISH_PUERTO_RICO 0x500A -#define TT_MS_LANGID_SPANISH_UNITED_STATES 0x540A - /* The following ID blatantly violate MS specs by using a */ - /* sublanguage > 0x1F. */ -#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40AU -#define TT_MS_LANGID_FINNISH_FINLAND 0x040B -#define TT_MS_LANGID_FRENCH_FRANCE 0x040C -#define TT_MS_LANGID_FRENCH_BELGIUM 0x080C -#define TT_MS_LANGID_FRENCH_CANADA 0x0C0C -#define TT_MS_LANGID_FRENCH_SWITZERLAND 0x100C -#define TT_MS_LANGID_FRENCH_LUXEMBOURG 0x140C -#define TT_MS_LANGID_FRENCH_MONACO 0x180C -#define TT_MS_LANGID_FRENCH_WEST_INDIES 0x1C0C -#define TT_MS_LANGID_FRENCH_REUNION 0x200C -#define TT_MS_LANGID_FRENCH_CONGO 0x240C - /* which was formerly: */ -#define TT_MS_LANGID_FRENCH_ZAIRE TT_MS_LANGID_FRENCH_CONGO -#define TT_MS_LANGID_FRENCH_SENEGAL 0x280C -#define TT_MS_LANGID_FRENCH_CAMEROON 0x2C0C -#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE 0x300C -#define TT_MS_LANGID_FRENCH_MALI 0x340C -#define TT_MS_LANGID_FRENCH_MOROCCO 0x380C -#define TT_MS_LANGID_FRENCH_HAITI 0x3C0C - /* and another violation of the spec (see 0xE40AU) */ -#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40CU -#define TT_MS_LANGID_HEBREW_ISRAEL 0x040D -#define TT_MS_LANGID_HUNGARIAN_HUNGARY 0x040E -#define TT_MS_LANGID_ICELANDIC_ICELAND 0x040F -#define TT_MS_LANGID_ITALIAN_ITALY 0x0410 -#define TT_MS_LANGID_ITALIAN_SWITZERLAND 0x0810 -#define TT_MS_LANGID_JAPANESE_JAPAN 0x0411 -#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA 0x0412 -#define TT_MS_LANGID_KOREAN_JOHAB_KOREA 0x0812 -#define TT_MS_LANGID_DUTCH_NETHERLANDS 0x0413 -#define TT_MS_LANGID_DUTCH_BELGIUM 0x0813 -#define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL 0x0414 -#define TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK 0x0814 -#define TT_MS_LANGID_POLISH_POLAND 0x0415 -#define TT_MS_LANGID_PORTUGUESE_BRAZIL 0x0416 -#define TT_MS_LANGID_PORTUGUESE_PORTUGAL 0x0816 -#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND 0x0417 -#define TT_MS_LANGID_ROMANIAN_ROMANIA 0x0418 -#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA 0x0818 -#define TT_MS_LANGID_RUSSIAN_RUSSIA 0x0419 -#define TT_MS_LANGID_RUSSIAN_MOLDAVIA 0x0819 -#define TT_MS_LANGID_CROATIAN_CROATIA 0x041A -#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN 0x081A -#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC 0x0C1A - -#if 0 /* this used to be this value, but it looks like we were wrong */ -#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x101A -#else /* current sources say */ -#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA 0x101A -#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x141A - /* and XPsp2 Platform SDK added (2004-07-26) */ - /* Names are shortened to be significant within 40 chars. */ -#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN 0x181A -#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC 0x181A -#endif - -#define TT_MS_LANGID_SLOVAK_SLOVAKIA 0x041B -#define TT_MS_LANGID_ALBANIAN_ALBANIA 0x041C -#define TT_MS_LANGID_SWEDISH_SWEDEN 0x041D -#define TT_MS_LANGID_SWEDISH_FINLAND 0x081D -#define TT_MS_LANGID_THAI_THAILAND 0x041E -#define TT_MS_LANGID_TURKISH_TURKEY 0x041F -#define TT_MS_LANGID_URDU_PAKISTAN 0x0420 -#define TT_MS_LANGID_URDU_INDIA 0x0820 -#define TT_MS_LANGID_INDONESIAN_INDONESIA 0x0421 -#define TT_MS_LANGID_UKRAINIAN_UKRAINE 0x0422 -#define TT_MS_LANGID_BELARUSIAN_BELARUS 0x0423 -#define TT_MS_LANGID_SLOVENE_SLOVENIA 0x0424 -#define TT_MS_LANGID_ESTONIAN_ESTONIA 0x0425 -#define TT_MS_LANGID_LATVIAN_LATVIA 0x0426 -#define TT_MS_LANGID_LITHUANIAN_LITHUANIA 0x0427 -#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA 0x0827 -#define TT_MS_LANGID_TAJIK_TAJIKISTAN 0x0428 -#define TT_MS_LANGID_FARSI_IRAN 0x0429 -#define TT_MS_LANGID_VIETNAMESE_VIET_NAM 0x042A -#define TT_MS_LANGID_ARMENIAN_ARMENIA 0x042B -#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN 0x042C -#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC 0x082C -#define TT_MS_LANGID_BASQUE_SPAIN 0x042D -#define TT_MS_LANGID_SORBIAN_GERMANY 0x042E -#define TT_MS_LANGID_MACEDONIAN_MACEDONIA 0x042F -#define TT_MS_LANGID_SUTU_SOUTH_AFRICA 0x0430 -#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA 0x0431 -#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA 0x0432 -#define TT_MS_LANGID_VENDA_SOUTH_AFRICA 0x0433 -#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA 0x0434 -#define TT_MS_LANGID_ZULU_SOUTH_AFRICA 0x0435 -#define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA 0x0436 -#define TT_MS_LANGID_GEORGIAN_GEORGIA 0x0437 -#define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS 0x0438 -#define TT_MS_LANGID_HINDI_INDIA 0x0439 -#define TT_MS_LANGID_MALTESE_MALTA 0x043A - /* Added by XPsp2 Platform SDK (2004-07-26) */ -#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY 0x043B -#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN 0x083B -#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND 0x0C3B -#define TT_MS_LANGID_SAMI_LULE_NORWAY 0x103B -#define TT_MS_LANGID_SAMI_LULE_SWEDEN 0x143B -#define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY 0x183B -#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN 0x1C3B -#define TT_MS_LANGID_SAMI_SKOLT_FINLAND 0x203B -#define TT_MS_LANGID_SAMI_INARI_FINLAND 0x243B - /* ... and we also keep our old identifier... */ -#define TT_MS_LANGID_SAAMI_LAPONIA 0x043B - -#if 0 /* this seems to be a previous inversion */ -#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043C -#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083C -#else -#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083C -#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043C -#endif - -#define TT_MS_LANGID_YIDDISH_GERMANY 0x043D -#define TT_MS_LANGID_MALAY_MALAYSIA 0x043E -#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM 0x083E -#define TT_MS_LANGID_KAZAK_KAZAKSTAN 0x043F -#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN /* Cyrillic*/ 0x0440 - /* alias declared in Windows 2000 */ -#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \ - TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN - -#define TT_MS_LANGID_SWAHILI_KENYA 0x0441 -#define TT_MS_LANGID_TURKMEN_TURKMENISTAN 0x0442 -#define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN 0x0443 -#define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC 0x0843 -#define TT_MS_LANGID_TATAR_TATARSTAN 0x0444 -#define TT_MS_LANGID_BENGALI_INDIA 0x0445 -#define TT_MS_LANGID_BENGALI_BANGLADESH 0x0845 -#define TT_MS_LANGID_PUNJABI_INDIA 0x0446 -#define TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN 0x0846 -#define TT_MS_LANGID_GUJARATI_INDIA 0x0447 -#define TT_MS_LANGID_ORIYA_INDIA 0x0448 -#define TT_MS_LANGID_TAMIL_INDIA 0x0449 -#define TT_MS_LANGID_TELUGU_INDIA 0x044A -#define TT_MS_LANGID_KANNADA_INDIA 0x044B -#define TT_MS_LANGID_MALAYALAM_INDIA 0x044C -#define TT_MS_LANGID_ASSAMESE_INDIA 0x044D -#define TT_MS_LANGID_MARATHI_INDIA 0x044E -#define TT_MS_LANGID_SANSKRIT_INDIA 0x044F -#define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450 -#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN 0x0850 -#define TT_MS_LANGID_TIBETAN_CHINA 0x0451 - /* Don't use the next constant! It has */ - /* (1) the wrong spelling (Dzonghka) */ - /* (2) Microsoft doesn't officially define it -- */ - /* at least it is not in the List of Local */ - /* ID Values. */ - /* (3) Dzongkha is not the same language as */ - /* Tibetan, so merging it is wrong anyway. */ - /* */ - /* TT_MS_LANGID_TIBETAN_BHUTAN is correct, BTW. */ -#define TT_MS_LANGID_DZONGHKA_BHUTAN 0x0851 - -#if 0 - /* the following used to be defined */ -#define TT_MS_LANGID_TIBETAN_BHUTAN 0x0451 - /* ... but it was changed; */ -#else - /* So we will continue to #define it, but with the correct value */ -#define TT_MS_LANGID_TIBETAN_BHUTAN TT_MS_LANGID_DZONGHKA_BHUTAN -#endif - -#define TT_MS_LANGID_WELSH_WALES 0x0452 -#define TT_MS_LANGID_KHMER_CAMBODIA 0x0453 -#define TT_MS_LANGID_LAO_LAOS 0x0454 -#define TT_MS_LANGID_BURMESE_MYANMAR 0x0455 -#define TT_MS_LANGID_GALICIAN_SPAIN 0x0456 -#define TT_MS_LANGID_KONKANI_INDIA 0x0457 -#define TT_MS_LANGID_MANIPURI_INDIA /* Bengali */ 0x0458 -#define TT_MS_LANGID_SINDHI_INDIA /* Arabic */ 0x0459 -#define TT_MS_LANGID_SINDHI_PAKISTAN 0x0859 - /* Missing a LCID for Sindhi in Devanagari script */ -#define TT_MS_LANGID_SYRIAC_SYRIA 0x045A -#define TT_MS_LANGID_SINHALESE_SRI_LANKA 0x045B -#define TT_MS_LANGID_CHEROKEE_UNITED_STATES 0x045C -#define TT_MS_LANGID_INUKTITUT_CANADA 0x045D -#define TT_MS_LANGID_AMHARIC_ETHIOPIA 0x045E -#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */ 0x045F -#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN 0x085F - /* Missing a LCID for Tifinagh script */ -#define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */ 0x0460 - /* Spelled this way by XPsp2 Platform SDK (2004-07-26) */ - /* script is yet unclear... might be Arabic, Nagari or Sharada */ -#define TT_MS_LANGID_KASHMIRI_SASIA 0x0860 - /* ... and aliased (by MS) for compatibility reasons. */ -#define TT_MS_LANGID_KASHMIRI_INDIA TT_MS_LANGID_KASHMIRI_SASIA -#define TT_MS_LANGID_NEPALI_NEPAL 0x0461 -#define TT_MS_LANGID_NEPALI_INDIA 0x0861 -#define TT_MS_LANGID_FRISIAN_NETHERLANDS 0x0462 -#define TT_MS_LANGID_PASHTO_AFGHANISTAN 0x0463 -#define TT_MS_LANGID_FILIPINO_PHILIPPINES 0x0464 -#define TT_MS_LANGID_DHIVEHI_MALDIVES 0x0465 - /* alias declared in Windows 2000 */ -#define TT_MS_LANGID_DIVEHI_MALDIVES TT_MS_LANGID_DHIVEHI_MALDIVES -#define TT_MS_LANGID_EDO_NIGERIA 0x0466 -#define TT_MS_LANGID_FULFULDE_NIGERIA 0x0467 -#define TT_MS_LANGID_HAUSA_NIGERIA 0x0468 -#define TT_MS_LANGID_IBIBIO_NIGERIA 0x0469 -#define TT_MS_LANGID_YORUBA_NIGERIA 0x046A -#define TT_MS_LANGID_QUECHUA_BOLIVIA 0x046B -#define TT_MS_LANGID_QUECHUA_ECUADOR 0x086B -#define TT_MS_LANGID_QUECHUA_PERU 0x0C6B -#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA 0x046C - /* Also spelled by XPsp2 Platform SDK (2004-07-26) */ -#define TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA \ - TT_MS_LANGID_SEPEDI_SOUTH_AFRICA - /* language codes 0x046D, 0x046E and 0x046F are (still) unknown. */ -#define TT_MS_LANGID_IGBO_NIGERIA 0x0470 -#define TT_MS_LANGID_KANURI_NIGERIA 0x0471 -#define TT_MS_LANGID_OROMO_ETHIOPIA 0x0472 -#define TT_MS_LANGID_TIGRIGNA_ETHIOPIA 0x0473 -#define TT_MS_LANGID_TIGRIGNA_ERYTHREA 0x0873 - /* also spelled in the `Passport SDK' list as: */ -#define TT_MS_LANGID_TIGRIGNA_ERYTREA TT_MS_LANGID_TIGRIGNA_ERYTHREA -#define TT_MS_LANGID_GUARANI_PARAGUAY 0x0474 -#define TT_MS_LANGID_HAWAIIAN_UNITED_STATES 0x0475 -#define TT_MS_LANGID_LATIN 0x0476 -#define TT_MS_LANGID_SOMALI_SOMALIA 0x0477 - /* Note: Yi does not have a (proper) ISO 639-2 code, since it is mostly */ - /* not written (but OTOH the peculiar writing system is worth */ - /* studying). */ -#define TT_MS_LANGID_YI_CHINA 0x0478 -#define TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES 0x0479 - /* language codes from 0x047A to 0x047F are (still) unknown. */ -#define TT_MS_LANGID_UIGHUR_CHINA 0x0480 -#define TT_MS_LANGID_MAORI_NEW_ZEALAND 0x0481 - -#if 0 /* not deemed useful for fonts */ -#define TT_MS_LANGID_HUMAN_INTERFACE_DEVICE 0x04FF -#endif - - - /*************************************************************************/ - /* */ - /* Possible values of the `name' identifier field in the name records of */ - /* the TTF `name' table. These values are platform independent. */ - /* */ -#define TT_NAME_ID_COPYRIGHT 0 -#define TT_NAME_ID_FONT_FAMILY 1 -#define TT_NAME_ID_FONT_SUBFAMILY 2 -#define TT_NAME_ID_UNIQUE_ID 3 -#define TT_NAME_ID_FULL_NAME 4 -#define TT_NAME_ID_VERSION_STRING 5 -#define TT_NAME_ID_PS_NAME 6 -#define TT_NAME_ID_TRADEMARK 7 - - /* the following values are from the OpenType spec */ -#define TT_NAME_ID_MANUFACTURER 8 -#define TT_NAME_ID_DESIGNER 9 -#define TT_NAME_ID_DESCRIPTION 10 -#define TT_NAME_ID_VENDOR_URL 11 -#define TT_NAME_ID_DESIGNER_URL 12 -#define TT_NAME_ID_LICENSE 13 -#define TT_NAME_ID_LICENSE_URL 14 - /* number 15 is reserved */ -#define TT_NAME_ID_PREFERRED_FAMILY 16 -#define TT_NAME_ID_PREFERRED_SUBFAMILY 17 -#define TT_NAME_ID_MAC_FULL_NAME 18 - - /* The following code is new as of 2000-01-21 */ -#define TT_NAME_ID_SAMPLE_TEXT 19 - - /* This is new in OpenType 1.3 */ -#define TT_NAME_ID_CID_FINDFONT_NAME 20 - - /* This is new in OpenType 1.5 */ -#define TT_NAME_ID_WWS_FAMILY 21 -#define TT_NAME_ID_WWS_SUBFAMILY 22 - - - /*************************************************************************/ - /* */ - /* Bit mask values for the Unicode Ranges from the TTF `OS2 ' table. */ - /* */ - /* Updated 08-Nov-2008. */ - /* */ - - /* Bit 0 Basic Latin */ -#define TT_UCR_BASIC_LATIN (1L << 0) /* U+0020-U+007E */ - /* Bit 1 C1 Controls and Latin-1 Supplement */ -#define TT_UCR_LATIN1_SUPPLEMENT (1L << 1) /* U+0080-U+00FF */ - /* Bit 2 Latin Extended-A */ -#define TT_UCR_LATIN_EXTENDED_A (1L << 2) /* U+0100-U+017F */ - /* Bit 3 Latin Extended-B */ -#define TT_UCR_LATIN_EXTENDED_B (1L << 3) /* U+0180-U+024F */ - /* Bit 4 IPA Extensions */ - /* Phonetic Extensions */ - /* Phonetic Extensions Supplement */ -#define TT_UCR_IPA_EXTENSIONS (1L << 4) /* U+0250-U+02AF */ - /* U+1D00-U+1D7F */ - /* U+1D80-U+1DBF */ - /* Bit 5 Spacing Modifier Letters */ - /* Modifier Tone Letters */ -#define TT_UCR_SPACING_MODIFIER (1L << 5) /* U+02B0-U+02FF */ - /* U+A700-U+A71F */ - /* Bit 6 Combining Diacritical Marks */ - /* Combining Diacritical Marks Supplement */ -#define TT_UCR_COMBINING_DIACRITICS (1L << 6) /* U+0300-U+036F */ - /* U+1DC0-U+1DFF */ - /* Bit 7 Greek and Coptic */ -#define TT_UCR_GREEK (1L << 7) /* U+0370-U+03FF */ - /* Bit 8 Coptic */ -#define TT_UCR_COPTIC (1L << 8) /* U+2C80-U+2CFF */ - /* Bit 9 Cyrillic */ - /* Cyrillic Supplement */ - /* Cyrillic Extended-A */ - /* Cyrillic Extended-B */ -#define TT_UCR_CYRILLIC (1L << 9) /* U+0400-U+04FF */ - /* U+0500-U+052F */ - /* U+2DE0-U+2DFF */ - /* U+A640-U+A69F */ - /* Bit 10 Armenian */ -#define TT_UCR_ARMENIAN (1L << 10) /* U+0530-U+058F */ - /* Bit 11 Hebrew */ -#define TT_UCR_HEBREW (1L << 11) /* U+0590-U+05FF */ - /* Bit 12 Vai */ -#define TT_UCR_VAI (1L << 12) /* U+A500-U+A63F */ - /* Bit 13 Arabic */ - /* Arabic Supplement */ -#define TT_UCR_ARABIC (1L << 13) /* U+0600-U+06FF */ - /* U+0750-U+077F */ - /* Bit 14 NKo */ -#define TT_UCR_NKO (1L << 14) /* U+07C0-U+07FF */ - /* Bit 15 Devanagari */ -#define TT_UCR_DEVANAGARI (1L << 15) /* U+0900-U+097F */ - /* Bit 16 Bengali */ -#define TT_UCR_BENGALI (1L << 16) /* U+0980-U+09FF */ - /* Bit 17 Gurmukhi */ -#define TT_UCR_GURMUKHI (1L << 17) /* U+0A00-U+0A7F */ - /* Bit 18 Gujarati */ -#define TT_UCR_GUJARATI (1L << 18) /* U+0A80-U+0AFF */ - /* Bit 19 Oriya */ -#define TT_UCR_ORIYA (1L << 19) /* U+0B00-U+0B7F */ - /* Bit 20 Tamil */ -#define TT_UCR_TAMIL (1L << 20) /* U+0B80-U+0BFF */ - /* Bit 21 Telugu */ -#define TT_UCR_TELUGU (1L << 21) /* U+0C00-U+0C7F */ - /* Bit 22 Kannada */ -#define TT_UCR_KANNADA (1L << 22) /* U+0C80-U+0CFF */ - /* Bit 23 Malayalam */ -#define TT_UCR_MALAYALAM (1L << 23) /* U+0D00-U+0D7F */ - /* Bit 24 Thai */ -#define TT_UCR_THAI (1L << 24) /* U+0E00-U+0E7F */ - /* Bit 25 Lao */ -#define TT_UCR_LAO (1L << 25) /* U+0E80-U+0EFF */ - /* Bit 26 Georgian */ - /* Georgian Supplement */ -#define TT_UCR_GEORGIAN (1L << 26) /* U+10A0-U+10FF */ - /* U+2D00-U+2D2F */ - /* Bit 27 Balinese */ -#define TT_UCR_BALINESE (1L << 27) /* U+1B00-U+1B7F */ - /* Bit 28 Hangul Jamo */ -#define TT_UCR_HANGUL_JAMO (1L << 28) /* U+1100-U+11FF */ - /* Bit 29 Latin Extended Additional */ - /* Latin Extended-C */ - /* Latin Extended-D */ -#define TT_UCR_LATIN_EXTENDED_ADDITIONAL (1L << 29) /* U+1E00-U+1EFF */ - /* U+2C60-U+2C7F */ - /* U+A720-U+A7FF */ - /* Bit 30 Greek Extended */ -#define TT_UCR_GREEK_EXTENDED (1L << 30) /* U+1F00-U+1FFF */ - /* Bit 31 General Punctuation */ - /* Supplemental Punctuation */ -#define TT_UCR_GENERAL_PUNCTUATION (1L << 31) /* U+2000-U+206F */ - /* U+2E00-U+2E7F */ - /* Bit 32 Superscripts And Subscripts */ -#define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS (1L << 0) /* U+2070-U+209F */ - /* Bit 33 Currency Symbols */ -#define TT_UCR_CURRENCY_SYMBOLS (1L << 1) /* U+20A0-U+20CF */ - /* Bit 34 Combining Diacritical Marks For Symbols */ -#define TT_UCR_COMBINING_DIACRITICS_SYMB (1L << 2) /* U+20D0-U+20FF */ - /* Bit 35 Letterlike Symbols */ -#define TT_UCR_LETTERLIKE_SYMBOLS (1L << 3) /* U+2100-U+214F */ - /* Bit 36 Number Forms */ -#define TT_UCR_NUMBER_FORMS (1L << 4) /* U+2150-U+218F */ - /* Bit 37 Arrows */ - /* Supplemental Arrows-A */ - /* Supplemental Arrows-B */ - /* Miscellaneous Symbols and Arrows */ -#define TT_UCR_ARROWS (1L << 5) /* U+2190-U+21FF */ - /* U+27F0-U+27FF */ - /* U+2900-U+297F */ - /* U+2B00-U+2BFF */ - /* Bit 38 Mathematical Operators */ - /* Supplemental Mathematical Operators */ - /* Miscellaneous Mathematical Symbols-A */ - /* Miscellaneous Mathematical Symbols-B */ -#define TT_UCR_MATHEMATICAL_OPERATORS (1L << 6) /* U+2200-U+22FF */ - /* U+2A00-U+2AFF */ - /* U+27C0-U+27EF */ - /* U+2980-U+29FF */ - /* Bit 39 Miscellaneous Technical */ -#define TT_UCR_MISCELLANEOUS_TECHNICAL (1L << 7) /* U+2300-U+23FF */ - /* Bit 40 Control Pictures */ -#define TT_UCR_CONTROL_PICTURES (1L << 8) /* U+2400-U+243F */ - /* Bit 41 Optical Character Recognition */ -#define TT_UCR_OCR (1L << 9) /* U+2440-U+245F */ - /* Bit 42 Enclosed Alphanumerics */ -#define TT_UCR_ENCLOSED_ALPHANUMERICS (1L << 10) /* U+2460-U+24FF */ - /* Bit 43 Box Drawing */ -#define TT_UCR_BOX_DRAWING (1L << 11) /* U+2500-U+257F */ - /* Bit 44 Block Elements */ -#define TT_UCR_BLOCK_ELEMENTS (1L << 12) /* U+2580-U+259F */ - /* Bit 45 Geometric Shapes */ -#define TT_UCR_GEOMETRIC_SHAPES (1L << 13) /* U+25A0-U+25FF */ - /* Bit 46 Miscellaneous Symbols */ -#define TT_UCR_MISCELLANEOUS_SYMBOLS (1L << 14) /* U+2600-U+26FF */ - /* Bit 47 Dingbats */ -#define TT_UCR_DINGBATS (1L << 15) /* U+2700-U+27BF */ - /* Bit 48 CJK Symbols and Punctuation */ -#define TT_UCR_CJK_SYMBOLS (1L << 16) /* U+3000-U+303F */ - /* Bit 49 Hiragana */ -#define TT_UCR_HIRAGANA (1L << 17) /* U+3040-U+309F */ - /* Bit 50 Katakana */ - /* Katakana Phonetic Extensions */ -#define TT_UCR_KATAKANA (1L << 18) /* U+30A0-U+30FF */ - /* U+31F0-U+31FF */ - /* Bit 51 Bopomofo */ - /* Bopomofo Extended */ -#define TT_UCR_BOPOMOFO (1L << 19) /* U+3100-U+312F */ - /* U+31A0-U+31BF */ - /* Bit 52 Hangul Compatibility Jamo */ -#define TT_UCR_HANGUL_COMPATIBILITY_JAMO (1L << 20) /* U+3130-U+318F */ - /* Bit 53 Phags-Pa */ -#define TT_UCR_CJK_MISC (1L << 21) /* U+A840-U+A87F */ -#define TT_UCR_KANBUN TT_UCR_CJK_MISC /* deprecated */ -#define TT_UCR_PHAGSPA - /* Bit 54 Enclosed CJK Letters and Months */ -#define TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS (1L << 22) /* U+3200-U+32FF */ - /* Bit 55 CJK Compatibility */ -#define TT_UCR_CJK_COMPATIBILITY (1L << 23) /* U+3300-U+33FF */ - /* Bit 56 Hangul Syllables */ -#define TT_UCR_HANGUL (1L << 24) /* U+AC00-U+D7A3 */ - /* Bit 57 High Surrogates */ - /* High Private Use Surrogates */ - /* Low Surrogates */ - /* */ - /* According to OpenType specs v.1.3+, */ - /* setting bit 57 implies that there is */ - /* at least one codepoint beyond the */ - /* Basic Multilingual Plane that is */ - /* supported by this font. So it really */ - /* means >= U+10000 */ -#define TT_UCR_SURROGATES (1L << 25) /* U+D800-U+DB7F */ - /* U+DB80-U+DBFF */ - /* U+DC00-U+DFFF */ -#define TT_UCR_NON_PLANE_0 TT_UCR_SURROGATES - /* Bit 58 Phoenician */ -#define TT_UCR_PHOENICIAN (1L << 26) /*U+10900-U+1091F*/ - /* Bit 59 CJK Unified Ideographs */ - /* CJK Radicals Supplement */ - /* Kangxi Radicals */ - /* Ideographic Description Characters */ - /* CJK Unified Ideographs Extension A */ - /* CJK Unified Ideographs Extension B */ - /* Kanbun */ -#define TT_UCR_CJK_UNIFIED_IDEOGRAPHS (1L << 27) /* U+4E00-U+9FFF */ - /* U+2E80-U+2EFF */ - /* U+2F00-U+2FDF */ - /* U+2FF0-U+2FFF */ - /* U+3400-U+4DB5 */ - /*U+20000-U+2A6DF*/ - /* U+3190-U+319F */ - /* Bit 60 Private Use */ -#define TT_UCR_PRIVATE_USE (1L << 28) /* U+E000-U+F8FF */ - /* Bit 61 CJK Strokes */ - /* CJK Compatibility Ideographs */ - /* CJK Compatibility Ideographs Supplement */ -#define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS (1L << 29) /* U+31C0-U+31EF */ - /* U+F900-U+FAFF */ - /*U+2F800-U+2FA1F*/ - /* Bit 62 Alphabetic Presentation Forms */ -#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS (1L << 30) /* U+FB00-U+FB4F */ - /* Bit 63 Arabic Presentation Forms-A */ -#define TT_UCR_ARABIC_PRESENTATIONS_A (1L << 31) /* U+FB50-U+FDFF */ - /* Bit 64 Combining Half Marks */ -#define TT_UCR_COMBINING_HALF_MARKS (1L << 0) /* U+FE20-U+FE2F */ - /* Bit 65 Vertical forms */ - /* CJK Compatibility Forms */ -#define TT_UCR_CJK_COMPATIBILITY_FORMS (1L << 1) /* U+FE10-U+FE1F */ - /* U+FE30-U+FE4F */ - /* Bit 66 Small Form Variants */ -#define TT_UCR_SMALL_FORM_VARIANTS (1L << 2) /* U+FE50-U+FE6F */ - /* Bit 67 Arabic Presentation Forms-B */ -#define TT_UCR_ARABIC_PRESENTATIONS_B (1L << 3) /* U+FE70-U+FEFE */ - /* Bit 68 Halfwidth and Fullwidth Forms */ -#define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS (1L << 4) /* U+FF00-U+FFEF */ - /* Bit 69 Specials */ -#define TT_UCR_SPECIALS (1L << 5) /* U+FFF0-U+FFFD */ - /* Bit 70 Tibetan */ -#define TT_UCR_TIBETAN (1L << 6) /* U+0F00-U+0FFF */ - /* Bit 71 Syriac */ -#define TT_UCR_SYRIAC (1L << 7) /* U+0700-U+074F */ - /* Bit 72 Thaana */ -#define TT_UCR_THAANA (1L << 8) /* U+0780-U+07BF */ - /* Bit 73 Sinhala */ -#define TT_UCR_SINHALA (1L << 9) /* U+0D80-U+0DFF */ - /* Bit 74 Myanmar */ -#define TT_UCR_MYANMAR (1L << 10) /* U+1000-U+109F */ - /* Bit 75 Ethiopic */ - /* Ethiopic Supplement */ - /* Ethiopic Extended */ -#define TT_UCR_ETHIOPIC (1L << 11) /* U+1200-U+137F */ - /* U+1380-U+139F */ - /* U+2D80-U+2DDF */ - /* Bit 76 Cherokee */ -#define TT_UCR_CHEROKEE (1L << 12) /* U+13A0-U+13FF */ - /* Bit 77 Unified Canadian Aboriginal Syllabics */ -#define TT_UCR_CANADIAN_ABORIGINAL_SYLLABICS (1L << 13) /* U+1400-U+167F */ - /* Bit 78 Ogham */ -#define TT_UCR_OGHAM (1L << 14) /* U+1680-U+169F */ - /* Bit 79 Runic */ -#define TT_UCR_RUNIC (1L << 15) /* U+16A0-U+16FF */ - /* Bit 80 Khmer */ - /* Khmer Symbols */ -#define TT_UCR_KHMER (1L << 16) /* U+1780-U+17FF */ - /* U+19E0-U+19FF */ - /* Bit 81 Mongolian */ -#define TT_UCR_MONGOLIAN (1L << 17) /* U+1800-U+18AF */ - /* Bit 82 Braille Patterns */ -#define TT_UCR_BRAILLE (1L << 18) /* U+2800-U+28FF */ - /* Bit 83 Yi Syllables */ - /* Yi Radicals */ -#define TT_UCR_YI (1L << 19) /* U+A000-U+A48F */ - /* U+A490-U+A4CF */ - /* Bit 84 Tagalog */ - /* Hanunoo */ - /* Buhid */ - /* Tagbanwa */ -#define TT_UCR_PHILIPPINE (1L << 20) /* U+1700-U+171F */ - /* U+1720-U+173F */ - /* U+1740-U+175F */ - /* U+1760-U+177F */ - /* Bit 85 Old Italic */ -#define TT_UCR_OLD_ITALIC (1L << 21) /*U+10300-U+1032F*/ - /* Bit 86 Gothic */ -#define TT_UCR_GOTHIC (1L << 22) /*U+10330-U+1034F*/ - /* Bit 87 Deseret */ -#define TT_UCR_DESERET (1L << 23) /*U+10400-U+1044F*/ - /* Bit 88 Byzantine Musical Symbols */ - /* Musical Symbols */ - /* Ancient Greek Musical Notation */ -#define TT_UCR_MUSICAL_SYMBOLS (1L << 24) /*U+1D000-U+1D0FF*/ - /*U+1D100-U+1D1FF*/ - /*U+1D200-U+1D24F*/ - /* Bit 89 Mathematical Alphanumeric Symbols */ -#define TT_UCR_MATH_ALPHANUMERIC_SYMBOLS (1L << 25) /*U+1D400-U+1D7FF*/ - /* Bit 90 Private Use (plane 15) */ - /* Private Use (plane 16) */ -#define TT_UCR_PRIVATE_USE_SUPPLEMENTARY (1L << 26) /*U+F0000-U+FFFFD*/ - /*U+100000-U+10FFFD*/ - /* Bit 91 Variation Selectors */ - /* Variation Selectors Supplement */ -#define TT_UCR_VARIATION_SELECTORS (1L << 27) /* U+FE00-U+FE0F */ - /*U+E0100-U+E01EF*/ - /* Bit 92 Tags */ -#define TT_UCR_TAGS (1L << 28) /*U+E0000-U+E007F*/ - /* Bit 93 Limbu */ -#define TT_UCR_LIMBU (1L << 29) /* U+1900-U+194F */ - /* Bit 94 Tai Le */ -#define TT_UCR_TAI_LE (1L << 30) /* U+1950-U+197F */ - /* Bit 95 New Tai Lue */ -#define TT_UCR_NEW_TAI_LUE (1L << 31) /* U+1980-U+19DF */ - /* Bit 96 Buginese */ -#define TT_UCR_BUGINESE (1L << 0) /* U+1A00-U+1A1F */ - /* Bit 97 Glagolitic */ -#define TT_UCR_GLAGOLITIC (1L << 1) /* U+2C00-U+2C5F */ - /* Bit 98 Tifinagh */ -#define TT_UCR_TIFINAGH (1L << 2) /* U+2D30-U+2D7F */ - /* Bit 99 Yijing Hexagram Symbols */ -#define TT_UCR_YIJING (1L << 3) /* U+4DC0-U+4DFF */ - /* Bit 100 Syloti Nagri */ -#define TT_UCR_SYLOTI_NAGRI (1L << 4) /* U+A800-U+A82F */ - /* Bit 101 Linear B Syllabary */ - /* Linear B Ideograms */ - /* Aegean Numbers */ -#define TT_UCR_LINEAR_B (1L << 5) /*U+10000-U+1007F*/ - /*U+10080-U+100FF*/ - /*U+10100-U+1013F*/ - /* Bit 102 Ancient Greek Numbers */ -#define TT_UCR_ANCIENT_GREEK_NUMBERS (1L << 6) /*U+10140-U+1018F*/ - /* Bit 103 Ugaritic */ -#define TT_UCR_UGARITIC (1L << 7) /*U+10380-U+1039F*/ - /* Bit 104 Old Persian */ -#define TT_UCR_OLD_PERSIAN (1L << 8) /*U+103A0-U+103DF*/ - /* Bit 105 Shavian */ -#define TT_UCR_SHAVIAN (1L << 9) /*U+10450-U+1047F*/ - /* Bit 106 Osmanya */ -#define TT_UCR_OSMANYA (1L << 10) /*U+10480-U+104AF*/ - /* Bit 107 Cypriot Syllabary */ -#define TT_UCR_CYPRIOT_SYLLABARY (1L << 11) /*U+10800-U+1083F*/ - /* Bit 108 Kharoshthi */ -#define TT_UCR_KHAROSHTHI (1L << 12) /*U+10A00-U+10A5F*/ - /* Bit 109 Tai Xuan Jing Symbols */ -#define TT_UCR_TAI_XUAN_JING (1L << 13) /*U+1D300-U+1D35F*/ - /* Bit 110 Cuneiform */ - /* Cuneiform Numbers and Punctuation */ -#define TT_UCR_CUNEIFORM (1L << 14) /*U+12000-U+123FF*/ - /*U+12400-U+1247F*/ - /* Bit 111 Counting Rod Numerals */ -#define TT_UCR_COUNTING_ROD_NUMERALS (1L << 15) /*U+1D360-U+1D37F*/ - /* Bit 112 Sundanese */ -#define TT_UCR_SUNDANESE (1L << 16) /* U+1B80-U+1BBF */ - /* Bit 113 Lepcha */ -#define TT_UCR_LEPCHA (1L << 17) /* U+1C00-U+1C4F */ - /* Bit 114 Ol Chiki */ -#define TT_UCR_OL_CHIKI (1L << 18) /* U+1C50-U+1C7F */ - /* Bit 115 Saurashtra */ -#define TT_UCR_SAURASHTRA (1L << 19) /* U+A880-U+A8DF */ - /* Bit 116 Kayah Li */ -#define TT_UCR_KAYAH_LI (1L << 20) /* U+A900-U+A92F */ - /* Bit 117 Rejang */ -#define TT_UCR_REJANG (1L << 21) /* U+A930-U+A95F */ - /* Bit 118 Cham */ -#define TT_UCR_CHAM (1L << 22) /* U+AA00-U+AA5F */ - /* Bit 119 Ancient Symbols */ -#define TT_UCR_ANCIENT_SYMBOLS (1L << 23) /*U+10190-U+101CF*/ - /* Bit 120 Phaistos Disc */ -#define TT_UCR_PHAISTOS_DISC (1L << 24) /*U+101D0-U+101FF*/ - /* Bit 121 Carian */ - /* Lycian */ - /* Lydian */ -#define TT_UCR_OLD_ANATOLIAN (1L << 25) /*U+102A0-U+102DF*/ - /*U+10280-U+1029F*/ - /*U+10920-U+1093F*/ - /* Bit 122 Domino Tiles */ - /* Mahjong Tiles */ -#define TT_UCR_GAME_TILES (1L << 26) /*U+1F030-U+1F09F*/ - /*U+1F000-U+1F02F*/ - /* Bit 123-127 Reserved for process-internal usage */ - - - /*************************************************************************/ - /* */ - /* Some compilers have a very limited length of identifiers. */ - /* */ -#if defined( __TURBOC__ ) && __TURBOC__ < 0x0410 || defined( __PACIFIC__ ) -#define HAVE_LIMIT_ON_IDENTS -#endif - - -#ifndef HAVE_LIMIT_ON_IDENTS - - - /*************************************************************************/ - /* */ - /* Here some alias #defines in order to be clearer. */ - /* */ - /* These are not always #defined to stay within the 31~character limit, */ - /* which some compilers have. */ - /* */ - /* Credits go to Dave Hoo <dhoo@flash.net> for pointing out that modern */ - /* Borland compilers (read: from BC++ 3.1 on) can increase this limit. */ - /* If you get a warning with such a compiler, use the -i40 switch. */ - /* */ -#define TT_UCR_ARABIC_PRESENTATION_FORMS_A \ - TT_UCR_ARABIC_PRESENTATIONS_A -#define TT_UCR_ARABIC_PRESENTATION_FORMS_B \ - TT_UCR_ARABIC_PRESENTATIONS_B - -#define TT_UCR_COMBINING_DIACRITICAL_MARKS \ - TT_UCR_COMBINING_DIACRITICS -#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \ - TT_UCR_COMBINING_DIACRITICS_SYMB - - -#endif /* !HAVE_LIMIT_ON_IDENTS */ - - -FT_END_HEADER - -#endif /* TTNAMEID_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/tttables.h b/builddir/freetype-2.7.0/include/freetype/tttables.h deleted file mode 100644 index 1c075dc..0000000 --- a/builddir/freetype-2.7.0/include/freetype/tttables.h +++ /dev/null @@ -1,829 +0,0 @@ -/***************************************************************************/ -/* */ -/* tttables.h */ -/* */ -/* Basic SFNT/TrueType tables definitions and interface */ -/* (specification only). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef TTTABLES_H_ -#define TTTABLES_H_ - - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - /*************************************************************************/ - /* */ - /* <Section> */ - /* truetype_tables */ - /* */ - /* <Title> */ - /* TrueType Tables */ - /* */ - /* <Abstract> */ - /* TrueType specific table types and functions. */ - /* */ - /* <Description> */ - /* This section contains the definition of TrueType-specific tables */ - /* as well as some routines used to access and process them. */ - /* */ - /* <Order> */ - /* TT_Header */ - /* TT_HoriHeader */ - /* TT_VertHeader */ - /* TT_OS2 */ - /* TT_Postscript */ - /* TT_PCLT */ - /* TT_MaxProfile */ - /* */ - /* FT_Sfnt_Tag */ - /* FT_Get_Sfnt_Table */ - /* FT_Load_Sfnt_Table */ - /* FT_Sfnt_Table_Info */ - /* */ - /* FT_Get_CMap_Language_ID */ - /* FT_Get_CMap_Format */ - /* */ - /* FT_PARAM_TAG_UNPATENTED_HINTING */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_Header */ - /* */ - /* <Description> */ - /* A structure used to model a TrueType font header table. All */ - /* fields follow the TrueType specification. */ - /* */ - typedef struct TT_Header_ - { - FT_Fixed Table_Version; - FT_Fixed Font_Revision; - - FT_Long CheckSum_Adjust; - FT_Long Magic_Number; - - FT_UShort Flags; - FT_UShort Units_Per_EM; - - FT_Long Created [2]; - FT_Long Modified[2]; - - FT_Short xMin; - FT_Short yMin; - FT_Short xMax; - FT_Short yMax; - - FT_UShort Mac_Style; - FT_UShort Lowest_Rec_PPEM; - - FT_Short Font_Direction; - FT_Short Index_To_Loc_Format; - FT_Short Glyph_Data_Format; - - } TT_Header; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_HoriHeader */ - /* */ - /* <Description> */ - /* A structure used to model a TrueType horizontal header, the `hhea' */ - /* table, as well as the corresponding horizontal metrics table, */ - /* i.e., the `hmtx' table. */ - /* */ - /* <Fields> */ - /* Version :: The table version. */ - /* */ - /* Ascender :: The font's ascender, i.e., the distance */ - /* from the baseline to the top-most of all */ - /* glyph points found in the font. */ - /* */ - /* This value is invalid in many fonts, as */ - /* it is usually set by the font designer, */ - /* and often reflects only a portion of the */ - /* glyphs found in the font (maybe ASCII). */ - /* */ - /* You should use the `sTypoAscender' field */ - /* of the OS/2 table instead if you want */ - /* the correct one. */ - /* */ - /* Descender :: The font's descender, i.e., the distance */ - /* from the baseline to the bottom-most of */ - /* all glyph points found in the font. It */ - /* is negative. */ - /* */ - /* This value is invalid in many fonts, as */ - /* it is usually set by the font designer, */ - /* and often reflects only a portion of the */ - /* glyphs found in the font (maybe ASCII). */ - /* */ - /* You should use the `sTypoDescender' */ - /* field of the OS/2 table instead if you */ - /* want the correct one. */ - /* */ - /* Line_Gap :: The font's line gap, i.e., the distance */ - /* to add to the ascender and descender to */ - /* get the BTB, i.e., the */ - /* baseline-to-baseline distance for the */ - /* font. */ - /* */ - /* advance_Width_Max :: This field is the maximum of all advance */ - /* widths found in the font. It can be */ - /* used to compute the maximum width of an */ - /* arbitrary string of text. */ - /* */ - /* min_Left_Side_Bearing :: The minimum left side bearing of all */ - /* glyphs within the font. */ - /* */ - /* min_Right_Side_Bearing :: The minimum right side bearing of all */ - /* glyphs within the font. */ - /* */ - /* xMax_Extent :: The maximum horizontal extent (i.e., the */ - /* `width' of a glyph's bounding box) for */ - /* all glyphs in the font. */ - /* */ - /* caret_Slope_Rise :: The rise coefficient of the cursor's */ - /* slope of the cursor (slope=rise/run). */ - /* */ - /* caret_Slope_Run :: The run coefficient of the cursor's */ - /* slope. */ - /* */ - /* Reserved :: 8~reserved bytes. */ - /* */ - /* metric_Data_Format :: Always~0. */ - /* */ - /* number_Of_HMetrics :: Number of HMetrics entries in the `hmtx' */ - /* table -- this value can be smaller than */ - /* the total number of glyphs in the font. */ - /* */ - /* long_metrics :: A pointer into the `hmtx' table. */ - /* */ - /* short_metrics :: A pointer into the `hmtx' table. */ - /* */ - /* <Note> */ - /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */ - /* be identical except for the names of their fields, */ - /* which are different. */ - /* */ - /* This ensures that a single function in the `ttload' */ - /* module is able to read both the horizontal and vertical */ - /* headers. */ - /* */ - typedef struct TT_HoriHeader_ - { - FT_Fixed Version; - FT_Short Ascender; - FT_Short Descender; - FT_Short Line_Gap; - - FT_UShort advance_Width_Max; /* advance width maximum */ - - FT_Short min_Left_Side_Bearing; /* minimum left-sb */ - FT_Short min_Right_Side_Bearing; /* minimum right-sb */ - FT_Short xMax_Extent; /* xmax extents */ - FT_Short caret_Slope_Rise; - FT_Short caret_Slope_Run; - FT_Short caret_Offset; - - FT_Short Reserved[4]; - - FT_Short metric_Data_Format; - FT_UShort number_Of_HMetrics; - - /* The following fields are not defined by the TrueType specification */ - /* but they are used to connect the metrics header to the relevant */ - /* `HMTX' table. */ - - void* long_metrics; - void* short_metrics; - - } TT_HoriHeader; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_VertHeader */ - /* */ - /* <Description> */ - /* A structure used to model a TrueType vertical header, the `vhea' */ - /* table, as well as the corresponding vertical metrics table, i.e., */ - /* the `vmtx' table. */ - /* */ - /* <Fields> */ - /* Version :: The table version. */ - /* */ - /* Ascender :: The font's ascender, i.e., the distance */ - /* from the baseline to the top-most of */ - /* all glyph points found in the font. */ - /* */ - /* This value is invalid in many fonts, as */ - /* it is usually set by the font designer, */ - /* and often reflects only a portion of */ - /* the glyphs found in the font (maybe */ - /* ASCII). */ - /* */ - /* You should use the `sTypoAscender' */ - /* field of the OS/2 table instead if you */ - /* want the correct one. */ - /* */ - /* Descender :: The font's descender, i.e., the */ - /* distance from the baseline to the */ - /* bottom-most of all glyph points found */ - /* in the font. It is negative. */ - /* */ - /* This value is invalid in many fonts, as */ - /* it is usually set by the font designer, */ - /* and often reflects only a portion of */ - /* the glyphs found in the font (maybe */ - /* ASCII). */ - /* */ - /* You should use the `sTypoDescender' */ - /* field of the OS/2 table instead if you */ - /* want the correct one. */ - /* */ - /* Line_Gap :: The font's line gap, i.e., the distance */ - /* to add to the ascender and descender to */ - /* get the BTB, i.e., the */ - /* baseline-to-baseline distance for the */ - /* font. */ - /* */ - /* advance_Height_Max :: This field is the maximum of all */ - /* advance heights found in the font. It */ - /* can be used to compute the maximum */ - /* height of an arbitrary string of text. */ - /* */ - /* min_Top_Side_Bearing :: The minimum top side bearing of all */ - /* glyphs within the font. */ - /* */ - /* min_Bottom_Side_Bearing :: The minimum bottom side bearing of all */ - /* glyphs within the font. */ - /* */ - /* yMax_Extent :: The maximum vertical extent (i.e., the */ - /* `height' of a glyph's bounding box) for */ - /* all glyphs in the font. */ - /* */ - /* caret_Slope_Rise :: The rise coefficient of the cursor's */ - /* slope of the cursor (slope=rise/run). */ - /* */ - /* caret_Slope_Run :: The run coefficient of the cursor's */ - /* slope. */ - /* */ - /* caret_Offset :: The cursor's offset for slanted fonts. */ - /* This value is `reserved' in vmtx */ - /* version 1.0. */ - /* */ - /* Reserved :: 8~reserved bytes. */ - /* */ - /* metric_Data_Format :: Always~0. */ - /* */ - /* number_Of_HMetrics :: Number of VMetrics entries in the */ - /* `vmtx' table -- this value can be */ - /* smaller than the total number of glyphs */ - /* in the font. */ - /* */ - /* long_metrics :: A pointer into the `vmtx' table. */ - /* */ - /* short_metrics :: A pointer into the `vmtx' table. */ - /* */ - /* <Note> */ - /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */ - /* be identical except for the names of their fields, */ - /* which are different. */ - /* */ - /* This ensures that a single function in the `ttload' */ - /* module is able to read both the horizontal and vertical */ - /* headers. */ - /* */ - typedef struct TT_VertHeader_ - { - FT_Fixed Version; - FT_Short Ascender; - FT_Short Descender; - FT_Short Line_Gap; - - FT_UShort advance_Height_Max; /* advance height maximum */ - - FT_Short min_Top_Side_Bearing; /* minimum left-sb or top-sb */ - FT_Short min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb */ - FT_Short yMax_Extent; /* xmax or ymax extents */ - FT_Short caret_Slope_Rise; - FT_Short caret_Slope_Run; - FT_Short caret_Offset; - - FT_Short Reserved[4]; - - FT_Short metric_Data_Format; - FT_UShort number_Of_VMetrics; - - /* The following fields are not defined by the TrueType specification */ - /* but they're used to connect the metrics header to the relevant */ - /* `HMTX' or `VMTX' table. */ - - void* long_metrics; - void* short_metrics; - - } TT_VertHeader; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_OS2 */ - /* */ - /* <Description> */ - /* A structure used to model a TrueType OS/2 table. All fields */ - /* comply to the OpenType specification. */ - /* */ - /* Note that we now support old Mac fonts that do not include an OS/2 */ - /* table. In this case, the `version' field is always set to 0xFFFF. */ - /* */ - typedef struct TT_OS2_ - { - FT_UShort version; /* 0x0001 - more or 0xFFFF */ - FT_Short xAvgCharWidth; - FT_UShort usWeightClass; - FT_UShort usWidthClass; - FT_UShort fsType; - FT_Short ySubscriptXSize; - FT_Short ySubscriptYSize; - FT_Short ySubscriptXOffset; - FT_Short ySubscriptYOffset; - FT_Short ySuperscriptXSize; - FT_Short ySuperscriptYSize; - FT_Short ySuperscriptXOffset; - FT_Short ySuperscriptYOffset; - FT_Short yStrikeoutSize; - FT_Short yStrikeoutPosition; - FT_Short sFamilyClass; - - FT_Byte panose[10]; - - FT_ULong ulUnicodeRange1; /* Bits 0-31 */ - FT_ULong ulUnicodeRange2; /* Bits 32-63 */ - FT_ULong ulUnicodeRange3; /* Bits 64-95 */ - FT_ULong ulUnicodeRange4; /* Bits 96-127 */ - - FT_Char achVendID[4]; - - FT_UShort fsSelection; - FT_UShort usFirstCharIndex; - FT_UShort usLastCharIndex; - FT_Short sTypoAscender; - FT_Short sTypoDescender; - FT_Short sTypoLineGap; - FT_UShort usWinAscent; - FT_UShort usWinDescent; - - /* only version 1 and higher: */ - - FT_ULong ulCodePageRange1; /* Bits 0-31 */ - FT_ULong ulCodePageRange2; /* Bits 32-63 */ - - /* only version 2 and higher: */ - - FT_Short sxHeight; - FT_Short sCapHeight; - FT_UShort usDefaultChar; - FT_UShort usBreakChar; - FT_UShort usMaxContext; - - /* only version 5 and higher: */ - - FT_UShort usLowerOpticalPointSize; /* in twips (1/20th points) */ - FT_UShort usUpperOpticalPointSize; /* in twips (1/20th points) */ - - } TT_OS2; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_Postscript */ - /* */ - /* <Description> */ - /* A structure used to model a TrueType PostScript table. All fields */ - /* comply to the TrueType specification. This structure does not */ - /* reference the PostScript glyph names, which can be nevertheless */ - /* accessed with the `ttpost' module. */ - /* */ - typedef struct TT_Postscript_ - { - FT_Fixed FormatType; - FT_Fixed italicAngle; - FT_Short underlinePosition; - FT_Short underlineThickness; - FT_ULong isFixedPitch; - FT_ULong minMemType42; - FT_ULong maxMemType42; - FT_ULong minMemType1; - FT_ULong maxMemType1; - - /* Glyph names follow in the file, but we don't */ - /* load them by default. See the ttpost.c file. */ - - } TT_Postscript; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_PCLT */ - /* */ - /* <Description> */ - /* A structure used to model a TrueType PCLT table. All fields */ - /* comply to the TrueType specification. */ - /* */ - typedef struct TT_PCLT_ - { - FT_Fixed Version; - FT_ULong FontNumber; - FT_UShort Pitch; - FT_UShort xHeight; - FT_UShort Style; - FT_UShort TypeFamily; - FT_UShort CapHeight; - FT_UShort SymbolSet; - FT_Char TypeFace[16]; - FT_Char CharacterComplement[8]; - FT_Char FileName[6]; - FT_Char StrokeWeight; - FT_Char WidthType; - FT_Byte SerifStyle; - FT_Byte Reserved; - - } TT_PCLT; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_MaxProfile */ - /* */ - /* <Description> */ - /* The maximum profile is a table containing many max values, which */ - /* can be used to pre-allocate arrays. This ensures that no memory */ - /* allocation occurs during a glyph load. */ - /* */ - /* <Fields> */ - /* version :: The version number. */ - /* */ - /* numGlyphs :: The number of glyphs in this TrueType */ - /* font. */ - /* */ - /* maxPoints :: The maximum number of points in a */ - /* non-composite TrueType glyph. See also */ - /* the structure element */ - /* `maxCompositePoints'. */ - /* */ - /* maxContours :: The maximum number of contours in a */ - /* non-composite TrueType glyph. See also */ - /* the structure element */ - /* `maxCompositeContours'. */ - /* */ - /* maxCompositePoints :: The maximum number of points in a */ - /* composite TrueType glyph. See also the */ - /* structure element `maxPoints'. */ - /* */ - /* maxCompositeContours :: The maximum number of contours in a */ - /* composite TrueType glyph. See also the */ - /* structure element `maxContours'. */ - /* */ - /* maxZones :: The maximum number of zones used for */ - /* glyph hinting. */ - /* */ - /* maxTwilightPoints :: The maximum number of points in the */ - /* twilight zone used for glyph hinting. */ - /* */ - /* maxStorage :: The maximum number of elements in the */ - /* storage area used for glyph hinting. */ - /* */ - /* maxFunctionDefs :: The maximum number of function */ - /* definitions in the TrueType bytecode for */ - /* this font. */ - /* */ - /* maxInstructionDefs :: The maximum number of instruction */ - /* definitions in the TrueType bytecode for */ - /* this font. */ - /* */ - /* maxStackElements :: The maximum number of stack elements used */ - /* during bytecode interpretation. */ - /* */ - /* maxSizeOfInstructions :: The maximum number of TrueType opcodes */ - /* used for glyph hinting. */ - /* */ - /* maxComponentElements :: The maximum number of simple (i.e., non- */ - /* composite) glyphs in a composite glyph. */ - /* */ - /* maxComponentDepth :: The maximum nesting depth of composite */ - /* glyphs. */ - /* */ - /* <Note> */ - /* This structure is only used during font loading. */ - /* */ - typedef struct TT_MaxProfile_ - { - FT_Fixed version; - FT_UShort numGlyphs; - FT_UShort maxPoints; - FT_UShort maxContours; - FT_UShort maxCompositePoints; - FT_UShort maxCompositeContours; - FT_UShort maxZones; - FT_UShort maxTwilightPoints; - FT_UShort maxStorage; - FT_UShort maxFunctionDefs; - FT_UShort maxInstructionDefs; - FT_UShort maxStackElements; - FT_UShort maxSizeOfInstructions; - FT_UShort maxComponentElements; - FT_UShort maxComponentDepth; - - } TT_MaxProfile; - - - /*************************************************************************/ - /* */ - /* <Enum> */ - /* FT_Sfnt_Tag */ - /* */ - /* <Description> */ - /* An enumeration used to specify the index of an SFNT table. */ - /* Used in the @FT_Get_Sfnt_Table API function. */ - /* */ - /* <Values> */ - /* FT_SFNT_HEAD :: To access the font's @TT_Header structure. */ - /* */ - /* FT_SFNT_MAXP :: To access the font's @TT_MaxProfile structure. */ - /* */ - /* FT_SFNT_OS2 :: To access the font's @TT_OS2 structure. */ - /* */ - /* FT_SFNT_HHEA :: To access the font's @TT_HoriHeader structure. */ - /* */ - /* FT_SFNT_VHEA :: To access the font's @TT_VertHeader structure. */ - /* */ - /* FT_SFNT_POST :: To access the font's @TT_Postscript structure. */ - /* */ - /* FT_SFNT_PCLT :: To access the font's @TT_PCLT structure. */ - /* */ - typedef enum FT_Sfnt_Tag_ - { - FT_SFNT_HEAD, - FT_SFNT_MAXP, - FT_SFNT_OS2, - FT_SFNT_HHEA, - FT_SFNT_VHEA, - FT_SFNT_POST, - FT_SFNT_PCLT, - - FT_SFNT_MAX - - } FT_Sfnt_Tag; - - /* these constants are deprecated; use the corresponding `FT_Sfnt_Tag' */ - /* values instead */ -#define ft_sfnt_head FT_SFNT_HEAD -#define ft_sfnt_maxp FT_SFNT_MAXP -#define ft_sfnt_os2 FT_SFNT_OS2 -#define ft_sfnt_hhea FT_SFNT_HHEA -#define ft_sfnt_vhea FT_SFNT_VHEA -#define ft_sfnt_post FT_SFNT_POST -#define ft_sfnt_pclt FT_SFNT_PCLT - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_Sfnt_Table */ - /* */ - /* <Description> */ - /* Return a pointer to a given SFNT table within a face. */ - /* */ - /* <Input> */ - /* face :: A handle to the source. */ - /* */ - /* tag :: The index of the SFNT table. */ - /* */ - /* <Return> */ - /* A type-less pointer to the table. This will be~0 in case of */ - /* error, or if the corresponding table was not found *OR* loaded */ - /* from the file. */ - /* */ - /* Use a typecast according to `tag' to access the structure */ - /* elements. */ - /* */ - /* <Note> */ - /* The table is owned by the face object and disappears with it. */ - /* */ - /* This function is only useful to access SFNT tables that are loaded */ - /* by the sfnt, truetype, and opentype drivers. See @FT_Sfnt_Tag for */ - /* a list. */ - /* */ - /* Here an example how to access the `vhea' table: */ - /* */ - /* { */ - /* TT_VertHeader* vert_header; */ - /* */ - /* */ - /* vert_header = */ - /* (TT_VertHeader*)FT_Get_Sfnt_Table( face, FT_SFNT_VHEA ); */ - /* } */ - /* */ - FT_EXPORT( void* ) - FT_Get_Sfnt_Table( FT_Face face, - FT_Sfnt_Tag tag ); - - - /************************************************************************** - * - * @function: - * FT_Load_Sfnt_Table - * - * @description: - * Load any font table into client memory. - * - * @input: - * face :: - * A handle to the source face. - * - * tag :: - * The four-byte tag of the table to load. Use the value~0 if you want - * to access the whole font file. Otherwise, you can use one of the - * definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new - * one with @FT_MAKE_TAG. - * - * offset :: - * The starting offset in the table (or file if tag == 0). - * - * @output: - * buffer :: - * The target buffer address. The client must ensure that the memory - * array is big enough to hold the data. - * - * @inout: - * length :: - * If the `length' parameter is NULL, then try to load the whole table. - * Return an error code if it fails. - * - * Else, if `*length' is~0, exit immediately while returning the - * table's (or file) full size in it. - * - * Else the number of bytes to read from the table or file, from the - * starting offset. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * If you need to determine the table's length you should first call this - * function with `*length' set to~0, as in the following example: - * - * { - * FT_ULong length = 0; - * - * - * error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length ); - * if ( error ) { ... table does not exist ... } - * - * buffer = malloc( length ); - * if ( buffer == NULL ) { ... not enough memory ... } - * - * error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length ); - * if ( error ) { ... could not load table ... } - * } - * - * Note that structures like @TT_Header or @TT_OS2 can't be used with - * this function; they are limited to @FT_Get_Sfnt_Table. Reason is that - * those structures depend on the processor architecture, with varying - * size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian). - * - */ - FT_EXPORT( FT_Error ) - FT_Load_Sfnt_Table( FT_Face face, - FT_ULong tag, - FT_Long offset, - FT_Byte* buffer, - FT_ULong* length ); - - - /************************************************************************** - * - * @function: - * FT_Sfnt_Table_Info - * - * @description: - * Return information on an SFNT table. - * - * @input: - * face :: - * A handle to the source face. - * - * table_index :: - * The index of an SFNT table. The function returns - * FT_Err_Table_Missing for an invalid value. - * - * @inout: - * tag :: - * The name tag of the SFNT table. If the value is NULL, `table_index' - * is ignored, and `length' returns the number of SFNT tables in the - * font. - * - * @output: - * length :: - * The length of the SFNT table (or the number of SFNT tables, depending - * on `tag'). - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * While parsing fonts, FreeType handles SFNT tables with length zero as - * missing. - * - */ - FT_EXPORT( FT_Error ) - FT_Sfnt_Table_Info( FT_Face face, - FT_UInt table_index, - FT_ULong *tag, - FT_ULong *length ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_CMap_Language_ID */ - /* */ - /* <Description> */ - /* Return TrueType/sfnt specific cmap language ID. Definitions of */ - /* language ID values are in `ttnameid.h'. */ - /* */ - /* <Input> */ - /* charmap :: */ - /* The target charmap. */ - /* */ - /* <Return> */ - /* The language ID of `charmap'. If `charmap' doesn't belong to a */ - /* TrueType/sfnt face, just return~0 as the default value. */ - /* */ - /* For a format~14 cmap (to access Unicode IVS), the return value is */ - /* 0xFFFFFFFF. */ - /* */ - FT_EXPORT( FT_ULong ) - FT_Get_CMap_Language_ID( FT_CharMap charmap ); - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Get_CMap_Format */ - /* */ - /* <Description> */ - /* Return TrueType/sfnt specific cmap format. */ - /* */ - /* <Input> */ - /* charmap :: */ - /* The target charmap. */ - /* */ - /* <Return> */ - /* The format of `charmap'. If `charmap' doesn't belong to a */ - /* TrueType/sfnt face, return -1. */ - /* */ - FT_EXPORT( FT_Long ) - FT_Get_CMap_Format( FT_CharMap charmap ); - - /* */ - - -FT_END_HEADER - -#endif /* TTTABLES_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/tttags.h b/builddir/freetype-2.7.0/include/freetype/tttags.h deleted file mode 100644 index f3c9aa5..0000000 --- a/builddir/freetype-2.7.0/include/freetype/tttags.h +++ /dev/null @@ -1,111 +0,0 @@ -/***************************************************************************/ -/* */ -/* tttags.h */ -/* */ -/* Tags for TrueType and OpenType tables (specification only). */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef TTAGS_H_ -#define TTAGS_H_ - - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - -#define TTAG_avar FT_MAKE_TAG( 'a', 'v', 'a', 'r' ) -#define TTAG_BASE FT_MAKE_TAG( 'B', 'A', 'S', 'E' ) -#define TTAG_bdat FT_MAKE_TAG( 'b', 'd', 'a', 't' ) -#define TTAG_BDF FT_MAKE_TAG( 'B', 'D', 'F', ' ' ) -#define TTAG_bhed FT_MAKE_TAG( 'b', 'h', 'e', 'd' ) -#define TTAG_bloc FT_MAKE_TAG( 'b', 'l', 'o', 'c' ) -#define TTAG_bsln FT_MAKE_TAG( 'b', 's', 'l', 'n' ) -#define TTAG_CBDT FT_MAKE_TAG( 'C', 'B', 'D', 'T' ) -#define TTAG_CBLC FT_MAKE_TAG( 'C', 'B', 'L', 'C' ) -#define TTAG_CFF FT_MAKE_TAG( 'C', 'F', 'F', ' ' ) -#define TTAG_CID FT_MAKE_TAG( 'C', 'I', 'D', ' ' ) -#define TTAG_cmap FT_MAKE_TAG( 'c', 'm', 'a', 'p' ) -#define TTAG_cvar FT_MAKE_TAG( 'c', 'v', 'a', 'r' ) -#define TTAG_cvt FT_MAKE_TAG( 'c', 'v', 't', ' ' ) -#define TTAG_DSIG FT_MAKE_TAG( 'D', 'S', 'I', 'G' ) -#define TTAG_EBDT FT_MAKE_TAG( 'E', 'B', 'D', 'T' ) -#define TTAG_EBLC FT_MAKE_TAG( 'E', 'B', 'L', 'C' ) -#define TTAG_EBSC FT_MAKE_TAG( 'E', 'B', 'S', 'C' ) -#define TTAG_feat FT_MAKE_TAG( 'f', 'e', 'a', 't' ) -#define TTAG_FOND FT_MAKE_TAG( 'F', 'O', 'N', 'D' ) -#define TTAG_fpgm FT_MAKE_TAG( 'f', 'p', 'g', 'm' ) -#define TTAG_fvar FT_MAKE_TAG( 'f', 'v', 'a', 'r' ) -#define TTAG_gasp FT_MAKE_TAG( 'g', 'a', 's', 'p' ) -#define TTAG_GDEF FT_MAKE_TAG( 'G', 'D', 'E', 'F' ) -#define TTAG_glyf FT_MAKE_TAG( 'g', 'l', 'y', 'f' ) -#define TTAG_GPOS FT_MAKE_TAG( 'G', 'P', 'O', 'S' ) -#define TTAG_GSUB FT_MAKE_TAG( 'G', 'S', 'U', 'B' ) -#define TTAG_gvar FT_MAKE_TAG( 'g', 'v', 'a', 'r' ) -#define TTAG_hdmx FT_MAKE_TAG( 'h', 'd', 'm', 'x' ) -#define TTAG_head FT_MAKE_TAG( 'h', 'e', 'a', 'd' ) -#define TTAG_hhea FT_MAKE_TAG( 'h', 'h', 'e', 'a' ) -#define TTAG_hmtx FT_MAKE_TAG( 'h', 'm', 't', 'x' ) -#define TTAG_JSTF FT_MAKE_TAG( 'J', 'S', 'T', 'F' ) -#define TTAG_just FT_MAKE_TAG( 'j', 'u', 's', 't' ) -#define TTAG_kern FT_MAKE_TAG( 'k', 'e', 'r', 'n' ) -#define TTAG_lcar FT_MAKE_TAG( 'l', 'c', 'a', 'r' ) -#define TTAG_loca FT_MAKE_TAG( 'l', 'o', 'c', 'a' ) -#define TTAG_LTSH FT_MAKE_TAG( 'L', 'T', 'S', 'H' ) -#define TTAG_LWFN FT_MAKE_TAG( 'L', 'W', 'F', 'N' ) -#define TTAG_MATH FT_MAKE_TAG( 'M', 'A', 'T', 'H' ) -#define TTAG_maxp FT_MAKE_TAG( 'm', 'a', 'x', 'p' ) -#define TTAG_META FT_MAKE_TAG( 'M', 'E', 'T', 'A' ) -#define TTAG_MMFX FT_MAKE_TAG( 'M', 'M', 'F', 'X' ) -#define TTAG_MMSD FT_MAKE_TAG( 'M', 'M', 'S', 'D' ) -#define TTAG_mort FT_MAKE_TAG( 'm', 'o', 'r', 't' ) -#define TTAG_morx FT_MAKE_TAG( 'm', 'o', 'r', 'x' ) -#define TTAG_name FT_MAKE_TAG( 'n', 'a', 'm', 'e' ) -#define TTAG_opbd FT_MAKE_TAG( 'o', 'p', 'b', 'd' ) -#define TTAG_OS2 FT_MAKE_TAG( 'O', 'S', '/', '2' ) -#define TTAG_OTTO FT_MAKE_TAG( 'O', 'T', 'T', 'O' ) -#define TTAG_PCLT FT_MAKE_TAG( 'P', 'C', 'L', 'T' ) -#define TTAG_POST FT_MAKE_TAG( 'P', 'O', 'S', 'T' ) -#define TTAG_post FT_MAKE_TAG( 'p', 'o', 's', 't' ) -#define TTAG_prep FT_MAKE_TAG( 'p', 'r', 'e', 'p' ) -#define TTAG_prop FT_MAKE_TAG( 'p', 'r', 'o', 'p' ) -#define TTAG_sbix FT_MAKE_TAG( 's', 'b', 'i', 'x' ) -#define TTAG_sfnt FT_MAKE_TAG( 's', 'f', 'n', 't' ) -#define TTAG_SING FT_MAKE_TAG( 'S', 'I', 'N', 'G' ) -#define TTAG_trak FT_MAKE_TAG( 't', 'r', 'a', 'k' ) -#define TTAG_true FT_MAKE_TAG( 't', 'r', 'u', 'e' ) -#define TTAG_ttc FT_MAKE_TAG( 't', 't', 'c', ' ' ) -#define TTAG_ttcf FT_MAKE_TAG( 't', 't', 'c', 'f' ) -#define TTAG_TYP1 FT_MAKE_TAG( 'T', 'Y', 'P', '1' ) -#define TTAG_typ1 FT_MAKE_TAG( 't', 'y', 'p', '1' ) -#define TTAG_VDMX FT_MAKE_TAG( 'V', 'D', 'M', 'X' ) -#define TTAG_vhea FT_MAKE_TAG( 'v', 'h', 'e', 'a' ) -#define TTAG_vmtx FT_MAKE_TAG( 'v', 'm', 't', 'x' ) -#define TTAG_wOFF FT_MAKE_TAG( 'w', 'O', 'F', 'F' ) - - -FT_END_HEADER - -#endif /* TTAGS_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/freetype/ttunpat.h b/builddir/freetype-2.7.0/include/freetype/ttunpat.h deleted file mode 100644 index ca4676b..0000000 --- a/builddir/freetype-2.7.0/include/freetype/ttunpat.h +++ /dev/null @@ -1,63 +0,0 @@ -/***************************************************************************/ -/* */ -/* ttunpat.h */ -/* */ -/* Definitions for the unpatented TrueType hinting system. */ -/* Obsolete, retained for backwards compatibility. */ -/* */ -/* Copyright 2003-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* Written by Graham Asher <graham.asher@btinternet.com> */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -#ifndef TTUNPAT_H_ -#define TTUNPAT_H_ - - -#include <ft2build.h> -#include FT_FREETYPE_H - -#ifdef FREETYPE_H -#error "freetype.h of FreeType 1 has been loaded!" -#error "Please fix the directory search order for header files" -#error "so that freetype.h of FreeType 2 is found first." -#endif - - -FT_BEGIN_HEADER - - - /*************************************************************************** - * - * @constant: - * FT_PARAM_TAG_UNPATENTED_HINTING - * - * @description: - * Deprecated. - * - * Previously: A constant used as the tag of an @FT_Parameter structure to - * indicate that unpatented methods only should be used by the TrueType - * bytecode interpreter for a typeface opened by @FT_Open_Face. - * - */ -#define FT_PARAM_TAG_UNPATENTED_HINTING FT_MAKE_TAG( 'u', 'n', 'p', 'a' ) - - /* */ - - -FT_END_HEADER - - -#endif /* TTUNPAT_H_ */ - - -/* END */ diff --git a/builddir/freetype-2.7.0/include/ft2build.h b/builddir/freetype-2.7.0/include/ft2build.h deleted file mode 100644 index c89cb46..0000000 --- a/builddir/freetype-2.7.0/include/ft2build.h +++ /dev/null @@ -1,42 +0,0 @@ -/***************************************************************************/ -/* */ -/* ft2build.h */ -/* */ -/* FreeType 2 build and setup macros. */ -/* */ -/* Copyright 1996-2016 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /*************************************************************************/ - /* */ - /* This is the `entry point' for FreeType header file inclusions. It is */ - /* the only header file which should be included directly; all other */ - /* FreeType header files should be accessed with macro names (after */ - /* including `ft2build.h'). */ - /* */ - /* A typical example is */ - /* */ - /* #include <ft2build.h> */ - /* #include FT_FREETYPE_H */ - /* */ - /*************************************************************************/ - - -#ifndef FT2BUILD_H_ -#define FT2BUILD_H_ - -#include <freetype/config/ftheader.h> - -#endif /* FT2BUILD_H_ */ - - -/* END */ diff --git a/builddir/irrlicht-1.8.1/bin/Irrlicht.dll b/builddir/irrlicht-1.8.1/bin/Irrlicht.dll deleted file mode 100644 index c18a095..0000000 Binary files a/builddir/irrlicht-1.8.1/bin/Irrlicht.dll and /dev/null differ diff --git a/builddir/irrlicht-1.8.1/bin/Irrlicht.exp b/builddir/irrlicht-1.8.1/bin/Irrlicht.exp deleted file mode 100644 index f5e7c8f..0000000 Binary files a/builddir/irrlicht-1.8.1/bin/Irrlicht.exp and /dev/null differ diff --git a/builddir/irrlicht-1.8.1/bin/Irrlicht.lib b/builddir/irrlicht-1.8.1/bin/Irrlicht.lib deleted file mode 100644 index b9b1240..0000000 Binary files a/builddir/irrlicht-1.8.1/bin/Irrlicht.lib and /dev/null differ diff --git a/builddir/irrlicht-1.8.1/include/CDynamicMeshBuffer.h b/builddir/irrlicht-1.8.1/include/CDynamicMeshBuffer.h deleted file mode 100644 index 016af9c..0000000 --- a/builddir/irrlicht-1.8.1/include/CDynamicMeshBuffer.h +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (C) 2008-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __C_DYNAMIC_MESHBUFFER_H_INCLUDED__ -#define __C_DYNAMIC_MESHBUFFER_H_INCLUDED__ - -#include "IDynamicMeshBuffer.h" - -#include "CVertexBuffer.h" -#include "CIndexBuffer.h" - -namespace irr -{ -namespace scene -{ - - class CDynamicMeshBuffer: public IDynamicMeshBuffer - { - public: - //! constructor - CDynamicMeshBuffer(video::E_VERTEX_TYPE vertexType, video::E_INDEX_TYPE indexType) - { - VertexBuffer=new CVertexBuffer(vertexType); - IndexBuffer=new CIndexBuffer(indexType); - } - - //! destructor - virtual ~CDynamicMeshBuffer() - { - if (VertexBuffer) - VertexBuffer->drop(); - if (IndexBuffer) - IndexBuffer->drop(); - } - - virtual IVertexBuffer& getVertexBuffer() const - { - return *VertexBuffer; - } - - virtual IIndexBuffer& getIndexBuffer() const - { - return *IndexBuffer; - } - - virtual void setVertexBuffer(IVertexBuffer *newVertexBuffer) - { - if (newVertexBuffer) - newVertexBuffer->grab(); - if (VertexBuffer) - VertexBuffer->drop(); - - VertexBuffer=newVertexBuffer; - } - - virtual void setIndexBuffer(IIndexBuffer *newIndexBuffer) - { - if (newIndexBuffer) - newIndexBuffer->grab(); - if (IndexBuffer) - IndexBuffer->drop(); - - IndexBuffer=newIndexBuffer; - } - - //! Get Material of this buffer. - virtual const video::SMaterial& getMaterial() const - { - return Material; - } - - //! Get Material of this buffer. - virtual video::SMaterial& getMaterial() - { - return Material; - } - - //! Get bounding box - virtual const core::aabbox3d<f32>& getBoundingBox() const - { - return BoundingBox; - } - - //! Set bounding box - virtual void setBoundingBox( const core::aabbox3df& box) - { - BoundingBox = box; - } - - //! Recalculate bounding box - virtual void recalculateBoundingBox() - { - if (!getVertexBuffer().size()) - BoundingBox.reset(0,0,0); - else - { - BoundingBox.reset(getVertexBuffer()[0].Pos); - for (u32 i=1; i<getVertexBuffer().size(); ++i) - BoundingBox.addInternalPoint(getVertexBuffer()[i].Pos); - } - } - - video::SMaterial Material; - core::aabbox3d<f32> BoundingBox; - private: - IVertexBuffer *VertexBuffer; - IIndexBuffer *IndexBuffer; - }; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/CIndexBuffer.h b/builddir/irrlicht-1.8.1/include/CIndexBuffer.h deleted file mode 100644 index 4ecadb7..0000000 --- a/builddir/irrlicht-1.8.1/include/CIndexBuffer.h +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (C) 2008-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __C_INDEX_BUFFER_H_INCLUDED__ -#define __C_INDEX_BUFFER_H_INCLUDED__ - -#include "IIndexBuffer.h" - -namespace irr -{ -namespace scene -{ - - class CIndexBuffer : public IIndexBuffer - { - - class IIndexList - { - public: - virtual ~IIndexList(){}; - - virtual u32 stride() const =0; - virtual u32 size() const =0; - virtual void push_back(const u32 &element) =0; - virtual u32 operator [](u32 index) const =0; - virtual u32 getLast() =0; - virtual void setValue(u32 index, u32 value) =0; - virtual void set_used(u32 usedNow) =0; - virtual void reallocate(u32 new_size) =0; - virtual u32 allocated_size() const =0; - virtual void* pointer() =0; - virtual video::E_INDEX_TYPE getType() const =0; - }; - - template <class T> - class CSpecificIndexList : public IIndexList - { - public: - core::array<T> Indices; - - virtual u32 stride() const {return sizeof(T);} - - virtual u32 size() const {return Indices.size();} - - virtual void push_back(const u32 &element) - { - // push const ref due to compiler problem with gcc 4.6, big endian - Indices.push_back((const T&)element); - } - - virtual u32 operator [](u32 index) const - { - return (u32)(Indices[index]); - } - - virtual u32 getLast() {return (u32)Indices.getLast();} - - virtual void setValue(u32 index, u32 value) - { - Indices[index]=(T)value; - } - - virtual void set_used(u32 usedNow) - { - Indices.set_used(usedNow); - } - - virtual void reallocate(u32 new_size) - { - Indices.reallocate(new_size); - } - - virtual u32 allocated_size() const - { - return Indices.allocated_size(); - } - - virtual void* pointer() {return Indices.pointer();} - - virtual video::E_INDEX_TYPE getType() const - { - if (sizeof(T)==sizeof(u16)) - return video::EIT_16BIT; - else - return video::EIT_32BIT; - } - }; - - public: - IIndexList *Indices; - - CIndexBuffer(video::E_INDEX_TYPE IndexType) :Indices(0), MappingHint(EHM_NEVER), ChangedID(1) - { - setType(IndexType); - } - - CIndexBuffer(const IIndexBuffer &IndexBufferCopy) :Indices(0), MappingHint(EHM_NEVER), ChangedID(1) - { - setType(IndexBufferCopy.getType()); - reallocate(IndexBufferCopy.size()); - - for (u32 n=0;n<IndexBufferCopy.size();++n) - push_back(IndexBufferCopy[n]); - } - - virtual ~CIndexBuffer() - { - delete Indices; - } - - //virtual void setType(video::E_INDEX_TYPE IndexType); - virtual void setType(video::E_INDEX_TYPE IndexType) - { - IIndexList *NewIndices=0; - - switch (IndexType) - { - case video::EIT_16BIT: - { - NewIndices=new CSpecificIndexList<u16>; - break; - } - case video::EIT_32BIT: - { - NewIndices=new CSpecificIndexList<u32>; - break; - } - } - - if (Indices) - { - NewIndices->reallocate( Indices->size() ); - - for(u32 n=0;n<Indices->size();++n) - NewIndices->push_back((*Indices)[n]); - - delete Indices; - } - - Indices=NewIndices; - } - - virtual void* getData() {return Indices->pointer();} - - virtual video::E_INDEX_TYPE getType() const {return Indices->getType();} - - virtual u32 stride() const {return Indices->stride();} - - virtual u32 size() const - { - return Indices->size(); - } - - virtual void push_back(const u32 &element) - { - Indices->push_back(element); - } - - virtual u32 operator [](u32 index) const - { - return (*Indices)[index]; - } - - virtual u32 getLast() - { - return Indices->getLast(); - } - - virtual void setValue(u32 index, u32 value) - { - Indices->setValue(index, value); - } - - virtual void set_used(u32 usedNow) - { - Indices->set_used(usedNow); - } - - virtual void reallocate(u32 new_size) - { - Indices->reallocate(new_size); - } - - virtual u32 allocated_size() const - { - return Indices->allocated_size(); - } - - virtual void* pointer() - { - return Indices->pointer(); - } - - //! get the current hardware mapping hint - virtual E_HARDWARE_MAPPING getHardwareMappingHint() const - { - return MappingHint; - } - - //! set the hardware mapping hint, for driver - virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) - { - MappingHint=NewMappingHint; - } - - //! flags the mesh as changed, reloads hardware buffers - virtual void setDirty() - { - ++ChangedID; - } - - //! Get the currently used ID for identification of changes. - /** This shouldn't be used for anything outside the VideoDriver. */ - virtual u32 getChangedID() const {return ChangedID;} - - E_HARDWARE_MAPPING MappingHint; - u32 ChangedID; - }; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/CMeshBuffer.h b/builddir/irrlicht-1.8.1/include/CMeshBuffer.h deleted file mode 100644 index 24a95e2..0000000 --- a/builddir/irrlicht-1.8.1/include/CMeshBuffer.h +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __T_MESH_BUFFER_H_INCLUDED__ -#define __T_MESH_BUFFER_H_INCLUDED__ - -#include "irrArray.h" -#include "IMeshBuffer.h" - -namespace irr -{ -namespace scene -{ - //! Template implementation of the IMeshBuffer interface - template <class T> - class CMeshBuffer : public IMeshBuffer - { - public: - //! Default constructor for empty meshbuffer - CMeshBuffer():ChangedID_Vertex(1),ChangedID_Index(1),MappingHint_Vertex(EHM_NEVER), MappingHint_Index(EHM_NEVER) - { - #ifdef _DEBUG - setDebugName("SMeshBuffer"); - #endif - } - - - //! Get material of this meshbuffer - /** \return Material of this buffer */ - virtual const video::SMaterial& getMaterial() const - { - return Material; - } - - - //! Get material of this meshbuffer - /** \return Material of this buffer */ - virtual video::SMaterial& getMaterial() - { - return Material; - } - - - //! Get pointer to vertices - /** \return Pointer to vertices. */ - virtual const void* getVertices() const - { - return Vertices.const_pointer(); - } - - - //! Get pointer to vertices - /** \return Pointer to vertices. */ - virtual void* getVertices() - { - return Vertices.pointer(); - } - - - //! Get number of vertices - /** \return Number of vertices. */ - virtual u32 getVertexCount() const - { - return Vertices.size(); - } - - //! Get type of index data which is stored in this meshbuffer. - /** \return Index type of this buffer. */ - virtual video::E_INDEX_TYPE getIndexType() const - { - return video::EIT_16BIT; - } - - //! Get pointer to indices - /** \return Pointer to indices. */ - virtual const u16* getIndices() const - { - return Indices.const_pointer(); - } - - - //! Get pointer to indices - /** \return Pointer to indices. */ - virtual u16* getIndices() - { - return Indices.pointer(); - } - - - //! Get number of indices - /** \return Number of indices. */ - virtual u32 getIndexCount() const - { - return Indices.size(); - } - - - //! Get the axis aligned bounding box - /** \return Axis aligned bounding box of this buffer. */ - virtual const core::aabbox3d<f32>& getBoundingBox() const - { - return BoundingBox; - } - - - //! Set the axis aligned bounding box - /** \param box New axis aligned bounding box for this buffer. */ - //! set user axis aligned bounding box - virtual void setBoundingBox(const core::aabbox3df& box) - { - BoundingBox = box; - } - - - //! Recalculate the bounding box. - /** should be called if the mesh changed. */ - virtual void recalculateBoundingBox() - { - if (Vertices.empty()) - BoundingBox.reset(0,0,0); - else - { - BoundingBox.reset(Vertices[0].Pos); - for (u32 i=1; i<Vertices.size(); ++i) - BoundingBox.addInternalPoint(Vertices[i].Pos); - } - } - - - //! Get type of vertex data stored in this buffer. - /** \return Type of vertex data. */ - virtual video::E_VERTEX_TYPE getVertexType() const - { - return T().getType(); - } - - //! returns position of vertex i - virtual const core::vector3df& getPosition(u32 i) const - { - return Vertices[i].Pos; - } - - //! returns position of vertex i - virtual core::vector3df& getPosition(u32 i) - { - return Vertices[i].Pos; - } - - //! returns normal of vertex i - virtual const core::vector3df& getNormal(u32 i) const - { - return Vertices[i].Normal; - } - - //! returns normal of vertex i - virtual core::vector3df& getNormal(u32 i) - { - return Vertices[i].Normal; - } - - //! returns texture coord of vertex i - virtual const core::vector2df& getTCoords(u32 i) const - { - return Vertices[i].TCoords; - } - - //! returns texture coord of vertex i - virtual core::vector2df& getTCoords(u32 i) - { - return Vertices[i].TCoords; - } - - - //! Append the vertices and indices to the current buffer - /** Only works for compatible types, i.e. either the same type - or the main buffer is of standard type. Otherwise, behavior is - undefined. - */ - virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) - { - if (vertices == getVertices()) - return; - - const u32 vertexCount = getVertexCount(); - u32 i; - - Vertices.reallocate(vertexCount+numVertices); - for (i=0; i<numVertices; ++i) - { - Vertices.push_back(reinterpret_cast<const T*>(vertices)[i]); - BoundingBox.addInternalPoint(reinterpret_cast<const T*>(vertices)[i].Pos); - } - - Indices.reallocate(getIndexCount()+numIndices); - for (i=0; i<numIndices; ++i) - { - Indices.push_back(indices[i]+vertexCount); - } - } - - - //! Append the meshbuffer to the current buffer - /** Only works for compatible types, i.e. either the same type - or the main buffer is of standard type. Otherwise, behavior is - undefined. - \param other Meshbuffer to be appended to this one. - */ - virtual void append(const IMeshBuffer* const other) - { - /* - if (this==other) - return; - - const u32 vertexCount = getVertexCount(); - u32 i; - - Vertices.reallocate(vertexCount+other->getVertexCount()); - for (i=0; i<other->getVertexCount(); ++i) - { - Vertices.push_back(reinterpret_cast<const T*>(other->getVertices())[i]); - } - - Indices.reallocate(getIndexCount()+other->getIndexCount()); - for (i=0; i<other->getIndexCount(); ++i) - { - Indices.push_back(other->getIndices()[i]+vertexCount); - } - BoundingBox.addInternalBox(other->getBoundingBox()); - */ - } - - - //! get the current hardware mapping hint - virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const - { - return MappingHint_Vertex; - } - - //! get the current hardware mapping hint - virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const - { - return MappingHint_Index; - } - - //! set the hardware mapping hint, for driver - virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX ) - { - if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX) - MappingHint_Vertex=NewMappingHint; - if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX) - MappingHint_Index=NewMappingHint; - } - - - //! flags the mesh as changed, reloads hardware buffers - virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) - { - if (Buffer==EBT_VERTEX_AND_INDEX ||Buffer==EBT_VERTEX) - ++ChangedID_Vertex; - if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX) - ++ChangedID_Index; - } - - //! Get the currently used ID for identification of changes. - /** This shouldn't be used for anything outside the VideoDriver. */ - virtual u32 getChangedID_Vertex() const {return ChangedID_Vertex;} - - //! Get the currently used ID for identification of changes. - /** This shouldn't be used for anything outside the VideoDriver. */ - virtual u32 getChangedID_Index() const {return ChangedID_Index;} - - u32 ChangedID_Vertex; - u32 ChangedID_Index; - - //! hardware mapping hint - E_HARDWARE_MAPPING MappingHint_Vertex; - E_HARDWARE_MAPPING MappingHint_Index; - - //! Material for this meshbuffer. - video::SMaterial Material; - //! Vertices of this buffer - core::array<T> Vertices; - //! Indices into the vertices of this buffer. - core::array<u16> Indices; - //! Bounding box of this meshbuffer. - core::aabbox3d<f32> BoundingBox; - }; - - //! Standard meshbuffer - typedef CMeshBuffer<video::S3DVertex> SMeshBuffer; - //! Meshbuffer with two texture coords per vertex, e.g. for lightmaps - typedef CMeshBuffer<video::S3DVertex2TCoords> SMeshBufferLightMap; - //! Meshbuffer with vertices having tangents stored, e.g. for normal mapping - typedef CMeshBuffer<video::S3DVertexTangents> SMeshBufferTangents; -} // end namespace scene -} // end namespace irr - -#endif - - diff --git a/builddir/irrlicht-1.8.1/include/CVertexBuffer.h b/builddir/irrlicht-1.8.1/include/CVertexBuffer.h deleted file mode 100644 index 975b0e7..0000000 --- a/builddir/irrlicht-1.8.1/include/CVertexBuffer.h +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (C) 2008-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __C_VERTEX_BUFFER_H_INCLUDED__ -#define __C_VERTEX_BUFFER_H_INCLUDED__ - -#include "IVertexBuffer.h" - - -namespace irr -{ -namespace scene -{ - - class CVertexBuffer : public IVertexBuffer - { - class IVertexList - { - public: - virtual ~IVertexList(){}; - - virtual u32 stride() const =0; - - virtual u32 size() const =0; - - virtual void push_back (const video::S3DVertex &element) =0; - virtual video::S3DVertex& operator [](const u32 index) const =0; - virtual video::S3DVertex& getLast() =0; - virtual void set_used(u32 usedNow) =0; - virtual void reallocate(u32 new_size) =0; - virtual u32 allocated_size() const =0; - virtual video::S3DVertex* pointer() =0; - virtual video::E_VERTEX_TYPE getType() const =0; - }; - - template <class T> - class CSpecificVertexList : public IVertexList - { - public: - core::array<T> Vertices; - - virtual u32 stride() const {return sizeof(T);} - - virtual u32 size() const {return Vertices.size();} - - virtual void push_back (const video::S3DVertex &element) - {Vertices.push_back((T&)element);} - - virtual video::S3DVertex& operator [](const u32 index) const - {return (video::S3DVertex&)Vertices[index];} - - virtual video::S3DVertex& getLast() - {return (video::S3DVertex&)Vertices.getLast();} - - virtual void set_used(u32 usedNow) - {Vertices.set_used(usedNow);} - - virtual void reallocate(u32 new_size) - {Vertices.reallocate(new_size);} - - virtual u32 allocated_size() const - { - return Vertices.allocated_size(); - } - - virtual video::S3DVertex* pointer() {return Vertices.pointer();} - - virtual video::E_VERTEX_TYPE getType() const {return T().getType();} - }; - - public: - IVertexList *Vertices; - - CVertexBuffer(video::E_VERTEX_TYPE vertexType) : Vertices(0), - MappingHint(EHM_NEVER), ChangedID(1) - { - setType(vertexType); - } - - CVertexBuffer(const IVertexBuffer &VertexBufferCopy) : - Vertices(0), MappingHint(EHM_NEVER), - ChangedID(1) - { - setType(VertexBufferCopy.getType()); - reallocate(VertexBufferCopy.size()); - - for (u32 n=0;n<VertexBufferCopy.size();++n) - push_back(VertexBufferCopy[n]); - } - - virtual ~CVertexBuffer() - { - delete Vertices; - } - - - virtual void setType(video::E_VERTEX_TYPE vertexType) - { - IVertexList *NewVertices=0; - - switch (vertexType) - { - case video::EVT_STANDARD: - { - NewVertices=new CSpecificVertexList<video::S3DVertex>; - break; - } - case video::EVT_2TCOORDS: - { - NewVertices=new CSpecificVertexList<video::S3DVertex2TCoords>; - break; - } - case video::EVT_TANGENTS: - { - NewVertices=new CSpecificVertexList<video::S3DVertexTangents>; - break; - } - } - if (Vertices) - { - NewVertices->reallocate( Vertices->size() ); - - for(u32 n=0;n<Vertices->size();++n) - NewVertices->push_back((*Vertices)[n]); - - delete Vertices; - } - - Vertices=NewVertices; - } - - virtual void* getData() {return Vertices->pointer();} - - virtual video::E_VERTEX_TYPE getType() const {return Vertices->getType();} - - virtual u32 stride() const {return Vertices->stride();} - - virtual u32 size() const - { - return Vertices->size(); - } - - virtual void push_back (const video::S3DVertex &element) - { - Vertices->push_back(element); - } - - virtual video::S3DVertex& operator [](const u32 index) const - { - return (*Vertices)[index]; - } - - virtual video::S3DVertex& getLast() - { - return Vertices->getLast(); - } - - virtual void set_used(u32 usedNow) - { - Vertices->set_used(usedNow); - } - - virtual void reallocate(u32 new_size) - { - Vertices->reallocate(new_size); - } - - virtual u32 allocated_size() const - { - return Vertices->allocated_size(); - } - - virtual video::S3DVertex* pointer() - { - return Vertices->pointer(); - } - - //! get the current hardware mapping hint - virtual E_HARDWARE_MAPPING getHardwareMappingHint() const - { - return MappingHint; - } - - //! set the hardware mapping hint, for driver - virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) - { - MappingHint=NewMappingHint; - } - - //! flags the mesh as changed, reloads hardware buffers - virtual void setDirty() - { - ++ChangedID; - } - - //! Get the currently used ID for identification of changes. - /** This shouldn't be used for anything outside the VideoDriver. */ - virtual u32 getChangedID() const {return ChangedID;} - - E_HARDWARE_MAPPING MappingHint; - u32 ChangedID; - }; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/D3Dcommon.h b/builddir/irrlicht-1.8.1/include/D3Dcommon.h deleted file mode 100644 index 032b8b5..0000000 --- a/builddir/irrlicht-1.8.1/include/D3Dcommon.h +++ /dev/null @@ -1,787 +0,0 @@ - - -/* this ALWAYS GENERATED file contains the definitions for the interfaces */ - - - /* File created by MIDL compiler version 7.00.0555 */ -/* @@MIDL_FILE_HEADING( ) */ - -#pragma warning( disable: 4049 ) /* more than 64k source lines */ - - -/* verify that the <rpcndr.h> version is high enough to compile this file*/ -#ifndef __REQUIRED_RPCNDR_H_VERSION__ -#define __REQUIRED_RPCNDR_H_VERSION__ 475 -#endif - -/* verify that the <rpcsal.h> version is high enough to compile this file*/ -#ifndef __REQUIRED_RPCSAL_H_VERSION__ -#define __REQUIRED_RPCSAL_H_VERSION__ 100 -#endif - -#include "rpc.h" -#include "rpcndr.h" - -#ifndef __RPCNDR_H_VERSION__ -#error this stub requires an updated version of <rpcndr.h> -#endif // __RPCNDR_H_VERSION__ - -#ifndef COM_NO_WINDOWS_H -#include "windows.h" -#include "ole2.h" -#endif /*COM_NO_WINDOWS_H*/ - -#ifndef __d3dcommon_h__ -#define __d3dcommon_h__ - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -#pragma once -#endif - -/* Forward Declarations */ - -#ifndef __ID3D10Blob_FWD_DEFINED__ -#define __ID3D10Blob_FWD_DEFINED__ -typedef interface ID3D10Blob ID3D10Blob; -#endif /* __ID3D10Blob_FWD_DEFINED__ */ - - -/* header files for imported files */ -#include "oaidl.h" -#include "ocidl.h" - -#ifdef __cplusplus -extern "C"{ -#endif - - -/* interface __MIDL_itf_d3dcommon_0000_0000 */ -/* [local] */ - -typedef -enum D3D_DRIVER_TYPE - { D3D_DRIVER_TYPE_UNKNOWN = 0, - D3D_DRIVER_TYPE_HARDWARE = ( D3D_DRIVER_TYPE_UNKNOWN + 1 ) , - D3D_DRIVER_TYPE_REFERENCE = ( D3D_DRIVER_TYPE_HARDWARE + 1 ) , - D3D_DRIVER_TYPE_NULL = ( D3D_DRIVER_TYPE_REFERENCE + 1 ) , - D3D_DRIVER_TYPE_SOFTWARE = ( D3D_DRIVER_TYPE_NULL + 1 ) , - D3D_DRIVER_TYPE_WARP = ( D3D_DRIVER_TYPE_SOFTWARE + 1 ) - } D3D_DRIVER_TYPE; - -typedef -enum D3D_FEATURE_LEVEL - { D3D_FEATURE_LEVEL_9_1 = 0x9100, - D3D_FEATURE_LEVEL_9_2 = 0x9200, - D3D_FEATURE_LEVEL_9_3 = 0x9300, - D3D_FEATURE_LEVEL_10_0 = 0xa000, - D3D_FEATURE_LEVEL_10_1 = 0xa100, - D3D_FEATURE_LEVEL_11_0 = 0xb000 - } D3D_FEATURE_LEVEL; - -typedef -enum D3D_PRIMITIVE_TOPOLOGY - { D3D_PRIMITIVE_TOPOLOGY_UNDEFINED = 0, - D3D_PRIMITIVE_TOPOLOGY_POINTLIST = 1, - D3D_PRIMITIVE_TOPOLOGY_LINELIST = 2, - D3D_PRIMITIVE_TOPOLOGY_LINESTRIP = 3, - D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST = 4, - D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP = 5, - D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ = 10, - D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ = 11, - D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ = 12, - D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ = 13, - D3D_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST = 33, - D3D_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST = 34, - D3D_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST = 35, - D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST = 36, - D3D_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST = 37, - D3D_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST = 38, - D3D_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST = 39, - D3D_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST = 40, - D3D_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST = 41, - D3D_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST = 42, - D3D_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST = 43, - D3D_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST = 44, - D3D_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST = 45, - D3D_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST = 46, - D3D_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST = 47, - D3D_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST = 48, - D3D_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST = 49, - D3D_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST = 50, - D3D_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST = 51, - D3D_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST = 52, - D3D_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST = 53, - D3D_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST = 54, - D3D_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST = 55, - D3D_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST = 56, - D3D_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST = 57, - D3D_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST = 58, - D3D_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST = 59, - D3D_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST = 60, - D3D_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST = 61, - D3D_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST = 62, - D3D_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST = 63, - D3D_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST = 64, - D3D10_PRIMITIVE_TOPOLOGY_UNDEFINED = D3D_PRIMITIVE_TOPOLOGY_UNDEFINED, - D3D10_PRIMITIVE_TOPOLOGY_POINTLIST = D3D_PRIMITIVE_TOPOLOGY_POINTLIST, - D3D10_PRIMITIVE_TOPOLOGY_LINELIST = D3D_PRIMITIVE_TOPOLOGY_LINELIST, - D3D10_PRIMITIVE_TOPOLOGY_LINESTRIP = D3D_PRIMITIVE_TOPOLOGY_LINESTRIP, - D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST, - D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP = D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP, - D3D10_PRIMITIVE_TOPOLOGY_LINELIST_ADJ = D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ, - D3D10_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ = D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ, - D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ, - D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ = D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ, - D3D11_PRIMITIVE_TOPOLOGY_UNDEFINED = D3D_PRIMITIVE_TOPOLOGY_UNDEFINED, - D3D11_PRIMITIVE_TOPOLOGY_POINTLIST = D3D_PRIMITIVE_TOPOLOGY_POINTLIST, - D3D11_PRIMITIVE_TOPOLOGY_LINELIST = D3D_PRIMITIVE_TOPOLOGY_LINELIST, - D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP = D3D_PRIMITIVE_TOPOLOGY_LINESTRIP, - D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST, - D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP = D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP, - D3D11_PRIMITIVE_TOPOLOGY_LINELIST_ADJ = D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ, - D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ = D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ, - D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ, - D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ = D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ, - D3D11_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST, - D3D11_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST - } D3D_PRIMITIVE_TOPOLOGY; - -typedef -enum D3D_PRIMITIVE - { D3D_PRIMITIVE_UNDEFINED = 0, - D3D_PRIMITIVE_POINT = 1, - D3D_PRIMITIVE_LINE = 2, - D3D_PRIMITIVE_TRIANGLE = 3, - D3D_PRIMITIVE_LINE_ADJ = 6, - D3D_PRIMITIVE_TRIANGLE_ADJ = 7, - D3D_PRIMITIVE_1_CONTROL_POINT_PATCH = 8, - D3D_PRIMITIVE_2_CONTROL_POINT_PATCH = 9, - D3D_PRIMITIVE_3_CONTROL_POINT_PATCH = 10, - D3D_PRIMITIVE_4_CONTROL_POINT_PATCH = 11, - D3D_PRIMITIVE_5_CONTROL_POINT_PATCH = 12, - D3D_PRIMITIVE_6_CONTROL_POINT_PATCH = 13, - D3D_PRIMITIVE_7_CONTROL_POINT_PATCH = 14, - D3D_PRIMITIVE_8_CONTROL_POINT_PATCH = 15, - D3D_PRIMITIVE_9_CONTROL_POINT_PATCH = 16, - D3D_PRIMITIVE_10_CONTROL_POINT_PATCH = 17, - D3D_PRIMITIVE_11_CONTROL_POINT_PATCH = 18, - D3D_PRIMITIVE_12_CONTROL_POINT_PATCH = 19, - D3D_PRIMITIVE_13_CONTROL_POINT_PATCH = 20, - D3D_PRIMITIVE_14_CONTROL_POINT_PATCH = 21, - D3D_PRIMITIVE_15_CONTROL_POINT_PATCH = 22, - D3D_PRIMITIVE_16_CONTROL_POINT_PATCH = 23, - D3D_PRIMITIVE_17_CONTROL_POINT_PATCH = 24, - D3D_PRIMITIVE_18_CONTROL_POINT_PATCH = 25, - D3D_PRIMITIVE_19_CONTROL_POINT_PATCH = 26, - D3D_PRIMITIVE_20_CONTROL_POINT_PATCH = 28, - D3D_PRIMITIVE_21_CONTROL_POINT_PATCH = 29, - D3D_PRIMITIVE_22_CONTROL_POINT_PATCH = 30, - D3D_PRIMITIVE_23_CONTROL_POINT_PATCH = 31, - D3D_PRIMITIVE_24_CONTROL_POINT_PATCH = 32, - D3D_PRIMITIVE_25_CONTROL_POINT_PATCH = 33, - D3D_PRIMITIVE_26_CONTROL_POINT_PATCH = 34, - D3D_PRIMITIVE_27_CONTROL_POINT_PATCH = 35, - D3D_PRIMITIVE_28_CONTROL_POINT_PATCH = 36, - D3D_PRIMITIVE_29_CONTROL_POINT_PATCH = 37, - D3D_PRIMITIVE_30_CONTROL_POINT_PATCH = 38, - D3D_PRIMITIVE_31_CONTROL_POINT_PATCH = 39, - D3D_PRIMITIVE_32_CONTROL_POINT_PATCH = 40, - D3D10_PRIMITIVE_UNDEFINED = D3D_PRIMITIVE_UNDEFINED, - D3D10_PRIMITIVE_POINT = D3D_PRIMITIVE_POINT, - D3D10_PRIMITIVE_LINE = D3D_PRIMITIVE_LINE, - D3D10_PRIMITIVE_TRIANGLE = D3D_PRIMITIVE_TRIANGLE, - D3D10_PRIMITIVE_LINE_ADJ = D3D_PRIMITIVE_LINE_ADJ, - D3D10_PRIMITIVE_TRIANGLE_ADJ = D3D_PRIMITIVE_TRIANGLE_ADJ, - D3D11_PRIMITIVE_UNDEFINED = D3D_PRIMITIVE_UNDEFINED, - D3D11_PRIMITIVE_POINT = D3D_PRIMITIVE_POINT, - D3D11_PRIMITIVE_LINE = D3D_PRIMITIVE_LINE, - D3D11_PRIMITIVE_TRIANGLE = D3D_PRIMITIVE_TRIANGLE, - D3D11_PRIMITIVE_LINE_ADJ = D3D_PRIMITIVE_LINE_ADJ, - D3D11_PRIMITIVE_TRIANGLE_ADJ = D3D_PRIMITIVE_TRIANGLE_ADJ, - D3D11_PRIMITIVE_1_CONTROL_POINT_PATCH = D3D_PRIMITIVE_1_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_2_CONTROL_POINT_PATCH = D3D_PRIMITIVE_2_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_3_CONTROL_POINT_PATCH = D3D_PRIMITIVE_3_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_4_CONTROL_POINT_PATCH = D3D_PRIMITIVE_4_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_5_CONTROL_POINT_PATCH = D3D_PRIMITIVE_5_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_6_CONTROL_POINT_PATCH = D3D_PRIMITIVE_6_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_7_CONTROL_POINT_PATCH = D3D_PRIMITIVE_7_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_8_CONTROL_POINT_PATCH = D3D_PRIMITIVE_8_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_9_CONTROL_POINT_PATCH = D3D_PRIMITIVE_9_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_10_CONTROL_POINT_PATCH = D3D_PRIMITIVE_10_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_11_CONTROL_POINT_PATCH = D3D_PRIMITIVE_11_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_12_CONTROL_POINT_PATCH = D3D_PRIMITIVE_12_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_13_CONTROL_POINT_PATCH = D3D_PRIMITIVE_13_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_14_CONTROL_POINT_PATCH = D3D_PRIMITIVE_14_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_15_CONTROL_POINT_PATCH = D3D_PRIMITIVE_15_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_16_CONTROL_POINT_PATCH = D3D_PRIMITIVE_16_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_17_CONTROL_POINT_PATCH = D3D_PRIMITIVE_17_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_18_CONTROL_POINT_PATCH = D3D_PRIMITIVE_18_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_19_CONTROL_POINT_PATCH = D3D_PRIMITIVE_19_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_20_CONTROL_POINT_PATCH = D3D_PRIMITIVE_20_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_21_CONTROL_POINT_PATCH = D3D_PRIMITIVE_21_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_22_CONTROL_POINT_PATCH = D3D_PRIMITIVE_22_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_23_CONTROL_POINT_PATCH = D3D_PRIMITIVE_23_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_24_CONTROL_POINT_PATCH = D3D_PRIMITIVE_24_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_25_CONTROL_POINT_PATCH = D3D_PRIMITIVE_25_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_26_CONTROL_POINT_PATCH = D3D_PRIMITIVE_26_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_27_CONTROL_POINT_PATCH = D3D_PRIMITIVE_27_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_28_CONTROL_POINT_PATCH = D3D_PRIMITIVE_28_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_29_CONTROL_POINT_PATCH = D3D_PRIMITIVE_29_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_30_CONTROL_POINT_PATCH = D3D_PRIMITIVE_30_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_31_CONTROL_POINT_PATCH = D3D_PRIMITIVE_31_CONTROL_POINT_PATCH, - D3D11_PRIMITIVE_32_CONTROL_POINT_PATCH = D3D_PRIMITIVE_32_CONTROL_POINT_PATCH - } D3D_PRIMITIVE; - -typedef -enum D3D_SRV_DIMENSION - { D3D_SRV_DIMENSION_UNKNOWN = 0, - D3D_SRV_DIMENSION_BUFFER = 1, - D3D_SRV_DIMENSION_TEXTURE1D = 2, - D3D_SRV_DIMENSION_TEXTURE1DARRAY = 3, - D3D_SRV_DIMENSION_TEXTURE2D = 4, - D3D_SRV_DIMENSION_TEXTURE2DARRAY = 5, - D3D_SRV_DIMENSION_TEXTURE2DMS = 6, - D3D_SRV_DIMENSION_TEXTURE2DMSARRAY = 7, - D3D_SRV_DIMENSION_TEXTURE3D = 8, - D3D_SRV_DIMENSION_TEXTURECUBE = 9, - D3D_SRV_DIMENSION_TEXTURECUBEARRAY = 10, - D3D_SRV_DIMENSION_BUFFEREX = 11, - D3D10_SRV_DIMENSION_UNKNOWN = D3D_SRV_DIMENSION_UNKNOWN, - D3D10_SRV_DIMENSION_BUFFER = D3D_SRV_DIMENSION_BUFFER, - D3D10_SRV_DIMENSION_TEXTURE1D = D3D_SRV_DIMENSION_TEXTURE1D, - D3D10_SRV_DIMENSION_TEXTURE1DARRAY = D3D_SRV_DIMENSION_TEXTURE1DARRAY, - D3D10_SRV_DIMENSION_TEXTURE2D = D3D_SRV_DIMENSION_TEXTURE2D, - D3D10_SRV_DIMENSION_TEXTURE2DARRAY = D3D_SRV_DIMENSION_TEXTURE2DARRAY, - D3D10_SRV_DIMENSION_TEXTURE2DMS = D3D_SRV_DIMENSION_TEXTURE2DMS, - D3D10_SRV_DIMENSION_TEXTURE2DMSARRAY = D3D_SRV_DIMENSION_TEXTURE2DMSARRAY, - D3D10_SRV_DIMENSION_TEXTURE3D = D3D_SRV_DIMENSION_TEXTURE3D, - D3D10_SRV_DIMENSION_TEXTURECUBE = D3D_SRV_DIMENSION_TEXTURECUBE, - D3D10_1_SRV_DIMENSION_UNKNOWN = D3D_SRV_DIMENSION_UNKNOWN, - D3D10_1_SRV_DIMENSION_BUFFER = D3D_SRV_DIMENSION_BUFFER, - D3D10_1_SRV_DIMENSION_TEXTURE1D = D3D_SRV_DIMENSION_TEXTURE1D, - D3D10_1_SRV_DIMENSION_TEXTURE1DARRAY = D3D_SRV_DIMENSION_TEXTURE1DARRAY, - D3D10_1_SRV_DIMENSION_TEXTURE2D = D3D_SRV_DIMENSION_TEXTURE2D, - D3D10_1_SRV_DIMENSION_TEXTURE2DARRAY = D3D_SRV_DIMENSION_TEXTURE2DARRAY, - D3D10_1_SRV_DIMENSION_TEXTURE2DMS = D3D_SRV_DIMENSION_TEXTURE2DMS, - D3D10_1_SRV_DIMENSION_TEXTURE2DMSARRAY = D3D_SRV_DIMENSION_TEXTURE2DMSARRAY, - D3D10_1_SRV_DIMENSION_TEXTURE3D = D3D_SRV_DIMENSION_TEXTURE3D, - D3D10_1_SRV_DIMENSION_TEXTURECUBE = D3D_SRV_DIMENSION_TEXTURECUBE, - D3D10_1_SRV_DIMENSION_TEXTURECUBEARRAY = D3D_SRV_DIMENSION_TEXTURECUBEARRAY, - D3D11_SRV_DIMENSION_UNKNOWN = D3D_SRV_DIMENSION_UNKNOWN, - D3D11_SRV_DIMENSION_BUFFER = D3D_SRV_DIMENSION_BUFFER, - D3D11_SRV_DIMENSION_TEXTURE1D = D3D_SRV_DIMENSION_TEXTURE1D, - D3D11_SRV_DIMENSION_TEXTURE1DARRAY = D3D_SRV_DIMENSION_TEXTURE1DARRAY, - D3D11_SRV_DIMENSION_TEXTURE2D = D3D_SRV_DIMENSION_TEXTURE2D, - D3D11_SRV_DIMENSION_TEXTURE2DARRAY = D3D_SRV_DIMENSION_TEXTURE2DARRAY, - D3D11_SRV_DIMENSION_TEXTURE2DMS = D3D_SRV_DIMENSION_TEXTURE2DMS, - D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY = D3D_SRV_DIMENSION_TEXTURE2DMSARRAY, - D3D11_SRV_DIMENSION_TEXTURE3D = D3D_SRV_DIMENSION_TEXTURE3D, - D3D11_SRV_DIMENSION_TEXTURECUBE = D3D_SRV_DIMENSION_TEXTURECUBE, - D3D11_SRV_DIMENSION_TEXTURECUBEARRAY = D3D_SRV_DIMENSION_TEXTURECUBEARRAY, - D3D11_SRV_DIMENSION_BUFFEREX = D3D_SRV_DIMENSION_BUFFEREX - } D3D_SRV_DIMENSION; - -typedef struct _D3D_SHADER_MACRO - { - LPCSTR Name; - LPCSTR Definition; - } D3D_SHADER_MACRO; - -typedef struct _D3D_SHADER_MACRO *LPD3D_SHADER_MACRO; - -DEFINE_GUID(IID_ID3D10Blob, 0x8ba5fb08, 0x5195, 0x40e2, 0xac, 0x58, 0xd, 0x98, 0x9c, 0x3a, 0x1, 0x2); - - -extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0000_v0_0_c_ifspec; -extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0000_v0_0_s_ifspec; - -#ifndef __ID3D10Blob_INTERFACE_DEFINED__ -#define __ID3D10Blob_INTERFACE_DEFINED__ - -/* interface ID3D10Blob */ -/* [unique][local][object][uuid] */ - - -EXTERN_C const IID IID_ID3D10Blob; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("8BA5FB08-5195-40e2-AC58-0D989C3A0102") - ID3D10Blob : public IUnknown - { - public: - virtual LPVOID STDMETHODCALLTYPE GetBufferPointer( void) = 0; - - virtual SIZE_T STDMETHODCALLTYPE GetBufferSize( void) = 0; - - }; - -#else /* C style interface */ - - typedef struct ID3D10BlobVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ID3D10Blob * This, - /* [in] */ REFIID riid, - /* [annotation][iid_is][out] */ - __RPC__deref_out void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ID3D10Blob * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ID3D10Blob * This); - - LPVOID ( STDMETHODCALLTYPE *GetBufferPointer )( - ID3D10Blob * This); - - SIZE_T ( STDMETHODCALLTYPE *GetBufferSize )( - ID3D10Blob * This); - - END_INTERFACE - } ID3D10BlobVtbl; - - interface ID3D10Blob - { - CONST_VTBL struct ID3D10BlobVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ID3D10Blob_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define ID3D10Blob_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define ID3D10Blob_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define ID3D10Blob_GetBufferPointer(This) \ - ( (This)->lpVtbl -> GetBufferPointer(This) ) - -#define ID3D10Blob_GetBufferSize(This) \ - ( (This)->lpVtbl -> GetBufferSize(This) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __ID3D10Blob_INTERFACE_DEFINED__ */ - - -/* interface __MIDL_itf_d3dcommon_0000_0001 */ -/* [local] */ - -typedef interface ID3D10Blob* LPD3D10BLOB; -typedef ID3D10Blob ID3DBlob; -typedef ID3DBlob* LPD3DBLOB; -#define IID_ID3DBlob IID_ID3D10Blob -typedef -enum _D3D_INCLUDE_TYPE - { D3D_INCLUDE_LOCAL = 0, - D3D_INCLUDE_SYSTEM = ( D3D_INCLUDE_LOCAL + 1 ) , - D3D10_INCLUDE_LOCAL = D3D_INCLUDE_LOCAL, - D3D10_INCLUDE_SYSTEM = D3D_INCLUDE_SYSTEM, - D3D_INCLUDE_FORCE_DWORD = 0x7fffffff - } D3D_INCLUDE_TYPE; - -typedef interface ID3DInclude ID3DInclude; -#undef INTERFACE -#define INTERFACE ID3DInclude -DECLARE_INTERFACE(ID3DInclude) -{ - STDMETHOD(Open)(THIS_ D3D_INCLUDE_TYPE IncludeType, LPCSTR pFileName, LPCVOID pParentData, LPCVOID *ppData, UINT *pBytes) PURE; - STDMETHOD(Close)(THIS_ LPCVOID pData) PURE; -}; -typedef ID3DInclude* LPD3DINCLUDE; -typedef -enum _D3D_SHADER_VARIABLE_CLASS - { D3D_SVC_SCALAR = 0, - D3D_SVC_VECTOR = ( D3D_SVC_SCALAR + 1 ) , - D3D_SVC_MATRIX_ROWS = ( D3D_SVC_VECTOR + 1 ) , - D3D_SVC_MATRIX_COLUMNS = ( D3D_SVC_MATRIX_ROWS + 1 ) , - D3D_SVC_OBJECT = ( D3D_SVC_MATRIX_COLUMNS + 1 ) , - D3D_SVC_STRUCT = ( D3D_SVC_OBJECT + 1 ) , - D3D_SVC_INTERFACE_CLASS = ( D3D_SVC_STRUCT + 1 ) , - D3D_SVC_INTERFACE_POINTER = ( D3D_SVC_INTERFACE_CLASS + 1 ) , - D3D10_SVC_SCALAR = D3D_SVC_SCALAR, - D3D10_SVC_VECTOR = D3D_SVC_VECTOR, - D3D10_SVC_MATRIX_ROWS = D3D_SVC_MATRIX_ROWS, - D3D10_SVC_MATRIX_COLUMNS = D3D_SVC_MATRIX_COLUMNS, - D3D10_SVC_OBJECT = D3D_SVC_OBJECT, - D3D10_SVC_STRUCT = D3D_SVC_STRUCT, - D3D11_SVC_INTERFACE_CLASS = D3D_SVC_INTERFACE_CLASS, - D3D11_SVC_INTERFACE_POINTER = D3D_SVC_INTERFACE_POINTER, - D3D_SVC_FORCE_DWORD = 0x7fffffff - } D3D_SHADER_VARIABLE_CLASS; - -typedef -enum _D3D_SHADER_VARIABLE_FLAGS - { D3D_SVF_USERPACKED = 1, - D3D_SVF_USED = 2, - D3D_SVF_INTERFACE_POINTER = 4, - D3D_SVF_INTERFACE_PARAMETER = 8, - D3D10_SVF_USERPACKED = D3D_SVF_USERPACKED, - D3D10_SVF_USED = D3D_SVF_USED, - D3D11_SVF_INTERFACE_POINTER = D3D_SVF_INTERFACE_POINTER, - D3D11_SVF_INTERFACE_PARAMETER = D3D_SVF_INTERFACE_PARAMETER, - D3D_SVF_FORCE_DWORD = 0x7fffffff - } D3D_SHADER_VARIABLE_FLAGS; - -typedef -enum _D3D_SHADER_VARIABLE_TYPE - { D3D_SVT_VOID = 0, - D3D_SVT_BOOL = 1, - D3D_SVT_INT = 2, - D3D_SVT_FLOAT = 3, - D3D_SVT_STRING = 4, - D3D_SVT_TEXTURE = 5, - D3D_SVT_TEXTURE1D = 6, - D3D_SVT_TEXTURE2D = 7, - D3D_SVT_TEXTURE3D = 8, - D3D_SVT_TEXTURECUBE = 9, - D3D_SVT_SAMPLER = 10, - D3D_SVT_SAMPLER1D = 11, - D3D_SVT_SAMPLER2D = 12, - D3D_SVT_SAMPLER3D = 13, - D3D_SVT_SAMPLERCUBE = 14, - D3D_SVT_PIXELSHADER = 15, - D3D_SVT_VERTEXSHADER = 16, - D3D_SVT_PIXELFRAGMENT = 17, - D3D_SVT_VERTEXFRAGMENT = 18, - D3D_SVT_UINT = 19, - D3D_SVT_UINT8 = 20, - D3D_SVT_GEOMETRYSHADER = 21, - D3D_SVT_RASTERIZER = 22, - D3D_SVT_DEPTHSTENCIL = 23, - D3D_SVT_BLEND = 24, - D3D_SVT_BUFFER = 25, - D3D_SVT_CBUFFER = 26, - D3D_SVT_TBUFFER = 27, - D3D_SVT_TEXTURE1DARRAY = 28, - D3D_SVT_TEXTURE2DARRAY = 29, - D3D_SVT_RENDERTARGETVIEW = 30, - D3D_SVT_DEPTHSTENCILVIEW = 31, - D3D_SVT_TEXTURE2DMS = 32, - D3D_SVT_TEXTURE2DMSARRAY = 33, - D3D_SVT_TEXTURECUBEARRAY = 34, - D3D_SVT_HULLSHADER = 35, - D3D_SVT_DOMAINSHADER = 36, - D3D_SVT_INTERFACE_POINTER = 37, - D3D_SVT_COMPUTESHADER = 38, - D3D_SVT_DOUBLE = 39, - D3D_SVT_RWTEXTURE1D = 40, - D3D_SVT_RWTEXTURE1DARRAY = 41, - D3D_SVT_RWTEXTURE2D = 42, - D3D_SVT_RWTEXTURE2DARRAY = 43, - D3D_SVT_RWTEXTURE3D = 44, - D3D_SVT_RWBUFFER = 45, - D3D_SVT_BYTEADDRESS_BUFFER = 46, - D3D_SVT_RWBYTEADDRESS_BUFFER = 47, - D3D_SVT_STRUCTURED_BUFFER = 48, - D3D_SVT_RWSTRUCTURED_BUFFER = 49, - D3D_SVT_APPEND_STRUCTURED_BUFFER = 50, - D3D_SVT_CONSUME_STRUCTURED_BUFFER = 51, - D3D10_SVT_VOID = D3D_SVT_VOID, - D3D10_SVT_BOOL = D3D_SVT_BOOL, - D3D10_SVT_INT = D3D_SVT_INT, - D3D10_SVT_FLOAT = D3D_SVT_FLOAT, - D3D10_SVT_STRING = D3D_SVT_STRING, - D3D10_SVT_TEXTURE = D3D_SVT_TEXTURE, - D3D10_SVT_TEXTURE1D = D3D_SVT_TEXTURE1D, - D3D10_SVT_TEXTURE2D = D3D_SVT_TEXTURE2D, - D3D10_SVT_TEXTURE3D = D3D_SVT_TEXTURE3D, - D3D10_SVT_TEXTURECUBE = D3D_SVT_TEXTURECUBE, - D3D10_SVT_SAMPLER = D3D_SVT_SAMPLER, - D3D10_SVT_SAMPLER1D = D3D_SVT_SAMPLER1D, - D3D10_SVT_SAMPLER2D = D3D_SVT_SAMPLER2D, - D3D10_SVT_SAMPLER3D = D3D_SVT_SAMPLER3D, - D3D10_SVT_SAMPLERCUBE = D3D_SVT_SAMPLERCUBE, - D3D10_SVT_PIXELSHADER = D3D_SVT_PIXELSHADER, - D3D10_SVT_VERTEXSHADER = D3D_SVT_VERTEXSHADER, - D3D10_SVT_PIXELFRAGMENT = D3D_SVT_PIXELFRAGMENT, - D3D10_SVT_VERTEXFRAGMENT = D3D_SVT_VERTEXFRAGMENT, - D3D10_SVT_UINT = D3D_SVT_UINT, - D3D10_SVT_UINT8 = D3D_SVT_UINT8, - D3D10_SVT_GEOMETRYSHADER = D3D_SVT_GEOMETRYSHADER, - D3D10_SVT_RASTERIZER = D3D_SVT_RASTERIZER, - D3D10_SVT_DEPTHSTENCIL = D3D_SVT_DEPTHSTENCIL, - D3D10_SVT_BLEND = D3D_SVT_BLEND, - D3D10_SVT_BUFFER = D3D_SVT_BUFFER, - D3D10_SVT_CBUFFER = D3D_SVT_CBUFFER, - D3D10_SVT_TBUFFER = D3D_SVT_TBUFFER, - D3D10_SVT_TEXTURE1DARRAY = D3D_SVT_TEXTURE1DARRAY, - D3D10_SVT_TEXTURE2DARRAY = D3D_SVT_TEXTURE2DARRAY, - D3D10_SVT_RENDERTARGETVIEW = D3D_SVT_RENDERTARGETVIEW, - D3D10_SVT_DEPTHSTENCILVIEW = D3D_SVT_DEPTHSTENCILVIEW, - D3D10_SVT_TEXTURE2DMS = D3D_SVT_TEXTURE2DMS, - D3D10_SVT_TEXTURE2DMSARRAY = D3D_SVT_TEXTURE2DMSARRAY, - D3D10_SVT_TEXTURECUBEARRAY = D3D_SVT_TEXTURECUBEARRAY, - D3D11_SVT_HULLSHADER = D3D_SVT_HULLSHADER, - D3D11_SVT_DOMAINSHADER = D3D_SVT_DOMAINSHADER, - D3D11_SVT_INTERFACE_POINTER = D3D_SVT_INTERFACE_POINTER, - D3D11_SVT_COMPUTESHADER = D3D_SVT_COMPUTESHADER, - D3D11_SVT_DOUBLE = D3D_SVT_DOUBLE, - D3D11_SVT_RWTEXTURE1D = D3D_SVT_RWTEXTURE1D, - D3D11_SVT_RWTEXTURE1DARRAY = D3D_SVT_RWTEXTURE1DARRAY, - D3D11_SVT_RWTEXTURE2D = D3D_SVT_RWTEXTURE2D, - D3D11_SVT_RWTEXTURE2DARRAY = D3D_SVT_RWTEXTURE2DARRAY, - D3D11_SVT_RWTEXTURE3D = D3D_SVT_RWTEXTURE3D, - D3D11_SVT_RWBUFFER = D3D_SVT_RWBUFFER, - D3D11_SVT_BYTEADDRESS_BUFFER = D3D_SVT_BYTEADDRESS_BUFFER, - D3D11_SVT_RWBYTEADDRESS_BUFFER = D3D_SVT_RWBYTEADDRESS_BUFFER, - D3D11_SVT_STRUCTURED_BUFFER = D3D_SVT_STRUCTURED_BUFFER, - D3D11_SVT_RWSTRUCTURED_BUFFER = D3D_SVT_RWSTRUCTURED_BUFFER, - D3D11_SVT_APPEND_STRUCTURED_BUFFER = D3D_SVT_APPEND_STRUCTURED_BUFFER, - D3D11_SVT_CONSUME_STRUCTURED_BUFFER = D3D_SVT_CONSUME_STRUCTURED_BUFFER, - D3D_SVT_FORCE_DWORD = 0x7fffffff - } D3D_SHADER_VARIABLE_TYPE; - -typedef -enum _D3D_SHADER_INPUT_FLAGS - { D3D_SIF_USERPACKED = 1, - D3D_SIF_COMPARISON_SAMPLER = 2, - D3D_SIF_TEXTURE_COMPONENT_0 = 4, - D3D_SIF_TEXTURE_COMPONENT_1 = 8, - D3D_SIF_TEXTURE_COMPONENTS = 12, - D3D10_SIF_USERPACKED = D3D_SIF_USERPACKED, - D3D10_SIF_COMPARISON_SAMPLER = D3D_SIF_COMPARISON_SAMPLER, - D3D10_SIF_TEXTURE_COMPONENT_0 = D3D_SIF_TEXTURE_COMPONENT_0, - D3D10_SIF_TEXTURE_COMPONENT_1 = D3D_SIF_TEXTURE_COMPONENT_1, - D3D10_SIF_TEXTURE_COMPONENTS = D3D_SIF_TEXTURE_COMPONENTS, - D3D_SIF_FORCE_DWORD = 0x7fffffff - } D3D_SHADER_INPUT_FLAGS; - -typedef -enum _D3D_SHADER_INPUT_TYPE - { D3D_SIT_CBUFFER = 0, - D3D_SIT_TBUFFER = ( D3D_SIT_CBUFFER + 1 ) , - D3D_SIT_TEXTURE = ( D3D_SIT_TBUFFER + 1 ) , - D3D_SIT_SAMPLER = ( D3D_SIT_TEXTURE + 1 ) , - D3D_SIT_UAV_RWTYPED = ( D3D_SIT_SAMPLER + 1 ) , - D3D_SIT_STRUCTURED = ( D3D_SIT_UAV_RWTYPED + 1 ) , - D3D_SIT_UAV_RWSTRUCTURED = ( D3D_SIT_STRUCTURED + 1 ) , - D3D_SIT_BYTEADDRESS = ( D3D_SIT_UAV_RWSTRUCTURED + 1 ) , - D3D_SIT_UAV_RWBYTEADDRESS = ( D3D_SIT_BYTEADDRESS + 1 ) , - D3D_SIT_UAV_APPEND_STRUCTURED = ( D3D_SIT_UAV_RWBYTEADDRESS + 1 ) , - D3D_SIT_UAV_CONSUME_STRUCTURED = ( D3D_SIT_UAV_APPEND_STRUCTURED + 1 ) , - D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER = ( D3D_SIT_UAV_CONSUME_STRUCTURED + 1 ) , - D3D10_SIT_CBUFFER = D3D_SIT_CBUFFER, - D3D10_SIT_TBUFFER = D3D_SIT_TBUFFER, - D3D10_SIT_TEXTURE = D3D_SIT_TEXTURE, - D3D10_SIT_SAMPLER = D3D_SIT_SAMPLER, - D3D11_SIT_UAV_RWTYPED = D3D_SIT_UAV_RWTYPED, - D3D11_SIT_STRUCTURED = D3D_SIT_STRUCTURED, - D3D11_SIT_UAV_RWSTRUCTURED = D3D_SIT_UAV_RWSTRUCTURED, - D3D11_SIT_BYTEADDRESS = D3D_SIT_BYTEADDRESS, - D3D11_SIT_UAV_RWBYTEADDRESS = D3D_SIT_UAV_RWBYTEADDRESS, - D3D11_SIT_UAV_APPEND_STRUCTURED = D3D_SIT_UAV_APPEND_STRUCTURED, - D3D11_SIT_UAV_CONSUME_STRUCTURED = D3D_SIT_UAV_CONSUME_STRUCTURED, - D3D11_SIT_UAV_RWSTRUCTURED_WITH_COUNTER = D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER - } D3D_SHADER_INPUT_TYPE; - -typedef -enum _D3D_SHADER_CBUFFER_FLAGS - { D3D_CBF_USERPACKED = 1, - D3D10_CBF_USERPACKED = D3D_CBF_USERPACKED, - D3D_CBF_FORCE_DWORD = 0x7fffffff - } D3D_SHADER_CBUFFER_FLAGS; - -typedef -enum _D3D_CBUFFER_TYPE - { D3D_CT_CBUFFER = 0, - D3D_CT_TBUFFER = ( D3D_CT_CBUFFER + 1 ) , - D3D_CT_INTERFACE_POINTERS = ( D3D_CT_TBUFFER + 1 ) , - D3D_CT_RESOURCE_BIND_INFO = ( D3D_CT_INTERFACE_POINTERS + 1 ) , - D3D10_CT_CBUFFER = D3D_CT_CBUFFER, - D3D10_CT_TBUFFER = D3D_CT_TBUFFER, - D3D11_CT_CBUFFER = D3D_CT_CBUFFER, - D3D11_CT_TBUFFER = D3D_CT_TBUFFER, - D3D11_CT_INTERFACE_POINTERS = D3D_CT_INTERFACE_POINTERS, - D3D11_CT_RESOURCE_BIND_INFO = D3D_CT_RESOURCE_BIND_INFO - } D3D_CBUFFER_TYPE; - -typedef -enum D3D_NAME - { D3D_NAME_UNDEFINED = 0, - D3D_NAME_POSITION = 1, - D3D_NAME_CLIP_DISTANCE = 2, - D3D_NAME_CULL_DISTANCE = 3, - D3D_NAME_RENDER_TARGET_ARRAY_INDEX = 4, - D3D_NAME_VIEWPORT_ARRAY_INDEX = 5, - D3D_NAME_VERTEX_ID = 6, - D3D_NAME_PRIMITIVE_ID = 7, - D3D_NAME_INSTANCE_ID = 8, - D3D_NAME_IS_FRONT_FACE = 9, - D3D_NAME_SAMPLE_INDEX = 10, - D3D_NAME_FINAL_QUAD_EDGE_TESSFACTOR = 11, - D3D_NAME_FINAL_QUAD_INSIDE_TESSFACTOR = 12, - D3D_NAME_FINAL_TRI_EDGE_TESSFACTOR = 13, - D3D_NAME_FINAL_TRI_INSIDE_TESSFACTOR = 14, - D3D_NAME_FINAL_LINE_DETAIL_TESSFACTOR = 15, - D3D_NAME_FINAL_LINE_DENSITY_TESSFACTOR = 16, - D3D_NAME_TARGET = 64, - D3D_NAME_DEPTH = 65, - D3D_NAME_COVERAGE = 66, - D3D_NAME_DEPTH_GREATER_EQUAL = 67, - D3D_NAME_DEPTH_LESS_EQUAL = 68, - D3D10_NAME_UNDEFINED = D3D_NAME_UNDEFINED, - D3D10_NAME_POSITION = D3D_NAME_POSITION, - D3D10_NAME_CLIP_DISTANCE = D3D_NAME_CLIP_DISTANCE, - D3D10_NAME_CULL_DISTANCE = D3D_NAME_CULL_DISTANCE, - D3D10_NAME_RENDER_TARGET_ARRAY_INDEX = D3D_NAME_RENDER_TARGET_ARRAY_INDEX, - D3D10_NAME_VIEWPORT_ARRAY_INDEX = D3D_NAME_VIEWPORT_ARRAY_INDEX, - D3D10_NAME_VERTEX_ID = D3D_NAME_VERTEX_ID, - D3D10_NAME_PRIMITIVE_ID = D3D_NAME_PRIMITIVE_ID, - D3D10_NAME_INSTANCE_ID = D3D_NAME_INSTANCE_ID, - D3D10_NAME_IS_FRONT_FACE = D3D_NAME_IS_FRONT_FACE, - D3D10_NAME_SAMPLE_INDEX = D3D_NAME_SAMPLE_INDEX, - D3D10_NAME_TARGET = D3D_NAME_TARGET, - D3D10_NAME_DEPTH = D3D_NAME_DEPTH, - D3D10_NAME_COVERAGE = D3D_NAME_COVERAGE, - D3D11_NAME_FINAL_QUAD_EDGE_TESSFACTOR = D3D_NAME_FINAL_QUAD_EDGE_TESSFACTOR, - D3D11_NAME_FINAL_QUAD_INSIDE_TESSFACTOR = D3D_NAME_FINAL_QUAD_INSIDE_TESSFACTOR, - D3D11_NAME_FINAL_TRI_EDGE_TESSFACTOR = D3D_NAME_FINAL_TRI_EDGE_TESSFACTOR, - D3D11_NAME_FINAL_TRI_INSIDE_TESSFACTOR = D3D_NAME_FINAL_TRI_INSIDE_TESSFACTOR, - D3D11_NAME_FINAL_LINE_DETAIL_TESSFACTOR = D3D_NAME_FINAL_LINE_DETAIL_TESSFACTOR, - D3D11_NAME_FINAL_LINE_DENSITY_TESSFACTOR = D3D_NAME_FINAL_LINE_DENSITY_TESSFACTOR, - D3D11_NAME_DEPTH_GREATER_EQUAL = D3D_NAME_DEPTH_GREATER_EQUAL, - D3D11_NAME_DEPTH_LESS_EQUAL = D3D_NAME_DEPTH_LESS_EQUAL - } D3D_NAME; - -typedef -enum D3D_RESOURCE_RETURN_TYPE - { D3D_RETURN_TYPE_UNORM = 1, - D3D_RETURN_TYPE_SNORM = 2, - D3D_RETURN_TYPE_SINT = 3, - D3D_RETURN_TYPE_UINT = 4, - D3D_RETURN_TYPE_FLOAT = 5, - D3D_RETURN_TYPE_MIXED = 6, - D3D_RETURN_TYPE_DOUBLE = 7, - D3D_RETURN_TYPE_CONTINUED = 8, - D3D10_RETURN_TYPE_UNORM = D3D_RETURN_TYPE_UNORM, - D3D10_RETURN_TYPE_SNORM = D3D_RETURN_TYPE_SNORM, - D3D10_RETURN_TYPE_SINT = D3D_RETURN_TYPE_SINT, - D3D10_RETURN_TYPE_UINT = D3D_RETURN_TYPE_UINT, - D3D10_RETURN_TYPE_FLOAT = D3D_RETURN_TYPE_FLOAT, - D3D10_RETURN_TYPE_MIXED = D3D_RETURN_TYPE_MIXED, - D3D11_RETURN_TYPE_UNORM = D3D_RETURN_TYPE_UNORM, - D3D11_RETURN_TYPE_SNORM = D3D_RETURN_TYPE_SNORM, - D3D11_RETURN_TYPE_SINT = D3D_RETURN_TYPE_SINT, - D3D11_RETURN_TYPE_UINT = D3D_RETURN_TYPE_UINT, - D3D11_RETURN_TYPE_FLOAT = D3D_RETURN_TYPE_FLOAT, - D3D11_RETURN_TYPE_MIXED = D3D_RETURN_TYPE_MIXED, - D3D11_RETURN_TYPE_DOUBLE = D3D_RETURN_TYPE_DOUBLE, - D3D11_RETURN_TYPE_CONTINUED = D3D_RETURN_TYPE_CONTINUED - } D3D_RESOURCE_RETURN_TYPE; - -typedef -enum D3D_REGISTER_COMPONENT_TYPE - { D3D_REGISTER_COMPONENT_UNKNOWN = 0, - D3D_REGISTER_COMPONENT_UINT32 = 1, - D3D_REGISTER_COMPONENT_SINT32 = 2, - D3D_REGISTER_COMPONENT_FLOAT32 = 3, - D3D10_REGISTER_COMPONENT_UNKNOWN = D3D_REGISTER_COMPONENT_UNKNOWN, - D3D10_REGISTER_COMPONENT_UINT32 = D3D_REGISTER_COMPONENT_UINT32, - D3D10_REGISTER_COMPONENT_SINT32 = D3D_REGISTER_COMPONENT_SINT32, - D3D10_REGISTER_COMPONENT_FLOAT32 = D3D_REGISTER_COMPONENT_FLOAT32 - } D3D_REGISTER_COMPONENT_TYPE; - -typedef -enum D3D_TESSELLATOR_DOMAIN - { D3D_TESSELLATOR_DOMAIN_UNDEFINED = 0, - D3D_TESSELLATOR_DOMAIN_ISOLINE = 1, - D3D_TESSELLATOR_DOMAIN_TRI = 2, - D3D_TESSELLATOR_DOMAIN_QUAD = 3, - D3D11_TESSELLATOR_DOMAIN_UNDEFINED = D3D_TESSELLATOR_DOMAIN_UNDEFINED, - D3D11_TESSELLATOR_DOMAIN_ISOLINE = D3D_TESSELLATOR_DOMAIN_ISOLINE, - D3D11_TESSELLATOR_DOMAIN_TRI = D3D_TESSELLATOR_DOMAIN_TRI, - D3D11_TESSELLATOR_DOMAIN_QUAD = D3D_TESSELLATOR_DOMAIN_QUAD - } D3D_TESSELLATOR_DOMAIN; - -typedef -enum D3D_TESSELLATOR_PARTITIONING - { D3D_TESSELLATOR_PARTITIONING_UNDEFINED = 0, - D3D_TESSELLATOR_PARTITIONING_INTEGER = 1, - D3D_TESSELLATOR_PARTITIONING_POW2 = 2, - D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD = 3, - D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN = 4, - D3D11_TESSELLATOR_PARTITIONING_UNDEFINED = D3D_TESSELLATOR_PARTITIONING_UNDEFINED, - D3D11_TESSELLATOR_PARTITIONING_INTEGER = D3D_TESSELLATOR_PARTITIONING_INTEGER, - D3D11_TESSELLATOR_PARTITIONING_POW2 = D3D_TESSELLATOR_PARTITIONING_POW2, - D3D11_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD = D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD, - D3D11_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN = D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN - } D3D_TESSELLATOR_PARTITIONING; - -typedef -enum D3D_TESSELLATOR_OUTPUT_PRIMITIVE - { D3D_TESSELLATOR_OUTPUT_UNDEFINED = 0, - D3D_TESSELLATOR_OUTPUT_POINT = 1, - D3D_TESSELLATOR_OUTPUT_LINE = 2, - D3D_TESSELLATOR_OUTPUT_TRIANGLE_CW = 3, - D3D_TESSELLATOR_OUTPUT_TRIANGLE_CCW = 4, - D3D11_TESSELLATOR_OUTPUT_UNDEFINED = D3D_TESSELLATOR_OUTPUT_UNDEFINED, - D3D11_TESSELLATOR_OUTPUT_POINT = D3D_TESSELLATOR_OUTPUT_POINT, - D3D11_TESSELLATOR_OUTPUT_LINE = D3D_TESSELLATOR_OUTPUT_LINE, - D3D11_TESSELLATOR_OUTPUT_TRIANGLE_CW = D3D_TESSELLATOR_OUTPUT_TRIANGLE_CW, - D3D11_TESSELLATOR_OUTPUT_TRIANGLE_CCW = D3D_TESSELLATOR_OUTPUT_TRIANGLE_CCW - } D3D_TESSELLATOR_OUTPUT_PRIMITIVE; - -DEFINE_GUID(WKPDID_D3DDebugObjectName,0x429b8c22,0x9188,0x4b0c,0x87,0x42,0xac,0xb0,0xbf,0x85,0xc2,0x00); - - -extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0001_v0_0_c_ifspec; -extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0001_v0_0_s_ifspec; - -/* Additional Prototypes for ALL interfaces */ - -/* end of Additional Prototypes */ - -#ifdef __cplusplus -} -#endif - -#endif - - diff --git a/builddir/irrlicht-1.8.1/include/D3Dcompiler.h b/builddir/irrlicht-1.8.1/include/D3Dcompiler.h deleted file mode 100644 index fea519f..0000000 --- a/builddir/irrlicht-1.8.1/include/D3Dcompiler.h +++ /dev/null @@ -1,397 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// File: D3DCompiler.h -// Content: D3D Compilation Types and APIs -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef __D3DCOMPILER_H__ -#define __D3DCOMPILER_H__ - -// Current name of the DLL shipped in the same SDK as this header. - - -#define D3DCOMPILER_DLL_W L"d3dcompiler_43.dll" -#define D3DCOMPILER_DLL_A "d3dcompiler_43.dll" - -#ifdef UNICODE - #define D3DCOMPILER_DLL D3DCOMPILER_DLL_W -#else - #define D3DCOMPILER_DLL D3DCOMPILER_DLL_A -#endif - -#include "d3d11shader.h" - -////////////////////////////////////////////////////////////////////////////// -// APIs ////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// - -#ifdef __cplusplus -extern "C" { -#endif //__cplusplus - -//---------------------------------------------------------------------------- -// D3DCOMPILE flags: -// ----------------- -// D3DCOMPILE_DEBUG -// Insert debug file/line/type/symbol information. -// -// D3DCOMPILE_SKIP_VALIDATION -// Do not validate the generated code against known capabilities and -// constraints. This option is only recommended when compiling shaders -// you KNOW will work. (ie. have compiled before without this option.) -// Shaders are always validated by D3D before they are set to the device. -// -// D3DCOMPILE_SKIP_OPTIMIZATION -// Instructs the compiler to skip optimization steps during code generation. -// Unless you are trying to isolate a problem in your code using this option -// is not recommended. -// -// D3DCOMPILE_PACK_MATRIX_ROW_MAJOR -// Unless explicitly specified, matrices will be packed in row-major order -// on input and output from the shader. -// -// D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR -// Unless explicitly specified, matrices will be packed in column-major -// order on input and output from the shader. This is generally more -// efficient, since it allows vector-matrix multiplication to be performed -// using a series of dot-products. -// -// D3DCOMPILE_PARTIAL_PRECISION -// Force all computations in resulting shader to occur at partial precision. -// This may result in faster evaluation of shaders on some hardware. -// -// D3DCOMPILE_FORCE_VS_SOFTWARE_NO_OPT -// Force compiler to compile against the next highest available software -// target for vertex shaders. This flag also turns optimizations off, -// and debugging on. -// -// D3DCOMPILE_FORCE_PS_SOFTWARE_NO_OPT -// Force compiler to compile against the next highest available software -// target for pixel shaders. This flag also turns optimizations off, -// and debugging on. -// -// D3DCOMPILE_NO_PRESHADER -// Disables Preshaders. Using this flag will cause the compiler to not -// pull out static expression for evaluation on the host cpu -// -// D3DCOMPILE_AVOID_FLOW_CONTROL -// Hint compiler to avoid flow-control constructs where possible. -// -// D3DCOMPILE_PREFER_FLOW_CONTROL -// Hint compiler to prefer flow-control constructs where possible. -// -// D3DCOMPILE_ENABLE_STRICTNESS -// By default, the HLSL/Effect compilers are not strict on deprecated syntax. -// Specifying this flag enables the strict mode. Deprecated syntax may be -// removed in a future release, and enabling syntax is a good way to make -// sure your shaders comply to the latest spec. -// -// D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY -// This enables older shaders to compile to 4_0 targets. -// -//---------------------------------------------------------------------------- - -#define D3DCOMPILE_DEBUG (1 << 0) -#define D3DCOMPILE_SKIP_VALIDATION (1 << 1) -#define D3DCOMPILE_SKIP_OPTIMIZATION (1 << 2) -#define D3DCOMPILE_PACK_MATRIX_ROW_MAJOR (1 << 3) -#define D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR (1 << 4) -#define D3DCOMPILE_PARTIAL_PRECISION (1 << 5) -#define D3DCOMPILE_FORCE_VS_SOFTWARE_NO_OPT (1 << 6) -#define D3DCOMPILE_FORCE_PS_SOFTWARE_NO_OPT (1 << 7) -#define D3DCOMPILE_NO_PRESHADER (1 << 8) -#define D3DCOMPILE_AVOID_FLOW_CONTROL (1 << 9) -#define D3DCOMPILE_PREFER_FLOW_CONTROL (1 << 10) -#define D3DCOMPILE_ENABLE_STRICTNESS (1 << 11) -#define D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY (1 << 12) -#define D3DCOMPILE_IEEE_STRICTNESS (1 << 13) -#define D3DCOMPILE_OPTIMIZATION_LEVEL0 (1 << 14) -#define D3DCOMPILE_OPTIMIZATION_LEVEL1 0 -#define D3DCOMPILE_OPTIMIZATION_LEVEL2 ((1 << 14) | (1 << 15)) -#define D3DCOMPILE_OPTIMIZATION_LEVEL3 (1 << 15) -#define D3DCOMPILE_RESERVED16 (1 << 16) -#define D3DCOMPILE_RESERVED17 (1 << 17) -#define D3DCOMPILE_WARNINGS_ARE_ERRORS (1 << 18) - -//---------------------------------------------------------------------------- -// D3DCOMPILE_EFFECT flags: -// ------------------------------------- -// These flags are passed in when creating an effect, and affect -// either compilation behavior or runtime effect behavior -// -// D3DCOMPILE_EFFECT_CHILD_EFFECT -// Compile this .fx file to a child effect. Child effects have no -// initializers for any shared values as these are initialied in the -// master effect (pool). -// -// D3DCOMPILE_EFFECT_ALLOW_SLOW_OPS -// By default, performance mode is enabled. Performance mode -// disallows mutable state objects by preventing non-literal -// expressions from appearing in state object definitions. -// Specifying this flag will disable the mode and allow for mutable -// state objects. -// -//---------------------------------------------------------------------------- - -#define D3DCOMPILE_EFFECT_CHILD_EFFECT (1 << 0) -#define D3DCOMPILE_EFFECT_ALLOW_SLOW_OPS (1 << 1) - -//---------------------------------------------------------------------------- -// D3DCompile: -// ---------- -// Compile source text into bytecode appropriate for the given target. -//---------------------------------------------------------------------------- - -HRESULT WINAPI -D3DCompile(__in_bcount(SrcDataSize) LPCVOID pSrcData, - __in SIZE_T SrcDataSize, - __in_opt LPCSTR pSourceName, - __in_xcount_opt(pDefines->Name != NULL) CONST D3D_SHADER_MACRO* pDefines, - __in_opt ID3DInclude* pInclude, - __in LPCSTR pEntrypoint, - __in LPCSTR pTarget, - __in UINT Flags1, - __in UINT Flags2, - __out ID3DBlob** ppCode, - __out_opt ID3DBlob** ppErrorMsgs); - -typedef HRESULT (WINAPI *pD3DCompile) - (LPCVOID pSrcData, - SIZE_T SrcDataSize, - LPCSTR pFileName, - CONST D3D_SHADER_MACRO* pDefines, - ID3DInclude* pInclude, - LPCSTR pEntrypoint, - LPCSTR pTarget, - UINT Flags1, - UINT Flags2, - ID3DBlob** ppCode, - ID3DBlob** ppErrorMsgs); - -//---------------------------------------------------------------------------- -// D3DPreprocess: -// ---------- -// Process source text with the compiler's preprocessor and return -// the resulting text. -//---------------------------------------------------------------------------- - -HRESULT WINAPI -D3DPreprocess(__in_bcount(SrcDataSize) LPCVOID pSrcData, - __in SIZE_T SrcDataSize, - __in_opt LPCSTR pSourceName, - __in_opt CONST D3D_SHADER_MACRO* pDefines, - __in_opt ID3DInclude* pInclude, - __out ID3DBlob** ppCodeText, - __out_opt ID3DBlob** ppErrorMsgs); - -typedef HRESULT (WINAPI *pD3DPreprocess) - (LPCVOID pSrcData, - SIZE_T SrcDataSize, - LPCSTR pFileName, - CONST D3D_SHADER_MACRO* pDefines, - ID3DInclude* pInclude, - ID3DBlob** ppCodeText, - ID3DBlob** ppErrorMsgs); - -//---------------------------------------------------------------------------- -// D3DGetDebugInfo: -// ----------------------- -// Gets shader debug info. Debug info is generated by D3DCompile and is -// embedded in the body of the shader. -//---------------------------------------------------------------------------- - -HRESULT WINAPI -D3DGetDebugInfo(__in_bcount(SrcDataSize) LPCVOID pSrcData, - __in SIZE_T SrcDataSize, - __out ID3DBlob** ppDebugInfo); - -//---------------------------------------------------------------------------- -// D3DReflect: -// ---------- -// Shader code contains metadata that can be inspected via the -// reflection APIs. -//---------------------------------------------------------------------------- - -HRESULT WINAPI -D3DReflect(__in_bcount(SrcDataSize) LPCVOID pSrcData, - __in SIZE_T SrcDataSize, - __in REFIID pInterface, - __out void** ppReflector); - -//---------------------------------------------------------------------------- -// D3DDisassemble: -// ---------------------- -// Takes a binary shader and returns a buffer containing text assembly. -//---------------------------------------------------------------------------- - -#define D3D_DISASM_ENABLE_COLOR_CODE 0x00000001 -#define D3D_DISASM_ENABLE_DEFAULT_VALUE_PRINTS 0x00000002 -#define D3D_DISASM_ENABLE_INSTRUCTION_NUMBERING 0x00000004 -#define D3D_DISASM_ENABLE_INSTRUCTION_CYCLE 0x00000008 -#define D3D_DISASM_DISABLE_DEBUG_INFO 0x00000010 - -HRESULT WINAPI -D3DDisassemble(__in_bcount(SrcDataSize) LPCVOID pSrcData, - __in SIZE_T SrcDataSize, - __in UINT Flags, - __in_opt LPCSTR szComments, - __out ID3DBlob** ppDisassembly); - -typedef HRESULT (WINAPI *pD3DDisassemble) - (__in_bcount(SrcDataSize) LPCVOID pSrcData, - __in SIZE_T SrcDataSize, - __in UINT Flags, - __in_opt LPCSTR szComments, - __out ID3DBlob** ppDisassembly); - -//---------------------------------------------------------------------------- -// D3DDisassemble10Effect: -// ----------------------- -// Takes a D3D10 effect interface and returns a -// buffer containing text assembly. -//---------------------------------------------------------------------------- - -HRESULT WINAPI -D3DDisassemble10Effect(__in interface ID3D10Effect *pEffect, - __in UINT Flags, - __out ID3DBlob** ppDisassembly); - -//---------------------------------------------------------------------------- -// D3DGetInputSignatureBlob: -// ----------------------- -// Retrieve the input signature from a compilation result. -//---------------------------------------------------------------------------- - -HRESULT WINAPI -D3DGetInputSignatureBlob(__in_bcount(SrcDataSize) LPCVOID pSrcData, - __in SIZE_T SrcDataSize, - __out ID3DBlob** ppSignatureBlob); - -//---------------------------------------------------------------------------- -// D3DGetOutputSignatureBlob: -// ----------------------- -// Retrieve the output signature from a compilation result. -//---------------------------------------------------------------------------- - -HRESULT WINAPI -D3DGetOutputSignatureBlob(__in_bcount(SrcDataSize) LPCVOID pSrcData, - __in SIZE_T SrcDataSize, - __out ID3DBlob** ppSignatureBlob); - -//---------------------------------------------------------------------------- -// D3DGetInputAndOutputSignatureBlob: -// ----------------------- -// Retrieve the input and output signatures from a compilation result. -//---------------------------------------------------------------------------- - -HRESULT WINAPI -D3DGetInputAndOutputSignatureBlob(__in_bcount(SrcDataSize) LPCVOID pSrcData, - __in SIZE_T SrcDataSize, - __out ID3DBlob** ppSignatureBlob); - -//---------------------------------------------------------------------------- -// D3DStripShader: -// ----------------------- -// Removes unwanted blobs from a compilation result -//---------------------------------------------------------------------------- - -typedef enum D3DCOMPILER_STRIP_FLAGS -{ - D3DCOMPILER_STRIP_REFLECTION_DATA = 1, - D3DCOMPILER_STRIP_DEBUG_INFO = 2, - D3DCOMPILER_STRIP_TEST_BLOBS = 4, - D3DCOMPILER_STRIP_FORCE_DWORD = 0x7fffffff, -} D3DCOMPILER_STRIP_FLAGS; - -HRESULT WINAPI -D3DStripShader(__in_bcount(BytecodeLength) LPCVOID pShaderBytecode, - __in SIZE_T BytecodeLength, - __in UINT uStripFlags, - __out ID3DBlob** ppStrippedBlob); - -//---------------------------------------------------------------------------- -// D3DGetBlobPart: -// ----------------------- -// Extracts information from a compilation result. -//---------------------------------------------------------------------------- - -typedef enum D3D_BLOB_PART -{ - D3D_BLOB_INPUT_SIGNATURE_BLOB, - D3D_BLOB_OUTPUT_SIGNATURE_BLOB, - D3D_BLOB_INPUT_AND_OUTPUT_SIGNATURE_BLOB, - D3D_BLOB_PATCH_CONSTANT_SIGNATURE_BLOB, - D3D_BLOB_ALL_SIGNATURE_BLOB, - D3D_BLOB_DEBUG_INFO, - D3D_BLOB_LEGACY_SHADER, - D3D_BLOB_XNA_PREPASS_SHADER, - D3D_BLOB_XNA_SHADER, - - // Test parts are only produced by special compiler versions and so - // are usually not present in shaders. - D3D_BLOB_TEST_ALTERNATE_SHADER = 0x8000, - D3D_BLOB_TEST_COMPILE_DETAILS, - D3D_BLOB_TEST_COMPILE_PERF, -} D3D_BLOB_PART; - -HRESULT WINAPI -D3DGetBlobPart(__in_bcount(SrcDataSize) LPCVOID pSrcData, - __in SIZE_T SrcDataSize, - __in D3D_BLOB_PART Part, - __in UINT Flags, - __out ID3DBlob** ppPart); - -//---------------------------------------------------------------------------- -// D3DCompressShaders: -// ----------------------- -// Compresses a set of shaders into a more compact form. -//---------------------------------------------------------------------------- - -typedef struct _D3D_SHADER_DATA -{ - LPCVOID pBytecode; - SIZE_T BytecodeLength; -} D3D_SHADER_DATA; - -#define D3D_COMPRESS_SHADER_KEEP_ALL_PARTS 0x00000001 - -HRESULT WINAPI -D3DCompressShaders(__in UINT uNumShaders, - __in_ecount(uNumShaders) D3D_SHADER_DATA* pShaderData, - __in UINT uFlags, - __out ID3DBlob** ppCompressedData); - -//---------------------------------------------------------------------------- -// D3DDecompressShaders: -// ----------------------- -// Decompresses one or more shaders from a compressed set. -//---------------------------------------------------------------------------- - -HRESULT WINAPI -D3DDecompressShaders(__in_bcount(SrcDataSize) LPCVOID pSrcData, - __in SIZE_T SrcDataSize, - __in UINT uNumShaders, - __in UINT uStartIndex, - __in_ecount_opt(uNumShaders) UINT* pIndices, - __in UINT uFlags, - __out_ecount(uNumShaders) ID3DBlob** ppShaders, - __out_opt UINT* pTotalShaders); - -//---------------------------------------------------------------------------- -// D3DCreateBlob: -// ----------------------- -// Create an ID3DBlob instance. -//---------------------------------------------------------------------------- - -HRESULT WINAPI -D3DCreateBlob(__in SIZE_T Size, - __out ID3DBlob** ppBlob); - -#ifdef __cplusplus -} -#endif //__cplusplus - -#endif // #ifndef __D3DCOMPILER_H__ diff --git a/builddir/irrlicht-1.8.1/include/EAttributes.h b/builddir/irrlicht-1.8.1/include/EAttributes.h deleted file mode 100644 index 121b6b3..0000000 --- a/builddir/irrlicht-1.8.1/include/EAttributes.h +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __E_ATTRIBUTES_H_INCLUDED__ -#define __E_ATTRIBUTES_H_INCLUDED__ - -namespace irr -{ -namespace io -{ - -//! Types of attributes available for IAttributes -enum E_ATTRIBUTE_TYPE -{ - // integer attribute - EAT_INT = 0, - - // float attribute - EAT_FLOAT, - - // string attribute - EAT_STRING, - - // boolean attribute - EAT_BOOL, - - // enumeration attribute - EAT_ENUM, - - // color attribute - EAT_COLOR, - - // floating point color attribute - EAT_COLORF, - - // 3d vector attribute - EAT_VECTOR3D, - - // 2d position attribute - EAT_POSITION2D, - - // vector 2d attribute - EAT_VECTOR2D, - - // rectangle attribute - EAT_RECT, - - // matrix attribute - EAT_MATRIX, - - // quaternion attribute - EAT_QUATERNION, - - // 3d bounding box - EAT_BBOX, - - // plane - EAT_PLANE, - - // 3d triangle - EAT_TRIANGLE3D, - - // line 2d - EAT_LINE2D, - - // line 3d - EAT_LINE3D, - - // array of stringws attribute - EAT_STRINGWARRAY, - - // array of float - EAT_FLOATARRAY, - - // array of int - EAT_INTARRAY, - - // binary data attribute - EAT_BINARY, - - // texture reference attribute - EAT_TEXTURE, - - // user pointer void* - EAT_USER_POINTER, - - // dimension attribute - EAT_DIMENSION2D, - - // known attribute type count - EAT_COUNT, - - // unknown attribute - EAT_UNKNOWN -}; - -} // end namespace io -} // end namespace irr - -#endif diff --git a/builddir/irrlicht-1.8.1/include/ECullingTypes.h b/builddir/irrlicht-1.8.1/include/ECullingTypes.h deleted file mode 100644 index 7178c05..0000000 --- a/builddir/irrlicht-1.8.1/include/ECullingTypes.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __E_CULLING_TYPES_H_INCLUDED__ -#define __E_CULLING_TYPES_H_INCLUDED__ - -#include "irrTypes.h" - -namespace irr -{ -namespace scene -{ - - //! An enumeration for all types of automatic culling for built-in scene nodes - enum E_CULLING_TYPE - { - EAC_OFF = 0, - EAC_BOX = 1, - EAC_FRUSTUM_BOX = 2, - EAC_FRUSTUM_SPHERE = 4, - EAC_OCC_QUERY = 8 - }; - - //! Names for culling type - const c8* const AutomaticCullingNames[] = - { - "false", - "box", // camera box against node box - "frustum_box", // camera frustum against node box - "frustum_sphere", // camera frustum against node sphere - "occ_query", // occlusion query - 0 - }; - -} // end namespace scene -} // end namespace irr - - -#endif // __E_CULLING_TYPES_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/EDebugSceneTypes.h b/builddir/irrlicht-1.8.1/include/EDebugSceneTypes.h deleted file mode 100644 index 64ebcaa..0000000 --- a/builddir/irrlicht-1.8.1/include/EDebugSceneTypes.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __E_DEBUG_SCENE_TYPES_H_INCLUDED__ -#define __E_DEBUG_SCENE_TYPES_H_INCLUDED__ - -namespace irr -{ -namespace scene -{ - - //! An enumeration for all types of debug data for built-in scene nodes (flags) - enum E_DEBUG_SCENE_TYPE - { - //! No Debug Data ( Default ) - EDS_OFF = 0, - - //! Show Bounding Boxes of SceneNode - EDS_BBOX = 1, - - //! Show Vertex Normals - EDS_NORMALS = 2, - - //! Shows Skeleton/Tags - EDS_SKELETON = 4, - - //! Overlays Mesh Wireframe - EDS_MESH_WIRE_OVERLAY = 8, - - //! Temporary use transparency Material Type - EDS_HALF_TRANSPARENCY = 16, - - //! Show Bounding Boxes of all MeshBuffers - EDS_BBOX_BUFFERS = 32, - - //! EDS_BBOX | EDS_BBOX_BUFFERS - EDS_BBOX_ALL = EDS_BBOX | EDS_BBOX_BUFFERS, - - //! Show all debug infos - EDS_FULL = 0xffffffff - }; - - -} // end namespace scene -} // end namespace irr - - -#endif // __E_DEBUG_SCENE_TYPES_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/EDeviceTypes.h b/builddir/irrlicht-1.8.1/include/EDeviceTypes.h deleted file mode 100644 index d7e9627..0000000 --- a/builddir/irrlicht-1.8.1/include/EDeviceTypes.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __E_DEVICE_TYPES_H_INCLUDED__ -#define __E_DEVICE_TYPES_H_INCLUDED__ - -namespace irr -{ - - //! An enum for the different device types supported by the Irrlicht Engine. - enum E_DEVICE_TYPE - { - - //! A device native to Microsoft Windows - /** This device uses the Win32 API and works in all versions of Windows. */ - EIDT_WIN32, - - //! A device native to Windows CE devices - /** This device works on Windows Mobile, Pocket PC and Microsoft SmartPhone devices */ - EIDT_WINCE, - - //! A device native to Unix style operating systems. - /** This device uses the X11 windowing system and works in Linux, Solaris, FreeBSD, OSX and - other operating systems which support X11. */ - EIDT_X11, - - //! A device native to Mac OSX - /** This device uses Apple's Cocoa API and works in Mac OSX 10.2 and above. */ - EIDT_OSX, - - //! A device which uses Simple DirectMedia Layer - /** The SDL device works under all platforms supported by SDL but first must be compiled - in by defining the IRR_USE_SDL_DEVICE macro in IrrCompileConfig.h */ - EIDT_SDL, - - //! A device for raw framebuffer access - /** Best used with embedded devices and mobile systems. - Does not need X11 or other graphical subsystems. - May support hw-acceleration via OpenGL-ES for FBDirect */ - EIDT_FRAMEBUFFER, - - //! A simple text only device supported by all platforms. - /** This device allows applications to run from the command line without opening a window. - It can render the output of the software drivers to the console as ASCII. It only supports - mouse and keyboard in Windows operating systems. */ - EIDT_CONSOLE, - - //! This selection allows Irrlicht to choose the best device from the ones available. - /** If this selection is chosen then Irrlicht will try to use the IrrlichtDevice native - to your operating system. If this is unavailable then the X11, SDL and then console device - will be tried. This ensures that Irrlicht will run even if your platform is unsupported, - although it may not be able to render anything. */ - EIDT_BEST - }; - -} // end namespace irr - -#endif // __E_DEVICE_TYPES_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/EDriverFeatures.h b/builddir/irrlicht-1.8.1/include/EDriverFeatures.h deleted file mode 100644 index 931314e..0000000 --- a/builddir/irrlicht-1.8.1/include/EDriverFeatures.h +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __E_DRIVER_FEATURES_H_INCLUDED__ -#define __E_DRIVER_FEATURES_H_INCLUDED__ - -namespace irr -{ -namespace video -{ - - //! enumeration for querying features of the video driver. - enum E_VIDEO_DRIVER_FEATURE - { - //! Is driver able to render to a surface? - EVDF_RENDER_TO_TARGET = 0, - - //! Is hardeware transform and lighting supported? - EVDF_HARDWARE_TL, - - //! Are multiple textures per material possible? - EVDF_MULTITEXTURE, - - //! Is driver able to render with a bilinear filter applied? - EVDF_BILINEAR_FILTER, - - //! Can the driver handle mip maps? - EVDF_MIP_MAP, - - //! Can the driver update mip maps automatically? - EVDF_MIP_MAP_AUTO_UPDATE, - - //! Are stencilbuffers switched on and does the device support stencil buffers? - EVDF_STENCIL_BUFFER, - - //! Is Vertex Shader 1.1 supported? - EVDF_VERTEX_SHADER_1_1, - - //! Is Vertex Shader 2.0 supported? - EVDF_VERTEX_SHADER_2_0, - - //! Is Vertex Shader 3.0 supported? - EVDF_VERTEX_SHADER_3_0, - - //! Is Pixel Shader 1.1 supported? - EVDF_PIXEL_SHADER_1_1, - - //! Is Pixel Shader 1.2 supported? - EVDF_PIXEL_SHADER_1_2, - - //! Is Pixel Shader 1.3 supported? - EVDF_PIXEL_SHADER_1_3, - - //! Is Pixel Shader 1.4 supported? - EVDF_PIXEL_SHADER_1_4, - - //! Is Pixel Shader 2.0 supported? - EVDF_PIXEL_SHADER_2_0, - - //! Is Pixel Shader 3.0 supported? - EVDF_PIXEL_SHADER_3_0, - - //! Are ARB vertex programs v1.0 supported? - EVDF_ARB_VERTEX_PROGRAM_1, - - //! Are ARB fragment programs v1.0 supported? - EVDF_ARB_FRAGMENT_PROGRAM_1, - - //! Is GLSL supported? - EVDF_ARB_GLSL, - - //! Is HLSL supported? - EVDF_HLSL, - - //! Are non-square textures supported? - EVDF_TEXTURE_NSQUARE, - - //! Are non-power-of-two textures supported? - EVDF_TEXTURE_NPOT, - - //! Are framebuffer objects supported? - EVDF_FRAMEBUFFER_OBJECT, - - //! Are vertex buffer objects supported? - EVDF_VERTEX_BUFFER_OBJECT, - - //! Supports Alpha To Coverage - EVDF_ALPHA_TO_COVERAGE, - - //! Supports Color masks (disabling color planes in output) - EVDF_COLOR_MASK, - - //! Supports multiple render targets at once - EVDF_MULTIPLE_RENDER_TARGETS, - - //! Supports separate blend settings for multiple render targets - EVDF_MRT_BLEND, - - //! Supports separate color masks for multiple render targets - EVDF_MRT_COLOR_MASK, - - //! Supports separate blend functions for multiple render targets - EVDF_MRT_BLEND_FUNC, - - //! Supports geometry shaders - EVDF_GEOMETRY_SHADER, - - //! Supports occlusion queries - EVDF_OCCLUSION_QUERY, - - //! Supports polygon offset/depth bias for avoiding z-fighting - EVDF_POLYGON_OFFSET, - - //! Support for different blend functions. Without, only ADD is available - EVDF_BLEND_OPERATIONS, - - //! Support for texture coord transformation via texture matrix - EVDF_TEXTURE_MATRIX, - - //! Support for NVidia's CG shader language - EVDF_CG, - - //! Only used for counting the elements of this enum - EVDF_COUNT - }; - -} // end namespace video -} // end namespace irr - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/EDriverTypes.h b/builddir/irrlicht-1.8.1/include/EDriverTypes.h deleted file mode 100644 index 609e261..0000000 --- a/builddir/irrlicht-1.8.1/include/EDriverTypes.h +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __E_DRIVER_TYPES_H_INCLUDED__ -#define __E_DRIVER_TYPES_H_INCLUDED__ - -namespace irr -{ -namespace video -{ - - //! An enum for all types of drivers the Irrlicht Engine supports. - enum E_DRIVER_TYPE - { - //! Null driver, useful for applications to run the engine without visualisation. - /** The null device is able to load textures, but does not - render and display any graphics. */ - EDT_NULL, - - //! The Irrlicht Engine Software renderer. - /** Runs on all platforms, with every hardware. It should only - be used for 2d graphics, but it can also perform some primitive - 3d functions. These 3d drawing functions are quite fast, but - very inaccurate, and don't even support clipping in 3D mode. */ - EDT_SOFTWARE, - - //! The Burning's Software Renderer, an alternative software renderer - /** Basically it can be described as the Irrlicht Software - renderer on steroids. It rasterizes 3D geometry perfectly: It - is able to perform correct 3d clipping, perspective correct - texture mapping, perspective correct color mapping, and renders - sub pixel correct, sub texel correct primitives. In addition, - it does bilinear texel filtering and supports more materials - than the EDT_SOFTWARE driver. This renderer has been written - entirely by Thomas Alten, thanks a lot for this huge - contribution. */ - EDT_BURNINGSVIDEO, - - //! Direct3D8 device, only available on Win32 platforms. - /** Performs hardware accelerated rendering of 3D and 2D - primitives. */ - EDT_DIRECT3D8, - - //! Direct3D 9 device, only available on Win32 platforms. - /** Performs hardware accelerated rendering of 3D and 2D - primitives. */ - EDT_DIRECT3D9, - - //! OpenGL device, available on most platforms. - /** Performs hardware accelerated rendering of 3D and 2D - primitives. */ - EDT_OPENGL, - - //! No driver, just for counting the elements - EDT_COUNT - }; - -} // end namespace video -} // end namespace irr - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/EGUIAlignment.h b/builddir/irrlicht-1.8.1/include/EGUIAlignment.h deleted file mode 100644 index d4caeea..0000000 --- a/builddir/irrlicht-1.8.1/include/EGUIAlignment.h +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __E_GUI_ALIGNMENT_H_INCLUDED__ -#define __E_GUI_ALIGNMENT_H_INCLUDED__ - -namespace irr -{ -namespace gui -{ -enum EGUI_ALIGNMENT -{ - //! Aligned to parent's top or left side (default) - EGUIA_UPPERLEFT=0, - //! Aligned to parent's bottom or right side - EGUIA_LOWERRIGHT, - //! Aligned to the center of parent - EGUIA_CENTER, - //! Stretched to fit parent - EGUIA_SCALE -}; - -//! Names for alignments -const c8* const GUIAlignmentNames[] = -{ - "upperLeft", - "lowerRight", - "center", - "scale", - 0 -}; - -} // namespace gui -} // namespace irr - -#endif // __E_GUI_ALIGNMENT_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/EGUIElementTypes.h b/builddir/irrlicht-1.8.1/include/EGUIElementTypes.h deleted file mode 100644 index aace9e1..0000000 --- a/builddir/irrlicht-1.8.1/include/EGUIElementTypes.h +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __E_GUI_ELEMENT_TYPES_H_INCLUDED__ -#define __E_GUI_ELEMENT_TYPES_H_INCLUDED__ - -#include "irrTypes.h" - -namespace irr -{ -namespace gui -{ - -//! List of all basic Irrlicht GUI elements. -/** An IGUIElement returns this when calling IGUIElement::getType(); */ -enum EGUI_ELEMENT_TYPE -{ - //! A button (IGUIButton) - EGUIET_BUTTON = 0, - - //! A check box (IGUICheckBox) - EGUIET_CHECK_BOX, - - //! A combo box (IGUIComboBox) - EGUIET_COMBO_BOX, - - //! A context menu (IGUIContextMenu) - EGUIET_CONTEXT_MENU, - - //! A menu (IGUIMenu) - EGUIET_MENU, - - //! An edit box (IGUIEditBox) - EGUIET_EDIT_BOX, - - //! A file open dialog (IGUIFileOpenDialog) - EGUIET_FILE_OPEN_DIALOG, - - //! A color select open dialog (IGUIColorSelectDialog) - EGUIET_COLOR_SELECT_DIALOG, - - //! A in/out fader (IGUIInOutFader) - EGUIET_IN_OUT_FADER, - - //! An image (IGUIImage) - EGUIET_IMAGE, - - //! A list box (IGUIListBox) - EGUIET_LIST_BOX, - - //! A mesh viewer (IGUIMeshViewer) - EGUIET_MESH_VIEWER, - - //! A message box (IGUIWindow) - EGUIET_MESSAGE_BOX, - - //! A modal screen - EGUIET_MODAL_SCREEN, - - //! A scroll bar (IGUIScrollBar) - EGUIET_SCROLL_BAR, - - //! A spin box (IGUISpinBox) - EGUIET_SPIN_BOX, - - //! A static text (IGUIStaticText) - EGUIET_STATIC_TEXT, - - //! A tab (IGUITab) - EGUIET_TAB, - - //! A tab control - EGUIET_TAB_CONTROL, - - //! A Table - EGUIET_TABLE, - - //! A tool bar (IGUIToolBar) - EGUIET_TOOL_BAR, - - //! A Tree View - EGUIET_TREE_VIEW, - - //! A window - EGUIET_WINDOW, - - //! Unknown type. - EGUIET_ELEMENT, - - //! The root of the GUI - EGUIET_ROOT, - - //! Not an element, amount of elements in there - EGUIET_COUNT, - - //! This enum is never used, it only forces the compiler to compile this enumeration to 32 bit. - EGUIET_FORCE_32_BIT = 0x7fffffff - -}; - -//! Names for built-in element types -const c8* const GUIElementTypeNames[] = -{ - "button", - "checkBox", - "comboBox", - "contextMenu", - "menu", - "editBox", - "fileOpenDialog", - "colorSelectDialog", - "inOutFader", - "image", - "listBox", - "meshViewer", - "messageBox", - "modalScreen", - "scrollBar", - "spinBox", - "staticText", - "tab", - "tabControl", - "table", - "toolBar", - "treeview", - "window", - "element", - "root", - 0 -}; - -} // end namespace gui -} // end namespace irr - -#endif - - - - diff --git a/builddir/irrlicht-1.8.1/include/EHardwareBufferFlags.h b/builddir/irrlicht-1.8.1/include/EHardwareBufferFlags.h deleted file mode 100644 index 27d5610..0000000 --- a/builddir/irrlicht-1.8.1/include/EHardwareBufferFlags.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __E_HARDWARE_BUFFER_FLAGS_INCLUDED__ -#define __E_HARDWARE_BUFFER_FLAGS_INCLUDED__ - -namespace irr -{ -namespace scene -{ - - enum E_HARDWARE_MAPPING - { - //! Don't store on the hardware - EHM_NEVER=0, - - //! Rarely changed, usually stored completely on the hardware - EHM_STATIC, - - //! Sometimes changed, driver optimized placement - EHM_DYNAMIC, - - //! Always changed, cache optimizing on the GPU - EHM_STREAM - }; - - enum E_BUFFER_TYPE - { - //! Does not change anything - EBT_NONE=0, - //! Change the vertex mapping - EBT_VERTEX, - //! Change the index mapping - EBT_INDEX, - //! Change both vertex and index mapping to the same value - EBT_VERTEX_AND_INDEX - }; - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/EMaterialFlags.h b/builddir/irrlicht-1.8.1/include/EMaterialFlags.h deleted file mode 100644 index e336adc..0000000 --- a/builddir/irrlicht-1.8.1/include/EMaterialFlags.h +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __E_MATERIAL_FLAGS_H_INCLUDED__ -#define __E_MATERIAL_FLAGS_H_INCLUDED__ - -namespace irr -{ -namespace video -{ - - //! Material flags - enum E_MATERIAL_FLAG - { - //! Draw as wireframe or filled triangles? Default: false - EMF_WIREFRAME = 0x1, - - //! Draw as point cloud or filled triangles? Default: false - EMF_POINTCLOUD = 0x2, - - //! Flat or Gouraud shading? Default: true - EMF_GOURAUD_SHADING = 0x4, - - //! Will this material be lighted? Default: true - EMF_LIGHTING = 0x8, - - //! Is the ZBuffer enabled? Default: true - EMF_ZBUFFER = 0x10, - - //! May be written to the zbuffer or is it readonly. Default: true - /** This flag is ignored, if the material type is a transparent type. */ - EMF_ZWRITE_ENABLE = 0x20, - - //! Is backface culling enabled? Default: true - EMF_BACK_FACE_CULLING = 0x40, - - //! Is frontface culling enabled? Default: false - /** Overrides EMF_BACK_FACE_CULLING if both are enabled. */ - EMF_FRONT_FACE_CULLING = 0x80, - - //! Is bilinear filtering enabled? Default: true - EMF_BILINEAR_FILTER = 0x100, - - //! Is trilinear filtering enabled? Default: false - /** If the trilinear filter flag is enabled, - the bilinear filtering flag is ignored. */ - EMF_TRILINEAR_FILTER = 0x200, - - //! Is anisotropic filtering? Default: false - /** In Irrlicht you can use anisotropic texture filtering in - conjunction with bilinear or trilinear texture filtering - to improve rendering results. Primitives will look less - blurry with this flag switched on. */ - EMF_ANISOTROPIC_FILTER = 0x400, - - //! Is fog enabled? Default: false - EMF_FOG_ENABLE = 0x800, - - //! Normalizes normals. Default: false - /** You can enable this if you need to scale a dynamic lighted - model. Usually, its normals will get scaled too then and it - will get darker. If you enable the EMF_NORMALIZE_NORMALS flag, - the normals will be normalized again, and the model will look - as bright as it should. */ - EMF_NORMALIZE_NORMALS = 0x1000, - - //! Access to all layers texture wrap settings. Overwrites separate layer settings. - EMF_TEXTURE_WRAP = 0x2000, - - //! AntiAliasing mode - EMF_ANTI_ALIASING = 0x4000, - - //! ColorMask bits, for enabling the color planes - EMF_COLOR_MASK = 0x8000, - - //! ColorMaterial enum for vertex color interpretation - EMF_COLOR_MATERIAL = 0x10000, - - //! Flag for enabling/disabling mipmap usage - EMF_USE_MIP_MAPS = 0x20000, - - //! Flag for blend operation - EMF_BLEND_OPERATION = 0x40000, - - //! Flag for polygon offset - EMF_POLYGON_OFFSET = 0x80000 - }; - -} // end namespace video -} // end namespace irr - - -#endif // __E_MATERIAL_FLAGS_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/EMaterialTypes.h b/builddir/irrlicht-1.8.1/include/EMaterialTypes.h deleted file mode 100644 index 5e5e075..0000000 --- a/builddir/irrlicht-1.8.1/include/EMaterialTypes.h +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __E_MATERIAL_TYPES_H_INCLUDED__ -#define __E_MATERIAL_TYPES_H_INCLUDED__ - -namespace irr -{ -namespace video -{ - - //! Abstracted and easy to use fixed function/programmable pipeline material modes. - enum E_MATERIAL_TYPE - { - //! Standard solid material. - /** Only first texture is used, which is supposed to be the - diffuse material. */ - EMT_SOLID = 0, - - //! Solid material with 2 texture layers. - /** The second is blended onto the first using the alpha value - of the vertex colors. This material is currently not implemented in OpenGL. - */ - EMT_SOLID_2_LAYER, - - //! Material type with standard lightmap technique - /** There should be 2 textures: The first texture layer is a - diffuse map, the second is a light map. Dynamic light is - ignored. */ - EMT_LIGHTMAP, - - //! Material type with lightmap technique like EMT_LIGHTMAP. - /** But lightmap and diffuse texture are added instead of modulated. */ - EMT_LIGHTMAP_ADD, - - //! Material type with standard lightmap technique - /** There should be 2 textures: The first texture layer is a - diffuse map, the second is a light map. Dynamic light is - ignored. The texture colors are effectively multiplied by 2 - for brightening. Like known in DirectX as D3DTOP_MODULATE2X. */ - EMT_LIGHTMAP_M2, - - //! Material type with standard lightmap technique - /** There should be 2 textures: The first texture layer is a - diffuse map, the second is a light map. Dynamic light is - ignored. The texture colors are effectively multiplyied by 4 - for brightening. Like known in DirectX as D3DTOP_MODULATE4X. */ - EMT_LIGHTMAP_M4, - - //! Like EMT_LIGHTMAP, but also supports dynamic lighting. - EMT_LIGHTMAP_LIGHTING, - - //! Like EMT_LIGHTMAP_M2, but also supports dynamic lighting. - EMT_LIGHTMAP_LIGHTING_M2, - - //! Like EMT_LIGHTMAP_4, but also supports dynamic lighting. - EMT_LIGHTMAP_LIGHTING_M4, - - //! Detail mapped material. - /** The first texture is diffuse color map, the second is added - to this and usually displayed with a bigger scale value so that - it adds more detail. The detail map is added to the diffuse map - using ADD_SIGNED, so that it is possible to add and substract - color from the diffuse map. For example a value of - (127,127,127) will not change the appearance of the diffuse map - at all. Often used for terrain rendering. */ - EMT_DETAIL_MAP, - - //! Look like a reflection of the environment around it. - /** To make this possible, a texture called 'sphere map' is - used, which must be set as the first texture. */ - EMT_SPHERE_MAP, - - //! A reflecting material with an optional non reflecting texture layer. - /** The reflection map should be set as first texture. */ - EMT_REFLECTION_2_LAYER, - - //! A transparent material. - /** Only the first texture is used. The new color is calculated - by simply adding the source color and the dest color. This - means if for example a billboard using a texture with black - background and a red circle on it is drawn with this material, - the result is that only the red circle will be drawn a little - bit transparent, and everything which was black is 100% - transparent and not visible. This material type is useful for - particle effects. */ - EMT_TRANSPARENT_ADD_COLOR, - - //! Makes the material transparent based on the texture alpha channel. - /** The final color is blended together from the destination - color and the texture color, using the alpha channel value as - blend factor. Only first texture is used. If you are using - this material with small textures, it is a good idea to load - the texture in 32 bit mode - (video::IVideoDriver::setTextureCreationFlag()). Also, an alpha - ref is used, which can be manipulated using - SMaterial::MaterialTypeParam. This value controls how sharp the - edges become when going from a transparent to a solid spot on - the texture. */ - EMT_TRANSPARENT_ALPHA_CHANNEL, - - //! Makes the material transparent based on the texture alpha channel. - /** If the alpha channel value is greater than 127, a - pixel is written to the target, otherwise not. This - material does not use alpha blending and is a lot faster - than EMT_TRANSPARENT_ALPHA_CHANNEL. It is ideal for drawing - stuff like leafes of plants, because the borders are not - blurry but sharp. Only first texture is used. If you are - using this material with small textures and 3d object, it - is a good idea to load the texture in 32 bit mode - (video::IVideoDriver::setTextureCreationFlag()). */ - EMT_TRANSPARENT_ALPHA_CHANNEL_REF, - - //! Makes the material transparent based on the vertex alpha value. - EMT_TRANSPARENT_VERTEX_ALPHA, - - //! A transparent reflecting material with an optional additional non reflecting texture layer. - /** The reflection map should be set as first texture. The - transparency depends on the alpha value in the vertex colors. A - texture which will not reflect can be set as second texture. - Please note that this material type is currently not 100% - implemented in OpenGL. */ - EMT_TRANSPARENT_REFLECTION_2_LAYER, - - //! A solid normal map renderer. - /** First texture is the color map, the second should be the - normal map. Note that you should use this material only when - drawing geometry consisting of vertices of type - S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into - this format using IMeshManipulator::createMeshWithTangents() - (See SpecialFX2 Tutorial). This shader runs on vertex shader - 1.1 and pixel shader 1.1 capable hardware and falls back to a - fixed function lighted material if this hardware is not - available. Only two lights are supported by this shader, if - there are more, the nearest two are chosen. */ - EMT_NORMAL_MAP_SOLID, - - //! A transparent normal map renderer. - /** First texture is the color map, the second should be the - normal map. Note that you should use this material only when - drawing geometry consisting of vertices of type - S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into - this format using IMeshManipulator::createMeshWithTangents() - (See SpecialFX2 Tutorial). This shader runs on vertex shader - 1.1 and pixel shader 1.1 capable hardware and falls back to a - fixed function lighted material if this hardware is not - available. Only two lights are supported by this shader, if - there are more, the nearest two are chosen. */ - EMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR, - - //! A transparent (based on the vertex alpha value) normal map renderer. - /** First texture is the color map, the second should be the - normal map. Note that you should use this material only when - drawing geometry consisting of vertices of type - S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into - this format using IMeshManipulator::createMeshWithTangents() - (See SpecialFX2 Tutorial). This shader runs on vertex shader - 1.1 and pixel shader 1.1 capable hardware and falls back to a - fixed function lighted material if this hardware is not - available. Only two lights are supported by this shader, if - there are more, the nearest two are chosen. */ - EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA, - - //! Just like EMT_NORMAL_MAP_SOLID, but uses parallax mapping. - /** Looks a lot more realistic. This only works when the - hardware supports at least vertex shader 1.1 and pixel shader - 1.4. First texture is the color map, the second should be the - normal map. The normal map texture should contain the height - value in the alpha component. The - IVideoDriver::makeNormalMapTexture() method writes this value - automatically when creating normal maps from a heightmap when - using a 32 bit texture. The height scale of the material - (affecting the bumpiness) is being controlled by the - SMaterial::MaterialTypeParam member. If set to zero, the - default value (0.02f) will be applied. Otherwise the value set - in SMaterial::MaterialTypeParam is taken. This value depends on - with which scale the texture is mapped on the material. Too - high or low values of MaterialTypeParam can result in strange - artifacts. */ - EMT_PARALLAX_MAP_SOLID, - - //! A material like EMT_PARALLAX_MAP_SOLID, but transparent. - /** Using EMT_TRANSPARENT_ADD_COLOR as base material. */ - EMT_PARALLAX_MAP_TRANSPARENT_ADD_COLOR, - - //! A material like EMT_PARALLAX_MAP_SOLID, but transparent. - /** Using EMT_TRANSPARENT_VERTEX_ALPHA as base material. */ - EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA, - - //! BlendFunc = source * sourceFactor + dest * destFactor ( E_BLEND_FUNC ) - /** Using only first texture. Generic blending method. */ - EMT_ONETEXTURE_BLEND, - - //! This value is not used. It only forces this enumeration to compile to 32 bit. - EMT_FORCE_32BIT = 0x7fffffff - }; - - //! Array holding the built in material type names - const char* const sBuiltInMaterialTypeNames[] = - { - "solid", - "solid_2layer", - "lightmap", - "lightmap_add", - "lightmap_m2", - "lightmap_m4", - "lightmap_light", - "lightmap_light_m2", - "lightmap_light_m4", - "detail_map", - "sphere_map", - "reflection_2layer", - "trans_add", - "trans_alphach", - "trans_alphach_ref", - "trans_vertex_alpha", - "trans_reflection_2layer", - "normalmap_solid", - "normalmap_trans_add", - "normalmap_trans_vertexalpha", - "parallaxmap_solid", - "parallaxmap_trans_add", - "parallaxmap_trans_vertexalpha", - "onetexture_blend", - 0 - }; - -} // end namespace video -} // end namespace irr - - -#endif // __E_MATERIAL_TYPES_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/EMeshWriterEnums.h b/builddir/irrlicht-1.8.1/include/EMeshWriterEnums.h deleted file mode 100644 index ceeaa7a..0000000 --- a/builddir/irrlicht-1.8.1/include/EMeshWriterEnums.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __E_MESH_WRITER_ENUMS_H_INCLUDED__ -#define __E_MESH_WRITER_ENUMS_H_INCLUDED__ - -#include "irrTypes.h" - -namespace irr -{ -namespace scene -{ - - //! An enumeration for all supported types of built-in mesh writers - /** A scene mesh writers is represented by a four character code - such as 'irrm' or 'coll' instead of simple numbers, to avoid - name clashes with external mesh writers.*/ - enum EMESH_WRITER_TYPE - { - //! Irrlicht native mesh writer, for static .irrmesh files. - EMWT_IRR_MESH = MAKE_IRR_ID('i','r','r','m'), - - //! COLLADA mesh writer for .dae and .xml files - EMWT_COLLADA = MAKE_IRR_ID('c','o','l','l'), - - //! STL mesh writer for .stl files - EMWT_STL = MAKE_IRR_ID('s','t','l',0), - - //! OBJ mesh writer for .obj files - EMWT_OBJ = MAKE_IRR_ID('o','b','j',0), - - //! PLY mesh writer for .ply files - EMWT_PLY = MAKE_IRR_ID('p','l','y',0) - }; - - - //! flags configuring mesh writing - enum E_MESH_WRITER_FLAGS - { - //! no writer flags - EMWF_NONE = 0, - - //! write lightmap textures out if possible - EMWF_WRITE_LIGHTMAPS = 0x1, - - //! write in a way that consumes less disk space - EMWF_WRITE_COMPRESSED = 0x2, - - //! write in binary format rather than text - EMWF_WRITE_BINARY = 0x4 - }; - -} // end namespace scene -} // end namespace irr - - -#endif // __E_MESH_WRITER_ENUMS_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/EMessageBoxFlags.h b/builddir/irrlicht-1.8.1/include/EMessageBoxFlags.h deleted file mode 100644 index ed2d766..0000000 --- a/builddir/irrlicht-1.8.1/include/EMessageBoxFlags.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __E_MESSAGE_BOX_FLAGS_H_INCLUDED__ -#define __E_MESSAGE_BOX_FLAGS_H_INCLUDED__ - -namespace irr -{ -namespace gui -{ - -//! enumeration for message box layout flags -enum EMESSAGE_BOX_FLAG -{ - //! Flag for the ok button - EMBF_OK = 0x1, - - //! Flag for the cancel button - EMBF_CANCEL = 0x2, - - //! Flag for the yes button - EMBF_YES = 0x4, - - //! Flag for the no button - EMBF_NO = 0x8, - - //! This value is not used. It only forces this enumeration to compile in 32 bit. - EMBF_FORCE_32BIT = 0x7fffffff -}; - -} // namespace gui -} // namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/EPrimitiveTypes.h b/builddir/irrlicht-1.8.1/include/EPrimitiveTypes.h deleted file mode 100644 index 7c61d42..0000000 --- a/builddir/irrlicht-1.8.1/include/EPrimitiveTypes.h +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __E_PRIMITIVE_TYPES_H_INCLUDED__ -#define __E_PRIMITIVE_TYPES_H_INCLUDED__ - -namespace irr -{ -namespace scene -{ - - //! Enumeration for all primitive types there are. - enum E_PRIMITIVE_TYPE - { - //! All vertices are non-connected points. - EPT_POINTS=0, - - //! All vertices form a single connected line. - EPT_LINE_STRIP, - - //! Just as LINE_STRIP, but the last and the first vertex is also connected. - EPT_LINE_LOOP, - - //! Every two vertices are connected creating n/2 lines. - EPT_LINES, - - //! After the first two vertices each vertex defines a new triangle. - //! Always the two last and the new one form a new triangle. - EPT_TRIANGLE_STRIP, - - //! After the first two vertices each vertex defines a new triangle. - //! All around the common first vertex. - EPT_TRIANGLE_FAN, - - //! Explicitly set all vertices for each triangle. - EPT_TRIANGLES, - - //! After the first two vertices each further tw vetices create a quad with the preceding two. - EPT_QUAD_STRIP, - - //! Every four vertices create a quad. - EPT_QUADS, - - //! Just as LINE_LOOP, but filled. - EPT_POLYGON, - - //! The single vertices are expanded to quad billboards on the GPU. - EPT_POINT_SPRITES - }; - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/ESceneNodeAnimatorTypes.h b/builddir/irrlicht-1.8.1/include/ESceneNodeAnimatorTypes.h deleted file mode 100644 index 078739d..0000000 --- a/builddir/irrlicht-1.8.1/include/ESceneNodeAnimatorTypes.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __E_SCENE_NODE_ANIMATOR_TYPES_H_INCLUDED__ -#define __E_SCENE_NODE_ANIMATOR_TYPES_H_INCLUDED__ - -namespace irr -{ -namespace scene -{ - - //! An enumeration for all types of built-in scene node animators - enum ESCENE_NODE_ANIMATOR_TYPE - { - //! Fly circle scene node animator - ESNAT_FLY_CIRCLE = 0, - - //! Fly straight scene node animator - ESNAT_FLY_STRAIGHT, - - //! Follow spline scene node animator - ESNAT_FOLLOW_SPLINE, - - //! Rotation scene node animator - ESNAT_ROTATION, - - //! Texture scene node animator - ESNAT_TEXTURE, - - //! Deletion scene node animator - ESNAT_DELETION, - - //! Collision respose scene node animator - ESNAT_COLLISION_RESPONSE, - - //! FPS camera animator - ESNAT_CAMERA_FPS, - - //! Maya camera animator - ESNAT_CAMERA_MAYA, - - //! Amount of built-in scene node animators - ESNAT_COUNT, - - //! Unknown scene node animator - ESNAT_UNKNOWN, - - //! This enum is never used, it only forces the compiler to compile this enumeration to 32 bit. - ESNAT_FORCE_32_BIT = 0x7fffffff - }; - -} // end namespace scene -} // end namespace irr - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/ESceneNodeTypes.h b/builddir/irrlicht-1.8.1/include/ESceneNodeTypes.h deleted file mode 100644 index 3d43105..0000000 --- a/builddir/irrlicht-1.8.1/include/ESceneNodeTypes.h +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __E_SCENE_NODE_TYPES_H_INCLUDED__ -#define __E_SCENE_NODE_TYPES_H_INCLUDED__ - -#include "irrTypes.h" - -namespace irr -{ -namespace scene -{ - - //! An enumeration for all types of built-in scene nodes - /** A scene node type is represented by a four character code - such as 'cube' or 'mesh' instead of simple numbers, to avoid - name clashes with external scene nodes.*/ - enum ESCENE_NODE_TYPE - { - //! of type CSceneManager (note that ISceneManager is not(!) an ISceneNode) - ESNT_SCENE_MANAGER = MAKE_IRR_ID('s','m','n','g'), - - //! simple cube scene node - ESNT_CUBE = MAKE_IRR_ID('c','u','b','e'), - - //! Sphere scene node - ESNT_SPHERE = MAKE_IRR_ID('s','p','h','r'), - - //! Text Scene Node - ESNT_TEXT = MAKE_IRR_ID('t','e','x','t'), - - //! Water Surface Scene Node - ESNT_WATER_SURFACE = MAKE_IRR_ID('w','a','t','r'), - - //! Terrain Scene Node - ESNT_TERRAIN = MAKE_IRR_ID('t','e','r','r'), - - //! Sky Box Scene Node - ESNT_SKY_BOX = MAKE_IRR_ID('s','k','y','_'), - - //! Sky Dome Scene Node - ESNT_SKY_DOME = MAKE_IRR_ID('s','k','y','d'), - - //! Shadow Volume Scene Node - ESNT_SHADOW_VOLUME = MAKE_IRR_ID('s','h','d','w'), - - //! Octree Scene Node - ESNT_OCTREE = MAKE_IRR_ID('o','c','t','r'), - - //! Mesh Scene Node - ESNT_MESH = MAKE_IRR_ID('m','e','s','h'), - - //! Light Scene Node - ESNT_LIGHT = MAKE_IRR_ID('l','g','h','t'), - - //! Empty Scene Node - ESNT_EMPTY = MAKE_IRR_ID('e','m','t','y'), - - //! Dummy Transformation Scene Node - ESNT_DUMMY_TRANSFORMATION = MAKE_IRR_ID('d','m','m','y'), - - //! Camera Scene Node - ESNT_CAMERA = MAKE_IRR_ID('c','a','m','_'), - - //! Billboard Scene Node - ESNT_BILLBOARD = MAKE_IRR_ID('b','i','l','l'), - - //! Animated Mesh Scene Node - ESNT_ANIMATED_MESH = MAKE_IRR_ID('a','m','s','h'), - - //! Particle System Scene Node - ESNT_PARTICLE_SYSTEM = MAKE_IRR_ID('p','t','c','l'), - - //! Quake3 Shader Scene Node - ESNT_Q3SHADER_SCENE_NODE = MAKE_IRR_ID('q','3','s','h'), - - //! Quake3 Model Scene Node ( has tag to link to ) - ESNT_MD3_SCENE_NODE = MAKE_IRR_ID('m','d','3','_'), - - //! Volume Light Scene Node - ESNT_VOLUME_LIGHT = MAKE_IRR_ID('v','o','l','l'), - - //! Maya Camera Scene Node - /** Legacy, for loading version <= 1.4.x .irr files */ - ESNT_CAMERA_MAYA = MAKE_IRR_ID('c','a','m','M'), - - //! First Person Shooter Camera - /** Legacy, for loading version <= 1.4.x .irr files */ - ESNT_CAMERA_FPS = MAKE_IRR_ID('c','a','m','F'), - - //! Unknown scene node - ESNT_UNKNOWN = MAKE_IRR_ID('u','n','k','n'), - - //! Will match with any scene node when checking types - ESNT_ANY = MAKE_IRR_ID('a','n','y','_') - }; - - - -} // end namespace scene -} // end namespace irr - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/EShaderTypes.h b/builddir/irrlicht-1.8.1/include/EShaderTypes.h deleted file mode 100644 index 691930c..0000000 --- a/builddir/irrlicht-1.8.1/include/EShaderTypes.h +++ /dev/null @@ -1,90 +0,0 @@ -#ifndef __E_SHADER_TYPES_H_INCLUDED__ -#define __E_SHADER_TYPES_H_INCLUDED__ - -#include "irrTypes.h" - -namespace irr -{ -namespace video -{ - -//! Compile target enumeration for the addHighLevelShaderMaterial() method. -enum E_VERTEX_SHADER_TYPE -{ - EVST_VS_1_1 = 0, - EVST_VS_2_0, - EVST_VS_2_a, - EVST_VS_3_0, - EVST_VS_4_0, - EVST_VS_4_1, - EVST_VS_5_0, - - //! This is not a type, but a value indicating how much types there are. - EVST_COUNT -}; - -//! Names for all vertex shader types, each entry corresponds to a E_VERTEX_SHADER_TYPE entry. -const c8* const VERTEX_SHADER_TYPE_NAMES[] = { - "vs_1_1", - "vs_2_0", - "vs_2_a", - "vs_3_0", - "vs_4_0", - "vs_4_1", - "vs_5_0", - 0 }; - -//! Compile target enumeration for the addHighLevelShaderMaterial() method. -enum E_PIXEL_SHADER_TYPE -{ - EPST_PS_1_1 = 0, - EPST_PS_1_2, - EPST_PS_1_3, - EPST_PS_1_4, - EPST_PS_2_0, - EPST_PS_2_a, - EPST_PS_2_b, - EPST_PS_3_0, - EPST_PS_4_0, - EPST_PS_4_1, - EPST_PS_5_0, - - //! This is not a type, but a value indicating how much types there are. - EPST_COUNT -}; - -//! Names for all pixel shader types, each entry corresponds to a E_PIXEL_SHADER_TYPE entry. -const c8* const PIXEL_SHADER_TYPE_NAMES[] = { - "ps_1_1", - "ps_1_2", - "ps_1_3", - "ps_1_4", - "ps_2_0", - "ps_2_a", - "ps_2_b", - "ps_3_0", - "ps_4_0", - "ps_4_1", - "ps_5_0", - 0 }; - -//! Enum for supported geometry shader types -enum E_GEOMETRY_SHADER_TYPE -{ - EGST_GS_4_0 = 0, - - //! This is not a type, but a value indicating how much types there are. - EGST_COUNT -}; - -//! String names for supported geometry shader types -const c8* const GEOMETRY_SHADER_TYPE_NAMES[] = { - "gs_4_0", - 0 }; - - -} // end namespace video -} // end namespace irr - -#endif // __E_SHADER_TYPES_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/ETerrainElements.h b/builddir/irrlicht-1.8.1/include/ETerrainElements.h deleted file mode 100644 index b09ac39..0000000 --- a/builddir/irrlicht-1.8.1/include/ETerrainElements.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __E_TERRAIN_ELEMENTS_H__ -#define __E_TERRAIN_ELEMENTS_H__ - -namespace irr -{ -namespace scene -{ - - //! enumeration for patch sizes specifying the size of patches in the TerrainSceneNode - enum E_TERRAIN_PATCH_SIZE - { - //! patch size of 9, at most, use 4 levels of detail with this patch size. - ETPS_9 = 9, - - //! patch size of 17, at most, use 5 levels of detail with this patch size. - ETPS_17 = 17, - - //! patch size of 33, at most, use 6 levels of detail with this patch size. - ETPS_33 = 33, - - //! patch size of 65, at most, use 7 levels of detail with this patch size. - ETPS_65 = 65, - - //! patch size of 129, at most, use 8 levels of detail with this patch size. - ETPS_129 = 129 - }; - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IAnimatedMesh.h b/builddir/irrlicht-1.8.1/include/IAnimatedMesh.h deleted file mode 100644 index ec6eee0..0000000 --- a/builddir/irrlicht-1.8.1/include/IAnimatedMesh.h +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_ANIMATED_MESH_H_INCLUDED__ -#define __I_ANIMATED_MESH_H_INCLUDED__ - -#include "aabbox3d.h" -#include "IMesh.h" - -namespace irr -{ -namespace scene -{ - //! Possible types of (animated) meshes. - enum E_ANIMATED_MESH_TYPE - { - //! Unknown animated mesh type. - EAMT_UNKNOWN = 0, - - //! Quake 2 MD2 model file - EAMT_MD2, - - //! Quake 3 MD3 model file - EAMT_MD3, - - //! Maya .obj static model - EAMT_OBJ, - - //! Quake 3 .bsp static Map - EAMT_BSP, - - //! 3D Studio .3ds file - EAMT_3DS, - - //! My3D Mesh, the file format by Zhuck Dimitry - EAMT_MY3D, - - //! Pulsar LMTools .lmts file. This Irrlicht loader was written by Jonas Petersen - EAMT_LMTS, - - //! Cartography Shop .csm file. This loader was created by Saurav Mohapatra. - EAMT_CSM, - - //! .oct file for Paul Nette's FSRad or from Murphy McCauley's Blender .oct exporter. - /** The oct file format contains 3D geometry and lightmaps and - can be loaded directly by Irrlicht */ - EAMT_OCT, - - //! Halflife MDL model file - EAMT_MDL_HALFLIFE, - - //! generic skinned mesh - EAMT_SKINNED - }; - - //! Interface for an animated mesh. - /** There are already simple implementations of this interface available so - you don't have to implement this interface on your own if you need to: - You might want to use irr::scene::SAnimatedMesh, irr::scene::SMesh, - irr::scene::SMeshBuffer etc. */ - class IAnimatedMesh : public IMesh - { - public: - - //! Gets the frame count of the animated mesh. - /** \return The amount of frames. If the amount is 1, - it is a static, non animated mesh. */ - virtual u32 getFrameCount() const = 0; - - //! Gets the animation speed of the animated mesh. - /** \return The number of frames per second to play the - animation with by default. If the amount is 0, - it is a static, non animated mesh. */ - virtual f32 getAnimationSpeed() const = 0; - - //! Sets the animation speed of the animated mesh. - /** \param fps Number of frames per second to play the - animation with by default. If the amount is 0, - it is not animated. The actual speed is set in the - scene node the mesh is instantiated in.*/ - virtual void setAnimationSpeed(f32 fps) =0; - - //! Returns the IMesh interface for a frame. - /** \param frame: Frame number as zero based index. The maximum - frame number is getFrameCount() - 1; - \param detailLevel: Level of detail. 0 is the lowest, 255 the - highest level of detail. Most meshes will ignore the detail level. - \param startFrameLoop: Because some animated meshes (.MD2) are - blended between 2 static frames, and maybe animated in a loop, - the startFrameLoop and the endFrameLoop have to be defined, to - prevent the animation to be blended between frames which are - outside of this loop. - If startFrameLoop and endFrameLoop are both -1, they are ignored. - \param endFrameLoop: see startFrameLoop. - \return Returns the animated mesh based on a detail level. */ - virtual IMesh* getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1) = 0; - - //! Returns the type of the animated mesh. - /** In most cases it is not neccessary to use this method. - This is useful for making a safe downcast. For example, - if getMeshType() returns EAMT_MD2 it's safe to cast the - IAnimatedMesh to IAnimatedMeshMD2. - \returns Type of the mesh. */ - virtual E_ANIMATED_MESH_TYPE getMeshType() const - { - return EAMT_UNKNOWN; - } - }; - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IAnimatedMeshMD2.h b/builddir/irrlicht-1.8.1/include/IAnimatedMeshMD2.h deleted file mode 100644 index 333394e..0000000 --- a/builddir/irrlicht-1.8.1/include/IAnimatedMeshMD2.h +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_ANIMATED_MESH_MD2_H_INCLUDED__ -#define __I_ANIMATED_MESH_MD2_H_INCLUDED__ - -#include "IAnimatedMesh.h" - -namespace irr -{ -namespace scene -{ - - //! Types of standard md2 animations - enum EMD2_ANIMATION_TYPE - { - EMAT_STAND = 0, - EMAT_RUN, - EMAT_ATTACK, - EMAT_PAIN_A, - EMAT_PAIN_B, - EMAT_PAIN_C, - EMAT_JUMP, - EMAT_FLIP, - EMAT_SALUTE, - EMAT_FALLBACK, - EMAT_WAVE, - EMAT_POINT, - EMAT_CROUCH_STAND, - EMAT_CROUCH_WALK, - EMAT_CROUCH_ATTACK, - EMAT_CROUCH_PAIN, - EMAT_CROUCH_DEATH, - EMAT_DEATH_FALLBACK, - EMAT_DEATH_FALLFORWARD, - EMAT_DEATH_FALLBACKSLOW, - EMAT_BOOM, - - //! Not an animation, but amount of animation types. - EMAT_COUNT - }; - - //! Interface for using some special functions of MD2 meshes - class IAnimatedMeshMD2 : public IAnimatedMesh - { - public: - - //! Get frame loop data for a default MD2 animation type. - /** \param l The EMD2_ANIMATION_TYPE to get the frames for. - \param outBegin The returned beginning frame for animation type specified. - \param outEnd The returned ending frame for the animation type specified. - \param outFPS The number of frames per second, this animation should be played at. - \return beginframe, endframe and frames per second for a default MD2 animation type. */ - virtual void getFrameLoop(EMD2_ANIMATION_TYPE l, s32& outBegin, - s32& outEnd, s32& outFPS) const = 0; - - //! Get frame loop data for a special MD2 animation type, identified by name. - /** \param name Name of the animation. - \param outBegin The returned beginning frame for animation type specified. - \param outEnd The returned ending frame for the animation type specified. - \param outFPS The number of frames per second, this animation should be played at. - \return beginframe, endframe and frames per second for a special MD2 animation type. */ - virtual bool getFrameLoop(const c8* name, - s32& outBegin, s32& outEnd, s32& outFPS) const = 0; - - //! Get amount of md2 animations in this file. - virtual s32 getAnimationCount() const = 0; - - //! Get name of md2 animation. - /** \param nr: Zero based index of animation. */ - virtual const c8* getAnimationName(s32 nr) const = 0; - }; - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IAnimatedMeshMD3.h b/builddir/irrlicht-1.8.1/include/IAnimatedMeshMD3.h deleted file mode 100644 index 93b24c1..0000000 --- a/builddir/irrlicht-1.8.1/include/IAnimatedMeshMD3.h +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright (C) 2007-2012 Nikolaus Gebhardt / Thomas Alten -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_ANIMATED_MESH_MD3_H_INCLUDED__ -#define __I_ANIMATED_MESH_MD3_H_INCLUDED__ - -#include "IAnimatedMesh.h" -#include "IQ3Shader.h" -#include "quaternion.h" - -namespace irr -{ -namespace scene -{ - - enum eMD3Models - { - EMD3_HEAD = 0, - EMD3_UPPER, - EMD3_LOWER, - EMD3_WEAPON, - EMD3_NUMMODELS - }; - - //! Animation list - enum EMD3_ANIMATION_TYPE - { - // Animations for both lower and upper parts of the player - EMD3_BOTH_DEATH_1 = 0, - EMD3_BOTH_DEAD_1, - EMD3_BOTH_DEATH_2, - EMD3_BOTH_DEAD_2, - EMD3_BOTH_DEATH_3, - EMD3_BOTH_DEAD_3, - - // Animations for the upper part - EMD3_TORSO_GESTURE, - EMD3_TORSO_ATTACK_1, - EMD3_TORSO_ATTACK_2, - EMD3_TORSO_DROP, - EMD3_TORSO_RAISE, - EMD3_TORSO_STAND_1, - EMD3_TORSO_STAND_2, - - // Animations for the lower part - EMD3_LEGS_WALK_CROUCH, - EMD3_LEGS_WALK, - EMD3_LEGS_RUN, - EMD3_LEGS_BACK, - EMD3_LEGS_SWIM, - EMD3_LEGS_JUMP_1, - EMD3_LEGS_LAND_1, - EMD3_LEGS_JUMP_2, - EMD3_LEGS_LAND_2, - EMD3_LEGS_IDLE, - EMD3_LEGS_IDLE_CROUCH, - EMD3_LEGS_TURN, - - //! Not an animation, but amount of animation types. - EMD3_ANIMATION_COUNT - }; - - struct SMD3AnimationInfo - { - //! First frame - s32 first; - //! Last frame - s32 num; - //! Looping frames - s32 looping; - //! Frames per second - s32 fps; - }; - - -// byte-align structures -#include "irrpack.h" - - //! this holds the header info of the MD3 file - struct SMD3Header - { - c8 headerID[4]; //id of file, always "IDP3" - s32 Version; //this is a version number, always 15 - s8 fileName[68]; //sometimes left Blank... 65 chars, 32bit aligned == 68 chars - s32 numFrames; //number of KeyFrames - s32 numTags; //number of 'tags' per frame - s32 numMeshes; //number of meshes/skins - s32 numMaxSkins; //maximum number of unique skins used in md3 file. artefact md2 - s32 frameStart; //starting position of frame-structur - s32 tagStart; //starting position of tag-structures - s32 tagEnd; //ending position of tag-structures/starting position of mesh-structures - s32 fileSize; - } PACK_STRUCT; - - //! this holds the header info of an MD3 mesh section - struct SMD3MeshHeader - { - c8 meshID[4]; //id, must be IDP3 - c8 meshName[68]; //name of mesh 65 chars, 32 bit aligned == 68 chars - - s32 numFrames; //number of meshframes in mesh - s32 numShader; //number of skins in mesh - s32 numVertices; //number of vertices - s32 numTriangles; //number of Triangles - - s32 offset_triangles; //starting position of Triangle data, relative to start of Mesh_Header - s32 offset_shaders; //size of header - s32 offset_st; //starting position of texvector data, relative to start of Mesh_Header - s32 vertexStart; //starting position of vertex data,relative to start of Mesh_Header - s32 offset_end; - } PACK_STRUCT; - - - //! Compressed Vertex Data - struct SMD3Vertex - { - s16 position[3]; - u8 normal[2]; - } PACK_STRUCT; - - //! Texture Coordinate - struct SMD3TexCoord - { - f32 u; - f32 v; - } PACK_STRUCT; - - //! Triangle Index - struct SMD3Face - { - s32 Index[3]; - } PACK_STRUCT; - - -// Default alignment -#include "irrunpack.h" - - //! Holding Frame Data for a Mesh - struct SMD3MeshBuffer : public IReferenceCounted - { - SMD3MeshHeader MeshHeader; - - core::stringc Shader; - core::array < s32 > Indices; - core::array < SMD3Vertex > Vertices; - core::array < SMD3TexCoord > Tex; - }; - - //! hold a tag info for connecting meshes - /** Basically its an alternate way to describe a transformation. */ - struct SMD3QuaternionTag - { - virtual ~SMD3QuaternionTag() - { - position.X = 0.f; - } - - // construct copy constructor - SMD3QuaternionTag( const SMD3QuaternionTag & copyMe ) - { - *this = copyMe; - } - - // construct for searching - SMD3QuaternionTag( const core::stringc& name ) - : Name ( name ) {} - - // construct from a position and euler angles in degrees - SMD3QuaternionTag ( const core::vector3df &pos, const core::vector3df &angle ) - : position(pos), rotation(angle * core::DEGTORAD) {} - - // set to matrix - void setto ( core::matrix4 &m ) - { - rotation.getMatrix ( m, position ); - } - - bool operator == ( const SMD3QuaternionTag &other ) const - { - return Name == other.Name; - } - - SMD3QuaternionTag & operator=( const SMD3QuaternionTag & copyMe ) - { - Name = copyMe.Name; - position = copyMe.position; - rotation = copyMe.rotation; - return *this; - } - - core::stringc Name; - core::vector3df position; - core::quaternion rotation; - }; - - //! holds a associative list of named quaternions - struct SMD3QuaternionTagList - { - SMD3QuaternionTagList() - { - Container.setAllocStrategy(core::ALLOC_STRATEGY_SAFE); - } - - // construct copy constructor - SMD3QuaternionTagList(const SMD3QuaternionTagList& copyMe) - { - *this = copyMe; - } - - virtual ~SMD3QuaternionTagList() {} - - SMD3QuaternionTag* get(const core::stringc& name) - { - SMD3QuaternionTag search ( name ); - s32 index = Container.linear_search ( search ); - if ( index >= 0 ) - return &Container[index]; - return 0; - } - - u32 size () const - { - return Container.size(); - } - - void set_used(u32 new_size) - { - s32 diff = (s32) new_size - (s32) Container.allocated_size(); - if ( diff > 0 ) - { - SMD3QuaternionTag e(""); - for ( s32 i = 0; i < diff; ++i ) - Container.push_back(e); - } - } - - const SMD3QuaternionTag& operator[](u32 index) const - { - return Container[index]; - } - - SMD3QuaternionTag& operator[](u32 index) - { - return Container[index]; - } - - void push_back(const SMD3QuaternionTag& other) - { - Container.push_back(other); - } - - SMD3QuaternionTagList& operator = (const SMD3QuaternionTagList & copyMe) - { - Container = copyMe.Container; - return *this; - } - - private: - core::array < SMD3QuaternionTag > Container; - }; - - - //! Holding Frames Buffers and Tag Infos - struct SMD3Mesh: public IReferenceCounted - { - SMD3Mesh () - { - MD3Header.numFrames = 0; - } - - virtual ~SMD3Mesh() - { - for (u32 i=0; i<Buffer.size(); ++i) - Buffer[i]->drop(); - } - - core::stringc Name; - core::array<SMD3MeshBuffer*> Buffer; - SMD3QuaternionTagList TagList; - SMD3Header MD3Header; - }; - - - //! Interface for using some special functions of MD3 meshes - class IAnimatedMeshMD3 : public IAnimatedMesh - { - public: - - //! tune how many frames you want to render inbetween. - virtual void setInterpolationShift(u32 shift, u32 loopMode) =0; - - //! get the tag list of the mesh. - virtual SMD3QuaternionTagList* getTagList(s32 frame, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop) =0; - - //! get the original md3 mesh. - virtual SMD3Mesh* getOriginalMesh() =0; - }; - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IAnimatedMeshSceneNode.h b/builddir/irrlicht-1.8.1/include/IAnimatedMeshSceneNode.h deleted file mode 100644 index f34161e..0000000 --- a/builddir/irrlicht-1.8.1/include/IAnimatedMeshSceneNode.h +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__ -#define __I_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__ - -#include "ISceneNode.h" -#include "IBoneSceneNode.h" -#include "IAnimatedMeshMD2.h" -#include "IAnimatedMeshMD3.h" - -namespace irr -{ -namespace scene -{ - class IShadowVolumeSceneNode; - - enum E_JOINT_UPDATE_ON_RENDER - { - //! do nothing - EJUOR_NONE = 0, - - //! get joints positions from the mesh (for attached nodes, etc) - EJUOR_READ, - - //! control joint positions in the mesh (eg. ragdolls, or set the animation from animateJoints() ) - EJUOR_CONTROL - }; - - - class IAnimatedMeshSceneNode; - - //! Callback interface for catching events of ended animations. - /** Implement this interface and use - IAnimatedMeshSceneNode::setAnimationEndCallback to be able to - be notified if an animation playback has ended. - **/ - class IAnimationEndCallBack : public virtual IReferenceCounted - { - public: - - //! Will be called when the animation playback has ended. - /** See IAnimatedMeshSceneNode::setAnimationEndCallback for - more informations. - \param node: Node of which the animation has ended. */ - virtual void OnAnimationEnd(IAnimatedMeshSceneNode* node) = 0; - }; - - //! Scene node capable of displaying an animated mesh and its shadow. - /** The shadow is optional: If a shadow should be displayed too, just - invoke the IAnimatedMeshSceneNode::createShadowVolumeSceneNode().*/ - class IAnimatedMeshSceneNode : public ISceneNode - { - public: - - //! Constructor - IAnimatedMeshSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, - const core::vector3df& position = core::vector3df(0,0,0), - const core::vector3df& rotation = core::vector3df(0,0,0), - const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) - : ISceneNode(parent, mgr, id, position, rotation, scale) {} - - //! Destructor - virtual ~IAnimatedMeshSceneNode() {} - - //! Sets the current frame number. - /** From now on the animation is played from this frame. - \param frame: Number of the frame to let the animation be started from. - The frame number must be a valid frame number of the IMesh used by this - scene node. Set IAnimatedMesh::getMesh() for details. */ - virtual void setCurrentFrame(f32 frame) = 0; - - //! Sets the frame numbers between the animation is looped. - /** The default is 0 - MaximalFrameCount of the mesh. - \param begin: Start frame number of the loop. - \param end: End frame number of the loop. - \return True if successful, false if not. */ - virtual bool setFrameLoop(s32 begin, s32 end) = 0; - - //! Sets the speed with which the animation is played. - /** \param framesPerSecond: Frames per second played. */ - virtual void setAnimationSpeed(f32 framesPerSecond) = 0; - - //! Gets the speed with which the animation is played. - /** \return Frames per second played. */ - virtual f32 getAnimationSpeed() const =0; - - //! Creates shadow volume scene node as child of this node. - /** The shadow can be rendered using the ZPass or the zfail - method. ZPass is a little bit faster because the shadow volume - creation is easier, but with this method there occur ugly - looking artifacs when the camera is inside the shadow volume. - These error do not occur with the ZFail method. - \param shadowMesh: Optional custom mesh for shadow volume. - \param id: Id of the shadow scene node. This id can be used to - identify the node later. - \param zfailmethod: If set to true, the shadow will use the - zfail method, if not, zpass is used. - \param infinity: Value used by the shadow volume algorithm to - scale the shadow volume (for zfail shadow volume we support only - finite shadows, so camera zfar must be larger than shadow back cap, - which is depend on infinity parameter). - \return Pointer to the created shadow scene node. This pointer - should not be dropped. See IReferenceCounted::drop() for more - information. */ - virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh=0, - s32 id=-1, bool zfailmethod=true, f32 infinity=1000.0f) = 0; - - - //! Get a pointer to a joint in the mesh (if the mesh is a bone based mesh). - /** With this method it is possible to attach scene nodes to - joints for example possible to attach a weapon to the left hand - of an animated model. This example shows how: - \code - ISceneNode* hand = - yourAnimatedMeshSceneNode->getJointNode("LeftHand"); - hand->addChild(weaponSceneNode); - \endcode - Please note that the joint returned by this method may not exist - before this call and the joints in the node were created by it. - \param jointName: Name of the joint. - \return Pointer to the scene node which represents the joint - with the specified name. Returns 0 if the contained mesh is not - an skinned mesh or the name of the joint could not be found. */ - virtual IBoneSceneNode* getJointNode(const c8* jointName)=0; - - //! same as getJointNode(const c8* jointName), but based on id - virtual IBoneSceneNode* getJointNode(u32 jointID) = 0; - - //! Gets joint count. - /** \return Amount of joints in the mesh. */ - virtual u32 getJointCount() const = 0; - - //! Starts a default MD2 animation. - /** With this method it is easily possible to start a Run, - Attack, Die or whatever animation, if the mesh contained in - this scene node is an md2 mesh. Otherwise, nothing happens. - \param anim: An MD2 animation type, which should be played, for - example EMAT_STAND for the standing animation. - \return True if successful, and false if not, for example if - the mesh in the scene node is not a md2 mesh. */ - virtual bool setMD2Animation(EMD2_ANIMATION_TYPE anim) = 0; - - //! Starts a special MD2 animation. - /** With this method it is easily possible to start a Run, - Attack, Die or whatever animation, if the mesh contained in - this scene node is an md2 mesh. Otherwise, nothing happens. - This method uses a character string to identify the animation. - If the animation is a standard md2 animation, you might want to - start this animation with the EMD2_ANIMATION_TYPE enumeration - instead. - \param animationName: Name of the animation which should be - played. - \return Returns true if successful, and false if not, for - example if the mesh in the scene node is not an md2 mesh, or no - animation with this name could be found. */ - virtual bool setMD2Animation(const c8* animationName) = 0; - - //! Returns the currently displayed frame number. - virtual f32 getFrameNr() const = 0; - //! Returns the current start frame number. - virtual s32 getStartFrame() const = 0; - //! Returns the current end frame number. - virtual s32 getEndFrame() const = 0; - - //! Sets looping mode which is on by default. - /** If set to false, animations will not be played looped. */ - virtual void setLoopMode(bool playAnimationLooped) = 0; - - //! returns the current loop mode - /** When true the animations are played looped */ - virtual bool getLoopMode() const = 0; - - //! Sets a callback interface which will be called if an animation playback has ended. - /** Set this to 0 to disable the callback again. - Please note that this will only be called when in non looped - mode, see IAnimatedMeshSceneNode::setLoopMode(). */ - virtual void setAnimationEndCallback(IAnimationEndCallBack* callback=0) = 0; - - //! Sets if the scene node should not copy the materials of the mesh but use them in a read only style. - /** In this way it is possible to change the materials a mesh - causing all mesh scene nodes referencing this mesh to change - too. */ - virtual void setReadOnlyMaterials(bool readonly) = 0; - - //! Returns if the scene node should not copy the materials of the mesh but use them in a read only style - virtual bool isReadOnlyMaterials() const = 0; - - //! Sets a new mesh - virtual void setMesh(IAnimatedMesh* mesh) = 0; - - //! Returns the current mesh - virtual IAnimatedMesh* getMesh(void) = 0; - - //! Get the absolute transformation for a special MD3 Tag if the mesh is a md3 mesh, or the absolutetransformation if it's a normal scenenode - virtual const SMD3QuaternionTag* getMD3TagTransformation( const core::stringc & tagname) = 0; - - //! Set how the joints should be updated on render - virtual void setJointMode(E_JOINT_UPDATE_ON_RENDER mode)=0; - - //! Sets the transition time in seconds - /** Note: This needs to enable joints, and setJointmode set to - EJUOR_CONTROL. You must call animateJoints(), or the mesh will - not animate. */ - virtual void setTransitionTime(f32 Time) =0; - - //! animates the joints in the mesh based on the current frame. - /** Also takes in to account transitions. */ - virtual void animateJoints(bool CalculateAbsolutePositions=true) = 0; - - //! render mesh ignoring its transformation. - /** Culling is unaffected. */ - virtual void setRenderFromIdentity( bool On )=0; - - //! Creates a clone of this scene node and its children. - /** \param newParent An optional new parent. - \param newManager An optional new scene manager. - \return The newly created clone of this node. */ - virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0) = 0; - - }; - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IAttributeExchangingObject.h b/builddir/irrlicht-1.8.1/include/IAttributeExchangingObject.h deleted file mode 100644 index 9c64b7d..0000000 --- a/builddir/irrlicht-1.8.1/include/IAttributeExchangingObject.h +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_ATTRIBUTE_EXCHANGING_OBJECT_H_INCLUDED__ -#define __I_ATTRIBUTE_EXCHANGING_OBJECT_H_INCLUDED__ - -#include "IReferenceCounted.h" - - -namespace irr -{ - -namespace io -{ - -class IAttributes; - -//! Enumeration flags passed through SAttributeReadWriteOptions to the IAttributeExchangingObject object -enum E_ATTRIBUTE_READ_WRITE_FLAGS -{ - //! Serialization/Deserializion is done for an xml file - EARWF_FOR_FILE = 0x00000001, - - //! Serialization/Deserializion is done for an editor property box - EARWF_FOR_EDITOR = 0x00000002, - - //! When writing filenames, relative paths should be used - EARWF_USE_RELATIVE_PATHS = 0x00000004 -}; - - -//! struct holding data describing options -struct SAttributeReadWriteOptions -{ - //! Constructor - SAttributeReadWriteOptions() - : Flags(0), Filename(0) - { - } - - //! Combination of E_ATTRIBUTE_READ_WRITE_FLAGS or other, custom ones - s32 Flags; - - //! Optional filename - const fschar_t* Filename; -}; - - -//! An object which is able to serialize and deserialize its attributes into an attributes object -class IAttributeExchangingObject : virtual public IReferenceCounted -{ -public: - - //! Writes attributes of the object. - /** Implement this to expose the attributes of your scene node animator for - scripting languages, editors, debuggers or xml serialization purposes. */ - virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const {} - - //! Reads attributes of the object. - /** Implement this to set the attributes of your scene node animator for - scripting languages, editors, debuggers or xml deserialization purposes. */ - virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) {} - -}; - -} // end namespace io -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IAttributes.h b/builddir/irrlicht-1.8.1/include/IAttributes.h deleted file mode 100644 index bc77180..0000000 --- a/builddir/irrlicht-1.8.1/include/IAttributes.h +++ /dev/null @@ -1,738 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_ATTRIBUTES_H_INCLUDED__ -#define __I_ATTRIBUTES_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "SColor.h" -#include "vector3d.h" -#include "vector2d.h" -#include "line2d.h" -#include "line3d.h" -#include "triangle3d.h" -#include "position2d.h" -#include "rect.h" -#include "dimension2d.h" -#include "matrix4.h" -#include "quaternion.h" -#include "plane3d.h" -#include "triangle3d.h" -#include "line2d.h" -#include "line3d.h" -#include "irrString.h" -#include "irrArray.h" -#include "IXMLReader.h" -#include "EAttributes.h" -#include "path.h" - -namespace irr -{ -namespace video -{ - class ITexture; -} // end namespace video -namespace io -{ - class IXMLWriter; - -//! Provides a generic interface for attributes and their values and the possiblity to serialize them -class IAttributes : public virtual IReferenceCounted -{ -public: - - //! Returns amount of attributes in this collection of attributes. - virtual u32 getAttributeCount() const = 0; - - //! Returns attribute name by index. - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual const c8* getAttributeName(s32 index) = 0; - - //! Returns the type of an attribute - //! \param attributeName: Name for the attribute - virtual E_ATTRIBUTE_TYPE getAttributeType(const c8* attributeName) = 0; - - //! Returns attribute type by index. - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual E_ATTRIBUTE_TYPE getAttributeType(s32 index) = 0; - - //! Returns the type string of the attribute - //! \param attributeName: String for the attribute type - virtual const wchar_t* getAttributeTypeString(const c8* attributeName) = 0; - - //! Returns the type string of the attribute by index. - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual const wchar_t* getAttributeTypeString(s32 index) = 0; - - //! Returns if an attribute with a name exists - virtual bool existsAttribute(const c8* attributeName) = 0; - - //! Returns attribute index from name, -1 if not found - virtual s32 findAttribute(const c8* attributeName) const =0; - - //! Removes all attributes - virtual void clear() = 0; - - //! Reads attributes from a xml file. - //! \param reader The XML reader to read from - //! \param readCurrentElementOnly If set to true, reading only works if current element has the name 'attributes' or - //! the name specified using elementName. - //! \param elementName The surrounding element name. If it is null, the default one, "attributes" will be taken. - //! If set to false, the first appearing list of attributes are read. - virtual bool read(io::IXMLReader* reader, bool readCurrentElementOnly=false, const wchar_t* elementName=0) = 0; - - //! Write these attributes into a xml file - //! \param writer: The XML writer to write to - //! \param writeXMLHeader: Writes a header to the XML file, required if at the beginning of the file - //! \param elementName: The surrounding element name. If it is null, the default one, "attributes" will be taken. - virtual bool write(io::IXMLWriter* writer, bool writeXMLHeader=false, const wchar_t* elementName=0) = 0; - - - /* - - Integer Attribute - - */ - - //! Adds an attribute as integer - virtual void addInt(const c8* attributeName, s32 value) = 0; - - //! Sets an attribute as integer value - virtual void setAttribute(const c8* attributeName, s32 value) = 0; - - //! Gets an attribute as integer value - //! \param attributeName: Name of the attribute to get. - //! \return Returns value of the attribute previously set by setAttribute() - virtual s32 getAttributeAsInt(const c8* attributeName) const =0; - - //! Gets an attribute as integer value - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual s32 getAttributeAsInt(s32 index) const =0; - - //! Sets an attribute as integer value - virtual void setAttribute(s32 index, s32 value) = 0; - - /* - - Float Attribute - - */ - - //! Adds an attribute as float - virtual void addFloat(const c8* attributeName, f32 value) = 0; - - //! Sets a attribute as float value - virtual void setAttribute(const c8* attributeName, f32 value) = 0; - - //! Gets an attribute as float value - //! \param attributeName: Name of the attribute to get. - //! \return Returns value of the attribute previously set by setAttribute() - virtual f32 getAttributeAsFloat(const c8* attributeName) = 0; - - //! Gets an attribute as float value - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual f32 getAttributeAsFloat(s32 index) = 0; - - //! Sets an attribute as float value - virtual void setAttribute(s32 index, f32 value) = 0; - - /* - - String Attribute - - */ - - //! Adds an attribute as string - virtual void addString(const c8* attributeName, const c8* value) = 0; - - //! Sets an attribute value as string. - //! \param attributeName: Name for the attribute - //! \param value: Value for the attribute. Set this to 0 to delete the attribute - virtual void setAttribute(const c8* attributeName, const c8* value) = 0; - - //! Gets an attribute as string. - //! \param attributeName: Name of the attribute to get. - //! \return Returns value of the attribute previously set by setAttribute() - //! or 0 if attribute is not set. - virtual core::stringc getAttributeAsString(const c8* attributeName) = 0; - - //! Gets an attribute as string. - //! \param attributeName Name of the attribute to get. - //! \param target Buffer where the string is copied to. - virtual void getAttributeAsString(const c8* attributeName, c8* target) = 0; - - //! Returns attribute value as string by index. - //! \param index Index value, must be between 0 and getAttributeCount()-1. - virtual core::stringc getAttributeAsString(s32 index) = 0; - - //! Sets an attribute value as string. - //! \param index Index value, must be between 0 and getAttributeCount()-1. - //! \param value String to which the attribute is set. - virtual void setAttribute(s32 index, const c8* value) = 0; - - // wide strings - - //! Adds an attribute as string - virtual void addString(const c8* attributeName, const wchar_t* value) = 0; - - //! Sets an attribute value as string. - //! \param attributeName: Name for the attribute - //! \param value: Value for the attribute. Set this to 0 to delete the attribute - virtual void setAttribute(const c8* attributeName, const wchar_t* value) = 0; - - //! Gets an attribute as string. - //! \param attributeName: Name of the attribute to get. - //! \return Returns value of the attribute previously set by setAttribute() - //! or 0 if attribute is not set. - virtual core::stringw getAttributeAsStringW(const c8* attributeName) = 0; - - //! Gets an attribute as string. - //! \param attributeName: Name of the attribute to get. - //! \param target: Buffer where the string is copied to. - virtual void getAttributeAsStringW(const c8* attributeName, wchar_t* target) = 0; - - //! Returns attribute value as string by index. - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual core::stringw getAttributeAsStringW(s32 index) = 0; - - //! Sets an attribute value as string. - //! \param index Index value, must be between 0 and getAttributeCount()-1. - //! \param value String to which the attribute is set. - virtual void setAttribute(s32 index, const wchar_t* value) = 0; - - /* - - Binary Data Attribute - - */ - - //! Adds an attribute as binary data - virtual void addBinary(const c8* attributeName, void* data, s32 dataSizeInBytes) = 0; - - //! Sets an attribute as binary data - virtual void setAttribute(const c8* attributeName, void* data, s32 dataSizeInBytes ) = 0; - - //! Gets an attribute as binary data - /** \param attributeName: Name of the attribute to get. - \param outData Pointer to buffer where data shall be stored. - \param maxSizeInBytes Maximum number of bytes to write into outData. - */ - virtual void getAttributeAsBinaryData(const c8* attributeName, void* outData, s32 maxSizeInBytes) = 0; - - //! Gets an attribute as binary data - /** \param index: Index value, must be between 0 and getAttributeCount()-1. - \param outData Pointer to buffer where data shall be stored. - \param maxSizeInBytes Maximum number of bytes to write into outData. - */ - virtual void getAttributeAsBinaryData(s32 index, void* outData, s32 maxSizeInBytes) = 0; - - //! Sets an attribute as binary data - virtual void setAttribute(s32 index, void* data, s32 dataSizeInBytes ) = 0; - - - /* - Array Attribute - */ - - //! Adds an attribute as wide string array - virtual void addArray(const c8* attributeName, const core::array<core::stringw>& value) = 0; - - //! Sets an attribute value as a wide string array. - //! \param attributeName: Name for the attribute - //! \param value: Value for the attribute. Set this to 0 to delete the attribute - virtual void setAttribute(const c8* attributeName, const core::array<core::stringw>& value) = 0; - - //! Gets an attribute as an array of wide strings. - //! \param attributeName: Name of the attribute to get. - //! \return Returns value of the attribute previously set by setAttribute() - //! or 0 if attribute is not set. - virtual core::array<core::stringw> getAttributeAsArray(const c8* attributeName) = 0; - - //! Returns attribute value as an array of wide strings by index. - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual core::array<core::stringw> getAttributeAsArray(s32 index) = 0; - - //! Sets an attribute as an array of wide strings - virtual void setAttribute(s32 index, const core::array<core::stringw>& value) = 0; - - - /* - - Bool Attribute - - */ - - //! Adds an attribute as bool - virtual void addBool(const c8* attributeName, bool value) = 0; - - //! Sets an attribute as boolean value - virtual void setAttribute(const c8* attributeName, bool value) = 0; - - //! Gets an attribute as boolean value - //! \param attributeName: Name of the attribute to get. - //! \return Returns value of the attribute previously set by setAttribute() - virtual bool getAttributeAsBool(const c8* attributeName) = 0; - - //! Gets an attribute as boolean value - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual bool getAttributeAsBool(s32 index) = 0; - - //! Sets an attribute as boolean value - virtual void setAttribute(s32 index, bool value) = 0; - - /* - - Enumeration Attribute - - */ - - //! Adds an attribute as enum - virtual void addEnum(const c8* attributeName, const c8* enumValue, const c8* const* enumerationLiterals) = 0; - - //! Adds an attribute as enum - virtual void addEnum(const c8* attributeName, s32 enumValue, const c8* const* enumerationLiterals) = 0; - - //! Sets an attribute as enumeration - virtual void setAttribute(const c8* attributeName, const c8* enumValue, const c8* const* enumerationLiterals) = 0; - - //! Gets an attribute as enumeration - //! \param attributeName: Name of the attribute to get. - //! \return Returns value of the attribute previously set by setAttribute() - virtual const c8* getAttributeAsEnumeration(const c8* attributeName) = 0; - - //! Gets an attribute as enumeration - /** \param attributeName: Name of the attribute to get. - \param enumerationLiteralsToUse: Use these enumeration literals to get - the index value instead of the set ones. This is useful when the - attribute list maybe was read from an xml file, and only contains the - enumeration string, but no information about its index. - \return Returns value of the attribute previously set by setAttribute() - */ - virtual s32 getAttributeAsEnumeration(const c8* attributeName, const c8* const* enumerationLiteralsToUse) = 0; - - //! Gets an attribute as enumeration - /** \param index: Index value, must be between 0 and getAttributeCount()-1. - \param enumerationLiteralsToUse: Use these enumeration literals to get - the index value instead of the set ones. This is useful when the - attribute list maybe was read from an xml file, and only contains the - enumeration string, but no information about its index. - \return Returns value of the attribute previously set by setAttribute() - */ - virtual s32 getAttributeAsEnumeration(s32 index, const c8* const* enumerationLiteralsToUse) = 0; - - //! Gets an attribute as enumeration - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual const c8* getAttributeAsEnumeration(s32 index) = 0; - - //! Gets the list of enumeration literals of an enumeration attribute - //! \param attributeName Name of the attribute to get. - //! \param outLiterals Set of strings to choose the enum name from. - virtual void getAttributeEnumerationLiteralsOfEnumeration(const c8* attributeName, core::array<core::stringc>& outLiterals) = 0; - - //! Gets the list of enumeration literals of an enumeration attribute - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - //! \param outLiterals Set of strings to choose the enum name from. - virtual void getAttributeEnumerationLiteralsOfEnumeration(s32 index, core::array<core::stringc>& outLiterals) = 0; - - //! Sets an attribute as enumeration - virtual void setAttribute(s32 index, const c8* enumValue, const c8* const* enumerationLiterals) = 0; - - - /* - - SColor Attribute - - */ - - //! Adds an attribute as color - virtual void addColor(const c8* attributeName, video::SColor value) = 0; - - - //! Sets a attribute as color - virtual void setAttribute(const c8* attributeName, video::SColor color) = 0; - - //! Gets an attribute as color - //! \param attributeName: Name of the attribute to get. - //! \return Returns value of the attribute previously set by setAttribute() - virtual video::SColor getAttributeAsColor(const c8* attributeName) = 0; - - //! Gets an attribute as color - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual video::SColor getAttributeAsColor(s32 index) = 0; - - //! Sets an attribute as color - virtual void setAttribute(s32 index, video::SColor color) = 0; - - /* - - SColorf Attribute - - */ - - //! Adds an attribute as floating point color - virtual void addColorf(const c8* attributeName, video::SColorf value) = 0; - - //! Sets a attribute as floating point color - virtual void setAttribute(const c8* attributeName, video::SColorf color) = 0; - - //! Gets an attribute as floating point color - //! \param attributeName: Name of the attribute to get. - //! \return Returns value of the attribute previously set by setAttribute() - virtual video::SColorf getAttributeAsColorf(const c8* attributeName) = 0; - - //! Gets an attribute as floating point color - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual video::SColorf getAttributeAsColorf(s32 index) = 0; - - //! Sets an attribute as floating point color - virtual void setAttribute(s32 index, video::SColorf color) = 0; - - - /* - - Vector3d Attribute - - */ - - //! Adds an attribute as 3d vector - virtual void addVector3d(const c8* attributeName, core::vector3df value) = 0; - - //! Sets a attribute as 3d vector - virtual void setAttribute(const c8* attributeName, core::vector3df v) = 0; - - //! Gets an attribute as 3d vector - //! \param attributeName: Name of the attribute to get. - //! \return Returns value of the attribute previously set by setAttribute() - virtual core::vector3df getAttributeAsVector3d(const c8* attributeName) = 0; - - //! Gets an attribute as 3d vector - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual core::vector3df getAttributeAsVector3d(s32 index) = 0; - - //! Sets an attribute as vector - virtual void setAttribute(s32 index, core::vector3df v) = 0; - - /* - - Vector2d Attribute - - */ - - //! Adds an attribute as 2d vector - virtual void addVector2d(const c8* attributeName, core::vector2df value) = 0; - - //! Sets a attribute as 2d vector - virtual void setAttribute(const c8* attributeName, core::vector2df v) = 0; - - //! Gets an attribute as vector - //! \param attributeName: Name of the attribute to get. - //! \return Returns value of the attribute previously set by setAttribute() - virtual core::vector2df getAttributeAsVector2d(const c8* attributeName) = 0; - - //! Gets an attribute as position - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual core::vector2df getAttributeAsVector2d(s32 index) = 0; - - //! Sets an attribute as 2d vector - virtual void setAttribute(s32 index, core::vector2df v) = 0; - - /* - - Position2d Attribute - - */ - - //! Adds an attribute as 2d position - virtual void addPosition2d(const c8* attributeName, core::position2di value) = 0; - - //! Sets a attribute as 2d position - virtual void setAttribute(const c8* attributeName, core::position2di v) = 0; - - //! Gets an attribute as position - //! \param attributeName: Name of the attribute to get. - //! \return Returns value of the attribute previously set by setAttribute() - virtual core::position2di getAttributeAsPosition2d(const c8* attributeName) = 0; - - //! Gets an attribute as position - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual core::position2di getAttributeAsPosition2d(s32 index) = 0; - - //! Sets an attribute as 2d position - virtual void setAttribute(s32 index, core::position2di v) = 0; - - /* - - Rectangle Attribute - - */ - - //! Adds an attribute as rectangle - virtual void addRect(const c8* attributeName, core::rect<s32> value) = 0; - - //! Sets an attribute as rectangle - virtual void setAttribute(const c8* attributeName, core::rect<s32> v) = 0; - - //! Gets an attribute as rectangle - //! \param attributeName: Name of the attribute to get. - //! \return Returns value of the attribute previously set by setAttribute() - virtual core::rect<s32> getAttributeAsRect(const c8* attributeName) = 0; - - //! Gets an attribute as rectangle - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual core::rect<s32> getAttributeAsRect(s32 index) = 0; - - //! Sets an attribute as rectangle - virtual void setAttribute(s32 index, core::rect<s32> v) = 0; - - - /* - - Dimension2d Attribute - - */ - - //! Adds an attribute as dimension2d - virtual void addDimension2d(const c8* attributeName, core::dimension2d<u32> value) = 0; - - //! Sets an attribute as dimension2d - virtual void setAttribute(const c8* attributeName, core::dimension2d<u32> v) = 0; - - //! Gets an attribute as dimension2d - //! \param attributeName: Name of the attribute to get. - //! \return Returns value of the attribute previously set by setAttribute() - virtual core::dimension2d<u32> getAttributeAsDimension2d(const c8* attributeName) = 0; - - //! Gets an attribute as dimension2d - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual core::dimension2d<u32> getAttributeAsDimension2d(s32 index) = 0; - - //! Sets an attribute as dimension2d - virtual void setAttribute(s32 index, core::dimension2d<u32> v) = 0; - - - /* - matrix attribute - */ - - //! Adds an attribute as matrix - virtual void addMatrix(const c8* attributeName, const core::matrix4& v) = 0; - - //! Sets an attribute as matrix - virtual void setAttribute(const c8* attributeName, const core::matrix4& v) = 0; - - //! Gets an attribute as a matrix4 - //! \param attributeName: Name of the attribute to get. - //! \return Returns value of the attribute previously set by setAttribute() - virtual core::matrix4 getAttributeAsMatrix(const c8* attributeName) = 0; - - //! Gets an attribute as matrix - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual core::matrix4 getAttributeAsMatrix(s32 index) = 0; - - //! Sets an attribute as matrix - virtual void setAttribute(s32 index, const core::matrix4& v) = 0; - - /* - quaternion attribute - - */ - - //! Adds an attribute as quaternion - virtual void addQuaternion(const c8* attributeName, core::quaternion v) = 0; - - //! Sets an attribute as quaternion - virtual void setAttribute(const c8* attributeName, core::quaternion v) = 0; - - //! Gets an attribute as a quaternion - //! \param attributeName: Name of the attribute to get. - //! \return Returns value of the attribute previously set by setAttribute() - virtual core::quaternion getAttributeAsQuaternion(const c8* attributeName) = 0; - - //! Gets an attribute as quaternion - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual core::quaternion getAttributeAsQuaternion(s32 index) = 0; - - //! Sets an attribute as quaternion - virtual void setAttribute(s32 index, core::quaternion v) = 0; - - /* - - 3d bounding box - - */ - - //! Adds an attribute as axis aligned bounding box - virtual void addBox3d(const c8* attributeName, core::aabbox3df v) = 0; - - //! Sets an attribute as axis aligned bounding box - virtual void setAttribute(const c8* attributeName, core::aabbox3df v) = 0; - - //! Gets an attribute as a axis aligned bounding box - //! \param attributeName: Name of the attribute to get. - //! \return Returns value of the attribute previously set by setAttribute() - virtual core::aabbox3df getAttributeAsBox3d(const c8* attributeName) = 0; - - //! Gets an attribute as axis aligned bounding box - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual core::aabbox3df getAttributeAsBox3d(s32 index) = 0; - - //! Sets an attribute as axis aligned bounding box - virtual void setAttribute(s32 index, core::aabbox3df v) = 0; - - /* - - plane - - */ - - //! Adds an attribute as 3d plane - virtual void addPlane3d(const c8* attributeName, core::plane3df v) = 0; - - //! Sets an attribute as 3d plane - virtual void setAttribute(const c8* attributeName, core::plane3df v) = 0; - - //! Gets an attribute as a 3d plane - //! \param attributeName: Name of the attribute to get. - //! \return Returns value of the attribute previously set by setAttribute() - virtual core::plane3df getAttributeAsPlane3d(const c8* attributeName) = 0; - - //! Gets an attribute as 3d plane - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual core::plane3df getAttributeAsPlane3d(s32 index) = 0; - - //! Sets an attribute as 3d plane - virtual void setAttribute(s32 index, core::plane3df v) = 0; - - - /* - - 3d triangle - - */ - - //! Adds an attribute as 3d triangle - virtual void addTriangle3d(const c8* attributeName, core::triangle3df v) = 0; - - //! Sets an attribute as 3d trianle - virtual void setAttribute(const c8* attributeName, core::triangle3df v) = 0; - - //! Gets an attribute as a 3d triangle - //! \param attributeName: Name of the attribute to get. - //! \return Returns value of the attribute previously set by setAttribute() - virtual core::triangle3df getAttributeAsTriangle3d(const c8* attributeName) = 0; - - //! Gets an attribute as 3d triangle - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual core::triangle3df getAttributeAsTriangle3d(s32 index) = 0; - - //! Sets an attribute as 3d triangle - virtual void setAttribute(s32 index, core::triangle3df v) = 0; - - - /* - - line 2d - - */ - - //! Adds an attribute as a 2d line - virtual void addLine2d(const c8* attributeName, core::line2df v) = 0; - - //! Sets an attribute as a 2d line - virtual void setAttribute(const c8* attributeName, core::line2df v) = 0; - - //! Gets an attribute as a 2d line - //! \param attributeName: Name of the attribute to get. - //! \return Returns value of the attribute previously set by setAttribute() - virtual core::line2df getAttributeAsLine2d(const c8* attributeName) = 0; - - //! Gets an attribute as a 2d line - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual core::line2df getAttributeAsLine2d(s32 index) = 0; - - //! Sets an attribute as a 2d line - virtual void setAttribute(s32 index, core::line2df v) = 0; - - - /* - - line 3d - - */ - - //! Adds an attribute as a 3d line - virtual void addLine3d(const c8* attributeName, core::line3df v) = 0; - - //! Sets an attribute as a 3d line - virtual void setAttribute(const c8* attributeName, core::line3df v) = 0; - - //! Gets an attribute as a 3d line - //! \param attributeName: Name of the attribute to get. - //! \return Returns value of the attribute previously set by setAttribute() - virtual core::line3df getAttributeAsLine3d(const c8* attributeName) = 0; - - //! Gets an attribute as a 3d line - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual core::line3df getAttributeAsLine3d(s32 index) = 0; - - //! Sets an attribute as a 3d line - virtual void setAttribute(s32 index, core::line3df v) = 0; - - - /* - - Texture Attribute - - */ - - //! Adds an attribute as texture reference - virtual void addTexture(const c8* attributeName, video::ITexture* texture, const io::path& filename = "") = 0; - - //! Sets an attribute as texture reference - virtual void setAttribute(const c8* attributeName, video::ITexture* texture, const io::path& filename = "") = 0; - - //! Gets an attribute as texture reference - //! \param attributeName: Name of the attribute to get. - virtual video::ITexture* getAttributeAsTexture(const c8* attributeName) = 0; - - //! Gets an attribute as texture reference - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual video::ITexture* getAttributeAsTexture(s32 index) = 0; - - //! Sets an attribute as texture reference - virtual void setAttribute(s32 index, video::ITexture* texture, const io::path& filename = "") = 0; - - - /* - - User Pointer Attribute - - */ - - //! Adds an attribute as user pointner - virtual void addUserPointer(const c8* attributeName, void* userPointer) = 0; - - //! Sets an attribute as user pointer - virtual void setAttribute(const c8* attributeName, void* userPointer) = 0; - - //! Gets an attribute as user pointer - //! \param attributeName: Name of the attribute to get. - virtual void* getAttributeAsUserPointer(const c8* attributeName) = 0; - - //! Gets an attribute as user pointer - //! \param index: Index value, must be between 0 and getAttributeCount()-1. - virtual void* getAttributeAsUserPointer(s32 index) = 0; - - //! Sets an attribute as user pointer - virtual void setAttribute(s32 index, void* userPointer) = 0; - -}; - -} // end namespace io -} // end namespace irr - -#endif - - - diff --git a/builddir/irrlicht-1.8.1/include/IBillboardSceneNode.h b/builddir/irrlicht-1.8.1/include/IBillboardSceneNode.h deleted file mode 100644 index 1c931d7..0000000 --- a/builddir/irrlicht-1.8.1/include/IBillboardSceneNode.h +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_BILLBOARD_SCENE_NODE_H_INCLUDED__ -#define __I_BILLBOARD_SCENE_NODE_H_INCLUDED__ - -#include "ISceneNode.h" - -namespace irr -{ -namespace scene -{ - -//! A billboard scene node. -/** A billboard is like a 3d sprite: A 2d element, -which always looks to the camera. It is usually used for explosions, fire, -lensflares, particles and things like that. -*/ -class IBillboardSceneNode : public ISceneNode -{ -public: - - //! Constructor - IBillboardSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, - const core::vector3df& position = core::vector3df(0,0,0)) - : ISceneNode(parent, mgr, id, position) {} - - //! Sets the size of the billboard, making it rectangular. - virtual void setSize(const core::dimension2d<f32>& size) = 0; - - //! Sets the size of the billboard with independent widths of the bottom and top edges. - /** \param[in] height The height of the billboard. - \param[in] bottomEdgeWidth The width of the bottom edge of the billboard. - \param[in] topEdgeWidth The width of the top edge of the billboard. - */ - virtual void setSize(f32 height, f32 bottomEdgeWidth, f32 topEdgeWidth) = 0; - - //! Returns the size of the billboard. - /** This will return the width of the bottom edge of the billboard. - Use getWidths() to retrieve the bottom and top edges independently. - \return Size of the billboard. - */ - virtual const core::dimension2d<f32>& getSize() const = 0; - - //! Gets the size of the the billboard and handles independent top and bottom edge widths correctly. - /** \param[out] height The height of the billboard. - \param[out] bottomEdgeWidth The width of the bottom edge of the billboard. - \param[out] topEdgeWidth The width of the top edge of the billboard. - */ - virtual void getSize(f32& height, f32& bottomEdgeWidth, f32& topEdgeWidth) const =0; - - //! Set the color of all vertices of the billboard - /** \param[in] overallColor Color to set */ - virtual void setColor(const video::SColor& overallColor) = 0; - - //! Set the color of the top and bottom vertices of the billboard - /** \param[in] topColor Color to set the top vertices - \param[in] bottomColor Color to set the bottom vertices */ - virtual void setColor(const video::SColor& topColor, - const video::SColor& bottomColor) = 0; - - //! Gets the color of the top and bottom vertices of the billboard - /** \param[out] topColor Stores the color of the top vertices - \param[out] bottomColor Stores the color of the bottom vertices */ - virtual void getColor(video::SColor& topColor, - video::SColor& bottomColor) const = 0; -}; - -} // end namespace scene -} // end namespace irr - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IBillboardTextSceneNode.h b/builddir/irrlicht-1.8.1/include/IBillboardTextSceneNode.h deleted file mode 100644 index 30925da..0000000 --- a/builddir/irrlicht-1.8.1/include/IBillboardTextSceneNode.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_BILLBOARD_TEXT_SCENE_NODE_H_INCLUDED__ -#define __I_BILLBOARD_TEXT_SCENE_NODE_H_INCLUDED__ - -#include "IBillboardSceneNode.h" - -namespace irr -{ -namespace scene -{ - -//! A billboard text scene node. -/** Acts like a billboard which displays the currently set text. - Due to the exclusion of RTTI in Irrlicht we have to avoid multiple - inheritance. Hence, changes to the ITextSceneNode interface have - to be copied here manually. -*/ -class IBillboardTextSceneNode : public IBillboardSceneNode -{ -public: - - //! Constructor - IBillboardTextSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, - const core::vector3df& position = core::vector3df(0,0,0)) - : IBillboardSceneNode(parent, mgr, id, position) {} - - //! Sets the size of the billboard. - virtual void setSize(const core::dimension2d<f32>& size) = 0; - - //! Returns the size of the billboard. - virtual const core::dimension2d<f32>& getSize() const = 0; - - //! Set the color of all vertices of the billboard - /** \param overallColor: the color to set */ - virtual void setColor(const video::SColor & overallColor) = 0; - - //! Set the color of the top and bottom vertices of the billboard - /** \param topColor: the color to set the top vertices - \param bottomColor: the color to set the bottom vertices */ - virtual void setColor(const video::SColor & topColor, const video::SColor & bottomColor) = 0; - - //! Gets the color of the top and bottom vertices of the billboard - /** \param topColor: stores the color of the top vertices - \param bottomColor: stores the color of the bottom vertices */ - virtual void getColor(video::SColor & topColor, video::SColor & bottomColor) const = 0; - - //! sets the text string - virtual void setText(const wchar_t* text) = 0; - - //! sets the color of the text - virtual void setTextColor(video::SColor color) = 0; -}; - -} // end namespace scene -} // end namespace irr - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IBoneSceneNode.h b/builddir/irrlicht-1.8.1/include/IBoneSceneNode.h deleted file mode 100644 index d0063b4..0000000 --- a/builddir/irrlicht-1.8.1/include/IBoneSceneNode.h +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_BONE_SCENE_NODE_H_INCLUDED__ -#define __I_BONE_SCENE_NODE_H_INCLUDED__ - -#include "ISceneNode.h" - -namespace irr -{ -namespace scene -{ - - //! Enumeration for different bone animation modes - enum E_BONE_ANIMATION_MODE - { - //! The bone is usually animated, unless it's parent is not animated - EBAM_AUTOMATIC=0, - - //! The bone is animated by the skin, if it's parent is not animated then animation will resume from this bone onward - EBAM_ANIMATED, - - //! The bone is not animated by the skin - EBAM_UNANIMATED, - - //! Not an animation mode, just here to count the available modes - EBAM_COUNT - - }; - - enum E_BONE_SKINNING_SPACE - { - //! local skinning, standard - EBSS_LOCAL=0, - - //! global skinning - EBSS_GLOBAL, - - EBSS_COUNT - }; - - //! Names for bone animation modes - const c8* const BoneAnimationModeNames[] = - { - "automatic", - "animated", - "unanimated", - 0, - }; - - - //! Interface for bones used for skeletal animation. - /** Used with ISkinnedMesh and IAnimatedMeshSceneNode. */ - class IBoneSceneNode : public ISceneNode - { - public: - - IBoneSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id=-1) : - ISceneNode(parent, mgr, id),positionHint(-1),scaleHint(-1),rotationHint(-1) { } - - //! Get the name of the bone - /** \deprecated Use getName instead. This method may be removed by Irrlicht 1.9 */ - _IRR_DEPRECATED_ virtual const c8* getBoneName() const { return getName(); } - - //! Get the index of the bone - virtual u32 getBoneIndex() const = 0; - - //! Sets the animation mode of the bone. - /** \return True if successful. (Unused) */ - virtual bool setAnimationMode(E_BONE_ANIMATION_MODE mode) = 0; - - //! Gets the current animation mode of the bone - virtual E_BONE_ANIMATION_MODE getAnimationMode() const = 0; - - //! Get the axis aligned bounding box of this node - virtual const core::aabbox3d<f32>& getBoundingBox() const = 0; - - //! Returns the relative transformation of the scene node. - //virtual core::matrix4 getRelativeTransformation() const = 0; - - //! The animation method. - virtual void OnAnimate(u32 timeMs) =0; - - //! The render method. - /** Does nothing as bones are not visible. */ - virtual void render() { } - - //! How the relative transformation of the bone is used - virtual void setSkinningSpace( E_BONE_SKINNING_SPACE space ) =0; - - //! How the relative transformation of the bone is used - virtual E_BONE_SKINNING_SPACE getSkinningSpace() const =0; - - //! Updates the absolute position based on the relative and the parents position - virtual void updateAbsolutePositionOfAllChildren()=0; - - s32 positionHint; - s32 scaleHint; - s32 rotationHint; - }; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/ICameraSceneNode.h b/builddir/irrlicht-1.8.1/include/ICameraSceneNode.h deleted file mode 100644 index dfc1b7a..0000000 --- a/builddir/irrlicht-1.8.1/include/ICameraSceneNode.h +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_CAMERA_SCENE_NODE_H_INCLUDED__ -#define __I_CAMERA_SCENE_NODE_H_INCLUDED__ - -#include "ISceneNode.h" -#include "IEventReceiver.h" - -namespace irr -{ -namespace scene -{ - struct SViewFrustum; - - //! Scene Node which is a (controlable) camera. - /** The whole scene will be rendered from the cameras point of view. - Because the ICameraScenNode is a SceneNode, it can be attached to any - other scene node, and will follow its parents movement, rotation and so - on. - */ - class ICameraSceneNode : public ISceneNode, public IEventReceiver - { - public: - - //! Constructor - ICameraSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, - const core::vector3df& position = core::vector3df(0,0,0), - const core::vector3df& rotation = core::vector3df(0,0,0), - const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f)) - : ISceneNode(parent, mgr, id, position, rotation, scale), IsOrthogonal(false) {} - - //! Sets the projection matrix of the camera. - /** The core::matrix4 class has some methods to build a - projection matrix. e.g: - core::matrix4::buildProjectionMatrixPerspectiveFovLH. - Note that the matrix will only stay as set by this method until - one of the following Methods are called: setNearValue, - setFarValue, setAspectRatio, setFOV. - \param projection The new projection matrix of the camera. - \param isOrthogonal Set this to true if the matrix is an - orthogonal one (e.g. from matrix4::buildProjectionMatrixOrtho). - */ - virtual void setProjectionMatrix(const core::matrix4& projection, bool isOrthogonal=false) =0; - - //! Gets the current projection matrix of the camera. - /** \return The current projection matrix of the camera. */ - virtual const core::matrix4& getProjectionMatrix() const =0; - - //! Gets the current view matrix of the camera. - /** \return The current view matrix of the camera. */ - virtual const core::matrix4& getViewMatrix() const =0; - - //! Sets a custom view matrix affector. - /** The matrix passed here, will be multiplied with the view - matrix when it gets updated. This allows for custom camera - setups like, for example, a reflection camera. - \param affector The affector matrix. */ - virtual void setViewMatrixAffector(const core::matrix4& affector) =0; - - //! Get the custom view matrix affector. - /** \return The affector matrix. */ - virtual const core::matrix4& getViewMatrixAffector() const =0; - - //! It is possible to send mouse and key events to the camera. - /** Most cameras may ignore this input, but camera scene nodes - which are created for example with - ISceneManager::addCameraSceneNodeMaya or - ISceneManager::addCameraSceneNodeFPS, may want to get - this input for changing their position, look at target or - whatever. */ - virtual bool OnEvent(const SEvent& event) =0; - - //! Sets the look at target of the camera - /** If the camera's target and rotation are bound ( @see - bindTargetAndRotation() ) then calling this will also change - the camera's scene node rotation to match the target. - Note that setTarget uses the current absolute position - internally, so if you changed setPosition since last rendering you must - call updateAbsolutePosition before using this function. - \param pos Look at target of the camera, in world co-ordinates. */ - virtual void setTarget(const core::vector3df& pos) =0; - - //! Sets the rotation of the node. - /** This only modifies the relative rotation of the node. - If the camera's target and rotation are bound ( @see - bindTargetAndRotation() ) then calling this will also change - the camera's target to match the rotation. - \param rotation New rotation of the node in degrees. */ - virtual void setRotation(const core::vector3df& rotation) =0; - - //! Gets the current look at target of the camera - /** \return The current look at target of the camera, in world co-ordinates */ - virtual const core::vector3df& getTarget() const =0; - - //! Sets the up vector of the camera. - /** \param pos: New upvector of the camera. */ - virtual void setUpVector(const core::vector3df& pos) =0; - - //! Gets the up vector of the camera. - /** \return The up vector of the camera, in world space. */ - virtual const core::vector3df& getUpVector() const =0; - - //! Gets the value of the near plane of the camera. - /** \return The value of the near plane of the camera. */ - virtual f32 getNearValue() const =0; - - //! Gets the value of the far plane of the camera. - /** \return The value of the far plane of the camera. */ - virtual f32 getFarValue() const =0; - - //! Gets the aspect ratio of the camera. - /** \return The aspect ratio of the camera. */ - virtual f32 getAspectRatio() const =0; - - //! Gets the field of view of the camera. - /** \return The field of view of the camera in radians. */ - virtual f32 getFOV() const =0; - - //! Sets the value of the near clipping plane. (default: 1.0f) - /** \param zn: New z near value. */ - virtual void setNearValue(f32 zn) =0; - - //! Sets the value of the far clipping plane (default: 2000.0f) - /** \param zf: New z far value. */ - virtual void setFarValue(f32 zf) =0; - - //! Sets the aspect ratio (default: 4.0f / 3.0f) - /** \param aspect: New aspect ratio. */ - virtual void setAspectRatio(f32 aspect) =0; - - //! Sets the field of view (Default: PI / 2.5f) - /** \param fovy: New field of view in radians. */ - virtual void setFOV(f32 fovy) =0; - - //! Get the view frustum. - /** Needed sometimes by bspTree or LOD render nodes. - \return The current view frustum. */ - virtual const SViewFrustum* getViewFrustum() const =0; - - //! Disables or enables the camera to get key or mouse inputs. - /** If this is set to true, the camera will respond to key - inputs otherwise not. */ - virtual void setInputReceiverEnabled(bool enabled) =0; - - //! Checks if the input receiver of the camera is currently enabled. - virtual bool isInputReceiverEnabled() const =0; - - //! Checks if a camera is orthogonal. - virtual bool isOrthogonal() const - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return IsOrthogonal; - } - - //! Binds the camera scene node's rotation to its target position and vice vera, or unbinds them. - /** When bound, calling setRotation() will update the camera's - target position to be along its +Z axis, and likewise calling - setTarget() will update its rotation so that its +Z axis will - point at the target point. FPS camera use this binding by - default; other cameras do not. - \param bound True to bind the camera's scene node rotation - and targetting, false to unbind them. - @see getTargetAndRotationBinding() */ - virtual void bindTargetAndRotation(bool bound) =0; - - //! Queries if the camera scene node's rotation and its target position are bound together. - /** @see bindTargetAndRotation() */ - virtual bool getTargetAndRotationBinding(void) const =0; - - //! Writes attributes of the camera node - virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const - { - ISceneNode::serializeAttributes(out, options); - - if (!out) - return; - out->addBool ("IsOrthogonal", IsOrthogonal ); - } - - //! Reads attributes of the camera node - virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) - { - ISceneNode::deserializeAttributes(in, options); - if (!in) - return; - - if ( in->findAttribute("IsOrthogonal") ) - IsOrthogonal = in->getAttributeAsBool("IsOrthogonal"); - } - - protected: - - void cloneMembers(ICameraSceneNode* toCopyFrom) - { - IsOrthogonal = toCopyFrom->IsOrthogonal; - } - - bool IsOrthogonal; - }; - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IColladaMeshWriter.h b/builddir/irrlicht-1.8.1/include/IColladaMeshWriter.h deleted file mode 100644 index 6b16319..0000000 --- a/builddir/irrlicht-1.8.1/include/IColladaMeshWriter.h +++ /dev/null @@ -1,405 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_I_COLLADA_MESH_WRITER_H_INCLUDED__ -#define __IRR_I_COLLADA_MESH_WRITER_H_INCLUDED__ - -#include "IMeshWriter.h" -#include "ISceneNode.h" -#include "IAnimatedMesh.h" -#include "SMaterial.h" - -namespace irr -{ -namespace io -{ - class IWriteFile; -} // end namespace io - -namespace scene -{ - //! Lighting models - more or less the way Collada categorizes materials - enum E_COLLADA_TECHNIQUE_FX - { - //! Blinn-phong which is default for opengl and dx fixed function pipelines. - //! But several well-known renderers don't support it and prefer phong. - ECTF_BLINN, - //! Phong shading, default in many external renderers. - ECTF_PHONG, - //! diffuse shaded surface that is independent of lighting. - ECTF_LAMBERT, - // constantly shaded surface that is independent of lighting. - ECTF_CONSTANT - }; - - //! How to interpret the opacity in collada - enum E_COLLADA_TRANSPARENT_FX - { - //! default - only alpha channel of color or texture is used. - ECOF_A_ONE = 0, - - //! Alpha values for each RGB channel of color or texture are used. - ECOF_RGB_ZERO = 1 - }; - - //! Color names collada uses in it's color samplers - enum E_COLLADA_COLOR_SAMPLER - { - ECCS_DIFFUSE, - ECCS_AMBIENT, - ECCS_EMISSIVE, - ECCS_SPECULAR, - ECCS_TRANSPARENT, - ECCS_REFLECTIVE - }; - - //! Irrlicht colors which can be mapped to E_COLLADA_COLOR_SAMPLER values - enum E_COLLADA_IRR_COLOR - { - //! Don't write this element at all - ECIC_NONE, - - //! Check IColladaMeshWriterProperties for custom color - ECIC_CUSTOM, - - //! Use SMaterial::DiffuseColor - ECIC_DIFFUSE, - - //! Use SMaterial::AmbientColor - ECIC_AMBIENT, - - //! Use SMaterial::EmissiveColor - ECIC_EMISSIVE, - - //! Use SMaterial::SpecularColor - ECIC_SPECULAR - }; - - //! Control when geometry elements are created - enum E_COLLADA_GEOMETRY_WRITING - { - //! Default - write each mesh exactly once to collada. Optimal but will not work with many tools. - ECGI_PER_MESH, - - //! Write each mesh as often as it's used with different materials-names in the scene. - //! Material names which are used here are created on export, so using the IColladaMeshWriterNames - //! interface you have some control over how many geometries are written. - ECGI_PER_MESH_AND_MATERIAL - }; - - //! Callback interface for properties which can be used to influence collada writing - class IColladaMeshWriterProperties : public virtual IReferenceCounted - { - public: - virtual ~IColladaMeshWriterProperties () {} - - //! Which lighting model should be used in the technique (FX) section when exporting effects (materials) - virtual E_COLLADA_TECHNIQUE_FX getTechniqueFx(const video::SMaterial& material) const = 0; - - //! Which texture index should be used when writing the texture of the given sampler color. - /** \return the index to the texture-layer or -1 if that texture should never be exported - Note: for ECCS_TRANSPARENT by default the alpha channel is used, if you want to use RGB you have to set - also the ECOF_RGB_ZERO flag in getTransparentFx. */ - virtual s32 getTextureIdx(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs) const = 0; - - //! Return which color from Irrlicht should be used for the color requested by collada - /** Note that collada allows exporting either texture or color, not both. - So color mapping is only checked if we have no valid texture already. - By default we try to return best fits when possible. For example ECCS_DIFFUSE is mapped to ECIC_DIFFUSE. - When ECIC_CUSTOM is returned then the result of getCustomColor will be used. */ - virtual E_COLLADA_IRR_COLOR getColorMapping(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs) const = 0; - - //! Return custom colors for certain color types requested by collada. - /** Only used when getColorMapping returns ECIC_CUSTOM for the same paramters. */ - virtual video::SColor getCustomColor(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs) const = 0; - - //! Return the transparence color interpretation. - /** Not this is only about ECCS_TRANSPARENT and does not affect getTransparency. */ - virtual E_COLLADA_TRANSPARENT_FX getTransparentFx(const video::SMaterial& material) const = 0; - - //! Transparency value for that material. - /** This value is additional to transparent settings, if both are set they will be multiplicated. - \return 1.0 for fully transparent, 0.0 for not transparent and not written at all when < 0.f */ - virtual f32 getTransparency(const video::SMaterial& material) const = 0; - - //! Reflectivity value for that material - /** The amount of perfect mirror reflection to be added to the reflected light - \return 0.0 - 1.0 for reflectivity and element is not written at all when < 0.f */ - virtual f32 getReflectivity(const video::SMaterial& material) const = 0; - - //! Return index of refraction for that material - /** By default we don't write that. - \return a value greater equal 0.f to write \<index_of_refraction\> when it is lesser than 0 nothing will be written */ - virtual f32 getIndexOfRefraction(const video::SMaterial& material) const = 0; - - //! Should node be used in scene export? (only needed for scene-writing, ignored in mesh-writing) - //! By default all visible nodes are exported. - virtual bool isExportable(const irr::scene::ISceneNode * node) const = 0; - - //! Return the mesh for the given node. If it has no mesh or shouldn't export it's mesh - //! you can return 0 in which case only the transformation matrix of the node will be used. - // Note: Function is not const because there is no const getMesh() function. - virtual IMesh* getMesh(irr::scene::ISceneNode * node) = 0; - - //! Return if the node has it's own material overwriting the mesh-materials - /** Usually true except for mesh-nodes which have isReadOnlyMaterials set. - This is mostly important for naming (as ISceneNode::getMaterial() already returns the correct material). - You have to override it when exporting custom scenenodes with own materials. - \return true => The node's own material is used, false => ignore node material and use the one from the mesh */ - virtual bool useNodeMaterial(const scene::ISceneNode* node) const = 0; - - }; - - //! Callback interface to use custom names on collada writing. - /** You can either modify names and id's written to collada or you can use - this interface to just find out which names are used on writing. - */ - class IColladaMeshWriterNames : public virtual IReferenceCounted - { - public: - - virtual ~IColladaMeshWriterNames () {} - - //! Return a unique name for the given mesh - /** Note that names really must be unique here per mesh-pointer, so - mostly it's a good idea to return the nameForMesh from - IColladaMeshWriter::getDefaultNameGenerator(). Also names must follow - the xs::NCName standard to be valid, you can run them through - IColladaMeshWriter::toNCName to ensure that. - \param mesh Pointer to the mesh which needs a name - \param instance When E_COLLADA_GEOMETRY_WRITING is not ECGI_PER_MESH then - several instances of the same mesh can be written and this counts them. - */ - virtual irr::core::stringw nameForMesh(const scene::IMesh* mesh, int instance) = 0; - - //! Return a unique name for the given node - /** Note that names really must be unique here per node-pointer, so - mostly it's a good idea to return the nameForNode from - IColladaMeshWriter::getDefaultNameGenerator(). Also names must follow - the xs::NCName standard to be valid, you can run them through - IColladaMeshWriter::toNCName to ensure that. - */ - virtual irr::core::stringw nameForNode(const scene::ISceneNode* node) = 0; - - //! Return a name for the material - /** There is one material created in the writer for each unique name. - So you can use this to control the number of materials which get written. - For example Irrlicht does by default write one material for each material - instanced by a node. So if you know that in your application material - instances per node are identical between different nodes you can reduce - the number of exported materials using that knowledge by using identical - names for such shared materials. - Names must follow the xs::NCName standard to be valid, you can run them - through IColladaMeshWriter::toNCName to ensure that. - */ - virtual irr::core::stringw nameForMaterial(const video::SMaterial & material, int materialId, const scene::IMesh* mesh, const scene::ISceneNode* node) = 0; - }; - - - //! Interface for writing meshes - class IColladaMeshWriter : public IMeshWriter - { - public: - - IColladaMeshWriter() - : Properties(0), DefaultProperties(0), NameGenerator(0), DefaultNameGenerator(0) - , WriteTextures(true), WriteDefaultScene(true), ExportSMaterialOnce(true) - , AmbientLight(0.f, 0.f, 0.f, 1.f) - , GeometryWriting(ECGI_PER_MESH) - { - } - - //! Destructor - virtual ~IColladaMeshWriter() - { - if ( Properties ) - Properties->drop(); - if ( DefaultProperties ) - DefaultProperties->drop(); - if ( NameGenerator ) - NameGenerator->drop(); - if ( DefaultNameGenerator ) - DefaultNameGenerator->drop(); - } - - //! writes a scene starting with the given node - virtual bool writeScene(io::IWriteFile* file, scene::ISceneNode* root) = 0; - - - //! Set if texture information should be written - virtual void setWriteTextures(bool write) - { - WriteTextures = write; - } - - //! Get if texture information should be written - virtual bool getWriteTextures() const - { - return WriteTextures; - } - - //! Set if a default scene should be written when writing meshes. - /** Many collada readers fail to read a mesh if the collada files doesn't contain a scene as well. - The scene is doing an instantiation of the mesh. - When using writeScene this flag is ignored (as we have scene there already) - */ - virtual void setWriteDefaultScene(bool write) - { - WriteDefaultScene = write; - } - - //! Get if a default scene should be written - virtual bool getWriteDefaultScene() const - { - return WriteDefaultScene; - } - - //! Sets ambient color of the scene to write - virtual void setAmbientLight(const video::SColorf &ambientColor) - { - AmbientLight = ambientColor; - } - - //! Return ambient light of the scene which is written - virtual video::SColorf getAmbientLight() const - { - return AmbientLight; - } - - //! Control when and how often a mesh is written - /** Optimally ECGI_PER_MESH would be always sufficent - writing geometry once per mesh. - Unfortunately many tools (at the time of writing this nearly all of them) have trouble - on import when different materials are used per node. So when you override materials - per node and importing the resuling collada has materials problems in other tools try - using other values here. - \param writeStyle One of the E_COLLADA_GEOMETRY_WRITING settings. - */ - virtual void setGeometryWriting(E_COLLADA_GEOMETRY_WRITING writeStyle) - { - GeometryWriting = writeStyle; - } - - //! Get the current style of geometry writing. - virtual E_COLLADA_GEOMETRY_WRITING getGeometryWriting() const - { - return GeometryWriting; - } - - //! Make certain there is only one collada material generated per Irrlicht material - /** Checks before creating a collada material-name if an identical - irr:::video::SMaterial has been exported already. If so don't export it with - another name. This is set by default and leads to way smaller .dae files. - Note that if you need to disable this flag for some reason you can still - get a similar effect using the IColladaMeshWriterNames::nameForMaterial - by returning identical names for identical materials there. - */ - virtual void setExportSMaterialsOnlyOnce(bool exportOnce) - { - ExportSMaterialOnce = exportOnce; - } - - virtual bool getExportSMaterialsOnlyOnce() const - { - return ExportSMaterialOnce; - } - - //! Set properties to use by the meshwriter instead of it's default properties. - /** Overloading properties with an own class allows modifying the writing process in certain ways. - By default properties are set to the DefaultProperties. */ - virtual void setProperties(IColladaMeshWriterProperties * p) - { - if ( p == Properties ) - return; - if ( p ) - p->grab(); - if ( Properties ) - Properties->drop(); - Properties = p; - } - - //! Get properties which are currently used. - virtual IColladaMeshWriterProperties * getProperties() const - { - return Properties; - } - - //! Return the original default properties of the writer. - /** You can use this pointer in your own properties to access and return default values. */ - IColladaMeshWriterProperties * getDefaultProperties() const - { - return DefaultProperties; - } - - //! Install a generator to create custom names on export. - virtual void setNameGenerator(IColladaMeshWriterNames * nameGenerator) - { - if ( nameGenerator == NameGenerator ) - return; - if ( nameGenerator ) - nameGenerator->grab(); - if ( NameGenerator ) - NameGenerator->drop(); - NameGenerator = nameGenerator; - } - - //! Get currently used name generator - virtual IColladaMeshWriterNames * getNameGenerator() const - { - return NameGenerator; - } - - //! Return the original default name generator of the writer. - /** You can use this pointer in your own generator to access and return default values. */ - IColladaMeshWriterNames * getDefaultNameGenerator() const - { - return DefaultNameGenerator; - } - - //! Restrict the characters of oldString a set of allowed characters in xs::NCName and add the prefix. - /** A tool function to help when using a custom name generator to generative valid names for collada names and id's. */ - virtual irr::core::stringw toNCName(const irr::core::stringw& oldString, const irr::core::stringw& prefix=irr::core::stringw(L"_NC_")) const = 0; - - - protected: - // NOTE: You usually should also call setProperties with the same paraemter when using setDefaultProperties - virtual void setDefaultProperties(IColladaMeshWriterProperties * p) - { - if ( p == DefaultProperties ) - return; - if ( p ) - p->grab(); - if ( DefaultProperties ) - DefaultProperties->drop(); - DefaultProperties = p; - } - - // NOTE: You usually should also call setNameGenerator with the same paraemter when using setDefaultProperties - virtual void setDefaultNameGenerator(IColladaMeshWriterNames * p) - { - if ( p == DefaultNameGenerator ) - return; - if ( p ) - p->grab(); - if ( DefaultNameGenerator ) - DefaultNameGenerator->drop(); - DefaultNameGenerator = p; - } - - private: - IColladaMeshWriterProperties * Properties; - IColladaMeshWriterProperties * DefaultProperties; - IColladaMeshWriterNames * NameGenerator; - IColladaMeshWriterNames * DefaultNameGenerator; - bool WriteTextures; - bool WriteDefaultScene; - bool ExportSMaterialOnce; - video::SColorf AmbientLight; - E_COLLADA_GEOMETRY_WRITING GeometryWriting; - }; - - -} // end namespace -} // end namespace - -#endif diff --git a/builddir/irrlicht-1.8.1/include/ICursorControl.h b/builddir/irrlicht-1.8.1/include/ICursorControl.h deleted file mode 100644 index 8e6bc1e..0000000 --- a/builddir/irrlicht-1.8.1/include/ICursorControl.h +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_CURSOR_CONTROL_H_INCLUDED__ -#define __I_CURSOR_CONTROL_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "position2d.h" -#include "rect.h" - -namespace irr -{ -namespace gui -{ - - class IGUISpriteBank; - - //! Default icons for cursors - enum ECURSOR_ICON - { - // Following cursors might be system specific, or might use an Irrlicht icon-set. No guarantees so far. - ECI_NORMAL, // arrow - ECI_CROSS, // Crosshair - ECI_HAND, // Hand - ECI_HELP, // Arrow and question mark - ECI_IBEAM, // typical text-selection cursor - ECI_NO, // should not click icon - ECI_WAIT, // hourclass - ECI_SIZEALL, // arrow in all directions - ECI_SIZENESW, // resizes in direction north-east or south-west - ECI_SIZENWSE, // resizes in direction north-west or south-east - ECI_SIZENS, // resizes in direction north or south - ECI_SIZEWE, // resizes in direction west or east - ECI_UP, // up-arrow - - // Implementer note: Should we add system specific cursors, which use guaranteed the system icons, - // then I would recommend using a naming scheme like ECI_W32_CROSS, ECI_X11_CROSSHAIR and adding those - // additionally. - - ECI_COUNT // maximal of defined cursors. Note that higher values can be created at runtime - }; - - //! Names for ECURSOR_ICON - const c8* const GUICursorIconNames[ECI_COUNT+1] = - { - "normal", - "cross", - "hand", - "help", - "ibeam", - "no", - "wait", - "sizeall", - "sizenesw", - "sizenwse", - "sizens", - "sizewe", - "sizeup", - 0 - }; - - //! structure used to set sprites as cursors. - struct SCursorSprite - { - SCursorSprite() - : SpriteBank(0), SpriteId(-1) - { - } - - SCursorSprite( gui::IGUISpriteBank * spriteBank, s32 spriteId, const core::position2d<s32> &hotspot=(core::position2d<s32>(0,0)) ) - : SpriteBank(spriteBank), SpriteId(spriteId), HotSpot(hotspot) - { - } - - IGUISpriteBank * SpriteBank; - s32 SpriteId; - core::position2d<s32> HotSpot; - }; - - //! platform specific behavior flags for the cursor - enum ECURSOR_PLATFORM_BEHAVIOR - { - //! default - no platform specific behavior - ECPB_NONE = 0, - - //! On X11 try caching cursor updates as XQueryPointer calls can be expensive. - /** Update cursor positions only when the irrlicht timer has been updated or the timer is stopped. - This means you usually get one cursor update per device->run() which will be fine in most cases. - See this forum-thread for a more detailed explanation: - http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=45525 - */ - ECPB_X11_CACHE_UPDATES = 1 - }; - - //! Interface to manipulate the mouse cursor. - class ICursorControl : public virtual IReferenceCounted - { - public: - - //! Changes the visible state of the mouse cursor. - /** \param visible: The new visible state. If true, the cursor will be visible, - if false, it will be invisible. */ - virtual void setVisible(bool visible) = 0; - - //! Returns if the cursor is currently visible. - /** \return True if the cursor is visible, false if not. */ - virtual bool isVisible() const = 0; - - //! Sets the new position of the cursor. - /** The position must be - between (0.0f, 0.0f) and (1.0f, 1.0f), where (0.0f, 0.0f) is - the top left corner and (1.0f, 1.0f) is the bottom right corner of the - render window. - \param pos New position of the cursor. */ - virtual void setPosition(const core::position2d<f32> &pos) = 0; - - //! Sets the new position of the cursor. - /** The position must be - between (0.0f, 0.0f) and (1.0f, 1.0f), where (0.0f, 0.0f) is - the top left corner and (1.0f, 1.0f) is the bottom right corner of the - render window. - \param x New x-coord of the cursor. - \param y New x-coord of the cursor. */ - virtual void setPosition(f32 x, f32 y) = 0; - - //! Sets the new position of the cursor. - /** \param pos: New position of the cursor. The coordinates are pixel units. */ - virtual void setPosition(const core::position2d<s32> &pos) = 0; - - //! Sets the new position of the cursor. - /** \param x New x-coord of the cursor. The coordinates are pixel units. - \param y New y-coord of the cursor. The coordinates are pixel units. */ - virtual void setPosition(s32 x, s32 y) = 0; - - //! Returns the current position of the mouse cursor. - /** \return Returns the current position of the cursor. The returned position - is the position of the mouse cursor in pixel units. */ - virtual const core::position2d<s32>& getPosition() = 0; - - //! Returns the current position of the mouse cursor. - /** \return Returns the current position of the cursor. The returned position - is a value between (0.0f, 0.0f) and (1.0f, 1.0f), where (0.0f, 0.0f) is - the top left corner and (1.0f, 1.0f) is the bottom right corner of the - render window. */ - virtual core::position2d<f32> getRelativePosition() = 0; - - //! Sets an absolute reference rect for setting and retrieving the cursor position. - /** If this rect is set, the cursor position is not being calculated relative to - the rendering window but to this rect. You can set the rect pointer to 0 to disable - this feature again. This feature is useful when rendering into parts of foreign windows - for example in an editor. - \param rect: A pointer to an reference rectangle or 0 to disable the reference rectangle.*/ - virtual void setReferenceRect(core::rect<s32>* rect=0) = 0; - - - //! Sets the active cursor icon - /** Setting cursor icons is so far only supported on Win32 and Linux */ - virtual void setActiveIcon(ECURSOR_ICON iconId) {} - - //! Gets the currently active icon - virtual ECURSOR_ICON getActiveIcon() const { return gui::ECI_NORMAL; } - - //! Add a custom sprite as cursor icon. - /** \return Identification for the icon */ - virtual ECURSOR_ICON addIcon(const gui::SCursorSprite& icon) { return gui::ECI_NORMAL; } - - //! replace a cursor icon. - /** Changing cursor icons is so far only supported on Win32 and Linux - Note that this only changes the icons within your application, system cursors outside your - application will not be affected. - */ - virtual void changeIcon(ECURSOR_ICON iconId, const gui::SCursorSprite& sprite) {} - - //! Return a system-specific size which is supported for cursors. Larger icons will fail, smaller icons might work. - virtual core::dimension2di getSupportedIconSize() const { return core::dimension2di(0,0); } - - //! Set platform specific behavior flags. - virtual void setPlatformBehavior(ECURSOR_PLATFORM_BEHAVIOR behavior) {} - - //! Return platform specific behavior. - /** \return Behavior set by setPlatformBehavior or ECPB_NONE for platforms not implementing specific behaviors. - */ - virtual ECURSOR_PLATFORM_BEHAVIOR getPlatformBehavior() const { return ECPB_NONE; } - }; - - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IDummyTransformationSceneNode.h b/builddir/irrlicht-1.8.1/include/IDummyTransformationSceneNode.h deleted file mode 100644 index d5e7f00..0000000 --- a/builddir/irrlicht-1.8.1/include/IDummyTransformationSceneNode.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_DUMMY_TRANSFORMATION_SCENE_NODE_H_INCLUDED__ -#define __I_DUMMY_TRANSFORMATION_SCENE_NODE_H_INCLUDED__ - -#include "ISceneNode.h" - -namespace irr -{ -namespace scene -{ - -//! Dummy scene node for adding additional transformations to the scene graph. -/** This scene node does not render itself, and does not respond to set/getPosition, -set/getRotation and set/getScale. Its just a simple scene node that takes a -matrix as relative transformation, making it possible to insert any transformation -anywhere into the scene graph. -This scene node is for example used by the IAnimatedMeshSceneNode for emulating -joint scene nodes when playing skeletal animations. -*/ -class IDummyTransformationSceneNode : public ISceneNode -{ -public: - - //! Constructor - IDummyTransformationSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id) - : ISceneNode(parent, mgr, id) {} - - //! Returns a reference to the current relative transformation matrix. - /** This is the matrix, this scene node uses instead of scale, translation - and rotation. */ - virtual core::matrix4& getRelativeTransformationMatrix() = 0; -}; - -} // end namespace scene -} // end namespace irr - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IDynamicMeshBuffer.h b/builddir/irrlicht-1.8.1/include/IDynamicMeshBuffer.h deleted file mode 100644 index 24434df..0000000 --- a/builddir/irrlicht-1.8.1/include/IDynamicMeshBuffer.h +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (C) 2008-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_DYNAMIC_MESH_BUFFER_H_INCLUDED__ -#define __I_DYNAMIC_MESH_BUFFER_H_INCLUDED__ - -#include "IMeshBuffer.h" -#include "IVertexBuffer.h" -#include "IIndexBuffer.h" - -namespace irr -{ -namespace scene -{ - - /** a dynamic meshBuffer */ - class IDynamicMeshBuffer : public IMeshBuffer - { - public: - virtual IVertexBuffer &getVertexBuffer() const =0; - virtual IIndexBuffer &getIndexBuffer() const =0; - - virtual void setVertexBuffer(IVertexBuffer *vertexBuffer) =0; - virtual void setIndexBuffer(IIndexBuffer *indexBuffer) =0; - - //! Get the material of this meshbuffer - /** \return Material of this buffer. */ - virtual video::SMaterial& getMaterial() =0; - - //! Get the material of this meshbuffer - /** \return Material of this buffer. */ - virtual const video::SMaterial& getMaterial() const =0; - - //! Get the axis aligned bounding box of this meshbuffer. - /** \return Axis aligned bounding box of this buffer. */ - virtual const core::aabbox3df& getBoundingBox() const =0; - - //! Set axis aligned bounding box - /** \param box User defined axis aligned bounding box to use - for this buffer. */ - virtual void setBoundingBox(const core::aabbox3df& box) =0; - - //! Recalculates the bounding box. Should be called if the mesh changed. - virtual void recalculateBoundingBox() =0; - - //! Append the vertices and indices to the current buffer - /** Only works for compatible vertex types. - \param vertices Pointer to a vertex array. - \param numVertices Number of vertices in the array. - \param indices Pointer to index array. - \param numIndices Number of indices in array. */ - virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) - { - - } - - //! Append the meshbuffer to the current buffer - /** Only works for compatible vertex types - \param other Buffer to append to this one. */ - virtual void append(const IMeshBuffer* const other) - { - - } - - // ------------------- To be removed? ------------------- // - - //! get the current hardware mapping hint - virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const - { - return getVertexBuffer().getHardwareMappingHint(); - } - - //! get the current hardware mapping hint - virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const - { - return getIndexBuffer().getHardwareMappingHint(); - } - - //! set the hardware mapping hint, for driver - virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX ) - { - if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX) - getVertexBuffer().setHardwareMappingHint(NewMappingHint); - if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX) - getIndexBuffer().setHardwareMappingHint(NewMappingHint); - } - - //! flags the mesh as changed, reloads hardware buffers - virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) - { - if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX) - getVertexBuffer().setDirty(); - if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX) - getIndexBuffer().setDirty(); - } - - virtual u32 getChangedID_Vertex() const - { - return getVertexBuffer().getChangedID(); - } - - virtual u32 getChangedID_Index() const - { - return getIndexBuffer().getChangedID(); - } - - // ------------------- Old interface ------------------- // - - //! Get type of vertex data which is stored in this meshbuffer. - /** \return Vertex type of this buffer. */ - virtual video::E_VERTEX_TYPE getVertexType() const - { - return getVertexBuffer().getType(); - } - - //! Get access to vertex data. The data is an array of vertices. - /** Which vertex type is used can be determined by getVertexType(). - \return Pointer to array of vertices. */ - virtual const void* getVertices() const - { - return getVertexBuffer().getData(); - } - - //! Get access to vertex data. The data is an array of vertices. - /** Which vertex type is used can be determined by getVertexType(). - \return Pointer to array of vertices. */ - virtual void* getVertices() - { - return getVertexBuffer().getData(); - } - - //! Get amount of vertices in meshbuffer. - /** \return Number of vertices in this buffer. */ - virtual u32 getVertexCount() const - { - return getVertexBuffer().size(); - } - - //! Get type of index data which is stored in this meshbuffer. - /** \return Index type of this buffer. */ - virtual video::E_INDEX_TYPE getIndexType() const - { - return getIndexBuffer().getType(); - } - - //! Get access to Indices. - /** \return Pointer to indices array. */ - virtual const u16* getIndices() const - { - return (u16*)getIndexBuffer().getData(); - } - - //! Get access to Indices. - /** \return Pointer to indices array. */ - virtual u16* getIndices() - { - return (u16*)getIndexBuffer().getData(); - } - - //! Get amount of indices in this meshbuffer. - /** \return Number of indices in this buffer. */ - virtual u32 getIndexCount() const - { - return getIndexBuffer().size(); - } - - //! returns position of vertex i - virtual const core::vector3df& getPosition(u32 i) const - { - return getVertexBuffer()[i].Pos; - } - - //! returns position of vertex i - virtual core::vector3df& getPosition(u32 i) - { - return getVertexBuffer()[i].Pos; - } - - //! returns texture coords of vertex i - virtual const core::vector2df& getTCoords(u32 i) const - { - return getVertexBuffer()[i].TCoords; - } - - //! returns texture coords of vertex i - virtual core::vector2df& getTCoords(u32 i) - { - return getVertexBuffer()[i].TCoords; - } - - //! returns normal of vertex i - virtual const core::vector3df& getNormal(u32 i) const - { - return getVertexBuffer()[i].Normal; - } - - //! returns normal of vertex i - virtual core::vector3df& getNormal(u32 i) - { - return getVertexBuffer()[i].Normal; - } - }; - - -} // end namespace scene -} // end namespace irr - -#endif - - diff --git a/builddir/irrlicht-1.8.1/include/IEventReceiver.h b/builddir/irrlicht-1.8.1/include/IEventReceiver.h deleted file mode 100644 index 9c7813f..0000000 --- a/builddir/irrlicht-1.8.1/include/IEventReceiver.h +++ /dev/null @@ -1,490 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_EVENT_RECEIVER_H_INCLUDED__ -#define __I_EVENT_RECEIVER_H_INCLUDED__ - -#include "ILogger.h" -#include "Keycodes.h" -#include "irrString.h" - -namespace irr -{ - //! Enumeration for all event types there are. - enum EEVENT_TYPE - { - //! An event of the graphical user interface. - /** GUI events are created by the GUI environment or the GUI elements in response - to mouse or keyboard events. When a GUI element receives an event it will either - process it and return true, or pass the event to its parent. If an event is not absorbed - before it reaches the root element then it will then be passed to the user receiver. */ - EET_GUI_EVENT = 0, - - //! A mouse input event. - /** Mouse events are created by the device and passed to IrrlichtDevice::postEventFromUser - in response to mouse input received from the operating system. - Mouse events are first passed to the user receiver, then to the GUI environment and its elements, - then finally the input receiving scene manager where it is passed to the active camera. - */ - EET_MOUSE_INPUT_EVENT, - - //! A key input event. - /** Like mouse events, keyboard events are created by the device and passed to - IrrlichtDevice::postEventFromUser. They take the same path as mouse events. */ - EET_KEY_INPUT_EVENT, - - //! A joystick (joypad, gamepad) input event. - /** Joystick events are created by polling all connected joysticks once per - device run() and then passing the events to IrrlichtDevice::postEventFromUser. - They take the same path as mouse events. - Windows, SDL: Implemented. - Linux: Implemented, with POV hat issues. - MacOS / Other: Not yet implemented. - */ - EET_JOYSTICK_INPUT_EVENT, - - //! A log event - /** Log events are only passed to the user receiver if there is one. If they are absorbed by the - user receiver then no text will be sent to the console. */ - EET_LOG_TEXT_EVENT, - - //! A user event with user data. - /** This is not used by Irrlicht and can be used to send user - specific data though the system. The Irrlicht 'window handle' - can be obtained from IrrlichtDevice::getExposedVideoData() - The usage and behavior depends on the operating system: - Windows: send a WM_USER message to the Irrlicht Window; the - wParam and lParam will be used to populate the - UserData1 and UserData2 members of the SUserEvent. - Linux: send a ClientMessage via XSendEvent to the Irrlicht - Window; the data.l[0] and data.l[1] members will be - casted to s32 and used as UserData1 and UserData2. - MacOS: Not yet implemented - */ - EET_USER_EVENT, - - //! This enum is never used, it only forces the compiler to - //! compile these enumeration values to 32 bit. - EGUIET_FORCE_32_BIT = 0x7fffffff - - }; - - //! Enumeration for all mouse input events - enum EMOUSE_INPUT_EVENT - { - //! Left mouse button was pressed down. - EMIE_LMOUSE_PRESSED_DOWN = 0, - - //! Right mouse button was pressed down. - EMIE_RMOUSE_PRESSED_DOWN, - - //! Middle mouse button was pressed down. - EMIE_MMOUSE_PRESSED_DOWN, - - //! Left mouse button was left up. - EMIE_LMOUSE_LEFT_UP, - - //! Right mouse button was left up. - EMIE_RMOUSE_LEFT_UP, - - //! Middle mouse button was left up. - EMIE_MMOUSE_LEFT_UP, - - //! The mouse cursor changed its position. - EMIE_MOUSE_MOVED, - - //! The mouse wheel was moved. Use Wheel value in event data to find out - //! in what direction and how fast. - EMIE_MOUSE_WHEEL, - - //! Left mouse button double click. - //! This event is generated after the second EMIE_LMOUSE_PRESSED_DOWN event. - EMIE_LMOUSE_DOUBLE_CLICK, - - //! Right mouse button double click. - //! This event is generated after the second EMIE_RMOUSE_PRESSED_DOWN event. - EMIE_RMOUSE_DOUBLE_CLICK, - - //! Middle mouse button double click. - //! This event is generated after the second EMIE_MMOUSE_PRESSED_DOWN event. - EMIE_MMOUSE_DOUBLE_CLICK, - - //! Left mouse button triple click. - //! This event is generated after the third EMIE_LMOUSE_PRESSED_DOWN event. - EMIE_LMOUSE_TRIPLE_CLICK, - - //! Right mouse button triple click. - //! This event is generated after the third EMIE_RMOUSE_PRESSED_DOWN event. - EMIE_RMOUSE_TRIPLE_CLICK, - - //! Middle mouse button triple click. - //! This event is generated after the third EMIE_MMOUSE_PRESSED_DOWN event. - EMIE_MMOUSE_TRIPLE_CLICK, - - //! No real event. Just for convenience to get number of events - EMIE_COUNT - }; - - //! Masks for mouse button states - enum E_MOUSE_BUTTON_STATE_MASK - { - EMBSM_LEFT = 0x01, - EMBSM_RIGHT = 0x02, - EMBSM_MIDDLE = 0x04, - - //! currently only on windows - EMBSM_EXTRA1 = 0x08, - - //! currently only on windows - EMBSM_EXTRA2 = 0x10, - - EMBSM_FORCE_32_BIT = 0x7fffffff - }; - - namespace gui - { - - class IGUIElement; - - //! Enumeration for all events which are sendable by the gui system - enum EGUI_EVENT_TYPE - { - //! A gui element has lost its focus. - /** GUIEvent.Caller is losing the focus to GUIEvent.Element. - If the event is absorbed then the focus will not be changed. */ - EGET_ELEMENT_FOCUS_LOST = 0, - - //! A gui element has got the focus. - /** If the event is absorbed then the focus will not be changed. */ - EGET_ELEMENT_FOCUSED, - - //! The mouse cursor hovered over a gui element. - /** If an element has sub-elements you also get this message for the subelements */ - EGET_ELEMENT_HOVERED, - - //! The mouse cursor left the hovered element. - /** If an element has sub-elements you also get this message for the subelements */ - EGET_ELEMENT_LEFT, - - //! An element would like to close. - /** Windows and context menus use this event when they would like to close, - this can be cancelled by absorbing the event. */ - EGET_ELEMENT_CLOSED, - - //! A button was clicked. - EGET_BUTTON_CLICKED, - - //! A scrollbar has changed its position. - EGET_SCROLL_BAR_CHANGED, - - //! A checkbox has changed its check state. - EGET_CHECKBOX_CHANGED, - - //! A new item in a listbox was selected. - /** NOTE: You also get this event currently when the same item was clicked again after more than 500 ms. */ - EGET_LISTBOX_CHANGED, - - //! An item in the listbox was selected, which was already selected. - /** NOTE: You get the event currently only if the item was clicked again within 500 ms or selected by "enter" or "space". */ - EGET_LISTBOX_SELECTED_AGAIN, - - //! A file has been selected in the file dialog - EGET_FILE_SELECTED, - - //! A directory has been selected in the file dialog - EGET_DIRECTORY_SELECTED, - - //! A file open dialog has been closed without choosing a file - EGET_FILE_CHOOSE_DIALOG_CANCELLED, - - //! 'Yes' was clicked on a messagebox - EGET_MESSAGEBOX_YES, - - //! 'No' was clicked on a messagebox - EGET_MESSAGEBOX_NO, - - //! 'OK' was clicked on a messagebox - EGET_MESSAGEBOX_OK, - - //! 'Cancel' was clicked on a messagebox - EGET_MESSAGEBOX_CANCEL, - - //! In an editbox 'ENTER' was pressed - EGET_EDITBOX_ENTER, - - //! The text in an editbox was changed. This does not include automatic changes in text-breaking. - EGET_EDITBOX_CHANGED, - - //! The marked area in an editbox was changed. - EGET_EDITBOX_MARKING_CHANGED, - - //! The tab was changed in an tab control - EGET_TAB_CHANGED, - - //! A menu item was selected in a (context) menu - EGET_MENU_ITEM_SELECTED, - - //! The selection in a combo box has been changed - EGET_COMBO_BOX_CHANGED, - - //! The value of a spin box has changed - EGET_SPINBOX_CHANGED, - - //! A table has changed - EGET_TABLE_CHANGED, - EGET_TABLE_HEADER_CHANGED, - EGET_TABLE_SELECTED_AGAIN, - - //! A tree view node lost selection. See IGUITreeView::getLastEventNode(). - EGET_TREEVIEW_NODE_DESELECT, - - //! A tree view node was selected. See IGUITreeView::getLastEventNode(). - EGET_TREEVIEW_NODE_SELECT, - - //! A tree view node was expanded. See IGUITreeView::getLastEventNode(). - EGET_TREEVIEW_NODE_EXPAND, - - //! A tree view node was collapsed. See IGUITreeView::getLastEventNode(). - EGET_TREEVIEW_NODE_COLLAPSE, - - //! deprecated - use EGET_TREEVIEW_NODE_COLLAPSE instead. This - //! may be removed by Irrlicht 1.9 - EGET_TREEVIEW_NODE_COLLAPS = EGET_TREEVIEW_NODE_COLLAPSE, - - //! No real event. Just for convenience to get number of events - EGET_COUNT - }; - } // end namespace gui - - -//! SEvents hold information about an event. See irr::IEventReceiver for details on event handling. -struct SEvent -{ - //! Any kind of GUI event. - struct SGUIEvent - { - //! IGUIElement who called the event - gui::IGUIElement* Caller; - - //! If the event has something to do with another element, it will be held here. - gui::IGUIElement* Element; - - //! Type of GUI Event - gui::EGUI_EVENT_TYPE EventType; - - }; - - //! Any kind of mouse event. - struct SMouseInput - { - //! X position of mouse cursor - s32 X; - - //! Y position of mouse cursor - s32 Y; - - //! mouse wheel delta, often 1.0 or -1.0, but can have other values < 0.f or > 0.f; - /** Only valid if event was EMIE_MOUSE_WHEEL */ - f32 Wheel; - - //! True if shift was also pressed - bool Shift:1; - - //! True if ctrl was also pressed - bool Control:1; - - //! A bitmap of button states. You can use isButtonPressed() to determine - //! if a button is pressed or not. - //! Currently only valid if the event was EMIE_MOUSE_MOVED - u32 ButtonStates; - - //! Is the left button pressed down? - bool isLeftPressed() const { return 0 != ( ButtonStates & EMBSM_LEFT ); } - - //! Is the right button pressed down? - bool isRightPressed() const { return 0 != ( ButtonStates & EMBSM_RIGHT ); } - - //! Is the middle button pressed down? - bool isMiddlePressed() const { return 0 != ( ButtonStates & EMBSM_MIDDLE ); } - - //! Type of mouse event - EMOUSE_INPUT_EVENT Event; - }; - - //! Any kind of keyboard event. - struct SKeyInput - { - //! Character corresponding to the key (0, if not a character) - wchar_t Char; - - //! Key which has been pressed or released - EKEY_CODE Key; - - //! If not true, then the key was left up - bool PressedDown:1; - - //! True if shift was also pressed - bool Shift:1; - - //! True if ctrl was also pressed - bool Control:1; - }; - - //! A joystick event. - /** Unlike other events, joystick events represent the result of polling - * each connected joystick once per run() of the device. Joystick events will - * not be generated by default. If joystick support is available for the - * active device, _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ is defined, and - * @ref irr::IrrlichtDevice::activateJoysticks() has been called, an event of - * this type will be generated once per joystick per @ref IrrlichtDevice::run() - * regardless of whether the state of the joystick has actually changed. */ - struct SJoystickEvent - { - enum - { - NUMBER_OF_BUTTONS = 32, - - AXIS_X = 0, // e.g. analog stick 1 left to right - AXIS_Y, // e.g. analog stick 1 top to bottom - AXIS_Z, // e.g. throttle, or analog 2 stick 2 left to right - AXIS_R, // e.g. rudder, or analog 2 stick 2 top to bottom - AXIS_U, - AXIS_V, - NUMBER_OF_AXES - }; - - /** A bitmap of button states. You can use IsButtonPressed() to - ( check the state of each button from 0 to (NUMBER_OF_BUTTONS - 1) */ - u32 ButtonStates; - - /** For AXIS_X, AXIS_Y, AXIS_Z, AXIS_R, AXIS_U and AXIS_V - * Values are in the range -32768 to 32767, with 0 representing - * the center position. You will receive the raw value from the - * joystick, and so will usually want to implement a dead zone around - * the center of the range. Axes not supported by this joystick will - * always have a value of 0. On Linux, POV hats are represented as axes, - * usually the last two active axis. - */ - s16 Axis[NUMBER_OF_AXES]; - - /** The POV represents the angle of the POV hat in degrees * 100, - * from 0 to 35,900. A value of 65535 indicates that the POV hat - * is centered (or not present). - * This value is only supported on Windows. On Linux, the POV hat - * will be sent as 2 axes instead. */ - u16 POV; - - //! The ID of the joystick which generated this event. - /** This is an internal Irrlicht index; it does not map directly - * to any particular hardware joystick. */ - u8 Joystick; - - //! A helper function to check if a button is pressed. - bool IsButtonPressed(u32 button) const - { - if(button >= (u32)NUMBER_OF_BUTTONS) - return false; - - return (ButtonStates & (1 << button)) ? true : false; - } - }; - - - //! Any kind of log event. - struct SLogEvent - { - //! Pointer to text which has been logged - const c8* Text; - - //! Log level in which the text has been logged - ELOG_LEVEL Level; - }; - - //! Any kind of user event. - struct SUserEvent - { - //! Some user specified data as int - s32 UserData1; - - //! Another user specified data as int - s32 UserData2; - }; - - EEVENT_TYPE EventType; - union - { - struct SGUIEvent GUIEvent; - struct SMouseInput MouseInput; - struct SKeyInput KeyInput; - struct SJoystickEvent JoystickEvent; - struct SLogEvent LogEvent; - struct SUserEvent UserEvent; - }; - -}; - -//! Interface of an object which can receive events. -/** Many of the engine's classes inherit IEventReceiver so they are able to -process events. Events usually start at a postEventFromUser function and are -passed down through a chain of event receivers until OnEvent returns true. See -irr::EEVENT_TYPE for a description of where each type of event starts, and the -path it takes through the system. */ -class IEventReceiver -{ -public: - - //! Destructor - virtual ~IEventReceiver() {} - - //! Called if an event happened. - /** Please take care that you should only return 'true' when you want to _prevent_ Irrlicht - * from processing the event any further. So 'true' does mean that an event is completely done. - * Therefore your return value for all unprocessed events should be 'false'. - \return True if the event was processed. - */ - virtual bool OnEvent(const SEvent& event) = 0; -}; - - -//! Information on a joystick, returned from @ref irr::IrrlichtDevice::activateJoysticks() -struct SJoystickInfo -{ - //! The ID of the joystick - /** This is an internal Irrlicht index; it does not map directly - * to any particular hardware joystick. It corresponds to the - * irr::SJoystickEvent Joystick ID. */ - u8 Joystick; - - //! The name that the joystick uses to identify itself. - core::stringc Name; - - //! The number of buttons that the joystick has. - u32 Buttons; - - //! The number of axes that the joystick has, i.e. X, Y, Z, R, U, V. - /** Note: with a Linux device, the POV hat (if any) will use two axes. These - * will be included in this count. */ - u32 Axes; - - //! An indication of whether the joystick has a POV hat. - /** A Windows device will identify the presence or absence or the POV hat. A - * Linux device cannot, and will always return POV_HAT_UNKNOWN. */ - enum - { - //! A hat is definitely present. - POV_HAT_PRESENT, - - //! A hat is definitely not present. - POV_HAT_ABSENT, - - //! The presence or absence of a hat cannot be determined. - POV_HAT_UNKNOWN - } PovHat; -}; // struct SJoystickInfo - - -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IFileArchive.h b/builddir/irrlicht-1.8.1/include/IFileArchive.h deleted file mode 100644 index 8bf8cad..0000000 --- a/builddir/irrlicht-1.8.1/include/IFileArchive.h +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt/ Thomas Alten -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_FILE_ARCHIVE_H_INCLUDED__ -#define __I_FILE_ARCHIVE_H_INCLUDED__ - -#include "IReadFile.h" -#include "IFileList.h" - -namespace irr -{ - -namespace io -{ - -//! FileSystemType: which Filesystem should be used for e.g. browsing -enum EFileSystemType -{ - FILESYSTEM_NATIVE = 0, // Native OS FileSystem - FILESYSTEM_VIRTUAL // Virtual FileSystem -}; - -//! Contains the different types of archives -enum E_FILE_ARCHIVE_TYPE -{ - //! A PKZIP archive - EFAT_ZIP = MAKE_IRR_ID('Z','I','P', 0), - - //! A gzip archive - EFAT_GZIP = MAKE_IRR_ID('g','z','i','p'), - - //! A virtual directory - EFAT_FOLDER = MAKE_IRR_ID('f','l','d','r'), - - //! An ID Software PAK archive - EFAT_PAK = MAKE_IRR_ID('P','A','K', 0), - - //! A Nebula Device archive - EFAT_NPK = MAKE_IRR_ID('N','P','K', 0), - - //! A Tape ARchive - EFAT_TAR = MAKE_IRR_ID('T','A','R', 0), - - //! A wad Archive, Quake2, Halflife - EFAT_WAD = MAKE_IRR_ID('W','A','D', 0), - - //! The type of this archive is unknown - EFAT_UNKNOWN = MAKE_IRR_ID('u','n','k','n') -}; - -//! The FileArchive manages archives and provides access to files inside them. -class IFileArchive : public virtual IReferenceCounted -{ -public: - - //! Opens a file based on its name - /** Creates and returns a new IReadFile for a file in the archive. - \param filename The file to open - \return Returns A pointer to the created file on success, - or 0 on failure. */ - virtual IReadFile* createAndOpenFile(const path& filename) =0; - - //! Opens a file based on its position in the file list. - /** Creates and returns - \param index The zero based index of the file. - \return Returns a pointer to the created file on success, or 0 on failure. */ - virtual IReadFile* createAndOpenFile(u32 index) =0; - - //! Returns the complete file tree - /** \return Returns the complete directory tree for the archive, - including all files and folders */ - virtual const IFileList* getFileList() const =0; - - //! get the archive type - virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_UNKNOWN; } - - //! An optionally used password string - /** This variable is publicly accessible from the interface in order to - avoid single access patterns to this place, and hence allow some more - obscurity. - */ - core::stringc Password; -}; - -//! Class which is able to create an archive from a file. -/** If you want the Irrlicht Engine be able to load archives of -currently unsupported file formats (e.g .wad), then implement -this and add your new Archive loader with -IFileSystem::addArchiveLoader() to the engine. */ -class IArchiveLoader : public virtual IReferenceCounted -{ -public: - //! Check if the file might be loaded by this class - /** Check based on the file extension (e.g. ".zip") - \param filename Name of file to check. - \return True if file seems to be loadable. */ - virtual bool isALoadableFileFormat(const path& filename) const =0; - - //! Check if the file might be loaded by this class - /** This check may look into the file. - \param file File handle to check. - \return True if file seems to be loadable. */ - virtual bool isALoadableFileFormat(io::IReadFile* file) const =0; - - //! Check to see if the loader can create archives of this type. - /** Check based on the archive type. - \param fileType The archive type to check. - \return True if the archile loader supports this type, false if not */ - virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const =0; - - //! Creates an archive from the filename - /** \param filename File to use. - \param ignoreCase Searching is performed without regarding the case - \param ignorePaths Files are searched for without checking for the directories - \return Pointer to newly created archive, or 0 upon error. */ - virtual IFileArchive* createArchive(const path& filename, bool ignoreCase, bool ignorePaths) const =0; - - //! Creates an archive from the file - /** \param file File handle to use. - \param ignoreCase Searching is performed without regarding the case - \param ignorePaths Files are searched for without checking for the directories - \return Pointer to newly created archive, or 0 upon error. */ - virtual IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const =0; -}; - - -} // end namespace io -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IFileList.h b/builddir/irrlicht-1.8.1/include/IFileList.h deleted file mode 100644 index 2eabd7c..0000000 --- a/builddir/irrlicht-1.8.1/include/IFileList.h +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_FILE_LIST_H_INCLUDED__ -#define __I_FILE_LIST_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "path.h" - -namespace irr -{ -namespace io -{ - -//! Provides a list of files and folders. -/** File lists usually contain a list of all files in a given folder, -but can also contain a complete directory structure. */ -class IFileList : public virtual IReferenceCounted -{ -public: - //! Get the number of files in the filelist. - /** \return Amount of files and directories in the file list. */ - virtual u32 getFileCount() const = 0; - - //! Gets the name of a file in the list, based on an index. - /** The path is not included in this name. Use getFullFileName for this. - \param index is the zero based index of the file which name should - be returned. The index must be less than the amount getFileCount() returns. - \return File name of the file. Returns 0, if an error occured. */ - virtual const io::path& getFileName(u32 index) const = 0; - - //! Gets the full name of a file in the list including the path, based on an index. - /** \param index is the zero based index of the file which name should - be returned. The index must be less than the amount getFileCount() returns. - \return File name of the file. Returns 0 if an error occured. */ - virtual const io::path& getFullFileName(u32 index) const = 0; - - //! Returns the size of a file in the file list, based on an index. - /** \param index is the zero based index of the file which should be returned. - The index must be less than the amount getFileCount() returns. - \return The size of the file in bytes. */ - virtual u32 getFileSize(u32 index) const = 0; - - //! Returns the file offset of a file in the file list, based on an index. - /** \param index is the zero based index of the file which should be returned. - The index must be less than the amount getFileCount() returns. - \return The offset of the file in bytes. */ - virtual u32 getFileOffset(u32 index) const = 0; - - //! Returns the ID of a file in the file list, based on an index. - /** This optional ID can be used to link the file list entry to information held - elsewhere. For example this could be an index in an IFileArchive, linking the entry - to its data offset, uncompressed size and CRC. - \param index is the zero based index of the file which should be returned. - The index must be less than the amount getFileCount() returns. - \return The ID of the file. */ - virtual u32 getID(u32 index) const = 0; - - //! Check if the file is a directory - /** \param index The zero based index which will be checked. The index - must be less than the amount getFileCount() returns. - \return True if the file is a directory, else false. */ - virtual bool isDirectory(u32 index) const = 0; - - //! Searches for a file or folder in the list - /** Searches for a file by name - \param filename The name of the file to search for. - \param isFolder True if you are searching for a directory path, false if you are searching for a file - \return Returns the index of the file in the file list, or -1 if - no matching name name was found. */ - virtual s32 findFile(const io::path& filename, bool isFolder=false) const = 0; - - //! Returns the base path of the file list - virtual const io::path& getPath() const = 0; - - //! Add as a file or folder to the list - /** \param fullPath The file name including path, from the root of the file list. - \param isDirectory True if this is a directory rather than a file. - \param offset The file offset inside an archive - \param size The size of the file in bytes. - \param id The ID of the file in the archive which owns it */ - virtual u32 addItem(const io::path& fullPath, u32 offset, u32 size, bool isDirectory, u32 id=0) = 0; - - //! Sorts the file list. You should call this after adding any items to the file list - virtual void sort() = 0; -}; - -} // end namespace irr -} // end namespace io - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IFileSystem.h b/builddir/irrlicht-1.8.1/include/IFileSystem.h deleted file mode 100644 index 0c5244d..0000000 --- a/builddir/irrlicht-1.8.1/include/IFileSystem.h +++ /dev/null @@ -1,385 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_FILE_SYSTEM_H_INCLUDED__ -#define __I_FILE_SYSTEM_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "IXMLReader.h" -#include "IFileArchive.h" - -namespace irr -{ -namespace video -{ - class IVideoDriver; -} // end namespace video -namespace io -{ - -class IReadFile; -class IWriteFile; -class IFileList; -class IXMLWriter; -class IAttributes; - - -//! The FileSystem manages files and archives and provides access to them. -/** It manages where files are, so that modules which use the the IO do not -need to know where every file is located. A file could be in a .zip-Archive or -as file on disk, using the IFileSystem makes no difference to this. */ -class IFileSystem : public virtual IReferenceCounted -{ -public: - - //! Opens a file for read access. - /** \param filename: Name of file to open. - \return Pointer to the created file interface. - The returned pointer should be dropped when no longer needed. - See IReferenceCounted::drop() for more information. */ - virtual IReadFile* createAndOpenFile(const path& filename) =0; - - //! Creates an IReadFile interface for accessing memory like a file. - /** This allows you to use a pointer to memory where an IReadFile is requested. - \param memory: A pointer to the start of the file in memory - \param len: The length of the memory in bytes - \param fileName: The name given to this file - \param deleteMemoryWhenDropped: True if the memory should be deleted - along with the IReadFile when it is dropped. - \return Pointer to the created file interface. - The returned pointer should be dropped when no longer needed. - See IReferenceCounted::drop() for more information. - */ - virtual IReadFile* createMemoryReadFile(void* memory, s32 len, const path& fileName, bool deleteMemoryWhenDropped=false) =0; - - //! Creates an IReadFile interface for accessing files inside files. - /** This is useful e.g. for archives. - \param fileName: The name given to this file - \param alreadyOpenedFile: Pointer to the enclosing file - \param pos: Start of the file inside alreadyOpenedFile - \param areaSize: The length of the file - \return A pointer to the created file interface. - The returned pointer should be dropped when no longer needed. - See IReferenceCounted::drop() for more information. - */ - virtual IReadFile* createLimitReadFile(const path& fileName, - IReadFile* alreadyOpenedFile, long pos, long areaSize) =0; - - //! Creates an IWriteFile interface for accessing memory like a file. - /** This allows you to use a pointer to memory where an IWriteFile is requested. - You are responsible for allocating enough memory. - \param memory: A pointer to the start of the file in memory (allocated by you) - \param len: The length of the memory in bytes - \param fileName: The name given to this file - \param deleteMemoryWhenDropped: True if the memory should be deleted - along with the IWriteFile when it is dropped. - \return Pointer to the created file interface. - The returned pointer should be dropped when no longer needed. - See IReferenceCounted::drop() for more information. - */ - virtual IWriteFile* createMemoryWriteFile(void* memory, s32 len, const path& fileName, bool deleteMemoryWhenDropped=false) =0; - - - //! Opens a file for write access. - /** \param filename: Name of file to open. - \param append: If the file already exist, all write operations are - appended to the file. - \return Pointer to the created file interface. 0 is returned, if the - file could not created or opened for writing. - The returned pointer should be dropped when no longer needed. - See IReferenceCounted::drop() for more information. */ - virtual IWriteFile* createAndWriteFile(const path& filename, bool append=false) =0; - - //! Adds an archive to the file system. - /** After calling this, the Irrlicht Engine will also search and open - files directly from this archive. This is useful for hiding data from - the end user, speeding up file access and making it possible to access - for example Quake3 .pk3 files, which are just renamed .zip files. By - default Irrlicht supports ZIP, PAK, TAR, PNK, and directories as - archives. You can provide your own archive types by implementing - IArchiveLoader and passing an instance to addArchiveLoader. - Irrlicht supports AES-encrypted zip files, and the advanced compression - techniques lzma and bzip2. - \param filename: Filename of the archive to add to the file system. - \param ignoreCase: If set to true, files in the archive can be accessed without - writing all letters in the right case. - \param ignorePaths: If set to true, files in the added archive can be accessed - without its complete path. - \param archiveType: If no specific E_FILE_ARCHIVE_TYPE is selected then - the type of archive will depend on the extension of the file name. If - you use a different extension then you can use this parameter to force - a specific type of archive. - \param password An optional password, which is used in case of encrypted archives. - \param retArchive A pointer that will be set to the archive that is added. - \return True if the archive was added successfully, false if not. */ - virtual bool addFileArchive(const path& filename, bool ignoreCase=true, - bool ignorePaths=true, - E_FILE_ARCHIVE_TYPE archiveType=EFAT_UNKNOWN, - const core::stringc& password="", - IFileArchive** retArchive=0) =0; - - //! Adds an archive to the file system. - /** After calling this, the Irrlicht Engine will also search and open - files directly from this archive. This is useful for hiding data from - the end user, speeding up file access and making it possible to access - for example Quake3 .pk3 files, which are just renamed .zip files. By - default Irrlicht supports ZIP, PAK, TAR, PNK, and directories as - archives. You can provide your own archive types by implementing - IArchiveLoader and passing an instance to addArchiveLoader. - Irrlicht supports AES-encrypted zip files, and the advanced compression - techniques lzma and bzip2. - If you want to add a directory as an archive, prefix its name with a - slash in order to let Irrlicht recognize it as a folder mount (mypath/). - Using this technique one can build up a search order, because archives - are read first, and can be used more easily with relative filenames. - \param file: Archive to add to the file system. - \param ignoreCase: If set to true, files in the archive can be accessed without - writing all letters in the right case. - \param ignorePaths: If set to true, files in the added archive can be accessed - without its complete path. - \param archiveType: If no specific E_FILE_ARCHIVE_TYPE is selected then - the type of archive will depend on the extension of the file name. If - you use a different extension then you can use this parameter to force - a specific type of archive. - \param password An optional password, which is used in case of encrypted archives. - \param retArchive A pointer that will be set to the archive that is added. - \return True if the archive was added successfully, false if not. */ - virtual bool addFileArchive(IReadFile* file, bool ignoreCase=true, - bool ignorePaths=true, - E_FILE_ARCHIVE_TYPE archiveType=EFAT_UNKNOWN, - const core::stringc& password="", - IFileArchive** retArchive=0) =0; - - //! Adds an archive to the file system. - /** \param archive: The archive to add to the file system. - \return True if the archive was added successfully, false if not. */ - virtual bool addFileArchive(IFileArchive* archive) =0; - - //! Get the number of archives currently attached to the file system - virtual u32 getFileArchiveCount() const =0; - - //! Removes an archive from the file system. - /** This will close the archive and free any file handles, but will not - close resources which have already been loaded and are now cached, for - example textures and meshes. - \param index: The index of the archive to remove - \return True on success, false on failure */ - virtual bool removeFileArchive(u32 index) =0; - - //! Removes an archive from the file system. - /** This will close the archive and free any file handles, but will not - close resources which have already been loaded and are now cached, for - example textures and meshes. Note that a relative filename might be - interpreted differently on each call, depending on the current working - directory. In case you want to remove an archive that was added using - a relative path name, you have to change to the same working directory - again. This means, that the filename given on creation is not an - identifier for the archive, but just a usual filename that is used for - locating the archive to work with. - \param filename The archive pointed to by the name will be removed - \return True on success, false on failure */ - virtual bool removeFileArchive(const path& filename) =0; - - //! Removes an archive from the file system. - /** This will close the archive and free any file handles, but will not - close resources which have already been loaded and are now cached, for - example textures and meshes. - \param archive The archive to remove. - \return True on success, false on failure */ - virtual bool removeFileArchive(const IFileArchive* archive) =0; - - //! Changes the search order of attached archives. - /** - \param sourceIndex: The index of the archive to change - \param relative: The relative change in position, archives with a lower index are searched first */ - virtual bool moveFileArchive(u32 sourceIndex, s32 relative) =0; - - //! Get the archive at a given index. - virtual IFileArchive* getFileArchive(u32 index) =0; - - //! Adds an external archive loader to the engine. - /** Use this function to add support for new archive types to the - engine, for example proprietary or encrypted file storage. */ - virtual void addArchiveLoader(IArchiveLoader* loader) =0; - - //! Gets the number of archive loaders currently added - virtual u32 getArchiveLoaderCount() const = 0; - - //! Retrieve the given archive loader - /** \param index The index of the loader to retrieve. This parameter is an 0-based - array index. - \return A pointer to the specified loader, 0 if the index is incorrect. */ - virtual IArchiveLoader* getArchiveLoader(u32 index) const = 0; - - //! Adds a zip archive to the file system. - /** \deprecated This function is provided for compatibility - with older versions of Irrlicht and may be removed in Irrlicht 1.9, - you should use addFileArchive instead. - After calling this, the Irrlicht Engine will search and open files directly from this archive too. - This is useful for hiding data from the end user, speeding up file access and making it possible to - access for example Quake3 .pk3 files, which are no different than .zip files. - \param filename: Filename of the zip archive to add to the file system. - \param ignoreCase: If set to true, files in the archive can be accessed without - writing all letters in the right case. - \param ignorePaths: If set to true, files in the added archive can be accessed - without its complete path. - \return True if the archive was added successfully, false if not. */ - _IRR_DEPRECATED_ virtual bool addZipFileArchive(const c8* filename, bool ignoreCase=true, bool ignorePaths=true) - { - return addFileArchive(filename, ignoreCase, ignorePaths, EFAT_ZIP); - } - - //! Adds an unzipped archive (or basedirectory with subdirectories..) to the file system. - /** \deprecated This function is provided for compatibility - with older versions of Irrlicht and may be removed in Irrlicht 1.9, - you should use addFileArchive instead. - Useful for handling data which will be in a zip file - \param filename: Filename of the unzipped zip archive base directory to add to the file system. - \param ignoreCase: If set to true, files in the archive can be accessed without - writing all letters in the right case. - \param ignorePaths: If set to true, files in the added archive can be accessed - without its complete path. - \return True if the archive was added successful, false if not. */ - _IRR_DEPRECATED_ virtual bool addFolderFileArchive(const c8* filename, bool ignoreCase=true, bool ignorePaths=true) - { - return addFileArchive(filename, ignoreCase, ignorePaths, EFAT_FOLDER); - } - - //! Adds a pak archive to the file system. - /** \deprecated This function is provided for compatibility - with older versions of Irrlicht and may be removed in Irrlicht 1.9, - you should use addFileArchive instead. - After calling this, the Irrlicht Engine will search and open files directly from this archive too. - This is useful for hiding data from the end user, speeding up file access and making it possible to - access for example Quake2/KingPin/Hexen2 .pak files - \param filename: Filename of the pak archive to add to the file system. - \param ignoreCase: If set to true, files in the archive can be accessed without - writing all letters in the right case. - \param ignorePaths: If set to true, files in the added archive can be accessed - without its complete path.(should not use with Quake2 paks - \return True if the archive was added successful, false if not. */ - _IRR_DEPRECATED_ virtual bool addPakFileArchive(const c8* filename, bool ignoreCase=true, bool ignorePaths=true) - { - return addFileArchive(filename, ignoreCase, ignorePaths, EFAT_PAK); - } - - //! Get the current working directory. - /** \return Current working directory as a string. */ - virtual const path& getWorkingDirectory() =0; - - //! Changes the current working directory. - /** \param newDirectory: A string specifying the new working directory. - The string is operating system dependent. Under Windows it has - the form "<drive>:\<directory>\<sudirectory>\<..>". An example would be: "C:\Windows\" - \return True if successful, otherwise false. */ - virtual bool changeWorkingDirectoryTo(const path& newDirectory) =0; - - //! Converts a relative path to an absolute (unique) path, resolving symbolic links if required - /** \param filename Possibly relative file or directory name to query. - \result Absolute filename which points to the same file. */ - virtual path getAbsolutePath(const path& filename) const =0; - - //! Get the directory a file is located in. - /** \param filename: The file to get the directory from. - \return String containing the directory of the file. */ - virtual path getFileDir(const path& filename) const =0; - - //! Get the base part of a filename, i.e. the name without the directory part. - /** If no directory is prefixed, the full name is returned. - \param filename: The file to get the basename from - \param keepExtension True if filename with extension is returned otherwise everything - after the final '.' is removed as well. */ - virtual path getFileBasename(const path& filename, bool keepExtension=true) const =0; - - //! flatten a path and file name for example: "/you/me/../." becomes "/you" - virtual path& flattenFilename(path& directory, const path& root="/") const =0; - - //! Get the relative filename, relative to the given directory - virtual path getRelativeFilename(const path& filename, const path& directory) const =0; - - //! Creates a list of files and directories in the current working directory and returns it. - /** \return a Pointer to the created IFileList is returned. After the list has been used - it has to be deleted using its IFileList::drop() method. - See IReferenceCounted::drop() for more information. */ - virtual IFileList* createFileList() =0; - - //! Creates an empty filelist - /** \return a Pointer to the created IFileList is returned. After the list has been used - it has to be deleted using its IFileList::drop() method. - See IReferenceCounted::drop() for more information. */ - virtual IFileList* createEmptyFileList(const io::path& path, bool ignoreCase, bool ignorePaths) =0; - - //! Set the active type of file system. - virtual EFileSystemType setFileListSystem(EFileSystemType listType) =0; - - //! Determines if a file exists and could be opened. - /** \param filename is the string identifying the file which should be tested for existence. - \return True if file exists, and false if it does not exist or an error occured. */ - virtual bool existFile(const path& filename) const =0; - - //! Creates a XML Reader from a file which returns all parsed strings as wide characters (wchar_t*). - /** Use createXMLReaderUTF8() if you prefer char* instead of wchar_t*. See IIrrXMLReader for - more information on how to use the parser. - \return 0, if file could not be opened, otherwise a pointer to the created - IXMLReader is returned. After use, the reader - has to be deleted using its IXMLReader::drop() method. - See IReferenceCounted::drop() for more information. */ - virtual IXMLReader* createXMLReader(const path& filename) =0; - - //! Creates a XML Reader from a file which returns all parsed strings as wide characters (wchar_t*). - /** Use createXMLReaderUTF8() if you prefer char* instead of wchar_t*. See IIrrXMLReader for - more information on how to use the parser. - \return 0, if file could not be opened, otherwise a pointer to the created - IXMLReader is returned. After use, the reader - has to be deleted using its IXMLReader::drop() method. - See IReferenceCounted::drop() for more information. */ - virtual IXMLReader* createXMLReader(IReadFile* file) =0; - - //! Creates a XML Reader from a file which returns all parsed strings as ASCII/UTF-8 characters (char*). - /** Use createXMLReader() if you prefer wchar_t* instead of char*. See IIrrXMLReader for - more information on how to use the parser. - \return 0, if file could not be opened, otherwise a pointer to the created - IXMLReader is returned. After use, the reader - has to be deleted using its IXMLReaderUTF8::drop() method. - See IReferenceCounted::drop() for more information. */ - virtual IXMLReaderUTF8* createXMLReaderUTF8(const path& filename) =0; - - //! Creates a XML Reader from a file which returns all parsed strings as ASCII/UTF-8 characters (char*). - /** Use createXMLReader() if you prefer wchar_t* instead of char*. See IIrrXMLReader for - more information on how to use the parser. - \return 0, if file could not be opened, otherwise a pointer to the created - IXMLReader is returned. After use, the reader - has to be deleted using its IXMLReaderUTF8::drop() method. - See IReferenceCounted::drop() for more information. */ - virtual IXMLReaderUTF8* createXMLReaderUTF8(IReadFile* file) =0; - - //! Creates a XML Writer from a file. - /** \return 0, if file could not be opened, otherwise a pointer to the created - IXMLWriter is returned. After use, the reader - has to be deleted using its IXMLWriter::drop() method. - See IReferenceCounted::drop() for more information. */ - virtual IXMLWriter* createXMLWriter(const path& filename) =0; - - //! Creates a XML Writer from a file. - /** \return 0, if file could not be opened, otherwise a pointer to the created - IXMLWriter is returned. After use, the reader - has to be deleted using its IXMLWriter::drop() method. - See IReferenceCounted::drop() for more information. */ - virtual IXMLWriter* createXMLWriter(IWriteFile* file) =0; - - //! Creates a new empty collection of attributes, usable for serialization and more. - /** \param driver: Video driver to be used to load textures when specified as attribute values. - Can be null to prevent automatic texture loading by attributes. - \return Pointer to the created object. - If you no longer need the object, you should call IAttributes::drop(). - See IReferenceCounted::drop() for more information. */ - virtual IAttributes* createEmptyAttributes(video::IVideoDriver* driver=0) =0; -}; - - -} // end namespace io -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGPUProgrammingServices.h b/builddir/irrlicht-1.8.1/include/IGPUProgrammingServices.h deleted file mode 100644 index 28717d5..0000000 --- a/builddir/irrlicht-1.8.1/include/IGPUProgrammingServices.h +++ /dev/null @@ -1,474 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GPU_PROGRAMMING_SERVICES_H_INCLUDED__ -#define __I_GPU_PROGRAMMING_SERVICES_H_INCLUDED__ - -#include "EShaderTypes.h" -#include "EMaterialTypes.h" -#include "EPrimitiveTypes.h" -#include "path.h" - -namespace irr -{ - -namespace io -{ - class IReadFile; -} // end namespace io - -namespace video -{ - -class IVideoDriver; -class IShaderConstantSetCallBack; - -//! Enumeration for different types of shading languages -enum E_GPU_SHADING_LANGUAGE -{ - //! The default language, so HLSL for Direct3D and GLSL for OpenGL. - EGSL_DEFAULT = 0, - - //! Cg shading language.*/ - EGSL_CG -}; - -//! Interface making it possible to create and use programs running on the GPU. -class IGPUProgrammingServices -{ -public: - - //! Destructor - virtual ~IGPUProgrammingServices() {} - - //! Adds a new high-level shading material renderer to the VideoDriver. - /** Currently only HLSL/D3D9 and GLSL/OpenGL are supported. - \param vertexShaderProgram String containing the source of the vertex - shader program. This can be 0 if no vertex program shall be used. - \param vertexShaderEntryPointName Name of the entry function of the - vertexShaderProgram (p.e. "main") - \param vsCompileTarget Vertex shader version the high level shader - shall be compiled to. - \param pixelShaderProgram String containing the source of the pixel - shader program. This can be 0 if no pixel shader shall be used. - \param pixelShaderEntryPointName Entry name of the function of the - pixelShaderProgram (p.e. "main") - \param psCompileTarget Pixel shader version the high level shader - shall be compiled to. - \param geometryShaderProgram String containing the source of the - geometry shader program. This can be 0 if no geometry shader shall be - used. - \param geometryShaderEntryPointName Entry name of the function of the - geometryShaderProgram (p.e. "main") - \param gsCompileTarget Geometry shader version the high level shader - shall be compiled to. - \param inType Type of vertices passed to geometry shader - \param outType Type of vertices created by geometry shader - \param verticesOut Maximal number of vertices created by geometry - shader. If 0, maximal number supported is assumed. - \param callback Pointer to an implementation of - IShaderConstantSetCallBack in which you can set the needed vertex, - pixel, and geometry shader program constants. Set this to 0 if you - don't need this. - \param baseMaterial Base material which renderstates will be used to - shade the material. - \param userData a user data int. This int can be set to any value and - will be set as parameter in the callback method when calling - OnSetConstants(). In this way it is easily possible to use the same - callback method for multiple materials and distinguish between them - during the call. - \param shaderLang a type of shading language used in current shader. - \return Number of the material type which can be set in - SMaterial::MaterialType to use the renderer. -1 is returned if an error - occured, e.g. if a shader program could not be compiled or a compile - target is not reachable. The error strings are then printed to the - error log and can be catched with a custom event receiver. */ - virtual s32 addHighLevelShaderMaterial( - const c8* vertexShaderProgram, - const c8* vertexShaderEntryPointName, - E_VERTEX_SHADER_TYPE vsCompileTarget, - const c8* pixelShaderProgram, - const c8* pixelShaderEntryPointName, - E_PIXEL_SHADER_TYPE psCompileTarget, - const c8* geometryShaderProgram, - const c8* geometryShaderEntryPointName = "main", - E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0, - scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, - scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, - u32 verticesOut = 0, - IShaderConstantSetCallBack* callback = 0, - E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, - s32 userData = 0, - E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) = 0; - - //! convenience function for use without geometry shaders - s32 addHighLevelShaderMaterial( - const c8* vertexShaderProgram, - const c8* vertexShaderEntryPointName="main", - E_VERTEX_SHADER_TYPE vsCompileTarget=EVST_VS_1_1, - const c8* pixelShaderProgram=0, - const c8* pixelShaderEntryPointName="main", - E_PIXEL_SHADER_TYPE psCompileTarget=EPST_PS_1_1, - IShaderConstantSetCallBack* callback=0, - E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, - s32 userData=0, - E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT) - { - return addHighLevelShaderMaterial( - vertexShaderProgram, vertexShaderEntryPointName, - vsCompileTarget, pixelShaderProgram, - pixelShaderEntryPointName, psCompileTarget, - 0, "main", EGST_GS_4_0, - scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, - callback, baseMaterial, userData, shadingLang); - } - - //! convenience function for use with many defaults, without geometry shader - /** All shader names are set to "main" and compile targets are shader - type 1.1. - */ - s32 addHighLevelShaderMaterial( - const c8* vertexShaderProgram, - const c8* pixelShaderProgram=0, - IShaderConstantSetCallBack* callback=0, - E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, - s32 userData=0) - { - return addHighLevelShaderMaterial( - vertexShaderProgram, "main", - EVST_VS_1_1, pixelShaderProgram, - "main", EPST_PS_1_1, - 0, "main", EGST_GS_4_0, - scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, - callback, baseMaterial, userData); - } - - //! convenience function for use with many defaults, with geometry shader - /** All shader names are set to "main" and compile targets are shader - type 1.1 and geometry shader 4.0. - */ - s32 addHighLevelShaderMaterial( - const c8* vertexShaderProgram, - const c8* pixelShaderProgram = 0, - const c8* geometryShaderProgram = 0, - scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, - scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, - u32 verticesOut = 0, - IShaderConstantSetCallBack* callback = 0, - E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, - s32 userData = 0 ) - { - return addHighLevelShaderMaterial( - vertexShaderProgram, "main", - EVST_VS_1_1, pixelShaderProgram, - "main", EPST_PS_1_1, - geometryShaderProgram, "main", EGST_GS_4_0, - inType, outType, verticesOut, - callback, baseMaterial, userData); - } - - //! Like IGPUProgrammingServices::addShaderMaterial(), but loads from files. - /** \param vertexShaderProgramFileName Text file containing the source - of the vertex shader program. Set to empty string if no vertex shader - shall be created. - \param vertexShaderEntryPointName Name of the entry function of the - vertexShaderProgram (p.e. "main") - \param vsCompileTarget Vertex shader version the high level shader - shall be compiled to. - \param pixelShaderProgramFileName Text file containing the source of - the pixel shader program. Set to empty string if no pixel shader shall - be created. - \param pixelShaderEntryPointName Entry name of the function of the - pixelShaderProgram (p.e. "main") - \param psCompileTarget Pixel shader version the high level shader - shall be compiled to. - \param geometryShaderProgramFileName Name of the source of - the geometry shader program. Set to empty string if no geometry shader - shall be created. - \param geometryShaderEntryPointName Entry name of the function of the - geometryShaderProgram (p.e. "main") - \param gsCompileTarget Geometry shader version the high level shader - shall be compiled to. - \param inType Type of vertices passed to geometry shader - \param outType Type of vertices created by geometry shader - \param verticesOut Maximal number of vertices created by geometry - shader. If 0, maximal number supported is assumed. - \param callback Pointer to an implementation of - IShaderConstantSetCallBack in which you can set the needed vertex, - pixel, and geometry shader program constants. Set this to 0 if you - don't need this. - \param baseMaterial Base material which renderstates will be used to - shade the material. - \param userData a user data int. This int can be set to any value and - will be set as parameter in the callback method when calling - OnSetConstants(). In this way it is easily possible to use the same - callback method for multiple materials and distinguish between them - during the call. - \param shaderLang a type of shading language used in current shader. - \return Number of the material type which can be set in - SMaterial::MaterialType to use the renderer. -1 is returned if an error - occured, e.g. if a shader program could not be compiled or a compile - target is not reachable. The error strings are then printed to the - error log and can be catched with a custom event receiver. */ - virtual s32 addHighLevelShaderMaterialFromFiles( - const io::path& vertexShaderProgramFileName, - const c8* vertexShaderEntryPointName, - E_VERTEX_SHADER_TYPE vsCompileTarget, - const io::path& pixelShaderProgramFileName, - const c8* pixelShaderEntryPointName, - E_PIXEL_SHADER_TYPE psCompileTarget, - const io::path& geometryShaderProgramFileName, - const c8* geometryShaderEntryPointName = "main", - E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0, - scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, - scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, - u32 verticesOut = 0, - IShaderConstantSetCallBack* callback = 0, - E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, - s32 userData = 0, - E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) = 0; - - //! convenience function for use without geometry shaders - s32 addHighLevelShaderMaterialFromFiles( - const io::path& vertexShaderProgramFileName, - const c8* vertexShaderEntryPointName = "main", - E_VERTEX_SHADER_TYPE vsCompileTarget = EVST_VS_1_1, - const io::path& pixelShaderProgramFileName = "", - const c8* pixelShaderEntryPointName = "main", - E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1, - IShaderConstantSetCallBack* callback = 0, - E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, - s32 userData = 0, - E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) - { - return addHighLevelShaderMaterialFromFiles( - vertexShaderProgramFileName, vertexShaderEntryPointName, - vsCompileTarget, pixelShaderProgramFileName, - pixelShaderEntryPointName, psCompileTarget, - "", "main", EGST_GS_4_0, - scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, - callback, baseMaterial, userData, shadingLang); - } - - //! convenience function for use with many defaults, without geometry shader - /** All shader names are set to "main" and compile targets are shader - type 1.1. - */ - s32 addHighLevelShaderMaterialFromFiles( - const io::path& vertexShaderProgramFileName, - const io::path& pixelShaderProgramFileName = "", - IShaderConstantSetCallBack* callback = 0, - E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, - s32 userData = 0 ) - { - return addHighLevelShaderMaterialFromFiles( - vertexShaderProgramFileName, "main", - EVST_VS_1_1, pixelShaderProgramFileName, - "main", EPST_PS_1_1, - "", "main", EGST_GS_4_0, - scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, - callback, baseMaterial, userData); - } - - //! convenience function for use with many defaults, with geometry shader - /** All shader names are set to "main" and compile targets are shader - type 1.1 and geometry shader 4.0. - */ - s32 addHighLevelShaderMaterialFromFiles( - const io::path& vertexShaderProgramFileName, - const io::path& pixelShaderProgramFileName = "", - const io::path& geometryShaderProgramFileName = "", - scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, - scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, - u32 verticesOut = 0, - IShaderConstantSetCallBack* callback = 0, - E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, - s32 userData = 0 ) - { - return addHighLevelShaderMaterialFromFiles( - vertexShaderProgramFileName, "main", - EVST_VS_1_1, pixelShaderProgramFileName, - "main", EPST_PS_1_1, - geometryShaderProgramFileName, "main", EGST_GS_4_0, - inType, outType, verticesOut, - callback, baseMaterial, userData); - } - - //! Like IGPUProgrammingServices::addShaderMaterial(), but loads from files. - /** \param vertexShaderProgram Text file handle containing the source - of the vertex shader program. Set to 0 if no vertex shader shall be - created. - \param vertexShaderEntryPointName Name of the entry function of the - vertexShaderProgram - \param vsCompileTarget Vertex shader version the high level shader - shall be compiled to. - \param pixelShaderProgram Text file handle containing the source of - the pixel shader program. Set to 0 if no pixel shader shall be created. - \param pixelShaderEntryPointName Entry name of the function of the - pixelShaderProgram (p.e. "main") - \param psCompileTarget Pixel shader version the high level shader - shall be compiled to. - \param geometryShaderProgram Text file handle containing the source of - the geometry shader program. Set to 0 if no geometry shader shall be - created. - \param geometryShaderEntryPointName Entry name of the function of the - geometryShaderProgram (p.e. "main") - \param gsCompileTarget Geometry shader version the high level shader - shall be compiled to. - \param inType Type of vertices passed to geometry shader - \param outType Type of vertices created by geometry shader - \param verticesOut Maximal number of vertices created by geometry - shader. If 0, maximal number supported is assumed. - \param callback Pointer to an implementation of - IShaderConstantSetCallBack in which you can set the needed vertex and - pixel shader program constants. Set this to 0 if you don't need this. - \param baseMaterial Base material which renderstates will be used to - shade the material. - \param userData a user data int. This int can be set to any value and - will be set as parameter in the callback method when calling - OnSetConstants(). In this way it is easily possible to use the same - callback method for multiple materials and distinguish between them - during the call. - \param shaderLang a type of shading language used in current shader. - \return Number of the material type which can be set in - SMaterial::MaterialType to use the renderer. -1 is returned if an - error occured, e.g. if a shader program could not be compiled or a - compile target is not reachable. The error strings are then printed to - the error log and can be catched with a custom event receiver. */ - virtual s32 addHighLevelShaderMaterialFromFiles( - io::IReadFile* vertexShaderProgram, - const c8* vertexShaderEntryPointName, - E_VERTEX_SHADER_TYPE vsCompileTarget, - io::IReadFile* pixelShaderProgram, - const c8* pixelShaderEntryPointName, - E_PIXEL_SHADER_TYPE psCompileTarget, - io::IReadFile* geometryShaderProgram, - const c8* geometryShaderEntryPointName = "main", - E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0, - scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, - scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, - u32 verticesOut = 0, - IShaderConstantSetCallBack* callback = 0, - E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, - s32 userData = 0, - E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) = 0; - - //! convenience function for use without geometry shaders - s32 addHighLevelShaderMaterialFromFiles( - io::IReadFile* vertexShaderProgram, - const c8* vertexShaderEntryPointName = "main", - E_VERTEX_SHADER_TYPE vsCompileTarget = EVST_VS_1_1, - io::IReadFile* pixelShaderProgram = 0, - const c8* pixelShaderEntryPointName = "main", - E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1, - IShaderConstantSetCallBack* callback = 0, - E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, - s32 userData = 0, - E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) - { - return addHighLevelShaderMaterialFromFiles( - vertexShaderProgram, vertexShaderEntryPointName, - vsCompileTarget, pixelShaderProgram, - pixelShaderEntryPointName, psCompileTarget, - 0, "main", EGST_GS_4_0, - scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, - callback, baseMaterial, userData, shadingLang); - } - - //! Adds a new ASM shader material renderer to the VideoDriver - /** Note that it is a good idea to call IVideoDriver::queryFeature() in - advance to check if the IVideoDriver supports the vertex and/or pixel - shader version your are using. - - The material is added to the VideoDriver like with - IVideoDriver::addMaterialRenderer() and can be used like it had been - added with that method. - \param vertexShaderProgram String containing the source of the vertex - shader program. This can be 0 if no vertex program shall be used. - - For DX8 programs, the will always input registers look like this: v0: - position, v1: normal, v2: color, v3: texture cooridnates, v4: texture - coordinates 2 if available. - - For DX9 programs, you can manually set the registers using the dcl_ - statements. - \param pixelShaderProgram String containing the source of the pixel - shader program. This can be 0 if you don't want to use a pixel shader. - \param callback Pointer to an implementation of - IShaderConstantSetCallBack in which you can set the needed vertex and - pixel shader program constants. Set this to 0 if you don't need this. - \param baseMaterial Base material which renderstates will be used to - shade the material. - \param userData a user data int. This int can be set to any value and - will be set as parameter in the callback method when calling - OnSetConstants(). In this way it is easily possible to use the same - callback method for multiple materials and distinguish between them - during the call. - \return Returns the number of the material type which can be set in - SMaterial::MaterialType to use the renderer. -1 is returned if an - error occured. -1 is returned for example if a vertex or pixel shader - program could not be compiled, the error strings are then printed out - into the error log, and can be catched with a custom event receiver. */ - virtual s32 addShaderMaterial(const c8* vertexShaderProgram = 0, - const c8* pixelShaderProgram = 0, - IShaderConstantSetCallBack* callback = 0, - E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, - s32 userData = 0) = 0; - - //! Like IGPUProgrammingServices::addShaderMaterial(), but loads from files. - /** \param vertexShaderProgram Text file containing the source of the - vertex shader program. Set to 0 if no shader shall be created. - \param pixelShaderProgram Text file containing the source of the pixel - shader program. Set to 0 if no shader shall be created. - \param callback Pointer to an IShaderConstantSetCallback object to - which the OnSetConstants function is called. - \param baseMaterial baseMaterial - \param userData a user data int. This int can be set to any value and - will be set as parameter in the callback method when calling - OnSetConstants(). In this way it is easily possible to use the same - callback method for multiple materials and distinguish between them - during the call. - \return Returns the number of the material type which can be set in - SMaterial::MaterialType to use the renderer. -1 is returned if an - error occured. -1 is returned for example if a vertex or pixel shader - program could not be compiled, the error strings are then printed out - into the error log, and can be catched with a custom event receiver. */ - virtual s32 addShaderMaterialFromFiles(io::IReadFile* vertexShaderProgram, - io::IReadFile* pixelShaderProgram, - IShaderConstantSetCallBack* callback = 0, - E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, - s32 userData = 0) = 0; - - //! Like IGPUProgrammingServices::addShaderMaterial(), but loads from files. - /** \param vertexShaderProgramFileName Text file name containing the - source of the vertex shader program. Set to 0 if no shader shall be - created. - \param pixelShaderProgramFileName Text file name containing the source - of the pixel shader program. Set to 0 if no shader shall be created. - \param callback Pointer to an IShaderConstantSetCallback object on - which the OnSetConstants function is called. - \param baseMaterial baseMaterial - \param userData a user data int. This int can be set to any value and - will be set as parameter in the callback method when calling - OnSetConstants(). In this way it is easily possible to use the same - callback method for multiple materials and distinguish between them - during the call. - \return Returns the number of the material type which can be set in - SMaterial::MaterialType to use the renderer. -1 is returned if an - error occured. -1 is returned for example if a vertex or pixel shader - program could not be compiled, the error strings are then printed out - into the error log, and can be catched with a custom event receiver. */ - virtual s32 addShaderMaterialFromFiles(const io::path& vertexShaderProgramFileName, - const io::path& pixelShaderProgramFileName, - IShaderConstantSetCallBack* callback = 0, - E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID, - s32 userData = 0) = 0; -}; - - -} // end namespace video -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUIButton.h b/builddir/irrlicht-1.8.1/include/IGUIButton.h deleted file mode 100644 index cc0ada1..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUIButton.h +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_BUTTON_H_INCLUDED__ -#define __I_GUI_BUTTON_H_INCLUDED__ - -#include "IGUIElement.h" - -namespace irr -{ - -namespace video -{ - class ITexture; -} // end namespace video - -namespace gui -{ - class IGUIFont; - class IGUISpriteBank; - - enum EGUI_BUTTON_STATE - { - //! The button is not pressed - EGBS_BUTTON_UP=0, - //! The button is currently pressed down - EGBS_BUTTON_DOWN, - //! The mouse cursor is over the button - EGBS_BUTTON_MOUSE_OVER, - //! The mouse cursor is not over the button - EGBS_BUTTON_MOUSE_OFF, - //! The button has the focus - EGBS_BUTTON_FOCUSED, - //! The button doesn't have the focus - EGBS_BUTTON_NOT_FOCUSED, - //! not used, counts the number of enumerated items - EGBS_COUNT - }; - - //! Names for gui button state icons - const c8* const GUIButtonStateNames[] = - { - "buttonUp", - "buttonDown", - "buttonMouseOver", - "buttonMouseOff", - "buttonFocused", - "buttonNotFocused", - 0, - 0, - }; - - //! GUI Button interface. - /** \par This element can create the following events of type EGUI_EVENT_TYPE: - \li EGET_BUTTON_CLICKED - */ - class IGUIButton : public IGUIElement - { - public: - - //! constructor - IGUIButton(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) - : IGUIElement(EGUIET_BUTTON, environment, parent, id, rectangle) {} - - //! Sets another skin independent font. - /** If this is set to zero, the button uses the font of the skin. - \param font: New font to set. */ - virtual void setOverrideFont(IGUIFont* font=0) = 0; - - //! Gets the override font (if any) - /** \return The override font (may be 0) */ - virtual IGUIFont* getOverrideFont(void) const = 0; - - //! Get the font which is used right now for drawing - /** Currently this is the override font when one is set and the - font of the active skin otherwise */ - virtual IGUIFont* getActiveFont() const = 0; - - //! Sets an image which should be displayed on the button when it is in normal state. - /** \param image: Image to be displayed */ - virtual void setImage(video::ITexture* image=0) = 0; - - //! Sets a background image for the button when it is in normal state. - /** \param image: Texture containing the image to be displayed - \param pos: Position in the texture, where the image is located */ - virtual void setImage(video::ITexture* image, const core::rect<s32>& pos) = 0; - - //! Sets a background image for the button when it is in pressed state. - /** If no images is specified for the pressed state via - setPressedImage(), this image is also drawn in pressed state. - \param image: Image to be displayed */ - virtual void setPressedImage(video::ITexture* image=0) = 0; - - //! Sets an image which should be displayed on the button when it is in pressed state. - /** \param image: Texture containing the image to be displayed - \param pos: Position in the texture, where the image is located */ - virtual void setPressedImage(video::ITexture* image, const core::rect<s32>& pos) = 0; - - //! Sets the sprite bank used by the button - virtual void setSpriteBank(IGUISpriteBank* bank=0) = 0; - - //! Sets the animated sprite for a specific button state - /** \param index: Number of the sprite within the sprite bank, use -1 for no sprite - \param state: State of the button to set the sprite for - \param index: The sprite number from the current sprite bank - \param color: The color of the sprite - \param loop: True if the animation should loop, false if not - */ - virtual void setSprite(EGUI_BUTTON_STATE state, s32 index, - video::SColor color=video::SColor(255,255,255,255), bool loop=false) = 0; - - //! Sets if the button should behave like a push button. - /** Which means it can be in two states: Normal or Pressed. With a click on the button, - the user can change the state of the button. */ - virtual void setIsPushButton(bool isPushButton=true) = 0; - - //! Sets the pressed state of the button if this is a pushbutton - virtual void setPressed(bool pressed=true) = 0; - - //! Returns if the button is currently pressed - virtual bool isPressed() const = 0; - - //! Sets if the alpha channel should be used for drawing background images on the button (default is false) - virtual void setUseAlphaChannel(bool useAlphaChannel=true) = 0; - - //! Returns if the alpha channel should be used for drawing background images on the button - virtual bool isAlphaChannelUsed() const = 0; - - //! Returns whether the button is a push button - virtual bool isPushButton() const = 0; - - //! Sets if the button should use the skin to draw its border and button face (default is true) - virtual void setDrawBorder(bool border=true) = 0; - - //! Returns if the border and button face are being drawn using the skin - virtual bool isDrawingBorder() const = 0; - - //! Sets if the button should scale the button images to fit - virtual void setScaleImage(bool scaleImage=true) = 0; - - //! Checks whether the button scales the used images - virtual bool isScalingImage() const = 0; - }; - - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUICheckBox.h b/builddir/irrlicht-1.8.1/include/IGUICheckBox.h deleted file mode 100644 index d965ef6..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUICheckBox.h +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_CHECKBOX_H_INCLUDED__ -#define __I_GUI_CHECKBOX_H_INCLUDED__ - -#include "IGUIElement.h" - -namespace irr -{ -namespace gui -{ - - //! GUI Check box interface. - /** \par This element can create the following events of type EGUI_EVENT_TYPE: - \li EGET_CHECKBOX_CHANGED - */ - class IGUICheckBox : public IGUIElement - { - public: - - //! constructor - IGUICheckBox(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) - : IGUIElement(EGUIET_CHECK_BOX, environment, parent, id, rectangle) {} - - //! Set if box is checked. - virtual void setChecked(bool checked) = 0; - - //! Returns true if box is checked. - virtual bool isChecked() const = 0; - }; - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUIColorSelectDialog.h b/builddir/irrlicht-1.8.1/include/IGUIColorSelectDialog.h deleted file mode 100644 index 0788dbc..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUIColorSelectDialog.h +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_COLOR_SELECT_DIALOG_H_INCLUDED__ -#define __I_GUI_COLOR_SELECT_DIALOG_H_INCLUDED__ - -#include "IGUIElement.h" - -namespace irr -{ -namespace gui -{ - - //! Standard color chooser dialog. - class IGUIColorSelectDialog : public IGUIElement - { - public: - - //! constructor - IGUIColorSelectDialog(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) - : IGUIElement(EGUIET_COLOR_SELECT_DIALOG, environment, parent, id, rectangle) {} - }; - - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUIComboBox.h b/builddir/irrlicht-1.8.1/include/IGUIComboBox.h deleted file mode 100644 index ebee1ec..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUIComboBox.h +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_COMBO_BOX_H_INCLUDED__ -#define __I_GUI_COMBO_BOX_H_INCLUDED__ - -#include "IGUIElement.h" - -namespace irr -{ -namespace gui -{ - - //! Combobox widget - /** \par This element can create the following events of type EGUI_EVENT_TYPE: - \li EGET_COMBO_BOX_CHANGED - */ - class IGUIComboBox : public IGUIElement - { - public: - - //! constructor - IGUIComboBox(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) - : IGUIElement(EGUIET_COMBO_BOX, environment, parent, id, rectangle) {} - - //! Returns amount of items in box - virtual u32 getItemCount() const = 0; - - //! Returns string of an item. the idx may be a value from 0 to itemCount-1 - virtual const wchar_t* getItem(u32 idx) const = 0; - - //! Returns item data of an item. the idx may be a value from 0 to itemCount-1 - virtual u32 getItemData(u32 idx) const = 0; - - //! Returns index based on item data - virtual s32 getIndexForItemData(u32 data ) const = 0; - - //! Adds an item and returns the index of it - virtual u32 addItem(const wchar_t* text, u32 data = 0) = 0; - - //! Removes an item from the combo box. - /** Warning. This will change the index of all following items */ - virtual void removeItem(u32 idx) = 0; - - //! Deletes all items in the combo box - virtual void clear() = 0; - - //! Returns id of selected item. returns -1 if no item is selected. - virtual s32 getSelected() const = 0; - - //! Sets the selected item. Set this to -1 if no item should be selected - virtual void setSelected(s32 idx) = 0; - - //! Sets text justification of the text area - /** \param horizontal: EGUIA_UPPERLEFT for left justified (default), - EGUIA_LOWEERRIGHT for right justified, or EGUIA_CENTER for centered text. - \param vertical: EGUIA_UPPERLEFT to align with top edge, - EGUIA_LOWEERRIGHT for bottom edge, or EGUIA_CENTER for centered text (default). */ - virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) = 0; - - //! Set the maximal number of rows for the selection listbox - virtual void setMaxSelectionRows(u32 max) = 0; - - //! Get the maximimal number of rows for the selection listbox - virtual u32 getMaxSelectionRows() const = 0; - }; - - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUIContextMenu.h b/builddir/irrlicht-1.8.1/include/IGUIContextMenu.h deleted file mode 100644 index 9f5ea25..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUIContextMenu.h +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_CONTEXT_MENU_H_INCLUDED__ -#define __I_GUI_CONTEXT_MENU_H_INCLUDED__ - -#include "IGUIElement.h" - -namespace irr -{ -namespace gui -{ - //! Close behavior. - //! Default is ECMC_REMOVE - enum ECONTEXT_MENU_CLOSE - { - //! do nothing - menu stays open - ECMC_IGNORE = 0, - - //! remove the gui element - ECMC_REMOVE = 1, - - //! call setVisible(false) - ECMC_HIDE = 2 - - // note to implementors - this is planned as bitset, so continue with 4 if you need to add further flags. - }; - - //! GUI Context menu interface. - /** \par This element can create the following events of type EGUI_EVENT_TYPE: - \li EGET_ELEMENT_CLOSED - \li EGET_MENU_ITEM_SELECTED - */ - class IGUIContextMenu : public IGUIElement - { - public: - - //! constructor - IGUIContextMenu(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) - : IGUIElement(EGUIET_CONTEXT_MENU, environment, parent, id, rectangle) {} - - //! set behavior when menus are closed - virtual void setCloseHandling(ECONTEXT_MENU_CLOSE onClose) = 0; - - //! get current behavior when the menu will be closed - virtual ECONTEXT_MENU_CLOSE getCloseHandling() const = 0; - - //! Get amount of menu items - virtual u32 getItemCount() const = 0; - - //! Adds a menu item. - /** \param text: Text of menu item. Set this to 0 to create - an separator instead of a real item, which is the same like - calling addSeparator(); - \param commandId: Command id of menu item, a simple id you may - set to whatever you want. - \param enabled: Specifies if the menu item should be enabled. - \param hasSubMenu: Set this to true if there should be a submenu - at this item. You can access this submenu via getSubMenu(). - \param checked: Specifies if the menu item should be initially checked. - \param autoChecking: Specifies if the item should be checked by clicking - \return Returns the index of the new item */ - virtual u32 addItem(const wchar_t* text, s32 commandId=-1, bool enabled=true, - bool hasSubMenu=false, bool checked=false, bool autoChecking=false) = 0; - - //! Insert a menu item at specified position. - /** \param idx: Position to insert the new element, - should be smaller than itemcount otherwise the item is added to the end. - \param text: Text of menu item. Set this to 0 to create - an separator instead of a real item, which is the same like - calling addSeparator(); - \param commandId: Command id of menu item, a simple id you may - set to whatever you want. - \param enabled: Specifies if the menu item should be enabled. - \param hasSubMenu: Set this to true if there should be a submenu - at this item. You can access this submenu via getSubMenu(). - \param checked: Specifies if the menu item should be initially checked. - \param autoChecking: Specifies if the item should be checked by clicking - \return Returns the index of the new item */ - virtual u32 insertItem(u32 idx, const wchar_t* text, s32 commandId=-1, bool enabled=true, - bool hasSubMenu=false, bool checked=false, bool autoChecking=false) = 0; - - //! Find an item by it's CommandID - /** - \param commandId: We are looking for the first item which has this commandID - \param idxStartSearch: Start searching from this index. - \return Returns the index of the item when found or otherwise -1. */ - virtual s32 findItemWithCommandId(s32 commandId, u32 idxStartSearch=0) const = 0; - - //! Adds a separator item to the menu - virtual void addSeparator() = 0; - - //! Get text of the menu item. - /** \param idx: Zero based index of the menu item */ - virtual const wchar_t* getItemText(u32 idx) const = 0; - - //! Sets text of the menu item. - /** \param idx: Zero based index of the menu item - \param text: New text of the item. */ - virtual void setItemText(u32 idx, const wchar_t* text) = 0; - - //! Check if a menu item is enabled - /** \param idx: Zero based index of the menu item */ - virtual bool isItemEnabled(u32 idx) const = 0; - - //! Sets if the menu item should be enabled. - /** \param idx: Zero based index of the menu item - \param enabled: True if it is enabled, otherwise false. */ - virtual void setItemEnabled(u32 idx, bool enabled) = 0; - - //! Sets if the menu item should be checked. - /** \param idx: Zero based index of the menu item - \param enabled: True if it is enabled, otherwise false. */ - virtual void setItemChecked(u32 idx, bool enabled) = 0; - - //! Check if a menu item is checked - /** \param idx: Zero based index of the menu item */ - virtual bool isItemChecked(u32 idx) const = 0; - - //! Removes a menu item - /** \param idx: Zero based index of the menu item */ - virtual void removeItem(u32 idx) = 0; - - //! Removes all menu items - virtual void removeAllItems() = 0; - - //! Get the selected item in the menu - /** \return Index of the selected item, -1 if none selected. */ - virtual s32 getSelectedItem() const = 0; - - //! Get the command id of a menu item - /** \param idx: Zero based index of the menu item */ - virtual s32 getItemCommandId(u32 idx) const = 0; - - //! Sets the command id of a menu item - /** \param idx: Zero based index of the menu item - \param id: Command id of menu item, a simple id you may - set to whatever you want. */ - virtual void setItemCommandId(u32 idx, s32 id) = 0; - - //! Get a pointer to the submenu of an item. - /** 0 is returned if there is no submenu - \param idx: Zero based index of the menu item - \return Returns a pointer to the submenu of an item. */ - virtual IGUIContextMenu* getSubMenu(u32 idx) const = 0; - - //! should the element change the checked status on clicking - virtual void setItemAutoChecking(u32 idx, bool autoChecking) = 0; - - //! does the element change the checked status on clicking - virtual bool getItemAutoChecking(u32 idx) const = 0; - - //! When an eventparent is set it receives events instead of the usual parent element - virtual void setEventParent(IGUIElement *parent) = 0; - }; - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUIEditBox.h b/builddir/irrlicht-1.8.1/include/IGUIEditBox.h deleted file mode 100644 index 13a9501..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUIEditBox.h +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_EDIT_BOX_H_INCLUDED__ -#define __I_GUI_EDIT_BOX_H_INCLUDED__ - -#include "IGUIElement.h" -#include "SColor.h" - -namespace irr -{ -namespace gui -{ - class IGUIFont; - - //! Single line edit box for editing simple text. - /** \par This element can create the following events of type EGUI_EVENT_TYPE: - \li EGET_EDITBOX_ENTER - \li EGET_EDITBOX_CHANGED - \li EGET_EDITBOX_MARKING_CHANGED - */ - class IGUIEditBox : public IGUIElement - { - public: - - //! constructor - IGUIEditBox(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) - : IGUIElement(EGUIET_EDIT_BOX, environment, parent, id, rectangle) {} - - //! Sets another skin independent font. - /** If this is set to zero, the button uses the font of the skin. - \param font: New font to set. */ - virtual void setOverrideFont(IGUIFont* font=0) = 0; - - //! Gets the override font (if any) - /** \return The override font (may be 0) */ - virtual IGUIFont* getOverrideFont() const = 0; - - //! Get the font which is used right now for drawing - /** Currently this is the override font when one is set and the - font of the active skin otherwise */ - virtual IGUIFont* getActiveFont() const = 0; - - //! Sets another color for the text. - /** If set, the edit box does not use the EGDC_BUTTON_TEXT color defined - in the skin, but the set color instead. You don't need to call - IGUIEditBox::enableOverrrideColor(true) after this, this is done - by this function. - If you set a color, and you want the text displayed with the color - of the skin again, call IGUIEditBox::enableOverrideColor(false); - \param color: New color of the text. */ - virtual void setOverrideColor(video::SColor color) = 0; - - //! Gets the override color - virtual video::SColor getOverrideColor() const = 0; - - //! Sets if the text should use the override color or the color in the gui skin. - /** \param enable: If set to true, the override color, which can be set - with IGUIEditBox::setOverrideColor is used, otherwise the - EGDC_BUTTON_TEXT color of the skin. */ - virtual void enableOverrideColor(bool enable) = 0; - - //! Checks if an override color is enabled - /** \return true if the override color is enabled, false otherwise */ - virtual bool isOverrideColorEnabled(void) const = 0; - - //! Sets whether to draw the background - virtual void setDrawBackground(bool draw) = 0; - - //! Turns the border on or off - /** \param border: true if you want the border to be drawn, false if not */ - virtual void setDrawBorder(bool border) = 0; - - //! Sets text justification mode - /** \param horizontal: EGUIA_UPPERLEFT for left justified (default), - EGUIA_LOWERRIGHT for right justified, or EGUIA_CENTER for centered text. - \param vertical: EGUIA_UPPERLEFT to align with top edge, - EGUIA_LOWERRIGHT for bottom edge, or EGUIA_CENTER for centered text (default). */ - virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) = 0; - - //! Enables or disables word wrap. - /** \param enable: If set to true, words going over one line are - broken to the next line. */ - virtual void setWordWrap(bool enable) = 0; - - //! Checks if word wrap is enabled - /** \return true if word wrap is enabled, false otherwise */ - virtual bool isWordWrapEnabled() const = 0; - - //! Enables or disables newlines. - /** \param enable: If set to true, the EGET_EDITBOX_ENTER event will not be fired, - instead a newline character will be inserted. */ - virtual void setMultiLine(bool enable) = 0; - - //! Checks if multi line editing is enabled - /** \return true if multi-line is enabled, false otherwise */ - virtual bool isMultiLineEnabled() const = 0; - - //! Enables or disables automatic scrolling with cursor position - /** \param enable: If set to true, the text will move around with the cursor position */ - virtual void setAutoScroll(bool enable) = 0; - - //! Checks to see if automatic scrolling is enabled - /** \return true if automatic scrolling is enabled, false if not */ - virtual bool isAutoScrollEnabled() const = 0; - - //! Sets whether the edit box is a password box. Setting this to true will - /** disable MultiLine, WordWrap and the ability to copy with ctrl+c or ctrl+x - \param passwordBox: true to enable password, false to disable - \param passwordChar: the character that is displayed instead of letters */ - virtual void setPasswordBox(bool passwordBox, wchar_t passwordChar = L'*') = 0; - - //! Returns true if the edit box is currently a password box. - virtual bool isPasswordBox() const = 0; - - //! Gets the size area of the text in the edit box - /** \return The size in pixels of the text */ - virtual core::dimension2du getTextDimension() = 0; - - //! Sets the maximum amount of characters which may be entered in the box. - /** \param max: Maximum amount of characters. If 0, the character amount is - infinity. */ - virtual void setMax(u32 max) = 0; - - //! Returns maximum amount of characters, previously set by setMax(); - virtual u32 getMax() const = 0; - }; - - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUIElement.h b/builddir/irrlicht-1.8.1/include/IGUIElement.h deleted file mode 100644 index 098cd79..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUIElement.h +++ /dev/null @@ -1,1037 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_ELEMENT_H_INCLUDED__ -#define __I_GUI_ELEMENT_H_INCLUDED__ - -#include "IAttributeExchangingObject.h" -#include "irrList.h" -#include "rect.h" -#include "irrString.h" -#include "IEventReceiver.h" -#include "EGUIElementTypes.h" -#include "EGUIAlignment.h" -#include "IAttributes.h" - -namespace irr -{ -namespace gui -{ - -class IGUIEnvironment; - -//! Base class of all GUI elements. -class IGUIElement : public virtual io::IAttributeExchangingObject, public IEventReceiver -{ -public: - - //! Constructor - IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment* environment, IGUIElement* parent, - s32 id, const core::rect<s32>& rectangle) - : Parent(0), RelativeRect(rectangle), AbsoluteRect(rectangle), - AbsoluteClippingRect(rectangle), DesiredRect(rectangle), - MaxSize(0,0), MinSize(1,1), IsVisible(true), IsEnabled(true), - IsSubElement(false), NoClip(false), ID(id), IsTabStop(false), TabOrder(-1), IsTabGroup(false), - AlignLeft(EGUIA_UPPERLEFT), AlignRight(EGUIA_UPPERLEFT), AlignTop(EGUIA_UPPERLEFT), AlignBottom(EGUIA_UPPERLEFT), - Environment(environment), Type(type) - { - #ifdef _DEBUG - setDebugName("IGUIElement"); - #endif - - // if we were given a parent to attach to - if (parent) - { - parent->addChildToEnd(this); - recalculateAbsolutePosition(true); - } - } - - - //! Destructor - virtual ~IGUIElement() - { - // delete all children - core::list<IGUIElement*>::Iterator it = Children.begin(); - for (; it != Children.end(); ++it) - { - (*it)->Parent = 0; - (*it)->drop(); - } - } - - - //! Returns parent of this element. - IGUIElement* getParent() const - { - return Parent; - } - - - //! Returns the relative rectangle of this element. - core::rect<s32> getRelativePosition() const - { - return RelativeRect; - } - - - //! Sets the relative rectangle of this element. - /** \param r The absolute position to set */ - void setRelativePosition(const core::rect<s32>& r) - { - if (Parent) - { - const core::rect<s32>& r2 = Parent->getAbsolutePosition(); - - core::dimension2df d((f32)(r2.getSize().Width), (f32)(r2.getSize().Height)); - - if (AlignLeft == EGUIA_SCALE) - ScaleRect.UpperLeftCorner.X = (f32)r.UpperLeftCorner.X / d.Width; - if (AlignRight == EGUIA_SCALE) - ScaleRect.LowerRightCorner.X = (f32)r.LowerRightCorner.X / d.Width; - if (AlignTop == EGUIA_SCALE) - ScaleRect.UpperLeftCorner.Y = (f32)r.UpperLeftCorner.Y / d.Height; - if (AlignBottom == EGUIA_SCALE) - ScaleRect.LowerRightCorner.Y = (f32)r.LowerRightCorner.Y / d.Height; - } - - DesiredRect = r; - updateAbsolutePosition(); - } - - //! Sets the relative rectangle of this element, maintaining its current width and height - /** \param position The new relative position to set. Width and height will not be changed. */ - void setRelativePosition(const core::position2di & position) - { - const core::dimension2di mySize = RelativeRect.getSize(); - const core::rect<s32> rectangle(position.X, position.Y, - position.X + mySize.Width, position.Y + mySize.Height); - setRelativePosition(rectangle); - } - - - //! Sets the relative rectangle of this element as a proportion of its parent's area. - /** \note This method used to be 'void setRelativePosition(const core::rect<f32>& r)' - \param r The rectangle to set, interpreted as a proportion of the parent's area. - Meaningful values are in the range [0...1], unless you intend this element to spill - outside its parent. */ - void setRelativePositionProportional(const core::rect<f32>& r) - { - if (!Parent) - return; - - const core::dimension2di& d = Parent->getAbsolutePosition().getSize(); - - DesiredRect = core::rect<s32>( - core::floor32((f32)d.Width * r.UpperLeftCorner.X), - core::floor32((f32)d.Height * r.UpperLeftCorner.Y), - core::floor32((f32)d.Width * r.LowerRightCorner.X), - core::floor32((f32)d.Height * r.LowerRightCorner.Y)); - - ScaleRect = r; - - updateAbsolutePosition(); - } - - - //! Gets the absolute rectangle of this element - core::rect<s32> getAbsolutePosition() const - { - return AbsoluteRect; - } - - - //! Returns the visible area of the element. - core::rect<s32> getAbsoluteClippingRect() const - { - return AbsoluteClippingRect; - } - - - //! Sets whether the element will ignore its parent's clipping rectangle - /** \param noClip If true, the element will not be clipped by its parent's clipping rectangle. */ - void setNotClipped(bool noClip) - { - NoClip = noClip; - updateAbsolutePosition(); - } - - - //! Gets whether the element will ignore its parent's clipping rectangle - /** \return true if the element is not clipped by its parent's clipping rectangle. */ - bool isNotClipped() const - { - return NoClip; - } - - - //! Sets the maximum size allowed for this element - /** If set to 0,0, there is no maximum size */ - void setMaxSize(core::dimension2du size) - { - MaxSize = size; - updateAbsolutePosition(); - } - - - //! Sets the minimum size allowed for this element - void setMinSize(core::dimension2du size) - { - MinSize = size; - if (MinSize.Width < 1) - MinSize.Width = 1; - if (MinSize.Height < 1) - MinSize.Height = 1; - updateAbsolutePosition(); - } - - - //! The alignment defines how the borders of this element will be positioned when the parent element is resized. - void setAlignment(EGUI_ALIGNMENT left, EGUI_ALIGNMENT right, EGUI_ALIGNMENT top, EGUI_ALIGNMENT bottom) - { - AlignLeft = left; - AlignRight = right; - AlignTop = top; - AlignBottom = bottom; - - if (Parent) - { - core::rect<s32> r(Parent->getAbsolutePosition()); - - core::dimension2df d((f32)r.getSize().Width, (f32)r.getSize().Height); - - if (AlignLeft == EGUIA_SCALE) - ScaleRect.UpperLeftCorner.X = (f32)DesiredRect.UpperLeftCorner.X / d.Width; - if (AlignRight == EGUIA_SCALE) - ScaleRect.LowerRightCorner.X = (f32)DesiredRect.LowerRightCorner.X / d.Width; - if (AlignTop == EGUIA_SCALE) - ScaleRect.UpperLeftCorner.Y = (f32)DesiredRect.UpperLeftCorner.Y / d.Height; - if (AlignBottom == EGUIA_SCALE) - ScaleRect.LowerRightCorner.Y = (f32)DesiredRect.LowerRightCorner.Y / d.Height; - } - } - - - //! Updates the absolute position. - virtual void updateAbsolutePosition() - { - recalculateAbsolutePosition(false); - - // update all children - core::list<IGUIElement*>::Iterator it = Children.begin(); - for (; it != Children.end(); ++it) - { - (*it)->updateAbsolutePosition(); - } - } - - - //! Returns the topmost GUI element at the specific position. - /** - This will check this GUI element and all of its descendants, so it - may return this GUI element. To check all GUI elements, call this - function on device->getGUIEnvironment()->getRootGUIElement(). Note - that the root element is the size of the screen, so doing so (with - an on-screen point) will always return the root element if no other - element is above it at that point. - \param point: The point at which to find a GUI element. - \return The topmost GUI element at that point, or 0 if there are - no candidate elements at this point. - */ - IGUIElement* getElementFromPoint(const core::position2d<s32>& point) - { - IGUIElement* target = 0; - - // we have to search from back to front, because later children - // might be drawn over the top of earlier ones. - - core::list<IGUIElement*>::Iterator it = Children.getLast(); - - if (isVisible()) - { - while(it != Children.end()) - { - target = (*it)->getElementFromPoint(point); - if (target) - return target; - - --it; - } - } - - if (isVisible() && isPointInside(point)) - target = this; - - return target; - } - - - //! Returns true if a point is within this element. - /** Elements with a shape other than a rectangle should override this method */ - virtual bool isPointInside(const core::position2d<s32>& point) const - { - return AbsoluteClippingRect.isPointInside(point); - } - - - //! Adds a GUI element as new child of this element. - virtual void addChild(IGUIElement* child) - { - addChildToEnd(child); - if (child) - { - child->updateAbsolutePosition(); - } - } - - //! Removes a child. - virtual void removeChild(IGUIElement* child) - { - core::list<IGUIElement*>::Iterator it = Children.begin(); - for (; it != Children.end(); ++it) - if ((*it) == child) - { - (*it)->Parent = 0; - (*it)->drop(); - Children.erase(it); - return; - } - } - - - //! Removes this element from its parent. - virtual void remove() - { - if (Parent) - Parent->removeChild(this); - } - - - //! Draws the element and its children. - virtual void draw() - { - if ( isVisible() ) - { - core::list<IGUIElement*>::Iterator it = Children.begin(); - for (; it != Children.end(); ++it) - (*it)->draw(); - } - } - - - //! animate the element and its children. - virtual void OnPostRender(u32 timeMs) - { - if ( isVisible() ) - { - core::list<IGUIElement*>::Iterator it = Children.begin(); - for (; it != Children.end(); ++it) - (*it)->OnPostRender( timeMs ); - } - } - - - //! Moves this element. - virtual void move(core::position2d<s32> absoluteMovement) - { - setRelativePosition(DesiredRect + absoluteMovement); - } - - - //! Returns true if element is visible. - virtual bool isVisible() const - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return IsVisible; - } - - - //! Sets the visible state of this element. - virtual void setVisible(bool visible) - { - IsVisible = visible; - } - - - //! Returns true if this element was created as part of its parent control - virtual bool isSubElement() const - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return IsSubElement; - } - - - //! Sets whether this control was created as part of its parent. - /** For example, it is true when a scrollbar is part of a listbox. - SubElements are not saved to disk when calling guiEnvironment->saveGUI() */ - virtual void setSubElement(bool subElement) - { - IsSubElement = subElement; - } - - - //! If set to true, the focus will visit this element when using the tab key to cycle through elements. - /** If this element is a tab group (see isTabGroup/setTabGroup) then - ctrl+tab will be used instead. */ - void setTabStop(bool enable) - { - IsTabStop = enable; - } - - - //! Returns true if this element can be focused by navigating with the tab key - bool isTabStop() const - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return IsTabStop; - } - - - //! Sets the priority of focus when using the tab key to navigate between a group of elements. - /** See setTabGroup, isTabGroup and getTabGroup for information on tab groups. - Elements with a lower number are focused first */ - void setTabOrder(s32 index) - { - // negative = autonumber - if (index < 0) - { - TabOrder = 0; - IGUIElement *el = getTabGroup(); - while (IsTabGroup && el && el->Parent) - el = el->Parent; - - IGUIElement *first=0, *closest=0; - if (el) - { - // find the highest element number - el->getNextElement(-1, true, IsTabGroup, first, closest, true); - if (first) - { - TabOrder = first->getTabOrder() + 1; - } - } - - } - else - TabOrder = index; - } - - - //! Returns the number in the tab order sequence - s32 getTabOrder() const - { - return TabOrder; - } - - - //! Sets whether this element is a container for a group of elements which can be navigated using the tab key. - /** For example, windows are tab groups. - Groups can be navigated using ctrl+tab, providing isTabStop is true. */ - void setTabGroup(bool isGroup) - { - IsTabGroup = isGroup; - } - - - //! Returns true if this element is a tab group. - bool isTabGroup() const - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return IsTabGroup; - } - - - //! Returns the container element which holds all elements in this element's tab group. - IGUIElement* getTabGroup() - { - IGUIElement *ret=this; - - while (ret && !ret->isTabGroup()) - ret = ret->getParent(); - - return ret; - } - - - //! Returns true if element is enabled - /** Currently elements do _not_ care about parent-states. - So if you want to affect childs you have to enable/disable them all. - The only exception to this are sub-elements which also check their parent. - */ - virtual bool isEnabled() const - { - if ( isSubElement() && IsEnabled && getParent() ) - return getParent()->isEnabled(); - - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return IsEnabled; - } - - - //! Sets the enabled state of this element. - virtual void setEnabled(bool enabled) - { - IsEnabled = enabled; - } - - - //! Sets the new caption of this element. - virtual void setText(const wchar_t* text) - { - Text = text; - } - - - //! Returns caption of this element. - virtual const wchar_t* getText() const - { - return Text.c_str(); - } - - - //! Sets the new caption of this element. - virtual void setToolTipText(const wchar_t* text) - { - ToolTipText = text; - } - - - //! Returns caption of this element. - virtual const core::stringw& getToolTipText() const - { - return ToolTipText; - } - - - //! Returns id. Can be used to identify the element. - virtual s32 getID() const - { - return ID; - } - - - //! Sets the id of this element - virtual void setID(s32 id) - { - ID = id; - } - - - //! Called if an event happened. - virtual bool OnEvent(const SEvent& event) - { - return Parent ? Parent->OnEvent(event) : false; - } - - - //! Brings a child to front - /** \return True if successful, false if not. */ - virtual bool bringToFront(IGUIElement* element) - { - core::list<IGUIElement*>::Iterator it = Children.begin(); - for (; it != Children.end(); ++it) - { - if (element == (*it)) - { - Children.erase(it); - Children.push_back(element); - return true; - } - } - - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return false; - } - - - //! Moves a child to the back, so it's siblings are drawn on top of it - /** \return True if successful, false if not. */ - virtual bool sendToBack(IGUIElement* child) - { - core::list<IGUIElement*>::Iterator it = Children.begin(); - if (child == (*it)) // already there - return true; - for (; it != Children.end(); ++it) - { - if (child == (*it)) - { - Children.erase(it); - Children.push_front(child); - return true; - } - } - - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return false; - } - - //! Returns list with children of this element - virtual const core::list<IGUIElement*>& getChildren() const - { - return Children; - } - - - //! Finds the first element with the given id. - /** \param id: Id to search for. - \param searchchildren: Set this to true, if also children of this - element may contain the element with the searched id and they - should be searched too. - \return Returns the first element with the given id. If no element - with this id was found, 0 is returned. */ - virtual IGUIElement* getElementFromId(s32 id, bool searchchildren=false) const - { - IGUIElement* e = 0; - - core::list<IGUIElement*>::ConstIterator it = Children.begin(); - for (; it != Children.end(); ++it) - { - if ((*it)->getID() == id) - return (*it); - - if (searchchildren) - e = (*it)->getElementFromId(id, true); - - if (e) - return e; - } - - return e; - } - - - //! returns true if the given element is a child of this one. - //! \param child: The child element to check - bool isMyChild(IGUIElement* child) const - { - if (!child) - return false; - do - { - if (child->Parent) - child = child->Parent; - - } while (child->Parent && child != this); - - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return child == this; - } - - - //! searches elements to find the closest next element to tab to - /** \param startOrder: The TabOrder of the current element, -1 if none - \param reverse: true if searching for a lower number - \param group: true if searching for a higher one - \param first: element with the highest/lowest known tab order depending on search direction - \param closest: the closest match, depending on tab order and direction - \param includeInvisible: includes invisible elements in the search (default=false) - \return true if successfully found an element, false to continue searching/fail */ - bool getNextElement(s32 startOrder, bool reverse, bool group, - IGUIElement*& first, IGUIElement*& closest, bool includeInvisible=false) const - { - // we'll stop searching if we find this number - s32 wanted = startOrder + ( reverse ? -1 : 1 ); - if (wanted==-2) - wanted = 1073741824; // maximum s32 - - core::list<IGUIElement*>::ConstIterator it = Children.begin(); - - s32 closestOrder, currentOrder; - - while(it != Children.end()) - { - // ignore invisible elements and their children - if ( ( (*it)->isVisible() || includeInvisible ) && - (group == true || (*it)->isTabGroup() == false) ) - { - // only check tab stops and those with the same group status - if ((*it)->isTabStop() && ((*it)->isTabGroup() == group)) - { - currentOrder = (*it)->getTabOrder(); - - // is this what we're looking for? - if (currentOrder == wanted) - { - closest = *it; - return true; - } - - // is it closer than the current closest? - if (closest) - { - closestOrder = closest->getTabOrder(); - if ( ( reverse && currentOrder > closestOrder && currentOrder < startOrder) - ||(!reverse && currentOrder < closestOrder && currentOrder > startOrder)) - { - closest = *it; - } - } - else - if ( (reverse && currentOrder < startOrder) || (!reverse && currentOrder > startOrder) ) - { - closest = *it; - } - - // is it before the current first? - if (first) - { - closestOrder = first->getTabOrder(); - - if ( (reverse && closestOrder < currentOrder) || (!reverse && closestOrder > currentOrder) ) - { - first = *it; - } - } - else - { - first = *it; - } - } - // search within children - if ((*it)->getNextElement(startOrder, reverse, group, first, closest)) - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return true; - } - } - ++it; - } - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return false; - } - - - //! Returns the type of the gui element. - /** This is needed for the .NET wrapper but will be used - later for serializing and deserializing. - If you wrote your own GUIElements, you need to set the type for your element as first parameter - in the constructor of IGUIElement. For own (=unknown) elements, simply use EGUIET_ELEMENT as type */ - EGUI_ELEMENT_TYPE getType() const - { - return Type; - } - - //! Returns true if the gui element supports the given type. - /** This is mostly used to check if you can cast a gui element to the class that goes with the type. - Most gui elements will only support their own type, but if you derive your own classes from interfaces - you can overload this function and add a check for the type of the base-class additionally. - This allows for checks comparable to the dynamic_cast of c++ with enabled rtti. - Note that you can't do that by calling BaseClass::hasType(type), but you have to do an explicit - comparison check, because otherwise the base class usually just checks for the membervariable - Type which contains the type of your derived class. - */ - virtual bool hasType(EGUI_ELEMENT_TYPE type) const - { - return type == Type; - } - - - //! Returns the type name of the gui element. - /** This is needed serializing elements. For serializing your own elements, override this function - and return your own type name which is created by your IGUIElementFactory */ - virtual const c8* getTypeName() const - { - return GUIElementTypeNames[Type]; - } - - //! Returns the name of the element. - /** \return Name as character string. */ - virtual const c8* getName() const - { - return Name.c_str(); - } - - - //! Sets the name of the element. - /** \param name New name of the gui element. */ - virtual void setName(const c8* name) - { - Name = name; - } - - - //! Sets the name of the element. - /** \param name New name of the gui element. */ - virtual void setName(const core::stringc& name) - { - Name = name; - } - - - //! Writes attributes of the scene node. - /** Implement this to expose the attributes of your scene node for - scripting languages, editors, debuggers or xml serialization purposes. */ - virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const - { - out->addString("Name", Name.c_str()); - out->addInt("Id", ID ); - out->addString("Caption", getText()); - out->addRect("Rect", DesiredRect); - out->addPosition2d("MinSize", core::position2di(MinSize.Width, MinSize.Height)); - out->addPosition2d("MaxSize", core::position2di(MaxSize.Width, MaxSize.Height)); - out->addEnum("LeftAlign", AlignLeft, GUIAlignmentNames); - out->addEnum("RightAlign", AlignRight, GUIAlignmentNames); - out->addEnum("TopAlign", AlignTop, GUIAlignmentNames); - out->addEnum("BottomAlign", AlignBottom, GUIAlignmentNames); - out->addBool("Visible", IsVisible); - out->addBool("Enabled", IsEnabled); - out->addBool("TabStop", IsTabStop); - out->addBool("TabGroup", IsTabGroup); - out->addInt("TabOrder", TabOrder); - out->addBool("NoClip", NoClip); - } - - - //! Reads attributes of the scene node. - /** Implement this to set the attributes of your scene node for - scripting languages, editors, debuggers or xml deserialization purposes. */ - virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) - { - setName(in->getAttributeAsString("Name")); - setID(in->getAttributeAsInt("Id")); - setText(in->getAttributeAsStringW("Caption").c_str()); - setVisible(in->getAttributeAsBool("Visible")); - setEnabled(in->getAttributeAsBool("Enabled")); - IsTabStop = in->getAttributeAsBool("TabStop"); - IsTabGroup = in->getAttributeAsBool("TabGroup"); - TabOrder = in->getAttributeAsInt("TabOrder"); - - core::position2di p = in->getAttributeAsPosition2d("MaxSize"); - setMaxSize(core::dimension2du(p.X,p.Y)); - - p = in->getAttributeAsPosition2d("MinSize"); - setMinSize(core::dimension2du(p.X,p.Y)); - - setAlignment((EGUI_ALIGNMENT) in->getAttributeAsEnumeration("LeftAlign", GUIAlignmentNames), - (EGUI_ALIGNMENT)in->getAttributeAsEnumeration("RightAlign", GUIAlignmentNames), - (EGUI_ALIGNMENT)in->getAttributeAsEnumeration("TopAlign", GUIAlignmentNames), - (EGUI_ALIGNMENT)in->getAttributeAsEnumeration("BottomAlign", GUIAlignmentNames)); - - setRelativePosition(in->getAttributeAsRect("Rect")); - - setNotClipped(in->getAttributeAsBool("NoClip")); - } - -protected: - // not virtual because needed in constructor - void addChildToEnd(IGUIElement* child) - { - if (child) - { - child->grab(); // prevent destruction when removed - child->remove(); // remove from old parent - child->LastParentRect = getAbsolutePosition(); - child->Parent = this; - Children.push_back(child); - } - } - - // not virtual because needed in constructor - void recalculateAbsolutePosition(bool recursive) - { - core::rect<s32> parentAbsolute(0,0,0,0); - core::rect<s32> parentAbsoluteClip; - f32 fw=0.f, fh=0.f; - - if (Parent) - { - parentAbsolute = Parent->AbsoluteRect; - - if (NoClip) - { - IGUIElement* p=this; - while (p && p->Parent) - p = p->Parent; - parentAbsoluteClip = p->AbsoluteClippingRect; - } - else - parentAbsoluteClip = Parent->AbsoluteClippingRect; - } - - const s32 diffx = parentAbsolute.getWidth() - LastParentRect.getWidth(); - const s32 diffy = parentAbsolute.getHeight() - LastParentRect.getHeight(); - - if (AlignLeft == EGUIA_SCALE || AlignRight == EGUIA_SCALE) - fw = (f32)parentAbsolute.getWidth(); - - if (AlignTop == EGUIA_SCALE || AlignBottom == EGUIA_SCALE) - fh = (f32)parentAbsolute.getHeight(); - - switch (AlignLeft) - { - case EGUIA_UPPERLEFT: - break; - case EGUIA_LOWERRIGHT: - DesiredRect.UpperLeftCorner.X += diffx; - break; - case EGUIA_CENTER: - DesiredRect.UpperLeftCorner.X += diffx/2; - break; - case EGUIA_SCALE: - DesiredRect.UpperLeftCorner.X = core::round32(ScaleRect.UpperLeftCorner.X * fw); - break; - } - - switch (AlignRight) - { - case EGUIA_UPPERLEFT: - break; - case EGUIA_LOWERRIGHT: - DesiredRect.LowerRightCorner.X += diffx; - break; - case EGUIA_CENTER: - DesiredRect.LowerRightCorner.X += diffx/2; - break; - case EGUIA_SCALE: - DesiredRect.LowerRightCorner.X = core::round32(ScaleRect.LowerRightCorner.X * fw); - break; - } - - switch (AlignTop) - { - case EGUIA_UPPERLEFT: - break; - case EGUIA_LOWERRIGHT: - DesiredRect.UpperLeftCorner.Y += diffy; - break; - case EGUIA_CENTER: - DesiredRect.UpperLeftCorner.Y += diffy/2; - break; - case EGUIA_SCALE: - DesiredRect.UpperLeftCorner.Y = core::round32(ScaleRect.UpperLeftCorner.Y * fh); - break; - } - - switch (AlignBottom) - { - case EGUIA_UPPERLEFT: - break; - case EGUIA_LOWERRIGHT: - DesiredRect.LowerRightCorner.Y += diffy; - break; - case EGUIA_CENTER: - DesiredRect.LowerRightCorner.Y += diffy/2; - break; - case EGUIA_SCALE: - DesiredRect.LowerRightCorner.Y = core::round32(ScaleRect.LowerRightCorner.Y * fh); - break; - } - - RelativeRect = DesiredRect; - - const s32 w = RelativeRect.getWidth(); - const s32 h = RelativeRect.getHeight(); - - // make sure the desired rectangle is allowed - if (w < (s32)MinSize.Width) - RelativeRect.LowerRightCorner.X = RelativeRect.UpperLeftCorner.X + MinSize.Width; - if (h < (s32)MinSize.Height) - RelativeRect.LowerRightCorner.Y = RelativeRect.UpperLeftCorner.Y + MinSize.Height; - if (MaxSize.Width && w > (s32)MaxSize.Width) - RelativeRect.LowerRightCorner.X = RelativeRect.UpperLeftCorner.X + MaxSize.Width; - if (MaxSize.Height && h > (s32)MaxSize.Height) - RelativeRect.LowerRightCorner.Y = RelativeRect.UpperLeftCorner.Y + MaxSize.Height; - - RelativeRect.repair(); - - AbsoluteRect = RelativeRect + parentAbsolute.UpperLeftCorner; - - if (!Parent) - parentAbsoluteClip = AbsoluteRect; - - AbsoluteClippingRect = AbsoluteRect; - AbsoluteClippingRect.clipAgainst(parentAbsoluteClip); - - LastParentRect = parentAbsolute; - - if ( recursive ) - { - // update all children - core::list<IGUIElement*>::Iterator it = Children.begin(); - for (; it != Children.end(); ++it) - { - (*it)->recalculateAbsolutePosition(recursive); - } - } - } - -protected: - - //! List of all children of this element - core::list<IGUIElement*> Children; - - //! Pointer to the parent - IGUIElement* Parent; - - //! relative rect of element - core::rect<s32> RelativeRect; - - //! absolute rect of element - core::rect<s32> AbsoluteRect; - - //! absolute clipping rect of element - core::rect<s32> AbsoluteClippingRect; - - //! the rectangle the element would prefer to be, - //! if it was not constrained by parent or max/min size - core::rect<s32> DesiredRect; - - //! for calculating the difference when resizing parent - core::rect<s32> LastParentRect; - - //! relative scale of the element inside its parent - core::rect<f32> ScaleRect; - - //! maximum and minimum size of the element - core::dimension2du MaxSize, MinSize; - - //! is visible? - bool IsVisible; - - //! is enabled? - bool IsEnabled; - - //! is a part of a larger whole and should not be serialized? - bool IsSubElement; - - //! does this element ignore its parent's clipping rectangle? - bool NoClip; - - //! caption - core::stringw Text; - - //! tooltip - core::stringw ToolTipText; - - //! users can set this for identificating the element by string - core::stringc Name; - - //! users can set this for identificating the element by integer - s32 ID; - - //! tab stop like in windows - bool IsTabStop; - - //! tab order - s32 TabOrder; - - //! tab groups are containers like windows, use ctrl+tab to navigate - bool IsTabGroup; - - //! tells the element how to act when its parent is resized - EGUI_ALIGNMENT AlignLeft, AlignRight, AlignTop, AlignBottom; - - //! GUI Environment - IGUIEnvironment* Environment; - - //! type of element - EGUI_ELEMENT_TYPE Type; -}; - - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUIElementFactory.h b/builddir/irrlicht-1.8.1/include/IGUIElementFactory.h deleted file mode 100644 index ca2df8b..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUIElementFactory.h +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_ELEMENT_FACTORY_H_INCLUDED__ -#define __I_GUI_ELEMENT_FACTORY_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "EGUIElementTypes.h" - -namespace irr -{ - -namespace gui -{ - class IGUIElement; - - //! Interface making it possible to dynamically create GUI elements - /** To be able to add custom elements to Irrlicht and to make it possible for the - scene manager to save and load them, simply implement this interface and register it - in your gui environment via IGUIEnvironment::registerGUIElementFactory. - Note: When implementing your own element factory, don't call IGUIEnvironment::grab() to - increase the reference counter of the environment. This is not necessary because the - it will grab() the factory anyway, and otherwise cyclic references will be created. - */ - class IGUIElementFactory : public virtual IReferenceCounted - { - public: - - //! adds an element to the gui environment based on its type id - /** \param type: Type of the element to add. - \param parent: Parent scene node of the new element, can be null to add to the root. - \return Pointer to the new element or null if not successful. */ - virtual IGUIElement* addGUIElement(EGUI_ELEMENT_TYPE type, IGUIElement* parent=0) = 0; - - //! adds a GUI element to the GUI Environment based on its type name - /** \param typeName: Type name of the element to add. - \param parent: Parent scene node of the new element, can be null to add it to the root. - \return Pointer to the new element or null if not successful. */ - virtual IGUIElement* addGUIElement(const c8* typeName, IGUIElement* parent=0) = 0; - - //! Get amount of GUI element types this factory is able to create - virtual s32 getCreatableGUIElementTypeCount() const = 0; - - //! Get type of a createable element type - /** \param idx: Index of the element type in this factory. Must be a value between 0 and - getCreatableGUIElementTypeCount() */ - virtual EGUI_ELEMENT_TYPE getCreateableGUIElementType(s32 idx) const = 0; - - //! Get type name of a createable GUI element type by index - /** \param idx: Index of the type in this factory. Must be a value between 0 and - getCreatableGUIElementTypeCount() */ - virtual const c8* getCreateableGUIElementTypeName(s32 idx) const = 0; - - //! returns type name of a createable GUI element - /** \param type: Type of GUI element. - \return Name of the type if this factory can create the type, otherwise 0. */ - virtual const c8* getCreateableGUIElementTypeName(EGUI_ELEMENT_TYPE type) const = 0; - }; - - -} // end namespace gui -} // end namespace irr - -#endif // __I_GUI_ELEMENT_FACTORY_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/IGUIEnvironment.h b/builddir/irrlicht-1.8.1/include/IGUIEnvironment.h deleted file mode 100644 index 219e419..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUIEnvironment.h +++ /dev/null @@ -1,620 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_ENVIRONMENT_H_INCLUDED__ -#define __I_GUI_ENVIRONMENT_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "IGUISkin.h" -#include "rect.h" -#include "EMessageBoxFlags.h" -#include "IEventReceiver.h" -#include "IXMLReader.h" -#include "path.h" - -namespace irr -{ - class IOSOperator; - class IEventReceiver; - - namespace io - { - class IXMLWriter; - class IReadFile; - class IWriteFile; - class IFileSystem; - } // end namespace io - namespace video - { - class IVideoDriver; - class ITexture; - } // end namespace video - -namespace gui -{ - -class IGUIElement; -class IGUIFont; -class IGUISpriteBank; -class IGUIScrollBar; -class IGUIImage; -class IGUIMeshViewer; -class IGUICheckBox; -class IGUIListBox; -class IGUITreeView; -class IGUIImageList; -class IGUIFileOpenDialog; -class IGUIColorSelectDialog; -class IGUIInOutFader; -class IGUIStaticText; -class IGUIEditBox; -class IGUISpinBox; -class IGUITabControl; -class IGUITab; -class IGUITable; -class IGUIContextMenu; -class IGUIComboBox; -class IGUIToolBar; -class IGUIButton; -class IGUIWindow; -class IGUIElementFactory; - -//! GUI Environment. Used as factory and manager of all other GUI elements. -/** \par This element can create the following events of type EGUI_EVENT_TYPE (which are passed on to focused sub-elements): -\li EGET_ELEMENT_FOCUS_LOST -\li EGET_ELEMENT_FOCUSED -\li EGET_ELEMENT_LEFT -\li EGET_ELEMENT_HOVERED -*/ -class IGUIEnvironment : public virtual IReferenceCounted -{ -public: - - //! Draws all gui elements by traversing the GUI environment starting at the root node. - virtual void drawAll() = 0; - - //! Sets the focus to an element. - /** Causes a EGET_ELEMENT_FOCUS_LOST event followed by a - EGET_ELEMENT_FOCUSED event. If someone absorbed either of the events, - then the focus will not be changed. - \param element Pointer to the element which shall get the focus. - \return True on success, false on failure */ - virtual bool setFocus(IGUIElement* element) = 0; - - //! Returns the element which holds the focus. - /** \return Pointer to the element with focus. */ - virtual IGUIElement* getFocus() const = 0; - - //! Returns the element which was last under the mouse cursor - /** NOTE: This information is updated _after_ the user-eventreceiver - received it's mouse-events. To find the hovered element while catching - mouse events you have to use instead: - IGUIEnvironment::getRootGUIElement()->getElementFromPoint(mousePos); - \return Pointer to the element under the mouse. */ - virtual IGUIElement* getHovered() const = 0; - - //! Removes the focus from an element. - /** Causes a EGET_ELEMENT_FOCUS_LOST event. If the event is absorbed - then the focus will not be changed. - \param element Pointer to the element which shall lose the focus. - \return True on success, false on failure */ - virtual bool removeFocus(IGUIElement* element) = 0; - - //! Returns whether the element has focus - /** \param element Pointer to the element which is tested. - \return True if the element has focus, else false. */ - virtual bool hasFocus(IGUIElement* element) const = 0; - - //! Returns the current video driver. - /** \return Pointer to the video driver. */ - virtual video::IVideoDriver* getVideoDriver() const = 0; - - //! Returns the file system. - /** \return Pointer to the file system. */ - virtual io::IFileSystem* getFileSystem() const = 0; - - //! returns a pointer to the OS operator - /** \return Pointer to the OS operator. */ - virtual IOSOperator* getOSOperator() const = 0; - - //! Removes all elements from the environment. - virtual void clear() = 0; - - //! Posts an input event to the environment. - /** Usually you do not have to - use this method, it is used by the engine internally. - \param event The event to post. - \return True if succeeded, else false. */ - virtual bool postEventFromUser(const SEvent& event) = 0; - - //! This sets a new event receiver for gui events. - /** Usually you do not have to - use this method, it is used by the engine internally. - \param evr Pointer to the new receiver. */ - virtual void setUserEventReceiver(IEventReceiver* evr) = 0; - - //! Returns pointer to the current gui skin. - /** \return Pointer to the GUI skin. */ - virtual IGUISkin* getSkin() const = 0; - - //! Sets a new GUI Skin - /** You can use this to change the appearance of the whole GUI - Environment. You can set one of the built-in skins or implement your - own class derived from IGUISkin and enable it using this method. - To set for example the built-in Windows classic skin, use the following - code: - \code - gui::IGUISkin* newskin = environment->createSkin(gui::EGST_WINDOWS_CLASSIC); - environment->setSkin(newskin); - newskin->drop(); - \endcode - \param skin New skin to use. - */ - virtual void setSkin(IGUISkin* skin) = 0; - - //! Creates a new GUI Skin based on a template. - /** Use setSkin() to set the created skin. - \param type The type of the new skin. - \return Pointer to the created skin. - If you no longer need it, you should call IGUISkin::drop(). - See IReferenceCounted::drop() for more information. */ - virtual IGUISkin* createSkin(EGUI_SKIN_TYPE type) = 0; - - - //! Creates the image list from the given texture. - /** \param texture Texture to split into images - \param imageSize Dimension of each image - \param useAlphaChannel Flag whether alpha channel of the texture should be honored. - \return Pointer to the font. Returns 0 if the font could not be loaded. - This pointer should not be dropped. See IReferenceCounted::drop() for - more information. */ - virtual IGUIImageList* createImageList( video::ITexture* texture, - core::dimension2d<s32> imageSize, - bool useAlphaChannel ) = 0; - - //! Returns pointer to the font with the specified filename. - /** Loads the font if it was not loaded before. - \param filename Filename of the Font. - \return Pointer to the font. Returns 0 if the font could not be loaded. - This pointer should not be dropped. See IReferenceCounted::drop() for - more information. */ - virtual IGUIFont* getFont(const io::path& filename) = 0; - - //! Adds an externally loaded font to the font list. - /** This method allows to attach an already loaded font to the list of - existing fonts. The font is grabbed if non-null and adding was successful. - \param name Name the font should be stored as. - \param font Pointer to font to add. - \return Pointer to the font stored. This can differ from given parameter if the name previously existed. */ - virtual IGUIFont* addFont(const io::path& name, IGUIFont* font) = 0; - - //! remove loaded font - virtual void removeFont(IGUIFont* font) = 0; - - //! Returns the default built-in font. - /** \return Pointer to the default built-in font. - This pointer should not be dropped. See IReferenceCounted::drop() for - more information. */ - virtual IGUIFont* getBuiltInFont() const = 0; - - //! Returns pointer to the sprite bank with the specified file name. - /** Loads the bank if it was not loaded before. - \param filename Filename of the sprite bank's origin. - \return Pointer to the sprite bank. Returns 0 if it could not be loaded. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual IGUISpriteBank* getSpriteBank(const io::path& filename) = 0; - - //! Adds an empty sprite bank to the manager - /** \param name Name of the new sprite bank. - \return Pointer to the sprite bank. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual IGUISpriteBank* addEmptySpriteBank(const io::path& name) = 0; - - //! Returns the root gui element. - /** This is the first gui element, the (direct or indirect) parent of all - other gui elements. It is a valid IGUIElement, with dimensions the same - size as the screen. - \return Pointer to the root element of the GUI. The returned pointer - should not be dropped. See IReferenceCounted::drop() for more - information. */ - virtual IGUIElement* getRootGUIElement() = 0; - - //! Adds a button element. - /** \param rectangle Rectangle specifying the borders of the button. - \param parent Parent gui element of the button. - \param id Id with which the gui element can be identified. - \param text Text displayed on the button. - \param tooltiptext Text displayed in the tooltip. - \return Pointer to the created button. Returns 0 if an error occurred. - This pointer should not be dropped. See IReferenceCounted::drop() for - more information. */ - virtual IGUIButton* addButton(const core::rect<s32>& rectangle, - IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0, const wchar_t* tooltiptext = 0) = 0; - - //! Adds an empty window element. - /** \param rectangle Rectangle specifying the borders of the window. - \param modal Defines if the dialog is modal. This means, that all other - gui elements which were created before the window cannot be used until - it is removed. - \param text Text displayed as the window title. - \param parent Parent gui element of the window. - \param id Id with which the gui element can be identified. - \return Pointer to the created window. Returns 0 if an error occurred. - This pointer should not be dropped. See IReferenceCounted::drop() for - more information. */ - virtual IGUIWindow* addWindow(const core::rect<s32>& rectangle, bool modal = false, - const wchar_t* text=0, IGUIElement* parent=0, s32 id=-1) = 0; - - //! Adds a modal screen. - /** This control stops its parent's members from being able to receive - input until its last child is removed, it then deletes itself. - \param parent Parent gui element of the modal. - \return Pointer to the created modal. Returns 0 if an error occurred. - This pointer should not be dropped. See IReferenceCounted::drop() for - more information. */ - virtual IGUIElement* addModalScreen(IGUIElement* parent) = 0; - - //! Adds a message box. - /** \param caption Text to be displayed the title of the message box. - \param text Text to be displayed in the body of the message box. - \param modal Defines if the dialog is modal. This means, that all other - gui elements which were created before the message box cannot be used - until this messagebox is removed. - \param flags Flags specifying the layout of the message box. For example - to create a message box with an OK and a CANCEL button on it, set this - to (EMBF_OK | EMBF_CANCEL). - \param parent Parent gui element of the message box. - \param id Id with which the gui element can be identified. - \param image Optional texture which will be displayed beside the text as an image - \return Pointer to the created message box. Returns 0 if an error - occurred. This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual IGUIWindow* addMessageBox(const wchar_t* caption, const wchar_t* text=0, - bool modal = true, s32 flags = EMBF_OK, IGUIElement* parent=0, s32 id=-1, video::ITexture* image=0) = 0; - - //! Adds a scrollbar. - /** \param horizontal Specifies if the scroll bar is drawn horizontal - or vertical. - \param rectangle Rectangle specifying the borders of the scrollbar. - \param parent Parent gui element of the scroll bar. - \param id Id to identify the gui element. - \return Pointer to the created scrollbar. Returns 0 if an error - occurred. This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual IGUIScrollBar* addScrollBar(bool horizontal, const core::rect<s32>& rectangle, - IGUIElement* parent=0, s32 id=-1) = 0; - - //! Adds an image element. - /** \param image Image to be displayed. - \param pos Position of the image. The width and height of the image is - taken from the image. - \param useAlphaChannel Sets if the image should use the alpha channel - of the texture to draw itself. - \param parent Parent gui element of the image. - \param id Id to identify the gui element. - \param text Title text of the image. - \return Pointer to the created image element. Returns 0 if an error - occurred. This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual IGUIImage* addImage(video::ITexture* image, core::position2d<s32> pos, - bool useAlphaChannel=true, IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0) = 0; - - //! Adds an image element. - /** Use IGUIImage::setImage later to set the image to be displayed. - \param rectangle Rectangle specifying the borders of the image. - \param parent Parent gui element of the image. - \param id Id to identify the gui element. - \param text Title text of the image. - \param useAlphaChannel Sets if the image should use the alpha channel - of the texture to draw itself. - \return Pointer to the created image element. Returns 0 if an error - occurred. This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual IGUIImage* addImage(const core::rect<s32>& rectangle, - IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0, bool useAlphaChannel=true) = 0; - - //! Adds a checkbox element. - /** \param checked Define the initial state of the check box. - \param rectangle Rectangle specifying the borders of the check box. - \param parent Parent gui element of the check box. - \param id Id to identify the gui element. - \param text Title text of the check box. - \return Pointer to the created check box. Returns 0 if an error - occurred. This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual IGUICheckBox* addCheckBox(bool checked, const core::rect<s32>& rectangle, - IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0) = 0; - - //! Adds a list box element. - /** \param rectangle Rectangle specifying the borders of the list box. - \param parent Parent gui element of the list box. - \param id Id to identify the gui element. - \param drawBackground Flag whether the background should be drawn. - \return Pointer to the created list box. Returns 0 if an error occurred. - This pointer should not be dropped. See IReferenceCounted::drop() for - more information. */ - virtual IGUIListBox* addListBox(const core::rect<s32>& rectangle, - IGUIElement* parent=0, s32 id=-1, bool drawBackground=false) = 0; - - //! Adds a tree view element. - /** \param rectangle Position and dimension of list box. - \param parent Parent gui element of the list box. - \param id Id to identify the gui element. - \param drawBackground Flag whether the background should be drawn. - \param scrollBarVertical Flag whether a vertical scrollbar should be used - \param scrollBarHorizontal Flag whether a horizontal scrollbar should be used - \return Pointer to the created list box. Returns 0 if an error occurred. - This pointer should not be dropped. See IReferenceCounted::drop() for - more information. */ - virtual IGUITreeView* addTreeView(const core::rect<s32>& rectangle, - IGUIElement* parent=0, s32 id=-1, bool drawBackground=false, - bool scrollBarVertical = true, bool scrollBarHorizontal = false) = 0; - - //! Adds a mesh viewer. Not 100% implemented yet. - /** \param rectangle Rectangle specifying the borders of the mesh viewer. - \param parent Parent gui element of the mesh viewer. - \param id Id to identify the gui element. - \param text Title text of the mesh viewer. - \return Pointer to the created mesh viewer. Returns 0 if an error - occurred. This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual IGUIMeshViewer* addMeshViewer(const core::rect<s32>& rectangle, - IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0) = 0; - - //! Adds a file open dialog. - /** \param title Text to be displayed as the title of the dialog. - \param modal Defines if the dialog is modal. This means, that all other - gui elements which were created before the message box cannot be used - until this messagebox is removed. - \param parent Parent gui element of the dialog. - \param id Id to identify the gui element. - \param restoreCWD If set to true, the current workingn directory will be - restored after the dialog is closed in some way. Otherwise the working - directory will be the one that the file dialog was last showing. - \param startDir Optional path for which the file dialog will be opened. - \return Pointer to the created file open dialog. Returns 0 if an error - occurred. This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual IGUIFileOpenDialog* addFileOpenDialog(const wchar_t* title=0, - bool modal=true, IGUIElement* parent=0, s32 id=-1, - bool restoreCWD=false, io::path::char_type* startDir=0) = 0; - - //! Adds a color select dialog. - /** \param title The title of the dialog. - \param modal Defines if the dialog is modal. This means, that all other - gui elements which were created before the dialog cannot be used - until it is removed. - \param parent The parent of the dialog. - \param id The ID of the dialog. - \return Pointer to the created file open dialog. Returns 0 if an error - occurred. This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual IGUIColorSelectDialog* addColorSelectDialog(const wchar_t* title = 0, - bool modal=true, IGUIElement* parent=0, s32 id=-1) = 0; - - //! Adds a static text. - /** \param text Text to be displayed. Can be altered after creation by SetText(). - \param rectangle Rectangle specifying the borders of the static text - \param border Set to true if the static text should have a 3d border. - \param wordWrap Enable if the text should wrap into multiple lines. - \param parent Parent item of the element, e.g. a window. - \param id The ID of the element. - \param fillBackground Enable if the background shall be filled. - Defaults to false. - \return Pointer to the created static text. Returns 0 if an error - occurred. This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual IGUIStaticText* addStaticText(const wchar_t* text, const core::rect<s32>& rectangle, - bool border=false, bool wordWrap=true, IGUIElement* parent=0, s32 id=-1, - bool fillBackground = false) = 0; - - //! Adds an edit box. - /** Supports unicode input from every keyboard around the world, - scrolling, copying and pasting (exchanging data with the clipboard - directly), maximum character amount, marking, and all shortcuts like - ctrl+X, ctrl+V, ctrl+C, shift+Left, shift+Right, Home, End, and so on. - \param text Text to be displayed. Can be altered after creation - by setText(). - \param rectangle Rectangle specifying the borders of the edit box. - \param border Set to true if the edit box should have a 3d border. - \param parent Parent item of the element, e.g. a window. - Set it to 0 to place the edit box directly in the environment. - \param id The ID of the element. - \return Pointer to the created edit box. Returns 0 if an error occurred. - This pointer should not be dropped. See IReferenceCounted::drop() for - more information. */ - virtual IGUIEditBox* addEditBox(const wchar_t* text, const core::rect<s32>& rectangle, - bool border=true, IGUIElement* parent=0, s32 id=-1) = 0; - - //! Adds a spin box. - /** An edit box with up and down buttons - \param text Text to be displayed. Can be altered after creation by setText(). - \param rectangle Rectangle specifying the borders of the spin box. - \param border Set to true if the spin box should have a 3d border. - \param parent Parent item of the element, e.g. a window. - Set it to 0 to place the spin box directly in the environment. - \param id The ID of the element. - \return Pointer to the created spin box. Returns 0 if an error occurred. - This pointer should not be dropped. See IReferenceCounted::drop() for - more information. */ - virtual IGUISpinBox* addSpinBox(const wchar_t* text, const core::rect<s32>& rectangle, - bool border=true,IGUIElement* parent=0, s32 id=-1) = 0; - - //! Adds an element for fading in or out. - /** \param rectangle Rectangle specifying the borders of the fader. - If the pointer is NULL, the whole screen is used. - \param parent Parent item of the element, e.g. a window. - \param id An identifier for the fader. - \return Pointer to the created in-out-fader. Returns 0 if an error - occurred. This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual IGUIInOutFader* addInOutFader(const core::rect<s32>* rectangle=0, IGUIElement* parent=0, s32 id=-1) = 0; - - //! Adds a tab control to the environment. - /** \param rectangle Rectangle specifying the borders of the tab control. - \param parent Parent item of the element, e.g. a window. - Set it to 0 to place the tab control directly in the environment. - \param fillbackground Specifies if the background of the tab control - should be drawn. - \param border Specifies if a flat 3d border should be drawn. This is - usually not necessary unless you place the control directly into - the environment without a window as parent. - \param id An identifier for the tab control. - \return Pointer to the created tab control element. Returns 0 if an - error occurred. This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual IGUITabControl* addTabControl(const core::rect<s32>& rectangle, - IGUIElement* parent=0, bool fillbackground=false, - bool border=true, s32 id=-1) = 0; - - //! Adds tab to the environment. - /** You can use this element to group other elements. This is not used - for creating tabs on tab controls, please use IGUITabControl::addTab() - for this instead. - \param rectangle Rectangle specifying the borders of the tab. - \param parent Parent item of the element, e.g. a window. - Set it to 0 to place the tab directly in the environment. - \param id An identifier for the tab. - \return Pointer to the created tab. Returns 0 if an - error occurred. This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual IGUITab* addTab(const core::rect<s32>& rectangle, - IGUIElement* parent=0, s32 id=-1) = 0; - - //! Adds a context menu to the environment. - /** \param rectangle Rectangle specifying the borders of the menu. - Note that the menu is resizing itself based on what items you add. - \param parent Parent item of the element, e.g. a window. - Set it to 0 to place the menu directly in the environment. - \param id An identifier for the menu. - \return Pointer to the created context menu. Returns 0 if an - error occurred. This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual IGUIContextMenu* addContextMenu(const core::rect<s32>& rectangle, - IGUIElement* parent=0, s32 id=-1) = 0; - - //! Adds a menu to the environment. - /** This is like the menu you can find on top of most windows in modern - graphical user interfaces. - \param parent Parent item of the element, e.g. a window. - Set it to 0 to place the menu directly in the environment. - \param id An identifier for the menu. - \return Pointer to the created menu. Returns 0 if an - error occurred. This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual IGUIContextMenu* addMenu(IGUIElement* parent=0, s32 id=-1) = 0; - - //! Adds a toolbar to the environment. - /** It is like a menu that is always placed on top of its parent, and - contains buttons. - \param parent Parent item of the element, e.g. a window. - Set it to 0 to place the tool bar directly in the environment. - \param id An identifier for the tool bar. - \return Pointer to the created tool bar. Returns 0 if an - error occurred. This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual IGUIToolBar* addToolBar(IGUIElement* parent=0, s32 id=-1) = 0; - - //! Adds a combo box to the environment. - /** \param rectangle Rectangle specifying the borders of the combo box. - \param parent Parent item of the element, e.g. a window. - Set it to 0 to place the combo box directly in the environment. - \param id An identifier for the combo box. - \return Pointer to the created combo box. Returns 0 if an - error occurred. This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual IGUIComboBox* addComboBox(const core::rect<s32>& rectangle, - IGUIElement* parent=0, s32 id=-1) = 0; - - //! Adds a table to the environment - /** \param rectangle Rectangle specifying the borders of the table. - \param parent Parent item of the element, e.g. a window. Set it to 0 - to place the element directly in the environment. - \param id An identifier for the table. - \param drawBackground Flag whether the background should be drawn. - \return Pointer to the created table. Returns 0 if an error occurred. - This pointer should not be dropped. See IReferenceCounted::drop() for - more information. */ - virtual IGUITable* addTable(const core::rect<s32>& rectangle, - IGUIElement* parent=0, s32 id=-1, bool drawBackground=false) =0; - - //! Get the default element factory which can create all built-in elements - /** \return Pointer to the factory. - This pointer should not be dropped. See IReferenceCounted::drop() for - more information. */ - virtual IGUIElementFactory* getDefaultGUIElementFactory() const = 0; - - //! Adds an element factory to the gui environment. - /** Use this to extend the gui environment with new element types which - it should be able to create automatically, for example when loading - data from xml files. - \param factoryToAdd Pointer to new factory. */ - virtual void registerGUIElementFactory(IGUIElementFactory* factoryToAdd) = 0; - - //! Get amount of registered gui element factories. - /** \return Amount of registered gui element factories. */ - virtual u32 getRegisteredGUIElementFactoryCount() const = 0; - - //! Get a gui element factory by index - /** \param index Index of the factory. - \return Factory at given index, or 0 if no such factory exists. */ - virtual IGUIElementFactory* getGUIElementFactory(u32 index) const = 0; - - //! Adds a GUI element by its name - /** Each factory is checked if it can create an element of the given - name. The first match will be created. - \param elementName Name of the element to be created. - \param parent Parent of the new element, if not 0. - \return New GUI element, or 0 if no such element exists. */ - virtual IGUIElement* addGUIElement(const c8* elementName, IGUIElement* parent=0) = 0; - - //! Saves the current gui into a file. - /** \param filename Name of the file. - \param start The GUIElement to start with. Root if 0. - \return True if saving succeeded, else false. */ - virtual bool saveGUI(const io::path& filename, IGUIElement* start=0) = 0; - - //! Saves the current gui into a file. - /** \param file The file to write to. - \param start The GUIElement to start with. Root if 0. - \return True if saving succeeded, else false. */ - virtual bool saveGUI(io::IWriteFile* file, IGUIElement* start=0) = 0; - - //! Loads the gui. Note that the current gui is not cleared before. - /** When a parent is set the elements will be added below the parent, the parent itself does not deserialize. - When the file contains skin-settings from the gui-environment those are always serialized into the - guienvironment independent of the parent setting. - \param filename Name of the file. - \param parent Parent for the loaded GUI, root if 0. - \return True if loading succeeded, else false. */ - virtual bool loadGUI(const io::path& filename, IGUIElement* parent=0) = 0; - - //! Loads the gui. Note that the current gui is not cleared before. - /** When a parent is set the elements will be added below the parent, the parent itself does not deserialize. - When the file contains skin-settings from the gui-environment those are always serialized into the - guienvironment independent of the parent setting. - \param file The file to load from. - \param parent Parent for the loaded GUI, root if 0. - \return True if loading succeeded, else false. */ - virtual bool loadGUI(io::IReadFile* file, IGUIElement* parent=0) = 0; - - //! Writes attributes of the gui environment - virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const =0; - - //! Reads attributes of the gui environment - virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0)=0; - - //! writes an element - virtual void writeGUIElement(io::IXMLWriter* writer, IGUIElement* node) =0; - - //! reads an element - virtual void readGUIElement(io::IXMLReader* reader, IGUIElement* node) =0; -}; - - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUIFileOpenDialog.h b/builddir/irrlicht-1.8.1/include/IGUIFileOpenDialog.h deleted file mode 100644 index f89413b..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUIFileOpenDialog.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_FILE_OPEN_DIALOG_H_INCLUDED__ -#define __I_GUI_FILE_OPEN_DIALOG_H_INCLUDED__ - -#include "IGUIElement.h" -#include "path.h" - -namespace irr -{ -namespace gui -{ - - //! Standard file chooser dialog. - /** \warning When the user selects a folder this does change the current working directory - - \par This element can create the following events of type EGUI_EVENT_TYPE: - \li EGET_DIRECTORY_SELECTED - \li EGET_FILE_SELECTED - \li EGET_FILE_CHOOSE_DIALOG_CANCELLED - */ - class IGUIFileOpenDialog : public IGUIElement - { - public: - - //! constructor - IGUIFileOpenDialog(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) - : IGUIElement(EGUIET_FILE_OPEN_DIALOG, environment, parent, id, rectangle) {} - - //! Returns the filename of the selected file. Returns NULL, if no file was selected. - virtual const wchar_t* getFileName() const = 0; - - //! Returns the directory of the selected file. Returns NULL, if no directory was selected. - virtual const io::path& getDirectoryName() = 0; - }; - - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUIFont.h b/builddir/irrlicht-1.8.1/include/IGUIFont.h deleted file mode 100644 index 2e97c82..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUIFont.h +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_FONT_H_INCLUDED__ -#define __I_GUI_FONT_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "SColor.h" -#include "rect.h" -#include "irrString.h" - -namespace irr -{ -namespace gui -{ - -//! An enum for the different types of GUI font. -enum EGUI_FONT_TYPE -{ - //! Bitmap fonts loaded from an XML file or a texture. - EGFT_BITMAP = 0, - - //! Scalable vector fonts loaded from an XML file. - /** These fonts reside in system memory and use no video memory - until they are displayed. These are slower than bitmap fonts - but can be easily scaled and rotated. */ - EGFT_VECTOR, - - //! A font which uses a the native API provided by the operating system. - /** Currently not used. */ - EGFT_OS, - - //! An external font type provided by the user. - EGFT_CUSTOM -}; - -//! Font interface. -class IGUIFont : public virtual IReferenceCounted -{ -public: - - //! Draws some text and clips it to the specified rectangle if wanted. - /** \param text: Text to draw - \param position: Rectangle specifying position where to draw the text. - \param color: Color of the text - \param hcenter: Specifies if the text should be centered horizontally into the rectangle. - \param vcenter: Specifies if the text should be centered vertically into the rectangle. - \param clip: Optional pointer to a rectangle against which the text will be clipped. - If the pointer is null, no clipping will be done. */ - virtual void draw(const core::stringw& text, const core::rect<s32>& position, - video::SColor color, bool hcenter=false, bool vcenter=false, - const core::rect<s32>* clip=0) = 0; - - //! Calculates the width and height of a given string of text. - /** \return Returns width and height of the area covered by the text if - it would be drawn. */ - virtual core::dimension2d<u32> getDimension(const wchar_t* text) const = 0; - - //! Calculates the index of the character in the text which is on a specific position. - /** \param text: Text string. - \param pixel_x: X pixel position of which the index of the character will be returned. - \return Returns zero based index of the character in the text, and -1 if no no character - is on this position. (=the text is too short). */ - virtual s32 getCharacterFromPos(const wchar_t* text, s32 pixel_x) const = 0; - - //! Returns the type of this font - virtual EGUI_FONT_TYPE getType() const { return EGFT_CUSTOM; } - - //! Sets global kerning width for the font. - virtual void setKerningWidth (s32 kerning) = 0; - - //! Sets global kerning height for the font. - virtual void setKerningHeight (s32 kerning) = 0; - - //! Gets kerning values (distance between letters) for the font. If no parameters are provided, - /** the global kerning distance is returned. - \param thisLetter: If this parameter is provided, the left side kerning - for this letter is added to the global kerning value. For example, a - space might only be one pixel wide, but it may be displayed as several - pixels. - \param previousLetter: If provided, kerning is calculated for both - letters and added to the global kerning value. For example, in a font - which supports kerning pairs a string such as 'Wo' may have the 'o' - tucked neatly under the 'W'. - */ - virtual s32 getKerningWidth(const wchar_t* thisLetter=0, const wchar_t* previousLetter=0) const = 0; - - //! Returns the distance between letters - virtual s32 getKerningHeight() const = 0; - - //! Define which characters should not be drawn by the font. - /** For example " " would not draw any space which is usually blank in - most fonts. - \param s String of symbols which are not send down to the videodriver - */ - virtual void setInvisibleCharacters( const wchar_t *s ) = 0; -}; - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUIFontBitmap.h b/builddir/irrlicht-1.8.1/include/IGUIFontBitmap.h deleted file mode 100644 index c05a652..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUIFontBitmap.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_FONT_BITMAP_H_INCLUDED__ -#define __I_GUI_FONT_BITMAP_H_INCLUDED__ - -#include "IGUIFont.h" - -namespace irr -{ -namespace gui -{ - class IGUISpriteBank; - -//! Font interface. -class IGUIFontBitmap : public IGUIFont -{ -public: - - //! Returns the type of this font - virtual EGUI_FONT_TYPE getType() const { return EGFT_BITMAP; } - - //! returns the parsed Symbol Information - virtual IGUISpriteBank* getSpriteBank() const = 0; - - //! returns the sprite number from a given character - virtual u32 getSpriteNoFromChar(const wchar_t *c) const = 0; - - //! Gets kerning values (distance between letters) for the font. If no parameters are provided, - /** the global kerning distance is returned. - \param thisLetter: If this parameter is provided, the left side kerning for this letter is added - to the global kerning value. For example, a space might only be one pixel wide, but it may - be displayed as several pixels. - \param previousLetter: If provided, kerning is calculated for both letters and added to the global - kerning value. For example, EGFT_BITMAP will add the right kerning value of previousLetter to the - left side kerning value of thisLetter, then add the global value. - */ - virtual s32 getKerningWidth(const wchar_t* thisLetter=0, const wchar_t* previousLetter=0) const = 0; -}; - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUIImage.h b/builddir/irrlicht-1.8.1/include/IGUIImage.h deleted file mode 100644 index 5e6d347..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUIImage.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_IMAGE_H_INCLUDED__ -#define __I_GUI_IMAGE_H_INCLUDED__ - -#include "IGUIElement.h" - -namespace irr -{ -namespace video -{ - class ITexture; -} -namespace gui -{ - - //! GUI element displaying an image. - class IGUIImage : public IGUIElement - { - public: - - //! constructor - IGUIImage(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) - : IGUIElement(EGUIET_IMAGE, environment, parent, id, rectangle) {} - - //! Sets an image texture - virtual void setImage(video::ITexture* image) = 0; - - //! Gets the image texture - virtual video::ITexture* getImage() const = 0; - - //! Sets the color of the image - virtual void setColor(video::SColor color) = 0; - - //! Sets if the image should scale to fit the element - virtual void setScaleImage(bool scale) = 0; - - //! Sets if the image should use its alpha channel to draw itself - virtual void setUseAlphaChannel(bool use) = 0; - - //! Gets the color of the image - virtual video::SColor getColor() const = 0; - - //! Returns true if the image is scaled to fit, false if not - virtual bool isImageScaled() const = 0; - - //! Returns true if the image is using the alpha channel, false if not - virtual bool isAlphaChannelUsed() const = 0; - }; - - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUIImageList.h b/builddir/irrlicht-1.8.1/include/IGUIImageList.h deleted file mode 100644 index fb4ca4b..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUIImageList.h +++ /dev/null @@ -1,45 +0,0 @@ -// This file is part of the "Irrlicht Engine". -// written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de - -#ifndef __I_GUI_IMAGE_LIST_H_INCLUDED__ -#define __I_GUI_IMAGE_LIST_H_INCLUDED__ - -#include "IGUIElement.h" -#include "rect.h" -#include "irrTypes.h" - -namespace irr -{ -namespace gui -{ - -//! Font interface. -class IGUIImageList : public virtual IReferenceCounted -{ -public: - - //! Destructor - virtual ~IGUIImageList() {}; - - //! Draws an image and clips it to the specified rectangle if wanted - //! \param index: Index of the image - //! \param destPos: Position of the image to draw - //! \param clip: Optional pointer to a rectalgle against which the text will be clipped. - //! If the pointer is null, no clipping will be done. - virtual void draw(s32 index, const core::position2d<s32>& destPos, - const core::rect<s32>* clip = 0) = 0; - - //! Returns the count of Images in the list. - //! \return Returns the count of Images in the list. - virtual s32 getImageCount() const = 0; - - //! Returns the size of the images in the list. - //! \return Returns the size of the images in the list. - virtual core::dimension2d<s32> getImageSize() const = 0; -}; - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUIInOutFader.h b/builddir/irrlicht-1.8.1/include/IGUIInOutFader.h deleted file mode 100644 index 6846d7b..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUIInOutFader.h +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_IN_OUT_FADER_H_INCLUDED__ -#define __I_GUI_IN_OUT_FADER_H_INCLUDED__ - -#include "IGUIElement.h" -#include "SColor.h" - -namespace irr -{ -namespace gui -{ - - //! Element for fading out or in - /** Here is a small example on how the class is used. In this example we fade - in from a total red screen in the beginning. As you can see, the fader is not - only useful for dramatic in and out fading, but also to show that the player - is hit in a first person shooter game for example. - \code - gui::IGUIInOutFader* fader = device->getGUIEnvironment()->addInOutFader(); - fader->setColor(video::SColor(0,255,0,0)); - fader->fadeIn(4000); - \endcode - */ - class IGUIInOutFader : public IGUIElement - { - public: - - //! constructor - IGUIInOutFader(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) - : IGUIElement(EGUIET_IN_OUT_FADER, environment, parent, id, rectangle) {} - - //! Gets the color to fade out to or to fade in from. - virtual video::SColor getColor() const = 0; - - //! Sets the color to fade out to or to fade in from. - /** \param color: Color to where it is faded out od from it is faded in. */ - virtual void setColor(video::SColor color) = 0; - virtual void setColor(video::SColor source, video::SColor dest) = 0; - - //! Starts the fade in process. - /** In the beginning the whole rect is drawn by the set color - (black by default) and at the end of the overgiven time the - color has faded out. - \param time: Time specifying how long it should need to fade in, - in milliseconds. */ - virtual void fadeIn(u32 time) = 0; - - //! Starts the fade out process. - /** In the beginning everything is visible, and at the end of - the time only the set color (black by the fault) will be drawn. - \param time: Time specifying how long it should need to fade out, - in milliseconds. */ - virtual void fadeOut(u32 time) = 0; - - //! Returns if the fade in or out process is done. - virtual bool isReady() const = 0; - }; - - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUIListBox.h b/builddir/irrlicht-1.8.1/include/IGUIListBox.h deleted file mode 100644 index de922ce..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUIListBox.h +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_LIST_BOX_H_INCLUDED__ -#define __I_GUI_LIST_BOX_H_INCLUDED__ - -#include "IGUIElement.h" -#include "SColor.h" - -namespace irr -{ -namespace gui -{ - class IGUISpriteBank; - - //! Enumeration for listbox colors - enum EGUI_LISTBOX_COLOR - { - //! Color of text - EGUI_LBC_TEXT=0, - //! Color of selected text - EGUI_LBC_TEXT_HIGHLIGHT, - //! Color of icon - EGUI_LBC_ICON, - //! Color of selected icon - EGUI_LBC_ICON_HIGHLIGHT, - //! Not used, just counts the number of available colors - EGUI_LBC_COUNT - }; - - - //! Default list box GUI element. - /** \par This element can create the following events of type EGUI_EVENT_TYPE: - \li EGET_LISTBOX_CHANGED - \li EGET_LISTBOX_SELECTED_AGAIN - */ - class IGUIListBox : public IGUIElement - { - public: - //! constructor - IGUIListBox(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) - : IGUIElement(EGUIET_LIST_BOX, environment, parent, id, rectangle) {} - - //! returns amount of list items - virtual u32 getItemCount() const = 0; - - //! returns string of a list item. the may id be a value from 0 to itemCount-1 - virtual const wchar_t* getListItem(u32 id) const = 0; - - //! adds an list item, returns id of item - virtual u32 addItem(const wchar_t* text) = 0; - - //! adds an list item with an icon - /** \param text Text of list entry - \param icon Sprite index of the Icon within the current sprite bank. Set it to -1 if you want no icon - \return The id of the new created item */ - virtual u32 addItem(const wchar_t* text, s32 icon) = 0; - - //! Removes an item from the list - virtual void removeItem(u32 index) = 0; - - //! get the the id of the item at the given absolute coordinates - /** \return The id of the listitem or -1 when no item is at those coordinates*/ - virtual s32 getItemAt(s32 xpos, s32 ypos) const = 0; - - //! Returns the icon of an item - virtual s32 getIcon(u32 index) const = 0; - - //! Sets the sprite bank which should be used to draw list icons. - /** This font is set to the sprite bank of the built-in-font by - default. A sprite can be displayed in front of every list item. - An icon is an index within the icon sprite bank. Several - default icons are available in the skin through getIcon. */ - virtual void setSpriteBank(IGUISpriteBank* bank) = 0; - - //! clears the list, deletes all items in the listbox - virtual void clear() = 0; - - //! returns id of selected item. returns -1 if no item is selected. - virtual s32 getSelected() const = 0; - - //! sets the selected item. Set this to -1 if no item should be selected - virtual void setSelected(s32 index) = 0; - - //! sets the selected item. Set this to 0 if no item should be selected - virtual void setSelected(const wchar_t *item) = 0; - - //! set whether the listbox should scroll to newly selected items - virtual void setAutoScrollEnabled(bool scroll) = 0; - - //! returns true if automatic scrolling is enabled, false if not. - virtual bool isAutoScrollEnabled() const = 0; - - //! set all item colors at given index to color - virtual void setItemOverrideColor(u32 index, video::SColor color) = 0; - - //! set all item colors of specified type at given index to color - virtual void setItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType, video::SColor color) = 0; - - //! clear all item colors at index - virtual void clearItemOverrideColor(u32 index) = 0; - - //! clear item color at index for given colortype - virtual void clearItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) = 0; - - //! has the item at index its color overwritten? - virtual bool hasItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) const = 0; - - //! return the overwrite color at given item index. - virtual video::SColor getItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) const = 0; - - //! return the default color which is used for the given colorType - virtual video::SColor getItemDefaultColor(EGUI_LISTBOX_COLOR colorType) const = 0; - - //! set the item at the given index - virtual void setItem(u32 index, const wchar_t* text, s32 icon) = 0; - - //! Insert the item at the given index - /** \return The index on success or -1 on failure. */ - virtual s32 insertItem(u32 index, const wchar_t* text, s32 icon) = 0; - - //! Swap the items at the given indices - virtual void swapItems(u32 index1, u32 index2) = 0; - - //! set global itemHeight - virtual void setItemHeight( s32 height ) = 0; - - //! Sets whether to draw the background - virtual void setDrawBackground(bool draw) = 0; -}; - - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUIMeshViewer.h b/builddir/irrlicht-1.8.1/include/IGUIMeshViewer.h deleted file mode 100644 index 62ff1ab..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUIMeshViewer.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_MESH_VIEWER_H_INCLUDED__ -#define __I_GUI_MESH_VIEWER_H_INCLUDED__ - -#include "IGUIElement.h" - -namespace irr -{ - -namespace video -{ - class SMaterial; -} // end namespace video - -namespace scene -{ - class IAnimatedMesh; -} // end namespace scene - -namespace gui -{ - - //! 3d mesh viewing GUI element. - class IGUIMeshViewer : public IGUIElement - { - public: - - //! constructor - IGUIMeshViewer(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) - : IGUIElement(EGUIET_MESH_VIEWER, environment, parent, id, rectangle) {} - - //! Sets the mesh to be shown - virtual void setMesh(scene::IAnimatedMesh* mesh) = 0; - - //! Gets the displayed mesh - virtual scene::IAnimatedMesh* getMesh() const = 0; - - //! Sets the material - virtual void setMaterial(const video::SMaterial& material) = 0; - - //! Gets the material - virtual const video::SMaterial& getMaterial() const = 0; - }; - - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUIScrollBar.h b/builddir/irrlicht-1.8.1/include/IGUIScrollBar.h deleted file mode 100644 index 4064ef9..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUIScrollBar.h +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_SCROLL_BAR_H_INCLUDED__ -#define __I_GUI_SCROLL_BAR_H_INCLUDED__ - -#include "IGUIElement.h" - -namespace irr -{ -namespace gui -{ - - //! Default scroll bar GUI element. - /** \par This element can create the following events of type EGUI_EVENT_TYPE: - \li EGET_SCROLL_BAR_CHANGED - */ - class IGUIScrollBar : public IGUIElement - { - public: - - //! constructor - IGUIScrollBar(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) - : IGUIElement(EGUIET_SCROLL_BAR, environment, parent, id, rectangle) {} - - //! sets the maximum value of the scrollbar. - virtual void setMax(s32 max) = 0; - //! gets the maximum value of the scrollbar. - virtual s32 getMax() const = 0; - - //! sets the minimum value of the scrollbar. - virtual void setMin(s32 min) = 0; - //! gets the minimum value of the scrollbar. - virtual s32 getMin() const = 0; - - //! gets the small step value - virtual s32 getSmallStep() const = 0; - - //! Sets the small step - /** That is the amount that the value changes by when clicking - on the buttons or using the cursor keys. */ - virtual void setSmallStep(s32 step) = 0; - - //! gets the large step value - virtual s32 getLargeStep() const = 0; - - //! Sets the large step - /** That is the amount that the value changes by when clicking - in the tray, or using the page up and page down keys. */ - virtual void setLargeStep(s32 step) = 0; - - //! gets the current position of the scrollbar - virtual s32 getPos() const = 0; - - //! sets the current position of the scrollbar - virtual void setPos(s32 pos) = 0; - }; - - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUISkin.h b/builddir/irrlicht-1.8.1/include/IGUISkin.h deleted file mode 100644 index 0500be2..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUISkin.h +++ /dev/null @@ -1,574 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_SKIN_H_INCLUDED__ -#define __I_GUI_SKIN_H_INCLUDED__ - -#include "IAttributeExchangingObject.h" -#include "EGUIAlignment.h" -#include "SColor.h" -#include "rect.h" - -namespace irr -{ -namespace gui -{ - class IGUIFont; - class IGUISpriteBank; - class IGUIElement; - - //! Enumeration of available default skins. - /** To set one of the skins, use the following code, for example to set - the Windows classic skin: - \code - gui::IGUISkin* newskin = environment->createSkin(gui::EGST_WINDOWS_CLASSIC); - environment->setSkin(newskin); - newskin->drop(); - \endcode - */ - enum EGUI_SKIN_TYPE - { - //! Default windows look and feel - EGST_WINDOWS_CLASSIC=0, - - //! Like EGST_WINDOWS_CLASSIC, but with metallic shaded windows and buttons - EGST_WINDOWS_METALLIC, - - //! Burning's skin - EGST_BURNING_SKIN, - - //! An unknown skin, not serializable at present - EGST_UNKNOWN, - - //! this value is not used, it only specifies the number of skin types - EGST_COUNT - }; - - //! Names for gui element types - const c8* const GUISkinTypeNames[EGST_COUNT+1] = - { - "windowsClassic", - "windowsMetallic", - "burning", - "unknown", - 0, - }; - - - //! Enumeration for skin colors - enum EGUI_DEFAULT_COLOR - { - //! Dark shadow for three-dimensional display elements. - EGDC_3D_DARK_SHADOW = 0, - //! Shadow color for three-dimensional display elements (for edges facing away from the light source). - EGDC_3D_SHADOW, - //! Face color for three-dimensional display elements and for dialog box backgrounds. - EGDC_3D_FACE, - //! Highlight color for three-dimensional display elements (for edges facing the light source.) - EGDC_3D_HIGH_LIGHT, - //! Light color for three-dimensional display elements (for edges facing the light source.) - EGDC_3D_LIGHT, - //! Active window border. - EGDC_ACTIVE_BORDER, - //! Active window title bar text. - EGDC_ACTIVE_CAPTION, - //! Background color of multiple document interface (MDI) applications. - EGDC_APP_WORKSPACE, - //! Text on a button - EGDC_BUTTON_TEXT, - //! Grayed (disabled) text. - EGDC_GRAY_TEXT, - //! Item(s) selected in a control. - EGDC_HIGH_LIGHT, - //! Text of item(s) selected in a control. - EGDC_HIGH_LIGHT_TEXT, - //! Inactive window border. - EGDC_INACTIVE_BORDER, - //! Inactive window caption. - EGDC_INACTIVE_CAPTION, - //! Tool tip text color - EGDC_TOOLTIP, - //! Tool tip background color - EGDC_TOOLTIP_BACKGROUND, - //! Scrollbar gray area - EGDC_SCROLLBAR, - //! Window background - EGDC_WINDOW, - //! Window symbols like on close buttons, scroll bars and check boxes - EGDC_WINDOW_SYMBOL, - //! Icons in a list or tree - EGDC_ICON, - //! Selected icons in a list or tree - EGDC_ICON_HIGH_LIGHT, - //! Grayed (disabled) window symbols like on close buttons, scroll bars and check boxes - EGDC_GRAY_WINDOW_SYMBOL, - //! Window background for editable field (editbox, checkbox-field) - EGDC_EDITABLE, - //! Grayed (disabled) window background for editable field (editbox, checkbox-field) - EGDC_GRAY_EDITABLE, - //! Show focus of window background for editable field (editbox or when checkbox-field is pressed) - EGDC_FOCUSED_EDITABLE, - - //! this value is not used, it only specifies the amount of default colors - //! available. - EGDC_COUNT - }; - - //! Names for default skin colors - const c8* const GUISkinColorNames[EGDC_COUNT+1] = - { - "3DDarkShadow", - "3DShadow", - "3DFace", - "3DHighlight", - "3DLight", - "ActiveBorder", - "ActiveCaption", - "AppWorkspace", - "ButtonText", - "GrayText", - "Highlight", - "HighlightText", - "InactiveBorder", - "InactiveCaption", - "ToolTip", - "ToolTipBackground", - "ScrollBar", - "Window", - "WindowSymbol", - "Icon", - "IconHighlight", - "GrayWindowSymbol", - "Editable", - "GrayEditable", - "FocusedEditable", - 0, - }; - - //! Enumeration for default sizes. - enum EGUI_DEFAULT_SIZE - { - //! default with / height of scrollbar - EGDS_SCROLLBAR_SIZE = 0, - //! height of menu - EGDS_MENU_HEIGHT, - //! width of a window button - EGDS_WINDOW_BUTTON_WIDTH, - //! width of a checkbox check - EGDS_CHECK_BOX_WIDTH, - //! \deprecated This may be removed by Irrlicht 1.9 - EGDS_MESSAGE_BOX_WIDTH, - //! \deprecated This may be removed by Irrlicht 1.9 - EGDS_MESSAGE_BOX_HEIGHT, - //! width of a default button - EGDS_BUTTON_WIDTH, - //! height of a default button - EGDS_BUTTON_HEIGHT, - //! distance for text from background - EGDS_TEXT_DISTANCE_X, - //! distance for text from background - EGDS_TEXT_DISTANCE_Y, - //! distance for text in the title bar, from the left of the window rect - EGDS_TITLEBARTEXT_DISTANCE_X, - //! distance for text in the title bar, from the top of the window rect - EGDS_TITLEBARTEXT_DISTANCE_Y, - //! free space in a messagebox between borders and contents on all sides - EGDS_MESSAGE_BOX_GAP_SPACE, - //! minimal space to reserve for messagebox text-width - EGDS_MESSAGE_BOX_MIN_TEXT_WIDTH, - //! maximal space to reserve for messagebox text-width - EGDS_MESSAGE_BOX_MAX_TEXT_WIDTH, - //! minimal space to reserve for messagebox text-height - EGDS_MESSAGE_BOX_MIN_TEXT_HEIGHT, - //! maximal space to reserve for messagebox text-height - EGDS_MESSAGE_BOX_MAX_TEXT_HEIGHT, - //! pixels to move the button image to the right when a pushbutton is pressed - EGDS_BUTTON_PRESSED_IMAGE_OFFSET_X, - //! pixels to move the button image down when a pushbutton is pressed - EGDS_BUTTON_PRESSED_IMAGE_OFFSET_Y, - //! pixels to move the button text to the right when a pushbutton is pressed - EGDS_BUTTON_PRESSED_TEXT_OFFSET_X, - //! pixels to move the button text down when a pushbutton is pressed - EGDS_BUTTON_PRESSED_TEXT_OFFSET_Y, - - //! this value is not used, it only specifies the amount of default sizes - //! available. - EGDS_COUNT - }; - - - //! Names for default skin sizes - const c8* const GUISkinSizeNames[EGDS_COUNT+1] = - { - "ScrollBarSize", - "MenuHeight", - "WindowButtonWidth", - "CheckBoxWidth", - "MessageBoxWidth", - "MessageBoxHeight", - "ButtonWidth", - "ButtonHeight", - "TextDistanceX", - "TextDistanceY", - "TitleBarTextX", - "TitleBarTextY", - "MessageBoxGapSpace", - "MessageBoxMinTextWidth", - "MessageBoxMaxTextWidth", - "MessageBoxMinTextHeight", - "MessageBoxMaxTextHeight", - "ButtonPressedImageOffsetX", - "ButtonPressedImageOffsetY" - "ButtonPressedTextOffsetX", - "ButtonPressedTextOffsetY", - 0 - }; - - - enum EGUI_DEFAULT_TEXT - { - //! Text for the OK button on a message box - EGDT_MSG_BOX_OK = 0, - //! Text for the Cancel button on a message box - EGDT_MSG_BOX_CANCEL, - //! Text for the Yes button on a message box - EGDT_MSG_BOX_YES, - //! Text for the No button on a message box - EGDT_MSG_BOX_NO, - //! Tooltip text for window close button - EGDT_WINDOW_CLOSE, - //! Tooltip text for window maximize button - EGDT_WINDOW_MAXIMIZE, - //! Tooltip text for window minimize button - EGDT_WINDOW_MINIMIZE, - //! Tooltip text for window restore button - EGDT_WINDOW_RESTORE, - - //! this value is not used, it only specifies the number of default texts - EGDT_COUNT - }; - - //! Names for default skin sizes - const c8* const GUISkinTextNames[EGDT_COUNT+1] = - { - "MessageBoxOkay", - "MessageBoxCancel", - "MessageBoxYes", - "MessageBoxNo", - "WindowButtonClose", - "WindowButtonMaximize", - "WindowButtonMinimize", - "WindowButtonRestore", - 0 - }; - - //! Customizable symbols for GUI - enum EGUI_DEFAULT_ICON - { - //! maximize window button - EGDI_WINDOW_MAXIMIZE = 0, - //! restore window button - EGDI_WINDOW_RESTORE, - //! close window button - EGDI_WINDOW_CLOSE, - //! minimize window button - EGDI_WINDOW_MINIMIZE, - //! resize icon for bottom right corner of a window - EGDI_WINDOW_RESIZE, - //! scroll bar up button - EGDI_CURSOR_UP, - //! scroll bar down button - EGDI_CURSOR_DOWN, - //! scroll bar left button - EGDI_CURSOR_LEFT, - //! scroll bar right button - EGDI_CURSOR_RIGHT, - //! icon for menu children - EGDI_MENU_MORE, - //! tick for checkbox - EGDI_CHECK_BOX_CHECKED, - //! down arrow for dropdown menus - EGDI_DROP_DOWN, - //! smaller up arrow - EGDI_SMALL_CURSOR_UP, - //! smaller down arrow - EGDI_SMALL_CURSOR_DOWN, - //! selection dot in a radio button - EGDI_RADIO_BUTTON_CHECKED, - //! << icon indicating there is more content to the left - EGDI_MORE_LEFT, - //! >> icon indicating that there is more content to the right - EGDI_MORE_RIGHT, - //! icon indicating that there is more content above - EGDI_MORE_UP, - //! icon indicating that there is more content below - EGDI_MORE_DOWN, - //! plus icon for trees - EGDI_EXPAND, - - //! minus icon for trees - EGDI_COLLAPSE, - //! file icon for file selection - EGDI_FILE, - //! folder icon for file selection - EGDI_DIRECTORY, - - //! value not used, it only specifies the number of icons - EGDI_COUNT - }; - - const c8* const GUISkinIconNames[EGDI_COUNT+1] = - { - "windowMaximize", - "windowRestore", - "windowClose", - "windowMinimize", - "windowResize", - "cursorUp", - "cursorDown", - "cursorLeft", - "cursorRight", - "menuMore", - "checkBoxChecked", - "dropDown", - "smallCursorUp", - "smallCursorDown", - "radioButtonChecked", - "moreLeft", - "moreRight", - "moreUp", - "moreDown", - "expand", - "collapse", - "file", - "directory", - 0 - }; - - // Customizable fonts - enum EGUI_DEFAULT_FONT - { - //! For static text, edit boxes, lists and most other places - EGDF_DEFAULT=0, - //! Font for buttons - EGDF_BUTTON, - //! Font for window title bars - EGDF_WINDOW, - //! Font for menu items - EGDF_MENU, - //! Font for tooltips - EGDF_TOOLTIP, - //! this value is not used, it only specifies the amount of default fonts - //! available. - EGDF_COUNT - }; - - const c8* const GUISkinFontNames[EGDF_COUNT+1] = - { - "defaultFont", - "buttonFont", - "windowFont", - "menuFont", - "tooltipFont", - 0 - }; - - //! A skin modifies the look of the GUI elements. - class IGUISkin : public virtual io::IAttributeExchangingObject - { - public: - - //! returns default color - virtual video::SColor getColor(EGUI_DEFAULT_COLOR color) const = 0; - - //! sets a default color - virtual void setColor(EGUI_DEFAULT_COLOR which, video::SColor newColor) = 0; - - //! returns size for the given size type - virtual s32 getSize(EGUI_DEFAULT_SIZE size) const = 0; - - //! Returns a default text. - /** For example for Message box button captions: - "OK", "Cancel", "Yes", "No" and so on. */ - virtual const wchar_t* getDefaultText(EGUI_DEFAULT_TEXT text) const = 0; - - //! Sets a default text. - /** For example for Message box button captions: - "OK", "Cancel", "Yes", "No" and so on. */ - virtual void setDefaultText(EGUI_DEFAULT_TEXT which, const wchar_t* newText) = 0; - - //! sets a default size - virtual void setSize(EGUI_DEFAULT_SIZE which, s32 size) = 0; - - //! returns the default font - virtual IGUIFont* getFont(EGUI_DEFAULT_FONT which=EGDF_DEFAULT) const = 0; - - //! sets a default font - virtual void setFont(IGUIFont* font, EGUI_DEFAULT_FONT which=EGDF_DEFAULT) = 0; - - //! returns the sprite bank - virtual IGUISpriteBank* getSpriteBank() const = 0; - - //! sets the sprite bank - virtual void setSpriteBank(IGUISpriteBank* bank) = 0; - - //! Returns a default icon - /** Returns the sprite index within the sprite bank */ - virtual u32 getIcon(EGUI_DEFAULT_ICON icon) const = 0; - - //! Sets a default icon - /** Sets the sprite index used for drawing icons like arrows, - close buttons and ticks in checkboxes - \param icon: Enum specifying which icon to change - \param index: The sprite index used to draw this icon */ - virtual void setIcon(EGUI_DEFAULT_ICON icon, u32 index) = 0; - - //! draws a standard 3d button pane - /** Used for drawing for example buttons in normal state. - It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and - EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details. - \param element: Pointer to the element which wishes to draw this. This parameter - is usually not used by IGUISkin, but can be used for example by more complex - implementations to find out how to draw the part exactly. - \param rect: Defining area where to draw. - \param clip: Clip area. */ - virtual void draw3DButtonPaneStandard(IGUIElement* element, - const core::rect<s32>& rect, - const core::rect<s32>* clip=0) = 0; - - //! draws a pressed 3d button pane - /** Used for drawing for example buttons in pressed state. - It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and - EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details. - \param element: Pointer to the element which wishes to draw this. This parameter - is usually not used by IGUISkin, but can be used for example by more complex - implementations to find out how to draw the part exactly. - \param rect: Defining area where to draw. - \param clip: Clip area. */ - virtual void draw3DButtonPanePressed(IGUIElement* element, - const core::rect<s32>& rect, - const core::rect<s32>* clip=0) = 0; - - //! draws a sunken 3d pane - /** Used for drawing the background of edit, combo or check boxes. - \param element: Pointer to the element which wishes to draw this. This parameter - is usually not used by IGUISkin, but can be used for example by more complex - implementations to find out how to draw the part exactly. - \param bgcolor: Background color. - \param flat: Specifies if the sunken pane should be flat or displayed as sunken - deep into the ground. - \param fillBackGround: Specifies if the background should be filled with the background - color or not be drawn at all. - \param rect: Defining area where to draw. - \param clip: Clip area. */ - virtual void draw3DSunkenPane(IGUIElement* element, - video::SColor bgcolor, bool flat, bool fillBackGround, - const core::rect<s32>& rect, - const core::rect<s32>* clip=0) = 0; - - //! draws a window background - /** Used for drawing the background of dialogs and windows. - \param element: Pointer to the element which wishes to draw this. This parameter - is usually not used by IGUISkin, but can be used for example by more complex - implementations to find out how to draw the part exactly. - \param titleBarColor: Title color. - \param drawTitleBar: True to enable title drawing. - \param rect: Defining area where to draw. - \param clip: Clip area. - \param checkClientArea: When set to non-null the function will not draw anything, - but will instead return the clientArea which can be used for drawing by the calling window. - That is the area without borders and without titlebar. - \return Returns rect where it would be good to draw title bar text. This will - work even when checkClientArea is set to a non-null value.*/ - virtual core::rect<s32> draw3DWindowBackground(IGUIElement* element, - bool drawTitleBar, video::SColor titleBarColor, - const core::rect<s32>& rect, - const core::rect<s32>* clip=0, - core::rect<s32>* checkClientArea=0) = 0; - - //! draws a standard 3d menu pane - /** Used for drawing for menus and context menus. - It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and - EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details. - \param element: Pointer to the element which wishes to draw this. This parameter - is usually not used by IGUISkin, but can be used for example by more complex - implementations to find out how to draw the part exactly. - \param rect: Defining area where to draw. - \param clip: Clip area. */ - virtual void draw3DMenuPane(IGUIElement* element, - const core::rect<s32>& rect, - const core::rect<s32>* clip=0) = 0; - - //! draws a standard 3d tool bar - /** Used for drawing for toolbars and menus. - \param element: Pointer to the element which wishes to draw this. This parameter - is usually not used by IGUISkin, but can be used for example by more complex - implementations to find out how to draw the part exactly. - \param rect: Defining area where to draw. - \param clip: Clip area. */ - virtual void draw3DToolBar(IGUIElement* element, - const core::rect<s32>& rect, - const core::rect<s32>* clip=0) = 0; - - //! draws a tab button - /** Used for drawing for tab buttons on top of tabs. - \param element: Pointer to the element which wishes to draw this. This parameter - is usually not used by IGUISkin, but can be used for example by more complex - implementations to find out how to draw the part exactly. - \param active: Specifies if the tab is currently active. - \param rect: Defining area where to draw. - \param clip: Clip area. - \param alignment Alignment of GUI element. */ - virtual void draw3DTabButton(IGUIElement* element, bool active, - const core::rect<s32>& rect, const core::rect<s32>* clip=0, gui::EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT) = 0; - - //! draws a tab control body - /** \param element: Pointer to the element which wishes to draw this. This parameter - is usually not used by IGUISkin, but can be used for example by more complex - implementations to find out how to draw the part exactly. - \param border: Specifies if the border should be drawn. - \param background: Specifies if the background should be drawn. - \param rect: Defining area where to draw. - \param clip: Clip area. - \param tabHeight Height of tab. - \param alignment Alignment of GUI element. */ - virtual void draw3DTabBody(IGUIElement* element, bool border, bool background, - const core::rect<s32>& rect, const core::rect<s32>* clip=0, s32 tabHeight=-1, gui::EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT ) = 0; - - //! draws an icon, usually from the skin's sprite bank - /** \param element: Pointer to the element which wishes to draw this icon. - This parameter is usually not used by IGUISkin, but can be used for example - by more complex implementations to find out how to draw the part exactly. - \param icon: Specifies the icon to be drawn. - \param position: The position to draw the icon - \param starttime: The time at the start of the animation - \param currenttime: The present time, used to calculate the frame number - \param loop: Whether the animation should loop or not - \param clip: Clip area. */ - virtual void drawIcon(IGUIElement* element, EGUI_DEFAULT_ICON icon, - const core::position2di position, u32 starttime=0, u32 currenttime=0, - bool loop=false, const core::rect<s32>* clip=0) = 0; - - //! draws a 2d rectangle. - /** \param element: Pointer to the element which wishes to draw this icon. - This parameter is usually not used by IGUISkin, but can be used for example - by more complex implementations to find out how to draw the part exactly. - \param color: Color of the rectangle to draw. The alpha component specifies how - transparent the rectangle will be. - \param pos: Position of the rectangle. - \param clip: Pointer to rectangle against which the rectangle will be clipped. - If the pointer is null, no clipping will be performed. */ - virtual void draw2DRectangle(IGUIElement* element, const video::SColor &color, - const core::rect<s32>& pos, const core::rect<s32>* clip = 0) = 0; - - //! get the type of this skin - virtual EGUI_SKIN_TYPE getType() const { return EGST_UNKNOWN; } - }; - - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUISpinBox.h b/builddir/irrlicht-1.8.1/include/IGUISpinBox.h deleted file mode 100644 index 2310161..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUISpinBox.h +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (C) 2006-2012 Michael Zeilfelder -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_SPIN_BOX_H_INCLUDED__ -#define __I_GUI_SPIN_BOX_H_INCLUDED__ - -#include "IGUIElement.h" - -namespace irr -{ -namespace gui -{ - class IGUIEditBox; - - //! Single line edit box + spin buttons - /** \par This element can create the following events of type EGUI_EVENT_TYPE: - \li EGET_SPINBOX_CHANGED - */ - class IGUISpinBox : public IGUIElement - { - public: - - //! constructor - IGUISpinBox(IGUIEnvironment* environment, IGUIElement* parent, - s32 id, core::rect<s32> rectangle) - : IGUIElement(EGUIET_SPIN_BOX, environment, parent, id, rectangle) {} - - //! Access the edit box used in the spin control - virtual IGUIEditBox* getEditBox() const = 0; - - //! set the current value of the spinbox - /** \param val: value to be set in the spinbox */ - virtual void setValue(f32 val) = 0; - - //! Get the current value of the spinbox - virtual f32 getValue() const = 0; - - //! set the range of values which can be used in the spinbox - /** \param min: minimum value - \param max: maximum value */ - virtual void setRange(f32 min, f32 max) = 0; - - //! get the minimum value which can be used in the spinbox - virtual f32 getMin() const = 0; - - //! get the maximum value which can be used in the spinbox - virtual f32 getMax() const = 0; - - //! Step size by which values are changed when pressing the spinbuttons - /** The step size also determines the number of decimal places to display - \param step: stepsize used for value changes when pressing spinbuttons */ - virtual void setStepSize(f32 step=1.f) = 0; - - //! Sets the number of decimal places to display. - //! Note that this also rounds the range to the same number of decimal places. - /** \param places: The number of decimal places to display, use -1 to reset */ - virtual void setDecimalPlaces(s32 places) = 0; - - //! get the current step size - virtual f32 getStepSize() const = 0; - }; - - -} // end namespace gui -} // end namespace irr - -#endif // __I_GUI_SPIN_BOX_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/IGUISpriteBank.h b/builddir/irrlicht-1.8.1/include/IGUISpriteBank.h deleted file mode 100644 index 872bbca..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUISpriteBank.h +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_SPRITE_BANK_H_INCLUDED__ -#define __I_GUI_SPRITE_BANK_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "irrArray.h" -#include "SColor.h" -#include "rect.h" - -namespace irr -{ - -namespace video -{ - class ITexture; -} // end namespace video - -namespace gui -{ - -//! A single sprite frame. -struct SGUISpriteFrame -{ - u32 textureNumber; - u32 rectNumber; -}; - -//! A sprite composed of several frames. -struct SGUISprite -{ - SGUISprite() : Frames(), frameTime(0) {} - - core::array<SGUISpriteFrame> Frames; - u32 frameTime; -}; - - -//! Sprite bank interface. -/** See http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=25742&highlight=spritebank -* for more information how to use the spritebank. -*/ -class IGUISpriteBank : public virtual IReferenceCounted -{ -public: - - //! Returns the list of rectangles held by the sprite bank - virtual core::array< core::rect<s32> >& getPositions() = 0; - - //! Returns the array of animated sprites within the sprite bank - virtual core::array< SGUISprite >& getSprites() = 0; - - //! Returns the number of textures held by the sprite bank - virtual u32 getTextureCount() const = 0; - - //! Gets the texture with the specified index - virtual video::ITexture* getTexture(u32 index) const = 0; - - //! Adds a texture to the sprite bank - virtual void addTexture(video::ITexture* texture) = 0; - - //! Changes one of the textures in the sprite bank - virtual void setTexture(u32 index, video::ITexture* texture) = 0; - - //! Add the texture and use it for a single non-animated sprite. - //! The texture and the corresponding rectangle and sprite will all be added to the end of each array. - //! returns the index of the sprite or -1 on failure - virtual s32 addTextureAsSprite(video::ITexture* texture) = 0; - - //! clears sprites, rectangles and textures - virtual void clear() = 0; - - //! Draws a sprite in 2d with position and color - virtual void draw2DSprite(u32 index, const core::position2di& pos, - const core::rect<s32>* clip=0, - const video::SColor& color= video::SColor(255,255,255,255), - u32 starttime=0, u32 currenttime=0, - bool loop=true, bool center=false) = 0; - - //! Draws a sprite batch in 2d using an array of positions and a color - virtual void draw2DSpriteBatch(const core::array<u32>& indices, const core::array<core::position2di>& pos, - const core::rect<s32>* clip=0, - const video::SColor& color= video::SColor(255,255,255,255), - u32 starttime=0, u32 currenttime=0, - bool loop=true, bool center=false) = 0; -}; - - -} // end namespace gui -} // end namespace irr - -#endif // __I_GUI_SPRITE_BANK_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/IGUIStaticText.h b/builddir/irrlicht-1.8.1/include/IGUIStaticText.h deleted file mode 100644 index b0594ab..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUIStaticText.h +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_STATIC_TEXT_H_INCLUDED__ -#define __I_GUI_STATIC_TEXT_H_INCLUDED__ - -#include "IGUIElement.h" -#include "SColor.h" - -namespace irr -{ -namespace gui -{ - class IGUIFont; - - //! Multi or single line text label. - class IGUIStaticText : public IGUIElement - { - public: - - //! constructor - IGUIStaticText(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) - : IGUIElement(EGUIET_STATIC_TEXT, environment, parent, id, rectangle) {} - - //! Sets another skin independent font. - /** If this is set to zero, the button uses the font of the skin. - \param font: New font to set. */ - virtual void setOverrideFont(IGUIFont* font=0) = 0; - - //! Gets the override font (if any) - /** \return The override font (may be 0) */ - virtual IGUIFont* getOverrideFont(void) const = 0; - - //! Get the font which is used right now for drawing - /** Currently this is the override font when one is set and the - font of the active skin otherwise */ - virtual IGUIFont* getActiveFont() const = 0; - - //! Sets another color for the text. - /** If set, the static text does not use the EGDC_BUTTON_TEXT color defined - in the skin, but the set color instead. You don't need to call - IGUIStaticText::enableOverrrideColor(true) after this, this is done - by this function. - If you set a color, and you want the text displayed with the color - of the skin again, call IGUIStaticText::enableOverrideColor(false); - \param color: New color of the text. */ - virtual void setOverrideColor(video::SColor color) = 0; - - //! Gets the override color - /** \return: The override color */ - virtual video::SColor getOverrideColor(void) const = 0; - - //! Sets if the static text should use the overide color or the color in the gui skin. - /** \param enable: If set to true, the override color, which can be set - with IGUIStaticText::setOverrideColor is used, otherwise the - EGDC_BUTTON_TEXT color of the skin. */ - virtual void enableOverrideColor(bool enable) = 0; - - //! Checks if an override color is enabled - /** \return true if the override color is enabled, false otherwise */ - virtual bool isOverrideColorEnabled(void) const = 0; - - //! Sets another color for the background. - virtual void setBackgroundColor(video::SColor color) = 0; - - //! Sets whether to draw the background - virtual void setDrawBackground(bool draw) = 0; - - //! Gets the background color - /** \return: The background color */ - virtual video::SColor getBackgroundColor() const = 0; - - //! Checks if background drawing is enabled - /** \return true if background drawing is enabled, false otherwise */ - virtual bool isDrawBackgroundEnabled() const = 0; - - //! Sets whether to draw the border - virtual void setDrawBorder(bool draw) = 0; - - //! Checks if border drawing is enabled - /** \return true if border drawing is enabled, false otherwise */ - virtual bool isDrawBorderEnabled() const = 0; - - //! Sets text justification mode - /** \param horizontal: EGUIA_UPPERLEFT for left justified (default), - EGUIA_LOWEERRIGHT for right justified, or EGUIA_CENTER for centered text. - \param vertical: EGUIA_UPPERLEFT to align with top edge, - EGUIA_LOWEERRIGHT for bottom edge, or EGUIA_CENTER for centered text (default). */ - virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) = 0; - - //! Enables or disables word wrap for using the static text as multiline text control. - /** \param enable: If set to true, words going over one line are - broken on to the next line. */ - virtual void setWordWrap(bool enable) = 0; - - //! Checks if word wrap is enabled - /** \return true if word wrap is enabled, false otherwise */ - virtual bool isWordWrapEnabled(void) const = 0; - - //! Returns the height of the text in pixels when it is drawn. - /** This is useful for adjusting the layout of gui elements based on the height - of the multiline text in this element. - \return Height of text in pixels. */ - virtual s32 getTextHeight() const = 0; - - //! Returns the width of the current text, in the current font - /** If the text is broken, this returns the width of the widest line - \return The width of the text, or the widest broken line. */ - virtual s32 getTextWidth(void) const = 0; - - //! Set whether the text in this label should be clipped if it goes outside bounds - virtual void setTextRestrainedInside(bool restrainedInside) = 0; - - //! Checks if the text in this label should be clipped if it goes outside bounds - virtual bool isTextRestrainedInside() const = 0; - - //! Set whether the string should be interpreted as right-to-left (RTL) text - /** \note This component does not implement the Unicode bidi standard, the - text of the component should be already RTL if you call this. The - main difference when RTL is enabled is that the linebreaks for multiline - elements are performed starting from the end. - */ - virtual void setRightToLeft(bool rtl) = 0; - - //! Checks whether the text in this element should be interpreted as right-to-left - virtual bool isRightToLeft() const = 0; - }; - - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUITabControl.h b/builddir/irrlicht-1.8.1/include/IGUITabControl.h deleted file mode 100644 index d9b4d12..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUITabControl.h +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_TAB_CONTROL_H_INCLUDED__ -#define __I_GUI_TAB_CONTROL_H_INCLUDED__ - -#include "IGUIElement.h" -#include "SColor.h" -#include "IGUISkin.h" - -namespace irr -{ -namespace gui -{ - //! A tab-page, onto which other gui elements could be added. - /** IGUITab refers to the page itself, not to the tab in the tabbar of an IGUITabControl. */ - class IGUITab : public IGUIElement - { - public: - - //! constructor - IGUITab(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) - : IGUIElement(EGUIET_TAB, environment, parent, id, rectangle) {} - - //! Returns zero based index of tab if in tabcontrol. - /** Can be accessed later IGUITabControl::getTab() by this number. - Note that this number can change when other tabs are inserted or removed . - */ - virtual s32 getNumber() const = 0; - - //! sets if the tab should draw its background - virtual void setDrawBackground(bool draw=true) = 0; - - //! sets the color of the background, if it should be drawn. - virtual void setBackgroundColor(video::SColor c) = 0; - - //! returns true if the tab is drawing its background, false if not - virtual bool isDrawingBackground() const = 0; - - //! returns the color of the background - virtual video::SColor getBackgroundColor() const = 0; - - //! sets the color of the text - virtual void setTextColor(video::SColor c) = 0; - - //! gets the color of the text - virtual video::SColor getTextColor() const = 0; - }; - - //! A standard tab control - /** \par This element can create the following events of type EGUI_EVENT_TYPE: - \li EGET_TAB_CHANGED - */ - class IGUITabControl : public IGUIElement - { - public: - - //! constructor - IGUITabControl(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) - : IGUIElement(EGUIET_TAB_CONTROL, environment, parent, id, rectangle) {} - - //! Adds a tab - virtual IGUITab* addTab(const wchar_t* caption, s32 id=-1) = 0; - - //! Insert the tab at the given index - /** \return The tab on success or NULL on failure. */ - virtual IGUITab* insertTab(s32 idx, const wchar_t* caption, s32 id=-1) = 0; - - //! Removes a tab from the tabcontrol - virtual void removeTab(s32 idx) = 0; - - //! Clears the tabcontrol removing all tabs - virtual void clear() = 0; - - //! Returns amount of tabs in the tabcontrol - virtual s32 getTabCount() const = 0; - - //! Returns a tab based on zero based index - /** \param idx: zero based index of tab. Is a value betwenn 0 and getTabcount()-1; - \return Returns pointer to the Tab. Returns 0 if no tab - is corresponding to this tab. */ - virtual IGUITab* getTab(s32 idx) const = 0; - - //! Brings a tab to front. - /** \param idx: number of the tab. - \return Returns true if successful. */ - virtual bool setActiveTab(s32 idx) = 0; - - //! Brings a tab to front. - /** \param tab: pointer to the tab. - \return Returns true if successful. */ - virtual bool setActiveTab(IGUITab *tab) = 0; - - //! Returns which tab is currently active - virtual s32 getActiveTab() const = 0; - - //! get the the id of the tab at the given absolute coordinates - /** \return The id of the tab or -1 when no tab is at those coordinates*/ - virtual s32 getTabAt(s32 xpos, s32 ypos) const = 0; - - //! Set the height of the tabs - virtual void setTabHeight( s32 height ) = 0; - - //! Get the height of the tabs - /** return Returns the height of the tabs */ - virtual s32 getTabHeight() const = 0; - - //! set the maximal width of a tab. Per default width is 0 which means "no width restriction". - virtual void setTabMaxWidth(s32 width ) = 0; - - //! get the maximal width of a tab - virtual s32 getTabMaxWidth() const = 0; - - //! Set the alignment of the tabs - /** Use EGUIA_UPPERLEFT or EGUIA_LOWERRIGHT */ - virtual void setTabVerticalAlignment( gui::EGUI_ALIGNMENT alignment ) = 0; - - //! Get the alignment of the tabs - /** return Returns the alignment of the tabs */ - virtual gui::EGUI_ALIGNMENT getTabVerticalAlignment() const = 0; - - //! Set the extra width added to tabs on each side of the text - virtual void setTabExtraWidth( s32 extraWidth ) = 0; - - //! Get the extra width added to tabs on each side of the text - /** return Returns the extra width of the tabs */ - virtual s32 getTabExtraWidth() const = 0; - }; - - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUITable.h b/builddir/irrlicht-1.8.1/include/IGUITable.h deleted file mode 100644 index 219d28d..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUITable.h +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (C) 2003-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_TABLE_H_INCLUDED__ -#define __I_GUI_TABLE_H_INCLUDED__ - -#include "IGUIElement.h" -#include "irrTypes.h" -#include "SColor.h" -#include "IGUISkin.h" - -namespace irr -{ -namespace gui -{ - - //! modes for ordering used when a column header is clicked - enum EGUI_COLUMN_ORDERING - { - //! Do not use ordering - EGCO_NONE, - - //! Send a EGET_TABLE_HEADER_CHANGED message when a column header is clicked. - EGCO_CUSTOM, - - //! Sort it ascending by it's ascii value like: a,b,c,... - EGCO_ASCENDING, - - //! Sort it descending by it's ascii value like: z,x,y,... - EGCO_DESCENDING, - - //! Sort it ascending on first click, descending on next, etc - EGCO_FLIP_ASCENDING_DESCENDING, - - //! Not used as mode, only to get maximum value for this enum - EGCO_COUNT - }; - - //! Names for EGUI_COLUMN_ORDERING types - const c8* const GUIColumnOrderingNames[] = - { - "none", - "custom", - "ascend", - "descend", - "ascend_descend", - 0, - }; - - enum EGUI_ORDERING_MODE - { - //! No element ordering - EGOM_NONE, - - //! Elements are ordered from the smallest to the largest. - EGOM_ASCENDING, - - //! Elements are ordered from the largest to the smallest. - EGOM_DESCENDING, - - //! this value is not used, it only specifies the amount of default ordering types - //! available. - EGOM_COUNT - }; - - const c8* const GUIOrderingModeNames[] = - { - "none", - "ascending", - "descending", - 0 - }; - - enum EGUI_TABLE_DRAW_FLAGS - { - EGTDF_ROWS = 1, - EGTDF_COLUMNS = 2, - EGTDF_ACTIVE_ROW = 4, - EGTDF_COUNT - }; - - //! Default list box GUI element. - /** \par This element can create the following events of type EGUI_EVENT_TYPE: - \li EGET_TABLE_CHANGED - \li EGET_TABLE_SELECTED_AGAIN - \li EGET_TABLE_HEADER_CHANGED - */ - class IGUITable : public IGUIElement - { - public: - //! constructor - IGUITable(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) - : IGUIElement(EGUIET_TABLE, environment, parent, id, rectangle) {} - - //! Adds a column - /** If columnIndex is outside the current range, do push new colum at the end */ - virtual void addColumn(const wchar_t* caption, s32 columnIndex=-1) = 0; - - //! remove a column from the table - virtual void removeColumn(u32 columnIndex) = 0; - - //! Returns the number of columns in the table control - virtual s32 getColumnCount() const = 0; - - //! Makes a column active. This will trigger an ordering process. - /** \param idx: The id of the column to make active. - \param doOrder: Do also the ordering which depending on mode for active column - \return True if successful. */ - virtual bool setActiveColumn(s32 idx, bool doOrder=false) = 0; - - //! Returns which header is currently active - virtual s32 getActiveColumn() const = 0; - - //! Returns the ordering used by the currently active column - virtual EGUI_ORDERING_MODE getActiveColumnOrdering() const = 0; - - //! Set the width of a column - virtual void setColumnWidth(u32 columnIndex, u32 width) = 0; - - //! Get the width of a column - virtual u32 getColumnWidth(u32 columnIndex) const = 0; - - //! columns can be resized by drag 'n drop - virtual void setResizableColumns(bool resizable) = 0; - - //! can columns be resized by dran 'n drop? - virtual bool hasResizableColumns() const = 0; - - //! This tells the table control which ordering mode should be used when a column header is clicked. - /** \param columnIndex The index of the column header. - \param mode: One of the modes defined in EGUI_COLUMN_ORDERING */ - virtual void setColumnOrdering(u32 columnIndex, EGUI_COLUMN_ORDERING mode) = 0; - - //! Returns which row is currently selected - virtual s32 getSelected() const = 0; - - //! set wich row is currently selected - virtual void setSelected( s32 index ) = 0; - - //! Get amount of rows in the tabcontrol - virtual s32 getRowCount() const = 0; - - //! adds a row to the table - /** \param rowIndex Zero based index of rows. The row will be - inserted at this position, if a row already exist there, it - will be placed after it. If the row is larger than the actual - number of row by more than one, it won't be created. Note that - if you create a row that's not at the end, there might be - performance issues. - \return index of inserted row. */ - virtual u32 addRow(u32 rowIndex) = 0; - - //! Remove a row from the table - virtual void removeRow(u32 rowIndex) = 0; - - //! clears the table rows, but keeps the columns intact - virtual void clearRows() = 0; - - //! Swap two row positions. - virtual void swapRows(u32 rowIndexA, u32 rowIndexB) = 0; - - //! This tells the table to start ordering all the rows. - /** You need to explicitly tell the table to re order the rows - when a new row is added or the cells data is changed. This - makes the system more flexible and doesn't make you pay the - cost of ordering when adding a lot of rows. - \param columnIndex: When set to -1 the active column is used. - \param mode Ordering mode of the rows. */ - virtual void orderRows(s32 columnIndex=-1, EGUI_ORDERING_MODE mode=EGOM_NONE) = 0; - - //! Set the text of a cell - virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text) = 0; - - //! Set the text of a cell, and set a color of this cell. - virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text, video::SColor color) = 0; - - //! Set the data of a cell - virtual void setCellData(u32 rowIndex, u32 columnIndex, void *data) = 0; - - //! Set the color of a cell text - virtual void setCellColor(u32 rowIndex, u32 columnIndex, video::SColor color) = 0; - - //! Get the text of a cell - virtual const wchar_t* getCellText(u32 rowIndex, u32 columnIndex ) const = 0; - - //! Get the data of a cell - virtual void* getCellData(u32 rowIndex, u32 columnIndex ) const = 0; - - //! clears the table, deletes all items in the table - virtual void clear() = 0; - - //! Set flags, as defined in EGUI_TABLE_DRAW_FLAGS, which influence the layout - virtual void setDrawFlags(s32 flags) = 0; - - //! Get the flags, as defined in EGUI_TABLE_DRAW_FLAGS, which influence the layout - virtual s32 getDrawFlags() const = 0; - }; - - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUIToolbar.h b/builddir/irrlicht-1.8.1/include/IGUIToolbar.h deleted file mode 100644 index 08519fc..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUIToolbar.h +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_TOOL_BAR_H_INCLUDED__ -#define __I_GUI_TOOL_BAR_H_INCLUDED__ - -#include "IGUIElement.h" - -namespace irr -{ -namespace video -{ - class ITexture; -} // end namespace video -namespace gui -{ - class IGUIButton; - - //! Stays at the top of its parent like the menu bar and contains tool buttons - class IGUIToolBar : public IGUIElement - { - public: - - //! constructor - IGUIToolBar(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) - : IGUIElement(EGUIET_TOOL_BAR, environment, parent, id, rectangle) {} - - //! Adds a button to the tool bar - virtual IGUIButton* addButton(s32 id=-1, const wchar_t* text=0,const wchar_t* tooltiptext=0, - video::ITexture* img=0, video::ITexture* pressedimg=0, - bool isPushButton=false, bool useAlphaChannel=false) = 0; - }; - - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUITreeView.h b/builddir/irrlicht-1.8.1/include/IGUITreeView.h deleted file mode 100644 index 5f21022..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUITreeView.h +++ /dev/null @@ -1,278 +0,0 @@ -// written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_TREE_VIEW_H_INCLUDED__ -#define __I_GUI_TREE_VIEW_H_INCLUDED__ - -#include "IGUIElement.h" -#include "IGUIImageList.h" -#include "irrTypes.h" - -namespace irr -{ -namespace gui -{ - class IGUIFont; - class IGUITreeView; - - - //! Node for gui tree view - /** \par This element can create the following events of type EGUI_EVENT_TYPE: - \li EGET_TREEVIEW_NODE_EXPAND - \li EGET_TREEVIEW_NODE_COLLAPS - \li EGET_TREEVIEW_NODE_DESELECT - \li EGET_TREEVIEW_NODE_SELECT - */ - class IGUITreeViewNode : public IReferenceCounted - { - public: - //! returns the owner (tree view) of this node - virtual IGUITreeView* getOwner() const = 0; - - //! Returns the parent node of this node. - /** For the root node this will return 0. */ - virtual IGUITreeViewNode* getParent() const = 0; - - //! returns the text of the node - virtual const wchar_t* getText() const = 0; - - //! sets the text of the node - virtual void setText( const wchar_t* text ) = 0; - - //! returns the icon text of the node - virtual const wchar_t* getIcon() const = 0; - - //! sets the icon text of the node - virtual void setIcon( const wchar_t* icon ) = 0; - - //! returns the image index of the node - virtual u32 getImageIndex() const = 0; - - //! sets the image index of the node - virtual void setImageIndex( u32 imageIndex ) = 0; - - //! returns the image index of the node - virtual u32 getSelectedImageIndex() const = 0; - - //! sets the image index of the node - virtual void setSelectedImageIndex( u32 imageIndex ) = 0; - - //! returns the user data (void*) of this node - virtual void* getData() const = 0; - - //! sets the user data (void*) of this node - virtual void setData( void* data ) = 0; - - //! returns the user data2 (IReferenceCounted) of this node - virtual IReferenceCounted* getData2() const = 0; - - //! sets the user data2 (IReferenceCounted) of this node - virtual void setData2( IReferenceCounted* data ) = 0; - - //! returns the child item count - virtual u32 getChildCount() const = 0; - - //! removes all children (recursive) from this node - virtual void clearChildren() = 0; - - //! removes all children (recursive) from this node - /** \deprecated Deprecated in 1.8, use clearChildren() instead. - This method may be removed by Irrlicht 1.9 */ - _IRR_DEPRECATED_ void clearChilds() - { - return clearChildren(); - } - - //! returns true if this node has child nodes - virtual bool hasChildren() const = 0; - - //! returns true if this node has child nodes - /** \deprecated Deprecated in 1.8, use hasChildren() instead. - This method may be removed by Irrlicht 1.9 */ - _IRR_DEPRECATED_ bool hasChilds() const - { - return hasChildren(); - } - - //! Adds a new node behind the last child node. - /** \param text text of the new node - \param icon icon text of the new node - \param imageIndex index of the image for the new node (-1 = none) - \param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex) - \param data user data (void*) of the new node - \param data2 user data2 (IReferenceCounted*) of the new node - \return The new node - */ - virtual IGUITreeViewNode* addChildBack( - const wchar_t* text, const wchar_t* icon = 0, - s32 imageIndex=-1, s32 selectedImageIndex=-1, - void* data=0, IReferenceCounted* data2=0) =0; - - //! Adds a new node before the first child node. - /** \param text text of the new node - \param icon icon text of the new node - \param imageIndex index of the image for the new node (-1 = none) - \param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex) - \param data user data (void*) of the new node - \param data2 user data2 (IReferenceCounted*) of the new node - \return The new node - */ - virtual IGUITreeViewNode* addChildFront( - const wchar_t* text, const wchar_t* icon = 0, - s32 imageIndex=-1, s32 selectedImageIndex=-1, - void* data=0, IReferenceCounted* data2=0 ) =0; - - //! Adds a new node behind the other node. - /** The other node has also te be a child node from this node. - \param other Node to insert after - \param text text of the new node - \param icon icon text of the new node - \param imageIndex index of the image for the new node (-1 = none) - \param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex) - \param data user data (void*) of the new node - \param data2 user data2 (IReferenceCounted*) of the new node - \return The new node or 0 if other is no child node from this - */ - virtual IGUITreeViewNode* insertChildAfter( - IGUITreeViewNode* other, - const wchar_t* text, const wchar_t* icon = 0, - s32 imageIndex=-1, s32 selectedImageIndex=-1, - void* data=0, IReferenceCounted* data2=0) =0; - - //! Adds a new node before the other node. - /** The other node has also te be a child node from this node. - \param other Node to insert before - \param text text of the new node - \param icon icon text of the new node - \param imageIndex index of the image for the new node (-1 = none) - \param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex) - \param data user data (void*) of the new node - \param data2 user data2 (IReferenceCounted*) of the new node - \return The new node or 0 if other is no child node from this - */ - virtual IGUITreeViewNode* insertChildBefore( - IGUITreeViewNode* other, - const wchar_t* text, const wchar_t* icon = 0, - s32 imageIndex=-1, s32 selectedImageIndex=-1, - void* data=0, IReferenceCounted* data2=0) = 0; - - //! Return the first child node from this node. - /** \return The first child node or 0 if this node has no children. */ - virtual IGUITreeViewNode* getFirstChild() const = 0; - - //! Return the last child node from this node. - /** \return The last child node or 0 if this node has no children. */ - virtual IGUITreeViewNode* getLastChild() const = 0; - - //! Returns the previous sibling node from this node. - /** \return The previous sibling node from this node or 0 if this is - the first node from the parent node. - */ - virtual IGUITreeViewNode* getPrevSibling() const = 0; - - //! Returns the next sibling node from this node. - /** \return The next sibling node from this node or 0 if this is - the last node from the parent node. - */ - virtual IGUITreeViewNode* getNextSibling() const = 0; - - //! Returns the next visible (expanded, may be out of scrolling) node from this node. - /** \return The next visible node from this node or 0 if this is - the last visible node. */ - virtual IGUITreeViewNode* getNextVisible() const = 0; - - //! Deletes a child node. - /** \return Returns true if the node was found as a child and is deleted. */ - virtual bool deleteChild( IGUITreeViewNode* child ) = 0; - - //! Moves a child node one position up. - /** \return True if the node was found as achild node and was not already the first child. */ - virtual bool moveChildUp( IGUITreeViewNode* child ) = 0; - - //! Moves a child node one position down. - /** \return True if the node was found as achild node and was not already the last child. */ - virtual bool moveChildDown( IGUITreeViewNode* child ) = 0; - - //! Returns true if the node is expanded (children are visible). - virtual bool getExpanded() const = 0; - - //! Sets if the node is expanded. - virtual void setExpanded( bool expanded ) = 0; - - //! Returns true if the node is currently selected. - virtual bool getSelected() const = 0; - - //! Sets this node as selected. - virtual void setSelected( bool selected ) = 0; - - //! Returns true if this node is the root node. - virtual bool isRoot() const = 0; - - //! Returns the level of this node. - /** The root node has level 0. Direct children of the root has level 1 ... */ - virtual s32 getLevel() const = 0; - - //! Returns true if this node is visible (all parents are expanded). - virtual bool isVisible() const = 0; - }; - - - //! Default tree view GUI element. - /** Displays a windows like tree buttons to expand/collaps the child - nodes of an node and optional tree lines. Each node consits of an - text, an icon text and a void pointer for user data. */ - class IGUITreeView : public IGUIElement - { - public: - //! constructor - IGUITreeView(IGUIEnvironment* environment, IGUIElement* parent, - s32 id, core::rect<s32> rectangle) - : IGUIElement( EGUIET_TREE_VIEW, environment, parent, id, rectangle ) {} - - //! returns the root node (not visible) from the tree. - virtual IGUITreeViewNode* getRoot() const = 0; - - //! returns the selected node of the tree or 0 if none is selected - virtual IGUITreeViewNode* getSelected() const = 0; - - //! returns true if the tree lines are visible - virtual bool getLinesVisible() const = 0; - - //! sets if the tree lines are visible - /** \param visible true for visible, false for invisible */ - virtual void setLinesVisible( bool visible ) = 0; - - //! Sets the font which should be used as icon font. - /** This font is set to the Irrlicht engine built-in-font by - default. Icons can be displayed in front of every list item. - An icon is a string, displayed with the icon font. When using - the build-in-font of the Irrlicht engine as icon font, the icon - strings defined in GUIIcons.h can be used. - */ - virtual void setIconFont( IGUIFont* font ) = 0; - - //! Sets the image list which should be used for the image and selected image of every node. - /** The default is 0 (no images). */ - virtual void setImageList( IGUIImageList* imageList ) = 0; - - //! Returns the image list which is used for the nodes. - virtual IGUIImageList* getImageList() const = 0; - - //! Sets if the image is left of the icon. Default is true. - virtual void setImageLeftOfIcon( bool bLeftOf ) = 0; - - //! Returns if the Image is left of the icon. Default is true. - virtual bool getImageLeftOfIcon() const = 0; - - //! Returns the node which is associated to the last event. - /** This pointer is only valid inside the OnEvent call! */ - virtual IGUITreeViewNode* getLastEventNode() const = 0; - }; - - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGUIWindow.h b/builddir/irrlicht-1.8.1/include/IGUIWindow.h deleted file mode 100644 index 23d45da..0000000 --- a/builddir/irrlicht-1.8.1/include/IGUIWindow.h +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GUI_WINDOW_H_INCLUDED__ -#define __I_GUI_WINDOW_H_INCLUDED__ - -#include "IGUIElement.h" -#include "EMessageBoxFlags.h" - -namespace irr -{ -namespace gui -{ - class IGUIButton; - - //! Default moveable window GUI element with border, caption and close icons. - /** \par This element can create the following events of type EGUI_EVENT_TYPE: - \li EGET_ELEMENT_CLOSED - */ - class IGUIWindow : public IGUIElement - { - public: - - //! constructor - IGUIWindow(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) - : IGUIElement(EGUIET_WINDOW, environment, parent, id, rectangle) {} - - //! Returns pointer to the close button - /** You can hide the button by calling setVisible(false) on the result. */ - virtual IGUIButton* getCloseButton() const = 0; - - //! Returns pointer to the minimize button - /** You can hide the button by calling setVisible(false) on the result. */ - virtual IGUIButton* getMinimizeButton() const = 0; - - //! Returns pointer to the maximize button - /** You can hide the button by calling setVisible(false) on the result. */ - virtual IGUIButton* getMaximizeButton() const = 0; - - //! Returns true if the window can be dragged with the mouse, false if not - virtual bool isDraggable() const = 0; - - //! Sets whether the window can be dragged by the mouse - virtual void setDraggable(bool draggable) = 0; - - //! Set if the window background will be drawn - virtual void setDrawBackground(bool draw) = 0; - - //! Get if the window background will be drawn - virtual bool getDrawBackground() const = 0; - - //! Set if the window titlebar will be drawn - //! Note: If the background is not drawn, then the titlebar is automatically also not drawn - virtual void setDrawTitlebar(bool draw) = 0; - - //! Get if the window titlebar will be drawn - virtual bool getDrawTitlebar() const = 0; - - //! Returns the rectangle of the drawable area (without border and without titlebar) - /** The coordinates are given relative to the top-left position of the gui element.<br> - So to get absolute positions you have to add the resulting rectangle to getAbsolutePosition().UpperLeftCorner.<br> - To get it relative to the parent element you have to add the resulting rectangle to getRelativePosition().UpperLeftCorner. - Beware that adding a menu will not change the clientRect as menus are own gui elements, so in that case you might want to subtract - the menu area additionally. */ - virtual core::rect<s32> getClientRect() const = 0; - }; - - -} // end namespace gui -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IGeometryCreator.h b/builddir/irrlicht-1.8.1/include/IGeometryCreator.h deleted file mode 100644 index 22cd013..0000000 --- a/builddir/irrlicht-1.8.1/include/IGeometryCreator.h +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_GEOMETRY_CREATOR_H_INCLUDED__ -#define __I_GEOMETRY_CREATOR_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "IMesh.h" -#include "IImage.h" - -namespace irr -{ -namespace video -{ - class IVideoDriver; - class SMaterial; -} - -namespace scene -{ - -//! Helper class for creating geometry on the fly. -/** You can get an instance of this class through ISceneManager::getGeometryCreator() */ -class IGeometryCreator : public IReferenceCounted -{ -public: - - //! Creates a simple cube mesh. - /** - \param size Dimensions of the cube. - \return Generated mesh. - */ - virtual IMesh* createCubeMesh(const core::vector3df& size=core::vector3df(5.f,5.f,5.f)) const =0; - - //! Create a pseudo-random mesh representing a hilly terrain. - /** - \param tileSize The size of each tile. - \param tileCount The number of tiles in each dimension. - \param material The material to apply to the mesh. - \param hillHeight The maximum height of the hills. - \param countHills The number of hills along each dimension. - \param textureRepeatCount The number of times to repeat the material texture along each dimension. - \return Generated mesh. - */ - virtual IMesh* createHillPlaneMesh( - const core::dimension2d<f32>& tileSize, - const core::dimension2d<u32>& tileCount, - video::SMaterial* material, f32 hillHeight, - const core::dimension2d<f32>& countHills, - const core::dimension2d<f32>& textureRepeatCount) const =0; - - //! Create a simple rectangular textured plane mesh. - /** - \param tileSize The size of each tile. - \param tileCount The number of tiles in each dimension. - \param material The material to apply to the mesh. - \param textureRepeatCount The number of times to repeat the material texture along each dimension. - \return Generated mesh. - */ - IMesh* createPlaneMesh( - const core::dimension2d<f32>& tileSize, - const core::dimension2d<u32>& tileCount=core::dimension2du(1,1), - video::SMaterial* material=0, - const core::dimension2df& textureRepeatCount=core::dimension2df(1.f,1.f)) const - { - return createHillPlaneMesh(tileSize, tileCount, material, 0.f, core::dimension2df(), textureRepeatCount); - } - - //! Create a terrain mesh from an image representing a heightfield. - /** - \param texture The texture to apply to the terrain. - \param heightmap An image that will be interpreted as a heightmap. The - brightness (average color) of each pixel is interpreted as a height, - with a 255 brightness pixel producing the maximum height. - \param stretchSize The size that each pixel will produce, i.e. a - 512x512 heightmap - and a stretchSize of (10.f, 20.f) will produce a mesh of size - 5120.f x 10240.f - \param maxHeight The maximum height of the terrain. - \param driver The current video driver. - \param defaultVertexBlockSize (to be documented) - \param debugBorders (to be documented) - \return Generated mesh. - */ - virtual IMesh* createTerrainMesh(video::IImage* texture, - video::IImage* heightmap, - const core::dimension2d<f32>& stretchSize, - f32 maxHeight, video::IVideoDriver* driver, - const core::dimension2d<u32>& defaultVertexBlockSize, - bool debugBorders=false) const =0; - - //! Create an arrow mesh, composed of a cylinder and a cone. - /** - \param tesselationCylinder Number of quads composing the cylinder. - \param tesselationCone Number of triangles composing the cone's roof. - \param height Total height of the arrow - \param cylinderHeight Total height of the cylinder, should be lesser - than total height - \param widthCylinder Diameter of the cylinder - \param widthCone Diameter of the cone's base, should be not smaller - than the cylinder's diameter - \param colorCylinder color of the cylinder - \param colorCone color of the cone - \return Generated mesh. - */ - virtual IMesh* createArrowMesh(const u32 tesselationCylinder = 4, - const u32 tesselationCone = 8, const f32 height = 1.f, - const f32 cylinderHeight = 0.6f, const f32 widthCylinder = 0.05f, - const f32 widthCone = 0.3f, const video::SColor colorCylinder = 0xFFFFFFFF, - const video::SColor colorCone = 0xFFFFFFFF) const =0; - - - //! Create a sphere mesh. - /** - \param radius Radius of the sphere - \param polyCountX Number of quads used for the horizontal tiling - \param polyCountY Number of quads used for the vertical tiling - \return Generated mesh. - */ - virtual IMesh* createSphereMesh(f32 radius = 5.f, - u32 polyCountX = 16, u32 polyCountY = 16) const =0; - - //! Create a cylinder mesh. - /** - \param radius Radius of the cylinder. - \param length Length of the cylinder. - \param tesselation Number of quads around the circumference of the cylinder. - \param color The color of the cylinder. - \param closeTop If true, close the ends of the cylinder, otherwise leave them open. - \param oblique (to be documented) - \return Generated mesh. - */ - virtual IMesh* createCylinderMesh(f32 radius, f32 length, - u32 tesselation, - const video::SColor& color=video::SColor(0xffffffff), - bool closeTop=true, f32 oblique=0.f) const =0; - - //! Create a cone mesh. - /** - \param radius Radius of the cone. - \param length Length of the cone. - \param tesselation Number of quads around the circumference of the cone. - \param colorTop The color of the top of the cone. - \param colorBottom The color of the bottom of the cone. - \param oblique (to be documented) - \return Generated mesh. - */ - virtual IMesh* createConeMesh(f32 radius, f32 length, u32 tesselation, - const video::SColor& colorTop=video::SColor(0xffffffff), - const video::SColor& colorBottom=video::SColor(0xffffffff), - f32 oblique=0.f) const =0; - - //! Create a volume light mesh. - /** - \param subdivideU Horizontal patch count. - \param subdivideV Vertical patch count. - \param footColor Color at the bottom of the light. - \param tailColor Color at the mid of the light. - \param lpDistance Virtual distance of the light point for normals. - \param lightDim Dimensions of the light. - \return Generated mesh. - */ - virtual IMesh* createVolumeLightMesh( - const u32 subdivideU=32, const u32 subdivideV=32, - const video::SColor footColor = 0xffffffff, - const video::SColor tailColor = 0xffffffff, - const f32 lpDistance = 8.f, - const core::vector3df& lightDim = core::vector3df(1.f,1.2f,1.f)) const =0; -}; - - -} // end namespace scene -} // end namespace irr - -#endif // __I_GEOMETRY_CREATOR_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/IImage.h b/builddir/irrlicht-1.8.1/include/IImage.h deleted file mode 100644 index d484293..0000000 --- a/builddir/irrlicht-1.8.1/include/IImage.h +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_IMAGE_H_INCLUDED__ -#define __I_IMAGE_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "position2d.h" -#include "rect.h" -#include "SColor.h" - -namespace irr -{ -namespace video -{ - -//! Interface for software image data. -/** Image loaders create these images from files. IVideoDrivers convert -these images into their (hardware) textures. -*/ -class IImage : public virtual IReferenceCounted -{ -public: - - //! Lock function. Use this to get a pointer to the image data. - /** After you don't need the pointer anymore, you must call unlock(). - \return Pointer to the image data. What type of data is pointed to - depends on the color format of the image. For example if the color - format is ECF_A8R8G8B8, it is of u32. Be sure to call unlock() after - you don't need the pointer any more. */ - virtual void* lock() = 0; - - //! Unlock function. - /** Should be called after the pointer received by lock() is not - needed anymore. */ - virtual void unlock() = 0; - - //! Returns width and height of image data. - virtual const core::dimension2d<u32>& getDimension() const = 0; - - //! Returns bits per pixel. - virtual u32 getBitsPerPixel() const = 0; - - //! Returns bytes per pixel - virtual u32 getBytesPerPixel() const = 0; - - //! Returns image data size in bytes - virtual u32 getImageDataSizeInBytes() const = 0; - - //! Returns image data size in pixels - virtual u32 getImageDataSizeInPixels() const = 0; - - //! Returns a pixel - virtual SColor getPixel(u32 x, u32 y) const = 0; - - //! Sets a pixel - virtual void setPixel(u32 x, u32 y, const SColor &color, bool blend = false ) = 0; - - //! Returns the color format - virtual ECOLOR_FORMAT getColorFormat() const = 0; - - //! Returns mask for red value of a pixel - virtual u32 getRedMask() const = 0; - - //! Returns mask for green value of a pixel - virtual u32 getGreenMask() const = 0; - - //! Returns mask for blue value of a pixel - virtual u32 getBlueMask() const = 0; - - //! Returns mask for alpha value of a pixel - virtual u32 getAlphaMask() const = 0; - - //! Returns pitch of image - virtual u32 getPitch() const =0; - - //! Copies the image into the target, scaling the image to fit - virtual void copyToScaling(void* target, u32 width, u32 height, ECOLOR_FORMAT format=ECF_A8R8G8B8, u32 pitch=0) =0; - - //! Copies the image into the target, scaling the image to fit - virtual void copyToScaling(IImage* target) =0; - - //! copies this surface into another - virtual void copyTo(IImage* target, const core::position2d<s32>& pos=core::position2d<s32>(0,0)) =0; - - //! copies this surface into another - virtual void copyTo(IImage* target, const core::position2d<s32>& pos, const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect=0) =0; - - //! copies this surface into another, using the alpha mask and cliprect and a color to add with - virtual void copyToWithAlpha(IImage* target, const core::position2d<s32>& pos, - const core::rect<s32>& sourceRect, const SColor &color, - const core::rect<s32>* clipRect = 0) =0; - - //! copies this surface into another, scaling it to fit, appyling a box filter - virtual void copyToScalingBoxFilter(IImage* target, s32 bias = 0, bool blend = false) = 0; - - //! fills the surface with given color - virtual void fill(const SColor &color) =0; - - //! get the amount of Bits per Pixel of the given color format - static u32 getBitsPerPixelFromFormat(const ECOLOR_FORMAT format) - { - switch(format) - { - case ECF_A1R5G5B5: - return 16; - case ECF_R5G6B5: - return 16; - case ECF_R8G8B8: - return 24; - case ECF_A8R8G8B8: - return 32; - case ECF_R16F: - return 16; - case ECF_G16R16F: - return 32; - case ECF_A16B16G16R16F: - return 64; - case ECF_R32F: - return 32; - case ECF_G32R32F: - return 64; - case ECF_A32B32G32R32F: - return 128; - default: - return 0; - } - } - - //! test if the color format is only viable for RenderTarget textures - /** Since we don't have support for e.g. floating point IImage formats - one should test if the color format can be used for arbitrary usage, or - if it is restricted to RTTs. */ - static bool isRenderTargetOnlyFormat(const ECOLOR_FORMAT format) - { - switch(format) - { - case ECF_A1R5G5B5: - case ECF_R5G6B5: - case ECF_R8G8B8: - case ECF_A8R8G8B8: - return false; - default: - return true; - } - } - -}; - -} // end namespace video -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IImageLoader.h b/builddir/irrlicht-1.8.1/include/IImageLoader.h deleted file mode 100644 index 77603f5..0000000 --- a/builddir/irrlicht-1.8.1/include/IImageLoader.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_SURFACE_LOADER_H_INCLUDED__ -#define __I_SURFACE_LOADER_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "IImage.h" -#include "path.h" - -namespace irr -{ -namespace io -{ - class IReadFile; -} // end namespace io -namespace video -{ - -//! Class which is able to create a image from a file. -/** If you want the Irrlicht Engine be able to load textures of -currently unsupported file formats (e.g .gif), then implement -this and add your new Surface loader with -IVideoDriver::addExternalImageLoader() to the engine. */ -class IImageLoader : public virtual IReferenceCounted -{ -public: - - //! Check if the file might be loaded by this class - /** Check is based on the file extension (e.g. ".tga") - \param filename Name of file to check. - \return True if file seems to be loadable. */ - virtual bool isALoadableFileExtension(const io::path& filename) const = 0; - - //! Check if the file might be loaded by this class - /** Check might look into the file. - \param file File handle to check. - \return True if file seems to be loadable. */ - virtual bool isALoadableFileFormat(io::IReadFile* file) const = 0; - - //! Creates a surface from the file - /** \param file File handle to check. - \return Pointer to newly created image, or 0 upon error. */ - virtual IImage* loadImage(io::IReadFile* file) const = 0; -}; - - -} // end namespace video -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IImageWriter.h b/builddir/irrlicht-1.8.1/include/IImageWriter.h deleted file mode 100644 index fd00793..0000000 --- a/builddir/irrlicht-1.8.1/include/IImageWriter.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef _I_IMAGE_WRITER_H_INCLUDED__ -#define _I_IMAGE_WRITER_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "irrString.h" -#include "coreutil.h" - -namespace irr -{ -namespace io -{ - class IWriteFile; -} // end namespace io - -namespace video -{ - class IImage; - - -//! Interface for writing software image data. -class IImageWriter : public IReferenceCounted -{ -public: - //! Check if this writer can write a file with the given extension - /** \param filename Name of the file to check. - \return True if file extension specifies a writable type. */ - virtual bool isAWriteableFileExtension(const io::path& filename) const = 0; - - //! Write image to file - /** \param file File handle to write to. - \param image Image to write into file. - \param param Writer specific parameter, influencing e.g. quality. - \return True if image was successfully written. */ - virtual bool writeImage(io::IWriteFile *file, IImage *image, u32 param = 0) const = 0; -}; - -} // namespace video -} // namespace irr - -#endif // _I_IMAGE_WRITER_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/IIndexBuffer.h b/builddir/irrlicht-1.8.1/include/IIndexBuffer.h deleted file mode 100644 index ff5738c..0000000 --- a/builddir/irrlicht-1.8.1/include/IIndexBuffer.h +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (C) 2008-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_INDEX_BUFFER_H_INCLUDED__ -#define __I_INDEX_BUFFER_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "irrArray.h" - -#include "SVertexIndex.h" - -namespace irr -{ - -namespace video -{ - -} - -namespace scene -{ - - class IIndexBuffer : public virtual IReferenceCounted - { - public: - - virtual void* getData() =0; - - virtual video::E_INDEX_TYPE getType() const =0; - virtual void setType(video::E_INDEX_TYPE IndexType) =0; - - virtual u32 stride() const =0; - - virtual u32 size() const =0; - virtual void push_back (const u32 &element) =0; - virtual u32 operator [](u32 index) const =0; - virtual u32 getLast() =0; - virtual void setValue(u32 index, u32 value) =0; - virtual void set_used(u32 usedNow) =0; - virtual void reallocate(u32 new_size) =0; - virtual u32 allocated_size() const=0; - - virtual void* pointer() =0; - - //! get the current hardware mapping hint - virtual E_HARDWARE_MAPPING getHardwareMappingHint() const =0; - - //! set the hardware mapping hint, for driver - virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) =0; - - //! flags the meshbuffer as changed, reloads hardware buffers - virtual void setDirty() = 0; - - //! Get the currently used ID for identification of changes. - /** This shouldn't be used for anything outside the VideoDriver. */ - virtual u32 getChangedID() const = 0; - }; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/ILightManager.h b/builddir/irrlicht-1.8.1/include/ILightManager.h deleted file mode 100644 index 35fb9cb..0000000 --- a/builddir/irrlicht-1.8.1/include/ILightManager.h +++ /dev/null @@ -1,62 +0,0 @@ -// Written by Colin MacDonald - all rights assigned to Nikolaus Gebhardt -// Copyright (C) 2008-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_LIGHT_MANAGER_H_INCLUDED__ -#define __I_LIGHT_MANAGER_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "irrArray.h" - -namespace irr -{ -namespace scene -{ - class ILightSceneNode; - - //! ILightManager provides an interface for user applications to manipulate the list of lights in the scene. - /** The light list can be trimmed or re-ordered before device/ hardware - lights are created, and/or individual lights can be switched on and off - before or after each scene node is rendered. It is assumed that the - ILightManager implementation will store any data that it wishes to - retain, i.e. the ISceneManager to which it is assigned, the lightList, - the current render pass, and the current scene node. */ - class ILightManager : public IReferenceCounted - { - public: - //! Called after the scene's light list has been built, but before rendering has begun. - /** As actual device/hardware lights are not created until the - ESNRP_LIGHT render pass, this provides an opportunity for the - light manager to trim or re-order the light list, before any - device/hardware lights have actually been created. - \param lightList: the Scene Manager's light list, which - the light manager may modify. This reference will remain valid - until OnPostRender(). - */ - virtual void OnPreRender(core::array<ISceneNode*> & lightList) = 0; - - //! Called after the last scene node is rendered. - /** After this call returns, the lightList passed to OnPreRender() becomes invalid. */ - virtual void OnPostRender(void) = 0; - - //! Called before a render pass begins - /** \param renderPass: the render pass that's about to begin */ - virtual void OnRenderPassPreRender(E_SCENE_NODE_RENDER_PASS renderPass) = 0; - - //! Called after the render pass specified in OnRenderPassPreRender() ends - /** \param[in] renderPass: the render pass that has finished */ - virtual void OnRenderPassPostRender(E_SCENE_NODE_RENDER_PASS renderPass) = 0; - - //! Called before the given scene node is rendered - /** \param[in] node: the scene node that's about to be rendered */ - virtual void OnNodePreRender(ISceneNode* node) = 0; - - //! Called after the the node specified in OnNodePreRender() has been rendered - /** \param[in] node: the scene node that has just been rendered */ - virtual void OnNodePostRender(ISceneNode* node) = 0; - }; -} // end namespace scene -} // end namespace irr - -#endif diff --git a/builddir/irrlicht-1.8.1/include/ILightSceneNode.h b/builddir/irrlicht-1.8.1/include/ILightSceneNode.h deleted file mode 100644 index 3feb207..0000000 --- a/builddir/irrlicht-1.8.1/include/ILightSceneNode.h +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_LIGHT_SCENE_NODE_H_INCLUDED__ -#define __I_LIGHT_SCENE_NODE_H_INCLUDED__ - -#include "ISceneNode.h" -#include "SLight.h" - -namespace irr -{ -namespace scene -{ - -//! Scene node which is a dynamic light. -/** You can switch the light on and off by making it visible or not. It can be -animated by ordinary scene node animators. If the light type is directional or -spot, the direction of the light source is defined by the rotation of the scene -node (assuming (0,0,1) as the local direction of the light). -*/ -class ILightSceneNode : public ISceneNode -{ -public: - - //! constructor - ILightSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, - const core::vector3df& position = core::vector3df(0,0,0)) - : ISceneNode(parent, mgr, id, position) {} - - //! Sets the light data associated with this ILightSceneNode - /** \param light The new light data. */ - virtual void setLightData(const video::SLight& light) = 0; - - //! Gets the light data associated with this ILightSceneNode - /** \return The light data. */ - virtual const video::SLight& getLightData() const = 0; - - //! Gets the light data associated with this ILightSceneNode - /** \return The light data. */ - virtual video::SLight& getLightData() = 0; - - //! Sets if the node should be visible or not. - /** All children of this node won't be visible either, when set - to true. - \param isVisible If the node shall be visible. */ - virtual void setVisible(bool isVisible) = 0; - - //! Sets the light's radius of influence. - /** Outside this radius the light won't lighten geometry and cast no - shadows. Setting the radius will also influence the attenuation, setting - it to (0,1/radius,0). If you want to override this behavior, set the - attenuation after the radius. - \param radius The new radius. */ - virtual void setRadius(f32 radius) = 0; - - //! Gets the light's radius of influence. - /** \return The current radius. */ - virtual f32 getRadius() const = 0; - - //! Sets the light type. - /** \param type The new type. */ - virtual void setLightType(video::E_LIGHT_TYPE type) = 0; - - //! Gets the light type. - /** \return The current light type. */ - virtual video::E_LIGHT_TYPE getLightType() const = 0; - - //! Sets whether this light casts shadows. - /** Enabling this flag won't automatically cast shadows, the meshes - will still need shadow scene nodes attached. But one can enable or - disable distinct lights for shadow casting for performance reasons. - \param shadow True if this light shall cast shadows. */ - virtual void enableCastShadow(bool shadow=true) = 0; - - //! Check whether this light casts shadows. - /** \return True if light would cast shadows, else false. */ - virtual bool getCastShadow() const = 0; -}; - -} // end namespace scene -} // end namespace irr - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/ILogger.h b/builddir/irrlicht-1.8.1/include/ILogger.h deleted file mode 100644 index 53f6273..0000000 --- a/builddir/irrlicht-1.8.1/include/ILogger.h +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_LOGGER_H_INCLUDED__ -#define __I_LOGGER_H_INCLUDED__ - -#include "IReferenceCounted.h" - -namespace irr -{ - -//! Possible log levels. -//! When used has filter ELL_DEBUG means => log everything and ELL_NONE means => log (nearly) nothing. -//! When used to print logging information ELL_DEBUG will have lowest priority while ELL_NONE -//! messages are never filtered and always printed. -enum ELOG_LEVEL -{ - //! Used for printing information helpful in debugging - ELL_DEBUG, - - //! Useful information to print. For example hardware infos or something started/stopped. - ELL_INFORMATION, - - //! Warnings that something isn't as expected and can cause oddities - ELL_WARNING, - - //! Something did go wrong. - ELL_ERROR, - - //! Logs with ELL_NONE will never be filtered. - //! And used as filter it will remove all logging except ELL_NONE messages. - ELL_NONE -}; - - -//! Interface for logging messages, warnings and errors -class ILogger : public virtual IReferenceCounted -{ -public: - - //! Destructor - virtual ~ILogger() {} - - //! Returns the current set log level. - virtual ELOG_LEVEL getLogLevel() const = 0; - - //! Sets a new log level. - /** With this value, texts which are sent to the logger are filtered - out. For example setting this value to ELL_WARNING, only warnings and - errors are printed out. Setting it to ELL_INFORMATION, which is the - default setting, warnings, errors and informational texts are printed - out. - \param ll: new log level filter value. */ - virtual void setLogLevel(ELOG_LEVEL ll) = 0; - - //! Prints out a text into the log - /** \param text: Text to print out. - \param ll: Log level of the text. If the text is an error, set - it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it - is just an informational text, set it to ELL_INFORMATION. Texts are - filtered with these levels. If you want to be a text displayed, - independent on what level filter is set, use ELL_NONE. */ - virtual void log(const c8* text, ELOG_LEVEL ll=ELL_INFORMATION) = 0; - - //! Prints out a text into the log - /** \param text: Text to print out. - \param hint: Additional info. This string is added after a " :" to the - string. - \param ll: Log level of the text. If the text is an error, set - it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it - is just an informational text, set it to ELL_INFORMATION. Texts are - filtered with these levels. If you want to be a text displayed, - independent on what level filter is set, use ELL_NONE. */ - virtual void log(const c8* text, const c8* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0; - virtual void log(const c8* text, const wchar_t* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0; - - //! Prints out a text into the log - /** \param text: Text to print out. - \param hint: Additional info. This string is added after a " :" to the - string. - \param ll: Log level of the text. If the text is an error, set - it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it - is just an informational text, set it to ELL_INFORMATION. Texts are - filtered with these levels. If you want to be a text displayed, - independent on what level filter is set, use ELL_NONE. */ - virtual void log(const wchar_t* text, const wchar_t* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0; - - //! Prints out a text into the log - /** \param text: Text to print out. - \param ll: Log level of the text. If the text is an error, set - it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it - is just an informational text, set it to ELL_INFORMATION. Texts are - filtered with these levels. If you want to be a text displayed, - independent on what level filter is set, use ELL_NONE. */ - virtual void log(const wchar_t* text, ELOG_LEVEL ll=ELL_INFORMATION) = 0; -}; - -} // end namespace - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IMaterialRenderer.h b/builddir/irrlicht-1.8.1/include/IMaterialRenderer.h deleted file mode 100644 index a4e1d20..0000000 --- a/builddir/irrlicht-1.8.1/include/IMaterialRenderer.h +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_MATERIAL_RENDERER_H_INCLUDED__ -#define __I_MATERIAL_RENDERER_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "SMaterial.h" -#include "S3DVertex.h" - -namespace irr -{ -namespace video -{ - -class IVideoDriver; -class IMaterialRendererServices; - -//! Interface for material rendering. -/** Can be used to extend the engine with new materials. Refer to -IVideoDriver::addMaterialRenderer() for more informations on how to extend the -engine with new materials. */ -class IMaterialRenderer : public virtual IReferenceCounted -{ -public: - - //! Called by the IVideoDriver implementation the let the renderer set its needed render states. - /** This is called during the IVideoDriver::setMaterial() call. - When overriding this, you can set some renderstates or for example a - vertex or pixel shader if you like. - \param material: The new material parameters to be set. The renderer - may change the material flags in this material. For example if this - material does not accept the zbuffer = true, it can set it to false. - This is useful, because in the next lastMaterial will be just the - material in this call. - \param lastMaterial: The material parameters which have been set before - this material. - \param resetAllRenderstates: True if all renderstates should really be - reset. This is usually true if the last rendering mode was not a usual - 3d rendering mode, but for example a 2d rendering mode. - You should reset really all renderstates if this is true, no matter if - the lastMaterial had some similar settings. This is used because in - most cases, some common renderstates are not changed if they are - already there, for example bilinear filtering, wireframe, - gouraudshading, lighting, zbuffer, zwriteenable, backfaceculling and - fogenable. - \param services: Interface providing some methods for changing - advanced, internal states of a IVideoDriver. */ - virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, - bool resetAllRenderstates, IMaterialRendererServices* services) {} - - //! Called every time before a new bunch of geometry is being drawn using this material with for example drawIndexedTriangleList() call. - /** OnSetMaterial should normally only be called if the renderer decides - that the renderstates should be changed, it won't be called if for - example two drawIndexedTriangleList() will be called with the same - material set. This method will be called every time. This is useful for - example for materials with shaders, which don't only set new - renderstates but also shader constants. - \param service: Pointer to interface providing methos for setting - constants and other things. - \param vtxtype: Vertex type with which the next rendering will be done. - This can be used by the material renderer to set some specific - optimized shaders or if this is an incompatible vertex type for this - renderer, to refuse rendering for example. - \return Returns true if everything is ok, and false if nothing should - be rendered. The material renderer can choose to return false for - example if he doesn't support the specified vertex type. This is - actually done in D3D8 and D3D9 when using a normal mapped material with - a vertex type other than EVT_TANGENTS. */ - virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype) { return true; } - - //! Called by the IVideoDriver to unset this material. - /** Called during the IVideoDriver::setMaterial() call before the new - material will get the OnSetMaterial() call. */ - virtual void OnUnsetMaterial() {} - - //! Returns if the material is transparent. - /** The scene managment needs to know this - for being able to sort the materials by opaque and transparent. */ - virtual bool isTransparent() const { return false; } - - //! Returns the render capability of the material. - /** Because some more complex materials - are implemented in multiple ways and need special hardware capabilities, it is possible - to query how the current material renderer is performing on the current hardware with this - function. - \return Returns 0 if everything is running fine. Any other value is material renderer - specific and means for example that the renderer switched back to a fall back material because - it cannot use the latest shaders. More specific examples: - Fixed function pipeline materials should return 0 in most cases, parallax mapped - material will only return 0 when at least pixel shader 1.4 is available on that machine. */ - virtual s32 getRenderCapability() const { return 0; } -}; - - -} // end namespace video -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IMaterialRendererServices.h b/builddir/irrlicht-1.8.1/include/IMaterialRendererServices.h deleted file mode 100644 index dafad09..0000000 --- a/builddir/irrlicht-1.8.1/include/IMaterialRendererServices.h +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_MATERIAL_RENDERER_SERVICES_H_INCLUDED__ -#define __I_MATERIAL_RENDERER_SERVICES_H_INCLUDED__ - -#include "SMaterial.h" -#include "S3DVertex.h" - -namespace irr -{ -namespace video -{ - -class IVideoDriver; - - -//! Interface providing some methods for changing advanced, internal states of a IVideoDriver. -class IMaterialRendererServices -{ -public: - - //! Destructor - virtual ~IMaterialRendererServices() {} - - //! Can be called by an IMaterialRenderer to make its work easier. - /** Sets all basic renderstates if needed. - Basic render states are diffuse, ambient, specular, and emissive color, - specular power, bilinear and trilinear filtering, wireframe mode, - grouraudshading, lighting, zbuffer, zwriteenable, backfaceculling and - fog enabling. - \param material The new material to be used. - \param lastMaterial The material used until now. - \param resetAllRenderstates Set to true if all renderstates should be - set, regardless of their current state. */ - virtual void setBasicRenderStates(const SMaterial& material, - const SMaterial& lastMaterial, - bool resetAllRenderstates) = 0; - - //! Sets a constant for the vertex shader based on a name. - /** This can be used if you used a high level shader language like GLSL - or HLSL to create a shader. Example: If you created a shader which has - variables named 'mWorldViewProj' (containing the WorldViewProjection - matrix) and another one named 'fTime' containing one float, you can set - them in your IShaderConstantSetCallBack derived class like this: - \code - virtual void OnSetConstants(video::IMaterialRendererServices* services, s32 userData) - { - video::IVideoDriver* driver = services->getVideoDriver(); - - f32 time = (f32)os::Timer::getTime()/100000.0f; - services->setVertexShaderConstant("fTime", &time, 1); - - core::matrix4 worldViewProj(driver->getTransform(video::ETS_PROJECTION)); - worldViewProj *= driver->getTransform(video::ETS_VIEW); - worldViewProj *= driver->getTransform(video::ETS_WORLD); - services->setVertexShaderConstant("mWorldViewProj", worldViewProj.M, 16); - } - \endcode - \param name Name of the variable - \param floats Pointer to array of floats - \param count Amount of floats in array. - \return True if successful. - */ - virtual bool setVertexShaderConstant(const c8* name, const f32* floats, int count) = 0; - - //! Bool interface for the above. - virtual bool setVertexShaderConstant(const c8* name, const bool* bools, int count) = 0; - - //! Int interface for the above. - virtual bool setVertexShaderConstant(const c8* name, const s32* ints, int count) = 0; - - //! Sets a vertex shader constant. - /** Can be used if you created a shader using pixel/vertex shader - assembler or ARB_fragment_program or ARB_vertex_program. - \param data: Data to be set in the constants - \param startRegister: First register to be set - \param constantAmount: Amount of registers to be set. One register consists of 4 floats. */ - virtual void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) = 0; - - //! Sets a constant for the pixel shader based on a name. - /** This can be used if you used a high level shader language like GLSL - or HLSL to create a shader. See setVertexShaderConstant() for an - example on how to use this. - \param name Name of the variable - \param floats Pointer to array of floats - \param count Amount of floats in array. - \return True if successful. */ - virtual bool setPixelShaderConstant(const c8* name, const f32* floats, int count) = 0; - - //! Bool interface for the above. - virtual bool setPixelShaderConstant(const c8* name, const bool* bools, int count) = 0; - - //! Int interface for the above. - virtual bool setPixelShaderConstant(const c8* name, const s32* ints, int count) = 0; - - //! Sets a pixel shader constant. - /** Can be used if you created a shader using pixel/vertex shader - assembler or ARB_fragment_program or ARB_vertex_program. - \param data Data to be set in the constants - \param startRegister First register to be set. - \param constantAmount Amount of registers to be set. One register consists of 4 floats. */ - virtual void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) = 0; - - //! Get pointer to the IVideoDriver interface - /** \return Pointer to the IVideoDriver interface */ - virtual IVideoDriver* getVideoDriver() = 0; -}; - -} // end namespace video -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IMesh.h b/builddir/irrlicht-1.8.1/include/IMesh.h deleted file mode 100644 index 89f936b..0000000 --- a/builddir/irrlicht-1.8.1/include/IMesh.h +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_MESH_H_INCLUDED__ -#define __I_MESH_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "SMaterial.h" -#include "EHardwareBufferFlags.h" - -namespace irr -{ -namespace scene -{ - class IMeshBuffer; - - //! Class which holds the geometry of an object. - /** An IMesh is nothing more than a collection of some mesh buffers - (IMeshBuffer). SMesh is a simple implementation of an IMesh. - A mesh is usually added to an IMeshSceneNode in order to be rendered. - */ - class IMesh : public virtual IReferenceCounted - { - public: - - //! Get the amount of mesh buffers. - /** \return Amount of mesh buffers (IMeshBuffer) in this mesh. */ - virtual u32 getMeshBufferCount() const = 0; - - //! Get pointer to a mesh buffer. - /** \param nr: Zero based index of the mesh buffer. The maximum value is - getMeshBufferCount() - 1; - \return Pointer to the mesh buffer or 0 if there is no such - mesh buffer. */ - virtual IMeshBuffer* getMeshBuffer(u32 nr) const = 0; - - //! Get pointer to a mesh buffer which fits a material - /** \param material: material to search for - \return Pointer to the mesh buffer or 0 if there is no such - mesh buffer. */ - virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const = 0; - - //! Get an axis aligned bounding box of the mesh. - /** \return Bounding box of this mesh. */ - virtual const core::aabbox3d<f32>& getBoundingBox() const = 0; - - //! Set user-defined axis aligned bounding box - /** \param box New bounding box to use for the mesh. */ - virtual void setBoundingBox( const core::aabbox3df& box) = 0; - - //! Sets a flag of all contained materials to a new value. - /** \param flag: Flag to set in all materials. - \param newvalue: New value to set in all materials. */ - virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) = 0; - - //! Set the hardware mapping hint - /** This methods allows to define optimization hints for the - hardware. This enables, e.g., the use of hardware buffers on - pltforms that support this feature. This can lead to noticeable - performance gains. */ - virtual void setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0; - - //! Flag the meshbuffer as changed, reloads hardware buffers - /** This method has to be called every time the vertices or - indices have changed. Otherwise, changes won't be updated - on the GPU in the next render cycle. */ - virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0; - }; - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IMeshBuffer.h b/builddir/irrlicht-1.8.1/include/IMeshBuffer.h deleted file mode 100644 index 99a9f48..0000000 --- a/builddir/irrlicht-1.8.1/include/IMeshBuffer.h +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_MESH_BUFFER_H_INCLUDED__ -#define __I_MESH_BUFFER_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "SMaterial.h" -#include "aabbox3d.h" -#include "S3DVertex.h" -#include "SVertexIndex.h" -#include "EHardwareBufferFlags.h" -#include "EPrimitiveTypes.h" - -namespace irr -{ -namespace scene -{ - //! Struct for holding a mesh with a single material. - /** A part of an IMesh which has the same material on each face of that - group. Logical groups of an IMesh need not be put into separate mesh - buffers, but can be. Separately animated parts of the mesh must be put - into separate mesh buffers. - Some mesh buffer implementations have limitations on the number of - vertices the buffer can hold. In that case, logical grouping can help. - Moreover, the number of vertices should be optimized for the GPU upload, - which often depends on the type of gfx card. Typial figures are - 1000-10000 vertices per buffer. - SMeshBuffer is a simple implementation of a MeshBuffer, which supports - up to 65535 vertices. - - Since meshbuffers are used for drawing, and hence will be exposed - to the driver, chances are high that they are grab()'ed from somewhere. - It's therefore required to dynamically allocate meshbuffers which are - passed to a video driver and only drop the buffer once it's not used in - the current code block anymore. - */ - class IMeshBuffer : public virtual IReferenceCounted - { - public: - - //! Get the material of this meshbuffer - /** \return Material of this buffer. */ - virtual video::SMaterial& getMaterial() = 0; - - //! Get the material of this meshbuffer - /** \return Material of this buffer. */ - virtual const video::SMaterial& getMaterial() const = 0; - - //! Get type of vertex data which is stored in this meshbuffer. - /** \return Vertex type of this buffer. */ - virtual video::E_VERTEX_TYPE getVertexType() const = 0; - - //! Get access to vertex data. The data is an array of vertices. - /** Which vertex type is used can be determined by getVertexType(). - \return Pointer to array of vertices. */ - virtual const void* getVertices() const = 0; - - //! Get access to vertex data. The data is an array of vertices. - /** Which vertex type is used can be determined by getVertexType(). - \return Pointer to array of vertices. */ - virtual void* getVertices() = 0; - - //! Get amount of vertices in meshbuffer. - /** \return Number of vertices in this buffer. */ - virtual u32 getVertexCount() const = 0; - - //! Get type of index data which is stored in this meshbuffer. - /** \return Index type of this buffer. */ - virtual video::E_INDEX_TYPE getIndexType() const =0; - - //! Get access to Indices. - /** \return Pointer to indices array. */ - virtual const u16* getIndices() const = 0; - - //! Get access to Indices. - /** \return Pointer to indices array. */ - virtual u16* getIndices() = 0; - - //! Get amount of indices in this meshbuffer. - /** \return Number of indices in this buffer. */ - virtual u32 getIndexCount() const = 0; - - //! Get the axis aligned bounding box of this meshbuffer. - /** \return Axis aligned bounding box of this buffer. */ - virtual const core::aabbox3df& getBoundingBox() const = 0; - - //! Set axis aligned bounding box - /** \param box User defined axis aligned bounding box to use - for this buffer. */ - virtual void setBoundingBox(const core::aabbox3df& box) = 0; - - //! Recalculates the bounding box. Should be called if the mesh changed. - virtual void recalculateBoundingBox() = 0; - - //! returns position of vertex i - virtual const core::vector3df& getPosition(u32 i) const = 0; - - //! returns position of vertex i - virtual core::vector3df& getPosition(u32 i) = 0; - - //! returns normal of vertex i - virtual const core::vector3df& getNormal(u32 i) const = 0; - - //! returns normal of vertex i - virtual core::vector3df& getNormal(u32 i) = 0; - - //! returns texture coord of vertex i - virtual const core::vector2df& getTCoords(u32 i) const = 0; - - //! returns texture coord of vertex i - virtual core::vector2df& getTCoords(u32 i) = 0; - - //! Append the vertices and indices to the current buffer - /** Only works for compatible vertex types. - \param vertices Pointer to a vertex array. - \param numVertices Number of vertices in the array. - \param indices Pointer to index array. - \param numIndices Number of indices in array. */ - virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) = 0; - - //! Append the meshbuffer to the current buffer - /** Only works for compatible vertex types - \param other Buffer to append to this one. */ - virtual void append(const IMeshBuffer* const other) = 0; - - //! get the current hardware mapping hint - virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const = 0; - - //! get the current hardware mapping hint - virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const = 0; - - //! set the hardware mapping hint, for driver - virtual void setHardwareMappingHint( E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX ) = 0; - - //! flags the meshbuffer as changed, reloads hardware buffers - virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0; - - //! Get the currently used ID for identification of changes. - /** This shouldn't be used for anything outside the VideoDriver. */ - virtual u32 getChangedID_Vertex() const = 0; - - //! Get the currently used ID for identification of changes. - /** This shouldn't be used for anything outside the VideoDriver. */ - virtual u32 getChangedID_Index() const = 0; - }; - -} // end namespace scene -} // end namespace irr - -#endif - - diff --git a/builddir/irrlicht-1.8.1/include/IMeshCache.h b/builddir/irrlicht-1.8.1/include/IMeshCache.h deleted file mode 100644 index 2d2bfa0..0000000 --- a/builddir/irrlicht-1.8.1/include/IMeshCache.h +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_MESH_CACHE_H_INCLUDED__ -#define __I_MESH_CACHE_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "path.h" - -namespace irr -{ - -namespace scene -{ - class IMesh; - class IAnimatedMesh; - class IAnimatedMeshSceneNode; - class IMeshLoader; - - //! The mesh cache stores already loaded meshes and provides an interface to them. - /** You can access it using ISceneManager::getMeshCache(). All existing - scene managers will return a pointer to the same mesh cache, because it - is shared between them. With this interface, it is possible to manually - add new loaded meshes (if ISceneManager::getMesh() is not sufficient), - to remove them and to iterate through already loaded meshes. */ - class IMeshCache : public virtual IReferenceCounted - { - public: - - //! Destructor - virtual ~IMeshCache() {} - - //! Adds a mesh to the internal list of loaded meshes. - /** Usually, ISceneManager::getMesh() is called to load a mesh - from a file. That method searches the list of loaded meshes if - a mesh has already been loaded and returns a pointer to if it - is in that list and already in memory. Otherwise it loads the - mesh. With IMeshCache::addMesh(), it is possible to pretend - that a mesh already has been loaded. This method can be used - for example by mesh loaders who need to load more than one mesh - with one call. They can add additional meshes with this method - to the scene manager. The COLLADA loader for example uses this - method. - \param name Name of the mesh. When calling - ISceneManager::getMesh() with this name it will return the mesh - set by this method. - \param mesh Pointer to a mesh which will now be referenced by - this name. */ - virtual void addMesh(const io::path& name, IAnimatedMesh* mesh) = 0; - - //! Removes the mesh from the cache. - /** After loading a mesh with getMesh(), the mesh can be - removed from the cache using this method, freeing a lot of - memory. - \param mesh Pointer to the mesh which shall be removed. */ - virtual void removeMesh(const IMesh* const mesh) = 0; - - //! Returns amount of loaded meshes in the cache. - /** You can load new meshes into the cache using getMesh() and - addMesh(). If you ever need to access the internal mesh cache, - you can do this using removeMesh(), getMeshNumber(), - getMeshByIndex() and getMeshName(). - \return Number of meshes in cache. */ - virtual u32 getMeshCount() const = 0; - - //! Returns current index number of the mesh or -1 when not found. - /** \param mesh Pointer to the mesh to search for. - \return Index of the mesh in the cache, or -1 if not found. */ - virtual s32 getMeshIndex(const IMesh* const mesh) const = 0; - - //! Returns a mesh based on its index number. - /** \param index: Index of the mesh, number between 0 and - getMeshCount()-1. - Note that this number is only valid until a new mesh is loaded - or removed. - \return Pointer to the mesh or 0 if there is none with this - number. */ - virtual IAnimatedMesh* getMeshByIndex(u32 index) = 0; - - //! Returns a mesh based on its name (often a filename). - /** \deprecated Use getMeshByName() instead. This method may be removed by - Irrlicht 1.9 */ - _IRR_DEPRECATED_ IAnimatedMesh* getMeshByFilename(const io::path& filename) - { - return getMeshByName(filename); - } - - //! Get the name of a loaded mesh, based on its index. (Name is often identical to the filename). - /** \deprecated Use getMeshName() instead. This method may be removed by - Irrlicht 1.9 */ - _IRR_DEPRECATED_ const io::path& getMeshFilename(u32 index) const - { - return getMeshName(index).getInternalName(); - } - - //! Get the name of a loaded mesh, if there is any. (Name is often identical to the filename). - /** \deprecated Use getMeshName() instead. This method may be removed by - Irrlicht 1.9 */ - _IRR_DEPRECATED_ const io::path& getMeshFilename(const IMesh* const mesh) const - { - return getMeshName(mesh).getInternalName(); - } - - //! Renames a loaded mesh. - /** \deprecated Use renameMesh() instead. This method may be removed by - Irrlicht 1.9 */ - _IRR_DEPRECATED_ bool setMeshFilename(u32 index, const io::path& filename) - { - return renameMesh(index, filename); - } - - //! Renames a loaded mesh. - /** \deprecated Use renameMesh() instead. This method may be removed by - Irrlicht 1.9 */ - _IRR_DEPRECATED_ bool setMeshFilename(const IMesh* const mesh, const io::path& filename) - { - return renameMesh(mesh, filename); - } - - //! Returns a mesh based on its name. - /** \param name Name of the mesh. Usually a filename. - \return Pointer to the mesh or 0 if there is none with this number. */ - virtual IAnimatedMesh* getMeshByName(const io::path& name) = 0; - - //! Get the name of a loaded mesh, based on its index. - /** \param index: Index of the mesh, number between 0 and getMeshCount()-1. - \return The name if mesh was found and has a name, else the path is empty. */ - virtual const io::SNamedPath& getMeshName(u32 index) const = 0; - - //! Get the name of the loaded mesh if there is any. - /** \param mesh Pointer to mesh to query. - \return The name if mesh was found and has a name, else the path is empty. */ - virtual const io::SNamedPath& getMeshName(const IMesh* const mesh) const = 0; - - //! Renames a loaded mesh. - /** Note that renaming meshes might change the ordering of the - meshes, and so the index of the meshes as returned by - getMeshIndex() or taken by some methods will change. - \param index The index of the mesh in the cache. - \param name New name for the mesh. - \return True if mesh was renamed. */ - virtual bool renameMesh(u32 index, const io::path& name) = 0; - - //! Renames the loaded mesh - /** Note that renaming meshes might change the ordering of the - meshes, and so the index of the meshes as returned by - getMeshIndex() or taken by some methods will change. - \param mesh Mesh to be renamed. - \param name New name for the mesh. - \return True if mesh was renamed. */ - virtual bool renameMesh(const IMesh* const mesh, const io::path& name) = 0; - - //! Check if a mesh was already loaded. - /** \param name Name of the mesh. Usually a filename. - \return True if the mesh has been loaded, else false. */ - virtual bool isMeshLoaded(const io::path& name) = 0; - - //! Clears the whole mesh cache, removing all meshes. - /** All meshes will be reloaded completely when using ISceneManager::getMesh() - after calling this method. - Warning: If you have pointers to meshes that were loaded with ISceneManager::getMesh() - and you did not grab them, then they may become invalid. */ - virtual void clear() = 0; - - //! Clears all meshes that are held in the mesh cache but not used anywhere else. - /** Warning: If you have pointers to meshes that were loaded with ISceneManager::getMesh() - and you did not grab them, then they may become invalid. */ - virtual void clearUnusedMeshes() = 0; - }; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IMeshLoader.h b/builddir/irrlicht-1.8.1/include/IMeshLoader.h deleted file mode 100644 index 3955fb4..0000000 --- a/builddir/irrlicht-1.8.1/include/IMeshLoader.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_MESH_LOADER_H_INCLUDED__ -#define __I_MESH_LOADER_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "path.h" - -namespace irr -{ -namespace io -{ - class IReadFile; -} // end namespace io -namespace scene -{ - class IAnimatedMesh; - -//! Class which is able to load an animated mesh from a file. -/** If you want Irrlicht be able to load meshes of -currently unsupported file formats (e.g. .cob), then implement -this and add your new Meshloader with -ISceneManager::addExternalMeshLoader() to the engine. */ -class IMeshLoader : public virtual IReferenceCounted -{ -public: - - //! Destructor - virtual ~IMeshLoader() {} - - //! Returns true if the file might be loaded by this class. - /** This decision should be based on the file extension (e.g. ".cob") - only. - \param filename Name of the file to test. - \return True if the file might be loaded by this class. */ - virtual bool isALoadableFileExtension(const io::path& filename) const = 0; - - //! Creates/loads an animated mesh from the file. - /** \param file File handler to load the file from. - \return Pointer to the created mesh. Returns 0 if loading failed. - If you no longer need the mesh, you should call IAnimatedMesh::drop(). - See IReferenceCounted::drop() for more information. */ - virtual IAnimatedMesh* createMesh(io::IReadFile* file) = 0; -}; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IMeshManipulator.h b/builddir/irrlicht-1.8.1/include/IMeshManipulator.h deleted file mode 100644 index d6ac89f..0000000 --- a/builddir/irrlicht-1.8.1/include/IMeshManipulator.h +++ /dev/null @@ -1,393 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_MESH_MANIPULATOR_H_INCLUDED__ -#define __I_MESH_MANIPULATOR_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "vector3d.h" -#include "aabbox3d.h" -#include "matrix4.h" -#include "IAnimatedMesh.h" -#include "IMeshBuffer.h" -#include "SVertexManipulator.h" - -namespace irr -{ -namespace scene -{ - - struct SMesh; - - //! An interface for easy manipulation of meshes. - /** Scale, set alpha value, flip surfaces, and so on. This exists for - fixing problems with wrong imported or exported meshes quickly after - loading. It is not intended for doing mesh modifications and/or - animations during runtime. - */ - class IMeshManipulator : public virtual IReferenceCounted - { - public: - - //! Flips the direction of surfaces. - /** Changes backfacing triangles to frontfacing - triangles and vice versa. - \param mesh Mesh on which the operation is performed. */ - virtual void flipSurfaces(IMesh* mesh) const = 0; - - //! Sets the alpha vertex color value of the whole mesh to a new value. - /** \param mesh Mesh on which the operation is performed. - \param alpha New alpha value. Must be a value between 0 and 255. */ - void setVertexColorAlpha(IMesh* mesh, s32 alpha) const - { - apply(scene::SVertexColorSetAlphaManipulator(alpha), mesh); - } - - //! Sets the alpha vertex color value of the whole mesh to a new value. - /** \param buffer Meshbuffer on which the operation is performed. - \param alpha New alpha value. Must be a value between 0 and 255. */ - void setVertexColorAlpha(IMeshBuffer* buffer, s32 alpha) const - { - apply(scene::SVertexColorSetAlphaManipulator(alpha), buffer); - } - - //! Sets the colors of all vertices to one color - /** \param mesh Mesh on which the operation is performed. - \param color New color. */ - void setVertexColors(IMesh* mesh, video::SColor color) const - { - apply(scene::SVertexColorSetManipulator(color), mesh); - } - - //! Sets the colors of all vertices to one color - /** \param buffer Meshbuffer on which the operation is performed. - \param color New color. */ - void setVertexColors(IMeshBuffer* buffer, video::SColor color) const - { - apply(scene::SVertexColorSetManipulator(color), buffer); - } - - //! Recalculates all normals of the mesh. - /** \param mesh: Mesh on which the operation is performed. - \param smooth: If the normals shall be smoothed. - \param angleWeighted: If the normals shall be smoothed in relation to their angles. More expensive, but also higher precision. */ - virtual void recalculateNormals(IMesh* mesh, bool smooth = false, - bool angleWeighted = false) const=0; - - //! Recalculates all normals of the mesh buffer. - /** \param buffer: Mesh buffer on which the operation is performed. - \param smooth: If the normals shall be smoothed. - \param angleWeighted: If the normals shall be smoothed in relation to their angles. More expensive, but also higher precision. */ - virtual void recalculateNormals(IMeshBuffer* buffer, - bool smooth = false, bool angleWeighted = false) const=0; - - //! Recalculates tangents, requires a tangent mesh - /** \param mesh Mesh on which the operation is performed. - \param recalculateNormals If the normals shall be recalculated, otherwise original normals of the mesh are used unchanged. - \param smooth If the normals shall be smoothed. - \param angleWeighted If the normals shall be smoothed in relation to their angles. More expensive, but also higher precision. - */ - virtual void recalculateTangents(IMesh* mesh, - bool recalculateNormals=false, bool smooth=false, - bool angleWeighted=false) const=0; - - //! Recalculates tangents, requires a tangent mesh buffer - /** \param buffer Meshbuffer on which the operation is performed. - \param recalculateNormals If the normals shall be recalculated, otherwise original normals of the buffer are used unchanged. - \param smooth If the normals shall be smoothed. - \param angleWeighted If the normals shall be smoothed in relation to their angles. More expensive, but also higher precision. - */ - virtual void recalculateTangents(IMeshBuffer* buffer, - bool recalculateNormals=false, bool smooth=false, - bool angleWeighted=false) const=0; - - //! Scales the actual mesh, not a scene node. - /** \param mesh Mesh on which the operation is performed. - \param factor Scale factor for each axis. */ - void scale(IMesh* mesh, const core::vector3df& factor) const - { - apply(SVertexPositionScaleManipulator(factor), mesh, true); - } - - //! Scales the actual meshbuffer, not a scene node. - /** \param buffer Meshbuffer on which the operation is performed. - \param factor Scale factor for each axis. */ - void scale(IMeshBuffer* buffer, const core::vector3df& factor) const - { - apply(SVertexPositionScaleManipulator(factor), buffer, true); - } - - //! Scales the actual mesh, not a scene node. - /** \deprecated Use scale() instead. This method may be removed by Irrlicht 1.9 - \param mesh Mesh on which the operation is performed. - \param factor Scale factor for each axis. */ - _IRR_DEPRECATED_ void scaleMesh(IMesh* mesh, const core::vector3df& factor) const {return scale(mesh,factor);} - - //! Scale the texture coords of a mesh. - /** \param mesh Mesh on which the operation is performed. - \param factor Vector which defines the scale for each axis. - \param level Number of texture coord, starting from 1. Support for level 2 exists for LightMap buffers. */ - void scaleTCoords(scene::IMesh* mesh, const core::vector2df& factor, u32 level=1) const - { - apply(SVertexTCoordsScaleManipulator(factor, level), mesh); - } - - //! Scale the texture coords of a meshbuffer. - /** \param buffer Meshbuffer on which the operation is performed. - \param factor Vector which defines the scale for each axis. - \param level Number of texture coord, starting from 1. Support for level 2 exists for LightMap buffers. */ - void scaleTCoords(scene::IMeshBuffer* buffer, const core::vector2df& factor, u32 level=1) const - { - apply(SVertexTCoordsScaleManipulator(factor, level), buffer); - } - - //! Applies a transformation to a mesh - /** \param mesh Mesh on which the operation is performed. - \param m transformation matrix. */ - void transform(IMesh* mesh, const core::matrix4& m) const - { - apply(SVertexPositionTransformManipulator(m), mesh, true); - } - - //! Applies a transformation to a meshbuffer - /** \param buffer Meshbuffer on which the operation is performed. - \param m transformation matrix. */ - void transform(IMeshBuffer* buffer, const core::matrix4& m) const - { - apply(SVertexPositionTransformManipulator(m), buffer, true); - } - - //! Applies a transformation to a mesh - /** \deprecated Use transform() instead. This method may be removed by Irrlicht 1.9 - \param mesh Mesh on which the operation is performed. - \param m transformation matrix. */ - _IRR_DEPRECATED_ virtual void transformMesh(IMesh* mesh, const core::matrix4& m) const {return transform(mesh,m);} - - //! Creates a planar texture mapping on the mesh - /** \param mesh: Mesh on which the operation is performed. - \param resolution: resolution of the planar mapping. This is - the value specifying which is the relation between world space - and texture coordinate space. */ - virtual void makePlanarTextureMapping(IMesh* mesh, f32 resolution=0.001f) const=0; - - //! Creates a planar texture mapping on the meshbuffer - /** \param meshbuffer: Buffer on which the operation is performed. - \param resolution: resolution of the planar mapping. This is - the value specifying which is the relation between world space - and texture coordinate space. */ - virtual void makePlanarTextureMapping(scene::IMeshBuffer* meshbuffer, f32 resolution=0.001f) const=0; - - //! Creates a planar texture mapping on the buffer - /** This method is currently implemented towards the LWO planar mapping. A more general biasing might be required. - \param mesh Mesh on which the operation is performed. - \param resolutionS Resolution of the planar mapping in horizontal direction. This is the ratio between object space and texture space. - \param resolutionT Resolution of the planar mapping in vertical direction. This is the ratio between object space and texture space. - \param axis The axis along which the texture is projected. The allowed values are 0 (X), 1(Y), and 2(Z). - \param offset Vector added to the vertex positions (in object coordinates). - */ - virtual void makePlanarTextureMapping(scene::IMesh* mesh, - f32 resolutionS, f32 resolutionT, - u8 axis, const core::vector3df& offset) const=0; - - //! Creates a planar texture mapping on the meshbuffer - /** This method is currently implemented towards the LWO planar mapping. A more general biasing might be required. - \param buffer Buffer on which the operation is performed. - \param resolutionS Resolution of the planar mapping in horizontal direction. This is the ratio between object space and texture space. - \param resolutionT Resolution of the planar mapping in vertical direction. This is the ratio between object space and texture space. - \param axis The axis along which the texture is projected. The allowed values are 0 (X), 1(Y), and 2(Z). - \param offset Vector added to the vertex positions (in object coordinates). - */ - virtual void makePlanarTextureMapping(scene::IMeshBuffer* buffer, - f32 resolutionS, f32 resolutionT, - u8 axis, const core::vector3df& offset) const=0; - - //! Clones a static IMesh into a modifiable SMesh. - /** All meshbuffers in the returned SMesh - are of type SMeshBuffer or SMeshBufferLightMap. - \param mesh Mesh to copy. - \return Cloned mesh. If you no longer need the - cloned mesh, you should call SMesh::drop(). See - IReferenceCounted::drop() for more information. */ - virtual SMesh* createMeshCopy(IMesh* mesh) const = 0; - - //! Creates a copy of the mesh, which will only consist of S3DVertexTangents vertices. - /** This is useful if you want to draw tangent space normal - mapped geometry because it calculates the tangent and binormal - data which is needed there. - \param mesh Input mesh - \param recalculateNormals The normals are recalculated if set, - otherwise the original ones are kept. Note that keeping the - normals may introduce inaccurate tangents if the normals are - very different to those calculated from the faces. - \param smooth The normals/tangents are smoothed across the - meshbuffer's faces if this flag is set. - \param angleWeighted Improved smoothing calculation used - \param recalculateTangents Whether are actually calculated, or just the mesh with proper type is created. - \return Mesh consisting only of S3DVertexTangents vertices. If - you no longer need the cloned mesh, you should call - IMesh::drop(). See IReferenceCounted::drop() for more - information. */ - virtual IMesh* createMeshWithTangents(IMesh* mesh, - bool recalculateNormals=false, bool smooth=false, - bool angleWeighted=false, bool recalculateTangents=true) const=0; - - //! Creates a copy of the mesh, which will only consist of S3DVertex2TCoord vertices. - /** \param mesh Input mesh - \return Mesh consisting only of S3DVertex2TCoord vertices. If - you no longer need the cloned mesh, you should call - IMesh::drop(). See IReferenceCounted::drop() for more - information. */ - virtual IMesh* createMeshWith2TCoords(IMesh* mesh) const = 0; - - //! Creates a copy of the mesh, which will only consist of S3DVertex vertices. - /** \param mesh Input mesh - \return Mesh consisting only of S3DVertex vertices. If - you no longer need the cloned mesh, you should call - IMesh::drop(). See IReferenceCounted::drop() for more - information. */ - virtual IMesh* createMeshWith1TCoords(IMesh* mesh) const = 0; - - //! Creates a copy of a mesh with all vertices unwelded - /** \param mesh Input mesh - \return Mesh consisting only of unique faces. All vertices - which were previously shared are now duplicated. If you no - longer need the cloned mesh, you should call IMesh::drop(). See - IReferenceCounted::drop() for more information. */ - virtual IMesh* createMeshUniquePrimitives(IMesh* mesh) const = 0; - - //! Creates a copy of a mesh with vertices welded - /** \param mesh Input mesh - \param tolerance The threshold for vertex comparisons. - \return Mesh without redundant vertices. If you no longer need - the cloned mesh, you should call IMesh::drop(). See - IReferenceCounted::drop() for more information. */ - virtual IMesh* createMeshWelded(IMesh* mesh, f32 tolerance=core::ROUNDING_ERROR_f32) const = 0; - - //! Get amount of polygons in mesh. - /** \param mesh Input mesh - \return Number of polygons in mesh. */ - virtual s32 getPolyCount(IMesh* mesh) const = 0; - - //! Get amount of polygons in mesh. - /** \param mesh Input mesh - \return Number of polygons in mesh. */ - virtual s32 getPolyCount(IAnimatedMesh* mesh) const = 0; - - //! Create a new AnimatedMesh and adds the mesh to it - /** \param mesh Input mesh - \param type The type of the animated mesh to create. - \return Newly created animated mesh with mesh as its only - content. When you don't need the animated mesh anymore, you - should call IAnimatedMesh::drop(). See - IReferenceCounted::drop() for more information. */ - virtual IAnimatedMesh * createAnimatedMesh(IMesh* mesh, - scene::E_ANIMATED_MESH_TYPE type = scene::EAMT_UNKNOWN) const = 0; - - //! Vertex cache optimization according to the Forsyth paper - /** More information can be found at - http://home.comcast.net/~tom_forsyth/papers/fast_vert_cache_opt.html - - The function is thread-safe (read: you can optimize several - meshes in different threads). - - \param mesh Source mesh for the operation. - \return A new mesh optimized for the vertex cache. */ - virtual IMesh* createForsythOptimizedMesh(const IMesh *mesh) const = 0; - - //! Apply a manipulator on the Meshbuffer - /** \param func A functor defining the mesh manipulation. - \param buffer The Meshbuffer to apply the manipulator to. - \param boundingBoxUpdate Specifies if the bounding box should be updated during manipulation. - \return True if the functor was successfully applied, else false. */ - template <typename Functor> - bool apply(const Functor& func, IMeshBuffer* buffer, bool boundingBoxUpdate=false) const - { - return apply_(func, buffer, boundingBoxUpdate, func); - } - - - //! Apply a manipulator on the Mesh - /** \param func A functor defining the mesh manipulation. - \param mesh The Mesh to apply the manipulator to. - \param boundingBoxUpdate Specifies if the bounding box should be updated during manipulation. - \return True if the functor was successfully applied, else false. */ - template <typename Functor> - bool apply(const Functor& func, IMesh* mesh, bool boundingBoxUpdate=false) const - { - if (!mesh) - return true; - bool result = true; - core::aabbox3df bufferbox; - for (u32 i=0; i<mesh->getMeshBufferCount(); ++i) - { - result &= apply(func, mesh->getMeshBuffer(i), boundingBoxUpdate); - if (boundingBoxUpdate) - { - if (0==i) - bufferbox.reset(mesh->getMeshBuffer(i)->getBoundingBox()); - else - bufferbox.addInternalBox(mesh->getMeshBuffer(i)->getBoundingBox()); - } - } - if (boundingBoxUpdate) - mesh->setBoundingBox(bufferbox); - return result; - } - -protected: - //! Apply a manipulator based on the type of the functor - /** \param func A functor defining the mesh manipulation. - \param buffer The Meshbuffer to apply the manipulator to. - \param boundingBoxUpdate Specifies if the bounding box should be updated during manipulation. - \param typeTest Unused parameter, which handles the proper call selection based on the type of the Functor which is passed in two times. - \return True if the functor was successfully applied, else false. */ - template <typename Functor> - bool apply_(const Functor& func, IMeshBuffer* buffer, bool boundingBoxUpdate, const IVertexManipulator& typeTest) const - { - if (!buffer) - return true; - - core::aabbox3df bufferbox; - for (u32 i=0; i<buffer->getVertexCount(); ++i) - { - switch (buffer->getVertexType()) - { - case video::EVT_STANDARD: - { - video::S3DVertex* verts = (video::S3DVertex*)buffer->getVertices(); - func(verts[i]); - } - break; - case video::EVT_2TCOORDS: - { - video::S3DVertex2TCoords* verts = (video::S3DVertex2TCoords*)buffer->getVertices(); - func(verts[i]); - } - break; - case video::EVT_TANGENTS: - { - video::S3DVertexTangents* verts = (video::S3DVertexTangents*)buffer->getVertices(); - func(verts[i]); - } - break; - } - if (boundingBoxUpdate) - { - if (0==i) - bufferbox.reset(buffer->getPosition(0)); - else - bufferbox.addInternalPoint(buffer->getPosition(i)); - } - } - if (boundingBoxUpdate) - buffer->setBoundingBox(bufferbox); - return true; - } -}; - -} // end namespace scene -} // end namespace irr - - -#endif diff --git a/builddir/irrlicht-1.8.1/include/IMeshSceneNode.h b/builddir/irrlicht-1.8.1/include/IMeshSceneNode.h deleted file mode 100644 index 4541069..0000000 --- a/builddir/irrlicht-1.8.1/include/IMeshSceneNode.h +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_MESH_SCENE_NODE_H_INCLUDED__ -#define __I_MESH_SCENE_NODE_H_INCLUDED__ - -#include "ISceneNode.h" - -namespace irr -{ -namespace scene -{ - -class IShadowVolumeSceneNode; -class IMesh; - - -//! A scene node displaying a static mesh -class IMeshSceneNode : public ISceneNode -{ -public: - - //! Constructor - /** Use setMesh() to set the mesh to display. - */ - IMeshSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, - const core::vector3df& position = core::vector3df(0,0,0), - const core::vector3df& rotation = core::vector3df(0,0,0), - const core::vector3df& scale = core::vector3df(1,1,1)) - : ISceneNode(parent, mgr, id, position, rotation, scale) {} - - //! Sets a new mesh to display - /** \param mesh Mesh to display. */ - virtual void setMesh(IMesh* mesh) = 0; - - //! Get the currently defined mesh for display. - /** \return Pointer to mesh which is displayed by this node. */ - virtual IMesh* getMesh(void) = 0; - - //! Creates shadow volume scene node as child of this node. - /** The shadow can be rendered using the ZPass or the zfail - method. ZPass is a little bit faster because the shadow volume - creation is easier, but with this method there occur ugly - looking artifacs when the camera is inside the shadow volume. - These error do not occur with the ZFail method. - \param shadowMesh: Optional custom mesh for shadow volume. - \param id: Id of the shadow scene node. This id can be used to - identify the node later. - \param zfailmethod: If set to true, the shadow will use the - zfail method, if not, zpass is used. - \param infinity: Value used by the shadow volume algorithm to - scale the shadow volume (for zfail shadow volume we support only - finite shadows, so camera zfar must be larger than shadow back cap, - which is depend on infinity parameter). - \return Pointer to the created shadow scene node. This pointer - should not be dropped. See IReferenceCounted::drop() for more - information. */ - virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh=0, - s32 id=-1, bool zfailmethod=true, f32 infinity=1000.0f) = 0; - - //! Sets if the scene node should not copy the materials of the mesh but use them in a read only style. - /** In this way it is possible to change the materials of a mesh - causing all mesh scene nodes referencing this mesh to change, too. - \param readonly Flag if the materials shall be read-only. */ - virtual void setReadOnlyMaterials(bool readonly) = 0; - - //! Check if the scene node should not copy the materials of the mesh but use them in a read only style - /** This flag can be set by setReadOnlyMaterials(). - \return Whether the materials are read-only. */ - virtual bool isReadOnlyMaterials() const = 0; -}; - -} // end namespace scene -} // end namespace irr - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IMeshWriter.h b/builddir/irrlicht-1.8.1/include/IMeshWriter.h deleted file mode 100644 index aef3e28..0000000 --- a/builddir/irrlicht-1.8.1/include/IMeshWriter.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_I_MESH_WRITER_H_INCLUDED__ -#define __IRR_I_MESH_WRITER_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "EMeshWriterEnums.h" - -namespace irr -{ -namespace io -{ - class IWriteFile; -} // end namespace io - -namespace scene -{ - class IMesh; - - //! Interface for writing meshes - class IMeshWriter : public virtual IReferenceCounted - { - public: - - //! Destructor - virtual ~IMeshWriter() {} - - //! Get the type of the mesh writer - /** For own implementations, use MAKE_IRR_ID as shown in the - EMESH_WRITER_TYPE enumeration to return your own unique mesh - type id. - \return Type of the mesh writer. */ - virtual EMESH_WRITER_TYPE getType() const = 0; - - //! Write a static mesh. - /** \param file File handle to write the mesh to. - \param mesh Pointer to mesh to be written. - \param flags Optional flags to set properties of the writer. - \return True if sucessful */ - virtual bool writeMesh(io::IWriteFile* file, scene::IMesh* mesh, - s32 flags=EMWF_NONE) = 0; - - // Writes an animated mesh - // for future use, no writer is able to write animated meshes currently - /* \return Returns true if sucessful */ - //virtual bool writeAnimatedMesh(io::IWriteFile* file, - // scene::IAnimatedMesh* mesh, - // s32 flags=EMWF_NONE) = 0; - }; - - -} // end namespace -} // end namespace - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IMetaTriangleSelector.h b/builddir/irrlicht-1.8.1/include/IMetaTriangleSelector.h deleted file mode 100644 index 366893a..0000000 --- a/builddir/irrlicht-1.8.1/include/IMetaTriangleSelector.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_META_TRIANGLE_SELECTOR_H_INCLUDED__ -#define __I_META_TRIANGLE_SELECTOR_H_INCLUDED__ - -#include "ITriangleSelector.h" - -namespace irr -{ -namespace scene -{ - -//! Interface for making multiple triangle selectors work as one big selector. -/** This is nothing more than a collection of one or more triangle selectors -providing together the interface of one triangle selector. In this way, -collision tests can be done with different triangle soups in one pass. -*/ -class IMetaTriangleSelector : public ITriangleSelector -{ -public: - - //! Adds a triangle selector to the collection of triangle selectors. - /** \param toAdd: Pointer to an triangle selector to add to the list. */ - virtual void addTriangleSelector(ITriangleSelector* toAdd) = 0; - - //! Removes a specific triangle selector from the collection. - /** \param toRemove: Pointer to an triangle selector which is in the - list but will be removed. - \return True if successful, false if not. */ - virtual bool removeTriangleSelector(ITriangleSelector* toRemove) = 0; - - //! Removes all triangle selectors from the collection. - virtual void removeAllTriangleSelectors() = 0; -}; - -} // end namespace scene -} // end namespace irr - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IOSOperator.h b/builddir/irrlicht-1.8.1/include/IOSOperator.h deleted file mode 100644 index b5c6236..0000000 --- a/builddir/irrlicht-1.8.1/include/IOSOperator.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_OS_OPERATOR_H_INCLUDED__ -#define __I_OS_OPERATOR_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "irrString.h" - -namespace irr -{ - -//! The Operating system operator provides operation system specific methods and informations. -class IOSOperator : public virtual IReferenceCounted -{ -public: - //! Get the current operation system version as string. - virtual const core::stringc& getOperatingSystemVersion() const = 0; - - //! Get the current operation system version as string. - /** \deprecated Use getOperatingSystemVersion instead. This method will be removed in Irrlicht 1.9. */ - _IRR_DEPRECATED_ const wchar_t* getOperationSystemVersion() const - { - return core::stringw(getOperatingSystemVersion()).c_str(); - } - - //! Copies text to the clipboard - virtual void copyToClipboard(const c8* text) const = 0; - - //! Get text from the clipboard - /** \return Returns 0 if no string is in there. */ - virtual const c8* getTextFromClipboard() const = 0; - - //! Get the processor speed in megahertz - /** \param MHz The integer variable to store the speed in. - \return True if successful, false if not */ - virtual bool getProcessorSpeedMHz(u32* MHz) const = 0; - - //! Get the total and available system RAM - /** \param Total: will contain the total system memory - \param Avail: will contain the available memory - \return True if successful, false if not */ - virtual bool getSystemMemory(u32* Total, u32* Avail) const = 0; - -}; - -} // end namespace - -#endif diff --git a/builddir/irrlicht-1.8.1/include/IParticleAffector.h b/builddir/irrlicht-1.8.1/include/IParticleAffector.h deleted file mode 100644 index f5a18c6..0000000 --- a/builddir/irrlicht-1.8.1/include/IParticleAffector.h +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_PARTICLE_AFFECTOR_H_INCLUDED__ -#define __I_PARTICLE_AFFECTOR_H_INCLUDED__ - -#include "IAttributeExchangingObject.h" -#include "SParticle.h" - -namespace irr -{ -namespace scene -{ - -//! Types of built in particle affectors -enum E_PARTICLE_AFFECTOR_TYPE -{ - EPAT_NONE = 0, - EPAT_ATTRACT, - EPAT_FADE_OUT, - EPAT_GRAVITY, - EPAT_ROTATE, - EPAT_SCALE, - EPAT_COUNT -}; - -//! Names for built in particle affectors -const c8* const ParticleAffectorTypeNames[] = -{ - "None", - "Attract", - "FadeOut", - "Gravity", - "Rotate", - "Scale", - 0 -}; - -//! A particle affector modifies particles. -class IParticleAffector : public virtual io::IAttributeExchangingObject -{ -public: - - //! constructor - IParticleAffector() : Enabled(true) {} - - //! Affects an array of particles. - /** \param now Current time. (Same as ITimer::getTime() would return) - \param particlearray Array of particles. - \param count Amount of particles in array. */ - virtual void affect(u32 now, SParticle* particlearray, u32 count) = 0; - - //! Sets whether or not the affector is currently enabled. - virtual void setEnabled(bool enabled) { Enabled = enabled; } - - //! Gets whether or not the affector is currently enabled. - virtual bool getEnabled() const { return Enabled; } - - //! Get emitter type - virtual E_PARTICLE_AFFECTOR_TYPE getType() const = 0; - -protected: - bool Enabled; -}; - -} // end namespace scene -} // end namespace irr - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IParticleAnimatedMeshSceneNodeEmitter.h b/builddir/irrlicht-1.8.1/include/IParticleAnimatedMeshSceneNodeEmitter.h deleted file mode 100644 index b64d1d6..0000000 --- a/builddir/irrlicht-1.8.1/include/IParticleAnimatedMeshSceneNodeEmitter.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_PARTICLE_ANIMATED_MESH_SCENE_NODE_EMITTER_H_INCLUDED__ -#define __I_PARTICLE_ANIMATED_MESH_SCENE_NODE_EMITTER_H_INCLUDED__ - -#include "IParticleEmitter.h" -#include "IAnimatedMeshSceneNode.h" - -namespace irr -{ -namespace scene -{ - -//! A particle emitter which emits particles from mesh vertices. -class IParticleAnimatedMeshSceneNodeEmitter : public IParticleEmitter -{ -public: - - //! Set Mesh to emit particles from - virtual void setAnimatedMeshSceneNode( IAnimatedMeshSceneNode* node ) = 0; - - //! Set whether to use vertex normal for direction, or direction specified - virtual void setUseNormalDirection( bool useNormalDirection = true ) = 0; - - //! Set the amount that the normal is divided by for getting a particles direction - virtual void setNormalDirectionModifier( f32 normalDirectionModifier ) = 0; - - //! Sets whether to emit min<->max particles for every vertex or to pick min<->max vertices - virtual void setEveryMeshVertex( bool everyMeshVertex = true ) = 0; - - //! Get mesh we're emitting particles from - virtual const IAnimatedMeshSceneNode* getAnimatedMeshSceneNode() const = 0; - - //! Get whether to use vertex normal for direction, or direction specified - virtual bool isUsingNormalDirection() const = 0; - - //! Get the amount that the normal is divided by for getting a particles direction - virtual f32 getNormalDirectionModifier() const = 0; - - //! Gets whether to emit min<->max particles for every vertex or to pick min<->max vertices - virtual bool getEveryMeshVertex() const = 0; - - //! Get emitter type - virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_ANIMATED_MESH; } -}; - -} // end namespace scene -} // end namespace irr - - -#endif // __I_PARTICLE_ANIMATED_MESH_SCENE_NODE_EMITTER_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/IParticleAttractionAffector.h b/builddir/irrlicht-1.8.1/include/IParticleAttractionAffector.h deleted file mode 100644 index 7e874e8..0000000 --- a/builddir/irrlicht-1.8.1/include/IParticleAttractionAffector.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_PARTICLE_ATTRACTION_AFFECTOR_H_INCLUDED__ -#define __I_PARTICLE_ATTRACTION_AFFECTOR_H_INCLUDED__ - -#include "IParticleAffector.h" - -namespace irr -{ -namespace scene -{ - -//! A particle affector which attracts or detracts particles. -class IParticleAttractionAffector : public IParticleAffector -{ -public: - - //! Set the point that particles will attract to - virtual void setPoint( const core::vector3df& point ) = 0; - - //! Set whether or not the particles are attracting or detracting - virtual void setAttract( bool attract ) = 0; - - //! Set whether or not this will affect particles in the X direction - virtual void setAffectX( bool affect ) = 0; - - //! Set whether or not this will affect particles in the Y direction - virtual void setAffectY( bool affect ) = 0; - - //! Set whether or not this will affect particles in the Z direction - virtual void setAffectZ( bool affect ) = 0; - - //! Get the point that particles are attracted to - virtual const core::vector3df& getPoint() const = 0; - - //! Get whether or not the particles are attracting or detracting - virtual bool getAttract() const = 0; - - //! Get whether or not the particles X position are affected - virtual bool getAffectX() const = 0; - - //! Get whether or not the particles Y position are affected - virtual bool getAffectY() const = 0; - - //! Get whether or not the particles Z position are affected - virtual bool getAffectZ() const = 0; - - //! Get emitter type - virtual E_PARTICLE_AFFECTOR_TYPE getType() const { return EPAT_ATTRACT; } -}; - -} // end namespace scene -} // end namespace irr - - -#endif // __I_PARTICLE_ATTRACTION_AFFECTOR_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/IParticleBoxEmitter.h b/builddir/irrlicht-1.8.1/include/IParticleBoxEmitter.h deleted file mode 100644 index 9ea388a..0000000 --- a/builddir/irrlicht-1.8.1/include/IParticleBoxEmitter.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_PARTICLE_BOX_EMITTER_H_INCLUDED__ -#define __I_PARTICLE_BOX_EMITTER_H_INCLUDED__ - -#include "IParticleEmitter.h" -#include "aabbox3d.h" - -namespace irr -{ -namespace scene -{ - -//! A particle emitter which emits particles from a box shaped space -class IParticleBoxEmitter : public IParticleEmitter -{ -public: - - //! Set the box shape - virtual void setBox( const core::aabbox3df& box ) = 0; - - //! Get the box shape set - virtual const core::aabbox3df& getBox() const = 0; - - //! Get emitter type - virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_BOX; } -}; - -} // end namespace scene -} // end namespace irr - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IParticleCylinderEmitter.h b/builddir/irrlicht-1.8.1/include/IParticleCylinderEmitter.h deleted file mode 100644 index cd063b8..0000000 --- a/builddir/irrlicht-1.8.1/include/IParticleCylinderEmitter.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_PARTICLE_CYLINDER_EMITTER_H_INCLUDED__ -#define __I_PARTICLE_CYLINDER_EMITTER_H_INCLUDED__ - -#include "IParticleEmitter.h" - -namespace irr -{ -namespace scene -{ - -//! A particle emitter which emits from a cylindrically shaped space. -class IParticleCylinderEmitter : public IParticleEmitter -{ -public: - - //! Set the center of the radius for the cylinder, at one end of the cylinder - virtual void setCenter( const core::vector3df& center ) = 0; - - //! Set the normal of the cylinder - virtual void setNormal( const core::vector3df& normal ) = 0; - - //! Set the radius of the cylinder - virtual void setRadius( f32 radius ) = 0; - - //! Set the length of the cylinder - virtual void setLength( f32 length ) = 0; - - //! Set whether or not to draw points inside the cylinder - virtual void setOutlineOnly( bool outlineOnly = true ) = 0; - - //! Get the center of the cylinder - virtual const core::vector3df& getCenter() const = 0; - - //! Get the normal of the cylinder - virtual const core::vector3df& getNormal() const = 0; - - //! Get the radius of the cylinder - virtual f32 getRadius() const = 0; - - //! Get the center of the cylinder - virtual f32 getLength() const = 0; - - //! Get whether or not to draw points inside the cylinder - virtual bool getOutlineOnly() const = 0; - - //! Get emitter type - virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_CYLINDER; } -}; - -} // end namespace scene -} // end namespace irr - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IParticleEmitter.h b/builddir/irrlicht-1.8.1/include/IParticleEmitter.h deleted file mode 100644 index 6fc9a2c..0000000 --- a/builddir/irrlicht-1.8.1/include/IParticleEmitter.h +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_PARTICLE_EMITTER_H_INCLUDED__ -#define __I_PARTICLE_EMITTER_H_INCLUDED__ - -#include "IAttributeExchangingObject.h" -#include "SParticle.h" - -namespace irr -{ -namespace scene -{ - -//! Types of built in particle emitters -enum E_PARTICLE_EMITTER_TYPE -{ - EPET_POINT = 0, - EPET_ANIMATED_MESH, - EPET_BOX, - EPET_CYLINDER, - EPET_MESH, - EPET_RING, - EPET_SPHERE, - EPET_COUNT -}; - -//! Names for built in particle emitters -const c8* const ParticleEmitterTypeNames[] = -{ - "Point", - "AnimatedMesh", - "Box", - "Cylinder", - "Mesh", - "Ring", - "Sphere", - 0 -}; - -//! A particle emitter for using with particle systems. -/** A Particle emitter emitts new particles into a particle system. -*/ -class IParticleEmitter : public virtual io::IAttributeExchangingObject -{ -public: - - //! Prepares an array with new particles to emitt into the system - /** \param now Current time. - \param timeSinceLastCall Time elapsed since last call, in milliseconds. - \param outArray Pointer which will point to the array with the new - particles to add into the system. - \return Amount of new particles in the array. Can be 0. */ - virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray) = 0; - - //! Set direction the emitter emits particles - virtual void setDirection( const core::vector3df& newDirection ) = 0; - - //! Set minimum number of particles the emitter emits per second - virtual void setMinParticlesPerSecond( u32 minPPS ) = 0; - - //! Set maximum number of particles the emitter emits per second - virtual void setMaxParticlesPerSecond( u32 maxPPS ) = 0; - - //! Set minimum starting color for particles - virtual void setMinStartColor( const video::SColor& color ) = 0; - - //! Set maximum starting color for particles - virtual void setMaxStartColor( const video::SColor& color ) = 0; - - //! Set the maximum starting size for particles - virtual void setMaxStartSize( const core::dimension2df& size ) = 0; - - //! Set the minimum starting size for particles - virtual void setMinStartSize( const core::dimension2df& size ) = 0; - - //! Set the minimum particle life-time in milliseconds - virtual void setMinLifeTime( u32 lifeTimeMin ) = 0; - - //! Set the maximum particle life-time in milliseconds - virtual void setMaxLifeTime( u32 lifeTimeMax ) = 0; - - //! Set maximal random derivation from the direction - virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) = 0; - - //! Get direction the emitter emits particles - virtual const core::vector3df& getDirection() const = 0; - - //! Get the minimum number of particles the emitter emits per second - virtual u32 getMinParticlesPerSecond() const = 0; - - //! Get the maximum number of particles the emitter emits per second - virtual u32 getMaxParticlesPerSecond() const = 0; - - //! Get the minimum starting color for particles - virtual const video::SColor& getMinStartColor() const = 0; - - //! Get the maximum starting color for particles - virtual const video::SColor& getMaxStartColor() const = 0; - - //! Get the maximum starting size for particles - virtual const core::dimension2df& getMaxStartSize() const = 0; - - //! Get the minimum starting size for particles - virtual const core::dimension2df& getMinStartSize() const = 0; - - //! Get the minimum particle life-time in milliseconds - virtual u32 getMinLifeTime() const = 0; - - //! Get the maximum particle life-time in milliseconds - virtual u32 getMaxLifeTime() const = 0; - - //! Get maximal random derivation from the direction - virtual s32 getMaxAngleDegrees() const = 0; - - - //! Get emitter type - virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_POINT; } -}; - -typedef IParticleEmitter IParticlePointEmitter; - -} // end namespace scene -} // end namespace irr - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IParticleFadeOutAffector.h b/builddir/irrlicht-1.8.1/include/IParticleFadeOutAffector.h deleted file mode 100644 index c3ce78b..0000000 --- a/builddir/irrlicht-1.8.1/include/IParticleFadeOutAffector.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_PARTICLE_FADE_OUT_AFFECTOR_H_INCLUDED__ -#define __I_PARTICLE_FADE_OUT_AFFECTOR_H_INCLUDED__ - -#include "IParticleAffector.h" - -namespace irr -{ -namespace scene -{ - -//! A particle affector which fades out the particles. -class IParticleFadeOutAffector : public IParticleAffector -{ -public: - - //! Sets the targetColor, i.e. the color the particles will interpolate to over time. - virtual void setTargetColor( const video::SColor& targetColor ) = 0; - - //! Sets the time in milliseconds it takes for each particle to fade out (minimal 1 ms) - virtual void setFadeOutTime( u32 fadeOutTime ) = 0; - - //! Gets the targetColor, i.e. the color the particles will interpolate to over time. - virtual const video::SColor& getTargetColor() const = 0; - - //! Gets the time in milliseconds it takes for each particle to fade out. - virtual u32 getFadeOutTime() const = 0; - - //! Get emitter type - virtual E_PARTICLE_AFFECTOR_TYPE getType() const { return EPAT_FADE_OUT; } -}; - -} // end namespace scene -} // end namespace irr - - -#endif // __I_PARTICLE_FADE_OUT_AFFECTOR_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/IParticleGravityAffector.h b/builddir/irrlicht-1.8.1/include/IParticleGravityAffector.h deleted file mode 100644 index f0e4f8e..0000000 --- a/builddir/irrlicht-1.8.1/include/IParticleGravityAffector.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_PARTICLE_GRAVITY_AFFECTOR_H_INCLUDED__ -#define __I_PARTICLE_GRAVITY_AFFECTOR_H_INCLUDED__ - -#include "IParticleAffector.h" - -namespace irr -{ -namespace scene -{ - -//! A particle affector which applies gravity to particles. -class IParticleGravityAffector : public IParticleAffector -{ -public: - - //! Set the time in milliseconds when the gravity force is totally lost - /** At that point the particle does not move any more. */ - virtual void setTimeForceLost( f32 timeForceLost ) = 0; - - //! Set the direction and force of gravity in all 3 dimensions. - virtual void setGravity( const core::vector3df& gravity ) = 0; - - //! Get the time in milliseconds when the gravity force is totally lost - virtual f32 getTimeForceLost() const = 0; - - //! Get the direction and force of gravity. - virtual const core::vector3df& getGravity() const = 0; - - //! Get emitter type - virtual E_PARTICLE_AFFECTOR_TYPE getType() const { return EPAT_GRAVITY; } -}; - -} // end namespace scene -} // end namespace irr - - -#endif // __I_PARTICLE_GRAVITY_AFFECTOR_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/IParticleMeshEmitter.h b/builddir/irrlicht-1.8.1/include/IParticleMeshEmitter.h deleted file mode 100644 index 4d066a1..0000000 --- a/builddir/irrlicht-1.8.1/include/IParticleMeshEmitter.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_PARTICLE_MESH_EMITTER_H_INCLUDED__ -#define __I_PARTICLE_MESH_EMITTER_H_INCLUDED__ - -#include "IParticleEmitter.h" -#include "IMesh.h" - -namespace irr -{ -namespace scene -{ - -//! A particle emitter which emits from vertices of a mesh -class IParticleMeshEmitter : public IParticleEmitter -{ -public: - - //! Set Mesh to emit particles from - virtual void setMesh( IMesh* mesh ) = 0; - - //! Set whether to use vertex normal for direction, or direction specified - virtual void setUseNormalDirection( bool useNormalDirection = true ) = 0; - - //! Set the amount that the normal is divided by for getting a particles direction - virtual void setNormalDirectionModifier( f32 normalDirectionModifier ) = 0; - - //! Sets whether to emit min<->max particles for every vertex or to pick min<->max vertices - virtual void setEveryMeshVertex( bool everyMeshVertex = true ) = 0; - - //! Get Mesh we're emitting particles from - virtual const IMesh* getMesh() const = 0; - - //! Get whether to use vertex normal for direction, or direction specified - virtual bool isUsingNormalDirection() const = 0; - - //! Get the amount that the normal is divided by for getting a particles direction - virtual f32 getNormalDirectionModifier() const = 0; - - //! Gets whether to emit min<->max particles for every vertex or to pick min<->max vertices - virtual bool getEveryMeshVertex() const = 0; - - //! Get emitter type - virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_MESH; } -}; - -} // end namespace scene -} // end namespace irr - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IParticleRingEmitter.h b/builddir/irrlicht-1.8.1/include/IParticleRingEmitter.h deleted file mode 100644 index 4330092..0000000 --- a/builddir/irrlicht-1.8.1/include/IParticleRingEmitter.h +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_PARTICLE_RING_EMITTER_H_INCLUDED__ -#define __I_PARTICLE_RING_EMITTER_H_INCLUDED__ - -#include "IParticleEmitter.h" - -namespace irr -{ -namespace scene -{ - -//! A particle emitter which emits particles along a ring shaped area. -class IParticleRingEmitter : public IParticleEmitter -{ -public: - - //! Set the center of the ring - virtual void setCenter( const core::vector3df& center ) = 0; - - //! Set the radius of the ring - virtual void setRadius( f32 radius ) = 0; - - //! Set the thickness of the ring - virtual void setRingThickness( f32 ringThickness ) = 0; - - //! Get the center of the ring - virtual const core::vector3df& getCenter() const = 0; - - //! Get the radius of the ring - virtual f32 getRadius() const = 0; - - //! Get the thickness of the ring - virtual f32 getRingThickness() const = 0; - - //! Get emitter type - virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_RING; } -}; - -} // end namespace scene -} // end namespace irr - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IParticleRotationAffector.h b/builddir/irrlicht-1.8.1/include/IParticleRotationAffector.h deleted file mode 100644 index 611fc3b..0000000 --- a/builddir/irrlicht-1.8.1/include/IParticleRotationAffector.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_PARTICLE_ROTATION_AFFECTOR_H_INCLUDED__ -#define __I_PARTICLE_ROTATION_AFFECTOR_H_INCLUDED__ - -#include "IParticleAffector.h" - -namespace irr -{ -namespace scene -{ - -//! A particle affector which rotates the particle system. -class IParticleRotationAffector : public IParticleAffector -{ -public: - - //! Set the point that particles will rotate around - virtual void setPivotPoint( const core::vector3df& point ) = 0; - - //! Set the speed in degrees per second in all 3 dimensions - virtual void setSpeed( const core::vector3df& speed ) = 0; - - //! Get the point that particles are attracted to - virtual const core::vector3df& getPivotPoint() const = 0; - - //! Get the speed in degrees per second in all 3 dimensions - virtual const core::vector3df& getSpeed() const = 0; - - //! Get emitter type - virtual E_PARTICLE_AFFECTOR_TYPE getType() const { return EPAT_ROTATE; } -}; - -} // end namespace scene -} // end namespace irr - - -#endif // __I_PARTICLE_ROTATION_AFFECTOR_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/IParticleSphereEmitter.h b/builddir/irrlicht-1.8.1/include/IParticleSphereEmitter.h deleted file mode 100644 index edde2da..0000000 --- a/builddir/irrlicht-1.8.1/include/IParticleSphereEmitter.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_PARTICLE_SPHERE_EMITTER_H_INCLUDED__ -#define __I_PARTICLE_SPHERE_EMITTER_H_INCLUDED__ - -#include "IParticleEmitter.h" - -namespace irr -{ -namespace scene -{ - -//! A particle emitter which emits from a spherical space. -class IParticleSphereEmitter : public IParticleEmitter -{ -public: - - //! Set the center of the sphere for particle emissions - virtual void setCenter( const core::vector3df& center ) = 0; - - //! Set the radius of the sphere for particle emissions - virtual void setRadius( f32 radius ) = 0; - - //! Get the center of the sphere for particle emissions - virtual const core::vector3df& getCenter() const = 0; - - //! Get the radius of the sphere for particle emissions - virtual f32 getRadius() const = 0; - - //! Get emitter type - virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_SPHERE; } -}; - -} // end namespace scene -} // end namespace irr - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IParticleSystemSceneNode.h b/builddir/irrlicht-1.8.1/include/IParticleSystemSceneNode.h deleted file mode 100644 index 56a47c8..0000000 --- a/builddir/irrlicht-1.8.1/include/IParticleSystemSceneNode.h +++ /dev/null @@ -1,512 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_PARTICLE_SYSTEM_SCENE_NODE_H_INCLUDED__ -#define __I_PARTICLE_SYSTEM_SCENE_NODE_H_INCLUDED__ - -#include "ISceneNode.h" -#include "IParticleAnimatedMeshSceneNodeEmitter.h" -#include "IParticleBoxEmitter.h" -#include "IParticleCylinderEmitter.h" -#include "IParticleMeshEmitter.h" -#include "IParticleRingEmitter.h" -#include "IParticleSphereEmitter.h" -#include "IParticleAttractionAffector.h" -#include "IParticleFadeOutAffector.h" -#include "IParticleGravityAffector.h" -#include "IParticleRotationAffector.h" -#include "dimension2d.h" - -namespace irr -{ -namespace scene -{ - -//! A particle system scene node for creating snow, fire, exlosions, smoke... -/** A scene node controlling a particle System. The behavior of the particles -can be controlled by setting the right particle emitters and affectors. -You can for example easily create a campfire by doing this: - -\code - scene::IParticleSystemSceneNode* p = scenemgr->addParticleSystemSceneNode(); - p->setParticleSize(core::dimension2d<f32>(20.0f, 10.0f)); - scene::IParticleEmitter* em = p->createBoxEmitter( - core::aabbox3d<f32>(-5,0,-5,5,1,5), - core::vector3df(0.0f,0.03f,0.0f), - 40,80, video::SColor(0,255,255,255),video::SColor(0,255,255,255), 1100,2000); - p->setEmitter(em); - em->drop(); - scene::IParticleAffector* paf = p->createFadeOutParticleAffector(); - p->addAffector(paf); - paf->drop(); -\endcode - -*/ -class IParticleSystemSceneNode : public ISceneNode -{ -public: - - //! Constructor - IParticleSystemSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, - const core::vector3df& position = core::vector3df(0,0,0), - const core::vector3df& rotation = core::vector3df(0,0,0), - const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) - : ISceneNode(parent, mgr, id, position, rotation, scale) {} - - //! Sets the size of all particles. - virtual void setParticleSize( - const core::dimension2d<f32> &size = core::dimension2d<f32>(5.0f, 5.0f)) = 0; - - //! Sets if the particles should be global. - /** If they are, the particles are affected by the movement of the - particle system scene node too, otherwise they completely ignore it. - Default is true. */ - virtual void setParticlesAreGlobal(bool global=true) = 0; - - //! Remove all currently visible particles - virtual void clearParticles() = 0; - - //! Do manually update the particles. - //! This should only be called when you want to render the node outside the scenegraph, - //! as the node will care about this otherwise automatically. - virtual void doParticleSystem(u32 time) = 0; - - //! Gets the particle emitter, which creates the particles. - /** \return The particle emitter. Can be 0 if none is set. */ - virtual IParticleEmitter* getEmitter() =0; - - //! Sets the particle emitter, which creates the particles. - /** A particle emitter can be created using one of the createEmitter - methods. For example to create and use a simple PointEmitter, call - IParticleEmitter* p = createPointEmitter(); setEmitter(p); p->drop(); - \param emitter: Sets the particle emitter. You can set this to 0 for - removing the current emitter and stopping the particle system emitting - new particles. */ - virtual void setEmitter(IParticleEmitter* emitter) = 0; - - //! Adds new particle effector to the particle system. - /** A particle affector modifies the particles. For example, the FadeOut - affector lets all particles fade out after some time. It is created and - used in this way: - \code - IParticleAffector* p = createFadeOutParticleAffector(); - addAffector(p); - p->drop(); - \endcode - Please note that an affector is not necessary for the particle system to - work. - \param affector: New affector. */ - virtual void addAffector(IParticleAffector* affector) = 0; - - //! Get a list of all particle affectors. - /** \return The list of particle affectors attached to this node. */ - virtual const core::list<IParticleAffector*>& getAffectors() const = 0; - - //! Removes all particle affectors in the particle system. - virtual void removeAllAffectors() = 0; - - //! Creates a particle emitter for an animated mesh scene node - /** \param node: Pointer to the animated mesh scene node to emit - particles from - \param useNormalDirection: If true, the direction of each particle - created will be the normal of the vertex that it's emitting from. The - normal is divided by the normalDirectionModifier parameter, which - defaults to 100.0f. - \param direction: Direction and speed of particle emission. - \param normalDirectionModifier: If the emitter is using the normal - direction then the normal of the vertex that is being emitted from is - divided by this number. - \param mbNumber: This allows you to specify a specific meshBuffer for - the IMesh* to emit particles from. The default value is -1, which - means a random meshBuffer picked from all of the meshes meshBuffers - will be selected to pick a random vertex from. If the value is 0 or - greater, it will only pick random vertices from the meshBuffer - specified by this value. - \param everyMeshVertex: If true, the emitter will emit between min/max - particles every second, for every vertex in the mesh, if false, it will - emit between min/max particles from random vertices in the mesh. - \param minParticlesPerSecond: Minimal amount of particles emitted per - second. - \param maxParticlesPerSecond: Maximal amount of particles emitted per - second. - \param minStartColor: Minimal initial start color of a particle. The - real color of every particle is calculated as random interpolation - between minStartColor and maxStartColor. - \param maxStartColor: Maximal initial start color of a particle. The - real color of every particle is calculated as random interpolation - between minStartColor and maxStartColor. - \param lifeTimeMin: Minimal lifetime of a particle, in milliseconds. - \param lifeTimeMax: Maximal lifetime of a particle, in milliseconds. - \param maxAngleDegrees: Maximal angle in degrees, the emitting - direction of the particle will differ from the original direction. - \param minStartSize: Minimal initial start size of a particle. The - real size of every particle is calculated as random interpolation - between minStartSize and maxStartSize. - \param maxStartSize: Maximal initial start size of a particle. The - real size of every particle is calculated as random interpolation - between minStartSize and maxStartSize. - \return Pointer to the created particle emitter. To set this emitter - as new emitter of this particle system, just call setEmitter(). Note - that you'll have to drop() the returned pointer, after you don't need - it any more, see IReferenceCounted::drop() for more informations. */ - virtual IParticleAnimatedMeshSceneNodeEmitter* createAnimatedMeshSceneNodeEmitter( - scene::IAnimatedMeshSceneNode* node, bool useNormalDirection = true, - const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), - f32 normalDirectionModifier = 100.0f, s32 mbNumber = -1, - bool everyMeshVertex = false, - u32 minParticlesPerSecond = 5, u32 maxParticlesPerSecond = 10, - const video::SColor& minStartColor = video::SColor(255,0,0,0), - const video::SColor& maxStartColor = video::SColor(255,255,255,255), - u32 lifeTimeMin = 2000, u32 lifeTimeMax = 4000, - s32 maxAngleDegrees = 0, - const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), - const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ) = 0; - - //! Creates a box particle emitter. - /** \param box: The box for the emitter. - \param direction: Direction and speed of particle emission. - \param minParticlesPerSecond: Minimal amount of particles emitted per - second. - \param maxParticlesPerSecond: Maximal amount of particles emitted per - second. - \param minStartColor: Minimal initial start color of a particle. The - real color of every particle is calculated as random interpolation - between minStartColor and maxStartColor. - \param maxStartColor: Maximal initial start color of a particle. The - real color of every particle is calculated as random interpolation - between minStartColor and maxStartColor. - \param lifeTimeMin: Minimal lifetime of a particle, in milliseconds. - \param lifeTimeMax: Maximal lifetime of a particle, in milliseconds. - \param maxAngleDegrees: Maximal angle in degrees, the emitting - direction of the particle will differ from the original direction. - \param minStartSize: Minimal initial start size of a particle. The - real size of every particle is calculated as random interpolation - between minStartSize and maxStartSize. - \param maxStartSize: Maximal initial start size of a particle. The - real size of every particle is calculated as random interpolation - between minStartSize and maxStartSize. - \return Pointer to the created particle emitter. To set this emitter - as new emitter of this particle system, just call setEmitter(). Note - that you'll have to drop() the returned pointer, after you don't need - it any more, see IReferenceCounted::drop() for more informations. */ - virtual IParticleBoxEmitter* createBoxEmitter( - const core::aabbox3df& box = core::aabbox3df(-10,28,-10,10,30,10), - const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), - u32 minParticlesPerSecond = 5, - u32 maxParticlesPerSecond = 10, - const video::SColor& minStartColor = video::SColor(255,0,0,0), - const video::SColor& maxStartColor = video::SColor(255,255,255,255), - u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, - s32 maxAngleDegrees=0, - const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), - const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ) = 0; - - //! Creates a particle emitter for emitting from a cylinder - /** \param center: The center of the circle at the base of the cylinder - \param radius: The thickness of the cylinder - \param normal: Direction of the length of the cylinder - \param length: The length of the the cylinder - \param outlineOnly: Whether or not to put points inside the cylinder or - on the outline only - \param direction: Direction and speed of particle emission. - \param minParticlesPerSecond: Minimal amount of particles emitted per - second. - \param maxParticlesPerSecond: Maximal amount of particles emitted per - second. - \param minStartColor: Minimal initial start color of a particle. The - real color of every particle is calculated as random interpolation - between minStartColor and maxStartColor. - \param maxStartColor: Maximal initial start color of a particle. The - real color of every particle is calculated as random interpolation - between minStartColor and maxStartColor. - \param lifeTimeMin: Minimal lifetime of a particle, in milliseconds. - \param lifeTimeMax: Maximal lifetime of a particle, in milliseconds. - \param maxAngleDegrees: Maximal angle in degrees, the emitting - direction of the particle will differ from the original direction. - \param minStartSize: Minimal initial start size of a particle. The - real size of every particle is calculated as random interpolation - between minStartSize and maxStartSize. - \param maxStartSize: Maximal initial start size of a particle. The - real size of every particle is calculated as random interpolation - between minStartSize and maxStartSize. - \return Pointer to the created particle emitter. To set this emitter - as new emitter of this particle system, just call setEmitter(). Note - that you'll have to drop() the returned pointer, after you don't need - it any more, see IReferenceCounted::drop() for more informations. */ - virtual IParticleCylinderEmitter* createCylinderEmitter( - const core::vector3df& center, f32 radius, - const core::vector3df& normal, f32 length, - bool outlineOnly = false, - const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), - u32 minParticlesPerSecond = 5, u32 maxParticlesPerSecond = 10, - const video::SColor& minStartColor = video::SColor(255,0,0,0), - const video::SColor& maxStartColor = video::SColor(255,255,255,255), - u32 lifeTimeMin = 2000, u32 lifeTimeMax = 4000, - s32 maxAngleDegrees = 0, - const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), - const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ) = 0; - - //! Creates a mesh particle emitter. - /** \param mesh: Pointer to mesh to emit particles from - \param useNormalDirection: If true, the direction of each particle - created will be the normal of the vertex that it's emitting from. The - normal is divided by the normalDirectionModifier parameter, which - defaults to 100.0f. - \param direction: Direction and speed of particle emission. - \param normalDirectionModifier: If the emitter is using the normal - direction then the normal of the vertex that is being emitted from is - divided by this number. - \param mbNumber: This allows you to specify a specific meshBuffer for - the IMesh* to emit particles from. The default value is -1, which - means a random meshBuffer picked from all of the meshes meshBuffers - will be selected to pick a random vertex from. If the value is 0 or - greater, it will only pick random vertices from the meshBuffer - specified by this value. - \param everyMeshVertex: If true, the emitter will emit between min/max - particles every second, for every vertex in the mesh, if false, it will - emit between min/max particles from random vertices in the mesh. - \param minParticlesPerSecond: Minimal amount of particles emitted per - second. - \param maxParticlesPerSecond: Maximal amount of particles emitted per - second. - \param minStartColor: Minimal initial start color of a particle. The - real color of every particle is calculated as random interpolation - between minStartColor and maxStartColor. - \param maxStartColor: Maximal initial start color of a particle. The - real color of every particle is calculated as random interpolation - between minStartColor and maxStartColor. - \param lifeTimeMin: Minimal lifetime of a particle, in milliseconds. - \param lifeTimeMax: Maximal lifetime of a particle, in milliseconds. - \param maxAngleDegrees: Maximal angle in degrees, the emitting - direction of the particle will differ from the original direction. - \param minStartSize: Minimal initial start size of a particle. The - real size of every particle is calculated as random interpolation - between minStartSize and maxStartSize. - \param maxStartSize: Maximal initial start size of a particle. The - real size of every particle is calculated as random interpolation - between minStartSize and maxStartSize. - \return Pointer to the created particle emitter. To set this emitter - as new emitter of this particle system, just call setEmitter(). Note - that you'll have to drop() the returned pointer, after you don't need - it any more, see IReferenceCounted::drop() for more informations. */ - virtual IParticleMeshEmitter* createMeshEmitter( - scene::IMesh* mesh, bool useNormalDirection = true, - const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), - f32 normalDirectionModifier = 100.0f, s32 mbNumber = -1, - bool everyMeshVertex = false, - u32 minParticlesPerSecond = 5, u32 maxParticlesPerSecond = 10, - const video::SColor& minStartColor = video::SColor(255,0,0,0), - const video::SColor& maxStartColor = video::SColor(255,255,255,255), - u32 lifeTimeMin = 2000, u32 lifeTimeMax = 4000, - s32 maxAngleDegrees = 0, - const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), - const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ) = 0; - - //! Creates a point particle emitter. - /** \param direction: Direction and speed of particle emission. - \param minParticlesPerSecond: Minimal amount of particles emitted per - second. - \param maxParticlesPerSecond: Maximal amount of particles emitted per - second. - \param minStartColor: Minimal initial start color of a particle. The - real color of every particle is calculated as random interpolation - between minStartColor and maxStartColor. - \param maxStartColor: Maximal initial start color of a particle. The - real color of every particle is calculated as random interpolation - between minStartColor and maxStartColor. - \param lifeTimeMin: Minimal lifetime of a particle, in milliseconds. - \param lifeTimeMax: Maximal lifetime of a particle, in milliseconds. - \param maxAngleDegrees: Maximal angle in degrees, the emitting - direction of the particle will differ from the original direction. - \param minStartSize: Minimal initial start size of a particle. The - real size of every particle is calculated as random interpolation - between minStartSize and maxStartSize. - \param maxStartSize: Maximal initial start size of a particle. The - real size of every particle is calculated as random interpolation - between minStartSize and maxStartSize. - \return Pointer to the created particle emitter. To set this emitter - as new emitter of this particle system, just call setEmitter(). Note - that you'll have to drop() the returned pointer, after you don't need - it any more, see IReferenceCounted::drop() for more informations. */ - virtual IParticlePointEmitter* createPointEmitter( - const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), - u32 minParticlesPerSecond = 5, - u32 maxParticlesPerSecond = 10, - const video::SColor& minStartColor = video::SColor(255,0,0,0), - const video::SColor& maxStartColor = video::SColor(255,255,255,255), - u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, - s32 maxAngleDegrees=0, - const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), - const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ) = 0; - - //! Creates a ring particle emitter. - /** \param center: Center of ring - \param radius: Distance of points from center, points will be rotated - around the Y axis at a random 360 degrees and will then be shifted by - the provided ringThickness values in each axis. - \param ringThickness : thickness of the ring or how wide the ring is - \param direction: Direction and speed of particle emission. - \param minParticlesPerSecond: Minimal amount of particles emitted per - second. - \param maxParticlesPerSecond: Maximal amount of particles emitted per - second. - \param minStartColor: Minimal initial start color of a particle. The - real color of every particle is calculated as random interpolation - between minStartColor and maxStartColor. - \param maxStartColor: Maximal initial start color of a particle. The - real color of every particle is calculated as random interpolation - between minStartColor and maxStartColor. - \param lifeTimeMin: Minimal lifetime of a particle, in milliseconds. - \param lifeTimeMax: Maximal lifetime of a particle, in milliseconds. - \param maxAngleDegrees: Maximal angle in degrees, the emitting - direction of the particle will differ from the original direction. - \param minStartSize: Minimal initial start size of a particle. The - real size of every particle is calculated as random interpolation - between minStartSize and maxStartSize. - \param maxStartSize: Maximal initial start size of a particle. The - real size of every particle is calculated as random interpolation - between minStartSize and maxStartSize. - \return Pointer to the created particle emitter. To set this emitter - as new emitter of this particle system, just call setEmitter(). Note - that you'll have to drop() the returned pointer, after you don't need - it any more, see IReferenceCounted::drop() for more informations. */ - virtual IParticleRingEmitter* createRingEmitter( - const core::vector3df& center, f32 radius, f32 ringThickness, - const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), - u32 minParticlesPerSecond = 5, - u32 maxParticlesPerSecond = 10, - const video::SColor& minStartColor = video::SColor(255,0,0,0), - const video::SColor& maxStartColor = video::SColor(255,255,255,255), - u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, - s32 maxAngleDegrees=0, - const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), - const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ) = 0; - - //! Creates a sphere particle emitter. - /** \param center: Center of sphere - \param radius: Radius of sphere - \param direction: Direction and speed of particle emission. - \param minParticlesPerSecond: Minimal amount of particles emitted per - second. - \param maxParticlesPerSecond: Maximal amount of particles emitted per - second. - \param minStartColor: Minimal initial start color of a particle. The - real color of every particle is calculated as random interpolation - between minStartColor and maxStartColor. - \param maxStartColor: Maximal initial start color of a particle. The - real color of every particle is calculated as random interpolation - between minStartColor and maxStartColor. - \param lifeTimeMin: Minimal lifetime of a particle, in milliseconds. - \param lifeTimeMax: Maximal lifetime of a particle, in milliseconds. - \param maxAngleDegrees: Maximal angle in degrees, the emitting - direction of the particle will differ from the original direction. - \param minStartSize: Minimal initial start size of a particle. The - real size of every particle is calculated as random interpolation - between minStartSize and maxStartSize. - \param maxStartSize: Maximal initial start size of a particle. The - real size of every particle is calculated as random interpolation - between minStartSize and maxStartSize. - \return Pointer to the created particle emitter. To set this emitter - as new emitter of this particle system, just call setEmitter(). Note - that you'll have to drop() the returned pointer, after you don't need - it any more, see IReferenceCounted::drop() for more informations. */ - virtual IParticleSphereEmitter* createSphereEmitter( - const core::vector3df& center, f32 radius, - const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f), - u32 minParticlesPerSecond = 5, - u32 maxParticlesPerSecond = 10, - const video::SColor& minStartColor = video::SColor(255,0,0,0), - const video::SColor& maxStartColor = video::SColor(255,255,255,255), - u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, - s32 maxAngleDegrees=0, - const core::dimension2df& minStartSize = core::dimension2df(5.0f,5.0f), - const core::dimension2df& maxStartSize = core::dimension2df(5.0f,5.0f) ) = 0; - - //! Creates a point attraction affector. - /** This affector modifies the positions of the particles and attracts - them to a specified point at a specified speed per second. - \param point: Point to attract particles to. - \param speed: Speed in units per second, to attract to the specified - point. - \param attract: Whether the particles attract or detract from this - point. - \param affectX: Whether or not this will affect the X position of the - particle. - \param affectY: Whether or not this will affect the Y position of the - particle. - \param affectZ: Whether or not this will affect the Z position of the - particle. - \return Pointer to the created particle affector. To add this affector - as new affector of this particle system, just call addAffector(). Note - that you'll have to drop() the returned pointer, after you don't need - it any more, see IReferenceCounted::drop() for more informations. */ - virtual IParticleAttractionAffector* createAttractionAffector( - const core::vector3df& point, f32 speed = 1.0f, bool attract = true, - bool affectX = true, bool affectY = true, bool affectZ = true) = 0; - - //! Creates a scale particle affector. - /** This affector scales the particle to the a multiple of its size defined - by the scaleTo variable. - \param scaleTo: multiple of the size which the particle will be scaled to until deletion - \return Pointer to the created particle affector. - To add this affector as new affector of this particle system, - just call addAffector(). Note that you'll have to drop() the - returned pointer, after you don't need it any more, see - IReferenceCounted::drop() for more information. */ - virtual IParticleAffector* createScaleParticleAffector(const core::dimension2df& scaleTo = core::dimension2df(1.0f, 1.0f)) = 0; - - //! Creates a fade out particle affector. - /** This affector modifies the color of every particle and and reaches - the final color when the particle dies. This affector looks really - good, if the EMT_TRANSPARENT_ADD_COLOR material is used and the - targetColor is video::SColor(0,0,0,0): Particles are fading out into - void with this setting. - \param targetColor: Color whereto the color of the particle is changed. - \param timeNeededToFadeOut: How much time in milli seconds should the - affector need to change the color to the targetColor. - \return Pointer to the created particle affector. To add this affector - as new affector of this particle system, just call addAffector(). Note - that you'll have to drop() the returned pointer, after you don't need - it any more, see IReferenceCounted::drop() for more informations. */ - virtual IParticleFadeOutAffector* createFadeOutParticleAffector( - const video::SColor& targetColor = video::SColor(0,0,0,0), - u32 timeNeededToFadeOut = 1000) = 0; - - //! Creates a gravity affector. - /** This affector modifies the direction of the particle. It assumes - that the particle is fired out of the emitter with huge force, but is - loosing this after some time and is catched by the gravity then. This - affector is ideal for creating things like fountains. - \param gravity: Direction and force of gravity. - \param timeForceLost: Time in milli seconds when the force of the - emitter is totally lost and the particle does not move any more. This - is the time where gravity fully affects the particle. - \return Pointer to the created particle affector. To add this affector - as new affector of this particle system, just call addAffector(). Note - that you'll have to drop() the returned pointer, after you don't need - it any more, see IReferenceCounted::drop() for more informations. */ - virtual IParticleGravityAffector* createGravityAffector( - const core::vector3df& gravity = core::vector3df(0.0f,-0.03f,0.0f), - u32 timeForceLost = 1000) = 0; - - //! Creates a rotation affector. - /** This affector modifies the positions of the particles and attracts - them to a specified point at a specified speed per second. - \param speed: Rotation in degrees per second - \param pivotPoint: Point to rotate the particles around - \return Pointer to the created particle affector. To add this affector - as new affector of this particle system, just call addAffector(). Note - that you'll have to drop() the returned pointer, after you don't need - it any more, see IReferenceCounted::drop() for more informations. */ - virtual IParticleRotationAffector* createRotationAffector( - const core::vector3df& speed = core::vector3df(5.0f,5.0f,5.0f), - const core::vector3df& pivotPoint = core::vector3df(0.0f,0.0f,0.0f) ) = 0; -}; - -} // end namespace scene -} // end namespace irr - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IQ3LevelMesh.h b/builddir/irrlicht-1.8.1/include/IQ3LevelMesh.h deleted file mode 100644 index f8ff03f..0000000 --- a/builddir/irrlicht-1.8.1/include/IQ3LevelMesh.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_Q3_LEVEL_MESH_H_INCLUDED__ -#define __I_Q3_LEVEL_MESH_H_INCLUDED__ - -#include "IAnimatedMesh.h" -#include "IQ3Shader.h" - -namespace irr -{ -namespace scene -{ - //! Interface for a Mesh which can be loaded directly from a Quake3 .bsp-file. - /** The Mesh tries to load all textures of the map.*/ - class IQ3LevelMesh : public IAnimatedMesh - { - public: - - //! loads the shader definition from file - /** \param filename Name of the shaderfile, defaults to /scripts if fileNameIsValid is false. - \param fileNameIsValid Specifies whether the filename is valid in the current situation. */ - virtual const quake3::IShader* getShader( const c8* filename, bool fileNameIsValid=true ) = 0; - - //! returns a already loaded Shader - virtual const quake3::IShader* getShader(u32 index) const = 0; - - //! get's an interface to the entities - virtual quake3::tQ3EntityList& getEntityList() = 0; - - //! returns the requested brush entity - /** \param num The number from the model key of the entity. - - Use this interface if you parse the entities yourself.*/ - virtual IMesh* getBrushEntityMesh(s32 num) const = 0; - - //! returns the requested brush entity - virtual IMesh* getBrushEntityMesh(quake3::IEntity &ent) const = 0; - }; - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IQ3Shader.h b/builddir/irrlicht-1.8.1/include/IQ3Shader.h deleted file mode 100644 index 735fdf8..0000000 --- a/builddir/irrlicht-1.8.1/include/IQ3Shader.h +++ /dev/null @@ -1,885 +0,0 @@ -// Copyright (C) 2006-2012 Nikolaus Gebhardt / Thomas Alten -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_Q3_LEVEL_SHADER_H_INCLUDED__ -#define __I_Q3_LEVEL_SHADER_H_INCLUDED__ - -#include "irrArray.h" -#include "fast_atof.h" -#include "IFileSystem.h" -#include "IVideoDriver.h" -#include "coreutil.h" - -namespace irr -{ -namespace scene -{ -namespace quake3 -{ - - static core::stringc irrEmptyStringc(""); - - //! Hold the different Mesh Types used for getMesh - enum eQ3MeshIndex - { - E_Q3_MESH_GEOMETRY = 0, - E_Q3_MESH_ITEMS, - E_Q3_MESH_BILLBOARD, - E_Q3_MESH_FOG, - E_Q3_MESH_UNRESOLVED, - E_Q3_MESH_SIZE - }; - - /*! used to customize Quake3 BSP Loader - */ - - struct Q3LevelLoadParameter - { - Q3LevelLoadParameter () - :defaultLightMapMaterial ( video::EMT_LIGHTMAP_M4 ), - defaultModulate ( video::EMFN_MODULATE_4X ), - defaultFilter ( video::EMF_BILINEAR_FILTER ), - patchTesselation ( 8 ), - verbose ( 0 ), - startTime ( 0 ), endTime ( 0 ), - mergeShaderBuffer ( 1 ), - cleanUnResolvedMeshes ( 1 ), - loadAllShaders ( 0 ), - loadSkyShader ( 0 ), - alpharef ( 1 ), - swapLump ( 0 ), - #ifdef __BIG_ENDIAN__ - swapHeader ( 1 ) - #else - swapHeader ( 0 ) - #endif - { - memcpy ( scriptDir, "scripts\x0", 8 ); - } - - video::E_MATERIAL_TYPE defaultLightMapMaterial; - video::E_MODULATE_FUNC defaultModulate; - video::E_MATERIAL_FLAG defaultFilter; - s32 patchTesselation; - s32 verbose; - u32 startTime; - u32 endTime; - s32 mergeShaderBuffer; - s32 cleanUnResolvedMeshes; - s32 loadAllShaders; - s32 loadSkyShader; - s32 alpharef; - s32 swapLump; - s32 swapHeader; - c8 scriptDir [ 64 ]; - }; - - // some useful typedefs - typedef core::array< core::stringc > tStringList; - typedef core::array< video::ITexture* > tTexArray; - - // string helper.. TODO: move to generic files - inline s16 isEqual ( const core::stringc &string, u32 &pos, const c8 *list[], u16 listSize ) - { - const char * in = string.c_str () + pos; - - for ( u16 i = 0; i != listSize; ++i ) - { - if (string.size() < pos) - return -2; - u32 len = (u32) strlen ( list[i] ); - if (string.size() < pos+len) - continue; - if ( in [len] != 0 && in [len] != ' ' ) - continue; - if ( strncmp ( in, list[i], len ) ) - continue; - - pos += len + 1; - return (s16) i; - } - return -2; - } - - inline f32 getAsFloat ( const core::stringc &string, u32 &pos ) - { - const char * in = string.c_str () + pos; - - f32 value = 0.f; - pos += (u32) ( core::fast_atof_move ( in, value ) - in ) + 1; - return value; - } - - //! get a quake3 vector translated to irrlicht position (x,-z,y ) - inline core::vector3df getAsVector3df ( const core::stringc &string, u32 &pos ) - { - core::vector3df v; - - v.X = getAsFloat ( string, pos ); - v.Z = getAsFloat ( string, pos ); - v.Y = getAsFloat ( string, pos ); - - return v; - } - - - /* - extract substrings - */ - inline void getAsStringList ( tStringList &list, s32 max, const core::stringc &string, u32 &startPos ) - { - list.clear (); - - s32 finish = 0; - s32 endPos; - do - { - endPos = string.findNext ( ' ', startPos ); - if ( endPos == -1 ) - { - finish = 1; - endPos = string.size(); - } - - list.push_back ( string.subString ( startPos, endPos - startPos ) ); - startPos = endPos + 1; - - if ( list.size() >= (u32) max ) - finish = 1; - - } while ( !finish ); - - } - - //! A blend function for a q3 shader. - struct SBlendFunc - { - SBlendFunc ( video::E_MODULATE_FUNC mod ) - : type ( video::EMT_SOLID ), modulate ( mod ), - param0( 0.f ), - isTransparent ( 0 ) {} - - video::E_MATERIAL_TYPE type; - video::E_MODULATE_FUNC modulate; - - f32 param0; - u32 isTransparent; - }; - - // parses the content of Variable cull - inline bool getCullingFunction ( const core::stringc &cull ) - { - if ( cull.size() == 0 ) - return true; - - bool ret = true; - static const c8 * funclist[] = { "none", "disable", "twosided" }; - - u32 pos = 0; - switch ( isEqual ( cull, pos, funclist, 3 ) ) - { - case 0: - case 1: - case 2: - ret = false; - break; - } - return ret; - } - - // parses the content of Variable depthfunc - // return a z-test - inline u8 getDepthFunction ( const core::stringc &string ) - { - u8 ret = video::ECFN_LESSEQUAL; - - if ( string.size() == 0 ) - return ret; - - static const c8 * funclist[] = { "lequal","equal" }; - - u32 pos = 0; - switch ( isEqual ( string, pos, funclist, 2 ) ) - { - case 0: - ret = video::ECFN_LESSEQUAL; - break; - case 1: - ret = video::ECFN_EQUAL; - break; - } - return ret; - } - - - /*! - parses the content of Variable blendfunc,alphafunc - it also make a hint for rendering as transparent or solid node. - - we assume a typical quake scene would look like this.. - 1) Big Static Mesh ( solid ) - 2) static scene item ( may use transparency ) but rendered in the solid pass - 3) additional transparency item in the transparent pass - - it's not 100% accurate! it just empirical.. - */ - inline static void getBlendFunc ( const core::stringc &string, SBlendFunc &blendfunc ) - { - if ( string.size() == 0 ) - return; - - // maps to E_BLEND_FACTOR - static const c8 * funclist[] = - { - "gl_zero", - "gl_one", - "gl_dst_color", - "gl_one_minus_dst_color", - "gl_src_color", - "gl_one_minus_src_color", - "gl_src_alpha", - "gl_one_minus_src_alpha", - "gl_dst_alpha", - "gl_one_minus_dst_alpha", - "gl_src_alpha_sat", - - "add", - "filter", - "blend", - - "ge128", - "gt0", - }; - - - u32 pos = 0; - s32 srcFact = isEqual ( string, pos, funclist, 16 ); - - if ( srcFact < 0 ) - return; - - u32 resolved = 0; - s32 dstFact = isEqual ( string, pos, funclist, 16 ); - - switch ( srcFact ) - { - case video::EBF_ZERO: - switch ( dstFact ) - { - // gl_zero gl_src_color == gl_dst_color gl_zero - case video::EBF_SRC_COLOR: - blendfunc.type = video::EMT_ONETEXTURE_BLEND; - blendfunc.param0 = video::pack_textureBlendFunc ( video::EBF_DST_COLOR, video::EBF_ZERO, blendfunc.modulate ); - blendfunc.isTransparent = 1; - resolved = 1; - break; - } break; - - case video::EBF_ONE: - switch ( dstFact ) - { - // gl_one gl_zero - case video::EBF_ZERO: - blendfunc.type = video::EMT_SOLID; - blendfunc.isTransparent = 0; - resolved = 1; - break; - - // gl_one gl_one - case video::EBF_ONE: - blendfunc.type = video::EMT_TRANSPARENT_ADD_COLOR; - blendfunc.isTransparent = 1; - resolved = 1; - break; - } break; - - case video::EBF_SRC_ALPHA: - switch ( dstFact ) - { - // gl_src_alpha gl_one_minus_src_alpha - case video::EBF_ONE_MINUS_SRC_ALPHA: - blendfunc.type = video::EMT_TRANSPARENT_ALPHA_CHANNEL; - blendfunc.param0 = 1.f/255.f; - blendfunc.isTransparent = 1; - resolved = 1; - break; - } break; - - case 11: - // add - blendfunc.type = video::EMT_TRANSPARENT_ADD_COLOR; - blendfunc.isTransparent = 1; - resolved = 1; - break; - case 12: - // filter = gl_dst_color gl_zero or gl_zero gl_src_color - blendfunc.type = video::EMT_ONETEXTURE_BLEND; - blendfunc.param0 = video::pack_textureBlendFunc ( video::EBF_DST_COLOR, video::EBF_ZERO, blendfunc.modulate ); - blendfunc.isTransparent = 1; - resolved = 1; - break; - case 13: - // blend = gl_src_alpha gl_one_minus_src_alpha - blendfunc.type = video::EMT_TRANSPARENT_ALPHA_CHANNEL; - blendfunc.param0 = 1.f/255.f; - blendfunc.isTransparent = 1; - resolved = 1; - break; - case 14: - // alphafunc ge128 - blendfunc.type = video::EMT_TRANSPARENT_ALPHA_CHANNEL; - blendfunc.param0 = 0.5f; - blendfunc.isTransparent = 1; - resolved = 1; - break; - case 15: - // alphafunc gt0 - blendfunc.type = video::EMT_TRANSPARENT_ALPHA_CHANNEL; - blendfunc.param0 = 1.f / 255.f; - blendfunc.isTransparent = 1; - resolved = 1; - break; - - } - - // use the generic blender - if ( 0 == resolved ) - { - blendfunc.type = video::EMT_ONETEXTURE_BLEND; - blendfunc.param0 = video::pack_textureBlendFunc ( - (video::E_BLEND_FACTOR) srcFact, - (video::E_BLEND_FACTOR) dstFact, - blendfunc.modulate); - - blendfunc.isTransparent = 1; - } - } - - // random noise [-1;1] - struct Noiser - { - static f32 get () - { - static u32 RandomSeed = 0x69666966; - RandomSeed = (RandomSeed * 3631 + 1); - - f32 value = ( (f32) (RandomSeed & 0x7FFF ) * (1.0f / (f32)(0x7FFF >> 1) ) ) - 1.f; - return value; - } - }; - - enum eQ3ModifierFunction - { - TCMOD = 0, - DEFORMVERTEXES = 1, - RGBGEN = 2, - TCGEN = 3, - MAP = 4, - ALPHAGEN = 5, - - FUNCTION2 = 0x10, - SCROLL = FUNCTION2 + 1, - SCALE = FUNCTION2 + 2, - ROTATE = FUNCTION2 + 3, - STRETCH = FUNCTION2 + 4, - TURBULENCE = FUNCTION2 + 5, - WAVE = FUNCTION2 + 6, - - IDENTITY = FUNCTION2 + 7, - VERTEX = FUNCTION2 + 8, - TEXTURE = FUNCTION2 + 9, - LIGHTMAP = FUNCTION2 + 10, - ENVIRONMENT = FUNCTION2 + 11, - DOLLAR_LIGHTMAP = FUNCTION2 + 12, - BULGE = FUNCTION2 + 13, - AUTOSPRITE = FUNCTION2 + 14, - AUTOSPRITE2 = FUNCTION2 + 15, - TRANSFORM = FUNCTION2 + 16, - EXACTVERTEX = FUNCTION2 + 17, - CONSTANT = FUNCTION2 + 18, - LIGHTINGSPECULAR = FUNCTION2 + 19, - MOVE = FUNCTION2 + 20, - NORMAL = FUNCTION2 + 21, - IDENTITYLIGHTING = FUNCTION2 + 22, - - WAVE_MODIFIER_FUNCTION = 0x30, - SINUS = WAVE_MODIFIER_FUNCTION + 1, - COSINUS = WAVE_MODIFIER_FUNCTION + 2, - SQUARE = WAVE_MODIFIER_FUNCTION + 3, - TRIANGLE = WAVE_MODIFIER_FUNCTION + 4, - SAWTOOTH = WAVE_MODIFIER_FUNCTION + 5, - SAWTOOTH_INVERSE = WAVE_MODIFIER_FUNCTION + 6, - NOISE = WAVE_MODIFIER_FUNCTION + 7, - - - UNKNOWN = -2 - - }; - - struct SModifierFunction - { - SModifierFunction () - : masterfunc0 ( UNKNOWN ), masterfunc1( UNKNOWN ), func ( SINUS ), - tcgen( TEXTURE ), rgbgen ( IDENTITY ), alphagen ( UNKNOWN ), - base ( 0 ), amp ( 1 ), phase ( 0 ), frequency ( 1 ), - wave ( 1 ), - x ( 0 ), y ( 0 ), z( 0 ), count( 0 ) {} - - // "tcmod","deformvertexes","rgbgen", "tcgen" - eQ3ModifierFunction masterfunc0; - // depends - eQ3ModifierFunction masterfunc1; - // depends - eQ3ModifierFunction func; - - eQ3ModifierFunction tcgen; - eQ3ModifierFunction rgbgen; - eQ3ModifierFunction alphagen; - - union - { - f32 base; - f32 bulgewidth; - }; - - union - { - f32 amp; - f32 bulgeheight; - }; - - f32 phase; - - union - { - f32 frequency; - f32 bulgespeed; - }; - - union - { - f32 wave; - f32 div; - }; - - f32 x; - f32 y; - f32 z; - u32 count; - - f32 evaluate ( f32 dt ) const - { - // phase in 0 and 1.. - f32 x = core::fract( (dt + phase ) * frequency ); - f32 y = 0.f; - - switch ( func ) - { - case SINUS: - y = sinf ( x * core::PI * 2.f ); - break; - case COSINUS: - y = cosf ( x * core::PI * 2.f ); - break; - case SQUARE: - y = x < 0.5f ? 1.f : -1.f; - break; - case TRIANGLE: - y = x < 0.5f ? ( 4.f * x ) - 1.f : ( -4.f * x ) + 3.f; - break; - case SAWTOOTH: - y = x; - break; - case SAWTOOTH_INVERSE: - y = 1.f - x; - break; - case NOISE: - y = Noiser::get(); - break; - default: - break; - } - - return base + ( y * amp ); - } - - - }; - - inline core::vector3df getMD3Normal ( u32 i, u32 j ) - { - const f32 lng = i * 2.0f * core::PI / 255.0f; - const f32 lat = j * 2.0f * core::PI / 255.0f; - return core::vector3df(cosf ( lat ) * sinf ( lng ), - sinf ( lat ) * sinf ( lng ), - cosf ( lng )); - } - - // - inline void getModifierFunc ( SModifierFunction& fill, const core::stringc &string, u32 &pos ) - { - if ( string.size() == 0 ) - return; - - static const c8 * funclist[] = - { - "sin","cos","square", - "triangle", "sawtooth","inversesawtooth", "noise" - }; - - fill.func = (eQ3ModifierFunction) isEqual ( string,pos, funclist,7 ); - fill.func = fill.func == UNKNOWN ? SINUS : (eQ3ModifierFunction) ((u32) fill.func + WAVE_MODIFIER_FUNCTION + 1); - - fill.base = getAsFloat ( string, pos ); - fill.amp = getAsFloat ( string, pos ); - fill.phase = getAsFloat ( string, pos ); - fill.frequency = getAsFloat ( string, pos ); - } - - - // name = "a b c .." - struct SVariable - { - core::stringc name; - core::stringc content; - - SVariable ( const c8 * n, const c8 *c = 0 ) : name ( n ), content (c) {} - virtual ~SVariable () {} - - void clear () - { - name = ""; - content = ""; - } - - s32 isValid () const - { - return name.size(); - } - - bool operator == ( const SVariable &other ) const - { - return 0 == strcmp ( name.c_str(), other.name.c_str () ); - } - - bool operator < ( const SVariable &other ) const - { - return 0 > strcmp ( name.c_str(), other.name.c_str () ); - } - - }; - - - // string database. "a" = "Hello", "b" = "1234.6" - struct SVarGroup - { - SVarGroup () { Variable.setAllocStrategy ( core::ALLOC_STRATEGY_SAFE ); } - virtual ~SVarGroup () {} - - u32 isDefined ( const c8 * name, const c8 * content = 0 ) const - { - for ( u32 i = 0; i != Variable.size (); ++i ) - { - if ( 0 == strcmp ( Variable[i].name.c_str(), name ) && - ( 0 == content || strstr ( Variable[i].content.c_str(), content ) ) - ) - { - return i + 1; - } - } - return 0; - } - - // searches for Variable name and returns is content - // if Variable is not found a reference to an Empty String is returned - const core::stringc &get( const c8 * name ) const - { - SVariable search ( name ); - s32 index = Variable.linear_search ( search ); - if ( index < 0 ) - return irrEmptyStringc; - - return Variable [ index ].content; - } - - // set the Variable name - void set ( const c8 * name, const c8 * content = 0 ) - { - u32 index = isDefined ( name, 0 ); - if ( 0 == index ) - { - Variable.push_back ( SVariable ( name, content ) ); - } - else - { - Variable [ index ].content = content; - } - } - - - core::array < SVariable > Variable; - }; - - //! holding a group a variable - struct SVarGroupList: public IReferenceCounted - { - SVarGroupList () - { - VariableGroup.setAllocStrategy ( core::ALLOC_STRATEGY_SAFE ); - } - virtual ~SVarGroupList () {} - - core::array < SVarGroup > VariableGroup; - }; - - - //! A Parsed Shader Holding Variables ordered in Groups - struct IShader - { - IShader () - : ID ( 0 ), VarGroup ( 0 ) {} - virtual ~IShader () {} - - void operator = (const IShader &other ) - { - ID = other.ID; - VarGroup = other.VarGroup; - name = other.name; - } - - bool operator == (const IShader &other ) const - { - return 0 == strcmp ( name.c_str(), other.name.c_str () ); - //return name == other.name; - } - - bool operator < (const IShader &other ) const - { - return strcmp ( name.c_str(), other.name.c_str () ) < 0; - //return name < other.name; - } - - u32 getGroupSize () const - { - if ( 0 == VarGroup ) - return 0; - return VarGroup->VariableGroup.size (); - } - - const SVarGroup * getGroup ( u32 stage ) const - { - if ( 0 == VarGroup || stage >= VarGroup->VariableGroup.size () ) - return 0; - - return &VarGroup->VariableGroup [ stage ]; - } - - // id - s32 ID; - SVarGroupList *VarGroup; // reference - - // Shader: shader name ( also first variable in first Vargroup ) - // Entity: classname ( variable in Group(1) ) - core::stringc name; - }; - - typedef IShader IEntity; - - typedef core::array < IEntity > tQ3EntityList; - - /* - dump shader like original layout, regardless of internal data holding - no recursive folding.. - */ - inline void dumpVarGroup ( core::stringc &dest, const SVarGroup * group, s32 stack ) - { - core::stringc buf; - s32 i; - - - if ( stack > 0 ) - { - buf = ""; - for ( i = 0; i < stack - 1; ++i ) - buf += '\t'; - - buf += "{\n"; - dest.append ( buf ); - } - - for ( u32 g = 0; g != group->Variable.size(); ++g ) - { - buf = ""; - for ( i = 0; i < stack; ++i ) - buf += '\t'; - - buf += group->Variable[g].name; - buf += " "; - buf += group->Variable[g].content; - buf += "\n"; - dest.append ( buf ); - } - - if ( stack > 1 ) - { - buf = ""; - for ( i = 0; i < stack - 1; ++i ) - buf += '\t'; - - buf += "}\n"; - dest.append ( buf ); - } - - } - - /*! - dump a Shader or an Entity - */ - inline core::stringc & dumpShader ( core::stringc &dest, const IShader * shader, bool entity = false ) - { - if ( 0 == shader ) - return dest; - - const SVarGroup * group; - - const u32 size = shader->VarGroup->VariableGroup.size (); - for ( u32 i = 0; i != size; ++i ) - { - group = &shader->VarGroup->VariableGroup[ i ]; - dumpVarGroup ( dest, group, core::clamp( (int)i, 0, 2 ) ); - } - - if ( !entity ) - { - if ( size <= 1 ) - { - dest.append ( "{\n" ); - } - dest.append ( "}\n" ); - } - return dest; - } - - - /* - quake3 doesn't care much about tga & jpg - load one or multiple files stored in name started at startPos to the texture array textures - if texture is not loaded 0 will be added ( to find missing textures easier) - */ - inline void getTextures(tTexArray &textures, - const core::stringc &name, u32 &startPos, - io::IFileSystem *fileSystem, - video::IVideoDriver* driver) - { - static const char* extension[] = - { - ".jpg", - ".jpeg", - ".png", - ".dds", - ".tga", - ".bmp", - ".pcx" - }; - - tStringList stringList; - getAsStringList(stringList, -1, name, startPos); - - textures.clear(); - - io::path loadFile; - for ( u32 i = 0; i!= stringList.size (); ++i ) - { - video::ITexture* texture = 0; - for (u32 g = 0; g != 7 ; ++g) - { - core::cutFilenameExtension ( loadFile, stringList[i] ); - - if ( loadFile == "$whiteimage" ) - { - texture = driver->getTexture( "$whiteimage" ); - if ( 0 == texture ) - { - core::dimension2du s ( 2, 2 ); - u32 image[4] = { 0xFFFFFFFF, 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF }; - video::IImage* w = driver->createImageFromData ( video::ECF_A8R8G8B8, s,&image ); - texture = driver->addTexture( "$whiteimage", w ); - w->drop (); - } - - } - else - if ( loadFile == "$redimage" ) - { - texture = driver->getTexture( "$redimage" ); - if ( 0 == texture ) - { - core::dimension2du s ( 2, 2 ); - u32 image[4] = { 0xFFFF0000, 0xFFFF0000,0xFFFF0000,0xFFFF0000 }; - video::IImage* w = driver->createImageFromData ( video::ECF_A8R8G8B8, s,&image ); - texture = driver->addTexture( "$redimage", w ); - w->drop (); - } - } - else - if ( loadFile == "$blueimage" ) - { - texture = driver->getTexture( "$blueimage" ); - if ( 0 == texture ) - { - core::dimension2du s ( 2, 2 ); - u32 image[4] = { 0xFF0000FF, 0xFF0000FF,0xFF0000FF,0xFF0000FF }; - video::IImage* w = driver->createImageFromData ( video::ECF_A8R8G8B8, s,&image ); - texture = driver->addTexture( "$blueimage", w ); - w->drop (); - } - } - else - if ( loadFile == "$checkerimage" ) - { - texture = driver->getTexture( "$checkerimage" ); - if ( 0 == texture ) - { - core::dimension2du s ( 2, 2 ); - u32 image[4] = { 0xFFFFFFFF, 0xFF000000,0xFF000000,0xFFFFFFFF }; - video::IImage* w = driver->createImageFromData ( video::ECF_A8R8G8B8, s,&image ); - texture = driver->addTexture( "$checkerimage", w ); - w->drop (); - } - } - else - if ( loadFile == "$lightmap" ) - { - texture = 0; - } - else - { - loadFile.append ( extension[g] ); - } - - if ( fileSystem->existFile ( loadFile ) ) - { - texture = driver->getTexture( loadFile ); - if ( texture ) - break; - texture = 0; - } - } - // take 0 Texture - textures.push_back(texture); - } - } - - - //! Manages various Quake3 Shader Styles - class IShaderManager : public IReferenceCounted - { - }; - -} // end namespace quake3 -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IRandomizer.h b/builddir/irrlicht-1.8.1/include/IRandomizer.h deleted file mode 100644 index 2d7d1d8..0000000 --- a/builddir/irrlicht-1.8.1/include/IRandomizer.h +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_RANDOMIZER_H_INCLUDED__ -#define __I_RANDOMIZER_H_INCLUDED__ - -#include "IReferenceCounted.h" - -namespace irr -{ - -//! Interface for generating random numbers -class IRandomizer : public virtual IReferenceCounted -{ -public: - //! resets the randomizer - /** \param value Initialization value (seed) */ - virtual void reset(s32 value=0x0f0f0f0f) =0; - - //! generates a pseudo random number in the range 0..randMax() - virtual s32 rand() const =0; - - //! generates a pseudo random number in the range 0..1 - virtual f32 frand() const =0; - - //! get maxmimum number generated by rand() - virtual s32 randMax() const =0; -}; - -} // end namespace irr - -#endif diff --git a/builddir/irrlicht-1.8.1/include/IReadFile.h b/builddir/irrlicht-1.8.1/include/IReadFile.h deleted file mode 100644 index eb4f0bd..0000000 --- a/builddir/irrlicht-1.8.1/include/IReadFile.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_READ_FILE_H_INCLUDED__ -#define __I_READ_FILE_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "coreutil.h" - -namespace irr -{ -namespace io -{ - - //! Interface providing read acess to a file. - class IReadFile : public virtual IReferenceCounted - { - public: - //! Reads an amount of bytes from the file. - /** \param buffer Pointer to buffer where read bytes are written to. - \param sizeToRead Amount of bytes to read from the file. - \return How many bytes were read. */ - virtual s32 read(void* buffer, u32 sizeToRead) = 0; - - //! Changes position in file - /** \param finalPos Destination position in the file. - \param relativeMovement If set to true, the position in the file is - changed relative to current position. Otherwise the position is changed - from beginning of file. - \return True if successful, otherwise false. */ - virtual bool seek(long finalPos, bool relativeMovement = false) = 0; - - //! Get size of file. - /** \return Size of the file in bytes. */ - virtual long getSize() const = 0; - - //! Get the current position in the file. - /** \return Current position in the file in bytes. */ - virtual long getPos() const = 0; - - //! Get name of file. - /** \return File name as zero terminated character string. */ - virtual const io::path& getFileName() const = 0; - }; - - //! Internal function, please do not use. - IReadFile* createReadFile(const io::path& fileName); - //! Internal function, please do not use. - IReadFile* createLimitReadFile(const io::path& fileName, IReadFile* alreadyOpenedFile, long pos, long areaSize); - //! Internal function, please do not use. - IReadFile* createMemoryReadFile(void* memory, long size, const io::path& fileName, bool deleteMemoryWhenDropped); - -} // end namespace io -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IReferenceCounted.h b/builddir/irrlicht-1.8.1/include/IReferenceCounted.h deleted file mode 100644 index 0eb23a5..0000000 --- a/builddir/irrlicht-1.8.1/include/IReferenceCounted.h +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_IREFERENCE_COUNTED_H_INCLUDED__ -#define __I_IREFERENCE_COUNTED_H_INCLUDED__ - -#include "irrTypes.h" - -namespace irr -{ - - //! Base class of most objects of the Irrlicht Engine. - /** This class provides reference counting through the methods grab() and drop(). - It also is able to store a debug string for every instance of an object. - Most objects of the Irrlicht - Engine are derived from IReferenceCounted, and so they are reference counted. - - When you create an object in the Irrlicht engine, calling a method - which starts with 'create', an object is created, and you get a pointer - to the new object. If you no longer need the object, you have - to call drop(). This will destroy the object, if grab() was not called - in another part of you program, because this part still needs the object. - Note, that you only need to call drop() to the object, if you created it, - and the method had a 'create' in it. - - A simple example: - - If you want to create a texture, you may want to call an imaginable method - IDriver::createTexture. You call - ITexture* texture = driver->createTexture(dimension2d<u32>(128, 128)); - If you no longer need the texture, call texture->drop(). - - If you want to load a texture, you may want to call imaginable method - IDriver::loadTexture. You do this like - ITexture* texture = driver->loadTexture("example.jpg"); - You will not have to drop the pointer to the loaded texture, because - the name of the method does not start with 'create'. The texture - is stored somewhere by the driver. - */ - class IReferenceCounted - { - public: - - //! Constructor. - IReferenceCounted() - : DebugName(0), ReferenceCounter(1) - { - } - - //! Destructor. - virtual ~IReferenceCounted() - { - } - - //! Grabs the object. Increments the reference counter by one. - /** Someone who calls grab() to an object, should later also - call drop() to it. If an object never gets as much drop() as - grab() calls, it will never be destroyed. The - IReferenceCounted class provides a basic reference counting - mechanism with its methods grab() and drop(). Most objects of - the Irrlicht Engine are derived from IReferenceCounted, and so - they are reference counted. - - When you create an object in the Irrlicht engine, calling a - method which starts with 'create', an object is created, and - you get a pointer to the new object. If you no longer need the - object, you have to call drop(). This will destroy the object, - if grab() was not called in another part of you program, - because this part still needs the object. Note, that you only - need to call drop() to the object, if you created it, and the - method had a 'create' in it. - - A simple example: - - If you want to create a texture, you may want to call an - imaginable method IDriver::createTexture. You call - ITexture* texture = driver->createTexture(dimension2d<u32>(128, 128)); - If you no longer need the texture, call texture->drop(). - If you want to load a texture, you may want to call imaginable - method IDriver::loadTexture. You do this like - ITexture* texture = driver->loadTexture("example.jpg"); - You will not have to drop the pointer to the loaded texture, - because the name of the method does not start with 'create'. - The texture is stored somewhere by the driver. */ - void grab() const { ++ReferenceCounter; } - - //! Drops the object. Decrements the reference counter by one. - /** The IReferenceCounted class provides a basic reference - counting mechanism with its methods grab() and drop(). Most - objects of the Irrlicht Engine are derived from - IReferenceCounted, and so they are reference counted. - - When you create an object in the Irrlicht engine, calling a - method which starts with 'create', an object is created, and - you get a pointer to the new object. If you no longer need the - object, you have to call drop(). This will destroy the object, - if grab() was not called in another part of you program, - because this part still needs the object. Note, that you only - need to call drop() to the object, if you created it, and the - method had a 'create' in it. - - A simple example: - - If you want to create a texture, you may want to call an - imaginable method IDriver::createTexture. You call - ITexture* texture = driver->createTexture(dimension2d<u32>(128, 128)); - If you no longer need the texture, call texture->drop(). - If you want to load a texture, you may want to call imaginable - method IDriver::loadTexture. You do this like - ITexture* texture = driver->loadTexture("example.jpg"); - You will not have to drop the pointer to the loaded texture, - because the name of the method does not start with 'create'. - The texture is stored somewhere by the driver. - \return True, if the object was deleted. */ - bool drop() const - { - // someone is doing bad reference counting. - _IRR_DEBUG_BREAK_IF(ReferenceCounter <= 0) - - --ReferenceCounter; - if (!ReferenceCounter) - { - delete this; - return true; - } - - return false; - } - - //! Get the reference count. - /** \return Current value of the reference counter. */ - s32 getReferenceCount() const - { - return ReferenceCounter; - } - - //! Returns the debug name of the object. - /** The Debugname may only be set and changed by the object - itself. This method should only be used in Debug mode. - \return Returns a string, previously set by setDebugName(); */ - const c8* getDebugName() const - { - return DebugName; - } - - protected: - - //! Sets the debug name of the object. - /** The Debugname may only be set and changed by the object - itself. This method should only be used in Debug mode. - \param newName: New debug name to set. */ - void setDebugName(const c8* newName) - { - DebugName = newName; - } - - private: - - //! The debug name. - const c8* DebugName; - - //! The reference counter. Mutable to do reference counting on const objects. - mutable s32 ReferenceCounter; - }; - -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/ISceneCollisionManager.h b/builddir/irrlicht-1.8.1/include/ISceneCollisionManager.h deleted file mode 100644 index 726936a..0000000 --- a/builddir/irrlicht-1.8.1/include/ISceneCollisionManager.h +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_SCENE_COLLISION_MANAGER_H_INCLUDED__ -#define __I_SCENE_COLLISION_MANAGER_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "vector3d.h" -#include "triangle3d.h" -#include "position2d.h" -#include "line3d.h" - -namespace irr -{ - -namespace scene -{ - class ISceneNode; - class ICameraSceneNode; - class ITriangleSelector; - - //! The Scene Collision Manager provides methods for performing collision tests and picking on scene nodes. - class ISceneCollisionManager : public virtual IReferenceCounted - { - public: - - //! Finds the nearest collision point of a line and lots of triangles, if there is one. - /** \param ray: Line with which collisions are tested. - \param selector: TriangleSelector containing the triangles. It - can be created for example using - ISceneManager::createTriangleSelector() or - ISceneManager::createTriangleOctreeSelector(). - \param outCollisionPoint: If a collision is detected, this will - contain the position of the nearest collision to the line-start. - \param outTriangle: If a collision is detected, this will - contain the triangle with which the ray collided. - \param outNode: If a collision is detected, this will contain - the scene node associated with the triangle that was hit. - \return True if a collision was detected and false if not. */ - virtual bool getCollisionPoint(const core::line3d<f32>& ray, - ITriangleSelector* selector, core::vector3df& outCollisionPoint, - core::triangle3df& outTriangle, ISceneNode*& outNode) =0; - - //! Collides a moving ellipsoid with a 3d world with gravity and returns the resulting new position of the ellipsoid. - /** This can be used for moving a character in a 3d world: The - character will slide at walls and is able to walk up stairs. - The method used how to calculate the collision result position - is based on the paper "Improved Collision detection and - Response" by Kasper Fauerby. - \param selector: TriangleSelector containing the triangles of - the world. It can be created for example using - ISceneManager::createTriangleSelector() or - ISceneManager::createTriangleOctreeSelector(). - \param ellipsoidPosition: Position of the ellipsoid. - \param ellipsoidRadius: Radius of the ellipsoid. - \param ellipsoidDirectionAndSpeed: Direction and speed of the - movement of the ellipsoid. - \param triout: Optional parameter where the last triangle - causing a collision is stored, if there is a collision. - \param hitPosition: Return value for the position of the collision - \param outFalling: Is set to true if the ellipsoid is falling - down, caused by gravity. - \param outNode: the node with which the ellipoid collided (if any) - \param slidingSpeed: DOCUMENTATION NEEDED. - \param gravityDirectionAndSpeed: Direction and force of gravity. - \return New position of the ellipsoid. */ - virtual core::vector3df getCollisionResultPosition( - ITriangleSelector* selector, - const core::vector3df &ellipsoidPosition, - const core::vector3df& ellipsoidRadius, - const core::vector3df& ellipsoidDirectionAndSpeed, - core::triangle3df& triout, - core::vector3df& hitPosition, - bool& outFalling, - ISceneNode*& outNode, - f32 slidingSpeed = 0.0005f, - const core::vector3df& gravityDirectionAndSpeed - = core::vector3df(0.0f, 0.0f, 0.0f)) = 0; - - //! Returns a 3d ray which would go through the 2d screen coodinates. - /** \param pos: Screen coordinates in pixels. - \param camera: Camera from which the ray starts. If null, the - active camera is used. - \return Ray starting from the position of the camera and ending - at a length of the far value of the camera at a position which - would be behind the 2d screen coodinates. */ - virtual core::line3d<f32> getRayFromScreenCoordinates( - const core::position2d<s32>& pos, ICameraSceneNode* camera = 0) = 0; - - //! Calculates 2d screen position from a 3d position. - /** \param pos: 3D position in world space to be transformed - into 2d. - \param camera: Camera to be used. If null, the currently active - camera is used. - \param useViewPort: Calculate screen coordinates relative to - the current view port. Please note that unless the driver does - not take care of the view port, it is usually best to get the - result in absolute screen coordinates (flag=false). - \return 2d screen coordinates which a object in the 3d world - would have if it would be rendered to the screen. If the 3d - position is behind the camera, it is set to (-1000,-1000). In - most cases you can ignore this fact, because if you use this - method for drawing a decorator over a 3d object, it will be - clipped by the screen borders. */ - virtual core::position2d<s32> getScreenCoordinatesFrom3DPosition( - const core::vector3df& pos, ICameraSceneNode* camera=0, bool useViewPort=false) = 0; - - //! Gets the scene node, which is currently visible under the given screencoordinates, viewed from the currently active camera. - /** The collision tests are done using a bounding box for each - scene node. You can limit the recursive search so just all children of the specified root are tested. - \param pos: Position in pixel screen coordinates, under which - the returned scene node will be. - \param idBitMask: Only scene nodes with an id with bits set - like in this mask will be tested. If the BitMask is 0, this - feature is disabled. - Please note that the default node id of -1 will match with - every bitmask != 0 - \param bNoDebugObjects: Doesn't take debug objects into account - when true. These are scene nodes with IsDebugObject() = true. - \param root If different from 0, the search is limited to the children of this node. - \return Visible scene node under screen coordinates with - matching bits in its id. If there is no scene node under this - position, 0 is returned. */ - virtual ISceneNode* getSceneNodeFromScreenCoordinatesBB(const core::position2d<s32>& pos, - s32 idBitMask=0, bool bNoDebugObjects=false, ISceneNode* root=0) =0; - - //! Returns the nearest scene node which collides with a 3d ray and whose id matches a bitmask. - /** The collision tests are done using a bounding box for each - scene node. The recursive search can be limited be specifying a scene node. - \param ray Line with which collisions are tested. - \param idBitMask Only scene nodes with an id which matches at - least one of the bits contained in this mask will be tested. - However, if this parameter is 0, then all nodes are checked. - \param bNoDebugObjects: Doesn't take debug objects into account when true. These - are scene nodes with IsDebugObject() = true. - \param root If different from 0, the search is limited to the children of this node. - \return Scene node nearest to ray.start, which collides with - the ray and matches the idBitMask, if the mask is not null. If - no scene node is found, 0 is returned. */ - virtual ISceneNode* getSceneNodeFromRayBB(const core::line3d<f32>& ray, - s32 idBitMask=0, bool bNoDebugObjects=false, ISceneNode* root=0) =0; - - //! Get the scene node, which the given camera is looking at and whose id matches the bitmask. - /** A ray is simply casted from the position of the camera to - the view target position, and all scene nodes are tested - against this ray. The collision tests are done using a bounding - box for each scene node. - \param camera: Camera from which the ray is casted. - \param idBitMask: Only scene nodes with an id which matches at least one of the - bits contained in this mask will be tested. However, if this parameter is 0, then - all nodes are checked. - feature is disabled. - Please note that the default node id of -1 will match with - every bitmask != 0 - \param bNoDebugObjects: Doesn't take debug objects into account - when true. These are scene nodes with IsDebugObject() = true. - \return Scene node nearest to the camera, which collides with - the ray and matches the idBitMask, if the mask is not null. If - no scene node is found, 0 is returned. */ - virtual ISceneNode* getSceneNodeFromCameraBB(ICameraSceneNode* camera, - s32 idBitMask=0, bool bNoDebugObjects = false) = 0; - - //! Perform a ray/box and ray/triangle collision check on a heirarchy of scene nodes. - /** This checks all scene nodes under the specified one, first by ray/bounding - box, and then by accurate ray/triangle collision, finding the nearest collision, - and the scene node containg it. It returns the node hit, and (via output - parameters) the position of the collision, and the triangle that was hit. - - All scene nodes in the hierarchy tree under the specified node are checked. Only - nodes that are visible, with an ID that matches at least one bit in the supplied - bitmask, and which have a triangle selector are considered as candidates for being hit. - You do not have to build a meta triangle selector; the individual triangle selectors - of each candidate scene node are used automatically. - - \param ray: Line with which collisions are tested. - \param outCollisionPoint: If a collision is detected, this will contain the - position of the nearest collision. - \param outTriangle: If a collision is detected, this will contain the triangle - with which the ray collided. - \param idBitMask: Only scene nodes with an id which matches at least one of the - bits contained in this mask will be tested. However, if this parameter is 0, then - all nodes are checked. - \param collisionRootNode: the scene node at which to begin checking. Only this - node and its children will be checked. If you want to check the entire scene, - pass 0, and the root scene node will be used (this is the default). - \param noDebugObjects: when true, debug objects are not considered viable targets. - Debug objects are scene nodes with IsDebugObject() = true. - \return Returns the scene node containing the hit triangle nearest to ray.start. - If no collision is detected, then 0 is returned. */ - virtual ISceneNode* getSceneNodeAndCollisionPointFromRay( - core::line3df ray, - core::vector3df & outCollisionPoint, - core::triangle3df & outTriangle, - s32 idBitMask = 0, - ISceneNode * collisionRootNode = 0, - bool noDebugObjects = false) = 0; - }; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/ISceneLoader.h b/builddir/irrlicht-1.8.1/include/ISceneLoader.h deleted file mode 100644 index 45a80f3..0000000 --- a/builddir/irrlicht-1.8.1/include/ISceneLoader.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (C) 2010-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_SCENE_LOADER_H_INCLUDED__ -#define __I_SCENE_LOADER_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "path.h" - -namespace irr -{ -namespace io -{ - class IReadFile; -} // end namespace io -namespace scene -{ - class ISceneNode; - class ISceneUserDataSerializer; - -//! Class which can load a scene into the scene manager. -/** If you want Irrlicht to be able to load currently unsupported -scene file formats (e.g. .vrml), then implement this and add your -new Sceneloader to the engine with ISceneManager::addExternalSceneLoader(). */ -class ISceneLoader : public virtual IReferenceCounted -{ -public: - - //! Returns true if the class might be able to load this file. - /** This decision should be based on the file extension (e.g. ".vrml") - only. - \param filename Name of the file to test. - \return True if the extension is a recognised type. */ - virtual bool isALoadableFileExtension(const io::path& filename) const = 0; - - //! Returns true if the class might be able to load this file. - /** This decision will be based on a quick look at the contents of the file. - \param file The file to test. - \return True if the extension is a recognised type. */ - virtual bool isALoadableFileFormat(io::IReadFile* file) const = 0; - - //! Loads the scene into the scene manager. - /** \param file File which contains the scene. - \param userDataSerializer: If you want to load user data which may be attached - to some some scene nodes in the file, implement the ISceneUserDataSerializer - interface and provide it as parameter here. Otherwise, simply specify 0 as this - parameter. - \param rootNode The node to load the scene into, if none is provided then the - scene will be loaded into the root node. - \return Returns true on success, false on failure. Returns 0 if loading failed. */ - virtual bool loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer=0, - ISceneNode* rootNode=0) = 0; - -}; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/ISceneManager.h b/builddir/irrlicht-1.8.1/include/ISceneManager.h deleted file mode 100644 index 8041348..0000000 --- a/builddir/irrlicht-1.8.1/include/ISceneManager.h +++ /dev/null @@ -1,1663 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_SCENE_MANAGER_H_INCLUDED__ -#define __I_SCENE_MANAGER_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "irrArray.h" -#include "irrString.h" -#include "path.h" -#include "vector3d.h" -#include "dimension2d.h" -#include "SColor.h" -#include "ETerrainElements.h" -#include "ESceneNodeTypes.h" -#include "ESceneNodeAnimatorTypes.h" -#include "EMeshWriterEnums.h" -#include "SceneParameters.h" -#include "IGeometryCreator.h" -#include "ISkinnedMesh.h" - -namespace irr -{ - struct SKeyMap; - struct SEvent; - -namespace io -{ - class IReadFile; - class IAttributes; - class IWriteFile; - class IFileSystem; -} // end namespace io - -namespace gui -{ - class IGUIFont; - class IGUIEnvironment; -} // end namespace gui - -namespace video -{ - class IVideoDriver; - class SMaterial; - class IImage; - class ITexture; -} // end namespace video - -namespace scene -{ - //! Enumeration for render passes. - /** A parameter passed to the registerNodeForRendering() method of the ISceneManager, - specifying when the node wants to be drawn in relation to the other nodes. */ - enum E_SCENE_NODE_RENDER_PASS - { - //! No pass currently active - ESNRP_NONE =0, - - //! Camera pass. The active view is set up here. The very first pass. - ESNRP_CAMERA =1, - - //! In this pass, lights are transformed into camera space and added to the driver - ESNRP_LIGHT =2, - - //! This is used for sky boxes. - ESNRP_SKY_BOX =4, - - //! All normal objects can use this for registering themselves. - /** This value will never be returned by - ISceneManager::getSceneNodeRenderPass(). The scene manager - will determine by itself if an object is transparent or solid - and register the object as SNRT_TRANSPARENT or SNRT_SOLD - automatically if you call registerNodeForRendering with this - value (which is default). Note that it will register the node - only as ONE type. If your scene node has both solid and - transparent material types register it twice (one time as - SNRT_SOLID, the other time as SNRT_TRANSPARENT) and in the - render() method call getSceneNodeRenderPass() to find out the - current render pass and render only the corresponding parts of - the node. */ - ESNRP_AUTOMATIC =24, - - //! Solid scene nodes or special scene nodes without materials. - ESNRP_SOLID =8, - - //! Transparent scene nodes, drawn after solid nodes. They are sorted from back to front and drawn in that order. - ESNRP_TRANSPARENT =16, - - //! Transparent effect scene nodes, drawn after Transparent nodes. They are sorted from back to front and drawn in that order. - ESNRP_TRANSPARENT_EFFECT =32, - - //! Drawn after the solid nodes, before the transparent nodes, the time for drawing shadow volumes - ESNRP_SHADOW =64 - }; - - class IAnimatedMesh; - class IAnimatedMeshSceneNode; - class IBillboardSceneNode; - class IBillboardTextSceneNode; - class ICameraSceneNode; - class IDummyTransformationSceneNode; - class ILightManager; - class ILightSceneNode; - class IMesh; - class IMeshBuffer; - class IMeshCache; - class IMeshLoader; - class IMeshManipulator; - class IMeshSceneNode; - class IMeshWriter; - class IMetaTriangleSelector; - class IParticleSystemSceneNode; - class ISceneCollisionManager; - class ISceneLoader; - class ISceneNode; - class ISceneNodeAnimator; - class ISceneNodeAnimatorCollisionResponse; - class ISceneNodeAnimatorFactory; - class ISceneNodeFactory; - class ISceneUserDataSerializer; - class ITerrainSceneNode; - class ITextSceneNode; - class ITriangleSelector; - class IVolumeLightSceneNode; - - namespace quake3 - { - struct IShader; - } // end namespace quake3 - - //! The Scene Manager manages scene nodes, mesh recources, cameras and all the other stuff. - /** All Scene nodes can be created only here. There is a always growing - list of scene nodes for lots of purposes: Indoor rendering scene nodes - like the Octree (addOctreeSceneNode()) or the terrain renderer - (addTerrainSceneNode()), different Camera scene nodes - (addCameraSceneNode(), addCameraSceneNodeMaya()), scene nodes for Light - (addLightSceneNode()), Billboards (addBillboardSceneNode()) and so on. - A scene node is a node in the hierachical scene graph. Every scene node - may have children, which are other scene nodes. Children move relative - the their parents position. If the parent of a node is not visible, its - children won't be visible, too. In this way, it is for example easily - possible to attach a light to a moving car or to place a walking - character on a moving platform on a moving ship. - The SceneManager is also able to load 3d mesh files of different - formats. Take a look at getMesh() to find out what formats are - supported. If these formats are not enough, use - addExternalMeshLoader() to add new formats to the engine. - */ - class ISceneManager : public virtual IReferenceCounted - { - public: - - //! Get pointer to an animateable mesh. Loads the file if not loaded already. - /** - * If you want to remove a loaded mesh from the cache again, use removeMesh(). - * Currently there are the following mesh formats supported: - * <TABLE border="1" cellpadding="2" cellspacing="0"> - * <TR> - * <TD>Format</TD> - * <TD>Description</TD> - * </TR> - * <TR> - * <TD>3D Studio (.3ds)</TD> - * <TD>Loader for 3D-Studio files which lots of 3D packages - * are able to export. Only static meshes are currently - * supported by this importer.</TD> - * </TR> - * <TR> - * <TD>3D World Studio (.smf)</TD> - * <TD>Loader for Leadwerks SMF mesh files, a simple mesh format - * containing static geometry for games. The proprietary .STF texture format - * is not supported yet. This loader was originally written by Joseph Ellis. </TD> - * </TR> - * <TR> - * <TD>Bliz Basic B3D (.b3d)</TD> - * <TD>Loader for blitz basic files, developed by Mark - * Sibly. This is the ideal animated mesh format for game - * characters as it is both rigidly defined and widely - * supported by modeling and animation software. - * As this format supports skeletal animations, an - * ISkinnedMesh will be returned by this importer.</TD> - * </TR> - * <TR> - * <TD>Cartography shop 4 (.csm)</TD> - * <TD>Cartography Shop is a modeling program for creating - * architecture and calculating lighting. Irrlicht can - * directly import .csm files thanks to the IrrCSM library - * created by Saurav Mohapatra which is now integrated - * directly in Irrlicht. If you are using this loader, - * please note that you'll have to set the path of the - * textures before loading .csm files. You can do this - * using - * SceneManager->getParameters()->setAttribute(scene::CSM_TEXTURE_PATH, - * "path/to/your/textures");</TD> - * </TR> - * <TR> - * <TD>COLLADA (.dae, .xml)</TD> - * <TD>COLLADA is an open Digital Asset Exchange Schema for - * the interactive 3D industry. There are exporters and - * importers for this format available for most of the - * big 3d packagesat http://collada.org. Irrlicht can - * import COLLADA files by using the - * ISceneManager::getMesh() method. COLLADA files need - * not contain only one single mesh but multiple meshes - * and a whole scene setup with lights, cameras and mesh - * instances, this loader can set up a scene as - * described by the COLLADA file instead of loading and - * returning one single mesh. By default, this loader - * behaves like the other loaders and does not create - * instances, but it can be switched into this mode by - * using - * SceneManager->getParameters()->setAttribute(COLLADA_CREATE_SCENE_INSTANCES, true); - * Created scene nodes will be named as the names of the - * nodes in the COLLADA file. The returned mesh is just - * a dummy object in this mode. Meshes included in the - * scene will be added into the scene manager with the - * following naming scheme: - * "path/to/file/file.dea#meshname". The loading of such - * meshes is logged. Currently, this loader is able to - - - * create meshes (made of only polygons), lights, and - * cameras. Materials and animations are currently not - * supported but this will change with future releases. - * </TD> - * </TR> - * <TR> - * <TD>Delgine DeleD (.dmf)</TD> - * <TD>DeleD (delgine.com) is a 3D editor and level-editor - * combined into one and is specifically designed for 3D - * game-development. With this loader, it is possible to - * directly load all geometry is as well as textures and - * lightmaps from .dmf files. To set texture and - * material paths, see scene::DMF_USE_MATERIALS_DIRS and - * scene::DMF_TEXTURE_PATH. It is also possible to flip - * the alpha texture by setting - * scene::DMF_FLIP_ALPHA_TEXTURES to true and to set the - * material transparent reference value by setting - * scene::DMF_ALPHA_CHANNEL_REF to a float between 0 and - * 1. The loader is based on Salvatore Russo's .dmf - * loader, I just changed some parts of it. Thanks to - * Salvatore for his work and for allowing me to use his - * code in Irrlicht and put it under Irrlicht's license. - * For newer and more enchanced versions of the loader, - * take a look at delgine.com. - * </TD> - * </TR> - * <TR> - * <TD>DirectX (.x)</TD> - * <TD>Platform independent importer (so not D3D-only) for - * .x files. Most 3D packages can export these natively - * and there are several tools for them available, e.g. - * the Maya exporter included in the DX SDK. - * .x files can include skeletal animations and Irrlicht - * is able to play and display them, users can manipulate - * the joints via the ISkinnedMesh interface. Currently, - * Irrlicht only supports uncompressed .x files.</TD> - * </TR> - * <TR> - * <TD>Half-Life model (.mdl)</TD> - * <TD>This loader opens Half-life 1 models, it was contributed - * by Fabio Concas and adapted by Thomas Alten.</TD> - * </TR> - * <TR> - * <TD>Irrlicht Mesh (.irrMesh)</TD> - * <TD>This is a static mesh format written in XML, native - * to Irrlicht and written by the irr mesh writer. - * This format is exported by the CopperCube engine's - * lightmapper.</TD> - * </TR> - * <TR> - * <TD>LightWave (.lwo)</TD> - * <TD>Native to NewTek's LightWave 3D, the LWO format is well - * known and supported by many exporters. This loader will - * import LWO2 models including lightmaps, bumpmaps and - * reflection textures.</TD> - * </TR> - * <TR> - * <TD>Maya (.obj)</TD> - * <TD>Most 3D software can create .obj files which contain - * static geometry without material data. The material - * files .mtl are also supported. This importer for - * Irrlicht can load them directly. </TD> - * </TR> - * <TR> - * <TD>Milkshape (.ms3d)</TD> - * <TD>.MS3D files contain models and sometimes skeletal - * animations from the Milkshape 3D modeling and animation - * software. Like the other skeletal mesh loaders, oints - * are exposed via the ISkinnedMesh animated mesh type.</TD> - * </TR> - * <TR> - * <TD>My3D (.my3d)</TD> - * <TD>.my3D is a flexible 3D file format. The My3DTools - * contains plug-ins to export .my3D files from several - * 3D packages. With this built-in importer, Irrlicht - * can read and display those files directly. This - * loader was written by Zhuck Dimitry who also created - * the whole My3DTools package. If you are using this - * loader, please note that you can set the path of the - * textures before loading .my3d files. You can do this - * using - * SceneManager->getParameters()->setAttribute(scene::MY3D_TEXTURE_PATH, - * "path/to/your/textures"); - * </TD> - * </TR> - * <TR> - * <TD>OCT (.oct)</TD> - * <TD>The oct file format contains 3D geometry and - * lightmaps and can be loaded directly by Irrlicht. OCT - * files<br> can be created by FSRad, Paul Nette's - * radiosity processor or exported from Blender using - * OCTTools which can be found in the exporters/OCTTools - * directory of the SDK. Thanks to Murphy McCauley for - * creating all this.</TD> - * </TR> - * <TR> - * <TD>OGRE Meshes (.mesh)</TD> - * <TD>Ogre .mesh files contain 3D data for the OGRE 3D - * engine. Irrlicht can read and display them directly - * with this importer. To define materials for the mesh, - * copy a .material file named like the corresponding - * .mesh file where the .mesh file is. (For example - * ogrehead.material for ogrehead.mesh). Thanks to - * Christian Stehno who wrote and contributed this - * loader.</TD> - * </TR> - * <TR> - * <TD>Pulsar LMTools (.lmts)</TD> - * <TD>LMTools is a set of tools (Windows & Linux) for - * creating lightmaps. Irrlicht can directly read .lmts - * files thanks to<br> the importer created by Jonas - * Petersen. If you are using this loader, please note - * that you can set the path of the textures before - * loading .lmts files. You can do this using - * SceneManager->getParameters()->setAttribute(scene::LMTS_TEXTURE_PATH, - * "path/to/your/textures"); - * Notes for<br> this version of the loader:<br> - * - It does not recognise/support user data in the - * *.lmts files.<br> - * - The TGAs generated by LMTools don't work in - * Irrlicht for some reason (the textures are upside - * down). Opening and resaving them in a graphics app - * will solve the problem.</TD> - * </TR> - * <TR> - * <TD>Quake 3 levels (.bsp)</TD> - * <TD>Quake 3 is a popular game by IDSoftware, and .pk3 - * files contain .bsp files and textures/lightmaps - * describing huge prelighted levels. Irrlicht can read - * .pk3 and .bsp files directly and thus render Quake 3 - * levels directly. Written by Nikolaus Gebhardt - * enhanced by Dean P. Macri with the curved surfaces - * feature. </TD> - * </TR> - * <TR> - * <TD>Quake 2 models (.md2)</TD> - * <TD>Quake 2 models are characters with morph target - * animation. Irrlicht can read, display and animate - * them directly with this importer. </TD> - * </TR> - * <TR> - * <TD>Quake 3 models (.md3)</TD> - * <TD>Quake 3 models are characters with morph target - * animation, they contain mount points for weapons and body - * parts and are typically made of several sections which are - * manually joined together.</TD> - * </TR> - * <TR> - * <TD>Stanford Triangle (.ply)</TD> - * <TD>Invented by Stanford University and known as the native - * format of the infamous "Stanford Bunny" model, this is a - * popular static mesh format used by 3D scanning hardware - * and software. This loader supports extremely large models - * in both ASCII and binary format, but only has rudimentary - * material support in the form of vertex colors and texture - * coordinates.</TD> - * </TR> - * <TR> - * <TD>Stereolithography (.stl)</TD> - * <TD>The STL format is used for rapid prototyping and - * computer-aided manufacturing, thus has no support for - * materials.</TD> - * </TR> - * </TABLE> - * - * To load and display a mesh quickly, just do this: - * \code - * SceneManager->addAnimatedMeshSceneNode( - * SceneManager->getMesh("yourmesh.3ds")); - * \endcode - * If you would like to implement and add your own file format loader to Irrlicht, - * see addExternalMeshLoader(). - * \param filename: Filename of the mesh to load. - * \return Null if failed, otherwise pointer to the mesh. - * This pointer should not be dropped. See IReferenceCounted::drop() for more information. - **/ - virtual IAnimatedMesh* getMesh(const io::path& filename) = 0; - - //! Get pointer to an animateable mesh. Loads the file if not loaded already. - /** Works just as getMesh(const char* filename). If you want to - remove a loaded mesh from the cache again, use removeMesh(). - \param file File handle of the mesh to load. - \return NULL if failed and pointer to the mesh if successful. - This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual IAnimatedMesh* getMesh(io::IReadFile* file) = 0; - - //! Get interface to the mesh cache which is shared beween all existing scene managers. - /** With this interface, it is possible to manually add new loaded - meshes (if ISceneManager::getMesh() is not sufficient), to remove them and to iterate - through already loaded meshes. */ - virtual IMeshCache* getMeshCache() = 0; - - //! Get the video driver. - /** \return Pointer to the video Driver. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual video::IVideoDriver* getVideoDriver() = 0; - - //! Get the active GUIEnvironment - /** \return Pointer to the GUIEnvironment - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual gui::IGUIEnvironment* getGUIEnvironment() = 0; - - //! Get the active FileSystem - /** \return Pointer to the FileSystem - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual io::IFileSystem* getFileSystem() = 0; - - //! adds Volume Lighting Scene Node. - /** Example Usage: - scene::IVolumeLightSceneNode * n = smgr->addVolumeLightSceneNode(0, -1, - 32, 32, //Subdivide U/V - video::SColor(0, 180, 180, 180), //foot color - video::SColor(0, 0, 0, 0) //tail color - ); - if (n) - { - n->setScale(core::vector3df(46.0f, 45.0f, 46.0f)); - n->getMaterial(0).setTexture(0, smgr->getVideoDriver()->getTexture("lightFalloff.png")); - } - \return Pointer to the volumeLight if successful, otherwise NULL. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual IVolumeLightSceneNode* addVolumeLightSceneNode(ISceneNode* parent=0, s32 id=-1, - const u32 subdivU = 32, const u32 subdivV = 32, - const video::SColor foot = video::SColor(51, 0, 230, 180), - const video::SColor tail = video::SColor(0, 0, 0, 0), - const core::vector3df& position = core::vector3df(0,0,0), - const core::vector3df& rotation = core::vector3df(0,0,0), - const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0; - - //! Adds a cube scene node - /** \param size: Size of the cube, uniformly in each dimension. - \param parent: Parent of the scene node. Can be 0 if no parent. - \param id: Id of the node. This id can be used to identify the scene node. - \param position: Position of the space relative to its parent - where the scene node will be placed. - \param rotation: Initital rotation of the scene node. - \param scale: Initial scale of the scene node. - \return Pointer to the created test scene node. This - pointer should not be dropped. See IReferenceCounted::drop() - for more information. */ - virtual IMeshSceneNode* addCubeSceneNode(f32 size=10.0f, ISceneNode* parent=0, s32 id=-1, - const core::vector3df& position = core::vector3df(0,0,0), - const core::vector3df& rotation = core::vector3df(0,0,0), - const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0; - - //! Adds a sphere scene node of the given radius and detail - /** \param radius: Radius of the sphere. - \param polyCount: The number of vertices in horizontal and - vertical direction. The total polyCount of the sphere is - polyCount*polyCount. This parameter must be less than 256 to - stay within the 16-bit limit of the indices of a meshbuffer. - \param parent: Parent of the scene node. Can be 0 if no parent. - \param id: Id of the node. This id can be used to identify the scene node. - \param position: Position of the space relative to its parent - where the scene node will be placed. - \param rotation: Initital rotation of the scene node. - \param scale: Initial scale of the scene node. - \return Pointer to the created test scene node. This - pointer should not be dropped. See IReferenceCounted::drop() - for more information. */ - virtual IMeshSceneNode* addSphereSceneNode(f32 radius=5.0f, s32 polyCount=16, - ISceneNode* parent=0, s32 id=-1, - const core::vector3df& position = core::vector3df(0,0,0), - const core::vector3df& rotation = core::vector3df(0,0,0), - const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0; - - //! Adds a scene node for rendering an animated mesh model. - /** \param mesh: Pointer to the loaded animated mesh to be displayed. - \param parent: Parent of the scene node. Can be NULL if no parent. - \param id: Id of the node. This id can be used to identify the scene node. - \param position: Position of the space relative to its parent where the - scene node will be placed. - \param rotation: Initital rotation of the scene node. - \param scale: Initial scale of the scene node. - \param alsoAddIfMeshPointerZero: Add the scene node even if a 0 pointer is passed. - \return Pointer to the created scene node. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual IAnimatedMeshSceneNode* addAnimatedMeshSceneNode(IAnimatedMesh* mesh, - ISceneNode* parent=0, s32 id=-1, - const core::vector3df& position = core::vector3df(0,0,0), - const core::vector3df& rotation = core::vector3df(0,0,0), - const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f), - bool alsoAddIfMeshPointerZero=false) = 0; - - //! Adds a scene node for rendering a static mesh. - /** \param mesh: Pointer to the loaded static mesh to be displayed. - \param parent: Parent of the scene node. Can be NULL if no parent. - \param id: Id of the node. This id can be used to identify the scene node. - \param position: Position of the space relative to its parent where the - scene node will be placed. - \param rotation: Initital rotation of the scene node. - \param scale: Initial scale of the scene node. - \param alsoAddIfMeshPointerZero: Add the scene node even if a 0 pointer is passed. - \return Pointer to the created scene node. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual IMeshSceneNode* addMeshSceneNode(IMesh* mesh, ISceneNode* parent=0, s32 id=-1, - const core::vector3df& position = core::vector3df(0,0,0), - const core::vector3df& rotation = core::vector3df(0,0,0), - const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f), - bool alsoAddIfMeshPointerZero=false) = 0; - - //! Adds a scene node for rendering a animated water surface mesh. - /** Looks really good when the Material type EMT_TRANSPARENT_REFLECTION - is used. - \param waveHeight: Height of the water waves. - \param waveSpeed: Speed of the water waves. - \param waveLength: Lenght of a water wave. - \param mesh: Pointer to the loaded static mesh to be displayed with water waves on it. - \param parent: Parent of the scene node. Can be NULL if no parent. - \param id: Id of the node. This id can be used to identify the scene node. - \param position: Position of the space relative to its parent where the - scene node will be placed. - \param rotation: Initital rotation of the scene node. - \param scale: Initial scale of the scene node. - \return Pointer to the created scene node. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual ISceneNode* addWaterSurfaceSceneNode(IMesh* mesh, - f32 waveHeight=2.0f, f32 waveSpeed=300.0f, f32 waveLength=10.0f, - ISceneNode* parent=0, s32 id=-1, - const core::vector3df& position = core::vector3df(0,0,0), - const core::vector3df& rotation = core::vector3df(0,0,0), - const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0; - - - //! Adds a scene node for rendering using a octree to the scene graph. - /** This a good method for rendering - scenes with lots of geometry. The Octree is built on the fly from the mesh. - \param mesh: The mesh containing all geometry from which the octree will be build. - If this animated mesh has more than one frames in it, the first frame is taken. - \param parent: Parent node of the octree node. - \param id: id of the node. This id can be used to identify the node. - \param minimalPolysPerNode: Specifies the minimal polygons contained a octree node. - If a node gets less polys than this value it will not be split into - smaller nodes. - \param alsoAddIfMeshPointerZero: Add the scene node even if a 0 pointer is passed. - \return Pointer to the Octree if successful, otherwise 0. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual IMeshSceneNode* addOctreeSceneNode(IAnimatedMesh* mesh, ISceneNode* parent=0, - s32 id=-1, s32 minimalPolysPerNode=512, bool alsoAddIfMeshPointerZero=false) = 0; - - //! Adds a scene node for rendering using a octree to the scene graph. - /** \deprecated Use addOctreeSceneNode instead. This method may be removed by Irrlicht 1.9. */ - _IRR_DEPRECATED_ IMeshSceneNode* addOctTreeSceneNode(IAnimatedMesh* mesh, ISceneNode* parent=0, - s32 id=-1, s32 minimalPolysPerNode=512, bool alsoAddIfMeshPointerZero=false) - { - return addOctreeSceneNode(mesh, parent, id, minimalPolysPerNode, alsoAddIfMeshPointerZero); - } - - //! Adds a scene node for rendering using a octree to the scene graph. - /** This a good method for rendering scenes with lots of - geometry. The Octree is built on the fly from the mesh, much - faster then a bsp tree. - \param mesh: The mesh containing all geometry from which the octree will be build. - \param parent: Parent node of the octree node. - \param id: id of the node. This id can be used to identify the node. - \param minimalPolysPerNode: Specifies the minimal polygons contained a octree node. - If a node gets less polys than this value it will not be split into - smaller nodes. - \param alsoAddIfMeshPointerZero: Add the scene node even if a 0 pointer is passed. - \return Pointer to the octree if successful, otherwise 0. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual IMeshSceneNode* addOctreeSceneNode(IMesh* mesh, ISceneNode* parent=0, - s32 id=-1, s32 minimalPolysPerNode=256, bool alsoAddIfMeshPointerZero=false) = 0; - - //! Adds a scene node for rendering using a octree to the scene graph. - /** \deprecated Use addOctreeSceneNode instead. This method may be removed by Irrlicht 1.9. */ - _IRR_DEPRECATED_ IMeshSceneNode* addOctTreeSceneNode(IMesh* mesh, ISceneNode* parent=0, - s32 id=-1, s32 minimalPolysPerNode=256, bool alsoAddIfMeshPointerZero=false) - { - return addOctreeSceneNode(mesh, parent, id, minimalPolysPerNode, alsoAddIfMeshPointerZero); - } - - //! Adds a camera scene node to the scene graph and sets it as active camera. - /** This camera does not react on user input like for example the one created with - addCameraSceneNodeFPS(). If you want to move or animate it, use animators or the - ISceneNode::setPosition(), ICameraSceneNode::setTarget() etc methods. - By default, a camera's look at position (set with setTarget()) and its scene node - rotation (set with setRotation()) are independent. If you want to be able to - control the direction that the camera looks by using setRotation() then call - ICameraSceneNode::bindTargetAndRotation(true) on it. - \param position: Position of the space relative to its parent where the camera will be placed. - \param lookat: Position where the camera will look at. Also known as target. - \param parent: Parent scene node of the camera. Can be null. If the parent moves, - the camera will move too. - \param id: id of the camera. This id can be used to identify the camera. - \param makeActive Flag whether this camera should become the active one. - Make sure you always have one active camera. - \return Pointer to interface to camera if successful, otherwise 0. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual ICameraSceneNode* addCameraSceneNode(ISceneNode* parent = 0, - const core::vector3df& position = core::vector3df(0,0,0), - const core::vector3df& lookat = core::vector3df(0,0,100), - s32 id=-1, bool makeActive=true) = 0; - - //! Adds a maya style user controlled camera scene node to the scene graph. - /** This is a standard camera with an animator that provides mouse control similar - to camera in the 3D Software Maya by Alias Wavefront. - The camera does not react on setPosition anymore after applying this animator. Instead - use setTarget, to fix the target the camera the camera hovers around. And setDistance - to set the current distance from that target, i.e. the radius of the orbit the camera - hovers on. - \param parent: Parent scene node of the camera. Can be null. - \param rotateSpeed: Rotation speed of the camera. - \param zoomSpeed: Zoom speed of the camera. - \param translationSpeed: TranslationSpeed of the camera. - \param id: id of the camera. This id can be used to identify the camera. - \param distance Initial distance of the camera from the object - \param makeActive Flag whether this camera should become the active one. - Make sure you always have one active camera. - \return Returns a pointer to the interface of the camera if successful, otherwise 0. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual ICameraSceneNode* addCameraSceneNodeMaya(ISceneNode* parent=0, - f32 rotateSpeed=-1500.f, f32 zoomSpeed=200.f, - f32 translationSpeed=1500.f, s32 id=-1, f32 distance=70.f, - bool makeActive=true) =0; - - //! Adds a camera scene node with an animator which provides mouse and keyboard control appropriate for first person shooters (FPS). - /** This FPS camera is intended to provide a demonstration of a - camera that behaves like a typical First Person Shooter. It is - useful for simple demos and prototyping but is not intended to - provide a full solution for a production quality game. It binds - the camera scene node rotation to the look-at target; @see - ICameraSceneNode::bindTargetAndRotation(). With this camera, - you look with the mouse, and move with cursor keys. If you want - to change the key layout, you can specify your own keymap. For - example to make the camera be controlled by the cursor keys AND - the keys W,A,S, and D, do something like this: - \code - SKeyMap keyMap[8]; - keyMap[0].Action = EKA_MOVE_FORWARD; - keyMap[0].KeyCode = KEY_UP; - keyMap[1].Action = EKA_MOVE_FORWARD; - keyMap[1].KeyCode = KEY_KEY_W; - - keyMap[2].Action = EKA_MOVE_BACKWARD; - keyMap[2].KeyCode = KEY_DOWN; - keyMap[3].Action = EKA_MOVE_BACKWARD; - keyMap[3].KeyCode = KEY_KEY_S; - - keyMap[4].Action = EKA_STRAFE_LEFT; - keyMap[4].KeyCode = KEY_LEFT; - keyMap[5].Action = EKA_STRAFE_LEFT; - keyMap[5].KeyCode = KEY_KEY_A; - - keyMap[6].Action = EKA_STRAFE_RIGHT; - keyMap[6].KeyCode = KEY_RIGHT; - keyMap[7].Action = EKA_STRAFE_RIGHT; - keyMap[7].KeyCode = KEY_KEY_D; - - camera = sceneManager->addCameraSceneNodeFPS(0, 100, 500, -1, keyMap, 8); - \endcode - \param parent: Parent scene node of the camera. Can be null. - \param rotateSpeed: Speed in degress with which the camera is - rotated. This can be done only with the mouse. - \param moveSpeed: Speed in units per millisecond with which - the camera is moved. Movement is done with the cursor keys. - \param id: id of the camera. This id can be used to identify - the camera. - \param keyMapArray: Optional pointer to an array of a keymap, - specifying what keys should be used to move the camera. If this - is null, the default keymap is used. You can define actions - more then one time in the array, to bind multiple keys to the - same action. - \param keyMapSize: Amount of items in the keymap array. - \param noVerticalMovement: Setting this to true makes the - camera only move within a horizontal plane, and disables - vertical movement as known from most ego shooters. Default is - 'false', with which it is possible to fly around in space, if - no gravity is there. - \param jumpSpeed: Speed with which the camera is moved when - jumping. - \param invertMouse: Setting this to true makes the camera look - up when the mouse is moved down and down when the mouse is - moved up, the default is 'false' which means it will follow the - movement of the mouse cursor. - \param makeActive Flag whether this camera should become the active one. - Make sure you always have one active camera. - \return Pointer to the interface of the camera if successful, - otherwise 0. This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual ICameraSceneNode* addCameraSceneNodeFPS(ISceneNode* parent = 0, - f32 rotateSpeed = 100.0f, f32 moveSpeed = 0.5f, s32 id=-1, - SKeyMap* keyMapArray=0, s32 keyMapSize=0, bool noVerticalMovement=false, - f32 jumpSpeed = 0.f, bool invertMouse=false, - bool makeActive=true) = 0; - - //! Adds a dynamic light scene node to the scene graph. - /** The light will cast dynamic light on all - other scene nodes in the scene, which have the material flag video::MTF_LIGHTING - turned on. (This is the default setting in most scene nodes). - \param parent: Parent scene node of the light. Can be null. If the parent moves, - the light will move too. - \param position: Position of the space relative to its parent where the light will be placed. - \param color: Diffuse color of the light. Ambient or Specular colors can be set manually with - the ILightSceneNode::getLightData() method. - \param radius: Radius of the light. - \param id: id of the node. This id can be used to identify the node. - \return Pointer to the interface of the light if successful, otherwise NULL. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual ILightSceneNode* addLightSceneNode(ISceneNode* parent = 0, - const core::vector3df& position = core::vector3df(0,0,0), - video::SColorf color = video::SColorf(1.0f, 1.0f, 1.0f), - f32 radius=100.0f, s32 id=-1) = 0; - - //! Adds a billboard scene node to the scene graph. - /** A billboard is like a 3d sprite: A 2d element, - which always looks to the camera. It is usually used for things - like explosions, fire, lensflares and things like that. - \param parent Parent scene node of the billboard. Can be null. - If the parent moves, the billboard will move too. - \param size Size of the billboard. This size is 2 dimensional - because a billboard only has width and height. - \param position Position of the space relative to its parent - where the billboard will be placed. - \param id An id of the node. This id can be used to identify - the node. - \param colorTop The color of the vertices at the top of the - billboard (default: white). - \param colorBottom The color of the vertices at the bottom of - the billboard (default: white). - \return Pointer to the billboard if successful, otherwise NULL. - This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual IBillboardSceneNode* addBillboardSceneNode(ISceneNode* parent = 0, - const core::dimension2d<f32>& size = core::dimension2d<f32>(10.0f, 10.0f), - const core::vector3df& position = core::vector3df(0,0,0), s32 id=-1, - video::SColor colorTop = 0xFFFFFFFF, video::SColor colorBottom = 0xFFFFFFFF) = 0; - - //! Adds a skybox scene node to the scene graph. - /** A skybox is a big cube with 6 textures on it and - is drawn around the camera position. - \param top: Texture for the top plane of the box. - \param bottom: Texture for the bottom plane of the box. - \param left: Texture for the left plane of the box. - \param right: Texture for the right plane of the box. - \param front: Texture for the front plane of the box. - \param back: Texture for the back plane of the box. - \param parent: Parent scene node of the skybox. A skybox usually has no parent, - so this should be null. Note: If a parent is set to the skybox, the box will not - change how it is drawn. - \param id: An id of the node. This id can be used to identify the node. - \return Pointer to the sky box if successful, otherwise NULL. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual ISceneNode* addSkyBoxSceneNode(video::ITexture* top, video::ITexture* bottom, - video::ITexture* left, video::ITexture* right, video::ITexture* front, - video::ITexture* back, ISceneNode* parent = 0, s32 id=-1) = 0; - - //! Adds a skydome scene node to the scene graph. - /** A skydome is a large (half-) sphere with a panoramic texture - on the inside and is drawn around the camera position. - \param texture: Texture for the dome. - \param horiRes: Number of vertices of a horizontal layer of the sphere. - \param vertRes: Number of vertices of a vertical layer of the sphere. - \param texturePercentage: How much of the height of the - texture is used. Should be between 0 and 1. - \param spherePercentage: How much of the sphere is drawn. - Value should be between 0 and 2, where 1 is an exact - half-sphere and 2 is a full sphere. - \param radius The Radius of the sphere - \param parent: Parent scene node of the dome. A dome usually has no parent, - so this should be null. Note: If a parent is set, the dome will not - change how it is drawn. - \param id: An id of the node. This id can be used to identify the node. - \return Pointer to the sky dome if successful, otherwise NULL. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual ISceneNode* addSkyDomeSceneNode(video::ITexture* texture, - u32 horiRes=16, u32 vertRes=8, - f32 texturePercentage=0.9, f32 spherePercentage=2.0,f32 radius = 1000.f, - ISceneNode* parent=0, s32 id=-1) = 0; - - //! Adds a particle system scene node to the scene graph. - /** \param withDefaultEmitter: Creates a default working point emitter - which emitts some particles. Set this to true to see a particle system - in action. If set to false, you'll have to set the emitter you want by - calling IParticleSystemSceneNode::setEmitter(). - \param parent: Parent of the scene node. Can be NULL if no parent. - \param id: Id of the node. This id can be used to identify the scene node. - \param position: Position of the space relative to its parent where the - scene node will be placed. - \param rotation: Initital rotation of the scene node. - \param scale: Initial scale of the scene node. - \return Pointer to the created scene node. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual IParticleSystemSceneNode* addParticleSystemSceneNode( - bool withDefaultEmitter=true, ISceneNode* parent=0, s32 id=-1, - const core::vector3df& position = core::vector3df(0,0,0), - const core::vector3df& rotation = core::vector3df(0,0,0), - const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0; - - //! Adds a terrain scene node to the scene graph. - /** This node implements is a simple terrain renderer which uses - a technique known as geo mip mapping - for reducing the detail of triangle blocks which are far away. - The code for the TerrainSceneNode is based on the terrain - renderer by Soconne and the GeoMipMapSceneNode developed by - Spintz. They made their code available for Irrlicht and allowed - it to be distributed under this licence. I only modified some - parts. A lot of thanks go to them. - - This scene node is capable of loading terrains and updating - the indices at runtime to enable viewing very large terrains - very quickly. It uses a CLOD (Continuous Level of Detail) - algorithm which updates the indices for each patch based on - a LOD (Level of Detail) which is determined based on a patch's - distance from the camera. - - The patch size of the terrain must always be a size of 2^N+1, - i.e. 8+1(9), 16+1(17), etc. - The MaxLOD available is directly dependent on the patch size - of the terrain. LOD 0 contains all of the indices to draw all - the triangles at the max detail for a patch. As each LOD goes - up by 1 the step taken, in generating indices increases by - -2^LOD, so for LOD 1, the step taken is 2, for LOD 2, the step - taken is 4, LOD 3 - 8, etc. The step can be no larger than - the size of the patch, so having a LOD of 8, with a patch size - of 17, is asking the algoritm to generate indices every 2^8 ( - 256 ) vertices, which is not possible with a patch size of 17. - The maximum LOD for a patch size of 17 is 2^4 ( 16 ). So, - with a MaxLOD of 5, you'll have LOD 0 ( full detail ), LOD 1 ( - every 2 vertices ), LOD 2 ( every 4 vertices ), LOD 3 ( every - 8 vertices ) and LOD 4 ( every 16 vertices ). - \param heightMapFileName: The name of the file on disk, to read vertex data from. This should - be a gray scale bitmap. - \param parent: Parent of the scene node. Can be 0 if no parent. - \param id: Id of the node. This id can be used to identify the scene node. - \param position: The absolute position of this node. - \param rotation: The absolute rotation of this node. ( NOT YET IMPLEMENTED ) - \param scale: The scale factor for the terrain. If you're - using a heightmap of size 129x129 and would like your terrain - to be 12900x12900 in game units, then use a scale factor of ( - core::vector ( 100.0f, 100.0f, 100.0f ). If you use a Y - scaling factor of 0.0f, then your terrain will be flat. - \param vertexColor: The default color of all the vertices. If no texture is associated - with the scene node, then all vertices will be this color. Defaults to white. - \param maxLOD: The maximum LOD (level of detail) for the node. Only change if you - know what you are doing, this might lead to strange behavior. - \param patchSize: patch size of the terrain. Only change if you - know what you are doing, this might lead to strange behavior. - \param smoothFactor: The number of times the vertices are smoothed. - \param addAlsoIfHeightmapEmpty: Add terrain node even with empty heightmap. - \return Pointer to the created scene node. Can be null - if the terrain could not be created, for example because the - heightmap could not be loaded. The returned pointer should - not be dropped. See IReferenceCounted::drop() for more - information. */ - virtual ITerrainSceneNode* addTerrainSceneNode( - const io::path& heightMapFileName, - ISceneNode* parent=0, s32 id=-1, - const core::vector3df& position = core::vector3df(0.0f,0.0f,0.0f), - const core::vector3df& rotation = core::vector3df(0.0f,0.0f,0.0f), - const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f), - video::SColor vertexColor = video::SColor(255,255,255,255), - s32 maxLOD=5, E_TERRAIN_PATCH_SIZE patchSize=ETPS_17, s32 smoothFactor=0, - bool addAlsoIfHeightmapEmpty = false) = 0; - - //! Adds a terrain scene node to the scene graph. - /** Just like the other addTerrainSceneNode() method, but takes an IReadFile - pointer as parameter for the heightmap. For more informations take a look - at the other function. - \param heightMapFile: The file handle to read vertex data from. This should - be a gray scale bitmap. - \param parent: Parent of the scene node. Can be 0 if no parent. - \param id: Id of the node. This id can be used to identify the scene node. - \param position: The absolute position of this node. - \param rotation: The absolute rotation of this node. ( NOT YET IMPLEMENTED ) - \param scale: The scale factor for the terrain. If you're - using a heightmap of size 129x129 and would like your terrain - to be 12900x12900 in game units, then use a scale factor of ( - core::vector ( 100.0f, 100.0f, 100.0f ). If you use a Y - scaling factor of 0.0f, then your terrain will be flat. - \param vertexColor: The default color of all the vertices. If no texture is associated - with the scene node, then all vertices will be this color. Defaults to white. - \param maxLOD: The maximum LOD (level of detail) for the node. Only change if you - know what you are doing, this might lead to strange behavior. - \param patchSize: patch size of the terrain. Only change if you - know what you are doing, this might lead to strange behavior. - \param smoothFactor: The number of times the vertices are smoothed. - \param addAlsoIfHeightmapEmpty: Add terrain node even with empty heightmap. - \return Pointer to the created scene node. Can be null - if the terrain could not be created, for example because the - heightmap could not be loaded. The returned pointer should - not be dropped. See IReferenceCounted::drop() for more - information. */ - virtual ITerrainSceneNode* addTerrainSceneNode( - io::IReadFile* heightMapFile, - ISceneNode* parent=0, s32 id=-1, - const core::vector3df& position = core::vector3df(0.0f,0.0f,0.0f), - const core::vector3df& rotation = core::vector3df(0.0f,0.0f,0.0f), - const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f), - video::SColor vertexColor = video::SColor(255,255,255,255), - s32 maxLOD=5, E_TERRAIN_PATCH_SIZE patchSize=ETPS_17, s32 smoothFactor=0, - bool addAlsoIfHeightmapEmpty = false) = 0; - - //! Adds a quake3 scene node to the scene graph. - /** A Quake3 Scene renders multiple meshes for a specific HighLanguage Shader (Quake3 Style ) - \return Pointer to the quake3 scene node if successful, otherwise NULL. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual IMeshSceneNode* addQuake3SceneNode(const IMeshBuffer* meshBuffer, const quake3::IShader * shader, - ISceneNode* parent=0, s32 id=-1 - ) = 0; - - - //! Adds an empty scene node to the scene graph. - /** Can be used for doing advanced transformations - or structuring the scene graph. - \return Pointer to the created scene node. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual ISceneNode* addEmptySceneNode(ISceneNode* parent=0, s32 id=-1) = 0; - - //! Adds a dummy transformation scene node to the scene graph. - /** This scene node does not render itself, and does not respond to set/getPosition, - set/getRotation and set/getScale. Its just a simple scene node that takes a - matrix as relative transformation, making it possible to insert any transformation - anywhere into the scene graph. - \return Pointer to the created scene node. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual IDummyTransformationSceneNode* addDummyTransformationSceneNode( - ISceneNode* parent=0, s32 id=-1) = 0; - - //! Adds a text scene node, which is able to display 2d text at a position in three dimensional space - virtual ITextSceneNode* addTextSceneNode(gui::IGUIFont* font, const wchar_t* text, - video::SColor color=video::SColor(100,255,255,255), - ISceneNode* parent = 0, const core::vector3df& position = core::vector3df(0,0,0), - s32 id=-1) = 0; - - //! Adds a text scene node, which uses billboards. The node, and the text on it, will scale with distance. - /** - \param font The font to use on the billboard. Pass 0 to use the GUI environment's default font. - \param text The text to display on the billboard. - \param parent The billboard's parent. Pass 0 to use the root scene node. - \param size The billboard's width and height. - \param position The billboards position relative to its parent. - \param id: An id of the node. This id can be used to identify the node. - \param colorTop: The color of the vertices at the top of the billboard (default: white). - \param colorBottom: The color of the vertices at the bottom of the billboard (default: white). - \return Pointer to the billboard if successful, otherwise NULL. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual IBillboardTextSceneNode* addBillboardTextSceneNode( gui::IGUIFont* font, const wchar_t* text, - ISceneNode* parent = 0, - const core::dimension2d<f32>& size = core::dimension2d<f32>(10.0f, 10.0f), - const core::vector3df& position = core::vector3df(0,0,0), s32 id=-1, - video::SColor colorTop = 0xFFFFFFFF, video::SColor colorBottom = 0xFFFFFFFF) = 0; - - //! Adds a Hill Plane mesh to the mesh pool. - /** The mesh is generated on the fly - and looks like a plane with some hills on it. It is uses mostly for quick - tests of the engine only. You can specify how many hills there should be - on the plane and how high they should be. Also you must specify a name for - the mesh, because the mesh is added to the mesh pool, and can be retrieved - again using ISceneManager::getMesh() with the name as parameter. - \param name: The name of this mesh which must be specified in order - to be able to retrieve the mesh later with ISceneManager::getMesh(). - \param tileSize: Size of a tile of the mesh. (10.0f, 10.0f) would be a - good value to start, for example. - \param tileCount: Specifies how much tiles there will be. If you specifiy - for example that a tile has the size (10.0f, 10.0f) and the tileCount is - (10,10), than you get a field of 100 tiles which has the dimension 100.0fx100.0f. - \param material: Material of the hill mesh. - \param hillHeight: Height of the hills. If you specify a negative value - you will get holes instead of hills. If the height is 0, no hills will be - created. - \param countHills: Amount of hills on the plane. There will be countHills.X - hills along the X axis and countHills.Y along the Y axis. So in total there - will be countHills.X * countHills.Y hills. - \param textureRepeatCount: Defines how often the texture will be repeated in - x and y direction. - return Null if the creation failed. The reason could be that you - specified some invalid parameters or that a mesh with that name already - exists. If successful, a pointer to the mesh is returned. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual IAnimatedMesh* addHillPlaneMesh(const io::path& name, - const core::dimension2d<f32>& tileSize, const core::dimension2d<u32>& tileCount, - video::SMaterial* material = 0, f32 hillHeight = 0.0f, - const core::dimension2d<f32>& countHills = core::dimension2d<f32>(0.0f, 0.0f), - const core::dimension2d<f32>& textureRepeatCount = core::dimension2d<f32>(1.0f, 1.0f)) = 0; - - //! Adds a static terrain mesh to the mesh pool. - /** The mesh is generated on the fly - from a texture file and a height map file. Both files may be huge - (8000x8000 pixels would be no problem) because the generator splits the - files into smaller textures if necessary. - You must specify a name for the mesh, because the mesh is added to the mesh pool, - and can be retrieved again using ISceneManager::getMesh() with the name as parameter. - \param meshname: The name of this mesh which must be specified in order - to be able to retrieve the mesh later with ISceneManager::getMesh(). - \param texture: Texture for the terrain. Please note that this is not a - hardware texture as usual (ITexture), but an IImage software texture. - You can load this texture with IVideoDriver::createImageFromFile(). - \param heightmap: A grayscaled heightmap image. Like the texture, - it can be created with IVideoDriver::createImageFromFile(). The amount - of triangles created depends on the size of this texture, so use a small - heightmap to increase rendering speed. - \param stretchSize: Parameter defining how big a is pixel on the heightmap. - \param maxHeight: Defines how high a white pixel on the heighmap is. - \param defaultVertexBlockSize: Defines the initial dimension between vertices. - \return Null if the creation failed. The reason could be that you - specified some invalid parameters, that a mesh with that name already - exists, or that a texture could not be found. If successful, a pointer to the mesh is returned. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual IAnimatedMesh* addTerrainMesh(const io::path& meshname, - video::IImage* texture, video::IImage* heightmap, - const core::dimension2d<f32>& stretchSize = core::dimension2d<f32>(10.0f,10.0f), - f32 maxHeight=200.0f, - const core::dimension2d<u32>& defaultVertexBlockSize = core::dimension2d<u32>(64,64)) = 0; - - //! add a static arrow mesh to the meshpool - /** \param name Name of the mesh - \param vtxColorCylinder color of the cylinder - \param vtxColorCone color of the cone - \param tesselationCylinder Number of quads the cylinder side consists of - \param tesselationCone Number of triangles the cone's roof consits of - \param height Total height of the arrow - \param cylinderHeight Total height of the cylinder, should be lesser than total height - \param widthCylinder Diameter of the cylinder - \param widthCone Diameter of the cone's base, should be not smaller than the cylinder's diameter - \return Pointer to the arrow mesh if successful, otherwise 0. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual IAnimatedMesh* addArrowMesh(const io::path& name, - video::SColor vtxColorCylinder=0xFFFFFFFF, - video::SColor vtxColorCone=0xFFFFFFFF, - u32 tesselationCylinder=4, u32 tesselationCone=8, - f32 height=1.f, f32 cylinderHeight=0.6f, - f32 widthCylinder=0.05f, f32 widthCone=0.3f) = 0; - - //! add a static sphere mesh to the meshpool - /** \param name Name of the mesh - \param radius Radius of the sphere - \param polyCountX Number of quads used for the horizontal tiling - \param polyCountY Number of quads used for the vertical tiling - \return Pointer to the sphere mesh if successful, otherwise 0. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual IAnimatedMesh* addSphereMesh(const io::path& name, - f32 radius=5.f, u32 polyCountX = 16, - u32 polyCountY = 16) = 0; - - //! Add a volume light mesh to the meshpool - /** \param name Name of the mesh - \param SubdivideU Horizontal subdivision count - \param SubdivideV Vertical subdivision count - \param FootColor Color of the bottom of the light - \param TailColor Color of the top of the light - \return Pointer to the volume light mesh if successful, otherwise 0. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. - */ - virtual IAnimatedMesh* addVolumeLightMesh(const io::path& name, - const u32 SubdivideU = 32, const u32 SubdivideV = 32, - const video::SColor FootColor = video::SColor(51, 0, 230, 180), - const video::SColor TailColor = video::SColor(0, 0, 0, 0)) = 0; - - //! Gets the root scene node. - /** This is the scene node which is parent - of all scene nodes. The root scene node is a special scene node which - only exists to manage all scene nodes. It will not be rendered and cannot - be removed from the scene. - \return Pointer to the root scene node. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual ISceneNode* getRootSceneNode() = 0; - - //! Get the first scene node with the specified id. - /** \param id: The id to search for - \param start: Scene node to start from. All children of this scene - node are searched. If null is specified, the root scene node is - taken. - \return Pointer to the first scene node with this id, - and null if no scene node could be found. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual ISceneNode* getSceneNodeFromId(s32 id, ISceneNode* start=0) = 0; - - //! Get the first scene node with the specified name. - /** \param name: The name to search for - \param start: Scene node to start from. All children of this scene - node are searched. If null is specified, the root scene node is - taken. - \return Pointer to the first scene node with this id, - and null if no scene node could be found. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual ISceneNode* getSceneNodeFromName(const c8* name, ISceneNode* start=0) = 0; - - //! Get the first scene node with the specified type. - /** \param type: The type to search for - \param start: Scene node to start from. All children of this scene - node are searched. If null is specified, the root scene node is - taken. - \return Pointer to the first scene node with this type, - and null if no scene node could be found. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual ISceneNode* getSceneNodeFromType(scene::ESCENE_NODE_TYPE type, ISceneNode* start=0) = 0; - - //! Get scene nodes by type. - /** \param type: Type of scene node to find (ESNT_ANY will return all child nodes). - \param outNodes: array to be filled with results. - \param start: Scene node to start from. All children of this scene - node are searched. If null is specified, the root scene node is - taken. */ - virtual void getSceneNodesFromType(ESCENE_NODE_TYPE type, - core::array<scene::ISceneNode*>& outNodes, - ISceneNode* start=0) = 0; - - //! Get the current active camera. - /** \return The active camera is returned. Note that this can - be NULL, if there was no camera created yet. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual ICameraSceneNode* getActiveCamera() const =0; - - //! Sets the currently active camera. - /** The previous active camera will be deactivated. - \param camera: The new camera which should be active. */ - virtual void setActiveCamera(ICameraSceneNode* camera) = 0; - - //! Sets the color of stencil buffers shadows drawn by the scene manager. - virtual void setShadowColor(video::SColor color = video::SColor(150,0,0,0)) = 0; - - //! Get the current color of shadows. - virtual video::SColor getShadowColor() const = 0; - - //! Registers a node for rendering it at a specific time. - /** This method should only be used by SceneNodes when they get a - ISceneNode::OnRegisterSceneNode() call. - \param node: Node to register for drawing. Usually scene nodes would set 'this' - as parameter here because they want to be drawn. - \param pass: Specifies when the node wants to be drawn in relation to the other nodes. - For example, if the node is a shadow, it usually wants to be drawn after all other nodes - and will use ESNRP_SHADOW for this. See scene::E_SCENE_NODE_RENDER_PASS for details. - \return scene will be rendered ( passed culling ) */ - virtual u32 registerNodeForRendering(ISceneNode* node, - E_SCENE_NODE_RENDER_PASS pass = ESNRP_AUTOMATIC) = 0; - - //! Draws all the scene nodes. - /** This can only be invoked between - IVideoDriver::beginScene() and IVideoDriver::endScene(). Please note that - the scene is not only drawn when calling this, but also animated - by existing scene node animators, culling of scene nodes is done, etc. */ - virtual void drawAll() = 0; - - //! Creates a rotation animator, which rotates the attached scene node around itself. - /** \param rotationSpeed Specifies the speed of the animation in degree per 10 milliseconds. - \return The animator. Attach it to a scene node with ISceneNode::addAnimator() - and the animator will animate it. - If you no longer need the animator, you should call ISceneNodeAnimator::drop(). - See IReferenceCounted::drop() for more information. */ - virtual ISceneNodeAnimator* createRotationAnimator(const core::vector3df& rotationSpeed) = 0; - - //! Creates a fly circle animator, which lets the attached scene node fly around a center. - /** \param center: Center of the circle. - \param radius: Radius of the circle. - \param speed: The orbital speed, in radians per millisecond. - \param direction: Specifies the upvector used for alignment of the mesh. - \param startPosition: The position on the circle where the animator will - begin. Value is in multiples of a circle, i.e. 0.5 is half way around. (phase) - \param radiusEllipsoid: if radiusEllipsoid != 0 then radius2 froms a ellipsoid - begin. Value is in multiples of a circle, i.e. 0.5 is half way around. (phase) - \return The animator. Attach it to a scene node with ISceneNode::addAnimator() - and the animator will animate it. - If you no longer need the animator, you should call ISceneNodeAnimator::drop(). - See IReferenceCounted::drop() for more information. */ - virtual ISceneNodeAnimator* createFlyCircleAnimator( - const core::vector3df& center=core::vector3df(0.f,0.f,0.f), - f32 radius=100.f, f32 speed=0.001f, - const core::vector3df& direction=core::vector3df(0.f, 1.f, 0.f), - f32 startPosition = 0.f, - f32 radiusEllipsoid = 0.f) = 0; - - //! Creates a fly straight animator, which lets the attached scene node fly or move along a line between two points. - /** \param startPoint: Start point of the line. - \param endPoint: End point of the line. - \param timeForWay: Time in milli seconds how long the node should need to - move from the start point to the end point. - \param loop: If set to false, the node stops when the end point is reached. - If loop is true, the node begins again at the start. - \param pingpong Flag to set whether the animator should fly - back from end to start again. - \return The animator. Attach it to a scene node with ISceneNode::addAnimator() - and the animator will animate it. - If you no longer need the animator, you should call ISceneNodeAnimator::drop(). - See IReferenceCounted::drop() for more information. */ - virtual ISceneNodeAnimator* createFlyStraightAnimator(const core::vector3df& startPoint, - const core::vector3df& endPoint, u32 timeForWay, bool loop=false, bool pingpong = false) = 0; - - //! Creates a texture animator, which switches the textures of the target scene node based on a list of textures. - /** \param textures: List of textures to use. - \param timePerFrame: Time in milliseconds, how long any texture in the list - should be visible. - \param loop: If set to to false, the last texture remains set, and the animation - stops. If set to true, the animation restarts with the first texture. - \return The animator. Attach it to a scene node with ISceneNode::addAnimator() - and the animator will animate it. - If you no longer need the animator, you should call ISceneNodeAnimator::drop(). - See IReferenceCounted::drop() for more information. */ - virtual ISceneNodeAnimator* createTextureAnimator(const core::array<video::ITexture*>& textures, - s32 timePerFrame, bool loop=true) = 0; - - //! Creates a scene node animator, which deletes the scene node after some time automatically. - /** \param timeMs: Time in milliseconds, after when the node will be deleted. - \return The animator. Attach it to a scene node with ISceneNode::addAnimator() - and the animator will animate it. - If you no longer need the animator, you should call ISceneNodeAnimator::drop(). - See IReferenceCounted::drop() for more information. */ - virtual ISceneNodeAnimator* createDeleteAnimator(u32 timeMs) = 0; - - //! Creates a special scene node animator for doing automatic collision detection and response. - /** See ISceneNodeAnimatorCollisionResponse for details. - \param world: Triangle selector holding all triangles of the world with which - the scene node may collide. You can create a triangle selector with - ISceneManager::createTriangleSelector(); - \param sceneNode: SceneNode which should be manipulated. After you added this animator - to the scene node, the scene node will not be able to move through walls and is - affected by gravity. If you need to teleport the scene node to a new position without - it being effected by the collision geometry, then call sceneNode->setPosition(); then - animator->setTargetNode(sceneNode); - \param ellipsoidRadius: Radius of the ellipsoid with which collision detection and - response is done. If you have got a scene node, and you are unsure about - how big the radius should be, you could use the following code to determine - it: - \code - const core::aabbox3d<f32>& box = yourSceneNode->getBoundingBox(); - core::vector3df radius = box.MaxEdge - box.getCenter(); - \endcode - \param gravityPerSecond: Sets the gravity of the environment, as an acceleration in - units per second per second. If your units are equivalent to metres, then - core::vector3df(0,-10.0f,0) would give an approximately realistic gravity. - You can disable gravity by setting it to core::vector3df(0,0,0). - \param ellipsoidTranslation: By default, the ellipsoid for collision detection is created around - the center of the scene node, which means that the ellipsoid surrounds - it completely. If this is not what you want, you may specify a translation - for the ellipsoid. - \param slidingValue: DOCUMENTATION NEEDED. - \return The animator. Attach it to a scene node with ISceneNode::addAnimator() - and the animator will cause it to do collision detection and response. - If you no longer need the animator, you should call ISceneNodeAnimator::drop(). - See IReferenceCounted::drop() for more information. */ - virtual ISceneNodeAnimatorCollisionResponse* createCollisionResponseAnimator( - ITriangleSelector* world, ISceneNode* sceneNode, - const core::vector3df& ellipsoidRadius = core::vector3df(30,60,30), - const core::vector3df& gravityPerSecond = core::vector3df(0,-10.0f,0), - const core::vector3df& ellipsoidTranslation = core::vector3df(0,0,0), - f32 slidingValue = 0.0005f) = 0; - - //! Creates a follow spline animator. - /** The animator modifies the position of - the attached scene node to make it follow a hermite spline. - It uses a subset of hermite splines: either cardinal splines - (tightness != 0.5) or catmull-rom-splines (tightness == 0.5). - The animator moves from one control point to the next in - 1/speed seconds. This code was sent in by Matthias Gall. - If you no longer need the animator, you should call ISceneNodeAnimator::drop(). - See IReferenceCounted::drop() for more information. */ - virtual ISceneNodeAnimator* createFollowSplineAnimator(s32 startTime, - const core::array< core::vector3df >& points, - f32 speed = 1.0f, f32 tightness = 0.5f, bool loop=true, bool pingpong=false) = 0; - - //! Creates a simple ITriangleSelector, based on a mesh. - /** Triangle selectors - can be used for doing collision detection. Don't use this selector - for a huge amount of triangles like in Quake3 maps. - Instead, use for example ISceneManager::createOctreeTriangleSelector(). - Please note that the created triangle selector is not automaticly attached - to the scene node. You will have to call ISceneNode::setTriangleSelector() - for this. To create and attach a triangle selector is done like this: - \code - ITriangleSelector* s = sceneManager->createTriangleSelector(yourMesh, - yourSceneNode); - yourSceneNode->setTriangleSelector(s); - s->drop(); - \endcode - \param mesh: Mesh of which the triangles are taken. - \param node: Scene node of which visibility and transformation is used. - \return The selector, or null if not successful. - If you no longer need the selector, you should call ITriangleSelector::drop(). - See IReferenceCounted::drop() for more information. */ - virtual ITriangleSelector* createTriangleSelector(IMesh* mesh, ISceneNode* node) = 0; - - //! Creates a simple ITriangleSelector, based on an animated mesh scene node. - /** Details of the mesh associated with the node will be extracted internally. - Call ITriangleSelector::update() to have the triangle selector updated based - on the current frame of the animated mesh scene node. - \param node The animated mesh scene node from which to build the selector - */ - virtual ITriangleSelector* createTriangleSelector(IAnimatedMeshSceneNode* node) = 0; - - - //! Creates a simple dynamic ITriangleSelector, based on a axis aligned bounding box. - /** Triangle selectors - can be used for doing collision detection. Every time when triangles are - queried, the triangle selector gets the bounding box of the scene node, - an creates new triangles. In this way, it works good with animated scene nodes. - \param node: Scene node of which the bounding box, visibility and transformation is used. - \return The selector, or null if not successful. - If you no longer need the selector, you should call ITriangleSelector::drop(). - See IReferenceCounted::drop() for more information. */ - virtual ITriangleSelector* createTriangleSelectorFromBoundingBox(ISceneNode* node) = 0; - - //! Creates a Triangle Selector, optimized by an octree. - /** Triangle selectors - can be used for doing collision detection. This triangle selector is - optimized for huge amounts of triangle, it organizes them in an octree. - Please note that the created triangle selector is not automaticly attached - to the scene node. You will have to call ISceneNode::setTriangleSelector() - for this. To create and attach a triangle selector is done like this: - \code - ITriangleSelector* s = sceneManager->createOctreeTriangleSelector(yourMesh, - yourSceneNode); - yourSceneNode->setTriangleSelector(s); - s->drop(); - \endcode - For more informations and examples on this, take a look at the collision - tutorial in the SDK. - \param mesh: Mesh of which the triangles are taken. - \param node: Scene node of which visibility and transformation is used. - \param minimalPolysPerNode: Specifies the minimal polygons contained a octree node. - If a node gets less polys the this value, it will not be splitted into - smaller nodes. - \return The selector, or null if not successful. - If you no longer need the selector, you should call ITriangleSelector::drop(). - See IReferenceCounted::drop() for more information. */ - virtual ITriangleSelector* createOctreeTriangleSelector(IMesh* mesh, - ISceneNode* node, s32 minimalPolysPerNode=32) = 0; - - //! //! Creates a Triangle Selector, optimized by an octree. - /** \deprecated Use createOctreeTriangleSelector instead. This method may be removed by Irrlicht 1.9. */ - _IRR_DEPRECATED_ ITriangleSelector* createOctTreeTriangleSelector(IMesh* mesh, - ISceneNode* node, s32 minimalPolysPerNode=32) - { - return createOctreeTriangleSelector(mesh, node, minimalPolysPerNode); - } - - //! Creates a meta triangle selector. - /** A meta triangle selector is nothing more than a - collection of one or more triangle selectors providing together - the interface of one triangle selector. In this way, - collision tests can be done with different triangle soups in one pass. - \return The selector, or null if not successful. - If you no longer need the selector, you should call ITriangleSelector::drop(). - See IReferenceCounted::drop() for more information. */ - virtual IMetaTriangleSelector* createMetaTriangleSelector() = 0; - - //! Creates a triangle selector which can select triangles from a terrain scene node. - /** \param node: Pointer to the created terrain scene node - \param LOD: Level of detail, 0 for highest detail. - \return The selector, or null if not successful. - If you no longer need the selector, you should call ITriangleSelector::drop(). - See IReferenceCounted::drop() for more information. */ - virtual ITriangleSelector* createTerrainTriangleSelector( - ITerrainSceneNode* node, s32 LOD=0) = 0; - - //! Adds an external mesh loader for extending the engine with new file formats. - /** If you want the engine to be extended with - file formats it currently is not able to load (e.g. .cob), just implement - the IMeshLoader interface in your loading class and add it with this method. - Using this method it is also possible to override built-in mesh loaders with - newer or updated versions without the need to recompile the engine. - \param externalLoader: Implementation of a new mesh loader. */ - virtual void addExternalMeshLoader(IMeshLoader* externalLoader) = 0; - - //! Returns the number of mesh loaders supported by Irrlicht at this time - virtual u32 getMeshLoaderCount() const = 0; - - //! Retrieve the given mesh loader - /** \param index The index of the loader to retrieve. This parameter is an 0-based - array index. - \return A pointer to the specified loader, 0 if the index is incorrect. */ - virtual IMeshLoader* getMeshLoader(u32 index) const = 0; - - //! Adds an external scene loader for extending the engine with new file formats. - /** If you want the engine to be extended with - file formats it currently is not able to load (e.g. .vrml), just implement - the ISceneLoader interface in your loading class and add it with this method. - Using this method it is also possible to override the built-in scene loaders - with newer or updated versions without the need to recompile the engine. - \param externalLoader: Implementation of a new mesh loader. */ - virtual void addExternalSceneLoader(ISceneLoader* externalLoader) = 0; - - //! Returns the number of scene loaders supported by Irrlicht at this time - virtual u32 getSceneLoaderCount() const = 0; - - //! Retrieve the given scene loader - /** \param index The index of the loader to retrieve. This parameter is an 0-based - array index. - \return A pointer to the specified loader, 0 if the index is incorrect. */ - virtual ISceneLoader* getSceneLoader(u32 index) const = 0; - - //! Get pointer to the scene collision manager. - /** \return Pointer to the collision manager - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual ISceneCollisionManager* getSceneCollisionManager() = 0; - - //! Get pointer to the mesh manipulator. - /** \return Pointer to the mesh manipulator - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual IMeshManipulator* getMeshManipulator() = 0; - - //! Adds a scene node to the deletion queue. - /** The scene node is immediatly - deleted when it's secure. Which means when the scene node does not - execute animators and things like that. This method is for example - used for deleting scene nodes by their scene node animators. In - most other cases, a ISceneNode::remove() call is enough, using this - deletion queue is not necessary. - See ISceneManager::createDeleteAnimator() for details. - \param node: Node to detete. */ - virtual void addToDeletionQueue(ISceneNode* node) = 0; - - //! Posts an input event to the environment. - /** Usually you do not have to - use this method, it is used by the internal engine. */ - virtual bool postEventFromUser(const SEvent& event) = 0; - - //! Clears the whole scene. - /** All scene nodes are removed. */ - virtual void clear() = 0; - - //! Get interface to the parameters set in this scene. - /** String parameters can be used by plugins and mesh loaders. - For example the CMS and LMTS loader want a parameter named 'CSM_TexturePath' - and 'LMTS_TexturePath' set to the path were attached textures can be found. See - CSM_TEXTURE_PATH, LMTS_TEXTURE_PATH, MY3D_TEXTURE_PATH, - COLLADA_CREATE_SCENE_INSTANCES, DMF_TEXTURE_PATH and DMF_USE_MATERIALS_DIRS*/ - virtual io::IAttributes* getParameters() = 0; - - //! Get current render pass. - /** All scene nodes are being rendered in a specific order. - First lights, cameras, sky boxes, solid geometry, and then transparent - stuff. During the rendering process, scene nodes may want to know what the scene - manager is rendering currently, because for example they registered for rendering - twice, once for transparent geometry and once for solid. When knowing what rendering - pass currently is active they can render the correct part of their geometry. */ - virtual E_SCENE_NODE_RENDER_PASS getSceneNodeRenderPass() const = 0; - - //! Get the default scene node factory which can create all built in scene nodes - /** \return Pointer to the default scene node factory - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual ISceneNodeFactory* getDefaultSceneNodeFactory() = 0; - - //! Adds a scene node factory to the scene manager. - /** Use this to extend the scene manager with new scene node types which it should be - able to create automaticly, for example when loading data from xml files. */ - virtual void registerSceneNodeFactory(ISceneNodeFactory* factoryToAdd) = 0; - - //! Get amount of registered scene node factories. - virtual u32 getRegisteredSceneNodeFactoryCount() const = 0; - - //! Get a scene node factory by index - /** \return Pointer to the requested scene node factory, or 0 if it does not exist. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual ISceneNodeFactory* getSceneNodeFactory(u32 index) = 0; - - //! Get the default scene node animator factory which can create all built-in scene node animators - /** \return Pointer to the default scene node animator factory - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual ISceneNodeAnimatorFactory* getDefaultSceneNodeAnimatorFactory() = 0; - - //! Adds a scene node animator factory to the scene manager. - /** Use this to extend the scene manager with new scene node animator types which it should be - able to create automaticly, for example when loading data from xml files. */ - virtual void registerSceneNodeAnimatorFactory(ISceneNodeAnimatorFactory* factoryToAdd) = 0; - - //! Get amount of registered scene node animator factories. - virtual u32 getRegisteredSceneNodeAnimatorFactoryCount() const = 0; - - //! Get scene node animator factory by index - /** \return Pointer to the requested scene node animator factory, or 0 if it does not exist. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual ISceneNodeAnimatorFactory* getSceneNodeAnimatorFactory(u32 index) = 0; - - //! Get typename from a scene node type or null if not found - virtual const c8* getSceneNodeTypeName(ESCENE_NODE_TYPE type) = 0; - - //! Returns a typename from a scene node animator type or null if not found - virtual const c8* getAnimatorTypeName(ESCENE_NODE_ANIMATOR_TYPE type) = 0; - - //! Adds a scene node to the scene by name - /** \return Pointer to the scene node added by a factory - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual ISceneNode* addSceneNode(const char* sceneNodeTypeName, ISceneNode* parent=0) = 0; - - //! creates a scene node animator based on its type name - /** \param typeName: Type of the scene node animator to add. - \param target: Target scene node of the new animator. - \return Returns pointer to the new scene node animator or null if not successful. You need to - drop this pointer after calling this, see IReferenceCounted::drop() for details. */ - virtual ISceneNodeAnimator* createSceneNodeAnimator(const char* typeName, ISceneNode* target=0) = 0; - - //! Creates a new scene manager. - /** This can be used to easily draw and/or store two - independent scenes at the same time. The mesh cache will be - shared between all existing scene managers, which means if you - load a mesh in the original scene manager using for example - getMesh(), the mesh will be available in all other scene - managers too, without loading. - The original/main scene manager will still be there and - accessible via IrrlichtDevice::getSceneManager(). If you need - input event in this new scene manager, for example for FPS - cameras, you'll need to forward input to this manually: Just - implement an IEventReceiver and call - yourNewSceneManager->postEventFromUser(), and return true so - that the original scene manager doesn't get the event. - Otherwise, all input will go to the main scene manager - automatically. - If you no longer need the new scene manager, you should call - ISceneManager::drop(). - See IReferenceCounted::drop() for more information. */ - virtual ISceneManager* createNewSceneManager(bool cloneContent=false) = 0; - - //! Saves the current scene into a file. - /** Scene nodes with the option isDebugObject set to true are - not being saved. The scene is usually written to an .irr file, - an xml based format. .irr files can Be edited with the Irrlicht - Engine Editor, irrEdit (http://www.ambiera.com/irredit/). To - load .irr files again, see ISceneManager::loadScene(). - \param filename Name of the file. - \param userDataSerializer If you want to save some user data - for every scene node into the file, implement the - ISceneUserDataSerializer interface and provide it as parameter - here. Otherwise, simply specify 0 as this parameter. - \param node Node which is taken as the top node of the scene. - This node and all of its descendants are saved into the scene - file. Pass 0 or the scene manager to save the full scene (which - is also the default). - \return True if successful. */ - virtual bool saveScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0; - - //! Saves the current scene into a file. - /** Scene nodes with the option isDebugObject set to true are - not being saved. The scene is usually written to an .irr file, - an xml based format. .irr files can Be edited with the Irrlicht - Engine Editor, irrEdit (http://www.ambiera.com/irredit/). To - load .irr files again, see ISceneManager::loadScene(). - \param file File where the scene is saved into. - \param userDataSerializer If you want to save some user data - for every scene node into the file, implement the - ISceneUserDataSerializer interface and provide it as parameter - here. Otherwise, simply specify 0 as this parameter. - \param node Node which is taken as the top node of the scene. - This node and all of its descendants are saved into the scene - file. Pass 0 or the scene manager to save the full scene (which - is also the default). - \return True if successful. */ - virtual bool saveScene(io::IWriteFile* file, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0; - - //! Saves the current scene into a file. - /** Scene nodes with the option isDebugObject set to true are - not being saved. The scene is usually written to an .irr file, - an xml based format. .irr files can Be edited with the Irrlicht - Engine Editor, irrEdit (http://www.ambiera.com/irredit/). To - load .irr files again, see ISceneManager::loadScene(). - \param writer XMLWriter with which the scene is saved. - \param currentPath Path which is used for relative file names. - Usually the directory of the file written into. - \param userDataSerializer If you want to save some user data - for every scene node into the file, implement the - ISceneUserDataSerializer interface and provide it as parameter - here. Otherwise, simply specify 0 as this parameter. - \param node Node which is taken as the top node of the scene. - This node and all of its descendants are saved into the scene - file. Pass 0 or the scene manager to save the full scene (which - is also the default). - \return True if successful. */ - virtual bool saveScene(io::IXMLWriter* writer, const io::path& currentPath, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0; - - //! Loads a scene. Note that the current scene is not cleared before. - /** The scene is usually loaded from an .irr file, an xml based - format, but other scene formats can be added to the engine via - ISceneManager::addExternalSceneLoader. .irr files can Be edited - with the Irrlicht Engine Editor, irrEdit - (http://www.ambiera.com/irredit/) or saved directly by the engine - using ISceneManager::saveScene(). - \param filename Name of the file to load from. - \param userDataSerializer If you want to load user data - possibily saved in that file for some scene nodes in the file, - implement the ISceneUserDataSerializer interface and provide it - as parameter here. Otherwise, simply specify 0 as this - parameter. - \param rootNode Node which is taken as the root node of the - scene. Pass 0 to add the scene directly to the scene manager - (which is also the default). - \return True if successful. */ - virtual bool loadScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* rootNode=0) = 0; - - //! Loads a scene. Note that the current scene is not cleared before. - /** The scene is usually loaded from an .irr file, an xml based - format, but other scene formats can be added to the engine via - ISceneManager::addExternalSceneLoader. .irr files can Be edited - with the Irrlicht Engine Editor, irrEdit - (http://www.ambiera.com/irredit/) or saved directly by the engine - using ISceneManager::saveScene(). - \param file File where the scene is loaded from. - \param userDataSerializer If you want to load user data - possibily saved in that file for some scene nodes in the file, - implement the ISceneUserDataSerializer interface and provide it - as parameter here. Otherwise, simply specify 0 as this - parameter. - \param rootNode Node which is taken as the root node of the - scene. Pass 0 to add the scene directly to the scene manager - (which is also the default). - \return True if successful. */ - virtual bool loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* rootNode=0) = 0; - - //! Get a mesh writer implementation if available - /** Note: You need to drop() the pointer after use again, see IReferenceCounted::drop() - for details. */ - virtual IMeshWriter* createMeshWriter(EMESH_WRITER_TYPE type) = 0; - - //! Get a skinned mesh, which is not available as header-only code - /** Note: You need to drop() the pointer after use again, see IReferenceCounted::drop() - for details. */ - virtual ISkinnedMesh* createSkinnedMesh() = 0; - - //! Sets ambient color of the scene - virtual void setAmbientLight(const video::SColorf &ambientColor) = 0; - - //! Get ambient color of the scene - virtual const video::SColorf& getAmbientLight() const = 0; - - //! Register a custom callbacks manager which gets callbacks during scene rendering. - /** \param[in] lightManager: the new callbacks manager. You may pass 0 to remove the - current callbacks manager and restore the default behavior. */ - virtual void setLightManager(ILightManager* lightManager) = 0; - - //! Get an instance of a geometry creator. - /** The geometry creator provides some helper methods to create various types of - basic geometry. This can be useful for custom scene nodes. */ - virtual const IGeometryCreator* getGeometryCreator(void) const = 0; - - //! Check if node is culled in current view frustum - /** Please note that depending on the used culling method this - check can be rather coarse, or slow. A positive result is - correct, though, i.e. if this method returns true the node is - positively not visible. The node might still be invisible even - if this method returns false. - \param node The scene node which is checked for culling. - \return True if node is not visible in the current scene, else - false. */ - virtual bool isCulled(const ISceneNode* node) const =0; - }; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/ISceneNode.h b/builddir/irrlicht-1.8.1/include/ISceneNode.h deleted file mode 100644 index 63d74f0..0000000 --- a/builddir/irrlicht-1.8.1/include/ISceneNode.h +++ /dev/null @@ -1,858 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_SCENE_NODE_H_INCLUDED__ -#define __I_SCENE_NODE_H_INCLUDED__ - -#include "IAttributeExchangingObject.h" -#include "ESceneNodeTypes.h" -#include "ECullingTypes.h" -#include "EDebugSceneTypes.h" -#include "ISceneNodeAnimator.h" -#include "ITriangleSelector.h" -#include "SMaterial.h" -#include "irrString.h" -#include "aabbox3d.h" -#include "matrix4.h" -#include "irrList.h" -#include "IAttributes.h" - -namespace irr -{ -namespace scene -{ - class ISceneManager; - - //! Typedef for list of scene nodes - typedef core::list<ISceneNode*> ISceneNodeList; - //! Typedef for list of scene node animators - typedef core::list<ISceneNodeAnimator*> ISceneNodeAnimatorList; - - //! Scene node interface. - /** A scene node is a node in the hierarchical scene graph. Every scene - node may have children, which are also scene nodes. Children move - relative to their parent's position. If the parent of a node is not - visible, its children won't be visible either. In this way, it is for - example easily possible to attach a light to a moving car, or to place - a walking character on a moving platform on a moving ship. - */ - class ISceneNode : virtual public io::IAttributeExchangingObject - { - public: - - //! Constructor - ISceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id=-1, - const core::vector3df& position = core::vector3df(0,0,0), - const core::vector3df& rotation = core::vector3df(0,0,0), - const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) - : RelativeTranslation(position), RelativeRotation(rotation), RelativeScale(scale), - Parent(0), SceneManager(mgr), TriangleSelector(0), ID(id), - AutomaticCullingState(EAC_BOX), DebugDataVisible(EDS_OFF), - IsVisible(true), IsDebugObject(false) - { - if (parent) - parent->addChild(this); - - updateAbsolutePosition(); - } - - - //! Destructor - virtual ~ISceneNode() - { - // delete all children - removeAll(); - - // delete all animators - ISceneNodeAnimatorList::Iterator ait = Animators.begin(); - for (; ait != Animators.end(); ++ait) - (*ait)->drop(); - - if (TriangleSelector) - TriangleSelector->drop(); - } - - - //! This method is called just before the rendering process of the whole scene. - /** Nodes may register themselves in the render pipeline during this call, - precalculate the geometry which should be renderered, and prevent their - children from being able to register themselves if they are clipped by simply - not calling their OnRegisterSceneNode method. - If you are implementing your own scene node, you should overwrite this method - with an implementation code looking like this: - \code - if (IsVisible) - SceneManager->registerNodeForRendering(this); - - ISceneNode::OnRegisterSceneNode(); - \endcode - */ - virtual void OnRegisterSceneNode() - { - if (IsVisible) - { - ISceneNodeList::Iterator it = Children.begin(); - for (; it != Children.end(); ++it) - (*it)->OnRegisterSceneNode(); - } - } - - - //! OnAnimate() is called just before rendering the whole scene. - /** Nodes may calculate or store animations here, and may do other useful things, - depending on what they are. Also, OnAnimate() should be called for all - child scene nodes here. This method will be called once per frame, independent - of whether the scene node is visible or not. - \param timeMs Current time in milliseconds. */ - virtual void OnAnimate(u32 timeMs) - { - if (IsVisible) - { - // animate this node with all animators - - ISceneNodeAnimatorList::Iterator ait = Animators.begin(); - while (ait != Animators.end()) - { - // continue to the next node before calling animateNode() - // so that the animator may remove itself from the scene - // node without the iterator becoming invalid - ISceneNodeAnimator* anim = *ait; - ++ait; - anim->animateNode(this, timeMs); - } - - // update absolute position - updateAbsolutePosition(); - - // perform the post render process on all children - - ISceneNodeList::Iterator it = Children.begin(); - for (; it != Children.end(); ++it) - (*it)->OnAnimate(timeMs); - } - } - - - //! Renders the node. - virtual void render() = 0; - - - //! Returns the name of the node. - /** \return Name as character string. */ - virtual const c8* getName() const - { - return Name.c_str(); - } - - - //! Sets the name of the node. - /** \param name New name of the scene node. */ - virtual void setName(const c8* name) - { - Name = name; - } - - - //! Sets the name of the node. - /** \param name New name of the scene node. */ - virtual void setName(const core::stringc& name) - { - Name = name; - } - - - //! Get the axis aligned, not transformed bounding box of this node. - /** This means that if this node is an animated 3d character, - moving in a room, the bounding box will always be around the - origin. To get the box in real world coordinates, just - transform it with the matrix you receive with - getAbsoluteTransformation() or simply use - getTransformedBoundingBox(), which does the same. - \return The non-transformed bounding box. */ - virtual const core::aabbox3d<f32>& getBoundingBox() const = 0; - - - //! Get the axis aligned, transformed and animated absolute bounding box of this node. - /** \return The transformed bounding box. */ - virtual const core::aabbox3d<f32> getTransformedBoundingBox() const - { - core::aabbox3d<f32> box = getBoundingBox(); - AbsoluteTransformation.transformBoxEx(box); - return box; - } - - - //! Get the absolute transformation of the node. Is recalculated every OnAnimate()-call. - /** NOTE: For speed reasons the absolute transformation is not - automatically recalculated on each change of the relative - transformation or by a transformation change of an parent. Instead the - update usually happens once per frame in OnAnimate. You can enforce - an update with updateAbsolutePosition(). - \return The absolute transformation matrix. */ - virtual const core::matrix4& getAbsoluteTransformation() const - { - return AbsoluteTransformation; - } - - - //! Returns the relative transformation of the scene node. - /** The relative transformation is stored internally as 3 - vectors: translation, rotation and scale. To get the relative - transformation matrix, it is calculated from these values. - \return The relative transformation matrix. */ - virtual core::matrix4 getRelativeTransformation() const - { - core::matrix4 mat; - mat.setRotationDegrees(RelativeRotation); - mat.setTranslation(RelativeTranslation); - - if (RelativeScale != core::vector3df(1.f,1.f,1.f)) - { - core::matrix4 smat; - smat.setScale(RelativeScale); - mat *= smat; - } - - return mat; - } - - - //! Returns whether the node should be visible (if all of its parents are visible). - /** This is only an option set by the user, but has nothing to - do with geometry culling - \return The requested visibility of the node, true means - visible (if all parents are also visible). */ - virtual bool isVisible() const - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return IsVisible; - } - - //! Check whether the node is truly visible, taking into accounts its parents' visibility - /** \return true if the node and all its parents are visible, - false if this or any parent node is invisible. */ - virtual bool isTrulyVisible() const - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - if(!IsVisible) - return false; - - if(!Parent) - return true; - - return Parent->isTrulyVisible(); - } - - //! Sets if the node should be visible or not. - /** All children of this node won't be visible either, when set - to false. Invisible nodes are not valid candidates for selection by - collision manager bounding box methods. - \param isVisible If the node shall be visible. */ - virtual void setVisible(bool isVisible) - { - IsVisible = isVisible; - } - - - //! Get the id of the scene node. - /** This id can be used to identify the node. - \return The id. */ - virtual s32 getID() const - { - return ID; - } - - - //! Sets the id of the scene node. - /** This id can be used to identify the node. - \param id The new id. */ - virtual void setID(s32 id) - { - ID = id; - } - - - //! Adds a child to this scene node. - /** If the scene node already has a parent it is first removed - from the other parent. - \param child A pointer to the new child. */ - virtual void addChild(ISceneNode* child) - { - if (child && (child != this)) - { - // Change scene manager? - if (SceneManager != child->SceneManager) - child->setSceneManager(SceneManager); - - child->grab(); - child->remove(); // remove from old parent - Children.push_back(child); - child->Parent = this; - } - } - - - //! Removes a child from this scene node. - /** If found in the children list, the child pointer is also - dropped and might be deleted if no other grab exists. - \param child A pointer to the child which shall be removed. - \return True if the child was removed, and false if not, - e.g. because it couldn't be found in the children list. */ - virtual bool removeChild(ISceneNode* child) - { - ISceneNodeList::Iterator it = Children.begin(); - for (; it != Children.end(); ++it) - if ((*it) == child) - { - (*it)->Parent = 0; - (*it)->drop(); - Children.erase(it); - return true; - } - - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return false; - } - - - //! Removes all children of this scene node - /** The scene nodes found in the children list are also dropped - and might be deleted if no other grab exists on them. - */ - virtual void removeAll() - { - ISceneNodeList::Iterator it = Children.begin(); - for (; it != Children.end(); ++it) - { - (*it)->Parent = 0; - (*it)->drop(); - } - - Children.clear(); - } - - - //! Removes this scene node from the scene - /** If no other grab exists for this node, it will be deleted. - */ - virtual void remove() - { - if (Parent) - Parent->removeChild(this); - } - - - //! Adds an animator which should animate this node. - /** \param animator A pointer to the new animator. */ - virtual void addAnimator(ISceneNodeAnimator* animator) - { - if (animator) - { - Animators.push_back(animator); - animator->grab(); - } - } - - - //! Get a list of all scene node animators. - /** \return The list of animators attached to this node. */ - const core::list<ISceneNodeAnimator*>& getAnimators() const - { - return Animators; - } - - - //! Removes an animator from this scene node. - /** If the animator is found, it is also dropped and might be - deleted if not other grab exists for it. - \param animator A pointer to the animator to be deleted. */ - virtual void removeAnimator(ISceneNodeAnimator* animator) - { - ISceneNodeAnimatorList::Iterator it = Animators.begin(); - for (; it != Animators.end(); ++it) - { - if ((*it) == animator) - { - (*it)->drop(); - Animators.erase(it); - return; - } - } - } - - - //! Removes all animators from this scene node. - /** The animators might also be deleted if no other grab exists - for them. */ - virtual void removeAnimators() - { - ISceneNodeAnimatorList::Iterator it = Animators.begin(); - for (; it != Animators.end(); ++it) - (*it)->drop(); - - Animators.clear(); - } - - - //! Returns the material based on the zero based index i. - /** To get the amount of materials used by this scene node, use - getMaterialCount(). This function is needed for inserting the - node into the scene hierarchy at an optimal position for - minimizing renderstate changes, but can also be used to - directly modify the material of a scene node. - \param num Zero based index. The maximal value is getMaterialCount() - 1. - \return The material at that index. */ - virtual video::SMaterial& getMaterial(u32 num) - { - return video::IdentityMaterial; - } - - - //! Get amount of materials used by this scene node. - /** \return Current amount of materials of this scene node. */ - virtual u32 getMaterialCount() const - { - return 0; - } - - - //! Sets all material flags at once to a new value. - /** Useful, for example, if you want the whole mesh to be - affected by light. - \param flag Which flag of all materials to be set. - \param newvalue New value of that flag. */ - void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) - { - for (u32 i=0; i<getMaterialCount(); ++i) - getMaterial(i).setFlag(flag, newvalue); - } - - - //! Sets the texture of the specified layer in all materials of this scene node to the new texture. - /** \param textureLayer Layer of texture to be set. Must be a - value smaller than MATERIAL_MAX_TEXTURES. - \param texture New texture to be used. */ - void setMaterialTexture(u32 textureLayer, video::ITexture* texture) - { - if (textureLayer >= video::MATERIAL_MAX_TEXTURES) - return; - - for (u32 i=0; i<getMaterialCount(); ++i) - getMaterial(i).setTexture(textureLayer, texture); - } - - - //! Sets the material type of all materials in this scene node to a new material type. - /** \param newType New type of material to be set. */ - void setMaterialType(video::E_MATERIAL_TYPE newType) - { - for (u32 i=0; i<getMaterialCount(); ++i) - getMaterial(i).MaterialType = newType; - } - - - //! Gets the scale of the scene node relative to its parent. - /** This is the scale of this node relative to its parent. - If you want the absolute scale, use - getAbsoluteTransformation().getScale() - \return The scale of the scene node. */ - virtual const core::vector3df& getScale() const - { - return RelativeScale; - } - - - //! Sets the relative scale of the scene node. - /** \param scale New scale of the node, relative to its parent. */ - virtual void setScale(const core::vector3df& scale) - { - RelativeScale = scale; - } - - - //! Gets the rotation of the node relative to its parent. - /** Note that this is the relative rotation of the node. - If you want the absolute rotation, use - getAbsoluteTransformation().getRotation() - \return Current relative rotation of the scene node. */ - virtual const core::vector3df& getRotation() const - { - return RelativeRotation; - } - - - //! Sets the rotation of the node relative to its parent. - /** This only modifies the relative rotation of the node. - \param rotation New rotation of the node in degrees. */ - virtual void setRotation(const core::vector3df& rotation) - { - RelativeRotation = rotation; - } - - - //! Gets the position of the node relative to its parent. - /** Note that the position is relative to the parent. If you want - the position in world coordinates, use getAbsolutePosition() instead. - \return The current position of the node relative to the parent. */ - virtual const core::vector3df& getPosition() const - { - return RelativeTranslation; - } - - - //! Sets the position of the node relative to its parent. - /** Note that the position is relative to the parent. - \param newpos New relative position of the scene node. */ - virtual void setPosition(const core::vector3df& newpos) - { - RelativeTranslation = newpos; - } - - - //! Gets the absolute position of the node in world coordinates. - /** If you want the position of the node relative to its parent, - use getPosition() instead. - NOTE: For speed reasons the absolute position is not - automatically recalculated on each change of the relative - position or by a position change of an parent. Instead the - update usually happens once per frame in OnAnimate. You can enforce - an update with updateAbsolutePosition(). - \return The current absolute position of the scene node (updated on last call of updateAbsolutePosition). */ - virtual core::vector3df getAbsolutePosition() const - { - return AbsoluteTransformation.getTranslation(); - } - - - //! Enables or disables automatic culling based on the bounding box. - /** Automatic culling is enabled by default. Note that not - all SceneNodes support culling and that some nodes always cull - their geometry because it is their only reason for existence, - for example the OctreeSceneNode. - \param state The culling state to be used. */ - void setAutomaticCulling( u32 state) - { - AutomaticCullingState = state; - } - - - //! Gets the automatic culling state. - /** \return The automatic culling state. */ - u32 getAutomaticCulling() const - { - return AutomaticCullingState; - } - - - //! Sets if debug data like bounding boxes should be drawn. - /** A bitwise OR of the types from @ref irr::scene::E_DEBUG_SCENE_TYPE. - Please note that not all scene nodes support all debug data types. - \param state The debug data visibility state to be used. */ - virtual void setDebugDataVisible(u32 state) - { - DebugDataVisible = state; - } - - //! Returns if debug data like bounding boxes are drawn. - /** \return A bitwise OR of the debug data values from - @ref irr::scene::E_DEBUG_SCENE_TYPE that are currently visible. */ - u32 isDebugDataVisible() const - { - return DebugDataVisible; - } - - - //! Sets if this scene node is a debug object. - /** Debug objects have some special properties, for example they can be easily - excluded from collision detection or from serialization, etc. */ - void setIsDebugObject(bool debugObject) - { - IsDebugObject = debugObject; - } - - - //! Returns if this scene node is a debug object. - /** Debug objects have some special properties, for example they can be easily - excluded from collision detection or from serialization, etc. - \return If this node is a debug object, true is returned. */ - bool isDebugObject() const - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return IsDebugObject; - } - - - //! Returns a const reference to the list of all children. - /** \return The list of all children of this node. */ - const core::list<ISceneNode*>& getChildren() const - { - return Children; - } - - - //! Changes the parent of the scene node. - /** \param newParent The new parent to be used. */ - virtual void setParent(ISceneNode* newParent) - { - grab(); - remove(); - - Parent = newParent; - - if (Parent) - Parent->addChild(this); - - drop(); - } - - - //! Returns the triangle selector attached to this scene node. - /** The Selector can be used by the engine for doing collision - detection. You can create a TriangleSelector with - ISceneManager::createTriangleSelector() or - ISceneManager::createOctreeTriangleSelector and set it with - ISceneNode::setTriangleSelector(). If a scene node got no triangle - selector, but collision tests should be done with it, a triangle - selector is created using the bounding box of the scene node. - \return A pointer to the TriangleSelector or 0, if there - is none. */ - virtual ITriangleSelector* getTriangleSelector() const - { - return TriangleSelector; - } - - - //! Sets the triangle selector of the scene node. - /** The Selector can be used by the engine for doing collision - detection. You can create a TriangleSelector with - ISceneManager::createTriangleSelector() or - ISceneManager::createOctreeTriangleSelector(). Some nodes may - create their own selector by default, so it would be good to - check if there is already a selector in this node by calling - ISceneNode::getTriangleSelector(). - \param selector New triangle selector for this scene node. */ - virtual void setTriangleSelector(ITriangleSelector* selector) - { - if (TriangleSelector != selector) - { - if (TriangleSelector) - TriangleSelector->drop(); - - TriangleSelector = selector; - if (TriangleSelector) - TriangleSelector->grab(); - } - } - - - //! Updates the absolute position based on the relative and the parents position - /** Note: This does not recursively update the parents absolute positions, so if you have a deeper - hierarchy you might want to update the parents first.*/ - virtual void updateAbsolutePosition() - { - if (Parent) - { - AbsoluteTransformation = - Parent->getAbsoluteTransformation() * getRelativeTransformation(); - } - else - AbsoluteTransformation = getRelativeTransformation(); - } - - - //! Returns the parent of this scene node - /** \return A pointer to the parent. */ - scene::ISceneNode* getParent() const - { - return Parent; - } - - - //! Returns type of the scene node - /** \return The type of this node. */ - virtual ESCENE_NODE_TYPE getType() const - { - return ESNT_UNKNOWN; - } - - - //! Writes attributes of the scene node. - /** Implement this to expose the attributes of your scene node - for scripting languages, editors, debuggers or xml - serialization purposes. - \param out The attribute container to write into. - \param options Additional options which might influence the - serialization. */ - virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const - { - if (!out) - return; - out->addString ("Name", Name.c_str()); - out->addInt ("Id", ID ); - - out->addVector3d("Position", getPosition() ); - out->addVector3d("Rotation", getRotation() ); - out->addVector3d("Scale", getScale() ); - - out->addBool ("Visible", IsVisible ); - out->addInt ("AutomaticCulling", AutomaticCullingState); - out->addInt ("DebugDataVisible", DebugDataVisible ); - out->addBool ("IsDebugObject", IsDebugObject ); - } - - - //! Reads attributes of the scene node. - /** Implement this to set the attributes of your scene node for - scripting languages, editors, debuggers or xml deserialization - purposes. - \param in The attribute container to read from. - \param options Additional options which might influence the - deserialization. */ - virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) - { - if (!in) - return; - Name = in->getAttributeAsString("Name"); - ID = in->getAttributeAsInt("Id"); - - setPosition(in->getAttributeAsVector3d("Position")); - setRotation(in->getAttributeAsVector3d("Rotation")); - setScale(in->getAttributeAsVector3d("Scale")); - - IsVisible = in->getAttributeAsBool("Visible"); - s32 tmpState = in->getAttributeAsEnumeration("AutomaticCulling", - scene::AutomaticCullingNames); - if (tmpState != -1) - AutomaticCullingState = (u32)tmpState; - else - AutomaticCullingState = in->getAttributeAsInt("AutomaticCulling"); - - DebugDataVisible = in->getAttributeAsInt("DebugDataVisible"); - IsDebugObject = in->getAttributeAsBool("IsDebugObject"); - - updateAbsolutePosition(); - } - - //! Creates a clone of this scene node and its children. - /** \param newParent An optional new parent. - \param newManager An optional new scene manager. - \return The newly created clone of this node. */ - virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0) - { - return 0; // to be implemented by derived classes - } - - //! Retrieve the scene manager for this node. - /** \return The node's scene manager. */ - virtual ISceneManager* getSceneManager(void) const { return SceneManager; } - - protected: - - //! A clone function for the ISceneNode members. - /** This method can be used by clone() implementations of - derived classes - \param toCopyFrom The node from which the values are copied - \param newManager The new scene manager. */ - void cloneMembers(ISceneNode* toCopyFrom, ISceneManager* newManager) - { - Name = toCopyFrom->Name; - AbsoluteTransformation = toCopyFrom->AbsoluteTransformation; - RelativeTranslation = toCopyFrom->RelativeTranslation; - RelativeRotation = toCopyFrom->RelativeRotation; - RelativeScale = toCopyFrom->RelativeScale; - ID = toCopyFrom->ID; - setTriangleSelector(toCopyFrom->TriangleSelector); - AutomaticCullingState = toCopyFrom->AutomaticCullingState; - DebugDataVisible = toCopyFrom->DebugDataVisible; - IsVisible = toCopyFrom->IsVisible; - IsDebugObject = toCopyFrom->IsDebugObject; - - if (newManager) - SceneManager = newManager; - else - SceneManager = toCopyFrom->SceneManager; - - // clone children - - ISceneNodeList::Iterator it = toCopyFrom->Children.begin(); - for (; it != toCopyFrom->Children.end(); ++it) - (*it)->clone(this, newManager); - - // clone animators - - ISceneNodeAnimatorList::Iterator ait = toCopyFrom->Animators.begin(); - for (; ait != toCopyFrom->Animators.end(); ++ait) - { - ISceneNodeAnimator* anim = (*ait)->createClone(this, SceneManager); - if (anim) - { - addAnimator(anim); - anim->drop(); - } - } - } - - //! Sets the new scene manager for this node and all children. - //! Called by addChild when moving nodes between scene managers - void setSceneManager(ISceneManager* newManager) - { - SceneManager = newManager; - - ISceneNodeList::Iterator it = Children.begin(); - for (; it != Children.end(); ++it) - (*it)->setSceneManager(newManager); - } - - //! Name of the scene node. - core::stringc Name; - - //! Absolute transformation of the node. - core::matrix4 AbsoluteTransformation; - - //! Relative translation of the scene node. - core::vector3df RelativeTranslation; - - //! Relative rotation of the scene node. - core::vector3df RelativeRotation; - - //! Relative scale of the scene node. - core::vector3df RelativeScale; - - //! Pointer to the parent - ISceneNode* Parent; - - //! List of all children of this node - core::list<ISceneNode*> Children; - - //! List of all animator nodes - core::list<ISceneNodeAnimator*> Animators; - - //! Pointer to the scene manager - ISceneManager* SceneManager; - - //! Pointer to the triangle selector - ITriangleSelector* TriangleSelector; - - //! ID of the node. - s32 ID; - - //! Automatic culling state - u32 AutomaticCullingState; - - //! Flag if debug data should be drawn, such as Bounding Boxes. - u32 DebugDataVisible; - - //! Is the node visible? - bool IsVisible; - - //! Is debug object? - bool IsDebugObject; - }; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/ISceneNodeAnimator.h b/builddir/irrlicht-1.8.1/include/ISceneNodeAnimator.h deleted file mode 100644 index c69474b..0000000 --- a/builddir/irrlicht-1.8.1/include/ISceneNodeAnimator.h +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_SCENE_NODE_ANIMATOR_H_INCLUDED__ -#define __I_SCENE_NODE_ANIMATOR_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "vector3d.h" -#include "ESceneNodeAnimatorTypes.h" -#include "IAttributeExchangingObject.h" -#include "IEventReceiver.h" - -namespace irr -{ -namespace io -{ - class IAttributes; -} // end namespace io -namespace scene -{ - class ISceneNode; - class ISceneManager; - - //! Animates a scene node. Can animate position, rotation, material, and so on. - /** A scene node animator is able to animate a scene node in a very simple way. It may - change its position, rotation, scale and/or material. There are lots of animators - to choose from. You can create scene node animators with the ISceneManager interface. - */ - class ISceneNodeAnimator : public io::IAttributeExchangingObject, public IEventReceiver - { - public: - //! Animates a scene node. - /** \param node Node to animate. - \param timeMs Current time in milli seconds. */ - virtual void animateNode(ISceneNode* node, u32 timeMs) =0; - - //! Creates a clone of this animator. - /** Please note that you will have to drop - (IReferenceCounted::drop()) the returned pointer after calling this. */ - virtual ISceneNodeAnimator* createClone(ISceneNode* node, - ISceneManager* newManager=0) =0; - - //! Returns true if this animator receives events. - /** When attached to an active camera, this animator will be - able to respond to events such as mouse and keyboard events. */ - virtual bool isEventReceiverEnabled() const - { - return false; - } - - //! Event receiver, override this function for camera controlling animators - virtual bool OnEvent(const SEvent& event) - { - return false; - } - - //! Returns type of the scene node animator - virtual ESCENE_NODE_ANIMATOR_TYPE getType() const - { - return ESNAT_UNKNOWN; - } - - //! Returns if the animator has finished. - /** This is only valid for non-looping animators with a discrete end state. - \return true if the animator has finished, false if it is still running. */ - virtual bool hasFinished(void) const - { - return false; - } - }; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/ISceneNodeAnimatorCameraFPS.h b/builddir/irrlicht-1.8.1/include/ISceneNodeAnimatorCameraFPS.h deleted file mode 100644 index adfe9e9..0000000 --- a/builddir/irrlicht-1.8.1/include/ISceneNodeAnimatorCameraFPS.h +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_SCENE_NODE_ANIMATOR_CAMERA_FPS_H_INCLUDED__ -#define __I_SCENE_NODE_ANIMATOR_CAMERA_FPS_H_INCLUDED__ - -#include "ISceneNodeAnimator.h" -#include "IEventReceiver.h" -#include "irrArray.h" - -namespace irr -{ - struct SKeyMap; - -namespace scene -{ - - //! Special scene node animator for FPS cameras - /** This scene node animator can be attached to a camera to make it act - like a first person shooter - */ - class ISceneNodeAnimatorCameraFPS : public ISceneNodeAnimator - { - public: - - //! Returns the speed of movement in units per millisecond - virtual f32 getMoveSpeed() const = 0; - - //! Sets the speed of movement in units per millisecond - virtual void setMoveSpeed(f32 moveSpeed) = 0; - - //! Returns the rotation speed in degrees - /** The degrees are equivalent to a half screen movement of the mouse, - i.e. if the mouse cursor had been moved to the border of the screen since - the last animation. */ - virtual f32 getRotateSpeed() const = 0; - - //! Set the rotation speed in degrees - virtual void setRotateSpeed(f32 rotateSpeed) = 0; - - //! Sets the keyboard mapping for this animator (old style) - /** \param map Array of keyboard mappings, see irr::SKeyMap - \param count Size of the keyboard map array. */ - virtual void setKeyMap(SKeyMap *map, u32 count) = 0; - - //! Sets the keyboard mapping for this animator - //! \param keymap The new keymap array - virtual void setKeyMap(const core::array<SKeyMap>& keymap) = 0; - - //! Gets the keyboard mapping for this animator - virtual const core::array<SKeyMap>& getKeyMap() const = 0; - - //! Sets whether vertical movement should be allowed. - /** If vertical movement is enabled then the camera may fight with - gravity causing camera shake. Disable this if the camera has - a collision animator with gravity enabled. */ - virtual void setVerticalMovement(bool allow) = 0; - - //! Sets whether the Y axis of the mouse should be inverted. - /** If enabled then moving the mouse down will cause - the camera to look up. It is disabled by default. */ - virtual void setInvertMouse(bool invert) = 0; - }; -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/ISceneNodeAnimatorCameraMaya.h b/builddir/irrlicht-1.8.1/include/ISceneNodeAnimatorCameraMaya.h deleted file mode 100644 index ebee950..0000000 --- a/builddir/irrlicht-1.8.1/include/ISceneNodeAnimatorCameraMaya.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_SCENE_NODE_ANIMATOR_CAMERA_MAYA_H_INCLUDED__ -#define __I_SCENE_NODE_ANIMATOR_CAMERA_MAYA_H_INCLUDED__ - -#include "ISceneNodeAnimator.h" - -namespace irr -{ - -namespace scene -{ - - //! Special scene node animator for Maya-style cameras - /** This scene node animator can be attached to a camera to make it act like a 3d - modelling tool. - The camera is moving relative to the target with the mouse, by pressing either - of the three buttons. - In order to move the camera, set a new target for the camera. The distance defines - the current orbit radius the camera moves on. Distance can be changed via the setter - or by mouse events. - */ - class ISceneNodeAnimatorCameraMaya : public ISceneNodeAnimator - { - public: - - //! Returns the speed of movement - virtual f32 getMoveSpeed() const = 0; - - //! Sets the speed of movement - virtual void setMoveSpeed(f32 moveSpeed) = 0; - - //! Returns the rotation speed - virtual f32 getRotateSpeed() const = 0; - - //! Set the rotation speed - virtual void setRotateSpeed(f32 rotateSpeed) = 0; - - //! Returns the zoom speed - virtual f32 getZoomSpeed() const = 0; - - //! Set the zoom speed - virtual void setZoomSpeed(f32 zoomSpeed) = 0; - - //! Returns the current distance, i.e. orbit radius - virtual f32 getDistance() const = 0; - - //! Set the distance - virtual void setDistance(f32 distance) = 0; - }; - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/ISceneNodeAnimatorCollisionResponse.h b/builddir/irrlicht-1.8.1/include/ISceneNodeAnimatorCollisionResponse.h deleted file mode 100644 index e2bba8a..0000000 --- a/builddir/irrlicht-1.8.1/include/ISceneNodeAnimatorCollisionResponse.h +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_SCENE_NODE_ANIMATOR_COLLISION_RESPONSE_H_INCLUDED__ -#define __I_SCENE_NODE_ANIMATOR_COLLISION_RESPONSE_H_INCLUDED__ - -#include "ISceneNode.h" - -namespace irr -{ -namespace scene -{ - - class ISceneNodeAnimatorCollisionResponse; - - //! Callback interface for catching events of collisions. - /** Implement this interface and use - ISceneNodeAnimatorCollisionResponse::setCollisionCallback to be able to - be notified if a collision has occurred. - **/ - class ICollisionCallback : public virtual IReferenceCounted - { - public: - - //! Will be called when a collision occurrs. - /** See ISceneNodeAnimatorCollisionResponse::setCollisionCallback for more information. - \param animator: Collision response animator in which the collision occurred. You can call - this animator's methods to find the node, collisionPoint and/or collision triangle. - \retval true if the collision was handled in the animator. The animator's target - node will *not* be stopped at the collision point, but will instead move fully - to the location that triggered the collision check. - \retval false if the collision was not handled in the animator. The animator's - target node will be moved to the collision position. - */ - virtual bool onCollision(const ISceneNodeAnimatorCollisionResponse& animator) = 0; - }; - - //! Special scene node animator for doing automatic collision detection and response. - /** This scene node animator can be attached to any single scene node - and will then prevent it from moving through specified collision geometry - (e.g. walls and floors of the) world, as well as having it fall under gravity. - This animator provides a simple implementation of first person shooter cameras. - Attach it to a camera, and the camera will behave as the player control in a - first person shooter game: The camera stops and slides at walls, walks up stairs, - falls down if there is no floor under it, and so on. - - The animator will treat any change in the position of its target scene - node as movement, including a setPosition(), as movement. If you want to - teleport the target scene node manually to a location without it being effected - by collision geometry, then call setTargetNode(node) after calling node->setPosition(). - */ - class ISceneNodeAnimatorCollisionResponse : public ISceneNodeAnimator - { - public: - - //! Destructor - virtual ~ISceneNodeAnimatorCollisionResponse() {} - - //! Check if the attached scene node is falling. - /** Falling means that there is no blocking wall from the scene - node in the direction of the gravity. The implementation of - this method is very fast, no collision detection is done when - invoking it. - \return True if the scene node is falling, false if not. */ - virtual bool isFalling() const = 0; - - //! Sets the radius of the ellipsoid for collision detection and response. - /** If you have a scene node, and you are unsure about how big - the radius should be, you could use the following code to - determine it: - \code - core::aabbox<f32> box = yourSceneNode->getBoundingBox(); - core::vector3df radius = box.MaxEdge - box.getCenter(); - \endcode - \param radius: New radius of the ellipsoid. */ - virtual void setEllipsoidRadius(const core::vector3df& radius) = 0; - - //! Returns the radius of the ellipsoid for collision detection and response. - /** \return Radius of the ellipsoid. */ - virtual core::vector3df getEllipsoidRadius() const = 0; - - //! Sets the gravity of the environment. - /** A good example value would be core::vector3df(0,-100.0f,0) - for letting gravity affect all object to fall down. For bigger - gravity, make increase the length of the vector. You can - disable gravity by setting it to core::vector3df(0,0,0); - \param gravity: New gravity vector. */ - virtual void setGravity(const core::vector3df& gravity) = 0; - - //! Get current vector of gravity. - //! \return Gravity vector. */ - virtual core::vector3df getGravity() const = 0; - - //! 'Jump' the animator, by adding a jump speed opposite to its gravity - /** \param jumpSpeed The initial speed of the jump; the velocity will be opposite - to this animator's gravity vector. */ - virtual void jump(f32 jumpSpeed) = 0; - - //! Should the Target react on collision ( default = true ) - virtual void setAnimateTarget ( bool enable ) = 0; - virtual bool getAnimateTarget () const = 0; - - //! Set translation of the collision ellipsoid. - /** By default, the ellipsoid for collision detection is - created around the center of the scene node, which means that - the ellipsoid surrounds it completely. If this is not what you - want, you may specify a translation for the ellipsoid. - \param translation: Translation of the ellipsoid relative - to the position of the scene node. */ - virtual void setEllipsoidTranslation(const core::vector3df &translation) = 0; - - //! Get the translation of the ellipsoid for collision detection. - /** See - ISceneNodeAnimatorCollisionResponse::setEllipsoidTranslation() - for more details. - \return Translation of the ellipsoid relative to the position - of the scene node. */ - virtual core::vector3df getEllipsoidTranslation() const = 0; - - //! Sets a triangle selector holding all triangles of the world with which the scene node may collide. - /** \param newWorld: New triangle selector containing triangles - to let the scene node collide with. */ - virtual void setWorld(ITriangleSelector* newWorld) = 0; - - //! Get the current triangle selector containing all triangles for collision detection. - virtual ITriangleSelector* getWorld() const = 0; - - //! Set the single node that this animator will act on. - /** \param node The new target node. Setting this will force the animator to update - its last target position for the node, allowing setPosition() to teleport - the node through collision geometry. */ - virtual void setTargetNode(ISceneNode * node) = 0; - - //! Gets the single node that this animator is acting on. - /** \return The node that this animator is acting on. */ - virtual ISceneNode* getTargetNode(void) const = 0; - - //! Returns true if a collision occurred during the last animateNode() - virtual bool collisionOccurred() const = 0; - - //! Returns the last point of collision. - virtual const core::vector3df & getCollisionPoint() const = 0; - - //! Returns the last triangle that caused a collision - virtual const core::triangle3df & getCollisionTriangle() const = 0; - - //! Returns the position that the target node will be moved to, unless the collision is consumed in a callback. - /** - If you have a collision callback registered, and it consumes the collision, then the - node will ignore the collision and will not stop at this position. Instead, it will - move fully to the position that caused the collision to occur. */ - virtual const core::vector3df & getCollisionResultPosition(void) const = 0; - - //! Returns the node that was collided with. - virtual ISceneNode* getCollisionNode(void) const = 0; - - //! Sets a callback interface which will be called if a collision occurs. - /** \param callback: collision callback handler that will be called when a collision - occurs. Set this to 0 to disable the callback. - */ - virtual void setCollisionCallback(ICollisionCallback* callback) = 0; - - }; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/ISceneNodeAnimatorFactory.h b/builddir/irrlicht-1.8.1/include/ISceneNodeAnimatorFactory.h deleted file mode 100644 index 8afe3ef..0000000 --- a/builddir/irrlicht-1.8.1/include/ISceneNodeAnimatorFactory.h +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_SCENE_NODE_ANIMATOR_FACTORY_H_INCLUDED__ -#define __I_SCENE_NODE_ANIMATOR_FACTORY_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "ESceneNodeAnimatorTypes.h" - -namespace irr -{ -namespace scene -{ - class ISceneNode; - class ISceneNodeAnimator; - - //! Interface for dynamic creation of scene node animators - /** To be able to add custom scene node animators to Irrlicht and to make it possible for the - scene manager to save and load those external animators, simply implement this - interface and register it in you scene manager via ISceneManager::registerSceneNodeAnimatorFactory. - Note: When implementing your own scene node factory, don't call ISceneNodeManager::grab() to - increase the reference counter of the scene node manager. This is not necessary because the - scene node manager will grab() the factory anyway, and otherwise cyclic references will - be created and the scene manager and all its nodes won't get deallocated. - */ - class ISceneNodeAnimatorFactory : public virtual IReferenceCounted - { - public: - - //! creates a scene node animator based on its type id - /** \param type: Type of the scene node animator to add. - \param target: Target scene node of the new animator. - \return Returns pointer to the new scene node animator or null if not successful. You need to - drop this pointer after calling this, see IReferenceCounted::drop() for details. */ - virtual ISceneNodeAnimator* createSceneNodeAnimator(ESCENE_NODE_ANIMATOR_TYPE type, ISceneNode* target) = 0; - - //! creates a scene node animator based on its type name - /** \param typeName: Type of the scene node animator to add. - \param target: Target scene node of the new animator. - \return Returns pointer to the new scene node animator or null if not successful. You need to - drop this pointer after calling this, see IReferenceCounted::drop() for details. */ - virtual ISceneNodeAnimator* createSceneNodeAnimator(const c8* typeName, ISceneNode* target) = 0; - - //! returns amount of scene node animator types this factory is able to create - virtual u32 getCreatableSceneNodeAnimatorTypeCount() const = 0; - - //! returns type of a createable scene node animator type - /** \param idx: Index of scene node animator type in this factory. Must be a value between 0 and - getCreatableSceneNodeTypeCount() */ - virtual ESCENE_NODE_ANIMATOR_TYPE getCreateableSceneNodeAnimatorType(u32 idx) const = 0; - - //! returns type name of a createable scene node animator type - /** \param idx: Index of scene node animator type in this factory. Must be a value between 0 and - getCreatableSceneNodeAnimatorTypeCount() */ - virtual const c8* getCreateableSceneNodeAnimatorTypeName(u32 idx) const = 0; - - //! returns type name of a createable scene node animator type - /** \param type: Type of scene node animator. - \return: Returns name of scene node animator type if this factory can create the type, otherwise 0. */ - virtual const c8* getCreateableSceneNodeAnimatorTypeName(ESCENE_NODE_ANIMATOR_TYPE type) const = 0; - }; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/ISceneNodeFactory.h b/builddir/irrlicht-1.8.1/include/ISceneNodeFactory.h deleted file mode 100644 index 247b47b..0000000 --- a/builddir/irrlicht-1.8.1/include/ISceneNodeFactory.h +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_SCENE_NODE_FACTORY_H_INCLUDED__ -#define __I_SCENE_NODE_FACTORY_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "ESceneNodeTypes.h" - -namespace irr -{ - -namespace scene -{ - class ISceneNode; - - //! Interface for dynamic creation of scene nodes - /** To be able to add custom scene nodes to Irrlicht and to make it possible for the - scene manager to save and load those external scene nodes, simply implement this - interface and register it in you scene manager via ISceneManager::registerSceneNodeFactory. - Note: When implementing your own scene node factory, don't call ISceneNodeManager::grab() to - increase the reference counter of the scene node manager. This is not necessary because the - scene node manager will grab() the factory anyway, and otherwise cyclic references will - be created and the scene manager and all its nodes won't get deallocated. - */ - class ISceneNodeFactory : public virtual IReferenceCounted - { - public: - //! adds a scene node to the scene graph based on its type id - /** \param type: Type of the scene node to add. - \param parent: Parent scene node of the new node, can be null to add the scene node to the root. - \return Returns pointer to the new scene node or null if not successful. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual ISceneNode* addSceneNode(ESCENE_NODE_TYPE type, ISceneNode* parent=0) = 0; - - //! adds a scene node to the scene graph based on its type name - /** \param typeName: Type name of the scene node to add. - \param parent: Parent scene node of the new node, can be null to add the scene node to the root. - \return Returns pointer to the new scene node or null if not successful. - This pointer should not be dropped. See IReferenceCounted::drop() for more information. */ - virtual ISceneNode* addSceneNode(const c8* typeName, ISceneNode* parent=0) = 0; - - //! returns amount of scene node types this factory is able to create - virtual u32 getCreatableSceneNodeTypeCount() const = 0; - - //! returns type of a createable scene node type - /** \param idx: Index of scene node type in this factory. Must be a value between 0 and - getCreatableSceneNodeTypeCount() */ - virtual ESCENE_NODE_TYPE getCreateableSceneNodeType(u32 idx) const = 0; - - //! returns type name of a createable scene node type by index - /** \param idx: Index of scene node type in this factory. Must be a value between 0 and - getCreatableSceneNodeTypeCount() */ - virtual const c8* getCreateableSceneNodeTypeName(u32 idx) const = 0; - - //! returns type name of a createable scene node type - /** \param type: Type of scene node. - \return: Returns name of scene node type if this factory can create the type, otherwise 0. */ - virtual const c8* getCreateableSceneNodeTypeName(ESCENE_NODE_TYPE type) const = 0; - }; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/ISceneUserDataSerializer.h b/builddir/irrlicht-1.8.1/include/ISceneUserDataSerializer.h deleted file mode 100644 index 0e63440..0000000 --- a/builddir/irrlicht-1.8.1/include/ISceneUserDataSerializer.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_SCENE_USER_DATA_SERIALIZER_H_INCLUDED__ -#define __I_SCENE_USER_DATA_SERIALIZER_H_INCLUDED__ - -#include "IReferenceCounted.h" - -namespace irr -{ -namespace io -{ - class IAttributes; -} // end namespace io -namespace scene -{ - class ISceneNode; - -//! Interface to read and write user data to and from .irr files. -/** This interface is to be implemented by the user, to make it possible to read -and write user data when reading or writing .irr files via ISceneManager. -To be used with ISceneManager::loadScene() and ISceneManager::saveScene() */ -class ISceneUserDataSerializer -{ -public: - - virtual ~ISceneUserDataSerializer() {} - - //! Called when the scene manager create a scene node while loading a file. - virtual void OnCreateNode(ISceneNode* node) = 0; - - //! Called when the scene manager read a scene node while loading a file. - /** The userData pointer contains a list of attributes with userData which - were attached to the scene node in the read scene file.*/ - virtual void OnReadUserData(ISceneNode* forSceneNode, io::IAttributes* userData) = 0; - - //! Called when the scene manager is writing a scene node to an xml file for example. - /** Implement this method and return a list of attributes containing the user data - you want to be saved together with the scene node. Return 0 if no user data should - be added. Please note that the scene manager will call drop() to the returned pointer - after it no longer needs it, so if you didn't create a new object for the return value - and returning a longer existing IAttributes object, simply call grab() before returning it. */ - virtual io::IAttributes* createUserData(ISceneNode* forSceneNode) = 0; -}; - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IShaderConstantSetCallBack.h b/builddir/irrlicht-1.8.1/include/IShaderConstantSetCallBack.h deleted file mode 100644 index f88393f..0000000 --- a/builddir/irrlicht-1.8.1/include/IShaderConstantSetCallBack.h +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_SHADER_CONSTANT_SET_CALLBACT_H_INCLUDED__ -#define __I_SHADER_CONSTANT_SET_CALLBACT_H_INCLUDED__ - -#include "IReferenceCounted.h" - -namespace irr -{ -namespace video -{ - class IMaterialRendererServices; - class SMaterial; - -//! Interface making it possible to set constants for gpu programs every frame. -/** Implement this interface in an own class and pass a pointer to it to one of -the methods in IGPUProgrammingServices when creating a shader. The -OnSetConstants method will be called every frame now. */ -class IShaderConstantSetCallBack : public virtual IReferenceCounted -{ -public: - - //! Called to let the callBack know the used material (optional method) - /** - \code - class MyCallBack : public IShaderConstantSetCallBack - { - const video::SMaterial *UsedMaterial; - - OnSetMaterial(const video::SMaterial& material) - { - UsedMaterial=&material; - } - - OnSetConstants(IMaterialRendererServices* services, s32 userData) - { - services->setVertexShaderConstant("myColor", reinterpret_cast<f32*>(&UsedMaterial->color), 4); - } - } - \endcode - */ - virtual void OnSetMaterial(const SMaterial& material) { } - - //! Called by the engine when the vertex and/or pixel shader constants for an material renderer should be set. - /** - Implement the IShaderConstantSetCallBack in an own class and implement your own - OnSetConstants method using the given IMaterialRendererServices interface. - Pass a pointer to this class to one of the methods in IGPUProgrammingServices - when creating a shader. The OnSetConstants method will now be called every time - before geometry is being drawn using your shader material. A sample implementation - would look like this: - \code - virtual void OnSetConstants(video::IMaterialRendererServices* services, s32 userData) - { - video::IVideoDriver* driver = services->getVideoDriver(); - - // set clip matrix at register 4 - core::matrix4 worldViewProj(driver->getTransform(video::ETS_PROJECTION)); - worldViewProj *= driver->getTransform(video::ETS_VIEW); - worldViewProj *= driver->getTransform(video::ETS_WORLD); - services->setVertexShaderConstant(&worldViewProj.M[0], 4, 4); - // for high level shading languages, this would be another solution: - //services->setVertexShaderConstant("mWorldViewProj", worldViewProj.M, 16); - - // set some light color at register 9 - video::SColorf col(0.0f,1.0f,1.0f,0.0f); - services->setVertexShaderConstant(reinterpret_cast<const f32*>(&col), 9, 1); - // for high level shading languages, this would be another solution: - //services->setVertexShaderConstant("myColor", reinterpret_cast<f32*>(&col), 4); - } - \endcode - \param services: Pointer to an interface providing methods to set the constants for the shader. - \param userData: Userdata int which can be specified when creating the shader. - */ - virtual void OnSetConstants(IMaterialRendererServices* services, s32 userData) = 0; -}; - - -} // end namespace video -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IShadowVolumeSceneNode.h b/builddir/irrlicht-1.8.1/include/IShadowVolumeSceneNode.h deleted file mode 100644 index 40781a9..0000000 --- a/builddir/irrlicht-1.8.1/include/IShadowVolumeSceneNode.h +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_SHADOW_VOLUME_SCENE_NODE_H_INCLUDED__ -#define __I_SHADOW_VOLUME_SCENE_NODE_H_INCLUDED__ - -#include "ISceneNode.h" - -namespace irr -{ -namespace scene -{ - class IMesh; - - //! Scene node for rendering a shadow volume into a stencil buffer. - class IShadowVolumeSceneNode : public ISceneNode - { - public: - - //! constructor - IShadowVolumeSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id) - : ISceneNode(parent, mgr, id) {} - - //! Sets the mesh from which the shadow volume should be generated. - /** To optimize shadow rendering, use a simpler mesh for shadows. - */ - virtual void setShadowMesh(const IMesh* mesh) = 0; - - //! Updates the shadow volumes for current light positions. - virtual void updateShadowVolumes() = 0; - }; - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/ISkinnedMesh.h b/builddir/irrlicht-1.8.1/include/ISkinnedMesh.h deleted file mode 100644 index 5f0f9cb..0000000 --- a/builddir/irrlicht-1.8.1/include/ISkinnedMesh.h +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_SKINNED_MESH_H_INCLUDED__ -#define __I_SKINNED_MESH_H_INCLUDED__ - -#include "irrArray.h" -#include "IBoneSceneNode.h" -#include "IAnimatedMesh.h" -#include "SSkinMeshBuffer.h" - -namespace irr -{ -namespace scene -{ - - enum E_INTERPOLATION_MODE - { - // constant does use the current key-values without interpolation - EIM_CONSTANT = 0, - - // linear interpolation - EIM_LINEAR, - - //! count of all available interpolation modes - EIM_COUNT - }; - - - //! Interface for using some special functions of Skinned meshes - class ISkinnedMesh : public IAnimatedMesh - { - public: - - //! Gets joint count. - /** \return Amount of joints in the skeletal animated mesh. */ - virtual u32 getJointCount() const = 0; - - //! Gets the name of a joint. - /** \param number: Zero based index of joint. The last joint - has the number getJointCount()-1; - \return Name of joint and null if an error happened. */ - virtual const c8* getJointName(u32 number) const = 0; - - //! Gets a joint number from its name - /** \param name: Name of the joint. - \return Number of the joint or -1 if not found. */ - virtual s32 getJointNumber(const c8* name) const = 0; - - //! Use animation from another mesh - /** The animation is linked (not copied) based on joint names - so make sure they are unique. - \return True if all joints in this mesh were - matched up (empty names will not be matched, and it's case - sensitive). Unmatched joints will not be animated. */ - virtual bool useAnimationFrom(const ISkinnedMesh *mesh) = 0; - - //! Update Normals when Animating - /** \param on If false don't animate, which is faster. - Else update normals, which allows for proper lighting of - animated meshes. */ - virtual void updateNormalsWhenAnimating(bool on) = 0; - - //! Sets Interpolation Mode - virtual void setInterpolationMode(E_INTERPOLATION_MODE mode) = 0; - - //! Animates this mesh's joints based on frame input - virtual void animateMesh(f32 frame, f32 blend)=0; - - //! Preforms a software skin on this mesh based of joint positions - virtual void skinMesh() = 0; - - //! converts the vertex type of all meshbuffers to tangents. - /** E.g. used for bump mapping. */ - virtual void convertMeshToTangents() = 0; - - //! Allows to enable hardware skinning. - /* This feature is not implementated in Irrlicht yet */ - virtual bool setHardwareSkinning(bool on) = 0; - - //! A vertex weight - struct SWeight - { - //! Index of the mesh buffer - u16 buffer_id; //I doubt 32bits is needed - - //! Index of the vertex - u32 vertex_id; //Store global ID here - - //! Weight Strength/Percentage (0-1) - f32 strength; - - private: - //! Internal members used by CSkinnedMesh - friend class CSkinnedMesh; - bool *Moved; - core::vector3df StaticPos; - core::vector3df StaticNormal; - }; - - - //! Animation keyframe which describes a new position - struct SPositionKey - { - f32 frame; - core::vector3df position; - }; - - //! Animation keyframe which describes a new scale - struct SScaleKey - { - f32 frame; - core::vector3df scale; - }; - - //! Animation keyframe which describes a new rotation - struct SRotationKey - { - f32 frame; - core::quaternion rotation; - }; - - //! Joints - struct SJoint - { - SJoint() : UseAnimationFrom(0), GlobalSkinningSpace(false), - positionHint(-1),scaleHint(-1),rotationHint(-1) - { - } - - //! The name of this joint - core::stringc Name; - - //! Local matrix of this joint - core::matrix4 LocalMatrix; - - //! List of child joints - core::array<SJoint*> Children; - - //! List of attached meshes - core::array<u32> AttachedMeshes; - - //! Animation keys causing translation change - core::array<SPositionKey> PositionKeys; - - //! Animation keys causing scale change - core::array<SScaleKey> ScaleKeys; - - //! Animation keys causing rotation change - core::array<SRotationKey> RotationKeys; - - //! Skin weights - core::array<SWeight> Weights; - - //! Unnecessary for loaders, will be overwritten on finalize - core::matrix4 GlobalMatrix; - core::matrix4 GlobalAnimatedMatrix; - core::matrix4 LocalAnimatedMatrix; - core::vector3df Animatedposition; - core::vector3df Animatedscale; - core::quaternion Animatedrotation; - - core::matrix4 GlobalInversedMatrix; //the x format pre-calculates this - - private: - //! Internal members used by CSkinnedMesh - friend class CSkinnedMesh; - - SJoint *UseAnimationFrom; - bool GlobalSkinningSpace; - - s32 positionHint; - s32 scaleHint; - s32 rotationHint; - }; - - - //Interface for the mesh loaders (finalize should lock these functions, and they should have some prefix like loader_ - - //these functions will use the needed arrays, set values, etc to help the loaders - - //! exposed for loaders: to add mesh buffers - virtual core::array<SSkinMeshBuffer*>& getMeshBuffers() = 0; - - //! exposed for loaders: joints list - virtual core::array<SJoint*>& getAllJoints() = 0; - - //! exposed for loaders: joints list - virtual const core::array<SJoint*>& getAllJoints() const = 0; - - //! loaders should call this after populating the mesh - virtual void finalize() = 0; - - //! Adds a new meshbuffer to the mesh, access it as last one - virtual SSkinMeshBuffer* addMeshBuffer() = 0; - - //! Adds a new joint to the mesh, access it as last one - virtual SJoint* addJoint(SJoint *parent=0) = 0; - - //! Adds a new weight to the mesh, access it as last one - virtual SWeight* addWeight(SJoint *joint) = 0; - - //! Adds a new position key to the mesh, access it as last one - virtual SPositionKey* addPositionKey(SJoint *joint) = 0; - //! Adds a new scale key to the mesh, access it as last one - virtual SScaleKey* addScaleKey(SJoint *joint) = 0; - //! Adds a new rotation key to the mesh, access it as last one - virtual SRotationKey* addRotationKey(SJoint *joint) = 0; - - //! Check if the mesh is non-animated - virtual bool isStatic()=0; - }; - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/ITerrainSceneNode.h b/builddir/irrlicht-1.8.1/include/ITerrainSceneNode.h deleted file mode 100644 index 4802710..0000000 --- a/builddir/irrlicht-1.8.1/include/ITerrainSceneNode.h +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -// The code for the TerrainSceneNode is based on the terrain renderer by -// Soconne and the GeoMipMapSceneNode developed by Spintz. They made their -// code available for Irrlicht and allowed it to be distributed under this -// licence. I only modified some parts. A lot of thanks go to them. - -#ifndef __I_TERRAIN_SCENE_NODE_H__ -#define __I_TERRAIN_SCENE_NODE_H__ - -#include "ETerrainElements.h" -#include "ISceneNode.h" -#include "IDynamicMeshBuffer.h" -#include "irrArray.h" - -namespace irr -{ -namespace io -{ - class IReadFile; -} // end namespace io -namespace scene -{ - class IMesh; - - //! A scene node for displaying terrain using the geo mip map algorithm. - /** The code for the TerrainSceneNode is based on the Terrain renderer by Soconne and - * the GeoMipMapSceneNode developed by Spintz. They made their code available for Irrlicht - * and allowed it to be distributed under this licence. I only modified some parts. - * A lot of thanks go to them. - * - * This scene node is capable of very quickly loading - * terrains and updating the indices at runtime to enable viewing very large terrains. It uses a - * CLOD (Continuous Level of Detail) algorithm which updates the indices for each patch based on - * a LOD (Level of Detail) which is determined based on a patch's distance from the camera. - * - * The Patch Size of the terrain must always be a size of ( 2^N+1, i.e. 8+1(9), 16+1(17), etc. ). - * The MaxLOD available is directly dependent on the patch size of the terrain. LOD 0 contains all - * of the indices to draw all the triangles at the max detail for a patch. As each LOD goes up by 1 - * the step taken, in generating indices increases by - 2^LOD, so for LOD 1, the step taken is 2, for - * LOD 2, the step taken is 4, LOD 3 - 8, etc. The step can be no larger than the size of the patch, - * so having a LOD of 8, with a patch size of 17, is asking the algoritm to generate indices every - * 2^8 ( 256 ) vertices, which is not possible with a patch size of 17. The maximum LOD for a patch - * size of 17 is 2^4 ( 16 ). So, with a MaxLOD of 5, you'll have LOD 0 ( full detail ), LOD 1 ( every - * 2 vertices ), LOD 2 ( every 4 vertices ), LOD 3 ( every 8 vertices ) and LOD 4 ( every 16 vertices ). - **/ - class ITerrainSceneNode : public ISceneNode - { - public: - //! Constructor - ITerrainSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, - const core::vector3df& position = core::vector3df(0.0f, 0.0f, 0.0f), - const core::vector3df& rotation = core::vector3df(0.0f, 0.0f, 0.0f), - const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f) ) - : ISceneNode (parent, mgr, id, position, rotation, scale) {} - - //! Get the bounding box of the terrain. - /** \return The bounding box of the entire terrain. */ - virtual const core::aabbox3d<f32>& getBoundingBox() const =0; - - //! Get the bounding box of a patch - /** \return The bounding box of the chosen patch. */ - virtual const core::aabbox3d<f32>& getBoundingBox(s32 patchX, s32 patchZ) const =0; - - //! Get the number of indices currently in the meshbuffer - /** \return The index count. */ - virtual u32 getIndexCount() const =0; - - //! Get pointer to the mesh - /** \return Pointer to the mesh. */ - virtual IMesh* getMesh() =0; - - //! Get pointer to the buffer used by the terrain (most users will not need this) - virtual IMeshBuffer* getRenderBuffer() =0; - - - //! Gets the meshbuffer data based on a specified level of detail. - /** \param mb A reference to an IDynamicMeshBuffer object - \param LOD The level of detail you want the indices from. */ - virtual void getMeshBufferForLOD(IDynamicMeshBuffer& mb, s32 LOD=0) const =0; - - //! Gets the indices for a specified patch at a specified Level of Detail. - /** \param indices A reference to an array of u32 indices. - \param patchX Patch x coordinate. - \param patchZ Patch z coordinate. - \param LOD The level of detail to get for that patch. If -1, - then get the CurrentLOD. If the CurrentLOD is set to -1, - meaning it's not shown, then it will retrieve the triangles at - the highest LOD (0). - \return Number of indices put into the buffer. */ - virtual s32 getIndicesForPatch(core::array<u32>& indices, - s32 patchX, s32 patchZ, s32 LOD=0) =0; - - //! Populates an array with the CurrentLOD of each patch. - /** \param LODs A reference to a core::array<s32> to hold the - values - \return Number of elements in the array */ - virtual s32 getCurrentLODOfPatches(core::array<s32>& LODs) const =0; - - //! Manually sets the LOD of a patch - /** \param patchX Patch x coordinate. - \param patchZ Patch z coordinate. - \param LOD The level of detail to set the patch to. */ - virtual void setLODOfPatch(s32 patchX, s32 patchZ, s32 LOD=0) =0; - - //! Get center of terrain. - virtual const core::vector3df& getTerrainCenter() const =0; - - //! Get height of a point of the terrain. - virtual f32 getHeight(f32 x, f32 y) const =0; - - //! Sets the movement camera threshold. - /** It is used to determine when to recalculate - indices for the scene node. The default value is 10.0f. */ - virtual void setCameraMovementDelta(f32 delta) =0; - - //! Sets the rotation camera threshold. - /** It is used to determine when to recalculate - indices for the scene node. The default value is 1.0f. */ - virtual void setCameraRotationDelta(f32 delta) =0; - - //! Sets whether or not the node should dynamically update its associated selector when the geomipmap data changes. - /** \param bVal: Boolean value representing whether or not to update selector dynamically. */ - virtual void setDynamicSelectorUpdate(bool bVal) =0; - - //! Override the default generation of distance thresholds. - /** For determining the LOD a patch is rendered at. If any LOD - is overridden, then the scene node will no longer apply scaling - factors to these values. If you override these distances, and - then apply a scale to the scene node, it is your responsibility - to update the new distances to work best with your new terrain - size. */ - virtual bool overrideLODDistance(s32 LOD, f64 newDistance) =0; - - //! Scales the base texture, similar to makePlanarTextureMapping. - /** \param scale The scaling amount. Values above 1.0 - increase the number of time the texture is drawn on the - terrain. Values below 0 will decrease the number of times the - texture is drawn on the terrain. Using negative values will - flip the texture, as well as still scaling it. - \param scale2 If set to 0 (default value), this will set the - second texture coordinate set to the same values as in the - first set. If this is another value than zero, it will scale - the second texture coordinate set by this value. */ - virtual void scaleTexture(f32 scale = 1.0f, f32 scale2=0.0f) =0; - - //! Initializes the terrain data. Loads the vertices from the heightMapFile. - /** The file must contain a loadable image of the heightmap. The heightmap - must be square. - \param file The file to read the image from. File is not rewinded. - \param vertexColor Color of all vertices. - \param smoothFactor Number of smoothing passes. */ - virtual bool loadHeightMap(io::IReadFile* file, - video::SColor vertexColor=video::SColor(255,255,255,255), - s32 smoothFactor=0) =0; - - //! Initializes the terrain data. Loads the vertices from the heightMapFile. - /** The data is interpreted as (signed) integers of the given bit size or - floats (with 32bits, signed). Allowed bitsizes for integers are - 8, 16, and 32. The heightmap must be square. - \param file The file to read the RAW data from. File is not rewinded. - \param bitsPerPixel Size of data if integers used, for floats always use 32. - \param signedData Whether we use signed or unsigned ints, ignored for floats. - \param floatVals Whether the data is float or int. - \param width Width (and also Height, as it must be square) of the heightmap. Use 0 for autocalculating from the filesize. - \param vertexColor Color of all vertices. - \param smoothFactor Number of smoothing passes. */ - virtual bool loadHeightMapRAW(io::IReadFile* file, s32 bitsPerPixel=16, - bool signedData=false, bool floatVals=false, s32 width=0, - video::SColor vertexColor=video::SColor(255,255,255,255), - s32 smoothFactor=0) =0; - - }; - -} // end namespace scene -} // end namespace irr - - -#endif // __I_TERRAIN_SCENE_NODE_H__ - diff --git a/builddir/irrlicht-1.8.1/include/ITextSceneNode.h b/builddir/irrlicht-1.8.1/include/ITextSceneNode.h deleted file mode 100644 index e715a46..0000000 --- a/builddir/irrlicht-1.8.1/include/ITextSceneNode.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_TEXT_SCENE_NODE_H_INCLUDED__ -#define __I_TEXT_SCENE_NODE_H_INCLUDED__ - -#include "ISceneNode.h" - -namespace irr -{ -namespace scene -{ - -//! A scene node for displaying 2d text at a position in three dimensional space -class ITextSceneNode : public ISceneNode -{ -public: - - //! constructor - ITextSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, - const core::vector3df& position = core::vector3df(0,0,0)) - : ISceneNode(parent, mgr, id, position) {} - - //! sets the text string - virtual void setText(const wchar_t* text) = 0; - - //! sets the color of the text - virtual void setTextColor(video::SColor color) = 0; -}; - -} // end namespace scene -} // end namespace irr - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/ITexture.h b/builddir/irrlicht-1.8.1/include/ITexture.h deleted file mode 100644 index 66f039d..0000000 --- a/builddir/irrlicht-1.8.1/include/ITexture.h +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_TEXTURE_H_INCLUDED__ -#define __I_TEXTURE_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "IImage.h" -#include "dimension2d.h" -#include "EDriverTypes.h" -#include "path.h" -#include "matrix4.h" - -namespace irr -{ -namespace video -{ - - -//! Enumeration flags telling the video driver in which format textures should be created. -enum E_TEXTURE_CREATION_FLAG -{ - /** Forces the driver to create 16 bit textures always, independent of - which format the file on disk has. When choosing this you may lose - some color detail, but gain much speed and memory. 16 bit textures can - be transferred twice as fast as 32 bit textures and only use half of - the space in memory. - When using this flag, it does not make sense to use the flags - ETCF_ALWAYS_32_BIT, ETCF_OPTIMIZED_FOR_QUALITY, or - ETCF_OPTIMIZED_FOR_SPEED at the same time. */ - ETCF_ALWAYS_16_BIT = 0x00000001, - - /** Forces the driver to create 32 bit textures always, independent of - which format the file on disk has. Please note that some drivers (like - the software device) will ignore this, because they are only able to - create and use 16 bit textures. - When using this flag, it does not make sense to use the flags - ETCF_ALWAYS_16_BIT, ETCF_OPTIMIZED_FOR_QUALITY, or - ETCF_OPTIMIZED_FOR_SPEED at the same time. */ - ETCF_ALWAYS_32_BIT = 0x00000002, - - /** Lets the driver decide in which format the textures are created and - tries to make the textures look as good as possible. Usually it simply - chooses the format in which the texture was stored on disk. - When using this flag, it does not make sense to use the flags - ETCF_ALWAYS_16_BIT, ETCF_ALWAYS_32_BIT, or ETCF_OPTIMIZED_FOR_SPEED at - the same time. */ - ETCF_OPTIMIZED_FOR_QUALITY = 0x00000004, - - /** Lets the driver decide in which format the textures are created and - tries to create them maximizing render speed. - When using this flag, it does not make sense to use the flags - ETCF_ALWAYS_16_BIT, ETCF_ALWAYS_32_BIT, or ETCF_OPTIMIZED_FOR_QUALITY, - at the same time. */ - ETCF_OPTIMIZED_FOR_SPEED = 0x00000008, - - /** Automatically creates mip map levels for the textures. */ - ETCF_CREATE_MIP_MAPS = 0x00000010, - - /** Discard any alpha layer and use non-alpha color format. */ - ETCF_NO_ALPHA_CHANNEL = 0x00000020, - - //! Allow the Driver to use Non-Power-2-Textures - /** BurningVideo can handle Non-Power-2 Textures in 2D (GUI), but not in 3D. */ - ETCF_ALLOW_NON_POWER_2 = 0x00000040, - - /** This flag is never used, it only forces the compiler to compile - these enumeration values to 32 bit. */ - ETCF_FORCE_32_BIT_DO_NOT_USE = 0x7fffffff -}; - -//! Enum for the mode for texture locking. Read-Only, write-only or read/write. -enum E_TEXTURE_LOCK_MODE -{ - //! The default mode. Texture can be read and written to. - ETLM_READ_WRITE = 0, - - //! Read only. The texture is downloaded, but not uploaded again. - /** Often used to read back shader generated textures. */ - ETLM_READ_ONLY, - - //! Write only. The texture is not downloaded and might be uninitialised. - /** The updated texture is uploaded to the GPU. - Used for initialising the shader from the CPU. */ - ETLM_WRITE_ONLY -}; - -//! Interface of a Video Driver dependent Texture. -/** An ITexture is created by an IVideoDriver by using IVideoDriver::addTexture -or IVideoDriver::getTexture. After that, the texture may only be used by this -VideoDriver. As you can imagine, textures of the DirectX and the OpenGL device -will, e.g., not be compatible. An exception is the Software device and the -NULL device, their textures are compatible. If you try to use a texture -created by one device with an other device, the device will refuse to do that -and write a warning or an error message to the output buffer. -*/ -class ITexture : public virtual IReferenceCounted -{ -public: - - //! constructor - ITexture(const io::path& name) : NamedPath(name) - { - } - - //! Lock function. - /** Locks the Texture and returns a pointer to access the - pixels. After lock() has been called and all operations on the pixels - are done, you must call unlock(). - Locks are not accumulating, hence one unlock will do for an arbitrary - number of previous locks. You should avoid locking different levels without - unlocking inbetween, though, because only the last level locked will be - unlocked. - The size of the i-th mipmap level is defined as max(getSize().Width>>i,1) - and max(getSize().Height>>i,1) - \param mode Specifies what kind of changes to the locked texture are - allowed. Unspecified behavior will arise if texture is written in read - only mode or read from in write only mode. - Support for this feature depends on the driver, so don't rely on the - texture being write-protected when locking with read-only, etc. - \param mipmapLevel Number of the mipmapLevel to lock. 0 is main texture. - Non-existing levels will silently fail and return 0. - \return Returns a pointer to the pixel data. The format of the pixel can - be determined by using getColorFormat(). 0 is returned, if - the texture cannot be locked. */ - virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0) = 0; - - //! Unlock function. Must be called after a lock() to the texture. - /** One should avoid to call unlock more than once before another lock. - The last locked mip level will be unlocked. */ - virtual void unlock() = 0; - - //! Get original size of the texture. - /** The texture is usually scaled, if it was created with an unoptimal - size. For example if the size was not a power of two. This method - returns the size of the texture it had before it was scaled. Can be - useful when drawing 2d images on the screen, which should have the - exact size of the original texture. Use ITexture::getSize() if you want - to know the real size it has now stored in the system. - \return The original size of the texture. */ - virtual const core::dimension2d<u32>& getOriginalSize() const = 0; - - //! Get dimension (=size) of the texture. - /** \return The size of the texture. */ - virtual const core::dimension2d<u32>& getSize() const = 0; - - //! Get driver type of texture. - /** This is the driver, which created the texture. This method is used - internally by the video devices, to check, if they may use a texture - because textures may be incompatible between different devices. - \return Driver type of texture. */ - virtual E_DRIVER_TYPE getDriverType() const = 0; - - //! Get the color format of texture. - /** \return The color format of texture. */ - virtual ECOLOR_FORMAT getColorFormat() const = 0; - - //! Get pitch of the main texture (in bytes). - /** The pitch is the amount of bytes used for a row of pixels in a - texture. - \return Pitch of texture in bytes. */ - virtual u32 getPitch() const = 0; - - //! Check whether the texture has MipMaps - /** \return True if texture has MipMaps, else false. */ - virtual bool hasMipMaps() const { return false; } - - //! Returns if the texture has an alpha channel - virtual bool hasAlpha() const { - return getColorFormat () == video::ECF_A8R8G8B8 || getColorFormat () == video::ECF_A1R5G5B5; - } - - //! Regenerates the mip map levels of the texture. - /** Required after modifying the texture, usually after calling unlock(). - \param mipmapData Optional parameter to pass in image data which will be - used instead of the previously stored or automatically generated mipmap - data. The data has to be a continuous pixel data for all mipmaps until - 1x1 pixel. Each mipmap has to be half the width and height of the previous - level. At least one pixel will be always kept.*/ - virtual void regenerateMipMapLevels(void* mipmapData=0) = 0; - - //! Check whether the texture is a render target - /** Render targets can be set as such in the video driver, in order to - render a scene into the texture. Once unbound as render target, they can - be used just as usual textures again. - \return True if this is a render target, otherwise false. */ - virtual bool isRenderTarget() const { return false; } - - //! Get name of texture (in most cases this is the filename) - const io::SNamedPath& getName() const { return NamedPath; } - -protected: - - //! Helper function, helps to get the desired texture creation format from the flags. - /** \return Either ETCF_ALWAYS_32_BIT, ETCF_ALWAYS_16_BIT, - ETCF_OPTIMIZED_FOR_QUALITY, or ETCF_OPTIMIZED_FOR_SPEED. */ - inline E_TEXTURE_CREATION_FLAG getTextureFormatFromFlags(u32 flags) - { - if (flags & ETCF_OPTIMIZED_FOR_SPEED) - return ETCF_OPTIMIZED_FOR_SPEED; - if (flags & ETCF_ALWAYS_16_BIT) - return ETCF_ALWAYS_16_BIT; - if (flags & ETCF_ALWAYS_32_BIT) - return ETCF_ALWAYS_32_BIT; - if (flags & ETCF_OPTIMIZED_FOR_QUALITY) - return ETCF_OPTIMIZED_FOR_QUALITY; - return ETCF_OPTIMIZED_FOR_SPEED; - } - - io::SNamedPath NamedPath; -}; - - -} // end namespace video -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/ITimer.h b/builddir/irrlicht-1.8.1/include/ITimer.h deleted file mode 100644 index 610d6fa..0000000 --- a/builddir/irrlicht-1.8.1/include/ITimer.h +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_TIMER_H_INCLUDED__ -#define __I_TIMER_H_INCLUDED__ - -#include "IReferenceCounted.h" - -namespace irr -{ - -//! Interface for getting and manipulating the virtual time -class ITimer : public virtual IReferenceCounted -{ -public: - //! Returns current real time in milliseconds of the system. - /** This value does not start with 0 when the application starts. - For example in one implementation the value returned could be the - amount of milliseconds which have elapsed since the system was started. - */ - virtual u32 getRealTime() const = 0; - - enum EWeekday - { - EWD_SUNDAY=0, - EWD_MONDAY, - EWD_TUESDAY, - EWD_WEDNESDAY, - EWD_THURSDAY, - EWD_FRIDAY, - EWD_SATURDAY - }; - - struct RealTimeDate - { - // Hour of the day, from 0 to 23 - u32 Hour; - // Minute of the hour, from 0 to 59 - u32 Minute; - // Second of the minute, due to extra seconds from 0 to 61 - u32 Second; - // Year of the gregorian calender - s32 Year; - // Month of the year, from 1 to 12 - u32 Month; - // Day of the month, from 1 to 31 - u32 Day; - // Weekday for the current day - EWeekday Weekday; - // Day of the year, from 1 to 366 - u32 Yearday; - // Whether daylight saving is on - bool IsDST; - }; - - virtual RealTimeDate getRealTimeAndDate() const = 0; - - //! Returns current virtual time in milliseconds. - /** This value starts with 0 and can be manipulated using setTime(), - stopTimer(), startTimer(), etc. This value depends on the set speed of - the timer if the timer is stopped, etc. If you need the system time, - use getRealTime() */ - virtual u32 getTime() const = 0; - - //! sets current virtual time - virtual void setTime(u32 time) = 0; - - //! Stops the virtual timer. - /** The timer is reference counted, which means everything which calls - stop() will also have to call start(), otherwise the timer may not - start/stop correctly again. */ - virtual void stop() = 0; - - //! Starts the virtual timer. - /** The timer is reference counted, which means everything which calls - stop() will also have to call start(), otherwise the timer may not - start/stop correctly again. */ - virtual void start() = 0; - - //! Sets the speed of the timer - /** The speed is the factor with which the time is running faster or - slower then the real system time. */ - virtual void setSpeed(f32 speed = 1.0f) = 0; - - //! Returns current speed of the timer - /** The speed is the factor with which the time is running faster or - slower then the real system time. */ - virtual f32 getSpeed() const = 0; - - //! Returns if the virtual timer is currently stopped - virtual bool isStopped() const = 0; - - //! Advances the virtual time - /** Makes the virtual timer update the time value based on the real - time. This is called automatically when calling IrrlichtDevice::run(), - but you can call it manually if you don't use this method. */ - virtual void tick() = 0; -}; - -} // end namespace irr - -#endif diff --git a/builddir/irrlicht-1.8.1/include/ITriangleSelector.h b/builddir/irrlicht-1.8.1/include/ITriangleSelector.h deleted file mode 100644 index 9d038df..0000000 --- a/builddir/irrlicht-1.8.1/include/ITriangleSelector.h +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_TRIANGLE_SELECTOR_H_INCLUDED__ -#define __I_TRIANGLE_SELECTOR_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "triangle3d.h" -#include "aabbox3d.h" -#include "matrix4.h" -#include "line3d.h" - -namespace irr -{ -namespace scene -{ - -class ISceneNode; - -//! Interface to return triangles with specific properties. -/** Every ISceneNode may have a triangle selector, available with -ISceneNode::getTriangleScelector() or ISceneManager::createTriangleSelector. -This is used for doing collision detection: For example if you know, that a -collision may have happened in the area between (1,1,1) and (10,10,10), you -can get all triangles of the scene node in this area with the -ITriangleSelector easily and check every triangle if it collided. */ -class ITriangleSelector : public virtual IReferenceCounted -{ -public: - - //! Get amount of all available triangles in this selector - virtual s32 getTriangleCount() const = 0; - - //! Gets the triangles for one associated node. - /** - This returns all triangles for one scene node associated with this - selector. If there is more than one scene node associated (e.g. for - an IMetaTriangleSelector) this this function may be called multiple - times to retrieve all triangles. - \param triangles Array where the resulting triangles will be - written to. - \param arraySize Size of the target array. - \param outTriangleCount: Amount of triangles which have been written - into the array. - \param transform Pointer to matrix for transforming the triangles - before they are returned. Useful for example to scale all triangles - down into an ellipsoid space. If this pointer is null, no - transformation will be done. */ - virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, - s32& outTriangleCount, const core::matrix4* transform=0) const = 0; - - //! Gets the triangles for one associated node which may lie within a specific bounding box. - /** - This returns all triangles for one scene node associated with this - selector. If there is more than one scene node associated (e.g. for - an IMetaTriangleSelector) this this function may be called multiple - times to retrieve all triangles. - - This method will return at least the triangles that intersect the box, - but may return other triangles as well. - \param triangles Array where the resulting triangles will be written - to. - \param arraySize Size of the target array. - \param outTriangleCount Amount of triangles which have been written - into the array. - \param box Only triangles which are in this axis aligned bounding box - will be written into the array. - \param transform Pointer to matrix for transforming the triangles - before they are returned. Useful for example to scale all triangles - down into an ellipsoid space. If this pointer is null, no - transformation will be done. */ - virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, - s32& outTriangleCount, const core::aabbox3d<f32>& box, - const core::matrix4* transform=0) const = 0; - - //! Gets the triangles for one associated node which have or may have contact with a 3d line. - /** - This returns all triangles for one scene node associated with this - selector. If there is more than one scene node associated (e.g. for - an IMetaTriangleSelector) this this function may be called multiple - times to retrieve all triangles. - - Please note that unoptimized triangle selectors also may return - triangles which are not in contact at all with the 3d line. - \param triangles Array where the resulting triangles will be written - to. - \param arraySize Size of the target array. - \param outTriangleCount Amount of triangles which have been written - into the array. - \param line Only triangles which may be in contact with this 3d line - will be written into the array. - \param transform Pointer to matrix for transforming the triangles - before they are returned. Useful for example to scale all triangles - down into an ellipsoid space. If this pointer is null, no - transformation will be done. */ - virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, - s32& outTriangleCount, const core::line3d<f32>& line, - const core::matrix4* transform=0) const = 0; - - //! Get scene node associated with a given triangle. - /** - This allows to find which scene node (potentially of several) is - associated with a specific triangle. - - \param triangleIndex: the index of the triangle for which you want to find - the associated scene node. - \return The scene node associated with that triangle. - */ - virtual ISceneNode* getSceneNodeForTriangle(u32 triangleIndex) const = 0; - - //! Get number of TriangleSelectors that are part of this one - /** Only useful for MetaTriangleSelector, others return 1 - */ - virtual u32 getSelectorCount() const = 0; - - //! Get TriangleSelector based on index based on getSelectorCount - /** Only useful for MetaTriangleSelector, others return 'this' or 0 - */ - virtual ITriangleSelector* getSelector(u32 index) = 0; - - //! Get TriangleSelector based on index based on getSelectorCount - /** Only useful for MetaTriangleSelector, others return 'this' or 0 - */ - virtual const ITriangleSelector* getSelector(u32 index) const = 0; -}; - -} // end namespace scene -} // end namespace irr - -#endif diff --git a/builddir/irrlicht-1.8.1/include/IVertexBuffer.h b/builddir/irrlicht-1.8.1/include/IVertexBuffer.h deleted file mode 100644 index 04606b2..0000000 --- a/builddir/irrlicht-1.8.1/include/IVertexBuffer.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (C) 2008-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_VERTEX_BUFFER_H_INCLUDED__ -#define __I_VERTEX_BUFFER_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "irrArray.h" -#include "S3DVertex.h" - -namespace irr -{ -namespace scene -{ - - class IVertexBuffer : public virtual IReferenceCounted - { - public: - virtual void* getData() =0; - virtual video::E_VERTEX_TYPE getType() const =0; - virtual void setType(video::E_VERTEX_TYPE vertexType) =0; - virtual u32 stride() const =0; - virtual u32 size() const =0; - virtual void push_back(const video::S3DVertex &element) =0; - virtual video::S3DVertex& operator [](const u32 index) const =0; - virtual video::S3DVertex& getLast() =0; - virtual void set_used(u32 usedNow) =0; - virtual void reallocate(u32 new_size) =0; - virtual u32 allocated_size() const =0; - virtual video::S3DVertex* pointer() =0; - - //! get the current hardware mapping hint - virtual E_HARDWARE_MAPPING getHardwareMappingHint() const =0; - - //! set the hardware mapping hint, for driver - virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) =0; - - //! flags the meshbuffer as changed, reloads hardware buffers - virtual void setDirty() =0; - - //! Get the currently used ID for identification of changes. - /** This shouldn't be used for anything outside the VideoDriver. */ - virtual u32 getChangedID() const = 0; - }; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IVideoDriver.h b/builddir/irrlicht-1.8.1/include/IVideoDriver.h deleted file mode 100644 index 6e788f9..0000000 --- a/builddir/irrlicht-1.8.1/include/IVideoDriver.h +++ /dev/null @@ -1,1471 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_I_VIDEO_DRIVER_H_INCLUDED__ -#define __IRR_I_VIDEO_DRIVER_H_INCLUDED__ - -#include "rect.h" -#include "SColor.h" -#include "ITexture.h" -#include "irrArray.h" -#include "matrix4.h" -#include "plane3d.h" -#include "dimension2d.h" -#include "position2d.h" -#include "SMaterial.h" -#include "IMeshBuffer.h" -#include "triangle3d.h" -#include "EDriverTypes.h" -#include "EDriverFeatures.h" -#include "SExposedVideoData.h" - -namespace irr -{ -namespace io -{ - class IAttributes; - struct SAttributeReadWriteOptions; - class IReadFile; - class IWriteFile; -} // end namespace io -namespace scene -{ - class IMeshBuffer; - class IMesh; - class IMeshManipulator; - class ISceneNode; -} // end namespace scene - -namespace video -{ - struct S3DVertex; - struct S3DVertex2TCoords; - struct S3DVertexTangents; - struct SLight; - class IImageLoader; - class IImageWriter; - class IMaterialRenderer; - class IGPUProgrammingServices; - - //! enumeration for geometry transformation states - enum E_TRANSFORMATION_STATE - { - //! View transformation - ETS_VIEW = 0, - //! World transformation - ETS_WORLD, - //! Projection transformation - ETS_PROJECTION, - //! Texture transformation - ETS_TEXTURE_0, - //! Texture transformation - ETS_TEXTURE_1, - //! Texture transformation - ETS_TEXTURE_2, - //! Texture transformation - ETS_TEXTURE_3, -#if _IRR_MATERIAL_MAX_TEXTURES_>4 - //! Texture transformation - ETS_TEXTURE_4, -#if _IRR_MATERIAL_MAX_TEXTURES_>5 - //! Texture transformation - ETS_TEXTURE_5, -#if _IRR_MATERIAL_MAX_TEXTURES_>6 - //! Texture transformation - ETS_TEXTURE_6, -#if _IRR_MATERIAL_MAX_TEXTURES_>7 - //! Texture transformation - ETS_TEXTURE_7, -#endif -#endif -#endif -#endif - //! Not used - ETS_COUNT - }; - - //! enumeration for signaling resources which were lost after the last render cycle - /** These values can be signaled by the driver, telling the app that some resources - were lost and need to be recreated. Irrlicht will sometimes recreate the actual objects, - but the content needs to be recreated by the application. */ - enum E_LOST_RESOURCE - { - //! The whole device/driver is lost - ELR_DEVICE = 1, - //! All texture are lost, rare problem - ELR_TEXTURES = 2, - //! The Render Target Textures are lost, typical problem for D3D - ELR_RTTS = 4, - //! The HW buffers are lost, will be recreated automatically, but might require some more time this frame - ELR_HW_BUFFERS = 8 - }; - - //! Special render targets, which usually map to dedicated hardware - /** These render targets (besides 0 and 1) need not be supported by gfx cards */ - enum E_RENDER_TARGET - { - //! Render target is the main color frame buffer - ERT_FRAME_BUFFER=0, - //! Render target is a render texture - ERT_RENDER_TEXTURE, - //! Multi-Render target textures - ERT_MULTI_RENDER_TEXTURES, - //! Render target is the main color frame buffer - ERT_STEREO_LEFT_BUFFER, - //! Render target is the right color buffer (left is the main buffer) - ERT_STEREO_RIGHT_BUFFER, - //! Render to both stereo buffers at once - ERT_STEREO_BOTH_BUFFERS, - //! Auxiliary buffer 0 - ERT_AUX_BUFFER0, - //! Auxiliary buffer 1 - ERT_AUX_BUFFER1, - //! Auxiliary buffer 2 - ERT_AUX_BUFFER2, - //! Auxiliary buffer 3 - ERT_AUX_BUFFER3, - //! Auxiliary buffer 4 - ERT_AUX_BUFFER4 - }; - - //! Enum for the types of fog distributions to choose from - enum E_FOG_TYPE - { - EFT_FOG_EXP=0, - EFT_FOG_LINEAR, - EFT_FOG_EXP2 - }; - - const c8* const FogTypeNames[] = - { - "FogExp", - "FogLinear", - "FogExp2", - 0 - }; - - struct SOverrideMaterial - { - //! The Material values - SMaterial Material; - //! Which values are taken for override - /** OR'ed values from E_MATERIAL_FLAGS. */ - u32 EnableFlags; - //! Set in which render passes the material override is active. - /** OR'ed values from E_SCENE_NODE_RENDER_PASS. */ - u16 EnablePasses; - //! Global enable flag, overwritten by the SceneManager in each pass - /** The Scenemanager uses the EnablePass array and sets Enabled to - true if the Override material is enabled in the current pass. */ - bool Enabled; - - //! Default constructor - SOverrideMaterial() : EnableFlags(0), EnablePasses(0), Enabled(false) {} - - //! Apply the enabled overrides - void apply(SMaterial& material) - { - if (Enabled) - { - for (u32 i=0; i<32; ++i) - { - const u32 num=(1<<i); - if (EnableFlags & num) - { - switch (num) - { - case EMF_WIREFRAME: material.Wireframe = Material.Wireframe; break; - case EMF_POINTCLOUD: material.PointCloud = Material.PointCloud; break; - case EMF_GOURAUD_SHADING: material.GouraudShading = Material.GouraudShading; break; - case EMF_LIGHTING: material.Lighting = Material.Lighting; break; - case EMF_ZBUFFER: material.ZBuffer = Material.ZBuffer; break; - case EMF_ZWRITE_ENABLE: material.ZWriteEnable = Material.ZWriteEnable; break; - case EMF_BACK_FACE_CULLING: material.BackfaceCulling = Material.BackfaceCulling; break; - case EMF_FRONT_FACE_CULLING: material.FrontfaceCulling = Material.FrontfaceCulling; break; - case EMF_BILINEAR_FILTER: material.TextureLayer[0].BilinearFilter = Material.TextureLayer[0].BilinearFilter; break; - case EMF_TRILINEAR_FILTER: material.TextureLayer[0].TrilinearFilter = Material.TextureLayer[0].TrilinearFilter; break; - case EMF_ANISOTROPIC_FILTER: material.TextureLayer[0].AnisotropicFilter = Material.TextureLayer[0].AnisotropicFilter; break; - case EMF_FOG_ENABLE: material.FogEnable = Material.FogEnable; break; - case EMF_NORMALIZE_NORMALS: material.NormalizeNormals = Material.NormalizeNormals; break; - case EMF_TEXTURE_WRAP: - material.TextureLayer[0].TextureWrapU = Material.TextureLayer[0].TextureWrapU; - material.TextureLayer[0].TextureWrapV = Material.TextureLayer[0].TextureWrapV; - break; - case EMF_ANTI_ALIASING: material.AntiAliasing = Material.AntiAliasing; break; - case EMF_COLOR_MASK: material.ColorMask = Material.ColorMask; break; - case EMF_COLOR_MATERIAL: material.ColorMaterial = Material.ColorMaterial; break; - case EMF_USE_MIP_MAPS: material.UseMipMaps = Material.UseMipMaps; break; - case EMF_BLEND_OPERATION: material.BlendOperation = Material.BlendOperation; break; - case EMF_POLYGON_OFFSET: - material.PolygonOffsetDirection = Material.PolygonOffsetDirection; - material.PolygonOffsetFactor = Material.PolygonOffsetFactor; break; - } - } - } - } - } - - }; - - struct IRenderTarget - { - IRenderTarget(ITexture* texture, - E_COLOR_PLANE colorMask=ECP_ALL, - E_BLEND_FACTOR blendFuncSrc=EBF_ONE, - E_BLEND_FACTOR blendFuncDst=EBF_ONE_MINUS_SRC_ALPHA, - E_BLEND_OPERATION blendOp=EBO_NONE) : - RenderTexture(texture), - TargetType(ERT_RENDER_TEXTURE), ColorMask(colorMask), - BlendFuncSrc(blendFuncSrc), BlendFuncDst(blendFuncDst), - BlendOp(blendOp) {} - IRenderTarget(E_RENDER_TARGET target, - E_COLOR_PLANE colorMask=ECP_ALL, - E_BLEND_FACTOR blendFuncSrc=EBF_ONE, - E_BLEND_FACTOR blendFuncDst=EBF_ONE_MINUS_SRC_ALPHA, - E_BLEND_OPERATION blendOp=EBO_NONE) : - RenderTexture(0), - TargetType(target), ColorMask(colorMask), - BlendFuncSrc(blendFuncSrc), BlendFuncDst(blendFuncDst), - BlendOp(blendOp) {} - bool operator!=(const IRenderTarget& other) const - { - return ((RenderTexture != other.RenderTexture) || - (TargetType != other.TargetType) || - (ColorMask != other.ColorMask) || - (BlendFuncSrc != other.BlendFuncSrc) || - (BlendFuncDst != other.BlendFuncDst) || - (BlendOp != other.BlendOp)); - } - ITexture* RenderTexture; - E_RENDER_TARGET TargetType:8; - E_COLOR_PLANE ColorMask:8; - E_BLEND_FACTOR BlendFuncSrc:4; - E_BLEND_FACTOR BlendFuncDst:4; - E_BLEND_OPERATION BlendOp:4; - }; - - //! Interface to driver which is able to perform 2d and 3d graphics functions. - /** This interface is one of the most important interfaces of - the Irrlicht Engine: All rendering and texture manipulation is done with - this interface. You are able to use the Irrlicht Engine by only - invoking methods of this interface if you like to, although the - irr::scene::ISceneManager interface provides a lot of powerful classes - and methods to make the programmer's life easier. - */ - class IVideoDriver : public virtual IReferenceCounted - { - public: - - //! Applications must call this method before performing any rendering. - /** This method can clear the back- and the z-buffer. - \param backBuffer Specifies if the back buffer should be - cleared, which means that the screen is filled with the color - specified. If this parameter is false, the back buffer will - not be cleared and the color parameter is ignored. - \param zBuffer Specifies if the depth buffer (z buffer) should - be cleared. It is not nesesarry to do so if only 2d drawing is - used. - \param color The color used for back buffer clearing - \param videoData Handle of another window, if you want the - bitmap to be displayed on another window. If this is an empty - element, everything will be displayed in the default window. - Note: This feature is not fully implemented for all devices. - \param sourceRect Pointer to a rectangle defining the source - rectangle of the area to be presented. Set to null to present - everything. Note: not implemented in all devices. - \return False if failed. */ - virtual bool beginScene(bool backBuffer=true, bool zBuffer=true, - SColor color=SColor(255,0,0,0), - const SExposedVideoData& videoData=SExposedVideoData(), - core::rect<s32>* sourceRect=0) =0; - - //! Presents the rendered image to the screen. - /** Applications must call this method after performing any - rendering. - \return False if failed and true if succeeded. */ - virtual bool endScene() =0; - - //! Queries the features of the driver. - /** Returns true if a feature is available - \param feature Feature to query. - \return True if the feature is available, false if not. */ - virtual bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const =0; - - //! Disable a feature of the driver. - /** Can also be used to enable the features again. It is not - possible to enable unsupported features this way, though. - \param feature Feature to disable. - \param flag When true the feature is disabled, otherwise it is enabled. */ - virtual void disableFeature(E_VIDEO_DRIVER_FEATURE feature, bool flag=true) =0; - - //! Get attributes of the actual video driver - /** The following names can be queried for the given types: - MaxTextures (int) The maximum number of simultaneous textures supported by the driver. This can be less than the supported number of textures of the driver. Use _IRR_MATERIAL_MAX_TEXTURES_ to adapt the number. - MaxSupportedTextures (int) The maximum number of simultaneous textures supported by the fixed function pipeline of the (hw) driver. The actual supported number of textures supported by the engine can be lower. - MaxLights (int) Number of hardware lights supported in the fixed function pipieline of the driver, typically 6-8. Use light manager or deferred shading for more. - MaxAnisotropy (int) Number of anisotropy levels supported for filtering. At least 1, max is typically at 16 or 32. - MaxUserClipPlanes (int) Number of additional clip planes, which can be set by the user via dedicated driver methods. - MaxAuxBuffers (int) Special render buffers, which are currently not really usable inside Irrlicht. Only supported by OpenGL - MaxMultipleRenderTargets (int) Number of render targets which can be bound simultaneously. Rendering to MRTs is done via shaders. - MaxIndices (int) Number of indices which can be used in one render call (i.e. one mesh buffer). - MaxTextureSize (int) Dimension that a texture may have, both in width and height. - MaxGeometryVerticesOut (int) Number of vertices the geometry shader can output in one pass. Only OpenGL so far. - MaxTextureLODBias (float) Maximum value for LOD bias. Is usually at around 16, but can be lower on some systems. - Version (int) Version of the driver. Should be Major*100+Minor - ShaderLanguageVersion (int) Version of the high level shader language. Should be Major*100+Minor. - AntiAlias (int) Number of Samples the driver uses for each pixel. 0 and 1 means anti aliasing is off, typical values are 2,4,8,16,32 - */ - virtual const io::IAttributes& getDriverAttributes() const=0; - - //! Check if the driver was recently reset. - /** For d3d devices you will need to recreate the RTTs if the - driver was reset. Should be queried right after beginScene(). - */ - virtual bool checkDriverReset() =0; - - //! Sets transformation matrices. - /** \param state Transformation type to be set, e.g. view, - world, or projection. - \param mat Matrix describing the transformation. */ - virtual void setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat) =0; - - //! Returns the transformation set by setTransform - /** \param state Transformation type to query - \return Matrix describing the transformation. */ - virtual const core::matrix4& getTransform(E_TRANSFORMATION_STATE state) const =0; - - //! Retrieve the number of image loaders - /** \return Number of image loaders */ - virtual u32 getImageLoaderCount() const = 0; - - //! Retrieve the given image loader - /** \param n The index of the loader to retrieve. This parameter is an 0-based - array index. - \return A pointer to the specified loader, 0 if the index is incorrect. */ - virtual IImageLoader* getImageLoader(u32 n) = 0; - - //! Retrieve the number of image writers - /** \return Number of image writers */ - virtual u32 getImageWriterCount() const = 0; - - //! Retrieve the given image writer - /** \param n The index of the writer to retrieve. This parameter is an 0-based - array index. - \return A pointer to the specified writer, 0 if the index is incorrect. */ - virtual IImageWriter* getImageWriter(u32 n) = 0; - - //! Sets a material. - /** All 3d drawing functions will draw geometry using this material thereafter. - \param material: Material to be used from now on. */ - virtual void setMaterial(const SMaterial& material) =0; - - //! Get access to a named texture. - /** Loads the texture from disk if it is not - already loaded and generates mipmap levels if desired. - Texture loading can be influenced using the - setTextureCreationFlag() method. The texture can be in several - imageformats, such as BMP, JPG, TGA, PCX, PNG, and PSD. - \param filename Filename of the texture to be loaded. - \return Pointer to the texture, or 0 if the texture - could not be loaded. This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual ITexture* getTexture(const io::path& filename) = 0; - - //! Get access to a named texture. - /** Loads the texture from disk if it is not - already loaded and generates mipmap levels if desired. - Texture loading can be influenced using the - setTextureCreationFlag() method. The texture can be in several - imageformats, such as BMP, JPG, TGA, PCX, PNG, and PSD. - \param file Pointer to an already opened file. - \return Pointer to the texture, or 0 if the texture - could not be loaded. This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual ITexture* getTexture(io::IReadFile* file) =0; - - //! Returns a texture by index - /** \param index: Index of the texture, must be smaller than - getTextureCount() Please note that this index might change when - adding or removing textures - \return Pointer to the texture, or 0 if the texture was not - set or index is out of bounds. This pointer should not be - dropped. See IReferenceCounted::drop() for more information. */ - virtual ITexture* getTextureByIndex(u32 index) =0; - - //! Returns amount of textures currently loaded - /** \return Amount of textures currently loaded */ - virtual u32 getTextureCount() const = 0; - - //! Renames a texture - /** \param texture Pointer to the texture to rename. - \param newName New name for the texture. This should be a unique name. */ - virtual void renameTexture(ITexture* texture, const io::path& newName) = 0; - - //! Creates an empty texture of specified size. - /** \param size: Size of the texture. - \param name A name for the texture. Later calls to - getTexture() with this name will return this texture - \param format Desired color format of the texture. Please note - that the driver may choose to create the texture in another - color format. - \return Pointer to the newly created texture. This pointer - should not be dropped. See IReferenceCounted::drop() for more - information. */ - virtual ITexture* addTexture(const core::dimension2d<u32>& size, - const io::path& name, ECOLOR_FORMAT format = ECF_A8R8G8B8) = 0; - - //! Creates a texture from an IImage. - /** \param name A name for the texture. Later calls of - getTexture() with this name will return this texture - \param image Image the texture is created from. - \param mipmapData Optional pointer to a set of images which - build up the whole mipmap set. Must be images of the same color - type as image. If this parameter is not given, the mipmaps are - derived from image. - \return Pointer to the newly created texture. This pointer - should not be dropped. See IReferenceCounted::drop() for more - information. */ - virtual ITexture* addTexture(const io::path& name, IImage* image, void* mipmapData=0) = 0; - - //! Adds a new render target texture to the texture cache. - /** \param size Size of the texture, in pixels. Width and - height should be a power of two (e.g. 64, 128, 256, 512, ...) - and it should not be bigger than the backbuffer, because it - shares the zbuffer with the screen buffer. - \param name An optional name for the RTT. - \param format The color format of the render target. Floating point formats are supported. - \return Pointer to the created texture or 0 if the texture - could not be created. This pointer should not be dropped. See - IReferenceCounted::drop() for more information. */ - virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size, - const io::path& name = "rt", const ECOLOR_FORMAT format = ECF_UNKNOWN) =0; - - //! Removes a texture from the texture cache and deletes it. - /** This method can free a lot of memory! - Please note that after calling this, the pointer to the - ITexture may no longer be valid, if it was not grabbed before - by other parts of the engine for storing it longer. So it is a - good idea to set all materials which are using this texture to - 0 or another texture first. - \param texture Texture to delete from the engine cache. */ - virtual void removeTexture(ITexture* texture) =0; - - //! Removes all textures from the texture cache and deletes them. - /** This method can free a lot of memory! - Please note that after calling this, the pointer to the - ITexture may no longer be valid, if it was not grabbed before - by other parts of the engine for storing it longer. So it is a - good idea to set all materials which are using this texture to - 0 or another texture first. */ - virtual void removeAllTextures() =0; - - //! Remove hardware buffer - virtual void removeHardwareBuffer(const scene::IMeshBuffer* mb) =0; - - //! Remove all hardware buffers - virtual void removeAllHardwareBuffers() =0; - - //! Create occlusion query. - /** Use node for identification and mesh for occlusion test. */ - virtual void addOcclusionQuery(scene::ISceneNode* node, - const scene::IMesh* mesh=0) =0; - - //! Remove occlusion query. - virtual void removeOcclusionQuery(scene::ISceneNode* node) =0; - - //! Remove all occlusion queries. - virtual void removeAllOcclusionQueries() =0; - - //! Run occlusion query. Draws mesh stored in query. - /** If the mesh shall not be rendered visible, use - overrideMaterial to disable the color and depth buffer. */ - virtual void runOcclusionQuery(scene::ISceneNode* node, bool visible=false) =0; - - //! Run all occlusion queries. Draws all meshes stored in queries. - /** If the meshes shall not be rendered visible, use - overrideMaterial to disable the color and depth buffer. */ - virtual void runAllOcclusionQueries(bool visible=false) =0; - - //! Update occlusion query. Retrieves results from GPU. - /** If the query shall not block, set the flag to false. - Update might not occur in this case, though */ - virtual void updateOcclusionQuery(scene::ISceneNode* node, bool block=true) =0; - - //! Update all occlusion queries. Retrieves results from GPU. - /** If the query shall not block, set the flag to false. - Update might not occur in this case, though */ - virtual void updateAllOcclusionQueries(bool block=true) =0; - - //! Return query result. - /** Return value is the number of visible pixels/fragments. - The value is a safe approximation, i.e. can be larger than the - actual value of pixels. */ - virtual u32 getOcclusionQueryResult(scene::ISceneNode* node) const =0; - - //! Sets a boolean alpha channel on the texture based on a color key. - /** This makes the texture fully transparent at the texels where - this color key can be found when using for example draw2DImage - with useAlphachannel==true. The alpha of other texels is not modified. - \param texture Texture whose alpha channel is modified. - \param color Color key color. Every texel with this color will - become fully transparent as described above. Please note that the - colors of a texture may be converted when loading it, so the - color values may not be exactly the same in the engine and for - example in picture edit programs. To avoid this problem, you - could use the makeColorKeyTexture method, which takes the - position of a pixel instead a color value. - \param zeroTexels \deprecated If set to true, then any texels that match - the color key will have their color, as well as their alpha, set to zero - (i.e. black). This behavior matches the legacy (buggy) behavior prior - to release 1.5 and is provided for backwards compatibility only. - This parameter may be removed by Irrlicht 1.9. */ - virtual void makeColorKeyTexture(video::ITexture* texture, - video::SColor color, - bool zeroTexels = false) const =0; - - //! Sets a boolean alpha channel on the texture based on the color at a position. - /** This makes the texture fully transparent at the texels where - the color key can be found when using for example draw2DImage - with useAlphachannel==true. The alpha of other texels is not modified. - \param texture Texture whose alpha channel is modified. - \param colorKeyPixelPos Position of a pixel with the color key - color. Every texel with this color will become fully transparent as - described above. - \param zeroTexels \deprecated If set to true, then any texels that match - the color key will have their color, as well as their alpha, set to zero - (i.e. black). This behavior matches the legacy (buggy) behavior prior - to release 1.5 and is provided for backwards compatibility only. - This parameter may be removed by Irrlicht 1.9. */ - virtual void makeColorKeyTexture(video::ITexture* texture, - core::position2d<s32> colorKeyPixelPos, - bool zeroTexels = false) const =0; - - //! Creates a normal map from a height map texture. - /** If the target texture has 32 bit, the height value is - stored in the alpha component of the texture as addition. This - value is used by the video::EMT_PARALLAX_MAP_SOLID material and - similar materials. - \param texture Texture whose alpha channel is modified. - \param amplitude Constant value by which the height - information is multiplied.*/ - virtual void makeNormalMapTexture(video::ITexture* texture, f32 amplitude=1.0f) const =0; - - //! Sets a new render target. - /** This will only work if the driver supports the - EVDF_RENDER_TO_TARGET feature, which can be queried with - queryFeature(). Usually, rendering to textures is done in this - way: - \code - // create render target - ITexture* target = driver->addRenderTargetTexture(core::dimension2d<u32>(128,128), "rtt1"); - - // ... - - driver->setRenderTarget(target); // set render target - // .. draw stuff here - driver->setRenderTarget(0); // set previous render target - \endcode - Please note that you cannot render 3D or 2D geometry with a - render target as texture on it when you are rendering the scene - into this render target at the same time. It is usually only - possible to render into a texture between the - IVideoDriver::beginScene() and endScene() method calls. - \param texture New render target. Must be a texture created with - IVideoDriver::addRenderTargetTexture(). If set to 0, it sets - the previous render target which was set before the last - setRenderTarget() call. - \param clearBackBuffer Clears the backbuffer of the render - target with the color parameter - \param clearZBuffer Clears the zBuffer of the rendertarget. - Note that because the frame buffer may share the zbuffer with - the rendertarget, its zbuffer might be partially cleared too - by this. - \param color The background color for the render target. - \return True if sucessful and false if not. */ - virtual bool setRenderTarget(video::ITexture* texture, - bool clearBackBuffer=true, bool clearZBuffer=true, - SColor color=video::SColor(0,0,0,0)) =0; - - //! set or reset special render targets - /** This method enables access to special color buffers such as - stereoscopic buffers or auxiliary buffers. - \param target Enum value for the render target - \param clearTarget Clears the target buffer with the color - parameter - \param clearZBuffer Clears the zBuffer of the rendertarget. - Note that because the main frame buffer may share the zbuffer with - the rendertarget, its zbuffer might be partially cleared too - by this. - \param color The background color for the render target. - \return True if sucessful and false if not. */ - virtual bool setRenderTarget(E_RENDER_TARGET target, bool clearTarget=true, - bool clearZBuffer=true, - SColor color=video::SColor(0,0,0,0)) =0; - - //! Sets new multiple render targets. - virtual bool setRenderTarget(const core::array<video::IRenderTarget>& texture, - bool clearBackBuffer=true, bool clearZBuffer=true, - SColor color=video::SColor(0,0,0,0)) =0; - - //! Sets a new viewport. - /** Every rendering operation is done into this new area. - \param area: Rectangle defining the new area of rendering - operations. */ - virtual void setViewPort(const core::rect<s32>& area) =0; - - //! Gets the area of the current viewport. - /** \return Rectangle of the current viewport. */ - virtual const core::rect<s32>& getViewPort() const =0; - - //! Draws a vertex primitive list - /** Note that, depending on the index type, some vertices might be not - accessible through the index list. The limit is at 65535 vertices for 16bit - indices. Please note that currently not all primitives are available for - all drivers, and some might be emulated via triangle renders. - \param vertices Pointer to array of vertices. - \param vertexCount Amount of vertices in the array. - \param indexList Pointer to array of indices. These define the vertices used - for each primitive. Depending on the pType, indices are interpreted as single - objects (for point like primitives), pairs (for lines), triplets (for - triangles), or quads. - \param primCount Amount of Primitives - \param vType Vertex type, e.g. video::EVT_STANDARD for S3DVertex. - \param pType Primitive type, e.g. scene::EPT_TRIANGLE_FAN for a triangle fan. - \param iType Index type, e.g. video::EIT_16BIT for 16bit indices. */ - virtual void drawVertexPrimitiveList(const void* vertices, u32 vertexCount, - const void* indexList, u32 primCount, - E_VERTEX_TYPE vType=EVT_STANDARD, - scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES, - E_INDEX_TYPE iType=EIT_16BIT) =0; - - //! Draws a vertex primitive list in 2d - /** Compared to the general (3d) version of this method, this - one sets up a 2d render mode, and uses only x and y of vectors. - Note that, depending on the index type, some vertices might be - not accessible through the index list. The limit is at 65535 - vertices for 16bit indices. Please note that currently not all - primitives are available for all drivers, and some might be - emulated via triangle renders. This function is not available - for the sw drivers. - \param vertices Pointer to array of vertices. - \param vertexCount Amount of vertices in the array. - \param indexList Pointer to array of indices. These define the - vertices used for each primitive. Depending on the pType, - indices are interpreted as single objects (for point like - primitives), pairs (for lines), triplets (for triangles), or - quads. - \param primCount Amount of Primitives - \param vType Vertex type, e.g. video::EVT_STANDARD for S3DVertex. - \param pType Primitive type, e.g. scene::EPT_TRIANGLE_FAN for a triangle fan. - \param iType Index type, e.g. video::EIT_16BIT for 16bit indices. */ - virtual void draw2DVertexPrimitiveList(const void* vertices, u32 vertexCount, - const void* indexList, u32 primCount, - E_VERTEX_TYPE vType=EVT_STANDARD, - scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES, - E_INDEX_TYPE iType=EIT_16BIT) =0; - - //! Draws an indexed triangle list. - /** Note that there may be at maximum 65536 vertices, because - the index list is an array of 16 bit values each with a maximum - value of 65536. If there are more than 65536 vertices in the - list, results of this operation are not defined. - \param vertices Pointer to array of vertices. - \param vertexCount Amount of vertices in the array. - \param indexList Pointer to array of indices. - \param triangleCount Amount of Triangles. Usually amount of indices / 3. */ - void drawIndexedTriangleList(const S3DVertex* vertices, - u32 vertexCount, const u16* indexList, u32 triangleCount) - { - drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_STANDARD, scene::EPT_TRIANGLES, EIT_16BIT); - } - - //! Draws an indexed triangle list. - /** Note that there may be at maximum 65536 vertices, because - the index list is an array of 16 bit values each with a maximum - value of 65536. If there are more than 65536 vertices in the - list, results of this operation are not defined. - \param vertices Pointer to array of vertices. - \param vertexCount Amount of vertices in the array. - \param indexList Pointer to array of indices. - \param triangleCount Amount of Triangles. Usually amount of indices / 3. */ - void drawIndexedTriangleList(const S3DVertex2TCoords* vertices, - u32 vertexCount, const u16* indexList, u32 triangleCount) - { - drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_2TCOORDS, scene::EPT_TRIANGLES, EIT_16BIT); - } - - //! Draws an indexed triangle list. - /** Note that there may be at maximum 65536 vertices, because - the index list is an array of 16 bit values each with a maximum - value of 65536. If there are more than 65536 vertices in the - list, results of this operation are not defined. - \param vertices Pointer to array of vertices. - \param vertexCount Amount of vertices in the array. - \param indexList Pointer to array of indices. - \param triangleCount Amount of Triangles. Usually amount of indices / 3. */ - void drawIndexedTriangleList(const S3DVertexTangents* vertices, - u32 vertexCount, const u16* indexList, u32 triangleCount) - { - drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_TANGENTS, scene::EPT_TRIANGLES, EIT_16BIT); - } - - //! Draws an indexed triangle fan. - /** Note that there may be at maximum 65536 vertices, because - the index list is an array of 16 bit values each with a maximum - value of 65536. If there are more than 65536 vertices in the - list, results of this operation are not defined. - \param vertices Pointer to array of vertices. - \param vertexCount Amount of vertices in the array. - \param indexList Pointer to array of indices. - \param triangleCount Amount of Triangles. Usually amount of indices - 2. */ - void drawIndexedTriangleFan(const S3DVertex* vertices, - u32 vertexCount, const u16* indexList, u32 triangleCount) - { - drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_STANDARD, scene::EPT_TRIANGLE_FAN, EIT_16BIT); - } - - //! Draws an indexed triangle fan. - /** Note that there may be at maximum 65536 vertices, because - the index list is an array of 16 bit values each with a maximum - value of 65536. If there are more than 65536 vertices in the - list, results of this operation are not defined. - \param vertices Pointer to array of vertices. - \param vertexCount Amount of vertices in the array. - \param indexList Pointer to array of indices. - \param triangleCount Amount of Triangles. Usually amount of indices - 2. */ - void drawIndexedTriangleFan(const S3DVertex2TCoords* vertices, - u32 vertexCount, const u16* indexList, u32 triangleCount) - { - drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_2TCOORDS, scene::EPT_TRIANGLE_FAN, EIT_16BIT); - } - - //! Draws an indexed triangle fan. - /** Note that there may be at maximum 65536 vertices, because - the index list is an array of 16 bit values each with a maximum - value of 65536. If there are more than 65536 vertices in the - list, results of this operation are not defined. - \param vertices Pointer to array of vertices. - \param vertexCount Amount of vertices in the array. - \param indexList Pointer to array of indices. - \param triangleCount Amount of Triangles. Usually amount of indices - 2. */ - void drawIndexedTriangleFan(const S3DVertexTangents* vertices, - u32 vertexCount, const u16* indexList, u32 triangleCount) - { - drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_TANGENTS, scene::EPT_TRIANGLE_FAN, EIT_16BIT); - } - - //! Draws a 3d line. - /** For some implementations, this method simply calls - drawVertexPrimitiveList for some triangles. - Note that the line is drawn using the current transformation - matrix and material. So if you need to draw the 3D line - independently of the current transformation, use - \code - driver->setMaterial(someMaterial); - driver->setTransform(video::ETS_WORLD, core::IdentityMatrix); - \endcode - for some properly set up material before drawing the line. - Some drivers support line thickness set in the material. - \param start Start of the 3d line. - \param end End of the 3d line. - \param color Color of the line. */ - virtual void draw3DLine(const core::vector3df& start, - const core::vector3df& end, SColor color = SColor(255,255,255,255)) =0; - - //! Draws a 3d triangle. - /** This method calls drawVertexPrimitiveList for some triangles. - This method works with all drivers because it simply calls - drawVertexPrimitiveList, but it is hence not very fast. - Note that the triangle is drawn using the current - transformation matrix and material. So if you need to draw it - independently of the current transformation, use - \code - driver->setMaterial(someMaterial); - driver->setTransform(video::ETS_WORLD, core::IdentityMatrix); - \endcode - for some properly set up material before drawing the triangle. - \param triangle The triangle to draw. - \param color Color of the line. */ - virtual void draw3DTriangle(const core::triangle3df& triangle, - SColor color = SColor(255,255,255,255)) =0; - - //! Draws a 3d axis aligned box. - /** This method simply calls draw3DLine for the edges of the - box. Note that the box is drawn using the current transformation - matrix and material. So if you need to draw it independently of - the current transformation, use - \code - driver->setMaterial(someMaterial); - driver->setTransform(video::ETS_WORLD, core::IdentityMatrix); - \endcode - for some properly set up material before drawing the box. - \param box The axis aligned box to draw - \param color Color to use while drawing the box. */ - virtual void draw3DBox(const core::aabbox3d<f32>& box, - SColor color = SColor(255,255,255,255)) =0; - - //! Draws a 2d image without any special effects - /** \param texture Pointer to texture to use. - \param destPos Upper left 2d destination position where the - image will be drawn. */ - virtual void draw2DImage(const video::ITexture* texture, - const core::position2d<s32>& destPos) =0; - - //! Draws a 2d image using a color - /** (if color is other than - Color(255,255,255,255)) and the alpha channel of the texture. - \param texture Texture to be drawn. - \param destPos Upper left 2d destination position where the - image will be drawn. - \param sourceRect Source rectangle in the image. - \param clipRect Pointer to rectangle on the screen where the - image is clipped to. - If this pointer is NULL the image is not clipped. - \param color Color with which the image is drawn. If the color - equals Color(255,255,255,255) it is ignored. Note that the - alpha component is used: If alpha is other than 255, the image - will be transparent. - \param useAlphaChannelOfTexture: If true, the alpha channel of - the texture is used to draw the image.*/ - virtual void draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos, - const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect =0, - SColor color=SColor(255,255,255,255), bool useAlphaChannelOfTexture=false) =0; - - //! Draws a set of 2d images, using a color and the alpha channel of the texture. - /** The images are drawn beginning at pos and concatenated in - one line. All drawings are clipped against clipRect (if != 0). - The subtextures are defined by the array of sourceRects and are - chosen by the indices given. - \param texture Texture to be drawn. - \param pos Upper left 2d destination position where the image - will be drawn. - \param sourceRects Source rectangles of the image. - \param indices List of indices which choose the actual - rectangle used each time. - \param kerningWidth Offset to Position on X - \param clipRect Pointer to rectangle on the screen where the - image is clipped to. - If this pointer is 0 then the image is not clipped. - \param color Color with which the image is drawn. - Note that the alpha component is used. If alpha is other than - 255, the image will be transparent. - \param useAlphaChannelOfTexture: If true, the alpha channel of - the texture is used to draw the image. */ - virtual void draw2DImageBatch(const video::ITexture* texture, - const core::position2d<s32>& pos, - const core::array<core::rect<s32> >& sourceRects, - const core::array<s32>& indices, - s32 kerningWidth=0, - const core::rect<s32>* clipRect=0, - SColor color=SColor(255,255,255,255), - bool useAlphaChannelOfTexture=false) =0; - - //! Draws a set of 2d images, using a color and the alpha channel of the texture. - /** All drawings are clipped against clipRect (if != 0). - The subtextures are defined by the array of sourceRects and are - positioned using the array of positions. - \param texture Texture to be drawn. - \param positions Array of upper left 2d destinations where the - images will be drawn. - \param sourceRects Source rectangles of the image. - \param clipRect Pointer to rectangle on the screen where the - images are clipped to. - If this pointer is 0 then the image is not clipped. - \param color Color with which the image is drawn. - Note that the alpha component is used. If alpha is other than - 255, the image will be transparent. - \param useAlphaChannelOfTexture: If true, the alpha channel of - the texture is used to draw the image. */ - virtual void draw2DImageBatch(const video::ITexture* texture, - const core::array<core::position2d<s32> >& positions, - const core::array<core::rect<s32> >& sourceRects, - const core::rect<s32>* clipRect=0, - SColor color=SColor(255,255,255,255), - bool useAlphaChannelOfTexture=false) =0; - - //! Draws a part of the texture into the rectangle. Note that colors must be an array of 4 colors if used. - /** Suggested and first implemented by zola. - \param texture The texture to draw from - \param destRect The rectangle to draw into - \param sourceRect The rectangle denoting a part of the texture - \param clipRect Clips the destination rectangle (may be 0) - \param colors Array of 4 colors denoting the color values of - the corners of the destRect - \param useAlphaChannelOfTexture True if alpha channel will be - blended. */ - virtual void draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect, - const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect =0, - const video::SColor * const colors=0, bool useAlphaChannelOfTexture=false) =0; - - //! Draws a 2d rectangle. - /** \param color Color of the rectangle to draw. The alpha - component will not be ignored and specifies how transparent the - rectangle will be. - \param pos Position of the rectangle. - \param clip Pointer to rectangle against which the rectangle - will be clipped. If the pointer is null, no clipping will be - performed. */ - virtual void draw2DRectangle(SColor color, const core::rect<s32>& pos, - const core::rect<s32>* clip =0) =0; - - //! Draws a 2d rectangle with a gradient. - /** \param colorLeftUp Color of the upper left corner to draw. - The alpha component will not be ignored and specifies how - transparent the rectangle will be. - \param colorRightUp Color of the upper right corner to draw. - The alpha component will not be ignored and specifies how - transparent the rectangle will be. - \param colorLeftDown Color of the lower left corner to draw. - The alpha component will not be ignored and specifies how - transparent the rectangle will be. - \param colorRightDown Color of the lower right corner to draw. - The alpha component will not be ignored and specifies how - transparent the rectangle will be. - \param pos Position of the rectangle. - \param clip Pointer to rectangle against which the rectangle - will be clipped. If the pointer is null, no clipping will be - performed. */ - virtual void draw2DRectangle(const core::rect<s32>& pos, - SColor colorLeftUp, SColor colorRightUp, - SColor colorLeftDown, SColor colorRightDown, - const core::rect<s32>* clip =0) =0; - - //! Draws the outline of a 2D rectangle. - /** \param pos Position of the rectangle. - \param color Color of the rectangle to draw. The alpha component - specifies how transparent the rectangle outline will be. */ - virtual void draw2DRectangleOutline(const core::recti& pos, - SColor color=SColor(255,255,255,255)) =0; - - //! Draws a 2d line. Both start and end will be included in coloring. - /** \param start Screen coordinates of the start of the line - in pixels. - \param end Screen coordinates of the start of the line in - pixels. - \param color Color of the line to draw. */ - virtual void draw2DLine(const core::position2d<s32>& start, - const core::position2d<s32>& end, - SColor color=SColor(255,255,255,255)) =0; - - //! Draws a pixel. - /** \param x The x-position of the pixel. - \param y The y-position of the pixel. - \param color Color of the pixel to draw. */ - virtual void drawPixel(u32 x, u32 y, const SColor& color) =0; - - //! Draws a non filled concyclic regular 2d polyon. - /** This method can be used to draw circles, but also - triangles, tetragons, pentagons, hexagons, heptagons, octagons, - enneagons, decagons, hendecagons, dodecagon, triskaidecagons, - etc. I think you'll got it now. And all this by simply - specifying the vertex count. Welcome to the wonders of - geometry. - \param center Position of center of circle (pixels). - \param radius Radius of circle in pixels. - \param color Color of the circle. - \param vertexCount Amount of vertices of the polygon. Specify 2 - to draw a line, 3 to draw a triangle, 4 for tetragons and a lot - (>10) for nearly a circle. */ - virtual void draw2DPolygon(core::position2d<s32> center, - f32 radius, - video::SColor color=SColor(100,255,255,255), - s32 vertexCount=10) =0; - - //! Draws a shadow volume into the stencil buffer. - /** To draw a stencil shadow, do this: First, draw all geometry. - Then use this method, to draw the shadow volume. Then, use - IVideoDriver::drawStencilShadow() to visualize the shadow. - Please note that the code for the opengl version of the method - is based on free code sent in by Philipp Dortmann, lots of - thanks go to him! - \param triangles Array of 3d vectors, specifying the shadow - volume. - \param zfail If set to true, zfail method is used, otherwise - zpass. - \param debugDataVisible The debug data that is enabled for this - shadow node - */ - virtual void drawStencilShadowVolume(const core::array<core::vector3df>& triangles, bool zfail=true, u32 debugDataVisible=0) =0; - - //! Fills the stencil shadow with color. - /** After the shadow volume has been drawn into the stencil - buffer using IVideoDriver::drawStencilShadowVolume(), use this - to draw the color of the shadow. - Please note that the code for the opengl version of the method - is based on free code sent in by Philipp Dortmann, lots of - thanks go to him! - \param clearStencilBuffer Set this to false, if you want to - draw every shadow with the same color, and only want to call - drawStencilShadow() once after all shadow volumes have been - drawn. Set this to true, if you want to paint every shadow with - its own color. - \param leftUpEdge Color of the shadow in the upper left corner - of screen. - \param rightUpEdge Color of the shadow in the upper right - corner of screen. - \param leftDownEdge Color of the shadow in the lower left - corner of screen. - \param rightDownEdge Color of the shadow in the lower right - corner of screen. */ - virtual void drawStencilShadow(bool clearStencilBuffer=false, - video::SColor leftUpEdge = video::SColor(255,0,0,0), - video::SColor rightUpEdge = video::SColor(255,0,0,0), - video::SColor leftDownEdge = video::SColor(255,0,0,0), - video::SColor rightDownEdge = video::SColor(255,0,0,0)) =0; - - //! Draws a mesh buffer - /** \param mb Buffer to draw */ - virtual void drawMeshBuffer(const scene::IMeshBuffer* mb) =0; - - //! Draws normals of a mesh buffer - /** \param mb Buffer to draw the normals of - \param length length scale factor of the normals - \param color Color the normals are rendered with - */ - virtual void drawMeshBufferNormals(const scene::IMeshBuffer* mb, f32 length=10.f, SColor color=0xffffffff) =0; - - //! Sets the fog mode. - /** These are global values attached to each 3d object rendered, - which has the fog flag enabled in its material. - \param color Color of the fog - \param fogType Type of fog used - \param start Only used in linear fog mode (linearFog=true). - Specifies where fog starts. - \param end Only used in linear fog mode (linearFog=true). - Specifies where fog ends. - \param density Only used in exponential fog mode - (linearFog=false). Must be a value between 0 and 1. - \param pixelFog Set this to false for vertex fog, and true if - you want per-pixel fog. - \param rangeFog Set this to true to enable range-based vertex - fog. The distance from the viewer is used to compute the fog, - not the z-coordinate. This is better, but slower. This might not - be available with all drivers and fog settings. */ - virtual void setFog(SColor color=SColor(0,255,255,255), - E_FOG_TYPE fogType=EFT_FOG_LINEAR, - f32 start=50.0f, f32 end=100.0f, f32 density=0.01f, - bool pixelFog=false, bool rangeFog=false) =0; - - //! Gets the fog mode. - virtual void getFog(SColor& color, E_FOG_TYPE& fogType, - f32& start, f32& end, f32& density, - bool& pixelFog, bool& rangeFog) = 0; - - //! Get the current color format of the color buffer - /** \return Color format of the color buffer. */ - virtual ECOLOR_FORMAT getColorFormat() const =0; - - //! Get the size of the screen or render window. - /** \return Size of screen or render window. */ - virtual const core::dimension2d<u32>& getScreenSize() const =0; - - //! Get the size of the current render target - /** This method will return the screen size if the driver - doesn't support render to texture, or if the current render - target is the screen. - \return Size of render target or screen/window */ - virtual const core::dimension2d<u32>& getCurrentRenderTargetSize() const =0; - - //! Returns current frames per second value. - /** This value is updated approximately every 1.5 seconds and - is only intended to provide a rough guide to the average frame - rate. It is not suitable for use in performing timing - calculations or framerate independent movement. - \return Approximate amount of frames per second drawn. */ - virtual s32 getFPS() const =0; - - //! Returns amount of primitives (mostly triangles) which were drawn in the last frame. - /** Together with getFPS() very useful method for statistics. - \param mode Defines if the primitives drawn are accumulated or - counted per frame. - \return Amount of primitives drawn in the last frame. */ - virtual u32 getPrimitiveCountDrawn( u32 mode =0 ) const =0; - - //! Deletes all dynamic lights which were previously added with addDynamicLight(). - virtual void deleteAllDynamicLights() =0; - - //! adds a dynamic light, returning an index to the light - //! \param light: the light data to use to create the light - //! \return An index to the light, or -1 if an error occurs - virtual s32 addDynamicLight(const SLight& light) =0; - - //! Returns the maximal amount of dynamic lights the device can handle - /** \return Maximal amount of dynamic lights. */ - virtual u32 getMaximalDynamicLightAmount() const =0; - - //! Returns amount of dynamic lights currently set - /** \return Amount of dynamic lights currently set */ - virtual u32 getDynamicLightCount() const =0; - - //! Returns light data which was previously set by IVideoDriver::addDynamicLight(). - /** \param idx Zero based index of the light. Must be 0 or - greater and smaller than IVideoDriver::getDynamicLightCount. - \return Light data. */ - virtual const SLight& getDynamicLight(u32 idx) const =0; - - //! Turns a dynamic light on or off - //! \param lightIndex: the index returned by addDynamicLight - //! \param turnOn: true to turn the light on, false to turn it off - virtual void turnLightOn(s32 lightIndex, bool turnOn) =0; - - //! Gets name of this video driver. - /** \return Returns the name of the video driver, e.g. in case - of the Direct3D8 driver, it would return "Direct3D 8.1". */ - virtual const wchar_t* getName() const =0; - - //! Adds an external image loader to the engine. - /** This is useful if the Irrlicht Engine should be able to load - textures of currently unsupported file formats (e.g. gif). The - IImageLoader only needs to be implemented for loading this file - format. A pointer to the implementation can be passed to the - engine using this method. - \param loader Pointer to the external loader created. */ - virtual void addExternalImageLoader(IImageLoader* loader) =0; - - //! Adds an external image writer to the engine. - /** This is useful if the Irrlicht Engine should be able to - write textures of currently unsupported file formats (e.g - .gif). The IImageWriter only needs to be implemented for - writing this file format. A pointer to the implementation can - be passed to the engine using this method. - \param writer: Pointer to the external writer created. */ - virtual void addExternalImageWriter(IImageWriter* writer) =0; - - //! Returns the maximum amount of primitives - /** (mostly vertices) which the device is able to render with - one drawVertexPrimitiveList call. - \return Maximum amount of primitives. */ - virtual u32 getMaximalPrimitiveCount() const =0; - - //! Enables or disables a texture creation flag. - /** These flags define how textures should be created. By - changing this value, you can influence for example the speed of - rendering a lot. But please note that the video drivers take - this value only as recommendation. It could happen that you - enable the ETCF_ALWAYS_16_BIT mode, but the driver still creates - 32 bit textures. - \param flag Texture creation flag. - \param enabled Specifies if the given flag should be enabled or - disabled. */ - virtual void setTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag, bool enabled=true) =0; - - //! Returns if a texture creation flag is enabled or disabled. - /** You can change this value using setTextureCreationFlag(). - \param flag Texture creation flag. - \return The current texture creation flag enabled mode. */ - virtual bool getTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag) const =0; - - //! Creates a software image from a file. - /** No hardware texture will be created for this image. This - method is useful for example if you want to read a heightmap - for a terrain renderer. - \param filename Name of the file from which the image is - created. - \return The created image. - If you no longer need the image, you should call IImage::drop(). - See IReferenceCounted::drop() for more information. */ - virtual IImage* createImageFromFile(const io::path& filename) = 0; - - //! Creates a software image from a file. - /** No hardware texture will be created for this image. This - method is useful for example if you want to read a heightmap - for a terrain renderer. - \param file File from which the image is created. - \return The created image. - If you no longer need the image, you should call IImage::drop(). - See IReferenceCounted::drop() for more information. */ - virtual IImage* createImageFromFile(io::IReadFile* file) =0; - - //! Writes the provided image to a file. - /** Requires that there is a suitable image writer registered - for writing the image. - \param image Image to write. - \param filename Name of the file to write. - \param param Control parameter for the backend (e.g. compression - level). - \return True on successful write. */ - virtual bool writeImageToFile(IImage* image, const io::path& filename, u32 param = 0) = 0; - - //! Writes the provided image to a file. - /** Requires that there is a suitable image writer registered - for writing the image. - \param image Image to write. - \param file An already open io::IWriteFile object. The name - will be used to determine the appropriate image writer to use. - \param param Control parameter for the backend (e.g. compression - level). - \return True on successful write. */ - virtual bool writeImageToFile(IImage* image, io::IWriteFile* file, u32 param =0) =0; - - //! Creates a software image from a byte array. - /** No hardware texture will be created for this image. This - method is useful for example if you want to read a heightmap - for a terrain renderer. - \param format Desired color format of the texture - \param size Desired size of the image - \param data A byte array with pixel color information - \param ownForeignMemory If true, the image will use the data - pointer directly and own it afterwards. If false, the memory - will by copied internally. - \param deleteMemory Whether the memory is deallocated upon - destruction. - \return The created image. - If you no longer need the image, you should call IImage::drop(). - See IReferenceCounted::drop() for more information. */ - virtual IImage* createImageFromData(ECOLOR_FORMAT format, - const core::dimension2d<u32>& size, void *data, - bool ownForeignMemory=false, - bool deleteMemory = true) =0; - - //! Creates an empty software image. - /** - \param format Desired color format of the image. - \param size Size of the image to create. - \return The created image. - If you no longer need the image, you should call IImage::drop(). - See IReferenceCounted::drop() for more information. */ - virtual IImage* createImage(ECOLOR_FORMAT format, const core::dimension2d<u32>& size) =0; - - //! Creates a software image by converting it to given format from another image. - /** \deprecated Create an empty image and use copyTo(). This method may be removed by Irrlicht 1.9. - \param format Desired color format of the image. - \param imageToCopy Image to copy to the new image. - \return The created image. - If you no longer need the image, you should call IImage::drop(). - See IReferenceCounted::drop() for more information. */ - _IRR_DEPRECATED_ virtual IImage* createImage(ECOLOR_FORMAT format, IImage *imageToCopy) =0; - - //! Creates a software image from a part of another image. - /** \deprecated Create an empty image and use copyTo(). This method may be removed by Irrlicht 1.9. - \param imageToCopy Image to copy to the new image in part. - \param pos Position of rectangle to copy. - \param size Extents of rectangle to copy. - \return The created image. - If you no longer need the image, you should call IImage::drop(). - See IReferenceCounted::drop() for more information. */ - _IRR_DEPRECATED_ virtual IImage* createImage(IImage* imageToCopy, - const core::position2d<s32>& pos, - const core::dimension2d<u32>& size) =0; - - //! Creates a software image from a part of a texture. - /** - \param texture Texture to copy to the new image in part. - \param pos Position of rectangle to copy. - \param size Extents of rectangle to copy. - \return The created image. - If you no longer need the image, you should call IImage::drop(). - See IReferenceCounted::drop() for more information. */ - virtual IImage* createImage(ITexture* texture, - const core::position2d<s32>& pos, - const core::dimension2d<u32>& size) =0; - - //! Event handler for resize events. Only used by the engine internally. - /** Used to notify the driver that the window was resized. - Usually, there is no need to call this method. */ - virtual void OnResize(const core::dimension2d<u32>& size) =0; - - //! Adds a new material renderer to the video device. - /** Use this method to extend the VideoDriver with new material - types. To extend the engine using this method do the following: - Derive a class from IMaterialRenderer and override the methods - you need. For setting the right renderstates, you can try to - get a pointer to the real rendering device using - IVideoDriver::getExposedVideoData(). Add your class with - IVideoDriver::addMaterialRenderer(). To use an object being - displayed with your new material, set the MaterialType member of - the SMaterial struct to the value returned by this method. - If you simply want to create a new material using vertex and/or - pixel shaders it would be easier to use the - video::IGPUProgrammingServices interface which you can get - using the getGPUProgrammingServices() method. - \param renderer A pointer to the new renderer. - \param name Optional name for the material renderer entry. - \return The number of the material type which can be set in - SMaterial::MaterialType to use the renderer. -1 is returned if - an error occured. For example if you tried to add an material - renderer to the software renderer or the null device, which do - not accept material renderers. */ - virtual s32 addMaterialRenderer(IMaterialRenderer* renderer, const c8* name =0) =0; - - //! Get access to a material renderer by index. - /** \param idx Id of the material renderer. Can be a value of - the E_MATERIAL_TYPE enum or a value which was returned by - addMaterialRenderer(). - \return Pointer to material renderer or null if not existing. */ - virtual IMaterialRenderer* getMaterialRenderer(u32 idx) =0; - - //! Get amount of currently available material renderers. - /** \return Amount of currently available material renderers. */ - virtual u32 getMaterialRendererCount() const =0; - - //! Get name of a material renderer - /** This string can, e.g., be used to test if a specific - renderer already has been registered/created, or use this - string to store data about materials: This returned name will - be also used when serializing materials. - \param idx Id of the material renderer. Can be a value of the - E_MATERIAL_TYPE enum or a value which was returned by - addMaterialRenderer(). - \return String with the name of the renderer, or 0 if not - exisiting */ - virtual const c8* getMaterialRendererName(u32 idx) const =0; - - //! Sets the name of a material renderer. - /** Will have no effect on built-in material renderers. - \param idx: Id of the material renderer. Can be a value of the - E_MATERIAL_TYPE enum or a value which was returned by - addMaterialRenderer(). - \param name: New name of the material renderer. */ - virtual void setMaterialRendererName(s32 idx, const c8* name) =0; - - //! Creates material attributes list from a material - /** This method is useful for serialization and more. - Please note that the video driver will use the material - renderer names from getMaterialRendererName() to write out the - material type name, so they should be set before. - \param material The material to serialize. - \param options Additional options which might influence the - serialization. - \return The io::IAttributes container holding the material - properties. */ - virtual io::IAttributes* createAttributesFromMaterial(const video::SMaterial& material, - io::SAttributeReadWriteOptions* options=0) =0; - - //! Fills an SMaterial structure from attributes. - /** Please note that for setting material types of the - material, the video driver will need to query the material - renderers for their names, so all non built-in materials must - have been created before calling this method. - \param outMaterial The material to set the properties for. - \param attributes The attributes to read from. */ - virtual void fillMaterialStructureFromAttributes(video::SMaterial& outMaterial, io::IAttributes* attributes) =0; - - //! Returns driver and operating system specific data about the IVideoDriver. - /** This method should only be used if the engine should be - extended without having to modify the source of the engine. - \return Collection of device dependent pointers. */ - virtual const SExposedVideoData& getExposedVideoData() =0; - - //! Get type of video driver - /** \return Type of driver. */ - virtual E_DRIVER_TYPE getDriverType() const =0; - - //! Gets the IGPUProgrammingServices interface. - /** \return Pointer to the IGPUProgrammingServices. Returns 0 - if the video driver does not support this. For example the - Software driver and the Null driver will always return 0. */ - virtual IGPUProgrammingServices* getGPUProgrammingServices() =0; - - //! Returns a pointer to the mesh manipulator. - virtual scene::IMeshManipulator* getMeshManipulator() =0; - - //! Clears the ZBuffer. - /** Note that you usually need not to call this method, as it - is automatically done in IVideoDriver::beginScene() or - IVideoDriver::setRenderTarget() if you enable zBuffer. But if - you have to render some special things, you can clear the - zbuffer during the rendering process with this method any time. - */ - virtual void clearZBuffer() =0; - - //! Make a screenshot of the last rendered frame. - /** \return An image created from the last rendered frame. */ - virtual IImage* createScreenShot(video::ECOLOR_FORMAT format=video::ECF_UNKNOWN, video::E_RENDER_TARGET target=video::ERT_FRAME_BUFFER) =0; - - //! Check if the image is already loaded. - /** Works similar to getTexture(), but does not load the texture - if it is not currently loaded. - \param filename Name of the texture. - \return Pointer to loaded texture, or 0 if not found. */ - virtual video::ITexture* findTexture(const io::path& filename) = 0; - - //! Set or unset a clipping plane. - /** There are at least 6 clipping planes available for the user - to set at will. - \param index The plane index. Must be between 0 and - MaxUserClipPlanes. - \param plane The plane itself. - \param enable If true, enable the clipping plane else disable - it. - \return True if the clipping plane is usable. */ - virtual bool setClipPlane(u32 index, const core::plane3df& plane, bool enable=false) =0; - - //! Enable or disable a clipping plane. - /** There are at least 6 clipping planes available for the user - to set at will. - \param index The plane index. Must be between 0 and - MaxUserClipPlanes. - \param enable If true, enable the clipping plane else disable - it. */ - virtual void enableClipPlane(u32 index, bool enable) =0; - - //! Set the minimum number of vertices for which a hw buffer will be created - /** \param count Number of vertices to set as minimum. */ - virtual void setMinHardwareBufferVertexCount(u32 count) =0; - - //! Get the global Material, which might override local materials. - /** Depending on the enable flags, values from this Material - are used to override those of local materials of some - meshbuffer being rendered. - \return Reference to the Override Material. */ - virtual SOverrideMaterial& getOverrideMaterial() =0; - - //! Get the 2d override material for altering its values - /** The 2d override materual allows to alter certain render - states of the 2d methods. Not all members of SMaterial are - honored, especially not MaterialType and Textures. Moreover, - the zbuffer is always ignored, and lighting is always off. All - other flags can be changed, though some might have to effect - in most cases. - Please note that you have to enable/disable this effect with - enableInitMaterial2D(). This effect is costly, as it increases - the number of state changes considerably. Always reset the - values when done. - \return Material reference which should be altered to reflect - the new settings. - */ - virtual SMaterial& getMaterial2D() =0; - - //! Enable the 2d override material - /** \param enable Flag which tells whether the material shall be - enabled or disabled. */ - virtual void enableMaterial2D(bool enable=true) =0; - - //! Get the graphics card vendor name. - virtual core::stringc getVendorInfo() =0; - - //! Only used by the engine internally. - /** The ambient color is set in the scene manager, see - scene::ISceneManager::setAmbientLight(). - \param color New color of the ambient light. */ - virtual void setAmbientLight(const SColorf& color) =0; - - //! Only used by the engine internally. - /** Passes the global material flag AllowZWriteOnTransparent. - Use the SceneManager attribute to set this value from your app. - \param flag Default behavior is to disable ZWrite, i.e. false. */ - virtual void setAllowZWriteOnTransparent(bool flag) =0; - - //! Get the maximum texture size supported. - virtual core::dimension2du getMaxTextureSize() const =0; - - //! Color conversion convenience function - /** Convert an image (as array of pixels) from source to destination - array, thereby converting the color format. The pixel size is - determined by the color formats. - \param sP Pointer to source - \param sF Color format of source - \param sN Number of pixels to convert, both array must be large enough - \param dP Pointer to destination - \param dF Color format of destination - */ - virtual void convertColor(const void* sP, ECOLOR_FORMAT sF, s32 sN, - void* dP, ECOLOR_FORMAT dF) const =0; - }; - -} // end namespace video -} // end namespace irr - - -#endif diff --git a/builddir/irrlicht-1.8.1/include/IVideoModeList.h b/builddir/irrlicht-1.8.1/include/IVideoModeList.h deleted file mode 100644 index aef0f5a..0000000 --- a/builddir/irrlicht-1.8.1/include/IVideoModeList.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_I_VIDEO_MODE_LIST_H_INCLUDED__ -#define __IRR_I_VIDEO_MODE_LIST_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "dimension2d.h" - -namespace irr -{ -namespace video -{ - - //! A list of all available video modes. - /** You can get a list via IrrlichtDevice::getVideoModeList(). If you are confused - now, because you think you have to create an Irrlicht Device with a video - mode before being able to get the video mode list, let me tell you that - there is no need to start up an Irrlicht Device with EDT_DIRECT3D8, EDT_OPENGL or - EDT_SOFTWARE: For this (and for lots of other reasons) the null device, - EDT_NULL exists.*/ - class IVideoModeList : public virtual IReferenceCounted - { - public: - - //! Gets amount of video modes in the list. - /** \return Returns amount of video modes. */ - virtual s32 getVideoModeCount() const = 0; - - //! Get the screen size of a video mode in pixels. - /** \param modeNumber: zero based index of the video mode. - \return Size of screen in pixels of the specified video mode. */ - virtual core::dimension2d<u32> getVideoModeResolution(s32 modeNumber) const = 0; - - //! Get a supported screen size with certain constraints. - /** \param minSize: Minimum dimensions required. - \param maxSize: Maximum dimensions allowed. - \return Size of screen in pixels which matches the requirements. - as good as possible. */ - virtual core::dimension2d<u32> getVideoModeResolution(const core::dimension2d<u32>& minSize, const core::dimension2d<u32>& maxSize) const = 0; - - //! Get the pixel depth of a video mode in bits. - /** \param modeNumber: zero based index of the video mode. - \return Size of each pixel of the specified video mode in bits. */ - virtual s32 getVideoModeDepth(s32 modeNumber) const = 0; - - //! Get current desktop screen resolution. - /** \return Size of screen in pixels of the current desktop video mode. */ - virtual const core::dimension2d<u32>& getDesktopResolution() const = 0; - - //! Get the pixel depth of a video mode in bits. - /** \return Size of each pixel of the current desktop video mode in bits. */ - virtual s32 getDesktopDepth() const = 0; - }; - -} // end namespace video -} // end namespace irr - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IVolumeLightSceneNode.h b/builddir/irrlicht-1.8.1/include/IVolumeLightSceneNode.h deleted file mode 100644 index 8ae2d17..0000000 --- a/builddir/irrlicht-1.8.1/include/IVolumeLightSceneNode.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h -// -// created by Dean Wadsworth aka Varmint Dec 31 2007 - -#ifndef __I_VOLUME_LIGHT_SCENE_NODE_H_INCLUDED__ -#define __I_VOLUME_LIGHT_SCENE_NODE_H_INCLUDED__ - -#include "ISceneNode.h" - -namespace irr -{ -namespace scene -{ - class IMeshBuffer; - - class IVolumeLightSceneNode : public ISceneNode - { - public: - - //! constructor - IVolumeLightSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, - const core::vector3df& position, - const core::vector3df& rotation, - const core::vector3df& scale) - : ISceneNode(parent, mgr, id, position, rotation, scale) {}; - - //! Returns type of the scene node - virtual ESCENE_NODE_TYPE getType() const { return ESNT_VOLUME_LIGHT; } - - //! Sets the number of segments across the U axis - virtual void setSubDivideU(const u32 inU) =0; - - //! Sets the number of segments across the V axis - virtual void setSubDivideV(const u32 inV) =0; - - //! Returns the number of segments across the U axis - virtual u32 getSubDivideU() const =0; - - //! Returns the number of segments across the V axis - virtual u32 getSubDivideV() const =0; - - //! Sets the color of the base of the light - virtual void setFootColor(const video::SColor inColor) =0; - - //! Sets the color of the tip of the light - virtual void setTailColor(const video::SColor inColor) =0; - - //! Returns the color of the base of the light - virtual video::SColor getFootColor() const =0; - - //! Returns the color of the tip of the light - virtual video::SColor getTailColor() const =0; - }; - -} // end namespace scene -} // end namespace irr - -#endif diff --git a/builddir/irrlicht-1.8.1/include/IWriteFile.h b/builddir/irrlicht-1.8.1/include/IWriteFile.h deleted file mode 100644 index 7bc9f20..0000000 --- a/builddir/irrlicht-1.8.1/include/IWriteFile.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_WRITE_FILE_H_INCLUDED__ -#define __I_WRITE_FILE_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "path.h" - -namespace irr -{ -namespace io -{ - - //! Interface providing write access to a file. - class IWriteFile : public virtual IReferenceCounted - { - public: - //! Writes an amount of bytes to the file. - /** \param buffer Pointer to buffer of bytes to write. - \param sizeToWrite Amount of bytes to write to the file. - \return How much bytes were written. */ - virtual s32 write(const void* buffer, u32 sizeToWrite) = 0; - - //! Changes position in file - /** \param finalPos Destination position in the file. - \param relativeMovement If set to true, the position in the file is - changed relative to current position. Otherwise the position is changed - from begin of file. - \return True if successful, otherwise false. */ - virtual bool seek(long finalPos, bool relativeMovement = false) = 0; - - //! Get the current position in the file. - /** \return Current position in the file in bytes. */ - virtual long getPos() const = 0; - - //! Get name of file. - /** \return File name as zero terminated character string. */ - virtual const path& getFileName() const = 0; - }; - - //! Internal function, please do not use. - IWriteFile* createWriteFile(const io::path& fileName, bool append); - -} // end namespace io -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IXMLReader.h b/builddir/irrlicht-1.8.1/include/IXMLReader.h deleted file mode 100644 index ec47c00..0000000 --- a/builddir/irrlicht-1.8.1/include/IXMLReader.h +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_XML_READER_H_INCLUDED__ -#define __I_XML_READER_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "irrXML.h" - -namespace irr -{ -namespace io -{ - //! An xml reader for wide characters, derived from IReferenceCounted. - /** This XML Parser can read any type of text files from any source - Irrlicht can read. Just call IFileSystem::createXMLReader(). For more - informations on how to use the parser, see IIrrXMLReader */ - typedef IIrrXMLReader<wchar_t, IReferenceCounted> IXMLReader; - - //! An xml reader for ASCII or UTF-8 characters, derived from IReferenceCounted. - /** This XML Parser can read any type of text files from any source - Irrlicht can read. Just call IFileSystem::createXMLReaderUTF8(). For - more informations on how to use the parser, see IIrrXMLReader */ - typedef IIrrXMLReader<c8, IReferenceCounted> IXMLReaderUTF8; - -} // end namespace io -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IXMLWriter.h b/builddir/irrlicht-1.8.1/include/IXMLWriter.h deleted file mode 100644 index 8b43bc9..0000000 --- a/builddir/irrlicht-1.8.1/include/IXMLWriter.h +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_XML_WRITER_H_INCLUDED__ -#define __I_XML_WRITER_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "irrArray.h" -#include "irrString.h" - -namespace irr -{ -namespace io -{ - - //! Interface providing methods for making it easier to write XML files. - /** This XML Writer writes xml files using in the platform dependent - wchar_t format and sets the xml-encoding correspondingly. */ - class IXMLWriter : public virtual IReferenceCounted - { - public: - //! Writes an xml 1.0 header. - /** Looks like <?xml version="1.0"?>. This should always - be called before writing anything other, because also the text - file header for unicode texts is written out with this method. */ - virtual void writeXMLHeader() = 0; - - //! Writes an xml element with maximal 5 attributes like "<foo />" or - //! <foo optAttr="value" />. - /** The element can be empty or not. - \param name: Name of the element - \param empty: Specifies if the element should be empty. Like - "<foo />". If You set this to false, something like this is - written instead: "<foo>". - \param attr1Name: 1st attributes name - \param attr1Value: 1st attributes value - \param attr2Name: 2nd attributes name - \param attr2Value: 2nd attributes value - \param attr3Name: 3rd attributes name - \param attr3Value: 3rd attributes value - \param attr4Name: 4th attributes name - \param attr4Value: 4th attributes value - \param attr5Name: 5th attributes name - \param attr5Value: 5th attributes value */ - virtual void writeElement(const wchar_t* name, bool empty=false, - const wchar_t* attr1Name = 0, const wchar_t* attr1Value = 0, - const wchar_t* attr2Name = 0, const wchar_t* attr2Value = 0, - const wchar_t* attr3Name = 0, const wchar_t* attr3Value = 0, - const wchar_t* attr4Name = 0, const wchar_t* attr4Value = 0, - const wchar_t* attr5Name = 0, const wchar_t* attr5Value = 0) = 0; - - //! Writes an xml element with any number of attributes - virtual void writeElement(const wchar_t* name, bool empty, - core::array<core::stringw> &names, core::array<core::stringw> &values) = 0; - - //! Writes a comment into the xml file - virtual void writeComment(const wchar_t* comment) = 0; - - //! Writes the closing tag for an element. Like "</foo>" - virtual void writeClosingTag(const wchar_t* name) = 0; - - //! Writes a text into the file. - /** All occurrences of special characters such as - & (&), < (<), > (>), and " (") are automaticly - replaced. */ - virtual void writeText(const wchar_t* text) = 0; - - //! Writes a line break - virtual void writeLineBreak() = 0; - }; - -} // end namespace io -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/IrrCompileConfig.h b/builddir/irrlicht-1.8.1/include/IrrCompileConfig.h deleted file mode 100644 index ee83f2d..0000000 --- a/builddir/irrlicht-1.8.1/include/IrrCompileConfig.h +++ /dev/null @@ -1,832 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_COMPILE_CONFIG_H_INCLUDED__ -#define __IRR_COMPILE_CONFIG_H_INCLUDED__ - -//! Irrlicht SDK Version -#define IRRLICHT_VERSION_MAJOR 1 -#define IRRLICHT_VERSION_MINOR 8 -#define IRRLICHT_VERSION_REVISION 1 -// This flag will be defined only in SVN, the official release code will have -// it undefined -//#define IRRLICHT_VERSION_SVN -alpha -#define IRRLICHT_SDK_VERSION "1.8.1" - -#include <stdio.h> // TODO: Although included elsewhere this is required at least for mingw - -//! The defines for different operating system are: -//! _IRR_XBOX_PLATFORM_ for XBox -//! _IRR_WINDOWS_ for all irrlicht supported Windows versions -//! _IRR_WINDOWS_CE_PLATFORM_ for Windows CE -//! _IRR_WINDOWS_API_ for Windows or XBox -//! _IRR_LINUX_PLATFORM_ for Linux (it is defined here if no other os is defined) -//! _IRR_SOLARIS_PLATFORM_ for Solaris -//! _IRR_OSX_PLATFORM_ for Apple systems running OSX -//! _IRR_POSIX_API_ for Posix compatible systems -//! Note: PLATFORM defines the OS specific layer, API can group several platforms - -//! DEVICE is the windowing system used, several PLATFORMs support more than one DEVICE -//! Irrlicht can be compiled with more than one device -//! _IRR_COMPILE_WITH_WINDOWS_DEVICE_ for Windows API based device -//! _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_ for Windows CE API based device -//! _IRR_COMPILE_WITH_OSX_DEVICE_ for Cocoa native windowing on OSX -//! _IRR_COMPILE_WITH_X11_DEVICE_ for Linux X11 based device -//! _IRR_COMPILE_WITH_SDL_DEVICE_ for platform independent SDL framework -//! _IRR_COMPILE_WITH_CONSOLE_DEVICE_ for no windowing system, used as a fallback -//! _IRR_COMPILE_WITH_FB_DEVICE_ for framebuffer systems - -//! Passing defines to the compiler which have NO in front of the _IRR definename is an alternative -//! way which can be used to disable defines (instead of outcommenting them in this header). -//! So defines can be controlled from Makefiles or Projectfiles which allows building -//! different library versions without having to change the sources. -//! Example: NO_IRR_COMPILE_WITH_X11_ would disable X11 - - -//! Uncomment this line to compile with the SDL device -//#define _IRR_COMPILE_WITH_SDL_DEVICE_ -#ifdef NO_IRR_COMPILE_WITH_SDL_DEVICE_ -#undef _IRR_COMPILE_WITH_SDL_DEVICE_ -#endif - -//! Comment this line to compile without the fallback console device. -#define _IRR_COMPILE_WITH_CONSOLE_DEVICE_ -#ifdef NO_IRR_COMPILE_WITH_CONSOLE_DEVICE_ -#undef _IRR_COMPILE_WITH_CONSOLE_DEVICE_ -#endif - -//! WIN32 for Windows32 -//! WIN64 for Windows64 -// The windows platform and API support SDL and WINDOW device -#if defined(_WIN32) || defined(_WIN64) || defined(WIN32) || defined(WIN64) -#define _IRR_WINDOWS_ -#define _IRR_WINDOWS_API_ -#define _IRR_COMPILE_WITH_WINDOWS_DEVICE_ -#endif - -//! WINCE is a very restricted environment for mobile devices -#if defined(_WIN32_WCE) -#define _IRR_WINDOWS_ -#define _IRR_WINDOWS_API_ -#define _IRR_WINDOWS_CE_PLATFORM_ -#define _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_ -#endif - -#if defined(_MSC_VER) && (_MSC_VER < 1300) -# error "Only Microsoft Visual Studio 7.0 and later are supported." -#endif - -// XBox only suppots the native Window stuff -#if defined(_XBOX) - #undef _IRR_WINDOWS_ - #define _IRR_XBOX_PLATFORM_ - #define _IRR_WINDOWS_API_ - //#define _IRR_COMPILE_WITH_WINDOWS_DEVICE_ - #undef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ - //#define _IRR_COMPILE_WITH_SDL_DEVICE_ - - #include <xtl.h> -#endif - -#if defined(__APPLE__) || defined(MACOSX) -#if !defined(MACOSX) -#define MACOSX // legacy support -#endif -#define _IRR_OSX_PLATFORM_ -#define _IRR_COMPILE_WITH_OSX_DEVICE_ -#endif - -#if !defined(_IRR_WINDOWS_API_) && !defined(_IRR_OSX_PLATFORM_) -#ifndef _IRR_SOLARIS_PLATFORM_ -#define _IRR_LINUX_PLATFORM_ -#endif -#define _IRR_POSIX_API_ -#define _IRR_COMPILE_WITH_X11_DEVICE_ -#endif - - -//! Define _IRR_COMPILE_WITH_JOYSTICK_SUPPORT_ if you want joystick events. -#define _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ -#ifdef NO_IRR_COMPILE_WITH_JOYSTICK_EVENTS_ -#undef _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ -#endif - - -//! Maximum number of texture an SMaterial can have, up to 8 are supported by Irrlicht. -#define _IRR_MATERIAL_MAX_TEXTURES_ 4 - -//! Define _IRR_COMPILE_WITH_DIRECT3D_8_ and _IRR_COMPILE_WITH_DIRECT3D_9_ to -//! compile the Irrlicht engine with Direct3D8 and/or DIRECT3D9. -/** If you only want to use the software device or opengl you can disable those defines. -This switch is mostly disabled because people do not get the g++ compiler compile -directX header files, and directX is only available on Windows platforms. If you -are using Dev-Cpp, and want to compile this using a DX dev pack, you can define -_IRR_COMPILE_WITH_DX9_DEV_PACK_. So you simply need to add something like this -to the compiler settings: -DIRR_COMPILE_WITH_DX9_DEV_PACK -and this to the linker settings: -ld3dx9 -ld3dx8 - -Microsoft have chosen to remove D3D8 headers from their recent DXSDKs, and -so D3D8 support is now disabled by default. If you really want to build -with D3D8 support, then you will have to source a DXSDK with the appropriate -headers, e.g. Summer 2004. This is a Microsoft issue, not an Irrlicht one. -*/ -#if defined(_IRR_WINDOWS_API_) && (!defined(__GNUC__) || defined(IRR_COMPILE_WITH_DX9_DEV_PACK)) - -//! Define _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ if you want to use DirectInput for joystick handling. -/** This only applies to Windows devices, currently only supported under Win32 device. -If not defined, Windows Multimedia library is used, which offers also broad support for joystick devices. */ -#define _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ -#ifdef NO_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ -#undef _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ -#endif -// can't get this to compile currently under borland, can be removed if someone has a better solution -#if defined(__BORLANDC__) -#undef _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ -#endif - -//! Only define _IRR_COMPILE_WITH_DIRECT3D_8_ if you have an appropriate DXSDK, e.g. Summer 2004 -#define _IRR_COMPILE_WITH_DIRECT3D_8_ -#define _IRR_COMPILE_WITH_DIRECT3D_9_ - -#ifdef NO_IRR_COMPILE_WITH_DIRECT3D_8_ -#undef _IRR_COMPILE_WITH_DIRECT3D_8_ -#endif -#ifdef NO_IRR_COMPILE_WITH_DIRECT3D_9_ -#undef _IRR_COMPILE_WITH_DIRECT3D_9_ -#endif - -#endif - -//! Define _IRR_COMPILE_WITH_OPENGL_ to compile the Irrlicht engine with OpenGL. -/** If you do not wish the engine to be compiled with OpenGL, comment this -define out. */ -#define _IRR_COMPILE_WITH_OPENGL_ -#ifdef NO_IRR_COMPILE_WITH_OPENGL_ -#undef _IRR_COMPILE_WITH_OPENGL_ -#endif - -//! Define _IRR_COMPILE_WITH_SOFTWARE_ to compile the Irrlicht engine with software driver -/** If you do not need the software driver, or want to use Burning's Video instead, -comment this define out */ -#define _IRR_COMPILE_WITH_SOFTWARE_ -#ifdef NO_IRR_COMPILE_WITH_SOFTWARE_ -#undef _IRR_COMPILE_WITH_SOFTWARE_ -#endif - -//! Define _IRR_COMPILE_WITH_BURNINGSVIDEO_ to compile the Irrlicht engine with Burning's video driver -/** If you do not need this software driver, you can comment this define out. */ -#define _IRR_COMPILE_WITH_BURNINGSVIDEO_ -#ifdef NO_IRR_COMPILE_WITH_BURNINGSVIDEO_ -#undef _IRR_COMPILE_WITH_BURNINGSVIDEO_ -#endif - -//! Define _IRR_COMPILE_WITH_X11_ to compile the Irrlicht engine with X11 support. -/** If you do not wish the engine to be compiled with X11, comment this -define out. */ -// Only used in LinuxDevice. -#define _IRR_COMPILE_WITH_X11_ -#ifdef NO_IRR_COMPILE_WITH_X11_ -#undef _IRR_COMPILE_WITH_X11_ -#endif - -//! Define _IRR_OPENGL_USE_EXTPOINTER_ if the OpenGL renderer should use OpenGL extensions via function pointers. -/** On some systems there is no support for the dynamic extension of OpenGL - via function pointers such that this has to be undef'ed. */ -#if !defined(_IRR_OSX_PLATFORM_) && !defined(_IRR_SOLARIS_PLATFORM_) -#define _IRR_OPENGL_USE_EXTPOINTER_ -#endif - -//! On some Linux systems the XF86 vidmode extension or X11 RandR are missing. Use these flags -//! to remove the dependencies such that Irrlicht will compile on those systems, too. -//! If you don't need colored cursors you can also disable the Xcursor extension -#if defined(_IRR_LINUX_PLATFORM_) && defined(_IRR_COMPILE_WITH_X11_) -#define _IRR_LINUX_X11_VIDMODE_ -//#define _IRR_LINUX_X11_RANDR_ -#ifdef NO_IRR_LINUX_X11_VIDMODE_ -#undef _IRR_LINUX_X11_VIDMODE_ -#endif -#ifdef NO_IRR_LINUX_X11_RANDR_ -#undef _IRR_LINUX_X11_RANDR_ -#endif - -//! X11 has by default only monochrome cursors, but using the Xcursor library we can also get color cursor support. -//! If you have the need for custom color cursors on X11 then enable this and make sure you also link -//! to the Xcursor library in your Makefile/Projectfile. -//#define _IRR_LINUX_XCURSOR_ -#ifdef NO_IRR_LINUX_XCURSOR_ -#undef _IRR_LINUX_XCURSOR_ -#endif - -#endif - -//! Define _IRR_COMPILE_WITH_GUI_ to compile the engine with the built-in GUI -/** Disable this if you are using an external library to draw the GUI. If you disable this then -you will not be able to use anything provided by the GUI Environment, including loading fonts. */ -#define _IRR_COMPILE_WITH_GUI_ -#ifdef NO_IRR_COMPILE_WITH_GUI_ -#undef _IRR_COMPILE_WITH_GUI_ -#endif - -//! Define _IRR_WCHAR_FILESYSTEM to enable unicode filesystem support for the engine. -/** This enables the engine to read/write from unicode filesystem. If you -disable this feature, the engine behave as before (ansi). This is currently only supported -for Windows based systems. You also have to set #define UNICODE for this to compile. -*/ -//#define _IRR_WCHAR_FILESYSTEM -#ifdef NO_IRR_WCHAR_FILESYSTEM -#undef _IRR_WCHAR_FILESYSTEM -#endif - -//! Define _IRR_COMPILE_WITH_JPEGLIB_ to enable compiling the engine using libjpeg. -/** This enables the engine to read jpeg images. If you comment this out, -the engine will no longer read .jpeg images. */ -#define _IRR_COMPILE_WITH_LIBJPEG_ -#ifdef NO_IRR_COMPILE_WITH_LIBJPEG_ -#undef _IRR_COMPILE_WITH_LIBJPEG_ -#endif - -//! Define _IRR_USE_NON_SYSTEM_JPEG_LIB_ to let irrlicht use the jpeglib which comes with irrlicht. -/** If this is commented out, Irrlicht will try to compile using the jpeg lib installed in the system. - This is only used when _IRR_COMPILE_WITH_LIBJPEG_ is defined. */ -#define _IRR_USE_NON_SYSTEM_JPEG_LIB_ -#ifdef NO_IRR_USE_NON_SYSTEM_JPEG_LIB_ -#undef _IRR_USE_NON_SYSTEM_JPEG_LIB_ -#endif - -//! Define _IRR_COMPILE_WITH_LIBPNG_ to enable compiling the engine using libpng. -/** This enables the engine to read png images. If you comment this out, -the engine will no longer read .png images. */ -#define _IRR_COMPILE_WITH_LIBPNG_ -#ifdef NO_IRR_COMPILE_WITH_LIBPNG_ -#undef _IRR_COMPILE_WITH_LIBPNG_ -#endif - -//! Define _IRR_USE_NON_SYSTEM_LIBPNG_ to let irrlicht use the libpng which comes with irrlicht. -/** If this is commented out, Irrlicht will try to compile using the libpng installed in the system. - This is only used when _IRR_COMPILE_WITH_LIBPNG_ is defined. */ -#define _IRR_USE_NON_SYSTEM_LIB_PNG_ -#ifdef NO_IRR_USE_NON_SYSTEM_LIB_PNG_ -#undef _IRR_USE_NON_SYSTEM_LIB_PNG_ -#endif - -//! Define _IRR_D3D_NO_SHADER_DEBUGGING to disable shader debugging in D3D9 -/** If _IRR_D3D_NO_SHADER_DEBUGGING is undefined in IrrCompileConfig.h, -it is possible to debug all D3D9 shaders in VisualStudio. All shaders -(which have been generated in memory or read from archives for example) will be emitted -into a temporary file at runtime for this purpose. To debug your shaders, choose -Debug->Direct3D->StartWithDirect3DDebugging in Visual Studio, and for every shader a -file named 'irr_dbg_shader_%%.vsh' or 'irr_dbg_shader_%%.psh' will be created. Drag'n'drop -the file you want to debug into visual studio. That's it. You can now set breakpoints and -watch registers, variables etc. This works with ASM, HLSL, and both with pixel and vertex shaders. -Note that the engine will run in D3D REF for this, which is a lot slower than HAL. */ -#define _IRR_D3D_NO_SHADER_DEBUGGING -#ifdef NO_IRR_D3D_NO_SHADER_DEBUGGING -#undef _IRR_D3D_NO_SHADER_DEBUGGING -#endif - -//! Define _IRR_D3D_USE_LEGACY_HLSL_COMPILER to enable the old HLSL compiler in recent DX SDKs -/** This enables support for ps_1_x shaders for recent DX SDKs. Otherwise, support -for this shader model is not available anymore in SDKs after Oct2006. You need to -distribute the OCT2006_d3dx9_31_x86.cab or OCT2006_d3dx9_31_x64.cab though, in order -to provide the user with the proper DLL. That's why it's disabled by default. */ -//#define _IRR_D3D_USE_LEGACY_HLSL_COMPILER -#ifdef NO_IRR_D3D_USE_LEGACY_HLSL_COMPILER -#undef _IRR_D3D_USE_LEGACY_HLSL_COMPILER -#endif - -//! Define _IRR_COMPILE_WITH_CG_ to enable Cg Shading Language support -//#define _IRR_COMPILE_WITH_CG_ -#ifdef NO_IRR_COMPILE_WITH_CG_ -#undef _IRR_COMPILE_WITH_CG_ -#endif -#if !defined(_IRR_COMPILE_WITH_OPENGL_) && !defined(_IRR_COMPILE_WITH_DIRECT3D_9_) -#undef _IRR_COMPILE_WITH_CG_ -#endif - -//! Define _IRR_USE_NVIDIA_PERFHUD_ to opt-in to using the nVidia PerHUD tool -/** Enable, by opting-in, to use the nVidia PerfHUD performance analysis driver -tool <http://developer.nvidia.com/object/nvperfhud_home.html>. */ -#undef _IRR_USE_NVIDIA_PERFHUD_ - -//! Define one of the three setting for Burning's Video Software Rasterizer -/** So if we were marketing guys we could say Irrlicht has 4 Software-Rasterizers. - In a Nutshell: - All Burnings Rasterizers use 32 Bit Backbuffer, 32Bit Texture & 32 Bit Z or WBuffer, - 16 Bit/32 Bit can be adjusted on a global flag. - - BURNINGVIDEO_RENDERER_BEAUTIFUL - 32 Bit + Vertexcolor + Lighting + Per Pixel Perspective Correct + SubPixel/SubTexel Correct + - Bilinear Texturefiltering + WBuffer - - BURNINGVIDEO_RENDERER_FAST - 32 Bit + Per Pixel Perspective Correct + SubPixel/SubTexel Correct + WBuffer + - Bilinear Dithering TextureFiltering + WBuffer - - BURNINGVIDEO_RENDERER_ULTRA_FAST - 16Bit + SubPixel/SubTexel Correct + ZBuffer -*/ - -#define BURNINGVIDEO_RENDERER_BEAUTIFUL -//#define BURNINGVIDEO_RENDERER_FAST -//#define BURNINGVIDEO_RENDERER_ULTRA_FAST -//#define BURNINGVIDEO_RENDERER_CE - -//! Uncomment the following line if you want to ignore the deprecated warnings -//#define IGNORE_DEPRECATED_WARNING - -//! Define _IRR_COMPILE_WITH_IRR_SCENE_LOADER_ if you want to be able to load -/** .irr scenes using ISceneManager::loadScene */ -#define _IRR_COMPILE_WITH_IRR_SCENE_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_IRR_SCENE_LOADER_ -#undef _IRR_COMPILE_WITH_IRR_SCENE_LOADER_ -#endif - -//! Define _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ if you want to use bone based -/** animated meshes. If you compile without this, you will be unable to load -B3D, MS3D or X meshes */ -#define _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ -#ifdef NO_IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ -#undef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ -#endif - -#ifdef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ -//! Define _IRR_COMPILE_WITH_B3D_LOADER_ if you want to use Blitz3D files -#define _IRR_COMPILE_WITH_B3D_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_B3D_LOADER_ -#undef _IRR_COMPILE_WITH_B3D_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_MS3D_LOADER_ if you want to Milkshape files -#define _IRR_COMPILE_WITH_MS3D_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_MS3D_LOADER_ -#undef _IRR_COMPILE_WITH_MS3D_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_X_LOADER_ if you want to use Microsoft X files -#define _IRR_COMPILE_WITH_X_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_X_LOADER_ -#undef _IRR_COMPILE_WITH_X_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_OGRE_LOADER_ if you want to load Ogre 3D files -#define _IRR_COMPILE_WITH_OGRE_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_OGRE_LOADER_ -#undef _IRR_COMPILE_WITH_OGRE_LOADER_ -#endif -#endif // _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ - -//! Define _IRR_COMPILE_WITH_IRR_MESH_LOADER_ if you want to load Irrlicht Engine .irrmesh files -#define _IRR_COMPILE_WITH_IRR_MESH_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_IRR_MESH_LOADER_ -#undef _IRR_COMPILE_WITH_IRR_MESH_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_HALFLIFE_LOADER_ if you want to load Halflife animated files -#define _IRR_COMPILE_WITH_HALFLIFE_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_HALFLIFE_LOADER_ -#undef _IRR_COMPILE_WITH_HALFLIFE_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_MD2_LOADER_ if you want to load Quake 2 animated files -#define _IRR_COMPILE_WITH_MD2_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_MD2_LOADER_ -#undef _IRR_COMPILE_WITH_MD2_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_MD3_LOADER_ if you want to load Quake 3 animated files -#define _IRR_COMPILE_WITH_MD3_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_MD3_LOADER_ -#undef _IRR_COMPILE_WITH_MD3_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_3DS_LOADER_ if you want to load 3D Studio Max files -#define _IRR_COMPILE_WITH_3DS_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_3DS_LOADER_ -#undef _IRR_COMPILE_WITH_3DS_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_COLLADA_LOADER_ if you want to load Collada files -#define _IRR_COMPILE_WITH_COLLADA_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_COLLADA_LOADER_ -#undef _IRR_COMPILE_WITH_COLLADA_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_CSM_LOADER_ if you want to load Cartography Shop files -#define _IRR_COMPILE_WITH_CSM_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_CSM_LOADER_ -#undef _IRR_COMPILE_WITH_CSM_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_BSP_LOADER_ if you want to load Quake 3 BSP files -#define _IRR_COMPILE_WITH_BSP_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_BSP_LOADER_ -#undef _IRR_COMPILE_WITH_BSP_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_DMF_LOADER_ if you want to load DeleD files -#define _IRR_COMPILE_WITH_DMF_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_DMF_LOADER_ -#undef _IRR_COMPILE_WITH_DMF_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_LMTS_LOADER_ if you want to load LMTools files -#define _IRR_COMPILE_WITH_LMTS_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_LMTS_LOADER_ -#undef _IRR_COMPILE_WITH_LMTS_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_MY3D_LOADER_ if you want to load MY3D files -#define _IRR_COMPILE_WITH_MY3D_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_MY3D_LOADER_ -#undef _IRR_COMPILE_WITH_MY3D_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_OBJ_LOADER_ if you want to load Wavefront OBJ files -#define _IRR_COMPILE_WITH_OBJ_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_OBJ_LOADER_ -#undef _IRR_COMPILE_WITH_OBJ_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_OCT_LOADER_ if you want to load FSRad OCT files -#define _IRR_COMPILE_WITH_OCT_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_OCT_LOADER_ -#undef _IRR_COMPILE_WITH_OCT_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_LWO_LOADER_ if you want to load Lightwave3D files -#define _IRR_COMPILE_WITH_LWO_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_LWO_LOADER_ -#undef _IRR_COMPILE_WITH_LWO_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_STL_LOADER_ if you want to load stereolithography files -#define _IRR_COMPILE_WITH_STL_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_STL_LOADER_ -#undef _IRR_COMPILE_WITH_STL_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_PLY_LOADER_ if you want to load Polygon (Stanford Triangle) files -#define _IRR_COMPILE_WITH_PLY_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_PLY_LOADER_ -#undef _IRR_COMPILE_WITH_PLY_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_SMF_LOADER_ if you want to load 3D World Studio mesh files -#define _IRR_COMPILE_WITH_SMF_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_SMF_LOADER_ -#undef _IRR_COMPILE_WITH_SMF_LOADER_ -#endif - -//! Define _IRR_COMPILE_WITH_IRR_WRITER_ if you want to write static .irrMesh files -#define _IRR_COMPILE_WITH_IRR_WRITER_ -#ifdef NO_IRR_COMPILE_WITH_IRR_WRITER_ -#undef _IRR_COMPILE_WITH_IRR_WRITER_ -#endif -//! Define _IRR_COMPILE_WITH_COLLADA_WRITER_ if you want to write Collada files -#define _IRR_COMPILE_WITH_COLLADA_WRITER_ -#ifdef NO_IRR_COMPILE_WITH_COLLADA_WRITER_ -#undef _IRR_COMPILE_WITH_COLLADA_WRITER_ -#endif -//! Define _IRR_COMPILE_WITH_STL_WRITER_ if you want to write .stl files -#define _IRR_COMPILE_WITH_STL_WRITER_ -#ifdef NO_IRR_COMPILE_WITH_STL_WRITER_ -#undef _IRR_COMPILE_WITH_STL_WRITER_ -#endif -//! Define _IRR_COMPILE_WITH_OBJ_WRITER_ if you want to write .obj files -#define _IRR_COMPILE_WITH_OBJ_WRITER_ -#ifdef NO_IRR_COMPILE_WITH_OBJ_WRITER_ -#undef _IRR_COMPILE_WITH_OBJ_WRITER_ -#endif -//! Define _IRR_COMPILE_WITH_PLY_WRITER_ if you want to write .ply files -#define _IRR_COMPILE_WITH_PLY_WRITER_ -#ifdef NO_IRR_COMPILE_WITH_PLY_WRITER_ -#undef _IRR_COMPILE_WITH_PLY_WRITER_ -#endif - -//! Define _IRR_COMPILE_WITH_BMP_LOADER_ if you want to load .bmp files -//! Disabling this loader will also disable the built-in font -#define _IRR_COMPILE_WITH_BMP_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_BMP_LOADER_ -#undef _IRR_COMPILE_WITH_BMP_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_JPG_LOADER_ if you want to load .jpg files -#define _IRR_COMPILE_WITH_JPG_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_JPG_LOADER_ -#undef _IRR_COMPILE_WITH_JPG_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_PCX_LOADER_ if you want to load .pcx files -#define _IRR_COMPILE_WITH_PCX_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_PCX_LOADER_ -#undef _IRR_COMPILE_WITH_PCX_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_PNG_LOADER_ if you want to load .png files -#define _IRR_COMPILE_WITH_PNG_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_PNG_LOADER_ -#undef _IRR_COMPILE_WITH_PNG_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_PPM_LOADER_ if you want to load .ppm/.pgm/.pbm files -#define _IRR_COMPILE_WITH_PPM_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_PPM_LOADER_ -#undef _IRR_COMPILE_WITH_PPM_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_PSD_LOADER_ if you want to load .psd files -#define _IRR_COMPILE_WITH_PSD_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_PSD_LOADER_ -#undef _IRR_COMPILE_WITH_PSD_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_DDS_LOADER_ if you want to load .dds files -// Outcommented because -// a) it doesn't compile on 64-bit currently -// b) anyone enabling it should be aware that S3TC compression algorithm which might be used in that loader -// is patented in the US by S3 and they do collect license fees when it's used in applications. -// So if you are unfortunate enough to develop applications for US market and their broken patent system be careful. -// #define _IRR_COMPILE_WITH_DDS_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_DDS_LOADER_ -#undef _IRR_COMPILE_WITH_DDS_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_TGA_LOADER_ if you want to load .tga files -#define _IRR_COMPILE_WITH_TGA_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_TGA_LOADER_ -#undef _IRR_COMPILE_WITH_TGA_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_WAL_LOADER_ if you want to load .wal files -#define _IRR_COMPILE_WITH_WAL_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_WAL_LOADER_ -#undef _IRR_COMPILE_WITH_WAL_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_LMP_LOADER_ if you want to load .lmp files -#define _IRR_COMPILE_WITH_LMP_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_LMP_LOADER_ -#undef _IRR_COMPILE_WITH_LMP_LOADER_ -#endif -//! Define _IRR_COMPILE_WITH_RGB_LOADER_ if you want to load Silicon Graphics .rgb/.rgba/.sgi/.int/.inta/.bw files -#define _IRR_COMPILE_WITH_RGB_LOADER_ -#ifdef NO_IRR_COMPILE_WITH_RGB_LOADER_ -#undef _IRR_COMPILE_WITH_RGB_LOADER_ -#endif - -//! Define _IRR_COMPILE_WITH_BMP_WRITER_ if you want to write .bmp files -#define _IRR_COMPILE_WITH_BMP_WRITER_ -#ifdef NO_IRR_COMPILE_WITH_BMP_WRITER_ -#undef _IRR_COMPILE_WITH_BMP_WRITER_ -#endif -//! Define _IRR_COMPILE_WITH_JPG_WRITER_ if you want to write .jpg files -#define _IRR_COMPILE_WITH_JPG_WRITER_ -#ifdef NO_IRR_COMPILE_WITH_JPG_WRITER_ -#undef _IRR_COMPILE_WITH_JPG_WRITER_ -#endif -//! Define _IRR_COMPILE_WITH_PCX_WRITER_ if you want to write .pcx files -#define _IRR_COMPILE_WITH_PCX_WRITER_ -#ifdef NO_IRR_COMPILE_WITH_PCX_WRITER_ -#undef _IRR_COMPILE_WITH_PCX_WRITER_ -#endif -//! Define _IRR_COMPILE_WITH_PNG_WRITER_ if you want to write .png files -#define _IRR_COMPILE_WITH_PNG_WRITER_ -#ifdef NO_IRR_COMPILE_WITH_PNG_WRITER_ -#undef _IRR_COMPILE_WITH_PNG_WRITER_ -#endif -//! Define _IRR_COMPILE_WITH_PPM_WRITER_ if you want to write .ppm files -#define _IRR_COMPILE_WITH_PPM_WRITER_ -#ifdef NO_IRR_COMPILE_WITH_PPM_WRITER_ -#undef _IRR_COMPILE_WITH_PPM_WRITER_ -#endif -//! Define _IRR_COMPILE_WITH_PSD_WRITER_ if you want to write .psd files -#define _IRR_COMPILE_WITH_PSD_WRITER_ -#ifdef NO_IRR_COMPILE_WITH_PSD_WRITER_ -#undef _IRR_COMPILE_WITH_PSD_WRITER_ -#endif -//! Define _IRR_COMPILE_WITH_TGA_WRITER_ if you want to write .tga files -#define _IRR_COMPILE_WITH_TGA_WRITER_ -#ifdef NO_IRR_COMPILE_WITH_TGA_WRITER_ -#undef _IRR_COMPILE_WITH_TGA_WRITER_ -#endif - -//! Define __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ if you want to open ZIP and GZIP archives -/** ZIP reading has several more options below to configure. */ -#define __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ -#ifdef NO__IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ -#undef __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ -#endif -#ifdef __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ -//! Define _IRR_COMPILE_WITH_ZLIB_ to enable compiling the engine using zlib. -/** This enables the engine to read from compressed .zip archives. If you -disable this feature, the engine can still read archives, but only uncompressed -ones. */ -#define _IRR_COMPILE_WITH_ZLIB_ -#ifdef NO_IRR_COMPILE_WITH_ZLIB_ -#undef _IRR_COMPILE_WITH_ZLIB_ -#endif -//! Define _IRR_USE_NON_SYSTEM_ZLIB_ to let irrlicht use the zlib which comes with irrlicht. -/** If this is commented out, Irrlicht will try to compile using the zlib -installed on the system. This is only used when _IRR_COMPILE_WITH_ZLIB_ is -defined. */ -#define _IRR_USE_NON_SYSTEM_ZLIB_ -#ifdef NO_IRR_USE_NON_SYSTEM_ZLIB_ -#undef _IRR_USE_NON_SYSTEM_ZLIB_ -#endif -//! Define _IRR_COMPILE_WITH_ZIP_ENCRYPTION_ if you want to read AES-encrypted ZIP archives -#define _IRR_COMPILE_WITH_ZIP_ENCRYPTION_ -#ifdef NO_IRR_COMPILE_WITH_ZIP_ENCRYPTION_ -#undef _IRR_COMPILE_WITH_ZIP_ENCRYPTION_ -#endif -//! Define _IRR_COMPILE_WITH_BZIP2_ if you want to support bzip2 compressed zip archives -/** bzip2 is superior to the original zip file compression modes, but requires -a certain amount of memory for decompression and adds several files to the -library. */ -#define _IRR_COMPILE_WITH_BZIP2_ -#ifdef NO_IRR_COMPILE_WITH_BZIP2_ -#undef _IRR_COMPILE_WITH_BZIP2_ -#endif -//! Define _IRR_USE_NON_SYSTEM_BZLIB_ to let irrlicht use the bzlib which comes with irrlicht. -/** If this is commented out, Irrlicht will try to compile using the bzlib -installed on the system. This is only used when _IRR_COMPILE_WITH_BZLIB_ is -defined. */ -#define _IRR_USE_NON_SYSTEM_BZLIB_ -#ifdef NO_IRR_USE_NON_SYSTEM_BZLIB_ -#undef _IRR_USE_NON_SYSTEM_BZLIB_ -#endif -//! Define _IRR_COMPILE_WITH_LZMA_ if you want to use LZMA compressed zip files. -/** LZMA is a very efficient compression code, known from 7zip. Irrlicht -currently only supports zip archives, though. */ -#define _IRR_COMPILE_WITH_LZMA_ -#ifdef NO_IRR_COMPILE_WITH_LZMA_ -#undef _IRR_COMPILE_WITH_LZMA_ -#endif -#endif - -//! Define __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ if you want to mount folders as archives -#define __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ -#ifdef NO__IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ -#undef __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ -#endif -//! Define __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ if you want to open ID software PAK archives -#define __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ -#ifdef NO__IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ -#undef __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ -#endif -//! Define __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ if you want to open Nebula Device NPK archives -#define __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ -#ifdef NO__IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ -#undef __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ -#endif -//! Define __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ if you want to open TAR archives -#define __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ -#ifdef NO__IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ -#undef __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ -#endif -//! Define __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ if you want to open WAD archives -#define __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ -#ifdef NO__IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ -#undef __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ -#endif - -//! Set FPU settings -/** Irrlicht should use approximate float and integer fpu techniques -precision will be lower but speed higher. currently X86 only -*/ -#if !defined(_IRR_OSX_PLATFORM_) && !defined(_IRR_SOLARIS_PLATFORM_) - //#define IRRLICHT_FAST_MATH - #ifdef NO_IRRLICHT_FAST_MATH - #undef IRRLICHT_FAST_MATH - #endif -#endif - -// Some cleanup and standard stuff - -#ifdef _IRR_WINDOWS_API_ - -// To build Irrlicht as a static library, you must define _IRR_STATIC_LIB_ in both the -// Irrlicht build, *and* in the user application, before #including <irrlicht.h> -#ifndef _IRR_STATIC_LIB_ -#ifdef IRRLICHT_EXPORTS -#define IRRLICHT_API __declspec(dllexport) -#else -#define IRRLICHT_API __declspec(dllimport) -#endif // IRRLICHT_EXPORT -#else -#define IRRLICHT_API -#endif // _IRR_STATIC_LIB_ - -// Declare the calling convention. -#if defined(_STDCALL_SUPPORTED) -#define IRRCALLCONV __stdcall -#else -#define IRRCALLCONV __cdecl -#endif // STDCALL_SUPPORTED - -#else // _IRR_WINDOWS_API_ - -// Force symbol export in shared libraries built with gcc. -#if (__GNUC__ >= 4) && !defined(_IRR_STATIC_LIB_) && defined(IRRLICHT_EXPORTS) -#define IRRLICHT_API __attribute__ ((visibility("default"))) -#else -#define IRRLICHT_API -#endif - -#define IRRCALLCONV - -#endif // _IRR_WINDOWS_API_ - -// We need to disable DIRECT3D9 support for Visual Studio 6.0 because -// those $%&$!! disabled support for it since Dec. 2004 and users are complaining -// about linker errors. Comment this out only if you are knowing what you are -// doing. (Which means you have an old DX9 SDK and VisualStudio6). -#ifdef _MSC_VER -#if (_MSC_VER < 1300 && !defined(__GNUC__)) -#undef _IRR_COMPILE_WITH_DIRECT3D_9_ -#pragma message("Compiling Irrlicht with Visual Studio 6.0, support for DX9 is disabled.") -#endif -#endif - -// XBox does not have OpenGL or DirectX9 -#if defined(_IRR_XBOX_PLATFORM_) - #undef _IRR_COMPILE_WITH_OPENGL_ - #undef _IRR_COMPILE_WITH_DIRECT3D_9_ -#endif - -//! WinCE does not have OpenGL or DirectX9. use minimal loaders -#if defined(_WIN32_WCE) - #undef _IRR_COMPILE_WITH_OPENGL_ - #undef _IRR_COMPILE_WITH_DIRECT3D_8_ - #undef _IRR_COMPILE_WITH_DIRECT3D_9_ - - #undef BURNINGVIDEO_RENDERER_BEAUTIFUL - #undef BURNINGVIDEO_RENDERER_FAST - #undef BURNINGVIDEO_RENDERER_ULTRA_FAST - #define BURNINGVIDEO_RENDERER_CE - - #undef _IRR_COMPILE_WITH_WINDOWS_DEVICE_ - #define _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_ - //#define _IRR_WCHAR_FILESYSTEM - - #undef _IRR_COMPILE_WITH_IRR_MESH_LOADER_ - //#undef _IRR_COMPILE_WITH_MD2_LOADER_ - #undef _IRR_COMPILE_WITH_MD3_LOADER_ - #undef _IRR_COMPILE_WITH_3DS_LOADER_ - #undef _IRR_COMPILE_WITH_COLLADA_LOADER_ - #undef _IRR_COMPILE_WITH_CSM_LOADER_ - #undef _IRR_COMPILE_WITH_BSP_LOADER_ - #undef _IRR_COMPILE_WITH_DMF_LOADER_ - #undef _IRR_COMPILE_WITH_LMTS_LOADER_ - #undef _IRR_COMPILE_WITH_MY3D_LOADER_ - #undef _IRR_COMPILE_WITH_OBJ_LOADER_ - #undef _IRR_COMPILE_WITH_OCT_LOADER_ - #undef _IRR_COMPILE_WITH_OGRE_LOADER_ - #undef _IRR_COMPILE_WITH_LWO_LOADER_ - #undef _IRR_COMPILE_WITH_STL_LOADER_ - #undef _IRR_COMPILE_WITH_IRR_WRITER_ - #undef _IRR_COMPILE_WITH_COLLADA_WRITER_ - #undef _IRR_COMPILE_WITH_STL_WRITER_ - #undef _IRR_COMPILE_WITH_OBJ_WRITER_ - //#undef _IRR_COMPILE_WITH_BMP_LOADER_ - //#undef _IRR_COMPILE_WITH_JPG_LOADER_ - #undef _IRR_COMPILE_WITH_PCX_LOADER_ - //#undef _IRR_COMPILE_WITH_PNG_LOADER_ - #undef _IRR_COMPILE_WITH_PPM_LOADER_ - #undef _IRR_COMPILE_WITH_PSD_LOADER_ - //#undef _IRR_COMPILE_WITH_TGA_LOADER_ - #undef _IRR_COMPILE_WITH_WAL_LOADER_ - #undef _IRR_COMPILE_WITH_BMP_WRITER_ - #undef _IRR_COMPILE_WITH_JPG_WRITER_ - #undef _IRR_COMPILE_WITH_PCX_WRITER_ - #undef _IRR_COMPILE_WITH_PNG_WRITER_ - #undef _IRR_COMPILE_WITH_PPM_WRITER_ - #undef _IRR_COMPILE_WITH_PSD_WRITER_ - #undef _IRR_COMPILE_WITH_TGA_WRITER_ - -#endif - -#ifndef _IRR_WINDOWS_API_ - #undef _IRR_WCHAR_FILESYSTEM -#endif - -#if defined(__sparc__) || defined(__sun__) -#define __BIG_ENDIAN__ -#endif - -#if defined(_IRR_SOLARIS_PLATFORM_) - #undef _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ -#endif - -//! Define __IRR_HAS_S64 if the irr::s64 type should be enable (needs long long, available on most platforms, but not part of ISO C++ 98) -#define __IRR_HAS_S64 -#ifdef NO__IRR_HAS_S64 -#undef __IRR_HAS_S64 -#endif - -#if defined(__BORLANDC__) - #include <tchar.h> - - // Borland 5.5.1 does not have _strcmpi defined - #if __BORLANDC__ == 0x551 - // #define _strcmpi strcmpi - #undef _tfinddata_t - #undef _tfindfirst - #undef _tfindnext - - #define _tfinddata_t __tfinddata_t - #define _tfindfirst __tfindfirst - #define _tfindnext __tfindnext - typedef long intptr_t; - #endif - -#endif - -#ifdef _DEBUG - //! A few attributes are written in CSceneManager when _IRR_SCENEMANAGER_DEBUG is enabled - // NOTE: Those attributes were used always until 1.8.0 and became a global define for 1.8.1 - // which is only enabled in debug because it had a large (sometimes >5%) impact on speed. - // A better solution in the long run is to break the interface and remove _all_ attribute - // access in functions like CSceneManager::drawAll and instead put that information in some - // own struct/class or in CSceneManager. - // See http://irrlicht.sourceforge.net/forum/viewtopic.php?f=2&t=48211 for the discussion. - #define _IRR_SCENEMANAGER_DEBUG - #ifdef NO_IRR_SCENEMANAGER_DEBUG - #undef _IRR_SCENEMANAGER_DEBUG - #endif -#endif - -#endif // __IRR_COMPILE_CONFIG_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/IrrlichtDevice.h b/builddir/irrlicht-1.8.1/include/IrrlichtDevice.h deleted file mode 100644 index 536e10b..0000000 --- a/builddir/irrlicht-1.8.1/include/IrrlichtDevice.h +++ /dev/null @@ -1,322 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_IRRLICHT_DEVICE_H_INCLUDED__ -#define __I_IRRLICHT_DEVICE_H_INCLUDED__ - -#include "IReferenceCounted.h" -#include "dimension2d.h" -#include "IVideoDriver.h" -#include "EDriverTypes.h" -#include "EDeviceTypes.h" -#include "IEventReceiver.h" -#include "ICursorControl.h" -#include "IVideoModeList.h" -#include "ITimer.h" -#include "IOSOperator.h" - -namespace irr -{ - class ILogger; - class IEventReceiver; - class IRandomizer; - - namespace io { - class IFileSystem; - } // end namespace io - - namespace gui { - class IGUIEnvironment; - } // end namespace gui - - namespace scene { - class ISceneManager; - } // end namespace scene - - //! The Irrlicht device. You can create it with createDevice() or createDeviceEx(). - /** This is the most important class of the Irrlicht Engine. You can - access everything in the engine if you have a pointer to an instance of - this class. There should be only one instance of this class at any - time. - */ - class IrrlichtDevice : public virtual IReferenceCounted - { - public: - - //! Runs the device. - /** Also increments the virtual timer by calling - ITimer::tick();. You can prevent this - by calling ITimer::stop(); before and ITimer::start() after - calling IrrlichtDevice::run(). Returns false if device wants - to be deleted. Use it in this way: - \code - while(device->run()) - { - // draw everything here - } - \endcode - If you want the device to do nothing if the window is inactive - (recommended), use the slightly enhanced code shown at isWindowActive(). - - Note if you are running Irrlicht inside an external, custom - created window: Calling Device->run() will cause Irrlicht to - dispatch windows messages internally. - If you are running Irrlicht in your own custom window, you can - also simply use your own message loop using GetMessage, - DispatchMessage and whatever and simply don't use this method. - But note that Irrlicht will not be able to fetch user input - then. See irr::SIrrlichtCreationParameters::WindowId for more - informations and example code. - */ - virtual bool run() = 0; - - //! Cause the device to temporarily pause execution and let other processes run. - /** This should bring down processor usage without major - performance loss for Irrlicht */ - virtual void yield() = 0; - - //! Pause execution and let other processes to run for a specified amount of time. - /** It may not wait the full given time, as sleep may be interrupted - \param timeMs: Time to sleep for in milisecs. - \param pauseTimer: If true, pauses the device timer while sleeping - */ - virtual void sleep(u32 timeMs, bool pauseTimer=false) = 0; - - //! Provides access to the video driver for drawing 3d and 2d geometry. - /** \return Pointer the video driver. */ - virtual video::IVideoDriver* getVideoDriver() = 0; - - //! Provides access to the virtual file system. - /** \return Pointer to the file system. */ - virtual io::IFileSystem* getFileSystem() = 0; - - //! Provides access to the 2d user interface environment. - /** \return Pointer to the gui environment. */ - virtual gui::IGUIEnvironment* getGUIEnvironment() = 0; - - //! Provides access to the scene manager. - /** \return Pointer to the scene manager. */ - virtual scene::ISceneManager* getSceneManager() = 0; - - //! Provides access to the cursor control. - /** \return Pointer to the mouse cursor control interface. */ - virtual gui::ICursorControl* getCursorControl() = 0; - - //! Provides access to the message logger. - /** \return Pointer to the logger. */ - virtual ILogger* getLogger() = 0; - - //! Gets a list with all video modes available. - /** If you are confused now, because you think you have to - create an Irrlicht Device with a video mode before being able - to get the video mode list, let me tell you that there is no - need to start up an Irrlicht Device with EDT_DIRECT3D8, - EDT_OPENGL or EDT_SOFTWARE: For this (and for lots of other - reasons) the null driver, EDT_NULL exists. - \return Pointer to a list with all video modes supported - by the gfx adapter. */ - virtual video::IVideoModeList* getVideoModeList() = 0; - - //! Provides access to the operation system operator object. - /** The OS operator provides methods for - getting system specific informations and doing system - specific operations, such as exchanging data with the clipboard - or reading the operation system version. - \return Pointer to the OS operator. */ - virtual IOSOperator* getOSOperator() = 0; - - //! Provides access to the engine's timer. - /** The system time can be retrieved by it as - well as the virtual time, which also can be manipulated. - \return Pointer to the ITimer object. */ - virtual ITimer* getTimer() = 0; - - //! Provides access to the engine's currently set randomizer. - /** \return Pointer to the IRandomizer object. */ - virtual IRandomizer* getRandomizer() const =0; - - //! Sets a new randomizer. - /** \param r Pointer to the new IRandomizer object. This object is - grab()'ed by the engine and will be released upon the next setRandomizer - call or upon device destruction. */ - virtual void setRandomizer(IRandomizer* r) =0; - - //! Creates a new default randomizer. - /** The default randomizer provides the random sequence known from previous - Irrlicht versions and is the initial randomizer set on device creation. - \return Pointer to the default IRandomizer object. */ - virtual IRandomizer* createDefaultRandomizer() const =0; - - //! Sets the caption of the window. - /** \param text: New text of the window caption. */ - virtual void setWindowCaption(const wchar_t* text) = 0; - - //! Returns if the window is active. - /** If the window is inactive, - nothing needs to be drawn. So if you don't want to draw anything - when the window is inactive, create your drawing loop this way: - \code - while(device->run()) - { - if (device->isWindowActive()) - { - // draw everything here - } - else - device->yield(); - } - \endcode - \return True if window is active. */ - virtual bool isWindowActive() const = 0; - - //! Checks if the Irrlicht window has focus - /** \return True if window has focus. */ - virtual bool isWindowFocused() const = 0; - - //! Checks if the Irrlicht window is minimized - /** \return True if window is minimized. */ - virtual bool isWindowMinimized() const = 0; - - //! Checks if the Irrlicht window is running in fullscreen mode - /** \return True if window is fullscreen. */ - virtual bool isFullscreen() const = 0; - - //! Get the current color format of the window - /** \return Color format of the window. */ - virtual video::ECOLOR_FORMAT getColorFormat() const = 0; - - //! Notifies the device that it should close itself. - /** IrrlichtDevice::run() will always return false after closeDevice() was called. */ - virtual void closeDevice() = 0; - - //! Get the version of the engine. - /** The returned string - will look like this: "1.2.3" or this: "1.2". - \return String which contains the version. */ - virtual const c8* getVersion() const = 0; - - //! Sets a new user event receiver which will receive events from the engine. - /** Return true in IEventReceiver::OnEvent to prevent the event from continuing along - the chain of event receivers. The path that an event takes through the system depends - on its type. See irr::EEVENT_TYPE for details. - \param receiver New receiver to be used. */ - virtual void setEventReceiver(IEventReceiver* receiver) = 0; - - //! Provides access to the current event receiver. - /** \return Pointer to the current event receiver. Returns 0 if there is none. */ - virtual IEventReceiver* getEventReceiver() = 0; - - //! Sends a user created event to the engine. - /** Is is usually not necessary to use this. However, if you - are using an own input library for example for doing joystick - input, you can use this to post key or mouse input events to - the engine. Internally, this method only delegates the events - further to the scene manager and the GUI environment. */ - virtual bool postEventFromUser(const SEvent& event) = 0; - - //! Sets the input receiving scene manager. - /** If set to null, the main scene manager (returned by - GetSceneManager()) will receive the input - \param sceneManager New scene manager to be used. */ - virtual void setInputReceivingSceneManager(scene::ISceneManager* sceneManager) = 0; - - //! Sets if the window should be resizable in windowed mode. - /** The default is false. This method only works in windowed - mode. - \param resize Flag whether the window should be resizable. */ - virtual void setResizable(bool resize=false) = 0; - - //! Minimizes the window if possible. - virtual void minimizeWindow() =0; - - //! Maximizes the window if possible. - virtual void maximizeWindow() =0; - - //! Restore the window to normal size if possible. - virtual void restoreWindow() =0; - - //! Activate any joysticks, and generate events for them. - /** Irrlicht contains support for joysticks, but does not generate joystick events by default, - as this would consume joystick info that 3rd party libraries might rely on. Call this method to - activate joystick support in Irrlicht and to receive irr::SJoystickEvent events. - \param joystickInfo On return, this will contain an array of each joystick that was found and activated. - \return true if joysticks are supported on this device and _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ - is defined, false if joysticks are not supported or support is compiled out. - */ - virtual bool activateJoysticks(core::array<SJoystickInfo>& joystickInfo) =0; - - //! Set the current Gamma Value for the Display - virtual bool setGammaRamp(f32 red, f32 green, f32 blue, - f32 relativebrightness, f32 relativecontrast) =0; - - //! Get the current Gamma Value for the Display - virtual bool getGammaRamp(f32 &red, f32 &green, f32 &blue, - f32 &brightness, f32 &contrast) =0; - - //! Remove messages pending in the system message loop - /** This function is usually used after messages have been buffered for a longer time, for example - when loading a large scene. Clearing the message loop prevents that mouse- or buttonclicks which users - have pressed in the meantime will now trigger unexpected actions in the gui. <br> - So far the following messages are cleared:<br> - Win32: All keyboard and mouse messages<br> - Linux: All keyboard and mouse messages<br> - All other devices are not yet supported here.<br> - The function is still somewhat experimental, as the kind of messages we clear is based on just a few use-cases. - If you think further messages should be cleared, or some messages should not be cleared here, then please tell us. */ - virtual void clearSystemMessages() = 0; - - //! Get the type of the device. - /** This allows the user to check which windowing system is currently being - used. */ - virtual E_DEVICE_TYPE getType() const = 0; - - //! Check if a driver type is supported by the engine. - /** Even if true is returned the driver may not be available - for a configuration requested when creating the device. */ - static bool isDriverSupported(video::E_DRIVER_TYPE driver) - { - switch (driver) - { - case video::EDT_NULL: - return true; - case video::EDT_SOFTWARE: -#ifdef _IRR_COMPILE_WITH_SOFTWARE_ - return true; -#else - return false; -#endif - case video::EDT_BURNINGSVIDEO: -#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ - return true; -#else - return false; -#endif - case video::EDT_DIRECT3D8: -#ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ - return true; -#else - return false; -#endif - case video::EDT_DIRECT3D9: -#ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ - return true; -#else - return false; -#endif - case video::EDT_OPENGL: -#ifdef _IRR_COMPILE_WITH_OPENGL_ - return true; -#else - return false; -#endif - default: - return false; - } - } - }; - -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/Keycodes.h b/builddir/irrlicht-1.8.1/include/Keycodes.h deleted file mode 100644 index e56eca1..0000000 --- a/builddir/irrlicht-1.8.1/include/Keycodes.h +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_KEY_CODES_H_INCLUDED__ -#define __IRR_KEY_CODES_H_INCLUDED__ - -namespace irr -{ - - enum EKEY_CODE - { - KEY_LBUTTON = 0x01, // Left mouse button - KEY_RBUTTON = 0x02, // Right mouse button - KEY_CANCEL = 0x03, // Control-break processing - KEY_MBUTTON = 0x04, // Middle mouse button (three-button mouse) - KEY_XBUTTON1 = 0x05, // Windows 2000/XP: X1 mouse button - KEY_XBUTTON2 = 0x06, // Windows 2000/XP: X2 mouse button - KEY_BACK = 0x08, // BACKSPACE key - KEY_TAB = 0x09, // TAB key - KEY_CLEAR = 0x0C, // CLEAR key - KEY_RETURN = 0x0D, // ENTER key - KEY_SHIFT = 0x10, // SHIFT key - KEY_CONTROL = 0x11, // CTRL key - KEY_MENU = 0x12, // ALT key - KEY_PAUSE = 0x13, // PAUSE key - KEY_CAPITAL = 0x14, // CAPS LOCK key - KEY_KANA = 0x15, // IME Kana mode - KEY_HANGUEL = 0x15, // IME Hanguel mode (maintained for compatibility use KEY_HANGUL) - KEY_HANGUL = 0x15, // IME Hangul mode - KEY_JUNJA = 0x17, // IME Junja mode - KEY_FINAL = 0x18, // IME final mode - KEY_HANJA = 0x19, // IME Hanja mode - KEY_KANJI = 0x19, // IME Kanji mode - KEY_ESCAPE = 0x1B, // ESC key - KEY_CONVERT = 0x1C, // IME convert - KEY_NONCONVERT = 0x1D, // IME nonconvert - KEY_ACCEPT = 0x1E, // IME accept - KEY_MODECHANGE = 0x1F, // IME mode change request - KEY_SPACE = 0x20, // SPACEBAR - KEY_PRIOR = 0x21, // PAGE UP key - KEY_NEXT = 0x22, // PAGE DOWN key - KEY_END = 0x23, // END key - KEY_HOME = 0x24, // HOME key - KEY_LEFT = 0x25, // LEFT ARROW key - KEY_UP = 0x26, // UP ARROW key - KEY_RIGHT = 0x27, // RIGHT ARROW key - KEY_DOWN = 0x28, // DOWN ARROW key - KEY_SELECT = 0x29, // SELECT key - KEY_PRINT = 0x2A, // PRINT key - KEY_EXECUT = 0x2B, // EXECUTE key - KEY_SNAPSHOT = 0x2C, // PRINT SCREEN key - KEY_INSERT = 0x2D, // INS key - KEY_DELETE = 0x2E, // DEL key - KEY_HELP = 0x2F, // HELP key - KEY_KEY_0 = 0x30, // 0 key - KEY_KEY_1 = 0x31, // 1 key - KEY_KEY_2 = 0x32, // 2 key - KEY_KEY_3 = 0x33, // 3 key - KEY_KEY_4 = 0x34, // 4 key - KEY_KEY_5 = 0x35, // 5 key - KEY_KEY_6 = 0x36, // 6 key - KEY_KEY_7 = 0x37, // 7 key - KEY_KEY_8 = 0x38, // 8 key - KEY_KEY_9 = 0x39, // 9 key - KEY_KEY_A = 0x41, // A key - KEY_KEY_B = 0x42, // B key - KEY_KEY_C = 0x43, // C key - KEY_KEY_D = 0x44, // D key - KEY_KEY_E = 0x45, // E key - KEY_KEY_F = 0x46, // F key - KEY_KEY_G = 0x47, // G key - KEY_KEY_H = 0x48, // H key - KEY_KEY_I = 0x49, // I key - KEY_KEY_J = 0x4A, // J key - KEY_KEY_K = 0x4B, // K key - KEY_KEY_L = 0x4C, // L key - KEY_KEY_M = 0x4D, // M key - KEY_KEY_N = 0x4E, // N key - KEY_KEY_O = 0x4F, // O key - KEY_KEY_P = 0x50, // P key - KEY_KEY_Q = 0x51, // Q key - KEY_KEY_R = 0x52, // R key - KEY_KEY_S = 0x53, // S key - KEY_KEY_T = 0x54, // T key - KEY_KEY_U = 0x55, // U key - KEY_KEY_V = 0x56, // V key - KEY_KEY_W = 0x57, // W key - KEY_KEY_X = 0x58, // X key - KEY_KEY_Y = 0x59, // Y key - KEY_KEY_Z = 0x5A, // Z key - KEY_LWIN = 0x5B, // Left Windows key (Microsoft® Natural® keyboard) - KEY_RWIN = 0x5C, // Right Windows key (Natural keyboard) - KEY_APPS = 0x5D, // Applications key (Natural keyboard) - KEY_SLEEP = 0x5F, // Computer Sleep key - KEY_NUMPAD0 = 0x60, // Numeric keypad 0 key - KEY_NUMPAD1 = 0x61, // Numeric keypad 1 key - KEY_NUMPAD2 = 0x62, // Numeric keypad 2 key - KEY_NUMPAD3 = 0x63, // Numeric keypad 3 key - KEY_NUMPAD4 = 0x64, // Numeric keypad 4 key - KEY_NUMPAD5 = 0x65, // Numeric keypad 5 key - KEY_NUMPAD6 = 0x66, // Numeric keypad 6 key - KEY_NUMPAD7 = 0x67, // Numeric keypad 7 key - KEY_NUMPAD8 = 0x68, // Numeric keypad 8 key - KEY_NUMPAD9 = 0x69, // Numeric keypad 9 key - KEY_MULTIPLY = 0x6A, // Multiply key - KEY_ADD = 0x6B, // Add key - KEY_SEPARATOR = 0x6C, // Separator key - KEY_SUBTRACT = 0x6D, // Subtract key - KEY_DECIMAL = 0x6E, // Decimal key - KEY_DIVIDE = 0x6F, // Divide key - KEY_F1 = 0x70, // F1 key - KEY_F2 = 0x71, // F2 key - KEY_F3 = 0x72, // F3 key - KEY_F4 = 0x73, // F4 key - KEY_F5 = 0x74, // F5 key - KEY_F6 = 0x75, // F6 key - KEY_F7 = 0x76, // F7 key - KEY_F8 = 0x77, // F8 key - KEY_F9 = 0x78, // F9 key - KEY_F10 = 0x79, // F10 key - KEY_F11 = 0x7A, // F11 key - KEY_F12 = 0x7B, // F12 key - KEY_F13 = 0x7C, // F13 key - KEY_F14 = 0x7D, // F14 key - KEY_F15 = 0x7E, // F15 key - KEY_F16 = 0x7F, // F16 key - KEY_F17 = 0x80, // F17 key - KEY_F18 = 0x81, // F18 key - KEY_F19 = 0x82, // F19 key - KEY_F20 = 0x83, // F20 key - KEY_F21 = 0x84, // F21 key - KEY_F22 = 0x85, // F22 key - KEY_F23 = 0x86, // F23 key - KEY_F24 = 0x87, // F24 key - KEY_NUMLOCK = 0x90, // NUM LOCK key - KEY_SCROLL = 0x91, // SCROLL LOCK key - KEY_LSHIFT = 0xA0, // Left SHIFT key - KEY_RSHIFT = 0xA1, // Right SHIFT key - KEY_LCONTROL = 0xA2, // Left CONTROL key - KEY_RCONTROL = 0xA3, // Right CONTROL key - KEY_LMENU = 0xA4, // Left MENU key - KEY_RMENU = 0xA5, // Right MENU key - KEY_OEM_1 = 0xBA, // for US ";:" - KEY_PLUS = 0xBB, // Plus Key "+" - KEY_COMMA = 0xBC, // Comma Key "," - KEY_MINUS = 0xBD, // Minus Key "-" - KEY_PERIOD = 0xBE, // Period Key "." - KEY_OEM_2 = 0xBF, // for US "/?" - KEY_OEM_3 = 0xC0, // for US "`~" - KEY_OEM_4 = 0xDB, // for US "[{" - KEY_OEM_5 = 0xDC, // for US "\|" - KEY_OEM_6 = 0xDD, // for US "]}" - KEY_OEM_7 = 0xDE, // for US "'"" - KEY_OEM_8 = 0xDF, // None - KEY_OEM_AX = 0xE1, // for Japan "AX" - KEY_OEM_102 = 0xE2, // "<>" or "\|" - KEY_ATTN = 0xF6, // Attn key - KEY_CRSEL = 0xF7, // CrSel key - KEY_EXSEL = 0xF8, // ExSel key - KEY_EREOF = 0xF9, // Erase EOF key - KEY_PLAY = 0xFA, // Play key - KEY_ZOOM = 0xFB, // Zoom key - KEY_PA1 = 0xFD, // PA1 key - KEY_OEM_CLEAR = 0xFE, // Clear key - - KEY_KEY_CODES_COUNT = 0xFF // this is not a key, but the amount of keycodes there are. - }; - -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/S3DVertex.h b/builddir/irrlicht-1.8.1/include/S3DVertex.h deleted file mode 100644 index 706cf4b..0000000 --- a/builddir/irrlicht-1.8.1/include/S3DVertex.h +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __S_3D_VERTEX_H_INCLUDED__ -#define __S_3D_VERTEX_H_INCLUDED__ - -#include "vector3d.h" -#include "vector2d.h" -#include "SColor.h" - -namespace irr -{ -namespace video -{ - -//! Enumeration for all vertex types there are. -enum E_VERTEX_TYPE -{ - //! Standard vertex type used by the Irrlicht engine, video::S3DVertex. - EVT_STANDARD = 0, - - //! Vertex with two texture coordinates, video::S3DVertex2TCoords. - /** Usually used for geometry with lightmaps or other special materials. */ - EVT_2TCOORDS, - - //! Vertex with a tangent and binormal vector, video::S3DVertexTangents. - /** Usually used for tangent space normal mapping. */ - EVT_TANGENTS -}; - -//! Array holding the built in vertex type names -const char* const sBuiltInVertexTypeNames[] = -{ - "standard", - "2tcoords", - "tangents", - 0 -}; - -//! standard vertex used by the Irrlicht engine. -struct S3DVertex -{ - //! default constructor - S3DVertex() {} - - //! constructor - S3DVertex(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv) - : Pos(x,y,z), Normal(nx,ny,nz), Color(c), TCoords(tu,tv) {} - - //! constructor - S3DVertex(const core::vector3df& pos, const core::vector3df& normal, - SColor color, const core::vector2d<f32>& tcoords) - : Pos(pos), Normal(normal), Color(color), TCoords(tcoords) {} - - //! Position - core::vector3df Pos; - - //! Normal vector - core::vector3df Normal; - - //! Color - SColor Color; - - //! Texture coordinates - core::vector2d<f32> TCoords; - - bool operator==(const S3DVertex& other) const - { - return ((Pos == other.Pos) && (Normal == other.Normal) && - (Color == other.Color) && (TCoords == other.TCoords)); - } - - bool operator!=(const S3DVertex& other) const - { - return ((Pos != other.Pos) || (Normal != other.Normal) || - (Color != other.Color) || (TCoords != other.TCoords)); - } - - bool operator<(const S3DVertex& other) const - { - return ((Pos < other.Pos) || - ((Pos == other.Pos) && (Normal < other.Normal)) || - ((Pos == other.Pos) && (Normal == other.Normal) && (Color < other.Color)) || - ((Pos == other.Pos) && (Normal == other.Normal) && (Color == other.Color) && (TCoords < other.TCoords))); - } - - E_VERTEX_TYPE getType() const - { - return EVT_STANDARD; - } - - S3DVertex getInterpolated(const S3DVertex& other, f32 d) - { - d = core::clamp(d, 0.0f, 1.0f); - return S3DVertex(Pos.getInterpolated(other.Pos, d), - Normal.getInterpolated(other.Normal, d), - Color.getInterpolated(other.Color, d), - TCoords.getInterpolated(other.TCoords, d)); - } -}; - - -//! Vertex with two texture coordinates. -/** Usually used for geometry with lightmaps -or other special materials. -*/ -struct S3DVertex2TCoords : public S3DVertex -{ - //! default constructor - S3DVertex2TCoords() : S3DVertex() {} - - //! constructor with two different texture coords, but no normal - S3DVertex2TCoords(f32 x, f32 y, f32 z, SColor c, f32 tu, f32 tv, f32 tu2, f32 tv2) - : S3DVertex(x,y,z, 0.0f, 0.0f, 0.0f, c, tu,tv), TCoords2(tu2,tv2) {} - - //! constructor with two different texture coords, but no normal - S3DVertex2TCoords(const core::vector3df& pos, SColor color, - const core::vector2d<f32>& tcoords, const core::vector2d<f32>& tcoords2) - : S3DVertex(pos, core::vector3df(), color, tcoords), TCoords2(tcoords2) {} - - //! constructor with all values - S3DVertex2TCoords(const core::vector3df& pos, const core::vector3df& normal, const SColor& color, - const core::vector2d<f32>& tcoords, const core::vector2d<f32>& tcoords2) - : S3DVertex(pos, normal, color, tcoords), TCoords2(tcoords2) {} - - //! constructor with all values - S3DVertex2TCoords(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv, f32 tu2, f32 tv2) - : S3DVertex(x,y,z, nx,ny,nz, c, tu,tv), TCoords2(tu2,tv2) {} - - //! constructor with the same texture coords and normal - S3DVertex2TCoords(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv) - : S3DVertex(x,y,z, nx,ny,nz, c, tu,tv), TCoords2(tu,tv) {} - - //! constructor with the same texture coords and normal - S3DVertex2TCoords(const core::vector3df& pos, const core::vector3df& normal, - SColor color, const core::vector2d<f32>& tcoords) - : S3DVertex(pos, normal, color, tcoords), TCoords2(tcoords) {} - - //! constructor from S3DVertex - S3DVertex2TCoords(S3DVertex& o) : S3DVertex(o) {} - - //! Second set of texture coordinates - core::vector2d<f32> TCoords2; - - //! Equality operator - bool operator==(const S3DVertex2TCoords& other) const - { - return ((static_cast<S3DVertex>(*this)==other) && - (TCoords2 == other.TCoords2)); - } - - //! Inequality operator - bool operator!=(const S3DVertex2TCoords& other) const - { - return ((static_cast<S3DVertex>(*this)!=other) || - (TCoords2 != other.TCoords2)); - } - - bool operator<(const S3DVertex2TCoords& other) const - { - return ((static_cast<S3DVertex>(*this) < other) || - ((static_cast<S3DVertex>(*this) == other) && (TCoords2 < other.TCoords2))); - } - - E_VERTEX_TYPE getType() const - { - return EVT_2TCOORDS; - } - - S3DVertex2TCoords getInterpolated(const S3DVertex2TCoords& other, f32 d) - { - d = core::clamp(d, 0.0f, 1.0f); - return S3DVertex2TCoords(Pos.getInterpolated(other.Pos, d), - Normal.getInterpolated(other.Normal, d), - Color.getInterpolated(other.Color, d), - TCoords.getInterpolated(other.TCoords, d), - TCoords2.getInterpolated(other.TCoords2, d)); - } -}; - - -//! Vertex with a tangent and binormal vector. -/** Usually used for tangent space normal mapping. */ -struct S3DVertexTangents : public S3DVertex -{ - //! default constructor - S3DVertexTangents() : S3DVertex() { } - - //! constructor - S3DVertexTangents(f32 x, f32 y, f32 z, f32 nx=0.0f, f32 ny=0.0f, f32 nz=0.0f, - SColor c = 0xFFFFFFFF, f32 tu=0.0f, f32 tv=0.0f, - f32 tanx=0.0f, f32 tany=0.0f, f32 tanz=0.0f, - f32 bx=0.0f, f32 by=0.0f, f32 bz=0.0f) - : S3DVertex(x,y,z, nx,ny,nz, c, tu,tv), Tangent(tanx,tany,tanz), Binormal(bx,by,bz) { } - - //! constructor - S3DVertexTangents(const core::vector3df& pos, SColor c, - const core::vector2df& tcoords) - : S3DVertex(pos, core::vector3df(), c, tcoords) { } - - //! constructor - S3DVertexTangents(const core::vector3df& pos, - const core::vector3df& normal, SColor c, - const core::vector2df& tcoords, - const core::vector3df& tangent=core::vector3df(), - const core::vector3df& binormal=core::vector3df()) - : S3DVertex(pos, normal, c, tcoords), Tangent(tangent), Binormal(binormal) { } - - //! Tangent vector along the x-axis of the texture - core::vector3df Tangent; - - //! Binormal vector (tangent x normal) - core::vector3df Binormal; - - bool operator==(const S3DVertexTangents& other) const - { - return ((static_cast<S3DVertex>(*this)==other) && - (Tangent == other.Tangent) && - (Binormal == other.Binormal)); - } - - bool operator!=(const S3DVertexTangents& other) const - { - return ((static_cast<S3DVertex>(*this)!=other) || - (Tangent != other.Tangent) || - (Binormal != other.Binormal)); - } - - bool operator<(const S3DVertexTangents& other) const - { - return ((static_cast<S3DVertex>(*this) < other) || - ((static_cast<S3DVertex>(*this) == other) && (Tangent < other.Tangent)) || - ((static_cast<S3DVertex>(*this) == other) && (Tangent == other.Tangent) && (Binormal < other.Binormal))); - } - - E_VERTEX_TYPE getType() const - { - return EVT_TANGENTS; - } - - S3DVertexTangents getInterpolated(const S3DVertexTangents& other, f32 d) - { - d = core::clamp(d, 0.0f, 1.0f); - return S3DVertexTangents(Pos.getInterpolated(other.Pos, d), - Normal.getInterpolated(other.Normal, d), - Color.getInterpolated(other.Color, d), - TCoords.getInterpolated(other.TCoords, d), - Tangent.getInterpolated(other.Tangent, d), - Binormal.getInterpolated(other.Binormal, d)); - } -}; - - - -inline u32 getVertexPitchFromType(E_VERTEX_TYPE vertexType) -{ - switch (vertexType) - { - case video::EVT_2TCOORDS: - return sizeof(video::S3DVertex2TCoords); - case video::EVT_TANGENTS: - return sizeof(video::S3DVertexTangents); - default: - return sizeof(video::S3DVertex); - } -} - - -} // end namespace video -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/SAnimatedMesh.h b/builddir/irrlicht-1.8.1/include/SAnimatedMesh.h deleted file mode 100644 index f962f30..0000000 --- a/builddir/irrlicht-1.8.1/include/SAnimatedMesh.h +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __S_ANIMATED_MESH_H_INCLUDED__ -#define __S_ANIMATED_MESH_H_INCLUDED__ - -#include "IAnimatedMesh.h" -#include "IMesh.h" -#include "aabbox3d.h" -#include "irrArray.h" - -namespace irr -{ -namespace scene -{ - - //! Simple implementation of the IAnimatedMesh interface. - struct SAnimatedMesh : public IAnimatedMesh - { - //! constructor - SAnimatedMesh(scene::IMesh* mesh=0, scene::E_ANIMATED_MESH_TYPE type=scene::EAMT_UNKNOWN) : IAnimatedMesh(), FramesPerSecond(25.f), Type(type) - { - #ifdef _DEBUG - setDebugName("SAnimatedMesh"); - #endif - addMesh(mesh); - recalculateBoundingBox(); - } - - //! destructor - virtual ~SAnimatedMesh() - { - // drop meshes - for (u32 i=0; i<Meshes.size(); ++i) - Meshes[i]->drop(); - } - - //! Gets the frame count of the animated mesh. - /** \return Amount of frames. If the amount is 1, it is a static, non animated mesh. */ - virtual u32 getFrameCount() const - { - return Meshes.size(); - } - - //! Gets the default animation speed of the animated mesh. - /** \return Amount of frames per second. If the amount is 0, it is a static, non animated mesh. */ - virtual f32 getAnimationSpeed() const - { - return FramesPerSecond; - } - - //! Gets the frame count of the animated mesh. - /** \param fps Frames per second to play the animation with. If the amount is 0, it is not animated. - The actual speed is set in the scene node the mesh is instantiated in.*/ - virtual void setAnimationSpeed(f32 fps) - { - FramesPerSecond=fps; - } - - //! Returns the IMesh interface for a frame. - /** \param frame: Frame number as zero based index. The maximum frame number is - getFrameCount() - 1; - \param detailLevel: Level of detail. 0 is the lowest, - 255 the highest level of detail. Most meshes will ignore the detail level. - \param startFrameLoop: start frame - \param endFrameLoop: end frame - \return The animated mesh based on a detail level. */ - virtual IMesh* getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1) - { - if (Meshes.empty()) - return 0; - - return Meshes[frame]; - } - - //! adds a Mesh - void addMesh(IMesh* mesh) - { - if (mesh) - { - mesh->grab(); - Meshes.push_back(mesh); - } - } - - //! Returns an axis aligned bounding box of the mesh. - /** \return A bounding box of this mesh is returned. */ - virtual const core::aabbox3d<f32>& getBoundingBox() const - { - return Box; - } - - //! set user axis aligned bounding box - virtual void setBoundingBox(const core::aabbox3df& box) - { - Box = box; - } - - //! Recalculates the bounding box. - void recalculateBoundingBox() - { - Box.reset(0,0,0); - - if (Meshes.empty()) - return; - - Box = Meshes[0]->getBoundingBox(); - - for (u32 i=1; i<Meshes.size(); ++i) - Box.addInternalBox(Meshes[i]->getBoundingBox()); - } - - //! Returns the type of the animated mesh. - virtual E_ANIMATED_MESH_TYPE getMeshType() const - { - return Type; - } - - //! returns amount of mesh buffers. - virtual u32 getMeshBufferCount() const - { - if (Meshes.empty()) - return 0; - - return Meshes[0]->getMeshBufferCount(); - } - - //! returns pointer to a mesh buffer - virtual IMeshBuffer* getMeshBuffer(u32 nr) const - { - if (Meshes.empty()) - return 0; - - return Meshes[0]->getMeshBuffer(nr); - } - - //! Returns pointer to a mesh buffer which fits a material - /** \param material: material to search for - \return Returns the pointer to the mesh buffer or - NULL if there is no such mesh buffer. */ - virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const - { - if (Meshes.empty()) - return 0; - - return Meshes[0]->getMeshBuffer(material); - } - - //! Set a material flag for all meshbuffers of this mesh. - virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) - { - for (u32 i=0; i<Meshes.size(); ++i) - Meshes[i]->setMaterialFlag(flag, newvalue); - } - - //! set the hardware mapping hint, for driver - virtual void setHardwareMappingHint( E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX ) - { - for (u32 i=0; i<Meshes.size(); ++i) - Meshes[i]->setHardwareMappingHint(newMappingHint, buffer); - } - - //! flags the meshbuffer as changed, reloads hardware buffers - virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) - { - for (u32 i=0; i<Meshes.size(); ++i) - Meshes[i]->setDirty(buffer); - } - - //! All meshes defining the animated mesh - core::array<IMesh*> Meshes; - - //! The bounding box of this mesh - core::aabbox3d<f32> Box; - - //! Default animation speed of this mesh. - f32 FramesPerSecond; - - //! The type of the mesh. - E_ANIMATED_MESH_TYPE Type; - }; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/SColor.h b/builddir/irrlicht-1.8.1/include/SColor.h deleted file mode 100644 index f57b4a9..0000000 --- a/builddir/irrlicht-1.8.1/include/SColor.h +++ /dev/null @@ -1,697 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __COLOR_H_INCLUDED__ -#define __COLOR_H_INCLUDED__ - -#include "irrTypes.h" -#include "irrMath.h" - -namespace irr -{ -namespace video -{ - //! An enum for the color format of textures used by the Irrlicht Engine. - /** A color format specifies how color information is stored. */ - enum ECOLOR_FORMAT - { - //! 16 bit color format used by the software driver. - /** It is thus preferred by all other irrlicht engine video drivers. - There are 5 bits for every color component, and a single bit is left - for alpha information. */ - ECF_A1R5G5B5 = 0, - - //! Standard 16 bit color format. - ECF_R5G6B5, - - //! 24 bit color, no alpha channel, but 8 bit for red, green and blue. - ECF_R8G8B8, - - //! Default 32 bit color format. 8 bits are used for every component: red, green, blue and alpha. - ECF_A8R8G8B8, - - /** Floating Point formats. The following formats may only be used for render target textures. */ - - //! 16 bit floating point format using 16 bits for the red channel. - ECF_R16F, - - //! 32 bit floating point format using 16 bits for the red channel and 16 bits for the green channel. - ECF_G16R16F, - - //! 64 bit floating point format 16 bits are used for the red, green, blue and alpha channels. - ECF_A16B16G16R16F, - - //! 32 bit floating point format using 32 bits for the red channel. - ECF_R32F, - - //! 64 bit floating point format using 32 bits for the red channel and 32 bits for the green channel. - ECF_G32R32F, - - //! 128 bit floating point format. 32 bits are used for the red, green, blue and alpha channels. - ECF_A32B32G32R32F, - - //! Unknown color format: - ECF_UNKNOWN - }; - - - //! Creates a 16 bit A1R5G5B5 color - inline u16 RGBA16(u32 r, u32 g, u32 b, u32 a=0xFF) - { - return (u16)((a & 0x80) << 8 | - (r & 0xF8) << 7 | - (g & 0xF8) << 2 | - (b & 0xF8) >> 3); - } - - - //! Creates a 16 bit A1R5G5B5 color - inline u16 RGB16(u32 r, u32 g, u32 b) - { - return RGBA16(r,g,b); - } - - - //! Creates a 16bit A1R5G5B5 color, based on 16bit input values - inline u16 RGB16from16(u16 r, u16 g, u16 b) - { - return (0x8000 | - (r & 0x1F) << 10 | - (g & 0x1F) << 5 | - (b & 0x1F)); - } - - - //! Converts a 32bit (X8R8G8B8) color to a 16bit A1R5G5B5 color - inline u16 X8R8G8B8toA1R5G5B5(u32 color) - { - return (u16)(0x8000 | - ( color & 0x00F80000) >> 9 | - ( color & 0x0000F800) >> 6 | - ( color & 0x000000F8) >> 3); - } - - - //! Converts a 32bit (A8R8G8B8) color to a 16bit A1R5G5B5 color - inline u16 A8R8G8B8toA1R5G5B5(u32 color) - { - return (u16)(( color & 0x80000000) >> 16| - ( color & 0x00F80000) >> 9 | - ( color & 0x0000F800) >> 6 | - ( color & 0x000000F8) >> 3); - } - - - //! Converts a 32bit (A8R8G8B8) color to a 16bit R5G6B5 color - inline u16 A8R8G8B8toR5G6B5(u32 color) - { - return (u16)(( color & 0x00F80000) >> 8 | - ( color & 0x0000FC00) >> 5 | - ( color & 0x000000F8) >> 3); - } - - - //! Convert A8R8G8B8 Color from A1R5G5B5 color - /** build a nicer 32bit Color by extending dest lower bits with source high bits. */ - inline u32 A1R5G5B5toA8R8G8B8(u16 color) - { - return ( (( -( (s32) color & 0x00008000 ) >> (s32) 31 ) & 0xFF000000 ) | - (( color & 0x00007C00 ) << 9) | (( color & 0x00007000 ) << 4) | - (( color & 0x000003E0 ) << 6) | (( color & 0x00000380 ) << 1) | - (( color & 0x0000001F ) << 3) | (( color & 0x0000001C ) >> 2) - ); - } - - - //! Returns A8R8G8B8 Color from R5G6B5 color - inline u32 R5G6B5toA8R8G8B8(u16 color) - { - return 0xFF000000 | - ((color & 0xF800) << 8)| - ((color & 0x07E0) << 5)| - ((color & 0x001F) << 3); - } - - - //! Returns A1R5G5B5 Color from R5G6B5 color - inline u16 R5G6B5toA1R5G5B5(u16 color) - { - return 0x8000 | (((color & 0xFFC0) >> 1) | (color & 0x1F)); - } - - - //! Returns R5G6B5 Color from A1R5G5B5 color - inline u16 A1R5G5B5toR5G6B5(u16 color) - { - return (((color & 0x7FE0) << 1) | (color & 0x1F)); - } - - - - //! Returns the alpha component from A1R5G5B5 color - /** In Irrlicht, alpha refers to opacity. - \return The alpha value of the color. 0 is transparent, 1 is opaque. */ - inline u32 getAlpha(u16 color) - { - return ((color >> 15)&0x1); - } - - - //! Returns the red component from A1R5G5B5 color. - /** Shift left by 3 to get 8 bit value. */ - inline u32 getRed(u16 color) - { - return ((color >> 10)&0x1F); - } - - - //! Returns the green component from A1R5G5B5 color - /** Shift left by 3 to get 8 bit value. */ - inline u32 getGreen(u16 color) - { - return ((color >> 5)&0x1F); - } - - - //! Returns the blue component from A1R5G5B5 color - /** Shift left by 3 to get 8 bit value. */ - inline u32 getBlue(u16 color) - { - return (color & 0x1F); - } - - - //! Returns the average from a 16 bit A1R5G5B5 color - inline s32 getAverage(s16 color) - { - return ((getRed(color)<<3) + (getGreen(color)<<3) + (getBlue(color)<<3)) / 3; - } - - - //! Class representing a 32 bit ARGB color. - /** The color values for alpha, red, green, and blue are - stored in a single u32. So all four values may be between 0 and 255. - Alpha in Irrlicht is opacity, so 0 is fully transparent, 255 is fully opaque (solid). - This class is used by most parts of the Irrlicht Engine - to specify a color. Another way is using the class SColorf, which - stores the color values in 4 floats. - This class must consist of only one u32 and must not use virtual functions. - */ - class SColor - { - public: - - //! Constructor of the Color. Does nothing. - /** The color value is not initialized to save time. */ - SColor() {} - - //! Constructs the color from 4 values representing the alpha, red, green and blue component. - /** Must be values between 0 and 255. */ - SColor (u32 a, u32 r, u32 g, u32 b) - : color(((a & 0xff)<<24) | ((r & 0xff)<<16) | ((g & 0xff)<<8) | (b & 0xff)) {} - - //! Constructs the color from a 32 bit value. Could be another color. - SColor(u32 clr) - : color(clr) {} - - //! Returns the alpha component of the color. - /** The alpha component defines how opaque a color is. - \return The alpha value of the color. 0 is fully transparent, 255 is fully opaque. */ - u32 getAlpha() const { return color>>24; } - - //! Returns the red component of the color. - /** \return Value between 0 and 255, specifying how red the color is. - 0 means no red, 255 means full red. */ - u32 getRed() const { return (color>>16) & 0xff; } - - //! Returns the green component of the color. - /** \return Value between 0 and 255, specifying how green the color is. - 0 means no green, 255 means full green. */ - u32 getGreen() const { return (color>>8) & 0xff; } - - //! Returns the blue component of the color. - /** \return Value between 0 and 255, specifying how blue the color is. - 0 means no blue, 255 means full blue. */ - u32 getBlue() const { return color & 0xff; } - - //! Get lightness of the color in the range [0,255] - f32 getLightness() const - { - return 0.5f*(core::max_(core::max_(getRed(),getGreen()),getBlue())+core::min_(core::min_(getRed(),getGreen()),getBlue())); - } - - //! Get luminance of the color in the range [0,255]. - f32 getLuminance() const - { - return 0.3f*getRed() + 0.59f*getGreen() + 0.11f*getBlue(); - } - - //! Get average intensity of the color in the range [0,255]. - u32 getAverage() const - { - return ( getRed() + getGreen() + getBlue() ) / 3; - } - - //! Sets the alpha component of the Color. - /** The alpha component defines how transparent a color should be. - \param a The alpha value of the color. 0 is fully transparent, 255 is fully opaque. */ - void setAlpha(u32 a) { color = ((a & 0xff)<<24) | (color & 0x00ffffff); } - - //! Sets the red component of the Color. - /** \param r: Has to be a value between 0 and 255. - 0 means no red, 255 means full red. */ - void setRed(u32 r) { color = ((r & 0xff)<<16) | (color & 0xff00ffff); } - - //! Sets the green component of the Color. - /** \param g: Has to be a value between 0 and 255. - 0 means no green, 255 means full green. */ - void setGreen(u32 g) { color = ((g & 0xff)<<8) | (color & 0xffff00ff); } - - //! Sets the blue component of the Color. - /** \param b: Has to be a value between 0 and 255. - 0 means no blue, 255 means full blue. */ - void setBlue(u32 b) { color = (b & 0xff) | (color & 0xffffff00); } - - //! Calculates a 16 bit A1R5G5B5 value of this color. - /** \return 16 bit A1R5G5B5 value of this color. */ - u16 toA1R5G5B5() const { return A8R8G8B8toA1R5G5B5(color); } - - //! Converts color to OpenGL color format - /** From ARGB to RGBA in 4 byte components for endian aware - passing to OpenGL - \param dest: address where the 4x8 bit OpenGL color is stored. */ - void toOpenGLColor(u8* dest) const - { - *dest = (u8)getRed(); - *++dest = (u8)getGreen(); - *++dest = (u8)getBlue(); - *++dest = (u8)getAlpha(); - } - - //! Sets all four components of the color at once. - /** Constructs the color from 4 values representing the alpha, - red, green and blue components of the color. Must be values - between 0 and 255. - \param a: Alpha component of the color. The alpha component - defines how transparent a color should be. Has to be a value - between 0 and 255. 255 means not transparent (opaque), 0 means - fully transparent. - \param r: Sets the red component of the Color. Has to be a - value between 0 and 255. 0 means no red, 255 means full red. - \param g: Sets the green component of the Color. Has to be a - value between 0 and 255. 0 means no green, 255 means full - green. - \param b: Sets the blue component of the Color. Has to be a - value between 0 and 255. 0 means no blue, 255 means full blue. */ - void set(u32 a, u32 r, u32 g, u32 b) - { - color = (((a & 0xff)<<24) | ((r & 0xff)<<16) | ((g & 0xff)<<8) | (b & 0xff)); - } - void set(u32 col) { color = col; } - - //! Compares the color to another color. - /** \return True if the colors are the same, and false if not. */ - bool operator==(const SColor& other) const { return other.color == color; } - - //! Compares the color to another color. - /** \return True if the colors are different, and false if they are the same. */ - bool operator!=(const SColor& other) const { return other.color != color; } - - //! comparison operator - /** \return True if this color is smaller than the other one */ - bool operator<(const SColor& other) const { return (color < other.color); } - - //! Adds two colors, result is clamped to 0..255 values - /** \param other Color to add to this color - \return Addition of the two colors, clamped to 0..255 values */ - SColor operator+(const SColor& other) const - { - return SColor(core::min_(getAlpha() + other.getAlpha(), 255u), - core::min_(getRed() + other.getRed(), 255u), - core::min_(getGreen() + other.getGreen(), 255u), - core::min_(getBlue() + other.getBlue(), 255u)); - } - - //! Interpolates the color with a f32 value to another color - /** \param other: Other color - \param d: value between 0.0f and 1.0f - \return Interpolated color. */ - SColor getInterpolated(const SColor &other, f32 d) const - { - d = core::clamp(d, 0.f, 1.f); - const f32 inv = 1.0f - d; - return SColor((u32)core::round32(other.getAlpha()*inv + getAlpha()*d), - (u32)core::round32(other.getRed()*inv + getRed()*d), - (u32)core::round32(other.getGreen()*inv + getGreen()*d), - (u32)core::round32(other.getBlue()*inv + getBlue()*d)); - } - - //! Returns interpolated color. ( quadratic ) - /** \param c1: first color to interpolate with - \param c2: second color to interpolate with - \param d: value between 0.0f and 1.0f. */ - SColor getInterpolated_quadratic(const SColor& c1, const SColor& c2, f32 d) const - { - // this*(1-d)*(1-d) + 2 * c1 * (1-d) + c2 * d * d; - d = core::clamp(d, 0.f, 1.f); - const f32 inv = 1.f - d; - const f32 mul0 = inv * inv; - const f32 mul1 = 2.f * d * inv; - const f32 mul2 = d * d; - - return SColor( - core::clamp( core::floor32( - getAlpha() * mul0 + c1.getAlpha() * mul1 + c2.getAlpha() * mul2 ), 0, 255 ), - core::clamp( core::floor32( - getRed() * mul0 + c1.getRed() * mul1 + c2.getRed() * mul2 ), 0, 255 ), - core::clamp ( core::floor32( - getGreen() * mul0 + c1.getGreen() * mul1 + c2.getGreen() * mul2 ), 0, 255 ), - core::clamp ( core::floor32( - getBlue() * mul0 + c1.getBlue() * mul1 + c2.getBlue() * mul2 ), 0, 255 )); - } - - //! set the color by expecting data in the given format - /** \param data: must point to valid memory containing color information in the given format - \param format: tells the format in which data is available - */ - void setData(const void *data, ECOLOR_FORMAT format) - { - switch (format) - { - case ECF_A1R5G5B5: - color = A1R5G5B5toA8R8G8B8(*(u16*)data); - break; - case ECF_R5G6B5: - color = R5G6B5toA8R8G8B8(*(u16*)data); - break; - case ECF_A8R8G8B8: - color = *(u32*)data; - break; - case ECF_R8G8B8: - { - u8* p = (u8*)data; - set(255, p[0],p[1],p[2]); - } - break; - default: - color = 0xffffffff; - break; - } - } - - //! Write the color to data in the defined format - /** \param data: target to write the color. Must contain sufficiently large memory to receive the number of bytes neede for format - \param format: tells the format used to write the color into data - */ - void getData(void *data, ECOLOR_FORMAT format) - { - switch(format) - { - case ECF_A1R5G5B5: - { - u16 * dest = (u16*)data; - *dest = video::A8R8G8B8toA1R5G5B5( color ); - } - break; - - case ECF_R5G6B5: - { - u16 * dest = (u16*)data; - *dest = video::A8R8G8B8toR5G6B5( color ); - } - break; - - case ECF_R8G8B8: - { - u8* dest = (u8*)data; - dest[0] = (u8)getRed(); - dest[1] = (u8)getGreen(); - dest[2] = (u8)getBlue(); - } - break; - - case ECF_A8R8G8B8: - { - u32 * dest = (u32*)data; - *dest = color; - } - break; - - default: - break; - } - } - - //! color in A8R8G8B8 Format - u32 color; - }; - - - //! Class representing a color with four floats. - /** The color values for red, green, blue - and alpha are each stored in a 32 bit floating point variable. - So all four values may be between 0.0f and 1.0f. - Another, faster way to define colors is using the class SColor, which - stores the color values in a single 32 bit integer. - */ - class SColorf - { - public: - //! Default constructor for SColorf. - /** Sets red, green and blue to 0.0f and alpha to 1.0f. */ - SColorf() : r(0.0f), g(0.0f), b(0.0f), a(1.0f) {} - - //! Constructs a color from up to four color values: red, green, blue, and alpha. - /** \param r: Red color component. Should be a value between - 0.0f meaning no red and 1.0f, meaning full red. - \param g: Green color component. Should be a value between 0.0f - meaning no green and 1.0f, meaning full green. - \param b: Blue color component. Should be a value between 0.0f - meaning no blue and 1.0f, meaning full blue. - \param a: Alpha color component of the color. The alpha - component defines how transparent a color should be. Has to be - a value between 0.0f and 1.0f, 1.0f means not transparent - (opaque), 0.0f means fully transparent. */ - SColorf(f32 r, f32 g, f32 b, f32 a = 1.0f) : r(r), g(g), b(b), a(a) {} - - //! Constructs a color from 32 bit Color. - /** \param c: 32 bit color from which this SColorf class is - constructed from. */ - SColorf(SColor c) - { - const f32 inv = 1.0f / 255.0f; - r = c.getRed() * inv; - g = c.getGreen() * inv; - b = c.getBlue() * inv; - a = c.getAlpha() * inv; - } - - //! Converts this color to a SColor without floats. - SColor toSColor() const - { - return SColor((u32)core::round32(a*255.0f), (u32)core::round32(r*255.0f), (u32)core::round32(g*255.0f), (u32)core::round32(b*255.0f)); - } - - //! Sets three color components to new values at once. - /** \param rr: Red color component. Should be a value between 0.0f meaning - no red (=black) and 1.0f, meaning full red. - \param gg: Green color component. Should be a value between 0.0f meaning - no green (=black) and 1.0f, meaning full green. - \param bb: Blue color component. Should be a value between 0.0f meaning - no blue (=black) and 1.0f, meaning full blue. */ - void set(f32 rr, f32 gg, f32 bb) {r = rr; g =gg; b = bb; } - - //! Sets all four color components to new values at once. - /** \param aa: Alpha component. Should be a value between 0.0f meaning - fully transparent and 1.0f, meaning opaque. - \param rr: Red color component. Should be a value between 0.0f meaning - no red and 1.0f, meaning full red. - \param gg: Green color component. Should be a value between 0.0f meaning - no green and 1.0f, meaning full green. - \param bb: Blue color component. Should be a value between 0.0f meaning - no blue and 1.0f, meaning full blue. */ - void set(f32 aa, f32 rr, f32 gg, f32 bb) {a = aa; r = rr; g =gg; b = bb; } - - //! Interpolates the color with a f32 value to another color - /** \param other: Other color - \param d: value between 0.0f and 1.0f - \return Interpolated color. */ - SColorf getInterpolated(const SColorf &other, f32 d) const - { - d = core::clamp(d, 0.f, 1.f); - const f32 inv = 1.0f - d; - return SColorf(other.r*inv + r*d, - other.g*inv + g*d, other.b*inv + b*d, other.a*inv + a*d); - } - - //! Returns interpolated color. ( quadratic ) - /** \param c1: first color to interpolate with - \param c2: second color to interpolate with - \param d: value between 0.0f and 1.0f. */ - inline SColorf getInterpolated_quadratic(const SColorf& c1, const SColorf& c2, - f32 d) const - { - d = core::clamp(d, 0.f, 1.f); - // this*(1-d)*(1-d) + 2 * c1 * (1-d) + c2 * d * d; - const f32 inv = 1.f - d; - const f32 mul0 = inv * inv; - const f32 mul1 = 2.f * d * inv; - const f32 mul2 = d * d; - - return SColorf (r * mul0 + c1.r * mul1 + c2.r * mul2, - g * mul0 + c1.g * mul1 + c2.g * mul2, - b * mul0 + c1.b * mul1 + c2.b * mul2, - a * mul0 + c1.a * mul1 + c2.a * mul2); - } - - - //! Sets a color component by index. R=0, G=1, B=2, A=3 - void setColorComponentValue(s32 index, f32 value) - { - switch(index) - { - case 0: r = value; break; - case 1: g = value; break; - case 2: b = value; break; - case 3: a = value; break; - } - } - - //! Returns the alpha component of the color in the range 0.0 (transparent) to 1.0 (opaque) - f32 getAlpha() const { return a; } - - //! Returns the red component of the color in the range 0.0 to 1.0 - f32 getRed() const { return r; } - - //! Returns the green component of the color in the range 0.0 to 1.0 - f32 getGreen() const { return g; } - - //! Returns the blue component of the color in the range 0.0 to 1.0 - f32 getBlue() const { return b; } - - //! red color component - f32 r; - - //! green color component - f32 g; - - //! blue component - f32 b; - - //! alpha color component - f32 a; - }; - - - //! Class representing a color in HSL format - /** The color values for hue, saturation, luminance - are stored in 32bit floating point variables. Hue is in range [0,360], - Luminance and Saturation are in percent [0,100] - */ - class SColorHSL - { - public: - SColorHSL ( f32 h = 0.f, f32 s = 0.f, f32 l = 0.f ) - : Hue ( h ), Saturation ( s ), Luminance ( l ) {} - - void fromRGB(const SColorf &color); - void toRGB(SColorf &color) const; - - f32 Hue; - f32 Saturation; - f32 Luminance; - - private: - inline f32 toRGB1(f32 rm1, f32 rm2, f32 rh) const; - - }; - - inline void SColorHSL::fromRGB(const SColorf &color) - { - const f32 maxVal = core::max_(color.getRed(), color.getGreen(), color.getBlue()); - const f32 minVal = (f32)core::min_(color.getRed(), color.getGreen(), color.getBlue()); - Luminance = (maxVal+minVal)*50; - if (core::equals(maxVal, minVal)) - { - Hue=0.f; - Saturation=0.f; - return; - } - - const f32 delta = maxVal-minVal; - if ( Luminance <= 50 ) - { - Saturation = (delta)/(maxVal+minVal); - } - else - { - Saturation = (delta)/(2-maxVal-minVal); - } - Saturation *= 100; - - if (core::equals(maxVal, color.getRed())) - Hue = (color.getGreen()-color.getBlue())/delta; - else if (core::equals(maxVal, color.getGreen())) - Hue = 2+((color.getBlue()-color.getRed())/delta); - else // blue is max - Hue = 4+((color.getRed()-color.getGreen())/delta); - - Hue *= 60.0f; - while ( Hue < 0.f ) - Hue += 360; - } - - - inline void SColorHSL::toRGB(SColorf &color) const - { - const f32 l = Luminance/100; - if (core::iszero(Saturation)) // grey - { - color.set(l, l, l); - return; - } - - f32 rm2; - - if ( Luminance <= 50 ) - { - rm2 = l + l * (Saturation/100); - } - else - { - rm2 = l + (1 - l) * (Saturation/100); - } - - const f32 rm1 = 2.0f * l - rm2; - - const f32 h = Hue / 360.0f; - color.set( toRGB1(rm1, rm2, h + 1.f/3.f), - toRGB1(rm1, rm2, h), - toRGB1(rm1, rm2, h - 1.f/3.f) - ); - } - - - // algorithm from Foley/Van-Dam - inline f32 SColorHSL::toRGB1(f32 rm1, f32 rm2, f32 rh) const - { - if (rh<0) - rh += 1; - if (rh>1) - rh -= 1; - - if (rh < 1.f/6.f) - rm1 = rm1 + (rm2 - rm1) * rh*6.f; - else if (rh < 0.5f) - rm1 = rm2; - else if (rh < 2.f/3.f) - rm1 = rm1 + (rm2 - rm1) * ((2.f/3.f)-rh)*6.f; - - return rm1; - } - -} // end namespace video -} // end namespace irr - -#endif diff --git a/builddir/irrlicht-1.8.1/include/SExposedVideoData.h b/builddir/irrlicht-1.8.1/include/SExposedVideoData.h deleted file mode 100644 index 2415d55..0000000 --- a/builddir/irrlicht-1.8.1/include/SExposedVideoData.h +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __S_EXPOSED_VIDEO_DATA_H_INCLUDED__ -#define __S_EXPOSED_VIDEO_DATA_H_INCLUDED__ - -// forward declarations for internal pointers -struct IDirect3D9; -struct IDirect3DDevice9; -struct IDirect3D8; -struct IDirect3DDevice8; - -namespace irr -{ -namespace video -{ - -//! structure for holding data describing a driver and operating system specific data. -/** This data can be retrived by IVideoDriver::getExposedVideoData(). Use this with caution. -This only should be used to make it possible to extend the engine easily without -modification of its source. Note that this structure does not contain any valid data, if -you are using the software or the null device. -*/ -struct SExposedVideoData -{ - SExposedVideoData() {OpenGLWin32.HDc=0; OpenGLWin32.HRc=0; OpenGLWin32.HWnd=0;} - explicit SExposedVideoData(void* Window) {OpenGLWin32.HDc=0; OpenGLWin32.HRc=0; OpenGLWin32.HWnd=Window;} - - union - { - struct - { - //! Pointer to the IDirect3D9 interface - IDirect3D9* D3D9; - - //! Pointer to the IDirect3DDevice9 interface - IDirect3DDevice9* D3DDev9; - - //! Window handle. - /** Get with for example HWND h = reinterpret_cast<HWND>(exposedData.D3D9.HWnd) */ - void* HWnd; - - } D3D9; - - struct - { - //! Pointer to the IDirect3D8 interface - IDirect3D8* D3D8; - - //! Pointer to the IDirect3DDevice8 interface - IDirect3DDevice8* D3DDev8; - - //! Window handle. - /** Get with for example with: HWND h = reinterpret_cast<HWND>(exposedData.D3D8.HWnd) */ - void* HWnd; - - } D3D8; - - struct - { - //! Private GDI Device Context. - /** Get if for example with: HDC h = reinterpret_cast<HDC>(exposedData.OpenGLWin32.HDc) */ - void* HDc; - - //! Permanent Rendering Context. - /** Get if for example with: HGLRC h = reinterpret_cast<HGLRC>(exposedData.OpenGLWin32.HRc) */ - void* HRc; - - //! Window handle. - /** Get with for example with: HWND h = reinterpret_cast<HWND>(exposedData.OpenGLWin32.HWnd) */ - void* HWnd; - } OpenGLWin32; - - struct - { - // XWindow handles - void* X11Display; - void* X11Context; - unsigned long X11Window; - } OpenGLLinux; - }; -}; - -} // end namespace video -} // end namespace irr - - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/SIrrCreationParameters.h b/builddir/irrlicht-1.8.1/include/SIrrCreationParameters.h deleted file mode 100644 index 0c30b74..0000000 --- a/builddir/irrlicht-1.8.1/include/SIrrCreationParameters.h +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_IRRLICHT_CREATION_PARAMETERS_H_INCLUDED__ -#define __I_IRRLICHT_CREATION_PARAMETERS_H_INCLUDED__ - -#include "EDriverTypes.h" -#include "EDeviceTypes.h" -#include "dimension2d.h" -#include "ILogger.h" - -namespace irr -{ - class IEventReceiver; - - //! Structure for holding Irrlicht Device creation parameters. - /** This structure is used in the createDeviceEx() function. */ - struct SIrrlichtCreationParameters - { - //! Constructs a SIrrlichtCreationParameters structure with default values. - SIrrlichtCreationParameters() : - DeviceType(EIDT_BEST), - DriverType(video::EDT_BURNINGSVIDEO), - WindowSize(core::dimension2d<u32>(800, 600)), - Bits(16), - ZBufferBits(16), - Fullscreen(false), - Stencilbuffer(false), - Vsync(false), - AntiAlias(0), - HandleSRGB(false), - WithAlphaChannel(false), - Doublebuffer(true), - IgnoreInput(false), - Stereobuffer(false), - HighPrecisionFPU(false), - EventReceiver(0), - WindowId(0), -#ifdef _DEBUG - LoggingLevel(ELL_DEBUG), -#else - LoggingLevel(ELL_INFORMATION), -#endif - DisplayAdapter(0), - DriverMultithreaded(false), - UsePerformanceTimer(true), - SDK_version_do_not_use(IRRLICHT_SDK_VERSION) - { - } - - SIrrlichtCreationParameters(const SIrrlichtCreationParameters& other) : - SDK_version_do_not_use(IRRLICHT_SDK_VERSION) - {*this = other;} - - SIrrlichtCreationParameters& operator=(const SIrrlichtCreationParameters& other) - { - DeviceType = other.DeviceType; - DriverType = other.DriverType; - WindowSize = other.WindowSize; - Bits = other.Bits; - ZBufferBits = other.ZBufferBits; - Fullscreen = other.Fullscreen; - Stencilbuffer = other.Stencilbuffer; - Vsync = other.Vsync; - AntiAlias = other.AntiAlias; - HandleSRGB = other.HandleSRGB; - WithAlphaChannel = other.WithAlphaChannel; - Doublebuffer = other.Doublebuffer; - IgnoreInput = other.IgnoreInput; - Stereobuffer = other.Stereobuffer; - HighPrecisionFPU = other.HighPrecisionFPU; - EventReceiver = other.EventReceiver; - WindowId = other.WindowId; - LoggingLevel = other.LoggingLevel; - DriverMultithreaded = other.DriverMultithreaded; - DisplayAdapter = other.DisplayAdapter; - UsePerformanceTimer = other.UsePerformanceTimer; - return *this; - } - - //! Type of the device. - /** This setting decides the windowing system used by the device, most device types are native - to a specific operating system and so may not be available. - EIDT_WIN32 is only available on Windows desktops, - EIDT_WINCE is only available on Windows mobile devices, - EIDT_COCOA is only available on Mac OSX, - EIDT_X11 is available on Linux, Solaris, BSD and other operating systems which use X11, - EIDT_SDL is available on most systems if compiled in, - EIDT_CONSOLE is usually available but can only render to text, - EIDT_BEST will select the best available device for your operating system. - Default: EIDT_BEST. */ - E_DEVICE_TYPE DeviceType; - - //! Type of video driver used to render graphics. - /** This can currently be video::EDT_NULL, video::EDT_SOFTWARE, - video::EDT_BURNINGSVIDEO, video::EDT_DIRECT3D8, - video::EDT_DIRECT3D9, and video::EDT_OPENGL. - Default: Software. */ - video::E_DRIVER_TYPE DriverType; - - //! Size of the window or the video mode in fullscreen mode. Default: 800x600 - core::dimension2d<u32> WindowSize; - - //! Minimum Bits per pixel of the color buffer in fullscreen mode. Ignored if windowed mode. Default: 16. - u8 Bits; - - //! Minimum Bits per pixel of the depth buffer. Default: 16. - u8 ZBufferBits; - - //! Should be set to true if the device should run in fullscreen. - /** Otherwise the device runs in windowed mode. Default: false. */ - bool Fullscreen; - - //! Specifies if the stencil buffer should be enabled. - /** Set this to true, if you want the engine be able to draw - stencil buffer shadows. Note that not all drivers are able to - use the stencil buffer, hence it can be ignored during device - creation. Without the stencil buffer no shadows will be drawn. - Default: false. */ - bool Stencilbuffer; - - //! Specifies vertical syncronisation. - /** If set to true, the driver will wait for the vertical - retrace period, otherwise not. May be silently ignored. - Default: false */ - bool Vsync; - - //! Specifies if the device should use fullscreen anti aliasing - /** Makes sharp/pixelated edges softer, but requires more - performance. Also, 2D elements might look blurred with this - switched on. The resulting rendering quality also depends on - the hardware and driver you are using, your program might look - different on different hardware with this. So if you are - writing a game/application with AntiAlias switched on, it would - be a good idea to make it possible to switch this option off - again by the user. - The value is the maximal antialiasing factor requested for - the device. The cretion method will automatically try smaller - values if no window can be created with the given value. - Value one is usually the same as 0 (disabled), but might be a - special value on some platforms. On D3D devices it maps to - NONMASKABLE. - Default value: 0 - disabled */ - u8 AntiAlias; - - //! Flag to enable proper sRGB and linear color handling - /** In most situations, it is desireable to have the color handling in - non-linear sRGB color space, and only do the intermediate color - calculations in linear RGB space. If this flag is enabled, the device and - driver try to assure that all color input and output are color corrected - and only the internal color representation is linear. This means, that - the color output is properly gamma-adjusted to provide the brighter - colors for monitor display. And that blending and lighting give a more - natural look, due to proper conversion from non-linear colors into linear - color space for blend operations. If this flag is enabled, all texture colors - (which are usually in sRGB space) are correctly displayed. However vertex colors - and other explicitly set values have to be manually encoded in linear color space. - Default value: false. */ - bool HandleSRGB; - - //! Whether the main framebuffer uses an alpha channel. - /** In some situations it might be desireable to get a color - buffer with an alpha channel, e.g. when rendering into a - transparent window or overlay. If this flag is set the device - tries to create a framebuffer with alpha channel. - If this flag is set, only color buffers with alpha channel - are considered. Otherwise, it depends on the actual hardware - if the colorbuffer has an alpha channel or not. - Default value: false */ - bool WithAlphaChannel; - - //! Whether the main framebuffer uses doublebuffering. - /** This should be usually enabled, in order to avoid render - artifacts on the visible framebuffer. However, it might be - useful to use only one buffer on very small devices. If no - doublebuffering is available, the drivers will fall back to - single buffers. Default value: true */ - bool Doublebuffer; - - //! Specifies if the device should ignore input events - /** This is only relevant when using external I/O handlers. - External windows need to take care of this themselves. - Currently only supported by X11. - Default value: false */ - bool IgnoreInput; - - //! Specifies if the device should use stereo buffers - /** Some high-end gfx cards support two framebuffers for direct - support of stereoscopic output devices. If this flag is set the - device tries to create a stereo context. - Currently only supported by OpenGL. - Default value: false */ - bool Stereobuffer; - - //! Specifies if the device should use high precision FPU setting - /** This is only relevant for DirectX Devices, which switch to - low FPU precision by default for performance reasons. However, - this may lead to problems with the other computations of the - application. In this case setting this flag to true should help - - on the expense of performance loss, though. - Default value: false */ - bool HighPrecisionFPU; - - //! A user created event receiver. - IEventReceiver* EventReceiver; - - //! Window Id. - /** If this is set to a value other than 0, the Irrlicht Engine - will be created in an already existing window. For windows, set - this to the HWND of the window you want. The windowSize and - FullScreen options will be ignored when using the WindowId - parameter. Default this is set to 0. - To make Irrlicht run inside the custom window, you still will - have to draw Irrlicht on your own. You can use this loop, as - usual: - \code - while (device->run()) - { - driver->beginScene(true, true, 0); - smgr->drawAll(); - driver->endScene(); - } - \endcode - Instead of this, you can also simply use your own message loop - using GetMessage, DispatchMessage and whatever. Calling - IrrlichtDevice::run() will cause Irrlicht to dispatch messages - internally too. You need not call Device->run() if you want to - do your own message dispatching loop, but Irrlicht will not be - able to fetch user input then and you have to do it on your own - using the window messages, DirectInput, or whatever. Also, - you'll have to increment the Irrlicht timer. - An alternative, own message dispatching loop without - device->run() would look like this: - \code - MSG msg; - while (true) - { - if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - - if (msg.message == WM_QUIT) - break; - } - - // increase virtual timer time - device->getTimer()->tick(); - - // draw engine picture - driver->beginScene(true, true, 0); - smgr->drawAll(); - driver->endScene(); - } - \endcode - However, there is no need to draw the picture this often. Just - do it how you like. */ - void* WindowId; - - //! Specifies the logging level used in the logging interface. - /** The default value is ELL_INFORMATION. You can access the ILogger interface - later on from the IrrlichtDevice with getLogger() and set another level. - But if you need more or less logging information already from device creation, - then you have to change it here. - */ - ELOG_LEVEL LoggingLevel; - - //! Allows to select which graphic card is used for rendering when more than one card is in the system. - /** So far only supported on D3D */ - u32 DisplayAdapter; - - //! Create the driver multithreaded. - /** Default is false. Enabling this can slow down your application. - Note that this does _not_ make Irrlicht threadsafe, but only the underlying driver-API for the graphiccard. - So far only supported on D3D. */ - bool DriverMultithreaded; - - //! Enables use of high performance timers on Windows platform. - /** When performance timers are not used, standard GetTickCount() - is used instead which usually has worse resolution, but also less - problems with speed stepping and other techniques. - */ - bool UsePerformanceTimer; - - //! Don't use or change this parameter. - /** Always set it to IRRLICHT_SDK_VERSION, which is done by default. - This is needed for sdk version checks. */ - const c8* const SDK_version_do_not_use; - }; - - -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/SKeyMap.h b/builddir/irrlicht-1.8.1/include/SKeyMap.h deleted file mode 100644 index 55aa5f9..0000000 --- a/builddir/irrlicht-1.8.1/include/SKeyMap.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __S_KEY_MAP_H_INCLUDED__ -#define __S_KEY_MAP_H_INCLUDED__ - -#include "Keycodes.h" - -namespace irr -{ - - //! enumeration for key actions. Used for example in the FPS Camera. - enum EKEY_ACTION - { - EKA_MOVE_FORWARD = 0, - EKA_MOVE_BACKWARD, - EKA_STRAFE_LEFT, - EKA_STRAFE_RIGHT, - EKA_JUMP_UP, - EKA_CROUCH, - EKA_COUNT, - - //! This value is not used. It only forces this enumeration to compile in 32 bit. - EKA_FORCE_32BIT = 0x7fffffff - }; - - //! Struct storing which key belongs to which action. - struct SKeyMap - { - SKeyMap() {} - SKeyMap(EKEY_ACTION action, EKEY_CODE keyCode) : Action(action), KeyCode(keyCode) {} - - EKEY_ACTION Action; - EKEY_CODE KeyCode; - }; - -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/SLight.h b/builddir/irrlicht-1.8.1/include/SLight.h deleted file mode 100644 index 022c40a..0000000 --- a/builddir/irrlicht-1.8.1/include/SLight.h +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __S_LIGHT_H_INCLUDED__ -#define __S_LIGHT_H_INCLUDED__ - -#include "SColor.h" - -namespace irr -{ -namespace video -{ - -//! Enumeration for different types of lights -enum E_LIGHT_TYPE -{ - //! point light, it has a position in space and radiates light in all directions - ELT_POINT, - //! spot light, it has a position in space, a direction, and a limited cone of influence - ELT_SPOT, - //! directional light, coming from a direction from an infinite distance - ELT_DIRECTIONAL, - - //! Only used for counting the elements of this enum - ELT_COUNT -}; - -//! Names for light types -const c8* const LightTypeNames[] = -{ - "Point", - "Spot", - "Directional", - 0 -}; - -//! structure for holding data describing a dynamic point light. -/** Irrlicht supports point lights, spot lights, and directional lights. -*/ -struct SLight -{ - SLight() : AmbientColor(0.f,0.f,0.f), DiffuseColor(1.f,1.f,1.f), - SpecularColor(1.f,1.f,1.f), Attenuation(1.f,0.f,0.f), - OuterCone(45.f), InnerCone(0.f), Falloff(2.f), - Position(0.f,0.f,0.f), Direction(0.f,0.f,1.f), - Radius(100.f), Type(ELT_POINT), CastShadows(true) - {} - - //! Ambient color emitted by the light - SColorf AmbientColor; - - //! Diffuse color emitted by the light. - /** This is the primary color you want to set. */ - SColorf DiffuseColor; - - //! Specular color emitted by the light. - /** For details how to use specular highlights, see SMaterial::Shininess */ - SColorf SpecularColor; - - //! Attenuation factors (constant, linear, quadratic) - /** Changes the light strength fading over distance. - Can also be altered by setting the radius, Attenuation will change to - (0,1.f/radius,0). Can be overridden after radius was set. */ - core::vector3df Attenuation; - - //! The angle of the spot's outer cone. Ignored for other lights. - f32 OuterCone; - - //! The angle of the spot's inner cone. Ignored for other lights. - f32 InnerCone; - - //! The light strength's decrease between Outer and Inner cone. - f32 Falloff; - - //! Read-ONLY! Position of the light. - /** If Type is ELT_DIRECTIONAL, it is ignored. Changed via light scene node's position. */ - core::vector3df Position; - - //! Read-ONLY! Direction of the light. - /** If Type is ELT_POINT, it is ignored. Changed via light scene node's rotation. */ - core::vector3df Direction; - - //! Read-ONLY! Radius of light. Everything within this radius will be lighted. - f32 Radius; - - //! Read-ONLY! Type of the light. Default: ELT_POINT - E_LIGHT_TYPE Type; - - //! Read-ONLY! Does the light cast shadows? - bool CastShadows:1; -}; - -} // end namespace video -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/SMaterial.h b/builddir/irrlicht-1.8.1/include/SMaterial.h deleted file mode 100644 index a1c3ff4..0000000 --- a/builddir/irrlicht-1.8.1/include/SMaterial.h +++ /dev/null @@ -1,685 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __S_MATERIAL_H_INCLUDED__ -#define __S_MATERIAL_H_INCLUDED__ - -#include "SColor.h" -#include "matrix4.h" -#include "irrArray.h" -#include "irrMath.h" -#include "EMaterialTypes.h" -#include "EMaterialFlags.h" -#include "SMaterialLayer.h" - -namespace irr -{ -namespace video -{ - class ITexture; - - //! Flag for EMT_ONETEXTURE_BLEND, ( BlendFactor ) BlendFunc = source * sourceFactor + dest * destFactor - enum E_BLEND_FACTOR - { - EBF_ZERO = 0, //!< src & dest (0, 0, 0, 0) - EBF_ONE, //!< src & dest (1, 1, 1, 1) - EBF_DST_COLOR, //!< src (destR, destG, destB, destA) - EBF_ONE_MINUS_DST_COLOR, //!< src (1-destR, 1-destG, 1-destB, 1-destA) - EBF_SRC_COLOR, //!< dest (srcR, srcG, srcB, srcA) - EBF_ONE_MINUS_SRC_COLOR, //!< dest (1-srcR, 1-srcG, 1-srcB, 1-srcA) - EBF_SRC_ALPHA, //!< src & dest (srcA, srcA, srcA, srcA) - EBF_ONE_MINUS_SRC_ALPHA, //!< src & dest (1-srcA, 1-srcA, 1-srcA, 1-srcA) - EBF_DST_ALPHA, //!< src & dest (destA, destA, destA, destA) - EBF_ONE_MINUS_DST_ALPHA, //!< src & dest (1-destA, 1-destA, 1-destA, 1-destA) - EBF_SRC_ALPHA_SATURATE //!< src (min(srcA, 1-destA), idem, ...) - }; - - //! Values defining the blend operation used when blend is enabled - enum E_BLEND_OPERATION - { - EBO_NONE = 0, //!< No blending happens - EBO_ADD, //!< Default blending adds the color values - EBO_SUBTRACT, //!< This mode subtracts the color values - EBO_REVSUBTRACT,//!< This modes subtracts destination from source - EBO_MIN, //!< Choose minimum value of each color channel - EBO_MAX, //!< Choose maximum value of each color channel - EBO_MIN_FACTOR, //!< Choose minimum value of each color channel after applying blend factors, not widely supported - EBO_MAX_FACTOR, //!< Choose maximum value of each color channel after applying blend factors, not widely supported - EBO_MIN_ALPHA, //!< Choose minimum value of each color channel based on alpha value, not widely supported - EBO_MAX_ALPHA //!< Choose maximum value of each color channel based on alpha value, not widely supported - }; - - //! MaterialTypeParam: e.g. DirectX: D3DTOP_MODULATE, D3DTOP_MODULATE2X, D3DTOP_MODULATE4X - enum E_MODULATE_FUNC - { - EMFN_MODULATE_1X = 1, - EMFN_MODULATE_2X = 2, - EMFN_MODULATE_4X = 4 - }; - - //! Comparison function, e.g. for depth buffer test - enum E_COMPARISON_FUNC - { - //! Test never succeeds, this equals disable - ECFN_NEVER=0, - //! <= test, default for e.g. depth test - ECFN_LESSEQUAL=1, - //! Exact equality - ECFN_EQUAL=2, - //! exclusive less comparison, i.e. < - ECFN_LESS, - //! Succeeds almost always, except for exact equality - ECFN_NOTEQUAL, - //! >= test - ECFN_GREATEREQUAL, - //! inverse of <= - ECFN_GREATER, - //! test succeeds always - ECFN_ALWAYS - }; - - //! Enum values for enabling/disabling color planes for rendering - enum E_COLOR_PLANE - { - //! No color enabled - ECP_NONE=0, - //! Alpha enabled - ECP_ALPHA=1, - //! Red enabled - ECP_RED=2, - //! Green enabled - ECP_GREEN=4, - //! Blue enabled - ECP_BLUE=8, - //! All colors, no alpha - ECP_RGB=14, - //! All planes enabled - ECP_ALL=15 - }; - - //! Source of the alpha value to take - /** This is currently only supported in EMT_ONETEXTURE_BLEND. You can use an - or'ed combination of values. Alpha values are modulated (multiplicated). */ - enum E_ALPHA_SOURCE - { - //! Use no alpha, somewhat redundant with other settings - EAS_NONE=0, - //! Use vertex color alpha - EAS_VERTEX_COLOR, - //! Use texture alpha channel - EAS_TEXTURE - }; - - //! EMT_ONETEXTURE_BLEND: pack srcFact, dstFact, Modulate and alpha source to MaterialTypeParam - /** alpha source can be an OR'ed combination of E_ALPHA_SOURCE values. */ - inline f32 pack_textureBlendFunc ( const E_BLEND_FACTOR srcFact, const E_BLEND_FACTOR dstFact, const E_MODULATE_FUNC modulate=EMFN_MODULATE_1X, const u32 alphaSource=EAS_TEXTURE ) - { - const u32 tmp = (alphaSource << 12) | (modulate << 8) | (srcFact << 4) | dstFact; - return FR(tmp); - } - - //! EMT_ONETEXTURE_BLEND: unpack srcFact & dstFact and Modulo to MaterialTypeParam - /** The fields don't use the full byte range, so we could pack even more... */ - inline void unpack_textureBlendFunc ( E_BLEND_FACTOR &srcFact, E_BLEND_FACTOR &dstFact, - E_MODULATE_FUNC &modulo, u32& alphaSource, const f32 param ) - { - const u32 state = IR(param); - alphaSource = (state & 0x0000F000) >> 12; - modulo = E_MODULATE_FUNC( ( state & 0x00000F00 ) >> 8 ); - srcFact = E_BLEND_FACTOR ( ( state & 0x000000F0 ) >> 4 ); - dstFact = E_BLEND_FACTOR ( ( state & 0x0000000F ) ); - } - - //! EMT_ONETEXTURE_BLEND: has BlendFactor Alphablending - inline bool textureBlendFunc_hasAlpha ( const E_BLEND_FACTOR factor ) - { - switch ( factor ) - { - case EBF_SRC_ALPHA: - case EBF_ONE_MINUS_SRC_ALPHA: - case EBF_DST_ALPHA: - case EBF_ONE_MINUS_DST_ALPHA: - case EBF_SRC_ALPHA_SATURATE: - return true; - default: - return false; - } - } - - - //! These flags are used to specify the anti-aliasing and smoothing modes - /** Techniques supported are multisampling, geometry smoothing, and alpha - to coverage. - Some drivers don't support a per-material setting of the anti-aliasing - modes. In those cases, FSAA/multisampling is defined by the device mode - chosen upon creation via irr::SIrrCreationParameters. - */ - enum E_ANTI_ALIASING_MODE - { - //! Use to turn off anti-aliasing for this material - EAAM_OFF=0, - //! Default anti-aliasing mode - EAAM_SIMPLE=1, - //! High-quality anti-aliasing, not always supported, automatically enables SIMPLE mode - EAAM_QUALITY=3, - //! Line smoothing - EAAM_LINE_SMOOTH=4, - //! point smoothing, often in software and slow, only with OpenGL - EAAM_POINT_SMOOTH=8, - //! All typical anti-alias and smooth modes - EAAM_FULL_BASIC=15, - //! Enhanced anti-aliasing for transparent materials - /** Usually used with EMT_TRANSPARENT_ALPHA_REF and multisampling. */ - EAAM_ALPHA_TO_COVERAGE=16 - }; - - //! These flags allow to define the interpretation of vertex color when lighting is enabled - /** Without lighting being enabled the vertex color is the only value defining the fragment color. - Once lighting is enabled, the four values for diffuse, ambient, emissive, and specular take over. - With these flags it is possible to define which lighting factor shall be defined by the vertex color - instead of the lighting factor which is the same for all faces of that material. - The default is to use vertex color for the diffuse value, another pretty common value is to use - vertex color for both diffuse and ambient factor. */ - enum E_COLOR_MATERIAL - { - //! Don't use vertex color for lighting - ECM_NONE=0, - //! Use vertex color for diffuse light, this is default - ECM_DIFFUSE, - //! Use vertex color for ambient light - ECM_AMBIENT, - //! Use vertex color for emissive light - ECM_EMISSIVE, - //! Use vertex color for specular light - ECM_SPECULAR, - //! Use vertex color for both diffuse and ambient light - ECM_DIFFUSE_AND_AMBIENT - }; - - //! Flags for the definition of the polygon offset feature - /** These flags define whether the offset should be into the screen, or towards the eye. */ - enum E_POLYGON_OFFSET - { - //! Push pixel towards the far plane, away from the eye - /** This is typically used for rendering inner areas. */ - EPO_BACK=0, - //! Pull pixels towards the camera. - /** This is typically used for polygons which should appear on top - of other elements, such as decals. */ - EPO_FRONT=1 - }; - - //! Names for polygon offset direction - const c8* const PolygonOffsetDirectionNames[] = - { - "Back", - "Front", - 0 - }; - - - //! Maximum number of texture an SMaterial can have. - const u32 MATERIAL_MAX_TEXTURES = _IRR_MATERIAL_MAX_TEXTURES_; - - //! Struct for holding parameters for a material renderer - class SMaterial - { - public: - //! Default constructor. Creates a solid, lit material with white colors - SMaterial() - : MaterialType(EMT_SOLID), AmbientColor(255,255,255,255), DiffuseColor(255,255,255,255), - EmissiveColor(0,0,0,0), SpecularColor(255,255,255,255), - Shininess(0.0f), MaterialTypeParam(0.0f), MaterialTypeParam2(0.0f), Thickness(1.0f), - ZBuffer(ECFN_LESSEQUAL), AntiAliasing(EAAM_SIMPLE), ColorMask(ECP_ALL), - ColorMaterial(ECM_DIFFUSE), BlendOperation(EBO_NONE), - PolygonOffsetFactor(0), PolygonOffsetDirection(EPO_FRONT), - Wireframe(false), PointCloud(false), GouraudShading(true), - Lighting(true), ZWriteEnable(true), BackfaceCulling(true), FrontfaceCulling(false), - FogEnable(false), NormalizeNormals(false), UseMipMaps(true) - { } - - //! Copy constructor - /** \param other Material to copy from. */ - SMaterial(const SMaterial& other) - { - // These pointers are checked during assignment - for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i) - TextureLayer[i].TextureMatrix = 0; - *this = other; - } - - //! Assignment operator - /** \param other Material to copy from. */ - SMaterial& operator=(const SMaterial& other) - { - // Check for self-assignment! - if (this == &other) - return *this; - - MaterialType = other.MaterialType; - - AmbientColor = other.AmbientColor; - DiffuseColor = other.DiffuseColor; - EmissiveColor = other.EmissiveColor; - SpecularColor = other.SpecularColor; - Shininess = other.Shininess; - MaterialTypeParam = other.MaterialTypeParam; - MaterialTypeParam2 = other.MaterialTypeParam2; - Thickness = other.Thickness; - for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i) - { - TextureLayer[i] = other.TextureLayer[i]; - } - - Wireframe = other.Wireframe; - PointCloud = other.PointCloud; - GouraudShading = other.GouraudShading; - Lighting = other.Lighting; - ZWriteEnable = other.ZWriteEnable; - BackfaceCulling = other.BackfaceCulling; - FrontfaceCulling = other.FrontfaceCulling; - FogEnable = other.FogEnable; - NormalizeNormals = other.NormalizeNormals; - ZBuffer = other.ZBuffer; - AntiAliasing = other.AntiAliasing; - ColorMask = other.ColorMask; - ColorMaterial = other.ColorMaterial; - BlendOperation = other.BlendOperation; - PolygonOffsetFactor = other.PolygonOffsetFactor; - PolygonOffsetDirection = other.PolygonOffsetDirection; - UseMipMaps = other.UseMipMaps; - - return *this; - } - - //! Texture layer array. - SMaterialLayer TextureLayer[MATERIAL_MAX_TEXTURES]; - - //! Type of the material. Specifies how everything is blended together - E_MATERIAL_TYPE MaterialType; - - //! How much ambient light (a global light) is reflected by this material. - /** The default is full white, meaning objects are completely - globally illuminated. Reduce this if you want to see diffuse - or specular light effects. */ - SColor AmbientColor; - - //! How much diffuse light coming from a light source is reflected by this material. - /** The default is full white. */ - SColor DiffuseColor; - - //! Light emitted by this material. Default is to emit no light. - SColor EmissiveColor; - - //! How much specular light (highlights from a light) is reflected. - /** The default is to reflect white specular light. See - SMaterial::Shininess on how to enable specular lights. */ - SColor SpecularColor; - - //! Value affecting the size of specular highlights. - /** A value of 20 is common. If set to 0, no specular - highlights are being used. To activate, simply set the - shininess of a material to a value in the range [0.5;128]: - \code - sceneNode->getMaterial(0).Shininess = 20.0f; - \endcode - - You can change the color of the highlights using - \code - sceneNode->getMaterial(0).SpecularColor.set(255,255,255,255); - \endcode - - The specular color of the dynamic lights - (SLight::SpecularColor) will influence the the highlight color - too, but they are set to a useful value by default when - creating the light scene node. Here is a simple example on how - to use specular highlights: - \code - // load and display mesh - scene::IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( - smgr->getMesh("data/faerie.md2")); - node->setMaterialTexture(0, driver->getTexture("data/Faerie2.pcx")); // set diffuse texture - node->setMaterialFlag(video::EMF_LIGHTING, true); // enable dynamic lighting - node->getMaterial(0).Shininess = 20.0f; // set size of specular highlights - - // add white light - scene::ILightSceneNode* light = smgr->addLightSceneNode(0, - core::vector3df(5,5,5), video::SColorf(1.0f, 1.0f, 1.0f)); - \endcode */ - f32 Shininess; - - //! Free parameter, dependent on the material type. - /** Mostly ignored, used for example in EMT_PARALLAX_MAP_SOLID - and EMT_TRANSPARENT_ALPHA_CHANNEL. */ - f32 MaterialTypeParam; - - //! Second free parameter, dependent on the material type. - /** Mostly ignored. */ - f32 MaterialTypeParam2; - - //! Thickness of non-3dimensional elements such as lines and points. - f32 Thickness; - - //! Is the ZBuffer enabled? Default: ECFN_LESSEQUAL - /** Values are from E_COMPARISON_FUNC. */ - u8 ZBuffer; - - //! Sets the antialiasing mode - /** Values are chosen from E_ANTI_ALIASING_MODE. Default is - EAAM_SIMPLE|EAAM_LINE_SMOOTH, i.e. simple multi-sample - anti-aliasing and lime smoothing is enabled. */ - u8 AntiAliasing; - - //! Defines the enabled color planes - /** Values are defined as or'ed values of the E_COLOR_PLANE enum. - Only enabled color planes will be rendered to the current render - target. Typical use is to disable all colors when rendering only to - depth or stencil buffer, or using Red and Green for Stereo rendering. */ - u8 ColorMask:4; - - //! Defines the interpretation of vertex color in the lighting equation - /** Values should be chosen from E_COLOR_MATERIAL. - When lighting is enabled, vertex color can be used instead of the - material values for light modulation. This allows to easily change e.g. the - diffuse light behavior of each face. The default, ECM_DIFFUSE, will result in - a very similar rendering as with lighting turned off, just with light shading. */ - u8 ColorMaterial:3; - - //! Store the blend operation of choice - /** Values to be chosen from E_BLEND_OPERATION. The actual way to use this value - is not yet determined, so ignore it for now. */ - E_BLEND_OPERATION BlendOperation:4; - - //! Factor specifying how far the polygon offset should be made - /** Specifying 0 disables the polygon offset. The direction is specified spearately. - The factor can be from 0 to 7.*/ - u8 PolygonOffsetFactor:3; - - //! Flag defining the direction the polygon offset is applied to. - /** Can be to front or to back, specififed by values from E_POLYGON_OFFSET. */ - E_POLYGON_OFFSET PolygonOffsetDirection:1; - - //! Draw as wireframe or filled triangles? Default: false - /** The user can access a material flag using - \code material.Wireframe=true \endcode - or \code material.setFlag(EMF_WIREFRAME, true); \endcode */ - bool Wireframe:1; - - //! Draw as point cloud or filled triangles? Default: false - bool PointCloud:1; - - //! Flat or Gouraud shading? Default: true - bool GouraudShading:1; - - //! Will this material be lighted? Default: true - bool Lighting:1; - - //! Is the zbuffer writeable or is it read-only. Default: true. - /** This flag is forced to false if the MaterialType is a - transparent type and the scene parameter - ALLOW_ZWRITE_ON_TRANSPARENT is not set. */ - bool ZWriteEnable:1; - - //! Is backface culling enabled? Default: true - bool BackfaceCulling:1; - - //! Is frontface culling enabled? Default: false - bool FrontfaceCulling:1; - - //! Is fog enabled? Default: false - bool FogEnable:1; - - //! Should normals be normalized? - /** Always use this if the mesh lit and scaled. Default: false */ - bool NormalizeNormals:1; - - //! Shall mipmaps be used if available - /** Sometimes, disabling mipmap usage can be useful. Default: true */ - bool UseMipMaps:1; - - //! Gets the texture transformation matrix for level i - /** \param i The desired level. Must not be larger than MATERIAL_MAX_TEXTURES. - \return Texture matrix for texture level i. */ - core::matrix4& getTextureMatrix(u32 i) - { - return TextureLayer[i].getTextureMatrix(); - } - - //! Gets the immutable texture transformation matrix for level i - /** \param i The desired level. - \return Texture matrix for texture level i, or identity matrix for levels larger than MATERIAL_MAX_TEXTURES. */ - const core::matrix4& getTextureMatrix(u32 i) const - { - if (i<MATERIAL_MAX_TEXTURES) - return TextureLayer[i].getTextureMatrix(); - else - return core::IdentityMatrix; - } - - //! Sets the i-th texture transformation matrix - /** \param i The desired level. - \param mat Texture matrix for texture level i. */ - void setTextureMatrix(u32 i, const core::matrix4& mat) - { - if (i>=MATERIAL_MAX_TEXTURES) - return; - TextureLayer[i].setTextureMatrix(mat); - } - - //! Gets the i-th texture - /** \param i The desired level. - \return Texture for texture level i, if defined, else 0. */ - ITexture* getTexture(u32 i) const - { - return i < MATERIAL_MAX_TEXTURES ? TextureLayer[i].Texture : 0; - } - - //! Sets the i-th texture - /** If i>=MATERIAL_MAX_TEXTURES this setting will be ignored. - \param i The desired level. - \param tex Texture for texture level i. */ - void setTexture(u32 i, ITexture* tex) - { - if (i>=MATERIAL_MAX_TEXTURES) - return; - TextureLayer[i].Texture = tex; - } - - //! Sets the Material flag to the given value - /** \param flag The flag to be set. - \param value The new value for the flag. */ - void setFlag(E_MATERIAL_FLAG flag, bool value) - { - switch (flag) - { - case EMF_WIREFRAME: - Wireframe = value; break; - case EMF_POINTCLOUD: - PointCloud = value; break; - case EMF_GOURAUD_SHADING: - GouraudShading = value; break; - case EMF_LIGHTING: - Lighting = value; break; - case EMF_ZBUFFER: - ZBuffer = value; break; - case EMF_ZWRITE_ENABLE: - ZWriteEnable = value; break; - case EMF_BACK_FACE_CULLING: - BackfaceCulling = value; break; - case EMF_FRONT_FACE_CULLING: - FrontfaceCulling = value; break; - case EMF_BILINEAR_FILTER: - { - for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i) - TextureLayer[i].BilinearFilter = value; - } - break; - case EMF_TRILINEAR_FILTER: - { - for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i) - TextureLayer[i].TrilinearFilter = value; - } - break; - case EMF_ANISOTROPIC_FILTER: - { - if (value) - for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i) - TextureLayer[i].AnisotropicFilter = 0xFF; - else - for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i) - TextureLayer[i].AnisotropicFilter = 0; - } - break; - case EMF_FOG_ENABLE: - FogEnable = value; break; - case EMF_NORMALIZE_NORMALS: - NormalizeNormals = value; break; - case EMF_TEXTURE_WRAP: - { - for (u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i) - { - TextureLayer[i].TextureWrapU = (E_TEXTURE_CLAMP)value; - TextureLayer[i].TextureWrapV = (E_TEXTURE_CLAMP)value; - } - } - break; - case EMF_ANTI_ALIASING: - AntiAliasing = value?EAAM_SIMPLE:EAAM_OFF; break; - case EMF_COLOR_MASK: - ColorMask = value?ECP_ALL:ECP_NONE; break; - case EMF_COLOR_MATERIAL: - ColorMaterial = value?ECM_DIFFUSE:ECM_NONE; break; - case EMF_USE_MIP_MAPS: - UseMipMaps = value; break; - case EMF_BLEND_OPERATION: - BlendOperation = value?EBO_ADD:EBO_NONE; break; - case EMF_POLYGON_OFFSET: - PolygonOffsetFactor = value?1:0; - PolygonOffsetDirection = EPO_BACK; - break; - default: - break; - } - } - - //! Gets the Material flag - /** \param flag The flag to query. - \return The current value of the flag. */ - bool getFlag(E_MATERIAL_FLAG flag) const - { - switch (flag) - { - case EMF_WIREFRAME: - return Wireframe; - case EMF_POINTCLOUD: - return PointCloud; - case EMF_GOURAUD_SHADING: - return GouraudShading; - case EMF_LIGHTING: - return Lighting; - case EMF_ZBUFFER: - return ZBuffer!=ECFN_NEVER; - case EMF_ZWRITE_ENABLE: - return ZWriteEnable; - case EMF_BACK_FACE_CULLING: - return BackfaceCulling; - case EMF_FRONT_FACE_CULLING: - return FrontfaceCulling; - case EMF_BILINEAR_FILTER: - return TextureLayer[0].BilinearFilter; - case EMF_TRILINEAR_FILTER: - return TextureLayer[0].TrilinearFilter; - case EMF_ANISOTROPIC_FILTER: - return TextureLayer[0].AnisotropicFilter!=0; - case EMF_FOG_ENABLE: - return FogEnable; - case EMF_NORMALIZE_NORMALS: - return NormalizeNormals; - case EMF_TEXTURE_WRAP: - return !(TextureLayer[0].TextureWrapU || - TextureLayer[0].TextureWrapV || - TextureLayer[1].TextureWrapU || - TextureLayer[1].TextureWrapV || - TextureLayer[2].TextureWrapU || - TextureLayer[2].TextureWrapV || - TextureLayer[3].TextureWrapU || - TextureLayer[3].TextureWrapV); - case EMF_ANTI_ALIASING: - return (AntiAliasing==1); - case EMF_COLOR_MASK: - return (ColorMask!=ECP_NONE); - case EMF_COLOR_MATERIAL: - return (ColorMaterial != ECM_NONE); - case EMF_USE_MIP_MAPS: - return UseMipMaps; - case EMF_BLEND_OPERATION: - return BlendOperation != EBO_NONE; - case EMF_POLYGON_OFFSET: - return PolygonOffsetFactor != 0; - } - - return false; - } - - //! Inequality operator - /** \param b Material to compare to. - \return True if the materials differ, else false. */ - inline bool operator!=(const SMaterial& b) const - { - bool different = - MaterialType != b.MaterialType || - AmbientColor != b.AmbientColor || - DiffuseColor != b.DiffuseColor || - EmissiveColor != b.EmissiveColor || - SpecularColor != b.SpecularColor || - Shininess != b.Shininess || - MaterialTypeParam != b.MaterialTypeParam || - MaterialTypeParam2 != b.MaterialTypeParam2 || - Thickness != b.Thickness || - Wireframe != b.Wireframe || - PointCloud != b.PointCloud || - GouraudShading != b.GouraudShading || - Lighting != b.Lighting || - ZBuffer != b.ZBuffer || - ZWriteEnable != b.ZWriteEnable || - BackfaceCulling != b.BackfaceCulling || - FrontfaceCulling != b.FrontfaceCulling || - FogEnable != b.FogEnable || - NormalizeNormals != b.NormalizeNormals || - AntiAliasing != b.AntiAliasing || - ColorMask != b.ColorMask || - ColorMaterial != b.ColorMaterial || - BlendOperation != b.BlendOperation || - PolygonOffsetFactor != b.PolygonOffsetFactor || - PolygonOffsetDirection != b.PolygonOffsetDirection || - UseMipMaps != b.UseMipMaps; - for (u32 i=0; (i<MATERIAL_MAX_TEXTURES) && !different; ++i) - { - different |= (TextureLayer[i] != b.TextureLayer[i]); - } - return different; - } - - //! Equality operator - /** \param b Material to compare to. - \return True if the materials are equal, else false. */ - inline bool operator==(const SMaterial& b) const - { return !(b!=*this); } - - bool isTransparent() const - { - return MaterialType==EMT_TRANSPARENT_ADD_COLOR || - MaterialType==EMT_TRANSPARENT_ALPHA_CHANNEL || - MaterialType==EMT_TRANSPARENT_VERTEX_ALPHA || - MaterialType==EMT_TRANSPARENT_REFLECTION_2_LAYER; - } - }; - - //! global const identity Material - IRRLICHT_API extern SMaterial IdentityMaterial; - -} // end namespace video -} // end namespace irr - -#endif diff --git a/builddir/irrlicht-1.8.1/include/SMaterialLayer.h b/builddir/irrlicht-1.8.1/include/SMaterialLayer.h deleted file mode 100644 index 30e8cd9..0000000 --- a/builddir/irrlicht-1.8.1/include/SMaterialLayer.h +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __S_MATERIAL_LAYER_H_INCLUDED__ -#define __S_MATERIAL_LAYER_H_INCLUDED__ - -#include "matrix4.h" -#include "irrAllocator.h" - -namespace irr -{ -namespace video -{ - class ITexture; - - //! Texture coord clamp mode outside [0.0, 1.0] - enum E_TEXTURE_CLAMP - { - //! Texture repeats - ETC_REPEAT = 0, - //! Texture is clamped to the last pixel - ETC_CLAMP, - //! Texture is clamped to the edge pixel - ETC_CLAMP_TO_EDGE, - //! Texture is clamped to the border pixel (if exists) - ETC_CLAMP_TO_BORDER, - //! Texture is alternatingly mirrored (0..1..0..1..0..) - ETC_MIRROR, - //! Texture is mirrored once and then clamped (0..1..0) - ETC_MIRROR_CLAMP, - //! Texture is mirrored once and then clamped to edge - ETC_MIRROR_CLAMP_TO_EDGE, - //! Texture is mirrored once and then clamped to border - ETC_MIRROR_CLAMP_TO_BORDER - }; - static const char* const aTextureClampNames[] = { - "texture_clamp_repeat", - "texture_clamp_clamp", - "texture_clamp_clamp_to_edge", - "texture_clamp_clamp_to_border", - "texture_clamp_mirror", - "texture_clamp_mirror_clamp", - "texture_clamp_mirror_clamp_to_edge", - "texture_clamp_mirror_clamp_to_border", 0}; - - //! Struct for holding material parameters which exist per texture layer - class SMaterialLayer - { - public: - //! Default constructor - SMaterialLayer() - : Texture(0), - TextureWrapU(ETC_REPEAT), - TextureWrapV(ETC_REPEAT), - BilinearFilter(true), - TrilinearFilter(false), - AnisotropicFilter(0), - LODBias(0), - TextureMatrix(0) - {} - - //! Copy constructor - /** \param other Material layer to copy from. */ - SMaterialLayer(const SMaterialLayer& other) - { - // This pointer is checked during assignment - TextureMatrix = 0; - *this = other; - } - - //! Destructor - ~SMaterialLayer() - { - MatrixAllocator.destruct(TextureMatrix); - MatrixAllocator.deallocate(TextureMatrix); - } - - //! Assignment operator - /** \param other Material layer to copy from. - \return This material layer, updated. */ - SMaterialLayer& operator=(const SMaterialLayer& other) - { - // Check for self-assignment! - if (this == &other) - return *this; - - Texture = other.Texture; - if (TextureMatrix) - { - if (other.TextureMatrix) - *TextureMatrix = *other.TextureMatrix; - else - { - MatrixAllocator.destruct(TextureMatrix); - MatrixAllocator.deallocate(TextureMatrix); - TextureMatrix = 0; - } - } - else - { - if (other.TextureMatrix) - { - TextureMatrix = MatrixAllocator.allocate(1); - MatrixAllocator.construct(TextureMatrix,*other.TextureMatrix); - } - else - TextureMatrix = 0; - } - TextureWrapU = other.TextureWrapU; - TextureWrapV = other.TextureWrapV; - BilinearFilter = other.BilinearFilter; - TrilinearFilter = other.TrilinearFilter; - AnisotropicFilter = other.AnisotropicFilter; - LODBias = other.LODBias; - - return *this; - } - - //! Gets the texture transformation matrix - /** \return Texture matrix of this layer. */ - core::matrix4& getTextureMatrix() - { - if (!TextureMatrix) - { - TextureMatrix = MatrixAllocator.allocate(1); - MatrixAllocator.construct(TextureMatrix,core::IdentityMatrix); - } - return *TextureMatrix; - } - - //! Gets the immutable texture transformation matrix - /** \return Texture matrix of this layer. */ - const core::matrix4& getTextureMatrix() const - { - if (TextureMatrix) - return *TextureMatrix; - else - return core::IdentityMatrix; - } - - //! Sets the texture transformation matrix to mat - /** \param mat New texture matrix for this layer. */ - void setTextureMatrix(const core::matrix4& mat) - { - if (!TextureMatrix) - { - TextureMatrix = MatrixAllocator.allocate(1); - MatrixAllocator.construct(TextureMatrix,mat); - } - else - *TextureMatrix = mat; - } - - //! Inequality operator - /** \param b Layer to compare to. - \return True if layers are different, else false. */ - inline bool operator!=(const SMaterialLayer& b) const - { - bool different = - Texture != b.Texture || - TextureWrapU != b.TextureWrapU || - TextureWrapV != b.TextureWrapV || - BilinearFilter != b.BilinearFilter || - TrilinearFilter != b.TrilinearFilter || - AnisotropicFilter != b.AnisotropicFilter || - LODBias != b.LODBias; - if (different) - return true; - else - different |= (TextureMatrix != b.TextureMatrix) && - TextureMatrix && b.TextureMatrix && - (*TextureMatrix != *(b.TextureMatrix)); - return different; - } - - //! Equality operator - /** \param b Layer to compare to. - \return True if layers are equal, else false. */ - inline bool operator==(const SMaterialLayer& b) const - { return !(b!=*this); } - - //! Texture - ITexture* Texture; - - //! Texture Clamp Mode - /** Values are taken from E_TEXTURE_CLAMP. */ - u8 TextureWrapU:4; - u8 TextureWrapV:4; - - //! Is bilinear filtering enabled? Default: true - bool BilinearFilter:1; - - //! Is trilinear filtering enabled? Default: false - /** If the trilinear filter flag is enabled, - the bilinear filtering flag is ignored. */ - bool TrilinearFilter:1; - - //! Is anisotropic filtering enabled? Default: 0, disabled - /** In Irrlicht you can use anisotropic texture filtering - in conjunction with bilinear or trilinear texture - filtering to improve rendering results. Primitives - will look less blurry with this flag switched on. The number gives - the maximal anisotropy degree, and is often in the range 2-16. - Value 1 is equivalent to 0, but should be avoided. */ - u8 AnisotropicFilter; - - //! Bias for the mipmap choosing decision. - /** This value can make the textures more or less blurry than with the - default value of 0. The value (divided by 8.f) is added to the mipmap level - chosen initially, and thus takes a smaller mipmap for a region - if the value is positive. */ - s8 LODBias; - - private: - friend class SMaterial; - irr::core::irrAllocator<irr::core::matrix4> MatrixAllocator; - - //! Texture Matrix - /** Do not access this element directly as the internal - ressource management has to cope with Null pointers etc. */ - core::matrix4* TextureMatrix; - }; - -} // end namespace video -} // end namespace irr - -#endif // __S_MATERIAL_LAYER_H_INCLUDED__ diff --git a/builddir/irrlicht-1.8.1/include/SMesh.h b/builddir/irrlicht-1.8.1/include/SMesh.h deleted file mode 100644 index efac56e..0000000 --- a/builddir/irrlicht-1.8.1/include/SMesh.h +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __S_MESH_H_INCLUDED__ -#define __S_MESH_H_INCLUDED__ - -#include "IMesh.h" -#include "IMeshBuffer.h" -#include "aabbox3d.h" -#include "irrArray.h" - -namespace irr -{ -namespace scene -{ - //! Simple implementation of the IMesh interface. - struct SMesh : public IMesh - { - //! constructor - SMesh() - { - #ifdef _DEBUG - setDebugName("SMesh"); - #endif - } - - //! destructor - virtual ~SMesh() - { - // drop buffers - for (u32 i=0; i<MeshBuffers.size(); ++i) - MeshBuffers[i]->drop(); - } - - //! clean mesh - virtual void clear() - { - for (u32 i=0; i<MeshBuffers.size(); ++i) - MeshBuffers[i]->drop(); - MeshBuffers.clear(); - BoundingBox.reset ( 0.f, 0.f, 0.f ); - } - - - //! returns amount of mesh buffers. - virtual u32 getMeshBufferCount() const - { - return MeshBuffers.size(); - } - - //! returns pointer to a mesh buffer - virtual IMeshBuffer* getMeshBuffer(u32 nr) const - { - return MeshBuffers[nr]; - } - - //! returns a meshbuffer which fits a material - /** reverse search */ - virtual IMeshBuffer* getMeshBuffer( const video::SMaterial & material) const - { - for (s32 i = (s32)MeshBuffers.size()-1; i >= 0; --i) - { - if ( material == MeshBuffers[i]->getMaterial()) - return MeshBuffers[i]; - } - - return 0; - } - - //! returns an axis aligned bounding box - virtual const core::aabbox3d<f32>& getBoundingBox() const - { - return BoundingBox; - } - - //! set user axis aligned bounding box - virtual void setBoundingBox( const core::aabbox3df& box) - { - BoundingBox = box; - } - - //! recalculates the bounding box - void recalculateBoundingBox() - { - if (MeshBuffers.size()) - { - BoundingBox = MeshBuffers[0]->getBoundingBox(); - for (u32 i=1; i<MeshBuffers.size(); ++i) - BoundingBox.addInternalBox(MeshBuffers[i]->getBoundingBox()); - } - else - BoundingBox.reset(0.0f, 0.0f, 0.0f); - } - - //! adds a MeshBuffer - /** The bounding box is not updated automatically. */ - void addMeshBuffer(IMeshBuffer* buf) - { - if (buf) - { - buf->grab(); - MeshBuffers.push_back(buf); - } - } - - //! sets a flag of all contained materials to a new value - virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) - { - for (u32 i=0; i<MeshBuffers.size(); ++i) - MeshBuffers[i]->getMaterial().setFlag(flag, newvalue); - } - - //! set the hardware mapping hint, for driver - virtual void setHardwareMappingHint( E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX ) - { - for (u32 i=0; i<MeshBuffers.size(); ++i) - MeshBuffers[i]->setHardwareMappingHint(newMappingHint, buffer); - } - - //! flags the meshbuffer as changed, reloads hardware buffers - virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) - { - for (u32 i=0; i<MeshBuffers.size(); ++i) - MeshBuffers[i]->setDirty(buffer); - } - - //! The meshbuffers of this mesh - core::array<IMeshBuffer*> MeshBuffers; - - //! The bounding box of this mesh - core::aabbox3d<f32> BoundingBox; - }; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/SMeshBuffer.h b/builddir/irrlicht-1.8.1/include/SMeshBuffer.h deleted file mode 100644 index 2c3b7e2..0000000 --- a/builddir/irrlicht-1.8.1/include/SMeshBuffer.h +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -// replaced by template -#include "CMeshBuffer.h" - diff --git a/builddir/irrlicht-1.8.1/include/SMeshBufferLightMap.h b/builddir/irrlicht-1.8.1/include/SMeshBufferLightMap.h deleted file mode 100644 index 2c3b7e2..0000000 --- a/builddir/irrlicht-1.8.1/include/SMeshBufferLightMap.h +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -// replaced by template -#include "CMeshBuffer.h" - diff --git a/builddir/irrlicht-1.8.1/include/SMeshBufferTangents.h b/builddir/irrlicht-1.8.1/include/SMeshBufferTangents.h deleted file mode 100644 index 2c3b7e2..0000000 --- a/builddir/irrlicht-1.8.1/include/SMeshBufferTangents.h +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -// replaced by template -#include "CMeshBuffer.h" - diff --git a/builddir/irrlicht-1.8.1/include/SParticle.h b/builddir/irrlicht-1.8.1/include/SParticle.h deleted file mode 100644 index c69c483..0000000 --- a/builddir/irrlicht-1.8.1/include/SParticle.h +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __S_PARTICLE_H_INCLUDED__ -#define __S_PARTICLE_H_INCLUDED__ - -#include "vector3d.h" -#include "dimension2d.h" -#include "SColor.h" - -namespace irr -{ -namespace scene -{ - //! Struct for holding particle data - struct SParticle - { - //! Position of the particle - core::vector3df pos; - - //! Direction and speed of the particle - core::vector3df vector; - - //! Start life time of the particle - u32 startTime; - - //! End life time of the particle - u32 endTime; - - //! Current color of the particle - video::SColor color; - - //! Original color of the particle. - /** That's the color of the particle it had when it was emitted. */ - video::SColor startColor; - - //! Original direction and speed of the particle. - /** The direction and speed the particle had when it was emitted. */ - core::vector3df startVector; - - //! Scale of the particle. - /** The current scale of the particle. */ - core::dimension2df size; - - //! Original scale of the particle. - /** The scale of the particle when it was emitted. */ - core::dimension2df startSize; - }; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/SSharedMeshBuffer.h b/builddir/irrlicht-1.8.1/include/SSharedMeshBuffer.h deleted file mode 100644 index 016b796..0000000 --- a/builddir/irrlicht-1.8.1/include/SSharedMeshBuffer.h +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __S_SHARED_MESH_BUFFER_H_INCLUDED__ -#define __S_SHARED_MESH_BUFFER_H_INCLUDED__ - -#include "irrArray.h" -#include "IMeshBuffer.h" - -namespace irr -{ -namespace scene -{ - //! Implementation of the IMeshBuffer interface with shared vertex list - struct SSharedMeshBuffer : public IMeshBuffer - { - //! constructor - SSharedMeshBuffer() : IMeshBuffer(), Vertices(0), ChangedID_Vertex(1), ChangedID_Index(1), MappingHintVertex(EHM_NEVER), MappingHintIndex(EHM_NEVER) - { - #ifdef _DEBUG - setDebugName("SSharedMeshBuffer"); - #endif - } - - //! constructor - SSharedMeshBuffer(core::array<video::S3DVertex> *vertices) : IMeshBuffer(), Vertices(vertices) - { - #ifdef _DEBUG - setDebugName("SSharedMeshBuffer"); - #endif - } - - //! returns the material of this meshbuffer - virtual const video::SMaterial& getMaterial() const - { - return Material; - } - - //! returns the material of this meshbuffer - virtual video::SMaterial& getMaterial() - { - return Material; - } - - //! returns pointer to vertices - virtual const void* getVertices() const - { - if (Vertices) - return Vertices->const_pointer(); - else - return 0; - } - - //! returns pointer to vertices - virtual void* getVertices() - { - if (Vertices) - return Vertices->pointer(); - else - return 0; - } - - //! returns amount of vertices - virtual u32 getVertexCount() const - { - if (Vertices) - return Vertices->size(); - else - return 0; - } - - //! returns pointer to Indices - virtual const u16* getIndices() const - { - return Indices.const_pointer(); - } - - //! returns pointer to Indices - virtual u16* getIndices() - { - return Indices.pointer(); - } - - //! returns amount of indices - virtual u32 getIndexCount() const - { - return Indices.size(); - } - - //! Get type of index data which is stored in this meshbuffer. - virtual video::E_INDEX_TYPE getIndexType() const - { - return video::EIT_16BIT; - } - - //! returns an axis aligned bounding box - virtual const core::aabbox3d<f32>& getBoundingBox() const - { - return BoundingBox; - } - - //! set user axis aligned bounding box - virtual void setBoundingBox( const core::aabbox3df& box) - { - BoundingBox = box; - } - - //! returns which type of vertex data is stored. - virtual video::E_VERTEX_TYPE getVertexType() const - { - return video::EVT_STANDARD; - } - - //! recalculates the bounding box. should be called if the mesh changed. - virtual void recalculateBoundingBox() - { - if (!Vertices || Vertices->empty() || Indices.empty()) - BoundingBox.reset(0,0,0); - else - { - BoundingBox.reset((*Vertices)[Indices[0]].Pos); - for (u32 i=1; i<Indices.size(); ++i) - BoundingBox.addInternalPoint((*Vertices)[Indices[i]].Pos); - } - } - - //! returns position of vertex i - virtual const core::vector3df& getPosition(u32 i) const - { - _IRR_DEBUG_BREAK_IF(!Vertices); - return (*Vertices)[Indices[i]].Pos; - } - - //! returns position of vertex i - virtual core::vector3df& getPosition(u32 i) - { - _IRR_DEBUG_BREAK_IF(!Vertices); - return (*Vertices)[Indices[i]].Pos; - } - - //! returns normal of vertex i - virtual const core::vector3df& getNormal(u32 i) const - { - _IRR_DEBUG_BREAK_IF(!Vertices); - return (*Vertices)[Indices[i]].Normal; - } - - //! returns normal of vertex i - virtual core::vector3df& getNormal(u32 i) - { - _IRR_DEBUG_BREAK_IF(!Vertices); - return (*Vertices)[Indices[i]].Normal; - } - - //! returns texture coord of vertex i - virtual const core::vector2df& getTCoords(u32 i) const - { - _IRR_DEBUG_BREAK_IF(!Vertices); - return (*Vertices)[Indices[i]].TCoords; - } - - //! returns texture coord of vertex i - virtual core::vector2df& getTCoords(u32 i) - { - _IRR_DEBUG_BREAK_IF(!Vertices); - return (*Vertices)[Indices[i]].TCoords; - } - - //! append the vertices and indices to the current buffer - virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) {} - - //! append the meshbuffer to the current buffer - virtual void append(const IMeshBuffer* const other) {} - - //! get the current hardware mapping hint - virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const - { - return MappingHintVertex; - } - - //! get the current hardware mapping hint - virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const - { - return MappingHintIndex; - } - - //! set the hardware mapping hint, for driver - virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX ) - { - if (buffer==EBT_VERTEX_AND_INDEX || buffer==EBT_VERTEX) - MappingHintVertex=NewMappingHint; - if (buffer==EBT_VERTEX_AND_INDEX || buffer==EBT_INDEX) - MappingHintIndex=NewMappingHint; - } - - //! flags the mesh as changed, reloads hardware buffers - virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) - { - if (buffer==EBT_VERTEX_AND_INDEX || buffer==EBT_VERTEX) - ++ChangedID_Vertex; - if (buffer==EBT_VERTEX_AND_INDEX || buffer==EBT_INDEX) - ++ChangedID_Index; - } - - //! Get the currently used ID for identification of changes. - /** This shouldn't be used for anything outside the VideoDriver. */ - virtual u32 getChangedID_Vertex() const {return ChangedID_Vertex;} - - //! Get the currently used ID for identification of changes. - /** This shouldn't be used for anything outside the VideoDriver. */ - virtual u32 getChangedID_Index() const {return ChangedID_Index;} - - //! Material of this meshBuffer - video::SMaterial Material; - - //! Shared Array of vertices - core::array<video::S3DVertex> *Vertices; - - //! Array of Indices - core::array<u16> Indices; - - //! ID used for hardware buffer management - u32 ChangedID_Vertex; - - //! ID used for hardware buffer management - u32 ChangedID_Index; - - //! Bounding box - core::aabbox3df BoundingBox; - - //! hardware mapping hint - E_HARDWARE_MAPPING MappingHintVertex; - E_HARDWARE_MAPPING MappingHintIndex; - }; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/SSkinMeshBuffer.h b/builddir/irrlicht-1.8.1/include/SSkinMeshBuffer.h deleted file mode 100644 index d47de19..0000000 --- a/builddir/irrlicht-1.8.1/include/SSkinMeshBuffer.h +++ /dev/null @@ -1,404 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_SKIN_MESH_BUFFER_H_INCLUDED__ -#define __I_SKIN_MESH_BUFFER_H_INCLUDED__ - -#include "IMeshBuffer.h" -#include "S3DVertex.h" - - -namespace irr -{ -namespace scene -{ - - -//! A mesh buffer able to choose between S3DVertex2TCoords, S3DVertex and S3DVertexTangents at runtime -struct SSkinMeshBuffer : public IMeshBuffer -{ - //! Default constructor - SSkinMeshBuffer(video::E_VERTEX_TYPE vt=video::EVT_STANDARD) : - ChangedID_Vertex(1), ChangedID_Index(1), VertexType(vt), - MappingHint_Vertex(EHM_NEVER), MappingHint_Index(EHM_NEVER), - BoundingBoxNeedsRecalculated(true) - { - #ifdef _DEBUG - setDebugName("SSkinMeshBuffer"); - #endif - } - - //! Get Material of this buffer. - virtual const video::SMaterial& getMaterial() const - { - return Material; - } - - //! Get Material of this buffer. - virtual video::SMaterial& getMaterial() - { - return Material; - } - - //! Get standard vertex at given index - virtual video::S3DVertex *getVertex(u32 index) - { - switch (VertexType) - { - case video::EVT_2TCOORDS: - return (video::S3DVertex*)&Vertices_2TCoords[index]; - case video::EVT_TANGENTS: - return (video::S3DVertex*)&Vertices_Tangents[index]; - default: - return &Vertices_Standard[index]; - } - } - - //! Get pointer to vertex array - virtual const void* getVertices() const - { - switch (VertexType) - { - case video::EVT_2TCOORDS: - return Vertices_2TCoords.const_pointer(); - case video::EVT_TANGENTS: - return Vertices_Tangents.const_pointer(); - default: - return Vertices_Standard.const_pointer(); - } - } - - //! Get pointer to vertex array - virtual void* getVertices() - { - switch (VertexType) - { - case video::EVT_2TCOORDS: - return Vertices_2TCoords.pointer(); - case video::EVT_TANGENTS: - return Vertices_Tangents.pointer(); - default: - return Vertices_Standard.pointer(); - } - } - - //! Get vertex count - virtual u32 getVertexCount() const - { - switch (VertexType) - { - case video::EVT_2TCOORDS: - return Vertices_2TCoords.size(); - case video::EVT_TANGENTS: - return Vertices_Tangents.size(); - default: - return Vertices_Standard.size(); - } - } - - //! Get type of index data which is stored in this meshbuffer. - /** \return Index type of this buffer. */ - virtual video::E_INDEX_TYPE getIndexType() const - { - return video::EIT_16BIT; - } - - //! Get pointer to index array - virtual const u16* getIndices() const - { - return Indices.const_pointer(); - } - - //! Get pointer to index array - virtual u16* getIndices() - { - return Indices.pointer(); - } - - //! Get index count - virtual u32 getIndexCount() const - { - return Indices.size(); - } - - //! Get bounding box - virtual const core::aabbox3d<f32>& getBoundingBox() const - { - return BoundingBox; - } - - //! Set bounding box - virtual void setBoundingBox( const core::aabbox3df& box) - { - BoundingBox = box; - } - - //! Recalculate bounding box - virtual void recalculateBoundingBox() - { - if(!BoundingBoxNeedsRecalculated) - return; - - BoundingBoxNeedsRecalculated = false; - - switch (VertexType) - { - case video::EVT_STANDARD: - { - if (Vertices_Standard.empty()) - BoundingBox.reset(0,0,0); - else - { - BoundingBox.reset(Vertices_Standard[0].Pos); - for (u32 i=1; i<Vertices_Standard.size(); ++i) - BoundingBox.addInternalPoint(Vertices_Standard[i].Pos); - } - break; - } - case video::EVT_2TCOORDS: - { - if (Vertices_2TCoords.empty()) - BoundingBox.reset(0,0,0); - else - { - BoundingBox.reset(Vertices_2TCoords[0].Pos); - for (u32 i=1; i<Vertices_2TCoords.size(); ++i) - BoundingBox.addInternalPoint(Vertices_2TCoords[i].Pos); - } - break; - } - case video::EVT_TANGENTS: - { - if (Vertices_Tangents.empty()) - BoundingBox.reset(0,0,0); - else - { - BoundingBox.reset(Vertices_Tangents[0].Pos); - for (u32 i=1; i<Vertices_Tangents.size(); ++i) - BoundingBox.addInternalPoint(Vertices_Tangents[i].Pos); - } - break; - } - } - } - - //! Get vertex type - virtual video::E_VERTEX_TYPE getVertexType() const - { - return VertexType; - } - - //! Convert to 2tcoords vertex type - virtual void convertTo2TCoords() - { - if (VertexType==video::EVT_STANDARD) - { - for(u32 n=0;n<Vertices_Standard.size();++n) - { - video::S3DVertex2TCoords Vertex; - Vertex.Color=Vertices_Standard[n].Color; - Vertex.Pos=Vertices_Standard[n].Pos; - Vertex.Normal=Vertices_Standard[n].Normal; - Vertex.TCoords=Vertices_Standard[n].TCoords; - Vertices_2TCoords.push_back(Vertex); - } - Vertices_Standard.clear(); - VertexType=video::EVT_2TCOORDS; - } - } - - //! Convert to tangents vertex type - virtual void convertToTangents() - { - if (VertexType==video::EVT_STANDARD) - { - for(u32 n=0;n<Vertices_Standard.size();++n) - { - video::S3DVertexTangents Vertex; - Vertex.Color=Vertices_Standard[n].Color; - Vertex.Pos=Vertices_Standard[n].Pos; - Vertex.Normal=Vertices_Standard[n].Normal; - Vertex.TCoords=Vertices_Standard[n].TCoords; - Vertices_Tangents.push_back(Vertex); - } - Vertices_Standard.clear(); - VertexType=video::EVT_TANGENTS; - } - else if (VertexType==video::EVT_2TCOORDS) - { - for(u32 n=0;n<Vertices_2TCoords.size();++n) - { - video::S3DVertexTangents Vertex; - Vertex.Color=Vertices_2TCoords[n].Color; - Vertex.Pos=Vertices_2TCoords[n].Pos; - Vertex.Normal=Vertices_2TCoords[n].Normal; - Vertex.TCoords=Vertices_2TCoords[n].TCoords; - Vertices_Tangents.push_back(Vertex); - } - Vertices_2TCoords.clear(); - VertexType=video::EVT_TANGENTS; - } - } - - //! returns position of vertex i - virtual const core::vector3df& getPosition(u32 i) const - { - switch (VertexType) - { - case video::EVT_2TCOORDS: - return Vertices_2TCoords[i].Pos; - case video::EVT_TANGENTS: - return Vertices_Tangents[i].Pos; - default: - return Vertices_Standard[i].Pos; - } - } - - //! returns position of vertex i - virtual core::vector3df& getPosition(u32 i) - { - switch (VertexType) - { - case video::EVT_2TCOORDS: - return Vertices_2TCoords[i].Pos; - case video::EVT_TANGENTS: - return Vertices_Tangents[i].Pos; - default: - return Vertices_Standard[i].Pos; - } - } - - //! returns normal of vertex i - virtual const core::vector3df& getNormal(u32 i) const - { - switch (VertexType) - { - case video::EVT_2TCOORDS: - return Vertices_2TCoords[i].Normal; - case video::EVT_TANGENTS: - return Vertices_Tangents[i].Normal; - default: - return Vertices_Standard[i].Normal; - } - } - - //! returns normal of vertex i - virtual core::vector3df& getNormal(u32 i) - { - switch (VertexType) - { - case video::EVT_2TCOORDS: - return Vertices_2TCoords[i].Normal; - case video::EVT_TANGENTS: - return Vertices_Tangents[i].Normal; - default: - return Vertices_Standard[i].Normal; - } - } - - //! returns texture coords of vertex i - virtual const core::vector2df& getTCoords(u32 i) const - { - switch (VertexType) - { - case video::EVT_2TCOORDS: - return Vertices_2TCoords[i].TCoords; - case video::EVT_TANGENTS: - return Vertices_Tangents[i].TCoords; - default: - return Vertices_Standard[i].TCoords; - } - } - - //! returns texture coords of vertex i - virtual core::vector2df& getTCoords(u32 i) - { - switch (VertexType) - { - case video::EVT_2TCOORDS: - return Vertices_2TCoords[i].TCoords; - case video::EVT_TANGENTS: - return Vertices_Tangents[i].TCoords; - default: - return Vertices_Standard[i].TCoords; - } - } - - //! append the vertices and indices to the current buffer - virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) {} - - //! append the meshbuffer to the current buffer - virtual void append(const IMeshBuffer* const other) {} - - //! get the current hardware mapping hint for vertex buffers - virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const - { - return MappingHint_Vertex; - } - - //! get the current hardware mapping hint for index buffers - virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const - { - return MappingHint_Index; - } - - //! set the hardware mapping hint, for driver - virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX ) - { - if (Buffer==EBT_VERTEX) - MappingHint_Vertex=NewMappingHint; - else if (Buffer==EBT_INDEX) - MappingHint_Index=NewMappingHint; - else if (Buffer==EBT_VERTEX_AND_INDEX) - { - MappingHint_Vertex=NewMappingHint; - MappingHint_Index=NewMappingHint; - } - } - - //! flags the mesh as changed, reloads hardware buffers - virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) - { - if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX) - ++ChangedID_Vertex; - if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX) - ++ChangedID_Index; - } - - virtual u32 getChangedID_Vertex() const {return ChangedID_Vertex;} - - virtual u32 getChangedID_Index() const {return ChangedID_Index;} - - //! Call this after changing the positions of any vertex. - void boundingBoxNeedsRecalculated(void) { BoundingBoxNeedsRecalculated = true; } - - core::array<video::S3DVertexTangents> Vertices_Tangents; - core::array<video::S3DVertex2TCoords> Vertices_2TCoords; - core::array<video::S3DVertex> Vertices_Standard; - core::array<u16> Indices; - - u32 ChangedID_Vertex; - u32 ChangedID_Index; - - //ISkinnedMesh::SJoint *AttachedJoint; - core::matrix4 Transformation; - - video::SMaterial Material; - video::E_VERTEX_TYPE VertexType; - - core::aabbox3d<f32> BoundingBox; - - // hardware mapping hint - E_HARDWARE_MAPPING MappingHint_Vertex:3; - E_HARDWARE_MAPPING MappingHint_Index:3; - - bool BoundingBoxNeedsRecalculated:1; -}; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/SVertexIndex.h b/builddir/irrlicht-1.8.1/include/SVertexIndex.h deleted file mode 100644 index bc775ec..0000000 --- a/builddir/irrlicht-1.8.1/include/SVertexIndex.h +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (C) 2008-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __S_VERTEX_INDEX_H_INCLUDED__ -#define __S_VERTEX_INDEX_H_INCLUDED__ - -#include "irrTypes.h" - - -namespace irr -{ -namespace video -{ -enum E_INDEX_TYPE -{ - EIT_16BIT = 0, - EIT_32BIT -}; - - -/* -//! vertex index used by the Irrlicht engine. -template <class T> -struct SSpecificVertexIndex -{ - T Index; - - //! default constructor - SSpecificVertexIndex() {} - - //! constructor - SSpecificVertexIndex(u32 _index) :Index(_index) {} - - bool operator==(const SSpecificVertexIndex& other) const - { - return (Index == other.Index); - } - - bool operator!=(const SSpecificVertexIndex& other) const - { - return (Index != other.Index); - } - - bool operator<(const SSpecificVertexIndex& other) const - { - return (Index < other.Index); - } - - SSpecificVertexIndex operator+(const u32& other) const - { - return SSpecificVertexIndex(Index + other); - } - - operator const u32() const - { - return (const u32)Index; - } - - E_INDEX_TYPE getType() const - { - if (sizeof(T)==sizeof(u16)) - return video::EIT_16BIT; - return video::EIT_32BIT; - } - -}; - -//typedef SSpecificVertexIndex<u16> SVertexIndex; - -typedef u32 SVertexIndex; -*/ - - -} // end namespace video -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/SVertexManipulator.h b/builddir/irrlicht-1.8.1/include/SVertexManipulator.h deleted file mode 100644 index 592544b..0000000 --- a/builddir/irrlicht-1.8.1/include/SVertexManipulator.h +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright (C) 2009-2012 Christian Stehno -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __S_VERTEX_MANIPULATOR_H_INCLUDED__ -#define __S_VERTEX_MANIPULATOR_H_INCLUDED__ - -#include "S3DVertex.h" -#include "SColor.h" - -namespace irr -{ -namespace scene -{ - - class IMesh; - class IMeshBuffer; - struct SMesh; - - //! Interface for vertex manipulators. - /** You should derive your manipulator from this class if it shall be called for every vertex, getting as parameter just the vertex. - */ - struct IVertexManipulator - { - }; - //! Vertex manipulator to set color to a fixed color for all vertices - class SVertexColorSetManipulator : public IVertexManipulator - { - public: - SVertexColorSetManipulator(video::SColor color) : Color(color) {} - void operator()(video::S3DVertex& vertex) const - { - vertex.Color=Color; - } - private: - video::SColor Color; - }; - //! Vertex manipulator to set the alpha value of the vertex color to a fixed value - class SVertexColorSetAlphaManipulator : public IVertexManipulator - { - public: - SVertexColorSetAlphaManipulator(u32 alpha) : Alpha(alpha) {} - void operator()(video::S3DVertex& vertex) const - { - vertex.Color.setAlpha(Alpha); - } - private: - u32 Alpha; - }; - //! Vertex manipulator which invertes the RGB values - class SVertexColorInvertManipulator : public IVertexManipulator - { - public: - void operator()(video::S3DVertex& vertex) const - { - vertex.Color.setRed(255-vertex.Color.getRed()); - vertex.Color.setGreen(255-vertex.Color.getGreen()); - vertex.Color.setBlue(255-vertex.Color.getBlue()); - } - }; - //! Vertex manipulator to set vertex color to one of two values depending on a given threshold - /** If average of the color value is >Threshold the High color is chosen, else Low. */ - class SVertexColorThresholdManipulator : public IVertexManipulator - { - public: - SVertexColorThresholdManipulator(u8 threshold, video::SColor low, - video::SColor high) : Threshold(threshold), Low(low), High(high) {} - void operator()(video::S3DVertex& vertex) const - { - vertex.Color = ((u8)vertex.Color.getAverage()>Threshold)?High:Low; - } - private: - u8 Threshold; - video::SColor Low; - video::SColor High; - }; - //! Vertex manipulator which adjusts the brightness by the given amount - /** A positive value increases brightness, a negative value darkens the colors. */ - class SVertexColorBrightnessManipulator : public IVertexManipulator - { - public: - SVertexColorBrightnessManipulator(s32 amount) : Amount(amount) {} - void operator()(video::S3DVertex& vertex) const - { - vertex.Color.setRed(core::clamp(vertex.Color.getRed()+Amount, 0u, 255u)); - vertex.Color.setGreen(core::clamp(vertex.Color.getGreen()+Amount, 0u, 255u)); - vertex.Color.setBlue(core::clamp(vertex.Color.getBlue()+Amount, 0u, 255u)); - } - private: - s32 Amount; - }; - //! Vertex manipulator which adjusts the contrast by the given factor - /** Factors over 1 increase contrast, below 1 reduce it. */ - class SVertexColorContrastManipulator : public IVertexManipulator - { - public: - SVertexColorContrastManipulator(f32 factor) : Factor(factor) {} - void operator()(video::S3DVertex& vertex) const - { - vertex.Color.setRed(core::clamp(core::round32((vertex.Color.getRed()-128)*Factor)+128, 0, 255)); - vertex.Color.setGreen(core::clamp(core::round32((vertex.Color.getGreen()-128)*Factor)+128, 0, 255)); - vertex.Color.setBlue(core::clamp(core::round32((vertex.Color.getBlue()-128)*Factor)+128, 0, 255)); - } - private: - f32 Factor; - }; - //! Vertex manipulator which adjusts the contrast by the given factor and brightness by a signed amount. - /** Factors over 1 increase contrast, below 1 reduce it. - A positive amount increases brightness, a negative one darkens the colors. */ - class SVertexColorContrastBrightnessManipulator : public IVertexManipulator - { - public: - SVertexColorContrastBrightnessManipulator(f32 factor, s32 amount) : Factor(factor), Amount(amount+128) {} - void operator()(video::S3DVertex& vertex) const - { - vertex.Color.setRed(core::clamp(core::round32((vertex.Color.getRed()-128)*Factor)+Amount, 0, 255)); - vertex.Color.setGreen(core::clamp(core::round32((vertex.Color.getGreen()-128)*Factor)+Amount, 0, 255)); - vertex.Color.setBlue(core::clamp(core::round32((vertex.Color.getBlue()-128)*Factor)+Amount, 0, 255)); - } - private: - f32 Factor; - s32 Amount; - }; - //! Vertex manipulator which adjusts the brightness by a gamma operation - /** A value over one increases brightness, one below darkens the colors. */ - class SVertexColorGammaManipulator : public IVertexManipulator - { - public: - SVertexColorGammaManipulator(f32 gamma) : Gamma(1.f) - { - if (gamma != 0.f) - Gamma = 1.f/gamma; - } - void operator()(video::S3DVertex& vertex) const - { - vertex.Color.setRed(core::clamp(core::round32(powf((f32)(vertex.Color.getRed()),Gamma)), 0, 255)); - vertex.Color.setGreen(core::clamp(core::round32(powf((f32)(vertex.Color.getGreen()),Gamma)), 0, 255)); - vertex.Color.setBlue(core::clamp(core::round32(powf((f32)(vertex.Color.getBlue()),Gamma)), 0, 255)); - } - private: - f32 Gamma; - }; - //! Vertex manipulator which scales the color values - /** Can e.g be used for white balance, factor would be 255.f/brightest color. */ - class SVertexColorScaleManipulator : public IVertexManipulator - { - public: - SVertexColorScaleManipulator(f32 factor) : Factor(factor) {} - void operator()(video::S3DVertex& vertex) const - { - vertex.Color.setRed(core::clamp(core::round32(vertex.Color.getRed()*Factor), 0, 255)); - vertex.Color.setGreen(core::clamp(core::round32(vertex.Color.getGreen()*Factor), 0, 255)); - vertex.Color.setBlue(core::clamp(core::round32(vertex.Color.getBlue()*Factor), 0, 255)); - } - private: - f32 Factor; - }; - //! Vertex manipulator which desaturates the color values - /** Uses the lightness value of the color. */ - class SVertexColorDesaturateToLightnessManipulator : public IVertexManipulator - { - public: - void operator()(video::S3DVertex& vertex) const - { - vertex.Color=core::round32(vertex.Color.getLightness()); - } - }; - //! Vertex manipulator which desaturates the color values - /** Uses the average value of the color. */ - class SVertexColorDesaturateToAverageManipulator : public IVertexManipulator - { - public: - void operator()(video::S3DVertex& vertex) const - { - vertex.Color=vertex.Color.getAverage(); - } - }; - //! Vertex manipulator which desaturates the color values - /** Uses the luminance value of the color. */ - class SVertexColorDesaturateToLuminanceManipulator : public IVertexManipulator - { - public: - void operator()(video::S3DVertex& vertex) const - { - vertex.Color=core::round32(vertex.Color.getLuminance()); - } - }; - //! Vertex manipulator which interpolates the color values - /** Uses linear interpolation. */ - class SVertexColorInterpolateLinearManipulator : public IVertexManipulator - { - public: - SVertexColorInterpolateLinearManipulator(video::SColor color, f32 factor) : - Color(color), Factor(factor) {} - void operator()(video::S3DVertex& vertex) const - { - vertex.Color=vertex.Color.getInterpolated(Color, Factor); - } - private: - video::SColor Color; - f32 Factor; - }; - //! Vertex manipulator which interpolates the color values - /** Uses linear interpolation. */ - class SVertexColorInterpolateQuadraticManipulator : public IVertexManipulator - { - public: - SVertexColorInterpolateQuadraticManipulator(video::SColor color1, video::SColor color2, f32 factor) : - Color1(color1), Color2(color2), Factor(factor) {} - void operator()(video::S3DVertex& vertex) const - { - vertex.Color=vertex.Color.getInterpolated_quadratic(Color1, Color2, Factor); - } - private: - video::SColor Color1; - video::SColor Color2; - f32 Factor; - }; - - //! Vertex manipulator which scales the position of the vertex - class SVertexPositionScaleManipulator : public IVertexManipulator - { - public: - SVertexPositionScaleManipulator(const core::vector3df& factor) : Factor(factor) {} - template <typename VType> - void operator()(VType& vertex) const - { - vertex.Pos *= Factor; - } - private: - core::vector3df Factor; - }; - - //! Vertex manipulator which scales the position of the vertex along the normals - /** This can look more pleasing than the usual Scale operator, but - depends on the mesh geometry. - */ - class SVertexPositionScaleAlongNormalsManipulator : public IVertexManipulator - { - public: - SVertexPositionScaleAlongNormalsManipulator(const core::vector3df& factor) : Factor(factor) {} - template <typename VType> - void operator()(VType& vertex) const - { - vertex.Pos += vertex.Normal*Factor; - } - private: - core::vector3df Factor; - }; - - //! Vertex manipulator which transforms the position of the vertex - class SVertexPositionTransformManipulator : public IVertexManipulator - { - public: - SVertexPositionTransformManipulator(const core::matrix4& m) : Transformation(m) {} - template <typename VType> - void operator()(VType& vertex) const - { - Transformation.transformVect(vertex.Pos); - } - private: - core::matrix4 Transformation; - }; - - //! Vertex manipulator which scales the TCoords of the vertex - class SVertexTCoordsScaleManipulator : public IVertexManipulator - { - public: - SVertexTCoordsScaleManipulator(const core::vector2df& factor, u32 uvSet=1) : Factor(factor), UVSet(uvSet) {} - void operator()(video::S3DVertex2TCoords& vertex) const - { - if (1==UVSet) - vertex.TCoords *= Factor; - else if (2==UVSet) - vertex.TCoords2 *= Factor; - } - template <typename VType> - void operator()(VType& vertex) const - { - if (1==UVSet) - vertex.TCoords *= Factor; - } - private: - core::vector2df Factor; - u32 UVSet; - }; - -} // end namespace scene -} // end namespace irr - - -#endif diff --git a/builddir/irrlicht-1.8.1/include/SViewFrustum.h b/builddir/irrlicht-1.8.1/include/SViewFrustum.h deleted file mode 100644 index d2b5b9a..0000000 --- a/builddir/irrlicht-1.8.1/include/SViewFrustum.h +++ /dev/null @@ -1,370 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __S_VIEW_FRUSTUM_H_INCLUDED__ -#define __S_VIEW_FRUSTUM_H_INCLUDED__ - -#include "plane3d.h" -#include "vector3d.h" -#include "line3d.h" -#include "aabbox3d.h" -#include "matrix4.h" -#include "IVideoDriver.h" - -namespace irr -{ -namespace scene -{ - - //! Defines the view frustum. That's the space visible by the camera. - /** The view frustum is enclosed by 6 planes. These six planes share - eight points. A bounding box around these eight points is also stored in - this structure. - */ - struct SViewFrustum - { - enum VFPLANES - { - //! Far plane of the frustum. That is the plane farest away from the eye. - VF_FAR_PLANE = 0, - //! Near plane of the frustum. That is the plane nearest to the eye. - VF_NEAR_PLANE, - //! Left plane of the frustum. - VF_LEFT_PLANE, - //! Right plane of the frustum. - VF_RIGHT_PLANE, - //! Bottom plane of the frustum. - VF_BOTTOM_PLANE, - //! Top plane of the frustum. - VF_TOP_PLANE, - - //! Amount of planes enclosing the view frustum. Should be 6. - VF_PLANE_COUNT - }; - - - //! Default Constructor - SViewFrustum() {} - - //! Copy Constructor - SViewFrustum(const SViewFrustum& other); - - //! This constructor creates a view frustum based on a projection and/or view matrix. - SViewFrustum(const core::matrix4& mat); - - //! This constructor creates a view frustum based on a projection and/or view matrix. - inline void setFrom(const core::matrix4& mat); - - //! transforms the frustum by the matrix - /** \param mat: Matrix by which the view frustum is transformed.*/ - void transform(const core::matrix4& mat); - - //! returns the point which is on the far left upper corner inside the the view frustum. - core::vector3df getFarLeftUp() const; - - //! returns the point which is on the far left bottom corner inside the the view frustum. - core::vector3df getFarLeftDown() const; - - //! returns the point which is on the far right top corner inside the the view frustum. - core::vector3df getFarRightUp() const; - - //! returns the point which is on the far right bottom corner inside the the view frustum. - core::vector3df getFarRightDown() const; - - //! returns the point which is on the near left upper corner inside the the view frustum. - core::vector3df getNearLeftUp() const; - - //! returns the point which is on the near left bottom corner inside the the view frustum. - core::vector3df getNearLeftDown() const; - - //! returns the point which is on the near right top corner inside the the view frustum. - core::vector3df getNearRightUp() const; - - //! returns the point which is on the near right bottom corner inside the the view frustum. - core::vector3df getNearRightDown() const; - - //! returns a bounding box enclosing the whole view frustum - const core::aabbox3d<f32> &getBoundingBox() const; - - //! recalculates the bounding box member based on the planes - inline void recalculateBoundingBox(); - - //! get the given state's matrix based on frustum E_TRANSFORMATION_STATE - core::matrix4& getTransform( video::E_TRANSFORMATION_STATE state); - - //! get the given state's matrix based on frustum E_TRANSFORMATION_STATE - const core::matrix4& getTransform( video::E_TRANSFORMATION_STATE state) const; - - //! clips a line to the view frustum. - /** \return True if the line was clipped, false if not */ - bool clipLine(core::line3d<f32>& line) const; - - //! the position of the camera - core::vector3df cameraPosition; - - //! all planes enclosing the view frustum. - core::plane3d<f32> planes[VF_PLANE_COUNT]; - - //! bounding box around the view frustum - core::aabbox3d<f32> boundingBox; - - private: - //! Hold a copy of important transform matrices - enum E_TRANSFORMATION_STATE_FRUSTUM - { - ETS_VIEW = 0, - ETS_PROJECTION = 1, - ETS_COUNT_FRUSTUM - }; - - //! Hold a copy of important transform matrices - core::matrix4 Matrices[ETS_COUNT_FRUSTUM]; - }; - - - /*! - Copy constructor ViewFrustum - */ - inline SViewFrustum::SViewFrustum(const SViewFrustum& other) - { - cameraPosition=other.cameraPosition; - boundingBox=other.boundingBox; - - u32 i; - for (i=0; i<VF_PLANE_COUNT; ++i) - planes[i]=other.planes[i]; - - for (i=0; i<ETS_COUNT_FRUSTUM; ++i) - Matrices[i]=other.Matrices[i]; - } - - inline SViewFrustum::SViewFrustum(const core::matrix4& mat) - { - setFrom ( mat ); - } - - - inline void SViewFrustum::transform(const core::matrix4& mat) - { - for (u32 i=0; i<VF_PLANE_COUNT; ++i) - mat.transformPlane(planes[i]); - - mat.transformVect(cameraPosition); - recalculateBoundingBox(); - } - - - inline core::vector3df SViewFrustum::getFarLeftUp() const - { - core::vector3df p; - planes[scene::SViewFrustum::VF_FAR_PLANE].getIntersectionWithPlanes( - planes[scene::SViewFrustum::VF_TOP_PLANE], - planes[scene::SViewFrustum::VF_LEFT_PLANE], p); - - return p; - } - - inline core::vector3df SViewFrustum::getFarLeftDown() const - { - core::vector3df p; - planes[scene::SViewFrustum::VF_FAR_PLANE].getIntersectionWithPlanes( - planes[scene::SViewFrustum::VF_BOTTOM_PLANE], - planes[scene::SViewFrustum::VF_LEFT_PLANE], p); - - return p; - } - - inline core::vector3df SViewFrustum::getFarRightUp() const - { - core::vector3df p; - planes[scene::SViewFrustum::VF_FAR_PLANE].getIntersectionWithPlanes( - planes[scene::SViewFrustum::VF_TOP_PLANE], - planes[scene::SViewFrustum::VF_RIGHT_PLANE], p); - - return p; - } - - inline core::vector3df SViewFrustum::getFarRightDown() const - { - core::vector3df p; - planes[scene::SViewFrustum::VF_FAR_PLANE].getIntersectionWithPlanes( - planes[scene::SViewFrustum::VF_BOTTOM_PLANE], - planes[scene::SViewFrustum::VF_RIGHT_PLANE], p); - - return p; - } - - inline core::vector3df SViewFrustum::getNearLeftUp() const - { - core::vector3df p; - planes[scene::SViewFrustum::VF_NEAR_PLANE].getIntersectionWithPlanes( - planes[scene::SViewFrustum::VF_TOP_PLANE], - planes[scene::SViewFrustum::VF_LEFT_PLANE], p); - - return p; - } - - inline core::vector3df SViewFrustum::getNearLeftDown() const - { - core::vector3df p; - planes[scene::SViewFrustum::VF_NEAR_PLANE].getIntersectionWithPlanes( - planes[scene::SViewFrustum::VF_BOTTOM_PLANE], - planes[scene::SViewFrustum::VF_LEFT_PLANE], p); - - return p; - } - - inline core::vector3df SViewFrustum::getNearRightUp() const - { - core::vector3df p; - planes[scene::SViewFrustum::VF_NEAR_PLANE].getIntersectionWithPlanes( - planes[scene::SViewFrustum::VF_TOP_PLANE], - planes[scene::SViewFrustum::VF_RIGHT_PLANE], p); - - return p; - } - - inline core::vector3df SViewFrustum::getNearRightDown() const - { - core::vector3df p; - planes[scene::SViewFrustum::VF_NEAR_PLANE].getIntersectionWithPlanes( - planes[scene::SViewFrustum::VF_BOTTOM_PLANE], - planes[scene::SViewFrustum::VF_RIGHT_PLANE], p); - - return p; - } - - inline const core::aabbox3d<f32> &SViewFrustum::getBoundingBox() const - { - return boundingBox; - } - - inline void SViewFrustum::recalculateBoundingBox() - { - boundingBox.reset ( cameraPosition ); - - boundingBox.addInternalPoint(getFarLeftUp()); - boundingBox.addInternalPoint(getFarRightUp()); - boundingBox.addInternalPoint(getFarLeftDown()); - boundingBox.addInternalPoint(getFarRightDown()); - } - - //! This constructor creates a view frustum based on a projection - //! and/or view matrix. - inline void SViewFrustum::setFrom(const core::matrix4& mat) - { - // left clipping plane - planes[VF_LEFT_PLANE].Normal.X = mat[3 ] + mat[0]; - planes[VF_LEFT_PLANE].Normal.Y = mat[7 ] + mat[4]; - planes[VF_LEFT_PLANE].Normal.Z = mat[11] + mat[8]; - planes[VF_LEFT_PLANE].D = mat[15] + mat[12]; - - // right clipping plane - planes[VF_RIGHT_PLANE].Normal.X = mat[3 ] - mat[0]; - planes[VF_RIGHT_PLANE].Normal.Y = mat[7 ] - mat[4]; - planes[VF_RIGHT_PLANE].Normal.Z = mat[11] - mat[8]; - planes[VF_RIGHT_PLANE].D = mat[15] - mat[12]; - - // top clipping plane - planes[VF_TOP_PLANE].Normal.X = mat[3 ] - mat[1]; - planes[VF_TOP_PLANE].Normal.Y = mat[7 ] - mat[5]; - planes[VF_TOP_PLANE].Normal.Z = mat[11] - mat[9]; - planes[VF_TOP_PLANE].D = mat[15] - mat[13]; - - // bottom clipping plane - planes[VF_BOTTOM_PLANE].Normal.X = mat[3 ] + mat[1]; - planes[VF_BOTTOM_PLANE].Normal.Y = mat[7 ] + mat[5]; - planes[VF_BOTTOM_PLANE].Normal.Z = mat[11] + mat[9]; - planes[VF_BOTTOM_PLANE].D = mat[15] + mat[13]; - - // far clipping plane - planes[VF_FAR_PLANE].Normal.X = mat[3 ] - mat[2]; - planes[VF_FAR_PLANE].Normal.Y = mat[7 ] - mat[6]; - planes[VF_FAR_PLANE].Normal.Z = mat[11] - mat[10]; - planes[VF_FAR_PLANE].D = mat[15] - mat[14]; - - // near clipping plane - planes[VF_NEAR_PLANE].Normal.X = mat[2]; - planes[VF_NEAR_PLANE].Normal.Y = mat[6]; - planes[VF_NEAR_PLANE].Normal.Z = mat[10]; - planes[VF_NEAR_PLANE].D = mat[14]; - - // normalize normals - u32 i; - for ( i=0; i != VF_PLANE_COUNT; ++i) - { - const f32 len = -core::reciprocal_squareroot( - planes[i].Normal.getLengthSQ()); - planes[i].Normal *= len; - planes[i].D *= len; - } - - // make bounding box - recalculateBoundingBox(); - } - - /*! - View Frustum depends on Projection & View Matrix - */ - inline core::matrix4& SViewFrustum::getTransform(video::E_TRANSFORMATION_STATE state ) - { - u32 index = 0; - switch ( state ) - { - case video::ETS_PROJECTION: - index = SViewFrustum::ETS_PROJECTION; break; - case video::ETS_VIEW: - index = SViewFrustum::ETS_VIEW; break; - default: - break; - } - return Matrices [ index ]; - } - - /*! - View Frustum depends on Projection & View Matrix - */ - inline const core::matrix4& SViewFrustum::getTransform(video::E_TRANSFORMATION_STATE state ) const - { - u32 index = 0; - switch ( state ) - { - case video::ETS_PROJECTION: - index = SViewFrustum::ETS_PROJECTION; break; - case video::ETS_VIEW: - index = SViewFrustum::ETS_VIEW; break; - default: - break; - } - return Matrices [ index ]; - } - - //! Clips a line to the frustum - inline bool SViewFrustum::clipLine(core::line3d<f32>& line) const - { - bool wasClipped = false; - for (u32 i=0; i < VF_PLANE_COUNT; ++i) - { - if (planes[i].classifyPointRelation(line.start) == core::ISREL3D_FRONT) - { - line.start = line.start.getInterpolated(line.end, - planes[i].getKnownIntersectionWithLine(line.start, line.end)); - wasClipped = true; - } - if (planes[i].classifyPointRelation(line.end) == core::ISREL3D_FRONT) - { - line.end = line.start.getInterpolated(line.end, - planes[i].getKnownIntersectionWithLine(line.start, line.end)); - wasClipped = true; - } - } - return wasClipped; - } - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/SceneParameters.h b/builddir/irrlicht-1.8.1/include/SceneParameters.h deleted file mode 100644 index 827ae42..0000000 --- a/builddir/irrlicht-1.8.1/include/SceneParameters.h +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __I_SCENE_PARAMETERS_H_INCLUDED__ -#define __I_SCENE_PARAMETERS_H_INCLUDED__ - -/*! \file SceneParameters.h - \brief Header file containing all scene parameters for modifying mesh loading etc. - - This file includes all parameter names which can be set using ISceneManager::getParameters() - to modify the behavior of plugins and mesh loaders. -*/ - -namespace irr -{ -namespace scene -{ - //! Name of the parameter for changing how Irrlicht handles the ZWrite flag for transparent (blending) materials - /** The default behavior in Irrlicht is to disable writing to the - z-buffer for all really transparent, i.e. blending materials. This - avoids problems with intersecting faces, but can also break renderings. - If transparent materials should use the SMaterial flag for ZWriteEnable - just as other material types use this attribute. - Use it like this: - \code - SceneManager->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true); - \endcode - **/ - const c8* const ALLOW_ZWRITE_ON_TRANSPARENT = "Allow_ZWrite_On_Transparent"; - - //! Name of the parameter for changing the texture path of the built-in csm loader. - /** Use it like this: - \code - SceneManager->getParameters()->setAttribute(scene::CSM_TEXTURE_PATH, "path/to/your/textures"); - \endcode - **/ - const c8* const CSM_TEXTURE_PATH = "CSM_TexturePath"; - - //! Name of the parameter for changing the texture path of the built-in lmts loader. - /** Use it like this: - \code - SceneManager->getParameters()->setAttribute(scene::LMTS_TEXTURE_PATH, "path/to/your/textures"); - \endcode - **/ - const c8* const LMTS_TEXTURE_PATH = "LMTS_TexturePath"; - - //! Name of the parameter for changing the texture path of the built-in my3d loader. - /** Use it like this: - \code - SceneManager->getParameters()->setAttribute(scene::MY3D_TEXTURE_PATH, "path/to/your/textures"); - \endcode - **/ - const c8* const MY3D_TEXTURE_PATH = "MY3D_TexturePath"; - - //! Name of the parameter specifying the COLLADA mesh loading mode - /** - Specifies if the COLLADA loader should create instances of the models, lights and - cameras when loading COLLADA meshes. By default, this is set to false. If this is - set to true, the ISceneManager::getMesh() method will only return a pointer to a - dummy mesh and create instances of all meshes and lights and cameras in the collada - file by itself. Example: - \code - SceneManager->getParameters()->setAttribute(scene::COLLADA_CREATE_SCENE_INSTANCES, true); - \endcode - */ - const c8* const COLLADA_CREATE_SCENE_INSTANCES = "COLLADA_CreateSceneInstances"; - - //! Name of the parameter for changing the texture path of the built-in DMF loader. - /** This path is prefixed to the file names defined in the Deled file when loading - textures. This allows to alter the paths for a specific project setting. - Use it like this: - \code - SceneManager->getStringParameters()->setAttribute(scene::DMF_TEXTURE_PATH, "path/to/your/textures"); - \endcode - **/ - const c8* const DMF_TEXTURE_PATH = "DMF_TexturePath"; - - //! Name of the parameter for preserving DMF textures dir structure with built-in DMF loader. - /** If this parameter is set to true, the texture directory defined in the Deled file - is ignored, and only the texture name is used to find the proper file. Otherwise, the - texture path is also used, which allows to use a nicer media layout. - Use it like this: - \code - //this way you won't use this setting (default) - SceneManager->getParameters()->setAttribute(scene::DMF_IGNORE_MATERIALS_DIRS, false); - \endcode - \code - //this way you'll use this setting - SceneManager->getParameters()->setAttribute(scene::DMF_IGNORE_MATERIALS_DIRS, true); - \endcode - **/ - const c8* const DMF_IGNORE_MATERIALS_DIRS = "DMF_IgnoreMaterialsDir"; - - //! Name of the parameter for setting reference value of alpha in transparent materials. - /** Use it like this: - \code - //this way you'll set alpha ref to 0.1 - SceneManager->getParameters()->setAttribute(scene::DMF_ALPHA_CHANNEL_REF, 0.1); - \endcode - **/ - const c8* const DMF_ALPHA_CHANNEL_REF = "DMF_AlphaRef"; - - //! Name of the parameter for choose to flip or not tga files. - /** Use it like this: - \code - //this way you'll choose to flip alpha textures - SceneManager->getParameters()->setAttribute(scene::DMF_FLIP_ALPHA_TEXTURES, true); - \endcode - **/ - const c8* const DMF_FLIP_ALPHA_TEXTURES = "DMF_FlipAlpha"; - - - //! Name of the parameter for changing the texture path of the built-in obj loader. - /** Use it like this: - \code - SceneManager->getParameters()->setAttribute(scene::OBJ_TEXTURE_PATH, "path/to/your/textures"); - \endcode - **/ - const c8* const OBJ_TEXTURE_PATH = "OBJ_TexturePath"; - - //! Flag to avoid loading group structures in .obj files - /** Use it like this: - \code - SceneManager->getParameters()->setAttribute(scene::OBJ_LOADER_IGNORE_GROUPS, true); - \endcode - **/ - const c8* const OBJ_LOADER_IGNORE_GROUPS = "OBJ_IgnoreGroups"; - - - //! Flag to avoid loading material .mtl file for .obj files - /** Use it like this: - \code - SceneManager->getParameters()->setAttribute(scene::OBJ_LOADER_IGNORE_MATERIAL_FILES, true); - \endcode - **/ - const c8* const OBJ_LOADER_IGNORE_MATERIAL_FILES = "OBJ_IgnoreMaterialFiles"; - - - //! Flag to ignore the b3d file's mipmapping flag - /** Instead Irrlicht's texture creation flag is used. Use it like this: - \code - SceneManager->getParameters()->setAttribute(scene::B3D_LOADER_IGNORE_MIPMAP_FLAG, true); - \endcode - **/ - const c8* const B3D_LOADER_IGNORE_MIPMAP_FLAG = "B3D_IgnoreMipmapFlag"; - - //! Name of the parameter for changing the texture path of the built-in b3d loader. - /** Use it like this: - \code - SceneManager->getParameters()->setAttribute(scene::B3D_TEXTURE_PATH, "path/to/your/textures"); - \endcode - **/ - const c8* const B3D_TEXTURE_PATH = "B3D_TexturePath"; - - //! Flag set as parameter when the scene manager is used as editor - /** In this way special animators like deletion animators can be stopped from - deleting scene nodes for example */ - const c8* const IRR_SCENE_MANAGER_IS_EDITOR = "IRR_Editor"; - - //! Name of the parameter for setting the length of debug normals. - /** Use it like this: - \code - SceneManager->getParameters()->setAttribute(scene::DEBUG_NORMAL_LENGTH, 1.5f); - \endcode - **/ - const c8* const DEBUG_NORMAL_LENGTH = "DEBUG_Normal_Length"; - - //! Name of the parameter for setting the color of debug normals. - /** Use it like this: - \code - SceneManager->getParameters()->setAttributeAsColor(scene::DEBUG_NORMAL_COLOR, video::SColor(255, 255, 255, 255)); - \endcode - **/ - const c8* const DEBUG_NORMAL_COLOR = "DEBUG_Normal_Color"; - - -} // end namespace scene -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/aabbox3d.h b/builddir/irrlicht-1.8.1/include/aabbox3d.h deleted file mode 100644 index ae4e3ae..0000000 --- a/builddir/irrlicht-1.8.1/include/aabbox3d.h +++ /dev/null @@ -1,332 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_AABBOX_3D_H_INCLUDED__ -#define __IRR_AABBOX_3D_H_INCLUDED__ - -#include "irrMath.h" -#include "plane3d.h" -#include "line3d.h" - -namespace irr -{ -namespace core -{ - -//! Axis aligned bounding box in 3d dimensional space. -/** Has some useful methods used with occlusion culling or clipping. -*/ -template <class T> -class aabbox3d -{ - public: - - //! Default Constructor. - aabbox3d(): MinEdge(-1,-1,-1), MaxEdge(1,1,1) {} - //! Constructor with min edge and max edge. - aabbox3d(const vector3d<T>& min, const vector3d<T>& max): MinEdge(min), MaxEdge(max) {} - //! Constructor with only one point. - aabbox3d(const vector3d<T>& init): MinEdge(init), MaxEdge(init) {} - //! Constructor with min edge and max edge as single values, not vectors. - aabbox3d(T minx, T miny, T minz, T maxx, T maxy, T maxz): MinEdge(minx, miny, minz), MaxEdge(maxx, maxy, maxz) {} - - // operators - //! Equality operator - /** \param other box to compare with. - \return True if both boxes are equal, else false. */ - inline bool operator==(const aabbox3d<T>& other) const { return (MinEdge == other.MinEdge && other.MaxEdge == MaxEdge);} - //! Inequality operator - /** \param other box to compare with. - \return True if both boxes are different, else false. */ - inline bool operator!=(const aabbox3d<T>& other) const { return !(MinEdge == other.MinEdge && other.MaxEdge == MaxEdge);} - - // functions - - //! Resets the bounding box to a one-point box. - /** \param x X coord of the point. - \param y Y coord of the point. - \param z Z coord of the point. */ - void reset(T x, T y, T z) - { - MaxEdge.set(x,y,z); - MinEdge = MaxEdge; - } - - //! Resets the bounding box. - /** \param initValue New box to set this one to. */ - void reset(const aabbox3d<T>& initValue) - { - *this = initValue; - } - - //! Resets the bounding box to a one-point box. - /** \param initValue New point. */ - void reset(const vector3d<T>& initValue) - { - MaxEdge = initValue; - MinEdge = initValue; - } - - //! Adds a point to the bounding box - /** The box grows bigger, if point was outside of the box. - \param p: Point to add into the box. */ - void addInternalPoint(const vector3d<T>& p) - { - addInternalPoint(p.X, p.Y, p.Z); - } - - //! Adds another bounding box - /** The box grows bigger, if the new box was outside of the box. - \param b: Other bounding box to add into this box. */ - void addInternalBox(const aabbox3d<T>& b) - { - addInternalPoint(b.MaxEdge); - addInternalPoint(b.MinEdge); - } - - //! Adds a point to the bounding box - /** The box grows bigger, if point is outside of the box. - \param x X coordinate of the point to add to this box. - \param y Y coordinate of the point to add to this box. - \param z Z coordinate of the point to add to this box. */ - void addInternalPoint(T x, T y, T z) - { - if (x>MaxEdge.X) MaxEdge.X = x; - if (y>MaxEdge.Y) MaxEdge.Y = y; - if (z>MaxEdge.Z) MaxEdge.Z = z; - - if (x<MinEdge.X) MinEdge.X = x; - if (y<MinEdge.Y) MinEdge.Y = y; - if (z<MinEdge.Z) MinEdge.Z = z; - } - - //! Get center of the bounding box - /** \return Center of the bounding box. */ - vector3d<T> getCenter() const - { - return (MinEdge + MaxEdge) / 2; - } - - //! Get extent of the box (maximal distance of two points in the box) - /** \return Extent of the bounding box. */ - vector3d<T> getExtent() const - { - return MaxEdge - MinEdge; - } - - //! Check if the box is empty. - /** This means that there is no space between the min and max edge. - \return True if box is empty, else false. */ - bool isEmpty() const - { - return MinEdge.equals ( MaxEdge ); - } - - //! Get the volume enclosed by the box in cubed units - T getVolume() const - { - const vector3d<T> e = getExtent(); - return e.X * e.Y * e.Z; - } - - //! Get the surface area of the box in squared units - T getArea() const - { - const vector3d<T> e = getExtent(); - return 2*(e.X*e.Y + e.X*e.Z + e.Y*e.Z); - } - - //! Stores all 8 edges of the box into an array - /** \param edges: Pointer to array of 8 edges. */ - void getEdges(vector3d<T> *edges) const - { - const core::vector3d<T> middle = getCenter(); - const core::vector3d<T> diag = middle - MaxEdge; - - /* - Edges are stored in this way: - Hey, am I an ascii artist, or what? :) niko. - /3--------/7 - / | / | - / | / | - 1---------5 | - | /2- - -|- -6 - | / | / - |/ | / - 0---------4/ - */ - - edges[0].set(middle.X + diag.X, middle.Y + diag.Y, middle.Z + diag.Z); - edges[1].set(middle.X + diag.X, middle.Y - diag.Y, middle.Z + diag.Z); - edges[2].set(middle.X + diag.X, middle.Y + diag.Y, middle.Z - diag.Z); - edges[3].set(middle.X + diag.X, middle.Y - diag.Y, middle.Z - diag.Z); - edges[4].set(middle.X - diag.X, middle.Y + diag.Y, middle.Z + diag.Z); - edges[5].set(middle.X - diag.X, middle.Y - diag.Y, middle.Z + diag.Z); - edges[6].set(middle.X - diag.X, middle.Y + diag.Y, middle.Z - diag.Z); - edges[7].set(middle.X - diag.X, middle.Y - diag.Y, middle.Z - diag.Z); - } - - //! Repairs the box. - /** Necessary if for example MinEdge and MaxEdge are swapped. */ - void repair() - { - T t; - - if (MinEdge.X > MaxEdge.X) - { t=MinEdge.X; MinEdge.X = MaxEdge.X; MaxEdge.X=t; } - if (MinEdge.Y > MaxEdge.Y) - { t=MinEdge.Y; MinEdge.Y = MaxEdge.Y; MaxEdge.Y=t; } - if (MinEdge.Z > MaxEdge.Z) - { t=MinEdge.Z; MinEdge.Z = MaxEdge.Z; MaxEdge.Z=t; } - } - - //! Calculates a new interpolated bounding box. - /** d=0 returns other, d=1 returns this, all other values blend between - the two boxes. - \param other Other box to interpolate between - \param d Value between 0.0f and 1.0f. - \return Interpolated box. */ - aabbox3d<T> getInterpolated(const aabbox3d<T>& other, f32 d) const - { - f32 inv = 1.0f - d; - return aabbox3d<T>((other.MinEdge*inv) + (MinEdge*d), - (other.MaxEdge*inv) + (MaxEdge*d)); - } - - //! Determines if a point is within this box. - /** Border is included (IS part of the box)! - \param p: Point to check. - \return True if the point is within the box and false if not */ - bool isPointInside(const vector3d<T>& p) const - { - return (p.X >= MinEdge.X && p.X <= MaxEdge.X && - p.Y >= MinEdge.Y && p.Y <= MaxEdge.Y && - p.Z >= MinEdge.Z && p.Z <= MaxEdge.Z); - } - - //! Determines if a point is within this box and not its borders. - /** Border is excluded (NOT part of the box)! - \param p: Point to check. - \return True if the point is within the box and false if not. */ - bool isPointTotalInside(const vector3d<T>& p) const - { - return (p.X > MinEdge.X && p.X < MaxEdge.X && - p.Y > MinEdge.Y && p.Y < MaxEdge.Y && - p.Z > MinEdge.Z && p.Z < MaxEdge.Z); - } - - //! Check if this box is completely inside the 'other' box. - /** \param other: Other box to check against. - \return True if this box is completly inside the other box, - otherwise false. */ - bool isFullInside(const aabbox3d<T>& other) const - { - return (MinEdge.X >= other.MinEdge.X && MinEdge.Y >= other.MinEdge.Y && MinEdge.Z >= other.MinEdge.Z && - MaxEdge.X <= other.MaxEdge.X && MaxEdge.Y <= other.MaxEdge.Y && MaxEdge.Z <= other.MaxEdge.Z); - } - - //! Determines if the axis-aligned box intersects with another axis-aligned box. - /** \param other: Other box to check a intersection with. - \return True if there is an intersection with the other box, - otherwise false. */ - bool intersectsWithBox(const aabbox3d<T>& other) const - { - return (MinEdge.X <= other.MaxEdge.X && MinEdge.Y <= other.MaxEdge.Y && MinEdge.Z <= other.MaxEdge.Z && - MaxEdge.X >= other.MinEdge.X && MaxEdge.Y >= other.MinEdge.Y && MaxEdge.Z >= other.MinEdge.Z); - } - - //! Tests if the box intersects with a line - /** \param line: Line to test intersection with. - \return True if there is an intersection , else false. */ - bool intersectsWithLine(const line3d<T>& line) const - { - return intersectsWithLine(line.getMiddle(), line.getVector().normalize(), - (T)(line.getLength() * 0.5)); - } - - //! Tests if the box intersects with a line - /** \param linemiddle Center of the line. - \param linevect Vector of the line. - \param halflength Half length of the line. - \return True if there is an intersection, else false. */ - bool intersectsWithLine(const vector3d<T>& linemiddle, - const vector3d<T>& linevect, T halflength) const - { - const vector3d<T> e = getExtent() * (T)0.5; - const vector3d<T> t = getCenter() - linemiddle; - - if ((fabs(t.X) > e.X + halflength * fabs(linevect.X)) || - (fabs(t.Y) > e.Y + halflength * fabs(linevect.Y)) || - (fabs(t.Z) > e.Z + halflength * fabs(linevect.Z)) ) - return false; - - T r = e.Y * (T)fabs(linevect.Z) + e.Z * (T)fabs(linevect.Y); - if (fabs(t.Y*linevect.Z - t.Z*linevect.Y) > r ) - return false; - - r = e.X * (T)fabs(linevect.Z) + e.Z * (T)fabs(linevect.X); - if (fabs(t.Z*linevect.X - t.X*linevect.Z) > r ) - return false; - - r = e.X * (T)fabs(linevect.Y) + e.Y * (T)fabs(linevect.X); - if (fabs(t.X*linevect.Y - t.Y*linevect.X) > r) - return false; - - return true; - } - - //! Classifies a relation with a plane. - /** \param plane Plane to classify relation to. - \return Returns ISREL3D_FRONT if the box is in front of the plane, - ISREL3D_BACK if the box is behind the plane, and - ISREL3D_CLIPPED if it is on both sides of the plane. */ - EIntersectionRelation3D classifyPlaneRelation(const plane3d<T>& plane) const - { - vector3d<T> nearPoint(MaxEdge); - vector3d<T> farPoint(MinEdge); - - if (plane.Normal.X > (T)0) - { - nearPoint.X = MinEdge.X; - farPoint.X = MaxEdge.X; - } - - if (plane.Normal.Y > (T)0) - { - nearPoint.Y = MinEdge.Y; - farPoint.Y = MaxEdge.Y; - } - - if (plane.Normal.Z > (T)0) - { - nearPoint.Z = MinEdge.Z; - farPoint.Z = MaxEdge.Z; - } - - if (plane.Normal.dotProduct(nearPoint) + plane.D > (T)0) - return ISREL3D_FRONT; - - if (plane.Normal.dotProduct(farPoint) + plane.D > (T)0) - return ISREL3D_CLIPPED; - - return ISREL3D_BACK; - } - - //! The near edge - vector3d<T> MinEdge; - - //! The far edge - vector3d<T> MaxEdge; -}; - - //! Typedef for a f32 3d bounding box. - typedef aabbox3d<f32> aabbox3df; - //! Typedef for an integer 3d bounding box. - typedef aabbox3d<s32> aabbox3di; - -} // end namespace core -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/coreutil.h b/builddir/irrlicht-1.8.1/include/coreutil.h deleted file mode 100644 index eaf0097..0000000 --- a/builddir/irrlicht-1.8.1/include/coreutil.h +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_CORE_UTIL_H_INCLUDED__ -#define __IRR_CORE_UTIL_H_INCLUDED__ - -#include "irrString.h" -#include "path.h" - -namespace irr -{ -namespace core -{ - -/*! \file coreutil.h - \brief File containing useful basic utility functions -*/ - -// ----------- some basic quite often used string functions ----------------- - -//! search if a filename has a proper extension -inline s32 isFileExtension ( const io::path& filename, - const io::path& ext0, - const io::path& ext1, - const io::path& ext2) -{ - s32 extPos = filename.findLast ( '.' ); - if ( extPos < 0 ) - return 0; - - extPos += 1; - if ( filename.equals_substring_ignore_case ( ext0, extPos ) ) return 1; - if ( filename.equals_substring_ignore_case ( ext1, extPos ) ) return 2; - if ( filename.equals_substring_ignore_case ( ext2, extPos ) ) return 3; - return 0; -} - -//! search if a filename has a proper extension -inline bool hasFileExtension ( const io::path& filename, - const io::path& ext0, - const io::path& ext1 = "", - const io::path& ext2 = "") -{ - return isFileExtension ( filename, ext0, ext1, ext2 ) > 0; -} - -//! cut the filename extension from a source file path and store it in a dest file path -inline io::path& cutFilenameExtension ( io::path &dest, const io::path &source ) -{ - s32 endPos = source.findLast ( '.' ); - dest = source.subString ( 0, endPos < 0 ? source.size () : endPos ); - return dest; -} - -//! get the filename extension from a file path -inline io::path& getFileNameExtension ( io::path &dest, const io::path &source ) -{ - s32 endPos = source.findLast ( '.' ); - if ( endPos < 0 ) - dest = ""; - else - dest = source.subString ( endPos, source.size () ); - return dest; -} - -//! delete path from filename -inline io::path& deletePathFromFilename(io::path& filename) -{ - // delete path from filename - const fschar_t* s = filename.c_str(); - const fschar_t* p = s + filename.size(); - - // search for path separator or beginning - while ( *p != '/' && *p != '\\' && p != s ) - p--; - - if ( p != s ) - { - ++p; - filename = p; - } - return filename; -} - -//! trim paths -inline io::path& deletePathFromPath(io::path& filename, s32 pathCount) -{ - // delete path from filename - s32 i = filename.size(); - - // search for path separator or beginning - while ( i>=0 ) - { - if ( filename[i] == '/' || filename[i] == '\\' ) - { - if ( --pathCount <= 0 ) - break; - } - --i; - } - - if ( i>0 ) - { - filename [ i + 1 ] = 0; - filename.validate(); - } - else - filename=""; - return filename; -} - -//! looks if file is in the same directory of path. returns offset of directory. -//! 0 means in same directory. 1 means file is direct child of path -inline s32 isInSameDirectory ( const io::path& path, const io::path& file ) -{ - s32 subA = 0; - s32 subB = 0; - s32 pos; - - if ( path.size() && !path.equalsn ( file, path.size() ) ) - return -1; - - pos = 0; - while ( (pos = path.findNext ( '/', pos )) >= 0 ) - { - subA += 1; - pos += 1; - } - - pos = 0; - while ( (pos = file.findNext ( '/', pos )) >= 0 ) - { - subB += 1; - pos += 1; - } - - return subB - subA; -} - -// splits a path into components -static inline void splitFilename(const io::path &name, io::path* path=0, - io::path* filename=0, io::path* extension=0, bool make_lower=false) -{ - s32 i = name.size(); - s32 extpos = i; - - // search for path separator or beginning - while ( i >= 0 ) - { - if ( name[i] == '.' ) - { - extpos = i; - if ( extension ) - *extension = name.subString ( extpos + 1, name.size() - (extpos + 1), make_lower ); - } - else - if ( name[i] == '/' || name[i] == '\\' ) - { - if ( filename ) - *filename = name.subString ( i + 1, extpos - (i + 1), make_lower ); - if ( path ) - { - *path = name.subString ( 0, i + 1, make_lower ); - path->replace ( '\\', '/' ); - } - return; - } - i -= 1; - } - if ( filename ) - *filename = name.subString ( 0, extpos, make_lower ); -} - - -//! some standard function ( to remove dependencies ) -#undef isdigit -#undef isspace -#undef isupper -inline s32 isdigit(s32 c) { return c >= '0' && c <= '9'; } -inline s32 isspace(s32 c) { return c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v'; } -inline s32 isupper(s32 c) { return c >= 'A' && c <= 'Z'; } - - -} // end namespace core -} // end namespace irr - -#endif diff --git a/builddir/irrlicht-1.8.1/include/d3d8.h b/builddir/irrlicht-1.8.1/include/d3d8.h deleted file mode 100644 index f651135..0000000 --- a/builddir/irrlicht-1.8.1/include/d3d8.h +++ /dev/null @@ -1,1276 +0,0 @@ -/*==========================================================================; - * - * - * File: d3d8.h - * Content: Direct3D include file - * - ****************************************************************************/ - -#ifndef _D3D8_H_ -#define _D3D8_H_ - -#ifndef DIRECT3D_VERSION -#define DIRECT3D_VERSION 0x0800 -#endif //DIRECT3D_VERSION - -// include this file content only if compiling for DX8 interfaces -#if(DIRECT3D_VERSION >= 0x0800) - - -/* This identifier is passed to Direct3DCreate8 in order to ensure that an - * application was built against the correct header files. This number is - * incremented whenever a header (or other) change would require applications - * to be rebuilt. If the version doesn't match, Direct3DCreate8 will fail. - * (The number itself has no meaning.)*/ - -#define D3D_SDK_VERSION 120 - - -#include <stdlib.h> - -#define COM_NO_WINDOWS_H -#include <objbase.h> - -#include <windows.h> - -#if !defined(HMONITOR_DECLARED) && (WINVER < 0x0500) - #define HMONITOR_DECLARED - DECLARE_HANDLE(HMONITOR); -#endif - -#define D3DAPI WINAPI - -/* - * Interface IID's - */ -#if defined( _WIN32 ) && !defined( _NO_COM) - -/* IID_IDirect3D8 */ -/* {1DD9E8DA-1C77-4d40-B0CF-98FEFDFF9512} */ -DEFINE_GUID(IID_IDirect3D8, 0x1dd9e8da, 0x1c77, 0x4d40, 0xb0, 0xcf, 0x98, 0xfe, 0xfd, 0xff, 0x95, 0x12); - -/* IID_IDirect3DDevice8 */ -/* {7385E5DF-8FE8-41D5-86B6-D7B48547B6CF} */ -DEFINE_GUID(IID_IDirect3DDevice8, 0x7385e5df, 0x8fe8, 0x41d5, 0x86, 0xb6, 0xd7, 0xb4, 0x85, 0x47, 0xb6, 0xcf); - -/* IID_IDirect3DResource8 */ -/* {1B36BB7B-09B7-410a-B445-7D1430D7B33F} */ -DEFINE_GUID(IID_IDirect3DResource8, 0x1b36bb7b, 0x9b7, 0x410a, 0xb4, 0x45, 0x7d, 0x14, 0x30, 0xd7, 0xb3, 0x3f); - -/* IID_IDirect3DBaseTexture8 */ -/* {B4211CFA-51B9-4a9f-AB78-DB99B2BB678E} */ -DEFINE_GUID(IID_IDirect3DBaseTexture8, 0xb4211cfa, 0x51b9, 0x4a9f, 0xab, 0x78, 0xdb, 0x99, 0xb2, 0xbb, 0x67, 0x8e); - -/* IID_IDirect3DTexture8 */ -/* {E4CDD575-2866-4f01-B12E-7EECE1EC9358} */ -DEFINE_GUID(IID_IDirect3DTexture8, 0xe4cdd575, 0x2866, 0x4f01, 0xb1, 0x2e, 0x7e, 0xec, 0xe1, 0xec, 0x93, 0x58); - -/* IID_IDirect3DCubeTexture8 */ -/* {3EE5B968-2ACA-4c34-8BB5-7E0C3D19B750} */ -DEFINE_GUID(IID_IDirect3DCubeTexture8, 0x3ee5b968, 0x2aca, 0x4c34, 0x8b, 0xb5, 0x7e, 0x0c, 0x3d, 0x19, 0xb7, 0x50); - -/* IID_IDirect3DVolumeTexture8 */ -/* {4B8AAAFA-140F-42ba-9131-597EAFAA2EAD} */ -DEFINE_GUID(IID_IDirect3DVolumeTexture8, 0x4b8aaafa, 0x140f, 0x42ba, 0x91, 0x31, 0x59, 0x7e, 0xaf, 0xaa, 0x2e, 0xad); - -/* IID_IDirect3DVertexBuffer8 */ -/* {8AEEEAC7-05F9-44d4-B591-000B0DF1CB95} */ -DEFINE_GUID(IID_IDirect3DVertexBuffer8, 0x8aeeeac7, 0x05f9, 0x44d4, 0xb5, 0x91, 0x00, 0x0b, 0x0d, 0xf1, 0xcb, 0x95); - -/* IID_IDirect3DIndexBuffer8 */ -/* {0E689C9A-053D-44a0-9D92-DB0E3D750F86} */ -DEFINE_GUID(IID_IDirect3DIndexBuffer8, 0x0e689c9a, 0x053d, 0x44a0, 0x9d, 0x92, 0xdb, 0x0e, 0x3d, 0x75, 0x0f, 0x86); - -/* IID_IDirect3DSurface8 */ -/* {B96EEBCA-B326-4ea5-882F-2FF5BAE021DD} */ -DEFINE_GUID(IID_IDirect3DSurface8, 0xb96eebca, 0xb326, 0x4ea5, 0x88, 0x2f, 0x2f, 0xf5, 0xba, 0xe0, 0x21, 0xdd); - -/* IID_IDirect3DVolume8 */ -/* {BD7349F5-14F1-42e4-9C79-972380DB40C0} */ -DEFINE_GUID(IID_IDirect3DVolume8, 0xbd7349f5, 0x14f1, 0x42e4, 0x9c, 0x79, 0x97, 0x23, 0x80, 0xdb, 0x40, 0xc0); - -/* IID_IDirect3DSwapChain8 */ -/* {928C088B-76B9-4C6B-A536-A590853876CD} */ -DEFINE_GUID(IID_IDirect3DSwapChain8, 0x928c088b, 0x76b9, 0x4c6b, 0xa5, 0x36, 0xa5, 0x90, 0x85, 0x38, 0x76, 0xcd); - -#endif - -#ifdef __cplusplus - -interface IDirect3D8; -interface IDirect3DDevice8; - -interface IDirect3DResource8; -interface IDirect3DBaseTexture8; -interface IDirect3DTexture8; -interface IDirect3DVolumeTexture8; -interface IDirect3DCubeTexture8; - -interface IDirect3DVertexBuffer8; -interface IDirect3DIndexBuffer8; - -interface IDirect3DSurface8; -interface IDirect3DVolume8; - -interface IDirect3DSwapChain8; - -#endif - - -typedef interface IDirect3D8 IDirect3D8; -typedef interface IDirect3DDevice8 IDirect3DDevice8; -typedef interface IDirect3DResource8 IDirect3DResource8; -typedef interface IDirect3DBaseTexture8 IDirect3DBaseTexture8; -typedef interface IDirect3DTexture8 IDirect3DTexture8; -typedef interface IDirect3DVolumeTexture8 IDirect3DVolumeTexture8; -typedef interface IDirect3DCubeTexture8 IDirect3DCubeTexture8; -typedef interface IDirect3DVertexBuffer8 IDirect3DVertexBuffer8; -typedef interface IDirect3DIndexBuffer8 IDirect3DIndexBuffer8; -typedef interface IDirect3DSurface8 IDirect3DSurface8; -typedef interface IDirect3DVolume8 IDirect3DVolume8; -typedef interface IDirect3DSwapChain8 IDirect3DSwapChain8; - -#include "d3d8types.h" -#include "d3d8caps.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * DLL Function for creating a Direct3D8 object. This object supports - * enumeration and allows the creation of Direct3DDevice8 objects. - * Pass the value of the constant D3D_SDK_VERSION to this function, so - * that the run-time can validate that your application was compiled - * against the right headers. - */ - -IDirect3D8 * WINAPI Direct3DCreate8(UINT SDKVersion); - - -/* - * Direct3D interfaces - */ - - - - - - -#undef INTERFACE -#define INTERFACE IDirect3D8 - -DECLARE_INTERFACE_(IDirect3D8, IUnknown) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; - STDMETHOD_(ULONG,AddRef)(THIS) PURE; - STDMETHOD_(ULONG,Release)(THIS) PURE; - - /*** IDirect3D8 methods ***/ - STDMETHOD(RegisterSoftwareDevice)(THIS_ void* pInitializeFunction) PURE; - STDMETHOD_(UINT, GetAdapterCount)(THIS) PURE; - STDMETHOD(GetAdapterIdentifier)(THIS_ UINT Adapter,DWORD Flags,D3DADAPTER_IDENTIFIER8* pIdentifier) PURE; - STDMETHOD_(UINT, GetAdapterModeCount)(THIS_ UINT Adapter) PURE; - STDMETHOD(EnumAdapterModes)(THIS_ UINT Adapter,UINT Mode,D3DDISPLAYMODE* pMode) PURE; - STDMETHOD(GetAdapterDisplayMode)(THIS_ UINT Adapter,D3DDISPLAYMODE* pMode) PURE; - STDMETHOD(CheckDeviceType)(THIS_ UINT Adapter,D3DDEVTYPE CheckType,D3DFORMAT DisplayFormat,D3DFORMAT BackBufferFormat,BOOL Windowed) PURE; - STDMETHOD(CheckDeviceFormat)(THIS_ UINT Adapter,D3DDEVTYPE DeviceType,D3DFORMAT AdapterFormat,DWORD Usage,D3DRESOURCETYPE RType,D3DFORMAT CheckFormat) PURE; - STDMETHOD(CheckDeviceMultiSampleType)(THIS_ UINT Adapter,D3DDEVTYPE DeviceType,D3DFORMAT SurfaceFormat,BOOL Windowed,D3DMULTISAMPLE_TYPE MultiSampleType) PURE; - STDMETHOD(CheckDepthStencilMatch)(THIS_ UINT Adapter,D3DDEVTYPE DeviceType,D3DFORMAT AdapterFormat,D3DFORMAT RenderTargetFormat,D3DFORMAT DepthStencilFormat) PURE; - STDMETHOD(GetDeviceCaps)(THIS_ UINT Adapter,D3DDEVTYPE DeviceType,D3DCAPS8* pCaps) PURE; - STDMETHOD_(HMONITOR, GetAdapterMonitor)(THIS_ UINT Adapter) PURE; - STDMETHOD(CreateDevice)(THIS_ UINT Adapter,D3DDEVTYPE DeviceType,HWND hFocusWindow,DWORD BehaviorFlags,D3DPRESENT_PARAMETERS* pPresentationParameters,IDirect3DDevice8** ppReturnedDeviceInterface) PURE; -}; - -typedef struct IDirect3D8 *LPDIRECT3D8, *PDIRECT3D8; - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirect3D8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IDirect3D8_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirect3D8_Release(p) (p)->lpVtbl->Release(p) -#define IDirect3D8_RegisterSoftwareDevice(p,a) (p)->lpVtbl->RegisterSoftwareDevice(p,a) -#define IDirect3D8_GetAdapterCount(p) (p)->lpVtbl->GetAdapterCount(p) -#define IDirect3D8_GetAdapterIdentifier(p,a,b,c) (p)->lpVtbl->GetAdapterIdentifier(p,a,b,c) -#define IDirect3D8_GetAdapterModeCount(p,a) (p)->lpVtbl->GetAdapterModeCount(p,a) -#define IDirect3D8_EnumAdapterModes(p,a,b,c) (p)->lpVtbl->EnumAdapterModes(p,a,b,c) -#define IDirect3D8_GetAdapterDisplayMode(p,a,b) (p)->lpVtbl->GetAdapterDisplayMode(p,a,b) -#define IDirect3D8_CheckDeviceType(p,a,b,c,d,e) (p)->lpVtbl->CheckDeviceType(p,a,b,c,d,e) -#define IDirect3D8_CheckDeviceFormat(p,a,b,c,d,e,f) (p)->lpVtbl->CheckDeviceFormat(p,a,b,c,d,e,f) -#define IDirect3D8_CheckDeviceMultiSampleType(p,a,b,c,d,e) (p)->lpVtbl->CheckDeviceMultiSampleType(p,a,b,c,d,e) -#define IDirect3D8_CheckDepthStencilMatch(p,a,b,c,d,e) (p)->lpVtbl->CheckDepthStencilMatch(p,a,b,c,d,e) -#define IDirect3D8_GetDeviceCaps(p,a,b,c) (p)->lpVtbl->GetDeviceCaps(p,a,b,c) -#define IDirect3D8_GetAdapterMonitor(p,a) (p)->lpVtbl->GetAdapterMonitor(p,a) -#define IDirect3D8_CreateDevice(p,a,b,c,d,e,f) (p)->lpVtbl->CreateDevice(p,a,b,c,d,e,f) -#else -#define IDirect3D8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#define IDirect3D8_AddRef(p) (p)->AddRef() -#define IDirect3D8_Release(p) (p)->Release() -#define IDirect3D8_RegisterSoftwareDevice(p,a) (p)->RegisterSoftwareDevice(a) -#define IDirect3D8_GetAdapterCount(p) (p)->GetAdapterCount() -#define IDirect3D8_GetAdapterIdentifier(p,a,b,c) (p)->GetAdapterIdentifier(a,b,c) -#define IDirect3D8_GetAdapterModeCount(p,a) (p)->GetAdapterModeCount(a) -#define IDirect3D8_EnumAdapterModes(p,a,b,c) (p)->EnumAdapterModes(a,b,c) -#define IDirect3D8_GetAdapterDisplayMode(p,a,b) (p)->GetAdapterDisplayMode(a,b) -#define IDirect3D8_CheckDeviceType(p,a,b,c,d,e) (p)->CheckDeviceType(a,b,c,d,e) -#define IDirect3D8_CheckDeviceFormat(p,a,b,c,d,e,f) (p)->CheckDeviceFormat(a,b,c,d,e,f) -#define IDirect3D8_CheckDeviceMultiSampleType(p,a,b,c,d,e) (p)->CheckDeviceMultiSampleType(a,b,c,d,e) -#define IDirect3D8_CheckDepthStencilMatch(p,a,b,c,d,e) (p)->CheckDepthStencilMatch(a,b,c,d,e) -#define IDirect3D8_GetDeviceCaps(p,a,b,c) (p)->GetDeviceCaps(a,b,c) -#define IDirect3D8_GetAdapterMonitor(p,a) (p)->GetAdapterMonitor(a) -#define IDirect3D8_CreateDevice(p,a,b,c,d,e,f) (p)->CreateDevice(a,b,c,d,e,f) -#endif - - - - - - - - - - - - - - - - - - - -#undef INTERFACE -#define INTERFACE IDirect3DDevice8 - -DECLARE_INTERFACE_(IDirect3DDevice8, IUnknown) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; - STDMETHOD_(ULONG,AddRef)(THIS) PURE; - STDMETHOD_(ULONG,Release)(THIS) PURE; - - /*** IDirect3DDevice8 methods ***/ - STDMETHOD(TestCooperativeLevel)(THIS) PURE; - STDMETHOD_(UINT, GetAvailableTextureMem)(THIS) PURE; - STDMETHOD(ResourceManagerDiscardBytes)(THIS_ DWORD Bytes) PURE; - STDMETHOD(GetDirect3D)(THIS_ IDirect3D8** ppD3D8) PURE; - STDMETHOD(GetDeviceCaps)(THIS_ D3DCAPS8* pCaps) PURE; - STDMETHOD(GetDisplayMode)(THIS_ D3DDISPLAYMODE* pMode) PURE; - STDMETHOD(GetCreationParameters)(THIS_ D3DDEVICE_CREATION_PARAMETERS *pParameters) PURE; - STDMETHOD(SetCursorProperties)(THIS_ UINT XHotSpot,UINT YHotSpot,IDirect3DSurface8* pCursorBitmap) PURE; - STDMETHOD_(void, SetCursorPosition)(THIS_ UINT XScreenSpace,UINT YScreenSpace,DWORD Flags) PURE; - STDMETHOD_(BOOL, ShowCursor)(THIS_ BOOL bShow) PURE; - STDMETHOD(CreateAdditionalSwapChain)(THIS_ D3DPRESENT_PARAMETERS* pPresentationParameters,IDirect3DSwapChain8** pSwapChain) PURE; - STDMETHOD(Reset)(THIS_ D3DPRESENT_PARAMETERS* pPresentationParameters) PURE; - STDMETHOD(Present)(THIS_ CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion) PURE; - STDMETHOD(GetBackBuffer)(THIS_ UINT BackBuffer,D3DBACKBUFFER_TYPE Type,IDirect3DSurface8** ppBackBuffer) PURE; - STDMETHOD(GetRasterStatus)(THIS_ D3DRASTER_STATUS* pRasterStatus) PURE; - STDMETHOD_(void, SetGammaRamp)(THIS_ DWORD Flags,CONST D3DGAMMARAMP* pRamp) PURE; - STDMETHOD_(void, GetGammaRamp)(THIS_ D3DGAMMARAMP* pRamp) PURE; - STDMETHOD(CreateTexture)(THIS_ UINT Width,UINT Height,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DTexture8** ppTexture) PURE; - STDMETHOD(CreateVolumeTexture)(THIS_ UINT Width,UINT Height,UINT Depth,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DVolumeTexture8** ppVolumeTexture) PURE; - STDMETHOD(CreateCubeTexture)(THIS_ UINT EdgeLength,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DCubeTexture8** ppCubeTexture) PURE; - STDMETHOD(CreateVertexBuffer)(THIS_ UINT Length,DWORD Usage,DWORD FVF,D3DPOOL Pool,IDirect3DVertexBuffer8** ppVertexBuffer) PURE; - STDMETHOD(CreateIndexBuffer)(THIS_ UINT Length,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DIndexBuffer8** ppIndexBuffer) PURE; - STDMETHOD(CreateRenderTarget)(THIS_ UINT Width,UINT Height,D3DFORMAT Format,D3DMULTISAMPLE_TYPE MultiSample,BOOL Lockable,IDirect3DSurface8** ppSurface) PURE; - STDMETHOD(CreateDepthStencilSurface)(THIS_ UINT Width,UINT Height,D3DFORMAT Format,D3DMULTISAMPLE_TYPE MultiSample,IDirect3DSurface8** ppSurface) PURE; - STDMETHOD(CreateImageSurface)(THIS_ UINT Width,UINT Height,D3DFORMAT Format,IDirect3DSurface8** ppSurface) PURE; - STDMETHOD(CopyRects)(THIS_ IDirect3DSurface8* pSourceSurface,CONST RECT* pSourceRectsArray,UINT cRects,IDirect3DSurface8* pDestinationSurface,CONST POINT* pDestPointsArray) PURE; - STDMETHOD(UpdateTexture)(THIS_ IDirect3DBaseTexture8* pSourceTexture,IDirect3DBaseTexture8* pDestinationTexture) PURE; - STDMETHOD(GetFrontBuffer)(THIS_ IDirect3DSurface8* pDestSurface) PURE; - STDMETHOD(SetRenderTarget)(THIS_ IDirect3DSurface8* pRenderTarget,IDirect3DSurface8* pNewZStencil) PURE; - STDMETHOD(GetRenderTarget)(THIS_ IDirect3DSurface8** ppRenderTarget) PURE; - STDMETHOD(GetDepthStencilSurface)(THIS_ IDirect3DSurface8** ppZStencilSurface) PURE; - STDMETHOD(BeginScene)(THIS) PURE; - STDMETHOD(EndScene)(THIS) PURE; - STDMETHOD(Clear)(THIS_ DWORD Count,CONST D3DRECT* pRects,DWORD Flags,D3DCOLOR Color,float Z,DWORD Stencil) PURE; - STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE State,CONST D3DMATRIX* pMatrix) PURE; - STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE State,D3DMATRIX* pMatrix) PURE; - STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE,CONST D3DMATRIX*) PURE; - STDMETHOD(SetViewport)(THIS_ CONST D3DVIEWPORT8* pViewport) PURE; - STDMETHOD(GetViewport)(THIS_ D3DVIEWPORT8* pViewport) PURE; - STDMETHOD(SetMaterial)(THIS_ CONST D3DMATERIAL8* pMaterial) PURE; - STDMETHOD(GetMaterial)(THIS_ D3DMATERIAL8* pMaterial) PURE; - STDMETHOD(SetLight)(THIS_ DWORD Index,CONST D3DLIGHT8*) PURE; - STDMETHOD(GetLight)(THIS_ DWORD Index,D3DLIGHT8*) PURE; - STDMETHOD(LightEnable)(THIS_ DWORD Index,BOOL Enable) PURE; - STDMETHOD(GetLightEnable)(THIS_ DWORD Index,BOOL* pEnable) PURE; - STDMETHOD(SetClipPlane)(THIS_ DWORD Index,CONST float* pPlane) PURE; - STDMETHOD(GetClipPlane)(THIS_ DWORD Index,float* pPlane) PURE; - STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE State,DWORD Value) PURE; - STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE State,DWORD* pValue) PURE; - STDMETHOD(BeginStateBlock)(THIS) PURE; - STDMETHOD(EndStateBlock)(THIS_ DWORD* pToken) PURE; - STDMETHOD(ApplyStateBlock)(THIS_ DWORD Token) PURE; - STDMETHOD(CaptureStateBlock)(THIS_ DWORD Token) PURE; - STDMETHOD(DeleteStateBlock)(THIS_ DWORD Token) PURE; - STDMETHOD(CreateStateBlock)(THIS_ D3DSTATEBLOCKTYPE Type,DWORD* pToken) PURE; - STDMETHOD(SetClipStatus)(THIS_ CONST D3DCLIPSTATUS8* pClipStatus) PURE; - STDMETHOD(GetClipStatus)(THIS_ D3DCLIPSTATUS8* pClipStatus) PURE; - STDMETHOD(GetTexture)(THIS_ DWORD Stage,IDirect3DBaseTexture8** ppTexture) PURE; - STDMETHOD(SetTexture)(THIS_ DWORD Stage,IDirect3DBaseTexture8* pTexture) PURE; - STDMETHOD(GetTextureStageState)(THIS_ DWORD Stage,D3DTEXTURESTAGESTATETYPE Type,DWORD* pValue) PURE; - STDMETHOD(SetTextureStageState)(THIS_ DWORD Stage,D3DTEXTURESTAGESTATETYPE Type,DWORD Value) PURE; - STDMETHOD(ValidateDevice)(THIS_ DWORD* pNumPasses) PURE; - STDMETHOD(GetInfo)(THIS_ DWORD DevInfoID,void* pDevInfoStruct,DWORD DevInfoStructSize) PURE; - STDMETHOD(SetPaletteEntries)(THIS_ UINT PaletteNumber,CONST PALETTEENTRY* pEntries) PURE; - STDMETHOD(GetPaletteEntries)(THIS_ UINT PaletteNumber,PALETTEENTRY* pEntries) PURE; - STDMETHOD(SetCurrentTexturePalette)(THIS_ UINT PaletteNumber) PURE; - STDMETHOD(GetCurrentTexturePalette)(THIS_ UINT *PaletteNumber) PURE; - STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE PrimitiveType,UINT StartVertex,UINT PrimitiveCount) PURE; - STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE,UINT minIndex,UINT NumVertices,UINT startIndex,UINT primCount) PURE; - STDMETHOD(DrawPrimitiveUP)(THIS_ D3DPRIMITIVETYPE PrimitiveType,UINT PrimitiveCount,CONST void* pVertexStreamZeroData,UINT VertexStreamZeroStride) PURE; - STDMETHOD(DrawIndexedPrimitiveUP)(THIS_ D3DPRIMITIVETYPE PrimitiveType,UINT MinVertexIndex,UINT NumVertexIndices,UINT PrimitiveCount,CONST void* pIndexData,D3DFORMAT IndexDataFormat,CONST void* pVertexStreamZeroData,UINT VertexStreamZeroStride) PURE; - STDMETHOD(ProcessVertices)(THIS_ UINT SrcStartIndex,UINT DestIndex,UINT VertexCount,IDirect3DVertexBuffer8* pDestBuffer,DWORD Flags) PURE; - STDMETHOD(CreateVertexShader)(THIS_ CONST DWORD* pDeclaration,CONST DWORD* pFunction,DWORD* pHandle,DWORD Usage) PURE; - STDMETHOD(SetVertexShader)(THIS_ DWORD Handle) PURE; - STDMETHOD(GetVertexShader)(THIS_ DWORD* pHandle) PURE; - STDMETHOD(DeleteVertexShader)(THIS_ DWORD Handle) PURE; - STDMETHOD(SetVertexShaderConstant)(THIS_ DWORD Register,CONST void* pConstantData,DWORD ConstantCount) PURE; - STDMETHOD(GetVertexShaderConstant)(THIS_ DWORD Register,void* pConstantData,DWORD ConstantCount) PURE; - STDMETHOD(GetVertexShaderDeclaration)(THIS_ DWORD Handle,void* pData,DWORD* pSizeOfData) PURE; - STDMETHOD(GetVertexShaderFunction)(THIS_ DWORD Handle,void* pData,DWORD* pSizeOfData) PURE; - STDMETHOD(SetStreamSource)(THIS_ UINT StreamNumber,IDirect3DVertexBuffer8* pStreamData,UINT Stride) PURE; - STDMETHOD(GetStreamSource)(THIS_ UINT StreamNumber,IDirect3DVertexBuffer8** ppStreamData,UINT* pStride) PURE; - STDMETHOD(SetIndices)(THIS_ IDirect3DIndexBuffer8* pIndexData,UINT BaseVertexIndex) PURE; - STDMETHOD(GetIndices)(THIS_ IDirect3DIndexBuffer8** ppIndexData,UINT* pBaseVertexIndex) PURE; - STDMETHOD(CreatePixelShader)(THIS_ CONST DWORD* pFunction,DWORD* pHandle) PURE; - STDMETHOD(SetPixelShader)(THIS_ DWORD Handle) PURE; - STDMETHOD(GetPixelShader)(THIS_ DWORD* pHandle) PURE; - STDMETHOD(DeletePixelShader)(THIS_ DWORD Handle) PURE; - STDMETHOD(SetPixelShaderConstant)(THIS_ DWORD Register,CONST void* pConstantData,DWORD ConstantCount) PURE; - STDMETHOD(GetPixelShaderConstant)(THIS_ DWORD Register,void* pConstantData,DWORD ConstantCount) PURE; - STDMETHOD(GetPixelShaderFunction)(THIS_ DWORD Handle,void* pData,DWORD* pSizeOfData) PURE; - STDMETHOD(DrawRectPatch)(THIS_ UINT Handle,CONST float* pNumSegs,CONST D3DRECTPATCH_INFO* pRectPatchInfo) PURE; - STDMETHOD(DrawTriPatch)(THIS_ UINT Handle,CONST float* pNumSegs,CONST D3DTRIPATCH_INFO* pTriPatchInfo) PURE; - STDMETHOD(DeletePatch)(THIS_ UINT Handle) PURE; -}; - -typedef struct IDirect3DDevice8 *LPDIRECT3DDEVICE8, *PDIRECT3DDEVICE8; - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirect3DDevice8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IDirect3DDevice8_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirect3DDevice8_Release(p) (p)->lpVtbl->Release(p) -#define IDirect3DDevice8_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p) -#define IDirect3DDevice8_GetAvailableTextureMem(p) (p)->lpVtbl->GetAvailableTextureMem(p) -#define IDirect3DDevice8_ResourceManagerDiscardBytes(p,a) (p)->lpVtbl->ResourceManagerDiscardBytes(p,a) -#define IDirect3DDevice8_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a) -#define IDirect3DDevice8_GetDeviceCaps(p,a) (p)->lpVtbl->GetDeviceCaps(p,a) -#define IDirect3DDevice8_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a) -#define IDirect3DDevice8_GetCreationParameters(p,a) (p)->lpVtbl->GetCreationParameters(p,a) -#define IDirect3DDevice8_SetCursorProperties(p,a,b,c) (p)->lpVtbl->SetCursorProperties(p,a,b,c) -#define IDirect3DDevice8_SetCursorPosition(p,a,b,c) (p)->lpVtbl->SetCursorPosition(p,a,b,c) -#define IDirect3DDevice8_ShowCursor(p,a) (p)->lpVtbl->ShowCursor(p,a) -#define IDirect3DDevice8_CreateAdditionalSwapChain(p,a,b) (p)->lpVtbl->CreateAdditionalSwapChain(p,a,b) -#define IDirect3DDevice8_Reset(p,a) (p)->lpVtbl->Reset(p,a) -#define IDirect3DDevice8_Present(p,a,b,c,d) (p)->lpVtbl->Present(p,a,b,c,d) -#define IDirect3DDevice8_GetBackBuffer(p,a,b,c) (p)->lpVtbl->GetBackBuffer(p,a,b,c) -#define IDirect3DDevice8_GetRasterStatus(p,a) (p)->lpVtbl->GetRasterStatus(p,a) -#define IDirect3DDevice8_SetGammaRamp(p,a,b) (p)->lpVtbl->SetGammaRamp(p,a,b) -#define IDirect3DDevice8_GetGammaRamp(p,a) (p)->lpVtbl->GetGammaRamp(p,a) -#define IDirect3DDevice8_CreateTexture(p,a,b,c,d,e,f,g) (p)->lpVtbl->CreateTexture(p,a,b,c,d,e,f,g) -#define IDirect3DDevice8_CreateVolumeTexture(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->CreateVolumeTexture(p,a,b,c,d,e,f,g,h) -#define IDirect3DDevice8_CreateCubeTexture(p,a,b,c,d,e,f) (p)->lpVtbl->CreateCubeTexture(p,a,b,c,d,e,f) -#define IDirect3DDevice8_CreateVertexBuffer(p,a,b,c,d,e) (p)->lpVtbl->CreateVertexBuffer(p,a,b,c,d,e) -#define IDirect3DDevice8_CreateIndexBuffer(p,a,b,c,d,e) (p)->lpVtbl->CreateIndexBuffer(p,a,b,c,d,e) -#define IDirect3DDevice8_CreateRenderTarget(p,a,b,c,d,e,f) (p)->lpVtbl->CreateRenderTarget(p,a,b,c,d,e,f) -#define IDirect3DDevice8_CreateDepthStencilSurface(p,a,b,c,d,e) (p)->lpVtbl->CreateDepthStencilSurface(p,a,b,c,d,e) -#define IDirect3DDevice8_CreateImageSurface(p,a,b,c,d) (p)->lpVtbl->CreateImageSurface(p,a,b,c,d) -#define IDirect3DDevice8_CopyRects(p,a,b,c,d,e) (p)->lpVtbl->CopyRects(p,a,b,c,d,e) -#define IDirect3DDevice8_UpdateTexture(p,a,b) (p)->lpVtbl->UpdateTexture(p,a,b) -#define IDirect3DDevice8_GetFrontBuffer(p,a) (p)->lpVtbl->GetFrontBuffer(p,a) -#define IDirect3DDevice8_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b) -#define IDirect3DDevice8_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a) -#define IDirect3DDevice8_GetDepthStencilSurface(p,a) (p)->lpVtbl->GetDepthStencilSurface(p,a) -#define IDirect3DDevice8_BeginScene(p) (p)->lpVtbl->BeginScene(p) -#define IDirect3DDevice8_EndScene(p) (p)->lpVtbl->EndScene(p) -#define IDirect3DDevice8_Clear(p,a,b,c,d,e,f) (p)->lpVtbl->Clear(p,a,b,c,d,e,f) -#define IDirect3DDevice8_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b) -#define IDirect3DDevice8_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b) -#define IDirect3DDevice8_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b) -#define IDirect3DDevice8_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a) -#define IDirect3DDevice8_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a) -#define IDirect3DDevice8_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a) -#define IDirect3DDevice8_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a) -#define IDirect3DDevice8_SetLight(p,a,b) (p)->lpVtbl->SetLight(p,a,b) -#define IDirect3DDevice8_GetLight(p,a,b) (p)->lpVtbl->GetLight(p,a,b) -#define IDirect3DDevice8_LightEnable(p,a,b) (p)->lpVtbl->LightEnable(p,a,b) -#define IDirect3DDevice8_GetLightEnable(p,a,b) (p)->lpVtbl->GetLightEnable(p,a,b) -#define IDirect3DDevice8_SetClipPlane(p,a,b) (p)->lpVtbl->SetClipPlane(p,a,b) -#define IDirect3DDevice8_GetClipPlane(p,a,b) (p)->lpVtbl->GetClipPlane(p,a,b) -#define IDirect3DDevice8_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b) -#define IDirect3DDevice8_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b) -#define IDirect3DDevice8_BeginStateBlock(p) (p)->lpVtbl->BeginStateBlock(p) -#define IDirect3DDevice8_EndStateBlock(p,a) (p)->lpVtbl->EndStateBlock(p,a) -#define IDirect3DDevice8_ApplyStateBlock(p,a) (p)->lpVtbl->ApplyStateBlock(p,a) -#define IDirect3DDevice8_CaptureStateBlock(p,a) (p)->lpVtbl->CaptureStateBlock(p,a) -#define IDirect3DDevice8_DeleteStateBlock(p,a) (p)->lpVtbl->DeleteStateBlock(p,a) -#define IDirect3DDevice8_CreateStateBlock(p,a,b) (p)->lpVtbl->CreateStateBlock(p,a,b) -#define IDirect3DDevice8_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a) -#define IDirect3DDevice8_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a) -#define IDirect3DDevice8_GetTexture(p,a,b) (p)->lpVtbl->GetTexture(p,a,b) -#define IDirect3DDevice8_SetTexture(p,a,b) (p)->lpVtbl->SetTexture(p,a,b) -#define IDirect3DDevice8_GetTextureStageState(p,a,b,c) (p)->lpVtbl->GetTextureStageState(p,a,b,c) -#define IDirect3DDevice8_SetTextureStageState(p,a,b,c) (p)->lpVtbl->SetTextureStageState(p,a,b,c) -#define IDirect3DDevice8_ValidateDevice(p,a) (p)->lpVtbl->ValidateDevice(p,a) -#define IDirect3DDevice8_GetInfo(p,a,b,c) (p)->lpVtbl->GetInfo(p,a,b,c) -#define IDirect3DDevice8_SetPaletteEntries(p,a,b) (p)->lpVtbl->SetPaletteEntries(p,a,b) -#define IDirect3DDevice8_GetPaletteEntries(p,a,b) (p)->lpVtbl->GetPaletteEntries(p,a,b) -#define IDirect3DDevice8_SetCurrentTexturePalette(p,a) (p)->lpVtbl->SetCurrentTexturePalette(p,a) -#define IDirect3DDevice8_GetCurrentTexturePalette(p,a) (p)->lpVtbl->GetCurrentTexturePalette(p,a) -#define IDirect3DDevice8_DrawPrimitive(p,a,b,c) (p)->lpVtbl->DrawPrimitive(p,a,b,c) -#define IDirect3DDevice8_DrawIndexedPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e) -#define IDirect3DDevice8_DrawPrimitiveUP(p,a,b,c,d) (p)->lpVtbl->DrawPrimitiveUP(p,a,b,c,d) -#define IDirect3DDevice8_DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h) -#define IDirect3DDevice8_ProcessVertices(p,a,b,c,d,e) (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e) -#define IDirect3DDevice8_CreateVertexShader(p,a,b,c,d) (p)->lpVtbl->CreateVertexShader(p,a,b,c,d) -#define IDirect3DDevice8_SetVertexShader(p,a) (p)->lpVtbl->SetVertexShader(p,a) -#define IDirect3DDevice8_GetVertexShader(p,a) (p)->lpVtbl->GetVertexShader(p,a) -#define IDirect3DDevice8_DeleteVertexShader(p,a) (p)->lpVtbl->DeleteVertexShader(p,a) -#define IDirect3DDevice8_SetVertexShaderConstant(p,a,b,c) (p)->lpVtbl->SetVertexShaderConstant(p,a,b,c) -#define IDirect3DDevice8_GetVertexShaderConstant(p,a,b,c) (p)->lpVtbl->GetVertexShaderConstant(p,a,b,c) -#define IDirect3DDevice8_GetVertexShaderDeclaration(p,a,b,c) (p)->lpVtbl->GetVertexShaderDeclaration(p,a,b,c) -#define IDirect3DDevice8_GetVertexShaderFunction(p,a,b,c) (p)->lpVtbl->GetVertexShaderFunction(p,a,b,c) -#define IDirect3DDevice8_SetStreamSource(p,a,b,c) (p)->lpVtbl->SetStreamSource(p,a,b,c) -#define IDirect3DDevice8_GetStreamSource(p,a,b,c) (p)->lpVtbl->GetStreamSource(p,a,b,c) -#define IDirect3DDevice8_SetIndices(p,a,b) (p)->lpVtbl->SetIndices(p,a,b) -#define IDirect3DDevice8_GetIndices(p,a,b) (p)->lpVtbl->GetIndices(p,a,b) -#define IDirect3DDevice8_CreatePixelShader(p,a,b) (p)->lpVtbl->CreatePixelShader(p,a,b) -#define IDirect3DDevice8_SetPixelShader(p,a) (p)->lpVtbl->SetPixelShader(p,a) -#define IDirect3DDevice8_GetPixelShader(p,a) (p)->lpVtbl->GetPixelShader(p,a) -#define IDirect3DDevice8_DeletePixelShader(p,a) (p)->lpVtbl->DeletePixelShader(p,a) -#define IDirect3DDevice8_SetPixelShaderConstant(p,a,b,c) (p)->lpVtbl->SetPixelShaderConstant(p,a,b,c) -#define IDirect3DDevice8_GetPixelShaderConstant(p,a,b,c) (p)->lpVtbl->GetPixelShaderConstant(p,a,b,c) -#define IDirect3DDevice8_GetPixelShaderFunction(p,a,b,c) (p)->lpVtbl->GetPixelShaderFunction(p,a,b,c) -#define IDirect3DDevice8_DrawRectPatch(p,a,b,c) (p)->lpVtbl->DrawRectPatch(p,a,b,c) -#define IDirect3DDevice8_DrawTriPatch(p,a,b,c) (p)->lpVtbl->DrawTriPatch(p,a,b,c) -#define IDirect3DDevice8_DeletePatch(p,a) (p)->lpVtbl->DeletePatch(p,a) -#else -#define IDirect3DDevice8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#define IDirect3DDevice8_AddRef(p) (p)->AddRef() -#define IDirect3DDevice8_Release(p) (p)->Release() -#define IDirect3DDevice8_TestCooperativeLevel(p) (p)->TestCooperativeLevel() -#define IDirect3DDevice8_GetAvailableTextureMem(p) (p)->GetAvailableTextureMem() -#define IDirect3DDevice8_ResourceManagerDiscardBytes(p,a) (p)->ResourceManagerDiscardBytes(a) -#define IDirect3DDevice8_GetDirect3D(p,a) (p)->GetDirect3D(a) -#define IDirect3DDevice8_GetDeviceCaps(p,a) (p)->GetDeviceCaps(a) -#define IDirect3DDevice8_GetDisplayMode(p,a) (p)->GetDisplayMode(a) -#define IDirect3DDevice8_GetCreationParameters(p,a) (p)->GetCreationParameters(a) -#define IDirect3DDevice8_SetCursorProperties(p,a,b,c) (p)->SetCursorProperties(a,b,c) -#define IDirect3DDevice8_SetCursorPosition(p,a,b,c) (p)->SetCursorPosition(a,b,c) -#define IDirect3DDevice8_ShowCursor(p,a) (p)->ShowCursor(a) -#define IDirect3DDevice8_CreateAdditionalSwapChain(p,a,b) (p)->CreateAdditionalSwapChain(a,b) -#define IDirect3DDevice8_Reset(p,a) (p)->Reset(a) -#define IDirect3DDevice8_Present(p,a,b,c,d) (p)->Present(a,b,c,d) -#define IDirect3DDevice8_GetBackBuffer(p,a,b,c) (p)->GetBackBuffer(a,b,c) -#define IDirect3DDevice8_GetRasterStatus(p,a) (p)->GetRasterStatus(a) -#define IDirect3DDevice8_SetGammaRamp(p,a,b) (p)->SetGammaRamp(a,b) -#define IDirect3DDevice8_GetGammaRamp(p,a) (p)->GetGammaRamp(a) -#define IDirect3DDevice8_CreateTexture(p,a,b,c,d,e,f,g) (p)->CreateTexture(a,b,c,d,e,f,g) -#define IDirect3DDevice8_CreateVolumeTexture(p,a,b,c,d,e,f,g,h) (p)->CreateVolumeTexture(a,b,c,d,e,f,g,h) -#define IDirect3DDevice8_CreateCubeTexture(p,a,b,c,d,e,f) (p)->CreateCubeTexture(a,b,c,d,e,f) -#define IDirect3DDevice8_CreateVertexBuffer(p,a,b,c,d,e) (p)->CreateVertexBuffer(a,b,c,d,e) -#define IDirect3DDevice8_CreateIndexBuffer(p,a,b,c,d,e) (p)->CreateIndexBuffer(a,b,c,d,e) -#define IDirect3DDevice8_CreateRenderTarget(p,a,b,c,d,e,f) (p)->CreateRenderTarget(a,b,c,d,e,f) -#define IDirect3DDevice8_CreateDepthStencilSurface(p,a,b,c,d,e) (p)->CreateDepthStencilSurface(a,b,c,d,e) -#define IDirect3DDevice8_CreateImageSurface(p,a,b,c,d) (p)->CreateImageSurface(a,b,c,d) -#define IDirect3DDevice8_CopyRects(p,a,b,c,d,e) (p)->CopyRects(a,b,c,d,e) -#define IDirect3DDevice8_UpdateTexture(p,a,b) (p)->UpdateTexture(a,b) -#define IDirect3DDevice8_GetFrontBuffer(p,a) (p)->GetFrontBuffer(a) -#define IDirect3DDevice8_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b) -#define IDirect3DDevice8_GetRenderTarget(p,a) (p)->GetRenderTarget(a) -#define IDirect3DDevice8_GetDepthStencilSurface(p,a) (p)->GetDepthStencilSurface(a) -#define IDirect3DDevice8_BeginScene(p) (p)->BeginScene() -#define IDirect3DDevice8_EndScene(p) (p)->EndScene() -#define IDirect3DDevice8_Clear(p,a,b,c,d,e,f) (p)->Clear(a,b,c,d,e,f) -#define IDirect3DDevice8_SetTransform(p,a,b) (p)->SetTransform(a,b) -#define IDirect3DDevice8_GetTransform(p,a,b) (p)->GetTransform(a,b) -#define IDirect3DDevice8_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b) -#define IDirect3DDevice8_SetViewport(p,a) (p)->SetViewport(a) -#define IDirect3DDevice8_GetViewport(p,a) (p)->GetViewport(a) -#define IDirect3DDevice8_SetMaterial(p,a) (p)->SetMaterial(a) -#define IDirect3DDevice8_GetMaterial(p,a) (p)->GetMaterial(a) -#define IDirect3DDevice8_SetLight(p,a,b) (p)->SetLight(a,b) -#define IDirect3DDevice8_GetLight(p,a,b) (p)->GetLight(a,b) -#define IDirect3DDevice8_LightEnable(p,a,b) (p)->LightEnable(a,b) -#define IDirect3DDevice8_GetLightEnable(p,a,b) (p)->GetLightEnable(a,b) -#define IDirect3DDevice8_SetClipPlane(p,a,b) (p)->SetClipPlane(a,b) -#define IDirect3DDevice8_GetClipPlane(p,a,b) (p)->GetClipPlane(a,b) -#define IDirect3DDevice8_SetRenderState(p,a,b) (p)->SetRenderState(a,b) -#define IDirect3DDevice8_GetRenderState(p,a,b) (p)->GetRenderState(a,b) -#define IDirect3DDevice8_BeginStateBlock(p) (p)->BeginStateBlock() -#define IDirect3DDevice8_EndStateBlock(p,a) (p)->EndStateBlock(a) -#define IDirect3DDevice8_ApplyStateBlock(p,a) (p)->ApplyStateBlock(a) -#define IDirect3DDevice8_CaptureStateBlock(p,a) (p)->CaptureStateBlock(a) -#define IDirect3DDevice8_DeleteStateBlock(p,a) (p)->DeleteStateBlock(a) -#define IDirect3DDevice8_CreateStateBlock(p,a,b) (p)->CreateStateBlock(a,b) -#define IDirect3DDevice8_SetClipStatus(p,a) (p)->SetClipStatus(a) -#define IDirect3DDevice8_GetClipStatus(p,a) (p)->GetClipStatus(a) -#define IDirect3DDevice8_GetTexture(p,a,b) (p)->GetTexture(a,b) -#define IDirect3DDevice8_SetTexture(p,a,b) (p)->SetTexture(a,b) -#define IDirect3DDevice8_GetTextureStageState(p,a,b,c) (p)->GetTextureStageState(a,b,c) -#define IDirect3DDevice8_SetTextureStageState(p,a,b,c) (p)->SetTextureStageState(a,b,c) -#define IDirect3DDevice8_ValidateDevice(p,a) (p)->ValidateDevice(a) -#define IDirect3DDevice8_GetInfo(p,a,b,c) (p)->GetInfo(a,b,c) -#define IDirect3DDevice8_SetPaletteEntries(p,a,b) (p)->SetPaletteEntries(a,b) -#define IDirect3DDevice8_GetPaletteEntries(p,a,b) (p)->GetPaletteEntries(a,b) -#define IDirect3DDevice8_SetCurrentTexturePalette(p,a) (p)->SetCurrentTexturePalette(a) -#define IDirect3DDevice8_GetCurrentTexturePalette(p,a) (p)->GetCurrentTexturePalette(a) -#define IDirect3DDevice8_DrawPrimitive(p,a,b,c) (p)->DrawPrimitive(a,b,c) -#define IDirect3DDevice8_DrawIndexedPrimitive(p,a,b,c,d,e) (p)->DrawIndexedPrimitive(a,b,c,d,e) -#define IDirect3DDevice8_DrawPrimitiveUP(p,a,b,c,d) (p)->DrawPrimitiveUP(a,b,c,d) -#define IDirect3DDevice8_DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h) (p)->DrawIndexedPrimitiveUP(a,b,c,d,e,f,g,h) -#define IDirect3DDevice8_ProcessVertices(p,a,b,c,d,e) (p)->ProcessVertices(a,b,c,d,e) -#define IDirect3DDevice8_CreateVertexShader(p,a,b,c,d) (p)->CreateVertexShader(a,b,c,d) -#define IDirect3DDevice8_SetVertexShader(p,a) (p)->SetVertexShader(a) -#define IDirect3DDevice8_GetVertexShader(p,a) (p)->GetVertexShader(a) -#define IDirect3DDevice8_DeleteVertexShader(p,a) (p)->DeleteVertexShader(a) -#define IDirect3DDevice8_SetVertexShaderConstant(p,a,b,c) (p)->SetVertexShaderConstant(a,b,c) -#define IDirect3DDevice8_GetVertexShaderConstant(p,a,b,c) (p)->GetVertexShaderConstant(a,b,c) -#define IDirect3DDevice8_GetVertexShaderDeclaration(p,a,b,c) (p)->GetVertexShaderDeclaration(a,b,c) -#define IDirect3DDevice8_GetVertexShaderFunction(p,a,b,c) (p)->GetVertexShaderFunction(a,b,c) -#define IDirect3DDevice8_SetStreamSource(p,a,b,c) (p)->SetStreamSource(a,b,c) -#define IDirect3DDevice8_GetStreamSource(p,a,b,c) (p)->GetStreamSource(a,b,c) -#define IDirect3DDevice8_SetIndices(p,a,b) (p)->SetIndices(a,b) -#define IDirect3DDevice8_GetIndices(p,a,b) (p)->GetIndices(a,b) -#define IDirect3DDevice8_CreatePixelShader(p,a,b) (p)->CreatePixelShader(a,b) -#define IDirect3DDevice8_SetPixelShader(p,a) (p)->SetPixelShader(a) -#define IDirect3DDevice8_GetPixelShader(p,a) (p)->GetPixelShader(a) -#define IDirect3DDevice8_DeletePixelShader(p,a) (p)->DeletePixelShader(a) -#define IDirect3DDevice8_SetPixelShaderConstant(p,a,b,c) (p)->SetPixelShaderConstant(a,b,c) -#define IDirect3DDevice8_GetPixelShaderConstant(p,a,b,c) (p)->GetPixelShaderConstant(a,b,c) -#define IDirect3DDevice8_GetPixelShaderFunction(p,a,b,c) (p)->GetPixelShaderFunction(a,b,c) -#define IDirect3DDevice8_DrawRectPatch(p,a,b,c) (p)->DrawRectPatch(a,b,c) -#define IDirect3DDevice8_DrawTriPatch(p,a,b,c) (p)->DrawTriPatch(a,b,c) -#define IDirect3DDevice8_DeletePatch(p,a) (p)->DeletePatch(a) -#endif - - - -#undef INTERFACE -#define INTERFACE IDirect3DSwapChain8 - -DECLARE_INTERFACE_(IDirect3DSwapChain8, IUnknown) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; - STDMETHOD_(ULONG,AddRef)(THIS) PURE; - STDMETHOD_(ULONG,Release)(THIS) PURE; - - /*** IDirect3DSwapChain8 methods ***/ - STDMETHOD(Present)(THIS_ CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion) PURE; - STDMETHOD(GetBackBuffer)(THIS_ UINT BackBuffer,D3DBACKBUFFER_TYPE Type,IDirect3DSurface8** ppBackBuffer) PURE; -}; - -typedef struct IDirect3DSwapChain8 *LPDIRECT3DSWAPCHAIN8, *PDIRECT3DSWAPCHAIN8; - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirect3DSwapChain8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IDirect3DSwapChain8_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirect3DSwapChain8_Release(p) (p)->lpVtbl->Release(p) -#define IDirect3DSwapChain8_Present(p,a,b,c,d) (p)->lpVtbl->Present(p,a,b,c,d) -#define IDirect3DSwapChain8_GetBackBuffer(p,a,b,c) (p)->lpVtbl->GetBackBuffer(p,a,b,c) -#else -#define IDirect3DSwapChain8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#define IDirect3DSwapChain8_AddRef(p) (p)->AddRef() -#define IDirect3DSwapChain8_Release(p) (p)->Release() -#define IDirect3DSwapChain8_Present(p,a,b,c,d) (p)->Present(a,b,c,d) -#define IDirect3DSwapChain8_GetBackBuffer(p,a,b,c) (p)->GetBackBuffer(a,b,c) -#endif - - - -#undef INTERFACE -#define INTERFACE IDirect3DResource8 - -DECLARE_INTERFACE_(IDirect3DResource8, IUnknown) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; - STDMETHOD_(ULONG,AddRef)(THIS) PURE; - STDMETHOD_(ULONG,Release)(THIS) PURE; - - /*** IDirect3DResource8 methods ***/ - STDMETHOD(GetDevice)(THIS_ IDirect3DDevice8** ppDevice) PURE; - STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags) PURE; - STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData) PURE; - STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE; - STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE; - STDMETHOD_(DWORD, GetPriority)(THIS) PURE; - STDMETHOD_(void, PreLoad)(THIS) PURE; - STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE; -}; - -typedef struct IDirect3DResource8 *LPDIRECT3DRESOURCE8, *PDIRECT3DRESOURCE8; - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirect3DResource8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IDirect3DResource8_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirect3DResource8_Release(p) (p)->lpVtbl->Release(p) -#define IDirect3DResource8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a) -#define IDirect3DResource8_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) -#define IDirect3DResource8_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) -#define IDirect3DResource8_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) -#define IDirect3DResource8_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a) -#define IDirect3DResource8_GetPriority(p) (p)->lpVtbl->GetPriority(p) -#define IDirect3DResource8_PreLoad(p) (p)->lpVtbl->PreLoad(p) -#define IDirect3DResource8_GetType(p) (p)->lpVtbl->GetType(p) -#else -#define IDirect3DResource8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#define IDirect3DResource8_AddRef(p) (p)->AddRef() -#define IDirect3DResource8_Release(p) (p)->Release() -#define IDirect3DResource8_GetDevice(p,a) (p)->GetDevice(a) -#define IDirect3DResource8_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) -#define IDirect3DResource8_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) -#define IDirect3DResource8_FreePrivateData(p,a) (p)->FreePrivateData(a) -#define IDirect3DResource8_SetPriority(p,a) (p)->SetPriority(a) -#define IDirect3DResource8_GetPriority(p) (p)->GetPriority() -#define IDirect3DResource8_PreLoad(p) (p)->PreLoad() -#define IDirect3DResource8_GetType(p) (p)->GetType() -#endif - - - - -#undef INTERFACE -#define INTERFACE IDirect3DBaseTexture8 - -DECLARE_INTERFACE_(IDirect3DBaseTexture8, IDirect3DResource8) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; - STDMETHOD_(ULONG,AddRef)(THIS) PURE; - STDMETHOD_(ULONG,Release)(THIS) PURE; - - /*** IDirect3DResource8 methods ***/ - STDMETHOD(GetDevice)(THIS_ IDirect3DDevice8** ppDevice) PURE; - STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags) PURE; - STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData) PURE; - STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE; - STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE; - STDMETHOD_(DWORD, GetPriority)(THIS) PURE; - STDMETHOD_(void, PreLoad)(THIS) PURE; - STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE; - STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE; - STDMETHOD_(DWORD, GetLOD)(THIS) PURE; - STDMETHOD_(DWORD, GetLevelCount)(THIS) PURE; -}; - -typedef struct IDirect3DBaseTexture8 *LPDIRECT3DBASETEXTURE8, *PDIRECT3DBASETEXTURE8; - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirect3DBaseTexture8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IDirect3DBaseTexture8_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirect3DBaseTexture8_Release(p) (p)->lpVtbl->Release(p) -#define IDirect3DBaseTexture8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a) -#define IDirect3DBaseTexture8_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) -#define IDirect3DBaseTexture8_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) -#define IDirect3DBaseTexture8_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) -#define IDirect3DBaseTexture8_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a) -#define IDirect3DBaseTexture8_GetPriority(p) (p)->lpVtbl->GetPriority(p) -#define IDirect3DBaseTexture8_PreLoad(p) (p)->lpVtbl->PreLoad(p) -#define IDirect3DBaseTexture8_GetType(p) (p)->lpVtbl->GetType(p) -#define IDirect3DBaseTexture8_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a) -#define IDirect3DBaseTexture8_GetLOD(p) (p)->lpVtbl->GetLOD(p) -#define IDirect3DBaseTexture8_GetLevelCount(p) (p)->lpVtbl->GetLevelCount(p) -#else -#define IDirect3DBaseTexture8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#define IDirect3DBaseTexture8_AddRef(p) (p)->AddRef() -#define IDirect3DBaseTexture8_Release(p) (p)->Release() -#define IDirect3DBaseTexture8_GetDevice(p,a) (p)->GetDevice(a) -#define IDirect3DBaseTexture8_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) -#define IDirect3DBaseTexture8_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) -#define IDirect3DBaseTexture8_FreePrivateData(p,a) (p)->FreePrivateData(a) -#define IDirect3DBaseTexture8_SetPriority(p,a) (p)->SetPriority(a) -#define IDirect3DBaseTexture8_GetPriority(p) (p)->GetPriority() -#define IDirect3DBaseTexture8_PreLoad(p) (p)->PreLoad() -#define IDirect3DBaseTexture8_GetType(p) (p)->GetType() -#define IDirect3DBaseTexture8_SetLOD(p,a) (p)->SetLOD(a) -#define IDirect3DBaseTexture8_GetLOD(p) (p)->GetLOD() -#define IDirect3DBaseTexture8_GetLevelCount(p) (p)->GetLevelCount() -#endif - - - - - -#undef INTERFACE -#define INTERFACE IDirect3DTexture8 - -DECLARE_INTERFACE_(IDirect3DTexture8, IDirect3DBaseTexture8) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; - STDMETHOD_(ULONG,AddRef)(THIS) PURE; - STDMETHOD_(ULONG,Release)(THIS) PURE; - - /*** IDirect3DBaseTexture8 methods ***/ - STDMETHOD(GetDevice)(THIS_ IDirect3DDevice8** ppDevice) PURE; - STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags) PURE; - STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData) PURE; - STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE; - STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE; - STDMETHOD_(DWORD, GetPriority)(THIS) PURE; - STDMETHOD_(void, PreLoad)(THIS) PURE; - STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE; - STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE; - STDMETHOD_(DWORD, GetLOD)(THIS) PURE; - STDMETHOD_(DWORD, GetLevelCount)(THIS) PURE; - STDMETHOD(GetLevelDesc)(THIS_ UINT Level,D3DSURFACE_DESC *pDesc) PURE; - STDMETHOD(GetSurfaceLevel)(THIS_ UINT Level,IDirect3DSurface8** ppSurfaceLevel) PURE; - STDMETHOD(LockRect)(THIS_ UINT Level,D3DLOCKED_RECT* pLockedRect,CONST RECT* pRect,DWORD Flags) PURE; - STDMETHOD(UnlockRect)(THIS_ UINT Level) PURE; - STDMETHOD(AddDirtyRect)(THIS_ CONST RECT* pDirtyRect) PURE; -}; - -typedef struct IDirect3DTexture8 *LPDIRECT3DTEXTURE8, *PDIRECT3DTEXTURE8; - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirect3DTexture8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IDirect3DTexture8_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirect3DTexture8_Release(p) (p)->lpVtbl->Release(p) -#define IDirect3DTexture8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a) -#define IDirect3DTexture8_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) -#define IDirect3DTexture8_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) -#define IDirect3DTexture8_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) -#define IDirect3DTexture8_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a) -#define IDirect3DTexture8_GetPriority(p) (p)->lpVtbl->GetPriority(p) -#define IDirect3DTexture8_PreLoad(p) (p)->lpVtbl->PreLoad(p) -#define IDirect3DTexture8_GetType(p) (p)->lpVtbl->GetType(p) -#define IDirect3DTexture8_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a) -#define IDirect3DTexture8_GetLOD(p) (p)->lpVtbl->GetLOD(p) -#define IDirect3DTexture8_GetLevelCount(p) (p)->lpVtbl->GetLevelCount(p) -#define IDirect3DTexture8_GetLevelDesc(p,a,b) (p)->lpVtbl->GetLevelDesc(p,a,b) -#define IDirect3DTexture8_GetSurfaceLevel(p,a,b) (p)->lpVtbl->GetSurfaceLevel(p,a,b) -#define IDirect3DTexture8_LockRect(p,a,b,c,d) (p)->lpVtbl->LockRect(p,a,b,c,d) -#define IDirect3DTexture8_UnlockRect(p,a) (p)->lpVtbl->UnlockRect(p,a) -#define IDirect3DTexture8_AddDirtyRect(p,a) (p)->lpVtbl->AddDirtyRect(p,a) -#else -#define IDirect3DTexture8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#define IDirect3DTexture8_AddRef(p) (p)->AddRef() -#define IDirect3DTexture8_Release(p) (p)->Release() -#define IDirect3DTexture8_GetDevice(p,a) (p)->GetDevice(a) -#define IDirect3DTexture8_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) -#define IDirect3DTexture8_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) -#define IDirect3DTexture8_FreePrivateData(p,a) (p)->FreePrivateData(a) -#define IDirect3DTexture8_SetPriority(p,a) (p)->SetPriority(a) -#define IDirect3DTexture8_GetPriority(p) (p)->GetPriority() -#define IDirect3DTexture8_PreLoad(p) (p)->PreLoad() -#define IDirect3DTexture8_GetType(p) (p)->GetType() -#define IDirect3DTexture8_SetLOD(p,a) (p)->SetLOD(a) -#define IDirect3DTexture8_GetLOD(p) (p)->GetLOD() -#define IDirect3DTexture8_GetLevelCount(p) (p)->GetLevelCount() -#define IDirect3DTexture8_GetLevelDesc(p,a,b) (p)->GetLevelDesc(a,b) -#define IDirect3DTexture8_GetSurfaceLevel(p,a,b) (p)->GetSurfaceLevel(a,b) -#define IDirect3DTexture8_LockRect(p,a,b,c,d) (p)->LockRect(a,b,c,d) -#define IDirect3DTexture8_UnlockRect(p,a) (p)->UnlockRect(a) -#define IDirect3DTexture8_AddDirtyRect(p,a) (p)->AddDirtyRect(a) -#endif - - - - - -#undef INTERFACE -#define INTERFACE IDirect3DVolumeTexture8 - -DECLARE_INTERFACE_(IDirect3DVolumeTexture8, IDirect3DBaseTexture8) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; - STDMETHOD_(ULONG,AddRef)(THIS) PURE; - STDMETHOD_(ULONG,Release)(THIS) PURE; - - /*** IDirect3DBaseTexture8 methods ***/ - STDMETHOD(GetDevice)(THIS_ IDirect3DDevice8** ppDevice) PURE; - STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags) PURE; - STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData) PURE; - STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE; - STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE; - STDMETHOD_(DWORD, GetPriority)(THIS) PURE; - STDMETHOD_(void, PreLoad)(THIS) PURE; - STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE; - STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE; - STDMETHOD_(DWORD, GetLOD)(THIS) PURE; - STDMETHOD_(DWORD, GetLevelCount)(THIS) PURE; - STDMETHOD(GetLevelDesc)(THIS_ UINT Level,D3DVOLUME_DESC *pDesc) PURE; - STDMETHOD(GetVolumeLevel)(THIS_ UINT Level,IDirect3DVolume8** ppVolumeLevel) PURE; - STDMETHOD(LockBox)(THIS_ UINT Level,D3DLOCKED_BOX* pLockedVolume,CONST D3DBOX* pBox,DWORD Flags) PURE; - STDMETHOD(UnlockBox)(THIS_ UINT Level) PURE; - STDMETHOD(AddDirtyBox)(THIS_ CONST D3DBOX* pDirtyBox) PURE; -}; - -typedef struct IDirect3DVolumeTexture8 *LPDIRECT3DVOLUMETEXTURE8, *PDIRECT3DVOLUMETEXTURE8; - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirect3DVolumeTexture8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IDirect3DVolumeTexture8_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirect3DVolumeTexture8_Release(p) (p)->lpVtbl->Release(p) -#define IDirect3DVolumeTexture8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a) -#define IDirect3DVolumeTexture8_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) -#define IDirect3DVolumeTexture8_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) -#define IDirect3DVolumeTexture8_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) -#define IDirect3DVolumeTexture8_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a) -#define IDirect3DVolumeTexture8_GetPriority(p) (p)->lpVtbl->GetPriority(p) -#define IDirect3DVolumeTexture8_PreLoad(p) (p)->lpVtbl->PreLoad(p) -#define IDirect3DVolumeTexture8_GetType(p) (p)->lpVtbl->GetType(p) -#define IDirect3DVolumeTexture8_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a) -#define IDirect3DVolumeTexture8_GetLOD(p) (p)->lpVtbl->GetLOD(p) -#define IDirect3DVolumeTexture8_GetLevelCount(p) (p)->lpVtbl->GetLevelCount(p) -#define IDirect3DVolumeTexture8_GetLevelDesc(p,a,b) (p)->lpVtbl->GetLevelDesc(p,a,b) -#define IDirect3DVolumeTexture8_GetVolumeLevel(p,a,b) (p)->lpVtbl->GetVolumeLevel(p,a,b) -#define IDirect3DVolumeTexture8_LockBox(p,a,b,c,d) (p)->lpVtbl->LockBox(p,a,b,c,d) -#define IDirect3DVolumeTexture8_UnlockBox(p,a) (p)->lpVtbl->UnlockBox(p,a) -#define IDirect3DVolumeTexture8_AddDirtyBox(p,a) (p)->lpVtbl->AddDirtyBox(p,a) -#else -#define IDirect3DVolumeTexture8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#define IDirect3DVolumeTexture8_AddRef(p) (p)->AddRef() -#define IDirect3DVolumeTexture8_Release(p) (p)->Release() -#define IDirect3DVolumeTexture8_GetDevice(p,a) (p)->GetDevice(a) -#define IDirect3DVolumeTexture8_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) -#define IDirect3DVolumeTexture8_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) -#define IDirect3DVolumeTexture8_FreePrivateData(p,a) (p)->FreePrivateData(a) -#define IDirect3DVolumeTexture8_SetPriority(p,a) (p)->SetPriority(a) -#define IDirect3DVolumeTexture8_GetPriority(p) (p)->GetPriority() -#define IDirect3DVolumeTexture8_PreLoad(p) (p)->PreLoad() -#define IDirect3DVolumeTexture8_GetType(p) (p)->GetType() -#define IDirect3DVolumeTexture8_SetLOD(p,a) (p)->SetLOD(a) -#define IDirect3DVolumeTexture8_GetLOD(p) (p)->GetLOD() -#define IDirect3DVolumeTexture8_GetLevelCount(p) (p)->GetLevelCount() -#define IDirect3DVolumeTexture8_GetLevelDesc(p,a,b) (p)->GetLevelDesc(a,b) -#define IDirect3DVolumeTexture8_GetVolumeLevel(p,a,b) (p)->GetVolumeLevel(a,b) -#define IDirect3DVolumeTexture8_LockBox(p,a,b,c,d) (p)->LockBox(a,b,c,d) -#define IDirect3DVolumeTexture8_UnlockBox(p,a) (p)->UnlockBox(a) -#define IDirect3DVolumeTexture8_AddDirtyBox(p,a) (p)->AddDirtyBox(a) -#endif - - - - - -#undef INTERFACE -#define INTERFACE IDirect3DCubeTexture8 - -DECLARE_INTERFACE_(IDirect3DCubeTexture8, IDirect3DBaseTexture8) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; - STDMETHOD_(ULONG,AddRef)(THIS) PURE; - STDMETHOD_(ULONG,Release)(THIS) PURE; - - /*** IDirect3DBaseTexture8 methods ***/ - STDMETHOD(GetDevice)(THIS_ IDirect3DDevice8** ppDevice) PURE; - STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags) PURE; - STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData) PURE; - STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE; - STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE; - STDMETHOD_(DWORD, GetPriority)(THIS) PURE; - STDMETHOD_(void, PreLoad)(THIS) PURE; - STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE; - STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE; - STDMETHOD_(DWORD, GetLOD)(THIS) PURE; - STDMETHOD_(DWORD, GetLevelCount)(THIS) PURE; - STDMETHOD(GetLevelDesc)(THIS_ UINT Level,D3DSURFACE_DESC *pDesc) PURE; - STDMETHOD(GetCubeMapSurface)(THIS_ D3DCUBEMAP_FACES FaceType,UINT Level,IDirect3DSurface8** ppCubeMapSurface) PURE; - STDMETHOD(LockRect)(THIS_ D3DCUBEMAP_FACES FaceType,UINT Level,D3DLOCKED_RECT* pLockedRect,CONST RECT* pRect,DWORD Flags) PURE; - STDMETHOD(UnlockRect)(THIS_ D3DCUBEMAP_FACES FaceType,UINT Level) PURE; - STDMETHOD(AddDirtyRect)(THIS_ D3DCUBEMAP_FACES FaceType,CONST RECT* pDirtyRect) PURE; -}; - -typedef struct IDirect3DCubeTexture8 *LPDIRECT3DCUBETEXTURE8, *PDIRECT3DCUBETEXTURE8; - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirect3DCubeTexture8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IDirect3DCubeTexture8_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirect3DCubeTexture8_Release(p) (p)->lpVtbl->Release(p) -#define IDirect3DCubeTexture8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a) -#define IDirect3DCubeTexture8_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) -#define IDirect3DCubeTexture8_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) -#define IDirect3DCubeTexture8_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) -#define IDirect3DCubeTexture8_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a) -#define IDirect3DCubeTexture8_GetPriority(p) (p)->lpVtbl->GetPriority(p) -#define IDirect3DCubeTexture8_PreLoad(p) (p)->lpVtbl->PreLoad(p) -#define IDirect3DCubeTexture8_GetType(p) (p)->lpVtbl->GetType(p) -#define IDirect3DCubeTexture8_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a) -#define IDirect3DCubeTexture8_GetLOD(p) (p)->lpVtbl->GetLOD(p) -#define IDirect3DCubeTexture8_GetLevelCount(p) (p)->lpVtbl->GetLevelCount(p) -#define IDirect3DCubeTexture8_GetLevelDesc(p,a,b) (p)->lpVtbl->GetLevelDesc(p,a,b) -#define IDirect3DCubeTexture8_GetCubeMapSurface(p,a,b,c) (p)->lpVtbl->GetCubeMapSurface(p,a,b,c) -#define IDirect3DCubeTexture8_LockRect(p,a,b,c,d,e) (p)->lpVtbl->LockRect(p,a,b,c,d,e) -#define IDirect3DCubeTexture8_UnlockRect(p,a,b) (p)->lpVtbl->UnlockRect(p,a,b) -#define IDirect3DCubeTexture8_AddDirtyRect(p,a,b) (p)->lpVtbl->AddDirtyRect(p,a,b) -#else -#define IDirect3DCubeTexture8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#define IDirect3DCubeTexture8_AddRef(p) (p)->AddRef() -#define IDirect3DCubeTexture8_Release(p) (p)->Release() -#define IDirect3DCubeTexture8_GetDevice(p,a) (p)->GetDevice(a) -#define IDirect3DCubeTexture8_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) -#define IDirect3DCubeTexture8_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) -#define IDirect3DCubeTexture8_FreePrivateData(p,a) (p)->FreePrivateData(a) -#define IDirect3DCubeTexture8_SetPriority(p,a) (p)->SetPriority(a) -#define IDirect3DCubeTexture8_GetPriority(p) (p)->GetPriority() -#define IDirect3DCubeTexture8_PreLoad(p) (p)->PreLoad() -#define IDirect3DCubeTexture8_GetType(p) (p)->GetType() -#define IDirect3DCubeTexture8_SetLOD(p,a) (p)->SetLOD(a) -#define IDirect3DCubeTexture8_GetLOD(p) (p)->GetLOD() -#define IDirect3DCubeTexture8_GetLevelCount(p) (p)->GetLevelCount() -#define IDirect3DCubeTexture8_GetLevelDesc(p,a,b) (p)->GetLevelDesc(a,b) -#define IDirect3DCubeTexture8_GetCubeMapSurface(p,a,b,c) (p)->GetCubeMapSurface(a,b,c) -#define IDirect3DCubeTexture8_LockRect(p,a,b,c,d,e) (p)->LockRect(a,b,c,d,e) -#define IDirect3DCubeTexture8_UnlockRect(p,a,b) (p)->UnlockRect(a,b) -#define IDirect3DCubeTexture8_AddDirtyRect(p,a,b) (p)->AddDirtyRect(a,b) -#endif - - - - -#undef INTERFACE -#define INTERFACE IDirect3DVertexBuffer8 - -DECLARE_INTERFACE_(IDirect3DVertexBuffer8, IDirect3DResource8) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; - STDMETHOD_(ULONG,AddRef)(THIS) PURE; - STDMETHOD_(ULONG,Release)(THIS) PURE; - - /*** IDirect3DResource8 methods ***/ - STDMETHOD(GetDevice)(THIS_ IDirect3DDevice8** ppDevice) PURE; - STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags) PURE; - STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData) PURE; - STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE; - STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE; - STDMETHOD_(DWORD, GetPriority)(THIS) PURE; - STDMETHOD_(void, PreLoad)(THIS) PURE; - STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE; - STDMETHOD(Lock)(THIS_ UINT OffsetToLock,UINT SizeToLock,BYTE** ppbData,DWORD Flags) PURE; - STDMETHOD(Unlock)(THIS) PURE; - STDMETHOD(GetDesc)(THIS_ D3DVERTEXBUFFER_DESC *pDesc) PURE; -}; - -typedef struct IDirect3DVertexBuffer8 *LPDIRECT3DVERTEXBUFFER8, *PDIRECT3DVERTEXBUFFER8; - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirect3DVertexBuffer8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IDirect3DVertexBuffer8_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirect3DVertexBuffer8_Release(p) (p)->lpVtbl->Release(p) -#define IDirect3DVertexBuffer8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a) -#define IDirect3DVertexBuffer8_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) -#define IDirect3DVertexBuffer8_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) -#define IDirect3DVertexBuffer8_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) -#define IDirect3DVertexBuffer8_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a) -#define IDirect3DVertexBuffer8_GetPriority(p) (p)->lpVtbl->GetPriority(p) -#define IDirect3DVertexBuffer8_PreLoad(p) (p)->lpVtbl->PreLoad(p) -#define IDirect3DVertexBuffer8_GetType(p) (p)->lpVtbl->GetType(p) -#define IDirect3DVertexBuffer8_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d) -#define IDirect3DVertexBuffer8_Unlock(p) (p)->lpVtbl->Unlock(p) -#define IDirect3DVertexBuffer8_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a) -#else -#define IDirect3DVertexBuffer8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#define IDirect3DVertexBuffer8_AddRef(p) (p)->AddRef() -#define IDirect3DVertexBuffer8_Release(p) (p)->Release() -#define IDirect3DVertexBuffer8_GetDevice(p,a) (p)->GetDevice(a) -#define IDirect3DVertexBuffer8_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) -#define IDirect3DVertexBuffer8_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) -#define IDirect3DVertexBuffer8_FreePrivateData(p,a) (p)->FreePrivateData(a) -#define IDirect3DVertexBuffer8_SetPriority(p,a) (p)->SetPriority(a) -#define IDirect3DVertexBuffer8_GetPriority(p) (p)->GetPriority() -#define IDirect3DVertexBuffer8_PreLoad(p) (p)->PreLoad() -#define IDirect3DVertexBuffer8_GetType(p) (p)->GetType() -#define IDirect3DVertexBuffer8_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d) -#define IDirect3DVertexBuffer8_Unlock(p) (p)->Unlock() -#define IDirect3DVertexBuffer8_GetDesc(p,a) (p)->GetDesc(a) -#endif - - - - -#undef INTERFACE -#define INTERFACE IDirect3DIndexBuffer8 - -DECLARE_INTERFACE_(IDirect3DIndexBuffer8, IDirect3DResource8) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; - STDMETHOD_(ULONG,AddRef)(THIS) PURE; - STDMETHOD_(ULONG,Release)(THIS) PURE; - - /*** IDirect3DResource8 methods ***/ - STDMETHOD(GetDevice)(THIS_ IDirect3DDevice8** ppDevice) PURE; - STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags) PURE; - STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData) PURE; - STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE; - STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE; - STDMETHOD_(DWORD, GetPriority)(THIS) PURE; - STDMETHOD_(void, PreLoad)(THIS) PURE; - STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE; - STDMETHOD(Lock)(THIS_ UINT OffsetToLock,UINT SizeToLock,BYTE** ppbData,DWORD Flags) PURE; - STDMETHOD(Unlock)(THIS) PURE; - STDMETHOD(GetDesc)(THIS_ D3DINDEXBUFFER_DESC *pDesc) PURE; -}; - -typedef struct IDirect3DIndexBuffer8 *LPDIRECT3DINDEXBUFFER8, *PDIRECT3DINDEXBUFFER8; - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirect3DIndexBuffer8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IDirect3DIndexBuffer8_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirect3DIndexBuffer8_Release(p) (p)->lpVtbl->Release(p) -#define IDirect3DIndexBuffer8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a) -#define IDirect3DIndexBuffer8_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) -#define IDirect3DIndexBuffer8_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) -#define IDirect3DIndexBuffer8_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) -#define IDirect3DIndexBuffer8_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a) -#define IDirect3DIndexBuffer8_GetPriority(p) (p)->lpVtbl->GetPriority(p) -#define IDirect3DIndexBuffer8_PreLoad(p) (p)->lpVtbl->PreLoad(p) -#define IDirect3DIndexBuffer8_GetType(p) (p)->lpVtbl->GetType(p) -#define IDirect3DIndexBuffer8_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d) -#define IDirect3DIndexBuffer8_Unlock(p) (p)->lpVtbl->Unlock(p) -#define IDirect3DIndexBuffer8_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a) -#else -#define IDirect3DIndexBuffer8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#define IDirect3DIndexBuffer8_AddRef(p) (p)->AddRef() -#define IDirect3DIndexBuffer8_Release(p) (p)->Release() -#define IDirect3DIndexBuffer8_GetDevice(p,a) (p)->GetDevice(a) -#define IDirect3DIndexBuffer8_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) -#define IDirect3DIndexBuffer8_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) -#define IDirect3DIndexBuffer8_FreePrivateData(p,a) (p)->FreePrivateData(a) -#define IDirect3DIndexBuffer8_SetPriority(p,a) (p)->SetPriority(a) -#define IDirect3DIndexBuffer8_GetPriority(p) (p)->GetPriority() -#define IDirect3DIndexBuffer8_PreLoad(p) (p)->PreLoad() -#define IDirect3DIndexBuffer8_GetType(p) (p)->GetType() -#define IDirect3DIndexBuffer8_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d) -#define IDirect3DIndexBuffer8_Unlock(p) (p)->Unlock() -#define IDirect3DIndexBuffer8_GetDesc(p,a) (p)->GetDesc(a) -#endif - - - - -#undef INTERFACE -#define INTERFACE IDirect3DSurface8 - -DECLARE_INTERFACE_(IDirect3DSurface8, IUnknown) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; - STDMETHOD_(ULONG,AddRef)(THIS) PURE; - STDMETHOD_(ULONG,Release)(THIS) PURE; - - /*** IDirect3DSurface8 methods ***/ - STDMETHOD(GetDevice)(THIS_ IDirect3DDevice8** ppDevice) PURE; - STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags) PURE; - STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData) PURE; - STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE; - STDMETHOD(GetContainer)(THIS_ REFIID riid,void** ppContainer) PURE; - STDMETHOD(GetDesc)(THIS_ D3DSURFACE_DESC *pDesc) PURE; - STDMETHOD(LockRect)(THIS_ D3DLOCKED_RECT* pLockedRect,CONST RECT* pRect,DWORD Flags) PURE; - STDMETHOD(UnlockRect)(THIS) PURE; -}; - -typedef struct IDirect3DSurface8 *LPDIRECT3DSURFACE8, *PDIRECT3DSURFACE8; - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirect3DSurface8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IDirect3DSurface8_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirect3DSurface8_Release(p) (p)->lpVtbl->Release(p) -#define IDirect3DSurface8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a) -#define IDirect3DSurface8_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) -#define IDirect3DSurface8_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) -#define IDirect3DSurface8_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) -#define IDirect3DSurface8_GetContainer(p,a,b) (p)->lpVtbl->GetContainer(p,a,b) -#define IDirect3DSurface8_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a) -#define IDirect3DSurface8_LockRect(p,a,b,c) (p)->lpVtbl->LockRect(p,a,b,c) -#define IDirect3DSurface8_UnlockRect(p) (p)->lpVtbl->UnlockRect(p) -#else -#define IDirect3DSurface8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#define IDirect3DSurface8_AddRef(p) (p)->AddRef() -#define IDirect3DSurface8_Release(p) (p)->Release() -#define IDirect3DSurface8_GetDevice(p,a) (p)->GetDevice(a) -#define IDirect3DSurface8_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) -#define IDirect3DSurface8_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) -#define IDirect3DSurface8_FreePrivateData(p,a) (p)->FreePrivateData(a) -#define IDirect3DSurface8_GetContainer(p,a,b) (p)->GetContainer(a,b) -#define IDirect3DSurface8_GetDesc(p,a) (p)->GetDesc(a) -#define IDirect3DSurface8_LockRect(p,a,b,c) (p)->LockRect(a,b,c) -#define IDirect3DSurface8_UnlockRect(p) (p)->UnlockRect() -#endif - - - - -#undef INTERFACE -#define INTERFACE IDirect3DVolume8 - -DECLARE_INTERFACE_(IDirect3DVolume8, IUnknown) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; - STDMETHOD_(ULONG,AddRef)(THIS) PURE; - STDMETHOD_(ULONG,Release)(THIS) PURE; - - /*** IDirect3DVolume8 methods ***/ - STDMETHOD(GetDevice)(THIS_ IDirect3DDevice8** ppDevice) PURE; - STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags) PURE; - STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData) PURE; - STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE; - STDMETHOD(GetContainer)(THIS_ REFIID riid,void** ppContainer) PURE; - STDMETHOD(GetDesc)(THIS_ D3DVOLUME_DESC *pDesc) PURE; - STDMETHOD(LockBox)(THIS_ D3DLOCKED_BOX * pLockedVolume,CONST D3DBOX* pBox,DWORD Flags) PURE; - STDMETHOD(UnlockBox)(THIS) PURE; -}; - -typedef struct IDirect3DVolume8 *LPDIRECT3DVOLUME8, *PDIRECT3DVOLUME8; - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirect3DVolume8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IDirect3DVolume8_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirect3DVolume8_Release(p) (p)->lpVtbl->Release(p) -#define IDirect3DVolume8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a) -#define IDirect3DVolume8_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) -#define IDirect3DVolume8_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) -#define IDirect3DVolume8_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) -#define IDirect3DVolume8_GetContainer(p,a,b) (p)->lpVtbl->GetContainer(p,a,b) -#define IDirect3DVolume8_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a) -#define IDirect3DVolume8_LockBox(p,a,b,c) (p)->lpVtbl->LockBox(p,a,b,c) -#define IDirect3DVolume8_UnlockBox(p) (p)->lpVtbl->UnlockBox(p) -#else -#define IDirect3DVolume8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#define IDirect3DVolume8_AddRef(p) (p)->AddRef() -#define IDirect3DVolume8_Release(p) (p)->Release() -#define IDirect3DVolume8_GetDevice(p,a) (p)->GetDevice(a) -#define IDirect3DVolume8_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) -#define IDirect3DVolume8_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) -#define IDirect3DVolume8_FreePrivateData(p,a) (p)->FreePrivateData(a) -#define IDirect3DVolume8_GetContainer(p,a,b) (p)->GetContainer(a,b) -#define IDirect3DVolume8_GetDesc(p,a) (p)->GetDesc(a) -#define IDirect3DVolume8_LockBox(p,a,b,c) (p)->LockBox(a,b,c) -#define IDirect3DVolume8_UnlockBox(p) (p)->UnlockBox() -#endif - -/**************************************************************************** - * Flags for SetPrivateData method on all D3D8 interfaces - * - * The passed pointer is an IUnknown ptr. The SizeOfData argument to SetPrivateData - * must be set to sizeof(IUnknown*). Direct3D will call AddRef through this - * pointer and Release when the private data is destroyed. The data will be - * destroyed when another SetPrivateData with the same GUID is set, when - * FreePrivateData is called, or when the D3D8 object is freed. - ****************************************************************************/ -#define D3DSPD_IUNKNOWN 0x00000001L - -/**************************************************************************** - * - * Parameter for IDirect3D8 Enum and GetCaps8 functions to get the info for - * the current mode only. - * - ****************************************************************************/ - -#define D3DCURRENT_DISPLAY_MODE 0x00EFFFFFL - -/**************************************************************************** - * - * Flags for IDirect3D8::CreateDevice's BehaviorFlags - * - ****************************************************************************/ - -#define D3DCREATE_FPU_PRESERVE 0x00000002L -#define D3DCREATE_MULTITHREADED 0x00000004L - -#define D3DCREATE_PUREDEVICE 0x00000010L -#define D3DCREATE_SOFTWARE_VERTEXPROCESSING 0x00000020L -#define D3DCREATE_HARDWARE_VERTEXPROCESSING 0x00000040L -#define D3DCREATE_MIXED_VERTEXPROCESSING 0x00000080L - - -/**************************************************************************** - * - * Parameter for IDirect3D8::CreateDevice's iAdapter - * - ****************************************************************************/ - -#define D3DADAPTER_DEFAULT 0 - -/**************************************************************************** - * - * Flags for IDirect3D8::EnumAdapters - * - ****************************************************************************/ - -#define D3DENUM_NO_WHQL_LEVEL 0x00000002L - -/**************************************************************************** - * - * Maximum number of back-buffers supported in DX8 - * - ****************************************************************************/ - -#define D3DPRESENT_BACK_BUFFERS_MAX 3L - -/**************************************************************************** - * - * Flags for IDirect3DDevice8::SetGammaRamp - * - ****************************************************************************/ - -#define D3DSGR_NO_CALIBRATION 0x00000000L -#define D3DSGR_CALIBRATE 0x00000001L - -/**************************************************************************** - * - * Flags for IDirect3DDevice8::SetCursorPosition - * - ****************************************************************************/ - -#define D3DCURSOR_IMMEDIATE_UPDATE 0x00000001L - -/**************************************************************************** - * - * Flags for DrawPrimitive/DrawIndexedPrimitive - * Also valid for Begin/BeginIndexed - * Also valid for VertexBuffer::CreateVertexBuffer - ****************************************************************************/ - - -/* - * DirectDraw error codes - */ -#define _FACD3D 0x876 -#define MAKE_D3DHRESULT( code ) MAKE_HRESULT( 1, _FACD3D, code ) - -/* - * Direct3D Errors - */ -#define D3D_OK S_OK - -#define D3DERR_WRONGTEXTUREFORMAT MAKE_D3DHRESULT(2072) -#define D3DERR_UNSUPPORTEDCOLOROPERATION MAKE_D3DHRESULT(2073) -#define D3DERR_UNSUPPORTEDCOLORARG MAKE_D3DHRESULT(2074) -#define D3DERR_UNSUPPORTEDALPHAOPERATION MAKE_D3DHRESULT(2075) -#define D3DERR_UNSUPPORTEDALPHAARG MAKE_D3DHRESULT(2076) -#define D3DERR_TOOMANYOPERATIONS MAKE_D3DHRESULT(2077) -#define D3DERR_CONFLICTINGTEXTUREFILTER MAKE_D3DHRESULT(2078) -#define D3DERR_UNSUPPORTEDFACTORVALUE MAKE_D3DHRESULT(2079) -#define D3DERR_CONFLICTINGRENDERSTATE MAKE_D3DHRESULT(2081) -#define D3DERR_UNSUPPORTEDTEXTUREFILTER MAKE_D3DHRESULT(2082) -#define D3DERR_CONFLICTINGTEXTUREPALETTE MAKE_D3DHRESULT(2086) -#define D3DERR_DRIVERINTERNALERROR MAKE_D3DHRESULT(2087) - -#define D3DERR_NOTFOUND MAKE_D3DHRESULT(2150) -#define D3DERR_MOREDATA MAKE_D3DHRESULT(2151) -#define D3DERR_DEVICELOST MAKE_D3DHRESULT(2152) -#define D3DERR_DEVICENOTRESET MAKE_D3DHRESULT(2153) -#define D3DERR_NOTAVAILABLE MAKE_D3DHRESULT(2154) -#define D3DERR_OUTOFVIDEOMEMORY MAKE_D3DHRESULT(380) -#define D3DERR_INVALIDDEVICE MAKE_D3DHRESULT(2155) -#define D3DERR_INVALIDCALL MAKE_D3DHRESULT(2156) -#define D3DERR_DRIVERINVALIDCALL MAKE_D3DHRESULT(2157) - -#ifdef __cplusplus -}; -#endif - -#endif /* (DIRECT3D_VERSION >= 0x0800) */ -#endif /* _D3D_H_ */ - diff --git a/builddir/irrlicht-1.8.1/include/d3d8caps.h b/builddir/irrlicht-1.8.1/include/d3d8caps.h deleted file mode 100644 index 6699893..0000000 --- a/builddir/irrlicht-1.8.1/include/d3d8caps.h +++ /dev/null @@ -1,354 +0,0 @@ -/*==========================================================================; - * - * Copyright (C) 1995-2000 Microsoft Corporation. All Rights Reserved. - * - * File: d3d8caps.h - * Content: Direct3D capabilities include file - * - ***************************************************************************/ - -#ifndef _D3D8CAPS_H -#define _D3D8CAPS_H - -#ifndef DIRECT3D_VERSION -#define DIRECT3D_VERSION 0x0800 -#endif //DIRECT3D_VERSION - -// include this file content only if compiling for DX8 interfaces -#if(DIRECT3D_VERSION >= 0x0800) - -#pragma pack(4) - -typedef struct _D3DCAPS8 -{ - /* Device Info */ - D3DDEVTYPE DeviceType; - UINT AdapterOrdinal; - - /* Caps from DX7 Draw */ - DWORD Caps; - DWORD Caps2; - DWORD Caps3; - DWORD PresentationIntervals; - - /* Cursor Caps */ - DWORD CursorCaps; - - /* 3D Device Caps */ - DWORD DevCaps; - - DWORD PrimitiveMiscCaps; - DWORD RasterCaps; - DWORD ZCmpCaps; - DWORD SrcBlendCaps; - DWORD DestBlendCaps; - DWORD AlphaCmpCaps; - DWORD ShadeCaps; - DWORD TextureCaps; - DWORD TextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DTexture8's - DWORD CubeTextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DCubeTexture8's - DWORD VolumeTextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DVolumeTexture8's - DWORD TextureAddressCaps; // D3DPTADDRESSCAPS for IDirect3DTexture8's - DWORD VolumeTextureAddressCaps; // D3DPTADDRESSCAPS for IDirect3DVolumeTexture8's - - DWORD LineCaps; // D3DLINECAPS - - DWORD MaxTextureWidth, MaxTextureHeight; - DWORD MaxVolumeExtent; - - DWORD MaxTextureRepeat; - DWORD MaxTextureAspectRatio; - DWORD MaxAnisotropy; - float MaxVertexW; - - float GuardBandLeft; - float GuardBandTop; - float GuardBandRight; - float GuardBandBottom; - - float ExtentsAdjust; - DWORD StencilCaps; - - DWORD FVFCaps; - DWORD TextureOpCaps; - DWORD MaxTextureBlendStages; - DWORD MaxSimultaneousTextures; - - DWORD VertexProcessingCaps; - DWORD MaxActiveLights; - DWORD MaxUserClipPlanes; - DWORD MaxVertexBlendMatrices; - DWORD MaxVertexBlendMatrixIndex; - - float MaxPointSize; - - DWORD MaxPrimitiveCount; // max number of primitives per DrawPrimitive call - DWORD MaxVertexIndex; - DWORD MaxStreams; - DWORD MaxStreamStride; // max stride for SetStreamSource - - DWORD VertexShaderVersion; - DWORD MaxVertexShaderConst; // number of vertex shader constant registers - - DWORD PixelShaderVersion; - float MaxPixelShaderValue; // max value of pixel shader arithmetic component - -} D3DCAPS8; - -// -// BIT DEFINES FOR D3DCAPS8 DWORD MEMBERS -// - -// -// Caps -// -#define D3DCAPS_READ_SCANLINE 0x00020000L - -// -// Caps2 -// -#define D3DCAPS2_NO2DDURING3DSCENE 0x00000002L -#define D3DCAPS2_FULLSCREENGAMMA 0x00020000L -#define D3DCAPS2_CANRENDERWINDOWED 0x00080000L -#define D3DCAPS2_CANCALIBRATEGAMMA 0x00100000L -#define D3DCAPS2_RESERVED 0x02000000L - -// -// Caps3 -// -#define D3DCAPS3_RESERVED 0x8000001fL - -// -// PresentationIntervals -// -#define D3DPRESENT_INTERVAL_DEFAULT 0x00000000L -#define D3DPRESENT_INTERVAL_ONE 0x00000001L -#define D3DPRESENT_INTERVAL_TWO 0x00000002L -#define D3DPRESENT_INTERVAL_THREE 0x00000004L -#define D3DPRESENT_INTERVAL_FOUR 0x00000008L -#define D3DPRESENT_INTERVAL_IMMEDIATE 0x80000000L - -// -// CursorCaps -// -// Driver supports HW color cursor in at least hi-res modes(height >=400) -#define D3DCURSORCAPS_COLOR 0x00000001L -// Driver supports HW cursor also in low-res modes(height < 400) -#define D3DCURSORCAPS_LOWRES 0x00000002L - -// -// DevCaps -// -#define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010L /* Device can use execute buffers from system memory */ -#define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020L /* Device can use execute buffers from video memory */ -#define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040L /* Device can use TL buffers from system memory */ -#define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080L /* Device can use TL buffers from video memory */ -#define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100L /* Device can texture from system memory */ -#define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200L /* Device can texture from device memory */ -#define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400L /* Device can draw TLVERTEX primitives */ -#define D3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800L /* Device can render without waiting for flip to complete */ -#define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000L /* Device can texture from nonlocal video memory */ -#define D3DDEVCAPS_DRAWPRIMITIVES2 0x00002000L /* Device can support DrawPrimitives2 */ -#define D3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x00004000L /* Device is texturing from separate memory pools */ -#define D3DDEVCAPS_DRAWPRIMITIVES2EX 0x00008000L /* Device can support Extended DrawPrimitives2 i.e. DX7 compliant driver*/ -#define D3DDEVCAPS_HWTRANSFORMANDLIGHT 0x00010000L /* Device can support transformation and lighting in hardware and DRAWPRIMITIVES2EX must be also */ -#define D3DDEVCAPS_CANBLTSYSTONONLOCAL 0x00020000L /* Device supports a Tex Blt from system memory to non-local vidmem */ -#define D3DDEVCAPS_HWRASTERIZATION 0x00080000L /* Device has HW acceleration for rasterization */ -#define D3DDEVCAPS_PUREDEVICE 0x00100000L /* Device supports D3DCREATE_PUREDEVICE */ -#define D3DDEVCAPS_QUINTICRTPATCHES 0x00200000L /* Device supports quintic Beziers and BSplines */ -#define D3DDEVCAPS_RTPATCHES 0x00400000L /* Device supports Rect and Tri patches */ -#define D3DDEVCAPS_RTPATCHHANDLEZERO 0x00800000L /* Indicates that RT Patches may be drawn efficiently using handle 0 */ -#define D3DDEVCAPS_NPATCHES 0x01000000L /* Device supports N-Patches */ - -// -// PrimitiveMiscCaps -// -#define D3DPMISCCAPS_MASKZ 0x00000002L -#define D3DPMISCCAPS_LINEPATTERNREP 0x00000004L -#define D3DPMISCCAPS_CULLNONE 0x00000010L -#define D3DPMISCCAPS_CULLCW 0x00000020L -#define D3DPMISCCAPS_CULLCCW 0x00000040L -#define D3DPMISCCAPS_COLORWRITEENABLE 0x00000080L -#define D3DPMISCCAPS_CLIPPLANESCALEDPOINTS 0x00000100L /* Device correctly clips scaled points to clip planes */ -#define D3DPMISCCAPS_CLIPTLVERTS 0x00000200L /* device will clip post-transformed vertex primitives */ -#define D3DPMISCCAPS_TSSARGTEMP 0x00000400L /* device supports D3DTA_TEMP for temporary register */ -#define D3DPMISCCAPS_BLENDOP 0x00000800L /* device supports D3DRS_BLENDOP */ - -// -// LineCaps -// -#define D3DLINECAPS_TEXTURE 0x00000001L -#define D3DLINECAPS_ZTEST 0x00000002L -#define D3DLINECAPS_BLEND 0x00000004L -#define D3DLINECAPS_ALPHACMP 0x00000008L -#define D3DLINECAPS_FOG 0x00000010L - -// -// RasterCaps -// -#define D3DPRASTERCAPS_DITHER 0x00000001L -#define D3DPRASTERCAPS_PAT 0x00000008L -#define D3DPRASTERCAPS_ZTEST 0x00000010L -#define D3DPRASTERCAPS_FOGVERTEX 0x00000080L -#define D3DPRASTERCAPS_FOGTABLE 0x00000100L -#define D3DPRASTERCAPS_ANTIALIASEDGES 0x00001000L -#define D3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000L -#define D3DPRASTERCAPS_ZBIAS 0x00004000L -#define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000L -#define D3DPRASTERCAPS_FOGRANGE 0x00010000L -#define D3DPRASTERCAPS_ANISOTROPY 0x00020000L -#define D3DPRASTERCAPS_WBUFFER 0x00040000L -#define D3DPRASTERCAPS_WFOG 0x00100000L -#define D3DPRASTERCAPS_ZFOG 0x00200000L -#define D3DPRASTERCAPS_COLORPERSPECTIVE 0x00400000L /* Device iterates colors perspective correct */ -#define D3DPRASTERCAPS_STRETCHBLTMULTISAMPLE 0x00800000L - -// -// ZCmpCaps, AlphaCmpCaps -// -#define D3DPCMPCAPS_NEVER 0x00000001L -#define D3DPCMPCAPS_LESS 0x00000002L -#define D3DPCMPCAPS_EQUAL 0x00000004L -#define D3DPCMPCAPS_LESSEQUAL 0x00000008L -#define D3DPCMPCAPS_GREATER 0x00000010L -#define D3DPCMPCAPS_NOTEQUAL 0x00000020L -#define D3DPCMPCAPS_GREATEREQUAL 0x00000040L -#define D3DPCMPCAPS_ALWAYS 0x00000080L - -// -// SourceBlendCaps, DestBlendCaps -// -#define D3DPBLENDCAPS_ZERO 0x00000001L -#define D3DPBLENDCAPS_ONE 0x00000002L -#define D3DPBLENDCAPS_SRCCOLOR 0x00000004L -#define D3DPBLENDCAPS_INVSRCCOLOR 0x00000008L -#define D3DPBLENDCAPS_SRCALPHA 0x00000010L -#define D3DPBLENDCAPS_INVSRCALPHA 0x00000020L -#define D3DPBLENDCAPS_DESTALPHA 0x00000040L -#define D3DPBLENDCAPS_INVDESTALPHA 0x00000080L -#define D3DPBLENDCAPS_DESTCOLOR 0x00000100L -#define D3DPBLENDCAPS_INVDESTCOLOR 0x00000200L -#define D3DPBLENDCAPS_SRCALPHASAT 0x00000400L -#define D3DPBLENDCAPS_BOTHSRCALPHA 0x00000800L -#define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000L - -// -// ShadeCaps -// -#define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008L -#define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200L -#define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000L -#define D3DPSHADECAPS_FOGGOURAUD 0x00080000L - -// -// TextureCaps -// -#define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001L /* Perspective-correct texturing is supported */ -#define D3DPTEXTURECAPS_POW2 0x00000002L /* Power-of-2 texture dimensions are required - applies to non-Cube/Volume textures only. */ -#define D3DPTEXTURECAPS_ALPHA 0x00000004L /* Alpha in texture pixels is supported */ -#define D3DPTEXTURECAPS_SQUAREONLY 0x00000020L /* Only square textures are supported */ -#define D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040L /* Texture indices are not scaled by the texture size prior to interpolation */ -#define D3DPTEXTURECAPS_ALPHAPALETTE 0x00000080L /* Device can draw alpha from texture palettes */ -// Device can use non-POW2 textures if: -// 1) D3DTEXTURE_ADDRESS is set to CLAMP for this texture's stage -// 2) D3DRS_WRAP(N) is zero for this texture's coordinates -// 3) mip mapping is not enabled (use magnification filter only) -#define D3DPTEXTURECAPS_NONPOW2CONDITIONAL 0x00000100L -#define D3DPTEXTURECAPS_PROJECTED 0x00000400L /* Device can do D3DTTFF_PROJECTED */ -#define D3DPTEXTURECAPS_CUBEMAP 0x00000800L /* Device can do cubemap textures */ -#define D3DPTEXTURECAPS_VOLUMEMAP 0x00002000L /* Device can do volume textures */ -#define D3DPTEXTURECAPS_MIPMAP 0x00004000L /* Device can do mipmapped textures */ -#define D3DPTEXTURECAPS_MIPVOLUMEMAP 0x00008000L /* Device can do mipmapped volume textures */ -#define D3DPTEXTURECAPS_MIPCUBEMAP 0x00010000L /* Device can do mipmapped cube maps */ -#define D3DPTEXTURECAPS_CUBEMAP_POW2 0x00020000L /* Device requires that cubemaps be power-of-2 dimension */ -#define D3DPTEXTURECAPS_VOLUMEMAP_POW2 0x00040000L /* Device requires that volume maps be power-of-2 dimension */ - -// -// TextureFilterCaps -// -#define D3DPTFILTERCAPS_MINFPOINT 0x00000100L /* Min Filter */ -#define D3DPTFILTERCAPS_MINFLINEAR 0x00000200L -#define D3DPTFILTERCAPS_MINFANISOTROPIC 0x00000400L -#define D3DPTFILTERCAPS_MIPFPOINT 0x00010000L /* Mip Filter */ -#define D3DPTFILTERCAPS_MIPFLINEAR 0x00020000L -#define D3DPTFILTERCAPS_MAGFPOINT 0x01000000L /* Mag Filter */ -#define D3DPTFILTERCAPS_MAGFLINEAR 0x02000000L -#define D3DPTFILTERCAPS_MAGFANISOTROPIC 0x04000000L -#define D3DPTFILTERCAPS_MAGFAFLATCUBIC 0x08000000L -#define D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC 0x10000000L - -// -// TextureAddressCaps -// -#define D3DPTADDRESSCAPS_WRAP 0x00000001L -#define D3DPTADDRESSCAPS_MIRROR 0x00000002L -#define D3DPTADDRESSCAPS_CLAMP 0x00000004L -#define D3DPTADDRESSCAPS_BORDER 0x00000008L -#define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010L -#define D3DPTADDRESSCAPS_MIRRORONCE 0x00000020L - -// -// StencilCaps -// -#define D3DSTENCILCAPS_KEEP 0x00000001L -#define D3DSTENCILCAPS_ZERO 0x00000002L -#define D3DSTENCILCAPS_REPLACE 0x00000004L -#define D3DSTENCILCAPS_INCRSAT 0x00000008L -#define D3DSTENCILCAPS_DECRSAT 0x00000010L -#define D3DSTENCILCAPS_INVERT 0x00000020L -#define D3DSTENCILCAPS_INCR 0x00000040L -#define D3DSTENCILCAPS_DECR 0x00000080L - -// -// TextureOpCaps -// -#define D3DTEXOPCAPS_DISABLE 0x00000001L -#define D3DTEXOPCAPS_SELECTARG1 0x00000002L -#define D3DTEXOPCAPS_SELECTARG2 0x00000004L -#define D3DTEXOPCAPS_MODULATE 0x00000008L -#define D3DTEXOPCAPS_MODULATE2X 0x00000010L -#define D3DTEXOPCAPS_MODULATE4X 0x00000020L -#define D3DTEXOPCAPS_ADD 0x00000040L -#define D3DTEXOPCAPS_ADDSIGNED 0x00000080L -#define D3DTEXOPCAPS_ADDSIGNED2X 0x00000100L -#define D3DTEXOPCAPS_SUBTRACT 0x00000200L -#define D3DTEXOPCAPS_ADDSMOOTH 0x00000400L -#define D3DTEXOPCAPS_BLENDDIFFUSEALPHA 0x00000800L -#define D3DTEXOPCAPS_BLENDTEXTUREALPHA 0x00001000L -#define D3DTEXOPCAPS_BLENDFACTORALPHA 0x00002000L -#define D3DTEXOPCAPS_BLENDTEXTUREALPHAPM 0x00004000L -#define D3DTEXOPCAPS_BLENDCURRENTALPHA 0x00008000L -#define D3DTEXOPCAPS_PREMODULATE 0x00010000L -#define D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR 0x00020000L -#define D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA 0x00040000L -#define D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR 0x00080000L -#define D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA 0x00100000L -#define D3DTEXOPCAPS_BUMPENVMAP 0x00200000L -#define D3DTEXOPCAPS_BUMPENVMAPLUMINANCE 0x00400000L -#define D3DTEXOPCAPS_DOTPRODUCT3 0x00800000L -#define D3DTEXOPCAPS_MULTIPLYADD 0x01000000L -#define D3DTEXOPCAPS_LERP 0x02000000L - -// -// FVFCaps -// -#define D3DFVFCAPS_TEXCOORDCOUNTMASK 0x0000ffffL /* mask for texture coordinate count field */ -#define D3DFVFCAPS_DONOTSTRIPELEMENTS 0x00080000L /* Device prefers that vertex elements not be stripped */ -#define D3DFVFCAPS_PSIZE 0x00100000L /* Device can receive point size */ - -// -// VertexProcessingCaps -// -#define D3DVTXPCAPS_TEXGEN 0x00000001L /* device can do texgen */ -#define D3DVTXPCAPS_MATERIALSOURCE7 0x00000002L /* device can do DX7-level colormaterialsource ops */ -#define D3DVTXPCAPS_DIRECTIONALLIGHTS 0x00000008L /* device can do directional lights */ -#define D3DVTXPCAPS_POSITIONALLIGHTS 0x00000010L /* device can do positional lights (includes point and spot) */ -#define D3DVTXPCAPS_LOCALVIEWER 0x00000020L /* device can do local viewer */ -#define D3DVTXPCAPS_TWEENING 0x00000040L /* device can do vertex tweening */ -#define D3DVTXPCAPS_NO_VSDT_UBYTE4 0x00000080L /* device does not support D3DVSDT_UBYTE4 */ - -#pragma pack() - -#endif /* (DIRECT3D_VERSION >= 0x0800) */ -#endif /* _D3D8CAPS_H_ */ - diff --git a/builddir/irrlicht-1.8.1/include/d3d8types.h b/builddir/irrlicht-1.8.1/include/d3d8types.h deleted file mode 100644 index 6837d6e..0000000 --- a/builddir/irrlicht-1.8.1/include/d3d8types.h +++ /dev/null @@ -1,1600 +0,0 @@ -/*==========================================================================; - * - * Copyright (C) 1995-2000 Microsoft Corporation. All Rights Reserved. - * - * File: d3d8types.h - * Content: Direct3D capabilities include file - * - ***************************************************************************/ - -#ifndef _D3D8TYPES_H_ -#define _D3D8TYPES_H_ - -#ifndef DIRECT3D_VERSION -#define DIRECT3D_VERSION 0x0800 -#endif //DIRECT3D_VERSION - -// include this file content only if compiling for DX8 interfaces -#if(DIRECT3D_VERSION >= 0x0800) - -#include <float.h> - -#pragma warning(disable:4201) // anonymous unions warning -#pragma pack(4) - -// D3DCOLOR is equivalent to D3DFMT_A8R8G8B8 -#ifndef D3DCOLOR_DEFINED -typedef DWORD D3DCOLOR; -#define D3DCOLOR_DEFINED -#endif - -// maps unsigned 8 bits/channel to D3DCOLOR -#define D3DCOLOR_ARGB(a,r,g,b) \ - ((D3DCOLOR)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff))) -#define D3DCOLOR_RGBA(r,g,b,a) D3DCOLOR_ARGB(a,r,g,b) -#define D3DCOLOR_XRGB(r,g,b) D3DCOLOR_ARGB(0xff,r,g,b) - -// maps floating point channels (0.f to 1.f range) to D3DCOLOR -#define D3DCOLOR_COLORVALUE(r,g,b,a) \ - D3DCOLOR_RGBA((DWORD)((r)*255.f),(DWORD)((g)*255.f),(DWORD)((b)*255.f),(DWORD)((a)*255.f)) - - -#ifndef D3DVECTOR_DEFINED -typedef struct _D3DVECTOR { - float x; - float y; - float z; -} D3DVECTOR; -#define D3DVECTOR_DEFINED -#endif - -#ifndef D3DCOLORVALUE_DEFINED -typedef struct _D3DCOLORVALUE { - float r; - float g; - float b; - float a; -} D3DCOLORVALUE; -#define D3DCOLORVALUE_DEFINED -#endif - -#ifndef D3DRECT_DEFINED -typedef struct _D3DRECT { - LONG x1; - LONG y1; - LONG x2; - LONG y2; -} D3DRECT; -#define D3DRECT_DEFINED -#endif - -#ifndef D3DMATRIX_DEFINED -typedef struct _D3DMATRIX { - union { - struct { - float _11, _12, _13, _14; - float _21, _22, _23, _24; - float _31, _32, _33, _34; - float _41, _42, _43, _44; - - }; - float m[4][4]; - }; -} D3DMATRIX; -#define D3DMATRIX_DEFINED -#endif - -typedef struct _D3DVIEWPORT8 { - DWORD X; - DWORD Y; /* Viewport Top left */ - DWORD Width; - DWORD Height; /* Viewport Dimensions */ - float MinZ; /* Min/max of clip Volume */ - float MaxZ; -} D3DVIEWPORT8; - -/* - * Values for clip fields. - */ - -// Max number of user clipping planes, supported in D3D. -#define D3DMAXUSERCLIPPLANES 32 - -// These bits could be ORed together to use with D3DRS_CLIPPLANEENABLE -// -#define D3DCLIPPLANE0 (1 << 0) -#define D3DCLIPPLANE1 (1 << 1) -#define D3DCLIPPLANE2 (1 << 2) -#define D3DCLIPPLANE3 (1 << 3) -#define D3DCLIPPLANE4 (1 << 4) -#define D3DCLIPPLANE5 (1 << 5) - -// The following bits are used in the ClipUnion and ClipIntersection -// members of the D3DCLIPSTATUS8 -// - -#define D3DCS_LEFT 0x00000001L -#define D3DCS_RIGHT 0x00000002L -#define D3DCS_TOP 0x00000004L -#define D3DCS_BOTTOM 0x00000008L -#define D3DCS_FRONT 0x00000010L -#define D3DCS_BACK 0x00000020L -#define D3DCS_PLANE0 0x00000040L -#define D3DCS_PLANE1 0x00000080L -#define D3DCS_PLANE2 0x00000100L -#define D3DCS_PLANE3 0x00000200L -#define D3DCS_PLANE4 0x00000400L -#define D3DCS_PLANE5 0x00000800L - -#define D3DCS_ALL D3DCS_LEFT | \ - D3DCS_RIGHT | \ - D3DCS_TOP | \ - D3DCS_BOTTOM | \ - D3DCS_FRONT | \ - D3DCS_BACK | \ - D3DCS_PLANE0 | \ - D3DCS_PLANE1 | \ - D3DCS_PLANE2 | \ - D3DCS_PLANE3 | \ - D3DCS_PLANE4 | \ - D3DCS_PLANE5; - -typedef struct _D3DCLIPSTATUS8 { - DWORD ClipUnion; - DWORD ClipIntersection; -} D3DCLIPSTATUS8; - -typedef struct _D3DMATERIAL8 { - D3DCOLORVALUE Diffuse; /* Diffuse color RGBA */ - D3DCOLORVALUE Ambient; /* Ambient color RGB */ - D3DCOLORVALUE Specular; /* Specular 'shininess' */ - D3DCOLORVALUE Emissive; /* Emissive color RGB */ - float Power; /* Sharpness if specular highlight */ -} D3DMATERIAL8; - -typedef enum _D3DLIGHTTYPE { - D3DLIGHT_POINT = 1, - D3DLIGHT_SPOT = 2, - D3DLIGHT_DIRECTIONAL = 3, - D3DLIGHT_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ -} D3DLIGHTTYPE; - -typedef struct _D3DLIGHT8 { - D3DLIGHTTYPE Type; /* Type of light source */ - D3DCOLORVALUE Diffuse; /* Diffuse color of light */ - D3DCOLORVALUE Specular; /* Specular color of light */ - D3DCOLORVALUE Ambient; /* Ambient color of light */ - D3DVECTOR Position; /* Position in world space */ - D3DVECTOR Direction; /* Direction in world space */ - float Range; /* Cutoff range */ - float Falloff; /* Falloff */ - float Attenuation0; /* Constant attenuation */ - float Attenuation1; /* Linear attenuation */ - float Attenuation2; /* Quadratic attenuation */ - float Theta; /* Inner angle of spotlight cone */ - float Phi; /* Outer angle of spotlight cone */ -} D3DLIGHT8; - -/* - * Options for clearing - */ -#define D3DCLEAR_TARGET 0x00000001l /* Clear target surface */ -#define D3DCLEAR_ZBUFFER 0x00000002l /* Clear target z buffer */ -#define D3DCLEAR_STENCIL 0x00000004l /* Clear stencil planes */ - -/* - * The following defines the rendering states - */ - -typedef enum _D3DSHADEMODE { - D3DSHADE_FLAT = 1, - D3DSHADE_GOURAUD = 2, - D3DSHADE_PHONG = 3, - D3DSHADE_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ -} D3DSHADEMODE; - -typedef enum _D3DFILLMODE { - D3DFILL_POINT = 1, - D3DFILL_WIREFRAME = 2, - D3DFILL_SOLID = 3, - D3DFILL_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ -} D3DFILLMODE; - -typedef struct _D3DLINEPATTERN { - WORD wRepeatFactor; - WORD wLinePattern; -} D3DLINEPATTERN; - -typedef enum _D3DBLEND { - D3DBLEND_ZERO = 1, - D3DBLEND_ONE = 2, - D3DBLEND_SRCCOLOR = 3, - D3DBLEND_INVSRCCOLOR = 4, - D3DBLEND_SRCALPHA = 5, - D3DBLEND_INVSRCALPHA = 6, - D3DBLEND_DESTALPHA = 7, - D3DBLEND_INVDESTALPHA = 8, - D3DBLEND_DESTCOLOR = 9, - D3DBLEND_INVDESTCOLOR = 10, - D3DBLEND_SRCALPHASAT = 11, - D3DBLEND_BOTHSRCALPHA = 12, - D3DBLEND_BOTHINVSRCALPHA = 13, - D3DBLEND_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ -} D3DBLEND; - -typedef enum _D3DBLENDOP { - D3DBLENDOP_ADD = 1, - D3DBLENDOP_SUBTRACT = 2, - D3DBLENDOP_REVSUBTRACT = 3, - D3DBLENDOP_MIN = 4, - D3DBLENDOP_MAX = 5, - D3DBLENDOP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ -} D3DBLENDOP; - -typedef enum _D3DTEXTUREADDRESS { - D3DTADDRESS_WRAP = 1, - D3DTADDRESS_MIRROR = 2, - D3DTADDRESS_CLAMP = 3, - D3DTADDRESS_BORDER = 4, - D3DTADDRESS_MIRRORONCE = 5, - D3DTADDRESS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ -} D3DTEXTUREADDRESS; - -typedef enum _D3DCULL { - D3DCULL_NONE = 1, - D3DCULL_CW = 2, - D3DCULL_CCW = 3, - D3DCULL_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ -} D3DCULL; - -typedef enum _D3DCMPFUNC { - D3DCMP_NEVER = 1, - D3DCMP_LESS = 2, - D3DCMP_EQUAL = 3, - D3DCMP_LESSEQUAL = 4, - D3DCMP_GREATER = 5, - D3DCMP_NOTEQUAL = 6, - D3DCMP_GREATEREQUAL = 7, - D3DCMP_ALWAYS = 8, - D3DCMP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ -} D3DCMPFUNC; - -typedef enum _D3DSTENCILOP { - D3DSTENCILOP_KEEP = 1, - D3DSTENCILOP_ZERO = 2, - D3DSTENCILOP_REPLACE = 3, - D3DSTENCILOP_INCRSAT = 4, - D3DSTENCILOP_DECRSAT = 5, - D3DSTENCILOP_INVERT = 6, - D3DSTENCILOP_INCR = 7, - D3DSTENCILOP_DECR = 8, - D3DSTENCILOP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ -} D3DSTENCILOP; - -typedef enum _D3DFOGMODE { - D3DFOG_NONE = 0, - D3DFOG_EXP = 1, - D3DFOG_EXP2 = 2, - D3DFOG_LINEAR = 3, - D3DFOG_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ -} D3DFOGMODE; - -typedef enum _D3DZBUFFERTYPE { - D3DZB_FALSE = 0, - D3DZB_TRUE = 1, // Z buffering - D3DZB_USEW = 2, // W buffering - D3DZB_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ -} D3DZBUFFERTYPE; - -// Primitives supported by draw-primitive API -typedef enum _D3DPRIMITIVETYPE { - D3DPT_POINTLIST = 1, - D3DPT_LINELIST = 2, - D3DPT_LINESTRIP = 3, - D3DPT_TRIANGLELIST = 4, - D3DPT_TRIANGLESTRIP = 5, - D3DPT_TRIANGLEFAN = 6, - D3DPT_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ -} D3DPRIMITIVETYPE; - -typedef enum _D3DTRANSFORMSTATETYPE { - D3DTS_VIEW = 2, - D3DTS_PROJECTION = 3, - D3DTS_TEXTURE0 = 16, - D3DTS_TEXTURE1 = 17, - D3DTS_TEXTURE2 = 18, - D3DTS_TEXTURE3 = 19, - D3DTS_TEXTURE4 = 20, - D3DTS_TEXTURE5 = 21, - D3DTS_TEXTURE6 = 22, - D3DTS_TEXTURE7 = 23, - D3DTS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ -} D3DTRANSFORMSTATETYPE; - -#define D3DTS_WORLDMATRIX(index) (D3DTRANSFORMSTATETYPE)(index + 256) -#define D3DTS_WORLD D3DTS_WORLDMATRIX(0) -#define D3DTS_WORLD1 D3DTS_WORLDMATRIX(1) -#define D3DTS_WORLD2 D3DTS_WORLDMATRIX(2) -#define D3DTS_WORLD3 D3DTS_WORLDMATRIX(3) - -typedef enum _D3DRENDERSTATETYPE { - D3DRS_ZENABLE = 7, /* D3DZBUFFERTYPE (or TRUE/FALSE for legacy) */ - D3DRS_FILLMODE = 8, /* D3DFILL_MODE */ - D3DRS_SHADEMODE = 9, /* D3DSHADEMODE */ - D3DRS_LINEPATTERN = 10, /* D3DLINEPATTERN */ - D3DRS_ZWRITEENABLE = 14, /* TRUE to enable z writes */ - D3DRS_ALPHATESTENABLE = 15, /* TRUE to enable alpha tests */ - D3DRS_LASTPIXEL = 16, /* TRUE for last-pixel on lines */ - D3DRS_SRCBLEND = 19, /* D3DBLEND */ - D3DRS_DESTBLEND = 20, /* D3DBLEND */ - D3DRS_CULLMODE = 22, /* D3DCULL */ - D3DRS_ZFUNC = 23, /* D3DCMPFUNC */ - D3DRS_ALPHAREF = 24, /* D3DFIXED */ - D3DRS_ALPHAFUNC = 25, /* D3DCMPFUNC */ - D3DRS_DITHERENABLE = 26, /* TRUE to enable dithering */ - D3DRS_ALPHABLENDENABLE = 27, /* TRUE to enable alpha blending */ - D3DRS_FOGENABLE = 28, /* TRUE to enable fog blending */ - D3DRS_SPECULARENABLE = 29, /* TRUE to enable specular */ - D3DRS_ZVISIBLE = 30, /* TRUE to enable z checking */ - D3DRS_FOGCOLOR = 34, /* D3DCOLOR */ - D3DRS_FOGTABLEMODE = 35, /* D3DFOGMODE */ - D3DRS_FOGSTART = 36, /* Fog start (for both vertex and pixel fog) */ - D3DRS_FOGEND = 37, /* Fog end */ - D3DRS_FOGDENSITY = 38, /* Fog density */ - D3DRS_EDGEANTIALIAS = 40, /* TRUE to enable edge antialiasing */ - D3DRS_ZBIAS = 47, /* LONG Z bias */ - D3DRS_RANGEFOGENABLE = 48, /* Enables range-based fog */ - D3DRS_STENCILENABLE = 52, /* BOOL enable/disable stenciling */ - D3DRS_STENCILFAIL = 53, /* D3DSTENCILOP to do if stencil test fails */ - D3DRS_STENCILZFAIL = 54, /* D3DSTENCILOP to do if stencil test passes and Z test fails */ - D3DRS_STENCILPASS = 55, /* D3DSTENCILOP to do if both stencil and Z tests pass */ - D3DRS_STENCILFUNC = 56, /* D3DCMPFUNC fn. Stencil Test passes if ((ref & mask) stencilfn (stencil & mask)) is true */ - D3DRS_STENCILREF = 57, /* Reference value used in stencil test */ - D3DRS_STENCILMASK = 58, /* Mask value used in stencil test */ - D3DRS_STENCILWRITEMASK = 59, /* Write mask applied to values written to stencil buffer */ - D3DRS_TEXTUREFACTOR = 60, /* D3DCOLOR used for multi-texture blend */ - D3DRS_WRAP0 = 128, /* wrap for 1st texture coord. set */ - D3DRS_WRAP1 = 129, /* wrap for 2nd texture coord. set */ - D3DRS_WRAP2 = 130, /* wrap for 3rd texture coord. set */ - D3DRS_WRAP3 = 131, /* wrap for 4th texture coord. set */ - D3DRS_WRAP4 = 132, /* wrap for 5th texture coord. set */ - D3DRS_WRAP5 = 133, /* wrap for 6th texture coord. set */ - D3DRS_WRAP6 = 134, /* wrap for 7th texture coord. set */ - D3DRS_WRAP7 = 135, /* wrap for 8th texture coord. set */ - D3DRS_CLIPPING = 136, - D3DRS_LIGHTING = 137, - D3DRS_AMBIENT = 139, - D3DRS_FOGVERTEXMODE = 140, - D3DRS_COLORVERTEX = 141, - D3DRS_LOCALVIEWER = 142, - D3DRS_NORMALIZENORMALS = 143, - D3DRS_DIFFUSEMATERIALSOURCE = 145, - D3DRS_SPECULARMATERIALSOURCE = 146, - D3DRS_AMBIENTMATERIALSOURCE = 147, - D3DRS_EMISSIVEMATERIALSOURCE = 148, - D3DRS_VERTEXBLEND = 151, - D3DRS_CLIPPLANEENABLE = 152, - D3DRS_SOFTWAREVERTEXPROCESSING = 153, - D3DRS_POINTSIZE = 154, /* float point size */ - D3DRS_POINTSIZE_MIN = 155, /* float point size min threshold */ - D3DRS_POINTSPRITEENABLE = 156, /* BOOL point texture coord control */ - D3DRS_POINTSCALEENABLE = 157, /* BOOL point size scale enable */ - D3DRS_POINTSCALE_A = 158, /* float point attenuation A value */ - D3DRS_POINTSCALE_B = 159, /* float point attenuation B value */ - D3DRS_POINTSCALE_C = 160, /* float point attenuation C value */ - D3DRS_MULTISAMPLEANTIALIAS = 161, // BOOL - set to do FSAA with multisample buffer - D3DRS_MULTISAMPLEMASK = 162, // DWORD - per-sample enable/disable - D3DRS_PATCHEDGESTYLE = 163, // Sets whether patch edges will use float style tessellation - D3DRS_PATCHSEGMENTS = 164, // Number of segments per edge when drawing patches - D3DRS_DEBUGMONITORTOKEN = 165, // DEBUG ONLY - token to debug monitor - D3DRS_POINTSIZE_MAX = 166, /* float point size max threshold */ - D3DRS_INDEXEDVERTEXBLENDENABLE = 167, - D3DRS_COLORWRITEENABLE = 168, // per-channel write enable - D3DRS_TWEENFACTOR = 170, // float tween factor - D3DRS_BLENDOP = 171, // D3DBLENDOP setting - - D3DRS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ -} D3DRENDERSTATETYPE; - -// Values for material source -typedef enum _D3DMATERIALCOLORSOURCE -{ - D3DMCS_MATERIAL = 0, // Color from material is used - D3DMCS_COLOR1 = 1, // Diffuse vertex color is used - D3DMCS_COLOR2 = 2, // Specular vertex color is used - D3DMCS_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum -} D3DMATERIALCOLORSOURCE; - -// Bias to apply to the texture coordinate set to apply a wrap to. -#define D3DRENDERSTATE_WRAPBIAS 128UL - -/* Flags to construct the WRAP render states */ -#define D3DWRAP_U 0x00000001L -#define D3DWRAP_V 0x00000002L -#define D3DWRAP_W 0x00000004L - -/* Flags to construct the WRAP render states for 1D thru 4D texture coordinates */ -#define D3DWRAPCOORD_0 0x00000001L // same as D3DWRAP_U -#define D3DWRAPCOORD_1 0x00000002L // same as D3DWRAP_V -#define D3DWRAPCOORD_2 0x00000004L // same as D3DWRAP_W -#define D3DWRAPCOORD_3 0x00000008L - -/* Flags to construct D3DRS_COLORWRITEENABLE */ -#define D3DCOLORWRITEENABLE_RED (1L<<0) -#define D3DCOLORWRITEENABLE_GREEN (1L<<1) -#define D3DCOLORWRITEENABLE_BLUE (1L<<2) -#define D3DCOLORWRITEENABLE_ALPHA (1L<<3) - -/* - * State enumerants for per-stage texture processing. - */ -typedef enum _D3DTEXTURESTAGESTATETYPE -{ - D3DTSS_COLOROP = 1, /* D3DTEXTUREOP - per-stage blending controls for color channels */ - D3DTSS_COLORARG1 = 2, /* D3DTA_* (texture arg) */ - D3DTSS_COLORARG2 = 3, /* D3DTA_* (texture arg) */ - D3DTSS_ALPHAOP = 4, /* D3DTEXTUREOP - per-stage blending controls for alpha channel */ - D3DTSS_ALPHAARG1 = 5, /* D3DTA_* (texture arg) */ - D3DTSS_ALPHAARG2 = 6, /* D3DTA_* (texture arg) */ - D3DTSS_BUMPENVMAT00 = 7, /* float (bump mapping matrix) */ - D3DTSS_BUMPENVMAT01 = 8, /* float (bump mapping matrix) */ - D3DTSS_BUMPENVMAT10 = 9, /* float (bump mapping matrix) */ - D3DTSS_BUMPENVMAT11 = 10, /* float (bump mapping matrix) */ - D3DTSS_TEXCOORDINDEX = 11, /* identifies which set of texture coordinates index this texture */ - D3DTSS_ADDRESSU = 13, /* D3DTEXTUREADDRESS for U coordinate */ - D3DTSS_ADDRESSV = 14, /* D3DTEXTUREADDRESS for V coordinate */ - D3DTSS_BORDERCOLOR = 15, /* D3DCOLOR */ - D3DTSS_MAGFILTER = 16, /* D3DTEXTUREFILTER filter to use for magnification */ - D3DTSS_MINFILTER = 17, /* D3DTEXTUREFILTER filter to use for minification */ - D3DTSS_MIPFILTER = 18, /* D3DTEXTUREFILTER filter to use between mipmaps during minification */ - D3DTSS_MIPMAPLODBIAS = 19, /* float Mipmap LOD bias */ - D3DTSS_MAXMIPLEVEL = 20, /* DWORD 0..(n-1) LOD index of largest map to use (0 == largest) */ - D3DTSS_MAXANISOTROPY = 21, /* DWORD maximum anisotropy */ - D3DTSS_BUMPENVLSCALE = 22, /* float scale for bump map luminance */ - D3DTSS_BUMPENVLOFFSET = 23, /* float offset for bump map luminance */ - D3DTSS_TEXTURETRANSFORMFLAGS = 24, /* D3DTEXTURETRANSFORMFLAGS controls texture transform */ - D3DTSS_ADDRESSW = 25, /* D3DTEXTUREADDRESS for W coordinate */ - D3DTSS_COLORARG0 = 26, /* D3DTA_* third arg for triadic ops */ - D3DTSS_ALPHAARG0 = 27, /* D3DTA_* third arg for triadic ops */ - D3DTSS_RESULTARG = 28, /* D3DTA_* arg for result (CURRENT or TEMP) */ - D3DTSS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ -} D3DTEXTURESTAGESTATETYPE; - -// Values, used with D3DTSS_TEXCOORDINDEX, to specify that the vertex data(position -// and normal in the camera space) should be taken as texture coordinates -// Low 16 bits are used to specify texture coordinate index, to take the WRAP mode from -// -#define D3DTSS_TCI_PASSTHRU 0x00000000 -#define D3DTSS_TCI_CAMERASPACENORMAL 0x00010000 -#define D3DTSS_TCI_CAMERASPACEPOSITION 0x00020000 -#define D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR 0x00030000 - -/* - * Enumerations for COLOROP and ALPHAOP texture blending operations set in - * texture processing stage controls in D3DRENDERSTATE. - */ -typedef enum _D3DTEXTUREOP -{ - // Control - D3DTOP_DISABLE = 1, // disables stage - D3DTOP_SELECTARG1 = 2, // the default - D3DTOP_SELECTARG2 = 3, - - // Modulate - D3DTOP_MODULATE = 4, // multiply args together - D3DTOP_MODULATE2X = 5, // multiply and 1 bit - D3DTOP_MODULATE4X = 6, // multiply and 2 bits - - // Add - D3DTOP_ADD = 7, // add arguments together - D3DTOP_ADDSIGNED = 8, // add with -0.5 bias - D3DTOP_ADDSIGNED2X = 9, // as above but left 1 bit - D3DTOP_SUBTRACT = 10, // Arg1 - Arg2, with no saturation - D3DTOP_ADDSMOOTH = 11, // add 2 args, subtract product - // Arg1 + Arg2 - Arg1*Arg2 - // = Arg1 + (1-Arg1)*Arg2 - - // Linear alpha blend: Arg1*(Alpha) + Arg2*(1-Alpha) - D3DTOP_BLENDDIFFUSEALPHA = 12, // iterated alpha - D3DTOP_BLENDTEXTUREALPHA = 13, // texture alpha - D3DTOP_BLENDFACTORALPHA = 14, // alpha from D3DRENDERSTATE_TEXTUREFACTOR - - // Linear alpha blend with pre-multiplied arg1 input: Arg1 + Arg2*(1-Alpha) - D3DTOP_BLENDTEXTUREALPHAPM = 15, // texture alpha - D3DTOP_BLENDCURRENTALPHA = 16, // by alpha of current color - - // Specular mapping - D3DTOP_PREMODULATE = 17, // modulate with next texture before use - D3DTOP_MODULATEALPHA_ADDCOLOR = 18, // Arg1.RGB + Arg1.A*Arg2.RGB - // COLOROP only - D3DTOP_MODULATECOLOR_ADDALPHA = 19, // Arg1.RGB*Arg2.RGB + Arg1.A - // COLOROP only - D3DTOP_MODULATEINVALPHA_ADDCOLOR = 20, // (1-Arg1.A)*Arg2.RGB + Arg1.RGB - // COLOROP only - D3DTOP_MODULATEINVCOLOR_ADDALPHA = 21, // (1-Arg1.RGB)*Arg2.RGB + Arg1.A - // COLOROP only - - // Bump mapping - D3DTOP_BUMPENVMAP = 22, // per pixel env map perturbation - D3DTOP_BUMPENVMAPLUMINANCE = 23, // with luminance channel - - // This can do either diffuse or specular bump mapping with correct input. - // Performs the function (Arg1.R*Arg2.R + Arg1.G*Arg2.G + Arg1.B*Arg2.B) - // where each component has been scaled and offset to make it signed. - // The result is replicated into all four (including alpha) channels. - // This is a valid COLOROP only. - D3DTOP_DOTPRODUCT3 = 24, - - // Triadic ops - D3DTOP_MULTIPLYADD = 25, // Arg0 + Arg1*Arg2 - D3DTOP_LERP = 26, // (Arg0)*Arg1 + (1-Arg0)*Arg2 - - D3DTOP_FORCE_DWORD = 0x7fffffff, -} D3DTEXTUREOP; - -/* - * Values for COLORARG0,1,2, ALPHAARG0,1,2, and RESULTARG texture blending - * operations set in texture processing stage controls in D3DRENDERSTATE. - */ -#define D3DTA_SELECTMASK 0x0000000f // mask for arg selector -#define D3DTA_DIFFUSE 0x00000000 // select diffuse color (read only) -#define D3DTA_CURRENT 0x00000001 // select stage destination register (read/write) -#define D3DTA_TEXTURE 0x00000002 // select texture color (read only) -#define D3DTA_TFACTOR 0x00000003 // select RENDERSTATE_TEXTUREFACTOR (read only) -#define D3DTA_SPECULAR 0x00000004 // select specular color (read only) -#define D3DTA_TEMP 0x00000005 // select temporary register color (read/write) -#define D3DTA_COMPLEMENT 0x00000010 // take 1.0 - x (read modifier) -#define D3DTA_ALPHAREPLICATE 0x00000020 // replicate alpha to color components (read modifier) - -// -// Values for D3DTSS_***FILTER texture stage states -// -typedef enum _D3DTEXTUREFILTERTYPE -{ - D3DTEXF_NONE = 0, // filtering disabled (valid for mip filter only) - D3DTEXF_POINT = 1, // nearest - D3DTEXF_LINEAR = 2, // linear interpolation - D3DTEXF_ANISOTROPIC = 3, // anisotropic - D3DTEXF_FLATCUBIC = 4, // cubic - D3DTEXF_GAUSSIANCUBIC = 5, // different cubic kernel - D3DTEXF_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum -} D3DTEXTUREFILTERTYPE; - -/* Bits for Flags in ProcessVertices call */ - -#define D3DPV_DONOTCOPYDATA (1 << 0) - -//------------------------------------------------------------------- - -// Flexible vertex format bits -// -#define D3DFVF_RESERVED0 0x001 -#define D3DFVF_POSITION_MASK 0x00E -#define D3DFVF_XYZ 0x002 -#define D3DFVF_XYZRHW 0x004 -#define D3DFVF_XYZB1 0x006 -#define D3DFVF_XYZB2 0x008 -#define D3DFVF_XYZB3 0x00a -#define D3DFVF_XYZB4 0x00c -#define D3DFVF_XYZB5 0x00e - -#define D3DFVF_NORMAL 0x010 -#define D3DFVF_PSIZE 0x020 -#define D3DFVF_DIFFUSE 0x040 -#define D3DFVF_SPECULAR 0x080 - -#define D3DFVF_TEXCOUNT_MASK 0xf00 -#define D3DFVF_TEXCOUNT_SHIFT 8 -#define D3DFVF_TEX0 0x000 -#define D3DFVF_TEX1 0x100 -#define D3DFVF_TEX2 0x200 -#define D3DFVF_TEX3 0x300 -#define D3DFVF_TEX4 0x400 -#define D3DFVF_TEX5 0x500 -#define D3DFVF_TEX6 0x600 -#define D3DFVF_TEX7 0x700 -#define D3DFVF_TEX8 0x800 - -#define D3DFVF_LASTBETA_UBYTE4 0x1000 - -#define D3DFVF_RESERVED2 0xE000 // 4 reserved bits - -//--------------------------------------------------------------------- -// Vertex Shaders -// - -/* - -Vertex Shader Declaration - -The declaration portion of a vertex shader defines the static external -interface of the shader. The information in the declaration includes: - -- Assignments of vertex shader input registers to data streams. These -assignments bind a specific vertex register to a single component within a -vertex stream. A vertex stream element is identified by a byte offset -within the stream and a type. The type specifies the arithmetic data type -plus the dimensionality (1, 2, 3, or 4 values). Stream data which is -less than 4 values are always expanded out to 4 values with zero or more -0.F values and one 1.F value. - -- Assignment of vertex shader input registers to implicit data from the -primitive tessellator. This controls the loading of vertex data which is -not loaded from a stream, but rather is generated during primitive -tessellation prior to the vertex shader. - -- Loading data into the constant memory at the time a shader is set as the -current shader. Each token specifies values for one or more contiguous 4 -DWORD constant registers. This allows the shader to update an arbitrary -subset of the constant memory, overwriting the device state (which -contains the current values of the constant memory). Note that these -values can be subsequently overwritten (between DrawPrimitive calls) -during the time a shader is bound to a device via the -SetVertexShaderConstant method. - - -Declaration arrays are single-dimensional arrays of DWORDs composed of -multiple tokens each of which is one or more DWORDs. The single-DWORD -token value 0xFFFFFFFF is a special token used to indicate the end of the -declaration array. The single DWORD token value 0x00000000 is a NOP token -with is ignored during the declaration parsing. Note that 0x00000000 is a -valid value for DWORDs following the first DWORD for multiple word tokens. - -[31:29] TokenType - 0x0 - NOP (requires all DWORD bits to be zero) - 0x1 - stream selector - 0x2 - stream data definition (map to vertex input memory) - 0x3 - vertex input memory from tessellator - 0x4 - constant memory from shader - 0x5 - extension - 0x6 - reserved - 0x7 - end-of-array (requires all DWORD bits to be 1) - -NOP Token (single DWORD token) - [31:29] 0x0 - [28:00] 0x0 - -Stream Selector (single DWORD token) - [31:29] 0x1 - [28] indicates whether this is a tessellator stream - [27:04] 0x0 - [03:00] stream selector (0..15) - -Stream Data Definition (single DWORD token) - Vertex Input Register Load - [31:29] 0x2 - [28] 0x0 - [27:20] 0x0 - [19:16] type (dimensionality and data type) - [15:04] 0x0 - [03:00] vertex register address (0..15) - Data Skip (no register load) - [31:29] 0x2 - [28] 0x1 - [27:20] 0x0 - [19:16] count of DWORDS to skip over (0..15) - [15:00] 0x0 - Vertex Input Memory from Tessellator Data (single DWORD token) - [31:29] 0x3 - [28] indicates whether data is normals or u/v - [27:24] 0x0 - [23:20] vertex register address (0..15) - [19:16] type (dimensionality) - [15:04] 0x0 - [03:00] vertex register address (0..15) - -Constant Memory from Shader (multiple DWORD token) - [31:29] 0x4 - [28:25] count of 4*DWORD constants to load (0..15) - [24:07] 0x0 - [06:00] constant memory address (0..95) - -Extension Token (single or multiple DWORD token) - [31:29] 0x5 - [28:24] count of additional DWORDs in token (0..31) - [23:00] extension-specific information - -End-of-array token (single DWORD token) - [31:29] 0x7 - [28:00] 0x1fffffff - -The stream selector token must be immediately followed by a contiguous set of stream data definition tokens. This token sequence fully defines that stream, including the set of elements within the stream, the order in which the elements appear, the type of each element, and the vertex register into which to load an element. -Streams are allowed to include data which is not loaded into a vertex register, thus allowing data which is not used for this shader to exist in the vertex stream. This skipped data is defined only by a count of DWORDs to skip over, since the type information is irrelevant. -The token sequence: -Stream Select: stream=0 -Stream Data Definition (Load): type=FLOAT3; register=3 -Stream Data Definition (Load): type=FLOAT3; register=4 -Stream Data Definition (Skip): count=2 -Stream Data Definition (Load): type=FLOAT2; register=7 - -defines stream zero to consist of 4 elements, 3 of which are loaded into registers and the fourth skipped over. Register 3 is loaded with the first three DWORDs in each vertex interpreted as FLOAT data. Register 4 is loaded with the 4th, 5th, and 6th DWORDs interpreted as FLOAT data. The next two DWORDs (7th and 8th) are skipped over and not loaded into any vertex input register. Register 7 is loaded with the 9th and 10th DWORDS interpreted as FLOAT data. -Placing of tokens other than NOPs between the Stream Selector and Stream Data Definition tokens is disallowed. - -*/ - -typedef enum _D3DVSD_TOKENTYPE -{ - D3DVSD_TOKEN_NOP = 0, // NOP or extension - D3DVSD_TOKEN_STREAM, // stream selector - D3DVSD_TOKEN_STREAMDATA, // stream data definition (map to vertex input memory) - D3DVSD_TOKEN_TESSELLATOR, // vertex input memory from tessellator - D3DVSD_TOKEN_CONSTMEM, // constant memory from shader - D3DVSD_TOKEN_EXT, // extension - D3DVSD_TOKEN_END = 7, // end-of-array (requires all DWORD bits to be 1) - D3DVSD_FORCE_DWORD = 0x7fffffff,// force 32-bit size enum -} D3DVSD_TOKENTYPE; - -#define D3DVSD_TOKENTYPESHIFT 29 -#define D3DVSD_TOKENTYPEMASK (7 << D3DVSD_TOKENTYPESHIFT) - -#define D3DVSD_STREAMNUMBERSHIFT 0 -#define D3DVSD_STREAMNUMBERMASK (0xF << D3DVSD_STREAMNUMBERSHIFT) - -#define D3DVSD_DATALOADTYPESHIFT 28 -#define D3DVSD_DATALOADTYPEMASK (0x1 << D3DVSD_DATALOADTYPESHIFT) - -#define D3DVSD_DATATYPESHIFT 16 -#define D3DVSD_DATATYPEMASK (0xF << D3DVSD_DATATYPESHIFT) - -#define D3DVSD_SKIPCOUNTSHIFT 16 -#define D3DVSD_SKIPCOUNTMASK (0xF << D3DVSD_SKIPCOUNTSHIFT) - -#define D3DVSD_VERTEXREGSHIFT 0 -#define D3DVSD_VERTEXREGMASK (0x1F << D3DVSD_VERTEXREGSHIFT) - -#define D3DVSD_VERTEXREGINSHIFT 20 -#define D3DVSD_VERTEXREGINMASK (0xF << D3DVSD_VERTEXREGINSHIFT) - -#define D3DVSD_CONSTCOUNTSHIFT 25 -#define D3DVSD_CONSTCOUNTMASK (0xF << D3DVSD_CONSTCOUNTSHIFT) - -#define D3DVSD_CONSTADDRESSSHIFT 0 -#define D3DVSD_CONSTADDRESSMASK (0x7F << D3DVSD_CONSTADDRESSSHIFT) - -#define D3DVSD_CONSTRSSHIFT 16 -#define D3DVSD_CONSTRSMASK (0x1FFF << D3DVSD_CONSTRSSHIFT) - -#define D3DVSD_EXTCOUNTSHIFT 24 -#define D3DVSD_EXTCOUNTMASK (0x1F << D3DVSD_EXTCOUNTSHIFT) - -#define D3DVSD_EXTINFOSHIFT 0 -#define D3DVSD_EXTINFOMASK (0xFFFFFF << D3DVSD_EXTINFOSHIFT) - -#define D3DVSD_MAKETOKENTYPE(tokenType) ((tokenType << D3DVSD_TOKENTYPESHIFT) & D3DVSD_TOKENTYPEMASK) - -// macros for generation of CreateVertexShader Declaration token array - -// Set current stream -// _StreamNumber [0..(MaxStreams-1)] stream to get data from -// -#define D3DVSD_STREAM( _StreamNumber ) \ - (D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_STREAM) | (_StreamNumber)) - -// Set tessellator stream -// -#define D3DVSD_STREAMTESSSHIFT 28 -#define D3DVSD_STREAMTESSMASK (1 << D3DVSD_STREAMTESSSHIFT) -#define D3DVSD_STREAM_TESS( ) \ - (D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_STREAM) | (D3DVSD_STREAMTESSMASK)) - -// bind single vertex register to vertex element from vertex stream -// -// _VertexRegister [0..15] address of the vertex register -// _Type [D3DVSDT_*] dimensionality and arithmetic data type - -#define D3DVSD_REG( _VertexRegister, _Type ) \ - (D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_STREAMDATA) | \ - ((_Type) << D3DVSD_DATATYPESHIFT) | (_VertexRegister)) - -// Skip _DWORDCount DWORDs in vertex -// -#define D3DVSD_SKIP( _DWORDCount ) \ - (D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_STREAMDATA) | 0x10000000 | \ - ((_DWORDCount) << D3DVSD_SKIPCOUNTSHIFT)) - -// load data into vertex shader constant memory -// -// _ConstantAddress [0..95] - address of constant array to begin filling data -// _Count [0..15] - number of constant vectors to load (4 DWORDs each) -// followed by 4*_Count DWORDS of data -// -#define D3DVSD_CONST( _ConstantAddress, _Count ) \ - (D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_CONSTMEM) | \ - ((_Count) << D3DVSD_CONSTCOUNTSHIFT) | (_ConstantAddress)) - -// enable tessellator generated normals -// -// _VertexRegisterIn [0..15] address of vertex register whose input stream -// will be used in normal computation -// _VertexRegisterOut [0..15] address of vertex register to output the normal to -// -#define D3DVSD_TESSNORMAL( _VertexRegisterIn, _VertexRegisterOut ) \ - (D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_TESSELLATOR) | \ - ((_VertexRegisterIn) << D3DVSD_VERTEXREGINSHIFT) | \ - ((0x02) << D3DVSD_DATATYPESHIFT) | (_VertexRegisterOut)) - -// enable tessellator generated surface parameters -// -// _VertexRegister [0..15] address of vertex register to output parameters -// -#define D3DVSD_TESSUV( _VertexRegister ) \ - (D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_TESSELLATOR) | 0x10000000 | \ - ((0x01) << D3DVSD_DATATYPESHIFT) | (_VertexRegister)) - -// Generates END token -// -#define D3DVSD_END() 0xFFFFFFFF - -// Generates NOP token -#define D3DVSD_NOP() 0x00000000 - -// bit declarations for _Type fields -#define D3DVSDT_FLOAT1 0x00 // 1D float expanded to (value, 0., 0., 1.) -#define D3DVSDT_FLOAT2 0x01 // 2D float expanded to (value, value, 0., 1.) -#define D3DVSDT_FLOAT3 0x02 // 3D float expanded to (value, value, value, 1.) -#define D3DVSDT_FLOAT4 0x03 // 4D float -#define D3DVSDT_D3DCOLOR 0x04 // 4D packed unsigned bytes mapped to 0. to 1. range - // Input is in D3DCOLOR format (ARGB) expanded to (R, G, B, A) -#define D3DVSDT_UBYTE4 0x05 // 4D unsigned byte -#define D3DVSDT_SHORT2 0x06 // 2D signed short expanded to (value, value, 0., 1.) -#define D3DVSDT_SHORT4 0x07 // 4D signed short - -// assignments of vertex input registers for fixed function vertex shader -// -#define D3DVSDE_POSITION 0 -#define D3DVSDE_BLENDWEIGHT 1 -#define D3DVSDE_BLENDINDICES 2 -#define D3DVSDE_NORMAL 3 -#define D3DVSDE_PSIZE 4 -#define D3DVSDE_DIFFUSE 5 -#define D3DVSDE_SPECULAR 6 -#define D3DVSDE_TEXCOORD0 7 -#define D3DVSDE_TEXCOORD1 8 -#define D3DVSDE_TEXCOORD2 9 -#define D3DVSDE_TEXCOORD3 10 -#define D3DVSDE_TEXCOORD4 11 -#define D3DVSDE_TEXCOORD5 12 -#define D3DVSDE_TEXCOORD6 13 -#define D3DVSDE_TEXCOORD7 14 -#define D3DVSDE_POSITION2 15 -#define D3DVSDE_NORMAL2 16 - -// Maximum supported number of texture coordinate sets -#define D3DDP_MAXTEXCOORD 8 - - -// -// Instruction Token Bit Definitions -// -#define D3DSI_OPCODE_MASK 0x0000FFFF - -typedef enum _D3DSHADER_INSTRUCTION_OPCODE_TYPE -{ - D3DSIO_NOP = 0, // PS/VS - D3DSIO_MOV , // PS/VS - D3DSIO_ADD , // PS/VS - D3DSIO_SUB , // PS - D3DSIO_MAD , // PS/VS - D3DSIO_MUL , // PS/VS - D3DSIO_RCP , // VS - D3DSIO_RSQ , // VS - D3DSIO_DP3 , // PS/VS - D3DSIO_DP4 , // PS/VS - D3DSIO_MIN , // VS - D3DSIO_MAX , // VS - D3DSIO_SLT , // VS - D3DSIO_SGE , // VS - D3DSIO_EXP , // VS - D3DSIO_LOG , // VS - D3DSIO_LIT , // VS - D3DSIO_DST , // VS - D3DSIO_LRP , // PS - D3DSIO_FRC , // VS - D3DSIO_M4x4 , // VS - D3DSIO_M4x3 , // VS - D3DSIO_M3x4 , // VS - D3DSIO_M3x3 , // VS - D3DSIO_M3x2 , // VS - - D3DSIO_TEXCOORD = 64, // PS - D3DSIO_TEXKILL , // PS - D3DSIO_TEX , // PS - D3DSIO_TEXBEM , // PS - D3DSIO_TEXBEML , // PS - D3DSIO_TEXREG2AR , // PS - D3DSIO_TEXREG2GB , // PS - D3DSIO_TEXM3x2PAD , // PS - D3DSIO_TEXM3x2TEX , // PS - D3DSIO_TEXM3x3PAD , // PS - D3DSIO_TEXM3x3TEX , // PS - D3DSIO_TEXM3x3DIFF , // PS - D3DSIO_TEXM3x3SPEC , // PS - D3DSIO_TEXM3x3VSPEC , // PS - D3DSIO_EXPP , // VS - D3DSIO_LOGP , // VS - D3DSIO_CND , // PS - D3DSIO_DEF , // PS - D3DSIO_COMMENT = 0xFFFE, - D3DSIO_END = 0xFFFF, - - D3DSIO_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum -} D3DSHADER_INSTRUCTION_OPCODE_TYPE; - -// -// Co-Issue Instruction Modifier - if set then this instruction is to be -// issued in parallel with the previous instruction(s) for which this bit -// is not set. -// -#define D3DSI_COISSUE 0x40000000 - -// -// Parameter Token Bit Definitions -// -#define D3DSP_REGNUM_MASK 0x00000FFF - -// destination parameter write mask -#define D3DSP_WRITEMASK_0 0x00010000 // Component 0 (X;Red) -#define D3DSP_WRITEMASK_1 0x00020000 // Component 1 (Y;Green) -#define D3DSP_WRITEMASK_2 0x00040000 // Component 2 (Z;Blue) -#define D3DSP_WRITEMASK_3 0x00080000 // Component 3 (W;Alpha) -#define D3DSP_WRITEMASK_ALL 0x000F0000 // All Components - -// destination parameter modifiers -#define D3DSP_DSTMOD_SHIFT 20 -#define D3DSP_DSTMOD_MASK 0x00F00000 - -typedef enum _D3DSHADER_PARAM_DSTMOD_TYPE -{ - D3DSPDM_NONE = 0<<D3DSP_DSTMOD_SHIFT, // nop - D3DSPDM_SATURATE= 1<<D3DSP_DSTMOD_SHIFT, // clamp to 0. to 1. range - D3DSPDM_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum -} D3DSHADER_PARAM_DSTMOD_TYPE; - -// destination parameter -#define D3DSP_DSTSHIFT_SHIFT 24 -#define D3DSP_DSTSHIFT_MASK 0x0F000000 - -// destination/source parameter register type -#define D3DSP_REGTYPE_SHIFT 28 -#define D3DSP_REGTYPE_MASK 0x70000000 - -typedef enum _D3DSHADER_PARAM_REGISTER_TYPE -{ - D3DSPR_TEMP = 0<<D3DSP_REGTYPE_SHIFT, // Temporary Register File - D3DSPR_INPUT = 1<<D3DSP_REGTYPE_SHIFT, // Input Register File - D3DSPR_CONST = 2<<D3DSP_REGTYPE_SHIFT, // Constant Register File - D3DSPR_ADDR = 3<<D3DSP_REGTYPE_SHIFT, // Address Register (VS) - D3DSPR_TEXTURE = 3<<D3DSP_REGTYPE_SHIFT, // Texture Register File (PS) - D3DSPR_RASTOUT = 4<<D3DSP_REGTYPE_SHIFT, // Rasterizer Register File - D3DSPR_ATTROUT = 5<<D3DSP_REGTYPE_SHIFT, // Attribute Output Register File - D3DSPR_TEXCRDOUT= 6<<D3DSP_REGTYPE_SHIFT, // Texture Coordinate Output Register File - D3DSPR_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum -} D3DSHADER_PARAM_REGISTER_TYPE; - -// Register offsets in the Rasterizer Register File -// -typedef enum _D3DVS_RASTOUT_OFFSETS -{ - D3DSRO_POSITION = 0, - D3DSRO_FOG, - D3DSRO_POINT_SIZE, - D3DSRO_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum -} D3DVS_RASTOUT_OFFSETS; - -// Source operand addressing modes - -#define D3DVS_ADDRESSMODE_SHIFT 13 -#define D3DVS_ADDRESSMODE_MASK (1 << D3DVS_ADDRESSMODE_SHIFT) - -typedef enum _D3DVS_ADDRESSMODE_TYPE -{ - D3DVS_ADDRMODE_ABSOLUTE = (0 << D3DVS_ADDRESSMODE_SHIFT), - D3DVS_ADDRMODE_RELATIVE = (1 << D3DVS_ADDRESSMODE_SHIFT), // Relative to register A0 - D3DVS_ADDRMODE_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum -} D3DVS_ADDRESSMODE_TYPE; - -// Source operand swizzle definitions -// -#define D3DVS_SWIZZLE_SHIFT 16 -#define D3DVS_SWIZZLE_MASK 0x00FF0000 - -// The following bits define where to take component X: - -#define D3DVS_X_X (0 << D3DVS_SWIZZLE_SHIFT) -#define D3DVS_X_Y (1 << D3DVS_SWIZZLE_SHIFT) -#define D3DVS_X_Z (2 << D3DVS_SWIZZLE_SHIFT) -#define D3DVS_X_W (3 << D3DVS_SWIZZLE_SHIFT) - -// The following bits define where to take component Y: - -#define D3DVS_Y_X (0 << (D3DVS_SWIZZLE_SHIFT + 2)) -#define D3DVS_Y_Y (1 << (D3DVS_SWIZZLE_SHIFT + 2)) -#define D3DVS_Y_Z (2 << (D3DVS_SWIZZLE_SHIFT + 2)) -#define D3DVS_Y_W (3 << (D3DVS_SWIZZLE_SHIFT + 2)) - -// The following bits define where to take component Z: - -#define D3DVS_Z_X (0 << (D3DVS_SWIZZLE_SHIFT + 4)) -#define D3DVS_Z_Y (1 << (D3DVS_SWIZZLE_SHIFT + 4)) -#define D3DVS_Z_Z (2 << (D3DVS_SWIZZLE_SHIFT + 4)) -#define D3DVS_Z_W (3 << (D3DVS_SWIZZLE_SHIFT + 4)) - -// The following bits define where to take component W: - -#define D3DVS_W_X (0 << (D3DVS_SWIZZLE_SHIFT + 6)) -#define D3DVS_W_Y (1 << (D3DVS_SWIZZLE_SHIFT + 6)) -#define D3DVS_W_Z (2 << (D3DVS_SWIZZLE_SHIFT + 6)) -#define D3DVS_W_W (3 << (D3DVS_SWIZZLE_SHIFT + 6)) - -// Value when there is no swizzle (X is taken from X, Y is taken from Y, -// Z is taken from Z, W is taken from W -// -#define D3DVS_NOSWIZZLE (D3DVS_X_X | D3DVS_Y_Y | D3DVS_Z_Z | D3DVS_W_W) - -// source parameter swizzle -#define D3DSP_SWIZZLE_SHIFT 16 -#define D3DSP_SWIZZLE_MASK 0x00FF0000 - -#define D3DSP_NOSWIZZLE \ - ( (0 << (D3DSP_SWIZZLE_SHIFT + 0)) | \ - (1 << (D3DSP_SWIZZLE_SHIFT + 2)) | \ - (2 << (D3DSP_SWIZZLE_SHIFT + 4)) | \ - (3 << (D3DSP_SWIZZLE_SHIFT + 6)) ) - -// pixel-shader swizzle ops -#define D3DSP_REPLICATEALPHA \ - ( (3 << (D3DSP_SWIZZLE_SHIFT + 0)) | \ - (3 << (D3DSP_SWIZZLE_SHIFT + 2)) | \ - (3 << (D3DSP_SWIZZLE_SHIFT + 4)) | \ - (3 << (D3DSP_SWIZZLE_SHIFT + 6)) ) - -// source parameter modifiers -#define D3DSP_SRCMOD_SHIFT 24 -#define D3DSP_SRCMOD_MASK 0x0F000000 - -typedef enum _D3DSHADER_PARAM_SRCMOD_TYPE -{ - D3DSPSM_NONE = 0<<D3DSP_SRCMOD_SHIFT, // nop - D3DSPSM_NEG = 1<<D3DSP_SRCMOD_SHIFT, // negate - D3DSPSM_BIAS = 2<<D3DSP_SRCMOD_SHIFT, // bias - D3DSPSM_BIASNEG = 3<<D3DSP_SRCMOD_SHIFT, // bias and negate - D3DSPSM_SIGN = 4<<D3DSP_SRCMOD_SHIFT, // sign - D3DSPSM_SIGNNEG = 5<<D3DSP_SRCMOD_SHIFT, // sign and negate - D3DSPSM_COMP = 6<<D3DSP_SRCMOD_SHIFT, // complement - D3DSPSM_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum -} D3DSHADER_PARAM_SRCMOD_TYPE; - -// pixel shader version token -#define D3DPS_VERSION(_Major,_Minor) (0xFFFF0000|((_Major)<<8)|(_Minor)) - -// vertex shader version token -#define D3DVS_VERSION(_Major,_Minor) (0xFFFE0000|((_Major)<<8)|(_Minor)) - -// extract major/minor from version cap -#define D3DSHADER_VERSION_MAJOR(_Version) (((_Version)>>8)&0xFF) -#define D3DSHADER_VERSION_MINOR(_Version) (((_Version)>>0)&0xFF) - -// destination/source parameter register type -#define D3DSI_COMMENTSIZE_SHIFT 16 -#define D3DSI_COMMENTSIZE_MASK 0x7FFF0000 -#define D3DSHADER_COMMENT(_DWordSize) \ - ((((_DWordSize)<<D3DSI_COMMENTSIZE_SHIFT)&D3DSI_COMMENTSIZE_MASK)|D3DSIO_COMMENT) - -// pixel/vertex shader end token -#define D3DPS_END() 0x0000FFFF -#define D3DVS_END() 0x0000FFFF - -//--------------------------------------------------------------------- - -// High order surfaces -// -typedef enum _D3DBASISTYPE -{ - D3DBASIS_BEZIER = 0, - D3DBASIS_BSPLINE = 1, - D3DBASIS_INTERPOLATE = 2, - D3DBASIS_FORCE_DWORD = 0x7fffffff, -} D3DBASISTYPE; - -typedef enum _D3DORDERTYPE -{ - D3DORDER_LINEAR = 1, - D3DORDER_CUBIC = 3, - D3DORDER_QUINTIC = 5, - D3DORDER_FORCE_DWORD = 0x7fffffff, -} D3DORDERTYPE; - -typedef enum _D3DPATCHEDGESTYLE -{ - D3DPATCHEDGE_DISCRETE = 0, - D3DPATCHEDGE_CONTINUOUS = 1, - D3DPATCHEDGE_FORCE_DWORD = 0x7fffffff, -} D3DPATCHEDGESTYLE; - -typedef enum _D3DSTATEBLOCKTYPE -{ - D3DSBT_ALL = 1, // capture all state - D3DSBT_PIXELSTATE = 2, // capture pixel state - D3DSBT_VERTEXSTATE = 3, // capture vertex state - D3DSBT_FORCE_DWORD = 0x7fffffff, -} D3DSTATEBLOCKTYPE; - -// The D3DVERTEXBLENDFLAGS type is used with D3DRS_VERTEXBLEND state. -// -typedef enum _D3DVERTEXBLENDFLAGS -{ - D3DVBF_DISABLE = 0, // Disable vertex blending - D3DVBF_1WEIGHTS = 1, // 2 matrix blending - D3DVBF_2WEIGHTS = 2, // 3 matrix blending - D3DVBF_3WEIGHTS = 3, // 4 matrix blending - D3DVBF_TWEENING = 255, // blending using D3DRS_TWEENFACTOR - D3DVBF_0WEIGHTS = 256, // one matrix is used with weight 1.0 - D3DVBF_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum -} D3DVERTEXBLENDFLAGS; - -typedef enum _D3DTEXTURETRANSFORMFLAGS { - D3DTTFF_DISABLE = 0, // texture coordinates are passed directly - D3DTTFF_COUNT1 = 1, // rasterizer should expect 1-D texture coords - D3DTTFF_COUNT2 = 2, // rasterizer should expect 2-D texture coords - D3DTTFF_COUNT3 = 3, // rasterizer should expect 3-D texture coords - D3DTTFF_COUNT4 = 4, // rasterizer should expect 4-D texture coords - D3DTTFF_PROJECTED = 256, // texcoords to be divided by COUNTth element - D3DTTFF_FORCE_DWORD = 0x7fffffff, -} D3DTEXTURETRANSFORMFLAGS; - -// Macros to set texture coordinate format bits in the FVF id - -#define D3DFVF_TEXTUREFORMAT2 0 // Two floating point values -#define D3DFVF_TEXTUREFORMAT1 3 // One floating point value -#define D3DFVF_TEXTUREFORMAT3 1 // Three floating point values -#define D3DFVF_TEXTUREFORMAT4 2 // Four floating point values - -#define D3DFVF_TEXCOORDSIZE3(CoordIndex) (D3DFVF_TEXTUREFORMAT3 << (CoordIndex*2 + 16)) -#define D3DFVF_TEXCOORDSIZE2(CoordIndex) (D3DFVF_TEXTUREFORMAT2) -#define D3DFVF_TEXCOORDSIZE4(CoordIndex) (D3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16)) -#define D3DFVF_TEXCOORDSIZE1(CoordIndex) (D3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 + 16)) - - -//--------------------------------------------------------------------- - -/* Direct3D8 Device types */ -typedef enum _D3DDEVTYPE -{ - D3DDEVTYPE_HAL = 1, - D3DDEVTYPE_REF = 2, - D3DDEVTYPE_SW = 3, - - D3DDEVTYPE_FORCE_DWORD = 0x7fffffff -} D3DDEVTYPE; - -/* Multi-Sample buffer types */ -typedef enum _D3DMULTISAMPLE_TYPE -{ - D3DMULTISAMPLE_NONE = 0, - D3DMULTISAMPLE_2_SAMPLES = 2, - D3DMULTISAMPLE_3_SAMPLES = 3, - D3DMULTISAMPLE_4_SAMPLES = 4, - D3DMULTISAMPLE_5_SAMPLES = 5, - D3DMULTISAMPLE_6_SAMPLES = 6, - D3DMULTISAMPLE_7_SAMPLES = 7, - D3DMULTISAMPLE_8_SAMPLES = 8, - D3DMULTISAMPLE_9_SAMPLES = 9, - D3DMULTISAMPLE_10_SAMPLES = 10, - D3DMULTISAMPLE_11_SAMPLES = 11, - D3DMULTISAMPLE_12_SAMPLES = 12, - D3DMULTISAMPLE_13_SAMPLES = 13, - D3DMULTISAMPLE_14_SAMPLES = 14, - D3DMULTISAMPLE_15_SAMPLES = 15, - D3DMULTISAMPLE_16_SAMPLES = 16, - - D3DMULTISAMPLE_FORCE_DWORD = 0x7fffffff -} D3DMULTISAMPLE_TYPE; - -/* Formats - * Most of these names have the following convention: - * A = Alpha - * R = Red - * G = Green - * B = Blue - * X = Unused Bits - * P = Palette - * L = Luminance - * U = dU coordinate for BumpMap - * V = dV coordinate for BumpMap - * S = Stencil - * D = Depth (e.g. Z or W buffer) - * - * Further, the order of the pieces are from MSB first; hence - * D3DFMT_A8L8 indicates that the high byte of this two byte - * format is alpha. - * - * D16 indicates: - * - An integer 16-bit value. - * - An app-lockable surface. - * - * All Depth/Stencil formats except D3DFMT_D16_LOCKABLE indicate: - * - no particular bit ordering per pixel, and - * - are not app lockable, and - * - the driver is allowed to consume more than the indicated - * number of bits per Depth channel (but not Stencil channel). - */ -#ifndef MAKEFOURCC - #define MAKEFOURCC(ch0, ch1, ch2, ch3) \ - ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \ - ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 )) -#endif /* defined(MAKEFOURCC) */ - - -typedef enum _D3DFORMAT -{ - D3DFMT_UNKNOWN = 0, - - D3DFMT_R8G8B8 = 20, - D3DFMT_A8R8G8B8 = 21, - D3DFMT_X8R8G8B8 = 22, - D3DFMT_R5G6B5 = 23, - D3DFMT_X1R5G5B5 = 24, - D3DFMT_A1R5G5B5 = 25, - D3DFMT_A4R4G4B4 = 26, - D3DFMT_R3G3B2 = 27, - D3DFMT_A8 = 28, - D3DFMT_A8R3G3B2 = 29, - D3DFMT_X4R4G4B4 = 30, - - D3DFMT_A8P8 = 40, - D3DFMT_P8 = 41, - - D3DFMT_L8 = 50, - D3DFMT_A8L8 = 51, - D3DFMT_A4L4 = 52, - - D3DFMT_V8U8 = 60, - D3DFMT_L6V5U5 = 61, - D3DFMT_X8L8V8U8 = 62, - D3DFMT_Q8W8V8U8 = 63, - D3DFMT_V16U16 = 64, - D3DFMT_W11V11U10 = 65, - - D3DFMT_UYVY = MAKEFOURCC('U', 'Y', 'V', 'Y'), - D3DFMT_YUY2 = MAKEFOURCC('Y', 'U', 'Y', '2'), - D3DFMT_DXT1 = MAKEFOURCC('D', 'X', 'T', '1'), - D3DFMT_DXT2 = MAKEFOURCC('D', 'X', 'T', '2'), - D3DFMT_DXT3 = MAKEFOURCC('D', 'X', 'T', '3'), - D3DFMT_DXT4 = MAKEFOURCC('D', 'X', 'T', '4'), - D3DFMT_DXT5 = MAKEFOURCC('D', 'X', 'T', '5'), - - D3DFMT_D16_LOCKABLE = 70, - D3DFMT_D32 = 71, - D3DFMT_D15S1 = 73, - D3DFMT_D24S8 = 75, - D3DFMT_D16 = 80, - D3DFMT_D24X8 = 77, - D3DFMT_D24X4S4 = 79, - - - D3DFMT_VERTEXDATA =100, - D3DFMT_INDEX16 =101, - D3DFMT_INDEX32 =102, - - D3DFMT_FORCE_DWORD =0x7fffffff -} D3DFORMAT; - -/* Display Modes */ -typedef struct _D3DDISPLAYMODE -{ - UINT Width; - UINT Height; - UINT RefreshRate; - D3DFORMAT Format; -} D3DDISPLAYMODE; - -/* Creation Parameters */ -typedef struct _D3DDEVICE_CREATION_PARAMETERS -{ - UINT AdapterOrdinal; - D3DDEVTYPE DeviceType; - HWND hFocusWindow; - DWORD BehaviorFlags; -} D3DDEVICE_CREATION_PARAMETERS; - - -/* SwapEffects */ -typedef enum _D3DSWAPEFFECT -{ - D3DSWAPEFFECT_DISCARD = 1, - D3DSWAPEFFECT_FLIP = 2, - D3DSWAPEFFECT_COPY = 3, - D3DSWAPEFFECT_COPY_VSYNC = 4, - - D3DSWAPEFFECT_FORCE_DWORD = 0x7fffffff -} D3DSWAPEFFECT; - -/* Pool types */ -typedef enum _D3DPOOL { - D3DPOOL_DEFAULT = 0, - D3DPOOL_MANAGED = 1, - D3DPOOL_SYSTEMMEM = 2, - - D3DPOOL_FORCE_DWORD = 0x7fffffff -} D3DPOOL; - - -/* RefreshRate pre-defines */ -#define D3DPRESENT_RATE_DEFAULT 0x00000000 -#define D3DPRESENT_RATE_UNLIMITED 0x7fffffff - - -/* Resize Optional Parameters */ -typedef struct _D3DPRESENT_PARAMETERS_ -{ - UINT BackBufferWidth; - UINT BackBufferHeight; - D3DFORMAT BackBufferFormat; - UINT BackBufferCount; - - D3DMULTISAMPLE_TYPE MultiSampleType; - - D3DSWAPEFFECT SwapEffect; - HWND hDeviceWindow; - BOOL Windowed; - BOOL EnableAutoDepthStencil; - D3DFORMAT AutoDepthStencilFormat; - DWORD Flags; - - /* Following elements must be zero for Windowed mode */ - UINT FullScreen_RefreshRateInHz; - UINT FullScreen_PresentationInterval; - -} D3DPRESENT_PARAMETERS; - -// Values for D3DPRESENT_PARAMETERS.Flags - -#define D3DPRESENTFLAG_LOCKABLE_BACKBUFFER 0x00000001 - - -/* Gamma Ramp: Same as DX7 */ - -typedef struct _D3DGAMMARAMP -{ - WORD red [256]; - WORD green[256]; - WORD blue [256]; -} D3DGAMMARAMP; - -/* Back buffer types */ -typedef enum _D3DBACKBUFFER_TYPE -{ - D3DBACKBUFFER_TYPE_MONO = 0, - D3DBACKBUFFER_TYPE_LEFT = 1, - D3DBACKBUFFER_TYPE_RIGHT = 2, - - D3DBACKBUFFER_TYPE_FORCE_DWORD = 0x7fffffff -} D3DBACKBUFFER_TYPE; - - -/* Types */ -typedef enum _D3DRESOURCETYPE { - D3DRTYPE_SURFACE = 1, - D3DRTYPE_VOLUME = 2, - D3DRTYPE_TEXTURE = 3, - D3DRTYPE_VOLUMETEXTURE = 4, - D3DRTYPE_CUBETEXTURE = 5, - D3DRTYPE_VERTEXBUFFER = 6, - D3DRTYPE_INDEXBUFFER = 7, - - - D3DRTYPE_FORCE_DWORD = 0x7fffffff -} D3DRESOURCETYPE; - -/* Usages */ -#define D3DUSAGE_RENDERTARGET (0x00000001L) -#define D3DUSAGE_DEPTHSTENCIL (0x00000002L) - -/* Usages for Vertex/Index buffers */ -#define D3DUSAGE_WRITEONLY (0x00000008L) -#define D3DUSAGE_SOFTWAREPROCESSING (0x00000010L) -#define D3DUSAGE_DONOTCLIP (0x00000020L) -#define D3DUSAGE_POINTS (0x00000040L) -#define D3DUSAGE_RTPATCHES (0x00000080L) -#define D3DUSAGE_NPATCHES (0x00000100L) -#define D3DUSAGE_DYNAMIC (0x00000200L) - - - - - - - - - -/* CubeMap Face identifiers */ -typedef enum _D3DCUBEMAP_FACES -{ - D3DCUBEMAP_FACE_POSITIVE_X = 0, - D3DCUBEMAP_FACE_NEGATIVE_X = 1, - D3DCUBEMAP_FACE_POSITIVE_Y = 2, - D3DCUBEMAP_FACE_NEGATIVE_Y = 3, - D3DCUBEMAP_FACE_POSITIVE_Z = 4, - D3DCUBEMAP_FACE_NEGATIVE_Z = 5, - - D3DCUBEMAP_FACE_FORCE_DWORD = 0x7fffffff -} D3DCUBEMAP_FACES; - - -/* Lock flags */ - -#define D3DLOCK_READONLY 0x00000010L -#define D3DLOCK_DISCARD 0x00002000L -#define D3DLOCK_NOOVERWRITE 0x00001000L -#define D3DLOCK_NOSYSLOCK 0x00000800L - -#define D3DLOCK_NO_DIRTY_UPDATE 0x00008000L - - - - - - -/* Vertex Buffer Description */ -typedef struct _D3DVERTEXBUFFER_DESC -{ - D3DFORMAT Format; - D3DRESOURCETYPE Type; - DWORD Usage; - D3DPOOL Pool; - UINT Size; - - DWORD FVF; - -} D3DVERTEXBUFFER_DESC; - -/* Index Buffer Description */ -typedef struct _D3DINDEXBUFFER_DESC -{ - D3DFORMAT Format; - D3DRESOURCETYPE Type; - DWORD Usage; - D3DPOOL Pool; - UINT Size; -} D3DINDEXBUFFER_DESC; - - -/* Surface Description */ -typedef struct _D3DSURFACE_DESC -{ - D3DFORMAT Format; - D3DRESOURCETYPE Type; - DWORD Usage; - D3DPOOL Pool; - UINT Size; - - D3DMULTISAMPLE_TYPE MultiSampleType; - UINT Width; - UINT Height; -} D3DSURFACE_DESC; - -typedef struct _D3DVOLUME_DESC -{ - D3DFORMAT Format; - D3DRESOURCETYPE Type; - DWORD Usage; - D3DPOOL Pool; - UINT Size; - - UINT Width; - UINT Height; - UINT Depth; -} D3DVOLUME_DESC; - -/* Structure for LockRect */ -typedef struct _D3DLOCKED_RECT -{ - INT Pitch; - void* pBits; -} D3DLOCKED_RECT; - -/* Structures for LockBox */ -typedef struct _D3DBOX -{ - UINT Left; - UINT Top; - UINT Right; - UINT Bottom; - UINT Front; - UINT Back; -} D3DBOX; - -typedef struct _D3DLOCKED_BOX -{ - INT RowPitch; - INT SlicePitch; - void* pBits; -} D3DLOCKED_BOX; - -/* Structures for LockRange */ -typedef struct _D3DRANGE -{ - UINT Offset; - UINT Size; -} D3DRANGE; - -/* Structures for high order primitives */ -typedef struct _D3DRECTPATCH_INFO -{ - UINT StartVertexOffsetWidth; - UINT StartVertexOffsetHeight; - UINT Width; - UINT Height; - UINT Stride; - D3DBASISTYPE Basis; - D3DORDERTYPE Order; -} D3DRECTPATCH_INFO; - -typedef struct _D3DTRIPATCH_INFO -{ - UINT StartVertexOffset; - UINT NumVertices; - D3DBASISTYPE Basis; - D3DORDERTYPE Order; -} D3DTRIPATCH_INFO; - -/* Adapter Identifier */ - -#define MAX_DEVICE_IDENTIFIER_STRING 512 -typedef struct _D3DADAPTER_IDENTIFIER8 -{ - char Driver[MAX_DEVICE_IDENTIFIER_STRING]; - char Description[MAX_DEVICE_IDENTIFIER_STRING]; - -#ifdef _WIN32 - LARGE_INTEGER DriverVersion; /* Defined for 32 bit components */ -#else - DWORD DriverVersionLowPart; /* Defined for 16 bit driver components */ - DWORD DriverVersionHighPart; -#endif - - DWORD VendorId; - DWORD DeviceId; - DWORD SubSysId; - DWORD Revision; - - GUID DeviceIdentifier; - - DWORD WHQLLevel; - -} D3DADAPTER_IDENTIFIER8; - - -/* Raster Status structure returned by GetRasterStatus */ -typedef struct _D3DRASTER_STATUS -{ - BOOL InVBlank; - UINT ScanLine; -} D3DRASTER_STATUS; - - - -/* Debug monitor tokens (DEBUG only) - - Note that if D3DRS_DEBUGMONITORTOKEN is set, the call is treated as - passing a token to the debug monitor. For example, if, after passing - D3DDMT_ENABLE/DISABLE to D3DRS_DEBUGMONITORTOKEN other token values - are passed in, the enabled/disabled state of the debug - monitor will still persist. - - The debug monitor defaults to enabled. - - Calling GetRenderState on D3DRS_DEBUGMONITORTOKEN is not of any use. -*/ -typedef enum _D3DDEBUGMONITORTOKENS { - D3DDMT_ENABLE = 0, // enable debug monitor - D3DDMT_DISABLE = 1, // disable debug monitor - D3DDMT_FORCE_DWORD = 0x7fffffff, -} D3DDEBUGMONITORTOKENS; - -#pragma pack() -#pragma warning(default:4201) - -#endif /* (DIRECT3D_VERSION >= 0x0800) */ -#endif /* _D3D8TYPES(P)_H_ */ - diff --git a/builddir/irrlicht-1.8.1/include/d3dx8.h b/builddir/irrlicht-1.8.1/include/d3dx8.h deleted file mode 100644 index 66af5e2..0000000 --- a/builddir/irrlicht-1.8.1/include/d3dx8.h +++ /dev/null @@ -1,36 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved. -// -// File: d3dx8.h -// Content: D3DX utility library -// -/////////////////////////////////////////////////////////////////////////// - -#ifndef __D3DX8_H__ -#define __D3DX8_H__ - -#include <d3d8.h> -#include <limits.h> - -#ifndef D3DXINLINE -#ifdef __cplusplus -#define D3DXINLINE inline -#else -#define D3DXINLINE _inline -#endif -#endif - -#define D3DX_DEFAULT ULONG_MAX -#define D3DX_DEFAULT_FLOAT FLT_MAX - -#include "d3dx8math.h" -#include "d3dx8core.h" -#include "d3dx8tex.h" -#include "d3dx8mesh.h" -#include "d3dx8shape.h" -#include "d3dx8effect.h" - - -#endif //__D3DX8_H__ - diff --git a/builddir/irrlicht-1.8.1/include/d3dx9.h b/builddir/irrlicht-1.8.1/include/d3dx9.h deleted file mode 100644 index 43f9e62..0000000 --- a/builddir/irrlicht-1.8.1/include/d3dx9.h +++ /dev/null @@ -1,78 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) Microsoft Corporation. All Rights Reserved. -// -// File: d3dx9.h -// Content: D3DX utility library -// -////////////////////////////////////////////////////////////////////////////// - -#ifdef __D3DX_INTERNAL__ -#error Incorrect D3DX header used -#endif - -#ifndef __D3DX9_H__ -#define __D3DX9_H__ - - -// Defines -#include <limits.h> - -#define D3DX_DEFAULT ((UINT) -1) -#define D3DX_DEFAULT_NONPOW2 ((UINT) -2) -#define D3DX_DEFAULT_FLOAT FLT_MAX -#define D3DX_FROM_FILE ((UINT) -3) -#define D3DFMT_FROM_FILE ((D3DFORMAT) -3) - -#ifndef D3DXINLINE -#ifdef _MSC_VER - #if (_MSC_VER >= 1200) - #define D3DXINLINE __forceinline - #else - #define D3DXINLINE __inline - #endif -#else - #ifdef __cplusplus - #define D3DXINLINE inline - #else - #define D3DXINLINE - #endif -#endif -#endif - - - -// Includes -#include "d3d9.h" -#include "d3dx9math.h" -#include "d3dx9core.h" -#include "d3dx9xof.h" -#include "d3dx9mesh.h" -#include "d3dx9shader.h" -#include "d3dx9effect.h" - -#include "d3dx9tex.h" -#include "d3dx9shape.h" -#include "d3dx9anim.h" - - - -// Errors -#define _FACDD 0x876 -#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) - -enum _D3DXERR { - D3DXERR_CANNOTMODIFYINDEXBUFFER = MAKE_DDHRESULT(2900), - D3DXERR_INVALIDMESH = MAKE_DDHRESULT(2901), - D3DXERR_CANNOTATTRSORT = MAKE_DDHRESULT(2902), - D3DXERR_SKINNINGNOTSUPPORTED = MAKE_DDHRESULT(2903), - D3DXERR_TOOMANYINFLUENCES = MAKE_DDHRESULT(2904), - D3DXERR_INVALIDDATA = MAKE_DDHRESULT(2905), - D3DXERR_LOADEDMESHASNODATA = MAKE_DDHRESULT(2906), - D3DXERR_DUPLICATENAMEDFRAGMENT = MAKE_DDHRESULT(2907), - D3DXERR_CANNOTREMOVELASTITEM = MAKE_DDHRESULT(2908), -}; - - -#endif //__D3DX9_H__ - diff --git a/builddir/irrlicht-1.8.1/include/d3dx9anim.h b/builddir/irrlicht-1.8.1/include/d3dx9anim.h deleted file mode 100644 index fedb1db..0000000 --- a/builddir/irrlicht-1.8.1/include/d3dx9anim.h +++ /dev/null @@ -1,1114 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) Microsoft Corporation. All Rights Reserved. -// -// File: d3dx9anim.h -// Content: D3DX mesh types and functions -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef __D3DX9ANIM_H__ -#define __D3DX9ANIM_H__ - -// {698CFB3F-9289-4d95-9A57-33A94B5A65F9} -DEFINE_GUID(IID_ID3DXAnimationSet, -0x698cfb3f, 0x9289, 0x4d95, 0x9a, 0x57, 0x33, 0xa9, 0x4b, 0x5a, 0x65, 0xf9); - -// {FA4E8E3A-9786-407d-8B4C-5995893764AF} -DEFINE_GUID(IID_ID3DXKeyframedAnimationSet, -0xfa4e8e3a, 0x9786, 0x407d, 0x8b, 0x4c, 0x59, 0x95, 0x89, 0x37, 0x64, 0xaf); - -// {6CC2480D-3808-4739-9F88-DE49FACD8D4C} -DEFINE_GUID(IID_ID3DXCompressedAnimationSet, -0x6cc2480d, 0x3808, 0x4739, 0x9f, 0x88, 0xde, 0x49, 0xfa, 0xcd, 0x8d, 0x4c); - -// {AC8948EC-F86D-43e2-96DE-31FC35F96D9E} -DEFINE_GUID(IID_ID3DXAnimationController, -0xac8948ec, 0xf86d, 0x43e2, 0x96, 0xde, 0x31, 0xfc, 0x35, 0xf9, 0x6d, 0x9e); - - -//---------------------------------------------------------------------------- -// D3DXMESHDATATYPE: -// ----------------- -// This enum defines the type of mesh data present in a MeshData structure. -//---------------------------------------------------------------------------- -typedef enum _D3DXMESHDATATYPE { - D3DXMESHTYPE_MESH = 0x001, // Normal ID3DXMesh data - D3DXMESHTYPE_PMESH = 0x002, // Progressive Mesh - ID3DXPMesh - D3DXMESHTYPE_PATCHMESH = 0x003, // Patch Mesh - ID3DXPatchMesh - - D3DXMESHTYPE_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ -} D3DXMESHDATATYPE; - -//---------------------------------------------------------------------------- -// D3DXMESHDATA: -// ------------- -// This struct encapsulates a the mesh data that can be present in a mesh -// container. The supported mesh types are pMesh, pPMesh, pPatchMesh. -// The valid way to access this is determined by the Type enum. -//---------------------------------------------------------------------------- -typedef struct _D3DXMESHDATA -{ - D3DXMESHDATATYPE Type; - - // current mesh data interface - union - { - LPD3DXMESH pMesh; - LPD3DXPMESH pPMesh; - LPD3DXPATCHMESH pPatchMesh; - }; -} D3DXMESHDATA, *LPD3DXMESHDATA; - -//---------------------------------------------------------------------------- -// D3DXMESHCONTAINER: -// ------------------ -// This struct encapsulates a mesh object in a transformation frame -// hierarchy. The app can derive from this structure to add other app specific -// data to this. -//---------------------------------------------------------------------------- -typedef struct _D3DXMESHCONTAINER -{ - LPSTR Name; - - D3DXMESHDATA MeshData; - - LPD3DXMATERIAL pMaterials; - LPD3DXEFFECTINSTANCE pEffects; - DWORD NumMaterials; - DWORD *pAdjacency; - - LPD3DXSKININFO pSkinInfo; - - struct _D3DXMESHCONTAINER *pNextMeshContainer; -} D3DXMESHCONTAINER, *LPD3DXMESHCONTAINER; - -//---------------------------------------------------------------------------- -// D3DXFRAME: -// ---------- -// This struct is the encapsulates a transform frame in a transformation frame -// hierarchy. The app can derive from this structure to add other app specific -// data to this -//---------------------------------------------------------------------------- -typedef struct _D3DXFRAME -{ - LPSTR Name; - D3DXMATRIX TransformationMatrix; - - LPD3DXMESHCONTAINER pMeshContainer; - - struct _D3DXFRAME *pFrameSibling; - struct _D3DXFRAME *pFrameFirstChild; -} D3DXFRAME, *LPD3DXFRAME; - - -//---------------------------------------------------------------------------- -// ID3DXAllocateHierarchy: -// ----------------------- -// This interface is implemented by the application to allocate/free frame and -// mesh container objects. Methods on this are called during loading and -// destroying frame hierarchies -//---------------------------------------------------------------------------- -typedef interface ID3DXAllocateHierarchy ID3DXAllocateHierarchy; -typedef interface ID3DXAllocateHierarchy *LPD3DXALLOCATEHIERARCHY; - -#undef INTERFACE -#define INTERFACE ID3DXAllocateHierarchy - -DECLARE_INTERFACE(ID3DXAllocateHierarchy) -{ - // ID3DXAllocateHierarchy - - //------------------------------------------------------------------------ - // CreateFrame: - // ------------ - // Requests allocation of a frame object. - // - // Parameters: - // Name - // Name of the frame to be created - // ppNewFrame - // Returns the created frame object - // - //------------------------------------------------------------------------ - STDMETHOD(CreateFrame)(THIS_ LPCSTR Name, - LPD3DXFRAME *ppNewFrame) PURE; - - //------------------------------------------------------------------------ - // CreateMeshContainer: - // -------------------- - // Requests allocation of a mesh container object. - // - // Parameters: - // Name - // Name of the mesh - // pMesh - // Pointer to the mesh object if basic polygon data found - // pPMesh - // Pointer to the progressive mesh object if progressive mesh data found - // pPatchMesh - // Pointer to the patch mesh object if patch data found - // pMaterials - // Array of materials used in the mesh - // pEffectInstances - // Array of effect instances used in the mesh - // NumMaterials - // Num elements in the pMaterials array - // pAdjacency - // Adjacency array for the mesh - // pSkinInfo - // Pointer to the skininfo object if the mesh is skinned - // pBoneNames - // Array of names, one for each bone in the skinned mesh. - // The numberof bones can be found from the pSkinMesh object - // pBoneOffsetMatrices - // Array of matrices, one for each bone in the skinned mesh. - // - //------------------------------------------------------------------------ - STDMETHOD(CreateMeshContainer)(THIS_ - LPCSTR Name, - CONST D3DXMESHDATA *pMeshData, - CONST D3DXMATERIAL *pMaterials, - CONST D3DXEFFECTINSTANCE *pEffectInstances, - DWORD NumMaterials, - CONST DWORD *pAdjacency, - LPD3DXSKININFO pSkinInfo, - LPD3DXMESHCONTAINER *ppNewMeshContainer) PURE; - - //------------------------------------------------------------------------ - // DestroyFrame: - // ------------- - // Requests de-allocation of a frame object. - // - // Parameters: - // pFrameToFree - // Pointer to the frame to be de-allocated - // - //------------------------------------------------------------------------ - STDMETHOD(DestroyFrame)(THIS_ LPD3DXFRAME pFrameToFree) PURE; - - //------------------------------------------------------------------------ - // DestroyMeshContainer: - // --------------------- - // Requests de-allocation of a mesh container object. - // - // Parameters: - // pMeshContainerToFree - // Pointer to the mesh container object to be de-allocated - // - //------------------------------------------------------------------------ - STDMETHOD(DestroyMeshContainer)(THIS_ LPD3DXMESHCONTAINER pMeshContainerToFree) PURE; -}; - -//---------------------------------------------------------------------------- -// ID3DXLoadUserData: -// ------------------ -// This interface is implemented by the application to load user data in a .X file -// When user data is found, these callbacks will be used to allow the application -// to load the data. -//---------------------------------------------------------------------------- -typedef interface ID3DXLoadUserData ID3DXLoadUserData; -typedef interface ID3DXLoadUserData *LPD3DXLOADUSERDATA; - -#undef INTERFACE -#define INTERFACE ID3DXLoadUserData - -DECLARE_INTERFACE(ID3DXLoadUserData) -{ - STDMETHOD(LoadTopLevelData)(LPD3DXFILEDATA pXofChildData) PURE; - - STDMETHOD(LoadFrameChildData)(LPD3DXFRAME pFrame, - LPD3DXFILEDATA pXofChildData) PURE; - - STDMETHOD(LoadMeshChildData)(LPD3DXMESHCONTAINER pMeshContainer, - LPD3DXFILEDATA pXofChildData) PURE; -}; - -//---------------------------------------------------------------------------- -// ID3DXSaveUserData: -// ------------------ -// This interface is implemented by the application to save user data in a .X file -// The callbacks are called for all data saved. The user can then add any -// child data objects to the object provided to the callback. -//---------------------------------------------------------------------------- -typedef interface ID3DXSaveUserData ID3DXSaveUserData; -typedef interface ID3DXSaveUserData *LPD3DXSAVEUSERDATA; - -#undef INTERFACE -#define INTERFACE ID3DXSaveUserData - -DECLARE_INTERFACE(ID3DXSaveUserData) -{ - STDMETHOD(AddFrameChildData)(CONST D3DXFRAME *pFrame, - LPD3DXFILESAVEOBJECT pXofSave, - LPD3DXFILESAVEDATA pXofFrameData) PURE; - - STDMETHOD(AddMeshChildData)(CONST D3DXMESHCONTAINER *pMeshContainer, - LPD3DXFILESAVEOBJECT pXofSave, - LPD3DXFILESAVEDATA pXofMeshData) PURE; - - // NOTE: this is called once per Save. All top level objects should be added using the - // provided interface. One call adds objects before the frame hierarchy, the other after - STDMETHOD(AddTopLevelDataObjectsPre)(LPD3DXFILESAVEOBJECT pXofSave) PURE; - STDMETHOD(AddTopLevelDataObjectsPost)(LPD3DXFILESAVEOBJECT pXofSave) PURE; - - // callbacks for the user to register and then save templates to the XFile - STDMETHOD(RegisterTemplates)(LPD3DXFILE pXFileApi) PURE; - STDMETHOD(SaveTemplates)(LPD3DXFILESAVEOBJECT pXofSave) PURE; -}; - - -//---------------------------------------------------------------------------- -// D3DXCALLBACK_SEARCH_FLAGS: -// -------------------------- -// Flags that can be passed into ID3DXAnimationSet::GetCallback. -//---------------------------------------------------------------------------- -typedef enum _D3DXCALLBACK_SEARCH_FLAGS -{ - D3DXCALLBACK_SEARCH_EXCLUDING_INITIAL_POSITION = 0x01, // exclude callbacks at the initial position from the search - D3DXCALLBACK_SEARCH_BEHIND_INITIAL_POSITION = 0x02, // reverse the callback search direction - - D3DXCALLBACK_SEARCH_FORCE_DWORD = 0x7fffffff, -} D3DXCALLBACK_SEARCH_FLAGS; - -//---------------------------------------------------------------------------- -// ID3DXAnimationSet: -// ------------------ -// This interface implements an animation set. -//---------------------------------------------------------------------------- -typedef interface ID3DXAnimationSet ID3DXAnimationSet; -typedef interface ID3DXAnimationSet *LPD3DXANIMATIONSET; - -#undef INTERFACE -#define INTERFACE ID3DXAnimationSet - -DECLARE_INTERFACE_(ID3DXAnimationSet, IUnknown) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // Name - STDMETHOD_(LPCSTR, GetName)(THIS) PURE; - - // Period - STDMETHOD_(DOUBLE, GetPeriod)(THIS) PURE; - STDMETHOD_(DOUBLE, GetPeriodicPosition)(THIS_ DOUBLE Position) PURE; // Maps position into animation period - - // Animation names - STDMETHOD_(UINT, GetNumAnimations)(THIS) PURE; - STDMETHOD(GetAnimationNameByIndex)(THIS_ UINT Index, LPCSTR *ppName) PURE; - STDMETHOD(GetAnimationIndexByName)(THIS_ LPCSTR pName, UINT *pIndex) PURE; - - // SRT - STDMETHOD(GetSRT)(THIS_ - DOUBLE PeriodicPosition, // Position mapped to period (use GetPeriodicPosition) - UINT Animation, // Animation index - D3DXVECTOR3 *pScale, // Returns the scale - D3DXQUATERNION *pRotation, // Returns the rotation as a quaternion - D3DXVECTOR3 *pTranslation) PURE; // Returns the translation - - // Callbacks - STDMETHOD(GetCallback)(THIS_ - DOUBLE Position, // Position from which to find callbacks - DWORD Flags, // Callback search flags - DOUBLE *pCallbackPosition, // Returns the position of the callback - LPVOID *ppCallbackData) PURE; // Returns the callback data pointer -}; - - -//---------------------------------------------------------------------------- -// D3DXPLAYBACK_TYPE: -// ------------------ -// This enum defines the type of animation set loop modes. -//---------------------------------------------------------------------------- -typedef enum _D3DXPLAYBACK_TYPE -{ - D3DXPLAY_LOOP = 0, - D3DXPLAY_ONCE = 1, - D3DXPLAY_PINGPONG = 2, - - D3DXPLAY_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ -} D3DXPLAYBACK_TYPE; - - -//---------------------------------------------------------------------------- -// D3DXKEY_VECTOR3: -// ---------------- -// This structure describes a vector key for use in keyframe animation. -// It specifies a vector Value at a given Time. This is used for scale and -// translation keys. -//---------------------------------------------------------------------------- -typedef struct _D3DXKEY_VECTOR3 -{ - FLOAT Time; - D3DXVECTOR3 Value; -} D3DXKEY_VECTOR3, *LPD3DXKEY_VECTOR3; - - -//---------------------------------------------------------------------------- -// D3DXKEY_QUATERNION: -// ------------------- -// This structure describes a quaternion key for use in keyframe animation. -// It specifies a quaternion Value at a given Time. This is used for rotation -// keys. -//---------------------------------------------------------------------------- -typedef struct _D3DXKEY_QUATERNION -{ - FLOAT Time; - D3DXQUATERNION Value; -} D3DXKEY_QUATERNION, *LPD3DXKEY_QUATERNION; - - -//---------------------------------------------------------------------------- -// D3DXKEY_CALLBACK: -// ----------------- -// This structure describes an callback key for use in keyframe animation. -// It specifies a pointer to user data at a given Time. -//---------------------------------------------------------------------------- -typedef struct _D3DXKEY_CALLBACK -{ - FLOAT Time; - LPVOID pCallbackData; -} D3DXKEY_CALLBACK, *LPD3DXKEY_CALLBACK; - - -//---------------------------------------------------------------------------- -// D3DXCOMPRESSION_FLAGS: -// ---------------------- -// Flags that can be passed into ID3DXKeyframedAnimationSet::Compress. -//---------------------------------------------------------------------------- -typedef enum _D3DXCOMPRESSION_FLAGS -{ - D3DXCOMPRESS_DEFAULT = 0x00, - - D3DXCOMPRESS_FORCE_DWORD = 0x7fffffff, -} D3DXCOMPRESSION_FLAGS; - - -//---------------------------------------------------------------------------- -// ID3DXKeyframedAnimationSet: -// --------------------------- -// This interface implements a compressable keyframed animation set. -//---------------------------------------------------------------------------- -typedef interface ID3DXKeyframedAnimationSet ID3DXKeyframedAnimationSet; -typedef interface ID3DXKeyframedAnimationSet *LPD3DXKEYFRAMEDANIMATIONSET; - -#undef INTERFACE -#define INTERFACE ID3DXKeyframedAnimationSet - -DECLARE_INTERFACE_(ID3DXKeyframedAnimationSet, ID3DXAnimationSet) -{ - // ID3DXAnimationSet - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // Name - STDMETHOD_(LPCSTR, GetName)(THIS) PURE; - - // Period - STDMETHOD_(DOUBLE, GetPeriod)(THIS) PURE; - STDMETHOD_(DOUBLE, GetPeriodicPosition)(THIS_ DOUBLE Position) PURE; // Maps position into animation period - - // Animation names - STDMETHOD_(UINT, GetNumAnimations)(THIS) PURE; - STDMETHOD(GetAnimationNameByIndex)(THIS_ UINT Index, LPCSTR *ppName) PURE; - STDMETHOD(GetAnimationIndexByName)(THIS_ LPCSTR pName, UINT *pIndex) PURE; - - // SRT - STDMETHOD(GetSRT)(THIS_ - DOUBLE PeriodicPosition, // Position mapped to period (use GetPeriodicPosition) - UINT Animation, // Animation index - D3DXVECTOR3 *pScale, // Returns the scale - D3DXQUATERNION *pRotation, // Returns the rotation as a quaternion - D3DXVECTOR3 *pTranslation) PURE; // Returns the translation - - // Callbacks - STDMETHOD(GetCallback)(THIS_ - DOUBLE Position, // Position from which to find callbacks - DWORD Flags, // Callback search flags - DOUBLE *pCallbackPosition, // Returns the position of the callback - LPVOID *ppCallbackData) PURE; // Returns the callback data pointer - - // Playback - STDMETHOD_(D3DXPLAYBACK_TYPE, GetPlaybackType)(THIS) PURE; - STDMETHOD_(DOUBLE, GetSourceTicksPerSecond)(THIS) PURE; - - // Scale keys - STDMETHOD_(UINT, GetNumScaleKeys)(THIS_ UINT Animation) PURE; - STDMETHOD(GetScaleKeys)(THIS_ UINT Animation, LPD3DXKEY_VECTOR3 pScaleKeys) PURE; - STDMETHOD(GetScaleKey)(THIS_ UINT Animation, UINT Key, LPD3DXKEY_VECTOR3 pScaleKey) PURE; - STDMETHOD(SetScaleKey)(THIS_ UINT Animation, UINT Key, LPD3DXKEY_VECTOR3 pScaleKey) PURE; - - // Rotation keys - STDMETHOD_(UINT, GetNumRotationKeys)(THIS_ UINT Animation) PURE; - STDMETHOD(GetRotationKeys)(THIS_ UINT Animation, LPD3DXKEY_QUATERNION pRotationKeys) PURE; - STDMETHOD(GetRotationKey)(THIS_ UINT Animation, UINT Key, LPD3DXKEY_QUATERNION pRotationKey) PURE; - STDMETHOD(SetRotationKey)(THIS_ UINT Animation, UINT Key, LPD3DXKEY_QUATERNION pRotationKey) PURE; - - // Translation keys - STDMETHOD_(UINT, GetNumTranslationKeys)(THIS_ UINT Animation) PURE; - STDMETHOD(GetTranslationKeys)(THIS_ UINT Animation, LPD3DXKEY_VECTOR3 pTranslationKeys) PURE; - STDMETHOD(GetTranslationKey)(THIS_ UINT Animation, UINT Key, LPD3DXKEY_VECTOR3 pTranslationKey) PURE; - STDMETHOD(SetTranslationKey)(THIS_ UINT Animation, UINT Key, LPD3DXKEY_VECTOR3 pTranslationKey) PURE; - - // Callback keys - STDMETHOD_(UINT, GetNumCallbackKeys)(THIS) PURE; - STDMETHOD(GetCallbackKeys)(THIS_ LPD3DXKEY_CALLBACK pCallbackKeys) PURE; - STDMETHOD(GetCallbackKey)(THIS_ UINT Key, LPD3DXKEY_CALLBACK pCallbackKey) PURE; - STDMETHOD(SetCallbackKey)(THIS_ UINT Key, LPD3DXKEY_CALLBACK pCallbackKey) PURE; - - // Key removal methods. These are slow, and should not be used once the animation starts playing - STDMETHOD(UnregisterScaleKey)(THIS_ UINT Animation, UINT Key) PURE; - STDMETHOD(UnregisterRotationKey)(THIS_ UINT Animation, UINT Key) PURE; - STDMETHOD(UnregisterTranslationKey)(THIS_ UINT Animation, UINT Key) PURE; - - // One-time animaton SRT keyframe registration - STDMETHOD(RegisterAnimationSRTKeys)(THIS_ - LPCSTR pName, // Animation name - UINT NumScaleKeys, // Number of scale keys - UINT NumRotationKeys, // Number of rotation keys - UINT NumTranslationKeys, // Number of translation keys - CONST D3DXKEY_VECTOR3 *pScaleKeys, // Array of scale keys - CONST D3DXKEY_QUATERNION *pRotationKeys, // Array of rotation keys - CONST D3DXKEY_VECTOR3 *pTranslationKeys, // Array of translation keys - DWORD *pAnimationIndex) PURE; // Returns the animation index - - // Compression - STDMETHOD(Compress)(THIS_ - DWORD Flags, // Compression flags (use D3DXCOMPRESS_STRONG for better results) - FLOAT Lossiness, // Compression loss ratio in the [0, 1] range - LPD3DXFRAME pHierarchy, // Frame hierarchy (optional) - LPD3DXBUFFER *ppCompressedData) PURE; // Returns the compressed animation set - - STDMETHOD(UnregisterAnimation)(THIS_ UINT Index) PURE; -}; - - -//---------------------------------------------------------------------------- -// ID3DXCompressedAnimationSet: -// ---------------------------- -// This interface implements a compressed keyframed animation set. -//---------------------------------------------------------------------------- -typedef interface ID3DXCompressedAnimationSet ID3DXCompressedAnimationSet; -typedef interface ID3DXCompressedAnimationSet *LPD3DXCOMPRESSEDANIMATIONSET; - -#undef INTERFACE -#define INTERFACE ID3DXCompressedAnimationSet - -DECLARE_INTERFACE_(ID3DXCompressedAnimationSet, ID3DXAnimationSet) -{ - // ID3DXAnimationSet - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // Name - STDMETHOD_(LPCSTR, GetName)(THIS) PURE; - - // Period - STDMETHOD_(DOUBLE, GetPeriod)(THIS) PURE; - STDMETHOD_(DOUBLE, GetPeriodicPosition)(THIS_ DOUBLE Position) PURE; // Maps position into animation period - - // Animation names - STDMETHOD_(UINT, GetNumAnimations)(THIS) PURE; - STDMETHOD(GetAnimationNameByIndex)(THIS_ UINT Index, LPCSTR *ppName) PURE; - STDMETHOD(GetAnimationIndexByName)(THIS_ LPCSTR pName, UINT *pIndex) PURE; - - // SRT - STDMETHOD(GetSRT)(THIS_ - DOUBLE PeriodicPosition, // Position mapped to period (use GetPeriodicPosition) - UINT Animation, // Animation index - D3DXVECTOR3 *pScale, // Returns the scale - D3DXQUATERNION *pRotation, // Returns the rotation as a quaternion - D3DXVECTOR3 *pTranslation) PURE; // Returns the translation - - // Callbacks - STDMETHOD(GetCallback)(THIS_ - DOUBLE Position, // Position from which to find callbacks - DWORD Flags, // Callback search flags - DOUBLE *pCallbackPosition, // Returns the position of the callback - LPVOID *ppCallbackData) PURE; // Returns the callback data pointer - - // Playback - STDMETHOD_(D3DXPLAYBACK_TYPE, GetPlaybackType)(THIS) PURE; - STDMETHOD_(DOUBLE, GetSourceTicksPerSecond)(THIS) PURE; - - // Scale keys - STDMETHOD(GetCompressedData)(THIS_ LPD3DXBUFFER *ppCompressedData) PURE; - - // Callback keys - STDMETHOD_(UINT, GetNumCallbackKeys)(THIS) PURE; - STDMETHOD(GetCallbackKeys)(THIS_ LPD3DXKEY_CALLBACK pCallbackKeys) PURE; -}; - - -//---------------------------------------------------------------------------- -// D3DXPRIORITY_TYPE: -// ------------------ -// This enum defines the type of priority group that a track can be assigned to. -//---------------------------------------------------------------------------- -typedef enum _D3DXPRIORITY_TYPE { - D3DXPRIORITY_LOW = 0, // This track should be blended with all low priority tracks before mixed with the high priority result - D3DXPRIORITY_HIGH = 1, // This track should be blended with all high priority tracks before mixed with the low priority result - - D3DXPRIORITY_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ -} D3DXPRIORITY_TYPE; - -//---------------------------------------------------------------------------- -// D3DXTRACK_DESC: -// --------------- -// This structure describes the mixing information of an animation track. -// The mixing information consists of the current position, speed, and blending -// weight for the track. The Flags field also specifies whether the track is -// low or high priority. Tracks with the same priority are blended together -// and then the two resulting values are blended using the priority blend factor. -// A track also has an animation set (stored separately) associated with it. -//---------------------------------------------------------------------------- -typedef struct _D3DXTRACK_DESC -{ - D3DXPRIORITY_TYPE Priority; - FLOAT Weight; - FLOAT Speed; - DOUBLE Position; - BOOL Enable; -} D3DXTRACK_DESC, *LPD3DXTRACK_DESC; - -//---------------------------------------------------------------------------- -// D3DXEVENT_TYPE: -// --------------- -// This enum defines the type of events keyable via the animation controller. -//---------------------------------------------------------------------------- -typedef enum _D3DXEVENT_TYPE -{ - D3DXEVENT_TRACKSPEED = 0, - D3DXEVENT_TRACKWEIGHT = 1, - D3DXEVENT_TRACKPOSITION = 2, - D3DXEVENT_TRACKENABLE = 3, - D3DXEVENT_PRIORITYBLEND = 4, - - D3DXEVENT_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ -} D3DXEVENT_TYPE; - -//---------------------------------------------------------------------------- -// D3DXTRANSITION_TYPE: -// -------------------- -// This enum defines the type of transtion performed on a event that -// transitions from one value to another. -//---------------------------------------------------------------------------- -typedef enum _D3DXTRANSITION_TYPE { - D3DXTRANSITION_LINEAR = 0x000, // Linear transition from one value to the next - D3DXTRANSITION_EASEINEASEOUT = 0x001, // Ease-In Ease-Out spline transtion from one value to the next - - D3DXTRANSITION_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ -} D3DXTRANSITION_TYPE; - -//---------------------------------------------------------------------------- -// D3DXEVENT_DESC: -// --------------- -// This structure describes a animation controller event. -// It gives the event's type, track (if the event is a track event), global -// start time, duration, transition method, and target value. -//---------------------------------------------------------------------------- -typedef struct _D3DXEVENT_DESC -{ - D3DXEVENT_TYPE Type; - UINT Track; - DOUBLE StartTime; - DOUBLE Duration; - D3DXTRANSITION_TYPE Transition; - union - { - FLOAT Weight; - FLOAT Speed; - DOUBLE Position; - BOOL Enable; - }; -} D3DXEVENT_DESC, *LPD3DXEVENT_DESC; - -//---------------------------------------------------------------------------- -// D3DXEVENTHANDLE: -// ---------------- -// Handle values used to efficiently reference animation controller events. -//---------------------------------------------------------------------------- -typedef DWORD D3DXEVENTHANDLE; -typedef D3DXEVENTHANDLE *LPD3DXEVENTHANDLE; - - -//---------------------------------------------------------------------------- -// ID3DXAnimationCallbackHandler: -// ------------------------------ -// This interface is intended to be implemented by the application, and can -// be used to handle callbacks in animation sets generated when -// ID3DXAnimationController::AdvanceTime() is called. -//---------------------------------------------------------------------------- -typedef interface ID3DXAnimationCallbackHandler ID3DXAnimationCallbackHandler; -typedef interface ID3DXAnimationCallbackHandler *LPD3DXANIMATIONCALLBACKHANDLER; - -#undef INTERFACE -#define INTERFACE ID3DXAnimationCallbackHandler - -DECLARE_INTERFACE(ID3DXAnimationCallbackHandler) -{ - //---------------------------------------------------------------------------- - // ID3DXAnimationCallbackHandler::HandleCallback: - // ---------------------------------------------- - // This method gets called when a callback occurs for an animation set in one - // of the tracks during the ID3DXAnimationController::AdvanceTime() call. - // - // Parameters: - // Track - // Index of the track on which the callback occured. - // pCallbackData - // Pointer to user owned callback data. - // - //---------------------------------------------------------------------------- - STDMETHOD(HandleCallback)(THIS_ UINT Track, LPVOID pCallbackData) PURE; -}; - - -//---------------------------------------------------------------------------- -// ID3DXAnimationController: -// ------------------------- -// This interface implements the main animation functionality. It connects -// animation sets with the transform frames that are being animated. Allows -// mixing multiple animations for blended animations or for transistions -// It adds also has methods to modify blending parameters over time to -// enable smooth transistions and other effects. -//---------------------------------------------------------------------------- -typedef interface ID3DXAnimationController ID3DXAnimationController; -typedef interface ID3DXAnimationController *LPD3DXANIMATIONCONTROLLER; - -#undef INTERFACE -#define INTERFACE ID3DXAnimationController - -DECLARE_INTERFACE_(ID3DXAnimationController, IUnknown) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // Max sizes - STDMETHOD_(UINT, GetMaxNumAnimationOutputs)(THIS) PURE; - STDMETHOD_(UINT, GetMaxNumAnimationSets)(THIS) PURE; - STDMETHOD_(UINT, GetMaxNumTracks)(THIS) PURE; - STDMETHOD_(UINT, GetMaxNumEvents)(THIS) PURE; - - // Animation output registration - STDMETHOD(RegisterAnimationOutput)(THIS_ - LPCSTR pName, - D3DXMATRIX *pMatrix, - D3DXVECTOR3 *pScale, - D3DXQUATERNION *pRotation, - D3DXVECTOR3 *pTranslation) PURE; - - // Animation set registration - STDMETHOD(RegisterAnimationSet)(THIS_ LPD3DXANIMATIONSET pAnimSet) PURE; - STDMETHOD(UnregisterAnimationSet)(THIS_ LPD3DXANIMATIONSET pAnimSet) PURE; - - STDMETHOD_(UINT, GetNumAnimationSets)(THIS) PURE; - STDMETHOD(GetAnimationSet)(THIS_ UINT Index, LPD3DXANIMATIONSET *ppAnimationSet) PURE; - STDMETHOD(GetAnimationSetByName)(THIS_ LPCSTR szName, LPD3DXANIMATIONSET *ppAnimationSet) PURE; - - // Global time - STDMETHOD(AdvanceTime)(THIS_ DOUBLE TimeDelta, LPD3DXANIMATIONCALLBACKHANDLER pCallbackHandler) PURE; - STDMETHOD(ResetTime)(THIS) PURE; - STDMETHOD_(DOUBLE, GetTime)(THIS) PURE; - - // Tracks - STDMETHOD(SetTrackAnimationSet)(THIS_ UINT Track, LPD3DXANIMATIONSET pAnimSet) PURE; - STDMETHOD(GetTrackAnimationSet)(THIS_ UINT Track, LPD3DXANIMATIONSET *ppAnimSet) PURE; - - STDMETHOD(SetTrackPriority)(THIS_ UINT Track, D3DXPRIORITY_TYPE Priority) PURE; - - STDMETHOD(SetTrackSpeed)(THIS_ UINT Track, FLOAT Speed) PURE; - STDMETHOD(SetTrackWeight)(THIS_ UINT Track, FLOAT Weight) PURE; - STDMETHOD(SetTrackPosition)(THIS_ UINT Track, DOUBLE Position) PURE; - STDMETHOD(SetTrackEnable)(THIS_ UINT Track, BOOL Enable) PURE; - - STDMETHOD(SetTrackDesc)(THIS_ UINT Track, LPD3DXTRACK_DESC pDesc) PURE; - STDMETHOD(GetTrackDesc)(THIS_ UINT Track, LPD3DXTRACK_DESC pDesc) PURE; - - // Priority blending - STDMETHOD(SetPriorityBlend)(THIS_ FLOAT BlendWeight) PURE; - STDMETHOD_(FLOAT, GetPriorityBlend)(THIS) PURE; - - // Event keying - STDMETHOD_(D3DXEVENTHANDLE, KeyTrackSpeed)(THIS_ UINT Track, FLOAT NewSpeed, DOUBLE StartTime, DOUBLE Duration, D3DXTRANSITION_TYPE Transition) PURE; - STDMETHOD_(D3DXEVENTHANDLE, KeyTrackWeight)(THIS_ UINT Track, FLOAT NewWeight, DOUBLE StartTime, DOUBLE Duration, D3DXTRANSITION_TYPE Transition) PURE; - STDMETHOD_(D3DXEVENTHANDLE, KeyTrackPosition)(THIS_ UINT Track, DOUBLE NewPosition, DOUBLE StartTime) PURE; - STDMETHOD_(D3DXEVENTHANDLE, KeyTrackEnable)(THIS_ UINT Track, BOOL NewEnable, DOUBLE StartTime) PURE; - - STDMETHOD_(D3DXEVENTHANDLE, KeyPriorityBlend)(THIS_ FLOAT NewBlendWeight, DOUBLE StartTime, DOUBLE Duration, D3DXTRANSITION_TYPE Transition) PURE; - - // Event unkeying - STDMETHOD(UnkeyEvent)(THIS_ D3DXEVENTHANDLE hEvent) PURE; - - STDMETHOD(UnkeyAllTrackEvents)(THIS_ UINT Track) PURE; - STDMETHOD(UnkeyAllPriorityBlends)(THIS) PURE; - - // Event enumeration - STDMETHOD_(D3DXEVENTHANDLE, GetCurrentTrackEvent)(THIS_ UINT Track, D3DXEVENT_TYPE EventType) PURE; - STDMETHOD_(D3DXEVENTHANDLE, GetCurrentPriorityBlend)(THIS) PURE; - - STDMETHOD_(D3DXEVENTHANDLE, GetUpcomingTrackEvent)(THIS_ UINT Track, D3DXEVENTHANDLE hEvent) PURE; - STDMETHOD_(D3DXEVENTHANDLE, GetUpcomingPriorityBlend)(THIS_ D3DXEVENTHANDLE hEvent) PURE; - - STDMETHOD(ValidateEvent)(THIS_ D3DXEVENTHANDLE hEvent) PURE; - - STDMETHOD(GetEventDesc)(THIS_ D3DXEVENTHANDLE hEvent, LPD3DXEVENT_DESC pDesc) PURE; - - // Cloning - STDMETHOD(CloneAnimationController)(THIS_ - UINT MaxNumAnimationOutputs, - UINT MaxNumAnimationSets, - UINT MaxNumTracks, - UINT MaxNumEvents, - LPD3DXANIMATIONCONTROLLER *ppAnimController) PURE; -}; - -#ifdef __cplusplus -extern "C" { -#endif //__cplusplus - - -//---------------------------------------------------------------------------- -// D3DXLoadMeshHierarchyFromX: -// --------------------------- -// Loads the first frame hierarchy in a .X file. -// -// Parameters: -// Filename -// Name of the .X file -// MeshOptions -// Mesh creation options for meshes in the file (see d3dx9mesh.h) -// pD3DDevice -// D3D9 device on which meshes in the file are created in -// pAlloc -// Allocation interface used to allocate nodes of the frame hierarchy -// pUserDataLoader -// Application provided interface to allow loading of user data -// ppFrameHierarchy -// Returns root node pointer of the loaded frame hierarchy -// ppAnimController -// Returns pointer to an animation controller corresponding to animation -// in the .X file. This is created with default max tracks and events -// -//---------------------------------------------------------------------------- -HRESULT WINAPI -D3DXLoadMeshHierarchyFromXA - ( - LPCSTR Filename, - DWORD MeshOptions, - LPDIRECT3DDEVICE9 pD3DDevice, - LPD3DXALLOCATEHIERARCHY pAlloc, - LPD3DXLOADUSERDATA pUserDataLoader, - LPD3DXFRAME *ppFrameHierarchy, - LPD3DXANIMATIONCONTROLLER *ppAnimController - ); - -HRESULT WINAPI -D3DXLoadMeshHierarchyFromXW - ( - LPCWSTR Filename, - DWORD MeshOptions, - LPDIRECT3DDEVICE9 pD3DDevice, - LPD3DXALLOCATEHIERARCHY pAlloc, - LPD3DXLOADUSERDATA pUserDataLoader, - LPD3DXFRAME *ppFrameHierarchy, - LPD3DXANIMATIONCONTROLLER *ppAnimController - ); - -#ifdef UNICODE -#define D3DXLoadMeshHierarchyFromX D3DXLoadMeshHierarchyFromXW -#else -#define D3DXLoadMeshHierarchyFromX D3DXLoadMeshHierarchyFromXA -#endif - -HRESULT WINAPI -D3DXLoadMeshHierarchyFromXInMemory - ( - LPCVOID Memory, - DWORD SizeOfMemory, - DWORD MeshOptions, - LPDIRECT3DDEVICE9 pD3DDevice, - LPD3DXALLOCATEHIERARCHY pAlloc, - LPD3DXLOADUSERDATA pUserDataLoader, - LPD3DXFRAME *ppFrameHierarchy, - LPD3DXANIMATIONCONTROLLER *ppAnimController - ); - -//---------------------------------------------------------------------------- -// D3DXSaveMeshHierarchyToFile: -// ---------------------------- -// Creates a .X file and saves the mesh hierarchy and corresponding animations -// in it -// -// Parameters: -// Filename -// Name of the .X file -// XFormat -// Format of the .X file (text or binary, compressed or not, etc) -// pFrameRoot -// Root node of the hierarchy to be saved -// pAnimController -// The animation controller whose animation sets are to be stored -// pUserDataSaver -// Application provided interface to allow adding of user data to -// data objects saved to .X file -// -//---------------------------------------------------------------------------- -HRESULT WINAPI -D3DXSaveMeshHierarchyToFileA - ( - LPCSTR Filename, - DWORD XFormat, - CONST D3DXFRAME *pFrameRoot, - LPD3DXANIMATIONCONTROLLER pAnimcontroller, - LPD3DXSAVEUSERDATA pUserDataSaver - ); - -HRESULT WINAPI -D3DXSaveMeshHierarchyToFileW - ( - LPCWSTR Filename, - DWORD XFormat, - CONST D3DXFRAME *pFrameRoot, - LPD3DXANIMATIONCONTROLLER pAnimController, - LPD3DXSAVEUSERDATA pUserDataSaver - ); - -#ifdef UNICODE -#define D3DXSaveMeshHierarchyToFile D3DXSaveMeshHierarchyToFileW -#else -#define D3DXSaveMeshHierarchyToFile D3DXSaveMeshHierarchyToFileA -#endif - -//---------------------------------------------------------------------------- -// D3DXFrameDestroy: -// ----------------- -// Destroys the subtree of frames under the root, including the root -// -// Parameters: -// pFrameRoot -// Pointer to the root node -// pAlloc -// Allocation interface used to de-allocate nodes of the frame hierarchy -// -//---------------------------------------------------------------------------- -HRESULT WINAPI -D3DXFrameDestroy - ( - LPD3DXFRAME pFrameRoot, - LPD3DXALLOCATEHIERARCHY pAlloc - ); - -//---------------------------------------------------------------------------- -// D3DXFrameAppendChild: -// --------------------- -// Add a child frame to a frame -// -// Parameters: -// pFrameParent -// Pointer to the parent node -// pFrameChild -// Pointer to the child node -// -//---------------------------------------------------------------------------- -HRESULT WINAPI -D3DXFrameAppendChild - ( - LPD3DXFRAME pFrameParent, - CONST D3DXFRAME *pFrameChild - ); - -//---------------------------------------------------------------------------- -// D3DXFrameFind: -// -------------- -// Finds a frame with the given name. Returns NULL if no frame found. -// -// Parameters: -// pFrameRoot -// Pointer to the root node -// Name -// Name of frame to find -// -//---------------------------------------------------------------------------- -LPD3DXFRAME WINAPI -D3DXFrameFind - ( - CONST D3DXFRAME *pFrameRoot, - LPCSTR Name - ); - -//---------------------------------------------------------------------------- -// D3DXFrameRegisterNamedMatrices: -// ------------------------------- -// Finds all frames that have non-null names and registers each of those frame -// matrices to the given animation controller -// -// Parameters: -// pFrameRoot -// Pointer to the root node -// pAnimController -// Pointer to the animation controller where the matrices are registered -// -//---------------------------------------------------------------------------- -HRESULT WINAPI -D3DXFrameRegisterNamedMatrices - ( - LPD3DXFRAME pFrameRoot, - LPD3DXANIMATIONCONTROLLER pAnimController - ); - -//---------------------------------------------------------------------------- -// D3DXFrameNumNamedMatrices: -// -------------------------- -// Counts number of frames in a subtree that have non-null names -// -// Parameters: -// pFrameRoot -// Pointer to the root node of the subtree -// Return Value: -// Count of frames -// -//---------------------------------------------------------------------------- -UINT WINAPI -D3DXFrameNumNamedMatrices - ( - CONST D3DXFRAME *pFrameRoot - ); - -//---------------------------------------------------------------------------- -// D3DXFrameCalculateBoundingSphere: -// --------------------------------- -// Computes the bounding sphere of all the meshes in the frame hierarchy. -// -// Parameters: -// pFrameRoot -// Pointer to the root node -// pObjectCenter -// Returns the center of the bounding sphere -// pObjectRadius -// Returns the radius of the bounding sphere -// -//---------------------------------------------------------------------------- -HRESULT WINAPI -D3DXFrameCalculateBoundingSphere - ( - CONST D3DXFRAME *pFrameRoot, - LPD3DXVECTOR3 pObjectCenter, - FLOAT *pObjectRadius - ); - - -//---------------------------------------------------------------------------- -// D3DXCreateKeyframedAnimationSet: -// -------------------------------- -// This function creates a compressable keyframed animations set interface. -// -// Parameters: -// pName -// Name of the animation set -// TicksPerSecond -// Number of keyframe ticks that elapse per second -// Playback -// Playback mode of keyframe looping -// NumAnimations -// Number of SRT animations -// NumCallbackKeys -// Number of callback keys -// pCallbackKeys -// Array of callback keys -// ppAnimationSet -// Returns the animation set interface -// -//----------------------------------------------------------------------------- -HRESULT WINAPI -D3DXCreateKeyframedAnimationSet - ( - LPCSTR pName, - DOUBLE TicksPerSecond, - D3DXPLAYBACK_TYPE Playback, - UINT NumAnimations, - UINT NumCallbackKeys, - CONST D3DXKEY_CALLBACK *pCallbackKeys, - LPD3DXKEYFRAMEDANIMATIONSET *ppAnimationSet - ); - - -//---------------------------------------------------------------------------- -// D3DXCreateCompressedAnimationSet: -// -------------------------------- -// This function creates a compressed animations set interface from -// compressed data. -// -// Parameters: -// pName -// Name of the animation set -// TicksPerSecond -// Number of keyframe ticks that elapse per second -// Playback -// Playback mode of keyframe looping -// pCompressedData -// Compressed animation SRT data -// NumCallbackKeys -// Number of callback keys -// pCallbackKeys -// Array of callback keys -// ppAnimationSet -// Returns the animation set interface -// -//----------------------------------------------------------------------------- -HRESULT WINAPI -D3DXCreateCompressedAnimationSet - ( - LPCSTR pName, - DOUBLE TicksPerSecond, - D3DXPLAYBACK_TYPE Playback, - LPD3DXBUFFER pCompressedData, - UINT NumCallbackKeys, - CONST D3DXKEY_CALLBACK *pCallbackKeys, - LPD3DXCOMPRESSEDANIMATIONSET *ppAnimationSet - ); - - -//---------------------------------------------------------------------------- -// D3DXCreateAnimationController: -// ------------------------------ -// This function creates an animation controller object. -// -// Parameters: -// MaxNumMatrices -// Maximum number of matrices that can be animated -// MaxNumAnimationSets -// Maximum number of animation sets that can be played -// MaxNumTracks -// Maximum number of animation sets that can be blended -// MaxNumEvents -// Maximum number of outstanding events that can be scheduled at any given time -// ppAnimController -// Returns the animation controller interface -// -//----------------------------------------------------------------------------- -HRESULT WINAPI -D3DXCreateAnimationController - ( - UINT MaxNumMatrices, - UINT MaxNumAnimationSets, - UINT MaxNumTracks, - UINT MaxNumEvents, - LPD3DXANIMATIONCONTROLLER *ppAnimController - ); - - -#ifdef __cplusplus -} -#endif //__cplusplus - -#endif //__D3DX9ANIM_H__ - - diff --git a/builddir/irrlicht-1.8.1/include/d3dx9core.h b/builddir/irrlicht-1.8.1/include/d3dx9core.h deleted file mode 100644 index 45243f4..0000000 --- a/builddir/irrlicht-1.8.1/include/d3dx9core.h +++ /dev/null @@ -1,753 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) Microsoft Corporation. All Rights Reserved. -// -// File: d3dx9core.h -// Content: D3DX core types and functions -// -/////////////////////////////////////////////////////////////////////////// - -#include "d3dx9.h" - -#ifndef __D3DX9CORE_H__ -#define __D3DX9CORE_H__ - - -/////////////////////////////////////////////////////////////////////////// -// D3DX_SDK_VERSION: -// ----------------- -// This identifier is passed to D3DXCheckVersion in order to ensure that an -// application was built against the correct header files and lib files. -// This number is incremented whenever a header (or other) change would -// require applications to be rebuilt. If the version doesn't match, -// D3DXCheckVersion will return FALSE. (The number itself has no meaning.) -/////////////////////////////////////////////////////////////////////////// - -#define D3DX_VERSION 0x0902 - -#define D3DX_SDK_VERSION 43 - -#ifdef __cplusplus -extern "C" { -#endif //__cplusplus - -BOOL WINAPI - D3DXCheckVersion(UINT D3DSdkVersion, UINT D3DXSdkVersion); - -#ifdef __cplusplus -} -#endif //__cplusplus - - - -/////////////////////////////////////////////////////////////////////////// -// D3DXDebugMute -// Mutes D3DX and D3D debug spew (TRUE - mute, FALSE - not mute) -// -// returns previous mute value -// -/////////////////////////////////////////////////////////////////////////// - -#ifdef __cplusplus -extern "C" { -#endif //__cplusplus - -BOOL WINAPI - D3DXDebugMute(BOOL Mute); - -#ifdef __cplusplus -} -#endif //__cplusplus - - -/////////////////////////////////////////////////////////////////////////// -// D3DXGetDriverLevel: -// Returns driver version information: -// -// 700 - DX7 level driver -// 800 - DX8 level driver -// 900 - DX9 level driver -/////////////////////////////////////////////////////////////////////////// - -#ifdef __cplusplus -extern "C" { -#endif //__cplusplus - -UINT WINAPI - D3DXGetDriverLevel(LPDIRECT3DDEVICE9 pDevice); - -#ifdef __cplusplus -} -#endif //__cplusplus - - -/////////////////////////////////////////////////////////////////////////// -// ID3DXBuffer: -// ------------ -// The buffer object is used by D3DX to return arbitrary size data. -// -// GetBufferPointer - -// Returns a pointer to the beginning of the buffer. -// -// GetBufferSize - -// Returns the size of the buffer, in bytes. -/////////////////////////////////////////////////////////////////////////// - -typedef interface ID3DXBuffer ID3DXBuffer; -typedef interface ID3DXBuffer *LPD3DXBUFFER; - -// {8BA5FB08-5195-40e2-AC58-0D989C3A0102} -DEFINE_GUID(IID_ID3DXBuffer, -0x8ba5fb08, 0x5195, 0x40e2, 0xac, 0x58, 0xd, 0x98, 0x9c, 0x3a, 0x1, 0x2); - -#undef INTERFACE -#define INTERFACE ID3DXBuffer - -DECLARE_INTERFACE_(ID3DXBuffer, IUnknown) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // ID3DXBuffer - STDMETHOD_(LPVOID, GetBufferPointer)(THIS) PURE; - STDMETHOD_(DWORD, GetBufferSize)(THIS) PURE; -}; - - - -////////////////////////////////////////////////////////////////////////////// -// D3DXSPRITE flags: -// ----------------- -// D3DXSPRITE_DONOTSAVESTATE -// Specifies device state is not to be saved and restored in Begin/End. -// D3DXSPRITE_DONOTMODIFY_RENDERSTATE -// Specifies device render state is not to be changed in Begin. The device -// is assumed to be in a valid state to draw vertices containing POSITION0, -// TEXCOORD0, and COLOR0 data. -// D3DXSPRITE_OBJECTSPACE -// The WORLD, VIEW, and PROJECTION transforms are NOT modified. The -// transforms currently set to the device are used to transform the sprites -// when the batch is drawn (at Flush or End). If this is not specified, -// WORLD, VIEW, and PROJECTION transforms are modified so that sprites are -// drawn in screenspace coordinates. -// D3DXSPRITE_BILLBOARD -// Rotates each sprite about its center so that it is facing the viewer. -// D3DXSPRITE_ALPHABLEND -// Enables ALPHABLEND(SRCALPHA, INVSRCALPHA) and ALPHATEST(alpha > 0). -// ID3DXFont expects this to be set when drawing text. -// D3DXSPRITE_SORT_TEXTURE -// Sprites are sorted by texture prior to drawing. This is recommended when -// drawing non-overlapping sprites of uniform depth. For example, drawing -// screen-aligned text with ID3DXFont. -// D3DXSPRITE_SORT_DEPTH_FRONTTOBACK -// Sprites are sorted by depth front-to-back prior to drawing. This is -// recommended when drawing opaque sprites of varying depths. -// D3DXSPRITE_SORT_DEPTH_BACKTOFRONT -// Sprites are sorted by depth back-to-front prior to drawing. This is -// recommended when drawing transparent sprites of varying depths. -// D3DXSPRITE_DO_NOT_ADDREF_TEXTURE -// Disables calling AddRef() on every draw, and Release() on Flush() for -// better performance. -////////////////////////////////////////////////////////////////////////////// - -#define D3DXSPRITE_DONOTSAVESTATE (1 << 0) -#define D3DXSPRITE_DONOTMODIFY_RENDERSTATE (1 << 1) -#define D3DXSPRITE_OBJECTSPACE (1 << 2) -#define D3DXSPRITE_BILLBOARD (1 << 3) -#define D3DXSPRITE_ALPHABLEND (1 << 4) -#define D3DXSPRITE_SORT_TEXTURE (1 << 5) -#define D3DXSPRITE_SORT_DEPTH_FRONTTOBACK (1 << 6) -#define D3DXSPRITE_SORT_DEPTH_BACKTOFRONT (1 << 7) -#define D3DXSPRITE_DO_NOT_ADDREF_TEXTURE (1 << 8) - - -////////////////////////////////////////////////////////////////////////////// -// ID3DXSprite: -// ------------ -// This object intends to provide an easy way to drawing sprites using D3D. -// -// Begin - -// Prepares device for drawing sprites. -// -// Draw - -// Draws a sprite. Before transformation, the sprite is the size of -// SrcRect, with its top-left corner specified by Position. The color -// and alpha channels are modulated by Color. -// -// Flush - -// Forces all batched sprites to submitted to the device. -// -// End - -// Restores device state to how it was when Begin was called. -// -// OnLostDevice, OnResetDevice - -// Call OnLostDevice() on this object before calling Reset() on the -// device, so that this object can release any stateblocks and video -// memory resources. After Reset(), the call OnResetDevice(). -////////////////////////////////////////////////////////////////////////////// - -typedef interface ID3DXSprite ID3DXSprite; -typedef interface ID3DXSprite *LPD3DXSPRITE; - - -// {BA0B762D-7D28-43ec-B9DC-2F84443B0614} -DEFINE_GUID(IID_ID3DXSprite, -0xba0b762d, 0x7d28, 0x43ec, 0xb9, 0xdc, 0x2f, 0x84, 0x44, 0x3b, 0x6, 0x14); - - -#undef INTERFACE -#define INTERFACE ID3DXSprite - -DECLARE_INTERFACE_(ID3DXSprite, IUnknown) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // ID3DXSprite - STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* ppDevice) PURE; - - STDMETHOD(GetTransform)(THIS_ D3DXMATRIX *pTransform) PURE; - STDMETHOD(SetTransform)(THIS_ CONST D3DXMATRIX *pTransform) PURE; - - STDMETHOD(SetWorldViewRH)(THIS_ CONST D3DXMATRIX *pWorld, CONST D3DXMATRIX *pView) PURE; - STDMETHOD(SetWorldViewLH)(THIS_ CONST D3DXMATRIX *pWorld, CONST D3DXMATRIX *pView) PURE; - - STDMETHOD(Begin)(THIS_ DWORD Flags) PURE; - STDMETHOD(Draw)(THIS_ LPDIRECT3DTEXTURE9 pTexture, CONST RECT *pSrcRect, CONST D3DXVECTOR3 *pCenter, CONST D3DXVECTOR3 *pPosition, D3DCOLOR Color) PURE; - STDMETHOD(Flush)(THIS) PURE; - STDMETHOD(End)(THIS) PURE; - - STDMETHOD(OnLostDevice)(THIS) PURE; - STDMETHOD(OnResetDevice)(THIS) PURE; -}; - - -#ifdef __cplusplus -extern "C" { -#endif //__cplusplus - -HRESULT WINAPI - D3DXCreateSprite( - LPDIRECT3DDEVICE9 pDevice, - LPD3DXSPRITE* ppSprite); - -#ifdef __cplusplus -} -#endif //__cplusplus - - - -////////////////////////////////////////////////////////////////////////////// -// ID3DXFont: -// ---------- -// Font objects contain the textures and resources needed to render a specific -// font on a specific device. -// -// GetGlyphData - -// Returns glyph cache data, for a given glyph. -// -// PreloadCharacters/PreloadGlyphs/PreloadText - -// Preloads glyphs into the glyph cache textures. -// -// DrawText - -// Draws formatted text on a D3D device. Some parameters are -// surprisingly similar to those of GDI's DrawText function. See GDI -// documentation for a detailed description of these parameters. -// If pSprite is NULL, an internal sprite object will be used. -// -// OnLostDevice, OnResetDevice - -// Call OnLostDevice() on this object before calling Reset() on the -// device, so that this object can release any stateblocks and video -// memory resources. After Reset(), the call OnResetDevice(). -////////////////////////////////////////////////////////////////////////////// - -typedef struct _D3DXFONT_DESCA -{ - INT Height; - UINT Width; - UINT Weight; - UINT MipLevels; - BOOL Italic; - BYTE CharSet; - BYTE OutputPrecision; - BYTE Quality; - BYTE PitchAndFamily; - CHAR FaceName[LF_FACESIZE]; - -} D3DXFONT_DESCA, *LPD3DXFONT_DESCA; - -typedef struct _D3DXFONT_DESCW -{ - INT Height; - UINT Width; - UINT Weight; - UINT MipLevels; - BOOL Italic; - BYTE CharSet; - BYTE OutputPrecision; - BYTE Quality; - BYTE PitchAndFamily; - WCHAR FaceName[LF_FACESIZE]; - -} D3DXFONT_DESCW, *LPD3DXFONT_DESCW; - -#ifdef UNICODE -typedef D3DXFONT_DESCW D3DXFONT_DESC; -typedef LPD3DXFONT_DESCW LPD3DXFONT_DESC; -#else -typedef D3DXFONT_DESCA D3DXFONT_DESC; -typedef LPD3DXFONT_DESCA LPD3DXFONT_DESC; -#endif - - -typedef interface ID3DXFont ID3DXFont; -typedef interface ID3DXFont *LPD3DXFONT; - - -// {D79DBB70-5F21-4d36-BBC2-FF525C213CDC} -DEFINE_GUID(IID_ID3DXFont, -0xd79dbb70, 0x5f21, 0x4d36, 0xbb, 0xc2, 0xff, 0x52, 0x5c, 0x21, 0x3c, 0xdc); - - -#undef INTERFACE -#define INTERFACE ID3DXFont - -DECLARE_INTERFACE_(ID3DXFont, IUnknown) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // ID3DXFont - STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9 *ppDevice) PURE; - STDMETHOD(GetDescA)(THIS_ D3DXFONT_DESCA *pDesc) PURE; - STDMETHOD(GetDescW)(THIS_ D3DXFONT_DESCW *pDesc) PURE; - STDMETHOD_(BOOL, GetTextMetricsA)(THIS_ TEXTMETRICA *pTextMetrics) PURE; - STDMETHOD_(BOOL, GetTextMetricsW)(THIS_ TEXTMETRICW *pTextMetrics) PURE; - - STDMETHOD_(HDC, GetDC)(THIS) PURE; - STDMETHOD(GetGlyphData)(THIS_ UINT Glyph, LPDIRECT3DTEXTURE9 *ppTexture, RECT *pBlackBox, POINT *pCellInc) PURE; - - STDMETHOD(PreloadCharacters)(THIS_ UINT First, UINT Last) PURE; - STDMETHOD(PreloadGlyphs)(THIS_ UINT First, UINT Last) PURE; - STDMETHOD(PreloadTextA)(THIS_ LPCSTR pString, INT Count) PURE; - STDMETHOD(PreloadTextW)(THIS_ LPCWSTR pString, INT Count) PURE; - - STDMETHOD_(INT, DrawTextA)(THIS_ LPD3DXSPRITE pSprite, LPCSTR pString, INT Count, LPRECT pRect, DWORD Format, D3DCOLOR Color) PURE; - STDMETHOD_(INT, DrawTextW)(THIS_ LPD3DXSPRITE pSprite, LPCWSTR pString, INT Count, LPRECT pRect, DWORD Format, D3DCOLOR Color) PURE; - - STDMETHOD(OnLostDevice)(THIS) PURE; - STDMETHOD(OnResetDevice)(THIS) PURE; - -#ifdef __cplusplus -#ifdef UNICODE - HRESULT GetDesc(D3DXFONT_DESCW *pDesc) { return GetDescW(pDesc); } - HRESULT PreloadText(LPCWSTR pString, INT Count) { return PreloadTextW(pString, Count); } -#else - HRESULT GetDesc(D3DXFONT_DESCA *pDesc) { return GetDescA(pDesc); } - HRESULT PreloadText(LPCSTR pString, INT Count) { return PreloadTextA(pString, Count); } -#endif -#endif //__cplusplus -}; - -#ifndef GetTextMetrics -#ifdef UNICODE -#define GetTextMetrics GetTextMetricsW -#else -#define GetTextMetrics GetTextMetricsA -#endif -#endif - -#ifndef DrawText -#ifdef UNICODE -#define DrawText DrawTextW -#else -#define DrawText DrawTextA -#endif -#endif - - -#ifdef __cplusplus -extern "C" { -#endif //__cplusplus - - -HRESULT WINAPI - D3DXCreateFontA( - LPDIRECT3DDEVICE9 pDevice, - INT Height, - UINT Width, - UINT Weight, - UINT MipLevels, - BOOL Italic, - DWORD CharSet, - DWORD OutputPrecision, - DWORD Quality, - DWORD PitchAndFamily, - LPCSTR pFaceName, - LPD3DXFONT* ppFont); - -HRESULT WINAPI - D3DXCreateFontW( - LPDIRECT3DDEVICE9 pDevice, - INT Height, - UINT Width, - UINT Weight, - UINT MipLevels, - BOOL Italic, - DWORD CharSet, - DWORD OutputPrecision, - DWORD Quality, - DWORD PitchAndFamily, - LPCWSTR pFaceName, - LPD3DXFONT* ppFont); - -#ifdef UNICODE -#define D3DXCreateFont D3DXCreateFontW -#else -#define D3DXCreateFont D3DXCreateFontA -#endif - - -HRESULT WINAPI - D3DXCreateFontIndirectA( - LPDIRECT3DDEVICE9 pDevice, - CONST D3DXFONT_DESCA* pDesc, - LPD3DXFONT* ppFont); - -HRESULT WINAPI - D3DXCreateFontIndirectW( - LPDIRECT3DDEVICE9 pDevice, - CONST D3DXFONT_DESCW* pDesc, - LPD3DXFONT* ppFont); - -#ifdef UNICODE -#define D3DXCreateFontIndirect D3DXCreateFontIndirectW -#else -#define D3DXCreateFontIndirect D3DXCreateFontIndirectA -#endif - - -#ifdef __cplusplus -} -#endif //__cplusplus - - - -/////////////////////////////////////////////////////////////////////////// -// ID3DXRenderToSurface: -// --------------------- -// This object abstracts rendering to surfaces. These surfaces do not -// necessarily need to be render targets. If they are not, a compatible -// render target is used, and the result copied into surface at end scene. -// -// BeginScene, EndScene - -// Call BeginScene() and EndScene() at the beginning and ending of your -// scene. These calls will setup and restore render targets, viewports, -// etc.. -// -// OnLostDevice, OnResetDevice - -// Call OnLostDevice() on this object before calling Reset() on the -// device, so that this object can release any stateblocks and video -// memory resources. After Reset(), the call OnResetDevice(). -/////////////////////////////////////////////////////////////////////////// - -typedef struct _D3DXRTS_DESC -{ - UINT Width; - UINT Height; - D3DFORMAT Format; - BOOL DepthStencil; - D3DFORMAT DepthStencilFormat; - -} D3DXRTS_DESC, *LPD3DXRTS_DESC; - - -typedef interface ID3DXRenderToSurface ID3DXRenderToSurface; -typedef interface ID3DXRenderToSurface *LPD3DXRENDERTOSURFACE; - - -// {6985F346-2C3D-43b3-BE8B-DAAE8A03D894} -DEFINE_GUID(IID_ID3DXRenderToSurface, -0x6985f346, 0x2c3d, 0x43b3, 0xbe, 0x8b, 0xda, 0xae, 0x8a, 0x3, 0xd8, 0x94); - - -#undef INTERFACE -#define INTERFACE ID3DXRenderToSurface - -DECLARE_INTERFACE_(ID3DXRenderToSurface, IUnknown) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // ID3DXRenderToSurface - STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* ppDevice) PURE; - STDMETHOD(GetDesc)(THIS_ D3DXRTS_DESC* pDesc) PURE; - - STDMETHOD(BeginScene)(THIS_ LPDIRECT3DSURFACE9 pSurface, CONST D3DVIEWPORT9* pViewport) PURE; - STDMETHOD(EndScene)(THIS_ DWORD MipFilter) PURE; - - STDMETHOD(OnLostDevice)(THIS) PURE; - STDMETHOD(OnResetDevice)(THIS) PURE; -}; - - -#ifdef __cplusplus -extern "C" { -#endif //__cplusplus - -HRESULT WINAPI - D3DXCreateRenderToSurface( - LPDIRECT3DDEVICE9 pDevice, - UINT Width, - UINT Height, - D3DFORMAT Format, - BOOL DepthStencil, - D3DFORMAT DepthStencilFormat, - LPD3DXRENDERTOSURFACE* ppRenderToSurface); - -#ifdef __cplusplus -} -#endif //__cplusplus - - - -/////////////////////////////////////////////////////////////////////////// -// ID3DXRenderToEnvMap: -// -------------------- -// This object abstracts rendering to environment maps. These surfaces -// do not necessarily need to be render targets. If they are not, a -// compatible render target is used, and the result copied into the -// environment map at end scene. -// -// BeginCube, BeginSphere, BeginHemisphere, BeginParabolic - -// This function initiates the rendering of the environment map. As -// parameters, you pass the textures in which will get filled in with -// the resulting environment map. -// -// Face - -// Call this function to initiate the drawing of each face. For each -// environment map, you will call this six times.. once for each face -// in D3DCUBEMAP_FACES. -// -// End - -// This will restore all render targets, and if needed compose all the -// rendered faces into the environment map surfaces. -// -// OnLostDevice, OnResetDevice - -// Call OnLostDevice() on this object before calling Reset() on the -// device, so that this object can release any stateblocks and video -// memory resources. After Reset(), the call OnResetDevice(). -/////////////////////////////////////////////////////////////////////////// - -typedef struct _D3DXRTE_DESC -{ - UINT Size; - UINT MipLevels; - D3DFORMAT Format; - BOOL DepthStencil; - D3DFORMAT DepthStencilFormat; - -} D3DXRTE_DESC, *LPD3DXRTE_DESC; - - -typedef interface ID3DXRenderToEnvMap ID3DXRenderToEnvMap; -typedef interface ID3DXRenderToEnvMap *LPD3DXRenderToEnvMap; - - -// {313F1B4B-C7B0-4fa2-9D9D-8D380B64385E} -DEFINE_GUID(IID_ID3DXRenderToEnvMap, -0x313f1b4b, 0xc7b0, 0x4fa2, 0x9d, 0x9d, 0x8d, 0x38, 0xb, 0x64, 0x38, 0x5e); - - -#undef INTERFACE -#define INTERFACE ID3DXRenderToEnvMap - -DECLARE_INTERFACE_(ID3DXRenderToEnvMap, IUnknown) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // ID3DXRenderToEnvMap - STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* ppDevice) PURE; - STDMETHOD(GetDesc)(THIS_ D3DXRTE_DESC* pDesc) PURE; - - STDMETHOD(BeginCube)(THIS_ - LPDIRECT3DCUBETEXTURE9 pCubeTex) PURE; - - STDMETHOD(BeginSphere)(THIS_ - LPDIRECT3DTEXTURE9 pTex) PURE; - - STDMETHOD(BeginHemisphere)(THIS_ - LPDIRECT3DTEXTURE9 pTexZPos, - LPDIRECT3DTEXTURE9 pTexZNeg) PURE; - - STDMETHOD(BeginParabolic)(THIS_ - LPDIRECT3DTEXTURE9 pTexZPos, - LPDIRECT3DTEXTURE9 pTexZNeg) PURE; - - STDMETHOD(Face)(THIS_ D3DCUBEMAP_FACES Face, DWORD MipFilter) PURE; - STDMETHOD(End)(THIS_ DWORD MipFilter) PURE; - - STDMETHOD(OnLostDevice)(THIS) PURE; - STDMETHOD(OnResetDevice)(THIS) PURE; -}; - - -#ifdef __cplusplus -extern "C" { -#endif //__cplusplus - -HRESULT WINAPI - D3DXCreateRenderToEnvMap( - LPDIRECT3DDEVICE9 pDevice, - UINT Size, - UINT MipLevels, - D3DFORMAT Format, - BOOL DepthStencil, - D3DFORMAT DepthStencilFormat, - LPD3DXRenderToEnvMap* ppRenderToEnvMap); - -#ifdef __cplusplus -} -#endif //__cplusplus - - - -/////////////////////////////////////////////////////////////////////////// -// ID3DXLine: -// ------------ -// This object intends to provide an easy way to draw lines using D3D. -// -// Begin - -// Prepares device for drawing lines -// -// Draw - -// Draws a line strip in screen-space. -// Input is in the form of a array defining points on the line strip. of D3DXVECTOR2 -// -// DrawTransform - -// Draws a line in screen-space with a specified input transformation matrix. -// -// End - -// Restores device state to how it was when Begin was called. -// -// SetPattern - -// Applies a stipple pattern to the line. Input is one 32-bit -// DWORD which describes the stipple pattern. 1 is opaque, 0 is -// transparent. -// -// SetPatternScale - -// Stretches the stipple pattern in the u direction. Input is one -// floating-point value. 0.0f is no scaling, whereas 1.0f doubles -// the length of the stipple pattern. -// -// SetWidth - -// Specifies the thickness of the line in the v direction. Input is -// one floating-point value. -// -// SetAntialias - -// Toggles line antialiasing. Input is a BOOL. -// TRUE = Antialiasing on. -// FALSE = Antialiasing off. -// -// SetGLLines - -// Toggles non-antialiased OpenGL line emulation. Input is a BOOL. -// TRUE = OpenGL line emulation on. -// FALSE = OpenGL line emulation off. -// -// OpenGL line: Regular line: -// *\ *\ -// | \ / \ -// | \ *\ \ -// *\ \ \ \ -// \ \ \ \ -// \ * \ * -// \ | \ / -// \| * -// * -// -// OnLostDevice, OnResetDevice - -// Call OnLostDevice() on this object before calling Reset() on the -// device, so that this object can release any stateblocks and video -// memory resources. After Reset(), the call OnResetDevice(). -/////////////////////////////////////////////////////////////////////////// - - -typedef interface ID3DXLine ID3DXLine; -typedef interface ID3DXLine *LPD3DXLINE; - - -// {D379BA7F-9042-4ac4-9F5E-58192A4C6BD8} -DEFINE_GUID(IID_ID3DXLine, -0xd379ba7f, 0x9042, 0x4ac4, 0x9f, 0x5e, 0x58, 0x19, 0x2a, 0x4c, 0x6b, 0xd8); - -#undef INTERFACE -#define INTERFACE ID3DXLine - -DECLARE_INTERFACE_(ID3DXLine, IUnknown) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // ID3DXLine - STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* ppDevice) PURE; - - STDMETHOD(Begin)(THIS) PURE; - - STDMETHOD(Draw)(THIS_ CONST D3DXVECTOR2 *pVertexList, - DWORD dwVertexListCount, D3DCOLOR Color) PURE; - - STDMETHOD(DrawTransform)(THIS_ CONST D3DXVECTOR3 *pVertexList, - DWORD dwVertexListCount, CONST D3DXMATRIX* pTransform, - D3DCOLOR Color) PURE; - - STDMETHOD(SetPattern)(THIS_ DWORD dwPattern) PURE; - STDMETHOD_(DWORD, GetPattern)(THIS) PURE; - - STDMETHOD(SetPatternScale)(THIS_ FLOAT fPatternScale) PURE; - STDMETHOD_(FLOAT, GetPatternScale)(THIS) PURE; - - STDMETHOD(SetWidth)(THIS_ FLOAT fWidth) PURE; - STDMETHOD_(FLOAT, GetWidth)(THIS) PURE; - - STDMETHOD(SetAntialias)(THIS_ BOOL bAntialias) PURE; - STDMETHOD_(BOOL, GetAntialias)(THIS) PURE; - - STDMETHOD(SetGLLines)(THIS_ BOOL bGLLines) PURE; - STDMETHOD_(BOOL, GetGLLines)(THIS) PURE; - - STDMETHOD(End)(THIS) PURE; - - STDMETHOD(OnLostDevice)(THIS) PURE; - STDMETHOD(OnResetDevice)(THIS) PURE; -}; - - -#ifdef __cplusplus -extern "C" { -#endif //__cplusplus - - -HRESULT WINAPI - D3DXCreateLine( - LPDIRECT3DDEVICE9 pDevice, - LPD3DXLINE* ppLine); - -#ifdef __cplusplus -} -#endif //__cplusplus - -#endif //__D3DX9CORE_H__ - diff --git a/builddir/irrlicht-1.8.1/include/d3dx9effect.h b/builddir/irrlicht-1.8.1/include/d3dx9effect.h deleted file mode 100644 index a3bcd30..0000000 --- a/builddir/irrlicht-1.8.1/include/d3dx9effect.h +++ /dev/null @@ -1,873 +0,0 @@ - -////////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// File: d3dx9effect.h -// Content: D3DX effect types and Shaders -// -////////////////////////////////////////////////////////////////////////////// - -#include "d3dx9.h" - -#ifndef __D3DX9EFFECT_H__ -#define __D3DX9EFFECT_H__ - - -//---------------------------------------------------------------------------- -// D3DXFX_DONOTSAVESTATE -// This flag is used as a parameter to ID3DXEffect::Begin(). When this flag -// is specified, device state is not saved or restored in Begin/End. -// D3DXFX_DONOTSAVESHADERSTATE -// This flag is used as a parameter to ID3DXEffect::Begin(). When this flag -// is specified, shader device state is not saved or restored in Begin/End. -// This includes pixel/vertex shaders and shader constants -// D3DXFX_DONOTSAVESAMPLERSTATE -// This flag is used as a parameter to ID3DXEffect::Begin(). When this flag -// is specified, sampler device state is not saved or restored in Begin/End. -// D3DXFX_NOT_CLONEABLE -// This flag is used as a parameter to the D3DXCreateEffect family of APIs. -// When this flag is specified, the effect will be non-cloneable and will not -// contain any shader binary data. -// Furthermore, GetPassDesc will not return shader function pointers. -// Setting this flag reduces effect memory usage by about 50%. -//---------------------------------------------------------------------------- - -#define D3DXFX_DONOTSAVESTATE (1 << 0) -#define D3DXFX_DONOTSAVESHADERSTATE (1 << 1) -#define D3DXFX_DONOTSAVESAMPLERSTATE (1 << 2) - -#define D3DXFX_NOT_CLONEABLE (1 << 11) -#define D3DXFX_LARGEADDRESSAWARE (1 << 17) - -//---------------------------------------------------------------------------- -// D3DX_PARAMETER_SHARED -// Indicates that the value of a parameter will be shared with all effects -// which share the same namespace. Changing the value in one effect will -// change it in all. -// -// D3DX_PARAMETER_LITERAL -// Indicates that the value of this parameter can be treated as literal. -// Literal parameters can be marked when the effect is compiled, and their -// cannot be changed after the effect is compiled. Shared parameters cannot -// be literal. -//---------------------------------------------------------------------------- - -#define D3DX_PARAMETER_SHARED (1 << 0) -#define D3DX_PARAMETER_LITERAL (1 << 1) -#define D3DX_PARAMETER_ANNOTATION (1 << 2) - -//---------------------------------------------------------------------------- -// D3DXEFFECT_DESC: -//---------------------------------------------------------------------------- - -typedef struct _D3DXEFFECT_DESC -{ - LPCSTR Creator; // Creator string - UINT Parameters; // Number of parameters - UINT Techniques; // Number of techniques - UINT Functions; // Number of function entrypoints - -} D3DXEFFECT_DESC; - - -//---------------------------------------------------------------------------- -// D3DXPARAMETER_DESC: -//---------------------------------------------------------------------------- - -typedef struct _D3DXPARAMETER_DESC -{ - LPCSTR Name; // Parameter name - LPCSTR Semantic; // Parameter semantic - D3DXPARAMETER_CLASS Class; // Class - D3DXPARAMETER_TYPE Type; // Component type - UINT Rows; // Number of rows - UINT Columns; // Number of columns - UINT Elements; // Number of array elements - UINT Annotations; // Number of annotations - UINT StructMembers; // Number of structure member sub-parameters - DWORD Flags; // D3DX_PARAMETER_* flags - UINT Bytes; // Parameter size, in bytes - -} D3DXPARAMETER_DESC; - - -//---------------------------------------------------------------------------- -// D3DXTECHNIQUE_DESC: -//---------------------------------------------------------------------------- - -typedef struct _D3DXTECHNIQUE_DESC -{ - LPCSTR Name; // Technique name - UINT Passes; // Number of passes - UINT Annotations; // Number of annotations - -} D3DXTECHNIQUE_DESC; - - -//---------------------------------------------------------------------------- -// D3DXPASS_DESC: -//---------------------------------------------------------------------------- - -typedef struct _D3DXPASS_DESC -{ - LPCSTR Name; // Pass name - UINT Annotations; // Number of annotations - - CONST DWORD *pVertexShaderFunction; // Vertex shader function - CONST DWORD *pPixelShaderFunction; // Pixel shader function - -} D3DXPASS_DESC; - - -//---------------------------------------------------------------------------- -// D3DXFUNCTION_DESC: -//---------------------------------------------------------------------------- - -typedef struct _D3DXFUNCTION_DESC -{ - LPCSTR Name; // Function name - UINT Annotations; // Number of annotations - -} D3DXFUNCTION_DESC; - - - -////////////////////////////////////////////////////////////////////////////// -// ID3DXEffectPool /////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// - -typedef interface ID3DXEffectPool ID3DXEffectPool; -typedef interface ID3DXEffectPool *LPD3DXEFFECTPOOL; - -// {9537AB04-3250-412e-8213-FCD2F8677933} -DEFINE_GUID(IID_ID3DXEffectPool, -0x9537ab04, 0x3250, 0x412e, 0x82, 0x13, 0xfc, 0xd2, 0xf8, 0x67, 0x79, 0x33); - - -#undef INTERFACE -#define INTERFACE ID3DXEffectPool - -DECLARE_INTERFACE_(ID3DXEffectPool, IUnknown) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // No public methods -}; - - -////////////////////////////////////////////////////////////////////////////// -// ID3DXBaseEffect /////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// - -typedef interface ID3DXBaseEffect ID3DXBaseEffect; -typedef interface ID3DXBaseEffect *LPD3DXBASEEFFECT; - -// {017C18AC-103F-4417-8C51-6BF6EF1E56BE} -DEFINE_GUID(IID_ID3DXBaseEffect, -0x17c18ac, 0x103f, 0x4417, 0x8c, 0x51, 0x6b, 0xf6, 0xef, 0x1e, 0x56, 0xbe); - - -#undef INTERFACE -#define INTERFACE ID3DXBaseEffect - -DECLARE_INTERFACE_(ID3DXBaseEffect, IUnknown) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // Descs - STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* pDesc) PURE; - STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE hParameter, D3DXPARAMETER_DESC* pDesc) PURE; - STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE hTechnique, D3DXTECHNIQUE_DESC* pDesc) PURE; - STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE hPass, D3DXPASS_DESC* pDesc) PURE; - STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE hShader, D3DXFUNCTION_DESC* pDesc) PURE; - - // Handle operations - STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE hParameter, UINT Index) PURE; - STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE hParameter, LPCSTR pName) PURE; - STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE hParameter, LPCSTR pSemantic) PURE; - STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE hParameter, UINT Index) PURE; - STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT Index) PURE; - STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ LPCSTR pName) PURE; - STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE hTechnique, UINT Index) PURE; - STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE hTechnique, LPCSTR pName) PURE; - STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT Index) PURE; - STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ LPCSTR pName) PURE; - STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE hObject, UINT Index) PURE; - STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE hObject, LPCSTR pName) PURE; - - // Get/Set Parameters - STDMETHOD(SetValue)(THIS_ D3DXHANDLE hParameter, LPCVOID pData, UINT Bytes) PURE; - STDMETHOD(GetValue)(THIS_ D3DXHANDLE hParameter, LPVOID pData, UINT Bytes) PURE; - STDMETHOD(SetBool)(THIS_ D3DXHANDLE hParameter, BOOL b) PURE; - STDMETHOD(GetBool)(THIS_ D3DXHANDLE hParameter, BOOL* pb) PURE; - STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE hParameter, CONST BOOL* pb, UINT Count) PURE; - STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE hParameter, BOOL* pb, UINT Count) PURE; - STDMETHOD(SetInt)(THIS_ D3DXHANDLE hParameter, INT n) PURE; - STDMETHOD(GetInt)(THIS_ D3DXHANDLE hParameter, INT* pn) PURE; - STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE hParameter, CONST INT* pn, UINT Count) PURE; - STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE hParameter, INT* pn, UINT Count) PURE; - STDMETHOD(SetFloat)(THIS_ D3DXHANDLE hParameter, FLOAT f) PURE; - STDMETHOD(GetFloat)(THIS_ D3DXHANDLE hParameter, FLOAT* pf) PURE; - STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE hParameter, CONST FLOAT* pf, UINT Count) PURE; - STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE hParameter, FLOAT* pf, UINT Count) PURE; - STDMETHOD(SetVector)(THIS_ D3DXHANDLE hParameter, CONST D3DXVECTOR4* pVector) PURE; - STDMETHOD(GetVector)(THIS_ D3DXHANDLE hParameter, D3DXVECTOR4* pVector) PURE; - STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXVECTOR4* pVector, UINT Count) PURE; - STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE hParameter, D3DXVECTOR4* pVector, UINT Count) PURE; - STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix) PURE; - STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix) PURE; - STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix, UINT Count) PURE; - STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix, UINT Count) PURE; - STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE; - STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX** ppMatrix, UINT Count) PURE; - STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix) PURE; - STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix) PURE; - STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix, UINT Count) PURE; - STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix, UINT Count) PURE; - STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE; - STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX** ppMatrix, UINT Count) PURE; - STDMETHOD(SetString)(THIS_ D3DXHANDLE hParameter, LPCSTR pString) PURE; - STDMETHOD(GetString)(THIS_ D3DXHANDLE hParameter, LPCSTR* ppString) PURE; - STDMETHOD(SetTexture)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DBASETEXTURE9 pTexture) PURE; - STDMETHOD(GetTexture)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DBASETEXTURE9 *ppTexture) PURE; - STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DPIXELSHADER9 *ppPShader) PURE; - STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DVERTEXSHADER9 *ppVShader) PURE; - - //Set Range of an Array to pass to device - //Useful for sending only a subrange of an array down to the device - STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE hParameter, UINT uStart, UINT uEnd) PURE; - -}; - - -//---------------------------------------------------------------------------- -// ID3DXEffectStateManager: -// ------------------------ -// This is a user implemented interface that can be used to manage device -// state changes made by an Effect. -//---------------------------------------------------------------------------- - -typedef interface ID3DXEffectStateManager ID3DXEffectStateManager; -typedef interface ID3DXEffectStateManager *LPD3DXEFFECTSTATEMANAGER; - -// {79AAB587-6DBC-4fa7-82DE-37FA1781C5CE} -DEFINE_GUID(IID_ID3DXEffectStateManager, -0x79aab587, 0x6dbc, 0x4fa7, 0x82, 0xde, 0x37, 0xfa, 0x17, 0x81, 0xc5, 0xce); - -#undef INTERFACE -#define INTERFACE ID3DXEffectStateManager - -DECLARE_INTERFACE_(ID3DXEffectStateManager, IUnknown) -{ - // The user must correctly implement QueryInterface, AddRef, and Release. - - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // The following methods are called by the Effect when it wants to make - // the corresponding device call. Note that: - // 1. Users manage the state and are therefore responsible for making the - // the corresponding device calls themselves inside their callbacks. - // 2. Effects pay attention to the return values of the callbacks, and so - // users must pay attention to what they return in their callbacks. - - STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX *pMatrix) PURE; - STDMETHOD(SetMaterial)(THIS_ CONST D3DMATERIAL9 *pMaterial) PURE; - STDMETHOD(SetLight)(THIS_ DWORD Index, CONST D3DLIGHT9 *pLight) PURE; - STDMETHOD(LightEnable)(THIS_ DWORD Index, BOOL Enable) PURE; - STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE State, DWORD Value) PURE; - STDMETHOD(SetTexture)(THIS_ DWORD Stage, LPDIRECT3DBASETEXTURE9 pTexture) PURE; - STDMETHOD(SetTextureStageState)(THIS_ DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value) PURE; - STDMETHOD(SetSamplerState)(THIS_ DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value) PURE; - STDMETHOD(SetNPatchMode)(THIS_ FLOAT NumSegments) PURE; - STDMETHOD(SetFVF)(THIS_ DWORD FVF) PURE; - STDMETHOD(SetVertexShader)(THIS_ LPDIRECT3DVERTEXSHADER9 pShader) PURE; - STDMETHOD(SetVertexShaderConstantF)(THIS_ UINT RegisterIndex, CONST FLOAT *pConstantData, UINT RegisterCount) PURE; - STDMETHOD(SetVertexShaderConstantI)(THIS_ UINT RegisterIndex, CONST INT *pConstantData, UINT RegisterCount) PURE; - STDMETHOD(SetVertexShaderConstantB)(THIS_ UINT RegisterIndex, CONST BOOL *pConstantData, UINT RegisterCount) PURE; - STDMETHOD(SetPixelShader)(THIS_ LPDIRECT3DPIXELSHADER9 pShader) PURE; - STDMETHOD(SetPixelShaderConstantF)(THIS_ UINT RegisterIndex, CONST FLOAT *pConstantData, UINT RegisterCount) PURE; - STDMETHOD(SetPixelShaderConstantI)(THIS_ UINT RegisterIndex, CONST INT *pConstantData, UINT RegisterCount) PURE; - STDMETHOD(SetPixelShaderConstantB)(THIS_ UINT RegisterIndex, CONST BOOL *pConstantData, UINT RegisterCount) PURE; -}; - - -////////////////////////////////////////////////////////////////////////////// -// ID3DXEffect /////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// - -typedef interface ID3DXEffect ID3DXEffect; -typedef interface ID3DXEffect *LPD3DXEFFECT; - -// {F6CEB4B3-4E4C-40dd-B883-8D8DE5EA0CD5} -DEFINE_GUID(IID_ID3DXEffect, -0xf6ceb4b3, 0x4e4c, 0x40dd, 0xb8, 0x83, 0x8d, 0x8d, 0xe5, 0xea, 0xc, 0xd5); - -#undef INTERFACE -#define INTERFACE ID3DXEffect - -DECLARE_INTERFACE_(ID3DXEffect, ID3DXBaseEffect) -{ - // ID3DXBaseEffect - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // Descs - STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* pDesc) PURE; - STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE hParameter, D3DXPARAMETER_DESC* pDesc) PURE; - STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE hTechnique, D3DXTECHNIQUE_DESC* pDesc) PURE; - STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE hPass, D3DXPASS_DESC* pDesc) PURE; - STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE hShader, D3DXFUNCTION_DESC* pDesc) PURE; - - // Handle operations - STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE hParameter, UINT Index) PURE; - STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE hParameter, LPCSTR pName) PURE; - STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE hParameter, LPCSTR pSemantic) PURE; - STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE hParameter, UINT Index) PURE; - STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT Index) PURE; - STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ LPCSTR pName) PURE; - STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE hTechnique, UINT Index) PURE; - STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE hTechnique, LPCSTR pName) PURE; - STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT Index) PURE; - STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ LPCSTR pName) PURE; - STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE hObject, UINT Index) PURE; - STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE hObject, LPCSTR pName) PURE; - - // Get/Set Parameters - STDMETHOD(SetValue)(THIS_ D3DXHANDLE hParameter, LPCVOID pData, UINT Bytes) PURE; - STDMETHOD(GetValue)(THIS_ D3DXHANDLE hParameter, LPVOID pData, UINT Bytes) PURE; - STDMETHOD(SetBool)(THIS_ D3DXHANDLE hParameter, BOOL b) PURE; - STDMETHOD(GetBool)(THIS_ D3DXHANDLE hParameter, BOOL* pb) PURE; - STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE hParameter, CONST BOOL* pb, UINT Count) PURE; - STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE hParameter, BOOL* pb, UINT Count) PURE; - STDMETHOD(SetInt)(THIS_ D3DXHANDLE hParameter, INT n) PURE; - STDMETHOD(GetInt)(THIS_ D3DXHANDLE hParameter, INT* pn) PURE; - STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE hParameter, CONST INT* pn, UINT Count) PURE; - STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE hParameter, INT* pn, UINT Count) PURE; - STDMETHOD(SetFloat)(THIS_ D3DXHANDLE hParameter, FLOAT f) PURE; - STDMETHOD(GetFloat)(THIS_ D3DXHANDLE hParameter, FLOAT* pf) PURE; - STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE hParameter, CONST FLOAT* pf, UINT Count) PURE; - STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE hParameter, FLOAT* pf, UINT Count) PURE; - STDMETHOD(SetVector)(THIS_ D3DXHANDLE hParameter, CONST D3DXVECTOR4* pVector) PURE; - STDMETHOD(GetVector)(THIS_ D3DXHANDLE hParameter, D3DXVECTOR4* pVector) PURE; - STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXVECTOR4* pVector, UINT Count) PURE; - STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE hParameter, D3DXVECTOR4* pVector, UINT Count) PURE; - STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix) PURE; - STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix) PURE; - STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix, UINT Count) PURE; - STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix, UINT Count) PURE; - STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE; - STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX** ppMatrix, UINT Count) PURE; - STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix) PURE; - STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix) PURE; - STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix, UINT Count) PURE; - STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix, UINT Count) PURE; - STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE; - STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX** ppMatrix, UINT Count) PURE; - STDMETHOD(SetString)(THIS_ D3DXHANDLE hParameter, LPCSTR pString) PURE; - STDMETHOD(GetString)(THIS_ D3DXHANDLE hParameter, LPCSTR* ppString) PURE; - STDMETHOD(SetTexture)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DBASETEXTURE9 pTexture) PURE; - STDMETHOD(GetTexture)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DBASETEXTURE9 *ppTexture) PURE; - STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DPIXELSHADER9 *ppPShader) PURE; - STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DVERTEXSHADER9 *ppVShader) PURE; - - //Set Range of an Array to pass to device - //Usefull for sending only a subrange of an array down to the device - STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE hParameter, UINT uStart, UINT uEnd) PURE; - // ID3DXBaseEffect - - - // Pool - STDMETHOD(GetPool)(THIS_ LPD3DXEFFECTPOOL* ppPool) PURE; - - // Selecting and setting a technique - STDMETHOD(SetTechnique)(THIS_ D3DXHANDLE hTechnique) PURE; - STDMETHOD_(D3DXHANDLE, GetCurrentTechnique)(THIS) PURE; - STDMETHOD(ValidateTechnique)(THIS_ D3DXHANDLE hTechnique) PURE; - STDMETHOD(FindNextValidTechnique)(THIS_ D3DXHANDLE hTechnique, D3DXHANDLE *pTechnique) PURE; - STDMETHOD_(BOOL, IsParameterUsed)(THIS_ D3DXHANDLE hParameter, D3DXHANDLE hTechnique) PURE; - - // Using current technique - // Begin starts active technique - // BeginPass begins a pass - // CommitChanges updates changes to any set calls in the pass. This should be called before - // any DrawPrimitive call to d3d - // EndPass ends a pass - // End ends active technique - STDMETHOD(Begin)(THIS_ UINT *pPasses, DWORD Flags) PURE; - STDMETHOD(BeginPass)(THIS_ UINT Pass) PURE; - STDMETHOD(CommitChanges)(THIS) PURE; - STDMETHOD(EndPass)(THIS) PURE; - STDMETHOD(End)(THIS) PURE; - - // Managing D3D Device - STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* ppDevice) PURE; - STDMETHOD(OnLostDevice)(THIS) PURE; - STDMETHOD(OnResetDevice)(THIS) PURE; - - // Logging device calls - STDMETHOD(SetStateManager)(THIS_ LPD3DXEFFECTSTATEMANAGER pManager) PURE; - STDMETHOD(GetStateManager)(THIS_ LPD3DXEFFECTSTATEMANAGER *ppManager) PURE; - - // Parameter blocks - STDMETHOD(BeginParameterBlock)(THIS) PURE; - STDMETHOD_(D3DXHANDLE, EndParameterBlock)(THIS) PURE; - STDMETHOD(ApplyParameterBlock)(THIS_ D3DXHANDLE hParameterBlock) PURE; - STDMETHOD(DeleteParameterBlock)(THIS_ D3DXHANDLE hParameterBlock) PURE; - - // Cloning - STDMETHOD(CloneEffect)(THIS_ LPDIRECT3DDEVICE9 pDevice, LPD3DXEFFECT* ppEffect) PURE; - - // Fast path for setting variables directly in ID3DXEffect - STDMETHOD(SetRawValue)(THIS_ D3DXHANDLE hParameter, LPCVOID pData, UINT ByteOffset, UINT Bytes) PURE; -}; - - -////////////////////////////////////////////////////////////////////////////// -// ID3DXEffectCompiler /////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// - -typedef interface ID3DXEffectCompiler ID3DXEffectCompiler; -typedef interface ID3DXEffectCompiler *LPD3DXEFFECTCOMPILER; - -// {51B8A949-1A31-47e6-BEA0-4B30DB53F1E0} -DEFINE_GUID(IID_ID3DXEffectCompiler, -0x51b8a949, 0x1a31, 0x47e6, 0xbe, 0xa0, 0x4b, 0x30, 0xdb, 0x53, 0xf1, 0xe0); - - -#undef INTERFACE -#define INTERFACE ID3DXEffectCompiler - -DECLARE_INTERFACE_(ID3DXEffectCompiler, ID3DXBaseEffect) -{ - // ID3DXBaseEffect - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // Descs - STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* pDesc) PURE; - STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE hParameter, D3DXPARAMETER_DESC* pDesc) PURE; - STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE hTechnique, D3DXTECHNIQUE_DESC* pDesc) PURE; - STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE hPass, D3DXPASS_DESC* pDesc) PURE; - STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE hShader, D3DXFUNCTION_DESC* pDesc) PURE; - - // Handle operations - STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE hParameter, UINT Index) PURE; - STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE hParameter, LPCSTR pName) PURE; - STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE hParameter, LPCSTR pSemantic) PURE; - STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE hParameter, UINT Index) PURE; - STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT Index) PURE; - STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ LPCSTR pName) PURE; - STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE hTechnique, UINT Index) PURE; - STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE hTechnique, LPCSTR pName) PURE; - STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT Index) PURE; - STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ LPCSTR pName) PURE; - STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE hObject, UINT Index) PURE; - STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE hObject, LPCSTR pName) PURE; - - // Get/Set Parameters - STDMETHOD(SetValue)(THIS_ D3DXHANDLE hParameter, LPCVOID pData, UINT Bytes) PURE; - STDMETHOD(GetValue)(THIS_ D3DXHANDLE hParameter, LPVOID pData, UINT Bytes) PURE; - STDMETHOD(SetBool)(THIS_ D3DXHANDLE hParameter, BOOL b) PURE; - STDMETHOD(GetBool)(THIS_ D3DXHANDLE hParameter, BOOL* pb) PURE; - STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE hParameter, CONST BOOL* pb, UINT Count) PURE; - STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE hParameter, BOOL* pb, UINT Count) PURE; - STDMETHOD(SetInt)(THIS_ D3DXHANDLE hParameter, INT n) PURE; - STDMETHOD(GetInt)(THIS_ D3DXHANDLE hParameter, INT* pn) PURE; - STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE hParameter, CONST INT* pn, UINT Count) PURE; - STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE hParameter, INT* pn, UINT Count) PURE; - STDMETHOD(SetFloat)(THIS_ D3DXHANDLE hParameter, FLOAT f) PURE; - STDMETHOD(GetFloat)(THIS_ D3DXHANDLE hParameter, FLOAT* pf) PURE; - STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE hParameter, CONST FLOAT* pf, UINT Count) PURE; - STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE hParameter, FLOAT* pf, UINT Count) PURE; - STDMETHOD(SetVector)(THIS_ D3DXHANDLE hParameter, CONST D3DXVECTOR4* pVector) PURE; - STDMETHOD(GetVector)(THIS_ D3DXHANDLE hParameter, D3DXVECTOR4* pVector) PURE; - STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXVECTOR4* pVector, UINT Count) PURE; - STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE hParameter, D3DXVECTOR4* pVector, UINT Count) PURE; - STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix) PURE; - STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix) PURE; - STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix, UINT Count) PURE; - STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix, UINT Count) PURE; - STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE; - STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX** ppMatrix, UINT Count) PURE; - STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix) PURE; - STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix) PURE; - STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix, UINT Count) PURE; - STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix, UINT Count) PURE; - STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE; - STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX** ppMatrix, UINT Count) PURE; - STDMETHOD(SetString)(THIS_ D3DXHANDLE hParameter, LPCSTR pString) PURE; - STDMETHOD(GetString)(THIS_ D3DXHANDLE hParameter, LPCSTR* ppString) PURE; - STDMETHOD(SetTexture)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DBASETEXTURE9 pTexture) PURE; - STDMETHOD(GetTexture)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DBASETEXTURE9 *ppTexture) PURE; - STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DPIXELSHADER9 *ppPShader) PURE; - STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DVERTEXSHADER9 *ppVShader) PURE; - - //Set Range of an Array to pass to device - //Usefull for sending only a subrange of an array down to the device - STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE hParameter, UINT uStart, UINT uEnd) PURE; - // ID3DXBaseEffect - - // Parameter sharing, specialization, and information - STDMETHOD(SetLiteral)(THIS_ D3DXHANDLE hParameter, BOOL Literal) PURE; - STDMETHOD(GetLiteral)(THIS_ D3DXHANDLE hParameter, BOOL *pLiteral) PURE; - - // Compilation - STDMETHOD(CompileEffect)(THIS_ DWORD Flags, - LPD3DXBUFFER* ppEffect, LPD3DXBUFFER* ppErrorMsgs) PURE; - - STDMETHOD(CompileShader)(THIS_ D3DXHANDLE hFunction, LPCSTR pTarget, DWORD Flags, - LPD3DXBUFFER* ppShader, LPD3DXBUFFER* ppErrorMsgs, LPD3DXCONSTANTTABLE* ppConstantTable) PURE; -}; - - -////////////////////////////////////////////////////////////////////////////// -// APIs ////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// - - -#ifdef __cplusplus -extern "C" { -#endif //__cplusplus - -//---------------------------------------------------------------------------- -// D3DXCreateEffectPool: -// --------------------- -// Creates an effect pool. Pools are used for sharing parameters between -// multiple effects. For all effects within a pool, shared parameters of the -// same name all share the same value. -// -// Parameters: -// ppPool -// Returns the created pool. -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXCreateEffectPool( - LPD3DXEFFECTPOOL* ppPool); - - -//---------------------------------------------------------------------------- -// D3DXCreateEffect: -// ----------------- -// Creates an effect from an ascii or binary effect description. -// -// Parameters: -// pDevice -// Pointer of the device on which to create the effect -// pSrcFile -// Name of the file containing the effect description -// hSrcModule -// Module handle. if NULL, current module will be used. -// pSrcResource -// Resource name in module -// pSrcData -// Pointer to effect description -// SrcDataSize -// Size of the effect description in bytes -// pDefines -// Optional NULL-terminated array of preprocessor macro definitions. -// Flags -// See D3DXSHADER_xxx flags. -// pSkipConstants -// A list of semi-colon delimited variable names. The effect will -// not set these variables to the device when they are referenced -// by a shader. NOTE: the variables specified here must be -// register bound in the file and must not be used in expressions -// in passes or samplers or the file will not load. -// pInclude -// Optional interface pointer to use for handling #include directives. -// If this parameter is NULL, #includes will be honored when compiling -// from file, and will error when compiling from resource or memory. -// pPool -// Pointer to ID3DXEffectPool object to use for shared parameters. -// If NULL, no parameters will be shared. -// ppEffect -// Returns a buffer containing created effect. -// ppCompilationErrors -// Returns a buffer containing any error messages which occurred during -// compile. Or NULL if you do not care about the error messages. -// -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXCreateEffectFromFileA( - LPDIRECT3DDEVICE9 pDevice, - LPCSTR pSrcFile, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - DWORD Flags, - LPD3DXEFFECTPOOL pPool, - LPD3DXEFFECT* ppEffect, - LPD3DXBUFFER* ppCompilationErrors); - -HRESULT WINAPI - D3DXCreateEffectFromFileW( - LPDIRECT3DDEVICE9 pDevice, - LPCWSTR pSrcFile, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - DWORD Flags, - LPD3DXEFFECTPOOL pPool, - LPD3DXEFFECT* ppEffect, - LPD3DXBUFFER* ppCompilationErrors); - -#ifdef UNICODE -#define D3DXCreateEffectFromFile D3DXCreateEffectFromFileW -#else -#define D3DXCreateEffectFromFile D3DXCreateEffectFromFileA -#endif - - -HRESULT WINAPI - D3DXCreateEffectFromResourceA( - LPDIRECT3DDEVICE9 pDevice, - HMODULE hSrcModule, - LPCSTR pSrcResource, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - DWORD Flags, - LPD3DXEFFECTPOOL pPool, - LPD3DXEFFECT* ppEffect, - LPD3DXBUFFER* ppCompilationErrors); - -HRESULT WINAPI - D3DXCreateEffectFromResourceW( - LPDIRECT3DDEVICE9 pDevice, - HMODULE hSrcModule, - LPCWSTR pSrcResource, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - DWORD Flags, - LPD3DXEFFECTPOOL pPool, - LPD3DXEFFECT* ppEffect, - LPD3DXBUFFER* ppCompilationErrors); - -#ifdef UNICODE -#define D3DXCreateEffectFromResource D3DXCreateEffectFromResourceW -#else -#define D3DXCreateEffectFromResource D3DXCreateEffectFromResourceA -#endif - - -HRESULT WINAPI - D3DXCreateEffect( - LPDIRECT3DDEVICE9 pDevice, - LPCVOID pSrcData, - UINT SrcDataLen, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - DWORD Flags, - LPD3DXEFFECTPOOL pPool, - LPD3DXEFFECT* ppEffect, - LPD3DXBUFFER* ppCompilationErrors); - -// -// Ex functions that accept pSkipConstants in addition to other parameters -// - -HRESULT WINAPI - D3DXCreateEffectFromFileExA( - LPDIRECT3DDEVICE9 pDevice, - LPCSTR pSrcFile, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - LPCSTR pSkipConstants, - DWORD Flags, - LPD3DXEFFECTPOOL pPool, - LPD3DXEFFECT* ppEffect, - LPD3DXBUFFER* ppCompilationErrors); - -HRESULT WINAPI - D3DXCreateEffectFromFileExW( - LPDIRECT3DDEVICE9 pDevice, - LPCWSTR pSrcFile, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - LPCSTR pSkipConstants, - DWORD Flags, - LPD3DXEFFECTPOOL pPool, - LPD3DXEFFECT* ppEffect, - LPD3DXBUFFER* ppCompilationErrors); - -#ifdef UNICODE -#define D3DXCreateEffectFromFileEx D3DXCreateEffectFromFileExW -#else -#define D3DXCreateEffectFromFileEx D3DXCreateEffectFromFileExA -#endif - - -HRESULT WINAPI - D3DXCreateEffectFromResourceExA( - LPDIRECT3DDEVICE9 pDevice, - HMODULE hSrcModule, - LPCSTR pSrcResource, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - LPCSTR pSkipConstants, - DWORD Flags, - LPD3DXEFFECTPOOL pPool, - LPD3DXEFFECT* ppEffect, - LPD3DXBUFFER* ppCompilationErrors); - -HRESULT WINAPI - D3DXCreateEffectFromResourceExW( - LPDIRECT3DDEVICE9 pDevice, - HMODULE hSrcModule, - LPCWSTR pSrcResource, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - LPCSTR pSkipConstants, - DWORD Flags, - LPD3DXEFFECTPOOL pPool, - LPD3DXEFFECT* ppEffect, - LPD3DXBUFFER* ppCompilationErrors); - -#ifdef UNICODE -#define D3DXCreateEffectFromResourceEx D3DXCreateEffectFromResourceExW -#else -#define D3DXCreateEffectFromResourceEx D3DXCreateEffectFromResourceExA -#endif - - -HRESULT WINAPI - D3DXCreateEffectEx( - LPDIRECT3DDEVICE9 pDevice, - LPCVOID pSrcData, - UINT SrcDataLen, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - LPCSTR pSkipConstants, - DWORD Flags, - LPD3DXEFFECTPOOL pPool, - LPD3DXEFFECT* ppEffect, - LPD3DXBUFFER* ppCompilationErrors); - -//---------------------------------------------------------------------------- -// D3DXCreateEffectCompiler: -// ------------------------- -// Creates an effect from an ascii or binary effect description. -// -// Parameters: -// pSrcFile -// Name of the file containing the effect description -// hSrcModule -// Module handle. if NULL, current module will be used. -// pSrcResource -// Resource name in module -// pSrcData -// Pointer to effect description -// SrcDataSize -// Size of the effect description in bytes -// pDefines -// Optional NULL-terminated array of preprocessor macro definitions. -// pInclude -// Optional interface pointer to use for handling #include directives. -// If this parameter is NULL, #includes will be honored when compiling -// from file, and will error when compiling from resource or memory. -// pPool -// Pointer to ID3DXEffectPool object to use for shared parameters. -// If NULL, no parameters will be shared. -// ppCompiler -// Returns a buffer containing created effect compiler. -// ppParseErrors -// Returns a buffer containing any error messages which occurred during -// parse. Or NULL if you do not care about the error messages. -// -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXCreateEffectCompilerFromFileA( - LPCSTR pSrcFile, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - DWORD Flags, - LPD3DXEFFECTCOMPILER* ppCompiler, - LPD3DXBUFFER* ppParseErrors); - -HRESULT WINAPI - D3DXCreateEffectCompilerFromFileW( - LPCWSTR pSrcFile, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - DWORD Flags, - LPD3DXEFFECTCOMPILER* ppCompiler, - LPD3DXBUFFER* ppParseErrors); - -#ifdef UNICODE -#define D3DXCreateEffectCompilerFromFile D3DXCreateEffectCompilerFromFileW -#else -#define D3DXCreateEffectCompilerFromFile D3DXCreateEffectCompilerFromFileA -#endif - - -HRESULT WINAPI - D3DXCreateEffectCompilerFromResourceA( - HMODULE hSrcModule, - LPCSTR pSrcResource, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - DWORD Flags, - LPD3DXEFFECTCOMPILER* ppCompiler, - LPD3DXBUFFER* ppParseErrors); - -HRESULT WINAPI - D3DXCreateEffectCompilerFromResourceW( - HMODULE hSrcModule, - LPCWSTR pSrcResource, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - DWORD Flags, - LPD3DXEFFECTCOMPILER* ppCompiler, - LPD3DXBUFFER* ppParseErrors); - -#ifdef UNICODE -#define D3DXCreateEffectCompilerFromResource D3DXCreateEffectCompilerFromResourceW -#else -#define D3DXCreateEffectCompilerFromResource D3DXCreateEffectCompilerFromResourceA -#endif - - -HRESULT WINAPI - D3DXCreateEffectCompiler( - LPCSTR pSrcData, - UINT SrcDataLen, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - DWORD Flags, - LPD3DXEFFECTCOMPILER* ppCompiler, - LPD3DXBUFFER* ppParseErrors); - -//---------------------------------------------------------------------------- -// D3DXDisassembleEffect: -// ----------------------- -// -// Parameters: -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXDisassembleEffect( - LPD3DXEFFECT pEffect, - BOOL EnableColorCode, - LPD3DXBUFFER *ppDisassembly); - - - -#ifdef __cplusplus -} -#endif //__cplusplus - -#endif //__D3DX9EFFECT_H__ - - diff --git a/builddir/irrlicht-1.8.1/include/d3dx9math.h b/builddir/irrlicht-1.8.1/include/d3dx9math.h deleted file mode 100644 index 3fda053..0000000 --- a/builddir/irrlicht-1.8.1/include/d3dx9math.h +++ /dev/null @@ -1,1796 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) Microsoft Corporation. All Rights Reserved. -// -// File: d3dx9math.h -// Content: D3DX math types and functions -// -////////////////////////////////////////////////////////////////////////////// - -#include "d3dx9.h" - -#ifndef __D3DX9MATH_H__ -#define __D3DX9MATH_H__ - -#include <math.h> -#if _MSC_VER >= 1200 -#pragma warning(push) -#endif -#pragma warning(disable:4201) // anonymous unions warning - - - -//=========================================================================== -// -// General purpose utilities -// -//=========================================================================== -#define D3DX_PI ((FLOAT) 3.141592654f) -#define D3DX_1BYPI ((FLOAT) 0.318309886f) - -#define D3DXToRadian( degree ) ((degree) * (D3DX_PI / 180.0f)) -#define D3DXToDegree( radian ) ((radian) * (180.0f / D3DX_PI)) - - - -//=========================================================================== -// -// 16 bit floating point numbers -// -//=========================================================================== - -#define D3DX_16F_DIG 3 // # of decimal digits of precision -#define D3DX_16F_EPSILON 4.8875809e-4f // smallest such that 1.0 + epsilon != 1.0 -#define D3DX_16F_MANT_DIG 11 // # of bits in mantissa -#define D3DX_16F_MAX 6.550400e+004 // max value -#define D3DX_16F_MAX_10_EXP 4 // max decimal exponent -#define D3DX_16F_MAX_EXP 15 // max binary exponent -#define D3DX_16F_MIN 6.1035156e-5f // min positive value -#define D3DX_16F_MIN_10_EXP (-4) // min decimal exponent -#define D3DX_16F_MIN_EXP (-14) // min binary exponent -#define D3DX_16F_RADIX 2 // exponent radix -#define D3DX_16F_ROUNDS 1 // addition rounding: near - - -typedef struct D3DXFLOAT16 -{ -#ifdef __cplusplus -public: - D3DXFLOAT16() {}; - D3DXFLOAT16( FLOAT ); - D3DXFLOAT16( CONST D3DXFLOAT16& ); - - // casting - operator FLOAT (); - - // binary operators - BOOL operator == ( CONST D3DXFLOAT16& ) const; - BOOL operator != ( CONST D3DXFLOAT16& ) const; - -protected: -#endif //__cplusplus - WORD value; -} D3DXFLOAT16, *LPD3DXFLOAT16; - - - -//=========================================================================== -// -// Vectors -// -//=========================================================================== - - -//-------------------------- -// 2D Vector -//-------------------------- -typedef struct D3DXVECTOR2 -{ -#ifdef __cplusplus -public: - D3DXVECTOR2() {}; - D3DXVECTOR2( CONST FLOAT * ); - D3DXVECTOR2( CONST D3DXFLOAT16 * ); - D3DXVECTOR2( FLOAT x, FLOAT y ); - - // casting - operator FLOAT* (); - operator CONST FLOAT* () const; - - // assignment operators - D3DXVECTOR2& operator += ( CONST D3DXVECTOR2& ); - D3DXVECTOR2& operator -= ( CONST D3DXVECTOR2& ); - D3DXVECTOR2& operator *= ( FLOAT ); - D3DXVECTOR2& operator /= ( FLOAT ); - - // unary operators - D3DXVECTOR2 operator + () const; - D3DXVECTOR2 operator - () const; - - // binary operators - D3DXVECTOR2 operator + ( CONST D3DXVECTOR2& ) const; - D3DXVECTOR2 operator - ( CONST D3DXVECTOR2& ) const; - D3DXVECTOR2 operator * ( FLOAT ) const; - D3DXVECTOR2 operator / ( FLOAT ) const; - - friend D3DXVECTOR2 operator * ( FLOAT, CONST D3DXVECTOR2& ); - - BOOL operator == ( CONST D3DXVECTOR2& ) const; - BOOL operator != ( CONST D3DXVECTOR2& ) const; - - -public: -#endif //__cplusplus - FLOAT x, y; -} D3DXVECTOR2, *LPD3DXVECTOR2; - - - -//-------------------------- -// 2D Vector (16 bit) -//-------------------------- - -typedef struct D3DXVECTOR2_16F -{ -#ifdef __cplusplus -public: - D3DXVECTOR2_16F() {}; - D3DXVECTOR2_16F( CONST FLOAT * ); - D3DXVECTOR2_16F( CONST D3DXFLOAT16 * ); - D3DXVECTOR2_16F( CONST D3DXFLOAT16 &x, CONST D3DXFLOAT16 &y ); - - // casting - operator D3DXFLOAT16* (); - operator CONST D3DXFLOAT16* () const; - - // binary operators - BOOL operator == ( CONST D3DXVECTOR2_16F& ) const; - BOOL operator != ( CONST D3DXVECTOR2_16F& ) const; - -public: -#endif //__cplusplus - D3DXFLOAT16 x, y; - -} D3DXVECTOR2_16F, *LPD3DXVECTOR2_16F; - - - -//-------------------------- -// 3D Vector -//-------------------------- -#ifdef __cplusplus -typedef struct D3DXVECTOR3 : public D3DVECTOR -{ -public: - D3DXVECTOR3() {}; - D3DXVECTOR3( CONST FLOAT * ); - D3DXVECTOR3( CONST D3DVECTOR& ); - D3DXVECTOR3( CONST D3DXFLOAT16 * ); - D3DXVECTOR3( FLOAT x, FLOAT y, FLOAT z ); - - // casting - operator FLOAT* (); - operator CONST FLOAT* () const; - - // assignment operators - D3DXVECTOR3& operator += ( CONST D3DXVECTOR3& ); - D3DXVECTOR3& operator -= ( CONST D3DXVECTOR3& ); - D3DXVECTOR3& operator *= ( FLOAT ); - D3DXVECTOR3& operator /= ( FLOAT ); - - // unary operators - D3DXVECTOR3 operator + () const; - D3DXVECTOR3 operator - () const; - - // binary operators - D3DXVECTOR3 operator + ( CONST D3DXVECTOR3& ) const; - D3DXVECTOR3 operator - ( CONST D3DXVECTOR3& ) const; - D3DXVECTOR3 operator * ( FLOAT ) const; - D3DXVECTOR3 operator / ( FLOAT ) const; - - friend D3DXVECTOR3 operator * ( FLOAT, CONST struct D3DXVECTOR3& ); - - BOOL operator == ( CONST D3DXVECTOR3& ) const; - BOOL operator != ( CONST D3DXVECTOR3& ) const; - -} D3DXVECTOR3, *LPD3DXVECTOR3; - -#else //!__cplusplus -typedef struct _D3DVECTOR D3DXVECTOR3, *LPD3DXVECTOR3; -#endif //!__cplusplus - - - -//-------------------------- -// 3D Vector (16 bit) -//-------------------------- -typedef struct D3DXVECTOR3_16F -{ -#ifdef __cplusplus -public: - D3DXVECTOR3_16F() {}; - D3DXVECTOR3_16F( CONST FLOAT * ); - D3DXVECTOR3_16F( CONST D3DVECTOR& ); - D3DXVECTOR3_16F( CONST D3DXFLOAT16 * ); - D3DXVECTOR3_16F( CONST D3DXFLOAT16 &x, CONST D3DXFLOAT16 &y, CONST D3DXFLOAT16 &z ); - - // casting - operator D3DXFLOAT16* (); - operator CONST D3DXFLOAT16* () const; - - // binary operators - BOOL operator == ( CONST D3DXVECTOR3_16F& ) const; - BOOL operator != ( CONST D3DXVECTOR3_16F& ) const; - -public: -#endif //__cplusplus - D3DXFLOAT16 x, y, z; - -} D3DXVECTOR3_16F, *LPD3DXVECTOR3_16F; - - - -//-------------------------- -// 4D Vector -//-------------------------- -typedef struct D3DXVECTOR4 -{ -#ifdef __cplusplus -public: - D3DXVECTOR4() {}; - D3DXVECTOR4( CONST FLOAT* ); - D3DXVECTOR4( CONST D3DXFLOAT16* ); - D3DXVECTOR4( CONST D3DVECTOR& xyz, FLOAT w ); - D3DXVECTOR4( FLOAT x, FLOAT y, FLOAT z, FLOAT w ); - - // casting - operator FLOAT* (); - operator CONST FLOAT* () const; - - // assignment operators - D3DXVECTOR4& operator += ( CONST D3DXVECTOR4& ); - D3DXVECTOR4& operator -= ( CONST D3DXVECTOR4& ); - D3DXVECTOR4& operator *= ( FLOAT ); - D3DXVECTOR4& operator /= ( FLOAT ); - - // unary operators - D3DXVECTOR4 operator + () const; - D3DXVECTOR4 operator - () const; - - // binary operators - D3DXVECTOR4 operator + ( CONST D3DXVECTOR4& ) const; - D3DXVECTOR4 operator - ( CONST D3DXVECTOR4& ) const; - D3DXVECTOR4 operator * ( FLOAT ) const; - D3DXVECTOR4 operator / ( FLOAT ) const; - - friend D3DXVECTOR4 operator * ( FLOAT, CONST D3DXVECTOR4& ); - - BOOL operator == ( CONST D3DXVECTOR4& ) const; - BOOL operator != ( CONST D3DXVECTOR4& ) const; - -public: -#endif //__cplusplus - FLOAT x, y, z, w; -} D3DXVECTOR4, *LPD3DXVECTOR4; - - -//-------------------------- -// 4D Vector (16 bit) -//-------------------------- -typedef struct D3DXVECTOR4_16F -{ -#ifdef __cplusplus -public: - D3DXVECTOR4_16F() {}; - D3DXVECTOR4_16F( CONST FLOAT * ); - D3DXVECTOR4_16F( CONST D3DXFLOAT16* ); - D3DXVECTOR4_16F( CONST D3DXVECTOR3_16F& xyz, CONST D3DXFLOAT16& w ); - D3DXVECTOR4_16F( CONST D3DXFLOAT16& x, CONST D3DXFLOAT16& y, CONST D3DXFLOAT16& z, CONST D3DXFLOAT16& w ); - - // casting - operator D3DXFLOAT16* (); - operator CONST D3DXFLOAT16* () const; - - // binary operators - BOOL operator == ( CONST D3DXVECTOR4_16F& ) const; - BOOL operator != ( CONST D3DXVECTOR4_16F& ) const; - -public: -#endif //__cplusplus - D3DXFLOAT16 x, y, z, w; - -} D3DXVECTOR4_16F, *LPD3DXVECTOR4_16F; - - - -//=========================================================================== -// -// Matrices -// -//=========================================================================== -#ifdef __cplusplus -typedef struct D3DXMATRIX : public D3DMATRIX -{ -public: - D3DXMATRIX() {}; - D3DXMATRIX( CONST FLOAT * ); - D3DXMATRIX( CONST D3DMATRIX& ); - D3DXMATRIX( CONST D3DXFLOAT16 * ); - D3DXMATRIX( FLOAT _11, FLOAT _12, FLOAT _13, FLOAT _14, - FLOAT _21, FLOAT _22, FLOAT _23, FLOAT _24, - FLOAT _31, FLOAT _32, FLOAT _33, FLOAT _34, - FLOAT _41, FLOAT _42, FLOAT _43, FLOAT _44 ); - - - // access grants - FLOAT& operator () ( UINT Row, UINT Col ); - FLOAT operator () ( UINT Row, UINT Col ) const; - - // casting operators - operator FLOAT* (); - operator CONST FLOAT* () const; - - // assignment operators - D3DXMATRIX& operator *= ( CONST D3DXMATRIX& ); - D3DXMATRIX& operator += ( CONST D3DXMATRIX& ); - D3DXMATRIX& operator -= ( CONST D3DXMATRIX& ); - D3DXMATRIX& operator *= ( FLOAT ); - D3DXMATRIX& operator /= ( FLOAT ); - - // unary operators - D3DXMATRIX operator + () const; - D3DXMATRIX operator - () const; - - // binary operators - D3DXMATRIX operator * ( CONST D3DXMATRIX& ) const; - D3DXMATRIX operator + ( CONST D3DXMATRIX& ) const; - D3DXMATRIX operator - ( CONST D3DXMATRIX& ) const; - D3DXMATRIX operator * ( FLOAT ) const; - D3DXMATRIX operator / ( FLOAT ) const; - - friend D3DXMATRIX operator * ( FLOAT, CONST D3DXMATRIX& ); - - BOOL operator == ( CONST D3DXMATRIX& ) const; - BOOL operator != ( CONST D3DXMATRIX& ) const; - -} D3DXMATRIX, *LPD3DXMATRIX; - -#else //!__cplusplus -typedef struct _D3DMATRIX D3DXMATRIX, *LPD3DXMATRIX; -#endif //!__cplusplus - - -//--------------------------------------------------------------------------- -// Aligned Matrices -// -// This class helps keep matrices 16-byte aligned as preferred by P4 cpus. -// It aligns matrices on the stack and on the heap or in global scope. -// It does this using __declspec(align(16)) which works on VC7 and on VC 6 -// with the processor pack. Unfortunately there is no way to detect the -// latter so this is turned on only on VC7. On other compilers this is the -// the same as D3DXMATRIX. -// -// Using this class on a compiler that does not actually do the alignment -// can be dangerous since it will not expose bugs that ignore alignment. -// E.g if an object of this class in inside a struct or class, and some code -// memcopys data in it assuming tight packing. This could break on a compiler -// that eventually start aligning the matrix. -//--------------------------------------------------------------------------- -#ifdef __cplusplus -typedef struct _D3DXMATRIXA16 : public D3DXMATRIX -{ - _D3DXMATRIXA16() {} - _D3DXMATRIXA16( CONST FLOAT * ); - _D3DXMATRIXA16( CONST D3DMATRIX& ); - _D3DXMATRIXA16( CONST D3DXFLOAT16 * ); - _D3DXMATRIXA16( FLOAT _11, FLOAT _12, FLOAT _13, FLOAT _14, - FLOAT _21, FLOAT _22, FLOAT _23, FLOAT _24, - FLOAT _31, FLOAT _32, FLOAT _33, FLOAT _34, - FLOAT _41, FLOAT _42, FLOAT _43, FLOAT _44 ); - - // new operators - void* operator new ( size_t ); - void* operator new[] ( size_t ); - - // delete operators - void operator delete ( void* ); // These are NOT virtual; Do not - void operator delete[] ( void* ); // cast to D3DXMATRIX and delete. - - // assignment operators - _D3DXMATRIXA16& operator = ( CONST D3DXMATRIX& ); - -} _D3DXMATRIXA16; - -#else //!__cplusplus -typedef D3DXMATRIX _D3DXMATRIXA16; -#endif //!__cplusplus - - - -#if _MSC_VER >= 1300 // VC7 -#define D3DX_ALIGN16 __declspec(align(16)) -#else -#define D3DX_ALIGN16 // Earlier compiler may not understand this, do nothing. -#endif - -typedef D3DX_ALIGN16 _D3DXMATRIXA16 D3DXMATRIXA16, *LPD3DXMATRIXA16; - - - -//=========================================================================== -// -// Quaternions -// -//=========================================================================== -typedef struct D3DXQUATERNION -{ -#ifdef __cplusplus -public: - D3DXQUATERNION() {} - D3DXQUATERNION( CONST FLOAT * ); - D3DXQUATERNION( CONST D3DXFLOAT16 * ); - D3DXQUATERNION( FLOAT x, FLOAT y, FLOAT z, FLOAT w ); - - // casting - operator FLOAT* (); - operator CONST FLOAT* () const; - - // assignment operators - D3DXQUATERNION& operator += ( CONST D3DXQUATERNION& ); - D3DXQUATERNION& operator -= ( CONST D3DXQUATERNION& ); - D3DXQUATERNION& operator *= ( CONST D3DXQUATERNION& ); - D3DXQUATERNION& operator *= ( FLOAT ); - D3DXQUATERNION& operator /= ( FLOAT ); - - // unary operators - D3DXQUATERNION operator + () const; - D3DXQUATERNION operator - () const; - - // binary operators - D3DXQUATERNION operator + ( CONST D3DXQUATERNION& ) const; - D3DXQUATERNION operator - ( CONST D3DXQUATERNION& ) const; - D3DXQUATERNION operator * ( CONST D3DXQUATERNION& ) const; - D3DXQUATERNION operator * ( FLOAT ) const; - D3DXQUATERNION operator / ( FLOAT ) const; - - friend D3DXQUATERNION operator * (FLOAT, CONST D3DXQUATERNION& ); - - BOOL operator == ( CONST D3DXQUATERNION& ) const; - BOOL operator != ( CONST D3DXQUATERNION& ) const; - -#endif //__cplusplus - FLOAT x, y, z, w; -} D3DXQUATERNION, *LPD3DXQUATERNION; - - -//=========================================================================== -// -// Planes -// -//=========================================================================== -typedef struct D3DXPLANE -{ -#ifdef __cplusplus -public: - D3DXPLANE() {} - D3DXPLANE( CONST FLOAT* ); - D3DXPLANE( CONST D3DXFLOAT16* ); - D3DXPLANE( FLOAT a, FLOAT b, FLOAT c, FLOAT d ); - - // casting - operator FLOAT* (); - operator CONST FLOAT* () const; - - // assignment operators - D3DXPLANE& operator *= ( FLOAT ); - D3DXPLANE& operator /= ( FLOAT ); - - // unary operators - D3DXPLANE operator + () const; - D3DXPLANE operator - () const; - - // binary operators - D3DXPLANE operator * ( FLOAT ) const; - D3DXPLANE operator / ( FLOAT ) const; - - friend D3DXPLANE operator * ( FLOAT, CONST D3DXPLANE& ); - - BOOL operator == ( CONST D3DXPLANE& ) const; - BOOL operator != ( CONST D3DXPLANE& ) const; - -#endif //__cplusplus - FLOAT a, b, c, d; -} D3DXPLANE, *LPD3DXPLANE; - - -//=========================================================================== -// -// Colors -// -//=========================================================================== - -typedef struct D3DXCOLOR -{ -#ifdef __cplusplus -public: - D3DXCOLOR() {} - D3DXCOLOR( DWORD argb ); - D3DXCOLOR( CONST FLOAT * ); - D3DXCOLOR( CONST D3DXFLOAT16 * ); - D3DXCOLOR( CONST D3DCOLORVALUE& ); - D3DXCOLOR( FLOAT r, FLOAT g, FLOAT b, FLOAT a ); - - // casting - operator DWORD () const; - - operator FLOAT* (); - operator CONST FLOAT* () const; - - operator D3DCOLORVALUE* (); - operator CONST D3DCOLORVALUE* () const; - - operator D3DCOLORVALUE& (); - operator CONST D3DCOLORVALUE& () const; - - // assignment operators - D3DXCOLOR& operator += ( CONST D3DXCOLOR& ); - D3DXCOLOR& operator -= ( CONST D3DXCOLOR& ); - D3DXCOLOR& operator *= ( FLOAT ); - D3DXCOLOR& operator /= ( FLOAT ); - - // unary operators - D3DXCOLOR operator + () const; - D3DXCOLOR operator - () const; - - // binary operators - D3DXCOLOR operator + ( CONST D3DXCOLOR& ) const; - D3DXCOLOR operator - ( CONST D3DXCOLOR& ) const; - D3DXCOLOR operator * ( FLOAT ) const; - D3DXCOLOR operator / ( FLOAT ) const; - - friend D3DXCOLOR operator * ( FLOAT, CONST D3DXCOLOR& ); - - BOOL operator == ( CONST D3DXCOLOR& ) const; - BOOL operator != ( CONST D3DXCOLOR& ) const; - -#endif //__cplusplus - FLOAT r, g, b, a; -} D3DXCOLOR, *LPD3DXCOLOR; - - - -//=========================================================================== -// -// D3DX math functions: -// -// NOTE: -// * All these functions can take the same object as in and out parameters. -// -// * Out parameters are typically also returned as return values, so that -// the output of one function may be used as a parameter to another. -// -//=========================================================================== - -//-------------------------- -// Float16 -//-------------------------- - -// non-inline -#ifdef __cplusplus -extern "C" { -#endif - -// Converts an array 32-bit floats to 16-bit floats -D3DXFLOAT16* WINAPI D3DXFloat32To16Array - ( D3DXFLOAT16 *pOut, CONST FLOAT *pIn, UINT n ); - -// Converts an array 16-bit floats to 32-bit floats -FLOAT* WINAPI D3DXFloat16To32Array - ( FLOAT *pOut, CONST D3DXFLOAT16 *pIn, UINT n ); - -#ifdef __cplusplus -} -#endif - - -//-------------------------- -// 2D Vector -//-------------------------- - -// inline - -FLOAT D3DXVec2Length - ( CONST D3DXVECTOR2 *pV ); - -FLOAT D3DXVec2LengthSq - ( CONST D3DXVECTOR2 *pV ); - -FLOAT D3DXVec2Dot - ( CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ); - -// Z component of ((x1,y1,0) cross (x2,y2,0)) -FLOAT D3DXVec2CCW - ( CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ); - -D3DXVECTOR2* D3DXVec2Add - ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ); - -D3DXVECTOR2* D3DXVec2Subtract - ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ); - -// Minimize each component. x = min(x1, x2), y = min(y1, y2) -D3DXVECTOR2* D3DXVec2Minimize - ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ); - -// Maximize each component. x = max(x1, x2), y = max(y1, y2) -D3DXVECTOR2* D3DXVec2Maximize - ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ); - -D3DXVECTOR2* D3DXVec2Scale - ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV, FLOAT s ); - -// Linear interpolation. V1 + s(V2-V1) -D3DXVECTOR2* D3DXVec2Lerp - ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2, - FLOAT s ); - -// non-inline -#ifdef __cplusplus -extern "C" { -#endif - -D3DXVECTOR2* WINAPI D3DXVec2Normalize - ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV ); - -// Hermite interpolation between position V1, tangent T1 (when s == 0) -// and position V2, tangent T2 (when s == 1). -D3DXVECTOR2* WINAPI D3DXVec2Hermite - ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pT1, - CONST D3DXVECTOR2 *pV2, CONST D3DXVECTOR2 *pT2, FLOAT s ); - -// CatmullRom interpolation between V1 (when s == 0) and V2 (when s == 1) -D3DXVECTOR2* WINAPI D3DXVec2CatmullRom - ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV0, CONST D3DXVECTOR2 *pV1, - CONST D3DXVECTOR2 *pV2, CONST D3DXVECTOR2 *pV3, FLOAT s ); - -// Barycentric coordinates. V1 + f(V2-V1) + g(V3-V1) -D3DXVECTOR2* WINAPI D3DXVec2BaryCentric - ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2, - CONST D3DXVECTOR2 *pV3, FLOAT f, FLOAT g); - -// Transform (x, y, 0, 1) by matrix. -D3DXVECTOR4* WINAPI D3DXVec2Transform - ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR2 *pV, CONST D3DXMATRIX *pM ); - -// Transform (x, y, 0, 1) by matrix, project result back into w=1. -D3DXVECTOR2* WINAPI D3DXVec2TransformCoord - ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV, CONST D3DXMATRIX *pM ); - -// Transform (x, y, 0, 0) by matrix. -D3DXVECTOR2* WINAPI D3DXVec2TransformNormal - ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV, CONST D3DXMATRIX *pM ); - -// Transform Array (x, y, 0, 1) by matrix. -D3DXVECTOR4* WINAPI D3DXVec2TransformArray - ( D3DXVECTOR4 *pOut, UINT OutStride, CONST D3DXVECTOR2 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n); - -// Transform Array (x, y, 0, 1) by matrix, project result back into w=1. -D3DXVECTOR2* WINAPI D3DXVec2TransformCoordArray - ( D3DXVECTOR2 *pOut, UINT OutStride, CONST D3DXVECTOR2 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n ); - -// Transform Array (x, y, 0, 0) by matrix. -D3DXVECTOR2* WINAPI D3DXVec2TransformNormalArray - ( D3DXVECTOR2 *pOut, UINT OutStride, CONST D3DXVECTOR2 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n ); - - - -#ifdef __cplusplus -} -#endif - - -//-------------------------- -// 3D Vector -//-------------------------- - -// inline - -FLOAT D3DXVec3Length - ( CONST D3DXVECTOR3 *pV ); - -FLOAT D3DXVec3LengthSq - ( CONST D3DXVECTOR3 *pV ); - -FLOAT D3DXVec3Dot - ( CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ); - -D3DXVECTOR3* D3DXVec3Cross - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ); - -D3DXVECTOR3* D3DXVec3Add - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ); - -D3DXVECTOR3* D3DXVec3Subtract - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ); - -// Minimize each component. x = min(x1, x2), y = min(y1, y2), ... -D3DXVECTOR3* D3DXVec3Minimize - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ); - -// Maximize each component. x = max(x1, x2), y = max(y1, y2), ... -D3DXVECTOR3* D3DXVec3Maximize - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ); - -D3DXVECTOR3* D3DXVec3Scale - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, FLOAT s); - -// Linear interpolation. V1 + s(V2-V1) -D3DXVECTOR3* D3DXVec3Lerp - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2, - FLOAT s ); - -// non-inline -#ifdef __cplusplus -extern "C" { -#endif - -D3DXVECTOR3* WINAPI D3DXVec3Normalize - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV ); - -// Hermite interpolation between position V1, tangent T1 (when s == 0) -// and position V2, tangent T2 (when s == 1). -D3DXVECTOR3* WINAPI D3DXVec3Hermite - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pT1, - CONST D3DXVECTOR3 *pV2, CONST D3DXVECTOR3 *pT2, FLOAT s ); - -// CatmullRom interpolation between V1 (when s == 0) and V2 (when s == 1) -D3DXVECTOR3* WINAPI D3DXVec3CatmullRom - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV0, CONST D3DXVECTOR3 *pV1, - CONST D3DXVECTOR3 *pV2, CONST D3DXVECTOR3 *pV3, FLOAT s ); - -// Barycentric coordinates. V1 + f(V2-V1) + g(V3-V1) -D3DXVECTOR3* WINAPI D3DXVec3BaryCentric - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2, - CONST D3DXVECTOR3 *pV3, FLOAT f, FLOAT g); - -// Transform (x, y, z, 1) by matrix. -D3DXVECTOR4* WINAPI D3DXVec3Transform - ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR3 *pV, CONST D3DXMATRIX *pM ); - -// Transform (x, y, z, 1) by matrix, project result back into w=1. -D3DXVECTOR3* WINAPI D3DXVec3TransformCoord - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3DXMATRIX *pM ); - -// Transform (x, y, z, 0) by matrix. If you transforming a normal by a -// non-affine matrix, the matrix you pass to this function should be the -// transpose of the inverse of the matrix you would use to transform a coord. -D3DXVECTOR3* WINAPI D3DXVec3TransformNormal - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3DXMATRIX *pM ); - - -// Transform Array (x, y, z, 1) by matrix. -D3DXVECTOR4* WINAPI D3DXVec3TransformArray - ( D3DXVECTOR4 *pOut, UINT OutStride, CONST D3DXVECTOR3 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n ); - -// Transform Array (x, y, z, 1) by matrix, project result back into w=1. -D3DXVECTOR3* WINAPI D3DXVec3TransformCoordArray - ( D3DXVECTOR3 *pOut, UINT OutStride, CONST D3DXVECTOR3 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n ); - -// Transform (x, y, z, 0) by matrix. If you transforming a normal by a -// non-affine matrix, the matrix you pass to this function should be the -// transpose of the inverse of the matrix you would use to transform a coord. -D3DXVECTOR3* WINAPI D3DXVec3TransformNormalArray - ( D3DXVECTOR3 *pOut, UINT OutStride, CONST D3DXVECTOR3 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n ); - -// Project vector from object space into screen space -D3DXVECTOR3* WINAPI D3DXVec3Project - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3DVIEWPORT9 *pViewport, - CONST D3DXMATRIX *pProjection, CONST D3DXMATRIX *pView, CONST D3DXMATRIX *pWorld); - -// Project vector from screen space into object space -D3DXVECTOR3* WINAPI D3DXVec3Unproject - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3DVIEWPORT9 *pViewport, - CONST D3DXMATRIX *pProjection, CONST D3DXMATRIX *pView, CONST D3DXMATRIX *pWorld); - -// Project vector Array from object space into screen space -D3DXVECTOR3* WINAPI D3DXVec3ProjectArray - ( D3DXVECTOR3 *pOut, UINT OutStride,CONST D3DXVECTOR3 *pV, UINT VStride,CONST D3DVIEWPORT9 *pViewport, - CONST D3DXMATRIX *pProjection, CONST D3DXMATRIX *pView, CONST D3DXMATRIX *pWorld, UINT n); - -// Project vector Array from screen space into object space -D3DXVECTOR3* WINAPI D3DXVec3UnprojectArray - ( D3DXVECTOR3 *pOut, UINT OutStride, CONST D3DXVECTOR3 *pV, UINT VStride, CONST D3DVIEWPORT9 *pViewport, - CONST D3DXMATRIX *pProjection, CONST D3DXMATRIX *pView, CONST D3DXMATRIX *pWorld, UINT n); - - -#ifdef __cplusplus -} -#endif - - - -//-------------------------- -// 4D Vector -//-------------------------- - -// inline - -FLOAT D3DXVec4Length - ( CONST D3DXVECTOR4 *pV ); - -FLOAT D3DXVec4LengthSq - ( CONST D3DXVECTOR4 *pV ); - -FLOAT D3DXVec4Dot - ( CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2 ); - -D3DXVECTOR4* D3DXVec4Add - ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2); - -D3DXVECTOR4* D3DXVec4Subtract - ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2); - -// Minimize each component. x = min(x1, x2), y = min(y1, y2), ... -D3DXVECTOR4* D3DXVec4Minimize - ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2); - -// Maximize each component. x = max(x1, x2), y = max(y1, y2), ... -D3DXVECTOR4* D3DXVec4Maximize - ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2); - -D3DXVECTOR4* D3DXVec4Scale - ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV, FLOAT s); - -// Linear interpolation. V1 + s(V2-V1) -D3DXVECTOR4* D3DXVec4Lerp - ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2, - FLOAT s ); - -// non-inline -#ifdef __cplusplus -extern "C" { -#endif - -// Cross-product in 4 dimensions. -D3DXVECTOR4* WINAPI D3DXVec4Cross - ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2, - CONST D3DXVECTOR4 *pV3); - -D3DXVECTOR4* WINAPI D3DXVec4Normalize - ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV ); - -// Hermite interpolation between position V1, tangent T1 (when s == 0) -// and position V2, tangent T2 (when s == 1). -D3DXVECTOR4* WINAPI D3DXVec4Hermite - ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pT1, - CONST D3DXVECTOR4 *pV2, CONST D3DXVECTOR4 *pT2, FLOAT s ); - -// CatmullRom interpolation between V1 (when s == 0) and V2 (when s == 1) -D3DXVECTOR4* WINAPI D3DXVec4CatmullRom - ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV0, CONST D3DXVECTOR4 *pV1, - CONST D3DXVECTOR4 *pV2, CONST D3DXVECTOR4 *pV3, FLOAT s ); - -// Barycentric coordinates. V1 + f(V2-V1) + g(V3-V1) -D3DXVECTOR4* WINAPI D3DXVec4BaryCentric - ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2, - CONST D3DXVECTOR4 *pV3, FLOAT f, FLOAT g); - -// Transform vector by matrix. -D3DXVECTOR4* WINAPI D3DXVec4Transform - ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV, CONST D3DXMATRIX *pM ); - -// Transform vector array by matrix. -D3DXVECTOR4* WINAPI D3DXVec4TransformArray - ( D3DXVECTOR4 *pOut, UINT OutStride, CONST D3DXVECTOR4 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n ); - -#ifdef __cplusplus -} -#endif - - -//-------------------------- -// 4D Matrix -//-------------------------- - -// inline - -D3DXMATRIX* D3DXMatrixIdentity - ( D3DXMATRIX *pOut ); - -BOOL D3DXMatrixIsIdentity - ( CONST D3DXMATRIX *pM ); - - -// non-inline -#ifdef __cplusplus -extern "C" { -#endif - -FLOAT WINAPI D3DXMatrixDeterminant - ( CONST D3DXMATRIX *pM ); - -HRESULT WINAPI D3DXMatrixDecompose - ( D3DXVECTOR3 *pOutScale, D3DXQUATERNION *pOutRotation, - D3DXVECTOR3 *pOutTranslation, CONST D3DXMATRIX *pM ); - -D3DXMATRIX* WINAPI D3DXMatrixTranspose - ( D3DXMATRIX *pOut, CONST D3DXMATRIX *pM ); - -// Matrix multiplication. The result represents the transformation M2 -// followed by the transformation M1. (Out = M1 * M2) -D3DXMATRIX* WINAPI D3DXMatrixMultiply - ( D3DXMATRIX *pOut, CONST D3DXMATRIX *pM1, CONST D3DXMATRIX *pM2 ); - -// Matrix multiplication, followed by a transpose. (Out = T(M1 * M2)) -D3DXMATRIX* WINAPI D3DXMatrixMultiplyTranspose - ( D3DXMATRIX *pOut, CONST D3DXMATRIX *pM1, CONST D3DXMATRIX *pM2 ); - -// Calculate inverse of matrix. Inversion my fail, in which case NULL will -// be returned. The determinant of pM is also returned it pfDeterminant -// is non-NULL. -D3DXMATRIX* WINAPI D3DXMatrixInverse - ( D3DXMATRIX *pOut, FLOAT *pDeterminant, CONST D3DXMATRIX *pM ); - -// Build a matrix which scales by (sx, sy, sz) -D3DXMATRIX* WINAPI D3DXMatrixScaling - ( D3DXMATRIX *pOut, FLOAT sx, FLOAT sy, FLOAT sz ); - -// Build a matrix which translates by (x, y, z) -D3DXMATRIX* WINAPI D3DXMatrixTranslation - ( D3DXMATRIX *pOut, FLOAT x, FLOAT y, FLOAT z ); - -// Build a matrix which rotates around the X axis -D3DXMATRIX* WINAPI D3DXMatrixRotationX - ( D3DXMATRIX *pOut, FLOAT Angle ); - -// Build a matrix which rotates around the Y axis -D3DXMATRIX* WINAPI D3DXMatrixRotationY - ( D3DXMATRIX *pOut, FLOAT Angle ); - -// Build a matrix which rotates around the Z axis -D3DXMATRIX* WINAPI D3DXMatrixRotationZ - ( D3DXMATRIX *pOut, FLOAT Angle ); - -// Build a matrix which rotates around an arbitrary axis -D3DXMATRIX* WINAPI D3DXMatrixRotationAxis - ( D3DXMATRIX *pOut, CONST D3DXVECTOR3 *pV, FLOAT Angle ); - -// Build a matrix from a quaternion -D3DXMATRIX* WINAPI D3DXMatrixRotationQuaternion - ( D3DXMATRIX *pOut, CONST D3DXQUATERNION *pQ); - -// Yaw around the Y axis, a pitch around the X axis, -// and a roll around the Z axis. -D3DXMATRIX* WINAPI D3DXMatrixRotationYawPitchRoll - ( D3DXMATRIX *pOut, FLOAT Yaw, FLOAT Pitch, FLOAT Roll ); - -// Build transformation matrix. NULL arguments are treated as identity. -// Mout = Msc-1 * Msr-1 * Ms * Msr * Msc * Mrc-1 * Mr * Mrc * Mt -D3DXMATRIX* WINAPI D3DXMatrixTransformation - ( D3DXMATRIX *pOut, CONST D3DXVECTOR3 *pScalingCenter, - CONST D3DXQUATERNION *pScalingRotation, CONST D3DXVECTOR3 *pScaling, - CONST D3DXVECTOR3 *pRotationCenter, CONST D3DXQUATERNION *pRotation, - CONST D3DXVECTOR3 *pTranslation); - -// Build 2D transformation matrix in XY plane. NULL arguments are treated as identity. -// Mout = Msc-1 * Msr-1 * Ms * Msr * Msc * Mrc-1 * Mr * Mrc * Mt -D3DXMATRIX* WINAPI D3DXMatrixTransformation2D - ( D3DXMATRIX *pOut, CONST D3DXVECTOR2* pScalingCenter, - FLOAT ScalingRotation, CONST D3DXVECTOR2* pScaling, - CONST D3DXVECTOR2* pRotationCenter, FLOAT Rotation, - CONST D3DXVECTOR2* pTranslation); - -// Build affine transformation matrix. NULL arguments are treated as identity. -// Mout = Ms * Mrc-1 * Mr * Mrc * Mt -D3DXMATRIX* WINAPI D3DXMatrixAffineTransformation - ( D3DXMATRIX *pOut, FLOAT Scaling, CONST D3DXVECTOR3 *pRotationCenter, - CONST D3DXQUATERNION *pRotation, CONST D3DXVECTOR3 *pTranslation); - -// Build 2D affine transformation matrix in XY plane. NULL arguments are treated as identity. -// Mout = Ms * Mrc-1 * Mr * Mrc * Mt -D3DXMATRIX* WINAPI D3DXMatrixAffineTransformation2D - ( D3DXMATRIX *pOut, FLOAT Scaling, CONST D3DXVECTOR2* pRotationCenter, - FLOAT Rotation, CONST D3DXVECTOR2* pTranslation); - -// Build a lookat matrix. (right-handed) -D3DXMATRIX* WINAPI D3DXMatrixLookAtRH - ( D3DXMATRIX *pOut, CONST D3DXVECTOR3 *pEye, CONST D3DXVECTOR3 *pAt, - CONST D3DXVECTOR3 *pUp ); - -// Build a lookat matrix. (left-handed) -D3DXMATRIX* WINAPI D3DXMatrixLookAtLH - ( D3DXMATRIX *pOut, CONST D3DXVECTOR3 *pEye, CONST D3DXVECTOR3 *pAt, - CONST D3DXVECTOR3 *pUp ); - -// Build a perspective projection matrix. (right-handed) -D3DXMATRIX* WINAPI D3DXMatrixPerspectiveRH - ( D3DXMATRIX *pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf ); - -// Build a perspective projection matrix. (left-handed) -D3DXMATRIX* WINAPI D3DXMatrixPerspectiveLH - ( D3DXMATRIX *pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf ); - -// Build a perspective projection matrix. (right-handed) -D3DXMATRIX* WINAPI D3DXMatrixPerspectiveFovRH - ( D3DXMATRIX *pOut, FLOAT fovy, FLOAT Aspect, FLOAT zn, FLOAT zf ); - -// Build a perspective projection matrix. (left-handed) -D3DXMATRIX* WINAPI D3DXMatrixPerspectiveFovLH - ( D3DXMATRIX *pOut, FLOAT fovy, FLOAT Aspect, FLOAT zn, FLOAT zf ); - -// Build a perspective projection matrix. (right-handed) -D3DXMATRIX* WINAPI D3DXMatrixPerspectiveOffCenterRH - ( D3DXMATRIX *pOut, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, - FLOAT zf ); - -// Build a perspective projection matrix. (left-handed) -D3DXMATRIX* WINAPI D3DXMatrixPerspectiveOffCenterLH - ( D3DXMATRIX *pOut, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, - FLOAT zf ); - -// Build an ortho projection matrix. (right-handed) -D3DXMATRIX* WINAPI D3DXMatrixOrthoRH - ( D3DXMATRIX *pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf ); - -// Build an ortho projection matrix. (left-handed) -D3DXMATRIX* WINAPI D3DXMatrixOrthoLH - ( D3DXMATRIX *pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf ); - -// Build an ortho projection matrix. (right-handed) -D3DXMATRIX* WINAPI D3DXMatrixOrthoOffCenterRH - ( D3DXMATRIX *pOut, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, - FLOAT zf ); - -// Build an ortho projection matrix. (left-handed) -D3DXMATRIX* WINAPI D3DXMatrixOrthoOffCenterLH - ( D3DXMATRIX *pOut, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, - FLOAT zf ); - -// Build a matrix which flattens geometry into a plane, as if casting -// a shadow from a light. -D3DXMATRIX* WINAPI D3DXMatrixShadow - ( D3DXMATRIX *pOut, CONST D3DXVECTOR4 *pLight, - CONST D3DXPLANE *pPlane ); - -// Build a matrix which reflects the coordinate system about a plane -D3DXMATRIX* WINAPI D3DXMatrixReflect - ( D3DXMATRIX *pOut, CONST D3DXPLANE *pPlane ); - -#ifdef __cplusplus -} -#endif - - -//-------------------------- -// Quaternion -//-------------------------- - -// inline - -FLOAT D3DXQuaternionLength - ( CONST D3DXQUATERNION *pQ ); - -// Length squared, or "norm" -FLOAT D3DXQuaternionLengthSq - ( CONST D3DXQUATERNION *pQ ); - -FLOAT D3DXQuaternionDot - ( CONST D3DXQUATERNION *pQ1, CONST D3DXQUATERNION *pQ2 ); - -// (0, 0, 0, 1) -D3DXQUATERNION* D3DXQuaternionIdentity - ( D3DXQUATERNION *pOut ); - -BOOL D3DXQuaternionIsIdentity - ( CONST D3DXQUATERNION *pQ ); - -// (-x, -y, -z, w) -D3DXQUATERNION* D3DXQuaternionConjugate - ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ ); - - -// non-inline -#ifdef __cplusplus -extern "C" { -#endif - -// Compute a quaternin's axis and angle of rotation. Expects unit quaternions. -void WINAPI D3DXQuaternionToAxisAngle - ( CONST D3DXQUATERNION *pQ, D3DXVECTOR3 *pAxis, FLOAT *pAngle ); - -// Build a quaternion from a rotation matrix. -D3DXQUATERNION* WINAPI D3DXQuaternionRotationMatrix - ( D3DXQUATERNION *pOut, CONST D3DXMATRIX *pM); - -// Rotation about arbitrary axis. -D3DXQUATERNION* WINAPI D3DXQuaternionRotationAxis - ( D3DXQUATERNION *pOut, CONST D3DXVECTOR3 *pV, FLOAT Angle ); - -// Yaw around the Y axis, a pitch around the X axis, -// and a roll around the Z axis. -D3DXQUATERNION* WINAPI D3DXQuaternionRotationYawPitchRoll - ( D3DXQUATERNION *pOut, FLOAT Yaw, FLOAT Pitch, FLOAT Roll ); - -// Quaternion multiplication. The result represents the rotation Q2 -// followed by the rotation Q1. (Out = Q2 * Q1) -D3DXQUATERNION* WINAPI D3DXQuaternionMultiply - ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ1, - CONST D3DXQUATERNION *pQ2 ); - -D3DXQUATERNION* WINAPI D3DXQuaternionNormalize - ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ ); - -// Conjugate and re-norm -D3DXQUATERNION* WINAPI D3DXQuaternionInverse - ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ ); - -// Expects unit quaternions. -// if q = (cos(theta), sin(theta) * v); ln(q) = (0, theta * v) -D3DXQUATERNION* WINAPI D3DXQuaternionLn - ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ ); - -// Expects pure quaternions. (w == 0) w is ignored in calculation. -// if q = (0, theta * v); exp(q) = (cos(theta), sin(theta) * v) -D3DXQUATERNION* WINAPI D3DXQuaternionExp - ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ ); - -// Spherical linear interpolation between Q1 (t == 0) and Q2 (t == 1). -// Expects unit quaternions. -D3DXQUATERNION* WINAPI D3DXQuaternionSlerp - ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ1, - CONST D3DXQUATERNION *pQ2, FLOAT t ); - -// Spherical quadrangle interpolation. -// Slerp(Slerp(Q1, C, t), Slerp(A, B, t), 2t(1-t)) -D3DXQUATERNION* WINAPI D3DXQuaternionSquad - ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ1, - CONST D3DXQUATERNION *pA, CONST D3DXQUATERNION *pB, - CONST D3DXQUATERNION *pC, FLOAT t ); - -// Setup control points for spherical quadrangle interpolation -// from Q1 to Q2. The control points are chosen in such a way -// to ensure the continuity of tangents with adjacent segments. -void WINAPI D3DXQuaternionSquadSetup - ( D3DXQUATERNION *pAOut, D3DXQUATERNION *pBOut, D3DXQUATERNION *pCOut, - CONST D3DXQUATERNION *pQ0, CONST D3DXQUATERNION *pQ1, - CONST D3DXQUATERNION *pQ2, CONST D3DXQUATERNION *pQ3 ); - -// Barycentric interpolation. -// Slerp(Slerp(Q1, Q2, f+g), Slerp(Q1, Q3, f+g), g/(f+g)) -D3DXQUATERNION* WINAPI D3DXQuaternionBaryCentric - ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ1, - CONST D3DXQUATERNION *pQ2, CONST D3DXQUATERNION *pQ3, - FLOAT f, FLOAT g ); - -#ifdef __cplusplus -} -#endif - - -//-------------------------- -// Plane -//-------------------------- - -// inline - -// ax + by + cz + dw -FLOAT D3DXPlaneDot - ( CONST D3DXPLANE *pP, CONST D3DXVECTOR4 *pV); - -// ax + by + cz + d -FLOAT D3DXPlaneDotCoord - ( CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV); - -// ax + by + cz -FLOAT D3DXPlaneDotNormal - ( CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV); - -D3DXPLANE* D3DXPlaneScale - (D3DXPLANE *pOut, CONST D3DXPLANE *pP, FLOAT s); - -// non-inline -#ifdef __cplusplus -extern "C" { -#endif - -// Normalize plane (so that |a,b,c| == 1) -D3DXPLANE* WINAPI D3DXPlaneNormalize - ( D3DXPLANE *pOut, CONST D3DXPLANE *pP); - -// Find the intersection between a plane and a line. If the line is -// parallel to the plane, NULL is returned. -D3DXVECTOR3* WINAPI D3DXPlaneIntersectLine - ( D3DXVECTOR3 *pOut, CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV1, - CONST D3DXVECTOR3 *pV2); - -// Construct a plane from a point and a normal -D3DXPLANE* WINAPI D3DXPlaneFromPointNormal - ( D3DXPLANE *pOut, CONST D3DXVECTOR3 *pPoint, CONST D3DXVECTOR3 *pNormal); - -// Construct a plane from 3 points -D3DXPLANE* WINAPI D3DXPlaneFromPoints - ( D3DXPLANE *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2, - CONST D3DXVECTOR3 *pV3); - -// Transform a plane by a matrix. The vector (a,b,c) must be normal. -// M should be the inverse transpose of the transformation desired. -D3DXPLANE* WINAPI D3DXPlaneTransform - ( D3DXPLANE *pOut, CONST D3DXPLANE *pP, CONST D3DXMATRIX *pM ); - -// Transform an array of planes by a matrix. The vectors (a,b,c) must be normal. -// M should be the inverse transpose of the transformation desired. -D3DXPLANE* WINAPI D3DXPlaneTransformArray - ( D3DXPLANE *pOut, UINT OutStride, CONST D3DXPLANE *pP, UINT PStride, CONST D3DXMATRIX *pM, UINT n ); - -#ifdef __cplusplus -} -#endif - - -//-------------------------- -// Color -//-------------------------- - -// inline - -// (1-r, 1-g, 1-b, a) -D3DXCOLOR* D3DXColorNegative - (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC); - -D3DXCOLOR* D3DXColorAdd - (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2); - -D3DXCOLOR* D3DXColorSubtract - (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2); - -D3DXCOLOR* D3DXColorScale - (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC, FLOAT s); - -// (r1*r2, g1*g2, b1*b2, a1*a2) -D3DXCOLOR* D3DXColorModulate - (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2); - -// Linear interpolation of r,g,b, and a. C1 + s(C2-C1) -D3DXCOLOR* D3DXColorLerp - (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2, FLOAT s); - -// non-inline -#ifdef __cplusplus -extern "C" { -#endif - -// Interpolate r,g,b between desaturated color and color. -// DesaturatedColor + s(Color - DesaturatedColor) -D3DXCOLOR* WINAPI D3DXColorAdjustSaturation - (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC, FLOAT s); - -// Interpolate r,g,b between 50% grey and color. Grey + s(Color - Grey) -D3DXCOLOR* WINAPI D3DXColorAdjustContrast - (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC, FLOAT c); - -#ifdef __cplusplus -} -#endif - - - - -//-------------------------- -// Misc -//-------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -// Calculate Fresnel term given the cosine of theta (likely obtained by -// taking the dot of two normals), and the refraction index of the material. -FLOAT WINAPI D3DXFresnelTerm - (FLOAT CosTheta, FLOAT RefractionIndex); - -#ifdef __cplusplus -} -#endif - - - -//=========================================================================== -// -// Matrix Stack -// -//=========================================================================== - -typedef interface ID3DXMatrixStack ID3DXMatrixStack; -typedef interface ID3DXMatrixStack *LPD3DXMATRIXSTACK; - -// {C7885BA7-F990-4fe7-922D-8515E477DD85} -DEFINE_GUID(IID_ID3DXMatrixStack, -0xc7885ba7, 0xf990, 0x4fe7, 0x92, 0x2d, 0x85, 0x15, 0xe4, 0x77, 0xdd, 0x85); - - -#undef INTERFACE -#define INTERFACE ID3DXMatrixStack - -DECLARE_INTERFACE_(ID3DXMatrixStack, IUnknown) -{ - // - // IUnknown methods - // - STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; - STDMETHOD_(ULONG,AddRef)(THIS) PURE; - STDMETHOD_(ULONG,Release)(THIS) PURE; - - // - // ID3DXMatrixStack methods - // - - // Pops the top of the stack, returns the current top - // *after* popping the top. - STDMETHOD(Pop)(THIS) PURE; - - // Pushes the stack by one, duplicating the current matrix. - STDMETHOD(Push)(THIS) PURE; - - // Loads identity in the current matrix. - STDMETHOD(LoadIdentity)(THIS) PURE; - - // Loads the given matrix into the current matrix - STDMETHOD(LoadMatrix)(THIS_ CONST D3DXMATRIX* pM ) PURE; - - // Right-Multiplies the given matrix to the current matrix. - // (transformation is about the current world origin) - STDMETHOD(MultMatrix)(THIS_ CONST D3DXMATRIX* pM ) PURE; - - // Left-Multiplies the given matrix to the current matrix - // (transformation is about the local origin of the object) - STDMETHOD(MultMatrixLocal)(THIS_ CONST D3DXMATRIX* pM ) PURE; - - // Right multiply the current matrix with the computed rotation - // matrix, counterclockwise about the given axis with the given angle. - // (rotation is about the current world origin) - STDMETHOD(RotateAxis) - (THIS_ CONST D3DXVECTOR3* pV, FLOAT Angle) PURE; - - // Left multiply the current matrix with the computed rotation - // matrix, counterclockwise about the given axis with the given angle. - // (rotation is about the local origin of the object) - STDMETHOD(RotateAxisLocal) - (THIS_ CONST D3DXVECTOR3* pV, FLOAT Angle) PURE; - - // Right multiply the current matrix with the computed rotation - // matrix. All angles are counterclockwise. (rotation is about the - // current world origin) - - // The rotation is composed of a yaw around the Y axis, a pitch around - // the X axis, and a roll around the Z axis. - STDMETHOD(RotateYawPitchRoll) - (THIS_ FLOAT Yaw, FLOAT Pitch, FLOAT Roll) PURE; - - // Left multiply the current matrix with the computed rotation - // matrix. All angles are counterclockwise. (rotation is about the - // local origin of the object) - - // The rotation is composed of a yaw around the Y axis, a pitch around - // the X axis, and a roll around the Z axis. - STDMETHOD(RotateYawPitchRollLocal) - (THIS_ FLOAT Yaw, FLOAT Pitch, FLOAT Roll) PURE; - - // Right multiply the current matrix with the computed scale - // matrix. (transformation is about the current world origin) - STDMETHOD(Scale)(THIS_ FLOAT x, FLOAT y, FLOAT z) PURE; - - // Left multiply the current matrix with the computed scale - // matrix. (transformation is about the local origin of the object) - STDMETHOD(ScaleLocal)(THIS_ FLOAT x, FLOAT y, FLOAT z) PURE; - - // Right multiply the current matrix with the computed translation - // matrix. (transformation is about the current world origin) - STDMETHOD(Translate)(THIS_ FLOAT x, FLOAT y, FLOAT z ) PURE; - - // Left multiply the current matrix with the computed translation - // matrix. (transformation is about the local origin of the object) - STDMETHOD(TranslateLocal)(THIS_ FLOAT x, FLOAT y, FLOAT z) PURE; - - // Obtain the current matrix at the top of the stack - STDMETHOD_(D3DXMATRIX*, GetTop)(THIS) PURE; -}; - -#ifdef __cplusplus -extern "C" { -#endif - -HRESULT WINAPI - D3DXCreateMatrixStack( - DWORD Flags, - LPD3DXMATRIXSTACK* ppStack); - -#ifdef __cplusplus -} -#endif - -//=========================================================================== -// -// Spherical Harmonic Runtime Routines -// -// NOTE: -// * Most of these functions can take the same object as in and out parameters. -// The exceptions are the rotation functions. -// -// * Out parameters are typically also returned as return values, so that -// the output of one function may be used as a parameter to another. -// -//============================================================================ - - -// non-inline -#ifdef __cplusplus -extern "C" { -#endif - -//============================================================================ -// -// Basic Spherical Harmonic math routines -// -//============================================================================ - -#define D3DXSH_MINORDER 2 -#define D3DXSH_MAXORDER 6 - -//============================================================================ -// -// D3DXSHEvalDirection: -// -------------------- -// Evaluates the Spherical Harmonic basis functions -// -// Parameters: -// pOut -// Output SH coefficients - basis function Ylm is stored at l*l + m+l -// This is the pointer that is returned. -// Order -// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 -// pDir -// Direction to evaluate in - assumed to be normalized -// -//============================================================================ - -FLOAT* WINAPI D3DXSHEvalDirection - ( FLOAT *pOut, UINT Order, CONST D3DXVECTOR3 *pDir ); - -//============================================================================ -// -// D3DXSHRotate: -// -------------------- -// Rotates SH vector by a rotation matrix -// -// Parameters: -// pOut -// Output SH coefficients - basis function Ylm is stored at l*l + m+l -// This is the pointer that is returned (should not alias with pIn.) -// Order -// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 -// pMatrix -// Matrix used for rotation - rotation sub matrix should be orthogonal -// and have a unit determinant. -// pIn -// Input SH coeffs (rotated), incorect results if this is also output. -// -//============================================================================ - -FLOAT* WINAPI D3DXSHRotate - ( FLOAT *pOut, UINT Order, CONST D3DXMATRIX *pMatrix, CONST FLOAT *pIn ); - -//============================================================================ -// -// D3DXSHRotateZ: -// -------------------- -// Rotates the SH vector in the Z axis by an angle -// -// Parameters: -// pOut -// Output SH coefficients - basis function Ylm is stored at l*l + m+l -// This is the pointer that is returned (should not alias with pIn.) -// Order -// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 -// Angle -// Angle in radians to rotate around the Z axis. -// pIn -// Input SH coeffs (rotated), incorect results if this is also output. -// -//============================================================================ - - -FLOAT* WINAPI D3DXSHRotateZ - ( FLOAT *pOut, UINT Order, FLOAT Angle, CONST FLOAT *pIn ); - -//============================================================================ -// -// D3DXSHAdd: -// -------------------- -// Adds two SH vectors, pOut[i] = pA[i] + pB[i]; -// -// Parameters: -// pOut -// Output SH coefficients - basis function Ylm is stored at l*l + m+l -// This is the pointer that is returned. -// Order -// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 -// pA -// Input SH coeffs. -// pB -// Input SH coeffs (second vector.) -// -//============================================================================ - -FLOAT* WINAPI D3DXSHAdd - ( FLOAT *pOut, UINT Order, CONST FLOAT *pA, CONST FLOAT *pB ); - -//============================================================================ -// -// D3DXSHScale: -// -------------------- -// Adds two SH vectors, pOut[i] = pA[i]*Scale; -// -// Parameters: -// pOut -// Output SH coefficients - basis function Ylm is stored at l*l + m+l -// This is the pointer that is returned. -// Order -// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 -// pIn -// Input SH coeffs. -// Scale -// Scale factor. -// -//============================================================================ - -FLOAT* WINAPI D3DXSHScale - ( FLOAT *pOut, UINT Order, CONST FLOAT *pIn, CONST FLOAT Scale ); - -//============================================================================ -// -// D3DXSHDot: -// -------------------- -// Computes the dot product of two SH vectors -// -// Parameters: -// Order -// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 -// pA -// Input SH coeffs. -// pB -// Second set of input SH coeffs. -// -//============================================================================ - -FLOAT WINAPI D3DXSHDot - ( UINT Order, CONST FLOAT *pA, CONST FLOAT *pB ); - -//============================================================================ -// -// D3DXSHMultiply[O]: -// -------------------- -// Computes the product of two functions represented using SH (f and g), where: -// pOut[i] = int(y_i(s) * f(s) * g(s)), where y_i(s) is the ith SH basis -// function, f(s) and g(s) are SH functions (sum_i(y_i(s)*c_i)). The order O -// determines the lengths of the arrays, where there should always be O^2 -// coefficients. In general the product of two SH functions of order O generates -// and SH function of order 2*O - 1, but we truncate the result. This means -// that the product commutes (f*g == g*f) but doesn't associate -// (f*(g*h) != (f*g)*h. -// -// Parameters: -// pOut -// Output SH coefficients - basis function Ylm is stored at l*l + m+l -// This is the pointer that is returned. -// pF -// Input SH coeffs for first function. -// pG -// Second set of input SH coeffs. -// -//============================================================================ - -FLOAT* WINAPI D3DXSHMultiply2( FLOAT *pOut, CONST FLOAT *pF, CONST FLOAT *pG); -FLOAT* WINAPI D3DXSHMultiply3( FLOAT *pOut, CONST FLOAT *pF, CONST FLOAT *pG); -FLOAT* WINAPI D3DXSHMultiply4( FLOAT *pOut, CONST FLOAT *pF, CONST FLOAT *pG); -FLOAT* WINAPI D3DXSHMultiply5( FLOAT *pOut, CONST FLOAT *pF, CONST FLOAT *pG); -FLOAT* WINAPI D3DXSHMultiply6( FLOAT *pOut, CONST FLOAT *pF, CONST FLOAT *pG); - - -//============================================================================ -// -// Basic Spherical Harmonic lighting routines -// -//============================================================================ - -//============================================================================ -// -// D3DXSHEvalDirectionalLight: -// -------------------- -// Evaluates a directional light and returns spectral SH data. The output -// vector is computed so that if the intensity of R/G/B is unit the resulting -// exit radiance of a point directly under the light on a diffuse object with -// an albedo of 1 would be 1.0. This will compute 3 spectral samples, pROut -// has to be specified, while pGout and pBout are optional. -// -// Parameters: -// Order -// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 -// pDir -// Direction light is coming from (assumed to be normalized.) -// RIntensity -// Red intensity of light. -// GIntensity -// Green intensity of light. -// BIntensity -// Blue intensity of light. -// pROut -// Output SH vector for Red. -// pGOut -// Output SH vector for Green (optional.) -// pBOut -// Output SH vector for Blue (optional.) -// -//============================================================================ - -HRESULT WINAPI D3DXSHEvalDirectionalLight - ( UINT Order, CONST D3DXVECTOR3 *pDir, - FLOAT RIntensity, FLOAT GIntensity, FLOAT BIntensity, - FLOAT *pROut, FLOAT *pGOut, FLOAT *pBOut ); - -//============================================================================ -// -// D3DXSHEvalSphericalLight: -// -------------------- -// Evaluates a spherical light and returns spectral SH data. There is no -// normalization of the intensity of the light like there is for directional -// lights, care has to be taken when specifiying the intensities. This will -// compute 3 spectral samples, pROut has to be specified, while pGout and -// pBout are optional. -// -// Parameters: -// Order -// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 -// pPos -// Position of light - reciever is assumed to be at the origin. -// Radius -// Radius of the spherical light source. -// RIntensity -// Red intensity of light. -// GIntensity -// Green intensity of light. -// BIntensity -// Blue intensity of light. -// pROut -// Output SH vector for Red. -// pGOut -// Output SH vector for Green (optional.) -// pBOut -// Output SH vector for Blue (optional.) -// -//============================================================================ - -HRESULT WINAPI D3DXSHEvalSphericalLight - ( UINT Order, CONST D3DXVECTOR3 *pPos, FLOAT Radius, - FLOAT RIntensity, FLOAT GIntensity, FLOAT BIntensity, - FLOAT *pROut, FLOAT *pGOut, FLOAT *pBOut ); - -//============================================================================ -// -// D3DXSHEvalConeLight: -// -------------------- -// Evaluates a light that is a cone of constant intensity and returns spectral -// SH data. The output vector is computed so that if the intensity of R/G/B is -// unit the resulting exit radiance of a point directly under the light oriented -// in the cone direction on a diffuse object with an albedo of 1 would be 1.0. -// This will compute 3 spectral samples, pROut has to be specified, while pGout -// and pBout are optional. -// -// Parameters: -// Order -// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 -// pDir -// Direction light is coming from (assumed to be normalized.) -// Radius -// Radius of cone in radians. -// RIntensity -// Red intensity of light. -// GIntensity -// Green intensity of light. -// BIntensity -// Blue intensity of light. -// pROut -// Output SH vector for Red. -// pGOut -// Output SH vector for Green (optional.) -// pBOut -// Output SH vector for Blue (optional.) -// -//============================================================================ - -HRESULT WINAPI D3DXSHEvalConeLight - ( UINT Order, CONST D3DXVECTOR3 *pDir, FLOAT Radius, - FLOAT RIntensity, FLOAT GIntensity, FLOAT BIntensity, - FLOAT *pROut, FLOAT *pGOut, FLOAT *pBOut ); - -//============================================================================ -// -// D3DXSHEvalHemisphereLight: -// -------------------- -// Evaluates a light that is a linear interpolant between two colors over the -// sphere. The interpolant is linear along the axis of the two points, not -// over the surface of the sphere (ie: if the axis was (0,0,1) it is linear in -// Z, not in the azimuthal angle.) The resulting spherical lighting function -// is normalized so that a point on a perfectly diffuse surface with no -// shadowing and a normal pointed in the direction pDir would result in exit -// radiance with a value of 1 if the top color was white and the bottom color -// was black. This is a very simple model where Top represents the intensity -// of the "sky" and Bottom represents the intensity of the "ground". -// -// Parameters: -// Order -// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 -// pDir -// Axis of the hemisphere. -// Top -// Color of the upper hemisphere. -// Bottom -// Color of the lower hemisphere. -// pROut -// Output SH vector for Red. -// pGOut -// Output SH vector for Green -// pBOut -// Output SH vector for Blue -// -//============================================================================ - -HRESULT WINAPI D3DXSHEvalHemisphereLight - ( UINT Order, CONST D3DXVECTOR3 *pDir, D3DXCOLOR Top, D3DXCOLOR Bottom, - FLOAT *pROut, FLOAT *pGOut, FLOAT *pBOut ); - -//============================================================================ -// -// Basic Spherical Harmonic projection routines -// -//============================================================================ - -//============================================================================ -// -// D3DXSHProjectCubeMap: -// -------------------- -// Projects a function represented on a cube map into spherical harmonics. -// -// Parameters: -// Order -// Order of the SH evaluation, generates Order^2 coefs, degree is Order-1 -// pCubeMap -// CubeMap that is going to be projected into spherical harmonics -// pROut -// Output SH vector for Red. -// pGOut -// Output SH vector for Green -// pBOut -// Output SH vector for Blue -// -//============================================================================ - -HRESULT WINAPI D3DXSHProjectCubeMap - ( UINT uOrder, LPDIRECT3DCUBETEXTURE9 pCubeMap, - FLOAT *pROut, FLOAT *pGOut, FLOAT *pBOut ); - - -#ifdef __cplusplus -} -#endif - - -#include "d3dx9math.inl" - -#if _MSC_VER >= 1200 -#pragma warning(pop) -#else -#pragma warning(default:4201) -#endif - -#endif // __D3DX9MATH_H__ - diff --git a/builddir/irrlicht-1.8.1/include/d3dx9math.inl b/builddir/irrlicht-1.8.1/include/d3dx9math.inl deleted file mode 100644 index a3652ed..0000000 --- a/builddir/irrlicht-1.8.1/include/d3dx9math.inl +++ /dev/null @@ -1,2251 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) Microsoft Corporation. All Rights Reserved. -// -// File: d3dx9math.inl -// Content: D3DX math inline functions -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef __D3DX9MATH_INL__ -#define __D3DX9MATH_INL__ - -//=========================================================================== -// -// Inline Class Methods -// -//=========================================================================== - -#ifdef __cplusplus - -//-------------------------- -// Float16 -//-------------------------- - -D3DXINLINE -D3DXFLOAT16::D3DXFLOAT16( FLOAT f ) -{ - D3DXFloat32To16Array(this, &f, 1); -} - -D3DXINLINE -D3DXFLOAT16::D3DXFLOAT16( CONST D3DXFLOAT16& f ) -{ - value = f.value; -} - -// casting -D3DXINLINE -D3DXFLOAT16::operator FLOAT () -{ - FLOAT f; - D3DXFloat16To32Array(&f, this, 1); - return f; -} - -// binary operators -D3DXINLINE BOOL -D3DXFLOAT16::operator == ( CONST D3DXFLOAT16& f ) const -{ - return value == f.value; -} - -D3DXINLINE BOOL -D3DXFLOAT16::operator != ( CONST D3DXFLOAT16& f ) const -{ - return value != f.value; -} - - -//-------------------------- -// 2D Vector -//-------------------------- - -D3DXINLINE -D3DXVECTOR2::D3DXVECTOR2( CONST FLOAT *pf ) -{ -#ifdef D3DX_DEBUG - if(!pf) - return; -#endif - - x = pf[0]; - y = pf[1]; -} - -D3DXINLINE -D3DXVECTOR2::D3DXVECTOR2( CONST D3DXFLOAT16 *pf ) -{ -#ifdef D3DX_DEBUG - if(!pf) - return; -#endif - - D3DXFloat16To32Array(&x, pf, 2); -} - -D3DXINLINE -D3DXVECTOR2::D3DXVECTOR2( FLOAT fx, FLOAT fy ) -{ - x = fx; - y = fy; -} - - -// casting -D3DXINLINE -D3DXVECTOR2::operator FLOAT* () -{ - return (FLOAT *) &x; -} - -D3DXINLINE -D3DXVECTOR2::operator CONST FLOAT* () const -{ - return (CONST FLOAT *) &x; -} - - -// assignment operators -D3DXINLINE D3DXVECTOR2& -D3DXVECTOR2::operator += ( CONST D3DXVECTOR2& v ) -{ - x += v.x; - y += v.y; - return *this; -} - -D3DXINLINE D3DXVECTOR2& -D3DXVECTOR2::operator -= ( CONST D3DXVECTOR2& v ) -{ - x -= v.x; - y -= v.y; - return *this; -} - -D3DXINLINE D3DXVECTOR2& -D3DXVECTOR2::operator *= ( FLOAT f ) -{ - x *= f; - y *= f; - return *this; -} - -D3DXINLINE D3DXVECTOR2& -D3DXVECTOR2::operator /= ( FLOAT f ) -{ - FLOAT fInv = 1.0f / f; - x *= fInv; - y *= fInv; - return *this; -} - - -// unary operators -D3DXINLINE D3DXVECTOR2 -D3DXVECTOR2::operator + () const -{ - return *this; -} - -D3DXINLINE D3DXVECTOR2 -D3DXVECTOR2::operator - () const -{ - return D3DXVECTOR2(-x, -y); -} - - -// binary operators -D3DXINLINE D3DXVECTOR2 -D3DXVECTOR2::operator + ( CONST D3DXVECTOR2& v ) const -{ - return D3DXVECTOR2(x + v.x, y + v.y); -} - -D3DXINLINE D3DXVECTOR2 -D3DXVECTOR2::operator - ( CONST D3DXVECTOR2& v ) const -{ - return D3DXVECTOR2(x - v.x, y - v.y); -} - -D3DXINLINE D3DXVECTOR2 -D3DXVECTOR2::operator * ( FLOAT f ) const -{ - return D3DXVECTOR2(x * f, y * f); -} - -D3DXINLINE D3DXVECTOR2 -D3DXVECTOR2::operator / ( FLOAT f ) const -{ - FLOAT fInv = 1.0f / f; - return D3DXVECTOR2(x * fInv, y * fInv); -} - -D3DXINLINE D3DXVECTOR2 -operator * ( FLOAT f, CONST D3DXVECTOR2& v ) -{ - return D3DXVECTOR2(f * v.x, f * v.y); -} - -D3DXINLINE BOOL -D3DXVECTOR2::operator == ( CONST D3DXVECTOR2& v ) const -{ - return x == v.x && y == v.y; -} - -D3DXINLINE BOOL -D3DXVECTOR2::operator != ( CONST D3DXVECTOR2& v ) const -{ - return x != v.x || y != v.y; -} - - - -//-------------------------- -// 2D Vector (16 bit) -//-------------------------- - -D3DXINLINE -D3DXVECTOR2_16F::D3DXVECTOR2_16F( CONST FLOAT *pf ) -{ -#ifdef D3DX_DEBUG - if(!pf) - return; -#endif - - D3DXFloat32To16Array(&x, pf, 2); -} - -D3DXINLINE -D3DXVECTOR2_16F::D3DXVECTOR2_16F( CONST D3DXFLOAT16 *pf ) -{ -#ifdef D3DX_DEBUG - if(!pf) - return; -#endif - - *((DWORD *) &x) = *((DWORD *) &pf[0]); -} - -D3DXINLINE -D3DXVECTOR2_16F::D3DXVECTOR2_16F( CONST D3DXFLOAT16 &fx, CONST D3DXFLOAT16 &fy ) -{ - x = fx; - y = fy; -} - - -// casting -D3DXINLINE -D3DXVECTOR2_16F::operator D3DXFLOAT16* () -{ - return (D3DXFLOAT16*) &x; -} - -D3DXINLINE -D3DXVECTOR2_16F::operator CONST D3DXFLOAT16* () const -{ - return (CONST D3DXFLOAT16*) &x; -} - - -// binary operators -D3DXINLINE BOOL -D3DXVECTOR2_16F::operator == ( CONST D3DXVECTOR2_16F &v ) const -{ - return *((DWORD *) &x) == *((DWORD *) &v.x); -} - -D3DXINLINE BOOL -D3DXVECTOR2_16F::operator != ( CONST D3DXVECTOR2_16F &v ) const -{ - return *((DWORD *) &x) != *((DWORD *) &v.x); -} - - -//-------------------------- -// 3D Vector -//-------------------------- -D3DXINLINE -D3DXVECTOR3::D3DXVECTOR3( CONST FLOAT *pf ) -{ -#ifdef D3DX_DEBUG - if(!pf) - return; -#endif - - x = pf[0]; - y = pf[1]; - z = pf[2]; -} - -D3DXINLINE -D3DXVECTOR3::D3DXVECTOR3( CONST D3DVECTOR& v ) -{ - x = v.x; - y = v.y; - z = v.z; -} - -D3DXINLINE -D3DXVECTOR3::D3DXVECTOR3( CONST D3DXFLOAT16 *pf ) -{ -#ifdef D3DX_DEBUG - if(!pf) - return; -#endif - - D3DXFloat16To32Array(&x, pf, 3); -} - -D3DXINLINE -D3DXVECTOR3::D3DXVECTOR3( FLOAT fx, FLOAT fy, FLOAT fz ) -{ - x = fx; - y = fy; - z = fz; -} - - -// casting -D3DXINLINE -D3DXVECTOR3::operator FLOAT* () -{ - return (FLOAT *) &x; -} - -D3DXINLINE -D3DXVECTOR3::operator CONST FLOAT* () const -{ - return (CONST FLOAT *) &x; -} - - -// assignment operators -D3DXINLINE D3DXVECTOR3& -D3DXVECTOR3::operator += ( CONST D3DXVECTOR3& v ) -{ - x += v.x; - y += v.y; - z += v.z; - return *this; -} - -D3DXINLINE D3DXVECTOR3& -D3DXVECTOR3::operator -= ( CONST D3DXVECTOR3& v ) -{ - x -= v.x; - y -= v.y; - z -= v.z; - return *this; -} - -D3DXINLINE D3DXVECTOR3& -D3DXVECTOR3::operator *= ( FLOAT f ) -{ - x *= f; - y *= f; - z *= f; - return *this; -} - -D3DXINLINE D3DXVECTOR3& -D3DXVECTOR3::operator /= ( FLOAT f ) -{ - FLOAT fInv = 1.0f / f; - x *= fInv; - y *= fInv; - z *= fInv; - return *this; -} - - -// unary operators -D3DXINLINE D3DXVECTOR3 -D3DXVECTOR3::operator + () const -{ - return *this; -} - -D3DXINLINE D3DXVECTOR3 -D3DXVECTOR3::operator - () const -{ - return D3DXVECTOR3(-x, -y, -z); -} - - -// binary operators -D3DXINLINE D3DXVECTOR3 -D3DXVECTOR3::operator + ( CONST D3DXVECTOR3& v ) const -{ - return D3DXVECTOR3(x + v.x, y + v.y, z + v.z); -} - -D3DXINLINE D3DXVECTOR3 -D3DXVECTOR3::operator - ( CONST D3DXVECTOR3& v ) const -{ - return D3DXVECTOR3(x - v.x, y - v.y, z - v.z); -} - -D3DXINLINE D3DXVECTOR3 -D3DXVECTOR3::operator * ( FLOAT f ) const -{ - return D3DXVECTOR3(x * f, y * f, z * f); -} - -D3DXINLINE D3DXVECTOR3 -D3DXVECTOR3::operator / ( FLOAT f ) const -{ - FLOAT fInv = 1.0f / f; - return D3DXVECTOR3(x * fInv, y * fInv, z * fInv); -} - - -D3DXINLINE D3DXVECTOR3 -operator * ( FLOAT f, CONST struct D3DXVECTOR3& v ) -{ - return D3DXVECTOR3(f * v.x, f * v.y, f * v.z); -} - - -D3DXINLINE BOOL -D3DXVECTOR3::operator == ( CONST D3DXVECTOR3& v ) const -{ - return x == v.x && y == v.y && z == v.z; -} - -D3DXINLINE BOOL -D3DXVECTOR3::operator != ( CONST D3DXVECTOR3& v ) const -{ - return x != v.x || y != v.y || z != v.z; -} - - - -//-------------------------- -// 3D Vector (16 bit) -//-------------------------- - -D3DXINLINE -D3DXVECTOR3_16F::D3DXVECTOR3_16F( CONST FLOAT *pf ) -{ -#ifdef D3DX_DEBUG - if(!pf) - return; -#endif - - D3DXFloat32To16Array(&x, pf, 3); -} - -D3DXINLINE -D3DXVECTOR3_16F::D3DXVECTOR3_16F( CONST D3DVECTOR& v ) -{ - D3DXFloat32To16Array(&x, &v.x, 1); - D3DXFloat32To16Array(&y, &v.y, 1); - D3DXFloat32To16Array(&z, &v.z, 1); -} - -D3DXINLINE -D3DXVECTOR3_16F::D3DXVECTOR3_16F( CONST D3DXFLOAT16 *pf ) -{ -#ifdef D3DX_DEBUG - if(!pf) - return; -#endif - - *((DWORD *) &x) = *((DWORD *) &pf[0]); - *((WORD *) &z) = *((WORD *) &pf[2]); -} - -D3DXINLINE -D3DXVECTOR3_16F::D3DXVECTOR3_16F( CONST D3DXFLOAT16 &fx, CONST D3DXFLOAT16 &fy, CONST D3DXFLOAT16 &fz ) -{ - x = fx; - y = fy; - z = fz; -} - - -// casting -D3DXINLINE -D3DXVECTOR3_16F::operator D3DXFLOAT16* () -{ - return (D3DXFLOAT16*) &x; -} - -D3DXINLINE -D3DXVECTOR3_16F::operator CONST D3DXFLOAT16* () const -{ - return (CONST D3DXFLOAT16*) &x; -} - - -// binary operators -D3DXINLINE BOOL -D3DXVECTOR3_16F::operator == ( CONST D3DXVECTOR3_16F &v ) const -{ - return *((DWORD *) &x) == *((DWORD *) &v.x) && - *((WORD *) &z) == *((WORD *) &v.z); -} - -D3DXINLINE BOOL -D3DXVECTOR3_16F::operator != ( CONST D3DXVECTOR3_16F &v ) const -{ - return *((DWORD *) &x) != *((DWORD *) &v.x) || - *((WORD *) &z) != *((WORD *) &v.z); -} - - -//-------------------------- -// 4D Vector -//-------------------------- -D3DXINLINE -D3DXVECTOR4::D3DXVECTOR4( CONST FLOAT *pf ) -{ -#ifdef D3DX_DEBUG - if(!pf) - return; -#endif - - x = pf[0]; - y = pf[1]; - z = pf[2]; - w = pf[3]; -} - -D3DXINLINE -D3DXVECTOR4::D3DXVECTOR4( CONST D3DXFLOAT16 *pf ) -{ -#ifdef D3DX_DEBUG - if(!pf) - return; -#endif - - D3DXFloat16To32Array(&x, pf, 4); -} - -D3DXINLINE -D3DXVECTOR4::D3DXVECTOR4( CONST D3DVECTOR& v, FLOAT f ) -{ - x = v.x; - y = v.y; - z = v.z; - w = f; -} - -D3DXINLINE -D3DXVECTOR4::D3DXVECTOR4( FLOAT fx, FLOAT fy, FLOAT fz, FLOAT fw ) -{ - x = fx; - y = fy; - z = fz; - w = fw; -} - - -// casting -D3DXINLINE -D3DXVECTOR4::operator FLOAT* () -{ - return (FLOAT *) &x; -} - -D3DXINLINE -D3DXVECTOR4::operator CONST FLOAT* () const -{ - return (CONST FLOAT *) &x; -} - - -// assignment operators -D3DXINLINE D3DXVECTOR4& -D3DXVECTOR4::operator += ( CONST D3DXVECTOR4& v ) -{ - x += v.x; - y += v.y; - z += v.z; - w += v.w; - return *this; -} - -D3DXINLINE D3DXVECTOR4& -D3DXVECTOR4::operator -= ( CONST D3DXVECTOR4& v ) -{ - x -= v.x; - y -= v.y; - z -= v.z; - w -= v.w; - return *this; -} - -D3DXINLINE D3DXVECTOR4& -D3DXVECTOR4::operator *= ( FLOAT f ) -{ - x *= f; - y *= f; - z *= f; - w *= f; - return *this; -} - -D3DXINLINE D3DXVECTOR4& -D3DXVECTOR4::operator /= ( FLOAT f ) -{ - FLOAT fInv = 1.0f / f; - x *= fInv; - y *= fInv; - z *= fInv; - w *= fInv; - return *this; -} - - -// unary operators -D3DXINLINE D3DXVECTOR4 -D3DXVECTOR4::operator + () const -{ - return *this; -} - -D3DXINLINE D3DXVECTOR4 -D3DXVECTOR4::operator - () const -{ - return D3DXVECTOR4(-x, -y, -z, -w); -} - - -// binary operators -D3DXINLINE D3DXVECTOR4 -D3DXVECTOR4::operator + ( CONST D3DXVECTOR4& v ) const -{ - return D3DXVECTOR4(x + v.x, y + v.y, z + v.z, w + v.w); -} - -D3DXINLINE D3DXVECTOR4 -D3DXVECTOR4::operator - ( CONST D3DXVECTOR4& v ) const -{ - return D3DXVECTOR4(x - v.x, y - v.y, z - v.z, w - v.w); -} - -D3DXINLINE D3DXVECTOR4 -D3DXVECTOR4::operator * ( FLOAT f ) const -{ - return D3DXVECTOR4(x * f, y * f, z * f, w * f); -} - -D3DXINLINE D3DXVECTOR4 -D3DXVECTOR4::operator / ( FLOAT f ) const -{ - FLOAT fInv = 1.0f / f; - return D3DXVECTOR4(x * fInv, y * fInv, z * fInv, w * fInv); -} - -D3DXINLINE D3DXVECTOR4 -operator * ( FLOAT f, CONST D3DXVECTOR4& v ) -{ - return D3DXVECTOR4(f * v.x, f * v.y, f * v.z, f * v.w); -} - - -D3DXINLINE BOOL -D3DXVECTOR4::operator == ( CONST D3DXVECTOR4& v ) const -{ - return x == v.x && y == v.y && z == v.z && w == v.w; -} - -D3DXINLINE BOOL -D3DXVECTOR4::operator != ( CONST D3DXVECTOR4& v ) const -{ - return x != v.x || y != v.y || z != v.z || w != v.w; -} - - - -//-------------------------- -// 4D Vector (16 bit) -//-------------------------- - -D3DXINLINE -D3DXVECTOR4_16F::D3DXVECTOR4_16F( CONST FLOAT *pf ) -{ -#ifdef D3DX_DEBUG - if(!pf) - return; -#endif - - D3DXFloat32To16Array(&x, pf, 4); -} - -D3DXINLINE -D3DXVECTOR4_16F::D3DXVECTOR4_16F( CONST D3DXFLOAT16 *pf ) -{ -#ifdef D3DX_DEBUG - if(!pf) - return; -#endif - - *((DWORD *) &x) = *((DWORD *) &pf[0]); - *((DWORD *) &z) = *((DWORD *) &pf[2]); -} - -D3DXINLINE -D3DXVECTOR4_16F::D3DXVECTOR4_16F( CONST D3DXVECTOR3_16F& v, CONST D3DXFLOAT16& f ) -{ - x = v.x; - y = v.y; - z = v.z; - w = f; -} - -D3DXINLINE -D3DXVECTOR4_16F::D3DXVECTOR4_16F( CONST D3DXFLOAT16 &fx, CONST D3DXFLOAT16 &fy, CONST D3DXFLOAT16 &fz, CONST D3DXFLOAT16 &fw ) -{ - x = fx; - y = fy; - z = fz; - w = fw; -} - - -// casting -D3DXINLINE -D3DXVECTOR4_16F::operator D3DXFLOAT16* () -{ - return (D3DXFLOAT16*) &x; -} - -D3DXINLINE -D3DXVECTOR4_16F::operator CONST D3DXFLOAT16* () const -{ - return (CONST D3DXFLOAT16*) &x; -} - - -// binary operators -D3DXINLINE BOOL -D3DXVECTOR4_16F::operator == ( CONST D3DXVECTOR4_16F &v ) const -{ - return *((DWORD *) &x) == *((DWORD *) &v.x) && - *((DWORD *) &z) == *((DWORD *) &v.z); -} - -D3DXINLINE BOOL -D3DXVECTOR4_16F::operator != ( CONST D3DXVECTOR4_16F &v ) const -{ - return *((DWORD *) &x) != *((DWORD *) &v.x) || - *((DWORD *) &z) != *((DWORD *) &v.z); -} - - -//-------------------------- -// Matrix -//-------------------------- -D3DXINLINE -D3DXMATRIX::D3DXMATRIX( CONST FLOAT* pf ) -{ -#ifdef D3DX_DEBUG - if(!pf) - return; -#endif - - memcpy(&_11, pf, sizeof(D3DXMATRIX)); -} - -D3DXINLINE -D3DXMATRIX::D3DXMATRIX( CONST D3DMATRIX& mat ) -{ - memcpy(&_11, &mat, sizeof(D3DXMATRIX)); -} - -D3DXINLINE -D3DXMATRIX::D3DXMATRIX( CONST D3DXFLOAT16* pf ) -{ -#ifdef D3DX_DEBUG - if(!pf) - return; -#endif - - D3DXFloat16To32Array(&_11, pf, 16); -} - -D3DXINLINE -D3DXMATRIX::D3DXMATRIX( FLOAT f11, FLOAT f12, FLOAT f13, FLOAT f14, - FLOAT f21, FLOAT f22, FLOAT f23, FLOAT f24, - FLOAT f31, FLOAT f32, FLOAT f33, FLOAT f34, - FLOAT f41, FLOAT f42, FLOAT f43, FLOAT f44 ) -{ - _11 = f11; _12 = f12; _13 = f13; _14 = f14; - _21 = f21; _22 = f22; _23 = f23; _24 = f24; - _31 = f31; _32 = f32; _33 = f33; _34 = f34; - _41 = f41; _42 = f42; _43 = f43; _44 = f44; -} - - - -// access grants -D3DXINLINE FLOAT& -D3DXMATRIX::operator () ( UINT iRow, UINT iCol ) -{ - return m[iRow][iCol]; -} - -D3DXINLINE FLOAT -D3DXMATRIX::operator () ( UINT iRow, UINT iCol ) const -{ - return m[iRow][iCol]; -} - - -// casting operators -D3DXINLINE -D3DXMATRIX::operator FLOAT* () -{ - return (FLOAT *) &_11; -} - -D3DXINLINE -D3DXMATRIX::operator CONST FLOAT* () const -{ - return (CONST FLOAT *) &_11; -} - - -// assignment operators -D3DXINLINE D3DXMATRIX& -D3DXMATRIX::operator *= ( CONST D3DXMATRIX& mat ) -{ - D3DXMatrixMultiply(this, this, &mat); - return *this; -} - -D3DXINLINE D3DXMATRIX& -D3DXMATRIX::operator += ( CONST D3DXMATRIX& mat ) -{ - _11 += mat._11; _12 += mat._12; _13 += mat._13; _14 += mat._14; - _21 += mat._21; _22 += mat._22; _23 += mat._23; _24 += mat._24; - _31 += mat._31; _32 += mat._32; _33 += mat._33; _34 += mat._34; - _41 += mat._41; _42 += mat._42; _43 += mat._43; _44 += mat._44; - return *this; -} - -D3DXINLINE D3DXMATRIX& -D3DXMATRIX::operator -= ( CONST D3DXMATRIX& mat ) -{ - _11 -= mat._11; _12 -= mat._12; _13 -= mat._13; _14 -= mat._14; - _21 -= mat._21; _22 -= mat._22; _23 -= mat._23; _24 -= mat._24; - _31 -= mat._31; _32 -= mat._32; _33 -= mat._33; _34 -= mat._34; - _41 -= mat._41; _42 -= mat._42; _43 -= mat._43; _44 -= mat._44; - return *this; -} - -D3DXINLINE D3DXMATRIX& -D3DXMATRIX::operator *= ( FLOAT f ) -{ - _11 *= f; _12 *= f; _13 *= f; _14 *= f; - _21 *= f; _22 *= f; _23 *= f; _24 *= f; - _31 *= f; _32 *= f; _33 *= f; _34 *= f; - _41 *= f; _42 *= f; _43 *= f; _44 *= f; - return *this; -} - -D3DXINLINE D3DXMATRIX& -D3DXMATRIX::operator /= ( FLOAT f ) -{ - FLOAT fInv = 1.0f / f; - _11 *= fInv; _12 *= fInv; _13 *= fInv; _14 *= fInv; - _21 *= fInv; _22 *= fInv; _23 *= fInv; _24 *= fInv; - _31 *= fInv; _32 *= fInv; _33 *= fInv; _34 *= fInv; - _41 *= fInv; _42 *= fInv; _43 *= fInv; _44 *= fInv; - return *this; -} - - -// unary operators -D3DXINLINE D3DXMATRIX -D3DXMATRIX::operator + () const -{ - return *this; -} - -D3DXINLINE D3DXMATRIX -D3DXMATRIX::operator - () const -{ - return D3DXMATRIX(-_11, -_12, -_13, -_14, - -_21, -_22, -_23, -_24, - -_31, -_32, -_33, -_34, - -_41, -_42, -_43, -_44); -} - - -// binary operators -D3DXINLINE D3DXMATRIX -D3DXMATRIX::operator * ( CONST D3DXMATRIX& mat ) const -{ - D3DXMATRIX matT; - D3DXMatrixMultiply(&matT, this, &mat); - return matT; -} - -D3DXINLINE D3DXMATRIX -D3DXMATRIX::operator + ( CONST D3DXMATRIX& mat ) const -{ - return D3DXMATRIX(_11 + mat._11, _12 + mat._12, _13 + mat._13, _14 + mat._14, - _21 + mat._21, _22 + mat._22, _23 + mat._23, _24 + mat._24, - _31 + mat._31, _32 + mat._32, _33 + mat._33, _34 + mat._34, - _41 + mat._41, _42 + mat._42, _43 + mat._43, _44 + mat._44); -} - -D3DXINLINE D3DXMATRIX -D3DXMATRIX::operator - ( CONST D3DXMATRIX& mat ) const -{ - return D3DXMATRIX(_11 - mat._11, _12 - mat._12, _13 - mat._13, _14 - mat._14, - _21 - mat._21, _22 - mat._22, _23 - mat._23, _24 - mat._24, - _31 - mat._31, _32 - mat._32, _33 - mat._33, _34 - mat._34, - _41 - mat._41, _42 - mat._42, _43 - mat._43, _44 - mat._44); -} - -D3DXINLINE D3DXMATRIX -D3DXMATRIX::operator * ( FLOAT f ) const -{ - return D3DXMATRIX(_11 * f, _12 * f, _13 * f, _14 * f, - _21 * f, _22 * f, _23 * f, _24 * f, - _31 * f, _32 * f, _33 * f, _34 * f, - _41 * f, _42 * f, _43 * f, _44 * f); -} - -D3DXINLINE D3DXMATRIX -D3DXMATRIX::operator / ( FLOAT f ) const -{ - FLOAT fInv = 1.0f / f; - return D3DXMATRIX(_11 * fInv, _12 * fInv, _13 * fInv, _14 * fInv, - _21 * fInv, _22 * fInv, _23 * fInv, _24 * fInv, - _31 * fInv, _32 * fInv, _33 * fInv, _34 * fInv, - _41 * fInv, _42 * fInv, _43 * fInv, _44 * fInv); -} - - -D3DXINLINE D3DXMATRIX -operator * ( FLOAT f, CONST D3DXMATRIX& mat ) -{ - return D3DXMATRIX(f * mat._11, f * mat._12, f * mat._13, f * mat._14, - f * mat._21, f * mat._22, f * mat._23, f * mat._24, - f * mat._31, f * mat._32, f * mat._33, f * mat._34, - f * mat._41, f * mat._42, f * mat._43, f * mat._44); -} - - -D3DXINLINE BOOL -D3DXMATRIX::operator == ( CONST D3DXMATRIX& mat ) const -{ - return 0 == memcmp(this, &mat, sizeof(D3DXMATRIX)); -} - -D3DXINLINE BOOL -D3DXMATRIX::operator != ( CONST D3DXMATRIX& mat ) const -{ - return 0 != memcmp(this, &mat, sizeof(D3DXMATRIX)); -} - - - -//-------------------------- -// Aligned Matrices -//-------------------------- - -D3DXINLINE -_D3DXMATRIXA16::_D3DXMATRIXA16( CONST FLOAT* f ) : - D3DXMATRIX( f ) -{ -} - -D3DXINLINE -_D3DXMATRIXA16::_D3DXMATRIXA16( CONST D3DMATRIX& m ) : - D3DXMATRIX( m ) -{ -} - -D3DXINLINE -_D3DXMATRIXA16::_D3DXMATRIXA16( CONST D3DXFLOAT16* f ) : - D3DXMATRIX( f ) -{ -} - -D3DXINLINE -_D3DXMATRIXA16::_D3DXMATRIXA16( FLOAT _11, FLOAT _12, FLOAT _13, FLOAT _14, - FLOAT _21, FLOAT _22, FLOAT _23, FLOAT _24, - FLOAT _31, FLOAT _32, FLOAT _33, FLOAT _34, - FLOAT _41, FLOAT _42, FLOAT _43, FLOAT _44 ) : - D3DXMATRIX(_11, _12, _13, _14, - _21, _22, _23, _24, - _31, _32, _33, _34, - _41, _42, _43, _44) -{ -} - -#ifndef SIZE_MAX -#define SIZE_MAX ((SIZE_T)-1) -#endif - -D3DXINLINE void* -_D3DXMATRIXA16::operator new( size_t s ) -{ - if (s > (SIZE_MAX-16)) - return NULL; - LPBYTE p = ::new BYTE[s + 16]; - if (p) - { - BYTE offset = (BYTE)(16 - ((UINT_PTR)p & 15)); - p += offset; - p[-1] = offset; - } - return p; -} - -D3DXINLINE void* -_D3DXMATRIXA16::operator new[]( size_t s ) -{ - if (s > (SIZE_MAX-16)) - return NULL; - LPBYTE p = ::new BYTE[s + 16]; - if (p) - { - BYTE offset = (BYTE)(16 - ((UINT_PTR)p & 15)); - p += offset; - p[-1] = offset; - } - return p; -} - -D3DXINLINE void -_D3DXMATRIXA16::operator delete(void* p) -{ - if(p) - { - BYTE* pb = static_cast<BYTE*>(p); - pb -= pb[-1]; - ::delete [] pb; - } -} - -D3DXINLINE void -_D3DXMATRIXA16::operator delete[](void* p) -{ - if(p) - { - BYTE* pb = static_cast<BYTE*>(p); - pb -= pb[-1]; - ::delete [] pb; - } -} - -D3DXINLINE _D3DXMATRIXA16& -_D3DXMATRIXA16::operator=(CONST D3DXMATRIX& rhs) -{ - memcpy(&_11, &rhs, sizeof(D3DXMATRIX)); - return *this; -} - - -//-------------------------- -// Quaternion -//-------------------------- - -D3DXINLINE -D3DXQUATERNION::D3DXQUATERNION( CONST FLOAT* pf ) -{ -#ifdef D3DX_DEBUG - if(!pf) - return; -#endif - - x = pf[0]; - y = pf[1]; - z = pf[2]; - w = pf[3]; -} - -D3DXINLINE -D3DXQUATERNION::D3DXQUATERNION( CONST D3DXFLOAT16* pf ) -{ -#ifdef D3DX_DEBUG - if(!pf) - return; -#endif - - D3DXFloat16To32Array(&x, pf, 4); -} - -D3DXINLINE -D3DXQUATERNION::D3DXQUATERNION( FLOAT fx, FLOAT fy, FLOAT fz, FLOAT fw ) -{ - x = fx; - y = fy; - z = fz; - w = fw; -} - - -// casting -D3DXINLINE -D3DXQUATERNION::operator FLOAT* () -{ - return (FLOAT *) &x; -} - -D3DXINLINE -D3DXQUATERNION::operator CONST FLOAT* () const -{ - return (CONST FLOAT *) &x; -} - - -// assignment operators -D3DXINLINE D3DXQUATERNION& -D3DXQUATERNION::operator += ( CONST D3DXQUATERNION& q ) -{ - x += q.x; - y += q.y; - z += q.z; - w += q.w; - return *this; -} - -D3DXINLINE D3DXQUATERNION& -D3DXQUATERNION::operator -= ( CONST D3DXQUATERNION& q ) -{ - x -= q.x; - y -= q.y; - z -= q.z; - w -= q.w; - return *this; -} - -D3DXINLINE D3DXQUATERNION& -D3DXQUATERNION::operator *= ( CONST D3DXQUATERNION& q ) -{ - D3DXQuaternionMultiply(this, this, &q); - return *this; -} - -D3DXINLINE D3DXQUATERNION& -D3DXQUATERNION::operator *= ( FLOAT f ) -{ - x *= f; - y *= f; - z *= f; - w *= f; - return *this; -} - -D3DXINLINE D3DXQUATERNION& -D3DXQUATERNION::operator /= ( FLOAT f ) -{ - FLOAT fInv = 1.0f / f; - x *= fInv; - y *= fInv; - z *= fInv; - w *= fInv; - return *this; -} - - -// unary operators -D3DXINLINE D3DXQUATERNION -D3DXQUATERNION::operator + () const -{ - return *this; -} - -D3DXINLINE D3DXQUATERNION -D3DXQUATERNION::operator - () const -{ - return D3DXQUATERNION(-x, -y, -z, -w); -} - - -// binary operators -D3DXINLINE D3DXQUATERNION -D3DXQUATERNION::operator + ( CONST D3DXQUATERNION& q ) const -{ - return D3DXQUATERNION(x + q.x, y + q.y, z + q.z, w + q.w); -} - -D3DXINLINE D3DXQUATERNION -D3DXQUATERNION::operator - ( CONST D3DXQUATERNION& q ) const -{ - return D3DXQUATERNION(x - q.x, y - q.y, z - q.z, w - q.w); -} - -D3DXINLINE D3DXQUATERNION -D3DXQUATERNION::operator * ( CONST D3DXQUATERNION& q ) const -{ - D3DXQUATERNION qT; - D3DXQuaternionMultiply(&qT, this, &q); - return qT; -} - -D3DXINLINE D3DXQUATERNION -D3DXQUATERNION::operator * ( FLOAT f ) const -{ - return D3DXQUATERNION(x * f, y * f, z * f, w * f); -} - -D3DXINLINE D3DXQUATERNION -D3DXQUATERNION::operator / ( FLOAT f ) const -{ - FLOAT fInv = 1.0f / f; - return D3DXQUATERNION(x * fInv, y * fInv, z * fInv, w * fInv); -} - - -D3DXINLINE D3DXQUATERNION -operator * (FLOAT f, CONST D3DXQUATERNION& q ) -{ - return D3DXQUATERNION(f * q.x, f * q.y, f * q.z, f * q.w); -} - - -D3DXINLINE BOOL -D3DXQUATERNION::operator == ( CONST D3DXQUATERNION& q ) const -{ - return x == q.x && y == q.y && z == q.z && w == q.w; -} - -D3DXINLINE BOOL -D3DXQUATERNION::operator != ( CONST D3DXQUATERNION& q ) const -{ - return x != q.x || y != q.y || z != q.z || w != q.w; -} - - - -//-------------------------- -// Plane -//-------------------------- - -D3DXINLINE -D3DXPLANE::D3DXPLANE( CONST FLOAT* pf ) -{ -#ifdef D3DX_DEBUG - if(!pf) - return; -#endif - - a = pf[0]; - b = pf[1]; - c = pf[2]; - d = pf[3]; -} - -D3DXINLINE -D3DXPLANE::D3DXPLANE( CONST D3DXFLOAT16* pf ) -{ -#ifdef D3DX_DEBUG - if(!pf) - return; -#endif - - D3DXFloat16To32Array(&a, pf, 4); -} - -D3DXINLINE -D3DXPLANE::D3DXPLANE( FLOAT fa, FLOAT fb, FLOAT fc, FLOAT fd ) -{ - a = fa; - b = fb; - c = fc; - d = fd; -} - - -// casting -D3DXINLINE -D3DXPLANE::operator FLOAT* () -{ - return (FLOAT *) &a; -} - -D3DXINLINE -D3DXPLANE::operator CONST FLOAT* () const -{ - return (CONST FLOAT *) &a; -} - - -// assignment operators -D3DXINLINE D3DXPLANE& -D3DXPLANE::operator *= ( FLOAT f ) -{ - a *= f; - b *= f; - c *= f; - d *= f; - return *this; -} - -D3DXINLINE D3DXPLANE& -D3DXPLANE::operator /= ( FLOAT f ) -{ - FLOAT fInv = 1.0f / f; - a *= fInv; - b *= fInv; - c *= fInv; - d *= fInv; - return *this; -} - - -// unary operators -D3DXINLINE D3DXPLANE -D3DXPLANE::operator + () const -{ - return *this; -} - -D3DXINLINE D3DXPLANE -D3DXPLANE::operator - () const -{ - return D3DXPLANE(-a, -b, -c, -d); -} - - -// binary operators -D3DXINLINE D3DXPLANE -D3DXPLANE::operator * ( FLOAT f ) const -{ - return D3DXPLANE(a * f, b * f, c * f, d * f); -} - -D3DXINLINE D3DXPLANE -D3DXPLANE::operator / ( FLOAT f ) const -{ - FLOAT fInv = 1.0f / f; - return D3DXPLANE(a * fInv, b * fInv, c * fInv, d * fInv); -} - -D3DXINLINE D3DXPLANE -operator * (FLOAT f, CONST D3DXPLANE& p ) -{ - return D3DXPLANE(f * p.a, f * p.b, f * p.c, f * p.d); -} - -D3DXINLINE BOOL -D3DXPLANE::operator == ( CONST D3DXPLANE& p ) const -{ - return a == p.a && b == p.b && c == p.c && d == p.d; -} - -D3DXINLINE BOOL -D3DXPLANE::operator != ( CONST D3DXPLANE& p ) const -{ - return a != p.a || b != p.b || c != p.c || d != p.d; -} - - - - -//-------------------------- -// Color -//-------------------------- - -D3DXINLINE -D3DXCOLOR::D3DXCOLOR( DWORD dw ) -{ - CONST FLOAT f = 1.0f / 255.0f; - r = f * (FLOAT) (unsigned char) (dw >> 16); - g = f * (FLOAT) (unsigned char) (dw >> 8); - b = f * (FLOAT) (unsigned char) (dw >> 0); - a = f * (FLOAT) (unsigned char) (dw >> 24); -} - -D3DXINLINE -D3DXCOLOR::D3DXCOLOR( CONST FLOAT* pf ) -{ -#ifdef D3DX_DEBUG - if(!pf) - return; -#endif - - r = pf[0]; - g = pf[1]; - b = pf[2]; - a = pf[3]; -} - -D3DXINLINE -D3DXCOLOR::D3DXCOLOR( CONST D3DXFLOAT16* pf ) -{ -#ifdef D3DX_DEBUG - if(!pf) - return; -#endif - - D3DXFloat16To32Array(&r, pf, 4); -} - -D3DXINLINE -D3DXCOLOR::D3DXCOLOR( CONST D3DCOLORVALUE& c ) -{ - r = c.r; - g = c.g; - b = c.b; - a = c.a; -} - -D3DXINLINE -D3DXCOLOR::D3DXCOLOR( FLOAT fr, FLOAT fg, FLOAT fb, FLOAT fa ) -{ - r = fr; - g = fg; - b = fb; - a = fa; -} - - -// casting -D3DXINLINE -D3DXCOLOR::operator DWORD () const -{ - DWORD dwR = r >= 1.0f ? 0xff : r <= 0.0f ? 0x00 : (DWORD) (r * 255.0f + 0.5f); - DWORD dwG = g >= 1.0f ? 0xff : g <= 0.0f ? 0x00 : (DWORD) (g * 255.0f + 0.5f); - DWORD dwB = b >= 1.0f ? 0xff : b <= 0.0f ? 0x00 : (DWORD) (b * 255.0f + 0.5f); - DWORD dwA = a >= 1.0f ? 0xff : a <= 0.0f ? 0x00 : (DWORD) (a * 255.0f + 0.5f); - - return (dwA << 24) | (dwR << 16) | (dwG << 8) | dwB; -} - - -D3DXINLINE -D3DXCOLOR::operator FLOAT * () -{ - return (FLOAT *) &r; -} - -D3DXINLINE -D3DXCOLOR::operator CONST FLOAT * () const -{ - return (CONST FLOAT *) &r; -} - - -D3DXINLINE -D3DXCOLOR::operator D3DCOLORVALUE * () -{ - return (D3DCOLORVALUE *) &r; -} - -D3DXINLINE -D3DXCOLOR::operator CONST D3DCOLORVALUE * () const -{ - return (CONST D3DCOLORVALUE *) &r; -} - - -D3DXINLINE -D3DXCOLOR::operator D3DCOLORVALUE& () -{ - return *((D3DCOLORVALUE *) &r); -} - -D3DXINLINE -D3DXCOLOR::operator CONST D3DCOLORVALUE& () const -{ - return *((CONST D3DCOLORVALUE *) &r); -} - - -// assignment operators -D3DXINLINE D3DXCOLOR& -D3DXCOLOR::operator += ( CONST D3DXCOLOR& c ) -{ - r += c.r; - g += c.g; - b += c.b; - a += c.a; - return *this; -} - -D3DXINLINE D3DXCOLOR& -D3DXCOLOR::operator -= ( CONST D3DXCOLOR& c ) -{ - r -= c.r; - g -= c.g; - b -= c.b; - a -= c.a; - return *this; -} - -D3DXINLINE D3DXCOLOR& -D3DXCOLOR::operator *= ( FLOAT f ) -{ - r *= f; - g *= f; - b *= f; - a *= f; - return *this; -} - -D3DXINLINE D3DXCOLOR& -D3DXCOLOR::operator /= ( FLOAT f ) -{ - FLOAT fInv = 1.0f / f; - r *= fInv; - g *= fInv; - b *= fInv; - a *= fInv; - return *this; -} - - -// unary operators -D3DXINLINE D3DXCOLOR -D3DXCOLOR::operator + () const -{ - return *this; -} - -D3DXINLINE D3DXCOLOR -D3DXCOLOR::operator - () const -{ - return D3DXCOLOR(-r, -g, -b, -a); -} - - -// binary operators -D3DXINLINE D3DXCOLOR -D3DXCOLOR::operator + ( CONST D3DXCOLOR& c ) const -{ - return D3DXCOLOR(r + c.r, g + c.g, b + c.b, a + c.a); -} - -D3DXINLINE D3DXCOLOR -D3DXCOLOR::operator - ( CONST D3DXCOLOR& c ) const -{ - return D3DXCOLOR(r - c.r, g - c.g, b - c.b, a - c.a); -} - -D3DXINLINE D3DXCOLOR -D3DXCOLOR::operator * ( FLOAT f ) const -{ - return D3DXCOLOR(r * f, g * f, b * f, a * f); -} - -D3DXINLINE D3DXCOLOR -D3DXCOLOR::operator / ( FLOAT f ) const -{ - FLOAT fInv = 1.0f / f; - return D3DXCOLOR(r * fInv, g * fInv, b * fInv, a * fInv); -} - - -D3DXINLINE D3DXCOLOR -operator * (FLOAT f, CONST D3DXCOLOR& c ) -{ - return D3DXCOLOR(f * c.r, f * c.g, f * c.b, f * c.a); -} - - -D3DXINLINE BOOL -D3DXCOLOR::operator == ( CONST D3DXCOLOR& c ) const -{ - return r == c.r && g == c.g && b == c.b && a == c.a; -} - -D3DXINLINE BOOL -D3DXCOLOR::operator != ( CONST D3DXCOLOR& c ) const -{ - return r != c.r || g != c.g || b != c.b || a != c.a; -} - - -#endif //__cplusplus - - - -//=========================================================================== -// -// Inline functions -// -//=========================================================================== - - -//-------------------------- -// 2D Vector -//-------------------------- - -D3DXINLINE FLOAT D3DXVec2Length - ( CONST D3DXVECTOR2 *pV ) -{ -#ifdef D3DX_DEBUG - if(!pV) - return 0.0f; -#endif - -#ifdef __cplusplus - return sqrtf(pV->x * pV->x + pV->y * pV->y); -#else - return (FLOAT) sqrt(pV->x * pV->x + pV->y * pV->y); -#endif -} - -D3DXINLINE FLOAT D3DXVec2LengthSq - ( CONST D3DXVECTOR2 *pV ) -{ -#ifdef D3DX_DEBUG - if(!pV) - return 0.0f; -#endif - - return pV->x * pV->x + pV->y * pV->y; -} - -D3DXINLINE FLOAT D3DXVec2Dot - ( CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ) -{ -#ifdef D3DX_DEBUG - if(!pV1 || !pV2) - return 0.0f; -#endif - - return pV1->x * pV2->x + pV1->y * pV2->y; -} - -D3DXINLINE FLOAT D3DXVec2CCW - ( CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ) -{ -#ifdef D3DX_DEBUG - if(!pV1 || !pV2) - return 0.0f; -#endif - - return pV1->x * pV2->y - pV1->y * pV2->x; -} - -D3DXINLINE D3DXVECTOR2* D3DXVec2Add - ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pV1 || !pV2) - return NULL; -#endif - - pOut->x = pV1->x + pV2->x; - pOut->y = pV1->y + pV2->y; - return pOut; -} - -D3DXINLINE D3DXVECTOR2* D3DXVec2Subtract - ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pV1 || !pV2) - return NULL; -#endif - - pOut->x = pV1->x - pV2->x; - pOut->y = pV1->y - pV2->y; - return pOut; -} - -D3DXINLINE D3DXVECTOR2* D3DXVec2Minimize - ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pV1 || !pV2) - return NULL; -#endif - - pOut->x = pV1->x < pV2->x ? pV1->x : pV2->x; - pOut->y = pV1->y < pV2->y ? pV1->y : pV2->y; - return pOut; -} - -D3DXINLINE D3DXVECTOR2* D3DXVec2Maximize - ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pV1 || !pV2) - return NULL; -#endif - - pOut->x = pV1->x > pV2->x ? pV1->x : pV2->x; - pOut->y = pV1->y > pV2->y ? pV1->y : pV2->y; - return pOut; -} - -D3DXINLINE D3DXVECTOR2* D3DXVec2Scale - ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV, FLOAT s ) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pV) - return NULL; -#endif - - pOut->x = pV->x * s; - pOut->y = pV->y * s; - return pOut; -} - -D3DXINLINE D3DXVECTOR2* D3DXVec2Lerp - ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2, - FLOAT s ) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pV1 || !pV2) - return NULL; -#endif - - pOut->x = pV1->x + s * (pV2->x - pV1->x); - pOut->y = pV1->y + s * (pV2->y - pV1->y); - return pOut; -} - - -//-------------------------- -// 3D Vector -//-------------------------- - -D3DXINLINE FLOAT D3DXVec3Length - ( CONST D3DXVECTOR3 *pV ) -{ -#ifdef D3DX_DEBUG - if(!pV) - return 0.0f; -#endif - -#ifdef __cplusplus - return sqrtf(pV->x * pV->x + pV->y * pV->y + pV->z * pV->z); -#else - return (FLOAT) sqrt(pV->x * pV->x + pV->y * pV->y + pV->z * pV->z); -#endif -} - -D3DXINLINE FLOAT D3DXVec3LengthSq - ( CONST D3DXVECTOR3 *pV ) -{ -#ifdef D3DX_DEBUG - if(!pV) - return 0.0f; -#endif - - return pV->x * pV->x + pV->y * pV->y + pV->z * pV->z; -} - -D3DXINLINE FLOAT D3DXVec3Dot - ( CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ) -{ -#ifdef D3DX_DEBUG - if(!pV1 || !pV2) - return 0.0f; -#endif - - return pV1->x * pV2->x + pV1->y * pV2->y + pV1->z * pV2->z; -} - -D3DXINLINE D3DXVECTOR3* D3DXVec3Cross - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ) -{ - D3DXVECTOR3 v; - -#ifdef D3DX_DEBUG - if(!pOut || !pV1 || !pV2) - return NULL; -#endif - - v.x = pV1->y * pV2->z - pV1->z * pV2->y; - v.y = pV1->z * pV2->x - pV1->x * pV2->z; - v.z = pV1->x * pV2->y - pV1->y * pV2->x; - - *pOut = v; - return pOut; -} - -D3DXINLINE D3DXVECTOR3* D3DXVec3Add - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pV1 || !pV2) - return NULL; -#endif - - pOut->x = pV1->x + pV2->x; - pOut->y = pV1->y + pV2->y; - pOut->z = pV1->z + pV2->z; - return pOut; -} - -D3DXINLINE D3DXVECTOR3* D3DXVec3Subtract - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pV1 || !pV2) - return NULL; -#endif - - pOut->x = pV1->x - pV2->x; - pOut->y = pV1->y - pV2->y; - pOut->z = pV1->z - pV2->z; - return pOut; -} - -D3DXINLINE D3DXVECTOR3* D3DXVec3Minimize - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pV1 || !pV2) - return NULL; -#endif - - pOut->x = pV1->x < pV2->x ? pV1->x : pV2->x; - pOut->y = pV1->y < pV2->y ? pV1->y : pV2->y; - pOut->z = pV1->z < pV2->z ? pV1->z : pV2->z; - return pOut; -} - -D3DXINLINE D3DXVECTOR3* D3DXVec3Maximize - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pV1 || !pV2) - return NULL; -#endif - - pOut->x = pV1->x > pV2->x ? pV1->x : pV2->x; - pOut->y = pV1->y > pV2->y ? pV1->y : pV2->y; - pOut->z = pV1->z > pV2->z ? pV1->z : pV2->z; - return pOut; -} - -D3DXINLINE D3DXVECTOR3* D3DXVec3Scale - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, FLOAT s) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pV) - return NULL; -#endif - - pOut->x = pV->x * s; - pOut->y = pV->y * s; - pOut->z = pV->z * s; - return pOut; -} - -D3DXINLINE D3DXVECTOR3* D3DXVec3Lerp - ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2, - FLOAT s ) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pV1 || !pV2) - return NULL; -#endif - - pOut->x = pV1->x + s * (pV2->x - pV1->x); - pOut->y = pV1->y + s * (pV2->y - pV1->y); - pOut->z = pV1->z + s * (pV2->z - pV1->z); - return pOut; -} - - -//-------------------------- -// 4D Vector -//-------------------------- - -D3DXINLINE FLOAT D3DXVec4Length - ( CONST D3DXVECTOR4 *pV ) -{ -#ifdef D3DX_DEBUG - if(!pV) - return 0.0f; -#endif - -#ifdef __cplusplus - return sqrtf(pV->x * pV->x + pV->y * pV->y + pV->z * pV->z + pV->w * pV->w); -#else - return (FLOAT) sqrt(pV->x * pV->x + pV->y * pV->y + pV->z * pV->z + pV->w * pV->w); -#endif -} - -D3DXINLINE FLOAT D3DXVec4LengthSq - ( CONST D3DXVECTOR4 *pV ) -{ -#ifdef D3DX_DEBUG - if(!pV) - return 0.0f; -#endif - - return pV->x * pV->x + pV->y * pV->y + pV->z * pV->z + pV->w * pV->w; -} - -D3DXINLINE FLOAT D3DXVec4Dot - ( CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2 ) -{ -#ifdef D3DX_DEBUG - if(!pV1 || !pV2) - return 0.0f; -#endif - - return pV1->x * pV2->x + pV1->y * pV2->y + pV1->z * pV2->z + pV1->w * pV2->w; -} - -D3DXINLINE D3DXVECTOR4* D3DXVec4Add - ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pV1 || !pV2) - return NULL; -#endif - - pOut->x = pV1->x + pV2->x; - pOut->y = pV1->y + pV2->y; - pOut->z = pV1->z + pV2->z; - pOut->w = pV1->w + pV2->w; - return pOut; -} - -D3DXINLINE D3DXVECTOR4* D3DXVec4Subtract - ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pV1 || !pV2) - return NULL; -#endif - - pOut->x = pV1->x - pV2->x; - pOut->y = pV1->y - pV2->y; - pOut->z = pV1->z - pV2->z; - pOut->w = pV1->w - pV2->w; - return pOut; -} - -D3DXINLINE D3DXVECTOR4* D3DXVec4Minimize - ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pV1 || !pV2) - return NULL; -#endif - - pOut->x = pV1->x < pV2->x ? pV1->x : pV2->x; - pOut->y = pV1->y < pV2->y ? pV1->y : pV2->y; - pOut->z = pV1->z < pV2->z ? pV1->z : pV2->z; - pOut->w = pV1->w < pV2->w ? pV1->w : pV2->w; - return pOut; -} - -D3DXINLINE D3DXVECTOR4* D3DXVec4Maximize - ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pV1 || !pV2) - return NULL; -#endif - - pOut->x = pV1->x > pV2->x ? pV1->x : pV2->x; - pOut->y = pV1->y > pV2->y ? pV1->y : pV2->y; - pOut->z = pV1->z > pV2->z ? pV1->z : pV2->z; - pOut->w = pV1->w > pV2->w ? pV1->w : pV2->w; - return pOut; -} - -D3DXINLINE D3DXVECTOR4* D3DXVec4Scale - ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV, FLOAT s) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pV) - return NULL; -#endif - - pOut->x = pV->x * s; - pOut->y = pV->y * s; - pOut->z = pV->z * s; - pOut->w = pV->w * s; - return pOut; -} - -D3DXINLINE D3DXVECTOR4* D3DXVec4Lerp - ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2, - FLOAT s ) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pV1 || !pV2) - return NULL; -#endif - - pOut->x = pV1->x + s * (pV2->x - pV1->x); - pOut->y = pV1->y + s * (pV2->y - pV1->y); - pOut->z = pV1->z + s * (pV2->z - pV1->z); - pOut->w = pV1->w + s * (pV2->w - pV1->w); - return pOut; -} - - -//-------------------------- -// 4D Matrix -//-------------------------- - -D3DXINLINE D3DXMATRIX* D3DXMatrixIdentity - ( D3DXMATRIX *pOut ) -{ -#ifdef D3DX_DEBUG - if(!pOut) - return NULL; -#endif - - pOut->m[0][1] = pOut->m[0][2] = pOut->m[0][3] = - pOut->m[1][0] = pOut->m[1][2] = pOut->m[1][3] = - pOut->m[2][0] = pOut->m[2][1] = pOut->m[2][3] = - pOut->m[3][0] = pOut->m[3][1] = pOut->m[3][2] = 0.0f; - - pOut->m[0][0] = pOut->m[1][1] = pOut->m[2][2] = pOut->m[3][3] = 1.0f; - return pOut; -} - - -D3DXINLINE BOOL D3DXMatrixIsIdentity - ( CONST D3DXMATRIX *pM ) -{ -#ifdef D3DX_DEBUG - if(!pM) - return FALSE; -#endif - - return pM->m[0][0] == 1.0f && pM->m[0][1] == 0.0f && pM->m[0][2] == 0.0f && pM->m[0][3] == 0.0f && - pM->m[1][0] == 0.0f && pM->m[1][1] == 1.0f && pM->m[1][2] == 0.0f && pM->m[1][3] == 0.0f && - pM->m[2][0] == 0.0f && pM->m[2][1] == 0.0f && pM->m[2][2] == 1.0f && pM->m[2][3] == 0.0f && - pM->m[3][0] == 0.0f && pM->m[3][1] == 0.0f && pM->m[3][2] == 0.0f && pM->m[3][3] == 1.0f; -} - - -//-------------------------- -// Quaternion -//-------------------------- - -D3DXINLINE FLOAT D3DXQuaternionLength - ( CONST D3DXQUATERNION *pQ ) -{ -#ifdef D3DX_DEBUG - if(!pQ) - return 0.0f; -#endif - -#ifdef __cplusplus - return sqrtf(pQ->x * pQ->x + pQ->y * pQ->y + pQ->z * pQ->z + pQ->w * pQ->w); -#else - return (FLOAT) sqrt(pQ->x * pQ->x + pQ->y * pQ->y + pQ->z * pQ->z + pQ->w * pQ->w); -#endif -} - -D3DXINLINE FLOAT D3DXQuaternionLengthSq - ( CONST D3DXQUATERNION *pQ ) -{ -#ifdef D3DX_DEBUG - if(!pQ) - return 0.0f; -#endif - - return pQ->x * pQ->x + pQ->y * pQ->y + pQ->z * pQ->z + pQ->w * pQ->w; -} - -D3DXINLINE FLOAT D3DXQuaternionDot - ( CONST D3DXQUATERNION *pQ1, CONST D3DXQUATERNION *pQ2 ) -{ -#ifdef D3DX_DEBUG - if(!pQ1 || !pQ2) - return 0.0f; -#endif - - return pQ1->x * pQ2->x + pQ1->y * pQ2->y + pQ1->z * pQ2->z + pQ1->w * pQ2->w; -} - - -D3DXINLINE D3DXQUATERNION* D3DXQuaternionIdentity - ( D3DXQUATERNION *pOut ) -{ -#ifdef D3DX_DEBUG - if(!pOut) - return NULL; -#endif - - pOut->x = pOut->y = pOut->z = 0.0f; - pOut->w = 1.0f; - return pOut; -} - -D3DXINLINE BOOL D3DXQuaternionIsIdentity - ( CONST D3DXQUATERNION *pQ ) -{ -#ifdef D3DX_DEBUG - if(!pQ) - return FALSE; -#endif - - return pQ->x == 0.0f && pQ->y == 0.0f && pQ->z == 0.0f && pQ->w == 1.0f; -} - - -D3DXINLINE D3DXQUATERNION* D3DXQuaternionConjugate - ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ ) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pQ) - return NULL; -#endif - - pOut->x = -pQ->x; - pOut->y = -pQ->y; - pOut->z = -pQ->z; - pOut->w = pQ->w; - return pOut; -} - - -//-------------------------- -// Plane -//-------------------------- - -D3DXINLINE FLOAT D3DXPlaneDot - ( CONST D3DXPLANE *pP, CONST D3DXVECTOR4 *pV) -{ -#ifdef D3DX_DEBUG - if(!pP || !pV) - return 0.0f; -#endif - - return pP->a * pV->x + pP->b * pV->y + pP->c * pV->z + pP->d * pV->w; -} - -D3DXINLINE FLOAT D3DXPlaneDotCoord - ( CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV) -{ -#ifdef D3DX_DEBUG - if(!pP || !pV) - return 0.0f; -#endif - - return pP->a * pV->x + pP->b * pV->y + pP->c * pV->z + pP->d; -} - -D3DXINLINE FLOAT D3DXPlaneDotNormal - ( CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV) -{ -#ifdef D3DX_DEBUG - if(!pP || !pV) - return 0.0f; -#endif - - return pP->a * pV->x + pP->b * pV->y + pP->c * pV->z; -} - -D3DXINLINE D3DXPLANE* D3DXPlaneScale - (D3DXPLANE *pOut, CONST D3DXPLANE *pP, FLOAT s) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pP) - return NULL; -#endif - - pOut->a = pP->a * s; - pOut->b = pP->b * s; - pOut->c = pP->c * s; - pOut->d = pP->d * s; - return pOut; -} - - -//-------------------------- -// Color -//-------------------------- - -D3DXINLINE D3DXCOLOR* D3DXColorNegative - (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pC) - return NULL; -#endif - - pOut->r = 1.0f - pC->r; - pOut->g = 1.0f - pC->g; - pOut->b = 1.0f - pC->b; - pOut->a = pC->a; - return pOut; -} - -D3DXINLINE D3DXCOLOR* D3DXColorAdd - (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pC1 || !pC2) - return NULL; -#endif - - pOut->r = pC1->r + pC2->r; - pOut->g = pC1->g + pC2->g; - pOut->b = pC1->b + pC2->b; - pOut->a = pC1->a + pC2->a; - return pOut; -} - -D3DXINLINE D3DXCOLOR* D3DXColorSubtract - (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pC1 || !pC2) - return NULL; -#endif - - pOut->r = pC1->r - pC2->r; - pOut->g = pC1->g - pC2->g; - pOut->b = pC1->b - pC2->b; - pOut->a = pC1->a - pC2->a; - return pOut; -} - -D3DXINLINE D3DXCOLOR* D3DXColorScale - (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC, FLOAT s) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pC) - return NULL; -#endif - - pOut->r = pC->r * s; - pOut->g = pC->g * s; - pOut->b = pC->b * s; - pOut->a = pC->a * s; - return pOut; -} - -D3DXINLINE D3DXCOLOR* D3DXColorModulate - (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pC1 || !pC2) - return NULL; -#endif - - pOut->r = pC1->r * pC2->r; - pOut->g = pC1->g * pC2->g; - pOut->b = pC1->b * pC2->b; - pOut->a = pC1->a * pC2->a; - return pOut; -} - -D3DXINLINE D3DXCOLOR* D3DXColorLerp - (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2, FLOAT s) -{ -#ifdef D3DX_DEBUG - if(!pOut || !pC1 || !pC2) - return NULL; -#endif - - pOut->r = pC1->r + s * (pC2->r - pC1->r); - pOut->g = pC1->g + s * (pC2->g - pC1->g); - pOut->b = pC1->b + s * (pC2->b - pC1->b); - pOut->a = pC1->a + s * (pC2->a - pC1->a); - return pOut; -} - - -#endif // __D3DX9MATH_INL__ - diff --git a/builddir/irrlicht-1.8.1/include/d3dx9mesh.h b/builddir/irrlicht-1.8.1/include/d3dx9mesh.h deleted file mode 100644 index a009d9a..0000000 --- a/builddir/irrlicht-1.8.1/include/d3dx9mesh.h +++ /dev/null @@ -1,3007 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) Microsoft Corporation. All Rights Reserved. -// -// File: d3dx9mesh.h -// Content: D3DX mesh types and functions -// -////////////////////////////////////////////////////////////////////////////// - -#include "d3dx9.h" - -#ifndef __D3DX9MESH_H__ -#define __D3DX9MESH_H__ - -// {7ED943DD-52E8-40b5-A8D8-76685C406330} -DEFINE_GUID(IID_ID3DXBaseMesh, -0x7ed943dd, 0x52e8, 0x40b5, 0xa8, 0xd8, 0x76, 0x68, 0x5c, 0x40, 0x63, 0x30); - -// {4020E5C2-1403-4929-883F-E2E849FAC195} -DEFINE_GUID(IID_ID3DXMesh, -0x4020e5c2, 0x1403, 0x4929, 0x88, 0x3f, 0xe2, 0xe8, 0x49, 0xfa, 0xc1, 0x95); - -// {8875769A-D579-4088-AAEB-534D1AD84E96} -DEFINE_GUID(IID_ID3DXPMesh, -0x8875769a, 0xd579, 0x4088, 0xaa, 0xeb, 0x53, 0x4d, 0x1a, 0xd8, 0x4e, 0x96); - -// {667EA4C7-F1CD-4386-B523-7C0290B83CC5} -DEFINE_GUID(IID_ID3DXSPMesh, -0x667ea4c7, 0xf1cd, 0x4386, 0xb5, 0x23, 0x7c, 0x2, 0x90, 0xb8, 0x3c, 0xc5); - -// {11EAA540-F9A6-4d49-AE6A-E19221F70CC4} -DEFINE_GUID(IID_ID3DXSkinInfo, -0x11eaa540, 0xf9a6, 0x4d49, 0xae, 0x6a, 0xe1, 0x92, 0x21, 0xf7, 0xc, 0xc4); - -// {3CE6CC22-DBF2-44f4-894D-F9C34A337139} -DEFINE_GUID(IID_ID3DXPatchMesh, -0x3ce6cc22, 0xdbf2, 0x44f4, 0x89, 0x4d, 0xf9, 0xc3, 0x4a, 0x33, 0x71, 0x39); - -//patch mesh can be quads or tris -typedef enum _D3DXPATCHMESHTYPE { - D3DXPATCHMESH_RECT = 0x001, - D3DXPATCHMESH_TRI = 0x002, - D3DXPATCHMESH_NPATCH = 0x003, - - D3DXPATCHMESH_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ -} D3DXPATCHMESHTYPE; - -// Mesh options - lower 3 bytes only, upper byte used by _D3DXMESHOPT option flags -enum _D3DXMESH { - D3DXMESH_32BIT = 0x001, // If set, then use 32 bit indices, if not set use 16 bit indices. - D3DXMESH_DONOTCLIP = 0x002, // Use D3DUSAGE_DONOTCLIP for VB & IB. - D3DXMESH_POINTS = 0x004, // Use D3DUSAGE_POINTS for VB & IB. - D3DXMESH_RTPATCHES = 0x008, // Use D3DUSAGE_RTPATCHES for VB & IB. - D3DXMESH_NPATCHES = 0x4000,// Use D3DUSAGE_NPATCHES for VB & IB. - D3DXMESH_VB_SYSTEMMEM = 0x010, // Use D3DPOOL_SYSTEMMEM for VB. Overrides D3DXMESH_MANAGEDVERTEXBUFFER - D3DXMESH_VB_MANAGED = 0x020, // Use D3DPOOL_MANAGED for VB. - D3DXMESH_VB_WRITEONLY = 0x040, // Use D3DUSAGE_WRITEONLY for VB. - D3DXMESH_VB_DYNAMIC = 0x080, // Use D3DUSAGE_DYNAMIC for VB. - D3DXMESH_VB_SOFTWAREPROCESSING = 0x8000, // Use D3DUSAGE_SOFTWAREPROCESSING for VB. - D3DXMESH_IB_SYSTEMMEM = 0x100, // Use D3DPOOL_SYSTEMMEM for IB. Overrides D3DXMESH_MANAGEDINDEXBUFFER - D3DXMESH_IB_MANAGED = 0x200, // Use D3DPOOL_MANAGED for IB. - D3DXMESH_IB_WRITEONLY = 0x400, // Use D3DUSAGE_WRITEONLY for IB. - D3DXMESH_IB_DYNAMIC = 0x800, // Use D3DUSAGE_DYNAMIC for IB. - D3DXMESH_IB_SOFTWAREPROCESSING= 0x10000, // Use D3DUSAGE_SOFTWAREPROCESSING for IB. - - D3DXMESH_VB_SHARE = 0x1000, // Valid for Clone* calls only, forces cloned mesh/pmesh to share vertex buffer - - D3DXMESH_USEHWONLY = 0x2000, // Valid for ID3DXSkinInfo::ConvertToBlendedMesh - - // Helper options - D3DXMESH_SYSTEMMEM = 0x110, // D3DXMESH_VB_SYSTEMMEM | D3DXMESH_IB_SYSTEMMEM - D3DXMESH_MANAGED = 0x220, // D3DXMESH_VB_MANAGED | D3DXMESH_IB_MANAGED - D3DXMESH_WRITEONLY = 0x440, // D3DXMESH_VB_WRITEONLY | D3DXMESH_IB_WRITEONLY - D3DXMESH_DYNAMIC = 0x880, // D3DXMESH_VB_DYNAMIC | D3DXMESH_IB_DYNAMIC - D3DXMESH_SOFTWAREPROCESSING = 0x18000, // D3DXMESH_VB_SOFTWAREPROCESSING | D3DXMESH_IB_SOFTWAREPROCESSING - -}; - -//patch mesh options -enum _D3DXPATCHMESH { - D3DXPATCHMESH_DEFAULT = 000, -}; -// option field values for specifying min value in D3DXGeneratePMesh and D3DXSimplifyMesh -enum _D3DXMESHSIMP -{ - D3DXMESHSIMP_VERTEX = 0x1, - D3DXMESHSIMP_FACE = 0x2, - -}; - -typedef enum _D3DXCLEANTYPE { - D3DXCLEAN_BACKFACING = 0x00000001, - D3DXCLEAN_BOWTIES = 0x00000002, - - // Helper options - D3DXCLEAN_SKINNING = D3DXCLEAN_BACKFACING, // Bowtie cleaning modifies geometry and breaks skinning - D3DXCLEAN_OPTIMIZATION = D3DXCLEAN_BACKFACING, - D3DXCLEAN_SIMPLIFICATION= D3DXCLEAN_BACKFACING | D3DXCLEAN_BOWTIES, -} D3DXCLEANTYPE; - -enum _MAX_FVF_DECL_SIZE -{ - MAX_FVF_DECL_SIZE = MAXD3DDECLLENGTH + 1 // +1 for END -}; - -typedef enum _D3DXTANGENT -{ - D3DXTANGENT_WRAP_U = 0x01, - D3DXTANGENT_WRAP_V = 0x02, - D3DXTANGENT_WRAP_UV = 0x03, - D3DXTANGENT_DONT_NORMALIZE_PARTIALS = 0x04, - D3DXTANGENT_DONT_ORTHOGONALIZE = 0x08, - D3DXTANGENT_ORTHOGONALIZE_FROM_V = 0x010, - D3DXTANGENT_ORTHOGONALIZE_FROM_U = 0x020, - D3DXTANGENT_WEIGHT_BY_AREA = 0x040, - D3DXTANGENT_WEIGHT_EQUAL = 0x080, - D3DXTANGENT_WIND_CW = 0x0100, - D3DXTANGENT_CALCULATE_NORMALS = 0x0200, - D3DXTANGENT_GENERATE_IN_PLACE = 0x0400, -} D3DXTANGENT; - -// D3DXIMT_WRAP_U means the texture wraps in the U direction -// D3DXIMT_WRAP_V means the texture wraps in the V direction -// D3DXIMT_WRAP_UV means the texture wraps in both directions -typedef enum _D3DXIMT -{ - D3DXIMT_WRAP_U = 0x01, - D3DXIMT_WRAP_V = 0x02, - D3DXIMT_WRAP_UV = 0x03, -} D3DXIMT; - -// These options are only valid for UVAtlasCreate and UVAtlasPartition, we may add more for UVAtlasPack if necessary -// D3DXUVATLAS_DEFAULT - Meshes with more than 25k faces go through fast, meshes with fewer than 25k faces go through quality -// D3DXUVATLAS_GEODESIC_FAST - Uses approximations to improve charting speed at the cost of added stretch or more charts. -// D3DXUVATLAS_GEODESIC_QUALITY - Provides better quality charts, but requires more time and memory than fast. -typedef enum _D3DXUVATLAS -{ - D3DXUVATLAS_DEFAULT = 0x00, - D3DXUVATLAS_GEODESIC_FAST = 0x01, - D3DXUVATLAS_GEODESIC_QUALITY = 0x02, -} D3DXUVATLAS; - -typedef struct ID3DXBaseMesh *LPD3DXBASEMESH; -typedef struct ID3DXMesh *LPD3DXMESH; -typedef struct ID3DXPMesh *LPD3DXPMESH; -typedef struct ID3DXSPMesh *LPD3DXSPMESH; -typedef struct ID3DXSkinInfo *LPD3DXSKININFO; -typedef struct ID3DXPatchMesh *LPD3DXPATCHMESH; -typedef interface ID3DXTextureGutterHelper *LPD3DXTEXTUREGUTTERHELPER; -typedef interface ID3DXPRTBuffer *LPD3DXPRTBUFFER; - - -typedef struct _D3DXATTRIBUTERANGE -{ - DWORD AttribId; - DWORD FaceStart; - DWORD FaceCount; - DWORD VertexStart; - DWORD VertexCount; -} D3DXATTRIBUTERANGE; - -typedef D3DXATTRIBUTERANGE* LPD3DXATTRIBUTERANGE; - -typedef struct _D3DXMATERIAL -{ - D3DMATERIAL9 MatD3D; - LPSTR pTextureFilename; -} D3DXMATERIAL; -typedef D3DXMATERIAL *LPD3DXMATERIAL; - -typedef enum _D3DXEFFECTDEFAULTTYPE -{ - D3DXEDT_STRING = 0x1, // pValue points to a null terminated ASCII string - D3DXEDT_FLOATS = 0x2, // pValue points to an array of floats - number of floats is NumBytes / sizeof(float) - D3DXEDT_DWORD = 0x3, // pValue points to a DWORD - - D3DXEDT_FORCEDWORD = 0x7fffffff -} D3DXEFFECTDEFAULTTYPE; - -typedef struct _D3DXEFFECTDEFAULT -{ - LPSTR pParamName; - D3DXEFFECTDEFAULTTYPE Type; // type of the data pointed to by pValue - DWORD NumBytes; // size in bytes of the data pointed to by pValue - LPVOID pValue; // data for the default of the effect -} D3DXEFFECTDEFAULT, *LPD3DXEFFECTDEFAULT; - -typedef struct _D3DXEFFECTINSTANCE -{ - LPSTR pEffectFilename; - DWORD NumDefaults; - LPD3DXEFFECTDEFAULT pDefaults; -} D3DXEFFECTINSTANCE, *LPD3DXEFFECTINSTANCE; - -typedef struct _D3DXATTRIBUTEWEIGHTS -{ - FLOAT Position; - FLOAT Boundary; - FLOAT Normal; - FLOAT Diffuse; - FLOAT Specular; - FLOAT Texcoord[8]; - FLOAT Tangent; - FLOAT Binormal; -} D3DXATTRIBUTEWEIGHTS, *LPD3DXATTRIBUTEWEIGHTS; - -enum _D3DXWELDEPSILONSFLAGS -{ - D3DXWELDEPSILONS_WELDALL = 0x1, // weld all vertices marked by adjacency as being overlapping - - D3DXWELDEPSILONS_WELDPARTIALMATCHES = 0x2, // if a given vertex component is within epsilon, modify partial matched - // vertices so that both components identical AND if all components "equal" - // remove one of the vertices - D3DXWELDEPSILONS_DONOTREMOVEVERTICES = 0x4, // instructs weld to only allow modifications to vertices and not removal - // ONLY valid if D3DXWELDEPSILONS_WELDPARTIALMATCHES is set - // useful to modify vertices to be equal, but not allow vertices to be removed - - D3DXWELDEPSILONS_DONOTSPLIT = 0x8, // instructs weld to specify the D3DXMESHOPT_DONOTSPLIT flag when doing an Optimize(ATTR_SORT) - // if this flag is not set, all vertices that are in separate attribute groups - // will remain split and not welded. Setting this flag can slow down software vertex processing - -}; - -typedef struct _D3DXWELDEPSILONS -{ - FLOAT Position; // NOTE: This does NOT replace the epsilon in GenerateAdjacency - // in general, it should be the same value or greater than the one passed to GeneratedAdjacency - FLOAT BlendWeights; - FLOAT Normal; - FLOAT PSize; - FLOAT Specular; - FLOAT Diffuse; - FLOAT Texcoord[8]; - FLOAT Tangent; - FLOAT Binormal; - FLOAT TessFactor; -} D3DXWELDEPSILONS; - -typedef D3DXWELDEPSILONS* LPD3DXWELDEPSILONS; - - -#undef INTERFACE -#define INTERFACE ID3DXBaseMesh - -DECLARE_INTERFACE_(ID3DXBaseMesh, IUnknown) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // ID3DXBaseMesh - STDMETHOD(DrawSubset)(THIS_ DWORD AttribId) PURE; - STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE; - STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE; - STDMETHOD_(DWORD, GetFVF)(THIS) PURE; - STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 Declaration[MAX_FVF_DECL_SIZE]) PURE; - STDMETHOD_(DWORD, GetNumBytesPerVertex)(THIS) PURE; - STDMETHOD_(DWORD, GetOptions)(THIS) PURE; - STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* ppDevice) PURE; - STDMETHOD(CloneMeshFVF)(THIS_ DWORD Options, - DWORD FVF, LPDIRECT3DDEVICE9 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE; - STDMETHOD(CloneMesh)(THIS_ DWORD Options, - CONST D3DVERTEXELEMENT9 *pDeclaration, LPDIRECT3DDEVICE9 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE; - STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER9* ppVB) PURE; - STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER9* ppIB) PURE; - STDMETHOD(LockVertexBuffer)(THIS_ DWORD Flags, LPVOID *ppData) PURE; - STDMETHOD(UnlockVertexBuffer)(THIS) PURE; - STDMETHOD(LockIndexBuffer)(THIS_ DWORD Flags, LPVOID *ppData) PURE; - STDMETHOD(UnlockIndexBuffer)(THIS) PURE; - STDMETHOD(GetAttributeTable)( - THIS_ D3DXATTRIBUTERANGE *pAttribTable, DWORD* pAttribTableSize) PURE; - - STDMETHOD(ConvertPointRepsToAdjacency)(THIS_ CONST DWORD* pPRep, DWORD* pAdjacency) PURE; - STDMETHOD(ConvertAdjacencyToPointReps)(THIS_ CONST DWORD* pAdjacency, DWORD* pPRep) PURE; - STDMETHOD(GenerateAdjacency)(THIS_ FLOAT Epsilon, DWORD* pAdjacency) PURE; - - STDMETHOD(UpdateSemantics)(THIS_ D3DVERTEXELEMENT9 Declaration[MAX_FVF_DECL_SIZE]) PURE; -}; - - -#undef INTERFACE -#define INTERFACE ID3DXMesh - -DECLARE_INTERFACE_(ID3DXMesh, ID3DXBaseMesh) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // ID3DXBaseMesh - STDMETHOD(DrawSubset)(THIS_ DWORD AttribId) PURE; - STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE; - STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE; - STDMETHOD_(DWORD, GetFVF)(THIS) PURE; - STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 Declaration[MAX_FVF_DECL_SIZE]) PURE; - STDMETHOD_(DWORD, GetNumBytesPerVertex)(THIS) PURE; - STDMETHOD_(DWORD, GetOptions)(THIS) PURE; - STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* ppDevice) PURE; - STDMETHOD(CloneMeshFVF)(THIS_ DWORD Options, - DWORD FVF, LPDIRECT3DDEVICE9 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE; - STDMETHOD(CloneMesh)(THIS_ DWORD Options, - CONST D3DVERTEXELEMENT9 *pDeclaration, LPDIRECT3DDEVICE9 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE; - STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER9* ppVB) PURE; - STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER9* ppIB) PURE; - STDMETHOD(LockVertexBuffer)(THIS_ DWORD Flags, LPVOID *ppData) PURE; - STDMETHOD(UnlockVertexBuffer)(THIS) PURE; - STDMETHOD(LockIndexBuffer)(THIS_ DWORD Flags, LPVOID *ppData) PURE; - STDMETHOD(UnlockIndexBuffer)(THIS) PURE; - STDMETHOD(GetAttributeTable)( - THIS_ D3DXATTRIBUTERANGE *pAttribTable, DWORD* pAttribTableSize) PURE; - - STDMETHOD(ConvertPointRepsToAdjacency)(THIS_ CONST DWORD* pPRep, DWORD* pAdjacency) PURE; - STDMETHOD(ConvertAdjacencyToPointReps)(THIS_ CONST DWORD* pAdjacency, DWORD* pPRep) PURE; - STDMETHOD(GenerateAdjacency)(THIS_ FLOAT Epsilon, DWORD* pAdjacency) PURE; - - STDMETHOD(UpdateSemantics)(THIS_ D3DVERTEXELEMENT9 Declaration[MAX_FVF_DECL_SIZE]) PURE; - - // ID3DXMesh - STDMETHOD(LockAttributeBuffer)(THIS_ DWORD Flags, DWORD** ppData) PURE; - STDMETHOD(UnlockAttributeBuffer)(THIS) PURE; - STDMETHOD(Optimize)(THIS_ DWORD Flags, CONST DWORD* pAdjacencyIn, DWORD* pAdjacencyOut, - DWORD* pFaceRemap, LPD3DXBUFFER *ppVertexRemap, - LPD3DXMESH* ppOptMesh) PURE; - STDMETHOD(OptimizeInplace)(THIS_ DWORD Flags, CONST DWORD* pAdjacencyIn, DWORD* pAdjacencyOut, - DWORD* pFaceRemap, LPD3DXBUFFER *ppVertexRemap) PURE; - STDMETHOD(SetAttributeTable)(THIS_ CONST D3DXATTRIBUTERANGE *pAttribTable, DWORD cAttribTableSize) PURE; -}; - - -#undef INTERFACE -#define INTERFACE ID3DXPMesh - -DECLARE_INTERFACE_(ID3DXPMesh, ID3DXBaseMesh) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // ID3DXBaseMesh - STDMETHOD(DrawSubset)(THIS_ DWORD AttribId) PURE; - STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE; - STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE; - STDMETHOD_(DWORD, GetFVF)(THIS) PURE; - STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 Declaration[MAX_FVF_DECL_SIZE]) PURE; - STDMETHOD_(DWORD, GetNumBytesPerVertex)(THIS) PURE; - STDMETHOD_(DWORD, GetOptions)(THIS) PURE; - STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* ppDevice) PURE; - STDMETHOD(CloneMeshFVF)(THIS_ DWORD Options, - DWORD FVF, LPDIRECT3DDEVICE9 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE; - STDMETHOD(CloneMesh)(THIS_ DWORD Options, - CONST D3DVERTEXELEMENT9 *pDeclaration, LPDIRECT3DDEVICE9 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE; - STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER9* ppVB) PURE; - STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER9* ppIB) PURE; - STDMETHOD(LockVertexBuffer)(THIS_ DWORD Flags, LPVOID *ppData) PURE; - STDMETHOD(UnlockVertexBuffer)(THIS) PURE; - STDMETHOD(LockIndexBuffer)(THIS_ DWORD Flags, LPVOID *ppData) PURE; - STDMETHOD(UnlockIndexBuffer)(THIS) PURE; - STDMETHOD(GetAttributeTable)( - THIS_ D3DXATTRIBUTERANGE *pAttribTable, DWORD* pAttribTableSize) PURE; - - STDMETHOD(ConvertPointRepsToAdjacency)(THIS_ CONST DWORD* pPRep, DWORD* pAdjacency) PURE; - STDMETHOD(ConvertAdjacencyToPointReps)(THIS_ CONST DWORD* pAdjacency, DWORD* pPRep) PURE; - STDMETHOD(GenerateAdjacency)(THIS_ FLOAT Epsilon, DWORD* pAdjacency) PURE; - - STDMETHOD(UpdateSemantics)(THIS_ D3DVERTEXELEMENT9 Declaration[MAX_FVF_DECL_SIZE]) PURE; - - // ID3DXPMesh - STDMETHOD(ClonePMeshFVF)(THIS_ DWORD Options, - DWORD FVF, LPDIRECT3DDEVICE9 pD3DDevice, LPD3DXPMESH* ppCloneMesh) PURE; - STDMETHOD(ClonePMesh)(THIS_ DWORD Options, - CONST D3DVERTEXELEMENT9 *pDeclaration, LPDIRECT3DDEVICE9 pD3DDevice, LPD3DXPMESH* ppCloneMesh) PURE; - STDMETHOD(SetNumFaces)(THIS_ DWORD Faces) PURE; - STDMETHOD(SetNumVertices)(THIS_ DWORD Vertices) PURE; - STDMETHOD_(DWORD, GetMaxFaces)(THIS) PURE; - STDMETHOD_(DWORD, GetMinFaces)(THIS) PURE; - STDMETHOD_(DWORD, GetMaxVertices)(THIS) PURE; - STDMETHOD_(DWORD, GetMinVertices)(THIS) PURE; - STDMETHOD(Save)(THIS_ IStream *pStream, CONST D3DXMATERIAL* pMaterials, CONST D3DXEFFECTINSTANCE* pEffectInstances, DWORD NumMaterials) PURE; - - STDMETHOD(Optimize)(THIS_ DWORD Flags, DWORD* pAdjacencyOut, - DWORD* pFaceRemap, LPD3DXBUFFER *ppVertexRemap, - LPD3DXMESH* ppOptMesh) PURE; - - STDMETHOD(OptimizeBaseLOD)(THIS_ DWORD Flags, DWORD* pFaceRemap) PURE; - STDMETHOD(TrimByFaces)(THIS_ DWORD NewFacesMin, DWORD NewFacesMax, DWORD *rgiFaceRemap, DWORD *rgiVertRemap) PURE; - STDMETHOD(TrimByVertices)(THIS_ DWORD NewVerticesMin, DWORD NewVerticesMax, DWORD *rgiFaceRemap, DWORD *rgiVertRemap) PURE; - - STDMETHOD(GetAdjacency)(THIS_ DWORD* pAdjacency) PURE; - - // Used to generate the immediate "ancestor" for each vertex when it is removed by a vsplit. Allows generation of geomorphs - // Vertex buffer must be equal to or greater than the maximum number of vertices in the pmesh - STDMETHOD(GenerateVertexHistory)(THIS_ DWORD* pVertexHistory) PURE; -}; - - -#undef INTERFACE -#define INTERFACE ID3DXSPMesh - -DECLARE_INTERFACE_(ID3DXSPMesh, IUnknown) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // ID3DXSPMesh - STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE; - STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE; - STDMETHOD_(DWORD, GetFVF)(THIS) PURE; - STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 Declaration[MAX_FVF_DECL_SIZE]) PURE; - STDMETHOD_(DWORD, GetOptions)(THIS) PURE; - STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* ppDevice) PURE; - STDMETHOD(CloneMeshFVF)(THIS_ DWORD Options, - DWORD FVF, LPDIRECT3DDEVICE9 pD3DDevice, DWORD *pAdjacencyOut, DWORD *pVertexRemapOut, LPD3DXMESH* ppCloneMesh) PURE; - STDMETHOD(CloneMesh)(THIS_ DWORD Options, - CONST D3DVERTEXELEMENT9 *pDeclaration, LPDIRECT3DDEVICE9 pD3DDevice, DWORD *pAdjacencyOut, DWORD *pVertexRemapOut, LPD3DXMESH* ppCloneMesh) PURE; - STDMETHOD(ClonePMeshFVF)(THIS_ DWORD Options, - DWORD FVF, LPDIRECT3DDEVICE9 pD3DDevice, DWORD *pVertexRemapOut, FLOAT *pErrorsByFace, LPD3DXPMESH* ppCloneMesh) PURE; - STDMETHOD(ClonePMesh)(THIS_ DWORD Options, - CONST D3DVERTEXELEMENT9 *pDeclaration, LPDIRECT3DDEVICE9 pD3DDevice, DWORD *pVertexRemapOut, FLOAT *pErrorsbyFace, LPD3DXPMESH* ppCloneMesh) PURE; - STDMETHOD(ReduceFaces)(THIS_ DWORD Faces) PURE; - STDMETHOD(ReduceVertices)(THIS_ DWORD Vertices) PURE; - STDMETHOD_(DWORD, GetMaxFaces)(THIS) PURE; - STDMETHOD_(DWORD, GetMaxVertices)(THIS) PURE; - STDMETHOD(GetVertexAttributeWeights)(THIS_ LPD3DXATTRIBUTEWEIGHTS pVertexAttributeWeights) PURE; - STDMETHOD(GetVertexWeights)(THIS_ FLOAT *pVertexWeights) PURE; -}; - -#define UNUSED16 (0xffff) -#define UNUSED32 (0xffffffff) - -// ID3DXMesh::Optimize options - upper byte only, lower 3 bytes used from _D3DXMESH option flags -enum _D3DXMESHOPT { - D3DXMESHOPT_COMPACT = 0x01000000, - D3DXMESHOPT_ATTRSORT = 0x02000000, - D3DXMESHOPT_VERTEXCACHE = 0x04000000, - D3DXMESHOPT_STRIPREORDER = 0x08000000, - D3DXMESHOPT_IGNOREVERTS = 0x10000000, // optimize faces only, don't touch vertices - D3DXMESHOPT_DONOTSPLIT = 0x20000000, // do not split vertices shared between attribute groups when attribute sorting - D3DXMESHOPT_DEVICEINDEPENDENT = 0x00400000, // Only affects VCache. uses a static known good cache size for all cards - - // D3DXMESHOPT_SHAREVB has been removed, please use D3DXMESH_VB_SHARE instead - -}; - -// Subset of the mesh that has the same attribute and bone combination. -// This subset can be rendered in a single draw call -typedef struct _D3DXBONECOMBINATION -{ - DWORD AttribId; - DWORD FaceStart; - DWORD FaceCount; - DWORD VertexStart; - DWORD VertexCount; - DWORD* BoneId; -} D3DXBONECOMBINATION, *LPD3DXBONECOMBINATION; - -// The following types of patch combinations are supported: -// Patch type Basis Degree -// Rect Bezier 2,3,5 -// Rect B-Spline 2,3,5 -// Rect Catmull-Rom 3 -// Tri Bezier 2,3,5 -// N-Patch N/A 3 - -typedef struct _D3DXPATCHINFO -{ - D3DXPATCHMESHTYPE PatchType; - D3DDEGREETYPE Degree; - D3DBASISTYPE Basis; -} D3DXPATCHINFO, *LPD3DXPATCHINFO; - -#undef INTERFACE -#define INTERFACE ID3DXPatchMesh - -DECLARE_INTERFACE_(ID3DXPatchMesh, IUnknown) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // ID3DXPatchMesh - - // Return creation parameters - STDMETHOD_(DWORD, GetNumPatches)(THIS) PURE; - STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE; - STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 Declaration[MAX_FVF_DECL_SIZE]) PURE; - STDMETHOD_(DWORD, GetControlVerticesPerPatch)(THIS) PURE; - STDMETHOD_(DWORD, GetOptions)(THIS) PURE; - STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9 *ppDevice) PURE; - STDMETHOD(GetPatchInfo)(THIS_ LPD3DXPATCHINFO PatchInfo) PURE; - - // Control mesh access - STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER9* ppVB) PURE; - STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER9* ppIB) PURE; - STDMETHOD(LockVertexBuffer)(THIS_ DWORD flags, LPVOID *ppData) PURE; - STDMETHOD(UnlockVertexBuffer)(THIS) PURE; - STDMETHOD(LockIndexBuffer)(THIS_ DWORD flags, LPVOID *ppData) PURE; - STDMETHOD(UnlockIndexBuffer)(THIS) PURE; - STDMETHOD(LockAttributeBuffer)(THIS_ DWORD flags, DWORD** ppData) PURE; - STDMETHOD(UnlockAttributeBuffer)(THIS) PURE; - - // This function returns the size of the tessellated mesh given a tessellation level. - // This assumes uniform tessellation. For adaptive tessellation the Adaptive parameter must - // be set to TRUE and TessellationLevel should be the max tessellation. - // This will result in the max mesh size necessary for adaptive tessellation. - STDMETHOD(GetTessSize)(THIS_ FLOAT fTessLevel,DWORD Adaptive, DWORD *NumTriangles,DWORD *NumVertices) PURE; - - //GenerateAdjacency determines which patches are adjacent with provided tolerance - //this information is used internally to optimize tessellation - STDMETHOD(GenerateAdjacency)(THIS_ FLOAT Tolerance) PURE; - - //CloneMesh Creates a new patchmesh with the specified decl, and converts the vertex buffer - //to the new decl. Entries in the new decl which are new are set to 0. If the current mesh - //has adjacency, the new mesh will also have adjacency - STDMETHOD(CloneMesh)(THIS_ DWORD Options, CONST D3DVERTEXELEMENT9 *pDecl, LPD3DXPATCHMESH *pMesh) PURE; - - // Optimizes the patchmesh for efficient tessellation. This function is designed - // to perform one time optimization for patch meshes that need to be tessellated - // repeatedly by calling the Tessellate() method. The optimization performed is - // independent of the actual tessellation level used. - // Currently Flags is unused. - // If vertices are changed, Optimize must be called again - STDMETHOD(Optimize)(THIS_ DWORD flags) PURE; - - //gets and sets displacement parameters - //displacement maps can only be 2D textures MIP-MAPPING is ignored for non adapative tessellation - STDMETHOD(SetDisplaceParam)(THIS_ LPDIRECT3DBASETEXTURE9 Texture, - D3DTEXTUREFILTERTYPE MinFilter, - D3DTEXTUREFILTERTYPE MagFilter, - D3DTEXTUREFILTERTYPE MipFilter, - D3DTEXTUREADDRESS Wrap, - DWORD dwLODBias) PURE; - - STDMETHOD(GetDisplaceParam)(THIS_ LPDIRECT3DBASETEXTURE9 *Texture, - D3DTEXTUREFILTERTYPE *MinFilter, - D3DTEXTUREFILTERTYPE *MagFilter, - D3DTEXTUREFILTERTYPE *MipFilter, - D3DTEXTUREADDRESS *Wrap, - DWORD *dwLODBias) PURE; - - // Performs the uniform tessellation based on the tessellation level. - // This function will perform more efficiently if the patch mesh has been optimized using the Optimize() call. - STDMETHOD(Tessellate)(THIS_ FLOAT fTessLevel,LPD3DXMESH pMesh) PURE; - - // Performs adaptive tessellation based on the Z based adaptive tessellation criterion. - // pTrans specifies a 4D vector that is dotted with the vertices to get the per vertex - // adaptive tessellation amount. Each edge is tessellated to the average of the criterion - // at the 2 vertices it connects. - // MaxTessLevel specifies the upper limit for adaptive tesselation. - // This function will perform more efficiently if the patch mesh has been optimized using the Optimize() call. - STDMETHOD(TessellateAdaptive)(THIS_ - CONST D3DXVECTOR4 *pTrans, - DWORD dwMaxTessLevel, - DWORD dwMinTessLevel, - LPD3DXMESH pMesh) PURE; - -}; - -#undef INTERFACE -#define INTERFACE ID3DXSkinInfo - -DECLARE_INTERFACE_(ID3DXSkinInfo, IUnknown) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // Specify the which vertices do each bones influence and by how much - STDMETHOD(SetBoneInfluence)(THIS_ DWORD bone, DWORD numInfluences, CONST DWORD* vertices, CONST FLOAT* weights) PURE; - STDMETHOD(SetBoneVertexInfluence)(THIS_ DWORD boneNum, DWORD influenceNum, float weight) PURE; - STDMETHOD_(DWORD, GetNumBoneInfluences)(THIS_ DWORD bone) PURE; - STDMETHOD(GetBoneInfluence)(THIS_ DWORD bone, DWORD* vertices, FLOAT* weights) PURE; - STDMETHOD(GetBoneVertexInfluence)(THIS_ DWORD boneNum, DWORD influenceNum, float *pWeight, DWORD *pVertexNum) PURE; - STDMETHOD(GetMaxVertexInfluences)(THIS_ DWORD* maxVertexInfluences) PURE; - STDMETHOD_(DWORD, GetNumBones)(THIS) PURE; - STDMETHOD(FindBoneVertexInfluenceIndex)(THIS_ DWORD boneNum, DWORD vertexNum, DWORD *pInfluenceIndex) PURE; - - // This gets the max face influences based on a triangle mesh with the specified index buffer - STDMETHOD(GetMaxFaceInfluences)(THIS_ LPDIRECT3DINDEXBUFFER9 pIB, DWORD NumFaces, DWORD* maxFaceInfluences) PURE; - - // Set min bone influence. Bone influences that are smaller than this are ignored - STDMETHOD(SetMinBoneInfluence)(THIS_ FLOAT MinInfl) PURE; - // Get min bone influence. - STDMETHOD_(FLOAT, GetMinBoneInfluence)(THIS) PURE; - - // Bone names are returned by D3DXLoadSkinMeshFromXof. They are not used by any other method of this object - STDMETHOD(SetBoneName)(THIS_ DWORD Bone, LPCSTR pName) PURE; // pName is copied to an internal string buffer - STDMETHOD_(LPCSTR, GetBoneName)(THIS_ DWORD Bone) PURE; // A pointer to an internal string buffer is returned. Do not free this. - - // Bone offset matrices are returned by D3DXLoadSkinMeshFromXof. They are not used by any other method of this object - STDMETHOD(SetBoneOffsetMatrix)(THIS_ DWORD Bone, CONST D3DXMATRIX *pBoneTransform) PURE; // pBoneTransform is copied to an internal buffer - STDMETHOD_(LPD3DXMATRIX, GetBoneOffsetMatrix)(THIS_ DWORD Bone) PURE; // A pointer to an internal matrix is returned. Do not free this. - - // Clone a skin info object - STDMETHOD(Clone)(THIS_ LPD3DXSKININFO* ppSkinInfo) PURE; - - // Update bone influence information to match vertices after they are reordered. This should be called - // if the target vertex buffer has been reordered externally. - STDMETHOD(Remap)(THIS_ DWORD NumVertices, DWORD* pVertexRemap) PURE; - - // These methods enable the modification of the vertex layout of the vertices that will be skinned - STDMETHOD(SetFVF)(THIS_ DWORD FVF) PURE; - STDMETHOD(SetDeclaration)(THIS_ CONST D3DVERTEXELEMENT9 *pDeclaration) PURE; - STDMETHOD_(DWORD, GetFVF)(THIS) PURE; - STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 Declaration[MAX_FVF_DECL_SIZE]) PURE; - - // Apply SW skinning based on current pose matrices to the target vertices. - STDMETHOD(UpdateSkinnedMesh)(THIS_ - CONST D3DXMATRIX* pBoneTransforms, - CONST D3DXMATRIX* pBoneInvTransposeTransforms, - LPCVOID pVerticesSrc, - PVOID pVerticesDst) PURE; - - // Takes a mesh and returns a new mesh with per vertex blend weights and a bone combination - // table that describes which bones affect which subsets of the mesh - STDMETHOD(ConvertToBlendedMesh)(THIS_ - LPD3DXMESH pMesh, - DWORD Options, - CONST DWORD *pAdjacencyIn, - LPDWORD pAdjacencyOut, - DWORD* pFaceRemap, - LPD3DXBUFFER *ppVertexRemap, - DWORD* pMaxFaceInfl, - DWORD* pNumBoneCombinations, - LPD3DXBUFFER* ppBoneCombinationTable, - LPD3DXMESH* ppMesh) PURE; - - // Takes a mesh and returns a new mesh with per vertex blend weights and indices - // and a bone combination table that describes which bones palettes affect which subsets of the mesh - STDMETHOD(ConvertToIndexedBlendedMesh)(THIS_ - LPD3DXMESH pMesh, - DWORD Options, - DWORD paletteSize, - CONST DWORD *pAdjacencyIn, - LPDWORD pAdjacencyOut, - DWORD* pFaceRemap, - LPD3DXBUFFER *ppVertexRemap, - DWORD* pMaxVertexInfl, - DWORD* pNumBoneCombinations, - LPD3DXBUFFER* ppBoneCombinationTable, - LPD3DXMESH* ppMesh) PURE; -}; - -#ifdef __cplusplus -extern "C" { -#endif //__cplusplus - - -HRESULT WINAPI - D3DXCreateMesh( - DWORD NumFaces, - DWORD NumVertices, - DWORD Options, - CONST D3DVERTEXELEMENT9 *pDeclaration, - LPDIRECT3DDEVICE9 pD3DDevice, - LPD3DXMESH* ppMesh); - -HRESULT WINAPI - D3DXCreateMeshFVF( - DWORD NumFaces, - DWORD NumVertices, - DWORD Options, - DWORD FVF, - LPDIRECT3DDEVICE9 pD3DDevice, - LPD3DXMESH* ppMesh); - -HRESULT WINAPI - D3DXCreateSPMesh( - LPD3DXMESH pMesh, - CONST DWORD* pAdjacency, - CONST D3DXATTRIBUTEWEIGHTS *pVertexAttributeWeights, - CONST FLOAT *pVertexWeights, - LPD3DXSPMESH* ppSMesh); - -// clean a mesh up for simplification, try to make manifold -HRESULT WINAPI - D3DXCleanMesh( - D3DXCLEANTYPE CleanType, - LPD3DXMESH pMeshIn, - CONST DWORD* pAdjacencyIn, - LPD3DXMESH* ppMeshOut, - DWORD* pAdjacencyOut, - LPD3DXBUFFER* ppErrorsAndWarnings); - -HRESULT WINAPI - D3DXValidMesh( - LPD3DXMESH pMeshIn, - CONST DWORD* pAdjacency, - LPD3DXBUFFER* ppErrorsAndWarnings); - -HRESULT WINAPI - D3DXGeneratePMesh( - LPD3DXMESH pMesh, - CONST DWORD* pAdjacency, - CONST D3DXATTRIBUTEWEIGHTS *pVertexAttributeWeights, - CONST FLOAT *pVertexWeights, - DWORD MinValue, - DWORD Options, - LPD3DXPMESH* ppPMesh); - -HRESULT WINAPI - D3DXSimplifyMesh( - LPD3DXMESH pMesh, - CONST DWORD* pAdjacency, - CONST D3DXATTRIBUTEWEIGHTS *pVertexAttributeWeights, - CONST FLOAT *pVertexWeights, - DWORD MinValue, - DWORD Options, - LPD3DXMESH* ppMesh); - -HRESULT WINAPI - D3DXComputeBoundingSphere( - CONST D3DXVECTOR3 *pFirstPosition, // pointer to first position - DWORD NumVertices, - DWORD dwStride, // count in bytes to subsequent position vectors - D3DXVECTOR3 *pCenter, - FLOAT *pRadius); - -HRESULT WINAPI - D3DXComputeBoundingBox( - CONST D3DXVECTOR3 *pFirstPosition, // pointer to first position - DWORD NumVertices, - DWORD dwStride, // count in bytes to subsequent position vectors - D3DXVECTOR3 *pMin, - D3DXVECTOR3 *pMax); - -HRESULT WINAPI - D3DXComputeNormals( - LPD3DXBASEMESH pMesh, - CONST DWORD *pAdjacency); - -HRESULT WINAPI - D3DXCreateBuffer( - DWORD NumBytes, - LPD3DXBUFFER *ppBuffer); - - -HRESULT WINAPI - D3DXLoadMeshFromXA( - LPCSTR pFilename, - DWORD Options, - LPDIRECT3DDEVICE9 pD3DDevice, - LPD3DXBUFFER *ppAdjacency, - LPD3DXBUFFER *ppMaterials, - LPD3DXBUFFER *ppEffectInstances, - DWORD *pNumMaterials, - LPD3DXMESH *ppMesh); - -HRESULT WINAPI - D3DXLoadMeshFromXW( - LPCWSTR pFilename, - DWORD Options, - LPDIRECT3DDEVICE9 pD3DDevice, - LPD3DXBUFFER *ppAdjacency, - LPD3DXBUFFER *ppMaterials, - LPD3DXBUFFER *ppEffectInstances, - DWORD *pNumMaterials, - LPD3DXMESH *ppMesh); - -#ifdef UNICODE -#define D3DXLoadMeshFromX D3DXLoadMeshFromXW -#else -#define D3DXLoadMeshFromX D3DXLoadMeshFromXA -#endif - -HRESULT WINAPI - D3DXLoadMeshFromXInMemory( - LPCVOID Memory, - DWORD SizeOfMemory, - DWORD Options, - LPDIRECT3DDEVICE9 pD3DDevice, - LPD3DXBUFFER *ppAdjacency, - LPD3DXBUFFER *ppMaterials, - LPD3DXBUFFER *ppEffectInstances, - DWORD *pNumMaterials, - LPD3DXMESH *ppMesh); - -HRESULT WINAPI - D3DXLoadMeshFromXResource( - HMODULE Module, - LPCSTR Name, - LPCSTR Type, - DWORD Options, - LPDIRECT3DDEVICE9 pD3DDevice, - LPD3DXBUFFER *ppAdjacency, - LPD3DXBUFFER *ppMaterials, - LPD3DXBUFFER *ppEffectInstances, - DWORD *pNumMaterials, - LPD3DXMESH *ppMesh); - -HRESULT WINAPI - D3DXSaveMeshToXA( - LPCSTR pFilename, - LPD3DXMESH pMesh, - CONST DWORD* pAdjacency, - CONST D3DXMATERIAL* pMaterials, - CONST D3DXEFFECTINSTANCE* pEffectInstances, - DWORD NumMaterials, - DWORD Format - ); - -HRESULT WINAPI - D3DXSaveMeshToXW( - LPCWSTR pFilename, - LPD3DXMESH pMesh, - CONST DWORD* pAdjacency, - CONST D3DXMATERIAL* pMaterials, - CONST D3DXEFFECTINSTANCE* pEffectInstances, - DWORD NumMaterials, - DWORD Format - ); - -#ifdef UNICODE -#define D3DXSaveMeshToX D3DXSaveMeshToXW -#else -#define D3DXSaveMeshToX D3DXSaveMeshToXA -#endif - - -HRESULT WINAPI - D3DXCreatePMeshFromStream( - IStream *pStream, - DWORD Options, - LPDIRECT3DDEVICE9 pD3DDevice, - LPD3DXBUFFER *ppMaterials, - LPD3DXBUFFER *ppEffectInstances, - DWORD* pNumMaterials, - LPD3DXPMESH *ppPMesh); - -// Creates a skin info object based on the number of vertices, number of bones, and a declaration describing the vertex layout of the target vertices -// The bone names and initial bone transforms are not filled in the skin info object by this method. -HRESULT WINAPI - D3DXCreateSkinInfo( - DWORD NumVertices, - CONST D3DVERTEXELEMENT9 *pDeclaration, - DWORD NumBones, - LPD3DXSKININFO* ppSkinInfo); - -// Creates a skin info object based on the number of vertices, number of bones, and a FVF describing the vertex layout of the target vertices -// The bone names and initial bone transforms are not filled in the skin info object by this method. -HRESULT WINAPI - D3DXCreateSkinInfoFVF( - DWORD NumVertices, - DWORD FVF, - DWORD NumBones, - LPD3DXSKININFO* ppSkinInfo); - -#ifdef __cplusplus -} - -extern "C" { -#endif //__cplusplus - -HRESULT WINAPI - D3DXLoadMeshFromXof( - LPD3DXFILEDATA pxofMesh, - DWORD Options, - LPDIRECT3DDEVICE9 pD3DDevice, - LPD3DXBUFFER *ppAdjacency, - LPD3DXBUFFER *ppMaterials, - LPD3DXBUFFER *ppEffectInstances, - DWORD *pNumMaterials, - LPD3DXMESH *ppMesh); - -// This similar to D3DXLoadMeshFromXof, except also returns skinning info if present in the file -// If skinning info is not present, ppSkinInfo will be NULL -HRESULT WINAPI - D3DXLoadSkinMeshFromXof( - LPD3DXFILEDATA pxofMesh, - DWORD Options, - LPDIRECT3DDEVICE9 pD3DDevice, - LPD3DXBUFFER* ppAdjacency, - LPD3DXBUFFER* ppMaterials, - LPD3DXBUFFER *ppEffectInstances, - DWORD *pMatOut, - LPD3DXSKININFO* ppSkinInfo, - LPD3DXMESH* ppMesh); - - -// The inverse of D3DXConvertTo{Indexed}BlendedMesh() functions. It figures out the skinning info from -// the mesh and the bone combination table and populates a skin info object with that data. The bone -// names and initial bone transforms are not filled in the skin info object by this method. This works -// with either a non-indexed or indexed blended mesh. It examines the FVF or declarator of the mesh to -// determine what type it is. -HRESULT WINAPI - D3DXCreateSkinInfoFromBlendedMesh( - LPD3DXBASEMESH pMesh, - DWORD NumBones, - CONST D3DXBONECOMBINATION *pBoneCombinationTable, - LPD3DXSKININFO* ppSkinInfo); - -HRESULT WINAPI - D3DXTessellateNPatches( - LPD3DXMESH pMeshIn, - CONST DWORD* pAdjacencyIn, - FLOAT NumSegs, - BOOL QuadraticInterpNormals, // if false use linear intrep for normals, if true use quadratic - LPD3DXMESH *ppMeshOut, - LPD3DXBUFFER *ppAdjacencyOut); - - -//generates implied outputdecl from input decl -//the decl generated from this should be used to generate the output decl for -//the tessellator subroutines. - -HRESULT WINAPI - D3DXGenerateOutputDecl( - D3DVERTEXELEMENT9 *pOutput, - CONST D3DVERTEXELEMENT9 *pInput); - -//loads patches from an XFileData -//since an X file can have up to 6 different patch meshes in it, -//returns them in an array - pNumPatches will contain the number of -//meshes in the actual file. -HRESULT WINAPI - D3DXLoadPatchMeshFromXof( - LPD3DXFILEDATA pXofObjMesh, - DWORD Options, - LPDIRECT3DDEVICE9 pD3DDevice, - LPD3DXBUFFER *ppMaterials, - LPD3DXBUFFER *ppEffectInstances, - PDWORD pNumMaterials, - LPD3DXPATCHMESH *ppMesh); - -//computes the size a single rect patch. -HRESULT WINAPI - D3DXRectPatchSize( - CONST FLOAT *pfNumSegs, //segments for each edge (4) - DWORD *pdwTriangles, //output number of triangles - DWORD *pdwVertices); //output number of vertices - -//computes the size of a single triangle patch -HRESULT WINAPI - D3DXTriPatchSize( - CONST FLOAT *pfNumSegs, //segments for each edge (3) - DWORD *pdwTriangles, //output number of triangles - DWORD *pdwVertices); //output number of vertices - - -//tessellates a patch into a created mesh -//similar to D3D RT patch -HRESULT WINAPI - D3DXTessellateRectPatch( - LPDIRECT3DVERTEXBUFFER9 pVB, - CONST FLOAT *pNumSegs, - CONST D3DVERTEXELEMENT9 *pdwInDecl, - CONST D3DRECTPATCH_INFO *pRectPatchInfo, - LPD3DXMESH pMesh); - - -HRESULT WINAPI - D3DXTessellateTriPatch( - LPDIRECT3DVERTEXBUFFER9 pVB, - CONST FLOAT *pNumSegs, - CONST D3DVERTEXELEMENT9 *pInDecl, - CONST D3DTRIPATCH_INFO *pTriPatchInfo, - LPD3DXMESH pMesh); - - - -//creates an NPatch PatchMesh from a D3DXMESH -HRESULT WINAPI - D3DXCreateNPatchMesh( - LPD3DXMESH pMeshSysMem, - LPD3DXPATCHMESH *pPatchMesh); - - -//creates a patch mesh -HRESULT WINAPI - D3DXCreatePatchMesh( - CONST D3DXPATCHINFO *pInfo, //patch type - DWORD dwNumPatches, //number of patches - DWORD dwNumVertices, //number of control vertices - DWORD dwOptions, //options - CONST D3DVERTEXELEMENT9 *pDecl, //format of control vertices - LPDIRECT3DDEVICE9 pD3DDevice, - LPD3DXPATCHMESH *pPatchMesh); - - -//returns the number of degenerates in a patch mesh - -//text output put in string. -HRESULT WINAPI - D3DXValidPatchMesh(LPD3DXPATCHMESH pMesh, - DWORD *dwcDegenerateVertices, - DWORD *dwcDegeneratePatches, - LPD3DXBUFFER *ppErrorsAndWarnings); - -UINT WINAPI - D3DXGetFVFVertexSize(DWORD FVF); - -UINT WINAPI - D3DXGetDeclVertexSize(CONST D3DVERTEXELEMENT9 *pDecl,DWORD Stream); - -UINT WINAPI - D3DXGetDeclLength(CONST D3DVERTEXELEMENT9 *pDecl); - -HRESULT WINAPI - D3DXDeclaratorFromFVF( - DWORD FVF, - D3DVERTEXELEMENT9 pDeclarator[MAX_FVF_DECL_SIZE]); - -HRESULT WINAPI - D3DXFVFFromDeclarator( - CONST D3DVERTEXELEMENT9 *pDeclarator, - DWORD *pFVF); - -HRESULT WINAPI - D3DXWeldVertices( - LPD3DXMESH pMesh, - DWORD Flags, - CONST D3DXWELDEPSILONS *pEpsilons, - CONST DWORD *pAdjacencyIn, - DWORD *pAdjacencyOut, - DWORD *pFaceRemap, - LPD3DXBUFFER *ppVertexRemap); - -typedef struct _D3DXINTERSECTINFO -{ - DWORD FaceIndex; // index of face intersected - FLOAT U; // Barycentric Hit Coordinates - FLOAT V; // Barycentric Hit Coordinates - FLOAT Dist; // Ray-Intersection Parameter Distance -} D3DXINTERSECTINFO, *LPD3DXINTERSECTINFO; - - -HRESULT WINAPI - D3DXIntersect( - LPD3DXBASEMESH pMesh, - CONST D3DXVECTOR3 *pRayPos, - CONST D3DXVECTOR3 *pRayDir, - BOOL *pHit, // True if any faces were intersected - DWORD *pFaceIndex, // index of closest face intersected - FLOAT *pU, // Barycentric Hit Coordinates - FLOAT *pV, // Barycentric Hit Coordinates - FLOAT *pDist, // Ray-Intersection Parameter Distance - LPD3DXBUFFER *ppAllHits, // Array of D3DXINTERSECTINFOs for all hits (not just closest) - DWORD *pCountOfHits); // Number of entries in AllHits array - -HRESULT WINAPI - D3DXIntersectSubset( - LPD3DXBASEMESH pMesh, - DWORD AttribId, - CONST D3DXVECTOR3 *pRayPos, - CONST D3DXVECTOR3 *pRayDir, - BOOL *pHit, // True if any faces were intersected - DWORD *pFaceIndex, // index of closest face intersected - FLOAT *pU, // Barycentric Hit Coordinates - FLOAT *pV, // Barycentric Hit Coordinates - FLOAT *pDist, // Ray-Intersection Parameter Distance - LPD3DXBUFFER *ppAllHits, // Array of D3DXINTERSECTINFOs for all hits (not just closest) - DWORD *pCountOfHits); // Number of entries in AllHits array - - -HRESULT WINAPI D3DXSplitMesh - ( - LPD3DXMESH pMeshIn, - CONST DWORD *pAdjacencyIn, - CONST DWORD MaxSize, - CONST DWORD Options, - DWORD *pMeshesOut, - LPD3DXBUFFER *ppMeshArrayOut, - LPD3DXBUFFER *ppAdjacencyArrayOut, - LPD3DXBUFFER *ppFaceRemapArrayOut, - LPD3DXBUFFER *ppVertRemapArrayOut - ); - -BOOL WINAPI D3DXIntersectTri -( - CONST D3DXVECTOR3 *p0, // Triangle vertex 0 position - CONST D3DXVECTOR3 *p1, // Triangle vertex 1 position - CONST D3DXVECTOR3 *p2, // Triangle vertex 2 position - CONST D3DXVECTOR3 *pRayPos, // Ray origin - CONST D3DXVECTOR3 *pRayDir, // Ray direction - FLOAT *pU, // Barycentric Hit Coordinates - FLOAT *pV, // Barycentric Hit Coordinates - FLOAT *pDist); // Ray-Intersection Parameter Distance - -BOOL WINAPI - D3DXSphereBoundProbe( - CONST D3DXVECTOR3 *pCenter, - FLOAT Radius, - CONST D3DXVECTOR3 *pRayPosition, - CONST D3DXVECTOR3 *pRayDirection); - -BOOL WINAPI - D3DXBoxBoundProbe( - CONST D3DXVECTOR3 *pMin, - CONST D3DXVECTOR3 *pMax, - CONST D3DXVECTOR3 *pRayPosition, - CONST D3DXVECTOR3 *pRayDirection); - - -HRESULT WINAPI D3DXComputeTangentFrame(ID3DXMesh *pMesh, - DWORD dwOptions); - -HRESULT WINAPI D3DXComputeTangentFrameEx(ID3DXMesh *pMesh, - DWORD dwTextureInSemantic, - DWORD dwTextureInIndex, - DWORD dwUPartialOutSemantic, - DWORD dwUPartialOutIndex, - DWORD dwVPartialOutSemantic, - DWORD dwVPartialOutIndex, - DWORD dwNormalOutSemantic, - DWORD dwNormalOutIndex, - DWORD dwOptions, - CONST DWORD *pdwAdjacency, - FLOAT fPartialEdgeThreshold, - FLOAT fSingularPointThreshold, - FLOAT fNormalEdgeThreshold, - ID3DXMesh **ppMeshOut, - ID3DXBuffer **ppVertexMapping); - - -//D3DXComputeTangent -// -//Computes the Tangent vectors for the TexStage texture coordinates -//and places the results in the TANGENT[TangentIndex] specified in the meshes' DECL -//puts the binorm in BINORM[BinormIndex] also specified in the decl. -// -//If neither the binorm or the tangnet are in the meshes declaration, -//the function will fail. -// -//If a tangent or Binorm field is in the Decl, but the user does not -//wish D3DXComputeTangent to replace them, then D3DX_DEFAULT specified -//in the TangentIndex or BinormIndex will cause it to ignore the specified -//semantic. -// -//Wrap should be specified if the texture coordinates wrap. - -HRESULT WINAPI D3DXComputeTangent(LPD3DXMESH Mesh, - DWORD TexStage, - DWORD TangentIndex, - DWORD BinormIndex, - DWORD Wrap, - CONST DWORD *pAdjacency); - -//============================================================================ -// -// UVAtlas apis -// -//============================================================================ -typedef HRESULT (WINAPI *LPD3DXUVATLASCB)(FLOAT fPercentDone, LPVOID lpUserContext); - -// This function creates atlases for meshes. There are two modes of operation, -// either based on the number of charts, or the maximum allowed stretch. If the -// maximum allowed stretch is 0, then each triangle will likely be in its own -// chart. - -// -// The parameters are as follows: -// pMesh - Input mesh to calculate an atlas for. This must have a position -// channel and at least a 2-d texture channel. -// uMaxChartNumber - The maximum number of charts required for the atlas. -// If this is 0, it will be parameterized based solely on -// stretch. -// fMaxStretch - The maximum amount of stretch, if 0, no stretching is allowed, -// if 1, then any amount of stretching is allowed. -// uWidth - The width of the texture the atlas will be used on. -// uHeight - The height of the texture the atlas will be used on. -// fGutter - The minimum distance, in texels between two charts on the atlas. -// this gets scaled by the width, so if fGutter is 2.5, and it is -// used on a 512x512 texture, then the minimum distance will be -// 2.5 / 512 in u-v space. -// dwTextureIndex - Specifies which texture coordinate to write to in the -// output mesh (which is cloned from the input mesh). Useful -// if your vertex has multiple texture coordinates. -// pdwAdjacency - a pointer to an array with 3 DWORDs per face, indicating -// which triangles are adjacent to each other. -// pdwFalseEdgeAdjacency - a pointer to an array with 3 DWORDS per face, indicating -// at each face, whether an edge is a false edge or not (using -// the same ordering as the adjacency data structure). If this -// is NULL, then it is assumed that there are no false edges. If -// not NULL, then a non-false edge is indicated by -1 and a false -// edge is indicated by any other value (it is not required, but -// it may be useful for the caller to use the original adjacency -// value). This allows you to parameterize a mesh of quads, and -// the edges down the middle of each quad will not be cut when -// parameterizing the mesh. -// pfIMTArray - a pointer to an array with 3 FLOATs per face, describing the -// integrated metric tensor for that face. This lets you control -// the way this triangle may be stretched in the atlas. The IMT -// passed in will be 3 floats (a,b,c) and specify a symmetric -// matrix (a b) that, given a vector (s,t), specifies the -// (b c) -// distance between a vector v1 and a vector v2 = v1 + (s,t) as -// sqrt((s, t) * M * (s, t)^T). -// In other words, this lets one specify the magnitude of the -// stretch in an arbitrary direction in u-v space. For example -// if a = b = c = 1, then this scales the vector (1,1) by 2, and -// the vector (1,-1) by 0. Note that this is multiplying the edge -// length by the square of the matrix, so if you want the face to -// stretch to twice its -// size with no shearing, the IMT value should be (2, 0, 2), which -// is just the identity matrix times 2. -// Note that this assumes you have an orientation for the triangle -// in some 2-D space. For D3DXUVAtlas, this space is created by -// letting S be the direction from the first to the second -// vertex, and T be the cross product between the normal and S. -// -// pStatusCallback - Since the atlas creation process can be very CPU intensive, -// this allows the programmer to specify a function to be called -// periodically, similarly to how it is done in the PRT simulation -// engine. -// fCallbackFrequency - This lets you specify how often the callback will be -// called. A decent default should be 0.0001f. -// pUserContext - a void pointer to be passed back to the callback function -// dwOptions - A combination of flags in the D3DXUVATLAS enum -// ppMeshOut - A pointer to a location to store a pointer for the newly created -// mesh. -// ppFacePartitioning - A pointer to a location to store a pointer for an array, -// one DWORD per face, giving the final partitioning -// created by the atlasing algorithm. -// ppVertexRemapArray - A pointer to a location to store a pointer for an array, -// one DWORD per vertex, giving the vertex it was copied -// from, if any vertices needed to be split. -// pfMaxStretchOut - A location to store the maximum stretch resulting from the -// atlasing algorithm. -// puNumChartsOut - A location to store the number of charts created, or if the -// maximum number of charts was too low, this gives the minimum -// number of charts needed to create an atlas. - -HRESULT WINAPI D3DXUVAtlasCreate(LPD3DXMESH pMesh, - UINT uMaxChartNumber, - FLOAT fMaxStretch, - UINT uWidth, - UINT uHeight, - FLOAT fGutter, - DWORD dwTextureIndex, - CONST DWORD *pdwAdjacency, - CONST DWORD *pdwFalseEdgeAdjacency, - CONST FLOAT *pfIMTArray, - LPD3DXUVATLASCB pStatusCallback, - FLOAT fCallbackFrequency, - LPVOID pUserContext, - DWORD dwOptions, - LPD3DXMESH *ppMeshOut, - LPD3DXBUFFER *ppFacePartitioning, - LPD3DXBUFFER *ppVertexRemapArray, - FLOAT *pfMaxStretchOut, - UINT *puNumChartsOut); - -// This has the same exact arguments as Create, except that it does not perform the -// final packing step. This method allows one to get a partitioning out, and possibly -// modify it before sending it to be repacked. Note that if you change the -// partitioning, you'll also need to calculate new texture coordinates for any faces -// that have switched charts. -// -// The partition result adjacency output parameter is meant to be passed to the -// UVAtlasPack function, this adjacency cuts edges that are between adjacent -// charts, and also can include cuts inside of a chart in order to make it -// equivalent to a disc. For example: -// -// _______ -// | ___ | -// | |_| | -// |_____| -// -// In order to make this equivalent to a disc, we would need to add a cut, and it -// Would end up looking like: -// _______ -// | ___ | -// | |_|_| -// |_____| -// -// The resulting partition adjacency parameter cannot be NULL, because it is -// required for the packing step. - - - -HRESULT WINAPI D3DXUVAtlasPartition(LPD3DXMESH pMesh, - UINT uMaxChartNumber, - FLOAT fMaxStretch, - DWORD dwTextureIndex, - CONST DWORD *pdwAdjacency, - CONST DWORD *pdwFalseEdgeAdjacency, - CONST FLOAT *pfIMTArray, - LPD3DXUVATLASCB pStatusCallback, - FLOAT fCallbackFrequency, - LPVOID pUserContext, - DWORD dwOptions, - LPD3DXMESH *ppMeshOut, - LPD3DXBUFFER *ppFacePartitioning, - LPD3DXBUFFER *ppVertexRemapArray, - LPD3DXBUFFER *ppPartitionResultAdjacency, - FLOAT *pfMaxStretchOut, - UINT *puNumChartsOut); - -// This takes the face partitioning result from Partition and packs it into an -// atlas of the given size. pdwPartitionResultAdjacency should be derived from -// the adjacency returned from the partition step. This value cannot be NULL -// because Pack needs to know where charts were cut in the partition step in -// order to find the edges of each chart. -// The options parameter is currently reserved. -HRESULT WINAPI D3DXUVAtlasPack(ID3DXMesh *pMesh, - UINT uWidth, - UINT uHeight, - FLOAT fGutter, - DWORD dwTextureIndex, - CONST DWORD *pdwPartitionResultAdjacency, - LPD3DXUVATLASCB pStatusCallback, - FLOAT fCallbackFrequency, - LPVOID pUserContext, - DWORD dwOptions, - LPD3DXBUFFER pFacePartitioning); - - -//============================================================================ -// -// IMT Calculation apis -// -// These functions all compute the Integrated Metric Tensor for use in the -// UVAtlas API. They all calculate the IMT with respect to the canonical -// triangle, where the coordinate system is set up so that the u axis goes -// from vertex 0 to 1 and the v axis is N x u. So, for example, the second -// vertex's canonical uv coordinates are (d,0) where d is the distance between -// vertices 0 and 1. This way the IMT does not depend on the parameterization -// of the mesh, and if the signal over the surface doesn't change, then -// the IMT doesn't need to be recalculated. -//============================================================================ - -// This callback is used by D3DXComputeIMTFromSignal. -// -// uv - The texture coordinate for the vertex. -// uPrimitiveID - Face ID of the triangle on which to compute the signal. -// uSignalDimension - The number of floats to store in pfSignalOut. -// pUserData - The pUserData pointer passed in to ComputeIMTFromSignal. -// pfSignalOut - A pointer to where to store the signal data. -typedef HRESULT (WINAPI* LPD3DXIMTSIGNALCALLBACK) - (CONST D3DXVECTOR2 *uv, - UINT uPrimitiveID, - UINT uSignalDimension, - VOID *pUserData, - FLOAT *pfSignalOut); - -// This function is used to calculate the IMT from per vertex data. It sets -// up a linear system over the triangle, solves for the jacobian J, then -// constructs the IMT from that (J^TJ). -// This function allows you to calculate the IMT based off of any value in a -// mesh (color, normal, etc) by specifying the correct stride of the array. -// The IMT computed will cause areas of the mesh that have similar values to -// take up less space in the texture. -// -// pMesh - The mesh to calculate the IMT for. -// pVertexSignal - A float array of size uSignalStride * v, where v is the -// number of vertices in the mesh. -// uSignalDimension - How many floats per vertex to use in calculating the IMT. -// uSignalStride - The number of bytes per vertex in the array. This must be -// a multiple of sizeof(float) -// ppIMTData - Where to store the buffer holding the IMT data - -HRESULT WINAPI D3DXComputeIMTFromPerVertexSignal ( - LPD3DXMESH pMesh, - CONST FLOAT *pfVertexSignal, // uSignalDimension floats per vertex - UINT uSignalDimension, - UINT uSignalStride, // stride of signal in bytes - DWORD dwOptions, // reserved for future use - LPD3DXUVATLASCB pStatusCallback, - LPVOID pUserContext, - LPD3DXBUFFER *ppIMTData); - -// This function is used to calculate the IMT from data that varies over the -// surface of the mesh (generally at a higher frequency than vertex data). -// This function requires the mesh to already be parameterized (so it already -// has texture coordinates). It allows the user to define a signal arbitrarily -// over the surface of the mesh. -// -// pMesh - The mesh to calculate the IMT for. -// dwTextureIndex - This describes which set of texture coordinates in the -// mesh to use. -// uSignalDimension - How many components there are in the signal. -// fMaxUVDistance - The subdivision will continue until the distance between -// all vertices is at most fMaxUVDistance. -// dwOptions - reserved for future use -// pSignalCallback - The callback to use to get the signal. -// pUserData - A pointer that will be passed in to the callback. -// ppIMTData - Where to store the buffer holding the IMT data -HRESULT WINAPI D3DXComputeIMTFromSignal( - LPD3DXMESH pMesh, - DWORD dwTextureIndex, - UINT uSignalDimension, - FLOAT fMaxUVDistance, - DWORD dwOptions, // reserved for future use - LPD3DXIMTSIGNALCALLBACK pSignalCallback, - VOID *pUserData, - LPD3DXUVATLASCB pStatusCallback, - LPVOID pUserContext, - LPD3DXBUFFER *ppIMTData); - -// This function is used to calculate the IMT from texture data. Given a texture -// that maps over the surface of the mesh, the algorithm computes the IMT for -// each face. This will cause large areas that are very similar to take up less -// room when parameterized with UVAtlas. The texture is assumed to be -// interpolated over the mesh bilinearly. -// -// pMesh - The mesh to calculate the IMT for. -// pTexture - The texture to load data from. -// dwTextureIndex - This describes which set of texture coordinates in the -// mesh to use. -// dwOptions - Combination of one or more D3DXIMT flags. -// ppIMTData - Where to store the buffer holding the IMT data -HRESULT WINAPI D3DXComputeIMTFromTexture ( - LPD3DXMESH pMesh, - LPDIRECT3DTEXTURE9 pTexture, - DWORD dwTextureIndex, - DWORD dwOptions, - LPD3DXUVATLASCB pStatusCallback, - LPVOID pUserContext, - LPD3DXBUFFER *ppIMTData); - -// This function is very similar to ComputeIMTFromTexture, but it uses a -// float array to pass in the data, and it can calculate higher dimensional -// values than 4. -// -// pMesh - The mesh to calculate the IMT for. -// dwTextureIndex - This describes which set of texture coordinates in the -// mesh to use. -// pfFloatArray - a pointer to a float array of size -// uWidth*uHeight*uComponents -// uWidth - The width of the texture -// uHeight - The height of the texture -// uSignalDimension - The number of floats per texel in the signal -// uComponents - The number of floats in each texel -// dwOptions - Combination of one or more D3DXIMT flags -// ppIMTData - Where to store the buffer holding the IMT data -HRESULT WINAPI D3DXComputeIMTFromPerTexelSignal( - LPD3DXMESH pMesh, - DWORD dwTextureIndex, - FLOAT *pfTexelSignal, - UINT uWidth, - UINT uHeight, - UINT uSignalDimension, - UINT uComponents, - DWORD dwOptions, - LPD3DXUVATLASCB pStatusCallback, - LPVOID pUserContext, - LPD3DXBUFFER *ppIMTData); - -HRESULT WINAPI - D3DXConvertMeshSubsetToSingleStrip( - LPD3DXBASEMESH MeshIn, - DWORD AttribId, - DWORD IBOptions, - LPDIRECT3DINDEXBUFFER9 *ppIndexBuffer, - DWORD *pNumIndices); - -HRESULT WINAPI - D3DXConvertMeshSubsetToStrips( - LPD3DXBASEMESH MeshIn, - DWORD AttribId, - DWORD IBOptions, - LPDIRECT3DINDEXBUFFER9 *ppIndexBuffer, - DWORD *pNumIndices, - LPD3DXBUFFER *ppStripLengths, - DWORD *pNumStrips); - - -//============================================================================ -// -// D3DXOptimizeFaces: -// -------------------- -// Generate a face remapping for a triangle list that more effectively utilizes -// vertex caches. This optimization is identical to the one provided -// by ID3DXMesh::Optimize with the hardware independent option enabled. -// -// Parameters: -// pbIndices -// Triangle list indices to use for generating a vertex ordering -// NumFaces -// Number of faces in the triangle list -// NumVertices -// Number of vertices referenced by the triangle list -// b32BitIndices -// TRUE if indices are 32 bit, FALSE if indices are 16 bit -// pFaceRemap -// Destination buffer to store face ordering -// The number stored for a given element is where in the new ordering -// the face will have come from. See ID3DXMesh::Optimize for more info. -// -//============================================================================ -HRESULT WINAPI - D3DXOptimizeFaces( - LPCVOID pbIndices, - UINT cFaces, - UINT cVertices, - BOOL b32BitIndices, - DWORD* pFaceRemap); - -//============================================================================ -// -// D3DXOptimizeVertices: -// -------------------- -// Generate a vertex remapping to optimize for in order use of vertices for -// a given set of indices. This is commonly used after applying the face -// remap generated by D3DXOptimizeFaces -// -// Parameters: -// pbIndices -// Triangle list indices to use for generating a vertex ordering -// NumFaces -// Number of faces in the triangle list -// NumVertices -// Number of vertices referenced by the triangle list -// b32BitIndices -// TRUE if indices are 32 bit, FALSE if indices are 16 bit -// pVertexRemap -// Destination buffer to store vertex ordering -// The number stored for a given element is where in the new ordering -// the vertex will have come from. See ID3DXMesh::Optimize for more info. -// -//============================================================================ -HRESULT WINAPI - D3DXOptimizeVertices( - LPCVOID pbIndices, - UINT cFaces, - UINT cVertices, - BOOL b32BitIndices, - DWORD* pVertexRemap); - -#ifdef __cplusplus -} -#endif //__cplusplus - - -//=========================================================================== -// -// Data structures for Spherical Harmonic Precomputation -// -// -//============================================================================ - -typedef enum _D3DXSHCOMPRESSQUALITYTYPE { - D3DXSHCQUAL_FASTLOWQUALITY = 1, - D3DXSHCQUAL_SLOWHIGHQUALITY = 2, - D3DXSHCQUAL_FORCE_DWORD = 0x7fffffff -} D3DXSHCOMPRESSQUALITYTYPE; - -typedef enum _D3DXSHGPUSIMOPT { - D3DXSHGPUSIMOPT_SHADOWRES256 = 1, - D3DXSHGPUSIMOPT_SHADOWRES512 = 0, - D3DXSHGPUSIMOPT_SHADOWRES1024 = 2, - D3DXSHGPUSIMOPT_SHADOWRES2048 = 3, - - D3DXSHGPUSIMOPT_HIGHQUALITY = 4, - - D3DXSHGPUSIMOPT_FORCE_DWORD = 0x7fffffff -} D3DXSHGPUSIMOPT; - -// for all properties that are colors the luminance is computed -// if the simulator is run with a single channel using the following -// formula: R * 0.2125 + G * 0.7154 + B * 0.0721 - -typedef struct _D3DXSHMATERIAL { - D3DCOLORVALUE Diffuse; // Diffuse albedo of the surface. (Ignored if object is a Mirror) - BOOL bMirror; // Must be set to FALSE. bMirror == TRUE not currently supported - BOOL bSubSurf; // true if the object does subsurface scattering - can't do this and be a mirror - - // subsurface scattering parameters - FLOAT RelativeIndexOfRefraction; - D3DCOLORVALUE Absorption; - D3DCOLORVALUE ReducedScattering; - -} D3DXSHMATERIAL; - -// allocated in D3DXSHPRTCompSplitMeshSC -// vertices are duplicated into multiple super clusters but -// only have a valid status in one super cluster (fill in the rest) - -typedef struct _D3DXSHPRTSPLITMESHVERTDATA { - UINT uVertRemap; // vertex in original mesh this corresponds to - UINT uSubCluster; // cluster index relative to super cluster - UCHAR ucVertStatus; // 1 if vertex has valid data, 0 if it is "fill" -} D3DXSHPRTSPLITMESHVERTDATA; - -// used in D3DXSHPRTCompSplitMeshSC -// information for each super cluster that maps into face/vert arrays - -typedef struct _D3DXSHPRTSPLITMESHCLUSTERDATA { - UINT uVertStart; // initial index into remapped vertex array - UINT uVertLength; // number of vertices in this super cluster - - UINT uFaceStart; // initial index into face array - UINT uFaceLength; // number of faces in this super cluster - - UINT uClusterStart; // initial index into cluster array - UINT uClusterLength; // number of clusters in this super cluster -} D3DXSHPRTSPLITMESHCLUSTERDATA; - -// call back function for simulator -// return S_OK to keep running the simulator - anything else represents -// failure and the simulator will abort. - -typedef HRESULT (WINAPI *LPD3DXSHPRTSIMCB)(float fPercentDone, LPVOID lpUserContext); - -// interfaces for PRT buffers/simulator - -// GUIDs -// {F1827E47-00A8-49cd-908C-9D11955F8728} -DEFINE_GUID(IID_ID3DXPRTBuffer, -0xf1827e47, 0xa8, 0x49cd, 0x90, 0x8c, 0x9d, 0x11, 0x95, 0x5f, 0x87, 0x28); - -// {A758D465-FE8D-45ad-9CF0-D01E56266A07} -DEFINE_GUID(IID_ID3DXPRTCompBuffer, -0xa758d465, 0xfe8d, 0x45ad, 0x9c, 0xf0, 0xd0, 0x1e, 0x56, 0x26, 0x6a, 0x7); - -// {838F01EC-9729-4527-AADB-DF70ADE7FEA9} -DEFINE_GUID(IID_ID3DXTextureGutterHelper, -0x838f01ec, 0x9729, 0x4527, 0xaa, 0xdb, 0xdf, 0x70, 0xad, 0xe7, 0xfe, 0xa9); - -// {683A4278-CD5F-4d24-90AD-C4E1B6855D53} -DEFINE_GUID(IID_ID3DXPRTEngine, -0x683a4278, 0xcd5f, 0x4d24, 0x90, 0xad, 0xc4, 0xe1, 0xb6, 0x85, 0x5d, 0x53); - -// interface defenitions - -typedef interface ID3DXTextureGutterHelper ID3DXTextureGutterHelper; -typedef interface ID3DXPRTBuffer ID3DXPRTBuffer; - -#undef INTERFACE -#define INTERFACE ID3DXPRTBuffer - -// Buffer interface - contains "NumSamples" samples -// each sample in memory is stored as NumCoeffs scalars per channel (1 or 3) -// Same interface is used for both Vertex and Pixel PRT buffers - -DECLARE_INTERFACE_(ID3DXPRTBuffer, IUnknown) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // ID3DXPRTBuffer - STDMETHOD_(UINT, GetNumSamples)(THIS) PURE; - STDMETHOD_(UINT, GetNumCoeffs)(THIS) PURE; - STDMETHOD_(UINT, GetNumChannels)(THIS) PURE; - - STDMETHOD_(BOOL, IsTexture)(THIS) PURE; - STDMETHOD_(UINT, GetWidth)(THIS) PURE; - STDMETHOD_(UINT, GetHeight)(THIS) PURE; - - // changes the number of samples allocated in the buffer - STDMETHOD(Resize)(THIS_ UINT NewSize) PURE; - - // ppData will point to the memory location where sample Start begins - // pointer is valid for at least NumSamples samples - STDMETHOD(LockBuffer)(THIS_ UINT Start, UINT NumSamples, FLOAT **ppData) PURE; - STDMETHOD(UnlockBuffer)(THIS) PURE; - - // every scalar in buffer is multiplied by Scale - STDMETHOD(ScaleBuffer)(THIS_ FLOAT Scale) PURE; - - // every scalar contains the sum of this and pBuffers values - // pBuffer must have the same storage class/dimensions - STDMETHOD(AddBuffer)(THIS_ LPD3DXPRTBUFFER pBuffer) PURE; - - // GutterHelper (described below) will fill in the gutter - // regions of a texture by interpolating "internal" values - STDMETHOD(AttachGH)(THIS_ LPD3DXTEXTUREGUTTERHELPER) PURE; - STDMETHOD(ReleaseGH)(THIS) PURE; - - // Evaluates attached gutter helper on the contents of this buffer - STDMETHOD(EvalGH)(THIS) PURE; - - // extracts a given channel into texture pTexture - // NumCoefficients starting from StartCoefficient are copied - STDMETHOD(ExtractTexture)(THIS_ UINT Channel, UINT StartCoefficient, - UINT NumCoefficients, LPDIRECT3DTEXTURE9 pTexture) PURE; - - // extracts NumCoefficients coefficients into mesh - only applicable on single channel - // buffers, otherwise just lockbuffer and copy data. With SHPRT data NumCoefficients - // should be Order^2 - STDMETHOD(ExtractToMesh)(THIS_ UINT NumCoefficients, D3DDECLUSAGE Usage, UINT UsageIndexStart, - LPD3DXMESH pScene) PURE; - -}; - -typedef interface ID3DXPRTCompBuffer ID3DXPRTCompBuffer; -typedef interface ID3DXPRTCompBuffer *LPD3DXPRTCOMPBUFFER; - -#undef INTERFACE -#define INTERFACE ID3DXPRTCompBuffer - -// compressed buffers stored a compressed version of a PRTBuffer - -DECLARE_INTERFACE_(ID3DXPRTCompBuffer, IUnknown) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // ID3DPRTCompBuffer - - // NumCoeffs and NumChannels are properties of input buffer - STDMETHOD_(UINT, GetNumSamples)(THIS) PURE; - STDMETHOD_(UINT, GetNumCoeffs)(THIS) PURE; - STDMETHOD_(UINT, GetNumChannels)(THIS) PURE; - - STDMETHOD_(BOOL, IsTexture)(THIS) PURE; - STDMETHOD_(UINT, GetWidth)(THIS) PURE; - STDMETHOD_(UINT, GetHeight)(THIS) PURE; - - // number of clusters, and PCA vectors per-cluster - STDMETHOD_(UINT, GetNumClusters)(THIS) PURE; - STDMETHOD_(UINT, GetNumPCA)(THIS) PURE; - - // normalizes PCA weights so that they are between [-1,1] - // basis vectors are modified to reflect this - STDMETHOD(NormalizeData)(THIS) PURE; - - // copies basis vectors for cluster "Cluster" into pClusterBasis - // (NumPCA+1)*NumCoeffs*NumChannels floats - STDMETHOD(ExtractBasis)(THIS_ UINT Cluster, FLOAT *pClusterBasis) PURE; - - // UINT per sample - which cluster it belongs to - STDMETHOD(ExtractClusterIDs)(THIS_ UINT *pClusterIDs) PURE; - - // copies NumExtract PCA projection coefficients starting at StartPCA - // into pPCACoefficients - NumSamples*NumExtract floats copied - STDMETHOD(ExtractPCA)(THIS_ UINT StartPCA, UINT NumExtract, FLOAT *pPCACoefficients) PURE; - - // copies NumPCA projection coefficients starting at StartPCA - // into pTexture - should be able to cope with signed formats - STDMETHOD(ExtractTexture)(THIS_ UINT StartPCA, UINT NumpPCA, - LPDIRECT3DTEXTURE9 pTexture) PURE; - - // copies NumPCA projection coefficients into mesh pScene - // Usage is D3DDECLUSAGE where coefficients are to be stored - // UsageIndexStart is starting index - STDMETHOD(ExtractToMesh)(THIS_ UINT NumPCA, D3DDECLUSAGE Usage, UINT UsageIndexStart, - LPD3DXMESH pScene) PURE; -}; - - -#undef INTERFACE -#define INTERFACE ID3DXTextureGutterHelper - -// ID3DXTextureGutterHelper will build and manage -// "gutter" regions in a texture - this will allow for -// bi-linear interpolation to not have artifacts when rendering -// It generates a map (in texture space) where each texel -// is in one of 3 states: -// 0 Invalid - not used at all -// 1 Inside triangle -// 2 Gutter texel -// 4 represents a gutter texel that will be computed during PRT -// For each Inside/Gutter texel it stores the face it -// belongs to and barycentric coordinates for the 1st two -// vertices of that face. Gutter vertices are assigned to -// the closest edge in texture space. -// -// When used with PRT this requires a unique parameterization -// of the model - every texel must correspond to a single point -// on the surface of the model and vice versa - -DECLARE_INTERFACE_(ID3DXTextureGutterHelper, IUnknown) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // ID3DXTextureGutterHelper - - // dimensions of texture this is bound too - STDMETHOD_(UINT, GetWidth)(THIS) PURE; - STDMETHOD_(UINT, GetHeight)(THIS) PURE; - - - // Applying gutters recomputes all of the gutter texels of class "2" - // based on texels of class "1" or "4" - - // Applies gutters to a raw float buffer - each texel is NumCoeffs floats - // Width and Height must match GutterHelper - STDMETHOD(ApplyGuttersFloat)(THIS_ FLOAT *pDataIn, UINT NumCoeffs, UINT Width, UINT Height); - - // Applies gutters to pTexture - // Dimensions must match GutterHelper - STDMETHOD(ApplyGuttersTex)(THIS_ LPDIRECT3DTEXTURE9 pTexture); - - // Applies gutters to a D3DXPRTBuffer - // Dimensions must match GutterHelper - STDMETHOD(ApplyGuttersPRT)(THIS_ LPD3DXPRTBUFFER pBuffer); - - // Resamples a texture from a mesh onto this gutterhelpers - // parameterization. It is assumed that the UV coordinates - // for this gutter helper are in TEXTURE 0 (usage/usage index) - // and the texture coordinates should all be within [0,1] for - // both sets. - // - // pTextureIn - texture represented using parameterization in pMeshIn - // pMeshIn - Mesh with texture coordinates that represent pTextureIn - // pTextureOut texture coordinates are assumed to be in - // TEXTURE 0 - // Usage - field in DECL for pMeshIn that stores texture coordinates - // for pTextureIn - // UsageIndex - which index for Usage above for pTextureIn - // pTextureOut- Resampled texture - // - // Usage would generally be D3DDECLUSAGE_TEXCOORD and UsageIndex other than zero - STDMETHOD(ResampleTex)(THIS_ LPDIRECT3DTEXTURE9 pTextureIn, - LPD3DXMESH pMeshIn, - D3DDECLUSAGE Usage, UINT UsageIndex, - LPDIRECT3DTEXTURE9 pTextureOut); - - // the routines below provide access to the data structures - // used by the Apply functions - - // face map is a UINT per texel that represents the - // face of the mesh that texel belongs too - - // only valid if same texel is valid in pGutterData - // pFaceData must be allocated by the user - STDMETHOD(GetFaceMap)(THIS_ UINT *pFaceData) PURE; - - // BaryMap is a D3DXVECTOR2 per texel - // the 1st two barycentric coordinates for the corresponding - // face (3rd weight is always 1-sum of first two) - // only valid if same texel is valid in pGutterData - // pBaryData must be allocated by the user - STDMETHOD(GetBaryMap)(THIS_ D3DXVECTOR2 *pBaryData) PURE; - - // TexelMap is a D3DXVECTOR2 per texel that - // stores the location in pixel coordinates where the - // corresponding texel is mapped - // pTexelData must be allocated by the user - STDMETHOD(GetTexelMap)(THIS_ D3DXVECTOR2 *pTexelData) PURE; - - // GutterMap is a BYTE per texel - // 0/1/2 for Invalid/Internal/Gutter texels - // 4 represents a gutter texel that will be computed - // during PRT - // pGutterData must be allocated by the user - STDMETHOD(GetGutterMap)(THIS_ BYTE *pGutterData) PURE; - - // face map is a UINT per texel that represents the - // face of the mesh that texel belongs too - - // only valid if same texel is valid in pGutterData - STDMETHOD(SetFaceMap)(THIS_ UINT *pFaceData) PURE; - - // BaryMap is a D3DXVECTOR2 per texel - // the 1st two barycentric coordinates for the corresponding - // face (3rd weight is always 1-sum of first two) - // only valid if same texel is valid in pGutterData - STDMETHOD(SetBaryMap)(THIS_ D3DXVECTOR2 *pBaryData) PURE; - - // TexelMap is a D3DXVECTOR2 per texel that - // stores the location in pixel coordinates where the - // corresponding texel is mapped - STDMETHOD(SetTexelMap)(THIS_ D3DXVECTOR2 *pTexelData) PURE; - - // GutterMap is a BYTE per texel - // 0/1/2 for Invalid/Internal/Gutter texels - // 4 represents a gutter texel that will be computed - // during PRT - STDMETHOD(SetGutterMap)(THIS_ BYTE *pGutterData) PURE; -}; - - -typedef interface ID3DXPRTEngine ID3DXPRTEngine; -typedef interface ID3DXPRTEngine *LPD3DXPRTENGINE; - -#undef INTERFACE -#define INTERFACE ID3DXPRTEngine - -// ID3DXPRTEngine is used to compute a PRT simulation -// Use the following steps to compute PRT for SH -// (1) create an interface (which includes a scene) -// (2) call SetSamplingInfo -// (3) [optional] Set MeshMaterials/albedo's (required if doing bounces) -// (4) call ComputeDirectLightingSH -// (5) [optional] call ComputeBounce -// repeat step 5 for as many bounces as wanted. -// if you want to model subsurface scattering you -// need to call ComputeSS after direct lighting and -// each bounce. -// If you want to bake the albedo into the PRT signal, you -// must call MutliplyAlbedo, otherwise the user has to multiply -// the albedo themselves. Not multiplying the albedo allows you -// to model albedo variation at a finer scale then illumination, and -// can result in better compression results. -// Luminance values are computed from RGB values using the following -// formula: R * 0.2125 + G * 0.7154 + B * 0.0721 - -DECLARE_INTERFACE_(ID3DXPRTEngine, IUnknown) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // ID3DXPRTEngine - - // This sets a material per attribute in the scene mesh and it is - // the only way to specify subsurface scattering parameters. if - // bSetAlbedo is FALSE, NumChannels must match the current - // configuration of the PRTEngine. If you intend to change - // NumChannels (through some other SetAlbedo function) it must - // happen before SetMeshMaterials is called. - // - // NumChannels 1 implies "grayscale" materials, set this to 3 to enable - // color bleeding effects - // bSetAlbedo sets albedo from material if TRUE - which clobbers per texel/vertex - // albedo that might have been set before. FALSE won't clobber. - // fLengthScale is used for subsurface scattering - scene is mapped into a 1mm unit cube - // and scaled by this amount - STDMETHOD(SetMeshMaterials)(THIS_ CONST D3DXSHMATERIAL **ppMaterials, UINT NumMeshes, - UINT NumChannels, BOOL bSetAlbedo, FLOAT fLengthScale) PURE; - - // setting albedo per-vertex or per-texel over rides the albedos stored per mesh - // but it does not over ride any other settings - - // sets an albedo to be used per vertex - the albedo is represented as a float - // pDataIn input pointer (pointint to albedo of 1st sample) - // NumChannels 1 implies "grayscale" materials, set this to 3 to enable - // color bleeding effects - // Stride - stride in bytes to get to next samples albedo - STDMETHOD(SetPerVertexAlbedo)(THIS_ CONST VOID *pDataIn, UINT NumChannels, UINT Stride) PURE; - - // represents the albedo per-texel instead of per-vertex (even if per-vertex PRT is used) - // pAlbedoTexture - texture that stores the albedo (dimension arbitrary) - // NumChannels 1 implies "grayscale" materials, set this to 3 to enable - // color bleeding effects - // pGH - optional gutter helper, otherwise one is constructed in computation routines and - // destroyed (if not attached to buffers) - STDMETHOD(SetPerTexelAlbedo)(THIS_ LPDIRECT3DTEXTURE9 pAlbedoTexture, - UINT NumChannels, - LPD3DXTEXTUREGUTTERHELPER pGH) PURE; - - // gets the per-vertex albedo - STDMETHOD(GetVertexAlbedo)(THIS_ D3DXCOLOR *pVertColors, UINT NumVerts) PURE; - - // If pixel PRT is being computed normals default to ones that are interpolated - // from the vertex normals. This specifies a texture that stores an object - // space normal map instead (must use a texture format that can represent signed values) - // pNormalTexture - normal map, must be same dimensions as PRTBuffers, signed - STDMETHOD(SetPerTexelNormal)(THIS_ LPDIRECT3DTEXTURE9 pNormalTexture) PURE; - - // Copies per-vertex albedo from mesh - // pMesh - mesh that represents the scene. It must have the same - // properties as the mesh used to create the PRTEngine - // Usage - D3DDECLUSAGE to extract albedos from - // NumChannels 1 implies "grayscale" materials, set this to 3 to enable - // color bleeding effects - STDMETHOD(ExtractPerVertexAlbedo)(THIS_ LPD3DXMESH pMesh, - D3DDECLUSAGE Usage, - UINT NumChannels) PURE; - - // Resamples the input buffer into the output buffer - // can be used to move between per-vertex and per-texel buffers. This can also be used - // to convert single channel buffers to 3-channel buffers and vice-versa. - STDMETHOD(ResampleBuffer)(THIS_ LPD3DXPRTBUFFER pBufferIn, LPD3DXPRTBUFFER pBufferOut) PURE; - - // Returns the scene mesh - including modifications from adaptive spatial sampling - // The returned mesh only has positions, normals and texture coordinates (if defined) - // pD3DDevice - d3d device that will be used to allocate the mesh - // pFaceRemap - each face has a pointer back to the face on the original mesh that it comes from - // if the face hasn't been subdivided this will be an identity mapping - // pVertRemap - each vertex contains 3 vertices that this is a linear combination of - // pVertWeights - weights for each of above indices (sum to 1.0f) - // ppMesh - mesh that will be allocated and filled - STDMETHOD(GetAdaptedMesh)(THIS_ LPDIRECT3DDEVICE9 pD3DDevice,UINT *pFaceRemap, UINT *pVertRemap, FLOAT *pfVertWeights, LPD3DXMESH *ppMesh) PURE; - - // Number of vertices currently allocated (includes new vertices from adaptive sampling) - STDMETHOD_(UINT, GetNumVerts)(THIS) PURE; - // Number of faces currently allocated (includes new faces) - STDMETHOD_(UINT, GetNumFaces)(THIS) PURE; - - // Sets the Minimum/Maximum intersection distances, this can be used to control - // maximum distance that objects can shadow/reflect light, and help with "bad" - // art that might have near features that you don't want to shadow. This does not - // apply for GPU simulations. - // fMin - minimum intersection distance, must be positive and less than fMax - // fMax - maximum intersection distance, if 0.0f use the previous value, otherwise - // must be strictly greater than fMin - STDMETHOD(SetMinMaxIntersection)(THIS_ FLOAT fMin, FLOAT fMax) PURE; - - // This will subdivide faces on a mesh so that adaptively simulations can - // use a more conservative threshold (it won't miss features.) - // MinEdgeLength - minimum edge length that will be generated, if 0.0f a - // reasonable default will be used - // MaxSubdiv - maximum level of subdivision, if 0 is specified a default - // value will be used (5) - STDMETHOD(RobustMeshRefine)(THIS_ FLOAT MinEdgeLength, UINT MaxSubdiv) PURE; - - // This sets to sampling information used by the simulator. Adaptive sampling - // parameters are currently ignored. - // NumRays - number of rays to shoot per sample - // UseSphere - if TRUE uses spherical samples, otherwise samples over - // the hemisphere. Should only be used with GPU and Vol computations - // UseCosine - if TRUE uses a cosine weighting - not used for Vol computations - // or if only the visiblity function is desired - // Adaptive - if TRUE adaptive sampling (angular) is used - // AdaptiveThresh - threshold used to terminate adaptive angular sampling - // ignored if adaptive sampling is not set - STDMETHOD(SetSamplingInfo)(THIS_ UINT NumRays, - BOOL UseSphere, - BOOL UseCosine, - BOOL Adaptive, - FLOAT AdaptiveThresh) PURE; - - // Methods that compute the direct lighting contribution for objects - // always represente light using spherical harmonics (SH) - // the albedo is not multiplied by the signal - it just integrates - // incoming light. If NumChannels is not 1 the vector is replicated - // - // SHOrder - order of SH to use - // pDataOut - PRT buffer that is generated. Can be single channel - STDMETHOD(ComputeDirectLightingSH)(THIS_ UINT SHOrder, - LPD3DXPRTBUFFER pDataOut) PURE; - - // Adaptive variant of above function. This will refine the mesh - // generating new vertices/faces to approximate the PRT signal - // more faithfully. - // SHOrder - order of SH to use - // AdaptiveThresh - threshold for adaptive subdivision (in PRT vector error) - // if value is less then 1e-6f, 1e-6f is specified - // MinEdgeLength - minimum edge length that will be generated - // if value is too small a fairly conservative model dependent value - // is used - // MaxSubdiv - maximum subdivision level, if 0 is specified it - // will default to 4 - // pDataOut - PRT buffer that is generated. Can be single channel. - STDMETHOD(ComputeDirectLightingSHAdaptive)(THIS_ UINT SHOrder, - FLOAT AdaptiveThresh, - FLOAT MinEdgeLength, - UINT MaxSubdiv, - LPD3DXPRTBUFFER pDataOut) PURE; - - // Function that computes the direct lighting contribution for objects - // light is always represented using spherical harmonics (SH) - // This is done on the GPU and is much faster then using the CPU. - // The albedo is not multiplied by the signal - it just integrates - // incoming light. If NumChannels is not 1 the vector is replicated. - // ZBias/ZAngleBias are akin to parameters used with shadow zbuffers. - // A reasonable default for both values is 0.005, but the user should - // experiment (ZAngleBias can be zero, ZBias should not be.) - // Callbacks should not use the Direct3D9Device the simulator is using. - // SetSamplingInfo must be called with TRUE for UseSphere and - // FALSE for UseCosine before this method is called. - // - // pD3DDevice - device used to run GPU simulator - must support PS2.0 - // and FP render targets - // Flags - parameters for the GPU simulator, combination of one or more - // D3DXSHGPUSIMOPT flags. Only one SHADOWRES setting should be set and - // the defaults is 512 - // SHOrder - order of SH to use - // ZBias - bias in normal direction (for depth test) - // ZAngleBias - scaled by one minus cosine of angle with light (offset in depth) - // pDataOut - PRT buffer that is filled in. Can be single channel - STDMETHOD(ComputeDirectLightingSHGPU)(THIS_ LPDIRECT3DDEVICE9 pD3DDevice, - UINT Flags, - UINT SHOrder, - FLOAT ZBias, - FLOAT ZAngleBias, - LPD3DXPRTBUFFER pDataOut) PURE; - - - // Functions that computes subsurface scattering (using material properties) - // Albedo is not multiplied by result. This only works for per-vertex data - // use ResampleBuffer to move per-vertex data into a texture and back. - // - // pDataIn - input data (previous bounce) - // pDataOut - result of subsurface scattering simulation - // pDataTotal - [optional] results can be summed into this buffer - STDMETHOD(ComputeSS)(THIS_ LPD3DXPRTBUFFER pDataIn, - LPD3DXPRTBUFFER pDataOut, LPD3DXPRTBUFFER pDataTotal) PURE; - - // Adaptive version of ComputeSS. - // - // pDataIn - input data (previous bounce) - // AdaptiveThresh - threshold for adaptive subdivision (in PRT vector error) - // if value is less then 1e-6f, 1e-6f is specified - // MinEdgeLength - minimum edge length that will be generated - // if value is too small a fairly conservative model dependent value - // is used - // MaxSubdiv - maximum subdivision level, if 0 is specified it - // will default to 4 - // pDataOut - result of subsurface scattering simulation - // pDataTotal - [optional] results can be summed into this buffer - STDMETHOD(ComputeSSAdaptive)(THIS_ LPD3DXPRTBUFFER pDataIn, - FLOAT AdaptiveThresh, - FLOAT MinEdgeLength, - UINT MaxSubdiv, - LPD3DXPRTBUFFER pDataOut, LPD3DXPRTBUFFER pDataTotal) PURE; - - // computes a single bounce of inter-reflected light - // works for SH based PRT or generic lighting - // Albedo is not multiplied by result - // - // pDataIn - previous bounces data - // pDataOut - PRT buffer that is generated - // pDataTotal - [optional] can be used to keep a running sum - STDMETHOD(ComputeBounce)(THIS_ LPD3DXPRTBUFFER pDataIn, - LPD3DXPRTBUFFER pDataOut, - LPD3DXPRTBUFFER pDataTotal) PURE; - - // Adaptive version of above function. - // - // pDataIn - previous bounces data, can be single channel - // AdaptiveThresh - threshold for adaptive subdivision (in PRT vector error) - // if value is less then 1e-6f, 1e-6f is specified - // MinEdgeLength - minimum edge length that will be generated - // if value is too small a fairly conservative model dependent value - // is used - // MaxSubdiv - maximum subdivision level, if 0 is specified it - // will default to 4 - // pDataOut - PRT buffer that is generated - // pDataTotal - [optional] can be used to keep a running sum - STDMETHOD(ComputeBounceAdaptive)(THIS_ LPD3DXPRTBUFFER pDataIn, - FLOAT AdaptiveThresh, - FLOAT MinEdgeLength, - UINT MaxSubdiv, - LPD3DXPRTBUFFER pDataOut, - LPD3DXPRTBUFFER pDataTotal) PURE; - - // Computes projection of distant SH radiance into a local SH radiance - // function. This models how direct lighting is attenuated by the - // scene and is a form of "neighborhood transfer." The result is - // a linear operator (matrix) at every sample point, if you multiply - // this matrix by the distant SH lighting coefficients you get an - // approximation of the local incident radiance function from - // direct lighting. These resulting lighting coefficients can - // than be projected into another basis or used with any rendering - // technique that uses spherical harmonics as input. - // SetSamplingInfo must be called with TRUE for UseSphere and - // FALSE for UseCosine before this method is called. - // Generates SHOrderIn*SHOrderIn*SHOrderOut*SHOrderOut scalars - // per channel at each sample location. - // - // SHOrderIn - Order of the SH representation of distant lighting - // SHOrderOut - Order of the SH representation of local lighting - // NumVolSamples - Number of sample locations - // pSampleLocs - position of sample locations - // pDataOut - PRT Buffer that will store output results - STDMETHOD(ComputeVolumeSamplesDirectSH)(THIS_ UINT SHOrderIn, - UINT SHOrderOut, - UINT NumVolSamples, - CONST D3DXVECTOR3 *pSampleLocs, - LPD3DXPRTBUFFER pDataOut) PURE; - - // At each sample location computes a linear operator (matrix) that maps - // the representation of source radiance (NumCoeffs in pSurfDataIn) - // into a local incident radiance function approximated with spherical - // harmonics. For example if a light map data is specified in pSurfDataIn - // the result is an SH representation of the flow of light at each sample - // point. If PRT data for an outdoor scene is used, each sample point - // contains a matrix that models how distant lighting bounces of the objects - // in the scene and arrives at the given sample point. Combined with - // ComputeVolumeSamplesDirectSH this gives the complete representation for - // how light arrives at each sample point parameterized by distant lighting. - // SetSamplingInfo must be called with TRUE for UseSphere and - // FALSE for UseCosine before this method is called. - // Generates pSurfDataIn->NumCoeffs()*SHOrder*SHOrder scalars - // per channel at each sample location. - // - // pSurfDataIn - previous bounce data - // SHOrder - order of SH to generate projection with - // NumVolSamples - Number of sample locations - // pSampleLocs - position of sample locations - // pDataOut - PRT Buffer that will store output results - STDMETHOD(ComputeVolumeSamples)(THIS_ LPD3DXPRTBUFFER pSurfDataIn, - UINT SHOrder, - UINT NumVolSamples, - CONST D3DXVECTOR3 *pSampleLocs, - LPD3DXPRTBUFFER pDataOut) PURE; - - // Computes direct lighting (SH) for a point not on the mesh - // with a given normal - cannot use texture buffers. - // - // SHOrder - order of SH to use - // NumSamples - number of sample locations - // pSampleLocs - position for each sample - // pSampleNorms - normal for each sample - // pDataOut - PRT Buffer that will store output results - STDMETHOD(ComputeSurfSamplesDirectSH)(THIS_ UINT SHOrder, - UINT NumSamples, - CONST D3DXVECTOR3 *pSampleLocs, - CONST D3DXVECTOR3 *pSampleNorms, - LPD3DXPRTBUFFER pDataOut) PURE; - - - // given the solution for PRT or light maps, computes transfer vector at arbitrary - // position/normal pairs in space - // - // pSurfDataIn - input data - // NumSamples - number of sample locations - // pSampleLocs - position for each sample - // pSampleNorms - normal for each sample - // pDataOut - PRT Buffer that will store output results - // pDataTotal - optional buffer to sum results into - can be NULL - STDMETHOD(ComputeSurfSamplesBounce)(THIS_ LPD3DXPRTBUFFER pSurfDataIn, - UINT NumSamples, - CONST D3DXVECTOR3 *pSampleLocs, - CONST D3DXVECTOR3 *pSampleNorms, - LPD3DXPRTBUFFER pDataOut, - LPD3DXPRTBUFFER pDataTotal) PURE; - - // Frees temporary data structures that can be created for subsurface scattering - // this data is freed when the PRTComputeEngine is freed and is lazily created - STDMETHOD(FreeSSData)(THIS) PURE; - - // Frees temporary data structures that can be created for bounce simulations - // this data is freed when the PRTComputeEngine is freed and is lazily created - STDMETHOD(FreeBounceData)(THIS) PURE; - - // This computes the Local Deformable PRT (LDPRT) coefficients relative to the - // per sample normals that minimize error in a least squares sense with respect - // to the input PRT data set. These coefficients can be used with skinned/transformed - // normals to model global effects with dynamic objects. Shading normals can - // optionally be solved for - these normals (along with the LDPRT coefficients) can - // more accurately represent the PRT signal. The coefficients are for zonal - // harmonics oriented in the normal/shading normal direction. - // - // pDataIn - SH PRT dataset that is input - // SHOrder - Order of SH to compute conv coefficients for - // pNormOut - Optional array of vectors (passed in) that will be filled with - // "shading normals", LDPRT coefficients are optimized for - // these normals. This array must be the same size as the number of - // samples in pDataIn - // pDataOut - Output buffer (SHOrder zonal harmonic coefficients per channel per sample) - STDMETHOD(ComputeLDPRTCoeffs)(THIS_ LPD3DXPRTBUFFER pDataIn, - UINT SHOrder, - D3DXVECTOR3 *pNormOut, - LPD3DXPRTBUFFER pDataOut) PURE; - - // scales all the samples associated with a given sub mesh - // can be useful when using subsurface scattering - // fScale - value to scale each vector in submesh by - STDMETHOD(ScaleMeshChunk)(THIS_ UINT uMeshChunk, FLOAT fScale, LPD3DXPRTBUFFER pDataOut) PURE; - - // mutliplies each PRT vector by the albedo - can be used if you want to have the albedo - // burned into the dataset, often better not to do this. If this is not done the user - // must mutliply the albedo themselves when rendering - just multiply the albedo times - // the result of the PRT dot product. - // If pDataOut is a texture simulation result and there is an albedo texture it - // must be represented at the same resolution as the simulation buffer. You can use - // LoadSurfaceFromSurface and set a new albedo texture if this is an issue - but must - // be careful about how the gutters are handled. - // - // pDataOut - dataset that will get albedo pushed into it - STDMETHOD(MultiplyAlbedo)(THIS_ LPD3DXPRTBUFFER pDataOut) PURE; - - // Sets a pointer to an optional call back function that reports back to the - // user percentage done and gives them the option of quitting - // pCB - pointer to call back function, return S_OK for the simulation - // to continue - // Frequency - 1/Frequency is roughly the number of times the call back - // will be invoked - // lpUserContext - will be passed back to the users call back - STDMETHOD(SetCallBack)(THIS_ LPD3DXSHPRTSIMCB pCB, FLOAT Frequency, LPVOID lpUserContext) PURE; - - // Returns TRUE if the ray intersects the mesh, FALSE if it does not. This function - // takes into account settings from SetMinMaxIntersection. If the closest intersection - // is not needed this function is more efficient compared to the ClosestRayIntersection - // method. - // pRayPos - origin of ray - // pRayDir - normalized ray direction (normalization required for SetMinMax to be meaningful) - - STDMETHOD_(BOOL, ShadowRayIntersects)(THIS_ CONST D3DXVECTOR3 *pRayPos, CONST D3DXVECTOR3 *pRayDir) PURE; - - // Returns TRUE if the ray intersects the mesh, FALSE if it does not. If there is an - // intersection the closest face that was intersected and its first two barycentric coordinates - // are returned. This function takes into account settings from SetMinMaxIntersection. - // This is a slower function compared to ShadowRayIntersects and should only be used where - // needed. The third vertices barycentric coordinates will be 1 - pU - pV. - // pRayPos - origin of ray - // pRayDir - normalized ray direction (normalization required for SetMinMax to be meaningful) - // pFaceIndex - Closest face that intersects. This index is based on stacking the pBlockerMesh - // faces before the faces from pMesh - // pU - Barycentric coordinate for vertex 0 - // pV - Barycentric coordinate for vertex 1 - // pDist - Distance along ray where the intersection occured - - STDMETHOD_(BOOL, ClosestRayIntersects)(THIS_ CONST D3DXVECTOR3 *pRayPos, CONST D3DXVECTOR3 *pRayDir, - DWORD *pFaceIndex, FLOAT *pU, FLOAT *pV, FLOAT *pDist) PURE; -}; - - -// API functions for creating interfaces - -#ifdef __cplusplus -extern "C" { -#endif //__cplusplus - -//============================================================================ -// -// D3DXCreatePRTBuffer: -// -------------------- -// Generates a PRT Buffer that can be compressed or filled by a simulator -// This function should be used to create per-vertex or volume buffers. -// When buffers are created all values are initialized to zero. -// -// Parameters: -// NumSamples -// Number of sample locations represented -// NumCoeffs -// Number of coefficients per sample location (order^2 for SH) -// NumChannels -// Number of color channels to represent (1 or 3) -// ppBuffer -// Buffer that will be allocated -// -//============================================================================ - -HRESULT WINAPI - D3DXCreatePRTBuffer( - UINT NumSamples, - UINT NumCoeffs, - UINT NumChannels, - LPD3DXPRTBUFFER* ppBuffer); - -//============================================================================ -// -// D3DXCreatePRTBufferTex: -// -------------------- -// Generates a PRT Buffer that can be compressed or filled by a simulator -// This function should be used to create per-pixel buffers. -// When buffers are created all values are initialized to zero. -// -// Parameters: -// Width -// Width of texture -// Height -// Height of texture -// NumCoeffs -// Number of coefficients per sample location (order^2 for SH) -// NumChannels -// Number of color channels to represent (1 or 3) -// ppBuffer -// Buffer that will be allocated -// -//============================================================================ - -HRESULT WINAPI - D3DXCreatePRTBufferTex( - UINT Width, - UINT Height, - UINT NumCoeffs, - UINT NumChannels, - LPD3DXPRTBUFFER* ppBuffer); - -//============================================================================ -// -// D3DXLoadPRTBufferFromFile: -// -------------------- -// Loads a PRT buffer that has been saved to disk. -// -// Parameters: -// pFilename -// Name of the file to load -// ppBuffer -// Buffer that will be allocated -// -//============================================================================ - -HRESULT WINAPI - D3DXLoadPRTBufferFromFileA( - LPCSTR pFilename, - LPD3DXPRTBUFFER* ppBuffer); - -HRESULT WINAPI - D3DXLoadPRTBufferFromFileW( - LPCWSTR pFilename, - LPD3DXPRTBUFFER* ppBuffer); - -#ifdef UNICODE -#define D3DXLoadPRTBufferFromFile D3DXLoadPRTBufferFromFileW -#else -#define D3DXLoadPRTBufferFromFile D3DXLoadPRTBufferFromFileA -#endif - - -//============================================================================ -// -// D3DXSavePRTBufferToFile: -// -------------------- -// Saves a PRTBuffer to disk. -// -// Parameters: -// pFilename -// Name of the file to save -// pBuffer -// Buffer that will be saved -// -//============================================================================ - -HRESULT WINAPI - D3DXSavePRTBufferToFileA( - LPCSTR pFileName, - LPD3DXPRTBUFFER pBuffer); - -HRESULT WINAPI - D3DXSavePRTBufferToFileW( - LPCWSTR pFileName, - LPD3DXPRTBUFFER pBuffer); - -#ifdef UNICODE -#define D3DXSavePRTBufferToFile D3DXSavePRTBufferToFileW -#else -#define D3DXSavePRTBufferToFile D3DXSavePRTBufferToFileA -#endif - - -//============================================================================ -// -// D3DXLoadPRTCompBufferFromFile: -// -------------------- -// Loads a PRTComp buffer that has been saved to disk. -// -// Parameters: -// pFilename -// Name of the file to load -// ppBuffer -// Buffer that will be allocated -// -//============================================================================ - -HRESULT WINAPI - D3DXLoadPRTCompBufferFromFileA( - LPCSTR pFilename, - LPD3DXPRTCOMPBUFFER* ppBuffer); - -HRESULT WINAPI - D3DXLoadPRTCompBufferFromFileW( - LPCWSTR pFilename, - LPD3DXPRTCOMPBUFFER* ppBuffer); - -#ifdef UNICODE -#define D3DXLoadPRTCompBufferFromFile D3DXLoadPRTCompBufferFromFileW -#else -#define D3DXLoadPRTCompBufferFromFile D3DXLoadPRTCompBufferFromFileA -#endif - -//============================================================================ -// -// D3DXSavePRTCompBufferToFile: -// -------------------- -// Saves a PRTCompBuffer to disk. -// -// Parameters: -// pFilename -// Name of the file to save -// pBuffer -// Buffer that will be saved -// -//============================================================================ - -HRESULT WINAPI - D3DXSavePRTCompBufferToFileA( - LPCSTR pFileName, - LPD3DXPRTCOMPBUFFER pBuffer); - -HRESULT WINAPI - D3DXSavePRTCompBufferToFileW( - LPCWSTR pFileName, - LPD3DXPRTCOMPBUFFER pBuffer); - -#ifdef UNICODE -#define D3DXSavePRTCompBufferToFile D3DXSavePRTCompBufferToFileW -#else -#define D3DXSavePRTCompBufferToFile D3DXSavePRTCompBufferToFileA -#endif - -//============================================================================ -// -// D3DXCreatePRTCompBuffer: -// -------------------- -// Compresses a PRT buffer (vertex or texel) -// -// Parameters: -// D3DXSHCOMPRESSQUALITYTYPE -// Quality of compression - low is faster (computes PCA per voronoi cluster) -// high is slower but better quality (clusters based on distance to affine subspace) -// NumClusters -// Number of clusters to compute -// NumPCA -// Number of basis vectors to compute -// pCB -// Optional Callback function -// lpUserContext -// Optional user context -// pBufferIn -// Buffer that will be compressed -// ppBufferOut -// Compressed buffer that will be created -// -//============================================================================ - - -HRESULT WINAPI - D3DXCreatePRTCompBuffer( - D3DXSHCOMPRESSQUALITYTYPE Quality, - UINT NumClusters, - UINT NumPCA, - LPD3DXSHPRTSIMCB pCB, - LPVOID lpUserContext, - LPD3DXPRTBUFFER pBufferIn, - LPD3DXPRTCOMPBUFFER *ppBufferOut - ); - -//============================================================================ -// -// D3DXCreateTextureGutterHelper: -// -------------------- -// Generates a "GutterHelper" for a given set of meshes and texture -// resolution -// -// Parameters: -// Width -// Width of texture -// Height -// Height of texture -// pMesh -// Mesh that represents the scene -// GutterSize -// Number of texels to over rasterize in texture space -// this should be at least 1.0 -// ppBuffer -// GutterHelper that will be created -// -//============================================================================ - - -HRESULT WINAPI - D3DXCreateTextureGutterHelper( - UINT Width, - UINT Height, - LPD3DXMESH pMesh, - FLOAT GutterSize, - LPD3DXTEXTUREGUTTERHELPER* ppBuffer); - - -//============================================================================ -// -// D3DXCreatePRTEngine: -// -------------------- -// Computes a PRTEngine which can efficiently generate PRT simulations -// of a scene -// -// Parameters: -// pMesh -// Mesh that represents the scene - must have an AttributeTable -// where vertices are in a unique attribute. -// pAdjacency -// Optional adjacency information -// ExtractUVs -// Set this to true if textures are going to be used for albedos -// or to store PRT vectors -// pBlockerMesh -// Optional mesh that just blocks the scene -// ppEngine -// PRTEngine that will be created -// -//============================================================================ - - -HRESULT WINAPI - D3DXCreatePRTEngine( - LPD3DXMESH pMesh, - DWORD *pAdjacency, - BOOL ExtractUVs, - LPD3DXMESH pBlockerMesh, - LPD3DXPRTENGINE* ppEngine); - -//============================================================================ -// -// D3DXConcatenateMeshes: -// -------------------- -// Concatenates a group of meshes into one common mesh. This can optionaly transform -// each sub mesh or its texture coordinates. If no DECL is given it will -// generate a union of all of the DECL's of the sub meshes, promoting channels -// and types if neccesary. It will create an AttributeTable if possible, one can -// call OptimizeMesh with attribute sort and compacting enabled to ensure this. -// -// Parameters: -// ppMeshes -// Array of pointers to meshes that can store PRT vectors -// NumMeshes -// Number of meshes -// Options -// Passed through to D3DXCreateMesh -// pGeomXForms -// [optional] Each sub mesh is transformed by the corresponding -// matrix if this array is supplied -// pTextureXForms -// [optional] UV coordinates for each sub mesh are transformed -// by corresponding matrix if supplied -// pDecl -// [optional] Only information in this DECL is used when merging -// data -// pD3DDevice -// D3D device that is used to create the new mesh -// ppMeshOut -// Mesh that will be created -// -//============================================================================ - - -HRESULT WINAPI - D3DXConcatenateMeshes( - LPD3DXMESH *ppMeshes, - UINT NumMeshes, - DWORD Options, - CONST D3DXMATRIX *pGeomXForms, - CONST D3DXMATRIX *pTextureXForms, - CONST D3DVERTEXELEMENT9 *pDecl, - LPDIRECT3DDEVICE9 pD3DDevice, - LPD3DXMESH *ppMeshOut); - -//============================================================================ -// -// D3DXSHPRTCompSuperCluster: -// -------------------------- -// Used with compressed results of D3DXSHPRTSimulation. -// Generates "super clusters" - groups of clusters that can be drawn in -// the same draw call. A greedy algorithm that minimizes overdraw is used -// to group the clusters. -// -// Parameters: -// pClusterIDs -// NumVerts cluster ID's (extracted from a compressed buffer) -// pScene -// Mesh that represents composite scene passed to the simulator -// MaxNumClusters -// Maximum number of clusters allocated per super cluster -// NumClusters -// Number of clusters computed in the simulator -// pSuperClusterIDs -// Array of length NumClusters, contains index of super cluster -// that corresponding cluster was assigned to -// pNumSuperClusters -// Returns the number of super clusters allocated -// -//============================================================================ - -HRESULT WINAPI - D3DXSHPRTCompSuperCluster( - UINT *pClusterIDs, - LPD3DXMESH pScene, - UINT MaxNumClusters, - UINT NumClusters, - UINT *pSuperClusterIDs, - UINT *pNumSuperClusters); - -//============================================================================ -// -// D3DXSHPRTCompSplitMeshSC: -// ------------------------- -// Used with compressed results of the vertex version of the PRT simulator. -// After D3DXSHRTCompSuperCluster has been called this function can be used -// to split the mesh into a group of faces/vertices per super cluster. -// Each super cluster contains all of the faces that contain any vertex -// classified in one of its clusters. All of the vertices connected to this -// set of faces are also included with the returned array ppVertStatus -// indicating whether or not the vertex belongs to the supercluster. -// -// Parameters: -// pClusterIDs -// NumVerts cluster ID's (extracted from a compressed buffer) -// NumVertices -// Number of vertices in original mesh -// NumClusters -// Number of clusters (input parameter to compression) -// pSuperClusterIDs -// Array of size NumClusters that will contain super cluster ID's (from -// D3DXSHCompSuerCluster) -// NumSuperClusters -// Number of superclusters allocated in D3DXSHCompSuerCluster -// pInputIB -// Raw index buffer for mesh - format depends on bInputIBIs32Bit -// InputIBIs32Bit -// Indicates whether the input index buffer is 32-bit (otherwise 16-bit -// is assumed) -// NumFaces -// Number of faces in the original mesh (pInputIB is 3 times this length) -// ppIBData -// LPD3DXBUFFER holds raw index buffer that will contain the resulting split faces. -// Format determined by bIBIs32Bit. Allocated by function -// pIBDataLength -// Length of ppIBData, assigned in function -// OutputIBIs32Bit -// Indicates whether the output index buffer is to be 32-bit (otherwise -// 16-bit is assumed) -// ppFaceRemap -// LPD3DXBUFFER mapping of each face in ppIBData to original faces. Length is -// *pIBDataLength/3. Optional paramter, allocated in function -// ppVertData -// LPD3DXBUFFER contains new vertex data structure. Size of pVertDataLength -// pVertDataLength -// Number of new vertices in split mesh. Assigned in function -// pSCClusterList -// Array of length NumClusters which pSCData indexes into (Cluster* fields) -// for each SC, contains clusters sorted by super cluster -// pSCData -// Structure per super cluster - contains indices into ppIBData, -// pSCClusterList and ppVertData -// -//============================================================================ - -HRESULT WINAPI - D3DXSHPRTCompSplitMeshSC( - UINT *pClusterIDs, - UINT NumVertices, - UINT NumClusters, - UINT *pSuperClusterIDs, - UINT NumSuperClusters, - LPVOID pInputIB, - BOOL InputIBIs32Bit, - UINT NumFaces, - LPD3DXBUFFER *ppIBData, - UINT *pIBDataLength, - BOOL OutputIBIs32Bit, - LPD3DXBUFFER *ppFaceRemap, - LPD3DXBUFFER *ppVertData, - UINT *pVertDataLength, - UINT *pSCClusterList, - D3DXSHPRTSPLITMESHCLUSTERDATA *pSCData); - - -#ifdef __cplusplus -} -#endif //__cplusplus - -////////////////////////////////////////////////////////////////////////////// -// -// Definitions of .X file templates used by mesh load/save functions -// that are not RM standard -// -////////////////////////////////////////////////////////////////////////////// - -// {3CF169CE-FF7C-44ab-93C0-F78F62D172E2} -DEFINE_GUID(DXFILEOBJ_XSkinMeshHeader, -0x3cf169ce, 0xff7c, 0x44ab, 0x93, 0xc0, 0xf7, 0x8f, 0x62, 0xd1, 0x72, 0xe2); - -// {B8D65549-D7C9-4995-89CF-53A9A8B031E3} -DEFINE_GUID(DXFILEOBJ_VertexDuplicationIndices, -0xb8d65549, 0xd7c9, 0x4995, 0x89, 0xcf, 0x53, 0xa9, 0xa8, 0xb0, 0x31, 0xe3); - -// {A64C844A-E282-4756-8B80-250CDE04398C} -DEFINE_GUID(DXFILEOBJ_FaceAdjacency, -0xa64c844a, 0xe282, 0x4756, 0x8b, 0x80, 0x25, 0xc, 0xde, 0x4, 0x39, 0x8c); - -// {6F0D123B-BAD2-4167-A0D0-80224F25FABB} -DEFINE_GUID(DXFILEOBJ_SkinWeights, -0x6f0d123b, 0xbad2, 0x4167, 0xa0, 0xd0, 0x80, 0x22, 0x4f, 0x25, 0xfa, 0xbb); - -// {A3EB5D44-FC22-429d-9AFB-3221CB9719A6} -DEFINE_GUID(DXFILEOBJ_Patch, -0xa3eb5d44, 0xfc22, 0x429d, 0x9a, 0xfb, 0x32, 0x21, 0xcb, 0x97, 0x19, 0xa6); - -// {D02C95CC-EDBA-4305-9B5D-1820D7704BBF} -DEFINE_GUID(DXFILEOBJ_PatchMesh, -0xd02c95cc, 0xedba, 0x4305, 0x9b, 0x5d, 0x18, 0x20, 0xd7, 0x70, 0x4b, 0xbf); - -// {B9EC94E1-B9A6-4251-BA18-94893F02C0EA} -DEFINE_GUID(DXFILEOBJ_PatchMesh9, -0xb9ec94e1, 0xb9a6, 0x4251, 0xba, 0x18, 0x94, 0x89, 0x3f, 0x2, 0xc0, 0xea); - -// {B6C3E656-EC8B-4b92-9B62-681659522947} -DEFINE_GUID(DXFILEOBJ_PMInfo, -0xb6c3e656, 0xec8b, 0x4b92, 0x9b, 0x62, 0x68, 0x16, 0x59, 0x52, 0x29, 0x47); - -// {917E0427-C61E-4a14-9C64-AFE65F9E9844} -DEFINE_GUID(DXFILEOBJ_PMAttributeRange, -0x917e0427, 0xc61e, 0x4a14, 0x9c, 0x64, 0xaf, 0xe6, 0x5f, 0x9e, 0x98, 0x44); - -// {574CCC14-F0B3-4333-822D-93E8A8A08E4C} -DEFINE_GUID(DXFILEOBJ_PMVSplitRecord, -0x574ccc14, 0xf0b3, 0x4333, 0x82, 0x2d, 0x93, 0xe8, 0xa8, 0xa0, 0x8e, 0x4c); - -// {B6E70A0E-8EF9-4e83-94AD-ECC8B0C04897} -DEFINE_GUID(DXFILEOBJ_FVFData, -0xb6e70a0e, 0x8ef9, 0x4e83, 0x94, 0xad, 0xec, 0xc8, 0xb0, 0xc0, 0x48, 0x97); - -// {F752461C-1E23-48f6-B9F8-8350850F336F} -DEFINE_GUID(DXFILEOBJ_VertexElement, -0xf752461c, 0x1e23, 0x48f6, 0xb9, 0xf8, 0x83, 0x50, 0x85, 0xf, 0x33, 0x6f); - -// {BF22E553-292C-4781-9FEA-62BD554BDD93} -DEFINE_GUID(DXFILEOBJ_DeclData, -0xbf22e553, 0x292c, 0x4781, 0x9f, 0xea, 0x62, 0xbd, 0x55, 0x4b, 0xdd, 0x93); - -// {F1CFE2B3-0DE3-4e28-AFA1-155A750A282D} -DEFINE_GUID(DXFILEOBJ_EffectFloats, -0xf1cfe2b3, 0xde3, 0x4e28, 0xaf, 0xa1, 0x15, 0x5a, 0x75, 0xa, 0x28, 0x2d); - -// {D55B097E-BDB6-4c52-B03D-6051C89D0E42} -DEFINE_GUID(DXFILEOBJ_EffectString, -0xd55b097e, 0xbdb6, 0x4c52, 0xb0, 0x3d, 0x60, 0x51, 0xc8, 0x9d, 0xe, 0x42); - -// {622C0ED0-956E-4da9-908A-2AF94F3CE716} -DEFINE_GUID(DXFILEOBJ_EffectDWord, -0x622c0ed0, 0x956e, 0x4da9, 0x90, 0x8a, 0x2a, 0xf9, 0x4f, 0x3c, 0xe7, 0x16); - -// {3014B9A0-62F5-478c-9B86-E4AC9F4E418B} -DEFINE_GUID(DXFILEOBJ_EffectParamFloats, -0x3014b9a0, 0x62f5, 0x478c, 0x9b, 0x86, 0xe4, 0xac, 0x9f, 0x4e, 0x41, 0x8b); - -// {1DBC4C88-94C1-46ee-9076-2C28818C9481} -DEFINE_GUID(DXFILEOBJ_EffectParamString, -0x1dbc4c88, 0x94c1, 0x46ee, 0x90, 0x76, 0x2c, 0x28, 0x81, 0x8c, 0x94, 0x81); - -// {E13963BC-AE51-4c5d-B00F-CFA3A9D97CE5} -DEFINE_GUID(DXFILEOBJ_EffectParamDWord, -0xe13963bc, 0xae51, 0x4c5d, 0xb0, 0xf, 0xcf, 0xa3, 0xa9, 0xd9, 0x7c, 0xe5); - -// {E331F7E4-0559-4cc2-8E99-1CEC1657928F} -DEFINE_GUID(DXFILEOBJ_EffectInstance, -0xe331f7e4, 0x559, 0x4cc2, 0x8e, 0x99, 0x1c, 0xec, 0x16, 0x57, 0x92, 0x8f); - -// {9E415A43-7BA6-4a73-8743-B73D47E88476} -DEFINE_GUID(DXFILEOBJ_AnimTicksPerSecond, -0x9e415a43, 0x7ba6, 0x4a73, 0x87, 0x43, 0xb7, 0x3d, 0x47, 0xe8, 0x84, 0x76); - -// {7F9B00B3-F125-4890-876E-1CFFBF697C4D} -DEFINE_GUID(DXFILEOBJ_CompressedAnimationSet, -0x7f9b00b3, 0xf125, 0x4890, 0x87, 0x6e, 0x1c, 0x42, 0xbf, 0x69, 0x7c, 0x4d); - -#pragma pack(push, 1) -typedef struct _XFILECOMPRESSEDANIMATIONSET -{ - DWORD CompressedBlockSize; - FLOAT TicksPerSec; - DWORD PlaybackType; - DWORD BufferLength; -} XFILECOMPRESSEDANIMATIONSET; -#pragma pack(pop) - -#define XSKINEXP_TEMPLATES \ - "xof 0303txt 0032\ - template XSkinMeshHeader \ - { \ - <3CF169CE-FF7C-44ab-93C0-F78F62D172E2> \ - WORD nMaxSkinWeightsPerVertex; \ - WORD nMaxSkinWeightsPerFace; \ - WORD nBones; \ - } \ - template VertexDuplicationIndices \ - { \ - <B8D65549-D7C9-4995-89CF-53A9A8B031E3> \ - DWORD nIndices; \ - DWORD nOriginalVertices; \ - array DWORD indices[nIndices]; \ - } \ - template FaceAdjacency \ - { \ - <A64C844A-E282-4756-8B80-250CDE04398C> \ - DWORD nIndices; \ - array DWORD indices[nIndices]; \ - } \ - template SkinWeights \ - { \ - <6F0D123B-BAD2-4167-A0D0-80224F25FABB> \ - STRING transformNodeName; \ - DWORD nWeights; \ - array DWORD vertexIndices[nWeights]; \ - array float weights[nWeights]; \ - Matrix4x4 matrixOffset; \ - } \ - template Patch \ - { \ - <A3EB5D44-FC22-429D-9AFB-3221CB9719A6> \ - DWORD nControlIndices; \ - array DWORD controlIndices[nControlIndices]; \ - } \ - template PatchMesh \ - { \ - <D02C95CC-EDBA-4305-9B5D-1820D7704BBF> \ - DWORD nVertices; \ - array Vector vertices[nVertices]; \ - DWORD nPatches; \ - array Patch patches[nPatches]; \ - [ ... ] \ - } \ - template PatchMesh9 \ - { \ - <B9EC94E1-B9A6-4251-BA18-94893F02C0EA> \ - DWORD Type; \ - DWORD Degree; \ - DWORD Basis; \ - DWORD nVertices; \ - array Vector vertices[nVertices]; \ - DWORD nPatches; \ - array Patch patches[nPatches]; \ - [ ... ] \ - } " \ - "template EffectFloats \ - { \ - <F1CFE2B3-0DE3-4e28-AFA1-155A750A282D> \ - DWORD nFloats; \ - array float Floats[nFloats]; \ - } \ - template EffectString \ - { \ - <D55B097E-BDB6-4c52-B03D-6051C89D0E42> \ - STRING Value; \ - } \ - template EffectDWord \ - { \ - <622C0ED0-956E-4da9-908A-2AF94F3CE716> \ - DWORD Value; \ - } " \ - "template EffectParamFloats \ - { \ - <3014B9A0-62F5-478c-9B86-E4AC9F4E418B> \ - STRING ParamName; \ - DWORD nFloats; \ - array float Floats[nFloats]; \ - } " \ - "template EffectParamString \ - { \ - <1DBC4C88-94C1-46ee-9076-2C28818C9481> \ - STRING ParamName; \ - STRING Value; \ - } \ - template EffectParamDWord \ - { \ - <E13963BC-AE51-4c5d-B00F-CFA3A9D97CE5> \ - STRING ParamName; \ - DWORD Value; \ - } \ - template EffectInstance \ - { \ - <E331F7E4-0559-4cc2-8E99-1CEC1657928F> \ - STRING EffectFilename; \ - [ ... ] \ - } " \ - "template AnimTicksPerSecond \ - { \ - <9E415A43-7BA6-4a73-8743-B73D47E88476> \ - DWORD AnimTicksPerSecond; \ - } \ - template CompressedAnimationSet \ - { \ - <7F9B00B3-F125-4890-876E-1C42BF697C4D> \ - DWORD CompressedBlockSize; \ - FLOAT TicksPerSec; \ - DWORD PlaybackType; \ - DWORD BufferLength; \ - array DWORD CompressedData[BufferLength]; \ - } " - -#define XEXTENSIONS_TEMPLATES \ - "xof 0303txt 0032\ - template FVFData \ - { \ - <B6E70A0E-8EF9-4e83-94AD-ECC8B0C04897> \ - DWORD dwFVF; \ - DWORD nDWords; \ - array DWORD data[nDWords]; \ - } \ - template VertexElement \ - { \ - <F752461C-1E23-48f6-B9F8-8350850F336F> \ - DWORD Type; \ - DWORD Method; \ - DWORD Usage; \ - DWORD UsageIndex; \ - } \ - template DeclData \ - { \ - <BF22E553-292C-4781-9FEA-62BD554BDD93> \ - DWORD nElements; \ - array VertexElement Elements[nElements]; \ - DWORD nDWords; \ - array DWORD data[nDWords]; \ - } \ - template PMAttributeRange \ - { \ - <917E0427-C61E-4a14-9C64-AFE65F9E9844> \ - DWORD iFaceOffset; \ - DWORD nFacesMin; \ - DWORD nFacesMax; \ - DWORD iVertexOffset; \ - DWORD nVerticesMin; \ - DWORD nVerticesMax; \ - } \ - template PMVSplitRecord \ - { \ - <574CCC14-F0B3-4333-822D-93E8A8A08E4C> \ - DWORD iFaceCLW; \ - DWORD iVlrOffset; \ - DWORD iCode; \ - } \ - template PMInfo \ - { \ - <B6C3E656-EC8B-4b92-9B62-681659522947> \ - DWORD nAttributes; \ - array PMAttributeRange attributeRanges[nAttributes]; \ - DWORD nMaxValence; \ - DWORD nMinLogicalVertices; \ - DWORD nMaxLogicalVertices; \ - DWORD nVSplits; \ - array PMVSplitRecord splitRecords[nVSplits]; \ - DWORD nAttributeMispredicts; \ - array DWORD attributeMispredicts[nAttributeMispredicts]; \ - } " - -#endif //__D3DX9MESH_H__ - - diff --git a/builddir/irrlicht-1.8.1/include/d3dx9shader.h b/builddir/irrlicht-1.8.1/include/d3dx9shader.h deleted file mode 100644 index 5ed3f01..0000000 --- a/builddir/irrlicht-1.8.1/include/d3dx9shader.h +++ /dev/null @@ -1,1010 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// File: d3dx9shader.h -// Content: D3DX Shader APIs -// -////////////////////////////////////////////////////////////////////////////// - -#include "d3dx9.h" - -#ifndef __D3DX9SHADER_H__ -#define __D3DX9SHADER_H__ - - -//--------------------------------------------------------------------------- -// D3DXTX_VERSION: -// -------------- -// Version token used to create a procedural texture filler in effects -// Used by D3DXFill[]TX functions -//--------------------------------------------------------------------------- -#define D3DXTX_VERSION(_Major,_Minor) (('T' << 24) | ('X' << 16) | ((_Major) << 8) | (_Minor)) - - - -//---------------------------------------------------------------------------- -// D3DXSHADER flags: -// ----------------- -// D3DXSHADER_DEBUG -// Insert debug file/line/type/symbol information. -// -// D3DXSHADER_SKIPVALIDATION -// Do not validate the generated code against known capabilities and -// constraints. This option is only recommended when compiling shaders -// you KNOW will work. (ie. have compiled before without this option.) -// Shaders are always validated by D3D before they are set to the device. -// -// D3DXSHADER_SKIPOPTIMIZATION -// Instructs the compiler to skip optimization steps during code generation. -// Unless you are trying to isolate a problem in your code using this option -// is not recommended. -// -// D3DXSHADER_PACKMATRIX_ROWMAJOR -// Unless explicitly specified, matrices will be packed in row-major order -// on input and output from the shader. -// -// D3DXSHADER_PACKMATRIX_COLUMNMAJOR -// Unless explicitly specified, matrices will be packed in column-major -// order on input and output from the shader. This is generally more -// efficient, since it allows vector-matrix multiplication to be performed -// using a series of dot-products. -// -// D3DXSHADER_PARTIALPRECISION -// Force all computations in resulting shader to occur at partial precision. -// This may result in faster evaluation of shaders on some hardware. -// -// D3DXSHADER_FORCE_VS_SOFTWARE_NOOPT -// Force compiler to compile against the next highest available software -// target for vertex shaders. This flag also turns optimizations off, -// and debugging on. -// -// D3DXSHADER_FORCE_PS_SOFTWARE_NOOPT -// Force compiler to compile against the next highest available software -// target for pixel shaders. This flag also turns optimizations off, -// and debugging on. -// -// D3DXSHADER_NO_PRESHADER -// Disables Preshaders. Using this flag will cause the compiler to not -// pull out static expression for evaluation on the host cpu -// -// D3DXSHADER_AVOID_FLOW_CONTROL -// Hint compiler to avoid flow-control constructs where possible. -// -// D3DXSHADER_PREFER_FLOW_CONTROL -// Hint compiler to prefer flow-control constructs where possible. -// -//---------------------------------------------------------------------------- - -#define D3DXSHADER_DEBUG (1 << 0) -#define D3DXSHADER_SKIPVALIDATION (1 << 1) -#define D3DXSHADER_SKIPOPTIMIZATION (1 << 2) -#define D3DXSHADER_PACKMATRIX_ROWMAJOR (1 << 3) -#define D3DXSHADER_PACKMATRIX_COLUMNMAJOR (1 << 4) -#define D3DXSHADER_PARTIALPRECISION (1 << 5) -#define D3DXSHADER_FORCE_VS_SOFTWARE_NOOPT (1 << 6) -#define D3DXSHADER_FORCE_PS_SOFTWARE_NOOPT (1 << 7) -#define D3DXSHADER_NO_PRESHADER (1 << 8) -#define D3DXSHADER_AVOID_FLOW_CONTROL (1 << 9) -#define D3DXSHADER_PREFER_FLOW_CONTROL (1 << 10) -#define D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY (1 << 12) -#define D3DXSHADER_IEEE_STRICTNESS (1 << 13) -#define D3DXSHADER_USE_LEGACY_D3DX9_31_DLL (1 << 16) - - -// optimization level flags -#define D3DXSHADER_OPTIMIZATION_LEVEL0 (1 << 14) -#define D3DXSHADER_OPTIMIZATION_LEVEL1 0 -#define D3DXSHADER_OPTIMIZATION_LEVEL2 ((1 << 14) | (1 << 15)) -#define D3DXSHADER_OPTIMIZATION_LEVEL3 (1 << 15) - - - -//---------------------------------------------------------------------------- -// D3DXCONSTTABLE flags: -// ------------------- - -#define D3DXCONSTTABLE_LARGEADDRESSAWARE (1 << 17) - - - -//---------------------------------------------------------------------------- -// D3DXHANDLE: -// ----------- -// Handle values used to efficiently reference shader and effect parameters. -// Strings can be used as handles. However, handles are not always strings. -//---------------------------------------------------------------------------- - -#ifndef D3DXFX_LARGEADDRESS_HANDLE -typedef LPCSTR D3DXHANDLE; -#else -typedef UINT_PTR D3DXHANDLE; -#endif -typedef D3DXHANDLE *LPD3DXHANDLE; - - -//---------------------------------------------------------------------------- -// D3DXMACRO: -// ---------- -// Preprocessor macro definition. The application pass in a NULL-terminated -// array of this structure to various D3DX APIs. This enables the application -// to #define tokens at runtime, before the file is parsed. -//---------------------------------------------------------------------------- - -typedef struct _D3DXMACRO -{ - LPCSTR Name; - LPCSTR Definition; - -} D3DXMACRO, *LPD3DXMACRO; - - -//---------------------------------------------------------------------------- -// D3DXSEMANTIC: -//---------------------------------------------------------------------------- - -typedef struct _D3DXSEMANTIC -{ - UINT Usage; - UINT UsageIndex; - -} D3DXSEMANTIC, *LPD3DXSEMANTIC; - - - -//---------------------------------------------------------------------------- -// D3DXREGISTER_SET: -//---------------------------------------------------------------------------- - -typedef enum _D3DXREGISTER_SET -{ - D3DXRS_BOOL, - D3DXRS_INT4, - D3DXRS_FLOAT4, - D3DXRS_SAMPLER, - - // force 32-bit size enum - D3DXRS_FORCE_DWORD = 0x7fffffff - -} D3DXREGISTER_SET, *LPD3DXREGISTER_SET; - - -//---------------------------------------------------------------------------- -// D3DXPARAMETER_CLASS: -//---------------------------------------------------------------------------- - -typedef enum _D3DXPARAMETER_CLASS -{ - D3DXPC_SCALAR, - D3DXPC_VECTOR, - D3DXPC_MATRIX_ROWS, - D3DXPC_MATRIX_COLUMNS, - D3DXPC_OBJECT, - D3DXPC_STRUCT, - - // force 32-bit size enum - D3DXPC_FORCE_DWORD = 0x7fffffff - -} D3DXPARAMETER_CLASS, *LPD3DXPARAMETER_CLASS; - - -//---------------------------------------------------------------------------- -// D3DXPARAMETER_TYPE: -//---------------------------------------------------------------------------- - -typedef enum _D3DXPARAMETER_TYPE -{ - D3DXPT_VOID, - D3DXPT_BOOL, - D3DXPT_INT, - D3DXPT_FLOAT, - D3DXPT_STRING, - D3DXPT_TEXTURE, - D3DXPT_TEXTURE1D, - D3DXPT_TEXTURE2D, - D3DXPT_TEXTURE3D, - D3DXPT_TEXTURECUBE, - D3DXPT_SAMPLER, - D3DXPT_SAMPLER1D, - D3DXPT_SAMPLER2D, - D3DXPT_SAMPLER3D, - D3DXPT_SAMPLERCUBE, - D3DXPT_PIXELSHADER, - D3DXPT_VERTEXSHADER, - D3DXPT_PIXELFRAGMENT, - D3DXPT_VERTEXFRAGMENT, - D3DXPT_UNSUPPORTED, - - // force 32-bit size enum - D3DXPT_FORCE_DWORD = 0x7fffffff - -} D3DXPARAMETER_TYPE, *LPD3DXPARAMETER_TYPE; - - -//---------------------------------------------------------------------------- -// D3DXCONSTANTTABLE_DESC: -//---------------------------------------------------------------------------- - -typedef struct _D3DXCONSTANTTABLE_DESC -{ - LPCSTR Creator; // Creator string - DWORD Version; // Shader version - UINT Constants; // Number of constants - -} D3DXCONSTANTTABLE_DESC, *LPD3DXCONSTANTTABLE_DESC; - - -//---------------------------------------------------------------------------- -// D3DXCONSTANT_DESC: -//---------------------------------------------------------------------------- - -typedef struct _D3DXCONSTANT_DESC -{ - LPCSTR Name; // Constant name - - D3DXREGISTER_SET RegisterSet; // Register set - UINT RegisterIndex; // Register index - UINT RegisterCount; // Number of registers occupied - - D3DXPARAMETER_CLASS Class; // Class - D3DXPARAMETER_TYPE Type; // Component type - - UINT Rows; // Number of rows - UINT Columns; // Number of columns - UINT Elements; // Number of array elements - UINT StructMembers; // Number of structure member sub-parameters - - UINT Bytes; // Data size, in bytes - LPCVOID DefaultValue; // Pointer to default value - -} D3DXCONSTANT_DESC, *LPD3DXCONSTANT_DESC; - - - -//---------------------------------------------------------------------------- -// ID3DXConstantTable: -//---------------------------------------------------------------------------- - -typedef interface ID3DXConstantTable ID3DXConstantTable; -typedef interface ID3DXConstantTable *LPD3DXCONSTANTTABLE; - -// {AB3C758F-093E-4356-B762-4DB18F1B3A01} -DEFINE_GUID(IID_ID3DXConstantTable, -0xab3c758f, 0x93e, 0x4356, 0xb7, 0x62, 0x4d, 0xb1, 0x8f, 0x1b, 0x3a, 0x1); - - -#undef INTERFACE -#define INTERFACE ID3DXConstantTable - -DECLARE_INTERFACE_(ID3DXConstantTable, IUnknown) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // Buffer - STDMETHOD_(LPVOID, GetBufferPointer)(THIS) PURE; - STDMETHOD_(DWORD, GetBufferSize)(THIS) PURE; - - // Descs - STDMETHOD(GetDesc)(THIS_ D3DXCONSTANTTABLE_DESC *pDesc) PURE; - STDMETHOD(GetConstantDesc)(THIS_ D3DXHANDLE hConstant, D3DXCONSTANT_DESC *pConstantDesc, UINT *pCount) PURE; - STDMETHOD_(UINT, GetSamplerIndex)(THIS_ D3DXHANDLE hConstant) PURE; - - // Handle operations - STDMETHOD_(D3DXHANDLE, GetConstant)(THIS_ D3DXHANDLE hConstant, UINT Index) PURE; - STDMETHOD_(D3DXHANDLE, GetConstantByName)(THIS_ D3DXHANDLE hConstant, LPCSTR pName) PURE; - STDMETHOD_(D3DXHANDLE, GetConstantElement)(THIS_ D3DXHANDLE hConstant, UINT Index) PURE; - - // Set Constants - STDMETHOD(SetDefaults)(THIS_ LPDIRECT3DDEVICE9 pDevice) PURE; - STDMETHOD(SetValue)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, LPCVOID pData, UINT Bytes) PURE; - STDMETHOD(SetBool)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, BOOL b) PURE; - STDMETHOD(SetBoolArray)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST BOOL* pb, UINT Count) PURE; - STDMETHOD(SetInt)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, INT n) PURE; - STDMETHOD(SetIntArray)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST INT* pn, UINT Count) PURE; - STDMETHOD(SetFloat)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, FLOAT f) PURE; - STDMETHOD(SetFloatArray)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST FLOAT* pf, UINT Count) PURE; - STDMETHOD(SetVector)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST D3DXVECTOR4* pVector) PURE; - STDMETHOD(SetVectorArray)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST D3DXVECTOR4* pVector, UINT Count) PURE; - STDMETHOD(SetMatrix)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST D3DXMATRIX* pMatrix) PURE; - STDMETHOD(SetMatrixArray)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST D3DXMATRIX* pMatrix, UINT Count) PURE; - STDMETHOD(SetMatrixPointerArray)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE; - STDMETHOD(SetMatrixTranspose)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST D3DXMATRIX* pMatrix) PURE; - STDMETHOD(SetMatrixTransposeArray)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST D3DXMATRIX* pMatrix, UINT Count) PURE; - STDMETHOD(SetMatrixTransposePointerArray)(THIS_ LPDIRECT3DDEVICE9 pDevice, D3DXHANDLE hConstant, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE; -}; - - -//---------------------------------------------------------------------------- -// ID3DXTextureShader: -//---------------------------------------------------------------------------- - -typedef interface ID3DXTextureShader ID3DXTextureShader; -typedef interface ID3DXTextureShader *LPD3DXTEXTURESHADER; - -// {3E3D67F8-AA7A-405d-A857-BA01D4758426} -DEFINE_GUID(IID_ID3DXTextureShader, -0x3e3d67f8, 0xaa7a, 0x405d, 0xa8, 0x57, 0xba, 0x1, 0xd4, 0x75, 0x84, 0x26); - -#undef INTERFACE -#define INTERFACE ID3DXTextureShader - -DECLARE_INTERFACE_(ID3DXTextureShader, IUnknown) -{ - // IUnknown - STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; - STDMETHOD_(ULONG, AddRef)(THIS) PURE; - STDMETHOD_(ULONG, Release)(THIS) PURE; - - // Gets - STDMETHOD(GetFunction)(THIS_ LPD3DXBUFFER *ppFunction) PURE; - STDMETHOD(GetConstantBuffer)(THIS_ LPD3DXBUFFER *ppConstantBuffer) PURE; - - // Descs - STDMETHOD(GetDesc)(THIS_ D3DXCONSTANTTABLE_DESC *pDesc) PURE; - STDMETHOD(GetConstantDesc)(THIS_ D3DXHANDLE hConstant, D3DXCONSTANT_DESC *pConstantDesc, UINT *pCount) PURE; - - // Handle operations - STDMETHOD_(D3DXHANDLE, GetConstant)(THIS_ D3DXHANDLE hConstant, UINT Index) PURE; - STDMETHOD_(D3DXHANDLE, GetConstantByName)(THIS_ D3DXHANDLE hConstant, LPCSTR pName) PURE; - STDMETHOD_(D3DXHANDLE, GetConstantElement)(THIS_ D3DXHANDLE hConstant, UINT Index) PURE; - - // Set Constants - STDMETHOD(SetDefaults)(THIS) PURE; - STDMETHOD(SetValue)(THIS_ D3DXHANDLE hConstant, LPCVOID pData, UINT Bytes) PURE; - STDMETHOD(SetBool)(THIS_ D3DXHANDLE hConstant, BOOL b) PURE; - STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE hConstant, CONST BOOL* pb, UINT Count) PURE; - STDMETHOD(SetInt)(THIS_ D3DXHANDLE hConstant, INT n) PURE; - STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE hConstant, CONST INT* pn, UINT Count) PURE; - STDMETHOD(SetFloat)(THIS_ D3DXHANDLE hConstant, FLOAT f) PURE; - STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE hConstant, CONST FLOAT* pf, UINT Count) PURE; - STDMETHOD(SetVector)(THIS_ D3DXHANDLE hConstant, CONST D3DXVECTOR4* pVector) PURE; - STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE hConstant, CONST D3DXVECTOR4* pVector, UINT Count) PURE; - STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE hConstant, CONST D3DXMATRIX* pMatrix) PURE; - STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE hConstant, CONST D3DXMATRIX* pMatrix, UINT Count) PURE; - STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE hConstant, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE; - STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE hConstant, CONST D3DXMATRIX* pMatrix) PURE; - STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE hConstant, CONST D3DXMATRIX* pMatrix, UINT Count) PURE; - STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE hConstant, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE; -}; - - -//---------------------------------------------------------------------------- -// D3DXINCLUDE_TYPE: -//---------------------------------------------------------------------------- - -typedef enum _D3DXINCLUDE_TYPE -{ - D3DXINC_LOCAL, - D3DXINC_SYSTEM, - - // force 32-bit size enum - D3DXINC_FORCE_DWORD = 0x7fffffff - -} D3DXINCLUDE_TYPE, *LPD3DXINCLUDE_TYPE; - - -//---------------------------------------------------------------------------- -// ID3DXInclude: -// ------------- -// This interface is intended to be implemented by the application, and can -// be used by various D3DX APIs. This enables application-specific handling -// of #include directives in source files. -// -// Open() -// Opens an include file. If successful, it should fill in ppData and -// pBytes. The data pointer returned must remain valid until Close is -// subsequently called. The name of the file is encoded in UTF-8 format. -// Close() -// Closes an include file. If Open was successful, Close is guaranteed -// to be called before the API using this interface returns. -//---------------------------------------------------------------------------- - -typedef interface ID3DXInclude ID3DXInclude; -typedef interface ID3DXInclude *LPD3DXINCLUDE; - -#undef INTERFACE -#define INTERFACE ID3DXInclude - -DECLARE_INTERFACE(ID3DXInclude) -{ - STDMETHOD(Open)(THIS_ D3DXINCLUDE_TYPE IncludeType, LPCSTR pFileName, LPCVOID pParentData, LPCVOID *ppData, UINT *pBytes) PURE; - STDMETHOD(Close)(THIS_ LPCVOID pData) PURE; -}; - - -////////////////////////////////////////////////////////////////////////////// -// APIs ////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// - -#ifdef __cplusplus -extern "C" { -#endif //__cplusplus - - -//---------------------------------------------------------------------------- -// D3DXAssembleShader: -// ------------------- -// Assembles a shader. -// -// Parameters: -// pSrcFile -// Source file name -// hSrcModule -// Module handle. if NULL, current module will be used -// pSrcResource -// Resource name in module -// pSrcData -// Pointer to source code -// SrcDataLen -// Size of source code, in bytes -// pDefines -// Optional NULL-terminated array of preprocessor macro definitions. -// pInclude -// Optional interface pointer to use for handling #include directives. -// If this parameter is NULL, #includes will be honored when assembling -// from file, and will error when assembling from resource or memory. -// Flags -// See D3DXSHADER_xxx flags -// ppShader -// Returns a buffer containing the created shader. This buffer contains -// the assembled shader code, as well as any embedded debug info. -// ppErrorMsgs -// Returns a buffer containing a listing of errors and warnings that were -// encountered during assembly. If you are running in a debugger, -// these are the same messages you will see in your debug output. -//---------------------------------------------------------------------------- - - -HRESULT WINAPI - D3DXAssembleShaderFromFileA( - LPCSTR pSrcFile, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - DWORD Flags, - LPD3DXBUFFER* ppShader, - LPD3DXBUFFER* ppErrorMsgs); - -HRESULT WINAPI - D3DXAssembleShaderFromFileW( - LPCWSTR pSrcFile, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - DWORD Flags, - LPD3DXBUFFER* ppShader, - LPD3DXBUFFER* ppErrorMsgs); - -#ifdef UNICODE -#define D3DXAssembleShaderFromFile D3DXAssembleShaderFromFileW -#else -#define D3DXAssembleShaderFromFile D3DXAssembleShaderFromFileA -#endif - - -HRESULT WINAPI - D3DXAssembleShaderFromResourceA( - HMODULE hSrcModule, - LPCSTR pSrcResource, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - DWORD Flags, - LPD3DXBUFFER* ppShader, - LPD3DXBUFFER* ppErrorMsgs); - -HRESULT WINAPI - D3DXAssembleShaderFromResourceW( - HMODULE hSrcModule, - LPCWSTR pSrcResource, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - DWORD Flags, - LPD3DXBUFFER* ppShader, - LPD3DXBUFFER* ppErrorMsgs); - -#ifdef UNICODE -#define D3DXAssembleShaderFromResource D3DXAssembleShaderFromResourceW -#else -#define D3DXAssembleShaderFromResource D3DXAssembleShaderFromResourceA -#endif - - -HRESULT WINAPI - D3DXAssembleShader( - LPCSTR pSrcData, - UINT SrcDataLen, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - DWORD Flags, - LPD3DXBUFFER* ppShader, - LPD3DXBUFFER* ppErrorMsgs); - - - -//---------------------------------------------------------------------------- -// D3DXCompileShader: -// ------------------ -// Compiles a shader. -// -// Parameters: -// pSrcFile -// Source file name. -// hSrcModule -// Module handle. if NULL, current module will be used. -// pSrcResource -// Resource name in module. -// pSrcData -// Pointer to source code. -// SrcDataLen -// Size of source code, in bytes. -// pDefines -// Optional NULL-terminated array of preprocessor macro definitions. -// pInclude -// Optional interface pointer to use for handling #include directives. -// If this parameter is NULL, #includes will be honored when compiling -// from file, and will error when compiling from resource or memory. -// pFunctionName -// Name of the entrypoint function where execution should begin. -// pProfile -// Instruction set to be used when generating code. Currently supported -// profiles are "vs_1_1", "vs_2_0", "vs_2_a", "vs_2_sw", "ps_1_1", -// "ps_1_2", "ps_1_3", "ps_1_4", "ps_2_0", "ps_2_a", "ps_2_sw", "tx_1_0" -// Flags -// See D3DXSHADER_xxx flags. -// ppShader -// Returns a buffer containing the created shader. This buffer contains -// the compiled shader code, as well as any embedded debug and symbol -// table info. (See D3DXGetShaderConstantTable) -// ppErrorMsgs -// Returns a buffer containing a listing of errors and warnings that were -// encountered during the compile. If you are running in a debugger, -// these are the same messages you will see in your debug output. -// ppConstantTable -// Returns a ID3DXConstantTable object which can be used to set -// shader constants to the device. Alternatively, an application can -// parse the D3DXSHADER_CONSTANTTABLE block embedded as a comment within -// the shader. -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXCompileShaderFromFileA( - LPCSTR pSrcFile, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - LPCSTR pFunctionName, - LPCSTR pProfile, - DWORD Flags, - LPD3DXBUFFER* ppShader, - LPD3DXBUFFER* ppErrorMsgs, - LPD3DXCONSTANTTABLE* ppConstantTable); - -HRESULT WINAPI - D3DXCompileShaderFromFileW( - LPCWSTR pSrcFile, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - LPCSTR pFunctionName, - LPCSTR pProfile, - DWORD Flags, - LPD3DXBUFFER* ppShader, - LPD3DXBUFFER* ppErrorMsgs, - LPD3DXCONSTANTTABLE* ppConstantTable); - -#ifdef UNICODE -#define D3DXCompileShaderFromFile D3DXCompileShaderFromFileW -#else -#define D3DXCompileShaderFromFile D3DXCompileShaderFromFileA -#endif - - -HRESULT WINAPI - D3DXCompileShaderFromResourceA( - HMODULE hSrcModule, - LPCSTR pSrcResource, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - LPCSTR pFunctionName, - LPCSTR pProfile, - DWORD Flags, - LPD3DXBUFFER* ppShader, - LPD3DXBUFFER* ppErrorMsgs, - LPD3DXCONSTANTTABLE* ppConstantTable); - -HRESULT WINAPI - D3DXCompileShaderFromResourceW( - HMODULE hSrcModule, - LPCWSTR pSrcResource, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - LPCSTR pFunctionName, - LPCSTR pProfile, - DWORD Flags, - LPD3DXBUFFER* ppShader, - LPD3DXBUFFER* ppErrorMsgs, - LPD3DXCONSTANTTABLE* ppConstantTable); - -#ifdef UNICODE -#define D3DXCompileShaderFromResource D3DXCompileShaderFromResourceW -#else -#define D3DXCompileShaderFromResource D3DXCompileShaderFromResourceA -#endif - - -HRESULT WINAPI - D3DXCompileShader( - LPCSTR pSrcData, - UINT SrcDataLen, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - LPCSTR pFunctionName, - LPCSTR pProfile, - DWORD Flags, - LPD3DXBUFFER* ppShader, - LPD3DXBUFFER* ppErrorMsgs, - LPD3DXCONSTANTTABLE* ppConstantTable); - - -//---------------------------------------------------------------------------- -// D3DXDisassembleShader: -// ---------------------- -// Takes a binary shader, and returns a buffer containing text assembly. -// -// Parameters: -// pShader -// Pointer to the shader byte code. -// ShaderSizeInBytes -// Size of the shader byte code in bytes. -// EnableColorCode -// Emit HTML tags for color coding the output? -// pComments -// Pointer to a comment string to include at the top of the shader. -// ppDisassembly -// Returns a buffer containing the disassembled shader. -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXDisassembleShader( - CONST DWORD* pShader, - BOOL EnableColorCode, - LPCSTR pComments, - LPD3DXBUFFER* ppDisassembly); - - -//---------------------------------------------------------------------------- -// D3DXGetPixelShaderProfile/D3DXGetVertexShaderProfile: -// ----------------------------------------------------- -// Returns the name of the HLSL profile best suited to a given device. -// -// Parameters: -// pDevice -// Pointer to the device in question -//---------------------------------------------------------------------------- - -LPCSTR WINAPI - D3DXGetPixelShaderProfile( - LPDIRECT3DDEVICE9 pDevice); - -LPCSTR WINAPI - D3DXGetVertexShaderProfile( - LPDIRECT3DDEVICE9 pDevice); - - -//---------------------------------------------------------------------------- -// D3DXFindShaderComment: -// ---------------------- -// Searches through a shader for a particular comment, denoted by a FourCC in -// the first DWORD of the comment. If the comment is not found, and no other -// error has occurred, S_FALSE is returned. -// -// Parameters: -// pFunction -// Pointer to the function DWORD stream -// FourCC -// FourCC used to identify the desired comment block. -// ppData -// Returns a pointer to the comment data (not including comment token -// and FourCC). Can be NULL. -// pSizeInBytes -// Returns the size of the comment data in bytes. Can be NULL. -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXFindShaderComment( - CONST DWORD* pFunction, - DWORD FourCC, - LPCVOID* ppData, - UINT* pSizeInBytes); - - -//---------------------------------------------------------------------------- -// D3DXGetShaderSize: -// ------------------ -// Returns the size of the shader byte-code, in bytes. -// -// Parameters: -// pFunction -// Pointer to the function DWORD stream -//---------------------------------------------------------------------------- - -UINT WINAPI - D3DXGetShaderSize( - CONST DWORD* pFunction); - - -//---------------------------------------------------------------------------- -// D3DXGetShaderVersion: -// ----------------------- -// Returns the shader version of a given shader. Returns zero if the shader -// function is NULL. -// -// Parameters: -// pFunction -// Pointer to the function DWORD stream -//---------------------------------------------------------------------------- - -DWORD WINAPI - D3DXGetShaderVersion( - CONST DWORD* pFunction); - -//---------------------------------------------------------------------------- -// D3DXGetShaderSemantics: -// ----------------------- -// Gets semantics for all input elements referenced inside a given shader. -// -// Parameters: -// pFunction -// Pointer to the function DWORD stream -// pSemantics -// Pointer to an array of D3DXSEMANTIC structures. The function will -// fill this array with the semantics for each input element referenced -// inside the shader. This array is assumed to contain at least -// MAXD3DDECLLENGTH elements. -// pCount -// Returns the number of elements referenced by the shader -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXGetShaderInputSemantics( - CONST DWORD* pFunction, - D3DXSEMANTIC* pSemantics, - UINT* pCount); - -HRESULT WINAPI - D3DXGetShaderOutputSemantics( - CONST DWORD* pFunction, - D3DXSEMANTIC* pSemantics, - UINT* pCount); - - -//---------------------------------------------------------------------------- -// D3DXGetShaderSamplers: -// ---------------------- -// Gets semantics for all input elements referenced inside a given shader. -// -// pFunction -// Pointer to the function DWORD stream -// pSamplers -// Pointer to an array of LPCSTRs. The function will fill this array -// with pointers to the sampler names contained within pFunction, for -// each sampler referenced inside the shader. This array is assumed to -// contain at least 16 elements. -// pCount -// Returns the number of samplers referenced by the shader -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXGetShaderSamplers( - CONST DWORD* pFunction, - LPCSTR* pSamplers, - UINT* pCount); - - -//---------------------------------------------------------------------------- -// D3DXGetShaderConstantTable: -// --------------------------- -// Gets shader constant table embedded inside shader. A constant table is -// generated by D3DXAssembleShader and D3DXCompileShader, and is embedded in -// the body of the shader. -// -// Parameters: -// pFunction -// Pointer to the function DWORD stream -// Flags -// See D3DXCONSTTABLE_xxx -// ppConstantTable -// Returns a ID3DXConstantTable object which can be used to set -// shader constants to the device. Alternatively, an application can -// parse the D3DXSHADER_CONSTANTTABLE block embedded as a comment within -// the shader. -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXGetShaderConstantTable( - CONST DWORD* pFunction, - LPD3DXCONSTANTTABLE* ppConstantTable); - -HRESULT WINAPI - D3DXGetShaderConstantTableEx( - CONST DWORD* pFunction, - DWORD Flags, - LPD3DXCONSTANTTABLE* ppConstantTable); - - - -//---------------------------------------------------------------------------- -// D3DXCreateTextureShader: -// ------------------------ -// Creates a texture shader object, given the compiled shader. -// -// Parameters -// pFunction -// Pointer to the function DWORD stream -// ppTextureShader -// Returns a ID3DXTextureShader object which can be used to procedurally -// fill the contents of a texture using the D3DXFillTextureTX functions. -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXCreateTextureShader( - CONST DWORD* pFunction, - LPD3DXTEXTURESHADER* ppTextureShader); - - -//---------------------------------------------------------------------------- -// D3DXPreprocessShader: -// --------------------- -// Runs the preprocessor on the specified shader or effect, but does -// not actually compile it. This is useful for evaluating the #includes -// and #defines in a shader and then emitting a reformatted token stream -// for debugging purposes or for generating a self-contained shader. -// -// Parameters: -// pSrcFile -// Source file name -// hSrcModule -// Module handle. if NULL, current module will be used -// pSrcResource -// Resource name in module -// pSrcData -// Pointer to source code -// SrcDataLen -// Size of source code, in bytes -// pDefines -// Optional NULL-terminated array of preprocessor macro definitions. -// pInclude -// Optional interface pointer to use for handling #include directives. -// If this parameter is NULL, #includes will be honored when assembling -// from file, and will error when assembling from resource or memory. -// ppShaderText -// Returns a buffer containing a single large string that represents -// the resulting formatted token stream -// ppErrorMsgs -// Returns a buffer containing a listing of errors and warnings that were -// encountered during assembly. If you are running in a debugger, -// these are the same messages you will see in your debug output. -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXPreprocessShaderFromFileA( - LPCSTR pSrcFile, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - LPD3DXBUFFER* ppShaderText, - LPD3DXBUFFER* ppErrorMsgs); - -HRESULT WINAPI - D3DXPreprocessShaderFromFileW( - LPCWSTR pSrcFile, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - LPD3DXBUFFER* ppShaderText, - LPD3DXBUFFER* ppErrorMsgs); - -#ifdef UNICODE -#define D3DXPreprocessShaderFromFile D3DXPreprocessShaderFromFileW -#else -#define D3DXPreprocessShaderFromFile D3DXPreprocessShaderFromFileA -#endif - -HRESULT WINAPI - D3DXPreprocessShaderFromResourceA( - HMODULE hSrcModule, - LPCSTR pSrcResource, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - LPD3DXBUFFER* ppShaderText, - LPD3DXBUFFER* ppErrorMsgs); - -HRESULT WINAPI - D3DXPreprocessShaderFromResourceW( - HMODULE hSrcModule, - LPCWSTR pSrcResource, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - LPD3DXBUFFER* ppShaderText, - LPD3DXBUFFER* ppErrorMsgs); - -#ifdef UNICODE -#define D3DXPreprocessShaderFromResource D3DXPreprocessShaderFromResourceW -#else -#define D3DXPreprocessShaderFromResource D3DXPreprocessShaderFromResourceA -#endif - -HRESULT WINAPI - D3DXPreprocessShader( - LPCSTR pSrcData, - UINT SrcDataSize, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - LPD3DXBUFFER* ppShaderText, - LPD3DXBUFFER* ppErrorMsgs); - - -#ifdef __cplusplus -} -#endif //__cplusplus - - -////////////////////////////////////////////////////////////////////////////// -// Shader comment block layouts ////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// - -//---------------------------------------------------------------------------- -// D3DXSHADER_CONSTANTTABLE: -// ------------------------- -// Shader constant information; included as an CTAB comment block inside -// shaders. All offsets are BYTE offsets from start of CONSTANTTABLE struct. -// Entries in the table are sorted by Name in ascending order. -//---------------------------------------------------------------------------- - -typedef struct _D3DXSHADER_CONSTANTTABLE -{ - DWORD Size; // sizeof(D3DXSHADER_CONSTANTTABLE) - DWORD Creator; // LPCSTR offset - DWORD Version; // shader version - DWORD Constants; // number of constants - DWORD ConstantInfo; // D3DXSHADER_CONSTANTINFO[Constants] offset - DWORD Flags; // flags shader was compiled with - DWORD Target; // LPCSTR offset - -} D3DXSHADER_CONSTANTTABLE, *LPD3DXSHADER_CONSTANTTABLE; - - -typedef struct _D3DXSHADER_CONSTANTINFO -{ - DWORD Name; // LPCSTR offset - WORD RegisterSet; // D3DXREGISTER_SET - WORD RegisterIndex; // register number - WORD RegisterCount; // number of registers - WORD Reserved; // reserved - DWORD TypeInfo; // D3DXSHADER_TYPEINFO offset - DWORD DefaultValue; // offset of default value - -} D3DXSHADER_CONSTANTINFO, *LPD3DXSHADER_CONSTANTINFO; - - -typedef struct _D3DXSHADER_TYPEINFO -{ - WORD Class; // D3DXPARAMETER_CLASS - WORD Type; // D3DXPARAMETER_TYPE - WORD Rows; // number of rows (matrices) - WORD Columns; // number of columns (vectors and matrices) - WORD Elements; // array dimension - WORD StructMembers; // number of struct members - DWORD StructMemberInfo; // D3DXSHADER_STRUCTMEMBERINFO[Members] offset - -} D3DXSHADER_TYPEINFO, *LPD3DXSHADER_TYPEINFO; - - -typedef struct _D3DXSHADER_STRUCTMEMBERINFO -{ - DWORD Name; // LPCSTR offset - DWORD TypeInfo; // D3DXSHADER_TYPEINFO offset - -} D3DXSHADER_STRUCTMEMBERINFO, *LPD3DXSHADER_STRUCTMEMBERINFO; - - - -#endif //__D3DX9SHADER_H__ - diff --git a/builddir/irrlicht-1.8.1/include/d3dx9shape.h b/builddir/irrlicht-1.8.1/include/d3dx9shape.h deleted file mode 100644 index 4c23091..0000000 --- a/builddir/irrlicht-1.8.1/include/d3dx9shape.h +++ /dev/null @@ -1,221 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) Microsoft Corporation. All Rights Reserved. -// -// File: d3dx9shapes.h -// Content: D3DX simple shapes -// -/////////////////////////////////////////////////////////////////////////// - -#include "d3dx9.h" - -#ifndef __D3DX9SHAPES_H__ -#define __D3DX9SHAPES_H__ - -/////////////////////////////////////////////////////////////////////////// -// Functions: -/////////////////////////////////////////////////////////////////////////// - -#ifdef __cplusplus -extern "C" { -#endif //__cplusplus - - -//------------------------------------------------------------------------- -// D3DXCreatePolygon: -// ------------------ -// Creates a mesh containing an n-sided polygon. The polygon is centered -// at the origin. -// -// Parameters: -// -// pDevice The D3D device with which the mesh is going to be used. -// Length Length of each side. -// Sides Number of sides the polygon has. (Must be >= 3) -// ppMesh The mesh object which will be created -// ppAdjacency Returns a buffer containing adjacency info. Can be NULL. -//------------------------------------------------------------------------- -HRESULT WINAPI - D3DXCreatePolygon( - LPDIRECT3DDEVICE9 pDevice, - FLOAT Length, - UINT Sides, - LPD3DXMESH* ppMesh, - LPD3DXBUFFER* ppAdjacency); - - -//------------------------------------------------------------------------- -// D3DXCreateBox: -// -------------- -// Creates a mesh containing an axis-aligned box. The box is centered at -// the origin. -// -// Parameters: -// -// pDevice The D3D device with which the mesh is going to be used. -// Width Width of box (along X-axis) -// Height Height of box (along Y-axis) -// Depth Depth of box (along Z-axis) -// ppMesh The mesh object which will be created -// ppAdjacency Returns a buffer containing adjacency info. Can be NULL. -//------------------------------------------------------------------------- -HRESULT WINAPI - D3DXCreateBox( - LPDIRECT3DDEVICE9 pDevice, - FLOAT Width, - FLOAT Height, - FLOAT Depth, - LPD3DXMESH* ppMesh, - LPD3DXBUFFER* ppAdjacency); - - -//------------------------------------------------------------------------- -// D3DXCreateCylinder: -// ------------------- -// Creates a mesh containing a cylinder. The generated cylinder is -// centered at the origin, and its axis is aligned with the Z-axis. -// -// Parameters: -// -// pDevice The D3D device with which the mesh is going to be used. -// Radius1 Radius at -Z end (should be >= 0.0f) -// Radius2 Radius at +Z end (should be >= 0.0f) -// Length Length of cylinder (along Z-axis) -// Slices Number of slices about the main axis -// Stacks Number of stacks along the main axis -// ppMesh The mesh object which will be created -// ppAdjacency Returns a buffer containing adjacency info. Can be NULL. -//------------------------------------------------------------------------- -HRESULT WINAPI - D3DXCreateCylinder( - LPDIRECT3DDEVICE9 pDevice, - FLOAT Radius1, - FLOAT Radius2, - FLOAT Length, - UINT Slices, - UINT Stacks, - LPD3DXMESH* ppMesh, - LPD3DXBUFFER* ppAdjacency); - - -//------------------------------------------------------------------------- -// D3DXCreateSphere: -// ----------------- -// Creates a mesh containing a sphere. The sphere is centered at the -// origin. -// -// Parameters: -// -// pDevice The D3D device with which the mesh is going to be used. -// Radius Radius of the sphere (should be >= 0.0f) -// Slices Number of slices about the main axis -// Stacks Number of stacks along the main axis -// ppMesh The mesh object which will be created -// ppAdjacency Returns a buffer containing adjacency info. Can be NULL. -//------------------------------------------------------------------------- -HRESULT WINAPI - D3DXCreateSphere( - LPDIRECT3DDEVICE9 pDevice, - FLOAT Radius, - UINT Slices, - UINT Stacks, - LPD3DXMESH* ppMesh, - LPD3DXBUFFER* ppAdjacency); - - -//------------------------------------------------------------------------- -// D3DXCreateTorus: -// ---------------- -// Creates a mesh containing a torus. The generated torus is centered at -// the origin, and its axis is aligned with the Z-axis. -// -// Parameters: -// -// pDevice The D3D device with which the mesh is going to be used. -// InnerRadius Inner radius of the torus (should be >= 0.0f) -// OuterRadius Outer radius of the torue (should be >= 0.0f) -// Sides Number of sides in a cross-section (must be >= 3) -// Rings Number of rings making up the torus (must be >= 3) -// ppMesh The mesh object which will be created -// ppAdjacency Returns a buffer containing adjacency info. Can be NULL. -//------------------------------------------------------------------------- -HRESULT WINAPI - D3DXCreateTorus( - LPDIRECT3DDEVICE9 pDevice, - FLOAT InnerRadius, - FLOAT OuterRadius, - UINT Sides, - UINT Rings, - LPD3DXMESH* ppMesh, - LPD3DXBUFFER* ppAdjacency); - - -//------------------------------------------------------------------------- -// D3DXCreateTeapot: -// ----------------- -// Creates a mesh containing a teapot. -// -// Parameters: -// -// pDevice The D3D device with which the mesh is going to be used. -// ppMesh The mesh object which will be created -// ppAdjacency Returns a buffer containing adjacency info. Can be NULL. -//------------------------------------------------------------------------- -HRESULT WINAPI - D3DXCreateTeapot( - LPDIRECT3DDEVICE9 pDevice, - LPD3DXMESH* ppMesh, - LPD3DXBUFFER* ppAdjacency); - - -//------------------------------------------------------------------------- -// D3DXCreateText: -// --------------- -// Creates a mesh containing the specified text using the font associated -// with the device context. -// -// Parameters: -// -// pDevice The D3D device with which the mesh is going to be used. -// hDC Device context, with desired font selected -// pText Text to generate -// Deviation Maximum chordal deviation from true font outlines -// Extrusion Amount to extrude text in -Z direction -// ppMesh The mesh object which will be created -// pGlyphMetrics Address of buffer to receive glyph metric data (or NULL) -//------------------------------------------------------------------------- -HRESULT WINAPI - D3DXCreateTextA( - LPDIRECT3DDEVICE9 pDevice, - HDC hDC, - LPCSTR pText, - FLOAT Deviation, - FLOAT Extrusion, - LPD3DXMESH* ppMesh, - LPD3DXBUFFER* ppAdjacency, - LPGLYPHMETRICSFLOAT pGlyphMetrics); - -HRESULT WINAPI - D3DXCreateTextW( - LPDIRECT3DDEVICE9 pDevice, - HDC hDC, - LPCWSTR pText, - FLOAT Deviation, - FLOAT Extrusion, - LPD3DXMESH* ppMesh, - LPD3DXBUFFER* ppAdjacency, - LPGLYPHMETRICSFLOAT pGlyphMetrics); - -#ifdef UNICODE -#define D3DXCreateText D3DXCreateTextW -#else -#define D3DXCreateText D3DXCreateTextA -#endif - - -#ifdef __cplusplus -} -#endif //__cplusplus - -#endif //__D3DX9SHAPES_H__ - diff --git a/builddir/irrlicht-1.8.1/include/d3dx9tex.h b/builddir/irrlicht-1.8.1/include/d3dx9tex.h deleted file mode 100644 index c4b6510..0000000 --- a/builddir/irrlicht-1.8.1/include/d3dx9tex.h +++ /dev/null @@ -1,1735 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) Microsoft Corporation. All Rights Reserved. -// -// File: d3dx9tex.h -// Content: D3DX texturing APIs -// -////////////////////////////////////////////////////////////////////////////// - -#include "d3dx9.h" - -#ifndef __D3DX9TEX_H__ -#define __D3DX9TEX_H__ - - -//---------------------------------------------------------------------------- -// D3DX_FILTER flags: -// ------------------ -// -// A valid filter must contain one of these values: -// -// D3DX_FILTER_NONE -// No scaling or filtering will take place. Pixels outside the bounds -// of the source image are assumed to be transparent black. -// D3DX_FILTER_POINT -// Each destination pixel is computed by sampling the nearest pixel -// from the source image. -// D3DX_FILTER_LINEAR -// Each destination pixel is computed by linearly interpolating between -// the nearest pixels in the source image. This filter works best -// when the scale on each axis is less than 2. -// D3DX_FILTER_TRIANGLE -// Every pixel in the source image contributes equally to the -// destination image. This is the slowest of all the filters. -// D3DX_FILTER_BOX -// Each pixel is computed by averaging a 2x2(x2) box pixels from -// the source image. Only works when the dimensions of the -// destination are half those of the source. (as with mip maps) -// -// And can be OR'd with any of these optional flags: -// -// D3DX_FILTER_MIRROR_U -// Indicates that pixels off the edge of the texture on the U-axis -// should be mirrored, not wraped. -// D3DX_FILTER_MIRROR_V -// Indicates that pixels off the edge of the texture on the V-axis -// should be mirrored, not wraped. -// D3DX_FILTER_MIRROR_W -// Indicates that pixels off the edge of the texture on the W-axis -// should be mirrored, not wraped. -// D3DX_FILTER_MIRROR -// Same as specifying D3DX_FILTER_MIRROR_U | D3DX_FILTER_MIRROR_V | -// D3DX_FILTER_MIRROR_V -// D3DX_FILTER_DITHER -// Dithers the resulting image using a 4x4 order dither pattern. -// D3DX_FILTER_SRGB_IN -// Denotes that the input data is in sRGB (gamma 2.2) colorspace. -// D3DX_FILTER_SRGB_OUT -// Denotes that the output data is in sRGB (gamma 2.2) colorspace. -// D3DX_FILTER_SRGB -// Same as specifying D3DX_FILTER_SRGB_IN | D3DX_FILTER_SRGB_OUT -// -//---------------------------------------------------------------------------- - -#define D3DX_FILTER_NONE (1 << 0) -#define D3DX_FILTER_POINT (2 << 0) -#define D3DX_FILTER_LINEAR (3 << 0) -#define D3DX_FILTER_TRIANGLE (4 << 0) -#define D3DX_FILTER_BOX (5 << 0) - -#define D3DX_FILTER_MIRROR_U (1 << 16) -#define D3DX_FILTER_MIRROR_V (2 << 16) -#define D3DX_FILTER_MIRROR_W (4 << 16) -#define D3DX_FILTER_MIRROR (7 << 16) - -#define D3DX_FILTER_DITHER (1 << 19) -#define D3DX_FILTER_DITHER_DIFFUSION (2 << 19) - -#define D3DX_FILTER_SRGB_IN (1 << 21) -#define D3DX_FILTER_SRGB_OUT (2 << 21) -#define D3DX_FILTER_SRGB (3 << 21) - - -//----------------------------------------------------------------------------- -// D3DX_SKIP_DDS_MIP_LEVELS is used to skip mip levels when loading a DDS file: -//----------------------------------------------------------------------------- - -#define D3DX_SKIP_DDS_MIP_LEVELS_MASK 0x1F -#define D3DX_SKIP_DDS_MIP_LEVELS_SHIFT 26 -#define D3DX_SKIP_DDS_MIP_LEVELS(levels, filter) ((((levels) & D3DX_SKIP_DDS_MIP_LEVELS_MASK) << D3DX_SKIP_DDS_MIP_LEVELS_SHIFT) | ((filter) == D3DX_DEFAULT ? D3DX_FILTER_BOX : (filter))) - - - - -//---------------------------------------------------------------------------- -// D3DX_NORMALMAP flags: -// --------------------- -// These flags are used to control how D3DXComputeNormalMap generates normal -// maps. Any number of these flags may be OR'd together in any combination. -// -// D3DX_NORMALMAP_MIRROR_U -// Indicates that pixels off the edge of the texture on the U-axis -// should be mirrored, not wraped. -// D3DX_NORMALMAP_MIRROR_V -// Indicates that pixels off the edge of the texture on the V-axis -// should be mirrored, not wraped. -// D3DX_NORMALMAP_MIRROR -// Same as specifying D3DX_NORMALMAP_MIRROR_U | D3DX_NORMALMAP_MIRROR_V -// D3DX_NORMALMAP_INVERTSIGN -// Inverts the direction of each normal -// D3DX_NORMALMAP_COMPUTE_OCCLUSION -// Compute the per pixel Occlusion term and encodes it into the alpha. -// An Alpha of 1 means that the pixel is not obscured in anyway, and -// an alpha of 0 would mean that the pixel is completly obscured. -// -//---------------------------------------------------------------------------- - -//---------------------------------------------------------------------------- - -#define D3DX_NORMALMAP_MIRROR_U (1 << 16) -#define D3DX_NORMALMAP_MIRROR_V (2 << 16) -#define D3DX_NORMALMAP_MIRROR (3 << 16) -#define D3DX_NORMALMAP_INVERTSIGN (8 << 16) -#define D3DX_NORMALMAP_COMPUTE_OCCLUSION (16 << 16) - - - - -//---------------------------------------------------------------------------- -// D3DX_CHANNEL flags: -// ------------------- -// These flags are used by functions which operate on or more channels -// in a texture. -// -// D3DX_CHANNEL_RED -// Indicates the red channel should be used -// D3DX_CHANNEL_BLUE -// Indicates the blue channel should be used -// D3DX_CHANNEL_GREEN -// Indicates the green channel should be used -// D3DX_CHANNEL_ALPHA -// Indicates the alpha channel should be used -// D3DX_CHANNEL_LUMINANCE -// Indicates the luminaces of the red green and blue channels should be -// used. -// -//---------------------------------------------------------------------------- - -#define D3DX_CHANNEL_RED (1 << 0) -#define D3DX_CHANNEL_BLUE (1 << 1) -#define D3DX_CHANNEL_GREEN (1 << 2) -#define D3DX_CHANNEL_ALPHA (1 << 3) -#define D3DX_CHANNEL_LUMINANCE (1 << 4) - - - - -//---------------------------------------------------------------------------- -// D3DXIMAGE_FILEFORMAT: -// --------------------- -// This enum is used to describe supported image file formats. -// -//---------------------------------------------------------------------------- - -typedef enum _D3DXIMAGE_FILEFORMAT -{ - D3DXIFF_BMP = 0, - D3DXIFF_JPG = 1, - D3DXIFF_TGA = 2, - D3DXIFF_PNG = 3, - D3DXIFF_DDS = 4, - D3DXIFF_PPM = 5, - D3DXIFF_DIB = 6, - D3DXIFF_HDR = 7, //high dynamic range formats - D3DXIFF_PFM = 8, // - D3DXIFF_FORCE_DWORD = 0x7fffffff - -} D3DXIMAGE_FILEFORMAT; - - -//---------------------------------------------------------------------------- -// LPD3DXFILL2D and LPD3DXFILL3D: -// ------------------------------ -// Function types used by the texture fill functions. -// -// Parameters: -// pOut -// Pointer to a vector which the function uses to return its result. -// X,Y,Z,W will be mapped to R,G,B,A respectivly. -// pTexCoord -// Pointer to a vector containing the coordinates of the texel currently -// being evaluated. Textures and VolumeTexture texcoord components -// range from 0 to 1. CubeTexture texcoord component range from -1 to 1. -// pTexelSize -// Pointer to a vector containing the dimensions of the current texel. -// pData -// Pointer to user data. -// -//---------------------------------------------------------------------------- - -typedef VOID (WINAPI *LPD3DXFILL2D)(D3DXVECTOR4 *pOut, - CONST D3DXVECTOR2 *pTexCoord, CONST D3DXVECTOR2 *pTexelSize, LPVOID pData); - -typedef VOID (WINAPI *LPD3DXFILL3D)(D3DXVECTOR4 *pOut, - CONST D3DXVECTOR3 *pTexCoord, CONST D3DXVECTOR3 *pTexelSize, LPVOID pData); - - - -//---------------------------------------------------------------------------- -// D3DXIMAGE_INFO: -// --------------- -// This structure is used to return a rough description of what the -// the original contents of an image file looked like. -// -// Width -// Width of original image in pixels -// Height -// Height of original image in pixels -// Depth -// Depth of original image in pixels -// MipLevels -// Number of mip levels in original image -// Format -// D3D format which most closely describes the data in original image -// ResourceType -// D3DRESOURCETYPE representing the type of texture stored in the file. -// D3DRTYPE_TEXTURE, D3DRTYPE_VOLUMETEXTURE, or D3DRTYPE_CUBETEXTURE. -// ImageFileFormat -// D3DXIMAGE_FILEFORMAT representing the format of the image file. -// -//---------------------------------------------------------------------------- - -typedef struct _D3DXIMAGE_INFO -{ - UINT Width; - UINT Height; - UINT Depth; - UINT MipLevels; - D3DFORMAT Format; - D3DRESOURCETYPE ResourceType; - D3DXIMAGE_FILEFORMAT ImageFileFormat; - -} D3DXIMAGE_INFO; - - - - - -#ifdef __cplusplus -extern "C" { -#endif //__cplusplus - - - -////////////////////////////////////////////////////////////////////////////// -// Image File APIs /////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -; -//---------------------------------------------------------------------------- -// GetImageInfoFromFile/Resource: -// ------------------------------ -// Fills in a D3DXIMAGE_INFO struct with information about an image file. -// -// Parameters: -// pSrcFile -// File name of the source image. -// pSrcModule -// Module where resource is located, or NULL for module associated -// with image the os used to create the current process. -// pSrcResource -// Resource name -// pSrcData -// Pointer to file in memory. -// SrcDataSize -// Size in bytes of file in memory. -// pSrcInfo -// Pointer to a D3DXIMAGE_INFO structure to be filled in with the -// description of the data in the source image file. -// -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXGetImageInfoFromFileA( - LPCSTR pSrcFile, - D3DXIMAGE_INFO* pSrcInfo); - -HRESULT WINAPI - D3DXGetImageInfoFromFileW( - LPCWSTR pSrcFile, - D3DXIMAGE_INFO* pSrcInfo); - -#ifdef UNICODE -#define D3DXGetImageInfoFromFile D3DXGetImageInfoFromFileW -#else -#define D3DXGetImageInfoFromFile D3DXGetImageInfoFromFileA -#endif - - -HRESULT WINAPI - D3DXGetImageInfoFromResourceA( - HMODULE hSrcModule, - LPCSTR pSrcResource, - D3DXIMAGE_INFO* pSrcInfo); - -HRESULT WINAPI - D3DXGetImageInfoFromResourceW( - HMODULE hSrcModule, - LPCWSTR pSrcResource, - D3DXIMAGE_INFO* pSrcInfo); - -#ifdef UNICODE -#define D3DXGetImageInfoFromResource D3DXGetImageInfoFromResourceW -#else -#define D3DXGetImageInfoFromResource D3DXGetImageInfoFromResourceA -#endif - - -HRESULT WINAPI - D3DXGetImageInfoFromFileInMemory( - LPCVOID pSrcData, - UINT SrcDataSize, - D3DXIMAGE_INFO* pSrcInfo); - - - - -////////////////////////////////////////////////////////////////////////////// -// Load/Save Surface APIs //////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// - -//---------------------------------------------------------------------------- -// D3DXLoadSurfaceFromFile/Resource: -// --------------------------------- -// Load surface from a file or resource -// -// Parameters: -// pDestSurface -// Destination surface, which will receive the image. -// pDestPalette -// Destination palette of 256 colors, or NULL -// pDestRect -// Destination rectangle, or NULL for entire surface -// pSrcFile -// File name of the source image. -// pSrcModule -// Module where resource is located, or NULL for module associated -// with image the os used to create the current process. -// pSrcResource -// Resource name -// pSrcData -// Pointer to file in memory. -// SrcDataSize -// Size in bytes of file in memory. -// pSrcRect -// Source rectangle, or NULL for entire image -// Filter -// D3DX_FILTER flags controlling how the image is filtered. -// Or D3DX_DEFAULT for D3DX_FILTER_TRIANGLE. -// ColorKey -// Color to replace with transparent black, or 0 to disable colorkey. -// This is always a 32-bit ARGB color, independent of the source image -// format. Alpha is significant, and should usually be set to FF for -// opaque colorkeys. (ex. Opaque black == 0xff000000) -// pSrcInfo -// Pointer to a D3DXIMAGE_INFO structure to be filled in with the -// description of the data in the source image file, or NULL. -// -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXLoadSurfaceFromFileA( - LPDIRECT3DSURFACE9 pDestSurface, - CONST PALETTEENTRY* pDestPalette, - CONST RECT* pDestRect, - LPCSTR pSrcFile, - CONST RECT* pSrcRect, - DWORD Filter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo); - -HRESULT WINAPI - D3DXLoadSurfaceFromFileW( - LPDIRECT3DSURFACE9 pDestSurface, - CONST PALETTEENTRY* pDestPalette, - CONST RECT* pDestRect, - LPCWSTR pSrcFile, - CONST RECT* pSrcRect, - DWORD Filter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo); - -#ifdef UNICODE -#define D3DXLoadSurfaceFromFile D3DXLoadSurfaceFromFileW -#else -#define D3DXLoadSurfaceFromFile D3DXLoadSurfaceFromFileA -#endif - - - -HRESULT WINAPI - D3DXLoadSurfaceFromResourceA( - LPDIRECT3DSURFACE9 pDestSurface, - CONST PALETTEENTRY* pDestPalette, - CONST RECT* pDestRect, - HMODULE hSrcModule, - LPCSTR pSrcResource, - CONST RECT* pSrcRect, - DWORD Filter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo); - -HRESULT WINAPI - D3DXLoadSurfaceFromResourceW( - LPDIRECT3DSURFACE9 pDestSurface, - CONST PALETTEENTRY* pDestPalette, - CONST RECT* pDestRect, - HMODULE hSrcModule, - LPCWSTR pSrcResource, - CONST RECT* pSrcRect, - DWORD Filter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo); - - -#ifdef UNICODE -#define D3DXLoadSurfaceFromResource D3DXLoadSurfaceFromResourceW -#else -#define D3DXLoadSurfaceFromResource D3DXLoadSurfaceFromResourceA -#endif - - - -HRESULT WINAPI - D3DXLoadSurfaceFromFileInMemory( - LPDIRECT3DSURFACE9 pDestSurface, - CONST PALETTEENTRY* pDestPalette, - CONST RECT* pDestRect, - LPCVOID pSrcData, - UINT SrcDataSize, - CONST RECT* pSrcRect, - DWORD Filter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo); - - - -//---------------------------------------------------------------------------- -// D3DXLoadSurfaceFromSurface: -// --------------------------- -// Load surface from another surface (with color conversion) -// -// Parameters: -// pDestSurface -// Destination surface, which will receive the image. -// pDestPalette -// Destination palette of 256 colors, or NULL -// pDestRect -// Destination rectangle, or NULL for entire surface -// pSrcSurface -// Source surface -// pSrcPalette -// Source palette of 256 colors, or NULL -// pSrcRect -// Source rectangle, or NULL for entire surface -// Filter -// D3DX_FILTER flags controlling how the image is filtered. -// Or D3DX_DEFAULT for D3DX_FILTER_TRIANGLE. -// ColorKey -// Color to replace with transparent black, or 0 to disable colorkey. -// This is always a 32-bit ARGB color, independent of the source image -// format. Alpha is significant, and should usually be set to FF for -// opaque colorkeys. (ex. Opaque black == 0xff000000) -// -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXLoadSurfaceFromSurface( - LPDIRECT3DSURFACE9 pDestSurface, - CONST PALETTEENTRY* pDestPalette, - CONST RECT* pDestRect, - LPDIRECT3DSURFACE9 pSrcSurface, - CONST PALETTEENTRY* pSrcPalette, - CONST RECT* pSrcRect, - DWORD Filter, - D3DCOLOR ColorKey); - - -//---------------------------------------------------------------------------- -// D3DXLoadSurfaceFromMemory: -// -------------------------- -// Load surface from memory. -// -// Parameters: -// pDestSurface -// Destination surface, which will receive the image. -// pDestPalette -// Destination palette of 256 colors, or NULL -// pDestRect -// Destination rectangle, or NULL for entire surface -// pSrcMemory -// Pointer to the top-left corner of the source image in memory -// SrcFormat -// Pixel format of the source image. -// SrcPitch -// Pitch of source image, in bytes. For DXT formats, this number -// should represent the width of one row of cells, in bytes. -// pSrcPalette -// Source palette of 256 colors, or NULL -// pSrcRect -// Source rectangle. -// Filter -// D3DX_FILTER flags controlling how the image is filtered. -// Or D3DX_DEFAULT for D3DX_FILTER_TRIANGLE. -// ColorKey -// Color to replace with transparent black, or 0 to disable colorkey. -// This is always a 32-bit ARGB color, independent of the source image -// format. Alpha is significant, and should usually be set to FF for -// opaque colorkeys. (ex. Opaque black == 0xff000000) -// -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXLoadSurfaceFromMemory( - LPDIRECT3DSURFACE9 pDestSurface, - CONST PALETTEENTRY* pDestPalette, - CONST RECT* pDestRect, - LPCVOID pSrcMemory, - D3DFORMAT SrcFormat, - UINT SrcPitch, - CONST PALETTEENTRY* pSrcPalette, - CONST RECT* pSrcRect, - DWORD Filter, - D3DCOLOR ColorKey); - - -//---------------------------------------------------------------------------- -// D3DXSaveSurfaceToFile: -// ---------------------- -// Save a surface to a image file. -// -// Parameters: -// pDestFile -// File name of the destination file -// DestFormat -// D3DXIMAGE_FILEFORMAT specifying file format to use when saving. -// pSrcSurface -// Source surface, containing the image to be saved -// pSrcPalette -// Source palette of 256 colors, or NULL -// pSrcRect -// Source rectangle, or NULL for the entire image -// -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXSaveSurfaceToFileA( - LPCSTR pDestFile, - D3DXIMAGE_FILEFORMAT DestFormat, - LPDIRECT3DSURFACE9 pSrcSurface, - CONST PALETTEENTRY* pSrcPalette, - CONST RECT* pSrcRect); - -HRESULT WINAPI - D3DXSaveSurfaceToFileW( - LPCWSTR pDestFile, - D3DXIMAGE_FILEFORMAT DestFormat, - LPDIRECT3DSURFACE9 pSrcSurface, - CONST PALETTEENTRY* pSrcPalette, - CONST RECT* pSrcRect); - -#ifdef UNICODE -#define D3DXSaveSurfaceToFile D3DXSaveSurfaceToFileW -#else -#define D3DXSaveSurfaceToFile D3DXSaveSurfaceToFileA -#endif - -//---------------------------------------------------------------------------- -// D3DXSaveSurfaceToFileInMemory: -// ---------------------- -// Save a surface to a image file. -// -// Parameters: -// ppDestBuf -// address of pointer to d3dxbuffer for returning data bits -// DestFormat -// D3DXIMAGE_FILEFORMAT specifying file format to use when saving. -// pSrcSurface -// Source surface, containing the image to be saved -// pSrcPalette -// Source palette of 256 colors, or NULL -// pSrcRect -// Source rectangle, or NULL for the entire image -// -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXSaveSurfaceToFileInMemory( - LPD3DXBUFFER* ppDestBuf, - D3DXIMAGE_FILEFORMAT DestFormat, - LPDIRECT3DSURFACE9 pSrcSurface, - CONST PALETTEENTRY* pSrcPalette, - CONST RECT* pSrcRect); - - -////////////////////////////////////////////////////////////////////////////// -// Load/Save Volume APIs ///////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// - -//---------------------------------------------------------------------------- -// D3DXLoadVolumeFromFile/Resource: -// -------------------------------- -// Load volume from a file or resource -// -// Parameters: -// pDestVolume -// Destination volume, which will receive the image. -// pDestPalette -// Destination palette of 256 colors, or NULL -// pDestBox -// Destination box, or NULL for entire volume -// pSrcFile -// File name of the source image. -// pSrcModule -// Module where resource is located, or NULL for module associated -// with image the os used to create the current process. -// pSrcResource -// Resource name -// pSrcData -// Pointer to file in memory. -// SrcDataSize -// Size in bytes of file in memory. -// pSrcBox -// Source box, or NULL for entire image -// Filter -// D3DX_FILTER flags controlling how the image is filtered. -// Or D3DX_DEFAULT for D3DX_FILTER_TRIANGLE. -// ColorKey -// Color to replace with transparent black, or 0 to disable colorkey. -// This is always a 32-bit ARGB color, independent of the source image -// format. Alpha is significant, and should usually be set to FF for -// opaque colorkeys. (ex. Opaque black == 0xff000000) -// pSrcInfo -// Pointer to a D3DXIMAGE_INFO structure to be filled in with the -// description of the data in the source image file, or NULL. -// -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXLoadVolumeFromFileA( - LPDIRECT3DVOLUME9 pDestVolume, - CONST PALETTEENTRY* pDestPalette, - CONST D3DBOX* pDestBox, - LPCSTR pSrcFile, - CONST D3DBOX* pSrcBox, - DWORD Filter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo); - -HRESULT WINAPI - D3DXLoadVolumeFromFileW( - LPDIRECT3DVOLUME9 pDestVolume, - CONST PALETTEENTRY* pDestPalette, - CONST D3DBOX* pDestBox, - LPCWSTR pSrcFile, - CONST D3DBOX* pSrcBox, - DWORD Filter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo); - -#ifdef UNICODE -#define D3DXLoadVolumeFromFile D3DXLoadVolumeFromFileW -#else -#define D3DXLoadVolumeFromFile D3DXLoadVolumeFromFileA -#endif - - -HRESULT WINAPI - D3DXLoadVolumeFromResourceA( - LPDIRECT3DVOLUME9 pDestVolume, - CONST PALETTEENTRY* pDestPalette, - CONST D3DBOX* pDestBox, - HMODULE hSrcModule, - LPCSTR pSrcResource, - CONST D3DBOX* pSrcBox, - DWORD Filter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo); - -HRESULT WINAPI - D3DXLoadVolumeFromResourceW( - LPDIRECT3DVOLUME9 pDestVolume, - CONST PALETTEENTRY* pDestPalette, - CONST D3DBOX* pDestBox, - HMODULE hSrcModule, - LPCWSTR pSrcResource, - CONST D3DBOX* pSrcBox, - DWORD Filter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo); - -#ifdef UNICODE -#define D3DXLoadVolumeFromResource D3DXLoadVolumeFromResourceW -#else -#define D3DXLoadVolumeFromResource D3DXLoadVolumeFromResourceA -#endif - - - -HRESULT WINAPI - D3DXLoadVolumeFromFileInMemory( - LPDIRECT3DVOLUME9 pDestVolume, - CONST PALETTEENTRY* pDestPalette, - CONST D3DBOX* pDestBox, - LPCVOID pSrcData, - UINT SrcDataSize, - CONST D3DBOX* pSrcBox, - DWORD Filter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo); - - - -//---------------------------------------------------------------------------- -// D3DXLoadVolumeFromVolume: -// ------------------------- -// Load volume from another volume (with color conversion) -// -// Parameters: -// pDestVolume -// Destination volume, which will receive the image. -// pDestPalette -// Destination palette of 256 colors, or NULL -// pDestBox -// Destination box, or NULL for entire volume -// pSrcVolume -// Source volume -// pSrcPalette -// Source palette of 256 colors, or NULL -// pSrcBox -// Source box, or NULL for entire volume -// Filter -// D3DX_FILTER flags controlling how the image is filtered. -// Or D3DX_DEFAULT for D3DX_FILTER_TRIANGLE. -// ColorKey -// Color to replace with transparent black, or 0 to disable colorkey. -// This is always a 32-bit ARGB color, independent of the source image -// format. Alpha is significant, and should usually be set to FF for -// opaque colorkeys. (ex. Opaque black == 0xff000000) -// -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXLoadVolumeFromVolume( - LPDIRECT3DVOLUME9 pDestVolume, - CONST PALETTEENTRY* pDestPalette, - CONST D3DBOX* pDestBox, - LPDIRECT3DVOLUME9 pSrcVolume, - CONST PALETTEENTRY* pSrcPalette, - CONST D3DBOX* pSrcBox, - DWORD Filter, - D3DCOLOR ColorKey); - - - -//---------------------------------------------------------------------------- -// D3DXLoadVolumeFromMemory: -// ------------------------- -// Load volume from memory. -// -// Parameters: -// pDestVolume -// Destination volume, which will receive the image. -// pDestPalette -// Destination palette of 256 colors, or NULL -// pDestBox -// Destination box, or NULL for entire volume -// pSrcMemory -// Pointer to the top-left corner of the source volume in memory -// SrcFormat -// Pixel format of the source volume. -// SrcRowPitch -// Pitch of source image, in bytes. For DXT formats, this number -// should represent the size of one row of cells, in bytes. -// SrcSlicePitch -// Pitch of source image, in bytes. For DXT formats, this number -// should represent the size of one slice of cells, in bytes. -// pSrcPalette -// Source palette of 256 colors, or NULL -// pSrcBox -// Source box. -// Filter -// D3DX_FILTER flags controlling how the image is filtered. -// Or D3DX_DEFAULT for D3DX_FILTER_TRIANGLE. -// ColorKey -// Color to replace with transparent black, or 0 to disable colorkey. -// This is always a 32-bit ARGB color, independent of the source image -// format. Alpha is significant, and should usually be set to FF for -// opaque colorkeys. (ex. Opaque black == 0xff000000) -// -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXLoadVolumeFromMemory( - LPDIRECT3DVOLUME9 pDestVolume, - CONST PALETTEENTRY* pDestPalette, - CONST D3DBOX* pDestBox, - LPCVOID pSrcMemory, - D3DFORMAT SrcFormat, - UINT SrcRowPitch, - UINT SrcSlicePitch, - CONST PALETTEENTRY* pSrcPalette, - CONST D3DBOX* pSrcBox, - DWORD Filter, - D3DCOLOR ColorKey); - - - -//---------------------------------------------------------------------------- -// D3DXSaveVolumeToFile: -// --------------------- -// Save a volume to a image file. -// -// Parameters: -// pDestFile -// File name of the destination file -// DestFormat -// D3DXIMAGE_FILEFORMAT specifying file format to use when saving. -// pSrcVolume -// Source volume, containing the image to be saved -// pSrcPalette -// Source palette of 256 colors, or NULL -// pSrcBox -// Source box, or NULL for the entire volume -// -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXSaveVolumeToFileA( - LPCSTR pDestFile, - D3DXIMAGE_FILEFORMAT DestFormat, - LPDIRECT3DVOLUME9 pSrcVolume, - CONST PALETTEENTRY* pSrcPalette, - CONST D3DBOX* pSrcBox); - -HRESULT WINAPI - D3DXSaveVolumeToFileW( - LPCWSTR pDestFile, - D3DXIMAGE_FILEFORMAT DestFormat, - LPDIRECT3DVOLUME9 pSrcVolume, - CONST PALETTEENTRY* pSrcPalette, - CONST D3DBOX* pSrcBox); - -#ifdef UNICODE -#define D3DXSaveVolumeToFile D3DXSaveVolumeToFileW -#else -#define D3DXSaveVolumeToFile D3DXSaveVolumeToFileA -#endif - - -//---------------------------------------------------------------------------- -// D3DXSaveVolumeToFileInMemory: -// --------------------- -// Save a volume to a image file. -// -// Parameters: -// pDestFile -// File name of the destination file -// DestFormat -// D3DXIMAGE_FILEFORMAT specifying file format to use when saving. -// pSrcVolume -// Source volume, containing the image to be saved -// pSrcPalette -// Source palette of 256 colors, or NULL -// pSrcBox -// Source box, or NULL for the entire volume -// -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXSaveVolumeToFileInMemory( - LPD3DXBUFFER* ppDestBuf, - D3DXIMAGE_FILEFORMAT DestFormat, - LPDIRECT3DVOLUME9 pSrcVolume, - CONST PALETTEENTRY* pSrcPalette, - CONST D3DBOX* pSrcBox); - -////////////////////////////////////////////////////////////////////////////// -// Create/Save Texture APIs ////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// - -//---------------------------------------------------------------------------- -// D3DXCheckTextureRequirements: -// ----------------------------- -// Checks texture creation parameters. If parameters are invalid, this -// function returns corrected parameters. -// -// Parameters: -// -// pDevice -// The D3D device to be used -// pWidth, pHeight, pDepth, pSize -// Desired size in pixels, or NULL. Returns corrected size. -// pNumMipLevels -// Number of desired mipmap levels, or NULL. Returns corrected number. -// Usage -// Texture usage flags -// pFormat -// Desired pixel format, or NULL. Returns corrected format. -// Pool -// Memory pool to be used to create texture -// -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXCheckTextureRequirements( - LPDIRECT3DDEVICE9 pDevice, - UINT* pWidth, - UINT* pHeight, - UINT* pNumMipLevels, - DWORD Usage, - D3DFORMAT* pFormat, - D3DPOOL Pool); - -HRESULT WINAPI - D3DXCheckCubeTextureRequirements( - LPDIRECT3DDEVICE9 pDevice, - UINT* pSize, - UINT* pNumMipLevels, - DWORD Usage, - D3DFORMAT* pFormat, - D3DPOOL Pool); - -HRESULT WINAPI - D3DXCheckVolumeTextureRequirements( - LPDIRECT3DDEVICE9 pDevice, - UINT* pWidth, - UINT* pHeight, - UINT* pDepth, - UINT* pNumMipLevels, - DWORD Usage, - D3DFORMAT* pFormat, - D3DPOOL Pool); - - -//---------------------------------------------------------------------------- -// D3DXCreateTexture: -// ------------------ -// Create an empty texture -// -// Parameters: -// -// pDevice -// The D3D device with which the texture is going to be used. -// Width, Height, Depth, Size -// size in pixels. these must be non-zero -// MipLevels -// number of mip levels desired. if zero or D3DX_DEFAULT, a complete -// mipmap chain will be created. -// Usage -// Texture usage flags -// Format -// Pixel format. -// Pool -// Memory pool to be used to create texture -// ppTexture, ppCubeTexture, ppVolumeTexture -// The texture object that will be created -// -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXCreateTexture( - LPDIRECT3DDEVICE9 pDevice, - UINT Width, - UINT Height, - UINT MipLevels, - DWORD Usage, - D3DFORMAT Format, - D3DPOOL Pool, - LPDIRECT3DTEXTURE9* ppTexture); - -HRESULT WINAPI - D3DXCreateCubeTexture( - LPDIRECT3DDEVICE9 pDevice, - UINT Size, - UINT MipLevels, - DWORD Usage, - D3DFORMAT Format, - D3DPOOL Pool, - LPDIRECT3DCUBETEXTURE9* ppCubeTexture); - -HRESULT WINAPI - D3DXCreateVolumeTexture( - LPDIRECT3DDEVICE9 pDevice, - UINT Width, - UINT Height, - UINT Depth, - UINT MipLevels, - DWORD Usage, - D3DFORMAT Format, - D3DPOOL Pool, - LPDIRECT3DVOLUMETEXTURE9* ppVolumeTexture); - - - -//---------------------------------------------------------------------------- -// D3DXCreateTextureFromFile/Resource: -// ----------------------------------- -// Create a texture object from a file or resource. -// -// Parameters: -// -// pDevice -// The D3D device with which the texture is going to be used. -// pSrcFile -// File name. -// hSrcModule -// Module handle. if NULL, current module will be used. -// pSrcResource -// Resource name in module -// pvSrcData -// Pointer to file in memory. -// SrcDataSize -// Size in bytes of file in memory. -// Width, Height, Depth, Size -// Size in pixels. If zero or D3DX_DEFAULT, the size will be taken from -// the file and rounded up to a power of two. If D3DX_DEFAULT_NONPOW2, -// and the device supports NONPOW2 textures, the size will not be rounded. -// If D3DX_FROM_FILE, the size will be taken exactly as it is in the file, -// and the call will fail if this violates device capabilities. -// MipLevels -// Number of mip levels. If zero or D3DX_DEFAULT, a complete mipmap -// chain will be created. If D3DX_FROM_FILE, the size will be taken -// exactly as it is in the file, and the call will fail if this violates -// device capabilities. -// Usage -// Texture usage flags -// Format -// Desired pixel format. If D3DFMT_UNKNOWN, the format will be -// taken from the file. If D3DFMT_FROM_FILE, the format will be taken -// exactly as it is in the file, and the call will fail if the device does -// not support the given format. -// Pool -// Memory pool to be used to create texture -// Filter -// D3DX_FILTER flags controlling how the image is filtered. -// Or D3DX_DEFAULT for D3DX_FILTER_TRIANGLE. -// MipFilter -// D3DX_FILTER flags controlling how each miplevel is filtered. -// Or D3DX_DEFAULT for D3DX_FILTER_BOX. -// Use the D3DX_SKIP_DDS_MIP_LEVELS macro to specify both a filter and the -// number of mip levels to skip when loading DDS files. -// ColorKey -// Color to replace with transparent black, or 0 to disable colorkey. -// This is always a 32-bit ARGB color, independent of the source image -// format. Alpha is significant, and should usually be set to FF for -// opaque colorkeys. (ex. Opaque black == 0xff000000) -// pSrcInfo -// Pointer to a D3DXIMAGE_INFO structure to be filled in with the -// description of the data in the source image file, or NULL. -// pPalette -// 256 color palette to be filled in, or NULL -// ppTexture, ppCubeTexture, ppVolumeTexture -// The texture object that will be created -// -//---------------------------------------------------------------------------- - -// FromFile - -HRESULT WINAPI - D3DXCreateTextureFromFileA( - LPDIRECT3DDEVICE9 pDevice, - LPCSTR pSrcFile, - LPDIRECT3DTEXTURE9* ppTexture); - -HRESULT WINAPI - D3DXCreateTextureFromFileW( - LPDIRECT3DDEVICE9 pDevice, - LPCWSTR pSrcFile, - LPDIRECT3DTEXTURE9* ppTexture); - -#ifdef UNICODE -#define D3DXCreateTextureFromFile D3DXCreateTextureFromFileW -#else -#define D3DXCreateTextureFromFile D3DXCreateTextureFromFileA -#endif - - -HRESULT WINAPI - D3DXCreateCubeTextureFromFileA( - LPDIRECT3DDEVICE9 pDevice, - LPCSTR pSrcFile, - LPDIRECT3DCUBETEXTURE9* ppCubeTexture); - -HRESULT WINAPI - D3DXCreateCubeTextureFromFileW( - LPDIRECT3DDEVICE9 pDevice, - LPCWSTR pSrcFile, - LPDIRECT3DCUBETEXTURE9* ppCubeTexture); - -#ifdef UNICODE -#define D3DXCreateCubeTextureFromFile D3DXCreateCubeTextureFromFileW -#else -#define D3DXCreateCubeTextureFromFile D3DXCreateCubeTextureFromFileA -#endif - - -HRESULT WINAPI - D3DXCreateVolumeTextureFromFileA( - LPDIRECT3DDEVICE9 pDevice, - LPCSTR pSrcFile, - LPDIRECT3DVOLUMETEXTURE9* ppVolumeTexture); - -HRESULT WINAPI - D3DXCreateVolumeTextureFromFileW( - LPDIRECT3DDEVICE9 pDevice, - LPCWSTR pSrcFile, - LPDIRECT3DVOLUMETEXTURE9* ppVolumeTexture); - -#ifdef UNICODE -#define D3DXCreateVolumeTextureFromFile D3DXCreateVolumeTextureFromFileW -#else -#define D3DXCreateVolumeTextureFromFile D3DXCreateVolumeTextureFromFileA -#endif - - -// FromResource - -HRESULT WINAPI - D3DXCreateTextureFromResourceA( - LPDIRECT3DDEVICE9 pDevice, - HMODULE hSrcModule, - LPCSTR pSrcResource, - LPDIRECT3DTEXTURE9* ppTexture); - -HRESULT WINAPI - D3DXCreateTextureFromResourceW( - LPDIRECT3DDEVICE9 pDevice, - HMODULE hSrcModule, - LPCWSTR pSrcResource, - LPDIRECT3DTEXTURE9* ppTexture); - -#ifdef UNICODE -#define D3DXCreateTextureFromResource D3DXCreateTextureFromResourceW -#else -#define D3DXCreateTextureFromResource D3DXCreateTextureFromResourceA -#endif - - -HRESULT WINAPI - D3DXCreateCubeTextureFromResourceA( - LPDIRECT3DDEVICE9 pDevice, - HMODULE hSrcModule, - LPCSTR pSrcResource, - LPDIRECT3DCUBETEXTURE9* ppCubeTexture); - -HRESULT WINAPI - D3DXCreateCubeTextureFromResourceW( - LPDIRECT3DDEVICE9 pDevice, - HMODULE hSrcModule, - LPCWSTR pSrcResource, - LPDIRECT3DCUBETEXTURE9* ppCubeTexture); - -#ifdef UNICODE -#define D3DXCreateCubeTextureFromResource D3DXCreateCubeTextureFromResourceW -#else -#define D3DXCreateCubeTextureFromResource D3DXCreateCubeTextureFromResourceA -#endif - - -HRESULT WINAPI - D3DXCreateVolumeTextureFromResourceA( - LPDIRECT3DDEVICE9 pDevice, - HMODULE hSrcModule, - LPCSTR pSrcResource, - LPDIRECT3DVOLUMETEXTURE9* ppVolumeTexture); - -HRESULT WINAPI - D3DXCreateVolumeTextureFromResourceW( - LPDIRECT3DDEVICE9 pDevice, - HMODULE hSrcModule, - LPCWSTR pSrcResource, - LPDIRECT3DVOLUMETEXTURE9* ppVolumeTexture); - -#ifdef UNICODE -#define D3DXCreateVolumeTextureFromResource D3DXCreateVolumeTextureFromResourceW -#else -#define D3DXCreateVolumeTextureFromResource D3DXCreateVolumeTextureFromResourceA -#endif - - -// FromFileEx - -HRESULT WINAPI - D3DXCreateTextureFromFileExA( - LPDIRECT3DDEVICE9 pDevice, - LPCSTR pSrcFile, - UINT Width, - UINT Height, - UINT MipLevels, - DWORD Usage, - D3DFORMAT Format, - D3DPOOL Pool, - DWORD Filter, - DWORD MipFilter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo, - PALETTEENTRY* pPalette, - LPDIRECT3DTEXTURE9* ppTexture); - -HRESULT WINAPI - D3DXCreateTextureFromFileExW( - LPDIRECT3DDEVICE9 pDevice, - LPCWSTR pSrcFile, - UINT Width, - UINT Height, - UINT MipLevels, - DWORD Usage, - D3DFORMAT Format, - D3DPOOL Pool, - DWORD Filter, - DWORD MipFilter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo, - PALETTEENTRY* pPalette, - LPDIRECT3DTEXTURE9* ppTexture); - -#ifdef UNICODE -#define D3DXCreateTextureFromFileEx D3DXCreateTextureFromFileExW -#else -#define D3DXCreateTextureFromFileEx D3DXCreateTextureFromFileExA -#endif - - -HRESULT WINAPI - D3DXCreateCubeTextureFromFileExA( - LPDIRECT3DDEVICE9 pDevice, - LPCSTR pSrcFile, - UINT Size, - UINT MipLevels, - DWORD Usage, - D3DFORMAT Format, - D3DPOOL Pool, - DWORD Filter, - DWORD MipFilter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo, - PALETTEENTRY* pPalette, - LPDIRECT3DCUBETEXTURE9* ppCubeTexture); - -HRESULT WINAPI - D3DXCreateCubeTextureFromFileExW( - LPDIRECT3DDEVICE9 pDevice, - LPCWSTR pSrcFile, - UINT Size, - UINT MipLevels, - DWORD Usage, - D3DFORMAT Format, - D3DPOOL Pool, - DWORD Filter, - DWORD MipFilter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo, - PALETTEENTRY* pPalette, - LPDIRECT3DCUBETEXTURE9* ppCubeTexture); - -#ifdef UNICODE -#define D3DXCreateCubeTextureFromFileEx D3DXCreateCubeTextureFromFileExW -#else -#define D3DXCreateCubeTextureFromFileEx D3DXCreateCubeTextureFromFileExA -#endif - - -HRESULT WINAPI - D3DXCreateVolumeTextureFromFileExA( - LPDIRECT3DDEVICE9 pDevice, - LPCSTR pSrcFile, - UINT Width, - UINT Height, - UINT Depth, - UINT MipLevels, - DWORD Usage, - D3DFORMAT Format, - D3DPOOL Pool, - DWORD Filter, - DWORD MipFilter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo, - PALETTEENTRY* pPalette, - LPDIRECT3DVOLUMETEXTURE9* ppVolumeTexture); - -HRESULT WINAPI - D3DXCreateVolumeTextureFromFileExW( - LPDIRECT3DDEVICE9 pDevice, - LPCWSTR pSrcFile, - UINT Width, - UINT Height, - UINT Depth, - UINT MipLevels, - DWORD Usage, - D3DFORMAT Format, - D3DPOOL Pool, - DWORD Filter, - DWORD MipFilter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo, - PALETTEENTRY* pPalette, - LPDIRECT3DVOLUMETEXTURE9* ppVolumeTexture); - -#ifdef UNICODE -#define D3DXCreateVolumeTextureFromFileEx D3DXCreateVolumeTextureFromFileExW -#else -#define D3DXCreateVolumeTextureFromFileEx D3DXCreateVolumeTextureFromFileExA -#endif - - -// FromResourceEx - -HRESULT WINAPI - D3DXCreateTextureFromResourceExA( - LPDIRECT3DDEVICE9 pDevice, - HMODULE hSrcModule, - LPCSTR pSrcResource, - UINT Width, - UINT Height, - UINT MipLevels, - DWORD Usage, - D3DFORMAT Format, - D3DPOOL Pool, - DWORD Filter, - DWORD MipFilter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo, - PALETTEENTRY* pPalette, - LPDIRECT3DTEXTURE9* ppTexture); - -HRESULT WINAPI - D3DXCreateTextureFromResourceExW( - LPDIRECT3DDEVICE9 pDevice, - HMODULE hSrcModule, - LPCWSTR pSrcResource, - UINT Width, - UINT Height, - UINT MipLevels, - DWORD Usage, - D3DFORMAT Format, - D3DPOOL Pool, - DWORD Filter, - DWORD MipFilter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo, - PALETTEENTRY* pPalette, - LPDIRECT3DTEXTURE9* ppTexture); - -#ifdef UNICODE -#define D3DXCreateTextureFromResourceEx D3DXCreateTextureFromResourceExW -#else -#define D3DXCreateTextureFromResourceEx D3DXCreateTextureFromResourceExA -#endif - - -HRESULT WINAPI - D3DXCreateCubeTextureFromResourceExA( - LPDIRECT3DDEVICE9 pDevice, - HMODULE hSrcModule, - LPCSTR pSrcResource, - UINT Size, - UINT MipLevels, - DWORD Usage, - D3DFORMAT Format, - D3DPOOL Pool, - DWORD Filter, - DWORD MipFilter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo, - PALETTEENTRY* pPalette, - LPDIRECT3DCUBETEXTURE9* ppCubeTexture); - -HRESULT WINAPI - D3DXCreateCubeTextureFromResourceExW( - LPDIRECT3DDEVICE9 pDevice, - HMODULE hSrcModule, - LPCWSTR pSrcResource, - UINT Size, - UINT MipLevels, - DWORD Usage, - D3DFORMAT Format, - D3DPOOL Pool, - DWORD Filter, - DWORD MipFilter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo, - PALETTEENTRY* pPalette, - LPDIRECT3DCUBETEXTURE9* ppCubeTexture); - -#ifdef UNICODE -#define D3DXCreateCubeTextureFromResourceEx D3DXCreateCubeTextureFromResourceExW -#else -#define D3DXCreateCubeTextureFromResourceEx D3DXCreateCubeTextureFromResourceExA -#endif - - -HRESULT WINAPI - D3DXCreateVolumeTextureFromResourceExA( - LPDIRECT3DDEVICE9 pDevice, - HMODULE hSrcModule, - LPCSTR pSrcResource, - UINT Width, - UINT Height, - UINT Depth, - UINT MipLevels, - DWORD Usage, - D3DFORMAT Format, - D3DPOOL Pool, - DWORD Filter, - DWORD MipFilter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo, - PALETTEENTRY* pPalette, - LPDIRECT3DVOLUMETEXTURE9* ppVolumeTexture); - -HRESULT WINAPI - D3DXCreateVolumeTextureFromResourceExW( - LPDIRECT3DDEVICE9 pDevice, - HMODULE hSrcModule, - LPCWSTR pSrcResource, - UINT Width, - UINT Height, - UINT Depth, - UINT MipLevels, - DWORD Usage, - D3DFORMAT Format, - D3DPOOL Pool, - DWORD Filter, - DWORD MipFilter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo, - PALETTEENTRY* pPalette, - LPDIRECT3DVOLUMETEXTURE9* ppVolumeTexture); - -#ifdef UNICODE -#define D3DXCreateVolumeTextureFromResourceEx D3DXCreateVolumeTextureFromResourceExW -#else -#define D3DXCreateVolumeTextureFromResourceEx D3DXCreateVolumeTextureFromResourceExA -#endif - - -// FromFileInMemory - -HRESULT WINAPI - D3DXCreateTextureFromFileInMemory( - LPDIRECT3DDEVICE9 pDevice, - LPCVOID pSrcData, - UINT SrcDataSize, - LPDIRECT3DTEXTURE9* ppTexture); - -HRESULT WINAPI - D3DXCreateCubeTextureFromFileInMemory( - LPDIRECT3DDEVICE9 pDevice, - LPCVOID pSrcData, - UINT SrcDataSize, - LPDIRECT3DCUBETEXTURE9* ppCubeTexture); - -HRESULT WINAPI - D3DXCreateVolumeTextureFromFileInMemory( - LPDIRECT3DDEVICE9 pDevice, - LPCVOID pSrcData, - UINT SrcDataSize, - LPDIRECT3DVOLUMETEXTURE9* ppVolumeTexture); - - -// FromFileInMemoryEx - -HRESULT WINAPI - D3DXCreateTextureFromFileInMemoryEx( - LPDIRECT3DDEVICE9 pDevice, - LPCVOID pSrcData, - UINT SrcDataSize, - UINT Width, - UINT Height, - UINT MipLevels, - DWORD Usage, - D3DFORMAT Format, - D3DPOOL Pool, - DWORD Filter, - DWORD MipFilter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo, - PALETTEENTRY* pPalette, - LPDIRECT3DTEXTURE9* ppTexture); - -HRESULT WINAPI - D3DXCreateCubeTextureFromFileInMemoryEx( - LPDIRECT3DDEVICE9 pDevice, - LPCVOID pSrcData, - UINT SrcDataSize, - UINT Size, - UINT MipLevels, - DWORD Usage, - D3DFORMAT Format, - D3DPOOL Pool, - DWORD Filter, - DWORD MipFilter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo, - PALETTEENTRY* pPalette, - LPDIRECT3DCUBETEXTURE9* ppCubeTexture); - -HRESULT WINAPI - D3DXCreateVolumeTextureFromFileInMemoryEx( - LPDIRECT3DDEVICE9 pDevice, - LPCVOID pSrcData, - UINT SrcDataSize, - UINT Width, - UINT Height, - UINT Depth, - UINT MipLevels, - DWORD Usage, - D3DFORMAT Format, - D3DPOOL Pool, - DWORD Filter, - DWORD MipFilter, - D3DCOLOR ColorKey, - D3DXIMAGE_INFO* pSrcInfo, - PALETTEENTRY* pPalette, - LPDIRECT3DVOLUMETEXTURE9* ppVolumeTexture); - - - -//---------------------------------------------------------------------------- -// D3DXSaveTextureToFile: -// ---------------------- -// Save a texture to a file. -// -// Parameters: -// pDestFile -// File name of the destination file -// DestFormat -// D3DXIMAGE_FILEFORMAT specifying file format to use when saving. -// pSrcTexture -// Source texture, containing the image to be saved -// pSrcPalette -// Source palette of 256 colors, or NULL -// -//---------------------------------------------------------------------------- - - -HRESULT WINAPI - D3DXSaveTextureToFileA( - LPCSTR pDestFile, - D3DXIMAGE_FILEFORMAT DestFormat, - LPDIRECT3DBASETEXTURE9 pSrcTexture, - CONST PALETTEENTRY* pSrcPalette); - -HRESULT WINAPI - D3DXSaveTextureToFileW( - LPCWSTR pDestFile, - D3DXIMAGE_FILEFORMAT DestFormat, - LPDIRECT3DBASETEXTURE9 pSrcTexture, - CONST PALETTEENTRY* pSrcPalette); - -#ifdef UNICODE -#define D3DXSaveTextureToFile D3DXSaveTextureToFileW -#else -#define D3DXSaveTextureToFile D3DXSaveTextureToFileA -#endif - - -//---------------------------------------------------------------------------- -// D3DXSaveTextureToFileInMemory: -// ---------------------- -// Save a texture to a file. -// -// Parameters: -// ppDestBuf -// address of a d3dxbuffer pointer to return the image data -// DestFormat -// D3DXIMAGE_FILEFORMAT specifying file format to use when saving. -// pSrcTexture -// Source texture, containing the image to be saved -// pSrcPalette -// Source palette of 256 colors, or NULL -// -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXSaveTextureToFileInMemory( - LPD3DXBUFFER* ppDestBuf, - D3DXIMAGE_FILEFORMAT DestFormat, - LPDIRECT3DBASETEXTURE9 pSrcTexture, - CONST PALETTEENTRY* pSrcPalette); - - - - -////////////////////////////////////////////////////////////////////////////// -// Misc Texture APIs ///////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// - -//---------------------------------------------------------------------------- -// D3DXFilterTexture: -// ------------------ -// Filters mipmaps levels of a texture. -// -// Parameters: -// pBaseTexture -// The texture object to be filtered -// pPalette -// 256 color palette to be used, or NULL for non-palettized formats -// SrcLevel -// The level whose image is used to generate the subsequent levels. -// Filter -// D3DX_FILTER flags controlling how each miplevel is filtered. -// Or D3DX_DEFAULT for D3DX_FILTER_BOX, -// -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXFilterTexture( - LPDIRECT3DBASETEXTURE9 pBaseTexture, - CONST PALETTEENTRY* pPalette, - UINT SrcLevel, - DWORD Filter); - -#define D3DXFilterCubeTexture D3DXFilterTexture -#define D3DXFilterVolumeTexture D3DXFilterTexture - - - -//---------------------------------------------------------------------------- -// D3DXFillTexture: -// ---------------- -// Uses a user provided function to fill each texel of each mip level of a -// given texture. -// -// Paramters: -// pTexture, pCubeTexture, pVolumeTexture -// Pointer to the texture to be filled. -// pFunction -// Pointer to user provided evalutor function which will be used to -// compute the value of each texel. -// pData -// Pointer to an arbitrary block of user defined data. This pointer -// will be passed to the function provided in pFunction -//----------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXFillTexture( - LPDIRECT3DTEXTURE9 pTexture, - LPD3DXFILL2D pFunction, - LPVOID pData); - -HRESULT WINAPI - D3DXFillCubeTexture( - LPDIRECT3DCUBETEXTURE9 pCubeTexture, - LPD3DXFILL3D pFunction, - LPVOID pData); - -HRESULT WINAPI - D3DXFillVolumeTexture( - LPDIRECT3DVOLUMETEXTURE9 pVolumeTexture, - LPD3DXFILL3D pFunction, - LPVOID pData); - -//--------------------------------------------------------------------------- -// D3DXFillTextureTX: -// ------------------ -// Uses a TX Shader target to function to fill each texel of each mip level -// of a given texture. The TX Shader target should be a compiled function -// taking 2 paramters and returning a float4 color. -// -// Paramters: -// pTexture, pCubeTexture, pVolumeTexture -// Pointer to the texture to be filled. -// pTextureShader -// Pointer to the texture shader to be used to fill in the texture -//---------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXFillTextureTX( - LPDIRECT3DTEXTURE9 pTexture, - LPD3DXTEXTURESHADER pTextureShader); - - -HRESULT WINAPI - D3DXFillCubeTextureTX( - LPDIRECT3DCUBETEXTURE9 pCubeTexture, - LPD3DXTEXTURESHADER pTextureShader); - - -HRESULT WINAPI - D3DXFillVolumeTextureTX( - LPDIRECT3DVOLUMETEXTURE9 pVolumeTexture, - LPD3DXTEXTURESHADER pTextureShader); - - - -//---------------------------------------------------------------------------- -// D3DXComputeNormalMap: -// --------------------- -// Converts a height map into a normal map. The (x,y,z) components of each -// normal are mapped to the (r,g,b) channels of the output texture. -// -// Parameters -// pTexture -// Pointer to the destination texture -// pSrcTexture -// Pointer to the source heightmap texture -// pSrcPalette -// Source palette of 256 colors, or NULL -// Flags -// D3DX_NORMALMAP flags -// Channel -// D3DX_CHANNEL specifying source of height information -// Amplitude -// The constant value which the height information is multiplied by. -//--------------------------------------------------------------------------- - -HRESULT WINAPI - D3DXComputeNormalMap( - LPDIRECT3DTEXTURE9 pTexture, - LPDIRECT3DTEXTURE9 pSrcTexture, - CONST PALETTEENTRY* pSrcPalette, - DWORD Flags, - DWORD Channel, - FLOAT Amplitude); - - - - -#ifdef __cplusplus -} -#endif //__cplusplus - -#endif //__D3DX9TEX_H__ - diff --git a/builddir/irrlicht-1.8.1/include/d3dx9xof.h b/builddir/irrlicht-1.8.1/include/d3dx9xof.h deleted file mode 100644 index c513f0f..0000000 --- a/builddir/irrlicht-1.8.1/include/d3dx9xof.h +++ /dev/null @@ -1,299 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) Microsoft Corporation. All Rights Reserved. -// -// File: d3dx9xof.h -// Content: D3DX .X File types and functions -// -/////////////////////////////////////////////////////////////////////////// - -#include "d3dx9.h" - -#if !defined( __D3DX9XOF_H__ ) -#define __D3DX9XOF_H__ - -#if defined( __cplusplus ) -extern "C" { -#endif // defined( __cplusplus ) - -//---------------------------------------------------------------------------- -// D3DXF_FILEFORMAT -// This flag is used to specify what file type to use when saving to disk. -// _BINARY, and _TEXT are mutually exclusive, while -// _COMPRESSED is an optional setting that works with all file types. -//---------------------------------------------------------------------------- -typedef DWORD D3DXF_FILEFORMAT; - -#define D3DXF_FILEFORMAT_BINARY 0 -#define D3DXF_FILEFORMAT_TEXT 1 -#define D3DXF_FILEFORMAT_COMPRESSED 2 - -//---------------------------------------------------------------------------- -// D3DXF_FILESAVEOPTIONS -// This flag is used to specify where to save the file to. Each flag is -// mutually exclusive, indicates the data location of the file, and also -// chooses which additional data will specify the location. -// _TOFILE is paired with a filename (LPCSTR) -// _TOWFILE is paired with a filename (LPWSTR) -//---------------------------------------------------------------------------- -typedef DWORD D3DXF_FILESAVEOPTIONS; - -#define D3DXF_FILESAVE_TOFILE 0x00L -#define D3DXF_FILESAVE_TOWFILE 0x01L - -//---------------------------------------------------------------------------- -// D3DXF_FILELOADOPTIONS -// This flag is used to specify where to load the file from. Each flag is -// mutually exclusive, indicates the data location of the file, and also -// chooses which additional data will specify the location. -// _FROMFILE is paired with a filename (LPCSTR) -// _FROMWFILE is paired with a filename (LPWSTR) -// _FROMRESOURCE is paired with a (D3DXF_FILELOADRESOUCE*) description. -// _FROMMEMORY is paired with a (D3DXF_FILELOADMEMORY*) description. -//---------------------------------------------------------------------------- -typedef DWORD D3DXF_FILELOADOPTIONS; - -#define D3DXF_FILELOAD_FROMFILE 0x00L -#define D3DXF_FILELOAD_FROMWFILE 0x01L -#define D3DXF_FILELOAD_FROMRESOURCE 0x02L -#define D3DXF_FILELOAD_FROMMEMORY 0x03L - -//---------------------------------------------------------------------------- -// D3DXF_FILELOADRESOURCE: -//---------------------------------------------------------------------------- - -typedef struct _D3DXF_FILELOADRESOURCE -{ - HMODULE hModule; // Desc - LPCSTR lpName; // Desc - LPCSTR lpType; // Desc -} D3DXF_FILELOADRESOURCE; - -//---------------------------------------------------------------------------- -// D3DXF_FILELOADMEMORY: -//---------------------------------------------------------------------------- - -typedef struct _D3DXF_FILELOADMEMORY -{ - LPCVOID lpMemory; // Desc - SIZE_T dSize; // Desc -} D3DXF_FILELOADMEMORY; - -#if defined( _WIN32 ) && !defined( _NO_COM ) - -// {cef08cf9-7b4f-4429-9624-2a690a933201} -DEFINE_GUID( IID_ID3DXFile, -0xcef08cf9, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 ); - -// {cef08cfa-7b4f-4429-9624-2a690a933201} -DEFINE_GUID( IID_ID3DXFileSaveObject, -0xcef08cfa, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 ); - -// {cef08cfb-7b4f-4429-9624-2a690a933201} -DEFINE_GUID( IID_ID3DXFileSaveData, -0xcef08cfb, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 ); - -// {cef08cfc-7b4f-4429-9624-2a690a933201} -DEFINE_GUID( IID_ID3DXFileEnumObject, -0xcef08cfc, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 ); - -// {cef08cfd-7b4f-4429-9624-2a690a933201} -DEFINE_GUID( IID_ID3DXFileData, -0xcef08cfd, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 ); - -#endif // defined( _WIN32 ) && !defined( _NO_COM ) - -#if defined( __cplusplus ) -#if !defined( DECLSPEC_UUID ) -#if _MSC_VER >= 1100 -#define DECLSPEC_UUID( x ) __declspec( uuid( x ) ) -#else // !( _MSC_VER >= 1100 ) -#define DECLSPEC_UUID( x ) -#endif // !( _MSC_VER >= 1100 ) -#endif // !defined( DECLSPEC_UUID ) - -interface DECLSPEC_UUID( "cef08cf9-7b4f-4429-9624-2a690a933201" ) - ID3DXFile; -interface DECLSPEC_UUID( "cef08cfa-7b4f-4429-9624-2a690a933201" ) - ID3DXFileSaveObject; -interface DECLSPEC_UUID( "cef08cfb-7b4f-4429-9624-2a690a933201" ) - ID3DXFileSaveData; -interface DECLSPEC_UUID( "cef08cfc-7b4f-4429-9624-2a690a933201" ) - ID3DXFileEnumObject; -interface DECLSPEC_UUID( "cef08cfd-7b4f-4429-9624-2a690a933201" ) - ID3DXFileData; - -#if defined( _COM_SMARTPTR_TYPEDEF ) -_COM_SMARTPTR_TYPEDEF( ID3DXFile, - __uuidof( ID3DXFile ) ); -_COM_SMARTPTR_TYPEDEF( ID3DXFileSaveObject, - __uuidof( ID3DXFileSaveObject ) ); -_COM_SMARTPTR_TYPEDEF( ID3DXFileSaveData, - __uuidof( ID3DXFileSaveData ) ); -_COM_SMARTPTR_TYPEDEF( ID3DXFileEnumObject, - __uuidof( ID3DXFileEnumObject ) ); -_COM_SMARTPTR_TYPEDEF( ID3DXFileData, - __uuidof( ID3DXFileData ) ); -#endif // defined( _COM_SMARTPTR_TYPEDEF ) -#endif // defined( __cplusplus ) - -typedef interface ID3DXFile ID3DXFile; -typedef interface ID3DXFileSaveObject ID3DXFileSaveObject; -typedef interface ID3DXFileSaveData ID3DXFileSaveData; -typedef interface ID3DXFileEnumObject ID3DXFileEnumObject; -typedef interface ID3DXFileData ID3DXFileData; - -////////////////////////////////////////////////////////////////////////////// -// ID3DXFile ///////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// - -#undef INTERFACE -#define INTERFACE ID3DXFile - -DECLARE_INTERFACE_( ID3DXFile, IUnknown ) -{ - STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE; - STDMETHOD_( ULONG, AddRef )( THIS ) PURE; - STDMETHOD_( ULONG, Release )( THIS ) PURE; - - STDMETHOD( CreateEnumObject )( THIS_ LPCVOID, D3DXF_FILELOADOPTIONS, - ID3DXFileEnumObject** ) PURE; - STDMETHOD( CreateSaveObject )( THIS_ LPCVOID, D3DXF_FILESAVEOPTIONS, - D3DXF_FILEFORMAT, ID3DXFileSaveObject** ) PURE; - STDMETHOD( RegisterTemplates )( THIS_ LPCVOID, SIZE_T ) PURE; - STDMETHOD( RegisterEnumTemplates )( THIS_ ID3DXFileEnumObject* ) PURE; -}; - -////////////////////////////////////////////////////////////////////////////// -// ID3DXFileSaveObject /////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// - -#undef INTERFACE -#define INTERFACE ID3DXFileSaveObject - -DECLARE_INTERFACE_( ID3DXFileSaveObject, IUnknown ) -{ - STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE; - STDMETHOD_( ULONG, AddRef )( THIS ) PURE; - STDMETHOD_( ULONG, Release )( THIS ) PURE; - - STDMETHOD( GetFile )( THIS_ ID3DXFile** ) PURE; - STDMETHOD( AddDataObject )( THIS_ REFGUID, LPCSTR, CONST GUID*, - SIZE_T, LPCVOID, ID3DXFileSaveData** ) PURE; - STDMETHOD( Save )( THIS ) PURE; -}; - -////////////////////////////////////////////////////////////////////////////// -// ID3DXFileSaveData ///////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// - -#undef INTERFACE -#define INTERFACE ID3DXFileSaveData - -DECLARE_INTERFACE_( ID3DXFileSaveData, IUnknown ) -{ - STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE; - STDMETHOD_( ULONG, AddRef )( THIS ) PURE; - STDMETHOD_( ULONG, Release )( THIS ) PURE; - - STDMETHOD( GetSave )( THIS_ ID3DXFileSaveObject** ) PURE; - STDMETHOD( GetName )( THIS_ LPSTR, SIZE_T* ) PURE; - STDMETHOD( GetId )( THIS_ LPGUID ) PURE; - STDMETHOD( GetType )( THIS_ GUID* ) PURE; - STDMETHOD( AddDataObject )( THIS_ REFGUID, LPCSTR, CONST GUID*, - SIZE_T, LPCVOID, ID3DXFileSaveData** ) PURE; - STDMETHOD( AddDataReference )( THIS_ LPCSTR, CONST GUID* ) PURE; -}; - -////////////////////////////////////////////////////////////////////////////// -// ID3DXFileEnumObject /////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// - -#undef INTERFACE -#define INTERFACE ID3DXFileEnumObject - -DECLARE_INTERFACE_( ID3DXFileEnumObject, IUnknown ) -{ - STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE; - STDMETHOD_( ULONG, AddRef )( THIS ) PURE; - STDMETHOD_( ULONG, Release )( THIS ) PURE; - - STDMETHOD( GetFile )( THIS_ ID3DXFile** ) PURE; - STDMETHOD( GetChildren )( THIS_ SIZE_T* ) PURE; - STDMETHOD( GetChild )( THIS_ SIZE_T, ID3DXFileData** ) PURE; - STDMETHOD( GetDataObjectById )( THIS_ REFGUID, ID3DXFileData** ) PURE; - STDMETHOD( GetDataObjectByName )( THIS_ LPCSTR, ID3DXFileData** ) PURE; -}; - -////////////////////////////////////////////////////////////////////////////// -// ID3DXFileData ///////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// - -#undef INTERFACE -#define INTERFACE ID3DXFileData - -DECLARE_INTERFACE_( ID3DXFileData, IUnknown ) -{ - STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE; - STDMETHOD_( ULONG, AddRef )( THIS ) PURE; - STDMETHOD_( ULONG, Release )( THIS ) PURE; - - STDMETHOD( GetEnum )( THIS_ ID3DXFileEnumObject** ) PURE; - STDMETHOD( GetName )( THIS_ LPSTR, SIZE_T* ) PURE; - STDMETHOD( GetId )( THIS_ LPGUID ) PURE; - STDMETHOD( Lock )( THIS_ SIZE_T*, LPCVOID* ) PURE; - STDMETHOD( Unlock )( THIS ) PURE; - STDMETHOD( GetType )( THIS_ GUID* ) PURE; - STDMETHOD_( BOOL, IsReference )( THIS ) PURE; - STDMETHOD( GetChildren )( THIS_ SIZE_T* ) PURE; - STDMETHOD( GetChild )( THIS_ SIZE_T, ID3DXFileData** ) PURE; -}; - -STDAPI D3DXFileCreate( ID3DXFile** lplpDirectXFile ); - -/* - * DirectX File errors. - */ - -#define _FACD3DXF 0x876 - -#define D3DXFERR_BADOBJECT MAKE_HRESULT( 1, _FACD3DXF, 900 ) -#define D3DXFERR_BADVALUE MAKE_HRESULT( 1, _FACD3DXF, 901 ) -#define D3DXFERR_BADTYPE MAKE_HRESULT( 1, _FACD3DXF, 902 ) -#define D3DXFERR_NOTFOUND MAKE_HRESULT( 1, _FACD3DXF, 903 ) -#define D3DXFERR_NOTDONEYET MAKE_HRESULT( 1, _FACD3DXF, 904 ) -#define D3DXFERR_FILENOTFOUND MAKE_HRESULT( 1, _FACD3DXF, 905 ) -#define D3DXFERR_RESOURCENOTFOUND MAKE_HRESULT( 1, _FACD3DXF, 906 ) -#define D3DXFERR_BADRESOURCE MAKE_HRESULT( 1, _FACD3DXF, 907 ) -#define D3DXFERR_BADFILETYPE MAKE_HRESULT( 1, _FACD3DXF, 908 ) -#define D3DXFERR_BADFILEVERSION MAKE_HRESULT( 1, _FACD3DXF, 909 ) -#define D3DXFERR_BADFILEFLOATSIZE MAKE_HRESULT( 1, _FACD3DXF, 910 ) -#define D3DXFERR_BADFILE MAKE_HRESULT( 1, _FACD3DXF, 911 ) -#define D3DXFERR_PARSEERROR MAKE_HRESULT( 1, _FACD3DXF, 912 ) -#define D3DXFERR_BADARRAYSIZE MAKE_HRESULT( 1, _FACD3DXF, 913 ) -#define D3DXFERR_BADDATAREFERENCE MAKE_HRESULT( 1, _FACD3DXF, 914 ) -#define D3DXFERR_NOMOREOBJECTS MAKE_HRESULT( 1, _FACD3DXF, 915 ) -#define D3DXFERR_NOMOREDATA MAKE_HRESULT( 1, _FACD3DXF, 916 ) -#define D3DXFERR_BADCACHEFILE MAKE_HRESULT( 1, _FACD3DXF, 917 ) - -/* - * DirectX File object types. - */ - -#ifndef WIN_TYPES -#define WIN_TYPES(itype, ptype) typedef interface itype *LP##ptype, **LPLP##ptype -#endif - -WIN_TYPES(ID3DXFile, D3DXFILE); -WIN_TYPES(ID3DXFileEnumObject, D3DXFILEENUMOBJECT); -WIN_TYPES(ID3DXFileSaveObject, D3DXFILESAVEOBJECT); -WIN_TYPES(ID3DXFileData, D3DXFILEDATA); -WIN_TYPES(ID3DXFileSaveData, D3DXFILESAVEDATA); - -#if defined( __cplusplus ) -} // extern "C" -#endif // defined( __cplusplus ) - -#endif // !defined( __D3DX9XOF_H__ ) - - diff --git a/builddir/irrlicht-1.8.1/include/dimension2d.h b/builddir/irrlicht-1.8.1/include/dimension2d.h deleted file mode 100644 index c9d0652..0000000 --- a/builddir/irrlicht-1.8.1/include/dimension2d.h +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_DIMENSION2D_H_INCLUDED__ -#define __IRR_DIMENSION2D_H_INCLUDED__ - -#include "irrTypes.h" -#include "irrMath.h" // for irr::core::equals() - -namespace irr -{ -namespace core -{ - template <class T> - class vector2d; - - //! Specifies a 2 dimensional size. - template <class T> - class dimension2d - { - public: - //! Default constructor for empty dimension - dimension2d() : Width(0), Height(0) {} - //! Constructor with width and height - dimension2d(const T& width, const T& height) - : Width(width), Height(height) {} - - dimension2d(const vector2d<T>& other); // Defined in vector2d.h - - //! Use this constructor only where you are sure that the conversion is valid. - template <class U> - explicit dimension2d(const dimension2d<U>& other) : - Width((T)other.Width), Height((T)other.Height) { } - - template <class U> - dimension2d<T>& operator=(const dimension2d<U>& other) - { - Width = (T) other.Width; - Height = (T) other.Height; - return *this; - } - - - //! Equality operator - bool operator==(const dimension2d<T>& other) const - { - return core::equals(Width, other.Width) && - core::equals(Height, other.Height); - } - - //! Inequality operator - bool operator!=(const dimension2d<T>& other) const - { - return ! (*this == other); - } - - bool operator==(const vector2d<T>& other) const; // Defined in vector2d.h - - bool operator!=(const vector2d<T>& other) const - { - return !(*this == other); - } - - //! Set to new values - dimension2d<T>& set(const T& width, const T& height) - { - Width = width; - Height = height; - return *this; - } - - //! Divide width and height by scalar - dimension2d<T>& operator/=(const T& scale) - { - Width /= scale; - Height /= scale; - return *this; - } - - //! Divide width and height by scalar - dimension2d<T> operator/(const T& scale) const - { - return dimension2d<T>(Width/scale, Height/scale); - } - - //! Multiply width and height by scalar - dimension2d<T>& operator*=(const T& scale) - { - Width *= scale; - Height *= scale; - return *this; - } - - //! Multiply width and height by scalar - dimension2d<T> operator*(const T& scale) const - { - return dimension2d<T>(Width*scale, Height*scale); - } - - //! Add another dimension to this one. - dimension2d<T>& operator+=(const dimension2d<T>& other) - { - Width += other.Width; - Height += other.Height; - return *this; - } - - //! Add two dimensions - dimension2d<T> operator+(const dimension2d<T>& other) const - { - return dimension2d<T>(Width+other.Width, Height+other.Height); - } - - //! Subtract a dimension from this one - dimension2d<T>& operator-=(const dimension2d<T>& other) - { - Width -= other.Width; - Height -= other.Height; - return *this; - } - - //! Subtract one dimension from another - dimension2d<T> operator-(const dimension2d<T>& other) const - { - return dimension2d<T>(Width-other.Width, Height-other.Height); - } - - //! Get area - T getArea() const - { - return Width*Height; - } - - //! Get the optimal size according to some properties - /** This is a function often used for texture dimension - calculations. The function returns the next larger or - smaller dimension which is a power-of-two dimension - (2^n,2^m) and/or square (Width=Height). - \param requirePowerOfTwo Forces the result to use only - powers of two as values. - \param requireSquare Makes width==height in the result - \param larger Choose whether the result is larger or - smaller than the current dimension. If one dimension - need not be changed it is kept with any value of larger. - \param maxValue Maximum texturesize. if value > 0 size is - clamped to maxValue - \return The optimal dimension under the given - constraints. */ - dimension2d<T> getOptimalSize( - bool requirePowerOfTwo=true, - bool requireSquare=false, - bool larger=true, - u32 maxValue = 0) const - { - u32 i=1; - u32 j=1; - if (requirePowerOfTwo) - { - while (i<(u32)Width) - i<<=1; - if (!larger && i!=1 && i!=(u32)Width) - i>>=1; - while (j<(u32)Height) - j<<=1; - if (!larger && j!=1 && j!=(u32)Height) - j>>=1; - } - else - { - i=(u32)Width; - j=(u32)Height; - } - - if (requireSquare) - { - if ((larger && (i>j)) || (!larger && (i<j))) - j=i; - else - i=j; - } - - if ( maxValue > 0 && i > maxValue) - i = maxValue; - - if ( maxValue > 0 && j > maxValue) - j = maxValue; - - return dimension2d<T>((T)i,(T)j); - } - - //! Get the interpolated dimension - /** \param other Other dimension to interpolate with. - \param d Value between 0.0f and 1.0f. - \return Interpolated dimension. */ - dimension2d<T> getInterpolated(const dimension2d<T>& other, f32 d) const - { - f32 inv = (1.0f - d); - return dimension2d<T>( (T)(other.Width*inv + Width*d), (T)(other.Height*inv + Height*d)); - } - - - //! Width of the dimension. - T Width; - //! Height of the dimension. - T Height; - }; - - //! Typedef for an f32 dimension. - typedef dimension2d<f32> dimension2df; - //! Typedef for an unsigned integer dimension. - typedef dimension2d<u32> dimension2du; - - //! Typedef for an integer dimension. - /** There are few cases where negative dimensions make sense. Please consider using - dimension2du instead. */ - typedef dimension2d<s32> dimension2di; - - -} // end namespace core -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/driverChoice.h b/builddir/irrlicht-1.8.1/include/driverChoice.h deleted file mode 100644 index 8f17c38..0000000 --- a/builddir/irrlicht-1.8.1/include/driverChoice.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2009-2012 Christian Stehno -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __E_DRIVER_CHOICE_H_INCLUDED__ -#define __E_DRIVER_CHOICE_H_INCLUDED__ - -#include <iostream> -#include <cstdio> -#include "EDriverTypes.h" -#include "irrTypes.h" -#include "IrrlichtDevice.h" - -namespace irr -{ - -//! ask user for driver -static irr::video::E_DRIVER_TYPE driverChoiceConsole(bool allDrivers=true) -{ - const char* const names[] = {"NullDriver","Software Renderer","Burning's Video","Direct3D 8.1","Direct3D 9.0c","OpenGL 1.x/2.x/3.x"}; - printf("Please select the driver you want:\n"); - irr::u32 i=0; - for (i=irr::video::EDT_COUNT; i>0; --i) - { - if (allDrivers || (irr::IrrlichtDevice::isDriverSupported(irr::video::E_DRIVER_TYPE(i-1)))) - printf(" (%c) %s\n", 'a'+irr::video::EDT_COUNT-i, names[i-1]); - } - - char c; - std::cin >> c; - c = irr::video::EDT_COUNT+'a'-c; - - for (i=irr::video::EDT_COUNT; i>0; --i) - { - if (!(allDrivers || (irr::IrrlichtDevice::isDriverSupported(irr::video::E_DRIVER_TYPE(i-1))))) - --c; - if ((char)i==c) - return irr::video::E_DRIVER_TYPE(i-1); - } - return irr::video::EDT_COUNT; -} - -} // end namespace irr - -#endif diff --git a/builddir/irrlicht-1.8.1/include/dxfile.h b/builddir/irrlicht-1.8.1/include/dxfile.h deleted file mode 100644 index 8b5995a..0000000 --- a/builddir/irrlicht-1.8.1/include/dxfile.h +++ /dev/null @@ -1,240 +0,0 @@ -/*************************************************************************** - * - * Copyright (C) 1998-1999 Microsoft Corporation. All Rights Reserved. - * - * File: dxfile.h - * - * Content: DirectX File public header file - * - ***************************************************************************/ - -#ifndef __DXFILE_H__ -#define __DXFILE_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -typedef DWORD DXFILEFORMAT; - -#define DXFILEFORMAT_BINARY 0 -#define DXFILEFORMAT_TEXT 1 -#define DXFILEFORMAT_COMPRESSED 2 - -typedef DWORD DXFILELOADOPTIONS; - -#define DXFILELOAD_FROMFILE 0x00L -#define DXFILELOAD_FROMRESOURCE 0x01L -#define DXFILELOAD_FROMMEMORY 0x02L -#define DXFILELOAD_FROMSTREAM 0x04L -#define DXFILELOAD_FROMURL 0x08L - -typedef struct _DXFILELOADRESOURCE { - HMODULE hModule; - LPCTSTR lpName; - LPCTSTR lpType; -}DXFILELOADRESOURCE, *LPDXFILELOADRESOURCE; - -typedef struct _DXFILELOADMEMORY { - LPVOID lpMemory; - DWORD dSize; -}DXFILELOADMEMORY, *LPDXFILELOADMEMORY; - -/* - * DirectX File object types. - */ - -#ifndef WIN_TYPES -#define WIN_TYPES(itype, ptype) typedef interface itype *LP##ptype, **LPLP##ptype -#endif - -WIN_TYPES(IDirectXFile, DIRECTXFILE); -WIN_TYPES(IDirectXFileEnumObject, DIRECTXFILEENUMOBJECT); -WIN_TYPES(IDirectXFileSaveObject, DIRECTXFILESAVEOBJECT); -WIN_TYPES(IDirectXFileObject, DIRECTXFILEOBJECT); -WIN_TYPES(IDirectXFileData, DIRECTXFILEDATA); -WIN_TYPES(IDirectXFileDataReference, DIRECTXFILEDATAREFERENCE); -WIN_TYPES(IDirectXFileBinary, DIRECTXFILEBINARY); - -/* - * API for creating IDirectXFile interface. - */ - -STDAPI DirectXFileCreate(LPDIRECTXFILE *lplpDirectXFile); - -/* - * The methods for IUnknown - */ - -#define IUNKNOWN_METHODS(kind) \ - STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) kind; \ - STDMETHOD_(ULONG, AddRef) (THIS) kind; \ - STDMETHOD_(ULONG, Release) (THIS) kind - -/* - * The methods for IDirectXFileObject - */ - -#define IDIRECTXFILEOBJECT_METHODS(kind) \ - STDMETHOD(GetName) (THIS_ LPSTR, LPDWORD) kind; \ - STDMETHOD(GetId) (THIS_ LPGUID) kind - -/* - * DirectX File interfaces. - */ - -#undef INTERFACE -#define INTERFACE IDirectXFile - -DECLARE_INTERFACE_(IDirectXFile, IUnknown) -{ - IUNKNOWN_METHODS(PURE); - STDMETHOD(CreateEnumObject) (THIS_ LPVOID, DXFILELOADOPTIONS, - LPDIRECTXFILEENUMOBJECT *) PURE; - STDMETHOD(CreateSaveObject) (THIS_ LPCSTR, DXFILEFORMAT, - LPDIRECTXFILESAVEOBJECT *) PURE; - STDMETHOD(RegisterTemplates) (THIS_ LPVOID, DWORD) PURE; -}; - -#undef INTERFACE -#define INTERFACE IDirectXFileEnumObject - -DECLARE_INTERFACE_(IDirectXFileEnumObject, IUnknown) -{ - IUNKNOWN_METHODS(PURE); - STDMETHOD(GetNextDataObject) (THIS_ LPDIRECTXFILEDATA *) PURE; - STDMETHOD(GetDataObjectById) (THIS_ REFGUID, LPDIRECTXFILEDATA *) PURE; - STDMETHOD(GetDataObjectByName) (THIS_ LPCSTR, LPDIRECTXFILEDATA *) PURE; -}; - -#undef INTERFACE -#define INTERFACE IDirectXFileSaveObject - -DECLARE_INTERFACE_(IDirectXFileSaveObject, IUnknown) -{ - IUNKNOWN_METHODS(PURE); - STDMETHOD(SaveTemplates) (THIS_ DWORD, const GUID **) PURE; - STDMETHOD(CreateDataObject) (THIS_ REFGUID, LPCSTR, const GUID *, - DWORD, LPVOID, LPDIRECTXFILEDATA *) PURE; - STDMETHOD(SaveData) (THIS_ LPDIRECTXFILEDATA) PURE; -}; - - -#undef INTERFACE -#define INTERFACE IDirectXFileObject - -DECLARE_INTERFACE_(IDirectXFileObject, IUnknown) -{ - IUNKNOWN_METHODS(PURE); - IDIRECTXFILEOBJECT_METHODS(PURE); -}; - -#undef INTERFACE -#define INTERFACE IDirectXFileData - -DECLARE_INTERFACE_(IDirectXFileData, IDirectXFileObject) -{ - IUNKNOWN_METHODS(PURE); - IDIRECTXFILEOBJECT_METHODS(PURE); - - STDMETHOD(GetData) (THIS_ LPCSTR, DWORD *, void **) PURE; - STDMETHOD(GetType) (THIS_ const GUID **) PURE; - STDMETHOD(GetNextObject) (THIS_ LPDIRECTXFILEOBJECT *) PURE; - STDMETHOD(AddDataObject) (THIS_ LPDIRECTXFILEDATA) PURE; - STDMETHOD(AddDataReference) (THIS_ LPCSTR, const GUID *) PURE; - STDMETHOD(AddBinaryObject) (THIS_ LPCSTR, const GUID *, LPCSTR, LPVOID, DWORD) PURE; -}; - -#undef INTERFACE -#define INTERFACE IDirectXFileDataReference - -DECLARE_INTERFACE_(IDirectXFileDataReference, IDirectXFileObject) -{ - IUNKNOWN_METHODS(PURE); - IDIRECTXFILEOBJECT_METHODS(PURE); - - STDMETHOD(Resolve) (THIS_ LPDIRECTXFILEDATA *) PURE; -}; - -#undef INTERFACE -#define INTERFACE IDirectXFileBinary - -DECLARE_INTERFACE_(IDirectXFileBinary, IDirectXFileObject) -{ - IUNKNOWN_METHODS(PURE); - IDIRECTXFILEOBJECT_METHODS(PURE); - - STDMETHOD(GetSize) (THIS_ DWORD *) PURE; - STDMETHOD(GetMimeType) (THIS_ LPCSTR *) PURE; - STDMETHOD(Read) (THIS_ LPVOID, DWORD, LPDWORD) PURE; -}; - -/* - * DirectXFile Object Class Id (for CoCreateInstance()) - */ - -DEFINE_GUID(CLSID_CDirectXFile, 0x4516ec43, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3); - -/* - * DirectX File Interface GUIDs. - */ - -DEFINE_GUID(IID_IDirectXFile, 0x3d82ab40, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); -DEFINE_GUID(IID_IDirectXFileEnumObject, 0x3d82ab41, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); -DEFINE_GUID(IID_IDirectXFileSaveObject, 0x3d82ab42, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); -DEFINE_GUID(IID_IDirectXFileObject, 0x3d82ab43, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); -DEFINE_GUID(IID_IDirectXFileData, 0x3d82ab44, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); -DEFINE_GUID(IID_IDirectXFileDataReference, 0x3d82ab45, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); -DEFINE_GUID(IID_IDirectXFileBinary, 0x3d82ab46, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); - -/* - * DirectX File Header template's GUID. - */ - -DEFINE_GUID(TID_DXFILEHeader, 0x3d82ab43, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); - - -/* - * DirectX File errors. - */ - -#define _FACDD 0x876 -#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) - -#define DXFILE_OK 0 - -#define DXFILEERR_BADOBJECT MAKE_DDHRESULT(850) -#define DXFILEERR_BADVALUE MAKE_DDHRESULT(851) -#define DXFILEERR_BADTYPE MAKE_DDHRESULT(852) -#define DXFILEERR_BADSTREAMHANDLE MAKE_DDHRESULT(853) -#define DXFILEERR_BADALLOC MAKE_DDHRESULT(854) -#define DXFILEERR_NOTFOUND MAKE_DDHRESULT(855) -#define DXFILEERR_NOTDONEYET MAKE_DDHRESULT(856) -#define DXFILEERR_FILENOTFOUND MAKE_DDHRESULT(857) -#define DXFILEERR_RESOURCENOTFOUND MAKE_DDHRESULT(858) -#define DXFILEERR_URLNOTFOUND MAKE_DDHRESULT(859) -#define DXFILEERR_BADRESOURCE MAKE_DDHRESULT(860) -#define DXFILEERR_BADFILETYPE MAKE_DDHRESULT(861) -#define DXFILEERR_BADFILEVERSION MAKE_DDHRESULT(862) -#define DXFILEERR_BADFILEFLOATSIZE MAKE_DDHRESULT(863) -#define DXFILEERR_BADFILECOMPRESSIONTYPE MAKE_DDHRESULT(864) -#define DXFILEERR_BADFILE MAKE_DDHRESULT(865) -#define DXFILEERR_PARSEERROR MAKE_DDHRESULT(866) -#define DXFILEERR_NOTEMPLATE MAKE_DDHRESULT(867) -#define DXFILEERR_BADARRAYSIZE MAKE_DDHRESULT(868) -#define DXFILEERR_BADDATAREFERENCE MAKE_DDHRESULT(869) -#define DXFILEERR_INTERNALERROR MAKE_DDHRESULT(870) -#define DXFILEERR_NOMOREOBJECTS MAKE_DDHRESULT(871) -#define DXFILEERR_BADINTRINSICS MAKE_DDHRESULT(872) -#define DXFILEERR_NOMORESTREAMHANDLES MAKE_DDHRESULT(873) -#define DXFILEERR_NOMOREDATA MAKE_DDHRESULT(874) -#define DXFILEERR_BADCACHEFILE MAKE_DDHRESULT(875) -#define DXFILEERR_NOINTERNET MAKE_DDHRESULT(876) - - -#ifdef __cplusplus -}; -#endif - -#endif /* _DXFILE_H_ */ - \ No newline at end of file diff --git a/builddir/irrlicht-1.8.1/include/fast_atof.h b/builddir/irrlicht-1.8.1/include/fast_atof.h deleted file mode 100644 index d11f7b4..0000000 --- a/builddir/irrlicht-1.8.1/include/fast_atof.h +++ /dev/null @@ -1,364 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine" and the "irrXML" project. -// For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h - -#ifndef __FAST_ATOF_H_INCLUDED__ -#define __FAST_ATOF_H_INCLUDED__ - -#include "irrMath.h" -#include "irrString.h" - -namespace irr -{ -namespace core -{ - //! Selection of characters which count as decimal point in fast_atof - // TODO: This should probably also be used in irr::core::string, but the float-to-string code - // used there has to be rewritten first. - IRRLICHT_API extern irr::core::stringc LOCALE_DECIMAL_POINTS; - -// we write [17] here instead of [] to work around a swig bug -const float fast_atof_table[17] = { - 0.f, - 0.1f, - 0.01f, - 0.001f, - 0.0001f, - 0.00001f, - 0.000001f, - 0.0000001f, - 0.00000001f, - 0.000000001f, - 0.0000000001f, - 0.00000000001f, - 0.000000000001f, - 0.0000000000001f, - 0.00000000000001f, - 0.000000000000001f, - 0.0000000000000001f -}; - -//! Convert a simple string of base 10 digits into an unsigned 32 bit integer. -/** \param[in] in: The string of digits to convert. No leading chars are - allowed, only digits 0 to 9. Parsing stops at the first non-digit. - \param[out] out: (optional) If provided, it will be set to point at the - first character not used in the calculation. - \return The unsigned integer value of the digits. If the string specifies - too many digits to encode in an u32 then INT_MAX will be returned. -*/ -inline u32 strtoul10(const char* in, const char** out=0) -{ - if (!in) - { - if (out) - *out = in; - return 0; - } - - bool overflow=false; - u32 unsignedValue = 0; - while ( ( *in >= '0') && ( *in <= '9' )) - { - const u32 tmp = ( unsignedValue * 10 ) + ( *in - '0' ); - if (tmp<unsignedValue) - { - unsignedValue=(u32)0xffffffff; - overflow=true; - } - if (!overflow) - unsignedValue = tmp; - ++in; - } - - if (out) - *out = in; - - return unsignedValue; -} - -//! Convert a simple string of base 10 digits into a signed 32 bit integer. -/** \param[in] in: The string of digits to convert. Only a leading - or + - followed by digits 0 to 9 will be considered. Parsing stops at the first - non-digit. - \param[out] out: (optional) If provided, it will be set to point at the - first character not used in the calculation. - \return The signed integer value of the digits. If the string specifies - too many digits to encode in an s32 then +INT_MAX or -INT_MAX will be - returned. -*/ -inline s32 strtol10(const char* in, const char** out=0) -{ - if (!in) - { - if (out) - *out = in; - return 0; - } - - const bool negative = ('-' == *in); - if (negative || ('+' == *in)) - ++in; - - const u32 unsignedValue = strtoul10(in,out); - if (unsignedValue > (u32)INT_MAX) - { - if (negative) - return (s32)INT_MIN; - else - return (s32)INT_MAX; - } - else - { - if (negative) - return -((s32)unsignedValue); - else - return (s32)unsignedValue; - } -} - -//! Convert a hex-encoded character to an unsigned integer. -/** \param[in] in The digit to convert. Only digits 0 to 9 and chars A-F,a-f - will be considered. - \return The unsigned integer value of the digit. 0xffffffff if the input is - not hex -*/ -inline u32 ctoul16(char in) -{ - if (in >= '0' && in <= '9') - return in - '0'; - else if (in >= 'a' && in <= 'f') - return 10u + in - 'a'; - else if (in >= 'A' && in <= 'F') - return 10u + in - 'A'; - else - return 0xffffffff; -} - -//! Convert a simple string of base 16 digits into an unsigned 32 bit integer. -/** \param[in] in: The string of digits to convert. No leading chars are - allowed, only digits 0 to 9 and chars A-F,a-f are allowed. Parsing stops - at the first illegal char. - \param[out] out: (optional) If provided, it will be set to point at the - first character not used in the calculation. - \return The unsigned integer value of the digits. If the string specifies - too many digits to encode in an u32 then INT_MAX will be returned. -*/ -inline u32 strtoul16(const char* in, const char** out=0) -{ - if (!in) - { - if (out) - *out = in; - return 0; - } - - bool overflow=false; - u32 unsignedValue = 0; - while (true) - { - u32 tmp = 0; - if ((*in >= '0') && (*in <= '9')) - tmp = (unsignedValue << 4u) + (*in - '0'); - else if ((*in >= 'A') && (*in <= 'F')) - tmp = (unsignedValue << 4u) + (*in - 'A') + 10; - else if ((*in >= 'a') && (*in <= 'f')) - tmp = (unsignedValue << 4u) + (*in - 'a') + 10; - else - break; - if (tmp<unsignedValue) - { - unsignedValue=(u32)INT_MAX; - overflow=true; - } - if (!overflow) - unsignedValue = tmp; - ++in; - } - - if (out) - *out = in; - - return unsignedValue; -} - -//! Convert a simple string of base 8 digits into an unsigned 32 bit integer. -/** \param[in] in The string of digits to convert. No leading chars are - allowed, only digits 0 to 7 are allowed. Parsing stops at the first illegal - char. - \param[out] out (optional) If provided, it will be set to point at the - first character not used in the calculation. - \return The unsigned integer value of the digits. If the string specifies - too many digits to encode in an u32 then INT_MAX will be returned. -*/ -inline u32 strtoul8(const char* in, const char** out=0) -{ - if (!in) - { - if (out) - *out = in; - return 0; - } - - bool overflow=false; - u32 unsignedValue = 0; - while (true) - { - u32 tmp = 0; - if ((*in >= '0') && (*in <= '7')) - tmp = (unsignedValue << 3u) + (*in - '0'); - else - break; - if (tmp<unsignedValue) - { - unsignedValue=(u32)INT_MAX; - overflow=true; - } - if (!overflow) - unsignedValue = tmp; - ++in; - } - - if (out) - *out = in; - - return unsignedValue; -} - -//! Convert a C-style prefixed string (hex, oct, integer) into an unsigned 32 bit integer. -/** \param[in] in The string of digits to convert. If string starts with 0x the - hex parser is used, if only leading 0 is used, oct parser is used. In all - other cases, the usual unsigned parser is used. - \param[out] out (optional) If provided, it will be set to point at the - first character not used in the calculation. - \return The unsigned integer value of the digits. If the string specifies - too many digits to encode in an u32 then INT_MAX will be returned. -*/ -inline u32 strtoul_prefix(const char* in, const char** out=0) -{ - if (!in) - { - if (out) - *out = in; - return 0; - } - if ('0'==in[0]) - return ('x'==in[1] ? strtoul16(in+2,out) : strtoul8(in+1,out)); - return strtoul10(in,out); -} - -//! Converts a sequence of digits into a whole positive floating point value. -/** Only digits 0 to 9 are parsed. Parsing stops at any other character, - including sign characters or a decimal point. - \param in: the sequence of digits to convert. - \param out: (optional) will be set to point at the first non-converted - character. - \return The whole positive floating point representation of the digit - sequence. -*/ -inline f32 strtof10(const char* in, const char** out = 0) -{ - if (!in) - { - if (out) - *out = in; - return 0.f; - } - - const u32 MAX_SAFE_U32_VALUE = UINT_MAX / 10 - 10; - u32 intValue = 0; - - // Use integer arithmetic for as long as possible, for speed - // and precision. - while ( ( *in >= '0') && ( *in <= '9' ) ) - { - // If it looks like we're going to overflow, bail out - // now and start using floating point. - if (intValue >= MAX_SAFE_U32_VALUE) - break; - - intValue = (intValue * 10) + (*in - '0'); - ++in; - } - - f32 floatValue = (f32)intValue; - - // If there are any digits left to parse, then we need to use - // floating point arithmetic from here. - while ( ( *in >= '0') && ( *in <= '9' ) ) - { - floatValue = (floatValue * 10.f) + (f32)(*in - '0'); - ++in; - if (floatValue > FLT_MAX) // Just give up. - break; - } - - if (out) - *out = in; - - return floatValue; -} - -//! Provides a fast function for converting a string into a float. -/** This is not guaranteed to be as accurate as atof(), but is - approximately 6 to 8 times as fast. - \param[in] in The string to convert. - \param[out] result The resultant float will be written here. - \return Pointer to the first character in the string that wasn't used - to create the float value. -*/ -inline const char* fast_atof_move(const char* in, f32& result) -{ - // Please run the regression test when making any modifications to this function. - - result = 0.f; - if (!in) - return 0; - - const bool negative = ('-' == *in); - if (negative || ('+'==*in)) - ++in; - - f32 value = strtof10(in, &in); - - if ( LOCALE_DECIMAL_POINTS.findFirst(*in) >= 0 ) - { - const char* afterDecimal = ++in; - const f32 decimal = strtof10(in, &afterDecimal); - value += decimal * fast_atof_table[afterDecimal - in]; - in = afterDecimal; - } - - if ('e' == *in || 'E' == *in) - { - ++in; - // Assume that the exponent is a whole number. - // strtol10() will deal with both + and - signs, - // but calculate as f32 to prevent overflow at FLT_MAX - value *= powf(10.f, (f32)strtol10(in, &in)); - } - - result = negative?-value:value; - return in; -} - -//! Convert a string to a floating point number -/** \param floatAsString The string to convert. - \param out Optional pointer to the first character in the string that - wasn't used to create the float value. - \result Float value parsed from the input string -*/ -inline float fast_atof(const char* floatAsString, const char** out=0) -{ - float ret; - if (out) - *out=fast_atof_move(floatAsString, ret); - else - fast_atof_move(floatAsString, ret); - return ret; -} - -} // end namespace core -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/heapsort.h b/builddir/irrlicht-1.8.1/include/heapsort.h deleted file mode 100644 index a2e2c38..0000000 --- a/builddir/irrlicht-1.8.1/include/heapsort.h +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_HEAPSORT_H_INCLUDED__ -#define __IRR_HEAPSORT_H_INCLUDED__ - -#include "irrTypes.h" - -namespace irr -{ -namespace core -{ - -//! Sinks an element into the heap. -template<class T> -inline void heapsink(T*array, s32 element, s32 max) -{ - while ((element<<1) < max) // there is a left child - { - s32 j = (element<<1); - - if (j+1 < max && array[j] < array[j+1]) - j = j+1; // take right child - - if (array[element] < array[j]) - { - T t = array[j]; // swap elements - array[j] = array[element]; - array[element] = t; - element = j; - } - else - return; - } -} - - -//! Sorts an array with size 'size' using heapsort. -template<class T> -inline void heapsort(T* array_, s32 size) -{ - // for heapsink we pretent this is not c++, where - // arrays start with index 0. So we decrease the array pointer, - // the maximum always +2 and the element always +1 - - T* virtualArray = array_ - 1; - s32 virtualSize = size + 2; - s32 i; - - // build heap - - for (i=((size-1)/2); i>=0; --i) - heapsink(virtualArray, i+1, virtualSize-1); - - // sort array, leave out the last element (0) - for (i=size-1; i>0; --i) - { - T t = array_[0]; - array_[0] = array_[i]; - array_[i] = t; - heapsink(virtualArray, 1, i + 1); - } -} - -} // end namespace core -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/irrAllocator.h b/builddir/irrlicht-1.8.1/include/irrAllocator.h deleted file mode 100644 index 8a80359..0000000 --- a/builddir/irrlicht-1.8.1/include/irrAllocator.h +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine" and the "irrXML" project. -// For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h - -#ifndef __IRR_ALLOCATOR_H_INCLUDED__ -#define __IRR_ALLOCATOR_H_INCLUDED__ - -#include "irrTypes.h" -#include <new> -// necessary for older compilers -#include <memory.h> - -namespace irr -{ -namespace core -{ - -#ifdef DEBUG_CLIENTBLOCK -#undef DEBUG_CLIENTBLOCK -#define DEBUG_CLIENTBLOCK new -#endif - -//! Very simple allocator implementation, containers using it can be used across dll boundaries -template<typename T> -class irrAllocator -{ -public: - - //! Destructor - virtual ~irrAllocator() {} - - //! Allocate memory for an array of objects - T* allocate(size_t cnt) - { - return (T*)internal_new(cnt* sizeof(T)); - } - - //! Deallocate memory for an array of objects - void deallocate(T* ptr) - { - internal_delete(ptr); - } - - //! Construct an element - void construct(T* ptr, const T&e) - { - new ((void*)ptr) T(e); - } - - //! Destruct an element - void destruct(T* ptr) - { - ptr->~T(); - } - -protected: - - virtual void* internal_new(size_t cnt) - { - return operator new(cnt); - } - - virtual void internal_delete(void* ptr) - { - operator delete(ptr); - } - -}; - - -//! Fast allocator, only to be used in containers inside the same memory heap. -/** Containers using it are NOT able to be used it across dll boundaries. Use this -when using in an internal class or function or when compiled into a static lib */ -template<typename T> -class irrAllocatorFast -{ -public: - - //! Allocate memory for an array of objects - T* allocate(size_t cnt) - { - return (T*)operator new(cnt* sizeof(T)); - } - - //! Deallocate memory for an array of objects - void deallocate(T* ptr) - { - operator delete(ptr); - } - - //! Construct an element - void construct(T* ptr, const T&e) - { - new ((void*)ptr) T(e); - } - - //! Destruct an element - void destruct(T* ptr) - { - ptr->~T(); - } -}; - - - -#ifdef DEBUG_CLIENTBLOCK -#undef DEBUG_CLIENTBLOCK -#define DEBUG_CLIENTBLOCK new( _CLIENT_BLOCK, __FILE__, __LINE__) -#endif - -//! defines an allocation strategy -enum eAllocStrategy -{ - ALLOC_STRATEGY_SAFE = 0, - ALLOC_STRATEGY_DOUBLE = 1, - ALLOC_STRATEGY_SQRT = 2 -}; - - -} // end namespace core -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/irrArray.h b/builddir/irrlicht-1.8.1/include/irrArray.h deleted file mode 100644 index f9d338d..0000000 --- a/builddir/irrlicht-1.8.1/include/irrArray.h +++ /dev/null @@ -1,627 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine" and the "irrXML" project. -// For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h - -#ifndef __IRR_ARRAY_H_INCLUDED__ -#define __IRR_ARRAY_H_INCLUDED__ - -#include "irrTypes.h" -#include "heapsort.h" -#include "irrAllocator.h" -#include "irrMath.h" - -namespace irr -{ -namespace core -{ - -//! Self reallocating template array (like stl vector) with additional features. -/** Some features are: Heap sorting, binary search methods, easier debugging. -*/ -template <class T, typename TAlloc = irrAllocator<T> > -class array -{ - -public: - - //! Default constructor for empty array. - array() - : data(0), allocated(0), used(0), - strategy(ALLOC_STRATEGY_DOUBLE), free_when_destroyed(true), is_sorted(true) - { - } - - - //! Constructs an array and allocates an initial chunk of memory. - /** \param start_count Amount of elements to pre-allocate. */ - array(u32 start_count) - : data(0), allocated(0), used(0), - strategy(ALLOC_STRATEGY_DOUBLE), free_when_destroyed(true), is_sorted(true) - { - reallocate(start_count); - } - - - //! Copy constructor - array(const array<T, TAlloc>& other) : data(0) - { - *this = other; - } - - - //! Destructor. - /** Frees allocated memory, if set_free_when_destroyed was not set to - false by the user before. */ - ~array() - { - clear(); - } - - - //! Reallocates the array, make it bigger or smaller. - /** \param new_size New size of array. - \param canShrink Specifies whether the array is reallocated even if - enough space is available. Setting this flag to false can speed up - array usage, but may use more memory than required by the data. - */ - void reallocate(u32 new_size, bool canShrink=true) - { - if (allocated==new_size) - return; - if (!canShrink && (new_size < allocated)) - return; - - T* old_data = data; - - data = allocator.allocate(new_size); //new T[new_size]; - allocated = new_size; - - // copy old data - s32 end = used < new_size ? used : new_size; - - for (s32 i=0; i<end; ++i) - { - // data[i] = old_data[i]; - allocator.construct(&data[i], old_data[i]); - } - - // destruct old data - for (u32 j=0; j<used; ++j) - allocator.destruct(&old_data[j]); - - if (allocated < used) - used = allocated; - - allocator.deallocate(old_data); //delete [] old_data; - } - - - //! set a new allocation strategy - /** if the maximum size of the array is unknown, you can define how big the - allocation should happen. - \param newStrategy New strategy to apply to this array. */ - void setAllocStrategy ( eAllocStrategy newStrategy = ALLOC_STRATEGY_DOUBLE ) - { - strategy = newStrategy; - } - - - //! Adds an element at back of array. - /** If the array is too small to add this new element it is made bigger. - \param element: Element to add at the back of the array. */ - void push_back(const T& element) - { - insert(element, used); - } - - - //! Adds an element at the front of the array. - /** If the array is to small to add this new element, the array is - made bigger. Please note that this is slow, because the whole array - needs to be copied for this. - \param element Element to add at the back of the array. */ - void push_front(const T& element) - { - insert(element); - } - - - //! Insert item into array at specified position. - /** Please use this only if you know what you are doing (possible - performance loss). The preferred method of adding elements should be - push_back(). - \param element: Element to be inserted - \param index: Where position to insert the new element. */ - void insert(const T& element, u32 index=0) - { - _IRR_DEBUG_BREAK_IF(index>used) // access violation - - if (used + 1 > allocated) - { - // this doesn't work if the element is in the same - // array. So we'll copy the element first to be sure - // we'll get no data corruption - const T e(element); - - // increase data block - u32 newAlloc; - switch ( strategy ) - { - case ALLOC_STRATEGY_DOUBLE: - newAlloc = used + 1 + (allocated < 500 ? - (allocated < 5 ? 5 : used) : used >> 2); - break; - default: - case ALLOC_STRATEGY_SAFE: - newAlloc = used + 1; - break; - } - reallocate( newAlloc); - - // move array content and construct new element - // first move end one up - for (u32 i=used; i>index; --i) - { - if (i<used) - allocator.destruct(&data[i]); - allocator.construct(&data[i], data[i-1]); // data[i] = data[i-1]; - } - // then add new element - if (used > index) - allocator.destruct(&data[index]); - allocator.construct(&data[index], e); // data[index] = e; - } - else - { - // element inserted not at end - if ( used > index ) - { - // create one new element at the end - allocator.construct(&data[used], data[used-1]); - - // move the rest of the array content - for (u32 i=used-1; i>index; --i) - { - data[i] = data[i-1]; - } - // insert the new element - data[index] = element; - } - else - { - // insert the new element to the end - allocator.construct(&data[index], element); - } - } - // set to false as we don't know if we have the comparison operators - is_sorted = false; - ++used; - } - - - //! Clears the array and deletes all allocated memory. - void clear() - { - if (free_when_destroyed) - { - for (u32 i=0; i<used; ++i) - allocator.destruct(&data[i]); - - allocator.deallocate(data); // delete [] data; - } - data = 0; - used = 0; - allocated = 0; - is_sorted = true; - } - - - //! Sets pointer to new array, using this as new workspace. - /** Make sure that set_free_when_destroyed is used properly. - \param newPointer: Pointer to new array of elements. - \param size: Size of the new array. - \param _is_sorted Flag which tells whether the new array is already - sorted. - \param _free_when_destroyed Sets whether the new memory area shall be - freed by the array upon destruction, or if this will be up to the user - application. */ - void set_pointer(T* newPointer, u32 size, bool _is_sorted=false, bool _free_when_destroyed=true) - { - clear(); - data = newPointer; - allocated = size; - used = size; - is_sorted = _is_sorted; - free_when_destroyed=_free_when_destroyed; - } - - - //! Sets if the array should delete the memory it uses upon destruction. - /** Also clear and set_pointer will only delete the (original) memory - area if this flag is set to true, which is also the default. The - methods reallocate, set_used, push_back, push_front, insert, and erase - will still try to deallocate the original memory, which might cause - troubles depending on the intended use of the memory area. - \param f If true, the array frees the allocated memory in its - destructor, otherwise not. The default is true. */ - void set_free_when_destroyed(bool f) - { - free_when_destroyed = f; - } - - - //! Sets the size of the array and allocates new elements if necessary. - /** Please note: This is only secure when using it with simple types, - because no default constructor will be called for the added elements. - \param usedNow Amount of elements now used. */ - void set_used(u32 usedNow) - { - if (allocated < usedNow) - reallocate(usedNow); - - used = usedNow; - } - - - //! Assignment operator - const array<T, TAlloc>& operator=(const array<T, TAlloc>& other) - { - if (this == &other) - return *this; - strategy = other.strategy; - - if (data) - clear(); - - //if (allocated < other.allocated) - if (other.allocated == 0) - data = 0; - else - data = allocator.allocate(other.allocated); // new T[other.allocated]; - - used = other.used; - free_when_destroyed = true; - is_sorted = other.is_sorted; - allocated = other.allocated; - - for (u32 i=0; i<other.used; ++i) - allocator.construct(&data[i], other.data[i]); // data[i] = other.data[i]; - - return *this; - } - - - //! Equality operator - bool operator == (const array<T, TAlloc>& other) const - { - if (used != other.used) - return false; - - for (u32 i=0; i<other.used; ++i) - if (data[i] != other[i]) - return false; - return true; - } - - - //! Inequality operator - bool operator != (const array<T, TAlloc>& other) const - { - return !(*this==other); - } - - - //! Direct access operator - T& operator [](u32 index) - { - _IRR_DEBUG_BREAK_IF(index>=used) // access violation - - return data[index]; - } - - - //! Direct const access operator - const T& operator [](u32 index) const - { - _IRR_DEBUG_BREAK_IF(index>=used) // access violation - - return data[index]; - } - - - //! Gets last element. - T& getLast() - { - _IRR_DEBUG_BREAK_IF(!used) // access violation - - return data[used-1]; - } - - - //! Gets last element - const T& getLast() const - { - _IRR_DEBUG_BREAK_IF(!used) // access violation - - return data[used-1]; - } - - - //! Gets a pointer to the array. - /** \return Pointer to the array. */ - T* pointer() - { - return data; - } - - - //! Gets a const pointer to the array. - /** \return Pointer to the array. */ - const T* const_pointer() const - { - return data; - } - - - //! Get number of occupied elements of the array. - /** \return Size of elements in the array which are actually occupied. */ - u32 size() const - { - return used; - } - - - //! Get amount of memory allocated. - /** \return Amount of memory allocated. The amount of bytes - allocated would be allocated_size() * sizeof(ElementTypeUsed); */ - u32 allocated_size() const - { - return allocated; - } - - - //! Check if array is empty. - /** \return True if the array is empty false if not. */ - bool empty() const - { - return used == 0; - } - - - //! Sorts the array using heapsort. - /** There is no additional memory waste and the algorithm performs - O(n*log n) in worst case. */ - void sort() - { - if (!is_sorted && used>1) - heapsort(data, used); - is_sorted = true; - } - - - //! Performs a binary search for an element, returns -1 if not found. - /** The array will be sorted before the binary search if it is not - already sorted. Caution is advised! Be careful not to call this on - unsorted const arrays, or the slower method will be used. - \param element Element to search for. - \return Position of the searched element if it was found, - otherwise -1 is returned. */ - s32 binary_search(const T& element) - { - sort(); - return binary_search(element, 0, used-1); - } - - - //! Performs a binary search for an element if possible, returns -1 if not found. - /** This method is for const arrays and so cannot call sort(), if the array is - not sorted then linear_search will be used instead. Potentially very slow! - \param element Element to search for. - \return Position of the searched element if it was found, - otherwise -1 is returned. */ - s32 binary_search(const T& element) const - { - if (is_sorted) - return binary_search(element, 0, used-1); - else - return linear_search(element); - } - - - //! Performs a binary search for an element, returns -1 if not found. - /** \param element: Element to search for. - \param left First left index - \param right Last right index. - \return Position of the searched element if it was found, otherwise -1 - is returned. */ - s32 binary_search(const T& element, s32 left, s32 right) const - { - if (!used) - return -1; - - s32 m; - - do - { - m = (left+right)>>1; - - if (element < data[m]) - right = m - 1; - else - left = m + 1; - - } while((element < data[m] || data[m] < element) && left<=right); - // this last line equals to: - // " while((element != array[m]) && left<=right);" - // but we only want to use the '<' operator. - // the same in next line, it is "(element == array[m])" - - - if (!(element < data[m]) && !(data[m] < element)) - return m; - - return -1; - } - - - //! Performs a binary search for an element, returns -1 if not found. - //! it is used for searching a multiset - /** The array will be sorted before the binary search if it is not - already sorted. - \param element Element to search for. - \param &last return lastIndex of equal elements - \return Position of the first searched element if it was found, - otherwise -1 is returned. */ - s32 binary_search_multi(const T& element, s32 &last) - { - sort(); - s32 index = binary_search(element, 0, used-1); - if ( index < 0 ) - return index; - - // The search can be somewhere in the middle of the set - // look linear previous and past the index - last = index; - - while ( index > 0 && !(element < data[index - 1]) && !(data[index - 1] < element) ) - { - index -= 1; - } - // look linear up - while ( last < (s32) used - 1 && !(element < data[last + 1]) && !(data[last + 1] < element) ) - { - last += 1; - } - - return index; - } - - - //! Finds an element in linear time, which is very slow. - /** Use binary_search for faster finding. Only works if ==operator is - implemented. - \param element Element to search for. - \return Position of the searched element if it was found, otherwise -1 - is returned. */ - s32 linear_search(const T& element) const - { - for (u32 i=0; i<used; ++i) - if (element == data[i]) - return (s32)i; - - return -1; - } - - - //! Finds an element in linear time, which is very slow. - /** Use binary_search for faster finding. Only works if ==operator is - implemented. - \param element: Element to search for. - \return Position of the searched element if it was found, otherwise -1 - is returned. */ - s32 linear_reverse_search(const T& element) const - { - for (s32 i=used-1; i>=0; --i) - if (data[i] == element) - return i; - - return -1; - } - - - //! Erases an element from the array. - /** May be slow, because all elements following after the erased - element have to be copied. - \param index: Index of element to be erased. */ - void erase(u32 index) - { - _IRR_DEBUG_BREAK_IF(index>=used) // access violation - - for (u32 i=index+1; i<used; ++i) - { - allocator.destruct(&data[i-1]); - allocator.construct(&data[i-1], data[i]); // data[i-1] = data[i]; - } - - allocator.destruct(&data[used-1]); - - --used; - } - - - //! Erases some elements from the array. - /** May be slow, because all elements following after the erased - element have to be copied. - \param index: Index of the first element to be erased. - \param count: Amount of elements to be erased. */ - void erase(u32 index, s32 count) - { - if (index>=used || count<1) - return; - if (index+count>used) - count = used-index; - - u32 i; - for (i=index; i<index+count; ++i) - allocator.destruct(&data[i]); - - for (i=index+count; i<used; ++i) - { - if (i-count >= index+count) // not already destructed before loop - allocator.destruct(&data[i-count]); - - allocator.construct(&data[i-count], data[i]); // data[i-count] = data[i]; - - if (i >= used-count) // those which are not overwritten - allocator.destruct(&data[i]); - } - - used-= count; - } - - - //! Sets if the array is sorted - void set_sorted(bool _is_sorted) - { - is_sorted = _is_sorted; - } - - - //! Swap the content of this array container with the content of another array - /** Afterwards this object will contain the content of the other object and the other - object will contain the content of this object. - \param other Swap content with this object */ - void swap(array<T, TAlloc>& other) - { - core::swap(data, other.data); - core::swap(allocated, other.allocated); - core::swap(used, other.used); - core::swap(allocator, other.allocator); // memory is still released by the same allocator used for allocation - eAllocStrategy helper_strategy(strategy); // can't use core::swap with bitfields - strategy = other.strategy; - other.strategy = helper_strategy; - bool helper_free_when_destroyed(free_when_destroyed); - free_when_destroyed = other.free_when_destroyed; - other.free_when_destroyed = helper_free_when_destroyed; - bool helper_is_sorted(is_sorted); - is_sorted = other.is_sorted; - other.is_sorted = helper_is_sorted; - } - - -private: - T* data; - u32 allocated; - u32 used; - TAlloc allocator; - eAllocStrategy strategy:4; - bool free_when_destroyed:1; - bool is_sorted:1; -}; - - -} // end namespace core -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/irrList.h b/builddir/irrlicht-1.8.1/include/irrList.h deleted file mode 100644 index a84afd5..0000000 --- a/builddir/irrlicht-1.8.1/include/irrList.h +++ /dev/null @@ -1,416 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_LIST_H_INCLUDED__ -#define __IRR_LIST_H_INCLUDED__ - -#include "irrTypes.h" -#include "irrAllocator.h" -#include "irrMath.h" - -namespace irr -{ -namespace core -{ - - -//! Doubly linked list template. -template <class T> -class list -{ -private: - - //! List element node with pointer to previous and next element in the list. - struct SKListNode - { - SKListNode(const T& e) : Next(0), Prev(0), Element(e) {} - - SKListNode* Next; - SKListNode* Prev; - T Element; - }; - -public: - class ConstIterator; - - //! List iterator. - class Iterator - { - public: - Iterator() : Current(0) {} - - Iterator& operator ++() { Current = Current->Next; return *this; } - Iterator& operator --() { Current = Current->Prev; return *this; } - Iterator operator ++(s32) { Iterator tmp = *this; Current = Current->Next; return tmp; } - Iterator operator --(s32) { Iterator tmp = *this; Current = Current->Prev; return tmp; } - - Iterator& operator +=(s32 num) - { - if(num > 0) - { - while (num-- && this->Current != 0) ++(*this); - } - else - { - while(num++ && this->Current != 0) --(*this); - } - return *this; - } - - Iterator operator + (s32 num) const { Iterator tmp = *this; return tmp += num; } - Iterator& operator -=(s32 num) { return (*this)+=(-num); } - Iterator operator - (s32 num) const { return (*this)+ (-num); } - - bool operator ==(const Iterator& other) const { return Current == other.Current; } - bool operator !=(const Iterator& other) const { return Current != other.Current; } - bool operator ==(const ConstIterator& other) const { return Current == other.Current; } - bool operator !=(const ConstIterator& other) const { return Current != other.Current; } - - #if defined (_MSC_VER) && (_MSC_VER < 1300) - #pragma warning(disable:4284) // infix notation problem when using iterator operator -> - #endif - - T & operator * () { return Current->Element; } - T * operator ->() { return &Current->Element; } - - private: - explicit Iterator(SKListNode* begin) : Current(begin) {} - - SKListNode* Current; - - friend class list<T>; - friend class ConstIterator; - }; - - //! List iterator for const access. - class ConstIterator - { - public: - - ConstIterator() : Current(0) {} - ConstIterator(const Iterator& iter) : Current(iter.Current) {} - - ConstIterator& operator ++() { Current = Current->Next; return *this; } - ConstIterator& operator --() { Current = Current->Prev; return *this; } - ConstIterator operator ++(s32) { ConstIterator tmp = *this; Current = Current->Next; return tmp; } - ConstIterator operator --(s32) { ConstIterator tmp = *this; Current = Current->Prev; return tmp; } - - ConstIterator& operator +=(s32 num) - { - if(num > 0) - { - while(num-- && this->Current != 0) ++(*this); - } - else - { - while(num++ && this->Current != 0) --(*this); - } - return *this; - } - - ConstIterator operator + (s32 num) const { ConstIterator tmp = *this; return tmp += num; } - ConstIterator& operator -=(s32 num) { return (*this)+=(-num); } - ConstIterator operator - (s32 num) const { return (*this)+ (-num); } - - bool operator ==(const ConstIterator& other) const { return Current == other.Current; } - bool operator !=(const ConstIterator& other) const { return Current != other.Current; } - bool operator ==(const Iterator& other) const { return Current == other.Current; } - bool operator !=(const Iterator& other) const { return Current != other.Current; } - - const T & operator * () { return Current->Element; } - const T * operator ->() { return &Current->Element; } - - ConstIterator & operator =(const Iterator & iterator) { Current = iterator.Current; return *this; } - - private: - explicit ConstIterator(SKListNode* begin) : Current(begin) {} - - SKListNode* Current; - - friend class Iterator; - friend class list<T>; - }; - - //! Default constructor for empty list. - list() - : First(0), Last(0), Size(0) {} - - - //! Copy constructor. - list(const list<T>& other) : First(0), Last(0), Size(0) - { - *this = other; - } - - - //! Destructor - ~list() - { - clear(); - } - - - //! Assignment operator - void operator=(const list<T>& other) - { - if(&other == this) - { - return; - } - - clear(); - - SKListNode* node = other.First; - while(node) - { - push_back(node->Element); - node = node->Next; - } - } - - - //! Returns amount of elements in list. - /** \return Amount of elements in the list. */ - u32 size() const - { - return Size; - } - u32 getSize() const - { - return Size; - } - - - //! Clears the list, deletes all elements in the list. - /** All existing iterators of this list will be invalid. */ - void clear() - { - while(First) - { - SKListNode * next = First->Next; - allocator.destruct(First); - allocator.deallocate(First); - First = next; - } - - //First = 0; handled by loop - Last = 0; - Size = 0; - } - - - //! Checks for empty list. - /** \return True if the list is empty and false if not. */ - bool empty() const - { - return (First == 0); - } - - - //! Adds an element at the end of the list. - /** \param element Element to add to the list. */ - void push_back(const T& element) - { - SKListNode* node = allocator.allocate(1); - allocator.construct(node, element); - - ++Size; - - if (First == 0) - First = node; - - node->Prev = Last; - - if (Last != 0) - Last->Next = node; - - Last = node; - } - - - //! Adds an element at the begin of the list. - /** \param element: Element to add to the list. */ - void push_front(const T& element) - { - SKListNode* node = allocator.allocate(1); - allocator.construct(node, element); - - ++Size; - - if (First == 0) - { - Last = node; - First = node; - } - else - { - node->Next = First; - First->Prev = node; - First = node; - } - } - - - //! Gets first node. - /** \return A list iterator pointing to the beginning of the list. */ - Iterator begin() - { - return Iterator(First); - } - - - //! Gets first node. - /** \return A const list iterator pointing to the beginning of the list. */ - ConstIterator begin() const - { - return ConstIterator(First); - } - - - //! Gets end node. - /** \return List iterator pointing to null. */ - Iterator end() - { - return Iterator(0); - } - - - //! Gets end node. - /** \return Const list iterator pointing to null. */ - ConstIterator end() const - { - return ConstIterator(0); - } - - - //! Gets last element. - /** \return List iterator pointing to the last element of the list. */ - Iterator getLast() - { - return Iterator(Last); - } - - - //! Gets last element. - /** \return Const list iterator pointing to the last element of the list. */ - ConstIterator getLast() const - { - return ConstIterator(Last); - } - - - //! Inserts an element after an element. - /** \param it Iterator pointing to element after which the new element - should be inserted. - \param element The new element to be inserted into the list. - */ - void insert_after(const Iterator& it, const T& element) - { - SKListNode* node = allocator.allocate(1); - allocator.construct(node, element); - - node->Next = it.Current->Next; - - if (it.Current->Next) - it.Current->Next->Prev = node; - - node->Prev = it.Current; - it.Current->Next = node; - ++Size; - - if (it.Current == Last) - Last = node; - } - - - //! Inserts an element before an element. - /** \param it Iterator pointing to element before which the new element - should be inserted. - \param element The new element to be inserted into the list. - */ - void insert_before(const Iterator& it, const T& element) - { - SKListNode* node = allocator.allocate(1); - allocator.construct(node, element); - - node->Prev = it.Current->Prev; - - if (it.Current->Prev) - it.Current->Prev->Next = node; - - node->Next = it.Current; - it.Current->Prev = node; - ++Size; - - if (it.Current == First) - First = node; - } - - - //! Erases an element. - /** \param it Iterator pointing to the element which shall be erased. - \return Iterator pointing to next element. */ - Iterator erase(Iterator& it) - { - // suggest changing this to a const Iterator& and - // working around line: it.Current = 0 (possibly with a mutable, or just let it be garbage?) - - Iterator returnIterator(it); - ++returnIterator; - - if(it.Current == First) - { - First = it.Current->Next; - } - else - { - it.Current->Prev->Next = it.Current->Next; - } - - if(it.Current == Last) - { - Last = it.Current->Prev; - } - else - { - it.Current->Next->Prev = it.Current->Prev; - } - - allocator.destruct(it.Current); - allocator.deallocate(it.Current); - it.Current = 0; - --Size; - - return returnIterator; - } - - //! Swap the content of this list container with the content of another list - /** Afterwards this object will contain the content of the other object and the other - object will contain the content of this object. Iterators will afterwards be valid for - the swapped object. - \param other Swap content with this object */ - void swap(list<T>& other) - { - core::swap(First, other.First); - core::swap(Last, other.Last); - core::swap(Size, other.Size); - core::swap(allocator, other.allocator); // memory is still released by the same allocator used for allocation - } - - -private: - - SKListNode* First; - SKListNode* Last; - u32 Size; - irrAllocator<SKListNode> allocator; - -}; - - -} // end namespace core -}// end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/irrMap.h b/builddir/irrlicht-1.8.1/include/irrMap.h deleted file mode 100644 index 6e15174..0000000 --- a/builddir/irrlicht-1.8.1/include/irrMap.h +++ /dev/null @@ -1,1127 +0,0 @@ -// Copyright (C) 2006-2012 by Kat'Oun -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_MAP_H_INCLUDED__ -#define __IRR_MAP_H_INCLUDED__ - -#include "irrTypes.h" -#include "irrMath.h" - -namespace irr -{ -namespace core -{ - -//! map template for associative arrays using a red-black tree -template <class KeyType, class ValueType> -class map -{ - //! red/black tree for map - template <class KeyTypeRB, class ValueTypeRB> - class RBTree - { - public: - - RBTree(const KeyTypeRB& k, const ValueTypeRB& v) - : LeftChild(0), RightChild(0), Parent(0), Key(k), - Value(v), IsRed(true) {} - - void setLeftChild(RBTree* p) - { - LeftChild=p; - if (p) - p->setParent(this); - } - - void setRightChild(RBTree* p) - { - RightChild=p; - if (p) - p->setParent(this); - } - - void setParent(RBTree* p) { Parent=p; } - - void setValue(const ValueTypeRB& v) { Value = v; } - - void setRed() { IsRed = true; } - void setBlack() { IsRed = false; } - - RBTree* getLeftChild() const { return LeftChild; } - RBTree* getRightChild() const { return RightChild; } - RBTree* getParent() const { return Parent; } - - const ValueTypeRB& getValue() const - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return Value; - } - - ValueTypeRB& getValue() - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return Value; - } - - const KeyTypeRB& getKey() const - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return Key; - } - - bool isRoot() const - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return Parent==0; - } - - bool isLeftChild() const - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return (Parent != 0) && (Parent->getLeftChild()==this); - } - - bool isRightChild() const - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return (Parent!=0) && (Parent->getRightChild()==this); - } - - bool isLeaf() const - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return (LeftChild==0) && (RightChild==0); - } - - unsigned int getLevel() const - { - if (isRoot()) - return 1; - else - return getParent()->getLevel() + 1; - } - - - bool isRed() const - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return IsRed; - } - - bool isBlack() const - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return !IsRed; - } - - private: - RBTree(); - - RBTree* LeftChild; - RBTree* RightChild; - - RBTree* Parent; - - KeyTypeRB Key; - ValueTypeRB Value; - - bool IsRed; - }; // RBTree - - public: - - typedef RBTree<KeyType,ValueType> Node; - // We need the forwad declaration for the friend declaration - class ConstIterator; - - //! Normal Iterator - class Iterator - { - friend class ConstIterator; - public: - - Iterator() : Root(0), Cur(0) {} - - // Constructor(Node*) - Iterator(Node* root) : Root(root) - { - reset(); - } - - // Copy constructor - Iterator(const Iterator& src) : Root(src.Root), Cur(src.Cur) {} - - void reset(bool atLowest=true) - { - if (atLowest) - Cur = getMin(Root); - else - Cur = getMax(Root); - } - - bool atEnd() const - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return Cur==0; - } - - Node* getNode() const - { - return Cur; - } - - Iterator& operator=(const Iterator& src) - { - Root = src.Root; - Cur = src.Cur; - return (*this); - } - - void operator++(int) - { - inc(); - } - - void operator--(int) - { - dec(); - } - - Node* operator->() - { - return getNode(); - } - - Node& operator*() - { - _IRR_DEBUG_BREAK_IF(atEnd()) // access violation - - return *Cur; - } - - private: - - Node* getMin(Node* n) const - { - while(n && n->getLeftChild()) - n = n->getLeftChild(); - return n; - } - - Node* getMax(Node* n) const - { - while(n && n->getRightChild()) - n = n->getRightChild(); - return n; - } - - void inc() - { - // Already at end? - if (Cur==0) - return; - - if (Cur->getRightChild()) - { - // If current node has a right child, the next higher node is the - // node with lowest key beneath the right child. - Cur = getMin(Cur->getRightChild()); - } - else if (Cur->isLeftChild()) - { - // No right child? Well if current node is a left child then - // the next higher node is the parent - Cur = Cur->getParent(); - } - else - { - // Current node neither is left child nor has a right child. - // Ie it is either right child or root - // The next higher node is the parent of the first non-right - // child (ie either a left child or the root) up in the - // hierarchy. Root's parent is 0. - while(Cur->isRightChild()) - Cur = Cur->getParent(); - Cur = Cur->getParent(); - } - } - - void dec() - { - // Already at end? - if (Cur==0) - return; - - if (Cur->getLeftChild()) - { - // If current node has a left child, the next lower node is the - // node with highest key beneath the left child. - Cur = getMax(Cur->getLeftChild()); - } - else if (Cur->isRightChild()) - { - // No left child? Well if current node is a right child then - // the next lower node is the parent - Cur = Cur->getParent(); - } - else - { - // Current node neither is right child nor has a left child. - // Ie it is either left child or root - // The next higher node is the parent of the first non-left - // child (ie either a right child or the root) up in the - // hierarchy. Root's parent is 0. - - while(Cur->isLeftChild()) - Cur = Cur->getParent(); - Cur = Cur->getParent(); - } - } - - Node* Root; - Node* Cur; - }; // Iterator - - //! Const Iterator - class ConstIterator - { - friend class Iterator; - public: - - ConstIterator() : Root(0), Cur(0) {} - - // Constructor(Node*) - ConstIterator(const Node* root) : Root(root) - { - reset(); - } - - // Copy constructor - ConstIterator(const ConstIterator& src) : Root(src.Root), Cur(src.Cur) {} - ConstIterator(const Iterator& src) : Root(src.Root), Cur(src.Cur) {} - - void reset(bool atLowest=true) - { - if (atLowest) - Cur = getMin(Root); - else - Cur = getMax(Root); - } - - bool atEnd() const - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return Cur==0; - } - - const Node* getNode() const - { - return Cur; - } - - ConstIterator& operator=(const ConstIterator& src) - { - Root = src.Root; - Cur = src.Cur; - return (*this); - } - - void operator++(int) - { - inc(); - } - - void operator--(int) - { - dec(); - } - - const Node* operator->() - { - return getNode(); - } - - const Node& operator*() - { - _IRR_DEBUG_BREAK_IF(atEnd()) // access violation - - return *Cur; - } - - private: - - const Node* getMin(const Node* n) const - { - while(n && n->getLeftChild()) - n = n->getLeftChild(); - return n; - } - - const Node* getMax(const Node* n) const - { - while(n && n->getRightChild()) - n = n->getRightChild(); - return n; - } - - void inc() - { - // Already at end? - if (Cur==0) - return; - - if (Cur->getRightChild()) - { - // If current node has a right child, the next higher node is the - // node with lowest key beneath the right child. - Cur = getMin(Cur->getRightChild()); - } - else if (Cur->isLeftChild()) - { - // No right child? Well if current node is a left child then - // the next higher node is the parent - Cur = Cur->getParent(); - } - else - { - // Current node neither is left child nor has a right child. - // Ie it is either right child or root - // The next higher node is the parent of the first non-right - // child (ie either a left child or the root) up in the - // hierarchy. Root's parent is 0. - while(Cur->isRightChild()) - Cur = Cur->getParent(); - Cur = Cur->getParent(); - } - } - - void dec() - { - // Already at end? - if (Cur==0) - return; - - if (Cur->getLeftChild()) - { - // If current node has a left child, the next lower node is the - // node with highest key beneath the left child. - Cur = getMax(Cur->getLeftChild()); - } - else if (Cur->isRightChild()) - { - // No left child? Well if current node is a right child then - // the next lower node is the parent - Cur = Cur->getParent(); - } - else - { - // Current node neither is right child nor has a left child. - // Ie it is either left child or root - // The next higher node is the parent of the first non-left - // child (ie either a right child or the root) up in the - // hierarchy. Root's parent is 0. - - while(Cur->isLeftChild()) - Cur = Cur->getParent(); - Cur = Cur->getParent(); - } - } - - const Node* Root; - const Node* Cur; - }; // ConstIterator - - - //! Parent First Iterator. - /** Traverses the tree from top to bottom. Typical usage is - when storing the tree structure, because when reading it - later (and inserting elements) the tree structure will - be the same. */ - class ParentFirstIterator - { - public: - - ParentFirstIterator() : Root(0), Cur(0) {} - - explicit ParentFirstIterator(Node* root) : Root(root), Cur(0) - { - reset(); - } - - void reset() - { - Cur = Root; - } - - bool atEnd() const - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return Cur==0; - } - - Node* getNode() - { - return Cur; - } - - ParentFirstIterator& operator=(const ParentFirstIterator& src) - { - Root = src.Root; - Cur = src.Cur; - return (*this); - } - - void operator++(int) - { - inc(); - } - - Node* operator -> () - { - return getNode(); - } - - Node& operator* () - { - _IRR_DEBUG_BREAK_IF(atEnd()) // access violation - - return *getNode(); - } - - private: - - void inc() - { - // Already at end? - if (Cur==0) - return; - - // First we try down to the left - if (Cur->getLeftChild()) - { - Cur = Cur->getLeftChild(); - } - else if (Cur->getRightChild()) - { - // No left child? The we go down to the right. - Cur = Cur->getRightChild(); - } - else - { - // No children? Move up in the hierarcy until - // we either reach 0 (and are finished) or - // find a right uncle. - while (Cur!=0) - { - // But if parent is left child and has a right "uncle" the parent - // has already been processed but the uncle hasn't. Move to - // the uncle. - if (Cur->isLeftChild() && Cur->getParent()->getRightChild()) - { - Cur = Cur->getParent()->getRightChild(); - return; - } - Cur = Cur->getParent(); - } - } - } - - Node* Root; - Node* Cur; - - }; // ParentFirstIterator - - - //! Parent Last Iterator - /** Traverse the tree from bottom to top. - Typical usage is when deleting all elements in the tree - because you must delete the children before you delete - their parent. */ - class ParentLastIterator - { - public: - - ParentLastIterator() : Root(0), Cur(0) {} - - explicit ParentLastIterator(Node* root) : Root(root), Cur(0) - { - reset(); - } - - void reset() - { - Cur = getMin(Root); - } - - bool atEnd() const - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return Cur==0; - } - - Node* getNode() - { - return Cur; - } - - ParentLastIterator& operator=(const ParentLastIterator& src) - { - Root = src.Root; - Cur = src.Cur; - return (*this); - } - - void operator++(int) - { - inc(); - } - - Node* operator -> () - { - return getNode(); - } - - Node& operator* () - { - _IRR_DEBUG_BREAK_IF(atEnd()) // access violation - - return *getNode(); - } - private: - - Node* getMin(Node* n) - { - while(n!=0 && (n->getLeftChild()!=0 || n->getRightChild()!=0)) - { - if (n->getLeftChild()) - n = n->getLeftChild(); - else - n = n->getRightChild(); - } - return n; - } - - void inc() - { - // Already at end? - if (Cur==0) - return; - - // Note: Starting point is the node as far down to the left as possible. - - // If current node has an uncle to the right, go to the - // node as far down to the left from the uncle as possible - // else just go up a level to the parent. - if (Cur->isLeftChild() && Cur->getParent()->getRightChild()) - { - Cur = getMin(Cur->getParent()->getRightChild()); - } - else - Cur = Cur->getParent(); - } - - Node* Root; - Node* Cur; - }; // ParentLastIterator - - - // AccessClass is a temporary class used with the [] operator. - // It makes it possible to have different behavior in situations like: - // myTree["Foo"] = 32; - // If "Foo" already exists update its value else insert a new element. - // int i = myTree["Foo"] - // If "Foo" exists return its value. - class AccessClass - { - // Let map be the only one who can instantiate this class. - friend class map<KeyType, ValueType>; - - public: - - // Assignment operator. Handles the myTree["Foo"] = 32; situation - void operator=(const ValueType& value) - { - // Just use the Set method, it handles already exist/not exist situation - Tree.set(Key,value); - } - - // ValueType operator - operator ValueType() - { - Node* node = Tree.find(Key); - - // Not found - _IRR_DEBUG_BREAK_IF(node==0) // access violation - - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return node->getValue(); - } - - private: - - AccessClass(map& tree, const KeyType& key) : Tree(tree), Key(key) {} - - AccessClass(); - - map& Tree; - const KeyType& Key; - }; // AccessClass - - - // Constructor. - map() : Root(0), Size(0) {} - - // Destructor - ~map() - { - clear(); - } - - //------------------------------ - // Public Commands - //------------------------------ - - //! Inserts a new node into the tree - /** \param keyNew: the index for this value - \param v: the value to insert - \return True if successful, false if it fails (already exists) */ - bool insert(const KeyType& keyNew, const ValueType& v) - { - // First insert node the "usual" way (no fancy balance logic yet) - Node* newNode = new Node(keyNew,v); - if (!insert(newNode)) - { - delete newNode; - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return false; - } - - // Then attend a balancing party - while (!newNode->isRoot() && (newNode->getParent()->isRed())) - { - if (newNode->getParent()->isLeftChild()) - { - // If newNode is a left child, get its right 'uncle' - Node* newNodesUncle = newNode->getParent()->getParent()->getRightChild(); - if ( newNodesUncle!=0 && newNodesUncle->isRed()) - { - // case 1 - change the colors - newNode->getParent()->setBlack(); - newNodesUncle->setBlack(); - newNode->getParent()->getParent()->setRed(); - // Move newNode up the tree - newNode = newNode->getParent()->getParent(); - } - else - { - // newNodesUncle is a black node - if ( newNode->isRightChild()) - { - // and newNode is to the right - // case 2 - move newNode up and rotate - newNode = newNode->getParent(); - rotateLeft(newNode); - } - // case 3 - newNode->getParent()->setBlack(); - newNode->getParent()->getParent()->setRed(); - rotateRight(newNode->getParent()->getParent()); - } - } - else - { - // If newNode is a right child, get its left 'uncle' - Node* newNodesUncle = newNode->getParent()->getParent()->getLeftChild(); - if ( newNodesUncle!=0 && newNodesUncle->isRed()) - { - // case 1 - change the colors - newNode->getParent()->setBlack(); - newNodesUncle->setBlack(); - newNode->getParent()->getParent()->setRed(); - // Move newNode up the tree - newNode = newNode->getParent()->getParent(); - } - else - { - // newNodesUncle is a black node - if (newNode->isLeftChild()) - { - // and newNode is to the left - // case 2 - move newNode up and rotate - newNode = newNode->getParent(); - rotateRight(newNode); - } - // case 3 - newNode->getParent()->setBlack(); - newNode->getParent()->getParent()->setRed(); - rotateLeft(newNode->getParent()->getParent()); - } - - } - } - // Color the root black - Root->setBlack(); - return true; - } - - //! Replaces the value if the key already exists, otherwise inserts a new element. - /** \param k The index for this value - \param v The new value of */ - void set(const KeyType& k, const ValueType& v) - { - Node* p = find(k); - if (p) - p->setValue(v); - else - insert(k,v); - } - - //! Removes a node from the tree and returns it. - /** The returned node must be deleted by the user - \param k the key to remove - \return A pointer to the node, or 0 if not found */ - Node* delink(const KeyType& k) - { - Node* p = find(k); - if (p == 0) - return 0; - - // Rotate p down to the left until it has no right child, will get there - // sooner or later. - while(p->getRightChild()) - { - // "Pull up my right child and let it knock me down to the left" - rotateLeft(p); - } - // p now has no right child but might have a left child - Node* left = p->getLeftChild(); - - // Let p's parent point to p's child instead of point to p - if (p->isLeftChild()) - p->getParent()->setLeftChild(left); - - else if (p->isRightChild()) - p->getParent()->setRightChild(left); - - else - { - // p has no parent => p is the root. - // Let the left child be the new root. - setRoot(left); - } - - // p is now gone from the tree in the sense that - // no one is pointing at it, so return it. - - --Size; - return p; - } - - //! Removes a node from the tree and deletes it. - /** \return True if the node was found and deleted */ - bool remove(const KeyType& k) - { - Node* p = find(k); - return remove(p); - } - - //! Removes a node from the tree and deletes it. - /** \return True if the node was found and deleted */ - bool remove(Node* p) - { - if (p == 0) - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return false; - } - - // Rotate p down to the left until it has no right child, will get there - // sooner or later. - while(p->getRightChild()) - { - // "Pull up my right child and let it knock me down to the left" - rotateLeft(p); - } - // p now has no right child but might have a left child - Node* left = p->getLeftChild(); - - // Let p's parent point to p's child instead of point to p - if (p->isLeftChild()) - p->getParent()->setLeftChild(left); - - else if (p->isRightChild()) - p->getParent()->setRightChild(left); - - else - { - // p has no parent => p is the root. - // Let the left child be the new root. - setRoot(left); - } - - // p is now gone from the tree in the sense that - // no one is pointing at it. Let's get rid of it. - delete p; - - --Size; - return true; - } - - //! Clear the entire tree - void clear() - { - ParentLastIterator i(getParentLastIterator()); - - while(!i.atEnd()) - { - Node* p = i.getNode(); - i++; // Increment it before it is deleted - // else iterator will get quite confused. - delete p; - } - Root = 0; - Size= 0; - } - - //! Is the tree empty? - //! \return Returns true if empty, false if not - bool empty() const - { - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return Root == 0; - } - - //! \deprecated Use empty() instead. This method may be removed by Irrlicht 1.9 - _IRR_DEPRECATED_ bool isEmpty() const - { - return empty(); - } - - //! Search for a node with the specified key. - //! \param keyToFind: The key to find - //! \return Returns 0 if node couldn't be found. - Node* find(const KeyType& keyToFind) const - { - Node* pNode = Root; - - while(pNode!=0) - { - const KeyType& key=pNode->getKey(); - - if (keyToFind == key) - return pNode; - else if (keyToFind < key) - pNode = pNode->getLeftChild(); - else //keyToFind > key - pNode = pNode->getRightChild(); - } - - return 0; - } - - //! Gets the root element. - //! \return Returns a pointer to the root node, or - //! 0 if the tree is empty. - Node* getRoot() const - { - return Root; - } - - //! Returns the number of nodes in the tree. - u32 size() const - { - return Size; - } - - //! Swap the content of this map container with the content of another map - /** Afterwards this object will contain the content of the other object and the other - object will contain the content of this object. Iterators will afterwards be valid for - the swapped object. - \param other Swap content with this object */ - void swap(map<KeyType, ValueType>& other) - { - core::swap(Root, other.Root); - core::swap(Size, other.Size); - } - - //------------------------------ - // Public Iterators - //------------------------------ - - //! Returns an iterator - Iterator getIterator() const - { - Iterator it(getRoot()); - return it; - } - - //! Returns a Constiterator - ConstIterator getConstIterator() const - { - Iterator it(getRoot()); - return it; - } - - //! Returns a ParentFirstIterator. - //! Traverses the tree from top to bottom. Typical usage is - //! when storing the tree structure, because when reading it - //! later (and inserting elements) the tree structure will - //! be the same. - ParentFirstIterator getParentFirstIterator() const - { - ParentFirstIterator it(getRoot()); - return it; - } - - //! Returns a ParentLastIterator to traverse the tree from - //! bottom to top. - //! Typical usage is when deleting all elements in the tree - //! because you must delete the children before you delete - //! their parent. - ParentLastIterator getParentLastIterator() const - { - ParentLastIterator it(getRoot()); - return it; - } - - //------------------------------ - // Public Operators - //------------------------------ - - //! operator [] for access to elements - /** for example myMap["key"] */ - AccessClass operator[](const KeyType& k) - { - return AccessClass(*this, k); - } - private: - - //------------------------------ - // Disabled methods - //------------------------------ - // Copy constructor and assignment operator deliberately - // defined but not implemented. The tree should never be - // copied, pass along references to it instead. - explicit map(const map& src); - map& operator = (const map& src); - - //! Set node as new root. - /** The node will be set to black, otherwise core dumps may arise - (patch provided by rogerborg). - \param newRoot Node which will be the new root - */ - void setRoot(Node* newRoot) - { - Root = newRoot; - if (Root != 0) - { - Root->setParent(0); - Root->setBlack(); - } - } - - //! Insert a node into the tree without using any fancy balancing logic. - /** \return false if that key already exist in the tree. */ - bool insert(Node* newNode) - { - bool result=true; // Assume success - - if (Root==0) - { - setRoot(newNode); - Size = 1; - } - else - { - Node* pNode = Root; - const KeyType& keyNew = newNode->getKey(); - while (pNode) - { - const KeyType& key=pNode->getKey(); - - if (keyNew == key) - { - result = false; - pNode = 0; - } - else if (keyNew < key) - { - if (pNode->getLeftChild() == 0) - { - pNode->setLeftChild(newNode); - pNode = 0; - } - else - pNode = pNode->getLeftChild(); - } - else // keyNew > key - { - if (pNode->getRightChild()==0) - { - pNode->setRightChild(newNode); - pNode = 0; - } - else - { - pNode = pNode->getRightChild(); - } - } - } - - if (result) - ++Size; - } - - _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; - return result; - } - - //! Rotate left. - //! Pull up node's right child and let it knock node down to the left - void rotateLeft(Node* p) - { - Node* right = p->getRightChild(); - - p->setRightChild(right->getLeftChild()); - - if (p->isLeftChild()) - p->getParent()->setLeftChild(right); - else if (p->isRightChild()) - p->getParent()->setRightChild(right); - else - setRoot(right); - - right->setLeftChild(p); - } - - //! Rotate right. - //! Pull up node's left child and let it knock node down to the right - void rotateRight(Node* p) - { - Node* left = p->getLeftChild(); - - p->setLeftChild(left->getRightChild()); - - if (p->isLeftChild()) - p->getParent()->setLeftChild(left); - else if (p->isRightChild()) - p->getParent()->setRightChild(left); - else - setRoot(left); - - left->setRightChild(p); - } - - //------------------------------ - // Private Members - //------------------------------ - Node* Root; // The top node. 0 if empty. - u32 Size; // Number of nodes in the tree -}; - -} // end namespace core -} // end namespace irr - -#endif // __IRR_MAP_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/irrMath.h b/builddir/irrlicht-1.8.1/include/irrMath.h deleted file mode 100644 index 4351027..0000000 --- a/builddir/irrlicht-1.8.1/include/irrMath.h +++ /dev/null @@ -1,732 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_MATH_H_INCLUDED__ -#define __IRR_MATH_H_INCLUDED__ - -#include "IrrCompileConfig.h" -#include "irrTypes.h" -#include <math.h> -#include <float.h> -#include <stdlib.h> // for abs() etc. -#include <limits.h> // For INT_MAX / UINT_MAX - -#if defined(_IRR_SOLARIS_PLATFORM_) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) || defined (_WIN32_WCE) - #define sqrtf(X) (irr::f32)sqrt((irr::f64)(X)) - #define sinf(X) (irr::f32)sin((irr::f64)(X)) - #define cosf(X) (irr::f32)cos((irr::f64)(X)) - #define asinf(X) (irr::f32)asin((irr::f64)(X)) - #define acosf(X) (irr::f32)acos((irr::f64)(X)) - #define atan2f(X,Y) (irr::f32)atan2((irr::f64)(X),(irr::f64)(Y)) - #define ceilf(X) (irr::f32)ceil((irr::f64)(X)) - #define floorf(X) (irr::f32)floor((irr::f64)(X)) - #define powf(X,Y) (irr::f32)pow((irr::f64)(X),(irr::f64)(Y)) - #define fmodf(X,Y) (irr::f32)fmod((irr::f64)(X),(irr::f64)(Y)) - #define fabsf(X) (irr::f32)fabs((irr::f64)(X)) - #define logf(X) (irr::f32)log((irr::f64)(X)) -#endif - -#ifndef FLT_MAX -#define FLT_MAX 3.402823466E+38F -#endif - -#ifndef FLT_MIN -#define FLT_MIN 1.17549435e-38F -#endif - -namespace irr -{ -namespace core -{ - - //! Rounding error constant often used when comparing f32 values. - - const s32 ROUNDING_ERROR_S32 = 0; -#ifdef __IRR_HAS_S64 - const s64 ROUNDING_ERROR_S64 = 0; -#endif - const f32 ROUNDING_ERROR_f32 = 0.000001f; - const f64 ROUNDING_ERROR_f64 = 0.00000001; - -#ifdef PI // make sure we don't collide with a define -#undef PI -#endif - //! Constant for PI. - const f32 PI = 3.14159265359f; - - //! Constant for reciprocal of PI. - const f32 RECIPROCAL_PI = 1.0f/PI; - - //! Constant for half of PI. - const f32 HALF_PI = PI/2.0f; - -#ifdef PI64 // make sure we don't collide with a define -#undef PI64 -#endif - //! Constant for 64bit PI. - const f64 PI64 = 3.1415926535897932384626433832795028841971693993751; - - //! Constant for 64bit reciprocal of PI. - const f64 RECIPROCAL_PI64 = 1.0/PI64; - - //! 32bit Constant for converting from degrees to radians - const f32 DEGTORAD = PI / 180.0f; - - //! 32bit constant for converting from radians to degrees (formally known as GRAD_PI) - const f32 RADTODEG = 180.0f / PI; - - //! 64bit constant for converting from degrees to radians (formally known as GRAD_PI2) - const f64 DEGTORAD64 = PI64 / 180.0; - - //! 64bit constant for converting from radians to degrees - const f64 RADTODEG64 = 180.0 / PI64; - - //! Utility function to convert a radian value to degrees - /** Provided as it can be clearer to write radToDeg(X) than RADTODEG * X - \param radians The radians value to convert to degrees. - */ - inline f32 radToDeg(f32 radians) - { - return RADTODEG * radians; - } - - //! Utility function to convert a radian value to degrees - /** Provided as it can be clearer to write radToDeg(X) than RADTODEG * X - \param radians The radians value to convert to degrees. - */ - inline f64 radToDeg(f64 radians) - { - return RADTODEG64 * radians; - } - - //! Utility function to convert a degrees value to radians - /** Provided as it can be clearer to write degToRad(X) than DEGTORAD * X - \param degrees The degrees value to convert to radians. - */ - inline f32 degToRad(f32 degrees) - { - return DEGTORAD * degrees; - } - - //! Utility function to convert a degrees value to radians - /** Provided as it can be clearer to write degToRad(X) than DEGTORAD * X - \param degrees The degrees value to convert to radians. - */ - inline f64 degToRad(f64 degrees) - { - return DEGTORAD64 * degrees; - } - - //! returns minimum of two values. Own implementation to get rid of the STL (VS6 problems) - template<class T> - inline const T& min_(const T& a, const T& b) - { - return a < b ? a : b; - } - - //! returns minimum of three values. Own implementation to get rid of the STL (VS6 problems) - template<class T> - inline const T& min_(const T& a, const T& b, const T& c) - { - return a < b ? min_(a, c) : min_(b, c); - } - - //! returns maximum of two values. Own implementation to get rid of the STL (VS6 problems) - template<class T> - inline const T& max_(const T& a, const T& b) - { - return a < b ? b : a; - } - - //! returns maximum of three values. Own implementation to get rid of the STL (VS6 problems) - template<class T> - inline const T& max_(const T& a, const T& b, const T& c) - { - return a < b ? max_(b, c) : max_(a, c); - } - - //! returns abs of two values. Own implementation to get rid of STL (VS6 problems) - template<class T> - inline T abs_(const T& a) - { - return a < (T)0 ? -a : a; - } - - //! returns linear interpolation of a and b with ratio t - //! \return: a if t==0, b if t==1, and the linear interpolation else - template<class T> - inline T lerp(const T& a, const T& b, const f32 t) - { - return (T)(a*(1.f-t)) + (b*t); - } - - //! clamps a value between low and high - template <class T> - inline const T clamp (const T& value, const T& low, const T& high) - { - return min_ (max_(value,low), high); - } - - //! swaps the content of the passed parameters - // Note: We use the same trick as boost and use two template arguments to - // avoid ambiguity when swapping objects of an Irrlicht type that has not - // it's own swap overload. Otherwise we get conflicts with some compilers - // in combination with stl. - template <class T1, class T2> - inline void swap(T1& a, T2& b) - { - T1 c(a); - a = b; - b = c; - } - - //! returns if a equals b, taking possible rounding errors into account - inline bool equals(const f64 a, const f64 b, const f64 tolerance = ROUNDING_ERROR_f64) - { - return (a + tolerance >= b) && (a - tolerance <= b); - } - - //! returns if a equals b, taking possible rounding errors into account - inline bool equals(const f32 a, const f32 b, const f32 tolerance = ROUNDING_ERROR_f32) - { - return (a + tolerance >= b) && (a - tolerance <= b); - } - - union FloatIntUnion32 - { - FloatIntUnion32(float f1 = 0.0f) : f(f1) {} - // Portable sign-extraction - bool sign() const { return (i >> 31) != 0; } - - irr::s32 i; - irr::f32 f; - }; - - //! We compare the difference in ULP's (spacing between floating-point numbers, aka ULP=1 means there exists no float between). - //\result true when numbers have a ULP <= maxUlpDiff AND have the same sign. - inline bool equalsByUlp(f32 a, f32 b, int maxUlpDiff) - { - // Based on the ideas and code from Bruce Dawson on - // http://www.altdevblogaday.com/2012/02/22/comparing-floating-point-numbers-2012-edition/ - // When floats are interpreted as integers the two nearest possible float numbers differ just - // by one integer number. Also works the other way round, an integer of 1 interpreted as float - // is for example the smallest possible float number. - - FloatIntUnion32 fa(a); - FloatIntUnion32 fb(b); - - // Different signs, we could maybe get difference to 0, but so close to 0 using epsilons is better. - if ( fa.sign() != fb.sign() ) - { - // Check for equality to make sure +0==-0 - if (fa.i == fb.i) - return true; - return false; - } - - // Find the difference in ULPs. - int ulpsDiff = abs_(fa.i- fb.i); - if (ulpsDiff <= maxUlpDiff) - return true; - - return false; - } - -#if 0 - //! returns if a equals b, not using any rounding tolerance - inline bool equals(const s32 a, const s32 b) - { - return (a == b); - } - - //! returns if a equals b, not using any rounding tolerance - inline bool equals(const u32 a, const u32 b) - { - return (a == b); - } -#endif - //! returns if a equals b, taking an explicit rounding tolerance into account - inline bool equals(const s32 a, const s32 b, const s32 tolerance = ROUNDING_ERROR_S32) - { - return (a + tolerance >= b) && (a - tolerance <= b); - } - - //! returns if a equals b, taking an explicit rounding tolerance into account - inline bool equals(const u32 a, const u32 b, const s32 tolerance = ROUNDING_ERROR_S32) - { - return (a + tolerance >= b) && (a - tolerance <= b); - } - -#ifdef __IRR_HAS_S64 - //! returns if a equals b, taking an explicit rounding tolerance into account - inline bool equals(const s64 a, const s64 b, const s64 tolerance = ROUNDING_ERROR_S64) - { - return (a + tolerance >= b) && (a - tolerance <= b); - } -#endif - - //! returns if a equals zero, taking rounding errors into account - inline bool iszero(const f64 a, const f64 tolerance = ROUNDING_ERROR_f64) - { - return fabs(a) <= tolerance; - } - - //! returns if a equals zero, taking rounding errors into account - inline bool iszero(const f32 a, const f32 tolerance = ROUNDING_ERROR_f32) - { - return fabsf(a) <= tolerance; - } - - //! returns if a equals not zero, taking rounding errors into account - inline bool isnotzero(const f32 a, const f32 tolerance = ROUNDING_ERROR_f32) - { - return fabsf(a) > tolerance; - } - - //! returns if a equals zero, taking rounding errors into account - inline bool iszero(const s32 a, const s32 tolerance = 0) - { - return ( a & 0x7ffffff ) <= tolerance; - } - - //! returns if a equals zero, taking rounding errors into account - inline bool iszero(const u32 a, const u32 tolerance = 0) - { - return a <= tolerance; - } - -#ifdef __IRR_HAS_S64 - //! returns if a equals zero, taking rounding errors into account - inline bool iszero(const s64 a, const s64 tolerance = 0) - { - return abs_(a) <= tolerance; - } -#endif - - inline s32 s32_min(s32 a, s32 b) - { - const s32 mask = (a - b) >> 31; - return (a & mask) | (b & ~mask); - } - - inline s32 s32_max(s32 a, s32 b) - { - const s32 mask = (a - b) >> 31; - return (b & mask) | (a & ~mask); - } - - inline s32 s32_clamp (s32 value, s32 low, s32 high) - { - return s32_min(s32_max(value,low), high); - } - - /* - float IEEE-754 bit represenation - - 0 0x00000000 - 1.0 0x3f800000 - 0.5 0x3f000000 - 3 0x40400000 - +inf 0x7f800000 - -inf 0xff800000 - +NaN 0x7fc00000 or 0x7ff00000 - in general: number = (sign ? -1:1) * 2^(exponent) * 1.(mantissa bits) - */ - - typedef union { u32 u; s32 s; f32 f; } inttofloat; - - #define F32_AS_S32(f) (*((s32 *) &(f))) - #define F32_AS_U32(f) (*((u32 *) &(f))) - #define F32_AS_U32_POINTER(f) ( ((u32 *) &(f))) - - #define F32_VALUE_0 0x00000000 - #define F32_VALUE_1 0x3f800000 - #define F32_SIGN_BIT 0x80000000U - #define F32_EXPON_MANTISSA 0x7FFFFFFFU - - //! code is taken from IceFPU - //! Integer representation of a floating-point value. -#ifdef IRRLICHT_FAST_MATH - #define IR(x) ((u32&)(x)) -#else - inline u32 IR(f32 x) {inttofloat tmp; tmp.f=x; return tmp.u;} -#endif - - //! Absolute integer representation of a floating-point value - #define AIR(x) (IR(x)&0x7fffffff) - - //! Floating-point representation of an integer value. -#ifdef IRRLICHT_FAST_MATH - #define FR(x) ((f32&)(x)) -#else - inline f32 FR(u32 x) {inttofloat tmp; tmp.u=x; return tmp.f;} - inline f32 FR(s32 x) {inttofloat tmp; tmp.s=x; return tmp.f;} -#endif - - //! integer representation of 1.0 - #define IEEE_1_0 0x3f800000 - //! integer representation of 255.0 - #define IEEE_255_0 0x437f0000 - -#ifdef IRRLICHT_FAST_MATH - #define F32_LOWER_0(f) (F32_AS_U32(f) > F32_SIGN_BIT) - #define F32_LOWER_EQUAL_0(f) (F32_AS_S32(f) <= F32_VALUE_0) - #define F32_GREATER_0(f) (F32_AS_S32(f) > F32_VALUE_0) - #define F32_GREATER_EQUAL_0(f) (F32_AS_U32(f) <= F32_SIGN_BIT) - #define F32_EQUAL_1(f) (F32_AS_U32(f) == F32_VALUE_1) - #define F32_EQUAL_0(f) ( (F32_AS_U32(f) & F32_EXPON_MANTISSA ) == F32_VALUE_0) - - // only same sign - #define F32_A_GREATER_B(a,b) (F32_AS_S32((a)) > F32_AS_S32((b))) - -#else - - #define F32_LOWER_0(n) ((n) < 0.0f) - #define F32_LOWER_EQUAL_0(n) ((n) <= 0.0f) - #define F32_GREATER_0(n) ((n) > 0.0f) - #define F32_GREATER_EQUAL_0(n) ((n) >= 0.0f) - #define F32_EQUAL_1(n) ((n) == 1.0f) - #define F32_EQUAL_0(n) ((n) == 0.0f) - #define F32_A_GREATER_B(a,b) ((a) > (b)) -#endif - - -#ifndef REALINLINE - #ifdef _MSC_VER - #define REALINLINE __forceinline - #else - #define REALINLINE inline - #endif -#endif - -#if defined(__BORLANDC__) || defined (__BCPLUSPLUS__) - - // 8-bit bools in borland builder - - //! conditional set based on mask and arithmetic shift - REALINLINE u32 if_c_a_else_b ( const c8 condition, const u32 a, const u32 b ) - { - return ( ( -condition >> 7 ) & ( a ^ b ) ) ^ b; - } - - //! conditional set based on mask and arithmetic shift - REALINLINE u32 if_c_a_else_0 ( const c8 condition, const u32 a ) - { - return ( -condition >> 31 ) & a; - } -#else - - //! conditional set based on mask and arithmetic shift - REALINLINE u32 if_c_a_else_b ( const s32 condition, const u32 a, const u32 b ) - { - return ( ( -condition >> 31 ) & ( a ^ b ) ) ^ b; - } - - //! conditional set based on mask and arithmetic shift - REALINLINE u16 if_c_a_else_b ( const s16 condition, const u16 a, const u16 b ) - { - return ( ( -condition >> 15 ) & ( a ^ b ) ) ^ b; - } - - //! conditional set based on mask and arithmetic shift - REALINLINE u32 if_c_a_else_0 ( const s32 condition, const u32 a ) - { - return ( -condition >> 31 ) & a; - } -#endif - - /* - if (condition) state |= m; else state &= ~m; - */ - REALINLINE void setbit_cond ( u32 &state, s32 condition, u32 mask ) - { - // 0, or any postive to mask - //s32 conmask = -condition >> 31; - state ^= ( ( -condition >> 31 ) ^ state ) & mask; - } - - inline f32 round_( f32 x ) - { - return floorf( x + 0.5f ); - } - - REALINLINE void clearFPUException () - { -#ifdef IRRLICHT_FAST_MATH - return; -#ifdef feclearexcept - feclearexcept(FE_ALL_EXCEPT); -#elif defined(_MSC_VER) - __asm fnclex; -#elif defined(__GNUC__) && defined(__x86__) - __asm__ __volatile__ ("fclex \n\t"); -#else -# warn clearFPUException not supported. -#endif -#endif - } - - // calculate: sqrt ( x ) - REALINLINE f32 squareroot(const f32 f) - { - return sqrtf(f); - } - - // calculate: sqrt ( x ) - REALINLINE f64 squareroot(const f64 f) - { - return sqrt(f); - } - - // calculate: sqrt ( x ) - REALINLINE s32 squareroot(const s32 f) - { - return static_cast<s32>(squareroot(static_cast<f32>(f))); - } - -#ifdef __IRR_HAS_S64 - // calculate: sqrt ( x ) - REALINLINE s64 squareroot(const s64 f) - { - return static_cast<s64>(squareroot(static_cast<f64>(f))); - } -#endif - - // calculate: 1 / sqrt ( x ) - REALINLINE f64 reciprocal_squareroot(const f64 x) - { - return 1.0 / sqrt(x); - } - - // calculate: 1 / sqrtf ( x ) - REALINLINE f32 reciprocal_squareroot(const f32 f) - { -#if defined ( IRRLICHT_FAST_MATH ) - #if defined(_MSC_VER) - // SSE reciprocal square root estimate, accurate to 12 significant - // bits of the mantissa - f32 recsqrt; - __asm rsqrtss xmm0, f // xmm0 = rsqrtss(f) - __asm movss recsqrt, xmm0 // return xmm0 - return recsqrt; - -/* - // comes from Nvidia - u32 tmp = (u32(IEEE_1_0 << 1) + IEEE_1_0 - *(u32*)&x) >> 1; - f32 y = *(f32*)&tmp; - return y * (1.47f - 0.47f * x * y * y); -*/ - #else - return 1.f / sqrtf(f); - #endif -#else // no fast math - return 1.f / sqrtf(f); -#endif - } - - // calculate: 1 / sqrtf( x ) - REALINLINE s32 reciprocal_squareroot(const s32 x) - { - return static_cast<s32>(reciprocal_squareroot(static_cast<f32>(x))); - } - - // calculate: 1 / x - REALINLINE f32 reciprocal( const f32 f ) - { -#if defined (IRRLICHT_FAST_MATH) - - // SSE Newton-Raphson reciprocal estimate, accurate to 23 significant - // bi ts of the mantissa - // One Newtown-Raphson Iteration: - // f(i+1) = 2 * rcpss(f) - f * rcpss(f) * rcpss(f) - f32 rec; - __asm rcpss xmm0, f // xmm0 = rcpss(f) - __asm movss xmm1, f // xmm1 = f - __asm mulss xmm1, xmm0 // xmm1 = f * rcpss(f) - __asm mulss xmm1, xmm0 // xmm2 = f * rcpss(f) * rcpss(f) - __asm addss xmm0, xmm0 // xmm0 = 2 * rcpss(f) - __asm subss xmm0, xmm1 // xmm0 = 2 * rcpss(f) - // - f * rcpss(f) * rcpss(f) - __asm movss rec, xmm0 // return xmm0 - return rec; - - - //! i do not divide through 0.. (fpu expection) - // instead set f to a high value to get a return value near zero.. - // -1000000000000.f.. is use minus to stay negative.. - // must test's here (plane.normal dot anything ) checks on <= 0.f - //u32 x = (-(AIR(f) != 0 ) >> 31 ) & ( IR(f) ^ 0xd368d4a5 ) ^ 0xd368d4a5; - //return 1.f / FR ( x ); - -#else // no fast math - return 1.f / f; -#endif - } - - // calculate: 1 / x - REALINLINE f64 reciprocal ( const f64 f ) - { - return 1.0 / f; - } - - - // calculate: 1 / x, low precision allowed - REALINLINE f32 reciprocal_approxim ( const f32 f ) - { -#if defined( IRRLICHT_FAST_MATH) - - // SSE Newton-Raphson reciprocal estimate, accurate to 23 significant - // bi ts of the mantissa - // One Newtown-Raphson Iteration: - // f(i+1) = 2 * rcpss(f) - f * rcpss(f) * rcpss(f) - f32 rec; - __asm rcpss xmm0, f // xmm0 = rcpss(f) - __asm movss xmm1, f // xmm1 = f - __asm mulss xmm1, xmm0 // xmm1 = f * rcpss(f) - __asm mulss xmm1, xmm0 // xmm2 = f * rcpss(f) * rcpss(f) - __asm addss xmm0, xmm0 // xmm0 = 2 * rcpss(f) - __asm subss xmm0, xmm1 // xmm0 = 2 * rcpss(f) - // - f * rcpss(f) * rcpss(f) - __asm movss rec, xmm0 // return xmm0 - return rec; - - -/* - // SSE reciprocal estimate, accurate to 12 significant bits of - f32 rec; - __asm rcpss xmm0, f // xmm0 = rcpss(f) - __asm movss rec , xmm0 // return xmm0 - return rec; -*/ -/* - register u32 x = 0x7F000000 - IR ( p ); - const f32 r = FR ( x ); - return r * (2.0f - p * r); -*/ -#else // no fast math - return 1.f / f; -#endif - } - - - REALINLINE s32 floor32(f32 x) - { -#ifdef IRRLICHT_FAST_MATH - const f32 h = 0.5f; - - s32 t; - -#if defined(_MSC_VER) - __asm - { - fld x - fsub h - fistp t - } -#elif defined(__GNUC__) - __asm__ __volatile__ ( - "fsub %2 \n\t" - "fistpl %0" - : "=m" (t) - : "t" (x), "f" (h) - : "st" - ); -#else -# warn IRRLICHT_FAST_MATH not supported. - return (s32) floorf ( x ); -#endif - return t; -#else // no fast math - return (s32) floorf ( x ); -#endif - } - - - REALINLINE s32 ceil32 ( f32 x ) - { -#ifdef IRRLICHT_FAST_MATH - const f32 h = 0.5f; - - s32 t; - -#if defined(_MSC_VER) - __asm - { - fld x - fadd h - fistp t - } -#elif defined(__GNUC__) - __asm__ __volatile__ ( - "fadd %2 \n\t" - "fistpl %0 \n\t" - : "=m"(t) - : "t"(x), "f"(h) - : "st" - ); -#else -# warn IRRLICHT_FAST_MATH not supported. - return (s32) ceilf ( x ); -#endif - return t; -#else // not fast math - return (s32) ceilf ( x ); -#endif - } - - - - REALINLINE s32 round32(f32 x) - { -#if defined(IRRLICHT_FAST_MATH) - s32 t; - -#if defined(_MSC_VER) - __asm - { - fld x - fistp t - } -#elif defined(__GNUC__) - __asm__ __volatile__ ( - "fistpl %0 \n\t" - : "=m"(t) - : "t"(x) - : "st" - ); -#else -# warn IRRLICHT_FAST_MATH not supported. - return (s32) round_(x); -#endif - return t; -#else // no fast math - return (s32) round_(x); -#endif - } - - inline f32 f32_max3(const f32 a, const f32 b, const f32 c) - { - return a > b ? (a > c ? a : c) : (b > c ? b : c); - } - - inline f32 f32_min3(const f32 a, const f32 b, const f32 c) - { - return a < b ? (a < c ? a : c) : (b < c ? b : c); - } - - inline f32 fract ( f32 x ) - { - return x - floorf ( x ); - } - -} // end namespace core -} // end namespace irr - -#ifndef IRRLICHT_FAST_MATH - using irr::core::IR; - using irr::core::FR; -#endif - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/irrString.h b/builddir/irrlicht-1.8.1/include/irrString.h deleted file mode 100644 index 752ea1a..0000000 --- a/builddir/irrlicht-1.8.1/include/irrString.h +++ /dev/null @@ -1,1368 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine" and the "irrXML" project. -// For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h - -#ifndef __IRR_STRING_H_INCLUDED__ -#define __IRR_STRING_H_INCLUDED__ - -#include "irrTypes.h" -#include "irrAllocator.h" -#include "irrMath.h" -#include <stdio.h> -#include <string.h> -#include <stdlib.h> - -namespace irr -{ -namespace core -{ - -//! Very simple string class with some useful features. -/** string<c8> and string<wchar_t> both accept Unicode AND ASCII/Latin-1, -so you can assign Unicode to string<c8> and ASCII/Latin-1 to string<wchar_t> -(and the other way round) if you want to. - -However, note that the conversation between both is not done using any encoding. -This means that c8 strings are treated as ASCII/Latin-1, not UTF-8, and -are simply expanded to the equivalent wchar_t, while Unicode/wchar_t -characters are truncated to 8-bit ASCII/Latin-1 characters, discarding all -other information in the wchar_t. -*/ - -enum eLocaleID -{ - IRR_LOCALE_ANSI = 0, - IRR_LOCALE_GERMAN = 1 -}; - -static eLocaleID locale_current = IRR_LOCALE_ANSI; -static inline void locale_set ( eLocaleID id ) -{ - locale_current = id; -} - -//! Returns a character converted to lower case -static inline u32 locale_lower ( u32 x ) -{ - switch ( locale_current ) - { - case IRR_LOCALE_GERMAN: - case IRR_LOCALE_ANSI: - break; - } - // ansi - return x >= 'A' && x <= 'Z' ? x + 0x20 : x; -} - -//! Returns a character converted to upper case -static inline u32 locale_upper ( u32 x ) -{ - switch ( locale_current ) - { - case IRR_LOCALE_GERMAN: - case IRR_LOCALE_ANSI: - break; - } - - // ansi - return x >= 'a' && x <= 'z' ? x + ( 'A' - 'a' ) : x; -} - - -template <typename T, typename TAlloc = irrAllocator<T> > -class string -{ -public: - - typedef T char_type; - - //! Default constructor - string() - : array(0), allocated(1), used(1) - { - array = allocator.allocate(1); // new T[1]; - array[0] = 0; - } - - - //! Constructor - string(const string<T,TAlloc>& other) - : array(0), allocated(0), used(0) - { - *this = other; - } - - //! Constructor from other string types - template <class B, class A> - string(const string<B, A>& other) - : array(0), allocated(0), used(0) - { - *this = other; - } - - - //! Constructs a string from a float - explicit string(const double number) - : array(0), allocated(0), used(0) - { - c8 tmpbuf[255]; - snprintf(tmpbuf, 255, "%0.6f", number); - *this = tmpbuf; - } - - - //! Constructs a string from an int - explicit string(int number) - : array(0), allocated(0), used(0) - { - // store if negative and make positive - - bool negative = false; - if (number < 0) - { - number *= -1; - negative = true; - } - - // temporary buffer for 16 numbers - - c8 tmpbuf[16]={0}; - u32 idx = 15; - - // special case '0' - - if (!number) - { - tmpbuf[14] = '0'; - *this = &tmpbuf[14]; - return; - } - - // add numbers - - while(number && idx) - { - --idx; - tmpbuf[idx] = (c8)('0' + (number % 10)); - number /= 10; - } - - // add sign - - if (negative) - { - --idx; - tmpbuf[idx] = '-'; - } - - *this = &tmpbuf[idx]; - } - - - //! Constructs a string from an unsigned int - explicit string(unsigned int number) - : array(0), allocated(0), used(0) - { - // temporary buffer for 16 numbers - - c8 tmpbuf[16]={0}; - u32 idx = 15; - - // special case '0' - - if (!number) - { - tmpbuf[14] = '0'; - *this = &tmpbuf[14]; - return; - } - - // add numbers - - while(number && idx) - { - --idx; - tmpbuf[idx] = (c8)('0' + (number % 10)); - number /= 10; - } - - *this = &tmpbuf[idx]; - } - - - //! Constructs a string from a long - explicit string(long number) - : array(0), allocated(0), used(0) - { - // store if negative and make positive - - bool negative = false; - if (number < 0) - { - number *= -1; - negative = true; - } - - // temporary buffer for 16 numbers - - c8 tmpbuf[16]={0}; - u32 idx = 15; - - // special case '0' - - if (!number) - { - tmpbuf[14] = '0'; - *this = &tmpbuf[14]; - return; - } - - // add numbers - - while(number && idx) - { - --idx; - tmpbuf[idx] = (c8)('0' + (number % 10)); - number /= 10; - } - - // add sign - - if (negative) - { - --idx; - tmpbuf[idx] = '-'; - } - - *this = &tmpbuf[idx]; - } - - - //! Constructs a string from an unsigned long - explicit string(unsigned long number) - : array(0), allocated(0), used(0) - { - // temporary buffer for 16 numbers - - c8 tmpbuf[16]={0}; - u32 idx = 15; - - // special case '0' - - if (!number) - { - tmpbuf[14] = '0'; - *this = &tmpbuf[14]; - return; - } - - // add numbers - - while(number && idx) - { - --idx; - tmpbuf[idx] = (c8)('0' + (number % 10)); - number /= 10; - } - - *this = &tmpbuf[idx]; - } - - - //! Constructor for copying a string from a pointer with a given length - template <class B> - string(const B* const c, u32 length) - : array(0), allocated(0), used(0) - { - if (!c) - { - // correctly init the string to an empty one - *this=""; - return; - } - - allocated = used = length+1; - array = allocator.allocate(used); // new T[used]; - - for (u32 l = 0; l<length; ++l) - array[l] = (T)c[l]; - - array[length] = 0; - } - - - //! Constructor for unicode and ascii strings - template <class B> - string(const B* const c) - : array(0), allocated(0), used(0) - { - *this = c; - } - - - //! Destructor - ~string() - { - allocator.deallocate(array); // delete [] array; - } - - - //! Assignment operator - string<T,TAlloc>& operator=(const string<T,TAlloc>& other) - { - if (this == &other) - return *this; - - used = other.size()+1; - if (used>allocated) - { - allocator.deallocate(array); // delete [] array; - allocated = used; - array = allocator.allocate(used); //new T[used]; - } - - const T* p = other.c_str(); - for (u32 i=0; i<used; ++i, ++p) - array[i] = *p; - - return *this; - } - - //! Assignment operator for other string types - template <class B, class A> - string<T,TAlloc>& operator=(const string<B,A>& other) - { - *this = other.c_str(); - return *this; - } - - - //! Assignment operator for strings, ascii and unicode - template <class B> - string<T,TAlloc>& operator=(const B* const c) - { - if (!c) - { - if (!array) - { - array = allocator.allocate(1); //new T[1]; - allocated = 1; - } - used = 1; - array[0] = 0x0; - return *this; - } - - if ((void*)c == (void*)array) - return *this; - - u32 len = 0; - const B* p = c; - do - { - ++len; - } while(*p++); - - // we'll keep the old string for a while, because the new - // string could be a part of the current string. - T* oldArray = array; - - used = len; - if (used>allocated) - { - allocated = used; - array = allocator.allocate(used); //new T[used]; - } - - for (u32 l = 0; l<len; ++l) - array[l] = (T)c[l]; - - if (oldArray != array) - allocator.deallocate(oldArray); // delete [] oldArray; - - return *this; - } - - - //! Append operator for other strings - string<T,TAlloc> operator+(const string<T,TAlloc>& other) const - { - string<T,TAlloc> str(*this); - str.append(other); - - return str; - } - - - //! Append operator for strings, ascii and unicode - template <class B> - string<T,TAlloc> operator+(const B* const c) const - { - string<T,TAlloc> str(*this); - str.append(c); - - return str; - } - - - //! Direct access operator - T& operator [](const u32 index) - { - _IRR_DEBUG_BREAK_IF(index>=used) // bad index - return array[index]; - } - - - //! Direct access operator - const T& operator [](const u32 index) const - { - _IRR_DEBUG_BREAK_IF(index>=used) // bad index - return array[index]; - } - - - //! Equality operator - bool operator==(const T* const str) const - { - if (!str) - return false; - - u32 i; - for (i=0; array[i] && str[i]; ++i) - if (array[i] != str[i]) - return false; - - return (!array[i] && !str[i]); - } - - - //! Equality operator - bool operator==(const string<T,TAlloc>& other) const - { - for (u32 i=0; array[i] && other.array[i]; ++i) - if (array[i] != other.array[i]) - return false; - - return used == other.used; - } - - - //! Is smaller comparator - bool operator<(const string<T,TAlloc>& other) const - { - for (u32 i=0; array[i] && other.array[i]; ++i) - { - const s32 diff = array[i] - other.array[i]; - if (diff) - return (diff < 0); - } - - return (used < other.used); - } - - - //! Inequality operator - bool operator!=(const T* const str) const - { - return !(*this == str); - } - - - //! Inequality operator - bool operator!=(const string<T,TAlloc>& other) const - { - return !(*this == other); - } - - - //! Returns length of the string's content - /** \return Length of the string's content in characters, excluding - the trailing NUL. */ - u32 size() const - { - return used-1; - } - - //! Informs if the string is empty or not. - //! \return True if the string is empty, false if not. - bool empty() const - { - return (size() == 0); - } - - //! Returns character string - /** \return pointer to C-style NUL terminated string. */ - const T* c_str() const - { - return array; - } - - - //! Makes the string lower case. - string<T,TAlloc>& make_lower() - { - for (u32 i=0; array[i]; ++i) - array[i] = locale_lower ( array[i] ); - return *this; - } - - - //! Makes the string upper case. - string<T,TAlloc>& make_upper() - { - for (u32 i=0; array[i]; ++i) - array[i] = locale_upper ( array[i] ); - return *this; - } - - - //! Compares the strings ignoring case. - /** \param other: Other string to compare. - \return True if the strings are equal ignoring case. */ - bool equals_ignore_case(const string<T,TAlloc>& other) const - { - for(u32 i=0; array[i] && other[i]; ++i) - if (locale_lower( array[i]) != locale_lower(other[i])) - return false; - - return used == other.used; - } - - //! Compares the strings ignoring case. - /** \param other: Other string to compare. - \param sourcePos: where to start to compare in the string - \return True if the strings are equal ignoring case. */ - bool equals_substring_ignore_case(const string<T,TAlloc>&other, const s32 sourcePos = 0 ) const - { - if ( (u32) sourcePos >= used ) - return false; - - u32 i; - for( i=0; array[sourcePos + i] && other[i]; ++i) - if (locale_lower( array[sourcePos + i]) != locale_lower(other[i])) - return false; - - return array[sourcePos + i] == 0 && other[i] == 0; - } - - - //! Compares the strings ignoring case. - /** \param other: Other string to compare. - \return True if this string is smaller ignoring case. */ - bool lower_ignore_case(const string<T,TAlloc>& other) const - { - for(u32 i=0; array[i] && other.array[i]; ++i) - { - s32 diff = (s32) locale_lower ( array[i] ) - (s32) locale_lower ( other.array[i] ); - if ( diff ) - return diff < 0; - } - - return used < other.used; - } - - - //! compares the first n characters of the strings - /** \param other Other string to compare. - \param n Number of characters to compare - \return True if the n first characters of both strings are equal. */ - bool equalsn(const string<T,TAlloc>& other, u32 n) const - { - u32 i; - for(i=0; array[i] && other[i] && i < n; ++i) - if (array[i] != other[i]) - return false; - - // if one (or both) of the strings was smaller then they - // are only equal if they have the same length - return (i == n) || (used == other.used); - } - - - //! compares the first n characters of the strings - /** \param str Other string to compare. - \param n Number of characters to compare - \return True if the n first characters of both strings are equal. */ - bool equalsn(const T* const str, u32 n) const - { - if (!str) - return false; - u32 i; - for(i=0; array[i] && str[i] && i < n; ++i) - if (array[i] != str[i]) - return false; - - // if one (or both) of the strings was smaller then they - // are only equal if they have the same length - return (i == n) || (array[i] == 0 && str[i] == 0); - } - - - //! Appends a character to this string - /** \param character: Character to append. */ - string<T,TAlloc>& append(T character) - { - if (used + 1 > allocated) - reallocate(used + 1); - - ++used; - - array[used-2] = character; - array[used-1] = 0; - - return *this; - } - - - //! Appends a char string to this string - /** \param other: Char string to append. */ - /** \param length: The length of the string to append. */ - string<T,TAlloc>& append(const T* const other, u32 length=0xffffffff) - { - if (!other) - return *this; - - u32 len = 0; - const T* p = other; - while(*p) - { - ++len; - ++p; - } - if (len > length) - len = length; - - if (used + len > allocated) - reallocate(used + len); - - --used; - ++len; - - for (u32 l=0; l<len; ++l) - array[l+used] = *(other+l); - - used += len; - - return *this; - } - - - //! Appends a string to this string - /** \param other: String to append. */ - string<T,TAlloc>& append(const string<T,TAlloc>& other) - { - if (other.size() == 0) - return *this; - - --used; - u32 len = other.size()+1; - - if (used + len > allocated) - reallocate(used + len); - - for (u32 l=0; l<len; ++l) - array[used+l] = other[l]; - - used += len; - - return *this; - } - - - //! Appends a string of the length l to this string. - /** \param other: other String to append to this string. - \param length: How much characters of the other string to add to this one. */ - string<T,TAlloc>& append(const string<T,TAlloc>& other, u32 length) - { - if (other.size() == 0) - return *this; - - if (other.size() < length) - { - append(other); - return *this; - } - - if (used + length > allocated) - reallocate(used + length); - - --used; - - for (u32 l=0; l<length; ++l) - array[l+used] = other[l]; - used += length; - - // ensure proper termination - array[used]=0; - ++used; - - return *this; - } - - - //! Reserves some memory. - /** \param count: Amount of characters to reserve. */ - void reserve(u32 count) - { - if (count < allocated) - return; - - reallocate(count); - } - - - //! finds first occurrence of character in string - /** \param c: Character to search for. - \return Position where the character has been found, - or -1 if not found. */ - s32 findFirst(T c) const - { - for (u32 i=0; i<used-1; ++i) - if (array[i] == c) - return i; - - return -1; - } - - //! finds first occurrence of a character of a list in string - /** \param c: List of characters to find. For example if the method - should find the first occurrence of 'a' or 'b', this parameter should be "ab". - \param count: Amount of characters in the list. Usually, - this should be strlen(c) - \return Position where one of the characters has been found, - or -1 if not found. */ - s32 findFirstChar(const T* const c, u32 count=1) const - { - if (!c || !count) - return -1; - - for (u32 i=0; i<used-1; ++i) - for (u32 j=0; j<count; ++j) - if (array[i] == c[j]) - return i; - - return -1; - } - - - //! Finds first position of a character not in a given list. - /** \param c: List of characters not to find. For example if the method - should find the first occurrence of a character not 'a' or 'b', this parameter should be "ab". - \param count: Amount of characters in the list. Usually, - this should be strlen(c) - \return Position where the character has been found, - or -1 if not found. */ - template <class B> - s32 findFirstCharNotInList(const B* const c, u32 count=1) const - { - if (!c || !count) - return -1; - - for (u32 i=0; i<used-1; ++i) - { - u32 j; - for (j=0; j<count; ++j) - if (array[i] == c[j]) - break; - - if (j==count) - return i; - } - - return -1; - } - - //! Finds last position of a character not in a given list. - /** \param c: List of characters not to find. For example if the method - should find the first occurrence of a character not 'a' or 'b', this parameter should be "ab". - \param count: Amount of characters in the list. Usually, - this should be strlen(c) - \return Position where the character has been found, - or -1 if not found. */ - template <class B> - s32 findLastCharNotInList(const B* const c, u32 count=1) const - { - if (!c || !count) - return -1; - - for (s32 i=(s32)(used-2); i>=0; --i) - { - u32 j; - for (j=0; j<count; ++j) - if (array[i] == c[j]) - break; - - if (j==count) - return i; - } - - return -1; - } - - //! finds next occurrence of character in string - /** \param c: Character to search for. - \param startPos: Position in string to start searching. - \return Position where the character has been found, - or -1 if not found. */ - s32 findNext(T c, u32 startPos) const - { - for (u32 i=startPos; i<used-1; ++i) - if (array[i] == c) - return i; - - return -1; - } - - - //! finds last occurrence of character in string - /** \param c: Character to search for. - \param start: start to search reverse ( default = -1, on end ) - \return Position where the character has been found, - or -1 if not found. */ - s32 findLast(T c, s32 start = -1) const - { - start = core::clamp ( start < 0 ? (s32)(used) - 2 : start, 0, (s32)(used) - 2 ); - for (s32 i=start; i>=0; --i) - if (array[i] == c) - return i; - - return -1; - } - - //! finds last occurrence of a character of a list in string - /** \param c: List of strings to find. For example if the method - should find the last occurrence of 'a' or 'b', this parameter should be "ab". - \param count: Amount of characters in the list. Usually, - this should be strlen(c) - \return Position where one of the characters has been found, - or -1 if not found. */ - s32 findLastChar(const T* const c, u32 count=1) const - { - if (!c || !count) - return -1; - - for (s32 i=(s32)used-2; i>=0; --i) - for (u32 j=0; j<count; ++j) - if (array[i] == c[j]) - return i; - - return -1; - } - - - //! finds another string in this string - /** \param str: Another string - \param start: Start position of the search - \return Positions where the string has been found, - or -1 if not found. */ - template <class B> - s32 find(const B* const str, const u32 start = 0) const - { - if (str && *str) - { - u32 len = 0; - - while (str[len]) - ++len; - - if (len > used-1) - return -1; - - for (u32 i=start; i<used-len; ++i) - { - u32 j=0; - - while(str[j] && array[i+j] == str[j]) - ++j; - - if (!str[j]) - return i; - } - } - - return -1; - } - - - //! Returns a substring - /** \param begin Start of substring. - \param length Length of substring. - \param make_lower copy only lower case */ - string<T> subString(u32 begin, s32 length, bool make_lower = false ) const - { - // if start after string - // or no proper substring length - if ((length <= 0) || (begin>=size())) - return string<T>(""); - // clamp length to maximal value - if ((length+begin) > size()) - length = size()-begin; - - string<T> o; - o.reserve(length+1); - - s32 i; - if ( !make_lower ) - { - for (i=0; i<length; ++i) - o.array[i] = array[i+begin]; - } - else - { - for (i=0; i<length; ++i) - o.array[i] = locale_lower ( array[i+begin] ); - } - - o.array[length] = 0; - o.used = length + 1; - - return o; - } - - - //! Appends a character to this string - /** \param c Character to append. */ - string<T,TAlloc>& operator += (T c) - { - append(c); - return *this; - } - - - //! Appends a char string to this string - /** \param c Char string to append. */ - string<T,TAlloc>& operator += (const T* const c) - { - append(c); - return *this; - } - - - //! Appends a string to this string - /** \param other String to append. */ - string<T,TAlloc>& operator += (const string<T,TAlloc>& other) - { - append(other); - return *this; - } - - - //! Appends a string representation of a number to this string - /** \param i Number to append. */ - string<T,TAlloc>& operator += (const int i) - { - append(string<T,TAlloc>(i)); - return *this; - } - - - //! Appends a string representation of a number to this string - /** \param i Number to append. */ - string<T,TAlloc>& operator += (const unsigned int i) - { - append(string<T,TAlloc>(i)); - return *this; - } - - - //! Appends a string representation of a number to this string - /** \param i Number to append. */ - string<T,TAlloc>& operator += (const long i) - { - append(string<T,TAlloc>(i)); - return *this; - } - - - //! Appends a string representation of a number to this string - /** \param i Number to append. */ - string<T,TAlloc>& operator += (const unsigned long i) - { - append(string<T,TAlloc>(i)); - return *this; - } - - - //! Appends a string representation of a number to this string - /** \param i Number to append. */ - string<T,TAlloc>& operator += (const double i) - { - append(string<T,TAlloc>(i)); - return *this; - } - - - //! Appends a string representation of a number to this string - /** \param i Number to append. */ - string<T,TAlloc>& operator += (const float i) - { - append(string<T,TAlloc>(i)); - return *this; - } - - - //! Replaces all characters of a special type with another one - /** \param toReplace Character to replace. - \param replaceWith Character replacing the old one. */ - string<T,TAlloc>& replace(T toReplace, T replaceWith) - { - for (u32 i=0; i<used-1; ++i) - if (array[i] == toReplace) - array[i] = replaceWith; - return *this; - } - - - //! Replaces all instances of a string with another one. - /** \param toReplace The string to replace. - \param replaceWith The string replacing the old one. */ - string<T,TAlloc>& replace(const string<T,TAlloc>& toReplace, const string<T,TAlloc>& replaceWith) - { - if (toReplace.size() == 0) - return *this; - - const T* other = toReplace.c_str(); - const T* replace = replaceWith.c_str(); - const u32 other_size = toReplace.size(); - const u32 replace_size = replaceWith.size(); - - // Determine the delta. The algorithm will change depending on the delta. - s32 delta = replace_size - other_size; - - // A character for character replace. The string will not shrink or grow. - if (delta == 0) - { - s32 pos = 0; - while ((pos = find(other, pos)) != -1) - { - for (u32 i = 0; i < replace_size; ++i) - array[pos + i] = replace[i]; - ++pos; - } - return *this; - } - - // We are going to be removing some characters. The string will shrink. - if (delta < 0) - { - u32 i = 0; - for (u32 pos = 0; pos < used; ++i, ++pos) - { - // Is this potentially a match? - if (array[pos] == *other) - { - // Check to see if we have a match. - u32 j; - for (j = 0; j < other_size; ++j) - { - if (array[pos + j] != other[j]) - break; - } - - // If we have a match, replace characters. - if (j == other_size) - { - for (j = 0; j < replace_size; ++j) - array[i + j] = replace[j]; - i += replace_size - 1; - pos += other_size - 1; - continue; - } - } - - // No match found, just copy characters. - array[i] = array[pos]; - } - array[i-1] = 0; - used = i; - - return *this; - } - - // We are going to be adding characters, so the string size will increase. - // Count the number of times toReplace exists in the string so we can allocate the new size. - u32 find_count = 0; - s32 pos = 0; - while ((pos = find(other, pos)) != -1) - { - ++find_count; - ++pos; - } - - // Re-allocate the string now, if needed. - u32 len = delta * find_count; - if (used + len > allocated) - reallocate(used + len); - - // Start replacing. - pos = 0; - while ((pos = find(other, pos)) != -1) - { - T* start = array + pos + other_size - 1; - T* ptr = array + used - 1; - T* end = array + delta + used -1; - - // Shift characters to make room for the string. - while (ptr != start) - { - *end = *ptr; - --ptr; - --end; - } - - // Add the new string now. - for (u32 i = 0; i < replace_size; ++i) - array[pos + i] = replace[i]; - - pos += replace_size; - used += delta; - } - - return *this; - } - - - //! Removes characters from a string. - /** \param c: Character to remove. */ - string<T,TAlloc>& remove(T c) - { - u32 pos = 0; - u32 found = 0; - for (u32 i=0; i<used-1; ++i) - { - if (array[i] == c) - { - ++found; - continue; - } - - array[pos++] = array[i]; - } - used -= found; - array[used-1] = 0; - return *this; - } - - - //! Removes a string from the string. - /** \param toRemove: String to remove. */ - string<T,TAlloc>& remove(const string<T,TAlloc>& toRemove) - { - u32 size = toRemove.size(); - if ( size == 0 ) - return *this; - u32 pos = 0; - u32 found = 0; - for (u32 i=0; i<used-1; ++i) - { - u32 j = 0; - while (j < size) - { - if (array[i + j] != toRemove[j]) - break; - ++j; - } - if (j == size) - { - found += size; - i += size - 1; - continue; - } - - array[pos++] = array[i]; - } - used -= found; - array[used-1] = 0; - return *this; - } - - - //! Removes characters from a string. - /** \param characters: Characters to remove. */ - string<T,TAlloc>& removeChars(const string<T,TAlloc> & characters) - { - if (characters.size() == 0) - return *this; - - u32 pos = 0; - u32 found = 0; - for (u32 i=0; i<used-1; ++i) - { - // Don't use characters.findFirst as it finds the \0, - // causing used to become incorrect. - bool docontinue = false; - for (u32 j=0; j<characters.size(); ++j) - { - if (characters[j] == array[i]) - { - ++found; - docontinue = true; - break; - } - } - if (docontinue) - continue; - - array[pos++] = array[i]; - } - used -= found; - array[used-1] = 0; - - return *this; - } - - - //! Trims the string. - /** Removes the specified characters (by default, Latin-1 whitespace) - from the begining and the end of the string. */ - string<T,TAlloc>& trim(const string<T,TAlloc> & whitespace = " \t\n\r") - { - // find start and end of the substring without the specified characters - const s32 begin = findFirstCharNotInList(whitespace.c_str(), whitespace.used); - if (begin == -1) - return (*this=""); - - const s32 end = findLastCharNotInList(whitespace.c_str(), whitespace.used); - - return (*this = subString(begin, (end +1) - begin)); - } - - - //! Erases a character from the string. - /** May be slow, because all elements - following after the erased element have to be copied. - \param index: Index of element to be erased. */ - string<T,TAlloc>& erase(u32 index) - { - _IRR_DEBUG_BREAK_IF(index>=used) // access violation - - for (u32 i=index+1; i<used; ++i) - array[i-1] = array[i]; - - --used; - return *this; - } - - //! verify the existing string. - string<T,TAlloc>& validate() - { - // terminate on existing null - for (u32 i=0; i<allocated; ++i) - { - if (array[i] == 0) - { - used = i + 1; - return *this; - } - } - - // terminate - if ( allocated > 0 ) - { - used = allocated; - array[used-1] = 0; - } - else - { - used = 0; - } - - return *this; - } - - //! gets the last char of a string or null - T lastChar() const - { - return used > 1 ? array[used-2] : 0; - } - - //! split string into parts. - /** This method will split a string at certain delimiter characters - into the container passed in as reference. The type of the container - has to be given as template parameter. It must provide a push_back and - a size method. - \param ret The result container - \param c C-style string of delimiter characters - \param count Number of delimiter characters - \param ignoreEmptyTokens Flag to avoid empty substrings in the result - container. If two delimiters occur without a character in between, an - empty substring would be placed in the result. If this flag is set, - only non-empty strings are stored. - \param keepSeparators Flag which allows to add the separator to the - result string. If this flag is true, the concatenation of the - substrings results in the original string. Otherwise, only the - characters between the delimiters are returned. - \return The number of resulting substrings - */ - template<class container> - u32 split(container& ret, const T* const c, u32 count=1, bool ignoreEmptyTokens=true, bool keepSeparators=false) const - { - if (!c) - return 0; - - const u32 oldSize=ret.size(); - u32 lastpos = 0; - bool lastWasSeparator = false; - for (u32 i=0; i<used; ++i) - { - bool foundSeparator = false; - for (u32 j=0; j<count; ++j) - { - if (array[i] == c[j]) - { - if ((!ignoreEmptyTokens || i - lastpos != 0) && - !lastWasSeparator) - ret.push_back(string<T,TAlloc>(&array[lastpos], i - lastpos)); - foundSeparator = true; - lastpos = (keepSeparators ? i : i + 1); - break; - } - } - lastWasSeparator = foundSeparator; - } - if ((used - 1) > lastpos) - ret.push_back(string<T,TAlloc>(&array[lastpos], (used - 1) - lastpos)); - return ret.size()-oldSize; - } - -private: - - //! Reallocate the array, make it bigger or smaller - void reallocate(u32 new_size) - { - T* old_array = array; - - array = allocator.allocate(new_size); //new T[new_size]; - allocated = new_size; - - u32 amount = used < new_size ? used : new_size; - for (u32 i=0; i<amount; ++i) - array[i] = old_array[i]; - - if (allocated < used) - used = allocated; - - allocator.deallocate(old_array); // delete [] old_array; - } - - //--- member variables - - T* array; - u32 allocated; - u32 used; - TAlloc allocator; -}; - - -//! Typedef for character strings -typedef string<c8> stringc; - -//! Typedef for wide character strings -typedef string<wchar_t> stringw; - - -} // end namespace core -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/irrTypes.h b/builddir/irrlicht-1.8.1/include/irrTypes.h deleted file mode 100644 index cfeaf84..0000000 --- a/builddir/irrlicht-1.8.1/include/irrTypes.h +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_TYPES_H_INCLUDED__ -#define __IRR_TYPES_H_INCLUDED__ - -#include "IrrCompileConfig.h" - -namespace irr -{ - -//! 8 bit unsigned variable. -/** This is a typedef for unsigned char, it ensures portability of the engine. */ -#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) -typedef unsigned __int8 u8; -#else -typedef unsigned char u8; -#endif - -//! 8 bit signed variable. -/** This is a typedef for signed char, it ensures portability of the engine. */ -#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) -typedef __int8 s8; -#else -typedef signed char s8; -#endif - -//! 8 bit character variable. -/** This is a typedef for char, it ensures portability of the engine. */ -typedef char c8; - - - -//! 16 bit unsigned variable. -/** This is a typedef for unsigned short, it ensures portability of the engine. */ -#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) -typedef unsigned __int16 u16; -#else -typedef unsigned short u16; -#endif - -//! 16 bit signed variable. -/** This is a typedef for signed short, it ensures portability of the engine. */ -#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) -typedef __int16 s16; -#else -typedef signed short s16; -#endif - - - -//! 32 bit unsigned variable. -/** This is a typedef for unsigned int, it ensures portability of the engine. */ -#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) -typedef unsigned __int32 u32; -#else -typedef unsigned int u32; -#endif - -//! 32 bit signed variable. -/** This is a typedef for signed int, it ensures portability of the engine. */ -#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) -typedef __int32 s32; -#else -typedef signed int s32; -#endif - - -#ifdef __IRR_HAS_S64 -//! 64 bit unsigned variable. -/** This is a typedef for 64bit uint, it ensures portability of the engine. */ -#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) -typedef unsigned __int64 u64; -#elif __GNUC__ -#if __WORDSIZE == 64 -typedef unsigned long int u64; -#else -__extension__ typedef unsigned long long u64; -#endif -#else -typedef unsigned long long u64; -#endif - -//! 64 bit signed variable. -/** This is a typedef for 64bit int, it ensures portability of the engine. */ -#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) -typedef __int64 s64; -#elif __GNUC__ -#if __WORDSIZE == 64 -typedef long int s64; -#else -__extension__ typedef long long s64; -#endif -#else -typedef long long s64; -#endif -#endif // __IRR_HAS_S64 - - - -//! 32 bit floating point variable. -/** This is a typedef for float, it ensures portability of the engine. */ -typedef float f32; - -//! 64 bit floating point variable. -/** This is a typedef for double, it ensures portability of the engine. */ -typedef double f64; - - -} // end namespace irr - - -#include <wchar.h> -#ifdef _IRR_WINDOWS_API_ -//! Defines for s{w,n}printf because these methods do not match the ISO C -//! standard on Windows platforms, but it does on all others. -//! These should be int snprintf(char *str, size_t size, const char *format, ...); -//! and int swprintf(wchar_t *wcs, size_t maxlen, const wchar_t *format, ...); -#if defined(_MSC_VER) && _MSC_VER > 1310 && !defined (_WIN32_WCE) -#define swprintf swprintf_s -#define snprintf sprintf_s -#elif !defined(__CYGWIN__) -#define swprintf _snwprintf -#define snprintf _snprintf -#endif - -// define the wchar_t type if not already built in. -#ifdef _MSC_VER -#ifndef _WCHAR_T_DEFINED -//! A 16 bit wide character type. -/** - Defines the wchar_t-type. - In VS6, its not possible to tell - the standard compiler to treat wchar_t as a built-in type, and - sometimes we just don't want to include the huge stdlib.h or wchar.h, - so we'll use this. -*/ -typedef unsigned short wchar_t; -#define _WCHAR_T_DEFINED -#endif // wchar is not defined -#endif // microsoft compiler -#endif // _IRR_WINDOWS_API_ - -namespace irr -{ - -//! Type name for character type used by the file system. -/** Should the wide character version of the FileSystem be used it is a -16 bit character variable. Used for unicode Filesystem and unicode strings. -Else it is a 8 bit character variable. Used for ansi Filesystem and non-unicode -strings -*/ -#if defined(_IRR_WCHAR_FILESYSTEM) - typedef wchar_t fschar_t; - #define _IRR_TEXT(X) L##X -#else - typedef char fschar_t; - #define _IRR_TEXT(X) X -#endif - -} // end namespace irr - -//! define a break macro for debugging. -#if defined(_DEBUG) -#if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER) && !defined (_WIN32_WCE) - #if defined(WIN64) || defined(_WIN64) // using portable common solution for x64 configuration - #include <crtdbg.h> - #define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_CrtDbgBreak();} - #else - #define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_asm int 3} - #endif -#else -#include "assert.h" -#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) assert( !(_CONDITION_) ); -#endif -#else -#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) -#endif - -//! Defines a deprecated macro which generates a warning at compile time -/** The usage is simple -For typedef: typedef _IRR_DEPRECATED_ int test1; -For classes/structs: class _IRR_DEPRECATED_ test2 { ... }; -For methods: class test3 { _IRR_DEPRECATED_ virtual void foo() {} }; -For functions: template<class T> _IRR_DEPRECATED_ void test4(void) {} -**/ -#if defined(IGNORE_DEPRECATED_WARNING) -#define _IRR_DEPRECATED_ -#elif _MSC_VER >= 1310 //vs 2003 or higher -#define _IRR_DEPRECATED_ __declspec(deprecated) -#elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) // all versions above 3.0 should support this feature -#define _IRR_DEPRECATED_ __attribute__ ((deprecated)) -#else -#define _IRR_DEPRECATED_ -#endif - -//! Defines a small statement to work around a microsoft compiler bug. -/** The microsoft compiler 7.0 - 7.1 has a bug: -When you call unmanaged code that returns a bool type value of false from managed code, -the return value may appear as true. See -http://support.microsoft.com/default.aspx?kbid=823071 for details. -Compiler version defines: VC6.0 : 1200, VC7.0 : 1300, VC7.1 : 1310, VC8.0 : 1400*/ -#if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER) && (_MSC_VER > 1299) && (_MSC_VER < 1400) -#define _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX __asm mov eax,100 -#else -#define _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX -#endif // _IRR_MANAGED_MARSHALLING_BUGFIX - - -// memory debugging -#if defined(_DEBUG) && defined(IRRLICHT_EXPORTS) && defined(_MSC_VER) && \ - (_MSC_VER > 1299) && !defined(_IRR_DONT_DO_MEMORY_DEBUGGING_HERE) && !defined(_WIN32_WCE) - - #define CRTDBG_MAP_ALLOC - #define _CRTDBG_MAP_ALLOC - #define DEBUG_CLIENTBLOCK new( _CLIENT_BLOCK, __FILE__, __LINE__) - #include <stdlib.h> - #include <crtdbg.h> - #define new DEBUG_CLIENTBLOCK -#endif - -// disable truncated debug information warning in visual studio 6 by default -#if defined(_MSC_VER) && (_MSC_VER < 1300 ) -#pragma warning( disable: 4786) -#endif // _MSC - - -//! ignore VC8 warning deprecated -/** The microsoft compiler */ -#if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER) && (_MSC_VER >= 1400) - //#pragma warning( disable: 4996) - //#define _CRT_SECURE_NO_DEPRECATE 1 - //#define _CRT_NONSTDC_NO_DEPRECATE 1 -#endif - - -//! creates four CC codes used in Irrlicht for simple ids -/** some compilers can create those by directly writing the -code like 'code', but some generate warnings so we use this macro here */ -#define MAKE_IRR_ID(c0, c1, c2, c3) \ - ((irr::u32)(irr::u8)(c0) | ((irr::u32)(irr::u8)(c1) << 8) | \ - ((irr::u32)(irr::u8)(c2) << 16) | ((irr::u32)(irr::u8)(c3) << 24 )) - -#if defined(__BORLANDC__) || defined (__BCPLUSPLUS__) -#define _strcmpi(a,b) strcmpi(a,b) -#endif - -#endif // __IRR_TYPES_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/irrXML.h b/builddir/irrlicht-1.8.1/include/irrXML.h deleted file mode 100644 index 2ca2d31..0000000 --- a/builddir/irrlicht-1.8.1/include/irrXML.h +++ /dev/null @@ -1,575 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine" and the "irrXML" project. -// For conditions of distribution and use, see copyright notice in irrlicht.h and/or irrXML.h - -#ifndef __IRR_XML_H_INCLUDED__ -#define __IRR_XML_H_INCLUDED__ - -#include <stdio.h> -#include "IrrCompileConfig.h" - -/** \mainpage irrXML 1.2 API documentation - <div align="center"><img src="logobig.png" ></div> - - \section intro Introduction - - Welcome to the irrXML API documentation. - Here you'll find any information you'll need to develop applications with - irrXML. If you look for a tutorial on how to start, take a look at the \ref irrxmlexample, - at the homepage of irrXML at <A HREF="http://www.ambiera.com/irrxml/">www.ambiera.com/irrxml/</A> - or into the SDK in the directory example. - - irrXML is intended to be a high speed and easy-to-use XML Parser for C++, and - this documentation is an important part of it. If you have any questions or - suggestions, just send a email to the author of the engine, Nikolaus Gebhardt - (niko (at) irrlicht3d.org). For more informations about this parser, see \ref history. - - \section features Features - - irrXML provides forward-only, read-only - access to a stream of non validated XML data. It was fully implemented by - Nikolaus Gebhardt. Its current features are: - - - It it fast as lighting and has very low memory usage. It was - developed with the intention of being used in 3D games, as it already has been. - - irrXML is very small: It only consists of 60 KB of code and can be added easily - to your existing project. - - Of course, it is platform independent and works with lots of compilers. - - It is able to parse ASCII, UTF-8, UTF-16 and UTF-32 text files, both in - little and big endian format. - - Independent of the input file format, the parser can return all strings in ASCII, UTF-8, - UTF-16 and UTF-32 format. - - With its optional file access abstraction it has the advantage that it can read not - only from files but from any type of data (memory, network, ...). For example when - used with the Irrlicht Engine, it directly reads from compressed .zip files. - - Just like the Irrlicht Engine for which it was originally created, it is extremely easy - to use. - - It has no external dependencies, it does not even need the STL. - - Although irrXML has some strenghts, it currently also has the following limitations: - - - The input xml file is not validated and assumed to be correct. - - \section irrxmlexample Example - - The following code demonstrates the basic usage of irrXML. A simple xml - file like this is parsed: - \code - <?xml version="1.0"?> - <config> - <!-- This is a config file for the mesh viewer --> - <model file="dwarf.dea" /> - <messageText caption="Irrlicht Engine Mesh Viewer"> - Welcome to the Mesh Viewer of the "Irrlicht Engine". - </messageText> - </config> - \endcode - - The code for parsing this file would look like this: - \code - #include <irrXML.h> - using namespace irr; // irrXML is located in the namespace irr::io - using namespace io; - - #include <string> // we use STL strings to store data in this example - - void main() - { - // create the reader using one of the factory functions - - IrrXMLReader* xml = createIrrXMLReader("config.xml"); - - // strings for storing the data we want to get out of the file - std::string modelFile; - std::string messageText; - std::string caption; - - // parse the file until end reached - - while(xml && xml->read()) - { - switch(xml->getNodeType()) - { - case EXN_TEXT: - // in this xml file, the only text which occurs is the messageText - messageText = xml->getNodeData(); - break; - case EXN_ELEMENT: - { - if (!strcmp("model", xml->getNodeName())) - modelFile = xml->getAttributeValue("file"); - else - if (!strcmp("messageText", xml->getNodeName())) - caption = xml->getAttributeValue("caption"); - } - break; - } - } - - // delete the xml parser after usage - delete xml; - } - \endcode - - \section howto How to use - - Simply add the source files in the /src directory of irrXML to your project. Done. - - \section license License - - The irrXML license is based on the zlib license. Basicly, this means you can do with - irrXML whatever you want: - - Copyright (C) 2002-2012 Nikolaus Gebhardt - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source distribution. - - \section history History - - As lots of references in this documentation and the source show, this xml - parser has originally been a part of the - <A HREF="http://irrlicht.sourceforge.net" >Irrlicht Engine</A>. But because - the parser has become very useful with the latest release, people asked for a - separate version of it, to be able to use it in non Irrlicht projects. With - irrXML 1.0, this has now been done. -*/ - -namespace irr -{ -namespace io -{ - //! Enumeration of all supported source text file formats - enum ETEXT_FORMAT - { - //! ASCII, file without byte order mark, or not a text file - ETF_ASCII, - - //! UTF-8 format - ETF_UTF8, - - //! UTF-16 format, big endian - ETF_UTF16_BE, - - //! UTF-16 format, little endian - ETF_UTF16_LE, - - //! UTF-32 format, big endian - ETF_UTF32_BE, - - //! UTF-32 format, little endian - ETF_UTF32_LE - }; - - - //! Enumeration for all xml nodes which are parsed by IrrXMLReader - enum EXML_NODE - { - //! No xml node. This is usually the node if you did not read anything yet. - EXN_NONE, - - //! An xml element such as <foo> - EXN_ELEMENT, - - //! End of an xml element such as </foo> - EXN_ELEMENT_END, - - //! Text within an xml element: <foo> this is the text. </foo> - //! Also text between 2 xml elements: </foo> this is the text. <foo> - EXN_TEXT, - - //! An xml comment like <!-- I am a comment --> or a DTD definition. - EXN_COMMENT, - - //! An xml cdata section like <![CDATA[ this is some CDATA ]]> - EXN_CDATA, - - //! Unknown element. - EXN_UNKNOWN - }; - - //! Callback class for file read abstraction. - /** With this, it is possible to make the xml parser read in other - things than just files. The Irrlicht engine is using this for example to - read xml from compressed .zip files. To make the parser read in - any other data, derive a class from this interface, implement the - two methods to read your data and give a pointer to an instance of - your implementation when calling createIrrXMLReader(), - createIrrXMLReaderUTF16() or createIrrXMLReaderUTF32() */ - class IFileReadCallBack - { - public: - - //! Destructor - virtual ~IFileReadCallBack() {} - - //! Reads an amount of bytes from the file. - /** \param buffer: Pointer to buffer where to read bytes will be written to. - \param sizeToRead: Amount of bytes to read from the file. - \return Returns how much bytes were read. */ - virtual int read(void* buffer, int sizeToRead) = 0; - - //! Returns size of file in bytes - virtual long getSize() const = 0; - }; - - //! Empty class to be used as parent class for IrrXMLReader. - /** If you need another class as base class for the xml reader, you can do this by creating - the reader using for example new CXMLReaderImpl<char, YourBaseClass>(yourcallback); - The Irrlicht Engine for example needs IReferenceCounted as base class for every object to - let it automaticly reference countend, hence it replaces IXMLBase with IReferenceCounted. - See irrXML.cpp on how this can be done in detail. */ - class IXMLBase - { - }; - - //! Interface providing easy read access to a XML file. - /** You can create an instance of this reader using one of the factory functions - createIrrXMLReader(), createIrrXMLReaderUTF16() and createIrrXMLReaderUTF32(). - If using the parser from the Irrlicht Engine, please use IFileSystem::createXMLReader() - instead. - For a detailed intro how to use the parser, see \ref irrxmlexample and \ref features. - - The typical usage of this parser looks like this: - \code - #include <irrXML.h> - using namespace irr; // irrXML is located in the namespace irr::io - using namespace io; - - void main() - { - // create the reader using one of the factory functions - IrrXMLReader* xml = createIrrXMLReader("config.xml"); - - if (xml == 0) - return; // file could not be opened - - // parse the file until end reached - while(xml->read()) - { - // based on xml->getNodeType(), do something. - } - - // delete the xml parser after usage - delete xml; - } - \endcode - See \ref irrxmlexample for a more detailed example. - */ - template<class char_type, class super_class> - class IIrrXMLReader : public super_class - { - public: - - //! Destructor - virtual ~IIrrXMLReader() {} - - //! Reads forward to the next xml node. - /** \return Returns false, if there was no further node. */ - virtual bool read() = 0; - - //! Returns the type of the current XML node. - virtual EXML_NODE getNodeType() const = 0; - - //! Returns attribute count of the current XML node. - /** This is usually - non null if the current node is EXN_ELEMENT, and the element has attributes. - \return Returns amount of attributes of this xml node. */ - virtual unsigned int getAttributeCount() const = 0; - - //! Returns name of an attribute. - /** \param idx: Zero based index, should be something between 0 and getAttributeCount()-1. - \return Name of the attribute, 0 if an attribute with this index does not exist. */ - virtual const char_type* getAttributeName(int idx) const = 0; - - //! Returns the value of an attribute. - /** \param idx: Zero based index, should be something between 0 and getAttributeCount()-1. - \return Value of the attribute, 0 if an attribute with this index does not exist. */ - virtual const char_type* getAttributeValue(int idx) const = 0; - - //! Returns the value of an attribute. - /** \param name: Name of the attribute. - \return Value of the attribute, 0 if an attribute with this name does not exist. */ - virtual const char_type* getAttributeValue(const char_type* name) const = 0; - - //! Returns the value of an attribute in a safe way. - /** Like getAttributeValue(), but does not - return 0 if the attribute does not exist. An empty string ("") is returned then. - \param name: Name of the attribute. - \return Value of the attribute, and "" if an attribute with this name does not exist */ - virtual const char_type* getAttributeValueSafe(const char_type* name) const = 0; - - //! Returns the value of an attribute as integer. - /** \param name Name of the attribute. - \return Value of the attribute as integer, and 0 if an attribute with this name does not exist or - the value could not be interpreted as integer. */ - virtual int getAttributeValueAsInt(const char_type* name) const = 0; - - //! Returns the value of an attribute as integer. - /** \param idx: Zero based index, should be something between 0 and getAttributeCount()-1. - \return Value of the attribute as integer, and 0 if an attribute with this index does not exist or - the value could not be interpreted as integer. */ - virtual int getAttributeValueAsInt(int idx) const = 0; - - //! Returns the value of an attribute as float. - /** \param name: Name of the attribute. - \return Value of the attribute as float, and 0 if an attribute with this name does not exist or - the value could not be interpreted as float. */ - virtual float getAttributeValueAsFloat(const char_type* name) const = 0; - - //! Returns the value of an attribute as float. - /** \param idx: Zero based index, should be something between 0 and getAttributeCount()-1. - \return Value of the attribute as float, and 0 if an attribute with this index does not exist or - the value could not be interpreted as float. */ - virtual float getAttributeValueAsFloat(int idx) const = 0; - - //! Returns the name of the current node. - /** Only valid, if the node type is EXN_ELEMENT. - \return Name of the current node or 0 if the node has no name. */ - virtual const char_type* getNodeName() const = 0; - - //! Returns data of the current node. - /** Only valid if the node has some - data and it is of type EXN_TEXT, EXN_COMMENT, EXN_CDATA or EXN_UNKNOWN. */ - virtual const char_type* getNodeData() const = 0; - - //! Returns if an element is an empty element, like <foo /> - virtual bool isEmptyElement() const = 0; - - //! Returns format of the source xml file. - /** It is not necessary to use - this method because the parser will convert the input file format - to the format wanted by the user when creating the parser. This - method is useful to get/display additional informations. */ - virtual ETEXT_FORMAT getSourceFormat() const = 0; - - //! Returns format of the strings returned by the parser. - /** This will be UTF8 for example when you created a parser with - IrrXMLReaderUTF8() and UTF32 when it has been created using - IrrXMLReaderUTF32. It should not be necessary to call this - method and only exists for informational purposes. */ - virtual ETEXT_FORMAT getParserFormat() const = 0; - }; - - - template <typename T> - struct xmlChar - { - T c; - xmlChar<T>() {} - xmlChar<T>(char in) : c(static_cast<T>(in)) {} - xmlChar<T>(wchar_t in) : c(static_cast<T>(in)) {} -#if defined(__BORLANDC__) - // Note - removing explicit for borland was to get it to even compile. - // There haven't been any kind of tests for that besides that. - xmlChar<T>(unsigned char in) : c(static_cast<T>(in)) {} - xmlChar<T>(unsigned short in) : c(static_cast<T>(in)) {} - xmlChar<T>(unsigned int in) : c(static_cast<T>(in)) {} - xmlChar<T>(unsigned long in) : c(static_cast<T>(in)) {} -#else - explicit xmlChar<T>(unsigned char in) : c(static_cast<T>(in)) {} - explicit xmlChar<T>(unsigned short in) : c(static_cast<T>(in)) {} - explicit xmlChar<T>(unsigned int in) : c(static_cast<T>(in)) {} - explicit xmlChar<T>(unsigned long in) : c(static_cast<T>(in)) {} -#endif - operator T() const { return c; } - void operator=(int t) { c=static_cast<T>(t); } - }; - - //! defines the utf-16 type. - /** Not using wchar_t for this because - wchar_t has 16 bit on windows and 32 bit on other operating systems. */ - typedef xmlChar<unsigned short> char16; - - //! defines the utf-32 type. - /** Not using wchar_t for this because - wchar_t has 16 bit on windows and 32 bit on other operating systems. */ - typedef xmlChar<unsigned int> char32; - - //! A UTF-8 or ASCII character xml parser. - /** This means that all character data will be returned in 8 bit ASCII or UTF-8 by this parser. - The file to read can be in any format, it will be converted to UTF-8 if it is not - in this format. - Create an instance of this with createIrrXMLReader(); - See IIrrXMLReader for description on how to use it. */ - typedef IIrrXMLReader<char, IXMLBase> IrrXMLReader; - - //! A UTF-16 xml parser. - /** This means that all character data will be returned in UTF-16 by this parser. - The file to read can be in any format, it will be converted to UTF-16 if it is not - in this format. - Create an instance of this with createIrrXMLReaderUTF16(); - See IIrrXMLReader for description on how to use it. */ - typedef IIrrXMLReader<char16, IXMLBase> IrrXMLReaderUTF16; - - //! A UTF-32 xml parser. - /** This means that all character data will be returned in UTF-32 by this parser. - The file to read can be in any format, it will be converted to UTF-32 if it is not - in this format. - Create an instance of this with createIrrXMLReaderUTF32(); - See IIrrXMLReader for description on how to use it. */ - typedef IIrrXMLReader<char32, IXMLBase> IrrXMLReaderUTF32; - - - //! Creates an instance of an UFT-8 or ASCII character xml parser. - /** This means that all character data will be returned in 8 bit ASCII or UTF-8. - The file to read can be in any format, it will be converted to UTF-8 if it is not in this format. - If you are using the Irrlicht Engine, it is better not to use this function but - IFileSystem::createXMLReaderUTF8() instead. - \param filename: Name of file to be opened. - \return Returns a pointer to the created xml parser. This pointer should be - deleted using 'delete' after no longer needed. Returns 0 if an error occured - and the file could not be opened. */ - IRRLICHT_API IrrXMLReader* IRRCALLCONV createIrrXMLReader(const char* filename); - - //! Creates an instance of an UFT-8 or ASCII character xml parser. - /** This means that all character data will be returned in 8 bit ASCII or UTF-8. The file to read can - be in any format, it will be converted to UTF-8 if it is not in this format. - If you are using the Irrlicht Engine, it is better not to use this function but - IFileSystem::createXMLReaderUTF8() instead. - \param file: Pointer to opened file, must have been opened in binary mode, e.g. - using fopen("foo.bar", "wb"); The file will not be closed after it has been read. - \return Returns a pointer to the created xml parser. This pointer should be - deleted using 'delete' after no longer needed. Returns 0 if an error occured - and the file could not be opened. */ - IRRLICHT_API IrrXMLReader* IRRCALLCONV createIrrXMLReader(FILE* file); - - //! Creates an instance of an UFT-8 or ASCII character xml parser. - /** This means that all character data will be returned in 8 bit ASCII or UTF-8. The file to read can - be in any format, it will be converted to UTF-8 if it is not in this format. - If you are using the Irrlicht Engine, it is better not to use this function but - IFileSystem::createXMLReaderUTF8() instead. - \param callback: Callback for file read abstraction. Implement your own - callback to make the xml parser read in other things than just files. See - IFileReadCallBack for more information about this. - \param deleteCallback: if true, the callback will be deleted after the file - has been read. Otherwise the caller si responsible for cleaning it up. - \return Returns a pointer to the created xml parser. This pointer should be - deleted using 'delete' after no longer needed. Returns 0 if an error occured - and the file could not be opened. */ - IRRLICHT_API IrrXMLReader* IRRCALLCONV createIrrXMLReader(IFileReadCallBack* callback, - bool deleteCallback = false); - - //! Creates an instance of an UFT-16 xml parser. - /** This means that - all character data will be returned in UTF-16. The file to read can - be in any format, it will be converted to UTF-16 if it is not in this format. - If you are using the Irrlicht Engine, it is better not to use this function but - IFileSystem::createXMLReader() instead. - \param filename: Name of file to be opened. - \return Returns a pointer to the created xml parser. This pointer should be - deleted using 'delete' after no longer needed. Returns 0 if an error occured - and the file could not be opened. */ - IRRLICHT_API IrrXMLReaderUTF16* IRRCALLCONV createIrrXMLReaderUTF16(const char* filename); - - //! Creates an instance of an UFT-16 xml parser. - /** This means that all character data will be returned in UTF-16. The file to read can - be in any format, it will be converted to UTF-16 if it is not in this format. - If you are using the Irrlicht Engine, it is better not to use this function but - IFileSystem::createXMLReader() instead. - \param file: Pointer to opened file, must have been opened in binary mode, e.g. - using fopen("foo.bar", "wb"); The file will not be closed after it has been read. - \return Returns a pointer to the created xml parser. This pointer should be - deleted using 'delete' after no longer needed. Returns 0 if an error occured - and the file could not be opened. */ - IRRLICHT_API IrrXMLReaderUTF16* IRRCALLCONV createIrrXMLReaderUTF16(FILE* file); - - //! Creates an instance of an UFT-16 xml parser. - /** This means that all character data will be returned in UTF-16. The file to read can - be in any format, it will be converted to UTF-16 if it is not in this format. - If you are using the Irrlicht Engine, it is better not to use this function but - IFileSystem::createXMLReader() instead. - \param callback: Callback for file read abstraction. Implement your own - callback to make the xml parser read in other things than just files. See - IFileReadCallBack for more information about this. - \param deleteCallback: if true, the callback will be deleted after the file - has been read. Otherwise the caller si responsible for cleaning it up. - \return Returns a pointer to the created xml parser. This pointer should be - deleted using 'delete' after no longer needed. Returns 0 if an error occured - and the file could not be opened. */ - IRRLICHT_API IrrXMLReaderUTF16* IRRCALLCONV createIrrXMLReaderUTF16(IFileReadCallBack* callback, - bool deleteCallback = false); - - - //! Creates an instance of an UFT-32 xml parser. - /** This means that all character data will be returned in UTF-32. The file to read can - be in any format, it will be converted to UTF-32 if it is not in this format. - If you are using the Irrlicht Engine, it is better not to use this function but - IFileSystem::createXMLReader() instead. - \param filename: Name of file to be opened. - \return Returns a pointer to the created xml parser. This pointer should be - deleted using 'delete' after no longer needed. Returns 0 if an error occured - and the file could not be opened. */ - IRRLICHT_API IrrXMLReaderUTF32* IRRCALLCONV createIrrXMLReaderUTF32(const char* filename); - - //! Creates an instance of an UFT-32 xml parser. - /** This means that all character data will be returned in UTF-32. The file to read can - be in any format, it will be converted to UTF-32 if it is not in this format. - if you are using the Irrlicht Engine, it is better not to use this function but - IFileSystem::createXMLReader() instead. - \param file: Pointer to opened file, must have been opened in binary mode, e.g. - using fopen("foo.bar", "wb"); The file will not be closed after it has been read. - \return Returns a pointer to the created xml parser. This pointer should be - deleted using 'delete' after no longer needed. Returns 0 if an error occured - and the file could not be opened. */ - IRRLICHT_API IrrXMLReaderUTF32* IRRCALLCONV createIrrXMLReaderUTF32(FILE* file); - - //! Creates an instance of an UFT-32 xml parser. - /** This means that - all character data will be returned in UTF-32. The file to read can - be in any format, it will be converted to UTF-32 if it is not in this format. - If you are using the Irrlicht Engine, it is better not to use this function but - IFileSystem::createXMLReader() instead. - \param callback: Callback for file read abstraction. Implement your own - callback to make the xml parser read in other things than just files. See - IFileReadCallBack for more information about this. - \param deleteCallback: if true, the callback will be deleted after the file - has been read. Otherwise the caller si responsible for cleaning it up. - \return Returns a pointer to the created xml parser. This pointer should be - deleted using 'delete' after no longer needed. Returns 0 if an error occured - and the file could not be opened. */ - IRRLICHT_API IrrXMLReaderUTF32* IRRCALLCONV createIrrXMLReaderUTF32(IFileReadCallBack* callback, - bool deleteCallback = false); - - - /*! \file irrXML.h - \brief Header file of the irrXML, the Irrlicht XML parser. - - This file includes everything needed for using irrXML, - the XML parser of the Irrlicht Engine. To use irrXML, - you only need to include this file in your project: - - \code - #include <irrXML.h> - \endcode - - It is also common to use the two namespaces in which irrXML is included, - directly after including irrXML.h: - - \code - #include <irrXML.h> - using namespace irr; - using namespace io; - \endcode - */ - -} // end namespace io -} // end namespace irr - -#endif // __IRR_XML_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/irrlicht.h b/builddir/irrlicht-1.8.1/include/irrlicht.h deleted file mode 100644 index 184c896..0000000 --- a/builddir/irrlicht-1.8.1/include/irrlicht.h +++ /dev/null @@ -1,394 +0,0 @@ -/* irrlicht.h -- interface of the 'Irrlicht Engine' - - Copyright (C) 2002-2012 Nikolaus Gebhardt - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Please note that the Irrlicht Engine is based in part on the work of the - Independent JPEG Group, the zlib and the libPng. This means that if you use - the Irrlicht Engine in your product, you must acknowledge somewhere in your - documentation that you've used the IJG code. It would also be nice to mention - that you use the Irrlicht Engine, the zlib and libPng. See the README files - in the jpeglib, the zlib and libPng for further informations. -*/ - -#ifndef __IRRLICHT_H_INCLUDED__ -#define __IRRLICHT_H_INCLUDED__ - -#include "IrrCompileConfig.h" -#include "aabbox3d.h" -#include "CDynamicMeshBuffer.h" -#include "CIndexBuffer.h" -#include "CMeshBuffer.h" -#include "coreutil.h" -#include "CVertexBuffer.h" -#include "dimension2d.h" -#include "ECullingTypes.h" -#include "EDebugSceneTypes.h" -#include "EDriverFeatures.h" -#include "EDriverTypes.h" -#include "EGUIAlignment.h" -#include "EGUIElementTypes.h" -#include "EHardwareBufferFlags.h" -#include "EMaterialFlags.h" -#include "EMaterialTypes.h" -#include "EMeshWriterEnums.h" -#include "EMessageBoxFlags.h" -#include "ESceneNodeAnimatorTypes.h" -#include "ESceneNodeTypes.h" -#include "ETerrainElements.h" -#include "fast_atof.h" -#include "heapsort.h" -#include "IAnimatedMesh.h" -#include "IAnimatedMeshMD2.h" -#include "IAnimatedMeshMD3.h" -#include "IAnimatedMeshSceneNode.h" -#include "IAttributeExchangingObject.h" -#include "IAttributes.h" -#include "IBillboardSceneNode.h" -#include "IBillboardTextSceneNode.h" -#include "IBoneSceneNode.h" -#include "ICameraSceneNode.h" -#include "ICursorControl.h" -#include "IDummyTransformationSceneNode.h" -#include "IDynamicMeshBuffer.h" -#include "IEventReceiver.h" -#include "IFileList.h" -#include "IFileSystem.h" -#include "IGeometryCreator.h" -#include "IGPUProgrammingServices.h" -#include "IGUIButton.h" -#include "IGUICheckBox.h" -#include "IGUIColorSelectDialog.h" -#include "IGUIComboBox.h" -#include "IGUIContextMenu.h" -#include "IGUIEditBox.h" -#include "IGUIElement.h" -#include "IGUIElementFactory.h" -#include "IGUIEnvironment.h" -#include "IGUIFileOpenDialog.h" -#include "IGUIFont.h" -#include "IGUIFontBitmap.h" -#include "IGUIImage.h" -#include "IGUIInOutFader.h" -#include "IGUIListBox.h" -#include "IGUIMeshViewer.h" -#include "IGUIScrollBar.h" -#include "IGUISkin.h" -#include "IGUISpinBox.h" -#include "IGUISpriteBank.h" -#include "IGUIStaticText.h" -#include "IGUITabControl.h" -#include "IGUITable.h" -#include "IGUIToolbar.h" -#include "IGUIWindow.h" -#include "IGUITreeView.h" -#include "IImage.h" -#include "IImageLoader.h" -#include "IImageWriter.h" -#include "IIndexBuffer.h" -#include "ILightSceneNode.h" -#include "ILogger.h" -#include "IMaterialRenderer.h" -#include "IMaterialRendererServices.h" -#include "IMesh.h" -#include "IMeshBuffer.h" -#include "IMeshCache.h" -#include "IMeshLoader.h" -#include "IMeshManipulator.h" -#include "IMeshSceneNode.h" -#include "IMeshWriter.h" -#include "IColladaMeshWriter.h" -#include "IMetaTriangleSelector.h" -#include "IOSOperator.h" -#include "IParticleSystemSceneNode.h" // also includes all emitters and attractors -#include "IQ3LevelMesh.h" -#include "IQ3Shader.h" -#include "IReadFile.h" -#include "IReferenceCounted.h" -#include "irrArray.h" -#include "IRandomizer.h" -#include "IrrlichtDevice.h" -#include "irrList.h" -#include "irrMap.h" -#include "irrMath.h" -#include "irrString.h" -#include "irrTypes.h" -#include "path.h" -#include "irrXML.h" -#include "ISceneCollisionManager.h" -#include "ISceneLoader.h" -#include "ISceneManager.h" -#include "ISceneNode.h" -#include "ISceneNodeAnimator.h" -#include "ISceneNodeAnimatorCameraFPS.h" -#include "ISceneNodeAnimatorCameraMaya.h" -#include "ISceneNodeAnimatorCollisionResponse.h" -#include "ISceneNodeAnimatorFactory.h" -#include "ISceneNodeFactory.h" -#include "ISceneUserDataSerializer.h" -#include "IShaderConstantSetCallBack.h" -#include "IShadowVolumeSceneNode.h" -#include "ISkinnedMesh.h" -#include "ITerrainSceneNode.h" -#include "ITextSceneNode.h" -#include "ITexture.h" -#include "ITimer.h" -#include "ITriangleSelector.h" -#include "IVertexBuffer.h" -#include "IVideoDriver.h" -#include "IVideoModeList.h" -#include "IVolumeLightSceneNode.h" -#include "IWriteFile.h" -#include "IXMLReader.h" -#include "IXMLWriter.h" -#include "ILightManager.h" -#include "Keycodes.h" -#include "line2d.h" -#include "line3d.h" -#include "matrix4.h" -#include "plane3d.h" -#include "position2d.h" -#include "quaternion.h" -#include "rect.h" -#include "S3DVertex.h" -#include "SAnimatedMesh.h" -#include "SceneParameters.h" -#include "SColor.h" -#include "SExposedVideoData.h" -#include "SIrrCreationParameters.h" -#include "SKeyMap.h" -#include "SLight.h" -#include "SMaterial.h" -#include "SMesh.h" -#include "SMeshBuffer.h" -#include "SMeshBufferLightMap.h" -#include "SMeshBufferTangents.h" -#include "SParticle.h" -#include "SSharedMeshBuffer.h" -#include "SSkinMeshBuffer.h" -#include "SVertexIndex.h" -#include "SViewFrustum.h" -#include "triangle3d.h" -#include "vector2d.h" -#include "vector3d.h" - -/*! \mainpage Irrlicht Engine 1.8 API documentation - * - * <div align="center"><img src="logobig.png" ></div> - * - * \section intro Introduction - * - * Welcome to the Irrlicht Engine API documentation. - * Here you'll find any information you'll need to develop applications with - * the Irrlicht Engine. If you are looking for a tutorial on how to start, you'll - * find some on the homepage of the Irrlicht Engine at - * <A HREF="http://irrlicht.sourceforge.net" >irrlicht.sourceforge.net</A> - * or inside the SDK in the examples directory. - * - * The Irrlicht Engine is intended to be an easy-to-use 3d engine, so - * this documentation is an important part of it. If you have any questions or - * suggestions, just send a email to the author of the engine, Nikolaus Gebhardt - * (niko (at) irrlicht3d.org). - * - * - * \section links Links - * - * <A HREF="namespaces.html">Namespaces</A>: A very good place to start reading - * the documentation.<BR> - * <A HREF="annotated.html">Class list</A>: List of all classes with descriptions.<BR> - * <A HREF="functions.html">Class members</A>: Good place to find forgotten features.<BR> - * - * \section irrexample Short example - * - * A simple application, starting up the engine, loading a Quake 2 animated - * model file and the corresponding texture, animating and displaying it - * in front of a blue background and placing a user controlable 3d camera - * would look like the following code. I think this example shows the usage - * of the engine quite well: - * - * \code - * #include <irrlicht.h> - * using namespace irr; - * - * int main() - * { - * // start up the engine - * IrrlichtDevice *device = createDevice(video::EDT_DIRECT3D8, - * core::dimension2d<u32>(640,480)); - * - * video::IVideoDriver* driver = device->getVideoDriver(); - * scene::ISceneManager* scenemgr = device->getSceneManager(); - * - * device->setWindowCaption(L"Hello World!"); - * - * // load and show quake2 .md2 model - * scene::ISceneNode* node = scenemgr->addAnimatedMeshSceneNode( - * scenemgr->getMesh("quake2model.md2")); - * - * // if everything worked, add a texture and disable lighting - * if (node) - * { - * node->setMaterialTexture(0, driver->getTexture("texture.bmp")); - * node->setMaterialFlag(video::EMF_LIGHTING, false); - * } - * - * // add a first person shooter style user controlled camera - * scenemgr->addCameraSceneNodeFPS(); - * - * // draw everything - * while(device->run() && driver) - * { - * driver->beginScene(true, true, video::SColor(255,0,0,255)); - * scenemgr->drawAll(); - * driver->endScene(); - * } - * - * // delete device - * device->drop(); - * return 0; - * } - * \endcode - * - * Irrlicht can load a lot of file formats automaticly, see irr::scene::ISceneManager::getMesh() - * for a detailed list. So if you would like to replace the simple blue screen background by - * a cool Quake 3 Map, optimized by an octree, just insert this code - * somewhere before the while loop: - * - * \code - * // add .pk3 archive to the file system - * device->getFileSystem()->addZipFileArchive("quake3map.pk3"); - * - * // load .bsp file and show it using an octree - * scenemgr->addOctreeSceneNode( - * scenemgr->getMesh("quake3map.bsp")); - * \endcode - * - * As you can see, the engine uses namespaces. Everything in the engine is - * placed into the namespace 'irr', but there are also 5 sub namespaces. - * You can find a list of all namespaces with descriptions at the - * <A HREF="namespaces.html"> namespaces page</A>. - * This is also a good place to start reading the documentation. If you - * don't want to write the namespace names all the time, just use all namespaces like - * this: - * \code - * using namespace core; - * using namespace scene; - * using namespace video; - * using namespace io; - * using namespace gui; - * \endcode - * - * There is a lot more the engine can do, but I hope this gave a short - * overview over the basic features of the engine. For more examples, please take - * a look into the examples directory of the SDK. - */ - -#include "SIrrCreationParameters.h" - -//! Everything in the Irrlicht Engine can be found in this namespace. -namespace irr -{ - //! Creates an Irrlicht device. The Irrlicht device is the root object for using the engine. - /** If you need more parameters to be passed to the creation of the Irrlicht Engine device, - use the createDeviceEx() function. - \param deviceType: Type of the device. This can currently be video::EDT_NULL, - video::EDT_SOFTWARE, video::EDT_BURNINGSVIDEO, video::EDT_DIRECT3D8, video::EDT_DIRECT3D9 and video::EDT_OPENGL. - \param windowSize: Size of the window or the video mode in fullscreen mode. - \param bits: Bits per pixel in fullscreen mode. Ignored if windowed mode. - \param fullscreen: Should be set to true if the device should run in fullscreen. Otherwise - the device runs in windowed mode. - \param stencilbuffer: Specifies if the stencil buffer should be enabled. Set this to true, - if you want the engine be able to draw stencil buffer shadows. Note that not all - devices are able to use the stencil buffer. If they don't no shadows will be drawn. - \param vsync: Specifies vertical syncronisation: If set to true, the driver will wait - for the vertical retrace period, otherwise not. - \param receiver: A user created event receiver. - \return Returns pointer to the created IrrlichtDevice or null if the - device could not be created. - */ - extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDevice( - video::E_DRIVER_TYPE deviceType = video::EDT_SOFTWARE, - // parantheses are necessary for some compilers - const core::dimension2d<u32>& windowSize = (core::dimension2d<u32>(640,480)), - u32 bits = 16, - bool fullscreen = false, - bool stencilbuffer = false, - bool vsync = false, - IEventReceiver* receiver = 0); - - //! typedef for Function Pointer - typedef IrrlichtDevice* (IRRCALLCONV *funcptr_createDevice )( - video::E_DRIVER_TYPE deviceType, - const core::dimension2d<u32>& windowSize, - u32 bits, - bool fullscreen, - bool stencilbuffer, - bool vsync, - IEventReceiver* receiver); - - - //! Creates an Irrlicht device with the option to specify advanced parameters. - /** Usually you should used createDevice() for creating an Irrlicht Engine device. - Use this function only if you wish to specify advanced parameters like a window - handle in which the device should be created. - \param parameters: Structure containing advanced parameters for the creation of the device. - See irr::SIrrlichtCreationParameters for details. - \return Returns pointer to the created IrrlichtDevice or null if the - device could not be created. */ - extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDeviceEx( - const SIrrlichtCreationParameters& parameters); - - //! typedef for Function Pointer - typedef IrrlichtDevice* (IRRCALLCONV *funcptr_createDeviceEx )( const SIrrlichtCreationParameters& parameters ); - - - // THE FOLLOWING IS AN EMPTY LIST OF ALL SUB NAMESPACES - // EXISTING ONLY FOR THE DOCUMENTATION SOFTWARE DOXYGEN. - - //! Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace. - namespace core - { - } - - //! The gui namespace contains useful classes for easy creation of a graphical user interface. - namespace gui - { - } - - //! This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ... - namespace io - { - } - - //! All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ... - namespace scene - { - } - - //! The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here. - namespace video - { - } -} - -/*! \file irrlicht.h - \brief Main header file of the irrlicht, the only file needed to include. -*/ - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/irrpack.h b/builddir/irrlicht-1.8.1/include/irrpack.h deleted file mode 100644 index 29a16fe..0000000 --- a/builddir/irrlicht-1.8.1/include/irrpack.h +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (C) 2007-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -// include this file right before the data structures to be 1-aligned -// and add to each structure the PACK_STRUCT define just like this: -// struct mystruct -// { -// ... -// } PACK_STRUCT; -// Always include the irrunpack.h file right after the last type declared -// like this, and do not put any other types with different alignment -// in between! - -// byte-align structures -#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) -# pragma warning(disable: 4103) -# pragma pack( push, packing ) -# pragma pack( 1 ) -# define PACK_STRUCT -#elif defined( __DMC__ ) -# pragma pack( push, 1 ) -# define PACK_STRUCT -#elif defined( __GNUC__ ) - // Using pragma pack might work with earlier gcc versions already, but - // it started to be necessary with gcc 4.7 on mingw unless compiled with -mno-ms-bitfields. - // And I found some hints on the web that older gcc versions on the other hand had sometimes - // trouble with pragma pack while they worked with __attribute__((packed)). -# if (__GNUC__ >= 4 ) && (__GNUC_MINOR__ >= 7) -# pragma pack( push, packing ) -# pragma pack( 1 ) -# define PACK_STRUCT -# else -# define PACK_STRUCT __attribute__((packed)) - #endif -#else -# error compiler not supported -#endif - diff --git a/builddir/irrlicht-1.8.1/include/irrunpack.h b/builddir/irrlicht-1.8.1/include/irrunpack.h deleted file mode 100644 index 80a5a69..0000000 --- a/builddir/irrlicht-1.8.1/include/irrunpack.h +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (C) 2007-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -// include this file to switch back to default alignment -// file belongs to irrpack.h, see there for more info - -// Default alignment -#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) -# pragma pack( pop, packing ) -#elif defined (__DMC__) -# pragma pack( pop ) -#elif defined( __GNUC__ ) -# if (__GNUC__ >= 4 ) && (__GNUC_MINOR__ >= 7) -# pragma pack( pop, packing ) -# endif -#endif - -#undef PACK_STRUCT - diff --git a/builddir/irrlicht-1.8.1/include/line2d.h b/builddir/irrlicht-1.8.1/include/line2d.h deleted file mode 100644 index 22590dc..0000000 --- a/builddir/irrlicht-1.8.1/include/line2d.h +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_LINE_2D_H_INCLUDED__ -#define __IRR_LINE_2D_H_INCLUDED__ - -#include "irrTypes.h" -#include "vector2d.h" - -namespace irr -{ -namespace core -{ - -//! 2D line between two points with intersection methods. -template <class T> -class line2d -{ - public: - //! Default constructor for line going from (0,0) to (1,1). - line2d() : start(0,0), end(1,1) {} - //! Constructor for line between the two points. - line2d(T xa, T ya, T xb, T yb) : start(xa, ya), end(xb, yb) {} - //! Constructor for line between the two points given as vectors. - line2d(const vector2d<T>& start, const vector2d<T>& end) : start(start), end(end) {} - //! Copy constructor. - line2d(const line2d<T>& other) : start(other.start), end(other.end) {} - - // operators - - line2d<T> operator+(const vector2d<T>& point) const { return line2d<T>(start + point, end + point); } - line2d<T>& operator+=(const vector2d<T>& point) { start += point; end += point; return *this; } - - line2d<T> operator-(const vector2d<T>& point) const { return line2d<T>(start - point, end - point); } - line2d<T>& operator-=(const vector2d<T>& point) { start -= point; end -= point; return *this; } - - bool operator==(const line2d<T>& other) const - { return (start==other.start && end==other.end) || (end==other.start && start==other.end);} - bool operator!=(const line2d<T>& other) const - { return !(start==other.start && end==other.end) || (end==other.start && start==other.end);} - - // functions - //! Set this line to new line going through the two points. - void setLine(const T& xa, const T& ya, const T& xb, const T& yb){start.set(xa, ya); end.set(xb, yb);} - //! Set this line to new line going through the two points. - void setLine(const vector2d<T>& nstart, const vector2d<T>& nend){start.set(nstart); end.set(nend);} - //! Set this line to new line given as parameter. - void setLine(const line2d<T>& line){start.set(line.start); end.set(line.end);} - - //! Get length of line - /** \return Length of the line. */ - T getLength() const { return start.getDistanceFrom(end); } - - //! Get squared length of the line - /** \return Squared length of line. */ - T getLengthSQ() const { return start.getDistanceFromSQ(end); } - - //! Get middle of the line - /** \return center of the line. */ - vector2d<T> getMiddle() const - { - return (start + end)/(T)2; - } - - //! Get the vector of the line. - /** \return The vector of the line. */ - vector2d<T> getVector() const { return vector2d<T>(end.X - start.X, end.Y - start.Y); } - - //! Tests if this line intersects with another line. - /** \param l: Other line to test intersection with. - \param checkOnlySegments: Default is to check intersection between the begin and endpoints. - When set to false the function will check for the first intersection point when extending the lines. - \param out: If there is an intersection, the location of the - intersection will be stored in this vector. - \return True if there is an intersection, false if not. */ - bool intersectWith(const line2d<T>& l, vector2d<T>& out, bool checkOnlySegments=true) const - { - // Uses the method given at: - // http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/ - const f32 commonDenominator = (f32)(l.end.Y - l.start.Y)*(end.X - start.X) - - (l.end.X - l.start.X)*(end.Y - start.Y); - - const f32 numeratorA = (f32)(l.end.X - l.start.X)*(start.Y - l.start.Y) - - (l.end.Y - l.start.Y)*(start.X -l.start.X); - - const f32 numeratorB = (f32)(end.X - start.X)*(start.Y - l.start.Y) - - (end.Y - start.Y)*(start.X -l.start.X); - - if(equals(commonDenominator, 0.f)) - { - // The lines are either coincident or parallel - // if both numerators are 0, the lines are coincident - if(equals(numeratorA, 0.f) && equals(numeratorB, 0.f)) - { - // Try and find a common endpoint - if(l.start == start || l.end == start) - out = start; - else if(l.end == end || l.start == end) - out = end; - // now check if the two segments are disjunct - else if (l.start.X>start.X && l.end.X>start.X && l.start.X>end.X && l.end.X>end.X) - return false; - else if (l.start.Y>start.Y && l.end.Y>start.Y && l.start.Y>end.Y && l.end.Y>end.Y) - return false; - else if (l.start.X<start.X && l.end.X<start.X && l.start.X<end.X && l.end.X<end.X) - return false; - else if (l.start.Y<start.Y && l.end.Y<start.Y && l.start.Y<end.Y && l.end.Y<end.Y) - return false; - // else the lines are overlapping to some extent - else - { - // find the points which are not contributing to the - // common part - vector2d<T> maxp; - vector2d<T> minp; - if ((start.X>l.start.X && start.X>l.end.X && start.X>end.X) || (start.Y>l.start.Y && start.Y>l.end.Y && start.Y>end.Y)) - maxp=start; - else if ((end.X>l.start.X && end.X>l.end.X && end.X>start.X) || (end.Y>l.start.Y && end.Y>l.end.Y && end.Y>start.Y)) - maxp=end; - else if ((l.start.X>start.X && l.start.X>l.end.X && l.start.X>end.X) || (l.start.Y>start.Y && l.start.Y>l.end.Y && l.start.Y>end.Y)) - maxp=l.start; - else - maxp=l.end; - if (maxp != start && ((start.X<l.start.X && start.X<l.end.X && start.X<end.X) || (start.Y<l.start.Y && start.Y<l.end.Y && start.Y<end.Y))) - minp=start; - else if (maxp != end && ((end.X<l.start.X && end.X<l.end.X && end.X<start.X) || (end.Y<l.start.Y && end.Y<l.end.Y && end.Y<start.Y))) - minp=end; - else if (maxp != l.start && ((l.start.X<start.X && l.start.X<l.end.X && l.start.X<end.X) || (l.start.Y<start.Y && l.start.Y<l.end.Y && l.start.Y<end.Y))) - minp=l.start; - else - minp=l.end; - - // one line is contained in the other. Pick the center - // of the remaining points, which overlap for sure - out = core::vector2d<T>(); - if (start != maxp && start != minp) - out += start; - if (end != maxp && end != minp) - out += end; - if (l.start != maxp && l.start != minp) - out += l.start; - if (l.end != maxp && l.end != minp) - out += l.end; - out.X = (T)(out.X/2); - out.Y = (T)(out.Y/2); - } - - return true; // coincident - } - - return false; // parallel - } - - // Get the point of intersection on this line, checking that - // it is within the line segment. - const f32 uA = numeratorA / commonDenominator; - if(checkOnlySegments && (uA < 0.f || uA > 1.f) ) - return false; // Outside the line segment - - const f32 uB = numeratorB / commonDenominator; - if(checkOnlySegments && (uB < 0.f || uB > 1.f)) - return false; // Outside the line segment - - // Calculate the intersection point. - out.X = (T)(start.X + uA * (end.X - start.X)); - out.Y = (T)(start.Y + uA * (end.Y - start.Y)); - return true; - } - - //! Get unit vector of the line. - /** \return Unit vector of this line. */ - vector2d<T> getUnitVector() const - { - T len = (T)(1.0 / getLength()); - return vector2d<T>((end.X - start.X) * len, (end.Y - start.Y) * len); - } - - //! Get angle between this line and given line. - /** \param l Other line for test. - \return Angle in degrees. */ - f64 getAngleWith(const line2d<T>& l) const - { - vector2d<T> vect = getVector(); - vector2d<T> vect2 = l.getVector(); - return vect.getAngleWith(vect2); - } - - //! Tells us if the given point lies to the left, right, or on the line. - /** \return 0 if the point is on the line - <0 if to the left, or >0 if to the right. */ - T getPointOrientation(const vector2d<T>& point) const - { - return ( (end.X - start.X) * (point.Y - start.Y) - - (point.X - start.X) * (end.Y - start.Y) ); - } - - //! Check if the given point is a member of the line - /** \return True if point is between start and end, else false. */ - bool isPointOnLine(const vector2d<T>& point) const - { - T d = getPointOrientation(point); - return (d == 0 && point.isBetweenPoints(start, end)); - } - - //! Check if the given point is between start and end of the line. - /** Assumes that the point is already somewhere on the line. */ - bool isPointBetweenStartAndEnd(const vector2d<T>& point) const - { - return point.isBetweenPoints(start, end); - } - - //! Get the closest point on this line to a point - /** \param checkOnlySegments: Default (true) is to return a point on the line-segment (between begin and end) of the line. - When set to false the function will check for the first the closest point on the the line even when outside the segment. */ - vector2d<T> getClosestPoint(const vector2d<T>& point, bool checkOnlySegments=true) const - { - vector2d<f64> c((f64)(point.X-start.X), (f64)(point.Y- start.Y)); - vector2d<f64> v((f64)(end.X-start.X), (f64)(end.Y-start.Y)); - f64 d = v.getLength(); - if ( d == 0 ) // can't tell much when the line is just a single point - return start; - v /= d; - f64 t = v.dotProduct(c); - - if ( checkOnlySegments ) - { - if (t < 0) return vector2d<T>((T)start.X, (T)start.Y); - if (t > d) return vector2d<T>((T)end.X, (T)end.Y); - } - - v *= t; - return vector2d<T>((T)(start.X + v.X), (T)(start.Y + v.Y)); - } - - //! Start point of the line. - vector2d<T> start; - //! End point of the line. - vector2d<T> end; -}; - - // partial specialization to optimize <f32> lines (avoiding casts) - template <> - inline vector2df line2d<irr::f32>::getClosestPoint(const vector2df& point, bool checkOnlySegments) const - { - vector2df c = point - start; - vector2df v = end - start; - f32 d = (f32)v.getLength(); - if ( d == 0 ) // can't tell much when the line is just a single point - return start; - v /= d; - f32 t = v.dotProduct(c); - - if ( checkOnlySegments ) - { - if (t < 0) return start; - if (t > d) return end; - } - - v *= t; - return start + v; - } - - - //! Typedef for an f32 line. - typedef line2d<f32> line2df; - //! Typedef for an integer line. - typedef line2d<s32> line2di; - -} // end namespace core -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/line3d.h b/builddir/irrlicht-1.8.1/include/line3d.h deleted file mode 100644 index 5e1437a..0000000 --- a/builddir/irrlicht-1.8.1/include/line3d.h +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_LINE_3D_H_INCLUDED__ -#define __IRR_LINE_3D_H_INCLUDED__ - -#include "irrTypes.h" -#include "vector3d.h" - -namespace irr -{ -namespace core -{ - -//! 3D line between two points with intersection methods. -template <class T> -class line3d -{ - public: - - //! Default constructor - /** line from (0,0,0) to (1,1,1) */ - line3d() : start(0,0,0), end(1,1,1) {} - //! Constructor with two points - line3d(T xa, T ya, T za, T xb, T yb, T zb) : start(xa, ya, za), end(xb, yb, zb) {} - //! Constructor with two points as vectors - line3d(const vector3d<T>& start, const vector3d<T>& end) : start(start), end(end) {} - - // operators - - line3d<T> operator+(const vector3d<T>& point) const { return line3d<T>(start + point, end + point); } - line3d<T>& operator+=(const vector3d<T>& point) { start += point; end += point; return *this; } - - line3d<T> operator-(const vector3d<T>& point) const { return line3d<T>(start - point, end - point); } - line3d<T>& operator-=(const vector3d<T>& point) { start -= point; end -= point; return *this; } - - bool operator==(const line3d<T>& other) const - { return (start==other.start && end==other.end) || (end==other.start && start==other.end);} - bool operator!=(const line3d<T>& other) const - { return !(start==other.start && end==other.end) || (end==other.start && start==other.end);} - - // functions - //! Set this line to a new line going through the two points. - void setLine(const T& xa, const T& ya, const T& za, const T& xb, const T& yb, const T& zb) - {start.set(xa, ya, za); end.set(xb, yb, zb);} - //! Set this line to a new line going through the two points. - void setLine(const vector3d<T>& nstart, const vector3d<T>& nend) - {start.set(nstart); end.set(nend);} - //! Set this line to new line given as parameter. - void setLine(const line3d<T>& line) - {start.set(line.start); end.set(line.end);} - - //! Get length of line - /** \return Length of line. */ - T getLength() const { return start.getDistanceFrom(end); } - - //! Get squared length of line - /** \return Squared length of line. */ - T getLengthSQ() const { return start.getDistanceFromSQ(end); } - - //! Get middle of line - /** \return Center of line. */ - vector3d<T> getMiddle() const - { - return (start + end)/(T)2; - } - - //! Get vector of line - /** \return vector of line. */ - vector3d<T> getVector() const - { - return end - start; - } - - //! Check if the given point is between start and end of the line. - /** Assumes that the point is already somewhere on the line. - \param point The point to test. - \return True if point is on the line between start and end, else false. - */ - bool isPointBetweenStartAndEnd(const vector3d<T>& point) const - { - return point.isBetweenPoints(start, end); - } - - //! Get the closest point on this line to a point - /** \param point The point to compare to. - \return The nearest point which is part of the line. */ - vector3d<T> getClosestPoint(const vector3d<T>& point) const - { - vector3d<T> c = point - start; - vector3d<T> v = end - start; - T d = (T)v.getLength(); - v /= d; - T t = v.dotProduct(c); - - if (t < (T)0.0) - return start; - if (t > d) - return end; - - v *= t; - return start + v; - } - - //! Check if the line intersects with a shpere - /** \param sorigin: Origin of the shpere. - \param sradius: Radius of the sphere. - \param outdistance: The distance to the first intersection point. - \return True if there is an intersection. - If there is one, the distance to the first intersection point - is stored in outdistance. */ - bool getIntersectionWithSphere(vector3d<T> sorigin, T sradius, f64& outdistance) const - { - const vector3d<T> q = sorigin - start; - T c = q.getLength(); - T v = q.dotProduct(getVector().normalize()); - T d = sradius * sradius - (c*c - v*v); - - if (d < 0.0) - return false; - - outdistance = v - core::squareroot ( d ); - return true; - } - - // member variables - - //! Start point of line - vector3d<T> start; - //! End point of line - vector3d<T> end; -}; - - //! Typedef for an f32 line. - typedef line3d<f32> line3df; - //! Typedef for an integer line. - typedef line3d<s32> line3di; - -} // end namespace core -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/matrix4.h b/builddir/irrlicht-1.8.1/include/matrix4.h deleted file mode 100644 index b04827f..0000000 --- a/builddir/irrlicht-1.8.1/include/matrix4.h +++ /dev/null @@ -1,2242 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_MATRIX_H_INCLUDED__ -#define __IRR_MATRIX_H_INCLUDED__ - -#include "irrMath.h" -#include "vector3d.h" -#include "vector2d.h" -#include "plane3d.h" -#include "aabbox3d.h" -#include "rect.h" -#include "irrString.h" - -// enable this to keep track of changes to the matrix -// and make simpler identity check for seldomly changing matrices -// otherwise identity check will always compare the elements -//#define USE_MATRIX_TEST - -// this is only for debugging purposes -//#define USE_MATRIX_TEST_DEBUG - -#if defined( USE_MATRIX_TEST_DEBUG ) - -struct MatrixTest -{ - MatrixTest () : ID(0), Calls(0) {} - char buf[256]; - int Calls; - int ID; -}; -static MatrixTest MTest; - -#endif - -namespace irr -{ -namespace core -{ - - //! 4x4 matrix. Mostly used as transformation matrix for 3d calculations. - /** The matrix is a D3D style matrix, row major with translations in the 4th row. */ - template <class T> - class CMatrix4 - { - public: - - //! Constructor Flags - enum eConstructor - { - EM4CONST_NOTHING = 0, - EM4CONST_COPY, - EM4CONST_IDENTITY, - EM4CONST_TRANSPOSED, - EM4CONST_INVERSE, - EM4CONST_INVERSE_TRANSPOSED - }; - - //! Default constructor - /** \param constructor Choose the initialization style */ - CMatrix4( eConstructor constructor = EM4CONST_IDENTITY ); - //! Copy constructor - /** \param other Other matrix to copy from - \param constructor Choose the initialization style */ - CMatrix4(const CMatrix4<T>& other, eConstructor constructor = EM4CONST_COPY); - - //! Simple operator for directly accessing every element of the matrix. - T& operator()(const s32 row, const s32 col) - { -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return M[ row * 4 + col ]; - } - - //! Simple operator for directly accessing every element of the matrix. - const T& operator()(const s32 row, const s32 col) const { return M[row * 4 + col]; } - - //! Simple operator for linearly accessing every element of the matrix. - T& operator[](u32 index) - { -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return M[index]; - } - - //! Simple operator for linearly accessing every element of the matrix. - const T& operator[](u32 index) const { return M[index]; } - - //! Sets this matrix equal to the other matrix. - inline CMatrix4<T>& operator=(const CMatrix4<T> &other); - - //! Sets all elements of this matrix to the value. - inline CMatrix4<T>& operator=(const T& scalar); - - //! Returns pointer to internal array - const T* pointer() const { return M; } - T* pointer() - { -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return M; - } - - //! Returns true if other matrix is equal to this matrix. - bool operator==(const CMatrix4<T> &other) const; - - //! Returns true if other matrix is not equal to this matrix. - bool operator!=(const CMatrix4<T> &other) const; - - //! Add another matrix. - CMatrix4<T> operator+(const CMatrix4<T>& other) const; - - //! Add another matrix. - CMatrix4<T>& operator+=(const CMatrix4<T>& other); - - //! Subtract another matrix. - CMatrix4<T> operator-(const CMatrix4<T>& other) const; - - //! Subtract another matrix. - CMatrix4<T>& operator-=(const CMatrix4<T>& other); - - //! set this matrix to the product of two matrices - /** Calculate b*a */ - inline CMatrix4<T>& setbyproduct(const CMatrix4<T>& other_a,const CMatrix4<T>& other_b ); - - //! Set this matrix to the product of two matrices - /** Calculate b*a, no optimization used, - use it if you know you never have a identity matrix */ - CMatrix4<T>& setbyproduct_nocheck(const CMatrix4<T>& other_a,const CMatrix4<T>& other_b ); - - //! Multiply by another matrix. - /** Calculate other*this */ - CMatrix4<T> operator*(const CMatrix4<T>& other) const; - - //! Multiply by another matrix. - /** Calculate and return other*this */ - CMatrix4<T>& operator*=(const CMatrix4<T>& other); - - //! Multiply by scalar. - CMatrix4<T> operator*(const T& scalar) const; - - //! Multiply by scalar. - CMatrix4<T>& operator*=(const T& scalar); - - //! Set matrix to identity. - inline CMatrix4<T>& makeIdentity(); - - //! Returns true if the matrix is the identity matrix - inline bool isIdentity() const; - - //! Returns true if the matrix is orthogonal - inline bool isOrthogonal() const; - - //! Returns true if the matrix is the identity matrix - bool isIdentity_integer_base () const; - - //! Set the translation of the current matrix. Will erase any previous values. - CMatrix4<T>& setTranslation( const vector3d<T>& translation ); - - //! Gets the current translation - vector3d<T> getTranslation() const; - - //! Set the inverse translation of the current matrix. Will erase any previous values. - CMatrix4<T>& setInverseTranslation( const vector3d<T>& translation ); - - //! Make a rotation matrix from Euler angles. The 4th row and column are unmodified. - inline CMatrix4<T>& setRotationRadians( const vector3d<T>& rotation ); - - //! Make a rotation matrix from Euler angles. The 4th row and column are unmodified. - CMatrix4<T>& setRotationDegrees( const vector3d<T>& rotation ); - - //! Returns the rotation, as set by setRotation(). - /** This code was orginally written by by Chev. */ - core::vector3d<T> getRotationDegrees() const; - - //! Make an inverted rotation matrix from Euler angles. - /** The 4th row and column are unmodified. */ - inline CMatrix4<T>& setInverseRotationRadians( const vector3d<T>& rotation ); - - //! Make an inverted rotation matrix from Euler angles. - /** The 4th row and column are unmodified. */ - inline CMatrix4<T>& setInverseRotationDegrees( const vector3d<T>& rotation ); - - //! Make a rotation matrix from angle and axis, assuming left handed rotation. - /** The 4th row and column are unmodified. */ - inline CMatrix4<T>& setRotationAxisRadians(const T& angle, const vector3d<T>& axis); - - //! Set Scale - CMatrix4<T>& setScale( const vector3d<T>& scale ); - - //! Set Scale - CMatrix4<T>& setScale( const T scale ) { return setScale(core::vector3d<T>(scale,scale,scale)); } - - //! Get Scale - core::vector3d<T> getScale() const; - - //! Translate a vector by the inverse of the translation part of this matrix. - void inverseTranslateVect( vector3df& vect ) const; - - //! Rotate a vector by the inverse of the rotation part of this matrix. - void inverseRotateVect( vector3df& vect ) const; - - //! Rotate a vector by the rotation part of this matrix. - void rotateVect( vector3df& vect ) const; - - //! An alternate transform vector method, writing into a second vector - void rotateVect(core::vector3df& out, const core::vector3df& in) const; - - //! An alternate transform vector method, writing into an array of 3 floats - void rotateVect(T *out,const core::vector3df &in) const; - - //! Transforms the vector by this matrix - void transformVect( vector3df& vect) const; - - //! Transforms input vector by this matrix and stores result in output vector - void transformVect( vector3df& out, const vector3df& in ) const; - - //! An alternate transform vector method, writing into an array of 4 floats - void transformVect(T *out,const core::vector3df &in) const; - - //! An alternate transform vector method, reading from and writing to an array of 3 floats - void transformVec3(T *out, const T * in) const; - - //! Translate a vector by the translation part of this matrix. - void translateVect( vector3df& vect ) const; - - //! Transforms a plane by this matrix - void transformPlane( core::plane3d<f32> &plane) const; - - //! Transforms a plane by this matrix - void transformPlane( const core::plane3d<f32> &in, core::plane3d<f32> &out) const; - - //! Transforms a axis aligned bounding box - /** The result box of this operation may not be accurate at all. For - correct results, use transformBoxEx() */ - void transformBox(core::aabbox3d<f32>& box) const; - - //! Transforms a axis aligned bounding box - /** The result box of this operation should by accurate, but this operation - is slower than transformBox(). */ - void transformBoxEx(core::aabbox3d<f32>& box) const; - - //! Multiplies this matrix by a 1x4 matrix - void multiplyWith1x4Matrix(T* matrix) const; - - //! Calculates inverse of matrix. Slow. - /** \return Returns false if there is no inverse matrix.*/ - bool makeInverse(); - - - //! Inverts a primitive matrix which only contains a translation and a rotation - /** \param out: where result matrix is written to. */ - bool getInversePrimitive ( CMatrix4<T>& out ) const; - - //! Gets the inversed matrix of this one - /** \param out: where result matrix is written to. - \return Returns false if there is no inverse matrix. */ - bool getInverse(CMatrix4<T>& out) const; - - //! Builds a right-handed perspective projection matrix based on a field of view - CMatrix4<T>& buildProjectionMatrixPerspectiveFovRH(f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 zFar); - - //! Builds a left-handed perspective projection matrix based on a field of view - CMatrix4<T>& buildProjectionMatrixPerspectiveFovLH(f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 zFar); - - //! Builds a left-handed perspective projection matrix based on a field of view, with far plane at infinity - CMatrix4<T>& buildProjectionMatrixPerspectiveFovInfinityLH(f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 epsilon=0); - - //! Builds a right-handed perspective projection matrix. - CMatrix4<T>& buildProjectionMatrixPerspectiveRH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar); - - //! Builds a left-handed perspective projection matrix. - CMatrix4<T>& buildProjectionMatrixPerspectiveLH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar); - - //! Builds a left-handed orthogonal projection matrix. - CMatrix4<T>& buildProjectionMatrixOrthoLH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar); - - //! Builds a right-handed orthogonal projection matrix. - CMatrix4<T>& buildProjectionMatrixOrthoRH(f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar); - - //! Builds a left-handed look-at matrix. - CMatrix4<T>& buildCameraLookAtMatrixLH( - const vector3df& position, - const vector3df& target, - const vector3df& upVector); - - //! Builds a right-handed look-at matrix. - CMatrix4<T>& buildCameraLookAtMatrixRH( - const vector3df& position, - const vector3df& target, - const vector3df& upVector); - - //! Builds a matrix that flattens geometry into a plane. - /** \param light: light source - \param plane: plane into which the geometry if flattened into - \param point: value between 0 and 1, describing the light source. - If this is 1, it is a point light, if it is 0, it is a directional light. */ - CMatrix4<T>& buildShadowMatrix(const core::vector3df& light, core::plane3df plane, f32 point=1.0f); - - //! Builds a matrix which transforms a normalized Device Coordinate to Device Coordinates. - /** Used to scale <-1,-1><1,1> to viewport, for example from <-1,-1> <1,1> to the viewport <0,0><0,640> */ - CMatrix4<T>& buildNDCToDCMatrix( const core::rect<s32>& area, f32 zScale); - - //! Creates a new matrix as interpolated matrix from two other ones. - /** \param b: other matrix to interpolate with - \param time: Must be a value between 0 and 1. */ - CMatrix4<T> interpolate(const core::CMatrix4<T>& b, f32 time) const; - - //! Gets transposed matrix - CMatrix4<T> getTransposed() const; - - //! Gets transposed matrix - inline void getTransposed( CMatrix4<T>& dest ) const; - - //! Builds a matrix that rotates from one vector to another - /** \param from: vector to rotate from - \param to: vector to rotate to - */ - CMatrix4<T>& buildRotateFromTo(const core::vector3df& from, const core::vector3df& to); - - //! Builds a combined matrix which translates to a center before rotation and translates from origin afterwards - /** \param center Position to rotate around - \param translate Translation applied after the rotation - */ - void setRotationCenter(const core::vector3df& center, const core::vector3df& translate); - - //! Builds a matrix which rotates a source vector to a look vector over an arbitrary axis - /** \param camPos: viewer position in world coo - \param center: object position in world-coo and rotation pivot - \param translation: object final translation from center - \param axis: axis to rotate about - \param from: source vector to rotate from - */ - void buildAxisAlignedBillboard(const core::vector3df& camPos, - const core::vector3df& center, - const core::vector3df& translation, - const core::vector3df& axis, - const core::vector3df& from); - - /* - construct 2D Texture transformations - rotate about center, scale, and transform. - */ - //! Set to a texture transformation matrix with the given parameters. - CMatrix4<T>& buildTextureTransform( f32 rotateRad, - const core::vector2df &rotatecenter, - const core::vector2df &translate, - const core::vector2df &scale); - - //! Set texture transformation rotation - /** Rotate about z axis, recenter at (0.5,0.5). - Doesn't clear other elements than those affected - \param radAngle Angle in radians - \return Altered matrix */ - CMatrix4<T>& setTextureRotationCenter( f32 radAngle ); - - //! Set texture transformation translation - /** Doesn't clear other elements than those affected. - \param x Offset on x axis - \param y Offset on y axis - \return Altered matrix */ - CMatrix4<T>& setTextureTranslate( f32 x, f32 y ); - - //! Set texture transformation translation, using a transposed representation - /** Doesn't clear other elements than those affected. - \param x Offset on x axis - \param y Offset on y axis - \return Altered matrix */ - CMatrix4<T>& setTextureTranslateTransposed( f32 x, f32 y ); - - //! Set texture transformation scale - /** Doesn't clear other elements than those affected. - \param sx Scale factor on x axis - \param sy Scale factor on y axis - \return Altered matrix. */ - CMatrix4<T>& setTextureScale( f32 sx, f32 sy ); - - //! Set texture transformation scale, and recenter at (0.5,0.5) - /** Doesn't clear other elements than those affected. - \param sx Scale factor on x axis - \param sy Scale factor on y axis - \return Altered matrix. */ - CMatrix4<T>& setTextureScaleCenter( f32 sx, f32 sy ); - - //! Sets all matrix data members at once - CMatrix4<T>& setM(const T* data); - - //! Sets if the matrix is definitely identity matrix - void setDefinitelyIdentityMatrix( bool isDefinitelyIdentityMatrix); - - //! Gets if the matrix is definitely identity matrix - bool getDefinitelyIdentityMatrix() const; - - //! Compare two matrices using the equal method - bool equals(const core::CMatrix4<T>& other, const T tolerance=(T)ROUNDING_ERROR_f64) const; - - private: - //! Matrix data, stored in row-major order - T M[16]; -#if defined ( USE_MATRIX_TEST ) - //! Flag is this matrix is identity matrix - mutable u32 definitelyIdentityMatrix; -#endif -#if defined ( USE_MATRIX_TEST_DEBUG ) - u32 id; - mutable u32 calls; -#endif - - }; - - // Default constructor - template <class T> - inline CMatrix4<T>::CMatrix4( eConstructor constructor ) -#if defined ( USE_MATRIX_TEST ) - : definitelyIdentityMatrix(BIT_UNTESTED) -#endif -#if defined ( USE_MATRIX_TEST_DEBUG ) - ,id ( MTest.ID++), calls ( 0 ) -#endif - { - switch ( constructor ) - { - case EM4CONST_NOTHING: - case EM4CONST_COPY: - break; - case EM4CONST_IDENTITY: - case EM4CONST_INVERSE: - default: - makeIdentity(); - break; - } - } - - // Copy constructor - template <class T> - inline CMatrix4<T>::CMatrix4( const CMatrix4<T>& other, eConstructor constructor) -#if defined ( USE_MATRIX_TEST ) - : definitelyIdentityMatrix(BIT_UNTESTED) -#endif -#if defined ( USE_MATRIX_TEST_DEBUG ) - ,id ( MTest.ID++), calls ( 0 ) -#endif - { - switch ( constructor ) - { - case EM4CONST_IDENTITY: - makeIdentity(); - break; - case EM4CONST_NOTHING: - break; - case EM4CONST_COPY: - *this = other; - break; - case EM4CONST_TRANSPOSED: - other.getTransposed(*this); - break; - case EM4CONST_INVERSE: - if (!other.getInverse(*this)) - memset(M, 0, 16*sizeof(T)); - break; - case EM4CONST_INVERSE_TRANSPOSED: - if (!other.getInverse(*this)) - memset(M, 0, 16*sizeof(T)); - else - *this=getTransposed(); - break; - } - } - - //! Add another matrix. - template <class T> - inline CMatrix4<T> CMatrix4<T>::operator+(const CMatrix4<T>& other) const - { - CMatrix4<T> temp ( EM4CONST_NOTHING ); - - temp[0] = M[0]+other[0]; - temp[1] = M[1]+other[1]; - temp[2] = M[2]+other[2]; - temp[3] = M[3]+other[3]; - temp[4] = M[4]+other[4]; - temp[5] = M[5]+other[5]; - temp[6] = M[6]+other[6]; - temp[7] = M[7]+other[7]; - temp[8] = M[8]+other[8]; - temp[9] = M[9]+other[9]; - temp[10] = M[10]+other[10]; - temp[11] = M[11]+other[11]; - temp[12] = M[12]+other[12]; - temp[13] = M[13]+other[13]; - temp[14] = M[14]+other[14]; - temp[15] = M[15]+other[15]; - - return temp; - } - - //! Add another matrix. - template <class T> - inline CMatrix4<T>& CMatrix4<T>::operator+=(const CMatrix4<T>& other) - { - M[0]+=other[0]; - M[1]+=other[1]; - M[2]+=other[2]; - M[3]+=other[3]; - M[4]+=other[4]; - M[5]+=other[5]; - M[6]+=other[6]; - M[7]+=other[7]; - M[8]+=other[8]; - M[9]+=other[9]; - M[10]+=other[10]; - M[11]+=other[11]; - M[12]+=other[12]; - M[13]+=other[13]; - M[14]+=other[14]; - M[15]+=other[15]; - - return *this; - } - - //! Subtract another matrix. - template <class T> - inline CMatrix4<T> CMatrix4<T>::operator-(const CMatrix4<T>& other) const - { - CMatrix4<T> temp ( EM4CONST_NOTHING ); - - temp[0] = M[0]-other[0]; - temp[1] = M[1]-other[1]; - temp[2] = M[2]-other[2]; - temp[3] = M[3]-other[3]; - temp[4] = M[4]-other[4]; - temp[5] = M[5]-other[5]; - temp[6] = M[6]-other[6]; - temp[7] = M[7]-other[7]; - temp[8] = M[8]-other[8]; - temp[9] = M[9]-other[9]; - temp[10] = M[10]-other[10]; - temp[11] = M[11]-other[11]; - temp[12] = M[12]-other[12]; - temp[13] = M[13]-other[13]; - temp[14] = M[14]-other[14]; - temp[15] = M[15]-other[15]; - - return temp; - } - - //! Subtract another matrix. - template <class T> - inline CMatrix4<T>& CMatrix4<T>::operator-=(const CMatrix4<T>& other) - { - M[0]-=other[0]; - M[1]-=other[1]; - M[2]-=other[2]; - M[3]-=other[3]; - M[4]-=other[4]; - M[5]-=other[5]; - M[6]-=other[6]; - M[7]-=other[7]; - M[8]-=other[8]; - M[9]-=other[9]; - M[10]-=other[10]; - M[11]-=other[11]; - M[12]-=other[12]; - M[13]-=other[13]; - M[14]-=other[14]; - M[15]-=other[15]; - - return *this; - } - - //! Multiply by scalar. - template <class T> - inline CMatrix4<T> CMatrix4<T>::operator*(const T& scalar) const - { - CMatrix4<T> temp ( EM4CONST_NOTHING ); - - temp[0] = M[0]*scalar; - temp[1] = M[1]*scalar; - temp[2] = M[2]*scalar; - temp[3] = M[3]*scalar; - temp[4] = M[4]*scalar; - temp[5] = M[5]*scalar; - temp[6] = M[6]*scalar; - temp[7] = M[7]*scalar; - temp[8] = M[8]*scalar; - temp[9] = M[9]*scalar; - temp[10] = M[10]*scalar; - temp[11] = M[11]*scalar; - temp[12] = M[12]*scalar; - temp[13] = M[13]*scalar; - temp[14] = M[14]*scalar; - temp[15] = M[15]*scalar; - - return temp; - } - - //! Multiply by scalar. - template <class T> - inline CMatrix4<T>& CMatrix4<T>::operator*=(const T& scalar) - { - M[0]*=scalar; - M[1]*=scalar; - M[2]*=scalar; - M[3]*=scalar; - M[4]*=scalar; - M[5]*=scalar; - M[6]*=scalar; - M[7]*=scalar; - M[8]*=scalar; - M[9]*=scalar; - M[10]*=scalar; - M[11]*=scalar; - M[12]*=scalar; - M[13]*=scalar; - M[14]*=scalar; - M[15]*=scalar; - - return *this; - } - - //! Multiply by another matrix. - template <class T> - inline CMatrix4<T>& CMatrix4<T>::operator*=(const CMatrix4<T>& other) - { -#if defined ( USE_MATRIX_TEST ) - // do checks on your own in order to avoid copy creation - if ( !other.isIdentity() ) - { - if ( this->isIdentity() ) - { - return (*this = other); - } - else - { - CMatrix4<T> temp ( *this ); - return setbyproduct_nocheck( temp, other ); - } - } - return *this; -#else - CMatrix4<T> temp ( *this ); - return setbyproduct_nocheck( temp, other ); -#endif - } - - //! multiply by another matrix - // set this matrix to the product of two other matrices - // goal is to reduce stack use and copy - template <class T> - inline CMatrix4<T>& CMatrix4<T>::setbyproduct_nocheck(const CMatrix4<T>& other_a,const CMatrix4<T>& other_b ) - { - const T *m1 = other_a.M; - const T *m2 = other_b.M; - - M[0] = m1[0]*m2[0] + m1[4]*m2[1] + m1[8]*m2[2] + m1[12]*m2[3]; - M[1] = m1[1]*m2[0] + m1[5]*m2[1] + m1[9]*m2[2] + m1[13]*m2[3]; - M[2] = m1[2]*m2[0] + m1[6]*m2[1] + m1[10]*m2[2] + m1[14]*m2[3]; - M[3] = m1[3]*m2[0] + m1[7]*m2[1] + m1[11]*m2[2] + m1[15]*m2[3]; - - M[4] = m1[0]*m2[4] + m1[4]*m2[5] + m1[8]*m2[6] + m1[12]*m2[7]; - M[5] = m1[1]*m2[4] + m1[5]*m2[5] + m1[9]*m2[6] + m1[13]*m2[7]; - M[6] = m1[2]*m2[4] + m1[6]*m2[5] + m1[10]*m2[6] + m1[14]*m2[7]; - M[7] = m1[3]*m2[4] + m1[7]*m2[5] + m1[11]*m2[6] + m1[15]*m2[7]; - - M[8] = m1[0]*m2[8] + m1[4]*m2[9] + m1[8]*m2[10] + m1[12]*m2[11]; - M[9] = m1[1]*m2[8] + m1[5]*m2[9] + m1[9]*m2[10] + m1[13]*m2[11]; - M[10] = m1[2]*m2[8] + m1[6]*m2[9] + m1[10]*m2[10] + m1[14]*m2[11]; - M[11] = m1[3]*m2[8] + m1[7]*m2[9] + m1[11]*m2[10] + m1[15]*m2[11]; - - M[12] = m1[0]*m2[12] + m1[4]*m2[13] + m1[8]*m2[14] + m1[12]*m2[15]; - M[13] = m1[1]*m2[12] + m1[5]*m2[13] + m1[9]*m2[14] + m1[13]*m2[15]; - M[14] = m1[2]*m2[12] + m1[6]*m2[13] + m1[10]*m2[14] + m1[14]*m2[15]; - M[15] = m1[3]*m2[12] + m1[7]*m2[13] + m1[11]*m2[14] + m1[15]*m2[15]; -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return *this; - } - - - //! multiply by another matrix - // set this matrix to the product of two other matrices - // goal is to reduce stack use and copy - template <class T> - inline CMatrix4<T>& CMatrix4<T>::setbyproduct(const CMatrix4<T>& other_a, const CMatrix4<T>& other_b ) - { -#if defined ( USE_MATRIX_TEST ) - if ( other_a.isIdentity () ) - return (*this = other_b); - else - if ( other_b.isIdentity () ) - return (*this = other_a); - else - return setbyproduct_nocheck(other_a,other_b); -#else - return setbyproduct_nocheck(other_a,other_b); -#endif - } - - //! multiply by another matrix - template <class T> - inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const - { -#if defined ( USE_MATRIX_TEST ) - // Testing purpose.. - if ( this->isIdentity() ) - return m2; - if ( m2.isIdentity() ) - return *this; -#endif - - CMatrix4<T> m3 ( EM4CONST_NOTHING ); - - const T *m1 = M; - - m3[0] = m1[0]*m2[0] + m1[4]*m2[1] + m1[8]*m2[2] + m1[12]*m2[3]; - m3[1] = m1[1]*m2[0] + m1[5]*m2[1] + m1[9]*m2[2] + m1[13]*m2[3]; - m3[2] = m1[2]*m2[0] + m1[6]*m2[1] + m1[10]*m2[2] + m1[14]*m2[3]; - m3[3] = m1[3]*m2[0] + m1[7]*m2[1] + m1[11]*m2[2] + m1[15]*m2[3]; - - m3[4] = m1[0]*m2[4] + m1[4]*m2[5] + m1[8]*m2[6] + m1[12]*m2[7]; - m3[5] = m1[1]*m2[4] + m1[5]*m2[5] + m1[9]*m2[6] + m1[13]*m2[7]; - m3[6] = m1[2]*m2[4] + m1[6]*m2[5] + m1[10]*m2[6] + m1[14]*m2[7]; - m3[7] = m1[3]*m2[4] + m1[7]*m2[5] + m1[11]*m2[6] + m1[15]*m2[7]; - - m3[8] = m1[0]*m2[8] + m1[4]*m2[9] + m1[8]*m2[10] + m1[12]*m2[11]; - m3[9] = m1[1]*m2[8] + m1[5]*m2[9] + m1[9]*m2[10] + m1[13]*m2[11]; - m3[10] = m1[2]*m2[8] + m1[6]*m2[9] + m1[10]*m2[10] + m1[14]*m2[11]; - m3[11] = m1[3]*m2[8] + m1[7]*m2[9] + m1[11]*m2[10] + m1[15]*m2[11]; - - m3[12] = m1[0]*m2[12] + m1[4]*m2[13] + m1[8]*m2[14] + m1[12]*m2[15]; - m3[13] = m1[1]*m2[12] + m1[5]*m2[13] + m1[9]*m2[14] + m1[13]*m2[15]; - m3[14] = m1[2]*m2[12] + m1[6]*m2[13] + m1[10]*m2[14] + m1[14]*m2[15]; - m3[15] = m1[3]*m2[12] + m1[7]*m2[13] + m1[11]*m2[14] + m1[15]*m2[15]; - return m3; - } - - - - template <class T> - inline vector3d<T> CMatrix4<T>::getTranslation() const - { - return vector3d<T>(M[12], M[13], M[14]); - } - - - template <class T> - inline CMatrix4<T>& CMatrix4<T>::setTranslation( const vector3d<T>& translation ) - { - M[12] = translation.X; - M[13] = translation.Y; - M[14] = translation.Z; -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return *this; - } - - template <class T> - inline CMatrix4<T>& CMatrix4<T>::setInverseTranslation( const vector3d<T>& translation ) - { - M[12] = -translation.X; - M[13] = -translation.Y; - M[14] = -translation.Z; -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return *this; - } - - template <class T> - inline CMatrix4<T>& CMatrix4<T>::setScale( const vector3d<T>& scale ) - { - M[0] = scale.X; - M[5] = scale.Y; - M[10] = scale.Z; -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return *this; - } - - //! Returns the absolute values of the scales of the matrix. - /** - Note that this returns the absolute (positive) values unless only scale is set. - Unfortunately it does not appear to be possible to extract any original negative - values. The best that we could do would be to arbitrarily make one scale - negative if one or three of them were negative. - FIXME - return the original values. - */ - template <class T> - inline vector3d<T> CMatrix4<T>::getScale() const - { - // See http://www.robertblum.com/articles/2005/02/14/decomposing-matrices - - // Deal with the 0 rotation case first - // Prior to Irrlicht 1.6, we always returned this value. - if(core::iszero(M[1]) && core::iszero(M[2]) && - core::iszero(M[4]) && core::iszero(M[6]) && - core::iszero(M[8]) && core::iszero(M[9])) - return vector3d<T>(M[0], M[5], M[10]); - - // We have to do the full calculation. - return vector3d<T>(sqrtf(M[0] * M[0] + M[1] * M[1] + M[2] * M[2]), - sqrtf(M[4] * M[4] + M[5] * M[5] + M[6] * M[6]), - sqrtf(M[8] * M[8] + M[9] * M[9] + M[10] * M[10])); - } - - template <class T> - inline CMatrix4<T>& CMatrix4<T>::setRotationDegrees( const vector3d<T>& rotation ) - { - return setRotationRadians( rotation * core::DEGTORAD ); - } - - template <class T> - inline CMatrix4<T>& CMatrix4<T>::setInverseRotationDegrees( const vector3d<T>& rotation ) - { - return setInverseRotationRadians( rotation * core::DEGTORAD ); - } - - template <class T> - inline CMatrix4<T>& CMatrix4<T>::setRotationRadians( const vector3d<T>& rotation ) - { - const f64 cr = cos( rotation.X ); - const f64 sr = sin( rotation.X ); - const f64 cp = cos( rotation.Y ); - const f64 sp = sin( rotation.Y ); - const f64 cy = cos( rotation.Z ); - const f64 sy = sin( rotation.Z ); - - M[0] = (T)( cp*cy ); - M[1] = (T)( cp*sy ); - M[2] = (T)( -sp ); - - const f64 srsp = sr*sp; - const f64 crsp = cr*sp; - - M[4] = (T)( srsp*cy-cr*sy ); - M[5] = (T)( srsp*sy+cr*cy ); - M[6] = (T)( sr*cp ); - - M[8] = (T)( crsp*cy+sr*sy ); - M[9] = (T)( crsp*sy-sr*cy ); - M[10] = (T)( cr*cp ); -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return *this; - } - - - //! Returns a rotation that is equivalent to that set by setRotationDegrees(). - /** This code was sent in by Chev. Note that it does not necessarily return - the *same* Euler angles as those set by setRotationDegrees(), but the rotation will - be equivalent, i.e. will have the same result when used to rotate a vector or node. */ - template <class T> - inline core::vector3d<T> CMatrix4<T>::getRotationDegrees() const - { - const CMatrix4<T> &mat = *this; - core::vector3d<T> scale = getScale(); - // we need to check for negative scale on to axes, which would bring up wrong results - if (scale.Y<0 && scale.Z<0) - { - scale.Y =-scale.Y; - scale.Z =-scale.Z; - } - else if (scale.X<0 && scale.Z<0) - { - scale.X =-scale.X; - scale.Z =-scale.Z; - } - else if (scale.X<0 && scale.Y<0) - { - scale.X =-scale.X; - scale.Y =-scale.Y; - } - const core::vector3d<f64> invScale(core::reciprocal(scale.X),core::reciprocal(scale.Y),core::reciprocal(scale.Z)); - - f64 Y = -asin(core::clamp(mat[2]*invScale.X, -1.0, 1.0)); - const f64 C = cos(Y); - Y *= RADTODEG64; - - f64 rotx, roty, X, Z; - - if (!core::iszero(C)) - { - const f64 invC = core::reciprocal(C); - rotx = mat[10] * invC * invScale.Z; - roty = mat[6] * invC * invScale.Y; - X = atan2( roty, rotx ) * RADTODEG64; - rotx = mat[0] * invC * invScale.X; - roty = mat[1] * invC * invScale.X; - Z = atan2( roty, rotx ) * RADTODEG64; - } - else - { - X = 0.0; - rotx = mat[5] * invScale.Y; - roty = -mat[4] * invScale.Y; - Z = atan2( roty, rotx ) * RADTODEG64; - } - - // fix values that get below zero - if (X < 0.0) X += 360.0; - if (Y < 0.0) Y += 360.0; - if (Z < 0.0) Z += 360.0; - - return vector3d<T>((T)X,(T)Y,(T)Z); - } - - - //! Sets matrix to rotation matrix of inverse angles given as parameters - template <class T> - inline CMatrix4<T>& CMatrix4<T>::setInverseRotationRadians( const vector3d<T>& rotation ) - { - f64 cr = cos( rotation.X ); - f64 sr = sin( rotation.X ); - f64 cp = cos( rotation.Y ); - f64 sp = sin( rotation.Y ); - f64 cy = cos( rotation.Z ); - f64 sy = sin( rotation.Z ); - - M[0] = (T)( cp*cy ); - M[4] = (T)( cp*sy ); - M[8] = (T)( -sp ); - - f64 srsp = sr*sp; - f64 crsp = cr*sp; - - M[1] = (T)( srsp*cy-cr*sy ); - M[5] = (T)( srsp*sy+cr*cy ); - M[9] = (T)( sr*cp ); - - M[2] = (T)( crsp*cy+sr*sy ); - M[6] = (T)( crsp*sy-sr*cy ); - M[10] = (T)( cr*cp ); -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return *this; - } - - //! Sets matrix to rotation matrix defined by axis and angle, assuming LH rotation - template <class T> - inline CMatrix4<T>& CMatrix4<T>::setRotationAxisRadians( const T& angle, const vector3d<T>& axis ) - { - const f64 c = cos(angle); - const f64 s = sin(angle); - const f64 t = 1.0 - c; - - const f64 tx = t * axis.X; - const f64 ty = t * axis.Y; - const f64 tz = t * axis.Z; - - const f64 sx = s * axis.X; - const f64 sy = s * axis.Y; - const f64 sz = s * axis.Z; - - M[0] = (T)(tx * axis.X + c); - M[1] = (T)(tx * axis.Y + sz); - M[2] = (T)(tx * axis.Z - sy); - - M[4] = (T)(ty * axis.X - sz); - M[5] = (T)(ty * axis.Y + c); - M[6] = (T)(ty * axis.Z + sx); - - M[8] = (T)(tz * axis.X + sy); - M[9] = (T)(tz * axis.Y - sx); - M[10] = (T)(tz * axis.Z + c); - -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return *this; - } - - - /*! - */ - template <class T> - inline CMatrix4<T>& CMatrix4<T>::makeIdentity() - { - memset(M, 0, 16*sizeof(T)); - M[0] = M[5] = M[10] = M[15] = (T)1; -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=true; -#endif - return *this; - } - - - /* - check identity with epsilon - solve floating range problems.. - */ - template <class T> - inline bool CMatrix4<T>::isIdentity() const - { -#if defined ( USE_MATRIX_TEST ) - if (definitelyIdentityMatrix) - return true; -#endif - if (!core::equals( M[12], (T)0 ) || !core::equals( M[13], (T)0 ) || !core::equals( M[14], (T)0 ) || !core::equals( M[15], (T)1 )) - return false; - - if (!core::equals( M[ 0], (T)1 ) || !core::equals( M[ 1], (T)0 ) || !core::equals( M[ 2], (T)0 ) || !core::equals( M[ 3], (T)0 )) - return false; - - if (!core::equals( M[ 4], (T)0 ) || !core::equals( M[ 5], (T)1 ) || !core::equals( M[ 6], (T)0 ) || !core::equals( M[ 7], (T)0 )) - return false; - - if (!core::equals( M[ 8], (T)0 ) || !core::equals( M[ 9], (T)0 ) || !core::equals( M[10], (T)1 ) || !core::equals( M[11], (T)0 )) - return false; -/* - if (!core::equals( M[ 0], (T)1 ) || - !core::equals( M[ 5], (T)1 ) || - !core::equals( M[10], (T)1 ) || - !core::equals( M[15], (T)1 )) - return false; - - for (s32 i=0; i<4; ++i) - for (s32 j=0; j<4; ++j) - if ((j != i) && (!iszero((*this)(i,j)))) - return false; -*/ -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=true; -#endif - return true; - } - - - /* Check orthogonality of matrix. */ - template <class T> - inline bool CMatrix4<T>::isOrthogonal() const - { - T dp=M[0] * M[4 ] + M[1] * M[5 ] + M[2 ] * M[6 ] + M[3 ] * M[7 ]; - if (!iszero(dp)) - return false; - dp = M[0] * M[8 ] + M[1] * M[9 ] + M[2 ] * M[10] + M[3 ] * M[11]; - if (!iszero(dp)) - return false; - dp = M[0] * M[12] + M[1] * M[13] + M[2 ] * M[14] + M[3 ] * M[15]; - if (!iszero(dp)) - return false; - dp = M[4] * M[8 ] + M[5] * M[9 ] + M[6 ] * M[10] + M[7 ] * M[11]; - if (!iszero(dp)) - return false; - dp = M[4] * M[12] + M[5] * M[13] + M[6 ] * M[14] + M[7 ] * M[15]; - if (!iszero(dp)) - return false; - dp = M[8] * M[12] + M[9] * M[13] + M[10] * M[14] + M[11] * M[15]; - return (iszero(dp)); - } - - - /* - doesn't solve floating range problems.. - but takes care on +/- 0 on translation because we are changing it.. - reducing floating point branches - but it needs the floats in memory.. - */ - template <class T> - inline bool CMatrix4<T>::isIdentity_integer_base() const - { -#if defined ( USE_MATRIX_TEST ) - if (definitelyIdentityMatrix) - return true; -#endif - if(IR(M[0])!=F32_VALUE_1) return false; - if(IR(M[1])!=0) return false; - if(IR(M[2])!=0) return false; - if(IR(M[3])!=0) return false; - - if(IR(M[4])!=0) return false; - if(IR(M[5])!=F32_VALUE_1) return false; - if(IR(M[6])!=0) return false; - if(IR(M[7])!=0) return false; - - if(IR(M[8])!=0) return false; - if(IR(M[9])!=0) return false; - if(IR(M[10])!=F32_VALUE_1) return false; - if(IR(M[11])!=0) return false; - - if(IR(M[12])!=0) return false; - if(IR(M[13])!=0) return false; - if(IR(M[13])!=0) return false; - if(IR(M[15])!=F32_VALUE_1) return false; - -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=true; -#endif - return true; - } - - - template <class T> - inline void CMatrix4<T>::rotateVect( vector3df& vect ) const - { - vector3df tmp = vect; - vect.X = tmp.X*M[0] + tmp.Y*M[4] + tmp.Z*M[8]; - vect.Y = tmp.X*M[1] + tmp.Y*M[5] + tmp.Z*M[9]; - vect.Z = tmp.X*M[2] + tmp.Y*M[6] + tmp.Z*M[10]; - } - - //! An alternate transform vector method, writing into a second vector - template <class T> - inline void CMatrix4<T>::rotateVect(core::vector3df& out, const core::vector3df& in) const - { - out.X = in.X*M[0] + in.Y*M[4] + in.Z*M[8]; - out.Y = in.X*M[1] + in.Y*M[5] + in.Z*M[9]; - out.Z = in.X*M[2] + in.Y*M[6] + in.Z*M[10]; - } - - //! An alternate transform vector method, writing into an array of 3 floats - template <class T> - inline void CMatrix4<T>::rotateVect(T *out, const core::vector3df& in) const - { - out[0] = in.X*M[0] + in.Y*M[4] + in.Z*M[8]; - out[1] = in.X*M[1] + in.Y*M[5] + in.Z*M[9]; - out[2] = in.X*M[2] + in.Y*M[6] + in.Z*M[10]; - } - - template <class T> - inline void CMatrix4<T>::inverseRotateVect( vector3df& vect ) const - { - vector3df tmp = vect; - vect.X = tmp.X*M[0] + tmp.Y*M[1] + tmp.Z*M[2]; - vect.Y = tmp.X*M[4] + tmp.Y*M[5] + tmp.Z*M[6]; - vect.Z = tmp.X*M[8] + tmp.Y*M[9] + tmp.Z*M[10]; - } - - template <class T> - inline void CMatrix4<T>::transformVect( vector3df& vect) const - { - f32 vector[3]; - - vector[0] = vect.X*M[0] + vect.Y*M[4] + vect.Z*M[8] + M[12]; - vector[1] = vect.X*M[1] + vect.Y*M[5] + vect.Z*M[9] + M[13]; - vector[2] = vect.X*M[2] + vect.Y*M[6] + vect.Z*M[10] + M[14]; - - vect.X = vector[0]; - vect.Y = vector[1]; - vect.Z = vector[2]; - } - - template <class T> - inline void CMatrix4<T>::transformVect( vector3df& out, const vector3df& in) const - { - out.X = in.X*M[0] + in.Y*M[4] + in.Z*M[8] + M[12]; - out.Y = in.X*M[1] + in.Y*M[5] + in.Z*M[9] + M[13]; - out.Z = in.X*M[2] + in.Y*M[6] + in.Z*M[10] + M[14]; - } - - - template <class T> - inline void CMatrix4<T>::transformVect(T *out, const core::vector3df &in) const - { - out[0] = in.X*M[0] + in.Y*M[4] + in.Z*M[8] + M[12]; - out[1] = in.X*M[1] + in.Y*M[5] + in.Z*M[9] + M[13]; - out[2] = in.X*M[2] + in.Y*M[6] + in.Z*M[10] + M[14]; - out[3] = in.X*M[3] + in.Y*M[7] + in.Z*M[11] + M[15]; - } - - template <class T> - inline void CMatrix4<T>::transformVec3(T *out, const T * in) const - { - out[0] = in[0]*M[0] + in[1]*M[4] + in[2]*M[8] + M[12]; - out[1] = in[0]*M[1] + in[1]*M[5] + in[2]*M[9] + M[13]; - out[2] = in[0]*M[2] + in[1]*M[6] + in[2]*M[10] + M[14]; - } - - - //! Transforms a plane by this matrix - template <class T> - inline void CMatrix4<T>::transformPlane( core::plane3d<f32> &plane) const - { - vector3df member; - // Transform the plane member point, i.e. rotate, translate and scale it. - transformVect(member, plane.getMemberPoint()); - - // Transform the normal by the transposed inverse of the matrix - CMatrix4<T> transposedInverse(*this, EM4CONST_INVERSE_TRANSPOSED); - vector3df normal = plane.Normal; - transposedInverse.transformVect(normal); - - plane.setPlane(member, normal); - } - - //! Transforms a plane by this matrix - template <class T> - inline void CMatrix4<T>::transformPlane( const core::plane3d<f32> &in, core::plane3d<f32> &out) const - { - out = in; - transformPlane( out ); - } - - //! Transforms a axis aligned bounding box - template <class T> - inline void CMatrix4<T>::transformBox(core::aabbox3d<f32>& box) const - { -#if defined ( USE_MATRIX_TEST ) - if (isIdentity()) - return; -#endif - - transformVect(box.MinEdge); - transformVect(box.MaxEdge); - box.repair(); - } - - //! Transforms a axis aligned bounding box more accurately than transformBox() - template <class T> - inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const - { -#if defined ( USE_MATRIX_TEST ) - if (isIdentity()) - return; -#endif - - const f32 Amin[3] = {box.MinEdge.X, box.MinEdge.Y, box.MinEdge.Z}; - const f32 Amax[3] = {box.MaxEdge.X, box.MaxEdge.Y, box.MaxEdge.Z}; - - f32 Bmin[3]; - f32 Bmax[3]; - - Bmin[0] = Bmax[0] = M[12]; - Bmin[1] = Bmax[1] = M[13]; - Bmin[2] = Bmax[2] = M[14]; - - const CMatrix4<T> &m = *this; - - for (u32 i = 0; i < 3; ++i) - { - for (u32 j = 0; j < 3; ++j) - { - const f32 a = m(j,i) * Amin[j]; - const f32 b = m(j,i) * Amax[j]; - - if (a < b) - { - Bmin[i] += a; - Bmax[i] += b; - } - else - { - Bmin[i] += b; - Bmax[i] += a; - } - } - } - - box.MinEdge.X = Bmin[0]; - box.MinEdge.Y = Bmin[1]; - box.MinEdge.Z = Bmin[2]; - - box.MaxEdge.X = Bmax[0]; - box.MaxEdge.Y = Bmax[1]; - box.MaxEdge.Z = Bmax[2]; - } - - - //! Multiplies this matrix by a 1x4 matrix - template <class T> - inline void CMatrix4<T>::multiplyWith1x4Matrix(T* matrix) const - { - /* - 0 1 2 3 - 4 5 6 7 - 8 9 10 11 - 12 13 14 15 - */ - - T mat[4]; - mat[0] = matrix[0]; - mat[1] = matrix[1]; - mat[2] = matrix[2]; - mat[3] = matrix[3]; - - matrix[0] = M[0]*mat[0] + M[4]*mat[1] + M[8]*mat[2] + M[12]*mat[3]; - matrix[1] = M[1]*mat[0] + M[5]*mat[1] + M[9]*mat[2] + M[13]*mat[3]; - matrix[2] = M[2]*mat[0] + M[6]*mat[1] + M[10]*mat[2] + M[14]*mat[3]; - matrix[3] = M[3]*mat[0] + M[7]*mat[1] + M[11]*mat[2] + M[15]*mat[3]; - } - - template <class T> - inline void CMatrix4<T>::inverseTranslateVect( vector3df& vect ) const - { - vect.X = vect.X-M[12]; - vect.Y = vect.Y-M[13]; - vect.Z = vect.Z-M[14]; - } - - template <class T> - inline void CMatrix4<T>::translateVect( vector3df& vect ) const - { - vect.X = vect.X+M[12]; - vect.Y = vect.Y+M[13]; - vect.Z = vect.Z+M[14]; - } - - - template <class T> - inline bool CMatrix4<T>::getInverse(CMatrix4<T>& out) const - { - /// Calculates the inverse of this Matrix - /// The inverse is calculated using Cramers rule. - /// If no inverse exists then 'false' is returned. - -#if defined ( USE_MATRIX_TEST ) - if ( this->isIdentity() ) - { - out=*this; - return true; - } -#endif - const CMatrix4<T> &m = *this; - - f32 d = (m(0, 0) * m(1, 1) - m(0, 1) * m(1, 0)) * (m(2, 2) * m(3, 3) - m(2, 3) * m(3, 2)) - - (m(0, 0) * m(1, 2) - m(0, 2) * m(1, 0)) * (m(2, 1) * m(3, 3) - m(2, 3) * m(3, 1)) + - (m(0, 0) * m(1, 3) - m(0, 3) * m(1, 0)) * (m(2, 1) * m(3, 2) - m(2, 2) * m(3, 1)) + - (m(0, 1) * m(1, 2) - m(0, 2) * m(1, 1)) * (m(2, 0) * m(3, 3) - m(2, 3) * m(3, 0)) - - (m(0, 1) * m(1, 3) - m(0, 3) * m(1, 1)) * (m(2, 0) * m(3, 2) - m(2, 2) * m(3, 0)) + - (m(0, 2) * m(1, 3) - m(0, 3) * m(1, 2)) * (m(2, 0) * m(3, 1) - m(2, 1) * m(3, 0)); - - if( core::iszero ( d, FLT_MIN ) ) - return false; - - d = core::reciprocal ( d ); - - out(0, 0) = d * (m(1, 1) * (m(2, 2) * m(3, 3) - m(2, 3) * m(3, 2)) + - m(1, 2) * (m(2, 3) * m(3, 1) - m(2, 1) * m(3, 3)) + - m(1, 3) * (m(2, 1) * m(3, 2) - m(2, 2) * m(3, 1))); - out(0, 1) = d * (m(2, 1) * (m(0, 2) * m(3, 3) - m(0, 3) * m(3, 2)) + - m(2, 2) * (m(0, 3) * m(3, 1) - m(0, 1) * m(3, 3)) + - m(2, 3) * (m(0, 1) * m(3, 2) - m(0, 2) * m(3, 1))); - out(0, 2) = d * (m(3, 1) * (m(0, 2) * m(1, 3) - m(0, 3) * m(1, 2)) + - m(3, 2) * (m(0, 3) * m(1, 1) - m(0, 1) * m(1, 3)) + - m(3, 3) * (m(0, 1) * m(1, 2) - m(0, 2) * m(1, 1))); - out(0, 3) = d * (m(0, 1) * (m(1, 3) * m(2, 2) - m(1, 2) * m(2, 3)) + - m(0, 2) * (m(1, 1) * m(2, 3) - m(1, 3) * m(2, 1)) + - m(0, 3) * (m(1, 2) * m(2, 1) - m(1, 1) * m(2, 2))); - out(1, 0) = d * (m(1, 2) * (m(2, 0) * m(3, 3) - m(2, 3) * m(3, 0)) + - m(1, 3) * (m(2, 2) * m(3, 0) - m(2, 0) * m(3, 2)) + - m(1, 0) * (m(2, 3) * m(3, 2) - m(2, 2) * m(3, 3))); - out(1, 1) = d * (m(2, 2) * (m(0, 0) * m(3, 3) - m(0, 3) * m(3, 0)) + - m(2, 3) * (m(0, 2) * m(3, 0) - m(0, 0) * m(3, 2)) + - m(2, 0) * (m(0, 3) * m(3, 2) - m(0, 2) * m(3, 3))); - out(1, 2) = d * (m(3, 2) * (m(0, 0) * m(1, 3) - m(0, 3) * m(1, 0)) + - m(3, 3) * (m(0, 2) * m(1, 0) - m(0, 0) * m(1, 2)) + - m(3, 0) * (m(0, 3) * m(1, 2) - m(0, 2) * m(1, 3))); - out(1, 3) = d * (m(0, 2) * (m(1, 3) * m(2, 0) - m(1, 0) * m(2, 3)) + - m(0, 3) * (m(1, 0) * m(2, 2) - m(1, 2) * m(2, 0)) + - m(0, 0) * (m(1, 2) * m(2, 3) - m(1, 3) * m(2, 2))); - out(2, 0) = d * (m(1, 3) * (m(2, 0) * m(3, 1) - m(2, 1) * m(3, 0)) + - m(1, 0) * (m(2, 1) * m(3, 3) - m(2, 3) * m(3, 1)) + - m(1, 1) * (m(2, 3) * m(3, 0) - m(2, 0) * m(3, 3))); - out(2, 1) = d * (m(2, 3) * (m(0, 0) * m(3, 1) - m(0, 1) * m(3, 0)) + - m(2, 0) * (m(0, 1) * m(3, 3) - m(0, 3) * m(3, 1)) + - m(2, 1) * (m(0, 3) * m(3, 0) - m(0, 0) * m(3, 3))); - out(2, 2) = d * (m(3, 3) * (m(0, 0) * m(1, 1) - m(0, 1) * m(1, 0)) + - m(3, 0) * (m(0, 1) * m(1, 3) - m(0, 3) * m(1, 1)) + - m(3, 1) * (m(0, 3) * m(1, 0) - m(0, 0) * m(1, 3))); - out(2, 3) = d * (m(0, 3) * (m(1, 1) * m(2, 0) - m(1, 0) * m(2, 1)) + - m(0, 0) * (m(1, 3) * m(2, 1) - m(1, 1) * m(2, 3)) + - m(0, 1) * (m(1, 0) * m(2, 3) - m(1, 3) * m(2, 0))); - out(3, 0) = d * (m(1, 0) * (m(2, 2) * m(3, 1) - m(2, 1) * m(3, 2)) + - m(1, 1) * (m(2, 0) * m(3, 2) - m(2, 2) * m(3, 0)) + - m(1, 2) * (m(2, 1) * m(3, 0) - m(2, 0) * m(3, 1))); - out(3, 1) = d * (m(2, 0) * (m(0, 2) * m(3, 1) - m(0, 1) * m(3, 2)) + - m(2, 1) * (m(0, 0) * m(3, 2) - m(0, 2) * m(3, 0)) + - m(2, 2) * (m(0, 1) * m(3, 0) - m(0, 0) * m(3, 1))); - out(3, 2) = d * (m(3, 0) * (m(0, 2) * m(1, 1) - m(0, 1) * m(1, 2)) + - m(3, 1) * (m(0, 0) * m(1, 2) - m(0, 2) * m(1, 0)) + - m(3, 2) * (m(0, 1) * m(1, 0) - m(0, 0) * m(1, 1))); - out(3, 3) = d * (m(0, 0) * (m(1, 1) * m(2, 2) - m(1, 2) * m(2, 1)) + - m(0, 1) * (m(1, 2) * m(2, 0) - m(1, 0) * m(2, 2)) + - m(0, 2) * (m(1, 0) * m(2, 1) - m(1, 1) * m(2, 0))); - -#if defined ( USE_MATRIX_TEST ) - out.definitelyIdentityMatrix = definitelyIdentityMatrix; -#endif - return true; - } - - - //! Inverts a primitive matrix which only contains a translation and a rotation - //! \param out: where result matrix is written to. - template <class T> - inline bool CMatrix4<T>::getInversePrimitive ( CMatrix4<T>& out ) const - { - out.M[0 ] = M[0]; - out.M[1 ] = M[4]; - out.M[2 ] = M[8]; - out.M[3 ] = 0; - - out.M[4 ] = M[1]; - out.M[5 ] = M[5]; - out.M[6 ] = M[9]; - out.M[7 ] = 0; - - out.M[8 ] = M[2]; - out.M[9 ] = M[6]; - out.M[10] = M[10]; - out.M[11] = 0; - - out.M[12] = (T)-(M[12]*M[0] + M[13]*M[1] + M[14]*M[2]); - out.M[13] = (T)-(M[12]*M[4] + M[13]*M[5] + M[14]*M[6]); - out.M[14] = (T)-(M[12]*M[8] + M[13]*M[9] + M[14]*M[10]); - out.M[15] = 1; - -#if defined ( USE_MATRIX_TEST ) - out.definitelyIdentityMatrix = definitelyIdentityMatrix; -#endif - return true; - } - - /*! - */ - template <class T> - inline bool CMatrix4<T>::makeInverse() - { -#if defined ( USE_MATRIX_TEST ) - if (definitelyIdentityMatrix) - return true; -#endif - CMatrix4<T> temp ( EM4CONST_NOTHING ); - - if (getInverse(temp)) - { - *this = temp; - return true; - } - - return false; - } - - - template <class T> - inline CMatrix4<T>& CMatrix4<T>::operator=(const CMatrix4<T> &other) - { - if (this==&other) - return *this; - memcpy(M, other.M, 16*sizeof(T)); -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=other.definitelyIdentityMatrix; -#endif - return *this; - } - - - template <class T> - inline CMatrix4<T>& CMatrix4<T>::operator=(const T& scalar) - { - for (s32 i = 0; i < 16; ++i) - M[i]=scalar; - -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return *this; - } - - - template <class T> - inline bool CMatrix4<T>::operator==(const CMatrix4<T> &other) const - { -#if defined ( USE_MATRIX_TEST ) - if (definitelyIdentityMatrix && other.definitelyIdentityMatrix) - return true; -#endif - for (s32 i = 0; i < 16; ++i) - if (M[i] != other.M[i]) - return false; - - return true; - } - - - template <class T> - inline bool CMatrix4<T>::operator!=(const CMatrix4<T> &other) const - { - return !(*this == other); - } - - - // Builds a right-handed perspective projection matrix based on a field of view - template <class T> - inline CMatrix4<T>& CMatrix4<T>::buildProjectionMatrixPerspectiveFovRH( - f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 zFar) - { - const f64 h = reciprocal(tan(fieldOfViewRadians*0.5)); - _IRR_DEBUG_BREAK_IF(aspectRatio==0.f); //divide by zero - const T w = static_cast<T>(h / aspectRatio); - - _IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero - M[0] = w; - M[1] = 0; - M[2] = 0; - M[3] = 0; - - M[4] = 0; - M[5] = (T)h; - M[6] = 0; - M[7] = 0; - - M[8] = 0; - M[9] = 0; - M[10] = (T)(zFar/(zNear-zFar)); // DirectX version -// M[10] = (T)(zFar+zNear/(zNear-zFar)); // OpenGL version - M[11] = -1; - - M[12] = 0; - M[13] = 0; - M[14] = (T)(zNear*zFar/(zNear-zFar)); // DirectX version -// M[14] = (T)(2.0f*zNear*zFar/(zNear-zFar)); // OpenGL version - M[15] = 0; - -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return *this; - } - - - // Builds a left-handed perspective projection matrix based on a field of view - template <class T> - inline CMatrix4<T>& CMatrix4<T>::buildProjectionMatrixPerspectiveFovLH( - f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 zFar) - { - const f64 h = reciprocal(tan(fieldOfViewRadians*0.5)); - _IRR_DEBUG_BREAK_IF(aspectRatio==0.f); //divide by zero - const T w = static_cast<T>(h / aspectRatio); - - _IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero - M[0] = w; - M[1] = 0; - M[2] = 0; - M[3] = 0; - - M[4] = 0; - M[5] = (T)h; - M[6] = 0; - M[7] = 0; - - M[8] = 0; - M[9] = 0; - M[10] = (T)(zFar/(zFar-zNear)); - M[11] = 1; - - M[12] = 0; - M[13] = 0; - M[14] = (T)(-zNear*zFar/(zFar-zNear)); - M[15] = 0; - -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return *this; - } - - - // Builds a left-handed perspective projection matrix based on a field of view, with far plane culling at infinity - template <class T> - inline CMatrix4<T>& CMatrix4<T>::buildProjectionMatrixPerspectiveFovInfinityLH( - f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 epsilon) - { - const f64 h = reciprocal(tan(fieldOfViewRadians*0.5)); - _IRR_DEBUG_BREAK_IF(aspectRatio==0.f); //divide by zero - const T w = static_cast<T>(h / aspectRatio); - - M[0] = w; - M[1] = 0; - M[2] = 0; - M[3] = 0; - - M[4] = 0; - M[5] = (T)h; - M[6] = 0; - M[7] = 0; - - M[8] = 0; - M[9] = 0; - M[10] = (T)(1.f-epsilon); - M[11] = 1; - - M[12] = 0; - M[13] = 0; - M[14] = (T)(zNear*(epsilon-1.f)); - M[15] = 0; - -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return *this; - } - - - // Builds a left-handed orthogonal projection matrix. - template <class T> - inline CMatrix4<T>& CMatrix4<T>::buildProjectionMatrixOrthoLH( - f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar) - { - _IRR_DEBUG_BREAK_IF(widthOfViewVolume==0.f); //divide by zero - _IRR_DEBUG_BREAK_IF(heightOfViewVolume==0.f); //divide by zero - _IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero - M[0] = (T)(2/widthOfViewVolume); - M[1] = 0; - M[2] = 0; - M[3] = 0; - - M[4] = 0; - M[5] = (T)(2/heightOfViewVolume); - M[6] = 0; - M[7] = 0; - - M[8] = 0; - M[9] = 0; - M[10] = (T)(1/(zFar-zNear)); - M[11] = 0; - - M[12] = 0; - M[13] = 0; - M[14] = (T)(zNear/(zNear-zFar)); - M[15] = 1; - -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return *this; - } - - - // Builds a right-handed orthogonal projection matrix. - template <class T> - inline CMatrix4<T>& CMatrix4<T>::buildProjectionMatrixOrthoRH( - f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar) - { - _IRR_DEBUG_BREAK_IF(widthOfViewVolume==0.f); //divide by zero - _IRR_DEBUG_BREAK_IF(heightOfViewVolume==0.f); //divide by zero - _IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero - M[0] = (T)(2/widthOfViewVolume); - M[1] = 0; - M[2] = 0; - M[3] = 0; - - M[4] = 0; - M[5] = (T)(2/heightOfViewVolume); - M[6] = 0; - M[7] = 0; - - M[8] = 0; - M[9] = 0; - M[10] = (T)(1/(zNear-zFar)); - M[11] = 0; - - M[12] = 0; - M[13] = 0; - M[14] = (T)(zNear/(zNear-zFar)); - M[15] = 1; - -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return *this; - } - - - // Builds a right-handed perspective projection matrix. - template <class T> - inline CMatrix4<T>& CMatrix4<T>::buildProjectionMatrixPerspectiveRH( - f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar) - { - _IRR_DEBUG_BREAK_IF(widthOfViewVolume==0.f); //divide by zero - _IRR_DEBUG_BREAK_IF(heightOfViewVolume==0.f); //divide by zero - _IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero - M[0] = (T)(2*zNear/widthOfViewVolume); - M[1] = 0; - M[2] = 0; - M[3] = 0; - - M[4] = 0; - M[5] = (T)(2*zNear/heightOfViewVolume); - M[6] = 0; - M[7] = 0; - - M[8] = 0; - M[9] = 0; - M[10] = (T)(zFar/(zNear-zFar)); - M[11] = -1; - - M[12] = 0; - M[13] = 0; - M[14] = (T)(zNear*zFar/(zNear-zFar)); - M[15] = 0; - -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return *this; - } - - - // Builds a left-handed perspective projection matrix. - template <class T> - inline CMatrix4<T>& CMatrix4<T>::buildProjectionMatrixPerspectiveLH( - f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar) - { - _IRR_DEBUG_BREAK_IF(widthOfViewVolume==0.f); //divide by zero - _IRR_DEBUG_BREAK_IF(heightOfViewVolume==0.f); //divide by zero - _IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero - M[0] = (T)(2*zNear/widthOfViewVolume); - M[1] = 0; - M[2] = 0; - M[3] = 0; - - M[4] = 0; - M[5] = (T)(2*zNear/heightOfViewVolume); - M[6] = 0; - M[7] = 0; - - M[8] = 0; - M[9] = 0; - M[10] = (T)(zFar/(zFar-zNear)); - M[11] = 1; - - M[12] = 0; - M[13] = 0; - M[14] = (T)(zNear*zFar/(zNear-zFar)); - M[15] = 0; -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return *this; - } - - - // Builds a matrix that flattens geometry into a plane. - template <class T> - inline CMatrix4<T>& CMatrix4<T>::buildShadowMatrix(const core::vector3df& light, core::plane3df plane, f32 point) - { - plane.Normal.normalize(); - const f32 d = plane.Normal.dotProduct(light); - - M[ 0] = (T)(-plane.Normal.X * light.X + d); - M[ 1] = (T)(-plane.Normal.X * light.Y); - M[ 2] = (T)(-plane.Normal.X * light.Z); - M[ 3] = (T)(-plane.Normal.X * point); - - M[ 4] = (T)(-plane.Normal.Y * light.X); - M[ 5] = (T)(-plane.Normal.Y * light.Y + d); - M[ 6] = (T)(-plane.Normal.Y * light.Z); - M[ 7] = (T)(-plane.Normal.Y * point); - - M[ 8] = (T)(-plane.Normal.Z * light.X); - M[ 9] = (T)(-plane.Normal.Z * light.Y); - M[10] = (T)(-plane.Normal.Z * light.Z + d); - M[11] = (T)(-plane.Normal.Z * point); - - M[12] = (T)(-plane.D * light.X); - M[13] = (T)(-plane.D * light.Y); - M[14] = (T)(-plane.D * light.Z); - M[15] = (T)(-plane.D * point + d); -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return *this; - } - - // Builds a left-handed look-at matrix. - template <class T> - inline CMatrix4<T>& CMatrix4<T>::buildCameraLookAtMatrixLH( - const vector3df& position, - const vector3df& target, - const vector3df& upVector) - { - vector3df zaxis = target - position; - zaxis.normalize(); - - vector3df xaxis = upVector.crossProduct(zaxis); - xaxis.normalize(); - - vector3df yaxis = zaxis.crossProduct(xaxis); - - M[0] = (T)xaxis.X; - M[1] = (T)yaxis.X; - M[2] = (T)zaxis.X; - M[3] = 0; - - M[4] = (T)xaxis.Y; - M[5] = (T)yaxis.Y; - M[6] = (T)zaxis.Y; - M[7] = 0; - - M[8] = (T)xaxis.Z; - M[9] = (T)yaxis.Z; - M[10] = (T)zaxis.Z; - M[11] = 0; - - M[12] = (T)-xaxis.dotProduct(position); - M[13] = (T)-yaxis.dotProduct(position); - M[14] = (T)-zaxis.dotProduct(position); - M[15] = 1; -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return *this; - } - - - // Builds a right-handed look-at matrix. - template <class T> - inline CMatrix4<T>& CMatrix4<T>::buildCameraLookAtMatrixRH( - const vector3df& position, - const vector3df& target, - const vector3df& upVector) - { - vector3df zaxis = position - target; - zaxis.normalize(); - - vector3df xaxis = upVector.crossProduct(zaxis); - xaxis.normalize(); - - vector3df yaxis = zaxis.crossProduct(xaxis); - - M[0] = (T)xaxis.X; - M[1] = (T)yaxis.X; - M[2] = (T)zaxis.X; - M[3] = 0; - - M[4] = (T)xaxis.Y; - M[5] = (T)yaxis.Y; - M[6] = (T)zaxis.Y; - M[7] = 0; - - M[8] = (T)xaxis.Z; - M[9] = (T)yaxis.Z; - M[10] = (T)zaxis.Z; - M[11] = 0; - - M[12] = (T)-xaxis.dotProduct(position); - M[13] = (T)-yaxis.dotProduct(position); - M[14] = (T)-zaxis.dotProduct(position); - M[15] = 1; -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return *this; - } - - - // creates a new matrix as interpolated matrix from this and the passed one. - template <class T> - inline CMatrix4<T> CMatrix4<T>::interpolate(const core::CMatrix4<T>& b, f32 time) const - { - CMatrix4<T> mat ( EM4CONST_NOTHING ); - - for (u32 i=0; i < 16; i += 4) - { - mat.M[i+0] = (T)(M[i+0] + ( b.M[i+0] - M[i+0] ) * time); - mat.M[i+1] = (T)(M[i+1] + ( b.M[i+1] - M[i+1] ) * time); - mat.M[i+2] = (T)(M[i+2] + ( b.M[i+2] - M[i+2] ) * time); - mat.M[i+3] = (T)(M[i+3] + ( b.M[i+3] - M[i+3] ) * time); - } - return mat; - } - - - // returns transposed matrix - template <class T> - inline CMatrix4<T> CMatrix4<T>::getTransposed() const - { - CMatrix4<T> t ( EM4CONST_NOTHING ); - getTransposed ( t ); - return t; - } - - - // returns transposed matrix - template <class T> - inline void CMatrix4<T>::getTransposed( CMatrix4<T>& o ) const - { - o[ 0] = M[ 0]; - o[ 1] = M[ 4]; - o[ 2] = M[ 8]; - o[ 3] = M[12]; - - o[ 4] = M[ 1]; - o[ 5] = M[ 5]; - o[ 6] = M[ 9]; - o[ 7] = M[13]; - - o[ 8] = M[ 2]; - o[ 9] = M[ 6]; - o[10] = M[10]; - o[11] = M[14]; - - o[12] = M[ 3]; - o[13] = M[ 7]; - o[14] = M[11]; - o[15] = M[15]; -#if defined ( USE_MATRIX_TEST ) - o.definitelyIdentityMatrix=definitelyIdentityMatrix; -#endif - } - - - // used to scale <-1,-1><1,1> to viewport - template <class T> - inline CMatrix4<T>& CMatrix4<T>::buildNDCToDCMatrix( const core::rect<s32>& viewport, f32 zScale) - { - const f32 scaleX = (viewport.getWidth() - 0.75f ) * 0.5f; - const f32 scaleY = -(viewport.getHeight() - 0.75f ) * 0.5f; - - const f32 dx = -0.5f + ( (viewport.UpperLeftCorner.X + viewport.LowerRightCorner.X ) * 0.5f ); - const f32 dy = -0.5f + ( (viewport.UpperLeftCorner.Y + viewport.LowerRightCorner.Y ) * 0.5f ); - - makeIdentity(); - M[12] = (T)dx; - M[13] = (T)dy; - return setScale(core::vector3d<T>((T)scaleX, (T)scaleY, (T)zScale)); - } - - //! Builds a matrix that rotates from one vector to another - /** \param from: vector to rotate from - \param to: vector to rotate to - - http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToMatrix/index.htm - */ - template <class T> - inline CMatrix4<T>& CMatrix4<T>::buildRotateFromTo(const core::vector3df& from, const core::vector3df& to) - { - // unit vectors - core::vector3df f(from); - core::vector3df t(to); - f.normalize(); - t.normalize(); - - // axis multiplication by sin - core::vector3df vs(t.crossProduct(f)); - - // axis of rotation - core::vector3df v(vs); - v.normalize(); - - // cosinus angle - T ca = f.dotProduct(t); - - core::vector3df vt(v * (1 - ca)); - - M[0] = vt.X * v.X + ca; - M[5] = vt.Y * v.Y + ca; - M[10] = vt.Z * v.Z + ca; - - vt.X *= v.Y; - vt.Z *= v.X; - vt.Y *= v.Z; - - M[1] = vt.X - vs.Z; - M[2] = vt.Z + vs.Y; - M[3] = 0; - - M[4] = vt.X + vs.Z; - M[6] = vt.Y - vs.X; - M[7] = 0; - - M[8] = vt.Z - vs.Y; - M[9] = vt.Y + vs.X; - M[11] = 0; - - M[12] = 0; - M[13] = 0; - M[14] = 0; - M[15] = 1; - - return *this; - } - - //! Builds a matrix which rotates a source vector to a look vector over an arbitrary axis - /** \param camPos: viewer position in world coord - \param center: object position in world-coord, rotation pivot - \param translation: object final translation from center - \param axis: axis to rotate about - \param from: source vector to rotate from - */ - template <class T> - inline void CMatrix4<T>::buildAxisAlignedBillboard( - const core::vector3df& camPos, - const core::vector3df& center, - const core::vector3df& translation, - const core::vector3df& axis, - const core::vector3df& from) - { - // axis of rotation - core::vector3df up = axis; - up.normalize(); - const core::vector3df forward = (camPos - center).normalize(); - const core::vector3df right = up.crossProduct(forward).normalize(); - - // correct look vector - const core::vector3df look = right.crossProduct(up); - - // rotate from to - // axis multiplication by sin - const core::vector3df vs = look.crossProduct(from); - - // cosinus angle - const f32 ca = from.dotProduct(look); - - core::vector3df vt(up * (1.f - ca)); - - M[0] = static_cast<T>(vt.X * up.X + ca); - M[5] = static_cast<T>(vt.Y * up.Y + ca); - M[10] = static_cast<T>(vt.Z * up.Z + ca); - - vt.X *= up.Y; - vt.Z *= up.X; - vt.Y *= up.Z; - - M[1] = static_cast<T>(vt.X - vs.Z); - M[2] = static_cast<T>(vt.Z + vs.Y); - M[3] = 0; - - M[4] = static_cast<T>(vt.X + vs.Z); - M[6] = static_cast<T>(vt.Y - vs.X); - M[7] = 0; - - M[8] = static_cast<T>(vt.Z - vs.Y); - M[9] = static_cast<T>(vt.Y + vs.X); - M[11] = 0; - - setRotationCenter(center, translation); - } - - - //! Builds a combined matrix which translate to a center before rotation and translate afterwards - template <class T> - inline void CMatrix4<T>::setRotationCenter(const core::vector3df& center, const core::vector3df& translation) - { - M[12] = -M[0]*center.X - M[4]*center.Y - M[8]*center.Z + (center.X - translation.X ); - M[13] = -M[1]*center.X - M[5]*center.Y - M[9]*center.Z + (center.Y - translation.Y ); - M[14] = -M[2]*center.X - M[6]*center.Y - M[10]*center.Z + (center.Z - translation.Z ); - M[15] = (T) 1.0; -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - } - - /*! - Generate texture coordinates as linear functions so that: - u = Ux*x + Uy*y + Uz*z + Uw - v = Vx*x + Vy*y + Vz*z + Vw - The matrix M for this case is: - Ux Vx 0 0 - Uy Vy 0 0 - Uz Vz 0 0 - Uw Vw 0 0 - */ - - - template <class T> - inline CMatrix4<T>& CMatrix4<T>::buildTextureTransform( f32 rotateRad, - const core::vector2df &rotatecenter, - const core::vector2df &translate, - const core::vector2df &scale) - { - const f32 c = cosf(rotateRad); - const f32 s = sinf(rotateRad); - - M[0] = (T)(c * scale.X); - M[1] = (T)(s * scale.Y); - M[2] = 0; - M[3] = 0; - - M[4] = (T)(-s * scale.X); - M[5] = (T)(c * scale.Y); - M[6] = 0; - M[7] = 0; - - M[8] = (T)(c * scale.X * rotatecenter.X + -s * rotatecenter.Y + translate.X); - M[9] = (T)(s * scale.Y * rotatecenter.X + c * rotatecenter.Y + translate.Y); - M[10] = 1; - M[11] = 0; - - M[12] = 0; - M[13] = 0; - M[14] = 0; - M[15] = 1; -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return *this; - } - - - // rotate about z axis, center ( 0.5, 0.5 ) - template <class T> - inline CMatrix4<T>& CMatrix4<T>::setTextureRotationCenter( f32 rotateRad ) - { - const f32 c = cosf(rotateRad); - const f32 s = sinf(rotateRad); - M[0] = (T)c; - M[1] = (T)s; - - M[4] = (T)-s; - M[5] = (T)c; - - M[8] = (T)(0.5f * ( s - c) + 0.5f); - M[9] = (T)(-0.5f * ( s + c) + 0.5f); - -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix = definitelyIdentityMatrix && (rotateRad==0.0f); -#endif - return *this; - } - - - template <class T> - inline CMatrix4<T>& CMatrix4<T>::setTextureTranslate ( f32 x, f32 y ) - { - M[8] = (T)x; - M[9] = (T)y; - -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix = definitelyIdentityMatrix && (x==0.0f) && (y==0.0f); -#endif - return *this; - } - - - template <class T> - inline CMatrix4<T>& CMatrix4<T>::setTextureTranslateTransposed ( f32 x, f32 y ) - { - M[2] = (T)x; - M[6] = (T)y; - -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix = definitelyIdentityMatrix && (x==0.0f) && (y==0.0f) ; -#endif - return *this; - } - - template <class T> - inline CMatrix4<T>& CMatrix4<T>::setTextureScale ( f32 sx, f32 sy ) - { - M[0] = (T)sx; - M[5] = (T)sy; -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix = definitelyIdentityMatrix && (sx==1.0f) && (sy==1.0f); -#endif - return *this; - } - - - template <class T> - inline CMatrix4<T>& CMatrix4<T>::setTextureScaleCenter( f32 sx, f32 sy ) - { - M[0] = (T)sx; - M[5] = (T)sy; - M[8] = (T)(0.5f - 0.5f * sx); - M[9] = (T)(0.5f - 0.5f * sy); - -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix = definitelyIdentityMatrix && (sx==1.0f) && (sy==1.0f); -#endif - return *this; - } - - - // sets all matrix data members at once - template <class T> - inline CMatrix4<T>& CMatrix4<T>::setM(const T* data) - { - memcpy(M,data, 16*sizeof(T)); - -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix=false; -#endif - return *this; - } - - - // sets if the matrix is definitely identity matrix - template <class T> - inline void CMatrix4<T>::setDefinitelyIdentityMatrix( bool isDefinitelyIdentityMatrix) - { -#if defined ( USE_MATRIX_TEST ) - definitelyIdentityMatrix = isDefinitelyIdentityMatrix; -#endif - } - - - // gets if the matrix is definitely identity matrix - template <class T> - inline bool CMatrix4<T>::getDefinitelyIdentityMatrix() const - { -#if defined ( USE_MATRIX_TEST ) - return definitelyIdentityMatrix; -#else - return false; -#endif - } - - - //! Compare two matrices using the equal method - template <class T> - inline bool CMatrix4<T>::equals(const core::CMatrix4<T>& other, const T tolerance) const - { -#if defined ( USE_MATRIX_TEST ) - if (definitelyIdentityMatrix && other.definitelyIdentityMatrix) - return true; -#endif - for (s32 i = 0; i < 16; ++i) - if (!core::equals(M[i],other.M[i], tolerance)) - return false; - - return true; - } - - - // Multiply by scalar. - template <class T> - inline CMatrix4<T> operator*(const T scalar, const CMatrix4<T>& mat) - { - return mat*scalar; - } - - - //! Typedef for f32 matrix - typedef CMatrix4<f32> matrix4; - - //! global const identity matrix - IRRLICHT_API extern const matrix4 IdentityMatrix; - -} // end namespace core -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/path.h b/builddir/irrlicht-1.8.1/include/path.h deleted file mode 100644 index ed7661c..0000000 --- a/builddir/irrlicht-1.8.1/include/path.h +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine" and the "irrXML" project. -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_PATH_H_INCLUDED__ -#define __IRR_PATH_H_INCLUDED__ - -#include "irrString.h" - -namespace irr -{ -namespace io -{ - -//! Type used for all file system related strings. -/** This type will transparently handle different file system encodings. */ -typedef core::string<fschar_t> path; - -//! Used in places where we identify objects by a filename, but don't actually work with the real filename -/** Irrlicht is internally not case-sensitive when it comes to names. - Also this class is a first step towards support for correctly serializing renamed objects. -*/ -struct SNamedPath -{ - //! Constructor - SNamedPath() {} - - //! Constructor - SNamedPath(const path& p) : Path(p), InternalName( PathToName(p) ) - { - } - - //! Is smaller comparator - bool operator <(const SNamedPath& other) const - { - return InternalName < other.InternalName; - } - - //! Set the path. - void setPath(const path& p) - { - Path = p; - InternalName = PathToName(p); - } - - //! Get the path. - const path& getPath() const - { - return Path; - }; - - //! Get the name which is used to identify the file. - //! This string is similar to the names and filenames used before Irrlicht 1.7 - const path& getInternalName() const - { - return InternalName; - } - - //! Implicit cast to io::path - operator core::stringc() const - { - return core::stringc(getPath()); - } - //! Implicit cast to io::path - operator core::stringw() const - { - return core::stringw(getPath()); - } - -protected: - // convert the given path string to a name string. - path PathToName(const path& p) const - { - path name(p); - name.replace( '\\', '/' ); - name.make_lower(); - return name; - } - -private: - path Path; - path InternalName; -}; - -} // io -} // irr - -#endif // __IRR_PATH_H_INCLUDED__ diff --git a/builddir/irrlicht-1.8.1/include/plane3d.h b/builddir/irrlicht-1.8.1/include/plane3d.h deleted file mode 100644 index 02c6bf9..0000000 --- a/builddir/irrlicht-1.8.1/include/plane3d.h +++ /dev/null @@ -1,245 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_PLANE_3D_H_INCLUDED__ -#define __IRR_PLANE_3D_H_INCLUDED__ - -#include "irrMath.h" -#include "vector3d.h" - -namespace irr -{ -namespace core -{ - -//! Enumeration for intersection relations of 3d objects -enum EIntersectionRelation3D -{ - ISREL3D_FRONT = 0, - ISREL3D_BACK, - ISREL3D_PLANAR, - ISREL3D_SPANNING, - ISREL3D_CLIPPED -}; - -//! Template plane class with some intersection testing methods. -/** It has to be ensured, that the normal is always normalized. The constructors - and setters of this class will not ensure this automatically. So any normal - passed in has to be normalized in advance. No change to the normal will be - made by any of the class methods. -*/ -template <class T> -class plane3d -{ - public: - - // Constructors - - plane3d(): Normal(0,1,0) { recalculateD(vector3d<T>(0,0,0)); } - - plane3d(const vector3d<T>& MPoint, const vector3d<T>& Normal) : Normal(Normal) { recalculateD(MPoint); } - - plane3d(T px, T py, T pz, T nx, T ny, T nz) : Normal(nx, ny, nz) { recalculateD(vector3d<T>(px, py, pz)); } - - plane3d(const vector3d<T>& point1, const vector3d<T>& point2, const vector3d<T>& point3) - { setPlane(point1, point2, point3); } - - plane3d(const vector3d<T> & normal, const T d) : Normal(normal), D(d) { } - - // operators - - inline bool operator==(const plane3d<T>& other) const { return (equals(D, other.D) && Normal==other.Normal);} - - inline bool operator!=(const plane3d<T>& other) const { return !(*this == other);} - - // functions - - void setPlane(const vector3d<T>& point, const vector3d<T>& nvector) - { - Normal = nvector; - recalculateD(point); - } - - void setPlane(const vector3d<T>& nvect, T d) - { - Normal = nvect; - D = d; - } - - void setPlane(const vector3d<T>& point1, const vector3d<T>& point2, const vector3d<T>& point3) - { - // creates the plane from 3 memberpoints - Normal = (point2 - point1).crossProduct(point3 - point1); - Normal.normalize(); - - recalculateD(point1); - } - - - //! Get an intersection with a 3d line. - /** \param lineVect Vector of the line to intersect with. - \param linePoint Point of the line to intersect with. - \param outIntersection Place to store the intersection point, if there is one. - \return True if there was an intersection, false if there was not. - */ - bool getIntersectionWithLine(const vector3d<T>& linePoint, - const vector3d<T>& lineVect, - vector3d<T>& outIntersection) const - { - T t2 = Normal.dotProduct(lineVect); - - if (t2 == 0) - return false; - - T t =- (Normal.dotProduct(linePoint) + D) / t2; - outIntersection = linePoint + (lineVect * t); - return true; - } - - //! Get percentage of line between two points where an intersection with this plane happens. - /** Only useful if known that there is an intersection. - \param linePoint1 Point1 of the line to intersect with. - \param linePoint2 Point2 of the line to intersect with. - \return Where on a line between two points an intersection with this plane happened. - For example, 0.5 is returned if the intersection happened exactly in the middle of the two points. - */ - f32 getKnownIntersectionWithLine(const vector3d<T>& linePoint1, - const vector3d<T>& linePoint2) const - { - vector3d<T> vect = linePoint2 - linePoint1; - T t2 = (f32)Normal.dotProduct(vect); - return (f32)-((Normal.dotProduct(linePoint1) + D) / t2); - } - - //! Get an intersection with a 3d line, limited between two 3d points. - /** \param linePoint1 Point 1 of the line. - \param linePoint2 Point 2 of the line. - \param outIntersection Place to store the intersection point, if there is one. - \return True if there was an intersection, false if there was not. - */ - bool getIntersectionWithLimitedLine( - const vector3d<T>& linePoint1, - const vector3d<T>& linePoint2, - vector3d<T>& outIntersection) const - { - return (getIntersectionWithLine(linePoint1, linePoint2 - linePoint1, outIntersection) && - outIntersection.isBetweenPoints(linePoint1, linePoint2)); - } - - //! Classifies the relation of a point to this plane. - /** \param point Point to classify its relation. - \return ISREL3D_FRONT if the point is in front of the plane, - ISREL3D_BACK if the point is behind of the plane, and - ISREL3D_PLANAR if the point is within the plane. */ - EIntersectionRelation3D classifyPointRelation(const vector3d<T>& point) const - { - const T d = Normal.dotProduct(point) + D; - - if (d < -ROUNDING_ERROR_f32) - return ISREL3D_BACK; - - if (d > ROUNDING_ERROR_f32) - return ISREL3D_FRONT; - - return ISREL3D_PLANAR; - } - - //! Recalculates the distance from origin by applying a new member point to the plane. - void recalculateD(const vector3d<T>& MPoint) - { - D = - MPoint.dotProduct(Normal); - } - - //! Gets a member point of the plane. - vector3d<T> getMemberPoint() const - { - return Normal * -D; - } - - //! Tests if there is an intersection with the other plane - /** \return True if there is a intersection. */ - bool existsIntersection(const plane3d<T>& other) const - { - vector3d<T> cross = other.Normal.crossProduct(Normal); - return cross.getLength() > core::ROUNDING_ERROR_f32; - } - - //! Intersects this plane with another. - /** \param other Other plane to intersect with. - \param outLinePoint Base point of intersection line. - \param outLineVect Vector of intersection. - \return True if there is a intersection, false if not. */ - bool getIntersectionWithPlane(const plane3d<T>& other, - vector3d<T>& outLinePoint, - vector3d<T>& outLineVect) const - { - const T fn00 = Normal.getLength(); - const T fn01 = Normal.dotProduct(other.Normal); - const T fn11 = other.Normal.getLength(); - const f64 det = fn00*fn11 - fn01*fn01; - - if (fabs(det) < ROUNDING_ERROR_f64 ) - return false; - - const f64 invdet = 1.0 / det; - const f64 fc0 = (fn11*-D + fn01*other.D) * invdet; - const f64 fc1 = (fn00*-other.D + fn01*D) * invdet; - - outLineVect = Normal.crossProduct(other.Normal); - outLinePoint = Normal*(T)fc0 + other.Normal*(T)fc1; - return true; - } - - //! Get the intersection point with two other planes if there is one. - bool getIntersectionWithPlanes(const plane3d<T>& o1, - const plane3d<T>& o2, vector3d<T>& outPoint) const - { - vector3d<T> linePoint, lineVect; - if (getIntersectionWithPlane(o1, linePoint, lineVect)) - return o2.getIntersectionWithLine(linePoint, lineVect, outPoint); - - return false; - } - - //! Test if the triangle would be front or backfacing from any point. - /** Thus, this method assumes a camera position from - which the triangle is definitely visible when looking into - the given direction. - Note that this only works if the normal is Normalized. - Do not use this method with points as it will give wrong results! - \param lookDirection: Look direction. - \return True if the plane is front facing and - false if it is backfacing. */ - bool isFrontFacing(const vector3d<T>& lookDirection) const - { - const f32 d = Normal.dotProduct(lookDirection); - return F32_LOWER_EQUAL_0 ( d ); - } - - //! Get the distance to a point. - /** Note that this only works if the normal is normalized. */ - T getDistanceTo(const vector3d<T>& point) const - { - return point.dotProduct(Normal) + D; - } - - //! Normal vector of the plane. - vector3d<T> Normal; - - //! Distance from origin. - T D; -}; - - -//! Typedef for a f32 3d plane. -typedef plane3d<f32> plane3df; - -//! Typedef for an integer 3d plane. -typedef plane3d<s32> plane3di; - -} // end namespace core -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/position2d.h b/builddir/irrlicht-1.8.1/include/position2d.h deleted file mode 100644 index 05a27c6..0000000 --- a/builddir/irrlicht-1.8.1/include/position2d.h +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -//! As of Irrlicht 1.6, position2d is a synonym for vector2d. -/** You should consider position2d to be deprecated, and use vector2d by preference. */ - -#ifndef __IRR_POSITION_H_INCLUDED__ -#define __IRR_POSITION_H_INCLUDED__ - -#include "vector2d.h" - -namespace irr -{ -namespace core -{ - -// Use typedefs where possible as they are more explicit... - -//! \deprecated position2d is now a synonym for vector2d, but vector2d should be used directly. -typedef vector2d<f32> position2df; - -//! \deprecated position2d is now a synonym for vector2d, but vector2d should be used directly. -typedef vector2d<s32> position2di; -} // namespace core -} // namespace irr - -// ...and use a #define to catch the rest, for (e.g.) position2d<f64> -#define position2d vector2d - -#endif // __IRR_POSITION_H_INCLUDED__ - diff --git a/builddir/irrlicht-1.8.1/include/quaternion.h b/builddir/irrlicht-1.8.1/include/quaternion.h deleted file mode 100644 index 130ba8c..0000000 --- a/builddir/irrlicht-1.8.1/include/quaternion.h +++ /dev/null @@ -1,696 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_QUATERNION_H_INCLUDED__ -#define __IRR_QUATERNION_H_INCLUDED__ - -#include "irrTypes.h" -#include "irrMath.h" -#include "matrix4.h" -#include "vector3d.h" - -// Between Irrlicht 1.7 and Irrlicht 1.8 the quaternion-matrix conversions got fixed. -// This define disables all involved functions completely to allow finding all places -// where the wrong conversions had been in use. -#define IRR_TEST_BROKEN_QUATERNION_USE 0 - -namespace irr -{ -namespace core -{ - -//! Quaternion class for representing rotations. -/** It provides cheap combinations and avoids gimbal locks. -Also useful for interpolations. */ -class quaternion -{ - public: - - //! Default Constructor - quaternion() : X(0.0f), Y(0.0f), Z(0.0f), W(1.0f) {} - - //! Constructor - quaternion(f32 x, f32 y, f32 z, f32 w) : X(x), Y(y), Z(z), W(w) { } - - //! Constructor which converts euler angles (radians) to a quaternion - quaternion(f32 x, f32 y, f32 z); - - //! Constructor which converts euler angles (radians) to a quaternion - quaternion(const vector3df& vec); - -#if !IRR_TEST_BROKEN_QUATERNION_USE - //! Constructor which converts a matrix to a quaternion - quaternion(const matrix4& mat); -#endif - - //! Equalilty operator - bool operator==(const quaternion& other) const; - - //! inequality operator - bool operator!=(const quaternion& other) const; - - //! Assignment operator - inline quaternion& operator=(const quaternion& other); - -#if !IRR_TEST_BROKEN_QUATERNION_USE - //! Matrix assignment operator - inline quaternion& operator=(const matrix4& other); -#endif - - //! Add operator - quaternion operator+(const quaternion& other) const; - - //! Multiplication operator - quaternion operator*(const quaternion& other) const; - - //! Multiplication operator with scalar - quaternion operator*(f32 s) const; - - //! Multiplication operator with scalar - quaternion& operator*=(f32 s); - - //! Multiplication operator - vector3df operator*(const vector3df& v) const; - - //! Multiplication operator - quaternion& operator*=(const quaternion& other); - - //! Calculates the dot product - inline f32 dotProduct(const quaternion& other) const; - - //! Sets new quaternion - inline quaternion& set(f32 x, f32 y, f32 z, f32 w); - - //! Sets new quaternion based on euler angles (radians) - inline quaternion& set(f32 x, f32 y, f32 z); - - //! Sets new quaternion based on euler angles (radians) - inline quaternion& set(const core::vector3df& vec); - - //! Sets new quaternion from other quaternion - inline quaternion& set(const core::quaternion& quat); - - //! returns if this quaternion equals the other one, taking floating point rounding errors into account - inline bool equals(const quaternion& other, - const f32 tolerance = ROUNDING_ERROR_f32 ) const; - - //! Normalizes the quaternion - inline quaternion& normalize(); - -#if !IRR_TEST_BROKEN_QUATERNION_USE - //! Creates a matrix from this quaternion - matrix4 getMatrix() const; -#endif - - //! Creates a matrix from this quaternion - void getMatrix( matrix4 &dest, const core::vector3df &translation=core::vector3df() ) const; - - /*! - Creates a matrix from this quaternion - Rotate about a center point - shortcut for - core::quaternion q; - q.rotationFromTo ( vin[i].Normal, forward ); - q.getMatrixCenter ( lookat, center, newPos ); - - core::matrix4 m2; - m2.setInverseTranslation ( center ); - lookat *= m2; - - core::matrix4 m3; - m2.setTranslation ( newPos ); - lookat *= m3; - - */ - void getMatrixCenter( matrix4 &dest, const core::vector3df ¢er, const core::vector3df &translation ) const; - - //! Creates a matrix from this quaternion - inline void getMatrix_transposed( matrix4 &dest ) const; - - //! Inverts this quaternion - quaternion& makeInverse(); - - //! Set this quaternion to the linear interpolation between two quaternions - /** \param q1 First quaternion to be interpolated. - \param q2 Second quaternion to be interpolated. - \param time Progress of interpolation. For time=0 the result is - q1, for time=1 the result is q2. Otherwise interpolation - between q1 and q2. - */ - quaternion& lerp(quaternion q1, quaternion q2, f32 time); - - //! Set this quaternion to the result of the spherical interpolation between two quaternions - /** \param q1 First quaternion to be interpolated. - \param q2 Second quaternion to be interpolated. - \param time Progress of interpolation. For time=0 the result is - q1, for time=1 the result is q2. Otherwise interpolation - between q1 and q2. - \param threshold To avoid inaccuracies at the end (time=1) the - interpolation switches to linear interpolation at some point. - This value defines how much of the remaining interpolation will - be calculated with lerp. Everything from 1-threshold up will be - linear interpolation. - */ - quaternion& slerp(quaternion q1, quaternion q2, - f32 time, f32 threshold=.05f); - - //! Create quaternion from rotation angle and rotation axis. - /** Axis must be unit length. - The quaternion representing the rotation is - q = cos(A/2)+sin(A/2)*(x*i+y*j+z*k). - \param angle Rotation Angle in radians. - \param axis Rotation axis. */ - quaternion& fromAngleAxis (f32 angle, const vector3df& axis); - - //! Fills an angle (radians) around an axis (unit vector) - void toAngleAxis (f32 &angle, core::vector3df& axis) const; - - //! Output this quaternion to an euler angle (radians) - void toEuler(vector3df& euler) const; - - //! Set quaternion to identity - quaternion& makeIdentity(); - - //! Set quaternion to represent a rotation from one vector to another. - quaternion& rotationFromTo(const vector3df& from, const vector3df& to); - - //! Quaternion elements. - f32 X; // vectorial (imaginary) part - f32 Y; - f32 Z; - f32 W; // real part -}; - - -// Constructor which converts euler angles to a quaternion -inline quaternion::quaternion(f32 x, f32 y, f32 z) -{ - set(x,y,z); -} - - -// Constructor which converts euler angles to a quaternion -inline quaternion::quaternion(const vector3df& vec) -{ - set(vec.X,vec.Y,vec.Z); -} - -#if !IRR_TEST_BROKEN_QUATERNION_USE -// Constructor which converts a matrix to a quaternion -inline quaternion::quaternion(const matrix4& mat) -{ - (*this) = mat; -} -#endif - -// equal operator -inline bool quaternion::operator==(const quaternion& other) const -{ - return ((X == other.X) && - (Y == other.Y) && - (Z == other.Z) && - (W == other.W)); -} - -// inequality operator -inline bool quaternion::operator!=(const quaternion& other) const -{ - return !(*this == other); -} - -// assignment operator -inline quaternion& quaternion::operator=(const quaternion& other) -{ - X = other.X; - Y = other.Y; - Z = other.Z; - W = other.W; - return *this; -} - -#if !IRR_TEST_BROKEN_QUATERNION_USE -// matrix assignment operator -inline quaternion& quaternion::operator=(const matrix4& m) -{ - const f32 diag = m[0] + m[5] + m[10] + 1; - - if( diag > 0.0f ) - { - const f32 scale = sqrtf(diag) * 2.0f; // get scale from diagonal - - // TODO: speed this up - X = (m[6] - m[9]) / scale; - Y = (m[8] - m[2]) / scale; - Z = (m[1] - m[4]) / scale; - W = 0.25f * scale; - } - else - { - if (m[0]>m[5] && m[0]>m[10]) - { - // 1st element of diag is greatest value - // find scale according to 1st element, and double it - const f32 scale = sqrtf(1.0f + m[0] - m[5] - m[10]) * 2.0f; - - // TODO: speed this up - X = 0.25f * scale; - Y = (m[4] + m[1]) / scale; - Z = (m[2] + m[8]) / scale; - W = (m[6] - m[9]) / scale; - } - else if (m[5]>m[10]) - { - // 2nd element of diag is greatest value - // find scale according to 2nd element, and double it - const f32 scale = sqrtf(1.0f + m[5] - m[0] - m[10]) * 2.0f; - - // TODO: speed this up - X = (m[4] + m[1]) / scale; - Y = 0.25f * scale; - Z = (m[9] + m[6]) / scale; - W = (m[8] - m[2]) / scale; - } - else - { - // 3rd element of diag is greatest value - // find scale according to 3rd element, and double it - const f32 scale = sqrtf(1.0f + m[10] - m[0] - m[5]) * 2.0f; - - // TODO: speed this up - X = (m[8] + m[2]) / scale; - Y = (m[9] + m[6]) / scale; - Z = 0.25f * scale; - W = (m[1] - m[4]) / scale; - } - } - - return normalize(); -} -#endif - - -// multiplication operator -inline quaternion quaternion::operator*(const quaternion& other) const -{ - quaternion tmp; - - tmp.W = (other.W * W) - (other.X * X) - (other.Y * Y) - (other.Z * Z); - tmp.X = (other.W * X) + (other.X * W) + (other.Y * Z) - (other.Z * Y); - tmp.Y = (other.W * Y) + (other.Y * W) + (other.Z * X) - (other.X * Z); - tmp.Z = (other.W * Z) + (other.Z * W) + (other.X * Y) - (other.Y * X); - - return tmp; -} - - -// multiplication operator -inline quaternion quaternion::operator*(f32 s) const -{ - return quaternion(s*X, s*Y, s*Z, s*W); -} - - -// multiplication operator -inline quaternion& quaternion::operator*=(f32 s) -{ - X*=s; - Y*=s; - Z*=s; - W*=s; - return *this; -} - -// multiplication operator -inline quaternion& quaternion::operator*=(const quaternion& other) -{ - return (*this = other * (*this)); -} - -// add operator -inline quaternion quaternion::operator+(const quaternion& b) const -{ - return quaternion(X+b.X, Y+b.Y, Z+b.Z, W+b.W); -} - -#if !IRR_TEST_BROKEN_QUATERNION_USE -// Creates a matrix from this quaternion -inline matrix4 quaternion::getMatrix() const -{ - core::matrix4 m; - getMatrix(m); - return m; -} -#endif - -/*! - Creates a matrix from this quaternion -*/ -inline void quaternion::getMatrix(matrix4 &dest, - const core::vector3df ¢er) const -{ - dest[0] = 1.0f - 2.0f*Y*Y - 2.0f*Z*Z; - dest[1] = 2.0f*X*Y + 2.0f*Z*W; - dest[2] = 2.0f*X*Z - 2.0f*Y*W; - dest[3] = 0.0f; - - dest[4] = 2.0f*X*Y - 2.0f*Z*W; - dest[5] = 1.0f - 2.0f*X*X - 2.0f*Z*Z; - dest[6] = 2.0f*Z*Y + 2.0f*X*W; - dest[7] = 0.0f; - - dest[8] = 2.0f*X*Z + 2.0f*Y*W; - dest[9] = 2.0f*Z*Y - 2.0f*X*W; - dest[10] = 1.0f - 2.0f*X*X - 2.0f*Y*Y; - dest[11] = 0.0f; - - dest[12] = center.X; - dest[13] = center.Y; - dest[14] = center.Z; - dest[15] = 1.f; - - dest.setDefinitelyIdentityMatrix ( false ); -} - - -/*! - Creates a matrix from this quaternion - Rotate about a center point - shortcut for - core::quaternion q; - q.rotationFromTo(vin[i].Normal, forward); - q.getMatrix(lookat, center); - - core::matrix4 m2; - m2.setInverseTranslation(center); - lookat *= m2; -*/ -inline void quaternion::getMatrixCenter(matrix4 &dest, - const core::vector3df ¢er, - const core::vector3df &translation) const -{ - dest[0] = 1.0f - 2.0f*Y*Y - 2.0f*Z*Z; - dest[1] = 2.0f*X*Y + 2.0f*Z*W; - dest[2] = 2.0f*X*Z - 2.0f*Y*W; - dest[3] = 0.0f; - - dest[4] = 2.0f*X*Y - 2.0f*Z*W; - dest[5] = 1.0f - 2.0f*X*X - 2.0f*Z*Z; - dest[6] = 2.0f*Z*Y + 2.0f*X*W; - dest[7] = 0.0f; - - dest[8] = 2.0f*X*Z + 2.0f*Y*W; - dest[9] = 2.0f*Z*Y - 2.0f*X*W; - dest[10] = 1.0f - 2.0f*X*X - 2.0f*Y*Y; - dest[11] = 0.0f; - - dest.setRotationCenter ( center, translation ); -} - -// Creates a matrix from this quaternion -inline void quaternion::getMatrix_transposed(matrix4 &dest) const -{ - dest[0] = 1.0f - 2.0f*Y*Y - 2.0f*Z*Z; - dest[4] = 2.0f*X*Y + 2.0f*Z*W; - dest[8] = 2.0f*X*Z - 2.0f*Y*W; - dest[12] = 0.0f; - - dest[1] = 2.0f*X*Y - 2.0f*Z*W; - dest[5] = 1.0f - 2.0f*X*X - 2.0f*Z*Z; - dest[9] = 2.0f*Z*Y + 2.0f*X*W; - dest[13] = 0.0f; - - dest[2] = 2.0f*X*Z + 2.0f*Y*W; - dest[6] = 2.0f*Z*Y - 2.0f*X*W; - dest[10] = 1.0f - 2.0f*X*X - 2.0f*Y*Y; - dest[14] = 0.0f; - - dest[3] = 0.f; - dest[7] = 0.f; - dest[11] = 0.f; - dest[15] = 1.f; - - dest.setDefinitelyIdentityMatrix(false); -} - - -// Inverts this quaternion -inline quaternion& quaternion::makeInverse() -{ - X = -X; Y = -Y; Z = -Z; - return *this; -} - - -// sets new quaternion -inline quaternion& quaternion::set(f32 x, f32 y, f32 z, f32 w) -{ - X = x; - Y = y; - Z = z; - W = w; - return *this; -} - - -// sets new quaternion based on euler angles -inline quaternion& quaternion::set(f32 x, f32 y, f32 z) -{ - f64 angle; - - angle = x * 0.5; - const f64 sr = sin(angle); - const f64 cr = cos(angle); - - angle = y * 0.5; - const f64 sp = sin(angle); - const f64 cp = cos(angle); - - angle = z * 0.5; - const f64 sy = sin(angle); - const f64 cy = cos(angle); - - const f64 cpcy = cp * cy; - const f64 spcy = sp * cy; - const f64 cpsy = cp * sy; - const f64 spsy = sp * sy; - - X = (f32)(sr * cpcy - cr * spsy); - Y = (f32)(cr * spcy + sr * cpsy); - Z = (f32)(cr * cpsy - sr * spcy); - W = (f32)(cr * cpcy + sr * spsy); - - return normalize(); -} - -// sets new quaternion based on euler angles -inline quaternion& quaternion::set(const core::vector3df& vec) -{ - return set(vec.X, vec.Y, vec.Z); -} - -// sets new quaternion based on other quaternion -inline quaternion& quaternion::set(const core::quaternion& quat) -{ - return (*this=quat); -} - - -//! returns if this quaternion equals the other one, taking floating point rounding errors into account -inline bool quaternion::equals(const quaternion& other, const f32 tolerance) const -{ - return core::equals(X, other.X, tolerance) && - core::equals(Y, other.Y, tolerance) && - core::equals(Z, other.Z, tolerance) && - core::equals(W, other.W, tolerance); -} - - -// normalizes the quaternion -inline quaternion& quaternion::normalize() -{ - const f32 n = X*X + Y*Y + Z*Z + W*W; - - if (n == 1) - return *this; - - //n = 1.0f / sqrtf(n); - return (*this *= reciprocal_squareroot ( n )); -} - - -// set this quaternion to the result of the linear interpolation between two quaternions -inline quaternion& quaternion::lerp(quaternion q1, quaternion q2, f32 time) -{ - const f32 scale = 1.0f - time; - return (*this = (q1*scale) + (q2*time)); -} - - -// set this quaternion to the result of the interpolation between two quaternions -inline quaternion& quaternion::slerp(quaternion q1, quaternion q2, f32 time, f32 threshold) -{ - f32 angle = q1.dotProduct(q2); - - // make sure we use the short rotation - if (angle < 0.0f) - { - q1 *= -1.0f; - angle *= -1.0f; - } - - if (angle <= (1-threshold)) // spherical interpolation - { - const f32 theta = acosf(angle); - const f32 invsintheta = reciprocal(sinf(theta)); - const f32 scale = sinf(theta * (1.0f-time)) * invsintheta; - const f32 invscale = sinf(theta * time) * invsintheta; - return (*this = (q1*scale) + (q2*invscale)); - } - else // linear interploation - return lerp(q1,q2,time); -} - - -// calculates the dot product -inline f32 quaternion::dotProduct(const quaternion& q2) const -{ - return (X * q2.X) + (Y * q2.Y) + (Z * q2.Z) + (W * q2.W); -} - - -//! axis must be unit length, angle in radians -inline quaternion& quaternion::fromAngleAxis(f32 angle, const vector3df& axis) -{ - const f32 fHalfAngle = 0.5f*angle; - const f32 fSin = sinf(fHalfAngle); - W = cosf(fHalfAngle); - X = fSin*axis.X; - Y = fSin*axis.Y; - Z = fSin*axis.Z; - return *this; -} - - -inline void quaternion::toAngleAxis(f32 &angle, core::vector3df &axis) const -{ - const f32 scale = sqrtf(X*X + Y*Y + Z*Z); - - if (core::iszero(scale) || W > 1.0f || W < -1.0f) - { - angle = 0.0f; - axis.X = 0.0f; - axis.Y = 1.0f; - axis.Z = 0.0f; - } - else - { - const f32 invscale = reciprocal(scale); - angle = 2.0f * acosf(W); - axis.X = X * invscale; - axis.Y = Y * invscale; - axis.Z = Z * invscale; - } -} - -inline void quaternion::toEuler(vector3df& euler) const -{ - const f64 sqw = W*W; - const f64 sqx = X*X; - const f64 sqy = Y*Y; - const f64 sqz = Z*Z; - const f64 test = 2.0 * (Y*W - X*Z); - - if (core::equals(test, 1.0, 0.000001)) - { - // heading = rotation about z-axis - euler.Z = (f32) (-2.0*atan2(X, W)); - // bank = rotation about x-axis - euler.X = 0; - // attitude = rotation about y-axis - euler.Y = (f32) (core::PI64/2.0); - } - else if (core::equals(test, -1.0, 0.000001)) - { - // heading = rotation about z-axis - euler.Z = (f32) (2.0*atan2(X, W)); - // bank = rotation about x-axis - euler.X = 0; - // attitude = rotation about y-axis - euler.Y = (f32) (core::PI64/-2.0); - } - else - { - // heading = rotation about z-axis - euler.Z = (f32) atan2(2.0 * (X*Y +Z*W),(sqx - sqy - sqz + sqw)); - // bank = rotation about x-axis - euler.X = (f32) atan2(2.0 * (Y*Z +X*W),(-sqx - sqy + sqz + sqw)); - // attitude = rotation about y-axis - euler.Y = (f32) asin( clamp(test, -1.0, 1.0) ); - } -} - - -inline vector3df quaternion::operator* (const vector3df& v) const -{ - // nVidia SDK implementation - - vector3df uv, uuv; - vector3df qvec(X, Y, Z); - uv = qvec.crossProduct(v); - uuv = qvec.crossProduct(uv); - uv *= (2.0f * W); - uuv *= 2.0f; - - return v + uv + uuv; -} - -// set quaternion to identity -inline core::quaternion& quaternion::makeIdentity() -{ - W = 1.f; - X = 0.f; - Y = 0.f; - Z = 0.f; - return *this; -} - -inline core::quaternion& quaternion::rotationFromTo(const vector3df& from, const vector3df& to) -{ - // Based on Stan Melax's article in Game Programming Gems - // Copy, since cannot modify local - vector3df v0 = from; - vector3df v1 = to; - v0.normalize(); - v1.normalize(); - - const f32 d = v0.dotProduct(v1); - if (d >= 1.0f) // If dot == 1, vectors are the same - { - return makeIdentity(); - } - else if (d <= -1.0f) // exactly opposite - { - core::vector3df axis(1.0f, 0.f, 0.f); - axis = axis.crossProduct(v0); - if (axis.getLength()==0) - { - axis.set(0.f,1.f,0.f); - axis = axis.crossProduct(v0); - } - // same as fromAngleAxis(core::PI, axis).normalize(); - return set(axis.X, axis.Y, axis.Z, 0).normalize(); - } - - const f32 s = sqrtf( (1+d)*2 ); // optimize inv_sqrt - const f32 invs = 1.f / s; - const vector3df c = v0.crossProduct(v1)*invs; - return set(c.X, c.Y, c.Z, s * 0.5f).normalize(); -} - - -} // end namespace core -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/rect.h b/builddir/irrlicht-1.8.1/include/rect.h deleted file mode 100644 index 1e2572c..0000000 --- a/builddir/irrlicht-1.8.1/include/rect.h +++ /dev/null @@ -1,279 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_RECT_H_INCLUDED__ -#define __IRR_RECT_H_INCLUDED__ - -#include "irrTypes.h" -#include "dimension2d.h" -#include "position2d.h" - -namespace irr -{ -namespace core -{ - - //! Rectangle template. - /** Mostly used by 2D GUI elements and for 2D drawing methods. - It has 2 positions instead of position and dimension and a fast - method for collision detection with other rectangles and points. - - Coordinates are (0,0) for top-left corner, and increasing to the right - and to the bottom. - */ - template <class T> - class rect - { - public: - - //! Default constructor creating empty rectangle at (0,0) - rect() : UpperLeftCorner(0,0), LowerRightCorner(0,0) {} - - //! Constructor with two corners - rect(T x, T y, T x2, T y2) - : UpperLeftCorner(x,y), LowerRightCorner(x2,y2) {} - - //! Constructor with two corners - rect(const position2d<T>& upperLeft, const position2d<T>& lowerRight) - : UpperLeftCorner(upperLeft), LowerRightCorner(lowerRight) {} - - //! Constructor with upper left corner and dimension - template <class U> - rect(const position2d<T>& pos, const dimension2d<U>& size) - : UpperLeftCorner(pos), LowerRightCorner(pos.X + size.Width, pos.Y + size.Height) {} - - //! move right by given numbers - rect<T> operator+(const position2d<T>& pos) const - { - rect<T> ret(*this); - return ret+=pos; - } - - //! move right by given numbers - rect<T>& operator+=(const position2d<T>& pos) - { - UpperLeftCorner += pos; - LowerRightCorner += pos; - return *this; - } - - //! move left by given numbers - rect<T> operator-(const position2d<T>& pos) const - { - rect<T> ret(*this); - return ret-=pos; - } - - //! move left by given numbers - rect<T>& operator-=(const position2d<T>& pos) - { - UpperLeftCorner -= pos; - LowerRightCorner -= pos; - return *this; - } - - //! equality operator - bool operator==(const rect<T>& other) const - { - return (UpperLeftCorner == other.UpperLeftCorner && - LowerRightCorner == other.LowerRightCorner); - } - - //! inequality operator - bool operator!=(const rect<T>& other) const - { - return (UpperLeftCorner != other.UpperLeftCorner || - LowerRightCorner != other.LowerRightCorner); - } - - //! compares size of rectangles - bool operator<(const rect<T>& other) const - { - return getArea() < other.getArea(); - } - - //! Returns size of rectangle - T getArea() const - { - return getWidth() * getHeight(); - } - - //! Returns if a 2d point is within this rectangle. - /** \param pos Position to test if it lies within this rectangle. - \return True if the position is within the rectangle, false if not. */ - bool isPointInside(const position2d<T>& pos) const - { - return (UpperLeftCorner.X <= pos.X && - UpperLeftCorner.Y <= pos.Y && - LowerRightCorner.X >= pos.X && - LowerRightCorner.Y >= pos.Y); - } - - //! Check if the rectangle collides with another rectangle. - /** \param other Rectangle to test collision with - \return True if the rectangles collide. */ - bool isRectCollided(const rect<T>& other) const - { - return (LowerRightCorner.Y > other.UpperLeftCorner.Y && - UpperLeftCorner.Y < other.LowerRightCorner.Y && - LowerRightCorner.X > other.UpperLeftCorner.X && - UpperLeftCorner.X < other.LowerRightCorner.X); - } - - //! Clips this rectangle with another one. - /** \param other Rectangle to clip with */ - void clipAgainst(const rect<T>& other) - { - if (other.LowerRightCorner.X < LowerRightCorner.X) - LowerRightCorner.X = other.LowerRightCorner.X; - if (other.LowerRightCorner.Y < LowerRightCorner.Y) - LowerRightCorner.Y = other.LowerRightCorner.Y; - - if (other.UpperLeftCorner.X > UpperLeftCorner.X) - UpperLeftCorner.X = other.UpperLeftCorner.X; - if (other.UpperLeftCorner.Y > UpperLeftCorner.Y) - UpperLeftCorner.Y = other.UpperLeftCorner.Y; - - // correct possible invalid rect resulting from clipping - if (UpperLeftCorner.Y > LowerRightCorner.Y) - UpperLeftCorner.Y = LowerRightCorner.Y; - if (UpperLeftCorner.X > LowerRightCorner.X) - UpperLeftCorner.X = LowerRightCorner.X; - } - - //! Moves this rectangle to fit inside another one. - /** \return True on success, false if not possible */ - bool constrainTo(const rect<T>& other) - { - if (other.getWidth() < getWidth() || other.getHeight() < getHeight()) - return false; - - T diff = other.LowerRightCorner.X - LowerRightCorner.X; - if (diff < 0) - { - LowerRightCorner.X += diff; - UpperLeftCorner.X += diff; - } - - diff = other.LowerRightCorner.Y - LowerRightCorner.Y; - if (diff < 0) - { - LowerRightCorner.Y += diff; - UpperLeftCorner.Y += diff; - } - - diff = UpperLeftCorner.X - other.UpperLeftCorner.X; - if (diff < 0) - { - UpperLeftCorner.X -= diff; - LowerRightCorner.X -= diff; - } - - diff = UpperLeftCorner.Y - other.UpperLeftCorner.Y; - if (diff < 0) - { - UpperLeftCorner.Y -= diff; - LowerRightCorner.Y -= diff; - } - - return true; - } - - //! Get width of rectangle. - T getWidth() const - { - return LowerRightCorner.X - UpperLeftCorner.X; - } - - //! Get height of rectangle. - T getHeight() const - { - return LowerRightCorner.Y - UpperLeftCorner.Y; - } - - //! If the lower right corner of the rect is smaller then the upper left, the points are swapped. - void repair() - { - if (LowerRightCorner.X < UpperLeftCorner.X) - { - T t = LowerRightCorner.X; - LowerRightCorner.X = UpperLeftCorner.X; - UpperLeftCorner.X = t; - } - - if (LowerRightCorner.Y < UpperLeftCorner.Y) - { - T t = LowerRightCorner.Y; - LowerRightCorner.Y = UpperLeftCorner.Y; - UpperLeftCorner.Y = t; - } - } - - //! Returns if the rect is valid to draw. - /** It would be invalid if the UpperLeftCorner is lower or more - right than the LowerRightCorner. */ - bool isValid() const - { - return ((LowerRightCorner.X >= UpperLeftCorner.X) && - (LowerRightCorner.Y >= UpperLeftCorner.Y)); - } - - //! Get the center of the rectangle - position2d<T> getCenter() const - { - return position2d<T>( - (UpperLeftCorner.X + LowerRightCorner.X) / 2, - (UpperLeftCorner.Y + LowerRightCorner.Y) / 2); - } - - //! Get the dimensions of the rectangle - dimension2d<T> getSize() const - { - return dimension2d<T>(getWidth(), getHeight()); - } - - - //! Adds a point to the rectangle - /** Causes the rectangle to grow bigger if point is outside of - the box - \param p Point to add to the box. */ - void addInternalPoint(const position2d<T>& p) - { - addInternalPoint(p.X, p.Y); - } - - //! Adds a point to the bounding rectangle - /** Causes the rectangle to grow bigger if point is outside of - the box - \param x X-Coordinate of the point to add to this box. - \param y Y-Coordinate of the point to add to this box. */ - void addInternalPoint(T x, T y) - { - if (x>LowerRightCorner.X) - LowerRightCorner.X = x; - if (y>LowerRightCorner.Y) - LowerRightCorner.Y = y; - - if (x<UpperLeftCorner.X) - UpperLeftCorner.X = x; - if (y<UpperLeftCorner.Y) - UpperLeftCorner.Y = y; - } - - //! Upper left corner - position2d<T> UpperLeftCorner; - //! Lower right corner - position2d<T> LowerRightCorner; - }; - - //! Rectangle with float values - typedef rect<f32> rectf; - //! Rectangle with int values - typedef rect<s32> recti; - -} // end namespace core -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/triangle3d.h b/builddir/irrlicht-1.8.1/include/triangle3d.h deleted file mode 100644 index dbf8a8b..0000000 --- a/builddir/irrlicht-1.8.1/include/triangle3d.h +++ /dev/null @@ -1,279 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_TRIANGLE_3D_H_INCLUDED__ -#define __IRR_TRIANGLE_3D_H_INCLUDED__ - -#include "vector3d.h" -#include "line3d.h" -#include "plane3d.h" -#include "aabbox3d.h" - -namespace irr -{ -namespace core -{ - - //! 3d triangle template class for doing collision detection and other things. - template <class T> - class triangle3d - { - public: - - //! Constructor for an all 0 triangle - triangle3d() {} - //! Constructor for triangle with given three vertices - triangle3d(vector3d<T> v1, vector3d<T> v2, vector3d<T> v3) : pointA(v1), pointB(v2), pointC(v3) {} - - //! Equality operator - bool operator==(const triangle3d<T>& other) const - { - return other.pointA==pointA && other.pointB==pointB && other.pointC==pointC; - } - - //! Inequality operator - bool operator!=(const triangle3d<T>& other) const - { - return !(*this==other); - } - - //! Determines if the triangle is totally inside a bounding box. - /** \param box Box to check. - \return True if triangle is within the box, otherwise false. */ - bool isTotalInsideBox(const aabbox3d<T>& box) const - { - return (box.isPointInside(pointA) && - box.isPointInside(pointB) && - box.isPointInside(pointC)); - } - - //! Determines if the triangle is totally outside a bounding box. - /** \param box Box to check. - \return True if triangle is outside the box, otherwise false. */ - bool isTotalOutsideBox(const aabbox3d<T>& box) const - { - return ((pointA.X > box.MaxEdge.X && pointB.X > box.MaxEdge.X && pointC.X > box.MaxEdge.X) || - - (pointA.Y > box.MaxEdge.Y && pointB.Y > box.MaxEdge.Y && pointC.Y > box.MaxEdge.Y) || - (pointA.Z > box.MaxEdge.Z && pointB.Z > box.MaxEdge.Z && pointC.Z > box.MaxEdge.Z) || - (pointA.X < box.MinEdge.X && pointB.X < box.MinEdge.X && pointC.X < box.MinEdge.X) || - (pointA.Y < box.MinEdge.Y && pointB.Y < box.MinEdge.Y && pointC.Y < box.MinEdge.Y) || - (pointA.Z < box.MinEdge.Z && pointB.Z < box.MinEdge.Z && pointC.Z < box.MinEdge.Z)); - } - - //! Get the closest point on a triangle to a point on the same plane. - /** \param p Point which must be on the same plane as the triangle. - \return The closest point of the triangle */ - core::vector3d<T> closestPointOnTriangle(const core::vector3d<T>& p) const - { - const core::vector3d<T> rab = line3d<T>(pointA, pointB).getClosestPoint(p); - const core::vector3d<T> rbc = line3d<T>(pointB, pointC).getClosestPoint(p); - const core::vector3d<T> rca = line3d<T>(pointC, pointA).getClosestPoint(p); - - const T d1 = rab.getDistanceFrom(p); - const T d2 = rbc.getDistanceFrom(p); - const T d3 = rca.getDistanceFrom(p); - - if (d1 < d2) - return d1 < d3 ? rab : rca; - - return d2 < d3 ? rbc : rca; - } - - //! Check if a point is inside the triangle (border-points count also as inside) - /* - \param p Point to test. Assumes that this point is already - on the plane of the triangle. - \return True if the point is inside the triangle, otherwise false. */ - bool isPointInside(const vector3d<T>& p) const - { - vector3d<f64> af64((f64)pointA.X, (f64)pointA.Y, (f64)pointA.Z); - vector3d<f64> bf64((f64)pointB.X, (f64)pointB.Y, (f64)pointB.Z); - vector3d<f64> cf64((f64)pointC.X, (f64)pointC.Y, (f64)pointC.Z); - vector3d<f64> pf64((f64)p.X, (f64)p.Y, (f64)p.Z); - return (isOnSameSide(pf64, af64, bf64, cf64) && - isOnSameSide(pf64, bf64, af64, cf64) && - isOnSameSide(pf64, cf64, af64, bf64)); - } - - //! Check if a point is inside the triangle (border-points count also as inside) - /** This method uses a barycentric coordinate system. - It is faster than isPointInside but is more susceptible to floating point rounding - errors. This will especially be noticable when the FPU is in single precision mode - (which is for example set on default by Direct3D). - \param p Point to test. Assumes that this point is already - on the plane of the triangle. - \return True if point is inside the triangle, otherwise false. */ - bool isPointInsideFast(const vector3d<T>& p) const - { - const vector3d<T> a = pointC - pointA; - const vector3d<T> b = pointB - pointA; - const vector3d<T> c = p - pointA; - - const f64 dotAA = a.dotProduct( a); - const f64 dotAB = a.dotProduct( b); - const f64 dotAC = a.dotProduct( c); - const f64 dotBB = b.dotProduct( b); - const f64 dotBC = b.dotProduct( c); - - // get coordinates in barycentric coordinate system - const f64 invDenom = 1/(dotAA * dotBB - dotAB * dotAB); - const f64 u = (dotBB * dotAC - dotAB * dotBC) * invDenom; - const f64 v = (dotAA * dotBC - dotAB * dotAC ) * invDenom; - - // We count border-points as inside to keep downward compatibility. - // Rounding-error also needed for some test-cases. - return (u > -ROUNDING_ERROR_f32) && (v >= 0) && (u + v < 1+ROUNDING_ERROR_f32); - - } - - - //! Get an intersection with a 3d line. - /** \param line Line to intersect with. - \param outIntersection Place to store the intersection point, if there is one. - \return True if there was an intersection, false if not. */ - bool getIntersectionWithLimitedLine(const line3d<T>& line, - vector3d<T>& outIntersection) const - { - return getIntersectionWithLine(line.start, - line.getVector(), outIntersection) && - outIntersection.isBetweenPoints(line.start, line.end); - } - - - //! Get an intersection with a 3d line. - /** Please note that also points are returned as intersection which - are on the line, but not between the start and end point of the line. - If you want the returned point be between start and end - use getIntersectionWithLimitedLine(). - \param linePoint Point of the line to intersect with. - \param lineVect Vector of the line to intersect with. - \param outIntersection Place to store the intersection point, if there is one. - \return True if there was an intersection, false if there was not. */ - bool getIntersectionWithLine(const vector3d<T>& linePoint, - const vector3d<T>& lineVect, vector3d<T>& outIntersection) const - { - if (getIntersectionOfPlaneWithLine(linePoint, lineVect, outIntersection)) - return isPointInside(outIntersection); - - return false; - } - - - //! Calculates the intersection between a 3d line and the plane the triangle is on. - /** \param lineVect Vector of the line to intersect with. - \param linePoint Point of the line to intersect with. - \param outIntersection Place to store the intersection point, if there is one. - \return True if there was an intersection, else false. */ - bool getIntersectionOfPlaneWithLine(const vector3d<T>& linePoint, - const vector3d<T>& lineVect, vector3d<T>& outIntersection) const - { - // Work with f64 to get more precise results (makes enough difference to be worth the casts). - const vector3d<f64> linePointf64(linePoint.X, linePoint.Y, linePoint.Z); - const vector3d<f64> lineVectf64(lineVect.X, lineVect.Y, lineVect.Z); - vector3d<f64> outIntersectionf64; - - core::triangle3d<irr::f64> trianglef64(vector3d<f64>((f64)pointA.X, (f64)pointA.Y, (f64)pointA.Z) - ,vector3d<f64>((f64)pointB.X, (f64)pointB.Y, (f64)pointB.Z) - , vector3d<f64>((f64)pointC.X, (f64)pointC.Y, (f64)pointC.Z)); - const vector3d<irr::f64> normalf64 = trianglef64.getNormal().normalize(); - f64 t2; - - if ( core::iszero ( t2 = normalf64.dotProduct(lineVectf64) ) ) - return false; - - f64 d = trianglef64.pointA.dotProduct(normalf64); - f64 t = -(normalf64.dotProduct(linePointf64) - d) / t2; - outIntersectionf64 = linePointf64 + (lineVectf64 * t); - - outIntersection.X = (T)outIntersectionf64.X; - outIntersection.Y = (T)outIntersectionf64.Y; - outIntersection.Z = (T)outIntersectionf64.Z; - return true; - } - - - //! Get the normal of the triangle. - /** Please note: The normal is not always normalized. */ - vector3d<T> getNormal() const - { - return (pointB - pointA).crossProduct(pointC - pointA); - } - - //! Test if the triangle would be front or backfacing from any point. - /** Thus, this method assumes a camera position from which the - triangle is definitely visible when looking at the given direction. - Do not use this method with points as it will give wrong results! - \param lookDirection Look direction. - \return True if the plane is front facing and false if it is backfacing. */ - bool isFrontFacing(const vector3d<T>& lookDirection) const - { - const vector3d<T> n = getNormal().normalize(); - const f32 d = (f32)n.dotProduct(lookDirection); - return F32_LOWER_EQUAL_0(d); - } - - //! Get the plane of this triangle. - plane3d<T> getPlane() const - { - return plane3d<T>(pointA, pointB, pointC); - } - - //! Get the area of the triangle - T getArea() const - { - return (pointB - pointA).crossProduct(pointC - pointA).getLength() * 0.5f; - - } - - //! sets the triangle's points - void set(const core::vector3d<T>& a, const core::vector3d<T>& b, const core::vector3d<T>& c) - { - pointA = a; - pointB = b; - pointC = c; - } - - //! the three points of the triangle - vector3d<T> pointA; - vector3d<T> pointB; - vector3d<T> pointC; - - private: - // Using f64 instead of <T> to avoid integer overflows when T=int (maybe also less floating point troubles). - bool isOnSameSide(const vector3d<f64>& p1, const vector3d<f64>& p2, - const vector3d<f64>& a, const vector3d<f64>& b) const - { - vector3d<f64> bminusa = b - a; - vector3d<f64> cp1 = bminusa.crossProduct(p1 - a); - vector3d<f64> cp2 = bminusa.crossProduct(p2 - a); - f64 res = cp1.dotProduct(cp2); - if ( res < 0 ) - { - // This catches some floating point troubles. - // Unfortunately slightly expensive and we don't really know the best epsilon for iszero. - vector3d<f64> cp1 = bminusa.normalize().crossProduct((p1 - a).normalize()); - if ( core::iszero(cp1.X, (f64)ROUNDING_ERROR_f32) - && core::iszero(cp1.Y, (f64)ROUNDING_ERROR_f32) - && core::iszero(cp1.Z, (f64)ROUNDING_ERROR_f32) ) - { - res = 0.f; - } - } - return (res >= 0.0f); - } - }; - - - //! Typedef for a f32 3d triangle. - typedef triangle3d<f32> triangle3df; - - //! Typedef for an integer 3d triangle. - typedef triangle3d<s32> triangle3di; - -} // end namespace core -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/vector2d.h b/builddir/irrlicht-1.8.1/include/vector2d.h deleted file mode 100644 index 0927dfc..0000000 --- a/builddir/irrlicht-1.8.1/include/vector2d.h +++ /dev/null @@ -1,342 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_POINT_2D_H_INCLUDED__ -#define __IRR_POINT_2D_H_INCLUDED__ - -#include "irrMath.h" -#include "dimension2d.h" - -namespace irr -{ -namespace core -{ - - -//! 2d vector template class with lots of operators and methods. -/** As of Irrlicht 1.6, this class supercedes position2d, which should - be considered deprecated. */ -template <class T> -class vector2d -{ -public: - //! Default constructor (null vector) - vector2d() : X(0), Y(0) {} - //! Constructor with two different values - vector2d(T nx, T ny) : X(nx), Y(ny) {} - //! Constructor with the same value for both members - explicit vector2d(T n) : X(n), Y(n) {} - //! Copy constructor - vector2d(const vector2d<T>& other) : X(other.X), Y(other.Y) {} - - vector2d(const dimension2d<T>& other) : X(other.Width), Y(other.Height) {} - - // operators - - vector2d<T> operator-() const { return vector2d<T>(-X, -Y); } - - vector2d<T>& operator=(const vector2d<T>& other) { X = other.X; Y = other.Y; return *this; } - - vector2d<T>& operator=(const dimension2d<T>& other) { X = other.Width; Y = other.Height; return *this; } - - vector2d<T> operator+(const vector2d<T>& other) const { return vector2d<T>(X + other.X, Y + other.Y); } - vector2d<T> operator+(const dimension2d<T>& other) const { return vector2d<T>(X + other.Width, Y + other.Height); } - vector2d<T>& operator+=(const vector2d<T>& other) { X+=other.X; Y+=other.Y; return *this; } - vector2d<T> operator+(const T v) const { return vector2d<T>(X + v, Y + v); } - vector2d<T>& operator+=(const T v) { X+=v; Y+=v; return *this; } - vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; } - - vector2d<T> operator-(const vector2d<T>& other) const { return vector2d<T>(X - other.X, Y - other.Y); } - vector2d<T> operator-(const dimension2d<T>& other) const { return vector2d<T>(X - other.Width, Y - other.Height); } - vector2d<T>& operator-=(const vector2d<T>& other) { X-=other.X; Y-=other.Y; return *this; } - vector2d<T> operator-(const T v) const { return vector2d<T>(X - v, Y - v); } - vector2d<T>& operator-=(const T v) { X-=v; Y-=v; return *this; } - vector2d<T>& operator-=(const dimension2d<T>& other) { X -= other.Width; Y -= other.Height; return *this; } - - vector2d<T> operator*(const vector2d<T>& other) const { return vector2d<T>(X * other.X, Y * other.Y); } - vector2d<T>& operator*=(const vector2d<T>& other) { X*=other.X; Y*=other.Y; return *this; } - vector2d<T> operator*(const T v) const { return vector2d<T>(X * v, Y * v); } - vector2d<T>& operator*=(const T v) { X*=v; Y*=v; return *this; } - - vector2d<T> operator/(const vector2d<T>& other) const { return vector2d<T>(X / other.X, Y / other.Y); } - vector2d<T>& operator/=(const vector2d<T>& other) { X/=other.X; Y/=other.Y; return *this; } - vector2d<T> operator/(const T v) const { return vector2d<T>(X / v, Y / v); } - vector2d<T>& operator/=(const T v) { X/=v; Y/=v; return *this; } - - //! sort in order X, Y. Equality with rounding tolerance. - bool operator<=(const vector2d<T>&other) const - { - return (X<other.X || core::equals(X, other.X)) || - (core::equals(X, other.X) && (Y<other.Y || core::equals(Y, other.Y))); - } - - //! sort in order X, Y. Equality with rounding tolerance. - bool operator>=(const vector2d<T>&other) const - { - return (X>other.X || core::equals(X, other.X)) || - (core::equals(X, other.X) && (Y>other.Y || core::equals(Y, other.Y))); - } - - //! sort in order X, Y. Difference must be above rounding tolerance. - bool operator<(const vector2d<T>&other) const - { - return (X<other.X && !core::equals(X, other.X)) || - (core::equals(X, other.X) && Y<other.Y && !core::equals(Y, other.Y)); - } - - //! sort in order X, Y. Difference must be above rounding tolerance. - bool operator>(const vector2d<T>&other) const - { - return (X>other.X && !core::equals(X, other.X)) || - (core::equals(X, other.X) && Y>other.Y && !core::equals(Y, other.Y)); - } - - bool operator==(const vector2d<T>& other) const { return equals(other); } - bool operator!=(const vector2d<T>& other) const { return !equals(other); } - - // functions - - //! Checks if this vector equals the other one. - /** Takes floating point rounding errors into account. - \param other Vector to compare with. - \return True if the two vector are (almost) equal, else false. */ - bool equals(const vector2d<T>& other) const - { - return core::equals(X, other.X) && core::equals(Y, other.Y); - } - - vector2d<T>& set(T nx, T ny) {X=nx; Y=ny; return *this; } - vector2d<T>& set(const vector2d<T>& p) { X=p.X; Y=p.Y; return *this; } - - //! Gets the length of the vector. - /** \return The length of the vector. */ - T getLength() const { return core::squareroot( X*X + Y*Y ); } - - //! Get the squared length of this vector - /** This is useful because it is much faster than getLength(). - \return The squared length of the vector. */ - T getLengthSQ() const { return X*X + Y*Y; } - - //! Get the dot product of this vector with another. - /** \param other Other vector to take dot product with. - \return The dot product of the two vectors. */ - T dotProduct(const vector2d<T>& other) const - { - return X*other.X + Y*other.Y; - } - - //! Gets distance from another point. - /** Here, the vector is interpreted as a point in 2-dimensional space. - \param other Other vector to measure from. - \return Distance from other point. */ - T getDistanceFrom(const vector2d<T>& other) const - { - return vector2d<T>(X - other.X, Y - other.Y).getLength(); - } - - //! Returns squared distance from another point. - /** Here, the vector is interpreted as a point in 2-dimensional space. - \param other Other vector to measure from. - \return Squared distance from other point. */ - T getDistanceFromSQ(const vector2d<T>& other) const - { - return vector2d<T>(X - other.X, Y - other.Y).getLengthSQ(); - } - - //! rotates the point anticlockwise around a center by an amount of degrees. - /** \param degrees Amount of degrees to rotate by, anticlockwise. - \param center Rotation center. - \return This vector after transformation. */ - vector2d<T>& rotateBy(f64 degrees, const vector2d<T>& center=vector2d<T>()) - { - degrees *= DEGTORAD64; - const f64 cs = cos(degrees); - const f64 sn = sin(degrees); - - X -= center.X; - Y -= center.Y; - - set((T)(X*cs - Y*sn), (T)(X*sn + Y*cs)); - - X += center.X; - Y += center.Y; - return *this; - } - - //! Normalize the vector. - /** The null vector is left untouched. - \return Reference to this vector, after normalization. */ - vector2d<T>& normalize() - { - f32 length = (f32)(X*X + Y*Y); - if ( length == 0 ) - return *this; - length = core::reciprocal_squareroot ( length ); - X = (T)(X * length); - Y = (T)(Y * length); - return *this; - } - - //! Calculates the angle of this vector in degrees in the trigonometric sense. - /** 0 is to the right (3 o'clock), values increase counter-clockwise. - This method has been suggested by Pr3t3nd3r. - \return Returns a value between 0 and 360. */ - f64 getAngleTrig() const - { - if (Y == 0) - return X < 0 ? 180 : 0; - else - if (X == 0) - return Y < 0 ? 270 : 90; - - if ( Y > 0) - if (X > 0) - return atan((irr::f64)Y/(irr::f64)X) * RADTODEG64; - else - return 180.0-atan((irr::f64)Y/-(irr::f64)X) * RADTODEG64; - else - if (X > 0) - return 360.0-atan(-(irr::f64)Y/(irr::f64)X) * RADTODEG64; - else - return 180.0+atan(-(irr::f64)Y/-(irr::f64)X) * RADTODEG64; - } - - //! Calculates the angle of this vector in degrees in the counter trigonometric sense. - /** 0 is to the right (3 o'clock), values increase clockwise. - \return Returns a value between 0 and 360. */ - inline f64 getAngle() const - { - if (Y == 0) // corrected thanks to a suggestion by Jox - return X < 0 ? 180 : 0; - else if (X == 0) - return Y < 0 ? 90 : 270; - - // don't use getLength here to avoid precision loss with s32 vectors - // avoid floating-point trouble as sqrt(y*y) is occasionally larger than y, so clamp - const f64 tmp = core::clamp(Y / sqrt((f64)(X*X + Y*Y)), -1.0, 1.0); - const f64 angle = atan( core::squareroot(1 - tmp*tmp) / tmp) * RADTODEG64; - - if (X>0 && Y>0) - return angle + 270; - else - if (X>0 && Y<0) - return angle + 90; - else - if (X<0 && Y<0) - return 90 - angle; - else - if (X<0 && Y>0) - return 270 - angle; - - return angle; - } - - //! Calculates the angle between this vector and another one in degree. - /** \param b Other vector to test with. - \return Returns a value between 0 and 90. */ - inline f64 getAngleWith(const vector2d<T>& b) const - { - f64 tmp = (f64)(X*b.X + Y*b.Y); - - if (tmp == 0.0) - return 90.0; - - tmp = tmp / core::squareroot((f64)((X*X + Y*Y) * (b.X*b.X + b.Y*b.Y))); - if (tmp < 0.0) - tmp = -tmp; - if ( tmp > 1.0 ) // avoid floating-point trouble - tmp = 1.0; - - return atan(sqrt(1 - tmp*tmp) / tmp) * RADTODEG64; - } - - //! Returns if this vector interpreted as a point is on a line between two other points. - /** It is assumed that the point is on the line. - \param begin Beginning vector to compare between. - \param end Ending vector to compare between. - \return True if this vector is between begin and end, false if not. */ - bool isBetweenPoints(const vector2d<T>& begin, const vector2d<T>& end) const - { - if (begin.X != end.X) - { - return ((begin.X <= X && X <= end.X) || - (begin.X >= X && X >= end.X)); - } - else - { - return ((begin.Y <= Y && Y <= end.Y) || - (begin.Y >= Y && Y >= end.Y)); - } - } - - //! Creates an interpolated vector between this vector and another vector. - /** \param other The other vector to interpolate with. - \param d Interpolation value between 0.0f (all the other vector) and 1.0f (all this vector). - Note that this is the opposite direction of interpolation to getInterpolated_quadratic() - \return An interpolated vector. This vector is not modified. */ - vector2d<T> getInterpolated(const vector2d<T>& other, f64 d) const - { - f64 inv = 1.0f - d; - return vector2d<T>((T)(other.X*inv + X*d), (T)(other.Y*inv + Y*d)); - } - - //! Creates a quadratically interpolated vector between this and two other vectors. - /** \param v2 Second vector to interpolate with. - \param v3 Third vector to interpolate with (maximum at 1.0f) - \param d Interpolation value between 0.0f (all this vector) and 1.0f (all the 3rd vector). - Note that this is the opposite direction of interpolation to getInterpolated() and interpolate() - \return An interpolated vector. This vector is not modified. */ - vector2d<T> getInterpolated_quadratic(const vector2d<T>& v2, const vector2d<T>& v3, f64 d) const - { - // this*(1-d)*(1-d) + 2 * v2 * (1-d) + v3 * d * d; - const f64 inv = 1.0f - d; - const f64 mul0 = inv * inv; - const f64 mul1 = 2.0f * d * inv; - const f64 mul2 = d * d; - - return vector2d<T> ( (T)(X * mul0 + v2.X * mul1 + v3.X * mul2), - (T)(Y * mul0 + v2.Y * mul1 + v3.Y * mul2)); - } - - //! Sets this vector to the linearly interpolated vector between a and b. - /** \param a first vector to interpolate with, maximum at 1.0f - \param b second vector to interpolate with, maximum at 0.0f - \param d Interpolation value between 0.0f (all vector b) and 1.0f (all vector a) - Note that this is the opposite direction of interpolation to getInterpolated_quadratic() - */ - vector2d<T>& interpolate(const vector2d<T>& a, const vector2d<T>& b, f64 d) - { - X = (T)((f64)b.X + ( ( a.X - b.X ) * d )); - Y = (T)((f64)b.Y + ( ( a.Y - b.Y ) * d )); - return *this; - } - - //! X coordinate of vector. - T X; - - //! Y coordinate of vector. - T Y; -}; - - //! Typedef for f32 2d vector. - typedef vector2d<f32> vector2df; - - //! Typedef for integer 2d vector. - typedef vector2d<s32> vector2di; - - template<class S, class T> - vector2d<T> operator*(const S scalar, const vector2d<T>& vector) { return vector*scalar; } - - // These methods are declared in dimension2d, but need definitions of vector2d - template<class T> - dimension2d<T>::dimension2d(const vector2d<T>& other) : Width(other.X), Height(other.Y) { } - - template<class T> - bool dimension2d<T>::operator==(const vector2d<T>& other) const { return Width == other.X && Height == other.Y; } - -} // end namespace core -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/include/vector3d.h b/builddir/irrlicht-1.8.1/include/vector3d.h deleted file mode 100644 index d582978..0000000 --- a/builddir/irrlicht-1.8.1/include/vector3d.h +++ /dev/null @@ -1,458 +0,0 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __IRR_POINT_3D_H_INCLUDED__ -#define __IRR_POINT_3D_H_INCLUDED__ - -#include "irrMath.h" - -namespace irr -{ -namespace core -{ - - //! 3d vector template class with lots of operators and methods. - /** The vector3d class is used in Irrlicht for three main purposes: - 1) As a direction vector (most of the methods assume this). - 2) As a position in 3d space (which is synonymous with a direction vector from the origin to this position). - 3) To hold three Euler rotations, where X is pitch, Y is yaw and Z is roll. - */ - template <class T> - class vector3d - { - public: - //! Default constructor (null vector). - vector3d() : X(0), Y(0), Z(0) {} - //! Constructor with three different values - vector3d(T nx, T ny, T nz) : X(nx), Y(ny), Z(nz) {} - //! Constructor with the same value for all elements - explicit vector3d(T n) : X(n), Y(n), Z(n) {} - //! Copy constructor - vector3d(const vector3d<T>& other) : X(other.X), Y(other.Y), Z(other.Z) {} - - // operators - - vector3d<T> operator-() const { return vector3d<T>(-X, -Y, -Z); } - - vector3d<T>& operator=(const vector3d<T>& other) { X = other.X; Y = other.Y; Z = other.Z; return *this; } - - vector3d<T> operator+(const vector3d<T>& other) const { return vector3d<T>(X + other.X, Y + other.Y, Z + other.Z); } - vector3d<T>& operator+=(const vector3d<T>& other) { X+=other.X; Y+=other.Y; Z+=other.Z; return *this; } - vector3d<T> operator+(const T val) const { return vector3d<T>(X + val, Y + val, Z + val); } - vector3d<T>& operator+=(const T val) { X+=val; Y+=val; Z+=val; return *this; } - - vector3d<T> operator-(const vector3d<T>& other) const { return vector3d<T>(X - other.X, Y - other.Y, Z - other.Z); } - vector3d<T>& operator-=(const vector3d<T>& other) { X-=other.X; Y-=other.Y; Z-=other.Z; return *this; } - vector3d<T> operator-(const T val) const { return vector3d<T>(X - val, Y - val, Z - val); } - vector3d<T>& operator-=(const T val) { X-=val; Y-=val; Z-=val; return *this; } - - vector3d<T> operator*(const vector3d<T>& other) const { return vector3d<T>(X * other.X, Y * other.Y, Z * other.Z); } - vector3d<T>& operator*=(const vector3d<T>& other) { X*=other.X; Y*=other.Y; Z*=other.Z; return *this; } - vector3d<T> operator*(const T v) const { return vector3d<T>(X * v, Y * v, Z * v); } - vector3d<T>& operator*=(const T v) { X*=v; Y*=v; Z*=v; return *this; } - - vector3d<T> operator/(const vector3d<T>& other) const { return vector3d<T>(X / other.X, Y / other.Y, Z / other.Z); } - vector3d<T>& operator/=(const vector3d<T>& other) { X/=other.X; Y/=other.Y; Z/=other.Z; return *this; } - vector3d<T> operator/(const T v) const { T i=(T)1.0/v; return vector3d<T>(X * i, Y * i, Z * i); } - vector3d<T>& operator/=(const T v) { T i=(T)1.0/v; X*=i; Y*=i; Z*=i; return *this; } - - //! sort in order X, Y, Z. Equality with rounding tolerance. - bool operator<=(const vector3d<T>&other) const - { - return (X<other.X || core::equals(X, other.X)) || - (core::equals(X, other.X) && (Y<other.Y || core::equals(Y, other.Y))) || - (core::equals(X, other.X) && core::equals(Y, other.Y) && (Z<other.Z || core::equals(Z, other.Z))); - } - - //! sort in order X, Y, Z. Equality with rounding tolerance. - bool operator>=(const vector3d<T>&other) const - { - return (X>other.X || core::equals(X, other.X)) || - (core::equals(X, other.X) && (Y>other.Y || core::equals(Y, other.Y))) || - (core::equals(X, other.X) && core::equals(Y, other.Y) && (Z>other.Z || core::equals(Z, other.Z))); - } - - //! sort in order X, Y, Z. Difference must be above rounding tolerance. - bool operator<(const vector3d<T>&other) const - { - return (X<other.X && !core::equals(X, other.X)) || - (core::equals(X, other.X) && Y<other.Y && !core::equals(Y, other.Y)) || - (core::equals(X, other.X) && core::equals(Y, other.Y) && Z<other.Z && !core::equals(Z, other.Z)); - } - - //! sort in order X, Y, Z. Difference must be above rounding tolerance. - bool operator>(const vector3d<T>&other) const - { - return (X>other.X && !core::equals(X, other.X)) || - (core::equals(X, other.X) && Y>other.Y && !core::equals(Y, other.Y)) || - (core::equals(X, other.X) && core::equals(Y, other.Y) && Z>other.Z && !core::equals(Z, other.Z)); - } - - //! use weak float compare - bool operator==(const vector3d<T>& other) const - { - return this->equals(other); - } - - bool operator!=(const vector3d<T>& other) const - { - return !this->equals(other); - } - - // functions - - //! returns if this vector equals the other one, taking floating point rounding errors into account - bool equals(const vector3d<T>& other, const T tolerance = (T)ROUNDING_ERROR_f32 ) const - { - return core::equals(X, other.X, tolerance) && - core::equals(Y, other.Y, tolerance) && - core::equals(Z, other.Z, tolerance); - } - - vector3d<T>& set(const T nx, const T ny, const T nz) {X=nx; Y=ny; Z=nz; return *this;} - vector3d<T>& set(const vector3d<T>& p) {X=p.X; Y=p.Y; Z=p.Z;return *this;} - - //! Get length of the vector. - T getLength() const { return core::squareroot( X*X + Y*Y + Z*Z ); } - - //! Get squared length of the vector. - /** This is useful because it is much faster than getLength(). - \return Squared length of the vector. */ - T getLengthSQ() const { return X*X + Y*Y + Z*Z; } - - //! Get the dot product with another vector. - T dotProduct(const vector3d<T>& other) const - { - return X*other.X + Y*other.Y + Z*other.Z; - } - - //! Get distance from another point. - /** Here, the vector is interpreted as point in 3 dimensional space. */ - T getDistanceFrom(const vector3d<T>& other) const - { - return vector3d<T>(X - other.X, Y - other.Y, Z - other.Z).getLength(); - } - - //! Returns squared distance from another point. - /** Here, the vector is interpreted as point in 3 dimensional space. */ - T getDistanceFromSQ(const vector3d<T>& other) const - { - return vector3d<T>(X - other.X, Y - other.Y, Z - other.Z).getLengthSQ(); - } - - //! Calculates the cross product with another vector. - /** \param p Vector to multiply with. - \return Crossproduct of this vector with p. */ - vector3d<T> crossProduct(const vector3d<T>& p) const - { - return vector3d<T>(Y * p.Z - Z * p.Y, Z * p.X - X * p.Z, X * p.Y - Y * p.X); - } - - //! Returns if this vector interpreted as a point is on a line between two other points. - /** It is assumed that the point is on the line. - \param begin Beginning vector to compare between. - \param end Ending vector to compare between. - \return True if this vector is between begin and end, false if not. */ - bool isBetweenPoints(const vector3d<T>& begin, const vector3d<T>& end) const - { - const T f = (end - begin).getLengthSQ(); - return getDistanceFromSQ(begin) <= f && - getDistanceFromSQ(end) <= f; - } - - //! Normalizes the vector. - /** In case of the 0 vector the result is still 0, otherwise - the length of the vector will be 1. - \return Reference to this vector after normalization. */ - vector3d<T>& normalize() - { - f64 length = X*X + Y*Y + Z*Z; - if (length == 0 ) // this check isn't an optimization but prevents getting NAN in the sqrt. - return *this; - length = core::reciprocal_squareroot(length); - - X = (T)(X * length); - Y = (T)(Y * length); - Z = (T)(Z * length); - return *this; - } - - //! Sets the length of the vector to a new value - vector3d<T>& setLength(T newlength) - { - normalize(); - return (*this *= newlength); - } - - //! Inverts the vector. - vector3d<T>& invert() - { - X *= -1; - Y *= -1; - Z *= -1; - return *this; - } - - //! Rotates the vector by a specified number of degrees around the Y axis and the specified center. - /** \param degrees Number of degrees to rotate around the Y axis. - \param center The center of the rotation. */ - void rotateXZBy(f64 degrees, const vector3d<T>& center=vector3d<T>()) - { - degrees *= DEGTORAD64; - f64 cs = cos(degrees); - f64 sn = sin(degrees); - X -= center.X; - Z -= center.Z; - set((T)(X*cs - Z*sn), Y, (T)(X*sn + Z*cs)); - X += center.X; - Z += center.Z; - } - - //! Rotates the vector by a specified number of degrees around the Z axis and the specified center. - /** \param degrees: Number of degrees to rotate around the Z axis. - \param center: The center of the rotation. */ - void rotateXYBy(f64 degrees, const vector3d<T>& center=vector3d<T>()) - { - degrees *= DEGTORAD64; - f64 cs = cos(degrees); - f64 sn = sin(degrees); - X -= center.X; - Y -= center.Y; - set((T)(X*cs - Y*sn), (T)(X*sn + Y*cs), Z); - X += center.X; - Y += center.Y; - } - - //! Rotates the vector by a specified number of degrees around the X axis and the specified center. - /** \param degrees: Number of degrees to rotate around the X axis. - \param center: The center of the rotation. */ - void rotateYZBy(f64 degrees, const vector3d<T>& center=vector3d<T>()) - { - degrees *= DEGTORAD64; - f64 cs = cos(degrees); - f64 sn = sin(degrees); - Z -= center.Z; - Y -= center.Y; - set(X, (T)(Y*cs - Z*sn), (T)(Y*sn + Z*cs)); - Z += center.Z; - Y += center.Y; - } - - //! Creates an interpolated vector between this vector and another vector. - /** \param other The other vector to interpolate with. - \param d Interpolation value between 0.0f (all the other vector) and 1.0f (all this vector). - Note that this is the opposite direction of interpolation to getInterpolated_quadratic() - \return An interpolated vector. This vector is not modified. */ - vector3d<T> getInterpolated(const vector3d<T>& other, f64 d) const - { - const f64 inv = 1.0 - d; - return vector3d<T>((T)(other.X*inv + X*d), (T)(other.Y*inv + Y*d), (T)(other.Z*inv + Z*d)); - } - - //! Creates a quadratically interpolated vector between this and two other vectors. - /** \param v2 Second vector to interpolate with. - \param v3 Third vector to interpolate with (maximum at 1.0f) - \param d Interpolation value between 0.0f (all this vector) and 1.0f (all the 3rd vector). - Note that this is the opposite direction of interpolation to getInterpolated() and interpolate() - \return An interpolated vector. This vector is not modified. */ - vector3d<T> getInterpolated_quadratic(const vector3d<T>& v2, const vector3d<T>& v3, f64 d) const - { - // this*(1-d)*(1-d) + 2 * v2 * (1-d) + v3 * d * d; - const f64 inv = (T) 1.0 - d; - const f64 mul0 = inv * inv; - const f64 mul1 = (T) 2.0 * d * inv; - const f64 mul2 = d * d; - - return vector3d<T> ((T)(X * mul0 + v2.X * mul1 + v3.X * mul2), - (T)(Y * mul0 + v2.Y * mul1 + v3.Y * mul2), - (T)(Z * mul0 + v2.Z * mul1 + v3.Z * mul2)); - } - - //! Sets this vector to the linearly interpolated vector between a and b. - /** \param a first vector to interpolate with, maximum at 1.0f - \param b second vector to interpolate with, maximum at 0.0f - \param d Interpolation value between 0.0f (all vector b) and 1.0f (all vector a) - Note that this is the opposite direction of interpolation to getInterpolated_quadratic() - */ - vector3d<T>& interpolate(const vector3d<T>& a, const vector3d<T>& b, f64 d) - { - X = (T)((f64)b.X + ( ( a.X - b.X ) * d )); - Y = (T)((f64)b.Y + ( ( a.Y - b.Y ) * d )); - Z = (T)((f64)b.Z + ( ( a.Z - b.Z ) * d )); - return *this; - } - - - //! Get the rotations that would make a (0,0,1) direction vector point in the same direction as this direction vector. - /** Thanks to Arras on the Irrlicht forums for this method. This utility method is very useful for - orienting scene nodes towards specific targets. For example, if this vector represents the difference - between two scene nodes, then applying the result of getHorizontalAngle() to one scene node will point - it at the other one. - Example code: - // Where target and seeker are of type ISceneNode* - const vector3df toTarget(target->getAbsolutePosition() - seeker->getAbsolutePosition()); - const vector3df requiredRotation = toTarget.getHorizontalAngle(); - seeker->setRotation(requiredRotation); - - \return A rotation vector containing the X (pitch) and Y (raw) rotations (in degrees) that when applied to a - +Z (e.g. 0, 0, 1) direction vector would make it point in the same direction as this vector. The Z (roll) rotation - is always 0, since two Euler rotations are sufficient to point in any given direction. */ - vector3d<T> getHorizontalAngle() const - { - vector3d<T> angle; - - const f64 tmp = (atan2((f64)X, (f64)Z) * RADTODEG64); - angle.Y = (T)tmp; - - if (angle.Y < 0) - angle.Y += 360; - if (angle.Y >= 360) - angle.Y -= 360; - - const f64 z1 = core::squareroot(X*X + Z*Z); - - angle.X = (T)(atan2((f64)z1, (f64)Y) * RADTODEG64 - 90.0); - - if (angle.X < 0) - angle.X += 360; - if (angle.X >= 360) - angle.X -= 360; - - return angle; - } - - //! Get the spherical coordinate angles - /** This returns Euler degrees for the point represented by - this vector. The calculation assumes the pole at (0,1,0) and - returns the angles in X and Y. - */ - vector3d<T> getSphericalCoordinateAngles() const - { - vector3d<T> angle; - const f64 length = X*X + Y*Y + Z*Z; - - if (length) - { - if (X!=0) - { - angle.Y = (T)(atan2((f64)Z,(f64)X) * RADTODEG64); - } - else if (Z<0) - angle.Y=180; - - angle.X = (T)(acos(Y * core::reciprocal_squareroot(length)) * RADTODEG64); - } - return angle; - } - - //! Builds a direction vector from (this) rotation vector. - /** This vector is assumed to be a rotation vector composed of 3 Euler angle rotations, in degrees. - The implementation performs the same calculations as using a matrix to do the rotation. - - \param[in] forwards The direction representing "forwards" which will be rotated by this vector. - If you do not provide a direction, then the +Z axis (0, 0, 1) will be assumed to be forwards. - \return A direction vector calculated by rotating the forwards direction by the 3 Euler angles - (in degrees) represented by this vector. */ - vector3d<T> rotationToDirection(const vector3d<T> & forwards = vector3d<T>(0, 0, 1)) const - { - const f64 cr = cos( core::DEGTORAD64 * X ); - const f64 sr = sin( core::DEGTORAD64 * X ); - const f64 cp = cos( core::DEGTORAD64 * Y ); - const f64 sp = sin( core::DEGTORAD64 * Y ); - const f64 cy = cos( core::DEGTORAD64 * Z ); - const f64 sy = sin( core::DEGTORAD64 * Z ); - - const f64 srsp = sr*sp; - const f64 crsp = cr*sp; - - const f64 pseudoMatrix[] = { - ( cp*cy ), ( cp*sy ), ( -sp ), - ( srsp*cy-cr*sy ), ( srsp*sy+cr*cy ), ( sr*cp ), - ( crsp*cy+sr*sy ), ( crsp*sy-sr*cy ), ( cr*cp )}; - - return vector3d<T>( - (T)(forwards.X * pseudoMatrix[0] + - forwards.Y * pseudoMatrix[3] + - forwards.Z * pseudoMatrix[6]), - (T)(forwards.X * pseudoMatrix[1] + - forwards.Y * pseudoMatrix[4] + - forwards.Z * pseudoMatrix[7]), - (T)(forwards.X * pseudoMatrix[2] + - forwards.Y * pseudoMatrix[5] + - forwards.Z * pseudoMatrix[8])); - } - - //! Fills an array of 4 values with the vector data (usually floats). - /** Useful for setting in shader constants for example. The fourth value - will always be 0. */ - void getAs4Values(T* array) const - { - array[0] = X; - array[1] = Y; - array[2] = Z; - array[3] = 0; - } - - //! Fills an array of 3 values with the vector data (usually floats). - /** Useful for setting in shader constants for example.*/ - void getAs3Values(T* array) const - { - array[0] = X; - array[1] = Y; - array[2] = Z; - } - - - //! X coordinate of the vector - T X; - - //! Y coordinate of the vector - T Y; - - //! Z coordinate of the vector - T Z; - }; - - //! partial specialization for integer vectors - // Implementor note: inline keyword needed due to template specialization for s32. Otherwise put specialization into a .cpp - template <> - inline vector3d<s32> vector3d<s32>::operator /(s32 val) const {return core::vector3d<s32>(X/val,Y/val,Z/val);} - template <> - inline vector3d<s32>& vector3d<s32>::operator /=(s32 val) {X/=val;Y/=val;Z/=val; return *this;} - - template <> - inline vector3d<s32> vector3d<s32>::getSphericalCoordinateAngles() const - { - vector3d<s32> angle; - const f64 length = X*X + Y*Y + Z*Z; - - if (length) - { - if (X!=0) - { - angle.Y = round32((f32)(atan2((f64)Z,(f64)X) * RADTODEG64)); - } - else if (Z<0) - angle.Y=180; - - angle.X = round32((f32)(acos(Y * core::reciprocal_squareroot(length)) * RADTODEG64)); - } - return angle; - } - - //! Typedef for a f32 3d vector. - typedef vector3d<f32> vector3df; - - //! Typedef for an integer 3d vector. - typedef vector3d<s32> vector3di; - - //! Function multiplying a scalar and a vector component-wise. - template<class S, class T> - vector3d<T> operator*(const S scalar, const vector3d<T>& vector) { return vector*scalar; } - -} // end namespace core -} // end namespace irr - -#endif - diff --git a/builddir/irrlicht-1.8.1/irrlicht-license.txt b/builddir/irrlicht-1.8.1/irrlicht-license.txt deleted file mode 100644 index 1f2be55..0000000 --- a/builddir/irrlicht-1.8.1/irrlicht-license.txt +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (C) 2002-2012 Nikolaus Gebhardt - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Please note that the Irrlicht Engine is based in part on the work of the - Independent JPEG Group, the zlib, libPng and aesGladman. This means that if you use - the Irrlicht Engine in your product, you must acknowledge somewhere in your - documentation that you've used the IJPG code. It would also be nice to mention - that you use the Irrlicht Engine, the zlib, libPng and aesGladman. See the - corresponding license files for further informations. It is also possible to disable - usage of those additional libraries by defines in the IrrCompileConfig.h header and - recompiling the engine. diff --git a/builddir/libogg-1.3.1/COPYING b/builddir/libogg-1.3.1/COPYING deleted file mode 100644 index 6111c6c..0000000 --- a/builddir/libogg-1.3.1/COPYING +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2002, Xiph.org Foundation - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -- Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -- Neither the name of the Xiph.org Foundation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/builddir/libogg-1.3.1/bin/libogg.dll b/builddir/libogg-1.3.1/bin/libogg.dll deleted file mode 100644 index 3b77e2c..0000000 Binary files a/builddir/libogg-1.3.1/bin/libogg.dll and /dev/null differ diff --git a/builddir/libogg-1.3.1/bin/libogg.exp b/builddir/libogg-1.3.1/bin/libogg.exp deleted file mode 100644 index f9c1c51..0000000 Binary files a/builddir/libogg-1.3.1/bin/libogg.exp and /dev/null differ diff --git a/builddir/libogg-1.3.1/bin/libogg.lib b/builddir/libogg-1.3.1/bin/libogg.lib deleted file mode 100644 index ad9dca0..0000000 Binary files a/builddir/libogg-1.3.1/bin/libogg.lib and /dev/null differ diff --git a/builddir/libogg-1.3.1/bin/libogg_static.lib b/builddir/libogg-1.3.1/bin/libogg_static.lib deleted file mode 100644 index a6a2677..0000000 Binary files a/builddir/libogg-1.3.1/bin/libogg_static.lib and /dev/null differ diff --git a/builddir/libogg-1.3.1/include/ogg/ogg.h b/builddir/libogg-1.3.1/include/ogg/ogg.h deleted file mode 100644 index cea4ebe..0000000 --- a/builddir/libogg-1.3.1/include/ogg/ogg.h +++ /dev/null @@ -1,210 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * - * by the Xiph.Org Foundation http://www.xiph.org/ * - * * - ******************************************************************** - - function: toplevel libogg include - last mod: $Id: ogg.h 18044 2011-08-01 17:55:20Z gmaxwell $ - - ********************************************************************/ -#ifndef _OGG_H -#define _OGG_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include <stddef.h> -#include <ogg/os_types.h> - -typedef struct { - void *iov_base; - size_t iov_len; -} ogg_iovec_t; - -typedef struct { - long endbyte; - int endbit; - - unsigned char *buffer; - unsigned char *ptr; - long storage; -} oggpack_buffer; - -/* ogg_page is used to encapsulate the data in one Ogg bitstream page *****/ - -typedef struct { - unsigned char *header; - long header_len; - unsigned char *body; - long body_len; -} ogg_page; - -/* ogg_stream_state contains the current encode/decode state of a logical - Ogg bitstream **********************************************************/ - -typedef struct { - unsigned char *body_data; /* bytes from packet bodies */ - long body_storage; /* storage elements allocated */ - long body_fill; /* elements stored; fill mark */ - long body_returned; /* elements of fill returned */ - - - int *lacing_vals; /* The values that will go to the segment table */ - ogg_int64_t *granule_vals; /* granulepos values for headers. Not compact - this way, but it is simple coupled to the - lacing fifo */ - long lacing_storage; - long lacing_fill; - long lacing_packet; - long lacing_returned; - - unsigned char header[282]; /* working space for header encode */ - int header_fill; - - int e_o_s; /* set when we have buffered the last packet in the - logical bitstream */ - int b_o_s; /* set after we've written the initial page - of a logical bitstream */ - long serialno; - long pageno; - ogg_int64_t packetno; /* sequence number for decode; the framing - knows where there's a hole in the data, - but we need coupling so that the codec - (which is in a separate abstraction - layer) also knows about the gap */ - ogg_int64_t granulepos; - -} ogg_stream_state; - -/* ogg_packet is used to encapsulate the data and metadata belonging - to a single raw Ogg/Vorbis packet *************************************/ - -typedef struct { - unsigned char *packet; - long bytes; - long b_o_s; - long e_o_s; - - ogg_int64_t granulepos; - - ogg_int64_t packetno; /* sequence number for decode; the framing - knows where there's a hole in the data, - but we need coupling so that the codec - (which is in a separate abstraction - layer) also knows about the gap */ -} ogg_packet; - -typedef struct { - unsigned char *data; - int storage; - int fill; - int returned; - - int unsynced; - int headerbytes; - int bodybytes; -} ogg_sync_state; - -/* Ogg BITSTREAM PRIMITIVES: bitstream ************************/ - -extern void oggpack_writeinit(oggpack_buffer *b); -extern int oggpack_writecheck(oggpack_buffer *b); -extern void oggpack_writetrunc(oggpack_buffer *b,long bits); -extern void oggpack_writealign(oggpack_buffer *b); -extern void oggpack_writecopy(oggpack_buffer *b,void *source,long bits); -extern void oggpack_reset(oggpack_buffer *b); -extern void oggpack_writeclear(oggpack_buffer *b); -extern void oggpack_readinit(oggpack_buffer *b,unsigned char *buf,int bytes); -extern void oggpack_write(oggpack_buffer *b,unsigned long value,int bits); -extern long oggpack_look(oggpack_buffer *b,int bits); -extern long oggpack_look1(oggpack_buffer *b); -extern void oggpack_adv(oggpack_buffer *b,int bits); -extern void oggpack_adv1(oggpack_buffer *b); -extern long oggpack_read(oggpack_buffer *b,int bits); -extern long oggpack_read1(oggpack_buffer *b); -extern long oggpack_bytes(oggpack_buffer *b); -extern long oggpack_bits(oggpack_buffer *b); -extern unsigned char *oggpack_get_buffer(oggpack_buffer *b); - -extern void oggpackB_writeinit(oggpack_buffer *b); -extern int oggpackB_writecheck(oggpack_buffer *b); -extern void oggpackB_writetrunc(oggpack_buffer *b,long bits); -extern void oggpackB_writealign(oggpack_buffer *b); -extern void oggpackB_writecopy(oggpack_buffer *b,void *source,long bits); -extern void oggpackB_reset(oggpack_buffer *b); -extern void oggpackB_writeclear(oggpack_buffer *b); -extern void oggpackB_readinit(oggpack_buffer *b,unsigned char *buf,int bytes); -extern void oggpackB_write(oggpack_buffer *b,unsigned long value,int bits); -extern long oggpackB_look(oggpack_buffer *b,int bits); -extern long oggpackB_look1(oggpack_buffer *b); -extern void oggpackB_adv(oggpack_buffer *b,int bits); -extern void oggpackB_adv1(oggpack_buffer *b); -extern long oggpackB_read(oggpack_buffer *b,int bits); -extern long oggpackB_read1(oggpack_buffer *b); -extern long oggpackB_bytes(oggpack_buffer *b); -extern long oggpackB_bits(oggpack_buffer *b); -extern unsigned char *oggpackB_get_buffer(oggpack_buffer *b); - -/* Ogg BITSTREAM PRIMITIVES: encoding **************************/ - -extern int ogg_stream_packetin(ogg_stream_state *os, ogg_packet *op); -extern int ogg_stream_iovecin(ogg_stream_state *os, ogg_iovec_t *iov, - int count, long e_o_s, ogg_int64_t granulepos); -extern int ogg_stream_pageout(ogg_stream_state *os, ogg_page *og); -extern int ogg_stream_pageout_fill(ogg_stream_state *os, ogg_page *og, int nfill); -extern int ogg_stream_flush(ogg_stream_state *os, ogg_page *og); -extern int ogg_stream_flush_fill(ogg_stream_state *os, ogg_page *og, int nfill); - -/* Ogg BITSTREAM PRIMITIVES: decoding **************************/ - -extern int ogg_sync_init(ogg_sync_state *oy); -extern int ogg_sync_clear(ogg_sync_state *oy); -extern int ogg_sync_reset(ogg_sync_state *oy); -extern int ogg_sync_destroy(ogg_sync_state *oy); -extern int ogg_sync_check(ogg_sync_state *oy); - -extern char *ogg_sync_buffer(ogg_sync_state *oy, long size); -extern int ogg_sync_wrote(ogg_sync_state *oy, long bytes); -extern long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og); -extern int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og); -extern int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og); -extern int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op); -extern int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op); - -/* Ogg BITSTREAM PRIMITIVES: general ***************************/ - -extern int ogg_stream_init(ogg_stream_state *os,int serialno); -extern int ogg_stream_clear(ogg_stream_state *os); -extern int ogg_stream_reset(ogg_stream_state *os); -extern int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno); -extern int ogg_stream_destroy(ogg_stream_state *os); -extern int ogg_stream_check(ogg_stream_state *os); -extern int ogg_stream_eos(ogg_stream_state *os); - -extern void ogg_page_checksum_set(ogg_page *og); - -extern int ogg_page_version(const ogg_page *og); -extern int ogg_page_continued(const ogg_page *og); -extern int ogg_page_bos(const ogg_page *og); -extern int ogg_page_eos(const ogg_page *og); -extern ogg_int64_t ogg_page_granulepos(const ogg_page *og); -extern int ogg_page_serialno(const ogg_page *og); -extern long ogg_page_pageno(const ogg_page *og); -extern int ogg_page_packets(const ogg_page *og); - -extern void ogg_packet_clear(ogg_packet *op); - - -#ifdef __cplusplus -} -#endif - -#endif /* _OGG_H */ diff --git a/builddir/libogg-1.3.1/include/ogg/os_types.h b/builddir/libogg-1.3.1/include/ogg/os_types.h deleted file mode 100644 index d6691b7..0000000 --- a/builddir/libogg-1.3.1/include/ogg/os_types.h +++ /dev/null @@ -1,147 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * by the Xiph.Org Foundation http://www.xiph.org/ * - * * - ******************************************************************** - - function: #ifdef jail to whip a few platforms into the UNIX ideal. - last mod: $Id: os_types.h 17712 2010-12-03 17:10:02Z xiphmont $ - - ********************************************************************/ -#ifndef _OS_TYPES_H -#define _OS_TYPES_H - -/* make it easy on the folks that want to compile the libs with a - different malloc than stdlib */ -#define _ogg_malloc malloc -#define _ogg_calloc calloc -#define _ogg_realloc realloc -#define _ogg_free free - -#if defined(_WIN32) - -# if defined(__CYGWIN__) -# include <stdint.h> - typedef int16_t ogg_int16_t; - typedef uint16_t ogg_uint16_t; - typedef int32_t ogg_int32_t; - typedef uint32_t ogg_uint32_t; - typedef int64_t ogg_int64_t; - typedef uint64_t ogg_uint64_t; -# elif defined(__MINGW32__) -# include <sys/types.h> - typedef short ogg_int16_t; - typedef unsigned short ogg_uint16_t; - typedef int ogg_int32_t; - typedef unsigned int ogg_uint32_t; - typedef long long ogg_int64_t; - typedef unsigned long long ogg_uint64_t; -# elif defined(__MWERKS__) - typedef long long ogg_int64_t; - typedef int ogg_int32_t; - typedef unsigned int ogg_uint32_t; - typedef short ogg_int16_t; - typedef unsigned short ogg_uint16_t; -# else - /* MSVC/Borland */ - typedef __int64 ogg_int64_t; - typedef __int32 ogg_int32_t; - typedef unsigned __int32 ogg_uint32_t; - typedef __int16 ogg_int16_t; - typedef unsigned __int16 ogg_uint16_t; -# endif - -#elif defined(__MACOS__) - -# include <sys/types.h> - typedef SInt16 ogg_int16_t; - typedef UInt16 ogg_uint16_t; - typedef SInt32 ogg_int32_t; - typedef UInt32 ogg_uint32_t; - typedef SInt64 ogg_int64_t; - -#elif (defined(__APPLE__) && defined(__MACH__)) /* MacOS X Framework build */ - -# include <inttypes.h> - typedef int16_t ogg_int16_t; - typedef uint16_t ogg_uint16_t; - typedef int32_t ogg_int32_t; - typedef uint32_t ogg_uint32_t; - typedef int64_t ogg_int64_t; - -#elif defined(__HAIKU__) - - /* Haiku */ -# include <sys/types.h> - typedef short ogg_int16_t; - typedef unsigned short ogg_uint16_t; - typedef int ogg_int32_t; - typedef unsigned int ogg_uint32_t; - typedef long long ogg_int64_t; - -#elif defined(__BEOS__) - - /* Be */ -# include <inttypes.h> - typedef int16_t ogg_int16_t; - typedef uint16_t ogg_uint16_t; - typedef int32_t ogg_int32_t; - typedef uint32_t ogg_uint32_t; - typedef int64_t ogg_int64_t; - -#elif defined (__EMX__) - - /* OS/2 GCC */ - typedef short ogg_int16_t; - typedef unsigned short ogg_uint16_t; - typedef int ogg_int32_t; - typedef unsigned int ogg_uint32_t; - typedef long long ogg_int64_t; - -#elif defined (DJGPP) - - /* DJGPP */ - typedef short ogg_int16_t; - typedef int ogg_int32_t; - typedef unsigned int ogg_uint32_t; - typedef long long ogg_int64_t; - -#elif defined(R5900) - - /* PS2 EE */ - typedef long ogg_int64_t; - typedef int ogg_int32_t; - typedef unsigned ogg_uint32_t; - typedef short ogg_int16_t; - -#elif defined(__SYMBIAN32__) - - /* Symbian GCC */ - typedef signed short ogg_int16_t; - typedef unsigned short ogg_uint16_t; - typedef signed int ogg_int32_t; - typedef unsigned int ogg_uint32_t; - typedef long long int ogg_int64_t; - -#elif defined(__TMS320C6X__) - - /* TI C64x compiler */ - typedef signed short ogg_int16_t; - typedef unsigned short ogg_uint16_t; - typedef signed int ogg_int32_t; - typedef unsigned int ogg_uint32_t; - typedef long long int ogg_int64_t; - -#else - -# include <ogg/config_types.h> - -#endif - -#endif /* _OS_TYPES_H */ diff --git a/builddir/libvorbis-1.3.3/COPYING b/builddir/libvorbis-1.3.3/COPYING deleted file mode 100644 index 28de72a..0000000 --- a/builddir/libvorbis-1.3.3/COPYING +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2002-2008 Xiph.org Foundation - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -- Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -- Neither the name of the Xiph.org Foundation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/builddir/libvorbis-1.3.3/bin/libvorbis.dll b/builddir/libvorbis-1.3.3/bin/libvorbis.dll deleted file mode 100644 index 89b237e..0000000 Binary files a/builddir/libvorbis-1.3.3/bin/libvorbis.dll and /dev/null differ diff --git a/builddir/libvorbis-1.3.3/bin/libvorbis.exp b/builddir/libvorbis-1.3.3/bin/libvorbis.exp deleted file mode 100644 index d1ddf36..0000000 Binary files a/builddir/libvorbis-1.3.3/bin/libvorbis.exp and /dev/null differ diff --git a/builddir/libvorbis-1.3.3/bin/libvorbis.lib b/builddir/libvorbis-1.3.3/bin/libvorbis.lib deleted file mode 100644 index 9bc8691..0000000 Binary files a/builddir/libvorbis-1.3.3/bin/libvorbis.lib and /dev/null differ diff --git a/builddir/libvorbis-1.3.3/bin/libvorbis_static.lib b/builddir/libvorbis-1.3.3/bin/libvorbis_static.lib deleted file mode 100644 index 3217050..0000000 Binary files a/builddir/libvorbis-1.3.3/bin/libvorbis_static.lib and /dev/null differ diff --git a/builddir/libvorbis-1.3.3/bin/libvorbisfile.dll b/builddir/libvorbis-1.3.3/bin/libvorbisfile.dll deleted file mode 100644 index bf1d7e9..0000000 Binary files a/builddir/libvorbis-1.3.3/bin/libvorbisfile.dll and /dev/null differ diff --git a/builddir/libvorbis-1.3.3/bin/libvorbisfile.exp b/builddir/libvorbis-1.3.3/bin/libvorbisfile.exp deleted file mode 100644 index a52b13f..0000000 Binary files a/builddir/libvorbis-1.3.3/bin/libvorbisfile.exp and /dev/null differ diff --git a/builddir/libvorbis-1.3.3/bin/libvorbisfile.lib b/builddir/libvorbis-1.3.3/bin/libvorbisfile.lib deleted file mode 100644 index 7fa68e5..0000000 Binary files a/builddir/libvorbis-1.3.3/bin/libvorbisfile.lib and /dev/null differ diff --git a/builddir/libvorbis-1.3.3/bin/libvorbisfile_static.lib b/builddir/libvorbis-1.3.3/bin/libvorbisfile_static.lib deleted file mode 100644 index d014ec1..0000000 Binary files a/builddir/libvorbis-1.3.3/bin/libvorbisfile_static.lib and /dev/null differ diff --git a/builddir/libvorbis-1.3.3/bin/vorbisdec.exe b/builddir/libvorbis-1.3.3/bin/vorbisdec.exe deleted file mode 100644 index d2a3b5c..0000000 Binary files a/builddir/libvorbis-1.3.3/bin/vorbisdec.exe and /dev/null differ diff --git a/builddir/libvorbis-1.3.3/bin/vorbisdec_static.exe b/builddir/libvorbis-1.3.3/bin/vorbisdec_static.exe deleted file mode 100644 index b1243b8..0000000 Binary files a/builddir/libvorbis-1.3.3/bin/vorbisdec_static.exe and /dev/null differ diff --git a/builddir/libvorbis-1.3.3/bin/vorbisenc.exe b/builddir/libvorbis-1.3.3/bin/vorbisenc.exe deleted file mode 100644 index 06f97b8..0000000 Binary files a/builddir/libvorbis-1.3.3/bin/vorbisenc.exe and /dev/null differ diff --git a/builddir/libvorbis-1.3.3/bin/vorbisenc_static.exe b/builddir/libvorbis-1.3.3/bin/vorbisenc_static.exe deleted file mode 100644 index cc2918d..0000000 Binary files a/builddir/libvorbis-1.3.3/bin/vorbisenc_static.exe and /dev/null differ diff --git a/builddir/libvorbis-1.3.3/include/ogg/ogg.h b/builddir/libvorbis-1.3.3/include/ogg/ogg.h deleted file mode 100644 index cea4ebe..0000000 --- a/builddir/libvorbis-1.3.3/include/ogg/ogg.h +++ /dev/null @@ -1,210 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * - * by the Xiph.Org Foundation http://www.xiph.org/ * - * * - ******************************************************************** - - function: toplevel libogg include - last mod: $Id: ogg.h 18044 2011-08-01 17:55:20Z gmaxwell $ - - ********************************************************************/ -#ifndef _OGG_H -#define _OGG_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include <stddef.h> -#include <ogg/os_types.h> - -typedef struct { - void *iov_base; - size_t iov_len; -} ogg_iovec_t; - -typedef struct { - long endbyte; - int endbit; - - unsigned char *buffer; - unsigned char *ptr; - long storage; -} oggpack_buffer; - -/* ogg_page is used to encapsulate the data in one Ogg bitstream page *****/ - -typedef struct { - unsigned char *header; - long header_len; - unsigned char *body; - long body_len; -} ogg_page; - -/* ogg_stream_state contains the current encode/decode state of a logical - Ogg bitstream **********************************************************/ - -typedef struct { - unsigned char *body_data; /* bytes from packet bodies */ - long body_storage; /* storage elements allocated */ - long body_fill; /* elements stored; fill mark */ - long body_returned; /* elements of fill returned */ - - - int *lacing_vals; /* The values that will go to the segment table */ - ogg_int64_t *granule_vals; /* granulepos values for headers. Not compact - this way, but it is simple coupled to the - lacing fifo */ - long lacing_storage; - long lacing_fill; - long lacing_packet; - long lacing_returned; - - unsigned char header[282]; /* working space for header encode */ - int header_fill; - - int e_o_s; /* set when we have buffered the last packet in the - logical bitstream */ - int b_o_s; /* set after we've written the initial page - of a logical bitstream */ - long serialno; - long pageno; - ogg_int64_t packetno; /* sequence number for decode; the framing - knows where there's a hole in the data, - but we need coupling so that the codec - (which is in a separate abstraction - layer) also knows about the gap */ - ogg_int64_t granulepos; - -} ogg_stream_state; - -/* ogg_packet is used to encapsulate the data and metadata belonging - to a single raw Ogg/Vorbis packet *************************************/ - -typedef struct { - unsigned char *packet; - long bytes; - long b_o_s; - long e_o_s; - - ogg_int64_t granulepos; - - ogg_int64_t packetno; /* sequence number for decode; the framing - knows where there's a hole in the data, - but we need coupling so that the codec - (which is in a separate abstraction - layer) also knows about the gap */ -} ogg_packet; - -typedef struct { - unsigned char *data; - int storage; - int fill; - int returned; - - int unsynced; - int headerbytes; - int bodybytes; -} ogg_sync_state; - -/* Ogg BITSTREAM PRIMITIVES: bitstream ************************/ - -extern void oggpack_writeinit(oggpack_buffer *b); -extern int oggpack_writecheck(oggpack_buffer *b); -extern void oggpack_writetrunc(oggpack_buffer *b,long bits); -extern void oggpack_writealign(oggpack_buffer *b); -extern void oggpack_writecopy(oggpack_buffer *b,void *source,long bits); -extern void oggpack_reset(oggpack_buffer *b); -extern void oggpack_writeclear(oggpack_buffer *b); -extern void oggpack_readinit(oggpack_buffer *b,unsigned char *buf,int bytes); -extern void oggpack_write(oggpack_buffer *b,unsigned long value,int bits); -extern long oggpack_look(oggpack_buffer *b,int bits); -extern long oggpack_look1(oggpack_buffer *b); -extern void oggpack_adv(oggpack_buffer *b,int bits); -extern void oggpack_adv1(oggpack_buffer *b); -extern long oggpack_read(oggpack_buffer *b,int bits); -extern long oggpack_read1(oggpack_buffer *b); -extern long oggpack_bytes(oggpack_buffer *b); -extern long oggpack_bits(oggpack_buffer *b); -extern unsigned char *oggpack_get_buffer(oggpack_buffer *b); - -extern void oggpackB_writeinit(oggpack_buffer *b); -extern int oggpackB_writecheck(oggpack_buffer *b); -extern void oggpackB_writetrunc(oggpack_buffer *b,long bits); -extern void oggpackB_writealign(oggpack_buffer *b); -extern void oggpackB_writecopy(oggpack_buffer *b,void *source,long bits); -extern void oggpackB_reset(oggpack_buffer *b); -extern void oggpackB_writeclear(oggpack_buffer *b); -extern void oggpackB_readinit(oggpack_buffer *b,unsigned char *buf,int bytes); -extern void oggpackB_write(oggpack_buffer *b,unsigned long value,int bits); -extern long oggpackB_look(oggpack_buffer *b,int bits); -extern long oggpackB_look1(oggpack_buffer *b); -extern void oggpackB_adv(oggpack_buffer *b,int bits); -extern void oggpackB_adv1(oggpack_buffer *b); -extern long oggpackB_read(oggpack_buffer *b,int bits); -extern long oggpackB_read1(oggpack_buffer *b); -extern long oggpackB_bytes(oggpack_buffer *b); -extern long oggpackB_bits(oggpack_buffer *b); -extern unsigned char *oggpackB_get_buffer(oggpack_buffer *b); - -/* Ogg BITSTREAM PRIMITIVES: encoding **************************/ - -extern int ogg_stream_packetin(ogg_stream_state *os, ogg_packet *op); -extern int ogg_stream_iovecin(ogg_stream_state *os, ogg_iovec_t *iov, - int count, long e_o_s, ogg_int64_t granulepos); -extern int ogg_stream_pageout(ogg_stream_state *os, ogg_page *og); -extern int ogg_stream_pageout_fill(ogg_stream_state *os, ogg_page *og, int nfill); -extern int ogg_stream_flush(ogg_stream_state *os, ogg_page *og); -extern int ogg_stream_flush_fill(ogg_stream_state *os, ogg_page *og, int nfill); - -/* Ogg BITSTREAM PRIMITIVES: decoding **************************/ - -extern int ogg_sync_init(ogg_sync_state *oy); -extern int ogg_sync_clear(ogg_sync_state *oy); -extern int ogg_sync_reset(ogg_sync_state *oy); -extern int ogg_sync_destroy(ogg_sync_state *oy); -extern int ogg_sync_check(ogg_sync_state *oy); - -extern char *ogg_sync_buffer(ogg_sync_state *oy, long size); -extern int ogg_sync_wrote(ogg_sync_state *oy, long bytes); -extern long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og); -extern int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og); -extern int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og); -extern int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op); -extern int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op); - -/* Ogg BITSTREAM PRIMITIVES: general ***************************/ - -extern int ogg_stream_init(ogg_stream_state *os,int serialno); -extern int ogg_stream_clear(ogg_stream_state *os); -extern int ogg_stream_reset(ogg_stream_state *os); -extern int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno); -extern int ogg_stream_destroy(ogg_stream_state *os); -extern int ogg_stream_check(ogg_stream_state *os); -extern int ogg_stream_eos(ogg_stream_state *os); - -extern void ogg_page_checksum_set(ogg_page *og); - -extern int ogg_page_version(const ogg_page *og); -extern int ogg_page_continued(const ogg_page *og); -extern int ogg_page_bos(const ogg_page *og); -extern int ogg_page_eos(const ogg_page *og); -extern ogg_int64_t ogg_page_granulepos(const ogg_page *og); -extern int ogg_page_serialno(const ogg_page *og); -extern long ogg_page_pageno(const ogg_page *og); -extern int ogg_page_packets(const ogg_page *og); - -extern void ogg_packet_clear(ogg_packet *op); - - -#ifdef __cplusplus -} -#endif - -#endif /* _OGG_H */ diff --git a/builddir/libvorbis-1.3.3/include/ogg/os_types.h b/builddir/libvorbis-1.3.3/include/ogg/os_types.h deleted file mode 100644 index d6691b7..0000000 --- a/builddir/libvorbis-1.3.3/include/ogg/os_types.h +++ /dev/null @@ -1,147 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 * - * by the Xiph.Org Foundation http://www.xiph.org/ * - * * - ******************************************************************** - - function: #ifdef jail to whip a few platforms into the UNIX ideal. - last mod: $Id: os_types.h 17712 2010-12-03 17:10:02Z xiphmont $ - - ********************************************************************/ -#ifndef _OS_TYPES_H -#define _OS_TYPES_H - -/* make it easy on the folks that want to compile the libs with a - different malloc than stdlib */ -#define _ogg_malloc malloc -#define _ogg_calloc calloc -#define _ogg_realloc realloc -#define _ogg_free free - -#if defined(_WIN32) - -# if defined(__CYGWIN__) -# include <stdint.h> - typedef int16_t ogg_int16_t; - typedef uint16_t ogg_uint16_t; - typedef int32_t ogg_int32_t; - typedef uint32_t ogg_uint32_t; - typedef int64_t ogg_int64_t; - typedef uint64_t ogg_uint64_t; -# elif defined(__MINGW32__) -# include <sys/types.h> - typedef short ogg_int16_t; - typedef unsigned short ogg_uint16_t; - typedef int ogg_int32_t; - typedef unsigned int ogg_uint32_t; - typedef long long ogg_int64_t; - typedef unsigned long long ogg_uint64_t; -# elif defined(__MWERKS__) - typedef long long ogg_int64_t; - typedef int ogg_int32_t; - typedef unsigned int ogg_uint32_t; - typedef short ogg_int16_t; - typedef unsigned short ogg_uint16_t; -# else - /* MSVC/Borland */ - typedef __int64 ogg_int64_t; - typedef __int32 ogg_int32_t; - typedef unsigned __int32 ogg_uint32_t; - typedef __int16 ogg_int16_t; - typedef unsigned __int16 ogg_uint16_t; -# endif - -#elif defined(__MACOS__) - -# include <sys/types.h> - typedef SInt16 ogg_int16_t; - typedef UInt16 ogg_uint16_t; - typedef SInt32 ogg_int32_t; - typedef UInt32 ogg_uint32_t; - typedef SInt64 ogg_int64_t; - -#elif (defined(__APPLE__) && defined(__MACH__)) /* MacOS X Framework build */ - -# include <inttypes.h> - typedef int16_t ogg_int16_t; - typedef uint16_t ogg_uint16_t; - typedef int32_t ogg_int32_t; - typedef uint32_t ogg_uint32_t; - typedef int64_t ogg_int64_t; - -#elif defined(__HAIKU__) - - /* Haiku */ -# include <sys/types.h> - typedef short ogg_int16_t; - typedef unsigned short ogg_uint16_t; - typedef int ogg_int32_t; - typedef unsigned int ogg_uint32_t; - typedef long long ogg_int64_t; - -#elif defined(__BEOS__) - - /* Be */ -# include <inttypes.h> - typedef int16_t ogg_int16_t; - typedef uint16_t ogg_uint16_t; - typedef int32_t ogg_int32_t; - typedef uint32_t ogg_uint32_t; - typedef int64_t ogg_int64_t; - -#elif defined (__EMX__) - - /* OS/2 GCC */ - typedef short ogg_int16_t; - typedef unsigned short ogg_uint16_t; - typedef int ogg_int32_t; - typedef unsigned int ogg_uint32_t; - typedef long long ogg_int64_t; - -#elif defined (DJGPP) - - /* DJGPP */ - typedef short ogg_int16_t; - typedef int ogg_int32_t; - typedef unsigned int ogg_uint32_t; - typedef long long ogg_int64_t; - -#elif defined(R5900) - - /* PS2 EE */ - typedef long ogg_int64_t; - typedef int ogg_int32_t; - typedef unsigned ogg_uint32_t; - typedef short ogg_int16_t; - -#elif defined(__SYMBIAN32__) - - /* Symbian GCC */ - typedef signed short ogg_int16_t; - typedef unsigned short ogg_uint16_t; - typedef signed int ogg_int32_t; - typedef unsigned int ogg_uint32_t; - typedef long long int ogg_int64_t; - -#elif defined(__TMS320C6X__) - - /* TI C64x compiler */ - typedef signed short ogg_int16_t; - typedef unsigned short ogg_uint16_t; - typedef signed int ogg_int32_t; - typedef unsigned int ogg_uint32_t; - typedef long long int ogg_int64_t; - -#else - -# include <ogg/config_types.h> - -#endif - -#endif /* _OS_TYPES_H */ diff --git a/builddir/libvorbis-1.3.3/include/vorbis/codec.h b/builddir/libvorbis-1.3.3/include/vorbis/codec.h deleted file mode 100644 index 999aa33..0000000 --- a/builddir/libvorbis-1.3.3/include/vorbis/codec.h +++ /dev/null @@ -1,243 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 * - * by the Xiph.Org Foundation http://www.xiph.org/ * - - ******************************************************************** - - function: libvorbis codec headers - last mod: $Id: codec.h 17021 2010-03-24 09:29:41Z xiphmont $ - - ********************************************************************/ - -#ifndef _vorbis_codec_h_ -#define _vorbis_codec_h_ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -#include <ogg/ogg.h> - -typedef struct vorbis_info{ - int version; - int channels; - long rate; - - /* The below bitrate declarations are *hints*. - Combinations of the three values carry the following implications: - - all three set to the same value: - implies a fixed rate bitstream - only nominal set: - implies a VBR stream that averages the nominal bitrate. No hard - upper/lower limit - upper and or lower set: - implies a VBR bitstream that obeys the bitrate limits. nominal - may also be set to give a nominal rate. - none set: - the coder does not care to speculate. - */ - - long bitrate_upper; - long bitrate_nominal; - long bitrate_lower; - long bitrate_window; - - void *codec_setup; -} vorbis_info; - -/* vorbis_dsp_state buffers the current vorbis audio - analysis/synthesis state. The DSP state belongs to a specific - logical bitstream ****************************************************/ -typedef struct vorbis_dsp_state{ - int analysisp; - vorbis_info *vi; - - float **pcm; - float **pcmret; - int pcm_storage; - int pcm_current; - int pcm_returned; - - int preextrapolate; - int eofflag; - - long lW; - long W; - long nW; - long centerW; - - ogg_int64_t granulepos; - ogg_int64_t sequence; - - ogg_int64_t glue_bits; - ogg_int64_t time_bits; - ogg_int64_t floor_bits; - ogg_int64_t res_bits; - - void *backend_state; -} vorbis_dsp_state; - -typedef struct vorbis_block{ - /* necessary stream state for linking to the framing abstraction */ - float **pcm; /* this is a pointer into local storage */ - oggpack_buffer opb; - - long lW; - long W; - long nW; - int pcmend; - int mode; - - int eofflag; - ogg_int64_t granulepos; - ogg_int64_t sequence; - vorbis_dsp_state *vd; /* For read-only access of configuration */ - - /* local storage to avoid remallocing; it's up to the mapping to - structure it */ - void *localstore; - long localtop; - long localalloc; - long totaluse; - struct alloc_chain *reap; - - /* bitmetrics for the frame */ - long glue_bits; - long time_bits; - long floor_bits; - long res_bits; - - void *internal; - -} vorbis_block; - -/* vorbis_block is a single block of data to be processed as part of -the analysis/synthesis stream; it belongs to a specific logical -bitstream, but is independent from other vorbis_blocks belonging to -that logical bitstream. *************************************************/ - -struct alloc_chain{ - void *ptr; - struct alloc_chain *next; -}; - -/* vorbis_info contains all the setup information specific to the - specific compression/decompression mode in progress (eg, - psychoacoustic settings, channel setup, options, codebook - etc). vorbis_info and substructures are in backends.h. -*********************************************************************/ - -/* the comments are not part of vorbis_info so that vorbis_info can be - static storage */ -typedef struct vorbis_comment{ - /* unlimited user comment fields. libvorbis writes 'libvorbis' - whatever vendor is set to in encode */ - char **user_comments; - int *comment_lengths; - int comments; - char *vendor; - -} vorbis_comment; - - -/* libvorbis encodes in two abstraction layers; first we perform DSP - and produce a packet (see docs/analysis.txt). The packet is then - coded into a framed OggSquish bitstream by the second layer (see - docs/framing.txt). Decode is the reverse process; we sync/frame - the bitstream and extract individual packets, then decode the - packet back into PCM audio. - - The extra framing/packetizing is used in streaming formats, such as - files. Over the net (such as with UDP), the framing and - packetization aren't necessary as they're provided by the transport - and the streaming layer is not used */ - -/* Vorbis PRIMITIVES: general ***************************************/ - -extern void vorbis_info_init(vorbis_info *vi); -extern void vorbis_info_clear(vorbis_info *vi); -extern int vorbis_info_blocksize(vorbis_info *vi,int zo); -extern void vorbis_comment_init(vorbis_comment *vc); -extern void vorbis_comment_add(vorbis_comment *vc, const char *comment); -extern void vorbis_comment_add_tag(vorbis_comment *vc, - const char *tag, const char *contents); -extern char *vorbis_comment_query(vorbis_comment *vc, const char *tag, int count); -extern int vorbis_comment_query_count(vorbis_comment *vc, const char *tag); -extern void vorbis_comment_clear(vorbis_comment *vc); - -extern int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb); -extern int vorbis_block_clear(vorbis_block *vb); -extern void vorbis_dsp_clear(vorbis_dsp_state *v); -extern double vorbis_granule_time(vorbis_dsp_state *v, - ogg_int64_t granulepos); - -extern const char *vorbis_version_string(void); - -/* Vorbis PRIMITIVES: analysis/DSP layer ****************************/ - -extern int vorbis_analysis_init(vorbis_dsp_state *v,vorbis_info *vi); -extern int vorbis_commentheader_out(vorbis_comment *vc, ogg_packet *op); -extern int vorbis_analysis_headerout(vorbis_dsp_state *v, - vorbis_comment *vc, - ogg_packet *op, - ogg_packet *op_comm, - ogg_packet *op_code); -extern float **vorbis_analysis_buffer(vorbis_dsp_state *v,int vals); -extern int vorbis_analysis_wrote(vorbis_dsp_state *v,int vals); -extern int vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb); -extern int vorbis_analysis(vorbis_block *vb,ogg_packet *op); - -extern int vorbis_bitrate_addblock(vorbis_block *vb); -extern int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd, - ogg_packet *op); - -/* Vorbis PRIMITIVES: synthesis layer *******************************/ -extern int vorbis_synthesis_idheader(ogg_packet *op); -extern int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc, - ogg_packet *op); - -extern int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi); -extern int vorbis_synthesis_restart(vorbis_dsp_state *v); -extern int vorbis_synthesis(vorbis_block *vb,ogg_packet *op); -extern int vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op); -extern int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb); -extern int vorbis_synthesis_pcmout(vorbis_dsp_state *v,float ***pcm); -extern int vorbis_synthesis_lapout(vorbis_dsp_state *v,float ***pcm); -extern int vorbis_synthesis_read(vorbis_dsp_state *v,int samples); -extern long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op); - -extern int vorbis_synthesis_halfrate(vorbis_info *v,int flag); -extern int vorbis_synthesis_halfrate_p(vorbis_info *v); - -/* Vorbis ERRORS and return codes ***********************************/ - -#define OV_FALSE -1 -#define OV_EOF -2 -#define OV_HOLE -3 - -#define OV_EREAD -128 -#define OV_EFAULT -129 -#define OV_EIMPL -130 -#define OV_EINVAL -131 -#define OV_ENOTVORBIS -132 -#define OV_EBADHEADER -133 -#define OV_EVERSION -134 -#define OV_ENOTAUDIO -135 -#define OV_EBADPACKET -136 -#define OV_EBADLINK -137 -#define OV_ENOSEEK -138 - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif - diff --git a/builddir/libvorbis-1.3.3/include/vorbis/vorbisenc.h b/builddir/libvorbis-1.3.3/include/vorbis/vorbisenc.h deleted file mode 100644 index 02332b5..0000000 --- a/builddir/libvorbis-1.3.3/include/vorbis/vorbisenc.h +++ /dev/null @@ -1,436 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 * - * by the Xiph.Org Foundation http://www.xiph.org/ * - * * - ******************************************************************** - - function: vorbis encode-engine setup - last mod: $Id: vorbisenc.h 17021 2010-03-24 09:29:41Z xiphmont $ - - ********************************************************************/ - -/** \file - * Libvorbisenc is a convenient API for setting up an encoding - * environment using libvorbis. Libvorbisenc encapsulates the - * actions needed to set up the encoder properly. - */ - -#ifndef _OV_ENC_H_ -#define _OV_ENC_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -#include "codec.h" - -/** - * This is the primary function within libvorbisenc for setting up managed - * bitrate modes. - * - * Before this function is called, the \ref vorbis_info - * struct should be initialized by using vorbis_info_init() from the libvorbis - * API. After encoding, vorbis_info_clear() should be called. - * - * The max_bitrate, nominal_bitrate, and min_bitrate settings are used to set - * constraints for the encoded file. This function uses these settings to - * select the appropriate encoding mode and set it up. - * - * \param vi Pointer to an initialized \ref vorbis_info struct. - * \param channels The number of channels to be encoded. - * \param rate The sampling rate of the source audio. - * \param max_bitrate Desired maximum bitrate (limit). -1 indicates unset. - * \param nominal_bitrate Desired average, or central, bitrate. -1 indicates unset. - * \param min_bitrate Desired minimum bitrate. -1 indicates unset. - * - * \return Zero for success, and negative values for failure. - * - * \retval 0 Success. - * \retval OV_EFAULT Internal logic fault; indicates a bug or heap/stack corruption. - * \retval OV_EINVAL Invalid setup request, eg, out of range argument. - * \retval OV_EIMPL Unimplemented mode; unable to comply with bitrate request. - */ -extern int vorbis_encode_init(vorbis_info *vi, - long channels, - long rate, - - long max_bitrate, - long nominal_bitrate, - long min_bitrate); - -/** - * This function performs step-one of a three-step bitrate-managed encode - * setup. It functions similarly to the one-step setup performed by \ref - * vorbis_encode_init but allows an application to make further encode setup - * tweaks using \ref vorbis_encode_ctl before finally calling \ref - * vorbis_encode_setup_init to complete the setup process. - * - * Before this function is called, the \ref vorbis_info struct should be - * initialized by using vorbis_info_init() from the libvorbis API. After - * encoding, vorbis_info_clear() should be called. - * - * The max_bitrate, nominal_bitrate, and min_bitrate settings are used to set - * constraints for the encoded file. This function uses these settings to - * select the appropriate encoding mode and set it up. - * - * \param vi Pointer to an initialized vorbis_info struct. - * \param channels The number of channels to be encoded. - * \param rate The sampling rate of the source audio. - * \param max_bitrate Desired maximum bitrate (limit). -1 indicates unset. - * \param nominal_bitrate Desired average, or central, bitrate. -1 indicates unset. - * \param min_bitrate Desired minimum bitrate. -1 indicates unset. - * - * \return Zero for success, and negative for failure. - * - * \retval 0 Success - * \retval OV_EFAULT Internal logic fault; indicates a bug or heap/stack corruption. - * \retval OV_EINVAL Invalid setup request, eg, out of range argument. - * \retval OV_EIMPL Unimplemented mode; unable to comply with bitrate request. - */ -extern int vorbis_encode_setup_managed(vorbis_info *vi, - long channels, - long rate, - - long max_bitrate, - long nominal_bitrate, - long min_bitrate); - -/** - * This function performs step-one of a three-step variable bitrate - * (quality-based) encode setup. It functions similarly to the one-step setup - * performed by \ref vorbis_encode_init_vbr() but allows an application to - * make further encode setup tweaks using \ref vorbis_encode_ctl() before - * finally calling \ref vorbis_encode_setup_init to complete the setup - * process. - * - * Before this function is called, the \ref vorbis_info struct should be - * initialized by using \ref vorbis_info_init() from the libvorbis API. After - * encoding, vorbis_info_clear() should be called. - * - * \param vi Pointer to an initialized vorbis_info struct. - * \param channels The number of channels to be encoded. - * \param rate The sampling rate of the source audio. - * \param quality Desired quality level, currently from -0.1 to 1.0 (lo to hi). - * - * \return Zero for success, and negative values for failure. - * - * \retval 0 Success - * \retval OV_EFAULT Internal logic fault; indicates a bug or heap/stack corruption. - * \retval OV_EINVAL Invalid setup request, eg, out of range argument. - * \retval OV_EIMPL Unimplemented mode; unable to comply with quality level request. - */ -extern int vorbis_encode_setup_vbr(vorbis_info *vi, - long channels, - long rate, - - float quality - ); - -/** - * This is the primary function within libvorbisenc for setting up variable - * bitrate ("quality" based) modes. - * - * - * Before this function is called, the vorbis_info struct should be - * initialized by using vorbis_info_init() from the libvorbis API. After - * encoding, vorbis_info_clear() should be called. - * - * \param vi Pointer to an initialized vorbis_info struct. - * \param channels The number of channels to be encoded. - * \param rate The sampling rate of the source audio. - * \param base_quality Desired quality level, currently from -0.1 to 1.0 (lo to hi). - * - * - * \return Zero for success, or a negative number for failure. - * - * \retval 0 Success - * \retval OV_EFAULT Internal logic fault; indicates a bug or heap/stack corruption. - * \retval OV_EINVAL Invalid setup request, eg, out of range argument. - * \retval OV_EIMPL Unimplemented mode; unable to comply with quality level request. - */ -extern int vorbis_encode_init_vbr(vorbis_info *vi, - long channels, - long rate, - - float base_quality - ); - -/** - * This function performs the last stage of three-step encoding setup, as - * described in the API overview under managed bitrate modes. - * - * Before this function is called, the \ref vorbis_info struct should be - * initialized by using vorbis_info_init() from the libvorbis API, one of - * \ref vorbis_encode_setup_managed() or \ref vorbis_encode_setup_vbr() called to - * initialize the high-level encoding setup, and \ref vorbis_encode_ctl() - * called if necessary to make encoding setup changes. - * vorbis_encode_setup_init() finalizes the highlevel encoding structure into - * a complete encoding setup after which the application may make no further - * setup changes. - * - * After encoding, vorbis_info_clear() should be called. - * - * \param vi Pointer to an initialized \ref vorbis_info struct. - * - * \return Zero for success, and negative values for failure. - * - * \retval 0 Success. - * \retval OV_EFAULT Internal logic fault; indicates a bug or heap/stack corruption. - * - * \retval OV_EINVAL Attempt to use vorbis_encode_setup_init() without first - * calling one of vorbis_encode_setup_managed() or vorbis_encode_setup_vbr() to - * initialize the high-level encoding setup - * - */ -extern int vorbis_encode_setup_init(vorbis_info *vi); - -/** - * This function implements a generic interface to miscellaneous encoder - * settings similar to the classic UNIX 'ioctl()' system call. Applications - * may use vorbis_encode_ctl() to query or set bitrate management or quality - * mode details by using one of several \e request arguments detailed below. - * vorbis_encode_ctl() must be called after one of - * vorbis_encode_setup_managed() or vorbis_encode_setup_vbr(). When used - * to modify settings, \ref vorbis_encode_ctl() must be called before \ref - * vorbis_encode_setup_init(). - * - * \param vi Pointer to an initialized vorbis_info struct. - * - * \param number Specifies the desired action; See \ref encctlcodes "the list - * of available requests". - * - * \param arg void * pointing to a data structure matching the request - * argument. - * - * \retval 0 Success. Any further return information (such as the result of a - * query) is placed into the storage pointed to by *arg. - * - * \retval OV_EINVAL Invalid argument, or an attempt to modify a setting after - * calling vorbis_encode_setup_init(). - * - * \retval OV_EIMPL Unimplemented or unknown request - */ -extern int vorbis_encode_ctl(vorbis_info *vi,int number,void *arg); - -/** - * \deprecated This is a deprecated interface. Please use vorbis_encode_ctl() - * with the \ref ovectl_ratemanage2_arg struct and \ref - * OV_ECTL_RATEMANAGE2_GET and \ref OV_ECTL_RATEMANAGE2_SET calls in new code. - * - * The \ref ovectl_ratemanage_arg structure is used with vorbis_encode_ctl() - * and the \ref OV_ECTL_RATEMANAGE_GET, \ref OV_ECTL_RATEMANAGE_SET, \ref - * OV_ECTL_RATEMANAGE_AVG, \ref OV_ECTL_RATEMANAGE_HARD calls in order to - * query and modify specifics of the encoder's bitrate management - * configuration. -*/ -struct ovectl_ratemanage_arg { - int management_active; /**< nonzero if bitrate management is active*/ -/** hard lower limit (in kilobits per second) below which the stream bitrate - will never be allowed for any given bitrate_hard_window seconds of time.*/ - long bitrate_hard_min; -/** hard upper limit (in kilobits per second) above which the stream bitrate - will never be allowed for any given bitrate_hard_window seconds of time.*/ - long bitrate_hard_max; -/** the window period (in seconds) used to regulate the hard bitrate minimum - and maximum*/ - double bitrate_hard_window; -/** soft lower limit (in kilobits per second) below which the average bitrate - tracker will start nudging the bitrate higher.*/ - long bitrate_av_lo; -/** soft upper limit (in kilobits per second) above which the average bitrate - tracker will start nudging the bitrate lower.*/ - long bitrate_av_hi; -/** the window period (in seconds) used to regulate the average bitrate - minimum and maximum.*/ - double bitrate_av_window; -/** Regulates the relative centering of the average and hard windows; in - libvorbis 1.0 and 1.0.1, the hard window regulation overlapped but - followed the average window regulation. In libvorbis 1.1 a bit-reservoir - interface replaces the old windowing interface; the older windowing - interface is simulated and this field has no effect.*/ - double bitrate_av_window_center; -}; - -/** - * \name struct ovectl_ratemanage2_arg - * - * The ovectl_ratemanage2_arg structure is used with vorbis_encode_ctl() and - * the OV_ECTL_RATEMANAGE2_GET and OV_ECTL_RATEMANAGE2_SET calls in order to - * query and modify specifics of the encoder's bitrate management - * configuration. - * -*/ -struct ovectl_ratemanage2_arg { - int management_active; /**< nonzero if bitrate management is active */ -/** Lower allowed bitrate limit in kilobits per second */ - long bitrate_limit_min_kbps; -/** Upper allowed bitrate limit in kilobits per second */ - long bitrate_limit_max_kbps; - long bitrate_limit_reservoir_bits; /**<Size of the bitrate reservoir in bits */ -/** Regulates the bitrate reservoir's preferred fill level in a range from 0.0 - * to 1.0; 0.0 tries to bank bits to buffer against future bitrate spikes, 1.0 - * buffers against future sudden drops in instantaneous bitrate. Default is - * 0.1 - */ - double bitrate_limit_reservoir_bias; -/** Average bitrate setting in kilobits per second */ - long bitrate_average_kbps; -/** Slew rate limit setting for average bitrate adjustment; sets the minimum - * time in seconds the bitrate tracker may swing from one extreme to the - * other when boosting or damping average bitrate. - */ - double bitrate_average_damping; -}; - - -/** - * \name vorbis_encode_ctl() codes - * - * \anchor encctlcodes - * - * These values are passed as the \c number parameter of vorbis_encode_ctl(). - * The type of the referent of that function's \c arg pointer depends on these - * codes. - */ -/*@{*/ - -/** - * Query the current encoder bitrate management setting. - * - *Argument: <tt>struct ovectl_ratemanage2_arg *</tt> - * - * Used to query the current encoder bitrate management setting. Also used to - * initialize fields of an ovectl_ratemanage2_arg structure for use with - * \ref OV_ECTL_RATEMANAGE2_SET. - */ -#define OV_ECTL_RATEMANAGE2_GET 0x14 - -/** - * Set the current encoder bitrate management settings. - * - * Argument: <tt>struct ovectl_ratemanage2_arg *</tt> - * - * Used to set the current encoder bitrate management settings to the values - * listed in the ovectl_ratemanage2_arg. Passing a NULL pointer will disable - * bitrate management. -*/ -#define OV_ECTL_RATEMANAGE2_SET 0x15 - -/** - * Returns the current encoder hard-lowpass setting (kHz) in the double - * pointed to by arg. - * - * Argument: <tt>double *</tt> -*/ -#define OV_ECTL_LOWPASS_GET 0x20 - -/** - * Sets the encoder hard-lowpass to the value (kHz) pointed to by arg. Valid - * lowpass settings range from 2 to 99. - * - * Argument: <tt>double *</tt> -*/ -#define OV_ECTL_LOWPASS_SET 0x21 - -/** - * Returns the current encoder impulse block setting in the double pointed - * to by arg. - * - * Argument: <tt>double *</tt> -*/ -#define OV_ECTL_IBLOCK_GET 0x30 - -/** - * Sets the impulse block bias to the the value pointed to by arg. - * - * Argument: <tt>double *</tt> - * - * Valid range is -15.0 to 0.0 [default]. A negative impulse block bias will - * direct to encoder to use more bits when incoding short blocks that contain - * strong impulses, thus improving the accuracy of impulse encoding. - */ -#define OV_ECTL_IBLOCK_SET 0x31 - -/** - * Returns the current encoder coupling setting in the int pointed - * to by arg. - * - * Argument: <tt>int *</tt> -*/ -#define OV_ECTL_COUPLING_GET 0x40 - -/** - * Enables/disables channel coupling in multichannel encoding according to arg. - * - * Argument: <tt>int *</tt> - * - * Zero disables channel coupling for multichannel inputs, nonzer enables - * channel coupling. Setting has no effect on monophonic encoding or - * multichannel counts that do not offer coupling. At present, coupling is - * available for stereo and 5.1 encoding. - */ -#define OV_ECTL_COUPLING_SET 0x41 - - /* deprecated rate management supported only for compatibility */ - -/** - * Old interface to querying bitrate management settings. - * - * Deprecated after move to bit-reservoir style management in 1.1 rendered - * this interface partially obsolete. - - * \deprecated Please use \ref OV_ECTL_RATEMANAGE2_GET instead. - * - * Argument: <tt>struct ovectl_ratemanage_arg *</tt> - */ -#define OV_ECTL_RATEMANAGE_GET 0x10 -/** - * Old interface to modifying bitrate management settings. - * - * deprecated after move to bit-reservoir style management in 1.1 rendered - * this interface partially obsolete. - * - * \deprecated Please use \ref OV_ECTL_RATEMANAGE2_SET instead. - * - * Argument: <tt>struct ovectl_ratemanage_arg *</tt> - */ -#define OV_ECTL_RATEMANAGE_SET 0x11 -/** - * Old interface to setting average-bitrate encoding mode. - * - * Deprecated after move to bit-reservoir style management in 1.1 rendered - * this interface partially obsolete. - * - * \deprecated Please use \ref OV_ECTL_RATEMANAGE2_SET instead. - * - * Argument: <tt>struct ovectl_ratemanage_arg *</tt> - */ -#define OV_ECTL_RATEMANAGE_AVG 0x12 -/** - * Old interface to setting bounded-bitrate encoding modes. - * - * deprecated after move to bit-reservoir style management in 1.1 rendered - * this interface partially obsolete. - * - * \deprecated Please use \ref OV_ECTL_RATEMANAGE2_SET instead. - * - * Argument: <tt>struct ovectl_ratemanage_arg *</tt> - */ -#define OV_ECTL_RATEMANAGE_HARD 0x13 - -/*@}*/ - - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/builddir/libvorbis-1.3.3/include/vorbis/vorbisfile.h b/builddir/libvorbis-1.3.3/include/vorbis/vorbisfile.h deleted file mode 100644 index 9271331..0000000 --- a/builddir/libvorbis-1.3.3/include/vorbis/vorbisfile.h +++ /dev/null @@ -1,206 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * - * by the Xiph.Org Foundation http://www.xiph.org/ * - * * - ******************************************************************** - - function: stdio-based convenience library for opening/seeking/decoding - last mod: $Id: vorbisfile.h 17182 2010-04-29 03:48:32Z xiphmont $ - - ********************************************************************/ - -#ifndef _OV_FILE_H_ -#define _OV_FILE_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -#include <stdio.h> -#include "codec.h" - -/* The function prototypes for the callbacks are basically the same as for - * the stdio functions fread, fseek, fclose, ftell. - * The one difference is that the FILE * arguments have been replaced with - * a void * - this is to be used as a pointer to whatever internal data these - * functions might need. In the stdio case, it's just a FILE * cast to a void * - * - * If you use other functions, check the docs for these functions and return - * the right values. For seek_func(), you *MUST* return -1 if the stream is - * unseekable - */ -typedef struct { - size_t (*read_func) (void *ptr, size_t size, size_t nmemb, void *datasource); - int (*seek_func) (void *datasource, ogg_int64_t offset, int whence); - int (*close_func) (void *datasource); - long (*tell_func) (void *datasource); -} ov_callbacks; - -#ifndef OV_EXCLUDE_STATIC_CALLBACKS - -/* a few sets of convenient callbacks, especially for use under - * Windows where ov_open_callbacks() should always be used instead of - * ov_open() to avoid problems with incompatible crt.o version linking - * issues. */ - -static int _ov_header_fseek_wrap(FILE *f,ogg_int64_t off,int whence){ - if(f==NULL)return(-1); - -#ifdef __MINGW32__ - return fseeko64(f,off,whence); -#elif defined (_WIN32) - return _fseeki64(f,off,whence); -#else - return fseek(f,off,whence); -#endif -} - -/* These structs below (OV_CALLBACKS_DEFAULT etc) are defined here as - * static data. That means that every file which includes this header - * will get its own copy of these structs whether it uses them or - * not unless it #defines OV_EXCLUDE_STATIC_CALLBACKS. - * These static symbols are essential on platforms such as Windows on - * which several different versions of stdio support may be linked to - * by different DLLs, and we need to be certain we know which one - * we're using (the same one as the main application). - */ - -static ov_callbacks OV_CALLBACKS_DEFAULT = { - (size_t (*)(void *, size_t, size_t, void *)) fread, - (int (*)(void *, ogg_int64_t, int)) _ov_header_fseek_wrap, - (int (*)(void *)) fclose, - (long (*)(void *)) ftell -}; - -static ov_callbacks OV_CALLBACKS_NOCLOSE = { - (size_t (*)(void *, size_t, size_t, void *)) fread, - (int (*)(void *, ogg_int64_t, int)) _ov_header_fseek_wrap, - (int (*)(void *)) NULL, - (long (*)(void *)) ftell -}; - -static ov_callbacks OV_CALLBACKS_STREAMONLY = { - (size_t (*)(void *, size_t, size_t, void *)) fread, - (int (*)(void *, ogg_int64_t, int)) NULL, - (int (*)(void *)) fclose, - (long (*)(void *)) NULL -}; - -static ov_callbacks OV_CALLBACKS_STREAMONLY_NOCLOSE = { - (size_t (*)(void *, size_t, size_t, void *)) fread, - (int (*)(void *, ogg_int64_t, int)) NULL, - (int (*)(void *)) NULL, - (long (*)(void *)) NULL -}; - -#endif - -#define NOTOPEN 0 -#define PARTOPEN 1 -#define OPENED 2 -#define STREAMSET 3 -#define INITSET 4 - -typedef struct OggVorbis_File { - void *datasource; /* Pointer to a FILE *, etc. */ - int seekable; - ogg_int64_t offset; - ogg_int64_t end; - ogg_sync_state oy; - - /* If the FILE handle isn't seekable (eg, a pipe), only the current - stream appears */ - int links; - ogg_int64_t *offsets; - ogg_int64_t *dataoffsets; - long *serialnos; - ogg_int64_t *pcmlengths; /* overloaded to maintain binary - compatibility; x2 size, stores both - beginning and end values */ - vorbis_info *vi; - vorbis_comment *vc; - - /* Decoding working state local storage */ - ogg_int64_t pcm_offset; - int ready_state; - long current_serialno; - int current_link; - - double bittrack; - double samptrack; - - ogg_stream_state os; /* take physical pages, weld into a logical - stream of packets */ - vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */ - vorbis_block vb; /* local working space for packet->PCM decode */ - - ov_callbacks callbacks; - -} OggVorbis_File; - - -extern int ov_clear(OggVorbis_File *vf); -extern int ov_fopen(const char *path,OggVorbis_File *vf); -extern int ov_open(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes); -extern int ov_open_callbacks(void *datasource, OggVorbis_File *vf, - const char *initial, long ibytes, ov_callbacks callbacks); - -extern int ov_test(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes); -extern int ov_test_callbacks(void *datasource, OggVorbis_File *vf, - const char *initial, long ibytes, ov_callbacks callbacks); -extern int ov_test_open(OggVorbis_File *vf); - -extern long ov_bitrate(OggVorbis_File *vf,int i); -extern long ov_bitrate_instant(OggVorbis_File *vf); -extern long ov_streams(OggVorbis_File *vf); -extern long ov_seekable(OggVorbis_File *vf); -extern long ov_serialnumber(OggVorbis_File *vf,int i); - -extern ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i); -extern ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i); -extern double ov_time_total(OggVorbis_File *vf,int i); - -extern int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos); -extern int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos); -extern int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos); -extern int ov_time_seek(OggVorbis_File *vf,double pos); -extern int ov_time_seek_page(OggVorbis_File *vf,double pos); - -extern int ov_raw_seek_lap(OggVorbis_File *vf,ogg_int64_t pos); -extern int ov_pcm_seek_lap(OggVorbis_File *vf,ogg_int64_t pos); -extern int ov_pcm_seek_page_lap(OggVorbis_File *vf,ogg_int64_t pos); -extern int ov_time_seek_lap(OggVorbis_File *vf,double pos); -extern int ov_time_seek_page_lap(OggVorbis_File *vf,double pos); - -extern ogg_int64_t ov_raw_tell(OggVorbis_File *vf); -extern ogg_int64_t ov_pcm_tell(OggVorbis_File *vf); -extern double ov_time_tell(OggVorbis_File *vf); - -extern vorbis_info *ov_info(OggVorbis_File *vf,int link); -extern vorbis_comment *ov_comment(OggVorbis_File *vf,int link); - -extern long ov_read_float(OggVorbis_File *vf,float ***pcm_channels,int samples, - int *bitstream); -extern long ov_read_filter(OggVorbis_File *vf,char *buffer,int length, - int bigendianp,int word,int sgned,int *bitstream, - void (*filter)(float **pcm,long channels,long samples,void *filter_param),void *filter_param); -extern long ov_read(OggVorbis_File *vf,char *buffer,int length, - int bigendianp,int word,int sgned,int *bitstream); -extern int ov_crosslap(OggVorbis_File *vf1,OggVorbis_File *vf2); - -extern int ov_halfrate(OggVorbis_File *vf,int flag); -extern int ov_halfrate_p(OggVorbis_File *vf); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif - diff --git a/builddir/openal-soft-1.15.1/COPYING b/builddir/openal-soft-1.15.1/COPYING deleted file mode 100644 index d0c8978..0000000 --- a/builddir/openal-soft-1.15.1/COPYING +++ /dev/null @@ -1,484 +0,0 @@ - - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 - - - Copyright (C) 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal -permission to copy, distribute and/or modify the library. - - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - c) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - d) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - <one line to give the library's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - 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 GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - <signature of Ty Coon>, 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - diff --git a/builddir/openal-soft-1.15.1/bin/OpenAL32.dll b/builddir/openal-soft-1.15.1/bin/OpenAL32.dll deleted file mode 100644 index 8def6ba..0000000 Binary files a/builddir/openal-soft-1.15.1/bin/OpenAL32.dll and /dev/null differ diff --git a/builddir/openal-soft-1.15.1/bin/OpenAL32.exp b/builddir/openal-soft-1.15.1/bin/OpenAL32.exp deleted file mode 100644 index 1c40963..0000000 Binary files a/builddir/openal-soft-1.15.1/bin/OpenAL32.exp and /dev/null differ diff --git a/builddir/openal-soft-1.15.1/bin/OpenAL32.lib b/builddir/openal-soft-1.15.1/bin/OpenAL32.lib deleted file mode 100644 index 3edce8c..0000000 Binary files a/builddir/openal-soft-1.15.1/bin/OpenAL32.lib and /dev/null differ diff --git a/builddir/openal-soft-1.15.1/bin/makehrtf.exe b/builddir/openal-soft-1.15.1/bin/makehrtf.exe deleted file mode 100644 index 9b8f502..0000000 Binary files a/builddir/openal-soft-1.15.1/bin/makehrtf.exe and /dev/null differ diff --git a/builddir/openal-soft-1.15.1/bin/openal-info.exe b/builddir/openal-soft-1.15.1/bin/openal-info.exe deleted file mode 100644 index 1521286..0000000 Binary files a/builddir/openal-soft-1.15.1/bin/openal-info.exe and /dev/null differ diff --git a/builddir/openal-soft-1.15.1/include/AL/al.h b/builddir/openal-soft-1.15.1/include/AL/al.h deleted file mode 100644 index 413b383..0000000 --- a/builddir/openal-soft-1.15.1/include/AL/al.h +++ /dev/null @@ -1,656 +0,0 @@ -#ifndef AL_AL_H -#define AL_AL_H - -#if defined(__cplusplus) -extern "C" { -#endif - -#ifndef AL_API - #if defined(AL_LIBTYPE_STATIC) - #define AL_API - #elif defined(_WIN32) - #define AL_API __declspec(dllimport) - #else - #define AL_API extern - #endif -#endif - -#if defined(_WIN32) - #define AL_APIENTRY __cdecl -#else - #define AL_APIENTRY -#endif - - -/** Deprecated macro. */ -#define OPENAL -#define ALAPI AL_API -#define ALAPIENTRY AL_APIENTRY -#define AL_INVALID (-1) -#define AL_ILLEGAL_ENUM AL_INVALID_ENUM -#define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION - -/** Supported AL version. */ -#define AL_VERSION_1_0 -#define AL_VERSION_1_1 - -/** 8-bit boolean */ -typedef char ALboolean; - -/** character */ -typedef char ALchar; - -/** signed 8-bit 2's complement integer */ -typedef signed char ALbyte; - -/** unsigned 8-bit integer */ -typedef unsigned char ALubyte; - -/** signed 16-bit 2's complement integer */ -typedef short ALshort; - -/** unsigned 16-bit integer */ -typedef unsigned short ALushort; - -/** signed 32-bit 2's complement integer */ -typedef int ALint; - -/** unsigned 32-bit integer */ -typedef unsigned int ALuint; - -/** non-negative 32-bit binary integer size */ -typedef int ALsizei; - -/** enumerated 32-bit value */ -typedef int ALenum; - -/** 32-bit IEEE754 floating-point */ -typedef float ALfloat; - -/** 64-bit IEEE754 floating-point */ -typedef double ALdouble; - -/** void type (for opaque pointers only) */ -typedef void ALvoid; - - -/* Enumerant values begin at column 50. No tabs. */ - -/** "no distance model" or "no buffer" */ -#define AL_NONE 0 - -/** Boolean False. */ -#define AL_FALSE 0 - -/** Boolean True. */ -#define AL_TRUE 1 - - -/** - * Relative source. - * Type: ALboolean - * Range: [AL_TRUE, AL_FALSE] - * Default: AL_FALSE - * - * Specifies if the Source has relative coordinates. - */ -#define AL_SOURCE_RELATIVE 0x202 - - -/** - * Inner cone angle, in degrees. - * Type: ALint, ALfloat - * Range: [0 - 360] - * Default: 360 - * - * The angle covered by the inner cone, where the source will not attenuate. - */ -#define AL_CONE_INNER_ANGLE 0x1001 - -/** - * Outer cone angle, in degrees. - * Range: [0 - 360] - * Default: 360 - * - * The angle covered by the outer cone, where the source will be fully - * attenuated. - */ -#define AL_CONE_OUTER_ANGLE 0x1002 - -/** - * Source pitch. - * Type: ALfloat - * Range: [0.5 - 2.0] - * Default: 1.0 - * - * A multiplier for the frequency (sample rate) of the source's buffer. - */ -#define AL_PITCH 0x1003 - -/** - * Source or listener position. - * Type: ALfloat[3], ALint[3] - * Default: {0, 0, 0} - * - * The source or listener location in three dimensional space. - * - * OpenAL, like OpenGL, uses a right handed coordinate system, where in a - * frontal default view X (thumb) points right, Y points up (index finger), and - * Z points towards the viewer/camera (middle finger). - * - * To switch from a left handed coordinate system, flip the sign on the Z - * coordinate. - */ -#define AL_POSITION 0x1004 - -/** - * Source direction. - * Type: ALfloat[3], ALint[3] - * Default: {0, 0, 0} - * - * Specifies the current direction in local space. - * A zero-length vector specifies an omni-directional source (cone is ignored). - */ -#define AL_DIRECTION 0x1005 - -/** - * Source or listener velocity. - * Type: ALfloat[3], ALint[3] - * Default: {0, 0, 0} - * - * Specifies the current velocity in local space. - */ -#define AL_VELOCITY 0x1006 - -/** - * Source looping. - * Type: ALboolean - * Range: [AL_TRUE, AL_FALSE] - * Default: AL_FALSE - * - * Specifies whether source is looping. - */ -#define AL_LOOPING 0x1007 - -/** - * Source buffer. - * Type: ALuint - * Range: any valid Buffer. - * - * Specifies the buffer to provide sound samples. - */ -#define AL_BUFFER 0x1009 - -/** - * Source or listener gain. - * Type: ALfloat - * Range: [0.0 - ] - * - * A value of 1.0 means unattenuated. Each division by 2 equals an attenuation - * of about -6dB. Each multiplicaton by 2 equals an amplification of about - * +6dB. - * - * A value of 0.0 is meaningless with respect to a logarithmic scale; it is - * silent. - */ -#define AL_GAIN 0x100A - -/** - * Minimum source gain. - * Type: ALfloat - * Range: [0.0 - 1.0] - * - * The minimum gain allowed for a source, after distance and cone attenation is - * applied (if applicable). - */ -#define AL_MIN_GAIN 0x100D - -/** - * Maximum source gain. - * Type: ALfloat - * Range: [0.0 - 1.0] - * - * The maximum gain allowed for a source, after distance and cone attenation is - * applied (if applicable). - */ -#define AL_MAX_GAIN 0x100E - -/** - * Listener orientation. - * Type: ALfloat[6] - * Default: {0.0, 0.0, -1.0, 0.0, 1.0, 0.0} - * - * Effectively two three dimensional vectors. The first vector is the front (or - * "at") and the second is the top (or "up"). - * - * Both vectors are in local space. - */ -#define AL_ORIENTATION 0x100F - -/** - * Source state (query only). - * Type: ALint - * Range: [AL_INITIAL, AL_PLAYING, AL_PAUSED, AL_STOPPED] - */ -#define AL_SOURCE_STATE 0x1010 - -/** Source state value. */ -#define AL_INITIAL 0x1011 -#define AL_PLAYING 0x1012 -#define AL_PAUSED 0x1013 -#define AL_STOPPED 0x1014 - -/** - * Source Buffer Queue size (query only). - * Type: ALint - * - * The number of buffers queued using alSourceQueueBuffers, minus the buffers - * removed with alSourceUnqueueBuffers. - */ -#define AL_BUFFERS_QUEUED 0x1015 - -/** - * Source Buffer Queue processed count (query only). - * Type: ALint - * - * The number of queued buffers that have been fully processed, and can be - * removed with alSourceUnqueueBuffers. - * - * Looping sources will never fully process buffers because they will be set to - * play again for when the source loops. - */ -#define AL_BUFFERS_PROCESSED 0x1016 - -/** - * Source reference distance. - * Type: ALfloat - * Range: [0.0 - ] - * Default: 1.0 - * - * The distance in units that no attenuation occurs. - * - * At 0.0, no distance attenuation ever occurs on non-linear attenuation models. - */ -#define AL_REFERENCE_DISTANCE 0x1020 - -/** - * Source rolloff factor. - * Type: ALfloat - * Range: [0.0 - ] - * Default: 1.0 - * - * Multiplier to exaggerate or diminish distance attenuation. - * - * At 0.0, no distance attenuation ever occurs. - */ -#define AL_ROLLOFF_FACTOR 0x1021 - -/** - * Outer cone gain. - * Type: ALfloat - * Range: [0.0 - 1.0] - * Default: 0.0 - * - * The gain attenuation applied when the listener is outside of the source's - * outer cone. - */ -#define AL_CONE_OUTER_GAIN 0x1022 - -/** - * Source maximum distance. - * Type: ALfloat - * Range: [0.0 - ] - * Default: +inf - * - * The distance above which the source is not attenuated any further with a - * clamped distance model, or where attenuation reaches 0.0 gain for linear - * distance models with a default rolloff factor. - */ -#define AL_MAX_DISTANCE 0x1023 - -/** Source buffer position, in seconds */ -#define AL_SEC_OFFSET 0x1024 -/** Source buffer position, in sample frames */ -#define AL_SAMPLE_OFFSET 0x1025 -/** Source buffer position, in bytes */ -#define AL_BYTE_OFFSET 0x1026 - -/** - * Source type (query only). - * Type: ALint - * Range: [AL_STATIC, AL_STREAMING, AL_UNDETERMINED] - * - * A Source is Static if a Buffer has been attached using AL_BUFFER. - * - * A Source is Streaming if one or more Buffers have been attached using - * alSourceQueueBuffers. - * - * A Source is Undetermined when it has the NULL buffer attached using - * AL_BUFFER. - */ -#define AL_SOURCE_TYPE 0x1027 - -/** Source type value. */ -#define AL_STATIC 0x1028 -#define AL_STREAMING 0x1029 -#define AL_UNDETERMINED 0x1030 - -/** Buffer format specifier. */ -#define AL_FORMAT_MONO8 0x1100 -#define AL_FORMAT_MONO16 0x1101 -#define AL_FORMAT_STEREO8 0x1102 -#define AL_FORMAT_STEREO16 0x1103 - -/** Buffer frequency (query only). */ -#define AL_FREQUENCY 0x2001 -/** Buffer bits per sample (query only). */ -#define AL_BITS 0x2002 -/** Buffer channel count (query only). */ -#define AL_CHANNELS 0x2003 -/** Buffer data size (query only). */ -#define AL_SIZE 0x2004 - -/** - * Buffer state. - * - * Not for public use. - */ -#define AL_UNUSED 0x2010 -#define AL_PENDING 0x2011 -#define AL_PROCESSED 0x2012 - - -/** No error. */ -#define AL_NO_ERROR 0 - -/** Invalid name paramater passed to AL call. */ -#define AL_INVALID_NAME 0xA001 - -/** Invalid enum parameter passed to AL call. */ -#define AL_INVALID_ENUM 0xA002 - -/** Invalid value parameter passed to AL call. */ -#define AL_INVALID_VALUE 0xA003 - -/** Illegal AL call. */ -#define AL_INVALID_OPERATION 0xA004 - -/** Not enough memory. */ -#define AL_OUT_OF_MEMORY 0xA005 - - -/** Context string: Vendor ID. */ -#define AL_VENDOR 0xB001 -/** Context string: Version. */ -#define AL_VERSION 0xB002 -/** Context string: Renderer ID. */ -#define AL_RENDERER 0xB003 -/** Context string: Space-separated extension list. */ -#define AL_EXTENSIONS 0xB004 - - -/** - * Doppler scale. - * Type: ALfloat - * Range: [0.0 - ] - * Default: 1.0 - * - * Scale for source and listener velocities. - */ -#define AL_DOPPLER_FACTOR 0xC000 -AL_API void AL_APIENTRY alDopplerFactor(ALfloat value); - -/** - * Doppler velocity (deprecated). - * - * A multiplier applied to the Speed of Sound. - */ -#define AL_DOPPLER_VELOCITY 0xC001 -AL_API void AL_APIENTRY alDopplerVelocity(ALfloat value); - -/** - * Speed of Sound, in units per second. - * Type: ALfloat - * Range: [0.0001 - ] - * Default: 343.3 - * - * The speed at which sound waves are assumed to travel, when calculating the - * doppler effect. - */ -#define AL_SPEED_OF_SOUND 0xC003 -AL_API void AL_APIENTRY alSpeedOfSound(ALfloat value); - -/** - * Distance attenuation model. - * Type: ALint - * Range: [AL_NONE, AL_INVERSE_DISTANCE, AL_INVERSE_DISTANCE_CLAMPED, - * AL_LINEAR_DISTANCE, AL_LINEAR_DISTANCE_CLAMPED, - * AL_EXPONENT_DISTANCE, AL_EXPONENT_DISTANCE_CLAMPED] - * Default: AL_INVERSE_DISTANCE_CLAMPED - * - * The model by which sources attenuate with distance. - * - * None - No distance attenuation. - * Inverse - Doubling the distance halves the source gain. - * Linear - Linear gain scaling between the reference and max distances. - * Exponent - Exponential gain dropoff. - * - * Clamped variations work like the non-clamped counterparts, except the - * distance calculated is clamped between the reference and max distances. - */ -#define AL_DISTANCE_MODEL 0xD000 -AL_API void AL_APIENTRY alDistanceModel(ALenum distanceModel); - -/** Distance model value. */ -#define AL_INVERSE_DISTANCE 0xD001 -#define AL_INVERSE_DISTANCE_CLAMPED 0xD002 -#define AL_LINEAR_DISTANCE 0xD003 -#define AL_LINEAR_DISTANCE_CLAMPED 0xD004 -#define AL_EXPONENT_DISTANCE 0xD005 -#define AL_EXPONENT_DISTANCE_CLAMPED 0xD006 - -/** Renderer State management. */ -AL_API void AL_APIENTRY alEnable(ALenum capability); -AL_API void AL_APIENTRY alDisable(ALenum capability); -AL_API ALboolean AL_APIENTRY alIsEnabled(ALenum capability); - -/** State retrieval. */ -AL_API const ALchar* AL_APIENTRY alGetString(ALenum param); -AL_API void AL_APIENTRY alGetBooleanv(ALenum param, ALboolean *values); -AL_API void AL_APIENTRY alGetIntegerv(ALenum param, ALint *values); -AL_API void AL_APIENTRY alGetFloatv(ALenum param, ALfloat *values); -AL_API void AL_APIENTRY alGetDoublev(ALenum param, ALdouble *values); -AL_API ALboolean AL_APIENTRY alGetBoolean(ALenum param); -AL_API ALint AL_APIENTRY alGetInteger(ALenum param); -AL_API ALfloat AL_APIENTRY alGetFloat(ALenum param); -AL_API ALdouble AL_APIENTRY alGetDouble(ALenum param); - -/** - * Error retrieval. - * - * Obtain the first error generated in the AL context since the last check. - */ -AL_API ALenum AL_APIENTRY alGetError(void); - -/** - * Extension support. - * - * Query for the presence of an extension, and obtain any appropriate function - * pointers and enum values. - */ -AL_API ALboolean AL_APIENTRY alIsExtensionPresent(const ALchar *extname); -AL_API void* AL_APIENTRY alGetProcAddress(const ALchar *fname); -AL_API ALenum AL_APIENTRY alGetEnumValue(const ALchar *ename); - - -/** Set Listener parameters */ -AL_API void AL_APIENTRY alListenerf(ALenum param, ALfloat value); -AL_API void AL_APIENTRY alListener3f(ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); -AL_API void AL_APIENTRY alListenerfv(ALenum param, const ALfloat *values); -AL_API void AL_APIENTRY alListeneri(ALenum param, ALint value); -AL_API void AL_APIENTRY alListener3i(ALenum param, ALint value1, ALint value2, ALint value3); -AL_API void AL_APIENTRY alListeneriv(ALenum param, const ALint *values); - -/** Get Listener parameters */ -AL_API void AL_APIENTRY alGetListenerf(ALenum param, ALfloat *value); -AL_API void AL_APIENTRY alGetListener3f(ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); -AL_API void AL_APIENTRY alGetListenerfv(ALenum param, ALfloat *values); -AL_API void AL_APIENTRY alGetListeneri(ALenum param, ALint *value); -AL_API void AL_APIENTRY alGetListener3i(ALenum param, ALint *value1, ALint *value2, ALint *value3); -AL_API void AL_APIENTRY alGetListeneriv(ALenum param, ALint *values); - - -/** Create Source objects. */ -AL_API void AL_APIENTRY alGenSources(ALsizei n, ALuint *sources); -/** Delete Source objects. */ -AL_API void AL_APIENTRY alDeleteSources(ALsizei n, const ALuint *sources); -/** Verify a handle is a valid Source. */ -AL_API ALboolean AL_APIENTRY alIsSource(ALuint source); - -/** Set Source parameters. */ -AL_API void AL_APIENTRY alSourcef(ALuint source, ALenum param, ALfloat value); -AL_API void AL_APIENTRY alSource3f(ALuint source, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); -AL_API void AL_APIENTRY alSourcefv(ALuint source, ALenum param, const ALfloat *values); -AL_API void AL_APIENTRY alSourcei(ALuint source, ALenum param, ALint value); -AL_API void AL_APIENTRY alSource3i(ALuint source, ALenum param, ALint value1, ALint value2, ALint value3); -AL_API void AL_APIENTRY alSourceiv(ALuint source, ALenum param, const ALint *values); - -/** Get Source parameters. */ -AL_API void AL_APIENTRY alGetSourcef(ALuint source, ALenum param, ALfloat *value); -AL_API void AL_APIENTRY alGetSource3f(ALuint source, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); -AL_API void AL_APIENTRY alGetSourcefv(ALuint source, ALenum param, ALfloat *values); -AL_API void AL_APIENTRY alGetSourcei(ALuint source, ALenum param, ALint *value); -AL_API void AL_APIENTRY alGetSource3i(ALuint source, ALenum param, ALint *value1, ALint *value2, ALint *value3); -AL_API void AL_APIENTRY alGetSourceiv(ALuint source, ALenum param, ALint *values); - - -/** Play, replay, or resume (if paused) a list of Sources */ -AL_API void AL_APIENTRY alSourcePlayv(ALsizei n, const ALuint *sources); -/** Stop a list of Sources */ -AL_API void AL_APIENTRY alSourceStopv(ALsizei n, const ALuint *sources); -/** Rewind a list of Sources */ -AL_API void AL_APIENTRY alSourceRewindv(ALsizei n, const ALuint *sources); -/** Pause a list of Sources */ -AL_API void AL_APIENTRY alSourcePausev(ALsizei n, const ALuint *sources); - -/** Play, replay, or resume a Source */ -AL_API void AL_APIENTRY alSourcePlay(ALuint source); -/** Stop a Source */ -AL_API void AL_APIENTRY alSourceStop(ALuint source); -/** Rewind a Source (set playback postiton to beginning) */ -AL_API void AL_APIENTRY alSourceRewind(ALuint source); -/** Pause a Source */ -AL_API void AL_APIENTRY alSourcePause(ALuint source); - -/** Queue buffers onto a source */ -AL_API void AL_APIENTRY alSourceQueueBuffers(ALuint source, ALsizei nb, const ALuint *buffers); -/** Unqueue processed buffers from a source */ -AL_API void AL_APIENTRY alSourceUnqueueBuffers(ALuint source, ALsizei nb, ALuint *buffers); - - -/** Create Buffer objects */ -AL_API void AL_APIENTRY alGenBuffers(ALsizei n, ALuint *buffers); -/** Delete Buffer objects */ -AL_API void AL_APIENTRY alDeleteBuffers(ALsizei n, const ALuint *buffers); -/** Verify a handle is a valid Buffer */ -AL_API ALboolean AL_APIENTRY alIsBuffer(ALuint buffer); - -/** Specifies the data to be copied into a buffer */ -AL_API void AL_APIENTRY alBufferData(ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei freq); - -/** Set Buffer parameters, */ -AL_API void AL_APIENTRY alBufferf(ALuint buffer, ALenum param, ALfloat value); -AL_API void AL_APIENTRY alBuffer3f(ALuint buffer, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); -AL_API void AL_APIENTRY alBufferfv(ALuint buffer, ALenum param, const ALfloat *values); -AL_API void AL_APIENTRY alBufferi(ALuint buffer, ALenum param, ALint value); -AL_API void AL_APIENTRY alBuffer3i(ALuint buffer, ALenum param, ALint value1, ALint value2, ALint value3); -AL_API void AL_APIENTRY alBufferiv(ALuint buffer, ALenum param, const ALint *values); - -/** Get Buffer parameters. */ -AL_API void AL_APIENTRY alGetBufferf(ALuint buffer, ALenum param, ALfloat *value); -AL_API void AL_APIENTRY alGetBuffer3f(ALuint buffer, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); -AL_API void AL_APIENTRY alGetBufferfv(ALuint buffer, ALenum param, ALfloat *values); -AL_API void AL_APIENTRY alGetBufferi(ALuint buffer, ALenum param, ALint *value); -AL_API void AL_APIENTRY alGetBuffer3i(ALuint buffer, ALenum param, ALint *value1, ALint *value2, ALint *value3); -AL_API void AL_APIENTRY alGetBufferiv(ALuint buffer, ALenum param, ALint *values); - -/** Pointer-to-function type, useful for dynamically getting AL entry points. */ -typedef void (AL_APIENTRY *LPALENABLE)(ALenum capability); -typedef void (AL_APIENTRY *LPALDISABLE)(ALenum capability); -typedef ALboolean (AL_APIENTRY *LPALISENABLED)(ALenum capability); -typedef const ALchar* (AL_APIENTRY *LPALGETSTRING)(ALenum param); -typedef void (AL_APIENTRY *LPALGETBOOLEANV)(ALenum param, ALboolean *values); -typedef void (AL_APIENTRY *LPALGETINTEGERV)(ALenum param, ALint *values); -typedef void (AL_APIENTRY *LPALGETFLOATV)(ALenum param, ALfloat *values); -typedef void (AL_APIENTRY *LPALGETDOUBLEV)(ALenum param, ALdouble *values); -typedef ALboolean (AL_APIENTRY *LPALGETBOOLEAN)(ALenum param); -typedef ALint (AL_APIENTRY *LPALGETINTEGER)(ALenum param); -typedef ALfloat (AL_APIENTRY *LPALGETFLOAT)(ALenum param); -typedef ALdouble (AL_APIENTRY *LPALGETDOUBLE)(ALenum param); -typedef ALenum (AL_APIENTRY *LPALGETERROR)(void); -typedef ALboolean (AL_APIENTRY *LPALISEXTENSIONPRESENT)(const ALchar *extname); -typedef void* (AL_APIENTRY *LPALGETPROCADDRESS)(const ALchar *fname); -typedef ALenum (AL_APIENTRY *LPALGETENUMVALUE)(const ALchar *ename); -typedef void (AL_APIENTRY *LPALLISTENERF)(ALenum param, ALfloat value); -typedef void (AL_APIENTRY *LPALLISTENER3F)(ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); -typedef void (AL_APIENTRY *LPALLISTENERFV)(ALenum param, const ALfloat *values); -typedef void (AL_APIENTRY *LPALLISTENERI)(ALenum param, ALint value); -typedef void (AL_APIENTRY *LPALLISTENER3I)(ALenum param, ALint value1, ALint value2, ALint value3); -typedef void (AL_APIENTRY *LPALLISTENERIV)(ALenum param, const ALint *values); -typedef void (AL_APIENTRY *LPALGETLISTENERF)(ALenum param, ALfloat *value); -typedef void (AL_APIENTRY *LPALGETLISTENER3F)(ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); -typedef void (AL_APIENTRY *LPALGETLISTENERFV)(ALenum param, ALfloat *values); -typedef void (AL_APIENTRY *LPALGETLISTENERI)(ALenum param, ALint *value); -typedef void (AL_APIENTRY *LPALGETLISTENER3I)(ALenum param, ALint *value1, ALint *value2, ALint *value3); -typedef void (AL_APIENTRY *LPALGETLISTENERIV)(ALenum param, ALint *values); -typedef void (AL_APIENTRY *LPALGENSOURCES)(ALsizei n, ALuint *sources); -typedef void (AL_APIENTRY *LPALDELETESOURCES)(ALsizei n, const ALuint *sources); -typedef ALboolean (AL_APIENTRY *LPALISSOURCE)(ALuint source); -typedef void (AL_APIENTRY *LPALSOURCEF)(ALuint source, ALenum param, ALfloat value); -typedef void (AL_APIENTRY *LPALSOURCE3F)(ALuint source, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); -typedef void (AL_APIENTRY *LPALSOURCEFV)(ALuint source, ALenum param, const ALfloat *values); -typedef void (AL_APIENTRY *LPALSOURCEI)(ALuint source, ALenum param, ALint value); -typedef void (AL_APIENTRY *LPALSOURCE3I)(ALuint source, ALenum param, ALint value1, ALint value2, ALint value3); -typedef void (AL_APIENTRY *LPALSOURCEIV)(ALuint source, ALenum param, const ALint *values); -typedef void (AL_APIENTRY *LPALGETSOURCEF)(ALuint source, ALenum param, ALfloat *value); -typedef void (AL_APIENTRY *LPALGETSOURCE3F)(ALuint source, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); -typedef void (AL_APIENTRY *LPALGETSOURCEFV)(ALuint source, ALenum param, ALfloat *values); -typedef void (AL_APIENTRY *LPALGETSOURCEI)(ALuint source, ALenum param, ALint *value); -typedef void (AL_APIENTRY *LPALGETSOURCE3I)(ALuint source, ALenum param, ALint *value1, ALint *value2, ALint *value3); -typedef void (AL_APIENTRY *LPALGETSOURCEIV)(ALuint source, ALenum param, ALint *values); -typedef void (AL_APIENTRY *LPALSOURCEPLAYV)(ALsizei n, const ALuint *sources); -typedef void (AL_APIENTRY *LPALSOURCESTOPV)(ALsizei n, const ALuint *sources); -typedef void (AL_APIENTRY *LPALSOURCEREWINDV)(ALsizei n, const ALuint *sources); -typedef void (AL_APIENTRY *LPALSOURCEPAUSEV)(ALsizei n, const ALuint *sources); -typedef void (AL_APIENTRY *LPALSOURCEPLAY)(ALuint source); -typedef void (AL_APIENTRY *LPALSOURCESTOP)(ALuint source); -typedef void (AL_APIENTRY *LPALSOURCEREWIND)(ALuint source); -typedef void (AL_APIENTRY *LPALSOURCEPAUSE)(ALuint source); -typedef void (AL_APIENTRY *LPALSOURCEQUEUEBUFFERS)(ALuint source, ALsizei nb, const ALuint *buffers); -typedef void (AL_APIENTRY *LPALSOURCEUNQUEUEBUFFERS)(ALuint source, ALsizei nb, ALuint *buffers); -typedef void (AL_APIENTRY *LPALGENBUFFERS)(ALsizei n, ALuint *buffers); -typedef void (AL_APIENTRY *LPALDELETEBUFFERS)(ALsizei n, const ALuint *buffers); -typedef ALboolean (AL_APIENTRY *LPALISBUFFER)(ALuint buffer); -typedef void (AL_APIENTRY *LPALBUFFERDATA)(ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei freq); -typedef void (AL_APIENTRY *LPALBUFFERF)(ALuint buffer, ALenum param, ALfloat value); -typedef void (AL_APIENTRY *LPALBUFFER3F)(ALuint buffer, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); -typedef void (AL_APIENTRY *LPALBUFFERFV)(ALuint buffer, ALenum param, const ALfloat *values); -typedef void (AL_APIENTRY *LPALBUFFERI)(ALuint buffer, ALenum param, ALint value); -typedef void (AL_APIENTRY *LPALBUFFER3I)(ALuint buffer, ALenum param, ALint value1, ALint value2, ALint value3); -typedef void (AL_APIENTRY *LPALBUFFERIV)(ALuint buffer, ALenum param, const ALint *values); -typedef void (AL_APIENTRY *LPALGETBUFFERF)(ALuint buffer, ALenum param, ALfloat *value); -typedef void (AL_APIENTRY *LPALGETBUFFER3F)(ALuint buffer, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); -typedef void (AL_APIENTRY *LPALGETBUFFERFV)(ALuint buffer, ALenum param, ALfloat *values); -typedef void (AL_APIENTRY *LPALGETBUFFERI)(ALuint buffer, ALenum param, ALint *value); -typedef void (AL_APIENTRY *LPALGETBUFFER3I)(ALuint buffer, ALenum param, ALint *value1, ALint *value2, ALint *value3); -typedef void (AL_APIENTRY *LPALGETBUFFERIV)(ALuint buffer, ALenum param, ALint *values); -typedef void (AL_APIENTRY *LPALDOPPLERFACTOR)(ALfloat value); -typedef void (AL_APIENTRY *LPALDOPPLERVELOCITY)(ALfloat value); -typedef void (AL_APIENTRY *LPALSPEEDOFSOUND)(ALfloat value); -typedef void (AL_APIENTRY *LPALDISTANCEMODEL)(ALenum distanceModel); - -#if defined(__cplusplus) -} /* extern "C" */ -#endif - -#endif /* AL_AL_H */ diff --git a/builddir/openal-soft-1.15.1/include/AL/alc.h b/builddir/openal-soft-1.15.1/include/AL/alc.h deleted file mode 100644 index 294e8b3..0000000 --- a/builddir/openal-soft-1.15.1/include/AL/alc.h +++ /dev/null @@ -1,237 +0,0 @@ -#ifndef AL_ALC_H -#define AL_ALC_H - -#if defined(__cplusplus) -extern "C" { -#endif - -#ifndef ALC_API - #if defined(AL_LIBTYPE_STATIC) - #define ALC_API - #elif defined(_WIN32) - #define ALC_API __declspec(dllimport) - #else - #define ALC_API extern - #endif -#endif - -#if defined(_WIN32) - #define ALC_APIENTRY __cdecl -#else - #define ALC_APIENTRY -#endif - - -/** Deprecated macro. */ -#define ALCAPI ALC_API -#define ALCAPIENTRY ALC_APIENTRY -#define ALC_INVALID 0 - -/** Supported ALC version? */ -#define ALC_VERSION_0_1 1 - -/** Opaque device handle */ -typedef struct ALCdevice_struct ALCdevice; -/** Opaque context handle */ -typedef struct ALCcontext_struct ALCcontext; - -/** 8-bit boolean */ -typedef char ALCboolean; - -/** character */ -typedef char ALCchar; - -/** signed 8-bit 2's complement integer */ -typedef signed char ALCbyte; - -/** unsigned 8-bit integer */ -typedef unsigned char ALCubyte; - -/** signed 16-bit 2's complement integer */ -typedef short ALCshort; - -/** unsigned 16-bit integer */ -typedef unsigned short ALCushort; - -/** signed 32-bit 2's complement integer */ -typedef int ALCint; - -/** unsigned 32-bit integer */ -typedef unsigned int ALCuint; - -/** non-negative 32-bit binary integer size */ -typedef int ALCsizei; - -/** enumerated 32-bit value */ -typedef int ALCenum; - -/** 32-bit IEEE754 floating-point */ -typedef float ALCfloat; - -/** 64-bit IEEE754 floating-point */ -typedef double ALCdouble; - -/** void type (for opaque pointers only) */ -typedef void ALCvoid; - - -/* Enumerant values begin at column 50. No tabs. */ - -/** Boolean False. */ -#define ALC_FALSE 0 - -/** Boolean True. */ -#define ALC_TRUE 1 - -/** Context attribute: <int> Hz. */ -#define ALC_FREQUENCY 0x1007 - -/** Context attribute: <int> Hz. */ -#define ALC_REFRESH 0x1008 - -/** Context attribute: AL_TRUE or AL_FALSE. */ -#define ALC_SYNC 0x1009 - -/** Context attribute: <int> requested Mono (3D) Sources. */ -#define ALC_MONO_SOURCES 0x1010 - -/** Context attribute: <int> requested Stereo Sources. */ -#define ALC_STEREO_SOURCES 0x1011 - -/** No error. */ -#define ALC_NO_ERROR 0 - -/** Invalid device handle. */ -#define ALC_INVALID_DEVICE 0xA001 - -/** Invalid context handle. */ -#define ALC_INVALID_CONTEXT 0xA002 - -/** Invalid enum parameter passed to an ALC call. */ -#define ALC_INVALID_ENUM 0xA003 - -/** Invalid value parameter passed to an ALC call. */ -#define ALC_INVALID_VALUE 0xA004 - -/** Out of memory. */ -#define ALC_OUT_OF_MEMORY 0xA005 - - -/** Runtime ALC version. */ -#define ALC_MAJOR_VERSION 0x1000 -#define ALC_MINOR_VERSION 0x1001 - -/** Context attribute list properties. */ -#define ALC_ATTRIBUTES_SIZE 0x1002 -#define ALC_ALL_ATTRIBUTES 0x1003 - -/** String for the default device specifier. */ -#define ALC_DEFAULT_DEVICE_SPECIFIER 0x1004 -/** - * String for the given device's specifier. - * - * If device handle is NULL, it is instead a null-char separated list of - * strings of known device specifiers (list ends with an empty string). - */ -#define ALC_DEVICE_SPECIFIER 0x1005 -/** String for space-separated list of ALC extensions. */ -#define ALC_EXTENSIONS 0x1006 - - -/** Capture extension */ -#define ALC_EXT_CAPTURE 1 -/** - * String for the given capture device's specifier. - * - * If device handle is NULL, it is instead a null-char separated list of - * strings of known capture device specifiers (list ends with an empty string). - */ -#define ALC_CAPTURE_DEVICE_SPECIFIER 0x310 -/** String for the default capture device specifier. */ -#define ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER 0x311 -/** Number of sample frames available for capture. */ -#define ALC_CAPTURE_SAMPLES 0x312 - - -/** Enumerate All extension */ -#define ALC_ENUMERATE_ALL_EXT 1 -/** String for the default extended device specifier. */ -#define ALC_DEFAULT_ALL_DEVICES_SPECIFIER 0x1012 -/** - * String for the given extended device's specifier. - * - * If device handle is NULL, it is instead a null-char separated list of - * strings of known extended device specifiers (list ends with an empty string). - */ -#define ALC_ALL_DEVICES_SPECIFIER 0x1013 - - -/** Context management. */ -ALC_API ALCcontext* ALC_APIENTRY alcCreateContext(ALCdevice *device, const ALCint* attrlist); -ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent(ALCcontext *context); -ALC_API void ALC_APIENTRY alcProcessContext(ALCcontext *context); -ALC_API void ALC_APIENTRY alcSuspendContext(ALCcontext *context); -ALC_API void ALC_APIENTRY alcDestroyContext(ALCcontext *context); -ALC_API ALCcontext* ALC_APIENTRY alcGetCurrentContext(void); -ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice(ALCcontext *context); - -/** Device management. */ -ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *devicename); -ALC_API ALCboolean ALC_APIENTRY alcCloseDevice(ALCdevice *device); - - -/** - * Error support. - * - * Obtain the most recent Device error. - */ -ALC_API ALCenum ALC_APIENTRY alcGetError(ALCdevice *device); - -/** - * Extension support. - * - * Query for the presence of an extension, and obtain any appropriate - * function pointers and enum values. - */ -ALC_API ALCboolean ALC_APIENTRY alcIsExtensionPresent(ALCdevice *device, const ALCchar *extname); -ALC_API void* ALC_APIENTRY alcGetProcAddress(ALCdevice *device, const ALCchar *funcname); -ALC_API ALCenum ALC_APIENTRY alcGetEnumValue(ALCdevice *device, const ALCchar *enumname); - -/** Query function. */ -ALC_API const ALCchar* ALC_APIENTRY alcGetString(ALCdevice *device, ALCenum param); -ALC_API void ALC_APIENTRY alcGetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *values); - -/** Capture function. */ -ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize); -ALC_API ALCboolean ALC_APIENTRY alcCaptureCloseDevice(ALCdevice *device); -ALC_API void ALC_APIENTRY alcCaptureStart(ALCdevice *device); -ALC_API void ALC_APIENTRY alcCaptureStop(ALCdevice *device); -ALC_API void ALC_APIENTRY alcCaptureSamples(ALCdevice *device, ALCvoid *buffer, ALCsizei samples); - -/** Pointer-to-function type, useful for dynamically getting ALC entry points. */ -typedef ALCcontext* (ALC_APIENTRY *LPALCCREATECONTEXT)(ALCdevice *device, const ALCint *attrlist); -typedef ALCboolean (ALC_APIENTRY *LPALCMAKECONTEXTCURRENT)(ALCcontext *context); -typedef void (ALC_APIENTRY *LPALCPROCESSCONTEXT)(ALCcontext *context); -typedef void (ALC_APIENTRY *LPALCSUSPENDCONTEXT)(ALCcontext *context); -typedef void (ALC_APIENTRY *LPALCDESTROYCONTEXT)(ALCcontext *context); -typedef ALCcontext* (ALC_APIENTRY *LPALCGETCURRENTCONTEXT)(void); -typedef ALCdevice* (ALC_APIENTRY *LPALCGETCONTEXTSDEVICE)(ALCcontext *context); -typedef ALCdevice* (ALC_APIENTRY *LPALCOPENDEVICE)(const ALCchar *devicename); -typedef ALCboolean (ALC_APIENTRY *LPALCCLOSEDEVICE)(ALCdevice *device); -typedef ALCenum (ALC_APIENTRY *LPALCGETERROR)(ALCdevice *device); -typedef ALCboolean (ALC_APIENTRY *LPALCISEXTENSIONPRESENT)(ALCdevice *device, const ALCchar *extname); -typedef void* (ALC_APIENTRY *LPALCGETPROCADDRESS)(ALCdevice *device, const ALCchar *funcname); -typedef ALCenum (ALC_APIENTRY *LPALCGETENUMVALUE)(ALCdevice *device, const ALCchar *enumname); -typedef const ALCchar* (ALC_APIENTRY *LPALCGETSTRING)(ALCdevice *device, ALCenum param); -typedef void (ALC_APIENTRY *LPALCGETINTEGERV)(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *values); -typedef ALCdevice* (ALC_APIENTRY *LPALCCAPTUREOPENDEVICE)(const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize); -typedef ALCboolean (ALC_APIENTRY *LPALCCAPTURECLOSEDEVICE)(ALCdevice *device); -typedef void (ALC_APIENTRY *LPALCCAPTURESTART)(ALCdevice *device); -typedef void (ALC_APIENTRY *LPALCCAPTURESTOP)(ALCdevice *device); -typedef void (ALC_APIENTRY *LPALCCAPTURESAMPLES)(ALCdevice *device, ALCvoid *buffer, ALCsizei samples); - -#if defined(__cplusplus) -} -#endif - -#endif /* AL_ALC_H */ diff --git a/builddir/openal-soft-1.15.1/include/AL/alext.h b/builddir/openal-soft-1.15.1/include/AL/alext.h deleted file mode 100644 index 0447f2b..0000000 --- a/builddir/openal-soft-1.15.1/include/AL/alext.h +++ /dev/null @@ -1,355 +0,0 @@ -/** - * OpenAL cross platform audio library - * Copyright (C) 2008 by authors. - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * 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 GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * Or go to http://www.gnu.org/copyleft/lgpl.html - */ - -#ifndef AL_ALEXT_H -#define AL_ALEXT_H - -#include <stddef.h> -/* Define int64_t and uint64_t types */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -#include <inttypes.h> -#elif defined(_WIN32) && defined(__GNUC__) -#include <stdint.h> -#elif defined(_WIN32) -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; -#else -/* Fallback if nothing above works */ -#include <inttypes.h> -#endif - -#include "alc.h" -#include "al.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef AL_LOKI_IMA_ADPCM_format -#define AL_LOKI_IMA_ADPCM_format 1 -#define AL_FORMAT_IMA_ADPCM_MONO16_EXT 0x10000 -#define AL_FORMAT_IMA_ADPCM_STEREO16_EXT 0x10001 -#endif - -#ifndef AL_LOKI_WAVE_format -#define AL_LOKI_WAVE_format 1 -#define AL_FORMAT_WAVE_EXT 0x10002 -#endif - -#ifndef AL_EXT_vorbis -#define AL_EXT_vorbis 1 -#define AL_FORMAT_VORBIS_EXT 0x10003 -#endif - -#ifndef AL_LOKI_quadriphonic -#define AL_LOKI_quadriphonic 1 -#define AL_FORMAT_QUAD8_LOKI 0x10004 -#define AL_FORMAT_QUAD16_LOKI 0x10005 -#endif - -#ifndef AL_EXT_float32 -#define AL_EXT_float32 1 -#define AL_FORMAT_MONO_FLOAT32 0x10010 -#define AL_FORMAT_STEREO_FLOAT32 0x10011 -#endif - -#ifndef AL_EXT_double -#define AL_EXT_double 1 -#define AL_FORMAT_MONO_DOUBLE_EXT 0x10012 -#define AL_FORMAT_STEREO_DOUBLE_EXT 0x10013 -#endif - -#ifndef AL_EXT_MULAW -#define AL_EXT_MULAW 1 -#define AL_FORMAT_MONO_MULAW_EXT 0x10014 -#define AL_FORMAT_STEREO_MULAW_EXT 0x10015 -#endif - -#ifndef AL_EXT_ALAW -#define AL_EXT_ALAW 1 -#define AL_FORMAT_MONO_ALAW_EXT 0x10016 -#define AL_FORMAT_STEREO_ALAW_EXT 0x10017 -#endif - -#ifndef ALC_LOKI_audio_channel -#define ALC_LOKI_audio_channel 1 -#define ALC_CHAN_MAIN_LOKI 0x500001 -#define ALC_CHAN_PCM_LOKI 0x500002 -#define ALC_CHAN_CD_LOKI 0x500003 -#endif - -#ifndef AL_EXT_MCFORMATS -#define AL_EXT_MCFORMATS 1 -#define AL_FORMAT_QUAD8 0x1204 -#define AL_FORMAT_QUAD16 0x1205 -#define AL_FORMAT_QUAD32 0x1206 -#define AL_FORMAT_REAR8 0x1207 -#define AL_FORMAT_REAR16 0x1208 -#define AL_FORMAT_REAR32 0x1209 -#define AL_FORMAT_51CHN8 0x120A -#define AL_FORMAT_51CHN16 0x120B -#define AL_FORMAT_51CHN32 0x120C -#define AL_FORMAT_61CHN8 0x120D -#define AL_FORMAT_61CHN16 0x120E -#define AL_FORMAT_61CHN32 0x120F -#define AL_FORMAT_71CHN8 0x1210 -#define AL_FORMAT_71CHN16 0x1211 -#define AL_FORMAT_71CHN32 0x1212 -#endif - -#ifndef AL_EXT_MULAW_MCFORMATS -#define AL_EXT_MULAW_MCFORMATS 1 -#define AL_FORMAT_MONO_MULAW 0x10014 -#define AL_FORMAT_STEREO_MULAW 0x10015 -#define AL_FORMAT_QUAD_MULAW 0x10021 -#define AL_FORMAT_REAR_MULAW 0x10022 -#define AL_FORMAT_51CHN_MULAW 0x10023 -#define AL_FORMAT_61CHN_MULAW 0x10024 -#define AL_FORMAT_71CHN_MULAW 0x10025 -#endif - -#ifndef AL_EXT_IMA4 -#define AL_EXT_IMA4 1 -#define AL_FORMAT_MONO_IMA4 0x1300 -#define AL_FORMAT_STEREO_IMA4 0x1301 -#endif - -#ifndef AL_EXT_STATIC_BUFFER -#define AL_EXT_STATIC_BUFFER 1 -typedef ALvoid (AL_APIENTRY*PFNALBUFFERDATASTATICPROC)(const ALint,ALenum,ALvoid*,ALsizei,ALsizei); -#ifdef AL_ALEXT_PROTOTYPES -AL_API ALvoid AL_APIENTRY alBufferDataStatic(const ALint buffer, ALenum format, ALvoid *data, ALsizei len, ALsizei freq); -#endif -#endif - -#ifndef ALC_EXT_EFX -#define ALC_EXT_EFX 1 -#include "efx.h" -#endif - -#ifndef ALC_EXT_disconnect -#define ALC_EXT_disconnect 1 -#define ALC_CONNECTED 0x313 -#endif - -#ifndef ALC_EXT_thread_local_context -#define ALC_EXT_thread_local_context 1 -typedef ALCboolean (ALC_APIENTRY*PFNALCSETTHREADCONTEXTPROC)(ALCcontext *context); -typedef ALCcontext* (ALC_APIENTRY*PFNALCGETTHREADCONTEXTPROC)(void); -#ifdef AL_ALEXT_PROTOTYPES -ALC_API ALCboolean ALC_APIENTRY alcSetThreadContext(ALCcontext *context); -ALC_API ALCcontext* ALC_APIENTRY alcGetThreadContext(void); -#endif -#endif - -#ifndef AL_EXT_source_distance_model -#define AL_EXT_source_distance_model 1 -#define AL_SOURCE_DISTANCE_MODEL 0x200 -#endif - -#ifndef AL_SOFT_buffer_sub_data -#define AL_SOFT_buffer_sub_data 1 -#define AL_BYTE_RW_OFFSETS_SOFT 0x1031 -#define AL_SAMPLE_RW_OFFSETS_SOFT 0x1032 -typedef ALvoid (AL_APIENTRY*PFNALBUFFERSUBDATASOFTPROC)(ALuint,ALenum,const ALvoid*,ALsizei,ALsizei); -#ifdef AL_ALEXT_PROTOTYPES -AL_API ALvoid AL_APIENTRY alBufferSubDataSOFT(ALuint buffer,ALenum format,const ALvoid *data,ALsizei offset,ALsizei length); -#endif -#endif - -#ifndef AL_SOFT_loop_points -#define AL_SOFT_loop_points 1 -#define AL_LOOP_POINTS_SOFT 0x2015 -#endif - -#ifndef AL_EXT_FOLDBACK -#define AL_EXT_FOLDBACK 1 -#define AL_EXT_FOLDBACK_NAME "AL_EXT_FOLDBACK" -#define AL_FOLDBACK_EVENT_BLOCK 0x4112 -#define AL_FOLDBACK_EVENT_START 0x4111 -#define AL_FOLDBACK_EVENT_STOP 0x4113 -#define AL_FOLDBACK_MODE_MONO 0x4101 -#define AL_FOLDBACK_MODE_STEREO 0x4102 -typedef void (AL_APIENTRY*LPALFOLDBACKCALLBACK)(ALenum,ALsizei); -typedef void (AL_APIENTRY*LPALREQUESTFOLDBACKSTART)(ALenum,ALsizei,ALsizei,ALfloat*,LPALFOLDBACKCALLBACK); -typedef void (AL_APIENTRY*LPALREQUESTFOLDBACKSTOP)(void); -#ifdef AL_ALEXT_PROTOTYPES -AL_API void AL_APIENTRY alRequestFoldbackStart(ALenum mode,ALsizei count,ALsizei length,ALfloat *mem,LPALFOLDBACKCALLBACK callback); -AL_API void AL_APIENTRY alRequestFoldbackStop(void); -#endif -#endif - -#ifndef ALC_EXT_DEDICATED -#define ALC_EXT_DEDICATED 1 -#define AL_DEDICATED_GAIN 0x0001 -#define AL_EFFECT_DEDICATED_DIALOGUE 0x9001 -#define AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT 0x9000 -#endif - -#ifndef AL_SOFT_buffer_samples -#define AL_SOFT_buffer_samples 1 -/* Channel configurations */ -#define AL_MONO_SOFT 0x1500 -#define AL_STEREO_SOFT 0x1501 -#define AL_REAR_SOFT 0x1502 -#define AL_QUAD_SOFT 0x1503 -#define AL_5POINT1_SOFT 0x1504 -#define AL_6POINT1_SOFT 0x1505 -#define AL_7POINT1_SOFT 0x1506 - -/* Sample types */ -#define AL_BYTE_SOFT 0x1400 -#define AL_UNSIGNED_BYTE_SOFT 0x1401 -#define AL_SHORT_SOFT 0x1402 -#define AL_UNSIGNED_SHORT_SOFT 0x1403 -#define AL_INT_SOFT 0x1404 -#define AL_UNSIGNED_INT_SOFT 0x1405 -#define AL_FLOAT_SOFT 0x1406 -#define AL_DOUBLE_SOFT 0x1407 -#define AL_BYTE3_SOFT 0x1408 -#define AL_UNSIGNED_BYTE3_SOFT 0x1409 - -/* Storage formats */ -#define AL_MONO8_SOFT 0x1100 -#define AL_MONO16_SOFT 0x1101 -#define AL_MONO32F_SOFT 0x10010 -#define AL_STEREO8_SOFT 0x1102 -#define AL_STEREO16_SOFT 0x1103 -#define AL_STEREO32F_SOFT 0x10011 -#define AL_QUAD8_SOFT 0x1204 -#define AL_QUAD16_SOFT 0x1205 -#define AL_QUAD32F_SOFT 0x1206 -#define AL_REAR8_SOFT 0x1207 -#define AL_REAR16_SOFT 0x1208 -#define AL_REAR32F_SOFT 0x1209 -#define AL_5POINT1_8_SOFT 0x120A -#define AL_5POINT1_16_SOFT 0x120B -#define AL_5POINT1_32F_SOFT 0x120C -#define AL_6POINT1_8_SOFT 0x120D -#define AL_6POINT1_16_SOFT 0x120E -#define AL_6POINT1_32F_SOFT 0x120F -#define AL_7POINT1_8_SOFT 0x1210 -#define AL_7POINT1_16_SOFT 0x1211 -#define AL_7POINT1_32F_SOFT 0x1212 - -/* Buffer attributes */ -#define AL_INTERNAL_FORMAT_SOFT 0x2008 -#define AL_BYTE_LENGTH_SOFT 0x2009 -#define AL_SAMPLE_LENGTH_SOFT 0x200A -#define AL_SEC_LENGTH_SOFT 0x200B - -typedef void (AL_APIENTRY*LPALBUFFERSAMPLESSOFT)(ALuint,ALuint,ALenum,ALsizei,ALenum,ALenum,const ALvoid*); -typedef void (AL_APIENTRY*LPALBUFFERSUBSAMPLESSOFT)(ALuint,ALsizei,ALsizei,ALenum,ALenum,const ALvoid*); -typedef void (AL_APIENTRY*LPALGETBUFFERSAMPLESSOFT)(ALuint,ALsizei,ALsizei,ALenum,ALenum,ALvoid*); -typedef ALboolean (AL_APIENTRY*LPALISBUFFERFORMATSUPPORTEDSOFT)(ALenum); -#ifdef AL_ALEXT_PROTOTYPES -AL_API void AL_APIENTRY alBufferSamplesSOFT(ALuint buffer, ALuint samplerate, ALenum internalformat, ALsizei samples, ALenum channels, ALenum type, const ALvoid *data); -AL_API void AL_APIENTRY alBufferSubSamplesSOFT(ALuint buffer, ALsizei offset, ALsizei samples, ALenum channels, ALenum type, const ALvoid *data); -AL_API void AL_APIENTRY alGetBufferSamplesSOFT(ALuint buffer, ALsizei offset, ALsizei samples, ALenum channels, ALenum type, ALvoid *data); -AL_API ALboolean AL_APIENTRY alIsBufferFormatSupportedSOFT(ALenum format); -#endif -#endif - -#ifndef AL_SOFT_direct_channels -#define AL_SOFT_direct_channels 1 -#define AL_DIRECT_CHANNELS_SOFT 0x1033 -#endif - -#ifndef ALC_SOFT_loopback -#define ALC_SOFT_loopback 1 -#define ALC_FORMAT_CHANNELS_SOFT 0x1990 -#define ALC_FORMAT_TYPE_SOFT 0x1991 - -/* Sample types */ -#define ALC_BYTE_SOFT 0x1400 -#define ALC_UNSIGNED_BYTE_SOFT 0x1401 -#define ALC_SHORT_SOFT 0x1402 -#define ALC_UNSIGNED_SHORT_SOFT 0x1403 -#define ALC_INT_SOFT 0x1404 -#define ALC_UNSIGNED_INT_SOFT 0x1405 -#define ALC_FLOAT_SOFT 0x1406 - -/* Channel configurations */ -#define ALC_MONO_SOFT 0x1500 -#define ALC_STEREO_SOFT 0x1501 -#define ALC_QUAD_SOFT 0x1503 -#define ALC_5POINT1_SOFT 0x1504 -#define ALC_6POINT1_SOFT 0x1505 -#define ALC_7POINT1_SOFT 0x1506 - -typedef ALCdevice* (ALC_APIENTRY*LPALCLOOPBACKOPENDEVICESOFT)(const ALCchar*); -typedef ALCboolean (ALC_APIENTRY*LPALCISRENDERFORMATSUPPORTEDSOFT)(ALCdevice*,ALCsizei,ALCenum,ALCenum); -typedef void (ALC_APIENTRY*LPALCRENDERSAMPLESSOFT)(ALCdevice*,ALCvoid*,ALCsizei); -#ifdef AL_ALEXT_PROTOTYPES -ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceName); -ALC_API ALCboolean ALC_APIENTRY alcIsRenderFormatSupportedSOFT(ALCdevice *device, ALCsizei freq, ALCenum channels, ALCenum type); -ALC_API void ALC_APIENTRY alcRenderSamplesSOFT(ALCdevice *device, ALCvoid *buffer, ALCsizei samples); -#endif -#endif - -#ifndef AL_EXT_STEREO_ANGLES -#define AL_EXT_STEREO_ANGLES 1 -#define AL_STEREO_ANGLES 0x1030 -#endif - -#ifndef AL_EXT_SOURCE_RADIUS -#define AL_EXT_SOURCE_RADIUS 1 -#define AL_SOURCE_RADIUS 0x1031 -#endif - -#ifndef AL_SOFT_source_latency -#define AL_SOFT_source_latency 1 -#define AL_SAMPLE_OFFSET_LATENCY_SOFT 0x1200 -#define AL_SEC_OFFSET_LATENCY_SOFT 0x1201 -typedef int64_t ALint64SOFT; -typedef uint64_t ALuint64SOFT; -typedef void (AL_APIENTRY*LPALSOURCEDSOFT)(ALuint,ALenum,ALdouble); -typedef void (AL_APIENTRY*LPALSOURCE3DSOFT)(ALuint,ALenum,ALdouble,ALdouble,ALdouble); -typedef void (AL_APIENTRY*LPALSOURCEDVSOFT)(ALuint,ALenum,const ALdouble*); -typedef void (AL_APIENTRY*LPALGETSOURCEDSOFT)(ALuint,ALenum,ALdouble*); -typedef void (AL_APIENTRY*LPALGETSOURCE3DSOFT)(ALuint,ALenum,ALdouble*,ALdouble*,ALdouble*); -typedef void (AL_APIENTRY*LPALGETSOURCEDVSOFT)(ALuint,ALenum,ALdouble*); -typedef void (AL_APIENTRY*LPALSOURCEI64SOFT)(ALuint,ALenum,ALint64SOFT); -typedef void (AL_APIENTRY*LPALSOURCE3I64SOFT)(ALuint,ALenum,ALint64SOFT,ALint64SOFT,ALint64SOFT); -typedef void (AL_APIENTRY*LPALSOURCEI64VSOFT)(ALuint,ALenum,const ALint64SOFT*); -typedef void (AL_APIENTRY*LPALGETSOURCEI64SOFT)(ALuint,ALenum,ALint64SOFT*); -typedef void (AL_APIENTRY*LPALGETSOURCE3I64SOFT)(ALuint,ALenum,ALint64SOFT*,ALint64SOFT*,ALint64SOFT*); -typedef void (AL_APIENTRY*LPALGETSOURCEI64VSOFT)(ALuint,ALenum,ALint64SOFT*); -#ifdef AL_ALEXT_PROTOTYPES -AL_API void AL_APIENTRY alSourcedSOFT(ALuint source, ALenum param, ALdouble value); -AL_API void AL_APIENTRY alSource3dSOFT(ALuint source, ALenum param, ALdouble value1, ALdouble value2, ALdouble value3); -AL_API void AL_APIENTRY alSourcedvSOFT(ALuint source, ALenum param, const ALdouble *values); -AL_API void AL_APIENTRY alGetSourcedSOFT(ALuint source, ALenum param, ALdouble *value); -AL_API void AL_APIENTRY alGetSource3dSOFT(ALuint source, ALenum param, ALdouble *value1, ALdouble *value2, ALdouble *value3); -AL_API void AL_APIENTRY alGetSourcedvSOFT(ALuint source, ALenum param, ALdouble *values); -AL_API void AL_APIENTRY alSourcei64SOFT(ALuint source, ALenum param, ALint64SOFT value); -AL_API void AL_APIENTRY alSource3i64SOFT(ALuint source, ALenum param, ALint64SOFT value1, ALint64SOFT value2, ALint64SOFT value3); -AL_API void AL_APIENTRY alSourcei64vSOFT(ALuint source, ALenum param, const ALint64SOFT *values); -AL_API void AL_APIENTRY alGetSourcei64SOFT(ALuint source, ALenum param, ALint64SOFT *value); -AL_API void AL_APIENTRY alGetSource3i64SOFT(ALuint source, ALenum param, ALint64SOFT *value1, ALint64SOFT *value2, ALint64SOFT *value3); -AL_API void AL_APIENTRY alGetSourcei64vSOFT(ALuint source, ALenum param, ALint64SOFT *values); -#endif -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/builddir/openal-soft-1.15.1/include/AL/efx-creative.h b/builddir/openal-soft-1.15.1/include/AL/efx-creative.h deleted file mode 100644 index 0a04c98..0000000 --- a/builddir/openal-soft-1.15.1/include/AL/efx-creative.h +++ /dev/null @@ -1,3 +0,0 @@ -/* The tokens that would be defined here are already defined in efx.h. This - * empty file is here to provide compatibility with Windows-based projects - * that would include it. */ diff --git a/builddir/openal-soft-1.15.1/include/AL/efx-presets.h b/builddir/openal-soft-1.15.1/include/AL/efx-presets.h deleted file mode 100644 index 86dcbda..0000000 --- a/builddir/openal-soft-1.15.1/include/AL/efx-presets.h +++ /dev/null @@ -1,402 +0,0 @@ -/* Reverb presets for EFX */ - -#ifndef EFX_PRESETS_H -#define EFX_PRESETS_H - -#ifndef EFXEAXREVERBPROPERTIES_DEFINED -#define EFXEAXREVERBPROPERTIES_DEFINED -typedef struct { - float flDensity; - float flDiffusion; - float flGain; - float flGainHF; - float flGainLF; - float flDecayTime; - float flDecayHFRatio; - float flDecayLFRatio; - float flReflectionsGain; - float flReflectionsDelay; - float flReflectionsPan[3]; - float flLateReverbGain; - float flLateReverbDelay; - float flLateReverbPan[3]; - float flEchoTime; - float flEchoDepth; - float flModulationTime; - float flModulationDepth; - float flAirAbsorptionGainHF; - float flHFReference; - float flLFReference; - float flRoomRolloffFactor; - int iDecayHFLimit; -} EFXEAXREVERBPROPERTIES, *LPEFXEAXREVERBPROPERTIES; -#endif - -/* Default Presets */ - -#define EFX_REVERB_PRESET_GENERIC \ - { 1.0000f, 1.0000f, 0.3162f, 0.8913f, 1.0000f, 1.4900f, 0.8300f, 1.0000f, 0.0500f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_PADDEDCELL \ - { 0.1715f, 1.0000f, 0.3162f, 0.0010f, 1.0000f, 0.1700f, 0.1000f, 1.0000f, 0.2500f, 0.0010f, { 0.0000f, 0.0000f, 0.0000f }, 1.2691f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_ROOM \ - { 0.4287f, 1.0000f, 0.3162f, 0.5929f, 1.0000f, 0.4000f, 0.8300f, 1.0000f, 0.1503f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 1.0629f, 0.0030f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_BATHROOM \ - { 0.1715f, 1.0000f, 0.3162f, 0.2512f, 1.0000f, 1.4900f, 0.5400f, 1.0000f, 0.6531f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 3.2734f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_LIVINGROOM \ - { 0.9766f, 1.0000f, 0.3162f, 0.0010f, 1.0000f, 0.5000f, 0.1000f, 1.0000f, 0.2051f, 0.0030f, { 0.0000f, 0.0000f, 0.0000f }, 0.2805f, 0.0040f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_STONEROOM \ - { 1.0000f, 1.0000f, 0.3162f, 0.7079f, 1.0000f, 2.3100f, 0.6400f, 1.0000f, 0.4411f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.1003f, 0.0170f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_AUDITORIUM \ - { 1.0000f, 1.0000f, 0.3162f, 0.5781f, 1.0000f, 4.3200f, 0.5900f, 1.0000f, 0.4032f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.7170f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CONCERTHALL \ - { 1.0000f, 1.0000f, 0.3162f, 0.5623f, 1.0000f, 3.9200f, 0.7000f, 1.0000f, 0.2427f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.9977f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CAVE \ - { 1.0000f, 1.0000f, 0.3162f, 1.0000f, 1.0000f, 2.9100f, 1.3000f, 1.0000f, 0.5000f, 0.0150f, { 0.0000f, 0.0000f, 0.0000f }, 0.7063f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_ARENA \ - { 1.0000f, 1.0000f, 0.3162f, 0.4477f, 1.0000f, 7.2400f, 0.3300f, 1.0000f, 0.2612f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.0186f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_HANGAR \ - { 1.0000f, 1.0000f, 0.3162f, 0.3162f, 1.0000f, 10.0500f, 0.2300f, 1.0000f, 0.5000f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.2560f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CARPETEDHALLWAY \ - { 0.4287f, 1.0000f, 0.3162f, 0.0100f, 1.0000f, 0.3000f, 0.1000f, 1.0000f, 0.1215f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 0.1531f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_HALLWAY \ - { 0.3645f, 1.0000f, 0.3162f, 0.7079f, 1.0000f, 1.4900f, 0.5900f, 1.0000f, 0.2458f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.6615f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_STONECORRIDOR \ - { 1.0000f, 1.0000f, 0.3162f, 0.7612f, 1.0000f, 2.7000f, 0.7900f, 1.0000f, 0.2472f, 0.0130f, { 0.0000f, 0.0000f, 0.0000f }, 1.5758f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_ALLEY \ - { 1.0000f, 0.3000f, 0.3162f, 0.7328f, 1.0000f, 1.4900f, 0.8600f, 1.0000f, 0.2500f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.9954f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1250f, 0.9500f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_FOREST \ - { 1.0000f, 0.3000f, 0.3162f, 0.0224f, 1.0000f, 1.4900f, 0.5400f, 1.0000f, 0.0525f, 0.1620f, { 0.0000f, 0.0000f, 0.0000f }, 0.7682f, 0.0880f, { 0.0000f, 0.0000f, 0.0000f }, 0.1250f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CITY \ - { 1.0000f, 0.5000f, 0.3162f, 0.3981f, 1.0000f, 1.4900f, 0.6700f, 1.0000f, 0.0730f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.1427f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_MOUNTAINS \ - { 1.0000f, 0.2700f, 0.3162f, 0.0562f, 1.0000f, 1.4900f, 0.2100f, 1.0000f, 0.0407f, 0.3000f, { 0.0000f, 0.0000f, 0.0000f }, 0.1919f, 0.1000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_QUARRY \ - { 1.0000f, 1.0000f, 0.3162f, 0.3162f, 1.0000f, 1.4900f, 0.8300f, 1.0000f, 0.0000f, 0.0610f, { 0.0000f, 0.0000f, 0.0000f }, 1.7783f, 0.0250f, { 0.0000f, 0.0000f, 0.0000f }, 0.1250f, 0.7000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_PLAIN \ - { 1.0000f, 0.2100f, 0.3162f, 0.1000f, 1.0000f, 1.4900f, 0.5000f, 1.0000f, 0.0585f, 0.1790f, { 0.0000f, 0.0000f, 0.0000f }, 0.1089f, 0.1000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_PARKINGLOT \ - { 1.0000f, 1.0000f, 0.3162f, 1.0000f, 1.0000f, 1.6500f, 1.5000f, 1.0000f, 0.2082f, 0.0080f, { 0.0000f, 0.0000f, 0.0000f }, 0.2652f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_SEWERPIPE \ - { 0.3071f, 0.8000f, 0.3162f, 0.3162f, 1.0000f, 2.8100f, 0.1400f, 1.0000f, 1.6387f, 0.0140f, { 0.0000f, 0.0000f, 0.0000f }, 3.2471f, 0.0210f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_UNDERWATER \ - { 0.3645f, 1.0000f, 0.3162f, 0.0100f, 1.0000f, 1.4900f, 0.1000f, 1.0000f, 0.5963f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 7.0795f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 1.1800f, 0.3480f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_DRUGGED \ - { 0.4287f, 0.5000f, 0.3162f, 1.0000f, 1.0000f, 8.3900f, 1.3900f, 1.0000f, 0.8760f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 3.1081f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 1.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_DIZZY \ - { 0.3645f, 0.6000f, 0.3162f, 0.6310f, 1.0000f, 17.2300f, 0.5600f, 1.0000f, 0.1392f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.4937f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.8100f, 0.3100f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_PSYCHOTIC \ - { 0.0625f, 0.5000f, 0.3162f, 0.8404f, 1.0000f, 7.5600f, 0.9100f, 1.0000f, 0.4864f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 2.4378f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 4.0000f, 1.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -/* Castle Presets */ - -#define EFX_REVERB_PRESET_CASTLE_SMALLROOM \ - { 1.0000f, 0.8900f, 0.3162f, 0.3981f, 0.1000f, 1.2200f, 0.8300f, 0.3100f, 0.8913f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 1.9953f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CASTLE_SHORTPASSAGE \ - { 1.0000f, 0.8900f, 0.3162f, 0.3162f, 0.1000f, 2.3200f, 0.8300f, 0.3100f, 0.8913f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CASTLE_MEDIUMROOM \ - { 1.0000f, 0.9300f, 0.3162f, 0.2818f, 0.1000f, 2.0400f, 0.8300f, 0.4600f, 0.6310f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 1.5849f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1550f, 0.0300f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CASTLE_LARGEROOM \ - { 1.0000f, 0.8200f, 0.3162f, 0.2818f, 0.1259f, 2.5300f, 0.8300f, 0.5000f, 0.4467f, 0.0340f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.1850f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CASTLE_LONGPASSAGE \ - { 1.0000f, 0.8900f, 0.3162f, 0.3981f, 0.1000f, 3.4200f, 0.8300f, 0.3100f, 0.8913f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CASTLE_HALL \ - { 1.0000f, 0.8100f, 0.3162f, 0.2818f, 0.1778f, 3.1400f, 0.7900f, 0.6200f, 0.1778f, 0.0560f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CASTLE_CUPBOARD \ - { 1.0000f, 0.8900f, 0.3162f, 0.2818f, 0.1000f, 0.6700f, 0.8700f, 0.3100f, 1.4125f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 3.5481f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CASTLE_COURTYARD \ - { 1.0000f, 0.4200f, 0.3162f, 0.4467f, 0.1995f, 2.1300f, 0.6100f, 0.2300f, 0.2239f, 0.1600f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0360f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.3700f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_CASTLE_ALCOVE \ - { 1.0000f, 0.8900f, 0.3162f, 0.5012f, 0.1000f, 1.6400f, 0.8700f, 0.3100f, 1.0000f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0340f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } - -/* Factory Presets */ - -#define EFX_REVERB_PRESET_FACTORY_SMALLROOM \ - { 0.3645f, 0.8200f, 0.3162f, 0.7943f, 0.5012f, 1.7200f, 0.6500f, 1.3100f, 0.7079f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.7783f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.1190f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_FACTORY_SHORTPASSAGE \ - { 0.3645f, 0.6400f, 0.2512f, 0.7943f, 0.5012f, 2.5300f, 0.6500f, 1.3100f, 1.0000f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0380f, { 0.0000f, 0.0000f, 0.0000f }, 0.1350f, 0.2300f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_FACTORY_MEDIUMROOM \ - { 0.4287f, 0.8200f, 0.2512f, 0.7943f, 0.5012f, 2.7600f, 0.6500f, 1.3100f, 0.2818f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.1740f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_FACTORY_LARGEROOM \ - { 0.4287f, 0.7500f, 0.2512f, 0.7079f, 0.6310f, 4.2400f, 0.5100f, 1.3100f, 0.1778f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.2310f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_FACTORY_LONGPASSAGE \ - { 0.3645f, 0.6400f, 0.2512f, 0.7943f, 0.5012f, 4.0600f, 0.6500f, 1.3100f, 1.0000f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0370f, { 0.0000f, 0.0000f, 0.0000f }, 0.1350f, 0.2300f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_FACTORY_HALL \ - { 0.4287f, 0.7500f, 0.3162f, 0.7079f, 0.6310f, 7.4300f, 0.5100f, 1.3100f, 0.0631f, 0.0730f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0270f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_FACTORY_CUPBOARD \ - { 0.3071f, 0.6300f, 0.2512f, 0.7943f, 0.5012f, 0.4900f, 0.6500f, 1.3100f, 1.2589f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.9953f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.1070f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_FACTORY_COURTYARD \ - { 0.3071f, 0.5700f, 0.3162f, 0.3162f, 0.6310f, 2.3200f, 0.2900f, 0.5600f, 0.2239f, 0.1400f, { 0.0000f, 0.0000f, 0.0000f }, 0.3981f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2900f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_FACTORY_ALCOVE \ - { 0.3645f, 0.5900f, 0.2512f, 0.7943f, 0.5012f, 3.1400f, 0.6500f, 1.3100f, 1.4125f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.0000f, 0.0380f, { 0.0000f, 0.0000f, 0.0000f }, 0.1140f, 0.1000f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } - -/* Ice Palace Presets */ - -#define EFX_REVERB_PRESET_ICEPALACE_SMALLROOM \ - { 1.0000f, 0.8400f, 0.3162f, 0.5623f, 0.2818f, 1.5100f, 1.5300f, 0.2700f, 0.8913f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1640f, 0.1400f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_ICEPALACE_SHORTPASSAGE \ - { 1.0000f, 0.7500f, 0.3162f, 0.5623f, 0.2818f, 1.7900f, 1.4600f, 0.2800f, 0.5012f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0190f, { 0.0000f, 0.0000f, 0.0000f }, 0.1770f, 0.0900f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_ICEPALACE_MEDIUMROOM \ - { 1.0000f, 0.8700f, 0.3162f, 0.5623f, 0.4467f, 2.2200f, 1.5300f, 0.3200f, 0.3981f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0270f, { 0.0000f, 0.0000f, 0.0000f }, 0.1860f, 0.1200f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_ICEPALACE_LARGEROOM \ - { 1.0000f, 0.8100f, 0.3162f, 0.5623f, 0.4467f, 3.1400f, 1.5300f, 0.3200f, 0.2512f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 1.0000f, 0.0270f, { 0.0000f, 0.0000f, 0.0000f }, 0.2140f, 0.1100f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_ICEPALACE_LONGPASSAGE \ - { 1.0000f, 0.7700f, 0.3162f, 0.5623f, 0.3981f, 3.0100f, 1.4600f, 0.2800f, 0.7943f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0250f, { 0.0000f, 0.0000f, 0.0000f }, 0.1860f, 0.0400f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_ICEPALACE_HALL \ - { 1.0000f, 0.7600f, 0.3162f, 0.4467f, 0.5623f, 5.4900f, 1.5300f, 0.3800f, 0.1122f, 0.0540f, { 0.0000f, 0.0000f, 0.0000f }, 0.6310f, 0.0520f, { 0.0000f, 0.0000f, 0.0000f }, 0.2260f, 0.1100f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_ICEPALACE_CUPBOARD \ - { 1.0000f, 0.8300f, 0.3162f, 0.5012f, 0.2239f, 0.7600f, 1.5300f, 0.2600f, 1.1220f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.9953f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.1430f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_ICEPALACE_COURTYARD \ - { 1.0000f, 0.5900f, 0.3162f, 0.2818f, 0.3162f, 2.0400f, 1.2000f, 0.3800f, 0.3162f, 0.1730f, { 0.0000f, 0.0000f, 0.0000f }, 0.3162f, 0.0430f, { 0.0000f, 0.0000f, 0.0000f }, 0.2350f, 0.4800f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_ICEPALACE_ALCOVE \ - { 1.0000f, 0.8400f, 0.3162f, 0.5623f, 0.2818f, 2.7600f, 1.4600f, 0.2800f, 1.1220f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.1610f, 0.0900f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } - -/* Space Station Presets */ - -#define EFX_REVERB_PRESET_SPACESTATION_SMALLROOM \ - { 0.2109f, 0.7000f, 0.3162f, 0.7079f, 0.8913f, 1.7200f, 0.8200f, 0.5500f, 0.7943f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0130f, { 0.0000f, 0.0000f, 0.0000f }, 0.1880f, 0.2600f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPACESTATION_SHORTPASSAGE \ - { 0.2109f, 0.8700f, 0.3162f, 0.6310f, 0.8913f, 3.5700f, 0.5000f, 0.5500f, 1.0000f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.1720f, 0.2000f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPACESTATION_MEDIUMROOM \ - { 0.2109f, 0.7500f, 0.3162f, 0.6310f, 0.8913f, 3.0100f, 0.5000f, 0.5500f, 0.3981f, 0.0340f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0350f, { 0.0000f, 0.0000f, 0.0000f }, 0.2090f, 0.3100f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPACESTATION_LARGEROOM \ - { 0.3645f, 0.8100f, 0.3162f, 0.6310f, 0.8913f, 3.8900f, 0.3800f, 0.6100f, 0.3162f, 0.0560f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0350f, { 0.0000f, 0.0000f, 0.0000f }, 0.2330f, 0.2800f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPACESTATION_LONGPASSAGE \ - { 0.4287f, 0.8200f, 0.3162f, 0.6310f, 0.8913f, 4.6200f, 0.6200f, 0.5500f, 1.0000f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0310f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2300f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPACESTATION_HALL \ - { 0.4287f, 0.8700f, 0.3162f, 0.6310f, 0.8913f, 7.1100f, 0.3800f, 0.6100f, 0.1778f, 0.1000f, { 0.0000f, 0.0000f, 0.0000f }, 0.6310f, 0.0470f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2500f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPACESTATION_CUPBOARD \ - { 0.1715f, 0.5600f, 0.3162f, 0.7079f, 0.8913f, 0.7900f, 0.8100f, 0.5500f, 1.4125f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.7783f, 0.0180f, { 0.0000f, 0.0000f, 0.0000f }, 0.1810f, 0.3100f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPACESTATION_ALCOVE \ - { 0.2109f, 0.7800f, 0.3162f, 0.7079f, 0.8913f, 1.1600f, 0.8100f, 0.5500f, 1.4125f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.0000f, 0.0180f, { 0.0000f, 0.0000f, 0.0000f }, 0.1920f, 0.2100f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } - -/* Wooden Galleon Presets */ - -#define EFX_REVERB_PRESET_WOODEN_SMALLROOM \ - { 1.0000f, 1.0000f, 0.3162f, 0.1122f, 0.3162f, 0.7900f, 0.3200f, 0.8700f, 1.0000f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_WOODEN_SHORTPASSAGE \ - { 1.0000f, 1.0000f, 0.3162f, 0.1259f, 0.3162f, 1.7500f, 0.5000f, 0.8700f, 0.8913f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.6310f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_WOODEN_MEDIUMROOM \ - { 1.0000f, 1.0000f, 0.3162f, 0.1000f, 0.2818f, 1.4700f, 0.4200f, 0.8200f, 0.8913f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_WOODEN_LARGEROOM \ - { 1.0000f, 1.0000f, 0.3162f, 0.0891f, 0.2818f, 2.6500f, 0.3300f, 0.8200f, 0.8913f, 0.0660f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_WOODEN_LONGPASSAGE \ - { 1.0000f, 1.0000f, 0.3162f, 0.1000f, 0.3162f, 1.9900f, 0.4000f, 0.7900f, 1.0000f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.4467f, 0.0360f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_WOODEN_HALL \ - { 1.0000f, 1.0000f, 0.3162f, 0.0794f, 0.2818f, 3.4500f, 0.3000f, 0.8200f, 0.8913f, 0.0880f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0630f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_WOODEN_CUPBOARD \ - { 1.0000f, 1.0000f, 0.3162f, 0.1413f, 0.3162f, 0.5600f, 0.4600f, 0.9100f, 1.1220f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0280f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_WOODEN_COURTYARD \ - { 1.0000f, 0.6500f, 0.3162f, 0.0794f, 0.3162f, 1.7900f, 0.3500f, 0.7900f, 0.5623f, 0.1230f, { 0.0000f, 0.0000f, 0.0000f }, 0.1000f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_WOODEN_ALCOVE \ - { 1.0000f, 1.0000f, 0.3162f, 0.1259f, 0.3162f, 1.2200f, 0.6200f, 0.9100f, 1.1220f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } - -/* Sports Presets */ - -#define EFX_REVERB_PRESET_SPORT_EMPTYSTADIUM \ - { 1.0000f, 1.0000f, 0.3162f, 0.4467f, 0.7943f, 6.2600f, 0.5100f, 1.1000f, 0.0631f, 0.1830f, { 0.0000f, 0.0000f, 0.0000f }, 0.3981f, 0.0380f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPORT_SQUASHCOURT \ - { 1.0000f, 0.7500f, 0.3162f, 0.3162f, 0.7943f, 2.2200f, 0.9100f, 1.1600f, 0.4467f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1260f, 0.1900f, 0.2500f, 0.0000f, 0.9943f, 7176.8999f, 211.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPORT_SMALLSWIMMINGPOOL \ - { 1.0000f, 0.7000f, 0.3162f, 0.7943f, 0.8913f, 2.7600f, 1.2500f, 1.1400f, 0.6310f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.1790f, 0.1500f, 0.8950f, 0.1900f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_SPORT_LARGESWIMMINGPOOL \ - { 1.0000f, 0.8200f, 0.3162f, 0.7943f, 1.0000f, 5.4900f, 1.3100f, 1.1400f, 0.4467f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 0.5012f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2220f, 0.5500f, 1.1590f, 0.2100f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_SPORT_GYMNASIUM \ - { 1.0000f, 0.8100f, 0.3162f, 0.4467f, 0.8913f, 3.1400f, 1.0600f, 1.3500f, 0.3981f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.5623f, 0.0450f, { 0.0000f, 0.0000f, 0.0000f }, 0.1460f, 0.1400f, 0.2500f, 0.0000f, 0.9943f, 7176.8999f, 211.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPORT_FULLSTADIUM \ - { 1.0000f, 1.0000f, 0.3162f, 0.0708f, 0.7943f, 5.2500f, 0.1700f, 0.8000f, 0.1000f, 0.1880f, { 0.0000f, 0.0000f, 0.0000f }, 0.2818f, 0.0380f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SPORT_STADIUMTANNOY \ - { 1.0000f, 0.7800f, 0.3162f, 0.5623f, 0.5012f, 2.5300f, 0.8800f, 0.6800f, 0.2818f, 0.2300f, { 0.0000f, 0.0000f, 0.0000f }, 0.5012f, 0.0630f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -/* Prefab Presets */ - -#define EFX_REVERB_PRESET_PREFAB_WORKSHOP \ - { 0.4287f, 1.0000f, 0.3162f, 0.1413f, 0.3981f, 0.7600f, 1.0000f, 1.0000f, 1.0000f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_PREFAB_SCHOOLROOM \ - { 0.4022f, 0.6900f, 0.3162f, 0.6310f, 0.5012f, 0.9800f, 0.4500f, 0.1800f, 1.4125f, 0.0170f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0150f, { 0.0000f, 0.0000f, 0.0000f }, 0.0950f, 0.1400f, 0.2500f, 0.0000f, 0.9943f, 7176.8999f, 211.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_PREFAB_PRACTISEROOM \ - { 0.4022f, 0.8700f, 0.3162f, 0.3981f, 0.5012f, 1.1200f, 0.5600f, 0.1800f, 1.2589f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.0950f, 0.1400f, 0.2500f, 0.0000f, 0.9943f, 7176.8999f, 211.2000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_PREFAB_OUTHOUSE \ - { 1.0000f, 0.8200f, 0.3162f, 0.1122f, 0.1585f, 1.3800f, 0.3800f, 0.3500f, 0.8913f, 0.0240f, { 0.0000f, 0.0000f, -0.0000f }, 0.6310f, 0.0440f, { 0.0000f, 0.0000f, 0.0000f }, 0.1210f, 0.1700f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 107.5000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_PREFAB_CARAVAN \ - { 1.0000f, 1.0000f, 0.3162f, 0.0891f, 0.1259f, 0.4300f, 1.5000f, 1.0000f, 1.0000f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.9953f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -/* Dome and Pipe Presets */ - -#define EFX_REVERB_PRESET_DOME_TOMB \ - { 1.0000f, 0.7900f, 0.3162f, 0.3548f, 0.2239f, 4.1800f, 0.2100f, 0.1000f, 0.3868f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 1.6788f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 0.1770f, 0.1900f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_PIPE_SMALL \ - { 1.0000f, 1.0000f, 0.3162f, 0.3548f, 0.2239f, 5.0400f, 0.1000f, 0.1000f, 0.5012f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 2.5119f, 0.0150f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_DOME_SAINTPAULS \ - { 1.0000f, 0.8700f, 0.3162f, 0.3548f, 0.2239f, 10.4800f, 0.1900f, 0.1000f, 0.1778f, 0.0900f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0420f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.1200f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_PIPE_LONGTHIN \ - { 0.2560f, 0.9100f, 0.3162f, 0.4467f, 0.2818f, 9.2100f, 0.1800f, 0.1000f, 0.7079f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_PIPE_LARGE \ - { 1.0000f, 1.0000f, 0.3162f, 0.3548f, 0.2239f, 8.4500f, 0.1000f, 0.1000f, 0.3981f, 0.0460f, { 0.0000f, 0.0000f, 0.0000f }, 1.5849f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_PIPE_RESONANT \ - { 0.1373f, 0.9100f, 0.3162f, 0.4467f, 0.2818f, 6.8100f, 0.1800f, 0.1000f, 0.7079f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.0000f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x0 } - -/* Outdoors Presets */ - -#define EFX_REVERB_PRESET_OUTDOORS_BACKYARD \ - { 1.0000f, 0.4500f, 0.3162f, 0.2512f, 0.5012f, 1.1200f, 0.3400f, 0.4600f, 0.4467f, 0.0690f, { 0.0000f, 0.0000f, -0.0000f }, 0.7079f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.2180f, 0.3400f, 0.2500f, 0.0000f, 0.9943f, 4399.1001f, 242.9000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_OUTDOORS_ROLLINGPLAINS \ - { 1.0000f, 0.0000f, 0.3162f, 0.0112f, 0.6310f, 2.1300f, 0.2100f, 0.4600f, 0.1778f, 0.3000f, { 0.0000f, 0.0000f, -0.0000f }, 0.4467f, 0.0190f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 4399.1001f, 242.9000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_OUTDOORS_DEEPCANYON \ - { 1.0000f, 0.7400f, 0.3162f, 0.1778f, 0.6310f, 3.8900f, 0.2100f, 0.4600f, 0.3162f, 0.2230f, { 0.0000f, 0.0000f, -0.0000f }, 0.3548f, 0.0190f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 4399.1001f, 242.9000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_OUTDOORS_CREEK \ - { 1.0000f, 0.3500f, 0.3162f, 0.1778f, 0.5012f, 2.1300f, 0.2100f, 0.4600f, 0.3981f, 0.1150f, { 0.0000f, 0.0000f, -0.0000f }, 0.1995f, 0.0310f, { 0.0000f, 0.0000f, 0.0000f }, 0.2180f, 0.3400f, 0.2500f, 0.0000f, 0.9943f, 4399.1001f, 242.9000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_OUTDOORS_VALLEY \ - { 1.0000f, 0.2800f, 0.3162f, 0.0282f, 0.1585f, 2.8800f, 0.2600f, 0.3500f, 0.1413f, 0.2630f, { 0.0000f, 0.0000f, -0.0000f }, 0.3981f, 0.1000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.3400f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 107.5000f, 0.0000f, 0x0 } - -/* Mood Presets */ - -#define EFX_REVERB_PRESET_MOOD_HEAVEN \ - { 1.0000f, 0.9400f, 0.3162f, 0.7943f, 0.4467f, 5.0400f, 1.1200f, 0.5600f, 0.2427f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0800f, 2.7420f, 0.0500f, 0.9977f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_MOOD_HELL \ - { 1.0000f, 0.5700f, 0.3162f, 0.3548f, 0.4467f, 3.5700f, 0.4900f, 2.0000f, 0.0000f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.1100f, 0.0400f, 2.1090f, 0.5200f, 0.9943f, 5000.0000f, 139.5000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_MOOD_MEMORY \ - { 1.0000f, 0.8500f, 0.3162f, 0.6310f, 0.3548f, 4.0600f, 0.8200f, 0.5600f, 0.0398f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.4740f, 0.4500f, 0.9886f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -/* Driving Presets */ - -#define EFX_REVERB_PRESET_DRIVING_COMMENTATOR \ - { 1.0000f, 0.0000f, 3.1623f, 0.5623f, 0.5012f, 2.4200f, 0.8800f, 0.6800f, 0.1995f, 0.0930f, { 0.0000f, 0.0000f, 0.0000f }, 0.2512f, 0.0170f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9886f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_DRIVING_PITGARAGE \ - { 0.4287f, 0.5900f, 0.3162f, 0.7079f, 0.5623f, 1.7200f, 0.9300f, 0.8700f, 0.5623f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.1100f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_DRIVING_INCAR_RACER \ - { 0.0832f, 0.8000f, 0.3162f, 1.0000f, 0.7943f, 0.1700f, 2.0000f, 0.4100f, 1.7783f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0150f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10268.2002f, 251.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_DRIVING_INCAR_SPORTS \ - { 0.0832f, 0.8000f, 0.3162f, 0.6310f, 1.0000f, 0.1700f, 0.7500f, 0.4100f, 1.0000f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 0.5623f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10268.2002f, 251.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_DRIVING_INCAR_LUXURY \ - { 0.2560f, 1.0000f, 0.3162f, 0.1000f, 0.5012f, 0.1300f, 0.4100f, 0.4600f, 0.7943f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.5849f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10268.2002f, 251.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_DRIVING_FULLGRANDSTAND \ - { 1.0000f, 1.0000f, 0.3162f, 0.2818f, 0.6310f, 3.0100f, 1.3700f, 1.2800f, 0.3548f, 0.0900f, { 0.0000f, 0.0000f, 0.0000f }, 0.1778f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10420.2002f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_DRIVING_EMPTYGRANDSTAND \ - { 1.0000f, 1.0000f, 0.3162f, 1.0000f, 0.7943f, 4.6200f, 1.7500f, 1.4000f, 0.2082f, 0.0900f, { 0.0000f, 0.0000f, 0.0000f }, 0.2512f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10420.2002f, 250.0000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_DRIVING_TUNNEL \ - { 1.0000f, 0.8100f, 0.3162f, 0.3981f, 0.8913f, 3.4200f, 0.9400f, 1.3100f, 0.7079f, 0.0510f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0470f, { 0.0000f, 0.0000f, 0.0000f }, 0.2140f, 0.0500f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 155.3000f, 0.0000f, 0x1 } - -/* City Presets */ - -#define EFX_REVERB_PRESET_CITY_STREETS \ - { 1.0000f, 0.7800f, 0.3162f, 0.7079f, 0.8913f, 1.7900f, 1.1200f, 0.9100f, 0.2818f, 0.0460f, { 0.0000f, 0.0000f, 0.0000f }, 0.1995f, 0.0280f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CITY_SUBWAY \ - { 1.0000f, 0.7400f, 0.3162f, 0.7079f, 0.8913f, 3.0100f, 1.2300f, 0.9100f, 0.7079f, 0.0460f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0280f, { 0.0000f, 0.0000f, 0.0000f }, 0.1250f, 0.2100f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CITY_MUSEUM \ - { 1.0000f, 0.8200f, 0.3162f, 0.1778f, 0.1778f, 3.2800f, 1.4000f, 0.5700f, 0.2512f, 0.0390f, { 0.0000f, 0.0000f, -0.0000f }, 0.8913f, 0.0340f, { 0.0000f, 0.0000f, 0.0000f }, 0.1300f, 0.1700f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 107.5000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_CITY_LIBRARY \ - { 1.0000f, 0.8200f, 0.3162f, 0.2818f, 0.0891f, 2.7600f, 0.8900f, 0.4100f, 0.3548f, 0.0290f, { 0.0000f, 0.0000f, -0.0000f }, 0.8913f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.1300f, 0.1700f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 107.5000f, 0.0000f, 0x0 } - -#define EFX_REVERB_PRESET_CITY_UNDERPASS \ - { 1.0000f, 0.8200f, 0.3162f, 0.4467f, 0.8913f, 3.5700f, 1.1200f, 0.9100f, 0.3981f, 0.0590f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0370f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.1400f, 0.2500f, 0.0000f, 0.9920f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CITY_ABANDONED \ - { 1.0000f, 0.6900f, 0.3162f, 0.7943f, 0.8913f, 3.2800f, 1.1700f, 0.9100f, 0.4467f, 0.0440f, { 0.0000f, 0.0000f, 0.0000f }, 0.2818f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2000f, 0.2500f, 0.0000f, 0.9966f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -/* Misc. Presets */ - -#define EFX_REVERB_PRESET_DUSTYROOM \ - { 0.3645f, 0.5600f, 0.3162f, 0.7943f, 0.7079f, 1.7900f, 0.3800f, 0.2100f, 0.5012f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0060f, { 0.0000f, 0.0000f, 0.0000f }, 0.2020f, 0.0500f, 0.2500f, 0.0000f, 0.9886f, 13046.0000f, 163.3000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_CHAPEL \ - { 1.0000f, 0.8400f, 0.3162f, 0.5623f, 1.0000f, 4.6200f, 0.6400f, 1.2300f, 0.4467f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.1100f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } - -#define EFX_REVERB_PRESET_SMALLWATERROOM \ - { 1.0000f, 0.7000f, 0.3162f, 0.4477f, 1.0000f, 1.5100f, 1.2500f, 1.1400f, 0.8913f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.1790f, 0.1500f, 0.8950f, 0.1900f, 0.9920f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } - -#endif /* EFX_PRESETS_H */ diff --git a/builddir/openal-soft-1.15.1/include/AL/efx.h b/builddir/openal-soft-1.15.1/include/AL/efx.h deleted file mode 100644 index 5776698..0000000 --- a/builddir/openal-soft-1.15.1/include/AL/efx.h +++ /dev/null @@ -1,761 +0,0 @@ -#ifndef AL_EFX_H -#define AL_EFX_H - - -#include "alc.h" -#include "al.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define ALC_EXT_EFX_NAME "ALC_EXT_EFX" - -#define ALC_EFX_MAJOR_VERSION 0x20001 -#define ALC_EFX_MINOR_VERSION 0x20002 -#define ALC_MAX_AUXILIARY_SENDS 0x20003 - - -/* Listener properties. */ -#define AL_METERS_PER_UNIT 0x20004 - -/* Source properties. */ -#define AL_DIRECT_FILTER 0x20005 -#define AL_AUXILIARY_SEND_FILTER 0x20006 -#define AL_AIR_ABSORPTION_FACTOR 0x20007 -#define AL_ROOM_ROLLOFF_FACTOR 0x20008 -#define AL_CONE_OUTER_GAINHF 0x20009 -#define AL_DIRECT_FILTER_GAINHF_AUTO 0x2000A -#define AL_AUXILIARY_SEND_FILTER_GAIN_AUTO 0x2000B -#define AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO 0x2000C - - -/* Effect properties. */ - -/* Reverb effect parameters */ -#define AL_REVERB_DENSITY 0x0001 -#define AL_REVERB_DIFFUSION 0x0002 -#define AL_REVERB_GAIN 0x0003 -#define AL_REVERB_GAINHF 0x0004 -#define AL_REVERB_DECAY_TIME 0x0005 -#define AL_REVERB_DECAY_HFRATIO 0x0006 -#define AL_REVERB_REFLECTIONS_GAIN 0x0007 -#define AL_REVERB_REFLECTIONS_DELAY 0x0008 -#define AL_REVERB_LATE_REVERB_GAIN 0x0009 -#define AL_REVERB_LATE_REVERB_DELAY 0x000A -#define AL_REVERB_AIR_ABSORPTION_GAINHF 0x000B -#define AL_REVERB_ROOM_ROLLOFF_FACTOR 0x000C -#define AL_REVERB_DECAY_HFLIMIT 0x000D - -/* EAX Reverb effect parameters */ -#define AL_EAXREVERB_DENSITY 0x0001 -#define AL_EAXREVERB_DIFFUSION 0x0002 -#define AL_EAXREVERB_GAIN 0x0003 -#define AL_EAXREVERB_GAINHF 0x0004 -#define AL_EAXREVERB_GAINLF 0x0005 -#define AL_EAXREVERB_DECAY_TIME 0x0006 -#define AL_EAXREVERB_DECAY_HFRATIO 0x0007 -#define AL_EAXREVERB_DECAY_LFRATIO 0x0008 -#define AL_EAXREVERB_REFLECTIONS_GAIN 0x0009 -#define AL_EAXREVERB_REFLECTIONS_DELAY 0x000A -#define AL_EAXREVERB_REFLECTIONS_PAN 0x000B -#define AL_EAXREVERB_LATE_REVERB_GAIN 0x000C -#define AL_EAXREVERB_LATE_REVERB_DELAY 0x000D -#define AL_EAXREVERB_LATE_REVERB_PAN 0x000E -#define AL_EAXREVERB_ECHO_TIME 0x000F -#define AL_EAXREVERB_ECHO_DEPTH 0x0010 -#define AL_EAXREVERB_MODULATION_TIME 0x0011 -#define AL_EAXREVERB_MODULATION_DEPTH 0x0012 -#define AL_EAXREVERB_AIR_ABSORPTION_GAINHF 0x0013 -#define AL_EAXREVERB_HFREFERENCE 0x0014 -#define AL_EAXREVERB_LFREFERENCE 0x0015 -#define AL_EAXREVERB_ROOM_ROLLOFF_FACTOR 0x0016 -#define AL_EAXREVERB_DECAY_HFLIMIT 0x0017 - -/* Chorus effect parameters */ -#define AL_CHORUS_WAVEFORM 0x0001 -#define AL_CHORUS_PHASE 0x0002 -#define AL_CHORUS_RATE 0x0003 -#define AL_CHORUS_DEPTH 0x0004 -#define AL_CHORUS_FEEDBACK 0x0005 -#define AL_CHORUS_DELAY 0x0006 - -/* Distortion effect parameters */ -#define AL_DISTORTION_EDGE 0x0001 -#define AL_DISTORTION_GAIN 0x0002 -#define AL_DISTORTION_LOWPASS_CUTOFF 0x0003 -#define AL_DISTORTION_EQCENTER 0x0004 -#define AL_DISTORTION_EQBANDWIDTH 0x0005 - -/* Echo effect parameters */ -#define AL_ECHO_DELAY 0x0001 -#define AL_ECHO_LRDELAY 0x0002 -#define AL_ECHO_DAMPING 0x0003 -#define AL_ECHO_FEEDBACK 0x0004 -#define AL_ECHO_SPREAD 0x0005 - -/* Flanger effect parameters */ -#define AL_FLANGER_WAVEFORM 0x0001 -#define AL_FLANGER_PHASE 0x0002 -#define AL_FLANGER_RATE 0x0003 -#define AL_FLANGER_DEPTH 0x0004 -#define AL_FLANGER_FEEDBACK 0x0005 -#define AL_FLANGER_DELAY 0x0006 - -/* Frequency shifter effect parameters */ -#define AL_FREQUENCY_SHIFTER_FREQUENCY 0x0001 -#define AL_FREQUENCY_SHIFTER_LEFT_DIRECTION 0x0002 -#define AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION 0x0003 - -/* Vocal morpher effect parameters */ -#define AL_VOCAL_MORPHER_PHONEMEA 0x0001 -#define AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING 0x0002 -#define AL_VOCAL_MORPHER_PHONEMEB 0x0003 -#define AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING 0x0004 -#define AL_VOCAL_MORPHER_WAVEFORM 0x0005 -#define AL_VOCAL_MORPHER_RATE 0x0006 - -/* Pitchshifter effect parameters */ -#define AL_PITCH_SHIFTER_COARSE_TUNE 0x0001 -#define AL_PITCH_SHIFTER_FINE_TUNE 0x0002 - -/* Ringmodulator effect parameters */ -#define AL_RING_MODULATOR_FREQUENCY 0x0001 -#define AL_RING_MODULATOR_HIGHPASS_CUTOFF 0x0002 -#define AL_RING_MODULATOR_WAVEFORM 0x0003 - -/* Autowah effect parameters */ -#define AL_AUTOWAH_ATTACK_TIME 0x0001 -#define AL_AUTOWAH_RELEASE_TIME 0x0002 -#define AL_AUTOWAH_RESONANCE 0x0003 -#define AL_AUTOWAH_PEAK_GAIN 0x0004 - -/* Compressor effect parameters */ -#define AL_COMPRESSOR_ONOFF 0x0001 - -/* Equalizer effect parameters */ -#define AL_EQUALIZER_LOW_GAIN 0x0001 -#define AL_EQUALIZER_LOW_CUTOFF 0x0002 -#define AL_EQUALIZER_MID1_GAIN 0x0003 -#define AL_EQUALIZER_MID1_CENTER 0x0004 -#define AL_EQUALIZER_MID1_WIDTH 0x0005 -#define AL_EQUALIZER_MID2_GAIN 0x0006 -#define AL_EQUALIZER_MID2_CENTER 0x0007 -#define AL_EQUALIZER_MID2_WIDTH 0x0008 -#define AL_EQUALIZER_HIGH_GAIN 0x0009 -#define AL_EQUALIZER_HIGH_CUTOFF 0x000A - -/* Effect type */ -#define AL_EFFECT_FIRST_PARAMETER 0x0000 -#define AL_EFFECT_LAST_PARAMETER 0x8000 -#define AL_EFFECT_TYPE 0x8001 - -/* Effect types, used with the AL_EFFECT_TYPE property */ -#define AL_EFFECT_NULL 0x0000 -#define AL_EFFECT_REVERB 0x0001 -#define AL_EFFECT_CHORUS 0x0002 -#define AL_EFFECT_DISTORTION 0x0003 -#define AL_EFFECT_ECHO 0x0004 -#define AL_EFFECT_FLANGER 0x0005 -#define AL_EFFECT_FREQUENCY_SHIFTER 0x0006 -#define AL_EFFECT_VOCAL_MORPHER 0x0007 -#define AL_EFFECT_PITCH_SHIFTER 0x0008 -#define AL_EFFECT_RING_MODULATOR 0x0009 -#define AL_EFFECT_AUTOWAH 0x000A -#define AL_EFFECT_COMPRESSOR 0x000B -#define AL_EFFECT_EQUALIZER 0x000C -#define AL_EFFECT_EAXREVERB 0x8000 - -/* Auxiliary Effect Slot properties. */ -#define AL_EFFECTSLOT_EFFECT 0x0001 -#define AL_EFFECTSLOT_GAIN 0x0002 -#define AL_EFFECTSLOT_AUXILIARY_SEND_AUTO 0x0003 - -/* NULL Auxiliary Slot ID to disable a source send. */ -#define AL_EFFECTSLOT_NULL 0x0000 - - -/* Filter properties. */ - -/* Lowpass filter parameters */ -#define AL_LOWPASS_GAIN 0x0001 -#define AL_LOWPASS_GAINHF 0x0002 - -/* Highpass filter parameters */ -#define AL_HIGHPASS_GAIN 0x0001 -#define AL_HIGHPASS_GAINLF 0x0002 - -/* Bandpass filter parameters */ -#define AL_BANDPASS_GAIN 0x0001 -#define AL_BANDPASS_GAINLF 0x0002 -#define AL_BANDPASS_GAINHF 0x0003 - -/* Filter type */ -#define AL_FILTER_FIRST_PARAMETER 0x0000 -#define AL_FILTER_LAST_PARAMETER 0x8000 -#define AL_FILTER_TYPE 0x8001 - -/* Filter types, used with the AL_FILTER_TYPE property */ -#define AL_FILTER_NULL 0x0000 -#define AL_FILTER_LOWPASS 0x0001 -#define AL_FILTER_HIGHPASS 0x0002 -#define AL_FILTER_BANDPASS 0x0003 - - -/* Effect object function types. */ -typedef void (AL_APIENTRY *LPALGENEFFECTS)(ALsizei, ALuint*); -typedef void (AL_APIENTRY *LPALDELETEEFFECTS)(ALsizei, const ALuint*); -typedef ALboolean (AL_APIENTRY *LPALISEFFECT)(ALuint); -typedef void (AL_APIENTRY *LPALEFFECTI)(ALuint, ALenum, ALint); -typedef void (AL_APIENTRY *LPALEFFECTIV)(ALuint, ALenum, const ALint*); -typedef void (AL_APIENTRY *LPALEFFECTF)(ALuint, ALenum, ALfloat); -typedef void (AL_APIENTRY *LPALEFFECTFV)(ALuint, ALenum, const ALfloat*); -typedef void (AL_APIENTRY *LPALGETEFFECTI)(ALuint, ALenum, ALint*); -typedef void (AL_APIENTRY *LPALGETEFFECTIV)(ALuint, ALenum, ALint*); -typedef void (AL_APIENTRY *LPALGETEFFECTF)(ALuint, ALenum, ALfloat*); -typedef void (AL_APIENTRY *LPALGETEFFECTFV)(ALuint, ALenum, ALfloat*); - -/* Filter object function types. */ -typedef void (AL_APIENTRY *LPALGENFILTERS)(ALsizei, ALuint*); -typedef void (AL_APIENTRY *LPALDELETEFILTERS)(ALsizei, const ALuint*); -typedef ALboolean (AL_APIENTRY *LPALISFILTER)(ALuint); -typedef void (AL_APIENTRY *LPALFILTERI)(ALuint, ALenum, ALint); -typedef void (AL_APIENTRY *LPALFILTERIV)(ALuint, ALenum, const ALint*); -typedef void (AL_APIENTRY *LPALFILTERF)(ALuint, ALenum, ALfloat); -typedef void (AL_APIENTRY *LPALFILTERFV)(ALuint, ALenum, const ALfloat*); -typedef void (AL_APIENTRY *LPALGETFILTERI)(ALuint, ALenum, ALint*); -typedef void (AL_APIENTRY *LPALGETFILTERIV)(ALuint, ALenum, ALint*); -typedef void (AL_APIENTRY *LPALGETFILTERF)(ALuint, ALenum, ALfloat*); -typedef void (AL_APIENTRY *LPALGETFILTERFV)(ALuint, ALenum, ALfloat*); - -/* Auxiliary Effect Slot object function types. */ -typedef void (AL_APIENTRY *LPALGENAUXILIARYEFFECTSLOTS)(ALsizei, ALuint*); -typedef void (AL_APIENTRY *LPALDELETEAUXILIARYEFFECTSLOTS)(ALsizei, const ALuint*); -typedef ALboolean (AL_APIENTRY *LPALISAUXILIARYEFFECTSLOT)(ALuint); -typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTI)(ALuint, ALenum, ALint); -typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTIV)(ALuint, ALenum, const ALint*); -typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTF)(ALuint, ALenum, ALfloat); -typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTFV)(ALuint, ALenum, const ALfloat*); -typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTI)(ALuint, ALenum, ALint*); -typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTIV)(ALuint, ALenum, ALint*); -typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTF)(ALuint, ALenum, ALfloat*); -typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTFV)(ALuint, ALenum, ALfloat*); - -#ifdef AL_ALEXT_PROTOTYPES -AL_API ALvoid AL_APIENTRY alGenEffects(ALsizei n, ALuint *effects); -AL_API ALvoid AL_APIENTRY alDeleteEffects(ALsizei n, const ALuint *effects); -AL_API ALboolean AL_APIENTRY alIsEffect(ALuint effect); -AL_API ALvoid AL_APIENTRY alEffecti(ALuint effect, ALenum param, ALint iValue); -AL_API ALvoid AL_APIENTRY alEffectiv(ALuint effect, ALenum param, const ALint *piValues); -AL_API ALvoid AL_APIENTRY alEffectf(ALuint effect, ALenum param, ALfloat flValue); -AL_API ALvoid AL_APIENTRY alEffectfv(ALuint effect, ALenum param, const ALfloat *pflValues); -AL_API ALvoid AL_APIENTRY alGetEffecti(ALuint effect, ALenum param, ALint *piValue); -AL_API ALvoid AL_APIENTRY alGetEffectiv(ALuint effect, ALenum param, ALint *piValues); -AL_API ALvoid AL_APIENTRY alGetEffectf(ALuint effect, ALenum param, ALfloat *pflValue); -AL_API ALvoid AL_APIENTRY alGetEffectfv(ALuint effect, ALenum param, ALfloat *pflValues); - -AL_API ALvoid AL_APIENTRY alGenFilters(ALsizei n, ALuint *filters); -AL_API ALvoid AL_APIENTRY alDeleteFilters(ALsizei n, const ALuint *filters); -AL_API ALboolean AL_APIENTRY alIsFilter(ALuint filter); -AL_API ALvoid AL_APIENTRY alFilteri(ALuint filter, ALenum param, ALint iValue); -AL_API ALvoid AL_APIENTRY alFilteriv(ALuint filter, ALenum param, const ALint *piValues); -AL_API ALvoid AL_APIENTRY alFilterf(ALuint filter, ALenum param, ALfloat flValue); -AL_API ALvoid AL_APIENTRY alFilterfv(ALuint filter, ALenum param, const ALfloat *pflValues); -AL_API ALvoid AL_APIENTRY alGetFilteri(ALuint filter, ALenum param, ALint *piValue); -AL_API ALvoid AL_APIENTRY alGetFilteriv(ALuint filter, ALenum param, ALint *piValues); -AL_API ALvoid AL_APIENTRY alGetFilterf(ALuint filter, ALenum param, ALfloat *pflValue); -AL_API ALvoid AL_APIENTRY alGetFilterfv(ALuint filter, ALenum param, ALfloat *pflValues); - -AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots); -AL_API ALvoid AL_APIENTRY alDeleteAuxiliaryEffectSlots(ALsizei n, const ALuint *effectslots); -AL_API ALboolean AL_APIENTRY alIsAuxiliaryEffectSlot(ALuint effectslot); -AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint iValue); -AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, const ALint *piValues); -AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat flValue); -AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, const ALfloat *pflValues); -AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint *piValue); -AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, ALint *piValues); -AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat *pflValue); -AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, ALfloat *pflValues); -#endif - -/* Filter ranges and defaults. */ - -/* Lowpass filter */ -#define AL_LOWPASS_MIN_GAIN (0.0f) -#define AL_LOWPASS_MAX_GAIN (1.0f) -#define AL_LOWPASS_DEFAULT_GAIN (1.0f) - -#define AL_LOWPASS_MIN_GAINHF (0.0f) -#define AL_LOWPASS_MAX_GAINHF (1.0f) -#define AL_LOWPASS_DEFAULT_GAINHF (1.0f) - -/* Highpass filter */ -#define AL_HIGHPASS_MIN_GAIN (0.0f) -#define AL_HIGHPASS_MAX_GAIN (1.0f) -#define AL_HIGHPASS_DEFAULT_GAIN (1.0f) - -#define AL_HIGHPASS_MIN_GAINLF (0.0f) -#define AL_HIGHPASS_MAX_GAINLF (1.0f) -#define AL_HIGHPASS_DEFAULT_GAINLF (1.0f) - -/* Bandpass filter */ -#define AL_BANDPASS_MIN_GAIN (0.0f) -#define AL_BANDPASS_MAX_GAIN (1.0f) -#define AL_BANDPASS_DEFAULT_GAIN (1.0f) - -#define AL_BANDPASS_MIN_GAINHF (0.0f) -#define AL_BANDPASS_MAX_GAINHF (1.0f) -#define AL_BANDPASS_DEFAULT_GAINHF (1.0f) - -#define AL_BANDPASS_MIN_GAINLF (0.0f) -#define AL_BANDPASS_MAX_GAINLF (1.0f) -#define AL_BANDPASS_DEFAULT_GAINLF (1.0f) - - -/* Effect parameter ranges and defaults. */ - -/* Standard reverb effect */ -#define AL_REVERB_MIN_DENSITY (0.0f) -#define AL_REVERB_MAX_DENSITY (1.0f) -#define AL_REVERB_DEFAULT_DENSITY (1.0f) - -#define AL_REVERB_MIN_DIFFUSION (0.0f) -#define AL_REVERB_MAX_DIFFUSION (1.0f) -#define AL_REVERB_DEFAULT_DIFFUSION (1.0f) - -#define AL_REVERB_MIN_GAIN (0.0f) -#define AL_REVERB_MAX_GAIN (1.0f) -#define AL_REVERB_DEFAULT_GAIN (0.32f) - -#define AL_REVERB_MIN_GAINHF (0.0f) -#define AL_REVERB_MAX_GAINHF (1.0f) -#define AL_REVERB_DEFAULT_GAINHF (0.89f) - -#define AL_REVERB_MIN_DECAY_TIME (0.1f) -#define AL_REVERB_MAX_DECAY_TIME (20.0f) -#define AL_REVERB_DEFAULT_DECAY_TIME (1.49f) - -#define AL_REVERB_MIN_DECAY_HFRATIO (0.1f) -#define AL_REVERB_MAX_DECAY_HFRATIO (2.0f) -#define AL_REVERB_DEFAULT_DECAY_HFRATIO (0.83f) - -#define AL_REVERB_MIN_REFLECTIONS_GAIN (0.0f) -#define AL_REVERB_MAX_REFLECTIONS_GAIN (3.16f) -#define AL_REVERB_DEFAULT_REFLECTIONS_GAIN (0.05f) - -#define AL_REVERB_MIN_REFLECTIONS_DELAY (0.0f) -#define AL_REVERB_MAX_REFLECTIONS_DELAY (0.3f) -#define AL_REVERB_DEFAULT_REFLECTIONS_DELAY (0.007f) - -#define AL_REVERB_MIN_LATE_REVERB_GAIN (0.0f) -#define AL_REVERB_MAX_LATE_REVERB_GAIN (10.0f) -#define AL_REVERB_DEFAULT_LATE_REVERB_GAIN (1.26f) - -#define AL_REVERB_MIN_LATE_REVERB_DELAY (0.0f) -#define AL_REVERB_MAX_LATE_REVERB_DELAY (0.1f) -#define AL_REVERB_DEFAULT_LATE_REVERB_DELAY (0.011f) - -#define AL_REVERB_MIN_AIR_ABSORPTION_GAINHF (0.892f) -#define AL_REVERB_MAX_AIR_ABSORPTION_GAINHF (1.0f) -#define AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF (0.994f) - -#define AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR (0.0f) -#define AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR (10.0f) -#define AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f) - -#define AL_REVERB_MIN_DECAY_HFLIMIT AL_FALSE -#define AL_REVERB_MAX_DECAY_HFLIMIT AL_TRUE -#define AL_REVERB_DEFAULT_DECAY_HFLIMIT AL_TRUE - -/* EAX reverb effect */ -#define AL_EAXREVERB_MIN_DENSITY (0.0f) -#define AL_EAXREVERB_MAX_DENSITY (1.0f) -#define AL_EAXREVERB_DEFAULT_DENSITY (1.0f) - -#define AL_EAXREVERB_MIN_DIFFUSION (0.0f) -#define AL_EAXREVERB_MAX_DIFFUSION (1.0f) -#define AL_EAXREVERB_DEFAULT_DIFFUSION (1.0f) - -#define AL_EAXREVERB_MIN_GAIN (0.0f) -#define AL_EAXREVERB_MAX_GAIN (1.0f) -#define AL_EAXREVERB_DEFAULT_GAIN (0.32f) - -#define AL_EAXREVERB_MIN_GAINHF (0.0f) -#define AL_EAXREVERB_MAX_GAINHF (1.0f) -#define AL_EAXREVERB_DEFAULT_GAINHF (0.89f) - -#define AL_EAXREVERB_MIN_GAINLF (0.0f) -#define AL_EAXREVERB_MAX_GAINLF (1.0f) -#define AL_EAXREVERB_DEFAULT_GAINLF (1.0f) - -#define AL_EAXREVERB_MIN_DECAY_TIME (0.1f) -#define AL_EAXREVERB_MAX_DECAY_TIME (20.0f) -#define AL_EAXREVERB_DEFAULT_DECAY_TIME (1.49f) - -#define AL_EAXREVERB_MIN_DECAY_HFRATIO (0.1f) -#define AL_EAXREVERB_MAX_DECAY_HFRATIO (2.0f) -#define AL_EAXREVERB_DEFAULT_DECAY_HFRATIO (0.83f) - -#define AL_EAXREVERB_MIN_DECAY_LFRATIO (0.1f) -#define AL_EAXREVERB_MAX_DECAY_LFRATIO (2.0f) -#define AL_EAXREVERB_DEFAULT_DECAY_LFRATIO (1.0f) - -#define AL_EAXREVERB_MIN_REFLECTIONS_GAIN (0.0f) -#define AL_EAXREVERB_MAX_REFLECTIONS_GAIN (3.16f) -#define AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN (0.05f) - -#define AL_EAXREVERB_MIN_REFLECTIONS_DELAY (0.0f) -#define AL_EAXREVERB_MAX_REFLECTIONS_DELAY (0.3f) -#define AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY (0.007f) - -#define AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ (0.0f) - -#define AL_EAXREVERB_MIN_LATE_REVERB_GAIN (0.0f) -#define AL_EAXREVERB_MAX_LATE_REVERB_GAIN (10.0f) -#define AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN (1.26f) - -#define AL_EAXREVERB_MIN_LATE_REVERB_DELAY (0.0f) -#define AL_EAXREVERB_MAX_LATE_REVERB_DELAY (0.1f) -#define AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY (0.011f) - -#define AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ (0.0f) - -#define AL_EAXREVERB_MIN_ECHO_TIME (0.075f) -#define AL_EAXREVERB_MAX_ECHO_TIME (0.25f) -#define AL_EAXREVERB_DEFAULT_ECHO_TIME (0.25f) - -#define AL_EAXREVERB_MIN_ECHO_DEPTH (0.0f) -#define AL_EAXREVERB_MAX_ECHO_DEPTH (1.0f) -#define AL_EAXREVERB_DEFAULT_ECHO_DEPTH (0.0f) - -#define AL_EAXREVERB_MIN_MODULATION_TIME (0.04f) -#define AL_EAXREVERB_MAX_MODULATION_TIME (4.0f) -#define AL_EAXREVERB_DEFAULT_MODULATION_TIME (0.25f) - -#define AL_EAXREVERB_MIN_MODULATION_DEPTH (0.0f) -#define AL_EAXREVERB_MAX_MODULATION_DEPTH (1.0f) -#define AL_EAXREVERB_DEFAULT_MODULATION_DEPTH (0.0f) - -#define AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF (0.892f) -#define AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF (1.0f) -#define AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF (0.994f) - -#define AL_EAXREVERB_MIN_HFREFERENCE (1000.0f) -#define AL_EAXREVERB_MAX_HFREFERENCE (20000.0f) -#define AL_EAXREVERB_DEFAULT_HFREFERENCE (5000.0f) - -#define AL_EAXREVERB_MIN_LFREFERENCE (20.0f) -#define AL_EAXREVERB_MAX_LFREFERENCE (1000.0f) -#define AL_EAXREVERB_DEFAULT_LFREFERENCE (250.0f) - -#define AL_EAXREVERB_MIN_ROOM_ROLLOFF_FACTOR (0.0f) -#define AL_EAXREVERB_MAX_ROOM_ROLLOFF_FACTOR (10.0f) -#define AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f) - -#define AL_EAXREVERB_MIN_DECAY_HFLIMIT AL_FALSE -#define AL_EAXREVERB_MAX_DECAY_HFLIMIT AL_TRUE -#define AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT AL_TRUE - -/* Chorus effect */ -#define AL_CHORUS_WAVEFORM_SINUSOID (0) -#define AL_CHORUS_WAVEFORM_TRIANGLE (1) - -#define AL_CHORUS_MIN_WAVEFORM (0) -#define AL_CHORUS_MAX_WAVEFORM (1) -#define AL_CHORUS_DEFAULT_WAVEFORM (1) - -#define AL_CHORUS_MIN_PHASE (-180) -#define AL_CHORUS_MAX_PHASE (180) -#define AL_CHORUS_DEFAULT_PHASE (90) - -#define AL_CHORUS_MIN_RATE (0.0f) -#define AL_CHORUS_MAX_RATE (10.0f) -#define AL_CHORUS_DEFAULT_RATE (1.1f) - -#define AL_CHORUS_MIN_DEPTH (0.0f) -#define AL_CHORUS_MAX_DEPTH (1.0f) -#define AL_CHORUS_DEFAULT_DEPTH (0.1f) - -#define AL_CHORUS_MIN_FEEDBACK (-1.0f) -#define AL_CHORUS_MAX_FEEDBACK (1.0f) -#define AL_CHORUS_DEFAULT_FEEDBACK (0.25f) - -#define AL_CHORUS_MIN_DELAY (0.0f) -#define AL_CHORUS_MAX_DELAY (0.016f) -#define AL_CHORUS_DEFAULT_DELAY (0.016f) - -/* Distortion effect */ -#define AL_DISTORTION_MIN_EDGE (0.0f) -#define AL_DISTORTION_MAX_EDGE (1.0f) -#define AL_DISTORTION_DEFAULT_EDGE (0.2f) - -#define AL_DISTORTION_MIN_GAIN (0.01f) -#define AL_DISTORTION_MAX_GAIN (1.0f) -#define AL_DISTORTION_DEFAULT_GAIN (0.05f) - -#define AL_DISTORTION_MIN_LOWPASS_CUTOFF (80.0f) -#define AL_DISTORTION_MAX_LOWPASS_CUTOFF (24000.0f) -#define AL_DISTORTION_DEFAULT_LOWPASS_CUTOFF (8000.0f) - -#define AL_DISTORTION_MIN_EQCENTER (80.0f) -#define AL_DISTORTION_MAX_EQCENTER (24000.0f) -#define AL_DISTORTION_DEFAULT_EQCENTER (3600.0f) - -#define AL_DISTORTION_MIN_EQBANDWIDTH (80.0f) -#define AL_DISTORTION_MAX_EQBANDWIDTH (24000.0f) -#define AL_DISTORTION_DEFAULT_EQBANDWIDTH (3600.0f) - -/* Echo effect */ -#define AL_ECHO_MIN_DELAY (0.0f) -#define AL_ECHO_MAX_DELAY (0.207f) -#define AL_ECHO_DEFAULT_DELAY (0.1f) - -#define AL_ECHO_MIN_LRDELAY (0.0f) -#define AL_ECHO_MAX_LRDELAY (0.404f) -#define AL_ECHO_DEFAULT_LRDELAY (0.1f) - -#define AL_ECHO_MIN_DAMPING (0.0f) -#define AL_ECHO_MAX_DAMPING (0.99f) -#define AL_ECHO_DEFAULT_DAMPING (0.5f) - -#define AL_ECHO_MIN_FEEDBACK (0.0f) -#define AL_ECHO_MAX_FEEDBACK (1.0f) -#define AL_ECHO_DEFAULT_FEEDBACK (0.5f) - -#define AL_ECHO_MIN_SPREAD (-1.0f) -#define AL_ECHO_MAX_SPREAD (1.0f) -#define AL_ECHO_DEFAULT_SPREAD (-1.0f) - -/* Flanger effect */ -#define AL_FLANGER_WAVEFORM_SINUSOID (0) -#define AL_FLANGER_WAVEFORM_TRIANGLE (1) - -#define AL_FLANGER_MIN_WAVEFORM (0) -#define AL_FLANGER_MAX_WAVEFORM (1) -#define AL_FLANGER_DEFAULT_WAVEFORM (1) - -#define AL_FLANGER_MIN_PHASE (-180) -#define AL_FLANGER_MAX_PHASE (180) -#define AL_FLANGER_DEFAULT_PHASE (0) - -#define AL_FLANGER_MIN_RATE (0.0f) -#define AL_FLANGER_MAX_RATE (10.0f) -#define AL_FLANGER_DEFAULT_RATE (0.27f) - -#define AL_FLANGER_MIN_DEPTH (0.0f) -#define AL_FLANGER_MAX_DEPTH (1.0f) -#define AL_FLANGER_DEFAULT_DEPTH (1.0f) - -#define AL_FLANGER_MIN_FEEDBACK (-1.0f) -#define AL_FLANGER_MAX_FEEDBACK (1.0f) -#define AL_FLANGER_DEFAULT_FEEDBACK (-0.5f) - -#define AL_FLANGER_MIN_DELAY (0.0f) -#define AL_FLANGER_MAX_DELAY (0.004f) -#define AL_FLANGER_DEFAULT_DELAY (0.002f) - -/* Frequency shifter effect */ -#define AL_FREQUENCY_SHIFTER_MIN_FREQUENCY (0.0f) -#define AL_FREQUENCY_SHIFTER_MAX_FREQUENCY (24000.0f) -#define AL_FREQUENCY_SHIFTER_DEFAULT_FREQUENCY (0.0f) - -#define AL_FREQUENCY_SHIFTER_MIN_LEFT_DIRECTION (0) -#define AL_FREQUENCY_SHIFTER_MAX_LEFT_DIRECTION (2) -#define AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION (0) - -#define AL_FREQUENCY_SHIFTER_DIRECTION_DOWN (0) -#define AL_FREQUENCY_SHIFTER_DIRECTION_UP (1) -#define AL_FREQUENCY_SHIFTER_DIRECTION_OFF (2) - -#define AL_FREQUENCY_SHIFTER_MIN_RIGHT_DIRECTION (0) -#define AL_FREQUENCY_SHIFTER_MAX_RIGHT_DIRECTION (2) -#define AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION (0) - -/* Vocal morpher effect */ -#define AL_VOCAL_MORPHER_MIN_PHONEMEA (0) -#define AL_VOCAL_MORPHER_MAX_PHONEMEA (29) -#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA (0) - -#define AL_VOCAL_MORPHER_MIN_PHONEMEA_COARSE_TUNING (-24) -#define AL_VOCAL_MORPHER_MAX_PHONEMEA_COARSE_TUNING (24) -#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA_COARSE_TUNING (0) - -#define AL_VOCAL_MORPHER_MIN_PHONEMEB (0) -#define AL_VOCAL_MORPHER_MAX_PHONEMEB (29) -#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB (10) - -#define AL_VOCAL_MORPHER_MIN_PHONEMEB_COARSE_TUNING (-24) -#define AL_VOCAL_MORPHER_MAX_PHONEMEB_COARSE_TUNING (24) -#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB_COARSE_TUNING (0) - -#define AL_VOCAL_MORPHER_PHONEME_A (0) -#define AL_VOCAL_MORPHER_PHONEME_E (1) -#define AL_VOCAL_MORPHER_PHONEME_I (2) -#define AL_VOCAL_MORPHER_PHONEME_O (3) -#define AL_VOCAL_MORPHER_PHONEME_U (4) -#define AL_VOCAL_MORPHER_PHONEME_AA (5) -#define AL_VOCAL_MORPHER_PHONEME_AE (6) -#define AL_VOCAL_MORPHER_PHONEME_AH (7) -#define AL_VOCAL_MORPHER_PHONEME_AO (8) -#define AL_VOCAL_MORPHER_PHONEME_EH (9) -#define AL_VOCAL_MORPHER_PHONEME_ER (10) -#define AL_VOCAL_MORPHER_PHONEME_IH (11) -#define AL_VOCAL_MORPHER_PHONEME_IY (12) -#define AL_VOCAL_MORPHER_PHONEME_UH (13) -#define AL_VOCAL_MORPHER_PHONEME_UW (14) -#define AL_VOCAL_MORPHER_PHONEME_B (15) -#define AL_VOCAL_MORPHER_PHONEME_D (16) -#define AL_VOCAL_MORPHER_PHONEME_F (17) -#define AL_VOCAL_MORPHER_PHONEME_G (18) -#define AL_VOCAL_MORPHER_PHONEME_J (19) -#define AL_VOCAL_MORPHER_PHONEME_K (20) -#define AL_VOCAL_MORPHER_PHONEME_L (21) -#define AL_VOCAL_MORPHER_PHONEME_M (22) -#define AL_VOCAL_MORPHER_PHONEME_N (23) -#define AL_VOCAL_MORPHER_PHONEME_P (24) -#define AL_VOCAL_MORPHER_PHONEME_R (25) -#define AL_VOCAL_MORPHER_PHONEME_S (26) -#define AL_VOCAL_MORPHER_PHONEME_T (27) -#define AL_VOCAL_MORPHER_PHONEME_V (28) -#define AL_VOCAL_MORPHER_PHONEME_Z (29) - -#define AL_VOCAL_MORPHER_WAVEFORM_SINUSOID (0) -#define AL_VOCAL_MORPHER_WAVEFORM_TRIANGLE (1) -#define AL_VOCAL_MORPHER_WAVEFORM_SAWTOOTH (2) - -#define AL_VOCAL_MORPHER_MIN_WAVEFORM (0) -#define AL_VOCAL_MORPHER_MAX_WAVEFORM (2) -#define AL_VOCAL_MORPHER_DEFAULT_WAVEFORM (0) - -#define AL_VOCAL_MORPHER_MIN_RATE (0.0f) -#define AL_VOCAL_MORPHER_MAX_RATE (10.0f) -#define AL_VOCAL_MORPHER_DEFAULT_RATE (1.41f) - -/* Pitch shifter effect */ -#define AL_PITCH_SHIFTER_MIN_COARSE_TUNE (-12) -#define AL_PITCH_SHIFTER_MAX_COARSE_TUNE (12) -#define AL_PITCH_SHIFTER_DEFAULT_COARSE_TUNE (12) - -#define AL_PITCH_SHIFTER_MIN_FINE_TUNE (-50) -#define AL_PITCH_SHIFTER_MAX_FINE_TUNE (50) -#define AL_PITCH_SHIFTER_DEFAULT_FINE_TUNE (0) - -/* Ring modulator effect */ -#define AL_RING_MODULATOR_MIN_FREQUENCY (0.0f) -#define AL_RING_MODULATOR_MAX_FREQUENCY (8000.0f) -#define AL_RING_MODULATOR_DEFAULT_FREQUENCY (440.0f) - -#define AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF (0.0f) -#define AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF (24000.0f) -#define AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF (800.0f) - -#define AL_RING_MODULATOR_SINUSOID (0) -#define AL_RING_MODULATOR_SAWTOOTH (1) -#define AL_RING_MODULATOR_SQUARE (2) - -#define AL_RING_MODULATOR_MIN_WAVEFORM (0) -#define AL_RING_MODULATOR_MAX_WAVEFORM (2) -#define AL_RING_MODULATOR_DEFAULT_WAVEFORM (0) - -/* Autowah effect */ -#define AL_AUTOWAH_MIN_ATTACK_TIME (0.0001f) -#define AL_AUTOWAH_MAX_ATTACK_TIME (1.0f) -#define AL_AUTOWAH_DEFAULT_ATTACK_TIME (0.06f) - -#define AL_AUTOWAH_MIN_RELEASE_TIME (0.0001f) -#define AL_AUTOWAH_MAX_RELEASE_TIME (1.0f) -#define AL_AUTOWAH_DEFAULT_RELEASE_TIME (0.06f) - -#define AL_AUTOWAH_MIN_RESONANCE (2.0f) -#define AL_AUTOWAH_MAX_RESONANCE (1000.0f) -#define AL_AUTOWAH_DEFAULT_RESONANCE (1000.0f) - -#define AL_AUTOWAH_MIN_PEAK_GAIN (0.00003f) -#define AL_AUTOWAH_MAX_PEAK_GAIN (31621.0f) -#define AL_AUTOWAH_DEFAULT_PEAK_GAIN (11.22f) - -/* Compressor effect */ -#define AL_COMPRESSOR_MIN_ONOFF (0) -#define AL_COMPRESSOR_MAX_ONOFF (1) -#define AL_COMPRESSOR_DEFAULT_ONOFF (1) - -/* Equalizer effect */ -#define AL_EQUALIZER_MIN_LOW_GAIN (0.126f) -#define AL_EQUALIZER_MAX_LOW_GAIN (7.943f) -#define AL_EQUALIZER_DEFAULT_LOW_GAIN (1.0f) - -#define AL_EQUALIZER_MIN_LOW_CUTOFF (50.0f) -#define AL_EQUALIZER_MAX_LOW_CUTOFF (800.0f) -#define AL_EQUALIZER_DEFAULT_LOW_CUTOFF (200.0f) - -#define AL_EQUALIZER_MIN_MID1_GAIN (0.126f) -#define AL_EQUALIZER_MAX_MID1_GAIN (7.943f) -#define AL_EQUALIZER_DEFAULT_MID1_GAIN (1.0f) - -#define AL_EQUALIZER_MIN_MID1_CENTER (200.0f) -#define AL_EQUALIZER_MAX_MID1_CENTER (3000.0f) -#define AL_EQUALIZER_DEFAULT_MID1_CENTER (500.0f) - -#define AL_EQUALIZER_MIN_MID1_WIDTH (0.01f) -#define AL_EQUALIZER_MAX_MID1_WIDTH (1.0f) -#define AL_EQUALIZER_DEFAULT_MID1_WIDTH (1.0f) - -#define AL_EQUALIZER_MIN_MID2_GAIN (0.126f) -#define AL_EQUALIZER_MAX_MID2_GAIN (7.943f) -#define AL_EQUALIZER_DEFAULT_MID2_GAIN (1.0f) - -#define AL_EQUALIZER_MIN_MID2_CENTER (1000.0f) -#define AL_EQUALIZER_MAX_MID2_CENTER (8000.0f) -#define AL_EQUALIZER_DEFAULT_MID2_CENTER (3000.0f) - -#define AL_EQUALIZER_MIN_MID2_WIDTH (0.01f) -#define AL_EQUALIZER_MAX_MID2_WIDTH (1.0f) -#define AL_EQUALIZER_DEFAULT_MID2_WIDTH (1.0f) - -#define AL_EQUALIZER_MIN_HIGH_GAIN (0.126f) -#define AL_EQUALIZER_MAX_HIGH_GAIN (7.943f) -#define AL_EQUALIZER_DEFAULT_HIGH_GAIN (1.0f) - -#define AL_EQUALIZER_MIN_HIGH_CUTOFF (4000.0f) -#define AL_EQUALIZER_MAX_HIGH_CUTOFF (16000.0f) -#define AL_EQUALIZER_DEFAULT_HIGH_CUTOFF (6000.0f) - - -/* Source parameter value ranges and defaults. */ -#define AL_MIN_AIR_ABSORPTION_FACTOR (0.0f) -#define AL_MAX_AIR_ABSORPTION_FACTOR (10.0f) -#define AL_DEFAULT_AIR_ABSORPTION_FACTOR (0.0f) - -#define AL_MIN_ROOM_ROLLOFF_FACTOR (0.0f) -#define AL_MAX_ROOM_ROLLOFF_FACTOR (10.0f) -#define AL_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f) - -#define AL_MIN_CONE_OUTER_GAINHF (0.0f) -#define AL_MAX_CONE_OUTER_GAINHF (1.0f) -#define AL_DEFAULT_CONE_OUTER_GAINHF (1.0f) - -#define AL_MIN_DIRECT_FILTER_GAINHF_AUTO AL_FALSE -#define AL_MAX_DIRECT_FILTER_GAINHF_AUTO AL_TRUE -#define AL_DEFAULT_DIRECT_FILTER_GAINHF_AUTO AL_TRUE - -#define AL_MIN_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_FALSE -#define AL_MAX_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_TRUE -#define AL_DEFAULT_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_TRUE - -#define AL_MIN_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_FALSE -#define AL_MAX_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_TRUE -#define AL_DEFAULT_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_TRUE - - -/* Listener parameter value ranges and defaults. */ -#define AL_MIN_METERS_PER_UNIT FLT_MIN -#define AL_MAX_METERS_PER_UNIT FLT_MAX -#define AL_DEFAULT_METERS_PER_UNIT (1.0f) - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* AL_EFX_H */ diff --git a/builddir/postgresql-9.5.3/COPYRIGHT b/builddir/postgresql-9.5.3/COPYRIGHT deleted file mode 100644 index 01b6e36..0000000 --- a/builddir/postgresql-9.5.3/COPYRIGHT +++ /dev/null @@ -1,23 +0,0 @@ -PostgreSQL Database Management System -(formerly known as Postgres, then as Postgres95) - -Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group - -Portions Copyright (c) 1994, The Regents of the University of California - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose, without fee, and without a written agreement -is hereby granted, provided that the above copyright notice and this -paragraph and the following two paragraphs appear in all copies. - -IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR -DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING -LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS -DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS -ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO -PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. diff --git a/builddir/postgresql-9.5.3/bin/libpq.lib b/builddir/postgresql-9.5.3/bin/libpq.lib deleted file mode 100644 index 556b5dd..0000000 Binary files a/builddir/postgresql-9.5.3/bin/libpq.lib and /dev/null differ diff --git a/builddir/postgresql-9.5.3/include/libpq-fe.h b/builddir/postgresql-9.5.3/include/libpq-fe.h deleted file mode 100644 index bcd14ac..0000000 --- a/builddir/postgresql-9.5.3/include/libpq-fe.h +++ /dev/null @@ -1,593 +0,0 @@ -/*------------------------------------------------------------------------- - * - * libpq-fe.h - * This file contains definitions for structures and - * externs for functions used by frontend postgres applications. - * - * Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group - * Portions Copyright (c) 1994, Regents of the University of California - * - * src/interfaces/libpq/libpq-fe.h - * - *------------------------------------------------------------------------- - */ - -#ifndef LIBPQ_FE_H -#define LIBPQ_FE_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include <stdio.h> - -/* - * postgres_ext.h defines the backend's externally visible types, - * such as Oid. - */ -#include "postgres_ext.h" - -/* - * Option flags for PQcopyResult - */ -#define PG_COPYRES_ATTRS 0x01 -#define PG_COPYRES_TUPLES 0x02 /* Implies PG_COPYRES_ATTRS */ -#define PG_COPYRES_EVENTS 0x04 -#define PG_COPYRES_NOTICEHOOKS 0x08 - -/* Application-visible enum types */ - -/* - * Although it is okay to add to these lists, values which become unused - * should never be removed, nor should constants be redefined - that would - * break compatibility with existing code. - */ - -typedef enum -{ - CONNECTION_OK, - CONNECTION_BAD, - /* Non-blocking mode only below here */ - - /* - * The existence of these should never be relied upon - they should only - * be used for user feedback or similar purposes. - */ - CONNECTION_STARTED, /* Waiting for connection to be made. */ - CONNECTION_MADE, /* Connection OK; waiting to send. */ - CONNECTION_AWAITING_RESPONSE, /* Waiting for a response from the - * postmaster. */ - CONNECTION_AUTH_OK, /* Received authentication; waiting for - * backend startup. */ - CONNECTION_SETENV, /* Negotiating environment. */ - CONNECTION_SSL_STARTUP, /* Negotiating SSL. */ - CONNECTION_NEEDED /* Internal state: connect() needed */ -} ConnStatusType; - -typedef enum -{ - PGRES_POLLING_FAILED = 0, - PGRES_POLLING_READING, /* These two indicate that one may */ - PGRES_POLLING_WRITING, /* use select before polling again. */ - PGRES_POLLING_OK, - PGRES_POLLING_ACTIVE /* unused; keep for awhile for backwards - * compatibility */ -} PostgresPollingStatusType; - -typedef enum -{ - PGRES_EMPTY_QUERY = 0, /* empty query string was executed */ - PGRES_COMMAND_OK, /* a query command that doesn't return - * anything was executed properly by the - * backend */ - PGRES_TUPLES_OK, /* a query command that returns tuples was - * executed properly by the backend, PGresult - * contains the result tuples */ - PGRES_COPY_OUT, /* Copy Out data transfer in progress */ - PGRES_COPY_IN, /* Copy In data transfer in progress */ - PGRES_BAD_RESPONSE, /* an unexpected response was recv'd from the - * backend */ - PGRES_NONFATAL_ERROR, /* notice or warning message */ - PGRES_FATAL_ERROR, /* query failed */ - PGRES_COPY_BOTH, /* Copy In/Out data transfer in progress */ - PGRES_SINGLE_TUPLE /* single tuple from larger resultset */ -} ExecStatusType; - -typedef enum -{ - PQTRANS_IDLE, /* connection idle */ - PQTRANS_ACTIVE, /* command in progress */ - PQTRANS_INTRANS, /* idle, within transaction block */ - PQTRANS_INERROR, /* idle, within failed transaction */ - PQTRANS_UNKNOWN /* cannot determine status */ -} PGTransactionStatusType; - -typedef enum -{ - PQERRORS_TERSE, /* single-line error messages */ - PQERRORS_DEFAULT, /* recommended style */ - PQERRORS_VERBOSE /* all the facts, ma'am */ -} PGVerbosity; - -/* - * PGPing - The ordering of this enum should not be altered because the - * values are exposed externally via pg_isready. - */ - -typedef enum -{ - PQPING_OK, /* server is accepting connections */ - PQPING_REJECT, /* server is alive but rejecting connections */ - PQPING_NO_RESPONSE, /* could not establish connection */ - PQPING_NO_ATTEMPT /* connection not attempted (bad params) */ -} PGPing; - -/* PGconn encapsulates a connection to the backend. - * The contents of this struct are not supposed to be known to applications. - */ -typedef struct pg_conn PGconn; - -/* PGresult encapsulates the result of a query (or more precisely, of a single - * SQL command --- a query string given to PQsendQuery can contain multiple - * commands and thus return multiple PGresult objects). - * The contents of this struct are not supposed to be known to applications. - */ -typedef struct pg_result PGresult; - -/* PGcancel encapsulates the information needed to cancel a running - * query on an existing connection. - * The contents of this struct are not supposed to be known to applications. - */ -typedef struct pg_cancel PGcancel; - -/* PGnotify represents the occurrence of a NOTIFY message. - * Ideally this would be an opaque typedef, but it's so simple that it's - * unlikely to change. - * NOTE: in Postgres 6.4 and later, the be_pid is the notifying backend's, - * whereas in earlier versions it was always your own backend's PID. - */ -typedef struct pgNotify -{ - char *relname; /* notification condition name */ - int be_pid; /* process ID of notifying server process */ - char *extra; /* notification parameter */ - /* Fields below here are private to libpq; apps should not use 'em */ - struct pgNotify *next; /* list link */ -} PGnotify; - -/* Function types for notice-handling callbacks */ -typedef void (*PQnoticeReceiver) (void *arg, const PGresult *res); -typedef void (*PQnoticeProcessor) (void *arg, const char *message); - -/* Print options for PQprint() */ -typedef char pqbool; - -typedef struct _PQprintOpt -{ - pqbool header; /* print output field headings and row count */ - pqbool align; /* fill align the fields */ - pqbool standard; /* old brain dead format */ - pqbool html3; /* output html tables */ - pqbool expanded; /* expand tables */ - pqbool pager; /* use pager for output if needed */ - char *fieldSep; /* field separator */ - char *tableOpt; /* insert to HTML <table ...> */ - char *caption; /* HTML <caption> */ - char **fieldName; /* null terminated array of replacement field - * names */ -} PQprintOpt; - -/* ---------------- - * Structure for the conninfo parameter definitions returned by PQconndefaults - * or PQconninfoParse. - * - * All fields except "val" point at static strings which must not be altered. - * "val" is either NULL or a malloc'd current-value string. PQconninfoFree() - * will release both the val strings and the PQconninfoOption array itself. - * ---------------- - */ -typedef struct _PQconninfoOption -{ - char *keyword; /* The keyword of the option */ - char *envvar; /* Fallback environment variable name */ - char *compiled; /* Fallback compiled in default value */ - char *val; /* Option's current value, or NULL */ - char *label; /* Label for field in connect dialog */ - char *dispchar; /* Indicates how to display this field in a - * connect dialog. Values are: "" Display - * entered value as is "*" Password field - - * hide value "D" Debug option - don't show - * by default */ - int dispsize; /* Field size in characters for dialog */ -} PQconninfoOption; - -/* ---------------- - * PQArgBlock -- structure for PQfn() arguments - * ---------------- - */ -typedef struct -{ - int len; - int isint; - union - { - int *ptr; /* can't use void (dec compiler barfs) */ - int integer; - } u; -} PQArgBlock; - -/* ---------------- - * PGresAttDesc -- Data about a single attribute (column) of a query result - * ---------------- - */ -typedef struct pgresAttDesc -{ - char *name; /* column name */ - Oid tableid; /* source table, if known */ - int columnid; /* source column, if known */ - int format; /* format code for value (text/binary) */ - Oid typid; /* type id */ - int typlen; /* type size */ - int atttypmod; /* type-specific modifier info */ -} PGresAttDesc; - -/* ---------------- - * Exported functions of libpq - * ---------------- - */ - -/* === in fe-connect.c === */ - -/* make a new client connection to the backend */ -/* Asynchronous (non-blocking) */ -extern PGconn *PQconnectStart(const char *conninfo); -extern PGconn *PQconnectStartParams(const char *const * keywords, - const char *const * values, int expand_dbname); -extern PostgresPollingStatusType PQconnectPoll(PGconn *conn); - -/* Synchronous (blocking) */ -extern PGconn *PQconnectdb(const char *conninfo); -extern PGconn *PQconnectdbParams(const char *const * keywords, - const char *const * values, int expand_dbname); -extern PGconn *PQsetdbLogin(const char *pghost, const char *pgport, - const char *pgoptions, const char *pgtty, - const char *dbName, - const char *login, const char *pwd); - -#define PQsetdb(M_PGHOST,M_PGPORT,M_PGOPT,M_PGTTY,M_DBNAME) \ - PQsetdbLogin(M_PGHOST, M_PGPORT, M_PGOPT, M_PGTTY, M_DBNAME, NULL, NULL) - -/* close the current connection and free the PGconn data structure */ -extern void PQfinish(PGconn *conn); - -/* get info about connection options known to PQconnectdb */ -extern PQconninfoOption *PQconndefaults(void); - -/* parse connection options in same way as PQconnectdb */ -extern PQconninfoOption *PQconninfoParse(const char *conninfo, char **errmsg); - -/* return the connection options used by a live connection */ -extern PQconninfoOption *PQconninfo(PGconn *conn); - -/* free the data structure returned by PQconndefaults() or PQconninfoParse() */ -extern void PQconninfoFree(PQconninfoOption *connOptions); - -/* - * close the current connection and restablish a new one with the same - * parameters - */ -/* Asynchronous (non-blocking) */ -extern int PQresetStart(PGconn *conn); -extern PostgresPollingStatusType PQresetPoll(PGconn *conn); - -/* Synchronous (blocking) */ -extern void PQreset(PGconn *conn); - -/* request a cancel structure */ -extern PGcancel *PQgetCancel(PGconn *conn); - -/* free a cancel structure */ -extern void PQfreeCancel(PGcancel *cancel); - -/* issue a cancel request */ -extern int PQcancel(PGcancel *cancel, char *errbuf, int errbufsize); - -/* backwards compatible version of PQcancel; not thread-safe */ -extern int PQrequestCancel(PGconn *conn); - -/* Accessor functions for PGconn objects */ -extern char *PQdb(const PGconn *conn); -extern char *PQuser(const PGconn *conn); -extern char *PQpass(const PGconn *conn); -extern char *PQhost(const PGconn *conn); -extern char *PQport(const PGconn *conn); -extern char *PQtty(const PGconn *conn); -extern char *PQoptions(const PGconn *conn); -extern ConnStatusType PQstatus(const PGconn *conn); -extern PGTransactionStatusType PQtransactionStatus(const PGconn *conn); -extern const char *PQparameterStatus(const PGconn *conn, - const char *paramName); -extern int PQprotocolVersion(const PGconn *conn); -extern int PQserverVersion(const PGconn *conn); -extern char *PQerrorMessage(const PGconn *conn); -extern int PQsocket(const PGconn *conn); -extern int PQbackendPID(const PGconn *conn); -extern int PQconnectionNeedsPassword(const PGconn *conn); -extern int PQconnectionUsedPassword(const PGconn *conn); -extern int PQclientEncoding(const PGconn *conn); -extern int PQsetClientEncoding(PGconn *conn, const char *encoding); - -/* SSL information functions */ -extern int PQsslInUse(PGconn *conn); -extern void *PQsslStruct(PGconn *conn, const char *struct_name); -extern const char *PQsslAttribute(PGconn *conn, const char *attribute_name); -extern const char *const * PQsslAttributeNames(PGconn *conn); - -/* Get the OpenSSL structure associated with a connection. Returns NULL for - * unencrypted connections or if any other TLS library is in use. */ -extern void *PQgetssl(PGconn *conn); - -/* Tell libpq whether it needs to initialize OpenSSL */ -extern void PQinitSSL(int do_init); - -/* More detailed way to tell libpq whether it needs to initialize OpenSSL */ -extern void PQinitOpenSSL(int do_ssl, int do_crypto); - -/* Set verbosity for PQerrorMessage and PQresultErrorMessage */ -extern PGVerbosity PQsetErrorVerbosity(PGconn *conn, PGVerbosity verbosity); - -/* Enable/disable tracing */ -extern void PQtrace(PGconn *conn, FILE *debug_port); -extern void PQuntrace(PGconn *conn); - -/* Override default notice handling routines */ -extern PQnoticeReceiver PQsetNoticeReceiver(PGconn *conn, - PQnoticeReceiver proc, - void *arg); -extern PQnoticeProcessor PQsetNoticeProcessor(PGconn *conn, - PQnoticeProcessor proc, - void *arg); - -/* - * Used to set callback that prevents concurrent access to - * non-thread safe functions that libpq needs. - * The default implementation uses a libpq internal mutex. - * Only required for multithreaded apps that use kerberos - * both within their app and for postgresql connections. - */ -typedef void (*pgthreadlock_t) (int acquire); - -extern pgthreadlock_t PQregisterThreadLock(pgthreadlock_t newhandler); - -/* === in fe-exec.c === */ - -/* Simple synchronous query */ -extern PGresult *PQexec(PGconn *conn, const char *query); -extern PGresult *PQexecParams(PGconn *conn, - const char *command, - int nParams, - const Oid *paramTypes, - const char *const * paramValues, - const int *paramLengths, - const int *paramFormats, - int resultFormat); -extern PGresult *PQprepare(PGconn *conn, const char *stmtName, - const char *query, int nParams, - const Oid *paramTypes); -extern PGresult *PQexecPrepared(PGconn *conn, - const char *stmtName, - int nParams, - const char *const * paramValues, - const int *paramLengths, - const int *paramFormats, - int resultFormat); - -/* Interface for multiple-result or asynchronous queries */ -extern int PQsendQuery(PGconn *conn, const char *query); -extern int PQsendQueryParams(PGconn *conn, - const char *command, - int nParams, - const Oid *paramTypes, - const char *const * paramValues, - const int *paramLengths, - const int *paramFormats, - int resultFormat); -extern int PQsendPrepare(PGconn *conn, const char *stmtName, - const char *query, int nParams, - const Oid *paramTypes); -extern int PQsendQueryPrepared(PGconn *conn, - const char *stmtName, - int nParams, - const char *const * paramValues, - const int *paramLengths, - const int *paramFormats, - int resultFormat); -extern int PQsetSingleRowMode(PGconn *conn); -extern PGresult *PQgetResult(PGconn *conn); - -/* Routines for managing an asynchronous query */ -extern int PQisBusy(PGconn *conn); -extern int PQconsumeInput(PGconn *conn); - -/* LISTEN/NOTIFY support */ -extern PGnotify *PQnotifies(PGconn *conn); - -/* Routines for copy in/out */ -extern int PQputCopyData(PGconn *conn, const char *buffer, int nbytes); -extern int PQputCopyEnd(PGconn *conn, const char *errormsg); -extern int PQgetCopyData(PGconn *conn, char **buffer, int async); - -/* Deprecated routines for copy in/out */ -extern int PQgetline(PGconn *conn, char *string, int length); -extern int PQputline(PGconn *conn, const char *string); -extern int PQgetlineAsync(PGconn *conn, char *buffer, int bufsize); -extern int PQputnbytes(PGconn *conn, const char *buffer, int nbytes); -extern int PQendcopy(PGconn *conn); - -/* Set blocking/nonblocking connection to the backend */ -extern int PQsetnonblocking(PGconn *conn, int arg); -extern int PQisnonblocking(const PGconn *conn); -extern int PQisthreadsafe(void); -extern PGPing PQping(const char *conninfo); -extern PGPing PQpingParams(const char *const * keywords, - const char *const * values, int expand_dbname); - -/* Force the write buffer to be written (or at least try) */ -extern int PQflush(PGconn *conn); - -/* - * "Fast path" interface --- not really recommended for application - * use - */ -extern PGresult *PQfn(PGconn *conn, - int fnid, - int *result_buf, - int *result_len, - int result_is_int, - const PQArgBlock *args, - int nargs); - -/* Accessor functions for PGresult objects */ -extern ExecStatusType PQresultStatus(const PGresult *res); -extern char *PQresStatus(ExecStatusType status); -extern char *PQresultErrorMessage(const PGresult *res); -extern char *PQresultErrorField(const PGresult *res, int fieldcode); -extern int PQntuples(const PGresult *res); -extern int PQnfields(const PGresult *res); -extern int PQbinaryTuples(const PGresult *res); -extern char *PQfname(const PGresult *res, int field_num); -extern int PQfnumber(const PGresult *res, const char *field_name); -extern Oid PQftable(const PGresult *res, int field_num); -extern int PQftablecol(const PGresult *res, int field_num); -extern int PQfformat(const PGresult *res, int field_num); -extern Oid PQftype(const PGresult *res, int field_num); -extern int PQfsize(const PGresult *res, int field_num); -extern int PQfmod(const PGresult *res, int field_num); -extern char *PQcmdStatus(PGresult *res); -extern char *PQoidStatus(const PGresult *res); /* old and ugly */ -extern Oid PQoidValue(const PGresult *res); /* new and improved */ -extern char *PQcmdTuples(PGresult *res); -extern char *PQgetvalue(const PGresult *res, int tup_num, int field_num); -extern int PQgetlength(const PGresult *res, int tup_num, int field_num); -extern int PQgetisnull(const PGresult *res, int tup_num, int field_num); -extern int PQnparams(const PGresult *res); -extern Oid PQparamtype(const PGresult *res, int param_num); - -/* Describe prepared statements and portals */ -extern PGresult *PQdescribePrepared(PGconn *conn, const char *stmt); -extern PGresult *PQdescribePortal(PGconn *conn, const char *portal); -extern int PQsendDescribePrepared(PGconn *conn, const char *stmt); -extern int PQsendDescribePortal(PGconn *conn, const char *portal); - -/* Delete a PGresult */ -extern void PQclear(PGresult *res); - -/* For freeing other alloc'd results, such as PGnotify structs */ -extern void PQfreemem(void *ptr); - -/* Exists for backward compatibility. bjm 2003-03-24 */ -#define PQfreeNotify(ptr) PQfreemem(ptr) - -/* Error when no password was given. */ -/* Note: depending on this is deprecated; use PQconnectionNeedsPassword(). */ -#define PQnoPasswordSupplied "fe_sendauth: no password supplied\n" - -/* Create and manipulate PGresults */ -extern PGresult *PQmakeEmptyPGresult(PGconn *conn, ExecStatusType status); -extern PGresult *PQcopyResult(const PGresult *src, int flags); -extern int PQsetResultAttrs(PGresult *res, int numAttributes, PGresAttDesc *attDescs); -extern void *PQresultAlloc(PGresult *res, size_t nBytes); -extern int PQsetvalue(PGresult *res, int tup_num, int field_num, char *value, int len); - -/* Quoting strings before inclusion in queries. */ -extern size_t PQescapeStringConn(PGconn *conn, - char *to, const char *from, size_t length, - int *error); -extern char *PQescapeLiteral(PGconn *conn, const char *str, size_t len); -extern char *PQescapeIdentifier(PGconn *conn, const char *str, size_t len); -extern unsigned char *PQescapeByteaConn(PGconn *conn, - const unsigned char *from, size_t from_length, - size_t *to_length); -extern unsigned char *PQunescapeBytea(const unsigned char *strtext, - size_t *retbuflen); - -/* These forms are deprecated! */ -extern size_t PQescapeString(char *to, const char *from, size_t length); -extern unsigned char *PQescapeBytea(const unsigned char *from, size_t from_length, - size_t *to_length); - - - -/* === in fe-print.c === */ - -extern void PQprint(FILE *fout, /* output stream */ - const PGresult *res, - const PQprintOpt *ps); /* option structure */ - -/* - * really old printing routines - */ -extern void PQdisplayTuples(const PGresult *res, - FILE *fp, /* where to send the output */ - int fillAlign, /* pad the fields with spaces */ - const char *fieldSep, /* field separator */ - int printHeader, /* display headers? */ - int quiet); - -extern void PQprintTuples(const PGresult *res, - FILE *fout, /* output stream */ - int printAttName, /* print attribute names */ - int terseOutput, /* delimiter bars */ - int width); /* width of column, if 0, use variable width */ - - -/* === in fe-lobj.c === */ - -/* Large-object access routines */ -extern int lo_open(PGconn *conn, Oid lobjId, int mode); -extern int lo_close(PGconn *conn, int fd); -extern int lo_read(PGconn *conn, int fd, char *buf, size_t len); -extern int lo_write(PGconn *conn, int fd, const char *buf, size_t len); -extern int lo_lseek(PGconn *conn, int fd, int offset, int whence); -extern pg_int64 lo_lseek64(PGconn *conn, int fd, pg_int64 offset, int whence); -extern Oid lo_creat(PGconn *conn, int mode); -extern Oid lo_create(PGconn *conn, Oid lobjId); -extern int lo_tell(PGconn *conn, int fd); -extern pg_int64 lo_tell64(PGconn *conn, int fd); -extern int lo_truncate(PGconn *conn, int fd, size_t len); -extern int lo_truncate64(PGconn *conn, int fd, pg_int64 len); -extern int lo_unlink(PGconn *conn, Oid lobjId); -extern Oid lo_import(PGconn *conn, const char *filename); -extern Oid lo_import_with_oid(PGconn *conn, const char *filename, Oid lobjId); -extern int lo_export(PGconn *conn, Oid lobjId, const char *filename); - -/* === in fe-misc.c === */ - -/* Get the version of the libpq library in use */ -extern int PQlibVersion(void); - -/* Determine length of multibyte encoded char at *s */ -extern int PQmblen(const char *s, int encoding); - -/* Determine display length of multibyte encoded char at *s */ -extern int PQdsplen(const char *s, int encoding); - -/* Get encoding id from environment variable PGCLIENTENCODING */ -extern int PQenv2encoding(void); - -/* === in fe-auth.c === */ - -extern char *PQencryptPassword(const char *passwd, const char *user); - -/* === in encnames.c === */ - -extern int pg_char_to_encoding(const char *name); -extern const char *pg_encoding_to_char(int encoding); -extern int pg_valid_server_encoding_id(int encoding); - -#ifdef __cplusplus -} -#endif - -#endif /* LIBPQ_FE_H */ diff --git a/builddir/postgresql-9.5.3/include/pg_config_ext.h b/builddir/postgresql-9.5.3/include/pg_config_ext.h deleted file mode 100644 index 65bbb5d..0000000 --- a/builddir/postgresql-9.5.3/include/pg_config_ext.h +++ /dev/null @@ -1,7 +0,0 @@ -/* - * src/include/pg_config_ext.h.win32. This is generated manually, not by - * autoheader, since we want to limit which symbols get defined here. - */ - -/* Define to the name of a signed 64-bit integer type. */ -#define PG_INT64_TYPE long long int diff --git a/builddir/postgresql-9.5.3/include/postgres_ext.h b/builddir/postgresql-9.5.3/include/postgres_ext.h deleted file mode 100644 index 74c344c..0000000 --- a/builddir/postgresql-9.5.3/include/postgres_ext.h +++ /dev/null @@ -1,69 +0,0 @@ -/*------------------------------------------------------------------------- - * - * postgres_ext.h - * - * This file contains declarations of things that are visible everywhere - * in PostgreSQL *and* are visible to clients of frontend interface libraries. - * For example, the Oid type is part of the API of libpq and other libraries. - * - * Declarations which are specific to a particular interface should - * go in the header file for that interface (such as libpq-fe.h). This - * file is only for fundamental Postgres declarations. - * - * User-written C functions don't count as "external to Postgres." - * Those function much as local modifications to the backend itself, and - * use header files that are otherwise internal to Postgres to interface - * with the backend. - * - * src/include/postgres_ext.h - * - *------------------------------------------------------------------------- - */ - -#ifndef POSTGRES_EXT_H -#define POSTGRES_EXT_H - -#include "pg_config_ext.h" - -/* - * Object ID is a fundamental type in Postgres. - */ -typedef unsigned int Oid; - -#ifdef __cplusplus -#define InvalidOid (Oid(0)) -#else -#define InvalidOid ((Oid) 0) -#endif - -#define OID_MAX UINT_MAX -/* you will need to include <limits.h> to use the above #define */ - -/* Define a signed 64-bit integer type for use in client API declarations. */ -typedef PG_INT64_TYPE pg_int64; - - -/* - * Identifiers of error message fields. Kept here to keep common - * between frontend and backend, and also to export them to libpq - * applications. - */ -#define PG_DIAG_SEVERITY 'S' -#define PG_DIAG_SQLSTATE 'C' -#define PG_DIAG_MESSAGE_PRIMARY 'M' -#define PG_DIAG_MESSAGE_DETAIL 'D' -#define PG_DIAG_MESSAGE_HINT 'H' -#define PG_DIAG_STATEMENT_POSITION 'P' -#define PG_DIAG_INTERNAL_POSITION 'p' -#define PG_DIAG_INTERNAL_QUERY 'q' -#define PG_DIAG_CONTEXT 'W' -#define PG_DIAG_SCHEMA_NAME 's' -#define PG_DIAG_TABLE_NAME 't' -#define PG_DIAG_COLUMN_NAME 'c' -#define PG_DIAG_DATATYPE_NAME 'd' -#define PG_DIAG_CONSTRAINT_NAME 'n' -#define PG_DIAG_SOURCE_FILE 'F' -#define PG_DIAG_SOURCE_LINE 'L' -#define PG_DIAG_SOURCE_FUNCTION 'R' - -#endif /* POSTGRES_EXT_H */ diff --git a/builddir/spatialindex-1.8.5/COPYING b/builddir/spatialindex-1.8.5/COPYING deleted file mode 100644 index 9fae459..0000000 --- a/builddir/spatialindex-1.8.5/COPYING +++ /dev/null @@ -1,48 +0,0 @@ -Licensing History ------------------------------------------------------------------------------- - - -.. note:: - libspatialindex changed from a `LGPL`_ to a `MIT`_ license as of the 1.8.0 - release. For most situations, this should have no impact on the library's - use, but it should open it up for usage in situations that otherwise might - have been problematic. Versions of libspatialindex prior to 1.8.0 were - licensed LGPL 2.0, with the license description on this file. The codebase - has been been updated, with licensing information replaced in headers and - source files, to use the MIT license as of the 1.8.0+ release. - - This change was made to support the inclusion of software depending on - libspatialindex in static linking-only environments such as embedded systems - and Apple's iOS. libspatialindex versions prior to 1.8.0 will continue to - live on as LGPL software, and developers can continue to contribute to them - under terms of that license, but the main development effort, and ongoing - maintenance, releases, and bug applications, will move forward using the - new MIT license at http://github.com/libspatialindex/libspatialindex - -.. _`LGPL`: http://opensource.org/licenses/lgpl-2.1.php -.. _`MIT`: http://opensource.org/licenses/MIT - - - -License (MIT) ------------------------------------------------------------------------------- - -:: - - 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, sublicense, - 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 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 NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS 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. diff --git a/builddir/spatialindex-1.8.5/bin/spatialindex-32.dll b/builddir/spatialindex-1.8.5/bin/spatialindex-32.dll deleted file mode 100644 index fea6d71..0000000 Binary files a/builddir/spatialindex-1.8.5/bin/spatialindex-32.dll and /dev/null differ diff --git a/builddir/spatialindex-1.8.5/bin/spatialindex-32.exp b/builddir/spatialindex-1.8.5/bin/spatialindex-32.exp deleted file mode 100644 index 47af58f..0000000 Binary files a/builddir/spatialindex-1.8.5/bin/spatialindex-32.exp and /dev/null differ diff --git a/builddir/spatialindex-1.8.5/bin/spatialindex-32.lib b/builddir/spatialindex-1.8.5/bin/spatialindex-32.lib deleted file mode 100644 index 97416c8..0000000 Binary files a/builddir/spatialindex-1.8.5/bin/spatialindex-32.lib and /dev/null differ diff --git a/builddir/spatialindex-1.8.5/bin/spatialindex_c-32.dll b/builddir/spatialindex-1.8.5/bin/spatialindex_c-32.dll deleted file mode 100644 index 726ddd2..0000000 Binary files a/builddir/spatialindex-1.8.5/bin/spatialindex_c-32.dll and /dev/null differ diff --git a/builddir/spatialindex-1.8.5/bin/spatialindex_c-32.exp b/builddir/spatialindex-1.8.5/bin/spatialindex_c-32.exp deleted file mode 100644 index d5e660c..0000000 Binary files a/builddir/spatialindex-1.8.5/bin/spatialindex_c-32.exp and /dev/null differ diff --git a/builddir/spatialindex-1.8.5/bin/spatialindex_c-32.lib b/builddir/spatialindex-1.8.5/bin/spatialindex_c-32.lib deleted file mode 100644 index 26ee5eb..0000000 Binary files a/builddir/spatialindex-1.8.5/bin/spatialindex_c-32.lib and /dev/null differ diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/LineSegment.h b/builddir/spatialindex-1.8.5/include/spatialindex/LineSegment.h deleted file mode 100644 index c10e798..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/LineSegment.h +++ /dev/null @@ -1,103 +0,0 @@ -/****************************************************************************** - * Project: libspatialindex - A C++ library for spatial indexing - * Author: Marios Hadjieleftheriou, mhadji@gmail.com - ****************************************************************************** - * Copyright (c) 2004, Marios Hadjieleftheriou - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -namespace SpatialIndex -{ - class SIDX_DLL LineSegment : public Tools::IObject, public virtual IShape - { - public: - LineSegment(); - LineSegment(const double* startPoint, const double* endPoint, uint32_t dimension); - LineSegment(const Point& startPoint, const Point& endPoint); - LineSegment(const LineSegment& l); - virtual ~LineSegment(); - - virtual LineSegment& operator=(const LineSegment& p); - virtual bool operator==(const LineSegment& p) const; - - // - // IObject interface - // - virtual LineSegment* clone(); - - // - // ISerializable interface - // - virtual uint32_t getByteArraySize(); - virtual void loadFromByteArray(const byte* data); - virtual void storeToByteArray(byte** data, uint32_t& length); - - // - // IShape interface - // - virtual bool intersectsShape(const IShape& in) const; - virtual bool containsShape(const IShape& in) const; - virtual bool touchesShape(const IShape& in) const; - virtual void getCenter(Point& out) const; - virtual uint32_t getDimension() const; - virtual void getMBR(Region& out) const; - virtual double getArea() const; - virtual double getMinimumDistance(const IShape& in) const; - - virtual bool intersectsLineSegment(const LineSegment& l) const; - virtual bool intersectsRegion(const Region& p) const; - virtual double getMinimumDistance(const Point& p) const; - //virtual double getMinimumDistance(const Region& r) const; - virtual double getRelativeMinimumDistance(const Point& p) const; - virtual double getRelativeMaximumDistance(const Region& r) const; - virtual double getAngleOfPerpendicularRay(); - - virtual void makeInfinite(uint32_t dimension); - virtual void makeDimension(uint32_t dimension); - - public: - uint32_t m_dimension; - double* m_pStartPoint; - double* m_pEndPoint; - - friend class Region; - friend class Point; - friend SIDX_DLL std::ostream& operator<<(std::ostream& os, const LineSegment& pt); - - protected: - - //some helpers for intersects methods - static double doubleAreaTriangle(const Point& a, const Point& b, const Point& c); - static bool leftOf(const Point& a, const Point& b, const Point& c); - static bool collinear(const Point& a, const Point& b, const Point& c); - static bool between(const Point& a, const Point& b, const Point& c); - static bool between(double a, double b, double c); - static bool intersectsProper(const Point& a, const Point& b, const Point& c, const Point& d); - static bool intersects(const Point& a, const Point& b, const Point& c, const Point& d); - - }; // LineSegment - - SIDX_DLL std::ostream& operator<<(std::ostream& os, const LineSegment& pt); -} - diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/MVRTree.h b/builddir/spatialindex-1.8.5/include/spatialindex/MVRTree.h deleted file mode 100644 index 770efd1..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/MVRTree.h +++ /dev/null @@ -1,89 +0,0 @@ -/****************************************************************************** - * Project: libspatialindex - A C++ library for spatial indexing - * Author: Marios Hadjieleftheriou, mhadji@gmail.com - ****************************************************************************** - * Copyright (c) 2004, Marios Hadjieleftheriou - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -namespace SpatialIndex -{ - namespace MVRTree - { - SIDX_DLL enum MVRTreeVariant - { - RV_LINEAR = 0x0, - RV_QUADRATIC, - RV_RSTAR - }; - - SIDX_DLL enum PersistenObjectIdentifier - { - PersistentIndex = 0x1, - PersistentLeaf = 0x2 - }; - - SIDX_DLL enum RangeQueryType - { - ContainmentQuery = 0x1, - IntersectionQuery = 0x2 - }; - - class SIDX_DLL Data : public IData, public Tools::ISerializable - { - public: - Data(uint32_t len, byte* pData, TimeRegion& r, id_type id); - virtual ~Data(); - - virtual Data* clone(); - virtual id_type getIdentifier() const; - virtual void getShape(IShape** out) const; - virtual void getData(uint32_t& len, byte** data) const; - virtual uint32_t getByteArraySize(); - virtual void loadFromByteArray(const byte* data); - virtual void storeToByteArray(byte** data, uint32_t& len); - - id_type m_id; - TimeRegion m_region; - byte* m_pData; - uint32_t m_dataLength; - }; // Data - - SIDX_DLL ISpatialIndex* returnMVRTree(IStorageManager& ind, Tools::PropertySet& in); - SIDX_DLL ISpatialIndex* createNewMVRTree( - IStorageManager& in, - double fillFactor, - uint32_t indexCapacity, - uint32_t leafCapacity, - uint32_t dimension, - MVRTreeVariant rv, - id_type& out_indexIdentifier - ); - SIDX_DLL ISpatialIndex* loadMVRTree( - IStorageManager& in, - id_type indexIdentifier - ); - } -} - diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/MovingPoint.h b/builddir/spatialindex-1.8.5/include/spatialindex/MovingPoint.h deleted file mode 100644 index 5323d2b..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/MovingPoint.h +++ /dev/null @@ -1,85 +0,0 @@ -/****************************************************************************** - * Project: libspatialindex - A C++ library for spatial indexing - * Author: Marios Hadjieleftheriou, mhadji@gmail.com - ****************************************************************************** - * Copyright (c) 2003, Marios Hadjieleftheriou - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -namespace SpatialIndex -{ - class SIDX_DLL MovingPoint : public TimePoint, public IEvolvingShape - { - public: - MovingPoint(); - MovingPoint(const double* pCoords, const double* pVCoords, const Tools::IInterval& ti, uint32_t dimension); - MovingPoint(const double* pCoords, const double* pVCoords, double tStart, double tEnd, uint32_t dimension); - MovingPoint(const Point& p, const Point& vp, const Tools::IInterval& ti); - MovingPoint(const Point& p, const Point& vp, double tStart, double tEnd); - MovingPoint(const MovingPoint& p); - virtual ~MovingPoint(); - - virtual MovingPoint& operator=(const MovingPoint& p); - virtual bool operator==(const MovingPoint& p) const; - - virtual double getCoord(uint32_t index, double t) const; - virtual double getProjectedCoord(uint32_t index, double t) const; - virtual double getVCoord(uint32_t index) const; - virtual void getPointAtTime(double t, Point& out) const; - - // - // IObject interface - // - virtual MovingPoint* clone(); - - // - // ISerializable interface - // - virtual uint32_t getByteArraySize(); - virtual void loadFromByteArray(const byte* data); - virtual void storeToByteArray(byte** data, uint32_t& len); - - // - // IEvolvingShape interface - // - virtual void getVMBR(Region& out) const; - virtual void getMBRAtTime(double t, Region& out) const; - - virtual void makeInfinite(uint32_t dimension); - virtual void makeDimension(uint32_t dimension); - - private: - void initialize( - const double* pCoords, const double* pVCoords, - double tStart, double tEnd, uint32_t dimension); - - public: - double* m_pVCoords; - - friend SIDX_DLL std::ostream& operator<<(std::ostream& os, const MovingPoint& pt); - }; // MovingPoint - - SIDX_DLL std::ostream& operator<<(std::ostream& os, const MovingPoint& pt); -} - diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/MovingRegion.h b/builddir/spatialindex-1.8.5/include/spatialindex/MovingRegion.h deleted file mode 100644 index 2e21954..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/MovingRegion.h +++ /dev/null @@ -1,170 +0,0 @@ -/****************************************************************************** - * Project: libspatialindex - A C++ library for spatial indexing - * Author: Marios Hadjieleftheriou, mhadji@gmail.com - ****************************************************************************** - * Copyright (c) 2003, Marios Hadjieleftheriou - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -namespace SpatialIndex -{ - class SIDX_DLL MovingRegion : public TimeRegion, public IEvolvingShape - { - using Region::getLow; - using Region::getHigh; - using TimeRegion::intersectsRegionInTime; - using TimeRegion::containsRegionInTime; - using TimeRegion::combineRegionInTime; - using TimeRegion::getCombinedRegionInTime; - using TimeRegion::containsPointInTime; - - public: - MovingRegion(); - MovingRegion( - const double* pLow, const double* pHigh, - const double* pVLow, const double* pVHigh, - const Tools::IInterval& ti, uint32_t dimension); - MovingRegion( - const double* pLow, const double* pHigh, - const double* pVLow, const double* pVHigh, - double tStart, double tEnd, uint32_t dimension); - MovingRegion( - const Point& low, const Point& high, - const Point& vlow, const Point& vhigh, - const Tools::IInterval& ti); - MovingRegion( - const Point& low, const Point& high, - const Point& vlow, const Point& vhigh, - double tStart, double tEnd); - MovingRegion(const Region& mbr, const Region& vbr, const Tools::IInterval& ivI); - MovingRegion(const Region& mbr, const Region& vbr, double tStart, double tEnd); - MovingRegion(const MovingPoint& low, const MovingPoint& high); - MovingRegion(const MovingRegion& in); - virtual ~MovingRegion(); - - virtual MovingRegion& operator=(const MovingRegion& r); - virtual bool operator==(const MovingRegion&) const; - - bool isShrinking() const; - - virtual double getLow(uint32_t index, double t) const; - virtual double getHigh(uint32_t index, double t) const; - virtual double getExtrapolatedLow(uint32_t index, double t) const; - virtual double getExtrapolatedHigh(uint32_t index, double t) const; - virtual double getVLow(uint32_t index) const; - virtual double getVHigh(uint32_t index) const; - - virtual bool intersectsRegionInTime(const MovingRegion& r) const; - virtual bool intersectsRegionInTime(const MovingRegion& r, Tools::IInterval& out) const; - virtual bool intersectsRegionInTime(const Tools::IInterval& ivI, const MovingRegion& r, Tools::IInterval& ret) const; - virtual bool containsRegionInTime(const MovingRegion& r) const; - virtual bool containsRegionInTime(const Tools::IInterval& ivI, const MovingRegion& r) const; - virtual bool containsRegionAfterTime(double t, const MovingRegion& r) const; - - virtual double getProjectedSurfaceAreaInTime() const; - virtual double getProjectedSurfaceAreaInTime(const Tools::IInterval& ivI) const; - - virtual double getCenterDistanceInTime(const MovingRegion& r) const; - virtual double getCenterDistanceInTime(const Tools::IInterval& ivI, const MovingRegion& r) const; - - virtual bool intersectsRegionAtTime(double t, const MovingRegion& r) const; - virtual bool containsRegionAtTime(double t, const MovingRegion& r) const; - - virtual bool intersectsPointInTime(const MovingPoint& p) const; - virtual bool intersectsPointInTime(const MovingPoint& p, Tools::IInterval& out) const; - virtual bool intersectsPointInTime(const Tools::IInterval& ivI, const MovingPoint& p, Tools::IInterval& out) const; - virtual bool containsPointInTime(const MovingPoint& p) const; - virtual bool containsPointInTime(const Tools::IInterval& ivI, const MovingPoint& p) const; - - //virtual bool intersectsPointAtTime(double t, const MovingRegion& in) const; - //virtual bool containsPointAtTime(double t, const MovingRegion& in) const; - - virtual void combineRegionInTime(const MovingRegion& r); - virtual void combineRegionAfterTime(double t, const MovingRegion& r); - virtual void getCombinedRegionInTime(MovingRegion& out, const MovingRegion& in) const; - virtual void getCombinedRegionAfterTime(double t, MovingRegion& out, const MovingRegion& in) const; - - virtual double getIntersectingAreaInTime(const MovingRegion& r) const; - virtual double getIntersectingAreaInTime(const Tools::IInterval& ivI, const MovingRegion& r) const; - - // - // IObject interface - // - virtual MovingRegion* clone(); - - // - // ISerializable interface - // - virtual uint32_t getByteArraySize(); - virtual void loadFromByteArray(const byte* data); - virtual void storeToByteArray(byte** data, uint32_t& len); - - // - // IEvolvingShape interface - // - virtual void getVMBR(Region& out) const; - virtual void getMBRAtTime(double t, Region& out) const; - - // - // ITimeShape interface - // - virtual double getAreaInTime() const; - virtual double getAreaInTime(const Tools::IInterval& ivI) const; - virtual double getIntersectingAreaInTime(const ITimeShape& r) const; - virtual double getIntersectingAreaInTime(const Tools::IInterval& ivI, const ITimeShape& r) const; - - virtual void makeInfinite(uint32_t dimension); - virtual void makeDimension(uint32_t dimension); - - private: - void initialize( - const double* pLow, const double* pHigh, - const double* pVLow, const double* pVHigh, - double tStart, double tEnd, uint32_t dimension); - - public: - class CrossPoint - { - public: - double m_t; - uint32_t m_dimension; - uint32_t m_boundary; - const MovingRegion* m_to; - - struct ascending: public std::binary_function<CrossPoint&, CrossPoint&, bool> - { - bool operator()(const CrossPoint& __x, const CrossPoint& __y) const { return __x.m_t > __y.m_t; } - }; - }; // CrossPoint - - public: - double* m_pVLow; - double* m_pVHigh; - - friend SIDX_DLL std::ostream& operator<<(std::ostream& os, const MovingRegion& r); - }; // MovingRegion - - typedef Tools::PoolPointer<MovingRegion> MovingRegionPtr; - SIDX_DLL std::ostream& operator<<(std::ostream& os, const MovingRegion& r); -} diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/Point.h b/builddir/spatialindex-1.8.5/include/spatialindex/Point.h deleted file mode 100644 index bbfde20..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/Point.h +++ /dev/null @@ -1,87 +0,0 @@ -/****************************************************************************** - * Project: libspatialindex - A C++ library for spatial indexing - * Author: Marios Hadjieleftheriou, mhadji@gmail.com - ****************************************************************************** - * Copyright (c) 2004, Marios Hadjieleftheriou - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -#include "tools/Tools.h" - -namespace SpatialIndex -{ - class SIDX_DLL Point : public Tools::IObject, public virtual IShape - { - public: - Point(); - Point(const double* pCoords, uint32_t dimension); - Point(const Point& p); - virtual ~Point(); - - virtual Point& operator=(const Point& p); - virtual bool operator==(const Point& p) const; - - // - // IObject interface - // - virtual Point* clone(); - - // - // ISerializable interface - // - virtual uint32_t getByteArraySize(); - virtual void loadFromByteArray(const byte* data); - virtual void storeToByteArray(byte** data, uint32_t& length); - - // - // IShape interface - // - virtual bool intersectsShape(const IShape& in) const; - virtual bool containsShape(const IShape& in) const; - virtual bool touchesShape(const IShape& in) const; - virtual void getCenter(Point& out) const; - virtual uint32_t getDimension() const; - virtual void getMBR(Region& out) const; - virtual double getArea() const; - virtual double getMinimumDistance(const IShape& in) const; - - virtual double getMinimumDistance(const Point& p) const; - - virtual double getCoordinate(uint32_t index) const; - - virtual void makeInfinite(uint32_t dimension); - virtual void makeDimension(uint32_t dimension); - - public: - uint32_t m_dimension; - double* m_pCoords; - - friend class Region; - friend SIDX_DLL std::ostream& operator<<(std::ostream& os, const Point& pt); - }; // Point - - typedef Tools::PoolPointer<Point> PointPtr; - - SIDX_DLL std::ostream& operator<<(std::ostream& os, const Point& pt); -} diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/RTree.h b/builddir/spatialindex-1.8.5/include/spatialindex/RTree.h deleted file mode 100644 index 5aed0c5..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/RTree.h +++ /dev/null @@ -1,108 +0,0 @@ -/****************************************************************************** - * Project: libspatialindex - A C++ library for spatial indexing - * Author: Marios Hadjieleftheriou, mhadji@gmail.com - ****************************************************************************** - * Copyright (c) 2004, Marios Hadjieleftheriou - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -namespace SpatialIndex -{ - namespace RTree - { - SIDX_DLL enum RTreeVariant - { - RV_LINEAR = 0x0, - RV_QUADRATIC, - RV_RSTAR - }; - - SIDX_DLL enum BulkLoadMethod - { - BLM_STR = 0x0 - }; - - SIDX_DLL enum PersistenObjectIdentifier - { - PersistentIndex = 0x1, - PersistentLeaf = 0x2 - }; - - SIDX_DLL enum RangeQueryType - { - ContainmentQuery = 0x1, - IntersectionQuery = 0x2 - }; - - class SIDX_DLL Data : public IData, public Tools::ISerializable - { - public: - Data(uint32_t len, byte* pData, Region& r, id_type id); - virtual ~Data(); - - virtual Data* clone(); - virtual id_type getIdentifier() const; - virtual void getShape(IShape** out) const; - virtual void getData(uint32_t& len, byte** data) const; - virtual uint32_t getByteArraySize(); - virtual void loadFromByteArray(const byte* data); - virtual void storeToByteArray(byte** data, uint32_t& len); - - id_type m_id; - Region m_region; - byte* m_pData; - uint32_t m_dataLength; - }; // Data - - SIDX_DLL ISpatialIndex* returnRTree(IStorageManager& ind, Tools::PropertySet& in); - SIDX_DLL ISpatialIndex* createNewRTree( - IStorageManager& sm, - double fillFactor, - uint32_t indexCapacity, - uint32_t leafCapacity, - uint32_t dimension, - RTreeVariant rv, - id_type& indexIdentifier - ); - SIDX_DLL ISpatialIndex* createAndBulkLoadNewRTree( - BulkLoadMethod m, - IDataStream& stream, - IStorageManager& sm, - double fillFactor, - uint32_t indexCapacity, - uint32_t leafCapacity, - uint32_t dimension, - RTreeVariant rv, - id_type& indexIdentifier - ); - SIDX_DLL ISpatialIndex* createAndBulkLoadNewRTree( - BulkLoadMethod m, - IDataStream& stream, - IStorageManager& sm, - Tools::PropertySet& ps, - id_type& indexIdentifier - ); - SIDX_DLL ISpatialIndex* loadRTree(IStorageManager& in, id_type indexIdentifier); - } -} diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/Region.h b/builddir/spatialindex-1.8.5/include/spatialindex/Region.h deleted file mode 100644 index 4cd459c..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/Region.h +++ /dev/null @@ -1,106 +0,0 @@ -/****************************************************************************** - * Project: libspatialindex - A C++ library for spatial indexing - * Author: Marios Hadjieleftheriou, mhadji@gmail.com - ****************************************************************************** - * Copyright (c) 2004, Marios Hadjieleftheriou - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -namespace SpatialIndex -{ - class SIDX_DLL Region : public Tools::IObject, public virtual IShape - { - public: - Region(); - Region(const double* pLow, const double* pHigh, uint32_t dimension); - Region(const Point& low, const Point& high); - Region(const Region& in); - virtual ~Region(); - - virtual Region& operator=(const Region& r); - virtual bool operator==(const Region&) const; - - // - // IObject interface - // - virtual Region* clone(); - - // - // ISerializable interface - // - virtual uint32_t getByteArraySize(); - virtual void loadFromByteArray(const byte* data); - virtual void storeToByteArray(byte** data, uint32_t& length); - - // - // IShape interface - // - virtual bool intersectsShape(const IShape& in) const; - virtual bool containsShape(const IShape& in) const; - virtual bool touchesShape(const IShape& in) const; - virtual void getCenter(Point& out) const; - virtual uint32_t getDimension() const; - virtual void getMBR(Region& out) const; - virtual double getArea() const; - virtual double getMinimumDistance(const IShape& in) const; - - virtual bool intersectsRegion(const Region& in) const; - virtual bool containsRegion(const Region& in) const; - virtual bool touchesRegion(const Region& in) const; - virtual double getMinimumDistance(const Region& in) const; - - virtual bool intersectsLineSegment(const LineSegment& in) const; - - virtual bool containsPoint(const Point& in) const; - virtual bool touchesPoint(const Point& in) const; - virtual double getMinimumDistance(const Point& in) const; - - virtual Region getIntersectingRegion(const Region& r) const; - virtual double getIntersectingArea(const Region& in) const; - virtual double getMargin() const; - - virtual void combineRegion(const Region& in); - virtual void combinePoint(const Point& in); - virtual void getCombinedRegion(Region& out, const Region& in) const; - - virtual double getLow(uint32_t index) const; - virtual double getHigh(uint32_t index) const; - - virtual void makeInfinite(uint32_t dimension); - virtual void makeDimension(uint32_t dimension); - - private: - void initialize(const double* pLow, const double* pHigh, uint32_t dimension); - - public: - uint32_t m_dimension; - double* m_pLow; - double* m_pHigh; - - friend SIDX_DLL std::ostream& operator<<(std::ostream& os, const Region& r); - }; // Region - - typedef Tools::PoolPointer<Region> RegionPtr; - SIDX_DLL std::ostream& operator<<(std::ostream& os, const Region& r); -} diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/SpatialIndex.h b/builddir/spatialindex-1.8.5/include/spatialindex/SpatialIndex.h deleted file mode 100644 index 5054ac4..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/SpatialIndex.h +++ /dev/null @@ -1,261 +0,0 @@ -/****************************************************************************** - * Project: libspatialindex - A C++ library for spatial indexing - * Author: Marios Hadjieleftheriou, mhadji@gmail.com - ****************************************************************************** - * Copyright (c) 2003, Marios Hadjieleftheriou - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -#include "tools/Tools.h" - -#ifndef M_PI_2 -#define M_PI_2 1.57079632679489661922 -#endif - -namespace SpatialIndex -{ - class Point; - class LineSegment; - class Region; - - - typedef int64_t id_type; - - SIDX_DLL enum CommandType - { - CT_NODEREAD = 0x0, - CT_NODEDELETE, - CT_NODEWRITE - }; - - class SIDX_DLL InvalidPageException : public Tools::Exception - { - public: - InvalidPageException(id_type id); - virtual ~InvalidPageException() {} - virtual std::string what(); - - private: - std::string m_error; - }; // InvalidPageException - - // - // Interfaces - // - - class SIDX_DLL IShape : public Tools::ISerializable - { - public: - virtual bool intersectsShape(const IShape& in) const = 0; - virtual bool containsShape(const IShape& in) const = 0; - virtual bool touchesShape(const IShape& in) const = 0; - virtual void getCenter(Point& out) const = 0; - virtual uint32_t getDimension() const = 0; - virtual void getMBR(Region& out) const = 0; - virtual double getArea() const = 0; - virtual double getMinimumDistance(const IShape& in) const = 0; - virtual ~IShape() {} - }; // IShape - - class SIDX_DLL ITimeShape : public Tools::IInterval - { - public: - virtual bool intersectsShapeInTime(const ITimeShape& in) const = 0; - virtual bool intersectsShapeInTime(const Tools::IInterval& ivI, const ITimeShape& in) const = 0; - virtual bool containsShapeInTime(const ITimeShape& in) const = 0; - virtual bool containsShapeInTime(const Tools::IInterval& ivI, const ITimeShape& in) const = 0; - virtual bool touchesShapeInTime(const ITimeShape& in) const = 0; - virtual bool touchesShapeInTime(const Tools::IInterval& ivI, const ITimeShape& in) const = 0; - virtual double getAreaInTime() const = 0; - virtual double getAreaInTime(const Tools::IInterval& ivI) const = 0; - virtual double getIntersectingAreaInTime(const ITimeShape& r) const = 0; - virtual double getIntersectingAreaInTime(const Tools::IInterval& ivI, const ITimeShape& r) const = 0; - virtual ~ITimeShape() {} - }; // ITimeShape - - class SIDX_DLL IEvolvingShape - { - public: - virtual void getVMBR(Region& out) const = 0; - virtual void getMBRAtTime(double t, Region& out) const = 0; - virtual ~IEvolvingShape() {} - }; // IEvolvingShape - - class SIDX_DLL IEntry : public Tools::IObject - { - public: - virtual id_type getIdentifier() const = 0; - virtual void getShape(IShape** out) const = 0; - virtual ~IEntry() {} - }; // IEntry - - class SIDX_DLL INode : public IEntry, public Tools::ISerializable - { - public: - virtual uint32_t getChildrenCount() const = 0; - virtual id_type getChildIdentifier(uint32_t index) const = 0; - virtual void getChildData(uint32_t index, uint32_t& len, byte** data) const = 0; - virtual void getChildShape(uint32_t index, IShape** out) const = 0; - virtual uint32_t getLevel() const = 0; - virtual bool isIndex() const = 0; - virtual bool isLeaf() const = 0; - virtual ~INode() {} - }; // INode - - class SIDX_DLL IData : public IEntry - { - public: - virtual void getData(uint32_t& len, byte** data) const = 0; - virtual ~IData() {} - }; // IData - - class SIDX_DLL IDataStream : public Tools::IObjectStream - { - public: - virtual IData* getNext() = 0; - virtual ~IDataStream() {} - }; // IDataStream - - class SIDX_DLL ICommand - { - public: - virtual void execute(const INode& in) = 0; - virtual ~ICommand() {} - }; // ICommand - - class SIDX_DLL INearestNeighborComparator - { - public: - virtual double getMinimumDistance(const IShape& query, const IShape& entry) = 0; - virtual double getMinimumDistance(const IShape& query, const IData& data) = 0; - virtual ~INearestNeighborComparator() {} - }; // INearestNeighborComparator - - class SIDX_DLL IStorageManager - { - public: - virtual void loadByteArray(const id_type id, uint32_t& len, byte** data) = 0; - virtual void storeByteArray(id_type& id, const uint32_t len, const byte* const data) = 0; - virtual void deleteByteArray(const id_type id) = 0; - virtual void flush() = 0; - virtual ~IStorageManager() {} - }; // IStorageManager - - class SIDX_DLL IVisitor - { - public: - virtual void visitNode(const INode& in) = 0; - virtual void visitData(const IData& in) = 0; - virtual void visitData(std::vector<const IData*>& v) = 0; - virtual ~IVisitor() {} - }; // IVisitor - - class SIDX_DLL IQueryStrategy - { - public: - virtual void getNextEntry(const IEntry& previouslyFetched, id_type& nextEntryToFetch, bool& bFetchNextEntry) = 0; - virtual ~IQueryStrategy() {} - }; // IQueryStrategy - - class SIDX_DLL IStatistics - { - public: - virtual uint64_t getReads() const = 0; - virtual uint64_t getWrites() const = 0; - virtual uint32_t getNumberOfNodes() const = 0; - virtual uint64_t getNumberOfData() const = 0; - virtual ~IStatistics() {} - }; // IStatistics - - class SIDX_DLL ISpatialIndex - { - public: - virtual void insertData(uint32_t len, const byte* pData, const IShape& shape, id_type shapeIdentifier) = 0; - virtual bool deleteData(const IShape& shape, id_type shapeIdentifier) = 0; - virtual void containsWhatQuery(const IShape& query, IVisitor& v) = 0; - virtual void intersectsWithQuery(const IShape& query, IVisitor& v) = 0; - virtual void pointLocationQuery(const Point& query, IVisitor& v) = 0; - virtual void nearestNeighborQuery(uint32_t k, const IShape& query, IVisitor& v, INearestNeighborComparator& nnc) = 0; - virtual void nearestNeighborQuery(uint32_t k, const IShape& query, IVisitor& v) = 0; - virtual void selfJoinQuery(const IShape& s, IVisitor& v) = 0; - virtual void queryStrategy(IQueryStrategy& qs) = 0; - virtual void getIndexProperties(Tools::PropertySet& out) const = 0; - virtual void addCommand(ICommand* in, CommandType ct) = 0; - virtual bool isIndexValid() = 0; - virtual void getStatistics(IStatistics** out) const = 0; - virtual ~ISpatialIndex() {} - - }; // ISpatialIndex - - namespace StorageManager - { - SIDX_DLL enum StorageManagerConstants - { - EmptyPage = -0x1, - NewPage = -0x1 - }; - - class SIDX_DLL IBuffer : public IStorageManager - { - public: - virtual uint64_t getHits() = 0; - virtual void clear() = 0; - virtual ~IBuffer() {} - }; // IBuffer - - SIDX_DLL IStorageManager* returnMemoryStorageManager(Tools::PropertySet& in); - SIDX_DLL IStorageManager* createNewMemoryStorageManager(); - - SIDX_DLL IStorageManager* returnDiskStorageManager(Tools::PropertySet& in); - SIDX_DLL IStorageManager* createNewDiskStorageManager(std::string& baseName, uint32_t pageSize); - SIDX_DLL IStorageManager* loadDiskStorageManager(std::string& baseName); - - SIDX_DLL IBuffer* returnRandomEvictionsBuffer(IStorageManager& ind, Tools::PropertySet& in); - SIDX_DLL IBuffer* createNewRandomEvictionsBuffer(IStorageManager& in, uint32_t capacity, bool bWriteThrough); - } - - // - // Global functions - // - SIDX_DLL std::ostream& operator<<(std::ostream&, const ISpatialIndex&); - SIDX_DLL std::ostream& operator<<(std::ostream&, const IStatistics&); -} - -#include "Point.h" -#include "Region.h" -#include "LineSegment.h" -#include "TimePoint.h" -#include "TimeRegion.h" -#include "MovingPoint.h" -#include "MovingRegion.h" -#include "RTree.h" -#include "MVRTree.h" -#include "TPRTree.h" -#include "Version.h" - - -// typedef SpatialIndex::Tools::PoolPointer<Region> RegionPtr; -// typedef SpatialIndex::Tools::PoolPointer<Point> PointPtr; -// typedef SpatialIndex::Tools::PoolPointer<TimeRegion> TimeRegionPtr; -// typedef SpatialIndex::Tools::PoolPointer<MovingRegion> MovingRegionPtr; diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/TPRTree.h b/builddir/spatialindex-1.8.5/include/spatialindex/TPRTree.h deleted file mode 100644 index 1f1b46b..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/TPRTree.h +++ /dev/null @@ -1,85 +0,0 @@ -/****************************************************************************** - * Project: libspatialindex - A C++ library for spatial indexing - * Author: Marios Hadjieleftheriou, mhadji@gmail.com - ****************************************************************************** - * Copyright (c) 2003, Marios Hadjieleftheriou - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - - -#pragma once - -namespace SpatialIndex -{ - namespace TPRTree - { - SIDX_DLL enum TPRTreeVariant - { - TPRV_RSTAR = 0x2 - }; - - SIDX_DLL enum PersistenObjectIdentifier - { - PersistentIndex = 0x1, - PersistentLeaf = 0x2 - }; - - SIDX_DLL enum RangeQueryType - { - ContainmentQuery = 0x1, - IntersectionQuery = 0x2 - }; - - class SIDX_DLL Data : public IData, public Tools::ISerializable - { - public: - Data(uint32_t len, byte* pData, MovingRegion& r, id_type id); - virtual ~Data(); - - virtual Data* clone(); - virtual id_type getIdentifier() const; - virtual void getShape(IShape** out) const; - virtual void getData(uint32_t& len, byte** data) const; - virtual uint32_t getByteArraySize(); - virtual void loadFromByteArray(const byte* data); - virtual void storeToByteArray(byte** data, uint32_t& len); - - id_type m_id; - MovingRegion m_region; - byte* m_pData; - uint32_t m_dataLength; - }; // Data - - SIDX_DLL ISpatialIndex* returnTPRTree(IStorageManager& ind, Tools::PropertySet& in); - SIDX_DLL ISpatialIndex* createNewTPRTree( - IStorageManager& sm, - double fillFactor, - uint32_t indexCapacity, - uint32_t leafCapacity, - uint32_t dimension, - TPRTreeVariant rv, - double horizon, - id_type& indexIdentifier - ); - SIDX_DLL ISpatialIndex* loadTPRTree(IStorageManager& in, id_type indexIdentifier); - } -} diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/TimePoint.h b/builddir/spatialindex-1.8.5/include/spatialindex/TimePoint.h deleted file mode 100644 index 8332251..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/TimePoint.h +++ /dev/null @@ -1,95 +0,0 @@ -/****************************************************************************** - * Project: libspatialindex - A C++ library for spatial indexing - * Author: Marios Hadjieleftheriou, mhadji@gmail.com - ****************************************************************************** - * Copyright (c) 2004, Marios Hadjieleftheriou - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -namespace SpatialIndex -{ - class SIDX_DLL TimePoint : public Point, public ITimeShape - { - public: - TimePoint(); - TimePoint(const double* pCoords, const Tools::IInterval& ti, uint32_t dimension); - TimePoint(const double* pCoords, double tStart, double tEnd, uint32_t dimension); - TimePoint(const Point& p, const Tools::IInterval& ti); - TimePoint(const Point& p, double tStart, double tEnd); - TimePoint(const TimePoint& p); - virtual ~TimePoint(); - - virtual TimePoint& operator=(const TimePoint& p); - virtual bool operator==(const TimePoint& p) const; - - // - // IObject interface - // - virtual TimePoint* clone(); - - // - // ISerializable interface - // - virtual uint32_t getByteArraySize(); - virtual void loadFromByteArray(const byte* data); - virtual void storeToByteArray(byte** data, uint32_t& len); - - // - // ITimeShape interface - // - virtual bool intersectsShapeInTime(const ITimeShape& in) const; - virtual bool intersectsShapeInTime(const Tools::IInterval& ivI, const ITimeShape& in) const; - virtual bool containsShapeInTime(const ITimeShape& in) const; - virtual bool containsShapeInTime(const Tools::IInterval& ivI, const ITimeShape& in) const; - virtual bool touchesShapeInTime(const ITimeShape& in) const; - virtual bool touchesShapeInTime(const Tools::IInterval& ivI, const ITimeShape& in) const; - virtual double getAreaInTime() const; - virtual double getAreaInTime(const Tools::IInterval& ivI) const; - virtual double getIntersectingAreaInTime(const ITimeShape& r) const; - virtual double getIntersectingAreaInTime(const Tools::IInterval& ivI, const ITimeShape& r) const; - - // - // IInterval interface - // - virtual Tools::IInterval& operator=(const Tools::IInterval&); - virtual double getLowerBound() const; - virtual double getUpperBound() const; - virtual void setBounds(double, double); - virtual bool intersectsInterval(const Tools::IInterval& ti) const; - virtual bool intersectsInterval(Tools::IntervalType t, const double start, const double end) const; - virtual bool containsInterval(const Tools::IInterval& ti) const; - virtual Tools::IntervalType getIntervalType() const; - - virtual void makeInfinite(uint32_t dimension); - virtual void makeDimension(uint32_t dimension); - - public: - double m_startTime; - double m_endTime; - - friend SIDX_DLL std::ostream& operator<<(std::ostream& os, const TimePoint& pt); - }; // TimePoint - - SIDX_DLL std::ostream& operator<<(std::ostream& os, const TimePoint& pt); -} diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/TimeRegion.h b/builddir/spatialindex-1.8.5/include/spatialindex/TimeRegion.h deleted file mode 100644 index 588b255..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/TimeRegion.h +++ /dev/null @@ -1,109 +0,0 @@ -/****************************************************************************** - * Project: libspatialindex - A C++ library for spatial indexing - * Author: Marios Hadjieleftheriou, mhadji@gmail.com - ****************************************************************************** - * Copyright (c) 2003, Marios Hadjieleftheriou - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -namespace SpatialIndex -{ - class SIDX_DLL TimeRegion : public Region, public ITimeShape - { - public: - TimeRegion(); - TimeRegion(const double* pLow, const double* pHigh, const Tools::IInterval& ti, uint32_t dimension); - TimeRegion(const double* pLow, const double* pHigh, double tStart, double tEnd, uint32_t dimension); - TimeRegion(const Point& low, const Point& high, const Tools::IInterval& ti); - TimeRegion(const Point& low, const Point& high, double tStart, double tEnd); - TimeRegion(const Region& in, const Tools::IInterval& ti); - TimeRegion(const Region& in, double tStart, double tEnd); - TimeRegion(const TimePoint& low, const TimePoint& high); - TimeRegion(const TimeRegion& in); - virtual ~TimeRegion(); - - virtual TimeRegion& operator=(const TimeRegion& r); - virtual bool operator==(const TimeRegion&) const; - - virtual bool intersectsRegionInTime(const TimeRegion& in) const; - virtual bool containsRegionInTime(const TimeRegion& in) const; - virtual bool touchesRegionInTime(const TimeRegion& in) const; - - virtual bool containsPointInTime(const TimePoint& in) const; - virtual bool touchesPointInTime(const TimePoint& in) const; - - virtual void combineRegionInTime(const TimeRegion& in); - virtual void getCombinedRegionInTime(TimeRegion& out, const TimeRegion& in) const; - - // - // IObject interface - // - virtual TimeRegion* clone(); - - // - // ISerializable interface - // - virtual uint32_t getByteArraySize(); - virtual void loadFromByteArray(const byte* data); - virtual void storeToByteArray(byte** data, uint32_t& len); - - // - // ITimeShape interface - // - virtual bool intersectsShapeInTime(const ITimeShape& in) const; - virtual bool intersectsShapeInTime(const Tools::IInterval& ivI, const ITimeShape& in) const; - virtual bool containsShapeInTime(const ITimeShape& in) const; - virtual bool containsShapeInTime(const Tools::IInterval& ivI, const ITimeShape& in) const; - virtual bool touchesShapeInTime(const ITimeShape& in) const; - virtual bool touchesShapeInTime(const Tools::IInterval& ivI, const ITimeShape& in) const; - virtual double getAreaInTime() const; - virtual double getAreaInTime(const Tools::IInterval& ivI) const; - virtual double getIntersectingAreaInTime(const ITimeShape& r) const; - virtual double getIntersectingAreaInTime(const Tools::IInterval& ivI, const ITimeShape& r) const; - - // - // IInterval interface - // - virtual Tools::IInterval& operator=(const Tools::IInterval&); - virtual double getLowerBound() const; - virtual double getUpperBound() const; - virtual void setBounds(double, double); - virtual bool intersectsInterval(const Tools::IInterval& ti) const; - virtual bool intersectsInterval(Tools::IntervalType t, const double start, const double end) const; - virtual bool containsInterval(const Tools::IInterval& ti) const; - virtual Tools::IntervalType getIntervalType() const; - - virtual void makeInfinite(uint32_t dimension); - virtual void makeDimension(uint32_t dimension); - - public: - double m_startTime; - double m_endTime; - - friend SIDX_DLL std::ostream& operator<<(std::ostream& os, const TimeRegion& r); - }; // TimeRegion - - typedef Tools::PoolPointer<TimeRegion> TimeRegionPtr; - SIDX_DLL std::ostream& operator<<(std::ostream& os, const TimeRegion& r); -} diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/Version.h b/builddir/spatialindex-1.8.5/include/spatialindex/Version.h deleted file mode 100644 index b937e65..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/Version.h +++ /dev/null @@ -1,48 +0,0 @@ -/****************************************************************************** - * Project: libspatialindex - A C++ library for spatial indexing - * Author: Marios Hadjieleftheriou, mhadji@gmail.com - ****************************************************************************** - * Copyright (c) 2003, Marios Hadjieleftheriou - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -#ifndef SIDX_VERSION_MAJOR -#define SIDX_VERSION_MAJOR 1 -#define SIDX_VERSION_MINOR 8 -#define SIDX_VERSION_REV 5 -#define SIDX_VERSION_BUILD 0 -#endif - -#ifndef SIDX_VERSION_NUM -#define SIDX_VERSION_NUM (SIDX_VERSION_MAJOR*1000+SIDX_VERSION_MINOR*100+SIDX_VERSION_REV*10+SIDX_VERSION_BUILD) -#endif - -#ifndef SIDX_RELEASE_DATE -#define SIDX_RELEASE_DATE 20141101 -#endif - -#ifndef SIDX_RELEASE_NAME -#define SIDX_RELEASE_NAME "1.8.5" -#endif - diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/capi/BoundsQuery.h b/builddir/spatialindex-1.8.5/include/spatialindex/capi/BoundsQuery.h deleted file mode 100644 index 79fdcb8..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/capi/BoundsQuery.h +++ /dev/null @@ -1,48 +0,0 @@ -/****************************************************************************** - * Project: libsidx - A C API wrapper around libspatialindex - * Purpose: C++ object declarations to implement the bounds query. - * Author: Howard Butler, hobu.inc@gmail.com - ****************************************************************************** - * Copyright (c) 2009, Howard Butler - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -#include "sidx_export.h" - -class SIDX_DLL BoundsQuery : public SpatialIndex::IQueryStrategy -{ -private: - SpatialIndex::Region* m_bounds; - -public: - - BoundsQuery(); - ~BoundsQuery() { if (m_bounds != 0) delete m_bounds; } - void getNextEntry( const SpatialIndex::IEntry& entry, - SpatialIndex::id_type& nextEntry, - bool& hasNext); - - SpatialIndex::Region* GetBounds() const { return m_bounds; } -}; - diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/capi/CountVisitor.h b/builddir/spatialindex-1.8.5/include/spatialindex/capi/CountVisitor.h deleted file mode 100644 index eaaee8d..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/capi/CountVisitor.h +++ /dev/null @@ -1,48 +0,0 @@ -/****************************************************************************** - * Project: libsidx - A C API wrapper around libspatialindex - * Purpose: C++ objects to implement the count visitor. - * Author: Leonard NorrgÃ¥rd, leonard.norrgard@refactor.fi - ****************************************************************************** - * Copyright (c) 2010, Leonard NorrgÃ¥rd - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -#include "sidx_export.h" - -class SIDX_DLL CountVisitor : public SpatialIndex::IVisitor -{ -private: - uint64_t nResults; - -public: - - CountVisitor(); - ~CountVisitor(); - - uint64_t GetResultCount() const { return nResults; } - - void visitNode(const SpatialIndex::INode& n); - void visitData(const SpatialIndex::IData& d); - void visitData(std::vector<const SpatialIndex::IData*>& v); -}; diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/capi/CustomStorage.h b/builddir/spatialindex-1.8.5/include/spatialindex/capi/CustomStorage.h deleted file mode 100644 index e54d12a..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/capi/CustomStorage.h +++ /dev/null @@ -1,84 +0,0 @@ -/****************************************************************************** - * Project: libsidx - A C API wrapper around libspatialindex - * Purpose: C++ object declarations to implement the custom storage manager. - * Author: Matthias (nitro), nitro@dr-code.org - ****************************************************************************** - * Copyright (c) 2010, Matthias (nitro) - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -#include "sidx_export.h" - -namespace SpatialIndex -{ - namespace StorageManager - { - struct SIDX_DLL CustomStorageManagerCallbacks - { - CustomStorageManagerCallbacks() - : context(0) - , createCallback(0) - , destroyCallback(0) - , loadByteArrayCallback(0) - , storeByteArrayCallback(0) - , deleteByteArrayCallback(0) - {} - - void* context; - void (*createCallback)( const void* context, int* errorCode ); - void (*destroyCallback)( const void* context, int* errorCode ); - void (*flushCallback)( const void* context, int* errorCode ); - void (*loadByteArrayCallback)( const void* context, const id_type page, uint32_t* len, byte** data, int* errorCode ); - void (*storeByteArrayCallback)( const void* context, id_type* page, const uint32_t len, const byte* const data, int* errorCode ); - void (*deleteByteArrayCallback)( const void* context, const id_type page, int* errorCode ); - }; - - class SIDX_DLL CustomStorageManager : public SpatialIndex::IStorageManager - { - public: - // I'd like this to be an enum, but casting between enums and ints is not nice - static const int NoError = 0; - static const int InvalidPageError = 1; - static const int IllegalStateError = 2; - - CustomStorageManager(Tools::PropertySet&); - - virtual ~CustomStorageManager(); - - virtual void flush(); - virtual void loadByteArray(const id_type page, uint32_t& len, byte** data); - virtual void storeByteArray(id_type& page, const uint32_t len, const byte* const data); - virtual void deleteByteArray(const id_type page); - - private: - CustomStorageManagerCallbacks callbacks; - - inline void processErrorCode(int errorCode, const id_type page); - }; // CustomStorageManager - - // factory function - IStorageManager* returnCustomStorageManager(Tools::PropertySet& in); - } -} - diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/capi/DataStream.h b/builddir/spatialindex-1.8.5/include/spatialindex/capi/DataStream.h deleted file mode 100644 index f1ab0f2..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/capi/DataStream.h +++ /dev/null @@ -1,56 +0,0 @@ -/****************************************************************************** - * Project: libsidx - A C API wrapper around libspatialindex - * Purpose: Declarations to support stream loading via C API - * Author: Howard Butler, hobu.inc@gmail.com - ****************************************************************************** - * Copyright (c) 2009, Howard Butler - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -#include "sidx_export.h" - -class SIDX_DLL DataStream : public SpatialIndex::IDataStream -{ -public: - DataStream(int (*readNext)(SpatialIndex::id_type* id, double **pMin, double **pMax, uint32_t *nDimension, const uint8_t **pData, uint32_t *nDataLength)); - ~DataStream(); - - SpatialIndex::IData* getNext(); - bool hasNext(); - - uint32_t size(); - void rewind(); - -protected: - SpatialIndex::RTree::Data* m_pNext; - SpatialIndex::id_type m_id; - -private: - int (*iterfunct)(SpatialIndex::id_type *id, double **pMin, double **pMax, uint32_t *nDimension, const uint8_t **pData, uint32_t *nDataLength); - - bool readData(); - bool m_bDoneReading; - -}; - diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/capi/Error.h b/builddir/spatialindex-1.8.5/include/spatialindex/capi/Error.h deleted file mode 100644 index e8cc647..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/capi/Error.h +++ /dev/null @@ -1,54 +0,0 @@ -/****************************************************************************** - * Project: libsidx - A C API wrapper around libspatialindex - * Purpose: C++ object declarations to implement the error object. - * Author: Howard Butler, hobu.inc@gmail.com - ****************************************************************************** - * Copyright (c) 2009, Howard Butler - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -#include "sidx_export.h" - -class SIDX_DLL Error -{ -public: - - Error(int code, std::string const& message, std::string const& method); - - /// Copy constructor. - Error(Error const& other); - - /// Assignment operator. - Error& operator=(Error const& rhs); - - int GetCode() const { return m_code; } - const char* GetMessage() const { return m_message.c_str(); } - const char* GetMethod() const { return m_method.c_str(); } - -private: - - int m_code; - std::string m_message; - std::string m_method; -}; diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/capi/IdVisitor.h b/builddir/spatialindex-1.8.5/include/spatialindex/capi/IdVisitor.h deleted file mode 100644 index 9596805..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/capi/IdVisitor.h +++ /dev/null @@ -1,50 +0,0 @@ -/****************************************************************************** - * Project: libsidx - A C API wrapper around libspatialindex - * Purpose: C++ object declarations to implement a query ids only. - * Author: Howard Butler, hobu.inc@gmail.com - ****************************************************************************** - * Copyright (c) 2009, Howard Butler - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -#include "sidx_export.h" - -class SIDX_DLL IdVisitor : public SpatialIndex::IVisitor -{ -private: - std::vector<uint64_t> m_vector; - uint64_t nResults; - -public: - - IdVisitor(); - ~IdVisitor(); - - uint64_t GetResultCount() const { return nResults; } - std::vector<uint64_t>& GetResults() { return m_vector; } - - void visitNode(const SpatialIndex::INode& n); - void visitData(const SpatialIndex::IData& d); - void visitData(std::vector<const SpatialIndex::IData*>& v); -}; diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/capi/Index.h b/builddir/spatialindex-1.8.5/include/spatialindex/capi/Index.h deleted file mode 100644 index 879ec6e..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/capi/Index.h +++ /dev/null @@ -1,81 +0,0 @@ -/****************************************************************************** - * Project: libsidx - A C API wrapper around libspatialindex - * Purpose: C++ object declarations to implement the wrapper. - * Author: Howard Butler, hobu.inc@gmail.com - ****************************************************************************** - * Copyright (c) 2009, Howard Butler - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -#include "sidx_export.h" - -class SIDX_DLL Index -{ - -public: - Index(const Tools::PropertySet& poProperties); - Index(const Tools::PropertySet& poProperties, int (*readNext)(SpatialIndex::id_type *id, double **pMin, double **pMax, uint32_t *nDimension, const uint8_t **pData, uint32_t *nDataLength)); - ~Index(); - - const Tools::PropertySet GetProperties() { index().getIndexProperties(m_properties); return m_properties;} - - bool insertFeature(uint64_t id, double *min, double *max); - - RTIndexType GetIndexType(); - void SetIndexType(RTIndexType v); - - RTStorageType GetIndexStorage(); - void SetIndexStorage(RTStorageType v); - - RTIndexVariant GetIndexVariant(); - void SetIndexVariant(RTStorageType v); - - int64_t GetResultSetOffset(); - void SetResultSetOffset(int64_t v); - - int64_t GetResultSetLimit(); - void SetResultSetLimit(int64_t v); - - void flush(); - - SpatialIndex::ISpatialIndex& index() {return *m_rtree;} - SpatialIndex::StorageManager::IBuffer& buffer() {return *m_buffer;} - -private: - - Index& operator=(const Index&); - Index(); - - void Initialize(); - SpatialIndex::IStorageManager* m_storage; - SpatialIndex::StorageManager::IBuffer* m_buffer; - SpatialIndex::ISpatialIndex* m_rtree; - - Tools::PropertySet m_properties; - - void Setup(); - SpatialIndex::IStorageManager* CreateStorage(); - SpatialIndex::StorageManager::IBuffer* CreateIndexBuffer(SpatialIndex::IStorageManager& storage); - SpatialIndex::ISpatialIndex* CreateIndex(); -}; diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/capi/LeafQuery.h b/builddir/spatialindex-1.8.5/include/spatialindex/capi/LeafQuery.h deleted file mode 100644 index 9f30a0f..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/capi/LeafQuery.h +++ /dev/null @@ -1,73 +0,0 @@ -/****************************************************************************** - * Project: libsidx - A C API wrapper around libspatialindex - * Purpose: C++ object declarations to implement a query of the index's leaves. - * Author: Howard Butler, hobu.inc@gmail.com - ****************************************************************************** - * Copyright (c) 2009, Howard Butler - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -#include "sidx_export.h" - -class LeafQueryResult; - -class SIDX_DLL LeafQuery : public SpatialIndex::IQueryStrategy -{ -private: - std::queue<SpatialIndex::id_type> m_ids; - std::vector<LeafQueryResult> m_results; -public: - - LeafQuery(); - ~LeafQuery() { } - void getNextEntry( const SpatialIndex::IEntry& entry, - SpatialIndex::id_type& nextEntry, - bool& hasNext); - std::vector<LeafQueryResult> const& GetResults() const {return m_results;} -}; - -class SIDX_DLL LeafQueryResult -{ -private: - std::vector<SpatialIndex::id_type> ids; - SpatialIndex::Region* bounds; - SpatialIndex::id_type m_id; - LeafQueryResult(); -public: - LeafQueryResult(SpatialIndex::id_type id) : bounds(0), m_id(id){} - ~LeafQueryResult() {if (bounds!=0) delete bounds;} - - /// Copy constructor. - LeafQueryResult(LeafQueryResult const& other); - - /// Assignment operator. - LeafQueryResult& operator=(LeafQueryResult const& rhs); - - std::vector<SpatialIndex::id_type> const& GetIDs() const; - void SetIDs(std::vector<SpatialIndex::id_type>& v); - const SpatialIndex::Region* GetBounds() const; - void SetBounds(const SpatialIndex::Region* b); - SpatialIndex::id_type getIdentifier() const {return m_id;} - void setIdentifier(uint32_t v) {m_id = v;} -}; diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/capi/ObjVisitor.h b/builddir/spatialindex-1.8.5/include/spatialindex/capi/ObjVisitor.h deleted file mode 100644 index 2c27d5a..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/capi/ObjVisitor.h +++ /dev/null @@ -1,51 +0,0 @@ -/****************************************************************************** - * Project: libsidx - A C API wrapper around libspatialindex - * Purpose: C++ object declarations to implement the object visitor. - * Author: Howard Butler, hobu.inc@gmail.com - ****************************************************************************** - * Copyright (c) 2009, Howard Butler - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -#include "sidx_export.h" - -class SIDX_DLL ObjVisitor : public SpatialIndex::IVisitor -{ -private: - std::vector<SpatialIndex::IData*> m_vector; - uint64_t nResults; - -public: - - ObjVisitor(); - ~ObjVisitor(); - - uint64_t GetResultCount() const { return nResults; } - std::vector<SpatialIndex::IData*>& GetResults() { return m_vector; } - - void visitNode(const SpatialIndex::INode& n); - void visitData(const SpatialIndex::IData& d); - void visitData(std::vector<const SpatialIndex::IData*>& v); -}; - diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/capi/Utility.h b/builddir/spatialindex-1.8.5/include/spatialindex/capi/Utility.h deleted file mode 100644 index 9962ceb..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/capi/Utility.h +++ /dev/null @@ -1,38 +0,0 @@ -/****************************************************************************** - * Project: libsidx - A C API wrapper around libspatialindex - * Purpose: C++ object declarations to implement utilities. - * Author: Howard Butler, hobu.inc@gmail.com - ****************************************************************************** - * Copyright (c) 2009, Howard Butler - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#include "ObjVisitor.h" -#include "IdVisitor.h" -#include "sidx_export.h" - -#pragma once - -SIDX_DLL Tools::PropertySet* GetDefaults(); - -SIDX_DLL void Page_ResultSet_Ids(IdVisitor& visitor, int64_t** ids, int64_t nStart, int64_t nResultLimit, uint64_t* nResults); -SIDX_DLL void Page_ResultSet_Obj(ObjVisitor& visitor, IndexItemH** items, int64_t nStart, int64_t nResultLimit, uint64_t* nResults); diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/capi/sidx_api.h b/builddir/spatialindex-1.8.5/include/spatialindex/capi/sidx_api.h deleted file mode 100644 index a912a9e..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/capi/sidx_api.h +++ /dev/null @@ -1,366 +0,0 @@ -/****************************************************************************** - * Project: libsidx - A C API wrapper around libspatialindex - * Purpose: C API. - * Author: Howard Butler, hobu.inc@gmail.com - ****************************************************************************** - * Copyright (c) 2009, Howard Butler - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#ifndef SIDX_API_H_INCLUDED -#define SIDX_API_H_INCLUDED - -#define SIDX_C_API 1 - -#include "sidx_config.h" - -IDX_C_START - -SIDX_DLL IndexH Index_Create(IndexPropertyH properties); - -SIDX_DLL IndexH Index_CreateWithStream( IndexPropertyH properties, - int (*readNext)(int64_t *id, double **pMin, double **pMax, uint32_t *nDimension, const uint8_t **pData, size_t *nDataLength) - ); - -SIDX_DLL void Index_Destroy(IndexH index); -SIDX_DLL IndexPropertyH Index_GetProperties(IndexH index); - -SIDX_DLL RTError Index_DeleteData( IndexH index, - int64_t id, - double* pdMin, - double* pdMax, - uint32_t nDimension); - -SIDX_C_DLL RTError Index_DeleteTPData( IndexH index, - int64_t id, - double* pdMin, - double* pdMax, - double* pdVMin, - double* pdVMax, - double tStart, - double tEnd, - uint32_t nDimension - ); - -SIDX_C_DLL RTError Index_DeleteMVRData( IndexH index, - int64_t id, - double* pdMin, - double* pdMax, - double tStart, - double tEnd, - uint32_t nDimension - ); - -SIDX_DLL RTError Index_InsertData( IndexH index, - int64_t id, - double* pdMin, - double* pdMax, - uint32_t nDimension, - const uint8_t* pData, - size_t nDataLength); - -SIDX_C_DLL RTError Index_InsertTPData( IndexH index, - int64_t id, - double* pdMin, - double* pdMax, - double* pdVMin, - double* pdVMax, - double tStart, - double tEnd, - uint32_t nDimension, - const uint8_t* pData, - size_t nDataLength); - -SIDX_C_DLL RTError Index_InsertMVRData( IndexH index, - int64_t id, - double* pdMin, - double* pdMax, - double tStart, - double tEnd, - uint32_t nDimension, - const uint8_t* pData, - size_t nDataLength); - -SIDX_DLL uint32_t Index_IsValid(IndexH index); - -SIDX_C_DLL RTError Index_TPIntersects_obj( IndexH index, - double* pdMin, - double* pdMax, - double* pdVMin, - double* pdVMax, - double tStart, - double tEnd, - uint32_t nDimension, - IndexItemH** items, - uint64_t* nResults); - -SIDX_C_DLL RTError Index_MVRIntersects_obj( IndexH index, - double* pdMin, - double* pdMax, - double tStart, - double tEnd, - uint32_t nDimension, - IndexItemH** items, - uint64_t* nResults); - -SIDX_DLL RTError Index_Intersects_obj( IndexH index, - double* pdMin, - double* pdMax, - uint32_t nDimension, - IndexItemH** items, - uint64_t* nResults); - -SIDX_C_DLL RTError Index_TPIntersects_id( IndexH index, - double* pdMin, - double* pdMax, - double* pdVMin, - double* pdVMax, - double tStart, - double tEnd, - uint32_t nDimension, - int64_t** ids, - uint64_t* nResults); - -SIDX_C_DLL RTError Index_MVRIntersects_id( IndexH index, - double* pdMin, - double* pdMax, - double tStart, - double tEnd, - uint32_t nDimension, - int64_t** ids, - uint64_t* nResults); - -SIDX_DLL RTError Index_Intersects_id( IndexH index, - double* pdMin, - double* pdMax, - uint32_t nDimension, - int64_t** items, - uint64_t* nResults); - -SIDX_C_DLL RTError Index_TPIntersects_count( IndexH index, - double* pdMin, - double* pdMax, - double* pdVMin, - double* pdVMax, - double tStart, - double tEnd, - uint32_t nDimension, - uint64_t* nResults); - -SIDX_C_DLL RTError Index_MVRIntersects_count( IndexH index, - double* pdMin, - double* pdMax, - double tStart, - double tEnd, - uint32_t nDimension, - uint64_t* nResults); - -SIDX_DLL RTError Index_Intersects_count( IndexH index, - double* pdMin, - double* pdMax, - uint32_t nDimension, - uint64_t* nResults); - -SIDX_C_DLL RTError Index_TPNearestNeighbors_obj(IndexH index, - double* pdMin, - double* pdMax, - double* pdVMin, - double* pdVMax, - double tStart, - double tEnd, - uint32_t nDimension, - IndexItemH** items, - uint64_t* nResults); - -SIDX_C_DLL RTError Index_MVRNearestNeighbors_obj(IndexH index, - double* pdMin, - double* pdMax, - double tStart, - double tEnd, - uint32_t nDimension, - IndexItemH** items, - uint64_t* nResults); - -SIDX_DLL RTError Index_NearestNeighbors_obj(IndexH index, - double* pdMin, - double* pdMax, - uint32_t nDimension, - IndexItemH** items, - uint64_t* nResults); - -SIDX_C_DLL RTError Index_TPNearestNeighbors_id(IndexH index, - double* pdMin, - double* pdMax, - double* pdVMin, - double* pdVMax, - double tStart, - double tEnd, - uint32_t nDimension, - int64_t** ids, - uint64_t* nResults); - -SIDX_C_DLL RTError Index_MVRNearestNeighbors_id(IndexH index, - double* pdMin, - double* pdMax, - double tStart, - double tEnd, - uint32_t nDimension, - int64_t** ids, - uint64_t* nResults); - -SIDX_DLL RTError Index_NearestNeighbors_id( IndexH index, - double* pdMin, - double* pdMax, - uint32_t nDimension, - int64_t** items, - uint64_t* nResults); - -SIDX_DLL RTError Index_GetBounds( IndexH index, - double** ppdMin, - double** ppdMax, - uint32_t* nDimension); - - -SIDX_C_DLL RTError Index_GetLeaves( IndexH index, - uint32_t* nLeafNodes, - uint32_t** nLeafSizes, - int64_t** nLeafIDs, - int64_t*** nLeafChildIDs, - double*** pppdMin, - double*** pppdMax, - uint32_t* nDimension); - -SIDX_DLL RTError Index_SetResultSetOffset(IndexH index, int64_t value); -SIDX_DLL int64_t Index_GetResultSetOffset(IndexH index); - -SIDX_DLL RTError Index_SetResultSetLimit(IndexH index, int64_t value); -SIDX_DLL int64_t Index_GetResultSetLimit(IndexH index); - -SIDX_DLL void Index_DestroyObjResults(IndexItemH* results, uint32_t nResults); -SIDX_DLL void Index_ClearBuffer(IndexH index); -SIDX_DLL void Index_Free(void* object); -SIDX_DLL void Index_Flush(IndexH index); - -SIDX_DLL void IndexItem_Destroy(IndexItemH item); -SIDX_DLL int64_t IndexItem_GetID(IndexItemH item); - -SIDX_DLL RTError IndexItem_GetData(IndexItemH item, uint8_t** data, uint64_t* length); - -SIDX_DLL RTError IndexItem_GetBounds( IndexItemH item, - double** ppdMin, - double** ppdMax, - uint32_t* nDimension); - -SIDX_DLL IndexPropertyH IndexProperty_Create(); -SIDX_DLL void IndexProperty_Destroy(IndexPropertyH hProp); - -SIDX_DLL RTError IndexProperty_SetIndexType(IndexPropertyH iprop, RTIndexType value); -SIDX_DLL RTIndexType IndexProperty_GetIndexType(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetDimension(IndexPropertyH iprop, uint32_t value); -SIDX_DLL uint32_t IndexProperty_GetDimension(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetIndexVariant(IndexPropertyH iprop, RTIndexVariant value); -SIDX_DLL RTIndexVariant IndexProperty_GetIndexVariant(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetIndexStorage(IndexPropertyH iprop, RTStorageType value); -SIDX_DLL RTStorageType IndexProperty_GetIndexStorage(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetPagesize(IndexPropertyH iprop, uint32_t value); -SIDX_DLL uint32_t IndexProperty_GetPagesize(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetIndexCapacity(IndexPropertyH iprop, uint32_t value); -SIDX_DLL uint32_t IndexProperty_GetIndexCapacity(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetLeafCapacity(IndexPropertyH iprop, uint32_t value); -SIDX_DLL uint32_t IndexProperty_GetLeafCapacity(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetLeafPoolCapacity(IndexPropertyH iprop, uint32_t value); -SIDX_DLL uint32_t IndexProperty_GetLeafPoolCapacity(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetIndexPoolCapacity(IndexPropertyH iprop, uint32_t value); -SIDX_DLL uint32_t IndexProperty_GetIndexPoolCapacity(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetRegionPoolCapacity(IndexPropertyH iprop, uint32_t value); -SIDX_DLL uint32_t IndexProperty_GetRegionPoolCapacity(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetPointPoolCapacity(IndexPropertyH iprop, uint32_t value); -SIDX_DLL uint32_t IndexProperty_GetPointPoolCapacity(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetBufferingCapacity(IndexPropertyH iprop, uint32_t value); -SIDX_DLL uint32_t IndexProperty_GetBufferingCapacity(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetEnsureTightMBRs(IndexPropertyH iprop, uint32_t value); -SIDX_DLL uint32_t IndexProperty_GetEnsureTightMBRs(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetOverwrite(IndexPropertyH iprop, uint32_t value); -SIDX_DLL uint32_t IndexProperty_GetOverwrite(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetNearMinimumOverlapFactor(IndexPropertyH iprop, uint32_t value); -SIDX_DLL uint32_t IndexProperty_GetNearMinimumOverlapFactor(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetWriteThrough(IndexPropertyH iprop, uint32_t value); -SIDX_DLL uint32_t IndexProperty_GetWriteThrough(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetFillFactor(IndexPropertyH iprop, double value); -SIDX_DLL double IndexProperty_GetFillFactor(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetSplitDistributionFactor(IndexPropertyH iprop, double value); -SIDX_DLL double IndexProperty_GetSplitDistributionFactor(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetTPRHorizon(IndexPropertyH iprop, double value); -SIDX_DLL double IndexProperty_GetTPRHorizon(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetReinsertFactor(IndexPropertyH iprop, double value); -SIDX_DLL double IndexProperty_GetReinsertFactor(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetFileName(IndexPropertyH iprop, const char* value); -SIDX_DLL char* IndexProperty_GetFileName(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetFileNameExtensionDat(IndexPropertyH iprop, const char* value); -SIDX_DLL char* IndexProperty_GetFileNameExtensionDat(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetFileNameExtensionIdx(IndexPropertyH iprop, const char* value); -SIDX_DLL char* IndexProperty_GetFileNameExtensionIdx(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetCustomStorageCallbacksSize(IndexPropertyH iprop, uint32_t value); -SIDX_DLL uint32_t IndexProperty_GetCustomStorageCallbacksSize(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetCustomStorageCallbacks(IndexPropertyH iprop, const void* value); -SIDX_DLL void* IndexProperty_GetCustomStorageCallbacks(IndexPropertyH iprop); - -SIDX_DLL RTError IndexProperty_SetIndexID(IndexPropertyH iprop, int64_t value); -SIDX_DLL int64_t IndexProperty_GetIndexID(IndexPropertyH iprop); - -SIDX_C_DLL void* SIDX_NewBuffer(size_t bytes); -SIDX_C_DLL void SIDX_DeleteBuffer(void* buffer); - -SIDX_DLL RTError IndexProperty_SetResultSetLimit(IndexPropertyH iprop, uint64_t value); -SIDX_DLL uint64_t IndexProperty_GetResultSetLimit(IndexPropertyH iprop); - -SIDX_C_DLL char* SIDX_Version(); - -SIDX_C_DLL char* Error_GetLastErrorMsg(void); - -IDX_C_END - -#endif diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/capi/sidx_config.h b/builddir/spatialindex-1.8.5/include/spatialindex/capi/sidx_config.h deleted file mode 100644 index 8f3764c..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/capi/sidx_config.h +++ /dev/null @@ -1,115 +0,0 @@ -/****************************************************************************** - * Project: libsidx - A C API wrapper around libspatialindex - * Purpose: C API configuration - * Author: Howard Butler, hobu.inc@gmail.com - ****************************************************************************** - * Copyright (c) 2009, Howard Butler - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#ifndef SIDX_CONFIG_H_INCLUDED -#define SIDX_CONFIG_H_INCLUDED - - - -#ifdef _MSC_VER - -#if _MSC_VER <= 1500 - typedef __int8 int8_t; - typedef __int16 int16_t; - typedef __int32 int32_t; - typedef __int64 int64_t; - typedef unsigned __int8 uint8_t; - typedef unsigned __int16 uint16_t; - typedef unsigned __int32 uint32_t; - typedef unsigned __int64 uint64_t; -#endif - - #include <windows.h> - #define STRDUP _strdup - #include <spatialindex/SpatialIndex.h> - #include <windows.h> - -#else - - #include <stdint.h> - #define SIDX_THREAD __thread - #include <spatialindex/SpatialIndex.h> - #define STRDUP strdup -#endif - -#include <sys/stat.h> - -#include "sidx_export.h" - -class Item; -class Index; - -typedef enum -{ - RT_None = 0, - RT_Debug = 1, - RT_Warning = 2, - RT_Failure = 3, - RT_Fatal = 4 -} RTError; - -typedef enum -{ - RT_RTree = 0, - RT_MVRTree = 1, - RT_TPRTree = 2, - RT_InvalidIndexType = -99 -} RTIndexType; - -typedef enum -{ - RT_Memory = 0, - RT_Disk = 1, - RT_Custom = 2, - RT_InvalidStorageType = -99 -} RTStorageType; - -typedef enum -{ - RT_Linear = 0, - RT_Quadratic = 1, - RT_Star = 2, - RT_InvalidIndexVariant = -99 -} RTIndexVariant; - - -#ifdef __cplusplus -# define IDX_C_START extern "C" { -# define IDX_C_END } -#else -# define IDX_C_START -# define IDX_C_END -#endif - -typedef Index *IndexH; -typedef SpatialIndex::IData *IndexItemH; -typedef Tools::PropertySet *IndexPropertyH; - - - -#endif diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/capi/sidx_export.h b/builddir/spatialindex-1.8.5/include/spatialindex/capi/sidx_export.h deleted file mode 100644 index b6c84f1..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/capi/sidx_export.h +++ /dev/null @@ -1,44 +0,0 @@ -/****************************************************************************** - * Project: libsidx - A C API wrapper around libspatialindex - * Purpose: C++ object declarations to implement utilities. - * Author: Howard Butler, hobu.inc@gmail.com - ****************************************************************************** - * Copyright (c) 2014, Howard Butler - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -#ifndef SIDX_C_DLL -#if defined(_MSC_VER) -# define SIDX_C_DLL __declspec(dllexport) -# define SIDX_DLL __declspec(dllexport) -#else -# if defined(USE_GCC_VISIBILITY_FLAG) -# define SIDX_C_DLL __attribute__ ((visibility("default"))) -# define SIDX_DLL __attribute__ ((visibility("default"))) -# else -# define SIDX_C_DLL -# define SIDX_DLL -# endif -#endif -#endif diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/capi/sidx_impl.h b/builddir/spatialindex-1.8.5/include/spatialindex/capi/sidx_impl.h deleted file mode 100644 index a52c565..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/capi/sidx_impl.h +++ /dev/null @@ -1,46 +0,0 @@ -/****************************************************************************** - * Project: libsidx - A C API wrapper around libspatialindex - * Purpose: C++ object declarations to implement utilities. - * Author: Howard Butler, hobu.inc@gmail.com - ****************************************************************************** - * Copyright (c) 2009, Howard Butler - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#include <stack> -#include <string> -#include <vector> -#include <stdexcept> -#include <sstream> -#include <cstring> - -#include "sidx_config.h" -#include "Utility.h" -#include "ObjVisitor.h" -#include "IdVisitor.h" -#include "CountVisitor.h" -#include "BoundsQuery.h" -#include "LeafQuery.h" -#include "Error.h" -#include "DataStream.h" -#include "Index.h" -#include "CustomStorage.h" diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/tools/PointerPool.h b/builddir/spatialindex-1.8.5/include/spatialindex/tools/PointerPool.h deleted file mode 100644 index fde44bc..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/tools/PointerPool.h +++ /dev/null @@ -1,123 +0,0 @@ -/****************************************************************************** - * Project: libspatialindex - A C++ library for spatial indexing - * Author: Marios Hadjieleftheriou, mhadji@gmail.com - ****************************************************************************** - * Copyright (c) 2004, Marios Hadjieleftheriou - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -#include "PoolPointer.h" - -namespace Tools -{ - template <class X> class PointerPool - { - public: - explicit PointerPool(uint32_t capacity) : m_capacity(capacity) - { - #ifndef NDEBUG - m_hits = 0; - m_misses = 0; - m_pointerCount = 0; - #endif - } - - ~PointerPool() - { - assert(m_pool.size() <= m_capacity); - - while (! m_pool.empty()) - { - X* x = m_pool.top(); m_pool.pop(); - #ifndef NDEBUG - --m_pointerCount; - #endif - delete x; - } - - #ifndef NDEBUG - std::cerr << "Lost pointers: " << m_pointerCount << std::endl; - #endif - } - - PoolPointer<X> acquire() - { - X* p = 0; - - if (! m_pool.empty()) - { - p = m_pool.top(); m_pool.pop(); - #ifndef NDEBUG - m_hits++; - #endif - } - else - { - p = new X(); - #ifndef NDEBUG - m_pointerCount++; - m_misses++; - #endif - } - - return PoolPointer<X>(p, this); - } - - void release(X* p) - { - if (m_pool.size() < m_capacity) - { - m_pool.push(p); - } - else - { - #ifndef NDEBUG - --m_pointerCount; - #endif - delete p; - } - - assert(m_pool.size() <= m_capacity); - } - - uint32_t getCapacity() const { return m_capacity; } - void setCapacity(uint32_t c) - { - assert (c >= 0); - m_capacity = c; - } - - private: - uint32_t m_capacity; - std::stack<X*> m_pool; - - #ifndef NDEBUG - public: - uint64_t m_hits; - uint64_t m_misses; - uint64_t m_pointerCount; - #endif - }; -} - diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/tools/PoolPointer.h b/builddir/spatialindex-1.8.5/include/spatialindex/tools/PoolPointer.h deleted file mode 100644 index c7c2caf..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/tools/PoolPointer.h +++ /dev/null @@ -1,102 +0,0 @@ -/****************************************************************************** - * Project: libspatialindex - A C++ library for spatial indexing - * Author: Marios Hadjieleftheriou, mhadji@gmail.com - ****************************************************************************** - * Copyright (c) 2004, Marios Hadjieleftheriou - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -#include "PointerPool.h" - -namespace Tools -{ - template <class X> class PointerPool; - - template <class X> class PoolPointer - { - public: - explicit PoolPointer(X* p = 0) : m_pointer(p), m_pPool(0) { m_prev = m_next = this; } - explicit PoolPointer(X* p, PointerPool<X>* pPool) throw() : m_pointer(p), m_pPool(pPool) { m_prev = m_next = this; } - ~PoolPointer() { release(); } - PoolPointer(const PoolPointer& p) throw() { acquire(p); } - PoolPointer& operator=(const PoolPointer& p) - { - if (this != &p) - { - release(); - acquire(p); - } - return *this; - } - - X& operator*() const throw() { return *m_pointer; } - X* operator->() const throw() { return m_pointer; } - X* get() const throw() { return m_pointer; } - bool unique() const throw() { return m_prev ? m_prev == this : true; } - void relinquish() throw() - { - m_pPool = 0; - m_pointer = 0; - release(); - } - - private: - X* m_pointer; - mutable const PoolPointer* m_prev; - mutable const PoolPointer* m_next; - PointerPool<X>* m_pPool; - - void acquire(const PoolPointer& p) throw() - { - m_pPool = p.m_pPool; - m_pointer = p.m_pointer; - m_next = p.m_next; - m_next->m_prev = this; - m_prev = &p; - #ifndef mutable - p.m_next = this; - #else - (const_cast<linked_ptr<X>*>(&p))->m_next = this; - #endif - } - - void release() - { - if (unique()) - { - if (m_pPool != 0) m_pPool->release(m_pointer); - else delete m_pointer; - } - else - { - m_prev->m_next = m_next; - m_next->m_prev = m_prev; - m_prev = m_next = 0; - } - m_pointer = 0; - m_pPool = 0; - } - }; -} - diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/tools/SmartPointer.h b/builddir/spatialindex-1.8.5/include/spatialindex/tools/SmartPointer.h deleted file mode 100644 index 9a5c2cc..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/tools/SmartPointer.h +++ /dev/null @@ -1,84 +0,0 @@ -/****************************************************************************** - * Project: libspatialindex - A C++ library for spatial indexing - * Author: Marios Hadjieleftheriou, mhadji@gmail.com - ****************************************************************************** - * Copyright (c) 2004, Marios Hadjieleftheriou - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - -namespace Tools -{ - template <class X> class SmartPointer - { - public: - explicit SmartPointer(X* p = 0) throw() : m_pointer(p) { m_prev = m_next = this; } - ~SmartPointer() { release(); } - SmartPointer(const SmartPointer& p) throw() { acquire(p); } - SmartPointer& operator=(const SmartPointer& p) - { - if (this != &p) - { - release(); - acquire(p); - } - return *this; - } - - X& operator*() const throw() { return *m_pointer; } - X* operator->() const throw() { return m_pointer; } - X* get() const throw() { return m_pointer; } - bool unique() const throw() { return m_prev ? m_prev == this : true; } - - private: - X* m_pointer; - mutable const SmartPointer* m_prev; - mutable const SmartPointer* m_next; - - void acquire(const SmartPointer& p) throw() - { - m_pointer = p.m_pointer; - m_next = p.m_next; - m_next->m_prev = this; - m_prev = &p; - #ifndef mutable - p.m_next = this; - #else - (const_cast<linked_ptr<X>*>(&p))->m_next = this; - #endif - } - - void release() - { - if (unique()) delete m_pointer; - else - { - m_prev->m_next = m_next; - m_next->m_prev = m_prev; - m_prev = m_next = 0; - } - m_pointer = 0; - } - }; -} - diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/tools/Tools.h b/builddir/spatialindex-1.8.5/include/spatialindex/tools/Tools.h deleted file mode 100644 index cd18d12..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/tools/Tools.h +++ /dev/null @@ -1,507 +0,0 @@ -/****************************************************************************** - * Project: libspatialindex - A C++ library for spatial indexing - * Author: Marios Hadjieleftheriou, mhadji@gmail.com - ****************************************************************************** - * Copyright (c) 2004, Marios Hadjieleftheriou - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - -#pragma once - - -#if (defined _WIN32 || defined _WIN64 || defined WIN32 || defined WIN64) && !defined __GNUC__ - typedef __int8 int8_t; - typedef __int16 int16_t; - typedef __int32 int32_t; - typedef __int64 int64_t; - typedef unsigned __int8 uint8_t; - typedef unsigned __int16 uint16_t; - typedef unsigned __int32 uint32_t; - typedef unsigned __int64 uint64_t; - -// Nuke this annoying warning. See http://www.unknownroad.com/rtfm/VisualStudio/warningC4251.html -#pragma warning( disable: 4251 ) - -#else - #include <stdint.h> -#endif - -#if (defined _WIN32 || defined _WIN64 || defined WIN32 || defined WIN64) && !defined __GNUC__ - #ifdef SPATIALINDEX_CREATE_DLL - #define SIDX_DLL __declspec(dllexport) - #else - #define SIDX_DLL __declspec(dllimport) - #endif -#else - #define SIDX_DLL -#endif - -#include <assert.h> -#include <iostream> -#include <iomanip> -#include <iterator> -#include <string> -#include <sstream> -#include <fstream> -#include <queue> -#include <vector> -#include <map> -#include <set> -#include <stack> -#include <list> -#include <algorithm> -#include <cwchar> - -#if HAVE_PTHREAD_H - #include <pthread.h> -#endif - -#include "SmartPointer.h" -#include "PointerPool.h" -#include "PoolPointer.h" - -typedef uint8_t byte; - -namespace Tools -{ - SIDX_DLL enum IntervalType - { - IT_RIGHTOPEN = 0x0, - IT_LEFTOPEN, - IT_OPEN, - IT_CLOSED - }; - - SIDX_DLL enum VariantType - { - VT_LONG = 0x0, - VT_BYTE, - VT_SHORT, - VT_FLOAT, - VT_DOUBLE, - VT_CHAR, - VT_USHORT, - VT_ULONG, - VT_INT, - VT_UINT, - VT_BOOL, - VT_PCHAR, - VT_PVOID, - VT_EMPTY, - VT_LONGLONG, - VT_ULONGLONG, - VT_PWCHAR - }; - - SIDX_DLL enum FileMode - { - APPEND = 0x0, - CREATE - }; - - // - // Exceptions - // - class SIDX_DLL Exception - { - public: - virtual std::string what() = 0; - virtual ~Exception() {} - }; - - class SIDX_DLL IndexOutOfBoundsException : public Exception - { - public: - IndexOutOfBoundsException(size_t i); - virtual ~IndexOutOfBoundsException() {} - virtual std::string what(); - - private: - std::string m_error; - }; // IndexOutOfBoundsException - - class SIDX_DLL IllegalArgumentException : public Exception - { - public: - IllegalArgumentException(std::string s); - virtual ~IllegalArgumentException() {} - virtual std::string what(); - - private: - std::string m_error; - }; // IllegalArgumentException - - class SIDX_DLL IllegalStateException : public Exception - { - public: - IllegalStateException(std::string s); - virtual ~IllegalStateException() {} - virtual std::string what(); - - private: - std::string m_error; - }; // IllegalStateException - - class SIDX_DLL EndOfStreamException : public Exception - { - public: - EndOfStreamException(std::string s); - virtual ~EndOfStreamException() {} - virtual std::string what(); - - private: - std::string m_error; - }; // EndOfStreamException - - class SIDX_DLL ResourceLockedException : public Exception - { - public: - ResourceLockedException(std::string s); - virtual ~ResourceLockedException() {} - virtual std::string what(); - - private: - std::string m_error; - }; // ResourceLockedException - - class SIDX_DLL NotSupportedException : public Exception - { - public: - NotSupportedException(std::string s); - virtual ~NotSupportedException() {} - virtual std::string what(); - - private: - std::string m_error; - }; // NotSupportedException - - // - // Interfaces - // - class SIDX_DLL IInterval - { - public: - virtual ~IInterval() {} - - virtual double getLowerBound() const = 0; - virtual double getUpperBound() const = 0; - virtual void setBounds(double, double) = 0; - virtual bool intersectsInterval(const IInterval&) const = 0; - virtual bool intersectsInterval(IntervalType type, const double start, const double end) const = 0; - virtual bool containsInterval(const IInterval&) const = 0; - virtual IntervalType getIntervalType() const = 0; - }; // IInterval - - class SIDX_DLL IObject - { - public: - virtual ~IObject() {} - - virtual IObject* clone() = 0; - // return a new object that is an exact copy of this one. - // IMPORTANT: do not return the this pointer! - }; // IObject - - class SIDX_DLL ISerializable - { - public: - virtual ~ISerializable() {} - - virtual uint32_t getByteArraySize() = 0; - // returns the size of the required byte array. - virtual void loadFromByteArray(const byte* data) = 0; - // load this object using the byte array. - virtual void storeToByteArray(byte** data, uint32_t& length) = 0; - // store this object in the byte array. - }; - - class SIDX_DLL IComparable - { - public: - virtual ~IComparable() {} - - virtual bool operator<(const IComparable& o) const = 0; - virtual bool operator>(const IComparable& o) const = 0; - virtual bool operator==(const IComparable& o) const = 0; - }; //IComparable - - class SIDX_DLL IObjectComparator - { - public: - virtual ~IObjectComparator() {} - - virtual int compare(IObject* o1, IObject* o2) = 0; - }; // IObjectComparator - - class SIDX_DLL IObjectStream - { - public: - virtual ~IObjectStream() {} - - virtual IObject* getNext() = 0; - // returns a pointer to the next entry in the - // stream or 0 at the end of the stream. - - virtual bool hasNext() = 0; - // returns true if there are more items in the stream. - - virtual uint32_t size() = 0; - // returns the total number of entries available in the stream. - - virtual void rewind() = 0; - // sets the stream pointer to the first entry, if possible. - }; // IObjectStream - - // - // Classes & Functions - // - - class SIDX_DLL Variant - { - public: - Variant(); - - VariantType m_varType; - - union - { - int16_t iVal; // VT_SHORT - int32_t lVal; // VT_LONG - int64_t llVal; // VT_LONGLONG - byte bVal; // VT_BYTE - float fltVal; // VT_FLOAT - double dblVal; // VT_DOUBLE - char cVal; // VT_CHAR - uint16_t uiVal; // VT_USHORT - uint32_t ulVal; // VT_ULONG - uint64_t ullVal; // VT_ULONGLONG - bool blVal; // VT_BOOL - char* pcVal; // VT_PCHAR - void* pvVal; // VT_PVOID - wchar_t* pwcVal; - } m_val; - }; // Variant - - class SIDX_DLL PropertySet; - SIDX_DLL std::ostream& operator<<(std::ostream& os, const Tools::PropertySet& p); - - class SIDX_DLL PropertySet : public ISerializable - { - public: - PropertySet(); - PropertySet(const byte* data); - virtual ~PropertySet(); - - Variant getProperty(std::string property) const; - void setProperty(std::string property, Variant const& v); - void removeProperty(std::string property); - - virtual uint32_t getByteArraySize(); - virtual void loadFromByteArray(const byte* data); - virtual void storeToByteArray(byte** data, uint32_t& length); - - private: - std::map<std::string, Variant> m_propertySet; -// #ifdef HAVE_PTHREAD_H -// pthread_rwlock_t m_rwLock; -// #else -// bool m_rwLock; -// #endif - friend SIDX_DLL std::ostream& Tools::operator<<(std::ostream& os, const Tools::PropertySet& p); - }; // PropertySet - - // does not support degenerate intervals. - class SIDX_DLL Interval : public IInterval - { - public: - Interval(); - Interval(IntervalType, double, double); - Interval(double, double); - Interval(const Interval&); - virtual ~Interval() {} - virtual IInterval& operator=(const IInterval&); - - virtual bool operator==(const Interval&) const; - virtual bool operator!=(const Interval&) const; - virtual double getLowerBound() const; - virtual double getUpperBound() const; - virtual void setBounds(double, double); - virtual bool intersectsInterval(const IInterval&) const; - virtual bool intersectsInterval(IntervalType type, const double start, const double end) const; - virtual bool containsInterval(const IInterval&) const; - virtual IntervalType getIntervalType() const; - - IntervalType m_type; - double m_low; - double m_high; - }; // Interval - - SIDX_DLL std::ostream& operator<<(std::ostream& os, const Tools::Interval& iv); - - class SIDX_DLL Random - { - public: - Random(); - Random(uint32_t seed, uint16_t xsubi0); - virtual ~Random(); - - int32_t nextUniformLong(); - // returns a uniformly distributed long. - uint32_t nextUniformUnsignedLong(); - // returns a uniformly distributed unsigned long. - int32_t nextUniformLong(int32_t low, int32_t high); - // returns a uniformly distributed long in the range [low, high). - uint32_t nextUniformUnsignedLong(uint32_t low, uint32_t high); - // returns a uniformly distributed unsigned long in the range [low, high). - int64_t nextUniformLongLong(); - // returns a uniformly distributed long long. - uint64_t nextUniformUnsignedLongLong(); - // returns a uniformly distributed unsigned long long. - int64_t nextUniformLongLong(int64_t low, int64_t high); - // returns a uniformly distributed unsigned long long in the range [low, high). - uint64_t nextUniformUnsignedLongLong(uint64_t low, uint64_t high); - // returns a uniformly distributed unsigned long long in the range [low, high). - int16_t nextUniformShort(); - // returns a uniformly distributed short. - uint16_t nextUniformUnsignedShort(); - // returns a uniformly distributed unsigned short. - double nextUniformDouble(); - // returns a uniformly distributed double in the range [0, 1). - double nextUniformDouble(double low, double high); - // returns a uniformly distributed double in the range [low, high). - - bool flipCoin(); - - private: - void initDrand(uint32_t seed, uint16_t xsubi0); - - uint16_t* m_pBuffer; - }; // Random - - #if HAVE_PTHREAD_H - class SIDX_DLL LockGuard - { - public: - LockGuard(pthread_mutex_t* pLock); - ~LockGuard(); - - private: - pthread_mutex_t* m_pLock; - }; // LockGuard - #endif - - class SIDX_DLL BufferedFile - { - public: - BufferedFile(uint32_t u32BufferSize = 16384); - virtual ~BufferedFile(); - - virtual void close(); - virtual bool eof(); - virtual void rewind() = 0; - virtual void seek(std::fstream::off_type offset) = 0; - - protected: - std::fstream m_file; - char* m_buffer; - uint32_t m_u32BufferSize; - bool m_bEOF; - }; - - class SIDX_DLL BufferedFileReader : public BufferedFile - { - public: - BufferedFileReader(); - BufferedFileReader(const std::string& sFileName, uint32_t u32BufferSize = 32768); - virtual ~BufferedFileReader(); - - virtual void open(const std::string& sFileName); - virtual void rewind(); - virtual void seek(std::fstream::off_type offset); - - virtual uint8_t readUInt8(); - virtual uint16_t readUInt16(); - virtual uint32_t readUInt32(); - virtual uint64_t readUInt64(); - virtual float readFloat(); - virtual double readDouble(); - virtual bool readBoolean(); - virtual std::string readString(); - virtual void readBytes(uint32_t u32Len, byte** pData); - }; - - class SIDX_DLL BufferedFileWriter : public BufferedFile - { - public: - BufferedFileWriter(); - BufferedFileWriter(const std::string& sFileName, FileMode mode = CREATE, uint32_t u32BufferSize = 32768); - virtual ~BufferedFileWriter(); - - virtual void open(const std::string& sFileName, FileMode mode = CREATE); - virtual void rewind(); - virtual void seek(std::fstream::off_type offset); - - virtual void write(uint8_t i); - virtual void write(uint16_t i); - virtual void write(uint32_t i); - virtual void write(uint64_t i); - virtual void write(float i); - virtual void write(double i); - virtual void write(bool b); - virtual void write(const std::string& s); - virtual void write(uint32_t u32Len, byte* pData); - }; - - class SIDX_DLL TemporaryFile - { - public: - TemporaryFile(); - virtual ~TemporaryFile(); - - void rewindForReading(); - void rewindForWriting(); - bool eof(); - std::string getFileName() const; - - uint8_t readUInt8(); - uint16_t readUInt16(); - uint32_t readUInt32(); - uint64_t readUInt64(); - float readFloat(); - double readDouble(); - std::string readString(); - void readBytes(uint32_t u32Len, byte** pData); - - void write(uint8_t i); - void write(uint16_t i); - void write(uint32_t i); - void write(uint64_t i); - void write(float i); - void write(double i); - void write(const std::string& s); - void write(uint32_t u32Len, byte* pData); - - private: - std::string m_sFile; - BufferedFile* m_pFile; - }; -} diff --git a/builddir/spatialindex-1.8.5/include/spatialindex/tools/rand48.h b/builddir/spatialindex-1.8.5/include/spatialindex/tools/rand48.h deleted file mode 100644 index f9cf2bb..0000000 --- a/builddir/spatialindex-1.8.5/include/spatialindex/tools/rand48.h +++ /dev/null @@ -1,85 +0,0 @@ -/****************************************************************************** - * Project: libspatialindex - A C++ library for spatial indexing - * Author: Howard Butler, hobu.inc@gmail.com - ****************************************************************************** - * Copyright (c) 2011, Howard Butler - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS 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. -******************************************************************************/ - - -#pragma once - -/* Only define this stuff if we're not ANDROID */ -#ifndef ANDROID - -#ifndef HAVE_SRAND48 - -#if HAVE_FEATURES_H -#include <features.h> -#ifndef __THROW -/* copy-pasted from sys/cdefs.h */ -/* GCC can always grok prototypes. For C++ programs we add throw() -to help it optimize the function calls. But this works only with -gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions -as non-throwing using a function attribute since programs can use -the -fexceptions options for C code as well. */ -# if !defined __cplusplus && __GNUC_PREREQ (3, 3) -# define __THROW __attribute__ ((__nothrow__)) -# define __NTH(fct) __attribute__ ((__nothrow__)) fct -# else -# if defined __cplusplus && __GNUC_PREREQ (2,8) -# define __THROW throw () -# define __NTH(fct) fct throw () -# else -# define __THROW -# define __NTH(fct) fct -# endif -# endif - -#endif -#else -# define __THROW -# define __NTH(fct) fct -#endif - -extern void srand48(long int seed) __THROW; - -extern unsigned short *seed48(unsigned short xseed[3]) __THROW; - -extern long nrand48(unsigned short xseed[3]) __THROW; - -extern long mrand48(void) __THROW; - -extern long lrand48(void) __THROW; - -extern void lcong48(unsigned short p[7]) __THROW; - -extern long jrand48(unsigned short xseed[3]) __THROW; - -extern double erand48(unsigned short xseed[3]) __THROW; - -extern double drand48(void) __THROW; - -#endif - -/* Only define this stuff if we're not ANDROID */ -#endif \ No newline at end of file diff --git a/builddir/sqlite-3.15.2/bin/sqlite3.lib b/builddir/sqlite-3.15.2/bin/sqlite3.lib deleted file mode 100644 index df3bde4..0000000 Binary files a/builddir/sqlite-3.15.2/bin/sqlite3.lib and /dev/null differ diff --git a/builddir/sqlite-3.15.2/include/sqlite3.h b/builddir/sqlite-3.15.2/include/sqlite3.h deleted file mode 100644 index 8222b79..0000000 --- a/builddir/sqlite-3.15.2/include/sqlite3.h +++ /dev/null @@ -1,10371 +0,0 @@ -/* -** 2001 September 15 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -** This header file defines the interface that the SQLite library -** presents to client programs. If a C-function, structure, datatype, -** or constant definition does not appear in this file, then it is -** not a published API of SQLite, is subject to change without -** notice, and should not be referenced by programs that use SQLite. -** -** Some of the definitions that are in this file are marked as -** "experimental". Experimental interfaces are normally new -** features recently added to SQLite. We do not anticipate changes -** to experimental interfaces but reserve the right to make minor changes -** if experience from use "in the wild" suggest such changes are prudent. -** -** The official C-language API documentation for SQLite is derived -** from comments in this file. This file is the authoritative source -** on how SQLite interfaces are supposed to operate. -** -** The name of this file under configuration management is "sqlite.h.in". -** The makefile makes some minor changes to this file (such as inserting -** the version number) and changes its name to "sqlite3.h" as -** part of the build process. -*/ -#ifndef SQLITE3_H -#define SQLITE3_H -#include <stdarg.h> /* Needed for the definition of va_list */ - -/* -** Make sure we can call this stuff from C++. -*/ -#ifdef __cplusplus -extern "C" { -#endif - - -/* -** Provide the ability to override linkage features of the interface. -*/ -#ifndef SQLITE_EXTERN -# define SQLITE_EXTERN extern -#endif -#ifndef SQLITE_API -# define SQLITE_API -#endif -#ifndef SQLITE_CDECL -# define SQLITE_CDECL -#endif -#ifndef SQLITE_APICALL -# define SQLITE_APICALL -#endif -#ifndef SQLITE_STDCALL -# define SQLITE_STDCALL SQLITE_APICALL -#endif -#ifndef SQLITE_CALLBACK -# define SQLITE_CALLBACK -#endif -#ifndef SQLITE_SYSAPI -# define SQLITE_SYSAPI -#endif - -/* -** These no-op macros are used in front of interfaces to mark those -** interfaces as either deprecated or experimental. New applications -** should not use deprecated interfaces - they are supported for backwards -** compatibility only. Application writers should be aware that -** experimental interfaces are subject to change in point releases. -** -** These macros used to resolve to various kinds of compiler magic that -** would generate warning messages when they were used. But that -** compiler magic ended up generating such a flurry of bug reports -** that we have taken it all out and gone back to using simple -** noop macros. -*/ -#define SQLITE_DEPRECATED -#define SQLITE_EXPERIMENTAL - -/* -** Ensure these symbols were not defined by some previous header file. -*/ -#ifdef SQLITE_VERSION -# undef SQLITE_VERSION -#endif -#ifdef SQLITE_VERSION_NUMBER -# undef SQLITE_VERSION_NUMBER -#endif - -/* -** CAPI3REF: Compile-Time Library Version Numbers -** -** ^(The [SQLITE_VERSION] C preprocessor macro in the sqlite3.h header -** evaluates to a string literal that is the SQLite version in the -** format "X.Y.Z" where X is the major version number (always 3 for -** SQLite3) and Y is the minor version number and Z is the release number.)^ -** ^(The [SQLITE_VERSION_NUMBER] C preprocessor macro resolves to an integer -** with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z are the same -** numbers used in [SQLITE_VERSION].)^ -** The SQLITE_VERSION_NUMBER for any given release of SQLite will also -** be larger than the release from which it is derived. Either Y will -** be held constant and Z will be incremented or else Y will be incremented -** and Z will be reset to zero. -** -** Since [version 3.6.18] ([dateof:3.6.18]), -** SQLite source code has been stored in the -** <a href="http://www.fossil-scm.org/">Fossil configuration management -** system</a>. ^The SQLITE_SOURCE_ID macro evaluates to -** a string which identifies a particular check-in of SQLite -** within its configuration management system. ^The SQLITE_SOURCE_ID -** string contains the date and time of the check-in (UTC) and an SHA1 -** hash of the entire source tree. -** -** See also: [sqlite3_libversion()], -** [sqlite3_libversion_number()], [sqlite3_sourceid()], -** [sqlite_version()] and [sqlite_source_id()]. -*/ -#define SQLITE_VERSION "3.15.2" -#define SQLITE_VERSION_NUMBER 3015002 -#define SQLITE_SOURCE_ID "2016-11-28 19:13:37 bbd85d235f7037c6a033a9690534391ffeacecc8" - -/* -** CAPI3REF: Run-Time Library Version Numbers -** KEYWORDS: sqlite3_version, sqlite3_sourceid -** -** These interfaces provide the same information as the [SQLITE_VERSION], -** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros -** but are associated with the library instead of the header file. ^(Cautious -** programmers might include assert() statements in their application to -** verify that values returned by these interfaces match the macros in -** the header, and thus ensure that the application is -** compiled with matching library and header files. -** -** <blockquote><pre> -** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER ); -** assert( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)==0 ); -** assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 ); -** </pre></blockquote>)^ -** -** ^The sqlite3_version[] string constant contains the text of [SQLITE_VERSION] -** macro. ^The sqlite3_libversion() function returns a pointer to the -** to the sqlite3_version[] string constant. The sqlite3_libversion() -** function is provided for use in DLLs since DLL users usually do not have -** direct access to string constants within the DLL. ^The -** sqlite3_libversion_number() function returns an integer equal to -** [SQLITE_VERSION_NUMBER]. ^The sqlite3_sourceid() function returns -** a pointer to a string constant whose value is the same as the -** [SQLITE_SOURCE_ID] C preprocessor macro. -** -** See also: [sqlite_version()] and [sqlite_source_id()]. -*/ -SQLITE_API SQLITE_EXTERN const char sqlite3_version[]; -SQLITE_API const char *sqlite3_libversion(void); -SQLITE_API const char *sqlite3_sourceid(void); -SQLITE_API int sqlite3_libversion_number(void); - -/* -** CAPI3REF: Run-Time Library Compilation Options Diagnostics -** -** ^The sqlite3_compileoption_used() function returns 0 or 1 -** indicating whether the specified option was defined at -** compile time. ^The SQLITE_ prefix may be omitted from the -** option name passed to sqlite3_compileoption_used(). -** -** ^The sqlite3_compileoption_get() function allows iterating -** over the list of options that were defined at compile time by -** returning the N-th compile time option string. ^If N is out of range, -** sqlite3_compileoption_get() returns a NULL pointer. ^The SQLITE_ -** prefix is omitted from any strings returned by -** sqlite3_compileoption_get(). -** -** ^Support for the diagnostic functions sqlite3_compileoption_used() -** and sqlite3_compileoption_get() may be omitted by specifying the -** [SQLITE_OMIT_COMPILEOPTION_DIAGS] option at compile time. -** -** See also: SQL functions [sqlite_compileoption_used()] and -** [sqlite_compileoption_get()] and the [compile_options pragma]. -*/ -#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS -SQLITE_API int sqlite3_compileoption_used(const char *zOptName); -SQLITE_API const char *sqlite3_compileoption_get(int N); -#endif - -/* -** CAPI3REF: Test To See If The Library Is Threadsafe -** -** ^The sqlite3_threadsafe() function returns zero if and only if -** SQLite was compiled with mutexing code omitted due to the -** [SQLITE_THREADSAFE] compile-time option being set to 0. -** -** SQLite can be compiled with or without mutexes. When -** the [SQLITE_THREADSAFE] C preprocessor macro is 1 or 2, mutexes -** are enabled and SQLite is threadsafe. When the -** [SQLITE_THREADSAFE] macro is 0, -** the mutexes are omitted. Without the mutexes, it is not safe -** to use SQLite concurrently from more than one thread. -** -** Enabling mutexes incurs a measurable performance penalty. -** So if speed is of utmost importance, it makes sense to disable -** the mutexes. But for maximum safety, mutexes should be enabled. -** ^The default behavior is for mutexes to be enabled. -** -** This interface can be used by an application to make sure that the -** version of SQLite that it is linking against was compiled with -** the desired setting of the [SQLITE_THREADSAFE] macro. -** -** This interface only reports on the compile-time mutex setting -** of the [SQLITE_THREADSAFE] flag. If SQLite is compiled with -** SQLITE_THREADSAFE=1 or =2 then mutexes are enabled by default but -** can be fully or partially disabled using a call to [sqlite3_config()] -** with the verbs [SQLITE_CONFIG_SINGLETHREAD], [SQLITE_CONFIG_MULTITHREAD], -** or [SQLITE_CONFIG_SERIALIZED]. ^(The return value of the -** sqlite3_threadsafe() function shows only the compile-time setting of -** thread safety, not any run-time changes to that setting made by -** sqlite3_config(). In other words, the return value from sqlite3_threadsafe() -** is unchanged by calls to sqlite3_config().)^ -** -** See the [threading mode] documentation for additional information. -*/ -SQLITE_API int sqlite3_threadsafe(void); - -/* -** CAPI3REF: Database Connection Handle -** KEYWORDS: {database connection} {database connections} -** -** Each open SQLite database is represented by a pointer to an instance of -** the opaque structure named "sqlite3". It is useful to think of an sqlite3 -** pointer as an object. The [sqlite3_open()], [sqlite3_open16()], and -** [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()] -** and [sqlite3_close_v2()] are its destructors. There are many other -** interfaces (such as -** [sqlite3_prepare_v2()], [sqlite3_create_function()], and -** [sqlite3_busy_timeout()] to name but three) that are methods on an -** sqlite3 object. -*/ -typedef struct sqlite3 sqlite3; - -/* -** CAPI3REF: 64-Bit Integer Types -** KEYWORDS: sqlite_int64 sqlite_uint64 -** -** Because there is no cross-platform way to specify 64-bit integer types -** SQLite includes typedefs for 64-bit signed and unsigned integers. -** -** The sqlite3_int64 and sqlite3_uint64 are the preferred type definitions. -** The sqlite_int64 and sqlite_uint64 types are supported for backwards -** compatibility only. -** -** ^The sqlite3_int64 and sqlite_int64 types can store integer values -** between -9223372036854775808 and +9223372036854775807 inclusive. ^The -** sqlite3_uint64 and sqlite_uint64 types can store integer values -** between 0 and +18446744073709551615 inclusive. -*/ -#ifdef SQLITE_INT64_TYPE - typedef SQLITE_INT64_TYPE sqlite_int64; - typedef unsigned SQLITE_INT64_TYPE sqlite_uint64; -#elif defined(_MSC_VER) || defined(__BORLANDC__) - typedef __int64 sqlite_int64; - typedef unsigned __int64 sqlite_uint64; -#else - typedef long long int sqlite_int64; - typedef unsigned long long int sqlite_uint64; -#endif -typedef sqlite_int64 sqlite3_int64; -typedef sqlite_uint64 sqlite3_uint64; - -/* -** If compiling for a processor that lacks floating point support, -** substitute integer for floating-point. -*/ -#ifdef SQLITE_OMIT_FLOATING_POINT -# define double sqlite3_int64 -#endif - -/* -** CAPI3REF: Closing A Database Connection -** DESTRUCTOR: sqlite3 -** -** ^The sqlite3_close() and sqlite3_close_v2() routines are destructors -** for the [sqlite3] object. -** ^Calls to sqlite3_close() and sqlite3_close_v2() return [SQLITE_OK] if -** the [sqlite3] object is successfully destroyed and all associated -** resources are deallocated. -** -** ^If the database connection is associated with unfinalized prepared -** statements or unfinished sqlite3_backup objects then sqlite3_close() -** will leave the database connection open and return [SQLITE_BUSY]. -** ^If sqlite3_close_v2() is called with unfinalized prepared statements -** and/or unfinished sqlite3_backups, then the database connection becomes -** an unusable "zombie" which will automatically be deallocated when the -** last prepared statement is finalized or the last sqlite3_backup is -** finished. The sqlite3_close_v2() interface is intended for use with -** host languages that are garbage collected, and where the order in which -** destructors are called is arbitrary. -** -** Applications should [sqlite3_finalize | finalize] all [prepared statements], -** [sqlite3_blob_close | close] all [BLOB handles], and -** [sqlite3_backup_finish | finish] all [sqlite3_backup] objects associated -** with the [sqlite3] object prior to attempting to close the object. ^If -** sqlite3_close_v2() is called on a [database connection] that still has -** outstanding [prepared statements], [BLOB handles], and/or -** [sqlite3_backup] objects then it returns [SQLITE_OK] and the deallocation -** of resources is deferred until all [prepared statements], [BLOB handles], -** and [sqlite3_backup] objects are also destroyed. -** -** ^If an [sqlite3] object is destroyed while a transaction is open, -** the transaction is automatically rolled back. -** -** The C parameter to [sqlite3_close(C)] and [sqlite3_close_v2(C)] -** must be either a NULL -** pointer or an [sqlite3] object pointer obtained -** from [sqlite3_open()], [sqlite3_open16()], or -** [sqlite3_open_v2()], and not previously closed. -** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer -** argument is a harmless no-op. -*/ -SQLITE_API int sqlite3_close(sqlite3*); -SQLITE_API int sqlite3_close_v2(sqlite3*); - -/* -** The type for a callback function. -** This is legacy and deprecated. It is included for historical -** compatibility and is not documented. -*/ -typedef int (*sqlite3_callback)(void*,int,char**, char**); - -/* -** CAPI3REF: One-Step Query Execution Interface -** METHOD: sqlite3 -** -** The sqlite3_exec() interface is a convenience wrapper around -** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()], -** that allows an application to run multiple statements of SQL -** without having to use a lot of C code. -** -** ^The sqlite3_exec() interface runs zero or more UTF-8 encoded, -** semicolon-separate SQL statements passed into its 2nd argument, -** in the context of the [database connection] passed in as its 1st -** argument. ^If the callback function of the 3rd argument to -** sqlite3_exec() is not NULL, then it is invoked for each result row -** coming out of the evaluated SQL statements. ^The 4th argument to -** sqlite3_exec() is relayed through to the 1st argument of each -** callback invocation. ^If the callback pointer to sqlite3_exec() -** is NULL, then no callback is ever invoked and result rows are -** ignored. -** -** ^If an error occurs while evaluating the SQL statements passed into -** sqlite3_exec(), then execution of the current statement stops and -** subsequent statements are skipped. ^If the 5th parameter to sqlite3_exec() -** is not NULL then any error message is written into memory obtained -** from [sqlite3_malloc()] and passed back through the 5th parameter. -** To avoid memory leaks, the application should invoke [sqlite3_free()] -** on error message strings returned through the 5th parameter of -** sqlite3_exec() after the error message string is no longer needed. -** ^If the 5th parameter to sqlite3_exec() is not NULL and no errors -** occur, then sqlite3_exec() sets the pointer in its 5th parameter to -** NULL before returning. -** -** ^If an sqlite3_exec() callback returns non-zero, the sqlite3_exec() -** routine returns SQLITE_ABORT without invoking the callback again and -** without running any subsequent SQL statements. -** -** ^The 2nd argument to the sqlite3_exec() callback function is the -** number of columns in the result. ^The 3rd argument to the sqlite3_exec() -** callback is an array of pointers to strings obtained as if from -** [sqlite3_column_text()], one for each column. ^If an element of a -** result row is NULL then the corresponding string pointer for the -** sqlite3_exec() callback is a NULL pointer. ^The 4th argument to the -** sqlite3_exec() callback is an array of pointers to strings where each -** entry represents the name of corresponding result column as obtained -** from [sqlite3_column_name()]. -** -** ^If the 2nd parameter to sqlite3_exec() is a NULL pointer, a pointer -** to an empty string, or a pointer that contains only whitespace and/or -** SQL comments, then no SQL statements are evaluated and the database -** is not changed. -** -** Restrictions: -** -** <ul> -** <li> The application must ensure that the 1st parameter to sqlite3_exec() -** is a valid and open [database connection]. -** <li> The application must not close the [database connection] specified by -** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running. -** <li> The application must not modify the SQL statement text passed into -** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. -** </ul> -*/ -SQLITE_API int sqlite3_exec( - sqlite3*, /* An open database */ - const char *sql, /* SQL to be evaluated */ - int (*callback)(void*,int,char**,char**), /* Callback function */ - void *, /* 1st argument to callback */ - char **errmsg /* Error msg written here */ -); - -/* -** CAPI3REF: Result Codes -** KEYWORDS: {result code definitions} -** -** Many SQLite functions return an integer result code from the set shown -** here in order to indicate success or failure. -** -** New error codes may be added in future versions of SQLite. -** -** See also: [extended result code definitions] -*/ -#define SQLITE_OK 0 /* Successful result */ -/* beginning-of-error-codes */ -#define SQLITE_ERROR 1 /* SQL error or missing database */ -#define SQLITE_INTERNAL 2 /* Internal logic error in SQLite */ -#define SQLITE_PERM 3 /* Access permission denied */ -#define SQLITE_ABORT 4 /* Callback routine requested an abort */ -#define SQLITE_BUSY 5 /* The database file is locked */ -#define SQLITE_LOCKED 6 /* A table in the database is locked */ -#define SQLITE_NOMEM 7 /* A malloc() failed */ -#define SQLITE_READONLY 8 /* Attempt to write a readonly database */ -#define SQLITE_INTERRUPT 9 /* Operation terminated by sqlite3_interrupt()*/ -#define SQLITE_IOERR 10 /* Some kind of disk I/O error occurred */ -#define SQLITE_CORRUPT 11 /* The database disk image is malformed */ -#define SQLITE_NOTFOUND 12 /* Unknown opcode in sqlite3_file_control() */ -#define SQLITE_FULL 13 /* Insertion failed because database is full */ -#define SQLITE_CANTOPEN 14 /* Unable to open the database file */ -#define SQLITE_PROTOCOL 15 /* Database lock protocol error */ -#define SQLITE_EMPTY 16 /* Database is empty */ -#define SQLITE_SCHEMA 17 /* The database schema changed */ -#define SQLITE_TOOBIG 18 /* String or BLOB exceeds size limit */ -#define SQLITE_CONSTRAINT 19 /* Abort due to constraint violation */ -#define SQLITE_MISMATCH 20 /* Data type mismatch */ -#define SQLITE_MISUSE 21 /* Library used incorrectly */ -#define SQLITE_NOLFS 22 /* Uses OS features not supported on host */ -#define SQLITE_AUTH 23 /* Authorization denied */ -#define SQLITE_FORMAT 24 /* Auxiliary database format error */ -#define SQLITE_RANGE 25 /* 2nd parameter to sqlite3_bind out of range */ -#define SQLITE_NOTADB 26 /* File opened that is not a database file */ -#define SQLITE_NOTICE 27 /* Notifications from sqlite3_log() */ -#define SQLITE_WARNING 28 /* Warnings from sqlite3_log() */ -#define SQLITE_ROW 100 /* sqlite3_step() has another row ready */ -#define SQLITE_DONE 101 /* sqlite3_step() has finished executing */ -/* end-of-error-codes */ - -/* -** CAPI3REF: Extended Result Codes -** KEYWORDS: {extended result code definitions} -** -** In its default configuration, SQLite API routines return one of 30 integer -** [result codes]. However, experience has shown that many of -** these result codes are too coarse-grained. They do not provide as -** much information about problems as programmers might like. In an effort to -** address this, newer versions of SQLite (version 3.3.8 [dateof:3.3.8] -** and later) include -** support for additional result codes that provide more detailed information -** about errors. These [extended result codes] are enabled or disabled -** on a per database connection basis using the -** [sqlite3_extended_result_codes()] API. Or, the extended code for -** the most recent error can be obtained using -** [sqlite3_extended_errcode()]. -*/ -#define SQLITE_IOERR_READ (SQLITE_IOERR | (1<<8)) -#define SQLITE_IOERR_SHORT_READ (SQLITE_IOERR | (2<<8)) -#define SQLITE_IOERR_WRITE (SQLITE_IOERR | (3<<8)) -#define SQLITE_IOERR_FSYNC (SQLITE_IOERR | (4<<8)) -#define SQLITE_IOERR_DIR_FSYNC (SQLITE_IOERR | (5<<8)) -#define SQLITE_IOERR_TRUNCATE (SQLITE_IOERR | (6<<8)) -#define SQLITE_IOERR_FSTAT (SQLITE_IOERR | (7<<8)) -#define SQLITE_IOERR_UNLOCK (SQLITE_IOERR | (8<<8)) -#define SQLITE_IOERR_RDLOCK (SQLITE_IOERR | (9<<8)) -#define SQLITE_IOERR_DELETE (SQLITE_IOERR | (10<<8)) -#define SQLITE_IOERR_BLOCKED (SQLITE_IOERR | (11<<8)) -#define SQLITE_IOERR_NOMEM (SQLITE_IOERR | (12<<8)) -#define SQLITE_IOERR_ACCESS (SQLITE_IOERR | (13<<8)) -#define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14<<8)) -#define SQLITE_IOERR_LOCK (SQLITE_IOERR | (15<<8)) -#define SQLITE_IOERR_CLOSE (SQLITE_IOERR | (16<<8)) -#define SQLITE_IOERR_DIR_CLOSE (SQLITE_IOERR | (17<<8)) -#define SQLITE_IOERR_SHMOPEN (SQLITE_IOERR | (18<<8)) -#define SQLITE_IOERR_SHMSIZE (SQLITE_IOERR | (19<<8)) -#define SQLITE_IOERR_SHMLOCK (SQLITE_IOERR | (20<<8)) -#define SQLITE_IOERR_SHMMAP (SQLITE_IOERR | (21<<8)) -#define SQLITE_IOERR_SEEK (SQLITE_IOERR | (22<<8)) -#define SQLITE_IOERR_DELETE_NOENT (SQLITE_IOERR | (23<<8)) -#define SQLITE_IOERR_MMAP (SQLITE_IOERR | (24<<8)) -#define SQLITE_IOERR_GETTEMPPATH (SQLITE_IOERR | (25<<8)) -#define SQLITE_IOERR_CONVPATH (SQLITE_IOERR | (26<<8)) -#define SQLITE_IOERR_VNODE (SQLITE_IOERR | (27<<8)) -#define SQLITE_IOERR_AUTH (SQLITE_IOERR | (28<<8)) -#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8)) -#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8)) -#define SQLITE_BUSY_SNAPSHOT (SQLITE_BUSY | (2<<8)) -#define SQLITE_CANTOPEN_NOTEMPDIR (SQLITE_CANTOPEN | (1<<8)) -#define SQLITE_CANTOPEN_ISDIR (SQLITE_CANTOPEN | (2<<8)) -#define SQLITE_CANTOPEN_FULLPATH (SQLITE_CANTOPEN | (3<<8)) -#define SQLITE_CANTOPEN_CONVPATH (SQLITE_CANTOPEN | (4<<8)) -#define SQLITE_CORRUPT_VTAB (SQLITE_CORRUPT | (1<<8)) -#define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1<<8)) -#define SQLITE_READONLY_CANTLOCK (SQLITE_READONLY | (2<<8)) -#define SQLITE_READONLY_ROLLBACK (SQLITE_READONLY | (3<<8)) -#define SQLITE_READONLY_DBMOVED (SQLITE_READONLY | (4<<8)) -#define SQLITE_ABORT_ROLLBACK (SQLITE_ABORT | (2<<8)) -#define SQLITE_CONSTRAINT_CHECK (SQLITE_CONSTRAINT | (1<<8)) -#define SQLITE_CONSTRAINT_COMMITHOOK (SQLITE_CONSTRAINT | (2<<8)) -#define SQLITE_CONSTRAINT_FOREIGNKEY (SQLITE_CONSTRAINT | (3<<8)) -#define SQLITE_CONSTRAINT_FUNCTION (SQLITE_CONSTRAINT | (4<<8)) -#define SQLITE_CONSTRAINT_NOTNULL (SQLITE_CONSTRAINT | (5<<8)) -#define SQLITE_CONSTRAINT_PRIMARYKEY (SQLITE_CONSTRAINT | (6<<8)) -#define SQLITE_CONSTRAINT_TRIGGER (SQLITE_CONSTRAINT | (7<<8)) -#define SQLITE_CONSTRAINT_UNIQUE (SQLITE_CONSTRAINT | (8<<8)) -#define SQLITE_CONSTRAINT_VTAB (SQLITE_CONSTRAINT | (9<<8)) -#define SQLITE_CONSTRAINT_ROWID (SQLITE_CONSTRAINT |(10<<8)) -#define SQLITE_NOTICE_RECOVER_WAL (SQLITE_NOTICE | (1<<8)) -#define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8)) -#define SQLITE_WARNING_AUTOINDEX (SQLITE_WARNING | (1<<8)) -#define SQLITE_AUTH_USER (SQLITE_AUTH | (1<<8)) -#define SQLITE_OK_LOAD_PERMANENTLY (SQLITE_OK | (1<<8)) - -/* -** CAPI3REF: Flags For File Open Operations -** -** These bit values are intended for use in the -** 3rd parameter to the [sqlite3_open_v2()] interface and -** in the 4th parameter to the [sqlite3_vfs.xOpen] method. -*/ -#define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_DELETEONCLOSE 0x00000008 /* VFS only */ -#define SQLITE_OPEN_EXCLUSIVE 0x00000010 /* VFS only */ -#define SQLITE_OPEN_AUTOPROXY 0x00000020 /* VFS only */ -#define SQLITE_OPEN_URI 0x00000040 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_MEMORY 0x00000080 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_MAIN_DB 0x00000100 /* VFS only */ -#define SQLITE_OPEN_TEMP_DB 0x00000200 /* VFS only */ -#define SQLITE_OPEN_TRANSIENT_DB 0x00000400 /* VFS only */ -#define SQLITE_OPEN_MAIN_JOURNAL 0x00000800 /* VFS only */ -#define SQLITE_OPEN_TEMP_JOURNAL 0x00001000 /* VFS only */ -#define SQLITE_OPEN_SUBJOURNAL 0x00002000 /* VFS only */ -#define SQLITE_OPEN_MASTER_JOURNAL 0x00004000 /* VFS only */ -#define SQLITE_OPEN_NOMUTEX 0x00008000 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_FULLMUTEX 0x00010000 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_SHAREDCACHE 0x00020000 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_PRIVATECACHE 0x00040000 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_WAL 0x00080000 /* VFS only */ - -/* Reserved: 0x00F00000 */ - -/* -** CAPI3REF: Device Characteristics -** -** The xDeviceCharacteristics method of the [sqlite3_io_methods] -** object returns an integer which is a vector of these -** bit values expressing I/O characteristics of the mass storage -** device that holds the file that the [sqlite3_io_methods] -** refers to. -** -** The SQLITE_IOCAP_ATOMIC property means that all writes of -** any size are atomic. The SQLITE_IOCAP_ATOMICnnn values -** mean that writes of blocks that are nnn bytes in size and -** are aligned to an address which is an integer multiple of -** nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means -** that when data is appended to a file, the data is appended -** first then the size of the file is extended, never the other -** way around. The SQLITE_IOCAP_SEQUENTIAL property means that -** information is written to disk in the same order as calls -** to xWrite(). The SQLITE_IOCAP_POWERSAFE_OVERWRITE property means that -** after reboot following a crash or power loss, the only bytes in a -** file that were written at the application level might have changed -** and that adjacent bytes, even bytes within the same sector are -** guaranteed to be unchanged. The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN -** flag indicate that a file cannot be deleted when open. The -** SQLITE_IOCAP_IMMUTABLE flag indicates that the file is on -** read-only media and cannot be changed even by processes with -** elevated privileges. -*/ -#define SQLITE_IOCAP_ATOMIC 0x00000001 -#define SQLITE_IOCAP_ATOMIC512 0x00000002 -#define SQLITE_IOCAP_ATOMIC1K 0x00000004 -#define SQLITE_IOCAP_ATOMIC2K 0x00000008 -#define SQLITE_IOCAP_ATOMIC4K 0x00000010 -#define SQLITE_IOCAP_ATOMIC8K 0x00000020 -#define SQLITE_IOCAP_ATOMIC16K 0x00000040 -#define SQLITE_IOCAP_ATOMIC32K 0x00000080 -#define SQLITE_IOCAP_ATOMIC64K 0x00000100 -#define SQLITE_IOCAP_SAFE_APPEND 0x00000200 -#define SQLITE_IOCAP_SEQUENTIAL 0x00000400 -#define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN 0x00000800 -#define SQLITE_IOCAP_POWERSAFE_OVERWRITE 0x00001000 -#define SQLITE_IOCAP_IMMUTABLE 0x00002000 - -/* -** CAPI3REF: File Locking Levels -** -** SQLite uses one of these integer values as the second -** argument to calls it makes to the xLock() and xUnlock() methods -** of an [sqlite3_io_methods] object. -*/ -#define SQLITE_LOCK_NONE 0 -#define SQLITE_LOCK_SHARED 1 -#define SQLITE_LOCK_RESERVED 2 -#define SQLITE_LOCK_PENDING 3 -#define SQLITE_LOCK_EXCLUSIVE 4 - -/* -** CAPI3REF: Synchronization Type Flags -** -** When SQLite invokes the xSync() method of an -** [sqlite3_io_methods] object it uses a combination of -** these integer values as the second argument. -** -** When the SQLITE_SYNC_DATAONLY flag is used, it means that the -** sync operation only needs to flush data to mass storage. Inode -** information need not be flushed. If the lower four bits of the flag -** equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics. -** If the lower four bits equal SQLITE_SYNC_FULL, that means -** to use Mac OS X style fullsync instead of fsync(). -** -** Do not confuse the SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags -** with the [PRAGMA synchronous]=NORMAL and [PRAGMA synchronous]=FULL -** settings. The [synchronous pragma] determines when calls to the -** xSync VFS method occur and applies uniformly across all platforms. -** The SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags determine how -** energetic or rigorous or forceful the sync operations are and -** only make a difference on Mac OSX for the default SQLite code. -** (Third-party VFS implementations might also make the distinction -** between SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL, but among the -** operating systems natively supported by SQLite, only Mac OSX -** cares about the difference.) -*/ -#define SQLITE_SYNC_NORMAL 0x00002 -#define SQLITE_SYNC_FULL 0x00003 -#define SQLITE_SYNC_DATAONLY 0x00010 - -/* -** CAPI3REF: OS Interface Open File Handle -** -** An [sqlite3_file] object represents an open file in the -** [sqlite3_vfs | OS interface layer]. Individual OS interface -** implementations will -** want to subclass this object by appending additional fields -** for their own use. The pMethods entry is a pointer to an -** [sqlite3_io_methods] object that defines methods for performing -** I/O operations on the open file. -*/ -typedef struct sqlite3_file sqlite3_file; -struct sqlite3_file { - const struct sqlite3_io_methods *pMethods; /* Methods for an open file */ -}; - -/* -** CAPI3REF: OS Interface File Virtual Methods Object -** -** Every file opened by the [sqlite3_vfs.xOpen] method populates an -** [sqlite3_file] object (or, more commonly, a subclass of the -** [sqlite3_file] object) with a pointer to an instance of this object. -** This object defines the methods used to perform various operations -** against the open file represented by the [sqlite3_file] object. -** -** If the [sqlite3_vfs.xOpen] method sets the sqlite3_file.pMethods element -** to a non-NULL pointer, then the sqlite3_io_methods.xClose method -** may be invoked even if the [sqlite3_vfs.xOpen] reported that it failed. The -** only way to prevent a call to xClose following a failed [sqlite3_vfs.xOpen] -** is for the [sqlite3_vfs.xOpen] to set the sqlite3_file.pMethods element -** to NULL. -** -** The flags argument to xSync may be one of [SQLITE_SYNC_NORMAL] or -** [SQLITE_SYNC_FULL]. The first choice is the normal fsync(). -** The second choice is a Mac OS X style fullsync. The [SQLITE_SYNC_DATAONLY] -** flag may be ORed in to indicate that only the data of the file -** and not its inode needs to be synced. -** -** The integer values to xLock() and xUnlock() are one of -** <ul> -** <li> [SQLITE_LOCK_NONE], -** <li> [SQLITE_LOCK_SHARED], -** <li> [SQLITE_LOCK_RESERVED], -** <li> [SQLITE_LOCK_PENDING], or -** <li> [SQLITE_LOCK_EXCLUSIVE]. -** </ul> -** xLock() increases the lock. xUnlock() decreases the lock. -** The xCheckReservedLock() method checks whether any database connection, -** either in this process or in some other process, is holding a RESERVED, -** PENDING, or EXCLUSIVE lock on the file. It returns true -** if such a lock exists and false otherwise. -** -** The xFileControl() method is a generic interface that allows custom -** VFS implementations to directly control an open file using the -** [sqlite3_file_control()] interface. The second "op" argument is an -** integer opcode. The third argument is a generic pointer intended to -** point to a structure that may contain arguments or space in which to -** write return values. Potential uses for xFileControl() might be -** functions to enable blocking locks with timeouts, to change the -** locking strategy (for example to use dot-file locks), to inquire -** about the status of a lock, or to break stale locks. The SQLite -** core reserves all opcodes less than 100 for its own use. -** A [file control opcodes | list of opcodes] less than 100 is available. -** Applications that define a custom xFileControl method should use opcodes -** greater than 100 to avoid conflicts. VFS implementations should -** return [SQLITE_NOTFOUND] for file control opcodes that they do not -** recognize. -** -** The xSectorSize() method returns the sector size of the -** device that underlies the file. The sector size is the -** minimum write that can be performed without disturbing -** other bytes in the file. The xDeviceCharacteristics() -** method returns a bit vector describing behaviors of the -** underlying device: -** -** <ul> -** <li> [SQLITE_IOCAP_ATOMIC] -** <li> [SQLITE_IOCAP_ATOMIC512] -** <li> [SQLITE_IOCAP_ATOMIC1K] -** <li> [SQLITE_IOCAP_ATOMIC2K] -** <li> [SQLITE_IOCAP_ATOMIC4K] -** <li> [SQLITE_IOCAP_ATOMIC8K] -** <li> [SQLITE_IOCAP_ATOMIC16K] -** <li> [SQLITE_IOCAP_ATOMIC32K] -** <li> [SQLITE_IOCAP_ATOMIC64K] -** <li> [SQLITE_IOCAP_SAFE_APPEND] -** <li> [SQLITE_IOCAP_SEQUENTIAL] -** </ul> -** -** The SQLITE_IOCAP_ATOMIC property means that all writes of -** any size are atomic. The SQLITE_IOCAP_ATOMICnnn values -** mean that writes of blocks that are nnn bytes in size and -** are aligned to an address which is an integer multiple of -** nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means -** that when data is appended to a file, the data is appended -** first then the size of the file is extended, never the other -** way around. The SQLITE_IOCAP_SEQUENTIAL property means that -** information is written to disk in the same order as calls -** to xWrite(). -** -** If xRead() returns SQLITE_IOERR_SHORT_READ it must also fill -** in the unread portions of the buffer with zeros. A VFS that -** fails to zero-fill short reads might seem to work. However, -** failure to zero-fill short reads will eventually lead to -** database corruption. -*/ -typedef struct sqlite3_io_methods sqlite3_io_methods; -struct sqlite3_io_methods { - int iVersion; - int (*xClose)(sqlite3_file*); - int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst); - int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst); - int (*xTruncate)(sqlite3_file*, sqlite3_int64 size); - int (*xSync)(sqlite3_file*, int flags); - int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize); - int (*xLock)(sqlite3_file*, int); - int (*xUnlock)(sqlite3_file*, int); - int (*xCheckReservedLock)(sqlite3_file*, int *pResOut); - int (*xFileControl)(sqlite3_file*, int op, void *pArg); - int (*xSectorSize)(sqlite3_file*); - int (*xDeviceCharacteristics)(sqlite3_file*); - /* Methods above are valid for version 1 */ - int (*xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**); - int (*xShmLock)(sqlite3_file*, int offset, int n, int flags); - void (*xShmBarrier)(sqlite3_file*); - int (*xShmUnmap)(sqlite3_file*, int deleteFlag); - /* Methods above are valid for version 2 */ - int (*xFetch)(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp); - int (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p); - /* Methods above are valid for version 3 */ - /* Additional methods may be added in future releases */ -}; - -/* -** CAPI3REF: Standard File Control Opcodes -** KEYWORDS: {file control opcodes} {file control opcode} -** -** These integer constants are opcodes for the xFileControl method -** of the [sqlite3_io_methods] object and for the [sqlite3_file_control()] -** interface. -** -** <ul> -** <li>[[SQLITE_FCNTL_LOCKSTATE]] -** The [SQLITE_FCNTL_LOCKSTATE] opcode is used for debugging. This -** opcode causes the xFileControl method to write the current state of -** the lock (one of [SQLITE_LOCK_NONE], [SQLITE_LOCK_SHARED], -** [SQLITE_LOCK_RESERVED], [SQLITE_LOCK_PENDING], or [SQLITE_LOCK_EXCLUSIVE]) -** into an integer that the pArg argument points to. This capability -** is used during testing and is only available when the SQLITE_TEST -** compile-time option is used. -** -** <li>[[SQLITE_FCNTL_SIZE_HINT]] -** The [SQLITE_FCNTL_SIZE_HINT] opcode is used by SQLite to give the VFS -** layer a hint of how large the database file will grow to be during the -** current transaction. This hint is not guaranteed to be accurate but it -** is often close. The underlying VFS might choose to preallocate database -** file space based on this hint in order to help writes to the database -** file run faster. -** -** <li>[[SQLITE_FCNTL_CHUNK_SIZE]] -** The [SQLITE_FCNTL_CHUNK_SIZE] opcode is used to request that the VFS -** extends and truncates the database file in chunks of a size specified -** by the user. The fourth argument to [sqlite3_file_control()] should -** point to an integer (type int) containing the new chunk-size to use -** for the nominated database. Allocating database file space in large -** chunks (say 1MB at a time), may reduce file-system fragmentation and -** improve performance on some systems. -** -** <li>[[SQLITE_FCNTL_FILE_POINTER]] -** The [SQLITE_FCNTL_FILE_POINTER] opcode is used to obtain a pointer -** to the [sqlite3_file] object associated with a particular database -** connection. See also [SQLITE_FCNTL_JOURNAL_POINTER]. -** -** <li>[[SQLITE_FCNTL_JOURNAL_POINTER]] -** The [SQLITE_FCNTL_JOURNAL_POINTER] opcode is used to obtain a pointer -** to the [sqlite3_file] object associated with the journal file (either -** the [rollback journal] or the [write-ahead log]) for a particular database -** connection. See also [SQLITE_FCNTL_FILE_POINTER]. -** -** <li>[[SQLITE_FCNTL_SYNC_OMITTED]] -** No longer in use. -** -** <li>[[SQLITE_FCNTL_SYNC]] -** The [SQLITE_FCNTL_SYNC] opcode is generated internally by SQLite and -** sent to the VFS immediately before the xSync method is invoked on a -** database file descriptor. Or, if the xSync method is not invoked -** because the user has configured SQLite with -** [PRAGMA synchronous | PRAGMA synchronous=OFF] it is invoked in place -** of the xSync method. In most cases, the pointer argument passed with -** this file-control is NULL. However, if the database file is being synced -** as part of a multi-database commit, the argument points to a nul-terminated -** string containing the transactions master-journal file name. VFSes that -** do not need this signal should silently ignore this opcode. Applications -** should not call [sqlite3_file_control()] with this opcode as doing so may -** disrupt the operation of the specialized VFSes that do require it. -** -** <li>[[SQLITE_FCNTL_COMMIT_PHASETWO]] -** The [SQLITE_FCNTL_COMMIT_PHASETWO] opcode is generated internally by SQLite -** and sent to the VFS after a transaction has been committed immediately -** but before the database is unlocked. VFSes that do not need this signal -** should silently ignore this opcode. Applications should not call -** [sqlite3_file_control()] with this opcode as doing so may disrupt the -** operation of the specialized VFSes that do require it. -** -** <li>[[SQLITE_FCNTL_WIN32_AV_RETRY]] -** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic -** retry counts and intervals for certain disk I/O operations for the -** windows [VFS] in order to provide robustness in the presence of -** anti-virus programs. By default, the windows VFS will retry file read, -** file write, and file delete operations up to 10 times, with a delay -** of 25 milliseconds before the first retry and with the delay increasing -** by an additional 25 milliseconds with each subsequent retry. This -** opcode allows these two values (10 retries and 25 milliseconds of delay) -** to be adjusted. The values are changed for all database connections -** within the same process. The argument is a pointer to an array of two -** integers where the first integer i the new retry count and the second -** integer is the delay. If either integer is negative, then the setting -** is not changed but instead the prior value of that setting is written -** into the array entry, allowing the current retry settings to be -** interrogated. The zDbName parameter is ignored. -** -** <li>[[SQLITE_FCNTL_PERSIST_WAL]] -** ^The [SQLITE_FCNTL_PERSIST_WAL] opcode is used to set or query the -** persistent [WAL | Write Ahead Log] setting. By default, the auxiliary -** write ahead log and shared memory files used for transaction control -** are automatically deleted when the latest connection to the database -** closes. Setting persistent WAL mode causes those files to persist after -** close. Persisting the files is useful when other processes that do not -** have write permission on the directory containing the database file want -** to read the database file, as the WAL and shared memory files must exist -** in order for the database to be readable. The fourth parameter to -** [sqlite3_file_control()] for this opcode should be a pointer to an integer. -** That integer is 0 to disable persistent WAL mode or 1 to enable persistent -** WAL mode. If the integer is -1, then it is overwritten with the current -** WAL persistence setting. -** -** <li>[[SQLITE_FCNTL_POWERSAFE_OVERWRITE]] -** ^The [SQLITE_FCNTL_POWERSAFE_OVERWRITE] opcode is used to set or query the -** persistent "powersafe-overwrite" or "PSOW" setting. The PSOW setting -** determines the [SQLITE_IOCAP_POWERSAFE_OVERWRITE] bit of the -** xDeviceCharacteristics methods. The fourth parameter to -** [sqlite3_file_control()] for this opcode should be a pointer to an integer. -** That integer is 0 to disable zero-damage mode or 1 to enable zero-damage -** mode. If the integer is -1, then it is overwritten with the current -** zero-damage mode setting. -** -** <li>[[SQLITE_FCNTL_OVERWRITE]] -** ^The [SQLITE_FCNTL_OVERWRITE] opcode is invoked by SQLite after opening -** a write transaction to indicate that, unless it is rolled back for some -** reason, the entire database file will be overwritten by the current -** transaction. This is used by VACUUM operations. -** -** <li>[[SQLITE_FCNTL_VFSNAME]] -** ^The [SQLITE_FCNTL_VFSNAME] opcode can be used to obtain the names of -** all [VFSes] in the VFS stack. The names are of all VFS shims and the -** final bottom-level VFS are written into memory obtained from -** [sqlite3_malloc()] and the result is stored in the char* variable -** that the fourth parameter of [sqlite3_file_control()] points to. -** The caller is responsible for freeing the memory when done. As with -** all file-control actions, there is no guarantee that this will actually -** do anything. Callers should initialize the char* variable to a NULL -** pointer in case this file-control is not implemented. This file-control -** is intended for diagnostic use only. -** -** <li>[[SQLITE_FCNTL_VFS_POINTER]] -** ^The [SQLITE_FCNTL_VFS_POINTER] opcode finds a pointer to the top-level -** [VFSes] currently in use. ^(The argument X in -** sqlite3_file_control(db,SQLITE_FCNTL_VFS_POINTER,X) must be -** of type "[sqlite3_vfs] **". This opcodes will set *X -** to a pointer to the top-level VFS.)^ -** ^When there are multiple VFS shims in the stack, this opcode finds the -** upper-most shim only. -** -** <li>[[SQLITE_FCNTL_PRAGMA]] -** ^Whenever a [PRAGMA] statement is parsed, an [SQLITE_FCNTL_PRAGMA] -** file control is sent to the open [sqlite3_file] object corresponding -** to the database file to which the pragma statement refers. ^The argument -** to the [SQLITE_FCNTL_PRAGMA] file control is an array of -** pointers to strings (char**) in which the second element of the array -** is the name of the pragma and the third element is the argument to the -** pragma or NULL if the pragma has no argument. ^The handler for an -** [SQLITE_FCNTL_PRAGMA] file control can optionally make the first element -** of the char** argument point to a string obtained from [sqlite3_mprintf()] -** or the equivalent and that string will become the result of the pragma or -** the error message if the pragma fails. ^If the -** [SQLITE_FCNTL_PRAGMA] file control returns [SQLITE_NOTFOUND], then normal -** [PRAGMA] processing continues. ^If the [SQLITE_FCNTL_PRAGMA] -** file control returns [SQLITE_OK], then the parser assumes that the -** VFS has handled the PRAGMA itself and the parser generates a no-op -** prepared statement if result string is NULL, or that returns a copy -** of the result string if the string is non-NULL. -** ^If the [SQLITE_FCNTL_PRAGMA] file control returns -** any result code other than [SQLITE_OK] or [SQLITE_NOTFOUND], that means -** that the VFS encountered an error while handling the [PRAGMA] and the -** compilation of the PRAGMA fails with an error. ^The [SQLITE_FCNTL_PRAGMA] -** file control occurs at the beginning of pragma statement analysis and so -** it is able to override built-in [PRAGMA] statements. -** -** <li>[[SQLITE_FCNTL_BUSYHANDLER]] -** ^The [SQLITE_FCNTL_BUSYHANDLER] -** file-control may be invoked by SQLite on the database file handle -** shortly after it is opened in order to provide a custom VFS with access -** to the connections busy-handler callback. The argument is of type (void **) -** - an array of two (void *) values. The first (void *) actually points -** to a function of type (int (*)(void *)). In order to invoke the connections -** busy-handler, this function should be invoked with the second (void *) in -** the array as the only argument. If it returns non-zero, then the operation -** should be retried. If it returns zero, the custom VFS should abandon the -** current operation. -** -** <li>[[SQLITE_FCNTL_TEMPFILENAME]] -** ^Application can invoke the [SQLITE_FCNTL_TEMPFILENAME] file-control -** to have SQLite generate a -** temporary filename using the same algorithm that is followed to generate -** temporary filenames for TEMP tables and other internal uses. The -** argument should be a char** which will be filled with the filename -** written into memory obtained from [sqlite3_malloc()]. The caller should -** invoke [sqlite3_free()] on the result to avoid a memory leak. -** -** <li>[[SQLITE_FCNTL_MMAP_SIZE]] -** The [SQLITE_FCNTL_MMAP_SIZE] file control is used to query or set the -** maximum number of bytes that will be used for memory-mapped I/O. -** The argument is a pointer to a value of type sqlite3_int64 that -** is an advisory maximum number of bytes in the file to memory map. The -** pointer is overwritten with the old value. The limit is not changed if -** the value originally pointed to is negative, and so the current limit -** can be queried by passing in a pointer to a negative number. This -** file-control is used internally to implement [PRAGMA mmap_size]. -** -** <li>[[SQLITE_FCNTL_TRACE]] -** The [SQLITE_FCNTL_TRACE] file control provides advisory information -** to the VFS about what the higher layers of the SQLite stack are doing. -** This file control is used by some VFS activity tracing [shims]. -** The argument is a zero-terminated string. Higher layers in the -** SQLite stack may generate instances of this file control if -** the [SQLITE_USE_FCNTL_TRACE] compile-time option is enabled. -** -** <li>[[SQLITE_FCNTL_HAS_MOVED]] -** The [SQLITE_FCNTL_HAS_MOVED] file control interprets its argument as a -** pointer to an integer and it writes a boolean into that integer depending -** on whether or not the file has been renamed, moved, or deleted since it -** was first opened. -** -** <li>[[SQLITE_FCNTL_WIN32_GET_HANDLE]] -** The [SQLITE_FCNTL_WIN32_GET_HANDLE] opcode can be used to obtain the -** underlying native file handle associated with a file handle. This file -** control interprets its argument as a pointer to a native file handle and -** writes the resulting value there. -** -** <li>[[SQLITE_FCNTL_WIN32_SET_HANDLE]] -** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This -** opcode causes the xFileControl method to swap the file handle with the one -** pointed to by the pArg argument. This capability is used during testing -** and only needs to be supported when SQLITE_TEST is defined. -** -** <li>[[SQLITE_FCNTL_WAL_BLOCK]] -** The [SQLITE_FCNTL_WAL_BLOCK] is a signal to the VFS layer that it might -** be advantageous to block on the next WAL lock if the lock is not immediately -** available. The WAL subsystem issues this signal during rare -** circumstances in order to fix a problem with priority inversion. -** Applications should <em>not</em> use this file-control. -** -** <li>[[SQLITE_FCNTL_ZIPVFS]] -** The [SQLITE_FCNTL_ZIPVFS] opcode is implemented by zipvfs only. All other -** VFS should return SQLITE_NOTFOUND for this opcode. -** -** <li>[[SQLITE_FCNTL_RBU]] -** The [SQLITE_FCNTL_RBU] opcode is implemented by the special VFS used by -** the RBU extension only. All other VFS should return SQLITE_NOTFOUND for -** this opcode. -** </ul> -*/ -#define SQLITE_FCNTL_LOCKSTATE 1 -#define SQLITE_FCNTL_GET_LOCKPROXYFILE 2 -#define SQLITE_FCNTL_SET_LOCKPROXYFILE 3 -#define SQLITE_FCNTL_LAST_ERRNO 4 -#define SQLITE_FCNTL_SIZE_HINT 5 -#define SQLITE_FCNTL_CHUNK_SIZE 6 -#define SQLITE_FCNTL_FILE_POINTER 7 -#define SQLITE_FCNTL_SYNC_OMITTED 8 -#define SQLITE_FCNTL_WIN32_AV_RETRY 9 -#define SQLITE_FCNTL_PERSIST_WAL 10 -#define SQLITE_FCNTL_OVERWRITE 11 -#define SQLITE_FCNTL_VFSNAME 12 -#define SQLITE_FCNTL_POWERSAFE_OVERWRITE 13 -#define SQLITE_FCNTL_PRAGMA 14 -#define SQLITE_FCNTL_BUSYHANDLER 15 -#define SQLITE_FCNTL_TEMPFILENAME 16 -#define SQLITE_FCNTL_MMAP_SIZE 18 -#define SQLITE_FCNTL_TRACE 19 -#define SQLITE_FCNTL_HAS_MOVED 20 -#define SQLITE_FCNTL_SYNC 21 -#define SQLITE_FCNTL_COMMIT_PHASETWO 22 -#define SQLITE_FCNTL_WIN32_SET_HANDLE 23 -#define SQLITE_FCNTL_WAL_BLOCK 24 -#define SQLITE_FCNTL_ZIPVFS 25 -#define SQLITE_FCNTL_RBU 26 -#define SQLITE_FCNTL_VFS_POINTER 27 -#define SQLITE_FCNTL_JOURNAL_POINTER 28 -#define SQLITE_FCNTL_WIN32_GET_HANDLE 29 - -/* deprecated names */ -#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE -#define SQLITE_SET_LOCKPROXYFILE SQLITE_FCNTL_SET_LOCKPROXYFILE -#define SQLITE_LAST_ERRNO SQLITE_FCNTL_LAST_ERRNO - - -/* -** CAPI3REF: Mutex Handle -** -** The mutex module within SQLite defines [sqlite3_mutex] to be an -** abstract type for a mutex object. The SQLite core never looks -** at the internal representation of an [sqlite3_mutex]. It only -** deals with pointers to the [sqlite3_mutex] object. -** -** Mutexes are created using [sqlite3_mutex_alloc()]. -*/ -typedef struct sqlite3_mutex sqlite3_mutex; - -/* -** CAPI3REF: Loadable Extension Thunk -** -** A pointer to the opaque sqlite3_api_routines structure is passed as -** the third parameter to entry points of [loadable extensions]. This -** structure must be typedefed in order to work around compiler warnings -** on some platforms. -*/ -typedef struct sqlite3_api_routines sqlite3_api_routines; - -/* -** CAPI3REF: OS Interface Object -** -** An instance of the sqlite3_vfs object defines the interface between -** the SQLite core and the underlying operating system. The "vfs" -** in the name of the object stands for "virtual file system". See -** the [VFS | VFS documentation] for further information. -** -** The value of the iVersion field is initially 1 but may be larger in -** future versions of SQLite. Additional fields may be appended to this -** object when the iVersion value is increased. Note that the structure -** of the sqlite3_vfs object changes in the transaction between -** SQLite version 3.5.9 and 3.6.0 and yet the iVersion field was not -** modified. -** -** The szOsFile field is the size of the subclassed [sqlite3_file] -** structure used by this VFS. mxPathname is the maximum length of -** a pathname in this VFS. -** -** Registered sqlite3_vfs objects are kept on a linked list formed by -** the pNext pointer. The [sqlite3_vfs_register()] -** and [sqlite3_vfs_unregister()] interfaces manage this list -** in a thread-safe way. The [sqlite3_vfs_find()] interface -** searches the list. Neither the application code nor the VFS -** implementation should use the pNext pointer. -** -** The pNext field is the only field in the sqlite3_vfs -** structure that SQLite will ever modify. SQLite will only access -** or modify this field while holding a particular static mutex. -** The application should never modify anything within the sqlite3_vfs -** object once the object has been registered. -** -** The zName field holds the name of the VFS module. The name must -** be unique across all VFS modules. -** -** [[sqlite3_vfs.xOpen]] -** ^SQLite guarantees that the zFilename parameter to xOpen -** is either a NULL pointer or string obtained -** from xFullPathname() with an optional suffix added. -** ^If a suffix is added to the zFilename parameter, it will -** consist of a single "-" character followed by no more than -** 11 alphanumeric and/or "-" characters. -** ^SQLite further guarantees that -** the string will be valid and unchanged until xClose() is -** called. Because of the previous sentence, -** the [sqlite3_file] can safely store a pointer to the -** filename if it needs to remember the filename for some reason. -** If the zFilename parameter to xOpen is a NULL pointer then xOpen -** must invent its own temporary name for the file. ^Whenever the -** xFilename parameter is NULL it will also be the case that the -** flags parameter will include [SQLITE_OPEN_DELETEONCLOSE]. -** -** The flags argument to xOpen() includes all bits set in -** the flags argument to [sqlite3_open_v2()]. Or if [sqlite3_open()] -** or [sqlite3_open16()] is used, then flags includes at least -** [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]. -** If xOpen() opens a file read-only then it sets *pOutFlags to -** include [SQLITE_OPEN_READONLY]. Other bits in *pOutFlags may be set. -** -** ^(SQLite will also add one of the following flags to the xOpen() -** call, depending on the object being opened: -** -** <ul> -** <li> [SQLITE_OPEN_MAIN_DB] -** <li> [SQLITE_OPEN_MAIN_JOURNAL] -** <li> [SQLITE_OPEN_TEMP_DB] -** <li> [SQLITE_OPEN_TEMP_JOURNAL] -** <li> [SQLITE_OPEN_TRANSIENT_DB] -** <li> [SQLITE_OPEN_SUBJOURNAL] -** <li> [SQLITE_OPEN_MASTER_JOURNAL] -** <li> [SQLITE_OPEN_WAL] -** </ul>)^ -** -** The file I/O implementation can use the object type flags to -** change the way it deals with files. For example, an application -** that does not care about crash recovery or rollback might make -** the open of a journal file a no-op. Writes to this journal would -** also be no-ops, and any attempt to read the journal would return -** SQLITE_IOERR. Or the implementation might recognize that a database -** file will be doing page-aligned sector reads and writes in a random -** order and set up its I/O subsystem accordingly. -** -** SQLite might also add one of the following flags to the xOpen method: -** -** <ul> -** <li> [SQLITE_OPEN_DELETEONCLOSE] -** <li> [SQLITE_OPEN_EXCLUSIVE] -** </ul> -** -** The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be -** deleted when it is closed. ^The [SQLITE_OPEN_DELETEONCLOSE] -** will be set for TEMP databases and their journals, transient -** databases, and subjournals. -** -** ^The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction -** with the [SQLITE_OPEN_CREATE] flag, which are both directly -** analogous to the O_EXCL and O_CREAT flags of the POSIX open() -** API. The SQLITE_OPEN_EXCLUSIVE flag, when paired with the -** SQLITE_OPEN_CREATE, is used to indicate that file should always -** be created, and that it is an error if it already exists. -** It is <i>not</i> used to indicate the file should be opened -** for exclusive access. -** -** ^At least szOsFile bytes of memory are allocated by SQLite -** to hold the [sqlite3_file] structure passed as the third -** argument to xOpen. The xOpen method does not have to -** allocate the structure; it should just fill it in. Note that -** the xOpen method must set the sqlite3_file.pMethods to either -** a valid [sqlite3_io_methods] object or to NULL. xOpen must do -** this even if the open fails. SQLite expects that the sqlite3_file.pMethods -** element will be valid after xOpen returns regardless of the success -** or failure of the xOpen call. -** -** [[sqlite3_vfs.xAccess]] -** ^The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS] -** to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to -** test whether a file is readable and writable, or [SQLITE_ACCESS_READ] -** to test whether a file is at least readable. The file can be a -** directory. -** -** ^SQLite will always allocate at least mxPathname+1 bytes for the -** output buffer xFullPathname. The exact size of the output buffer -** is also passed as a parameter to both methods. If the output buffer -** is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is -** handled as a fatal error by SQLite, vfs implementations should endeavor -** to prevent this by setting mxPathname to a sufficiently large value. -** -** The xRandomness(), xSleep(), xCurrentTime(), and xCurrentTimeInt64() -** interfaces are not strictly a part of the filesystem, but they are -** included in the VFS structure for completeness. -** The xRandomness() function attempts to return nBytes bytes -** of good-quality randomness into zOut. The return value is -** the actual number of bytes of randomness obtained. -** The xSleep() method causes the calling thread to sleep for at -** least the number of microseconds given. ^The xCurrentTime() -** method returns a Julian Day Number for the current date and time as -** a floating point value. -** ^The xCurrentTimeInt64() method returns, as an integer, the Julian -** Day Number multiplied by 86400000 (the number of milliseconds in -** a 24-hour day). -** ^SQLite will use the xCurrentTimeInt64() method to get the current -** date and time if that method is available (if iVersion is 2 or -** greater and the function pointer is not NULL) and will fall back -** to xCurrentTime() if xCurrentTimeInt64() is unavailable. -** -** ^The xSetSystemCall(), xGetSystemCall(), and xNestSystemCall() interfaces -** are not used by the SQLite core. These optional interfaces are provided -** by some VFSes to facilitate testing of the VFS code. By overriding -** system calls with functions under its control, a test program can -** simulate faults and error conditions that would otherwise be difficult -** or impossible to induce. The set of system calls that can be overridden -** varies from one VFS to another, and from one version of the same VFS to the -** next. Applications that use these interfaces must be prepared for any -** or all of these interfaces to be NULL or for their behavior to change -** from one release to the next. Applications must not attempt to access -** any of these methods if the iVersion of the VFS is less than 3. -*/ -typedef struct sqlite3_vfs sqlite3_vfs; -typedef void (*sqlite3_syscall_ptr)(void); -struct sqlite3_vfs { - int iVersion; /* Structure version number (currently 3) */ - int szOsFile; /* Size of subclassed sqlite3_file */ - int mxPathname; /* Maximum file pathname length */ - sqlite3_vfs *pNext; /* Next registered VFS */ - const char *zName; /* Name of this virtual file system */ - void *pAppData; /* Pointer to application-specific data */ - int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*, - int flags, int *pOutFlags); - int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir); - int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut); - int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut); - void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename); - void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg); - void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); - void (*xDlClose)(sqlite3_vfs*, void*); - int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut); - int (*xSleep)(sqlite3_vfs*, int microseconds); - int (*xCurrentTime)(sqlite3_vfs*, double*); - int (*xGetLastError)(sqlite3_vfs*, int, char *); - /* - ** The methods above are in version 1 of the sqlite_vfs object - ** definition. Those that follow are added in version 2 or later - */ - int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*); - /* - ** The methods above are in versions 1 and 2 of the sqlite_vfs object. - ** Those below are for version 3 and greater. - */ - int (*xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr); - sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs*, const char *zName); - const char *(*xNextSystemCall)(sqlite3_vfs*, const char *zName); - /* - ** The methods above are in versions 1 through 3 of the sqlite_vfs object. - ** New fields may be appended in future versions. The iVersion - ** value will increment whenever this happens. - */ -}; - -/* -** CAPI3REF: Flags for the xAccess VFS method -** -** These integer constants can be used as the third parameter to -** the xAccess method of an [sqlite3_vfs] object. They determine -** what kind of permissions the xAccess method is looking for. -** With SQLITE_ACCESS_EXISTS, the xAccess method -** simply checks whether the file exists. -** With SQLITE_ACCESS_READWRITE, the xAccess method -** checks whether the named directory is both readable and writable -** (in other words, if files can be added, removed, and renamed within -** the directory). -** The SQLITE_ACCESS_READWRITE constant is currently used only by the -** [temp_store_directory pragma], though this could change in a future -** release of SQLite. -** With SQLITE_ACCESS_READ, the xAccess method -** checks whether the file is readable. The SQLITE_ACCESS_READ constant is -** currently unused, though it might be used in a future release of -** SQLite. -*/ -#define SQLITE_ACCESS_EXISTS 0 -#define SQLITE_ACCESS_READWRITE 1 /* Used by PRAGMA temp_store_directory */ -#define SQLITE_ACCESS_READ 2 /* Unused */ - -/* -** CAPI3REF: Flags for the xShmLock VFS method -** -** These integer constants define the various locking operations -** allowed by the xShmLock method of [sqlite3_io_methods]. The -** following are the only legal combinations of flags to the -** xShmLock method: -** -** <ul> -** <li> SQLITE_SHM_LOCK | SQLITE_SHM_SHARED -** <li> SQLITE_SHM_LOCK | SQLITE_SHM_EXCLUSIVE -** <li> SQLITE_SHM_UNLOCK | SQLITE_SHM_SHARED -** <li> SQLITE_SHM_UNLOCK | SQLITE_SHM_EXCLUSIVE -** </ul> -** -** When unlocking, the same SHARED or EXCLUSIVE flag must be supplied as -** was given on the corresponding lock. -** -** The xShmLock method can transition between unlocked and SHARED or -** between unlocked and EXCLUSIVE. It cannot transition between SHARED -** and EXCLUSIVE. -*/ -#define SQLITE_SHM_UNLOCK 1 -#define SQLITE_SHM_LOCK 2 -#define SQLITE_SHM_SHARED 4 -#define SQLITE_SHM_EXCLUSIVE 8 - -/* -** CAPI3REF: Maximum xShmLock index -** -** The xShmLock method on [sqlite3_io_methods] may use values -** between 0 and this upper bound as its "offset" argument. -** The SQLite core will never attempt to acquire or release a -** lock outside of this range -*/ -#define SQLITE_SHM_NLOCK 8 - - -/* -** CAPI3REF: Initialize The SQLite Library -** -** ^The sqlite3_initialize() routine initializes the -** SQLite library. ^The sqlite3_shutdown() routine -** deallocates any resources that were allocated by sqlite3_initialize(). -** These routines are designed to aid in process initialization and -** shutdown on embedded systems. Workstation applications using -** SQLite normally do not need to invoke either of these routines. -** -** A call to sqlite3_initialize() is an "effective" call if it is -** the first time sqlite3_initialize() is invoked during the lifetime of -** the process, or if it is the first time sqlite3_initialize() is invoked -** following a call to sqlite3_shutdown(). ^(Only an effective call -** of sqlite3_initialize() does any initialization. All other calls -** are harmless no-ops.)^ -** -** A call to sqlite3_shutdown() is an "effective" call if it is the first -** call to sqlite3_shutdown() since the last sqlite3_initialize(). ^(Only -** an effective call to sqlite3_shutdown() does any deinitialization. -** All other valid calls to sqlite3_shutdown() are harmless no-ops.)^ -** -** The sqlite3_initialize() interface is threadsafe, but sqlite3_shutdown() -** is not. The sqlite3_shutdown() interface must only be called from a -** single thread. All open [database connections] must be closed and all -** other SQLite resources must be deallocated prior to invoking -** sqlite3_shutdown(). -** -** Among other things, ^sqlite3_initialize() will invoke -** sqlite3_os_init(). Similarly, ^sqlite3_shutdown() -** will invoke sqlite3_os_end(). -** -** ^The sqlite3_initialize() routine returns [SQLITE_OK] on success. -** ^If for some reason, sqlite3_initialize() is unable to initialize -** the library (perhaps it is unable to allocate a needed resource such -** as a mutex) it returns an [error code] other than [SQLITE_OK]. -** -** ^The sqlite3_initialize() routine is called internally by many other -** SQLite interfaces so that an application usually does not need to -** invoke sqlite3_initialize() directly. For example, [sqlite3_open()] -** calls sqlite3_initialize() so the SQLite library will be automatically -** initialized when [sqlite3_open()] is called if it has not be initialized -** already. ^However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT] -** compile-time option, then the automatic calls to sqlite3_initialize() -** are omitted and the application must call sqlite3_initialize() directly -** prior to using any other SQLite interface. For maximum portability, -** it is recommended that applications always invoke sqlite3_initialize() -** directly prior to using any other SQLite interface. Future releases -** of SQLite may require this. In other words, the behavior exhibited -** when SQLite is compiled with [SQLITE_OMIT_AUTOINIT] might become the -** default behavior in some future release of SQLite. -** -** The sqlite3_os_init() routine does operating-system specific -** initialization of the SQLite library. The sqlite3_os_end() -** routine undoes the effect of sqlite3_os_init(). Typical tasks -** performed by these routines include allocation or deallocation -** of static resources, initialization of global variables, -** setting up a default [sqlite3_vfs] module, or setting up -** a default configuration using [sqlite3_config()]. -** -** The application should never invoke either sqlite3_os_init() -** or sqlite3_os_end() directly. The application should only invoke -** sqlite3_initialize() and sqlite3_shutdown(). The sqlite3_os_init() -** interface is called automatically by sqlite3_initialize() and -** sqlite3_os_end() is called by sqlite3_shutdown(). Appropriate -** implementations for sqlite3_os_init() and sqlite3_os_end() -** are built into SQLite when it is compiled for Unix, Windows, or OS/2. -** When [custom builds | built for other platforms] -** (using the [SQLITE_OS_OTHER=1] compile-time -** option) the application must supply a suitable implementation for -** sqlite3_os_init() and sqlite3_os_end(). An application-supplied -** implementation of sqlite3_os_init() or sqlite3_os_end() -** must return [SQLITE_OK] on success and some other [error code] upon -** failure. -*/ -SQLITE_API int sqlite3_initialize(void); -SQLITE_API int sqlite3_shutdown(void); -SQLITE_API int sqlite3_os_init(void); -SQLITE_API int sqlite3_os_end(void); - -/* -** CAPI3REF: Configuring The SQLite Library -** -** The sqlite3_config() interface is used to make global configuration -** changes to SQLite in order to tune SQLite to the specific needs of -** the application. The default configuration is recommended for most -** applications and so this routine is usually not necessary. It is -** provided to support rare applications with unusual needs. -** -** <b>The sqlite3_config() interface is not threadsafe. The application -** must ensure that no other SQLite interfaces are invoked by other -** threads while sqlite3_config() is running.</b> -** -** The sqlite3_config() interface -** may only be invoked prior to library initialization using -** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()]. -** ^If sqlite3_config() is called after [sqlite3_initialize()] and before -** [sqlite3_shutdown()] then it will return SQLITE_MISUSE. -** Note, however, that ^sqlite3_config() can be called as part of the -** implementation of an application-defined [sqlite3_os_init()]. -** -** The first argument to sqlite3_config() is an integer -** [configuration option] that determines -** what property of SQLite is to be configured. Subsequent arguments -** vary depending on the [configuration option] -** in the first argument. -** -** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK]. -** ^If the option is unknown or SQLite is unable to set the option -** then this routine returns a non-zero [error code]. -*/ -SQLITE_API int sqlite3_config(int, ...); - -/* -** CAPI3REF: Configure database connections -** METHOD: sqlite3 -** -** The sqlite3_db_config() interface is used to make configuration -** changes to a [database connection]. The interface is similar to -** [sqlite3_config()] except that the changes apply to a single -** [database connection] (specified in the first argument). -** -** The second argument to sqlite3_db_config(D,V,...) is the -** [SQLITE_DBCONFIG_LOOKASIDE | configuration verb] - an integer code -** that indicates what aspect of the [database connection] is being configured. -** Subsequent arguments vary depending on the configuration verb. -** -** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if -** the call is considered successful. -*/ -SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...); - -/* -** CAPI3REF: Memory Allocation Routines -** -** An instance of this object defines the interface between SQLite -** and low-level memory allocation routines. -** -** This object is used in only one place in the SQLite interface. -** A pointer to an instance of this object is the argument to -** [sqlite3_config()] when the configuration option is -** [SQLITE_CONFIG_MALLOC] or [SQLITE_CONFIG_GETMALLOC]. -** By creating an instance of this object -** and passing it to [sqlite3_config]([SQLITE_CONFIG_MALLOC]) -** during configuration, an application can specify an alternative -** memory allocation subsystem for SQLite to use for all of its -** dynamic memory needs. -** -** Note that SQLite comes with several [built-in memory allocators] -** that are perfectly adequate for the overwhelming majority of applications -** and that this object is only useful to a tiny minority of applications -** with specialized memory allocation requirements. This object is -** also used during testing of SQLite in order to specify an alternative -** memory allocator that simulates memory out-of-memory conditions in -** order to verify that SQLite recovers gracefully from such -** conditions. -** -** The xMalloc, xRealloc, and xFree methods must work like the -** malloc(), realloc() and free() functions from the standard C library. -** ^SQLite guarantees that the second argument to -** xRealloc is always a value returned by a prior call to xRoundup. -** -** xSize should return the allocated size of a memory allocation -** previously obtained from xMalloc or xRealloc. The allocated size -** is always at least as big as the requested size but may be larger. -** -** The xRoundup method returns what would be the allocated size of -** a memory allocation given a particular requested size. Most memory -** allocators round up memory allocations at least to the next multiple -** of 8. Some allocators round up to a larger multiple or to a power of 2. -** Every memory allocation request coming in through [sqlite3_malloc()] -** or [sqlite3_realloc()] first calls xRoundup. If xRoundup returns 0, -** that causes the corresponding memory allocation to fail. -** -** The xInit method initializes the memory allocator. For example, -** it might allocate any require mutexes or initialize internal data -** structures. The xShutdown method is invoked (indirectly) by -** [sqlite3_shutdown()] and should deallocate any resources acquired -** by xInit. The pAppData pointer is used as the only parameter to -** xInit and xShutdown. -** -** SQLite holds the [SQLITE_MUTEX_STATIC_MASTER] mutex when it invokes -** the xInit method, so the xInit method need not be threadsafe. The -** xShutdown method is only called from [sqlite3_shutdown()] so it does -** not need to be threadsafe either. For all other methods, SQLite -** holds the [SQLITE_MUTEX_STATIC_MEM] mutex as long as the -** [SQLITE_CONFIG_MEMSTATUS] configuration option is turned on (which -** it is by default) and so the methods are automatically serialized. -** However, if [SQLITE_CONFIG_MEMSTATUS] is disabled, then the other -** methods must be threadsafe or else make their own arrangements for -** serialization. -** -** SQLite will never invoke xInit() more than once without an intervening -** call to xShutdown(). -*/ -typedef struct sqlite3_mem_methods sqlite3_mem_methods; -struct sqlite3_mem_methods { - void *(*xMalloc)(int); /* Memory allocation function */ - void (*xFree)(void*); /* Free a prior allocation */ - void *(*xRealloc)(void*,int); /* Resize an allocation */ - int (*xSize)(void*); /* Return the size of an allocation */ - int (*xRoundup)(int); /* Round up request size to allocation size */ - int (*xInit)(void*); /* Initialize the memory allocator */ - void (*xShutdown)(void*); /* Deinitialize the memory allocator */ - void *pAppData; /* Argument to xInit() and xShutdown() */ -}; - -/* -** CAPI3REF: Configuration Options -** KEYWORDS: {configuration option} -** -** These constants are the available integer configuration options that -** can be passed as the first argument to the [sqlite3_config()] interface. -** -** New configuration options may be added in future releases of SQLite. -** Existing configuration options might be discontinued. Applications -** should check the return code from [sqlite3_config()] to make sure that -** the call worked. The [sqlite3_config()] interface will return a -** non-zero [error code] if a discontinued or unsupported configuration option -** is invoked. -** -** <dl> -** [[SQLITE_CONFIG_SINGLETHREAD]] <dt>SQLITE_CONFIG_SINGLETHREAD</dt> -** <dd>There are no arguments to this option. ^This option sets the -** [threading mode] to Single-thread. In other words, it disables -** all mutexing and puts SQLite into a mode where it can only be used -** by a single thread. ^If SQLite is compiled with -** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then -** it is not possible to change the [threading mode] from its default -** value of Single-thread and so [sqlite3_config()] will return -** [SQLITE_ERROR] if called with the SQLITE_CONFIG_SINGLETHREAD -** configuration option.</dd> -** -** [[SQLITE_CONFIG_MULTITHREAD]] <dt>SQLITE_CONFIG_MULTITHREAD</dt> -** <dd>There are no arguments to this option. ^This option sets the -** [threading mode] to Multi-thread. In other words, it disables -** mutexing on [database connection] and [prepared statement] objects. -** The application is responsible for serializing access to -** [database connections] and [prepared statements]. But other mutexes -** are enabled so that SQLite will be safe to use in a multi-threaded -** environment as long as no two threads attempt to use the same -** [database connection] at the same time. ^If SQLite is compiled with -** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then -** it is not possible to set the Multi-thread [threading mode] and -** [sqlite3_config()] will return [SQLITE_ERROR] if called with the -** SQLITE_CONFIG_MULTITHREAD configuration option.</dd> -** -** [[SQLITE_CONFIG_SERIALIZED]] <dt>SQLITE_CONFIG_SERIALIZED</dt> -** <dd>There are no arguments to this option. ^This option sets the -** [threading mode] to Serialized. In other words, this option enables -** all mutexes including the recursive -** mutexes on [database connection] and [prepared statement] objects. -** In this mode (which is the default when SQLite is compiled with -** [SQLITE_THREADSAFE=1]) the SQLite library will itself serialize access -** to [database connections] and [prepared statements] so that the -** application is free to use the same [database connection] or the -** same [prepared statement] in different threads at the same time. -** ^If SQLite is compiled with -** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then -** it is not possible to set the Serialized [threading mode] and -** [sqlite3_config()] will return [SQLITE_ERROR] if called with the -** SQLITE_CONFIG_SERIALIZED configuration option.</dd> -** -** [[SQLITE_CONFIG_MALLOC]] <dt>SQLITE_CONFIG_MALLOC</dt> -** <dd> ^(The SQLITE_CONFIG_MALLOC option takes a single argument which is -** a pointer to an instance of the [sqlite3_mem_methods] structure. -** The argument specifies -** alternative low-level memory allocation routines to be used in place of -** the memory allocation routines built into SQLite.)^ ^SQLite makes -** its own private copy of the content of the [sqlite3_mem_methods] structure -** before the [sqlite3_config()] call returns.</dd> -** -** [[SQLITE_CONFIG_GETMALLOC]] <dt>SQLITE_CONFIG_GETMALLOC</dt> -** <dd> ^(The SQLITE_CONFIG_GETMALLOC option takes a single argument which -** is a pointer to an instance of the [sqlite3_mem_methods] structure. -** The [sqlite3_mem_methods] -** structure is filled with the currently defined memory allocation routines.)^ -** This option can be used to overload the default memory allocation -** routines with a wrapper that simulations memory allocation failure or -** tracks memory usage, for example. </dd> -** -** [[SQLITE_CONFIG_MEMSTATUS]] <dt>SQLITE_CONFIG_MEMSTATUS</dt> -** <dd> ^The SQLITE_CONFIG_MEMSTATUS option takes single argument of type int, -** interpreted as a boolean, which enables or disables the collection of -** memory allocation statistics. ^(When memory allocation statistics are -** disabled, the following SQLite interfaces become non-operational: -** <ul> -** <li> [sqlite3_memory_used()] -** <li> [sqlite3_memory_highwater()] -** <li> [sqlite3_soft_heap_limit64()] -** <li> [sqlite3_status64()] -** </ul>)^ -** ^Memory allocation statistics are enabled by default unless SQLite is -** compiled with [SQLITE_DEFAULT_MEMSTATUS]=0 in which case memory -** allocation statistics are disabled by default. -** </dd> -** -** [[SQLITE_CONFIG_SCRATCH]] <dt>SQLITE_CONFIG_SCRATCH</dt> -** <dd> ^The SQLITE_CONFIG_SCRATCH option specifies a static memory buffer -** that SQLite can use for scratch memory. ^(There are three arguments -** to SQLITE_CONFIG_SCRATCH: A pointer an 8-byte -** aligned memory buffer from which the scratch allocations will be -** drawn, the size of each scratch allocation (sz), -** and the maximum number of scratch allocations (N).)^ -** The first argument must be a pointer to an 8-byte aligned buffer -** of at least sz*N bytes of memory. -** ^SQLite will not use more than one scratch buffers per thread. -** ^SQLite will never request a scratch buffer that is more than 6 -** times the database page size. -** ^If SQLite needs needs additional -** scratch memory beyond what is provided by this configuration option, then -** [sqlite3_malloc()] will be used to obtain the memory needed.<p> -** ^When the application provides any amount of scratch memory using -** SQLITE_CONFIG_SCRATCH, SQLite avoids unnecessary large -** [sqlite3_malloc|heap allocations]. -** This can help [Robson proof|prevent memory allocation failures] due to heap -** fragmentation in low-memory embedded systems. -** </dd> -** -** [[SQLITE_CONFIG_PAGECACHE]] <dt>SQLITE_CONFIG_PAGECACHE</dt> -** <dd> ^The SQLITE_CONFIG_PAGECACHE option specifies a memory pool -** that SQLite can use for the database page cache with the default page -** cache implementation. -** This configuration option is a no-op if an application-define page -** cache implementation is loaded using the [SQLITE_CONFIG_PCACHE2]. -** ^There are three arguments to SQLITE_CONFIG_PAGECACHE: A pointer to -** 8-byte aligned memory (pMem), the size of each page cache line (sz), -** and the number of cache lines (N). -** The sz argument should be the size of the largest database page -** (a power of two between 512 and 65536) plus some extra bytes for each -** page header. ^The number of extra bytes needed by the page header -** can be determined using [SQLITE_CONFIG_PCACHE_HDRSZ]. -** ^It is harmless, apart from the wasted memory, -** for the sz parameter to be larger than necessary. The pMem -** argument must be either a NULL pointer or a pointer to an 8-byte -** aligned block of memory of at least sz*N bytes, otherwise -** subsequent behavior is undefined. -** ^When pMem is not NULL, SQLite will strive to use the memory provided -** to satisfy page cache needs, falling back to [sqlite3_malloc()] if -** a page cache line is larger than sz bytes or if all of the pMem buffer -** is exhausted. -** ^If pMem is NULL and N is non-zero, then each database connection -** does an initial bulk allocation for page cache memory -** from [sqlite3_malloc()] sufficient for N cache lines if N is positive or -** of -1024*N bytes if N is negative, . ^If additional -** page cache memory is needed beyond what is provided by the initial -** allocation, then SQLite goes to [sqlite3_malloc()] separately for each -** additional cache line. </dd> -** -** [[SQLITE_CONFIG_HEAP]] <dt>SQLITE_CONFIG_HEAP</dt> -** <dd> ^The SQLITE_CONFIG_HEAP option specifies a static memory buffer -** that SQLite will use for all of its dynamic memory allocation needs -** beyond those provided for by [SQLITE_CONFIG_SCRATCH] and -** [SQLITE_CONFIG_PAGECACHE]. -** ^The SQLITE_CONFIG_HEAP option is only available if SQLite is compiled -** with either [SQLITE_ENABLE_MEMSYS3] or [SQLITE_ENABLE_MEMSYS5] and returns -** [SQLITE_ERROR] if invoked otherwise. -** ^There are three arguments to SQLITE_CONFIG_HEAP: -** An 8-byte aligned pointer to the memory, -** the number of bytes in the memory buffer, and the minimum allocation size. -** ^If the first pointer (the memory pointer) is NULL, then SQLite reverts -** to using its default memory allocator (the system malloc() implementation), -** undoing any prior invocation of [SQLITE_CONFIG_MALLOC]. ^If the -** memory pointer is not NULL then the alternative memory -** allocator is engaged to handle all of SQLites memory allocation needs. -** The first pointer (the memory pointer) must be aligned to an 8-byte -** boundary or subsequent behavior of SQLite will be undefined. -** The minimum allocation size is capped at 2**12. Reasonable values -** for the minimum allocation size are 2**5 through 2**8.</dd> -** -** [[SQLITE_CONFIG_MUTEX]] <dt>SQLITE_CONFIG_MUTEX</dt> -** <dd> ^(The SQLITE_CONFIG_MUTEX option takes a single argument which is a -** pointer to an instance of the [sqlite3_mutex_methods] structure. -** The argument specifies alternative low-level mutex routines to be used -** in place the mutex routines built into SQLite.)^ ^SQLite makes a copy of -** the content of the [sqlite3_mutex_methods] structure before the call to -** [sqlite3_config()] returns. ^If SQLite is compiled with -** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then -** the entire mutexing subsystem is omitted from the build and hence calls to -** [sqlite3_config()] with the SQLITE_CONFIG_MUTEX configuration option will -** return [SQLITE_ERROR].</dd> -** -** [[SQLITE_CONFIG_GETMUTEX]] <dt>SQLITE_CONFIG_GETMUTEX</dt> -** <dd> ^(The SQLITE_CONFIG_GETMUTEX option takes a single argument which -** is a pointer to an instance of the [sqlite3_mutex_methods] structure. The -** [sqlite3_mutex_methods] -** structure is filled with the currently defined mutex routines.)^ -** This option can be used to overload the default mutex allocation -** routines with a wrapper used to track mutex usage for performance -** profiling or testing, for example. ^If SQLite is compiled with -** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then -** the entire mutexing subsystem is omitted from the build and hence calls to -** [sqlite3_config()] with the SQLITE_CONFIG_GETMUTEX configuration option will -** return [SQLITE_ERROR].</dd> -** -** [[SQLITE_CONFIG_LOOKASIDE]] <dt>SQLITE_CONFIG_LOOKASIDE</dt> -** <dd> ^(The SQLITE_CONFIG_LOOKASIDE option takes two arguments that determine -** the default size of lookaside memory on each [database connection]. -** The first argument is the -** size of each lookaside buffer slot and the second is the number of -** slots allocated to each database connection.)^ ^(SQLITE_CONFIG_LOOKASIDE -** sets the <i>default</i> lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE] -** option to [sqlite3_db_config()] can be used to change the lookaside -** configuration on individual connections.)^ </dd> -** -** [[SQLITE_CONFIG_PCACHE2]] <dt>SQLITE_CONFIG_PCACHE2</dt> -** <dd> ^(The SQLITE_CONFIG_PCACHE2 option takes a single argument which is -** a pointer to an [sqlite3_pcache_methods2] object. This object specifies -** the interface to a custom page cache implementation.)^ -** ^SQLite makes a copy of the [sqlite3_pcache_methods2] object.</dd> -** -** [[SQLITE_CONFIG_GETPCACHE2]] <dt>SQLITE_CONFIG_GETPCACHE2</dt> -** <dd> ^(The SQLITE_CONFIG_GETPCACHE2 option takes a single argument which -** is a pointer to an [sqlite3_pcache_methods2] object. SQLite copies of -** the current page cache implementation into that object.)^ </dd> -** -** [[SQLITE_CONFIG_LOG]] <dt>SQLITE_CONFIG_LOG</dt> -** <dd> The SQLITE_CONFIG_LOG option is used to configure the SQLite -** global [error log]. -** (^The SQLITE_CONFIG_LOG option takes two arguments: a pointer to a -** function with a call signature of void(*)(void*,int,const char*), -** and a pointer to void. ^If the function pointer is not NULL, it is -** invoked by [sqlite3_log()] to process each logging event. ^If the -** function pointer is NULL, the [sqlite3_log()] interface becomes a no-op. -** ^The void pointer that is the second argument to SQLITE_CONFIG_LOG is -** passed through as the first parameter to the application-defined logger -** function whenever that function is invoked. ^The second parameter to -** the logger function is a copy of the first parameter to the corresponding -** [sqlite3_log()] call and is intended to be a [result code] or an -** [extended result code]. ^The third parameter passed to the logger is -** log message after formatting via [sqlite3_snprintf()]. -** The SQLite logging interface is not reentrant; the logger function -** supplied by the application must not invoke any SQLite interface. -** In a multi-threaded application, the application-defined logger -** function must be threadsafe. </dd> -** -** [[SQLITE_CONFIG_URI]] <dt>SQLITE_CONFIG_URI -** <dd>^(The SQLITE_CONFIG_URI option takes a single argument of type int. -** If non-zero, then URI handling is globally enabled. If the parameter is zero, -** then URI handling is globally disabled.)^ ^If URI handling is globally -** enabled, all filenames passed to [sqlite3_open()], [sqlite3_open_v2()], -** [sqlite3_open16()] or -** specified as part of [ATTACH] commands are interpreted as URIs, regardless -** of whether or not the [SQLITE_OPEN_URI] flag is set when the database -** connection is opened. ^If it is globally disabled, filenames are -** only interpreted as URIs if the SQLITE_OPEN_URI flag is set when the -** database connection is opened. ^(By default, URI handling is globally -** disabled. The default value may be changed by compiling with the -** [SQLITE_USE_URI] symbol defined.)^ -** -** [[SQLITE_CONFIG_COVERING_INDEX_SCAN]] <dt>SQLITE_CONFIG_COVERING_INDEX_SCAN -** <dd>^The SQLITE_CONFIG_COVERING_INDEX_SCAN option takes a single integer -** argument which is interpreted as a boolean in order to enable or disable -** the use of covering indices for full table scans in the query optimizer. -** ^The default setting is determined -** by the [SQLITE_ALLOW_COVERING_INDEX_SCAN] compile-time option, or is "on" -** if that compile-time option is omitted. -** The ability to disable the use of covering indices for full table scans -** is because some incorrectly coded legacy applications might malfunction -** when the optimization is enabled. Providing the ability to -** disable the optimization allows the older, buggy application code to work -** without change even with newer versions of SQLite. -** -** [[SQLITE_CONFIG_PCACHE]] [[SQLITE_CONFIG_GETPCACHE]] -** <dt>SQLITE_CONFIG_PCACHE and SQLITE_CONFIG_GETPCACHE -** <dd> These options are obsolete and should not be used by new code. -** They are retained for backwards compatibility but are now no-ops. -** </dd> -** -** [[SQLITE_CONFIG_SQLLOG]] -** <dt>SQLITE_CONFIG_SQLLOG -** <dd>This option is only available if sqlite is compiled with the -** [SQLITE_ENABLE_SQLLOG] pre-processor macro defined. The first argument should -** be a pointer to a function of type void(*)(void*,sqlite3*,const char*, int). -** The second should be of type (void*). The callback is invoked by the library -** in three separate circumstances, identified by the value passed as the -** fourth parameter. If the fourth parameter is 0, then the database connection -** passed as the second argument has just been opened. The third argument -** points to a buffer containing the name of the main database file. If the -** fourth parameter is 1, then the SQL statement that the third parameter -** points to has just been executed. Or, if the fourth parameter is 2, then -** the connection being passed as the second parameter is being closed. The -** third parameter is passed NULL In this case. An example of using this -** configuration option can be seen in the "test_sqllog.c" source file in -** the canonical SQLite source tree.</dd> -** -** [[SQLITE_CONFIG_MMAP_SIZE]] -** <dt>SQLITE_CONFIG_MMAP_SIZE -** <dd>^SQLITE_CONFIG_MMAP_SIZE takes two 64-bit integer (sqlite3_int64) values -** that are the default mmap size limit (the default setting for -** [PRAGMA mmap_size]) and the maximum allowed mmap size limit. -** ^The default setting can be overridden by each database connection using -** either the [PRAGMA mmap_size] command, or by using the -** [SQLITE_FCNTL_MMAP_SIZE] file control. ^(The maximum allowed mmap size -** will be silently truncated if necessary so that it does not exceed the -** compile-time maximum mmap size set by the -** [SQLITE_MAX_MMAP_SIZE] compile-time option.)^ -** ^If either argument to this option is negative, then that argument is -** changed to its compile-time default. -** -** [[SQLITE_CONFIG_WIN32_HEAPSIZE]] -** <dt>SQLITE_CONFIG_WIN32_HEAPSIZE -** <dd>^The SQLITE_CONFIG_WIN32_HEAPSIZE option is only available if SQLite is -** compiled for Windows with the [SQLITE_WIN32_MALLOC] pre-processor macro -** defined. ^SQLITE_CONFIG_WIN32_HEAPSIZE takes a 32-bit unsigned integer value -** that specifies the maximum size of the created heap. -** -** [[SQLITE_CONFIG_PCACHE_HDRSZ]] -** <dt>SQLITE_CONFIG_PCACHE_HDRSZ -** <dd>^The SQLITE_CONFIG_PCACHE_HDRSZ option takes a single parameter which -** is a pointer to an integer and writes into that integer the number of extra -** bytes per page required for each page in [SQLITE_CONFIG_PAGECACHE]. -** The amount of extra space required can change depending on the compiler, -** target platform, and SQLite version. -** -** [[SQLITE_CONFIG_PMASZ]] -** <dt>SQLITE_CONFIG_PMASZ -** <dd>^The SQLITE_CONFIG_PMASZ option takes a single parameter which -** is an unsigned integer and sets the "Minimum PMA Size" for the multithreaded -** sorter to that integer. The default minimum PMA Size is set by the -** [SQLITE_SORTER_PMASZ] compile-time option. New threads are launched -** to help with sort operations when multithreaded sorting -** is enabled (using the [PRAGMA threads] command) and the amount of content -** to be sorted exceeds the page size times the minimum of the -** [PRAGMA cache_size] setting and this value. -** -** [[SQLITE_CONFIG_STMTJRNL_SPILL]] -** <dt>SQLITE_CONFIG_STMTJRNL_SPILL -** <dd>^The SQLITE_CONFIG_STMTJRNL_SPILL option takes a single parameter which -** becomes the [statement journal] spill-to-disk threshold. -** [Statement journals] are held in memory until their size (in bytes) -** exceeds this threshold, at which point they are written to disk. -** Or if the threshold is -1, statement journals are always held -** exclusively in memory. -** Since many statement journals never become large, setting the spill -** threshold to a value such as 64KiB can greatly reduce the amount of -** I/O required to support statement rollback. -** The default value for this setting is controlled by the -** [SQLITE_STMTJRNL_SPILL] compile-time option. -** </dl> -*/ -#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */ -#define SQLITE_CONFIG_MULTITHREAD 2 /* nil */ -#define SQLITE_CONFIG_SERIALIZED 3 /* nil */ -#define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */ -#define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */ -#define SQLITE_CONFIG_SCRATCH 6 /* void*, int sz, int N */ -#define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */ -#define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */ -#define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */ -#define SQLITE_CONFIG_MUTEX 10 /* sqlite3_mutex_methods* */ -#define SQLITE_CONFIG_GETMUTEX 11 /* sqlite3_mutex_methods* */ -/* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ -#define SQLITE_CONFIG_LOOKASIDE 13 /* int int */ -#define SQLITE_CONFIG_PCACHE 14 /* no-op */ -#define SQLITE_CONFIG_GETPCACHE 15 /* no-op */ -#define SQLITE_CONFIG_LOG 16 /* xFunc, void* */ -#define SQLITE_CONFIG_URI 17 /* int */ -#define SQLITE_CONFIG_PCACHE2 18 /* sqlite3_pcache_methods2* */ -#define SQLITE_CONFIG_GETPCACHE2 19 /* sqlite3_pcache_methods2* */ -#define SQLITE_CONFIG_COVERING_INDEX_SCAN 20 /* int */ -#define SQLITE_CONFIG_SQLLOG 21 /* xSqllog, void* */ -#define SQLITE_CONFIG_MMAP_SIZE 22 /* sqlite3_int64, sqlite3_int64 */ -#define SQLITE_CONFIG_WIN32_HEAPSIZE 23 /* int nByte */ -#define SQLITE_CONFIG_PCACHE_HDRSZ 24 /* int *psz */ -#define SQLITE_CONFIG_PMASZ 25 /* unsigned int szPma */ -#define SQLITE_CONFIG_STMTJRNL_SPILL 26 /* int nByte */ - -/* -** CAPI3REF: Database Connection Configuration Options -** -** These constants are the available integer configuration options that -** can be passed as the second argument to the [sqlite3_db_config()] interface. -** -** New configuration options may be added in future releases of SQLite. -** Existing configuration options might be discontinued. Applications -** should check the return code from [sqlite3_db_config()] to make sure that -** the call worked. ^The [sqlite3_db_config()] interface will return a -** non-zero [error code] if a discontinued or unsupported configuration option -** is invoked. -** -** <dl> -** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt> -** <dd> ^This option takes three additional arguments that determine the -** [lookaside memory allocator] configuration for the [database connection]. -** ^The first argument (the third parameter to [sqlite3_db_config()] is a -** pointer to a memory buffer to use for lookaside memory. -** ^The first argument after the SQLITE_DBCONFIG_LOOKASIDE verb -** may be NULL in which case SQLite will allocate the -** lookaside buffer itself using [sqlite3_malloc()]. ^The second argument is the -** size of each lookaside buffer slot. ^The third argument is the number of -** slots. The size of the buffer in the first argument must be greater than -** or equal to the product of the second and third arguments. The buffer -** must be aligned to an 8-byte boundary. ^If the second argument to -** SQLITE_DBCONFIG_LOOKASIDE is not a multiple of 8, it is internally -** rounded down to the next smaller multiple of 8. ^(The lookaside memory -** configuration for a database connection can only be changed when that -** connection is not currently using lookaside memory, or in other words -** when the "current value" returned by -** [sqlite3_db_status](D,[SQLITE_CONFIG_LOOKASIDE],...) is zero. -** Any attempt to change the lookaside memory configuration when lookaside -** memory is in use leaves the configuration unchanged and returns -** [SQLITE_BUSY].)^</dd> -** -** <dt>SQLITE_DBCONFIG_ENABLE_FKEY</dt> -** <dd> ^This option is used to enable or disable the enforcement of -** [foreign key constraints]. There should be two additional arguments. -** The first argument is an integer which is 0 to disable FK enforcement, -** positive to enable FK enforcement or negative to leave FK enforcement -** unchanged. The second parameter is a pointer to an integer into which -** is written 0 or 1 to indicate whether FK enforcement is off or on -** following this call. The second parameter may be a NULL pointer, in -** which case the FK enforcement setting is not reported back. </dd> -** -** <dt>SQLITE_DBCONFIG_ENABLE_TRIGGER</dt> -** <dd> ^This option is used to enable or disable [CREATE TRIGGER | triggers]. -** There should be two additional arguments. -** The first argument is an integer which is 0 to disable triggers, -** positive to enable triggers or negative to leave the setting unchanged. -** The second parameter is a pointer to an integer into which -** is written 0 or 1 to indicate whether triggers are disabled or enabled -** following this call. The second parameter may be a NULL pointer, in -** which case the trigger setting is not reported back. </dd> -** -** <dt>SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</dt> -** <dd> ^This option is used to enable or disable the two-argument -** version of the [fts3_tokenizer()] function which is part of the -** [FTS3] full-text search engine extension. -** There should be two additional arguments. -** The first argument is an integer which is 0 to disable fts3_tokenizer() or -** positive to enable fts3_tokenizer() or negative to leave the setting -** unchanged. -** The second parameter is a pointer to an integer into which -** is written 0 or 1 to indicate whether fts3_tokenizer is disabled or enabled -** following this call. The second parameter may be a NULL pointer, in -** which case the new setting is not reported back. </dd> -** -** <dt>SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION</dt> -** <dd> ^This option is used to enable or disable the [sqlite3_load_extension()] -** interface independently of the [load_extension()] SQL function. -** The [sqlite3_enable_load_extension()] API enables or disables both the -** C-API [sqlite3_load_extension()] and the SQL function [load_extension()]. -** There should be two additional arguments. -** When the first argument to this interface is 1, then only the C-API is -** enabled and the SQL function remains disabled. If the first argument to -** this interface is 0, then both the C-API and the SQL function are disabled. -** If the first argument is -1, then no changes are made to state of either the -** C-API or the SQL function. -** The second parameter is a pointer to an integer into which -** is written 0 or 1 to indicate whether [sqlite3_load_extension()] interface -** is disabled or enabled following this call. The second parameter may -** be a NULL pointer, in which case the new setting is not reported back. -** </dd> -** -** <dt>SQLITE_DBCONFIG_MAINDBNAME</dt> -** <dd> ^This option is used to change the name of the "main" database -** schema. ^The sole argument is a pointer to a constant UTF8 string -** which will become the new schema name in place of "main". ^SQLite -** does not make a copy of the new main schema name string, so the application -** must ensure that the argument passed into this DBCONFIG option is unchanged -** until after the database connection closes. -** </dd> -** -** </dl> -*/ -#define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */ -#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */ -#define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */ -#define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */ -#define SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1004 /* int int* */ -#define SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION 1005 /* int int* */ - - -/* -** CAPI3REF: Enable Or Disable Extended Result Codes -** METHOD: sqlite3 -** -** ^The sqlite3_extended_result_codes() routine enables or disables the -** [extended result codes] feature of SQLite. ^The extended result -** codes are disabled by default for historical compatibility. -*/ -SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff); - -/* -** CAPI3REF: Last Insert Rowid -** METHOD: sqlite3 -** -** ^Each entry in most SQLite tables (except for [WITHOUT ROWID] tables) -** has a unique 64-bit signed -** integer key called the [ROWID | "rowid"]. ^The rowid is always available -** as an undeclared column named ROWID, OID, or _ROWID_ as long as those -** names are not also used by explicitly declared columns. ^If -** the table has a column of type [INTEGER PRIMARY KEY] then that column -** is another alias for the rowid. -** -** ^The sqlite3_last_insert_rowid(D) interface returns the [rowid] of the -** most recent successful [INSERT] into a rowid table or [virtual table] -** on database connection D. -** ^Inserts into [WITHOUT ROWID] tables are not recorded. -** ^If no successful [INSERT]s into rowid tables -** have ever occurred on the database connection D, -** then sqlite3_last_insert_rowid(D) returns zero. -** -** ^(If an [INSERT] occurs within a trigger or within a [virtual table] -** method, then this routine will return the [rowid] of the inserted -** row as long as the trigger or virtual table method is running. -** But once the trigger or virtual table method ends, the value returned -** by this routine reverts to what it was before the trigger or virtual -** table method began.)^ -** -** ^An [INSERT] that fails due to a constraint violation is not a -** successful [INSERT] and does not change the value returned by this -** routine. ^Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK, -** and INSERT OR ABORT make no changes to the return value of this -** routine when their insertion fails. ^(When INSERT OR REPLACE -** encounters a constraint violation, it does not fail. The -** INSERT continues to completion after deleting rows that caused -** the constraint problem so INSERT OR REPLACE will always change -** the return value of this interface.)^ -** -** ^For the purposes of this routine, an [INSERT] is considered to -** be successful even if it is subsequently rolled back. -** -** This function is accessible to SQL statements via the -** [last_insert_rowid() SQL function]. -** -** If a separate thread performs a new [INSERT] on the same -** database connection while the [sqlite3_last_insert_rowid()] -** function is running and thus changes the last insert [rowid], -** then the value returned by [sqlite3_last_insert_rowid()] is -** unpredictable and might not equal either the old or the new -** last insert [rowid]. -*/ -SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*); - -/* -** CAPI3REF: Count The Number Of Rows Modified -** METHOD: sqlite3 -** -** ^This function returns the number of rows modified, inserted or -** deleted by the most recently completed INSERT, UPDATE or DELETE -** statement on the database connection specified by the only parameter. -** ^Executing any other type of SQL statement does not modify the value -** returned by this function. -** -** ^Only changes made directly by the INSERT, UPDATE or DELETE statement are -** considered - auxiliary changes caused by [CREATE TRIGGER | triggers], -** [foreign key actions] or [REPLACE] constraint resolution are not counted. -** -** Changes to a view that are intercepted by -** [INSTEAD OF trigger | INSTEAD OF triggers] are not counted. ^The value -** returned by sqlite3_changes() immediately after an INSERT, UPDATE or -** DELETE statement run on a view is always zero. Only changes made to real -** tables are counted. -** -** Things are more complicated if the sqlite3_changes() function is -** executed while a trigger program is running. This may happen if the -** program uses the [changes() SQL function], or if some other callback -** function invokes sqlite3_changes() directly. Essentially: -** -** <ul> -** <li> ^(Before entering a trigger program the value returned by -** sqlite3_changes() function is saved. After the trigger program -** has finished, the original value is restored.)^ -** -** <li> ^(Within a trigger program each INSERT, UPDATE and DELETE -** statement sets the value returned by sqlite3_changes() -** upon completion as normal. Of course, this value will not include -** any changes performed by sub-triggers, as the sqlite3_changes() -** value will be saved and restored after each sub-trigger has run.)^ -** </ul> -** -** ^This means that if the changes() SQL function (or similar) is used -** by the first INSERT, UPDATE or DELETE statement within a trigger, it -** returns the value as set when the calling statement began executing. -** ^If it is used by the second or subsequent such statement within a trigger -** program, the value returned reflects the number of rows modified by the -** previous INSERT, UPDATE or DELETE statement within the same trigger. -** -** See also the [sqlite3_total_changes()] interface, the -** [count_changes pragma], and the [changes() SQL function]. -** -** If a separate thread makes changes on the same database connection -** while [sqlite3_changes()] is running then the value returned -** is unpredictable and not meaningful. -*/ -SQLITE_API int sqlite3_changes(sqlite3*); - -/* -** CAPI3REF: Total Number Of Rows Modified -** METHOD: sqlite3 -** -** ^This function returns the total number of rows inserted, modified or -** deleted by all [INSERT], [UPDATE] or [DELETE] statements completed -** since the database connection was opened, including those executed as -** part of trigger programs. ^Executing any other type of SQL statement -** does not affect the value returned by sqlite3_total_changes(). -** -** ^Changes made as part of [foreign key actions] are included in the -** count, but those made as part of REPLACE constraint resolution are -** not. ^Changes to a view that are intercepted by INSTEAD OF triggers -** are not counted. -** -** See also the [sqlite3_changes()] interface, the -** [count_changes pragma], and the [total_changes() SQL function]. -** -** If a separate thread makes changes on the same database connection -** while [sqlite3_total_changes()] is running then the value -** returned is unpredictable and not meaningful. -*/ -SQLITE_API int sqlite3_total_changes(sqlite3*); - -/* -** CAPI3REF: Interrupt A Long-Running Query -** METHOD: sqlite3 -** -** ^This function causes any pending database operation to abort and -** return at its earliest opportunity. This routine is typically -** called in response to a user action such as pressing "Cancel" -** or Ctrl-C where the user wants a long query operation to halt -** immediately. -** -** ^It is safe to call this routine from a thread different from the -** thread that is currently running the database operation. But it -** is not safe to call this routine with a [database connection] that -** is closed or might close before sqlite3_interrupt() returns. -** -** ^If an SQL operation is very nearly finished at the time when -** sqlite3_interrupt() is called, then it might not have an opportunity -** to be interrupted and might continue to completion. -** -** ^An SQL operation that is interrupted will return [SQLITE_INTERRUPT]. -** ^If the interrupted SQL operation is an INSERT, UPDATE, or DELETE -** that is inside an explicit transaction, then the entire transaction -** will be rolled back automatically. -** -** ^The sqlite3_interrupt(D) call is in effect until all currently running -** SQL statements on [database connection] D complete. ^Any new SQL statements -** that are started after the sqlite3_interrupt() call and before the -** running statements reaches zero are interrupted as if they had been -** running prior to the sqlite3_interrupt() call. ^New SQL statements -** that are started after the running statement count reaches zero are -** not effected by the sqlite3_interrupt(). -** ^A call to sqlite3_interrupt(D) that occurs when there are no running -** SQL statements is a no-op and has no effect on SQL statements -** that are started after the sqlite3_interrupt() call returns. -** -** If the database connection closes while [sqlite3_interrupt()] -** is running then bad things will likely happen. -*/ -SQLITE_API void sqlite3_interrupt(sqlite3*); - -/* -** CAPI3REF: Determine If An SQL Statement Is Complete -** -** These routines are useful during command-line input to determine if the -** currently entered text seems to form a complete SQL statement or -** if additional input is needed before sending the text into -** SQLite for parsing. ^These routines return 1 if the input string -** appears to be a complete SQL statement. ^A statement is judged to be -** complete if it ends with a semicolon token and is not a prefix of a -** well-formed CREATE TRIGGER statement. ^Semicolons that are embedded within -** string literals or quoted identifier names or comments are not -** independent tokens (they are part of the token in which they are -** embedded) and thus do not count as a statement terminator. ^Whitespace -** and comments that follow the final semicolon are ignored. -** -** ^These routines return 0 if the statement is incomplete. ^If a -** memory allocation fails, then SQLITE_NOMEM is returned. -** -** ^These routines do not parse the SQL statements thus -** will not detect syntactically incorrect SQL. -** -** ^(If SQLite has not been initialized using [sqlite3_initialize()] prior -** to invoking sqlite3_complete16() then sqlite3_initialize() is invoked -** automatically by sqlite3_complete16(). If that initialization fails, -** then the return value from sqlite3_complete16() will be non-zero -** regardless of whether or not the input SQL is complete.)^ -** -** The input to [sqlite3_complete()] must be a zero-terminated -** UTF-8 string. -** -** The input to [sqlite3_complete16()] must be a zero-terminated -** UTF-16 string in native byte order. -*/ -SQLITE_API int sqlite3_complete(const char *sql); -SQLITE_API int sqlite3_complete16(const void *sql); - -/* -** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors -** KEYWORDS: {busy-handler callback} {busy handler} -** METHOD: sqlite3 -** -** ^The sqlite3_busy_handler(D,X,P) routine sets a callback function X -** that might be invoked with argument P whenever -** an attempt is made to access a database table associated with -** [database connection] D when another thread -** or process has the table locked. -** The sqlite3_busy_handler() interface is used to implement -** [sqlite3_busy_timeout()] and [PRAGMA busy_timeout]. -** -** ^If the busy callback is NULL, then [SQLITE_BUSY] -** is returned immediately upon encountering the lock. ^If the busy callback -** is not NULL, then the callback might be invoked with two arguments. -** -** ^The first argument to the busy handler is a copy of the void* pointer which -** is the third argument to sqlite3_busy_handler(). ^The second argument to -** the busy handler callback is the number of times that the busy handler has -** been invoked previously for the same locking event. ^If the -** busy callback returns 0, then no additional attempts are made to -** access the database and [SQLITE_BUSY] is returned -** to the application. -** ^If the callback returns non-zero, then another attempt -** is made to access the database and the cycle repeats. -** -** The presence of a busy handler does not guarantee that it will be invoked -** when there is lock contention. ^If SQLite determines that invoking the busy -** handler could result in a deadlock, it will go ahead and return [SQLITE_BUSY] -** to the application instead of invoking the -** busy handler. -** Consider a scenario where one process is holding a read lock that -** it is trying to promote to a reserved lock and -** a second process is holding a reserved lock that it is trying -** to promote to an exclusive lock. The first process cannot proceed -** because it is blocked by the second and the second process cannot -** proceed because it is blocked by the first. If both processes -** invoke the busy handlers, neither will make any progress. Therefore, -** SQLite returns [SQLITE_BUSY] for the first process, hoping that this -** will induce the first process to release its read lock and allow -** the second process to proceed. -** -** ^The default busy callback is NULL. -** -** ^(There can only be a single busy handler defined for each -** [database connection]. Setting a new busy handler clears any -** previously set handler.)^ ^Note that calling [sqlite3_busy_timeout()] -** or evaluating [PRAGMA busy_timeout=N] will change the -** busy handler and thus clear any previously set busy handler. -** -** The busy callback should not take any actions which modify the -** database connection that invoked the busy handler. In other words, -** the busy handler is not reentrant. Any such actions -** result in undefined behavior. -** -** A busy handler must not close the database connection -** or [prepared statement] that invoked the busy handler. -*/ -SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*); - -/* -** CAPI3REF: Set A Busy Timeout -** METHOD: sqlite3 -** -** ^This routine sets a [sqlite3_busy_handler | busy handler] that sleeps -** for a specified amount of time when a table is locked. ^The handler -** will sleep multiple times until at least "ms" milliseconds of sleeping -** have accumulated. ^After at least "ms" milliseconds of sleeping, -** the handler returns 0 which causes [sqlite3_step()] to return -** [SQLITE_BUSY]. -** -** ^Calling this routine with an argument less than or equal to zero -** turns off all busy handlers. -** -** ^(There can only be a single busy handler for a particular -** [database connection] at any given moment. If another busy handler -** was defined (using [sqlite3_busy_handler()]) prior to calling -** this routine, that other busy handler is cleared.)^ -** -** See also: [PRAGMA busy_timeout] -*/ -SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms); - -/* -** CAPI3REF: Convenience Routines For Running Queries -** METHOD: sqlite3 -** -** This is a legacy interface that is preserved for backwards compatibility. -** Use of this interface is not recommended. -** -** Definition: A <b>result table</b> is memory data structure created by the -** [sqlite3_get_table()] interface. A result table records the -** complete query results from one or more queries. -** -** The table conceptually has a number of rows and columns. But -** these numbers are not part of the result table itself. These -** numbers are obtained separately. Let N be the number of rows -** and M be the number of columns. -** -** A result table is an array of pointers to zero-terminated UTF-8 strings. -** There are (N+1)*M elements in the array. The first M pointers point -** to zero-terminated strings that contain the names of the columns. -** The remaining entries all point to query results. NULL values result -** in NULL pointers. All other values are in their UTF-8 zero-terminated -** string representation as returned by [sqlite3_column_text()]. -** -** A result table might consist of one or more memory allocations. -** It is not safe to pass a result table directly to [sqlite3_free()]. -** A result table should be deallocated using [sqlite3_free_table()]. -** -** ^(As an example of the result table format, suppose a query result -** is as follows: -** -** <blockquote><pre> -** Name | Age -** ----------------------- -** Alice | 43 -** Bob | 28 -** Cindy | 21 -** </pre></blockquote> -** -** There are two column (M==2) and three rows (N==3). Thus the -** result table has 8 entries. Suppose the result table is stored -** in an array names azResult. Then azResult holds this content: -** -** <blockquote><pre> -** azResult[0] = "Name"; -** azResult[1] = "Age"; -** azResult[2] = "Alice"; -** azResult[3] = "43"; -** azResult[4] = "Bob"; -** azResult[5] = "28"; -** azResult[6] = "Cindy"; -** azResult[7] = "21"; -** </pre></blockquote>)^ -** -** ^The sqlite3_get_table() function evaluates one or more -** semicolon-separated SQL statements in the zero-terminated UTF-8 -** string of its 2nd parameter and returns a result table to the -** pointer given in its 3rd parameter. -** -** After the application has finished with the result from sqlite3_get_table(), -** it must pass the result table pointer to sqlite3_free_table() in order to -** release the memory that was malloced. Because of the way the -** [sqlite3_malloc()] happens within sqlite3_get_table(), the calling -** function must not try to call [sqlite3_free()] directly. Only -** [sqlite3_free_table()] is able to release the memory properly and safely. -** -** The sqlite3_get_table() interface is implemented as a wrapper around -** [sqlite3_exec()]. The sqlite3_get_table() routine does not have access -** to any internal data structures of SQLite. It uses only the public -** interface defined here. As a consequence, errors that occur in the -** wrapper layer outside of the internal [sqlite3_exec()] call are not -** reflected in subsequent calls to [sqlite3_errcode()] or -** [sqlite3_errmsg()]. -*/ -SQLITE_API int sqlite3_get_table( - sqlite3 *db, /* An open database */ - const char *zSql, /* SQL to be evaluated */ - char ***pazResult, /* Results of the query */ - int *pnRow, /* Number of result rows written here */ - int *pnColumn, /* Number of result columns written here */ - char **pzErrmsg /* Error msg written here */ -); -SQLITE_API void sqlite3_free_table(char **result); - -/* -** CAPI3REF: Formatted String Printing Functions -** -** These routines are work-alikes of the "printf()" family of functions -** from the standard C library. -** These routines understand most of the common K&R formatting options, -** plus some additional non-standard formats, detailed below. -** Note that some of the more obscure formatting options from recent -** C-library standards are omitted from this implementation. -** -** ^The sqlite3_mprintf() and sqlite3_vmprintf() routines write their -** results into memory obtained from [sqlite3_malloc()]. -** The strings returned by these two routines should be -** released by [sqlite3_free()]. ^Both routines return a -** NULL pointer if [sqlite3_malloc()] is unable to allocate enough -** memory to hold the resulting string. -** -** ^(The sqlite3_snprintf() routine is similar to "snprintf()" from -** the standard C library. The result is written into the -** buffer supplied as the second parameter whose size is given by -** the first parameter. Note that the order of the -** first two parameters is reversed from snprintf().)^ This is an -** historical accident that cannot be fixed without breaking -** backwards compatibility. ^(Note also that sqlite3_snprintf() -** returns a pointer to its buffer instead of the number of -** characters actually written into the buffer.)^ We admit that -** the number of characters written would be a more useful return -** value but we cannot change the implementation of sqlite3_snprintf() -** now without breaking compatibility. -** -** ^As long as the buffer size is greater than zero, sqlite3_snprintf() -** guarantees that the buffer is always zero-terminated. ^The first -** parameter "n" is the total size of the buffer, including space for -** the zero terminator. So the longest string that can be completely -** written will be n-1 characters. -** -** ^The sqlite3_vsnprintf() routine is a varargs version of sqlite3_snprintf(). -** -** These routines all implement some additional formatting -** options that are useful for constructing SQL statements. -** All of the usual printf() formatting options apply. In addition, there -** is are "%q", "%Q", "%w" and "%z" options. -** -** ^(The %q option works like %s in that it substitutes a nul-terminated -** string from the argument list. But %q also doubles every '\'' character. -** %q is designed for use inside a string literal.)^ By doubling each '\'' -** character it escapes that character and allows it to be inserted into -** the string. -** -** For example, assume the string variable zText contains text as follows: -** -** <blockquote><pre> -** char *zText = "It's a happy day!"; -** </pre></blockquote> -** -** One can use this text in an SQL statement as follows: -** -** <blockquote><pre> -** char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES('%q')", zText); -** sqlite3_exec(db, zSQL, 0, 0, 0); -** sqlite3_free(zSQL); -** </pre></blockquote> -** -** Because the %q format string is used, the '\'' character in zText -** is escaped and the SQL generated is as follows: -** -** <blockquote><pre> -** INSERT INTO table1 VALUES('It''s a happy day!') -** </pre></blockquote> -** -** This is correct. Had we used %s instead of %q, the generated SQL -** would have looked like this: -** -** <blockquote><pre> -** INSERT INTO table1 VALUES('It's a happy day!'); -** </pre></blockquote> -** -** This second example is an SQL syntax error. As a general rule you should -** always use %q instead of %s when inserting text into a string literal. -** -** ^(The %Q option works like %q except it also adds single quotes around -** the outside of the total string. Additionally, if the parameter in the -** argument list is a NULL pointer, %Q substitutes the text "NULL" (without -** single quotes).)^ So, for example, one could say: -** -** <blockquote><pre> -** char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES(%Q)", zText); -** sqlite3_exec(db, zSQL, 0, 0, 0); -** sqlite3_free(zSQL); -** </pre></blockquote> -** -** The code above will render a correct SQL statement in the zSQL -** variable even if the zText variable is a NULL pointer. -** -** ^(The "%w" formatting option is like "%q" except that it expects to -** be contained within double-quotes instead of single quotes, and it -** escapes the double-quote character instead of the single-quote -** character.)^ The "%w" formatting option is intended for safely inserting -** table and column names into a constructed SQL statement. -** -** ^(The "%z" formatting option works like "%s" but with the -** addition that after the string has been read and copied into -** the result, [sqlite3_free()] is called on the input string.)^ -*/ -SQLITE_API char *sqlite3_mprintf(const char*,...); -SQLITE_API char *sqlite3_vmprintf(const char*, va_list); -SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...); -SQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list); - -/* -** CAPI3REF: Memory Allocation Subsystem -** -** The SQLite core uses these three routines for all of its own -** internal memory allocation needs. "Core" in the previous sentence -** does not include operating-system specific VFS implementation. The -** Windows VFS uses native malloc() and free() for some operations. -** -** ^The sqlite3_malloc() routine returns a pointer to a block -** of memory at least N bytes in length, where N is the parameter. -** ^If sqlite3_malloc() is unable to obtain sufficient free -** memory, it returns a NULL pointer. ^If the parameter N to -** sqlite3_malloc() is zero or negative then sqlite3_malloc() returns -** a NULL pointer. -** -** ^The sqlite3_malloc64(N) routine works just like -** sqlite3_malloc(N) except that N is an unsigned 64-bit integer instead -** of a signed 32-bit integer. -** -** ^Calling sqlite3_free() with a pointer previously returned -** by sqlite3_malloc() or sqlite3_realloc() releases that memory so -** that it might be reused. ^The sqlite3_free() routine is -** a no-op if is called with a NULL pointer. Passing a NULL pointer -** to sqlite3_free() is harmless. After being freed, memory -** should neither be read nor written. Even reading previously freed -** memory might result in a segmentation fault or other severe error. -** Memory corruption, a segmentation fault, or other severe error -** might result if sqlite3_free() is called with a non-NULL pointer that -** was not obtained from sqlite3_malloc() or sqlite3_realloc(). -** -** ^The sqlite3_realloc(X,N) interface attempts to resize a -** prior memory allocation X to be at least N bytes. -** ^If the X parameter to sqlite3_realloc(X,N) -** is a NULL pointer then its behavior is identical to calling -** sqlite3_malloc(N). -** ^If the N parameter to sqlite3_realloc(X,N) is zero or -** negative then the behavior is exactly the same as calling -** sqlite3_free(X). -** ^sqlite3_realloc(X,N) returns a pointer to a memory allocation -** of at least N bytes in size or NULL if insufficient memory is available. -** ^If M is the size of the prior allocation, then min(N,M) bytes -** of the prior allocation are copied into the beginning of buffer returned -** by sqlite3_realloc(X,N) and the prior allocation is freed. -** ^If sqlite3_realloc(X,N) returns NULL and N is positive, then the -** prior allocation is not freed. -** -** ^The sqlite3_realloc64(X,N) interfaces works the same as -** sqlite3_realloc(X,N) except that N is a 64-bit unsigned integer instead -** of a 32-bit signed integer. -** -** ^If X is a memory allocation previously obtained from sqlite3_malloc(), -** sqlite3_malloc64(), sqlite3_realloc(), or sqlite3_realloc64(), then -** sqlite3_msize(X) returns the size of that memory allocation in bytes. -** ^The value returned by sqlite3_msize(X) might be larger than the number -** of bytes requested when X was allocated. ^If X is a NULL pointer then -** sqlite3_msize(X) returns zero. If X points to something that is not -** the beginning of memory allocation, or if it points to a formerly -** valid memory allocation that has now been freed, then the behavior -** of sqlite3_msize(X) is undefined and possibly harmful. -** -** ^The memory returned by sqlite3_malloc(), sqlite3_realloc(), -** sqlite3_malloc64(), and sqlite3_realloc64() -** is always aligned to at least an 8 byte boundary, or to a -** 4 byte boundary if the [SQLITE_4_BYTE_ALIGNED_MALLOC] compile-time -** option is used. -** -** In SQLite version 3.5.0 and 3.5.1, it was possible to define -** the SQLITE_OMIT_MEMORY_ALLOCATION which would cause the built-in -** implementation of these routines to be omitted. That capability -** is no longer provided. Only built-in memory allocators can be used. -** -** Prior to SQLite version 3.7.10, the Windows OS interface layer called -** the system malloc() and free() directly when converting -** filenames between the UTF-8 encoding used by SQLite -** and whatever filename encoding is used by the particular Windows -** installation. Memory allocation errors were detected, but -** they were reported back as [SQLITE_CANTOPEN] or -** [SQLITE_IOERR] rather than [SQLITE_NOMEM]. -** -** The pointer arguments to [sqlite3_free()] and [sqlite3_realloc()] -** must be either NULL or else pointers obtained from a prior -** invocation of [sqlite3_malloc()] or [sqlite3_realloc()] that have -** not yet been released. -** -** The application must not read or write any part of -** a block of memory after it has been released using -** [sqlite3_free()] or [sqlite3_realloc()]. -*/ -SQLITE_API void *sqlite3_malloc(int); -SQLITE_API void *sqlite3_malloc64(sqlite3_uint64); -SQLITE_API void *sqlite3_realloc(void*, int); -SQLITE_API void *sqlite3_realloc64(void*, sqlite3_uint64); -SQLITE_API void sqlite3_free(void*); -SQLITE_API sqlite3_uint64 sqlite3_msize(void*); - -/* -** CAPI3REF: Memory Allocator Statistics -** -** SQLite provides these two interfaces for reporting on the status -** of the [sqlite3_malloc()], [sqlite3_free()], and [sqlite3_realloc()] -** routines, which form the built-in memory allocation subsystem. -** -** ^The [sqlite3_memory_used()] routine returns the number of bytes -** of memory currently outstanding (malloced but not freed). -** ^The [sqlite3_memory_highwater()] routine returns the maximum -** value of [sqlite3_memory_used()] since the high-water mark -** was last reset. ^The values returned by [sqlite3_memory_used()] and -** [sqlite3_memory_highwater()] include any overhead -** added by SQLite in its implementation of [sqlite3_malloc()], -** but not overhead added by the any underlying system library -** routines that [sqlite3_malloc()] may call. -** -** ^The memory high-water mark is reset to the current value of -** [sqlite3_memory_used()] if and only if the parameter to -** [sqlite3_memory_highwater()] is true. ^The value returned -** by [sqlite3_memory_highwater(1)] is the high-water mark -** prior to the reset. -*/ -SQLITE_API sqlite3_int64 sqlite3_memory_used(void); -SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag); - -/* -** CAPI3REF: Pseudo-Random Number Generator -** -** SQLite contains a high-quality pseudo-random number generator (PRNG) used to -** select random [ROWID | ROWIDs] when inserting new records into a table that -** already uses the largest possible [ROWID]. The PRNG is also used for -** the build-in random() and randomblob() SQL functions. This interface allows -** applications to access the same PRNG for other purposes. -** -** ^A call to this routine stores N bytes of randomness into buffer P. -** ^The P parameter can be a NULL pointer. -** -** ^If this routine has not been previously called or if the previous -** call had N less than one or a NULL pointer for P, then the PRNG is -** seeded using randomness obtained from the xRandomness method of -** the default [sqlite3_vfs] object. -** ^If the previous call to this routine had an N of 1 or more and a -** non-NULL P then the pseudo-randomness is generated -** internally and without recourse to the [sqlite3_vfs] xRandomness -** method. -*/ -SQLITE_API void sqlite3_randomness(int N, void *P); - -/* -** CAPI3REF: Compile-Time Authorization Callbacks -** METHOD: sqlite3 -** -** ^This routine registers an authorizer callback with a particular -** [database connection], supplied in the first argument. -** ^The authorizer callback is invoked as SQL statements are being compiled -** by [sqlite3_prepare()] or its variants [sqlite3_prepare_v2()], -** [sqlite3_prepare16()] and [sqlite3_prepare16_v2()]. ^At various -** points during the compilation process, as logic is being created -** to perform various actions, the authorizer callback is invoked to -** see if those actions are allowed. ^The authorizer callback should -** return [SQLITE_OK] to allow the action, [SQLITE_IGNORE] to disallow the -** specific action but allow the SQL statement to continue to be -** compiled, or [SQLITE_DENY] to cause the entire SQL statement to be -** rejected with an error. ^If the authorizer callback returns -** any value other than [SQLITE_IGNORE], [SQLITE_OK], or [SQLITE_DENY] -** then the [sqlite3_prepare_v2()] or equivalent call that triggered -** the authorizer will fail with an error message. -** -** When the callback returns [SQLITE_OK], that means the operation -** requested is ok. ^When the callback returns [SQLITE_DENY], the -** [sqlite3_prepare_v2()] or equivalent call that triggered the -** authorizer will fail with an error message explaining that -** access is denied. -** -** ^The first parameter to the authorizer callback is a copy of the third -** parameter to the sqlite3_set_authorizer() interface. ^The second parameter -** to the callback is an integer [SQLITE_COPY | action code] that specifies -** the particular action to be authorized. ^The third through sixth parameters -** to the callback are zero-terminated strings that contain additional -** details about the action to be authorized. -** -** ^If the action code is [SQLITE_READ] -** and the callback returns [SQLITE_IGNORE] then the -** [prepared statement] statement is constructed to substitute -** a NULL value in place of the table column that would have -** been read if [SQLITE_OK] had been returned. The [SQLITE_IGNORE] -** return can be used to deny an untrusted user access to individual -** columns of a table. -** ^If the action code is [SQLITE_DELETE] and the callback returns -** [SQLITE_IGNORE] then the [DELETE] operation proceeds but the -** [truncate optimization] is disabled and all rows are deleted individually. -** -** An authorizer is used when [sqlite3_prepare | preparing] -** SQL statements from an untrusted source, to ensure that the SQL statements -** do not try to access data they are not allowed to see, or that they do not -** try to execute malicious statements that damage the database. For -** example, an application may allow a user to enter arbitrary -** SQL queries for evaluation by a database. But the application does -** not want the user to be able to make arbitrary changes to the -** database. An authorizer could then be put in place while the -** user-entered SQL is being [sqlite3_prepare | prepared] that -** disallows everything except [SELECT] statements. -** -** Applications that need to process SQL from untrusted sources -** might also consider lowering resource limits using [sqlite3_limit()] -** and limiting database size using the [max_page_count] [PRAGMA] -** in addition to using an authorizer. -** -** ^(Only a single authorizer can be in place on a database connection -** at a time. Each call to sqlite3_set_authorizer overrides the -** previous call.)^ ^Disable the authorizer by installing a NULL callback. -** The authorizer is disabled by default. -** -** The authorizer callback must not do anything that will modify -** the database connection that invoked the authorizer callback. -** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their -** database connections for the meaning of "modify" in this paragraph. -** -** ^When [sqlite3_prepare_v2()] is used to prepare a statement, the -** statement might be re-prepared during [sqlite3_step()] due to a -** schema change. Hence, the application should ensure that the -** correct authorizer callback remains in place during the [sqlite3_step()]. -** -** ^Note that the authorizer callback is invoked only during -** [sqlite3_prepare()] or its variants. Authorization is not -** performed during statement evaluation in [sqlite3_step()], unless -** as stated in the previous paragraph, sqlite3_step() invokes -** sqlite3_prepare_v2() to reprepare a statement after a schema change. -*/ -SQLITE_API int sqlite3_set_authorizer( - sqlite3*, - int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), - void *pUserData -); - -/* -** CAPI3REF: Authorizer Return Codes -** -** The [sqlite3_set_authorizer | authorizer callback function] must -** return either [SQLITE_OK] or one of these two constants in order -** to signal SQLite whether or not the action is permitted. See the -** [sqlite3_set_authorizer | authorizer documentation] for additional -** information. -** -** Note that SQLITE_IGNORE is also used as a [conflict resolution mode] -** returned from the [sqlite3_vtab_on_conflict()] interface. -*/ -#define SQLITE_DENY 1 /* Abort the SQL statement with an error */ -#define SQLITE_IGNORE 2 /* Don't allow access, but don't generate an error */ - -/* -** CAPI3REF: Authorizer Action Codes -** -** The [sqlite3_set_authorizer()] interface registers a callback function -** that is invoked to authorize certain SQL statement actions. The -** second parameter to the callback is an integer code that specifies -** what action is being authorized. These are the integer action codes that -** the authorizer callback may be passed. -** -** These action code values signify what kind of operation is to be -** authorized. The 3rd and 4th parameters to the authorization -** callback function will be parameters or NULL depending on which of these -** codes is used as the second parameter. ^(The 5th parameter to the -** authorizer callback is the name of the database ("main", "temp", -** etc.) if applicable.)^ ^The 6th parameter to the authorizer callback -** is the name of the inner-most trigger or view that is responsible for -** the access attempt or NULL if this access attempt is directly from -** top-level SQL code. -*/ -/******************************************* 3rd ************ 4th ***********/ -#define SQLITE_CREATE_INDEX 1 /* Index Name Table Name */ -#define SQLITE_CREATE_TABLE 2 /* Table Name NULL */ -#define SQLITE_CREATE_TEMP_INDEX 3 /* Index Name Table Name */ -#define SQLITE_CREATE_TEMP_TABLE 4 /* Table Name NULL */ -#define SQLITE_CREATE_TEMP_TRIGGER 5 /* Trigger Name Table Name */ -#define SQLITE_CREATE_TEMP_VIEW 6 /* View Name NULL */ -#define SQLITE_CREATE_TRIGGER 7 /* Trigger Name Table Name */ -#define SQLITE_CREATE_VIEW 8 /* View Name NULL */ -#define SQLITE_DELETE 9 /* Table Name NULL */ -#define SQLITE_DROP_INDEX 10 /* Index Name Table Name */ -#define SQLITE_DROP_TABLE 11 /* Table Name NULL */ -#define SQLITE_DROP_TEMP_INDEX 12 /* Index Name Table Name */ -#define SQLITE_DROP_TEMP_TABLE 13 /* Table Name NULL */ -#define SQLITE_DROP_TEMP_TRIGGER 14 /* Trigger Name Table Name */ -#define SQLITE_DROP_TEMP_VIEW 15 /* View Name NULL */ -#define SQLITE_DROP_TRIGGER 16 /* Trigger Name Table Name */ -#define SQLITE_DROP_VIEW 17 /* View Name NULL */ -#define SQLITE_INSERT 18 /* Table Name NULL */ -#define SQLITE_PRAGMA 19 /* Pragma Name 1st arg or NULL */ -#define SQLITE_READ 20 /* Table Name Column Name */ -#define SQLITE_SELECT 21 /* NULL NULL */ -#define SQLITE_TRANSACTION 22 /* Operation NULL */ -#define SQLITE_UPDATE 23 /* Table Name Column Name */ -#define SQLITE_ATTACH 24 /* Filename NULL */ -#define SQLITE_DETACH 25 /* Database Name NULL */ -#define SQLITE_ALTER_TABLE 26 /* Database Name Table Name */ -#define SQLITE_REINDEX 27 /* Index Name NULL */ -#define SQLITE_ANALYZE 28 /* Table Name NULL */ -#define SQLITE_CREATE_VTABLE 29 /* Table Name Module Name */ -#define SQLITE_DROP_VTABLE 30 /* Table Name Module Name */ -#define SQLITE_FUNCTION 31 /* NULL Function Name */ -#define SQLITE_SAVEPOINT 32 /* Operation Savepoint Name */ -#define SQLITE_COPY 0 /* No longer used */ -#define SQLITE_RECURSIVE 33 /* NULL NULL */ - -/* -** CAPI3REF: Tracing And Profiling Functions -** METHOD: sqlite3 -** -** These routines are deprecated. Use the [sqlite3_trace_v2()] interface -** instead of the routines described here. -** -** These routines register callback functions that can be used for -** tracing and profiling the execution of SQL statements. -** -** ^The callback function registered by sqlite3_trace() is invoked at -** various times when an SQL statement is being run by [sqlite3_step()]. -** ^The sqlite3_trace() callback is invoked with a UTF-8 rendering of the -** SQL statement text as the statement first begins executing. -** ^(Additional sqlite3_trace() callbacks might occur -** as each triggered subprogram is entered. The callbacks for triggers -** contain a UTF-8 SQL comment that identifies the trigger.)^ -** -** The [SQLITE_TRACE_SIZE_LIMIT] compile-time option can be used to limit -** the length of [bound parameter] expansion in the output of sqlite3_trace(). -** -** ^The callback function registered by sqlite3_profile() is invoked -** as each SQL statement finishes. ^The profile callback contains -** the original statement text and an estimate of wall-clock time -** of how long that statement took to run. ^The profile callback -** time is in units of nanoseconds, however the current implementation -** is only capable of millisecond resolution so the six least significant -** digits in the time are meaningless. Future versions of SQLite -** might provide greater resolution on the profiler callback. The -** sqlite3_profile() function is considered experimental and is -** subject to change in future versions of SQLite. -*/ -SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*, - void(*xTrace)(void*,const char*), void*); -SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*, - void(*xProfile)(void*,const char*,sqlite3_uint64), void*); - -/* -** CAPI3REF: SQL Trace Event Codes -** KEYWORDS: SQLITE_TRACE -** -** These constants identify classes of events that can be monitored -** using the [sqlite3_trace_v2()] tracing logic. The third argument -** to [sqlite3_trace_v2()] is an OR-ed combination of one or more of -** the following constants. ^The first argument to the trace callback -** is one of the following constants. -** -** New tracing constants may be added in future releases. -** -** ^A trace callback has four arguments: xCallback(T,C,P,X). -** ^The T argument is one of the integer type codes above. -** ^The C argument is a copy of the context pointer passed in as the -** fourth argument to [sqlite3_trace_v2()]. -** The P and X arguments are pointers whose meanings depend on T. -** -** <dl> -** [[SQLITE_TRACE_STMT]] <dt>SQLITE_TRACE_STMT</dt> -** <dd>^An SQLITE_TRACE_STMT callback is invoked when a prepared statement -** first begins running and possibly at other times during the -** execution of the prepared statement, such as at the start of each -** trigger subprogram. ^The P argument is a pointer to the -** [prepared statement]. ^The X argument is a pointer to a string which -** is the unexpanded SQL text of the prepared statement or an SQL comment -** that indicates the invocation of a trigger. ^The callback can compute -** the same text that would have been returned by the legacy [sqlite3_trace()] -** interface by using the X argument when X begins with "--" and invoking -** [sqlite3_expanded_sql(P)] otherwise. -** -** [[SQLITE_TRACE_PROFILE]] <dt>SQLITE_TRACE_PROFILE</dt> -** <dd>^An SQLITE_TRACE_PROFILE callback provides approximately the same -** information as is provided by the [sqlite3_profile()] callback. -** ^The P argument is a pointer to the [prepared statement] and the -** X argument points to a 64-bit integer which is the estimated of -** the number of nanosecond that the prepared statement took to run. -** ^The SQLITE_TRACE_PROFILE callback is invoked when the statement finishes. -** -** [[SQLITE_TRACE_ROW]] <dt>SQLITE_TRACE_ROW</dt> -** <dd>^An SQLITE_TRACE_ROW callback is invoked whenever a prepared -** statement generates a single row of result. -** ^The P argument is a pointer to the [prepared statement] and the -** X argument is unused. -** -** [[SQLITE_TRACE_CLOSE]] <dt>SQLITE_TRACE_CLOSE</dt> -** <dd>^An SQLITE_TRACE_CLOSE callback is invoked when a database -** connection closes. -** ^The P argument is a pointer to the [database connection] object -** and the X argument is unused. -** </dl> -*/ -#define SQLITE_TRACE_STMT 0x01 -#define SQLITE_TRACE_PROFILE 0x02 -#define SQLITE_TRACE_ROW 0x04 -#define SQLITE_TRACE_CLOSE 0x08 - -/* -** CAPI3REF: SQL Trace Hook -** METHOD: sqlite3 -** -** ^The sqlite3_trace_v2(D,M,X,P) interface registers a trace callback -** function X against [database connection] D, using property mask M -** and context pointer P. ^If the X callback is -** NULL or if the M mask is zero, then tracing is disabled. The -** M argument should be the bitwise OR-ed combination of -** zero or more [SQLITE_TRACE] constants. -** -** ^Each call to either sqlite3_trace() or sqlite3_trace_v2() overrides -** (cancels) any prior calls to sqlite3_trace() or sqlite3_trace_v2(). -** -** ^The X callback is invoked whenever any of the events identified by -** mask M occur. ^The integer return value from the callback is currently -** ignored, though this may change in future releases. Callback -** implementations should return zero to ensure future compatibility. -** -** ^A trace callback is invoked with four arguments: callback(T,C,P,X). -** ^The T argument is one of the [SQLITE_TRACE] -** constants to indicate why the callback was invoked. -** ^The C argument is a copy of the context pointer. -** The P and X arguments are pointers whose meanings depend on T. -** -** The sqlite3_trace_v2() interface is intended to replace the legacy -** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which -** are deprecated. -*/ -SQLITE_API int sqlite3_trace_v2( - sqlite3*, - unsigned uMask, - int(*xCallback)(unsigned,void*,void*,void*), - void *pCtx -); - -/* -** CAPI3REF: Query Progress Callbacks -** METHOD: sqlite3 -** -** ^The sqlite3_progress_handler(D,N,X,P) interface causes the callback -** function X to be invoked periodically during long running calls to -** [sqlite3_exec()], [sqlite3_step()] and [sqlite3_get_table()] for -** database connection D. An example use for this -** interface is to keep a GUI updated during a large query. -** -** ^The parameter P is passed through as the only parameter to the -** callback function X. ^The parameter N is the approximate number of -** [virtual machine instructions] that are evaluated between successive -** invocations of the callback X. ^If N is less than one then the progress -** handler is disabled. -** -** ^Only a single progress handler may be defined at one time per -** [database connection]; setting a new progress handler cancels the -** old one. ^Setting parameter X to NULL disables the progress handler. -** ^The progress handler is also disabled by setting N to a value less -** than 1. -** -** ^If the progress callback returns non-zero, the operation is -** interrupted. This feature can be used to implement a -** "Cancel" button on a GUI progress dialog box. -** -** The progress handler callback must not do anything that will modify -** the database connection that invoked the progress handler. -** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their -** database connections for the meaning of "modify" in this paragraph. -** -*/ -SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); - -/* -** CAPI3REF: Opening A New Database Connection -** CONSTRUCTOR: sqlite3 -** -** ^These routines open an SQLite database file as specified by the -** filename argument. ^The filename argument is interpreted as UTF-8 for -** sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte -** order for sqlite3_open16(). ^(A [database connection] handle is usually -** returned in *ppDb, even if an error occurs. The only exception is that -** if SQLite is unable to allocate memory to hold the [sqlite3] object, -** a NULL will be written into *ppDb instead of a pointer to the [sqlite3] -** object.)^ ^(If the database is opened (and/or created) successfully, then -** [SQLITE_OK] is returned. Otherwise an [error code] is returned.)^ ^The -** [sqlite3_errmsg()] or [sqlite3_errmsg16()] routines can be used to obtain -** an English language description of the error following a failure of any -** of the sqlite3_open() routines. -** -** ^The default encoding will be UTF-8 for databases created using -** sqlite3_open() or sqlite3_open_v2(). ^The default encoding for databases -** created using sqlite3_open16() will be UTF-16 in the native byte order. -** -** Whether or not an error occurs when it is opened, resources -** associated with the [database connection] handle should be released by -** passing it to [sqlite3_close()] when it is no longer required. -** -** The sqlite3_open_v2() interface works like sqlite3_open() -** except that it accepts two additional parameters for additional control -** over the new database connection. ^(The flags parameter to -** sqlite3_open_v2() can take one of -** the following three values, optionally combined with the -** [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX], [SQLITE_OPEN_SHAREDCACHE], -** [SQLITE_OPEN_PRIVATECACHE], and/or [SQLITE_OPEN_URI] flags:)^ -** -** <dl> -** ^(<dt>[SQLITE_OPEN_READONLY]</dt> -** <dd>The database is opened in read-only mode. If the database does not -** already exist, an error is returned.</dd>)^ -** -** ^(<dt>[SQLITE_OPEN_READWRITE]</dt> -** <dd>The database is opened for reading and writing if possible, or reading -** only if the file is write protected by the operating system. In either -** case the database must already exist, otherwise an error is returned.</dd>)^ -** -** ^(<dt>[SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]</dt> -** <dd>The database is opened for reading and writing, and is created if -** it does not already exist. This is the behavior that is always used for -** sqlite3_open() and sqlite3_open16().</dd>)^ -** </dl> -** -** If the 3rd parameter to sqlite3_open_v2() is not one of the -** combinations shown above optionally combined with other -** [SQLITE_OPEN_READONLY | SQLITE_OPEN_* bits] -** then the behavior is undefined. -** -** ^If the [SQLITE_OPEN_NOMUTEX] flag is set, then the database connection -** opens in the multi-thread [threading mode] as long as the single-thread -** mode has not been set at compile-time or start-time. ^If the -** [SQLITE_OPEN_FULLMUTEX] flag is set then the database connection opens -** in the serialized [threading mode] unless single-thread was -** previously selected at compile-time or start-time. -** ^The [SQLITE_OPEN_SHAREDCACHE] flag causes the database connection to be -** eligible to use [shared cache mode], regardless of whether or not shared -** cache is enabled using [sqlite3_enable_shared_cache()]. ^The -** [SQLITE_OPEN_PRIVATECACHE] flag causes the database connection to not -** participate in [shared cache mode] even if it is enabled. -** -** ^The fourth parameter to sqlite3_open_v2() is the name of the -** [sqlite3_vfs] object that defines the operating system interface that -** the new database connection should use. ^If the fourth parameter is -** a NULL pointer then the default [sqlite3_vfs] object is used. -** -** ^If the filename is ":memory:", then a private, temporary in-memory database -** is created for the connection. ^This in-memory database will vanish when -** the database connection is closed. Future versions of SQLite might -** make use of additional special filenames that begin with the ":" character. -** It is recommended that when a database filename actually does begin with -** a ":" character you should prefix the filename with a pathname such as -** "./" to avoid ambiguity. -** -** ^If the filename is an empty string, then a private, temporary -** on-disk database will be created. ^This private database will be -** automatically deleted as soon as the database connection is closed. -** -** [[URI filenames in sqlite3_open()]] <h3>URI Filenames</h3> -** -** ^If [URI filename] interpretation is enabled, and the filename argument -** begins with "file:", then the filename is interpreted as a URI. ^URI -** filename interpretation is enabled if the [SQLITE_OPEN_URI] flag is -** set in the fourth argument to sqlite3_open_v2(), or if it has -** been enabled globally using the [SQLITE_CONFIG_URI] option with the -** [sqlite3_config()] method or by the [SQLITE_USE_URI] compile-time option. -** As of SQLite version 3.7.7, URI filename interpretation is turned off -** by default, but future releases of SQLite might enable URI filename -** interpretation by default. See "[URI filenames]" for additional -** information. -** -** URI filenames are parsed according to RFC 3986. ^If the URI contains an -** authority, then it must be either an empty string or the string -** "localhost". ^If the authority is not an empty string or "localhost", an -** error is returned to the caller. ^The fragment component of a URI, if -** present, is ignored. -** -** ^SQLite uses the path component of the URI as the name of the disk file -** which contains the database. ^If the path begins with a '/' character, -** then it is interpreted as an absolute path. ^If the path does not begin -** with a '/' (meaning that the authority section is omitted from the URI) -** then the path is interpreted as a relative path. -** ^(On windows, the first component of an absolute path -** is a drive specification (e.g. "C:").)^ -** -** [[core URI query parameters]] -** The query component of a URI may contain parameters that are interpreted -** either by SQLite itself, or by a [VFS | custom VFS implementation]. -** SQLite and its built-in [VFSes] interpret the -** following query parameters: -** -** <ul> -** <li> <b>vfs</b>: ^The "vfs" parameter may be used to specify the name of -** a VFS object that provides the operating system interface that should -** be used to access the database file on disk. ^If this option is set to -** an empty string the default VFS object is used. ^Specifying an unknown -** VFS is an error. ^If sqlite3_open_v2() is used and the vfs option is -** present, then the VFS specified by the option takes precedence over -** the value passed as the fourth parameter to sqlite3_open_v2(). -** -** <li> <b>mode</b>: ^(The mode parameter may be set to either "ro", "rw", -** "rwc", or "memory". Attempting to set it to any other value is -** an error)^. -** ^If "ro" is specified, then the database is opened for read-only -** access, just as if the [SQLITE_OPEN_READONLY] flag had been set in the -** third argument to sqlite3_open_v2(). ^If the mode option is set to -** "rw", then the database is opened for read-write (but not create) -** access, as if SQLITE_OPEN_READWRITE (but not SQLITE_OPEN_CREATE) had -** been set. ^Value "rwc" is equivalent to setting both -** SQLITE_OPEN_READWRITE and SQLITE_OPEN_CREATE. ^If the mode option is -** set to "memory" then a pure [in-memory database] that never reads -** or writes from disk is used. ^It is an error to specify a value for -** the mode parameter that is less restrictive than that specified by -** the flags passed in the third parameter to sqlite3_open_v2(). -** -** <li> <b>cache</b>: ^The cache parameter may be set to either "shared" or -** "private". ^Setting it to "shared" is equivalent to setting the -** SQLITE_OPEN_SHAREDCACHE bit in the flags argument passed to -** sqlite3_open_v2(). ^Setting the cache parameter to "private" is -** equivalent to setting the SQLITE_OPEN_PRIVATECACHE bit. -** ^If sqlite3_open_v2() is used and the "cache" parameter is present in -** a URI filename, its value overrides any behavior requested by setting -** SQLITE_OPEN_PRIVATECACHE or SQLITE_OPEN_SHAREDCACHE flag. -** -** <li> <b>psow</b>: ^The psow parameter indicates whether or not the -** [powersafe overwrite] property does or does not apply to the -** storage media on which the database file resides. -** -** <li> <b>nolock</b>: ^The nolock parameter is a boolean query parameter -** which if set disables file locking in rollback journal modes. This -** is useful for accessing a database on a filesystem that does not -** support locking. Caution: Database corruption might result if two -** or more processes write to the same database and any one of those -** processes uses nolock=1. -** -** <li> <b>immutable</b>: ^The immutable parameter is a boolean query -** parameter that indicates that the database file is stored on -** read-only media. ^When immutable is set, SQLite assumes that the -** database file cannot be changed, even by a process with higher -** privilege, and so the database is opened read-only and all locking -** and change detection is disabled. Caution: Setting the immutable -** property on a database file that does in fact change can result -** in incorrect query results and/or [SQLITE_CORRUPT] errors. -** See also: [SQLITE_IOCAP_IMMUTABLE]. -** -** </ul> -** -** ^Specifying an unknown parameter in the query component of a URI is not an -** error. Future versions of SQLite might understand additional query -** parameters. See "[query parameters with special meaning to SQLite]" for -** additional information. -** -** [[URI filename examples]] <h3>URI filename examples</h3> -** -** <table border="1" align=center cellpadding=5> -** <tr><th> URI filenames <th> Results -** <tr><td> file:data.db <td> -** Open the file "data.db" in the current directory. -** <tr><td> file:/home/fred/data.db<br> -** file:///home/fred/data.db <br> -** file://localhost/home/fred/data.db <br> <td> -** Open the database file "/home/fred/data.db". -** <tr><td> file://darkstar/home/fred/data.db <td> -** An error. "darkstar" is not a recognized authority. -** <tr><td style="white-space:nowrap"> -** file:///C:/Documents%20and%20Settings/fred/Desktop/data.db -** <td> Windows only: Open the file "data.db" on fred's desktop on drive -** C:. Note that the %20 escaping in this example is not strictly -** necessary - space characters can be used literally -** in URI filenames. -** <tr><td> file:data.db?mode=ro&cache=private <td> -** Open file "data.db" in the current directory for read-only access. -** Regardless of whether or not shared-cache mode is enabled by -** default, use a private cache. -** <tr><td> file:/home/fred/data.db?vfs=unix-dotfile <td> -** Open file "/home/fred/data.db". Use the special VFS "unix-dotfile" -** that uses dot-files in place of posix advisory locking. -** <tr><td> file:data.db?mode=readonly <td> -** An error. "readonly" is not a valid option for the "mode" parameter. -** </table> -** -** ^URI hexadecimal escape sequences (%HH) are supported within the path and -** query components of a URI. A hexadecimal escape sequence consists of a -** percent sign - "%" - followed by exactly two hexadecimal digits -** specifying an octet value. ^Before the path or query components of a -** URI filename are interpreted, they are encoded using UTF-8 and all -** hexadecimal escape sequences replaced by a single byte containing the -** corresponding octet. If this process generates an invalid UTF-8 encoding, -** the results are undefined. -** -** <b>Note to Windows users:</b> The encoding used for the filename argument -** of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever -** codepage is currently defined. Filenames containing international -** characters must be converted to UTF-8 prior to passing them into -** sqlite3_open() or sqlite3_open_v2(). -** -** <b>Note to Windows Runtime users:</b> The temporary directory must be set -** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various -** features that require the use of temporary files may fail. -** -** See also: [sqlite3_temp_directory] -*/ -SQLITE_API int sqlite3_open( - const char *filename, /* Database filename (UTF-8) */ - sqlite3 **ppDb /* OUT: SQLite db handle */ -); -SQLITE_API int sqlite3_open16( - const void *filename, /* Database filename (UTF-16) */ - sqlite3 **ppDb /* OUT: SQLite db handle */ -); -SQLITE_API int sqlite3_open_v2( - const char *filename, /* Database filename (UTF-8) */ - sqlite3 **ppDb, /* OUT: SQLite db handle */ - int flags, /* Flags */ - const char *zVfs /* Name of VFS module to use */ -); - -/* -** CAPI3REF: Obtain Values For URI Parameters -** -** These are utility routines, useful to VFS implementations, that check -** to see if a database file was a URI that contained a specific query -** parameter, and if so obtains the value of that query parameter. -** -** If F is the database filename pointer passed into the xOpen() method of -** a VFS implementation when the flags parameter to xOpen() has one or -** more of the [SQLITE_OPEN_URI] or [SQLITE_OPEN_MAIN_DB] bits set and -** P is the name of the query parameter, then -** sqlite3_uri_parameter(F,P) returns the value of the P -** parameter if it exists or a NULL pointer if P does not appear as a -** query parameter on F. If P is a query parameter of F -** has no explicit value, then sqlite3_uri_parameter(F,P) returns -** a pointer to an empty string. -** -** The sqlite3_uri_boolean(F,P,B) routine assumes that P is a boolean -** parameter and returns true (1) or false (0) according to the value -** of P. The sqlite3_uri_boolean(F,P,B) routine returns true (1) if the -** value of query parameter P is one of "yes", "true", or "on" in any -** case or if the value begins with a non-zero number. The -** sqlite3_uri_boolean(F,P,B) routines returns false (0) if the value of -** query parameter P is one of "no", "false", or "off" in any case or -** if the value begins with a numeric zero. If P is not a query -** parameter on F or if the value of P is does not match any of the -** above, then sqlite3_uri_boolean(F,P,B) returns (B!=0). -** -** The sqlite3_uri_int64(F,P,D) routine converts the value of P into a -** 64-bit signed integer and returns that integer, or D if P does not -** exist. If the value of P is something other than an integer, then -** zero is returned. -** -** If F is a NULL pointer, then sqlite3_uri_parameter(F,P) returns NULL and -** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and -** is not a database file pathname pointer that SQLite passed into the xOpen -** VFS method, then the behavior of this routine is undefined and probably -** undesirable. -*/ -SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam); -SQLITE_API int sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault); -SQLITE_API sqlite3_int64 sqlite3_uri_int64(const char*, const char*, sqlite3_int64); - - -/* -** CAPI3REF: Error Codes And Messages -** METHOD: sqlite3 -** -** ^If the most recent sqlite3_* API call associated with -** [database connection] D failed, then the sqlite3_errcode(D) interface -** returns the numeric [result code] or [extended result code] for that -** API call. -** If the most recent API call was successful, -** then the return value from sqlite3_errcode() is undefined. -** ^The sqlite3_extended_errcode() -** interface is the same except that it always returns the -** [extended result code] even when extended result codes are -** disabled. -** -** ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language -** text that describes the error, as either UTF-8 or UTF-16 respectively. -** ^(Memory to hold the error message string is managed internally. -** The application does not need to worry about freeing the result. -** However, the error string might be overwritten or deallocated by -** subsequent calls to other SQLite interface functions.)^ -** -** ^The sqlite3_errstr() interface returns the English-language text -** that describes the [result code], as UTF-8. -** ^(Memory to hold the error message string is managed internally -** and must not be freed by the application)^. -** -** When the serialized [threading mode] is in use, it might be the -** case that a second error occurs on a separate thread in between -** the time of the first error and the call to these interfaces. -** When that happens, the second error will be reported since these -** interfaces always report the most recent result. To avoid -** this, each thread can obtain exclusive use of the [database connection] D -** by invoking [sqlite3_mutex_enter]([sqlite3_db_mutex](D)) before beginning -** to use D and invoking [sqlite3_mutex_leave]([sqlite3_db_mutex](D)) after -** all calls to the interfaces listed here are completed. -** -** If an interface fails with SQLITE_MISUSE, that means the interface -** was invoked incorrectly by the application. In that case, the -** error code and message may or may not be set. -*/ -SQLITE_API int sqlite3_errcode(sqlite3 *db); -SQLITE_API int sqlite3_extended_errcode(sqlite3 *db); -SQLITE_API const char *sqlite3_errmsg(sqlite3*); -SQLITE_API const void *sqlite3_errmsg16(sqlite3*); -SQLITE_API const char *sqlite3_errstr(int); - -/* -** CAPI3REF: Prepared Statement Object -** KEYWORDS: {prepared statement} {prepared statements} -** -** An instance of this object represents a single SQL statement that -** has been compiled into binary form and is ready to be evaluated. -** -** Think of each SQL statement as a separate computer program. The -** original SQL text is source code. A prepared statement object -** is the compiled object code. All SQL must be converted into a -** prepared statement before it can be run. -** -** The life-cycle of a prepared statement object usually goes like this: -** -** <ol> -** <li> Create the prepared statement object using [sqlite3_prepare_v2()]. -** <li> Bind values to [parameters] using the sqlite3_bind_*() -** interfaces. -** <li> Run the SQL by calling [sqlite3_step()] one or more times. -** <li> Reset the prepared statement using [sqlite3_reset()] then go back -** to step 2. Do this zero or more times. -** <li> Destroy the object using [sqlite3_finalize()]. -** </ol> -*/ -typedef struct sqlite3_stmt sqlite3_stmt; - -/* -** CAPI3REF: Run-time Limits -** METHOD: sqlite3 -** -** ^(This interface allows the size of various constructs to be limited -** on a connection by connection basis. The first parameter is the -** [database connection] whose limit is to be set or queried. The -** second parameter is one of the [limit categories] that define a -** class of constructs to be size limited. The third parameter is the -** new limit for that construct.)^ -** -** ^If the new limit is a negative number, the limit is unchanged. -** ^(For each limit category SQLITE_LIMIT_<i>NAME</i> there is a -** [limits | hard upper bound] -** set at compile-time by a C preprocessor macro called -** [limits | SQLITE_MAX_<i>NAME</i>]. -** (The "_LIMIT_" in the name is changed to "_MAX_".))^ -** ^Attempts to increase a limit above its hard upper bound are -** silently truncated to the hard upper bound. -** -** ^Regardless of whether or not the limit was changed, the -** [sqlite3_limit()] interface returns the prior value of the limit. -** ^Hence, to find the current value of a limit without changing it, -** simply invoke this interface with the third parameter set to -1. -** -** Run-time limits are intended for use in applications that manage -** both their own internal database and also databases that are controlled -** by untrusted external sources. An example application might be a -** web browser that has its own databases for storing history and -** separate databases controlled by JavaScript applications downloaded -** off the Internet. The internal databases can be given the -** large, default limits. Databases managed by external sources can -** be given much smaller limits designed to prevent a denial of service -** attack. Developers might also want to use the [sqlite3_set_authorizer()] -** interface to further control untrusted SQL. The size of the database -** created by an untrusted script can be contained using the -** [max_page_count] [PRAGMA]. -** -** New run-time limit categories may be added in future releases. -*/ -SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal); - -/* -** CAPI3REF: Run-Time Limit Categories -** KEYWORDS: {limit category} {*limit categories} -** -** These constants define various performance limits -** that can be lowered at run-time using [sqlite3_limit()]. -** The synopsis of the meanings of the various limits is shown below. -** Additional information is available at [limits | Limits in SQLite]. -** -** <dl> -** [[SQLITE_LIMIT_LENGTH]] ^(<dt>SQLITE_LIMIT_LENGTH</dt> -** <dd>The maximum size of any string or BLOB or table row, in bytes.<dd>)^ -** -** [[SQLITE_LIMIT_SQL_LENGTH]] ^(<dt>SQLITE_LIMIT_SQL_LENGTH</dt> -** <dd>The maximum length of an SQL statement, in bytes.</dd>)^ -** -** [[SQLITE_LIMIT_COLUMN]] ^(<dt>SQLITE_LIMIT_COLUMN</dt> -** <dd>The maximum number of columns in a table definition or in the -** result set of a [SELECT] or the maximum number of columns in an index -** or in an ORDER BY or GROUP BY clause.</dd>)^ -** -** [[SQLITE_LIMIT_EXPR_DEPTH]] ^(<dt>SQLITE_LIMIT_EXPR_DEPTH</dt> -** <dd>The maximum depth of the parse tree on any expression.</dd>)^ -** -** [[SQLITE_LIMIT_COMPOUND_SELECT]] ^(<dt>SQLITE_LIMIT_COMPOUND_SELECT</dt> -** <dd>The maximum number of terms in a compound SELECT statement.</dd>)^ -** -** [[SQLITE_LIMIT_VDBE_OP]] ^(<dt>SQLITE_LIMIT_VDBE_OP</dt> -** <dd>The maximum number of instructions in a virtual machine program -** used to implement an SQL statement. This limit is not currently -** enforced, though that might be added in some future release of -** SQLite.</dd>)^ -** -** [[SQLITE_LIMIT_FUNCTION_ARG]] ^(<dt>SQLITE_LIMIT_FUNCTION_ARG</dt> -** <dd>The maximum number of arguments on a function.</dd>)^ -** -** [[SQLITE_LIMIT_ATTACHED]] ^(<dt>SQLITE_LIMIT_ATTACHED</dt> -** <dd>The maximum number of [ATTACH | attached databases].)^</dd> -** -** [[SQLITE_LIMIT_LIKE_PATTERN_LENGTH]] -** ^(<dt>SQLITE_LIMIT_LIKE_PATTERN_LENGTH</dt> -** <dd>The maximum length of the pattern argument to the [LIKE] or -** [GLOB] operators.</dd>)^ -** -** [[SQLITE_LIMIT_VARIABLE_NUMBER]] -** ^(<dt>SQLITE_LIMIT_VARIABLE_NUMBER</dt> -** <dd>The maximum index number of any [parameter] in an SQL statement.)^ -** -** [[SQLITE_LIMIT_TRIGGER_DEPTH]] ^(<dt>SQLITE_LIMIT_TRIGGER_DEPTH</dt> -** <dd>The maximum depth of recursion for triggers.</dd>)^ -** -** [[SQLITE_LIMIT_WORKER_THREADS]] ^(<dt>SQLITE_LIMIT_WORKER_THREADS</dt> -** <dd>The maximum number of auxiliary worker threads that a single -** [prepared statement] may start.</dd>)^ -** </dl> -*/ -#define SQLITE_LIMIT_LENGTH 0 -#define SQLITE_LIMIT_SQL_LENGTH 1 -#define SQLITE_LIMIT_COLUMN 2 -#define SQLITE_LIMIT_EXPR_DEPTH 3 -#define SQLITE_LIMIT_COMPOUND_SELECT 4 -#define SQLITE_LIMIT_VDBE_OP 5 -#define SQLITE_LIMIT_FUNCTION_ARG 6 -#define SQLITE_LIMIT_ATTACHED 7 -#define SQLITE_LIMIT_LIKE_PATTERN_LENGTH 8 -#define SQLITE_LIMIT_VARIABLE_NUMBER 9 -#define SQLITE_LIMIT_TRIGGER_DEPTH 10 -#define SQLITE_LIMIT_WORKER_THREADS 11 - -/* -** CAPI3REF: Compiling An SQL Statement -** KEYWORDS: {SQL statement compiler} -** METHOD: sqlite3 -** CONSTRUCTOR: sqlite3_stmt -** -** To execute an SQL query, it must first be compiled into a byte-code -** program using one of these routines. -** -** The first argument, "db", is a [database connection] obtained from a -** prior successful call to [sqlite3_open()], [sqlite3_open_v2()] or -** [sqlite3_open16()]. The database connection must not have been closed. -** -** The second argument, "zSql", is the statement to be compiled, encoded -** as either UTF-8 or UTF-16. The sqlite3_prepare() and sqlite3_prepare_v2() -** interfaces use UTF-8, and sqlite3_prepare16() and sqlite3_prepare16_v2() -** use UTF-16. -** -** ^If the nByte argument is negative, then zSql is read up to the -** first zero terminator. ^If nByte is positive, then it is the -** number of bytes read from zSql. ^If nByte is zero, then no prepared -** statement is generated. -** If the caller knows that the supplied string is nul-terminated, then -** there is a small performance advantage to passing an nByte parameter that -** is the number of bytes in the input string <i>including</i> -** the nul-terminator. -** -** ^If pzTail is not NULL then *pzTail is made to point to the first byte -** past the end of the first SQL statement in zSql. These routines only -** compile the first statement in zSql, so *pzTail is left pointing to -** what remains uncompiled. -** -** ^*ppStmt is left pointing to a compiled [prepared statement] that can be -** executed using [sqlite3_step()]. ^If there is an error, *ppStmt is set -** to NULL. ^If the input text contains no SQL (if the input is an empty -** string or a comment) then *ppStmt is set to NULL. -** The calling procedure is responsible for deleting the compiled -** SQL statement using [sqlite3_finalize()] after it has finished with it. -** ppStmt may not be NULL. -** -** ^On success, the sqlite3_prepare() family of routines return [SQLITE_OK]; -** otherwise an [error code] is returned. -** -** The sqlite3_prepare_v2() and sqlite3_prepare16_v2() interfaces are -** recommended for all new programs. The two older interfaces are retained -** for backwards compatibility, but their use is discouraged. -** ^In the "v2" interfaces, the prepared statement -** that is returned (the [sqlite3_stmt] object) contains a copy of the -** original SQL text. This causes the [sqlite3_step()] interface to -** behave differently in three ways: -** -** <ol> -** <li> -** ^If the database schema changes, instead of returning [SQLITE_SCHEMA] as it -** always used to do, [sqlite3_step()] will automatically recompile the SQL -** statement and try to run it again. As many as [SQLITE_MAX_SCHEMA_RETRY] -** retries will occur before sqlite3_step() gives up and returns an error. -** </li> -** -** <li> -** ^When an error occurs, [sqlite3_step()] will return one of the detailed -** [error codes] or [extended error codes]. ^The legacy behavior was that -** [sqlite3_step()] would only return a generic [SQLITE_ERROR] result code -** and the application would have to make a second call to [sqlite3_reset()] -** in order to find the underlying cause of the problem. With the "v2" prepare -** interfaces, the underlying reason for the error is returned immediately. -** </li> -** -** <li> -** ^If the specific value bound to [parameter | host parameter] in the -** WHERE clause might influence the choice of query plan for a statement, -** then the statement will be automatically recompiled, as if there had been -** a schema change, on the first [sqlite3_step()] call following any change -** to the [sqlite3_bind_text | bindings] of that [parameter]. -** ^The specific value of WHERE-clause [parameter] might influence the -** choice of query plan if the parameter is the left-hand side of a [LIKE] -** or [GLOB] operator or if the parameter is compared to an indexed column -** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled. -** </li> -** </ol> -*/ -SQLITE_API int sqlite3_prepare( - sqlite3 *db, /* Database handle */ - const char *zSql, /* SQL statement, UTF-8 encoded */ - int nByte, /* Maximum length of zSql in bytes. */ - sqlite3_stmt **ppStmt, /* OUT: Statement handle */ - const char **pzTail /* OUT: Pointer to unused portion of zSql */ -); -SQLITE_API int sqlite3_prepare_v2( - sqlite3 *db, /* Database handle */ - const char *zSql, /* SQL statement, UTF-8 encoded */ - int nByte, /* Maximum length of zSql in bytes. */ - sqlite3_stmt **ppStmt, /* OUT: Statement handle */ - const char **pzTail /* OUT: Pointer to unused portion of zSql */ -); -SQLITE_API int sqlite3_prepare16( - sqlite3 *db, /* Database handle */ - const void *zSql, /* SQL statement, UTF-16 encoded */ - int nByte, /* Maximum length of zSql in bytes. */ - sqlite3_stmt **ppStmt, /* OUT: Statement handle */ - const void **pzTail /* OUT: Pointer to unused portion of zSql */ -); -SQLITE_API int sqlite3_prepare16_v2( - sqlite3 *db, /* Database handle */ - const void *zSql, /* SQL statement, UTF-16 encoded */ - int nByte, /* Maximum length of zSql in bytes. */ - sqlite3_stmt **ppStmt, /* OUT: Statement handle */ - const void **pzTail /* OUT: Pointer to unused portion of zSql */ -); - -/* -** CAPI3REF: Retrieving Statement SQL -** METHOD: sqlite3_stmt -** -** ^The sqlite3_sql(P) interface returns a pointer to a copy of the UTF-8 -** SQL text used to create [prepared statement] P if P was -** created by either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()]. -** ^The sqlite3_expanded_sql(P) interface returns a pointer to a UTF-8 -** string containing the SQL text of prepared statement P with -** [bound parameters] expanded. -** -** ^(For example, if a prepared statement is created using the SQL -** text "SELECT $abc,:xyz" and if parameter $abc is bound to integer 2345 -** and parameter :xyz is unbound, then sqlite3_sql() will return -** the original string, "SELECT $abc,:xyz" but sqlite3_expanded_sql() -** will return "SELECT 2345,NULL".)^ -** -** ^The sqlite3_expanded_sql() interface returns NULL if insufficient memory -** is available to hold the result, or if the result would exceed the -** the maximum string length determined by the [SQLITE_LIMIT_LENGTH]. -** -** ^The [SQLITE_TRACE_SIZE_LIMIT] compile-time option limits the size of -** bound parameter expansions. ^The [SQLITE_OMIT_TRACE] compile-time -** option causes sqlite3_expanded_sql() to always return NULL. -** -** ^The string returned by sqlite3_sql(P) is managed by SQLite and is -** automatically freed when the prepared statement is finalized. -** ^The string returned by sqlite3_expanded_sql(P), on the other hand, -** is obtained from [sqlite3_malloc()] and must be free by the application -** by passing it to [sqlite3_free()]. -*/ -SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt); -SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Determine If An SQL Statement Writes The Database -** METHOD: sqlite3_stmt -** -** ^The sqlite3_stmt_readonly(X) interface returns true (non-zero) if -** and only if the [prepared statement] X makes no direct changes to -** the content of the database file. -** -** Note that [application-defined SQL functions] or -** [virtual tables] might change the database indirectly as a side effect. -** ^(For example, if an application defines a function "eval()" that -** calls [sqlite3_exec()], then the following SQL statement would -** change the database file through side-effects: -** -** <blockquote><pre> -** SELECT eval('DELETE FROM t1') FROM t2; -** </pre></blockquote> -** -** But because the [SELECT] statement does not change the database file -** directly, sqlite3_stmt_readonly() would still return true.)^ -** -** ^Transaction control statements such as [BEGIN], [COMMIT], [ROLLBACK], -** [SAVEPOINT], and [RELEASE] cause sqlite3_stmt_readonly() to return true, -** since the statements themselves do not actually modify the database but -** rather they control the timing of when other statements modify the -** database. ^The [ATTACH] and [DETACH] statements also cause -** sqlite3_stmt_readonly() to return true since, while those statements -** change the configuration of a database connection, they do not make -** changes to the content of the database files on disk. -*/ -SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Determine If A Prepared Statement Has Been Reset -** METHOD: sqlite3_stmt -** -** ^The sqlite3_stmt_busy(S) interface returns true (non-zero) if the -** [prepared statement] S has been stepped at least once using -** [sqlite3_step(S)] but has neither run to completion (returned -** [SQLITE_DONE] from [sqlite3_step(S)]) nor -** been reset using [sqlite3_reset(S)]. ^The sqlite3_stmt_busy(S) -** interface returns false if S is a NULL pointer. If S is not a -** NULL pointer and is not a pointer to a valid [prepared statement] -** object, then the behavior is undefined and probably undesirable. -** -** This interface can be used in combination [sqlite3_next_stmt()] -** to locate all prepared statements associated with a database -** connection that are in need of being reset. This can be used, -** for example, in diagnostic routines to search for prepared -** statements that are holding a transaction open. -*/ -SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*); - -/* -** CAPI3REF: Dynamically Typed Value Object -** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} -** -** SQLite uses the sqlite3_value object to represent all values -** that can be stored in a database table. SQLite uses dynamic typing -** for the values it stores. ^Values stored in sqlite3_value objects -** can be integers, floating point values, strings, BLOBs, or NULL. -** -** An sqlite3_value object may be either "protected" or "unprotected". -** Some interfaces require a protected sqlite3_value. Other interfaces -** will accept either a protected or an unprotected sqlite3_value. -** Every interface that accepts sqlite3_value arguments specifies -** whether or not it requires a protected sqlite3_value. The -** [sqlite3_value_dup()] interface can be used to construct a new -** protected sqlite3_value from an unprotected sqlite3_value. -** -** The terms "protected" and "unprotected" refer to whether or not -** a mutex is held. An internal mutex is held for a protected -** sqlite3_value object but no mutex is held for an unprotected -** sqlite3_value object. If SQLite is compiled to be single-threaded -** (with [SQLITE_THREADSAFE=0] and with [sqlite3_threadsafe()] returning 0) -** or if SQLite is run in one of reduced mutex modes -** [SQLITE_CONFIG_SINGLETHREAD] or [SQLITE_CONFIG_MULTITHREAD] -** then there is no distinction between protected and unprotected -** sqlite3_value objects and they can be used interchangeably. However, -** for maximum code portability it is recommended that applications -** still make the distinction between protected and unprotected -** sqlite3_value objects even when not strictly required. -** -** ^The sqlite3_value objects that are passed as parameters into the -** implementation of [application-defined SQL functions] are protected. -** ^The sqlite3_value object returned by -** [sqlite3_column_value()] is unprotected. -** Unprotected sqlite3_value objects may only be used with -** [sqlite3_result_value()] and [sqlite3_bind_value()]. -** The [sqlite3_value_blob | sqlite3_value_type()] family of -** interfaces require protected sqlite3_value objects. -*/ -typedef struct Mem sqlite3_value; - -/* -** CAPI3REF: SQL Function Context Object -** -** The context in which an SQL function executes is stored in an -** sqlite3_context object. ^A pointer to an sqlite3_context object -** is always first parameter to [application-defined SQL functions]. -** The application-defined SQL function implementation will pass this -** pointer through into calls to [sqlite3_result_int | sqlite3_result()], -** [sqlite3_aggregate_context()], [sqlite3_user_data()], -** [sqlite3_context_db_handle()], [sqlite3_get_auxdata()], -** and/or [sqlite3_set_auxdata()]. -*/ -typedef struct sqlite3_context sqlite3_context; - -/* -** CAPI3REF: Binding Values To Prepared Statements -** KEYWORDS: {host parameter} {host parameters} {host parameter name} -** KEYWORDS: {SQL parameter} {SQL parameters} {parameter binding} -** METHOD: sqlite3_stmt -** -** ^(In the SQL statement text input to [sqlite3_prepare_v2()] and its variants, -** literals may be replaced by a [parameter] that matches one of following -** templates: -** -** <ul> -** <li> ? -** <li> ?NNN -** <li> :VVV -** <li> @VVV -** <li> $VVV -** </ul> -** -** In the templates above, NNN represents an integer literal, -** and VVV represents an alphanumeric identifier.)^ ^The values of these -** parameters (also called "host parameter names" or "SQL parameters") -** can be set using the sqlite3_bind_*() routines defined here. -** -** ^The first argument to the sqlite3_bind_*() routines is always -** a pointer to the [sqlite3_stmt] object returned from -** [sqlite3_prepare_v2()] or its variants. -** -** ^The second argument is the index of the SQL parameter to be set. -** ^The leftmost SQL parameter has an index of 1. ^When the same named -** SQL parameter is used more than once, second and subsequent -** occurrences have the same index as the first occurrence. -** ^The index for named parameters can be looked up using the -** [sqlite3_bind_parameter_index()] API if desired. ^The index -** for "?NNN" parameters is the value of NNN. -** ^The NNN value must be between 1 and the [sqlite3_limit()] -** parameter [SQLITE_LIMIT_VARIABLE_NUMBER] (default value: 999). -** -** ^The third argument is the value to bind to the parameter. -** ^If the third parameter to sqlite3_bind_text() or sqlite3_bind_text16() -** or sqlite3_bind_blob() is a NULL pointer then the fourth parameter -** is ignored and the end result is the same as sqlite3_bind_null(). -** -** ^(In those routines that have a fourth argument, its value is the -** number of bytes in the parameter. To be clear: the value is the -** number of <u>bytes</u> in the value, not the number of characters.)^ -** ^If the fourth parameter to sqlite3_bind_text() or sqlite3_bind_text16() -** is negative, then the length of the string is -** the number of bytes up to the first zero terminator. -** If the fourth parameter to sqlite3_bind_blob() is negative, then -** the behavior is undefined. -** If a non-negative fourth parameter is provided to sqlite3_bind_text() -** or sqlite3_bind_text16() or sqlite3_bind_text64() then -** that parameter must be the byte offset -** where the NUL terminator would occur assuming the string were NUL -** terminated. If any NUL characters occur at byte offsets less than -** the value of the fourth parameter then the resulting string value will -** contain embedded NULs. The result of expressions involving strings -** with embedded NULs is undefined. -** -** ^The fifth argument to the BLOB and string binding interfaces -** is a destructor used to dispose of the BLOB or -** string after SQLite has finished with it. ^The destructor is called -** to dispose of the BLOB or string even if the call to bind API fails. -** ^If the fifth argument is -** the special value [SQLITE_STATIC], then SQLite assumes that the -** information is in static, unmanaged space and does not need to be freed. -** ^If the fifth argument has the value [SQLITE_TRANSIENT], then -** SQLite makes its own private copy of the data immediately, before -** the sqlite3_bind_*() routine returns. -** -** ^The sixth argument to sqlite3_bind_text64() must be one of -** [SQLITE_UTF8], [SQLITE_UTF16], [SQLITE_UTF16BE], or [SQLITE_UTF16LE] -** to specify the encoding of the text in the third parameter. If -** the sixth argument to sqlite3_bind_text64() is not one of the -** allowed values shown above, or if the text encoding is different -** from the encoding specified by the sixth parameter, then the behavior -** is undefined. -** -** ^The sqlite3_bind_zeroblob() routine binds a BLOB of length N that -** is filled with zeroes. ^A zeroblob uses a fixed amount of memory -** (just an integer to hold its size) while it is being processed. -** Zeroblobs are intended to serve as placeholders for BLOBs whose -** content is later written using -** [sqlite3_blob_open | incremental BLOB I/O] routines. -** ^A negative value for the zeroblob results in a zero-length BLOB. -** -** ^If any of the sqlite3_bind_*() routines are called with a NULL pointer -** for the [prepared statement] or with a prepared statement for which -** [sqlite3_step()] has been called more recently than [sqlite3_reset()], -** then the call will return [SQLITE_MISUSE]. If any sqlite3_bind_() -** routine is passed a [prepared statement] that has been finalized, the -** result is undefined and probably harmful. -** -** ^Bindings are not cleared by the [sqlite3_reset()] routine. -** ^Unbound parameters are interpreted as NULL. -** -** ^The sqlite3_bind_* routines return [SQLITE_OK] on success or an -** [error code] if anything goes wrong. -** ^[SQLITE_TOOBIG] might be returned if the size of a string or BLOB -** exceeds limits imposed by [sqlite3_limit]([SQLITE_LIMIT_LENGTH]) or -** [SQLITE_MAX_LENGTH]. -** ^[SQLITE_RANGE] is returned if the parameter -** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails. -** -** See also: [sqlite3_bind_parameter_count()], -** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. -*/ -SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); -SQLITE_API int sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64, - void(*)(void*)); -SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double); -SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int); -SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); -SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int); -SQLITE_API int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*)); -SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*)); -SQLITE_API int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64, - void(*)(void*), unsigned char encoding); -SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); -SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); -SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64); - -/* -** CAPI3REF: Number Of SQL Parameters -** METHOD: sqlite3_stmt -** -** ^This routine can be used to find the number of [SQL parameters] -** in a [prepared statement]. SQL parameters are tokens of the -** form "?", "?NNN", ":AAA", "$AAA", or "@AAA" that serve as -** placeholders for values that are [sqlite3_bind_blob | bound] -** to the parameters at a later time. -** -** ^(This routine actually returns the index of the largest (rightmost) -** parameter. For all forms except ?NNN, this will correspond to the -** number of unique parameters. If parameters of the ?NNN form are used, -** there may be gaps in the list.)^ -** -** See also: [sqlite3_bind_blob|sqlite3_bind()], -** [sqlite3_bind_parameter_name()], and -** [sqlite3_bind_parameter_index()]. -*/ -SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*); - -/* -** CAPI3REF: Name Of A Host Parameter -** METHOD: sqlite3_stmt -** -** ^The sqlite3_bind_parameter_name(P,N) interface returns -** the name of the N-th [SQL parameter] in the [prepared statement] P. -** ^(SQL parameters of the form "?NNN" or ":AAA" or "@AAA" or "$AAA" -** have a name which is the string "?NNN" or ":AAA" or "@AAA" or "$AAA" -** respectively. -** In other words, the initial ":" or "$" or "@" or "?" -** is included as part of the name.)^ -** ^Parameters of the form "?" without a following integer have no name -** and are referred to as "nameless" or "anonymous parameters". -** -** ^The first host parameter has an index of 1, not 0. -** -** ^If the value N is out of range or if the N-th parameter is -** nameless, then NULL is returned. ^The returned string is -** always in UTF-8 encoding even if the named parameter was -** originally specified as UTF-16 in [sqlite3_prepare16()] or -** [sqlite3_prepare16_v2()]. -** -** See also: [sqlite3_bind_blob|sqlite3_bind()], -** [sqlite3_bind_parameter_count()], and -** [sqlite3_bind_parameter_index()]. -*/ -SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int); - -/* -** CAPI3REF: Index Of A Parameter With A Given Name -** METHOD: sqlite3_stmt -** -** ^Return the index of an SQL parameter given its name. ^The -** index value returned is suitable for use as the second -** parameter to [sqlite3_bind_blob|sqlite3_bind()]. ^A zero -** is returned if no matching parameter is found. ^The parameter -** name must be given in UTF-8 even if the original statement -** was prepared from UTF-16 text using [sqlite3_prepare16_v2()]. -** -** See also: [sqlite3_bind_blob|sqlite3_bind()], -** [sqlite3_bind_parameter_count()], and -** [sqlite3_bind_parameter_name()]. -*/ -SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); - -/* -** CAPI3REF: Reset All Bindings On A Prepared Statement -** METHOD: sqlite3_stmt -** -** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset -** the [sqlite3_bind_blob | bindings] on a [prepared statement]. -** ^Use this routine to reset all host parameters to NULL. -*/ -SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*); - -/* -** CAPI3REF: Number Of Columns In A Result Set -** METHOD: sqlite3_stmt -** -** ^Return the number of columns in the result set returned by the -** [prepared statement]. ^This routine returns 0 if pStmt is an SQL -** statement that does not return data (for example an [UPDATE]). -** -** See also: [sqlite3_data_count()] -*/ -SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Column Names In A Result Set -** METHOD: sqlite3_stmt -** -** ^These routines return the name assigned to a particular column -** in the result set of a [SELECT] statement. ^The sqlite3_column_name() -** interface returns a pointer to a zero-terminated UTF-8 string -** and sqlite3_column_name16() returns a pointer to a zero-terminated -** UTF-16 string. ^The first parameter is the [prepared statement] -** that implements the [SELECT] statement. ^The second parameter is the -** column number. ^The leftmost column is number 0. -** -** ^The returned string pointer is valid until either the [prepared statement] -** is destroyed by [sqlite3_finalize()] or until the statement is automatically -** reprepared by the first call to [sqlite3_step()] for a particular run -** or until the next call to -** sqlite3_column_name() or sqlite3_column_name16() on the same column. -** -** ^If sqlite3_malloc() fails during the processing of either routine -** (for example during a conversion from UTF-8 to UTF-16) then a -** NULL pointer is returned. -** -** ^The name of a result column is the value of the "AS" clause for -** that column, if there is an AS clause. If there is no AS clause -** then the name of the column is unspecified and may change from -** one release of SQLite to the next. -*/ -SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N); -SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N); - -/* -** CAPI3REF: Source Of Data In A Query Result -** METHOD: sqlite3_stmt -** -** ^These routines provide a means to determine the database, table, and -** table column that is the origin of a particular result column in -** [SELECT] statement. -** ^The name of the database or table or column can be returned as -** either a UTF-8 or UTF-16 string. ^The _database_ routines return -** the database name, the _table_ routines return the table name, and -** the origin_ routines return the column name. -** ^The returned string is valid until the [prepared statement] is destroyed -** using [sqlite3_finalize()] or until the statement is automatically -** reprepared by the first call to [sqlite3_step()] for a particular run -** or until the same information is requested -** again in a different encoding. -** -** ^The names returned are the original un-aliased names of the -** database, table, and column. -** -** ^The first argument to these interfaces is a [prepared statement]. -** ^These functions return information about the Nth result column returned by -** the statement, where N is the second function argument. -** ^The left-most column is column 0 for these routines. -** -** ^If the Nth column returned by the statement is an expression or -** subquery and is not a column value, then all of these functions return -** NULL. ^These routine might also return NULL if a memory allocation error -** occurs. ^Otherwise, they return the name of the attached database, table, -** or column that query result column was extracted from. -** -** ^As with all other SQLite APIs, those whose names end with "16" return -** UTF-16 encoded strings and the other functions return UTF-8. -** -** ^These APIs are only available if the library was compiled with the -** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol. -** -** If two or more threads call one or more of these routines against the same -** prepared statement and column at the same time then the results are -** undefined. -** -** If two or more threads call one or more -** [sqlite3_column_database_name | column metadata interfaces] -** for the same [prepared statement] and result column -** at the same time then the results are undefined. -*/ -SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int); -SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int); -SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int); -SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int); -SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int); -SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int); - -/* -** CAPI3REF: Declared Datatype Of A Query Result -** METHOD: sqlite3_stmt -** -** ^(The first parameter is a [prepared statement]. -** If this statement is a [SELECT] statement and the Nth column of the -** returned result set of that [SELECT] is a table column (not an -** expression or subquery) then the declared type of the table -** column is returned.)^ ^If the Nth column of the result set is an -** expression or subquery, then a NULL pointer is returned. -** ^The returned string is always UTF-8 encoded. -** -** ^(For example, given the database schema: -** -** CREATE TABLE t1(c1 VARIANT); -** -** and the following statement to be compiled: -** -** SELECT c1 + 1, c1 FROM t1; -** -** this routine would return the string "VARIANT" for the second result -** column (i==1), and a NULL pointer for the first result column (i==0).)^ -** -** ^SQLite uses dynamic run-time typing. ^So just because a column -** is declared to contain a particular type does not mean that the -** data stored in that column is of the declared type. SQLite is -** strongly typed, but the typing is dynamic not static. ^Type -** is associated with individual values, not with the containers -** used to hold those values. -*/ -SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int); -SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int); - -/* -** CAPI3REF: Evaluate An SQL Statement -** METHOD: sqlite3_stmt -** -** After a [prepared statement] has been prepared using either -** [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] or one of the legacy -** interfaces [sqlite3_prepare()] or [sqlite3_prepare16()], this function -** must be called one or more times to evaluate the statement. -** -** The details of the behavior of the sqlite3_step() interface depend -** on whether the statement was prepared using the newer "v2" interface -** [sqlite3_prepare_v2()] and [sqlite3_prepare16_v2()] or the older legacy -** interface [sqlite3_prepare()] and [sqlite3_prepare16()]. The use of the -** new "v2" interface is recommended for new applications but the legacy -** interface will continue to be supported. -** -** ^In the legacy interface, the return value will be either [SQLITE_BUSY], -** [SQLITE_DONE], [SQLITE_ROW], [SQLITE_ERROR], or [SQLITE_MISUSE]. -** ^With the "v2" interface, any of the other [result codes] or -** [extended result codes] might be returned as well. -** -** ^[SQLITE_BUSY] means that the database engine was unable to acquire the -** database locks it needs to do its job. ^If the statement is a [COMMIT] -** or occurs outside of an explicit transaction, then you can retry the -** statement. If the statement is not a [COMMIT] and occurs within an -** explicit transaction then you should rollback the transaction before -** continuing. -** -** ^[SQLITE_DONE] means that the statement has finished executing -** successfully. sqlite3_step() should not be called again on this virtual -** machine without first calling [sqlite3_reset()] to reset the virtual -** machine back to its initial state. -** -** ^If the SQL statement being executed returns any data, then [SQLITE_ROW] -** is returned each time a new row of data is ready for processing by the -** caller. The values may be accessed using the [column access functions]. -** sqlite3_step() is called again to retrieve the next row of data. -** -** ^[SQLITE_ERROR] means that a run-time error (such as a constraint -** violation) has occurred. sqlite3_step() should not be called again on -** the VM. More information may be found by calling [sqlite3_errmsg()]. -** ^With the legacy interface, a more specific error code (for example, -** [SQLITE_INTERRUPT], [SQLITE_SCHEMA], [SQLITE_CORRUPT], and so forth) -** can be obtained by calling [sqlite3_reset()] on the -** [prepared statement]. ^In the "v2" interface, -** the more specific error code is returned directly by sqlite3_step(). -** -** [SQLITE_MISUSE] means that the this routine was called inappropriately. -** Perhaps it was called on a [prepared statement] that has -** already been [sqlite3_finalize | finalized] or on one that had -** previously returned [SQLITE_ERROR] or [SQLITE_DONE]. Or it could -** be the case that the same database connection is being used by two or -** more threads at the same moment in time. -** -** For all versions of SQLite up to and including 3.6.23.1, a call to -** [sqlite3_reset()] was required after sqlite3_step() returned anything -** other than [SQLITE_ROW] before any subsequent invocation of -** sqlite3_step(). Failure to reset the prepared statement using -** [sqlite3_reset()] would result in an [SQLITE_MISUSE] return from -** sqlite3_step(). But after [version 3.6.23.1] ([dateof:3.6.23.1], -** sqlite3_step() began -** calling [sqlite3_reset()] automatically in this circumstance rather -** than returning [SQLITE_MISUSE]. This is not considered a compatibility -** break because any application that ever receives an SQLITE_MISUSE error -** is broken by definition. The [SQLITE_OMIT_AUTORESET] compile-time option -** can be used to restore the legacy behavior. -** -** <b>Goofy Interface Alert:</b> In the legacy interface, the sqlite3_step() -** API always returns a generic error code, [SQLITE_ERROR], following any -** error other than [SQLITE_BUSY] and [SQLITE_MISUSE]. You must call -** [sqlite3_reset()] or [sqlite3_finalize()] in order to find one of the -** specific [error codes] that better describes the error. -** We admit that this is a goofy design. The problem has been fixed -** with the "v2" interface. If you prepare all of your SQL statements -** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead -** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces, -** then the more specific [error codes] are returned directly -** by sqlite3_step(). The use of the "v2" interface is recommended. -*/ -SQLITE_API int sqlite3_step(sqlite3_stmt*); - -/* -** CAPI3REF: Number of columns in a result set -** METHOD: sqlite3_stmt -** -** ^The sqlite3_data_count(P) interface returns the number of columns in the -** current row of the result set of [prepared statement] P. -** ^If prepared statement P does not have results ready to return -** (via calls to the [sqlite3_column_int | sqlite3_column_*()] of -** interfaces) then sqlite3_data_count(P) returns 0. -** ^The sqlite3_data_count(P) routine also returns 0 if P is a NULL pointer. -** ^The sqlite3_data_count(P) routine returns 0 if the previous call to -** [sqlite3_step](P) returned [SQLITE_DONE]. ^The sqlite3_data_count(P) -** will return non-zero if previous call to [sqlite3_step](P) returned -** [SQLITE_ROW], except in the case of the [PRAGMA incremental_vacuum] -** where it always returns zero since each step of that multi-step -** pragma returns 0 columns of data. -** -** See also: [sqlite3_column_count()] -*/ -SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Fundamental Datatypes -** KEYWORDS: SQLITE_TEXT -** -** ^(Every value in SQLite has one of five fundamental datatypes: -** -** <ul> -** <li> 64-bit signed integer -** <li> 64-bit IEEE floating point number -** <li> string -** <li> BLOB -** <li> NULL -** </ul>)^ -** -** These constants are codes for each of those types. -** -** Note that the SQLITE_TEXT constant was also used in SQLite version 2 -** for a completely different meaning. Software that links against both -** SQLite version 2 and SQLite version 3 should use SQLITE3_TEXT, not -** SQLITE_TEXT. -*/ -#define SQLITE_INTEGER 1 -#define SQLITE_FLOAT 2 -#define SQLITE_BLOB 4 -#define SQLITE_NULL 5 -#ifdef SQLITE_TEXT -# undef SQLITE_TEXT -#else -# define SQLITE_TEXT 3 -#endif -#define SQLITE3_TEXT 3 - -/* -** CAPI3REF: Result Values From A Query -** KEYWORDS: {column access functions} -** METHOD: sqlite3_stmt -** -** ^These routines return information about a single column of the current -** result row of a query. ^In every case the first argument is a pointer -** to the [prepared statement] that is being evaluated (the [sqlite3_stmt*] -** that was returned from [sqlite3_prepare_v2()] or one of its variants) -** and the second argument is the index of the column for which information -** should be returned. ^The leftmost column of the result set has the index 0. -** ^The number of columns in the result can be determined using -** [sqlite3_column_count()]. -** -** If the SQL statement does not currently point to a valid row, or if the -** column index is out of range, the result is undefined. -** These routines may only be called when the most recent call to -** [sqlite3_step()] has returned [SQLITE_ROW] and neither -** [sqlite3_reset()] nor [sqlite3_finalize()] have been called subsequently. -** If any of these routines are called after [sqlite3_reset()] or -** [sqlite3_finalize()] or after [sqlite3_step()] has returned -** something other than [SQLITE_ROW], the results are undefined. -** If [sqlite3_step()] or [sqlite3_reset()] or [sqlite3_finalize()] -** are called from a different thread while any of these routines -** are pending, then the results are undefined. -** -** ^The sqlite3_column_type() routine returns the -** [SQLITE_INTEGER | datatype code] for the initial data type -** of the result column. ^The returned value is one of [SQLITE_INTEGER], -** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL]. The value -** returned by sqlite3_column_type() is only meaningful if no type -** conversions have occurred as described below. After a type conversion, -** the value returned by sqlite3_column_type() is undefined. Future -** versions of SQLite may change the behavior of sqlite3_column_type() -** following a type conversion. -** -** ^If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes() -** routine returns the number of bytes in that BLOB or string. -** ^If the result is a UTF-16 string, then sqlite3_column_bytes() converts -** the string to UTF-8 and then returns the number of bytes. -** ^If the result is a numeric value then sqlite3_column_bytes() uses -** [sqlite3_snprintf()] to convert that value to a UTF-8 string and returns -** the number of bytes in that string. -** ^If the result is NULL, then sqlite3_column_bytes() returns zero. -** -** ^If the result is a BLOB or UTF-16 string then the sqlite3_column_bytes16() -** routine returns the number of bytes in that BLOB or string. -** ^If the result is a UTF-8 string, then sqlite3_column_bytes16() converts -** the string to UTF-16 and then returns the number of bytes. -** ^If the result is a numeric value then sqlite3_column_bytes16() uses -** [sqlite3_snprintf()] to convert that value to a UTF-16 string and returns -** the number of bytes in that string. -** ^If the result is NULL, then sqlite3_column_bytes16() returns zero. -** -** ^The values returned by [sqlite3_column_bytes()] and -** [sqlite3_column_bytes16()] do not include the zero terminators at the end -** of the string. ^For clarity: the values returned by -** [sqlite3_column_bytes()] and [sqlite3_column_bytes16()] are the number of -** bytes in the string, not the number of characters. -** -** ^Strings returned by sqlite3_column_text() and sqlite3_column_text16(), -** even empty strings, are always zero-terminated. ^The return -** value from sqlite3_column_blob() for a zero-length BLOB is a NULL pointer. -** -** <b>Warning:</b> ^The object returned by [sqlite3_column_value()] is an -** [unprotected sqlite3_value] object. In a multithreaded environment, -** an unprotected sqlite3_value object may only be used safely with -** [sqlite3_bind_value()] and [sqlite3_result_value()]. -** If the [unprotected sqlite3_value] object returned by -** [sqlite3_column_value()] is used in any other way, including calls -** to routines like [sqlite3_value_int()], [sqlite3_value_text()], -** or [sqlite3_value_bytes()], the behavior is not threadsafe. -** -** These routines attempt to convert the value where appropriate. ^For -** example, if the internal representation is FLOAT and a text result -** is requested, [sqlite3_snprintf()] is used internally to perform the -** conversion automatically. ^(The following table details the conversions -** that are applied: -** -** <blockquote> -** <table border="1"> -** <tr><th> Internal<br>Type <th> Requested<br>Type <th> Conversion -** -** <tr><td> NULL <td> INTEGER <td> Result is 0 -** <tr><td> NULL <td> FLOAT <td> Result is 0.0 -** <tr><td> NULL <td> TEXT <td> Result is a NULL pointer -** <tr><td> NULL <td> BLOB <td> Result is a NULL pointer -** <tr><td> INTEGER <td> FLOAT <td> Convert from integer to float -** <tr><td> INTEGER <td> TEXT <td> ASCII rendering of the integer -** <tr><td> INTEGER <td> BLOB <td> Same as INTEGER->TEXT -** <tr><td> FLOAT <td> INTEGER <td> [CAST] to INTEGER -** <tr><td> FLOAT <td> TEXT <td> ASCII rendering of the float -** <tr><td> FLOAT <td> BLOB <td> [CAST] to BLOB -** <tr><td> TEXT <td> INTEGER <td> [CAST] to INTEGER -** <tr><td> TEXT <td> FLOAT <td> [CAST] to REAL -** <tr><td> TEXT <td> BLOB <td> No change -** <tr><td> BLOB <td> INTEGER <td> [CAST] to INTEGER -** <tr><td> BLOB <td> FLOAT <td> [CAST] to REAL -** <tr><td> BLOB <td> TEXT <td> Add a zero terminator if needed -** </table> -** </blockquote>)^ -** -** Note that when type conversions occur, pointers returned by prior -** calls to sqlite3_column_blob(), sqlite3_column_text(), and/or -** sqlite3_column_text16() may be invalidated. -** Type conversions and pointer invalidations might occur -** in the following cases: -** -** <ul> -** <li> The initial content is a BLOB and sqlite3_column_text() or -** sqlite3_column_text16() is called. A zero-terminator might -** need to be added to the string.</li> -** <li> The initial content is UTF-8 text and sqlite3_column_bytes16() or -** sqlite3_column_text16() is called. The content must be converted -** to UTF-16.</li> -** <li> The initial content is UTF-16 text and sqlite3_column_bytes() or -** sqlite3_column_text() is called. The content must be converted -** to UTF-8.</li> -** </ul> -** -** ^Conversions between UTF-16be and UTF-16le are always done in place and do -** not invalidate a prior pointer, though of course the content of the buffer -** that the prior pointer references will have been modified. Other kinds -** of conversion are done in place when it is possible, but sometimes they -** are not possible and in those cases prior pointers are invalidated. -** -** The safest policy is to invoke these routines -** in one of the following ways: -** -** <ul> -** <li>sqlite3_column_text() followed by sqlite3_column_bytes()</li> -** <li>sqlite3_column_blob() followed by sqlite3_column_bytes()</li> -** <li>sqlite3_column_text16() followed by sqlite3_column_bytes16()</li> -** </ul> -** -** In other words, you should call sqlite3_column_text(), -** sqlite3_column_blob(), or sqlite3_column_text16() first to force the result -** into the desired format, then invoke sqlite3_column_bytes() or -** sqlite3_column_bytes16() to find the size of the result. Do not mix calls -** to sqlite3_column_text() or sqlite3_column_blob() with calls to -** sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16() -** with calls to sqlite3_column_bytes(). -** -** ^The pointers returned are valid until a type conversion occurs as -** described above, or until [sqlite3_step()] or [sqlite3_reset()] or -** [sqlite3_finalize()] is called. ^The memory space used to hold strings -** and BLOBs is freed automatically. Do <em>not</em> pass the pointers returned -** from [sqlite3_column_blob()], [sqlite3_column_text()], etc. into -** [sqlite3_free()]. -** -** ^(If a memory allocation error occurs during the evaluation of any -** of these routines, a default value is returned. The default value -** is either the integer 0, the floating point number 0.0, or a NULL -** pointer. Subsequent calls to [sqlite3_errcode()] will return -** [SQLITE_NOMEM].)^ -*/ -SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol); -SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol); -SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol); -SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol); -SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol); -SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol); -SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol); -SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol); -SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol); -SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol); - -/* -** CAPI3REF: Destroy A Prepared Statement Object -** DESTRUCTOR: sqlite3_stmt -** -** ^The sqlite3_finalize() function is called to delete a [prepared statement]. -** ^If the most recent evaluation of the statement encountered no errors -** or if the statement is never been evaluated, then sqlite3_finalize() returns -** SQLITE_OK. ^If the most recent evaluation of statement S failed, then -** sqlite3_finalize(S) returns the appropriate [error code] or -** [extended error code]. -** -** ^The sqlite3_finalize(S) routine can be called at any point during -** the life cycle of [prepared statement] S: -** before statement S is ever evaluated, after -** one or more calls to [sqlite3_reset()], or after any call -** to [sqlite3_step()] regardless of whether or not the statement has -** completed execution. -** -** ^Invoking sqlite3_finalize() on a NULL pointer is a harmless no-op. -** -** The application must finalize every [prepared statement] in order to avoid -** resource leaks. It is a grievous error for the application to try to use -** a prepared statement after it has been finalized. Any use of a prepared -** statement after it has been finalized can result in undefined and -** undesirable behavior such as segfaults and heap corruption. -*/ -SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Reset A Prepared Statement Object -** METHOD: sqlite3_stmt -** -** The sqlite3_reset() function is called to reset a [prepared statement] -** object back to its initial state, ready to be re-executed. -** ^Any SQL statement variables that had values bound to them using -** the [sqlite3_bind_blob | sqlite3_bind_*() API] retain their values. -** Use [sqlite3_clear_bindings()] to reset the bindings. -** -** ^The [sqlite3_reset(S)] interface resets the [prepared statement] S -** back to the beginning of its program. -** -** ^If the most recent call to [sqlite3_step(S)] for the -** [prepared statement] S returned [SQLITE_ROW] or [SQLITE_DONE], -** or if [sqlite3_step(S)] has never before been called on S, -** then [sqlite3_reset(S)] returns [SQLITE_OK]. -** -** ^If the most recent call to [sqlite3_step(S)] for the -** [prepared statement] S indicated an error, then -** [sqlite3_reset(S)] returns an appropriate [error code]. -** -** ^The [sqlite3_reset(S)] interface does not change the values -** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. -*/ -SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Create Or Redefine SQL Functions -** KEYWORDS: {function creation routines} -** KEYWORDS: {application-defined SQL function} -** KEYWORDS: {application-defined SQL functions} -** METHOD: sqlite3 -** -** ^These functions (collectively known as "function creation routines") -** are used to add SQL functions or aggregates or to redefine the behavior -** of existing SQL functions or aggregates. The only differences between -** these routines are the text encoding expected for -** the second parameter (the name of the function being created) -** and the presence or absence of a destructor callback for -** the application data pointer. -** -** ^The first parameter is the [database connection] to which the SQL -** function is to be added. ^If an application uses more than one database -** connection then application-defined SQL functions must be added -** to each database connection separately. -** -** ^The second parameter is the name of the SQL function to be created or -** redefined. ^The length of the name is limited to 255 bytes in a UTF-8 -** representation, exclusive of the zero-terminator. ^Note that the name -** length limit is in UTF-8 bytes, not characters nor UTF-16 bytes. -** ^Any attempt to create a function with a longer name -** will result in [SQLITE_MISUSE] being returned. -** -** ^The third parameter (nArg) -** is the number of arguments that the SQL function or -** aggregate takes. ^If this parameter is -1, then the SQL function or -** aggregate may take any number of arguments between 0 and the limit -** set by [sqlite3_limit]([SQLITE_LIMIT_FUNCTION_ARG]). If the third -** parameter is less than -1 or greater than 127 then the behavior is -** undefined. -** -** ^The fourth parameter, eTextRep, specifies what -** [SQLITE_UTF8 | text encoding] this SQL function prefers for -** its parameters. The application should set this parameter to -** [SQLITE_UTF16LE] if the function implementation invokes -** [sqlite3_value_text16le()] on an input, or [SQLITE_UTF16BE] if the -** implementation invokes [sqlite3_value_text16be()] on an input, or -** [SQLITE_UTF16] if [sqlite3_value_text16()] is used, or [SQLITE_UTF8] -** otherwise. ^The same SQL function may be registered multiple times using -** different preferred text encodings, with different implementations for -** each encoding. -** ^When multiple implementations of the same function are available, SQLite -** will pick the one that involves the least amount of data conversion. -** -** ^The fourth parameter may optionally be ORed with [SQLITE_DETERMINISTIC] -** to signal that the function will always return the same result given -** the same inputs within a single SQL statement. Most SQL functions are -** deterministic. The built-in [random()] SQL function is an example of a -** function that is not deterministic. The SQLite query planner is able to -** perform additional optimizations on deterministic functions, so use -** of the [SQLITE_DETERMINISTIC] flag is recommended where possible. -** -** ^(The fifth parameter is an arbitrary pointer. The implementation of the -** function can gain access to this pointer using [sqlite3_user_data()].)^ -** -** ^The sixth, seventh and eighth parameters, xFunc, xStep and xFinal, are -** pointers to C-language functions that implement the SQL function or -** aggregate. ^A scalar SQL function requires an implementation of the xFunc -** callback only; NULL pointers must be passed as the xStep and xFinal -** parameters. ^An aggregate SQL function requires an implementation of xStep -** and xFinal and NULL pointer must be passed for xFunc. ^To delete an existing -** SQL function or aggregate, pass NULL pointers for all three function -** callbacks. -** -** ^(If the ninth parameter to sqlite3_create_function_v2() is not NULL, -** then it is destructor for the application data pointer. -** The destructor is invoked when the function is deleted, either by being -** overloaded or when the database connection closes.)^ -** ^The destructor is also invoked if the call to -** sqlite3_create_function_v2() fails. -** ^When the destructor callback of the tenth parameter is invoked, it -** is passed a single argument which is a copy of the application data -** pointer which was the fifth parameter to sqlite3_create_function_v2(). -** -** ^It is permitted to register multiple implementations of the same -** functions with the same name but with either differing numbers of -** arguments or differing preferred text encodings. ^SQLite will use -** the implementation that most closely matches the way in which the -** SQL function is used. ^A function implementation with a non-negative -** nArg parameter is a better match than a function implementation with -** a negative nArg. ^A function where the preferred text encoding -** matches the database encoding is a better -** match than a function where the encoding is different. -** ^A function where the encoding difference is between UTF16le and UTF16be -** is a closer match than a function where the encoding difference is -** between UTF8 and UTF16. -** -** ^Built-in functions may be overloaded by new application-defined functions. -** -** ^An application-defined function is permitted to call other -** SQLite interfaces. However, such calls must not -** close the database connection nor finalize or reset the prepared -** statement in which the function is running. -*/ -SQLITE_API int sqlite3_create_function( - sqlite3 *db, - const char *zFunctionName, - int nArg, - int eTextRep, - void *pApp, - void (*xFunc)(sqlite3_context*,int,sqlite3_value**), - void (*xStep)(sqlite3_context*,int,sqlite3_value**), - void (*xFinal)(sqlite3_context*) -); -SQLITE_API int sqlite3_create_function16( - sqlite3 *db, - const void *zFunctionName, - int nArg, - int eTextRep, - void *pApp, - void (*xFunc)(sqlite3_context*,int,sqlite3_value**), - void (*xStep)(sqlite3_context*,int,sqlite3_value**), - void (*xFinal)(sqlite3_context*) -); -SQLITE_API int sqlite3_create_function_v2( - sqlite3 *db, - const char *zFunctionName, - int nArg, - int eTextRep, - void *pApp, - void (*xFunc)(sqlite3_context*,int,sqlite3_value**), - void (*xStep)(sqlite3_context*,int,sqlite3_value**), - void (*xFinal)(sqlite3_context*), - void(*xDestroy)(void*) -); - -/* -** CAPI3REF: Text Encodings -** -** These constant define integer codes that represent the various -** text encodings supported by SQLite. -*/ -#define SQLITE_UTF8 1 /* IMP: R-37514-35566 */ -#define SQLITE_UTF16LE 2 /* IMP: R-03371-37637 */ -#define SQLITE_UTF16BE 3 /* IMP: R-51971-34154 */ -#define SQLITE_UTF16 4 /* Use native byte order */ -#define SQLITE_ANY 5 /* Deprecated */ -#define SQLITE_UTF16_ALIGNED 8 /* sqlite3_create_collation only */ - -/* -** CAPI3REF: Function Flags -** -** These constants may be ORed together with the -** [SQLITE_UTF8 | preferred text encoding] as the fourth argument -** to [sqlite3_create_function()], [sqlite3_create_function16()], or -** [sqlite3_create_function_v2()]. -*/ -#define SQLITE_DETERMINISTIC 0x800 - -/* -** CAPI3REF: Deprecated Functions -** DEPRECATED -** -** These functions are [deprecated]. In order to maintain -** backwards compatibility with older code, these functions continue -** to be supported. However, new applications should avoid -** the use of these functions. To encourage programmers to avoid -** these functions, we will not explain what they do. -*/ -#ifndef SQLITE_OMIT_DEPRECATED -SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*); -SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*); -SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); -SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void); -SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void); -SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int), - void*,sqlite3_int64); -#endif - -/* -** CAPI3REF: Obtaining SQL Values -** METHOD: sqlite3_value -** -** The C-language implementation of SQL functions and aggregates uses -** this set of interface routines to access the parameter values on -** the function or aggregate. -** -** The xFunc (for scalar functions) or xStep (for aggregates) parameters -** to [sqlite3_create_function()] and [sqlite3_create_function16()] -** define callbacks that implement the SQL functions and aggregates. -** The 3rd parameter to these callbacks is an array of pointers to -** [protected sqlite3_value] objects. There is one [sqlite3_value] object for -** each parameter to the SQL function. These routines are used to -** extract values from the [sqlite3_value] objects. -** -** These routines work only with [protected sqlite3_value] objects. -** Any attempt to use these routines on an [unprotected sqlite3_value] -** object results in undefined behavior. -** -** ^These routines work just like the corresponding [column access functions] -** except that these routines take a single [protected sqlite3_value] object -** pointer instead of a [sqlite3_stmt*] pointer and an integer column number. -** -** ^The sqlite3_value_text16() interface extracts a UTF-16 string -** in the native byte-order of the host machine. ^The -** sqlite3_value_text16be() and sqlite3_value_text16le() interfaces -** extract UTF-16 strings as big-endian and little-endian respectively. -** -** ^(The sqlite3_value_numeric_type() interface attempts to apply -** numeric affinity to the value. This means that an attempt is -** made to convert the value to an integer or floating point. If -** such a conversion is possible without loss of information (in other -** words, if the value is a string that looks like a number) -** then the conversion is performed. Otherwise no conversion occurs. -** The [SQLITE_INTEGER | datatype] after conversion is returned.)^ -** -** Please pay particular attention to the fact that the pointer returned -** from [sqlite3_value_blob()], [sqlite3_value_text()], or -** [sqlite3_value_text16()] can be invalidated by a subsequent call to -** [sqlite3_value_bytes()], [sqlite3_value_bytes16()], [sqlite3_value_text()], -** or [sqlite3_value_text16()]. -** -** These routines must be called from the same thread as -** the SQL function that supplied the [sqlite3_value*] parameters. -*/ -SQLITE_API const void *sqlite3_value_blob(sqlite3_value*); -SQLITE_API int sqlite3_value_bytes(sqlite3_value*); -SQLITE_API int sqlite3_value_bytes16(sqlite3_value*); -SQLITE_API double sqlite3_value_double(sqlite3_value*); -SQLITE_API int sqlite3_value_int(sqlite3_value*); -SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*); -SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*); -SQLITE_API const void *sqlite3_value_text16(sqlite3_value*); -SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*); -SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*); -SQLITE_API int sqlite3_value_type(sqlite3_value*); -SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*); - -/* -** CAPI3REF: Finding The Subtype Of SQL Values -** METHOD: sqlite3_value -** -** The sqlite3_value_subtype(V) function returns the subtype for -** an [application-defined SQL function] argument V. The subtype -** information can be used to pass a limited amount of context from -** one SQL function to another. Use the [sqlite3_result_subtype()] -** routine to set the subtype for the return value of an SQL function. -** -** SQLite makes no use of subtype itself. It merely passes the subtype -** from the result of one [application-defined SQL function] into the -** input of another. -*/ -SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*); - -/* -** CAPI3REF: Copy And Free SQL Values -** METHOD: sqlite3_value -** -** ^The sqlite3_value_dup(V) interface makes a copy of the [sqlite3_value] -** object D and returns a pointer to that copy. ^The [sqlite3_value] returned -** is a [protected sqlite3_value] object even if the input is not. -** ^The sqlite3_value_dup(V) interface returns NULL if V is NULL or if a -** memory allocation fails. -** -** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object -** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer -** then sqlite3_value_free(V) is a harmless no-op. -*/ -SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value*); -SQLITE_API void sqlite3_value_free(sqlite3_value*); - -/* -** CAPI3REF: Obtain Aggregate Function Context -** METHOD: sqlite3_context -** -** Implementations of aggregate SQL functions use this -** routine to allocate memory for storing their state. -** -** ^The first time the sqlite3_aggregate_context(C,N) routine is called -** for a particular aggregate function, SQLite -** allocates N of memory, zeroes out that memory, and returns a pointer -** to the new memory. ^On second and subsequent calls to -** sqlite3_aggregate_context() for the same aggregate function instance, -** the same buffer is returned. Sqlite3_aggregate_context() is normally -** called once for each invocation of the xStep callback and then one -** last time when the xFinal callback is invoked. ^(When no rows match -** an aggregate query, the xStep() callback of the aggregate function -** implementation is never called and xFinal() is called exactly once. -** In those cases, sqlite3_aggregate_context() might be called for the -** first time from within xFinal().)^ -** -** ^The sqlite3_aggregate_context(C,N) routine returns a NULL pointer -** when first called if N is less than or equal to zero or if a memory -** allocate error occurs. -** -** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is -** determined by the N parameter on first successful call. Changing the -** value of N in subsequent call to sqlite3_aggregate_context() within -** the same aggregate function instance will not resize the memory -** allocation.)^ Within the xFinal callback, it is customary to set -** N=0 in calls to sqlite3_aggregate_context(C,N) so that no -** pointless memory allocations occur. -** -** ^SQLite automatically frees the memory allocated by -** sqlite3_aggregate_context() when the aggregate query concludes. -** -** The first parameter must be a copy of the -** [sqlite3_context | SQL function context] that is the first parameter -** to the xStep or xFinal callback routine that implements the aggregate -** function. -** -** This routine must be called from the same thread in which -** the aggregate SQL function is running. -*/ -SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes); - -/* -** CAPI3REF: User Data For Functions -** METHOD: sqlite3_context -** -** ^The sqlite3_user_data() interface returns a copy of -** the pointer that was the pUserData parameter (the 5th parameter) -** of the [sqlite3_create_function()] -** and [sqlite3_create_function16()] routines that originally -** registered the application defined function. -** -** This routine must be called from the same thread in which -** the application-defined function is running. -*/ -SQLITE_API void *sqlite3_user_data(sqlite3_context*); - -/* -** CAPI3REF: Database Connection For Functions -** METHOD: sqlite3_context -** -** ^The sqlite3_context_db_handle() interface returns a copy of -** the pointer to the [database connection] (the 1st parameter) -** of the [sqlite3_create_function()] -** and [sqlite3_create_function16()] routines that originally -** registered the application defined function. -*/ -SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*); - -/* -** CAPI3REF: Function Auxiliary Data -** METHOD: sqlite3_context -** -** These functions may be used by (non-aggregate) SQL functions to -** associate metadata with argument values. If the same value is passed to -** multiple invocations of the same SQL function during query execution, under -** some circumstances the associated metadata may be preserved. An example -** of where this might be useful is in a regular-expression matching -** function. The compiled version of the regular expression can be stored as -** metadata associated with the pattern string. -** Then as long as the pattern string remains the same, -** the compiled regular expression can be reused on multiple -** invocations of the same function. -** -** ^The sqlite3_get_auxdata() interface returns a pointer to the metadata -** associated by the sqlite3_set_auxdata() function with the Nth argument -** value to the application-defined function. ^If there is no metadata -** associated with the function argument, this sqlite3_get_auxdata() interface -** returns a NULL pointer. -** -** ^The sqlite3_set_auxdata(C,N,P,X) interface saves P as metadata for the N-th -** argument of the application-defined function. ^Subsequent -** calls to sqlite3_get_auxdata(C,N) return P from the most recent -** sqlite3_set_auxdata(C,N,P,X) call if the metadata is still valid or -** NULL if the metadata has been discarded. -** ^After each call to sqlite3_set_auxdata(C,N,P,X) where X is not NULL, -** SQLite will invoke the destructor function X with parameter P exactly -** once, when the metadata is discarded. -** SQLite is free to discard the metadata at any time, including: <ul> -** <li> ^(when the corresponding function parameter changes)^, or -** <li> ^(when [sqlite3_reset()] or [sqlite3_finalize()] is called for the -** SQL statement)^, or -** <li> ^(when sqlite3_set_auxdata() is invoked again on the same -** parameter)^, or -** <li> ^(during the original sqlite3_set_auxdata() call when a memory -** allocation error occurs.)^ </ul> -** -** Note the last bullet in particular. The destructor X in -** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before the -** sqlite3_set_auxdata() interface even returns. Hence sqlite3_set_auxdata() -** should be called near the end of the function implementation and the -** function implementation should not make any use of P after -** sqlite3_set_auxdata() has been called. -** -** ^(In practice, metadata is preserved between function calls for -** function parameters that are compile-time constants, including literal -** values and [parameters] and expressions composed from the same.)^ -** -** These routines must be called from the same thread in which -** the SQL function is running. -*/ -SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N); -SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*)); - - -/* -** CAPI3REF: Constants Defining Special Destructor Behavior -** -** These are special values for the destructor that is passed in as the -** final argument to routines like [sqlite3_result_blob()]. ^If the destructor -** argument is SQLITE_STATIC, it means that the content pointer is constant -** and will never change. It does not need to be destroyed. ^The -** SQLITE_TRANSIENT value means that the content will likely change in -** the near future and that SQLite should make its own private copy of -** the content before returning. -** -** The typedef is necessary to work around problems in certain -** C++ compilers. -*/ -typedef void (*sqlite3_destructor_type)(void*); -#define SQLITE_STATIC ((sqlite3_destructor_type)0) -#define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1) - -/* -** CAPI3REF: Setting The Result Of An SQL Function -** METHOD: sqlite3_context -** -** These routines are used by the xFunc or xFinal callbacks that -** implement SQL functions and aggregates. See -** [sqlite3_create_function()] and [sqlite3_create_function16()] -** for additional information. -** -** These functions work very much like the [parameter binding] family of -** functions used to bind values to host parameters in prepared statements. -** Refer to the [SQL parameter] documentation for additional information. -** -** ^The sqlite3_result_blob() interface sets the result from -** an application-defined function to be the BLOB whose content is pointed -** to by the second parameter and which is N bytes long where N is the -** third parameter. -** -** ^The sqlite3_result_zeroblob(C,N) and sqlite3_result_zeroblob64(C,N) -** interfaces set the result of the application-defined function to be -** a BLOB containing all zero bytes and N bytes in size. -** -** ^The sqlite3_result_double() interface sets the result from -** an application-defined function to be a floating point value specified -** by its 2nd argument. -** -** ^The sqlite3_result_error() and sqlite3_result_error16() functions -** cause the implemented SQL function to throw an exception. -** ^SQLite uses the string pointed to by the -** 2nd parameter of sqlite3_result_error() or sqlite3_result_error16() -** as the text of an error message. ^SQLite interprets the error -** message string from sqlite3_result_error() as UTF-8. ^SQLite -** interprets the string from sqlite3_result_error16() as UTF-16 in native -** byte order. ^If the third parameter to sqlite3_result_error() -** or sqlite3_result_error16() is negative then SQLite takes as the error -** message all text up through the first zero character. -** ^If the third parameter to sqlite3_result_error() or -** sqlite3_result_error16() is non-negative then SQLite takes that many -** bytes (not characters) from the 2nd parameter as the error message. -** ^The sqlite3_result_error() and sqlite3_result_error16() -** routines make a private copy of the error message text before -** they return. Hence, the calling function can deallocate or -** modify the text after they return without harm. -** ^The sqlite3_result_error_code() function changes the error code -** returned by SQLite as a result of an error in a function. ^By default, -** the error code is SQLITE_ERROR. ^A subsequent call to sqlite3_result_error() -** or sqlite3_result_error16() resets the error code to SQLITE_ERROR. -** -** ^The sqlite3_result_error_toobig() interface causes SQLite to throw an -** error indicating that a string or BLOB is too long to represent. -** -** ^The sqlite3_result_error_nomem() interface causes SQLite to throw an -** error indicating that a memory allocation failed. -** -** ^The sqlite3_result_int() interface sets the return value -** of the application-defined function to be the 32-bit signed integer -** value given in the 2nd argument. -** ^The sqlite3_result_int64() interface sets the return value -** of the application-defined function to be the 64-bit signed integer -** value given in the 2nd argument. -** -** ^The sqlite3_result_null() interface sets the return value -** of the application-defined function to be NULL. -** -** ^The sqlite3_result_text(), sqlite3_result_text16(), -** sqlite3_result_text16le(), and sqlite3_result_text16be() interfaces -** set the return value of the application-defined function to be -** a text string which is represented as UTF-8, UTF-16 native byte order, -** UTF-16 little endian, or UTF-16 big endian, respectively. -** ^The sqlite3_result_text64() interface sets the return value of an -** application-defined function to be a text string in an encoding -** specified by the fifth (and last) parameter, which must be one -** of [SQLITE_UTF8], [SQLITE_UTF16], [SQLITE_UTF16BE], or [SQLITE_UTF16LE]. -** ^SQLite takes the text result from the application from -** the 2nd parameter of the sqlite3_result_text* interfaces. -** ^If the 3rd parameter to the sqlite3_result_text* interfaces -** is negative, then SQLite takes result text from the 2nd parameter -** through the first zero character. -** ^If the 3rd parameter to the sqlite3_result_text* interfaces -** is non-negative, then as many bytes (not characters) of the text -** pointed to by the 2nd parameter are taken as the application-defined -** function result. If the 3rd parameter is non-negative, then it -** must be the byte offset into the string where the NUL terminator would -** appear if the string where NUL terminated. If any NUL characters occur -** in the string at a byte offset that is less than the value of the 3rd -** parameter, then the resulting string will contain embedded NULs and the -** result of expressions operating on strings with embedded NULs is undefined. -** ^If the 4th parameter to the sqlite3_result_text* interfaces -** or sqlite3_result_blob is a non-NULL pointer, then SQLite calls that -** function as the destructor on the text or BLOB result when it has -** finished using that result. -** ^If the 4th parameter to the sqlite3_result_text* interfaces or to -** sqlite3_result_blob is the special constant SQLITE_STATIC, then SQLite -** assumes that the text or BLOB result is in constant space and does not -** copy the content of the parameter nor call a destructor on the content -** when it has finished using that result. -** ^If the 4th parameter to the sqlite3_result_text* interfaces -** or sqlite3_result_blob is the special constant SQLITE_TRANSIENT -** then SQLite makes a copy of the result into space obtained from -** from [sqlite3_malloc()] before it returns. -** -** ^The sqlite3_result_value() interface sets the result of -** the application-defined function to be a copy of the -** [unprotected sqlite3_value] object specified by the 2nd parameter. ^The -** sqlite3_result_value() interface makes a copy of the [sqlite3_value] -** so that the [sqlite3_value] specified in the parameter may change or -** be deallocated after sqlite3_result_value() returns without harm. -** ^A [protected sqlite3_value] object may always be used where an -** [unprotected sqlite3_value] object is required, so either -** kind of [sqlite3_value] object can be used with this interface. -** -** If these routines are called from within the different thread -** than the one containing the application-defined function that received -** the [sqlite3_context] pointer, the results are undefined. -*/ -SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*)); -SQLITE_API void sqlite3_result_blob64(sqlite3_context*,const void*, - sqlite3_uint64,void(*)(void*)); -SQLITE_API void sqlite3_result_double(sqlite3_context*, double); -SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int); -SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int); -SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*); -SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*); -SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int); -SQLITE_API void sqlite3_result_int(sqlite3_context*, int); -SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64); -SQLITE_API void sqlite3_result_null(sqlite3_context*); -SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*)); -SQLITE_API void sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64, - void(*)(void*), unsigned char encoding); -SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); -SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); -SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); -SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*); -SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n); -SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n); - - -/* -** CAPI3REF: Setting The Subtype Of An SQL Function -** METHOD: sqlite3_context -** -** The sqlite3_result_subtype(C,T) function causes the subtype of -** the result from the [application-defined SQL function] with -** [sqlite3_context] C to be the value T. Only the lower 8 bits -** of the subtype T are preserved in current versions of SQLite; -** higher order bits are discarded. -** The number of subtype bytes preserved by SQLite might increase -** in future releases of SQLite. -*/ -SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int); - -/* -** CAPI3REF: Define New Collating Sequences -** METHOD: sqlite3 -** -** ^These functions add, remove, or modify a [collation] associated -** with the [database connection] specified as the first argument. -** -** ^The name of the collation is a UTF-8 string -** for sqlite3_create_collation() and sqlite3_create_collation_v2() -** and a UTF-16 string in native byte order for sqlite3_create_collation16(). -** ^Collation names that compare equal according to [sqlite3_strnicmp()] are -** considered to be the same name. -** -** ^(The third argument (eTextRep) must be one of the constants: -** <ul> -** <li> [SQLITE_UTF8], -** <li> [SQLITE_UTF16LE], -** <li> [SQLITE_UTF16BE], -** <li> [SQLITE_UTF16], or -** <li> [SQLITE_UTF16_ALIGNED]. -** </ul>)^ -** ^The eTextRep argument determines the encoding of strings passed -** to the collating function callback, xCallback. -** ^The [SQLITE_UTF16] and [SQLITE_UTF16_ALIGNED] values for eTextRep -** force strings to be UTF16 with native byte order. -** ^The [SQLITE_UTF16_ALIGNED] value for eTextRep forces strings to begin -** on an even byte address. -** -** ^The fourth argument, pArg, is an application data pointer that is passed -** through as the first argument to the collating function callback. -** -** ^The fifth argument, xCallback, is a pointer to the collating function. -** ^Multiple collating functions can be registered using the same name but -** with different eTextRep parameters and SQLite will use whichever -** function requires the least amount of data transformation. -** ^If the xCallback argument is NULL then the collating function is -** deleted. ^When all collating functions having the same name are deleted, -** that collation is no longer usable. -** -** ^The collating function callback is invoked with a copy of the pArg -** application data pointer and with two strings in the encoding specified -** by the eTextRep argument. The collating function must return an -** integer that is negative, zero, or positive -** if the first string is less than, equal to, or greater than the second, -** respectively. A collating function must always return the same answer -** given the same inputs. If two or more collating functions are registered -** to the same collation name (using different eTextRep values) then all -** must give an equivalent answer when invoked with equivalent strings. -** The collating function must obey the following properties for all -** strings A, B, and C: -** -** <ol> -** <li> If A==B then B==A. -** <li> If A==B and B==C then A==C. -** <li> If A<B THEN B>A. -** <li> If A<B and B<C then A<C. -** </ol> -** -** If a collating function fails any of the above constraints and that -** collating function is registered and used, then the behavior of SQLite -** is undefined. -** -** ^The sqlite3_create_collation_v2() works like sqlite3_create_collation() -** with the addition that the xDestroy callback is invoked on pArg when -** the collating function is deleted. -** ^Collating functions are deleted when they are overridden by later -** calls to the collation creation functions or when the -** [database connection] is closed using [sqlite3_close()]. -** -** ^The xDestroy callback is <u>not</u> called if the -** sqlite3_create_collation_v2() function fails. Applications that invoke -** sqlite3_create_collation_v2() with a non-NULL xDestroy argument should -** check the return code and dispose of the application data pointer -** themselves rather than expecting SQLite to deal with it for them. -** This is different from every other SQLite interface. The inconsistency -** is unfortunate but cannot be changed without breaking backwards -** compatibility. -** -** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. -*/ -SQLITE_API int sqlite3_create_collation( - sqlite3*, - const char *zName, - int eTextRep, - void *pArg, - int(*xCompare)(void*,int,const void*,int,const void*) -); -SQLITE_API int sqlite3_create_collation_v2( - sqlite3*, - const char *zName, - int eTextRep, - void *pArg, - int(*xCompare)(void*,int,const void*,int,const void*), - void(*xDestroy)(void*) -); -SQLITE_API int sqlite3_create_collation16( - sqlite3*, - const void *zName, - int eTextRep, - void *pArg, - int(*xCompare)(void*,int,const void*,int,const void*) -); - -/* -** CAPI3REF: Collation Needed Callbacks -** METHOD: sqlite3 -** -** ^To avoid having to register all collation sequences before a database -** can be used, a single callback function may be registered with the -** [database connection] to be invoked whenever an undefined collation -** sequence is required. -** -** ^If the function is registered using the sqlite3_collation_needed() API, -** then it is passed the names of undefined collation sequences as strings -** encoded in UTF-8. ^If sqlite3_collation_needed16() is used, -** the names are passed as UTF-16 in machine native byte order. -** ^A call to either function replaces the existing collation-needed callback. -** -** ^(When the callback is invoked, the first argument passed is a copy -** of the second argument to sqlite3_collation_needed() or -** sqlite3_collation_needed16(). The second argument is the database -** connection. The third argument is one of [SQLITE_UTF8], [SQLITE_UTF16BE], -** or [SQLITE_UTF16LE], indicating the most desirable form of the collation -** sequence function required. The fourth parameter is the name of the -** required collation sequence.)^ -** -** The callback function should register the desired collation using -** [sqlite3_create_collation()], [sqlite3_create_collation16()], or -** [sqlite3_create_collation_v2()]. -*/ -SQLITE_API int sqlite3_collation_needed( - sqlite3*, - void*, - void(*)(void*,sqlite3*,int eTextRep,const char*) -); -SQLITE_API int sqlite3_collation_needed16( - sqlite3*, - void*, - void(*)(void*,sqlite3*,int eTextRep,const void*) -); - -#ifdef SQLITE_HAS_CODEC -/* -** Specify the key for an encrypted database. This routine should be -** called right after sqlite3_open(). -** -** The code to implement this API is not available in the public release -** of SQLite. -*/ -SQLITE_API int sqlite3_key( - sqlite3 *db, /* Database to be rekeyed */ - const void *pKey, int nKey /* The key */ -); -SQLITE_API int sqlite3_key_v2( - sqlite3 *db, /* Database to be rekeyed */ - const char *zDbName, /* Name of the database */ - const void *pKey, int nKey /* The key */ -); - -/* -** Change the key on an open database. If the current database is not -** encrypted, this routine will encrypt it. If pNew==0 or nNew==0, the -** database is decrypted. -** -** The code to implement this API is not available in the public release -** of SQLite. -*/ -SQLITE_API int sqlite3_rekey( - sqlite3 *db, /* Database to be rekeyed */ - const void *pKey, int nKey /* The new key */ -); -SQLITE_API int sqlite3_rekey_v2( - sqlite3 *db, /* Database to be rekeyed */ - const char *zDbName, /* Name of the database */ - const void *pKey, int nKey /* The new key */ -); - -/* -** Specify the activation key for a SEE database. Unless -** activated, none of the SEE routines will work. -*/ -SQLITE_API void sqlite3_activate_see( - const char *zPassPhrase /* Activation phrase */ -); -#endif - -#ifdef SQLITE_ENABLE_CEROD -/* -** Specify the activation key for a CEROD database. Unless -** activated, none of the CEROD routines will work. -*/ -SQLITE_API void sqlite3_activate_cerod( - const char *zPassPhrase /* Activation phrase */ -); -#endif - -/* -** CAPI3REF: Suspend Execution For A Short Time -** -** The sqlite3_sleep() function causes the current thread to suspend execution -** for at least a number of milliseconds specified in its parameter. -** -** If the operating system does not support sleep requests with -** millisecond time resolution, then the time will be rounded up to -** the nearest second. The number of milliseconds of sleep actually -** requested from the operating system is returned. -** -** ^SQLite implements this interface by calling the xSleep() -** method of the default [sqlite3_vfs] object. If the xSleep() method -** of the default VFS is not implemented correctly, or not implemented at -** all, then the behavior of sqlite3_sleep() may deviate from the description -** in the previous paragraphs. -*/ -SQLITE_API int sqlite3_sleep(int); - -/* -** CAPI3REF: Name Of The Folder Holding Temporary Files -** -** ^(If this global variable is made to point to a string which is -** the name of a folder (a.k.a. directory), then all temporary files -** created by SQLite when using a built-in [sqlite3_vfs | VFS] -** will be placed in that directory.)^ ^If this variable -** is a NULL pointer, then SQLite performs a search for an appropriate -** temporary file directory. -** -** Applications are strongly discouraged from using this global variable. -** It is required to set a temporary folder on Windows Runtime (WinRT). -** But for all other platforms, it is highly recommended that applications -** neither read nor write this variable. This global variable is a relic -** that exists for backwards compatibility of legacy applications and should -** be avoided in new projects. -** -** It is not safe to read or modify this variable in more than one -** thread at a time. It is not safe to read or modify this variable -** if a [database connection] is being used at the same time in a separate -** thread. -** It is intended that this variable be set once -** as part of process initialization and before any SQLite interface -** routines have been called and that this variable remain unchanged -** thereafter. -** -** ^The [temp_store_directory pragma] may modify this variable and cause -** it to point to memory obtained from [sqlite3_malloc]. ^Furthermore, -** the [temp_store_directory pragma] always assumes that any string -** that this variable points to is held in memory obtained from -** [sqlite3_malloc] and the pragma may attempt to free that memory -** using [sqlite3_free]. -** Hence, if this variable is modified directly, either it should be -** made NULL or made to point to memory obtained from [sqlite3_malloc] -** or else the use of the [temp_store_directory pragma] should be avoided. -** Except when requested by the [temp_store_directory pragma], SQLite -** does not free the memory that sqlite3_temp_directory points to. If -** the application wants that memory to be freed, it must do -** so itself, taking care to only do so after all [database connection] -** objects have been destroyed. -** -** <b>Note to Windows Runtime users:</b> The temporary directory must be set -** prior to calling [sqlite3_open] or [sqlite3_open_v2]. Otherwise, various -** features that require the use of temporary files may fail. Here is an -** example of how to do this using C++ with the Windows Runtime: -** -** <blockquote><pre> -** LPCWSTR zPath = Windows::Storage::ApplicationData::Current-> -**   TemporaryFolder->Path->Data(); -** char zPathBuf[MAX_PATH + 1]; -** memset(zPathBuf, 0, sizeof(zPathBuf)); -** WideCharToMultiByte(CP_UTF8, 0, zPath, -1, zPathBuf, sizeof(zPathBuf), -**   NULL, NULL); -** sqlite3_temp_directory = sqlite3_mprintf("%s", zPathBuf); -** </pre></blockquote> -*/ -SQLITE_API SQLITE_EXTERN char *sqlite3_temp_directory; - -/* -** CAPI3REF: Name Of The Folder Holding Database Files -** -** ^(If this global variable is made to point to a string which is -** the name of a folder (a.k.a. directory), then all database files -** specified with a relative pathname and created or accessed by -** SQLite when using a built-in windows [sqlite3_vfs | VFS] will be assumed -** to be relative to that directory.)^ ^If this variable is a NULL -** pointer, then SQLite assumes that all database files specified -** with a relative pathname are relative to the current directory -** for the process. Only the windows VFS makes use of this global -** variable; it is ignored by the unix VFS. -** -** Changing the value of this variable while a database connection is -** open can result in a corrupt database. -** -** It is not safe to read or modify this variable in more than one -** thread at a time. It is not safe to read or modify this variable -** if a [database connection] is being used at the same time in a separate -** thread. -** It is intended that this variable be set once -** as part of process initialization and before any SQLite interface -** routines have been called and that this variable remain unchanged -** thereafter. -** -** ^The [data_store_directory pragma] may modify this variable and cause -** it to point to memory obtained from [sqlite3_malloc]. ^Furthermore, -** the [data_store_directory pragma] always assumes that any string -** that this variable points to is held in memory obtained from -** [sqlite3_malloc] and the pragma may attempt to free that memory -** using [sqlite3_free]. -** Hence, if this variable is modified directly, either it should be -** made NULL or made to point to memory obtained from [sqlite3_malloc] -** or else the use of the [data_store_directory pragma] should be avoided. -*/ -SQLITE_API SQLITE_EXTERN char *sqlite3_data_directory; - -/* -** CAPI3REF: Test For Auto-Commit Mode -** KEYWORDS: {autocommit mode} -** METHOD: sqlite3 -** -** ^The sqlite3_get_autocommit() interface returns non-zero or -** zero if the given database connection is or is not in autocommit mode, -** respectively. ^Autocommit mode is on by default. -** ^Autocommit mode is disabled by a [BEGIN] statement. -** ^Autocommit mode is re-enabled by a [COMMIT] or [ROLLBACK]. -** -** If certain kinds of errors occur on a statement within a multi-statement -** transaction (errors including [SQLITE_FULL], [SQLITE_IOERR], -** [SQLITE_NOMEM], [SQLITE_BUSY], and [SQLITE_INTERRUPT]) then the -** transaction might be rolled back automatically. The only way to -** find out whether SQLite automatically rolled back the transaction after -** an error is to use this function. -** -** If another thread changes the autocommit status of the database -** connection while this routine is running, then the return value -** is undefined. -*/ -SQLITE_API int sqlite3_get_autocommit(sqlite3*); - -/* -** CAPI3REF: Find The Database Handle Of A Prepared Statement -** METHOD: sqlite3_stmt -** -** ^The sqlite3_db_handle interface returns the [database connection] handle -** to which a [prepared statement] belongs. ^The [database connection] -** returned by sqlite3_db_handle is the same [database connection] -** that was the first argument -** to the [sqlite3_prepare_v2()] call (or its variants) that was used to -** create the statement in the first place. -*/ -SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*); - -/* -** CAPI3REF: Return The Filename For A Database Connection -** METHOD: sqlite3 -** -** ^The sqlite3_db_filename(D,N) interface returns a pointer to a filename -** associated with database N of connection D. ^The main database file -** has the name "main". If there is no attached database N on the database -** connection D, or if database N is a temporary or in-memory database, then -** a NULL pointer is returned. -** -** ^The filename returned by this function is the output of the -** xFullPathname method of the [VFS]. ^In other words, the filename -** will be an absolute pathname, even if the filename used -** to open the database originally was a URI or relative pathname. -*/ -SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName); - -/* -** CAPI3REF: Determine if a database is read-only -** METHOD: sqlite3 -** -** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N -** of connection D is read-only, 0 if it is read/write, or -1 if N is not -** the name of a database on connection D. -*/ -SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName); - -/* -** CAPI3REF: Find the next prepared statement -** METHOD: sqlite3 -** -** ^This interface returns a pointer to the next [prepared statement] after -** pStmt associated with the [database connection] pDb. ^If pStmt is NULL -** then this interface returns a pointer to the first prepared statement -** associated with the database connection pDb. ^If no prepared statement -** satisfies the conditions of this routine, it returns NULL. -** -** The [database connection] pointer D in a call to -** [sqlite3_next_stmt(D,S)] must refer to an open database -** connection and in particular must not be a NULL pointer. -*/ -SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Commit And Rollback Notification Callbacks -** METHOD: sqlite3 -** -** ^The sqlite3_commit_hook() interface registers a callback -** function to be invoked whenever a transaction is [COMMIT | committed]. -** ^Any callback set by a previous call to sqlite3_commit_hook() -** for the same database connection is overridden. -** ^The sqlite3_rollback_hook() interface registers a callback -** function to be invoked whenever a transaction is [ROLLBACK | rolled back]. -** ^Any callback set by a previous call to sqlite3_rollback_hook() -** for the same database connection is overridden. -** ^The pArg argument is passed through to the callback. -** ^If the callback on a commit hook function returns non-zero, -** then the commit is converted into a rollback. -** -** ^The sqlite3_commit_hook(D,C,P) and sqlite3_rollback_hook(D,C,P) functions -** return the P argument from the previous call of the same function -** on the same [database connection] D, or NULL for -** the first call for each function on D. -** -** The commit and rollback hook callbacks are not reentrant. -** The callback implementation must not do anything that will modify -** the database connection that invoked the callback. Any actions -** to modify the database connection must be deferred until after the -** completion of the [sqlite3_step()] call that triggered the commit -** or rollback hook in the first place. -** Note that running any other SQL statements, including SELECT statements, -** or merely calling [sqlite3_prepare_v2()] and [sqlite3_step()] will modify -** the database connections for the meaning of "modify" in this paragraph. -** -** ^Registering a NULL function disables the callback. -** -** ^When the commit hook callback routine returns zero, the [COMMIT] -** operation is allowed to continue normally. ^If the commit hook -** returns non-zero, then the [COMMIT] is converted into a [ROLLBACK]. -** ^The rollback hook is invoked on a rollback that results from a commit -** hook returning non-zero, just as it would be with any other rollback. -** -** ^For the purposes of this API, a transaction is said to have been -** rolled back if an explicit "ROLLBACK" statement is executed, or -** an error or constraint causes an implicit rollback to occur. -** ^The rollback callback is not invoked if a transaction is -** automatically rolled back because the database connection is closed. -** -** See also the [sqlite3_update_hook()] interface. -*/ -SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); -SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); - -/* -** CAPI3REF: Data Change Notification Callbacks -** METHOD: sqlite3 -** -** ^The sqlite3_update_hook() interface registers a callback function -** with the [database connection] identified by the first argument -** to be invoked whenever a row is updated, inserted or deleted in -** a [rowid table]. -** ^Any callback set by a previous call to this function -** for the same database connection is overridden. -** -** ^The second argument is a pointer to the function to invoke when a -** row is updated, inserted or deleted in a rowid table. -** ^The first argument to the callback is a copy of the third argument -** to sqlite3_update_hook(). -** ^The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE], -** or [SQLITE_UPDATE], depending on the operation that caused the callback -** to be invoked. -** ^The third and fourth arguments to the callback contain pointers to the -** database and table name containing the affected row. -** ^The final callback parameter is the [rowid] of the row. -** ^In the case of an update, this is the [rowid] after the update takes place. -** -** ^(The update hook is not invoked when internal system tables are -** modified (i.e. sqlite_master and sqlite_sequence).)^ -** ^The update hook is not invoked when [WITHOUT ROWID] tables are modified. -** -** ^In the current implementation, the update hook -** is not invoked when duplication rows are deleted because of an -** [ON CONFLICT | ON CONFLICT REPLACE] clause. ^Nor is the update hook -** invoked when rows are deleted using the [truncate optimization]. -** The exceptions defined in this paragraph might change in a future -** release of SQLite. -** -** The update hook implementation must not do anything that will modify -** the database connection that invoked the update hook. Any actions -** to modify the database connection must be deferred until after the -** completion of the [sqlite3_step()] call that triggered the update hook. -** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their -** database connections for the meaning of "modify" in this paragraph. -** -** ^The sqlite3_update_hook(D,C,P) function -** returns the P argument from the previous call -** on the same [database connection] D, or NULL for -** the first call on D. -** -** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()], -** and [sqlite3_preupdate_hook()] interfaces. -*/ -SQLITE_API void *sqlite3_update_hook( - sqlite3*, - void(*)(void *,int ,char const *,char const *,sqlite3_int64), - void* -); - -/* -** CAPI3REF: Enable Or Disable Shared Pager Cache -** -** ^(This routine enables or disables the sharing of the database cache -** and schema data structures between [database connection | connections] -** to the same database. Sharing is enabled if the argument is true -** and disabled if the argument is false.)^ -** -** ^Cache sharing is enabled and disabled for an entire process. -** This is a change as of SQLite [version 3.5.0] ([dateof:3.5.0]). -** In prior versions of SQLite, -** sharing was enabled or disabled for each thread separately. -** -** ^(The cache sharing mode set by this interface effects all subsequent -** calls to [sqlite3_open()], [sqlite3_open_v2()], and [sqlite3_open16()]. -** Existing database connections continue use the sharing mode -** that was in effect at the time they were opened.)^ -** -** ^(This routine returns [SQLITE_OK] if shared cache was enabled or disabled -** successfully. An [error code] is returned otherwise.)^ -** -** ^Shared cache is disabled by default. But this might change in -** future releases of SQLite. Applications that care about shared -** cache setting should set it explicitly. -** -** Note: This method is disabled on MacOS X 10.7 and iOS version 5.0 -** and will always return SQLITE_MISUSE. On those systems, -** shared cache mode should be enabled per-database connection via -** [sqlite3_open_v2()] with [SQLITE_OPEN_SHAREDCACHE]. -** -** This interface is threadsafe on processors where writing a -** 32-bit integer is atomic. -** -** See Also: [SQLite Shared-Cache Mode] -*/ -SQLITE_API int sqlite3_enable_shared_cache(int); - -/* -** CAPI3REF: Attempt To Free Heap Memory -** -** ^The sqlite3_release_memory() interface attempts to free N bytes -** of heap memory by deallocating non-essential memory allocations -** held by the database library. Memory used to cache database -** pages to improve performance is an example of non-essential memory. -** ^sqlite3_release_memory() returns the number of bytes actually freed, -** which might be more or less than the amount requested. -** ^The sqlite3_release_memory() routine is a no-op returning zero -** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT]. -** -** See also: [sqlite3_db_release_memory()] -*/ -SQLITE_API int sqlite3_release_memory(int); - -/* -** CAPI3REF: Free Memory Used By A Database Connection -** METHOD: sqlite3 -** -** ^The sqlite3_db_release_memory(D) interface attempts to free as much heap -** memory as possible from database connection D. Unlike the -** [sqlite3_release_memory()] interface, this interface is in effect even -** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is -** omitted. -** -** See also: [sqlite3_release_memory()] -*/ -SQLITE_API int sqlite3_db_release_memory(sqlite3*); - -/* -** CAPI3REF: Impose A Limit On Heap Size -** -** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the -** soft limit on the amount of heap memory that may be allocated by SQLite. -** ^SQLite strives to keep heap memory utilization below the soft heap -** limit by reducing the number of pages held in the page cache -** as heap memory usages approaches the limit. -** ^The soft heap limit is "soft" because even though SQLite strives to stay -** below the limit, it will exceed the limit rather than generate -** an [SQLITE_NOMEM] error. In other words, the soft heap limit -** is advisory only. -** -** ^The return value from sqlite3_soft_heap_limit64() is the size of -** the soft heap limit prior to the call, or negative in the case of an -** error. ^If the argument N is negative -** then no change is made to the soft heap limit. Hence, the current -** size of the soft heap limit can be determined by invoking -** sqlite3_soft_heap_limit64() with a negative argument. -** -** ^If the argument N is zero then the soft heap limit is disabled. -** -** ^(The soft heap limit is not enforced in the current implementation -** if one or more of following conditions are true: -** -** <ul> -** <li> The soft heap limit is set to zero. -** <li> Memory accounting is disabled using a combination of the -** [sqlite3_config]([SQLITE_CONFIG_MEMSTATUS],...) start-time option and -** the [SQLITE_DEFAULT_MEMSTATUS] compile-time option. -** <li> An alternative page cache implementation is specified using -** [sqlite3_config]([SQLITE_CONFIG_PCACHE2],...). -** <li> The page cache allocates from its own memory pool supplied -** by [sqlite3_config]([SQLITE_CONFIG_PAGECACHE],...) rather than -** from the heap. -** </ul>)^ -** -** Beginning with SQLite [version 3.7.3] ([dateof:3.7.3]), -** the soft heap limit is enforced -** regardless of whether or not the [SQLITE_ENABLE_MEMORY_MANAGEMENT] -** compile-time option is invoked. With [SQLITE_ENABLE_MEMORY_MANAGEMENT], -** the soft heap limit is enforced on every memory allocation. Without -** [SQLITE_ENABLE_MEMORY_MANAGEMENT], the soft heap limit is only enforced -** when memory is allocated by the page cache. Testing suggests that because -** the page cache is the predominate memory user in SQLite, most -** applications will achieve adequate soft heap limit enforcement without -** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT]. -** -** The circumstances under which SQLite will enforce the soft heap limit may -** changes in future releases of SQLite. -*/ -SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N); - -/* -** CAPI3REF: Deprecated Soft Heap Limit Interface -** DEPRECATED -** -** This is a deprecated version of the [sqlite3_soft_heap_limit64()] -** interface. This routine is provided for historical compatibility -** only. All new applications should use the -** [sqlite3_soft_heap_limit64()] interface rather than this one. -*/ -SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N); - - -/* -** CAPI3REF: Extract Metadata About A Column Of A Table -** METHOD: sqlite3 -** -** ^(The sqlite3_table_column_metadata(X,D,T,C,....) routine returns -** information about column C of table T in database D -** on [database connection] X.)^ ^The sqlite3_table_column_metadata() -** interface returns SQLITE_OK and fills in the non-NULL pointers in -** the final five arguments with appropriate values if the specified -** column exists. ^The sqlite3_table_column_metadata() interface returns -** SQLITE_ERROR and if the specified column does not exist. -** ^If the column-name parameter to sqlite3_table_column_metadata() is a -** NULL pointer, then this routine simply checks for the existence of the -** table and returns SQLITE_OK if the table exists and SQLITE_ERROR if it -** does not. -** -** ^The column is identified by the second, third and fourth parameters to -** this function. ^(The second parameter is either the name of the database -** (i.e. "main", "temp", or an attached database) containing the specified -** table or NULL.)^ ^If it is NULL, then all attached databases are searched -** for the table using the same algorithm used by the database engine to -** resolve unqualified table references. -** -** ^The third and fourth parameters to this function are the table and column -** name of the desired column, respectively. -** -** ^Metadata is returned by writing to the memory locations passed as the 5th -** and subsequent parameters to this function. ^Any of these arguments may be -** NULL, in which case the corresponding element of metadata is omitted. -** -** ^(<blockquote> -** <table border="1"> -** <tr><th> Parameter <th> Output<br>Type <th> Description -** -** <tr><td> 5th <td> const char* <td> Data type -** <tr><td> 6th <td> const char* <td> Name of default collation sequence -** <tr><td> 7th <td> int <td> True if column has a NOT NULL constraint -** <tr><td> 8th <td> int <td> True if column is part of the PRIMARY KEY -** <tr><td> 9th <td> int <td> True if column is [AUTOINCREMENT] -** </table> -** </blockquote>)^ -** -** ^The memory pointed to by the character pointers returned for the -** declaration type and collation sequence is valid until the next -** call to any SQLite API function. -** -** ^If the specified table is actually a view, an [error code] is returned. -** -** ^If the specified column is "rowid", "oid" or "_rowid_" and the table -** is not a [WITHOUT ROWID] table and an -** [INTEGER PRIMARY KEY] column has been explicitly declared, then the output -** parameters are set for the explicitly declared column. ^(If there is no -** [INTEGER PRIMARY KEY] column, then the outputs -** for the [rowid] are set as follows: -** -** <pre> -** data type: "INTEGER" -** collation sequence: "BINARY" -** not null: 0 -** primary key: 1 -** auto increment: 0 -** </pre>)^ -** -** ^This function causes all database schemas to be read from disk and -** parsed, if that has not already been done, and returns an error if -** any errors are encountered while loading the schema. -*/ -SQLITE_API int sqlite3_table_column_metadata( - sqlite3 *db, /* Connection handle */ - const char *zDbName, /* Database name or NULL */ - const char *zTableName, /* Table name */ - const char *zColumnName, /* Column name */ - char const **pzDataType, /* OUTPUT: Declared data type */ - char const **pzCollSeq, /* OUTPUT: Collation sequence name */ - int *pNotNull, /* OUTPUT: True if NOT NULL constraint exists */ - int *pPrimaryKey, /* OUTPUT: True if column part of PK */ - int *pAutoinc /* OUTPUT: True if column is auto-increment */ -); - -/* -** CAPI3REF: Load An Extension -** METHOD: sqlite3 -** -** ^This interface loads an SQLite extension library from the named file. -** -** ^The sqlite3_load_extension() interface attempts to load an -** [SQLite extension] library contained in the file zFile. If -** the file cannot be loaded directly, attempts are made to load -** with various operating-system specific extensions added. -** So for example, if "samplelib" cannot be loaded, then names like -** "samplelib.so" or "samplelib.dylib" or "samplelib.dll" might -** be tried also. -** -** ^The entry point is zProc. -** ^(zProc may be 0, in which case SQLite will try to come up with an -** entry point name on its own. It first tries "sqlite3_extension_init". -** If that does not work, it constructs a name "sqlite3_X_init" where the -** X is consists of the lower-case equivalent of all ASCII alphabetic -** characters in the filename from the last "/" to the first following -** "." and omitting any initial "lib".)^ -** ^The sqlite3_load_extension() interface returns -** [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong. -** ^If an error occurs and pzErrMsg is not 0, then the -** [sqlite3_load_extension()] interface shall attempt to -** fill *pzErrMsg with error message text stored in memory -** obtained from [sqlite3_malloc()]. The calling function -** should free this memory by calling [sqlite3_free()]. -** -** ^Extension loading must be enabled using -** [sqlite3_enable_load_extension()] or -** [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],1,NULL) -** prior to calling this API, -** otherwise an error will be returned. -** -** <b>Security warning:</b> It is recommended that the -** [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method be used to enable only this -** interface. The use of the [sqlite3_enable_load_extension()] interface -** should be avoided. This will keep the SQL function [load_extension()] -** disabled and prevent SQL injections from giving attackers -** access to extension loading capabilities. -** -** See also the [load_extension() SQL function]. -*/ -SQLITE_API int sqlite3_load_extension( - sqlite3 *db, /* Load the extension into this database connection */ - const char *zFile, /* Name of the shared library containing extension */ - const char *zProc, /* Entry point. Derived from zFile if 0 */ - char **pzErrMsg /* Put error message here if not 0 */ -); - -/* -** CAPI3REF: Enable Or Disable Extension Loading -** METHOD: sqlite3 -** -** ^So as not to open security holes in older applications that are -** unprepared to deal with [extension loading], and as a means of disabling -** [extension loading] while evaluating user-entered SQL, the following API -** is provided to turn the [sqlite3_load_extension()] mechanism on and off. -** -** ^Extension loading is off by default. -** ^Call the sqlite3_enable_load_extension() routine with onoff==1 -** to turn extension loading on and call it with onoff==0 to turn -** it back off again. -** -** ^This interface enables or disables both the C-API -** [sqlite3_load_extension()] and the SQL function [load_extension()]. -** ^(Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..) -** to enable or disable only the C-API.)^ -** -** <b>Security warning:</b> It is recommended that extension loading -** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method -** rather than this interface, so the [load_extension()] SQL function -** remains disabled. This will prevent SQL injections from giving attackers -** access to extension loading capabilities. -*/ -SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff); - -/* -** CAPI3REF: Automatically Load Statically Linked Extensions -** -** ^This interface causes the xEntryPoint() function to be invoked for -** each new [database connection] that is created. The idea here is that -** xEntryPoint() is the entry point for a statically linked [SQLite extension] -** that is to be automatically loaded into all new database connections. -** -** ^(Even though the function prototype shows that xEntryPoint() takes -** no arguments and returns void, SQLite invokes xEntryPoint() with three -** arguments and expects an integer result as if the signature of the -** entry point where as follows: -** -** <blockquote><pre> -**   int xEntryPoint( -**   sqlite3 *db, -**   const char **pzErrMsg, -**   const struct sqlite3_api_routines *pThunk -**   ); -** </pre></blockquote>)^ -** -** If the xEntryPoint routine encounters an error, it should make *pzErrMsg -** point to an appropriate error message (obtained from [sqlite3_mprintf()]) -** and return an appropriate [error code]. ^SQLite ensures that *pzErrMsg -** is NULL before calling the xEntryPoint(). ^SQLite will invoke -** [sqlite3_free()] on *pzErrMsg after xEntryPoint() returns. ^If any -** xEntryPoint() returns an error, the [sqlite3_open()], [sqlite3_open16()], -** or [sqlite3_open_v2()] call that provoked the xEntryPoint() will fail. -** -** ^Calling sqlite3_auto_extension(X) with an entry point X that is already -** on the list of automatic extensions is a harmless no-op. ^No entry point -** will be called more than once for each database connection that is opened. -** -** See also: [sqlite3_reset_auto_extension()] -** and [sqlite3_cancel_auto_extension()] -*/ -SQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void)); - -/* -** CAPI3REF: Cancel Automatic Extension Loading -** -** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the -** initialization routine X that was registered using a prior call to -** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)] -** routine returns 1 if initialization routine X was successfully -** unregistered and it returns 0 if X was not on the list of initialization -** routines. -*/ -SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void)); - -/* -** CAPI3REF: Reset Automatic Extension Loading -** -** ^This interface disables all automatic extensions previously -** registered using [sqlite3_auto_extension()]. -*/ -SQLITE_API void sqlite3_reset_auto_extension(void); - -/* -** The interface to the virtual-table mechanism is currently considered -** to be experimental. The interface might change in incompatible ways. -** If this is a problem for you, do not use the interface at this time. -** -** When the virtual-table mechanism stabilizes, we will declare the -** interface fixed, support it indefinitely, and remove this comment. -*/ - -/* -** Structures used by the virtual table interface -*/ -typedef struct sqlite3_vtab sqlite3_vtab; -typedef struct sqlite3_index_info sqlite3_index_info; -typedef struct sqlite3_vtab_cursor sqlite3_vtab_cursor; -typedef struct sqlite3_module sqlite3_module; - -/* -** CAPI3REF: Virtual Table Object -** KEYWORDS: sqlite3_module {virtual table module} -** -** This structure, sometimes called a "virtual table module", -** defines the implementation of a [virtual tables]. -** This structure consists mostly of methods for the module. -** -** ^A virtual table module is created by filling in a persistent -** instance of this structure and passing a pointer to that instance -** to [sqlite3_create_module()] or [sqlite3_create_module_v2()]. -** ^The registration remains valid until it is replaced by a different -** module or until the [database connection] closes. The content -** of this structure must not change while it is registered with -** any database connection. -*/ -struct sqlite3_module { - int iVersion; - int (*xCreate)(sqlite3*, void *pAux, - int argc, const char *const*argv, - sqlite3_vtab **ppVTab, char**); - int (*xConnect)(sqlite3*, void *pAux, - int argc, const char *const*argv, - sqlite3_vtab **ppVTab, char**); - int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*); - int (*xDisconnect)(sqlite3_vtab *pVTab); - int (*xDestroy)(sqlite3_vtab *pVTab); - int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor); - int (*xClose)(sqlite3_vtab_cursor*); - int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr, - int argc, sqlite3_value **argv); - int (*xNext)(sqlite3_vtab_cursor*); - int (*xEof)(sqlite3_vtab_cursor*); - int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int); - int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid); - int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *); - int (*xBegin)(sqlite3_vtab *pVTab); - int (*xSync)(sqlite3_vtab *pVTab); - int (*xCommit)(sqlite3_vtab *pVTab); - int (*xRollback)(sqlite3_vtab *pVTab); - int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName, - void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), - void **ppArg); - int (*xRename)(sqlite3_vtab *pVtab, const char *zNew); - /* The methods above are in version 1 of the sqlite_module object. Those - ** below are for version 2 and greater. */ - int (*xSavepoint)(sqlite3_vtab *pVTab, int); - int (*xRelease)(sqlite3_vtab *pVTab, int); - int (*xRollbackTo)(sqlite3_vtab *pVTab, int); -}; - -/* -** CAPI3REF: Virtual Table Indexing Information -** KEYWORDS: sqlite3_index_info -** -** The sqlite3_index_info structure and its substructures is used as part -** of the [virtual table] interface to -** pass information into and receive the reply from the [xBestIndex] -** method of a [virtual table module]. The fields under **Inputs** are the -** inputs to xBestIndex and are read-only. xBestIndex inserts its -** results into the **Outputs** fields. -** -** ^(The aConstraint[] array records WHERE clause constraints of the form: -** -** <blockquote>column OP expr</blockquote> -** -** where OP is =, <, <=, >, or >=.)^ ^(The particular operator is -** stored in aConstraint[].op using one of the -** [SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values].)^ -** ^(The index of the column is stored in -** aConstraint[].iColumn.)^ ^(aConstraint[].usable is TRUE if the -** expr on the right-hand side can be evaluated (and thus the constraint -** is usable) and false if it cannot.)^ -** -** ^The optimizer automatically inverts terms of the form "expr OP column" -** and makes other simplifications to the WHERE clause in an attempt to -** get as many WHERE clause terms into the form shown above as possible. -** ^The aConstraint[] array only reports WHERE clause terms that are -** relevant to the particular virtual table being queried. -** -** ^Information about the ORDER BY clause is stored in aOrderBy[]. -** ^Each term of aOrderBy records a column of the ORDER BY clause. -** -** The colUsed field indicates which columns of the virtual table may be -** required by the current scan. Virtual table columns are numbered from -** zero in the order in which they appear within the CREATE TABLE statement -** passed to sqlite3_declare_vtab(). For the first 63 columns (columns 0-62), -** the corresponding bit is set within the colUsed mask if the column may be -** required by SQLite. If the table has at least 64 columns and any column -** to the right of the first 63 is required, then bit 63 of colUsed is also -** set. In other words, column iCol may be required if the expression -** (colUsed & ((sqlite3_uint64)1 << (iCol>=63 ? 63 : iCol))) evaluates to -** non-zero. -** -** The [xBestIndex] method must fill aConstraintUsage[] with information -** about what parameters to pass to xFilter. ^If argvIndex>0 then -** the right-hand side of the corresponding aConstraint[] is evaluated -** and becomes the argvIndex-th entry in argv. ^(If aConstraintUsage[].omit -** is true, then the constraint is assumed to be fully handled by the -** virtual table and is not checked again by SQLite.)^ -** -** ^The idxNum and idxPtr values are recorded and passed into the -** [xFilter] method. -** ^[sqlite3_free()] is used to free idxPtr if and only if -** needToFreeIdxPtr is true. -** -** ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in -** the correct order to satisfy the ORDER BY clause so that no separate -** sorting step is required. -** -** ^The estimatedCost value is an estimate of the cost of a particular -** strategy. A cost of N indicates that the cost of the strategy is similar -** to a linear scan of an SQLite table with N rows. A cost of log(N) -** indicates that the expense of the operation is similar to that of a -** binary search on a unique indexed field of an SQLite table with N rows. -** -** ^The estimatedRows value is an estimate of the number of rows that -** will be returned by the strategy. -** -** The xBestIndex method may optionally populate the idxFlags field with a -** mask of SQLITE_INDEX_SCAN_* flags. Currently there is only one such flag - -** SQLITE_INDEX_SCAN_UNIQUE. If the xBestIndex method sets this flag, SQLite -** assumes that the strategy may visit at most one row. -** -** Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then -** SQLite also assumes that if a call to the xUpdate() method is made as -** part of the same statement to delete or update a virtual table row and the -** implementation returns SQLITE_CONSTRAINT, then there is no need to rollback -** any database changes. In other words, if the xUpdate() returns -** SQLITE_CONSTRAINT, the database contents must be exactly as they were -** before xUpdate was called. By contrast, if SQLITE_INDEX_SCAN_UNIQUE is not -** set and xUpdate returns SQLITE_CONSTRAINT, any database changes made by -** the xUpdate method are automatically rolled back by SQLite. -** -** IMPORTANT: The estimatedRows field was added to the sqlite3_index_info -** structure for SQLite [version 3.8.2] ([dateof:3.8.2]). -** If a virtual table extension is -** used with an SQLite version earlier than 3.8.2, the results of attempting -** to read or write the estimatedRows field are undefined (but are likely -** to included crashing the application). The estimatedRows field should -** therefore only be used if [sqlite3_libversion_number()] returns a -** value greater than or equal to 3008002. Similarly, the idxFlags field -** was added for [version 3.9.0] ([dateof:3.9.0]). -** It may therefore only be used if -** sqlite3_libversion_number() returns a value greater than or equal to -** 3009000. -*/ -struct sqlite3_index_info { - /* Inputs */ - int nConstraint; /* Number of entries in aConstraint */ - struct sqlite3_index_constraint { - int iColumn; /* Column constrained. -1 for ROWID */ - unsigned char op; /* Constraint operator */ - unsigned char usable; /* True if this constraint is usable */ - int iTermOffset; /* Used internally - xBestIndex should ignore */ - } *aConstraint; /* Table of WHERE clause constraints */ - int nOrderBy; /* Number of terms in the ORDER BY clause */ - struct sqlite3_index_orderby { - int iColumn; /* Column number */ - unsigned char desc; /* True for DESC. False for ASC. */ - } *aOrderBy; /* The ORDER BY clause */ - /* Outputs */ - struct sqlite3_index_constraint_usage { - int argvIndex; /* if >0, constraint is part of argv to xFilter */ - unsigned char omit; /* Do not code a test for this constraint */ - } *aConstraintUsage; - int idxNum; /* Number used to identify the index */ - char *idxStr; /* String, possibly obtained from sqlite3_malloc */ - int needToFreeIdxStr; /* Free idxStr using sqlite3_free() if true */ - int orderByConsumed; /* True if output is already ordered */ - double estimatedCost; /* Estimated cost of using this index */ - /* Fields below are only available in SQLite 3.8.2 and later */ - sqlite3_int64 estimatedRows; /* Estimated number of rows returned */ - /* Fields below are only available in SQLite 3.9.0 and later */ - int idxFlags; /* Mask of SQLITE_INDEX_SCAN_* flags */ - /* Fields below are only available in SQLite 3.10.0 and later */ - sqlite3_uint64 colUsed; /* Input: Mask of columns used by statement */ -}; - -/* -** CAPI3REF: Virtual Table Scan Flags -*/ -#define SQLITE_INDEX_SCAN_UNIQUE 1 /* Scan visits at most 1 row */ - -/* -** CAPI3REF: Virtual Table Constraint Operator Codes -** -** These macros defined the allowed values for the -** [sqlite3_index_info].aConstraint[].op field. Each value represents -** an operator that is part of a constraint term in the wHERE clause of -** a query that uses a [virtual table]. -*/ -#define SQLITE_INDEX_CONSTRAINT_EQ 2 -#define SQLITE_INDEX_CONSTRAINT_GT 4 -#define SQLITE_INDEX_CONSTRAINT_LE 8 -#define SQLITE_INDEX_CONSTRAINT_LT 16 -#define SQLITE_INDEX_CONSTRAINT_GE 32 -#define SQLITE_INDEX_CONSTRAINT_MATCH 64 -#define SQLITE_INDEX_CONSTRAINT_LIKE 65 -#define SQLITE_INDEX_CONSTRAINT_GLOB 66 -#define SQLITE_INDEX_CONSTRAINT_REGEXP 67 - -/* -** CAPI3REF: Register A Virtual Table Implementation -** METHOD: sqlite3 -** -** ^These routines are used to register a new [virtual table module] name. -** ^Module names must be registered before -** creating a new [virtual table] using the module and before using a -** preexisting [virtual table] for the module. -** -** ^The module name is registered on the [database connection] specified -** by the first parameter. ^The name of the module is given by the -** second parameter. ^The third parameter is a pointer to -** the implementation of the [virtual table module]. ^The fourth -** parameter is an arbitrary client data pointer that is passed through -** into the [xCreate] and [xConnect] methods of the virtual table module -** when a new virtual table is be being created or reinitialized. -** -** ^The sqlite3_create_module_v2() interface has a fifth parameter which -** is a pointer to a destructor for the pClientData. ^SQLite will -** invoke the destructor function (if it is not NULL) when SQLite -** no longer needs the pClientData pointer. ^The destructor will also -** be invoked if the call to sqlite3_create_module_v2() fails. -** ^The sqlite3_create_module() -** interface is equivalent to sqlite3_create_module_v2() with a NULL -** destructor. -*/ -SQLITE_API int sqlite3_create_module( - sqlite3 *db, /* SQLite connection to register module with */ - const char *zName, /* Name of the module */ - const sqlite3_module *p, /* Methods for the module */ - void *pClientData /* Client data for xCreate/xConnect */ -); -SQLITE_API int sqlite3_create_module_v2( - sqlite3 *db, /* SQLite connection to register module with */ - const char *zName, /* Name of the module */ - const sqlite3_module *p, /* Methods for the module */ - void *pClientData, /* Client data for xCreate/xConnect */ - void(*xDestroy)(void*) /* Module destructor function */ -); - -/* -** CAPI3REF: Virtual Table Instance Object -** KEYWORDS: sqlite3_vtab -** -** Every [virtual table module] implementation uses a subclass -** of this object to describe a particular instance -** of the [virtual table]. Each subclass will -** be tailored to the specific needs of the module implementation. -** The purpose of this superclass is to define certain fields that are -** common to all module implementations. -** -** ^Virtual tables methods can set an error message by assigning a -** string obtained from [sqlite3_mprintf()] to zErrMsg. The method should -** take care that any prior string is freed by a call to [sqlite3_free()] -** prior to assigning a new string to zErrMsg. ^After the error message -** is delivered up to the client application, the string will be automatically -** freed by sqlite3_free() and the zErrMsg field will be zeroed. -*/ -struct sqlite3_vtab { - const sqlite3_module *pModule; /* The module for this virtual table */ - int nRef; /* Number of open cursors */ - char *zErrMsg; /* Error message from sqlite3_mprintf() */ - /* Virtual table implementations will typically add additional fields */ -}; - -/* -** CAPI3REF: Virtual Table Cursor Object -** KEYWORDS: sqlite3_vtab_cursor {virtual table cursor} -** -** Every [virtual table module] implementation uses a subclass of the -** following structure to describe cursors that point into the -** [virtual table] and are used -** to loop through the virtual table. Cursors are created using the -** [sqlite3_module.xOpen | xOpen] method of the module and are destroyed -** by the [sqlite3_module.xClose | xClose] method. Cursors are used -** by the [xFilter], [xNext], [xEof], [xColumn], and [xRowid] methods -** of the module. Each module implementation will define -** the content of a cursor structure to suit its own needs. -** -** This superclass exists in order to define fields of the cursor that -** are common to all implementations. -*/ -struct sqlite3_vtab_cursor { - sqlite3_vtab *pVtab; /* Virtual table of this cursor */ - /* Virtual table implementations will typically add additional fields */ -}; - -/* -** CAPI3REF: Declare The Schema Of A Virtual Table -** -** ^The [xCreate] and [xConnect] methods of a -** [virtual table module] call this interface -** to declare the format (the names and datatypes of the columns) of -** the virtual tables they implement. -*/ -SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL); - -/* -** CAPI3REF: Overload A Function For A Virtual Table -** METHOD: sqlite3 -** -** ^(Virtual tables can provide alternative implementations of functions -** using the [xFindFunction] method of the [virtual table module]. -** But global versions of those functions -** must exist in order to be overloaded.)^ -** -** ^(This API makes sure a global version of a function with a particular -** name and number of parameters exists. If no such function exists -** before this API is called, a new function is created.)^ ^The implementation -** of the new function always causes an exception to be thrown. So -** the new function is not good for anything by itself. Its only -** purpose is to be a placeholder function that can be overloaded -** by a [virtual table]. -*/ -SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); - -/* -** The interface to the virtual-table mechanism defined above (back up -** to a comment remarkably similar to this one) is currently considered -** to be experimental. The interface might change in incompatible ways. -** If this is a problem for you, do not use the interface at this time. -** -** When the virtual-table mechanism stabilizes, we will declare the -** interface fixed, support it indefinitely, and remove this comment. -*/ - -/* -** CAPI3REF: A Handle To An Open BLOB -** KEYWORDS: {BLOB handle} {BLOB handles} -** -** An instance of this object represents an open BLOB on which -** [sqlite3_blob_open | incremental BLOB I/O] can be performed. -** ^Objects of this type are created by [sqlite3_blob_open()] -** and destroyed by [sqlite3_blob_close()]. -** ^The [sqlite3_blob_read()] and [sqlite3_blob_write()] interfaces -** can be used to read or write small subsections of the BLOB. -** ^The [sqlite3_blob_bytes()] interface returns the size of the BLOB in bytes. -*/ -typedef struct sqlite3_blob sqlite3_blob; - -/* -** CAPI3REF: Open A BLOB For Incremental I/O -** METHOD: sqlite3 -** CONSTRUCTOR: sqlite3_blob -** -** ^(This interfaces opens a [BLOB handle | handle] to the BLOB located -** in row iRow, column zColumn, table zTable in database zDb; -** in other words, the same BLOB that would be selected by: -** -** <pre> -** SELECT zColumn FROM zDb.zTable WHERE [rowid] = iRow; -** </pre>)^ -** -** ^(Parameter zDb is not the filename that contains the database, but -** rather the symbolic name of the database. For attached databases, this is -** the name that appears after the AS keyword in the [ATTACH] statement. -** For the main database file, the database name is "main". For TEMP -** tables, the database name is "temp".)^ -** -** ^If the flags parameter is non-zero, then the BLOB is opened for read -** and write access. ^If the flags parameter is zero, the BLOB is opened for -** read-only access. -** -** ^(On success, [SQLITE_OK] is returned and the new [BLOB handle] is stored -** in *ppBlob. Otherwise an [error code] is returned and, unless the error -** code is SQLITE_MISUSE, *ppBlob is set to NULL.)^ ^This means that, provided -** the API is not misused, it is always safe to call [sqlite3_blob_close()] -** on *ppBlob after this function it returns. -** -** This function fails with SQLITE_ERROR if any of the following are true: -** <ul> -** <li> ^(Database zDb does not exist)^, -** <li> ^(Table zTable does not exist within database zDb)^, -** <li> ^(Table zTable is a WITHOUT ROWID table)^, -** <li> ^(Column zColumn does not exist)^, -** <li> ^(Row iRow is not present in the table)^, -** <li> ^(The specified column of row iRow contains a value that is not -** a TEXT or BLOB value)^, -** <li> ^(Column zColumn is part of an index, PRIMARY KEY or UNIQUE -** constraint and the blob is being opened for read/write access)^, -** <li> ^([foreign key constraints | Foreign key constraints] are enabled, -** column zColumn is part of a [child key] definition and the blob is -** being opened for read/write access)^. -** </ul> -** -** ^Unless it returns SQLITE_MISUSE, this function sets the -** [database connection] error code and message accessible via -** [sqlite3_errcode()] and [sqlite3_errmsg()] and related functions. -** -** -** ^(If the row that a BLOB handle points to is modified by an -** [UPDATE], [DELETE], or by [ON CONFLICT] side-effects -** then the BLOB handle is marked as "expired". -** This is true if any column of the row is changed, even a column -** other than the one the BLOB handle is open on.)^ -** ^Calls to [sqlite3_blob_read()] and [sqlite3_blob_write()] for -** an expired BLOB handle fail with a return code of [SQLITE_ABORT]. -** ^(Changes written into a BLOB prior to the BLOB expiring are not -** rolled back by the expiration of the BLOB. Such changes will eventually -** commit if the transaction continues to completion.)^ -** -** ^Use the [sqlite3_blob_bytes()] interface to determine the size of -** the opened blob. ^The size of a blob may not be changed by this -** interface. Use the [UPDATE] SQL command to change the size of a -** blob. -** -** ^The [sqlite3_bind_zeroblob()] and [sqlite3_result_zeroblob()] interfaces -** and the built-in [zeroblob] SQL function may be used to create a -** zero-filled blob to read or write using the incremental-blob interface. -** -** To avoid a resource leak, every open [BLOB handle] should eventually -** be released by a call to [sqlite3_blob_close()]. -*/ -SQLITE_API int sqlite3_blob_open( - sqlite3*, - const char *zDb, - const char *zTable, - const char *zColumn, - sqlite3_int64 iRow, - int flags, - sqlite3_blob **ppBlob -); - -/* -** CAPI3REF: Move a BLOB Handle to a New Row -** METHOD: sqlite3_blob -** -** ^This function is used to move an existing blob handle so that it points -** to a different row of the same database table. ^The new row is identified -** by the rowid value passed as the second argument. Only the row can be -** changed. ^The database, table and column on which the blob handle is open -** remain the same. Moving an existing blob handle to a new row can be -** faster than closing the existing handle and opening a new one. -** -** ^(The new row must meet the same criteria as for [sqlite3_blob_open()] - -** it must exist and there must be either a blob or text value stored in -** the nominated column.)^ ^If the new row is not present in the table, or if -** it does not contain a blob or text value, or if another error occurs, an -** SQLite error code is returned and the blob handle is considered aborted. -** ^All subsequent calls to [sqlite3_blob_read()], [sqlite3_blob_write()] or -** [sqlite3_blob_reopen()] on an aborted blob handle immediately return -** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle -** always returns zero. -** -** ^This function sets the database handle error code and message. -*/ -SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); - -/* -** CAPI3REF: Close A BLOB Handle -** DESTRUCTOR: sqlite3_blob -** -** ^This function closes an open [BLOB handle]. ^(The BLOB handle is closed -** unconditionally. Even if this routine returns an error code, the -** handle is still closed.)^ -** -** ^If the blob handle being closed was opened for read-write access, and if -** the database is in auto-commit mode and there are no other open read-write -** blob handles or active write statements, the current transaction is -** committed. ^If an error occurs while committing the transaction, an error -** code is returned and the transaction rolled back. -** -** Calling this function with an argument that is not a NULL pointer or an -** open blob handle results in undefined behaviour. ^Calling this routine -** with a null pointer (such as would be returned by a failed call to -** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function -** is passed a valid open blob handle, the values returned by the -** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning. -*/ -SQLITE_API int sqlite3_blob_close(sqlite3_blob *); - -/* -** CAPI3REF: Return The Size Of An Open BLOB -** METHOD: sqlite3_blob -** -** ^Returns the size in bytes of the BLOB accessible via the -** successfully opened [BLOB handle] in its only argument. ^The -** incremental blob I/O routines can only read or overwriting existing -** blob content; they cannot change the size of a blob. -** -** This routine only works on a [BLOB handle] which has been created -** by a prior successful call to [sqlite3_blob_open()] and which has not -** been closed by [sqlite3_blob_close()]. Passing any other pointer in -** to this routine results in undefined and probably undesirable behavior. -*/ -SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *); - -/* -** CAPI3REF: Read Data From A BLOB Incrementally -** METHOD: sqlite3_blob -** -** ^(This function is used to read data from an open [BLOB handle] into a -** caller-supplied buffer. N bytes of data are copied into buffer Z -** from the open BLOB, starting at offset iOffset.)^ -** -** ^If offset iOffset is less than N bytes from the end of the BLOB, -** [SQLITE_ERROR] is returned and no data is read. ^If N or iOffset is -** less than zero, [SQLITE_ERROR] is returned and no data is read. -** ^The size of the blob (and hence the maximum value of N+iOffset) -** can be determined using the [sqlite3_blob_bytes()] interface. -** -** ^An attempt to read from an expired [BLOB handle] fails with an -** error code of [SQLITE_ABORT]. -** -** ^(On success, sqlite3_blob_read() returns SQLITE_OK. -** Otherwise, an [error code] or an [extended error code] is returned.)^ -** -** This routine only works on a [BLOB handle] which has been created -** by a prior successful call to [sqlite3_blob_open()] and which has not -** been closed by [sqlite3_blob_close()]. Passing any other pointer in -** to this routine results in undefined and probably undesirable behavior. -** -** See also: [sqlite3_blob_write()]. -*/ -SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset); - -/* -** CAPI3REF: Write Data Into A BLOB Incrementally -** METHOD: sqlite3_blob -** -** ^(This function is used to write data into an open [BLOB handle] from a -** caller-supplied buffer. N bytes of data are copied from the buffer Z -** into the open BLOB, starting at offset iOffset.)^ -** -** ^(On success, sqlite3_blob_write() returns SQLITE_OK. -** Otherwise, an [error code] or an [extended error code] is returned.)^ -** ^Unless SQLITE_MISUSE is returned, this function sets the -** [database connection] error code and message accessible via -** [sqlite3_errcode()] and [sqlite3_errmsg()] and related functions. -** -** ^If the [BLOB handle] passed as the first argument was not opened for -** writing (the flags parameter to [sqlite3_blob_open()] was zero), -** this function returns [SQLITE_READONLY]. -** -** This function may only modify the contents of the BLOB; it is -** not possible to increase the size of a BLOB using this API. -** ^If offset iOffset is less than N bytes from the end of the BLOB, -** [SQLITE_ERROR] is returned and no data is written. The size of the -** BLOB (and hence the maximum value of N+iOffset) can be determined -** using the [sqlite3_blob_bytes()] interface. ^If N or iOffset are less -** than zero [SQLITE_ERROR] is returned and no data is written. -** -** ^An attempt to write to an expired [BLOB handle] fails with an -** error code of [SQLITE_ABORT]. ^Writes to the BLOB that occurred -** before the [BLOB handle] expired are not rolled back by the -** expiration of the handle, though of course those changes might -** have been overwritten by the statement that expired the BLOB handle -** or by other independent statements. -** -** This routine only works on a [BLOB handle] which has been created -** by a prior successful call to [sqlite3_blob_open()] and which has not -** been closed by [sqlite3_blob_close()]. Passing any other pointer in -** to this routine results in undefined and probably undesirable behavior. -** -** See also: [sqlite3_blob_read()]. -*/ -SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); - -/* -** CAPI3REF: Virtual File System Objects -** -** A virtual filesystem (VFS) is an [sqlite3_vfs] object -** that SQLite uses to interact -** with the underlying operating system. Most SQLite builds come with a -** single default VFS that is appropriate for the host computer. -** New VFSes can be registered and existing VFSes can be unregistered. -** The following interfaces are provided. -** -** ^The sqlite3_vfs_find() interface returns a pointer to a VFS given its name. -** ^Names are case sensitive. -** ^Names are zero-terminated UTF-8 strings. -** ^If there is no match, a NULL pointer is returned. -** ^If zVfsName is NULL then the default VFS is returned. -** -** ^New VFSes are registered with sqlite3_vfs_register(). -** ^Each new VFS becomes the default VFS if the makeDflt flag is set. -** ^The same VFS can be registered multiple times without injury. -** ^To make an existing VFS into the default VFS, register it again -** with the makeDflt flag set. If two different VFSes with the -** same name are registered, the behavior is undefined. If a -** VFS is registered with a name that is NULL or an empty string, -** then the behavior is undefined. -** -** ^Unregister a VFS with the sqlite3_vfs_unregister() interface. -** ^(If the default VFS is unregistered, another VFS is chosen as -** the default. The choice for the new VFS is arbitrary.)^ -*/ -SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName); -SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt); -SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*); - -/* -** CAPI3REF: Mutexes -** -** The SQLite core uses these routines for thread -** synchronization. Though they are intended for internal -** use by SQLite, code that links against SQLite is -** permitted to use any of these routines. -** -** The SQLite source code contains multiple implementations -** of these mutex routines. An appropriate implementation -** is selected automatically at compile-time. The following -** implementations are available in the SQLite core: -** -** <ul> -** <li> SQLITE_MUTEX_PTHREADS -** <li> SQLITE_MUTEX_W32 -** <li> SQLITE_MUTEX_NOOP -** </ul> -** -** The SQLITE_MUTEX_NOOP implementation is a set of routines -** that does no real locking and is appropriate for use in -** a single-threaded application. The SQLITE_MUTEX_PTHREADS and -** SQLITE_MUTEX_W32 implementations are appropriate for use on Unix -** and Windows. -** -** If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor -** macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex -** implementation is included with the library. In this case the -** application must supply a custom mutex implementation using the -** [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function -** before calling sqlite3_initialize() or any other public sqlite3_ -** function that calls sqlite3_initialize(). -** -** ^The sqlite3_mutex_alloc() routine allocates a new -** mutex and returns a pointer to it. ^The sqlite3_mutex_alloc() -** routine returns NULL if it is unable to allocate the requested -** mutex. The argument to sqlite3_mutex_alloc() must one of these -** integer constants: -** -** <ul> -** <li> SQLITE_MUTEX_FAST -** <li> SQLITE_MUTEX_RECURSIVE -** <li> SQLITE_MUTEX_STATIC_MASTER -** <li> SQLITE_MUTEX_STATIC_MEM -** <li> SQLITE_MUTEX_STATIC_OPEN -** <li> SQLITE_MUTEX_STATIC_PRNG -** <li> SQLITE_MUTEX_STATIC_LRU -** <li> SQLITE_MUTEX_STATIC_PMEM -** <li> SQLITE_MUTEX_STATIC_APP1 -** <li> SQLITE_MUTEX_STATIC_APP2 -** <li> SQLITE_MUTEX_STATIC_APP3 -** <li> SQLITE_MUTEX_STATIC_VFS1 -** <li> SQLITE_MUTEX_STATIC_VFS2 -** <li> SQLITE_MUTEX_STATIC_VFS3 -** </ul> -** -** ^The first two constants (SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) -** cause sqlite3_mutex_alloc() to create -** a new mutex. ^The new mutex is recursive when SQLITE_MUTEX_RECURSIVE -** is used but not necessarily so when SQLITE_MUTEX_FAST is used. -** The mutex implementation does not need to make a distinction -** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does -** not want to. SQLite will only request a recursive mutex in -** cases where it really needs one. If a faster non-recursive mutex -** implementation is available on the host platform, the mutex subsystem -** might return such a mutex in response to SQLITE_MUTEX_FAST. -** -** ^The other allowed parameters to sqlite3_mutex_alloc() (anything other -** than SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) each return -** a pointer to a static preexisting mutex. ^Nine static mutexes are -** used by the current version of SQLite. Future versions of SQLite -** may add additional static mutexes. Static mutexes are for internal -** use by SQLite only. Applications that use SQLite mutexes should -** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or -** SQLITE_MUTEX_RECURSIVE. -** -** ^Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST -** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc() -** returns a different mutex on every call. ^For the static -** mutex types, the same mutex is returned on every call that has -** the same type number. -** -** ^The sqlite3_mutex_free() routine deallocates a previously -** allocated dynamic mutex. Attempting to deallocate a static -** mutex results in undefined behavior. -** -** ^The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt -** to enter a mutex. ^If another thread is already within the mutex, -** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return -** SQLITE_BUSY. ^The sqlite3_mutex_try() interface returns [SQLITE_OK] -** upon successful entry. ^(Mutexes created using -** SQLITE_MUTEX_RECURSIVE can be entered multiple times by the same thread. -** In such cases, the -** mutex must be exited an equal number of times before another thread -** can enter.)^ If the same thread tries to enter any mutex other -** than an SQLITE_MUTEX_RECURSIVE more than once, the behavior is undefined. -** -** ^(Some systems (for example, Windows 95) do not support the operation -** implemented by sqlite3_mutex_try(). On those systems, sqlite3_mutex_try() -** will always return SQLITE_BUSY. The SQLite core only ever uses -** sqlite3_mutex_try() as an optimization so this is acceptable -** behavior.)^ -** -** ^The sqlite3_mutex_leave() routine exits a mutex that was -** previously entered by the same thread. The behavior -** is undefined if the mutex is not currently entered by the -** calling thread or is not currently allocated. -** -** ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or -** sqlite3_mutex_leave() is a NULL pointer, then all three routines -** behave as no-ops. -** -** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. -*/ -SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int); -SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*); -SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*); -SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*); -SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*); - -/* -** CAPI3REF: Mutex Methods Object -** -** An instance of this structure defines the low-level routines -** used to allocate and use mutexes. -** -** Usually, the default mutex implementations provided by SQLite are -** sufficient, however the application has the option of substituting a custom -** implementation for specialized deployments or systems for which SQLite -** does not provide a suitable implementation. In this case, the application -** creates and populates an instance of this structure to pass -** to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option. -** Additionally, an instance of this structure can be used as an -** output variable when querying the system for the current mutex -** implementation, using the [SQLITE_CONFIG_GETMUTEX] option. -** -** ^The xMutexInit method defined by this structure is invoked as -** part of system initialization by the sqlite3_initialize() function. -** ^The xMutexInit routine is called by SQLite exactly once for each -** effective call to [sqlite3_initialize()]. -** -** ^The xMutexEnd method defined by this structure is invoked as -** part of system shutdown by the sqlite3_shutdown() function. The -** implementation of this method is expected to release all outstanding -** resources obtained by the mutex methods implementation, especially -** those obtained by the xMutexInit method. ^The xMutexEnd() -** interface is invoked exactly once for each call to [sqlite3_shutdown()]. -** -** ^(The remaining seven methods defined by this structure (xMutexAlloc, -** xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and -** xMutexNotheld) implement the following interfaces (respectively): -** -** <ul> -** <li> [sqlite3_mutex_alloc()] </li> -** <li> [sqlite3_mutex_free()] </li> -** <li> [sqlite3_mutex_enter()] </li> -** <li> [sqlite3_mutex_try()] </li> -** <li> [sqlite3_mutex_leave()] </li> -** <li> [sqlite3_mutex_held()] </li> -** <li> [sqlite3_mutex_notheld()] </li> -** </ul>)^ -** -** The only difference is that the public sqlite3_XXX functions enumerated -** above silently ignore any invocations that pass a NULL pointer instead -** of a valid mutex handle. The implementations of the methods defined -** by this structure are not required to handle this case, the results -** of passing a NULL pointer instead of a valid mutex handle are undefined -** (i.e. it is acceptable to provide an implementation that segfaults if -** it is passed a NULL pointer). -** -** The xMutexInit() method must be threadsafe. It must be harmless to -** invoke xMutexInit() multiple times within the same process and without -** intervening calls to xMutexEnd(). Second and subsequent calls to -** xMutexInit() must be no-ops. -** -** xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()] -** and its associates). Similarly, xMutexAlloc() must not use SQLite memory -** allocation for a static mutex. ^However xMutexAlloc() may use SQLite -** memory allocation for a fast or recursive mutex. -** -** ^SQLite will invoke the xMutexEnd() method when [sqlite3_shutdown()] is -** called, but only if the prior call to xMutexInit returned SQLITE_OK. -** If xMutexInit fails in any way, it is expected to clean up after itself -** prior to returning. -*/ -typedef struct sqlite3_mutex_methods sqlite3_mutex_methods; -struct sqlite3_mutex_methods { - int (*xMutexInit)(void); - int (*xMutexEnd)(void); - sqlite3_mutex *(*xMutexAlloc)(int); - void (*xMutexFree)(sqlite3_mutex *); - void (*xMutexEnter)(sqlite3_mutex *); - int (*xMutexTry)(sqlite3_mutex *); - void (*xMutexLeave)(sqlite3_mutex *); - int (*xMutexHeld)(sqlite3_mutex *); - int (*xMutexNotheld)(sqlite3_mutex *); -}; - -/* -** CAPI3REF: Mutex Verification Routines -** -** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines -** are intended for use inside assert() statements. The SQLite core -** never uses these routines except inside an assert() and applications -** are advised to follow the lead of the core. The SQLite core only -** provides implementations for these routines when it is compiled -** with the SQLITE_DEBUG flag. External mutex implementations -** are only required to provide these routines if SQLITE_DEBUG is -** defined and if NDEBUG is not defined. -** -** These routines should return true if the mutex in their argument -** is held or not held, respectively, by the calling thread. -** -** The implementation is not required to provide versions of these -** routines that actually work. If the implementation does not provide working -** versions of these routines, it should at least provide stubs that always -** return true so that one does not get spurious assertion failures. -** -** If the argument to sqlite3_mutex_held() is a NULL pointer then -** the routine should return 1. This seems counter-intuitive since -** clearly the mutex cannot be held if it does not exist. But -** the reason the mutex does not exist is because the build is not -** using mutexes. And we do not want the assert() containing the -** call to sqlite3_mutex_held() to fail, so a non-zero return is -** the appropriate thing to do. The sqlite3_mutex_notheld() -** interface should also return 1 when given a NULL pointer. -*/ -#ifndef NDEBUG -SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*); -SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*); -#endif - -/* -** CAPI3REF: Mutex Types -** -** The [sqlite3_mutex_alloc()] interface takes a single argument -** which is one of these integer constants. -** -** The set of static mutexes may change from one SQLite release to the -** next. Applications that override the built-in mutex logic must be -** prepared to accommodate additional static mutexes. -*/ -#define SQLITE_MUTEX_FAST 0 -#define SQLITE_MUTEX_RECURSIVE 1 -#define SQLITE_MUTEX_STATIC_MASTER 2 -#define SQLITE_MUTEX_STATIC_MEM 3 /* sqlite3_malloc() */ -#define SQLITE_MUTEX_STATIC_MEM2 4 /* NOT USED */ -#define SQLITE_MUTEX_STATIC_OPEN 4 /* sqlite3BtreeOpen() */ -#define SQLITE_MUTEX_STATIC_PRNG 5 /* sqlite3_randomness() */ -#define SQLITE_MUTEX_STATIC_LRU 6 /* lru page list */ -#define SQLITE_MUTEX_STATIC_LRU2 7 /* NOT USED */ -#define SQLITE_MUTEX_STATIC_PMEM 7 /* sqlite3PageMalloc() */ -#define SQLITE_MUTEX_STATIC_APP1 8 /* For use by application */ -#define SQLITE_MUTEX_STATIC_APP2 9 /* For use by application */ -#define SQLITE_MUTEX_STATIC_APP3 10 /* For use by application */ -#define SQLITE_MUTEX_STATIC_VFS1 11 /* For use by built-in VFS */ -#define SQLITE_MUTEX_STATIC_VFS2 12 /* For use by extension VFS */ -#define SQLITE_MUTEX_STATIC_VFS3 13 /* For use by application VFS */ - -/* -** CAPI3REF: Retrieve the mutex for a database connection -** METHOD: sqlite3 -** -** ^This interface returns a pointer the [sqlite3_mutex] object that -** serializes access to the [database connection] given in the argument -** when the [threading mode] is Serialized. -** ^If the [threading mode] is Single-thread or Multi-thread then this -** routine returns a NULL pointer. -*/ -SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*); - -/* -** CAPI3REF: Low-Level Control Of Database Files -** METHOD: sqlite3 -** -** ^The [sqlite3_file_control()] interface makes a direct call to the -** xFileControl method for the [sqlite3_io_methods] object associated -** with a particular database identified by the second argument. ^The -** name of the database is "main" for the main database or "temp" for the -** TEMP database, or the name that appears after the AS keyword for -** databases that are added using the [ATTACH] SQL command. -** ^A NULL pointer can be used in place of "main" to refer to the -** main database file. -** ^The third and fourth parameters to this routine -** are passed directly through to the second and third parameters of -** the xFileControl method. ^The return value of the xFileControl -** method becomes the return value of this routine. -** -** ^The SQLITE_FCNTL_FILE_POINTER value for the op parameter causes -** a pointer to the underlying [sqlite3_file] object to be written into -** the space pointed to by the 4th parameter. ^The SQLITE_FCNTL_FILE_POINTER -** case is a short-circuit path which does not actually invoke the -** underlying sqlite3_io_methods.xFileControl method. -** -** ^If the second parameter (zDbName) does not match the name of any -** open database file, then SQLITE_ERROR is returned. ^This error -** code is not remembered and will not be recalled by [sqlite3_errcode()] -** or [sqlite3_errmsg()]. The underlying xFileControl method might -** also return SQLITE_ERROR. There is no way to distinguish between -** an incorrect zDbName and an SQLITE_ERROR return from the underlying -** xFileControl method. -** -** See also: [SQLITE_FCNTL_LOCKSTATE] -*/ -SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*); - -/* -** CAPI3REF: Testing Interface -** -** ^The sqlite3_test_control() interface is used to read out internal -** state of SQLite and to inject faults into SQLite for testing -** purposes. ^The first parameter is an operation code that determines -** the number, meaning, and operation of all subsequent parameters. -** -** This interface is not for use by applications. It exists solely -** for verifying the correct operation of the SQLite library. Depending -** on how the SQLite library is compiled, this interface might not exist. -** -** The details of the operation codes, their meanings, the parameters -** they take, and what they do are all subject to change without notice. -** Unlike most of the SQLite API, this function is not guaranteed to -** operate consistently from one release to the next. -*/ -SQLITE_API int sqlite3_test_control(int op, ...); - -/* -** CAPI3REF: Testing Interface Operation Codes -** -** These constants are the valid operation code parameters used -** as the first argument to [sqlite3_test_control()]. -** -** These parameters and their meanings are subject to change -** without notice. These values are for testing purposes only. -** Applications should not use any of these parameters or the -** [sqlite3_test_control()] interface. -*/ -#define SQLITE_TESTCTRL_FIRST 5 -#define SQLITE_TESTCTRL_PRNG_SAVE 5 -#define SQLITE_TESTCTRL_PRNG_RESTORE 6 -#define SQLITE_TESTCTRL_PRNG_RESET 7 -#define SQLITE_TESTCTRL_BITVEC_TEST 8 -#define SQLITE_TESTCTRL_FAULT_INSTALL 9 -#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10 -#define SQLITE_TESTCTRL_PENDING_BYTE 11 -#define SQLITE_TESTCTRL_ASSERT 12 -#define SQLITE_TESTCTRL_ALWAYS 13 -#define SQLITE_TESTCTRL_RESERVE 14 -#define SQLITE_TESTCTRL_OPTIMIZATIONS 15 -#define SQLITE_TESTCTRL_ISKEYWORD 16 -#define SQLITE_TESTCTRL_SCRATCHMALLOC 17 -#define SQLITE_TESTCTRL_LOCALTIME_FAULT 18 -#define SQLITE_TESTCTRL_EXPLAIN_STMT 19 /* NOT USED */ -#define SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD 19 -#define SQLITE_TESTCTRL_NEVER_CORRUPT 20 -#define SQLITE_TESTCTRL_VDBE_COVERAGE 21 -#define SQLITE_TESTCTRL_BYTEORDER 22 -#define SQLITE_TESTCTRL_ISINIT 23 -#define SQLITE_TESTCTRL_SORTER_MMAP 24 -#define SQLITE_TESTCTRL_IMPOSTER 25 -#define SQLITE_TESTCTRL_LAST 25 - -/* -** CAPI3REF: SQLite Runtime Status -** -** ^These interfaces are used to retrieve runtime status information -** about the performance of SQLite, and optionally to reset various -** highwater marks. ^The first argument is an integer code for -** the specific parameter to measure. ^(Recognized integer codes -** are of the form [status parameters | SQLITE_STATUS_...].)^ -** ^The current value of the parameter is returned into *pCurrent. -** ^The highest recorded value is returned in *pHighwater. ^If the -** resetFlag is true, then the highest record value is reset after -** *pHighwater is written. ^(Some parameters do not record the highest -** value. For those parameters -** nothing is written into *pHighwater and the resetFlag is ignored.)^ -** ^(Other parameters record only the highwater mark and not the current -** value. For these latter parameters nothing is written into *pCurrent.)^ -** -** ^The sqlite3_status() and sqlite3_status64() routines return -** SQLITE_OK on success and a non-zero [error code] on failure. -** -** If either the current value or the highwater mark is too large to -** be represented by a 32-bit integer, then the values returned by -** sqlite3_status() are undefined. -** -** See also: [sqlite3_db_status()] -*/ -SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); -SQLITE_API int sqlite3_status64( - int op, - sqlite3_int64 *pCurrent, - sqlite3_int64 *pHighwater, - int resetFlag -); - - -/* -** CAPI3REF: Status Parameters -** KEYWORDS: {status parameters} -** -** These integer constants designate various run-time status parameters -** that can be returned by [sqlite3_status()]. -** -** <dl> -** [[SQLITE_STATUS_MEMORY_USED]] ^(<dt>SQLITE_STATUS_MEMORY_USED</dt> -** <dd>This parameter is the current amount of memory checked out -** using [sqlite3_malloc()], either directly or indirectly. The -** figure includes calls made to [sqlite3_malloc()] by the application -** and internal memory usage by the SQLite library. Scratch memory -** controlled by [SQLITE_CONFIG_SCRATCH] and auxiliary page-cache -** memory controlled by [SQLITE_CONFIG_PAGECACHE] is not included in -** this parameter. The amount returned is the sum of the allocation -** sizes as reported by the xSize method in [sqlite3_mem_methods].</dd>)^ -** -** [[SQLITE_STATUS_MALLOC_SIZE]] ^(<dt>SQLITE_STATUS_MALLOC_SIZE</dt> -** <dd>This parameter records the largest memory allocation request -** handed to [sqlite3_malloc()] or [sqlite3_realloc()] (or their -** internal equivalents). Only the value returned in the -** *pHighwater parameter to [sqlite3_status()] is of interest. -** The value written into the *pCurrent parameter is undefined.</dd>)^ -** -** [[SQLITE_STATUS_MALLOC_COUNT]] ^(<dt>SQLITE_STATUS_MALLOC_COUNT</dt> -** <dd>This parameter records the number of separate memory allocations -** currently checked out.</dd>)^ -** -** [[SQLITE_STATUS_PAGECACHE_USED]] ^(<dt>SQLITE_STATUS_PAGECACHE_USED</dt> -** <dd>This parameter returns the number of pages used out of the -** [pagecache memory allocator] that was configured using -** [SQLITE_CONFIG_PAGECACHE]. The -** value returned is in pages, not in bytes.</dd>)^ -** -** [[SQLITE_STATUS_PAGECACHE_OVERFLOW]] -** ^(<dt>SQLITE_STATUS_PAGECACHE_OVERFLOW</dt> -** <dd>This parameter returns the number of bytes of page cache -** allocation which could not be satisfied by the [SQLITE_CONFIG_PAGECACHE] -** buffer and where forced to overflow to [sqlite3_malloc()]. The -** returned value includes allocations that overflowed because they -** where too large (they were larger than the "sz" parameter to -** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because -** no space was left in the page cache.</dd>)^ -** -** [[SQLITE_STATUS_PAGECACHE_SIZE]] ^(<dt>SQLITE_STATUS_PAGECACHE_SIZE</dt> -** <dd>This parameter records the largest memory allocation request -** handed to [pagecache memory allocator]. Only the value returned in the -** *pHighwater parameter to [sqlite3_status()] is of interest. -** The value written into the *pCurrent parameter is undefined.</dd>)^ -** -** [[SQLITE_STATUS_SCRATCH_USED]] ^(<dt>SQLITE_STATUS_SCRATCH_USED</dt> -** <dd>This parameter returns the number of allocations used out of the -** [scratch memory allocator] configured using -** [SQLITE_CONFIG_SCRATCH]. The value returned is in allocations, not -** in bytes. Since a single thread may only have one scratch allocation -** outstanding at time, this parameter also reports the number of threads -** using scratch memory at the same time.</dd>)^ -** -** [[SQLITE_STATUS_SCRATCH_OVERFLOW]] ^(<dt>SQLITE_STATUS_SCRATCH_OVERFLOW</dt> -** <dd>This parameter returns the number of bytes of scratch memory -** allocation which could not be satisfied by the [SQLITE_CONFIG_SCRATCH] -** buffer and where forced to overflow to [sqlite3_malloc()]. The values -** returned include overflows because the requested allocation was too -** larger (that is, because the requested allocation was larger than the -** "sz" parameter to [SQLITE_CONFIG_SCRATCH]) and because no scratch buffer -** slots were available. -** </dd>)^ -** -** [[SQLITE_STATUS_SCRATCH_SIZE]] ^(<dt>SQLITE_STATUS_SCRATCH_SIZE</dt> -** <dd>This parameter records the largest memory allocation request -** handed to [scratch memory allocator]. Only the value returned in the -** *pHighwater parameter to [sqlite3_status()] is of interest. -** The value written into the *pCurrent parameter is undefined.</dd>)^ -** -** [[SQLITE_STATUS_PARSER_STACK]] ^(<dt>SQLITE_STATUS_PARSER_STACK</dt> -** <dd>The *pHighwater parameter records the deepest parser stack. -** The *pCurrent value is undefined. The *pHighwater value is only -** meaningful if SQLite is compiled with [YYTRACKMAXSTACKDEPTH].</dd>)^ -** </dl> -** -** New status parameters may be added from time to time. -*/ -#define SQLITE_STATUS_MEMORY_USED 0 -#define SQLITE_STATUS_PAGECACHE_USED 1 -#define SQLITE_STATUS_PAGECACHE_OVERFLOW 2 -#define SQLITE_STATUS_SCRATCH_USED 3 -#define SQLITE_STATUS_SCRATCH_OVERFLOW 4 -#define SQLITE_STATUS_MALLOC_SIZE 5 -#define SQLITE_STATUS_PARSER_STACK 6 -#define SQLITE_STATUS_PAGECACHE_SIZE 7 -#define SQLITE_STATUS_SCRATCH_SIZE 8 -#define SQLITE_STATUS_MALLOC_COUNT 9 - -/* -** CAPI3REF: Database Connection Status -** METHOD: sqlite3 -** -** ^This interface is used to retrieve runtime status information -** about a single [database connection]. ^The first argument is the -** database connection object to be interrogated. ^The second argument -** is an integer constant, taken from the set of -** [SQLITE_DBSTATUS options], that -** determines the parameter to interrogate. The set of -** [SQLITE_DBSTATUS options] is likely -** to grow in future releases of SQLite. -** -** ^The current value of the requested parameter is written into *pCur -** and the highest instantaneous value is written into *pHiwtr. ^If -** the resetFlg is true, then the highest instantaneous value is -** reset back down to the current value. -** -** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a -** non-zero [error code] on failure. -** -** See also: [sqlite3_status()] and [sqlite3_stmt_status()]. -*/ -SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg); - -/* -** CAPI3REF: Status Parameters for database connections -** KEYWORDS: {SQLITE_DBSTATUS options} -** -** These constants are the available integer "verbs" that can be passed as -** the second argument to the [sqlite3_db_status()] interface. -** -** New verbs may be added in future releases of SQLite. Existing verbs -** might be discontinued. Applications should check the return code from -** [sqlite3_db_status()] to make sure that the call worked. -** The [sqlite3_db_status()] interface will return a non-zero error code -** if a discontinued or unsupported verb is invoked. -** -** <dl> -** [[SQLITE_DBSTATUS_LOOKASIDE_USED]] ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_USED</dt> -** <dd>This parameter returns the number of lookaside memory slots currently -** checked out.</dd>)^ -** -** [[SQLITE_DBSTATUS_LOOKASIDE_HIT]] ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_HIT</dt> -** <dd>This parameter returns the number malloc attempts that were -** satisfied using lookaside memory. Only the high-water value is meaningful; -** the current value is always zero.)^ -** -** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE]] -** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE</dt> -** <dd>This parameter returns the number malloc attempts that might have -** been satisfied using lookaside memory but failed due to the amount of -** memory requested being larger than the lookaside slot size. -** Only the high-water value is meaningful; -** the current value is always zero.)^ -** -** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL]] -** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL</dt> -** <dd>This parameter returns the number malloc attempts that might have -** been satisfied using lookaside memory but failed due to all lookaside -** memory already being in use. -** Only the high-water value is meaningful; -** the current value is always zero.)^ -** -** [[SQLITE_DBSTATUS_CACHE_USED]] ^(<dt>SQLITE_DBSTATUS_CACHE_USED</dt> -** <dd>This parameter returns the approximate number of bytes of heap -** memory used by all pager caches associated with the database connection.)^ -** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0. -** -** [[SQLITE_DBSTATUS_CACHE_USED_SHARED]] -** ^(<dt>SQLITE_DBSTATUS_CACHE_USED_SHARED</dt> -** <dd>This parameter is similar to DBSTATUS_CACHE_USED, except that if a -** pager cache is shared between two or more connections the bytes of heap -** memory used by that pager cache is divided evenly between the attached -** connections.)^ In other words, if none of the pager caches associated -** with the database connection are shared, this request returns the same -** value as DBSTATUS_CACHE_USED. Or, if one or more or the pager caches are -** shared, the value returned by this call will be smaller than that returned -** by DBSTATUS_CACHE_USED. ^The highwater mark associated with -** SQLITE_DBSTATUS_CACHE_USED_SHARED is always 0. -** -** [[SQLITE_DBSTATUS_SCHEMA_USED]] ^(<dt>SQLITE_DBSTATUS_SCHEMA_USED</dt> -** <dd>This parameter returns the approximate number of bytes of heap -** memory used to store the schema for all databases associated -** with the connection - main, temp, and any [ATTACH]-ed databases.)^ -** ^The full amount of memory used by the schemas is reported, even if the -** schema memory is shared with other database connections due to -** [shared cache mode] being enabled. -** ^The highwater mark associated with SQLITE_DBSTATUS_SCHEMA_USED is always 0. -** -** [[SQLITE_DBSTATUS_STMT_USED]] ^(<dt>SQLITE_DBSTATUS_STMT_USED</dt> -** <dd>This parameter returns the approximate number of bytes of heap -** and lookaside memory used by all prepared statements associated with -** the database connection.)^ -** ^The highwater mark associated with SQLITE_DBSTATUS_STMT_USED is always 0. -** </dd> -** -** [[SQLITE_DBSTATUS_CACHE_HIT]] ^(<dt>SQLITE_DBSTATUS_CACHE_HIT</dt> -** <dd>This parameter returns the number of pager cache hits that have -** occurred.)^ ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_HIT -** is always 0. -** </dd> -** -** [[SQLITE_DBSTATUS_CACHE_MISS]] ^(<dt>SQLITE_DBSTATUS_CACHE_MISS</dt> -** <dd>This parameter returns the number of pager cache misses that have -** occurred.)^ ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_MISS -** is always 0. -** </dd> -** -** [[SQLITE_DBSTATUS_CACHE_WRITE]] ^(<dt>SQLITE_DBSTATUS_CACHE_WRITE</dt> -** <dd>This parameter returns the number of dirty cache entries that have -** been written to disk. Specifically, the number of pages written to the -** wal file in wal mode databases, or the number of pages written to the -** database file in rollback mode databases. Any pages written as part of -** transaction rollback or database recovery operations are not included. -** If an IO or other error occurs while writing a page to disk, the effect -** on subsequent SQLITE_DBSTATUS_CACHE_WRITE requests is undefined.)^ ^The -** highwater mark associated with SQLITE_DBSTATUS_CACHE_WRITE is always 0. -** </dd> -** -** [[SQLITE_DBSTATUS_DEFERRED_FKS]] ^(<dt>SQLITE_DBSTATUS_DEFERRED_FKS</dt> -** <dd>This parameter returns zero for the current value if and only if -** all foreign key constraints (deferred or immediate) have been -** resolved.)^ ^The highwater mark is always 0. -** </dd> -** </dl> -*/ -#define SQLITE_DBSTATUS_LOOKASIDE_USED 0 -#define SQLITE_DBSTATUS_CACHE_USED 1 -#define SQLITE_DBSTATUS_SCHEMA_USED 2 -#define SQLITE_DBSTATUS_STMT_USED 3 -#define SQLITE_DBSTATUS_LOOKASIDE_HIT 4 -#define SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE 5 -#define SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL 6 -#define SQLITE_DBSTATUS_CACHE_HIT 7 -#define SQLITE_DBSTATUS_CACHE_MISS 8 -#define SQLITE_DBSTATUS_CACHE_WRITE 9 -#define SQLITE_DBSTATUS_DEFERRED_FKS 10 -#define SQLITE_DBSTATUS_CACHE_USED_SHARED 11 -#define SQLITE_DBSTATUS_MAX 11 /* Largest defined DBSTATUS */ - - -/* -** CAPI3REF: Prepared Statement Status -** METHOD: sqlite3_stmt -** -** ^(Each prepared statement maintains various -** [SQLITE_STMTSTATUS counters] that measure the number -** of times it has performed specific operations.)^ These counters can -** be used to monitor the performance characteristics of the prepared -** statements. For example, if the number of table steps greatly exceeds -** the number of table searches or result rows, that would tend to indicate -** that the prepared statement is using a full table scan rather than -** an index. -** -** ^(This interface is used to retrieve and reset counter values from -** a [prepared statement]. The first argument is the prepared statement -** object to be interrogated. The second argument -** is an integer code for a specific [SQLITE_STMTSTATUS counter] -** to be interrogated.)^ -** ^The current value of the requested counter is returned. -** ^If the resetFlg is true, then the counter is reset to zero after this -** interface call returns. -** -** See also: [sqlite3_status()] and [sqlite3_db_status()]. -*/ -SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); - -/* -** CAPI3REF: Status Parameters for prepared statements -** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters} -** -** These preprocessor macros define integer codes that name counter -** values associated with the [sqlite3_stmt_status()] interface. -** The meanings of the various counters are as follows: -** -** <dl> -** [[SQLITE_STMTSTATUS_FULLSCAN_STEP]] <dt>SQLITE_STMTSTATUS_FULLSCAN_STEP</dt> -** <dd>^This is the number of times that SQLite has stepped forward in -** a table as part of a full table scan. Large numbers for this counter -** may indicate opportunities for performance improvement through -** careful use of indices.</dd> -** -** [[SQLITE_STMTSTATUS_SORT]] <dt>SQLITE_STMTSTATUS_SORT</dt> -** <dd>^This is the number of sort operations that have occurred. -** A non-zero value in this counter may indicate an opportunity to -** improvement performance through careful use of indices.</dd> -** -** [[SQLITE_STMTSTATUS_AUTOINDEX]] <dt>SQLITE_STMTSTATUS_AUTOINDEX</dt> -** <dd>^This is the number of rows inserted into transient indices that -** were created automatically in order to help joins run faster. -** A non-zero value in this counter may indicate an opportunity to -** improvement performance by adding permanent indices that do not -** need to be reinitialized each time the statement is run.</dd> -** -** [[SQLITE_STMTSTATUS_VM_STEP]] <dt>SQLITE_STMTSTATUS_VM_STEP</dt> -** <dd>^This is the number of virtual machine operations executed -** by the prepared statement if that number is less than or equal -** to 2147483647. The number of virtual machine operations can be -** used as a proxy for the total work done by the prepared statement. -** If the number of virtual machine operations exceeds 2147483647 -** then the value returned by this statement status code is undefined. -** </dd> -** </dl> -*/ -#define SQLITE_STMTSTATUS_FULLSCAN_STEP 1 -#define SQLITE_STMTSTATUS_SORT 2 -#define SQLITE_STMTSTATUS_AUTOINDEX 3 -#define SQLITE_STMTSTATUS_VM_STEP 4 - -/* -** CAPI3REF: Custom Page Cache Object -** -** The sqlite3_pcache type is opaque. It is implemented by -** the pluggable module. The SQLite core has no knowledge of -** its size or internal structure and never deals with the -** sqlite3_pcache object except by holding and passing pointers -** to the object. -** -** See [sqlite3_pcache_methods2] for additional information. -*/ -typedef struct sqlite3_pcache sqlite3_pcache; - -/* -** CAPI3REF: Custom Page Cache Object -** -** The sqlite3_pcache_page object represents a single page in the -** page cache. The page cache will allocate instances of this -** object. Various methods of the page cache use pointers to instances -** of this object as parameters or as their return value. -** -** See [sqlite3_pcache_methods2] for additional information. -*/ -typedef struct sqlite3_pcache_page sqlite3_pcache_page; -struct sqlite3_pcache_page { - void *pBuf; /* The content of the page */ - void *pExtra; /* Extra information associated with the page */ -}; - -/* -** CAPI3REF: Application Defined Page Cache. -** KEYWORDS: {page cache} -** -** ^(The [sqlite3_config]([SQLITE_CONFIG_PCACHE2], ...) interface can -** register an alternative page cache implementation by passing in an -** instance of the sqlite3_pcache_methods2 structure.)^ -** In many applications, most of the heap memory allocated by -** SQLite is used for the page cache. -** By implementing a -** custom page cache using this API, an application can better control -** the amount of memory consumed by SQLite, the way in which -** that memory is allocated and released, and the policies used to -** determine exactly which parts of a database file are cached and for -** how long. -** -** The alternative page cache mechanism is an -** extreme measure that is only needed by the most demanding applications. -** The built-in page cache is recommended for most uses. -** -** ^(The contents of the sqlite3_pcache_methods2 structure are copied to an -** internal buffer by SQLite within the call to [sqlite3_config]. Hence -** the application may discard the parameter after the call to -** [sqlite3_config()] returns.)^ -** -** [[the xInit() page cache method]] -** ^(The xInit() method is called once for each effective -** call to [sqlite3_initialize()])^ -** (usually only once during the lifetime of the process). ^(The xInit() -** method is passed a copy of the sqlite3_pcache_methods2.pArg value.)^ -** The intent of the xInit() method is to set up global data structures -** required by the custom page cache implementation. -** ^(If the xInit() method is NULL, then the -** built-in default page cache is used instead of the application defined -** page cache.)^ -** -** [[the xShutdown() page cache method]] -** ^The xShutdown() method is called by [sqlite3_shutdown()]. -** It can be used to clean up -** any outstanding resources before process shutdown, if required. -** ^The xShutdown() method may be NULL. -** -** ^SQLite automatically serializes calls to the xInit method, -** so the xInit method need not be threadsafe. ^The -** xShutdown method is only called from [sqlite3_shutdown()] so it does -** not need to be threadsafe either. All other methods must be threadsafe -** in multithreaded applications. -** -** ^SQLite will never invoke xInit() more than once without an intervening -** call to xShutdown(). -** -** [[the xCreate() page cache methods]] -** ^SQLite invokes the xCreate() method to construct a new cache instance. -** SQLite will typically create one cache instance for each open database file, -** though this is not guaranteed. ^The -** first parameter, szPage, is the size in bytes of the pages that must -** be allocated by the cache. ^szPage will always a power of two. ^The -** second parameter szExtra is a number of bytes of extra storage -** associated with each page cache entry. ^The szExtra parameter will -** a number less than 250. SQLite will use the -** extra szExtra bytes on each page to store metadata about the underlying -** database page on disk. The value passed into szExtra depends -** on the SQLite version, the target platform, and how SQLite was compiled. -** ^The third argument to xCreate(), bPurgeable, is true if the cache being -** created will be used to cache database pages of a file stored on disk, or -** false if it is used for an in-memory database. The cache implementation -** does not have to do anything special based with the value of bPurgeable; -** it is purely advisory. ^On a cache where bPurgeable is false, SQLite will -** never invoke xUnpin() except to deliberately delete a page. -** ^In other words, calls to xUnpin() on a cache with bPurgeable set to -** false will always have the "discard" flag set to true. -** ^Hence, a cache created with bPurgeable false will -** never contain any unpinned pages. -** -** [[the xCachesize() page cache method]] -** ^(The xCachesize() method may be called at any time by SQLite to set the -** suggested maximum cache-size (number of pages stored by) the cache -** instance passed as the first argument. This is the value configured using -** the SQLite "[PRAGMA cache_size]" command.)^ As with the bPurgeable -** parameter, the implementation is not required to do anything with this -** value; it is advisory only. -** -** [[the xPagecount() page cache methods]] -** The xPagecount() method must return the number of pages currently -** stored in the cache, both pinned and unpinned. -** -** [[the xFetch() page cache methods]] -** The xFetch() method locates a page in the cache and returns a pointer to -** an sqlite3_pcache_page object associated with that page, or a NULL pointer. -** The pBuf element of the returned sqlite3_pcache_page object will be a -** pointer to a buffer of szPage bytes used to store the content of a -** single database page. The pExtra element of sqlite3_pcache_page will be -** a pointer to the szExtra bytes of extra storage that SQLite has requested -** for each entry in the page cache. -** -** The page to be fetched is determined by the key. ^The minimum key value -** is 1. After it has been retrieved using xFetch, the page is considered -** to be "pinned". -** -** If the requested page is already in the page cache, then the page cache -** implementation must return a pointer to the page buffer with its content -** intact. If the requested page is not already in the cache, then the -** cache implementation should use the value of the createFlag -** parameter to help it determined what action to take: -** -** <table border=1 width=85% align=center> -** <tr><th> createFlag <th> Behavior when page is not already in cache -** <tr><td> 0 <td> Do not allocate a new page. Return NULL. -** <tr><td> 1 <td> Allocate a new page if it easy and convenient to do so. -** Otherwise return NULL. -** <tr><td> 2 <td> Make every effort to allocate a new page. Only return -** NULL if allocating a new page is effectively impossible. -** </table> -** -** ^(SQLite will normally invoke xFetch() with a createFlag of 0 or 1. SQLite -** will only use a createFlag of 2 after a prior call with a createFlag of 1 -** failed.)^ In between the to xFetch() calls, SQLite may -** attempt to unpin one or more cache pages by spilling the content of -** pinned pages to disk and synching the operating system disk cache. -** -** [[the xUnpin() page cache method]] -** ^xUnpin() is called by SQLite with a pointer to a currently pinned page -** as its second argument. If the third parameter, discard, is non-zero, -** then the page must be evicted from the cache. -** ^If the discard parameter is -** zero, then the page may be discarded or retained at the discretion of -** page cache implementation. ^The page cache implementation -** may choose to evict unpinned pages at any time. -** -** The cache must not perform any reference counting. A single -** call to xUnpin() unpins the page regardless of the number of prior calls -** to xFetch(). -** -** [[the xRekey() page cache methods]] -** The xRekey() method is used to change the key value associated with the -** page passed as the second argument. If the cache -** previously contains an entry associated with newKey, it must be -** discarded. ^Any prior cache entry associated with newKey is guaranteed not -** to be pinned. -** -** When SQLite calls the xTruncate() method, the cache must discard all -** existing cache entries with page numbers (keys) greater than or equal -** to the value of the iLimit parameter passed to xTruncate(). If any -** of these pages are pinned, they are implicitly unpinned, meaning that -** they can be safely discarded. -** -** [[the xDestroy() page cache method]] -** ^The xDestroy() method is used to delete a cache allocated by xCreate(). -** All resources associated with the specified cache should be freed. ^After -** calling the xDestroy() method, SQLite considers the [sqlite3_pcache*] -** handle invalid, and will not use it with any other sqlite3_pcache_methods2 -** functions. -** -** [[the xShrink() page cache method]] -** ^SQLite invokes the xShrink() method when it wants the page cache to -** free up as much of heap memory as possible. The page cache implementation -** is not obligated to free any memory, but well-behaved implementations should -** do their best. -*/ -typedef struct sqlite3_pcache_methods2 sqlite3_pcache_methods2; -struct sqlite3_pcache_methods2 { - int iVersion; - void *pArg; - int (*xInit)(void*); - void (*xShutdown)(void*); - sqlite3_pcache *(*xCreate)(int szPage, int szExtra, int bPurgeable); - void (*xCachesize)(sqlite3_pcache*, int nCachesize); - int (*xPagecount)(sqlite3_pcache*); - sqlite3_pcache_page *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); - void (*xUnpin)(sqlite3_pcache*, sqlite3_pcache_page*, int discard); - void (*xRekey)(sqlite3_pcache*, sqlite3_pcache_page*, - unsigned oldKey, unsigned newKey); - void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); - void (*xDestroy)(sqlite3_pcache*); - void (*xShrink)(sqlite3_pcache*); -}; - -/* -** This is the obsolete pcache_methods object that has now been replaced -** by sqlite3_pcache_methods2. This object is not used by SQLite. It is -** retained in the header file for backwards compatibility only. -*/ -typedef struct sqlite3_pcache_methods sqlite3_pcache_methods; -struct sqlite3_pcache_methods { - void *pArg; - int (*xInit)(void*); - void (*xShutdown)(void*); - sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable); - void (*xCachesize)(sqlite3_pcache*, int nCachesize); - int (*xPagecount)(sqlite3_pcache*); - void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); - void (*xUnpin)(sqlite3_pcache*, void*, int discard); - void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey); - void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); - void (*xDestroy)(sqlite3_pcache*); -}; - - -/* -** CAPI3REF: Online Backup Object -** -** The sqlite3_backup object records state information about an ongoing -** online backup operation. ^The sqlite3_backup object is created by -** a call to [sqlite3_backup_init()] and is destroyed by a call to -** [sqlite3_backup_finish()]. -** -** See Also: [Using the SQLite Online Backup API] -*/ -typedef struct sqlite3_backup sqlite3_backup; - -/* -** CAPI3REF: Online Backup API. -** -** The backup API copies the content of one database into another. -** It is useful either for creating backups of databases or -** for copying in-memory databases to or from persistent files. -** -** See Also: [Using the SQLite Online Backup API] -** -** ^SQLite holds a write transaction open on the destination database file -** for the duration of the backup operation. -** ^The source database is read-locked only while it is being read; -** it is not locked continuously for the entire backup operation. -** ^Thus, the backup may be performed on a live source database without -** preventing other database connections from -** reading or writing to the source database while the backup is underway. -** -** ^(To perform a backup operation: -** <ol> -** <li><b>sqlite3_backup_init()</b> is called once to initialize the -** backup, -** <li><b>sqlite3_backup_step()</b> is called one or more times to transfer -** the data between the two databases, and finally -** <li><b>sqlite3_backup_finish()</b> is called to release all resources -** associated with the backup operation. -** </ol>)^ -** There should be exactly one call to sqlite3_backup_finish() for each -** successful call to sqlite3_backup_init(). -** -** [[sqlite3_backup_init()]] <b>sqlite3_backup_init()</b> -** -** ^The D and N arguments to sqlite3_backup_init(D,N,S,M) are the -** [database connection] associated with the destination database -** and the database name, respectively. -** ^The database name is "main" for the main database, "temp" for the -** temporary database, or the name specified after the AS keyword in -** an [ATTACH] statement for an attached database. -** ^The S and M arguments passed to -** sqlite3_backup_init(D,N,S,M) identify the [database connection] -** and database name of the source database, respectively. -** ^The source and destination [database connections] (parameters S and D) -** must be different or else sqlite3_backup_init(D,N,S,M) will fail with -** an error. -** -** ^A call to sqlite3_backup_init() will fail, returning NULL, if -** there is already a read or read-write transaction open on the -** destination database. -** -** ^If an error occurs within sqlite3_backup_init(D,N,S,M), then NULL is -** returned and an error code and error message are stored in the -** destination [database connection] D. -** ^The error code and message for the failed call to sqlite3_backup_init() -** can be retrieved using the [sqlite3_errcode()], [sqlite3_errmsg()], and/or -** [sqlite3_errmsg16()] functions. -** ^A successful call to sqlite3_backup_init() returns a pointer to an -** [sqlite3_backup] object. -** ^The [sqlite3_backup] object may be used with the sqlite3_backup_step() and -** sqlite3_backup_finish() functions to perform the specified backup -** operation. -** -** [[sqlite3_backup_step()]] <b>sqlite3_backup_step()</b> -** -** ^Function sqlite3_backup_step(B,N) will copy up to N pages between -** the source and destination databases specified by [sqlite3_backup] object B. -** ^If N is negative, all remaining source pages are copied. -** ^If sqlite3_backup_step(B,N) successfully copies N pages and there -** are still more pages to be copied, then the function returns [SQLITE_OK]. -** ^If sqlite3_backup_step(B,N) successfully finishes copying all pages -** from source to destination, then it returns [SQLITE_DONE]. -** ^If an error occurs while running sqlite3_backup_step(B,N), -** then an [error code] is returned. ^As well as [SQLITE_OK] and -** [SQLITE_DONE], a call to sqlite3_backup_step() may return [SQLITE_READONLY], -** [SQLITE_NOMEM], [SQLITE_BUSY], [SQLITE_LOCKED], or an -** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] extended error code. -** -** ^(The sqlite3_backup_step() might return [SQLITE_READONLY] if -** <ol> -** <li> the destination database was opened read-only, or -** <li> the destination database is using write-ahead-log journaling -** and the destination and source page sizes differ, or -** <li> the destination database is an in-memory database and the -** destination and source page sizes differ. -** </ol>)^ -** -** ^If sqlite3_backup_step() cannot obtain a required file-system lock, then -** the [sqlite3_busy_handler | busy-handler function] -** is invoked (if one is specified). ^If the -** busy-handler returns non-zero before the lock is available, then -** [SQLITE_BUSY] is returned to the caller. ^In this case the call to -** sqlite3_backup_step() can be retried later. ^If the source -** [database connection] -** is being used to write to the source database when sqlite3_backup_step() -** is called, then [SQLITE_LOCKED] is returned immediately. ^Again, in this -** case the call to sqlite3_backup_step() can be retried later on. ^(If -** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX], [SQLITE_NOMEM], or -** [SQLITE_READONLY] is returned, then -** there is no point in retrying the call to sqlite3_backup_step(). These -** errors are considered fatal.)^ The application must accept -** that the backup operation has failed and pass the backup operation handle -** to the sqlite3_backup_finish() to release associated resources. -** -** ^The first call to sqlite3_backup_step() obtains an exclusive lock -** on the destination file. ^The exclusive lock is not released until either -** sqlite3_backup_finish() is called or the backup operation is complete -** and sqlite3_backup_step() returns [SQLITE_DONE]. ^Every call to -** sqlite3_backup_step() obtains a [shared lock] on the source database that -** lasts for the duration of the sqlite3_backup_step() call. -** ^Because the source database is not locked between calls to -** sqlite3_backup_step(), the source database may be modified mid-way -** through the backup process. ^If the source database is modified by an -** external process or via a database connection other than the one being -** used by the backup operation, then the backup will be automatically -** restarted by the next call to sqlite3_backup_step(). ^If the source -** database is modified by the using the same database connection as is used -** by the backup operation, then the backup database is automatically -** updated at the same time. -** -** [[sqlite3_backup_finish()]] <b>sqlite3_backup_finish()</b> -** -** When sqlite3_backup_step() has returned [SQLITE_DONE], or when the -** application wishes to abandon the backup operation, the application -** should destroy the [sqlite3_backup] by passing it to sqlite3_backup_finish(). -** ^The sqlite3_backup_finish() interfaces releases all -** resources associated with the [sqlite3_backup] object. -** ^If sqlite3_backup_step() has not yet returned [SQLITE_DONE], then any -** active write-transaction on the destination database is rolled back. -** The [sqlite3_backup] object is invalid -** and may not be used following a call to sqlite3_backup_finish(). -** -** ^The value returned by sqlite3_backup_finish is [SQLITE_OK] if no -** sqlite3_backup_step() errors occurred, regardless or whether or not -** sqlite3_backup_step() completed. -** ^If an out-of-memory condition or IO error occurred during any prior -** sqlite3_backup_step() call on the same [sqlite3_backup] object, then -** sqlite3_backup_finish() returns the corresponding [error code]. -** -** ^A return of [SQLITE_BUSY] or [SQLITE_LOCKED] from sqlite3_backup_step() -** is not a permanent error and does not affect the return value of -** sqlite3_backup_finish(). -** -** [[sqlite3_backup_remaining()]] [[sqlite3_backup_pagecount()]] -** <b>sqlite3_backup_remaining() and sqlite3_backup_pagecount()</b> -** -** ^The sqlite3_backup_remaining() routine returns the number of pages still -** to be backed up at the conclusion of the most recent sqlite3_backup_step(). -** ^The sqlite3_backup_pagecount() routine returns the total number of pages -** in the source database at the conclusion of the most recent -** sqlite3_backup_step(). -** ^(The values returned by these functions are only updated by -** sqlite3_backup_step(). If the source database is modified in a way that -** changes the size of the source database or the number of pages remaining, -** those changes are not reflected in the output of sqlite3_backup_pagecount() -** and sqlite3_backup_remaining() until after the next -** sqlite3_backup_step().)^ -** -** <b>Concurrent Usage of Database Handles</b> -** -** ^The source [database connection] may be used by the application for other -** purposes while a backup operation is underway or being initialized. -** ^If SQLite is compiled and configured to support threadsafe database -** connections, then the source database connection may be used concurrently -** from within other threads. -** -** However, the application must guarantee that the destination -** [database connection] is not passed to any other API (by any thread) after -** sqlite3_backup_init() is called and before the corresponding call to -** sqlite3_backup_finish(). SQLite does not currently check to see -** if the application incorrectly accesses the destination [database connection] -** and so no error code is reported, but the operations may malfunction -** nevertheless. Use of the destination database connection while a -** backup is in progress might also also cause a mutex deadlock. -** -** If running in [shared cache mode], the application must -** guarantee that the shared cache used by the destination database -** is not accessed while the backup is running. In practice this means -** that the application must guarantee that the disk file being -** backed up to is not accessed by any connection within the process, -** not just the specific connection that was passed to sqlite3_backup_init(). -** -** The [sqlite3_backup] object itself is partially threadsafe. Multiple -** threads may safely make multiple concurrent calls to sqlite3_backup_step(). -** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount() -** APIs are not strictly speaking threadsafe. If they are invoked at the -** same time as another thread is invoking sqlite3_backup_step() it is -** possible that they return invalid values. -*/ -SQLITE_API sqlite3_backup *sqlite3_backup_init( - sqlite3 *pDest, /* Destination database handle */ - const char *zDestName, /* Destination database name */ - sqlite3 *pSource, /* Source database handle */ - const char *zSourceName /* Source database name */ -); -SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage); -SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p); -SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p); -SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p); - -/* -** CAPI3REF: Unlock Notification -** METHOD: sqlite3 -** -** ^When running in shared-cache mode, a database operation may fail with -** an [SQLITE_LOCKED] error if the required locks on the shared-cache or -** individual tables within the shared-cache cannot be obtained. See -** [SQLite Shared-Cache Mode] for a description of shared-cache locking. -** ^This API may be used to register a callback that SQLite will invoke -** when the connection currently holding the required lock relinquishes it. -** ^This API is only available if the library was compiled with the -** [SQLITE_ENABLE_UNLOCK_NOTIFY] C-preprocessor symbol defined. -** -** See Also: [Using the SQLite Unlock Notification Feature]. -** -** ^Shared-cache locks are released when a database connection concludes -** its current transaction, either by committing it or rolling it back. -** -** ^When a connection (known as the blocked connection) fails to obtain a -** shared-cache lock and SQLITE_LOCKED is returned to the caller, the -** identity of the database connection (the blocking connection) that -** has locked the required resource is stored internally. ^After an -** application receives an SQLITE_LOCKED error, it may call the -** sqlite3_unlock_notify() method with the blocked connection handle as -** the first argument to register for a callback that will be invoked -** when the blocking connections current transaction is concluded. ^The -** callback is invoked from within the [sqlite3_step] or [sqlite3_close] -** call that concludes the blocking connections transaction. -** -** ^(If sqlite3_unlock_notify() is called in a multi-threaded application, -** there is a chance that the blocking connection will have already -** concluded its transaction by the time sqlite3_unlock_notify() is invoked. -** If this happens, then the specified callback is invoked immediately, -** from within the call to sqlite3_unlock_notify().)^ -** -** ^If the blocked connection is attempting to obtain a write-lock on a -** shared-cache table, and more than one other connection currently holds -** a read-lock on the same table, then SQLite arbitrarily selects one of -** the other connections to use as the blocking connection. -** -** ^(There may be at most one unlock-notify callback registered by a -** blocked connection. If sqlite3_unlock_notify() is called when the -** blocked connection already has a registered unlock-notify callback, -** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is -** called with a NULL pointer as its second argument, then any existing -** unlock-notify callback is canceled. ^The blocked connections -** unlock-notify callback may also be canceled by closing the blocked -** connection using [sqlite3_close()]. -** -** The unlock-notify callback is not reentrant. If an application invokes -** any sqlite3_xxx API functions from within an unlock-notify callback, a -** crash or deadlock may be the result. -** -** ^Unless deadlock is detected (see below), sqlite3_unlock_notify() always -** returns SQLITE_OK. -** -** <b>Callback Invocation Details</b> -** -** When an unlock-notify callback is registered, the application provides a -** single void* pointer that is passed to the callback when it is invoked. -** However, the signature of the callback function allows SQLite to pass -** it an array of void* context pointers. The first argument passed to -** an unlock-notify callback is a pointer to an array of void* pointers, -** and the second is the number of entries in the array. -** -** When a blocking connections transaction is concluded, there may be -** more than one blocked connection that has registered for an unlock-notify -** callback. ^If two or more such blocked connections have specified the -** same callback function, then instead of invoking the callback function -** multiple times, it is invoked once with the set of void* context pointers -** specified by the blocked connections bundled together into an array. -** This gives the application an opportunity to prioritize any actions -** related to the set of unblocked database connections. -** -** <b>Deadlock Detection</b> -** -** Assuming that after registering for an unlock-notify callback a -** database waits for the callback to be issued before taking any further -** action (a reasonable assumption), then using this API may cause the -** application to deadlock. For example, if connection X is waiting for -** connection Y's transaction to be concluded, and similarly connection -** Y is waiting on connection X's transaction, then neither connection -** will proceed and the system may remain deadlocked indefinitely. -** -** To avoid this scenario, the sqlite3_unlock_notify() performs deadlock -** detection. ^If a given call to sqlite3_unlock_notify() would put the -** system in a deadlocked state, then SQLITE_LOCKED is returned and no -** unlock-notify callback is registered. The system is said to be in -** a deadlocked state if connection A has registered for an unlock-notify -** callback on the conclusion of connection B's transaction, and connection -** B has itself registered for an unlock-notify callback when connection -** A's transaction is concluded. ^Indirect deadlock is also detected, so -** the system is also considered to be deadlocked if connection B has -** registered for an unlock-notify callback on the conclusion of connection -** C's transaction, where connection C is waiting on connection A. ^Any -** number of levels of indirection are allowed. -** -** <b>The "DROP TABLE" Exception</b> -** -** When a call to [sqlite3_step()] returns SQLITE_LOCKED, it is almost -** always appropriate to call sqlite3_unlock_notify(). There is however, -** one exception. When executing a "DROP TABLE" or "DROP INDEX" statement, -** SQLite checks if there are any currently executing SELECT statements -** that belong to the same connection. If there are, SQLITE_LOCKED is -** returned. In this case there is no "blocking connection", so invoking -** sqlite3_unlock_notify() results in the unlock-notify callback being -** invoked immediately. If the application then re-attempts the "DROP TABLE" -** or "DROP INDEX" query, an infinite loop might be the result. -** -** One way around this problem is to check the extended error code returned -** by an sqlite3_step() call. ^(If there is a blocking connection, then the -** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in -** the special "DROP TABLE/INDEX" case, the extended error code is just -** SQLITE_LOCKED.)^ -*/ -SQLITE_API int sqlite3_unlock_notify( - sqlite3 *pBlocked, /* Waiting connection */ - void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */ - void *pNotifyArg /* Argument to pass to xNotify */ -); - - -/* -** CAPI3REF: String Comparison -** -** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications -** and extensions to compare the contents of two buffers containing UTF-8 -** strings in a case-independent fashion, using the same definition of "case -** independence" that SQLite uses internally when comparing identifiers. -*/ -SQLITE_API int sqlite3_stricmp(const char *, const char *); -SQLITE_API int sqlite3_strnicmp(const char *, const char *, int); - -/* -** CAPI3REF: String Globbing -* -** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if -** string X matches the [GLOB] pattern P. -** ^The definition of [GLOB] pattern matching used in -** [sqlite3_strglob(P,X)] is the same as for the "X GLOB P" operator in the -** SQL dialect understood by SQLite. ^The [sqlite3_strglob(P,X)] function -** is case sensitive. -** -** Note that this routine returns zero on a match and non-zero if the strings -** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. -** -** See also: [sqlite3_strlike()]. -*/ -SQLITE_API int sqlite3_strglob(const char *zGlob, const char *zStr); - -/* -** CAPI3REF: String LIKE Matching -* -** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if -** string X matches the [LIKE] pattern P with escape character E. -** ^The definition of [LIKE] pattern matching used in -** [sqlite3_strlike(P,X,E)] is the same as for the "X LIKE P ESCAPE E" -** operator in the SQL dialect understood by SQLite. ^For "X LIKE P" without -** the ESCAPE clause, set the E parameter of [sqlite3_strlike(P,X,E)] to 0. -** ^As with the LIKE operator, the [sqlite3_strlike(P,X,E)] function is case -** insensitive - equivalent upper and lower case ASCII characters match -** one another. -** -** ^The [sqlite3_strlike(P,X,E)] function matches Unicode characters, though -** only ASCII characters are case folded. -** -** Note that this routine returns zero on a match and non-zero if the strings -** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. -** -** See also: [sqlite3_strglob()]. -*/ -SQLITE_API int sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc); - -/* -** CAPI3REF: Error Logging Interface -** -** ^The [sqlite3_log()] interface writes a message into the [error log] -** established by the [SQLITE_CONFIG_LOG] option to [sqlite3_config()]. -** ^If logging is enabled, the zFormat string and subsequent arguments are -** used with [sqlite3_snprintf()] to generate the final output string. -** -** The sqlite3_log() interface is intended for use by extensions such as -** virtual tables, collating functions, and SQL functions. While there is -** nothing to prevent an application from calling sqlite3_log(), doing so -** is considered bad form. -** -** The zFormat string must not be NULL. -** -** To avoid deadlocks and other threading problems, the sqlite3_log() routine -** will not use dynamically allocated memory. The log message is stored in -** a fixed-length buffer on the stack. If the log message is longer than -** a few hundred characters, it will be truncated to the length of the -** buffer. -*/ -SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...); - -/* -** CAPI3REF: Write-Ahead Log Commit Hook -** METHOD: sqlite3 -** -** ^The [sqlite3_wal_hook()] function is used to register a callback that -** is invoked each time data is committed to a database in wal mode. -** -** ^(The callback is invoked by SQLite after the commit has taken place and -** the associated write-lock on the database released)^, so the implementation -** may read, write or [checkpoint] the database as required. -** -** ^The first parameter passed to the callback function when it is invoked -** is a copy of the third parameter passed to sqlite3_wal_hook() when -** registering the callback. ^The second is a copy of the database handle. -** ^The third parameter is the name of the database that was written to - -** either "main" or the name of an [ATTACH]-ed database. ^The fourth parameter -** is the number of pages currently in the write-ahead log file, -** including those that were just committed. -** -** The callback function should normally return [SQLITE_OK]. ^If an error -** code is returned, that error will propagate back up through the -** SQLite code base to cause the statement that provoked the callback -** to report an error, though the commit will have still occurred. If the -** callback returns [SQLITE_ROW] or [SQLITE_DONE], or if it returns a value -** that does not correspond to any valid SQLite error code, the results -** are undefined. -** -** A single database handle may have at most a single write-ahead log callback -** registered at one time. ^Calling [sqlite3_wal_hook()] replaces any -** previously registered write-ahead log callback. ^Note that the -** [sqlite3_wal_autocheckpoint()] interface and the -** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will -** overwrite any prior [sqlite3_wal_hook()] settings. -*/ -SQLITE_API void *sqlite3_wal_hook( - sqlite3*, - int(*)(void *,sqlite3*,const char*,int), - void* -); - -/* -** CAPI3REF: Configure an auto-checkpoint -** METHOD: sqlite3 -** -** ^The [sqlite3_wal_autocheckpoint(D,N)] is a wrapper around -** [sqlite3_wal_hook()] that causes any database on [database connection] D -** to automatically [checkpoint] -** after committing a transaction if there are N or -** more frames in the [write-ahead log] file. ^Passing zero or -** a negative value as the nFrame parameter disables automatic -** checkpoints entirely. -** -** ^The callback registered by this function replaces any existing callback -** registered using [sqlite3_wal_hook()]. ^Likewise, registering a callback -** using [sqlite3_wal_hook()] disables the automatic checkpoint mechanism -** configured by this function. -** -** ^The [wal_autocheckpoint pragma] can be used to invoke this interface -** from SQL. -** -** ^Checkpoints initiated by this mechanism are -** [sqlite3_wal_checkpoint_v2|PASSIVE]. -** -** ^Every new [database connection] defaults to having the auto-checkpoint -** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT] -** pages. The use of this interface -** is only necessary if the default setting is found to be suboptimal -** for a particular application. -*/ -SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N); - -/* -** CAPI3REF: Checkpoint a database -** METHOD: sqlite3 -** -** ^(The sqlite3_wal_checkpoint(D,X) is equivalent to -** [sqlite3_wal_checkpoint_v2](D,X,[SQLITE_CHECKPOINT_PASSIVE],0,0).)^ -** -** In brief, sqlite3_wal_checkpoint(D,X) causes the content in the -** [write-ahead log] for database X on [database connection] D to be -** transferred into the database file and for the write-ahead log to -** be reset. See the [checkpointing] documentation for addition -** information. -** -** This interface used to be the only way to cause a checkpoint to -** occur. But then the newer and more powerful [sqlite3_wal_checkpoint_v2()] -** interface was added. This interface is retained for backwards -** compatibility and as a convenience for applications that need to manually -** start a callback but which do not need the full power (and corresponding -** complication) of [sqlite3_wal_checkpoint_v2()]. -*/ -SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); - -/* -** CAPI3REF: Checkpoint a database -** METHOD: sqlite3 -** -** ^(The sqlite3_wal_checkpoint_v2(D,X,M,L,C) interface runs a checkpoint -** operation on database X of [database connection] D in mode M. Status -** information is written back into integers pointed to by L and C.)^ -** ^(The M parameter must be a valid [checkpoint mode]:)^ -** -** <dl> -** <dt>SQLITE_CHECKPOINT_PASSIVE<dd> -** ^Checkpoint as many frames as possible without waiting for any database -** readers or writers to finish, then sync the database file if all frames -** in the log were checkpointed. ^The [busy-handler callback] -** is never invoked in the SQLITE_CHECKPOINT_PASSIVE mode. -** ^On the other hand, passive mode might leave the checkpoint unfinished -** if there are concurrent readers or writers. -** -** <dt>SQLITE_CHECKPOINT_FULL<dd> -** ^This mode blocks (it invokes the -** [sqlite3_busy_handler|busy-handler callback]) until there is no -** database writer and all readers are reading from the most recent database -** snapshot. ^It then checkpoints all frames in the log file and syncs the -** database file. ^This mode blocks new database writers while it is pending, -** but new database readers are allowed to continue unimpeded. -** -** <dt>SQLITE_CHECKPOINT_RESTART<dd> -** ^This mode works the same way as SQLITE_CHECKPOINT_FULL with the addition -** that after checkpointing the log file it blocks (calls the -** [busy-handler callback]) -** until all readers are reading from the database file only. ^This ensures -** that the next writer will restart the log file from the beginning. -** ^Like SQLITE_CHECKPOINT_FULL, this mode blocks new -** database writer attempts while it is pending, but does not impede readers. -** -** <dt>SQLITE_CHECKPOINT_TRUNCATE<dd> -** ^This mode works the same way as SQLITE_CHECKPOINT_RESTART with the -** addition that it also truncates the log file to zero bytes just prior -** to a successful return. -** </dl> -** -** ^If pnLog is not NULL, then *pnLog is set to the total number of frames in -** the log file or to -1 if the checkpoint could not run because -** of an error or because the database is not in [WAL mode]. ^If pnCkpt is not -** NULL,then *pnCkpt is set to the total number of checkpointed frames in the -** log file (including any that were already checkpointed before the function -** was called) or to -1 if the checkpoint could not run due to an error or -** because the database is not in WAL mode. ^Note that upon successful -** completion of an SQLITE_CHECKPOINT_TRUNCATE, the log file will have been -** truncated to zero bytes and so both *pnLog and *pnCkpt will be set to zero. -** -** ^All calls obtain an exclusive "checkpoint" lock on the database file. ^If -** any other process is running a checkpoint operation at the same time, the -** lock cannot be obtained and SQLITE_BUSY is returned. ^Even if there is a -** busy-handler configured, it will not be invoked in this case. -** -** ^The SQLITE_CHECKPOINT_FULL, RESTART and TRUNCATE modes also obtain the -** exclusive "writer" lock on the database file. ^If the writer lock cannot be -** obtained immediately, and a busy-handler is configured, it is invoked and -** the writer lock retried until either the busy-handler returns 0 or the lock -** is successfully obtained. ^The busy-handler is also invoked while waiting for -** database readers as described above. ^If the busy-handler returns 0 before -** the writer lock is obtained or while waiting for database readers, the -** checkpoint operation proceeds from that point in the same way as -** SQLITE_CHECKPOINT_PASSIVE - checkpointing as many frames as possible -** without blocking any further. ^SQLITE_BUSY is returned in this case. -** -** ^If parameter zDb is NULL or points to a zero length string, then the -** specified operation is attempted on all WAL databases [attached] to -** [database connection] db. In this case the -** values written to output parameters *pnLog and *pnCkpt are undefined. ^If -** an SQLITE_BUSY error is encountered when processing one or more of the -** attached WAL databases, the operation is still attempted on any remaining -** attached databases and SQLITE_BUSY is returned at the end. ^If any other -** error occurs while processing an attached database, processing is abandoned -** and the error code is returned to the caller immediately. ^If no error -** (SQLITE_BUSY or otherwise) is encountered while processing the attached -** databases, SQLITE_OK is returned. -** -** ^If database zDb is the name of an attached database that is not in WAL -** mode, SQLITE_OK is returned and both *pnLog and *pnCkpt set to -1. ^If -** zDb is not NULL (or a zero length string) and is not the name of any -** attached database, SQLITE_ERROR is returned to the caller. -** -** ^Unless it returns SQLITE_MISUSE, -** the sqlite3_wal_checkpoint_v2() interface -** sets the error information that is queried by -** [sqlite3_errcode()] and [sqlite3_errmsg()]. -** -** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface -** from SQL. -*/ -SQLITE_API int sqlite3_wal_checkpoint_v2( - sqlite3 *db, /* Database handle */ - const char *zDb, /* Name of attached database (or NULL) */ - int eMode, /* SQLITE_CHECKPOINT_* value */ - int *pnLog, /* OUT: Size of WAL log in frames */ - int *pnCkpt /* OUT: Total number of frames checkpointed */ -); - -/* -** CAPI3REF: Checkpoint Mode Values -** KEYWORDS: {checkpoint mode} -** -** These constants define all valid values for the "checkpoint mode" passed -** as the third parameter to the [sqlite3_wal_checkpoint_v2()] interface. -** See the [sqlite3_wal_checkpoint_v2()] documentation for details on the -** meaning of each of these checkpoint modes. -*/ -#define SQLITE_CHECKPOINT_PASSIVE 0 /* Do as much as possible w/o blocking */ -#define SQLITE_CHECKPOINT_FULL 1 /* Wait for writers, then checkpoint */ -#define SQLITE_CHECKPOINT_RESTART 2 /* Like FULL but wait for for readers */ -#define SQLITE_CHECKPOINT_TRUNCATE 3 /* Like RESTART but also truncate WAL */ - -/* -** CAPI3REF: Virtual Table Interface Configuration -** -** This function may be called by either the [xConnect] or [xCreate] method -** of a [virtual table] implementation to configure -** various facets of the virtual table interface. -** -** If this interface is invoked outside the context of an xConnect or -** xCreate virtual table method then the behavior is undefined. -** -** At present, there is only one option that may be configured using -** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options -** may be added in the future. -*/ -SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...); - -/* -** CAPI3REF: Virtual Table Configuration Options -** -** These macros define the various options to the -** [sqlite3_vtab_config()] interface that [virtual table] implementations -** can use to customize and optimize their behavior. -** -** <dl> -** <dt>SQLITE_VTAB_CONSTRAINT_SUPPORT -** <dd>Calls of the form -** [sqlite3_vtab_config](db,SQLITE_VTAB_CONSTRAINT_SUPPORT,X) are supported, -** where X is an integer. If X is zero, then the [virtual table] whose -** [xCreate] or [xConnect] method invoked [sqlite3_vtab_config()] does not -** support constraints. In this configuration (which is the default) if -** a call to the [xUpdate] method returns [SQLITE_CONSTRAINT], then the entire -** statement is rolled back as if [ON CONFLICT | OR ABORT] had been -** specified as part of the users SQL statement, regardless of the actual -** ON CONFLICT mode specified. -** -** If X is non-zero, then the virtual table implementation guarantees -** that if [xUpdate] returns [SQLITE_CONSTRAINT], it will do so before -** any modifications to internal or persistent data structures have been made. -** If the [ON CONFLICT] mode is ABORT, FAIL, IGNORE or ROLLBACK, SQLite -** is able to roll back a statement or database transaction, and abandon -** or continue processing the current SQL statement as appropriate. -** If the ON CONFLICT mode is REPLACE and the [xUpdate] method returns -** [SQLITE_CONSTRAINT], SQLite handles this as if the ON CONFLICT mode -** had been ABORT. -** -** Virtual table implementations that are required to handle OR REPLACE -** must do so within the [xUpdate] method. If a call to the -** [sqlite3_vtab_on_conflict()] function indicates that the current ON -** CONFLICT policy is REPLACE, the virtual table implementation should -** silently replace the appropriate rows within the xUpdate callback and -** return SQLITE_OK. Or, if this is not possible, it may return -** SQLITE_CONSTRAINT, in which case SQLite falls back to OR ABORT -** constraint handling. -** </dl> -*/ -#define SQLITE_VTAB_CONSTRAINT_SUPPORT 1 - -/* -** CAPI3REF: Determine The Virtual Table Conflict Policy -** -** This function may only be called from within a call to the [xUpdate] method -** of a [virtual table] implementation for an INSERT or UPDATE operation. ^The -** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL], -** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode -** of the SQL statement that triggered the call to the [xUpdate] method of the -** [virtual table]. -*/ -SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *); - -/* -** CAPI3REF: Conflict resolution modes -** KEYWORDS: {conflict resolution mode} -** -** These constants are returned by [sqlite3_vtab_on_conflict()] to -** inform a [virtual table] implementation what the [ON CONFLICT] mode -** is for the SQL statement being evaluated. -** -** Note that the [SQLITE_IGNORE] constant is also used as a potential -** return value from the [sqlite3_set_authorizer()] callback and that -** [SQLITE_ABORT] is also a [result code]. -*/ -#define SQLITE_ROLLBACK 1 -/* #define SQLITE_IGNORE 2 // Also used by sqlite3_authorizer() callback */ -#define SQLITE_FAIL 3 -/* #define SQLITE_ABORT 4 // Also an error code */ -#define SQLITE_REPLACE 5 - -/* -** CAPI3REF: Prepared Statement Scan Status Opcodes -** KEYWORDS: {scanstatus options} -** -** The following constants can be used for the T parameter to the -** [sqlite3_stmt_scanstatus(S,X,T,V)] interface. Each constant designates a -** different metric for sqlite3_stmt_scanstatus() to return. -** -** When the value returned to V is a string, space to hold that string is -** managed by the prepared statement S and will be automatically freed when -** S is finalized. -** -** <dl> -** [[SQLITE_SCANSTAT_NLOOP]] <dt>SQLITE_SCANSTAT_NLOOP</dt> -** <dd>^The [sqlite3_int64] variable pointed to by the T parameter will be -** set to the total number of times that the X-th loop has run.</dd> -** -** [[SQLITE_SCANSTAT_NVISIT]] <dt>SQLITE_SCANSTAT_NVISIT</dt> -** <dd>^The [sqlite3_int64] variable pointed to by the T parameter will be set -** to the total number of rows examined by all iterations of the X-th loop.</dd> -** -** [[SQLITE_SCANSTAT_EST]] <dt>SQLITE_SCANSTAT_EST</dt> -** <dd>^The "double" variable pointed to by the T parameter will be set to the -** query planner's estimate for the average number of rows output from each -** iteration of the X-th loop. If the query planner's estimates was accurate, -** then this value will approximate the quotient NVISIT/NLOOP and the -** product of this value for all prior loops with the same SELECTID will -** be the NLOOP value for the current loop. -** -** [[SQLITE_SCANSTAT_NAME]] <dt>SQLITE_SCANSTAT_NAME</dt> -** <dd>^The "const char *" variable pointed to by the T parameter will be set -** to a zero-terminated UTF-8 string containing the name of the index or table -** used for the X-th loop. -** -** [[SQLITE_SCANSTAT_EXPLAIN]] <dt>SQLITE_SCANSTAT_EXPLAIN</dt> -** <dd>^The "const char *" variable pointed to by the T parameter will be set -** to a zero-terminated UTF-8 string containing the [EXPLAIN QUERY PLAN] -** description for the X-th loop. -** -** [[SQLITE_SCANSTAT_SELECTID]] <dt>SQLITE_SCANSTAT_SELECT</dt> -** <dd>^The "int" variable pointed to by the T parameter will be set to the -** "select-id" for the X-th loop. The select-id identifies which query or -** subquery the loop is part of. The main query has a select-id of zero. -** The select-id is the same value as is output in the first column -** of an [EXPLAIN QUERY PLAN] query. -** </dl> -*/ -#define SQLITE_SCANSTAT_NLOOP 0 -#define SQLITE_SCANSTAT_NVISIT 1 -#define SQLITE_SCANSTAT_EST 2 -#define SQLITE_SCANSTAT_NAME 3 -#define SQLITE_SCANSTAT_EXPLAIN 4 -#define SQLITE_SCANSTAT_SELECTID 5 - -/* -** CAPI3REF: Prepared Statement Scan Status -** METHOD: sqlite3_stmt -** -** This interface returns information about the predicted and measured -** performance for pStmt. Advanced applications can use this -** interface to compare the predicted and the measured performance and -** issue warnings and/or rerun [ANALYZE] if discrepancies are found. -** -** Since this interface is expected to be rarely used, it is only -** available if SQLite is compiled using the [SQLITE_ENABLE_STMT_SCANSTATUS] -** compile-time option. -** -** The "iScanStatusOp" parameter determines which status information to return. -** The "iScanStatusOp" must be one of the [scanstatus options] or the behavior -** of this interface is undefined. -** ^The requested measurement is written into a variable pointed to by -** the "pOut" parameter. -** Parameter "idx" identifies the specific loop to retrieve statistics for. -** Loops are numbered starting from zero. ^If idx is out of range - less than -** zero or greater than or equal to the total number of loops used to implement -** the statement - a non-zero value is returned and the variable that pOut -** points to is unchanged. -** -** ^Statistics might not be available for all loops in all statements. ^In cases -** where there exist loops with no available statistics, this function behaves -** as if the loop did not exist - it returns non-zero and leave the variable -** that pOut points to unchanged. -** -** See also: [sqlite3_stmt_scanstatus_reset()] -*/ -SQLITE_API int sqlite3_stmt_scanstatus( - sqlite3_stmt *pStmt, /* Prepared statement for which info desired */ - int idx, /* Index of loop to report on */ - int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ - void *pOut /* Result written here */ -); - -/* -** CAPI3REF: Zero Scan-Status Counters -** METHOD: sqlite3_stmt -** -** ^Zero all [sqlite3_stmt_scanstatus()] related event counters. -** -** This API is only available if the library is built with pre-processor -** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined. -*/ -SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); - -/* -** CAPI3REF: Flush caches to disk mid-transaction -** -** ^If a write-transaction is open on [database connection] D when the -** [sqlite3_db_cacheflush(D)] interface invoked, any dirty -** pages in the pager-cache that are not currently in use are written out -** to disk. A dirty page may be in use if a database cursor created by an -** active SQL statement is reading from it, or if it is page 1 of a database -** file (page 1 is always "in use"). ^The [sqlite3_db_cacheflush(D)] -** interface flushes caches for all schemas - "main", "temp", and -** any [attached] databases. -** -** ^If this function needs to obtain extra database locks before dirty pages -** can be flushed to disk, it does so. ^If those locks cannot be obtained -** immediately and there is a busy-handler callback configured, it is invoked -** in the usual manner. ^If the required lock still cannot be obtained, then -** the database is skipped and an attempt made to flush any dirty pages -** belonging to the next (if any) database. ^If any databases are skipped -** because locks cannot be obtained, but no other error occurs, this -** function returns SQLITE_BUSY. -** -** ^If any other error occurs while flushing dirty pages to disk (for -** example an IO error or out-of-memory condition), then processing is -** abandoned and an SQLite [error code] is returned to the caller immediately. -** -** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK. -** -** ^This function does not set the database handle error code or message -** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions. -*/ -SQLITE_API int sqlite3_db_cacheflush(sqlite3*); - -/* -** CAPI3REF: The pre-update hook. -** -** ^These interfaces are only available if SQLite is compiled using the -** [SQLITE_ENABLE_PREUPDATE_HOOK] compile-time option. -** -** ^The [sqlite3_preupdate_hook()] interface registers a callback function -** that is invoked prior to each [INSERT], [UPDATE], and [DELETE] operation -** on a [rowid table]. -** ^At most one preupdate hook may be registered at a time on a single -** [database connection]; each call to [sqlite3_preupdate_hook()] overrides -** the previous setting. -** ^The preupdate hook is disabled by invoking [sqlite3_preupdate_hook()] -** with a NULL pointer as the second parameter. -** ^The third parameter to [sqlite3_preupdate_hook()] is passed through as -** the first parameter to callbacks. -** -** ^The preupdate hook only fires for changes to [rowid tables]; the preupdate -** hook is not invoked for changes to [virtual tables] or [WITHOUT ROWID] -** tables. -** -** ^The second parameter to the preupdate callback is a pointer to -** the [database connection] that registered the preupdate hook. -** ^The third parameter to the preupdate callback is one of the constants -** [SQLITE_INSERT], [SQLITE_DELETE], or [SQLITE_UPDATE] to identify the -** kind of update operation that is about to occur. -** ^(The fourth parameter to the preupdate callback is the name of the -** database within the database connection that is being modified. This -** will be "main" for the main database or "temp" for TEMP tables or -** the name given after the AS keyword in the [ATTACH] statement for attached -** databases.)^ -** ^The fifth parameter to the preupdate callback is the name of the -** table that is being modified. -** ^The sixth parameter to the preupdate callback is the initial [rowid] of the -** row being changes for SQLITE_UPDATE and SQLITE_DELETE changes and is -** undefined for SQLITE_INSERT changes. -** ^The seventh parameter to the preupdate callback is the final [rowid] of -** the row being changed for SQLITE_UPDATE and SQLITE_INSERT changes and is -** undefined for SQLITE_DELETE changes. -** -** The [sqlite3_preupdate_old()], [sqlite3_preupdate_new()], -** [sqlite3_preupdate_count()], and [sqlite3_preupdate_depth()] interfaces -** provide additional information about a preupdate event. These routines -** may only be called from within a preupdate callback. Invoking any of -** these routines from outside of a preupdate callback or with a -** [database connection] pointer that is different from the one supplied -** to the preupdate callback results in undefined and probably undesirable -** behavior. -** -** ^The [sqlite3_preupdate_count(D)] interface returns the number of columns -** in the row that is being inserted, updated, or deleted. -** -** ^The [sqlite3_preupdate_old(D,N,P)] interface writes into P a pointer to -** a [protected sqlite3_value] that contains the value of the Nth column of -** the table row before it is updated. The N parameter must be between 0 -** and one less than the number of columns or the behavior will be -** undefined. This must only be used within SQLITE_UPDATE and SQLITE_DELETE -** preupdate callbacks; if it is used by an SQLITE_INSERT callback then the -** behavior is undefined. The [sqlite3_value] that P points to -** will be destroyed when the preupdate callback returns. -** -** ^The [sqlite3_preupdate_new(D,N,P)] interface writes into P a pointer to -** a [protected sqlite3_value] that contains the value of the Nth column of -** the table row after it is updated. The N parameter must be between 0 -** and one less than the number of columns or the behavior will be -** undefined. This must only be used within SQLITE_INSERT and SQLITE_UPDATE -** preupdate callbacks; if it is used by an SQLITE_DELETE callback then the -** behavior is undefined. The [sqlite3_value] that P points to -** will be destroyed when the preupdate callback returns. -** -** ^The [sqlite3_preupdate_depth(D)] interface returns 0 if the preupdate -** callback was invoked as a result of a direct insert, update, or delete -** operation; or 1 for inserts, updates, or deletes invoked by top-level -** triggers; or 2 for changes resulting from triggers called by top-level -** triggers; and so forth. -** -** See also: [sqlite3_update_hook()] -*/ -SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_preupdate_hook( - sqlite3 *db, - void(*xPreUpdate)( - void *pCtx, /* Copy of third arg to preupdate_hook() */ - sqlite3 *db, /* Database handle */ - int op, /* SQLITE_UPDATE, DELETE or INSERT */ - char const *zDb, /* Database name */ - char const *zName, /* Table name */ - sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */ - sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */ - ), - void* -); -SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **); -SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_count(sqlite3 *); -SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_depth(sqlite3 *); -SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **); - -/* -** CAPI3REF: Low-level system error code -** -** ^Attempt to return the underlying operating system error code or error -** number that caused the most recent I/O error or failure to open a file. -** The return value is OS-dependent. For example, on unix systems, after -** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be -** called to get back the underlying "errno" that caused the problem, such -** as ENOSPC, EAUTH, EISDIR, and so forth. -*/ -SQLITE_API int sqlite3_system_errno(sqlite3*); - -/* -** CAPI3REF: Database Snapshot -** KEYWORDS: {snapshot} -** EXPERIMENTAL -** -** An instance of the snapshot object records the state of a [WAL mode] -** database for some specific point in history. -** -** In [WAL mode], multiple [database connections] that are open on the -** same database file can each be reading a different historical version -** of the database file. When a [database connection] begins a read -** transaction, that connection sees an unchanging copy of the database -** as it existed for the point in time when the transaction first started. -** Subsequent changes to the database from other connections are not seen -** by the reader until a new read transaction is started. -** -** The sqlite3_snapshot object records state information about an historical -** version of the database file so that it is possible to later open a new read -** transaction that sees that historical version of the database rather than -** the most recent version. -** -** The constructor for this object is [sqlite3_snapshot_get()]. The -** [sqlite3_snapshot_open()] method causes a fresh read transaction to refer -** to an historical snapshot (if possible). The destructor for -** sqlite3_snapshot objects is [sqlite3_snapshot_free()]. -*/ -typedef struct sqlite3_snapshot sqlite3_snapshot; - -/* -** CAPI3REF: Record A Database Snapshot -** EXPERIMENTAL -** -** ^The [sqlite3_snapshot_get(D,S,P)] interface attempts to make a -** new [sqlite3_snapshot] object that records the current state of -** schema S in database connection D. ^On success, the -** [sqlite3_snapshot_get(D,S,P)] interface writes a pointer to the newly -** created [sqlite3_snapshot] object into *P and returns SQLITE_OK. -** ^If schema S of [database connection] D is not a [WAL mode] database -** that is in a read transaction, then [sqlite3_snapshot_get(D,S,P)] -** leaves the *P value unchanged and returns an appropriate [error code]. -** -** The [sqlite3_snapshot] object returned from a successful call to -** [sqlite3_snapshot_get()] must be freed using [sqlite3_snapshot_free()] -** to avoid a memory leak. -** -** The [sqlite3_snapshot_get()] interface is only available when the -** SQLITE_ENABLE_SNAPSHOT compile-time option is used. -*/ -SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get( - sqlite3 *db, - const char *zSchema, - sqlite3_snapshot **ppSnapshot -); - -/* -** CAPI3REF: Start a read transaction on an historical snapshot -** EXPERIMENTAL -** -** ^The [sqlite3_snapshot_open(D,S,P)] interface starts a -** read transaction for schema S of -** [database connection] D such that the read transaction -** refers to historical [snapshot] P, rather than the most -** recent change to the database. -** ^The [sqlite3_snapshot_open()] interface returns SQLITE_OK on success -** or an appropriate [error code] if it fails. -** -** ^In order to succeed, a call to [sqlite3_snapshot_open(D,S,P)] must be -** the first operation following the [BEGIN] that takes the schema S -** out of [autocommit mode]. -** ^In other words, schema S must not currently be in -** a transaction for [sqlite3_snapshot_open(D,S,P)] to work, but the -** database connection D must be out of [autocommit mode]. -** ^A [snapshot] will fail to open if it has been overwritten by a -** [checkpoint]. -** ^(A call to [sqlite3_snapshot_open(D,S,P)] will fail if the -** database connection D does not know that the database file for -** schema S is in [WAL mode]. A database connection might not know -** that the database file is in [WAL mode] if there has been no prior -** I/O on that database connection, or if the database entered [WAL mode] -** after the most recent I/O on the database connection.)^ -** (Hint: Run "[PRAGMA application_id]" against a newly opened -** database connection in order to make it ready to use snapshots.) -** -** The [sqlite3_snapshot_open()] interface is only available when the -** SQLITE_ENABLE_SNAPSHOT compile-time option is used. -*/ -SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_open( - sqlite3 *db, - const char *zSchema, - sqlite3_snapshot *pSnapshot -); - -/* -** CAPI3REF: Destroy a snapshot -** EXPERIMENTAL -** -** ^The [sqlite3_snapshot_free(P)] interface destroys [sqlite3_snapshot] P. -** The application must eventually free every [sqlite3_snapshot] object -** using this routine to avoid a memory leak. -** -** The [sqlite3_snapshot_free()] interface is only available when the -** SQLITE_ENABLE_SNAPSHOT compile-time option is used. -*/ -SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*); - -/* -** CAPI3REF: Compare the ages of two snapshot handles. -** EXPERIMENTAL -** -** The sqlite3_snapshot_cmp(P1, P2) interface is used to compare the ages -** of two valid snapshot handles. -** -** If the two snapshot handles are not associated with the same database -** file, the result of the comparison is undefined. -** -** Additionally, the result of the comparison is only valid if both of the -** snapshot handles were obtained by calling sqlite3_snapshot_get() since the -** last time the wal file was deleted. The wal file is deleted when the -** database is changed back to rollback mode or when the number of database -** clients drops to zero. If either snapshot handle was obtained before the -** wal file was last deleted, the value returned by this function -** is undefined. -** -** Otherwise, this API returns a negative value if P1 refers to an older -** snapshot than P2, zero if the two handles refer to the same database -** snapshot, and a positive value if P1 is a newer snapshot than P2. -*/ -SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp( - sqlite3_snapshot *p1, - sqlite3_snapshot *p2 -); - -/* -** Undo the hack that converts floating point types to integer for -** builds on processors without floating point support. -*/ -#ifdef SQLITE_OMIT_FLOATING_POINT -# undef double -#endif - -#ifdef __cplusplus -} /* End of the 'extern "C"' block */ -#endif -#endif /* SQLITE3_H */ - -/******** Begin file sqlite3rtree.h *********/ -/* -** 2010 August 30 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -*/ - -#ifndef _SQLITE3RTREE_H_ -#define _SQLITE3RTREE_H_ - - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct sqlite3_rtree_geometry sqlite3_rtree_geometry; -typedef struct sqlite3_rtree_query_info sqlite3_rtree_query_info; - -/* The double-precision datatype used by RTree depends on the -** SQLITE_RTREE_INT_ONLY compile-time option. -*/ -#ifdef SQLITE_RTREE_INT_ONLY - typedef sqlite3_int64 sqlite3_rtree_dbl; -#else - typedef double sqlite3_rtree_dbl; -#endif - -/* -** Register a geometry callback named zGeom that can be used as part of an -** R-Tree geometry query as follows: -** -** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...) -*/ -SQLITE_API int sqlite3_rtree_geometry_callback( - sqlite3 *db, - const char *zGeom, - int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*), - void *pContext -); - - -/* -** A pointer to a structure of the following type is passed as the first -** argument to callbacks registered using rtree_geometry_callback(). -*/ -struct sqlite3_rtree_geometry { - void *pContext; /* Copy of pContext passed to s_r_g_c() */ - int nParam; /* Size of array aParam[] */ - sqlite3_rtree_dbl *aParam; /* Parameters passed to SQL geom function */ - void *pUser; /* Callback implementation user data */ - void (*xDelUser)(void *); /* Called by SQLite to clean up pUser */ -}; - -/* -** Register a 2nd-generation geometry callback named zScore that can be -** used as part of an R-Tree geometry query as follows: -** -** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...) -*/ -SQLITE_API int sqlite3_rtree_query_callback( - sqlite3 *db, - const char *zQueryFunc, - int (*xQueryFunc)(sqlite3_rtree_query_info*), - void *pContext, - void (*xDestructor)(void*) -); - - -/* -** A pointer to a structure of the following type is passed as the -** argument to scored geometry callback registered using -** sqlite3_rtree_query_callback(). -** -** Note that the first 5 fields of this structure are identical to -** sqlite3_rtree_geometry. This structure is a subclass of -** sqlite3_rtree_geometry. -*/ -struct sqlite3_rtree_query_info { - void *pContext; /* pContext from when function registered */ - int nParam; /* Number of function parameters */ - sqlite3_rtree_dbl *aParam; /* value of function parameters */ - void *pUser; /* callback can use this, if desired */ - void (*xDelUser)(void*); /* function to free pUser */ - sqlite3_rtree_dbl *aCoord; /* Coordinates of node or entry to check */ - unsigned int *anQueue; /* Number of pending entries in the queue */ - int nCoord; /* Number of coordinates */ - int iLevel; /* Level of current node or entry */ - int mxLevel; /* The largest iLevel value in the tree */ - sqlite3_int64 iRowid; /* Rowid for current entry */ - sqlite3_rtree_dbl rParentScore; /* Score of parent node */ - int eParentWithin; /* Visibility of parent node */ - int eWithin; /* OUT: Visiblity */ - sqlite3_rtree_dbl rScore; /* OUT: Write the score here */ - /* The following fields are only available in 3.8.11 and later */ - sqlite3_value **apSqlParam; /* Original SQL values of parameters */ -}; - -/* -** Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. -*/ -#define NOT_WITHIN 0 /* Object completely outside of query region */ -#define PARTLY_WITHIN 1 /* Object partially overlaps query region */ -#define FULLY_WITHIN 2 /* Object fully contained within query region */ - - -#ifdef __cplusplus -} /* end of the 'extern "C"' block */ -#endif - -#endif /* ifndef _SQLITE3RTREE_H_ */ - -/******** End of sqlite3rtree.h *********/ -/******** Begin file sqlite3session.h *********/ - -#if !defined(__SQLITESESSION_H_) && defined(SQLITE_ENABLE_SESSION) -#define __SQLITESESSION_H_ 1 - -/* -** Make sure we can call this stuff from C++. -*/ -#ifdef __cplusplus -extern "C" { -#endif - - -/* -** CAPI3REF: Session Object Handle -*/ -typedef struct sqlite3_session sqlite3_session; - -/* -** CAPI3REF: Changeset Iterator Handle -*/ -typedef struct sqlite3_changeset_iter sqlite3_changeset_iter; - -/* -** CAPI3REF: Create A New Session Object -** -** Create a new session object attached to database handle db. If successful, -** a pointer to the new object is written to *ppSession and SQLITE_OK is -** returned. If an error occurs, *ppSession is set to NULL and an SQLite -** error code (e.g. SQLITE_NOMEM) is returned. -** -** It is possible to create multiple session objects attached to a single -** database handle. -** -** Session objects created using this function should be deleted using the -** [sqlite3session_delete()] function before the database handle that they -** are attached to is itself closed. If the database handle is closed before -** the session object is deleted, then the results of calling any session -** module function, including [sqlite3session_delete()] on the session object -** are undefined. -** -** Because the session module uses the [sqlite3_preupdate_hook()] API, it -** is not possible for an application to register a pre-update hook on a -** database handle that has one or more session objects attached. Nor is -** it possible to create a session object attached to a database handle for -** which a pre-update hook is already defined. The results of attempting -** either of these things are undefined. -** -** The session object will be used to create changesets for tables in -** database zDb, where zDb is either "main", or "temp", or the name of an -** attached database. It is not an error if database zDb is not attached -** to the database when the session object is created. -*/ -int sqlite3session_create( - sqlite3 *db, /* Database handle */ - const char *zDb, /* Name of db (e.g. "main") */ - sqlite3_session **ppSession /* OUT: New session object */ -); - -/* -** CAPI3REF: Delete A Session Object -** -** Delete a session object previously allocated using -** [sqlite3session_create()]. Once a session object has been deleted, the -** results of attempting to use pSession with any other session module -** function are undefined. -** -** Session objects must be deleted before the database handle to which they -** are attached is closed. Refer to the documentation for -** [sqlite3session_create()] for details. -*/ -void sqlite3session_delete(sqlite3_session *pSession); - - -/* -** CAPI3REF: Enable Or Disable A Session Object -** -** Enable or disable the recording of changes by a session object. When -** enabled, a session object records changes made to the database. When -** disabled - it does not. A newly created session object is enabled. -** Refer to the documentation for [sqlite3session_changeset()] for further -** details regarding how enabling and disabling a session object affects -** the eventual changesets. -** -** Passing zero to this function disables the session. Passing a value -** greater than zero enables it. Passing a value less than zero is a -** no-op, and may be used to query the current state of the session. -** -** The return value indicates the final state of the session object: 0 if -** the session is disabled, or 1 if it is enabled. -*/ -int sqlite3session_enable(sqlite3_session *pSession, int bEnable); - -/* -** CAPI3REF: Set Or Clear the Indirect Change Flag -** -** Each change recorded by a session object is marked as either direct or -** indirect. A change is marked as indirect if either: -** -** <ul> -** <li> The session object "indirect" flag is set when the change is -** made, or -** <li> The change is made by an SQL trigger or foreign key action -** instead of directly as a result of a users SQL statement. -** </ul> -** -** If a single row is affected by more than one operation within a session, -** then the change is considered indirect if all operations meet the criteria -** for an indirect change above, or direct otherwise. -** -** This function is used to set, clear or query the session object indirect -** flag. If the second argument passed to this function is zero, then the -** indirect flag is cleared. If it is greater than zero, the indirect flag -** is set. Passing a value less than zero does not modify the current value -** of the indirect flag, and may be used to query the current state of the -** indirect flag for the specified session object. -** -** The return value indicates the final state of the indirect flag: 0 if -** it is clear, or 1 if it is set. -*/ -int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect); - -/* -** CAPI3REF: Attach A Table To A Session Object -** -** If argument zTab is not NULL, then it is the name of a table to attach -** to the session object passed as the first argument. All subsequent changes -** made to the table while the session object is enabled will be recorded. See -** documentation for [sqlite3session_changeset()] for further details. -** -** Or, if argument zTab is NULL, then changes are recorded for all tables -** in the database. If additional tables are added to the database (by -** executing "CREATE TABLE" statements) after this call is made, changes for -** the new tables are also recorded. -** -** Changes can only be recorded for tables that have a PRIMARY KEY explicitly -** defined as part of their CREATE TABLE statement. It does not matter if the -** PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) or not. The PRIMARY -** KEY may consist of a single column, or may be a composite key. -** -** It is not an error if the named table does not exist in the database. Nor -** is it an error if the named table does not have a PRIMARY KEY. However, -** no changes will be recorded in either of these scenarios. -** -** Changes are not recorded for individual rows that have NULL values stored -** in one or more of their PRIMARY KEY columns. -** -** SQLITE_OK is returned if the call completes without error. Or, if an error -** occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned. -*/ -int sqlite3session_attach( - sqlite3_session *pSession, /* Session object */ - const char *zTab /* Table name */ -); - -/* -** CAPI3REF: Set a table filter on a Session Object. -** -** The second argument (xFilter) is the "filter callback". For changes to rows -** in tables that are not attached to the Session object, the filter is called -** to determine whether changes to the table's rows should be tracked or not. -** If xFilter returns 0, changes is not tracked. Note that once a table is -** attached, xFilter will not be called again. -*/ -void sqlite3session_table_filter( - sqlite3_session *pSession, /* Session object */ - int(*xFilter)( - void *pCtx, /* Copy of third arg to _filter_table() */ - const char *zTab /* Table name */ - ), - void *pCtx /* First argument passed to xFilter */ -); - -/* -** CAPI3REF: Generate A Changeset From A Session Object -** -** Obtain a changeset containing changes to the tables attached to the -** session object passed as the first argument. If successful, -** set *ppChangeset to point to a buffer containing the changeset -** and *pnChangeset to the size of the changeset in bytes before returning -** SQLITE_OK. If an error occurs, set both *ppChangeset and *pnChangeset to -** zero and return an SQLite error code. -** -** A changeset consists of zero or more INSERT, UPDATE and/or DELETE changes, -** each representing a change to a single row of an attached table. An INSERT -** change contains the values of each field of a new database row. A DELETE -** contains the original values of each field of a deleted database row. An -** UPDATE change contains the original values of each field of an updated -** database row along with the updated values for each updated non-primary-key -** column. It is not possible for an UPDATE change to represent a change that -** modifies the values of primary key columns. If such a change is made, it -** is represented in a changeset as a DELETE followed by an INSERT. -** -** Changes are not recorded for rows that have NULL values stored in one or -** more of their PRIMARY KEY columns. If such a row is inserted or deleted, -** no corresponding change is present in the changesets returned by this -** function. If an existing row with one or more NULL values stored in -** PRIMARY KEY columns is updated so that all PRIMARY KEY columns are non-NULL, -** only an INSERT is appears in the changeset. Similarly, if an existing row -** with non-NULL PRIMARY KEY values is updated so that one or more of its -** PRIMARY KEY columns are set to NULL, the resulting changeset contains a -** DELETE change only. -** -** The contents of a changeset may be traversed using an iterator created -** using the [sqlite3changeset_start()] API. A changeset may be applied to -** a database with a compatible schema using the [sqlite3changeset_apply()] -** API. -** -** Within a changeset generated by this function, all changes related to a -** single table are grouped together. In other words, when iterating through -** a changeset or when applying a changeset to a database, all changes related -** to a single table are processed before moving on to the next table. Tables -** are sorted in the same order in which they were attached (or auto-attached) -** to the sqlite3_session object. The order in which the changes related to -** a single table are stored is undefined. -** -** Following a successful call to this function, it is the responsibility of -** the caller to eventually free the buffer that *ppChangeset points to using -** [sqlite3_free()]. -** -** <h3>Changeset Generation</h3> -** -** Once a table has been attached to a session object, the session object -** records the primary key values of all new rows inserted into the table. -** It also records the original primary key and other column values of any -** deleted or updated rows. For each unique primary key value, data is only -** recorded once - the first time a row with said primary key is inserted, -** updated or deleted in the lifetime of the session. -** -** There is one exception to the previous paragraph: when a row is inserted, -** updated or deleted, if one or more of its primary key columns contain a -** NULL value, no record of the change is made. -** -** The session object therefore accumulates two types of records - those -** that consist of primary key values only (created when the user inserts -** a new record) and those that consist of the primary key values and the -** original values of other table columns (created when the users deletes -** or updates a record). -** -** When this function is called, the requested changeset is created using -** both the accumulated records and the current contents of the database -** file. Specifically: -** -** <ul> -** <li> For each record generated by an insert, the database is queried -** for a row with a matching primary key. If one is found, an INSERT -** change is added to the changeset. If no such row is found, no change -** is added to the changeset. -** -** <li> For each record generated by an update or delete, the database is -** queried for a row with a matching primary key. If such a row is -** found and one or more of the non-primary key fields have been -** modified from their original values, an UPDATE change is added to -** the changeset. Or, if no such row is found in the table, a DELETE -** change is added to the changeset. If there is a row with a matching -** primary key in the database, but all fields contain their original -** values, no change is added to the changeset. -** </ul> -** -** This means, amongst other things, that if a row is inserted and then later -** deleted while a session object is active, neither the insert nor the delete -** will be present in the changeset. Or if a row is deleted and then later a -** row with the same primary key values inserted while a session object is -** active, the resulting changeset will contain an UPDATE change instead of -** a DELETE and an INSERT. -** -** When a session object is disabled (see the [sqlite3session_enable()] API), -** it does not accumulate records when rows are inserted, updated or deleted. -** This may appear to have some counter-intuitive effects if a single row -** is written to more than once during a session. For example, if a row -** is inserted while a session object is enabled, then later deleted while -** the same session object is disabled, no INSERT record will appear in the -** changeset, even though the delete took place while the session was disabled. -** Or, if one field of a row is updated while a session is disabled, and -** another field of the same row is updated while the session is enabled, the -** resulting changeset will contain an UPDATE change that updates both fields. -*/ -int sqlite3session_changeset( - sqlite3_session *pSession, /* Session object */ - int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */ - void **ppChangeset /* OUT: Buffer containing changeset */ -); - -/* -** CAPI3REF: Load The Difference Between Tables Into A Session -** -** If it is not already attached to the session object passed as the first -** argument, this function attaches table zTbl in the same manner as the -** [sqlite3session_attach()] function. If zTbl does not exist, or if it -** does not have a primary key, this function is a no-op (but does not return -** an error). -** -** Argument zFromDb must be the name of a database ("main", "temp" etc.) -** attached to the same database handle as the session object that contains -** a table compatible with the table attached to the session by this function. -** A table is considered compatible if it: -** -** <ul> -** <li> Has the same name, -** <li> Has the same set of columns declared in the same order, and -** <li> Has the same PRIMARY KEY definition. -** </ul> -** -** If the tables are not compatible, SQLITE_SCHEMA is returned. If the tables -** are compatible but do not have any PRIMARY KEY columns, it is not an error -** but no changes are added to the session object. As with other session -** APIs, tables without PRIMARY KEYs are simply ignored. -** -** This function adds a set of changes to the session object that could be -** used to update the table in database zFrom (call this the "from-table") -** so that its content is the same as the table attached to the session -** object (call this the "to-table"). Specifically: -** -** <ul> -** <li> For each row (primary key) that exists in the to-table but not in -** the from-table, an INSERT record is added to the session object. -** -** <li> For each row (primary key) that exists in the to-table but not in -** the from-table, a DELETE record is added to the session object. -** -** <li> For each row (primary key) that exists in both tables, but features -** different in each, an UPDATE record is added to the session. -** </ul> -** -** To clarify, if this function is called and then a changeset constructed -** using [sqlite3session_changeset()], then after applying that changeset to -** database zFrom the contents of the two compatible tables would be -** identical. -** -** It an error if database zFrom does not exist or does not contain the -** required compatible table. -** -** If the operation successful, SQLITE_OK is returned. Otherwise, an SQLite -** error code. In this case, if argument pzErrMsg is not NULL, *pzErrMsg -** may be set to point to a buffer containing an English language error -** message. It is the responsibility of the caller to free this buffer using -** sqlite3_free(). -*/ -int sqlite3session_diff( - sqlite3_session *pSession, - const char *zFromDb, - const char *zTbl, - char **pzErrMsg -); - - -/* -** CAPI3REF: Generate A Patchset From A Session Object -** -** The differences between a patchset and a changeset are that: -** -** <ul> -** <li> DELETE records consist of the primary key fields only. The -** original values of other fields are omitted. -** <li> The original values of any modified fields are omitted from -** UPDATE records. -** </ul> -** -** A patchset blob may be used with up to date versions of all -** sqlite3changeset_xxx API functions except for sqlite3changeset_invert(), -** which returns SQLITE_CORRUPT if it is passed a patchset. Similarly, -** attempting to use a patchset blob with old versions of the -** sqlite3changeset_xxx APIs also provokes an SQLITE_CORRUPT error. -** -** Because the non-primary key "old.*" fields are omitted, no -** SQLITE_CHANGESET_DATA conflicts can be detected or reported if a patchset -** is passed to the sqlite3changeset_apply() API. Other conflict types work -** in the same way as for changesets. -** -** Changes within a patchset are ordered in the same way as for changesets -** generated by the sqlite3session_changeset() function (i.e. all changes for -** a single table are grouped together, tables appear in the order in which -** they were attached to the session object). -*/ -int sqlite3session_patchset( - sqlite3_session *pSession, /* Session object */ - int *pnPatchset, /* OUT: Size of buffer at *ppChangeset */ - void **ppPatchset /* OUT: Buffer containing changeset */ -); - -/* -** CAPI3REF: Test if a changeset has recorded any changes. -** -** Return non-zero if no changes to attached tables have been recorded by -** the session object passed as the first argument. Otherwise, if one or -** more changes have been recorded, return zero. -** -** Even if this function returns zero, it is possible that calling -** [sqlite3session_changeset()] on the session handle may still return a -** changeset that contains no changes. This can happen when a row in -** an attached table is modified and then later on the original values -** are restored. However, if this function returns non-zero, then it is -** guaranteed that a call to sqlite3session_changeset() will return a -** changeset containing zero changes. -*/ -int sqlite3session_isempty(sqlite3_session *pSession); - -/* -** CAPI3REF: Create An Iterator To Traverse A Changeset -** -** Create an iterator used to iterate through the contents of a changeset. -** If successful, *pp is set to point to the iterator handle and SQLITE_OK -** is returned. Otherwise, if an error occurs, *pp is set to zero and an -** SQLite error code is returned. -** -** The following functions can be used to advance and query a changeset -** iterator created by this function: -** -** <ul> -** <li> [sqlite3changeset_next()] -** <li> [sqlite3changeset_op()] -** <li> [sqlite3changeset_new()] -** <li> [sqlite3changeset_old()] -** </ul> -** -** It is the responsibility of the caller to eventually destroy the iterator -** by passing it to [sqlite3changeset_finalize()]. The buffer containing the -** changeset (pChangeset) must remain valid until after the iterator is -** destroyed. -** -** Assuming the changeset blob was created by one of the -** [sqlite3session_changeset()], [sqlite3changeset_concat()] or -** [sqlite3changeset_invert()] functions, all changes within the changeset -** that apply to a single table are grouped together. This means that when -** an application iterates through a changeset using an iterator created by -** this function, all changes that relate to a single table are visited -** consecutively. There is no chance that the iterator will visit a change -** the applies to table X, then one for table Y, and then later on visit -** another change for table X. -*/ -int sqlite3changeset_start( - sqlite3_changeset_iter **pp, /* OUT: New changeset iterator handle */ - int nChangeset, /* Size of changeset blob in bytes */ - void *pChangeset /* Pointer to blob containing changeset */ -); - - -/* -** CAPI3REF: Advance A Changeset Iterator -** -** This function may only be used with iterators created by function -** [sqlite3changeset_start()]. If it is called on an iterator passed to -** a conflict-handler callback by [sqlite3changeset_apply()], SQLITE_MISUSE -** is returned and the call has no effect. -** -** Immediately after an iterator is created by sqlite3changeset_start(), it -** does not point to any change in the changeset. Assuming the changeset -** is not empty, the first call to this function advances the iterator to -** point to the first change in the changeset. Each subsequent call advances -** the iterator to point to the next change in the changeset (if any). If -** no error occurs and the iterator points to a valid change after a call -** to sqlite3changeset_next() has advanced it, SQLITE_ROW is returned. -** Otherwise, if all changes in the changeset have already been visited, -** SQLITE_DONE is returned. -** -** If an error occurs, an SQLite error code is returned. Possible error -** codes include SQLITE_CORRUPT (if the changeset buffer is corrupt) or -** SQLITE_NOMEM. -*/ -int sqlite3changeset_next(sqlite3_changeset_iter *pIter); - -/* -** CAPI3REF: Obtain The Current Operation From A Changeset Iterator -** -** The pIter argument passed to this function may either be an iterator -** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator -** created by [sqlite3changeset_start()]. In the latter case, the most recent -** call to [sqlite3changeset_next()] must have returned [SQLITE_ROW]. If this -** is not the case, this function returns [SQLITE_MISUSE]. -** -** If argument pzTab is not NULL, then *pzTab is set to point to a -** nul-terminated utf-8 encoded string containing the name of the table -** affected by the current change. The buffer remains valid until either -** sqlite3changeset_next() is called on the iterator or until the -** conflict-handler function returns. If pnCol is not NULL, then *pnCol is -** set to the number of columns in the table affected by the change. If -** pbIncorrect is not NULL, then *pbIndirect is set to true (1) if the change -** is an indirect change, or false (0) otherwise. See the documentation for -** [sqlite3session_indirect()] for a description of direct and indirect -** changes. Finally, if pOp is not NULL, then *pOp is set to one of -** [SQLITE_INSERT], [SQLITE_DELETE] or [SQLITE_UPDATE], depending on the -** type of change that the iterator currently points to. -** -** If no error occurs, SQLITE_OK is returned. If an error does occur, an -** SQLite error code is returned. The values of the output variables may not -** be trusted in this case. -*/ -int sqlite3changeset_op( - sqlite3_changeset_iter *pIter, /* Iterator object */ - const char **pzTab, /* OUT: Pointer to table name */ - int *pnCol, /* OUT: Number of columns in table */ - int *pOp, /* OUT: SQLITE_INSERT, DELETE or UPDATE */ - int *pbIndirect /* OUT: True for an 'indirect' change */ -); - -/* -** CAPI3REF: Obtain The Primary Key Definition Of A Table -** -** For each modified table, a changeset includes the following: -** -** <ul> -** <li> The number of columns in the table, and -** <li> Which of those columns make up the tables PRIMARY KEY. -** </ul> -** -** This function is used to find which columns comprise the PRIMARY KEY of -** the table modified by the change that iterator pIter currently points to. -** If successful, *pabPK is set to point to an array of nCol entries, where -** nCol is the number of columns in the table. Elements of *pabPK are set to -** 0x01 if the corresponding column is part of the tables primary key, or -** 0x00 if it is not. -** -** If argument pnCol is not NULL, then *pnCol is set to the number of columns -** in the table. -** -** If this function is called when the iterator does not point to a valid -** entry, SQLITE_MISUSE is returned and the output variables zeroed. Otherwise, -** SQLITE_OK is returned and the output variables populated as described -** above. -*/ -int sqlite3changeset_pk( - sqlite3_changeset_iter *pIter, /* Iterator object */ - unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */ - int *pnCol /* OUT: Number of entries in output array */ -); - -/* -** CAPI3REF: Obtain old.* Values From A Changeset Iterator -** -** The pIter argument passed to this function may either be an iterator -** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator -** created by [sqlite3changeset_start()]. In the latter case, the most recent -** call to [sqlite3changeset_next()] must have returned SQLITE_ROW. -** Furthermore, it may only be called if the type of change that the iterator -** currently points to is either [SQLITE_DELETE] or [SQLITE_UPDATE]. Otherwise, -** this function returns [SQLITE_MISUSE] and sets *ppValue to NULL. -** -** Argument iVal must be greater than or equal to 0, and less than the number -** of columns in the table affected by the current change. Otherwise, -** [SQLITE_RANGE] is returned and *ppValue is set to NULL. -** -** If successful, this function sets *ppValue to point to a protected -** sqlite3_value object containing the iVal'th value from the vector of -** original row values stored as part of the UPDATE or DELETE change and -** returns SQLITE_OK. The name of the function comes from the fact that this -** is similar to the "old.*" columns available to update or delete triggers. -** -** If some other error occurs (e.g. an OOM condition), an SQLite error code -** is returned and *ppValue is set to NULL. -*/ -int sqlite3changeset_old( - sqlite3_changeset_iter *pIter, /* Changeset iterator */ - int iVal, /* Column number */ - sqlite3_value **ppValue /* OUT: Old value (or NULL pointer) */ -); - -/* -** CAPI3REF: Obtain new.* Values From A Changeset Iterator -** -** The pIter argument passed to this function may either be an iterator -** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator -** created by [sqlite3changeset_start()]. In the latter case, the most recent -** call to [sqlite3changeset_next()] must have returned SQLITE_ROW. -** Furthermore, it may only be called if the type of change that the iterator -** currently points to is either [SQLITE_UPDATE] or [SQLITE_INSERT]. Otherwise, -** this function returns [SQLITE_MISUSE] and sets *ppValue to NULL. -** -** Argument iVal must be greater than or equal to 0, and less than the number -** of columns in the table affected by the current change. Otherwise, -** [SQLITE_RANGE] is returned and *ppValue is set to NULL. -** -** If successful, this function sets *ppValue to point to a protected -** sqlite3_value object containing the iVal'th value from the vector of -** new row values stored as part of the UPDATE or INSERT change and -** returns SQLITE_OK. If the change is an UPDATE and does not include -** a new value for the requested column, *ppValue is set to NULL and -** SQLITE_OK returned. The name of the function comes from the fact that -** this is similar to the "new.*" columns available to update or delete -** triggers. -** -** If some other error occurs (e.g. an OOM condition), an SQLite error code -** is returned and *ppValue is set to NULL. -*/ -int sqlite3changeset_new( - sqlite3_changeset_iter *pIter, /* Changeset iterator */ - int iVal, /* Column number */ - sqlite3_value **ppValue /* OUT: New value (or NULL pointer) */ -); - -/* -** CAPI3REF: Obtain Conflicting Row Values From A Changeset Iterator -** -** This function should only be used with iterator objects passed to a -** conflict-handler callback by [sqlite3changeset_apply()] with either -** [SQLITE_CHANGESET_DATA] or [SQLITE_CHANGESET_CONFLICT]. If this function -** is called on any other iterator, [SQLITE_MISUSE] is returned and *ppValue -** is set to NULL. -** -** Argument iVal must be greater than or equal to 0, and less than the number -** of columns in the table affected by the current change. Otherwise, -** [SQLITE_RANGE] is returned and *ppValue is set to NULL. -** -** If successful, this function sets *ppValue to point to a protected -** sqlite3_value object containing the iVal'th value from the -** "conflicting row" associated with the current conflict-handler callback -** and returns SQLITE_OK. -** -** If some other error occurs (e.g. an OOM condition), an SQLite error code -** is returned and *ppValue is set to NULL. -*/ -int sqlite3changeset_conflict( - sqlite3_changeset_iter *pIter, /* Changeset iterator */ - int iVal, /* Column number */ - sqlite3_value **ppValue /* OUT: Value from conflicting row */ -); - -/* -** CAPI3REF: Determine The Number Of Foreign Key Constraint Violations -** -** This function may only be called with an iterator passed to an -** SQLITE_CHANGESET_FOREIGN_KEY conflict handler callback. In this case -** it sets the output variable to the total number of known foreign key -** violations in the destination database and returns SQLITE_OK. -** -** In all other cases this function returns SQLITE_MISUSE. -*/ -int sqlite3changeset_fk_conflicts( - sqlite3_changeset_iter *pIter, /* Changeset iterator */ - int *pnOut /* OUT: Number of FK violations */ -); - - -/* -** CAPI3REF: Finalize A Changeset Iterator -** -** This function is used to finalize an iterator allocated with -** [sqlite3changeset_start()]. -** -** This function should only be called on iterators created using the -** [sqlite3changeset_start()] function. If an application calls this -** function with an iterator passed to a conflict-handler by -** [sqlite3changeset_apply()], [SQLITE_MISUSE] is immediately returned and the -** call has no effect. -** -** If an error was encountered within a call to an sqlite3changeset_xxx() -** function (for example an [SQLITE_CORRUPT] in [sqlite3changeset_next()] or an -** [SQLITE_NOMEM] in [sqlite3changeset_new()]) then an error code corresponding -** to that error is returned by this function. Otherwise, SQLITE_OK is -** returned. This is to allow the following pattern (pseudo-code): -** -** sqlite3changeset_start(); -** while( SQLITE_ROW==sqlite3changeset_next() ){ -** // Do something with change. -** } -** rc = sqlite3changeset_finalize(); -** if( rc!=SQLITE_OK ){ -** // An error has occurred -** } -*/ -int sqlite3changeset_finalize(sqlite3_changeset_iter *pIter); - -/* -** CAPI3REF: Invert A Changeset -** -** This function is used to "invert" a changeset object. Applying an inverted -** changeset to a database reverses the effects of applying the uninverted -** changeset. Specifically: -** -** <ul> -** <li> Each DELETE change is changed to an INSERT, and -** <li> Each INSERT change is changed to a DELETE, and -** <li> For each UPDATE change, the old.* and new.* values are exchanged. -** </ul> -** -** This function does not change the order in which changes appear within -** the changeset. It merely reverses the sense of each individual change. -** -** If successful, a pointer to a buffer containing the inverted changeset -** is stored in *ppOut, the size of the same buffer is stored in *pnOut, and -** SQLITE_OK is returned. If an error occurs, both *pnOut and *ppOut are -** zeroed and an SQLite error code returned. -** -** It is the responsibility of the caller to eventually call sqlite3_free() -** on the *ppOut pointer to free the buffer allocation following a successful -** call to this function. -** -** WARNING/TODO: This function currently assumes that the input is a valid -** changeset. If it is not, the results are undefined. -*/ -int sqlite3changeset_invert( - int nIn, const void *pIn, /* Input changeset */ - int *pnOut, void **ppOut /* OUT: Inverse of input */ -); - -/* -** CAPI3REF: Concatenate Two Changeset Objects -** -** This function is used to concatenate two changesets, A and B, into a -** single changeset. The result is a changeset equivalent to applying -** changeset A followed by changeset B. -** -** This function combines the two input changesets using an -** sqlite3_changegroup object. Calling it produces similar results as the -** following code fragment: -** -** sqlite3_changegroup *pGrp; -** rc = sqlite3_changegroup_new(&pGrp); -** if( rc==SQLITE_OK ) rc = sqlite3changegroup_add(pGrp, nA, pA); -** if( rc==SQLITE_OK ) rc = sqlite3changegroup_add(pGrp, nB, pB); -** if( rc==SQLITE_OK ){ -** rc = sqlite3changegroup_output(pGrp, pnOut, ppOut); -** }else{ -** *ppOut = 0; -** *pnOut = 0; -** } -** -** Refer to the sqlite3_changegroup documentation below for details. -*/ -int sqlite3changeset_concat( - int nA, /* Number of bytes in buffer pA */ - void *pA, /* Pointer to buffer containing changeset A */ - int nB, /* Number of bytes in buffer pB */ - void *pB, /* Pointer to buffer containing changeset B */ - int *pnOut, /* OUT: Number of bytes in output changeset */ - void **ppOut /* OUT: Buffer containing output changeset */ -); - - -/* -** CAPI3REF: Changegroup Handle -*/ -typedef struct sqlite3_changegroup sqlite3_changegroup; - -/* -** CAPI3REF: Create A New Changegroup Object -** -** An sqlite3_changegroup object is used to combine two or more changesets -** (or patchsets) into a single changeset (or patchset). A single changegroup -** object may combine changesets or patchsets, but not both. The output is -** always in the same format as the input. -** -** If successful, this function returns SQLITE_OK and populates (*pp) with -** a pointer to a new sqlite3_changegroup object before returning. The caller -** should eventually free the returned object using a call to -** sqlite3changegroup_delete(). If an error occurs, an SQLite error code -** (i.e. SQLITE_NOMEM) is returned and *pp is set to NULL. -** -** The usual usage pattern for an sqlite3_changegroup object is as follows: -** -** <ul> -** <li> It is created using a call to sqlite3changegroup_new(). -** -** <li> Zero or more changesets (or patchsets) are added to the object -** by calling sqlite3changegroup_add(). -** -** <li> The result of combining all input changesets together is obtained -** by the application via a call to sqlite3changegroup_output(). -** -** <li> The object is deleted using a call to sqlite3changegroup_delete(). -** </ul> -** -** Any number of calls to add() and output() may be made between the calls to -** new() and delete(), and in any order. -** -** As well as the regular sqlite3changegroup_add() and -** sqlite3changegroup_output() functions, also available are the streaming -** versions sqlite3changegroup_add_strm() and sqlite3changegroup_output_strm(). -*/ -int sqlite3changegroup_new(sqlite3_changegroup **pp); - -/* -** CAPI3REF: Add A Changeset To A Changegroup -** -** Add all changes within the changeset (or patchset) in buffer pData (size -** nData bytes) to the changegroup. -** -** If the buffer contains a patchset, then all prior calls to this function -** on the same changegroup object must also have specified patchsets. Or, if -** the buffer contains a changeset, so must have the earlier calls to this -** function. Otherwise, SQLITE_ERROR is returned and no changes are added -** to the changegroup. -** -** Rows within the changeset and changegroup are identified by the values in -** their PRIMARY KEY columns. A change in the changeset is considered to -** apply to the same row as a change already present in the changegroup if -** the two rows have the same primary key. -** -** Changes to rows that do not already appear in the changegroup are -** simply copied into it. Or, if both the new changeset and the changegroup -** contain changes that apply to a single row, the final contents of the -** changegroup depends on the type of each change, as follows: -** -** <table border=1 style="margin-left:8ex;margin-right:8ex"> -** <tr><th style="white-space:pre">Existing Change </th> -** <th style="white-space:pre">New Change </th> -** <th>Output Change -** <tr><td>INSERT <td>INSERT <td> -** The new change is ignored. This case does not occur if the new -** changeset was recorded immediately after the changesets already -** added to the changegroup. -** <tr><td>INSERT <td>UPDATE <td> -** The INSERT change remains in the changegroup. The values in the -** INSERT change are modified as if the row was inserted by the -** existing change and then updated according to the new change. -** <tr><td>INSERT <td>DELETE <td> -** The existing INSERT is removed from the changegroup. The DELETE is -** not added. -** <tr><td>UPDATE <td>INSERT <td> -** The new change is ignored. This case does not occur if the new -** changeset was recorded immediately after the changesets already -** added to the changegroup. -** <tr><td>UPDATE <td>UPDATE <td> -** The existing UPDATE remains within the changegroup. It is amended -** so that the accompanying values are as if the row was updated once -** by the existing change and then again by the new change. -** <tr><td>UPDATE <td>DELETE <td> -** The existing UPDATE is replaced by the new DELETE within the -** changegroup. -** <tr><td>DELETE <td>INSERT <td> -** If one or more of the column values in the row inserted by the -** new change differ from those in the row deleted by the existing -** change, the existing DELETE is replaced by an UPDATE within the -** changegroup. Otherwise, if the inserted row is exactly the same -** as the deleted row, the existing DELETE is simply discarded. -** <tr><td>DELETE <td>UPDATE <td> -** The new change is ignored. This case does not occur if the new -** changeset was recorded immediately after the changesets already -** added to the changegroup. -** <tr><td>DELETE <td>DELETE <td> -** The new change is ignored. This case does not occur if the new -** changeset was recorded immediately after the changesets already -** added to the changegroup. -** </table> -** -** If the new changeset contains changes to a table that is already present -** in the changegroup, then the number of columns and the position of the -** primary key columns for the table must be consistent. If this is not the -** case, this function fails with SQLITE_SCHEMA. If the input changeset -** appears to be corrupt and the corruption is detected, SQLITE_CORRUPT is -** returned. Or, if an out-of-memory condition occurs during processing, this -** function returns SQLITE_NOMEM. In all cases, if an error occurs the -** final contents of the changegroup is undefined. -** -** If no error occurs, SQLITE_OK is returned. -*/ -int sqlite3changegroup_add(sqlite3_changegroup*, int nData, void *pData); - -/* -** CAPI3REF: Obtain A Composite Changeset From A Changegroup -** -** Obtain a buffer containing a changeset (or patchset) representing the -** current contents of the changegroup. If the inputs to the changegroup -** were themselves changesets, the output is a changeset. Or, if the -** inputs were patchsets, the output is also a patchset. -** -** As with the output of the sqlite3session_changeset() and -** sqlite3session_patchset() functions, all changes related to a single -** table are grouped together in the output of this function. Tables appear -** in the same order as for the very first changeset added to the changegroup. -** If the second or subsequent changesets added to the changegroup contain -** changes for tables that do not appear in the first changeset, they are -** appended onto the end of the output changeset, again in the order in -** which they are first encountered. -** -** If an error occurs, an SQLite error code is returned and the output -** variables (*pnData) and (*ppData) are set to 0. Otherwise, SQLITE_OK -** is returned and the output variables are set to the size of and a -** pointer to the output buffer, respectively. In this case it is the -** responsibility of the caller to eventually free the buffer using a -** call to sqlite3_free(). -*/ -int sqlite3changegroup_output( - sqlite3_changegroup*, - int *pnData, /* OUT: Size of output buffer in bytes */ - void **ppData /* OUT: Pointer to output buffer */ -); - -/* -** CAPI3REF: Delete A Changegroup Object -*/ -void sqlite3changegroup_delete(sqlite3_changegroup*); - -/* -** CAPI3REF: Apply A Changeset To A Database -** -** Apply a changeset to a database. This function attempts to update the -** "main" database attached to handle db with the changes found in the -** changeset passed via the second and third arguments. -** -** The fourth argument (xFilter) passed to this function is the "filter -** callback". If it is not NULL, then for each table affected by at least one -** change in the changeset, the filter callback is invoked with -** the table name as the second argument, and a copy of the context pointer -** passed as the sixth argument to this function as the first. If the "filter -** callback" returns zero, then no attempt is made to apply any changes to -** the table. Otherwise, if the return value is non-zero or the xFilter -** argument to this function is NULL, all changes related to the table are -** attempted. -** -** For each table that is not excluded by the filter callback, this function -** tests that the target database contains a compatible table. A table is -** considered compatible if all of the following are true: -** -** <ul> -** <li> The table has the same name as the name recorded in the -** changeset, and -** <li> The table has the same number of columns as recorded in the -** changeset, and -** <li> The table has primary key columns in the same position as -** recorded in the changeset. -** </ul> -** -** If there is no compatible table, it is not an error, but none of the -** changes associated with the table are applied. A warning message is issued -** via the sqlite3_log() mechanism with the error code SQLITE_SCHEMA. At most -** one such warning is issued for each table in the changeset. -** -** For each change for which there is a compatible table, an attempt is made -** to modify the table contents according to the UPDATE, INSERT or DELETE -** change. If a change cannot be applied cleanly, the conflict handler -** function passed as the fifth argument to sqlite3changeset_apply() may be -** invoked. A description of exactly when the conflict handler is invoked for -** each type of change is below. -** -** Unlike the xFilter argument, xConflict may not be passed NULL. The results -** of passing anything other than a valid function pointer as the xConflict -** argument are undefined. -** -** Each time the conflict handler function is invoked, it must return one -** of [SQLITE_CHANGESET_OMIT], [SQLITE_CHANGESET_ABORT] or -** [SQLITE_CHANGESET_REPLACE]. SQLITE_CHANGESET_REPLACE may only be returned -** if the second argument passed to the conflict handler is either -** SQLITE_CHANGESET_DATA or SQLITE_CHANGESET_CONFLICT. If the conflict-handler -** returns an illegal value, any changes already made are rolled back and -** the call to sqlite3changeset_apply() returns SQLITE_MISUSE. Different -** actions are taken by sqlite3changeset_apply() depending on the value -** returned by each invocation of the conflict-handler function. Refer to -** the documentation for the three -** [SQLITE_CHANGESET_OMIT|available return values] for details. -** -** <dl> -** <dt>DELETE Changes<dd> -** For each DELETE change, this function checks if the target database -** contains a row with the same primary key value (or values) as the -** original row values stored in the changeset. If it does, and the values -** stored in all non-primary key columns also match the values stored in -** the changeset the row is deleted from the target database. -** -** If a row with matching primary key values is found, but one or more of -** the non-primary key fields contains a value different from the original -** row value stored in the changeset, the conflict-handler function is -** invoked with [SQLITE_CHANGESET_DATA] as the second argument. -** -** If no row with matching primary key values is found in the database, -** the conflict-handler function is invoked with [SQLITE_CHANGESET_NOTFOUND] -** passed as the second argument. -** -** If the DELETE operation is attempted, but SQLite returns SQLITE_CONSTRAINT -** (which can only happen if a foreign key constraint is violated), the -** conflict-handler function is invoked with [SQLITE_CHANGESET_CONSTRAINT] -** passed as the second argument. This includes the case where the DELETE -** operation is attempted because an earlier call to the conflict handler -** function returned [SQLITE_CHANGESET_REPLACE]. -** -** <dt>INSERT Changes<dd> -** For each INSERT change, an attempt is made to insert the new row into -** the database. -** -** If the attempt to insert the row fails because the database already -** contains a row with the same primary key values, the conflict handler -** function is invoked with the second argument set to -** [SQLITE_CHANGESET_CONFLICT]. -** -** If the attempt to insert the row fails because of some other constraint -** violation (e.g. NOT NULL or UNIQUE), the conflict handler function is -** invoked with the second argument set to [SQLITE_CHANGESET_CONSTRAINT]. -** This includes the case where the INSERT operation is re-attempted because -** an earlier call to the conflict handler function returned -** [SQLITE_CHANGESET_REPLACE]. -** -** <dt>UPDATE Changes<dd> -** For each UPDATE change, this function checks if the target database -** contains a row with the same primary key value (or values) as the -** original row values stored in the changeset. If it does, and the values -** stored in all non-primary key columns also match the values stored in -** the changeset the row is updated within the target database. -** -** If a row with matching primary key values is found, but one or more of -** the non-primary key fields contains a value different from an original -** row value stored in the changeset, the conflict-handler function is -** invoked with [SQLITE_CHANGESET_DATA] as the second argument. Since -** UPDATE changes only contain values for non-primary key fields that are -** to be modified, only those fields need to match the original values to -** avoid the SQLITE_CHANGESET_DATA conflict-handler callback. -** -** If no row with matching primary key values is found in the database, -** the conflict-handler function is invoked with [SQLITE_CHANGESET_NOTFOUND] -** passed as the second argument. -** -** If the UPDATE operation is attempted, but SQLite returns -** SQLITE_CONSTRAINT, the conflict-handler function is invoked with -** [SQLITE_CHANGESET_CONSTRAINT] passed as the second argument. -** This includes the case where the UPDATE operation is attempted after -** an earlier call to the conflict handler function returned -** [SQLITE_CHANGESET_REPLACE]. -** </dl> -** -** It is safe to execute SQL statements, including those that write to the -** table that the callback related to, from within the xConflict callback. -** This can be used to further customize the applications conflict -** resolution strategy. -** -** All changes made by this function are enclosed in a savepoint transaction. -** If any other error (aside from a constraint failure when attempting to -** write to the target database) occurs, then the savepoint transaction is -** rolled back, restoring the target database to its original state, and an -** SQLite error code returned. -*/ -int sqlite3changeset_apply( - sqlite3 *db, /* Apply change to "main" db of this handle */ - int nChangeset, /* Size of changeset in bytes */ - void *pChangeset, /* Changeset blob */ - int(*xFilter)( - void *pCtx, /* Copy of sixth arg to _apply() */ - const char *zTab /* Table name */ - ), - int(*xConflict)( - void *pCtx, /* Copy of sixth arg to _apply() */ - int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */ - sqlite3_changeset_iter *p /* Handle describing change and conflict */ - ), - void *pCtx /* First argument passed to xConflict */ -); - -/* -** CAPI3REF: Constants Passed To The Conflict Handler -** -** Values that may be passed as the second argument to a conflict-handler. -** -** <dl> -** <dt>SQLITE_CHANGESET_DATA<dd> -** The conflict handler is invoked with CHANGESET_DATA as the second argument -** when processing a DELETE or UPDATE change if a row with the required -** PRIMARY KEY fields is present in the database, but one or more other -** (non primary-key) fields modified by the update do not contain the -** expected "before" values. -** -** The conflicting row, in this case, is the database row with the matching -** primary key. -** -** <dt>SQLITE_CHANGESET_NOTFOUND<dd> -** The conflict handler is invoked with CHANGESET_NOTFOUND as the second -** argument when processing a DELETE or UPDATE change if a row with the -** required PRIMARY KEY fields is not present in the database. -** -** There is no conflicting row in this case. The results of invoking the -** sqlite3changeset_conflict() API are undefined. -** -** <dt>SQLITE_CHANGESET_CONFLICT<dd> -** CHANGESET_CONFLICT is passed as the second argument to the conflict -** handler while processing an INSERT change if the operation would result -** in duplicate primary key values. -** -** The conflicting row in this case is the database row with the matching -** primary key. -** -** <dt>SQLITE_CHANGESET_FOREIGN_KEY<dd> -** If foreign key handling is enabled, and applying a changeset leaves the -** database in a state containing foreign key violations, the conflict -** handler is invoked with CHANGESET_FOREIGN_KEY as the second argument -** exactly once before the changeset is committed. If the conflict handler -** returns CHANGESET_OMIT, the changes, including those that caused the -** foreign key constraint violation, are committed. Or, if it returns -** CHANGESET_ABORT, the changeset is rolled back. -** -** No current or conflicting row information is provided. The only function -** it is possible to call on the supplied sqlite3_changeset_iter handle -** is sqlite3changeset_fk_conflicts(). -** -** <dt>SQLITE_CHANGESET_CONSTRAINT<dd> -** If any other constraint violation occurs while applying a change (i.e. -** a UNIQUE, CHECK or NOT NULL constraint), the conflict handler is -** invoked with CHANGESET_CONSTRAINT as the second argument. -** -** There is no conflicting row in this case. The results of invoking the -** sqlite3changeset_conflict() API are undefined. -** -** </dl> -*/ -#define SQLITE_CHANGESET_DATA 1 -#define SQLITE_CHANGESET_NOTFOUND 2 -#define SQLITE_CHANGESET_CONFLICT 3 -#define SQLITE_CHANGESET_CONSTRAINT 4 -#define SQLITE_CHANGESET_FOREIGN_KEY 5 - -/* -** CAPI3REF: Constants Returned By The Conflict Handler -** -** A conflict handler callback must return one of the following three values. -** -** <dl> -** <dt>SQLITE_CHANGESET_OMIT<dd> -** If a conflict handler returns this value no special action is taken. The -** change that caused the conflict is not applied. The session module -** continues to the next change in the changeset. -** -** <dt>SQLITE_CHANGESET_REPLACE<dd> -** This value may only be returned if the second argument to the conflict -** handler was SQLITE_CHANGESET_DATA or SQLITE_CHANGESET_CONFLICT. If this -** is not the case, any changes applied so far are rolled back and the -** call to sqlite3changeset_apply() returns SQLITE_MISUSE. -** -** If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_DATA conflict -** handler, then the conflicting row is either updated or deleted, depending -** on the type of change. -** -** If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_CONFLICT conflict -** handler, then the conflicting row is removed from the database and a -** second attempt to apply the change is made. If this second attempt fails, -** the original row is restored to the database before continuing. -** -** <dt>SQLITE_CHANGESET_ABORT<dd> -** If this value is returned, any changes applied so far are rolled back -** and the call to sqlite3changeset_apply() returns SQLITE_ABORT. -** </dl> -*/ -#define SQLITE_CHANGESET_OMIT 0 -#define SQLITE_CHANGESET_REPLACE 1 -#define SQLITE_CHANGESET_ABORT 2 - -/* -** CAPI3REF: Streaming Versions of API functions. -** -** The six streaming API xxx_strm() functions serve similar purposes to the -** corresponding non-streaming API functions: -** -** <table border=1 style="margin-left:8ex;margin-right:8ex"> -** <tr><th>Streaming function<th>Non-streaming equivalent</th> -** <tr><td>sqlite3changeset_apply_str<td>[sqlite3changeset_apply] -** <tr><td>sqlite3changeset_concat_str<td>[sqlite3changeset_concat] -** <tr><td>sqlite3changeset_invert_str<td>[sqlite3changeset_invert] -** <tr><td>sqlite3changeset_start_str<td>[sqlite3changeset_start] -** <tr><td>sqlite3session_changeset_str<td>[sqlite3session_changeset] -** <tr><td>sqlite3session_patchset_str<td>[sqlite3session_patchset] -** </table> -** -** Non-streaming functions that accept changesets (or patchsets) as input -** require that the entire changeset be stored in a single buffer in memory. -** Similarly, those that return a changeset or patchset do so by returning -** a pointer to a single large buffer allocated using sqlite3_malloc(). -** Normally this is convenient. However, if an application running in a -** low-memory environment is required to handle very large changesets, the -** large contiguous memory allocations required can become onerous. -** -** In order to avoid this problem, instead of a single large buffer, input -** is passed to a streaming API functions by way of a callback function that -** the sessions module invokes to incrementally request input data as it is -** required. In all cases, a pair of API function parameters such as -** -** <pre> -**   int nChangeset, -**   void *pChangeset, -** </pre> -** -** Is replaced by: -** -** <pre> -**   int (*xInput)(void *pIn, void *pData, int *pnData), -**   void *pIn, -** </pre> -** -** Each time the xInput callback is invoked by the sessions module, the first -** argument passed is a copy of the supplied pIn context pointer. The second -** argument, pData, points to a buffer (*pnData) bytes in size. Assuming no -** error occurs the xInput method should copy up to (*pnData) bytes of data -** into the buffer and set (*pnData) to the actual number of bytes copied -** before returning SQLITE_OK. If the input is completely exhausted, (*pnData) -** should be set to zero to indicate this. Or, if an error occurs, an SQLite -** error code should be returned. In all cases, if an xInput callback returns -** an error, all processing is abandoned and the streaming API function -** returns a copy of the error code to the caller. -** -** In the case of sqlite3changeset_start_strm(), the xInput callback may be -** invoked by the sessions module at any point during the lifetime of the -** iterator. If such an xInput callback returns an error, the iterator enters -** an error state, whereby all subsequent calls to iterator functions -** immediately fail with the same error code as returned by xInput. -** -** Similarly, streaming API functions that return changesets (or patchsets) -** return them in chunks by way of a callback function instead of via a -** pointer to a single large buffer. In this case, a pair of parameters such -** as: -** -** <pre> -**   int *pnChangeset, -**   void **ppChangeset, -** </pre> -** -** Is replaced by: -** -** <pre> -**   int (*xOutput)(void *pOut, const void *pData, int nData), -**   void *pOut -** </pre> -** -** The xOutput callback is invoked zero or more times to return data to -** the application. The first parameter passed to each call is a copy of the -** pOut pointer supplied by the application. The second parameter, pData, -** points to a buffer nData bytes in size containing the chunk of output -** data being returned. If the xOutput callback successfully processes the -** supplied data, it should return SQLITE_OK to indicate success. Otherwise, -** it should return some other SQLite error code. In this case processing -** is immediately abandoned and the streaming API function returns a copy -** of the xOutput error code to the application. -** -** The sessions module never invokes an xOutput callback with the third -** parameter set to a value less than or equal to zero. Other than this, -** no guarantees are made as to the size of the chunks of data returned. -*/ -int sqlite3changeset_apply_strm( - sqlite3 *db, /* Apply change to "main" db of this handle */ - int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */ - void *pIn, /* First arg for xInput */ - int(*xFilter)( - void *pCtx, /* Copy of sixth arg to _apply() */ - const char *zTab /* Table name */ - ), - int(*xConflict)( - void *pCtx, /* Copy of sixth arg to _apply() */ - int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */ - sqlite3_changeset_iter *p /* Handle describing change and conflict */ - ), - void *pCtx /* First argument passed to xConflict */ -); -int sqlite3changeset_concat_strm( - int (*xInputA)(void *pIn, void *pData, int *pnData), - void *pInA, - int (*xInputB)(void *pIn, void *pData, int *pnData), - void *pInB, - int (*xOutput)(void *pOut, const void *pData, int nData), - void *pOut -); -int sqlite3changeset_invert_strm( - int (*xInput)(void *pIn, void *pData, int *pnData), - void *pIn, - int (*xOutput)(void *pOut, const void *pData, int nData), - void *pOut -); -int sqlite3changeset_start_strm( - sqlite3_changeset_iter **pp, - int (*xInput)(void *pIn, void *pData, int *pnData), - void *pIn -); -int sqlite3session_changeset_strm( - sqlite3_session *pSession, - int (*xOutput)(void *pOut, const void *pData, int nData), - void *pOut -); -int sqlite3session_patchset_strm( - sqlite3_session *pSession, - int (*xOutput)(void *pOut, const void *pData, int nData), - void *pOut -); -int sqlite3changegroup_add_strm(sqlite3_changegroup*, - int (*xInput)(void *pIn, void *pData, int *pnData), - void *pIn -); -int sqlite3changegroup_output_strm(sqlite3_changegroup*, - int (*xOutput)(void *pOut, const void *pData, int nData), - void *pOut -); - - -/* -** Make sure we can call this stuff from C++. -*/ -#ifdef __cplusplus -} -#endif - -#endif /* !defined(__SQLITESESSION_H_) && defined(SQLITE_ENABLE_SESSION) */ - -/******** End of sqlite3session.h *********/ -/******** Begin file fts5.h *********/ -/* -** 2014 May 31 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -****************************************************************************** -** -** Interfaces to extend FTS5. Using the interfaces defined in this file, -** FTS5 may be extended with: -** -** * custom tokenizers, and -** * custom auxiliary functions. -*/ - - -#ifndef _FTS5_H -#define _FTS5_H - - -#ifdef __cplusplus -extern "C" { -#endif - -/************************************************************************* -** CUSTOM AUXILIARY FUNCTIONS -** -** Virtual table implementations may overload SQL functions by implementing -** the sqlite3_module.xFindFunction() method. -*/ - -typedef struct Fts5ExtensionApi Fts5ExtensionApi; -typedef struct Fts5Context Fts5Context; -typedef struct Fts5PhraseIter Fts5PhraseIter; - -typedef void (*fts5_extension_function)( - const Fts5ExtensionApi *pApi, /* API offered by current FTS version */ - Fts5Context *pFts, /* First arg to pass to pApi functions */ - sqlite3_context *pCtx, /* Context for returning result/error */ - int nVal, /* Number of values in apVal[] array */ - sqlite3_value **apVal /* Array of trailing arguments */ -); - -struct Fts5PhraseIter { - const unsigned char *a; - const unsigned char *b; -}; - -/* -** EXTENSION API FUNCTIONS -** -** xUserData(pFts): -** Return a copy of the context pointer the extension function was -** registered with. -** -** xColumnTotalSize(pFts, iCol, pnToken): -** If parameter iCol is less than zero, set output variable *pnToken -** to the total number of tokens in the FTS5 table. Or, if iCol is -** non-negative but less than the number of columns in the table, return -** the total number of tokens in column iCol, considering all rows in -** the FTS5 table. -** -** If parameter iCol is greater than or equal to the number of columns -** in the table, SQLITE_RANGE is returned. Or, if an error occurs (e.g. -** an OOM condition or IO error), an appropriate SQLite error code is -** returned. -** -** xColumnCount(pFts): -** Return the number of columns in the table. -** -** xColumnSize(pFts, iCol, pnToken): -** If parameter iCol is less than zero, set output variable *pnToken -** to the total number of tokens in the current row. Or, if iCol is -** non-negative but less than the number of columns in the table, set -** *pnToken to the number of tokens in column iCol of the current row. -** -** If parameter iCol is greater than or equal to the number of columns -** in the table, SQLITE_RANGE is returned. Or, if an error occurs (e.g. -** an OOM condition or IO error), an appropriate SQLite error code is -** returned. -** -** This function may be quite inefficient if used with an FTS5 table -** created with the "columnsize=0" option. -** -** xColumnText: -** This function attempts to retrieve the text of column iCol of the -** current document. If successful, (*pz) is set to point to a buffer -** containing the text in utf-8 encoding, (*pn) is set to the size in bytes -** (not characters) of the buffer and SQLITE_OK is returned. Otherwise, -** if an error occurs, an SQLite error code is returned and the final values -** of (*pz) and (*pn) are undefined. -** -** xPhraseCount: -** Returns the number of phrases in the current query expression. -** -** xPhraseSize: -** Returns the number of tokens in phrase iPhrase of the query. Phrases -** are numbered starting from zero. -** -** xInstCount: -** Set *pnInst to the total number of occurrences of all phrases within -** the query within the current row. Return SQLITE_OK if successful, or -** an error code (i.e. SQLITE_NOMEM) if an error occurs. -** -** This API can be quite slow if used with an FTS5 table created with the -** "detail=none" or "detail=column" option. If the FTS5 table is created -** with either "detail=none" or "detail=column" and "content=" option -** (i.e. if it is a contentless table), then this API always returns 0. -** -** xInst: -** Query for the details of phrase match iIdx within the current row. -** Phrase matches are numbered starting from zero, so the iIdx argument -** should be greater than or equal to zero and smaller than the value -** output by xInstCount(). -** -** Usually, output parameter *piPhrase is set to the phrase number, *piCol -** to the column in which it occurs and *piOff the token offset of the -** first token of the phrase. The exception is if the table was created -** with the offsets=0 option specified. In this case *piOff is always -** set to -1. -** -** Returns SQLITE_OK if successful, or an error code (i.e. SQLITE_NOMEM) -** if an error occurs. -** -** This API can be quite slow if used with an FTS5 table created with the -** "detail=none" or "detail=column" option. -** -** xRowid: -** Returns the rowid of the current row. -** -** xTokenize: -** Tokenize text using the tokenizer belonging to the FTS5 table. -** -** xQueryPhrase(pFts5, iPhrase, pUserData, xCallback): -** This API function is used to query the FTS table for phrase iPhrase -** of the current query. Specifically, a query equivalent to: -** -** ... FROM ftstable WHERE ftstable MATCH $p ORDER BY rowid -** -** with $p set to a phrase equivalent to the phrase iPhrase of the -** current query is executed. Any column filter that applies to -** phrase iPhrase of the current query is included in $p. For each -** row visited, the callback function passed as the fourth argument -** is invoked. The context and API objects passed to the callback -** function may be used to access the properties of each matched row. -** Invoking Api.xUserData() returns a copy of the pointer passed as -** the third argument to pUserData. -** -** If the callback function returns any value other than SQLITE_OK, the -** query is abandoned and the xQueryPhrase function returns immediately. -** If the returned value is SQLITE_DONE, xQueryPhrase returns SQLITE_OK. -** Otherwise, the error code is propagated upwards. -** -** If the query runs to completion without incident, SQLITE_OK is returned. -** Or, if some error occurs before the query completes or is aborted by -** the callback, an SQLite error code is returned. -** -** -** xSetAuxdata(pFts5, pAux, xDelete) -** -** Save the pointer passed as the second argument as the extension functions -** "auxiliary data". The pointer may then be retrieved by the current or any -** future invocation of the same fts5 extension function made as part of -** of the same MATCH query using the xGetAuxdata() API. -** -** Each extension function is allocated a single auxiliary data slot for -** each FTS query (MATCH expression). If the extension function is invoked -** more than once for a single FTS query, then all invocations share a -** single auxiliary data context. -** -** If there is already an auxiliary data pointer when this function is -** invoked, then it is replaced by the new pointer. If an xDelete callback -** was specified along with the original pointer, it is invoked at this -** point. -** -** The xDelete callback, if one is specified, is also invoked on the -** auxiliary data pointer after the FTS5 query has finished. -** -** If an error (e.g. an OOM condition) occurs within this function, an -** the auxiliary data is set to NULL and an error code returned. If the -** xDelete parameter was not NULL, it is invoked on the auxiliary data -** pointer before returning. -** -** -** xGetAuxdata(pFts5, bClear) -** -** Returns the current auxiliary data pointer for the fts5 extension -** function. See the xSetAuxdata() method for details. -** -** If the bClear argument is non-zero, then the auxiliary data is cleared -** (set to NULL) before this function returns. In this case the xDelete, -** if any, is not invoked. -** -** -** xRowCount(pFts5, pnRow) -** -** This function is used to retrieve the total number of rows in the table. -** In other words, the same value that would be returned by: -** -** SELECT count(*) FROM ftstable; -** -** xPhraseFirst() -** This function is used, along with type Fts5PhraseIter and the xPhraseNext -** method, to iterate through all instances of a single query phrase within -** the current row. This is the same information as is accessible via the -** xInstCount/xInst APIs. While the xInstCount/xInst APIs are more convenient -** to use, this API may be faster under some circumstances. To iterate -** through instances of phrase iPhrase, use the following code: -** -** Fts5PhraseIter iter; -** int iCol, iOff; -** for(pApi->xPhraseFirst(pFts, iPhrase, &iter, &iCol, &iOff); -** iCol>=0; -** pApi->xPhraseNext(pFts, &iter, &iCol, &iOff) -** ){ -** // An instance of phrase iPhrase at offset iOff of column iCol -** } -** -** The Fts5PhraseIter structure is defined above. Applications should not -** modify this structure directly - it should only be used as shown above -** with the xPhraseFirst() and xPhraseNext() API methods (and by -** xPhraseFirstColumn() and xPhraseNextColumn() as illustrated below). -** -** This API can be quite slow if used with an FTS5 table created with the -** "detail=none" or "detail=column" option. If the FTS5 table is created -** with either "detail=none" or "detail=column" and "content=" option -** (i.e. if it is a contentless table), then this API always iterates -** through an empty set (all calls to xPhraseFirst() set iCol to -1). -** -** xPhraseNext() -** See xPhraseFirst above. -** -** xPhraseFirstColumn() -** This function and xPhraseNextColumn() are similar to the xPhraseFirst() -** and xPhraseNext() APIs described above. The difference is that instead -** of iterating through all instances of a phrase in the current row, these -** APIs are used to iterate through the set of columns in the current row -** that contain one or more instances of a specified phrase. For example: -** -** Fts5PhraseIter iter; -** int iCol; -** for(pApi->xPhraseFirstColumn(pFts, iPhrase, &iter, &iCol); -** iCol>=0; -** pApi->xPhraseNextColumn(pFts, &iter, &iCol) -** ){ -** // Column iCol contains at least one instance of phrase iPhrase -** } -** -** This API can be quite slow if used with an FTS5 table created with the -** "detail=none" option. If the FTS5 table is created with either -** "detail=none" "content=" option (i.e. if it is a contentless table), -** then this API always iterates through an empty set (all calls to -** xPhraseFirstColumn() set iCol to -1). -** -** The information accessed using this API and its companion -** xPhraseFirstColumn() may also be obtained using xPhraseFirst/xPhraseNext -** (or xInst/xInstCount). The chief advantage of this API is that it is -** significantly more efficient than those alternatives when used with -** "detail=column" tables. -** -** xPhraseNextColumn() -** See xPhraseFirstColumn above. -*/ -struct Fts5ExtensionApi { - int iVersion; /* Currently always set to 3 */ - - void *(*xUserData)(Fts5Context*); - - int (*xColumnCount)(Fts5Context*); - int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow); - int (*xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken); - - int (*xTokenize)(Fts5Context*, - const char *pText, int nText, /* Text to tokenize */ - void *pCtx, /* Context passed to xToken() */ - int (*xToken)(void*, int, const char*, int, int, int) /* Callback */ - ); - - int (*xPhraseCount)(Fts5Context*); - int (*xPhraseSize)(Fts5Context*, int iPhrase); - - int (*xInstCount)(Fts5Context*, int *pnInst); - int (*xInst)(Fts5Context*, int iIdx, int *piPhrase, int *piCol, int *piOff); - - sqlite3_int64 (*xRowid)(Fts5Context*); - int (*xColumnText)(Fts5Context*, int iCol, const char **pz, int *pn); - int (*xColumnSize)(Fts5Context*, int iCol, int *pnToken); - - int (*xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData, - int(*)(const Fts5ExtensionApi*,Fts5Context*,void*) - ); - int (*xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*)); - void *(*xGetAuxdata)(Fts5Context*, int bClear); - - int (*xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*); - void (*xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff); - - int (*xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*); - void (*xPhraseNextColumn)(Fts5Context*, Fts5PhraseIter*, int *piCol); -}; - -/* -** CUSTOM AUXILIARY FUNCTIONS -*************************************************************************/ - -/************************************************************************* -** CUSTOM TOKENIZERS -** -** Applications may also register custom tokenizer types. A tokenizer -** is registered by providing fts5 with a populated instance of the -** following structure. All structure methods must be defined, setting -** any member of the fts5_tokenizer struct to NULL leads to undefined -** behaviour. The structure methods are expected to function as follows: -** -** xCreate: -** This function is used to allocate and initialize a tokenizer instance. -** A tokenizer instance is required to actually tokenize text. -** -** The first argument passed to this function is a copy of the (void*) -** pointer provided by the application when the fts5_tokenizer object -** was registered with FTS5 (the third argument to xCreateTokenizer()). -** The second and third arguments are an array of nul-terminated strings -** containing the tokenizer arguments, if any, specified following the -** tokenizer name as part of the CREATE VIRTUAL TABLE statement used -** to create the FTS5 table. -** -** The final argument is an output variable. If successful, (*ppOut) -** should be set to point to the new tokenizer handle and SQLITE_OK -** returned. If an error occurs, some value other than SQLITE_OK should -** be returned. In this case, fts5 assumes that the final value of *ppOut -** is undefined. -** -** xDelete: -** This function is invoked to delete a tokenizer handle previously -** allocated using xCreate(). Fts5 guarantees that this function will -** be invoked exactly once for each successful call to xCreate(). -** -** xTokenize: -** This function is expected to tokenize the nText byte string indicated -** by argument pText. pText may or may not be nul-terminated. The first -** argument passed to this function is a pointer to an Fts5Tokenizer object -** returned by an earlier call to xCreate(). -** -** The second argument indicates the reason that FTS5 is requesting -** tokenization of the supplied text. This is always one of the following -** four values: -** -** <ul><li> <b>FTS5_TOKENIZE_DOCUMENT</b> - A document is being inserted into -** or removed from the FTS table. The tokenizer is being invoked to -** determine the set of tokens to add to (or delete from) the -** FTS index. -** -** <li> <b>FTS5_TOKENIZE_QUERY</b> - A MATCH query is being executed -** against the FTS index. The tokenizer is being called to tokenize -** a bareword or quoted string specified as part of the query. -** -** <li> <b>(FTS5_TOKENIZE_QUERY | FTS5_TOKENIZE_PREFIX)</b> - Same as -** FTS5_TOKENIZE_QUERY, except that the bareword or quoted string is -** followed by a "*" character, indicating that the last token -** returned by the tokenizer will be treated as a token prefix. -** -** <li> <b>FTS5_TOKENIZE_AUX</b> - The tokenizer is being invoked to -** satisfy an fts5_api.xTokenize() request made by an auxiliary -** function. Or an fts5_api.xColumnSize() request made by the same -** on a columnsize=0 database. -** </ul> -** -** For each token in the input string, the supplied callback xToken() must -** be invoked. The first argument to it should be a copy of the pointer -** passed as the second argument to xTokenize(). The third and fourth -** arguments are a pointer to a buffer containing the token text, and the -** size of the token in bytes. The 4th and 5th arguments are the byte offsets -** of the first byte of and first byte immediately following the text from -** which the token is derived within the input. -** -** The second argument passed to the xToken() callback ("tflags") should -** normally be set to 0. The exception is if the tokenizer supports -** synonyms. In this case see the discussion below for details. -** -** FTS5 assumes the xToken() callback is invoked for each token in the -** order that they occur within the input text. -** -** If an xToken() callback returns any value other than SQLITE_OK, then -** the tokenization should be abandoned and the xTokenize() method should -** immediately return a copy of the xToken() return value. Or, if the -** input buffer is exhausted, xTokenize() should return SQLITE_OK. Finally, -** if an error occurs with the xTokenize() implementation itself, it -** may abandon the tokenization and return any error code other than -** SQLITE_OK or SQLITE_DONE. -** -** SYNONYM SUPPORT -** -** Custom tokenizers may also support synonyms. Consider a case in which a -** user wishes to query for a phrase such as "first place". Using the -** built-in tokenizers, the FTS5 query 'first + place' will match instances -** of "first place" within the document set, but not alternative forms -** such as "1st place". In some applications, it would be better to match -** all instances of "first place" or "1st place" regardless of which form -** the user specified in the MATCH query text. -** -** There are several ways to approach this in FTS5: -** -** <ol><li> By mapping all synonyms to a single token. In this case, the -** In the above example, this means that the tokenizer returns the -** same token for inputs "first" and "1st". Say that token is in -** fact "first", so that when the user inserts the document "I won -** 1st place" entries are added to the index for tokens "i", "won", -** "first" and "place". If the user then queries for '1st + place', -** the tokenizer substitutes "first" for "1st" and the query works -** as expected. -** -** <li> By adding multiple synonyms for a single term to the FTS index. -** In this case, when tokenizing query text, the tokenizer may -** provide multiple synonyms for a single term within the document. -** FTS5 then queries the index for each synonym individually. For -** example, faced with the query: -** -** <codeblock> -** ... MATCH 'first place'</codeblock> -** -** the tokenizer offers both "1st" and "first" as synonyms for the -** first token in the MATCH query and FTS5 effectively runs a query -** similar to: -** -** <codeblock> -** ... MATCH '(first OR 1st) place'</codeblock> -** -** except that, for the purposes of auxiliary functions, the query -** still appears to contain just two phrases - "(first OR 1st)" -** being treated as a single phrase. -** -** <li> By adding multiple synonyms for a single term to the FTS index. -** Using this method, when tokenizing document text, the tokenizer -** provides multiple synonyms for each token. So that when a -** document such as "I won first place" is tokenized, entries are -** added to the FTS index for "i", "won", "first", "1st" and -** "place". -** -** This way, even if the tokenizer does not provide synonyms -** when tokenizing query text (it should not - to do would be -** inefficient), it doesn't matter if the user queries for -** 'first + place' or '1st + place', as there are entires in the -** FTS index corresponding to both forms of the first token. -** </ol> -** -** Whether it is parsing document or query text, any call to xToken that -** specifies a <i>tflags</i> argument with the FTS5_TOKEN_COLOCATED bit -** is considered to supply a synonym for the previous token. For example, -** when parsing the document "I won first place", a tokenizer that supports -** synonyms would call xToken() 5 times, as follows: -** -** <codeblock> -** xToken(pCtx, 0, "i", 1, 0, 1); -** xToken(pCtx, 0, "won", 3, 2, 5); -** xToken(pCtx, 0, "first", 5, 6, 11); -** xToken(pCtx, FTS5_TOKEN_COLOCATED, "1st", 3, 6, 11); -** xToken(pCtx, 0, "place", 5, 12, 17); -**</codeblock> -** -** It is an error to specify the FTS5_TOKEN_COLOCATED flag the first time -** xToken() is called. Multiple synonyms may be specified for a single token -** by making multiple calls to xToken(FTS5_TOKEN_COLOCATED) in sequence. -** There is no limit to the number of synonyms that may be provided for a -** single token. -** -** In many cases, method (1) above is the best approach. It does not add -** extra data to the FTS index or require FTS5 to query for multiple terms, -** so it is efficient in terms of disk space and query speed. However, it -** does not support prefix queries very well. If, as suggested above, the -** token "first" is subsituted for "1st" by the tokenizer, then the query: -** -** <codeblock> -** ... MATCH '1s*'</codeblock> -** -** will not match documents that contain the token "1st" (as the tokenizer -** will probably not map "1s" to any prefix of "first"). -** -** For full prefix support, method (3) may be preferred. In this case, -** because the index contains entries for both "first" and "1st", prefix -** queries such as 'fi*' or '1s*' will match correctly. However, because -** extra entries are added to the FTS index, this method uses more space -** within the database. -** -** Method (2) offers a midpoint between (1) and (3). Using this method, -** a query such as '1s*' will match documents that contain the literal -** token "1st", but not "first" (assuming the tokenizer is not able to -** provide synonyms for prefixes). However, a non-prefix query like '1st' -** will match against "1st" and "first". This method does not require -** extra disk space, as no extra entries are added to the FTS index. -** On the other hand, it may require more CPU cycles to run MATCH queries, -** as separate queries of the FTS index are required for each synonym. -** -** When using methods (2) or (3), it is important that the tokenizer only -** provide synonyms when tokenizing document text (method (2)) or query -** text (method (3)), not both. Doing so will not cause any errors, but is -** inefficient. -*/ -typedef struct Fts5Tokenizer Fts5Tokenizer; -typedef struct fts5_tokenizer fts5_tokenizer; -struct fts5_tokenizer { - int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut); - void (*xDelete)(Fts5Tokenizer*); - int (*xTokenize)(Fts5Tokenizer*, - void *pCtx, - int flags, /* Mask of FTS5_TOKENIZE_* flags */ - const char *pText, int nText, - int (*xToken)( - void *pCtx, /* Copy of 2nd argument to xTokenize() */ - int tflags, /* Mask of FTS5_TOKEN_* flags */ - const char *pToken, /* Pointer to buffer containing token */ - int nToken, /* Size of token in bytes */ - int iStart, /* Byte offset of token within input text */ - int iEnd /* Byte offset of end of token within input text */ - ) - ); -}; - -/* Flags that may be passed as the third argument to xTokenize() */ -#define FTS5_TOKENIZE_QUERY 0x0001 -#define FTS5_TOKENIZE_PREFIX 0x0002 -#define FTS5_TOKENIZE_DOCUMENT 0x0004 -#define FTS5_TOKENIZE_AUX 0x0008 - -/* Flags that may be passed by the tokenizer implementation back to FTS5 -** as the third argument to the supplied xToken callback. */ -#define FTS5_TOKEN_COLOCATED 0x0001 /* Same position as prev. token */ - -/* -** END OF CUSTOM TOKENIZERS -*************************************************************************/ - -/************************************************************************* -** FTS5 EXTENSION REGISTRATION API -*/ -typedef struct fts5_api fts5_api; -struct fts5_api { - int iVersion; /* Currently always set to 2 */ - - /* Create a new tokenizer */ - int (*xCreateTokenizer)( - fts5_api *pApi, - const char *zName, - void *pContext, - fts5_tokenizer *pTokenizer, - void (*xDestroy)(void*) - ); - - /* Find an existing tokenizer */ - int (*xFindTokenizer)( - fts5_api *pApi, - const char *zName, - void **ppContext, - fts5_tokenizer *pTokenizer - ); - - /* Create a new auxiliary function */ - int (*xCreateFunction)( - fts5_api *pApi, - const char *zName, - void *pContext, - fts5_extension_function xFunction, - void (*xDestroy)(void*) - ); -}; - -/* -** END OF REGISTRATION API -*************************************************************************/ - -#ifdef __cplusplus -} /* end of the 'extern "C"' block */ -#endif - -#endif /* _FTS5_H */ - -/******** End of fts5.h *********/ diff --git a/builddir/zlib-1.2.8/README b/builddir/zlib-1.2.8/README deleted file mode 100644 index 5ca9d12..0000000 --- a/builddir/zlib-1.2.8/README +++ /dev/null @@ -1,115 +0,0 @@ -ZLIB DATA COMPRESSION LIBRARY - -zlib 1.2.8 is a general purpose data compression library. All the code is -thread safe. The data format used by the zlib library is described by RFCs -(Request for Comments) 1950 to 1952 in the files -http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and -rfc1952 (gzip format). - -All functions of the compression library are documented in the file zlib.h -(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example -of the library is given in the file test/example.c which also tests that -the library is working correctly. Another example is given in the file -test/minigzip.c. The compression library itself is composed of all source -files in the root directory. - -To compile all files and run the test program, follow the instructions given at -the top of Makefile.in. In short "./configure; make test", and if that goes -well, "make install" should work for most flavors of Unix. For Windows, use -one of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use -make_vms.com. - -Questions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant -<info@winimage.com> for the Windows DLL version. The zlib home page is -http://zlib.net/ . Before reporting a problem, please check this site to -verify that you have the latest version of zlib; otherwise get the latest -version and check whether the problem still exists or not. - -PLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help. - -Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997 -issue of Dr. Dobb's Journal; a copy of the article is available at -http://marknelson.us/1997/01/01/zlib-engine/ . - -The changes made in version 1.2.8 are documented in the file ChangeLog. - -Unsupported third party contributions are provided in directory contrib/ . - -zlib is available in Java using the java.util.zip package, documented at -http://java.sun.com/developer/technicalArticles/Programming/compression/ . - -A Perl interface to zlib written by Paul Marquess <pmqs@cpan.org> is available -at CPAN (Comprehensive Perl Archive Network) sites, including -http://search.cpan.org/~pmqs/IO-Compress-Zlib/ . - -A Python interface to zlib written by A.M. Kuchling <amk@amk.ca> is -available in Python 1.5 and later versions, see -http://docs.python.org/library/zlib.html . - -zlib is built into tcl: http://wiki.tcl.tk/4610 . - -An experimental package to read and write files in .zip format, written on top -of zlib by Gilles Vollant <info@winimage.com>, is available in the -contrib/minizip directory of zlib. - - -Notes for some targets: - -- For Windows DLL versions, please see win32/DLL_FAQ.txt - -- For 64-bit Irix, deflate.c must be compiled without any optimization. With - -O, one libpng test fails. The test works in 32 bit mode (with the -n32 - compiler flag). The compiler bug has been reported to SGI. - -- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works - when compiled with cc. - -- On Digital Unix 4.0D (formely OSF/1) on AlphaServer, the cc option -std1 is - necessary to get gzprintf working correctly. This is done by configure. - -- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with - other compilers. Use "make test" to check your compiler. - -- gzdopen is not supported on RISCOS or BEOS. - -- For PalmOs, see http://palmzlib.sourceforge.net/ - - -Acknowledgments: - - The deflate format used by zlib was defined by Phil Katz. The deflate and - zlib specifications were written by L. Peter Deutsch. Thanks to all the - people who reported problems and suggested various improvements in zlib; they - are too numerous to cite here. - -Copyright notice: - - (C) 1995-2013 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - -If you use the zlib library in a product, we would appreciate *not* receiving -lengthy legal documents to sign. The sources are provided for free but without -warranty of any kind. The library has been entirely written by Jean-loup -Gailly and Mark Adler; it does not include third-party code. - -If you redistribute modified sources, we would appreciate that you include in -the file ChangeLog history information documenting your changes. Please read -the FAQ for more information on the distribution of modified source versions. diff --git a/builddir/zlib-1.2.8/bin/ZlibDllRelease/vc100.pdb b/builddir/zlib-1.2.8/bin/ZlibDllRelease/vc100.pdb deleted file mode 100644 index b8b4e00..0000000 Binary files a/builddir/zlib-1.2.8/bin/ZlibDllRelease/vc100.pdb and /dev/null differ diff --git a/builddir/zlib-1.2.8/bin/ZlibDllRelease/zlibwapi.dll b/builddir/zlib-1.2.8/bin/ZlibDllRelease/zlibwapi.dll deleted file mode 100644 index d25aa55..0000000 Binary files a/builddir/zlib-1.2.8/bin/ZlibDllRelease/zlibwapi.dll and /dev/null differ diff --git a/builddir/zlib-1.2.8/bin/ZlibDllRelease/zlibwapi.exp b/builddir/zlib-1.2.8/bin/ZlibDllRelease/zlibwapi.exp deleted file mode 100644 index 2483fd6..0000000 Binary files a/builddir/zlib-1.2.8/bin/ZlibDllRelease/zlibwapi.exp and /dev/null differ diff --git a/builddir/zlib-1.2.8/bin/ZlibDllRelease/zlibwapi.lib b/builddir/zlib-1.2.8/bin/ZlibDllRelease/zlibwapi.lib deleted file mode 100644 index a170d3f..0000000 Binary files a/builddir/zlib-1.2.8/bin/ZlibDllRelease/zlibwapi.lib and /dev/null differ diff --git a/builddir/zlib-1.2.8/bin/ZlibDllRelease/zlibwapi.map b/builddir/zlib-1.2.8/bin/ZlibDllRelease/zlibwapi.map deleted file mode 100644 index 1069c2d..0000000 --- a/builddir/zlib-1.2.8/bin/ZlibDllRelease/zlibwapi.map +++ /dev/null @@ -1,948 +0,0 @@ - zlibwapi - - Timestamp is 54eb6f2b (Mon Feb 23 19:19:23 2015) - - Preferred load address is 10000000 - - Start Length Name Class - 0001:00000000 00018b8aH .text CODE - 0002:00000000 00000110H .idata$5 DATA - 0002:00000110 00000004H .CRT$XCA DATA - 0002:00000114 00000004H .CRT$XCZ DATA - 0002:00000118 00000004H .CRT$XIA DATA - 0002:0000011c 00000010H .CRT$XIC DATA - 0002:0000012c 00000004H .CRT$XIZ DATA - 0002:00000130 00000004H .CRT$XPA DATA - 0002:00000134 00000004H .CRT$XPX DATA - 0002:00000138 00000004H .CRT$XPXA DATA - 0002:0000013c 00000004H .CRT$XPZ DATA - 0002:00000140 00000004H .CRT$XTA DATA - 0002:00000144 00000004H .CRT$XTZ DATA - 0002:00000148 00005da8H .rdata DATA - 0002:00005ef0 00000004H .rtc$IAA DATA - 0002:00005ef4 00000004H .rtc$IZZ DATA - 0002:00005ef8 00000004H .rtc$TAA DATA - 0002:00005efc 00000004H .rtc$TZZ DATA - 0002:00005f00 0000041cH .xdata$x DATA - 0002:0000631c 00000014H .idata$2 DATA - 0002:00006330 00000014H .idata$3 DATA - 0002:00006344 00000110H .idata$4 DATA - 0002:00006454 000004caH .idata$6 DATA - 0002:00006920 00000c44H .edata DATA - 0003:00000000 00000fb0H .data DATA - 0003:00000fc0 00001de4H .bss DATA - 0004:00000000 00000058H .rsrc$01 DATA - 0004:00000060 00000338H .rsrc$02 DATA - - Address Publics by Value Rva+Base Lib:Object - - 0000:00000000 ___safe_se_handler_count 00000000 <absolute> - 0000:00000000 ___safe_se_handler_table 00000000 <absolute> - 0000:00000000 __except_list 00000000 <absolute> - 0000:00000000 ___ImageBase 10000000 <linker-defined> - 0001:00000000 _adler32@12 10001000 f adler32.obj - 0001:00000330 _adler32_combine@12 10001330 f adler32.obj - 0001:00000350 _compress2@20 10001350 f compress.obj - 0001:00000400 _compress@16 10001400 f compress.obj - 0001:00000420 _compressBound@4 10001420 f compress.obj - 0001:00000440 _get_crc_table@0 10001440 f crc32.obj - 0001:00000450 _crc32@12 10001450 f crc32.obj - 0001:00000860 _crc32_combine@12 10001860 f crc32.obj - 0001:00000880 _deflateInit_@16 10001880 f deflate.obj - 0001:000008b0 _deflateInit2_@32 100018b0 f deflate.obj - 0001:00000af0 _deflateSetDictionary@12 10001af0 f deflate.obj - 0001:00000c80 _deflateResetKeep@4 10001c80 f deflate.obj - 0001:00000d30 _deflateReset@4 10001d30 f deflate.obj - 0001:00000d60 _deflateSetHeader@8 10001d60 f deflate.obj - 0001:00000d90 _deflatePending@12 10001d90 f deflate.obj - 0001:00000dd0 _deflatePrime@12 10001dd0 f deflate.obj - 0001:00000e60 _deflateParams@12 10001e60 f deflate.obj - 0001:00000f60 _deflateTune@20 10001f60 f deflate.obj - 0001:00000fb0 _deflateBound@8 10001fb0 f deflate.obj - 0001:00001110 _deflate@8 10002110 f deflate.obj - 0001:00001970 _deflateEnd@4 10002970 f deflate.obj - 0001:00001a50 _deflateCopy@8 10002a50 f deflate.obj - 0001:00002ba0 _gzclose@4 10003ba0 f gzclose.obj - 0001:00002ef0 _gzopen@8 10003ef0 f gzlib.obj - 0001:00002f10 _gzdopen@8 10003f10 f gzlib.obj - 0001:00002f60 _gzopen_w@8 10003f60 f gzlib.obj - 0001:00002f80 _gzbuffer@8 10003f80 f gzlib.obj - 0001:00002fc0 _gzrewind@4 10003fc0 f gzlib.obj - 0001:00003020 _gzseek64@16 10004020 f gzlib.obj - 0001:000031a0 _gzseek@12 100041a0 f gzlib.obj - 0001:000031e0 _gztell64@4 100041e0 f gzlib.obj - 0001:00003230 _gztell@4 10004230 f gzlib.obj - 0001:00003260 _gzoffset64@4 10004260 f gzlib.obj - 0001:000032b0 _gzoffset@4 100042b0 f gzlib.obj - 0001:000032e0 _gzeof@4 100042e0 f gzlib.obj - 0001:00003310 _gzerror@8 10004310 f gzlib.obj - 0001:00003360 _gzclearerr@4 10004360 f gzlib.obj - 0001:000033a0 _gz_error 100043a0 f gzlib.obj - 0001:000038b0 _gzread@12 100048b0 f gzread.obj - 0001:00003a30 _gzgetc@4 10004a30 f gzread.obj - 0001:00003a90 _gzgetc_@4 10004a90 f gzread.obj - 0001:00003aa0 _gzungetc@8 10004aa0 f gzread.obj - 0001:00003b80 _gzgets@12 10004b80 f gzread.obj - 0001:00003c90 _gzdirect@4 10004c90 f gzread.obj - 0001:00003cd0 _gzclose_r@4 10004cd0 f gzread.obj - 0001:00004020 _gzwrite@12 10005020 f gzwrite.obj - 0001:00004140 _gzputc@8 10005140 f gzwrite.obj - 0001:00004200 _gzputs@8 10005200 f gzwrite.obj - 0001:00004240 _gzvprintf 10005240 f gzwrite.obj - 0001:00004310 _gzprintf 10005310 f gzwrite.obj - 0001:00004330 _gzflush@8 10005330 f gzwrite.obj - 0001:000043b0 _gzsetparams@12 100053b0 f gzwrite.obj - 0001:00004460 _gzclose_w@4 10005460 f gzwrite.obj - 0001:00004520 _inflateBackInit_@20 10005520 f infback.obj - 0001:00004610 _inflateBack@20 10005610 f infback.obj - 0001:00005310 _inflateBackEnd@4 10006310 f infback.obj - 0001:00005350 _inflateResetKeep@4 10006350 f inflate.obj - 0001:000053d0 _inflateReset@4 100063d0 f inflate.obj - 0001:00005400 _inflateReset2@8 10006400 f inflate.obj - 0001:00005490 _inflateInit2_@16 10006490 f inflate.obj - 0001:00005550 _inflateInit_@12 10006550 f inflate.obj - 0001:00005570 _inflatePrime@12 10006570 f inflate.obj - 0001:000056f0 _inflate@8 100066f0 f inflate.obj - 0001:00006bf0 _inflateEnd@4 10007bf0 f inflate.obj - 0001:00006c50 _inflateGetDictionary@12 10007c50 f inflate.obj - 0001:00006cc0 _inflateSetDictionary@12 10007cc0 f inflate.obj - 0001:00006d60 _inflateGetHeader@8 10007d60 f inflate.obj - 0001:00006e00 _inflateSync@4 10007e00 f inflate.obj - 0001:00006ef0 _inflateSyncPoint@4 10007ef0 f inflate.obj - 0001:00006f30 _inflateCopy@8 10007f30 f inflate.obj - 0001:00007090 _inflateUndermine@8 10008090 f inflate.obj - 0001:000070c0 _inflateMark@4 100080c0 f inflate.obj - 0001:00007130 _inflate_table 10008130 f inftrees.obj - 0001:00007520 _call_zopen64 10008520 f ioapi.obj - 0001:00007540 _call_zseek64 10008540 f ioapi.obj - 0001:000075a0 _call_ztell64 100085a0 f ioapi.obj - 0001:000075d0 _fill_zlib_filefunc64_32_def_from_filefunc32 100085d0 f ioapi.obj - 0001:00007750 _fill_fopen64_filefunc 10008750 f ioapi.obj - 0001:00007840 _win32_open64_file_func 10008840 f iowin32.obj - 0001:00007840 _win32_open64_file_funcA 10008840 f iowin32.obj - 0001:00007840 _win32_open_file_func 10008840 f iowin32.obj - 0001:000078a0 _win32_open64_file_funcW 100088a0 f iowin32.obj - 0001:00007900 _win32_read_file_func 10008900 f iowin32.obj - 0001:00007950 _win32_write_file_func 10008950 f iowin32.obj - 0001:000079f0 _win32_tell_file_func 100089f0 f iowin32.obj - 0001:00007a40 _win32_tell64_file_func 10008a40 f iowin32.obj - 0001:00007aa0 _win32_seek_file_func 10008aa0 f iowin32.obj - 0001:00007af0 _win32_seek64_file_func 10008af0 f iowin32.obj - 0001:00007b50 _win32_close_file_func 10008b50 f iowin32.obj - 0001:00007b80 _win32_error_file_func 10008b80 f iowin32.obj - 0001:00007ba0 _fill_win32_filefunc 10008ba0 f iowin32.obj - 0001:00007be0 _fill_win32_filefunc64 10008be0 f iowin32.obj - 0001:00007be0 _fill_win32_filefunc64A 10008be0 f iowin32.obj - 0001:00007c20 _fill_win32_filefunc64W 10008c20 f iowin32.obj - 0001:00007c60 __tr_init 10008c60 f trees.obj - 0001:00008c00 __tr_stored_block 10009c00 f trees.obj - 0001:00008c90 __tr_flush_bits 10009c90 f trees.obj - 0001:00008ca0 __tr_align 10009ca0 f trees.obj - 0001:00008d90 __tr_flush_block 10009d90 f trees.obj - 0001:00009560 _uncompress@16 1000a560 f uncompr.obj - 0001:00009890 _unzStringFileNameCompare@12 1000a890 f unzip.obj - 0001:0000a130 _unzOpen2@8 1000b130 f unzip.obj - 0001:0000a180 _unzOpen2_64@8 1000b180 f unzip.obj - 0001:0000a1e0 _unzOpen@4 1000b1e0 f unzip.obj - 0001:0000a200 _unzOpen64@4 1000b200 f unzip.obj - 0001:0000a220 _unzClose@4 1000b220 f unzip.obj - 0001:0000a260 _unzGetGlobalInfo64@8 1000b260 f unzip.obj - 0001:0000a2a0 _unzGetGlobalInfo@8 1000b2a0 f unzip.obj - 0001:0000a890 _unzGetCurrentFileInfo64@32 1000b890 f unzip.obj - 0001:0000a8c0 _unzGetCurrentFileInfo@32 1000b8c0 f unzip.obj - 0001:0000a9a0 _unzGoToFirstFile@4 1000b9a0 f unzip.obj - 0001:0000aa10 _unzGoToNextFile@4 1000ba10 f unzip.obj - 0001:0000aac0 _unzLocateFile@12 1000bac0 f unzip.obj - 0001:0000ac00 _unzGetFilePos64@8 1000bc00 f unzip.obj - 0001:0000ac50 _unzGetFilePos@8 1000bc50 f unzip.obj - 0001:0000ac80 _unzGoToFilePos64@8 1000bc80 f unzip.obj - 0001:0000acf0 _unzGoToFilePos@8 1000bcf0 f unzip.obj - 0001:0000af70 _unzOpenCurrentFile3@20 1000bf70 f unzip.obj - 0001:0000b1b0 _unzOpenCurrentFile@4 1000c1b0 f unzip.obj - 0001:0000b1d0 _unzOpenCurrentFilePassword@8 1000c1d0 f unzip.obj - 0001:0000b1f0 _unzOpenCurrentFile2@16 1000c1f0 f unzip.obj - 0001:0000b210 _unzGetCurrentFileZStreamPos64@4 1000c210 f unzip.obj - 0001:0000b250 _unzReadCurrentFile@12 1000c250 f unzip.obj - 0001:0000b4f0 _unztell@4 1000c4f0 f unzip.obj - 0001:0000b520 _unztell64@4 1000c520 f unzip.obj - 0001:0000b550 _unzeof@4 1000c550 f unzip.obj - 0001:0000b590 _unzGetLocalExtrafield@12 1000c590 f unzip.obj - 0001:0000b650 _unzCloseCurrentFile@4 1000c650 f unzip.obj - 0001:0000b700 _unzGetGlobalComment@12 1000c700 f unzip.obj - 0001:0000c060 _LoadCentralDirectoryRecord 1000d060 f zip.obj - 0001:0000c500 _zipOpen3@16 1000d500 f zip.obj - 0001:0000c660 _zipOpen2@16 1000d660 f zip.obj - 0001:0000c6b0 _zipOpen2_64@16 1000d6b0 f zip.obj - 0001:0000c710 _zipOpen64@8 1000d710 f zip.obj - 0001:0000c710 _zipOpen@8 1000d710 f zip.obj - 0001:0000c730 _Write_LocalFileHeader 1000d730 f zip.obj - 0001:0000c950 _zipOpenNewFileInZip4_64@76 1000d950 f zip.obj - 0001:0000ce20 _zipOpenNewFileInZip3@64 1000de20 f zip.obj - 0001:0000ce80 _zipOpenNewFileInZip3_64@68 1000de80 f zip.obj - 0001:0000cee0 _zipOpenNewFileInZip2@44 1000dee0 f zip.obj - 0001:0000cf30 _zipOpenNewFileInZip2_64@48 1000df30 f zip.obj - 0001:0000cf80 _zipOpenNewFileInZip64@44 1000df80 f zip.obj - 0001:0000cfd0 _zipOpenNewFileInZip@40 1000dfd0 f zip.obj - 0001:0000d0e0 _zipWriteInFileInZip@12 1000e0e0 f zip.obj - 0001:0000d1e0 _zipCloseFileInZipRaw@12 1000e1e0 f zip.obj - 0001:0000d200 _zipCloseFileInZipRaw64@16 1000e200 f zip.obj - 0001:0000d710 _zipCloseFileInZip@4 1000e710 f zip.obj - 0001:0000d730 _Write_Zip64EndOfCentralDirectoryLocator 1000e730 f zip.obj - 0001:0000d7b0 _Write_Zip64EndOfCentralDirectoryRecord 1000e7b0 f zip.obj - 0001:0000d8d0 _Write_EndOfCentralDirectoryRecord 1000e8d0 f zip.obj - 0001:0000da10 _Write_GlobalComment 1000ea10 f zip.obj - 0001:0000da80 _zipClose@8 1000ea80 f zip.obj - 0001:0000dc00 _zlibVersion@0 1000ec00 f zutil.obj - 0001:0000dc10 _zlibCompileFlags@0 1000ec10 f zutil.obj - 0001:0000dc20 _zError@4 1000ec20 f zutil.obj - 0001:0000dc40 _zcalloc 1000ec40 f zutil.obj - 0001:0000dc60 _zcfree 1000ec60 f zutil.obj - 0001:0000dc80 _longest_match 1000ec80 f match686.obj - 0001:0000de68 _match_init 1000ee68 f match686.obj - 0001:0000df70 _inflate_fast 1000ef70 f inffas32.obj - 0001:0000e603 __lseeki64_nolock 1000f603 f LIBCMT:lseeki64.obj - 0001:0000e688 __lseeki64 1000f688 f LIBCMT:lseeki64.obj - 0001:0000eea7 __wopen 1000fea7 f LIBCMT:wopen.obj - 0001:0000ef55 _free 1000ff55 f LIBCMT:free.obj - 0001:0000ef8f _malloc 1000ff8f f LIBCMT:malloc.obj - 0001:0000f023 __snprintf 10010023 f LIBCMT:snprintf.obj - 0001:0000f0cf ??0_LocaleUpdate@@QAE@PAUlocaleinfo_struct@@@Z 100100cf f i LIBCMT:wcstombs.obj - 0001:0000f156 __wcstombs_l_helper 10010156 f LIBCMT:wcstombs.obj - 0001:0000f3bd _wcstombs 100103bd f LIBCMT:wcstombs.obj - 0001:0000f3d7 __get_sys_err_msg 100103d7 f i LIBCMT:strerror.obj - 0001:0000f3ff _strerror 100103ff f LIBCMT:strerror.obj - 0001:0000f470 _memchr 10010470 f LIBCMT:memchr.obj - 0001:0000f51d __get_errno_from_oserr 1001051d f LIBCMT:dosmap.obj - 0001:0000f55f __errno 1001055f f LIBCMT:dosmap.obj - 0001:0000f572 ___doserrno 10010572 f LIBCMT:dosmap.obj - 0001:0000f585 __dosmaperr 10010585 f LIBCMT:dosmap.obj - 0001:0000f5a8 __ftelli64_nolock 100105a8 f LIBCMT:ftelli64.obj - 0001:0000f8f2 __ftelli64 100108f2 f LIBCMT:ftelli64.obj - 0001:0000f95f __fseeki64_nolock 1001095f f LIBCMT:fseeki64.obj - 0001:0000f9fb __fseeki64 100109fb f LIBCMT:fseeki64.obj - 0001:0000fa7a __fsopen 10010a7a f LIBCMT:fopen.obj - 0001:0000fb36 _fopen 10010b36 f LIBCMT:fopen.obj - 0001:0000fb4d __fread_nolock_s 10010b4d f LIBCMT:fread.obj - 0001:0000fd09 _fread_s 10010d09 f LIBCMT:fread.obj - 0001:0000fd97 _fread 10010d97 f LIBCMT:fread.obj - 0001:0000fdb4 _ferror 10010db4 f LIBCMT:feoferr.obj - 0001:0000fddc __fwrite_nolock 10010ddc f LIBCMT:fwrite.obj - 0001:0000ff33 _fwrite 10010f33 f LIBCMT:fwrite.obj - 0001:0000ffad __fclose_nolock 10010fad f LIBCMT:fclose.obj - 0001:0001001a _fclose 1001101a f LIBCMT:fclose.obj - 0001:0001008e _srand 1001108e f LIBCMT:rand.obj - 0001:000100a0 _rand 100110a0 f LIBCMT:rand.obj - 0001:000100c1 __time64 100110c1 f LIBCMT:time64.obj - 0001:00010112 __CRT_INIT@12 10011112 f LIBCMT:dllcrt0.obj - 0001:0001036c __DllMainCRTStartup@12 1001136c f LIBCMT:dllcrt0.obj - 0001:0001038f __ioinit 1001138f f LIBCMT:ioinit.obj - 0001:000105d4 __ioterm 100115d4 f LIBCMT:ioinit.obj - 0001:00010627 __set_osfhnd 10011627 f LIBCMT:osfinfo.obj - 0001:000106a8 __free_osfhnd 100116a8 f LIBCMT:osfinfo.obj - 0001:0001072e __get_osfhandle 1001172e f LIBCMT:osfinfo.obj - 0001:00010797 ___lock_fhandle 10011797 f LIBCMT:osfinfo.obj - 0001:00010836 __unlock_fhandle 10011836 f LIBCMT:osfinfo.obj - 0001:0001085d __alloc_osfhnd 1001185d f LIBCMT:osfinfo.obj - 0001:000109f6 __initp_misc_invarg 100119f6 f LIBCMT:invarg.obj - 0001:00010a05 __call_reportfault 10011a05 f LIBCMT:invarg.obj - 0001:00010b2e __invoke_watson 10011b2e f LIBCMT:invarg.obj - 0001:00010b53 __invalid_parameter 10011b53 f LIBCMT:invarg.obj - 0001:00010b80 __invalid_parameter_noinfo 10011b80 f LIBCMT:invarg.obj - 0001:00010b90 __SEH_prolog4 10011b90 f LIBCMT:sehprolg4.obj - 0001:00010bd5 __SEH_epilog4 10011bd5 f LIBCMT:sehprolg4.obj - 0001:00010bf0 __except_handler4 10011bf0 f LIBCMT:chandler4.obj - 0001:00010d7f __write_nolock 10011d7f f LIBCMT:write.obj - 0001:0001147c _write 1001247c f LIBCMT:write.obj - 0001:0001147c __write 1001247c f LIBCMT:write.obj - 0001:00011550 __chsize_nolock 10012550 f LIBCMT:chsize.obj - 0001:00011706 __read_nolock 10012706 f LIBCMT:read.obj - 0001:00011cbd _read 10012cbd f LIBCMT:read.obj - 0001:00011cbd __read 10012cbd f LIBCMT:read.obj - 0001:00011db3 __close_nolock 10012db3 f LIBCMT:close.obj - 0001:00011e4f _close 10012e4f f LIBCMT:close.obj - 0001:00011e4f __close 10012e4f f LIBCMT:close.obj - 0001:00011f13 __lseek_nolock 10012f13 f LIBCMT:lseek.obj - 0001:00011f88 ___crtCorExitProcess 10012f88 f LIBCMT:crt0dat.obj - 0001:00011fb3 ___crtExitProcess 10012fb3 f LIBCMT:crt0dat.obj - 0001:00011fcb __lockexit 10012fcb f LIBCMT:crt0dat.obj - 0001:00011fd4 __unlockexit 10012fd4 f LIBCMT:crt0dat.obj - 0001:00011fdd __init_pointers 10012fdd f LIBCMT:crt0dat.obj - 0001:00012010 __initterm_e 10013010 f LIBCMT:crt0dat.obj - 0001:00012034 __cinit 10013034 f LIBCMT:crt0dat.obj - 0001:0001220b __exit 1001320b f LIBCMT:crt0dat.obj - 0001:00012221 __cexit 10013221 f LIBCMT:crt0dat.obj - 0001:00012230 __amsg_exit 10013230 f LIBCMT:crt0dat.obj - 0001:0001224e __setmode_nolock 1001324e f LIBCMT:setmode.obj - 0001:00012309 __get_fmode 10013309 f LIBCMT:setmode.obj - 0001:00012336 __heap_init 10013336 f LIBCMT:heapinit.obj - 0001:00012354 __heap_term 10013354 f LIBCMT:heapinit.obj - 0001:00012368 __GET_RTERRMSG 10013368 f LIBCMT:crt0msg.obj - 0001:0001238e __NMSG_WRITE 1001338e f LIBCMT:crt0msg.obj - 0001:0001253d __FF_MSGBANNER 1001353d f LIBCMT:crt0msg.obj - 0001:00012576 __initp_heap_handler 10013576 f LIBCMT:handler.obj - 0001:00012585 __callnewh 10013585 f LIBCMT:handler.obj - 0001:000125ad __flsbuf 100135ad f LIBCMT:_flsbuf.obj - 0001:00012791 __output_l 10013791 f LIBCMT:output.obj - 0001:0001333d __vsnprintf_l 1001433d f LIBCMT:vsnprint.obj - 0001:000133e9 _vsnprintf 100143e9 f LIBCMT:vsnprint.obj - 0001:000133e9 __vsnprintf 100143e9 f LIBCMT:vsnprint.obj - 0001:00013629 ___updatetmbcinfo 10014629 f LIBCMT:mbctype.obj - 0001:00013749 __setmbcp_nolock 10014749 f LIBCMT:mbctype.obj - 0001:00013932 __setmbcp 10014932 f LIBCMT:mbctype.obj - 0001:00013acc ___initmbctable 10014acc f LIBCMT:mbctype.obj - 0001:00013aea ___addlocaleref 10014aea f LIBCMT:localref.obj - 0001:00013b79 ___removelocaleref 10014b79 f LIBCMT:localref.obj - 0001:00013c12 ___freetlocinfo 10014c12 f LIBCMT:localref.obj - 0001:00013d5d __updatetlocinfoEx_nolock 10014d5d f LIBCMT:localref.obj - 0001:00013daa ___updatetlocinfo 10014daa f LIBCMT:localref.obj - 0001:00013e23 __encoded_null 10014e23 f LIBCMT:tidtable.obj - 0001:00013e2c ___crtTlsAlloc@4 10014e2c f LIBCMT:tidtable.obj - 0001:00013e35 ___set_flsgetvalue 10014e35 f LIBCMT:tidtable.obj - 0001:00013e69 __mtterm 10014e69 f LIBCMT:tidtable.obj - 0001:00013ea6 __initptd 10014ea6 f LIBCMT:tidtable.obj - 0001:00013f5a __getptd_noexit 10014f5a f LIBCMT:tidtable.obj - 0001:00013fd3 __getptd 10014fd3 f LIBCMT:tidtable.obj - 0001:00013fed __freefls@4 10014fed f LIBCMT:tidtable.obj - 0001:0001411c __freeptd 1001511c f LIBCMT:tidtable.obj - 0001:0001418a __mtinit 1001518a f LIBCMT:tidtable.obj - 0001:00014305 @__security_check_cookie@4 10015305 f LIBCMT:secchk.obj - 0001:00014314 ___sys_nerr 10015314 f LIBCMT:syserr.obj - 0001:0001431a ___sys_errlist 1001531a f LIBCMT:syserr.obj - 0001:00014320 _strcpy_s 10015320 f LIBCMT:strcpy_s.obj - 0001:0001437f __malloc_crt 1001537f f LIBCMT:crtheap.obj - 0001:000143c4 __calloc_crt 100153c4 f LIBCMT:crtheap.obj - 0001:00014410 __realloc_crt 10015410 f LIBCMT:crtheap.obj - 0001:0001445e __fileno 1001545e f LIBCMT:fileno.obj - 0001:00014490 __chkstk 10015490 f LIBCMT:chkstk.obj - 0001:00014490 __alloca_probe 10015490 LIBCMT:chkstk.obj - 0001:000144bb ___iob_func 100154bb f LIBCMT:_file.obj - 0001:000144c1 ___initstdio 100154c1 f LIBCMT:_file.obj - 0001:00014572 ___endstdio 10015572 f LIBCMT:_file.obj - 0001:00014592 __lock_file 10015592 f LIBCMT:_file.obj - 0001:000145d3 __lock_file2 100155d3 f LIBCMT:_file.obj - 0001:00014605 __unlock_file 10015605 f LIBCMT:_file.obj - 0001:00014641 __unlock_file2 10015641 f LIBCMT:_file.obj - 0001:00014670 __flush 10015670 f LIBCMT:fflush.obj - 0001:000146d8 __fflush_nolock 100156d8 f LIBCMT:fflush.obj - 0001:000147fa __flushall 100157fa f LIBCMT:fflush.obj - 0001:00014803 __openfile 10015803 f LIBCMT:_open.obj - 0001:00014a9a __getstream 10015a9a f LIBCMT:stream.obj - 0001:00014bd0 __local_unwind4 10015bd0 f LIBCMT:exsup4.obj - 0001:00014ca6 __seh_longjmp_unwind4@4 10015ca6 f LIBCMT:exsup4.obj - 0001:00014cc2 @_EH4_CallFilterFunc@8 10015cc2 f LIBCMT:exsup4.obj - 0001:00014cd9 @_EH4_TransferToHandler@8 10015cd9 f LIBCMT:exsup4.obj - 0001:00014cf2 @_EH4_GlobalUnwind2@8 10015cf2 f LIBCMT:exsup4.obj - 0001:00014d0b @_EH4_LocalUnwind@16 10015d0b f LIBCMT:exsup4.obj - 0001:00014d22 __filbuf 10015d22 f LIBCMT:_filbuf.obj - 0001:00014e44 _memcpy_s 10015e44 f LIBCMT:memcpy_s.obj - 0001:00014ec0 _memset 10015ec0 f LIBCMT:memset.obj - 0001:00014f40 _memcpy 10015f40 f LIBCMT:memcpy.obj - 0001:000152a1 __freebuf 100162a1 f LIBCMT:_freebuf.obj - 0001:000152e0 __aulldiv 100162e0 f LIBCMT:ulldiv.obj - 0001:00015348 __setenvp 10016348 f LIBCMT:stdenvp.obj - 0001:000155be __setargv 100165be f LIBCMT:stdargv.obj - 0001:00015679 ___crtGetEnvironmentStringsA 10016679 f LIBCMT:a_env.obj - 0001:00015710 __RTC_Initialize 10016710 f LIBCMT:_initsect_.obj - 0001:00015736 __RTC_Terminate 10016736 f LIBCMT:_initsect_.obj - 0001:0001575c __XcptFilter 1001675c f LIBCMT:winxfltr.obj - 0001:000158a6 ___CppXcptFilter 100168a6 f LIBCMT:winxfltr.obj - 0001:000158c6 _DllMain@12 100168c6 f LIBCMT:dllmain.obj - 0001:000158cc ___security_init_cookie 100168cc f LIBCMT:gs_support.obj - 0001:00015967 __mtinitlocks 10016967 f LIBCMT:mlock.obj - 0001:000159b1 __mtdeletelocks 100169b1 f LIBCMT:mlock.obj - 0001:00015a08 __unlock 10016a08 f LIBCMT:mlock.obj - 0001:00015a1f __mtinitlocknum 10016a1f f LIBCMT:mlock.obj - 0001:00015ae1 __lock 10016ae1 f LIBCMT:mlock.obj - 0001:00015b14 __crt_debugger_hook 10016b14 f LIBCMT:dbghook.obj - 0001:00015b20 __ValidateImageBase 10016b20 f LIBCMT:pesect.obj - 0001:00015b60 __FindPESection 10016b60 f LIBCMT:pesect.obj - 0001:00015bb0 __IsNonwritableInCurrentImage 10016bb0 f LIBCMT:pesect.obj - 0001:00015c6c __putwch_nolock 10016c6c f LIBCMT:putwch.obj - 0001:00015cae __mbtowc_l 10016cae f LIBCMT:mbtowc.obj - 0001:00015dc4 _mbtowc 10016dc4 f LIBCMT:mbtowc.obj - 0001:00015dde __isleadbyte_l 10016dde f i LIBCMT:_wctype.obj - 0001:00015e16 _isleadbyte 10016e16 f i LIBCMT:_wctype.obj - 0001:00015e29 __isatty 10016e29 f LIBCMT:isatty.obj - 0001:00015e7f ?terminate@@YAXXZ 10016e7f f LIBCMT:hooks.obj - 0001:00015eb8 __initp_eh_hooks 10016eb8 f LIBCMT:hooks.obj - 0001:00015ec9 __initp_misc_winsig 10016ec9 f LIBCMT:winsig.obj - 0001:00015f1e ___get_sigabrt 10016f1e f LIBCMT:winsig.obj - 0001:00015f2b _raise 10016f2b f LIBCMT:winsig.obj - 0001:000160ce __initp_misc_rand_s 100170ce f LIBCMT:rand_s.obj - 0001:000160dd __initp_misc_purevirt 100170dd f LIBCMT:inithelp.obj - 0001:000161a2 ___onexitinit 100171a2 f LIBCMT:onexit.obj - 0001:000161d3 __onexit 100171d3 f LIBCMT:onexit.obj - 0001:0001620f _atexit 1001720f f LIBCMT:onexit.obj - 0001:00016226 __initp_misc_cfltcvt_tab 10017226 f LIBCMT:cmiscdat.obj - 0001:00016250 _strlen 10017250 f LIBCMT:strlen.obj - 0001:000162db ___crtMessageBoxW 100172db f LIBCMT:crtmboxw.obj - 0001:00016447 _wcscat_s 10017447 f LIBCMT:wcscat_s.obj - 0001:000164bc _wcsncpy_s 100174bc f LIBCMT:wcsncpy_s.obj - 0001:00016589 _wcslen 10017589 f LIBCMT:wcslen.obj - 0001:000165a4 _wcscpy_s 100175a4 f LIBCMT:wcscpy_s.obj - 0001:00016607 __set_error_mode 10017607 f LIBCMT:errmode.obj - 0001:00016646 __getbuf 10017646 f LIBCMT:_getbuf.obj - 0001:0001668f __get_printf_count_output 1001768f f LIBCMT:printf.obj - 0001:000166a5 __wctomb_s_l 100176a5 f LIBCMT:wctomb.obj - 0001:000167fa _wctomb_s 100177fa f LIBCMT:wctomb.obj - 0001:00016820 __aulldvrm 10017820 f LIBCMT:ulldvrm.obj - 0001:000168b5 __freea 100178b5 f i LIBCMT:a_map.obj - 0001:00016abc ___crtLCMapStringA 10017abc f LIBCMT:a_map.obj - 0001:00016be9 ___crtGetStringTypeA 10017be9 f LIBCMT:a_str.obj - 0001:00016c29 ___free_lc_time 10017c29 f LIBCMT:inittime.obj - 0001:00016fa0 ___free_lconv_num 10017fa0 f LIBCMT:initnum.obj - 0001:00017009 ___free_lconv_mon 10018009 f LIBCMT:initmon.obj - 0001:00017107 ___report_gsfailure 10018107 f LIBCMT:gs_report.obj - 0001:0001720d __calloc_impl 1001820d f LIBCMT:calloc_impl.obj - 0001:0001728f _realloc 1001828f f LIBCMT:realloc.obj - 0001:0001733c __fcloseall 1001833c f LIBCMT:closeall.obj - 0001:000173d8 __commit 100183d8 f LIBCMT:commit.obj - 0001:00017be5 __open 10018be5 f LIBCMT:open.obj - 0001:00017be5 _open 10018be5 f LIBCMT:open.obj - 0001:00017c93 __sopen_helper 10018c93 f LIBCMT:open.obj - 0001:00017d57 __sopen_s 10018d57 f LIBCMT:open.obj - 0001:00017d77 __mbsnbicmp_l 10018d77 f LIBCMT:mbsnbicm.obj - 0001:00017f7b __mbsnbicmp 10018f7b f LIBCMT:mbsnbicm.obj - 0001:00017f95 __mbsnbcmp_l 10018f95 f LIBCMT:mbsnbcmp.obj - 0001:000180e1 __mbsnbcmp 100190e1 f LIBCMT:mbsnbcmp.obj - 0001:00018100 __global_unwind2 10019100 f LIBCMT:exsup.obj - 0001:00018165 __local_unwind2 10019165 f LIBCMT:exsup.obj - 0001:000181e9 __abnormal_termination 100191e9 f LIBCMT:exsup.obj - 0001:0001820c __NLG_Notify1 1001920c f LIBCMT:exsup.obj - 0001:00018215 __NLG_Notify 10019215 f LIBCMT:exsup.obj - 0001:0001822c __NLG_Dispatch 1001922c LIBCMT:exsup.obj - 0001:0001822c __NLG_Dispatch2 1001922c LIBCMT:exsup.obj - 0001:00018234 __NLG_Call 10019234 f LIBCMT:exsup.obj - 0001:00018236 __NLG_Return2 10019236 LIBCMT:exsup.obj - 0001:00018237 __VEC_memzero 10019237 f LIBCMT:p4_memset.obj - 0001:000182f1 ___sse2_available_init 100192f1 f LIBCMT:cpu_disp.obj - 0001:00018301 __VEC_memcpy 10019301 f LIBCMT:p4_memcpy.obj - 0001:00018457 __ismbblead 10019457 f LIBCMT:ismbbyte.obj - 0001:0001846f ___initconout 1001946f f LIBCMT:initcon.obj - 0001:0001848e ___termconout 1001948e f LIBCMT:initcon.obj - 0001:000184a5 _abort 100194a5 f LIBCMT:abort.obj - 0001:000184d8 __msize 100194d8 f LIBCMT:msize.obj - 0001:0001850b __fptrap 1001950b f LIBCMT:crt0fp.obj - 0001:00018520 __alloca_probe_16 10019520 f LIBCMT:alloca16.obj - 0001:00018536 __alloca_probe_8 10019536 LIBCMT:alloca16.obj - 0001:0001854c __strnicmp_l 1001954c f LIBCMT:strnicmp.obj - 0001:0001862e __strnicmp 1001962e f LIBCMT:strnicmp.obj - 0001:00018681 _strncmp 10019681 f LIBCMT:strncmp.obj - 0001:00018741 __tolower_l 10019741 f LIBCMT:tolower.obj - 0001:00018860 ___ascii_strnicmp 10019860 f LIBCMT:_strnicm.obj - 0001:000188c1 __isctype_l 100198c1 f LIBCMT:isctype.obj - 0001:00018980 _strcspn 10019980 f LIBCMT:strcspn.obj - 0001:000189d0 _strcmp 100199d0 f LIBCMT:strcmp.obj - 0001:00018a60 _strpbrk 10019a60 f LIBCMT:strpbrk.obj - 0001:00018aa0 __allmul 10019aa0 f LIBCMT:llmul.obj - 0001:00018ad4 _RtlUnwind@16 10019ad4 f kernel32:KERNEL32.dll - 0001:00018ae0 __alldiv 10019ae0 f LIBCMT:lldiv.obj - 0002:00000000 __imp__CreateFileA@28 1001a000 kernel32:KERNEL32.dll - 0002:00000004 __imp__SetFilePointer@16 1001a004 kernel32:KERNEL32.dll - 0002:00000008 __imp__WriteFile@20 1001a008 kernel32:KERNEL32.dll - 0002:0000000c __imp__ReadFile@20 1001a00c kernel32:KERNEL32.dll - 0002:00000010 __imp__CreateFileW@28 1001a010 kernel32:KERNEL32.dll - 0002:00000014 __imp__GetLastError@0 1001a014 kernel32:KERNEL32.dll - 0002:00000018 __imp__CloseHandle@4 1001a018 kernel32:KERNEL32.dll - 0002:0000001c __imp__GetFileType@4 1001a01c kernel32:KERNEL32.dll - 0002:00000020 __imp__HeapFree@12 1001a020 kernel32:KERNEL32.dll - 0002:00000024 __imp__HeapAlloc@12 1001a024 kernel32:KERNEL32.dll - 0002:00000028 __imp__WideCharToMultiByte@32 1001a028 kernel32:KERNEL32.dll - 0002:0000002c __imp__GetSystemTimeAsFileTime@4 1001a02c kernel32:KERNEL32.dll - 0002:00000030 __imp__GetCurrentThreadId@0 1001a030 kernel32:KERNEL32.dll - 0002:00000034 __imp__DecodePointer@4 1001a034 kernel32:KERNEL32.dll - 0002:00000038 __imp__GetCommandLineA@0 1001a038 kernel32:KERNEL32.dll - 0002:0000003c __imp__SetHandleCount@4 1001a03c kernel32:KERNEL32.dll - 0002:00000040 __imp__GetStdHandle@4 1001a040 kernel32:KERNEL32.dll - 0002:00000044 __imp__InitializeCriticalSectionAndSpinCount@8 1001a044 kernel32:KERNEL32.dll - 0002:00000048 __imp__GetStartupInfoW@4 1001a048 kernel32:KERNEL32.dll - 0002:0000004c __imp__DeleteCriticalSection@4 1001a04c kernel32:KERNEL32.dll - 0002:00000050 __imp__SetStdHandle@8 1001a050 kernel32:KERNEL32.dll - 0002:00000054 __imp__EnterCriticalSection@4 1001a054 kernel32:KERNEL32.dll - 0002:00000058 __imp__LeaveCriticalSection@4 1001a058 kernel32:KERNEL32.dll - 0002:0000005c __imp__UnhandledExceptionFilter@4 1001a05c kernel32:KERNEL32.dll - 0002:00000060 __imp__SetUnhandledExceptionFilter@4 1001a060 kernel32:KERNEL32.dll - 0002:00000064 __imp__IsDebuggerPresent@0 1001a064 kernel32:KERNEL32.dll - 0002:00000068 __imp__EncodePointer@4 1001a068 kernel32:KERNEL32.dll - 0002:0000006c __imp__TerminateProcess@8 1001a06c kernel32:KERNEL32.dll - 0002:00000070 __imp__GetCurrentProcess@0 1001a070 kernel32:KERNEL32.dll - 0002:00000074 __imp__GetConsoleCP@0 1001a074 kernel32:KERNEL32.dll - 0002:00000078 __imp__GetConsoleMode@8 1001a078 kernel32:KERNEL32.dll - 0002:0000007c __imp__SetEndOfFile@4 1001a07c kernel32:KERNEL32.dll - 0002:00000080 __imp__GetProcessHeap@0 1001a080 kernel32:KERNEL32.dll - 0002:00000084 __imp__MultiByteToWideChar@24 1001a084 kernel32:KERNEL32.dll - 0002:00000088 __imp__GetProcAddress@8 1001a088 kernel32:KERNEL32.dll - 0002:0000008c __imp__GetModuleHandleW@4 1001a08c kernel32:KERNEL32.dll - 0002:00000090 __imp__ExitProcess@4 1001a090 kernel32:KERNEL32.dll - 0002:00000094 __imp__HeapCreate@12 1001a094 kernel32:KERNEL32.dll - 0002:00000098 __imp__HeapDestroy@4 1001a098 kernel32:KERNEL32.dll - 0002:0000009c __imp__GetModuleFileNameW@12 1001a09c kernel32:KERNEL32.dll - 0002:000000a0 __imp__GetCPInfo@8 1001a0a0 kernel32:KERNEL32.dll - 0002:000000a4 __imp__InterlockedIncrement@4 1001a0a4 kernel32:KERNEL32.dll - 0002:000000a8 __imp__InterlockedDecrement@4 1001a0a8 kernel32:KERNEL32.dll - 0002:000000ac __imp__GetACP@0 1001a0ac kernel32:KERNEL32.dll - 0002:000000b0 __imp__GetOEMCP@0 1001a0b0 kernel32:KERNEL32.dll - 0002:000000b4 __imp__IsValidCodePage@4 1001a0b4 kernel32:KERNEL32.dll - 0002:000000b8 __imp__TlsAlloc@0 1001a0b8 kernel32:KERNEL32.dll - 0002:000000bc __imp__TlsGetValue@4 1001a0bc kernel32:KERNEL32.dll - 0002:000000c0 __imp__TlsSetValue@8 1001a0c0 kernel32:KERNEL32.dll - 0002:000000c4 __imp__TlsFree@4 1001a0c4 kernel32:KERNEL32.dll - 0002:000000c8 __imp__SetLastError@4 1001a0c8 kernel32:KERNEL32.dll - 0002:000000cc __imp__Sleep@4 1001a0cc kernel32:KERNEL32.dll - 0002:000000d0 __imp__RtlUnwind@16 1001a0d0 kernel32:KERNEL32.dll - 0002:000000d4 __imp__GetModuleFileNameA@12 1001a0d4 kernel32:KERNEL32.dll - 0002:000000d8 __imp__FreeEnvironmentStringsW@4 1001a0d8 kernel32:KERNEL32.dll - 0002:000000dc __imp__GetEnvironmentStringsW@0 1001a0dc kernel32:KERNEL32.dll - 0002:000000e0 __imp__QueryPerformanceCounter@4 1001a0e0 kernel32:KERNEL32.dll - 0002:000000e4 __imp__GetTickCount@0 1001a0e4 kernel32:KERNEL32.dll - 0002:000000e8 __imp__GetCurrentProcessId@0 1001a0e8 kernel32:KERNEL32.dll - 0002:000000ec __imp__WriteConsoleW@20 1001a0ec kernel32:KERNEL32.dll - 0002:000000f0 __imp__LoadLibraryW@4 1001a0f0 kernel32:KERNEL32.dll - 0002:000000f4 __imp__LCMapStringW@24 1001a0f4 kernel32:KERNEL32.dll - 0002:000000f8 __imp__GetStringTypeW@16 1001a0f8 kernel32:KERNEL32.dll - 0002:000000fc __imp__HeapReAlloc@16 1001a0fc kernel32:KERNEL32.dll - 0002:00000100 __imp__FlushFileBuffers@4 1001a100 kernel32:KERNEL32.dll - 0002:00000104 __imp__IsProcessorFeaturePresent@4 1001a104 kernel32:KERNEL32.dll - 0002:00000108 __imp__HeapSize@12 1001a108 kernel32:KERNEL32.dll - 0002:0000010c \177KERNEL32_NULL_THUNK_DATA 1001a10c kernel32:KERNEL32.dll - 0002:00000110 ___xc_a 1001a110 LIBCMT:crt0init.obj - 0002:00000114 ___xc_z 1001a114 LIBCMT:crt0init.obj - 0002:00000118 ___xi_a 1001a118 LIBCMT:crt0init.obj - 0002:0000012c ___xi_z 1001a12c LIBCMT:crt0init.obj - 0002:00000130 ___xp_a 1001a130 LIBCMT:crt0init.obj - 0002:0000013c ___xp_z 1001a13c LIBCMT:crt0init.obj - 0002:00000140 ___xt_a 1001a140 LIBCMT:crt0init.obj - 0002:00000144 ___xt_z 1001a144 LIBCMT:crt0init.obj - 0002:00000148 ??_C@_0EA@FCLIIPNN@Visual?5C?$CL?$CL?5CRT?3?5Not?5enough?5memor@ 1001a148 LIBCMT:strerror.obj - 0002:00000188 __pDefaultRawDllMain 1001a188 LIBCMT:dllcrt0.obj - 0002:00000188 __pRawDllMain 1001a188 LIBCMT:dllcrt0.obj - 0002:0000018c ??_C@_0P@MIGLKIOC@CorExitProcess?$AA@ 1001a18c LIBCMT:crt0dat.obj - 0002:0000019c ??_C@_1BI@BGOHAHKC@?$AAm?$AAs?$AAc?$AAo?$AAr?$AAe?$AAe?$AA?4?$AAd?$AAl?$AAl?$AA?$AA@ 1001a19c LIBCMT:crt0dat.obj - 0002:000001b4 ??_C@_1BO@BKOMIGKJ@?$AAr?$AAu?$AAn?$AAt?$AAi?$AAm?$AAe?$AA?5?$AAe?$AAr?$AAr?$AAo?$AAr?$AA?5?$AA?$AA@ 1001a1b4 LIBCMT:crt0msg.obj - 0002:000001d4 ??_C@_15JNBOKNOG@?$AA?$AN?$AA?6?$AA?$AA@ 1001a1d4 LIBCMT:crt0msg.obj - 0002:000001dc ??_C@_1BM@JBBEPPHI@?$AAT?$AAL?$AAO?$AAS?$AAS?$AA?5?$AAe?$AAr?$AAr?$AAo?$AAr?$AA?$AN?$AA?6?$AA?$AA@ 1001a1dc LIBCMT:crt0msg.obj - 0002:000001f8 ??_C@_1BK@KMOMNAAI@?$AAS?$AAI?$AAN?$AAG?$AA?5?$AAe?$AAr?$AAr?$AAo?$AAr?$AA?$AN?$AA?6?$AA?$AA@ 1001a1f8 LIBCMT:crt0msg.obj - 0002:00000214 ??_C@_1BO@BFCDCGC@?$AAD?$AAO?$AAM?$AAA?$AAI?$AAN?$AA?5?$AAe?$AAr?$AAr?$AAo?$AAr?$AA?$AN?$AA?6?$AA?$AA@ 1001a214 LIBCMT:crt0msg.obj - 0002:00000238 ??_C@_1BOO@KGEDBGAJ@?$AAR?$AA6?$AA0?$AA3?$AA3?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAA?$AAt?$AAt?$AAe?$AAm?$AAp?$AAt?$AA?5?$AAt?$AAo?$AA?5?$AAu?$AAs?$AAe?$AA?5?$AAM?$AAS?$AAI?$AAL?$AA?5?$AAc?$AAo?$AAd@ 1001a238 LIBCMT:crt0msg.obj - 0002:00000428 ??_C@_1GG@GOPILAJP@?$AAR?$AA6?$AA0?$AA3?$AA2?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAn?$AAo?$AAt?$AA?5?$AAe?$AAn?$AAo?$AAu?$AAg?$AAh?$AA?5?$AAs?$AAp?$AAa?$AAc?$AAe?$AA?5?$AAf?$AAo?$AAr?$AA?5?$AAl?$AAo@ 1001a428 LIBCMT:crt0msg.obj - 0002:00000490 ??_C@_1MG@ENCOOIDF@?$AAR?$AA6?$AA0?$AA3?$AA1?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAA?$AAt?$AAt?$AAe?$AAm?$AAp?$AAt?$AA?5?$AAt?$AAo?$AA?5?$AAi?$AAn?$AAi?$AAt?$AAi?$AAa?$AAl?$AAi?$AAz?$AAe?$AA?5?$AAt@ 1001a490 LIBCMT:crt0msg.obj - 0002:00000558 ??_C@_1DO@BMFCDCD@?$AAR?$AA6?$AA0?$AA3?$AA0?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAC?$AAR?$AAT?$AA?5?$AAn?$AAo?$AAt?$AA?5?$AAi?$AAn?$AAi?$AAt?$AAi?$AAa?$AAl?$AAi?$AAz?$AAe?$AAd?$AA?$AN?$AA?6?$AA?$AA@ 1001a558 LIBCMT:crt0msg.obj - 0002:00000598 ??_C@_1EK@HHFLMAOL@?$AAR?$AA6?$AA0?$AA2?$AA8?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAu?$AAn?$AAa?$AAb?$AAl?$AAe?$AA?5?$AAt?$AAo?$AA?5?$AAi?$AAn?$AAi?$AAt?$AAi?$AAa?$AAl?$AAi?$AAz?$AAe?$AA?5?$AAh?$AAe@ 1001a598 LIBCMT:crt0msg.obj - 0002:000005e8 ??_C@_1GK@MFGOKLAG@?$AAR?$AA6?$AA0?$AA2?$AA7?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAn?$AAo?$AAt?$AA?5?$AAe?$AAn?$AAo?$AAu?$AAg?$AAh?$AA?5?$AAs?$AAp?$AAa?$AAc?$AAe?$AA?5?$AAf?$AAo?$AAr?$AA?5?$AAl?$AAo@ 1001a5e8 LIBCMT:crt0msg.obj - 0002:00000658 ??_C@_1GK@MCAAGJMO@?$AAR?$AA6?$AA0?$AA2?$AA6?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAn?$AAo?$AAt?$AA?5?$AAe?$AAn?$AAo?$AAu?$AAg?$AAh?$AA?5?$AAs?$AAp?$AAa?$AAc?$AAe?$AA?5?$AAf?$AAo?$AAr?$AA?5?$AAs?$AAt@ 1001a658 LIBCMT:crt0msg.obj - 0002:000006c8 ??_C@_1EM@MAADIHMB@?$AAR?$AA6?$AA0?$AA2?$AA5?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAp?$AAu?$AAr?$AAe?$AA?5?$AAv?$AAi?$AAr?$AAt?$AAu?$AAa?$AAl?$AA?5?$AAf?$AAu?$AAn?$AAc?$AAt?$AAi?$AAo?$AAn?$AA?5?$AAc@ 1001a6c8 LIBCMT:crt0msg.obj - 0002:00000718 ??_C@_1GK@FHCKBEFA@?$AAR?$AA6?$AA0?$AA2?$AA4?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAn?$AAo?$AAt?$AA?5?$AAe?$AAn?$AAo?$AAu?$AAg?$AAh?$AA?5?$AAs?$AAp?$AAa?$AAc?$AAe?$AA?5?$AAf?$AAo?$AAr?$AA?5?$AA_?$AAo@ 1001a718 LIBCMT:crt0msg.obj - 0002:00000788 ??_C@_1FC@ECHBIFBC@?$AAR?$AA6?$AA0?$AA1?$AA9?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAu?$AAn?$AAa?$AAb?$AAl?$AAe?$AA?5?$AAt?$AAo?$AA?5?$AAo?$AAp?$AAe?$AAn?$AA?5?$AAc?$AAo?$AAn?$AAs?$AAo?$AAl?$AAe?$AA?5@ 1001a788 LIBCMT:crt0msg.obj - 0002:000007e0 ??_C@_1EC@JIBHAOPH@?$AAR?$AA6?$AA0?$AA1?$AA8?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAu?$AAn?$AAe?$AAx?$AAp?$AAe?$AAc?$AAt?$AAe?$AAd?$AA?5?$AAh?$AAe?$AAa?$AAp?$AA?5?$AAe?$AAr?$AAr?$AAo?$AAr?$AA?$AN?$AA?6@ 1001a7e0 LIBCMT:crt0msg.obj - 0002:00000828 ??_C@_1FK@BEOGODMC@?$AAR?$AA6?$AA0?$AA1?$AA7?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAu?$AAn?$AAe?$AAx?$AAp?$AAe?$AAc?$AAt?$AAe?$AAd?$AA?5?$AAm?$AAu?$AAl?$AAt?$AAi?$AAt?$AAh?$AAr?$AAe?$AAa?$AAd?$AA?5@ 1001a828 LIBCMT:crt0msg.obj - 0002:00000888 ??_C@_1FI@LOGNIKDM@?$AAR?$AA6?$AA0?$AA1?$AA6?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAn?$AAo?$AAt?$AA?5?$AAe?$AAn?$AAo?$AAu?$AAg?$AAh?$AA?5?$AAs?$AAp?$AAa?$AAc?$AAe?$AA?5?$AAf?$AAo?$AAr?$AA?5?$AAt?$AAh@ 1001a888 LIBCMT:crt0msg.obj - 0002:000008e0 ??_C@_1EG@BEHAGFJD@?$AAR?$AA6?$AA0?$AA1?$AA0?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAa?$AAb?$AAo?$AAr?$AAt?$AA?$CI?$AA?$CJ?$AA?5?$AAh?$AAa?$AAs?$AA?5?$AAb?$AAe?$AAe?$AAn?$AA?5?$AAc?$AAa?$AAl?$AAl?$AAe?$AAd@ 1001a8e0 LIBCMT:crt0msg.obj - 0002:00000928 ??_C@_1FI@HONFMGBI@?$AAR?$AA6?$AA0?$AA0?$AA9?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAn?$AAo?$AAt?$AA?5?$AAe?$AAn?$AAo?$AAu?$AAg?$AAh?$AA?5?$AAs?$AAp?$AAa?$AAc?$AAe?$AA?5?$AAf?$AAo?$AAr?$AA?5?$AAe?$AAn@ 1001a928 LIBCMT:crt0msg.obj - 0002:00000980 ??_C@_1FE@LLNEDJMD@?$AAR?$AA6?$AA0?$AA0?$AA8?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAn?$AAo?$AAt?$AA?5?$AAe?$AAn?$AAo?$AAu?$AAg?$AAh?$AA?5?$AAs?$AAp?$AAa?$AAc?$AAe?$AA?5?$AAf?$AAo?$AAr?$AA?5?$AAa?$AAr@ 1001a980 LIBCMT:crt0msg.obj - 0002:000009d8 ??_C@_1FK@PGACCAFB@?$AAR?$AA6?$AA0?$AA0?$AA2?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAf?$AAl?$AAo?$AAa?$AAt?$AAi?$AAn?$AAg?$AA?5?$AAp?$AAo?$AAi?$AAn?$AAt?$AA?5?$AAs?$AAu?$AAp?$AAp?$AAo?$AAr?$AAt?$AA?5@ 1001a9d8 LIBCMT:crt0msg.obj - 0002:00000ae8 ??_C@_1EK@MBDPDCGA@?$AAM?$AAi?$AAc?$AAr?$AAo?$AAs?$AAo?$AAf?$AAt?$AA?5?$AAV?$AAi?$AAs?$AAu?$AAa?$AAl?$AA?5?$AAC?$AA?$CL?$AA?$CL?$AA?5?$AAR?$AAu?$AAn?$AAt?$AAi?$AAm?$AAe?$AA?5?$AAL?$AAi?$AAb@ 1001aae8 LIBCMT:crt0msg.obj - 0002:00000b34 ??_C@_15IABLJNFO@?$AA?6?$AA?6?$AA?$AA@ 1001ab34 LIBCMT:crt0msg.obj - 0002:00000b3c ??_C@_17LGKOMLJ@?$AA?4?$AA?4?$AA?4?$AA?$AA@ 1001ab3c LIBCMT:crt0msg.obj - 0002:00000b44 ??_C@_1CO@EAEJAADC@?$AA?$DM?$AAp?$AAr?$AAo?$AAg?$AAr?$AAa?$AAm?$AA?5?$AAn?$AAa?$AAm?$AAe?$AA?5?$AAu?$AAn?$AAk?$AAn?$AAo?$AAw?$AAn?$AA?$DO?$AA?$AA@ 1001ab44 LIBCMT:crt0msg.obj - 0002:00000b74 ??_C@_1DE@JNGNBFGO@?$AAR?$AAu?$AAn?$AAt?$AAi?$AAm?$AAe?$AA?5?$AAE?$AAr?$AAr?$AAo?$AAr?$AA?$CB?$AA?6?$AA?6?$AAP?$AAr?$AAo?$AAg?$AAr?$AAa?$AAm?$AA?3?$AA?5?$AA?$AA@ 1001ab74 LIBCMT:crt0msg.obj - 0002:00000ba8 ??_C@_1O@CEDCILHN@?$AA?$CI?$AAn?$AAu?$AAl?$AAl?$AA?$CJ?$AA?$AA@ 1001aba8 LIBCMT:output.obj - 0002:00000bb8 ??_C@_06OJHGLDPL@?$CInull?$CJ?$AA@ 1001abb8 LIBCMT:output.obj - 0002:00000bc0 ___lookuptable 1001abc0 LIBCMT:output.obj - 0002:00000c1c ??_C@_1BC@GDGBMEMK@?$AAH?$AAH?$AA?3?$AAm?$AAm?$AA?3?$AAs?$AAs?$AA?$AA@ 1001ac1c LIBCMT:nlsdata2.obj - 0002:00000c30 ??_C@_1CI@KNAKOEBC@?$AAd?$AAd?$AAd?$AAd?$AA?0?$AA?5?$AAM?$AAM?$AAM?$AAM?$AA?5?$AAd?$AAd?$AA?0?$AA?5?$AAy?$AAy?$AAy?$AAy?$AA?$AA@ 1001ac30 LIBCMT:nlsdata2.obj - 0002:00000c58 ??_C@_1BC@IEBCMHCM@?$AAM?$AAM?$AA?1?$AAd?$AAd?$AA?1?$AAy?$AAy?$AA?$AA@ 1001ac58 LIBCMT:nlsdata2.obj - 0002:00000c6c ??_C@_15CLMNNGEL@?$AAP?$AAM?$AA?$AA@ 1001ac6c LIBCMT:nlsdata2.obj - 0002:00000c74 ??_C@_15ODEHAHHF@?$AAA?$AAM?$AA?$AA@ 1001ac74 LIBCMT:nlsdata2.obj - 0002:00000c7c ??_C@_1BC@FEMKIFH@?$AAD?$AAe?$AAc?$AAe?$AAm?$AAb?$AAe?$AAr?$AA?$AA@ 1001ac7c LIBCMT:nlsdata2.obj - 0002:00000c90 ??_C@_1BC@BGLIFPF@?$AAN?$AAo?$AAv?$AAe?$AAm?$AAb?$AAe?$AAr?$AA?$AA@ 1001ac90 LIBCMT:nlsdata2.obj - 0002:00000ca4 ??_C@_1BA@EPANDLNG@?$AAO?$AAc?$AAt?$AAo?$AAb?$AAe?$AAr?$AA?$AA@ 1001aca4 LIBCMT:nlsdata2.obj - 0002:00000cb4 ??_C@_1BE@DKAAMBJL@?$AAS?$AAe?$AAp?$AAt?$AAe?$AAm?$AAb?$AAe?$AAr?$AA?$AA@ 1001acb4 LIBCMT:nlsdata2.obj - 0002:00000cc8 ??_C@_1O@PAHLKOAC@?$AAA?$AAu?$AAg?$AAu?$AAs?$AAt?$AA?$AA@ 1001acc8 LIBCMT:nlsdata2.obj - 0002:00000cd8 ??_C@_19BIFMLPCD@?$AAJ?$AAu?$AAl?$AAy?$AA?$AA@ 1001acd8 LIBCMT:nlsdata2.obj - 0002:00000ce4 ??_C@_19EPFLPGAP@?$AAJ?$AAu?$AAn?$AAe?$AA?$AA@ 1001ace4 LIBCMT:nlsdata2.obj - 0002:00000cf0 ??_C@_1M@GJNLMHFD@?$AAA?$AAp?$AAr?$AAi?$AAl?$AA?$AA@ 1001acf0 LIBCMT:nlsdata2.obj - 0002:00000cfc ??_C@_1M@IKEENEDF@?$AAM?$AAa?$AAr?$AAc?$AAh?$AA?$AA@ 1001acfc LIBCMT:nlsdata2.obj - 0002:00000d08 ??_C@_1BC@JGDDFFAM@?$AAF?$AAe?$AAb?$AAr?$AAu?$AAa?$AAr?$AAy?$AA?$AA@ 1001ad08 LIBCMT:nlsdata2.obj - 0002:00000d1c ??_C@_1BA@EFMEIEBA@?$AAJ?$AAa?$AAn?$AAu?$AAa?$AAr?$AAy?$AA?$AA@ 1001ad1c LIBCMT:nlsdata2.obj - 0002:00000d2c ??_C@_17EGKACKIF@?$AAD?$AAe?$AAc?$AA?$AA@ 1001ad2c LIBCMT:nlsdata2.obj - 0002:00000d34 ??_C@_17BBDMLCIG@?$AAN?$AAo?$AAv?$AA?$AA@ 1001ad34 LIBCMT:nlsdata2.obj - 0002:00000d3c ??_C@_17FNLKOI@?$AAO?$AAc?$AAt?$AA?$AA@ 1001ad3c LIBCMT:nlsdata2.obj - 0002:00000d44 ??_C@_17HCHCOKMG@?$AAS?$AAe?$AAp?$AA?$AA@ 1001ad44 LIBCMT:nlsdata2.obj - 0002:00000d4c ??_C@_17ICPELBCN@?$AAA?$AAu?$AAg?$AA?$AA@ 1001ad4c LIBCMT:nlsdata2.obj - 0002:00000d54 ??_C@_17IJPCKHK@?$AAJ?$AAu?$AAl?$AA?$AA@ 1001ad54 LIBCMT:nlsdata2.obj - 0002:00000d5c ??_C@_17KCJGOCPB@?$AAJ?$AAu?$AAn?$AA?$AA@ 1001ad5c LIBCMT:nlsdata2.obj - 0002:00000d64 ??_C@_17PNNKMEED@?$AAM?$AAa?$AAy?$AA?$AA@ 1001ad64 LIBCMT:nlsdata2.obj - 0002:00000d6c ??_C@_17LFPOIHDD@?$AAA?$AAp?$AAr?$AA?$AA@ 1001ad6c LIBCMT:nlsdata2.obj - 0002:00000d74 ??_C@_17CKNLEDEC@?$AAM?$AAa?$AAr?$AA?$AA@ 1001ad74 LIBCMT:nlsdata2.obj - 0002:00000d7c ??_C@_17LMDJEKJN@?$AAF?$AAe?$AAb?$AA?$AA@ 1001ad7c LIBCMT:nlsdata2.obj - 0002:00000d84 ??_C@_17DKNBKCHM@?$AAJ?$AAa?$AAn?$AA?$AA@ 1001ad84 LIBCMT:nlsdata2.obj - 0002:00000d8c ??_C@_1BC@ENMNNPAJ@?$AAS?$AAa?$AAt?$AAu?$AAr?$AAd?$AAa?$AAy?$AA?$AA@ 1001ad8c LIBCMT:nlsdata2.obj - 0002:00000da0 ??_C@_1O@PDICJHAG@?$AAF?$AAr?$AAi?$AAd?$AAa?$AAy?$AA?$AA@ 1001ada0 LIBCMT:nlsdata2.obj - 0002:00000db0 ??_C@_1BC@HHMNLIHE@?$AAT?$AAh?$AAu?$AAr?$AAs?$AAd?$AAa?$AAy?$AA?$AA@ 1001adb0 LIBCMT:nlsdata2.obj - 0002:00000dc4 ??_C@_1BE@EBOGMDOH@?$AAW?$AAe?$AAd?$AAn?$AAe?$AAs?$AAd?$AAa?$AAy?$AA?$AA@ 1001adc4 LIBCMT:nlsdata2.obj - 0002:00000dd8 ??_C@_1BA@ENFBFFEK@?$AAT?$AAu?$AAe?$AAs?$AAd?$AAa?$AAy?$AA?$AA@ 1001add8 LIBCMT:nlsdata2.obj - 0002:00000de8 ??_C@_1O@MMNBFLIA@?$AAM?$AAo?$AAn?$AAd?$AAa?$AAy?$AA?$AA@ 1001ade8 LIBCMT:nlsdata2.obj - 0002:00000df8 ??_C@_1O@IHNHDHPB@?$AAS?$AAu?$AAn?$AAd?$AAa?$AAy?$AA?$AA@ 1001adf8 LIBCMT:nlsdata2.obj - 0002:00000e08 ??_C@_17GGIBDPIH@?$AAS?$AAa?$AAt?$AA?$AA@ 1001ae08 LIBCMT:nlsdata2.obj - 0002:00000e10 ??_C@_17HFOLPPLP@?$AAF?$AAr?$AAi?$AA?$AA@ 1001ae10 LIBCMT:nlsdata2.obj - 0002:00000e18 ??_C@_17PDPHAADD@?$AAT?$AAh?$AAu?$AA?$AA@ 1001ae18 LIBCMT:nlsdata2.obj - 0002:00000e20 ??_C@_17CJEDCEPE@?$AAW?$AAe?$AAd?$AA?$AA@ 1001ae20 LIBCMT:nlsdata2.obj - 0002:00000e28 ??_C@_17BMKGEGOJ@?$AAT?$AAu?$AAe?$AA?$AA@ 1001ae28 LIBCMT:nlsdata2.obj - 0002:00000e30 ??_C@_17KBOMKBF@?$AAM?$AAo?$AAn?$AA?$AA@ 1001ae30 LIBCMT:nlsdata2.obj - 0002:00000e38 ??_C@_17MBGCMIPB@?$AAS?$AAu?$AAn?$AA?$AA@ 1001ae38 LIBCMT:nlsdata2.obj - 0002:00000e40 ??_C@_08JCCMCCIL@HH?3mm?3ss?$AA@ 1001ae40 LIBCMT:nlsdata2.obj - 0002:00000e4c ??_C@_0BE@CKGJFCPC@dddd?0?5MMMM?5dd?0?5yyyy?$AA@ 1001ae4c LIBCMT:nlsdata2.obj - 0002:00000e60 ??_C@_08BPBNCDIB@MM?1dd?1yy?$AA@ 1001ae60 LIBCMT:nlsdata2.obj - 0002:00000e6c ??_C@_02CJNFDJBF@PM?$AA@ 1001ae6c LIBCMT:nlsdata2.obj - 0002:00000e70 ??_C@_02DEDBPAFC@AM?$AA@ 1001ae70 LIBCMT:nlsdata2.obj - 0002:00000e74 ??_C@_08EDHMEBNP@December?$AA@ 1001ae74 LIBCMT:nlsdata2.obj - 0002:00000e80 ??_C@_08HCHEGEOA@November?$AA@ 1001ae80 LIBCMT:nlsdata2.obj - 0002:00000e8c ??_C@_07JJNFCEND@October?$AA@ 1001ae8c LIBCMT:nlsdata2.obj - 0002:00000e94 ??_C@_09BHHEALKD@September?$AA@ 1001ae94 LIBCMT:nlsdata2.obj - 0002:00000ea0 ??_C@_06LBBHFDDG@August?$AA@ 1001aea0 LIBCMT:nlsdata2.obj - 0002:00000ea8 ??_C@_04MIEPOIFP@July?$AA@ 1001aea8 LIBCMT:nlsdata2.obj - 0002:00000eb0 ??_C@_04CNLMGBGM@June?$AA@ 1001aeb0 LIBCMT:nlsdata2.obj - 0002:00000eb8 ??_C@_05DMJDNLEJ@April?$AA@ 1001aeb8 LIBCMT:nlsdata2.obj - 0002:00000ec0 ??_C@_05HPCKOFNC@March?$AA@ 1001aec0 LIBCMT:nlsdata2.obj - 0002:00000ec8 ??_C@_08GNJGEPFN@February?$AA@ 1001aec8 LIBCMT:nlsdata2.obj - 0002:00000ed4 ??_C@_07CGJPFGJA@January?$AA@ 1001aed4 LIBCMT:nlsdata2.obj - 0002:00000edc ??_C@_03MKABNOCG@Dec?$AA@ 1001aedc LIBCMT:nlsdata2.obj - 0002:00000ee0 ??_C@_03JPJOFNIA@Nov?$AA@ 1001aee0 LIBCMT:nlsdata2.obj - 0002:00000ee4 ??_C@_03BMAOKBAD@Oct?$AA@ 1001aee4 LIBCMT:nlsdata2.obj - 0002:00000ee8 ??_C@_03GGCAPAJC@Sep?$AA@ 1001aee8 LIBCMT:nlsdata2.obj - 0002:00000eec ??_C@_03IFJFEIGA@Aug?$AA@ 1001aeec LIBCMT:nlsdata2.obj - 0002:00000ef0 ??_C@_03LBGABGKK@Jul?$AA@ 1001aef0 LIBCMT:nlsdata2.obj - 0002:00000ef4 ??_C@_03IDFGHECI@Jun?$AA@ 1001aef4 LIBCMT:nlsdata2.obj - 0002:00000ef8 ??_C@_03CNMDKL@May?$AA@ 1001aef8 LIBCMT:nlsdata2.obj - 0002:00000efc ??_C@_03LEOLGMJP@Apr?$AA@ 1001aefc LIBCMT:nlsdata2.obj - 0002:00000f00 ??_C@_03ODNJBKGA@Mar?$AA@ 1001af00 LIBCMT:nlsdata2.obj - 0002:00000f04 ??_C@_03HJBDCHOM@Feb?$AA@ 1001af04 LIBCMT:nlsdata2.obj - 0002:00000f08 ??_C@_03JIHJHPIE@Jan?$AA@ 1001af08 LIBCMT:nlsdata2.obj - 0002:00000f0c ??_C@_08INBOOONO@Saturday?$AA@ 1001af0c LIBCMT:nlsdata2.obj - 0002:00000f18 ??_C@_06JECMNKMI@Friday?$AA@ 1001af18 LIBCMT:nlsdata2.obj - 0002:00000f20 ??_C@_08HACCIKIA@Thursday?$AA@ 1001af20 LIBCMT:nlsdata2.obj - 0002:00000f2c ??_C@_09DLIGFAKA@Wednesday?$AA@ 1001af2c LIBCMT:nlsdata2.obj - 0002:00000f38 ??_C@_07BAAGCFCM@Tuesday?$AA@ 1001af38 LIBCMT:nlsdata2.obj - 0002:00000f40 ??_C@_06JLEDEDGH@Monday?$AA@ 1001af40 LIBCMT:nlsdata2.obj - 0002:00000f48 ??_C@_06OOPIFAJ@Sunday?$AA@ 1001af48 LIBCMT:nlsdata2.obj - 0002:00000f50 ??_C@_03FEFJNEK@Sat?$AA@ 1001af50 LIBCMT:nlsdata2.obj - 0002:00000f54 ??_C@_03IDIOELNC@Fri?$AA@ 1001af54 LIBCMT:nlsdata2.obj - 0002:00000f58 ??_C@_03IOFIKPDN@Thu?$AA@ 1001af58 LIBCMT:nlsdata2.obj - 0002:00000f5c ??_C@_03MHOMLAJA@Wed?$AA@ 1001af5c LIBCMT:nlsdata2.obj - 0002:00000f60 ??_C@_03NAGEINEP@Tue?$AA@ 1001af60 LIBCMT:nlsdata2.obj - 0002:00000f64 ??_C@_03PDAGKDH@Mon?$AA@ 1001af64 LIBCMT:nlsdata2.obj - 0002:00000f68 ??_C@_03KOEHGMDN@Sun?$AA@ 1001af68 LIBCMT:nlsdata2.obj - 0002:00000f6c ??_C@_1BK@DBDEIDLH@?$AAK?$AAE?$AAR?$AAN?$AAE?$AAL?$AA3?$AA2?$AA?4?$AAD?$AAL?$AAL?$AA?$AA@ 1001af6c LIBCMT:tidtable.obj - 0002:00000f88 ??_C@_07PEJMOBNF@FlsFree?$AA@ 1001af88 LIBCMT:tidtable.obj - 0002:00000f90 ??_C@_0M@JCPCPOEF@FlsSetValue?$AA@ 1001af90 LIBCMT:tidtable.obj - 0002:00000f9c ??_C@_0M@GDNOONDI@FlsGetValue?$AA@ 1001af9c LIBCMT:tidtable.obj - 0002:00000fa8 ??_C@_08KNHFBNJ@FlsAlloc?$AA@ 1001afa8 LIBCMT:tidtable.obj - 0002:00000fb4 ??_C@_0BG@KLEAJEFJ@Illegal?5byte?5sequence?$AA@ 1001afb4 LIBCMT:syserr.obj - 0002:00000fcc ??_C@_0BE@ICMCHPHH@Directory?5not?5empty?$AA@ 1001afcc LIBCMT:syserr.obj - 0002:00000fe0 ??_C@_0BJ@IHEHINLI@Function?5not?5implemented?$AA@ 1001afe0 LIBCMT:syserr.obj - 0002:00000ffc ??_C@_0BD@CLHBCGPB@No?5locks?5available?$AA@ 1001affc LIBCMT:syserr.obj - 0002:00001010 ??_C@_0BC@BEDIHIDK@Filename?5too?5long?$AA@ 1001b010 LIBCMT:syserr.obj - 0002:00001024 ??_C@_0BK@JAEBMJJM@Resource?5deadlock?5avoided?$AA@ 1001b024 LIBCMT:syserr.obj - 0002:00001040 ??_C@_0BB@FCBJFCAJ@Result?5too?5large?$AA@ 1001b040 LIBCMT:syserr.obj - 0002:00001054 ??_C@_0N@MMJPGLJK@Domain?5error?$AA@ 1001b054 LIBCMT:syserr.obj - 0002:00001064 ??_C@_0M@LHEPIIOM@Broken?5pipe?$AA@ 1001b064 LIBCMT:syserr.obj - 0002:00001070 ??_C@_0P@PKCJJLLM@Too?5many?5links?$AA@ 1001b070 LIBCMT:syserr.obj - 0002:00001080 ??_C@_0BG@DDBFNKBH@Read?9only?5file?5system?$AA@ 1001b080 LIBCMT:syserr.obj - 0002:00001098 ??_C@_0N@FEHLOILP@Invalid?5seek?$AA@ 1001b098 LIBCMT:syserr.obj - 0002:000010a8 ??_C@_0BI@FEALHKLD@No?5space?5left?5on?5device?$AA@ 1001b0a8 LIBCMT:syserr.obj - 0002:000010c0 ??_C@_0P@LFMMIPAE@File?5too?5large?$AA@ 1001b0c0 LIBCMT:syserr.obj - 0002:000010d0 ??_C@_0CE@ONOKNLPF@Inappropriate?5I?1O?5control?5operat@ 1001b0d0 LIBCMT:syserr.obj - 0002:000010f4 ??_C@_0BE@INBJMKGG@Too?5many?5open?5files?$AA@ 1001b0f4 LIBCMT:syserr.obj - 0002:00001108 ??_C@_0BO@IIFBODJE@Too?5many?5open?5files?5in?5system?$AA@ 1001b108 LIBCMT:syserr.obj - 0002:00001128 ??_C@_0BB@HMGGCEBG@Invalid?5argument?$AA@ 1001b128 LIBCMT:syserr.obj - 0002:0000113c ??_C@_0P@NDHGCGKE@Is?5a?5directory?$AA@ 1001b13c LIBCMT:syserr.obj - 0002:0000114c ??_C@_0BA@CJBACOOL@Not?5a?5directory?$AA@ 1001b14c LIBCMT:syserr.obj - 0002:0000115c ??_C@_0P@NLEIANHE@No?5such?5device?$AA@ 1001b15c LIBCMT:syserr.obj - 0002:0000116c ??_C@_0O@OAMDNOCP@Improper?5link?$AA@ 1001b16c LIBCMT:syserr.obj - 0002:0000117c ??_C@_0M@NAAJNNGH@File?5exists?$AA@ 1001b17c LIBCMT:syserr.obj - 0002:00001188 ??_C@_0BA@BIBLIOEK@Resource?5device?$AA@ 1001b188 LIBCMT:syserr.obj - 0002:00001198 ??_C@_0O@NIPGCINC@Unknown?5error?$AA@ 1001b198 LIBCMT:syserr.obj - 0002:000011a8 ??_C@_0M@LOEHLCJD@Bad?5address?$AA@ 1001b1a8 LIBCMT:syserr.obj - 0002:000011b4 ??_C@_0BC@HFNFNKAI@Permission?5denied?$AA@ 1001b1b4 LIBCMT:syserr.obj - 0002:000011c8 ??_C@_0BB@IMDKMPFB@Not?5enough?5space?$AA@ 1001b1c8 LIBCMT:syserr.obj - 0002:000011dc ??_C@_0CB@EPFKGNAK@Resource?5temporarily?5unavailable@ 1001b1dc LIBCMT:syserr.obj - 0002:00001200 ??_C@_0BD@LOHELEP@No?5child?5processes?$AA@ 1001b200 LIBCMT:syserr.obj - 0002:00001214 ??_C@_0BE@NFGDDCEF@Bad?5file?5descriptor?$AA@ 1001b214 LIBCMT:syserr.obj - 0002:00001228 ??_C@_0BC@HKPNECK@Exec?5format?5error?$AA@ 1001b228 LIBCMT:syserr.obj - 0002:0000123c ??_C@_0BC@MFFGCDFL@Arg?5list?5too?5long?$AA@ 1001b23c LIBCMT:syserr.obj - 0002:00001250 ??_C@_0BK@DPKMCKJ@No?5such?5device?5or?5address?$AA@ 1001b250 LIBCMT:syserr.obj - 0002:0000126c ??_C@_0BD@KKNFOBBD@Input?1output?5error?$AA@ 1001b26c LIBCMT:syserr.obj - 0002:00001280 ??_C@_0BK@FJBOAFDK@Interrupted?5function?5call?$AA@ 1001b280 LIBCMT:syserr.obj - 0002:0000129c ??_C@_0BA@FKIAIBGA@No?5such?5process?$AA@ 1001b29c LIBCMT:syserr.obj - 0002:000012ac ??_C@_0BK@FMDHKPNF@No?5such?5file?5or?5directory?$AA@ 1001b2ac LIBCMT:syserr.obj - 0002:000012c8 ??_C@_0BI@BJFCGOHL@Operation?5not?5permitted?$AA@ 1001b2c8 LIBCMT:syserr.obj - 0002:000012e0 ??_C@_08INEPGKHH@No?5error?$AA@ 1001b2e0 LIBCMT:syserr.obj - 0002:00001310 __XcptActTab 1001b310 LIBCMT:winxfltr.obj - 0002:000013a0 __First_FPE_Indx 1001b3a0 LIBCMT:winxfltr.obj - 0002:000013a4 __Num_FPE 1001b3a4 LIBCMT:winxfltr.obj - 0002:000013a8 __XcptActTabSize 1001b3a8 LIBCMT:winxfltr.obj - 0002:000013ac __XcptActTabCount 1001b3ac LIBCMT:winxfltr.obj - 0002:000013b0 ??_C@_0BI@DFKBFLJE@GetProcessWindowStation?$AA@ 1001b3b0 LIBCMT:crtmboxw.obj - 0002:000013c8 ??_C@_0BK@DEKFELLI@GetUserObjectInformationW?$AA@ 1001b3c8 LIBCMT:crtmboxw.obj - 0002:000013e4 ??_C@_0BD@HHGDFDBJ@GetLastActivePopup?$AA@ 1001b3e4 LIBCMT:crtmboxw.obj - 0002:000013f8 ??_C@_0BA@HNOPNCHB@GetActiveWindow?$AA@ 1001b3f8 LIBCMT:crtmboxw.obj - 0002:00001408 ??_C@_0M@DLDCCGNP@MessageBoxW?$AA@ 1001b408 LIBCMT:crtmboxw.obj - 0002:00001414 ??_C@_1BG@GOEBHBDC@?$AAU?$AAS?$AAE?$AAR?$AA3?$AA2?$AA?4?$AAD?$AAL?$AAL?$AA?$AA@ 1001b414 LIBCMT:crtmboxw.obj - 0002:00001430 ___newctype 1001b430 LIBCMT:ctype.obj - 0002:00001730 __wctype 1001b730 LIBCMT:ctype.obj - 0002:00001938 ___newclmap 1001b938 LIBCMT:ctype.obj - 0002:00001ab8 ___newcumap 1001bab8 LIBCMT:ctype.obj - 0002:00001c40 ??_C@_1BA@BALFACEM@?$AAC?$AAO?$AAN?$AAO?$AAU?$AAT?$AA$?$AA?$AA@ 1001bc40 LIBCMT:initcon.obj - 0002:00001c50 ___lookuptable_s 1001bc50 LIBCMT:outputs.obj - 0002:00001d30 ??_C@_05IAIEPMAK@1?42?48?$AA@ 1001bd30 compress.obj - 0002:00001d38 _z_errmsg 1001bd38 zutil.obj - 0002:00001d60 _zip_copyright 1001bd60 zip.obj - 0002:00001db0 _unz_copyright 1001bdb0 unzip.obj - 0002:00002450 __dist_code 1001c450 trees.obj - 0002:00002650 __length_code 1001c650 trees.obj - 0002:00002840 _inflate_copyright 1001c840 inftrees.obj - 0002:00003ac0 _deflate_copyright 1001dac0 deflate.obj - 0002:00005b88 ??_C@_02DKCKIIND@?$CFs?$AA@ 1001fb88 gzlib.obj - 0002:00005b8c ??_C@_07EBNKNFJN@?$DMfd?3?$CFd?$DO?$AA@ 1001fb8c gzlib.obj - 0002:00005b94 ??_C@_0O@BNNCBLEN@out?5of?5memory?$AA@ 1001fb94 gzlib.obj - 0002:00005ba2 ??_C@_00CNPNBAHC@?$AA@ 1001fba2 gzlib.obj - 0002:00005ba4 ??_C@_02LMMGGCAJ@?3?5?$AA@ 1001fba4 gzlib.obj - 0002:00005ba8 ??_C@_06DIJPEION@?$CFs?$CFs?$CFs?$AA@ 1001fba8 gzlib.obj - 0002:00005bb0 ??_C@_0BH@CFIIDOJD@unexpected?5end?5of?5file?$AA@ 1001fbb0 gzread.obj - 0002:00005bc8 ??_C@_0CH@CPOLIEKA@internal?5error?3?5inflate?5stream?5c@ 1001fbc8 gzread.obj - 0002:00005bf0 ??_C@_0BG@HCKBMIHF@compressed?5data?5error?$AA@ 1001fbf0 gzread.obj - 0002:00005c08 ??_C@_0CF@MLPJFDMM@requested?5length?5does?5not?5fit?5in@ 1001fc08 gzread.obj - 0002:00005c30 ??_C@_0BP@IIKIGMCC@out?5of?5room?5to?5push?5characters?$AA@ 1001fc30 gzread.obj - 0002:00005c50 ??_C@_0CH@DEEGAHIB@internal?5error?3?5deflate?5stream?5c@ 1001fc50 gzwrite.obj - 0002:00005c78 ??_C@_0BD@PJCBIDD@invalid?5block?5type?$AA@ 1001fc78 infback.obj - 0002:00005c8c ??_C@_0BN@LGAADGOK@invalid?5stored?5block?5lengths?$AA@ 1001fc8c infback.obj - 0002:00005cac ??_C@_0CE@GMIGFPBB@too?5many?5length?5or?5distance?5symb@ 1001fcac infback.obj - 0002:00005cd0 ??_C@_0BJ@HDEPPGOH@invalid?5code?5lengths?5set?$AA@ 1001fcd0 infback.obj - 0002:00005cec ??_C@_0BK@BMMPFBBH@invalid?5bit?5length?5repeat?$AA@ 1001fcec infback.obj - 0002:00005d08 ??_C@_0CF@DGDMADCD@invalid?5code?5?9?9?5missing?5end?9of?9b@ 1001fd08 infback.obj - 0002:00005d30 ??_C@_0BM@IIMGAINC@invalid?5literal?1lengths?5set?$AA@ 1001fd30 infback.obj - 0002:00005d4c ??_C@_0BG@GMDFCBGP@invalid?5distances?5set?$AA@ 1001fd4c infback.obj - 0002:00005d64 ??_C@_0BM@FFFLPBBC@invalid?5literal?1length?5code?$AA@ 1001fd64 infback.obj - 0002:00005d80 ??_C@_0BG@LBKINIKP@invalid?5distance?5code?$AA@ 1001fd80 infback.obj - 0002:00005d98 ??_C@_0BO@ECPMAOGG@invalid?5distance?5too?5far?5back?$AA@ 1001fd98 infback.obj - 0002:00005db8 ??_C@_0BH@LIBMMIGA@incorrect?5header?5check?$AA@ 1001fdb8 inflate.obj - 0002:00005dd0 ??_C@_0BL@IHKGDAEE@unknown?5compression?5method?$AA@ 1001fdd0 inflate.obj - 0002:00005dec ??_C@_0BE@EMOGCLGO@invalid?5window?5size?$AA@ 1001fdec inflate.obj - 0002:00005e00 ??_C@_0BJ@BLBBCOMO@unknown?5header?5flags?5set?$AA@ 1001fe00 inflate.obj - 0002:00005e1c ??_C@_0BE@GONKLEPM@header?5crc?5mismatch?$AA@ 1001fe1c inflate.obj - 0002:00005e30 ??_C@_0BF@MEIGEHBE@incorrect?5data?5check?$AA@ 1001fe30 inflate.obj - 0002:00005e48 ??_C@_0BH@FGKKJGOC@incorrect?5length?5check?$AA@ 1001fe48 inflate.obj - 0002:00005e60 ??_C@_02JDPG@rb?$AA@ 1001fe60 ioapi.obj - 0002:00005e64 ??_C@_03HMFOOINA@r?$CLb?$AA@ 1001fe64 ioapi.obj - 0002:00005e68 ??_C@_02GMLFBBN@wb?$AA@ 1001fe68 ioapi.obj - 0002:00005e6c ??_C@_01JOAMLHOP@?9?$AA@ 1001fe6c zip.obj - 0002:00005e70 ??_C@_0BF@CJFPCCEG@incompatible?5version?$AA@ 1001fe70 zutil.obj - 0002:00005e88 ??_C@_0N@DFPGLBGC@buffer?5error?$AA@ 1001fe88 zutil.obj - 0002:00005e98 ??_C@_0BE@OGGJBMCE@insufficient?5memory?$AA@ 1001fe98 zutil.obj - 0002:00005eac ??_C@_0L@HAHMBNLP@data?5error?$AA@ 1001feac zutil.obj - 0002:00005eb8 ??_C@_0N@MKKNPMJD@stream?5error?$AA@ 1001feb8 zutil.obj - 0002:00005ec8 ??_C@_0L@KIJFAKBJ@file?5error?$AA@ 1001fec8 zutil.obj - 0002:00005ed4 ??_C@_0L@FNAOCBOG@stream?5end?$AA@ 1001fed4 zutil.obj - 0002:00005ee0 ??_C@_0BA@MOKMMFOD@need?5dictionary?$AA@ 1001fee0 zutil.obj - 0002:00005ef0 ___rtc_iaa 1001fef0 LIBCMT:_initsect_.obj - 0002:00005ef4 ___rtc_izz 1001fef4 LIBCMT:_initsect_.obj - 0002:00005ef8 ___rtc_taa 1001fef8 LIBCMT:_initsect_.obj - 0002:00005efc ___rtc_tzz 1001fefc LIBCMT:_initsect_.obj - 0002:0000631c __IMPORT_DESCRIPTOR_KERNEL32 1002031c kernel32:KERNEL32.dll - 0002:00006330 __NULL_IMPORT_DESCRIPTOR 10020330 kernel32:KERNEL32.dll - 0003:00000180 ___badioinfo 10022180 LIBCMT:ioinit.obj - 0003:000001c0 __lookuptrailbytes 100221c0 LIBCMT:read.obj - 0003:000002c0 ___nullstring 100222c0 LIBCMT:output.obj - 0003:000002c4 ___wnullstring 100222c4 LIBCMT:output.obj - 0003:000002c8 ___initialmbcinfo 100222c8 LIBCMT:mbctype.obj - 0003:000004e8 __mbctype 100224e8 LIBCMT:mbctype.obj - 0003:000005f0 __mbcasemap 100225f0 LIBCMT:mbctype.obj - 0003:000006f0 ___ptmbcinfo 100226f0 LIBCMT:mbctype.obj - 0003:000007e8 ___globallocalestatus 100227e8 LIBCMT:glstatus.obj - 0003:000007ec ___clocalestr 100227ec LIBCMT:nlsdata2.obj - 0003:000007f0 ___lc_time_c 100227f0 LIBCMT:nlsdata2.obj - 0003:00000958 ___initiallocinfo 10022958 LIBCMT:nlsdata2.obj - 0003:00000a30 ___ptlocinfo 10022a30 LIBCMT:nlsdata2.obj - 0003:00000a34 ___flsindex 10022a34 LIBCMT:tidtable.obj - 0003:00000a38 ___getvalueindex 10022a38 LIBCMT:tidtable.obj - 0003:00000a3c ___security_cookie 10022a3c LIBCMT:gs_cookie.obj - 0003:00000a40 ___security_cookie_complement 10022a40 LIBCMT:gs_cookie.obj - 0003:00000a48 __sys_errlist 10022a48 LIBCMT:syserr.obj - 0003:00000af8 __sys_nerr 10022af8 LIBCMT:syserr.obj - 0003:00000b00 __iob 10022b00 LIBCMT:_file.obj - 0003:00000ea0 __cfltcvt_tab 10022ea0 LIBCMT:cmiscdat.obj - 0003:00000ed0 ___lconv_static_decimal 10022ed0 LIBCMT:lconv.obj - 0003:00000ed4 ___lconv_static_W_decimal 10022ed4 LIBCMT:lconv.obj - 0003:00000ed8 ___lconv_c 10022ed8 LIBCMT:lconv.obj - 0003:00000f28 ___lconv 10022f28 LIBCMT:lconv.obj - 0003:00000f2c __pctype 10022f2c LIBCMT:ctype.obj - 0003:00000f30 __pwctype 10022f30 LIBCMT:ctype.obj - 0003:00000f40 __NLG_Destination 10022f40 LIBCMT:exsup.obj - 0003:00000f50 __confh 10022f50 LIBCMT:initcon.obj - 0003:00000f54 ___abort_behavior 10022f54 LIBCMT:abort.obj - 0003:00000f64 ___mb_cur_max 10022f64 LIBCMT:nlsdata1.obj - 0003:00000f68 ___decimal_point 10022f68 LIBCMT:nlsdata1.obj - 0003:00000f6c ___decimal_point_length 10022f6c LIBCMT:nlsdata1.obj - 0003:00000fc4 __aenvptr 10022fc4 LIBCMT:dllcrt0.obj - 0003:00000fc8 __wenvptr 10022fc8 LIBCMT:dllcrt0.obj - 0003:00000fcc ___error_mode 10022fcc LIBCMT:dllcrt0.obj - 0003:00000fd0 ___app_type 10022fd0 LIBCMT:dllcrt0.obj - 0003:00000fd4 ___pInvalidArgHandler 10022fd4 LIBCMT:invarg.obj - 0003:00000fd8 __umaskval 10022fd8 LIBCMT:crt0dat.obj - 0003:00000fdc ___argc 10022fdc LIBCMT:crt0dat.obj - 0003:00000fe0 ___argv 10022fe0 LIBCMT:crt0dat.obj - 0003:00000fe4 ___wargv 10022fe4 LIBCMT:crt0dat.obj - 0003:00000fe8 __environ 10022fe8 LIBCMT:crt0dat.obj - 0003:00000fec ___initenv 10022fec LIBCMT:crt0dat.obj - 0003:00000ff0 __wenviron 10022ff0 LIBCMT:crt0dat.obj - 0003:00000ff4 ___winitenv 10022ff4 LIBCMT:crt0dat.obj - 0003:00000ff8 __pgmptr 10022ff8 LIBCMT:crt0dat.obj - 0003:00000ffc __wpgmptr 10022ffc LIBCMT:crt0dat.obj - 0003:00001000 __exitflag 10023000 LIBCMT:crt0dat.obj - 0003:00001004 __C_Termination_Done 10023004 LIBCMT:crt0dat.obj - 0003:00001008 __C_Exit_Done 10023008 LIBCMT:crt0dat.obj - 0003:0000100c __crtheap 1002300c LIBCMT:heapinit.obj - 0003:00001638 ?_pnhHeap@@3P6AHI@ZA 10023638 LIBCMT:handler.obj - 0003:0000163c __newmode 1002363c LIBCMT:_newmode.obj - 0003:00001644 ___mbulinfo 10023644 LIBCMT:mbctype.obj - 0003:00001650 ___mbcodepage 10023650 LIBCMT:mbctype.obj - 0003:00001654 ___ismbcodepage 10023654 LIBCMT:mbctype.obj - 0003:00001658 ___mblcid 10023658 LIBCMT:mbctype.obj - 0003:0000165c _gpFlsAlloc 1002365c LIBCMT:tidtable.obj - 0003:00001660 _gpFlsGetValue 10023660 LIBCMT:tidtable.obj - 0003:00001664 _gpFlsSetValue 10023664 LIBCMT:tidtable.obj - 0003:00001668 _gpFlsFree 10023668 LIBCMT:tidtable.obj - 0003:0000166c __maxwait 1002366c LIBCMT:crtheap.obj - 0003:00001670 __cflush 10023670 LIBCMT:_file.obj - 0003:000018d0 ?__pInconsistency@@3P6AXXZA 100238d0 LIBCMT:hooks.obj - 0003:000018ec ___pPurecall 100238ec LIBCMT:inithelp.obj - 0003:000018f0 __fmode 100238f0 LIBCMT:txtmode.obj - 0003:0000190c ___lconv_static_null 1002390c LIBCMT:lconv.obj - 0003:00001910 ___lconv_static_W_null 10023910 LIBCMT:lconv.obj - 0003:00001c3c __commode 10023c3c LIBCMT:ncommode.obj - 0003:00001c40 __stdbuf 10023c40 LIBCMT:_sftbuf.obj - 0003:00001c48 ___locale_changed 10023c48 LIBCMT:setlocal.obj - 0003:00001c50 ___sse2_available 10023c50 <common> - 0003:00001c54 __debugger_hook_dummy 10023c54 <common> - 0003:00001c58 ___piob 10023c58 <common> - 0003:00001c60 __bufin 10023c60 <common> - 0003:00002c60 __nstream 10024c60 <common> - 0003:00002c64 ___env_initialized 10024c64 <common> - 0003:00002c68 ___onexitend 10024c68 <common> - 0003:00002c6c ___onexitbegin 10024c6c <common> - 0003:00002c70 ___mbctype_initialized 10024c70 <common> - 0003:00002c74 __FPinit 10024c74 <common> - 0003:00002c78 ___dyn_tls_init_callback 10024c78 <common> - 0003:00002c7c __pDestructExceptionObject 10024c7c <common> - 0003:00002c80 __nhandle 10024c80 <common> - 0003:00002ca0 ___pioinfo 10024ca0 <common> - 0003:00002da0 __acmdln 10024da0 <common> - - entry point at 0001:0001036c - - Static symbols - - 0001:00000270 _adler32_combine_ 10001270 f CIL library: CIL module - 0001:00000470 _crc32_little 10001470 f CIL library: CIL module - 0001:00000730 _gf2_matrix_times 10001730 f CIL library: CIL module - 0001:00000750 _gf2_matrix_square 10001750 f CIL library: CIL module - 0001:00000780 _crc32_combine_ 10001780 f CIL library: CIL module - 0001:00001090 _putShortMSB 10002090 f CIL library: CIL module - 0001:000010c0 _flush_pending 100020c0 f CIL library: CIL module - 0001:00001bf0 _read_buf 10002bf0 f CIL library: CIL module - 0001:00001c60 _lm_init 10002c60 f CIL library: CIL module - 0001:00001d00 _fill_window 10002d00 f CIL library: CIL module - 0001:00001ed0 _deflate_stored 10002ed0 f CIL library: CIL module - 0001:00002060 _deflate_fast 10003060 f CIL library: CIL module - 0001:00002390 _deflate_slow 10003390 f CIL library: CIL module - 0001:00002790 _deflate_rle 10003790 f CIL library: CIL module - 0001:00002a40 _deflate_huff 10003a40 f CIL library: CIL module - 0001:00002bd0 _gz_reset 10003bd0 f CIL library: CIL module - 0001:00002c10 _gz_open 10003c10 f CIL library: CIL module - 0001:00003470 _gz_load 10004470 f CIL library: CIL module - 0001:000034e0 _gz_avail 100044e0 f CIL library: CIL module - 0001:00003550 _gz_look 10004550 f CIL library: CIL module - 0001:000036c0 _gz_decomp 100046c0 f CIL library: CIL module - 0001:000037c0 _gz_fetch 100047c0 f CIL library: CIL module - 0001:00003840 _gz_skip 10004840 f CIL library: CIL module - 0001:00003d70 _gz_init 10004d70 f CIL library: CIL module - 0001:00003e40 _gz_comp 10004e40 f CIL library: CIL module - 0001:00003f70 _gz_zero 10004f70 f CIL library: CIL module - 0001:000045f0 _fixedtables 100055f0 f CIL library: CIL module - 0001:000055e0 _fixedtables 100065e0 f CIL library: CIL module - 0001:00005600 _updatewindow 10006600 f CIL library: CIL module - 0001:00006da0 _syncsearch 10007da0 f CIL library: CIL module - 0001:00007610 _fopen64_file_func 10008610 f CIL library: CIL module - 0001:00007660 _fread_file_func 10008660 f CIL library: CIL module - 0001:00007680 _fwrite_file_func 10008680 f CIL library: CIL module - 0001:000076a0 _ftell64_file_func 100086a0 f CIL library: CIL module - 0001:000076c0 _fseek64_file_func 100086c0 f CIL library: CIL module - 0001:00007710 _fclose_file_func 10008710 f CIL library: CIL module - 0001:00007730 _ferror_file_func 10008730 f CIL library: CIL module - 0001:00007790 _win32_translate_open_mode 10008790 f CIL library: CIL module - 0001:00007800 _win32_build_iowin 10008800 f CIL library: CIL module - 0001:000079a0 _MySetFilePointerEx 100089a0 f CIL library: CIL module - 0001:00007cc0 _init_block 10008cc0 f CIL library: CIL module - 0001:00007d40 _pqdownheap 10008d40 f CIL library: CIL module - 0001:00007e20 _gen_bitlen 10008e20 f CIL library: CIL module - 0001:00008020 _gen_codes 10009020 f CIL library: CIL module - 0001:00008080 _build_tree 10009080 f CIL library: CIL module - 0001:00008280 _scan_tree 10009280 f CIL library: CIL module - 0001:00008360 _send_tree 10009360 f CIL library: CIL module - 0001:000088e0 _build_bl_tree 100098e0 f CIL library: CIL module - 0001:000089b0 _send_all_trees 100099b0 f CIL library: CIL module - 0001:00008fa0 _compress_block 10009fa0 f CIL library: CIL module - 0001:00009380 _detect_data_type 1000a380 f CIL library: CIL module - 0001:000093f0 _bi_reverse 1000a3f0 f CIL library: CIL module - 0001:00009410 _bi_flush 1000a410 f CIL library: CIL module - 0001:00009490 _bi_windup 1000a490 f CIL library: CIL module - 0001:000094f0 _copy_block 1000a4f0 f CIL library: CIL module - 0001:00009610 _unz64local_getShort 1000a610 f CIL library: CIL module - 0001:00009670 _unz64local_getLong 1000a670 f CIL library: CIL module - 0001:00009700 _unz64local_getLong64 1000a700 f CIL library: CIL module - 0001:00009840 _strcmpcasenosensitive_internal 1000a840 f CIL library: CIL module - 0001:000098e0 _zip64local_SearchCentralDir 1000a8e0 f CIL library: CIL module - 0001:000098e0 _unz64local_SearchCentralDir 1000a8e0 f CIL library: CIL module - 0001:00009a90 _unz64local_SearchCentralDir64 1000aa90 f CIL library: CIL module - 0001:00009d20 _unzOpenInternal 1000ad20 f CIL library: CIL module - 0001:0000a2d0 _unz64local_DosDateToTmuDate 1000b2d0 f CIL library: CIL module - 0001:0000a350 _unz64local_GetCurrentFileInfoInternal 1000b350 f CIL library: CIL module - 0001:0000ad40 _unz64local_CheckCurrentFileCoherencyHeader 1000bd40 f CIL library: CIL module - 0001:0000b790 _decrypt_byte 1000c790 f CIL library: CIL module - 0001:0000b7b0 _update_keys 1000c7b0 f CIL library: CIL module - 0001:0000b7f0 _init_keys 1000c7f0 f CIL library: CIL module - 0001:0000b830 _crypthead 1000c830 f CIL library: CIL module - 0001:0000b940 _allocate_new_datablock 1000c940 f CIL library: CIL module - 0001:0000b970 _free_datablock 1000c970 f CIL library: CIL module - 0001:0000b990 _init_linkedlist 1000c990 f CIL library: CIL module - 0001:0000b9a0 _free_linkedlist 1000c9a0 f CIL library: CIL module - 0001:0000b9c0 _add_data_in_datablock 1000c9c0 f CIL library: CIL module - 0001:0000ba70 _zip64local_putValue 1000ca70 f CIL library: CIL module - 0001:0000bad0 _zip64local_putValue_inmemory 1000cad0 f CIL library: CIL module - 0001:0000bb10 _zip64local_TmzDateToDosDate 1000cb10 f CIL library: CIL module - 0001:0000bb60 _unz64local_getByte 1000cb60 f CIL library: CIL module - 0001:0000bb60 _zip64local_getByte 1000cb60 f CIL library: CIL module - 0001:0000bba0 _zip64local_getShort 1000cba0 f CIL library: CIL module - 0001:0000bc00 _zip64local_getLong 1000cc00 f CIL library: CIL module - 0001:0000bc90 _zip64local_getLong64 1000cc90 f CIL library: CIL module - 0001:0000bdd0 _zip64local_SearchCentralDir64 1000cdd0 f CIL library: CIL module - 0001:0000d020 _zip64FlushWriteBuffer 1000e020 f CIL library: CIL module - 0001:0000e772 __tsopen_nolock 1000f772 f LIBCMT:wopen.obj - 0001:00010276 ___DllMainCRTStartup 10011276 f LIBCMT:dllcrt0.obj - 0001:000120cb _doexit 100130cb f LIBCMT:crt0dat.obj - 0001:00012711 _write_char 10013711 f LIBCMT:output.obj - 0001:00012744 _write_string 10013744 f LIBCMT:output.obj - 0001:00013406 ?CPtoLCID@@YAHH@Z 10014406 f LIBCMT:mbctype.obj - 0001:00013435 ?setSBCS@@YAXPAUthreadmbcinfostruct@@@Z 10014435 f LIBCMT:mbctype.obj - 0001:00013499 ?setSBUpLow@@YAXPAUthreadmbcinfostruct@@@Z 10014499 f LIBCMT:mbctype.obj - 0001:000136cd ?getSystemCP@@YAHH@Z 100146cd f LIBCMT:mbctype.obj - 0001:00014720 _flsall 10015720 f LIBCMT:fflush.obj - 0001:00014c60 __unwind_handler4 10015c60 f LIBCMT:exsup4.obj - 0001:00015424 _parse_cmdline 10016424 f LIBCMT:stdargv.obj - 0001:00015ee7 _siglookup 10016ee7 f LIBCMT:winsig.obj - 0001:000160ec __onexit_nolock 100170ec f LIBCMT:onexit.obj - 0001:000168d5 ?__crtLCMapStringA_stat@@YAHPAUlocaleinfo_struct@@KKPBDHPADHHH@Z 100178d5 f LIBCMT:a_map.obj - 0001:00016b02 ?__crtGetStringTypeA_stat@@YAHPAUlocaleinfo_struct@@KPBDHPAGHHH@Z 10017b02 f LIBCMT:a_str.obj - 0001:000174b1 __tsopen_nolock 100184b1 f LIBCMT:open.obj - 0001:00018120 __unwind_handler 10019120 f LIBCMT:exsup.obj - 0001:00018404 ?x_ismbbtype_l@@YAHPAUlocaleinfo_struct@@IHH@Z 10019404 f LIBCMT:ismbbyte.obj diff --git a/builddir/zlib-1.2.8/bin/ZlibStatRelease/vc100.pdb b/builddir/zlib-1.2.8/bin/ZlibStatRelease/vc100.pdb deleted file mode 100644 index 7891fdb..0000000 Binary files a/builddir/zlib-1.2.8/bin/ZlibStatRelease/vc100.pdb and /dev/null differ diff --git a/builddir/zlib-1.2.8/bin/ZlibStatRelease/zlibstat.lib b/builddir/zlib-1.2.8/bin/ZlibStatRelease/zlibstat.lib deleted file mode 100644 index 0162623..0000000 Binary files a/builddir/zlib-1.2.8/bin/ZlibStatRelease/zlibstat.lib and /dev/null differ diff --git a/builddir/zlib-1.2.8/bin/zlib.exp b/builddir/zlib-1.2.8/bin/zlib.exp deleted file mode 100644 index 72033f5..0000000 Binary files a/builddir/zlib-1.2.8/bin/zlib.exp and /dev/null differ diff --git a/builddir/zlib-1.2.8/bin/zlib.lib b/builddir/zlib-1.2.8/bin/zlib.lib deleted file mode 100644 index 8c6f220..0000000 Binary files a/builddir/zlib-1.2.8/bin/zlib.lib and /dev/null differ diff --git a/builddir/zlib-1.2.8/bin/zlib1.dll b/builddir/zlib-1.2.8/bin/zlib1.dll deleted file mode 100644 index d76b64c..0000000 Binary files a/builddir/zlib-1.2.8/bin/zlib1.dll and /dev/null differ diff --git a/builddir/zlib-1.2.8/include/deflate.h b/builddir/zlib-1.2.8/include/deflate.h deleted file mode 100644 index ce0299e..0000000 --- a/builddir/zlib-1.2.8/include/deflate.h +++ /dev/null @@ -1,346 +0,0 @@ -/* deflate.h -- internal compression state - * Copyright (C) 1995-2012 Jean-loup Gailly - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* @(#) $Id$ */ - -#ifndef DEFLATE_H -#define DEFLATE_H - -#include "zutil.h" - -/* define NO_GZIP when compiling if you want to disable gzip header and - trailer creation by deflate(). NO_GZIP would be used to avoid linking in - the crc code when it is not needed. For shared libraries, gzip encoding - should be left enabled. */ -#ifndef NO_GZIP -# define GZIP -#endif - -/* =========================================================================== - * Internal compression state. - */ - -#define LENGTH_CODES 29 -/* number of length codes, not counting the special END_BLOCK code */ - -#define LITERALS 256 -/* number of literal bytes 0..255 */ - -#define L_CODES (LITERALS+1+LENGTH_CODES) -/* number of Literal or Length codes, including the END_BLOCK code */ - -#define D_CODES 30 -/* number of distance codes */ - -#define BL_CODES 19 -/* number of codes used to transfer the bit lengths */ - -#define HEAP_SIZE (2*L_CODES+1) -/* maximum heap size */ - -#define MAX_BITS 15 -/* All codes must not exceed MAX_BITS bits */ - -#define Buf_size 16 -/* size of bit buffer in bi_buf */ - -#define INIT_STATE 42 -#define EXTRA_STATE 69 -#define NAME_STATE 73 -#define COMMENT_STATE 91 -#define HCRC_STATE 103 -#define BUSY_STATE 113 -#define FINISH_STATE 666 -/* Stream status */ - - -/* Data structure describing a single value and its code string. */ -typedef struct ct_data_s { - union { - ush freq; /* frequency count */ - ush code; /* bit string */ - } fc; - union { - ush dad; /* father node in Huffman tree */ - ush len; /* length of bit string */ - } dl; -} FAR ct_data; - -#define Freq fc.freq -#define Code fc.code -#define Dad dl.dad -#define Len dl.len - -typedef struct static_tree_desc_s static_tree_desc; - -typedef struct tree_desc_s { - ct_data *dyn_tree; /* the dynamic tree */ - int max_code; /* largest code with non zero frequency */ - static_tree_desc *stat_desc; /* the corresponding static tree */ -} FAR tree_desc; - -typedef ush Pos; -typedef Pos FAR Posf; -typedef unsigned IPos; - -/* A Pos is an index in the character window. We use short instead of int to - * save space in the various tables. IPos is used only for parameter passing. - */ - -typedef struct internal_state { - z_streamp strm; /* pointer back to this zlib stream */ - int status; /* as the name implies */ - Bytef *pending_buf; /* output still pending */ - ulg pending_buf_size; /* size of pending_buf */ - Bytef *pending_out; /* next pending byte to output to the stream */ - uInt pending; /* nb of bytes in the pending buffer */ - int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ - gz_headerp gzhead; /* gzip header information to write */ - uInt gzindex; /* where in extra, name, or comment */ - Byte method; /* can only be DEFLATED */ - int last_flush; /* value of flush param for previous deflate call */ - - /* used by deflate.c: */ - - uInt w_size; /* LZ77 window size (32K by default) */ - uInt w_bits; /* log2(w_size) (8..16) */ - uInt w_mask; /* w_size - 1 */ - - Bytef *window; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. Also, it limits - * the window size to 64K, which is quite useful on MSDOS. - * To do: use the user input buffer as sliding window. - */ - - ulg window_size; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - Posf *prev; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - Posf *head; /* Heads of the hash chains or NIL. */ - - uInt ins_h; /* hash index of string to be inserted */ - uInt hash_size; /* number of elements in hash table */ - uInt hash_bits; /* log2(hash_size) */ - uInt hash_mask; /* hash_size-1 */ - - uInt hash_shift; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - long block_start; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - uInt match_length; /* length of best match */ - IPos prev_match; /* previous match */ - int match_available; /* set if previous match exists */ - uInt strstart; /* start of string to insert */ - uInt match_start; /* start of matching string */ - uInt lookahead; /* number of valid bytes ahead in window */ - - uInt prev_length; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - uInt max_chain_length; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - uInt max_lazy_match; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ -# define max_insert_length max_lazy_match - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - int level; /* compression level (1..9) */ - int strategy; /* favor or force Huffman coding*/ - - uInt good_match; - /* Use a faster search when the previous match is longer than this */ - - int nice_match; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - /* Didn't use ct_data typedef below to suppress compiler warning */ - struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - struct tree_desc_s l_desc; /* desc. for literal tree */ - struct tree_desc_s d_desc; /* desc. for distance tree */ - struct tree_desc_s bl_desc; /* desc. for bit length tree */ - - ush bl_count[MAX_BITS+1]; - /* number of codes at each bit length for an optimal tree */ - - int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - int heap_len; /* number of elements in the heap */ - int heap_max; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - uch depth[2*L_CODES+1]; - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - - uchf *l_buf; /* buffer for literals or lengths */ - - uInt lit_bufsize; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - uInt last_lit; /* running index in l_buf */ - - ushf *d_buf; - /* Buffer for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ - - ulg opt_len; /* bit length of current block with optimal trees */ - ulg static_len; /* bit length of current block with static trees */ - uInt matches; /* number of string matches in current block */ - uInt insert; /* bytes at end of window left to insert */ - -#ifdef DEBUG - ulg compressed_len; /* total bit length of compressed file mod 2^32 */ - ulg bits_sent; /* bit length of compressed data sent mod 2^32 */ -#endif - - ush bi_buf; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - int bi_valid; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - - ulg high_water; - /* High water mark offset in window for initialized bytes -- bytes above - * this are set to zero in order to avoid memory check warnings when - * longest match routines access bytes past the input. This is then - * updated to the new high water mark. - */ - -} FAR deflate_state; - -/* Output a byte on the stream. - * IN assertion: there is enough room in pending_buf. - */ -#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);} - - -#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) -/* Minimum amount of lookahead, except at the end of the input file. - * See deflate.c for comments about the MIN_MATCH+1. - */ - -#define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD) -/* In order to simplify the code, particularly on 16 bit machines, match - * distances are limited to MAX_DIST instead of WSIZE. - */ - -#define WIN_INIT MAX_MATCH -/* Number of bytes after end of data in window to initialize in order to avoid - memory checker errors from longest match routines */ - - /* in trees.c */ -void ZLIB_INTERNAL _tr_init OF((deflate_state *s)); -int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); -void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf, - ulg stored_len, int last)); -void ZLIB_INTERNAL _tr_flush_bits OF((deflate_state *s)); -void ZLIB_INTERNAL _tr_align OF((deflate_state *s)); -void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf, - ulg stored_len, int last)); - -#define d_code(dist) \ - ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)]) -/* Mapping from a distance to a distance code. dist is the distance - 1 and - * must not have side effects. _dist_code[256] and _dist_code[257] are never - * used. - */ - -#ifndef DEBUG -/* Inline versions of _tr_tally for speed: */ - -#if defined(GEN_TREES_H) || !defined(STDC) - extern uch ZLIB_INTERNAL _length_code[]; - extern uch ZLIB_INTERNAL _dist_code[]; -#else - extern const uch ZLIB_INTERNAL _length_code[]; - extern const uch ZLIB_INTERNAL _dist_code[]; -#endif - -# define _tr_tally_lit(s, c, flush) \ - { uch cc = (c); \ - s->d_buf[s->last_lit] = 0; \ - s->l_buf[s->last_lit++] = cc; \ - s->dyn_ltree[cc].Freq++; \ - flush = (s->last_lit == s->lit_bufsize-1); \ - } -# define _tr_tally_dist(s, distance, length, flush) \ - { uch len = (length); \ - ush dist = (distance); \ - s->d_buf[s->last_lit] = dist; \ - s->l_buf[s->last_lit++] = len; \ - dist--; \ - s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ - s->dyn_dtree[d_code(dist)].Freq++; \ - flush = (s->last_lit == s->lit_bufsize-1); \ - } -#else -# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c) -# define _tr_tally_dist(s, distance, length, flush) \ - flush = _tr_tally(s, distance, length) -#endif - -#endif /* DEFLATE_H */ diff --git a/builddir/zlib-1.2.8/include/gzguts.h b/builddir/zlib-1.2.8/include/gzguts.h deleted file mode 100644 index d87659d..0000000 --- a/builddir/zlib-1.2.8/include/gzguts.h +++ /dev/null @@ -1,209 +0,0 @@ -/* gzguts.h -- zlib internal header definitions for gz* operations - * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#ifdef _LARGEFILE64_SOURCE -# ifndef _LARGEFILE_SOURCE -# define _LARGEFILE_SOURCE 1 -# endif -# ifdef _FILE_OFFSET_BITS -# undef _FILE_OFFSET_BITS -# endif -#endif - -#ifdef HAVE_HIDDEN -# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) -#else -# define ZLIB_INTERNAL -#endif - -#include <stdio.h> -#include "zlib.h" -#ifdef STDC -# include <string.h> -# include <stdlib.h> -# include <limits.h> -#endif -#include <fcntl.h> - -#ifdef _WIN32 -# include <stddef.h> -#endif - -#if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32) -# include <io.h> -#endif - -#ifdef WINAPI_FAMILY -# define open _open -# define read _read -# define write _write -# define close _close -#endif - -#ifdef NO_DEFLATE /* for compatibility with old definition */ -# define NO_GZCOMPRESS -#endif - -#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) -# ifndef HAVE_VSNPRINTF -# define HAVE_VSNPRINTF -# endif -#endif - -#if defined(__CYGWIN__) -# ifndef HAVE_VSNPRINTF -# define HAVE_VSNPRINTF -# endif -#endif - -#if defined(MSDOS) && defined(__BORLANDC__) && (BORLANDC > 0x410) -# ifndef HAVE_VSNPRINTF -# define HAVE_VSNPRINTF -# endif -#endif - -#ifndef HAVE_VSNPRINTF -# ifdef MSDOS -/* vsnprintf may exist on some MS-DOS compilers (DJGPP?), - but for now we just assume it doesn't. */ -# define NO_vsnprintf -# endif -# ifdef __TURBOC__ -# define NO_vsnprintf -# endif -# ifdef WIN32 -/* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */ -# if !defined(vsnprintf) && !defined(NO_vsnprintf) -# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 ) -# define vsnprintf _vsnprintf -# endif -# endif -# endif -# ifdef __SASC -# define NO_vsnprintf -# endif -# ifdef VMS -# define NO_vsnprintf -# endif -# ifdef __OS400__ -# define NO_vsnprintf -# endif -# ifdef __MVS__ -# define NO_vsnprintf -# endif -#endif - -/* unlike snprintf (which is required in C99, yet still not supported by - Microsoft more than a decade later!), _snprintf does not guarantee null - termination of the result -- however this is only used in gzlib.c where - the result is assured to fit in the space provided */ -#ifdef _MSC_VER -# define snprintf _snprintf -#endif - -#ifndef local -# define local static -#endif -/* compile with -Dlocal if your debugger can't find static symbols */ - -/* gz* functions always use library allocation functions */ -#ifndef STDC - extern voidp malloc OF((uInt size)); - extern void free OF((voidpf ptr)); -#endif - -/* get errno and strerror definition */ -#if defined UNDER_CE -# include <windows.h> -# define zstrerror() gz_strwinerror((DWORD)GetLastError()) -#else -# ifndef NO_STRERROR -# include <errno.h> -# define zstrerror() strerror(errno) -# else -# define zstrerror() "stdio error (consult errno)" -# endif -#endif - -/* provide prototypes for these when building zlib without LFS */ -#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); - ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); -#endif - -/* default memLevel */ -#if MAX_MEM_LEVEL >= 8 -# define DEF_MEM_LEVEL 8 -#else -# define DEF_MEM_LEVEL MAX_MEM_LEVEL -#endif - -/* default i/o buffer size -- double this for output when reading (this and - twice this must be able to fit in an unsigned type) */ -#define GZBUFSIZE 8192 - -/* gzip modes, also provide a little integrity check on the passed structure */ -#define GZ_NONE 0 -#define GZ_READ 7247 -#define GZ_WRITE 31153 -#define GZ_APPEND 1 /* mode set to GZ_WRITE after the file is opened */ - -/* values for gz_state how */ -#define LOOK 0 /* look for a gzip header */ -#define COPY 1 /* copy input directly */ -#define GZIP 2 /* decompress a gzip stream */ - -/* internal gzip file state data structure */ -typedef struct { - /* exposed contents for gzgetc() macro */ - struct gzFile_s x; /* "x" for exposed */ - /* x.have: number of bytes available at x.next */ - /* x.next: next output data to deliver or write */ - /* x.pos: current position in uncompressed data */ - /* used for both reading and writing */ - int mode; /* see gzip modes above */ - int fd; /* file descriptor */ - char *path; /* path or fd for error messages */ - unsigned size; /* buffer size, zero if not allocated yet */ - unsigned want; /* requested buffer size, default is GZBUFSIZE */ - unsigned char *in; /* input buffer */ - unsigned char *out; /* output buffer (double-sized when reading) */ - int direct; /* 0 if processing gzip, 1 if transparent */ - /* just for reading */ - int how; /* 0: get header, 1: copy, 2: decompress */ - z_off64_t start; /* where the gzip data started, for rewinding */ - int eof; /* true if end of input file reached */ - int past; /* true if read requested past end */ - /* just for writing */ - int level; /* compression level */ - int strategy; /* compression strategy */ - /* seek request */ - z_off64_t skip; /* amount to skip (already rewound if backwards) */ - int seek; /* true if seek request pending */ - /* error information */ - int err; /* error code */ - char *msg; /* error message */ - /* zlib inflate or deflate stream */ - z_stream strm; /* stream structure in-place (not a pointer) */ -} gz_state; -typedef gz_state FAR *gz_statep; - -/* shared functions */ -void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *)); -#if defined UNDER_CE -char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error)); -#endif - -/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t - value -- needed when comparing unsigned to z_off64_t, which is signed - (possible z_off64_t types off_t, off64_t, and long are all signed) */ -#ifdef INT_MAX -# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX) -#else -unsigned ZLIB_INTERNAL gz_intmax OF((void)); -# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) -#endif diff --git a/builddir/zlib-1.2.8/include/inffast.h b/builddir/zlib-1.2.8/include/inffast.h deleted file mode 100644 index e5c1aa4..0000000 --- a/builddir/zlib-1.2.8/include/inffast.h +++ /dev/null @@ -1,11 +0,0 @@ -/* inffast.h -- header to use inffast.c - * Copyright (C) 1995-2003, 2010 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); diff --git a/builddir/zlib-1.2.8/include/inffixed.h b/builddir/zlib-1.2.8/include/inffixed.h deleted file mode 100644 index d628327..0000000 --- a/builddir/zlib-1.2.8/include/inffixed.h +++ /dev/null @@ -1,94 +0,0 @@ - /* inffixed.h -- table for decoding fixed codes - * Generated automatically by makefixed(). - */ - - /* WARNING: this file should *not* be used by applications. - It is part of the implementation of this library and is - subject to change. Applications should only use zlib.h. - */ - - static const code lenfix[512] = { - {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48}, - {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128}, - {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59}, - {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176}, - {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20}, - {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100}, - {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8}, - {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216}, - {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76}, - {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114}, - {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2}, - {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148}, - {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42}, - {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86}, - {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15}, - {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236}, - {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62}, - {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142}, - {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31}, - {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162}, - {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25}, - {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105}, - {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4}, - {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202}, - {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69}, - {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125}, - {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13}, - {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195}, - {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35}, - {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91}, - {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19}, - {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246}, - {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55}, - {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135}, - {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99}, - {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190}, - {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16}, - {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96}, - {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6}, - {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209}, - {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72}, - {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116}, - {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4}, - {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153}, - {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44}, - {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82}, - {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11}, - {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229}, - {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58}, - {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138}, - {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51}, - {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173}, - {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30}, - {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110}, - {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0}, - {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195}, - {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65}, - {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121}, - {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9}, - {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258}, - {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37}, - {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93}, - {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23}, - {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251}, - {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51}, - {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131}, - {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67}, - {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183}, - {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23}, - {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103}, - {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9}, - {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223}, - {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79}, - {0,9,255} - }; - - static const code distfix[32] = { - {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025}, - {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193}, - {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385}, - {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577}, - {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073}, - {22,5,193},{64,5,0} - }; diff --git a/builddir/zlib-1.2.8/include/inflate.h b/builddir/zlib-1.2.8/include/inflate.h deleted file mode 100644 index 95f4986..0000000 --- a/builddir/zlib-1.2.8/include/inflate.h +++ /dev/null @@ -1,122 +0,0 @@ -/* inflate.h -- internal inflate state definition - * Copyright (C) 1995-2009 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* define NO_GZIP when compiling if you want to disable gzip header and - trailer decoding by inflate(). NO_GZIP would be used to avoid linking in - the crc code when it is not needed. For shared libraries, gzip decoding - should be left enabled. */ -#ifndef NO_GZIP -# define GUNZIP -#endif - -/* Possible inflate modes between inflate() calls */ -typedef enum { - HEAD, /* i: waiting for magic header */ - FLAGS, /* i: waiting for method and flags (gzip) */ - TIME, /* i: waiting for modification time (gzip) */ - OS, /* i: waiting for extra flags and operating system (gzip) */ - EXLEN, /* i: waiting for extra length (gzip) */ - EXTRA, /* i: waiting for extra bytes (gzip) */ - NAME, /* i: waiting for end of file name (gzip) */ - COMMENT, /* i: waiting for end of comment (gzip) */ - HCRC, /* i: waiting for header crc (gzip) */ - DICTID, /* i: waiting for dictionary check value */ - DICT, /* waiting for inflateSetDictionary() call */ - TYPE, /* i: waiting for type bits, including last-flag bit */ - TYPEDO, /* i: same, but skip check to exit inflate on new block */ - STORED, /* i: waiting for stored size (length and complement) */ - COPY_, /* i/o: same as COPY below, but only first time in */ - COPY, /* i/o: waiting for input or output to copy stored block */ - TABLE, /* i: waiting for dynamic block table lengths */ - LENLENS, /* i: waiting for code length code lengths */ - CODELENS, /* i: waiting for length/lit and distance code lengths */ - LEN_, /* i: same as LEN below, but only first time in */ - LEN, /* i: waiting for length/lit/eob code */ - LENEXT, /* i: waiting for length extra bits */ - DIST, /* i: waiting for distance code */ - DISTEXT, /* i: waiting for distance extra bits */ - MATCH, /* o: waiting for output space to copy string */ - LIT, /* o: waiting for output space to write literal */ - CHECK, /* i: waiting for 32-bit check value */ - LENGTH, /* i: waiting for 32-bit length (gzip) */ - DONE, /* finished check, done -- remain here until reset */ - BAD, /* got a data error -- remain here until reset */ - MEM, /* got an inflate() memory error -- remain here until reset */ - SYNC /* looking for synchronization bytes to restart inflate() */ -} inflate_mode; - -/* - State transitions between above modes - - - (most modes can go to BAD or MEM on error -- not shown for clarity) - - Process header: - HEAD -> (gzip) or (zlib) or (raw) - (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT -> - HCRC -> TYPE - (zlib) -> DICTID or TYPE - DICTID -> DICT -> TYPE - (raw) -> TYPEDO - Read deflate blocks: - TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK - STORED -> COPY_ -> COPY -> TYPE - TABLE -> LENLENS -> CODELENS -> LEN_ - LEN_ -> LEN - Read deflate codes in fixed or dynamic block: - LEN -> LENEXT or LIT or TYPE - LENEXT -> DIST -> DISTEXT -> MATCH -> LEN - LIT -> LEN - Process trailer: - CHECK -> LENGTH -> DONE - */ - -/* state maintained between inflate() calls. Approximately 10K bytes. */ -struct inflate_state { - inflate_mode mode; /* current inflate mode */ - int last; /* true if processing last block */ - int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ - int havedict; /* true if dictionary provided */ - int flags; /* gzip header method and flags (0 if zlib) */ - unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */ - unsigned long check; /* protected copy of check value */ - unsigned long total; /* protected copy of output count */ - gz_headerp head; /* where to save gzip header information */ - /* sliding window */ - unsigned wbits; /* log base 2 of requested window size */ - unsigned wsize; /* window size or zero if not using window */ - unsigned whave; /* valid bytes in the window */ - unsigned wnext; /* window write index */ - unsigned char FAR *window; /* allocated sliding window, if needed */ - /* bit accumulator */ - unsigned long hold; /* input bit accumulator */ - unsigned bits; /* number of bits in "in" */ - /* for string and stored block copying */ - unsigned length; /* literal or length of data to copy */ - unsigned offset; /* distance back to copy string from */ - /* for table and code decoding */ - unsigned extra; /* extra bits needed */ - /* fixed and dynamic code tables */ - code const FAR *lencode; /* starting table for length/literal codes */ - code const FAR *distcode; /* starting table for distance codes */ - unsigned lenbits; /* index bits for lencode */ - unsigned distbits; /* index bits for distcode */ - /* dynamic table building */ - unsigned ncode; /* number of code length code lengths */ - unsigned nlen; /* number of length code lengths */ - unsigned ndist; /* number of distance code lengths */ - unsigned have; /* number of code lengths in lens[] */ - code FAR *next; /* next available space in codes[] */ - unsigned short lens[320]; /* temporary storage for code lengths */ - unsigned short work[288]; /* work area for code table building */ - code codes[ENOUGH]; /* space for code tables */ - int sane; /* if false, allow invalid distance too far */ - int back; /* bits back of last unprocessed length/lit */ - unsigned was; /* initial length of match */ -}; diff --git a/builddir/zlib-1.2.8/include/inftrees.h b/builddir/zlib-1.2.8/include/inftrees.h deleted file mode 100644 index baa53a0..0000000 --- a/builddir/zlib-1.2.8/include/inftrees.h +++ /dev/null @@ -1,62 +0,0 @@ -/* inftrees.h -- header to use inftrees.c - * Copyright (C) 1995-2005, 2010 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* Structure for decoding tables. Each entry provides either the - information needed to do the operation requested by the code that - indexed that table entry, or it provides a pointer to another - table that indexes more bits of the code. op indicates whether - the entry is a pointer to another table, a literal, a length or - distance, an end-of-block, or an invalid code. For a table - pointer, the low four bits of op is the number of index bits of - that table. For a length or distance, the low four bits of op - is the number of extra bits to get after the code. bits is - the number of bits in this code or part of the code to drop off - of the bit buffer. val is the actual byte to output in the case - of a literal, the base length or distance, or the offset from - the current table to the next table. Each entry is four bytes. */ -typedef struct { - unsigned char op; /* operation, extra bits, table bits */ - unsigned char bits; /* bits in this part of the code */ - unsigned short val; /* offset in table or code value */ -} code; - -/* op values as set by inflate_table(): - 00000000 - literal - 0000tttt - table link, tttt != 0 is the number of table index bits - 0001eeee - length or distance, eeee is the number of extra bits - 01100000 - end of block - 01000000 - invalid code - */ - -/* Maximum size of the dynamic table. The maximum number of code structures is - 1444, which is the sum of 852 for literal/length codes and 592 for distance - codes. These values were found by exhaustive searches using the program - examples/enough.c found in the zlib distribtution. The arguments to that - program are the number of symbols, the initial root table size, and the - maximum bit length of a code. "enough 286 9 15" for literal/length codes - returns returns 852, and "enough 30 6 15" for distance codes returns 592. - The initial root table size (9 or 6) is found in the fifth argument of the - inflate_table() calls in inflate.c and infback.c. If the root table size is - changed, then these maximum sizes would be need to be recalculated and - updated. */ -#define ENOUGH_LENS 852 -#define ENOUGH_DISTS 592 -#define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS) - -/* Type of code to build for inflate_table() */ -typedef enum { - CODES, - LENS, - DISTS -} codetype; - -int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens, - unsigned codes, code FAR * FAR *table, - unsigned FAR *bits, unsigned short FAR *work)); diff --git a/builddir/zlib-1.2.8/include/trees.h b/builddir/zlib-1.2.8/include/trees.h deleted file mode 100644 index d35639d..0000000 --- a/builddir/zlib-1.2.8/include/trees.h +++ /dev/null @@ -1,128 +0,0 @@ -/* header created automatically with -DGEN_TREES_H */ - -local const ct_data static_ltree[L_CODES+2] = { -{{ 12},{ 8}}, {{140},{ 8}}, {{ 76},{ 8}}, {{204},{ 8}}, {{ 44},{ 8}}, -{{172},{ 8}}, {{108},{ 8}}, {{236},{ 8}}, {{ 28},{ 8}}, {{156},{ 8}}, -{{ 92},{ 8}}, {{220},{ 8}}, {{ 60},{ 8}}, {{188},{ 8}}, {{124},{ 8}}, -{{252},{ 8}}, {{ 2},{ 8}}, {{130},{ 8}}, {{ 66},{ 8}}, {{194},{ 8}}, -{{ 34},{ 8}}, {{162},{ 8}}, {{ 98},{ 8}}, {{226},{ 8}}, {{ 18},{ 8}}, -{{146},{ 8}}, {{ 82},{ 8}}, {{210},{ 8}}, {{ 50},{ 8}}, {{178},{ 8}}, -{{114},{ 8}}, {{242},{ 8}}, {{ 10},{ 8}}, {{138},{ 8}}, {{ 74},{ 8}}, -{{202},{ 8}}, {{ 42},{ 8}}, {{170},{ 8}}, {{106},{ 8}}, {{234},{ 8}}, -{{ 26},{ 8}}, {{154},{ 8}}, {{ 90},{ 8}}, {{218},{ 8}}, {{ 58},{ 8}}, -{{186},{ 8}}, {{122},{ 8}}, {{250},{ 8}}, {{ 6},{ 8}}, {{134},{ 8}}, -{{ 70},{ 8}}, {{198},{ 8}}, {{ 38},{ 8}}, {{166},{ 8}}, {{102},{ 8}}, -{{230},{ 8}}, {{ 22},{ 8}}, {{150},{ 8}}, {{ 86},{ 8}}, {{214},{ 8}}, -{{ 54},{ 8}}, {{182},{ 8}}, {{118},{ 8}}, {{246},{ 8}}, {{ 14},{ 8}}, -{{142},{ 8}}, {{ 78},{ 8}}, {{206},{ 8}}, {{ 46},{ 8}}, {{174},{ 8}}, -{{110},{ 8}}, {{238},{ 8}}, {{ 30},{ 8}}, {{158},{ 8}}, {{ 94},{ 8}}, -{{222},{ 8}}, {{ 62},{ 8}}, {{190},{ 8}}, {{126},{ 8}}, {{254},{ 8}}, -{{ 1},{ 8}}, {{129},{ 8}}, {{ 65},{ 8}}, {{193},{ 8}}, {{ 33},{ 8}}, -{{161},{ 8}}, {{ 97},{ 8}}, {{225},{ 8}}, {{ 17},{ 8}}, {{145},{ 8}}, -{{ 81},{ 8}}, {{209},{ 8}}, {{ 49},{ 8}}, {{177},{ 8}}, {{113},{ 8}}, -{{241},{ 8}}, {{ 9},{ 8}}, {{137},{ 8}}, {{ 73},{ 8}}, {{201},{ 8}}, -{{ 41},{ 8}}, {{169},{ 8}}, {{105},{ 8}}, {{233},{ 8}}, {{ 25},{ 8}}, -{{153},{ 8}}, {{ 89},{ 8}}, {{217},{ 8}}, {{ 57},{ 8}}, {{185},{ 8}}, -{{121},{ 8}}, {{249},{ 8}}, {{ 5},{ 8}}, {{133},{ 8}}, {{ 69},{ 8}}, -{{197},{ 8}}, {{ 37},{ 8}}, {{165},{ 8}}, {{101},{ 8}}, {{229},{ 8}}, -{{ 21},{ 8}}, {{149},{ 8}}, {{ 85},{ 8}}, {{213},{ 8}}, {{ 53},{ 8}}, -{{181},{ 8}}, {{117},{ 8}}, {{245},{ 8}}, {{ 13},{ 8}}, {{141},{ 8}}, -{{ 77},{ 8}}, {{205},{ 8}}, {{ 45},{ 8}}, {{173},{ 8}}, {{109},{ 8}}, -{{237},{ 8}}, {{ 29},{ 8}}, {{157},{ 8}}, {{ 93},{ 8}}, {{221},{ 8}}, -{{ 61},{ 8}}, {{189},{ 8}}, {{125},{ 8}}, {{253},{ 8}}, {{ 19},{ 9}}, -{{275},{ 9}}, {{147},{ 9}}, {{403},{ 9}}, {{ 83},{ 9}}, {{339},{ 9}}, -{{211},{ 9}}, {{467},{ 9}}, {{ 51},{ 9}}, {{307},{ 9}}, {{179},{ 9}}, -{{435},{ 9}}, {{115},{ 9}}, {{371},{ 9}}, {{243},{ 9}}, {{499},{ 9}}, -{{ 11},{ 9}}, {{267},{ 9}}, {{139},{ 9}}, {{395},{ 9}}, {{ 75},{ 9}}, -{{331},{ 9}}, {{203},{ 9}}, {{459},{ 9}}, {{ 43},{ 9}}, {{299},{ 9}}, -{{171},{ 9}}, {{427},{ 9}}, {{107},{ 9}}, {{363},{ 9}}, {{235},{ 9}}, -{{491},{ 9}}, {{ 27},{ 9}}, {{283},{ 9}}, {{155},{ 9}}, {{411},{ 9}}, -{{ 91},{ 9}}, {{347},{ 9}}, {{219},{ 9}}, {{475},{ 9}}, {{ 59},{ 9}}, -{{315},{ 9}}, {{187},{ 9}}, {{443},{ 9}}, {{123},{ 9}}, {{379},{ 9}}, -{{251},{ 9}}, {{507},{ 9}}, {{ 7},{ 9}}, {{263},{ 9}}, {{135},{ 9}}, -{{391},{ 9}}, {{ 71},{ 9}}, {{327},{ 9}}, {{199},{ 9}}, {{455},{ 9}}, -{{ 39},{ 9}}, {{295},{ 9}}, {{167},{ 9}}, {{423},{ 9}}, {{103},{ 9}}, -{{359},{ 9}}, {{231},{ 9}}, {{487},{ 9}}, {{ 23},{ 9}}, {{279},{ 9}}, -{{151},{ 9}}, {{407},{ 9}}, {{ 87},{ 9}}, {{343},{ 9}}, {{215},{ 9}}, -{{471},{ 9}}, {{ 55},{ 9}}, {{311},{ 9}}, {{183},{ 9}}, {{439},{ 9}}, -{{119},{ 9}}, {{375},{ 9}}, {{247},{ 9}}, {{503},{ 9}}, {{ 15},{ 9}}, -{{271},{ 9}}, {{143},{ 9}}, {{399},{ 9}}, {{ 79},{ 9}}, {{335},{ 9}}, -{{207},{ 9}}, {{463},{ 9}}, {{ 47},{ 9}}, {{303},{ 9}}, {{175},{ 9}}, -{{431},{ 9}}, {{111},{ 9}}, {{367},{ 9}}, {{239},{ 9}}, {{495},{ 9}}, -{{ 31},{ 9}}, {{287},{ 9}}, {{159},{ 9}}, {{415},{ 9}}, {{ 95},{ 9}}, -{{351},{ 9}}, {{223},{ 9}}, {{479},{ 9}}, {{ 63},{ 9}}, {{319},{ 9}}, -{{191},{ 9}}, {{447},{ 9}}, {{127},{ 9}}, {{383},{ 9}}, {{255},{ 9}}, -{{511},{ 9}}, {{ 0},{ 7}}, {{ 64},{ 7}}, {{ 32},{ 7}}, {{ 96},{ 7}}, -{{ 16},{ 7}}, {{ 80},{ 7}}, {{ 48},{ 7}}, {{112},{ 7}}, {{ 8},{ 7}}, -{{ 72},{ 7}}, {{ 40},{ 7}}, {{104},{ 7}}, {{ 24},{ 7}}, {{ 88},{ 7}}, -{{ 56},{ 7}}, {{120},{ 7}}, {{ 4},{ 7}}, {{ 68},{ 7}}, {{ 36},{ 7}}, -{{100},{ 7}}, {{ 20},{ 7}}, {{ 84},{ 7}}, {{ 52},{ 7}}, {{116},{ 7}}, -{{ 3},{ 8}}, {{131},{ 8}}, {{ 67},{ 8}}, {{195},{ 8}}, {{ 35},{ 8}}, -{{163},{ 8}}, {{ 99},{ 8}}, {{227},{ 8}} -}; - -local const ct_data static_dtree[D_CODES] = { -{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}}, -{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}}, -{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}}, -{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}}, -{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}}, -{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}} -}; - -const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = { - 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, - 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, -10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, -11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, -12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, -13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, -13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, -14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, -14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, -14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, -15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, -15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, -15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 16, 17, -18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, -23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, -24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, -26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, -26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, -27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, -27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, -28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, -28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, -28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29 -}; - -const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, -13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, -17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, -19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, -21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, -22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, -23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, -24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, -25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, -25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, -26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, -26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, -27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28 -}; - -local const int base_length[LENGTH_CODES] = { -0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, -64, 80, 96, 112, 128, 160, 192, 224, 0 -}; - -local const int base_dist[D_CODES] = { - 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, - 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, - 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576 -}; - diff --git a/builddir/zlib-1.2.8/include/zconf.h b/builddir/zlib-1.2.8/include/zconf.h deleted file mode 100644 index 9ccbb0a..0000000 --- a/builddir/zlib-1.2.8/include/zconf.h +++ /dev/null @@ -1,513 +0,0 @@ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2013 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#ifndef ZCONF_H -#define ZCONF_H -/* #undef Z_PREFIX */ -/* #undef Z_HAVE_UNISTD_H */ - -/* - * If you *really* need a unique prefix for all types and library functions, - * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. - * Even better than compiling with -DZ_PREFIX would be to use configure to set - * this permanently in zconf.h using "./configure --zprefix". - */ -#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ -# define Z_PREFIX_SET - -/* all linked symbols */ -# define _dist_code z__dist_code -# define _length_code z__length_code -# define _tr_align z__tr_align -# define _tr_flush_bits z__tr_flush_bits -# define _tr_flush_block z__tr_flush_block -# define _tr_init z__tr_init -# define _tr_stored_block z__tr_stored_block -# define _tr_tally z__tr_tally -# define adler32 z_adler32 -# define adler32_combine z_adler32_combine -# define adler32_combine64 z_adler32_combine64 -# ifndef Z_SOLO -# define compress z_compress -# define compress2 z_compress2 -# define compressBound z_compressBound -# endif -# define crc32 z_crc32 -# define crc32_combine z_crc32_combine -# define crc32_combine64 z_crc32_combine64 -# define deflate z_deflate -# define deflateBound z_deflateBound -# define deflateCopy z_deflateCopy -# define deflateEnd z_deflateEnd -# define deflateInit2_ z_deflateInit2_ -# define deflateInit_ z_deflateInit_ -# define deflateParams z_deflateParams -# define deflatePending z_deflatePending -# define deflatePrime z_deflatePrime -# define deflateReset z_deflateReset -# define deflateResetKeep z_deflateResetKeep -# define deflateSetDictionary z_deflateSetDictionary -# define deflateSetHeader z_deflateSetHeader -# define deflateTune z_deflateTune -# define deflate_copyright z_deflate_copyright -# define get_crc_table z_get_crc_table -# ifndef Z_SOLO -# define gz_error z_gz_error -# define gz_intmax z_gz_intmax -# define gz_strwinerror z_gz_strwinerror -# define gzbuffer z_gzbuffer -# define gzclearerr z_gzclearerr -# define gzclose z_gzclose -# define gzclose_r z_gzclose_r -# define gzclose_w z_gzclose_w -# define gzdirect z_gzdirect -# define gzdopen z_gzdopen -# define gzeof z_gzeof -# define gzerror z_gzerror -# define gzflush z_gzflush -# define gzgetc z_gzgetc -# define gzgetc_ z_gzgetc_ -# define gzgets z_gzgets -# define gzoffset z_gzoffset -# define gzoffset64 z_gzoffset64 -# define gzopen z_gzopen -# define gzopen64 z_gzopen64 -# ifdef _WIN32 -# define gzopen_w z_gzopen_w -# endif -# define gzprintf z_gzprintf -# define gzvprintf z_gzvprintf -# define gzputc z_gzputc -# define gzputs z_gzputs -# define gzread z_gzread -# define gzrewind z_gzrewind -# define gzseek z_gzseek -# define gzseek64 z_gzseek64 -# define gzsetparams z_gzsetparams -# define gztell z_gztell -# define gztell64 z_gztell64 -# define gzungetc z_gzungetc -# define gzwrite z_gzwrite -# endif -# define inflate z_inflate -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define inflateBackInit_ z_inflateBackInit_ -# define inflateCopy z_inflateCopy -# define inflateEnd z_inflateEnd -# define inflateGetHeader z_inflateGetHeader -# define inflateInit2_ z_inflateInit2_ -# define inflateInit_ z_inflateInit_ -# define inflateMark z_inflateMark -# define inflatePrime z_inflatePrime -# define inflateReset z_inflateReset -# define inflateReset2 z_inflateReset2 -# define inflateSetDictionary z_inflateSetDictionary -# define inflateGetDictionary z_inflateGetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateUndermine z_inflateUndermine -# define inflateResetKeep z_inflateResetKeep -# define inflate_copyright z_inflate_copyright -# define inflate_fast z_inflate_fast -# define inflate_table z_inflate_table -# ifndef Z_SOLO -# define uncompress z_uncompress -# endif -# define zError z_zError -# ifndef Z_SOLO -# define zcalloc z_zcalloc -# define zcfree z_zcfree -# endif -# define zlibCompileFlags z_zlibCompileFlags -# define zlibVersion z_zlibVersion - -/* all zlib typedefs in zlib.h and zconf.h */ -# define Byte z_Byte -# define Bytef z_Bytef -# define alloc_func z_alloc_func -# define charf z_charf -# define free_func z_free_func -# ifndef Z_SOLO -# define gzFile z_gzFile -# endif -# define gz_header z_gz_header -# define gz_headerp z_gz_headerp -# define in_func z_in_func -# define intf z_intf -# define out_func z_out_func -# define uInt z_uInt -# define uIntf z_uIntf -# define uLong z_uLong -# define uLongf z_uLongf -# define voidp z_voidp -# define voidpc z_voidpc -# define voidpf z_voidpf - -/* all zlib structs in zlib.h and zconf.h */ -# define gz_header_s z_gz_header_s -# define internal_state z_internal_state - -#endif - -#if defined(__MSDOS__) && !defined(MSDOS) -# define MSDOS -#endif -#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) -# define OS2 -#endif -#if defined(_WINDOWS) && !defined(WINDOWS) -# define WINDOWS -#endif -#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) -# ifndef WIN32 -# define WIN32 -# endif -#endif -#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) -# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) -# ifndef SYS16BIT -# define SYS16BIT -# endif -# endif -#endif - -/* - * Compile with -DMAXSEG_64K if the alloc function cannot allocate more - * than 64k bytes at a time (needed on systems with 16-bit int). - */ -#ifdef SYS16BIT -# define MAXSEG_64K -#endif -#ifdef MSDOS -# define UNALIGNED_OK -#endif - -#ifdef __STDC_VERSION__ -# ifndef STDC -# define STDC -# endif -# if __STDC_VERSION__ >= 199901L -# ifndef STDC99 -# define STDC99 -# endif -# endif -#endif -#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) -# define STDC -#endif -#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) -# define STDC -#endif -#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) -# define STDC -#endif -#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) -# define STDC -#endif - -#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ -# define STDC -#endif - -#ifndef STDC -# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ -# define const /* note: need a more gentle solution here */ -# endif -#endif - -#if defined(ZLIB_CONST) && !defined(z_const) -# define z_const const -#else -# define z_const -#endif - -/* Some Mac compilers merge all .h files incorrectly: */ -#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) -# define NO_DUMMY_DECL -#endif - -/* Maximum value for memLevel in deflateInit2 */ -#ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -# define MAX_MEM_LEVEL 8 -# else -# define MAX_MEM_LEVEL 9 -# endif -#endif - -/* Maximum value for windowBits in deflateInit2 and inflateInit2. - * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files - * created by gzip. (Files created by minigzip can still be extracted by - * gzip.) - */ -#ifndef MAX_WBITS -# define MAX_WBITS 15 /* 32K LZ77 window */ -#endif - -/* The memory requirements for deflate are (in bytes): - (1 << (windowBits+2)) + (1 << (memLevel+9)) - that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) - plus a few kilobytes for small objects. For example, if you want to reduce - the default memory requirements from 256K to 128K, compile with - make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" - Of course this will generally degrade compression (there's no free lunch). - - The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus a few kilobytes - for small objects. -*/ - - /* Type declarations */ - -#ifndef OF /* function prototypes */ -# ifdef STDC -# define OF(args) args -# else -# define OF(args) () -# endif -#endif - -#ifndef Z_ARG /* function prototypes for stdarg */ -# if defined(STDC) || defined(Z_HAVE_STDARG_H) -# define Z_ARG(args) args -# else -# define Z_ARG(args) () -# endif -#endif - -/* The following definitions for FAR are needed only for MSDOS mixed - * model programming (small or medium model with some far allocations). - * This was tested only with MSC; for other MSDOS compilers you may have - * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, - * just define FAR to be empty. - */ -#ifdef SYS16BIT -# if defined(M_I86SM) || defined(M_I86MM) - /* MSC small or medium model */ -# define SMALL_MEDIUM -# ifdef _MSC_VER -# define FAR _far -# else -# define FAR far -# endif -# endif -# if (defined(__SMALL__) || defined(__MEDIUM__)) - /* Turbo C small or medium model */ -# define SMALL_MEDIUM -# ifdef __BORLANDC__ -# define FAR _far -# else -# define FAR far -# endif -# endif -#endif - -#if defined(WINDOWS) || defined(WIN32) - /* If building or using zlib as a DLL, define ZLIB_DLL. - * This is not mandatory, but it offers a little performance increase. - */ -# ifdef ZLIB_DLL -# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) -# ifdef ZLIB_INTERNAL -# define ZEXTERN extern __declspec(dllexport) -# else -# define ZEXTERN extern __declspec(dllimport) -# endif -# endif -# endif /* ZLIB_DLL */ - /* If building or using zlib with the WINAPI/WINAPIV calling convention, - * define ZLIB_WINAPI. - * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. - */ -# ifdef ZLIB_WINAPI -# ifdef FAR -# undef FAR -# endif -# include <windows.h> - /* No need for _export, use ZLIB.DEF instead. */ - /* For complete Windows compatibility, use WINAPI, not __stdcall. */ -# define ZEXPORT WINAPI -# ifdef WIN32 -# define ZEXPORTVA WINAPIV -# else -# define ZEXPORTVA FAR CDECL -# endif -# endif -#endif - -#if defined (__BEOS__) -# ifdef ZLIB_DLL -# ifdef ZLIB_INTERNAL -# define ZEXPORT __declspec(dllexport) -# define ZEXPORTVA __declspec(dllexport) -# else -# define ZEXPORT __declspec(dllimport) -# define ZEXPORTVA __declspec(dllimport) -# endif -# endif -#endif - -#ifndef ZEXTERN -# define ZEXTERN extern -#endif -#ifndef ZEXPORT -# define ZEXPORT -#endif -#ifndef ZEXPORTVA -# define ZEXPORTVA -#endif - -#ifndef FAR -# define FAR -#endif - -#if !defined(__MACTYPES__) -typedef unsigned char Byte; /* 8 bits */ -#endif -typedef unsigned int uInt; /* 16 bits or more */ -typedef unsigned long uLong; /* 32 bits or more */ - -#ifdef SMALL_MEDIUM - /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ -# define Bytef Byte FAR -#else - typedef Byte FAR Bytef; -#endif -typedef char FAR charf; -typedef int FAR intf; -typedef uInt FAR uIntf; -typedef uLong FAR uLongf; - -#ifdef STDC - typedef void const *voidpc; - typedef void FAR *voidpf; - typedef void *voidp; -#else - typedef Byte const *voidpc; - typedef Byte FAR *voidpf; - typedef Byte *voidp; -#endif - -#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) -# include <limits.h> -# if (UINT_MAX == 0xffffffffUL) -# define Z_U4 unsigned -# elif (ULONG_MAX == 0xffffffffUL) -# define Z_U4 unsigned long -# elif (USHRT_MAX == 0xffffffffUL) -# define Z_U4 unsigned short -# endif -#endif - -#ifdef Z_U4 - typedef Z_U4 z_crc_t; -#else - typedef unsigned long z_crc_t; -#endif - -#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ -# define Z_HAVE_UNISTD_H -#endif - -#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ -# define Z_HAVE_STDARG_H -#endif - -#ifdef STDC -# ifndef Z_SOLO -# include <sys/types.h> /* for off_t */ -# endif -#endif - -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -# include <stdarg.h> /* for va_list */ -# endif -#endif - -#ifdef _WIN32 -# ifndef Z_SOLO -# include <stddef.h> /* for wchar_t */ -# endif -#endif - -/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and - * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even - * though the former does not conform to the LFS document), but considering - * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as - * equivalently requesting no 64-bit operations - */ -#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 -# undef _LARGEFILE64_SOURCE -#endif - -#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) -# define Z_HAVE_UNISTD_H -#endif -#ifndef Z_SOLO -# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) -# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ -# ifdef VMS -# include <unixio.h> /* for off_t */ -# endif -# ifndef z_off_t -# define z_off_t off_t -# endif -# endif -#endif - -#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 -# define Z_LFS64 -#endif - -#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) -# define Z_LARGE64 -#endif - -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) -# define Z_WANT64 -#endif - -#if !defined(SEEK_SET) && !defined(Z_SOLO) -# define SEEK_SET 0 /* Seek from beginning of file. */ -# define SEEK_CUR 1 /* Seek from current position. */ -# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ -#endif - -#ifndef z_off_t -# define z_off_t long -#endif - -#if !defined(_WIN32) && defined(Z_LARGE64) -# define z_off64_t off64_t -#else -# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) -# define z_off64_t __int64 -# else -# define z_off64_t z_off_t -# endif -#endif - -/* MVS linker does not support external names larger than 8 bytes */ -#if defined(__MVS__) - #pragma map(deflateInit_,"DEIN") - #pragma map(deflateInit2_,"DEIN2") - #pragma map(deflateEnd,"DEEND") - #pragma map(deflateBound,"DEBND") - #pragma map(inflateInit_,"ININ") - #pragma map(inflateInit2_,"ININ2") - #pragma map(inflateEnd,"INEND") - #pragma map(inflateSync,"INSY") - #pragma map(inflateSetDictionary,"INSEDI") - #pragma map(compressBound,"CMBND") - #pragma map(inflate_table,"INTABL") - #pragma map(inflate_fast,"INFA") - #pragma map(inflate_copyright,"INCOPY") -#endif - -#endif /* ZCONF_H */ diff --git a/builddir/zlib-1.2.8/include/zlib.h b/builddir/zlib-1.2.8/include/zlib.h deleted file mode 100644 index 3e0c767..0000000 --- a/builddir/zlib-1.2.8/include/zlib.h +++ /dev/null @@ -1,1768 +0,0 @@ -/* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.8, April 28th, 2013 - - Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - - - The data format used by the zlib library is described by RFCs (Request for - Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 - (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). -*/ - -#ifndef ZLIB_H -#define ZLIB_H - -#include "zconf.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define ZLIB_VERSION "1.2.8" -#define ZLIB_VERNUM 0x1280 -#define ZLIB_VER_MAJOR 1 -#define ZLIB_VER_MINOR 2 -#define ZLIB_VER_REVISION 8 -#define ZLIB_VER_SUBREVISION 0 - -/* - The 'zlib' compression library provides in-memory compression and - decompression functions, including integrity checks of the uncompressed data. - This version of the library supports only one compression method (deflation) - but other algorithms will be added later and will have the same stream - interface. - - Compression can be done in a single step if the buffers are large enough, - or can be done by repeated calls of the compression function. In the latter - case, the application must provide more input and/or consume the output - (providing more output space) before each call. - - The compressed data format used by default by the in-memory functions is - the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped - around a deflate stream, which is itself documented in RFC 1951. - - The library also supports reading and writing files in gzip (.gz) format - with an interface similar to that of stdio using the functions that start - with "gz". The gzip format is different from the zlib format. gzip is a - gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. - - This library can optionally read and write gzip streams in memory as well. - - The zlib format was designed to be compact and fast for use in memory - and on communications channels. The gzip format was designed for single- - file compression on file systems, has a larger header than zlib to maintain - directory information, and uses a different, slower check method than zlib. - - The library does not install any signal handler. The decoder checks - the consistency of the compressed data, so the library should never crash - even in case of corrupted input. -*/ - -typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); -typedef void (*free_func) OF((voidpf opaque, voidpf address)); - -struct internal_state; - -typedef struct z_stream_s { - z_const Bytef *next_in; /* next input byte */ - uInt avail_in; /* number of bytes available at next_in */ - uLong total_in; /* total number of input bytes read so far */ - - Bytef *next_out; /* next output byte should be put there */ - uInt avail_out; /* remaining free space at next_out */ - uLong total_out; /* total number of bytes output so far */ - - z_const char *msg; /* last error message, NULL if no error */ - struct internal_state FAR *state; /* not visible by applications */ - - alloc_func zalloc; /* used to allocate the internal state */ - free_func zfree; /* used to free the internal state */ - voidpf opaque; /* private data object passed to zalloc and zfree */ - - int data_type; /* best guess about the data type: binary or text */ - uLong adler; /* adler32 value of the uncompressed data */ - uLong reserved; /* reserved for future use */ -} z_stream; - -typedef z_stream FAR *z_streamp; - -/* - gzip header information passed to and from zlib routines. See RFC 1952 - for more details on the meanings of these fields. -*/ -typedef struct gz_header_s { - int text; /* true if compressed data believed to be text */ - uLong time; /* modification time */ - int xflags; /* extra flags (not used when writing a gzip file) */ - int os; /* operating system */ - Bytef *extra; /* pointer to extra field or Z_NULL if none */ - uInt extra_len; /* extra field length (valid if extra != Z_NULL) */ - uInt extra_max; /* space at extra (only when reading header) */ - Bytef *name; /* pointer to zero-terminated file name or Z_NULL */ - uInt name_max; /* space at name (only when reading header) */ - Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */ - uInt comm_max; /* space at comment (only when reading header) */ - int hcrc; /* true if there was or will be a header crc */ - int done; /* true when done reading gzip header (not used - when writing a gzip file) */ -} gz_header; - -typedef gz_header FAR *gz_headerp; - -/* - The application must update next_in and avail_in when avail_in has dropped - to zero. It must update next_out and avail_out when avail_out has dropped - to zero. The application must initialize zalloc, zfree and opaque before - calling the init function. All other fields are set by the compression - library and must not be updated by the application. - - The opaque value provided by the application will be passed as the first - parameter for calls of zalloc and zfree. This can be useful for custom - memory management. The compression library attaches no meaning to the - opaque value. - - zalloc must return Z_NULL if there is not enough memory for the object. - If zlib is used in a multi-threaded application, zalloc and zfree must be - thread safe. - - On 16-bit systems, the functions zalloc and zfree must be able to allocate - exactly 65536 bytes, but will not be required to allocate more than this if - the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers - returned by zalloc for objects of exactly 65536 bytes *must* have their - offset normalized to zero. The default allocation function provided by this - library ensures this (see zutil.c). To reduce memory requirements and avoid - any allocation of 64K objects, at the expense of compression ratio, compile - the library with -DMAX_WBITS=14 (see zconf.h). - - The fields total_in and total_out can be used for statistics or progress - reports. After compression, total_in holds the total size of the - uncompressed data and may be saved for use in the decompressor (particularly - if the decompressor wants to decompress everything in a single step). -*/ - - /* constants */ - -#define Z_NO_FLUSH 0 -#define Z_PARTIAL_FLUSH 1 -#define Z_SYNC_FLUSH 2 -#define Z_FULL_FLUSH 3 -#define Z_FINISH 4 -#define Z_BLOCK 5 -#define Z_TREES 6 -/* Allowed flush values; see deflate() and inflate() below for details */ - -#define Z_OK 0 -#define Z_STREAM_END 1 -#define Z_NEED_DICT 2 -#define Z_ERRNO (-1) -#define Z_STREAM_ERROR (-2) -#define Z_DATA_ERROR (-3) -#define Z_MEM_ERROR (-4) -#define Z_BUF_ERROR (-5) -#define Z_VERSION_ERROR (-6) -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - -#define Z_NO_COMPRESSION 0 -#define Z_BEST_SPEED 1 -#define Z_BEST_COMPRESSION 9 -#define Z_DEFAULT_COMPRESSION (-1) -/* compression levels */ - -#define Z_FILTERED 1 -#define Z_HUFFMAN_ONLY 2 -#define Z_RLE 3 -#define Z_FIXED 4 -#define Z_DEFAULT_STRATEGY 0 -/* compression strategy; see deflateInit2() below for details */ - -#define Z_BINARY 0 -#define Z_TEXT 1 -#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */ -#define Z_UNKNOWN 2 -/* Possible values of the data_type field (though see inflate()) */ - -#define Z_DEFLATED 8 -/* The deflate compression method (the only one supported in this version) */ - -#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ - -#define zlib_version zlibVersion() -/* for compatibility with versions < 1.0.2 */ - - - /* basic functions */ - -ZEXTERN const char * ZEXPORT zlibVersion OF((void)); -/* The application can compare zlibVersion and ZLIB_VERSION for consistency. - If the first character differs, the library code actually used is not - compatible with the zlib.h header file used by the application. This check - is automatically made by deflateInit and inflateInit. - */ - -/* -ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); - - Initializes the internal stream state for compression. The fields - zalloc, zfree and opaque must be initialized before by the caller. If - zalloc and zfree are set to Z_NULL, deflateInit updates them to use default - allocation functions. - - The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: - 1 gives best speed, 9 gives best compression, 0 gives no compression at all - (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION - requests a default compromise between speed and compression (currently - equivalent to level 6). - - deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if level is not a valid compression level, or - Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible - with the version assumed by the caller (ZLIB_VERSION). msg is set to null - if there is no error message. deflateInit does not perform any compression: - this will be done by deflate(). -*/ - - -ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); -/* - deflate compresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce - some output latency (reading input without producing any output) except when - forced to flush. - - The detailed semantics are as follows. deflate performs one or both of the - following actions: - - - Compress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in and avail_in are updated and - processing will resume at this point for the next call of deflate(). - - - Provide more output starting at next_out and update next_out and avail_out - accordingly. This action is forced if the parameter flush is non zero. - Forcing flush frequently degrades the compression ratio, so this parameter - should be set only when necessary (in interactive applications). Some - output may be provided even if flush is not set. - - Before the call of deflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming more - output, and updating avail_in or avail_out accordingly; avail_out should - never be zero before the call. The application can consume the compressed - output when it wants, for example when the output buffer is full (avail_out - == 0), or after each call of deflate(). If deflate returns Z_OK and with - zero avail_out, it must be called again after making room in the output - buffer because there might be more output pending. - - Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to - decide how much data to accumulate before producing output, in order to - maximize compression. - - If the parameter flush is set to Z_SYNC_FLUSH, all pending output is - flushed to the output buffer and the output is aligned on a byte boundary, so - that the decompressor can get all input data available so far. (In - particular avail_in is zero after the call if enough output space has been - provided before the call.) Flushing may degrade compression for some - compression algorithms and so it should be used only when necessary. This - completes the current deflate block and follows it with an empty stored block - that is three bits plus filler bits to the next byte, followed by four bytes - (00 00 ff ff). - - If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the - output buffer, but the output is not aligned to a byte boundary. All of the - input data so far will be available to the decompressor, as for Z_SYNC_FLUSH. - This completes the current deflate block and follows it with an empty fixed - codes block that is 10 bits long. This assures that enough bytes are output - in order for the decompressor to finish the block before the empty fixed code - block. - - If flush is set to Z_BLOCK, a deflate block is completed and emitted, as - for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to - seven bits of the current block are held to be written as the next byte after - the next deflate block is completed. In this case, the decompressor may not - be provided enough bits at this point in order to complete decompression of - the data provided so far to the compressor. It may need to wait for the next - block to be emitted. This is for advanced applications that need to control - the emission of deflate blocks. - - If flush is set to Z_FULL_FLUSH, all output is flushed as with - Z_SYNC_FLUSH, and the compression state is reset so that decompression can - restart from this point if previous compressed data has been damaged or if - random access is desired. Using Z_FULL_FLUSH too often can seriously degrade - compression. - - If deflate returns with avail_out == 0, this function must be called again - with the same value of the flush parameter and more output space (updated - avail_out), until the flush is complete (deflate returns with non-zero - avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that - avail_out is greater than six to avoid repeated flush markers due to - avail_out == 0 on return. - - If the parameter flush is set to Z_FINISH, pending input is processed, - pending output is flushed and deflate returns with Z_STREAM_END if there was - enough output space; if deflate returns with Z_OK, this function must be - called again with Z_FINISH and more output space (updated avail_out) but no - more input data, until it returns with Z_STREAM_END or an error. After - deflate has returned Z_STREAM_END, the only possible operations on the stream - are deflateReset or deflateEnd. - - Z_FINISH can be used immediately after deflateInit if all the compression - is to be done in a single step. In this case, avail_out must be at least the - value returned by deflateBound (see below). Then deflate is guaranteed to - return Z_STREAM_END. If not enough output space is provided, deflate will - not return Z_STREAM_END, and it must be called again as described above. - - deflate() sets strm->adler to the adler32 checksum of all input read - so far (that is, total_in bytes). - - deflate() may update strm->data_type if it can make a good guess about - the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered - binary. This field is only for information purposes and does not affect the - compression algorithm in any manner. - - deflate() returns Z_OK if some progress has been made (more input - processed or more output produced), Z_STREAM_END if all input has been - consumed and all output has been produced (only when flush is set to - Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example - if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible - (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not - fatal, and deflate() can be called again with more input and more output - space to continue compressing. -*/ - - -ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); -/* - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any pending - output. - - deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the - stream state was inconsistent, Z_DATA_ERROR if the stream was freed - prematurely (some input or output was discarded). In the error case, msg - may be set but then points to a static string (which must not be - deallocated). -*/ - - -/* -ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); - - Initializes the internal stream state for decompression. The fields - next_in, avail_in, zalloc, zfree and opaque must be initialized before by - the caller. If next_in is not Z_NULL and avail_in is large enough (the - exact value depends on the compression method), inflateInit determines the - compression method from the zlib header and allocates all data structures - accordingly; otherwise the allocation will be deferred to the first call of - inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to - use default allocation functions. - - inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller, or Z_STREAM_ERROR if the parameters are - invalid, such as a null pointer to the structure. msg is set to null if - there is no error message. inflateInit does not perform any decompression - apart from possibly reading the zlib header if present: actual decompression - will be done by inflate(). (So next_in and avail_in may be modified, but - next_out and avail_out are unused and unchanged.) The current implementation - of inflateInit() does not process any header information -- that is deferred - until inflate() is called. -*/ - - -ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); -/* - inflate decompresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce - some output latency (reading input without producing any output) except when - forced to flush. - - The detailed semantics are as follows. inflate performs one or both of the - following actions: - - - Decompress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in is updated and processing will - resume at this point for the next call of inflate(). - - - Provide more output starting at next_out and update next_out and avail_out - accordingly. inflate() provides as much output as possible, until there is - no more input data or no more space in the output buffer (see below about - the flush parameter). - - Before the call of inflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming more - output, and updating the next_* and avail_* values accordingly. The - application can consume the uncompressed output when it wants, for example - when the output buffer is full (avail_out == 0), or after each call of - inflate(). If inflate returns Z_OK and with zero avail_out, it must be - called again after making room in the output buffer because there might be - more output pending. - - The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH, - Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much - output as possible to the output buffer. Z_BLOCK requests that inflate() - stop if and when it gets to the next deflate block boundary. When decoding - the zlib or gzip format, this will cause inflate() to return immediately - after the header and before the first block. When doing a raw inflate, - inflate() will go ahead and process the first block, and will return when it - gets to the end of that block, or when it runs out of data. - - The Z_BLOCK option assists in appending to or combining deflate streams. - Also to assist in this, on return inflate() will set strm->data_type to the - number of unused bits in the last byte taken from strm->next_in, plus 64 if - inflate() is currently decoding the last block in the deflate stream, plus - 128 if inflate() returned immediately after decoding an end-of-block code or - decoding the complete header up to just before the first byte of the deflate - stream. The end-of-block will not be indicated until all of the uncompressed - data from that block has been written to strm->next_out. The number of - unused bits may in general be greater than seven, except when bit 7 of - data_type is set, in which case the number of unused bits will be less than - eight. data_type is set as noted here every time inflate() returns for all - flush options, and so can be used to determine the amount of currently - consumed input in bits. - - The Z_TREES option behaves as Z_BLOCK does, but it also returns when the - end of each deflate block header is reached, before any actual data in that - block is decoded. This allows the caller to determine the length of the - deflate block header for later use in random access within a deflate block. - 256 is added to the value of strm->data_type when inflate() returns - immediately after reaching the end of the deflate block header. - - inflate() should normally be called until it returns Z_STREAM_END or an - error. However if all decompression is to be performed in a single step (a - single call of inflate), the parameter flush should be set to Z_FINISH. In - this case all pending input is processed and all pending output is flushed; - avail_out must be large enough to hold all of the uncompressed data for the - operation to complete. (The size of the uncompressed data may have been - saved by the compressor for this purpose.) The use of Z_FINISH is not - required to perform an inflation in one step. However it may be used to - inform inflate that a faster approach can be used for the single inflate() - call. Z_FINISH also informs inflate to not maintain a sliding window if the - stream completes, which reduces inflate's memory footprint. If the stream - does not complete, either because not all of the stream is provided or not - enough output space is provided, then a sliding window will be allocated and - inflate() can be called again to continue the operation as if Z_NO_FLUSH had - been used. - - In this implementation, inflate() always flushes as much output as - possible to the output buffer, and always uses the faster approach on the - first call. So the effects of the flush parameter in this implementation are - on the return value of inflate() as noted below, when inflate() returns early - when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of - memory for a sliding window when Z_FINISH is used. - - If a preset dictionary is needed after this call (see inflateSetDictionary - below), inflate sets strm->adler to the Adler-32 checksum of the dictionary - chosen by the compressor and returns Z_NEED_DICT; otherwise it sets - strm->adler to the Adler-32 checksum of all output produced so far (that is, - total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described - below. At the end of the stream, inflate() checks that its computed adler32 - checksum is equal to that saved by the compressor and returns Z_STREAM_END - only if the checksum is correct. - - inflate() can decompress and check either zlib-wrapped or gzip-wrapped - deflate data. The header type is detected automatically, if requested when - initializing with inflateInit2(). Any information contained in the gzip - header is not retained, so applications that need that information should - instead use raw inflate, see inflateInit2() below, or inflateBack() and - perform their own processing of the gzip header and trailer. When processing - gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output - producted so far. The CRC-32 is checked against the gzip trailer. - - inflate() returns Z_OK if some progress has been made (more input processed - or more output produced), Z_STREAM_END if the end of the compressed data has - been reached and all uncompressed output has been produced, Z_NEED_DICT if a - preset dictionary is needed at this point, Z_DATA_ERROR if the input data was - corrupted (input stream not conforming to the zlib format or incorrect check - value), Z_STREAM_ERROR if the stream structure was inconsistent (for example - next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory, - Z_BUF_ERROR if no progress is possible or if there was not enough room in the - output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and - inflate() can be called again with more input and more output space to - continue decompressing. If Z_DATA_ERROR is returned, the application may - then call inflateSync() to look for a good compression block if a partial - recovery of the data is desired. -*/ - - -ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); -/* - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any pending - output. - - inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state - was inconsistent. In the error case, msg may be set but then points to a - static string (which must not be deallocated). -*/ - - - /* Advanced functions */ - -/* - The following functions are needed only in some special applications. -*/ - -/* -ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, - int level, - int method, - int windowBits, - int memLevel, - int strategy)); - - This is another version of deflateInit with more compression options. The - fields next_in, zalloc, zfree and opaque must be initialized before by the - caller. - - The method parameter is the compression method. It must be Z_DEFLATED in - this version of the library. - - The windowBits parameter is the base two logarithm of the window size - (the size of the history buffer). It should be in the range 8..15 for this - version of the library. Larger values of this parameter result in better - compression at the expense of memory usage. The default value is 15 if - deflateInit is used instead. - - windowBits can also be -8..-15 for raw deflate. In this case, -windowBits - determines the window size. deflate() will then generate raw deflate data - with no zlib header or trailer, and will not compute an adler32 check value. - - windowBits can also be greater than 15 for optional gzip encoding. Add - 16 to windowBits to write a simple gzip header and trailer around the - compressed data instead of a zlib wrapper. The gzip header will have no - file name, no extra data, no comment, no modification time (set to zero), no - header crc, and the operating system will be set to 255 (unknown). If a - gzip stream is being written, strm->adler is a crc32 instead of an adler32. - - The memLevel parameter specifies how much memory should be allocated - for the internal compression state. memLevel=1 uses minimum memory but is - slow and reduces compression ratio; memLevel=9 uses maximum memory for - optimal speed. The default value is 8. See zconf.h for total memory usage - as a function of windowBits and memLevel. - - The strategy parameter is used to tune the compression algorithm. Use the - value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a - filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no - string match), or Z_RLE to limit match distances to one (run-length - encoding). Filtered data consists mostly of small values with a somewhat - random distribution. In this case, the compression algorithm is tuned to - compress them better. The effect of Z_FILTERED is to force more Huffman - coding and less string matching; it is somewhat intermediate between - Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as - fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The - strategy parameter only affects the compression ratio but not the - correctness of the compressed output even if it is not set appropriately. - Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler - decoder for special applications. - - deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid - method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is - incompatible with the version assumed by the caller (ZLIB_VERSION). msg is - set to null if there is no error message. deflateInit2 does not perform any - compression: this will be done by deflate(). -*/ - -ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); -/* - Initializes the compression dictionary from the given byte sequence - without producing any compressed output. When using the zlib format, this - function must be called immediately after deflateInit, deflateInit2 or - deflateReset, and before any call of deflate. When doing raw deflate, this - function must be called either before any call of deflate, or immediately - after the completion of a deflate block, i.e. after all input has been - consumed and all output has been delivered when using any of the flush - options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The - compressor and decompressor must use exactly the same dictionary (see - inflateSetDictionary). - - The dictionary should consist of strings (byte sequences) that are likely - to be encountered later in the data to be compressed, with the most commonly - used strings preferably put towards the end of the dictionary. Using a - dictionary is most useful when the data to be compressed is short and can be - predicted with good accuracy; the data can then be compressed better than - with the default empty dictionary. - - Depending on the size of the compression data structures selected by - deflateInit or deflateInit2, a part of the dictionary may in effect be - discarded, for example if the dictionary is larger than the window size - provided in deflateInit or deflateInit2. Thus the strings most likely to be - useful should be put at the end of the dictionary, not at the front. In - addition, the current implementation of deflate will use at most the window - size minus 262 bytes of the provided dictionary. - - Upon return of this function, strm->adler is set to the adler32 value - of the dictionary; the decompressor may later use this value to determine - which dictionary has been used by the compressor. (The adler32 value - applies to the whole dictionary even if only a subset of the dictionary is - actually used by the compressor.) If a raw deflate was requested, then the - adler32 value is not computed and strm->adler is not set. - - deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a - parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is - inconsistent (for example if deflate has already been called for this stream - or if not at a block boundary for raw deflate). deflateSetDictionary does - not perform any compression: this will be done by deflate(). -*/ - -ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, - z_streamp source)); -/* - Sets the destination stream as a complete copy of the source stream. - - This function can be useful when several compression strategies will be - tried, for example when there are several ways of pre-processing the input - data with a filter. The streams that will be discarded should then be freed - by calling deflateEnd. Note that deflateCopy duplicates the internal - compression state which can be quite large, so this strategy is slow and can - consume lots of memory. - - deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being Z_NULL). msg is left unchanged in both source and - destination. -*/ - -ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); -/* - This function is equivalent to deflateEnd followed by deflateInit, - but does not free and reallocate all the internal compression state. The - stream will keep the same compression level and any other attributes that - may have been set by deflateInit2. - - deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL). -*/ - -ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, - int level, - int strategy)); -/* - Dynamically update the compression level and compression strategy. The - interpretation of level and strategy is as in deflateInit2. This can be - used to switch between compression and straight copy of the input data, or - to switch to a different kind of input data requiring a different strategy. - If the compression level is changed, the input available so far is - compressed with the old level (and may be flushed); the new level will take - effect only at the next call of deflate(). - - Before the call of deflateParams, the stream state must be set as for - a call of deflate(), since the currently available input may have to be - compressed and flushed. In particular, strm->avail_out must be non-zero. - - deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source - stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if - strm->avail_out was zero. -*/ - -ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, - int good_length, - int max_lazy, - int nice_length, - int max_chain)); -/* - Fine tune deflate's internal compression parameters. This should only be - used by someone who understands the algorithm used by zlib's deflate for - searching for the best matching string, and even then only by the most - fanatic optimizer trying to squeeze out the last compressed bit for their - specific input data. Read the deflate.c source code for the meaning of the - max_lazy, good_length, nice_length, and max_chain parameters. - - deflateTune() can be called after deflateInit() or deflateInit2(), and - returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. - */ - -ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, - uLong sourceLen)); -/* - deflateBound() returns an upper bound on the compressed size after - deflation of sourceLen bytes. It must be called after deflateInit() or - deflateInit2(), and after deflateSetHeader(), if used. This would be used - to allocate an output buffer for deflation in a single pass, and so would be - called before deflate(). If that first deflate() call is provided the - sourceLen input bytes, an output buffer allocated to the size returned by - deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed - to return Z_STREAM_END. Note that it is possible for the compressed size to - be larger than the value returned by deflateBound() if flush options other - than Z_FINISH or Z_NO_FLUSH are used. -*/ - -ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm, - unsigned *pending, - int *bits)); -/* - deflatePending() returns the number of bytes and bits of output that have - been generated, but not yet provided in the available output. The bytes not - provided would be due to the available output space having being consumed. - The number of bits of output not provided are between 0 and 7, where they - await more bits to join them in order to fill out a full byte. If pending - or bits are Z_NULL, then those values are not set. - - deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. - */ - -ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, - int bits, - int value)); -/* - deflatePrime() inserts bits in the deflate output stream. The intent - is that this function is used to start off the deflate output with the bits - leftover from a previous deflate stream when appending to it. As such, this - function can only be used for raw deflate, and must be used before the first - deflate() call after a deflateInit2() or deflateReset(). bits must be less - than or equal to 16, and that many of the least significant bits of value - will be inserted in the output. - - deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough - room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the - source stream state was inconsistent. -*/ - -ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, - gz_headerp head)); -/* - deflateSetHeader() provides gzip header information for when a gzip - stream is requested by deflateInit2(). deflateSetHeader() may be called - after deflateInit2() or deflateReset() and before the first call of - deflate(). The text, time, os, extra field, name, and comment information - in the provided gz_header structure are written to the gzip header (xflag is - ignored -- the extra flags are set according to the compression level). The - caller must assure that, if not Z_NULL, name and comment are terminated with - a zero byte, and that if extra is not Z_NULL, that extra_len bytes are - available there. If hcrc is true, a gzip header crc is included. Note that - the current versions of the command-line version of gzip (up through version - 1.3.x) do not support header crc's, and will report that it is a "multi-part - gzip file" and give up. - - If deflateSetHeader is not used, the default gzip header has text false, - the time set to zero, and os set to 255, with no extra, name, or comment - fields. The gzip header is returned to the default state by deflateReset(). - - deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -/* -ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, - int windowBits)); - - This is another version of inflateInit with an extra parameter. The - fields next_in, avail_in, zalloc, zfree and opaque must be initialized - before by the caller. - - The windowBits parameter is the base two logarithm of the maximum window - size (the size of the history buffer). It should be in the range 8..15 for - this version of the library. The default value is 15 if inflateInit is used - instead. windowBits must be greater than or equal to the windowBits value - provided to deflateInit2() while compressing, or it must be equal to 15 if - deflateInit2() was not used. If a compressed stream with a larger window - size is given as input, inflate() will return with the error code - Z_DATA_ERROR instead of trying to allocate a larger window. - - windowBits can also be zero to request that inflate use the window size in - the zlib header of the compressed stream. - - windowBits can also be -8..-15 for raw inflate. In this case, -windowBits - determines the window size. inflate() will then process raw deflate data, - not looking for a zlib or gzip header, not generating a check value, and not - looking for any check values for comparison at the end of the stream. This - is for use with other formats that use the deflate compressed data format - such as zip. Those formats provide their own check values. If a custom - format is developed using the raw deflate format for compressed data, it is - recommended that a check value such as an adler32 or a crc32 be applied to - the uncompressed data as is done in the zlib, gzip, and zip formats. For - most applications, the zlib format should be used as is. Note that comments - above on the use in deflateInit2() applies to the magnitude of windowBits. - - windowBits can also be greater than 15 for optional gzip decoding. Add - 32 to windowBits to enable zlib and gzip decoding with automatic header - detection, or add 16 to decode only the gzip format (the zlib format will - return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a - crc32 instead of an adler32. - - inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller, or Z_STREAM_ERROR if the parameters are - invalid, such as a null pointer to the structure. msg is set to null if - there is no error message. inflateInit2 does not perform any decompression - apart from possibly reading the zlib header if present: actual decompression - will be done by inflate(). (So next_in and avail_in may be modified, but - next_out and avail_out are unused and unchanged.) The current implementation - of inflateInit2() does not process any header information -- that is - deferred until inflate() is called. -*/ - -ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); -/* - Initializes the decompression dictionary from the given uncompressed byte - sequence. This function must be called immediately after a call of inflate, - if that call returned Z_NEED_DICT. The dictionary chosen by the compressor - can be determined from the adler32 value returned by that call of inflate. - The compressor and decompressor must use exactly the same dictionary (see - deflateSetDictionary). For raw inflate, this function can be called at any - time to set the dictionary. If the provided dictionary is smaller than the - window and there is already data in the window, then the provided dictionary - will amend what's there. The application must insure that the dictionary - that was used for compression is provided. - - inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a - parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is - inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the - expected one (incorrect adler32 value). inflateSetDictionary does not - perform any decompression: this will be done by subsequent calls of - inflate(). -*/ - -ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, - Bytef *dictionary, - uInt *dictLength)); -/* - Returns the sliding dictionary being maintained by inflate. dictLength is - set to the number of bytes in the dictionary, and that many bytes are copied - to dictionary. dictionary must have enough space, where 32768 bytes is - always enough. If inflateGetDictionary() is called with dictionary equal to - Z_NULL, then only the dictionary length is returned, and nothing is copied. - Similary, if dictLength is Z_NULL, then it is not set. - - inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the - stream state is inconsistent. -*/ - -ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); -/* - Skips invalid compressed data until a possible full flush point (see above - for the description of deflate with Z_FULL_FLUSH) can be found, or until all - available input is skipped. No output is provided. - - inflateSync searches for a 00 00 FF FF pattern in the compressed data. - All full flush points have this pattern, but not all occurrences of this - pattern are full flush points. - - inflateSync returns Z_OK if a possible full flush point has been found, - Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point - has been found, or Z_STREAM_ERROR if the stream structure was inconsistent. - In the success case, the application may save the current current value of - total_in which indicates where valid compressed data was found. In the - error case, the application may repeatedly call inflateSync, providing more - input each time, until success or end of the input data. -*/ - -ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, - z_streamp source)); -/* - Sets the destination stream as a complete copy of the source stream. - - This function can be useful when randomly accessing a large stream. The - first pass through the stream can periodically record the inflate state, - allowing restarting inflate at those points when randomly accessing the - stream. - - inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being Z_NULL). msg is left unchanged in both source and - destination. -*/ - -ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); -/* - This function is equivalent to inflateEnd followed by inflateInit, - but does not free and reallocate all the internal decompression state. The - stream will keep attributes that may have been set by inflateInit2. - - inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL). -*/ - -ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, - int windowBits)); -/* - This function is the same as inflateReset, but it also permits changing - the wrap and window size requests. The windowBits parameter is interpreted - the same as it is for inflateInit2. - - inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL), or if - the windowBits parameter is invalid. -*/ - -ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, - int bits, - int value)); -/* - This function inserts bits in the inflate input stream. The intent is - that this function is used to start inflating at a bit position in the - middle of a byte. The provided bits will be used before any bytes are used - from next_in. This function should only be used with raw inflate, and - should be used before the first inflate() call after inflateInit2() or - inflateReset(). bits must be less than or equal to 16, and that many of the - least significant bits of value will be inserted in the input. - - If bits is negative, then the input stream bit buffer is emptied. Then - inflatePrime() can be called again to put bits in the buffer. This is used - to clear out bits leftover after feeding inflate a block description prior - to feeding inflate codes. - - inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); -/* - This function returns two values, one in the lower 16 bits of the return - value, and the other in the remaining upper bits, obtained by shifting the - return value down 16 bits. If the upper value is -1 and the lower value is - zero, then inflate() is currently decoding information outside of a block. - If the upper value is -1 and the lower value is non-zero, then inflate is in - the middle of a stored block, with the lower value equaling the number of - bytes from the input remaining to copy. If the upper value is not -1, then - it is the number of bits back from the current bit position in the input of - the code (literal or length/distance pair) currently being processed. In - that case the lower value is the number of bytes already emitted for that - code. - - A code is being processed if inflate is waiting for more input to complete - decoding of the code, or if it has completed decoding but is waiting for - more output space to write the literal or match data. - - inflateMark() is used to mark locations in the input data for random - access, which may be at bit positions, and to note those cases where the - output of a code may span boundaries of random access blocks. The current - location in the input stream can be determined from avail_in and data_type - as noted in the description for the Z_BLOCK flush parameter for inflate. - - inflateMark returns the value noted above or -1 << 16 if the provided - source stream state was inconsistent. -*/ - -ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, - gz_headerp head)); -/* - inflateGetHeader() requests that gzip header information be stored in the - provided gz_header structure. inflateGetHeader() may be called after - inflateInit2() or inflateReset(), and before the first call of inflate(). - As inflate() processes the gzip stream, head->done is zero until the header - is completed, at which time head->done is set to one. If a zlib stream is - being decoded, then head->done is set to -1 to indicate that there will be - no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be - used to force inflate() to return immediately after header processing is - complete and before any actual data is decompressed. - - The text, time, xflags, and os fields are filled in with the gzip header - contents. hcrc is set to true if there is a header CRC. (The header CRC - was valid if done is set to one.) If extra is not Z_NULL, then extra_max - contains the maximum number of bytes to write to extra. Once done is true, - extra_len contains the actual extra field length, and extra contains the - extra field, or that field truncated if extra_max is less than extra_len. - If name is not Z_NULL, then up to name_max characters are written there, - terminated with a zero unless the length is greater than name_max. If - comment is not Z_NULL, then up to comm_max characters are written there, - terminated with a zero unless the length is greater than comm_max. When any - of extra, name, or comment are not Z_NULL and the respective field is not - present in the header, then that field is set to Z_NULL to signal its - absence. This allows the use of deflateSetHeader() with the returned - structure to duplicate the header. However if those fields are set to - allocated memory, then the application will need to save those pointers - elsewhere so that they can be eventually freed. - - If inflateGetHeader is not used, then the header information is simply - discarded. The header is always checked for validity, including the header - CRC if present. inflateReset() will reset the process to discard the header - information. The application would need to call inflateGetHeader() again to - retrieve the header from the next gzip stream. - - inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -/* -ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, - unsigned char FAR *window)); - - Initialize the internal stream state for decompression using inflateBack() - calls. The fields zalloc, zfree and opaque in strm must be initialized - before the call. If zalloc and zfree are Z_NULL, then the default library- - derived memory allocation routines are used. windowBits is the base two - logarithm of the window size, in the range 8..15. window is a caller - supplied buffer of that size. Except for special applications where it is - assured that deflate was used with small window sizes, windowBits must be 15 - and a 32K byte window must be supplied to be able to decompress general - deflate streams. - - See inflateBack() for the usage of these routines. - - inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of - the parameters are invalid, Z_MEM_ERROR if the internal state could not be - allocated, or Z_VERSION_ERROR if the version of the library does not match - the version of the header file. -*/ - -typedef unsigned (*in_func) OF((void FAR *, - z_const unsigned char FAR * FAR *)); -typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); - -ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, - in_func in, void FAR *in_desc, - out_func out, void FAR *out_desc)); -/* - inflateBack() does a raw inflate with a single call using a call-back - interface for input and output. This is potentially more efficient than - inflate() for file i/o applications, in that it avoids copying between the - output and the sliding window by simply making the window itself the output - buffer. inflate() can be faster on modern CPUs when used with large - buffers. inflateBack() trusts the application to not change the output - buffer passed by the output function, at least until inflateBack() returns. - - inflateBackInit() must be called first to allocate the internal state - and to initialize the state with the user-provided window buffer. - inflateBack() may then be used multiple times to inflate a complete, raw - deflate stream with each call. inflateBackEnd() is then called to free the - allocated state. - - A raw deflate stream is one with no zlib or gzip header or trailer. - This routine would normally be used in a utility that reads zip or gzip - files and writes out uncompressed files. The utility would decode the - header and process the trailer on its own, hence this routine expects only - the raw deflate stream to decompress. This is different from the normal - behavior of inflate(), which expects either a zlib or gzip header and - trailer around the deflate stream. - - inflateBack() uses two subroutines supplied by the caller that are then - called by inflateBack() for input and output. inflateBack() calls those - routines until it reads a complete deflate stream and writes out all of the - uncompressed data, or until it encounters an error. The function's - parameters and return types are defined above in the in_func and out_func - typedefs. inflateBack() will call in(in_desc, &buf) which should return the - number of bytes of provided input, and a pointer to that input in buf. If - there is no input available, in() must return zero--buf is ignored in that - case--and inflateBack() will return a buffer error. inflateBack() will call - out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out() - should return zero on success, or non-zero on failure. If out() returns - non-zero, inflateBack() will return with an error. Neither in() nor out() - are permitted to change the contents of the window provided to - inflateBackInit(), which is also the buffer that out() uses to write from. - The length written by out() will be at most the window size. Any non-zero - amount of input may be provided by in(). - - For convenience, inflateBack() can be provided input on the first call by - setting strm->next_in and strm->avail_in. If that input is exhausted, then - in() will be called. Therefore strm->next_in must be initialized before - calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called - immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in - must also be initialized, and then if strm->avail_in is not zero, input will - initially be taken from strm->next_in[0 .. strm->avail_in - 1]. - - The in_desc and out_desc parameters of inflateBack() is passed as the - first parameter of in() and out() respectively when they are called. These - descriptors can be optionally used to pass any information that the caller- - supplied in() and out() functions need to do their job. - - On return, inflateBack() will set strm->next_in and strm->avail_in to - pass back any unused input that was provided by the last in() call. The - return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR - if in() or out() returned an error, Z_DATA_ERROR if there was a format error - in the deflate stream (in which case strm->msg is set to indicate the nature - of the error), or Z_STREAM_ERROR if the stream was not properly initialized. - In the case of Z_BUF_ERROR, an input or output error can be distinguished - using strm->next_in which will be Z_NULL only if in() returned an error. If - strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning - non-zero. (in() will always be called before out(), so strm->next_in is - assured to be defined if out() returns non-zero.) Note that inflateBack() - cannot return Z_OK. -*/ - -ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); -/* - All memory allocated by inflateBackInit() is freed. - - inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream - state was inconsistent. -*/ - -ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); -/* Return flags indicating compile-time options. - - Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: - 1.0: size of uInt - 3.2: size of uLong - 5.4: size of voidpf (pointer) - 7.6: size of z_off_t - - Compiler, assembler, and debug options: - 8: DEBUG - 9: ASMV or ASMINF -- use ASM code - 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention - 11: 0 (reserved) - - One-time table building (smaller code, but not thread-safe if true): - 12: BUILDFIXED -- build static block decoding tables when needed - 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed - 14,15: 0 (reserved) - - Library content (indicates missing functionality): - 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking - deflate code when not needed) - 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect - and decode gzip streams (to avoid linking crc code) - 18-19: 0 (reserved) - - Operation variations (changes in library functionality): - 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate - 21: FASTEST -- deflate algorithm with only one, lowest compression level - 22,23: 0 (reserved) - - The sprintf variant used by gzprintf (zero is best): - 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format - 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure! - 26: 0 = returns value, 1 = void -- 1 means inferred string length returned - - Remainder: - 27-31: 0 (reserved) - */ - -#ifndef Z_SOLO - - /* utility functions */ - -/* - The following utility functions are implemented on top of the basic - stream-oriented functions. To simplify the interface, some default options - are assumed (compression level and memory usage, standard memory allocation - functions). The source code of these utility functions can be modified if - you need special options. -*/ - -ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); -/* - Compresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total size - of the destination buffer, which must be at least the value returned by - compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed buffer. - - compress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer. -*/ - -ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen, - int level)); -/* - Compresses the source buffer into the destination buffer. The level - parameter has the same meaning as in deflateInit. sourceLen is the byte - length of the source buffer. Upon entry, destLen is the total size of the - destination buffer, which must be at least the value returned by - compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed buffer. - - compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_BUF_ERROR if there was not enough room in the output buffer, - Z_STREAM_ERROR if the level parameter is invalid. -*/ - -ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); -/* - compressBound() returns an upper bound on the compressed size after - compress() or compress2() on sourceLen bytes. It would be used before a - compress() or compress2() call to allocate the destination buffer. -*/ - -ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); -/* - Decompresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total size - of the destination buffer, which must be large enough to hold the entire - uncompressed data. (The size of the uncompressed data must have been saved - previously by the compressor and transmitted to the decompressor by some - mechanism outside the scope of this compression library.) Upon exit, destLen - is the actual size of the uncompressed buffer. - - uncompress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In - the case where there is not enough room, uncompress() will fill the output - buffer with the uncompressed data up to that point. -*/ - - /* gzip file access functions */ - -/* - This library supports reading and writing files in gzip (.gz) format with - an interface similar to that of stdio, using the functions that start with - "gz". The gzip format is different from the zlib format. gzip is a gzip - wrapper, documented in RFC 1952, wrapped around a deflate stream. -*/ - -typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */ - -/* -ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); - - Opens a gzip (.gz) file for reading or writing. The mode parameter is as - in fopen ("rb" or "wb") but can also include a compression level ("wb9") or - a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only - compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F' - for fixed code compression as in "wb9F". (See the description of - deflateInit2 for more information about the strategy parameter.) 'T' will - request transparent writing or appending with no compression and not using - the gzip format. - - "a" can be used instead of "w" to request that the gzip stream that will - be written be appended to the file. "+" will result in an error, since - reading and writing to the same gzip file is not supported. The addition of - "x" when writing will create the file exclusively, which fails if the file - already exists. On systems that support it, the addition of "e" when - reading or writing will set the flag to close the file on an execve() call. - - These functions, as well as gzip, will read and decode a sequence of gzip - streams in a file. The append function of gzopen() can be used to create - such a file. (Also see gzflush() for another way to do this.) When - appending, gzopen does not test whether the file begins with a gzip stream, - nor does it look for the end of the gzip streams to begin appending. gzopen - will simply append a gzip stream to the existing file. - - gzopen can be used to read a file which is not in gzip format; in this - case gzread will directly read from the file without decompression. When - reading, this will be detected automatically by looking for the magic two- - byte gzip header. - - gzopen returns NULL if the file could not be opened, if there was - insufficient memory to allocate the gzFile state, or if an invalid mode was - specified (an 'r', 'w', or 'a' was not provided, or '+' was provided). - errno can be checked to determine if the reason gzopen failed was that the - file could not be opened. -*/ - -ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); -/* - gzdopen associates a gzFile with the file descriptor fd. File descriptors - are obtained from calls like open, dup, creat, pipe or fileno (if the file - has been previously opened with fopen). The mode parameter is as in gzopen. - - The next call of gzclose on the returned gzFile will also close the file - descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor - fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd, - mode);. The duplicated descriptor should be saved to avoid a leak, since - gzdopen does not close fd if it fails. If you are using fileno() to get the - file descriptor from a FILE *, then you will have to use dup() to avoid - double-close()ing the file descriptor. Both gzclose() and fclose() will - close the associated file descriptor, so they need to have different file - descriptors. - - gzdopen returns NULL if there was insufficient memory to allocate the - gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not - provided, or '+' was provided), or if fd is -1. The file descriptor is not - used until the next gz* read, write, seek, or close operation, so gzdopen - will not detect if fd is invalid (unless fd is -1). -*/ - -ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); -/* - Set the internal buffer size used by this library's functions. The - default buffer size is 8192 bytes. This function must be called after - gzopen() or gzdopen(), and before any other calls that read or write the - file. The buffer memory allocation is always deferred to the first read or - write. Two buffers are allocated, either both of the specified size when - writing, or one of the specified size and the other twice that size when - reading. A larger buffer size of, for example, 64K or 128K bytes will - noticeably increase the speed of decompression (reading). - - The new buffer size also affects the maximum length for gzprintf(). - - gzbuffer() returns 0 on success, or -1 on failure, such as being called - too late. -*/ - -ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); -/* - Dynamically update the compression level or strategy. See the description - of deflateInit2 for the meaning of these parameters. - - gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not - opened for writing. -*/ - -ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); -/* - Reads the given number of uncompressed bytes from the compressed file. If - the input file is not in gzip format, gzread copies the given number of - bytes into the buffer directly from the file. - - After reaching the end of a gzip stream in the input, gzread will continue - to read, looking for another gzip stream. Any number of gzip streams may be - concatenated in the input file, and will all be decompressed by gzread(). - If something other than a gzip stream is encountered after a gzip stream, - that remaining trailing garbage is ignored (and no error is returned). - - gzread can be used to read a gzip file that is being concurrently written. - Upon reaching the end of the input, gzread will return with the available - data. If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then - gzclearerr can be used to clear the end of file indicator in order to permit - gzread to be tried again. Z_OK indicates that a gzip stream was completed - on the last gzread. Z_BUF_ERROR indicates that the input file ended in the - middle of a gzip stream. Note that gzread does not return -1 in the event - of an incomplete gzip stream. This error is deferred until gzclose(), which - will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip - stream. Alternatively, gzerror can be used before gzclose to detect this - case. - - gzread returns the number of uncompressed bytes actually read, less than - len for end of file, or -1 for error. -*/ - -ZEXTERN int ZEXPORT gzwrite OF((gzFile file, - voidpc buf, unsigned len)); -/* - Writes the given number of uncompressed bytes into the compressed file. - gzwrite returns the number of uncompressed bytes written or 0 in case of - error. -*/ - -ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); -/* - Converts, formats, and writes the arguments to the compressed file under - control of the format string, as in fprintf. gzprintf returns the number of - uncompressed bytes actually written, or 0 in case of error. The number of - uncompressed bytes written is limited to 8191, or one less than the buffer - size given to gzbuffer(). The caller should assure that this limit is not - exceeded. If it is exceeded, then gzprintf() will return an error (0) with - nothing written. In this case, there may also be a buffer overflow with - unpredictable consequences, which is possible only if zlib was compiled with - the insecure functions sprintf() or vsprintf() because the secure snprintf() - or vsnprintf() functions were not available. This can be determined using - zlibCompileFlags(). -*/ - -ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); -/* - Writes the given null-terminated string to the compressed file, excluding - the terminating null character. - - gzputs returns the number of characters written, or -1 in case of error. -*/ - -ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); -/* - Reads bytes from the compressed file until len-1 characters are read, or a - newline character is read and transferred to buf, or an end-of-file - condition is encountered. If any characters are read or if len == 1, the - string is terminated with a null character. If no characters are read due - to an end-of-file or len < 1, then the buffer is left untouched. - - gzgets returns buf which is a null-terminated string, or it returns NULL - for end-of-file or in case of error. If there was an error, the contents at - buf are indeterminate. -*/ - -ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); -/* - Writes c, converted to an unsigned char, into the compressed file. gzputc - returns the value that was written, or -1 in case of error. -*/ - -ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); -/* - Reads one byte from the compressed file. gzgetc returns this byte or -1 - in case of end of file or error. This is implemented as a macro for speed. - As such, it does not do all of the checking the other functions do. I.e. - it does not check to see if file is NULL, nor whether the structure file - points to has been clobbered or not. -*/ - -ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); -/* - Push one character back onto the stream to be read as the first character - on the next read. At least one character of push-back is allowed. - gzungetc() returns the character pushed, or -1 on failure. gzungetc() will - fail if c is -1, and may fail if a character has been pushed but not read - yet. If gzungetc is used immediately after gzopen or gzdopen, at least the - output buffer size of pushed characters is allowed. (See gzbuffer above.) - The pushed character will be discarded if the stream is repositioned with - gzseek() or gzrewind(). -*/ - -ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); -/* - Flushes all pending output into the compressed file. The parameter flush - is as in the deflate() function. The return value is the zlib error number - (see function gzerror below). gzflush is only permitted when writing. - - If the flush parameter is Z_FINISH, the remaining data is written and the - gzip stream is completed in the output. If gzwrite() is called again, a new - gzip stream will be started in the output. gzread() is able to read such - concatented gzip streams. - - gzflush should be called only when strictly necessary because it will - degrade compression if called too often. -*/ - -/* -ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, - z_off_t offset, int whence)); - - Sets the starting position for the next gzread or gzwrite on the given - compressed file. The offset represents a number of bytes in the - uncompressed data stream. The whence parameter is defined as in lseek(2); - the value SEEK_END is not supported. - - If the file is opened for reading, this function is emulated but can be - extremely slow. If the file is opened for writing, only forward seeks are - supported; gzseek then compresses a sequence of zeroes up to the new - starting position. - - gzseek returns the resulting offset location as measured in bytes from - the beginning of the uncompressed stream, or -1 in case of error, in - particular if the file is opened for writing and the new starting position - would be before the current position. -*/ - -ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); -/* - Rewinds the given file. This function is supported only for reading. - - gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) -*/ - -/* -ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); - - Returns the starting position for the next gzread or gzwrite on the given - compressed file. This position represents a number of bytes in the - uncompressed data stream, and is zero when starting, even if appending or - reading a gzip stream from the middle of a file using gzdopen(). - - gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) -*/ - -/* -ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); - - Returns the current offset in the file being read or written. This offset - includes the count of bytes that precede the gzip stream, for example when - appending or when using gzdopen() for reading. When reading, the offset - does not include as yet unused buffered input. This information can be used - for a progress indicator. On error, gzoffset() returns -1. -*/ - -ZEXTERN int ZEXPORT gzeof OF((gzFile file)); -/* - Returns true (1) if the end-of-file indicator has been set while reading, - false (0) otherwise. Note that the end-of-file indicator is set only if the - read tried to go past the end of the input, but came up short. Therefore, - just like feof(), gzeof() may return false even if there is no more data to - read, in the event that the last read request was for the exact number of - bytes remaining in the input file. This will happen if the input file size - is an exact multiple of the buffer size. - - If gzeof() returns true, then the read functions will return no more data, - unless the end-of-file indicator is reset by gzclearerr() and the input file - has grown since the previous end of file was detected. -*/ - -ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); -/* - Returns true (1) if file is being copied directly while reading, or false - (0) if file is a gzip stream being decompressed. - - If the input file is empty, gzdirect() will return true, since the input - does not contain a gzip stream. - - If gzdirect() is used immediately after gzopen() or gzdopen() it will - cause buffers to be allocated to allow reading the file to determine if it - is a gzip file. Therefore if gzbuffer() is used, it should be called before - gzdirect(). - - When writing, gzdirect() returns true (1) if transparent writing was - requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note: - gzdirect() is not needed when writing. Transparent writing must be - explicitly requested, so the application already knows the answer. When - linking statically, using gzdirect() will include all of the zlib code for - gzip file reading and decompression, which may not be desired.) -*/ - -ZEXTERN int ZEXPORT gzclose OF((gzFile file)); -/* - Flushes all pending output if necessary, closes the compressed file and - deallocates the (de)compression state. Note that once file is closed, you - cannot call gzerror with file, since its structures have been deallocated. - gzclose must not be called more than once on the same file, just as free - must not be called more than once on the same allocation. - - gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a - file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the - last read ended in the middle of a gzip stream, or Z_OK on success. -*/ - -ZEXTERN int ZEXPORT gzclose_r OF((gzFile file)); -ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); -/* - Same as gzclose(), but gzclose_r() is only for use when reading, and - gzclose_w() is only for use when writing or appending. The advantage to - using these instead of gzclose() is that they avoid linking in zlib - compression or decompression code that is not used when only reading or only - writing respectively. If gzclose() is used, then both compression and - decompression code will be included the application when linking to a static - zlib library. -*/ - -ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); -/* - Returns the error message for the last error which occurred on the given - compressed file. errnum is set to zlib error number. If an error occurred - in the file system and not in the compression library, errnum is set to - Z_ERRNO and the application may consult errno to get the exact error code. - - The application must not modify the returned string. Future calls to - this function may invalidate the previously returned string. If file is - closed, then the string previously returned by gzerror will no longer be - available. - - gzerror() should be used to distinguish errors from end-of-file for those - functions above that do not distinguish those cases in their return values. -*/ - -ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); -/* - Clears the error and end-of-file flags for file. This is analogous to the - clearerr() function in stdio. This is useful for continuing to read a gzip - file that is being written concurrently. -*/ - -#endif /* !Z_SOLO */ - - /* checksum functions */ - -/* - These functions are not related to compression but are exported - anyway because they might be useful in applications using the compression - library. -*/ - -ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); -/* - Update a running Adler-32 checksum with the bytes buf[0..len-1] and - return the updated checksum. If buf is Z_NULL, this function returns the - required initial value for the checksum. - - An Adler-32 checksum is almost as reliable as a CRC32 but can be computed - much faster. - - Usage example: - - uLong adler = adler32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - adler = adler32(adler, buffer, length); - } - if (adler != original_adler) error(); -*/ - -/* -ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, - z_off_t len2)); - - Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 - and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for - each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of - seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note - that the z_off_t type (like off_t) is a signed integer. If len2 is - negative, the result has no meaning or utility. -*/ - -ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); -/* - Update a running CRC-32 with the bytes buf[0..len-1] and return the - updated CRC-32. If buf is Z_NULL, this function returns the required - initial value for the crc. Pre- and post-conditioning (one's complement) is - performed within this function so it shouldn't be done by the application. - - Usage example: - - uLong crc = crc32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - crc = crc32(crc, buffer, length); - } - if (crc != original_crc) error(); -*/ - -/* -ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); - - Combine two CRC-32 check values into one. For two sequences of bytes, - seq1 and seq2 with lengths len1 and len2, CRC-32 check values were - calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 - check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and - len2. -*/ - - - /* various hacks, don't look :) */ - -/* deflateInit and inflateInit are macros to allow checking the zlib version - * and the compiler's view of z_stream: - */ -ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, - int windowBits, int memLevel, - int strategy, const char *version, - int stream_size)); -ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, - unsigned char FAR *window, - const char *version, - int stream_size)); -#define deflateInit(strm, level) \ - deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) -#define inflateInit(strm) \ - inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) -#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ - deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ - (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) -#define inflateInit2(strm, windowBits) \ - inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ - (int)sizeof(z_stream)) -#define inflateBackInit(strm, windowBits, window) \ - inflateBackInit_((strm), (windowBits), (window), \ - ZLIB_VERSION, (int)sizeof(z_stream)) - -#ifndef Z_SOLO - -/* gzgetc() macro and its supporting function and exposed data structure. Note - * that the real internal state is much larger than the exposed structure. - * This abbreviated structure exposes just enough for the gzgetc() macro. The - * user should not mess with these exposed elements, since their names or - * behavior could change in the future, perhaps even capriciously. They can - * only be used by the gzgetc() macro. You have been warned. - */ -struct gzFile_s { - unsigned have; - unsigned char *next; - z_off64_t pos; -}; -ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ -#ifdef Z_PREFIX_SET -# undef z_gzgetc -# define z_gzgetc(g) \ - ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g)) -#else -# define gzgetc(g) \ - ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g)) -#endif - -/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or - * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if - * both are true, the application gets the *64 functions, and the regular - * functions are changed to 64 bits) -- in case these are set on systems - * without large file support, _LFS64_LARGEFILE must also be true - */ -#ifdef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); - ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); -#endif - -#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) -# ifdef Z_PREFIX_SET -# define z_gzopen z_gzopen64 -# define z_gzseek z_gzseek64 -# define z_gztell z_gztell64 -# define z_gzoffset z_gzoffset64 -# define z_adler32_combine z_adler32_combine64 -# define z_crc32_combine z_crc32_combine64 -# else -# define gzopen gzopen64 -# define gzseek gzseek64 -# define gztell gztell64 -# define gzoffset gzoffset64 -# define adler32_combine adler32_combine64 -# define crc32_combine crc32_combine64 -# endif -# ifndef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); -# endif -#else - ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); -#endif - -#else /* Z_SOLO */ - - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); - -#endif /* !Z_SOLO */ - -/* hack for buggy compilers */ -#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) - struct internal_state {int dummy;}; -#endif - -/* undocumented functions */ -ZEXTERN const char * ZEXPORT zError OF((int)); -ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); -ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); -ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); -ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); -ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); -#if defined(_WIN32) && !defined(Z_SOLO) -ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, - const char *mode)); -#endif -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, - const char *format, - va_list va)); -# endif -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* ZLIB_H */ diff --git a/builddir/zlib-1.2.8/include/zutil.h b/builddir/zlib-1.2.8/include/zutil.h deleted file mode 100644 index 24ab06b..0000000 --- a/builddir/zlib-1.2.8/include/zutil.h +++ /dev/null @@ -1,253 +0,0 @@ -/* zutil.h -- internal interface and configuration of the compression library - * Copyright (C) 1995-2013 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* @(#) $Id$ */ - -#ifndef ZUTIL_H -#define ZUTIL_H - -#ifdef HAVE_HIDDEN -# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) -#else -# define ZLIB_INTERNAL -#endif - -#include "zlib.h" - -#if defined(STDC) && !defined(Z_SOLO) -# if !(defined(_WIN32_WCE) && defined(_MSC_VER)) -# include <stddef.h> -# endif -# include <string.h> -# include <stdlib.h> -#endif - -#ifdef Z_SOLO - typedef long ptrdiff_t; /* guess -- will be caught if guess is wrong */ -#endif - -#ifndef local -# define local static -#endif -/* compile with -Dlocal if your debugger can't find static symbols */ - -typedef unsigned char uch; -typedef uch FAR uchf; -typedef unsigned short ush; -typedef ush FAR ushf; -typedef unsigned long ulg; - -extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ -/* (size given to avoid silly warnings with Visual C++) */ - -#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] - -#define ERR_RETURN(strm,err) \ - return (strm->msg = ERR_MSG(err), (err)) -/* To be used only when the state is known to be valid */ - - /* common constants */ - -#ifndef DEF_WBITS -# define DEF_WBITS MAX_WBITS -#endif -/* default windowBits for decompression. MAX_WBITS is for compression only */ - -#if MAX_MEM_LEVEL >= 8 -# define DEF_MEM_LEVEL 8 -#else -# define DEF_MEM_LEVEL MAX_MEM_LEVEL -#endif -/* default memLevel */ - -#define STORED_BLOCK 0 -#define STATIC_TREES 1 -#define DYN_TREES 2 -/* The three kinds of block type */ - -#define MIN_MATCH 3 -#define MAX_MATCH 258 -/* The minimum and maximum match lengths */ - -#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */ - - /* target dependencies */ - -#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32)) -# define OS_CODE 0x00 -# ifndef Z_SOLO -# if defined(__TURBOC__) || defined(__BORLANDC__) -# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) - /* Allow compilation with ANSI keywords only enabled */ - void _Cdecl farfree( void *block ); - void *_Cdecl farmalloc( unsigned long nbytes ); -# else -# include <alloc.h> -# endif -# else /* MSC or DJGPP */ -# include <malloc.h> -# endif -# endif -#endif - -#ifdef AMIGA -# define OS_CODE 0x01 -#endif - -#if defined(VAXC) || defined(VMS) -# define OS_CODE 0x02 -# define F_OPEN(name, mode) \ - fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") -#endif - -#if defined(ATARI) || defined(atarist) -# define OS_CODE 0x05 -#endif - -#ifdef OS2 -# define OS_CODE 0x06 -# if defined(M_I86) && !defined(Z_SOLO) -# include <malloc.h> -# endif -#endif - -#if defined(MACOS) || defined(TARGET_OS_MAC) -# define OS_CODE 0x07 -# ifndef Z_SOLO -# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os -# include <unix.h> /* for fdopen */ -# else -# ifndef fdopen -# define fdopen(fd,mode) NULL /* No fdopen() */ -# endif -# endif -# endif -#endif - -#ifdef TOPS20 -# define OS_CODE 0x0a -#endif - -#ifdef WIN32 -# ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */ -# define OS_CODE 0x0b -# endif -#endif - -#ifdef __50SERIES /* Prime/PRIMOS */ -# define OS_CODE 0x0f -#endif - -#if defined(_BEOS_) || defined(RISCOS) -# define fdopen(fd,mode) NULL /* No fdopen() */ -#endif - -#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX -# if defined(_WIN32_WCE) -# define fdopen(fd,mode) NULL /* No fdopen() */ -# ifndef _PTRDIFF_T_DEFINED - typedef int ptrdiff_t; -# define _PTRDIFF_T_DEFINED -# endif -# else -# define fdopen(fd,type) _fdopen(fd,type) -# endif -#endif - -#if defined(__BORLANDC__) && !defined(MSDOS) - #pragma warn -8004 - #pragma warn -8008 - #pragma warn -8066 -#endif - -/* provide prototypes for these when building zlib without LFS */ -#if !defined(_WIN32) && \ - (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); -#endif - - /* common defaults */ - -#ifndef OS_CODE -# define OS_CODE 0x03 /* assume Unix */ -#endif - -#ifndef F_OPEN -# define F_OPEN(name, mode) fopen((name), (mode)) -#endif - - /* functions */ - -#if defined(pyr) || defined(Z_SOLO) -# define NO_MEMCPY -#endif -#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__) - /* Use our own functions for small and medium model with MSC <= 5.0. - * You may have to use the same strategy for Borland C (untested). - * The __SC__ check is for Symantec. - */ -# define NO_MEMCPY -#endif -#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY) -# define HAVE_MEMCPY -#endif -#ifdef HAVE_MEMCPY -# ifdef SMALL_MEDIUM /* MSDOS small or medium model */ -# define zmemcpy _fmemcpy -# define zmemcmp _fmemcmp -# define zmemzero(dest, len) _fmemset(dest, 0, len) -# else -# define zmemcpy memcpy -# define zmemcmp memcmp -# define zmemzero(dest, len) memset(dest, 0, len) -# endif -#else - void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); - int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); - void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len)); -#endif - -/* Diagnostic functions */ -#ifdef DEBUG -# include <stdio.h> - extern int ZLIB_INTERNAL z_verbose; - extern void ZLIB_INTERNAL z_error OF((char *m)); -# define Assert(cond,msg) {if(!(cond)) z_error(msg);} -# define Trace(x) {if (z_verbose>=0) fprintf x ;} -# define Tracev(x) {if (z_verbose>0) fprintf x ;} -# define Tracevv(x) {if (z_verbose>1) fprintf x ;} -# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} -# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} -#else -# define Assert(cond,msg) -# define Trace(x) -# define Tracev(x) -# define Tracevv(x) -# define Tracec(c,x) -# define Tracecv(c,x) -#endif - -#ifndef Z_SOLO - voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items, - unsigned size)); - void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr)); -#endif - -#define ZALLOC(strm, items, size) \ - (*((strm)->zalloc))((strm)->opaque, (items), (size)) -#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr)) -#define TRY_FREE(s, p) {if (p) ZFREE(s, p);} - -/* Reverse the bytes in a 32-bit value */ -#define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \ - (((q) & 0xff00) << 8) + (((q) & 0xff) << 24)) - -#endif /* ZUTIL_H */