diff --git a/CMakeLists.txt b/CMakeLists.txt index f684c81cec2..6c0b9157dba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -691,7 +691,7 @@ elseif(WIN32) if(WITH_OPENAL) set(OPENAL ${LIBDIR}/openal) set(OPENAL_INCLUDE_DIR ${OPENAL}/include) - set(OPENAL_LIBRARY OpenAL32) + set(OPENAL_LIBRARY wrap_oal) set(OPENAL_LIBPATH ${OPENAL}/lib) endif() diff --git a/SConstruct b/SConstruct index 0dd59add019..22075b720da 100644 --- a/SConstruct +++ b/SConstruct @@ -756,6 +756,7 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'): if env['WITH_BF_OPENAL']: dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll') + dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll') if env['WITH_BF_SNDFILE']: dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll') diff --git a/build_files/cmake/Modules/FindOpenEXR.cmake b/build_files/cmake/Modules/FindOpenEXR.cmake index 546f690dbf6..9f1d6571ef5 100644 --- a/build_files/cmake/Modules/FindOpenEXR.cmake +++ b/build_files/cmake/Modules/FindOpenEXR.cmake @@ -8,7 +8,7 @@ # This can also be an environment variable. # OPENEXR_FOUND, If false, do not try to use OpenEXR. # -# For indervidual library access these advanced settings are available +# For individual library access these advanced settings are available # OPENEXR_HALF_LIBRARY, Path to Half library # OPENEXR_IEX_LIBRARY, Path to Half library # OPENEXR_ILMIMF_LIBRARY, Path to Ilmimf library diff --git a/build_files/scons/config/linuxcross-config.py b/build_files/scons/config/linuxcross-config.py index 7ec27af9ea8..5e2c1d67d1f 100644 --- a/build_files/scons/config/linuxcross-config.py +++ b/build_files/scons/config/linuxcross-config.py @@ -13,7 +13,7 @@ WITH_BF_OPENAL = True WITH_BF_STATICOPENAL = False BF_OPENAL = LIBDIR + '/openal' BF_OPENAL_INC = '${BF_OPENAL}/include' -BF_OPENAL_LIB = 'OpenAL32' +BF_OPENAL_LIB = 'OpenAL32 wrap_oal' BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib' # Warning, this static lib configuration is untested! users of this OS please confirm. BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a' diff --git a/build_files/scons/config/win32-mingw-config.py b/build_files/scons/config/win32-mingw-config.py index 9fac0a31029..6da32ecd512 100644 --- a/build_files/scons/config/win32-mingw-config.py +++ b/build_files/scons/config/win32-mingw-config.py @@ -14,7 +14,7 @@ BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION[0]}${BF_PY WITH_BF_OPENAL = True BF_OPENAL = LIBDIR + '/openal' BF_OPENAL_INC = '${BF_OPENAL}/include' -BF_OPENAL_LIB = 'OpenAL32' +BF_OPENAL_LIB = 'wrap_oal' BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib' WITH_BF_FFMPEG = True diff --git a/build_files/scons/config/win32-vc-config.py b/build_files/scons/config/win32-vc-config.py index 2142620f2bf..f9a03372eb2 100644 --- a/build_files/scons/config/win32-vc-config.py +++ b/build_files/scons/config/win32-vc-config.py @@ -20,7 +20,7 @@ BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib' WITH_BF_OPENAL = True BF_OPENAL = LIBDIR + '/openal' BF_OPENAL_INC = '${BF_OPENAL}/include ' -BF_OPENAL_LIB = 'OpenAL32' +BF_OPENAL_LIB = 'wrap_oal' BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib' WITH_BF_ICONV = True diff --git a/build_files/scons/config/win64-vc-config.py b/build_files/scons/config/win64-vc-config.py index 794f29c5d46..f6f8f20ced0 100644 --- a/build_files/scons/config/win64-vc-config.py +++ b/build_files/scons/config/win64-vc-config.py @@ -20,7 +20,7 @@ BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib' WITH_BF_OPENAL = True BF_OPENAL = LIBDIR + '/openal' BF_OPENAL_INC = '${BF_OPENAL}/include ' -BF_OPENAL_LIB = 'OpenAL32' +BF_OPENAL_LIB = 'wrap_oal' BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib' WITH_BF_SNDFILE = True diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index 8442e5d0c71..5b2639ecb0d 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -71,3 +71,7 @@ endif() if(WITH_CARVE) add_subdirectory(carve) endif() + +if(UNIX AND NOT APPLE) + add_subdirectory(xdnd) +endif() diff --git a/extern/SConscript b/extern/SConscript index 738342b3dcc..5ecf9b1b2af 100644 --- a/extern/SConscript +++ b/extern/SConscript @@ -34,3 +34,6 @@ if env['WITH_BF_LIBMV']: if env['WITH_BF_CARVE']: SConscript(['carve/SConscript']) + +if env['OURPLATFORM'] in ('linux', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'freebsd9', 'aix4', 'aix5'): + SConscript(['xdnd/SConscript']) diff --git a/extern/libmv/CMakeLists.txt b/extern/libmv/CMakeLists.txt index 075ff15a798..73c2baa0207 100644 --- a/extern/libmv/CMakeLists.txt +++ b/extern/libmv/CMakeLists.txt @@ -41,107 +41,107 @@ set(INC_SYS set(SRC libmv-capi.cpp + libmv/image/array_nd.cc + libmv/image/convolve.cc + libmv/multiview/conditioning.cc + libmv/multiview/euclidean_resection.cc + libmv/multiview/fundamental.cc + libmv/multiview/projection.cc + libmv/multiview/triangulation.cc libmv/numeric/numeric.cc libmv/numeric/poly.cc + libmv/simple_pipeline/bundle.cc libmv/simple_pipeline/callbacks.cc + libmv/simple_pipeline/camera_intrinsics.cc + libmv/simple_pipeline/detect.cc + libmv/simple_pipeline/initialize_reconstruction.cc + libmv/simple_pipeline/intersect.cc + libmv/simple_pipeline/pipeline.cc libmv/simple_pipeline/reconstruction.cc libmv/simple_pipeline/resect.cc - libmv/simple_pipeline/intersect.cc - libmv/simple_pipeline/initialize_reconstruction.cc - libmv/simple_pipeline/camera_intrinsics.cc - libmv/simple_pipeline/pipeline.cc - libmv/simple_pipeline/detect.cc libmv/simple_pipeline/tracks.cc - libmv/simple_pipeline/bundle.cc - libmv/image/convolve.cc - libmv/image/array_nd.cc - libmv/tracking/pyramid_region_tracker.cc - libmv/tracking/sad.cc libmv/tracking/brute_region_tracker.cc - libmv/tracking/hybrid_region_tracker.cc libmv/tracking/esm_region_tracker.cc - libmv/tracking/trklt_region_tracker.cc + libmv/tracking/hybrid_region_tracker.cc libmv/tracking/klt_region_tracker.cc libmv/tracking/lmicklt_region_tracker.cc + libmv/tracking/pyramid_region_tracker.cc libmv/tracking/retrack_region_tracker.cc - libmv/multiview/projection.cc - libmv/multiview/conditioning.cc - libmv/multiview/fundamental.cc - libmv/multiview/euclidean_resection.cc - libmv/multiview/triangulation.cc + libmv/tracking/sad.cc + libmv/tracking/trklt_region_tracker.cc - third_party/ssba/Geometry/v3d_metricbundle.cpp - third_party/ssba/Math/v3d_optimization.cpp - third_party/gflags/gflags.cc - third_party/gflags/gflags_reporting.cc - third_party/gflags/gflags_completions.cc - third_party/fast/fast_9.c third_party/fast/fast_10.c third_party/fast/fast_11.c third_party/fast/fast_12.c + third_party/fast/fast_9.c third_party/fast/fast.c third_party/fast/nonmax.c + third_party/gflags/gflags.cc + third_party/gflags/gflags_completions.cc + third_party/gflags/gflags_reporting.cc third_party/ldl/Source/ldl.c + third_party/ssba/Geometry/v3d_metricbundle.cpp + third_party/ssba/Math/v3d_optimization.cpp libmv-capi.h - libmv/logging/logging.h - libmv/numeric/dogleg.h - libmv/numeric/levenberg_marquardt.h - libmv/numeric/poly.h - libmv/numeric/function_derivative.h - libmv/numeric/numeric.h - libmv/simple_pipeline/callbacks.h - libmv/simple_pipeline/resect.h - libmv/simple_pipeline/reconstruction.h - libmv/simple_pipeline/camera_intrinsics.h - libmv/simple_pipeline/tracks.h - libmv/simple_pipeline/detect.h - libmv/simple_pipeline/pipeline.h - libmv/simple_pipeline/intersect.h - libmv/simple_pipeline/bundle.h - libmv/simple_pipeline/initialize_reconstruction.h - libmv/image/convolve.h - libmv/image/tuple.h + libmv/base/id_generator.h + libmv/base/scoped_ptr.h + libmv/base/vector.h + libmv/base/vector_utils.h libmv/image/array_nd.h - libmv/image/sample.h + libmv/image/convolve.h libmv/image/image.h - libmv/tracking/region_tracker.h + libmv/image/sample.h + libmv/image/tuple.h + libmv/logging/logging.h + libmv/multiview/conditioning.h + libmv/multiview/euclidean_resection.h + libmv/multiview/fundamental.h + libmv/multiview/nviewtriangulation.h + libmv/multiview/projection.h + libmv/multiview/resection.h + libmv/multiview/triangulation.h + libmv/numeric/dogleg.h + libmv/numeric/function_derivative.h + libmv/numeric/levenberg_marquardt.h + libmv/numeric/numeric.h + libmv/numeric/poly.h + libmv/simple_pipeline/bundle.h + libmv/simple_pipeline/callbacks.h + libmv/simple_pipeline/camera_intrinsics.h + libmv/simple_pipeline/detect.h + libmv/simple_pipeline/initialize_reconstruction.h + libmv/simple_pipeline/intersect.h + libmv/simple_pipeline/pipeline.h + libmv/simple_pipeline/reconstruction.h + libmv/simple_pipeline/resect.h + libmv/simple_pipeline/tracks.h libmv/tracking/brute_region_tracker.h - libmv/tracking/hybrid_region_tracker.h - libmv/tracking/retrack_region_tracker.h - libmv/tracking/sad.h - libmv/tracking/pyramid_region_tracker.h libmv/tracking/esm_region_tracker.h - libmv/tracking/trklt_region_tracker.h + libmv/tracking/hybrid_region_tracker.h libmv/tracking/klt_region_tracker.h libmv/tracking/lmicklt_region_tracker.h - libmv/base/id_generator.h - libmv/base/vector.h - libmv/base/scoped_ptr.h - libmv/base/vector_utils.h - libmv/multiview/nviewtriangulation.h - libmv/multiview/resection.h - libmv/multiview/euclidean_resection.h - libmv/multiview/triangulation.h - libmv/multiview/projection.h - libmv/multiview/fundamental.h - libmv/multiview/conditioning.h + libmv/tracking/pyramid_region_tracker.h + libmv/tracking/region_tracker.h + libmv/tracking/retrack_region_tracker.h + libmv/tracking/sad.h + libmv/tracking/trklt_region_tracker.h - third_party/ssba/Geometry/v3d_metricbundle.h + third_party/fast/fast.h + third_party/gflags/config.h + third_party/gflags/gflags_completions.h + third_party/gflags/gflags.h + third_party/gflags/mutex.h + third_party/ldl/Include/ldl.h + third_party/msinttypes/inttypes.h + third_party/msinttypes/stdint.h third_party/ssba/Geometry/v3d_cameramatrix.h third_party/ssba/Geometry/v3d_distortion.h - third_party/ssba/Math/v3d_linear_utils.h - third_party/ssba/Math/v3d_optimization.h - third_party/ssba/Math/v3d_mathutilities.h + third_party/ssba/Geometry/v3d_metricbundle.h third_party/ssba/Math/v3d_linear.h - third_party/gflags/gflags_completions.h - third_party/gflags/mutex.h - third_party/gflags/config.h - third_party/gflags/gflags.h - third_party/fast/fast.h - third_party/ldl/Include/ldl.h - third_party/msinttypes/stdint.h - third_party/msinttypes/inttypes.h + third_party/ssba/Math/v3d_linear_utils.h + third_party/ssba/Math/v3d_mathutilities.h + third_party/ssba/Math/v3d_optimization.h ) if(WIN32) @@ -152,23 +152,23 @@ if(WIN32) third_party/glog/src/vlog_is_on.cc third_party/glog/src/windows/port.cc - third_party/glog/src/config.h - third_party/glog/src/stacktrace.h - third_party/glog/src/stacktrace_generic-inl.h - third_party/glog/src/stacktrace_libunwind-inl.h - third_party/glog/src/stacktrace_powerpc-inl.h - third_party/glog/src/stacktrace_x86-inl.h - third_party/glog/src/stacktrace_x86_64-inl.h third_party/glog/src/utilities.h - third_party/glog/src/base/commandlineflags.h + third_party/glog/src/stacktrace_generic-inl.h + third_party/glog/src/stacktrace.h + third_party/glog/src/stacktrace_x86_64-inl.h third_party/glog/src/base/googleinit.h third_party/glog/src/base/mutex.h - third_party/glog/src/windows/config.h - third_party/glog/src/windows/port.h - third_party/glog/src/windows/glog/log_severity.h - third_party/glog/src/windows/glog/logging.h + third_party/glog/src/base/commandlineflags.h + third_party/glog/src/stacktrace_powerpc-inl.h + third_party/glog/src/stacktrace_x86-inl.h + third_party/glog/src/config.h + third_party/glog/src/stacktrace_libunwind-inl.h third_party/glog/src/windows/glog/raw_logging.h third_party/glog/src/windows/glog/vlog_is_on.h + third_party/glog/src/windows/glog/logging.h + third_party/glog/src/windows/glog/log_severity.h + third_party/glog/src/windows/port.h + third_party/glog/src/windows/config.h ) list(APPEND INC @@ -190,34 +190,34 @@ if(WIN32) endif() else() list(APPEND SRC - third_party/glog/src/utilities.cc - third_party/glog/src/symbolize.cc - third_party/glog/src/vlog_is_on.cc - third_party/glog/src/signalhandler.cc - third_party/glog/src/logging.cc third_party/glog/src/demangle.cc + third_party/glog/src/logging.cc third_party/glog/src/raw_logging.cc + third_party/glog/src/signalhandler.cc + third_party/glog/src/symbolize.cc + third_party/glog/src/utilities.cc + third_party/glog/src/vlog_is_on.cc - third_party/glog/src/config.h - third_party/glog/src/config_freebsd.h - third_party/glog/src/config_linux.h - third_party/glog/src/config_mac.h - third_party/glog/src/demangle.h - third_party/glog/src/stacktrace.h - third_party/glog/src/stacktrace_generic-inl.h - third_party/glog/src/stacktrace_libunwind-inl.h - third_party/glog/src/stacktrace_powerpc-inl.h - third_party/glog/src/stacktrace_x86-inl.h - third_party/glog/src/stacktrace_x86_64-inl.h - third_party/glog/src/symbolize.h - third_party/glog/src/utilities.h third_party/glog/src/base/commandlineflags.h third_party/glog/src/base/googleinit.h third_party/glog/src/base/mutex.h - third_party/glog/src/glog/log_severity.h + third_party/glog/src/config_freebsd.h + third_party/glog/src/config.h + third_party/glog/src/config_linux.h + third_party/glog/src/config_mac.h + third_party/glog/src/demangle.h third_party/glog/src/glog/logging.h + third_party/glog/src/glog/log_severity.h third_party/glog/src/glog/raw_logging.h third_party/glog/src/glog/vlog_is_on.h + third_party/glog/src/stacktrace_generic-inl.h + third_party/glog/src/stacktrace.h + third_party/glog/src/stacktrace_libunwind-inl.h + third_party/glog/src/stacktrace_powerpc-inl.h + third_party/glog/src/stacktrace_x86_64-inl.h + third_party/glog/src/stacktrace_x86-inl.h + third_party/glog/src/symbolize.h + third_party/glog/src/utilities.h ) list(APPEND INC diff --git a/extern/libmv/ChangeLog b/extern/libmv/ChangeLog index 7e10abfead6..f49a07de350 100644 --- a/extern/libmv/ChangeLog +++ b/extern/libmv/ChangeLog @@ -1,3 +1,359 @@ +commit 75b9af405964ff2c7d3f0a44500e27e63b37c91b +Author: Sergey Sharybin +Date: Fri Feb 17 23:29:11 2012 +0600 + + _USE_MATH_DEFINES is needed to define constants like M_E when building with msvc + Occasionally was removed, but now added comment about this so hopefully it + wouldn't removed again. + +commit f85b1232a9b929f69443b5eed6e7a39908cd6551 +Author: Sergey Sharybin +Date: Fri Feb 17 21:34:40 2012 +0600 + + Picky edit: corrected mode for ssba readme file. + +commit f8c2b223f01551fd81a85f6d5221646165147035 +Author: Sergey Sharybin +Date: Fri Feb 17 21:32:05 2012 +0600 + + Picky edits: corrected EOL + +commit 3f2a4205ec5adadcdfa306b161c705c868a7be93 +Author: Sergey Sharybin +Date: Fri Feb 17 21:30:07 2012 +0600 + + Fixed incorrect access to ucontext on linux. Caused by incorrect merge conflict resolve. + +commit d360a21a5aa125cf9e83dd26b302508688ff7007 +Author: Sergey Sharybin +Date: Fri Feb 17 20:54:13 2012 +0600 + + More Windows -> Unix EOL conversions + +commit 18aeda58bec9556140ba617724e31ada6f5b67c0 +Author: Sergey Sharybin +Date: Fri Feb 17 20:15:42 2012 +0600 + + Looks like this debug output was removed accidentally. + +commit 189dc0cacdee3c1eab68c43263ecb038ed244c09 +Author: Sergey Sharybin +Date: Fri Feb 17 20:11:56 2012 +0600 + + Made V3D verbose again by default + +commit 8b3422d3eec5e450d76243886bf07fb0a3e83a81 +Author: Sergey Sharybin +Date: Fri Feb 17 20:08:01 2012 +0600 + + SAD tracker now can deal with pattern size any size, + Very quick implementation came from Blender before Hybrid tracker was added. + Better to be replaced with brute tracker. + +commit d547c9cfe37d5d3397d33c8b0e58471e1e1c1634 +Author: Sergey Sharybin +Date: Fri Feb 17 20:03:52 2012 +0600 + + Just convert end of lines to unix style. + +commit eb73ddbaec5b9e1ad30331bbf858a6ebc266c4aa +Author: Sergey Sharybin +Date: Fri Feb 17 20:02:20 2012 +0600 + + Made some function static. Resolves possible linking issues when building with MinGW. + +commit 2930681fafd86e4f4a958054b1db8bfff29623d1 +Author: Sergey Sharybin +Date: Fri Feb 17 19:59:45 2012 +0600 + + Missed this in commit with improvements in camera intrinsics. + +commit 8d31bc767019b05c5bf8c9f309f9545b3428afa1 +Author: Sergey Sharybin +Date: Fri Feb 17 19:57:51 2012 +0600 + + Another step of syncing codebase with Blender. + Mainly fixes for freebsd/osx compilation and aligned memory allocation. + +commit 3214a2df5bfd98021f25d0f1a626a86318bb245f +Author: Sergey Sharybin +Date: Fri Feb 17 19:48:02 2012 +0600 + + Support compilation on FreeBSD platform + +commit 0e5abe96f543687ccfb3a923ec639cb8f45d54f8 +Author: Sergey Sharybin +Date: Fri Feb 17 19:44:18 2012 +0600 + + Implementation of basic system for progress reporting into callee stuff + + Implemented by using simple callbacks classes which are getting invoked from + places where lots of calculation happens, so applications which are using + libmv may display nice progress bar. + +commit c5e18fe35464618055e0e9761be8d22fae56db49 +Author: Keir Mierle +Date: Fri Feb 17 19:25:45 2012 +0600 + + Add support for detecting tracking failure in the ESM tracker component of + libmv. Since both KLT and Hybrid rely on ESM underneath, KLT and Hybrid now + have a minimum correlation setting to match. With this fix, track failures + should get detected quicker, with the issue that sometimes the tracker will + give up too easily. That is fixable by reducing the required correlation (in + the track properties). + +commit ea0fed736ecdcc8c020227aeef8ef4cd3be5e63d +Author: Keir Mierle +Date: Fri Feb 17 19:23:50 2012 +0600 + + Add a new hybrid region tracker for motion tracking to libmv, and + add it as an option (under "Hybrid") in the tracking settings. The + region tracker is a combination of brute force tracking for coarse + alignment, then refinement with the ESM/KLT algorithm already in + libmv that gives excellent subpixel precision (typically 1/50'th + of a pixel) + + This also adds a new "brute force" region tracker which does a + brute force search through every pixel position in the destination + for the pattern in the first frame. It leverages SSE if available, + similar to the SAD tracker, to do this quickly. Currently it does + some unnecessary conversions to/from floating point that will get + fixed later. + + The hybrid tracker glues the two trackers (brute & ESM) together + to get an overall better tracker. The algorithm is simple: + + 1. Track from frame 1 to frame 2 with the brute force tracker. + This tries every possible pixel position for the pattern from + frame 1 in frame 2. The position with the smallest + sum-of-absolute-differences is chosen. By definition, this + position is only accurate up to 1 pixel or so. + 2. Using the result from 1, initialize a track with ESM. This does + a least-squares fit with subpixel precision. + 3. If the ESM shift was more than 2 pixels, report failure. + 4. If the ESM track shifted less than 2 pixels, then the track is + good and we're done. The rationale here is that if the + refinement stage shifts more than 1 pixel, then the brute force + result likely found some random position that's not a good fit. + +commit a07fff8431621c01d81ae52595d8dd91a295a776 +Author: Keir Mierle +Date: Fri Feb 17 19:19:58 2012 +0600 + + Assorted camera tracker improvements + + - Add support for refining the camera's intrinsic parameters + during a solve. Currently, refining supports only the following + combinations of intrinsic parameters: + + f + f, cx, cy + f, cx, cy, k1, k2 + f, k1 + f, k1, k2 + + This is not the same as autocalibration, since the user must + still make a reasonable initial guess about the focal length and + other parameters, whereas true autocalibration would eliminate + the need for the user specify intrinsic parameters at all. + + However, the solver works well with only rough guesses for the + focal length, so perhaps full autocalibation is not that + important. + + Adding support for the last two combinations, (f, k1) and (f, + k1, k2) required changes to the library libmv depends on for + bundle adjustment, SSBA. These changes should get ported + upstream not just to libmv but to SSBA as well. + + - Improved the region of convergence for bundle adjustment by + increasing the number of Levenberg-Marquardt iterations from 50 + to 500. This way, the solver is able to crawl out of the bad + local minima it gets stuck in when changing from, for example, + bundling k1 and k2 to just k1 and resetting k2 to 0. + + - Add several new region tracker implementations. A region tracker + is a libmv concept, which refers to tracking a template image + pattern through frames. The impact to end users is that tracking + should "just work better". I am reserving a more detailed + writeup, and maybe a paper, for later. + + - Other libmv tweaks, such as detecting that a tracker is headed + outside of the image bounds. + + This includes several changes made directly to the libmv extern + code rather expecting to get those changes through normal libmv + channels, because I, the libmv BDFL, decided it was faster to work + on libmv directly in Blender, then later reverse-port the libmv + changes from Blender back into libmv trunk. The interesting part + is that I added a full Levenberg-Marquardt loop to the region + tracking code, which should lead to a more stable solutions. I + also added a hacky implementation of "Efficient Second-Order + Minimization" for tracking, which works nicely. A more detailed + quantitative evaluation will follow. + +commit 0bf66c009d5022eacfc473d247884a73ffeefa8f +Author: Sergey Sharybin +Date: Fri Feb 17 19:13:49 2012 +0600 + + Rest of compilation fix with FAST library. + +commit 71b578ca2ba34c528363c514cd1fcc85791d01f3 +Author: Keir Mierle +Date: Fri Feb 17 19:00:28 2012 +0600 + + Improve the KLT tracking behaviour and UI + + - Remove the overly-conservative use of libmv's re-track tracker. The re-track + tracker would take a normal tracker such as TRKLT or KLT or pyramid KLT, and + track from frame 1 to 2, then back from the position found in 2 back to 1. + Then, when the reverse-track doesn't match the original track with high + precision, the track is considered "failed". This is a good approach for + fully automatic reconstruction, but is too conservative for supervised + tracking. + + The retrack-tracker will return when fully automatic tracking is added. + + - Always solve for (dx, dy) in the TRKLT loop even if the linear system is + ill-conditioned. The client (Blender in this case) can still use the solved + position, even though it is less reliable. + +commit 7d8a8762f2bc2e36f95b0b6f4fb4ca996f9f0db7 +Author: Sergey Sharybin +Date: Fri Feb 17 18:46:24 2012 +0600 + + Changes in camera intrinsics distortion/undistortion: + + - Distortion/undistortion of scaled images wasn't happening right, + because camera intrinsics are calibrated on an original frame which + has got some particular resolution and trying to apply this model on + an image with another resolution gives totally wrong result. + This is needed to be able to do post-prccessing of render, running + distortion on a scene which might be rendered with higher resolution + than footage itself and then be scaled down. + - Fixed incorrect calculation/applying of precomputed grid when + distortion is high high enough and produces pixel offset higher + than 127 pixels. This might be still not very distorted image, + but if it's a 4K footage "normal" camera will easily give such + a distortion. + - Added support of overscan distortion/undistortion. + +commit ed080785d63bb8e3a13dde51a2dc94fe59b059bb +Author: Sergey Sharybin +Date: Fri Feb 17 18:38:51 2012 +0600 + + Fast headers now can be included from C++ sources. + Was needed to make it working fine when bundling in Blender but might also + be needed to bundle into another applications. + +commit 5f5a7aa46a2d87b96c8098dfc8682f4d01b5cd40 +Author: Sergey Sharybin +Date: Fri Feb 17 18:36:16 2012 +0600 + + Bring back FAST detector which seems to be working much nicer than Morravec. + Both of them are available in API. + +commit 2cab13c18216fb684b270cec077f7300262584af +Author: Sergey Sharybin +Date: Fri Feb 17 18:27:36 2012 +0600 + + Revert "Make CameraIntrinsics (and thus Qt tracker) compilable without linking libmv." + + This reverts commit 81613ee0cc94b315f333c9632b18b95d426aad05. + + That commit made inverting intrinsics totally unworkable, so reverted this and + made needed tweaks to qt-tracker project file to make it compilable (was needed + to make it linking together with glog). + + Conflicts: + + src/ui/tracker/tracker.cc + src/ui/tracker/tracker.pro + +commit ec46cae041401b17afb4fe4d9c9343d10797090f +Author: Sergey Sharybin +Date: Fri Feb 17 17:59:55 2012 +0600 + + Fix compilation error using official MinGW + +commit 6fbc370e922c47cfa35381662b6c439f4891ed74 +Author: Sergey Sharybin +Date: Fri Feb 17 17:38:20 2012 +0600 + + Fix compilation error with MSVC 2010 which is more picky for "missed" STL headers + +commit be9e6b63691d83b551a085f0766878bd84220767 +Author: Sergey Sharybin +Date: Fri Feb 17 17:36:18 2012 +0600 + + Fix compilation with MSVC where snprintf function is declared as unsafe and _snprintf should be used instead. + + Better to switch to own implementation will ensure string is correctly NULL-terminated. + +commit 1847d9e414ed763cd80668775d7d9f79575fc8ca +Author: Sergey Sharybin +Date: Fri Feb 17 17:34:45 2012 +0600 + + Fix compilation error on OSX caused by incorrect access to ucontext + +commit 90579b6ffad07672172a1c240499615b30b25549 +Merge: b9aac30 531c79b +Author: Sergey Sharybin +Date: Fri Feb 17 18:32:52 2012 +0600 + + Merge remote-tracking branch 'Matthias-Fauconneau/master' into devel + + Conflicts: + src/libmv/tracking/CMakeLists.txt + +commit b9aac30a9ca6bc8362c09a0e191040964f7c6de2 +Merge: 198894e 6969e1a +Author: Keir Mierle +Date: Sat Nov 5 17:38:30 2011 -0700 + + Merge pull request #3 from nathanwiegand/master + + Just a few tiny cleanups + +commit 6969e1a9534291a982749baa5a3672c97bfa506d +Author: Nathan Wiegand +Date: Sat Nov 5 14:26:54 2011 -0700 + + I've added cleaned up a few style issues here an there. Also, I've updated the CMakeLists.txt file so that it can build the image_io library. Note, it's only been tested on OSX 10.6 + +commit 4763f851299050140757bfaa069107a0cf639e56 +Author: Nathan Wiegand +Date: Fri Nov 4 23:59:08 2011 -0700 + + Removed a superfulous comment + +commit a44577c0162e273681e4a9a3cc5f5b37d4315b67 +Author: Nathan Wiegand +Date: Fri Nov 4 23:55:52 2011 -0700 + + Removed a duplicate entry for an author. + +commit 198894e4c4f51c2c1784ad7c02eb45d2d1ada9bc +Merge: c4c67db 6e797d6 +Author: Keir Mierle +Date: Fri Nov 4 21:47:05 2011 -0700 + + Merge pull request #2 from nathanwiegand/master + + CMake changes for OSX + +commit 6e797d678c4c19f6a9e21657d66183f412cc995b +Author: Nathan Wiegand +Date: Fri Nov 4 21:43:28 2011 -0700 + + Uncomment the GUI part of the CMake file + +commit 33ef88a33860345d8906f3c9dd22d8dbce3df53e +Author: Nathan Wiegand +Date: Fri Nov 4 21:31:22 2011 -0700 + + Fixed build error on OSX by adding 'glog' to the dependencies in the tracker CMake + commit 531c79bf95fddaaa70707d1abcd4fdafda16bbf0 Author: Matthias Fauconneau Date: Sat Aug 20 00:00:42 2011 +0200 @@ -91,222 +447,3 @@ Author: Matthias Fauconneau Date: Thu Aug 18 20:51:43 2011 +0200 Fix detect.cc. - -commit ec18cc5ea9ae2e641075a847e82d0aacb8415ad8 -Author: Matthias Fauconneau -Date: Thu Aug 18 17:45:37 2011 +0200 - - Compute and return Pearson product-moment correlation coefficient between reference and matched pattern. - -commit 21d4245c63a01bfc736192d55baf10983e7c9ec7 -Author: Matthias Fauconneau -Date: Thu Aug 18 16:18:44 2011 +0200 - - UI and API support for affine tracking. - -commit a4876d8c40dcde615b44009c38c49e9a1b1d4698 -Author: Matthias Fauconneau -Date: Wed Aug 17 20:26:01 2011 +0200 - - Hack to make sad.cc compile with MSVC on system without support for the SSE instruction set. - -commit 0de723dfce5bbe44dbd19be8cd6dd6e9b03b7924 -Author: Matthias Fauconneau -Date: Wed Aug 17 20:10:46 2011 +0200 - - Fix slow path (for computers without SSE2). - Heap allocate scores in detect.cc - -commit 65a9d496f81e8b37eae39a4063957b8be9a4e6f0 -Author: Matthias Fauconneau -Date: Wed Aug 17 19:25:17 2011 +0200 - - Fix compilation on OSX. - -commit d22720e618456329388d2c107422c3b371657cba -Author: Matthias Fauconneau -Date: Wed Aug 17 14:14:45 2011 +0200 - - Improve Detect and SAD Tracker API and documentation. - -commit 5d6cd4ad365b061901bad40695b51d568487a0cf -Author: Matthias Fauconneau -Date: Wed Aug 17 11:57:29 2011 +0200 - - MSVC support fixes. - -commit 50f0323173c6deebd6aaf9c126f0b51b2a79c3c1 -Author: Matthias Fauconneau -Date: Tue Aug 16 23:21:37 2011 +0200 - - Detector can detect features similar to a given pattern. - -commit 5734cc27bbf84c2b6edcfcc1ea736798e12d5820 -Author: Matthias Fauconneau -Date: Tue Aug 16 22:53:54 2011 +0200 - - Ensure SAD Tracker is C compatible. - Update Detect API documentation. - -commit 701c42842574064fea992f8822e3899cb9066108 -Author: Matthias Fauconneau -Date: Tue Aug 16 21:56:42 2011 +0200 - - Remove FAST detector. - Add Moravec detector. - This detector is more suited to tracking since it try to choose patterns which are unlikely to drift by computing SAD with neighbouring patches. - It could be improved to better avoid edges. - -commit 9bdf93e13fc880c78b6f34397da673388c16040e -Author: Matthias Fauconneau -Date: Tue Aug 16 21:55:08 2011 +0200 - - Fix Qt Tracker GL to work with AMD drivers. - -commit 81613ee0cc94b315f333c9632b18b95d426aad05 -Author: Matthias Fauconneau -Date: Tue Aug 16 21:54:12 2011 +0200 - - Make CameraIntrinsics (and thus Qt tracker) compilable without linking libmv. - -commit a1d9a8fa8b01ef7cf2a79b3b891633fc333fc9cf -Author: Matthias Fauconneau -Date: Tue Aug 16 21:24:51 2011 +0200 - - Fix SAD tracker. Pattern was transposed by affine pattern sampler. - -commit c3b794da2e7fd23f2fbdf90dbd71de0e6b3bc811 -Author: Matthias Fauconneau -Date: Tue Aug 16 21:19:02 2011 +0200 - - Fix SAD tracker. Pattern was transposed by affine pattern sampler. - -commit a9b61bf3356f27174cdd983f562f99c3a6a2cc35 -Author: Matthias Fauconneau -Date: Sun Aug 14 09:56:51 2011 +0200 - - Clarify CameraIntrinsics documentation. - Edit CameraInstrinsics test to fail. - -commit 10bdad9ad2cea2603896263cde5a5339169a9af0 -Author: Matthias Fauconneau -Date: Fri Aug 12 21:05:32 2011 +0200 - - Fix out of bound access in warp bilinear sampling. - -commit dd9a418db021a28af2c1198d5e5b9e68fe048a03 -Author: Matthias Fauconneau -Date: Fri Aug 12 19:14:36 2011 +0200 - - Fix compilation with -funsigned-char. - -commit bd1a268ede39b67f2ba4b360f6fc693419e7cd7f -Author: Matthias Fauconneau -Date: Fri Aug 12 18:39:27 2011 +0200 - - CameraIntrinsics fixes. - -commit ae513b39fb779632f96ceff7c1e014fb8e68702a -Author: Matthias Fauconneau -Date: Tue Aug 9 19:38:58 2011 +0200 - - Remove stray QDebug include. - -commit 1e58f55078ce6009a885be30ae0316aec6ed8239 -Author: Matthias Fauconneau -Date: Tue Aug 9 14:16:31 2011 +0200 - - Make API future-proof (for an eventual affine or planar tracker). - -commit c2af303e7bf0dddcb02937323ac5846b1801e6cc -Author: Matthias Fauconneau -Date: Tue Aug 9 11:13:29 2011 +0200 - - Remove reconstruction breaking debug code. - -commit 8792a633e5c5f1c1f12e164b9e8897ca0790ac59 -Author: Matthias Fauconneau -Date: Tue Aug 9 10:49:18 2011 +0200 - - Remove getchar()s. - -commit 63a9bdee0cbd1197e0315d01c27bfc2361bd5656 -Author: Matthias Fauconneau -Date: Tue Aug 9 10:35:07 2011 +0200 - - Adapt patch to new PipelineRoutines code generation strategy. - -commit 096ff1a4070f7212c50fb0a4b2feec7ca9d97158 -Author: Matthias Fauconneau -Date: Tue Aug 9 09:54:12 2011 +0200 - - Merge max_image and max_track fix from tomato. - -commit d8450cd3c37278a397482cd36b1e2419f154cfb9 -Author: Matthias Fauconneau -Date: Tue Aug 9 09:38:49 2011 +0200 - - Synchronize tree with Tomato: Merge patch for better resection, keep deprecated KLT tracker. - -commit e9b2dca920cf9575c15150a4988634b00e343a41 -Author: Matthias Fauconneau -Date: Mon Aug 8 17:07:08 2011 +0200 - - Fixes, Documentation. - -commit 4fc1c57a2d92442808ac4a3676e6d9a25a51e310 -Author: Matthias Fauconneau -Date: Sun Aug 7 14:35:08 2011 +0200 - - Improve tracker resilience by penalizing large motion vectors. - -commit cc8e7e8e08cd91f75c080a0091461ca9fe969664 -Author: Matthias Fauconneau -Date: Sun Aug 7 09:28:09 2011 +0200 - - Leverage SSE2 SAD instruction for 16x speed improvement in integer pixel search resulting in ~1ms per marker for 16x16 pattern on 128x128 region. - -commit f362ab4999a768370fca57552464b459eb9fbddc -Author: Matthias Fauconneau -Date: Sun Aug 7 09:06:04 2011 +0200 - - Improve SAD Tracker subpixel precision (avoid drift even when adapting at each frame). - -commit fce7a214c561b5f5f0e17115c31fb48814bde2db -Author: Matthias Fauconneau -Date: Sat Aug 6 21:57:06 2011 +0200 - - Track using simple Sum of Absolute Differences matching. - This method is simpler, more robust, faster and accurate. - -commit 620a7a35d9a2818bf6e9dbf5d11debda4be6bc26 -Author: Matthias Fauconneau -Date: Fri Jul 29 12:35:57 2011 +0200 - - Add Intersect unit test. - -commit a2bf58fa57be11215eb17ff7f7de58f97d480ec3 -Author: Matthias Fauconneau -Date: Thu Jul 28 11:08:06 2011 +0200 - - Remove tests depending on dead code. - Fix CameraIntrinsics test. - Add Intersect and Resect tests. - -commit 19bddee10b4879c8cd2238ccdf5b8f7620cf8384 -Author: Matthias Fauconneau -Date: Wed Jul 27 12:07:21 2011 +0200 - - Image Distortion: Fixes and more testing. - -commit 0454d97da328fb0eda8c6c50511ac31864a6d3d6 -Author: Matthias Fauconneau -Date: Wed Jul 27 10:32:37 2011 +0200 - - Test float image distortion. - -commit 8db01595a8721f766d85931a8d92b780461d8741 -Author: Matthias Fauconneau -Date: Wed Jul 27 10:27:07 2011 +0200 - - Image Distortion: Bilinear sampling, Optimization, Instantiate all variants (Distort/Undistort, float/ubyte, 1-4 channels). diff --git a/extern/libmv/bundle.sh b/extern/libmv/bundle.sh index f5cfcc0d488..f259635035e 100755 --- a/extern/libmv/bundle.sh +++ b/extern/libmv/bundle.sh @@ -1,7 +1,8 @@ #!/bin/sh #BRANCH="keir" -BRANCH="Matthias-Fauconneau" +#BRANCH="Matthias-Fauconneau" +BRANCH="Nazg-Gul" if [ -d ./.svn ]; then echo "This script is supposed to work only when using git-svn" @@ -24,7 +25,7 @@ done rm -rf libmv rm -rf third_party -cat "files.txt" | while f=`line`; do +cat "files.txt" | while read f; do mkdir -p `dirname $f` cp $tmp/libmv/src/$f $f done @@ -36,14 +37,14 @@ chmod 664 ./third_party/glog/src/windows/*.cc ./third_party/glog/src/windows/*.h sources=`find ./libmv -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | sed -r 's/^\.\//\t/' | sort -d` headers=`find ./libmv -type f -iname '*.h' | sed -r 's/^\.\//\t/' | sort -d` -third_sources=`find ./third_party -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | grep -v glog | sed -r 's/^\.\//\t/' | sort` -third_headers=`find ./third_party -type f -iname '*.h' | grep -v glog | sed -r 's/^\.\//\t/' | sort` +third_sources=`find ./third_party -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | grep -v glog | sed -r 's/^\.\//\t/' | sort -d` +third_headers=`find ./third_party -type f -iname '*.h' | grep -v glog | sed -r 's/^\.\//\t/' | sort -d` -third_glog_sources=`find ./third_party -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | grep glog | grep -v windows | sed -r 's/^\.\//\t\t/' | sort` -third_glog_headers=`find ./third_party -type f -iname '*.h' | grep glog | grep -v windows | sed -r 's/^\.\//\t\t/' | sort` +third_glog_sources=`find ./third_party -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | grep glog | grep -v windows | sed -r 's/^\.\//\t\t/' | sort -d` +third_glog_headers=`find ./third_party -type f -iname '*.h' | grep glog | grep -v windows | sed -r 's/^\.\//\t\t/' | sort -d` -src_dir=`find ./libmv -type f -iname '*.cc' -exec dirname {} \; -or -iname '*.cpp' -exec dirname {} \; -or -iname '*.c' -exec dirname {} \; | sed -r 's/^\.\//\t/' | sort | uniq` -src_third_dir=`find ./third_party -type f -iname '*.cc' -exec dirname {} \; -or -iname '*.cpp' -exec dirname {} \; -or -iname '*.c' -exec dirname {} \; | sed -r 's/^\.\//\t/' | sort | uniq` +src_dir=`find ./libmv -type f -iname '*.cc' -exec dirname {} \; -or -iname '*.cpp' -exec dirname {} \; -or -iname '*.c' -exec dirname {} \; | sed -r 's/^\.\//\t/' | sort -d | uniq` +src_third_dir=`find ./third_party -type f -iname '*.cc' -exec dirname {} \; -or -iname '*.cpp' -exec dirname {} \; -or -iname '*.c' -exec dirname {} \; | sed -r 's/^\.\//\t/' | sort -d | uniq` src="" win_src="" for x in $src_dir $src_third_dir; do @@ -103,7 +104,7 @@ cat > CMakeLists.txt << EOF # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # The Original Code is Copyright (C) 2011, Blender Foundation # All rights reserved. diff --git a/extern/libmv/libmv/base/vector.h b/extern/libmv/libmv/base/vector.h index 9dc48676629..c2a3298087a 100644 --- a/extern/libmv/libmv/base/vector.h +++ b/extern/libmv/libmv/base/vector.h @@ -84,6 +84,8 @@ class vector { T& front() { return data_[0]; } const T& operator[](int n) const { return data_[n]; } T& operator[](int n) { return data_[n]; } + const T& at(int n) const { return data_[n]; } + T& at(int n) { return data_[n]; } const T * begin() const { return data_; } const T * end() const { return data_+size_; } T * begin() { return data_; } diff --git a/extern/libmv/libmv/simple_pipeline/pipeline.cc b/extern/libmv/libmv/simple_pipeline/pipeline.cc index 382365e579f..2e4e5a6491d 100644 --- a/extern/libmv/libmv/simple_pipeline/pipeline.cc +++ b/extern/libmv/libmv/simple_pipeline/pipeline.cc @@ -279,25 +279,7 @@ double InternalReprojectionError(const Tracks &image_tracks, PipelineRoutines::ProjectMarker(*point, *camera, intrinsics); double ex = reprojected_marker.x - markers[i].x; double ey = reprojected_marker.y - markers[i].y; -#if 0 - const int N = 100; - char line[N]; - snprintf(line, N, - "image %-3d track %-3d " - "x %7.1f y %7.1f " - "rx %7.1f ry %7.1f " - "ex %7.1f ey %7.1f" - " e %7.1f", - markers[i].image, - markers[i].track, - markers[i].x, - markers[i].y, - reprojected_marker.x, - reprojected_marker.y, - ex, - ey, - sqrt(ex*ex + ey*ey)); -#endif + total_error += sqrt(ex*ex + ey*ey); } LG << "Skipped " << num_skipped << " markers."; diff --git a/extern/libmv/libmv/simple_pipeline/tracks.h b/extern/libmv/libmv/simple_pipeline/tracks.h index 739c3c4f243..aa0fbaa6e4c 100644 --- a/extern/libmv/libmv/simple_pipeline/tracks.h +++ b/extern/libmv/libmv/simple_pipeline/tracks.h @@ -27,13 +27,13 @@ namespace libmv { /*! A Marker is the 2D location of a tracked point in an image. - + \a x, \a y is the position of the marker in pixels from the top left corner in the image identified by \a image. All markers for to the same target form a track identified by a common \a track number. - + \note Markers are typically aggregated with the help of the \l Tracks class. - + \sa Tracks */ struct Marker { @@ -44,18 +44,18 @@ struct Marker { /*! The Tracks class stores \link Marker reconstruction markers \endlink. - + The Tracks container is intended as the store of correspondences between images, which must get created before any 3D reconstruction can take place. - + The container has several fast lookups for queries typically needed for structure from motion algorithms, such as \l MarkersForTracksInBothImages(). - + \sa Marker */ class Tracks { public: - Tracks() {} + Tracks() { } // Copy constructor for a tracks object. Tracks(const Tracks &other); @@ -67,10 +67,10 @@ class Tracks { Inserts a marker into the set. If there is already a marker for the given \a image and \a track, the existing marker is replaced. If there is no marker for the given \a image and \a track, a new one is added. - + \a image and \a track are the keys used to retrieve the markers with the other methods in this class. - + \note To get an identifier for a new track, use \l MaxTrack() + 1. */ void Insert(int image, int track, double x, double y); @@ -86,7 +86,7 @@ class Tracks { /*! Returns the markers in \a image1 and \a image2 which have a common track. - + This is not the same as the union of the markers in \a image1 and \a image2; each marker is for a track that appears in both images. */ diff --git a/extern/libmv/libmv/tracking/esm_region_tracker.cc b/extern/libmv/libmv/tracking/esm_region_tracker.cc index 9784b61c068..df9c89a46d4 100644 --- a/extern/libmv/libmv/tracking/esm_region_tracker.cc +++ b/extern/libmv/libmv/tracking/esm_region_tracker.cc @@ -18,6 +18,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. +/* needed for M_E when building with msvc */ #define _USE_MATH_DEFINES #include "libmv/tracking/esm_region_tracker.h" diff --git a/extern/libmv/libmv/tracking/trklt_region_tracker.h b/extern/libmv/libmv/tracking/trklt_region_tracker.h index 5046e0f069d..26d0621aa02 100644 --- a/extern/libmv/libmv/tracking/trklt_region_tracker.h +++ b/extern/libmv/libmv/tracking/trklt_region_tracker.h @@ -42,7 +42,7 @@ struct TrkltRegionTracker : public RegionTracker { min_update_squared_distance(1e-6), sigma(0.9), lambda(0.05) {} - + virtual ~TrkltRegionTracker() {} // Tracker interface. diff --git a/extern/libmv/patches/bundle_tweaks.patch b/extern/libmv/patches/bundle_tweaks.patch index f7b06b0a2dd..aebc257f7f9 100644 --- a/extern/libmv/patches/bundle_tweaks.patch +++ b/extern/libmv/patches/bundle_tweaks.patch @@ -11,6 +11,36 @@ index 067da52..af86c4b 100644 #define LG LOG(INFO) #define V0 LOG(INFO) +diff --git a/src/libmv/simple_pipeline/pipeline.cc b/src/libmv/simple_pipeline/pipeline.cc +index 2459d05..2e4e5a6 100644 +--- a/src/libmv/simple_pipeline/pipeline.cc ++++ b/src/libmv/simple_pipeline/pipeline.cc +@@ -280,25 +280,6 @@ double InternalReprojectionError(const Tracks &image_tracks, + double ex = reprojected_marker.x - markers[i].x; + double ey = reprojected_marker.y - markers[i].y; + +- const int N = 100; +- char line[N]; +- snprintf(line, N, +- "image %-3d track %-3d " +- "x %7.1f y %7.1f " +- "rx %7.1f ry %7.1f " +- "ex %7.1f ey %7.1f" +- " e %7.1f", +- markers[i].image, +- markers[i].track, +- markers[i].x, +- markers[i].y, +- reprojected_marker.x, +- reprojected_marker.y, +- ex, +- ey, +- sqrt(ex*ex + ey*ey)); +- LG << line; +- + total_error += sqrt(ex*ex + ey*ey); + } + LG << "Skipped " << num_skipped << " markers."; diff --git a/src/third_party/glog/src/glog/logging.h b/src/third_party/glog/src/glog/logging.h index 57615ef..a58d478 100644 --- a/src/third_party/glog/src/glog/logging.h @@ -65,7 +95,7 @@ index 50c6a71..b179a1e 100644 #ifdef HAVE_STACKTRACE diff --git a/src/third_party/glog/src/utilities.h b/src/third_party/glog/src/utilities.h -index ee54f94..2d4e99e 100644 +index c4ae256..5c841a0 100644 --- a/src/third_party/glog/src/utilities.h +++ b/src/third_party/glog/src/utilities.h @@ -79,7 +79,7 @@ @@ -106,7 +136,7 @@ index 114762e..682a1b9 100755 /* define if you have libunwind */ #undef HAVE_LIB_UNWIND diff --git a/src/third_party/glog/src/windows/glog/logging.h b/src/third_party/glog/src/windows/glog/logging.h -index 7a6df74..de51586 100755 +index 4257375..2f41681 100755 --- a/src/third_party/glog/src/windows/glog/logging.h +++ b/src/third_party/glog/src/windows/glog/logging.h @@ -82,8 +82,8 @@ @@ -119,4 +149,4 @@ index 7a6df74..de51586 100755 +#include "third_party/gflags/gflags.h" #endif - namespace google { + #ifdef __MINGW32__ diff --git a/extern/libmv/patches/config_mac.patch b/extern/libmv/patches/config_mac.patch deleted file mode 100644 index 5a880155bfa..00000000000 --- a/extern/libmv/patches/config_mac.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/third_party/glog/src/config_mac.h b/src/third_party/glog/src/config_mac.h -index a45575b..5f953d1 100644 ---- a/src/third_party/glog/src/config_mac.h -+++ b/src/third_party/glog/src/config_mac.h -@@ -131,7 +131,7 @@ - #define PACKAGE_VERSION "0.3.1" - - /* How to access the PC from a struct ucontext */ --#define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip -+#undef PC_FROM_UCONTEXT - - /* Define to necessary symbol if this constant uses a non-standard name on - your system. */ diff --git a/extern/libmv/patches/detect.patch b/extern/libmv/patches/detect.patch deleted file mode 100644 index 36fea8427db..00000000000 --- a/extern/libmv/patches/detect.patch +++ /dev/null @@ -1,181 +0,0 @@ -diff --git a/src/libmv/simple_pipeline/detect.cc b/src/libmv/simple_pipeline/detect.cc -index 6fc0cdd..8ac42ab 100644 ---- a/src/libmv/simple_pipeline/detect.cc -+++ b/src/libmv/simple_pipeline/detect.cc -@@ -23,15 +23,89 @@ - ****************************************************************************/ - - #include "libmv/simple_pipeline/detect.h" -+#include - #include --#include -+#include -+ -+#ifdef __SSE2__ -+#include -+#endif - - namespace libmv { - - typedef unsigned int uint; - -+int featurecmp(const void *a_v, const void *b_v) -+{ -+ Feature *a = (Feature*)a_v; -+ Feature *b = (Feature*)b_v; -+ -+ return b->score - a->score; -+} -+ -+std::vector DetectFAST(const unsigned char* data, int width, int height, int stride, -+ int min_trackness, int min_distance) { -+ std::vector features; -+ // TODO(MatthiasF): Support targetting a feature count (binary search trackness) -+ int num_features; -+ xy* all = fast9_detect(data, width, height, -+ stride, min_trackness, &num_features); -+ if(num_features == 0) { -+ free(all); -+ return features; -+ } -+ int* scores = fast9_score(data, stride, all, num_features, min_trackness); -+ // TODO: merge with close feature suppression -+ xy* nonmax = nonmax_suppression(all, scores, num_features, &num_features); -+ free(all); -+ // Remove too close features -+ // TODO(MatthiasF): A resolution independent parameter would be better than distance -+ // e.g. a coefficient going from 0 (no minimal distance) to 1 (optimal circle packing) -+ // FIXME(MatthiasF): this method will not necessarily give all maximum markers -+ if(num_features) { -+ Feature *all_features = new Feature[num_features]; -+ -+ for(int i = 0; i < num_features; ++i) { -+ Feature a = { nonmax[i].x, nonmax[i].y, scores[i], 0 }; -+ all_features[i] = a; -+ } -+ -+ qsort((void *)all_features, num_features, sizeof(Feature), featurecmp); -+ -+ features.reserve(num_features); -+ -+ int prev_score = all_features[0].score; -+ for(int i = 0; i < num_features; ++i) { -+ bool ok = true; -+ Feature a = all_features[i]; -+ if(a.score>prev_score) -+ abort(); -+ prev_score = a.score; -+ -+ // compare each feature against filtered set -+ for(int j = 0; j < features.size(); j++) { -+ Feature& b = features[j]; -+ if ( (a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y) < min_distance*min_distance ) { -+ // already a nearby feature -+ ok = false; -+ break; -+ } -+ } -+ -+ if(ok) { -+ // add the new feature -+ features.push_back(a); -+ } -+ } -+ -+ delete [] all_features; -+ } -+ free(scores); -+ free(nonmax); -+ return features; -+} -+ - #ifdef __SSE2__ --#include - static uint SAD(const ubyte* imageA, const ubyte* imageB, int strideA, int strideB) { - __m128i a = _mm_setzero_si128(); - for(int i = 0; i < 16; i++) { -@@ -52,7 +126,7 @@ static uint SAD(const ubyte* imageA, const ubyte* imageB, int strideA, int strid - } - #endif - --void Detect(ubyte* image, int stride, int width, int height, Feature* detected, int* count, int distance, ubyte* pattern) { -+void DetectMORAVEC(ubyte* image, int stride, int width, int height, Feature* detected, int* count, int distance, ubyte* pattern) { - unsigned short histogram[256]; - memset(histogram,0,sizeof(histogram)); - ubyte* scores = new ubyte[width*height]; -diff --git a/src/libmv/simple_pipeline/detect.h b/src/libmv/simple_pipeline/detect.h -index 23b239b..bbe7aed 100644 ---- a/src/libmv/simple_pipeline/detect.h -+++ b/src/libmv/simple_pipeline/detect.h -@@ -25,27 +25,52 @@ - #ifndef LIBMV_SIMPLE_PIPELINE_DETECT_H_ - #define LIBMV_SIMPLE_PIPELINE_DETECT_H_ - --#ifdef __cplusplus -+#include -+ - namespace libmv { --#endif - - typedef unsigned char ubyte; - - /*! -- \a Feature is the 2D location of a detected feature in an image. -+ A Feature is the 2D location of a detected feature in an image. - -- \a x, \a y is the position of the center in pixels (from image top-left). -- \a score is an estimate of how well the pattern will be tracked. -- \a size can be used as an initial size to track the pattern. -+ \a x, \a y is the position of the feature in pixels from the top left corner. -+ \a score is an estimate of how well the feature will be tracked. -+ \a size can be used as an initial pattern size to track the feature. - - \sa Detect - */ - struct Feature { -+ /// Position in pixels (from top-left corner) -+ /// \note libmv might eventually support subpixel precision. - float x, y; -+ /// Trackness of the feature - float score; -+ /// Size of the feature in pixels - float size; - }; -- //radius for non maximal suppression -+ -+/*! -+ Detect features in an image. -+ -+ You need to input a single channel 8-bit image using pointer to image \a data, -+ \a width, \a height and \a stride (i.e bytes per line). -+ -+ You can tweak the count of detected features using \a min_trackness, which is -+ the minimum score to add a feature, and \a min_distance which is the minimal -+ distance accepted between two featuress. -+ -+ \note You can binary search over \a min_trackness to get a given feature count. -+ -+ \note a way to get an uniform distribution of a given feature count is: -+ \a min_distance = \a width * \a height / desired_feature_count ^ 2 -+ -+ \return All detected feartures matching given parameters -+*/ -+std::vector DetectFAST(const unsigned char* data, int width, int height, -+ int stride, int min_trackness = 128, -+ int min_distance = 120); -+ - /*! - Detect features in an image. - -@@ -63,10 +88,8 @@ struct Feature { - \note \a You can crop the image (to avoid detecting markers near the borders) without copying: - image += marginY*stride+marginX, width -= 2*marginX, height -= 2*marginY; - */ --void Detect(ubyte* image, int stride, int width, int height, Feature* detected, int* count, int distance /*=32*/, ubyte* pattern /*=0*/); -+void DetectMORAVEC(ubyte* image, int stride, int width, int height, Feature* detected, int* count, int distance /*=32*/, ubyte* pattern /*=0*/); - --#ifdef __cplusplus - } --#endif - - #endif diff --git a/extern/libmv/patches/fast.patch b/extern/libmv/patches/fast.patch deleted file mode 100644 index 8e0aeb7e721..00000000000 --- a/extern/libmv/patches/fast.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/src/third_party/fast/fast.h b/src/third_party/fast/fast.h -index 2b3825a..06fa90e 100644 ---- a/src/third_party/fast/fast.h -+++ b/src/third_party/fast/fast.h -@@ -1,6 +1,10 @@ - #ifndef FAST_H - #define FAST_H - -+#ifdef __cplusplus -+extern "C" { -+#endif -+ - typedef struct { int x, y; } xy; - typedef unsigned char byte; - -@@ -28,4 +32,8 @@ xy* fast12_detect_nonmax(const byte* im, int xsize, int ysize, int stride, int b - xy* nonmax_suppression(const xy* corners, const int* scores, int num_corners, int* ret_num_nonmax); - - -+#ifdef __cplusplus -+} -+#endif -+ - #endif diff --git a/extern/libmv/patches/function_derivative.patch b/extern/libmv/patches/function_derivative.patch deleted file mode 100644 index be7ccfc911a..00000000000 --- a/extern/libmv/patches/function_derivative.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/src/libmv/numeric/function_derivative.h b/src/libmv/numeric/function_derivative.h -index 0075d23..d7bc437 100644 ---- a/src/libmv/numeric/function_derivative.h -+++ b/src/libmv/numeric/function_derivative.h -@@ -24,6 +24,7 @@ - #include - - #include "libmv/numeric/numeric.h" -+#include "libmv/logging/logging.h" - - namespace libmv { - -@@ -97,7 +98,7 @@ bool CheckJacobian(const Function &f, const typename Function::XMatrixType &x) { - - typename NumericJacobian::JMatrixType J_numeric = j_numeric(x); - typename NumericJacobian::JMatrixType J_analytic = j_analytic(x); -- //LG << J_numeric - J_analytic; -+ LG << J_numeric - J_analytic; - return true; - } - diff --git a/extern/libmv/patches/high_distortion_crash_fix.patch b/extern/libmv/patches/high_distortion_crash_fix.patch deleted file mode 100644 index 54ab66fa27c..00000000000 --- a/extern/libmv/patches/high_distortion_crash_fix.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/src/libmv/simple_pipeline/camera_intrinsics.cc b/src/libmv/simple_pipeline/camera_intrinsics.cc -index 4e88e1f..f9888ff 100644 ---- a/src/libmv/simple_pipeline/camera_intrinsics.cc -+++ b/src/libmv/simple_pipeline/camera_intrinsics.cc -@@ -160,9 +160,13 @@ void CameraIntrinsics::ComputeLookupGrid(Offset* grid, int width, int height) { - if( iy < 0 ) { iy = 0, fy = 0; } - if( ix >= width-2 ) ix = width-2; - if( iy >= height-2 ) iy = height-2; -- //assert( ix-x > -128 && ix-x < 128 && iy-y > -128 && iy-y < 128 ); -- Offset offset = { ix-x, iy-y, fx, fy }; -- grid[y*width+x] = offset; -+ if ( ix-x > -128 && ix-x < 128 && iy-y > -128 && iy-y < 128 ) { -+ Offset offset = { ix-x, iy-y, fx, fy }; -+ grid[y*width+x] = offset; -+ } else { -+ Offset offset = { 0, 0, 0, 0 }; -+ grid[y*width+x] = offset; -+ } - } - } - } diff --git a/extern/libmv/patches/levenberg_marquardt.patch b/extern/libmv/patches/levenberg_marquardt.patch deleted file mode 100644 index 49ef82d73d2..00000000000 --- a/extern/libmv/patches/levenberg_marquardt.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff --git a/src/libmv/numeric/levenberg_marquardt.h b/src/libmv/numeric/levenberg_marquardt.h -index 6a54f66..4473b72 100644 ---- a/src/libmv/numeric/levenberg_marquardt.h -+++ b/src/libmv/numeric/levenberg_marquardt.h -@@ -33,6 +33,7 @@ - - #include "libmv/numeric/numeric.h" - #include "libmv/numeric/function_derivative.h" -+#include "libmv/logging/logging.h" - - namespace libmv { - -@@ -123,26 +124,40 @@ class LevenbergMarquardt { - Parameters dx, x_new; - int i; - for (i = 0; results.status == RUNNING && i < params.max_iterations; ++i) { -- if (dx.norm() <= params.relative_step_threshold * x.norm()) { -+ VLOG(1) << "iteration: " << i; -+ VLOG(1) << "||f(x)||: " << f_(x).norm(); -+ VLOG(1) << "max(g): " << g.array().abs().maxCoeff(); -+ VLOG(1) << "u: " << u; -+ VLOG(1) << "v: " << v; -+ -+ AMatrixType A_augmented = A + u*AMatrixType::Identity(J.cols(), J.cols()); -+ Solver solver(A_augmented); -+ dx = solver.solve(g); -+ bool solved = (A_augmented * dx).isApprox(g); -+ if (!solved) { -+ LOG(ERROR) << "Failed to solve"; -+ } -+ if (solved && dx.norm() <= params.relative_step_threshold * x.norm()) { - results.status = RELATIVE_STEP_SIZE_TOO_SMALL; - break; -- } -- x_new = x + dx; -- // Rho is the ratio of the actual reduction in error to the reduction -- // in error that would be obtained if the problem was linear. -- // See [1] for details. -- Scalar rho((error.squaredNorm() - f_(x_new).squaredNorm()) -- / dx.dot(u*dx + g)); -- if (rho > 0) { -- // Accept the Gauss-Newton step because the linear model fits well. -- x = x_new; -- results.status = Update(x, params, &J, &A, &error, &g); -- Scalar tmp = Scalar(2*rho-1); -- u = u*std::max(1/3., 1 - (tmp*tmp*tmp)); -- v = 2; -- continue; -- } -- -+ } -+ if (solved) { -+ x_new = x + dx; -+ // Rho is the ratio of the actual reduction in error to the reduction -+ // in error that would be obtained if the problem was linear. -+ // See [1] for details. -+ Scalar rho((error.squaredNorm() - f_(x_new).squaredNorm()) -+ / dx.dot(u*dx + g)); -+ if (rho > 0) { -+ // Accept the Gauss-Newton step because the linear model fits well. -+ x = x_new; -+ results.status = Update(x, params, &J, &A, &error, &g); -+ Scalar tmp = Scalar(2*rho-1); -+ u = u*std::max(1/3., 1 - (tmp*tmp*tmp)); -+ v = 2; -+ continue; -+ } -+ } - // Reject the update because either the normal equations failed to solve - // or the local linear model was not good (rho < 0). Instead, increase u - // to move closer to gradient descent. diff --git a/extern/libmv/patches/mingw.patch b/extern/libmv/patches/mingw.patch deleted file mode 100644 index 029e7d7f979..00000000000 --- a/extern/libmv/patches/mingw.patch +++ /dev/null @@ -1,171 +0,0 @@ -diff --git a/src/libmv/multiview/euclidean_resection.cc b/src/libmv/multiview/euclidean_resection.cc -index 6d918a1..9286251 100644 ---- a/src/libmv/multiview/euclidean_resection.cc -+++ b/src/libmv/multiview/euclidean_resection.cc -@@ -32,6 +32,8 @@ - namespace libmv { - namespace euclidean_resection { - -+typedef unsigned int uint; -+ - bool EuclideanResection(const Mat2X &x_camera, - const Mat3X &X_world, - Mat3 *R, Vec3 *t, -diff --git a/src/libmv/numeric/numeric.h b/src/libmv/numeric/numeric.h -index f39d126..21e0f06 100644 ---- a/src/libmv/numeric/numeric.h -+++ b/src/libmv/numeric/numeric.h -@@ -40,7 +40,7 @@ - } - #endif //_WIN32 || __APPLE__ - --#if _WIN32 -+#if (defined(WIN32) || defined(WIN64)) && !defined(__MINGW32__) - inline long lround(double d) { - return (long)(d>0 ? d+0.5 : ceil(d-0.5)); - } -diff --git a/src/third_party/glog/src/config.h b/src/third_party/glog/src/config.h -index ed8d56e..06ed686 100644 ---- a/src/third_party/glog/src/config.h -+++ b/src/third_party/glog/src/config.h -@@ -4,6 +4,8 @@ - /* Namespace for Google classes */ - #ifdef __APPLE__ - #include "config_mac.h" -+#elif __MINGW32__ -+ #include "windows/config.h" - #elif __GNUC__ - #include "config_linux.h" - #elif _MSC_VER -diff --git a/src/third_party/glog/src/utilities.h b/src/third_party/glog/src/utilities.h -index ee54f94..c4ae256 100644 ---- a/src/third_party/glog/src/utilities.h -+++ b/src/third_party/glog/src/utilities.h -@@ -101,7 +101,9 @@ - // correctly when GetStackTrace() is called with max_depth == 0. - // Some code may do that. - --#if defined(HAVE_LIB_UNWIND) -+#if __MINGW32__ -+# undef STACKTRACE_H -+#elif defined(HAVE_LIB_UNWIND) - # define STACKTRACE_H "stacktrace_libunwind-inl.h" - #elif !defined(NO_FRAME_POINTER) - # if defined(__i386__) && __GNUC__ >= 2 -diff --git a/src/third_party/glog/src/windows/glog/logging.h b/src/third_party/glog/src/windows/glog/logging.h -index 7a6df74..4257375 100755 ---- a/src/third_party/glog/src/windows/glog/logging.h -+++ b/src/third_party/glog/src/windows/glog/logging.h -@@ -59,7 +59,7 @@ - - // Annoying stuff for windows -- makes sure clients can import these functions - #ifndef GOOGLE_GLOG_DLL_DECL --# if defined(_WIN32) && !defined(__CYGWIN__) -+# if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__) - # define GOOGLE_GLOG_DLL_DECL __declspec(dllimport) - # else - # define GOOGLE_GLOG_DLL_DECL -@@ -86,6 +86,15 @@ - #include - #endif - -+#ifdef __MINGW32__ -+# include -+# include -+# include // the normal place uint16_t is defined -+# include // the normal place u_int16_t is defined -+# include // a third place for uint16_t or u_int16_t -+# define _exit(x) exit(x) -+#endif -+ - namespace google { - - #if 0 // the C99 format -@@ -98,11 +107,16 @@ typedef int32_t int32; - typedef u_int32_t uint32; - typedef int64_t int64; - typedef u_int64_t uint64; --#elif 1 // the windows (vc7) format -+#elif defined(_MSC_VER) - typedef __int32 int32; - typedef unsigned __int32 uint32; - typedef __int64 int64; - typedef unsigned __int64 uint64; -+#elif defined(__MINGW32__) -+typedef int32_t int32; -+typedef uint32_t uint32; -+typedef int64_t int64; -+typedef uint64_t uint64; - #else - #error Do not know how to define a 32-bit integer quantity on your system - #endif -diff --git a/src/third_party/glog/src/windows/port.h b/src/third_party/glog/src/windows/port.h -index d093bf5..d507812 100755 ---- a/src/third_party/glog/src/windows/port.h -+++ b/src/third_party/glog/src/windows/port.h -@@ -59,14 +59,16 @@ - * used by both C and C++ code, so we put all the C++ together. - */ - --/* 4244: otherwise we get problems when substracting two size_t's to an int -- * 4251: it's complaining about a private struct I've chosen not to dllexport -- * 4355: we use this in a constructor, but we do it safely -- * 4715: for some reason VC++ stopped realizing you can't return after abort() -- * 4800: we know we're casting ints/char*'s to bools, and we're ok with that -- * 4996: Yes, we're ok using "unsafe" functions like fopen() and strerror() -- */ --#pragma warning(disable:4244 4251 4355 4715 4800 4996) -+#if _MSC_VER -+ /* 4244: otherwise we get problems when substracting two size_t's to an int -+ * 4251: it's complaining about a private struct I've chosen not to dllexport -+ * 4355: we use this in a constructor, but we do it safely -+ * 4715: for some reason VC++ stopped realizing you can't return after abort() -+ * 4800: we know we're casting ints/char*'s to bools, and we're ok with that -+ * 4996: Yes, we're ok using "unsafe" functions like fopen() and strerror() -+ */ -+# pragma warning(disable:4244 4251 4355 4715 4800 4996) -+#endif - - /* file I/O */ - #define PATH_MAX 1024 -@@ -108,7 +110,9 @@ extern int snprintf(char *str, size_t size, - extern int safe_vsnprintf(char *str, size_t size, - const char *format, va_list ap); - #define vsnprintf(str, size, format, ap) safe_vsnprintf(str, size, format, ap) -+#if !defined(__MINGW32__) - #define va_copy(dst, src) (dst) = (src) -+#endif - - /* Windows doesn't support specifying the number of buckets as a - * hash_map constructor arg, so we leave this blank. -@@ -130,13 +134,30 @@ enum { PTHREAD_ONCE_INIT = 0 }; // important that this be 0! for SpinLock - #define pthread_equal(pthread_t_1, pthread_t_2) ((pthread_t_1)==(pthread_t_2)) - - inline struct tm* localtime_r(const time_t* timep, struct tm* result) { -+#if __MINGW32__ -+ struct tm *local_result; -+ local_result = localtime (timep); -+ -+ if (local_result == NULL || result == NULL) -+ return NULL; -+ -+ memcpy (result, local_result, sizeof (result)); -+ -+ return result; -+#else - localtime_s(result, timep); - return result; -+#endif - } - - inline char* strerror_r(int errnum, char* buf, size_t buflen) { -+#if __MINGW32__ -+ strncpy(buf, "Not implemented yet", buflen); -+ return buf; -+#else - strerror_s(buf, buflen, errnum); - return buf; -+#endif - } - - #ifndef __cplusplus diff --git a/extern/libmv/patches/msvc2010.patch b/extern/libmv/patches/msvc2010.patch deleted file mode 100644 index c090b070628..00000000000 --- a/extern/libmv/patches/msvc2010.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/libmv/simple_pipeline/tracks.cc b/src/libmv/simple_pipeline/tracks.cc -index 0e2a1b6..3fb8ddb 100644 ---- a/src/libmv/simple_pipeline/tracks.cc -+++ b/src/libmv/simple_pipeline/tracks.cc -@@ -20,6 +20,7 @@ - - #include - #include -+#include - - #include "libmv/numeric/numeric.h" - #include "libmv/simple_pipeline/tracks.h" diff --git a/extern/libmv/patches/overscan.patch b/extern/libmv/patches/overscan.patch deleted file mode 100644 index c68f36804ec..00000000000 --- a/extern/libmv/patches/overscan.patch +++ /dev/null @@ -1,182 +0,0 @@ -diff --git a/src/libmv/simple_pipeline/camera_intrinsics.cc b/src/libmv/simple_pipeline/camera_intrinsics.cc -index 110a16d..366129d 100644 ---- a/src/libmv/simple_pipeline/camera_intrinsics.cc -+++ b/src/libmv/simple_pipeline/camera_intrinsics.cc -@@ -31,6 +31,7 @@ struct Offset { - struct Grid { - struct Offset *offset; - int width, height; -+ double overscan; - }; - - static struct Grid *copyGrid(struct Grid *from) -@@ -42,6 +43,7 @@ static struct Grid *copyGrid(struct Grid *from) - - to->width = from->width; - to->height = from->height; -+ to->overscan = from->overscan; - - to->offset = new Offset[to->width*to->height]; - memcpy(to->offset, from->offset, sizeof(struct Offset)*to->width*to->height); -@@ -184,17 +186,19 @@ void CameraIntrinsics::InvertIntrinsics(double image_x, - - // TODO(MatthiasF): downsample lookup - template --void CameraIntrinsics::ComputeLookupGrid(Grid* grid, int width, int height) { -- double aspx = (double)width / image_width_; -- double aspy = (double)height / image_height_; -+void CameraIntrinsics::ComputeLookupGrid(Grid* grid, int width, int height, double overscan) { -+ double w = (double)width / (1 + overscan); -+ double h = (double)height / (1 + overscan); -+ double aspx = (double)w / image_width_; -+ double aspy = (double)h / image_height_; - - for (int y = 0; y < height; y++) { - for (int x = 0; x < width; x++) { -- double src_x = x / aspx, src_y = y / aspy; -+ double src_x = (x - 0.5 * overscan * w) / aspx, src_y = (y - 0.5 * overscan * h) / aspy; - double warp_x, warp_y; - WarpFunction(this,src_x,src_y,&warp_x,&warp_y); -- warp_x = warp_x*aspx; -- warp_y = warp_y*aspy; -+ warp_x = warp_x*aspx + 0.5 * overscan * w; -+ warp_y = warp_y*aspy + 0.5 * overscan * h; - int ix = int(warp_x), iy = int(warp_y); - int fx = round((warp_x-ix)*256), fy = round((warp_y-iy)*256); - if(fx == 256) { fx=0; ix++; } -@@ -264,10 +268,10 @@ struct InvertIntrinsicsFunction { - } - }; - --void CameraIntrinsics::CheckDistortLookupGrid(int width, int height) -+void CameraIntrinsics::CheckDistortLookupGrid(int width, int height, double overscan) - { - if(distort_) { -- if(distort_->width != width || distort_->height != height) { -+ if(distort_->width != width || distort_->height != height || distort_->overscan != overscan) { - delete [] distort_->offset; - distort_->offset = NULL; - } -@@ -278,17 +282,18 @@ void CameraIntrinsics::CheckDistortLookupGrid(int width, int height) - - if(!distort_->offset) { - distort_->offset = new Offset[width*height]; -- ComputeLookupGrid(distort_,width,height); -+ ComputeLookupGrid(distort_,width,height,overscan); - } - - distort_->width = width; - distort_->height = height; -+ distort_->overscan = overscan; - } - --void CameraIntrinsics::CheckUndistortLookupGrid(int width, int height) -+void CameraIntrinsics::CheckUndistortLookupGrid(int width, int height, double overscan) - { - if(undistort_) { -- if(undistort_->width != width || undistort_->height != height) { -+ if(undistort_->width != width || undistort_->height != height || undistort_->overscan != overscan) { - delete [] undistort_->offset; - undistort_->offset = NULL; - } -@@ -299,15 +304,16 @@ void CameraIntrinsics::CheckUndistortLookupGrid(int width, int height) - - if(!undistort_->offset) { - undistort_->offset = new Offset[width*height]; -- ComputeLookupGrid(undistort_,width,height); -+ ComputeLookupGrid(undistort_,width,height,overscan); - } - - undistort_->width = width; - undistort_->height = height; -+ undistort_->overscan = overscan; - } - --void CameraIntrinsics::Distort(const float* src, float* dst, int width, int height, int channels) { -- CheckDistortLookupGrid(width, height); -+void CameraIntrinsics::Distort(const float* src, float* dst, int width, int height, double overscan, int channels) { -+ CheckDistortLookupGrid(width, height, overscan); - if(channels==1) Warp(distort_,src,dst,width,height); - else if(channels==2) Warp(distort_,src,dst,width,height); - else if(channels==3) Warp(distort_,src,dst,width,height); -@@ -315,8 +321,8 @@ void CameraIntrinsics::Distort(const float* src, float* dst, int width, int heig - //else assert("channels must be between 1 and 4"); - } - --void CameraIntrinsics::Distort(const unsigned char* src, unsigned char* dst, int width, int height, int channels) { -- CheckDistortLookupGrid(width, height); -+void CameraIntrinsics::Distort(const unsigned char* src, unsigned char* dst, int width, int height, double overscan, int channels) { -+ CheckDistortLookupGrid(width, height, overscan); - if(channels==1) Warp(distort_,src,dst,width,height); - else if(channels==2) Warp(distort_,src,dst,width,height); - else if(channels==3) Warp(distort_,src,dst,width,height); -@@ -324,8 +330,8 @@ void CameraIntrinsics::Distort(const unsigned char* src, unsigned char* dst, int - //else assert("channels must be between 1 and 4"); - } - --void CameraIntrinsics::Undistort(const float* src, float* dst, int width, int height, int channels) { -- CheckUndistortLookupGrid(width, height); -+void CameraIntrinsics::Undistort(const float* src, float* dst, int width, int height, double overscan, int channels) { -+ CheckUndistortLookupGrid(width, height, overscan); - if(channels==1) Warp(undistort_,src,dst,width,height); - else if(channels==2) Warp(undistort_,src,dst,width,height); - else if(channels==3) Warp(undistort_,src,dst,width,height); -@@ -333,8 +339,8 @@ void CameraIntrinsics::Undistort(const float* src, float* dst, int width, int he - //else assert("channels must be between 1 and 4"); - } - --void CameraIntrinsics::Undistort(const unsigned char* src, unsigned char* dst, int width, int height, int channels) { -- CheckUndistortLookupGrid(width, height); -+void CameraIntrinsics::Undistort(const unsigned char* src, unsigned char* dst, int width, int height, double overscan, int channels) { -+ CheckUndistortLookupGrid(width, height, overscan); - if(channels==1) Warp(undistort_,src,dst,width,height); - else if(channels==2) Warp(undistort_,src,dst,width,height); - else if(channels==3) Warp(undistort_,src,dst,width,height); -diff --git a/src/libmv/simple_pipeline/camera_intrinsics.h b/src/libmv/simple_pipeline/camera_intrinsics.h -index f525571..f4bf903 100644 ---- a/src/libmv/simple_pipeline/camera_intrinsics.h -+++ b/src/libmv/simple_pipeline/camera_intrinsics.h -@@ -91,7 +91,7 @@ class CameraIntrinsics { - \note This is the reference implementation using floating point images. - */ - void Distort(const float* src, float* dst, -- int width, int height, int channels); -+ int width, int height, double overscan, int channels); - /*! - Distort an image using the current camera instrinsics - -@@ -101,7 +101,7 @@ class CameraIntrinsics { - \note This version is much faster. - */ - void Distort(const unsigned char* src, unsigned char* dst, -- int width, int height, int channels); -+ int width, int height, double overscan, int channels); - /*! - Undistort an image using the current camera instrinsics - -@@ -111,7 +111,7 @@ class CameraIntrinsics { - \note This is the reference implementation using floating point images. - */ - void Undistort(const float* src, float* dst, -- int width, int height, int channels); -+ int width, int height, double overscan, int channels); - /*! - Undistort an image using the current camera instrinsics - -@@ -121,12 +121,12 @@ class CameraIntrinsics { - \note This version is much faster. - */ - void Undistort(const unsigned char* src, unsigned char* dst, -- int width, int height, int channels); -+ int width, int height, double overscan, int channels); - - private: -- template void ComputeLookupGrid(struct Grid* grid, int width, int height); -- void CheckUndistortLookupGrid(int width, int height); -- void CheckDistortLookupGrid(int width, int height); -+ template void ComputeLookupGrid(struct Grid* grid, int width, int height, double overscan); -+ void CheckUndistortLookupGrid(int width, int height, double overscan); -+ void CheckDistortLookupGrid(int width, int height, double overscan); - void FreeLookupGrid(); - - // The traditional intrinsics matrix from x = K[R|t]X. diff --git a/extern/libmv/patches/scaled_distortion.patch b/extern/libmv/patches/scaled_distortion.patch deleted file mode 100644 index 2da832931d1..00000000000 --- a/extern/libmv/patches/scaled_distortion.patch +++ /dev/null @@ -1,261 +0,0 @@ -diff --git a/src/libmv/simple_pipeline/camera_intrinsics.cc b/src/libmv/simple_pipeline/camera_intrinsics.cc -index f9888ff..110a16d 100644 ---- a/src/libmv/simple_pipeline/camera_intrinsics.cc -+++ b/src/libmv/simple_pipeline/camera_intrinsics.cc -@@ -23,7 +23,32 @@ - - namespace libmv { - --struct Offset { signed char ix,iy; unsigned char fx,fy; }; -+struct Offset { -+ signed char ix, iy; -+ unsigned char fx,fy; -+}; -+ -+struct Grid { -+ struct Offset *offset; -+ int width, height; -+}; -+ -+static struct Grid *copyGrid(struct Grid *from) -+{ -+ struct Grid *to = NULL; -+ -+ if (from) { -+ to = new Grid; -+ -+ to->width = from->width; -+ to->height = from->height; -+ -+ to->offset = new Offset[to->width*to->height]; -+ memcpy(to->offset, from->offset, sizeof(struct Offset)*to->width*to->height); -+ } -+ -+ return to; -+} - - CameraIntrinsics::CameraIntrinsics() - : K_(Mat3::Identity()), -@@ -37,9 +62,22 @@ CameraIntrinsics::CameraIntrinsics() - distort_(0), - undistort_(0) {} - -+CameraIntrinsics::CameraIntrinsics(const CameraIntrinsics &from) -+ : K_(from.K_), -+ image_width_(from.image_width_), -+ image_height_(from.image_height_), -+ k1_(from.k1_), -+ k2_(from.k2_), -+ k3_(from.k3_), -+ p1_(from.p1_), -+ p2_(from.p2_) -+{ -+ distort_ = copyGrid(from.distort_); -+ undistort_ = copyGrid(from.undistort_); -+} -+ - CameraIntrinsics::~CameraIntrinsics() { -- if(distort_) delete[] distort_; -- if(undistort_) delete[] undistort_; -+ FreeLookupGrid(); - } - - /// Set the entire calibration matrix at once. -@@ -146,11 +184,17 @@ void CameraIntrinsics::InvertIntrinsics(double image_x, - - // TODO(MatthiasF): downsample lookup - template --void CameraIntrinsics::ComputeLookupGrid(Offset* grid, int width, int height) { -+void CameraIntrinsics::ComputeLookupGrid(Grid* grid, int width, int height) { -+ double aspx = (double)width / image_width_; -+ double aspy = (double)height / image_height_; -+ - for (int y = 0; y < height; y++) { - for (int x = 0; x < width; x++) { -+ double src_x = x / aspx, src_y = y / aspy; - double warp_x, warp_y; -- WarpFunction(this,x,y,&warp_x,&warp_y); -+ WarpFunction(this,src_x,src_y,&warp_x,&warp_y); -+ warp_x = warp_x*aspx; -+ warp_y = warp_y*aspy; - int ix = int(warp_x), iy = int(warp_y); - int fx = round((warp_x-ix)*256), fy = round((warp_y-iy)*256); - if(fx == 256) { fx=0; ix++; } -@@ -162,10 +206,10 @@ void CameraIntrinsics::ComputeLookupGrid(Offset* grid, int width, int height) { - if( iy >= height-2 ) iy = height-2; - if ( ix-x > -128 && ix-x < 128 && iy-y > -128 && iy-y < 128 ) { - Offset offset = { ix-x, iy-y, fx, fy }; -- grid[y*width+x] = offset; -+ grid->offset[y*width+x] = offset; - } else { - Offset offset = { 0, 0, 0, 0 }; -- grid[y*width+x] = offset; -+ grid->offset[y*width+x] = offset; - } - } - } -@@ -173,11 +217,11 @@ void CameraIntrinsics::ComputeLookupGrid(Offset* grid, int width, int height) { - - // TODO(MatthiasF): cubic B-Spline image sampling, bilinear lookup - template --static void Warp(const Offset* grid, const T* src, T* dst, -+static void Warp(const Grid* grid, const T* src, T* dst, - int width, int height) { - for (int y = 0; y < height; y++) { - for (int x = 0; x < width; x++) { -- Offset offset = grid[y*width+x]; -+ Offset offset = grid->offset[y*width+x]; - const T* s = &src[((y+offset.iy)*width+(x+offset.ix))*N]; - for (int i = 0; i < N; i++) { - dst[(y*width+x)*N+i] = ((s[ i] * (256-offset.fx) + s[ N+i] * offset.fx) * (256-offset.fy) -@@ -188,8 +232,17 @@ static void Warp(const Offset* grid, const T* src, T* dst, - } - - void CameraIntrinsics::FreeLookupGrid() { -- if(distort_) delete distort_, distort_=0; -- if(undistort_) delete undistort_, undistort_=0; -+ if(distort_) { -+ delete distort_->offset; -+ delete distort_; -+ distort_ = NULL; -+ } -+ -+ if(undistort_) { -+ delete undistort_->offset; -+ delete undistort_; -+ undistort_ = NULL; -+ } - } - - // FIXME: C++ templates limitations makes thing complicated, but maybe there is a simpler method. -@@ -211,11 +264,50 @@ struct InvertIntrinsicsFunction { - } - }; - --void CameraIntrinsics::Distort(const float* src, float* dst, int width, int height, int channels) { -- if(!distort_) { -- distort_ = new Offset[width*height]; -- ComputeLookupGrid(distort_,width,height); -+void CameraIntrinsics::CheckDistortLookupGrid(int width, int height) -+{ -+ if(distort_) { -+ if(distort_->width != width || distort_->height != height) { -+ delete [] distort_->offset; -+ distort_->offset = NULL; -+ } -+ } else { -+ distort_ = new Grid; -+ distort_->offset = NULL; -+ } -+ -+ if(!distort_->offset) { -+ distort_->offset = new Offset[width*height]; -+ ComputeLookupGrid(distort_,width,height); - } -+ -+ distort_->width = width; -+ distort_->height = height; -+} -+ -+void CameraIntrinsics::CheckUndistortLookupGrid(int width, int height) -+{ -+ if(undistort_) { -+ if(undistort_->width != width || undistort_->height != height) { -+ delete [] undistort_->offset; -+ undistort_->offset = NULL; -+ } -+ } else { -+ undistort_ = new Grid; -+ undistort_->offset = NULL; -+ } -+ -+ if(!undistort_->offset) { -+ undistort_->offset = new Offset[width*height]; -+ ComputeLookupGrid(undistort_,width,height); -+ } -+ -+ undistort_->width = width; -+ undistort_->height = height; -+} -+ -+void CameraIntrinsics::Distort(const float* src, float* dst, int width, int height, int channels) { -+ CheckDistortLookupGrid(width, height); - if(channels==1) Warp(distort_,src,dst,width,height); - else if(channels==2) Warp(distort_,src,dst,width,height); - else if(channels==3) Warp(distort_,src,dst,width,height); -@@ -224,10 +316,7 @@ void CameraIntrinsics::Distort(const float* src, float* dst, int width, int heig - } - - void CameraIntrinsics::Distort(const unsigned char* src, unsigned char* dst, int width, int height, int channels) { -- if(!distort_) { -- distort_ = new Offset[width*height]; -- ComputeLookupGrid(distort_,width,height); -- } -+ CheckDistortLookupGrid(width, height); - if(channels==1) Warp(distort_,src,dst,width,height); - else if(channels==2) Warp(distort_,src,dst,width,height); - else if(channels==3) Warp(distort_,src,dst,width,height); -@@ -236,10 +325,7 @@ void CameraIntrinsics::Distort(const unsigned char* src, unsigned char* dst, int - } - - void CameraIntrinsics::Undistort(const float* src, float* dst, int width, int height, int channels) { -- if(!undistort_) { -- undistort_ = new Offset[width*height]; -- ComputeLookupGrid(undistort_,width,height); -- } -+ CheckUndistortLookupGrid(width, height); - if(channels==1) Warp(undistort_,src,dst,width,height); - else if(channels==2) Warp(undistort_,src,dst,width,height); - else if(channels==3) Warp(undistort_,src,dst,width,height); -@@ -248,10 +334,7 @@ void CameraIntrinsics::Undistort(const float* src, float* dst, int width, int he - } - - void CameraIntrinsics::Undistort(const unsigned char* src, unsigned char* dst, int width, int height, int channels) { -- if(!undistort_) { -- undistort_ = new Offset[width*height]; -- ComputeLookupGrid(undistort_,width,height); -- } -+ CheckUndistortLookupGrid(width, height); - if(channels==1) Warp(undistort_,src,dst,width,height); - else if(channels==2) Warp(undistort_,src,dst,width,height); - else if(channels==3) Warp(undistort_,src,dst,width,height); -diff --git a/src/libmv/simple_pipeline/camera_intrinsics.h b/src/libmv/simple_pipeline/camera_intrinsics.h -index 29bc8a1..f525571 100644 ---- a/src/libmv/simple_pipeline/camera_intrinsics.h -+++ b/src/libmv/simple_pipeline/camera_intrinsics.h -@@ -26,11 +26,12 @@ typedef Eigen::Matrix Mat3; - - namespace libmv { - --struct Offset; -+struct Grid; - - class CameraIntrinsics { - public: - CameraIntrinsics(); -+ CameraIntrinsics(const CameraIntrinsics &from); - ~CameraIntrinsics(); - - const Mat3 &K() const { return K_; } -@@ -123,7 +124,9 @@ class CameraIntrinsics { - int width, int height, int channels); - - private: -- template void ComputeLookupGrid(Offset* grid, int width, int height); -+ template void ComputeLookupGrid(struct Grid* grid, int width, int height); -+ void CheckUndistortLookupGrid(int width, int height); -+ void CheckDistortLookupGrid(int width, int height); - void FreeLookupGrid(); - - // The traditional intrinsics matrix from x = K[R|t]X. -@@ -140,8 +143,8 @@ class CameraIntrinsics { - // independent of image size. - double k1_, k2_, k3_, p1_, p2_; - -- Offset* distort_; -- Offset* undistort_; -+ struct Grid *distort_; -+ struct Grid *undistort_; - }; - - } // namespace libmv diff --git a/extern/libmv/patches/series b/extern/libmv/patches/series index 00a52c1cfaa..ca671122a61 100644 --- a/extern/libmv/patches/series +++ b/extern/libmv/patches/series @@ -1,13 +1,2 @@ v3d_verbosity.patch -snrptinf_fix.patch bundle_tweaks.patch -fast.patch -config_mac.patch -levenberg_marquardt.patch -function_derivative.patch -high_distortion_crash_fix.patch -mingw.patch -msvc2010.patch -scaled_distortion.patch -overscan.patch -detect.patch diff --git a/extern/libmv/patches/snrptinf_fix.patch b/extern/libmv/patches/snrptinf_fix.patch deleted file mode 100644 index e886a671de0..00000000000 --- a/extern/libmv/patches/snrptinf_fix.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/src/libmv/simple_pipeline/pipeline.cc b/src/libmv/simple_pipeline/pipeline.cc -index 652d70c..25cd2c2 100644 ---- a/src/libmv/simple_pipeline/pipeline.cc -+++ b/src/libmv/simple_pipeline/pipeline.cc -@@ -28,6 +28,10 @@ - #include "libmv/simple_pipeline/tracks.h" - #include "libmv/simple_pipeline/camera_intrinsics.h" - -+#ifdef _MSC_VER -+# define snprintf _snprintf -+#endif -+ - namespace libmv { - - void CompleteReconstruction(const Tracks &tracks, diff --git a/extern/libmv/patches/v3d_verbosity.patch b/extern/libmv/patches/v3d_verbosity.patch index a54f3dc44be..f5c6afbd0b5 100644 --- a/extern/libmv/patches/v3d_verbosity.patch +++ b/extern/libmv/patches/v3d_verbosity.patch @@ -1,12 +1,12 @@ diff --git a/src/libmv/simple_pipeline/bundle.cc b/src/libmv/simple_pipeline/bundle.cc -index 310660d..f819603 100644 +index fa0b6cc..d382cd5 100644 --- a/src/libmv/simple_pipeline/bundle.cc +++ b/src/libmv/simple_pipeline/bundle.cc -@@ -141,7 +141,6 @@ void Bundle(const Tracks &tracks, Reconstruction *reconstruction) { - v3d_distortion.p2 = 0; +@@ -194,7 +194,6 @@ void EuclideanBundleCommonIntrinsics(const Tracks &tracks, + double v3d_inlier_threshold = 500000.0; // Finally, run the bundle adjustment. - V3D::optimizerVerbosenessLevel = 1; - double const inlierThreshold = 500000.0; - V3D::CommonInternalsMetricBundleOptimizer opt(V3D::FULL_BUNDLE_METRIC, - inlierThreshold, + V3D::CommonInternalsMetricBundleOptimizer opt(v3d_bundle_intrinsics, + v3d_inlier_threshold, + v3d_K, diff --git a/extern/libredcode/codec.h b/extern/libredcode/codec.h index 928cab589ed..dd239180c10 100644 --- a/extern/libredcode/codec.h +++ b/extern/libredcode/codec.h @@ -1,5 +1,5 @@ -#ifndef __redcode_codec_h_included__ -#define __redcode_codec_h_included__ +#ifndef __CODEC_H__ +#define __CODEC_H__ struct redcode_frame; diff --git a/extern/libredcode/debayer.h b/extern/libredcode/debayer.h index b58c7678671..43564240cc2 100644 --- a/extern/libredcode/debayer.h +++ b/extern/libredcode/debayer.h @@ -1,5 +1,5 @@ -#ifndef __redcode_debayer_h_included__ -#define __redcode_debayer_h_included__ 1 +#ifndef __DEBAYER_H__ +#define __DEBAYER_H__ void redcode_ycbcr2rgb_fullscale( int ** planes, int width, int height, float * out); diff --git a/extern/libredcode/format.h b/extern/libredcode/format.h index b2c6b2d885b..3cee804aa9d 100644 --- a/extern/libredcode/format.h +++ b/extern/libredcode/format.h @@ -1,5 +1,5 @@ -#ifndef __redcode_format_h_included__ -#define __redcode_format_h_included__ +#ifndef __FORMAT_H__ +#define __FORMAT_H__ struct redcode_handle; struct redcode_frame { diff --git a/extern/xdnd/CMakeLists.txt b/extern/xdnd/CMakeLists.txt new file mode 100644 index 00000000000..f7eded73d42 --- /dev/null +++ b/extern/xdnd/CMakeLists.txt @@ -0,0 +1,43 @@ +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# The Original Code is Copyright (C) 2012, Blender Foundation +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): Sergey Sharybin. +# +# ***** END GPL LICENSE BLOCK ***** + +set(INC + . +) + +set(INC_SYS + +) + +set(SRC + xdnd.c + xdnd.h +) + +add_definitions( + -DHAVE_SYS_TIME_H +) + +blender_add_lib(extern_xdnd "${SRC}" "${INC}" "${INC_SYS}") diff --git a/extern/xdnd/SConscript b/extern/xdnd/SConscript new file mode 100644 index 00000000000..6f1fe72cc28 --- /dev/null +++ b/extern/xdnd/SConscript @@ -0,0 +1,10 @@ +#!/usr/bin/python + +Import('env') + +defs = ['HAVE_SYS_TIME_H'] +sources = env.Glob('*.c') + +incs = '.' + +env.BlenderLib ( 'extern_xdnd', sources, Split(incs), defs, libtype=['extern','player'], priority=[10, 185]) diff --git a/extern/xdnd/xdnd.c b/extern/xdnd/xdnd.c new file mode 100644 index 00000000000..9bdee89c1ce --- /dev/null +++ b/extern/xdnd/xdnd.c @@ -0,0 +1,1599 @@ +/* xdnd.c, xdnd.h - C program library for handling the Xdnd protocol + Copyright (C) 1996-2000 Paul Sheer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + */ + + +/* + Released 1998-08-07 + Changes: + + 2000-08-08: INCR protocol implemented. + +*/ + +/* + DONE: + - INCR protocol now implemented + + TODO: + - action_choose_dialog not yet supported (never called) + - widget_delete_selection not yet supported and DELETE requests are ignored + - not yet tested with applications that only supported XDND 0 or 1 +*/ + +#include +#include +#include +#include +#include +#include + +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif +#include +#ifdef HAVE_UNISTD_H +# include +#endif + +#ifdef HAVE_SYS_SELECT_H +# include +#endif + +#include "xdnd.h" + +static void xdnd_send_enter (DndClass * dnd, Window window, Window from, Atom * typelist); +static void xdnd_send_position (DndClass * dnd, Window window, Window from, Atom action, int x, int y, + unsigned long etime); +static void xdnd_send_status (DndClass * dnd, Window window, Window from, int will_accept, int want_position, + int x, int y, int w, int h, Atom action); +static void xdnd_send_leave (DndClass * dnd, Window window, Window from); +static void xdnd_send_drop (DndClass * dnd, Window window, Window from, unsigned long etime); +static void xdnd_send_finished (DndClass * dnd, Window window, Window from, int error); +static int xdnd_convert_selection (DndClass * dnd, Window window, Window requester, Atom type); +static void xdnd_selection_send (DndClass * dnd, XSelectionRequestEvent * request, unsigned char *data, + int length); +static int xdnd_get_selection (DndClass * dnd, Window from, Atom property, Window insert); + + +/* just to remind us : */ + +#if 0 +typedef struct { + int type; + unsigned long serial; + Bool send_event; + Display *display; + Window window; + Atom message_type; + int format; + union { + char b[20]; + short s[10]; + long l[5]; + } data; +} XClientMessageEvent; +XClientMessageEvent xclient; +#endif + +/* #define DND_DEBUG */ + +#define xdnd_xfree(x) {if (x) { free (x); x = 0; }} + +#ifdef DND_DEBUG + +#include +#include + +char *xdnd_debug_milliseconds (void) +{ + struct timeval tv; + static char r[22]; + gettimeofday (&tv, 0); + sprintf (r, "%.2ld.%.3ld", tv.tv_sec % 100L, tv.tv_usec / 1000L); + return r; +} + +#define dnd_debug1(a) printf("%s: %d: %s: " a "\n", __FILE__, __LINE__, xdnd_debug_milliseconds ()) +#define dnd_debug2(a,b) printf("%s: %d: %s: " a "\n", __FILE__, __LINE__, xdnd_debug_milliseconds (), b) +#define dnd_debug3(a,b,c) printf("%s: %d: %s: " a "\n", __FILE__, __LINE__, xdnd_debug_milliseconds (), b, c) +#define dnd_debug4(a,b,c,d) printf("%s: %d: %s: " a "\n", __FILE__, __LINE__, xdnd_debug_milliseconds (), b, c, d) +#else +#define dnd_debug1(a) +#define dnd_debug2(a,b) +#define dnd_debug3(a,b,c) +#define dnd_debug4(a,b,c,d) +#endif + +#define dnd_warning(a) fprintf (stderr, a) + +#define dnd_version_at_least(a,b) ((a) >= (b)) + +static unsigned char dnd_copy_cursor_bits[] = +{ + 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x0f, 0x00, 0x02, 0x00, 0x08, 0x01, + 0x02, 0x00, 0x08, 0x01, 0x02, 0x00, 0x08, 0x01, 0x02, 0x00, 0xe8, 0x0f, + 0x02, 0x00, 0x08, 0x01, 0x02, 0x00, 0x08, 0x01, 0x02, 0x00, 0x08, 0x01, + 0x02, 0x00, 0x08, 0x00, 0x02, 0x04, 0x08, 0x00, 0x02, 0x0c, 0x08, 0x00, + 0x02, 0x1c, 0x08, 0x00, 0x02, 0x3c, 0x08, 0x00, 0x02, 0x7c, 0x08, 0x00, + 0x02, 0xfc, 0x08, 0x00, 0x02, 0xfc, 0x09, 0x00, 0x02, 0xfc, 0x0b, 0x00, + 0x02, 0x7c, 0x08, 0x00, 0xfe, 0x6d, 0x0f, 0x00, 0x00, 0xc4, 0x00, 0x00, + 0x00, 0xc0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00}; + +static unsigned char dnd_copy_mask_bits[] = +{ + 0xff, 0xff, 0x1f, 0x00, 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f, + 0x07, 0x00, 0xfc, 0x1f, 0x07, 0x00, 0xfc, 0x1f, 0x07, 0x00, 0xfc, 0x1f, + 0x07, 0x00, 0xfc, 0x1f, 0x07, 0x00, 0xfc, 0x1f, 0x07, 0x00, 0xfc, 0x1f, + 0x07, 0x06, 0xfc, 0x1f, 0x07, 0x0e, 0xfc, 0x1f, 0x07, 0x1e, 0x1c, 0x00, + 0x07, 0x3e, 0x1c, 0x00, 0x07, 0x7e, 0x1c, 0x00, 0x07, 0xfe, 0x1c, 0x00, + 0x07, 0xfe, 0x1d, 0x00, 0x07, 0xfe, 0x1f, 0x00, 0x07, 0xfe, 0x1f, 0x00, + 0xff, 0xff, 0x1f, 0x00, 0xff, 0xff, 0x1e, 0x00, 0xff, 0xef, 0x1f, 0x00, + 0x00, 0xe6, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, + 0x00, 0x80, 0x01, 0x00}; + +static unsigned char dnd_move_cursor_bits[] = +{ + 0x00, 0x00, 0x00, 0xfe, 0xff, 0x0f, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, + 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, + 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x04, 0x08, 0x02, 0x0c, 0x08, + 0x02, 0x1c, 0x08, 0x02, 0x3c, 0x08, 0x02, 0x7c, 0x08, 0x02, 0xfc, 0x08, + 0x02, 0xfc, 0x09, 0x02, 0xfc, 0x0b, 0x02, 0x7c, 0x08, 0xfe, 0x6d, 0x0f, + 0x00, 0xc4, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x80, 0x01, 0x00, 0x80, 0x01, + 0x00, 0x00, 0x00}; + +static unsigned char dnd_move_mask_bits[] = +{ + 0xff, 0xff, 0x1f, 0xff, 0xff, 0x1f, 0xff, 0xff, 0x1f, 0x07, 0x00, 0x1c, + 0x07, 0x00, 0x1c, 0x07, 0x00, 0x1c, 0x07, 0x00, 0x1c, 0x07, 0x00, 0x1c, + 0x07, 0x00, 0x1c, 0x07, 0x06, 0x1c, 0x07, 0x0e, 0x1c, 0x07, 0x1e, 0x1c, + 0x07, 0x3e, 0x1c, 0x07, 0x7e, 0x1c, 0x07, 0xfe, 0x1c, 0x07, 0xfe, 0x1d, + 0x07, 0xfe, 0x1f, 0x07, 0xfe, 0x1f, 0xff, 0xff, 0x1f, 0xff, 0xff, 0x1e, + 0xff, 0xef, 0x1f, 0x00, 0xe6, 0x01, 0x00, 0xc0, 0x03, 0x00, 0xc0, 0x03, + 0x00, 0x80, 0x01}; + +static unsigned char dnd_link_cursor_bits[] = +{ + 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x0f, 0x00, 0x02, 0x00, 0x08, 0x01, + 0x02, 0x00, 0x88, 0x00, 0x02, 0x00, 0x48, 0x00, 0x02, 0x00, 0xe8, 0x0f, + 0x02, 0x00, 0x48, 0x00, 0x02, 0x00, 0x88, 0x00, 0x02, 0x00, 0x08, 0x01, + 0x02, 0x00, 0x08, 0x00, 0x02, 0x04, 0x08, 0x00, 0x02, 0x0c, 0x08, 0x00, + 0x02, 0x1c, 0x08, 0x00, 0x02, 0x3c, 0x08, 0x00, 0x02, 0x7c, 0x08, 0x00, + 0x02, 0xfc, 0x08, 0x00, 0x02, 0xfc, 0x09, 0x00, 0x02, 0xfc, 0x0b, 0x00, + 0x02, 0x7c, 0x08, 0x00, 0xfe, 0x6d, 0x0f, 0x00, 0x00, 0xc4, 0x00, 0x00, + 0x00, 0xc0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00}; + +static unsigned char dnd_link_mask_bits[] = +{ + 0xff, 0xff, 0x1f, 0x00, 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f, + 0x07, 0x00, 0xfc, 0x1f, 0x07, 0x00, 0xfc, 0x1f, 0x07, 0x00, 0xfc, 0x1f, + 0x07, 0x00, 0xfc, 0x1f, 0x07, 0x00, 0xfc, 0x1f, 0x07, 0x00, 0xfc, 0x1f, + 0x07, 0x06, 0xfc, 0x1f, 0x07, 0x0e, 0xfc, 0x1f, 0x07, 0x1e, 0x1c, 0x00, + 0x07, 0x3e, 0x1c, 0x00, 0x07, 0x7e, 0x1c, 0x00, 0x07, 0xfe, 0x1c, 0x00, + 0x07, 0xfe, 0x1d, 0x00, 0x07, 0xfe, 0x1f, 0x00, 0x07, 0xfe, 0x1f, 0x00, + 0xff, 0xff, 0x1f, 0x00, 0xff, 0xff, 0x1e, 0x00, 0xff, 0xef, 0x1f, 0x00, + 0x00, 0xe6, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, + 0x00, 0x80, 0x01, 0x00}; + +static unsigned char dnd_ask_cursor_bits[] = +{ + 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x0f, 0x00, 0x02, 0x00, 0x88, 0x03, + 0x02, 0x00, 0x48, 0x04, 0x02, 0x00, 0x08, 0x04, 0x02, 0x00, 0x08, 0x02, + 0x02, 0x00, 0x08, 0x01, 0x02, 0x00, 0x08, 0x01, 0x02, 0x00, 0x08, 0x00, + 0x02, 0x00, 0x08, 0x01, 0x02, 0x04, 0x08, 0x00, 0x02, 0x0c, 0x08, 0x00, + 0x02, 0x1c, 0x08, 0x00, 0x02, 0x3c, 0x08, 0x00, 0x02, 0x7c, 0x08, 0x00, + 0x02, 0xfc, 0x08, 0x00, 0x02, 0xfc, 0x09, 0x00, 0x02, 0xfc, 0x0b, 0x00, + 0x02, 0x7c, 0x08, 0x00, 0xfe, 0x6d, 0x0f, 0x00, 0x00, 0xc4, 0x00, 0x00, + 0x00, 0xc0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00}; + +static unsigned char dnd_ask_mask_bits[] = +{ + 0xff, 0xff, 0x1f, 0x00, 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f, + 0x07, 0x00, 0xfc, 0x1f, 0x07, 0x00, 0xfc, 0x1f, 0x07, 0x00, 0xfc, 0x1f, + 0x07, 0x00, 0xfc, 0x1f, 0x07, 0x00, 0xfc, 0x1f, 0x07, 0x00, 0xfc, 0x1f, + 0x07, 0x06, 0xfc, 0x1f, 0x07, 0x0e, 0xfc, 0x1f, 0x07, 0x1e, 0x1c, 0x00, + 0x07, 0x3e, 0x1c, 0x00, 0x07, 0x7e, 0x1c, 0x00, 0x07, 0xfe, 0x1c, 0x00, + 0x07, 0xfe, 0x1d, 0x00, 0x07, 0xfe, 0x1f, 0x00, 0x07, 0xfe, 0x1f, 0x00, + 0xff, 0xff, 0x1f, 0x00, 0xff, 0xff, 0x1e, 0x00, 0xff, 0xef, 0x1f, 0x00, + 0x00, 0xe6, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, + 0x00, 0x80, 0x01, 0x00}; + +static DndCursor dnd_cursors[] = +{ + {29, 25, 10, 10, dnd_copy_cursor_bits, dnd_copy_mask_bits, "XdndActionCopy", 0, 0, 0, 0}, + {21, 25, 10, 10, dnd_move_cursor_bits, dnd_move_mask_bits, "XdndActionMove", 0, 0, 0, 0}, + {29, 25, 10, 10, dnd_link_cursor_bits, dnd_link_mask_bits, "XdndActionLink", 0, 0, 0, 0}, + {29, 25, 10, 10, dnd_ask_cursor_bits, dnd_ask_mask_bits, "XdndActionAsk", 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0} +}; + +void xdnd_reset (DndClass * dnd) +{ + dnd->stage = XDND_DROP_STAGE_IDLE; + dnd->dragging_version = 0; + dnd->internal_drag = 0; + dnd->want_position = 0; + dnd->ready_to_drop = 0; + dnd->will_accept = 0; + dnd->rectangle.x = dnd->rectangle.y = 0; + dnd->rectangle.width = dnd->rectangle.height = 0; + dnd->dropper_window = 0; + dnd->dropper_toplevel = 0; + dnd->dragger_window = 0; + dnd->dragger_typelist = 0; + dnd->desired_type = 0; + dnd->time = 0; +} + +void xdnd_init (DndClass * dnd, Display * display) +{ + DndCursor *cursor; + XColor black, white; + memset (dnd, 0, sizeof (*dnd)); + + dnd->display = display; + dnd->root_window = DefaultRootWindow (display); + dnd->version = XDND_VERSION; + + dnd->XdndAware = XInternAtom (dnd->display, "XdndAware", False); + dnd->XdndSelection = XInternAtom (dnd->display, "XdndSelection", False); + dnd->XdndEnter = XInternAtom (dnd->display, "XdndEnter", False); + dnd->XdndLeave = XInternAtom (dnd->display, "XdndLeave", False); + dnd->XdndPosition = XInternAtom (dnd->display, "XdndPosition", False); + dnd->XdndDrop = XInternAtom (dnd->display, "XdndDrop", False); + dnd->XdndFinished = XInternAtom (dnd->display, "XdndFinished", False); + dnd->XdndStatus = XInternAtom (dnd->display, "XdndStatus", False); + dnd->XdndActionCopy = XInternAtom (dnd->display, "XdndActionCopy", False); + dnd->XdndActionMove = XInternAtom (dnd->display, "XdndActionMove", False); + dnd->XdndActionLink = XInternAtom (dnd->display, "XdndActionLink", False); + dnd->XdndActionAsk = XInternAtom (dnd->display, "XdndActionAsk", False); + dnd->XdndActionPrivate = XInternAtom (dnd->display, "XdndActionPrivate", False); + dnd->XdndTypeList = XInternAtom (dnd->display, "XdndTypeList", False); + dnd->XdndActionList = XInternAtom (dnd->display, "XdndActionList", False); + dnd->XdndActionDescription = XInternAtom (dnd->display, "XdndActionDescription", False); + + dnd->Xdnd_NON_PROTOCOL_ATOM = XInternAtom (dnd->display, "JXSelectionWindowProperty", False); + + xdnd_reset (dnd); + + dnd->cursors = dnd_cursors; + + black.pixel = BlackPixel (dnd->display, DefaultScreen (dnd->display)); + white.pixel = WhitePixel (dnd->display, DefaultScreen (dnd->display)); + + XQueryColor (dnd->display, DefaultColormap (dnd->display, DefaultScreen (dnd->display)), &black); + XQueryColor (dnd->display, DefaultColormap (dnd->display, DefaultScreen (dnd->display)), &white); + + for (cursor = &dnd->cursors[0]; cursor->width; cursor++) { + cursor->image_pixmap = XCreateBitmapFromData \ + (dnd->display, dnd->root_window, (char *) cursor->image_data, cursor->width, cursor->height); + cursor->mask_pixmap = XCreateBitmapFromData \ + (dnd->display, dnd->root_window, (char *) cursor->mask_data, cursor->width, cursor->height); + cursor->cursor = XCreatePixmapCursor (dnd->display, cursor->image_pixmap, + cursor->mask_pixmap, &black, &white, cursor->x, cursor->y); + XFreePixmap (dnd->display, cursor->image_pixmap); + XFreePixmap (dnd->display, cursor->mask_pixmap); + cursor->action = XInternAtom (dnd->display, cursor->_action, False); + } +} + +void xdnd_shut (DndClass * dnd) +{ + DndCursor *cursor; + for (cursor = &dnd->cursors[0]; cursor->width; cursor++) + XFreeCursor (dnd->display, cursor->cursor); + memset (dnd, 0, sizeof (*dnd)); + return; +} + + +/* typelist is a null terminated array */ +static int array_length (Atom * a) +{ + int n; + for (n = 0; a[n]; n++); + return n; +} + +void xdnd_set_dnd_aware (DndClass * dnd, Window window, Atom * typelist) +{ + Window root_return, parent; + unsigned int nchildren_return; + Window *children_return = 0; + int r, s; + if(!window) return; + if (dnd->widget_exists) + if (!(*dnd->widget_exists) (dnd, window)) + return; + s = XChangeProperty (dnd->display, window, dnd->XdndAware, XA_ATOM, 32, PropModeReplace, + (unsigned char *) &dnd->version, 1); +#if 1 + dnd_debug4 ("XChangeProperty() = %d, window = %ld, widget = %s", s, window, ""); +#endif + if (s && typelist) { + int n; + n = array_length (typelist); + if (n) + s = XChangeProperty (dnd->display, window, dnd->XdndAware, XA_ATOM, 32, PropModeAppend, + (unsigned char *) typelist, n); + } + r = + XQueryTree (dnd->display, window, &root_return, &parent, &children_return, + &nchildren_return); + if (children_return) + XFree (children_return); + if (r) + xdnd_set_dnd_aware (dnd, parent, typelist); +} + +int xdnd_is_dnd_aware (DndClass * dnd, Window window, int *version, Atom * typelist) +{ + Atom actual; + int format; + unsigned long count, remaining; + unsigned char *data = 0; + Atom *types, *t; + int result = 1; + + *version = 0; + XGetWindowProperty (dnd->display, window, dnd->XdndAware, + 0, 0x8000000L, False, XA_ATOM, + &actual, &format, + &count, &remaining, &data); + + if (actual != XA_ATOM || format != 32 || count == 0 || !data) { + dnd_debug2 ("XGetWindowProperty failed in xdnd_is_dnd_aware - XdndAware = %ld", dnd->XdndAware); + if (data) + XFree (data); + return 0; + } + types = (Atom *) data; +#if XDND_VERSION >= 3 + if (types[0] < 3) { + if (data) + XFree (data); + return 0; + } +#endif + *version = dnd->version < types[0] ? dnd->version : types[0]; /* minimum */ + dnd_debug2 ("Using XDND version %d", *version); + if (count > 1) { + result = 0; + for (t = typelist; *t; t++) { + int j; + for (j = 1; j < count; j++) { + if (types[j] == *t) { + result = 1; + break; + } + } + if (result) + break; + } + } + XFree (data); + return result; +} + +void xdnd_set_type_list (DndClass * dnd, Window window, Atom * typelist) +{ + int n; + n = array_length (typelist); + XChangeProperty (dnd->display, window, dnd->XdndTypeList, XA_ATOM, 32, + PropModeReplace, (unsigned char *) typelist, n); +} + +/* result must be free'd */ +void xdnd_get_type_list (DndClass * dnd, Window window, Atom ** typelist) +{ + Atom type, *a; + int format, i; + unsigned long count, remaining; + unsigned char *data = NULL; + + *typelist = 0; + + XGetWindowProperty (dnd->display, window, dnd->XdndTypeList, + 0, 0x8000000L, False, XA_ATOM, + &type, &format, &count, &remaining, &data); + + if (type != XA_ATOM || format != 32 || count == 0 || !data) { + if (data) + XFree (data); + dnd_debug2 ("XGetWindowProperty failed in xdnd_get_type_list - dnd->XdndTypeList = %ld", dnd->XdndTypeList); + return; + } + *typelist = malloc ((count + 1) * sizeof (Atom)); + a = (Atom *) data; + for (i = 0; i < count; i++) + (*typelist)[i] = a[i]; + (*typelist)[count] = 0; + + XFree (data); +} + +void xdnd_get_three_types (DndClass * dnd, XEvent * xevent, Atom ** typelist) +{ + int i; + *typelist = malloc ((XDND_THREE + 1) * sizeof (Atom)); + for (i = 0; i < XDND_THREE; i++) + (*typelist)[i] = XDND_ENTER_TYPE (xevent, i); + (*typelist)[XDND_THREE] = 0; /* although (*typelist)[1] or (*typelist)[2] may also be set to nill */ +} + +/* result must be free'd */ +static char *concat_string_list (char **t, int *bytes) +{ + int l, n; + char *s; + for (l = n = 0;; n++) { + if (!t[n]) + break; + if (!t[n][0]) + break; + l += strlen (t[n]) + 1; + } + s = malloc (l + 1); + for (l = n = 0;; n++) { + if (!t[n]) + break; + if (!(t[n][0])) + break; + strcpy (s + l, t[n]); + l += strlen (t[n]) + 1; + } + *bytes = l; + s[l] = '\0'; + return s; +} + +void xdnd_set_actions (DndClass * dnd, Window window, Atom * actions, char **descriptions) +{ + int n, l; + char *s; + n = array_length (actions); + + XChangeProperty (dnd->display, window, dnd->XdndActionList, XA_ATOM, 32, + PropModeReplace, (unsigned char *) actions, n); + + s = concat_string_list (descriptions, &l); + XChangeProperty (dnd->display, window, dnd->XdndActionList, XA_STRING, 8, + PropModeReplace, (unsigned char *) s, l); + xdnd_xfree (s); +} + +/* returns 1 on error or no actions, otherwise result must be free'd + xdnd_get_actions (window, &actions, &descriptions); + free (actions); free (descriptions); */ +int xdnd_get_actions (DndClass * dnd, Window window, Atom ** actions, char ***descriptions) +{ + Atom type, *a; + int format, i; + unsigned long count, dcount, remaining; + unsigned char *data = 0, *r; + + *actions = 0; + *descriptions = 0; + XGetWindowProperty (dnd->display, window, dnd->XdndActionList, + 0, 0x8000000L, False, XA_ATOM, + &type, &format, &count, &remaining, &data); + + if (type != XA_ATOM || format != 32 || count == 0 || !data) { + if (data) + XFree (data); + return 1; + } + *actions = malloc ((count + 1) * sizeof (Atom)); + a = (Atom *) data; + for (i = 0; i < count; i++) + (*actions)[i] = a[i]; + (*actions)[count] = 0; + + XFree (data); + + data = 0; + XGetWindowProperty (dnd->display, window, dnd->XdndActionDescription, + 0, 0x8000000L, False, XA_STRING, &type, &format, + &dcount, &remaining, &data); + + if (type != XA_STRING || format != 8 || dcount == 0) { + if (data) + XFree (data); + *descriptions = malloc ((count + 1) * sizeof (char *)); + dnd_warning ("XGetWindowProperty no property or wrong format for action descriptions"); + for (i = 0; i < count; i++) + (*descriptions)[i] = ""; + (*descriptions)[count] = 0; + } else { + int l; + l = (count + 1) * sizeof (char *); + *descriptions = malloc (l + dcount); + memcpy (*descriptions + l, data, dcount); + XFree (data); + data = (unsigned char *) *descriptions; + data += l; + l = 0; + for (i = 0, r = data;; r += l + 1, i++) { + l = strlen ((char *) r); + if (!l || i >= count) + break; + (*descriptions)[i] = (char *) r; + } + for (; i < count; i++) { + (*descriptions)[i] = ""; + } + (*descriptions)[count] = 0; + } + return 0; +} + +/* returns non-zero on cancel */ +int xdnd_choose_action_dialog (DndClass * dnd, Atom * actions, char **descriptions, Atom * result) +{ + if (!actions[0]) + return 1; + if (!dnd->action_choose_dialog) { /* default to return the first action if no dialog set */ + *result = actions[0]; + return 0; + } + return (*dnd->action_choose_dialog) (dnd, descriptions, actions, result); +} + +static void xdnd_send_event (DndClass * dnd, Window window, XEvent * xevent) +{ + dnd_debug4 ("xdnd_send_event(), window = %ld, l[0] = %ld, l[4] = %ld", + window, xevent->xclient.data.l[0], xevent->xclient.data.l[4]); + dnd_debug2 ("xdnd_send_event(), from widget widget %s", (char *) ""); + XSendEvent (dnd->display, window, 0, 0, xevent); +} + +static void xdnd_send_enter (DndClass * dnd, Window window, Window from, Atom * typelist) +{ + XEvent xevent; + int n, i; + n = array_length (typelist); + + memset (&xevent, 0, sizeof (xevent)); + + xevent.xany.type = ClientMessage; + xevent.xany.display = dnd->display; + xevent.xclient.window = window; + xevent.xclient.message_type = dnd->XdndEnter; + xevent.xclient.format = 32; + + XDND_ENTER_SOURCE_WIN (&xevent) = from; + XDND_ENTER_THREE_TYPES_SET (&xevent, n > XDND_THREE); + XDND_ENTER_VERSION_SET (&xevent, dnd->version); + for (i = 0; i < n && i < XDND_THREE; i++) + XDND_ENTER_TYPE (&xevent, i) = typelist[i]; + xdnd_send_event (dnd, window, &xevent); +} + +static void xdnd_send_position (DndClass * dnd, Window window, Window from, Atom action, int x, int y, unsigned long time) +{ + XEvent xevent; + + memset (&xevent, 0, sizeof (xevent)); + + xevent.xany.type = ClientMessage; + xevent.xany.display = dnd->display; + xevent.xclient.window = window; + xevent.xclient.message_type = dnd->XdndPosition; + xevent.xclient.format = 32; + + XDND_POSITION_SOURCE_WIN (&xevent) = from; + XDND_POSITION_ROOT_SET (&xevent, x, y); + if (dnd_version_at_least (dnd->dragging_version, 1)) + XDND_POSITION_TIME (&xevent) = time; + if (dnd_version_at_least (dnd->dragging_version, 2)) + XDND_POSITION_ACTION (&xevent) = action; + + xdnd_send_event (dnd, window, &xevent); +} + +static void xdnd_send_status (DndClass * dnd, Window window, Window from, int will_accept, \ + int want_position, int x, int y, int w, int h, Atom action) +{ + XEvent xevent; + + memset (&xevent, 0, sizeof (xevent)); + + xevent.xany.type = ClientMessage; + xevent.xany.display = dnd->display; + xevent.xclient.window = window; + xevent.xclient.message_type = dnd->XdndStatus; + xevent.xclient.format = 32; + + XDND_STATUS_TARGET_WIN (&xevent) = from; + XDND_STATUS_WILL_ACCEPT_SET (&xevent, will_accept); + if (will_accept) + XDND_STATUS_WANT_POSITION_SET (&xevent, want_position); + if (want_position) + XDND_STATUS_RECT_SET (&xevent, x, y, w, h); + if (dnd_version_at_least (dnd->dragging_version, 2)) + if (will_accept) + XDND_STATUS_ACTION (&xevent) = action; + + xdnd_send_event (dnd, window, &xevent); +} + +static void xdnd_send_leave (DndClass * dnd, Window window, Window from) +{ + XEvent xevent; + + memset (&xevent, 0, sizeof (xevent)); + + xevent.xany.type = ClientMessage; + xevent.xany.display = dnd->display; + xevent.xclient.window = window; + xevent.xclient.message_type = dnd->XdndLeave; + xevent.xclient.format = 32; + + XDND_LEAVE_SOURCE_WIN (&xevent) = from; + + xdnd_send_event (dnd, window, &xevent); +} + +static void xdnd_send_drop (DndClass * dnd, Window window, Window from, unsigned long time) +{ + XEvent xevent; + + memset (&xevent, 0, sizeof (xevent)); + + xevent.xany.type = ClientMessage; + xevent.xany.display = dnd->display; + xevent.xclient.window = window; + xevent.xclient.message_type = dnd->XdndDrop; + xevent.xclient.format = 32; + + XDND_DROP_SOURCE_WIN (&xevent) = from; + if (dnd_version_at_least (dnd->dragging_version, 1)) + XDND_DROP_TIME (&xevent) = time; + + xdnd_send_event (dnd, window, &xevent); +} + +/* error is not actually used, i think future versions of the protocol should return an error status + to the calling window with the XdndFinished client message */ +static void xdnd_send_finished (DndClass * dnd, Window window, Window from, int error) +{ + XEvent xevent; + + memset (&xevent, 0, sizeof (xevent)); + + xevent.xany.type = ClientMessage; + xevent.xany.display = dnd->display; + xevent.xclient.window = window; + xevent.xclient.message_type = dnd->XdndFinished; + xevent.xclient.format = 32; + + XDND_FINISHED_TARGET_WIN (&xevent) = from; + + xdnd_send_event (dnd, window, &xevent); +} + +/* returns non-zero on error - i.e. no selection owner set. Type is of course the mime type */ +static int xdnd_convert_selection (DndClass * dnd, Window window, Window requester, Atom type) +{ + if (!(window = XGetSelectionOwner (dnd->display, dnd->XdndSelection))) { + dnd_debug1 ("xdnd_convert_selection(): XGetSelectionOwner failed"); + return 1; + } + XConvertSelection (dnd->display, dnd->XdndSelection, type, + dnd->Xdnd_NON_PROTOCOL_ATOM, requester, CurrentTime); + return 0; +} + +/* returns non-zero on error */ +static int xdnd_set_selection_owner (DndClass * dnd, Window window, Atom type, Time time) +{ + if (!XSetSelectionOwner (dnd->display, dnd->XdndSelection, window, time)) { + dnd_debug1 ("xdnd_set_selection_owner(): XSetSelectionOwner failed"); + return 1; + } + return 0; +} + +static void xdnd_selection_send (DndClass * dnd, XSelectionRequestEvent * request, unsigned char *data, int length) +{ + XEvent xevent; + dnd_debug2 (" requestor = %ld", request->requestor); + dnd_debug2 (" property = %ld", request->property); + dnd_debug2 (" length = %d", length); + XChangeProperty (dnd->display, request->requestor, request->property, + request->target, 8, PropModeReplace, data, length); + xevent.xselection.type = SelectionNotify; + xevent.xselection.property = request->property; + xevent.xselection.display = request->display; + xevent.xselection.requestor = request->requestor; + xevent.xselection.selection = request->selection; + xevent.xselection.target = request->target; + xevent.xselection.time = request->time; + xdnd_send_event (dnd, request->requestor, &xevent); +} + +#if 0 +/* respond to a notification that a primary selection has been sent */ +int xdnd_get_selection (DndClass * dnd, Window from, Atom property, Window insert) +{ + long read; + int error = 0; + unsigned long remaining; + if (!property) + return 1; + read = 0; + do { + unsigned char *s; + Atom actual; + int format; + unsigned long count; + if (XGetWindowProperty (dnd->display, insert, property, read / 4, 65536, 1, + AnyPropertyType, &actual, &format, + &count, &remaining, + &s) != Success) { + XFree (s); + return 1; + } + read += count; + if (dnd->widget_insert_drop && !error) + error = (*dnd->widget_insert_drop) (dnd, s, count, remaining, insert, from, actual); + XFree (s); + } while (remaining); + return error; +} +#endif + +static int paste_prop_internal (DndClass * dnd, Window from, Window insert, unsigned long prop, int delete_prop) +{ + long nread = 0; + unsigned long nitems; + unsigned long bytes_after; + int error = 0; + do { + Atom actual_type; + int actual_fmt; + unsigned char *s = 0; + if (XGetWindowProperty (dnd->display, insert, prop, + nread / 4, 65536, delete_prop, + AnyPropertyType, &actual_type, &actual_fmt, + &nitems, &bytes_after, &s) != Success) { + XFree (s); + return 1; + } + nread += nitems; + if (dnd->widget_insert_drop && !error) + error = (*dnd->widget_insert_drop) (dnd, s, nitems, bytes_after, insert, from, actual_fmt); + XFree (s); + } while (bytes_after); + if (!nread) + return 1; + return 0; +} + +/* + * Respond to a notification that a primary selection has been sent (supports INCR) + */ +static int xdnd_get_selection (DndClass * dnd, Window from, Atom prop, Window insert) +{ + struct timeval tv, tv_start; + unsigned long bytes_after; + Atom actual_type; + int actual_fmt; + unsigned long nitems; + unsigned char *s = 0; + if (prop == None) + return 1; + if (XGetWindowProperty + (dnd->display, insert, prop, 0, 8, False, AnyPropertyType, &actual_type, &actual_fmt, + &nitems, &bytes_after, &s) != Success) { + XFree (s); + return 1; + } + XFree (s); + if (actual_type != XInternAtom (dnd->display, "INCR", False)) + return paste_prop_internal (dnd, from, insert, prop, True); + XDeleteProperty (dnd->display, insert, prop); + gettimeofday (&tv_start, 0); + for (;;) { + long t; + fd_set r; + XEvent xe; + if (XCheckMaskEvent (dnd->display, PropertyChangeMask, &xe)) { + if (xe.type == PropertyNotify && xe.xproperty.state == PropertyNewValue) { +/* time between arrivals of data */ + gettimeofday (&tv_start, 0); + if (paste_prop_internal (dnd, from, insert, prop, True)) + break; + } + } else { + tv.tv_sec = 0; + tv.tv_usec = 10000; + FD_ZERO (&r); + FD_SET (ConnectionNumber (dnd->display), &r); + select (ConnectionNumber (dnd->display) + 1, &r, 0, 0, &tv); + if (FD_ISSET (ConnectionNumber (dnd->display), &r)) + continue; + } + gettimeofday (&tv, 0); + t = (tv.tv_sec - tv_start.tv_sec) * 1000000L + (tv.tv_usec - tv_start.tv_usec); +/* no data for five seconds, so quit */ + if (t > 5000000L) + return 1; + } + return 0; +} + + +int outside_rectangle (int x, int y, XRectangle * r) +{ + return (x < r->x || y < r->y || x >= r->x + r->width || y >= r->y + r->height); +} + +/* avoids linking with the maths library */ +static float xdnd_sqrt (float x) +{ + float last_ans, ans = 2, a; + if (x <= 0.0) + return 0.0; + do { + last_ans = ans; + ans = (ans + x / ans) / 2; + a = (ans - last_ans) / ans; + if (a < 0.0) + a = (-a); + } while (a > 0.001); + return ans; +} + +#define print_marks print_win_marks(from,__FILE__,__LINE__); + +/* returns action on success, 0 otherwise */ +Atom xdnd_drag (DndClass * dnd, Window from, Atom action, Atom * typelist) +{ + XEvent xevent, xevent_temp; + Window over_window = 0, last_window = 0; +#if XDND_VERSION >= 3 + Window last_dropper_toplevel = 0; + int internal_dropable = 1; +#endif + int n; + DndCursor *cursor; + float x_mouse, y_mouse; + int result = 0, dnd_aware; + + if (!typelist) + dnd_warning ("xdnd_drag() called with typelist = 0"); + +/* first wait until the mouse moves more than five pixels */ + do { + XNextEvent (dnd->display, &xevent); + if (xevent.type == ButtonRelease) { + dnd_debug1 ("button release - no motion"); + XSendEvent (dnd->display, xevent.xany.window, 0, ButtonReleaseMask, &xevent); + return 0; + } + } while (xevent.type != MotionNotify); + + x_mouse = (float) xevent.xmotion.x_root; + y_mouse = (float) xevent.xmotion.y_root; + + if (!dnd->drag_threshold) + dnd->drag_threshold = 4.0; + for (;;) { + XNextEvent (dnd->display, &xevent); + if (xevent.type == MotionNotify) + if (xdnd_sqrt ((x_mouse - xevent.xmotion.x_root) * (x_mouse - xevent.xmotion.x_root) + + (y_mouse - xevent.xmotion.y_root) * (y_mouse - xevent.xmotion.y_root)) > dnd->drag_threshold) + break; + if (xevent.type == ButtonRelease) { + XSendEvent (dnd->display, xevent.xany.window, 0, ButtonReleaseMask, &xevent); + return 0; + } + } + + dnd_debug1 ("moved 5 pixels - going to drag"); + + n = array_length (typelist); + if (n > XDND_THREE) + xdnd_set_type_list (dnd, from, typelist); + + xdnd_reset (dnd); + + dnd->stage = XDND_DRAG_STAGE_DRAGGING; + + for (cursor = &dnd->cursors[0]; cursor->width; cursor++) + if (cursor->action == action) + break; + if (!cursor->width) + cursor = &dnd->cursors[0]; + +/* the mouse has been dragged a little, so this is a drag proper */ + if (XGrabPointer (dnd->display, dnd->root_window, False, + ButtonMotionMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask, + GrabModeAsync, GrabModeAsync, None, + cursor->cursor, CurrentTime) != GrabSuccess) + dnd_debug1 ("Unable to grab pointer"); + + + while (xevent.xany.type != ButtonRelease) { + XAllowEvents (dnd->display, SyncPointer, CurrentTime); + XNextEvent (dnd->display, &xevent); + switch (xevent.type) { + case Expose: + if (dnd->handle_expose_events) + (*dnd->handle_expose_events) (dnd, &xevent); + break; + case EnterNotify: +/* this event is not actually reported, so we find out by ourselves from motion events */ + break; + case LeaveNotify: +/* this event is not actually reported, so we find out by ourselves from motion events */ + break; + case ButtonRelease: +/* done, but must send a leave event */ + dnd_debug1 ("ButtonRelease - exiting event loop"); + break; + case MotionNotify: + dnd_aware = 0; + dnd->dropper_toplevel = 0; + memcpy (&xevent_temp, &xevent, sizeof (xevent)); + xevent.xmotion.subwindow = xevent.xmotion.window; + { + Window root_return, child_return; + int x_temp, y_temp; + unsigned int mask_return; + while (XQueryPointer (dnd->display, xevent.xmotion.subwindow, &root_return, &child_return, + &x_temp, &y_temp, &xevent.xmotion.x, + &xevent.xmotion.y, &mask_return)) { +#if XDND_VERSION >= 3 + if (!dnd_aware) { + if ((dnd_aware = xdnd_is_dnd_aware (dnd, xevent.xmotion.subwindow, &dnd->dragging_version, typelist))) { + dnd->dropper_toplevel = xevent.xmotion.subwindow; + xevent.xmotion.x_root = x_temp; + xevent.xmotion.y_root = y_temp; + } + } +#else + xevent.xmotion.x_root = x_temp; + xevent.xmotion.y_root = y_temp; +#endif + if (!child_return) + goto found_descendent; + xevent.xmotion.subwindow = child_return; + } + break; + } + found_descendent: + +/* last_window is just for debug purposes */ + if (last_window != xevent.xmotion.subwindow) { + dnd_debug2 ("window crossing to %ld", xevent.xmotion.subwindow); + dnd_debug2 (" current window is %ld", over_window); + dnd_debug3 (" last_window = %ld, xmotion.subwindow = %ld", last_window, xevent.xmotion.subwindow); +#if XDND_VERSION >= 3 + dnd_debug3 (" dropper_toplevel = %ld, last_dropper_toplevel.subwindow = %ld", dnd->dropper_toplevel, last_dropper_toplevel); +#endif + dnd_debug3 (" dnd_aware = %d, dnd->options & XDND_OPTION_NO_HYSTERESIS = %ld", dnd_aware, (long) dnd->options & XDND_OPTION_NO_HYSTERESIS); + } + +#if XDND_VERSION < 3 +/* is the new window dnd aware? if not stay in the old window */ + if (over_window != xevent.xmotion.subwindow && + last_window != xevent.xmotion.subwindow && + ( + (dnd_aware = xdnd_is_dnd_aware (dnd, xevent.xmotion.subwindow, &dnd->dragging_version, typelist)) + || + (dnd->options & XDND_OPTION_NO_HYSTERESIS) + )) +#else + internal_dropable = 1; + if (dnd->widget_exists && (*dnd->widget_exists) (dnd, xevent.xmotion.subwindow)) + if (!xdnd_is_dnd_aware (dnd, xevent.xmotion.subwindow, &dnd->dragging_version, typelist)) + internal_dropable = 0; + dnd_debug3 ("dnd->dropper_toplevel = %ld, last_dropper_toplevel = %ld\n", dnd->dropper_toplevel, last_dropper_toplevel); + if ((dnd->dropper_toplevel != last_dropper_toplevel || + last_window != xevent.xmotion.subwindow) && internal_dropable && + ( + (dnd_aware) + || + (dnd->options & XDND_OPTION_NO_HYSTERESIS) + )) +#endif + { +/* leaving window we were over */ + if (over_window) { + if (dnd->stage == XDND_DRAG_STAGE_ENTERED) { + dnd_debug1 ("got leave at right stage"); + dnd->stage = XDND_DRAG_STAGE_DRAGGING; + if (dnd->internal_drag) { + dnd_debug1 (" our own widget"); + if (dnd->widget_apply_leave) + (*dnd->widget_apply_leave) (dnd, over_window); + } else { + dnd_debug1 (" not our widget - sending XdndLeave"); +#if XDND_VERSION < 3 + xdnd_send_leave (dnd, over_window, from); +#else + if (dnd->dropper_toplevel != last_dropper_toplevel) { + xdnd_send_leave (dnd, last_dropper_toplevel, from); + } else { + dnd_debug1 (" not sending leave --> dnd->dropper_toplevel == last_dropper_toplevel"); + } +#endif + } + dnd->internal_drag = 0; + dnd->dropper_window = 0; + dnd->ready_to_drop = 0; + } else { + dnd_debug1 ("got leave at wrong stage - ignoring"); + } + } +/* entering window we are currently over */ + over_window = xevent.xmotion.subwindow; + if (dnd_aware) { + dnd_debug1 (" is dnd aware"); + dnd->stage = XDND_DRAG_STAGE_ENTERED; + if (dnd->widget_exists && (*dnd->widget_exists) (dnd, over_window)) + dnd->internal_drag = 1; + if (dnd->internal_drag) { + dnd_debug1 (" our own widget"); + } else { + dnd_debug2 (" not our widget - sending XdndEnter to %ld", over_window); +#if XDND_VERSION < 3 + xdnd_send_enter (dnd, over_window, from, typelist); +#else + if (dnd->dropper_toplevel != last_dropper_toplevel) + xdnd_send_enter (dnd, dnd->dropper_toplevel, from, typelist); +#endif + } + dnd->want_position = 1; + dnd->ready_to_drop = 0; + dnd->rectangle.width = dnd->rectangle.height = 0; + dnd->dropper_window = over_window; +/* we want an additional motion event in case the pointer enters and then stops */ + XSendEvent (dnd->display, from, 0, ButtonMotionMask, &xevent_temp); + XSync (dnd->display, 0); + } +#if XDND_VERSION >= 3 + last_dropper_toplevel = dnd->dropper_toplevel; +#endif +/* we are now officially in a new window */ + } else { +/* got here, so we are just moving `inside' the same window */ + if (dnd->stage == XDND_DRAG_STAGE_ENTERED) { + dnd->supported_action = dnd->XdndActionCopy; + dnd_debug1 ("got motion at right stage"); + dnd->x = xevent.xmotion.x_root; + dnd->y = xevent.xmotion.y_root; + if (dnd->want_position || outside_rectangle (dnd->x, dnd->y, &dnd->rectangle)) { + dnd_debug1 (" want position and outside rectangle"); + if (dnd->internal_drag) { + dnd_debug1 (" our own widget"); + dnd->ready_to_drop = (*dnd->widget_apply_position) (dnd, over_window, from, + action, dnd->x, dnd->y, xevent.xmotion.time, typelist, + &dnd->want_position, &dnd->supported_action, &dnd->desired_type, &dnd->rectangle); + /* if not ready, keep sending positions, this check is repeated below for XdndStatus from external widgets */ + if (!dnd->ready_to_drop) { + dnd->want_position = 1; + dnd->rectangle.width = dnd->rectangle.height = 0; + } + dnd_debug2 (" return action=%ld", dnd->supported_action); + } else { +#if XDND_VERSION < 3 + dnd_debug3 (" not our own widget - sending XdndPosition to %ld, action %ld", over_window, action); + xdnd_send_position (dnd, over_window, from, action, dnd->x, dnd->y, xevent.xmotion.time); +#else + dnd_debug3 (" not our own widget - sending XdndPosition to %ld, action %ld", dnd->dropper_toplevel, action); + xdnd_send_position (dnd, dnd->dropper_toplevel, from, action, dnd->x, dnd->y, xevent.xmotion.time); +#endif + } + } else if (dnd->want_position) { + dnd_debug1 (" inside rectangle"); + } else { + dnd_debug1 (" doesn't want position"); + } + } + } + last_window = xevent.xmotion.subwindow; + break; + case ClientMessage: + dnd_debug1 ("ClientMessage recieved"); + if (xevent.xclient.message_type == dnd->XdndStatus && !dnd->internal_drag) { + dnd_debug1 (" XdndStatus recieved"); + if (dnd->stage == XDND_DRAG_STAGE_ENTERED +#if XDND_VERSION < 3 + && XDND_STATUS_TARGET_WIN (&xevent) == dnd->dropper_window +#endif + ) { + dnd_debug1 (" XdndStatus stage correct, dropper window correct"); + dnd->want_position = XDND_STATUS_WANT_POSITION (&xevent); + dnd->ready_to_drop = XDND_STATUS_WILL_ACCEPT (&xevent); + dnd->rectangle.x = XDND_STATUS_RECT_X (&xevent); + dnd->rectangle.y = XDND_STATUS_RECT_Y (&xevent); + dnd->rectangle.width = XDND_STATUS_RECT_WIDTH (&xevent); + dnd->rectangle.height = XDND_STATUS_RECT_HEIGHT (&xevent); + dnd->supported_action = dnd->XdndActionCopy; + if (dnd_version_at_least (dnd->dragging_version, 2)) + dnd->supported_action = XDND_STATUS_ACTION (&xevent); + dnd_debug3 (" return action=%ld, ready=%d", dnd->supported_action, dnd->ready_to_drop); + /* if not ready, keep sending positions, this check is repeated above for internal widgets */ + if (!dnd->ready_to_drop) { + dnd->want_position = 1; + dnd->rectangle.width = dnd->rectangle.height = 0; + } + dnd_debug3 (" rectangle = (x=%d, y=%d, ", dnd->rectangle.x, dnd->rectangle.y); + dnd_debug4 ("w=%d, h=%d), want_position=%d\n", dnd->rectangle.width, dnd->rectangle.height, dnd->want_position); + } +#if XDND_VERSION < 3 + else if (XDND_STATUS_TARGET_WIN (&xevent) != dnd->dropper_window) { + dnd_debug3 (" XdndStatus XDND_STATUS_TARGET_WIN (&xevent) = %ld, dnd->dropper_window = %ld", XDND_STATUS_TARGET_WIN (&xevent), dnd->dropper_window); + } +#endif + else { + dnd_debug2 (" XdndStatus stage incorrect dnd->stage = %d", dnd->stage); + } + } + break; + case SelectionRequest:{ +/* the target widget MAY request data, so wait for SelectionRequest */ + int length = 0; + unsigned char *data = 0; + dnd_debug1 ("SelectionRequest - getting widget data"); + + (*dnd->widget_get_data) (dnd, from, &data, &length, xevent.xselectionrequest.target); + if (data) { + dnd_debug1 (" sending selection"); + xdnd_selection_send (dnd, &xevent.xselectionrequest, data, length); + xdnd_xfree (data); + } + } + break; + } + } + + if (dnd->ready_to_drop) { + Time time; + dnd_debug1 ("ready_to_drop - sending XdndDrop"); + time = xevent.xbutton.time; + if (dnd->internal_drag) { +/* we are dealing with our own widget, no need to send drop events, just put the data straight */ + int length = 0; + unsigned char *data = 0; + if (dnd->widget_insert_drop) { + (*dnd->widget_get_data) (dnd, from, &data, &length, dnd->desired_type); + if (data) { + if (!(*dnd->widget_insert_drop) (dnd, data, length, 0, dnd->dropper_window, from, dnd->desired_type)) { + result = dnd->supported_action; /* success - so return action to caller */ + dnd_debug1 (" inserted data into widget - success"); + } else { + dnd_debug1 (" inserted data into widget - failed"); + } + xdnd_xfree (data); + } else { + dnd_debug1 (" got data from widget, but data is null"); + } + } + } else { + xdnd_set_selection_owner (dnd, from, dnd->desired_type, time); +#if XDND_VERSION < 3 + xdnd_send_drop (dnd, dnd->dropper_window, from, time); +#else + xdnd_send_drop (dnd, dnd->dropper_toplevel, from, time); +#endif + } + if (!dnd->internal_drag) + for (;;) { + XAllowEvents (dnd->display, SyncPointer, CurrentTime); + XNextEvent (dnd->display, &xevent); + if (xevent.type == ClientMessage && xevent.xclient.message_type == dnd->XdndFinished) { + dnd_debug1 ("XdndFinished"); +#if XDND_VERSION < 3 + if (XDND_FINISHED_TARGET_WIN (&xevent) == dnd->dropper_window) { +#endif + dnd_debug2 (" source correct - exiting event loop, action=%ld", dnd->supported_action); + result = dnd->supported_action; /* success - so return action to caller */ + break; +#if XDND_VERSION < 3 + } +#endif + } else if (xevent.type == Expose) { + if (dnd->handle_expose_events) + (*dnd->handle_expose_events) (dnd, &xevent); + } else if (xevent.type == MotionNotify) { + if (xevent.xmotion.time > time + (dnd->time_out ? dnd->time_out * 1000 : 10000)) { /* allow a ten second timeout as default */ + dnd_debug1 ("timeout - exiting event loop"); + break; + } + } else if (xevent.type == SelectionRequest && xevent.xselectionrequest.selection == dnd->XdndSelection) { +/* the target widget is going to request data, so check for SelectionRequest events */ + int length = 0; + unsigned char *data = 0; + + dnd_debug1 ("SelectionRequest - getting widget data"); + (*dnd->widget_get_data) (dnd, from, &data, &length, xevent.xselectionrequest.target); + if (data) { + dnd_debug1 (" sending selection"); + xdnd_selection_send (dnd, &xevent.xselectionrequest, data, length); + xdnd_xfree (data); + } +/* don't wait for a XdndFinished event */ + if (!dnd_version_at_least (dnd->dragging_version, 2)) + break; + } + } + } else { + dnd_debug1 ("not ready_to_drop - ungrabbing pointer"); + } + XUngrabPointer (dnd->display, CurrentTime); + xdnd_reset (dnd); + return result; +} + +/* returns non-zero if event is handled */ +int xdnd_handle_drop_events (DndClass * dnd, XEvent * xevent) +{ + int result = 0; + if (xevent->type == SelectionNotify) { + dnd_debug1 ("got SelectionNotify"); + if (xevent->xselection.property == dnd->Xdnd_NON_PROTOCOL_ATOM && dnd->stage == XDND_DROP_STAGE_CONVERTING) { + int error; + dnd_debug1 (" property is Xdnd_NON_PROTOCOL_ATOM - getting selection"); + error = xdnd_get_selection (dnd, dnd->dragger_window, xevent->xselection.property, xevent->xany.window); +/* error is not actually used, i think future versions of the protocol maybe should return + an error status to the calling window with the XdndFinished client message */ + if (dnd_version_at_least (dnd->dragging_version, 2)) { +#if XDND_VERSION >= 3 + xdnd_send_finished (dnd, dnd->dragger_window, dnd->dropper_toplevel, error); +#else + xdnd_send_finished (dnd, dnd->dragger_window, dnd->dropper_window, error); +#endif + dnd_debug1 (" sending finished"); + } + xdnd_xfree (dnd->dragger_typelist); + xdnd_reset (dnd); + dnd->stage = XDND_DROP_STAGE_IDLE; + result = 1; + } else { + dnd_debug1 (" property is not Xdnd_NON_PROTOCOL_ATOM - ignoring"); + } + } else if (xevent->type == ClientMessage) { + dnd_debug2 ("got ClientMessage to xevent->xany.window = %ld", xevent->xany.window); + if (xevent->xclient.message_type == dnd->XdndEnter) { + dnd_debug2 (" message_type is XdndEnter, version = %ld", XDND_ENTER_VERSION (xevent)); +#if XDND_VERSION >= 3 + if (XDND_ENTER_VERSION (xevent) < 3) + return 0; +#endif + xdnd_reset (dnd); + dnd->dragger_window = XDND_ENTER_SOURCE_WIN (xevent); +#if XDND_VERSION >= 3 + dnd->dropper_toplevel = xevent->xany.window; + dnd->dropper_window = 0; /* enter goes to the top level window only, + so we don't really know what the + sub window is yet */ +#else + dnd->dropper_window = xevent->xany.window; +#endif + xdnd_xfree (dnd->dragger_typelist); + if (XDND_ENTER_THREE_TYPES (xevent)) { + dnd_debug1 (" three types only"); + xdnd_get_three_types (dnd, xevent, &dnd->dragger_typelist); + } else { + dnd_debug1 (" more than three types - getting list"); + xdnd_get_type_list (dnd, dnd->dragger_window, &dnd->dragger_typelist); + } + if (dnd->dragger_typelist) + dnd->stage = XDND_DROP_STAGE_ENTERED; + else + dnd_debug1 (" typelist returned as zero!"); + dnd->dragging_version = XDND_ENTER_VERSION (xevent); + result = 1; + } else if (xevent->xclient.message_type == dnd->XdndLeave) { +#if XDND_VERSION >= 3 + if (xevent->xany.window == dnd->dropper_toplevel && dnd->dropper_window) + xevent->xany.window = dnd->dropper_window; +#endif + dnd_debug1 (" message_type is XdndLeave"); + if (dnd->dragger_window == XDND_LEAVE_SOURCE_WIN (xevent) && dnd->stage == XDND_DROP_STAGE_ENTERED) { + dnd_debug1 (" leaving"); + if (dnd->widget_apply_leave) + (*dnd->widget_apply_leave) (dnd, xevent->xany.window); + dnd->stage = XDND_DROP_STAGE_IDLE; + xdnd_xfree (dnd->dragger_typelist); + result = 1; + dnd->dropper_toplevel = dnd->dropper_window = 0; + } else { + dnd_debug1 (" wrong stage or from wrong window"); + } + } else if (xevent->xclient.message_type == dnd->XdndPosition) { + dnd_debug2 (" message_type is XdndPosition to %ld", xevent->xany.window); + if (dnd->dragger_window == XDND_POSITION_SOURCE_WIN (xevent) && dnd->stage == XDND_DROP_STAGE_ENTERED) { + int want_position; + Atom action; + XRectangle rectangle; + Window last_window; + last_window = dnd->dropper_window; +#if XDND_VERSION >= 3 +/* version 3 gives us the top-level window only. WE have to find the child that the pointer is over: */ + if (1 || xevent->xany.window != dnd->dropper_toplevel || !dnd->dropper_window) { + Window parent, child, new_child = 0; + dnd->dropper_toplevel = xevent->xany.window; + parent = dnd->root_window; + child = dnd->dropper_toplevel; + for (;;) { + int xd, yd; + new_child = 0; + if (!XTranslateCoordinates (dnd->display, parent, child, + XDND_POSITION_ROOT_X (xevent), XDND_POSITION_ROOT_Y (xevent), + &xd, &yd, &new_child)) + break; + if (!new_child) + break; + child = new_child; + } + dnd->dropper_window = xevent->xany.window = child; + dnd_debug2 (" child window translates to %ld", dnd->dropper_window); + } else if (xevent->xany.window == dnd->dropper_toplevel && dnd->dropper_window) { + xevent->xany.window = dnd->dropper_window; + dnd_debug2 (" child window previously found: %ld", dnd->dropper_window); + } +#endif + action = dnd->XdndActionCopy; + dnd->supported_action = dnd->XdndActionCopy; + dnd->x = XDND_POSITION_ROOT_X (xevent); + dnd->y = XDND_POSITION_ROOT_Y (xevent); + dnd->time = CurrentTime; + if (dnd_version_at_least (dnd->dragging_version, 1)) + dnd->time = XDND_POSITION_TIME (xevent); + if (dnd_version_at_least (dnd->dragging_version, 1)) + action = XDND_POSITION_ACTION (xevent); +#if XDND_VERSION >= 3 + if (last_window && last_window != xevent->xany.window) + if (dnd->widget_apply_leave) + (*dnd->widget_apply_leave) (dnd, last_window); +#endif + dnd->will_accept = (*dnd->widget_apply_position) (dnd, xevent->xany.window, dnd->dragger_window, + action, dnd->x, dnd->y, dnd->time, dnd->dragger_typelist, + &want_position, &dnd->supported_action, &dnd->desired_type, &rectangle); + dnd_debug2 (" will accept = %d", dnd->will_accept); +#if XDND_VERSION >= 3 + dnd_debug2 (" sending status of %ld", dnd->dropper_toplevel); + xdnd_send_status (dnd, dnd->dragger_window, dnd->dropper_toplevel, dnd->will_accept, + want_position, rectangle.x, rectangle.y, rectangle.width, rectangle.height, dnd->supported_action); +#else + dnd_debug2 (" sending status of %ld", xevent->xany.window); + xdnd_send_status (dnd, dnd->dragger_window, xevent->xany.window, dnd->will_accept, + want_position, rectangle.x, rectangle.y, rectangle.width, rectangle.height, dnd->supported_action); +#endif + result = 1; + } else { + dnd_debug1 (" wrong stage or from wrong window"); + } + } else if (xevent->xclient.message_type == dnd->XdndDrop) { +#if XDND_VERSION >= 3 + if (xevent->xany.window == dnd->dropper_toplevel && dnd->dropper_window) + xevent->xany.window = dnd->dropper_window; +#endif + dnd_debug1 (" message_type is XdndDrop"); + if (dnd->dragger_window == XDND_DROP_SOURCE_WIN (xevent) && dnd->stage == XDND_DROP_STAGE_ENTERED) { + dnd->time = CurrentTime; + if (dnd_version_at_least (dnd->dragging_version, 1)) + dnd->time = XDND_DROP_TIME (xevent); + if (dnd->will_accept) { + dnd_debug1 (" will_accept is true - converting selectiong"); + dnd_debug2 (" my window is %ld", dnd->dropper_window); + dnd_debug2 (" source window is %ld", dnd->dragger_window); + xdnd_convert_selection (dnd, dnd->dragger_window, dnd->dropper_window, dnd->desired_type); + dnd->stage = XDND_DROP_STAGE_CONVERTING; + } else { + dnd_debug1 (" will_accept is false - sending finished"); + if (dnd_version_at_least (dnd->dragging_version, 2)) { +#if XDND_VERSION >= 3 + xdnd_send_finished (dnd, dnd->dragger_window, dnd->dropper_toplevel, 1); +#else + xdnd_send_finished (dnd, dnd->dragger_window, xevent->xany.window, 1); +#endif + } + xdnd_xfree (dnd->dragger_typelist); + xdnd_reset (dnd); + dnd->stage = XDND_DROP_STAGE_IDLE; + } + result = 1; + } else { + dnd_debug1 (" wrong stage or from wrong window"); + } + } + } + return result; +} + +/* + Following here is a sample implementation: Suppose we want a window + to recieve drops, but do not want to be concerned with setting up all + the DndClass methods. All we then do is call xdnd_get_drop() whenever a + ClientMessage is recieved. If the message has nothing to do with XDND, + xdnd_get_drop quickly returns 0. If it is a XdndEnter message, then + xdnd_get_drop enters its own XNextEvent loop and handles all XDND + protocol messages internally, returning the action requested. + + You should pass a desired typelist and actionlist to xdnd_get_type. + These must be null terminated arrays of atoms, or a null pointer + if you would like any action or type to be accepted. If typelist + is null then the first type of the dragging widgets typelist will + be the one used. If actionlist is null, then only XdndActionCopy will + be accepted. + + The result is stored in *data, length, type, x and y. + *data must be free'd. + */ + +struct xdnd_get_drop_info { + unsigned char *drop_data; + int drop_data_length; + int x, y; + Atom return_type; + Atom return_action; + Atom *typelist; + Atom *actionlist; +}; + +static int widget_insert_drop (DndClass * dnd, unsigned char *data, int length, int remaining, Window into, Window from, Atom type) +{ + struct xdnd_get_drop_info *i; + i = (struct xdnd_get_drop_info *) dnd->user_hook1; + if (!i->drop_data) { + i->drop_data = malloc (length); + if (!i->drop_data) + return 1; + memcpy (i->drop_data, data, length); + i->drop_data_length = length; + } else { + unsigned char *t; + t = malloc (i->drop_data_length + length); + if (!t) { + free (i->drop_data); + i->drop_data = 0; + return 1; + } + memcpy (t, i->drop_data, i->drop_data_length); + memcpy (t + i->drop_data_length, data, length); + free (i->drop_data); + i->drop_data = t; + i->drop_data_length += length; + } + return 0; +} + +static int widget_apply_position (DndClass * dnd, Window widgets_window, Window from, + Atom action, int x, int y, Time t, Atom * typelist, + int *want_position, Atom * supported_action_return, Atom * desired_type, + XRectangle * rectangle) +{ + int i, j; + struct xdnd_get_drop_info *info; + Atom *dropper_typelist, supported_type = 0; + Atom *supported_actions, supported_action = 0; + + info = (struct xdnd_get_drop_info *) dnd->user_hook1; + dropper_typelist = info->typelist; + supported_actions = info->actionlist; + + if (dropper_typelist) { +/* find a correlation: */ + for (j = 0; dropper_typelist[j]; j++) { + for (i = 0; typelist[i]; i++) { + if (typelist[i] == dropper_typelist[j]) { + supported_type = typelist[i]; + break; + } + } + if (supported_type) + break; + } + } else { +/* user did not specify, so return first type */ + supported_type = typelist[0]; + } +/* not supported, so return false */ + if (!supported_type) + return 0; + + if (supported_actions) { + for (j = 0; supported_actions[j]; j++) { + if (action == supported_actions[j]) { + supported_action = action; + break; + } + } + } else { +/* user did not specify */ + if (action == dnd->XdndActionCopy) + supported_action = action; + } + if (!supported_action) + return 0; + + *want_position = 1; + rectangle->x = rectangle->y = 0; + rectangle->width = rectangle->height = 0; + + info->return_action = *supported_action_return = supported_action; + info->return_type = *desired_type = supported_type; + info->x = x; + info->y = y; + + return 1; +} + +Atom xdnd_get_drop (Display * display, XEvent * xevent, Atom * typelist, Atom * actionlist, + unsigned char **data, int *length, Atom * type, int *x, int *y) +{ + Atom action = 0; + static int initialised = 0; + static DndClass dnd; + if (!initialised) { + xdnd_init (&dnd, display); + initialised = 1; + } + if (xevent->type != ClientMessage || xevent->xclient.message_type != dnd.XdndEnter) { + return 0; + } else { + struct xdnd_get_drop_info i; + +/* setup user structure */ + memset (&i, 0, sizeof (i)); + i.actionlist = actionlist; + i.typelist = typelist; + dnd.user_hook1 = &i; + +/* setup methods */ + dnd.widget_insert_drop = widget_insert_drop; + dnd.widget_apply_position = widget_apply_position; + +/* main loop */ + for (;;) { + xdnd_handle_drop_events (&dnd, xevent); + if (dnd.stage == XDND_DROP_STAGE_IDLE) + break; + XNextEvent (dnd.display, xevent); + } + +/* return results */ + if (i.drop_data) { + *length = i.drop_data_length; + *data = i.drop_data; + action = i.return_action; + *type = i.return_type; + *x = i.x; + *y = i.y; + } + } + return action; +} + + diff --git a/extern/xdnd/xdnd.h b/extern/xdnd/xdnd.h new file mode 100644 index 00000000000..c903b51c8d0 --- /dev/null +++ b/extern/xdnd/xdnd.h @@ -0,0 +1,221 @@ +/* xdnd.c, xdnd.h - C program library for handling the Xdnd protocol + Copyright (C) 1996-2000 Paul Sheer + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + */ + +#ifndef _X_DND_H +#define _X_DND_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* you can set this to either 2 (which support 0 and 1 as well) or 3 */ +/* #define XDND_VERSION 2 */ +#define XDND_VERSION 3 + + +/* XdndEnter */ +#define XDND_THREE 3 +#define XDND_ENTER_SOURCE_WIN(e) ((e)->xclient.data.l[0]) +#define XDND_ENTER_THREE_TYPES(e) (((e)->xclient.data.l[1] & 0x1UL) == 0) +#define XDND_ENTER_THREE_TYPES_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x1UL) | (((b) == 0) ? 0 : 0x1UL) +#define XDND_ENTER_VERSION(e) ((e)->xclient.data.l[1] >> 24) +#define XDND_ENTER_VERSION_SET(e,v) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~(0xFF << 24)) | ((v) << 24) +#define XDND_ENTER_TYPE(e,i) ((e)->xclient.data.l[2 + i]) /* i => (0, 1, 2) */ + +/* XdndPosition */ +#define XDND_POSITION_SOURCE_WIN(e) ((e)->xclient.data.l[0]) +#define XDND_POSITION_ROOT_X(e) ((e)->xclient.data.l[2] >> 16) +#define XDND_POSITION_ROOT_Y(e) ((e)->xclient.data.l[2] & 0xFFFFUL) +#define XDND_POSITION_ROOT_SET(e,x,y) (e)->xclient.data.l[2] = ((x) << 16) | ((y) & 0xFFFFUL) +#define XDND_POSITION_TIME(e) ((e)->xclient.data.l[3]) +#define XDND_POSITION_ACTION(e) ((e)->xclient.data.l[4]) + +/* XdndStatus */ +#define XDND_STATUS_TARGET_WIN(e) ((e)->xclient.data.l[0]) +#define XDND_STATUS_WILL_ACCEPT(e) ((e)->xclient.data.l[1] & 0x1L) +#define XDND_STATUS_WILL_ACCEPT_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x1UL) | (((b) == 0) ? 0 : 0x1UL) +#define XDND_STATUS_WANT_POSITION(e) ((e)->xclient.data.l[1] & 0x2UL) +#define XDND_STATUS_WANT_POSITION_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x2UL) | (((b) == 0) ? 0 : 0x2UL) +#define XDND_STATUS_RECT_X(e) ((e)->xclient.data.l[2] >> 16) +#define XDND_STATUS_RECT_Y(e) ((e)->xclient.data.l[2] & 0xFFFFL) +#define XDND_STATUS_RECT_WIDTH(e) ((e)->xclient.data.l[3] >> 16) +#define XDND_STATUS_RECT_HEIGHT(e) ((e)->xclient.data.l[3] & 0xFFFFL) +#define XDND_STATUS_RECT_SET(e,x,y,w,h) {(e)->xclient.data.l[2] = ((x) << 16) | ((y) & 0xFFFFUL); (e)->xclient.data.l[3] = ((w) << 16) | ((h) & 0xFFFFUL); } +#define XDND_STATUS_ACTION(e) ((e)->xclient.data.l[4]) + +/* XdndLeave */ +#define XDND_LEAVE_SOURCE_WIN(e) ((e)->xclient.data.l[0]) + +/* XdndDrop */ +#define XDND_DROP_SOURCE_WIN(e) ((e)->xclient.data.l[0]) +#define XDND_DROP_TIME(e) ((e)->xclient.data.l[2]) + +/* XdndFinished */ +#define XDND_FINISHED_TARGET_WIN(e) ((e)->xclient.data.l[0]) + +struct _DndCursor { + int width, height; + int x, y; + unsigned char *image_data, *mask_data; + char *_action; + Pixmap image_pixmap, mask_pixmap; + Cursor cursor; + Atom action; +}; + +typedef struct _DndCursor DndCursor; +typedef struct _DndClass DndClass; + +struct _DndClass { +/* insert chars sequentionally into the target widget, type will be the same as `desired_type' + returned from widget_apply_position. This may be called several times in succession + with sequention blocks of data. Must return non-zero on failure */ + int (*widget_insert_drop) (DndClass * dnd, unsigned char *data, int length, int remaining, Window into, Window from, Atom type); + +/* In response to DELETE requests : FIXME - not yet used */ + int (*widget_delete_selection) (DndClass * dnd, Window window, Window from); + +/* returns 1 if widget exists, zero otherwise. If this method is not + set then the code assumes that no widgets have support for recieving drops. + In this case none of the widget methods need be set. */ + int (*widget_exists) (DndClass * dnd, Window window); + +/* must update the widgets border to its default appearance */ + void (*widget_apply_leave) (DndClass * dnd, Window widgets_window); + +/* must update the widgets border to give the appearance of being able to recieve a drop, + plus return all data to pointers. As per the protocol, if the widget cannot + perform the action specified by `action' then it should return either XdndActionPrivate + or XdndActionCopy into supported_action (leaving 0 supported_action unchanged is equivalent + to XdndActionCopy). Returns 1 if ready to ok drop */ + int (*widget_apply_position) (DndClass * dnd, Window widgets_window, Window from, + Atom action, int x, int y, Time t, Atom * typelist, + int *want_position, Atom * supported_action, Atom * desired_type, + XRectangle * rectangle); + +/* returns drag data of the specified type. This will be one of `typelist' given to xdnd_drag */ + void (*widget_get_data) (DndClass * dnd, Window window, unsigned char **data, int *length, Atom type); + +/* this is called from with the main event loop if an expose event is recieved and is optional */ + void (*handle_expose_events) (DndClass * dnd, XEvent * xevent); + +/* creates a chooser dialog if the action is XdndActionAsk. Returns non-zero on cancel */ + int (*action_choose_dialog) (DndClass * dnd, char **descriptions, Atom * actions, Atom * result); + +#if 0 /* implemented internally */ +/* returns a widget that is dnd aware within a parent widget that lies under the point x, y */ + Window (*widget_get_child_widget) (DndClass * dnd, Window parent, int x, int y); +#endif + + void *pad1[8]; + + DndCursor *cursors; + + Display *display; + + Atom XdndAware; + Atom XdndSelection; + Atom XdndEnter; + Atom XdndLeave; + Atom XdndPosition; + Atom XdndDrop; + Atom XdndFinished; + Atom XdndStatus; + Atom XdndActionCopy; + Atom XdndActionMove; + Atom XdndActionLink; + Atom XdndActionAsk; + Atom XdndActionPrivate; + Atom XdndTypeList; + Atom XdndActionList; + Atom XdndActionDescription; + + Atom Xdnd_NON_PROTOCOL_ATOM; + Atom version; + + Atom pad2[16]; + + Window root_window; + +#define XDND_DROP_STAGE_IDLE 0 +#define XDND_DRAG_STAGE_DRAGGING 1 +#define XDND_DRAG_STAGE_ENTERED 2 +#define XDND_DROP_STAGE_CONVERTING 3 +#define XDND_DROP_STAGE_ENTERED 4 + int stage; + int dragging_version; + int internal_drag; + int want_position; + int ready_to_drop; + int will_accept; + XRectangle rectangle; + Window dropper_window, dragger_window; + Atom *dragger_typelist; + Atom desired_type; + Atom supported_action; + Time time; +/* drop position from last XdndPosition */ + int x, y; + int pad3[16]; + +/* move euclidian pixels before considering this to be an actual drag */ + float drag_threshold; + +/* block for only this many seconds on not receiving a XdndFinished from target, default : 10 */ + int time_out; + +#define XDND_OPTION_NO_HYSTERESIS (1<<0) + int options; + +/* user hooks */ + void *user_hook1; + void *user_hook2; + void *user_hook3; + Window dropper_toplevel; + void *pad4[15]; +}; + + +void xdnd_init (DndClass * dnd, Display * display); +void xdnd_shut (DndClass * dnd); +/* for nested widgets where parent and child receive drops of different +types; then always pass typelist as null */ +void xdnd_set_dnd_aware (DndClass * dnd, Window window, Atom * typelist); +int xdnd_is_dnd_aware (DndClass * dnd, Window window, int *version, Atom * typelist); +void xdnd_set_type_list (DndClass * dnd, Window window, Atom * typelist); +void xdnd_set_actions (DndClass * dnd, Window window, Atom * actions, char **descriptions); +int xdnd_get_actions (DndClass * dnd, Window window, Atom ** actions, char ***descriptions); +int xdnd_choose_action_dialog (DndClass * dnd, Atom * actions, char **descriptions, Atom * result); +Atom xdnd_drag (DndClass * dnd, Window from, Atom action, Atom * typelist); + +/* Returns 1 if event is handled, This must be placed in the widget +libraries main event loop and be called if the event type is +ClientMessage or SelectionNotify */ +int xdnd_handle_drop_events (DndClass * dnd, XEvent * xevent); +Atom xdnd_get_drop (Display * display, XEvent * xevent, Atom * typelist, Atom * actionlist, + unsigned char **data, int *length, Atom * type, int *x, int *y); + + +#ifdef __cplusplus +} +#endif + +#endif /* !_X_DND_H */ + + diff --git a/intern/audaspace/FX/AUD_AccumulatorFactory.h b/intern/audaspace/FX/AUD_AccumulatorFactory.h index d49d8f71c05..ac73c5aa6ae 100644 --- a/intern/audaspace/FX/AUD_AccumulatorFactory.h +++ b/intern/audaspace/FX/AUD_AccumulatorFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_ACCUMULATORFACTORY -#define AUD_ACCUMULATORFACTORY +#ifndef __AUD_ACCUMULATORFACTORY_H__ +#define __AUD_ACCUMULATORFACTORY_H__ #include "AUD_EffectFactory.h" class AUD_CallbackIIRFilterReader; @@ -66,4 +66,4 @@ public: static sample_t accumulatorFilter(AUD_CallbackIIRFilterReader* reader, void* useless); }; -#endif //AUD_ACCUMULATORFACTORY +#endif //__AUD_ACCUMULATORFACTORY_H__ diff --git a/intern/audaspace/FX/AUD_BaseIIRFilterReader.h b/intern/audaspace/FX/AUD_BaseIIRFilterReader.h index 5b37f83ddee..43970c96a42 100644 --- a/intern/audaspace/FX/AUD_BaseIIRFilterReader.h +++ b/intern/audaspace/FX/AUD_BaseIIRFilterReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_BASEIIRFILTERREADER -#define AUD_BASEIIRFILTERREADER +#ifndef __AUD_BASEIIRFILTERREADER_H__ +#define __AUD_BASEIIRFILTERREADER_H__ #include "AUD_EffectReader.h" #include "AUD_Buffer.h" @@ -132,4 +132,4 @@ public: virtual void sampleRateChanged(AUD_SampleRate rate); }; -#endif //AUD_BASEIIRFILTERREADER +#endif //__AUD_BASEIIRFILTERREADER_H__ diff --git a/intern/audaspace/FX/AUD_ButterworthFactory.h b/intern/audaspace/FX/AUD_ButterworthFactory.h index aa302e7e82a..d3606270154 100644 --- a/intern/audaspace/FX/AUD_ButterworthFactory.h +++ b/intern/audaspace/FX/AUD_ButterworthFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_BUTTERWORTHFACTORY -#define AUD_BUTTERWORTHFACTORY +#ifndef __AUD_BUTTERWORTHFACTORY_H__ +#define __AUD_BUTTERWORTHFACTORY_H__ #include "AUD_DynamicIIRFilterFactory.h" @@ -60,4 +60,4 @@ public: std::vector& a); }; -#endif //AUD_BUTTERWORTHFACTORY +#endif //__AUD_BUTTERWORTHFACTORY_H__ diff --git a/intern/audaspace/FX/AUD_CallbackIIRFilterReader.h b/intern/audaspace/FX/AUD_CallbackIIRFilterReader.h index 787fd49b600..7ced73844c9 100644 --- a/intern/audaspace/FX/AUD_CallbackIIRFilterReader.h +++ b/intern/audaspace/FX/AUD_CallbackIIRFilterReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_CALLBACKIIRFILTERREADER -#define AUD_CALLBACKIIRFILTERREADER +#ifndef __AUD_CALLBACKIIRFILTERREADER_H__ +#define __AUD_CALLBACKIIRFILTERREADER_H__ #include "AUD_BaseIIRFilterReader.h" #include "AUD_Buffer.h" @@ -84,4 +84,4 @@ public: virtual sample_t filter(); }; -#endif //AUD_CALLBACKIIRFILTERREADER +#endif //__AUD_CALLBACKIIRFILTERREADER_H__ diff --git a/intern/audaspace/FX/AUD_DelayFactory.h b/intern/audaspace/FX/AUD_DelayFactory.h index c1b114638f6..26855a05d70 100644 --- a/intern/audaspace/FX/AUD_DelayFactory.h +++ b/intern/audaspace/FX/AUD_DelayFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_DELAYFACTORY -#define AUD_DELAYFACTORY +#ifndef __AUD_DELAYFACTORY_H__ +#define __AUD_DELAYFACTORY_H__ #include "AUD_EffectFactory.h" @@ -63,4 +63,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_DELAYFACTORY +#endif //__AUD_DELAYFACTORY_H__ diff --git a/intern/audaspace/FX/AUD_DelayReader.h b/intern/audaspace/FX/AUD_DelayReader.h index b23bb1438d1..9d9b6619470 100644 --- a/intern/audaspace/FX/AUD_DelayReader.h +++ b/intern/audaspace/FX/AUD_DelayReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_DELAYREADER -#define AUD_DELAYREADER +#ifndef __AUD_DELAYREADER_H__ +#define __AUD_DELAYREADER_H__ #include "AUD_EffectReader.h" #include "AUD_Buffer.h" @@ -67,4 +67,4 @@ public: virtual void read(int& length, bool& eos, sample_t* buffer); }; -#endif //AUD_DELAYREADER +#endif //__AUD_DELAYREADER_H__ diff --git a/intern/audaspace/FX/AUD_DoubleFactory.h b/intern/audaspace/FX/AUD_DoubleFactory.h index 990c605b2fb..e4d8fbfde8f 100644 --- a/intern/audaspace/FX/AUD_DoubleFactory.h +++ b/intern/audaspace/FX/AUD_DoubleFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_DOUBLEFACTORY -#define AUD_DOUBLEFACTORY +#ifndef __AUD_DOUBLEFACTORY_H__ +#define __AUD_DOUBLEFACTORY_H__ #include "AUD_IFactory.h" @@ -63,4 +63,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_DOUBLEFACTORY +#endif //__AUD_DOUBLEFACTORY_H__ diff --git a/intern/audaspace/FX/AUD_DoubleReader.h b/intern/audaspace/FX/AUD_DoubleReader.h index 4c82d4f85ca..1489f4eb184 100644 --- a/intern/audaspace/FX/AUD_DoubleReader.h +++ b/intern/audaspace/FX/AUD_DoubleReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_DOUBLEREADER -#define AUD_DOUBLEREADER +#ifndef __AUD_DOUBLEREADER_H__ +#define __AUD_DOUBLEREADER_H__ #include "AUD_IReader.h" #include "AUD_Buffer.h" @@ -80,4 +80,4 @@ public: virtual void read(int& length, bool& eos, sample_t* buffer); }; -#endif //AUD_DOUBLEREADER +#endif //__AUD_DOUBLEREADER_H__ diff --git a/intern/audaspace/FX/AUD_DynamicIIRFilterFactory.h b/intern/audaspace/FX/AUD_DynamicIIRFilterFactory.h index 2b63e275f0e..fef379f68b1 100644 --- a/intern/audaspace/FX/AUD_DynamicIIRFilterFactory.h +++ b/intern/audaspace/FX/AUD_DynamicIIRFilterFactory.h @@ -26,8 +26,8 @@ * \ingroup audfx */ -#ifndef AUD_DYNAMICIIRFILTERFACTORY -#define AUD_DYNAMICIIRFILTERFACTORY +#ifndef __AUD_DYNAMICIIRFILTERFACTORY_H__ +#define __AUD_DYNAMICIIRFILTERFACTORY_H__ #include "AUD_EffectFactory.h" #include @@ -60,4 +60,4 @@ public: std::vector& a)=0; }; -#endif // AUD_DYNAMICIIRFILTERFACTORY +#endif // __AUD_DYNAMICIIRFILTERFACTORY_H__ diff --git a/intern/audaspace/FX/AUD_DynamicIIRFilterReader.h b/intern/audaspace/FX/AUD_DynamicIIRFilterReader.h index 843cf120011..8a53c15b18f 100644 --- a/intern/audaspace/FX/AUD_DynamicIIRFilterReader.h +++ b/intern/audaspace/FX/AUD_DynamicIIRFilterReader.h @@ -26,8 +26,8 @@ * \ingroup audfx */ -#ifndef AUD_DYNAMICIIRFILTERREADER -#define AUD_DYNAMICIIRFILTERREADER +#ifndef __AUD_DYNAMICIIRFILTERREADER_H__ +#define __AUD_DYNAMICIIRFILTERREADER_H__ #include "AUD_IIRFilterReader.h" #include "AUD_DynamicIIRFilterFactory.h" @@ -51,4 +51,4 @@ public: virtual void sampleRateChanged(AUD_SampleRate rate); }; -#endif // AUD_DYNAMICIIRFILTERREADER +#endif // __AUD_DYNAMICIIRFILTERREADER_H__ diff --git a/intern/audaspace/FX/AUD_EffectFactory.h b/intern/audaspace/FX/AUD_EffectFactory.h index 26d66634d7d..c8d26a1daa7 100644 --- a/intern/audaspace/FX/AUD_EffectFactory.h +++ b/intern/audaspace/FX/AUD_EffectFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_EFFECTFACTORY -#define AUD_EFFECTFACTORY +#ifndef __AUD_EFFECTFACTORY_H__ +#define __AUD_EFFECTFACTORY_H__ #include "AUD_IFactory.h" @@ -79,4 +79,4 @@ public: AUD_Reference getFactory() const; }; -#endif //AUD_EFFECTFACTORY +#endif //__AUD_EFFECTFACTORY_H__ diff --git a/intern/audaspace/FX/AUD_EffectReader.h b/intern/audaspace/FX/AUD_EffectReader.h index 707031c55ad..b089ec9a318 100644 --- a/intern/audaspace/FX/AUD_EffectReader.h +++ b/intern/audaspace/FX/AUD_EffectReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_EFFECTREADER -#define AUD_EFFECTREADER +#ifndef __AUD_EFFECTREADER_H__ +#define __AUD_EFFECTREADER_H__ #include "AUD_IReader.h" #include "AUD_Reference.h" @@ -70,4 +70,4 @@ public: virtual void read(int& length, bool& eos, sample_t* buffer); }; -#endif //AUD_EFFECTREADER +#endif //__AUD_EFFECTREADER_H__ diff --git a/intern/audaspace/FX/AUD_EnvelopeFactory.h b/intern/audaspace/FX/AUD_EnvelopeFactory.h index 81038f15560..c8f3dc37cd2 100644 --- a/intern/audaspace/FX/AUD_EnvelopeFactory.h +++ b/intern/audaspace/FX/AUD_EnvelopeFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_ENVELOPEFACTORY -#define AUD_ENVELOPEFACTORY +#ifndef __AUD_ENVELOPEFACTORY_H__ +#define __AUD_ENVELOPEFACTORY_H__ #include "AUD_EffectFactory.h" class AUD_CallbackIIRFilterReader; @@ -82,4 +82,4 @@ public: static void endEnvelopeFilter(EnvelopeParameters* param); }; -#endif //AUD_ENVELOPEFACTORY +#endif //__AUD_ENVELOPEFACTORY_H__ diff --git a/intern/audaspace/FX/AUD_FaderFactory.h b/intern/audaspace/FX/AUD_FaderFactory.h index 7a8954d9e48..8fcd4baa623 100644 --- a/intern/audaspace/FX/AUD_FaderFactory.h +++ b/intern/audaspace/FX/AUD_FaderFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_FADERFACTORY -#define AUD_FADERFACTORY +#ifndef __AUD_FADERFACTORY_H__ +#define __AUD_FADERFACTORY_H__ #include "AUD_EffectFactory.h" @@ -89,4 +89,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_FADERFACTORY +#endif //__AUD_FADERFACTORY_H__ diff --git a/intern/audaspace/FX/AUD_FaderReader.h b/intern/audaspace/FX/AUD_FaderReader.h index 9cad72618ef..788e8539228 100644 --- a/intern/audaspace/FX/AUD_FaderReader.h +++ b/intern/audaspace/FX/AUD_FaderReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_FADERREADER -#define AUD_FADERREADER +#ifndef __AUD_FADERREADER_H__ +#define __AUD_FADERREADER_H__ #include "AUD_EffectReader.h" #include "AUD_Buffer.h" @@ -73,4 +73,4 @@ public: virtual void read(int& length, bool& eos, sample_t* buffer); }; -#endif //AUD_FADERREADER +#endif //__AUD_FADERREADER_H__ diff --git a/intern/audaspace/FX/AUD_HighpassFactory.h b/intern/audaspace/FX/AUD_HighpassFactory.h index c9d8a0b017a..66aa8091234 100644 --- a/intern/audaspace/FX/AUD_HighpassFactory.h +++ b/intern/audaspace/FX/AUD_HighpassFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_HIGHPASSFACTORY -#define AUD_HIGHPASSFACTORY +#ifndef __AUD_HIGHPASSFACTORY_H__ +#define __AUD_HIGHPASSFACTORY_H__ #include "AUD_DynamicIIRFilterFactory.h" @@ -64,4 +64,4 @@ public: virtual void recalculateCoefficients(AUD_SampleRate rate, std::vector &b, std::vector &a); }; -#endif //AUD_HIGHPASSFACTORY +#endif //__AUD_HIGHPASSFACTORY_H__ diff --git a/intern/audaspace/FX/AUD_IIRFilterFactory.h b/intern/audaspace/FX/AUD_IIRFilterFactory.h index 0b98f34f748..43256a166aa 100644 --- a/intern/audaspace/FX/AUD_IIRFilterFactory.h +++ b/intern/audaspace/FX/AUD_IIRFilterFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_IIRFILTERFACTORY -#define AUD_IIRFILTERFACTORY +#ifndef __AUD_IIRFILTERFACTORY_H__ +#define __AUD_IIRFILTERFACTORY_H__ #include "AUD_EffectFactory.h" @@ -67,4 +67,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_IIRFILTERFACTORY +#endif //__AUD_IIRFILTERFACTORY_H__ diff --git a/intern/audaspace/FX/AUD_IIRFilterReader.h b/intern/audaspace/FX/AUD_IIRFilterReader.h index 01a41385715..d9be52f2919 100644 --- a/intern/audaspace/FX/AUD_IIRFilterReader.h +++ b/intern/audaspace/FX/AUD_IIRFilterReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_IIRFILTERREADER -#define AUD_IIRFILTERREADER +#ifndef __AUD_IIRFILTERREADER_H__ +#define __AUD_IIRFILTERREADER_H__ #include "AUD_BaseIIRFilterReader.h" @@ -70,4 +70,4 @@ public: const std::vector& a); }; -#endif //AUD_IIRFILTERREADER +#endif //__AUD_IIRFILTERREADER_H__ diff --git a/intern/audaspace/FX/AUD_LimiterFactory.h b/intern/audaspace/FX/AUD_LimiterFactory.h index 7128c6d7334..ddc8183ce7a 100644 --- a/intern/audaspace/FX/AUD_LimiterFactory.h +++ b/intern/audaspace/FX/AUD_LimiterFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_LIMITERFACTORY -#define AUD_LIMITERFACTORY +#ifndef __AUD_LIMITERFACTORY_H__ +#define __AUD_LIMITERFACTORY_H__ #include "AUD_EffectFactory.h" @@ -76,4 +76,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_LIMITERFACTORY +#endif //__AUD_LIMITERFACTORY_H__ diff --git a/intern/audaspace/FX/AUD_LimiterReader.h b/intern/audaspace/FX/AUD_LimiterReader.h index 7a2c88e5144..34c4ea7c20e 100644 --- a/intern/audaspace/FX/AUD_LimiterReader.h +++ b/intern/audaspace/FX/AUD_LimiterReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_LIMITERREADER -#define AUD_LIMITERREADER +#ifndef __AUD_LIMITERREADER_H__ +#define __AUD_LIMITERREADER_H__ #include "AUD_EffectReader.h" @@ -68,4 +68,4 @@ public: virtual void read(int& length, bool& eos, sample_t* buffer); }; -#endif //AUD_LIMITERREADER +#endif //__AUD_LIMITERREADER_H__ diff --git a/intern/audaspace/FX/AUD_LoopFactory.h b/intern/audaspace/FX/AUD_LoopFactory.h index 7d794f313fb..754b780bd99 100644 --- a/intern/audaspace/FX/AUD_LoopFactory.h +++ b/intern/audaspace/FX/AUD_LoopFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_LOOPFACTORY -#define AUD_LOOPFACTORY +#ifndef __AUD_LOOPFACTORY_H__ +#define __AUD_LOOPFACTORY_H__ #include "AUD_EffectFactory.h" @@ -65,4 +65,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_LOOPFACTORY +#endif //__AUD_LOOPFACTORY_H__ diff --git a/intern/audaspace/FX/AUD_LoopReader.h b/intern/audaspace/FX/AUD_LoopReader.h index b062a1781a4..fd2dd71d78f 100644 --- a/intern/audaspace/FX/AUD_LoopReader.h +++ b/intern/audaspace/FX/AUD_LoopReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_LOOPREADER -#define AUD_LOOPREADER +#ifndef __AUD_LOOPREADER_H__ +#define __AUD_LOOPREADER_H__ #include "AUD_EffectReader.h" #include "AUD_Buffer.h" @@ -69,4 +69,4 @@ public: virtual void read(int& length, bool& eos, sample_t* buffer); }; -#endif //AUD_LOOPREADER +#endif //__AUD_LOOPREADER_H__ diff --git a/intern/audaspace/FX/AUD_LowpassFactory.h b/intern/audaspace/FX/AUD_LowpassFactory.h index 90d6ac5c2d1..7e98720a2db 100644 --- a/intern/audaspace/FX/AUD_LowpassFactory.h +++ b/intern/audaspace/FX/AUD_LowpassFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_LOWPASSFACTORY -#define AUD_LOWPASSFACTORY +#ifndef __AUD_LOWPASSFACTORY_H__ +#define __AUD_LOWPASSFACTORY_H__ #include "AUD_DynamicIIRFilterFactory.h" @@ -64,4 +64,4 @@ public: virtual void recalculateCoefficients(AUD_SampleRate rate, std::vector &b, std::vector &a); }; -#endif //AUD_LOWPASSFACTORY +#endif //__AUD_LOWPASSFACTORY_H__ diff --git a/intern/audaspace/FX/AUD_PingPongFactory.h b/intern/audaspace/FX/AUD_PingPongFactory.h index 4a5f3fcf431..f25624a7c5e 100644 --- a/intern/audaspace/FX/AUD_PingPongFactory.h +++ b/intern/audaspace/FX/AUD_PingPongFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_PINGPONGFACTORY -#define AUD_PINGPONGFACTORY +#ifndef __AUD_PINGPONGFACTORY_H__ +#define __AUD_PINGPONGFACTORY_H__ #include "AUD_EffectFactory.h" @@ -53,4 +53,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_PINGPONGFACTORY +#endif //__AUD_PINGPONGFACTORY_H__ diff --git a/intern/audaspace/FX/AUD_PitchFactory.h b/intern/audaspace/FX/AUD_PitchFactory.h index c311a9e3446..5ad37ad1a6c 100644 --- a/intern/audaspace/FX/AUD_PitchFactory.h +++ b/intern/audaspace/FX/AUD_PitchFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_PITCHFACTORY -#define AUD_PITCHFACTORY +#ifndef __AUD_PITCHFACTORY_H__ +#define __AUD_PITCHFACTORY_H__ #include "AUD_EffectFactory.h" @@ -58,4 +58,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_PITCHFACTORY +#endif //__AUD_PITCHFACTORY_H__ diff --git a/intern/audaspace/FX/AUD_PitchReader.h b/intern/audaspace/FX/AUD_PitchReader.h index dcd23b747fa..3185bfdf30b 100644 --- a/intern/audaspace/FX/AUD_PitchReader.h +++ b/intern/audaspace/FX/AUD_PitchReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_PITCHREADER -#define AUD_PITCHREADER +#ifndef __AUD_PITCHREADER_H__ +#define __AUD_PITCHREADER_H__ #include "AUD_EffectReader.h" @@ -70,4 +70,4 @@ public: void setPitch(float pitch); }; -#endif //AUD_PITCHREADER +#endif //__AUD_PITCHREADER_H__ diff --git a/intern/audaspace/FX/AUD_RectifyFactory.h b/intern/audaspace/FX/AUD_RectifyFactory.h index 2e3dbd17917..5ad41d424d9 100644 --- a/intern/audaspace/FX/AUD_RectifyFactory.h +++ b/intern/audaspace/FX/AUD_RectifyFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_RECTIFYFACTORY -#define AUD_RECTIFYFACTORY +#ifndef __AUD_RECTIFYFACTORY_H__ +#define __AUD_RECTIFYFACTORY_H__ #include "AUD_EffectFactory.h" class AUD_CallbackIIRFilterReader; @@ -55,4 +55,4 @@ public: static sample_t rectifyFilter(AUD_CallbackIIRFilterReader* reader, void* useless); }; -#endif //AUD_RECTIFYFACTORY +#endif //__AUD_RECTIFYFACTORY_H__ diff --git a/intern/audaspace/FX/AUD_ReverseFactory.h b/intern/audaspace/FX/AUD_ReverseFactory.h index 6305fb5d2af..e2d75dc560a 100644 --- a/intern/audaspace/FX/AUD_ReverseFactory.h +++ b/intern/audaspace/FX/AUD_ReverseFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_REVERSEFACTORY -#define AUD_REVERSEFACTORY +#ifndef __AUD_REVERSEFACTORY_H__ +#define __AUD_REVERSEFACTORY_H__ #include "AUD_EffectFactory.h" @@ -53,4 +53,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_REVERSEFACTORY +#endif //__AUD_REVERSEFACTORY_H__ diff --git a/intern/audaspace/FX/AUD_ReverseReader.h b/intern/audaspace/FX/AUD_ReverseReader.h index 1b3dfd7e53f..d1e5179b8ec 100644 --- a/intern/audaspace/FX/AUD_ReverseReader.h +++ b/intern/audaspace/FX/AUD_ReverseReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_REVERSEREADER -#define AUD_REVERSEREADER +#ifndef __AUD_REVERSEREADER_H__ +#define __AUD_REVERSEREADER_H__ #include "AUD_EffectReader.h" #include "AUD_Buffer.h" @@ -69,4 +69,4 @@ public: virtual void read(int& length, bool& eos, sample_t* buffer); }; -#endif //AUD_REVERSEREADER +#endif //__AUD_REVERSEREADER_H__ diff --git a/intern/audaspace/FX/AUD_SquareFactory.h b/intern/audaspace/FX/AUD_SquareFactory.h index aff24b0f3d9..9c0dea25d2b 100644 --- a/intern/audaspace/FX/AUD_SquareFactory.h +++ b/intern/audaspace/FX/AUD_SquareFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_SQUAREFACTORY -#define AUD_SQUAREFACTORY +#ifndef __AUD_SQUAREFACTORY_H__ +#define __AUD_SQUAREFACTORY_H__ #include "AUD_EffectFactory.h" class AUD_CallbackIIRFilterReader; @@ -67,4 +67,4 @@ public: static void endSquareFilter(float* threshold); }; -#endif //AUD_SQUAREFACTORY +#endif //__AUD_SQUAREFACTORY_H__ diff --git a/intern/audaspace/FX/AUD_SumFactory.h b/intern/audaspace/FX/AUD_SumFactory.h index c971730258a..ec17faf3fb2 100644 --- a/intern/audaspace/FX/AUD_SumFactory.h +++ b/intern/audaspace/FX/AUD_SumFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_SUMFACTORY -#define AUD_SUMFACTORY +#ifndef __AUD_SUMFACTORY_H__ +#define __AUD_SUMFACTORY_H__ #include "AUD_EffectFactory.h" @@ -52,4 +52,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_SUMFACTORY +#endif //__AUD_SUMFACTORY_H__ diff --git a/intern/audaspace/FX/AUD_SuperposeFactory.h b/intern/audaspace/FX/AUD_SuperposeFactory.h index adfb1c23e1d..2da8e34496d 100644 --- a/intern/audaspace/FX/AUD_SuperposeFactory.h +++ b/intern/audaspace/FX/AUD_SuperposeFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_SUPERPOSEFACTORY -#define AUD_SUPERPOSEFACTORY +#ifndef __AUD_SUPERPOSEFACTORY_H__ +#define __AUD_SUPERPOSEFACTORY_H__ #include "AUD_IFactory.h" @@ -65,4 +65,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_SUPERPOSEFACTORY +#endif //__AUD_SUPERPOSEFACTORY_H__ diff --git a/intern/audaspace/FX/AUD_SuperposeReader.h b/intern/audaspace/FX/AUD_SuperposeReader.h index 8a1b2698f9c..d0fde13a267 100644 --- a/intern/audaspace/FX/AUD_SuperposeReader.h +++ b/intern/audaspace/FX/AUD_SuperposeReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_SUPERPOSEREADER -#define AUD_SUPERPOSEREADER +#ifndef __AUD_SUPERPOSEREADER_H__ +#define __AUD_SUPERPOSEREADER_H__ #include "AUD_IReader.h" #include "AUD_Buffer.h" @@ -81,4 +81,4 @@ public: virtual void read(int& length, bool& eos, sample_t* buffer); }; -#endif //AUD_SUPERPOSEREADER +#endif //__AUD_SUPERPOSEREADER_H__ diff --git a/intern/audaspace/FX/AUD_VolumeFactory.h b/intern/audaspace/FX/AUD_VolumeFactory.h index ecfab6f7299..b12838373b3 100644 --- a/intern/audaspace/FX/AUD_VolumeFactory.h +++ b/intern/audaspace/FX/AUD_VolumeFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_VOLUMEFACTORY -#define AUD_VOLUMEFACTORY +#ifndef __AUD_VOLUMEFACTORY_H__ +#define __AUD_VOLUMEFACTORY_H__ #include "AUD_EffectFactory.h" @@ -66,4 +66,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_VOLUMEFACTORY +#endif //__AUD_VOLUMEFACTORY_H__ diff --git a/intern/audaspace/OpenAL/AUD_OpenALDevice.h b/intern/audaspace/OpenAL/AUD_OpenALDevice.h index ff1361c283f..0a409b42462 100644 --- a/intern/audaspace/OpenAL/AUD_OpenALDevice.h +++ b/intern/audaspace/OpenAL/AUD_OpenALDevice.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_OPENALDEVICE -#define AUD_OPENALDEVICE +#ifndef __AUD_OPENALDEVICE_H__ +#define __AUD_OPENALDEVICE_H__ #include "AUD_IDevice.h" #include "AUD_IHandle.h" @@ -277,4 +277,4 @@ public: virtual void setDistanceModel(AUD_DistanceModel model); }; -#endif //AUD_OPENALDEVICE +#endif //__AUD_OPENALDEVICE_H__ diff --git a/intern/audaspace/Python/AUD_PyAPI.h b/intern/audaspace/Python/AUD_PyAPI.h index bcd9e42ede1..7a7e87ec67d 100644 --- a/intern/audaspace/Python/AUD_PyAPI.h +++ b/intern/audaspace/Python/AUD_PyAPI.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_PYAPI -#define AUD_PYAPI +#ifndef __AUD_PYAPI_H__ +#define __AUD_PYAPI_H__ #include "Python.h" @@ -71,4 +71,4 @@ extern Factory* checkFactory(PyObject* factory); } #endif -#endif //AUD_PYAPI +#endif //__AUD_PYAPI_H__ diff --git a/intern/audaspace/SDL/AUD_SDLDevice.h b/intern/audaspace/SDL/AUD_SDLDevice.h index d77d5835086..266edd0dfcc 100644 --- a/intern/audaspace/SDL/AUD_SDLDevice.h +++ b/intern/audaspace/SDL/AUD_SDLDevice.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_SDLDEVICE -#define AUD_SDLDEVICE +#ifndef __AUD_SDLDEVICE_H__ +#define __AUD_SDLDEVICE_H__ #include "AUD_SoftwareDevice.h" @@ -72,4 +72,4 @@ public: virtual ~AUD_SDLDevice(); }; -#endif //AUD_SDLDEVICE +#endif //__AUD_SDLDEVICE_H__ diff --git a/intern/audaspace/SRC/AUD_SRCResampleFactory.h b/intern/audaspace/SRC/AUD_SRCResampleFactory.h index d061cf9e12b..858bb0c130a 100644 --- a/intern/audaspace/SRC/AUD_SRCResampleFactory.h +++ b/intern/audaspace/SRC/AUD_SRCResampleFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_SRCRESAMPLEFACTORY -#define AUD_SRCRESAMPLEFACTORY +#ifndef __AUD_SRCRESAMPLEFACTORY_H__ +#define __AUD_SRCRESAMPLEFACTORY_H__ #include "AUD_MixerFactory.h" @@ -54,4 +54,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_SRCRESAMPLEFACTORY +#endif //__AUD_SRCRESAMPLEFACTORY_H__ diff --git a/intern/audaspace/SRC/AUD_SRCResampleReader.h b/intern/audaspace/SRC/AUD_SRCResampleReader.h index 26f02be9003..891b28b0993 100644 --- a/intern/audaspace/SRC/AUD_SRCResampleReader.h +++ b/intern/audaspace/SRC/AUD_SRCResampleReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_SRCRESAMPLEREADER -#define AUD_SRCRESAMPLEREADER +#ifndef __AUD_SRCRESAMPLEREADER_H__ +#define __AUD_SRCRESAMPLEREADER_H__ #include "AUD_ResampleReader.h" #include "AUD_Buffer.h" @@ -100,4 +100,4 @@ public: virtual void read(int& length, bool& eos, sample_t* buffer); }; -#endif //AUD_SRCRESAMPLEREADER +#endif //__AUD_SRCRESAMPLEREADER_H__ diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.h b/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.h index 9d79a5fad23..349f55dd7db 100644 --- a/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.h +++ b/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_FFMPEGFACTORY -#define AUD_FFMPEGFACTORY +#ifndef __AUD_FFMPEGFACTORY_H__ +#define __AUD_FFMPEGFACTORY_H__ #include "AUD_IFactory.h" #include "AUD_Reference.h" @@ -75,4 +75,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_FFMPEGFACTORY +#endif //__AUD_FFMPEGFACTORY_H__ diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.h b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.h index 9a19131efe0..2b354b0b2a1 100644 --- a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.h +++ b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_FFMPEGREADER -#define AUD_FFMPEGREADER +#ifndef __AUD_FFMPEGREADER_H__ +#define __AUD_FFMPEGREADER_H__ #include "AUD_ConverterFunctions.h" #include "AUD_IReader.h" @@ -161,4 +161,4 @@ public: virtual void read(int& length, bool& eos, sample_t* buffer); }; -#endif //AUD_FFMPEGREADER +#endif //__AUD_FFMPEGREADER_H__ diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.h b/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.h index 60200ce363d..17830308fd5 100644 --- a/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.h +++ b/intern/audaspace/ffmpeg/AUD_FFMPEGWriter.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_FFMPEGWRITER -#define AUD_FFMPEGWRITER +#ifndef __AUD_FFMPEGWRITER_H__ +#define __AUD_FFMPEGWRITER_H__ #include "AUD_ConverterFunctions.h" #include "AUD_Buffer.h" @@ -135,4 +135,4 @@ public: virtual void write(unsigned int length, sample_t* buffer); }; -#endif //AUD_FFMPEGWRITER +#endif //__AUD_FFMPEGWRITER_H__ diff --git a/intern/audaspace/fftw/AUD_BandPassFactory.h b/intern/audaspace/fftw/AUD_BandPassFactory.h index 4891947ec3c..75de071403f 100644 --- a/intern/audaspace/fftw/AUD_BandPassFactory.h +++ b/intern/audaspace/fftw/AUD_BandPassFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_BANDPASSFACTORY -#define AUD_BANDPASSFACTORY +#ifndef __AUD_BANDPASSFACTORY_H__ +#define __AUD_BANDPASSFACTORY_H__ #include "AUD_EffectFactory.h" @@ -89,4 +89,4 @@ public: virtual AUD_IReader* createReader(); }; -#endif //AUD_BANDPASSFACTORY +#endif //__AUD_BANDPASSFACTORY_H__ diff --git a/intern/audaspace/fftw/AUD_BandPassReader.h b/intern/audaspace/fftw/AUD_BandPassReader.h index 155b8d7b0bc..55a950818e0 100644 --- a/intern/audaspace/fftw/AUD_BandPassReader.h +++ b/intern/audaspace/fftw/AUD_BandPassReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_BANDPASSREADER -#define AUD_BANDPASSREADER +#ifndef __AUD_BANDPASSREADER_H__ +#define __AUD_BANDPASSREADER_H__ #include @@ -99,4 +99,4 @@ public: virtual void read(int & length, sample_t* & buffer); }; -#endif //AUD_BANDPASSREADER +#endif //__AUD_BANDPASSREADER_H__ diff --git a/intern/audaspace/intern/AUD_3DMath.h b/intern/audaspace/intern/AUD_3DMath.h index 18594842108..f39566958cd 100644 --- a/intern/audaspace/intern/AUD_3DMath.h +++ b/intern/audaspace/intern/AUD_3DMath.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_3DMATH -#define AUD_3DMATH +#ifndef __AUD_3DMATH_H__ +#define __AUD_3DMATH_H__ #include #include @@ -325,4 +325,4 @@ public: } }; -#endif //AUD_3DMATH +#endif //__AUD_3DMATH_H__ diff --git a/intern/audaspace/intern/AUD_AnimateableProperty.h b/intern/audaspace/intern/AUD_AnimateableProperty.h index 5b516384a8f..2f25e330ebd 100644 --- a/intern/audaspace/intern/AUD_AnimateableProperty.h +++ b/intern/audaspace/intern/AUD_AnimateableProperty.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_ANIMATEABLEPROPERTY -#define AUD_ANIMATEABLEPROPERTY +#ifndef __AUD_ANIMATEABLEPROPERTY_H__ +#define __AUD_ANIMATEABLEPROPERTY_H__ #include "AUD_Buffer.h" @@ -103,4 +103,4 @@ public: bool isAnimated() const; }; -#endif //AUD_ANIMATEABLEPROPERTY +#endif //__AUD_ANIMATEABLEPROPERTY_H__ diff --git a/intern/audaspace/intern/AUD_Buffer.h b/intern/audaspace/intern/AUD_Buffer.h index 7a30d3b02d8..d3207f04f83 100644 --- a/intern/audaspace/intern/AUD_Buffer.h +++ b/intern/audaspace/intern/AUD_Buffer.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_BUFFER -#define AUD_BUFFER +#ifndef __AUD_BUFFER_H__ +#define __AUD_BUFFER_H__ #include "AUD_Space.h" @@ -90,4 +90,4 @@ public: void assureSize(int size, bool keep = false); }; -#endif //AUD_BUFFER +#endif //__AUD_BUFFER_H__ diff --git a/intern/audaspace/intern/AUD_BufferReader.h b/intern/audaspace/intern/AUD_BufferReader.h index f648baef30d..0e8c5de9a9d 100644 --- a/intern/audaspace/intern/AUD_BufferReader.h +++ b/intern/audaspace/intern/AUD_BufferReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_BUFFERREADER -#define AUD_BUFFERREADER +#ifndef __AUD_BUFFERREADER_H__ +#define __AUD_BUFFERREADER_H__ #include "AUD_IReader.h" #include "AUD_Reference.h" @@ -77,4 +77,4 @@ public: virtual void read(int& length, bool& eos, sample_t* buffer); }; -#endif //AUD_BUFFERREADER +#endif //__AUD_BUFFERREADER_H__ diff --git a/intern/audaspace/intern/AUD_C-API.h b/intern/audaspace/intern/AUD_C-API.h index 2b7c94bcc5b..8388af2170d 100644 --- a/intern/audaspace/intern/AUD_C-API.h +++ b/intern/audaspace/intern/AUD_C-API.h @@ -26,8 +26,8 @@ * \ingroup audaspace */ -#ifndef AUD_CAPI -#define AUD_CAPI +#ifndef __AUD_C_API_H__ +#define __AUD_C_API_H__ #ifdef WITH_PYTHON #include "Python.h" @@ -755,4 +755,4 @@ AUD_Reference AUD_getDevice(); AUD_I3DDevice* AUD_get3DDevice(); #endif -#endif //AUD_CAPI +#endif //__AUD_C_API_H__ diff --git a/intern/audaspace/intern/AUD_ChannelMapperFactory.h b/intern/audaspace/intern/AUD_ChannelMapperFactory.h index 4c88cb85080..b60a32d5510 100644 --- a/intern/audaspace/intern/AUD_ChannelMapperFactory.h +++ b/intern/audaspace/intern/AUD_ChannelMapperFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_CHANNELMAPPERFACTORY -#define AUD_CHANNELMAPPERFACTORY +#ifndef __AUD_CHANNELMAPPERFACTORY_H__ +#define __AUD_CHANNELMAPPERFACTORY_H__ #include "AUD_MixerFactory.h" @@ -54,4 +54,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_CHANNELMAPPERFACTORY +#endif //__AUD_CHANNELMAPPERFACTORY_H__ diff --git a/intern/audaspace/intern/AUD_ChannelMapperReader.h b/intern/audaspace/intern/AUD_ChannelMapperReader.h index 8e3ff0d1e9a..32adb058115 100644 --- a/intern/audaspace/intern/AUD_ChannelMapperReader.h +++ b/intern/audaspace/intern/AUD_ChannelMapperReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_CHANNELMAPPERREADER -#define AUD_CHANNELMAPPERREADER +#ifndef __AUD_CHANNELMAPPERREADER_H__ +#define __AUD_CHANNELMAPPERREADER_H__ #include "AUD_EffectReader.h" #include "AUD_Buffer.h" @@ -133,4 +133,4 @@ public: virtual void read(int& length, bool& eos, sample_t* buffer); }; -#endif //AUD_CHANNELMAPPERREADER +#endif //__AUD_CHANNELMAPPERREADER_H__ diff --git a/intern/audaspace/intern/AUD_ConverterFactory.h b/intern/audaspace/intern/AUD_ConverterFactory.h index 04dfe9e12d1..3211b607517 100644 --- a/intern/audaspace/intern/AUD_ConverterFactory.h +++ b/intern/audaspace/intern/AUD_ConverterFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_CONVERTERFACTORY -#define AUD_CONVERTERFACTORY +#ifndef __AUD_CONVERTERFACTORY_H__ +#define __AUD_CONVERTERFACTORY_H__ #include "AUD_MixerFactory.h" @@ -54,4 +54,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_CONVERTERFACTORY +#endif //__AUD_CONVERTERFACTORY_H__ diff --git a/intern/audaspace/intern/AUD_ConverterFunctions.cpp b/intern/audaspace/intern/AUD_ConverterFunctions.cpp index 53a644e3b90..c20f19a7e67 100644 --- a/intern/audaspace/intern/AUD_ConverterFunctions.cpp +++ b/intern/audaspace/intern/AUD_ConverterFunctions.cpp @@ -31,11 +31,11 @@ #include "AUD_Buffer.h" #define AUD_U8_0 0x80 -#define AUD_S16_MAX 0x7FFF -#define AUD_S16_MIN 0x8000 +#define AUD_S16_MAX ((int16_t)0x7FFF) +#define AUD_S16_MIN ((int16_t)0x8000) #define AUD_S16_FLT 32767.0f -#define AUD_S32_MAX 0x7FFFFFFF -#define AUD_S32_MIN 0x80000000 +#define AUD_S32_MAX ((int32_t)0x7FFFFFFF) +#define AUD_S32_MIN ((int32_t)0x80000000) #define AUD_S32_FLT 2147483647.0f #define AUD_FLT_MAX 1.0f #define AUD_FLT_MIN -1.0f diff --git a/intern/audaspace/intern/AUD_ConverterFunctions.h b/intern/audaspace/intern/AUD_ConverterFunctions.h index 35a8012ccd1..1ffcf6c4ef0 100644 --- a/intern/audaspace/intern/AUD_ConverterFunctions.h +++ b/intern/audaspace/intern/AUD_ConverterFunctions.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_CONVERTERFUNCTIONS -#define AUD_CONVERTERFUNCTIONS +#ifndef __AUD_CONVERTERFUNCTIONS_H__ +#define __AUD_CONVERTERFUNCTIONS_H__ #include "AUD_Space.h" @@ -135,4 +135,4 @@ void AUD_convert_double_s32(data_t* target, data_t* source, int length); void AUD_convert_double_float(data_t* target, data_t* source, int length); -#endif //AUD_CONVERTERFUNCTIONS +#endif //__AUD_CONVERTERFUNCTIONS_H__ diff --git a/intern/audaspace/intern/AUD_ConverterReader.h b/intern/audaspace/intern/AUD_ConverterReader.h index 984666453e8..2dedbd89180 100644 --- a/intern/audaspace/intern/AUD_ConverterReader.h +++ b/intern/audaspace/intern/AUD_ConverterReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_CONVERTERREADER -#define AUD_CONVERTERREADER +#ifndef __AUD_CONVERTERREADER_H__ +#define __AUD_CONVERTERREADER_H__ #include "AUD_EffectReader.h" #include "AUD_ConverterFunctions.h" @@ -70,4 +70,4 @@ public: virtual void read(int& length, bool& eos, sample_t* buffer); }; -#endif //AUD_CONVERTERREADER +#endif //__AUD_CONVERTERREADER_H__ diff --git a/intern/audaspace/intern/AUD_FileFactory.h b/intern/audaspace/intern/AUD_FileFactory.h index b39db27476b..4ea4a9392e9 100644 --- a/intern/audaspace/intern/AUD_FileFactory.h +++ b/intern/audaspace/intern/AUD_FileFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_FILEFACTORY -#define AUD_FILEFACTORY +#ifndef __AUD_FILEFACTORY_H__ +#define __AUD_FILEFACTORY_H__ #include "AUD_IFactory.h" #include "AUD_Reference.h" @@ -73,4 +73,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_FILEFACTORY +#endif //__AUD_FILEFACTORY_H__ diff --git a/intern/audaspace/intern/AUD_FileWriter.h b/intern/audaspace/intern/AUD_FileWriter.h index 9ff083e247f..c9ee2b1ee12 100644 --- a/intern/audaspace/intern/AUD_FileWriter.h +++ b/intern/audaspace/intern/AUD_FileWriter.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_FILEWRITER -#define AUD_FILEWRITER +#ifndef __AUD_FILEWRITER_H__ +#define __AUD_FILEWRITER_H__ #include @@ -70,4 +70,4 @@ public: static void writeReader(AUD_Reference reader, AUD_Reference writer, unsigned int length, unsigned int buffersize); }; -#endif //AUD_FILEWRITER +#endif //__AUD_FILEWRITER_H__ diff --git a/intern/audaspace/intern/AUD_I3DDevice.h b/intern/audaspace/intern/AUD_I3DDevice.h index 68052627842..1df710b7e5b 100644 --- a/intern/audaspace/intern/AUD_I3DDevice.h +++ b/intern/audaspace/intern/AUD_I3DDevice.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_I3DDEVICE -#define AUD_I3DDEVICE +#ifndef __AUD_I3DDEVICE_H__ +#define __AUD_I3DDEVICE_H__ #include "AUD_Space.h" #include "AUD_3DMath.h" @@ -119,4 +119,4 @@ public: virtual void setDistanceModel(AUD_DistanceModel model)=0; }; -#endif //AUD_I3DDEVICE +#endif //__AUD_I3DDEVICE_H__ diff --git a/intern/audaspace/intern/AUD_I3DHandle.h b/intern/audaspace/intern/AUD_I3DHandle.h index 78be55db82c..69ca985630a 100644 --- a/intern/audaspace/intern/AUD_I3DHandle.h +++ b/intern/audaspace/intern/AUD_I3DHandle.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_I3DHANDLE -#define AUD_I3DHANDLE +#ifndef __AUD_I3DHANDLE_H__ +#define __AUD_I3DHANDLE_H__ #include "AUD_Space.h" #include "AUD_3DMath.h" @@ -213,4 +213,4 @@ public: virtual bool setConeVolumeOuter(float volume)=0; }; -#endif //AUD_I3DHANDLE +#endif //__AUD_I3DHANDLE_H__ diff --git a/intern/audaspace/intern/AUD_IDevice.h b/intern/audaspace/intern/AUD_IDevice.h index 28765e9144c..1d6f8ca6efb 100644 --- a/intern/audaspace/intern/AUD_IDevice.h +++ b/intern/audaspace/intern/AUD_IDevice.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_IDEVICE -#define AUD_IDEVICE +#ifndef __AUD_IDEVICE_H__ +#define __AUD_IDEVICE_H__ #include "AUD_Space.h" #include "AUD_Reference.h" diff --git a/intern/audaspace/intern/AUD_IFactory.h b/intern/audaspace/intern/AUD_IFactory.h index a19a5775dc9..a7c214bb5a1 100644 --- a/intern/audaspace/intern/AUD_IFactory.h +++ b/intern/audaspace/intern/AUD_IFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_IFACTORY -#define AUD_IFACTORY +#ifndef __AUD_IFACTORY_H__ +#define __AUD_IFACTORY_H__ #include "AUD_Space.h" #include "AUD_Reference.h" @@ -57,4 +57,4 @@ public: virtual AUD_Reference createReader()=0; }; -#endif //AUD_IFACTORY +#endif //__AUD_IFACTORY_H__ diff --git a/intern/audaspace/intern/AUD_IHandle.h b/intern/audaspace/intern/AUD_IHandle.h index 33c64f509c2..9dcb743693e 100644 --- a/intern/audaspace/intern/AUD_IHandle.h +++ b/intern/audaspace/intern/AUD_IHandle.h @@ -26,8 +26,8 @@ * \ingroup audaspaceintern */ -#ifndef AUD_IHANDLE -#define AUD_IHANDLE +#ifndef __AUD_IHANDLE_H__ +#define __AUD_IHANDLE_H__ //#include "AUD_Space.h" //#include "AUD_Reference.h" diff --git a/intern/audaspace/intern/AUD_IReader.h b/intern/audaspace/intern/AUD_IReader.h index 2c92e75163e..8e0e03dd95d 100644 --- a/intern/audaspace/intern/AUD_IReader.h +++ b/intern/audaspace/intern/AUD_IReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_IREADER -#define AUD_IREADER +#ifndef __AUD_IREADER_H__ +#define __AUD_IREADER_H__ #include "AUD_Space.h" @@ -94,4 +94,4 @@ public: virtual void read(int& length, bool& eos, sample_t* buffer)=0; }; -#endif //AUD_IREADER +#endif //__AUD_IREADER_H__ diff --git a/intern/audaspace/intern/AUD_IWriter.h b/intern/audaspace/intern/AUD_IWriter.h index 401faea4813..3c92661c75d 100644 --- a/intern/audaspace/intern/AUD_IWriter.h +++ b/intern/audaspace/intern/AUD_IWriter.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_IWRITER -#define AUD_IWRITER +#ifndef __AUD_IWRITER_H__ +#define __AUD_IWRITER_H__ #include "AUD_Space.h" @@ -64,4 +64,4 @@ public: virtual void write(unsigned int length, sample_t* buffer)=0; }; -#endif //AUD_IWRITER +#endif //__AUD_IWRITER_H__ diff --git a/intern/audaspace/intern/AUD_JOSResampleFactory.h b/intern/audaspace/intern/AUD_JOSResampleFactory.h index a4a303f944d..6d18150d852 100644 --- a/intern/audaspace/intern/AUD_JOSResampleFactory.h +++ b/intern/audaspace/intern/AUD_JOSResampleFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_JOSRESAMPLEFACTORY -#define AUD_JOSRESAMPLEFACTORY +#ifndef __AUD_JOSRESAMPLEFACTORY_H__ +#define __AUD_JOSRESAMPLEFACTORY_H__ #include "AUD_MixerFactory.h" @@ -53,4 +53,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_JOSRESAMPLEFACTORY +#endif //__AUD_JOSRESAMPLEFACTORY_H__ diff --git a/intern/audaspace/intern/AUD_JOSResampleReader.cpp b/intern/audaspace/intern/AUD_JOSResampleReader.cpp index 2fb8b86ce49..0f7a038c88e 100644 --- a/intern/audaspace/intern/AUD_JOSResampleReader.cpp +++ b/intern/audaspace/intern/AUD_JOSResampleReader.cpp @@ -200,7 +200,7 @@ void AUD_JOSResampleReader::updateBuffer(int size, double factor, int samplesize left\ }\ \ - P = -P;\ + P = 0 - P;\ \ end = (int_to_fp(m_len) - P) / P_increment - 1;\ if(m_cache_valid - m_n - 2 < end)\ diff --git a/intern/audaspace/intern/AUD_JOSResampleReader.h b/intern/audaspace/intern/AUD_JOSResampleReader.h index c05a160c2da..94524c1db3e 100644 --- a/intern/audaspace/intern/AUD_JOSResampleReader.h +++ b/intern/audaspace/intern/AUD_JOSResampleReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_JOSRESAMPLEREADER -#define AUD_JOSRESAMPLEREADER +#ifndef __AUD_JOSRESAMPLEREADER_H__ +#define __AUD_JOSRESAMPLEREADER_H__ #include "AUD_ResampleReader.h" #include "AUD_Buffer.h" @@ -132,4 +132,4 @@ public: virtual void read(int& length, bool& eos, sample_t* buffer); }; -#endif //AUD_JOSRESAMPLEREADER +#endif //__AUD_JOSRESAMPLEREADER_H__ diff --git a/intern/audaspace/intern/AUD_LinearResampleFactory.h b/intern/audaspace/intern/AUD_LinearResampleFactory.h index e1e9cc7ec22..7d9efa01d2d 100644 --- a/intern/audaspace/intern/AUD_LinearResampleFactory.h +++ b/intern/audaspace/intern/AUD_LinearResampleFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_LINEARRESAMPLEFACTORY -#define AUD_LINEARRESAMPLEFACTORY +#ifndef __AUD_LINEARRESAMPLEFACTORY_H__ +#define __AUD_LINEARRESAMPLEFACTORY_H__ #include "AUD_MixerFactory.h" @@ -53,4 +53,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_LINEARRESAMPLEFACTORY +#endif //__AUD_LINEARRESAMPLEFACTORY_H__ diff --git a/intern/audaspace/intern/AUD_LinearResampleReader.h b/intern/audaspace/intern/AUD_LinearResampleReader.h index 1370825894b..4f6d422f772 100644 --- a/intern/audaspace/intern/AUD_LinearResampleReader.h +++ b/intern/audaspace/intern/AUD_LinearResampleReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_LINEARRESAMPLEREADER -#define AUD_LINEARRESAMPLEREADER +#ifndef __AUD_LINEARRESAMPLEREADER_H__ +#define __AUD_LINEARRESAMPLEREADER_H__ #include "AUD_ResampleReader.h" #include "AUD_Buffer.h" @@ -83,4 +83,4 @@ public: virtual void read(int& length, bool& eos, sample_t* buffer); }; -#endif //AUD_LINEARRESAMPLEREADER +#endif //__AUD_LINEARRESAMPLEREADER_H__ diff --git a/intern/audaspace/intern/AUD_Mixer.h b/intern/audaspace/intern/AUD_Mixer.h index e1b67aca5ff..0de9b7fc7dc 100644 --- a/intern/audaspace/intern/AUD_Mixer.h +++ b/intern/audaspace/intern/AUD_Mixer.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_MIXER -#define AUD_MIXER +#ifndef __AUD_MIXER_H__ +#define __AUD_MIXER_H__ #include "AUD_ConverterFunctions.h" #include "AUD_Buffer.h" @@ -108,4 +108,4 @@ public: void clear(int length); }; -#endif //AUD_MIXER +#endif //__AUD_MIXER_H__ diff --git a/intern/audaspace/intern/AUD_MixerFactory.h b/intern/audaspace/intern/AUD_MixerFactory.h index e3627de5b66..d65eb8ef6ae 100644 --- a/intern/audaspace/intern/AUD_MixerFactory.h +++ b/intern/audaspace/intern/AUD_MixerFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_MIXERFACTORY -#define AUD_MIXERFACTORY +#ifndef __AUD_MIXERFACTORY_H__ +#define __AUD_MIXERFACTORY_H__ #include "AUD_IFactory.h" @@ -76,4 +76,4 @@ public: AUD_Reference getFactory() const; }; -#endif //AUD_MIXERFACTORY +#endif //__AUD_MIXERFACTORY_H__ diff --git a/intern/audaspace/intern/AUD_NULLDevice.h b/intern/audaspace/intern/AUD_NULLDevice.h index 6ac8efd227e..ee97b151ebe 100644 --- a/intern/audaspace/intern/AUD_NULLDevice.h +++ b/intern/audaspace/intern/AUD_NULLDevice.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_NULLDEVICE -#define AUD_NULLDEVICE +#ifndef __AUD_NULLDEVICE_H__ +#define __AUD_NULLDEVICE_H__ #include "AUD_IReader.h" #include "AUD_IDevice.h" @@ -81,4 +81,4 @@ public: virtual void setVolume(float volume); }; -#endif //AUD_NULLDEVICE +#endif //__AUD_NULLDEVICE_H__ diff --git a/intern/audaspace/intern/AUD_PyInit.h b/intern/audaspace/intern/AUD_PyInit.h index dc24571438e..8c045e60f37 100644 --- a/intern/audaspace/intern/AUD_PyInit.h +++ b/intern/audaspace/intern/AUD_PyInit.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_PYINIT -#define AUD_PYINIT +#ifndef __AUD_PYINIT_H__ +#define __AUD_PYINIT_H__ #ifdef WITH_PYTHON #include "Python.h" @@ -48,4 +48,4 @@ extern PyObject* AUD_initPython(void); #endif -#endif //AUD_PYINIT +#endif //__AUD_PYINIT_H__ diff --git a/intern/audaspace/intern/AUD_ReadDevice.h b/intern/audaspace/intern/AUD_ReadDevice.h index 9e362b42d36..0f077fe5d7e 100644 --- a/intern/audaspace/intern/AUD_ReadDevice.h +++ b/intern/audaspace/intern/AUD_ReadDevice.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_READDEVICE -#define AUD_READDEVICE +#ifndef __AUD_READDEVICE_H__ +#define __AUD_READDEVICE_H__ #include "AUD_SoftwareDevice.h" @@ -85,4 +85,4 @@ public: void changeSpecs(AUD_Specs specs); }; -#endif //AUD_READDEVICE +#endif //__AUD_READDEVICE_H__ diff --git a/intern/audaspace/intern/AUD_Reference.h b/intern/audaspace/intern/AUD_Reference.h index 0d1c754f908..2e07417154b 100644 --- a/intern/audaspace/intern/AUD_Reference.h +++ b/intern/audaspace/intern/AUD_Reference.h @@ -26,8 +26,8 @@ * \ingroup audaspaceintern */ -#ifndef AUD_REFERENCE -#define AUD_REFERENCE +#ifndef __AUD_REFERENCE_H__ +#define __AUD_REFERENCE_H__ #include #include @@ -244,4 +244,4 @@ inline bool operator!=(const AUD_Reference& a, const AUD_Reference& b) return a.getOriginal() != b.getOriginal(); } -#endif // AUD_REFERENCE +#endif // __AUD_REFERENCE_H__ diff --git a/intern/audaspace/intern/AUD_ResampleFactory.h b/intern/audaspace/intern/AUD_ResampleFactory.h index 34549c16dfa..11f8dc15f03 100644 --- a/intern/audaspace/intern/AUD_ResampleFactory.h +++ b/intern/audaspace/intern/AUD_ResampleFactory.h @@ -27,11 +27,11 @@ */ -#ifndef AUD_RESAMPLEFACTORY -#define AUD_RESAMPLEFACTORY +#ifndef __AUD_RESAMPLEFACTORY_H__ +#define __AUD_RESAMPLEFACTORY_H__ #include "AUD_MixerFactory.h" typedef AUD_MixerFactory AUD_ResampleFactory; -#endif //AUD_RESAMPLEFACTORY +#endif //__AUD_RESAMPLEFACTORY_H__ diff --git a/intern/audaspace/intern/AUD_ResampleReader.h b/intern/audaspace/intern/AUD_ResampleReader.h index 9c3e671f664..c423326489d 100644 --- a/intern/audaspace/intern/AUD_ResampleReader.h +++ b/intern/audaspace/intern/AUD_ResampleReader.h @@ -26,8 +26,8 @@ * \ingroup audaspaceintern */ -#ifndef AUD_RESAMPLEREADER -#define AUD_RESAMPLEREADER +#ifndef __AUD_RESAMPLEREADER_H__ +#define __AUD_RESAMPLEREADER_H__ #include "AUD_EffectReader.h" @@ -63,4 +63,4 @@ public: virtual AUD_SampleRate getRate(); }; -#endif // AUD_RESAMPLEREADER +#endif // __AUD_RESAMPLEREADER_H__ diff --git a/intern/audaspace/intern/AUD_SequencerEntry.h b/intern/audaspace/intern/AUD_SequencerEntry.h index 3a5a51a41a5..7ff6fffea11 100644 --- a/intern/audaspace/intern/AUD_SequencerEntry.h +++ b/intern/audaspace/intern/AUD_SequencerEntry.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_SEQUENCERENTRY -#define AUD_SEQUENCERENTRY +#ifndef __AUD_SEQUENCERENTRY_H__ +#define __AUD_SEQUENCERENTRY_H__ #include "AUD_Reference.h" #include "AUD_AnimateableProperty.h" @@ -315,4 +315,4 @@ public: void setConeVolumeOuter(float volume); }; -#endif //AUD_SEQUENCERENTRY +#endif //__AUD_SEQUENCERENTRY_H__ diff --git a/intern/audaspace/intern/AUD_SequencerFactory.h b/intern/audaspace/intern/AUD_SequencerFactory.h index 08d18fcc925..38241112020 100644 --- a/intern/audaspace/intern/AUD_SequencerFactory.h +++ b/intern/audaspace/intern/AUD_SequencerFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_SEQUENCERFACTORY -#define AUD_SEQUENCERFACTORY +#ifndef __AUD_SEQUENCERFACTORY_H__ +#define __AUD_SEQUENCERFACTORY_H__ #include "AUD_IFactory.h" #include "AUD_AnimateableProperty.h" @@ -210,4 +210,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_SEQUENCERFACTORY +#endif //__AUD_SEQUENCERFACTORY_H__ diff --git a/intern/audaspace/intern/AUD_SequencerHandle.h b/intern/audaspace/intern/AUD_SequencerHandle.h index c7fd3f026eb..72d3240a103 100644 --- a/intern/audaspace/intern/AUD_SequencerHandle.h +++ b/intern/audaspace/intern/AUD_SequencerHandle.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_SEQUENCERHANDLE -#define AUD_SEQUENCERHANDLE +#ifndef __AUD_SEQUENCERHANDLE_H__ +#define __AUD_SEQUENCERHANDLE_H__ #include "AUD_SequencerEntry.h" #include "AUD_IHandle.h" @@ -103,4 +103,4 @@ public: void seek(float position); }; -#endif //AUD_SEQUENCERHANDLE +#endif //__AUD_SEQUENCERHANDLE_H__ diff --git a/intern/audaspace/intern/AUD_SequencerReader.h b/intern/audaspace/intern/AUD_SequencerReader.h index a4120830e42..b3c3a3ea7a6 100644 --- a/intern/audaspace/intern/AUD_SequencerReader.h +++ b/intern/audaspace/intern/AUD_SequencerReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_SEQUENCERREADER -#define AUD_SEQUENCERREADER +#ifndef __AUD_SEQUENCERREADER_H__ +#define __AUD_SEQUENCERREADER_H__ #include "AUD_IReader.h" #include "AUD_ReadDevice.h" @@ -96,4 +96,4 @@ public: virtual void read(int& length, bool& eos, sample_t* buffer); }; -#endif //AUD_SEQUENCERREADER +#endif //__AUD_SEQUENCERREADER_H__ diff --git a/intern/audaspace/intern/AUD_SilenceFactory.h b/intern/audaspace/intern/AUD_SilenceFactory.h index d1b0f9d6550..3bc7fc067ed 100644 --- a/intern/audaspace/intern/AUD_SilenceFactory.h +++ b/intern/audaspace/intern/AUD_SilenceFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_SILENCEFACTORY -#define AUD_SILENCEFACTORY +#ifndef __AUD_SILENCEFACTORY_H__ +#define __AUD_SILENCEFACTORY_H__ #include "AUD_IFactory.h" @@ -51,4 +51,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_SILENCEFACTORY +#endif //__AUD_SILENCEFACTORY_H__ diff --git a/intern/audaspace/intern/AUD_SilenceReader.h b/intern/audaspace/intern/AUD_SilenceReader.h index de4f9df51fb..cac56a0861b 100644 --- a/intern/audaspace/intern/AUD_SilenceReader.h +++ b/intern/audaspace/intern/AUD_SilenceReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_SILENCEREADER -#define AUD_SILENCEREADER +#ifndef __AUD_SILENCEREADER_H__ +#define __AUD_SILENCEREADER_H__ #include "AUD_IReader.h" #include "AUD_Buffer.h" @@ -63,4 +63,4 @@ public: virtual void read(int& length, bool& eos, sample_t* buffer); }; -#endif //AUD_SILENCEREADER +#endif //__AUD_SILENCEREADER_H__ diff --git a/intern/audaspace/intern/AUD_SinusFactory.h b/intern/audaspace/intern/AUD_SinusFactory.h index f73cdd278b5..d83323c6635 100644 --- a/intern/audaspace/intern/AUD_SinusFactory.h +++ b/intern/audaspace/intern/AUD_SinusFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_SINUSFACTORY -#define AUD_SINUSFACTORY +#ifndef __AUD_SINUSFACTORY_H__ +#define __AUD_SINUSFACTORY_H__ #include "AUD_IFactory.h" @@ -69,4 +69,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_SINUSFACTORY +#endif //__AUD_SINUSFACTORY_H__ diff --git a/intern/audaspace/intern/AUD_SinusReader.h b/intern/audaspace/intern/AUD_SinusReader.h index ce79470c83d..50487ea94aa 100644 --- a/intern/audaspace/intern/AUD_SinusReader.h +++ b/intern/audaspace/intern/AUD_SinusReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_SINUSREADER -#define AUD_SINUSREADER +#ifndef __AUD_SINUSREADER_H__ +#define __AUD_SINUSREADER_H__ #include "AUD_IReader.h" #include "AUD_Buffer.h" @@ -75,4 +75,4 @@ public: virtual void read(int& length, bool& eos, sample_t* buffer); }; -#endif //AUD_SINUSREADER +#endif //__AUD_SINUSREADER_H__ diff --git a/intern/audaspace/intern/AUD_SoftwareDevice.h b/intern/audaspace/intern/AUD_SoftwareDevice.h index 010f579c86d..c429508b622 100644 --- a/intern/audaspace/intern/AUD_SoftwareDevice.h +++ b/intern/audaspace/intern/AUD_SoftwareDevice.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_SOFTWAREDEVICE -#define AUD_SOFTWAREDEVICE +#ifndef __AUD_SOFTWAREDEVICE_H__ +#define __AUD_SOFTWAREDEVICE_H__ #include "AUD_IDevice.h" #include "AUD_IHandle.h" @@ -342,4 +342,4 @@ public: virtual void setDistanceModel(AUD_DistanceModel model); }; -#endif //AUD_SOFTWAREDEVICE +#endif //__AUD_SOFTWAREDEVICE_H__ diff --git a/intern/audaspace/intern/AUD_Space.h b/intern/audaspace/intern/AUD_Space.h index c018d6e68e7..f42cb1ab018 100644 --- a/intern/audaspace/intern/AUD_Space.h +++ b/intern/audaspace/intern/AUD_Space.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_SPACE -#define AUD_SPACE +#ifndef __AUD_SPACE_H__ +#define __AUD_SPACE_H__ /// The size of a format in bytes. #define AUD_FORMAT_SIZE(format) (format & 0x0F) @@ -253,4 +253,4 @@ typedef struct // void* userData; - for the case it is needed someday } AUD_Exception; -#endif //AUD_SPACE +#endif //__AUD_SPACE_H__ diff --git a/intern/audaspace/intern/AUD_StreamBufferFactory.h b/intern/audaspace/intern/AUD_StreamBufferFactory.h index f1f1c0f6a66..99795d95d33 100644 --- a/intern/audaspace/intern/AUD_StreamBufferFactory.h +++ b/intern/audaspace/intern/AUD_StreamBufferFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_STREAMBUFFERFACTORY -#define AUD_STREAMBUFFERFACTORY +#ifndef __AUD_STREAMBUFFERFACTORY_H__ +#define __AUD_STREAMBUFFERFACTORY_H__ #include "AUD_IFactory.h" #include "AUD_Reference.h" @@ -67,4 +67,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_STREAMBUFFERFACTORY +#endif //__AUD_STREAMBUFFERFACTORY_H__ diff --git a/intern/audaspace/jack/AUD_JackDevice.h b/intern/audaspace/jack/AUD_JackDevice.h index 6373d4f9d6d..dc90c5249a2 100644 --- a/intern/audaspace/jack/AUD_JackDevice.h +++ b/intern/audaspace/jack/AUD_JackDevice.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_JACKDEVICE -#define AUD_JACKDEVICE +#ifndef __AUD_JACKDEVICE_H__ +#define __AUD_JACKDEVICE_H__ #include "AUD_SoftwareDevice.h" @@ -205,4 +205,4 @@ public: bool doesPlayback(); }; -#endif //AUD_JACKDEVICE +#endif //__AUD_JACKDEVICE_H__ diff --git a/intern/audaspace/sndfile/AUD_SndFileFactory.h b/intern/audaspace/sndfile/AUD_SndFileFactory.h index bd02a596db3..7039c7a2615 100644 --- a/intern/audaspace/sndfile/AUD_SndFileFactory.h +++ b/intern/audaspace/sndfile/AUD_SndFileFactory.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_SNDFILEFACTORY -#define AUD_SNDFILEFACTORY +#ifndef __AUD_SNDFILEFACTORY_H__ +#define __AUD_SNDFILEFACTORY_H__ #include "AUD_IFactory.h" #include "AUD_Reference.h" @@ -73,4 +73,4 @@ public: virtual AUD_Reference createReader(); }; -#endif //AUD_SNDFILEFACTORY +#endif //__AUD_SNDFILEFACTORY_H__ diff --git a/intern/audaspace/sndfile/AUD_SndFileReader.h b/intern/audaspace/sndfile/AUD_SndFileReader.h index b4552a7d0e5..81d8b45120c 100644 --- a/intern/audaspace/sndfile/AUD_SndFileReader.h +++ b/intern/audaspace/sndfile/AUD_SndFileReader.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_SNDFILEREADER -#define AUD_SNDFILEREADER +#ifndef __AUD_SNDFILEREADER_H__ +#define __AUD_SNDFILEREADER_H__ #include "AUD_IReader.h" #include "AUD_Reference.h" @@ -125,4 +125,4 @@ public: virtual void read(int& length, bool& eos, sample_t* buffer); }; -#endif //AUD_SNDFILEREADER +#endif //__AUD_SNDFILEREADER_H__ diff --git a/intern/audaspace/sndfile/AUD_SndFileWriter.h b/intern/audaspace/sndfile/AUD_SndFileWriter.h index 9e29fd1a347..0cadbd19a09 100644 --- a/intern/audaspace/sndfile/AUD_SndFileWriter.h +++ b/intern/audaspace/sndfile/AUD_SndFileWriter.h @@ -27,8 +27,8 @@ */ -#ifndef AUD_SNDFILEWRITER -#define AUD_SNDFILEWRITER +#ifndef __AUD_SNDFILEWRITER_H__ +#define __AUD_SNDFILEWRITER_H__ #include "AUD_IWriter.h" @@ -83,4 +83,4 @@ public: virtual void write(unsigned int length, sample_t* buffer); }; -#endif //AUD_SNDFILEWRITER +#endif //__AUD_SNDFILEWRITER_H__ diff --git a/intern/boolop/extern/BOP_Interface.h b/intern/boolop/extern/BOP_Interface.h index eee0a2478ca..fbada7dcab5 100644 --- a/intern/boolop/extern/BOP_Interface.h +++ b/intern/boolop/extern/BOP_Interface.h @@ -29,8 +29,8 @@ * \ingroup boolop */ -#ifndef BOP_INTERFACE_H -#define BOP_INTERFACE_H +#ifndef __BOP_INTERFACE_H__ +#define __BOP_INTERFACE_H__ #include "../../bsp/intern/BSP_CSGMesh.h" diff --git a/intern/boolop/intern/BOP_BBox.h b/intern/boolop/intern/BOP_BBox.h index 266ffd9b0b4..c58bb704fc3 100644 --- a/intern/boolop/intern/BOP_BBox.h +++ b/intern/boolop/intern/BOP_BBox.h @@ -30,8 +30,8 @@ */ -#ifndef BOP_BBOX_H -#define BOP_BBOX_H +#ifndef __BOP_BBOX_H__ +#define __BOP_BBOX_H__ #include "MT_Point3.h" #include "BOP_MathUtils.h" diff --git a/intern/boolop/intern/BOP_BSPNode.h b/intern/boolop/intern/BOP_BSPNode.h index 9f924407b62..e8646cd904c 100644 --- a/intern/boolop/intern/BOP_BSPNode.h +++ b/intern/boolop/intern/BOP_BSPNode.h @@ -30,8 +30,8 @@ */ -#ifndef BOP_BSPNODE_H -#define BOP_BSPNODE_H +#ifndef __BOP_BSPNODE_H__ +#define __BOP_BSPNODE_H__ #include "MT_Plane3.h" #include "BOP_Tag.h" diff --git a/intern/boolop/intern/BOP_BSPTree.h b/intern/boolop/intern/BOP_BSPTree.h index 41570de2377..b3abd55bf2a 100644 --- a/intern/boolop/intern/BOP_BSPTree.h +++ b/intern/boolop/intern/BOP_BSPTree.h @@ -30,8 +30,8 @@ */ -#ifndef BOP_BSPTREE_H -#define BOP_BSPTREE_H +#ifndef __BOP_BSPTREE_H__ +#define __BOP_BSPTREE_H__ #include "BOP_BSPNode.h" #include "BOP_Mesh.h" diff --git a/intern/boolop/intern/BOP_Chrono.h b/intern/boolop/intern/BOP_Chrono.h index 1adbfa3edb1..8f09eeae82e 100644 --- a/intern/boolop/intern/BOP_Chrono.h +++ b/intern/boolop/intern/BOP_Chrono.h @@ -30,8 +30,8 @@ */ -#ifndef BOP_CHRONO_H -#define BOP_CHRONO_H +#ifndef __BOP_CHRONO_H__ +#define __BOP_CHRONO_H__ #include diff --git a/intern/boolop/intern/BOP_Edge.h b/intern/boolop/intern/BOP_Edge.h index 867ad5df9f1..fd2f53b1aa4 100644 --- a/intern/boolop/intern/BOP_Edge.h +++ b/intern/boolop/intern/BOP_Edge.h @@ -30,8 +30,8 @@ */ -#ifndef BOP_EDGE_H -#define BOP_EDGE_H +#ifndef __BOP_EDGE_H__ +#define __BOP_EDGE_H__ #include "BOP_Indexs.h" #include "BOP_Misc.h" diff --git a/intern/boolop/intern/BOP_Face.h b/intern/boolop/intern/BOP_Face.h index 6f79b8b17c0..4f09618e23a 100644 --- a/intern/boolop/intern/BOP_Face.h +++ b/intern/boolop/intern/BOP_Face.h @@ -30,8 +30,8 @@ */ -#ifndef BOP_FACE_H -#define BOP_FACE_H +#ifndef __BOP_FACE_H__ +#define __BOP_FACE_H__ #include "BOP_Tag.h" #include "MT_Plane3.h" diff --git a/intern/boolop/intern/BOP_Face2Face.h b/intern/boolop/intern/BOP_Face2Face.h index c4404295610..9809084ce3b 100644 --- a/intern/boolop/intern/BOP_Face2Face.h +++ b/intern/boolop/intern/BOP_Face2Face.h @@ -30,8 +30,8 @@ */ -#ifndef BOP_FACE2FACE_H -#define BOP_FACE2FACE_H +#ifndef __BOP_FACE2FACE_H__ +#define __BOP_FACE2FACE_H__ #include "BOP_Mesh.h" #include "BOP_Segment.h" diff --git a/intern/boolop/intern/BOP_Indexs.h b/intern/boolop/intern/BOP_Indexs.h index 4e71c66d4a4..e001f412c9f 100644 --- a/intern/boolop/intern/BOP_Indexs.h +++ b/intern/boolop/intern/BOP_Indexs.h @@ -30,8 +30,8 @@ */ -#ifndef BOP_Indexs_H -#define BOP_Indexs_H +#ifndef __BOP_INDEXS_H__ +#define __BOP_INDEXS_H__ #include diff --git a/intern/boolop/intern/BOP_MathUtils.h b/intern/boolop/intern/BOP_MathUtils.h index 27e5e100b8c..38acd98dd3d 100644 --- a/intern/boolop/intern/BOP_MathUtils.h +++ b/intern/boolop/intern/BOP_MathUtils.h @@ -32,8 +32,8 @@ */ -#ifndef BOP_MATHUTILS_H -#define BOP_MATHUTILS_H +#ifndef __BOP_MATHUTILS_H__ +#define __BOP_MATHUTILS_H__ #include #include diff --git a/intern/boolop/intern/BOP_Merge.h b/intern/boolop/intern/BOP_Merge.h index 5a24579e7b5..9d6d7030ba7 100644 --- a/intern/boolop/intern/BOP_Merge.h +++ b/intern/boolop/intern/BOP_Merge.h @@ -30,8 +30,8 @@ */ -#ifndef BOP_MERGE_H -#define BOP_MERGE_H +#ifndef __BOP_MERGE_H__ +#define __BOP_MERGE_H__ #include "BOP_Misc.h" diff --git a/intern/boolop/intern/BOP_Merge2.h b/intern/boolop/intern/BOP_Merge2.h index 78a4caff7d9..1e26a2576be 100644 --- a/intern/boolop/intern/BOP_Merge2.h +++ b/intern/boolop/intern/BOP_Merge2.h @@ -30,8 +30,8 @@ */ -#ifndef BOP_MERGE2_H -#define BOP_MERGE2_H +#ifndef __BOP_MERGE2_H__ +#define __BOP_MERGE2_H__ #include "BOP_Misc.h" diff --git a/intern/boolop/intern/BOP_Mesh.h b/intern/boolop/intern/BOP_Mesh.h index 271e97fe454..381557ec58b 100644 --- a/intern/boolop/intern/BOP_Mesh.h +++ b/intern/boolop/intern/BOP_Mesh.h @@ -32,8 +32,8 @@ */ -#ifndef BOP_MESH_H -#define BOP_MESH_H +#ifndef __BOP_MESH_H__ +#define __BOP_MESH_H__ #include "BOP_Vertex.h" #include "BOP_Edge.h" diff --git a/intern/boolop/intern/BOP_Segment.h b/intern/boolop/intern/BOP_Segment.h index 4a2b4509846..5a49ae844c4 100644 --- a/intern/boolop/intern/BOP_Segment.h +++ b/intern/boolop/intern/BOP_Segment.h @@ -30,8 +30,8 @@ */ -#ifndef BOP_SEGMENT_H -#define BOP_SEGMENT_H +#ifndef __BOP_SEGMENT_H__ +#define __BOP_SEGMENT_H__ #include "BOP_Indexs.h" #include diff --git a/intern/boolop/intern/BOP_Splitter.h b/intern/boolop/intern/BOP_Splitter.h index a14f46510d6..8d79b89aa91 100644 --- a/intern/boolop/intern/BOP_Splitter.h +++ b/intern/boolop/intern/BOP_Splitter.h @@ -30,8 +30,8 @@ */ -#ifndef BOP_SPLITTER_H -#define BOP_SPLITTER_H +#ifndef __BOP_SPLITTER_H__ +#define __BOP_SPLITTER_H__ #include "BOP_MathUtils.h" #include "BOP_Segment.h" diff --git a/intern/boolop/intern/BOP_Tag.h b/intern/boolop/intern/BOP_Tag.h index 79d13709cd4..b7438275e90 100644 --- a/intern/boolop/intern/BOP_Tag.h +++ b/intern/boolop/intern/BOP_Tag.h @@ -33,8 +33,8 @@ #include #include -#ifndef BOP_TAG_H -#define BOP_TAG_H +#ifndef __BOP_TAG_H__ +#define __BOP_TAG_H__ #define IN_TAG 0x02 // Below the plane #define ON_TAG 0x00 // On the plane diff --git a/intern/boolop/intern/BOP_Triangulator.h b/intern/boolop/intern/BOP_Triangulator.h index 9fb314f894d..55dd51d09c3 100644 --- a/intern/boolop/intern/BOP_Triangulator.h +++ b/intern/boolop/intern/BOP_Triangulator.h @@ -30,8 +30,8 @@ */ -#ifndef BOP_TRIANGULATOR_H -#define BOP_TRIANGULATOR_H +#ifndef __BOP_TRIANGULATOR_H__ +#define __BOP_TRIANGULATOR_H__ #include "BOP_MathUtils.h" #include "BOP_Mesh.h" diff --git a/intern/boolop/intern/BOP_Vertex.h b/intern/boolop/intern/BOP_Vertex.h index 3f1780c5081..1aae2207972 100644 --- a/intern/boolop/intern/BOP_Vertex.h +++ b/intern/boolop/intern/BOP_Vertex.h @@ -30,8 +30,8 @@ */ -#ifndef BOP_VERTEX_H -#define BOP_VERTEX_H +#ifndef __BOP_VERTEX_H__ +#define __BOP_VERTEX_H__ #include "BOP_Tag.h" #include "BOP_Indexs.h" diff --git a/intern/bsp/extern/CSG_BooleanOps.h b/intern/bsp/extern/CSG_BooleanOps.h index eea0dbc547c..94a74c30536 100644 --- a/intern/bsp/extern/CSG_BooleanOps.h +++ b/intern/bsp/extern/CSG_BooleanOps.h @@ -30,8 +30,8 @@ */ -#ifndef CSG_BOOLEANOPS_H -#define CSG_BOOLEANOPS_H +#ifndef __CSG_BOOLEANOPS_H__ +#define __CSG_BOOLEANOPS_H__ /** diff --git a/intern/bsp/intern/BSP_CSGException.h b/intern/bsp/intern/BSP_CSGException.h index fc1160d60ee..744359c1078 100644 --- a/intern/bsp/intern/BSP_CSGException.h +++ b/intern/bsp/intern/BSP_CSGException.h @@ -30,8 +30,8 @@ */ -#ifndef NAN_INCLUDED_CSGException_h -#define NAN_INCLUDED_CSGException_h +#ifndef __BSP_CSGEXCEPTION_H__ +#define __BSP_CSGEXCEPTION_H__ // stick in more error types as you think of them diff --git a/intern/bsp/intern/BSP_CSGMesh.h b/intern/bsp/intern/BSP_CSGMesh.h index 13a38f26689..3fd1f0cebaf 100644 --- a/intern/bsp/intern/BSP_CSGMesh.h +++ b/intern/bsp/intern/BSP_CSGMesh.h @@ -30,8 +30,8 @@ */ -#ifndef NAN_INCLUDED_BSP_CSGMesh_h -#define NAN_INCLUDED_BSP_CSGMesh_h +#ifndef __BSP_CSGMESH_H__ +#define __BSP_CSGMESH_H__ #include "BSP_MeshPrimitives.h" #include "MEM_SmartPtr.h" diff --git a/intern/bsp/intern/BSP_CSGMesh_CFIterator.h b/intern/bsp/intern/BSP_CSGMesh_CFIterator.h index 3a1a9dbd433..cadd3df4360 100644 --- a/intern/bsp/intern/BSP_CSGMesh_CFIterator.h +++ b/intern/bsp/intern/BSP_CSGMesh_CFIterator.h @@ -30,9 +30,9 @@ */ -#ifndef BSP_CSGMesh_CFIterator_h +#ifndef __BSP_CSGMESH_CFITERATOR_H__ -#define BSP_CSGMesh_CFIterator_h +#define __BSP_CSGMESH_CFITERATOR_H__ #include "BSP_CSGMesh.h" #include "../extern/CSG_BooleanOps.h" diff --git a/intern/bsp/intern/BSP_MeshPrimitives.h b/intern/bsp/intern/BSP_MeshPrimitives.h index 4b795f4cfa2..018677327f4 100644 --- a/intern/bsp/intern/BSP_MeshPrimitives.h +++ b/intern/bsp/intern/BSP_MeshPrimitives.h @@ -30,8 +30,8 @@ */ -#ifndef NAN_INCLUDED_BSP_MeshPrimitives -#define NAN_INCLUDED_BSP_MeshPrimitives +#ifndef __BSP_MESHPRIMITIVES_H__ +#define __BSP_MESHPRIMITIVES_H__ #include "CTR_TaggedIndex.h" #include "MT_Vector3.h" diff --git a/intern/bsp/test/BSP_GhostTest/BSP_GhostTest3D.h b/intern/bsp/test/BSP_GhostTest/BSP_GhostTest3D.h index 26db15fd587..8bfa6d061ee 100644 --- a/intern/bsp/test/BSP_GhostTest/BSP_GhostTest3D.h +++ b/intern/bsp/test/BSP_GhostTest/BSP_GhostTest3D.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BSP_GhostTest_h -#define BSP_GhostTest_h +#ifndef __BSP_GHOSTTEST3D_H__ +#define __BSP_GHOSTTEST3D_H__ #include "GHOST_IEventConsumer.h" #include "MT_Vector3.h" diff --git a/intern/bsp/test/BSP_GhostTest/BSP_MeshDrawer.h b/intern/bsp/test/BSP_GhostTest/BSP_MeshDrawer.h index 443c41a7c85..17aeccc603a 100644 --- a/intern/bsp/test/BSP_GhostTest/BSP_MeshDrawer.h +++ b/intern/bsp/test/BSP_GhostTest/BSP_MeshDrawer.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BSP_MeshDrawer_h -#define BSP_MeshDrawer_h +#ifndef __BSP_MESHDRAWER_H__ +#define __BSP_MESHDRAWER_H__ class BSP_TMesh; class MT_Vector3; diff --git a/intern/bsp/test/BSP_GhostTest/BSP_PlyLoader.h b/intern/bsp/test/BSP_GhostTest/BSP_PlyLoader.h index 73803ebf921..8fcac29253b 100644 --- a/intern/bsp/test/BSP_GhostTest/BSP_PlyLoader.h +++ b/intern/bsp/test/BSP_GhostTest/BSP_PlyLoader.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BSP_PlyLoader_h -#define BSP_PlyLoader_h +#ifndef __BSP_PLYLOADER_H__ +#define __BSP_PLYLOADER_H__ #include "MEM_SmartPtr.h" #include "BSP_TMesh.h" diff --git a/intern/bsp/test/BSP_GhostTest/BSP_TMesh.h b/intern/bsp/test/BSP_GhostTest/BSP_TMesh.h index 3de5fd5df4c..ca4ab106664 100644 --- a/intern/bsp/test/BSP_GhostTest/BSP_TMesh.h +++ b/intern/bsp/test/BSP_GhostTest/BSP_TMesh.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BSP_TMesh_h -#define BSP_TMesh_h +#ifndef __BSP_TMESH_H__ +#define __BSP_TMESH_H__ #include "MT_Point3.h" #include "MT_Vector3.h" diff --git a/intern/container/CTR_TaggedIndex.h b/intern/container/CTR_TaggedIndex.h index 00a24d07760..8420414d6c7 100644 --- a/intern/container/CTR_TaggedIndex.h +++ b/intern/container/CTR_TaggedIndex.h @@ -36,8 +36,8 @@ * Simple tagged index class. */ -#ifndef NAN_INCLUDED_CTR_TaggedIndex_h -#define NAN_INCLUDED_CTR_TaggedIndex_h +#ifndef __CTR_TAGGEDINDEX_H__ +#define __CTR_TAGGEDINDEX_H__ /** * This class is supposed to be a simple tagged index class. If these diff --git a/intern/container/CTR_TaggedSetOps.h b/intern/container/CTR_TaggedSetOps.h index 9dc4e4f00db..d30081d2d60 100644 --- a/intern/container/CTR_TaggedSetOps.h +++ b/intern/container/CTR_TaggedSetOps.h @@ -30,8 +30,8 @@ */ -#ifndef NAN_INCLUDED_LOD_TaggedSetOps_h -#define NAN_INCLUDED_LOD_TaggedSetOps_h +#ifndef __CTR_TAGGEDSETOPS_H__ +#define __CTR_TAGGEDSETOPS_H__ #include "MEM_NonCopyable.h" #include diff --git a/intern/container/CTR_UHeap.h b/intern/container/CTR_UHeap.h index 11813c48331..ad3d7d2bb02 100644 --- a/intern/container/CTR_UHeap.h +++ b/intern/container/CTR_UHeap.h @@ -44,8 +44,8 @@ * */ -#ifndef NAN_INCLUDED_CTR_UHeap_h -#define NAN_INCLUDED_CTR_UHeap_h +#ifndef __CTR_UHEAP_H__ +#define __CTR_UHEAP_H__ #include diff --git a/intern/decimation/extern/LOD_decimation.h b/intern/decimation/extern/LOD_decimation.h index 1c31e98f3da..4c52cb18577 100644 --- a/intern/decimation/extern/LOD_decimation.h +++ b/intern/decimation/extern/LOD_decimation.h @@ -38,8 +38,8 @@ * This is the external interface for the decimation module. */ -#ifndef NAN_INCLUDED_LOD_decimation_h -#define NAN_INCLUDED_LOD_decimation_h +#ifndef __LOD_DECIMATION_H__ +#define __LOD_DECIMATION_H__ #ifdef __cplusplus extern "C" { @@ -113,5 +113,5 @@ extern int LOD_FreeDecimationData(LOD_Decimation_InfoPtr); } #endif -#endif // NAN_INCLUDED_LOD_decimation_h +#endif // __LOD_DECIMATION_H__ diff --git a/intern/decimation/intern/LOD_DecimationClass.h b/intern/decimation/intern/LOD_DecimationClass.h index a91db1a28e6..ecf2e4e6790 100644 --- a/intern/decimation/intern/LOD_DecimationClass.h +++ b/intern/decimation/intern/LOD_DecimationClass.h @@ -30,8 +30,8 @@ */ -#ifndef NAN_INCLUDED_LOD_DecimationClass_h -#define NAN_INCLUDED_LOD_DecimationClass_h +#ifndef __LOD_DECIMATIONCLASS_H__ +#define __LOD_DECIMATIONCLASS_H__ #include "MEM_SmartPtr.h" #include "MEM_NonCopyable.h" diff --git a/intern/decimation/intern/LOD_EdgeCollapser.h b/intern/decimation/intern/LOD_EdgeCollapser.h index ae4e9072f5b..75a8b70f672 100644 --- a/intern/decimation/intern/LOD_EdgeCollapser.h +++ b/intern/decimation/intern/LOD_EdgeCollapser.h @@ -30,8 +30,8 @@ */ -#ifndef NAN_INCLDUED_EgdeCollapser_h -#define NAN_INCLDUED_EgdeCollapser_h +#ifndef __LOD_EDGECOLLAPSER_H__ +#define __LOD_EDGECOLLAPSER_H__ // This is a helper class that collapses edges of a 2 - manifold mesh. diff --git a/intern/decimation/intern/LOD_ExternBufferEditor.h b/intern/decimation/intern/LOD_ExternBufferEditor.h index 3d7665754f7..c903b255812 100644 --- a/intern/decimation/intern/LOD_ExternBufferEditor.h +++ b/intern/decimation/intern/LOD_ExternBufferEditor.h @@ -35,8 +35,8 @@ * Copyright (C) 2001 NaN Technologies B.V. */ -#ifndef NAN_INCLUDED_LOD_ExternBufferEditor_h -#define NAN_INCLUDED_LOD_ExternBufferEditor_h +#ifndef __LOD_EXTERNBUFFEREDITOR_H__ +#define __LOD_EXTERNBUFFEREDITOR_H__ #include "LOD_MeshPrimitives.h" #include diff --git a/intern/decimation/intern/LOD_ExternNormalEditor.h b/intern/decimation/intern/LOD_ExternNormalEditor.h index 491cccabf1e..1c637453467 100644 --- a/intern/decimation/intern/LOD_ExternNormalEditor.h +++ b/intern/decimation/intern/LOD_ExternNormalEditor.h @@ -30,8 +30,8 @@ */ -#ifndef NAN_INCLUDED_ExternNormalEditor_h -#define NAN_INCLUDED_ExternNormalEditor_h +#ifndef __LOD_EXTERNNORMALEDITOR_H__ +#define __LOD_EXTERNNORMALEDITOR_H__ #include "MEM_NonCopyable.h" #include "LOD_ManMesh2.h" diff --git a/intern/decimation/intern/LOD_FaceNormalEditor.h b/intern/decimation/intern/LOD_FaceNormalEditor.h index 6fd65e3db62..b2f941f990f 100644 --- a/intern/decimation/intern/LOD_FaceNormalEditor.h +++ b/intern/decimation/intern/LOD_FaceNormalEditor.h @@ -30,8 +30,8 @@ */ -#ifndef NAN_INCLUDED_FaceNormalEditor_h -#define NAN_INCLUDED_FaceNormalEditor_h +#ifndef __LOD_FACENORMALEDITOR_H__ +#define __LOD_FACENORMALEDITOR_H__ #include "MEM_NonCopyable.h" #include "LOD_ManMesh2.h" diff --git a/intern/decimation/intern/LOD_ManMesh2.h b/intern/decimation/intern/LOD_ManMesh2.h index 1377a405ff7..63ea7912c2d 100644 --- a/intern/decimation/intern/LOD_ManMesh2.h +++ b/intern/decimation/intern/LOD_ManMesh2.h @@ -30,8 +30,8 @@ */ -#ifndef NAN_INCLUDED_ManMesh2_h -#define NAN_INCLUDED_ManMesh2_h +#ifndef __LOD_MANMESH2_H__ +#define __LOD_MANMESH2_H__ #include "LOD_MeshPrimitives.h" #include "MEM_SmartPtr.h" diff --git a/intern/decimation/intern/LOD_MeshBounds.h b/intern/decimation/intern/LOD_MeshBounds.h index 116c32efed6..c95e6c7b61f 100644 --- a/intern/decimation/intern/LOD_MeshBounds.h +++ b/intern/decimation/intern/LOD_MeshBounds.h @@ -30,8 +30,8 @@ */ -#ifndef NAN_INCLUDED_MeshBounds_h -#define NAN_INCLUDED_MeshBounds_h +#ifndef __LOD_MESHBOUNDS_H__ +#define __LOD_MESHBOUNDS_H__ #include "MEM_SmartPtr.h" #include "LOD_MeshPrimitives.h" diff --git a/intern/decimation/intern/LOD_MeshException.h b/intern/decimation/intern/LOD_MeshException.h index 15a88777146..67bd8188c41 100644 --- a/intern/decimation/intern/LOD_MeshException.h +++ b/intern/decimation/intern/LOD_MeshException.h @@ -30,8 +30,8 @@ */ -#ifndef NAN_INCLUDED_MeshExceptions_h -#define NAN_INCLUDED_MeshExceptions_h +#ifndef __LOD_MESHEXCEPTION_H__ +#define __LOD_MESHEXCEPTION_H__ class LOD_MeshException { diff --git a/intern/decimation/intern/LOD_MeshPrimitives.h b/intern/decimation/intern/LOD_MeshPrimitives.h index e863f27e071..a43e29f3fe7 100644 --- a/intern/decimation/intern/LOD_MeshPrimitives.h +++ b/intern/decimation/intern/LOD_MeshPrimitives.h @@ -30,8 +30,8 @@ */ -#ifndef NAN_INCLUDED_MeshPrimitives_h -#define NAN_INCLUDED_MeshPrimitives_h +#ifndef __LOD_MESHPRIMITIVES_H__ +#define __LOD_MESHPRIMITIVES_H__ #include "MT_Vector3.h" #include "CTR_TaggedIndex.h" diff --git a/intern/decimation/intern/LOD_QSDecimator.h b/intern/decimation/intern/LOD_QSDecimator.h index d471186a360..2ac223996f2 100644 --- a/intern/decimation/intern/LOD_QSDecimator.h +++ b/intern/decimation/intern/LOD_QSDecimator.h @@ -30,8 +30,8 @@ */ -#ifndef NAN_INCLUDED_LOD_QSDecimator_H -#define NAN_INCLUDED_LOD_QSDecimator_H +#ifndef __LOD_QSDECIMATOR_H__ +#define __LOD_QSDECIMATOR_H__ #include "MEM_NonCopyable.h" #include "LOD_ManMesh2.h" diff --git a/intern/decimation/intern/LOD_Quadric.h b/intern/decimation/intern/LOD_Quadric.h index cb7846da2ca..9dde0502aa3 100644 --- a/intern/decimation/intern/LOD_Quadric.h +++ b/intern/decimation/intern/LOD_Quadric.h @@ -30,8 +30,8 @@ */ -#ifndef NAN_INCLUDED_LOD_Quadric_h -#define NAN_INCLUDED_LOD_Quadric_h +#ifndef __LOD_QUADRIC_H__ +#define __LOD_QUADRIC_H__ #include "MT_Vector3.h" #include "MT_Matrix3x3.h" diff --git a/intern/decimation/intern/LOD_QuadricEditor.h b/intern/decimation/intern/LOD_QuadricEditor.h index 0b0c7eead45..0a66d299e15 100644 --- a/intern/decimation/intern/LOD_QuadricEditor.h +++ b/intern/decimation/intern/LOD_QuadricEditor.h @@ -30,8 +30,8 @@ */ -#ifndef NAN_INCLUDED_LOD_QuadricEditor_h -#define NAN_INCLUDED_LOD_QuadricEditor_h +#ifndef __LOD_QUADRICEDITOR_H__ +#define __LOD_QUADRICEDITOR_H__ #include "MEM_NonCopyable.h" #include "LOD_ManMesh2.h" diff --git a/intern/dualcon/dualcon.h b/intern/dualcon/dualcon.h index 9346adc99b3..53135a7dcc1 100644 --- a/intern/dualcon/dualcon.h +++ b/intern/dualcon/dualcon.h @@ -20,8 +20,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DUALCON_H -#define DUALCON_H +#ifndef __DUALCON_H__ +#define __DUALCON_H__ #ifdef __cplusplus extern "C" { @@ -92,4 +92,4 @@ void *dualcon(const DualConInput *input_mesh, } #endif -#endif +#endif /* __DUALCON_H__ */ diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h index 582086d130b..bb2c4f2d0a4 100644 --- a/intern/ffmpeg/ffmpeg_compat.h +++ b/intern/ffmpeg/ffmpeg_compat.h @@ -1,8 +1,4 @@ -#ifndef __ffmpeg_compat_h_included__ -#define __ffmpeg_compat_h_included__ 1 - /* - * * compatibility macros to make every ffmpeg installation appear * like the most current installation (wrapping some functionality sometimes) * it also includes all ffmpeg header files at once, no need to do it @@ -22,10 +18,11 @@ * */ +#ifndef __FFMPEG_COMPAT_H__ +#define __FFMPEG_COMPAT_H__ #include - /* check our ffmpeg is new enough, avoids user complaints */ #if (LIBAVFORMAT_VERSION_MAJOR < 52) || ((LIBAVFORMAT_VERSION_MAJOR == 52) && (LIBAVFORMAT_VERSION_MINOR <= 64)) # error "FFmpeg 0.7 or newer is needed, Upgrade your FFmpeg or disable it" diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 35b617e5452..3d65f4972c4 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -220,11 +220,17 @@ elseif(UNIX) intern/GHOST_SystemX11.cpp intern/GHOST_SystemPathsX11.cpp intern/GHOST_WindowX11.cpp + intern/GHOST_DropTargetX11.cpp intern/GHOST_DisplayManagerX11.h intern/GHOST_SystemX11.h intern/GHOST_SystemPathsX11.h intern/GHOST_WindowX11.h + intern/GHOST_DropTargetX11.h + ) + + list(APPEND INC + ../../extern/xdnd ) if(X11_XF86keysym_INCLUDE_PATH) diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h index db66a68799e..b47c4444081 100644 --- a/intern/ghost/GHOST_C-api.h +++ b/intern/ghost/GHOST_C-api.h @@ -30,8 +30,8 @@ * \brief GHOST C-API function and type declarations. */ -#ifndef GHOST_C_API_H -#define GHOST_C_API_H +#ifndef __GHOST_C_API_H__ +#define __GHOST_C_API_H__ #include "GHOST_Types.h" diff --git a/intern/ghost/GHOST_IEvent.h b/intern/ghost/GHOST_IEvent.h index 4e181b91c9e..05bd3553e01 100644 --- a/intern/ghost/GHOST_IEvent.h +++ b/intern/ghost/GHOST_IEvent.h @@ -30,8 +30,8 @@ * Declaration of GHOST_IEvent interface class. */ -#ifndef _GHOST_IEVENT_H_ -#define _GHOST_IEVENT_H_ +#ifndef __GHOST_IEVENT_H__ +#define __GHOST_IEVENT_H__ #include #include "GHOST_Types.h" @@ -92,5 +92,5 @@ public: #endif }; -#endif // _GHOST_IEVENT_H_ +#endif // __GHOST_IEVENT_H__ diff --git a/intern/ghost/GHOST_IEventConsumer.h b/intern/ghost/GHOST_IEventConsumer.h index 9229595c90d..043cb27d1b2 100644 --- a/intern/ghost/GHOST_IEventConsumer.h +++ b/intern/ghost/GHOST_IEventConsumer.h @@ -30,8 +30,8 @@ * Declaration of GHOST_IEventConsumer interface class. */ -#ifndef _GHOST_IEVENT_CONSUMER_H_ -#define _GHOST_IEVENT_CONSUMER_H_ +#ifndef __GHOST_IEVENTCONSUMER_H__ +#define __GHOST_IEVENTCONSUMER_H__ #include "GHOST_IEvent.h" diff --git a/intern/ghost/GHOST_ISystem.h b/intern/ghost/GHOST_ISystem.h index ee67694760b..be44bbee99a 100644 --- a/intern/ghost/GHOST_ISystem.h +++ b/intern/ghost/GHOST_ISystem.h @@ -32,8 +32,8 @@ * Contains the doxygen documentation main page. */ -#ifndef _GHOST_ISYSTEM_H_ -#define _GHOST_ISYSTEM_H_ +#ifndef __GHOST_ISYSTEM_H__ +#define __GHOST_ISYSTEM_H__ #include "GHOST_Types.h" #include "GHOST_ITimerTask.h" @@ -416,5 +416,5 @@ public: #endif }; -#endif // _GHOST_ISYSTEM_H_ +#endif // __GHOST_ISYSTEM_H__ diff --git a/intern/ghost/GHOST_ISystemPaths.h b/intern/ghost/GHOST_ISystemPaths.h index 804cba721ff..dea5436c485 100644 --- a/intern/ghost/GHOST_ISystemPaths.h +++ b/intern/ghost/GHOST_ISystemPaths.h @@ -28,8 +28,8 @@ * \ingroup GHOST */ -#ifndef _GHOST_ISYSTEMPATHS_H_ -#define _GHOST_ISYSTEMPATHS_H_ +#ifndef __GHOST_ISYSTEMPATHS_H__ +#define __GHOST_ISYSTEMPATHS_H__ #include "GHOST_Types.h" diff --git a/intern/ghost/GHOST_ITimerTask.h b/intern/ghost/GHOST_ITimerTask.h index 95d75663401..bae41cf84d4 100644 --- a/intern/ghost/GHOST_ITimerTask.h +++ b/intern/ghost/GHOST_ITimerTask.h @@ -30,8 +30,8 @@ * Declaration of GHOST_ITimerTask interface class. */ -#ifndef _GHOST_ITIMER_TASK_H_ -#define _GHOST_ITIMER_TASK_H_ +#ifndef __GHOST_ITIMERTASK_H__ +#define __GHOST_ITIMERTASK_H__ #include "GHOST_Types.h" @@ -91,5 +91,5 @@ public: #endif }; -#endif // _GHOST_ITIMER_TASK_H_ +#endif // __GHOST_ITIMERTASK_H__ diff --git a/intern/ghost/GHOST_IWindow.h b/intern/ghost/GHOST_IWindow.h index 6438059287d..4ce8800fef6 100644 --- a/intern/ghost/GHOST_IWindow.h +++ b/intern/ghost/GHOST_IWindow.h @@ -30,8 +30,8 @@ * Declaration of GHOST_IWindow interface class. */ -#ifndef _GHOST_IWINDOW_H_ -#define _GHOST_IWINDOW_H_ +#ifndef __GHOST_IWINDOW_H__ +#define __GHOST_IWINDOW_H__ #include "STR_String.h" #include "GHOST_Rect.h" @@ -312,5 +312,5 @@ public: #endif }; -#endif // _GHOST_IWINDOW_H_ +#endif // __GHOST_IWINDOW_H__ diff --git a/intern/ghost/GHOST_Path-api.h b/intern/ghost/GHOST_Path-api.h index abe837b6290..f1b79a98082 100644 --- a/intern/ghost/GHOST_Path-api.h +++ b/intern/ghost/GHOST_Path-api.h @@ -30,8 +30,8 @@ */ -#ifndef GHOST_PATH_API_H -#define GHOST_PATH_API_H +#ifndef __GHOST_PATH_API_H__ +#define __GHOST_PATH_API_H__ #include "GHOST_Types.h" diff --git a/intern/ghost/GHOST_Rect.h b/intern/ghost/GHOST_Rect.h index c3b9460a14f..bcbcaded364 100644 --- a/intern/ghost/GHOST_Rect.h +++ b/intern/ghost/GHOST_Rect.h @@ -30,8 +30,8 @@ * Macro's used in GHOST debug target. */ -#ifndef _H_GHOST_Rect -#define _H_GHOST_Rect +#ifndef __GHOST_RECT_H__ +#define __GHOST_RECT_H__ #include "GHOST_Types.h" @@ -254,5 +254,5 @@ inline bool GHOST_Rect::isInside(GHOST_TInt32 x, GHOST_TInt32 y) const return (x >= m_l) && (x <= m_r) && (y >= m_t) && (y <= m_b); } -#endif // _H_GHOST_Rect +#endif // __GHOST_RECT_H__ diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index 41496bca993..583bfdf1f84 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -30,8 +30,8 @@ */ -#ifndef _GHOST_TYPES_H_ -#define _GHOST_TYPES_H_ +#ifndef __GHOST_TYPES_H__ +#define __GHOST_TYPES_H__ #ifdef WITH_CXX_GUARDEDALLOC #include "MEM_guardedalloc.h" @@ -515,5 +515,5 @@ struct GHOST_TimerTaskHandle__; typedef void (*GHOST_TimerProcPtr)(struct GHOST_TimerTaskHandle__* task, GHOST_TUns64 time); #endif -#endif // _GHOST_TYPES_H_ +#endif // __GHOST_TYPES_H__ diff --git a/intern/ghost/SConscript b/intern/ghost/SConscript index 68a0cbf7bdd..d83107717fc 100644 --- a/intern/ghost/SConscript +++ b/intern/ghost/SConscript @@ -42,6 +42,8 @@ elif window_system in ('linux', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'f # defs += ['PREFIX=\\"/usr/local/\\"'] # XXX, make an option defs += ['WITH_X11_XINPUT'] # XXX, make an option + incs += ' #/extern/xdnd' + elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'): for f in pf: try: diff --git a/intern/ghost/intern/GHOST_Buttons.h b/intern/ghost/intern/GHOST_Buttons.h index 0209dc304e4..ea1cce574b8 100644 --- a/intern/ghost/intern/GHOST_Buttons.h +++ b/intern/ghost/intern/GHOST_Buttons.h @@ -30,8 +30,8 @@ * Declaration of GHOST_Buttons struct. */ -#ifndef _GHOST_BUTTONS_H_ -#define _GHOST_BUTTONS_H_ +#ifndef __GHOST_BUTTONS_H__ +#define __GHOST_BUTTONS_H__ #include "GHOST_Types.h" @@ -74,5 +74,5 @@ struct GHOST_Buttons { GHOST_TUns8 m_ButtonRight : 1; }; -#endif // _GHOST_BUTTONS_H_ +#endif // __GHOST_BUTTONS_H__ diff --git a/intern/ghost/intern/GHOST_CallbackEventConsumer.h b/intern/ghost/intern/GHOST_CallbackEventConsumer.h index 8c16f53025c..e7a1aed507d 100644 --- a/intern/ghost/intern/GHOST_CallbackEventConsumer.h +++ b/intern/ghost/intern/GHOST_CallbackEventConsumer.h @@ -30,8 +30,8 @@ * Declaration of GHOST_CallbackEventConsumer class. */ -#ifndef _GHOST_CALLBACK_EVENT_CONSUMER_H_ -#define _GHOST_CALLBACK_EVENT_CONSUMER_H_ +#ifndef __GHOST_CALLBACKEVENTCONSUMER_H__ +#define __GHOST_CALLBACKEVENTCONSUMER_H__ #include "GHOST_IEventConsumer.h" #include "GHOST_C-api.h" @@ -75,5 +75,5 @@ protected: GHOST_TUserDataPtr m_userData; }; -#endif // _GHOST_CALLBACK_EVENT_CONSUMER_H_ +#endif // __GHOST_CALLBACKEVENTCONSUMER_H__ diff --git a/intern/ghost/intern/GHOST_Debug.h b/intern/ghost/intern/GHOST_Debug.h index 38512f6ce2b..a6392fce9bf 100644 --- a/intern/ghost/intern/GHOST_Debug.h +++ b/intern/ghost/intern/GHOST_Debug.h @@ -30,8 +30,8 @@ * Macro's used in GHOST debug target. */ -#ifndef _GHOST_DEBUG_H_ -#define _GHOST_DEBUG_H_ +#ifndef __GHOST_DEBUG_H__ +#define __GHOST_DEBUG_H__ #if defined(WIN32) && !defined(FREE_WINDOWS) # ifdef DEBUG @@ -72,5 +72,5 @@ # define GHOST_ASSERT(x, info) #endif // GHOST_DEBUG -#endif // _GHOST_DEBUG_H_ +#endif // __GHOST_DEBUG_H__ diff --git a/intern/ghost/intern/GHOST_DisplayManager.h b/intern/ghost/intern/GHOST_DisplayManager.h index b89f303c734..3e867054d01 100644 --- a/intern/ghost/intern/GHOST_DisplayManager.h +++ b/intern/ghost/intern/GHOST_DisplayManager.h @@ -30,8 +30,8 @@ * Declaration of GHOST_DisplayManager class. */ -#ifndef _GHOST_DISPLAY_MANAGER_H_ -#define _GHOST_DISPLAY_MANAGER_H_ +#ifndef __GHOST_DISPLAYMANAGER_H__ +#define __GHOST_DISPLAYMANAGER_H__ #include "GHOST_Types.h" @@ -136,5 +136,5 @@ protected: }; -#endif // _GHOST_DISPLAY_MANAGER_H_ +#endif // __GHOST_DISPLAYMANAGER_H__ diff --git a/intern/ghost/intern/GHOST_DisplayManagerCarbon.h b/intern/ghost/intern/GHOST_DisplayManagerCarbon.h index 1a3c0d995b9..93467b8f462 100644 --- a/intern/ghost/intern/GHOST_DisplayManagerCarbon.h +++ b/intern/ghost/intern/GHOST_DisplayManagerCarbon.h @@ -30,8 +30,8 @@ * Declaration of GHOST_DisplayManagerCarbon class. */ -#ifndef _GHOST_DISPLAY_MANAGER_CARBON_H_ -#define _GHOST_DISPLAY_MANAGER_CARBON_H_ +#ifndef __GHOST_DISPLAYMANAGERCARBON_H__ +#define __GHOST_DISPLAYMANAGERCARBON_H__ #ifndef __APPLE__ #error Apple only! @@ -112,5 +112,5 @@ protected: }; -#endif // _GHOST_DISPLAY_MANAGER_CARBON_H_ +#endif // __GHOST_DISPLAYMANAGERCARBON_H__ diff --git a/intern/ghost/intern/GHOST_DisplayManagerCocoa.h b/intern/ghost/intern/GHOST_DisplayManagerCocoa.h index 7e12ca18aa2..bf194ad0492 100644 --- a/intern/ghost/intern/GHOST_DisplayManagerCocoa.h +++ b/intern/ghost/intern/GHOST_DisplayManagerCocoa.h @@ -30,8 +30,8 @@ * Declaration of GHOST_DisplayManagerCocoa class. */ -#ifndef _GHOST_DISPLAY_MANAGER_COCOA_H_ -#define _GHOST_DISPLAY_MANAGER_COCOA_H_ +#ifndef __GHOST_DISPLAYMANAGERCOCOA_H__ +#define __GHOST_DISPLAYMANAGERCOCOA_H__ #ifndef __APPLE__ #error Apple only! @@ -102,5 +102,5 @@ protected: }; -#endif // _GHOST_DISPLAY_MANAGER_COCOA_H_ +#endif // __GHOST_DISPLAYMANAGERCOCOA_H__ diff --git a/intern/ghost/intern/GHOST_DisplayManagerNULL.h b/intern/ghost/intern/GHOST_DisplayManagerNULL.h index 5d3f0168c52..31fb9faf0cf 100644 --- a/intern/ghost/intern/GHOST_DisplayManagerNULL.h +++ b/intern/ghost/intern/GHOST_DisplayManagerNULL.h @@ -25,8 +25,8 @@ * Declaration of GHOST_DisplayManagerNULL class. */ -#ifndef _GHOST_DISPLAY_MANAGER_NULL_H_ -#define _GHOST_DISPLAY_MANAGER_NULL_H_ +#ifndef __GHOST_DISPLAYMANAGERNULL_H__ +#define __GHOST_DISPLAYMANAGERNULL_H__ #include "GHOST_DisplayManager.h" #include "GHOST_SystemNULL.h" @@ -47,4 +47,4 @@ private : GHOST_SystemNULL * m_system; }; -#endif /* _GHOST_DISPLAY_MANAGER_NULL_H_ */ +#endif /* __GHOST_DISPLAYMANAGERNULL_H__ */ diff --git a/intern/ghost/intern/GHOST_DisplayManagerSDL.h b/intern/ghost/intern/GHOST_DisplayManagerSDL.h index 297a61f41ff..72f756f653a 100644 --- a/intern/ghost/intern/GHOST_DisplayManagerSDL.h +++ b/intern/ghost/intern/GHOST_DisplayManagerSDL.h @@ -25,8 +25,8 @@ * Declaration of GHOST_DisplayManagerSDL class. */ -#ifndef _GHOST_DISPLAY_MANAGER_SDL_H_ -#define _GHOST_DISPLAY_MANAGER_SDL_H_ +#ifndef __GHOST_DISPLAYMANAGERSDL_H__ +#define __GHOST_DISPLAYMANAGERSDL_H__ #include "GHOST_DisplayManager.h" @@ -69,4 +69,4 @@ private : GHOST_SystemSDL * m_system; }; -#endif /* _GHOST_DISPLAY_MANAGER_SDL_H_ */ +#endif /* __GHOST_DISPLAYMANAGERSDL_H__ */ diff --git a/intern/ghost/intern/GHOST_DisplayManagerWin32.h b/intern/ghost/intern/GHOST_DisplayManagerWin32.h index 84749d42dbb..534274ec878 100644 --- a/intern/ghost/intern/GHOST_DisplayManagerWin32.h +++ b/intern/ghost/intern/GHOST_DisplayManagerWin32.h @@ -30,8 +30,8 @@ * Declaration of GHOST_DisplayManagerWin32 class. */ -#ifndef _GHOST_DISPLAY_MANAGER_WIN32_H_ -#define _GHOST_DISPLAY_MANAGER_WIN32_H_ +#ifndef __GHOST_DISPLAYMANAGERWIN32_H__ +#define __GHOST_DISPLAYMANAGERWIN32_H__ #ifndef WIN32 #error WIN32 only! @@ -97,5 +97,5 @@ protected: }; -#endif // _GHOST_DISPLAY_MANAGER_WIN32_H_ +#endif // __GHOST_DISPLAYMANAGERWIN32_H__ diff --git a/intern/ghost/intern/GHOST_DisplayManagerX11.h b/intern/ghost/intern/GHOST_DisplayManagerX11.h index 62374b9170a..c4d2b6dbb0a 100644 --- a/intern/ghost/intern/GHOST_DisplayManagerX11.h +++ b/intern/ghost/intern/GHOST_DisplayManagerX11.h @@ -30,8 +30,8 @@ * Declaration of GHOST_DisplayManagerX11 class. */ -#ifndef _GHOST_DISPLAY_MANAGER_X11_H_ -#define _GHOST_DISPLAY_MANAGER_X11_H_ +#ifndef __GHOST_DISPLAYMANAGERX11_H__ +#define __GHOST_DISPLAYMANAGERX11_H__ #include "GHOST_DisplayManager.h" diff --git a/intern/ghost/intern/GHOST_DropTargetWin32.h b/intern/ghost/intern/GHOST_DropTargetWin32.h index 0e8b2d15991..9f80b82436e 100644 --- a/intern/ghost/intern/GHOST_DropTargetWin32.h +++ b/intern/ghost/intern/GHOST_DropTargetWin32.h @@ -29,8 +29,8 @@ * \ingroup GHOST */ -#ifndef _GHOST_DROP_TARGET_WIN32_H_ -#define _GHOST_DROP_TARGET_WIN32_H_ +#ifndef __GHOST_DROPTARGETWIN32_H__ +#define __GHOST_DROPTARGETWIN32_H__ #include #include @@ -155,4 +155,4 @@ private: }; -#endif // _GHOST_DROP_TARGET_WIN32_H_ +#endif // __GHOST_DROPTARGETWIN32_H__ diff --git a/intern/ghost/intern/GHOST_DropTargetX11.cpp b/intern/ghost/intern/GHOST_DropTargetX11.cpp new file mode 100644 index 00000000000..2239ac63d33 --- /dev/null +++ b/intern/ghost/intern/GHOST_DropTargetX11.cpp @@ -0,0 +1,310 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2012 by the Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Sergey Sharybin. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file ghost/intern/GHOST_DropTargetX11.cpp + * \ingroup GHOST + */ + +#include "GHOST_DropTargetX11.h" +#include "GHOST_Debug.h" + +#include +#include + +bool GHOST_DropTargetX11::m_xdndInitialized = false; +DndClass GHOST_DropTargetX11::m_dndClass; +Atom * GHOST_DropTargetX11::m_dndTypes = NULL; +Atom * GHOST_DropTargetX11::m_dndActions = NULL; +const char *GHOST_DropTargetX11::m_dndMimeTypes[] = {"url/url", "text/uri-list", "text/plain", "application/octet-stream"}; +int GHOST_DropTargetX11::m_refCounter = 0; + +#define dndTypeURLID 0 +#define dndTypeURIListID 1 +#define dndTypePlainTextID 2 +#define dndTypeOctetStreamID 3 + +#define dndTypeURL m_dndTypes[dndTypeURLID] +#define dndTypeURIList m_dndTypes[dndTypeURIListID] +#define dndTypePlainText m_dndTypes[dndTypePlainTextID] +#define dndTypeOctetStream m_dndTypes[dndTypeOctetStreamID] + +void GHOST_DropTargetX11::Initialize(void) +{ + Display *display = m_system->getXDisplay(); + int dndTypesCount = sizeof(m_dndMimeTypes) / sizeof(char*); + int counter; + + xdnd_init(&m_dndClass, display); + + m_dndTypes = new Atom[dndTypesCount + 1]; + XInternAtoms(display, (char**)m_dndMimeTypes, dndTypesCount, 0, m_dndTypes); + m_dndTypes[dndTypesCount] = 0; + + m_dndActions = new Atom[8]; + counter = 0; + + m_dndActions[counter++] = m_dndClass.XdndActionCopy; + m_dndActions[counter++] = m_dndClass.XdndActionMove; + +#if 0 /* Not supported yet */ + dndActions[counter++] = dnd->XdndActionLink; + dndActions[counter++] = dnd->XdndActionAsk; + dndActions[counter++] = dnd->XdndActionPrivate; + dndActions[counter++] = dnd->XdndActionList; + dndActions[counter++] = dnd->XdndActionDescription; +#endif + + m_dndActions[counter++] = 0; +} + +void GHOST_DropTargetX11::Uninitialize(void) +{ + xdnd_shut(&m_dndClass); +} + +GHOST_DropTargetX11::GHOST_DropTargetX11(GHOST_WindowX11 * window, GHOST_SystemX11 * system) +: +m_window(window), +m_system(system) +{ + if (!m_xdndInitialized) { + Initialize(); + m_xdndInitialized = true; + GHOST_PRINT("XDND initialized\n"); + } + + Window wnd = window->getXWindow(); + + xdnd_set_dnd_aware(&m_dndClass, wnd, 0); + xdnd_set_type_list(&m_dndClass, wnd, m_dndTypes); + + m_draggedObjectType = GHOST_kDragnDropTypeUnknown; + m_refCounter++; +} + +GHOST_DropTargetX11::~GHOST_DropTargetX11() +{ + m_refCounter--; + if (m_refCounter == 0) { + Uninitialize(); + m_xdndInitialized = false; + GHOST_PRINT("XDND uninitialized\n"); + } +} + +/* based on a code from Saul Rennison + * http://stackoverflow.com/questions/2673207/c-c-url-decode-library */ + +typedef enum DecodeState_e { + STATE_SEARCH = 0, ///< searching for an ampersand to convert + STATE_CONVERTING ///< convert the two proceeding characters from hex +} DecodeState_e; + +void GHOST_DropTargetX11::UrlDecode(char *decodedOut, int bufferSize, const char *encodedIn) +{ + unsigned int i; + unsigned int len = strlen(encodedIn); + DecodeState_e state = STATE_SEARCH; + int j, asciiCharacter; + char tempNumBuf[3] = {0}; + bool bothDigits = true; + + memset(decodedOut, 0, bufferSize); + + for (i = 0; i < len; ++i) { + switch (state) { + case STATE_SEARCH: + if (encodedIn[i] != '%') { + strncat(decodedOut, &encodedIn[i], 1); + assert(strlen(decodedOut) < bufferSize); + break; + } + + // We are now converting + state = STATE_CONVERTING; + break; + + case STATE_CONVERTING: + bothDigits = true; + + // Create a buffer to hold the hex. For example, if %20, this + // buffer would hold 20 (in ASCII) + memset(tempNumBuf, 0, sizeof(tempNumBuf)); + + // Conversion complete (i.e. don't convert again next iter) + state = STATE_SEARCH; + + strncpy(tempNumBuf, &encodedIn[i], 2); + + // Ensure both characters are hexadecimal + + for (j = 0; j < 2; ++j) { + if (!isxdigit(tempNumBuf[j])) + bothDigits = false; + } + + if (!bothDigits) + break; + + // Convert two hexadecimal characters into one character + sscanf(tempNumBuf, "%x", &asciiCharacter); + + // Ensure we aren't going to overflow + assert(strlen(decodedOut) < bufferSize); + + // Concatenate this character onto the output + strncat(decodedOut, (char*)&asciiCharacter, 1); + + // Skip the next character + i++; + break; + } + } +} + +char *GHOST_DropTargetX11::FileUrlDecode(char *fileUrl) +{ + if(!strncpy(fileUrl, "file://", 7) == 0) { + /* assume one character of encoded URL can be expanded to 4 chars max */ + int decodedSize = 4 * strlen(fileUrl) + 1; + char *decodedPath = (char *)malloc(decodedSize); + + UrlDecode(decodedPath, decodedSize, fileUrl + 7); + + return decodedPath; + } + + return NULL; +} + +void *GHOST_DropTargetX11::getURIListGhostData(unsigned char *dropBuffer, int dropBufferSize) +{ + GHOST_TStringArray *strArray = NULL; + int totPaths = 0, curLength = 0; + + /* count total number of file pathes in buffer */ + for (int i = 0; i <= dropBufferSize; i++) { + if (dropBuffer[i] == 0 || dropBuffer[i] == '\n' || dropBuffer[i] == '\r') { + if (curLength) { + totPaths++; + curLength = 0; + } + } + else curLength++; + } + + strArray = (GHOST_TStringArray*)malloc(sizeof(GHOST_TStringArray)); + strArray->count = 0; + strArray->strings = (GHOST_TUns8**)malloc(totPaths*sizeof(GHOST_TUns8*)); + + curLength = 0; + for (int i = 0; i <= dropBufferSize; i++) { + if (dropBuffer[i] == 0 || dropBuffer[i] == '\n' || dropBuffer[i] == '\r') { + if (curLength) { + char *curPath = (char *)malloc(curLength + 1); + char *decodedPath; + + strncpy(curPath, (char*)dropBuffer + i - curLength, curLength); + curPath[curLength] = 0; + + decodedPath = FileUrlDecode(curPath); + if(decodedPath) { + strArray->strings[strArray->count] = (GHOST_TUns8*)decodedPath; + strArray->count++; + } + + free(curPath); + curLength = 0; + } + } + else curLength++; + } + + return strArray; +} + +void *GHOST_DropTargetX11::getGhostData(Atom dropType, unsigned char *dropBuffer, int dropBufferSize) +{ + void *data = NULL; + unsigned char *tmpBuffer = (unsigned char *)malloc(dropBufferSize + 1); + bool needsFree = true; + + /* ensure NULL-terminator */ + memcpy(tmpBuffer, dropBuffer, dropBufferSize); + tmpBuffer[dropBufferSize] = 0; + + if (dropType == dndTypeURIList) { + m_draggedObjectType = GHOST_kDragnDropTypeFilenames; + data = getURIListGhostData(tmpBuffer, dropBufferSize); + } + else if (dropType == dndTypeURL) { + /* need to be tested */ + char *decodedPath = FileUrlDecode((char *)tmpBuffer); + + if (decodedPath) { + m_draggedObjectType = GHOST_kDragnDropTypeString; + data = decodedPath; + } + } + else if (dropType == dndTypePlainText || dropType == dndTypeOctetStream) { + m_draggedObjectType = GHOST_kDragnDropTypeString; + data = tmpBuffer; + needsFree = false; + } + else { + m_draggedObjectType = GHOST_kDragnDropTypeUnknown; + } + + if (needsFree) + free(tmpBuffer); + + return data; +} + +bool GHOST_DropTargetX11::GHOST_HandleClientMessage(XEvent *event) +{ + Atom dropType; + unsigned char *dropBuffer; + int dropBufferSize, dropX, dropY; + + if (xdnd_get_drop(m_system->getXDisplay(), event, m_dndTypes, m_dndActions, + &dropBuffer, &dropBufferSize, &dropType, &dropX, &dropY)) + { + void *data = getGhostData(dropType, dropBuffer, dropBufferSize); + + if (data) + m_system->pushDragDropEvent(GHOST_kEventDraggingDropDone, m_draggedObjectType, m_window, dropX, dropY, data); + + free(dropBuffer); + + m_draggedObjectType = GHOST_kDragnDropTypeUnknown; + + return true; + } + + return false; +} diff --git a/intern/ghost/intern/GHOST_DropTargetX11.h b/intern/ghost/intern/GHOST_DropTargetX11.h new file mode 100644 index 00000000000..b9e17dcc93b --- /dev/null +++ b/intern/ghost/intern/GHOST_DropTargetX11.h @@ -0,0 +1,135 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2012 by the Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Sergey Sharybin. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file ghost/intern/GHOST_DropTargetWin32.h + * \ingroup GHOST + */ + +#ifndef __GHOST_DROPTARGETX11_H__ +#define __GHOST_DROPTARGETX11_H__ + +#include +#include "GHOST_WindowX11.h" +#include "GHOST_SystemX11.h" + +#include "xdnd.h" + +class GHOST_DropTargetX11 +{ +public: + /** + * Constructor + * + * @param window The window to register as drop target. + * @param system The associated system. + */ + GHOST_DropTargetX11(GHOST_WindowX11 * window, GHOST_SystemX11 * system); + + /** + * Destructor + */ + ~GHOST_DropTargetX11(); + + /** + * Handler of ClientMessage X11 event + */ + bool GHOST_HandleClientMessage(XEvent *event); + + /** + * Get data to pass in event. + * It checks the type and calls specific functions for each type. + * @param dropType - type of dropped entity. + * @param dropBuffer - buffer returned from source application + * @param dropBufferSize - size of returned buffer + * @return Pointer to data. + */ + void *getGhostData(Atom dropType, unsigned char *dropBuffer, int dropBufferSize); + +private: + /* Internal helper functions */ + + /** + * Initiailize XDND and all related X atoms + */ + void Initialize(void); + + /** + * Uninitiailize XDND and all related X atoms + */ + void Uninitialize(void); + + /** + * Get data to be passed to event from text/uri-list mime type + * @param dropBuffer - buffer returned from source application + * @param dropBufferSize - size of dropped buffer + * @return pointer to newly created GHOST data + */ + void * getURIListGhostData(unsigned char *dropBuffer, int dropBufferSize); + + /** + * Decode URL (i.e. converts "file:///a%20b/test" to "file:///a b/test") + * @param decodedOut - buffer for decoded URL + * @param bufferSize - size of output buffer + * @param encodedIn - input encoded buffer to be decoded + */ + void UrlDecode(char *decodedOut, int bufferSize, const char *encodedIn); + + /** + * Fully decode file URL (i.e. converts "file:///a%20b/test" to "/a b/test") + * @param fileUrl - file path URL to be fully decoded + * @return decoded file path (resutl shold be free-d) + */ + char *FileUrlDecode(char *fileUrl); + + /* The associated GHOST_WindowWin32. */ + GHOST_WindowX11 * m_window; + /* The System. */ + GHOST_SystemX11 * m_system; + + /* Data type of the dragged object */ + GHOST_TDragnDropTypes m_draggedObjectType; + + /* is dnd stuff initialzied */ + static bool m_xdndInitialized; + + /* class holding internal stiff of xdnd library */ + static DndClass m_dndClass; + + /* list of supported types to eb draggeg into */ + static Atom * m_dndTypes; + + /* list of supported dran'n'drop actions */ + static Atom * m_dndActions; + + /* List of supported MIME types to be dragged into */ + static const char *m_dndMimeTypes[]; + + /* counter of references to global XDND structures */ + static int m_refCounter; +}; + +#endif // __GHOST_DROPTARGETX11_H__ diff --git a/intern/ghost/intern/GHOST_Event.h b/intern/ghost/intern/GHOST_Event.h index aa626f8970d..c7f86f2502d 100644 --- a/intern/ghost/intern/GHOST_Event.h +++ b/intern/ghost/intern/GHOST_Event.h @@ -30,8 +30,8 @@ * Declaration of GHOST_Event class. */ -#ifndef _GHOST_EVENT_H_ -#define _GHOST_EVENT_H_ +#ifndef __GHOST_EVENT_H__ +#define __GHOST_EVENT_H__ #include "GHOST_IEvent.h" @@ -103,5 +103,5 @@ protected: GHOST_TEventDataPtr m_data; }; -#endif // _GHOST_EVENT_H_ +#endif // __GHOST_EVENT_H__ diff --git a/intern/ghost/intern/GHOST_EventButton.h b/intern/ghost/intern/GHOST_EventButton.h index 3911e2a8bb5..7c869190b16 100644 --- a/intern/ghost/intern/GHOST_EventButton.h +++ b/intern/ghost/intern/GHOST_EventButton.h @@ -30,8 +30,8 @@ * Declaration of GHOST_EventButton class. */ -#ifndef _GHOST_EVENT_BUTTON_H_ -#define _GHOST_EVENT_BUTTON_H_ +#ifndef __GHOST_EVENTBUTTON_H__ +#define __GHOST_EVENTBUTTON_H__ #include "GHOST_Event.h" @@ -63,5 +63,5 @@ protected: GHOST_TEventButtonData m_buttonEventData; }; -#endif // _GHOST_EVENT_BUTTON_H_ +#endif // __GHOST_EVENTBUTTON_H__ diff --git a/intern/ghost/intern/GHOST_EventCursor.h b/intern/ghost/intern/GHOST_EventCursor.h index 863538b442f..749bd8a6922 100644 --- a/intern/ghost/intern/GHOST_EventCursor.h +++ b/intern/ghost/intern/GHOST_EventCursor.h @@ -30,8 +30,8 @@ * Declaration of GHOST_EventCursor class. */ -#ifndef _GHOST_EVENT_CURSOR_H_ -#define _GHOST_EVENT_CURSOR_H_ +#ifndef __GHOST_EVENTCURSOR_H__ +#define __GHOST_EVENTCURSOR_H__ #include "GHOST_Event.h" @@ -64,5 +64,5 @@ protected: }; -#endif // _GHOST_EVENT_CURSOR_H_ +#endif // __GHOST_EVENTCURSOR_H__ diff --git a/intern/ghost/intern/GHOST_EventDragnDrop.h b/intern/ghost/intern/GHOST_EventDragnDrop.h index 330635de50a..4e256a386c0 100644 --- a/intern/ghost/intern/GHOST_EventDragnDrop.h +++ b/intern/ghost/intern/GHOST_EventDragnDrop.h @@ -30,8 +30,8 @@ */ -#ifndef _GHOST_EVENT_DRAGNDROP_H_ -#define _GHOST_EVENT_DRAGNDROP_H_ +#ifndef __GHOST_EVENTDRAGNDROP_H__ +#define __GHOST_EVENTDRAGNDROP_H__ #include "GHOST_Event.h" extern "C" { @@ -131,5 +131,5 @@ protected: GHOST_TEventDragnDropData m_dragnDropEventData; }; -#endif // _GHOST_EVENT_DRAGNDROP_H_ +#endif // __GHOST_EVENTDRAGNDROP_H__ diff --git a/intern/ghost/intern/GHOST_EventKey.h b/intern/ghost/intern/GHOST_EventKey.h index a602bd65e5a..ae3ef374431 100644 --- a/intern/ghost/intern/GHOST_EventKey.h +++ b/intern/ghost/intern/GHOST_EventKey.h @@ -30,8 +30,8 @@ * Declaration of GHOST_EventKey class. */ -#ifndef _GHOST_EVENT_KEY_H_ -#define _GHOST_EVENT_KEY_H_ +#ifndef __GHOST_EVENTKEY_H__ +#define __GHOST_EVENTKEY_H__ #include "GHOST_Event.h" @@ -88,5 +88,5 @@ protected: GHOST_TEventKeyData m_keyEventData; }; -#endif // _GHOST_EVENT_KEY_H_ +#endif // __GHOST_EVENTKEY_H__ diff --git a/intern/ghost/intern/GHOST_EventManager.h b/intern/ghost/intern/GHOST_EventManager.h index ad2622ae436..bc43a5c5d07 100644 --- a/intern/ghost/intern/GHOST_EventManager.h +++ b/intern/ghost/intern/GHOST_EventManager.h @@ -30,8 +30,8 @@ * Declaration of GHOST_EventManager class. */ -#ifndef _GHOST_EVENT_MANAGER_H_ -#define _GHOST_EVENT_MANAGER_H_ +#ifndef __GHOST_EVENTMANAGER_H__ +#define __GHOST_EVENTMANAGER_H__ #include #include @@ -170,5 +170,5 @@ protected: TConsumerVector m_consumers; }; -#endif // _GHOST_EVENT_MANAGER_H_ +#endif // __GHOST_EVENTMANAGER_H__ diff --git a/intern/ghost/intern/GHOST_EventNDOF.h b/intern/ghost/intern/GHOST_EventNDOF.h index fceacce0805..f256f343823 100644 --- a/intern/ghost/intern/GHOST_EventNDOF.h +++ b/intern/ghost/intern/GHOST_EventNDOF.h @@ -25,8 +25,8 @@ * Declaration of GHOST_EventManager class. */ -#ifndef _GHOST_EVENT_NDOF_H_ -#define _GHOST_EVENT_NDOF_H_ +#ifndef __GHOST_EVENTNDOF_H__ +#define __GHOST_EVENTNDOF_H__ #include "GHOST_Event.h" @@ -59,4 +59,4 @@ class GHOST_EventNDOFButton : public GHOST_Event }; -#endif // _GHOST_EVENT_NDOF_H_ +#endif // __GHOST_EVENTNDOF_H__ diff --git a/intern/ghost/intern/GHOST_EventPrinter.h b/intern/ghost/intern/GHOST_EventPrinter.h index 523bd4e3185..7c2378db301 100644 --- a/intern/ghost/intern/GHOST_EventPrinter.h +++ b/intern/ghost/intern/GHOST_EventPrinter.h @@ -30,8 +30,8 @@ * Declaration of GHOST_EventPrinter class. */ -#ifndef _GHOST_EVENT_PRINTER_H_ -#define _GHOST_EVENT_PRINTER_H_ +#ifndef __GHOST_EVENTPRINTER_H__ +#define __GHOST_EVENTPRINTER_H__ #include "GHOST_IEventConsumer.h" @@ -60,5 +60,5 @@ protected: void getKeyString(GHOST_TKey key, char str[32]) const; }; -#endif // _GHOST_EVENT_PRINTER_H_ +#endif // __GHOST_EVENTPRINTER_H__ diff --git a/intern/ghost/intern/GHOST_EventString.h b/intern/ghost/intern/GHOST_EventString.h index e8735fdfbbe..90e914e3b5c 100644 --- a/intern/ghost/intern/GHOST_EventString.h +++ b/intern/ghost/intern/GHOST_EventString.h @@ -30,8 +30,8 @@ * Declaration of GHOST_EventString class. */ -#ifndef _GHOST_EVENTSTRING_H_ -#define _GHOST_EVENTSTRING_H_ +#ifndef __GHOST_EVENTSTRING_H__ +#define __GHOST_EVENTSTRING_H__ #include "GHOST_Event.h" @@ -62,5 +62,5 @@ public: } }; -#endif // _GHOST_EVENTSTRING_H_ +#endif // __GHOST_EVENTSTRING_H__ diff --git a/intern/ghost/intern/GHOST_EventTrackpad.h b/intern/ghost/intern/GHOST_EventTrackpad.h index 55517f0a76c..9a3456bbb57 100644 --- a/intern/ghost/intern/GHOST_EventTrackpad.h +++ b/intern/ghost/intern/GHOST_EventTrackpad.h @@ -31,8 +31,8 @@ * Declaration of GHOST_EventTrackpad class. */ -#ifndef _GHOST_EVENT_TRACKPAD_H_ -#define _GHOST_EVENT_TRACKPAD_H_ +#ifndef __GHOST_EVENTTRACKPAD_H__ +#define __GHOST_EVENTTRACKPAD_H__ #include "GHOST_Event.h" diff --git a/intern/ghost/intern/GHOST_EventWheel.h b/intern/ghost/intern/GHOST_EventWheel.h index 2a82ab8a630..1b7468dbc6e 100644 --- a/intern/ghost/intern/GHOST_EventWheel.h +++ b/intern/ghost/intern/GHOST_EventWheel.h @@ -30,8 +30,8 @@ * Declaration of GHOST_EventWheel class. */ -#ifndef _GHOST_EVENT_WHEEL_H_ -#define _GHOST_EVENT_WHEEL_H_ +#ifndef __GHOST_EVENTWHEEL_H__ +#define __GHOST_EVENTWHEEL_H__ #include "GHOST_Event.h" @@ -64,5 +64,5 @@ protected: }; -#endif // _GHOST_EVENT_WHEEL_H_ +#endif // __GHOST_EVENTWHEEL_H__ diff --git a/intern/ghost/intern/GHOST_ModifierKeys.h b/intern/ghost/intern/GHOST_ModifierKeys.h index 1cb1272290c..0b690323022 100644 --- a/intern/ghost/intern/GHOST_ModifierKeys.h +++ b/intern/ghost/intern/GHOST_ModifierKeys.h @@ -30,8 +30,8 @@ * Declaration of GHOST_ModifierKeys struct. */ -#ifndef _GHOST_MODIFIER_KEYS_H_ -#define _GHOST_MODIFIER_KEYS_H_ +#ifndef __GHOST_MODIFIERKEYS_H__ +#define __GHOST_MODIFIERKEYS_H__ #include "GHOST_Types.h" @@ -100,5 +100,5 @@ struct GHOST_ModifierKeys GHOST_TUns8 m_OS : 1; }; -#endif // _GHOST_MODIFIER_KEYS_H_ +#endif // __GHOST_MODIFIERKEYS_H__ diff --git a/intern/ghost/intern/GHOST_NDOFManager.h b/intern/ghost/intern/GHOST_NDOFManager.h index c4e980bb895..9d72691b746 100644 --- a/intern/ghost/intern/GHOST_NDOFManager.h +++ b/intern/ghost/intern/GHOST_NDOFManager.h @@ -21,8 +21,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef _GHOST_NDOFMANAGER_H_ -#define _GHOST_NDOFMANAGER_H_ +#ifndef __GHOST_NDOFMANAGER_H__ +#define __GHOST_NDOFMANAGER_H__ #include "GHOST_System.h" diff --git a/intern/ghost/intern/GHOST_NDOFManagerCocoa.h b/intern/ghost/intern/GHOST_NDOFManagerCocoa.h index 7a33d8455ce..8d8081ebb5c 100644 --- a/intern/ghost/intern/GHOST_NDOFManagerCocoa.h +++ b/intern/ghost/intern/GHOST_NDOFManagerCocoa.h @@ -21,8 +21,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef _GHOST_NDOFMANAGERCOCOA_H_ -#define _GHOST_NDOFMANAGERCOCOA_H_ +#ifndef __GHOST_NDOFMANAGERCOCOA_H__ +#define __GHOST_NDOFMANAGERCOCOA_H__ #ifdef WITH_INPUT_NDOF diff --git a/intern/ghost/intern/GHOST_NDOFManagerWin32.h b/intern/ghost/intern/GHOST_NDOFManagerWin32.h index 671147625db..9b5192817eb 100644 --- a/intern/ghost/intern/GHOST_NDOFManagerWin32.h +++ b/intern/ghost/intern/GHOST_NDOFManagerWin32.h @@ -22,8 +22,8 @@ */ -#ifndef _GHOST_NDOFMANAGERWIN32_H_ -#define _GHOST_NDOFMANAGERWIN32_H_ +#ifndef __GHOST_NDOFMANAGERWIN32_H__ +#define __GHOST_NDOFMANAGERWIN32_H__ #ifdef WITH_INPUT_NDOF diff --git a/intern/ghost/intern/GHOST_NDOFManagerX11.h b/intern/ghost/intern/GHOST_NDOFManagerX11.h index 6873318f8c5..4629baeb0de 100644 --- a/intern/ghost/intern/GHOST_NDOFManagerX11.h +++ b/intern/ghost/intern/GHOST_NDOFManagerX11.h @@ -21,8 +21,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef _GHOST_NDOFMANAGERX11_H_ -#define _GHOST_NDOFMANAGERX11_H_ +#ifndef __GHOST_NDOFMANAGERX11_H__ +#define __GHOST_NDOFMANAGERX11_H__ #ifdef WITH_INPUT_NDOF diff --git a/intern/ghost/intern/GHOST_System.h b/intern/ghost/intern/GHOST_System.h index 0bb0387a287..de474fe07a5 100644 --- a/intern/ghost/intern/GHOST_System.h +++ b/intern/ghost/intern/GHOST_System.h @@ -30,8 +30,8 @@ * Declaration of GHOST_System class. */ -#ifndef _GHOST_SYSTEM_H_ -#define _GHOST_SYSTEM_H_ +#ifndef __GHOST_SYSTEM_H__ +#define __GHOST_SYSTEM_H__ #include "GHOST_ISystem.h" @@ -367,5 +367,5 @@ inline GHOST_NDOFManager* GHOST_System::getNDOFManager() const } #endif -#endif // _GHOST_SYSTEM_H_ +#endif // __GHOST_SYSTEM_H__ diff --git a/intern/ghost/intern/GHOST_SystemCarbon.h b/intern/ghost/intern/GHOST_SystemCarbon.h index 1f51b07c7d0..cda09480788 100644 --- a/intern/ghost/intern/GHOST_SystemCarbon.h +++ b/intern/ghost/intern/GHOST_SystemCarbon.h @@ -30,8 +30,8 @@ * Declaration of GHOST_SystemCarbon class. */ -#ifndef _GHOST_SYSTEM_CARBON_H_ -#define _GHOST_SYSTEM_CARBON_H_ +#ifndef __GHOST_SYSTEMCARBON_H__ +#define __GHOST_SYSTEMCARBON_H__ #ifndef __APPLE__ #error Apple OSX only! @@ -285,5 +285,5 @@ protected: bool m_ignoreWindowSizedMessages; }; -#endif // _GHOST_SYSTEM_CARBON_H_ +#endif // __GHOST_SYSTEMCARBON_H__ diff --git a/intern/ghost/intern/GHOST_SystemCocoa.h b/intern/ghost/intern/GHOST_SystemCocoa.h index 581535e82b8..2220955c270 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.h +++ b/intern/ghost/intern/GHOST_SystemCocoa.h @@ -31,8 +31,8 @@ * Declaration of GHOST_SystemCocoa class. */ -#ifndef _GHOST_SYSTEM_COCOA_H_ -#define _GHOST_SYSTEM_COCOA_H_ +#ifndef __GHOST_SYSTEMCOCOA_H__ +#define __GHOST_SYSTEMCOCOA_H__ #ifndef __APPLE__ #error Apple OSX only! @@ -300,5 +300,5 @@ protected: bool m_isGestureInProgress; }; -#endif // _GHOST_SYSTEM_COCOA_H_ +#endif // __GHOST_SYSTEMCOCOA_H__ diff --git a/intern/ghost/intern/GHOST_SystemNULL.h b/intern/ghost/intern/GHOST_SystemNULL.h index f89eb77277b..be16a8286d5 100644 --- a/intern/ghost/intern/GHOST_SystemNULL.h +++ b/intern/ghost/intern/GHOST_SystemNULL.h @@ -25,8 +25,8 @@ * Declaration of GHOST_SystemNULL class. */ -#ifndef _GHOST_SYSTEM_NULL_H_ -#define _GHOST_SYSTEM_NULL_H_ +#ifndef __GHOST_SYSTEMNULL_H__ +#define __GHOST_SYSTEMNULL_H__ #include "GHOST_System.h" #include "../GHOST_Types.h" diff --git a/intern/ghost/intern/GHOST_SystemPaths.h b/intern/ghost/intern/GHOST_SystemPaths.h index 739fd4edfaf..472d6369282 100644 --- a/intern/ghost/intern/GHOST_SystemPaths.h +++ b/intern/ghost/intern/GHOST_SystemPaths.h @@ -28,8 +28,8 @@ * \ingroup GHOST */ -#ifndef _GHOST_SYSTEMPATHS_H_ -#define _GHOST_SYSTEMPATHS_H_ +#ifndef __GHOST_SYSTEMPATHS_H__ +#define __GHOST_SYSTEMPATHS_H__ #include "GHOST_ISystemPaths.h" diff --git a/intern/ghost/intern/GHOST_SystemPathsCarbon.h b/intern/ghost/intern/GHOST_SystemPathsCarbon.h index f660148cd35..4a1f68e9ba7 100644 --- a/intern/ghost/intern/GHOST_SystemPathsCarbon.h +++ b/intern/ghost/intern/GHOST_SystemPathsCarbon.h @@ -29,8 +29,8 @@ */ -#ifndef _GHOST_SYSTEM_PATHS_CARBON_H_ -#define _GHOST_SYSTEM_PATHS_CARBON_H_ +#ifndef __GHOST_SYSTEMPATHSCARBON_H__ +#define __GHOST_SYSTEMPATHSCARBON_H__ #ifndef __APPLE__ #error Apple OSX only! @@ -84,7 +84,4 @@ public: void addToSystemRecentFiles(const char* filename) const; }; -#endif // _GHOST_SYSTEM_CARBON_H_ - - - +#endif // __GHOST_SYSTEMPATHSCARBON_H__ diff --git a/intern/ghost/intern/GHOST_SystemPathsCocoa.h b/intern/ghost/intern/GHOST_SystemPathsCocoa.h index 2b86659c116..1936d705945 100644 --- a/intern/ghost/intern/GHOST_SystemPathsCocoa.h +++ b/intern/ghost/intern/GHOST_SystemPathsCocoa.h @@ -29,8 +29,8 @@ */ -#ifndef _GHOST_SYSTEM_PATHS_COCOA_H_ -#define _GHOST_SYSTEM_PATHS_COCOA_H_ +#ifndef __GHOST_SYSTEMPATHSCOCOA_H__ +#define __GHOST_SYSTEMPATHSCOCOA_H__ #ifndef __APPLE__ #error Apple OSX only! @@ -78,5 +78,4 @@ public: void addToSystemRecentFiles(const char* filename) const; }; -#endif // _GHOST_SYSTEM_COCOA_H_ - +#endif // __GHOST_SYSTEMPATHSCOCOA_H__ diff --git a/intern/ghost/intern/GHOST_SystemPathsWin32.h b/intern/ghost/intern/GHOST_SystemPathsWin32.h index dd875d4abea..a56a2e07b96 100644 --- a/intern/ghost/intern/GHOST_SystemPathsWin32.h +++ b/intern/ghost/intern/GHOST_SystemPathsWin32.h @@ -30,8 +30,8 @@ */ -#ifndef _GHOST_SYSTEM_PATHS_WIN32_H_ -#define _GHOST_SYSTEM_PATHS_WIN32_H_ +#ifndef __GHOST_SYSTEMPATHSWIN32_H__ +#define __GHOST_SYSTEMPATHSWIN32_H__ #ifndef WIN32 #error WIN32 only! @@ -88,5 +88,5 @@ public: void addToSystemRecentFiles(const char* filename) const; }; -#endif // _GHOST_SYSTEM_PATHS_WIN32_H_ +#endif // __GHOST_SYSTEMPATHSWIN32_H__ diff --git a/intern/ghost/intern/GHOST_SystemPathsX11.h b/intern/ghost/intern/GHOST_SystemPathsX11.h index a0a1d28a253..d05cab5de75 100644 --- a/intern/ghost/intern/GHOST_SystemPathsX11.h +++ b/intern/ghost/intern/GHOST_SystemPathsX11.h @@ -29,8 +29,8 @@ */ -#ifndef _GHOST_SYSTEM_PATHS_X11_H_ -#define _GHOST_SYSTEM_PATHS_X11_H_ +#ifndef __GHOST_SYSTEMPATHSX11_H__ +#define __GHOST_SYSTEMPATHSX11_H__ #include "GHOST_SystemPaths.h" #include "../GHOST_Types.h" diff --git a/intern/ghost/intern/GHOST_SystemSDL.h b/intern/ghost/intern/GHOST_SystemSDL.h index 51bca331ba4..e7700649140 100644 --- a/intern/ghost/intern/GHOST_SystemSDL.h +++ b/intern/ghost/intern/GHOST_SystemSDL.h @@ -25,8 +25,8 @@ * Declaration of GHOST_SystemSDL class. */ -#ifndef _GHOST_SYSTEM_SDL_H_ -#define _GHOST_SYSTEM_SDL_H_ +#ifndef __GHOST_SYSTEMSDL_H__ +#define __GHOST_SYSTEMSDL_H__ #include "GHOST_System.h" #include "../GHOST_Types.h" diff --git a/intern/ghost/intern/GHOST_SystemWin32.h b/intern/ghost/intern/GHOST_SystemWin32.h index 1f40cdd854f..43387f68349 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.h +++ b/intern/ghost/intern/GHOST_SystemWin32.h @@ -30,8 +30,8 @@ * Declaration of GHOST_SystemWin32 class. */ -#ifndef _GHOST_SYSTEM_WIN32_H_ -#define _GHOST_SYSTEM_WIN32_H_ +#ifndef __GHOST_SYSTEMWIN32_H__ +#define __GHOST_SYSTEMWIN32_H__ #ifndef WIN32 #error WIN32 only! @@ -395,4 +395,4 @@ inline void GHOST_SystemWin32::handleKeyboardChange(void) } } } -#endif // _GHOST_SYSTEM_WIN32_H_ +#endif // __GHOST_SYSTEMWIN32_H__ diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index 22c16009591..7261770771a 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -42,6 +42,8 @@ #include "GHOST_EventButton.h" #include "GHOST_EventWheel.h" #include "GHOST_DisplayManagerX11.h" +#include "GHOST_DropTargetX11.h" +#include "GHOST_EventDragnDrop.h" #ifdef WITH_INPUT_NDOF #include "GHOST_NDOFManagerX11.h" #endif @@ -709,8 +711,12 @@ GHOST_SystemX11::processEvent(XEvent *xe) } } } else { - /* Unknown client message, ignore */ + /* try to handle drag event (if there's no such events, GHOST_HandleClientMessage will return zero) */ + if (window->getDropTarget()->GHOST_HandleClientMessage(xe) == false) { + /* Unknown client message, ignore */ + } } + break; } @@ -1478,3 +1484,17 @@ void GHOST_SystemX11::putClipboard(GHOST_TInt8 *buffer, bool selection) const fprintf(stderr, "failed to own primary\n"); } } + +GHOST_TSuccess GHOST_SystemX11::pushDragDropEvent(GHOST_TEventType eventType, + GHOST_TDragnDropTypes draggedObjectType, + GHOST_IWindow* window, + int mouseX, int mouseY, + void* data) +{ + GHOST_SystemX11* system = ((GHOST_SystemX11*)getSystem()); + return system->pushEvent(new GHOST_EventDragnDrop(system->getMilliSeconds(), + eventType, + draggedObjectType, + window,mouseX,mouseY,data) + ); +} diff --git a/intern/ghost/intern/GHOST_SystemX11.h b/intern/ghost/intern/GHOST_SystemX11.h index 73d9c95e273..1aec218d6f1 100644 --- a/intern/ghost/intern/GHOST_SystemX11.h +++ b/intern/ghost/intern/GHOST_SystemX11.h @@ -30,8 +30,8 @@ * Declaration of GHOST_SystemX11 class. */ -#ifndef _GHOST_SYSTEM_X11_H_ -#define _GHOST_SYSTEM_X11_H_ +#ifndef __GHOST_SYSTEMX11_H__ +#define __GHOST_SYSTEMX11_H__ #include #include @@ -235,6 +235,18 @@ public: */ void putClipboard(GHOST_TInt8 *buffer, bool selection) const; + /** + * Creates a drag'n'drop event and pushes it immediately onto the event queue. + * Called by GHOST_DropTargetX11 class. + * @param eventType The type of drag'n'drop event + * @param draggedObjectType The type object concerned (currently array of file names, string, ?bitmap) + * @param mouseX x mouse coordinate (in window coordinates) + * @param mouseY y mouse coordinate + * @param window The window on which the event occurred + * @return Indication whether the event was handled. + */ + static GHOST_TSuccess pushDragDropEvent(GHOST_TEventType eventType, GHOST_TDragnDropTypes draggedObjectType,GHOST_IWindow* window, int mouseX, int mouseY, void* data); + /** * @see GHOST_ISystem */ diff --git a/intern/ghost/intern/GHOST_TaskbarWin32.h b/intern/ghost/intern/GHOST_TaskbarWin32.h index 8f301edce31..a5d6fdc745f 100644 --- a/intern/ghost/intern/GHOST_TaskbarWin32.h +++ b/intern/ghost/intern/GHOST_TaskbarWin32.h @@ -1,8 +1,8 @@ /** \file ghost/intern/GHOST_TaskbarWin32.h * \ingroup GHOST */ -#ifndef GHOST_TASKBARWIN32_H_ -#define GHOST_TASKBARWIN32_H_ +#ifndef __GHOST_TASKBARWIN32_H__ +#define __GHOST_TASKBARWIN32_H__ #ifndef WIN32 #error WIN32 only! @@ -69,4 +69,4 @@ typedef enum TBPFLAG {TBPF_NOPROGRESS = 0, TBPF_INDETERMINATE = 0x1, TBPF_NORMA }; #endif /* ITaskbarList3 */ -#endif /*GHOST_TASKBARWIN32_H_*/ +#endif /*__GHOST_TASKBARWIN32_H__*/ diff --git a/intern/ghost/intern/GHOST_TimerManager.h b/intern/ghost/intern/GHOST_TimerManager.h index f7d1726905e..ce4983ca105 100644 --- a/intern/ghost/intern/GHOST_TimerManager.h +++ b/intern/ghost/intern/GHOST_TimerManager.h @@ -30,8 +30,8 @@ * Declaration of GHOST_TimerManager class. */ -#ifndef _GHOST_TIMER_MANAGER_H_ -#define _GHOST_TIMER_MANAGER_H_ +#ifndef __GHOST_TIMERMANAGER_H__ +#define __GHOST_TIMERMANAGER_H__ #include @@ -121,5 +121,5 @@ protected: TTimerVector m_timers; }; -#endif // _GHOST_TIMER_MANAGER_H_ +#endif // __GHOST_TIMERMANAGER_H__ diff --git a/intern/ghost/intern/GHOST_TimerTask.h b/intern/ghost/intern/GHOST_TimerTask.h index ac86d6c1ce6..e15082ac1ba 100644 --- a/intern/ghost/intern/GHOST_TimerTask.h +++ b/intern/ghost/intern/GHOST_TimerTask.h @@ -30,8 +30,8 @@ * Declaration of GHOST_TimerTask class. */ -#ifndef _GHOST_TIMER_TASK_H_ -#define _GHOST_TIMER_TASK_H_ +#ifndef __GHOST_TIMERTASK_H__ +#define __GHOST_TIMERTASK_H__ #include "GHOST_ITimerTask.h" @@ -192,5 +192,5 @@ protected: GHOST_TUns32 m_auxData; }; -#endif // _GHOST_TIMER_TASK_H_ +#endif // __GHOST_TIMERTASK_H__ diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h index 646097d42c4..323e0fa3418 100644 --- a/intern/ghost/intern/GHOST_Window.h +++ b/intern/ghost/intern/GHOST_Window.h @@ -30,8 +30,8 @@ * Declaration of GHOST_Window class. */ -#ifndef _GHOST_WINDOW_H_ -#define _GHOST_WINDOW_H_ +#ifndef __GHOST_WINDOW_H__ +#define __GHOST_WINDOW_H__ #include "GHOST_IWindow.h" diff --git a/intern/ghost/intern/GHOST_WindowCarbon.h b/intern/ghost/intern/GHOST_WindowCarbon.h index 331e228a663..2c1c827510a 100644 --- a/intern/ghost/intern/GHOST_WindowCarbon.h +++ b/intern/ghost/intern/GHOST_WindowCarbon.h @@ -30,8 +30,8 @@ * Declaration of GHOST_WindowCarbon class. */ -#ifndef _GHOST_WINDOW_CARBON_H_ -#define _GHOST_WINDOW_CARBON_H_ +#ifndef __GHOST_WINDOWCARBON_H__ +#define __GHOST_WINDOWCARBON_H__ #ifndef __APPLE__ #error Apple OSX only! @@ -308,5 +308,5 @@ protected: #endif // GHOST_DRAW_CARBON_GUTTER }; -#endif // _GHOST_WINDOW_CARBON_H_ +#endif // __GHOST_WINDOWCARBON_H__ diff --git a/intern/ghost/intern/GHOST_WindowCocoa.h b/intern/ghost/intern/GHOST_WindowCocoa.h index 46bded630ff..fec97c2af97 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.h +++ b/intern/ghost/intern/GHOST_WindowCocoa.h @@ -30,8 +30,8 @@ * Declaration of GHOST_WindowCocoa class. */ -#ifndef _GHOST_WINDOW_COCOA_H_ -#define _GHOST_WINDOW_COCOA_H_ +#ifndef __GHOST_WINDOWCOCOA_H__ +#define __GHOST_WINDOWCOCOA_H__ #ifndef __APPLE__ #error Apple OSX only! @@ -325,5 +325,5 @@ protected: GHOST_TabletData m_tablet; }; -#endif // _GHOST_WINDOW_COCOA_H_ +#endif // __GHOST_WINDOWCOCOA_H__ diff --git a/intern/ghost/intern/GHOST_WindowManager.h b/intern/ghost/intern/GHOST_WindowManager.h index 12999badac5..cf27a3bde49 100644 --- a/intern/ghost/intern/GHOST_WindowManager.h +++ b/intern/ghost/intern/GHOST_WindowManager.h @@ -30,8 +30,8 @@ * Declaration of GHOST_WindowManager class. */ -#ifndef _GHOST_WINDOW_MANAGER_H_ -#define _GHOST_WINDOW_MANAGER_H_ +#ifndef __GHOST_WINDOWMANAGER_H__ +#define __GHOST_WINDOWMANAGER_H__ #include @@ -169,5 +169,5 @@ public: }; -#endif // _GHOST_WINDOW_MANAGER_H_ +#endif // __GHOST_WINDOWMANAGER_H__ diff --git a/intern/ghost/intern/GHOST_WindowNULL.h b/intern/ghost/intern/GHOST_WindowNULL.h index f65b719a385..49f6d14552d 100644 --- a/intern/ghost/intern/GHOST_WindowNULL.h +++ b/intern/ghost/intern/GHOST_WindowNULL.h @@ -25,8 +25,8 @@ * Declaration of GHOST_WindowNULL class. */ -#ifndef _GHOST_WINDOWNULL_H_ -#define _GHOST_WINDOWNULL_H_ +#ifndef __GHOST_WINDOWNULL_H__ +#define __GHOST_WINDOWNULL_H__ #include "GHOST_Window.h" @@ -92,4 +92,4 @@ private : }; -#endif // _GHOST_WINDOWNULL_H_ +#endif // __GHOST_WINDOWNULL_H__ diff --git a/intern/ghost/intern/GHOST_WindowSDL.h b/intern/ghost/intern/GHOST_WindowSDL.h index a8a130f0481..724c59de0b9 100644 --- a/intern/ghost/intern/GHOST_WindowSDL.h +++ b/intern/ghost/intern/GHOST_WindowSDL.h @@ -25,8 +25,8 @@ * Declaration of GHOST_WindowSDL class. */ -#ifndef _GHOST_WINDOWSDL_H_ -#define _GHOST_WINDOWSDL_H_ +#ifndef __GHOST_WINDOWSDL_H__ +#define __GHOST_WINDOWSDL_H__ #include "GHOST_Window.h" #include "GHOST_SystemSDL.h" @@ -163,4 +163,4 @@ protected: }; -#endif // _GHOST_WINDOWSDL_H_ +#endif // __GHOST_WINDOWSDL_H__ diff --git a/intern/ghost/intern/GHOST_WindowWin32.h b/intern/ghost/intern/GHOST_WindowWin32.h index 190966ee485..6eb17affdbf 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.h +++ b/intern/ghost/intern/GHOST_WindowWin32.h @@ -30,8 +30,8 @@ * Declaration of GHOST_WindowWin32 class. */ -#ifndef _GHOST_WINDOW_WIN32_H_ -#define _GHOST_WINDOW_WIN32_H_ +#ifndef __GHOST_WINDOWWIN32_H__ +#define __GHOST_WINDOWWIN32_H__ #ifndef WIN32 #error WIN32 only! @@ -390,4 +390,4 @@ protected: GHOST_TEmbedderWindowID m_parentWindowHwnd; }; -#endif // _GHOST_WINDOW_WIN32_H_ +#endif // __GHOST_WINDOWWIN32_H__ diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp index 71e3f7b3340..ea99a9ea7b4 100644 --- a/intern/ghost/intern/GHOST_WindowX11.cpp +++ b/intern/ghost/intern/GHOST_WindowX11.cpp @@ -32,6 +32,7 @@ #include "GHOST_WindowX11.h" #include "GHOST_SystemX11.h" +#include "GHOST_DropTargetX11.h" #include "STR_String.h" #include "GHOST_Debug.h" @@ -326,6 +327,10 @@ GHOST_WindowX11( } + /* initialize drop target for newly created window */ + m_dropTarget = new GHOST_DropTargetX11(this, m_system); + GHOST_PRINT("Set drop target\n"); + /* * One of the problem with WM-spec is that can't set a property * to a window that isn't mapped. That is why we can't "just @@ -1318,6 +1323,7 @@ GHOST_WindowX11:: } #endif + delete m_dropTarget; XDestroyWindow(m_display, m_window); XFree(m_visual); diff --git a/intern/ghost/intern/GHOST_WindowX11.h b/intern/ghost/intern/GHOST_WindowX11.h index f1146db50f8..eae6cad5a6d 100644 --- a/intern/ghost/intern/GHOST_WindowX11.h +++ b/intern/ghost/intern/GHOST_WindowX11.h @@ -30,8 +30,8 @@ * Declaration of GHOST_WindowX11 class. */ -#ifndef _GHOST_WINDOWX11_H_ -#define _GHOST_WINDOWX11_H_ +#ifndef __GHOST_WINDOWX11_H__ +#define __GHOST_WINDOWX11_H__ #include "GHOST_Window.h" #include @@ -45,6 +45,7 @@ class STR_String; class GHOST_SystemX11; +class GHOST_DropTargetX11; /** * X11 implementation of GHOST_IWindow. @@ -224,6 +225,9 @@ public: XIC getX11_XIC() { return m_xic; } #endif + GHOST_DropTargetX11* getDropTarget() + { return m_dropTarget; } + /* * Need this in case that we want start the window * in FullScree or Maximized state. @@ -361,6 +365,8 @@ private : /** Cache of XC_* ID's to XCursor structures */ std::map m_standard_cursors; + GHOST_DropTargetX11 * m_dropTarget; + #ifdef WITH_X11_XINPUT /* Tablet devices */ XTablet m_xtablet; @@ -384,4 +390,4 @@ private : }; -#endif // _GHOST_WINDOWX11_H_ +#endif // __GHOST_WINDOWX11_H__ diff --git a/intern/guardedalloc/MEM_guardedalloc.h b/intern/guardedalloc/MEM_guardedalloc.h index 7285843aece..83d6549218a 100644 --- a/intern/guardedalloc/MEM_guardedalloc.h +++ b/intern/guardedalloc/MEM_guardedalloc.h @@ -57,8 +57,8 @@ * See \ref MEM_guardedalloc.h */ -#ifndef MEM_MALLOCN_H -#define MEM_MALLOCN_H +#ifndef __MEM_GUARDEDALLOC_H__ +#define __MEM_GUARDEDALLOC_H__ #include /* needed for FILE* */ #include "MEM_sys_types.h" /* needed for uintptr_t */ diff --git a/intern/guardedalloc/MEM_sys_types.h b/intern/guardedalloc/MEM_sys_types.h index 764d7c6cfa2..b7e17154df0 100644 --- a/intern/guardedalloc/MEM_sys_types.h +++ b/intern/guardedalloc/MEM_sys_types.h @@ -47,8 +47,8 @@ // doxygen would get a conflict */ -#ifndef MEM_SYS_TYPES_H -#define MEM_SYS_TYPES_H +#ifndef __MEM_SYS_TYPES_H__ +#define __MEM_SYS_TYPES_H__ #ifdef __cplusplus extern "C" { @@ -141,5 +141,5 @@ unsigned long __attribute__((__stdcall__)) htonl(unsigned long); } #endif -#endif /* MEM_SYS_TYPES_H */ +#endif /* __MEM_SYS_TYPES_H__ */ diff --git a/intern/guardedalloc/mmap_win.h b/intern/guardedalloc/mmap_win.h index fa8d3b24815..fdbb249a932 100644 --- a/intern/guardedalloc/mmap_win.h +++ b/intern/guardedalloc/mmap_win.h @@ -30,8 +30,8 @@ * \author Andrea Weikert */ -#ifndef MMAP_WIN_H -#define MMAP_WIN_H +#ifndef __MMAP_WIN_H__ +#define __MMAP_WIN_H__ #define PROT_NONE 0 #define PROT_READ 1 diff --git a/intern/iksolver/extern/IK_solver.h b/intern/iksolver/extern/IK_solver.h index 179bd4a95b1..7f780a0a17f 100644 --- a/intern/iksolver/extern/IK_solver.h +++ b/intern/iksolver/extern/IK_solver.h @@ -65,8 +65,8 @@ * This module only depends on Moto. */ -#ifndef NAN_INCLUDED_IK_solver_h -#define NAN_INCLUDED_IK_solver_h +#ifndef __IK_SOLVER_H__ +#define __IK_SOLVER_H__ #ifdef __cplusplus extern "C" { @@ -168,5 +168,5 @@ int IK_Solve(IK_Solver *solver, float tolerance, int max_iterations); } #endif -#endif // NAN_INCLUDED_IK_solver_h +#endif // __IK_SOLVER_H__ diff --git a/intern/iksolver/intern/IK_QJacobian.h b/intern/iksolver/intern/IK_QJacobian.h index c975989309b..b4b5a0402e6 100644 --- a/intern/iksolver/intern/IK_QJacobian.h +++ b/intern/iksolver/intern/IK_QJacobian.h @@ -32,9 +32,9 @@ */ -#ifndef NAN_INCLUDED_IK_QJacobian_h +#ifndef __IK_QJACOBIAN_H__ -#define NAN_INCLUDED_IK_QJacobian_h +#define __IK_QJACOBIAN_H__ #include "TNT/cmat.h" #include diff --git a/intern/iksolver/intern/IK_QJacobianSolver.h b/intern/iksolver/intern/IK_QJacobianSolver.h index 56d38147e3c..cfcd2849fb2 100644 --- a/intern/iksolver/intern/IK_QJacobianSolver.h +++ b/intern/iksolver/intern/IK_QJacobianSolver.h @@ -31,9 +31,9 @@ */ -#ifndef NAN_INCLUDED_IK_QJacobianSolver_h +#ifndef __IK_QJACOBIANSOLVER_H__ -#define NAN_INCLUDED_IK_QJacobianSolver_h +#define __IK_QJACOBIANSOLVER_H__ /** * @author Laurence Bourn diff --git a/intern/iksolver/intern/IK_QSegment.h b/intern/iksolver/intern/IK_QSegment.h index 9037f8750f4..68d40829137 100644 --- a/intern/iksolver/intern/IK_QSegment.h +++ b/intern/iksolver/intern/IK_QSegment.h @@ -31,8 +31,8 @@ */ -#ifndef NAN_INCLUDED_IK_QSegment_h -#define NAN_INCLUDED_IK_QSegment_h +#ifndef __IK_QSEGMENT_H__ +#define __IK_QSEGMENT_H__ #include "MT_Vector3.h" #include "MT_Transform.h" diff --git a/intern/iksolver/intern/IK_QTask.h b/intern/iksolver/intern/IK_QTask.h index 379866de8f7..3d968cdfe38 100644 --- a/intern/iksolver/intern/IK_QTask.h +++ b/intern/iksolver/intern/IK_QTask.h @@ -31,8 +31,8 @@ */ -#ifndef NAN_INCLUDED_IK_QTask_h -#define NAN_INCLUDED_IK_QTask_h +#ifndef __IK_QTASK_H__ +#define __IK_QTASK_H__ #include "MT_Vector3.h" #include "MT_Transform.h" diff --git a/intern/iksolver/test/ik_glut_test/common/GlutDrawer.h b/intern/iksolver/test/ik_glut_test/common/GlutDrawer.h index 4dfcfa1769e..05d2424dfea 100644 --- a/intern/iksolver/test/ik_glut_test/common/GlutDrawer.h +++ b/intern/iksolver/test/ik_glut_test/common/GlutDrawer.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef NAN_INCLUDED_GlutDrawer -#define NAN_INCLUDED_GlutDrawer +#ifndef __GLUTDRAWER_H__ +#define __GLUTDRAWER_H__ #include "MEM_NonCopyable.h" #include "MEM_SmartPtr.h" diff --git a/intern/iksolver/test/ik_glut_test/common/GlutKeyboardManager.h b/intern/iksolver/test/ik_glut_test/common/GlutKeyboardManager.h index 61cd7a25ac0..ea39b6835f6 100644 --- a/intern/iksolver/test/ik_glut_test/common/GlutKeyboardManager.h +++ b/intern/iksolver/test/ik_glut_test/common/GlutKeyboardManager.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef NAN_INCLUDED_GlutKeyboardManager -#define NAN_INCLUDED_GlutKeyboardManager +#ifndef __GLUTKEYBOARDMANAGER_H__ +#define __GLUTKEYBOARDMANAGER_H__ #include "MEM_NonCopyable.h" #include "MEM_SmartPtr.h" diff --git a/intern/iksolver/test/ik_glut_test/common/GlutMouseManager.h b/intern/iksolver/test/ik_glut_test/common/GlutMouseManager.h index 50fb37c267e..4a2344b7c74 100644 --- a/intern/iksolver/test/ik_glut_test/common/GlutMouseManager.h +++ b/intern/iksolver/test/ik_glut_test/common/GlutMouseManager.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef NAN_INCLUDED_GlutMouseManager_h -#define NAN_INCLUDED_GlutMouseManager_h +#ifndef __GLUTMOUSEMANAGER_H__ +#define __GLUTMOUSEMANAGER_H__ #include "MEM_NonCopyable.h" #include "MEM_SmartPtr.h" diff --git a/intern/iksolver/test/ik_glut_test/intern/ChainDrawer.h b/intern/iksolver/test/ik_glut_test/intern/ChainDrawer.h index 5975eaa7c65..f2863806112 100644 --- a/intern/iksolver/test/ik_glut_test/intern/ChainDrawer.h +++ b/intern/iksolver/test/ik_glut_test/intern/ChainDrawer.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef NAN_INCLUDED_ChainDrawer_h -#define NAN_INCLUDED_ChainDrawer_h +#ifndef __CHAINDRAWER_H__ +#define __CHAINDRAWER_H__ #include "../common/GlutDrawer.h" #include "MyGlutMouseHandler.h" diff --git a/intern/iksolver/test/ik_glut_test/intern/MyGlutKeyHandler.h b/intern/iksolver/test/ik_glut_test/intern/MyGlutKeyHandler.h index 2ac9b25d13a..621e0d32869 100644 --- a/intern/iksolver/test/ik_glut_test/intern/MyGlutKeyHandler.h +++ b/intern/iksolver/test/ik_glut_test/intern/MyGlutKeyHandler.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef NAN_INCLUDED_MyGlutKeyHandler_h -#define NAN_INCLUDED_MyGlutKeyHandler_h +#ifndef __MYGLUTKEYHANDLER_H__ +#define __MYGLUTKEYHANDLER_H__ #include "../common/GlutKeyboardManager.h" diff --git a/intern/iksolver/test/ik_glut_test/intern/MyGlutMouseHandler.h b/intern/iksolver/test/ik_glut_test/intern/MyGlutMouseHandler.h index 5d94db44698..205ce38ac23 100644 --- a/intern/iksolver/test/ik_glut_test/intern/MyGlutMouseHandler.h +++ b/intern/iksolver/test/ik_glut_test/intern/MyGlutMouseHandler.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef NAN_INCLUDED_MyGlutMouseHandler_h -#define NAN_INCLUDED_MyGlutMouseHandler_h +#ifndef __MYGLUTMOUSEHANDLER_H__ +#define __MYGLUTMOUSEHANDLER_H__ #include "../common/GlutMouseManager.h" #include diff --git a/intern/memutil/MEM_Allocator.h b/intern/memutil/MEM_Allocator.h index 99d0b5177f3..9541604b680 100644 --- a/intern/memutil/MEM_Allocator.h +++ b/intern/memutil/MEM_Allocator.h @@ -25,8 +25,8 @@ */ -#ifndef MEM_ALLOCATOR_H -#define MEM_ALLOCATOR_H +#ifndef __MEM_ALLOCATOR_H__ +#define __MEM_ALLOCATOR_H__ #include #include "guardedalloc/MEM_guardedalloc.h" @@ -89,4 +89,4 @@ struct MEM_Allocator } }; -#endif // MEM_ALLOCATOR_H +#endif // __MEM_ALLOCATOR_H__ diff --git a/intern/memutil/MEM_CacheLimiter.h b/intern/memutil/MEM_CacheLimiter.h index 94aca280a0e..9a36b67aa2f 100644 --- a/intern/memutil/MEM_CacheLimiter.h +++ b/intern/memutil/MEM_CacheLimiter.h @@ -25,8 +25,8 @@ */ -#ifndef MEM_CACHELIMITER_H -#define MEM_CACHELIMITER_H +#ifndef __MEM_CACHELIMITER_H__ +#define __MEM_CACHELIMITER_H__ /** * @section MEM_CacheLimiter @@ -63,7 +63,7 @@ template class MEM_CacheLimiter; -#ifndef __MEM_cache_limiter_c_api_h_included__ +#ifndef __MEM_CACHELIMITERC_API_H__ extern "C" { extern void MEM_CacheLimiter_set_maximum(size_t m); extern size_t MEM_CacheLimiter_get_maximum(); @@ -201,4 +201,4 @@ private: MEM_CacheLimiter_DataSize_Func getDataSize; }; -#endif // MEM_CACHELIMITER_H +#endif // __MEM_CACHELIMITER_H__ diff --git a/intern/memutil/MEM_CacheLimiterC-Api.h b/intern/memutil/MEM_CacheLimiterC-Api.h index c8672fa03fd..4ed692fb55f 100644 --- a/intern/memutil/MEM_CacheLimiterC-Api.h +++ b/intern/memutil/MEM_CacheLimiterC-Api.h @@ -25,8 +25,8 @@ */ -#ifndef MEM_CACHELIMITERC_API_H -#define MEM_CACHELIMITERC_API_H +#ifndef __MEM_CACHELIMITERC_API_H__ +#define __MEM_CACHELIMITERC_API_H__ #ifdef __cplusplus extern "C" { @@ -44,10 +44,10 @@ typedef void(*MEM_CacheLimiter_Destruct_Func)(void*); /* function used to measure stored data element size */ typedef size_t(*MEM_CacheLimiter_DataSize_Func) (void*); -#ifndef MEM_CACHELIMITER_H +#ifndef __MEM_CACHELIMITER_H__ extern void MEM_CacheLimiter_set_maximum(size_t m); extern int MEM_CacheLimiter_get_maximum(void); -#endif // MEM_CACHELIMITER_H +#endif /* __MEM_CACHELIMITER_H__ */ /** * Create new MEM_CacheLimiter object * managed objects are destructed with the data_destructor @@ -145,4 +145,4 @@ extern void * MEM_CacheLimiter_get(MEM_CacheLimiterHandleC * handle); #endif -#endif // MEM_CACHELIMITERC_API_H +#endif // __MEM_CACHELIMITERC_API_H__ diff --git a/intern/memutil/MEM_NonCopyable.h b/intern/memutil/MEM_NonCopyable.h index 7ddd35d6fc4..9378ea7b69d 100644 --- a/intern/memutil/MEM_NonCopyable.h +++ b/intern/memutil/MEM_NonCopyable.h @@ -34,8 +34,8 @@ * Declaration of MEM_NonCopyable class. */ -#ifndef NAN_INCLUDED_NonCopyable_h -#define NAN_INCLUDED_NonCopyable_h +#ifndef __MEM_NONCOPYABLE_H__ +#define __MEM_NONCOPYABLE_H__ /** * Simple class that makes sure sub classes cannot diff --git a/intern/memutil/MEM_RefCountPtr.h b/intern/memutil/MEM_RefCountPtr.h index 43dbc807ae0..4f475345076 100644 --- a/intern/memutil/MEM_RefCountPtr.h +++ b/intern/memutil/MEM_RefCountPtr.h @@ -35,8 +35,8 @@ * @author Laurence */ -#ifndef NAN_INCLUDED_MEM_RefCountPtr_h -#define NAN_INCLUDED_MEM_RefCountPtr_h +#ifndef __MEM_REFCOUNTPTR_H__ +#define __MEM_REFCOUNTPTR_H__ #include // for NULL ! diff --git a/intern/memutil/MEM_RefCounted.h b/intern/memutil/MEM_RefCounted.h index 0c3a54122f1..9da0103f6a3 100644 --- a/intern/memutil/MEM_RefCounted.h +++ b/intern/memutil/MEM_RefCounted.h @@ -34,8 +34,8 @@ * Declaration of MEM_RefCounted class. */ -#ifndef MEM_REFCOUNTED_H -#define MEM_REFCOUNTED_H +#ifndef __MEM_REFCOUNTED_H__ +#define __MEM_REFCOUNTED_H__ /** * An object with reference counting. @@ -112,5 +112,5 @@ inline int MEM_RefCounted::decRef() return m_refCount; } -#endif // MEM_REFCOUNTED_H +#endif // __MEM_REFCOUNTED_H__ diff --git a/intern/memutil/MEM_RefCountedC-Api.h b/intern/memutil/MEM_RefCountedC-Api.h index 4b2679cccc2..a611482a991 100644 --- a/intern/memutil/MEM_RefCountedC-Api.h +++ b/intern/memutil/MEM_RefCountedC-Api.h @@ -34,8 +34,8 @@ * Interface for C access to functionality relating to shared objects in the foundation library. */ -#ifndef MEM_REFCOUNTEDC_API_H -#define MEM_REFCOUNTEDC_API_H +#ifndef __MEM_REFCOUNTEDC_API_H__ +#define __MEM_REFCOUNTEDC_API_H__ /** A pointer to a private object. */ typedef struct MEM_TOpaqueObject* MEM_TObjectPtr; @@ -75,4 +75,4 @@ extern int MEM_RefCountedDecRef(MEM_TRefCountedObjectPtr shared); } #endif -#endif // MEM_REFCOUNTEDC_API_H +#endif // __MEM_REFCOUNTEDC_API_H__ diff --git a/intern/memutil/MEM_SmartPtr.h b/intern/memutil/MEM_SmartPtr.h index a2ab273d092..6a0dc1723c4 100644 --- a/intern/memutil/MEM_SmartPtr.h +++ b/intern/memutil/MEM_SmartPtr.h @@ -35,8 +35,8 @@ * @author Laurence */ -#ifndef NAN_INCLUDED_MEM_SmartPtr_h -#define NAN_INCLUDED_MEM_SmartPtr_h +#ifndef __MEM_SMARTPTR_H__ +#define __MEM_SMARTPTR_H__ #include // for NULL ! diff --git a/intern/string/STR_HashedString.h b/intern/string/STR_HashedString.h index cd3b0e2b58f..f56e365bdb3 100644 --- a/intern/string/STR_HashedString.h +++ b/intern/string/STR_HashedString.h @@ -37,8 +37,8 @@ * @date November, 14, 2001 */ -#ifndef __STR_HASHSTRING -#define __STR_HASHSTRING +#ifndef __STR_HASHEDSTRING_H__ +#define __STR_HASHEDSTRING_H__ #include "STR_String.h" @@ -150,5 +150,5 @@ private: mutable dword m_CachedHash; }; -#endif //__STR_HASHSTRING +#endif //__STR_HASHEDSTRING_H__ diff --git a/intern/string/STR_String.h b/intern/string/STR_String.h index fa08dc3648e..cbf9d0c1b3b 100644 --- a/intern/string/STR_String.h +++ b/intern/string/STR_String.h @@ -37,8 +37,8 @@ * @date April, 25, 2001 */ -#ifndef _STR_String_H_ -#define _STR_String_H_ +#ifndef __STR_STRING_H__ +#define __STR_STRING_H__ #ifndef STR_NO_ASSERTD #undef assertd @@ -217,5 +217,5 @@ inline STR_String operator+(rcSTR_String lhs, const char *rhs) { return STR_ inline STR_String operator+(const char *lhs, rcSTR_String rhs) { return STR_String(lhs, strlen(lhs), rhs.ReadPtr(), rhs.Length()); } -#endif //_STR_String_H_ +#endif //__STR_STRING_H__ diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 5870c9afaea..c12a94e6637 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -83,7 +83,7 @@ class VIEW3D_HT_header(Header): row.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True) # Snap - if not obj or obj.mode not in {'SCULPT', 'VERTEX_PAINT', 'WEIGHT_PAINT', 'TEXTURE_PAINT', 'PARTICLE_EDIT'}: + if not obj or obj.mode not in {'SCULPT', 'VERTEX_PAINT', 'WEIGHT_PAINT', 'TEXTURE_PAINT'}: snap_element = toolsettings.snap_element row = layout.row(align=True) row.prop(toolsettings, "use_snap", text="") diff --git a/source/blender/avi/AVI_avi.h b/source/blender/avi/AVI_avi.h index ea073f79a7e..00c6863f75c 100644 --- a/source/blender/avi/AVI_avi.h +++ b/source/blender/avi/AVI_avi.h @@ -50,8 +50,8 @@ * */ -#ifndef __AVI_H__ -#define __AVI_H__ +#ifndef __AVI_AVI_H__ +#define __AVI_AVI_H__ #include "MEM_sys_types.h" #include /* for FILE */ @@ -305,5 +305,5 @@ AviError AVI_write_frame (AviMovie *movie, int frame_num, ...); AviError AVI_print_error (AviError error); void AVI_set_debug (int mode); -#endif /* __AVI_H__ */ +#endif /* __AVI_AVI_H__ */ diff --git a/source/blender/avi/intern/avi_intern.h b/source/blender/avi/intern/avi_intern.h index 15307956756..c8d54fe99e9 100644 --- a/source/blender/avi/intern/avi_intern.h +++ b/source/blender/avi/intern/avi_intern.h @@ -29,8 +29,8 @@ * \ingroup avi */ -#ifndef AVI_INTERN_H -#define AVI_INTERN_H +#ifndef __AVI_INTERN_H__ +#define __AVI_INTERN_H__ #include /* for FILE */ diff --git a/source/blender/avi/intern/endian.h b/source/blender/avi/intern/endian.h index 7a443fae8df..3229f32cbbd 100644 --- a/source/blender/avi/intern/endian.h +++ b/source/blender/avi/intern/endian.h @@ -34,8 +34,8 @@ */ -#ifndef AVI_ENDIAN_H -#define AVI_ENDIAN_H +#ifndef __ENDIAN_H__ +#define __ENDIAN_H__ #include #include "AVI_avi.h" diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index a045f47cb40..d7b441e70e1 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -29,8 +29,8 @@ */ -#ifndef BLF_API_H -#define BLF_API_H +#ifndef __BLF_API_H__ +#define __BLF_API_H__ struct rctf; @@ -204,4 +204,4 @@ void BLF_dir_free(char **dirs, int count); extern int blf_mono_font; extern int blf_mono_font_render; // dont mess drawing with render threads. -#endif /* BLF_API_H */ +#endif /* __BLF_API_H__ */ diff --git a/source/blender/blenfont/BLF_translation.h b/source/blender/blenfont/BLF_translation.h index ce53b76da01..3bb6c37e345 100644 --- a/source/blender/blenfont/BLF_translation.h +++ b/source/blender/blenfont/BLF_translation.h @@ -30,8 +30,8 @@ */ -#ifndef BLF_TRANSLATION_H -#define BLF_TRANSLATION_H +#ifndef __BLF_TRANSLATION_H__ +#define __BLF_TRANSLATION_H__ #define TEXT_DOMAIN_NAME "blender" @@ -75,4 +75,4 @@ const char *BLF_translate_do_tooltip(const char *msgid); #define IFACE_(msgid) BLF_translate_do_iface(msgid) #define TIP_(msgid) BLF_translate_do_tooltip(msgid) -#endif /* BLF_TRANSLATION_H */ +#endif /* __BLF_TRANSLATION_H__ */ diff --git a/source/blender/blenfont/intern/blf_internal.h b/source/blender/blenfont/intern/blf_internal.h index 20124666bcc..3ef0b3422fe 100644 --- a/source/blender/blenfont/intern/blf_internal.h +++ b/source/blender/blenfont/intern/blf_internal.h @@ -28,8 +28,8 @@ */ -#ifndef BLF_INTERNAL_H -#define BLF_INTERNAL_H +#ifndef __BLF_INTERNAL_H__ +#define __BLF_INTERNAL_H__ struct FontBLF; struct GlyphBLF; @@ -72,4 +72,4 @@ struct GlyphBLF *blf_glyph_add(struct FontBLF *font, unsigned int index, unsigne void blf_glyph_free(struct GlyphBLF *g); int blf_glyph_render(struct FontBLF *font, struct GlyphBLF *g, float x, float y); -#endif /* BLF_INTERNAL_H */ +#endif /* __BLF_INTERNAL_H__ */ diff --git a/source/blender/blenfont/intern/blf_internal_types.h b/source/blender/blenfont/intern/blf_internal_types.h index e8021aad6d1..cbe7975fdd6 100644 --- a/source/blender/blenfont/intern/blf_internal_types.h +++ b/source/blender/blenfont/intern/blf_internal_types.h @@ -28,8 +28,8 @@ */ -#ifndef BLF_INTERNAL_TYPES_H -#define BLF_INTERNAL_TYPES_H +#ifndef __BLF_INTERNAL_TYPES_H__ +#define __BLF_INTERNAL_TYPES_H__ typedef struct GlyphCacheBLF { struct GlyphCacheBLF *next; @@ -223,4 +223,4 @@ typedef struct DirBLF { char *path; } DirBLF; -#endif /* BLF_INTERNAL_TYPES_H */ +#endif /* __BLF_INTERNAL_TYPES_H__ */ diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h index 8a5d7c06bee..05b9519d2fe 100644 --- a/source/blender/blenkernel/BKE_DerivedMesh.h +++ b/source/blender/blenkernel/BKE_DerivedMesh.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_DERIVEDMESH_H -#define BKE_DERIVEDMESH_H +#ifndef __BKE_DERIVEDMESH_H__ +#define __BKE_DERIVEDMESH_H__ /* Basic design of the DerivedMesh system: diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h index 67efb7752ea..564cd235869 100644 --- a/source/blender/blenkernel/BKE_action.h +++ b/source/blender/blenkernel/BKE_action.h @@ -24,8 +24,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_ACTION_H -#define BKE_ACTION_H +#ifndef __BKE_ACTION_H__ +#define __BKE_ACTION_H__ /** \file BKE_action.h * \ingroup bke * \brief Blender kernel action and pose functionality. diff --git a/source/blender/blenkernel/BKE_anim.h b/source/blender/blenkernel/BKE_anim.h index a55955c4d04..d605776ed50 100644 --- a/source/blender/blenkernel/BKE_anim.h +++ b/source/blender/blenkernel/BKE_anim.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_ANIM_H -#define BKE_ANIM_H +#ifndef __BKE_ANIM_H__ +#define __BKE_ANIM_H__ /** \file BKE_anim.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h index 8e5b313b919..fb4a44b2c80 100644 --- a/source/blender/blenkernel/BKE_animsys.h +++ b/source/blender/blenkernel/BKE_animsys.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_ANIM_SYS_H -#define BKE_ANIM_SYS_H +#ifndef __BKE_ANIMSYS_H__ +#define __BKE_ANIMSYS_H__ /** \file BKE_animsys.h * \ingroup bke @@ -160,4 +160,4 @@ void animsys_evaluate_action_group(struct PointerRNA *ptr, struct bAction *act, /* ************************************* */ -#endif /* BKE_ANIM_SYS_H*/ +#endif /* __BKE_ANIMSYS_H__*/ diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h index 07d8d69f44e..b09122d022b 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_ARMATURE_H -#define BKE_ARMATURE_H +#ifndef __BKE_ARMATURE_H__ +#define __BKE_ARMATURE_H__ /** \file BKE_armature.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index 9b8acc2b140..237bfc1b588 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BLENDER_H -#define BKE_BLENDER_H +#ifndef __BKE_BLENDER_H__ +#define __BKE_BLENDER_H__ /** \file BKE_blender.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_bmesh.h b/source/blender/blenkernel/BKE_bmesh.h index 8f1c1d45c3e..36760d387a1 100644 --- a/source/blender/blenkernel/BKE_bmesh.h +++ b/source/blender/blenkernel/BKE_bmesh.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BMESH_H -#define BKE_BMESH_H +#ifndef __BKE_BMESH_H__ +#define __BKE_BMESH_H__ /** \file BKE_bmesh.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_bmeshCustomData.h b/source/blender/blenkernel/BKE_bmeshCustomData.h index 793410371df..bbdc6f39cff 100644 --- a/source/blender/blenkernel/BKE_bmeshCustomData.h +++ b/source/blender/blenkernel/BKE_bmeshCustomData.h @@ -26,8 +26,8 @@ */ -#ifndef BKE_BMESHCUSTOMDATA_H -#define BKE_BMESHCUSTOMDATA_H +#ifndef __BKE_BMESHCUSTOMDATA_H__ +#define __BKE_BMESHCUSTOMDATA_H__ /** \file BKE_bmeshCustomData.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_bmfont.h b/source/blender/blenkernel/BKE_bmfont.h index 71fd2ae3d67..6c0cbe3a51b 100644 --- a/source/blender/blenkernel/BKE_bmfont.h +++ b/source/blender/blenkernel/BKE_bmfont.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BMFONT_H -#define BKE_BMFONT_H +#ifndef __BKE_BMFONT_H__ +#define __BKE_BMFONT_H__ /** \file BKE_bmfont.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_bmfont_types.h b/source/blender/blenkernel/BKE_bmfont_types.h index a4d37069cab..73ef0c3a2c3 100644 --- a/source/blender/blenkernel/BKE_bmfont_types.h +++ b/source/blender/blenkernel/BKE_bmfont_types.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BMFONT_TYPES_H -#define BKE_BMFONT_TYPES_H +#ifndef __BKE_BMFONT_TYPES_H__ +#define __BKE_BMFONT_TYPES_H__ /** \file BKE_bmfont_types.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_boids.h b/source/blender/blenkernel/BKE_boids.h index 18e8be1512e..bb724c6632e 100644 --- a/source/blender/blenkernel/BKE_boids.h +++ b/source/blender/blenkernel/BKE_boids.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BOIDS_H -#define BKE_BOIDS_H +#ifndef __BKE_BOIDS_H__ +#define __BKE_BOIDS_H__ /** \file BKE_boids.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_booleanops_mesh.h b/source/blender/blenkernel/BKE_booleanops_mesh.h index 4c4a2dc9998..2e48b664449 100644 --- a/source/blender/blenkernel/BKE_booleanops_mesh.h +++ b/source/blender/blenkernel/BKE_booleanops_mesh.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BOOLEANOPS_MESH_H -#define BKE_BOOLEANOPS_MESH_H +#ifndef __BKE_BOOLEANOPS_MESH_H__ +#define __BKE_BOOLEANOPS_MESH_H__ /** \file BKE_booleanops_mesh.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h index 13f72634bda..f5cd2635ff7 100644 --- a/source/blender/blenkernel/BKE_brush.h +++ b/source/blender/blenkernel/BKE_brush.h @@ -26,8 +26,8 @@ * General operations for brushes. */ -#ifndef BKE_BRUSH_H -#define BKE_BRUSH_H +#ifndef __BKE_BRUSH_H__ +#define __BKE_BRUSH_H__ /** \file BKE_brush.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_bullet.h b/source/blender/blenkernel/BKE_bullet.h index 5eb653f69d1..2103eea1041 100644 --- a/source/blender/blenkernel/BKE_bullet.h +++ b/source/blender/blenkernel/BKE_bullet.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BULLET_H -#define BKE_BULLET_H +#ifndef __BKE_BULLET_H__ +#define __BKE_BULLET_H__ /** \file BKE_bullet.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_bvhutils.h b/source/blender/blenkernel/BKE_bvhutils.h index 07f0c2fef7c..d3d8546ddae 100644 --- a/source/blender/blenkernel/BKE_bvhutils.h +++ b/source/blender/blenkernel/BKE_bvhutils.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BVHUTILS_H -#define BKE_BVHUTILS_H +#ifndef __BKE_BVHUTILS_H__ +#define __BKE_BVHUTILS_H__ /** \file BKE_bvhutils.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_camera.h b/source/blender/blenkernel/BKE_camera.h index 72e22dc1583..6d10219e74c 100644 --- a/source/blender/blenkernel/BKE_camera.h +++ b/source/blender/blenkernel/BKE_camera.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_CAMERA_H -#define BKE_CAMERA_H +#ifndef __BKE_CAMERA_H__ +#define __BKE_CAMERA_H__ /** \file BKE_camera.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_cdderivedmesh.h b/source/blender/blenkernel/BKE_cdderivedmesh.h index 341025862a2..053749148a0 100644 --- a/source/blender/blenkernel/BKE_cdderivedmesh.h +++ b/source/blender/blenkernel/BKE_cdderivedmesh.h @@ -32,8 +32,8 @@ * mesh elements (vertices, edges and faces) as layers of custom element data. */ -#ifndef BKE_CDDERIVEDMESH_H -#define BKE_CDDERIVEDMESH_H +#ifndef __BKE_CDDERIVEDMESH_H__ +#define __BKE_CDDERIVEDMESH_H__ #include "BKE_DerivedMesh.h" diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 6d42b8dc80b..ec20e3234a3 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_CLOTH_H -#define BKE_CLOTH_H +#ifndef __BKE_CLOTH_H__ +#define __BKE_CLOTH_H__ /** \file BKE_cloth.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_collision.h b/source/blender/blenkernel/BKE_collision.h index acb3ae03816..453c16bb8c8 100644 --- a/source/blender/blenkernel/BKE_collision.h +++ b/source/blender/blenkernel/BKE_collision.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_COLLISIONS_H -#define BKE_COLLISIONS_H +#ifndef __BKE_COLLISION_H__ +#define __BKE_COLLISION_H__ /** \file BKE_collision.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_colortools.h b/source/blender/blenkernel/BKE_colortools.h index b358209a0f4..1da0caf97c2 100644 --- a/source/blender/blenkernel/BKE_colortools.h +++ b/source/blender/blenkernel/BKE_colortools.h @@ -24,8 +24,8 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ -#ifndef BKE_COLORTOOLS_H -#define BKE_COLORTOOLS_H +#ifndef __BKE_COLORTOOLS_H__ +#define __BKE_COLORTOOLS_H__ /** \file BKE_colortools.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_constraint.h b/source/blender/blenkernel/BKE_constraint.h index 925d1180dbd..f834ad5e774 100644 --- a/source/blender/blenkernel/BKE_constraint.h +++ b/source/blender/blenkernel/BKE_constraint.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_CONSTRAINT_H -#define BKE_CONSTRAINT_H +#ifndef __BKE_CONSTRAINT_H__ +#define __BKE_CONSTRAINT_H__ /** \file BKE_constraint.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h index 0aefe2231a5..78354cd4713 100644 --- a/source/blender/blenkernel/BKE_context.h +++ b/source/blender/blenkernel/BKE_context.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_CONTEXT_H -#define BKE_CONTEXT_H +#ifndef __BKE_CONTEXT_H__ +#define __BKE_CONTEXT_H__ /** \file BKE_context.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h index f0704741ebb..dd0c021f281 100644 --- a/source/blender/blenkernel/BKE_curve.h +++ b/source/blender/blenkernel/BKE_curve.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_CURVE_H -#define BKE_CURVE_H +#ifndef __BKE_CURVE_H__ +#define __BKE_CURVE_H__ /** \file BKE_curve.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index b69ad4d1b8b..6159240f92d 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -31,8 +31,8 @@ * \brief CustomData interface, see also DNA_customdata_types.h. */ -#ifndef BKE_CUSTOMDATA_H -#define BKE_CUSTOMDATA_H +#ifndef __BKE_CUSTOMDATA_H__ +#define __BKE_CUSTOMDATA_H__ #ifdef __cplusplus extern "C" { diff --git a/source/blender/blenkernel/BKE_customdata_file.h b/source/blender/blenkernel/BKE_customdata_file.h index be7aaa70188..c4c41c20d80 100644 --- a/source/blender/blenkernel/BKE_customdata_file.h +++ b/source/blender/blenkernel/BKE_customdata_file.h @@ -18,8 +18,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_CUSTOMDATA_FILE_H -#define BKE_CUSTOMDATA_FILE_H +#ifndef __BKE_CUSTOMDATA_FILE_H__ +#define __BKE_CUSTOMDATA_FILE_H__ /** \file BKE_customdata_file.h * \ingroup bke @@ -57,5 +57,5 @@ void cdf_remove(const char *filename); CDataFileLayer *cdf_layer_find(CDataFile *cdf, int type, const char *name); CDataFileLayer *cdf_layer_add(CDataFile *cdf, int type, const char *name, size_t datasize); -#endif /* BKE_CUSTOMDATA_FILE_H */ +#endif /* __BKE_CUSTOMDATA_FILE_H__ */ diff --git a/source/blender/blenkernel/BKE_deform.h b/source/blender/blenkernel/BKE_deform.h index 11747899aa9..2e9c94a3bb1 100644 --- a/source/blender/blenkernel/BKE_deform.h +++ b/source/blender/blenkernel/BKE_deform.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_DEFORM_H -#define BKE_DEFORM_H +#ifndef __BKE_DEFORM_H__ +#define __BKE_DEFORM_H__ /** \file BKE_deform.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_depsgraph.h b/source/blender/blenkernel/BKE_depsgraph.h index 5d475903feb..1bc85a64c77 100644 --- a/source/blender/blenkernel/BKE_depsgraph.h +++ b/source/blender/blenkernel/BKE_depsgraph.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DEPSGRAPH_API -#define DEPSGRAPH_API +#ifndef __BKE_DEPSGRAPH_H__ +#define __BKE_DEPSGRAPH_H__ /** \file BKE_depsgraph.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_displist.h b/source/blender/blenkernel/BKE_displist.h index 2d863201767..f43ec749a69 100644 --- a/source/blender/blenkernel/BKE_displist.h +++ b/source/blender/blenkernel/BKE_displist.h @@ -27,8 +27,8 @@ */ -#ifndef BKE_DISPLIST_H -#define BKE_DISPLIST_H +#ifndef __BKE_DISPLIST_H__ +#define __BKE_DISPLIST_H__ /** \file BKE_displist.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_dynamicpaint.h b/source/blender/blenkernel/BKE_dynamicpaint.h index 75b3c5b4f24..b6de8188536 100644 --- a/source/blender/blenkernel/BKE_dynamicpaint.h +++ b/source/blender/blenkernel/BKE_dynamicpaint.h @@ -11,8 +11,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_DYNAMIC_PAINT_H_ -#define BKE_DYNAMIC_PAINT_H_ +#ifndef __BKE_DYNAMICPAINT_H__ +#define __BKE_DYNAMICPAINT_H__ struct bContext; struct wmOperator; @@ -88,4 +88,4 @@ void dynamicPaint_outputSurfaceImage(struct DynamicPaintSurface *surface, char* #define DPAINT_WAVE_OBSTACLE 1 #define DPAINT_WAVE_REFLECT_ONLY 2 -#endif /* BKE_DYNAMIC_PAINT_H_ */ +#endif /* __BKE_DYNAMICPAINT_H__ */ diff --git a/source/blender/blenkernel/BKE_effect.h b/source/blender/blenkernel/BKE_effect.h index 3ebd57dde39..c2706ddb5c0 100644 --- a/source/blender/blenkernel/BKE_effect.h +++ b/source/blender/blenkernel/BKE_effect.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_EFFECT_H -#define BKE_EFFECT_H +#ifndef __BKE_EFFECT_H__ +#define __BKE_EFFECT_H__ /** \file BKE_effect.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h index 27e9140ba77..d79d6a204b9 100644 --- a/source/blender/blenkernel/BKE_fcurve.h +++ b/source/blender/blenkernel/BKE_fcurve.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_FCURVE_H -#define BKE_FCURVE_H +#ifndef __BKE_FCURVE_H__ +#define __BKE_FCURVE_H__ /** \file BKE_fcurve.h * \ingroup bke @@ -270,4 +270,4 @@ void fcurve_store_samples(struct FCurve *fcu, void *data, int start, int end, Fc } #endif -#endif /* BKE_FCURVE_H*/ +#endif /* __BKE_FCURVE_H__*/ diff --git a/source/blender/blenkernel/BKE_fluidsim.h b/source/blender/blenkernel/BKE_fluidsim.h index 2b2c7a4ff87..c2b1b1d6cad 100644 --- a/source/blender/blenkernel/BKE_fluidsim.h +++ b/source/blender/blenkernel/BKE_fluidsim.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_FLUIDSIM_H -#define BKE_FLUIDSIM_H +#ifndef __BKE_FLUIDSIM_H__ +#define __BKE_FLUIDSIM_H__ /** \file BKE_fluidsim.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_font.h b/source/blender/blenkernel/BKE_font.h index e164294b9a2..e94787cfd3c 100644 --- a/source/blender/blenkernel/BKE_font.h +++ b/source/blender/blenkernel/BKE_font.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_VFONT_H -#define BKE_VFONT_H +#ifndef __BKE_FONT_H__ +#define __BKE_FONT_H__ /** \file BKE_font.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h index ee3edbb47e7..fab42b5667b 100644 --- a/source/blender/blenkernel/BKE_global.h +++ b/source/blender/blenkernel/BKE_global.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_GLOBAL_H -#define BKE_GLOBAL_H +#ifndef __BKE_GLOBAL_H__ +#define __BKE_GLOBAL_H__ /** \file BKE_global.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_gpencil.h b/source/blender/blenkernel/BKE_gpencil.h index dbb1107c228..bb0216fe11c 100644 --- a/source/blender/blenkernel/BKE_gpencil.h +++ b/source/blender/blenkernel/BKE_gpencil.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_GPENCIL_H -#define BKE_GPENCIL_H +#ifndef __BKE_GPENCIL_H__ +#define __BKE_GPENCIL_H__ /** \file BKE_gpencil.h * \ingroup bke @@ -63,4 +63,4 @@ struct bGPDlayer *gpencil_layer_getactive(struct bGPdata *gpd); void gpencil_layer_setactive(struct bGPdata *gpd, struct bGPDlayer *active); void gpencil_layer_delactive(struct bGPdata *gpd); -#endif /* BKE_GPENCIL_H */ +#endif /* __BKE_GPENCIL_H__ */ diff --git a/source/blender/blenkernel/BKE_group.h b/source/blender/blenkernel/BKE_group.h index 044a40658c3..6629f0bdf7f 100644 --- a/source/blender/blenkernel/BKE_group.h +++ b/source/blender/blenkernel/BKE_group.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_GROUP_H -#define BKE_GROUP_H +#ifndef __BKE_GROUP_H__ +#define __BKE_GROUP_H__ /** \file BKE_group.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_icons.h b/source/blender/blenkernel/BKE_icons.h index ee18a41dbfe..85f259c3d94 100644 --- a/source/blender/blenkernel/BKE_icons.h +++ b/source/blender/blenkernel/BKE_icons.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_ICONS_H -#define BKE_ICONS_H +#ifndef __BKE_ICONS_H__ +#define __BKE_ICONS_H__ /** \file BKE_icons.h * \ingroup bke @@ -90,4 +90,4 @@ struct PreviewImage* BKE_previewimg_copy(struct PreviewImage *prv); /* retrieve existing or create new preview image */ struct PreviewImage* BKE_previewimg_get(struct ID *id); -#endif /* BKE_ICONS_H */ +#endif /* __BKE_ICONS_H__ */ diff --git a/source/blender/blenkernel/BKE_idcode.h b/source/blender/blenkernel/BKE_idcode.h index 57855a7082f..2188bed1bf7 100644 --- a/source/blender/blenkernel/BKE_idcode.h +++ b/source/blender/blenkernel/BKE_idcode.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_ID_INFO_H -#define BKE_ID_INFO_H +#ifndef __BKE_IDCODE_H__ +#define __BKE_IDCODE_H__ /** \file BKE_idcode.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h index fbe5bf2ef44..5a661f7c731 100644 --- a/source/blender/blenkernel/BKE_idprop.h +++ b/source/blender/blenkernel/BKE_idprop.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef _BKE_IDPROP_H -#define _BKE_IDPROP_H +#ifndef __BKE_IDPROP_H__ +#define __BKE_IDPROP_H__ /** \file BKE_idprop.h * \ingroup bke @@ -204,4 +204,4 @@ void IDP_UnlinkProperty(struct IDProperty *prop); #define IDP_IDPArray(prop) ((IDProperty*)(prop)->data.pointer) #define IDP_Double(prop) (*(double*)&(prop)->data.val) -#endif /* _BKE_IDPROP_H */ +#endif /* __BKE_IDPROP_H__ */ diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h index 5cdc3537f5b..722ead80ad9 100644 --- a/source/blender/blenkernel/BKE_image.h +++ b/source/blender/blenkernel/BKE_image.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_IMAGE_H -#define BKE_IMAGE_H +#ifndef __BKE_IMAGE_H__ +#define __BKE_IMAGE_H__ /** \file BKE_image.h * \ingroup bke @@ -54,10 +54,10 @@ int BKE_alphatest_ibuf(struct ImBuf *ibuf); int BKE_write_ibuf_stamp(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf); int BKE_write_ibuf(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf); int BKE_write_ibuf_as(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf, const short is_copy); -void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, char imtype, const short use_ext, const short use_frames); +void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, const char imtype, const short use_ext, const short use_frames); int BKE_add_image_extension(char *string, const char imtype); char BKE_ftype_to_imtype(const int ftype); -int BKE_imtype_to_ftype(char imtype); +int BKE_imtype_to_ftype(const char imtype); int BKE_imtype_is_movie(const char imtype); int BKE_imtype_supports_zbuf(const char imtype); diff --git a/source/blender/blenkernel/BKE_ipo.h b/source/blender/blenkernel/BKE_ipo.h index d21b0597976..547e7de7634 100644 --- a/source/blender/blenkernel/BKE_ipo.h +++ b/source/blender/blenkernel/BKE_ipo.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_IPO_H -#define BKE_IPO_H +#ifndef __BKE_IPO_H__ +#define __BKE_IPO_H__ /** \file BKE_ipo.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_key.h b/source/blender/blenkernel/BKE_key.h index 529d0680cf9..c241160102e 100644 --- a/source/blender/blenkernel/BKE_key.h +++ b/source/blender/blenkernel/BKE_key.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_KEY_H -#define BKE_KEY_H +#ifndef __BKE_KEY_H__ +#define __BKE_KEY_H__ /** \file BKE_key.h * \ingroup bke @@ -89,4 +89,4 @@ extern int slurph_opt; }; #endif -#endif // BKE_KEY_H +#endif // __BKE_KEY_H__ diff --git a/source/blender/blenkernel/BKE_lamp.h b/source/blender/blenkernel/BKE_lamp.h index cc9452ae155..50e25576320 100644 --- a/source/blender/blenkernel/BKE_lamp.h +++ b/source/blender/blenkernel/BKE_lamp.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_LAMP_H -#define BKE_LAMP_H +#ifndef __BKE_LAMP_H__ +#define __BKE_LAMP_H__ /** \file BKE_lamp.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_lattice.h b/source/blender/blenkernel/BKE_lattice.h index b5395309896..8a1529a7ad0 100644 --- a/source/blender/blenkernel/BKE_lattice.h +++ b/source/blender/blenkernel/BKE_lattice.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_LATTICE_H -#define BKE_LATTICE_H +#ifndef __BKE_LATTICE_H__ +#define __BKE_LATTICE_H__ /** \file BKE_lattice.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h index e8d6c85664b..e18a510ac07 100644 --- a/source/blender/blenkernel/BKE_library.h +++ b/source/blender/blenkernel/BKE_library.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_LIBRARY_TYPES_H -#define BKE_LIBRARY_TYPES_H +#ifndef __BKE_LIBRARY_H__ +#define __BKE_LIBRARY_H__ /** \file BKE_library.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_main.h b/source/blender/blenkernel/BKE_main.h index 05ba60b8a5b..ffcbb6e40bc 100644 --- a/source/blender/blenkernel/BKE_main.h +++ b/source/blender/blenkernel/BKE_main.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_MAIN_H -#define BKE_MAIN_H +#ifndef __BKE_MAIN_H__ +#define __BKE_MAIN_H__ /** \file BKE_main.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h index 0079ecb7d9c..3e73f6b9dd9 100644 --- a/source/blender/blenkernel/BKE_material.h +++ b/source/blender/blenkernel/BKE_material.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_MATERIAL_H -#define BKE_MATERIAL_H +#ifndef __BKE_MATERIAL_H__ +#define __BKE_MATERIAL_H__ /** \file BKE_material.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_mball.h b/source/blender/blenkernel/BKE_mball.h index 3dde54fd811..e3b5a006edf 100644 --- a/source/blender/blenkernel/BKE_mball.h +++ b/source/blender/blenkernel/BKE_mball.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_MBALL_H -#define BKE_MBALL_H +#ifndef __BKE_MBALL_H__ +#define __BKE_MBALL_H__ /** \file BKE_mball.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index c9c37345fe6..39e5a32404e 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_MESH_H -#define BKE_MESH_H +#ifndef __BKE_MESH_H__ +#define __BKE_MESH_H__ /** \file BKE_mesh.h * \ingroup bke @@ -282,4 +282,4 @@ void mesh_loops_to_mface_corners(struct CustomData *fdata, struct CustomData *ld } #endif -#endif /* BKE_MESH_H */ +#endif /* __BKE_MESH_H__ */ diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index 947e630273e..f3307b73187 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_MODIFIER_H -#define BKE_MODIFIER_H +#ifndef __BKE_MODIFIER_H__ +#define __BKE_MODIFIER_H__ /** \file BKE_modifier.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_movieclip.h b/source/blender/blenkernel/BKE_movieclip.h index eabbf459584..2d78e924c90 100644 --- a/source/blender/blenkernel/BKE_movieclip.h +++ b/source/blender/blenkernel/BKE_movieclip.h @@ -24,8 +24,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_MOVIECLIP_H -#define BKE_MOVIECLIP_H +#ifndef __BKE_MOVIECLIP_H__ +#define __BKE_MOVIECLIP_H__ /** \file BKE_movieclip.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_multires.h b/source/blender/blenkernel/BKE_multires.h index ce6e12345e8..bbf87c186e3 100644 --- a/source/blender/blenkernel/BKE_multires.h +++ b/source/blender/blenkernel/BKE_multires.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_MULTIRES_H -#define BKE_MULTIRES_H +#ifndef __BKE_MULTIRES_H__ +#define __BKE_MULTIRES_H__ /** \file BKE_multires.h * \ingroup bke @@ -102,5 +102,5 @@ void mdisp_apply_weight(const int S, const int corners, int x, int y, const int void mdisp_flip_disp(const int S, const int corners, const float axis_x[2], const float axis_y[2], float disp[3]); void mdisp_join_tris(struct MDisps *dst, struct MDisps *tri1, struct MDisps *tri2); -#endif // BKE_MULTIRES_H +#endif // __BKE_MULTIRES_H__ diff --git a/source/blender/blenkernel/BKE_navmesh_conversion.h b/source/blender/blenkernel/BKE_navmesh_conversion.h index ab5c2b19707..8de53ed8b8e 100644 --- a/source/blender/blenkernel/BKE_navmesh_conversion.h +++ b/source/blender/blenkernel/BKE_navmesh_conversion.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_NAVMESH_CONVERSION_H -#define BKE_NAVMESH_CONVERSION_H +#ifndef __BKE_NAVMESH_CONVERSION_H__ +#define __BKE_NAVMESH_CONVERSION_H__ struct DerivedMesh; diff --git a/source/blender/blenkernel/BKE_nla.h b/source/blender/blenkernel/BKE_nla.h index 773c5ced1cb..921972c9fa8 100644 --- a/source/blender/blenkernel/BKE_nla.h +++ b/source/blender/blenkernel/BKE_nla.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_NLA_H -#define BKE_NLA_H +#ifndef __BKE_NLA_H__ +#define __BKE_NLA_H__ /** \file BKE_nla.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index 0cccd8a366b..ae2f9305894 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_NODE_H -#define BKE_NODE_H +#ifndef __BKE_NODE_H__ +#define __BKE_NODE_H__ /** \file BKE_node.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index 828b0b47e3a..ac703663864 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_OBJECT_H -#define BKE_OBJECT_H +#ifndef __BKE_OBJECT_H__ +#define __BKE_OBJECT_H__ /** \file BKE_object.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_ocean.h b/source/blender/blenkernel/BKE_ocean.h index c8ce3f8ce63..7c0d99b35ea 100644 --- a/source/blender/blenkernel/BKE_ocean.h +++ b/source/blender/blenkernel/BKE_ocean.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_OCEAN_H -#define BKE_OCEAN_H +#ifndef __BKE_OCEAN_H__ +#define __BKE_OCEAN_H__ #ifdef __cplusplus extern "C" { diff --git a/source/blender/blenkernel/BKE_packedFile.h b/source/blender/blenkernel/BKE_packedFile.h index 606d6167937..1eff20cbd57 100644 --- a/source/blender/blenkernel/BKE_packedFile.h +++ b/source/blender/blenkernel/BKE_packedFile.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_PACKEDFILE_H -#define BKE_PACKEDFILE_H +#ifndef __BKE_PACKEDFILE_H__ +#define __BKE_PACKEDFILE_H__ /** \file BKE_packedFile.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index b1ac0a5b7d4..045e11c18b8 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_PAINT_H -#define BKE_PAINT_H +#ifndef __BKE_PAINT_H__ +#define __BKE_PAINT_H__ /** \file BKE_paint.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h index dbefbd95a15..c03ecca17cf 100644 --- a/source/blender/blenkernel/BKE_particle.h +++ b/source/blender/blenkernel/BKE_particle.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_PARTICLE_H -#define BKE_PARTICLE_H +#ifndef __BKE_PARTICLE_H__ +#define __BKE_PARTICLE_H__ /** \file BKE_particle.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_plugin_types.h b/source/blender/blenkernel/BKE_plugin_types.h index 73c6dae35cf..8f9706f9833 100644 --- a/source/blender/blenkernel/BKE_plugin_types.h +++ b/source/blender/blenkernel/BKE_plugin_types.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_PLUGIN_TYPES_H -#define BKE_PLUGIN_TYPES_H +#ifndef __BKE_PLUGIN_TYPES_H__ +#define __BKE_PLUGIN_TYPES_H__ /** \file BKE_plugin_types.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h index d1b0acf7142..38f0503b40d 100644 --- a/source/blender/blenkernel/BKE_pointcache.h +++ b/source/blender/blenkernel/BKE_pointcache.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_POINTCACHE_H -#define BKE_POINTCACHE_H +#ifndef __BKE_POINTCACHE_H__ +#define __BKE_POINTCACHE_H__ /** \file BKE_pointcache.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_property.h b/source/blender/blenkernel/BKE_property.h index 779c83acf21..a29dc0e7be4 100644 --- a/source/blender/blenkernel/BKE_property.h +++ b/source/blender/blenkernel/BKE_property.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_PROPERTY_H -#define BKE_PROPERTY_H +#ifndef __BKE_PROPERTY_H__ +#define __BKE_PROPERTY_H__ /** \file BKE_property.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_report.h b/source/blender/blenkernel/BKE_report.h index 784f8a63757..fd372ae6d83 100644 --- a/source/blender/blenkernel/BKE_report.h +++ b/source/blender/blenkernel/BKE_report.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_REPORT_H -#define BKE_REPORT_H +#ifndef __BKE_REPORT_H__ +#define __BKE_REPORT_H__ /** \file BKE_report.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_sca.h b/source/blender/blenkernel/BKE_sca.h index cfcc0e146d8..22b44511195 100644 --- a/source/blender/blenkernel/BKE_sca.h +++ b/source/blender/blenkernel/BKE_sca.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SCA_H -#define BKE_SCA_H +#ifndef __BKE_SCA_H__ +#define __BKE_SCA_H__ /** \file BKE_sca.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_scene.h b/source/blender/blenkernel/BKE_scene.h index 2df5e7ac2c6..e46d99ed873 100644 --- a/source/blender/blenkernel/BKE_scene.h +++ b/source/blender/blenkernel/BKE_scene.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SCENE_H -#define BKE_SCENE_H +#ifndef __BKE_SCENE_H__ +#define __BKE_SCENE_H__ /** \file BKE_scene.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h index 44b92f70519..c254144b812 100644 --- a/source/blender/blenkernel/BKE_screen.h +++ b/source/blender/blenkernel/BKE_screen.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SCREEN_H -#define BKE_SCREEN_H +#ifndef __BKE_SCREEN_H__ +#define __BKE_SCREEN_H__ /** \file BKE_screen.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_script.h b/source/blender/blenkernel/BKE_script.h index d8ceaf23652..7bd801a8177 100644 --- a/source/blender/blenkernel/BKE_script.h +++ b/source/blender/blenkernel/BKE_script.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SCRIPT_H -#define BKE_SCRIPT_H +#ifndef __BKE_SCRIPT_H__ +#define __BKE_SCRIPT_H__ /** \file BKE_script.h * \ingroup bke @@ -46,4 +46,4 @@ void free_script (struct Script *script); } #endif -#endif /* BKE_SCRIPT_H */ +#endif /* __BKE_SCRIPT_H__ */ diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index ed0730b7f09..5c6058b1453 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SEQUENCER_H -#define BKE_SEQUENCER_H +#ifndef __BKE_SEQUENCER_H__ +#define __BKE_SEQUENCER_H__ /** \file BKE_sequencer.h * \ingroup bke @@ -341,4 +341,4 @@ extern SequencerDrawView sequencer_view3d_cb; extern ListBase seqbase_clipboard; extern int seqbase_clipboard_frame; -#endif // BKE_SEQUENCER_H +#endif // __BKE_SEQUENCER_H__ diff --git a/source/blender/blenkernel/BKE_shrinkwrap.h b/source/blender/blenkernel/BKE_shrinkwrap.h index d1fef8b0ce1..446084053de 100644 --- a/source/blender/blenkernel/BKE_shrinkwrap.h +++ b/source/blender/blenkernel/BKE_shrinkwrap.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SHRINKWRAP_H -#define BKE_SHRINKWRAP_H +#ifndef __BKE_SHRINKWRAP_H__ +#define __BKE_SHRINKWRAP_H__ /** \file BKE_shrinkwrap.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_sketch.h b/source/blender/blenkernel/BKE_sketch.h index 1dd82c1d8e6..76b3dbacf7f 100644 --- a/source/blender/blenkernel/BKE_sketch.h +++ b/source/blender/blenkernel/BKE_sketch.h @@ -19,8 +19,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SKETCH_H -#define BKE_SKETCH_H +#ifndef __BKE_SKETCH_H__ +#define __BKE_SKETCH_H__ /** \file BKE_sketch.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_smoke.h b/source/blender/blenkernel/BKE_smoke.h index 51acef44f52..1e97bc07f99 100644 --- a/source/blender/blenkernel/BKE_smoke.h +++ b/source/blender/blenkernel/BKE_smoke.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SMOKE_H_ -#define BKE_SMOKE_H_ +#ifndef __BKE_SMOKE_H__ +#define __BKE_SMOKE_H__ /** \file BKE_smoke.h * \ingroup bke @@ -45,4 +45,4 @@ void smokeModifier_copy(struct SmokeModifierData *smd, struct SmokeModifierData long long smoke_get_mem_req(int xres, int yres, int zres, int amplify); -#endif /* BKE_SMOKE_H_ */ +#endif /* __BKE_SMOKE_H__ */ diff --git a/source/blender/blenkernel/BKE_softbody.h b/source/blender/blenkernel/BKE_softbody.h index c889aa83b9a..6714225f513 100644 --- a/source/blender/blenkernel/BKE_softbody.h +++ b/source/blender/blenkernel/BKE_softbody.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SOFTBODY_H -#define BKE_SOFTBODY_H +#ifndef __BKE_SOFTBODY_H__ +#define __BKE_SOFTBODY_H__ /** \file BKE_softbody.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h index fdf1d09559d..90477647b88 100644 --- a/source/blender/blenkernel/BKE_sound.h +++ b/source/blender/blenkernel/BKE_sound.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SOUND_H -#define BKE_SOUND_H +#ifndef __BKE_SOUND_H__ +#define __BKE_SOUND_H__ /** \file BKE_sound.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_speaker.h b/source/blender/blenkernel/BKE_speaker.h index d309c048f1a..fddcfb2c7f3 100644 --- a/source/blender/blenkernel/BKE_speaker.h +++ b/source/blender/blenkernel/BKE_speaker.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SPEAKER_H -#define BKE_SPEAKER_H +#ifndef __BKE_SPEAKER_H__ +#define __BKE_SPEAKER_H__ /** \file BKE_speaker.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_subsurf.h b/source/blender/blenkernel/BKE_subsurf.h index 47aee714bf7..cf77ea85c15 100644 --- a/source/blender/blenkernel/BKE_subsurf.h +++ b/source/blender/blenkernel/BKE_subsurf.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SUBSURF_H -#define BKE_SUBSURF_H +#ifndef __BKE_SUBSURF_H__ +#define __BKE_SUBSURF_H__ /** \file BKE_subsurf.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_suggestions.h b/source/blender/blenkernel/BKE_suggestions.h index a0a270422c7..6168b98ac4c 100644 --- a/source/blender/blenkernel/BKE_suggestions.h +++ b/source/blender/blenkernel/BKE_suggestions.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SUGGESTIONS_H -#define BKE_SUGGESTIONS_H +#ifndef __BKE_SUGGESTIONS_H__ +#define __BKE_SUGGESTIONS_H__ /** \file BKE_suggestions.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_text.h b/source/blender/blenkernel/BKE_text.h index f0c054560c4..504b859c183 100644 --- a/source/blender/blenkernel/BKE_text.h +++ b/source/blender/blenkernel/BKE_text.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_TEXT_H -#define BKE_TEXT_H +#ifndef __BKE_TEXT_H__ +#define __BKE_TEXT_H__ /** \file BKE_text.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_texture.h b/source/blender/blenkernel/BKE_texture.h index a67a06ef9fb..2574c45eec2 100644 --- a/source/blender/blenkernel/BKE_texture.h +++ b/source/blender/blenkernel/BKE_texture.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_TEXTURE_H -#define BKE_TEXTURE_H +#ifndef __BKE_TEXTURE_H__ +#define __BKE_TEXTURE_H__ /** \file BKE_texture.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_tracking.h b/source/blender/blenkernel/BKE_tracking.h index ebbba7de7c7..1be858ecf80 100644 --- a/source/blender/blenkernel/BKE_tracking.h +++ b/source/blender/blenkernel/BKE_tracking.h @@ -24,8 +24,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_TRACKING_H -#define BKE_TRACKING_H +#ifndef __BKE_TRACKING_H__ +#define __BKE_TRACKING_H__ /** \file BKE_trackingp.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_unit.h b/source/blender/blenkernel/BKE_unit.h index db586f6d262..e3ad49e2225 100644 --- a/source/blender/blenkernel/BKE_unit.h +++ b/source/blender/blenkernel/BKE_unit.h @@ -20,8 +20,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_UNIT_H -#define BKE_UNIT_H +#ifndef __BKE_UNIT_H__ +#define __BKE_UNIT_H__ /** \file BKE_unit.h * \ingroup bke @@ -76,4 +76,4 @@ double bUnit_GetScaler(void *usys_pt, int index); } #endif -#endif /* BKE_UNIT_H */ +#endif /* __BKE_UNIT_H__ */ diff --git a/source/blender/blenkernel/BKE_utildefines.h b/source/blender/blenkernel/BKE_utildefines.h index a6a9bb0c0f6..39458cb3a13 100644 --- a/source/blender/blenkernel/BKE_utildefines.h +++ b/source/blender/blenkernel/BKE_utildefines.h @@ -33,8 +33,8 @@ */ -#ifndef BKE_UTILDEFINES_H -#define BKE_UTILDEFINES_H +#ifndef __BKE_UTILDEFINES_H__ +#define __BKE_UTILDEFINES_H__ #ifdef __cplusplus extern "C" { @@ -89,4 +89,4 @@ extern "C" { } #endif -#endif // BKE_UTILDEFINES_H +#endif // __BKE_UTILDEFINES_H__ diff --git a/source/blender/blenkernel/BKE_world.h b/source/blender/blenkernel/BKE_world.h index fe25279dcfb..16ff3acaf71 100644 --- a/source/blender/blenkernel/BKE_world.h +++ b/source/blender/blenkernel/BKE_world.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_WORLD_H -#define BKE_WORLD_H +#ifndef __BKE_WORLD_H__ +#define __BKE_WORLD_H__ /** \file BKE_world.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_writeavi.h b/source/blender/blenkernel/BKE_writeavi.h index c906761f3d7..03174fb5284 100644 --- a/source/blender/blenkernel/BKE_writeavi.h +++ b/source/blender/blenkernel/BKE_writeavi.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_WRITEAVI_H -#define BKE_WRITEAVI_H +#ifndef __BKE_WRITEAVI_H__ +#define __BKE_WRITEAVI_H__ /** \file BKE_writeavi.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_writeffmpeg.h b/source/blender/blenkernel/BKE_writeffmpeg.h index 4c42d1e4a6c..299f8e185cf 100644 --- a/source/blender/blenkernel/BKE_writeffmpeg.h +++ b/source/blender/blenkernel/BKE_writeffmpeg.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_WRITEFFMPEG_H -#define BKE_WRITEFFMPEG_H +#ifndef __BKE_WRITEFFMPEG_H__ +#define __BKE_WRITEFFMPEG_H__ /** \file BKE_writeffmpeg.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_writeframeserver.h b/source/blender/blenkernel/BKE_writeframeserver.h index 040550d8faa..cb607e1473c 100644 --- a/source/blender/blenkernel/BKE_writeframeserver.h +++ b/source/blender/blenkernel/BKE_writeframeserver.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_WRITEFRAMESERVER_H -#define BKE_WRITEFRAMESERVER_H +#ifndef __BKE_WRITEFRAMESERVER_H__ +#define __BKE_WRITEFRAMESERVER_H__ /** \file BKE_writeframeserver.h * \ingroup bke diff --git a/source/blender/blenkernel/depsgraph_private.h b/source/blender/blenkernel/depsgraph_private.h index 0338d10a66d..0db3c5615f5 100644 --- a/source/blender/blenkernel/depsgraph_private.h +++ b/source/blender/blenkernel/depsgraph_private.h @@ -27,8 +27,8 @@ * \ingroup bke */ -#ifndef DEPSGRAPH_PRIVATE -#define DEPSGRAPH_PRIVATE +#ifndef __DEPSGRAPH_PRIVATE_H__ +#define __DEPSGRAPH_PRIVATE_H__ #include "BKE_depsgraph.h" #include "DNA_constraint_types.h" diff --git a/source/blender/blenkernel/intern/bmesh_private.h b/source/blender/blenkernel/intern/bmesh_private.h index f6ef8d2e585..7e152f2f34a 100644 --- a/source/blender/blenkernel/intern/bmesh_private.h +++ b/source/blender/blenkernel/intern/bmesh_private.h @@ -30,8 +30,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BMESH_PRIVATE -#define BMESH_PRIVATE +#ifndef __BMESH_PRIVATE_H__ +#define __BMESH_PRIVATE_H__ /** \file blender/bmesh/bmesh_private.h * \ingroup bmesh diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 6fd89db10e7..bf9ed8b17e3 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -2285,7 +2285,7 @@ void BKE_ptcache_id_time(PTCacheID *pid, Scene *scene, float cfra, int *startfra /* float offset; unused for now */ float time, nexttime; - /* TODO: this has to be sorter out once bsystem_time gets redone, */ + /* TODO: this has to be sorted out once bsystem_time gets redone, */ /* now caches can handle interpolating etc. too - jahka */ /* time handling for point cache: diff --git a/source/blender/blenkernel/nla_private.h b/source/blender/blenkernel/nla_private.h index e287606921b..51a7ac7ee62 100644 --- a/source/blender/blenkernel/nla_private.h +++ b/source/blender/blenkernel/nla_private.h @@ -30,8 +30,8 @@ */ -#ifndef NLA_PRIVATE -#define NLA_PRIVATE +#ifndef __NLA_PRIVATE_H__ +#define __NLA_PRIVATE_H__ /* --------------- NLA Evaluation DataTypes ----------------------- */ @@ -85,4 +85,4 @@ NlaEvalStrip *nlastrips_ctime_get_strip(ListBase *list, ListBase *strips, short void nlastrip_evaluate(PointerRNA *ptr, ListBase *channels, ListBase *modifiers, NlaEvalStrip *nes); void nladata_flush_channels(ListBase *channels); -#endif // NLA_PRIVATE +#endif // __NLA_PRIVATE_H__ diff --git a/source/blender/blenlib/BLI_args.h b/source/blender/blenlib/BLI_args.h index 3b8b60be1b9..7a7529fa3c3 100644 --- a/source/blender/blenlib/BLI_args.h +++ b/source/blender/blenlib/BLI_args.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_ARGS_H -#define BLI_ARGS_H +#ifndef __BLI_ARGS_H__ +#define __BLI_ARGS_H__ /** \file BLI_args.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_blenlib.h b/source/blender/blenlib/BLI_blenlib.h index 515c2444e80..c802b083f1f 100644 --- a/source/blender/blenlib/BLI_blenlib.h +++ b/source/blender/blenlib/BLI_blenlib.h @@ -55,8 +55,8 @@ * standard libraries. */ -#ifndef BLI_BLENLIB_H -#define BLI_BLENLIB_H +#ifndef __BLI_BLENLIB_H__ +#define __BLI_BLENLIB_H__ struct ListBase; diff --git a/source/blender/blenlib/BLI_boxpack2d.h b/source/blender/blenlib/BLI_boxpack2d.h index 886965f66b3..7f92047b312 100644 --- a/source/blender/blenlib/BLI_boxpack2d.h +++ b/source/blender/blenlib/BLI_boxpack2d.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef _BLI_BOXPACK2D_H_ -#define _BLI_BOXPACK2D_H_ +#ifndef __BLI_BOXPACK2D_H__ +#define __BLI_BOXPACK2D_H__ /** \file BLI_boxpack2d.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_bpath.h b/source/blender/blenlib/BLI_bpath.h index e850db5a171..f1639bdb3c1 100644 --- a/source/blender/blenlib/BLI_bpath.h +++ b/source/blender/blenlib/BLI_bpath.h @@ -31,8 +31,8 @@ * so for BPath we dont need to malloc */ -#ifndef BLI_BPATH_H -#define BLI_BPATH_H +#ifndef __BLI_BPATH_H__ +#define __BLI_BPATH_H__ struct ID; struct ListBase; @@ -64,4 +64,4 @@ void makeFilesRelative(struct Main *bmain, const char *basedir, struct ReportLis void makeFilesAbsolute(struct Main *bmain, const char *basedir, struct ReportList *reports); void findMissingFiles(struct Main *bmain, const char *searchpath, struct ReportList *reports); -#endif // BLI_BPATH_H +#endif // __BLI_BPATH_H__ diff --git a/source/blender/blenlib/BLI_callbacks.h b/source/blender/blenlib/BLI_callbacks.h index 201ada45acf..f4f92a0cbee 100644 --- a/source/blender/blenlib/BLI_callbacks.h +++ b/source/blender/blenlib/BLI_callbacks.h @@ -29,8 +29,8 @@ * \ingroup bli */ -#ifndef BLI_CALLBACKS_H -#define BLI_CALLBACKS_H +#ifndef __BLI_CALLBACKS_H__ +#define __BLI_CALLBACKS_H__ struct bContext; struct Main; @@ -70,4 +70,4 @@ void BLI_cb_finalize(void); /* This is blenlib internal only, unrelated to above */ void callLocalErrorCallBack(const char* msg); -#endif /* BLI_CALLBACKS_H */ +#endif /* __BLI_CALLBACKS_H__ */ diff --git a/source/blender/blenlib/BLI_cpu.h b/source/blender/blenlib/BLI_cpu.h index de04a2a6cc6..fa29162e59e 100644 --- a/source/blender/blenlib/BLI_cpu.h +++ b/source/blender/blenlib/BLI_cpu.h @@ -18,8 +18,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_CPU_H -#define BLI_CPU_H +#ifndef __BLI_CPU_H__ +#define __BLI_CPU_H__ /** \file BLI_cpu.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_dlrbTree.h b/source/blender/blenlib/BLI_dlrbTree.h index cde2058b200..bad74a1e5a8 100644 --- a/source/blender/blenlib/BLI_dlrbTree.h +++ b/source/blender/blenlib/BLI_dlrbTree.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_DLRB_TREE_H -#define BLI_DLRB_TREE_H +#ifndef __BLI_DLRBTREE_H__ +#define __BLI_DLRBTREE_H__ /** \file BLI_dlrbTree.h * \ingroup bli @@ -158,4 +158,4 @@ void BLI_dlrbTree_insert(DLRBT_Tree *tree, DLRBT_Node *node); /* ********************************************** */ -#endif // BLI_DLRB_TREE_H +#endif // __BLI_DLRBTREE_H__ diff --git a/source/blender/blenlib/BLI_dynstr.h b/source/blender/blenlib/BLI_dynstr.h index 32c4e012d1d..6b499c3bbcf 100644 --- a/source/blender/blenlib/BLI_dynstr.h +++ b/source/blender/blenlib/BLI_dynstr.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_DYNSTR_H -#define BLI_DYNSTR_H +#ifndef __BLI_DYNSTR_H__ +#define __BLI_DYNSTR_H__ /** \file BLI_dynstr.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_edgehash.h b/source/blender/blenlib/BLI_edgehash.h index 9153155e359..b00ac683eb1 100644 --- a/source/blender/blenlib/BLI_edgehash.h +++ b/source/blender/blenlib/BLI_edgehash.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_EDGEHASH_H -#define BLI_EDGEHASH_H +#ifndef __BLI_EDGEHASH_H__ +#define __BLI_EDGEHASH_H__ /** \file BLI_edgehash.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_editVert.h b/source/blender/blenlib/BLI_editVert.h index fa0c0746f66..d241bfca75a 100644 --- a/source/blender/blenlib/BLI_editVert.h +++ b/source/blender/blenlib/BLI_editVert.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_EDITVERT_H -#define BLI_EDITVERT_H +#ifndef __BLI_EDITVERT_H__ +#define __BLI_EDITVERT_H__ /** \file BLI_editVert.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h index 2e8f1a5512e..8fe8456e845 100644 --- a/source/blender/blenlib/BLI_fileops.h +++ b/source/blender/blenlib/BLI_fileops.h @@ -30,8 +30,8 @@ * \brief File and directory operations. * */ -#ifndef BLI_FILEOPS_H -#define BLI_FILEOPS_H +#ifndef __BLI_FILEOPS_H__ +#define __BLI_FILEOPS_H__ #ifdef __cplusplus extern "C" { diff --git a/source/blender/blenlib/BLI_fileops_types.h b/source/blender/blenlib/BLI_fileops_types.h index 443ba654cb6..8e4b5b3e411 100644 --- a/source/blender/blenlib/BLI_fileops_types.h +++ b/source/blender/blenlib/BLI_fileops_types.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_FILEOPS_TYPES_H -#define BLI_FILEOPS_TYPES_H +#ifndef __BLI_FILEOPS_TYPES_H__ +#define __BLI_FILEOPS_TYPES_H__ /** \file BLI_fileops_types.h * \ingroup bli @@ -74,5 +74,5 @@ struct dirlink char *name; }; -#endif /* BLI_FILEOPS_TYPES_H */ +#endif /* __BLI_FILEOPS_TYPES_H__ */ diff --git a/source/blender/blenlib/BLI_fnmatch.h b/source/blender/blenlib/BLI_fnmatch.h index ac8960ff9c9..711d1aa756b 100644 --- a/source/blender/blenlib/BLI_fnmatch.h +++ b/source/blender/blenlib/BLI_fnmatch.h @@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef _FNMATCH_H -#define _FNMATCH_H 1 +#ifndef __BLI_FNMATCH_H__ +#define __BLI_FNMATCH_H__ /** \file BLI_fnmatch.h * \ingroup bli @@ -69,4 +69,4 @@ extern int fnmatch __P ((const char *__pattern, const char *__string, } #endif -#endif /* fnmatch.h */ +#endif /* __BLI_FNMATCH_H__ */ diff --git a/source/blender/blenlib/BLI_ghash.h b/source/blender/blenlib/BLI_ghash.h index f2a7e73e5e0..ccad3250a5f 100644 --- a/source/blender/blenlib/BLI_ghash.h +++ b/source/blender/blenlib/BLI_ghash.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_GHASH_H -#define BLI_GHASH_H +#ifndef __BLI_GHASH_H__ +#define __BLI_GHASH_H__ /** \file BLI_ghash.h * \ingroup bli @@ -156,4 +156,4 @@ void BLI_ghashutil_pairfree (void *ptr); } #endif -#endif /* BLI_GHASH_H */ +#endif /* __BLI_GHASH_H__ */ diff --git a/source/blender/blenlib/BLI_graph.h b/source/blender/blenlib/BLI_graph.h index 056bba71dea..5995daebc61 100644 --- a/source/blender/blenlib/BLI_graph.h +++ b/source/blender/blenlib/BLI_graph.h @@ -22,8 +22,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_GRAPH_H_ -#define BLI_GRAPH_H_ +#ifndef __BLI_GRAPH_H__ +#define __BLI_GRAPH_H__ /** \file BLI_graph.h * \ingroup bli @@ -184,4 +184,4 @@ void BLI_mirrorAlongAxis(float v[3], float center[3], float axis[3]); /* Anything higher is the order in radial symmetry */ #define SYM_SIDE_RADIAL 3 -#endif /*BLI_GRAPH_H_*/ +#endif /*__BLI_GRAPH_H__*/ diff --git a/source/blender/blenlib/BLI_gsqueue.h b/source/blender/blenlib/BLI_gsqueue.h index 425ecb79899..53fdb5a541a 100644 --- a/source/blender/blenlib/BLI_gsqueue.h +++ b/source/blender/blenlib/BLI_gsqueue.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_GSQUEUE_H -#define BLI_GSQUEUE_H +#ifndef __BLI_GSQUEUE_H__ +#define __BLI_GSQUEUE_H__ /** \file BLI_gsqueue.h * \ingroup bli @@ -95,5 +95,5 @@ void BLI_gsqueue_pushback (GSQueue *gq, void *item); */ void BLI_gsqueue_free (GSQueue *gq); -#endif /* BLI_GSQUEUE_H */ +#endif /* __BLI_GSQUEUE_H__ */ diff --git a/source/blender/blenlib/BLI_heap.h b/source/blender/blenlib/BLI_heap.h index 0124c997d91..5c67bf52b9a 100644 --- a/source/blender/blenlib/BLI_heap.h +++ b/source/blender/blenlib/BLI_heap.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_HEAP_H -#define BLI_HEAP_H +#ifndef __BLI_HEAP_H__ +#define __BLI_HEAP_H__ /** \file BLI_heap.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_jitter.h b/source/blender/blenlib/BLI_jitter.h index f432a51de9f..9aa21a89521 100644 --- a/source/blender/blenlib/BLI_jitter.h +++ b/source/blender/blenlib/BLI_jitter.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_JITTER_H -#define BLI_JITTER_H +#ifndef __BLI_JITTER_H__ +#define __BLI_JITTER_H__ /** \file BLI_jitter.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_kdopbvh.h b/source/blender/blenlib/BLI_kdopbvh.h index 8ead7bf5f17..ff3017fef03 100644 --- a/source/blender/blenlib/BLI_kdopbvh.h +++ b/source/blender/blenlib/BLI_kdopbvh.h @@ -26,8 +26,8 @@ */ -#ifndef BLI_KDOPBVH_H -#define BLI_KDOPBVH_H +#ifndef __BLI_KDOPBVH_H__ +#define __BLI_KDOPBVH_H__ /** \file BLI_kdopbvh.h * \ingroup bli @@ -111,5 +111,5 @@ int BLI_bvhtree_range_query(BVHTree *tree, const float co[3], float radius, BVHT } #endif -#endif // BLI_KDOPBVH_H +#endif // __BLI_KDOPBVH_H__ diff --git a/source/blender/blenlib/BLI_kdtree.h b/source/blender/blenlib/BLI_kdtree.h index 9ffc64e8812..0ec514b4480 100644 --- a/source/blender/blenlib/BLI_kdtree.h +++ b/source/blender/blenlib/BLI_kdtree.h @@ -26,8 +26,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_KDTREE_H -#define BLI_KDTREE_H +#ifndef __BLI_KDTREE_H__ +#define __BLI_KDTREE_H__ /** \file BLI_kdtree.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_linklist.h b/source/blender/blenlib/BLI_linklist.h index 6886dff0da3..664beb4eb98 100644 --- a/source/blender/blenlib/BLI_linklist.h +++ b/source/blender/blenlib/BLI_linklist.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_LINKLIST_H -#define BLI_LINKLIST_H +#ifndef __BLI_LINKLIST_H__ +#define __BLI_LINKLIST_H__ /** \file BLI_linklist.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_listbase.h b/source/blender/blenlib/BLI_listbase.h index 88ee79d7b97..b0a5e80d850 100644 --- a/source/blender/blenlib/BLI_listbase.h +++ b/source/blender/blenlib/BLI_listbase.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_LISTBASE_H -#define BLI_LISTBASE_H +#ifndef __BLI_LISTBASE_H__ +#define __BLI_LISTBASE_H__ /** \file BLI_listbase.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_math.h b/source/blender/blenlib/BLI_math.h index 1fe700492be..89c37daae84 100644 --- a/source/blender/blenlib/BLI_math.h +++ b/source/blender/blenlib/BLI_math.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** * */ -#ifndef BLI_MATH_H -#define BLI_MATH_H +#ifndef __BLI_MATH_H__ +#define __BLI_MATH_H__ /** \file BLI_math.h * \ingroup bli @@ -59,5 +59,5 @@ #include "BLI_math_vector.h" #include "BLI_math_geom.h" -#endif /* BLI_MATH_H */ +#endif /* __BLI_MATH_H__ */ diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h index 53db77dc203..d0a1311f2bc 100644 --- a/source/blender/blenlib/BLI_math_base.h +++ b/source/blender/blenlib/BLI_math_base.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** * */ -#ifndef BLI_MATH_BASE_H -#define BLI_MATH_BASE_H +#ifndef __BLI_MATH_BASE_H__ +#define __BLI_MATH_BASE_H__ /** \file BLI_math_base.h * \ingroup bli @@ -142,7 +142,7 @@ #define CLAMP(a, b, c) if((a)<(b)) (a)=(b); else if((a)>(c)) (a)=(c) #endif -#ifdef BLI_MATH_INLINE_H +#ifdef __BLI_MATH_INLINE_H__ #include "intern/math_base_inline.c" #endif @@ -181,5 +181,5 @@ extern double round(double x); double double_round(double x, int ndigits); -#endif /* BLI_MATH_BASE_H */ +#endif /* __BLI_MATH_BASE_H__ */ diff --git a/source/blender/blenlib/BLI_math_color.h b/source/blender/blenlib/BLI_math_color.h index f4d6882b5d8..4771fdbcb69 100644 --- a/source/blender/blenlib/BLI_math_color.h +++ b/source/blender/blenlib/BLI_math_color.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** * */ -#ifndef BLI_MATH_COLOR_H -#define BLI_MATH_COLOR_H +#ifndef __BLI_MATH_COLOR_H__ +#define __BLI_MATH_COLOR_H__ /** \file BLI_math_color.h * \ingroup bli @@ -113,7 +113,7 @@ void rgba_float_to_uchar(unsigned char col_r[4], const float col_f[4]); void lift_gamma_gain_to_asc_cdl(float *lift, float *gamma, float *gain, float *offset, float *slope, float *power); -#ifdef BLI_MATH_INLINE_H +#ifdef __BLI_MATH_INLINE_H__ #include "intern/math_color_inline.c" #endif @@ -121,5 +121,5 @@ void lift_gamma_gain_to_asc_cdl(float *lift, float *gamma, float *gain, float *o } #endif -#endif /* BLI_MATH_COLOR_H */ +#endif /* __BLI_MATH_COLOR_H__ */ diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h index 8d18f5253c4..61e34b7cb75 100644 --- a/source/blender/blenlib/BLI_math_geom.h +++ b/source/blender/blenlib/BLI_math_geom.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** * */ -#ifndef BLI_MATH_GEOM_H -#define BLI_MATH_GEOM_H +#ifndef __BLI_MATH_GEOM_H__ +#define __BLI_MATH_GEOM_H__ /** \file BLI_math_geom.h * \ingroup bli @@ -36,7 +36,7 @@ extern "C" { #include "BLI_math_inline.h" -#ifdef BLI_MATH_INLINE_H +#ifdef __BLI_MATH_INLINE_H__ #include "intern/math_geom_inline.c" #endif @@ -273,5 +273,5 @@ void axis_dominant_v3(int *axis_a, int *axis_b, const float axis[3]); } #endif -#endif /* BLI_MATH_GEOM_H */ +#endif /* __BLI_MATH_GEOM_H__ */ diff --git a/source/blender/blenlib/BLI_math_inline.h b/source/blender/blenlib/BLI_math_inline.h index 83aeb6cb735..fcc5fb744bb 100644 --- a/source/blender/blenlib/BLI_math_inline.h +++ b/source/blender/blenlib/BLI_math_inline.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** * */ -#ifndef BLI_MATH_INLINE_H -#define BLI_MATH_INLINE_H +#ifndef __BLI_MATH_INLINE_H__ +#define __BLI_MATH_INLINE_H__ /** \file BLI_math_inline.h * \ingroup bli @@ -35,9 +35,9 @@ extern "C" { #endif /* add platform/compiler checks here if it is not supported */ -#define BLI_MATH_INLINE_H +#define __BLI_MATH_INLINE_H__ -#ifdef BLI_MATH_INLINE_H +#ifdef __BLI_MATH_INLINE_H__ #ifdef _MSC_VER #define MINLINE static __forceinline #define MALWAYS_INLINE MINLINE @@ -59,5 +59,5 @@ extern "C" { } #endif -#endif /* BLI_MATH_INLINE_H */ +#endif /* __BLI_MATH_INLINE_H__ */ diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h index 4d3a4dfe445..8c19941e18c 100644 --- a/source/blender/blenlib/BLI_math_matrix.h +++ b/source/blender/blenlib/BLI_math_matrix.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** * */ -#ifndef BLI_MATH_MATRIX_H -#define BLI_MATH_MATRIX_H +#ifndef __BLI_MATH_MATRIX_H__ +#define __BLI_MATH_MATRIX_H__ /** \file BLI_math_matrix.h * \ingroup bli @@ -179,5 +179,5 @@ void print_m4(const char *str, float M[3][4]); } #endif -#endif /* BLI_MATH_MATRIX_H */ +#endif /* __BLI_MATH_MATRIX_H__ */ diff --git a/source/blender/blenlib/BLI_math_rotation.h b/source/blender/blenlib/BLI_math_rotation.h index fca7c3469a1..62b81530c65 100644 --- a/source/blender/blenlib/BLI_math_rotation.h +++ b/source/blender/blenlib/BLI_math_rotation.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** * */ -#ifndef BLI_MATH_ROTATION_H -#define BLI_MATH_ROTATION_H +#ifndef __BLI_MATH_ROTATION_H__ +#define __BLI_MATH_ROTATION_H__ /** \file BLI_math_rotation.h * \ingroup bli @@ -189,5 +189,5 @@ float angle_wrap_deg(float angle); } #endif -#endif /* BLI_MATH_ROTATION_H */ +#endif /* __BLI_MATH_ROTATION_H__ */ diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h index 12a0b1892a1..af8b52a7edf 100644 --- a/source/blender/blenlib/BLI_math_vector.h +++ b/source/blender/blenlib/BLI_math_vector.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** * */ -#ifndef BLI_MATH_VECTOR_H -#define BLI_MATH_VECTOR_H +#ifndef __BLI_MATH_VECTOR_H__ +#define __BLI_MATH_VECTOR_H__ /** \file BLI_math_vector.h * \ingroup bli @@ -36,7 +36,7 @@ extern "C" { #include "BLI_math_inline.h" -#ifdef BLI_MATH_INLINE_H +#ifdef __BLI_MATH_INLINE_H__ #include "intern/math_vector_inline.c" #endif @@ -216,5 +216,5 @@ void fill_vn_fl(float *array_tar, const int size, const float val); } #endif -#endif /* BLI_MATH_VECTOR_H */ +#endif /* __BLI_MATH_VECTOR_H__ */ diff --git a/source/blender/blenlib/BLI_md5.h b/source/blender/blenlib/BLI_md5.h index afcc3cdfa3e..51211d548cd 100644 --- a/source/blender/blenlib/BLI_md5.h +++ b/source/blender/blenlib/BLI_md5.h @@ -18,8 +18,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_MD5_H -#define BLI_MD5_H +#ifndef __BLI_MD5_H__ +#define __BLI_MD5_H__ /** \file BLI_md5.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_memarena.h b/source/blender/blenlib/BLI_memarena.h index ceb7b17f7ef..8306a69e567 100644 --- a/source/blender/blenlib/BLI_memarena.h +++ b/source/blender/blenlib/BLI_memarena.h @@ -35,8 +35,8 @@ * data, which are all freed at the same moment. */ -#ifndef BLI_MEMARENA_H -#define BLI_MEMARENA_H +#ifndef __BLI_MEMARENA_H__ +#define __BLI_MEMARENA_H__ #ifdef __cplusplus extern "C" { diff --git a/source/blender/blenlib/BLI_mempool.h b/source/blender/blenlib/BLI_mempool.h index 77896709285..d80d46e9ae5 100644 --- a/source/blender/blenlib/BLI_mempool.h +++ b/source/blender/blenlib/BLI_mempool.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_MEMPOOL_H -#define BLI_MEMPOOL_H +#ifndef __BLI_MEMPOOL_H__ +#define __BLI_MEMPOOL_H__ /** \file BLI_mempool.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_noise.h b/source/blender/blenlib/BLI_noise.h index de2efb18216..9f5475ced25 100644 --- a/source/blender/blenlib/BLI_noise.h +++ b/source/blender/blenlib/BLI_noise.h @@ -26,8 +26,8 @@ * */ -#ifndef BLI_NOISE_H -#define BLI_NOISE_H +#ifndef __BLI_NOISE_H__ +#define __BLI_NOISE_H__ /** \file BLI_noise.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_path_util.h b/source/blender/blenlib/BLI_path_util.h index 68bb1a7280d..a2d432b492a 100644 --- a/source/blender/blenlib/BLI_path_util.h +++ b/source/blender/blenlib/BLI_path_util.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_PATH_UTIL_H -#define BLI_PATH_UTIL_H +#ifndef __BLI_PATH_UTIL_H__ +#define __BLI_PATH_UTIL_H__ /** \file BLI_path_util.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_pbvh.h b/source/blender/blenlib/BLI_pbvh.h index e17a37c0a12..ef32ec03a61 100644 --- a/source/blender/blenlib/BLI_pbvh.h +++ b/source/blender/blenlib/BLI_pbvh.h @@ -18,8 +18,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_PBVH_H -#define BLI_PBVH_H +#ifndef __BLI_PBVH_H__ +#define __BLI_PBVH_H__ /** \file BLI_pbvh.h * \ingroup bli @@ -246,5 +246,5 @@ void BLI_pbvh_gather_proxies(PBVH* pbvh, PBVHNode*** nodes, int* totnode); //void BLI_pbvh_node_BB_reset(PBVHNode* node); //void BLI_pbvh_node_BB_expand(PBVHNode* node, float co[3]); -#endif /* BLI_PBVH_H */ +#endif /* __BLI_PBVH_H__ */ diff --git a/source/blender/blenlib/BLI_rand.h b/source/blender/blenlib/BLI_rand.h index 7ce0031bcf9..1749bbcc38a 100644 --- a/source/blender/blenlib/BLI_rand.h +++ b/source/blender/blenlib/BLI_rand.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_RAND_H -#define BLI_RAND_H +#ifndef __BLI_RAND_H__ +#define __BLI_RAND_H__ /** \file BLI_rand.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_rect.h b/source/blender/blenlib/BLI_rect.h index 25b7f193105..4ff203737a0 100644 --- a/source/blender/blenlib/BLI_rect.h +++ b/source/blender/blenlib/BLI_rect.h @@ -26,8 +26,8 @@ * */ -#ifndef BLI_RECT_H -#define BLI_RECT_H +#ifndef __BLI_RECT_H__ +#define __BLI_RECT_H__ /** \file BLI_rect.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_scanfill.h b/source/blender/blenlib/BLI_scanfill.h index 6fd4766a6a0..890a8c8247d 100644 --- a/source/blender/blenlib/BLI_scanfill.h +++ b/source/blender/blenlib/BLI_scanfill.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_SCANFILL_H -#define BLI_SCANFILL_H +#ifndef __BLI_SCANFILL_H__ +#define __BLI_SCANFILL_H__ /** \file BLI_scanfill.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_string.h b/source/blender/blenlib/BLI_string.h index 46389a9259e..25eb2ebecc2 100644 --- a/source/blender/blenlib/BLI_string.h +++ b/source/blender/blenlib/BLI_string.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_STRING_H -#define BLI_STRING_H +#ifndef __BLI_STRING_H__ +#define __BLI_STRING_H__ /** \file BLI_string.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_string_utf8.h b/source/blender/blenlib/BLI_string_utf8.h index 6eba7d5eb49..7799c32c4b7 100644 --- a/source/blender/blenlib/BLI_string_utf8.h +++ b/source/blender/blenlib/BLI_string_utf8.h @@ -20,8 +20,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_STRING_UTF8_H -#define BLI_STRING_UTF8_H +#ifndef __BLI_STRING_UTF8_H__ +#define __BLI_STRING_UTF8_H__ /** \file BLI_string_utf8.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_threads.h b/source/blender/blenlib/BLI_threads.h index d77640ccdb1..03bf375a894 100644 --- a/source/blender/blenlib/BLI_threads.h +++ b/source/blender/blenlib/BLI_threads.h @@ -27,8 +27,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_THREADS_H -#define BLI_THREADS_H +#ifndef __BLI_THREADS_H__ +#define __BLI_THREADS_H__ /** \file BLI_threads.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h index 6d9188c1848..ef8a6015adb 100644 --- a/source/blender/blenlib/BLI_utildefines.h +++ b/source/blender/blenlib/BLI_utildefines.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_UTILDEFINES_H -#define BLI_UTILDEFINES_H +#ifndef __BLI_UTILDEFINES_H__ +#define __BLI_UTILDEFINES_H__ /** \file BLI_utildefines.h * \ingroup bli @@ -225,10 +225,13 @@ #define GET_INT_FROM_POINTER(i) ((int)(intptr_t)(i)) /* Macro to convert a value to string in the preprocessor - * STRINGIFY_ARG: gives the defined name in the string - * STRINGIFY: gives the defined value. */ -#define STRINGIFY_ARG(x) #x -#define STRINGIFY(x) STRINGIFY_ARG(x) + * STRINGIFY_ARG: gives the argument as a string + * STRINGIFY_APPEND: appends any argument 'b' onto the string argument 'a', + * used by STRINGIFY because some preprocessors warn about zero arguments + * STRINGIFY: gives the argument's value as a string */ +#define STRINGIFY_ARG(x) "" #x +#define STRINGIFY_APPEND(a, b) "" a #b +#define STRINGIFY(x) STRINGIFY_APPEND("", x) /* useful for debugging */ #define AT __FILE__ ":" STRINGIFY(__LINE__) @@ -310,4 +313,4 @@ # define UNLIKELY(x) (x) #endif -#endif // BLI_UTILDEFINES_H +#endif // __BLI_UTILDEFINES_H__ diff --git a/source/blender/blenlib/BLI_uvproject.h b/source/blender/blenlib/BLI_uvproject.h index d4a34a9e290..5abad87452c 100644 --- a/source/blender/blenlib/BLI_uvproject.h +++ b/source/blender/blenlib/BLI_uvproject.h @@ -17,8 +17,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_UVPROJECT_H -#define BKE_UVPROJECT_H +#ifndef __BLI_UVPROJECT_H__ +#define __BLI_UVPROJECT_H__ /** \file BLI_uvproject.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_vfontdata.h b/source/blender/blenlib/BLI_vfontdata.h index e858e784991..5f7b7c39036 100644 --- a/source/blender/blenlib/BLI_vfontdata.h +++ b/source/blender/blenlib/BLI_vfontdata.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_VFONTDATA_H -#define BLI_VFONTDATA_H +#ifndef __BLI_VFONTDATA_H__ +#define __BLI_VFONTDATA_H__ /** \file BLI_vfontdata.h * \ingroup bli diff --git a/source/blender/blenlib/BLI_voxel.h b/source/blender/blenlib/BLI_voxel.h index 8dd95a897ae..4a13810a705 100644 --- a/source/blender/blenlib/BLI_voxel.h +++ b/source/blender/blenlib/BLI_voxel.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_VOXEL_H -#define BLI_VOXEL_H +#ifndef __BLI_VOXEL_H__ +#define __BLI_VOXEL_H__ /** \file BLI_voxel.h * \ingroup bli @@ -41,4 +41,4 @@ float voxel_sample_trilinear(float *data, const int res[3], const float co[3]); float voxel_sample_triquadratic(float *data, const int res[3], const float co[3]); float voxel_sample_tricubic(float *data, const int res[3], const float co[3], int bspline); -#endif /* BLI_VOXEL_H */ +#endif /* __BLI_VOXEL_H__ */ diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h index 0eb2f86b668..d939882b105 100644 --- a/source/blender/blenlib/BLI_winstuff.h +++ b/source/blender/blenlib/BLI_winstuff.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef __WINSTUFF_H__ -#define __WINSTUFF_H__ +#ifndef __BLI_WINSTUFF_H__ +#define __BLI_WINSTUFF_H__ /** \file BLI_winstuff.h * \ingroup bli @@ -150,5 +150,5 @@ int BLI_getInstallationDir(char *str); #endif /* _WIN32 */ -#endif /* __WINSTUFF_H__ */ +#endif /* __BLI_WINSTUFF_H__ */ diff --git a/source/blender/blenlib/PIL_time.h b/source/blender/blenlib/PIL_time.h index 0a777a80b2a..fa2ad8644e9 100644 --- a/source/blender/blenlib/PIL_time.h +++ b/source/blender/blenlib/PIL_time.h @@ -32,8 +32,8 @@ */ -#ifndef PIL_TIME_H -#define PIL_TIME_H +#ifndef __PIL_TIME_H__ +#define __PIL_TIME_H__ #ifdef __cplusplus extern "C" { @@ -78,4 +78,4 @@ void PIL_sleep_ms (int ms); } #endif -#endif /* !PIL_TIME_H */ +#endif /* !__PIL_TIME_H__ */ diff --git a/source/blender/blenlib/intern/dynamiclist.h b/source/blender/blenlib/intern/dynamiclist.h index 83b5aac963c..64c4a8fd61a 100644 --- a/source/blender/blenlib/intern/dynamiclist.h +++ b/source/blender/blenlib/intern/dynamiclist.h @@ -29,8 +29,8 @@ */ -#ifndef B_DYNAMIC_LIST_H -#define B_DYNAMIC_LIST_H +#ifndef __DYNAMICLIST_H__ +#define __DYNAMICLIST_H__ #define PAGE_SIZE 4 diff --git a/source/blender/blenlib/intern/math_color_inline.c b/source/blender/blenlib/intern/math_color_inline.c index 386452ed592..f8b986e799b 100644 --- a/source/blender/blenlib/intern/math_color_inline.c +++ b/source/blender/blenlib/intern/math_color_inline.c @@ -163,7 +163,7 @@ MINLINE void linearrgb_to_srgb_ushort4_predivide(unsigned short srgb[4], const f for(i=0; i<3; ++i) { t = linear[i] * inv_alpha; - srgb[i] = (t < 1.0f)? to_srgb_table_lookup(t) * alpha : FTOUSHORT(linearrgb_to_srgb(t) * alpha); + srgb[i] = (t < 1.0f)? (unsigned short)(to_srgb_table_lookup(t) * alpha) : FTOUSHORT(linearrgb_to_srgb(t) * alpha); } srgb[3] = FTOUSHORT(linear[3]); diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c index 47deb705def..ce9896b99cc 100644 --- a/source/blender/blenlib/intern/math_vector.c +++ b/source/blender/blenlib/intern/math_vector.c @@ -112,8 +112,12 @@ void mid_v3_v3v3(float v[3], const float v1[3], const float v2[3]) /********************************** Angles ***********************************/ /* Return the angle in radians between vecs 1-2 and 2-3 in radians - If v1 is a shoulder, v2 is the elbow and v3 is the hand, - this would return the angle at the elbow */ + * If v1 is a shoulder, v2 is the elbow and v3 is the hand, + * this would return the angle at the elbow. + * + * note that when v1/v2/v3 represent 3 points along a straight line + * that the angle returned will be pi (180deg), rather then 0.0 + */ float angle_v3v3v3(const float v1[3], const float v2[3], const float v3[3]) { float vec1[3], vec2[3]; diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h index d63baca883e..52d06c36bdf 100644 --- a/source/blender/blenloader/BLO_readfile.h +++ b/source/blender/blenloader/BLO_readfile.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLO_READFILE_H -#define BLO_READFILE_H +#ifndef __BLO_READFILE_H__ +#define __BLO_READFILE_H__ /** \file BLO_readfile.h * \ingroup blenloader diff --git a/source/blender/blenloader/BLO_runtime.h b/source/blender/blenloader/BLO_runtime.h index 573db5301bc..0a5a7d3a660 100644 --- a/source/blender/blenloader/BLO_runtime.h +++ b/source/blender/blenloader/BLO_runtime.h @@ -26,8 +26,8 @@ * */ -#ifndef BLO_RUNTIME_H -#define BLO_RUNTIME_H +#ifndef __BLO_RUNTIME_H__ +#define __BLO_RUNTIME_H__ /** \file BLO_runtime.h * \ingroup blenloader @@ -47,5 +47,5 @@ struct BlendFileData *BLO_read_runtime(const char *file, struct ReportList *repo } #endif -#endif /* BLO_RUNTIME_H */ +#endif /* __BLO_RUNTIME_H__ */ diff --git a/source/blender/blenloader/BLO_soundfile.h b/source/blender/blenloader/BLO_soundfile.h index 4c8d40b3e69..d2f87139b74 100644 --- a/source/blender/blenloader/BLO_soundfile.h +++ b/source/blender/blenloader/BLO_soundfile.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLO_SOUNDFILE_H -#define BLO_SOUNDFILE_H +#ifndef __BLO_SOUNDFILE_H__ +#define __BLO_SOUNDFILE_H__ /** \file BLO_soundfile.h * \ingroup blenloader diff --git a/source/blender/blenloader/BLO_sys_types.h b/source/blender/blenloader/BLO_sys_types.h index 20d211a74c1..9430878a641 100644 --- a/source/blender/blenloader/BLO_sys_types.h +++ b/source/blender/blenloader/BLO_sys_types.h @@ -40,8 +40,8 @@ * */ -#ifndef BLO_SYS_TYPES_H -#define BLO_SYS_TYPES_H +#ifndef __BLO_SYS_TYPES_H__ +#define __BLO_SYS_TYPES_H__ #ifdef __cplusplus extern "C" { diff --git a/source/blender/blenloader/BLO_undofile.h b/source/blender/blenloader/BLO_undofile.h index 0e06cbd9041..f3c16e07c62 100644 --- a/source/blender/blenloader/BLO_undofile.h +++ b/source/blender/blenloader/BLO_undofile.h @@ -26,8 +26,8 @@ * external writefile function prototypes */ -#ifndef BLO_UNDOFILE_H -#define BLO_UNDOFILE_H +#ifndef __BLO_UNDOFILE_H__ +#define __BLO_UNDOFILE_H__ /** \file BLO_undofile.h * \ingroup blenloader diff --git a/source/blender/blenloader/BLO_writefile.h b/source/blender/blenloader/BLO_writefile.h index 1ac5feef119..87b832a070e 100644 --- a/source/blender/blenloader/BLO_writefile.h +++ b/source/blender/blenloader/BLO_writefile.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLO_WRITEFILE_H -#define BLO_WRITEFILE_H +#ifndef __BLO_WRITEFILE_H__ +#define __BLO_WRITEFILE_H__ /** \file BLO_writefile.h * \ingroup blenloader diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 111d0a079e4..981f9cedcfd 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3912,7 +3912,7 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh) if((fd->flags & FD_FLAGS_SWITCH_ENDIAN) && mesh->tface) { TFace *tf= mesh->tface; - unsigned int i; + int i; for (i=0; i< (mesh->totface); i++, tf++) { SWITCH_INT(tf->col[0]); @@ -7571,15 +7571,16 @@ static void do_versions_nodetree_convert_angle(bNodeTree *ntree) void do_versions_image_settings_2_60(Scene *sce) { - /* note: rd->subimtype is moved into indervidual settings now and no longer + /* note: rd->subimtype is moved into individual settings now and no longer * exists */ RenderData *rd= &sce->r; ImageFormatData *imf= &sce->r.im_format; - imf->imtype= rd->imtype; - imf->planes= rd->planes; - imf->compress= rd->quality; - imf->quality= rd->quality; + /* we know no data loss happens here, the old values were in char range */ + imf->imtype= (char)rd->imtype; + imf->planes= (char)rd->planes; + imf->compress= (char)rd->quality; + imf->quality= (char)rd->quality; /* default, was stored in multiple places, may override later */ imf->depth= R_IMF_CHAN_DEPTH_8; diff --git a/source/blender/blenloader/intern/readfile.h b/source/blender/blenloader/intern/readfile.h index c7a53555415..511ded0ecdc 100644 --- a/source/blender/blenloader/intern/readfile.h +++ b/source/blender/blenloader/intern/readfile.h @@ -30,8 +30,8 @@ * \ingroup blenloader */ -#ifndef READFILE_H -#define READFILE_H +#ifndef __READFILE_H__ +#define __READFILE_H__ #include "zlib.h" diff --git a/source/blender/blenpluginapi/externdef.h b/source/blender/blenpluginapi/externdef.h index 28239d117cd..fbd81a83272 100644 --- a/source/blender/blenpluginapi/externdef.h +++ b/source/blender/blenpluginapi/externdef.h @@ -30,8 +30,8 @@ * SUCH DAMAGE. */ -#ifndef _EXTERNDEF_H -#define _EXTERNDEF_H +#ifndef __EXTERNDEF_H__ +#define __EXTERNDEF_H__ #ifdef WIN32 #ifdef PLUGIN_INTERN @@ -46,4 +46,4 @@ #define LIBIMPORT extern #endif -#endif /* _EXTERNDEF_H */ +#endif /* __EXTERNDEF_H__ */ diff --git a/source/blender/blenpluginapi/floatpatch.h b/source/blender/blenpluginapi/floatpatch.h index 73fe35cad26..4c9b98d073d 100644 --- a/source/blender/blenpluginapi/floatpatch.h +++ b/source/blender/blenpluginapi/floatpatch.h @@ -30,8 +30,8 @@ * SUCH DAMAGE. */ -#ifndef FLOATPATCH_H -#define FLOATPATCH_H +#ifndef __FLOATPATCH_H__ +#define __FLOATPATCH_H__ /* floating point libs differ at systems... with these defines it comilies at all! */ @@ -88,5 +88,5 @@ #endif -#endif /* FLOATPATCH_H */ +#endif /* __FLOATPATCH_H__ */ diff --git a/source/blender/blenpluginapi/iff.h b/source/blender/blenpluginapi/iff.h index f07e80b36ce..cf235c2f0ca 100644 --- a/source/blender/blenpluginapi/iff.h +++ b/source/blender/blenpluginapi/iff.h @@ -30,8 +30,8 @@ * SUCH DAMAGE. */ -#ifndef IFF_H -#define IFF_H +#ifndef __IFF_H__ +#define __IFF_H__ #include #include "util.h" @@ -117,5 +117,5 @@ LIBIMPORT void IMB_rectfill_area(struct ImBuf *ibuf, float *col, int x1, int y1, LIBIMPORT void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height, const float col[4], int x1, int y1, int x2, int y2); LIBIMPORT void IMB_rectfill_alpha(struct ImBuf *drect, const float value); -#endif /* IFF_H */ +#endif /* __IFF_H__ */ diff --git a/source/blender/blenpluginapi/plugin.h b/source/blender/blenpluginapi/plugin.h index 65569560faf..eb32fe80fa3 100644 --- a/source/blender/blenpluginapi/plugin.h +++ b/source/blender/blenpluginapi/plugin.h @@ -30,8 +30,8 @@ * SUCH DAMAGE. */ -#ifndef PLUGIN_H -#define PLUGIN_H +#ifndef __PLUGIN_H__ +#define __PLUGIN_H__ #include "externdef.h" #include "iff.h" @@ -102,5 +102,5 @@ LIBIMPORT float turbulence(float noisesize, float x, float y, float z, int depth /* hard turbulence */ LIBIMPORT float turbulence1(float noisesize, float x, float y, float z, int depth); -#endif /* PLUGIN_H */ +#endif /* __PLUGIN_H__ */ diff --git a/source/blender/blenpluginapi/util.h b/source/blender/blenpluginapi/util.h index 156e758977d..340201924d7 100644 --- a/source/blender/blenpluginapi/util.h +++ b/source/blender/blenpluginapi/util.h @@ -30,8 +30,8 @@ * SUCH DAMAGE. */ -#ifndef UTIL_H -#define UTIL_H +#ifndef __UTIL_H__ +#define __UTIL_H__ #include #include @@ -98,5 +98,5 @@ LIBEXPORT void *mallocT(int len, char *str); LIBEXPORT void *callocT(int len, char *str); LIBEXPORT void freeT(void *vmemh); -#endif /* UTIL_H */ +#endif /* __UTIL_H__ */ diff --git a/source/blender/collada/AnimationImporter.h b/source/blender/collada/AnimationImporter.h index 2c3165db122..118a50b0480 100644 --- a/source/blender/collada/AnimationImporter.h +++ b/source/blender/collada/AnimationImporter.h @@ -24,8 +24,8 @@ * \ingroup collada */ -#ifndef __BC_ANIMATIONIMPORTER_H__ -#define __BC_ANIMATIONIMPORTER_H__ +#ifndef __ANIMATIONIMPORTER_H__ +#define __ANIMATIONIMPORTER_H__ #include #include diff --git a/source/blender/collada/ArmatureImporter.h b/source/blender/collada/ArmatureImporter.h index 343badaca28..0c95ee81272 100644 --- a/source/blender/collada/ArmatureImporter.h +++ b/source/blender/collada/ArmatureImporter.h @@ -24,8 +24,8 @@ * \ingroup collada */ -#ifndef __BC_ARMATUREIMPORTER_H__ -#define __BC_ARMATUREIMPORTER_H__ +#ifndef __ARMATUREIMPORTER_H__ +#define __ARMATUREIMPORTER_H__ #include "COLLADAFWNode.h" #include "COLLADAFWUniqueId.h" diff --git a/source/blender/collada/MeshImporter.h b/source/blender/collada/MeshImporter.h index 3bccc4ed04a..0c2e600121f 100644 --- a/source/blender/collada/MeshImporter.h +++ b/source/blender/collada/MeshImporter.h @@ -24,8 +24,8 @@ * \ingroup collada */ -#ifndef __BC__MESHIMPORTER_H__ -#define __BC__MESHIMPORTER_H__ +#ifndef __MESHIMPORTER_H__ +#define __MESHIMPORTER_H__ #include #include diff --git a/source/blender/collada/SkinInfo.h b/source/blender/collada/SkinInfo.h index 71b7c71fd90..7befe7168d3 100644 --- a/source/blender/collada/SkinInfo.h +++ b/source/blender/collada/SkinInfo.h @@ -24,8 +24,8 @@ * \ingroup collada */ -#ifndef __BC_SKININFO_H__ -#define __BC_SKININFO_H__ +#ifndef __SKININFO_H__ +#define __SKININFO_H__ #include #include diff --git a/source/blender/collada/TransformReader.h b/source/blender/collada/TransformReader.h index e1409a9ced8..a08f4438d73 100644 --- a/source/blender/collada/TransformReader.h +++ b/source/blender/collada/TransformReader.h @@ -24,8 +24,8 @@ * \ingroup collada */ -#ifndef __BC_TRANSFORMREADER_H__ -#define __BC_TRANSFORMREADER_H__ +#ifndef __TRANSFORMREADER_H__ +#define __TRANSFORMREADER_H__ #include "COLLADAFWNode.h" #include "COLLADAFWTransformation.h" diff --git a/source/blender/collada/collada.h b/source/blender/collada/collada.h index 161977368db..f8afc797447 100644 --- a/source/blender/collada/collada.h +++ b/source/blender/collada/collada.h @@ -24,8 +24,8 @@ * \ingroup collada */ -#ifndef BLENDER_COLLADA_H -#define BLENDER_COLLADA_H +#ifndef __COLLADA_H__ +#define __COLLADA_H__ struct bContext; struct Scene; diff --git a/source/blender/collada/collada_internal.h b/source/blender/collada/collada_internal.h index 5c3aa49b837..4f555acb882 100644 --- a/source/blender/collada/collada_internal.h +++ b/source/blender/collada/collada_internal.h @@ -24,8 +24,8 @@ * \ingroup collada */ -#ifndef COLLADA_INTERNAL_H -#define COLLADA_INTERNAL_H +#ifndef __COLLADA_INTERNAL_H__ +#define __COLLADA_INTERNAL_H__ #include #include @@ -98,4 +98,4 @@ extern std::string get_material_id(Material *mat); extern bool has_object_type(Scene* sce, short obtype); -#endif /* COLLADA_INTERNAL_H */ +#endif /* __COLLADA_INTERNAL_H__ */ diff --git a/source/blender/collada/collada_utils.h b/source/blender/collada/collada_utils.h index b95e3bd2824..b0c24152652 100644 --- a/source/blender/collada/collada_utils.h +++ b/source/blender/collada/collada_utils.h @@ -24,8 +24,8 @@ * \ingroup collada */ -#ifndef __BC_UTILS_H__ -#define __BC_UTILS_H__ +#ifndef __COLLADA_UTILS_H__ +#define __COLLADA_UTILS_H__ #include "COLLADAFWMeshPrimitive.h" #include "COLLADAFWGeometry.h" diff --git a/source/blender/editors/animation/anim_intern.h b/source/blender/editors/animation/anim_intern.h index 0ac941e5630..bfc70c79404 100644 --- a/source/blender/editors/animation/anim_intern.h +++ b/source/blender/editors/animation/anim_intern.h @@ -28,8 +28,8 @@ */ -#ifndef ANIM_INTERN_H -#define ANIM_INTERN_H +#ifndef __ANIM_INTERN_H__ +#define __ANIM_INTERN_H__ /* KeyingSets/Keyframing Interface ------------- */ @@ -79,4 +79,4 @@ void ANIM_OT_driver_button_remove(struct wmOperatorType *ot); void ANIM_OT_copy_driver_button(struct wmOperatorType *ot); void ANIM_OT_paste_driver_button(struct wmOperatorType *ot); -#endif // ANIM_INTERN_H +#endif // __ANIM_INTERN_H__ diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 84206c4275e..5557923c3d6 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -1178,7 +1178,8 @@ void ANIM_OT_keyframe_insert (wmOperatorType *ot) /* confirm whether a keyframe was added by showing a popup * - by default, this is enabled, since this operator is assumed to be called independently */ - prop= RNA_def_boolean(ot->srna, "confirm_success", 1, "Confirm Successful Insert", "Show a popup when the keyframes get successfully added"); + prop= RNA_def_boolean(ot->srna, "confirm_success", 1, "Confirm Successful Insert", + "Show a popup when the keyframes get successfully added"); RNA_def_property_flag(prop, PROP_HIDDEN); } @@ -1233,7 +1234,8 @@ void ANIM_OT_keyframe_insert_menu (wmOperatorType *ot) * - by default, this is disabled so that if a menu is shown, this doesn't come up too */ // XXX should this just be always on? - prop= RNA_def_boolean(ot->srna, "confirm_success", 0, "Confirm Successful Insert", "Show a popup when the keyframes get successfully added"); + prop= RNA_def_boolean(ot->srna, "confirm_success", 0, "Confirm Successful Insert", + "Show a popup when the keyframes get successfully added"); RNA_def_property_flag(prop, PROP_HIDDEN); /* whether the menu should always be shown @@ -1273,7 +1275,7 @@ static int delete_key_exec (bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - /* try to insert keyframes for the channels specified by KeyingSet */ + /* try to delete keyframes for the channels specified by KeyingSet */ success= ANIM_apply_keyingset(C, NULL, NULL, ks, MODIFYKEY_MODE_DELETE, cfra); if (G.f & G_DEBUG) printf("KeyingSet '%s' - Successfully removed %d Keyframes \n", ks->name, success); @@ -1325,7 +1327,8 @@ void ANIM_OT_keyframe_delete (wmOperatorType *ot) /* confirm whether a keyframe was added by showing a popup * - by default, this is enabled, since this operator is assumed to be called independently */ - RNA_def_boolean(ot->srna, "confirm_success", 1, "Confirm Successful Insert", "Show a popup when the keyframes get successfully added"); + RNA_def_boolean(ot->srna, "confirm_success", 1, "Confirm Successful Delete", + "Show a popup when the keyframes get successfully removed"); } /* Delete Key Operator ------------------------ */ diff --git a/source/blender/editors/armature/BIF_generate.h b/source/blender/editors/armature/BIF_generate.h index 311b110a3f6..1d8ee8e2c62 100644 --- a/source/blender/editors/armature/BIF_generate.h +++ b/source/blender/editors/armature/BIF_generate.h @@ -23,8 +23,8 @@ */ -#ifndef BIF_GENERATE_H -#define BIF_GENERATE_H +#ifndef __BIF_GENERATE_H__ +#define __BIF_GENERATE_H__ struct ToolSettings; struct EditBone; @@ -45,4 +45,4 @@ struct EditBone * subdivideArcBy(struct ToolSettings *toolsettings, struct bArma void setBoneRollFromNormal(struct EditBone *bone, float *no, float invmat[][4], float tmat[][3]); -#endif /* BIF_GENERATE_H */ +#endif /* __BIF_GENERATE_H__ */ diff --git a/source/blender/editors/armature/BIF_retarget.h b/source/blender/editors/armature/BIF_retarget.h index ad3d3555250..c878b0c36df 100644 --- a/source/blender/editors/armature/BIF_retarget.h +++ b/source/blender/editors/armature/BIF_retarget.h @@ -23,8 +23,8 @@ */ -#ifndef BIF_RETARGET_H -#define BIF_RETARGET_H +#ifndef __BIF_RETARGET_H__ +#define __BIF_RETARGET_H__ #include "DNA_listBase.h" @@ -168,4 +168,4 @@ void RIG_printArc(struct RigGraph *rg, struct RigArc *arc); void RIG_printGraph(struct RigGraph *rg); void RIG_printArcBones(struct RigArc *arc); -#endif /* BIF_RETARGET_H */ +#endif /* __BIF_RETARGET_H__ */ diff --git a/source/blender/editors/armature/armature_intern.h b/source/blender/editors/armature/armature_intern.h index 40d909380a0..13239f87e65 100644 --- a/source/blender/editors/armature/armature_intern.h +++ b/source/blender/editors/armature/armature_intern.h @@ -28,8 +28,8 @@ * \ingroup edarmature */ -#ifndef ED_ARMATURE_INTERN_H -#define ED_ARMATURE_INTERN_H +#ifndef __ARMATURE_INTERN_H__ +#define __ARMATURE_INTERN_H__ /* internal exports only */ struct wmOperatorType; @@ -219,5 +219,5 @@ struct EditBone *duplicateEditBoneObjects(struct EditBone *curBone, const char * /* editbones is the source list */ void updateDuplicateSubtargetObjects(struct EditBone *dupBone, struct ListBase *editbones, struct Object *src_ob, struct Object *dst_ob); -#endif /* ED_ARMATURE_INTERN_H */ +#endif /* __ARMATURE_INTERN_H__ */ diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index 4ddce14ab92..bb493d3fec4 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -182,9 +182,9 @@ static void laplacian_triangle_area(LaplacianSystem *sys, int i1, int i2, int i3 t2= cotan_weight(v2, v3, v1); t3= cotan_weight(v3, v1, v2); - if(RAD2DEGF(angle_v3v3v3(v2, v1, v3)) > 90) obtuse= 1; - else if(RAD2DEGF(angle_v3v3v3(v1, v2, v3)) > 90) obtuse= 2; - else if(RAD2DEGF(angle_v3v3v3(v1, v3, v2)) > 90) obtuse= 3; + if (angle_v3v3v3(v2, v1, v3) > DEG2RADF(90.0f)) obtuse= 1; + else if(angle_v3v3v3(v1, v2, v3) > DEG2RADF(90.0f)) obtuse= 2; + else if(angle_v3v3v3(v1, v3, v2) > DEG2RADF(90.0f)) obtuse= 3; if (obtuse > 0) { area= area_tri_v3(v1, v2, v3); diff --git a/source/blender/editors/armature/meshlaplacian.h b/source/blender/editors/armature/meshlaplacian.h index 6ec67997d24..fbc1596ed0c 100644 --- a/source/blender/editors/armature/meshlaplacian.h +++ b/source/blender/editors/armature/meshlaplacian.h @@ -31,8 +31,8 @@ */ -#ifndef BIF_MESHLAPLACIAN_H -#define BIF_MESHLAPLACIAN_H +#ifndef __MESHLAPLACIAN_H__ +#define __MESHLAPLACIAN_H__ //#define RIGID_DEFORM diff --git a/source/blender/editors/armature/reeb.h b/source/blender/editors/armature/reeb.h index 0080bbec120..b925aea510a 100644 --- a/source/blender/editors/armature/reeb.h +++ b/source/blender/editors/armature/reeb.h @@ -25,8 +25,8 @@ */ -#ifndef REEB_H_ -#define REEB_H_ +#ifndef __REEB_H__ +#define __REEB_H__ #define WITH_BF_REEB @@ -203,4 +203,4 @@ void REEB_exportGraph(ReebGraph *rg, int count); void REEB_draw(void); -#endif /*REEB_H_*/ +#endif /*__REEB_H__*/ diff --git a/source/blender/editors/curve/curve_intern.h b/source/blender/editors/curve/curve_intern.h index 2014345e163..0cc47774207 100644 --- a/source/blender/editors/curve/curve_intern.h +++ b/source/blender/editors/curve/curve_intern.h @@ -29,8 +29,8 @@ */ -#ifndef ED_CURVE_INTERN_H -#define ED_CURVE_INTERN_H +#ifndef __CURVE_INTERN_H__ +#define __CURVE_INTERN_H__ /* internal exports only */ struct wmOperatorType; diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h index 8000af54f53..b88723d8a3c 100644 --- a/source/blender/editors/gpencil/gpencil_intern.h +++ b/source/blender/editors/gpencil/gpencil_intern.h @@ -28,8 +28,8 @@ * \ingroup edgpencil */ -#ifndef ED_GPENCIL_INTERN_H -#define ED_GPENCIL_INTERN_H +#ifndef __GPENCIL_INTERN_H__ +#define __GPENCIL_INTERN_H__ /* internal exports only */ @@ -117,5 +117,5 @@ typedef enum ACTCONT_TYPES { -#endif /* ED_GPENCIL_INTERN_H */ +#endif /* __GPENCIL_INTERN_H__ */ diff --git a/source/blender/editors/include/BIF_gl.h b/source/blender/editors/include/BIF_gl.h index 940a5866fcd..d34e6f74b4c 100644 --- a/source/blender/editors/include/BIF_gl.h +++ b/source/blender/editors/include/BIF_gl.h @@ -30,8 +30,8 @@ * \ingroup editorui */ -#ifndef BIF_GL_H -#define BIF_GL_H +#ifndef __BIF_GL_H__ +#define __BIF_GL_H__ #include "GL/glew.h" @@ -50,5 +50,5 @@ #define glMultMatrixf(x) glMultMatrixf( (float *)(x)) #define glLoadMatrixf(x) glLoadMatrixf( (float *)(x)) -#endif /* #ifdef BIF_GL_H */ +#endif /* #ifdef __BIF_GL_H__ */ diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h index 33e9192a23e..b1114eba141 100644 --- a/source/blender/editors/include/BIF_glutil.h +++ b/source/blender/editors/include/BIF_glutil.h @@ -27,8 +27,8 @@ * \ingroup editorui */ -#ifndef BIF_GLUTIL_H -#define BIF_GLUTIL_H +#ifndef __BIF_GLUTIL_H__ +#define __BIF_GLUTIL_H__ struct rcti; struct rctf; @@ -216,5 +216,5 @@ typedef struct bglMats { } bglMats; void bgl_get_mats(bglMats *mats); -#endif /* BIF_GLUTIL_H */ +#endif /* __BIF_GLUTIL_H__ */ diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 6b449f68e1d..c75ec259504 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_ANIM_API_H -#define ED_ANIM_API_H +#ifndef __ED_ANIM_API_H__ +#define __ED_ANIM_API_H__ struct ID; struct ListBase; @@ -605,5 +605,5 @@ void ED_operatormacros_action(void); /* ************************************************ */ -#endif /* ED_ANIM_API_H */ +#endif /* __ED_ANIM_API_H__ */ diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h index d345f16b768..544250fcd2e 100644 --- a/source/blender/editors/include/ED_armature.h +++ b/source/blender/editors/include/ED_armature.h @@ -27,8 +27,8 @@ * \ingroup editors */ -#ifndef ED_ARMATURE_H -#define ED_ARMATURE_H +#ifndef __ED_ARMATURE_H__ +#define __ED_ARMATURE_H__ #ifdef __cplusplus extern "C" { @@ -182,7 +182,7 @@ void mesh_deform_bind(struct Scene *scene, } #endif -#endif /* ED_ARMATURE_H */ +#endif /* __ED_ARMATURE_H__ */ diff --git a/source/blender/editors/include/ED_clip.h b/source/blender/editors/include/ED_clip.h index 7d36159f47e..5e8ef618a42 100644 --- a/source/blender/editors/include/ED_clip.h +++ b/source/blender/editors/include/ED_clip.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_MOVIECLIP_H -#define ED_MOVIECLIP_H +#ifndef __ED_CLIP_H__ +#define __ED_CLIP_H__ struct ARegion; struct bContext; diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h index 7e7d60fdea8..700ff39fdba 100644 --- a/source/blender/editors/include/ED_curve.h +++ b/source/blender/editors/include/ED_curve.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_CURVE_H -#define ED_CURVE_H +#ifndef __ED_CURVE_H__ +#define __ED_CURVE_H__ struct Base; struct bContext; @@ -95,5 +95,5 @@ int ED_curve_actSelection(struct Curve *cu, float center[3]); /* debug only */ void printknots(struct Object *obedit); -#endif /* ED_CURVE_H */ +#endif /* __ED_CURVE_H__ */ diff --git a/source/blender/editors/include/ED_datafiles.h b/source/blender/editors/include/ED_datafiles.h index 2c4472c4636..9fe2fe685a0 100644 --- a/source/blender/editors/include/ED_datafiles.h +++ b/source/blender/editors/include/ED_datafiles.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_DATAFILES_H -#define ED_DATAFILES_H +#ifndef __ED_DATAFILES_H__ +#define __ED_DATAFILES_H__ /* Datafiles embedded in Blender */ @@ -142,5 +142,5 @@ extern int datatoc_vertexdraw_png_size; extern char datatoc_vertexdraw_png[]; -#endif /* ED_DATAFILES_H */ +#endif /* __ED_DATAFILES_H__ */ diff --git a/source/blender/editors/include/ED_fileselect.h b/source/blender/editors/include/ED_fileselect.h index dc362f9f99b..7cf750f5a9b 100644 --- a/source/blender/editors/include/ED_fileselect.h +++ b/source/blender/editors/include/ED_fileselect.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_FILES_H -#define ED_FILES_H +#ifndef __ED_FILESELECT_H__ +#define __ED_FILESELECT_H__ struct SpaceFile; struct ARegion; @@ -106,5 +106,5 @@ void ED_fileselect_exit(struct bContext *C, struct SpaceFile *sfile); int ED_file_extension_icon(const char *relname); -#endif /* ED_FILES_H */ +#endif /* __ED_FILESELECT_H__ */ diff --git a/source/blender/editors/include/ED_fluidsim.h b/source/blender/editors/include/ED_fluidsim.h index d47ba2bfba9..54acf73aacd 100644 --- a/source/blender/editors/include/ED_fluidsim.h +++ b/source/blender/editors/include/ED_fluidsim.h @@ -32,8 +32,8 @@ * \ingroup editors */ -#ifndef ED_FLUIDSIM_H -#define ED_FLUIDSIM_H +#ifndef __ED_FLUIDSIM_H__ +#define __ED_FLUIDSIM_H__ struct Object; struct FluidsimSettings; @@ -48,4 +48,4 @@ void fluidsimSettingsFree(struct FluidsimSettings* sb); /* duplicate internal data */ struct FluidsimSettings* fluidsimSettingsCopy(struct FluidsimSettings* sb); -#endif /* ED_FLUIDSIM_H */ +#endif /* __ED_FLUIDSIM_H__ */ diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index a640b5c911c..ce434493137 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -27,8 +27,8 @@ * \ingroup editors */ -#ifndef ED_GPENCIL_H -#define ED_GPENCIL_H +#ifndef __ED_GPENCIL_H__ +#define __ED_GPENCIL_H__ struct ListBase; struct bContext; @@ -109,4 +109,4 @@ void mirror_gplayer_frames(struct bGPDlayer *gpl, short mode); int ED_gpencil_session_active(void); int ED_undo_gpencil_step(struct bContext *C, int step, const char *name); -#endif /* ED_GPENCIL_H */ +#endif /* __ED_GPENCIL_H__ */ diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h index 05cde05f25c..b95615ce365 100644 --- a/source/blender/editors/include/ED_image.h +++ b/source/blender/editors/include/ED_image.h @@ -27,8 +27,8 @@ * \ingroup editors */ -#ifndef ED_IMAGE_H -#define ED_IMAGE_H +#ifndef __ED_IMAGE_H__ +#define __ED_IMAGE_H__ struct SpaceImage; struct Main; @@ -70,5 +70,5 @@ void ED_image_update_frame(const struct Main *mainp, int cfra); void ED_image_draw_info(struct ARegion *ar, int color_manage, int channels, int x, int y, const unsigned char cp[4], const float fp[4], int *zp, float *zpf); -#endif /* ED_IMAGE_H */ +#endif /* __ED_IMAGE_H__ */ diff --git a/source/blender/editors/include/ED_info.h b/source/blender/editors/include/ED_info.h index 7044ab63cad..6970abaa633 100644 --- a/source/blender/editors/include/ED_info.h +++ b/source/blender/editors/include/ED_info.h @@ -24,11 +24,11 @@ * \ingroup editors */ -#ifndef ED_INFO_H -#define ED_INFO_H +#ifndef __ED_INFO_H__ +#define __ED_INFO_H__ /* info_stats.c */ void ED_info_stats_clear(struct Scene *scene); const char *ED_info_stats_string(struct Scene *scene); -#endif /* ED_INFO_H */ +#endif /* __ED_INFO_H__ */ diff --git a/source/blender/editors/include/ED_keyframes_draw.h b/source/blender/editors/include/ED_keyframes_draw.h index 91723a1a33f..7f68325e5ee 100644 --- a/source/blender/editors/include/ED_keyframes_draw.h +++ b/source/blender/editors/include/ED_keyframes_draw.h @@ -29,8 +29,8 @@ * \ingroup editors */ -#ifndef ED_KEYFRAMES_DRAW_H -#define ED_KEYFRAMES_DRAW_H +#ifndef __ED_KEYFRAMES_DRAW_H__ +#define __ED_KEYFRAMES_DRAW_H__ struct bAnimContext; struct AnimData; @@ -150,5 +150,5 @@ short compare_ab_cfraPtr(void *node, void *data); /* Checks if ActKeyBlock can be used (i.e. drawn/used to detect "holds") */ short actkeyblock_is_valid(ActKeyBlock *ab, struct DLRBT_Tree *keys); -#endif /* ED_KEYFRAMES_DRAW_H */ +#endif /* __ED_KEYFRAMES_DRAW_H__ */ diff --git a/source/blender/editors/include/ED_keyframes_edit.h b/source/blender/editors/include/ED_keyframes_edit.h index 5881e8c4bfe..7ba37b49f85 100644 --- a/source/blender/editors/include/ED_keyframes_edit.h +++ b/source/blender/editors/include/ED_keyframes_edit.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_KEYFRAMES_EDIT_H -#define ED_KEYFRAMES_EDIT_H +#ifndef __ED_KEYFRAMES_EDIT_H__ +#define __ED_KEYFRAMES_EDIT_H__ struct bAnimContext; struct bAnimListElem; @@ -254,4 +254,4 @@ short paste_animedit_keys(struct bAnimContext *ac, ListBase *anim_data, /* ************************************************ */ -#endif /* ED_KEYFRAMES_EDIT_H */ +#endif /* __ED_KEYFRAMES_EDIT_H__ */ diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index eda84d0e7a4..63c0511e6b3 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -27,8 +27,8 @@ * \ingroup editors */ -#ifndef ED_KEYFRAMING_H -#define ED_KEYFRAMING_H +#ifndef __ED_KEYFRAMING_H__ +#define __ED_KEYFRAMING_H__ #ifdef __cplusplus extern "C" { @@ -330,4 +330,4 @@ int ED_autokeyframe_pchan(struct bContext *C, struct Scene *scene, struct Object } #endif -#endif /* ED_KEYFRAMING_H */ +#endif /* __ED_KEYFRAMING_H__ */ diff --git a/source/blender/editors/include/ED_logic.h b/source/blender/editors/include/ED_logic.h index ce1f2b8faac..71a5552ae26 100644 --- a/source/blender/editors/include/ED_logic.h +++ b/source/blender/editors/include/ED_logic.h @@ -27,10 +27,10 @@ * \ingroup editors */ -#ifndef ED_LOGIC_H -#define ED_LOGIC_H +#ifndef __ED_LOGIC_H__ +#define __ED_LOGIC_H__ /* logic_ops.c */ void ED_operatortypes_logic(void); -#endif /* ED_LOGIC_H */ +#endif /* __ED_LOGIC_H__ */ diff --git a/source/blender/editors/include/ED_markers.h b/source/blender/editors/include/ED_markers.h index 30a0d47eda2..c0b5ba6ecf8 100644 --- a/source/blender/editors/include/ED_markers.h +++ b/source/blender/editors/include/ED_markers.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_MARKERS_H -#define ED_MARKERS_H +#ifndef __ED_MARKERS_H__ +#define __ED_MARKERS_H__ struct wmKeyConfig; struct wmKeyMap; @@ -77,5 +77,5 @@ void ED_marker_keymap_animedit_conflictfree(struct wmKeyMap *keymap); /* debugging only */ void debug_markers_print_list(struct ListBase *markers); -#endif /* ED_MARKERS_H */ +#endif /* __ED_MARKERS_H__ */ diff --git a/source/blender/editors/include/ED_mball.h b/source/blender/editors/include/ED_mball.h index 259004864fb..89917f09284 100644 --- a/source/blender/editors/include/ED_mball.h +++ b/source/blender/editors/include/ED_mball.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef _ED_MBALL_H_ -#define _ED_MBALL_H_ +#ifndef __ED_MBALL_H__ +#define __ED_MBALL_H__ struct bContext; struct Object; diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 50fbf6fbb15..5e64925baca 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_MESH_H -#define ED_MESH_H +#ifndef __ED_MESH_H__ +#define __ED_MESH_H__ #ifdef __cplusplus extern "C" { @@ -342,4 +342,4 @@ void ED_mesh_mirrtopo_free(MirrTopoStore_t *mesh_topo_store); } #endif -#endif /* ED_MESH_H */ +#endif /* __ED_MESH_H__ */ diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h index 18bb4975da9..192236b7cb8 100644 --- a/source/blender/editors/include/ED_node.h +++ b/source/blender/editors/include/ED_node.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_NODE_H -#define ED_NODE_H +#ifndef __ED_NODE_H__ +#define __ED_NODE_H__ struct ID; struct Main; @@ -63,5 +63,5 @@ void ED_node_set_active(struct Main *bmain, struct bNodeTree *ntree, struct bNod /* node ops.c */ void ED_operatormacros_node(void); -#endif /* ED_NODE_H */ +#endif /* __ED_NODE_H__ */ diff --git a/source/blender/editors/include/ED_numinput.h b/source/blender/editors/include/ED_numinput.h index e2387c3e9dd..f103b07d09c 100644 --- a/source/blender/editors/include/ED_numinput.h +++ b/source/blender/editors/include/ED_numinput.h @@ -24,8 +24,8 @@ * \ingroup editors */ -#ifndef ED_NUMINPUT_H -#define ED_NUMINPUT_H +#ifndef __ED_NUMINPUT_H__ +#define __ED_NUMINPUT_H__ typedef struct NumInput { diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index c996fefe575..3e78a5649e5 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_OBJECT_H -#define ED_OBJECT_H +#ifndef __ED_OBJECT_H__ +#define __ED_OBJECT_H__ #ifdef __cplusplus extern "C" { @@ -178,5 +178,5 @@ int ED_object_modifier_copy(struct ReportList *reports, struct Object *ob, struc } #endif -#endif /* ED_OBJECT_H */ +#endif /* __ED_OBJECT_H__ */ diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h index 3035aa44735..1c7f5cf0641 100644 --- a/source/blender/editors/include/ED_particle.h +++ b/source/blender/editors/include/ED_particle.h @@ -30,8 +30,8 @@ * \ingroup editors */ -#ifndef ED_PARTICLE_H -#define ED_PARTICLE_H +#ifndef __ED_PARTICLE_H__ +#define __ED_PARTICLE_H__ struct bContext; struct Object; @@ -74,5 +74,5 @@ int PE_undo_valid(struct Scene *scene); void PE_undo_number(struct Scene *scene, int nr); const char *PE_undo_get_name(struct Scene *scene, int nr, int *active); -#endif /* ED_PARTICLE_H */ +#endif /* __ED_PARTICLE_H__ */ diff --git a/source/blender/editors/include/ED_physics.h b/source/blender/editors/include/ED_physics.h index eadd1566671..6c885b9336f 100644 --- a/source/blender/editors/include/ED_physics.h +++ b/source/blender/editors/include/ED_physics.h @@ -30,8 +30,8 @@ * \ingroup editors */ -#ifndef ED_PHYSICS_H -#define ED_PHYSICS_H +#ifndef __ED_PHYSICS_H__ +#define __ED_PHYSICS_H__ struct wmKeyConfig; @@ -44,5 +44,5 @@ int PE_poll_view3d(struct bContext *C); void ED_operatortypes_physics(void); void ED_keymap_physics(struct wmKeyConfig *keyconf); -#endif /* ED_PHYSICS_H */ +#endif /* __ED_PHYSICS_H__ */ diff --git a/source/blender/editors/include/ED_render.h b/source/blender/editors/include/ED_render.h index 73776f7234b..c9e00b0296a 100644 --- a/source/blender/editors/include/ED_render.h +++ b/source/blender/editors/include/ED_render.h @@ -25,8 +25,8 @@ * \ingroup editors */ -#ifndef ED_RENDER_H -#define ED_RENDER_H +#ifndef __ED_RENDER_H__ +#define __ED_RENDER_H__ #include "DNA_vec_types.h" diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index e0ff5cddf85..252eb790b2a 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_SCREEN_H -#define ED_SCREEN_H +#ifndef __ED_SCREEN_H__ +#define __ED_SCREEN_H__ #include "DNA_screen_types.h" #include "DNA_space_types.h" @@ -181,5 +181,5 @@ int ED_operator_posemode(struct bContext *C); #define ED_KEYMAP_GPENCIL 32 #define ED_KEYMAP_HEADER 64 -#endif /* ED_SCREEN_H */ +#endif /* __ED_SCREEN_H__ */ diff --git a/source/blender/editors/include/ED_screen_types.h b/source/blender/editors/include/ED_screen_types.h index 544d366c926..51699d095ae 100644 --- a/source/blender/editors/include/ED_screen_types.h +++ b/source/blender/editors/include/ED_screen_types.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_SCREEN_TYPES_H__ -#define ED_SCREEN_TYPES_H__ +#ifndef __ED_SCREEN_TYPES_H__ +#define __ED_SCREEN_TYPES_H__ /* ----------------------------------------------------- */ @@ -100,4 +100,4 @@ typedef struct AZone { #define AZONE_AREA 1 #define AZONE_REGION 2 -#endif /* ED_SCREEN_TYPES_H__ */ +#endif /* __ED_SCREEN_TYPES_H__ */ diff --git a/source/blender/editors/include/ED_sculpt.h b/source/blender/editors/include/ED_sculpt.h index bd746e36ef4..9cb32c31f5b 100644 --- a/source/blender/editors/include/ED_sculpt.h +++ b/source/blender/editors/include/ED_sculpt.h @@ -27,8 +27,8 @@ * \ingroup editors */ -#ifndef ED_SCULPT_H -#define ED_SCULPT_H +#ifndef __ED_SCULPT_H__ +#define __ED_SCULPT_H__ struct ARegion; struct bContext; diff --git a/source/blender/editors/include/ED_sequencer.h b/source/blender/editors/include/ED_sequencer.h index da2fce2596b..abeb00c301f 100644 --- a/source/blender/editors/include/ED_sequencer.h +++ b/source/blender/editors/include/ED_sequencer.h @@ -24,9 +24,9 @@ * \ingroup editors */ -#ifndef ED_SEQUENCER_H -#define ED_SEQUENCER_H +#ifndef __ED_SEQUENCER_H__ +#define __ED_SEQUENCER_H__ #define SEQ_ZOOM_FAC(szoom) ((szoom) > 0.0f)? (szoom) : ((szoom) == 0.0f)? (1.0f) : (-1.0f/(szoom)) -#endif /* ED_SEQUENCER_H */ +#endif /* __ED_SEQUENCER_H__ */ diff --git a/source/blender/editors/include/ED_sound.h b/source/blender/editors/include/ED_sound.h index a4e90094e19..d3e7502bb99 100644 --- a/source/blender/editors/include/ED_sound.h +++ b/source/blender/editors/include/ED_sound.h @@ -28,10 +28,10 @@ * \ingroup editors */ -#ifndef ED_SOUND_H -#define ED_SOUND_H +#ifndef __ED_SOUND_H__ +#define __ED_SOUND_H__ void ED_operatortypes_sound(void); -#endif /* ED_SOUND_H */ +#endif /* __ED_SOUND_H__ */ diff --git a/source/blender/editors/include/ED_space_api.h b/source/blender/editors/include/ED_space_api.h index b5a1ca193db..0d6e640c7bf 100644 --- a/source/blender/editors/include/ED_space_api.h +++ b/source/blender/editors/include/ED_space_api.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_SPACE_API_H -#define ED_SPACE_API_H +#ifndef __ED_SPACE_API_H__ +#define __ED_SPACE_API_H__ struct ARegionType; struct bContext; @@ -73,5 +73,5 @@ void ED_region_draw_cb_draw(const struct bContext *, struct ARegion *, int); void ED_region_draw_cb_exit(struct ARegionType *, void *); void *ED_region_draw_cb_customdata(void *handle); -#endif /* ED_SPACE_API_H */ +#endif /* __ED_SPACE_API_H__ */ diff --git a/source/blender/editors/include/ED_text.h b/source/blender/editors/include/ED_text.h index da01e25f4d9..9a36cb3d6ab 100644 --- a/source/blender/editors/include/ED_text.h +++ b/source/blender/editors/include/ED_text.h @@ -27,12 +27,12 @@ * \ingroup editors */ -#ifndef ED_TEXT_H -#define ED_TEXT_H +#ifndef __ED_TEXT_H__ +#define __ED_TEXT_H__ struct bContext; void ED_text_undo_step(struct bContext *C, int step); -#endif /* ED_TEXT_H */ +#endif /* __ED_TEXT_H__ */ diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index 2ca3e2bfe7f..36bda11b1d4 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -29,8 +29,8 @@ * \ingroup editors */ -#ifndef ED_TRANSFORM_H -#define ED_TRANSFORM_H +#ifndef __ED_TRANSFORM_H__ +#define __ED_TRANSFORM_H__ /* ******************* Registration Function ********************** */ diff --git a/source/blender/editors/include/ED_types.h b/source/blender/editors/include/ED_types.h index 6ea45c995c9..c4104472a82 100644 --- a/source/blender/editors/include/ED_types.h +++ b/source/blender/editors/include/ED_types.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_TYPES_H -#define ED_TYPES_H +#ifndef __ED_TYPES_H__ +#define __ED_TYPES_H__ /* **************** GENERAL EDITOR-WIDE TYPES AND DEFINES ************************** */ @@ -44,5 +44,5 @@ -#endif /* ED_TYPES_H */ +#endif /* __ED_TYPES_H__ */ diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index db7b736e3eb..9bde252e776 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_UTIL_H -#define ED_UTIL_H +#ifndef __ED_UTIL_H__ +#define __ED_UTIL_H__ struct Scene; struct Object; @@ -93,5 +93,5 @@ int GetButStringLength(const char *str); /* where else to go ? */ void unpack_menu(struct bContext *C, const char *opname, const char *id_name, const char *abs_name, const char *folder, struct PackedFile *pf); -#endif /* ED_UTIL_H */ +#endif /* __ED_UTIL_H__ */ diff --git a/source/blender/editors/include/ED_uvedit.h b/source/blender/editors/include/ED_uvedit.h index c19872213ca..6c74eea3a5e 100644 --- a/source/blender/editors/include/ED_uvedit.h +++ b/source/blender/editors/include/ED_uvedit.h @@ -27,8 +27,8 @@ * \ingroup editors */ -#ifndef ED_UVEDIT_H -#define ED_UVEDIT_H +#ifndef __ED_UVEDIT_H__ +#define __ED_UVEDIT_H__ struct ARegionType; struct EditFace; @@ -89,5 +89,5 @@ void draw_uvedit_main(struct SpaceImage *sima, struct ARegion *ar, struct Scene /* uvedit_buttons.c */ void ED_uvedit_buttons_register(struct ARegionType *art); -#endif /* ED_UVEDIT_H */ +#endif /* __ED_UVEDIT_H__ */ diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 78de1809f69..2d4e267ba80 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -28,8 +28,8 @@ * \ingroup editors */ -#ifndef ED_VIEW3D_H -#define ED_VIEW3D_H +#ifndef __ED_VIEW3D_H__ +#define __ED_VIEW3D_H__ /* ********* exports for space_view3d/ module ********** */ struct ARegion; @@ -312,4 +312,4 @@ void ED_view3d_operator_properties_viewmat(struct wmOperatorType *ot); void ED_view3d_operator_properties_viewmat_set(struct bContext *C, struct wmOperator *op); void ED_view3d_operator_properties_viewmat_get(struct wmOperator *op, int *winx, int *winy, float persmat[4][4]); -#endif /* ED_VIEW3D_H */ +#endif /* __ED_VIEW3D_H__ */ diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index f102ecb0d08..f35af356c94 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -29,8 +29,8 @@ */ /* Note: this is included twice with different #defines for DEF_ICON - once from UI_resources.h for the internal icon enum and - once for interface_api.c for the definition of the RNA enum for the icons */ + * once from UI_resources.h for the internal icon enum and + * once for interface_api.c for the definition of the RNA enum for the icons */ /* ICON_ prefix added */ DEF_ICON(NONE) diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 3f907004931..5eafdc27e68 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -29,8 +29,8 @@ * \ingroup editorui */ -#ifndef UI_INTERFACE_H -#define UI_INTERFACE_H +#ifndef __UI_INTERFACE_H__ +#define __UI_INTERFACE_H__ #include "BLO_sys_types.h" /* size_t */ #include "RNA_types.h" @@ -838,5 +838,5 @@ void UI_template_fix_linking(void); int UI_editsource_enable_check(void); void UI_editsource_active_but_test(uiBut *but); -#endif /* UI_INTERFACE_H */ +#endif /* __UI_INTERFACE_H__ */ diff --git a/source/blender/editors/include/UI_interface_icons.h b/source/blender/editors/include/UI_interface_icons.h index e5ad51169a8..a1b42ac39c2 100644 --- a/source/blender/editors/include/UI_interface_icons.h +++ b/source/blender/editors/include/UI_interface_icons.h @@ -29,8 +29,8 @@ * \ingroup editorui */ -#ifndef UI_INTERFACE_ICONS_H -#define UI_INTERFACE_ICONS_H +#ifndef __UI_INTERFACE_ICONS_H__ +#define __UI_INTERFACE_ICONS_H__ struct Image; struct ImBuf; @@ -75,4 +75,4 @@ struct ListBase *UI_iconfile_list(void); int UI_iconfile_get_index(const char *filename); -#endif /* UI_INTERFACE_ICONS_H */ +#endif /* __UI_INTERFACE_ICONS_H__ */ diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index d755b17bc98..f676dcbdff2 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -30,8 +30,8 @@ * \ingroup editorui */ -#ifndef UI_RESOURCES_H -#define UI_RESOURCES_H +#ifndef __UI_RESOURCES_H__ +#define __UI_RESOURCES_H__ /* elubie: TODO: move the typedef for icons to UI_interface_icons.h */ /* and add/replace include of UI_resources.h by UI_interface_icons.h */ diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h index 7ff27a5bbde..436f268d1bf 100644 --- a/source/blender/editors/include/UI_view2d.h +++ b/source/blender/editors/include/UI_view2d.h @@ -31,8 +31,8 @@ * \ingroup editorui */ -#ifndef UI_VIEW2D_H -#define UI_VIEW2D_H +#ifndef __UI_VIEW2D_H__ +#define __UI_VIEW2D_H__ /* ------------------------------------------ */ /* Settings and Defines: */ @@ -201,5 +201,5 @@ void UI_view2d_text_cache_draw(struct ARegion *ar); void UI_view2d_operatortypes(void); void UI_view2d_keymap(struct wmKeyConfig *keyconf); -#endif /* UI_VIEW2D_H */ +#endif /* __UI_VIEW2D_H__ */ diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 3feda5d4db4..7c2d411e076 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -1013,21 +1013,26 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al } } +static void ui_id_preview_image_render_size(bContext *C, ID *id, PreviewImage *pi, int size) +{ + if ((pi->changed[size] ||!pi->rect[size])) /* changed only ever set by dynamic icons */ + { + /* create the rect if necessary */ + icon_set_image(C, id, pi, size); + + pi->changed[size] = 0; + } +} + static void ui_id_icon_render(bContext *C, ID *id, int big) { - PreviewImage *pi = BKE_previewimg_get(id); - - if (pi) { - if ((pi->changed[0] ||!pi->rect[0])) /* changed only ever set by dynamic icons */ - { - /* create the rect if necessary */ - - icon_set_image(C, id, pi, ICON_SIZE_ICON); /* icon size */ - if (big) - icon_set_image(C, id, pi, ICON_SIZE_PREVIEW); /* bigger preview size */ - - pi->changed[0] = 0; - } + PreviewImage *pi = BKE_previewimg_get(id); + + if (pi) { + if (big) + ui_id_preview_image_render_size(C, id, pi, ICON_SIZE_PREVIEW); /* bigger preview size */ + else + ui_id_preview_image_render_size(C, id, pi, ICON_SIZE_ICON); /* icon size */ } } diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index 2d8de475c4b..d324018e4ba 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -30,8 +30,8 @@ */ -#ifndef INTERFACE_H -#define INTERFACE_H +#ifndef __INTERFACE_INTERN_H__ +#define __INTERFACE_INTERN_H__ #include "UI_resources.h" #include "RNA_types.h" diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 429cd658dea..b3b187f92a2 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -1281,7 +1281,7 @@ static void rna_search_cb(const struct bContext *C, void *arg_but, const char *s BLI_strncpy(name_ui, id->name+2, sizeof(name_ui)); #endif name= BLI_strdup(name_ui); - iconid= ui_id_icon_get((bContext*)C, id, 1); + iconid= ui_id_icon_get((bContext*)C, id, 0); } else { name= RNA_struct_name_get_alloc(&itemptr, NULL, 0, NULL); /* could use the string length here */ diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 55e89ea4428..0b10ab1c92f 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -96,6 +96,7 @@ typedef struct TemplateID { ListBase *idlb; int prv_rows, prv_cols; + int preview; } TemplateID; /* Search browse menu, assign */ @@ -143,7 +144,7 @@ static void id_search_cb(const bContext *C, void *arg_template, const char *str, char name_ui[MAX_ID_NAME]; name_uiprefix_id(name_ui, id); - iconid= ui_id_icon_get((bContext*)C, id, 1); + iconid= ui_id_icon_get((bContext*)C, id, template->preview); if(!uiSearchItemAdd(items, name_ui, id, iconid)) break; @@ -370,6 +371,7 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str uiButSetFlag(but, UI_BUT_DISABLED); uiLayoutRow(layout, 1); + template->preview= 1; } else if(flag & UI_ID_BROWSE) { but= uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*1.6, UI_UNIT_Y, diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h index 7334acfdfb0..ec92b78c2c4 100644 --- a/source/blender/editors/mesh/mesh_intern.h +++ b/source/blender/editors/mesh/mesh_intern.h @@ -32,8 +32,8 @@ /* Internal for editmesh_xxxx.c functions */ -#ifndef MESH_INTERN_H -#define MESH_INTERN_H +#ifndef __MESH_INTERN_H__ +#define __MESH_INTERN_H__ struct bContext; struct wmOperatorType; @@ -313,5 +313,5 @@ void MESH_OT_navmesh_face_add(struct wmOperatorType *ot); void MESH_OT_navmesh_reset(struct wmOperatorType *ot); void MESH_OT_navmesh_clear(struct wmOperatorType *ot); -#endif // MESH_INTERN_H +#endif // __MESH_INTERN_H__ diff --git a/source/blender/editors/metaball/mball_intern.h b/source/blender/editors/metaball/mball_intern.h index 1cb4c19fc72..0329f8e5bfa 100644 --- a/source/blender/editors/metaball/mball_intern.h +++ b/source/blender/editors/metaball/mball_intern.h @@ -29,8 +29,8 @@ */ -#ifndef ED_MBALL_INTERN_H -#define ED_MBALL_INTERN_H +#ifndef __MBALL_INTERN_H__ +#define __MBALL_INTERN_H__ #include "DNA_object_types.h" diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h index f8b6d89d397..526706b566d 100644 --- a/source/blender/editors/object/object_intern.h +++ b/source/blender/editors/object/object_intern.h @@ -28,8 +28,8 @@ * \ingroup edobj */ -#ifndef ED_OBJECT_INTERN_H -#define ED_OBJECT_INTERN_H +#ifndef __OBJECT_INTERN_H__ +#define __OBJECT_INTERN_H__ struct wmOperatorType; struct KeyBlock; @@ -226,5 +226,5 @@ void OBJECT_OT_group_remove(struct wmOperatorType *ot); /* object_bake.c */ void OBJECT_OT_bake_image(wmOperatorType *ot); -#endif /* ED_OBJECT_INTERN_H */ +#endif /* __OBJECT_INTERN_H__ */ diff --git a/source/blender/editors/physics/physics_intern.h b/source/blender/editors/physics/physics_intern.h index db6d63f6396..75779cf6102 100644 --- a/source/blender/editors/physics/physics_intern.h +++ b/source/blender/editors/physics/physics_intern.h @@ -30,8 +30,8 @@ */ -#ifndef ED_PHYSICS_INTERN_H -#define ED_PHYSICS_INTERN_H +#ifndef __PHYSICS_INTERN_H__ +#define __PHYSICS_INTERN_H__ struct wmOperatorType; @@ -105,5 +105,5 @@ void PTCACHE_OT_bake_from_cache(struct wmOperatorType *ot); void PTCACHE_OT_add(struct wmOperatorType *ot); void PTCACHE_OT_remove(struct wmOperatorType *ot); -#endif /* ED_PHYSICS_INTERN_H */ +#endif /* __PHYSICS_INTERN_H__ */ diff --git a/source/blender/editors/render/render_intern.h b/source/blender/editors/render/render_intern.h index 08001688e3f..18ba2b5abf9 100644 --- a/source/blender/editors/render/render_intern.h +++ b/source/blender/editors/render/render_intern.h @@ -29,8 +29,8 @@ */ -#ifndef RENDER_INTERN_H -#define RENDER_INTERN_H +#ifndef __RENDER_INTERN_H__ +#define __RENDER_INTERN_H__ struct wmOperatorType; struct RenderResult; @@ -77,5 +77,5 @@ void RENDER_OT_view_cancel(struct wmOperatorType *ot); /* render_opengl.c */ void RENDER_OT_opengl(struct wmOperatorType *ot); -#endif /* RENDER_INTERN_H */ +#endif /* __RENDER_INTERN_H__ */ diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 3e34a55a3d9..3eda30e1554 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -164,6 +164,19 @@ typedef struct ShaderPreview { } ShaderPreview; +typedef struct IconPreviewSize { + struct IconPreviewSize *next, *prev; + int sizex, sizey; + unsigned int *rect; +} IconPreviewSize; + +typedef struct IconPreview { + Scene *scene; + void *owner; + ID *id; + ListBase sizes; +} IconPreview; + /* *************************** Preview for buttons *********************** */ static Main *pr_main= NULL; @@ -944,38 +957,96 @@ static void common_preview_startjob(void *customdata, short *stop, short *do_upd shader_preview_startjob(customdata, stop, do_update); } -static void common_preview_endjob(void *customdata) -{ - ShaderPreview *sp= customdata; +/* exported functions */ - if(sp->id && GS(sp->id->name) == ID_BR) - WM_main_add_notifier(NC_BRUSH|NA_EDITED, sp->id); +static void icon_preview_add_size(IconPreview *ip, unsigned int *rect, int sizex, int sizey) +{ + IconPreviewSize *cur_size = ip->sizes.first, *new_size; + + while (cur_size) { + if (cur_size->sizex == sizex && cur_size->sizey == sizey) { + /* requested size is already in list, no need to add it again */ + return; + } + + cur_size = cur_size->next; + } + + new_size = MEM_callocN(sizeof(IconPreviewSize), "IconPreviewSize"); + new_size->sizex = sizex; + new_size->sizey = sizey; + new_size->rect = rect; + + BLI_addtail(&ip->sizes, new_size); } -/* exported functions */ +static void icon_preview_startjob_all_sizes(void *customdata, short *stop, short *do_update, float *progress) +{ + IconPreview *ip = (IconPreview *)customdata; + IconPreviewSize *cur_size = ip->sizes.first; + + while (cur_size) { + ShaderPreview sp; + + memset(&sp, 0, sizeof(ShaderPreview)); + + /* construct shader preview from image size and previewcustomdata */ + sp.scene= ip->scene; + sp.owner= ip->owner; + sp.sizex= cur_size->sizex; + sp.sizey= cur_size->sizey; + sp.pr_method= PR_ICON_RENDER; + sp.pr_rect= cur_size->rect; + sp.id = ip->id; + + common_preview_startjob(&sp, stop, do_update, progress); + + cur_size = cur_size->next; + } +} + +static void icon_preview_endjob(void *customdata) +{ + IconPreview *ip = customdata; + + if (ip->id && GS(ip->id->name) == ID_BR) + WM_main_add_notifier(NC_BRUSH|NA_EDITED, ip->id); +} + +static void icon_preview_free(void *customdata) +{ + IconPreview *ip = (IconPreview *)customdata; + + BLI_freelistN(&ip->sizes); + MEM_freeN(ip); +} void ED_preview_icon_job(const bContext *C, void *owner, ID *id, unsigned int *rect, int sizex, int sizey) { wmJob *steve; - ShaderPreview *sp; + IconPreview *ip, *old_ip; /* suspended start means it starts after 1 timer step, see WM_jobs_timer below */ steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), owner, "Icon Preview", WM_JOB_EXCL_RENDER|WM_JOB_SUSPEND); - sp= MEM_callocN(sizeof(ShaderPreview), "shader preview"); + + ip= MEM_callocN(sizeof(IconPreview), "icon preview"); + + /* render all resolutions from suspended job too */ + old_ip= WM_jobs_get_customdata(steve); + if (old_ip) + BLI_movelisttolist(&ip->sizes, &old_ip->sizes); /* customdata for preview thread */ - sp->scene= CTX_data_scene(C); - sp->owner= id; - sp->sizex= sizex; - sp->sizey= sizey; - sp->pr_method= PR_ICON_RENDER; - sp->pr_rect= rect; - sp->id = id; + ip->scene= CTX_data_scene(C); + ip->owner= id; + ip->id= id; + + icon_preview_add_size(ip, rect, sizex, sizey); /* setup job */ - WM_jobs_customdata(steve, sp, shader_preview_free); + WM_jobs_customdata(steve, ip, icon_preview_free); WM_jobs_timer(steve, 0.25, NC_MATERIAL, NC_MATERIAL); - WM_jobs_callbacks(steve, common_preview_startjob, NULL, NULL, common_preview_endjob); + WM_jobs_callbacks(steve, icon_preview_startjob_all_sizes, NULL, NULL, icon_preview_endjob); WM_jobs_start(CTX_wm_manager(C), steve); } diff --git a/source/blender/editors/screen/screen_intern.h b/source/blender/editors/screen/screen_intern.h index b882a0881a1..90533fd3a12 100644 --- a/source/blender/editors/screen/screen_intern.h +++ b/source/blender/editors/screen/screen_intern.h @@ -28,8 +28,8 @@ * \ingroup edscr */ -#ifndef ED_SCREEN_INTERN_H -#define ED_SCREEN_INTERN_H +#ifndef __SCREEN_INTERN_H__ +#define __SCREEN_INTERN_H__ /* internal exports only */ struct wmWindow; @@ -65,7 +65,7 @@ extern const char *screen_context_dir[]; /* doc access */ void SCREEN_OT_screenshot(struct wmOperatorType *ot); void SCREEN_OT_screencast(struct wmOperatorType *ot); -#endif /* ED_SCREEN_INTERN_H */ +#endif /* __SCREEN_INTERN_H__ */ diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h index 73dc1e236f6..b4315c2847d 100644 --- a/source/blender/editors/sculpt_paint/paint_intern.h +++ b/source/blender/editors/sculpt_paint/paint_intern.h @@ -29,8 +29,8 @@ */ -#ifndef ED_PAINT_INTERN_H -#define ED_PAINT_INTERN_H +#ifndef __PAINT_INTERN_H__ +#define __PAINT_INTERN_H__ struct ARegion; struct bContext; @@ -168,5 +168,5 @@ struct ListBase *undo_paint_push_get_list(int type); void undo_paint_push_count_alloc(int type, int size); void undo_paint_push_end(int type); -#endif /* ED_PAINT_INTERN_H */ +#endif /* __PAINT_INTERN_H__ */ diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index 5c739f043fe..94ec0d17bb9 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -30,8 +30,8 @@ */ -#ifndef BDR_SCULPTMODE_H -#define BDR_SCULPTMODE_H +#ifndef __SCULPT_INTERN_H__ +#define __SCULPT_INTERN_H__ #include "DNA_listBase.h" #include "DNA_vec_types.h" diff --git a/source/blender/editors/sound/sound_intern.h b/source/blender/editors/sound/sound_intern.h index 91c1b5d1456..e8a8ec55ab5 100644 --- a/source/blender/editors/sound/sound_intern.h +++ b/source/blender/editors/sound/sound_intern.h @@ -29,10 +29,10 @@ */ -#ifndef ED_SOUND_INTERN_H -#define ED_SOUND_INTERN_H +#ifndef __SOUND_INTERN_H__ +#define __SOUND_INTERN_H__ struct wmOperatorType; -#endif /* ED_SOUND_INTERN_H */ +#endif /* __SOUND_INTERN_H__ */ diff --git a/source/blender/editors/space_action/action_intern.h b/source/blender/editors/space_action/action_intern.h index 2a23f105737..751a809cac6 100644 --- a/source/blender/editors/space_action/action_intern.h +++ b/source/blender/editors/space_action/action_intern.h @@ -28,8 +28,8 @@ * \ingroup spaction */ -#ifndef ED_ACTION_INTERN_H -#define ED_ACTION_INTERN_H +#ifndef __ACTION_INTERN_H__ +#define __ACTION_INTERN_H__ struct bContext; struct bAnimContext; @@ -135,5 +135,5 @@ enum { void action_operatortypes(void); void action_keymap(struct wmKeyConfig *keyconf); -#endif /* ED_ACTION_INTERN_H */ +#endif /* __ACTION_INTERN_H__ */ diff --git a/source/blender/editors/space_buttons/buttons_intern.h b/source/blender/editors/space_buttons/buttons_intern.h index aa692a940d8..8d0f84cf70f 100644 --- a/source/blender/editors/space_buttons/buttons_intern.h +++ b/source/blender/editors/space_buttons/buttons_intern.h @@ -28,8 +28,8 @@ * \ingroup spbuttons */ -#ifndef ED_BUTTONS_INTERN_H -#define ED_BUTTONS_INTERN_H +#ifndef __BUTTONS_INTERN_H__ +#define __BUTTONS_INTERN_H__ #include "DNA_listBase.h" #include "RNA_types.h" @@ -117,5 +117,5 @@ void BUTTONS_OT_file_browse(struct wmOperatorType *ot); void BUTTONS_OT_directory_browse(struct wmOperatorType *ot); void BUTTONS_OT_toolbox(struct wmOperatorType *ot); -#endif /* ED_BUTTONS_INTERN_H */ +#endif /* __BUTTONS_INTERN_H__ */ diff --git a/source/blender/editors/space_clip/clip_intern.h b/source/blender/editors/space_clip/clip_intern.h index 9ff58a73ca2..c0b7137b5d8 100644 --- a/source/blender/editors/space_clip/clip_intern.h +++ b/source/blender/editors/space_clip/clip_intern.h @@ -29,8 +29,8 @@ * \ingroup spclip */ -#ifndef ED_CLIP_INTERN_H -#define ED_CLIP_INTERN_H +#ifndef __CLIP_INTERN_H__ +#define __CLIP_INTERN_H__ struct bContext; struct ARegion; @@ -152,4 +152,4 @@ void CLIP_OT_tracking_object_remove(struct wmOperatorType *ot); void CLIP_OT_copy_tracks(struct wmOperatorType *ot); void CLIP_OT_paste_tracks(struct wmOperatorType *ot); -#endif /* ED_CLIP_INTERN_H */ +#endif /* __CLIP_INTERN_H__ */ diff --git a/source/blender/editors/space_console/console_intern.h b/source/blender/editors/space_console/console_intern.h index 1c7aef01450..ce5c5f81f63 100644 --- a/source/blender/editors/space_console/console_intern.h +++ b/source/blender/editors/space_console/console_intern.h @@ -24,8 +24,8 @@ * \ingroup spconsole */ -#ifndef ED_CONSOLE_INTERN_H -#define ED_CONSOLE_INTERN_H +#ifndef __CONSOLE_INTERN_H__ +#define __CONSOLE_INTERN_H__ /* internal exports only */ @@ -69,4 +69,4 @@ void CONSOLE_OT_select_set(struct wmOperatorType *ot); enum { LINE_BEGIN, LINE_END, PREV_CHAR, NEXT_CHAR, PREV_WORD, NEXT_WORD }; enum { DEL_ALL, DEL_NEXT_CHAR, DEL_PREV_CHAR, DEL_SELECTION, DEL_NEXT_SEL, DEL_PREV_SEL }; -#endif /* ED_CONSOLE_INTERN_H */ +#endif /* __CONSOLE_INTERN_H__ */ diff --git a/source/blender/editors/space_file/file_intern.h b/source/blender/editors/space_file/file_intern.h index d9de804404e..e2c0591f901 100644 --- a/source/blender/editors/space_file/file_intern.h +++ b/source/blender/editors/space_file/file_intern.h @@ -28,8 +28,8 @@ * \ingroup spfile */ -#ifndef ED_FILE_INTERN_H -#define ED_FILE_INTERN_H +#ifndef __FILE_INTERN_H__ +#define __FILE_INTERN_H__ /* internal exports only */ @@ -112,5 +112,5 @@ void autocomplete_file(struct bContext *C, char *str, void *arg_v); /* file_panels.c */ void file_panels_register(struct ARegionType *art); -#endif /* ED_FILE_INTERN_H */ +#endif /* __FILE_INTERN_H__ */ diff --git a/source/blender/editors/space_file/filelist.h b/source/blender/editors/space_file/filelist.h index 0a8824e473d..fac6a387b9f 100644 --- a/source/blender/editors/space_file/filelist.h +++ b/source/blender/editors/space_file/filelist.h @@ -30,8 +30,8 @@ */ -#ifndef FILELIST_H -#define FILELIST_H +#ifndef __FILELIST_H__ +#define __FILELIST_H__ #ifdef __cplusplus extern "C" { diff --git a/source/blender/editors/space_file/fsmenu.h b/source/blender/editors/space_file/fsmenu.h index 5947db073f6..0d046fd985d 100644 --- a/source/blender/editors/space_file/fsmenu.h +++ b/source/blender/editors/space_file/fsmenu.h @@ -31,8 +31,8 @@ */ -#ifndef BSE_FSMENU_H -#define BSE_FSMENU_H +#ifndef __FSMENU_H__ +#define __FSMENU_H__ /* XXX could become UserPref */ #define FSMENU_RECENT_MAX 10 diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h index bc4fa398221..363ec407f71 100644 --- a/source/blender/editors/space_graph/graph_intern.h +++ b/source/blender/editors/space_graph/graph_intern.h @@ -28,8 +28,8 @@ * \ingroup spgraph */ -#ifndef ED_GRAPH_INTERN_H -#define ED_GRAPH_INTERN_H +#ifndef __GRAPH_INTERN_H__ +#define __GRAPH_INTERN_H__ struct bContext; struct wmWindowManager; @@ -173,5 +173,5 @@ void graphedit_keymap(struct wmKeyConfig *keyconf); void graphedit_operatortypes(void); -#endif /* ED_GRAPH_INTERN_H */ +#endif /* __GRAPH_INTERN_H__ */ diff --git a/source/blender/editors/space_image/image_intern.h b/source/blender/editors/space_image/image_intern.h index 29673f74538..71762a087a7 100644 --- a/source/blender/editors/space_image/image_intern.h +++ b/source/blender/editors/space_image/image_intern.h @@ -29,8 +29,8 @@ */ -#ifndef ED_IMAGE_INTERN_H -#define ED_IMAGE_INTERN_H +#ifndef __IMAGE_INTERN_H__ +#define __IMAGE_INTERN_H__ /* internal exports only */ struct bContext; @@ -95,5 +95,5 @@ void image_buttons_register(struct ARegionType *art); void IMAGE_OT_properties(struct wmOperatorType *ot); void IMAGE_OT_scopes(struct wmOperatorType *ot); -#endif /* ED_IMAGE_INTERN_H */ +#endif /* __IMAGE_INTERN_H__ */ diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index b03ae1aecd6..dd988c94dc9 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -870,6 +870,12 @@ static void image_buttons_area_listener(ARegion *ar, wmNotifier *wmn) if(wmn->action==NA_EDITED) ED_region_tag_redraw(ar); break; + case NC_TEXTURE: + case NC_MATERIAL: + /* sending by texture render job and needed to properly update displaying + * brush texture icon */ + ED_region_tag_redraw(ar); + break; } } diff --git a/source/blender/editors/space_info/info_intern.h b/source/blender/editors/space_info/info_intern.h index fc0615a914b..80018e849d3 100644 --- a/source/blender/editors/space_info/info_intern.h +++ b/source/blender/editors/space_info/info_intern.h @@ -28,8 +28,8 @@ * \ingroup spinfo */ -#ifndef ED_INFO_INTERN_H -#define ED_INFO_INTERN_H +#ifndef __INFO_INTERN_H__ +#define __INFO_INTERN_H__ /* internal exports only */ @@ -61,4 +61,4 @@ void INFO_OT_report_replay(struct wmOperatorType *ot); void INFO_OT_report_delete(struct wmOperatorType *ot); void INFO_OT_report_copy(struct wmOperatorType *ot); -#endif /* ED_INFO_INTERN_H */ +#endif /* __INFO_INTERN_H__ */ diff --git a/source/blender/editors/space_logic/logic_intern.h b/source/blender/editors/space_logic/logic_intern.h index 457fe14352c..3e0b13e9d6c 100644 --- a/source/blender/editors/space_logic/logic_intern.h +++ b/source/blender/editors/space_logic/logic_intern.h @@ -29,8 +29,8 @@ */ -#ifndef ED_LOGIC_INTERN_H -#define ED_LOGIC_INTERN_H +#ifndef __LOGIC_INTERN_H__ +#define __LOGIC_INTERN_H__ /* internal exports only */ struct bContext; @@ -56,5 +56,5 @@ void LOGIC_OT_links_cut(struct wmOperatorType *ot); void logic_buttons(struct bContext *C, struct ARegion *ar); void make_unique_prop_names(struct bContext *C, char *str); -#endif /* ED_LOGIC_INTERN_H */ +#endif /* __LOGIC_INTERN_H__ */ diff --git a/source/blender/editors/space_nla/nla_intern.h b/source/blender/editors/space_nla/nla_intern.h index 00c16d68f36..9d0762ce108 100644 --- a/source/blender/editors/space_nla/nla_intern.h +++ b/source/blender/editors/space_nla/nla_intern.h @@ -28,8 +28,8 @@ * \ingroup spnla */ -#ifndef ED_NLA_INTERN_H -#define ED_NLA_INTERN_H +#ifndef __NLA_INTERN_H__ +#define __NLA_INTERN_H__ /* internal exports only */ @@ -140,5 +140,5 @@ short nlaedit_is_tweakmode_on(bAnimContext *ac); void nla_operatortypes(void); void nla_keymap(wmKeyConfig *keyconf); -#endif /* ED_NLA_INTERN_H */ +#endif /* __NLA_INTERN_H__ */ diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h index 186ad3768be..48501079e60 100644 --- a/source/blender/editors/space_node/node_intern.h +++ b/source/blender/editors/space_node/node_intern.h @@ -28,8 +28,8 @@ * \ingroup spnode */ -#ifndef ED_NODE_INTERN_H -#define ED_NODE_INTERN_H +#ifndef __NODE_INTERN_H__ +#define __NODE_INTERN_H__ #include /* for size_t */ #include "UI_interface.h" @@ -190,4 +190,4 @@ enum { B_NODE_SETIMAGE, } eNodeSpace_ButEvents; -#endif /* ED_NODE_INTERN_H */ +#endif /* __NODE_INTERN_H__ */ diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index be33fc2e37a..8c53e9ad111 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -29,8 +29,8 @@ */ -#ifndef ED_OUTLINER_INTERN_H -#define ED_OUTLINER_INTERN_H +#ifndef __OUTLINER_INTERN_H__ +#define __OUTLINER_INTERN_H__ #include "RNA_types.h" @@ -237,4 +237,4 @@ void OUTLINER_OT_action_set(struct wmOperatorType *ot); void outliner_operatortypes(void); void outliner_keymap(struct wmKeyConfig *keyconf); -#endif /* ED_OUTLINER_INTERN_H */ +#endif /* __OUTLINER_INTERN_H__ */ diff --git a/source/blender/editors/space_script/script_intern.h b/source/blender/editors/space_script/script_intern.h index 98e9699079b..00863863994 100644 --- a/source/blender/editors/space_script/script_intern.h +++ b/source/blender/editors/space_script/script_intern.h @@ -28,8 +28,8 @@ * \ingroup spscript */ -#ifndef ED_SCRIPT_INTERN_H -#define ED_SCRIPT_INTERN_H +#ifndef __SCRIPT_INTERN_H__ +#define __SCRIPT_INTERN_H__ /* internal exports only */ @@ -41,5 +41,5 @@ void script_keymap(struct wmKeyConfig *keyconf); void SCRIPT_OT_reload(struct wmOperatorType *ot); void SCRIPT_OT_python_file_run(struct wmOperatorType *ot); -#endif /* ED_SCRIPT_INTERN_H */ +#endif /* __SCRIPT_INTERN_H__ */ diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h index 812bdbc678f..91d4e490ddc 100644 --- a/source/blender/editors/space_sequencer/sequencer_intern.h +++ b/source/blender/editors/space_sequencer/sequencer_intern.h @@ -28,8 +28,8 @@ * \ingroup spseq */ -#ifndef ED_SEQUENCER_INTERN_H -#define ED_SEQUENCER_INTERN_H +#ifndef __SEQUENCER_INTERN_H__ +#define __SEQUENCER_INTERN_H__ #include "RNA_access.h" #include "DNA_sequence_types.h" @@ -176,5 +176,5 @@ struct ImBuf *make_histogram_view_from_ibuf(struct ImBuf * ibuf); void SEQUENCER_OT_properties(struct wmOperatorType *ot); void sequencer_buttons_register(struct ARegionType *art); -#endif /* ED_SEQUENCER_INTERN_H */ +#endif /* __SEQUENCER_INTERN_H__ */ diff --git a/source/blender/editors/space_text/text_intern.h b/source/blender/editors/space_text/text_intern.h index 043fb97547b..2d297dd20d7 100644 --- a/source/blender/editors/space_text/text_intern.h +++ b/source/blender/editors/space_text/text_intern.h @@ -28,8 +28,8 @@ * \ingroup sptext */ -#ifndef ED_TEXT_INTERN_H -#define ED_TEXT_INTERN_H +#ifndef __TEXT_INTERN_H__ +#define __TEXT_INTERN_H__ /* internal exports only */ @@ -163,5 +163,5 @@ void TEXT_OT_resolve_conflict(struct wmOperatorType *ot); /* space_text.c */ extern const char *text_context_dir[]; /* doc access */ -#endif /* ED_TEXT_INTERN_H */ +#endif /* __TEXT_INTERN_H__ */ diff --git a/source/blender/editors/space_time/time_intern.h b/source/blender/editors/space_time/time_intern.h index a345d00bd74..ce52cbbd65e 100644 --- a/source/blender/editors/space_time/time_intern.h +++ b/source/blender/editors/space_time/time_intern.h @@ -29,8 +29,8 @@ */ -#ifndef ED_TIME_INTERN_H -#define ED_TIME_INTERN_H +#ifndef __TIME_INTERN_H__ +#define __TIME_INTERN_H__ /* internal exports only */ @@ -40,5 +40,5 @@ struct wmWindowManager; void time_operatortypes(void); void time_keymap(struct wmKeyConfig *keyconf); -#endif /* ED_TIME_INTERN_H */ +#endif /* __TIME_INTERN_H__ */ diff --git a/source/blender/editors/space_userpref/userpref_intern.h b/source/blender/editors/space_userpref/userpref_intern.h index fc6d218b20c..03074290d13 100644 --- a/source/blender/editors/space_userpref/userpref_intern.h +++ b/source/blender/editors/space_userpref/userpref_intern.h @@ -28,10 +28,10 @@ * \ingroup spuserpref */ -#ifndef ED_USERPREF_INTERN_H -#define ED_USERPREF_INTERN_H +#ifndef __USERPREF_INTERN_H__ +#define __USERPREF_INTERN_H__ /* internal exports only */ -#endif /* ED_USERPREF_INTERN_H */ +#endif /* __USERPREF_INTERN_H__ */ diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 94ab847c91b..72a068af095 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -933,6 +933,7 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw(ar); break; case NC_TEXTURE: + case NC_MATERIAL: /* for brush textures */ ED_region_tag_redraw(ar); break; diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 61f08a84ac7..0a942a42540 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -488,8 +488,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) /* mode */ if(ob) { v3d->modeselect = ob->mode; - is_paint = ELEM5(ob->mode, OB_MODE_SCULPT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, - OB_MODE_TEXTURE_PAINT, OB_MODE_PARTICLE_EDIT); + is_paint = ELEM4(ob->mode, OB_MODE_SCULPT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT,OB_MODE_TEXTURE_PAINT); } else { v3d->modeselect = OB_MODE_OBJECT; diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index 07754c0883c..40037f82376 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -28,8 +28,8 @@ * \ingroup spview3d */ -#ifndef ED_VIEW3D_INTERN_H -#define ED_VIEW3D_INTERN_H +#ifndef __VIEW3D_INTERN_H__ +#define __VIEW3D_INTERN_H__ #include "ED_view3d.h" @@ -215,5 +215,5 @@ extern float view3d_camera_border_hack_col[4]; extern short view3d_camera_border_hack_test; #endif -#endif /* ED_VIEW3D_INTERN_H */ +#endif /* __VIEW3D_INTERN_H__ */ diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index 090b12e401e..13f7d279da9 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -30,8 +30,8 @@ */ -#ifndef TRANSFORM_H -#define TRANSFORM_H +#ifndef __TRANSFORM_H__ +#define __TRANSFORM_H__ #include "ED_transform.h" #include "ED_numinput.h" diff --git a/source/blender/editors/util/util_intern.h b/source/blender/editors/util/util_intern.h index c6e2d079c28..d366ad7997f 100644 --- a/source/blender/editors/util/util_intern.h +++ b/source/blender/editors/util/util_intern.h @@ -29,8 +29,8 @@ */ -#ifndef ED_UTIL_INTERN_H -#define ED_UTIL_INTERN_H +#ifndef __UTIL_INTERN_H__ +#define __UTIL_INTERN_H__ /* internal exports only */ @@ -42,5 +42,5 @@ void *undo_editmode_get_prev (struct Object *ob); void undo_editmode_step (struct bContext *C, int step); void undo_editmode_number (struct bContext *C, int nr); -#endif /* ED_UTIL_INTERN_H */ +#endif /* __UTIL_INTERN_H__ */ diff --git a/source/blender/editors/uvedit/uvedit_intern.h b/source/blender/editors/uvedit/uvedit_intern.h index 6e399e81f0f..6566a79e467 100644 --- a/source/blender/editors/uvedit/uvedit_intern.h +++ b/source/blender/editors/uvedit/uvedit_intern.h @@ -29,8 +29,8 @@ */ -#ifndef ED_UVEDIT_INTERN_H -#define ED_UVEDIT_INTERN_H +#ifndef __UVEDIT_INTERN_H__ +#define __UVEDIT_INTERN_H__ struct EditFace; struct EditMesh; @@ -118,5 +118,5 @@ void UV_OT_sphere_project(struct wmOperatorType *ot); void UV_OT_unwrap(struct wmOperatorType *ot); void UV_OT_stitch(struct wmOperatorType *ot); -#endif /* ED_UVEDIT_INTERN_H */ +#endif /* __UVEDIT_INTERN_H__ */ diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.h b/source/blender/editors/uvedit/uvedit_parametrizer.h index df2fbfa193e..5adb3074314 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.h +++ b/source/blender/editors/uvedit/uvedit_parametrizer.h @@ -2,8 +2,8 @@ * \ingroup eduv */ -#ifndef __PARAMETRIZER_H__ -#define __PARAMETRIZER_H__ +#ifndef __UVEDIT_PARAMETRIZER_H__ +#define __UVEDIT_PARAMETRIZER_H__ #ifdef __cplusplus extern "C" { @@ -98,5 +98,5 @@ void param_flush_restore(ParamHandle *handle); } #endif -#endif /*__PARAMETRIZER_H__*/ +#endif /*__UVEDIT_PARAMETRIZER_H__*/ diff --git a/source/blender/gpu/GPU_draw.h b/source/blender/gpu/GPU_draw.h index f73bd402167..89976699114 100644 --- a/source/blender/gpu/GPU_draw.h +++ b/source/blender/gpu/GPU_draw.h @@ -29,8 +29,8 @@ * \ingroup gpu */ -#ifndef GPU_GAME_H -#define GPU_GAME_H +#ifndef __GPU_DRAW_H__ +#define __GPU_DRAW_H__ #ifdef __cplusplus extern "C" { diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h index 9fb0dd1ae07..5ec373802a3 100644 --- a/source/blender/gpu/GPU_extensions.h +++ b/source/blender/gpu/GPU_extensions.h @@ -29,8 +29,8 @@ * \ingroup gpu */ -#ifndef GPU_EXTENSIONS_H -#define GPU_EXTENSIONS_H +#ifndef __GPU_EXTENSIONS_H__ +#define __GPU_EXTENSIONS_H__ #ifdef __cplusplus extern "C" { diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h index 5689f02d2d7..8254c0f30ca 100644 --- a/source/blender/gpu/GPU_material.h +++ b/source/blender/gpu/GPU_material.h @@ -29,8 +29,8 @@ * \ingroup gpu */ -#ifndef __GPU_MATERIAL__ -#define __GPU_MATERIAL__ +#ifndef __GPU_MATERIAL_H__ +#define __GPU_MATERIAL_H__ #include "DNA_listBase.h" @@ -238,5 +238,5 @@ int GPU_lamp_shadow_layer(GPULamp *lamp); } #endif -#endif /*__GPU_MATERIAL__*/ +#endif /*__GPU_MATERIAL_H__*/ diff --git a/source/blender/ikplugin/BIK_api.h b/source/blender/ikplugin/BIK_api.h index 4b90b2546ff..cbc6485cb54 100644 --- a/source/blender/ikplugin/BIK_api.h +++ b/source/blender/ikplugin/BIK_api.h @@ -31,8 +31,8 @@ */ -#ifndef BIK_API_H -#define BIK_API_H +#ifndef __BIK_API_H__ +#define __BIK_API_H__ #ifdef __cplusplus extern "C" { @@ -92,5 +92,5 @@ int BIK_get_solver_param(struct bPose *pose, struct bPoseChannel *pchan, int id, } #endif -#endif // BIK_API_H +#endif // __BIK_API_H__ diff --git a/source/blender/ikplugin/intern/ikplugin_api.h b/source/blender/ikplugin/intern/ikplugin_api.h index b1e723289ec..77c962269dc 100644 --- a/source/blender/ikplugin/intern/ikplugin_api.h +++ b/source/blender/ikplugin/intern/ikplugin_api.h @@ -31,8 +31,8 @@ */ -#ifndef IKPLUGIN_API_H -#define IKPLUGIN_API_H +#ifndef __IKPLUGIN_API_H__ +#define __IKPLUGIN_API_H__ #ifdef __cplusplus extern "C" { @@ -60,5 +60,5 @@ typedef struct IKPlugin IKPlugin; } #endif -#endif // IKPLUGIN_API_H +#endif // __IKPLUGIN_API_H__ diff --git a/source/blender/ikplugin/intern/iksolver_plugin.h b/source/blender/ikplugin/intern/iksolver_plugin.h index 885383ab65e..dd00c5f4add 100644 --- a/source/blender/ikplugin/intern/iksolver_plugin.h +++ b/source/blender/ikplugin/intern/iksolver_plugin.h @@ -31,8 +31,8 @@ */ -#ifndef IKSOLVER_PLUGIN_H -#define IKSOLVER_PLUGIN_H +#ifndef __IKSOLVER_PLUGIN_H__ +#define __IKSOLVER_PLUGIN_H__ #include "ikplugin_api.h" @@ -47,5 +47,5 @@ void iksolver_execute_tree(struct Scene *scene, struct Object *ob, struct bPose } #endif -#endif // IKSOLVER_PLUGIN_H +#endif // __IKSOLVER_PLUGIN_H__ diff --git a/source/blender/ikplugin/intern/itasc_plugin.h b/source/blender/ikplugin/intern/itasc_plugin.h index 1d6acb2cce3..0d5fde0bec0 100644 --- a/source/blender/ikplugin/intern/itasc_plugin.h +++ b/source/blender/ikplugin/intern/itasc_plugin.h @@ -31,8 +31,8 @@ */ -#ifndef ITASC_PLUGIN_H -#define ITASC_PLUGIN_H +#ifndef __ITASC_PLUGIN_H__ +#define __ITASC_PLUGIN_H__ #include "ikplugin_api.h" @@ -52,5 +52,5 @@ void itasc_test_constraint(struct Object *ob, struct bConstraint *cons); } #endif -#endif // ITASC_PLUGIN_H +#endif // __ITASC_PLUGIN_H__ diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index 07f1b9e4683..9d21cc6d8d9 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -68,8 +68,8 @@ * posix-compliant. */ -#ifndef IMB_IMBUF_H -#define IMB_IMBUF_H +#ifndef __IMB_IMBUF_H__ +#define __IMB_IMBUF_H__ /** * diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h index cb5d6721566..c2b42db447d 100644 --- a/source/blender/imbuf/IMB_imbuf_types.h +++ b/source/blender/imbuf/IMB_imbuf_types.h @@ -44,8 +44,8 @@ * \todo Clean up includes. */ -#ifndef IMB_IMBUF_TYPES_H -#define IMB_IMBUF_TYPES_H +#ifndef __IMB_IMBUF_TYPES_H__ +#define __IMB_IMBUF_TYPES_H__ struct ImMetaData; diff --git a/source/blender/imbuf/IMB_moviecache.h b/source/blender/imbuf/IMB_moviecache.h index 309c6ee550e..3fa98a04d8d 100644 --- a/source/blender/imbuf/IMB_moviecache.h +++ b/source/blender/imbuf/IMB_moviecache.h @@ -24,8 +24,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef IMB_MOVIECACHE_H -#define IMB_MOVIECACHE_H +#ifndef __IMB_MOVIECACHE_H__ +#define __IMB_MOVIECACHE_H__ /** \file IMB_moviecache.h * \ingroup imbuf diff --git a/source/blender/imbuf/IMB_thumbs.h b/source/blender/imbuf/IMB_thumbs.h index ad620007abe..49e90134d21 100644 --- a/source/blender/imbuf/IMB_thumbs.h +++ b/source/blender/imbuf/IMB_thumbs.h @@ -30,8 +30,8 @@ */ -#ifndef _IMB_THUMBS_H -#define _IMB_THUMBS_H +#ifndef __IMB_THUMBS_H__ +#define __IMB_THUMBS_H__ #ifdef __cplusplus extern "C" { @@ -85,5 +85,5 @@ void IMB_overlayblend_thumb(unsigned int *thumb, int width, int height, float as } #endif /* __cplusplus */ -#endif /* _IMB_THUMBS_H */ +#endif /* __IMB_THUMBS_H__ */ diff --git a/source/blender/imbuf/intern/IMB_allocimbuf.h b/source/blender/imbuf/intern/IMB_allocimbuf.h index c2f1d2a1f51..52b3bc1f11a 100644 --- a/source/blender/imbuf/intern/IMB_allocimbuf.h +++ b/source/blender/imbuf/intern/IMB_allocimbuf.h @@ -33,8 +33,8 @@ * \ingroup imbuf * \brief Header file for allocimbuf.c */ -#ifndef IMB_ALLOCIMBUF_H -#define IMB_ALLOCIMBUF_H +#ifndef __IMB_ALLOCIMBUF_H__ +#define __IMB_ALLOCIMBUF_H__ struct ImBuf; diff --git a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h index a9f020c94e8..b29d9d419e2 100644 --- a/source/blender/imbuf/intern/IMB_anim.h +++ b/source/blender/imbuf/intern/IMB_anim.h @@ -33,8 +33,8 @@ */ -#ifndef IMB_ANIM_H -#define IMB_ANIM_H +#ifndef __IMB_ANIM_H__ +#define __IMB_ANIM_H__ #ifdef _WIN32 # define INC_OLE2 diff --git a/source/blender/imbuf/intern/IMB_filetype.h b/source/blender/imbuf/intern/IMB_filetype.h index 4cd10ad01d0..83267ed323d 100644 --- a/source/blender/imbuf/intern/IMB_filetype.h +++ b/source/blender/imbuf/intern/IMB_filetype.h @@ -25,8 +25,8 @@ */ -#ifndef IMB_FILETYPE_H -#define IMB_FILETYPE_H +#ifndef __IMB_FILETYPE_H__ +#define __IMB_FILETYPE_H__ /* Generic File Type */ @@ -119,5 +119,5 @@ void imb_loadtiletiff(struct ImBuf *ibuf, unsigned char *mem, size_t size, int imb_savetiff(struct ImBuf *ibuf, const char *name, int flags); void *libtiff_findsymbol(char *name); -#endif /* IMB_FILETYPE_H */ +#endif /* __IMB_FILETYPE_H__ */ diff --git a/source/blender/imbuf/intern/IMB_filter.h b/source/blender/imbuf/intern/IMB_filter.h index 29e6c4950df..6199cc13bb9 100644 --- a/source/blender/imbuf/intern/IMB_filter.h +++ b/source/blender/imbuf/intern/IMB_filter.h @@ -33,8 +33,8 @@ * \brief Function declarations for filter.c */ -#ifndef IMB_FILTER_H -#define IMB_FILTER_H +#ifndef __IMB_FILTER_H__ +#define __IMB_FILTER_H__ struct ImBuf; diff --git a/source/blender/imbuf/intern/IMB_indexer.h b/source/blender/imbuf/intern/IMB_indexer.h index f9d90208078..6546840ea85 100644 --- a/source/blender/imbuf/intern/IMB_indexer.h +++ b/source/blender/imbuf/intern/IMB_indexer.h @@ -22,8 +22,8 @@ */ -#ifndef IMB_INDEXER_H -#define IMB_INDEXER_H +#ifndef __IMB_INDEXER_H__ +#define __IMB_INDEXER_H__ #ifdef WIN32 # include diff --git a/source/blender/imbuf/intern/IMB_metadata.h b/source/blender/imbuf/intern/IMB_metadata.h index 0f57b8f654a..9b3a8004c74 100644 --- a/source/blender/imbuf/intern/IMB_metadata.h +++ b/source/blender/imbuf/intern/IMB_metadata.h @@ -30,8 +30,8 @@ */ -#ifndef _IMB_IMGINFO_H -#define _IMB_IMGINFO_H +#ifndef __IMB_METADATA_H__ +#define __IMB_METADATA_H__ struct ImBuf; @@ -80,4 +80,4 @@ int IMB_metadata_add_field(struct ImBuf* img, const char* key, const char* field */ int IMB_metadata_del_field(struct ImBuf *img, const char *key); -#endif /* _IMB_IMGINFO_H */ +#endif /* __IMB_METADATA_H__ */ diff --git a/source/blender/imbuf/intern/cineon/cineonfile.h b/source/blender/imbuf/intern/cineon/cineonfile.h index 896e0af65b3..ea321c87d48 100644 --- a/source/blender/imbuf/intern/cineon/cineonfile.h +++ b/source/blender/imbuf/intern/cineon/cineonfile.h @@ -26,8 +26,8 @@ * */ -#ifndef _CINEON_FILE_H_ -#define _CINEON_FILE_H_ +#ifndef __CINEONFILE_H__ +#define __CINEONFILE_H__ #include "logImageCore.h" @@ -130,4 +130,4 @@ typedef struct { } #endif -#endif /* _CINEON_FILE_H_ */ +#endif /* __CINEONFILE_H__ */ diff --git a/source/blender/imbuf/intern/cineon/cineonlib.h b/source/blender/imbuf/intern/cineon/cineonlib.h index c24503e2ada..b1ad0532e25 100644 --- a/source/blender/imbuf/intern/cineon/cineonlib.h +++ b/source/blender/imbuf/intern/cineon/cineonlib.h @@ -23,8 +23,8 @@ * */ -#ifndef _CINEON_LIB_H_ -#define _CINEON_LIB_H_ +#ifndef __CINEONLIB_H__ +#define __CINEONLIB_H__ #include "logImageCore.h" @@ -68,4 +68,4 @@ void cineonClose(CineonFile* cineon); } #endif -#endif /* _CINEON_LIB_H_ */ +#endif /* __CINEONLIB_H__ */ diff --git a/source/blender/imbuf/intern/cineon/dpxfile.h b/source/blender/imbuf/intern/cineon/dpxfile.h index abb11ec2e8c..dc8fc0bdbd2 100644 --- a/source/blender/imbuf/intern/cineon/dpxfile.h +++ b/source/blender/imbuf/intern/cineon/dpxfile.h @@ -26,8 +26,8 @@ * */ -#ifndef _DPX_FILE_H_ -#define _DPX_FILE_H_ +#ifndef __DPXFILE_H__ +#define __DPXFILE_H__ #include "logImageCore.h" @@ -124,4 +124,4 @@ typedef struct { } #endif -#endif /* _DPX_FILE_H_ */ +#endif /* __DPXFILE_H__ */ diff --git a/source/blender/imbuf/intern/cineon/dpxlib.h b/source/blender/imbuf/intern/cineon/dpxlib.h index 1607de311c3..b09c699ae5b 100644 --- a/source/blender/imbuf/intern/cineon/dpxlib.h +++ b/source/blender/imbuf/intern/cineon/dpxlib.h @@ -22,8 +22,8 @@ * */ -#ifndef _DPX_LIB_H_ -#define _DPX_LIB_H_ +#ifndef __DPXLIB_H__ +#define __DPXLIB_H__ #ifdef __cplusplus extern "C" { @@ -56,4 +56,4 @@ void dpxDump(const char* filename); } #endif -#endif /* _DPX_LIB_H_ */ +#endif /* __DPXLIB_H__ */ diff --git a/source/blender/imbuf/intern/cineon/logImageCore.h b/source/blender/imbuf/intern/cineon/logImageCore.h index cbc7cb9d64a..c8592621f08 100644 --- a/source/blender/imbuf/intern/cineon/logImageCore.h +++ b/source/blender/imbuf/intern/cineon/logImageCore.h @@ -27,8 +27,8 @@ * */ -#ifndef _LOG_IMAGE_CORE_H_ -#define _LOG_IMAGE_CORE_H_ +#ifndef __LOGIMAGECORE_H__ +#define __LOGIMAGECORE_H__ #include #include "logImageLib.h" @@ -119,4 +119,4 @@ R32 reverseR32(R32 value); } #endif -#endif /* _LOG_IMAGE_CORE_H_ */ +#endif /* __LOGIMAGECORE_H__ */ diff --git a/source/blender/imbuf/intern/cineon/logImageLib.h b/source/blender/imbuf/intern/cineon/logImageLib.h index 9f6d3ad2adf..72448ed962b 100644 --- a/source/blender/imbuf/intern/cineon/logImageLib.h +++ b/source/blender/imbuf/intern/cineon/logImageLib.h @@ -22,8 +22,8 @@ * */ -#ifndef _LOG_IMAGE_LIB_H_ -#define _LOG_IMAGE_LIB_H_ +#ifndef __LOGIMAGELIB_H__ +#define __LOGIMAGELIB_H__ #ifdef __cplusplus extern "C" { @@ -87,4 +87,4 @@ void logImageDump(const char* filename); } #endif -#endif /* _LOG_IMAGE_LIB_H_ */ +#endif /* __LOGIMAGELIB_H__ */ diff --git a/source/blender/imbuf/intern/cineon/logmemfile.h b/source/blender/imbuf/intern/cineon/logmemfile.h index 36f950232ac..2611463148e 100644 --- a/source/blender/imbuf/intern/cineon/logmemfile.h +++ b/source/blender/imbuf/intern/cineon/logmemfile.h @@ -22,11 +22,11 @@ * */ -#ifndef _LOGMEMFILE_H -#define _LOGMEMFILE_H +#ifndef __LOGMEMFILE_H__ +#define __LOGMEMFILE_H__ int logimage_fseek(void* logfile, intptr_t offsett, int origin); int logimage_fwrite(void *buffer, unsigned int size, unsigned int count, void *logfile); int logimage_fread(void *buffer, unsigned int size, unsigned int count, void *logfile); -#endif /* _LOGMEMFILE_H */ +#endif /* __LOGMEMFILE_H__ */ diff --git a/source/blender/imbuf/intern/dds/BlockDXT.h b/source/blender/imbuf/intern/dds/BlockDXT.h index cdf839ce9b4..c6712f4f058 100644 --- a/source/blender/imbuf/intern/dds/BlockDXT.h +++ b/source/blender/imbuf/intern/dds/BlockDXT.h @@ -55,8 +55,8 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -#ifndef _DDS_BLOCKDXT_H -#define _DDS_BLOCKDXT_H +#ifndef __BLOCKDXT_H__ +#define __BLOCKDXT_H__ #include #include @@ -271,4 +271,4 @@ void mem_read(Stream & mem, BlockATI1 & block); void mem_read(Stream & mem, BlockATI2 & block); void mem_read(Stream & mem, BlockCTX1 & block); -#endif // _DDS_BLOCKDXT_H +#endif // __BLOCKDXT_H__ diff --git a/source/blender/imbuf/intern/dds/Color.h b/source/blender/imbuf/intern/dds/Color.h index b23a5a32bdc..17de0a596c6 100644 --- a/source/blender/imbuf/intern/dds/Color.h +++ b/source/blender/imbuf/intern/dds/Color.h @@ -34,8 +34,8 @@ // This code is in the public domain -- castanyo@yahoo.es -#ifndef _DDS_COLOR_H -#define _DDS_COLOR_H +#ifndef __COLOR_H__ +#define __COLOR_H__ /// 32 bit color stored as BGRA. class Color32 @@ -96,4 +96,4 @@ public: }; }; -#endif // _DDS_COLOR_H +#endif // __COLOR_H__ diff --git a/source/blender/imbuf/intern/dds/ColorBlock.h b/source/blender/imbuf/intern/dds/ColorBlock.h index eb483f559c2..e72b6253035 100644 --- a/source/blender/imbuf/intern/dds/ColorBlock.h +++ b/source/blender/imbuf/intern/dds/ColorBlock.h @@ -34,8 +34,8 @@ // This code is in the public domain -- castanyo@yahoo.es -#ifndef _DDS_COLORBLOCK_H -#define _DDS_COLORBLOCK_H +#ifndef __COLORBLOCK_H__ +#define __COLORBLOCK_H__ #include #include @@ -104,4 +104,4 @@ inline Color32 & ColorBlock::color(uint x, uint y) return m_color[y * 4 + x]; } -#endif // _DDS_COLORBLOCK_H +#endif // __COLORBLOCK_H__ diff --git a/source/blender/imbuf/intern/dds/Common.h b/source/blender/imbuf/intern/dds/Common.h index 8c307e346f0..4e3e3e024f7 100644 --- a/source/blender/imbuf/intern/dds/Common.h +++ b/source/blender/imbuf/intern/dds/Common.h @@ -25,8 +25,8 @@ */ -#ifndef _DDS_COMMON_H -#define _DDS_COMMON_H +#ifndef __COMMON_H__ +#define __COMMON_H__ #ifndef min #define min(a,b) ((a) <= (b) ? (a) : (b)) diff --git a/source/blender/imbuf/intern/dds/DirectDrawSurface.h b/source/blender/imbuf/intern/dds/DirectDrawSurface.h index 8b8388c9f89..23c8bbf2de3 100644 --- a/source/blender/imbuf/intern/dds/DirectDrawSurface.h +++ b/source/blender/imbuf/intern/dds/DirectDrawSurface.h @@ -55,8 +55,8 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -#ifndef _DDS_DIRECTDRAWSURFACE_H -#define _DDS_DIRECTDRAWSURFACE_H +#ifndef __DIRECTDRAWSURFACE_H__ +#define __DIRECTDRAWSURFACE_H__ #include #include @@ -198,4 +198,4 @@ void mem_read(Stream & mem, DDSCaps & caps); void mem_read(Stream & mem, DDSHeader & header); void mem_read(Stream & mem, DDSHeader10 & header); -#endif // _DDS_DIRECTDRAWSURFACE_H +#endif // __DIRECTDRAWSURFACE_H__ diff --git a/source/blender/imbuf/intern/dds/Image.h b/source/blender/imbuf/intern/dds/Image.h index e932e1122f2..9c2220567aa 100644 --- a/source/blender/imbuf/intern/dds/Image.h +++ b/source/blender/imbuf/intern/dds/Image.h @@ -34,8 +34,8 @@ // This code is in the public domain -- castanyo@yahoo.es -#ifndef _DDS_IMAGE_H -#define _DDS_IMAGE_H +#ifndef __IMAGE_H__ +#define __IMAGE_H__ #include #include @@ -101,4 +101,4 @@ inline Color32 & Image::pixel(uint x, uint y) return pixel(y * width() + x); } -#endif // _DDS_IMAGE_H +#endif // __IMAGE_H__ diff --git a/source/blender/imbuf/intern/dds/PixelFormat.h b/source/blender/imbuf/intern/dds/PixelFormat.h index c76c7994ed2..9add62c4616 100644 --- a/source/blender/imbuf/intern/dds/PixelFormat.h +++ b/source/blender/imbuf/intern/dds/PixelFormat.h @@ -55,8 +55,8 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -#ifndef _DDS_PIXELFORMAT_H -#define _DDS_PIXELFORMAT_H +#ifndef __PIXELFORMAT_H__ +#define __PIXELFORMAT_H__ #include diff --git a/source/blender/imbuf/intern/dds/Stream.h b/source/blender/imbuf/intern/dds/Stream.h index 1c789ac948f..9f513ca8aba 100644 --- a/source/blender/imbuf/intern/dds/Stream.h +++ b/source/blender/imbuf/intern/dds/Stream.h @@ -27,8 +27,8 @@ /* simple memory stream functions with buffer overflow check */ -#ifndef _STREAM_H -#define _STREAM_H +#ifndef __STREAM_H__ +#define __STREAM_H__ struct Stream { @@ -45,5 +45,5 @@ unsigned int mem_read(Stream & mem, unsigned short & i); unsigned int mem_read(Stream & mem, unsigned char & i); unsigned int mem_read(Stream & mem, unsigned char *i, unsigned int cnt); -#endif // _STREAM_H +#endif // __STREAM_H__ diff --git a/source/blender/imbuf/intern/dds/dds_api.h b/source/blender/imbuf/intern/dds/dds_api.h index e477a4b8003..589257816e0 100644 --- a/source/blender/imbuf/intern/dds/dds_api.h +++ b/source/blender/imbuf/intern/dds/dds_api.h @@ -25,8 +25,8 @@ */ -#ifndef _DDS_API_H -#define _DDS_API_H +#ifndef __DDS_API_H__ +#define __DDS_API_H__ #ifdef __cplusplus extern "C" { diff --git a/source/blender/imbuf/intern/imbuf.h b/source/blender/imbuf/intern/imbuf.h index c1afecf621f..2125583375f 100644 --- a/source/blender/imbuf/intern/imbuf.h +++ b/source/blender/imbuf/intern/imbuf.h @@ -35,8 +35,8 @@ */ -#ifndef IMBUF_H -#define IMBUF_H +#ifndef __IMBUF_H__ +#define __IMBUF_H__ #include #include @@ -78,5 +78,5 @@ typedef unsigned char uchar; #define TRUE 1 #define FALSE 0 -#endif /* IMBUF_H */ +#endif /* __IMBUF_H__ */ diff --git a/source/blender/imbuf/intern/openexr/openexr_api.h b/source/blender/imbuf/intern/openexr/openexr_api.h index 8567673a3e3..2b3a17ba47d 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.h +++ b/source/blender/imbuf/intern/openexr/openexr_api.h @@ -30,8 +30,8 @@ */ -#ifndef _OPENEXR_API_H -#define _OPENEXR_API_H +#ifndef __OPENEXR_API_H__ +#define __OPENEXR_API_H__ #ifdef __cplusplus extern "C" { diff --git a/source/blender/imbuf/intern/openexr/openexr_multi.h b/source/blender/imbuf/intern/openexr/openexr_multi.h index abb675e1dca..84e3da0baa7 100644 --- a/source/blender/imbuf/intern/openexr/openexr_multi.h +++ b/source/blender/imbuf/intern/openexr/openexr_multi.h @@ -30,8 +30,8 @@ */ -#ifndef _OPENEXR_MULTI_H -#define _OPENEXR_MULTI_H +#ifndef __OPENEXR_MULTI_H__ +#define __OPENEXR_MULTI_H__ /* experiment with more advanced exr api */ diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index cb7b8d15d52..eb8d06fc9f2 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -30,8 +30,8 @@ * \brief ID and Library types, which are fundamental for sdna. */ -#ifndef DNA_ID_H -#define DNA_ID_H +#ifndef __DNA_ID_H__ +#define __DNA_ID_H__ #include "DNA_listBase.h" diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index e582d071319..058c72be639 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_ACTION_TYPES_H -#define DNA_ACTION_TYPES_H +#ifndef __DNA_ACTION_TYPES_H__ +#define __DNA_ACTION_TYPES_H__ #include "DNA_listBase.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 3be46538c22..817da3cd445 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_ACTUATOR_TYPES_H -#define DNA_ACTUATOR_TYPES_H +#ifndef __DNA_ACTUATOR_TYPES_H__ +#define __DNA_ACTUATOR_TYPES_H__ struct Object; struct Mesh; diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index 2233da86385..ae31bea4981 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -27,8 +27,8 @@ * \ingroup DNA */ -#ifndef DNA_ANIM_TYPES_H -#define DNA_ANIM_TYPES_H +#ifndef __DNA_ANIM_TYPES_H__ +#define __DNA_ANIM_TYPES_H__ #ifdef __cplusplus extern "C" { @@ -909,4 +909,4 @@ typedef struct IdAdtTemplate { }; #endif -#endif /* DNA_ANIM_TYPES_H */ +#endif /* __DNA_ANIM_TYPES_H__ */ diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index 33f965663de..f915b75a77f 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -27,8 +27,8 @@ * \ingroup DNA */ -#ifndef DNA_ARMATURE_TYPES_H -#define DNA_ARMATURE_TYPES_H +#ifndef __DNA_ARMATURE_TYPES_H__ +#define __DNA_ARMATURE_TYPES_H__ #include "DNA_listBase.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_boid_types.h b/source/blender/makesdna/DNA_boid_types.h index 53ff5179049..09221c4ada9 100644 --- a/source/blender/makesdna/DNA_boid_types.h +++ b/source/blender/makesdna/DNA_boid_types.h @@ -30,8 +30,8 @@ * \ingroup DNA */ -#ifndef DNA_BOID_TYPES_H -#define DNA_BOID_TYPES_H +#ifndef __DNA_BOID_TYPES_H__ +#define __DNA_BOID_TYPES_H__ #include "DNA_listBase.h" diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h index 690c3c95964..454008c73a7 100644 --- a/source/blender/makesdna/DNA_brush_types.h +++ b/source/blender/makesdna/DNA_brush_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_BRUSH_TYPES_H -#define DNA_BRUSH_TYPES_H +#ifndef __DNA_BRUSH_TYPES_H__ +#define __DNA_BRUSH_TYPES_H__ #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h index a46be730d6c..4618b99f6b6 100644 --- a/source/blender/makesdna/DNA_camera_types.h +++ b/source/blender/makesdna/DNA_camera_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_CAMERA_TYPES_H -#define DNA_CAMERA_TYPES_H +#ifndef __DNA_CAMERA_TYPES_H__ +#define __DNA_CAMERA_TYPES_H__ #include "DNA_defs.h" diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 1079f1db835..79a1d821543 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_CLOTH_TYPES_H -#define DNA_CLOTH_TYPES_H +#ifndef __DNA_CLOTH_TYPES_H__ +#define __DNA_CLOTH_TYPES_H__ /** * This struct contains all the global data required to run a simulation. diff --git a/source/blender/makesdna/DNA_color_types.h b/source/blender/makesdna/DNA_color_types.h index f5762f8b49f..676389ffeea 100644 --- a/source/blender/makesdna/DNA_color_types.h +++ b/source/blender/makesdna/DNA_color_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_COLOR_TYPES_H -#define DNA_COLOR_TYPES_H +#ifndef __DNA_COLOR_TYPES_H__ +#define __DNA_COLOR_TYPES_H__ #include "DNA_vec_types.h" diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index fdc493ddfd3..7a2d2929e47 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -30,8 +30,8 @@ * \ingroup DNA */ -#ifndef DNA_CONSTRAINT_TYPES_H -#define DNA_CONSTRAINT_TYPES_H +#ifndef __DNA_CONSTRAINT_TYPES_H__ +#define __DNA_CONSTRAINT_TYPES_H__ #include "DNA_defs.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_controller_types.h b/source/blender/makesdna/DNA_controller_types.h index 51ab29db7ae..bdfedb5b4d1 100644 --- a/source/blender/makesdna/DNA_controller_types.h +++ b/source/blender/makesdna/DNA_controller_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_CONTROLLER_TYPES_H -#define DNA_CONTROLLER_TYPES_H +#ifndef __DNA_CONTROLLER_TYPES_H__ +#define __DNA_CONTROLLER_TYPES_H__ struct bActuator; struct Text; diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 455738c840b..d5b9477f7f6 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_CURVE_TYPES_H -#define DNA_CURVE_TYPES_H +#ifndef __DNA_CURVE_TYPES_H__ +#define __DNA_CURVE_TYPES_H__ #include "DNA_defs.h" #include "DNA_listBase.h" diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index 3f0a6b13803..f7f40e99617 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_CUSTOMDATA_TYPES_H -#define DNA_CUSTOMDATA_TYPES_H +#ifndef __DNA_CUSTOMDATA_TYPES_H__ +#define __DNA_CUSTOMDATA_TYPES_H__ #ifdef __cplusplus extern "C" { diff --git a/source/blender/makesdna/DNA_defs.h b/source/blender/makesdna/DNA_defs.h index a5496e319e9..762e027f934 100644 --- a/source/blender/makesdna/DNA_defs.h +++ b/source/blender/makesdna/DNA_defs.h @@ -24,8 +24,8 @@ * \ingroup DNA */ -#ifndef DNA_DEFS_H -#define DNA_DEFS_H +#ifndef __DNA_DEFS_H__ +#define __DNA_DEFS_H__ /* makesdna ignores */ #ifdef DNA_DEPRECATED_ALLOW @@ -51,4 +51,4 @@ /* non-id name variables should use this length */ #define MAX_NAME 64 -#endif /* DNA_DEFS_H */ +#endif /* __DNA_DEFS_H__ */ diff --git a/source/blender/makesdna/DNA_dynamicpaint_types.h b/source/blender/makesdna/DNA_dynamicpaint_types.h index 2345b8dd1c0..fedc603fde2 100644 --- a/source/blender/makesdna/DNA_dynamicpaint_types.h +++ b/source/blender/makesdna/DNA_dynamicpaint_types.h @@ -25,8 +25,8 @@ * \ingroup DNA */ -#ifndef DNA_DYNAMICPAINT_TYPES_H -#define DNA_DYNAMICPAINT_TYPES_H +#ifndef __DNA_DYNAMICPAINT_TYPES_H__ +#define __DNA_DYNAMICPAINT_TYPES_H__ #include "DNA_listBase.h" struct CurveMapping; diff --git a/source/blender/makesdna/DNA_effect_types.h b/source/blender/makesdna/DNA_effect_types.h index ddff22aae37..7ca3bbe3319 100644 --- a/source/blender/makesdna/DNA_effect_types.h +++ b/source/blender/makesdna/DNA_effect_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_EFFECT_TYPES_H -#define DNA_EFFECT_TYPES_H +#ifndef __DNA_EFFECT_TYPES_H__ +#define __DNA_EFFECT_TYPES_H__ /* don't forget, new effects also in writefile.c for dna!!! */ diff --git a/source/blender/makesdna/DNA_fileglobal_types.h b/source/blender/makesdna/DNA_fileglobal_types.h index ed9f3cec987..0ae5c2465da 100644 --- a/source/blender/makesdna/DNA_fileglobal_types.h +++ b/source/blender/makesdna/DNA_fileglobal_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_FILEGLOBAL_TYPES_H -#define DNA_FILEGLOBAL_TYPES_H +#ifndef __DNA_FILEGLOBAL_TYPES_H__ +#define __DNA_FILEGLOBAL_TYPES_H__ struct bScreen; struct Scene; diff --git a/source/blender/makesdna/DNA_genfile.h b/source/blender/makesdna/DNA_genfile.h index 2264e82b363..d4cfccaef70 100644 --- a/source/blender/makesdna/DNA_genfile.h +++ b/source/blender/makesdna/DNA_genfile.h @@ -30,8 +30,8 @@ * \brief blenloader genfile private function prototypes */ -#ifndef DNA_GENFILE_H -#define DNA_GENFILE_H +#ifndef __DNA_GENFILE_H__ +#define __DNA_GENFILE_H__ struct SDNA; diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h index 71f0dbb60b1..6f3014c0961 100644 --- a/source/blender/makesdna/DNA_gpencil_types.h +++ b/source/blender/makesdna/DNA_gpencil_types.h @@ -27,8 +27,8 @@ * \ingroup DNA */ -#ifndef DNA_GPENCIL_TYPES_H -#define DNA_GPENCIL_TYPES_H +#ifndef __DNA_GPENCIL_TYPES_H__ +#define __DNA_GPENCIL_TYPES_H__ #include "DNA_listBase.h" #include "DNA_ID.h" @@ -160,4 +160,4 @@ typedef struct bGPdata { #define GP_DATA_DEPTH_STROKE_ENDPOINTS (1<<7) -#endif /* DNA_GPENCIL_TYPES_H */ +#endif /* __DNA_GPENCIL_TYPES_H__ */ diff --git a/source/blender/makesdna/DNA_group_types.h b/source/blender/makesdna/DNA_group_types.h index ab42086d6d0..8aa6de4fbe2 100644 --- a/source/blender/makesdna/DNA_group_types.h +++ b/source/blender/makesdna/DNA_group_types.h @@ -32,8 +32,8 @@ * \ingroup DNA */ -#ifndef DNA_GROUP_TYPES_H -#define DNA_GROUP_TYPES_H +#ifndef __DNA_GROUP_TYPES_H__ +#define __DNA_GROUP_TYPES_H__ #include "DNA_listBase.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h index 8f6cc5bf354..de2c9919df0 100644 --- a/source/blender/makesdna/DNA_image_types.h +++ b/source/blender/makesdna/DNA_image_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_IMAGE_TYPES_H -#define DNA_IMAGE_TYPES_H +#ifndef __DNA_IMAGE_TYPES_H__ +#define __DNA_IMAGE_TYPES_H__ #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h index 201ea8994ca..e3ab6b4a7db 100644 --- a/source/blender/makesdna/DNA_ipo_types.h +++ b/source/blender/makesdna/DNA_ipo_types.h @@ -33,8 +33,8 @@ * etc. are only still maintained to provide backwards compatibility for old files. */ -#ifndef DNA_IPO_TYPES_H -#define DNA_IPO_TYPES_H +#ifndef __DNA_IPO_TYPES_H__ +#define __DNA_IPO_TYPES_H__ #include "DNA_listBase.h" #include "DNA_curve_types.h" diff --git a/source/blender/makesdna/DNA_key_types.h b/source/blender/makesdna/DNA_key_types.h index f1e134dcb8c..f2840a3b9b7 100644 --- a/source/blender/makesdna/DNA_key_types.h +++ b/source/blender/makesdna/DNA_key_types.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DNA_KEY_TYPES_H -#define DNA_KEY_TYPES_H +#ifndef __DNA_KEY_TYPES_H__ +#define __DNA_KEY_TYPES_H__ /** \file DNA_key_types.h * \ingroup DNA diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h index 18fbde8a3c3..8cf3814ada1 100644 --- a/source/blender/makesdna/DNA_lamp_types.h +++ b/source/blender/makesdna/DNA_lamp_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_LAMP_TYPES_H -#define DNA_LAMP_TYPES_H +#ifndef __DNA_LAMP_TYPES_H__ +#define __DNA_LAMP_TYPES_H__ #include "DNA_defs.h" #include "DNA_ID.h" @@ -206,5 +206,5 @@ typedef struct Lamp { #define LAMAP_SHAD 2 -#endif /* DNA_LAMP_TYPES_H */ +#endif /* __DNA_LAMP_TYPES_H__ */ diff --git a/source/blender/makesdna/DNA_lattice_types.h b/source/blender/makesdna/DNA_lattice_types.h index 0a73ed5b24f..1b4bd53151b 100644 --- a/source/blender/makesdna/DNA_lattice_types.h +++ b/source/blender/makesdna/DNA_lattice_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_LATTICE_TYPES_H -#define DNA_LATTICE_TYPES_H +#ifndef __DNA_LATTICE_TYPES_H__ +#define __DNA_LATTICE_TYPES_H__ #include "DNA_defs.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_listBase.h b/source/blender/makesdna/DNA_listBase.h index 99ad6f41e96..d0e7a2f4433 100644 --- a/source/blender/makesdna/DNA_listBase.h +++ b/source/blender/makesdna/DNA_listBase.h @@ -33,8 +33,8 @@ * library system. */ -#ifndef DNA_LISTBASE_H -#define DNA_LISTBASE_H +#ifndef __DNA_LISTBASE_H__ +#define __DNA_LISTBASE_H__ #ifdef __cplusplus extern "C" { diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index eacc1b222e4..b58ae921200 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_MATERIAL_TYPES_H -#define DNA_MATERIAL_TYPES_H +#ifndef __DNA_MATERIAL_TYPES_H__ +#define __DNA_MATERIAL_TYPES_H__ #include "DNA_defs.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index 63b4b015611..056ae628c79 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_MESH_TYPES_H -#define DNA_MESH_TYPES_H +#ifndef __DNA_MESH_TYPES_H__ +#define __DNA_MESH_TYPES_H__ #include "DNA_defs.h" #include "DNA_listBase.h" diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index f21751ea33f..9f1dbcc1b86 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_MESHDATA_TYPES_H -#define DNA_MESHDATA_TYPES_H +#ifndef __DNA_MESHDATA_TYPES_H__ +#define __DNA_MESHDATA_TYPES_H__ #include "DNA_customdata_types.h" #include "DNA_listBase.h" diff --git a/source/blender/makesdna/DNA_meta_types.h b/source/blender/makesdna/DNA_meta_types.h index 863e2b2e6ed..9c20b8f644b 100644 --- a/source/blender/makesdna/DNA_meta_types.h +++ b/source/blender/makesdna/DNA_meta_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_META_TYPES_H -#define DNA_META_TYPES_H +#ifndef __DNA_META_TYPES_H__ +#define __DNA_META_TYPES_H__ #include "DNA_listBase.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index f3b14dc5744..98b4a0bd4f6 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -22,8 +22,8 @@ * \ingroup DNA */ -#ifndef DNA_MODIFIER_TYPES_H -#define DNA_MODIFIER_TYPES_H +#ifndef __DNA_MODIFIER_TYPES_H__ +#define __DNA_MODIFIER_TYPES_H__ #include "DNA_defs.h" #include "DNA_listBase.h" diff --git a/source/blender/makesdna/DNA_movieclip_types.h b/source/blender/makesdna/DNA_movieclip_types.h index 71029293d09..be189e883c7 100644 --- a/source/blender/makesdna/DNA_movieclip_types.h +++ b/source/blender/makesdna/DNA_movieclip_types.h @@ -32,8 +32,8 @@ * \author Sergey Sharybin */ -#ifndef DNA_MOVIECLIP_TYPES_H -#define DNA_MOVIECLIP_TYPES_H +#ifndef __DNA_MOVIECLIP_TYPES_H__ +#define __DNA_MOVIECLIP_TYPES_H__ #include "DNA_ID.h" #include "DNA_tracking_types.h" diff --git a/source/blender/makesdna/DNA_nla_types.h b/source/blender/makesdna/DNA_nla_types.h index a28097e8449..43b52ed65eb 100644 --- a/source/blender/makesdna/DNA_nla_types.h +++ b/source/blender/makesdna/DNA_nla_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_NLA_TYPES_H -#define DNA_NLA_TYPES_H +#ifndef __DNA_NLA_TYPES_H__ +#define __DNA_NLA_TYPES_H__ #include "DNA_listBase.h" diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 33ac75912fa..361aca4a572 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_NODE_TYPES_H -#define DNA_NODE_TYPES_H +#ifndef __DNA_NODE_TYPES_H__ +#define __DNA_NODE_TYPES_H__ #include "DNA_ID.h" #include "DNA_vec_types.h" diff --git a/source/blender/makesdna/DNA_object_fluidsim.h b/source/blender/makesdna/DNA_object_fluidsim.h index 0651f076096..751d420daa7 100644 --- a/source/blender/makesdna/DNA_object_fluidsim.h +++ b/source/blender/makesdna/DNA_object_fluidsim.h @@ -31,8 +31,8 @@ * \ingroup DNA */ -#ifndef DNA_OBJECT_FLUIDSIM_H -#define DNA_OBJECT_FLUIDSIM_H +#ifndef __DNA_OBJECT_FLUIDSIM_H__ +#define __DNA_OBJECT_FLUIDSIM_H__ #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h index 70aeaaacd44..6603288912b 100644 --- a/source/blender/makesdna/DNA_object_force.h +++ b/source/blender/makesdna/DNA_object_force.h @@ -31,8 +31,8 @@ * \ingroup DNA */ -#ifndef DNA_OBJECT_FORCE_H -#define DNA_OBJECT_FORCE_H +#ifndef __DNA_OBJECT_FORCE_H__ +#define __DNA_OBJECT_FORCE_H__ #ifdef __cplusplus extern "C" { diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index b8580b47269..7d3662c7ffb 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -30,8 +30,8 @@ * \brief Object is a sort of wrapper for general info. */ -#ifndef DNA_OBJECT_TYPES_H -#define DNA_OBJECT_TYPES_H +#ifndef __DNA_OBJECT_TYPES_H__ +#define __DNA_OBJECT_TYPES_H__ #include "DNA_defs.h" #include "DNA_listBase.h" diff --git a/source/blender/makesdna/DNA_outliner_types.h b/source/blender/makesdna/DNA_outliner_types.h index ee3903c3b40..17124a724fe 100644 --- a/source/blender/makesdna/DNA_outliner_types.h +++ b/source/blender/makesdna/DNA_outliner_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_OUTLINER_TYPES_H -#define DNA_OUTLINER_TYPES_H +#ifndef __DNA_OUTLINER_TYPES_H__ +#define __DNA_OUTLINER_TYPES_H__ #include "DNA_listBase.h" diff --git a/source/blender/makesdna/DNA_packedFile_types.h b/source/blender/makesdna/DNA_packedFile_types.h index 91134c2c575..339ac0f8c0d 100644 --- a/source/blender/makesdna/DNA_packedFile_types.h +++ b/source/blender/makesdna/DNA_packedFile_types.h @@ -31,8 +31,8 @@ * \since 12-oct-2000 nzc */ -#ifndef DNA_PACKEDFILE_TYPES_H -#define DNA_PACKEDFILE_TYPES_H +#ifndef __DNA_PACKEDFILE_TYPES_H__ +#define __DNA_PACKEDFILE_TYPES_H__ typedef struct PackedFile { int size; diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index 4c3279c6527..220ee69b442 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_PARTICLE_TYPES_H -#define DNA_PARTICLE_TYPES_H +#ifndef __DNA_PARTICLE_TYPES_H__ +#define __DNA_PARTICLE_TYPES_H__ #include "DNA_defs.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_property_types.h b/source/blender/makesdna/DNA_property_types.h index a36e362632b..55fa50e3f63 100644 --- a/source/blender/makesdna/DNA_property_types.h +++ b/source/blender/makesdna/DNA_property_types.h @@ -36,8 +36,8 @@ * hierarchy here is a bit strange, and not desirable. */ -#ifndef DNA_PROPERTY_TYPES_H -#define DNA_PROPERTY_TYPES_H +#ifndef __DNA_PROPERTY_TYPES_H__ +#define __DNA_PROPERTY_TYPES_H__ /* ********************* PROPERTY ************************ */ diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 1f42118dbc0..79d561fd2ea 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_SCENE_TYPES_H -#define DNA_SCENE_TYPES_H +#ifndef __DNA_SCENE_TYPES_H__ +#define __DNA_SCENE_TYPES_H__ #include "DNA_defs.h" diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index 504c8da7612..75d9b91e9c8 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -27,8 +27,8 @@ * \ingroup DNA */ -#ifndef DNA_SCREEN_TYPES_H -#define DNA_SCREEN_TYPES_H +#ifndef __DNA_SCREEN_TYPES_H__ +#define __DNA_SCREEN_TYPES_H__ #include "DNA_listBase.h" #include "DNA_view2d_types.h" diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h index 462ff8ce045..97b65235a29 100644 --- a/source/blender/makesdna/DNA_sdna_types.h +++ b/source/blender/makesdna/DNA_sdna_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_SDNA_H -#define DNA_SDNA_H +#ifndef __DNA_SDNA_TYPES_H__ +#define __DNA_SDNA_TYPES_H__ # # diff --git a/source/blender/makesdna/DNA_sensor_types.h b/source/blender/makesdna/DNA_sensor_types.h index 80f19b30079..05927e3a486 100644 --- a/source/blender/makesdna/DNA_sensor_types.h +++ b/source/blender/makesdna/DNA_sensor_types.h @@ -31,8 +31,8 @@ * \author nzc */ -#ifndef DNA_SENSOR_TYPES_H -#define DNA_SENSOR_TYPES_H +#ifndef __DNA_SENSOR_TYPES_H__ +#define __DNA_SENSOR_TYPES_H__ struct Object; struct Material; diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index 20399e541d7..cff4e539e6e 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -30,8 +30,8 @@ * \author nzc */ -#ifndef DNA_SEQUENCE_TYPES_H -#define DNA_SEQUENCE_TYPES_H +#ifndef __DNA_SEQUENCE_TYPES_H__ +#define __DNA_SEQUENCE_TYPES_H__ #include "DNA_defs.h" #include "DNA_listBase.h" diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h index 753f1374774..894e1135c0d 100644 --- a/source/blender/makesdna/DNA_smoke_types.h +++ b/source/blender/makesdna/DNA_smoke_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_SMOKE_TYPES_H -#define DNA_SMOKE_TYPES_H +#ifndef __DNA_SMOKE_TYPES_H__ +#define __DNA_SMOKE_TYPES_H__ /* flags */ #define MOD_SMOKE_HIGHRES (1<<1) /* enable high resolution */ diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h index 1dab9effa9e..1fab63f9d63 100644 --- a/source/blender/makesdna/DNA_sound_types.h +++ b/source/blender/makesdna/DNA_sound_types.h @@ -30,8 +30,8 @@ * \author nzc */ -#ifndef DNA_SOUND_TYPES_H -#define DNA_SOUND_TYPES_H +#ifndef __DNA_SOUND_TYPES_H__ +#define __DNA_SOUND_TYPES_H__ #include "DNA_listBase.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 64d858bbcee..ed724ae5807 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -30,8 +30,8 @@ * \author nzc */ -#ifndef DNA_SPACE_TYPES_H -#define DNA_SPACE_TYPES_H +#ifndef __DNA_SPACE_TYPES_H__ +#define __DNA_SPACE_TYPES_H__ #include "DNA_defs.h" #include "DNA_listBase.h" diff --git a/source/blender/makesdna/DNA_speaker_types.h b/source/blender/makesdna/DNA_speaker_types.h index 2e8227f4f92..8ad987818ae 100644 --- a/source/blender/makesdna/DNA_speaker_types.h +++ b/source/blender/makesdna/DNA_speaker_types.h @@ -24,8 +24,8 @@ * \ingroup DNA */ -#ifndef DNA_SPEAKER_TYPES_H -#define DNA_SPEAKER_TYPES_H +#ifndef __DNA_SPEAKER_TYPES_H__ +#define __DNA_SPEAKER_TYPES_H__ #include "DNA_ID.h" @@ -64,5 +64,5 @@ typedef struct Speaker { #define SPK_MUTED (1<<1) #define SPK_RELATIVE (1<<2) -#endif /* DNA_SPEAKER_TYPES_H */ +#endif /* __DNA_SPEAKER_TYPES_H__ */ diff --git a/source/blender/makesdna/DNA_text_types.h b/source/blender/makesdna/DNA_text_types.h index 67f3c5288f6..cf26dae402d 100644 --- a/source/blender/makesdna/DNA_text_types.h +++ b/source/blender/makesdna/DNA_text_types.h @@ -30,8 +30,8 @@ * \author nzc */ -#ifndef DNA_TEXT_TYPES_H -#define DNA_TEXT_TYPES_H +#ifndef __DNA_TEXT_TYPES_H__ +#define __DNA_TEXT_TYPES_H__ #include "DNA_listBase.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h index de844fd2d7f..c6ffec2aff7 100644 --- a/source/blender/makesdna/DNA_texture_types.h +++ b/source/blender/makesdna/DNA_texture_types.h @@ -31,8 +31,8 @@ * \author nzc */ -#ifndef DNA_TEXTURE_TYPES_H -#define DNA_TEXTURE_TYPES_H +#ifndef __DNA_TEXTURE_TYPES_H__ +#define __DNA_TEXTURE_TYPES_H__ #include "DNA_defs.h" #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_tracking_types.h b/source/blender/makesdna/DNA_tracking_types.h index e81344d7d51..03e731cf765 100644 --- a/source/blender/makesdna/DNA_tracking_types.h +++ b/source/blender/makesdna/DNA_tracking_types.h @@ -32,8 +32,8 @@ * \author Sergey Sharybin */ -#ifndef DNA_TRACKING_TYPES_H -#define DNA_TRACKING_TYPES_H +#ifndef __DNA_TRACKING_TYPES_H__ +#define __DNA_TRACKING_TYPES_H__ #include "DNA_listBase.h" diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 405e1e33720..d64c3133001 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -31,8 +31,8 @@ * \author nzc */ -#ifndef DNA_USERDEF_TYPES_H -#define DNA_USERDEF_TYPES_H +#ifndef __DNA_USERDEF_TYPES_H__ +#define __DNA_USERDEF_TYPES_H__ #include "DNA_listBase.h" #include "DNA_texture_types.h" /* ColorBand */ diff --git a/source/blender/makesdna/DNA_vec_types.h b/source/blender/makesdna/DNA_vec_types.h index 2ac0614aad9..1420ca48c22 100644 --- a/source/blender/makesdna/DNA_vec_types.h +++ b/source/blender/makesdna/DNA_vec_types.h @@ -32,8 +32,8 @@ * \author nzc */ -#ifndef DNA_VEC_TYPES_H -#define DNA_VEC_TYPES_H +#ifndef __DNA_VEC_TYPES_H__ +#define __DNA_VEC_TYPES_H__ /* types */ diff --git a/source/blender/makesdna/DNA_vfont_types.h b/source/blender/makesdna/DNA_vfont_types.h index d6168af6028..299a6540f40 100644 --- a/source/blender/makesdna/DNA_vfont_types.h +++ b/source/blender/makesdna/DNA_vfont_types.h @@ -31,8 +31,8 @@ * \author nzc */ -#ifndef DNA_VFONT_TYPES_H -#define DNA_VFONT_TYPES_H +#ifndef __DNA_VFONT_TYPES_H__ +#define __DNA_VFONT_TYPES_H__ #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h index 0581cad4170..9c4abfbfdef 100644 --- a/source/blender/makesdna/DNA_view2d_types.h +++ b/source/blender/makesdna/DNA_view2d_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_VIEW2D_TYPES_H -#define DNA_VIEW2D_TYPES_H +#ifndef __DNA_VIEW2D_TYPES_H__ +#define __DNA_VIEW2D_TYPES_H__ #include "DNA_vec_types.h" diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 58c3f091d6d..0758e6e1713 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_VIEW3D_TYPES_H -#define DNA_VIEW3D_TYPES_H +#ifndef __DNA_VIEW3D_TYPES_H__ +#define __DNA_VIEW3D_TYPES_H__ struct ViewDepths; struct Object; diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 156d2ebbb20..3e6c46ba8b1 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -28,8 +28,8 @@ * \ingroup DNA */ -#ifndef DNA_WINDOWMANAGER_TYPES_H -#define DNA_WINDOWMANAGER_TYPES_H +#ifndef __DNA_WINDOWMANAGER_TYPES_H__ +#define __DNA_WINDOWMANAGER_TYPES_H__ #include "DNA_listBase.h" #include "DNA_vec_types.h" @@ -338,4 +338,4 @@ typedef struct wmOperator { /* wmOperator flag */ #define OP_GRAB_POINTER 1 -#endif /* DNA_WINDOWMANAGER_TYPES_H */ +#endif /* __DNA_WINDOWMANAGER_TYPES_H__ */ diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h index a04ea89a291..5482566ac41 100644 --- a/source/blender/makesdna/DNA_world_types.h +++ b/source/blender/makesdna/DNA_world_types.h @@ -29,8 +29,8 @@ * \ingroup DNA */ -#ifndef DNA_WORLD_TYPES_H -#define DNA_WORLD_TYPES_H +#ifndef __DNA_WORLD_TYPES_H__ +#define __DNA_WORLD_TYPES_H__ #include "DNA_defs.h" #include "DNA_ID.h" diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index 60e53ce7ea2..1aecbc223b5 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -20,8 +20,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef RNA_ACCESS_H -#define RNA_ACCESS_H +#ifndef __RNA_ACCESS_H__ +#define __RNA_ACCESS_H__ /** \file RNA_access.h * \ingroup RNA @@ -1022,4 +1022,4 @@ __attribute__ ((format (printf, 1, 2))) } #endif -#endif /* RNA_ACCESS_H */ +#endif /* __RNA_ACCESS_H__ */ diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h index 4fb08227fb6..95f988b470b 100644 --- a/source/blender/makesrna/RNA_define.h +++ b/source/blender/makesrna/RNA_define.h @@ -20,8 +20,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef RNA_DEFINE_H -#define RNA_DEFINE_H +#ifndef __RNA_DEFINE_H__ +#define __RNA_DEFINE_H__ /** \file RNA_define.h * \ingroup RNA @@ -218,5 +218,5 @@ const char *RNA_property_typename(PropertyType type); } #endif -#endif /* RNA_DEFINE_H */ +#endif /* __RNA_DEFINE_H__ */ diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h index 72917600d05..a333d9ace12 100644 --- a/source/blender/makesrna/RNA_enum_types.h +++ b/source/blender/makesrna/RNA_enum_types.h @@ -20,8 +20,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef RNA_ENUM_TYPES_H -#define RNA_ENUM_TYPES_H +#ifndef __RNA_ENUM_TYPES_H__ +#define __RNA_ENUM_TYPES_H__ /** \file RNA_enum_types.h * \ingroup RNA @@ -137,4 +137,4 @@ EnumPropertyItem *RNA_image_local_itemf(struct bContext *C, struct PointerRNA *p EnumPropertyItem *RNA_scene_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, int *free); EnumPropertyItem *RNA_scene_local_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, int *free); -#endif /* RNA_ENUM_TYPES_H */ +#endif /* __RNA_ENUM_TYPES_H__ */ diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h index 85869115e79..ee9c6b26e2f 100644 --- a/source/blender/makesrna/RNA_types.h +++ b/source/blender/makesrna/RNA_types.h @@ -27,8 +27,8 @@ #include "BLO_sys_types.h" -#ifndef RNA_TYPES_H -#define RNA_TYPES_H +#ifndef __RNA_TYPES_H__ +#define __RNA_TYPES_H__ #ifdef __cplusplus extern "C" { @@ -371,4 +371,4 @@ typedef struct ExtensionRNA { } #endif -#endif /* RNA_TYPES_H */ +#endif /* __RNA_TYPES_H__ */ diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 5339ee58acf..0df8a625caf 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -475,7 +475,7 @@ static const char *rna_ensure_property_description(PropertyRNA *prop) } #ifdef WITH_INTERNATIONAL - if(description && (U.transopts&USER_DOTRANSLATE) && (U.transopts&USER_TR_TOOLTIPS)) + if(description && BLF_translate_tooltips()) description= BLF_gettext(description); #endif @@ -492,7 +492,7 @@ static const char *rna_ensure_property_name(PropertyRNA *prop) name= ((IDProperty*)prop)->name; #ifdef WITH_INTERNATIONAL - if((U.transopts&USER_DOTRANSLATE) && (U.transopts&USER_TR_IFACE)) { + if(BLF_translate_iface()) { if(prop->translation_context) name = BLF_pgettext(prop->translation_context, name); else @@ -1182,7 +1182,7 @@ void RNA_property_enum_items_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA RNA_property_enum_items(C, ptr, prop, item, totitem, free); #ifdef WITH_INTERNATIONAL - if((U.transopts&USER_DOTRANSLATE) && (U.transopts&USER_TR_IFACE)) { + if(BLF_translate_iface()) { int i; EnumPropertyItem *nitem; diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h index e9f8ecd1ef2..6d902ba037a 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -25,8 +25,8 @@ */ -#ifndef RNA_INTERNAL_H -#define RNA_INTERNAL_H +#ifndef __RNA_INTERNAL_H__ +#define __RNA_INTERNAL_H__ #include "UI_resources.h" @@ -387,6 +387,6 @@ void rna_mtex_texture_slots_clear(struct ID *self, struct bContext *C, struct Re int rna_IDMaterials_assign_int(struct PointerRNA *ptr, int key, const struct PointerRNA *assign_ptr); -#endif /* RNA_INTERNAL_H */ +#endif /* __RNA_INTERNAL_H__ */ diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h index 40157d390bc..997f9d084c5 100644 --- a/source/blender/makesrna/intern/rna_internal_types.h +++ b/source/blender/makesrna/intern/rna_internal_types.h @@ -25,8 +25,8 @@ */ -#ifndef RNA_INTERNAL_TYPES_H -#define RNA_INTERNAL_TYPES_H +#ifndef __RNA_INTERNAL_TYPES_H__ +#define __RNA_INTERNAL_TYPES_H__ #include "DNA_listBase.h" @@ -358,4 +358,4 @@ struct BlenderRNA { #define CONTAINER_RNA_ID(cont) (*(const char **)(((ContainerRNA *)(cont))+1)) -#endif /* RNA_INTERNAL_TYPES_H */ +#endif /* __RNA_INTERNAL_TYPES_H__ */ diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h index 2284b09e941..745a956d831 100644 --- a/source/blender/makesrna/intern/rna_nodetree_types.h +++ b/source/blender/makesrna/intern/rna_nodetree_types.h @@ -24,6 +24,7 @@ * \ingroup RNA */ +/* intentionally no include guard */ /* Empty definitions for undefined macros to avoid warnings */ #ifndef DefNode diff --git a/source/blender/modifiers/MOD_modifiertypes.h b/source/blender/modifiers/MOD_modifiertypes.h index 11013f6a36e..ba2ec56d76a 100644 --- a/source/blender/modifiers/MOD_modifiertypes.h +++ b/source/blender/modifiers/MOD_modifiertypes.h @@ -24,8 +24,8 @@ * \ingroup modifiers */ -#ifndef MOD_MODIFIERTYPES_H -#define MOD_MODIFIERTYPES_H +#ifndef __MOD_MODIFIERTYPES_H__ +#define __MOD_MODIFIERTYPES_H__ #include "BKE_modifier.h" @@ -79,4 +79,4 @@ extern ModifierTypeInfo modifierType_NgonInterp; /* MOD_util.c */ void modifier_type_init(ModifierTypeInfo *types[]); -#endif //MOD_MODIFIERTYPES_H +#endif //__MOD_MODIFIERTYPES_H__ diff --git a/source/blender/modifiers/intern/MOD_boolean_util.h b/source/blender/modifiers/intern/MOD_boolean_util.h index dcd5460c7c3..8e3617cf74e 100644 --- a/source/blender/modifiers/intern/MOD_boolean_util.h +++ b/source/blender/modifiers/intern/MOD_boolean_util.h @@ -30,8 +30,8 @@ */ -#ifndef MOD_BOOLEAN_UTILS_H -#define MOD_BOOLEAN_UTILS_H +#ifndef __MOD_BOOLEAN_UTIL_H__ +#define __MOD_BOOLEAN_UTIL_H__ struct Scene; struct Object; diff --git a/source/blender/modifiers/intern/MOD_fluidsim_util.h b/source/blender/modifiers/intern/MOD_fluidsim_util.h index 2c22f37bcbe..334826e618b 100644 --- a/source/blender/modifiers/intern/MOD_fluidsim_util.h +++ b/source/blender/modifiers/intern/MOD_fluidsim_util.h @@ -30,8 +30,8 @@ */ -#ifndef MOD_FLUIDSIM_UTIL_H -#define MOD_FLUIDSIM_UTIL_H +#ifndef __MOD_FLUIDSIM_UTIL_H__ +#define __MOD_FLUIDSIM_UTIL_H__ struct Object; struct Scene; diff --git a/source/blender/modifiers/intern/MOD_util.h b/source/blender/modifiers/intern/MOD_util.h index f1f6252c255..623fe996668 100644 --- a/source/blender/modifiers/intern/MOD_util.h +++ b/source/blender/modifiers/intern/MOD_util.h @@ -25,8 +25,8 @@ */ -#ifndef MOD_UTIL_H -#define MOD_UTIL_H +#ifndef __MOD_UTIL_H__ +#define __MOD_UTIL_H__ /* so modifier types match their defines */ #include "MOD_modifiertypes.h" @@ -48,4 +48,4 @@ struct DerivedMesh *get_cddm(struct Object *ob, struct BMEditMesh *em, struct De struct DerivedMesh *get_dm(struct Object *ob, struct BMEditMesh *em, struct DerivedMesh *dm, float (*vertexCos)[3], int orco); void modifier_get_vgroup(struct Object *ob, struct DerivedMesh *dm, const char *name, struct MDeformVert **dvert, int *defgrp_index); -#endif /* MOD_UTIL_H */ +#endif /* __MOD_UTIL_H__ */ diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.h b/source/blender/modifiers/intern/MOD_weightvg_util.h index 5ae1e991073..5572628fd3f 100644 --- a/source/blender/modifiers/intern/MOD_weightvg_util.h +++ b/source/blender/modifiers/intern/MOD_weightvg_util.h @@ -29,8 +29,8 @@ */ -#ifndef MOD_WEIGHTVG_UTIL_H -#define MOD_WEIGHTVG_UTIL_H +#ifndef __MOD_WEIGHTVG_UTIL_H__ +#define __MOD_WEIGHTVG_UTIL_H__ /* so modifier types match their defines */ #include "MOD_modifiertypes.h" @@ -85,4 +85,4 @@ void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, MDeformWeight **dws, const int *indices, const float *weights, int do_add, float add_thresh, int do_rem, float rem_thresh); -#endif /* MOD_WEIGHTVG_UTIL_H */ +#endif /* __MOD_WEIGHTVG_UTIL_H__ */ diff --git a/source/blender/nodes/NOD_composite.h b/source/blender/nodes/NOD_composite.h index 77745a19934..284b89bc095 100644 --- a/source/blender/nodes/NOD_composite.h +++ b/source/blender/nodes/NOD_composite.h @@ -29,8 +29,8 @@ * \ingroup nodes */ -#ifndef NOD_composite_H -#define NOD_composite_H +#ifndef __NOD_COMPOSITE_H__ +#define __NOD_COMPOSITE_H__ #include "BKE_node.h" diff --git a/source/blender/nodes/NOD_shader.h b/source/blender/nodes/NOD_shader.h index 63fc0f4232c..d2b3a61971b 100644 --- a/source/blender/nodes/NOD_shader.h +++ b/source/blender/nodes/NOD_shader.h @@ -29,8 +29,8 @@ * \ingroup nodes */ -#ifndef NOD_SHADER_H -#define NOD_SHADER_H +#ifndef __NOD_SHADER_H__ +#define __NOD_SHADER_H__ #include "BKE_node.h" diff --git a/source/blender/nodes/NOD_socket.h b/source/blender/nodes/NOD_socket.h index fb3946bae6c..f41be2bb7d9 100644 --- a/source/blender/nodes/NOD_socket.h +++ b/source/blender/nodes/NOD_socket.h @@ -30,8 +30,8 @@ */ -#ifndef NOD_SOCKET_H_ -#define NOD_SOCKET_H_ +#ifndef __NOD_SOCKET_H__ +#define __NOD_SOCKET_H__ #include "DNA_listBase.h" diff --git a/source/blender/nodes/NOD_texture.h b/source/blender/nodes/NOD_texture.h index cb727ef071a..7722580d136 100644 --- a/source/blender/nodes/NOD_texture.h +++ b/source/blender/nodes/NOD_texture.h @@ -29,8 +29,8 @@ * \ingroup nodes */ -#ifndef NOD_TEXTURE_H -#define NOD_TEXTURE_H +#ifndef __NOD_TEXTURE_H__ +#define __NOD_TEXTURE_H__ #include "BKE_node.h" diff --git a/source/blender/nodes/composite/node_composite_util.h b/source/blender/nodes/composite/node_composite_util.h index 02487933849..5e63750e131 100644 --- a/source/blender/nodes/composite/node_composite_util.h +++ b/source/blender/nodes/composite/node_composite_util.h @@ -30,8 +30,8 @@ */ -#ifndef NODE_COMPOSITE_UTIL_H_ -#define NODE_COMPOSITE_UTIL_H_ +#ifndef __NODE_COMPOSITE_UTIL_H__ +#define __NODE_COMPOSITE_UTIL_H__ #include #include diff --git a/source/blender/nodes/intern/node_common.h b/source/blender/nodes/intern/node_common.h index ee523120d02..616221d6658 100644 --- a/source/blender/nodes/intern/node_common.h +++ b/source/blender/nodes/intern/node_common.h @@ -30,8 +30,8 @@ */ -#ifndef NODE_COMMON_H_ -#define NODE_COMMON_H_ +#ifndef __NODE_COMMON_H__ +#define __NODE_COMMON_H__ #include "DNA_listBase.h" diff --git a/source/blender/nodes/intern/node_exec.h b/source/blender/nodes/intern/node_exec.h index fe1bb0b6eb6..1003206e96a 100644 --- a/source/blender/nodes/intern/node_exec.h +++ b/source/blender/nodes/intern/node_exec.h @@ -30,8 +30,8 @@ */ -#ifndef NODE_EXEC_H_ -#define NODE_EXEC_H_ +#ifndef __NODE_EXEC_H__ +#define __NODE_EXEC_H__ #include "DNA_listBase.h" diff --git a/source/blender/nodes/intern/node_util.h b/source/blender/nodes/intern/node_util.h index 7ca090394c3..4a5e8765ba2 100644 --- a/source/blender/nodes/intern/node_util.h +++ b/source/blender/nodes/intern/node_util.h @@ -30,8 +30,8 @@ */ -#ifndef NODE_UTIL_H_ -#define NODE_UTIL_H_ +#ifndef __NODE_UTIL_H__ +#define __NODE_UTIL_H__ #include "DNA_listBase.h" diff --git a/source/blender/nodes/shader/node_shader_util.h b/source/blender/nodes/shader/node_shader_util.h index d345f3fb310..76d3d933fdb 100644 --- a/source/blender/nodes/shader/node_shader_util.h +++ b/source/blender/nodes/shader/node_shader_util.h @@ -30,8 +30,8 @@ */ -#ifndef NODE_SHADER_UTIL_H_ -#define NODE_SHADER_UTIL_H_ +#ifndef __NODE_SHADER_UTIL_H__ +#define __NODE_SHADER_UTIL_H__ #include #include diff --git a/source/blender/nodes/texture/node_texture_util.h b/source/blender/nodes/texture/node_texture_util.h index 5095a9799e4..a0b219804b9 100644 --- a/source/blender/nodes/texture/node_texture_util.h +++ b/source/blender/nodes/texture/node_texture_util.h @@ -30,8 +30,8 @@ */ -#ifndef NODE_TEXTURE_UTIL_H_ -#define NODE_TEXTURE_UTIL_H_ +#ifndef __NODE_TEXTURE_UTIL_H__ +#define __NODE_TEXTURE_UTIL_H__ #include #include diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h index 51f9063c289..33ea139b474 100644 --- a/source/blender/python/BPY_extern.h +++ b/source/blender/python/BPY_extern.h @@ -34,8 +34,8 @@ -#ifndef BPY_EXTERN_H -#define BPY_EXTERN_H +#ifndef __BPY_EXTERN_H__ +#define __BPY_EXTERN_H__ struct Text; /* defined in DNA_text_types.h */ struct ID; /* DNA_ID.h */ @@ -89,4 +89,4 @@ void BPY_id_release(struct ID *id); } /* extern "C" */ #endif -#endif /* BPY_EXTERN_H */ +#endif /* __BPY_EXTERN_H__ */ diff --git a/source/blender/python/generic/bgl.h b/source/blender/python/generic/bgl.h index 2e02900d69f..e23f4c2e86d 100644 --- a/source/blender/python/generic/bgl.h +++ b/source/blender/python/generic/bgl.h @@ -36,8 +36,8 @@ * writers to make OpenGL calls in their Python scripts for Blender. The * more important original comments are marked with an @ symbol. */ -#ifndef BGL_H -#define BGL_H +#ifndef __BGL_H__ +#define __BGL_H__ PyObject *BPyInit_bgl(void); @@ -339,4 +339,4 @@ extern PyTypeObject BGL_bufferType; return NULL; \ } \ -#endif /* BGL_H */ +#endif /* __BGL_H__ */ diff --git a/source/blender/python/generic/bpy_internal_import.h b/source/blender/python/generic/bpy_internal_import.h index 2ce644715e9..8b41a575d96 100644 --- a/source/blender/python/generic/bpy_internal_import.h +++ b/source/blender/python/generic/bpy_internal_import.h @@ -32,8 +32,8 @@ /* Note, the BGE needs to use this too, keep it minimal */ -#ifndef BPY_INTERNAL_IMPORT_H -#define BPY_INTERNAL_IMPORT_H +#ifndef __BPY_INTERNAL_IMPORT_H__ +#define __BPY_INTERNAL_IMPORT_H__ /* python redefines :/ */ #ifdef _POSIX_C_SOURCE @@ -62,4 +62,4 @@ extern PyMethodDef bpy_reload_meth; struct Main *bpy_import_main_get(void); void bpy_import_main_set(struct Main *maggie); -#endif /* BPY_INTERNAL_IMPORT_H */ +#endif /* __BPY_INTERNAL_IMPORT_H__ */ diff --git a/source/blender/python/generic/idprop_py_api.h b/source/blender/python/generic/idprop_py_api.h index 599ba8e1db6..f053f212a23 100644 --- a/source/blender/python/generic/idprop_py_api.h +++ b/source/blender/python/generic/idprop_py_api.h @@ -25,8 +25,8 @@ */ -#ifndef PY_IDPROP_API_H -#define PY_IDPROP_API_H +#ifndef __IDPROP_PY_API_H__ +#define __IDPROP_PY_API_H__ struct ID; struct IDProperty; @@ -67,4 +67,4 @@ void IDProp_Init_Types(void); #define IDPROP_ITER_KEYS 0 #define IDPROP_ITER_ITEMS 1 -#endif /* PY_IDPROP_API_H */ +#endif /* __IDPROP_PY_API_H__ */ diff --git a/source/blender/python/generic/py_capi_utils.h b/source/blender/python/generic/py_capi_utils.h index 2cab464a9d7..a71a2821c9a 100644 --- a/source/blender/python/generic/py_capi_utils.h +++ b/source/blender/python/generic/py_capi_utils.h @@ -25,8 +25,8 @@ */ -#ifndef PY_CAPI_UTILS_H -#define PY_CAPI_UTILS_H +#ifndef __PY_CAPI_UTILS_H__ +#define __PY_CAPI_UTILS_H__ void PyC_ObSpit(const char *name, PyObject *var); void PyC_LineSpit(void); @@ -54,4 +54,4 @@ void PyC_SetHomePath(const char *py_path_bundle); #define PYC_INTERPRETER_ACTIVE (((PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current)) != NULL) -#endif // PY_CAPI_UTILS_H +#endif // __PY_CAPI_UTILS_H__ diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c index ea95c4ebd85..0641c220001 100644 --- a/source/blender/python/intern/bpy_app.c +++ b/source/blender/python/intern/bpy_app.c @@ -94,9 +94,6 @@ static PyStructSequence_Desc app_info_desc = { (sizeof(app_info_fields) / sizeof(PyStructSequence_Field)) - 1 }; -#define DO_EXPAND(VAL) VAL ## 1 -#define EXPAND(VAL) DO_EXPAND(VAL) - static PyObject *make_app_info(void) { PyObject *app_info; @@ -119,11 +116,7 @@ static PyObject *make_app_info(void) SetObjItem(PyUnicode_FromFormat("%d.%02d (sub %d)", BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_SUBVERSION)); -#if defined(BLENDER_VERSION_CHAR) && EXPAND(BLENDER_VERSION_CHAR) != 1 SetStrItem(STRINGIFY(BLENDER_VERSION_CHAR)); -#else - SetStrItem(""); -#endif SetStrItem(STRINGIFY(BLENDER_VERSION_CYCLE)); SetStrItem(BLI_program_path()); SetObjItem(PyBool_FromLong(G.background)); diff --git a/source/blender/python/intern/bpy_app.h b/source/blender/python/intern/bpy_app.h index 0aa3b1f4e42..5bf36f04ba0 100644 --- a/source/blender/python/intern/bpy_app.h +++ b/source/blender/python/intern/bpy_app.h @@ -24,9 +24,9 @@ * \ingroup pythonintern */ -#ifndef BPY_APP_H -#define BPY_APP_H +#ifndef __BPY_APP_H__ +#define __BPY_APP_H__ PyObject *BPY_app_struct(void); -#endif // BPY_APP_H +#endif // __BPY_APP_H__ diff --git a/source/blender/python/intern/bpy_app_ffmpeg.h b/source/blender/python/intern/bpy_app_ffmpeg.h index 4ed89cd7902..cadbb021d31 100644 --- a/source/blender/python/intern/bpy_app_ffmpeg.h +++ b/source/blender/python/intern/bpy_app_ffmpeg.h @@ -24,9 +24,9 @@ * \ingroup pythonintern */ -#ifndef BPY_APP_FFMPEG_H -#define BPY_APP_FFMPEG_H +#ifndef __BPY_APP_FFMPEG_H__ +#define __BPY_APP_FFMPEG_H__ PyObject *BPY_app_ffmpeg_struct(void); -#endif // BPY_APP_FFMPEG_H +#endif // __BPY_APP_FFMPEG_H__ diff --git a/source/blender/python/intern/bpy_app_handlers.h b/source/blender/python/intern/bpy_app_handlers.h index 873282bde79..6883e05859d 100644 --- a/source/blender/python/intern/bpy_app_handlers.h +++ b/source/blender/python/intern/bpy_app_handlers.h @@ -24,10 +24,10 @@ * \ingroup pythonintern */ -#ifndef BPY_APP_HANDLERS_H -#define BPY_APP_HANDLERS_H +#ifndef __BPY_APP_HANDLERS_H__ +#define __BPY_APP_HANDLERS_H__ PyObject *BPY_app_handlers_struct(void); void BPY_app_handlers_clear(void); -#endif // BPY_APP_HANDLERS_H +#endif // __BPY_APP_HANDLERS_H__ diff --git a/source/blender/python/intern/bpy_driver.h b/source/blender/python/intern/bpy_driver.h index 802a3649e20..6d1696d6cdc 100644 --- a/source/blender/python/intern/bpy_driver.h +++ b/source/blender/python/intern/bpy_driver.h @@ -24,8 +24,8 @@ * \ingroup pythonintern */ -#ifndef BPY_DRIVER_H -#define BPY_DRIVER_H +#ifndef __BPY_DRIVER_H__ +#define __BPY_DRIVER_H__ struct ChannelDriver; @@ -36,4 +36,4 @@ extern PyObject *bpy_pydriver_Dict; float BPY_driver_exec(struct ChannelDriver *driver, const float evaltime); void BPY_driver_reset(void); -#endif // BPY_DRIVER_H +#endif // __BPY_DRIVER_H__ diff --git a/source/blender/python/intern/bpy_operator.h b/source/blender/python/intern/bpy_operator.h index cf67f2a029d..68ea9423edd 100644 --- a/source/blender/python/intern/bpy_operator.h +++ b/source/blender/python/intern/bpy_operator.h @@ -24,8 +24,8 @@ * \ingroup pythonintern */ -#ifndef BPY_OPERATOR_H -#define BPY_OPERATOR_H +#ifndef __BPY_OPERATOR_H__ +#define __BPY_OPERATOR_H__ extern PyTypeObject pyop_base_Type; diff --git a/source/blender/python/intern/bpy_operator_wrap.h b/source/blender/python/intern/bpy_operator_wrap.h index 125d7dba84a..05a566a1485 100644 --- a/source/blender/python/intern/bpy_operator_wrap.h +++ b/source/blender/python/intern/bpy_operator_wrap.h @@ -24,8 +24,8 @@ * \ingroup pythonintern */ -#ifndef BPY_OPERATOR_WRAP_H -#define BPY_OPERATOR_WRAP_H +#ifndef __BPY_OPERATOR_WRAP_H__ +#define __BPY_OPERATOR_WRAP_H__ struct wmOperatorType; diff --git a/source/blender/python/intern/bpy_props.h b/source/blender/python/intern/bpy_props.h index f7ec6d555b9..c9934ca0cf3 100644 --- a/source/blender/python/intern/bpy_props.h +++ b/source/blender/python/intern/bpy_props.h @@ -25,8 +25,8 @@ */ -#ifndef BPY_PROPS_H -#define BPY_PROPS_H +#ifndef __BPY_PROPS_H__ +#define __BPY_PROPS_H__ PyObject *BPY_rna_props(void); diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h index 70ae8166b8b..c9ff034716d 100644 --- a/source/blender/python/intern/bpy_rna.h +++ b/source/blender/python/intern/bpy_rna.h @@ -24,8 +24,8 @@ * \ingroup pythonintern */ -#ifndef BPY_RNA_H -#define BPY_RNA_H +#ifndef __BPY_RNA_H__ +#define __BPY_RNA_H__ /* --- bpy build options --- */ #ifdef WITH_PYTHON_SAFETY diff --git a/source/blender/python/intern/bpy_traceback.h b/source/blender/python/intern/bpy_traceback.h index ff7312bb16e..575f9824379 100644 --- a/source/blender/python/intern/bpy_traceback.h +++ b/source/blender/python/intern/bpy_traceback.h @@ -23,9 +23,9 @@ */ -#ifndef BPY_TRACEBACK_H -#define BPY_TRACEBACK_H +#ifndef __BPY_TRACEBACK_H__ +#define __BPY_TRACEBACK_H__ void python_script_error_jump(const char *filepath, int *lineno, int *offset); -#endif // BPY_TRACEBACK_H +#endif // __BPY_TRACEBACK_H__ diff --git a/source/blender/python/intern/bpy_util.h b/source/blender/python/intern/bpy_util.h index 4c06bd2593b..4bebcb2ed85 100644 --- a/source/blender/python/intern/bpy_util.h +++ b/source/blender/python/intern/bpy_util.h @@ -25,8 +25,8 @@ */ -#ifndef BPY_UTIL_H -#define BPY_UTIL_H +#ifndef __BPY_UTIL_H__ +#define __BPY_UTIL_H__ #if PY_VERSION_HEX < 0x03020000 #error "Python 3.2 or greater is required, you'll need to update your python." diff --git a/source/blender/python/mathutils/mathutils.h b/source/blender/python/mathutils/mathutils.h index 220ae61f47d..854cb2e962a 100644 --- a/source/blender/python/mathutils/mathutils.h +++ b/source/blender/python/mathutils/mathutils.h @@ -32,8 +32,8 @@ //Include this file for access to vector, quat, matrix, euler, etc... -#ifndef MATHUTILS_H -#define MATHUTILS_H +#ifndef __MATHUTILS_H__ +#define __MATHUTILS_H__ /* Can cast different mathutils types to this, use for generic funcs */ @@ -125,4 +125,4 @@ int column_vector_multiplication(float rvec[4], VectorObject *vec, MatrixObject /* dynstr as python string utility funcions */ PyObject *mathutils_dynstr_to_py(struct DynStr *ds); -#endif /* MATHUTILS_H */ +#endif /* __MATHUTILS_H__ */ diff --git a/source/blender/python/mathutils/mathutils_Color.h b/source/blender/python/mathutils/mathutils_Color.h index 7e8a99089ad..786afeed5da 100644 --- a/source/blender/python/mathutils/mathutils_Color.h +++ b/source/blender/python/mathutils/mathutils_Color.h @@ -32,8 +32,8 @@ */ -#ifndef MATHUTILS_COLOR_H -#define MATHUTILS_COLOR_H +#ifndef __MATHUTILS_COLOR_H__ +#define __MATHUTILS_COLOR_H__ extern PyTypeObject color_Type; #define ColorObject_Check(_v) PyObject_TypeCheck((_v), &color_Type) @@ -51,4 +51,4 @@ blender (stored in blend_data). This is an either/or struct not both*/ PyObject *Color_CreatePyObject( float *col, int type, PyTypeObject *base_type); PyObject *Color_CreatePyObject_cb(PyObject *cb_user, int cb_type, int cb_subtype); -#endif /* MATHUTILS_COLOR_H */ +#endif /* __MATHUTILS_COLOR_H__ */ diff --git a/source/blender/python/mathutils/mathutils_Euler.h b/source/blender/python/mathutils/mathutils_Euler.h index c42b0daffbc..3656aa14461 100644 --- a/source/blender/python/mathutils/mathutils_Euler.h +++ b/source/blender/python/mathutils/mathutils_Euler.h @@ -32,8 +32,8 @@ */ -#ifndef MATHUTILS_EULER_H -#define MATHUTILS_EULER_H +#ifndef __MATHUTILS_EULER_H__ +#define __MATHUTILS_EULER_H__ extern PyTypeObject euler_Type; #define EulerObject_Check(_v) PyObject_TypeCheck((_v), &euler_Type) @@ -56,4 +56,4 @@ PyObject *Euler_CreatePyObject_cb(PyObject *cb_user, short order, int cb_type, i short euler_order_from_string(const char *str, const char *error_prefix); -#endif /* MATHUTILS_EULER_H */ +#endif /* __MATHUTILS_EULER_H__ */ diff --git a/source/blender/python/mathutils/mathutils_Matrix.h b/source/blender/python/mathutils/mathutils_Matrix.h index 2ecbc55da35..e8719e947ec 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.h +++ b/source/blender/python/mathutils/mathutils_Matrix.h @@ -31,8 +31,8 @@ */ -#ifndef MATHUTILS_MATRIX_H -#define MATHUTILS_MATRIX_H +#ifndef __MATHUTILS_MATRIX_H__ +#define __MATHUTILS_MATRIX_H__ extern PyTypeObject matrix_Type; extern PyTypeObject matrix_access_Type; @@ -83,4 +83,4 @@ extern struct Mathutils_Callback mathutils_matrix_translation_cb; void matrix_as_3x3(float mat[3][3], MatrixObject *self); -#endif /* MATHUTILS_MATRIX_H */ +#endif /* __MATHUTILS_MATRIX_H__ */ diff --git a/source/blender/python/mathutils/mathutils_Quaternion.h b/source/blender/python/mathutils/mathutils_Quaternion.h index edd5ec55312..8e91f26b08f 100644 --- a/source/blender/python/mathutils/mathutils_Quaternion.h +++ b/source/blender/python/mathutils/mathutils_Quaternion.h @@ -32,8 +32,8 @@ */ -#ifndef MATHUTILS_QUAT_H -#define MATHUTILS_QUAT_H +#ifndef __MATHUTILS_QUATERNION_H__ +#define __MATHUTILS_QUATERNION_H__ extern PyTypeObject quaternion_Type; #define QuaternionObject_Check(_v) PyObject_TypeCheck((_v), &quaternion_Type) @@ -51,4 +51,4 @@ blender (stored in blend_data). This is an either/or struct not both*/ PyObject *Quaternion_CreatePyObject( float *quat, int type, PyTypeObject *base_type); PyObject *Quaternion_CreatePyObject_cb(PyObject *cb_user, int cb_type, int cb_subtype); -#endif /* MATHUTILS_QUAT_H */ +#endif /* __MATHUTILS_QUATERNION_H__ */ diff --git a/source/blender/python/mathutils/mathutils_Vector.h b/source/blender/python/mathutils/mathutils_Vector.h index 4e10e795602..88de991ba43 100644 --- a/source/blender/python/mathutils/mathutils_Vector.h +++ b/source/blender/python/mathutils/mathutils_Vector.h @@ -32,8 +32,8 @@ */ -#ifndef MATHUTILS_VECTOR_H -#define MATHUTILS_VECTOR_H +#ifndef __MATHUTILS_VECTOR_H__ +#define __MATHUTILS_VECTOR_H__ extern PyTypeObject vector_Type; #define VectorObject_Check(_v) PyObject_TypeCheck((_v), &vector_Type) @@ -49,4 +49,4 @@ PyObject *Vector_CreatePyObject(float *vec, const int size, const int type, PyTy PyObject *Vector_CreatePyObject_cb(PyObject *user, int size, int callback_type, int subtype); PyObject *Vector_CreatePyObject_alloc(float *vec, const int size, PyTypeObject *base_type); -#endif /* MATHUTILS_VECTOR_H */ +#endif /* __MATHUTILS_VECTOR_H__ */ diff --git a/source/blender/python/mathutils/mathutils_geometry.h b/source/blender/python/mathutils/mathutils_geometry.h index 1b339bdaf00..ac89698c12e 100644 --- a/source/blender/python/mathutils/mathutils_geometry.h +++ b/source/blender/python/mathutils/mathutils_geometry.h @@ -32,11 +32,11 @@ /*Include this file for access to vector, quat, matrix, euler, etc...*/ -#ifndef MATHUTILS_GEOMETRY_H -#define MATHUTILS_GEOMETRY_H +#ifndef __MATHUTILS_GEOMETRY_H__ +#define __MATHUTILS_GEOMETRY_H__ #include "mathutils.h" PyMODINIT_FUNC PyInit_mathutils_geometry(void); -#endif /* MATHUTILS_GEOMETRY_H */ +#endif /* __MATHUTILS_GEOMETRY_H__ */ diff --git a/source/blender/python/mathutils/mathutils_noise.h b/source/blender/python/mathutils/mathutils_noise.h index 6a6527588ef..f4bec88e59a 100644 --- a/source/blender/python/mathutils/mathutils_noise.h +++ b/source/blender/python/mathutils/mathutils_noise.h @@ -24,8 +24,8 @@ * \ingroup mathutils */ -#ifndef MATHUTILS_NOISE_H -#define MATHUTILS_NOISE_H +#ifndef __MATHUTILS_NOISE_H__ +#define __MATHUTILS_NOISE_H__ #include "mathutils.h" @@ -33,4 +33,4 @@ PyMODINIT_FUNC PyInit_mathutils_noise(void); PyMODINIT_FUNC PyInit_mathutils_noise_types(void); PyMODINIT_FUNC PyInit_mathutils_noise_metrics(void); -#endif // MATHUTILS_NOISE_H +#endif // __MATHUTILS_NOISE_H__ diff --git a/source/blender/quicktime/quicktime_import.h b/source/blender/quicktime/quicktime_import.h index d095b8353ca..e6f3c821b85 100644 --- a/source/blender/quicktime/quicktime_import.h +++ b/source/blender/quicktime/quicktime_import.h @@ -34,8 +34,8 @@ -#ifndef __QUICKTIME_IMP_H__ -#define __QUICKTIME_IMP_H__ +#ifndef __QUICKTIME_IMPORT_H__ +#define __QUICKTIME_IMPORT_H__ #define __AIFF__ @@ -76,4 +76,4 @@ ImBuf *qtime_fetchibuf (struct anim *anim, int position); int imb_is_a_quicktime (char *name); ImBuf *imb_quicktime_decode(unsigned char *mem, int size, int flags); -#endif // __QUICKTIME_IMP_H__ +#endif // __QUICKTIME_IMPORT_H__ diff --git a/source/blender/render/extern/include/RE_engine.h b/source/blender/render/extern/include/RE_engine.h index 02a94e56462..5e4a5e05a56 100644 --- a/source/blender/render/extern/include/RE_engine.h +++ b/source/blender/render/extern/include/RE_engine.h @@ -29,8 +29,8 @@ * \ingroup render */ -#ifndef RE_ENGINE_H -#define RE_ENGINE_H +#ifndef __RE_ENGINE_H__ +#define __RE_ENGINE_H__ #include "DNA_listBase.h" #include "RNA_types.h" @@ -116,5 +116,5 @@ void RE_engines_exit(void); RenderEngineType *RE_engines_find(const char *idname); -#endif /* RE_ENGINE_H */ +#endif /* __RE_ENGINE_H__ */ diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h index cc4136fcccc..a670446189e 100644 --- a/source/blender/render/extern/include/RE_pipeline.h +++ b/source/blender/render/extern/include/RE_pipeline.h @@ -29,8 +29,8 @@ * \ingroup render */ -#ifndef RE_PIPELINE_H -#define RE_PIPELINE_H +#ifndef __RE_PIPELINE_H__ +#define __RE_PIPELINE_H__ #include "DNA_listBase.h" #include "DNA_vec_types.h" @@ -272,5 +272,5 @@ struct Scene *RE_GetScene(struct Render *re); int RE_is_rendering_allowed(struct Scene *scene, struct Object *camera_override, struct ReportList *reports); -#endif /* RE_PIPELINE_H */ +#endif /* __RE_PIPELINE_H__ */ diff --git a/source/blender/render/extern/include/RE_render_ext.h b/source/blender/render/extern/include/RE_render_ext.h index f93e3c9fd20..054aaccb177 100644 --- a/source/blender/render/extern/include/RE_render_ext.h +++ b/source/blender/render/extern/include/RE_render_ext.h @@ -29,8 +29,8 @@ */ -#ifndef RE_RENDER_EXT_H -#define RE_RENDER_EXT_H +#ifndef __RE_RENDER_EXT_H__ +#define __RE_RENDER_EXT_H__ /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /* this include is for non-render pipeline exports (still old cruft here) */ @@ -70,5 +70,5 @@ void RE_free_sample_material(struct Material *mat); void RE_sample_material_color(struct Material *mat, float color[3], float *alpha, const float volume_co[3], const float surface_co[3], int face_index, short hit_quad, struct DerivedMesh *orcoDm, struct Object *ob); -#endif /* RE_RENDER_EXT_H */ +#endif /* __RE_RENDER_EXT_H__ */ diff --git a/source/blender/render/extern/include/RE_shader_ext.h b/source/blender/render/extern/include/RE_shader_ext.h index 2f585f91d44..cf9e6f7966f 100644 --- a/source/blender/render/extern/include/RE_shader_ext.h +++ b/source/blender/render/extern/include/RE_shader_ext.h @@ -29,8 +29,8 @@ */ -#ifndef RE_SHADER_EXT_H -#define RE_SHADER_EXT_H +#ifndef __RE_SHADER_EXT_H__ +#define __RE_SHADER_EXT_H__ /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /* this include is for shading and texture exports */ @@ -214,4 +214,4 @@ void RE_bake_ibuf_filter(struct ImBuf *ibuf, char *mask, const int filter); #define BAKE_RESULT_NO_OBJECTS 1 #define BAKE_RESULT_FEEDBACK_LOOP 2 -#endif /* RE_SHADER_EXT_H */ +#endif /* __RE_SHADER_EXT_H__ */ diff --git a/source/blender/render/intern/include/envmap.h b/source/blender/render/intern/include/envmap.h index 0133c08a6a7..24138884cd2 100644 --- a/source/blender/render/intern/include/envmap.h +++ b/source/blender/render/intern/include/envmap.h @@ -33,8 +33,8 @@ */ -#ifndef ENVMAP_EXT_H -#define ENVMAP_EXT_H +#ifndef __ENVMAP_H__ +#define __ENVMAP_H__ /** * Make environment maps for all objects in the scene that have an @@ -48,5 +48,5 @@ struct TexResult; void make_envmaps(struct Render *re); int envmaptex(struct Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, struct TexResult *texres); -#endif /* ENVMAP_EXT_H */ +#endif /* __ENVMAP_H__ */ diff --git a/source/blender/render/intern/include/gammaCorrectionTables.h b/source/blender/render/intern/include/gammaCorrectionTables.h index 29ceef82c09..b41fc01eaaf 100644 --- a/source/blender/render/intern/include/gammaCorrectionTables.h +++ b/source/blender/render/intern/include/gammaCorrectionTables.h @@ -33,8 +33,8 @@ */ -#ifndef GAMMACORRECTIONTABLES_H -#define GAMMACORRECTIONTABLES_H +#ifndef __GAMMACORRECTIONTABLES_H__ +#define __GAMMACORRECTIONTABLES_H__ /** * Initialise the gamma lookup tables diff --git a/source/blender/render/intern/include/initrender.h b/source/blender/render/intern/include/initrender.h index 17fa312a6cd..e4fb338771e 100644 --- a/source/blender/render/intern/include/initrender.h +++ b/source/blender/render/intern/include/initrender.h @@ -33,8 +33,8 @@ */ -#ifndef INITRENDER_H -#define INITRENDER_H +#ifndef __INITRENDER_H__ +#define __INITRENDER_H__ struct Object; @@ -49,5 +49,5 @@ void initparts(Render *re); void freeparts(Render *re); -#endif /* INITRENDER_H */ +#endif /* __INITRENDER_H__ */ diff --git a/source/blender/render/intern/include/occlusion.h b/source/blender/render/intern/include/occlusion.h index 15581c8d7d4..78a1f8a1175 100644 --- a/source/blender/render/intern/include/occlusion.h +++ b/source/blender/render/intern/include/occlusion.h @@ -31,8 +31,8 @@ */ -#ifndef OCCLUSION_H -#define OCCLUSION_H +#ifndef __OCCLUSION_H__ +#define __OCCLUSION_H__ struct Render; struct ShadeInput; diff --git a/source/blender/render/intern/include/pixelblending.h b/source/blender/render/intern/include/pixelblending.h index 87a5ed07747..aa2698716e9 100644 --- a/source/blender/render/intern/include/pixelblending.h +++ b/source/blender/render/intern/include/pixelblending.h @@ -28,8 +28,8 @@ */ -#ifndef PIXELBLENDING_EXT_H -#define PIXELBLENDING_EXT_H +#ifndef __PIXELBLENDING_H__ +#define __PIXELBLENDING_H__ /** @@ -69,5 +69,5 @@ void addalphaUnderGammaFloat(float *doel, float *bron); -#endif /* PIXELBLENDING_EXT_H */ +#endif /* __PIXELBLENDING_H__ */ diff --git a/source/blender/render/intern/include/pixelshading.h b/source/blender/render/intern/include/pixelshading.h index 6f4b373f8d4..17032283540 100644 --- a/source/blender/render/intern/include/pixelshading.h +++ b/source/blender/render/intern/include/pixelshading.h @@ -34,8 +34,8 @@ */ -#ifndef PIXELSHADING_H -#define PIXELSHADING_H +#ifndef __PIXELSHADING_H__ +#define __PIXELSHADING_H__ /** * Render the pixel at (x,y) for object ap. Apply the jitter mask. diff --git a/source/blender/render/intern/include/pointdensity.h b/source/blender/render/intern/include/pointdensity.h index 7ceb24e9ece..cc8fabda49c 100644 --- a/source/blender/render/intern/include/pointdensity.h +++ b/source/blender/render/intern/include/pointdensity.h @@ -30,8 +30,8 @@ */ -#ifndef POINTDENSITY_H -#define POINTDENSITY_H +#ifndef __POINTDENSITY_H__ +#define __POINTDENSITY_H__ /** * Make point density kd-trees for all point density textures in the scene @@ -45,5 +45,5 @@ void make_pointdensities(struct Render *re); void free_pointdensities(struct Render *re); int pointdensitytex(struct Tex *tex, float *texvec, struct TexResult *texres); -#endif /* POINTDENSITY_H */ +#endif /* __POINTDENSITY_H__ */ diff --git a/source/blender/render/intern/include/raycounter.h b/source/blender/render/intern/include/raycounter.h index 20348f8d418..075a6337435 100644 --- a/source/blender/render/intern/include/raycounter.h +++ b/source/blender/render/intern/include/raycounter.h @@ -30,8 +30,8 @@ */ -#ifndef RE_RAYCOUNTER_H -#define RE_RAYCOUNTER_H +#ifndef __RAYCOUNTER_H__ +#define __RAYCOUNTER_H__ //#define RE_RAYCOUNTER /* enable counters per ray, useful for measuring raytrace structures performance */ diff --git a/source/blender/render/intern/include/rayintersection.h b/source/blender/render/intern/include/rayintersection.h index 2c68421a8ee..934bf92db8f 100644 --- a/source/blender/render/intern/include/rayintersection.h +++ b/source/blender/render/intern/include/rayintersection.h @@ -31,8 +31,8 @@ */ -#ifndef __RENDER_RAYINTERSECTION_H__ -#define __RENDER_RAYINTERSECTION_H__ +#ifndef __RAYINTERSECTION_H__ +#define __RAYINTERSECTION_H__ #ifdef __cplusplus extern "C" { @@ -123,5 +123,5 @@ typedef struct Isect { } #endif -#endif /* __RENDER_RAYINTERSECTION_H__ */ +#endif /* __RAYINTERSECTION_H__ */ diff --git a/source/blender/render/intern/include/rayobject.h b/source/blender/render/intern/include/rayobject.h index 3ca3bd63428..c93c4e1da63 100644 --- a/source/blender/render/intern/include/rayobject.h +++ b/source/blender/render/intern/include/rayobject.h @@ -30,8 +30,8 @@ */ -#ifndef RE_RAYOBJECT_H -#define RE_RAYOBJECT_H +#ifndef __RAYOBJECT_H__ +#define __RAYOBJECT_H__ #ifdef __cplusplus extern "C" { diff --git a/source/blender/render/intern/include/render_result.h b/source/blender/render/intern/include/render_result.h index 93cbc6fe9c9..3d73ee1e912 100644 --- a/source/blender/render/intern/include/render_result.h +++ b/source/blender/render/intern/include/render_result.h @@ -29,8 +29,8 @@ * \ingroup render */ -#ifndef RENDER_RESULT_H -#define RENDER_RESULT_H +#ifndef __RENDER_RESULT_H__ +#define __RENDER_RESULT_H__ #define PASS_VECTOR_MAX 10000.0f @@ -90,5 +90,5 @@ void render_result_rect_fill_zero(struct RenderResult *rr); void render_result_rect_get_pixels(struct RenderResult *rr, struct RenderData *rd, unsigned int *rect, int rectx, int recty); -#endif /* RENDER_RESULT_H */ +#endif /* __RENDER_RESULT_H__ */ diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h index f414be60b0a..886a6ce74f2 100644 --- a/source/blender/render/intern/include/render_types.h +++ b/source/blender/render/intern/include/render_types.h @@ -28,8 +28,8 @@ */ -#ifndef RENDER_TYPES_H -#define RENDER_TYPES_H +#ifndef __RENDER_TYPES_H__ +#define __RENDER_TYPES_H__ /* ------------------------------------------------------------------------- */ /* exposed internal in render module only! */ @@ -628,5 +628,5 @@ typedef struct LampRen { #define R_ENV_TRANSFORMED 2 #define R_TRANSFORMED (1|2) -#endif /* RENDER_TYPES_H */ +#endif /* __RENDER_TYPES_H__ */ diff --git a/source/blender/render/intern/include/rendercore.h b/source/blender/render/intern/include/rendercore.h index 08f73ccbe0d..496e2bb50a9 100644 --- a/source/blender/render/intern/include/rendercore.h +++ b/source/blender/render/intern/include/rendercore.h @@ -33,8 +33,8 @@ */ -#ifndef RENDERCORE_H -#define RENDERCORE_H +#ifndef __RENDERCORE_H__ +#define __RENDERCORE_H__ #include "render_types.h" diff --git a/source/blender/render/intern/include/renderdatabase.h b/source/blender/render/intern/include/renderdatabase.h index ebbbfb03f55..d11732f7da1 100644 --- a/source/blender/render/intern/include/renderdatabase.h +++ b/source/blender/render/intern/include/renderdatabase.h @@ -30,8 +30,8 @@ */ -#ifndef RENDERDATABASE_H -#define RENDERDATABASE_H +#ifndef __RENDERDATABASE_H__ +#define __RENDERDATABASE_H__ struct Object; struct VlakRen; @@ -144,5 +144,5 @@ void init_render_world(Render *re); void RE_Database_FromScene_Vectors(Render *re, struct Main *bmain, struct Scene *sce, unsigned int lay); -#endif /* RENDERDATABASE_H */ +#endif /* __RENDERDATABASE_H__ */ diff --git a/source/blender/render/intern/include/renderpipeline.h b/source/blender/render/intern/include/renderpipeline.h index 9a87cf84012..e713d4880d6 100644 --- a/source/blender/render/intern/include/renderpipeline.h +++ b/source/blender/render/intern/include/renderpipeline.h @@ -30,8 +30,8 @@ */ -#ifndef PIPELINE_H -#define PIPELINE_H +#ifndef __RENDERPIPELINE_H__ +#define __RENDERPIPELINE_H__ struct Render; struct RenderLayer; @@ -40,5 +40,5 @@ struct RenderResult; struct RenderLayer *render_get_active_layer(struct Render *re, struct RenderResult *rr); float panorama_pixel_rot(struct Render *re); -#endif /* PIPELINE_H */ +#endif /* __RENDERPIPELINE_H__ */ diff --git a/source/blender/render/intern/include/shadbuf.h b/source/blender/render/intern/include/shadbuf.h index a37af5abb4a..ddcfc555f7a 100644 --- a/source/blender/render/intern/include/shadbuf.h +++ b/source/blender/render/intern/include/shadbuf.h @@ -33,8 +33,8 @@ */ -#ifndef SHADBUF_EXT_H -#define SHADBUF_EXT_H +#ifndef __SHADBUF_H__ +#define __SHADBUF_H__ #include "render_types.h" @@ -114,5 +114,5 @@ typedef struct ISBData { int minx, miny, rectx, recty; /* copy from part disprect */ } ISBData; -#endif /* SHADBUF_EXT_H */ +#endif /* __SHADBUF_H__ */ diff --git a/source/blender/render/intern/include/sss.h b/source/blender/render/intern/include/sss.h index 4e110da25dd..6a179d2f428 100644 --- a/source/blender/render/intern/include/sss.h +++ b/source/blender/render/intern/include/sss.h @@ -30,8 +30,8 @@ */ -#ifndef SSS_H -#define SSS_H +#ifndef __SSS_H__ +#define __SSS_H__ /* Generic multiple scattering API */ @@ -64,5 +64,5 @@ void free_sss(struct Render *re); int sample_sss(struct Render *re, struct Material *mat, float *co, float *col); int sss_pass_done(struct Render *re, struct Material *mat); -#endif /*SSS_H*/ +#endif /*__SSS_H__*/ diff --git a/source/blender/render/intern/include/strand.h b/source/blender/render/intern/include/strand.h index 1cf34c7ad50..4403f68c982 100644 --- a/source/blender/render/intern/include/strand.h +++ b/source/blender/render/intern/include/strand.h @@ -30,8 +30,8 @@ */ -#ifndef STRAND_H -#define STRAND_H +#ifndef __STRAND_H__ +#define __STRAND_H__ struct StrandVert; struct StrandRen; diff --git a/source/blender/render/intern/include/sunsky.h b/source/blender/render/intern/include/sunsky.h index 8c0cbfd18e7..5076a1541af 100644 --- a/source/blender/render/intern/include/sunsky.h +++ b/source/blender/render/intern/include/sunsky.h @@ -29,8 +29,8 @@ * and example code from Brian Smits, another author of that paper in * http://www.cs.utah.edu/vissim/papers/sunsky/code/ * */ -#ifndef SUNSKY_H_ -#define SUNSKY_H_ +#ifndef __SUNSKY_H__ +#define __SUNSKY_H__ #define SPECTRUM_MAX_COMPONENTS 100 #define SPECTRUM_START 350.0 @@ -146,4 +146,4 @@ void AtmospherePixleShader( struct SunSky* sunSky, float view[3], float s, float * */ void ClipColor(float c[3]); -#endif /*SUNSKY_H_*/ +#endif /*__SUNSKY_H__*/ diff --git a/source/blender/render/intern/include/texture.h b/source/blender/render/intern/include/texture.h index a8d13077680..e5013ace1f0 100644 --- a/source/blender/render/intern/include/texture.h +++ b/source/blender/render/intern/include/texture.h @@ -33,8 +33,8 @@ */ -#ifndef TEXTURE_EXT_H -#define TEXTURE_EXT_H +#ifndef __TEXTURE_H__ +#define __TEXTURE_H__ #define BRICONT \ texres->tin= (texres->tin-0.5f) * tex->contrast+tex->bright-0.5f; \ @@ -85,5 +85,5 @@ int imagewraposa(struct Tex *tex, struct Image *ima, struct ImBuf *ibuf, const f int imagewrap(struct Tex *tex, struct Image *ima, struct ImBuf *ibuf, const float texvec[3], struct TexResult *texres); void image_sample(struct Image *ima, float fx, float fy, float dx, float dy, float *result); -#endif /* TEXTURE_EXT_H */ +#endif /* __TEXTURE_H__ */ diff --git a/source/blender/render/intern/include/voxeldata.h b/source/blender/render/intern/include/voxeldata.h index aa4a9fdb845..3d6280c5c28 100644 --- a/source/blender/render/intern/include/voxeldata.h +++ b/source/blender/render/intern/include/voxeldata.h @@ -30,8 +30,8 @@ */ -#ifndef VOXELDATA_H -#define VOXELDATA_H +#ifndef __VOXELDATA_H__ +#define __VOXELDATA_H__ struct Render; struct TexResult; @@ -47,4 +47,4 @@ void make_voxeldata(struct Render *re); void free_voxeldata(struct Render *re); int voxeldatatex(struct Tex *tex, const float texvec[3], struct TexResult *texres); -#endif /* VOXELDATA_H */ +#endif /* __VOXELDATA_H__ */ diff --git a/source/blender/render/intern/include/zbuf.h b/source/blender/render/intern/include/zbuf.h index c467c31b5a6..518b2f846d3 100644 --- a/source/blender/render/intern/include/zbuf.h +++ b/source/blender/render/intern/include/zbuf.h @@ -30,8 +30,8 @@ */ -#ifndef ZBUF_H -#define ZBUF_H +#ifndef __ZBUF_H__ +#define __ZBUF_H__ struct RenderPart; struct RenderLayer; diff --git a/source/blender/render/intern/raytrace/bvh.h b/source/blender/render/intern/raytrace/bvh.h index cdc905fbf04..b2ec1552f04 100644 --- a/source/blender/render/intern/raytrace/bvh.h +++ b/source/blender/render/intern/raytrace/bvh.h @@ -46,8 +46,8 @@ #include #endif -#ifndef RE_RAYTRACE_BVH_H -#define RE_RAYTRACE_BVH_H +#ifndef __BVH_H__ +#define __BVH_H__ #ifdef __SSE__ inline int test_bb_group4(__m128 *bb_group, const Isect *isec) diff --git a/source/blender/render/intern/raytrace/rayobject_hint.h b/source/blender/render/intern/raytrace/rayobject_hint.h index e13a8e68b27..9e505b68101 100644 --- a/source/blender/render/intern/raytrace/rayobject_hint.h +++ b/source/blender/render/intern/raytrace/rayobject_hint.h @@ -30,8 +30,8 @@ */ -#ifndef RE_RAYTRACE_RAYOBJECT_HINT_H -#define RE_RAYTRACE_RAYOBJECT_HINT_H +#ifndef __RAYOBJECT_HINT_H__ +#define __RAYOBJECT_HINT_H__ #define HINT_RECURSE 1 #define HINT_ACCEPT 0 diff --git a/source/blender/render/intern/raytrace/rayobject_internal.h b/source/blender/render/intern/raytrace/rayobject_internal.h index 458c892d410..8e39b687b34 100644 --- a/source/blender/render/intern/raytrace/rayobject_internal.h +++ b/source/blender/render/intern/raytrace/rayobject_internal.h @@ -2,8 +2,8 @@ * \ingroup render */ -#ifndef RE_RAYOBJECT_INTERNAL_H -#define RE_RAYOBJECT_INTERNAL_H +#ifndef __RAYOBJECT_INTERNAL_H__ +#define __RAYOBJECT_INTERNAL_H__ #ifdef __cplusplus extern "C" { diff --git a/source/blender/render/intern/raytrace/rayobject_rtbuild.h b/source/blender/render/intern/raytrace/rayobject_rtbuild.h index c4088981d92..f6e9aabf43d 100644 --- a/source/blender/render/intern/raytrace/rayobject_rtbuild.h +++ b/source/blender/render/intern/raytrace/rayobject_rtbuild.h @@ -29,8 +29,8 @@ * \ingroup render */ -#ifndef RE_RAYOBJECT_RTBUILD_H -#define RE_RAYOBJECT_RTBUILD_H +#ifndef __RAYOBJECT_RTBUILD_H__ +#define __RAYOBJECT_RTBUILD_H__ #ifdef __cplusplus extern "C" { diff --git a/source/blender/render/intern/raytrace/svbvh.h b/source/blender/render/intern/raytrace/svbvh.h index 2f49531ff34..8fb2db63df6 100644 --- a/source/blender/render/intern/raytrace/svbvh.h +++ b/source/blender/render/intern/raytrace/svbvh.h @@ -32,8 +32,8 @@ #ifdef __SSE__ -#ifndef RE_RAYTRACE_SVBVH_H -#define RE_RAYTRACE_SVBVH_H +#ifndef __SVBVH_H__ +#define __SVBVH_H__ #include "bvh.h" #include "BLI_memarena.h" diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c index 9aac7aae53e..2f620bb96d4 100644 --- a/source/blender/render/intern/source/shadeoutput.c +++ b/source/blender/render/intern/source/shadeoutput.c @@ -206,7 +206,7 @@ static void spothalo(struct LampRen *lar, ShadeInput *shi, float *intens) maxz*= lar->sh_zfac; maxy= lar->imat[0][1]*p1[0]+lar->imat[1][1]*p1[1]+lar->imat[2][1]*p1[2]; - if( fabsf(nray[2]) < FLT_EPSILON ) use_yco= 1; + if( fabs(nray[2]) < FLT_EPSILON ) use_yco= 1; } /* scale z to make sure volume is normalized */ diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 132b57696e1..1be94d9c634 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -23,8 +23,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef WM_API_H -#define WM_API_H +#ifndef __WM_API_H__ +#define __WM_API_H__ /** \file WM_api.h * \ingroup wm @@ -344,5 +344,5 @@ int write_crash_blend(void); } #endif -#endif /* WM_API_H */ +#endif /* __WM_API_H__ */ diff --git a/source/blender/windowmanager/WM_keymap.h b/source/blender/windowmanager/WM_keymap.h index f254358e3cf..db448397065 100644 --- a/source/blender/windowmanager/WM_keymap.h +++ b/source/blender/windowmanager/WM_keymap.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef WM_KEYMAP_H -#define WM_KEYMAP_H +#ifndef __WM_KEYMAP_H__ +#define __WM_KEYMAP_H__ /** \file WM_keymap.h * \ingroup wm @@ -98,5 +98,5 @@ char *WM_key_event_operator_string(const struct bContext *C, const char *opname } #endif -#endif /* WM_KEYMAP_H */ +#endif /* __WM_KEYMAP_H__ */ diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index 357eaf2633b..3a62faeab8a 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -28,8 +28,8 @@ * \ingroup wm */ -#ifndef WM_TYPES_H -#define WM_TYPES_H +#ifndef __WM_TYPES_H__ +#define __WM_TYPES_H__ #ifdef __cplusplus extern "C" { @@ -569,5 +569,5 @@ typedef struct RecentFile { } #endif -#endif /* WM_TYPES_H */ +#endif /* __WM_TYPES_H__ */ diff --git a/source/blender/windowmanager/wm.h b/source/blender/windowmanager/wm.h index d9dcb9ea10c..d1081f5450c 100644 --- a/source/blender/windowmanager/wm.h +++ b/source/blender/windowmanager/wm.h @@ -28,8 +28,8 @@ * \ingroup wm */ -#ifndef WM_H -#define WM_H +#ifndef __WM_H__ +#define __WM_H__ struct wmWindow; struct ReportList; @@ -85,5 +85,5 @@ void wm_autosave_location(char *filepath); extern int circle_select_size; #endif -#endif /* WM_H */ +#endif /* __WM_H__ */ diff --git a/source/blender/windowmanager/wm_cursors.h b/source/blender/windowmanager/wm_cursors.h index c179483eff3..f41b15aadcf 100644 --- a/source/blender/windowmanager/wm_cursors.h +++ b/source/blender/windowmanager/wm_cursors.h @@ -32,8 +32,8 @@ -#ifndef WM_CURSORS_H -#define WM_CURSORS_H +#ifndef __WM_CURSORS_H__ +#define __WM_CURSORS_H__ void wm_init_cursor_data(void); @@ -120,5 +120,5 @@ struct wmEvent; int wm_cursor_arrow_move(struct wmWindow *win, struct wmEvent *event); -#endif /* WM_CURSORS_H */ +#endif /* __WM_CURSORS_H__ */ diff --git a/source/blender/windowmanager/wm_draw.h b/source/blender/windowmanager/wm_draw.h index 9e22fc8c412..3d72fe17c79 100644 --- a/source/blender/windowmanager/wm_draw.h +++ b/source/blender/windowmanager/wm_draw.h @@ -29,8 +29,8 @@ */ -#ifndef WM_DRAW_H -#define WM_DRAW_H +#ifndef __WM_DRAW_H__ +#define __WM_DRAW_H__ struct bContext; struct wmWindow; @@ -43,5 +43,5 @@ void wm_draw_region_clear (struct wmWindow *win, struct ARegion *ar); void wm_tag_redraw_overlay (struct wmWindow *win, struct ARegion *ar); -#endif /* WM_DRAW_H */ +#endif /* __WM_DRAW_H__ */ diff --git a/source/blender/windowmanager/wm_event_system.h b/source/blender/windowmanager/wm_event_system.h index 9c0d2ae3eff..a33d37ac50e 100644 --- a/source/blender/windowmanager/wm_event_system.h +++ b/source/blender/windowmanager/wm_event_system.h @@ -28,8 +28,8 @@ * \ingroup wm */ -#ifndef WM_EVENT_SYSTEM_H -#define WM_EVENT_SYSTEM_H +#ifndef __WM_EVENT_SYSTEM_H__ +#define __WM_EVENT_SYSTEM_H__ /* return value of handler-operator call */ #define WM_HANDLER_CONTINUE 0 @@ -107,5 +107,5 @@ void wm_dropbox_free(void); void wm_drags_check_ops(bContext *C, wmEvent *event); void wm_drags_draw(bContext *C, wmWindow *win, rcti *rect); -#endif /* WM_EVENT_SYSTEM_H */ +#endif /* __WM_EVENT_SYSTEM_H__ */ diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h index 47081b6a6a1..170413c13b0 100644 --- a/source/blender/windowmanager/wm_event_types.h +++ b/source/blender/windowmanager/wm_event_types.h @@ -35,8 +35,8 @@ */ -#ifndef WM_EVENT_TYPES_H -#define WM_EVENT_TYPES_H +#ifndef __WM_EVENT_TYPES_H__ +#define __WM_EVENT_TYPES_H__ /* customdata type */ #define EVT_DATA_TABLET 1 @@ -365,5 +365,5 @@ enum { #define GESTURE_MODAL_OUT 10 -#endif /* WM_EVENT_TYPES_H */ +#endif /* __WM_EVENT_TYPES_H__ */ diff --git a/source/blender/windowmanager/wm_files.h b/source/blender/windowmanager/wm_files.h index 64f05e7c581..f373530b5e6 100644 --- a/source/blender/windowmanager/wm_files.h +++ b/source/blender/windowmanager/wm_files.h @@ -28,10 +28,10 @@ * \ingroup wm */ -#ifndef WM_FILES_H -#define WM_FILES_H +#ifndef __WM_FILES_H__ +#define __WM_FILES_H__ void WM_read_history(void); -#endif /* WM_FILES_H */ +#endif /* __WM_FILES_H__ */ diff --git a/source/blender/windowmanager/wm_subwindow.h b/source/blender/windowmanager/wm_subwindow.h index 6fecefe5479..5017977952b 100644 --- a/source/blender/windowmanager/wm_subwindow.h +++ b/source/blender/windowmanager/wm_subwindow.h @@ -29,8 +29,8 @@ */ -#ifndef WM_SUBWINDOW_H -#define WM_SUBWINDOW_H +#ifndef __WM_SUBWINDOW_H__ +#define __WM_SUBWINDOW_H__ /* *************** internal api ************** */ @@ -50,5 +50,5 @@ void wm_subwindow_getmatrix(wmWindow *win, int swinid, float mat[][4]); unsigned int index_to_framebuffer(int index); -#endif /* WM_SUBWINDOW_H */ +#endif /* __WM_SUBWINDOW_H__ */ diff --git a/source/blender/windowmanager/wm_window.h b/source/blender/windowmanager/wm_window.h index ec6d815cfc2..27eb4542877 100644 --- a/source/blender/windowmanager/wm_window.h +++ b/source/blender/windowmanager/wm_window.h @@ -29,8 +29,8 @@ */ -#ifndef WM_WINDOW_H -#define WM_WINDOW_H +#ifndef __WM_WINDOW_H__ +#define __WM_WINDOW_H__ struct bScreen; struct wmOperator; @@ -70,5 +70,5 @@ void wm_window_testbreak (void); int wm_window_duplicate_exec(bContext *C, struct wmOperator *op); int wm_window_fullscreen_toggle_exec(bContext *C, struct wmOperator *op); -#endif /* WM_WINDOW_H */ +#endif /* __WM_WINDOW_H__ */ diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 19b3c6616ac..057c19dd5c4 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -558,6 +558,7 @@ elseif(WIN32) install( FILES ${LIBDIR}/openal/lib/OpenAL32.dll + ${LIBDIR}/openal/lib/wrap_oal.dll DESTINATION ${TARGETDIR} ) endif() @@ -829,6 +830,7 @@ endif() extern_minilzo extern_lzma extern_colamd + extern_xdnd ge_logic_ketsji extern_recastnavigation ge_phys_common