svn merge ^/trunk/blender -r46750:HEAD
authorOve Murberg Henriksen <sorayasilvermoon@hotmail.com>
Mon, 21 May 2012 15:14:32 +0000 (15:14 +0000)
committerOve Murberg Henriksen <sorayasilvermoon@hotmail.com>
Mon, 21 May 2012 15:14:32 +0000 (15:14 +0000)
387 files changed:
CMakeLists.txt
intern/cycles/blender/blender_object.cpp
intern/cycles/blender/blender_session.cpp
intern/cycles/blender/blender_shader.cpp
intern/cycles/kernel/kernel_object.h
intern/cycles/kernel/kernel_shader.h
intern/cycles/kernel/svm/svm.h
intern/cycles/kernel/svm/svm_geometry.h
intern/cycles/kernel/svm/svm_tex_coord.h
intern/cycles/kernel/svm/svm_types.h
intern/cycles/render/film.cpp
intern/cycles/render/nodes.cpp
intern/cycles/render/nodes.h
intern/cycles/render/object.cpp
intern/cycles/render/object.h
intern/cycles/util/util_hash.h
intern/elbeem/CMakeLists.txt
intern/ghost/GHOST_C-api.h
intern/ghost/GHOST_IEvent.h
intern/ghost/GHOST_IEventConsumer.h
intern/ghost/GHOST_ISystem.h
intern/ghost/GHOST_ISystemPaths.h
intern/ghost/GHOST_ITimerTask.h
intern/ghost/GHOST_IWindow.h
intern/ghost/GHOST_Path-api.h
intern/ghost/GHOST_Rect.h
intern/ghost/GHOST_Types.h
intern/ghost/intern/GHOST_Buttons.cpp
intern/ghost/intern/GHOST_Buttons.h
intern/ghost/intern/GHOST_C-api.cpp
intern/ghost/intern/GHOST_CallbackEventConsumer.cpp
intern/ghost/intern/GHOST_CallbackEventConsumer.h
intern/ghost/intern/GHOST_DisplayManager.cpp
intern/ghost/intern/GHOST_DisplayManagerCarbon.cpp
intern/ghost/intern/GHOST_DisplayManagerCarbon.h
intern/ghost/intern/GHOST_DisplayManagerNULL.h
intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
intern/ghost/intern/GHOST_DisplayManagerSDL.h
intern/ghost/intern/GHOST_DisplayManagerWin32.cpp
intern/ghost/intern/GHOST_DisplayManagerX11.cpp
intern/ghost/intern/GHOST_DisplayManagerX11.h
intern/ghost/intern/GHOST_DropTargetWin32.cpp
intern/ghost/intern/GHOST_DropTargetWin32.h
intern/ghost/intern/GHOST_DropTargetX11.cpp
intern/ghost/intern/GHOST_DropTargetX11.h
intern/ghost/intern/GHOST_Event.h
intern/ghost/intern/GHOST_EventButton.h
intern/ghost/intern/GHOST_EventCursor.h
intern/ghost/intern/GHOST_EventDragnDrop.h
intern/ghost/intern/GHOST_EventKey.h
intern/ghost/intern/GHOST_EventManager.cpp
intern/ghost/intern/GHOST_EventManager.h
intern/ghost/intern/GHOST_EventNDOF.h
intern/ghost/intern/GHOST_EventPrinter.cpp
intern/ghost/intern/GHOST_EventPrinter.h
intern/ghost/intern/GHOST_EventString.h
intern/ghost/intern/GHOST_EventTrackpad.h
intern/ghost/intern/GHOST_EventWheel.h
intern/ghost/intern/GHOST_ISystem.cpp
intern/ghost/intern/GHOST_ISystemPaths.cpp
intern/ghost/intern/GHOST_ModifierKeys.cpp
intern/ghost/intern/GHOST_ModifierKeys.h
intern/ghost/intern/GHOST_NDOFManager.cpp
intern/ghost/intern/GHOST_NDOFManager.h
intern/ghost/intern/GHOST_NDOFManagerWin32.cpp
intern/ghost/intern/GHOST_NDOFManagerX11.cpp
intern/ghost/intern/GHOST_Path-api.cpp
intern/ghost/intern/GHOST_Rect.cpp
intern/ghost/intern/GHOST_System.cpp
intern/ghost/intern/GHOST_System.h
intern/ghost/intern/GHOST_SystemCarbon.cpp
intern/ghost/intern/GHOST_SystemCarbon.h
intern/ghost/intern/GHOST_SystemCocoa.h
intern/ghost/intern/GHOST_SystemNULL.h
intern/ghost/intern/GHOST_SystemPaths.h
intern/ghost/intern/GHOST_SystemPathsCarbon.cpp
intern/ghost/intern/GHOST_SystemPathsCarbon.h
intern/ghost/intern/GHOST_SystemPathsCocoa.h
intern/ghost/intern/GHOST_SystemPathsWin32.cpp
intern/ghost/intern/GHOST_SystemPathsWin32.h
intern/ghost/intern/GHOST_SystemPathsX11.cpp
intern/ghost/intern/GHOST_SystemPathsX11.h
intern/ghost/intern/GHOST_SystemSDL.cpp
intern/ghost/intern/GHOST_SystemSDL.h
intern/ghost/intern/GHOST_SystemWin32.cpp
intern/ghost/intern/GHOST_SystemWin32.h
intern/ghost/intern/GHOST_SystemX11.cpp
intern/ghost/intern/GHOST_SystemX11.h
intern/ghost/intern/GHOST_TaskbarWin32.h
intern/ghost/intern/GHOST_TimerManager.cpp
intern/ghost/intern/GHOST_TimerManager.h
intern/ghost/intern/GHOST_TimerTask.h
intern/ghost/intern/GHOST_Window.cpp
intern/ghost/intern/GHOST_Window.h
intern/ghost/intern/GHOST_WindowCarbon.cpp
intern/ghost/intern/GHOST_WindowCarbon.h
intern/ghost/intern/GHOST_WindowCocoa.h
intern/ghost/intern/GHOST_WindowCocoa.mm
intern/ghost/intern/GHOST_WindowManager.cpp
intern/ghost/intern/GHOST_WindowManager.h
intern/ghost/intern/GHOST_WindowNULL.h
intern/ghost/intern/GHOST_WindowSDL.cpp
intern/ghost/intern/GHOST_WindowSDL.h
intern/ghost/intern/GHOST_WindowWin32.cpp
intern/ghost/intern/GHOST_WindowWin32.h
intern/ghost/intern/GHOST_WindowX11.cpp
intern/ghost/intern/GHOST_WindowX11.h
intern/ghost/test/gears/GHOST_Test.cpp
release/scripts/startup/bl_operators/wm.py
release/scripts/startup/bl_ui/properties_data_modifier.py
release/scripts/startup/bl_ui/space_info.py
release/scripts/startup/bl_ui/space_sequencer.py
release/scripts/startup/bl_ui/space_userpref.py
release/scripts/startup/bl_ui/space_view3d.py
source/blender/avi/intern/avi.c
source/blender/avi/intern/avirgb.c
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/BKE_sequencer.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/intern/CCGSubSurf.c
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/context.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/customdata.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/editderivedmesh.c
source/blender/blenkernel/intern/fcurve.c
source/blender/blenkernel/intern/font.c
source/blender/blenkernel/intern/group.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/image_gen.c
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/lattice.c
source/blender/blenkernel/intern/mball.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/mesh_validate.c
source/blender/blenkernel/intern/modifier.c
source/blender/blenkernel/intern/movieclip.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/ocean.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/screen.c
source/blender/blenkernel/intern/seqeffects.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/smoke.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenkernel/intern/text.c
source/blender/blenkernel/intern/texture.c
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/blenlib/intern/BLI_args.c
source/blender/blenlib/intern/BLI_kdopbvh.c
source/blender/blenlib/intern/fnmatch.c
source/blender/blenlib/intern/math_rotation.c
source/blender/blenlib/intern/path_util.c
source/blender/blenlib/intern/pbvh.c
source/blender/blenlib/intern/string.c
source/blender/blenlib/intern/uvproject.c
source/blender/blenlib/intern/winstuff.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/versioning_250.c
source/blender/blenloader/intern/versioning_legacy.c
source/blender/blenloader/intern/writefile.c
source/blender/bmesh/bmesh.h
source/blender/bmesh/intern/bmesh_mods.c
source/blender/bmesh/intern/bmesh_operators.c
source/blender/bmesh/intern/bmesh_polygon.c
source/blender/bmesh/intern/bmesh_queries.c
source/blender/bmesh/operators/bmo_connect.c
source/blender/bmesh/operators/bmo_create.c
source/blender/bmesh/operators/bmo_utils.c
source/blender/bmesh/tools/BME_bevel.c
source/blender/compositor/CMakeLists.txt
source/blender/compositor/nodes/COM_DilateErodeNode.cpp
source/blender/compositor/nodes/COM_GlareNode.cpp
source/blender/compositor/nodes/COM_ImageNode.cpp
source/blender/compositor/nodes/COM_OutputFileNode.cpp
source/blender/compositor/nodes/COM_TimeNode.cpp
source/blender/compositor/operations/COM_BokehImageOperation.cpp
source/blender/compositor/operations/COM_DilateErodeOperation.cpp
source/blender/compositor/operations/COM_DilateErodeOperation.h
source/blender/compositor/operations/COM_GlareBaseOperation.cpp
source/blender/compositor/operations/COM_ImageOperation.cpp
source/blender/compositor/operations/COM_MapUVOperation.h
source/blender/compositor/operations/COM_MovieClipOperation.cpp
source/blender/compositor/operations/COM_OpenCLKernels.cl
source/blender/compositor/operations/COM_OpenCLKernels.cl.cpp
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/anim_draw.c
source/blender/editors/animation/drivers.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/editarmature_retarget.c
source/blender/editors/armature/meshlaplacian.c
source/blender/editors/armature/poseobject.c
source/blender/editors/armature/reeb.c
source/blender/editors/curve/editcurve.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/interface/interface_draw.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_ops.c
source/blender/editors/interface/interface_panel.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/interface/resources.c
source/blender/editors/interface/view2d.c
source/blender/editors/mesh/editface.c
source/blender/editors/mesh/editmesh_knife.c
source/blender/editors/mesh/editmesh_rip.c
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_bake.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_ops.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_select.c
source/blender/editors/object/object_transform.c
source/blender/editors/physics/physics_fluid.c
source/blender/editors/render/render_internal.c
source/blender/editors/render/render_preview.c
source/blender/editors/render/render_shading.c
source/blender/editors/screen/area.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/screen/screendump.c
source/blender/editors/sculpt_paint/paint_cursor.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_ops.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/space_clip/clip_draw.c
source/blender/editors/space_clip/clip_ops.c
source/blender/editors/space_console/console_ops.c
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_file/file_panels.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_file/filesel.c
source/blender/editors/space_file/fsmenu.c
source/blender/editors/space_file/fsmenu.h
source/blender/editors/space_file/space_file.c
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_nla/nla_buttons.c
source/blender/editors/space_nla/nla_draw.c
source/blender/editors/space_nla/nla_edit.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_sequencer/sequencer_select.c
source/blender/editors/space_text/text_draw.c
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_time/space_time.c
source/blender/editors/space_userpref/space_userpref.c
source/blender/editors/space_view3d/drawarmature.c
source/blender/editors/space_view3d/drawmesh.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_fly.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_toolbar.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_input.c
source/blender/editors/transform/transform_manipulator.c
source/blender/editors/transform/transform_orientations.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/util/editmode_undo.c
source/blender/editors/util/undo.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/editors/uvedit/uvedit_parametrizer.c
source/blender/editors/uvedit/uvedit_smart_stitch.c
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_material.c
source/blender/gpu/shaders/gpu_shader_material.glsl
source/blender/gpu/shaders/gpu_shader_material.glsl.c
source/blender/ikplugin/intern/itasc_plugin.cpp
source/blender/imbuf/intern/anim_movie.c
source/blender/imbuf/intern/cineon/cineon_dpx.c
source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
source/blender/imbuf/intern/filetype.c
source/blender/imbuf/intern/filter.c
source/blender/imbuf/intern/indexer.c
source/blender/imbuf/intern/indexer_dv.c
source/blender/imbuf/intern/jp2.c
source/blender/imbuf/intern/moviecache.c
source/blender/imbuf/intern/png.c
source/blender/imbuf/intern/scaling.c
source/blender/imbuf/intern/targa.c
source/blender/imbuf/intern/tiff.c
source/blender/imbuf/intern/util.c
source/blender/makesdna/DNA_modifier_types.h
source/blender/makesdna/DNA_node_types.h
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/intern/dna_genfile.c
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_controller.c
source/blender/makesrna/intern/rna_dynamicpaint.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_mesh.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_nodetree_types.h
source/blender/makesrna/intern/rna_object_api.c
source/blender/makesrna/intern/rna_rna.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_sequencer.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_wm.c
source/blender/modifiers/intern/MOD_collision.c
source/blender/modifiers/intern/MOD_dynamicpaint.c
source/blender/modifiers/intern/MOD_mask.c
source/blender/modifiers/intern/MOD_remesh.c
source/blender/modifiers/intern/MOD_screw.c
source/blender/nodes/CMakeLists.txt
source/blender/nodes/NOD_shader.h
source/blender/nodes/composite/node_composite_util.c
source/blender/nodes/composite/nodes/node_composite_blur.c
source/blender/nodes/composite/nodes/node_composite_defocus.c
source/blender/nodes/composite/nodes/node_composite_image.c
source/blender/nodes/composite/nodes/node_composite_outputFile.c
source/blender/nodes/intern/node_common.c
source/blender/nodes/intern/node_exec.c
source/blender/nodes/intern/node_util.c
source/blender/nodes/shader/node_shader_util.c
source/blender/nodes/shader/nodes/node_shader_object_info.c [new file with mode: 0644]
source/blender/nodes/shader/nodes/node_shader_tex_environment.c
source/blender/nodes/shader/nodes/node_shader_tex_image.c
source/blender/python/bmesh/bmesh_py_types.c
source/blender/python/generic/bpy_internal_import.c
source/blender/python/generic/idprop_py_api.c
source/blender/python/generic/py_capi_utils.c
source/blender/python/intern/bpy_driver.c
source/blender/python/intern/bpy_interface.c
source/blender/python/intern/bpy_library.c
source/blender/python/intern/bpy_operator.c
source/blender/python/intern/bpy_props.c
source/blender/python/intern/bpy_rna.c
source/blender/python/mathutils/mathutils_Quaternion.c
source/blender/quicktime/apple/quicktime_export.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/envmap.c
source/blender/render/intern/source/initrender.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/pixelshading.c
source/blender/render/intern/source/rayshade.c
source/blender/render/intern/source/render_texture.c
source/blender/render/intern/source/rendercore.c
source/blender/render/intern/source/renderdatabase.c
source/blender/render/intern/source/shadeoutput.c
source/blender/render/intern/source/sss.c
source/blender/render/intern/source/zbuf.c
source/blender/windowmanager/intern/wm_draw.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_gesture.c
source/blender/windowmanager/intern/wm_jobs.c
source/blender/windowmanager/intern/wm_keymap.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/intern/wm_window.c
source/blenderplayer/bad_level_call_stubs/stubs.c
source/creator/creator.c
source/gameengine/Converter/BL_MeshDeformer.cpp
source/gameengine/GameLogic/SCA_IController.h
source/gameengine/GameLogic/SCA_ISensor.cpp
source/gameengine/Ketsji/KX_PythonInit.cpp
source/gameengine/Network/LoopBackNetwork/NG_LoopBackNetworkDeviceInterface.h
source/gameengine/Rasterizer/RAS_IRasterizer.h
source/gameengine/SceneGraph/SG_Spatial.cpp

index 69812be1e50fec6268e705a6c72b7d846da0b9f5..4f86aa0d7f2b698dea2f5d01d17f177165af67ec 100644 (file)
@@ -103,8 +103,8 @@ enable_testing()
 #-----------------------------------------------------------------------------
 # Redirect output files
 
-set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE INTERNAL "" FORCE )
-set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL "" FORCE )
+set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE INTERNAL "" FORCE)
+set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL "" FORCE)
 
 #-----------------------------------------------------------------------------
 # Set default config options
@@ -1187,13 +1187,13 @@ elseif(APPLE)
        endif()
 
        if(${XCODE_VERSION} VERSION_LESS 4.3)
-               SET(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk CACHE PATH "" FORCE ) # use guaranteed existing sdk
+               set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk CACHE PATH "" FORCE)  # use guaranteed existing sdk
        else()
                # note: i don't use xcode-select path on purpose, cause also /Applications/Xcode.app would be allowed
                # absolute pathes are more foolproof here !
-               SET(OSX_SYSROOT_PREFIX /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform)
-               SET(OSX_DEVELOPER_PREFIX /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk) # use guaranteed existing sdk
-               SET(CMAKE_OSX_SYSROOT ${OSX_SYSROOT_PREFIX}/${OSX_DEVELOPER_PREFIX} CACHE PATH "" FORCE)
+               set(OSX_SYSROOT_PREFIX /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform)
+               set(OSX_DEVELOPER_PREFIX /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk) # use guaranteed existing sdk
+               set(CMAKE_OSX_SYSROOT ${OSX_SYSROOT_PREFIX}/${OSX_DEVELOPER_PREFIX} CACHE PATH "" FORCE)
        endif() 
        
        if(WITH_LIBS10.5)
@@ -1365,7 +1365,7 @@ elseif(APPLE)
                )
 
                set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
-               set(OPENCOLLADA_LIBRARIES "OpenCOLLADASaxFrameworkLoader -lOpenCOLLADAFramework -lOpenCOLLADABaseUtils -lOpenCOLLADAStreamWriter -lMathMLSolver -lGeneratedSaxParser -lUTF -lxml2 -lbuffer -lftoa" )
+               set(OPENCOLLADA_LIBRARIES "OpenCOLLADASaxFrameworkLoader -lOpenCOLLADAFramework -lOpenCOLLADABaseUtils -lOpenCOLLADAStreamWriter -lMathMLSolver -lGeneratedSaxParser -lUTF -lxml2 -lbuffer -lftoa")
                #pcre is bundled with openCollada
                #set(PCRE ${LIBDIR}/pcre)
                #set(PCRE_LIBPATH ${PCRE}/lib)
index 641aa88d6effedd7b8de353c645642b52678d911..405c7eada1d95d01c87e72d16b508ade2cdb6c21 100644 (file)
@@ -245,6 +245,7 @@ void BlenderSync::sync_object(BL::Object b_parent, int b_index, BL::Object b_ob,
        /* object sync */
        if(object_updated || (object->mesh && object->mesh->need_update)) {
                object->name = b_ob.name().c_str();
+               object->instance_id = b_index;
                object->pass_id = b_ob.pass_index();
                object->tfm = tfm;
                object->motion.pre = tfm;
index f79b99951651d5effcd8979632c9fb1aa97c1028..997909f1b9287d3722e836a24840ac380a014664 100644 (file)
@@ -220,6 +220,7 @@ void BlenderSession::render()
                buffer_params.passes = passes;
                scene->film->passes = passes;
                scene->film->tag_update(scene);
+               scene->integrator->tag_update(scene);
 
                /* update scene */
                sync->sync_data(b_v3d, b_engine.camera_override(), b_iter->name().c_str());
index b33de789631101e64be4d4fe83938d421448ffa7..59eeb25ed748a366c6119fcfb1eb27894877277a 100644 (file)
@@ -334,6 +334,10 @@ static ShaderNode *add_node(BL::BlendData b_data, ShaderGraph *graph, BL::Shader
                        node = new LightFalloffNode();
                        break;
                }
+               case BL::ShaderNode::type_OBJECT_INFO: {
+                       node = new ObjectInfoNode();
+                       break;
+               }
                case BL::ShaderNode::type_TEX_IMAGE: {
                        BL::ShaderNodeTexImage b_image_node(b_node);
                        BL::Image b_image(b_image_node.image());
index abe427d8345d7cf232ae46f6f9918fa49d725e33..05c45c490d851dedc2e99592116b16247973c504 100644 (file)
@@ -117,6 +117,16 @@ __device_inline void object_dir_transform(KernelGlobals *kg, ShaderData *sd, flo
 #endif
 }
 
+__device_inline float3 object_location(KernelGlobals *kg, ShaderData *sd)
+{
+#ifdef __MOTION__
+       return make_float3(sd->ob_tfm.x.w, sd->ob_tfm.y.w, sd->ob_tfm.z.w);
+#else
+       Transform tfm = object_fetch_transform(kg, sd->object, 0.0f, OBJECT_TRANSFORM);
+       return make_float3(tfm.x.w, tfm.y.w, tfm.z.w);
+#endif
+}
+
 __device_inline float object_surface_area(KernelGlobals *kg, int object)
 {
        int offset = object*OBJECT_SIZE + OBJECT_PROPERTIES;
@@ -134,5 +144,20 @@ __device_inline float object_pass_id(KernelGlobals *kg, int object)
        return f.y;
 }
 
+__device_inline float object_random_number(KernelGlobals *kg, int object)
+{
+       if(object == ~0)
+               return 0.0f;
+
+       int offset = object*OBJECT_SIZE + OBJECT_PROPERTIES;
+       float4 f = kernel_tex_fetch(__objects, offset);
+       return f.z;
+}
+
+__device int shader_pass_id(KernelGlobals *kg, ShaderData *sd)
+{
+       return kernel_tex_fetch(__shader_flag, (sd->shader & SHADER_MASK)*2 + 1);
+}
+
 CCL_NAMESPACE_END
 
index 2138038e49d974f0765465b79adb0cd59f2a563d..8e0d36705ada2d01f83440c9e64aa86a13779fb5 100644 (file)
@@ -679,11 +679,6 @@ __device bool shader_transparent_shadow(KernelGlobals *kg, Intersection *isect)
 }
 #endif
 
-__device int shader_pass_id(KernelGlobals *kg, ShaderData *sd)
-{
-       return kernel_tex_fetch(__shader_flag, (sd->shader & SHADER_MASK)*2 + 1);
-}
-
 /* Free ShaderData */
 
 __device void shader_release(KernelGlobals *kg, ShaderData *sd)
index 12ed61673d13ad327c356eb69914d99bffe94642..6a05639beb936c5ff50ba3d0c6bb0437df28f2bc 100644 (file)
@@ -266,6 +266,9 @@ __device_noinline void svm_eval_nodes(KernelGlobals *kg, ShaderData *sd, ShaderT
                        case NODE_LIGHT_PATH:
                                svm_node_light_path(sd, stack, node.y, node.z, path_flag);
                                break;
+                       case NODE_OBJECT_INFO:
+                               svm_node_object_info(kg, sd, stack, node.y, node.z);
+                               break;
 #endif
                        case NODE_CONVERT:
                                svm_node_convert(sd, stack, node.y, node.z, node.w);
index 77fe26c809e8b9518a6b6be0385c5525f6c51c56..dab19983946b6c3eec76e0465d9e2694e72b4fc8 100644 (file)
@@ -74,5 +74,25 @@ __device void svm_node_geometry_bump_dy(ShaderData *sd, float *stack, uint type,
 #endif
 }
 
+/* Object Info */
+
+__device void svm_node_object_info(KernelGlobals *kg, ShaderData *sd, float *stack, uint type, uint out_offset)
+{
+       float data;
+
+       switch(type) {
+               case NODE_INFO_OB_LOCATION: {
+                       stack_store_float3(stack, out_offset, object_location(kg, sd));
+                       return;
+               }
+               case NODE_INFO_OB_INDEX: data = object_pass_id(kg, sd->object); break;
+               case NODE_INFO_MAT_INDEX: data = shader_pass_id(kg, sd); break;
+               case NODE_INFO_OB_RANDOM: data = object_random_number(kg, sd->object); break;
+               default: data = 0.0f; break;
+       }
+
+       stack_store_float(stack, out_offset, data);
+}
+
 CCL_NAMESPACE_END
 
index aa924bcc38b5d02324c3347a9989e6a11c1bb7cf..9952557d61464c38f3ca1aa521fb60c1cf021baa 100644 (file)
@@ -87,7 +87,7 @@ __device void svm_node_tex_coord(KernelGlobals *kg, ShaderData *sd, float *stack
                }
                case NODE_TEXCO_REFLECTION: {
                        if(sd->object != ~0)
-                               data = sd->I - 2.0f*dot(sd->N, sd->I)*sd->N;
+                               data = 2.0f*dot(sd->N, sd->I)*sd->N - sd->I;
                        else
                                data = sd->I;
                        break;
@@ -136,7 +136,7 @@ __device void svm_node_tex_coord_bump_dx(KernelGlobals *kg, ShaderData *sd, floa
                }
                case NODE_TEXCO_REFLECTION: {
                        if(sd->object != ~0)
-                               data = sd->I - 2.0f*dot(sd->N, sd->I)*sd->N;
+                               data = 2.0f*dot(sd->N, sd->I)*sd->N - sd->I;
                        else
                                data = sd->I;
                        break;
@@ -188,7 +188,7 @@ __device void svm_node_tex_coord_bump_dy(KernelGlobals *kg, ShaderData *sd, floa
                }
                case NODE_TEXCO_REFLECTION: {
                        if(sd->object != ~0)
-                               data = sd->I - 2.0f*dot(sd->N, sd->I)*sd->N;
+                               data = 2.0f*dot(sd->N, sd->I)*sd->N - sd->I;
                        else
                                data = sd->I;
                        break;
index 867709f29e09b190b2a586a23284e3aff935b37b..97849736ef687c5fa18db58b531fbfc387ef8843 100644 (file)
@@ -92,7 +92,8 @@ typedef enum NodeType {
        NODE_RGB_RAMP = 5900,
        NODE_RGB_CURVES = 6000,
        NODE_MIN_MAX = 6100,
-       NODE_LIGHT_FALLOFF = 6200
+       NODE_LIGHT_FALLOFF = 6200,
+       NODE_OBJECT_INFO = 6300
 } NodeType;
 
 typedef enum NodeAttributeType {
@@ -109,6 +110,13 @@ typedef enum NodeGeometry {
        NODE_GEOM_uv
 } NodeGeometry;
 
+typedef enum NodeObjectInfo {
+       NODE_INFO_OB_LOCATION,
+       NODE_INFO_OB_INDEX,
+       NODE_INFO_MAT_INDEX,
+       NODE_INFO_OB_RANDOM
+} NodeObjectInfo;
+
 typedef enum NodeLightPath {
        NODE_LP_camera = 0,
        NODE_LP_shadow,
index 55c89b7b1b2641ed3cc7835e06079900c8fc2c19..878aa87510e9056ea1cbdb10b7cdc53fbf76e2b2 100644 (file)
@@ -298,7 +298,6 @@ bool Film::modified(const Film& film)
 
 void Film::tag_update(Scene *scene)
 {
-       scene->integrator->tag_update(scene);
        need_update = true;
 }
 
index 57fe2fb01b7e71e706a5cb13f49ea6a2a6cabc4d..506458d82e14d30b8cc4bb23517a554658b3e03a 100644 (file)
@@ -1699,7 +1699,7 @@ void LightPathNode::compile(OSLCompiler& compiler)
        compiler.add(this, "node_light_path");
 }
 
-/* Light Path */
+/* Light Falloff */
 
 LightFalloffNode::LightFalloffNode()
 : ShaderNode("light_path")
@@ -1746,6 +1746,49 @@ void LightFalloffNode::compile(OSLCompiler& compiler)
        compiler.add(this, "node_light_falloff");
 }
 
+/* Object Info */
+
+ObjectInfoNode::ObjectInfoNode()
+: ShaderNode("object_info")
+{
+       add_output("Location", SHADER_SOCKET_VECTOR);
+       add_output("Object Index", SHADER_SOCKET_FLOAT);
+       add_output("Material Index", SHADER_SOCKET_FLOAT);
+       add_output("Random", SHADER_SOCKET_FLOAT);
+}
+
+void ObjectInfoNode::compile(SVMCompiler& compiler)
+{
+       ShaderOutput *out = output("Location");
+       if(!out->links.empty()) {
+               compiler.stack_assign(out);
+               compiler.add_node(NODE_OBJECT_INFO, NODE_INFO_OB_LOCATION, out->stack_offset);
+       }
+
+       out = output("Object Index");
+       if(!out->links.empty()) {
+               compiler.stack_assign(out);
+               compiler.add_node(NODE_OBJECT_INFO, NODE_INFO_OB_INDEX, out->stack_offset);
+       }
+
+       out = output("Material Index");
+       if(!out->links.empty()) {
+               compiler.stack_assign(out);
+               compiler.add_node(NODE_OBJECT_INFO, NODE_INFO_MAT_INDEX, out->stack_offset);
+       }
+
+       out = output("Random");
+       if(!out->links.empty()) {
+               compiler.stack_assign(out);
+               compiler.add_node(NODE_OBJECT_INFO, NODE_INFO_OB_RANDOM, out->stack_offset);
+       }
+}
+
+void ObjectInfoNode::compile(OSLCompiler& compiler)
+{
+       compiler.add(this, "node_object_info");
+}
+
 /* Value */
 
 ValueNode::ValueNode()
index ff9e3647d0134da7dc28d9c8edd2e2ed2497e606..2d0d58d1e949805dcadee2578f05209d2f388183 100644 (file)
@@ -285,6 +285,11 @@ public:
        SHADER_NODE_CLASS(LightFalloffNode)
 };
 
+class ObjectInfoNode : public ShaderNode {
+public:
+       SHADER_NODE_CLASS(ObjectInfoNode)
+};
+
 class ValueNode : public ShaderNode {
 public:
        SHADER_NODE_CLASS(ValueNode)
index cae69c06f7dc13380cfc1138fa5734bec7fa8054..e38b2635f90a1e8cee6549d92c69b4d01f37df9e 100644 (file)
@@ -23,6 +23,7 @@
 #include "scene.h"
 
 #include "util_foreach.h"
+#include "util_hash.h"
 #include "util_map.h"
 #include "util_progress.h"
 
@@ -36,6 +37,7 @@ Object::Object()
        mesh = NULL;
        tfm = transform_identity();
        visibility = ~0;
+       instance_id = 0;
        pass_id = 0;
        bounds = BoundBox::empty;
        motion.pre = transform_identity();
@@ -164,6 +166,9 @@ void ObjectManager::device_update_transforms(Device *device, DeviceScene *dscene
                float surface_area = 0.0f;
                float pass_id = ob->pass_id;
                
+               uint ob_hash = hash_int_2d(hash_string(ob->name.c_str()), ob->instance_id);
+               float random_number = (float)ob_hash * (1.0f/(float)0xFFFFFFFF);
+               
                if(transform_uniform_scale(tfm, uniform_scale)) {
                        map<Mesh*, float>::iterator it = surface_area_map.find(mesh);
 
@@ -198,7 +203,7 @@ void ObjectManager::device_update_transforms(Device *device, DeviceScene *dscene
 
                memcpy(&objects[offset], &tfm, sizeof(float4)*3);
                memcpy(&objects[offset+3], &itfm, sizeof(float4)*3);
-               objects[offset+6] = make_float4(surface_area, pass_id, 0.0f, 0.0f);
+               objects[offset+6] = make_float4(surface_area, pass_id, random_number, 0.0f);
 
                if(need_motion == Scene::MOTION_PASS) {
                        /* motion transformations, is world/object space depending if mesh
index 267052bfca778bc764724b7a6d4a6620bdc66d42..b8169e3758e836b3fabe43723b7d2e7b70023abf 100644 (file)
@@ -41,6 +41,7 @@ public:
        Transform tfm;
        BoundBox bounds;
        ustring name;
+       int instance_id;
        int pass_id;
        vector<ParamValue> attributes;
        uint visibility;
index 16901dab38ebd77feed4c2de77a703142af15e67..c31b46e1580647ad36924110a030ea67bfed08bb 100644 (file)
 #ifndef __UTIL_HASH_H__
 #define __UTIL_HASH_H__
 
+#include "util_types.h"
+
 CCL_NAMESPACE_BEGIN
 
-static inline unsigned int hash_int_2d(unsigned int kx, unsigned int ky)
+static inline uint hash_int_2d(uint kx, uint ky)
 {
        #define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k))))
 
-       unsigned int a, b, c;
+       uint a, b, c;
 
        a = b = c = 0xdeadbeef + (2 << 2) + 13;
        a += kx;
@@ -44,11 +46,21 @@ static inline unsigned int hash_int_2d(unsigned int kx, unsigned int ky)
        #undef rot
 }
 
-static inline unsigned int hash_int(unsigned int k)
+static inline uint hash_int(uint k)
 {
        return hash_int_2d(k, 0);
 }
 
+static inline uint hash_string(const char *str)
+{
+       uint i = 0, c;
+
+       while ((c = *str++))
+               i = i * 37 + c;
+
+       return i;
+}
+
 CCL_NAMESPACE_END
 
 #endif /* __UTIL_HASH_H__ */
index 064269b02bcd9aae0926af00209460395ba6fbd2..e9d29561121618d2d6a9b94d92534952502716a7 100644 (file)
@@ -86,9 +86,12 @@ set(SRC
        intern/solver_interface.h
        intern/solver_relax.h
        intern/utilities.h
-    intern/globals.h
+       intern/globals.h
 )
 
+# elbeem has some harmless UNUSED warnings
+remove_strict_flags()
+
 add_definitions(
        -DNOGUI
        -DELBEEM_BLENDER=1
index 3add5ccb60a5c181efbb0bdde3dd3024172d38f1..7f33f2bdcde31336b251f4d239ab4e9eef276d5b 100644 (file)
@@ -30,7 +30,7 @@
  * \brief GHOST C-API function and type declarations.
  */
 
-#ifndef        __GHOST_C_API_H__
+#ifndef __GHOST_C_API_H__
 #define __GHOST_C_API_H__
 
 #include "GHOST_Types.h"
@@ -113,10 +113,10 @@ extern GHOST_TUns64 GHOST_GetMilliSeconds(GHOST_SystemHandle systemhandle);
  * @return A timer task (0 if timer task installation failed).
  */
 extern GHOST_TimerTaskHandle GHOST_InstallTimer(GHOST_SystemHandle systemhandle,
-                                                                                               GHOST_TUns64 delay,
-                                                                                               GHOST_TUns64 interval,
-                                                                                               GHOST_TimerProcPtr timerProc,
-                                                                                               GHOST_TUserDataPtr userData);
+                                                GHOST_TUns64 delay,
+                                                GHOST_TUns64 interval,
+                                                GHOST_TimerProcPtr timerProc,
+                                                GHOST_TUserDataPtr userData);
 
 /**
  * Removes a timer.
@@ -125,11 +125,11 @@ extern GHOST_TimerTaskHandle GHOST_InstallTimer(GHOST_SystemHandle systemhandle,
  * @return Indication of success.
  */
 extern GHOST_TSuccess GHOST_RemoveTimer(GHOST_SystemHandle systemhandle,
-                                                                               GHOST_TimerTaskHandle timertaskhandle);
+                                        GHOST_TimerTaskHandle timertaskhandle);
 
 /***************************************************************************************
- ** Display/window management functionality
- ***************************************************************************************/
+** Display/window management functionality
+***************************************************************************************/
 
 /**
  * Returns the number of displays on this system.
@@ -146,8 +146,8 @@ extern GHOST_TUns8 GHOST_GetNumDisplays(GHOST_SystemHandle systemhandle);
  * @return void.
  */
 extern void GHOST_GetMainDisplayDimensions(GHOST_SystemHandle systemhandle,
-                                                                                  GHOST_TUns32* width,
-                                                                                  GHOST_TUns32* height);
+                                           GHOST_TUns32 *width,
+                                           GHOST_TUns32 *height);
 
 /**
  * Create a new window.
@@ -166,15 +166,15 @@ extern void GHOST_GetMainDisplayDimensions(GHOST_SystemHandle systemhandle,
  * @return     A handle to the new window ( == NULL if creation failed).
  */
 extern GHOST_WindowHandle GHOST_CreateWindow(GHOST_SystemHandle systemhandle,
-       const char* title,
-       GHOST_TInt32 left,
-       GHOST_TInt32 top,
-       GHOST_TUns32 width,
-       GHOST_TUns32 height,
-       GHOST_TWindowState state,
-       GHOST_TDrawingContextType type,
-       const int stereoVisual,
-       const GHOST_TUns16 numOfAASamples);
+                                             const char *title,
+                                             GHOST_TInt32 left,
+                                             GHOST_TInt32 top,
+                                             GHOST_TUns32 width,
+                                             GHOST_TUns32 height,
+                                             GHOST_TWindowState state,
+                                             GHOST_TDrawingContextType type,
+                                             const int stereoVisual,
+                                             const GHOST_TUns16 numOfAASamples);
 
 /**
  * Returns the window user data.
@@ -189,7 +189,7 @@ extern GHOST_TUserDataPtr GHOST_GetWindowUserData(GHOST_WindowHandle windowhandl
  * @param data The window user data.
  */
 extern void GHOST_SetWindowUserData(GHOST_WindowHandle windowhandle, 
-       GHOST_TUserDataPtr userdata);
+                                    GHOST_TUserDataPtr userdata);
 
 /**
  * Dispose a window.
@@ -198,7 +198,7 @@ extern void GHOST_SetWindowUserData(GHOST_WindowHandle windowhandle,
  * @return     Indication of success.
  */
 extern GHOST_TSuccess GHOST_DisposeWindow(GHOST_SystemHandle systemhandle,
-                                                                                 GHOST_WindowHandle windowhandle);
+                                          GHOST_WindowHandle windowhandle);
 
 /**
  * Returns whether a window is valid.
@@ -207,7 +207,7 @@ extern GHOST_TSuccess GHOST_DisposeWindow(GHOST_SystemHandle systemhandle,
  * @return     Indication of validity.
  */
 extern int GHOST_ValidWindow(GHOST_SystemHandle systemhandle,
-                                                                               GHOST_WindowHandle windowhandle);
+                             GHOST_WindowHandle windowhandle);
 
 /**
  * Begins full screen mode.
@@ -217,8 +217,8 @@ extern int GHOST_ValidWindow(GHOST_SystemHandle systemhandle,
  *                                     This window is invalid after full screen has been ended.
  */
 extern GHOST_WindowHandle GHOST_BeginFullScreen(GHOST_SystemHandle systemhandle,
-       GHOST_DisplaySetting* setting,
-       const int stereoVisual);
+                                                GHOST_DisplaySetting *setting,
+                                                const int stereoVisual);
 
 /**
  * Ends full screen mode.
@@ -235,8 +235,8 @@ extern GHOST_TSuccess GHOST_EndFullScreen(GHOST_SystemHandle systemhandle);
 extern int GHOST_GetFullScreen(GHOST_SystemHandle systemhandle);
 
 /***************************************************************************************
- ** Event management functionality
- ***************************************************************************************/
+** Event management functionality
+***************************************************************************************/
 
 /**
  * Retrieves events from the system and stores them in the queue.
@@ -261,7 +261,7 @@ extern int GHOST_DispatchEvents(GHOST_SystemHandle systemhandle);
  * @return Indication of success.
  */
 extern GHOST_TSuccess GHOST_AddEventConsumer(GHOST_SystemHandle systemhandle,
-                                                                                         GHOST_EventConsumerHandle consumerhandle);
+                                             GHOST_EventConsumerHandle consumerhandle);
 
 /**
  * Remove the given event consumer to our list.
@@ -270,11 +270,11 @@ extern GHOST_TSuccess GHOST_AddEventConsumer(GHOST_SystemHandle systemhandle,
  * @return Indication of success.
  */
 extern GHOST_TSuccess GHOST_RemoveEventConsumer(GHOST_SystemHandle systemhandle,
-                                                                                         GHOST_EventConsumerHandle consumerhandle);
+                                                GHOST_EventConsumerHandle consumerhandle);
 
 /***************************************************************************************
- ** Progress bar functionality
- ***************************************************************************************/
+** Progress bar functionality
+***************************************************************************************/
 
 /**
  * Sets the progress bar value displayed in the window/application icon
@@ -290,8 +290,8 @@ extern GHOST_TSuccess GHOST_SetProgressBar(GHOST_WindowHandle windowhandle, floa
 extern GHOST_TSuccess GHOST_EndProgressBar(GHOST_WindowHandle windowhandle);
 
 /***************************************************************************************
- ** Cursor management functionality
- ***************************************************************************************/
+** Cursor management functionality
+***************************************************************************************/
 
 /**
  * Returns the current cursor shape.
@@ -307,7 +307,7 @@ extern GHOST_TStandardCursor GHOST_GetCursorShape(GHOST_WindowHandle windowhandl
  * @return     Indication of success.
  */
 extern GHOST_TSuccess GHOST_SetCursorShape(GHOST_WindowHandle windowhandle,
-                                                                                  GHOST_TStandardCursor cursorshape);
+                                           GHOST_TStandardCursor cursorshape);
 
 /**
  * Set the shape of the cursor to a custom cursor.
@@ -319,10 +319,10 @@ extern GHOST_TSuccess GHOST_SetCursorShape(GHOST_WindowHandle windowhandle,
  * @return     Indication of success.
  */
 extern GHOST_TSuccess GHOST_SetCustomCursorShape(GHOST_WindowHandle windowhandle,
-                                                                                                GHOST_TUns8 bitmap[16][2], 
-                                                                                                GHOST_TUns8 mask[16][2], 
-                                                                                                int hotX, 
-                                                                                                int hotY);
+                                                 GHOST_TUns8 bitmap[16][2],
+                                                 GHOST_TUns8 mask[16][2],
+                                                 int hotX,
+                                                 int hotY);
 /**
  * Set the shape of the cursor to a custom cursor of specified size.
  * @param windowhandle The handle to the window
@@ -333,13 +333,13 @@ extern GHOST_TSuccess GHOST_SetCustomCursorShape(GHOST_WindowHandle windowhandle
  * @param      hotY    The Y coordinate of the cursor hotspot.
  * @param   fg_color, bg_color  Colors of the cursor
  * @return     Indication of success.
 */
+ */
 extern GHOST_TSuccess GHOST_SetCustomCursorShapeEx(GHOST_WindowHandle windowhandle,
-                                                                                                GHOST_TUns8 *bitmap, 
-                                                                                                GHOST_TUns8 *mask, 
-                                                                                                int sizex, int sizey, 
-                                                                                                int hotX,  int hotY,
-                                                                                                int fg_color, int bg_color );
+                                                   GHOST_TUns8 *bitmap,
+                                                   GHOST_TUns8 *mask,
+                                                   int sizex, int sizey,
+                                                   int hotX,  int hotY,
+                                                   int fg_color, int bg_color);
 
 /**
  * Returns the visibility state of the cursor.
@@ -355,7 +355,7 @@ extern int GHOST_GetCursorVisibility(GHOST_WindowHandle windowhandle);
  * @return     Indication of success.
  */
 extern GHOST_TSuccess GHOST_SetCursorVisibility(GHOST_WindowHandle windowhandle,
-                                                                                               int visible);
+                                                int visible);
 
 /**
  * Returns the current location of the cursor (location in screen coordinates)
@@ -365,8 +365,8 @@ extern GHOST_TSuccess GHOST_SetCursorVisibility(GHOST_WindowHandle windowhandle,
  * @return                     Indication of success.
  */
 extern GHOST_TSuccess GHOST_GetCursorPosition(GHOST_SystemHandle systemhandle,
-                                                                                         GHOST_TInt32* x,
-                                                                                         GHOST_TInt32* y);
+                                              GHOST_TInt32 *x,
+                                              GHOST_TInt32 *y);
 
 /**
  * Updates the location of the cursor (location in screen coordinates).
@@ -377,8 +377,8 @@ extern GHOST_TSuccess GHOST_GetCursorPosition(GHOST_SystemHandle systemhandle,
  * @return                     Indication of success.
  */
 extern GHOST_TSuccess GHOST_SetCursorPosition(GHOST_SystemHandle systemhandle,
-                                                                                         GHOST_TInt32 x,
-                                                                                         GHOST_TInt32 y);
+                                              GHOST_TInt32 x,
+                                              GHOST_TInt32 y);
 
 /**
  * Grabs the cursor for a modal operation, to keep receiving
@@ -390,12 +390,12 @@ extern GHOST_TSuccess GHOST_SetCursorPosition(GHOST_SystemHandle systemhandle,
  * @return     Indication of success.
  */
 extern GHOST_TSuccess GHOST_SetCursorGrab(GHOST_WindowHandle windowhandle,
-                                                                                               GHOST_TGrabCursorMode mode,
-                                                                                               int* bounds);
+                                          GHOST_TGrabCursorMode mode,
+                                          int *bounds);
 
 /***************************************************************************************
- ** Access to mouse button and keyboard states.
- ***************************************************************************************/
+** Access to mouse button and keyboard states.
+***************************************************************************************/
 
 /**
  * Returns the state of a modifier key (ouside the message queue).
@@ -405,8 +405,8 @@ extern GHOST_TSuccess GHOST_SetCursorGrab(GHOST_WindowHandle windowhandle,
  * @return                     Indication of success.
  */
 extern GHOST_TSuccess GHOST_GetModifierKeyState(GHOST_SystemHandle systemhandle,
-                                                                                               GHOST_TModifierKeyMask mask,
-                                                                                               int* isDown);
+                                                GHOST_TModifierKeyMask mask,
+                                                int *isDown);
 
 /**
  * Returns the state of a mouse button (ouside the message queue).
@@ -416,13 +416,13 @@ extern GHOST_TSuccess GHOST_GetModifierKeyState(GHOST_SystemHandle systemhandle,
  * @return                     Indication of success.
  */
 extern GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle,
-                                                                                  GHOST_TButtonMask mask,
-                                                                                  int* isDown);
+                                           GHOST_TButtonMask mask,
+                                           int *isDown);
 
 
 /***************************************************************************************
- ** Drag'n'drop operations
- ***************************************************************************************/
+** Drag'n'drop operations
+***************************************************************************************/
 
 /**
  * Tells if the ongoing drag'n'drop object can be accepted upon mouse drop
@@ -472,7 +472,7 @@ extern GHOST_TimerProcPtr GHOST_GetTimerProc(GHOST_TimerTaskHandle timertaskhand
  * @param timerProc The timer callback.
  */
 extern void GHOST_SetTimerProc(GHOST_TimerTaskHandle timertaskhandle,
-                                                          GHOST_TimerProcPtr timerProc);
+                               GHOST_TimerProcPtr timerProc);
 
 /**
  * Returns the timer user data.
@@ -487,7 +487,7 @@ extern GHOST_TUserDataPtr GHOST_GetTimerTaskUserData(GHOST_TimerTaskHandle timer
  * @param data The timer user data.
  */
 extern void GHOST_SetTimerTaskUserData(GHOST_TimerTaskHandle timertaskhandle,
-                                                                          GHOST_TUserDataPtr userData);
+                                       GHOST_TUserDataPtr userData);
 
 /**
  * Returns indication as to whether the window is valid.
@@ -510,7 +510,7 @@ extern GHOST_TDrawingContextType GHOST_GetDrawingContextType(GHOST_WindowHandle
  * @return Indication as to whether installation has succeeded.
  */
 extern GHOST_TSuccess GHOST_SetDrawingContextType(GHOST_WindowHandle windowhandle,
-                                                                                                 GHOST_TDrawingContextType type);
+                                                  GHOST_TDrawingContextType type);
 
 /**
  * Sets the title displayed in the title bar.
@@ -518,7 +518,7 @@ extern GHOST_TSuccess GHOST_SetDrawingContextType(GHOST_WindowHandle windowhandl
  * @param title        The title to display in the title bar.
  */
 extern void GHOST_SetTitle(GHOST_WindowHandle windowhandle,
-                                                  const char* title);
+                           const char *title);
 
 /**
  * Returns the title displayed in the title bar. The title
@@ -527,7 +527,7 @@ extern void GHOST_SetTitle(GHOST_WindowHandle windowhandle,
  * @param windowhandle The handle to the window
  * @return The title, free with free().
  */
-extern charGHOST_GetTitle(GHOST_WindowHandle windowhandle);
+extern char *GHOST_GetTitle(GHOST_WindowHandle windowhandle);
 
 /**
  * Returns the window rectangle dimensions.
@@ -558,7 +558,7 @@ void GHOST_DisposeRectangle(GHOST_RectangleHandle rectanglehandle);
  * @return     Indication of success.
  */
 extern GHOST_TSuccess GHOST_SetClientWidth(GHOST_WindowHandle windowhandle,
-                                                                                  GHOST_TUns32 width);
+                                           GHOST_TUns32 width);
 
 /**
  * Resizes client rectangle height.
@@ -567,7 +567,7 @@ extern GHOST_TSuccess GHOST_SetClientWidth(GHOST_WindowHandle windowhandle,
  * @return     Indication of success.
  */
 extern GHOST_TSuccess GHOST_SetClientHeight(GHOST_WindowHandle windowhandle,
-                                                                                       GHOST_TUns32 height);
+                                            GHOST_TUns32 height);
 
 /**
  * Resizes client rectangle.
@@ -577,8 +577,8 @@ extern GHOST_TSuccess GHOST_SetClientHeight(GHOST_WindowHandle windowhandle,
  * @return                     Indication of success.
  */
 extern GHOST_TSuccess GHOST_SetClientSize(GHOST_WindowHandle windowhandle,
-                                                                                 GHOST_TUns32 width,
-                                                                                 GHOST_TUns32 height);
+                                          GHOST_TUns32 width,
+                                          GHOST_TUns32 height);
 
 /**
  * Converts a point in screen coordinates to client rectangle coordinates
@@ -589,10 +589,10 @@ extern GHOST_TSuccess GHOST_SetClientSize(GHOST_WindowHandle windowhandle,
  * @param outY The y-coordinate in the client rectangle.
  */
 extern void GHOST_ScreenToClient(GHOST_WindowHandle windowhandle,
-                                                                GHOST_TInt32 inX,
-                                                                GHOST_TInt32 inY,
-                                                                GHOST_TInt32* outX,
-                                                                GHOST_TInt32* outY);
+                                 GHOST_TInt32 inX,
+                                 GHOST_TInt32 inY,
+                                 GHOST_TInt32 *outX,
+                                 GHOST_TInt32 *outY);
 
 /**
  * Converts a point in screen coordinates to client rectangle coordinates
@@ -603,10 +603,10 @@ extern void GHOST_ScreenToClient(GHOST_WindowHandle windowhandle,
  * @param outY The y-coordinate on the screen.
  */
 extern void GHOST_ClientToScreen(GHOST_WindowHandle windowhandle,
-                                                                GHOST_TInt32 inX,
-                                                                GHOST_TInt32 inY,
-                                                                GHOST_TInt32* outX,
-                                                                GHOST_TInt32* outY);
+                                 GHOST_TInt32 inX,
+                                 GHOST_TInt32 inY,
+                                 GHOST_TInt32 *outX,
+                                 GHOST_TInt32 *outY);
 
 /**
  * Returns the state of the window (normal, minimized, maximized).
@@ -622,7 +622,7 @@ extern GHOST_TWindowState GHOST_GetWindowState(GHOST_WindowHandle windowhandle);
  * @return Indication of success.
  */
 extern GHOST_TSuccess GHOST_SetWindowState(GHOST_WindowHandle windowhandle,
-                                                                                  GHOST_TWindowState state);
+                                           GHOST_TWindowState state);
 
        
 /**
@@ -632,7 +632,7 @@ extern GHOST_TSuccess GHOST_SetWindowState(GHOST_WindowHandle windowhandle,
  * @return Indication of success.
  */
 extern GHOST_TSuccess GHOST_SetWindowModifiedState(GHOST_WindowHandle windowhandle,
-                                                                                                  GHOST_TUns8 isUnsavedChanges);
+                                                   GHOST_TUns8 isUnsavedChanges);
        
 /**
  * Sets the order of the window (bottom, top).
@@ -641,7 +641,7 @@ extern GHOST_TSuccess GHOST_SetWindowModifiedState(GHOST_WindowHandle windowhand
  * @return Indication of success.
  */
 extern GHOST_TSuccess GHOST_SetWindowOrder(GHOST_WindowHandle windowhandle,
-                                                                                  GHOST_TWindowOrder order);
+                                           GHOST_TWindowOrder order);
 
 /**
  * Swaps front and back buffers of a window.
@@ -694,10 +694,10 @@ extern GHOST_TInt32 GHOST_GetHeightRectangle(GHOST_RectangleHandle rectanglehand
  * @param      b       Pointer to return bottom coordinate in.
  */
 extern void GHOST_GetRectangle(GHOST_RectangleHandle rectanglehandle,
-                                                          GHOST_TInt32* l,
-                                                          GHOST_TInt32* t,
-                                                          GHOST_TInt32* r,
-                                                          GHOST_TInt32* b);
+                               GHOST_TInt32 *l,
+                               GHOST_TInt32 *t,
+                               GHOST_TInt32 *r,
+                               GHOST_TInt32 *b);
 
 /**
  * Sets all members of the rectangle.
@@ -708,10 +708,10 @@ extern void GHOST_GetRectangle(GHOST_RectangleHandle rectanglehandle,
  * @param      b       requested bottom coordinate of the rectangle
  */
 extern void GHOST_SetRectangle(GHOST_RectangleHandle rectanglehandle,
-                                                          GHOST_TInt32 l,
-                                                          GHOST_TInt32 t,
-                                                          GHOST_TInt32 r,
-                                                          GHOST_TInt32 b);
+                               GHOST_TInt32 l,
+                               GHOST_TInt32 t,
+                               GHOST_TInt32 r,
+                               GHOST_TInt32 b);
 
 /**
  * Returns whether this rectangle is empty.
@@ -736,7 +736,7 @@ extern GHOST_TSuccess GHOST_IsValidRectangle(GHOST_RectangleHandle rectanglehand
  * @param      i       The amount of offset given to each extreme (negative values shrink the rectangle).
  */
 extern void GHOST_InsetRectangle(GHOST_RectangleHandle rectanglehandle,
-                                                                GHOST_TInt32 i);
+                                 GHOST_TInt32 i);
 
 /**
  * Does a union of the rectangle given and this rectangle.
@@ -745,7 +745,7 @@ extern void GHOST_InsetRectangle(GHOST_RectangleHandle rectanglehandle,
  * @param      r       The rectangle that is input for the union operation.
  */
 extern void GHOST_UnionRectangle(GHOST_RectangleHandle rectanglehandle,
-                                                                GHOST_RectangleHandle anotherrectanglehandle);
+                                 GHOST_RectangleHandle anotherrectanglehandle);
 
 /**
  * Grows the rectangle to included a point.
@@ -754,8 +754,8 @@ extern void GHOST_UnionRectangle(GHOST_RectangleHandle rectanglehandle,
  * @param      y       The y-coordinate of the point.
  */
 extern void GHOST_UnionPointRectangle(GHOST_RectangleHandle rectanglehandle,
-                                                                         GHOST_TInt32 x,
-                                                                         GHOST_TInt32 y);
+                                      GHOST_TInt32 x,
+                                      GHOST_TInt32 y);
 
 /**
  * Returns whether the point is inside this rectangle.
@@ -766,8 +766,8 @@ extern void GHOST_UnionPointRectangle(GHOST_RectangleHandle rectanglehandle,
  * @return intean value (true if point is inside).
  */
 extern GHOST_TSuccess GHOST_IsInsideRectangle(GHOST_RectangleHandle rectanglehandle,
-                                                                                         GHOST_TInt32 x,
-                                                                                         GHOST_TInt32 y);
+                                              GHOST_TInt32 x,
+                                              GHOST_TInt32 y);
 
 /**
  * Returns whether the rectangle is inside this rectangle.
@@ -776,7 +776,7 @@ extern GHOST_TSuccess GHOST_IsInsideRectangle(GHOST_RectangleHandle rectanglehan
  * @return     visibility (not, partially or fully visible).
  */
 extern GHOST_TVisibility GHOST_GetRectangleVisibility(GHOST_RectangleHandle rectanglehandle,
-                                                                                                         GHOST_RectangleHandle anotherrectanglehandle);
+                                                      GHOST_RectangleHandle anotherrectanglehandle);
 
 /**
  * Sets rectangle members.
@@ -786,8 +786,8 @@ extern GHOST_TVisibility GHOST_GetRectangleVisibility(GHOST_RectangleHandle rect
  * @param      cy      requested center y-coordinate of the rectangle
  */
 extern void GHOST_SetCenterRectangle(GHOST_RectangleHandle rectanglehandle,
-                                                                        GHOST_TInt32 cx,
-                                                                        GHOST_TInt32 cy);
+                                     GHOST_TInt32 cx,
+                                     GHOST_TInt32 cy);
 
 /**
  * Sets rectangle members.
@@ -800,10 +800,10 @@ extern void GHOST_SetCenterRectangle(GHOST_RectangleHandle rectanglehandle,
  * @param      h       requested height of the rectangle
  */
 extern void GHOST_SetRectangleCenter(GHOST_RectangleHandle rectanglehandle,
-                                                                        GHOST_TInt32 cx,
-                                                                        GHOST_TInt32 cy,
-                                                                        GHOST_TInt32 w,
-                                                                        GHOST_TInt32 h);
+                                     GHOST_TInt32 cx,
+                                     GHOST_TInt32 cy,
+                                     GHOST_TInt32 w,
+                                     GHOST_TInt32 h);
 
 /**
  * Clips a rectangle.
@@ -814,14 +814,14 @@ extern void GHOST_SetRectangleCenter(GHOST_RectangleHandle rectanglehandle,
  * @return     whether clipping has occurred
  */
 extern GHOST_TSuccess GHOST_ClipRectangle(GHOST_RectangleHandle rectanglehandle,
-                                                                                 GHOST_RectangleHandle anotherrectanglehandle);
+                                          GHOST_RectangleHandle anotherrectanglehandle);
 
 /**
  * Return the data from the clipboad
  * @param      return the selection instead, X11 only feature
  * @return     clipboard data
  */
-extern GHOST_TUns8GHOST_getClipboard(int selection);
+extern GHOST_TUns8 *GHOST_getClipboard(int selection);
 
 /**
  * Put data to the Clipboard
index 05bd3553e012623f16d3b948ea2f89ba7edda1c0..3c3111a2e6d4c67df4e942692905f6c2ac7a7d04 100644 (file)
@@ -77,7 +77,7 @@ public:
         * or NULL if it is a 'system' event.
         * @return The generating window.
         */
-       virtual GHOST_IWindowgetWindow() = 0;
+       virtual GHOST_IWindow *getWindow() = 0;
        
        /**
         * Returns the event data.
@@ -87,8 +87,12 @@ public:
        
 #ifdef WITH_CXX_GUARDEDALLOC
 public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GHOST:GHOST_IEvent"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       void *operator new(size_t num_bytes) {
+               return MEM_mallocN(num_bytes, "GHOST:GHOST_IEvent");
+       }
+       void operator delete(void *mem) {
+               MEM_freeN(mem);
+       }
 #endif
 };
 
index 043cb27d1b2967cc1f8ca7b811a63b8a40f487ce..d437f219f8dc0b580c2b311991d15012b00e3197 100644 (file)
@@ -61,7 +61,7 @@ public:
         * @param       event   The event that can be handled or ignored.
         * @return      Indication as to whether the event was handled.
         */
-       virtual bool processEvent(GHOST_IEventevent) = 0;
+       virtual bool processEvent(GHOST_IEvent *event) = 0;
        
 #ifdef WITH_CXX_GUARDEDALLOC
 public:
index 890917f98222f6fded04fa71753cc0599259302b..bd4f3aed5aae7914816f186fd5e7b0e26f1e301a 100644 (file)
@@ -129,12 +129,12 @@ class GHOST_IEventConsumer;
  * There should be only one system class in an application.
  * Therefore, the routines to create and dispose the system are static.
  * Provides:
- *     -# Time(r) management.
- *     -# Display/window management (windows are only created on the main display).
- *     -# Event management.
- *     -# Cursor shape management (no custom cursors for now).
- *     -# Access to the state of the mouse buttons and the keyboard.
- *     -# Menus for windows with events generated when they are accessed (this is
+ *  -# Time(r) management.
+ *  -# Display/window management (windows are only created on the main display).
+ *  -# Event management.
+ *  -# Cursor shape management (no custom cursors for now).
+ *  -# Access to the state of the mouse buttons and the keyboard.
+ *  -# Menus for windows with events generated when they are accessed (this is
  *     work in progress).
  * @author     Maarten Gribnau
  * @date       May 30, 2001
@@ -158,25 +158,27 @@ public:
         * Returns a pointer to the one and only system (nil if it hasn't been created).
         * @return A pointer to the system.
         */
-       static GHOST_ISystemgetSystem();
+       static GHOST_ISystem *getSystem();
 
 protected:
        /**
         * Constructor.
         * Protected default constructor to force use of static createSystem member.
         */
-       GHOST_ISystem() {}
+       GHOST_ISystem() {
+       }
 
        /**
         * Destructor.
         * Protected default constructor to force use of static dispose member.
         */
-       virtual ~GHOST_ISystem() {}
+       virtual ~GHOST_ISystem() {
+       }
 
 public:
        /***************************************************************************************
-        ** Time(r) functionality
-        ***************************************************************************************/
+       ** Time(r) functionality
+       ***************************************************************************************/
 
        /**
         * Returns the system time.
@@ -196,7 +198,7 @@ public:
         * @param userData      Placeholder for user data.
         * @return A timer task (0 if timer task installation failed).
         */
-       virtual GHOST_ITimerTaskinstallTimer(GHOST_TUns64 delay,
+       virtual GHOST_ITimerTask *installTimer(GHOST_TUns64 delay,
                                               GHOST_TUns64 interval,
                                               GHOST_TimerProcPtr timerProc,
                                               GHOST_TUserDataPtr userData = 0) = 0;
@@ -206,17 +208,17 @@ public:
         * @param timerTask Timer task to be removed.
         * @return Indication of success.
         */
-       virtual GHOST_TSuccess removeTimer(GHOST_ITimerTasktimerTask) = 0;
+       virtual GHOST_TSuccess removeTimer(GHOST_ITimerTask *timerTask) = 0;
 
        /***************************************************************************************
-        ** Display/window management functionality
-        ***************************************************************************************/
+       ** Display/window management functionality
+       ***************************************************************************************/
 
        /**
         * Returns the number of displays on this system.
         * @return The number of displays.
         */
-       virtual GHOST_TUns8 getNumDisplays() const = 0;
+       virtual GHOST_TUns8 getNumDisplays() const = 0;
 
        /**
         * Returns the dimensions of the main display on this system.
@@ -237,30 +239,30 @@ public:
         * @param       type                    The type of drawing context installed in this window.
         * @param       stereoVisual    Create a stereo visual for quad buffered stereo.
         * @param       numOfAASamples  Number of samples used for AA (zero if no AA)
-        * @param       parentWindow    Parent (embedder) window
+        * @param       parentWindow    Parent (embedder) window
         * @return      The new window (or 0 if creation failed).
         */
-       virtual GHOST_IWindowcreateWindow(
-               const STR_String& title,
-               GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height,
-               GHOST_TWindowState state, GHOST_TDrawingContextType type,
-               const bool stereoVisual = false,
-               const GHOST_TUns16 numOfAASamples = 0,
-               const GHOST_TEmbedderWindowID parentWindow = 0) = 0;
+       virtual GHOST_IWindow *createWindow(
+           const STR_String& title,
+           GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height,
+           GHOST_TWindowState state, GHOST_TDrawingContextType type,
+           const bool stereoVisual = false,
+           const GHOST_TUns16 numOfAASamples = 0,
+           const GHOST_TEmbedderWindowID parentWindow = 0) = 0;
 
        /**
         * Dispose a window.
         * @param       window Pointer to the window to be disposed.
         * @return      Indication of success.
         */
-       virtual GHOST_TSuccess disposeWindow(GHOST_IWindowwindow) = 0;
+       virtual GHOST_TSuccess disposeWindow(GHOST_IWindow *window) = 0;
 
        /**
         * Returns whether a window is valid.
         * @param       window Pointer to the window to be checked.
         * @return      Indication of validity.
         */
-       virtual bool validWindow(GHOST_IWindowwindow) = 0;
+       virtual bool validWindow(GHOST_IWindow *window) = 0;
 
        /**
         * Begins full screen mode.
@@ -269,8 +271,8 @@ public:
         *                                      This window is invalid after full screen has been ended.
         * @return      Indication of success.
         */
-       virtual GHOST_TSuccess beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window,
-               const bool stereoVisual, const GHOST_TUns16 numOfAASamples=0) = 0;
+       virtual GHOST_TSuccess beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow **window,
+                                              const bool stereoVisual, const GHOST_TUns16 numOfAASamples = 0) = 0;
        
        /**
         * Updates the resolution while in fullscreen mode.
@@ -279,7 +281,7 @@ public:
         *
         * @return      Indication of success.
         */
-       virtual GHOST_TSuccess updateFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window) = 0;
+       virtual GHOST_TSuccess updateFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow **window) = 0;
 
        /**
         * Ends full screen mode.
@@ -294,8 +296,8 @@ public:
        virtual bool getFullScreen(void) = 0;
 
        /***************************************************************************************
-        ** Event management functionality
-        ***************************************************************************************/
+       ** Event management functionality
+       ***************************************************************************************/
 
        /**
         * Retrieves events from the system and stores them in the queue.
@@ -315,18 +317,18 @@ public:
         * @param consumer The event consumer to add.
         * @return Indication of success.
         */
-       virtual GHOST_TSuccess addEventConsumer(GHOST_IEventConsumerconsumer) = 0;
+       virtual GHOST_TSuccess addEventConsumer(GHOST_IEventConsumer *consumer) = 0;
 
        /**
         * Removes the given event consumer to our list.
         * @param consumer The event consumer to remove.
         * @return Indication of success.
         */
-       virtual GHOST_TSuccess removeEventConsumer(GHOST_IEventConsumerconsumer) = 0;
+       virtual GHOST_TSuccess removeEventConsumer(GHOST_IEventConsumer *consumer) = 0;
 
        /***************************************************************************************
-        ** Cursor management functionality
-        ***************************************************************************************/
+       ** Cursor management functionality
+       ***************************************************************************************/
 
        /**
         * Returns the current location of the cursor (location in screen coordinates)
@@ -346,8 +348,8 @@ public:
        virtual GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) = 0;
 
        /***************************************************************************************
-        ** Access to mouse button and keyboard states.
-        ***************************************************************************************/
+       ** Access to mouse button and keyboard states.
+       ***************************************************************************************/
 
        /**
         * Returns the state of a modifier key (ouside the message queue).
@@ -377,15 +379,15 @@ public:
        virtual int toggleConsole(int action) = 0;
        
        /***************************************************************************************
-        ** Access to clipboard.
-        ***************************************************************************************/
+       ** Access to clipboard.
+       ***************************************************************************************/
        
        /**
         * Returns the selection buffer
         * @return Returns "unsinged char" from X11 XA_CUT_BUFFER0 buffer
         *
         */
-       virtual GHOST_TUns8getClipboard(bool selection) const = 0;
+       virtual GHOST_TUns8 *getClipboard(bool selection) const = 0;
 
        /**
         * Put data to the Clipboard
@@ -396,7 +398,7 @@ public:
         * Confirms quitting he program when there is just one window left open
         * in the application
         */
-       virtual int confirmQuit(GHOST_IWindow * window) const = 0;
+       virtual int confirmQuit(GHOST_IWindow *window) const = 0;
 protected:
        /**
         * Initialize the system.
@@ -411,12 +413,16 @@ protected:
        virtual GHOST_TSuccess exit() = 0;
 
        /** The one and only system */
-       static GHOST_ISystemm_system;
+       static GHOST_ISystem *m_system;
 
 #ifdef WITH_CXX_GUARDEDALLOC
 public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GHOST:GHOST_ISystem"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       void *operator new(size_t num_bytes) {
+               return MEM_mallocN(num_bytes, "GHOST:GHOST_ISystem");
+       }
+       void operator delete(void *mem) {
+               MEM_freeN(mem);
+       }
 #endif
 };
 
index dea5436c485b7a5f91991e39b7abaf630e0beb19..f610fde458286a2f25c697ac24bc5dac2b711c05 100644 (file)
@@ -52,20 +52,22 @@ public:
         * Returns a pointer to the one and only system (nil if it hasn't been created).
         * @return A pointer to the system.
         */
-       static GHOST_ISystemPathsget();
+       static GHOST_ISystemPaths *get();
 
 protected:
        /**
         * Constructor.
         * Protected default constructor to force use of static createSystem member.
         */
-       GHOST_ISystemPaths() {}
+       GHOST_ISystemPaths() {
+       }
 
        /**
         * Destructor.
         * Protected default constructor to force use of static dispose member.
         */
-       virtual ~GHOST_ISystemPaths() {}
+       virtual ~GHOST_ISystemPaths() {
+       }
 
 public:
        /**
@@ -73,29 +75,29 @@ public:
         * "unpack and run" path, then look for properly installed path, not including versioning.
         * @return Unsigned char string pointing to system dir (eg /usr/share/blender/).
         */
-       virtual const GHOST_TUns8getSystemDir() const = 0;
+       virtual const GHOST_TUns8 *getSystemDir() const = 0;
 
        /**
         * Determine the base dir in which user configuration is stored, not including versioning.
         * If needed, it will create the base directory.
         * @return Unsigned char string pointing to user dir (eg ~/.blender/).
         */
-       virtual const GHOST_TUns8getUserDir() const = 0;
+       virtual const GHOST_TUns8 *getUserDir() const = 0;
 
        /**
-         * Determine the directory of the current binary
-         * @return Unsigned char string pointing to the binary dir
-         */
-       virtual const GHOST_TUns8getBinaryDir() const = 0;
+        * Determine the directory of the current binary
+        * @return Unsigned char string pointing to the binary dir
+        */
+       virtual const GHOST_TUns8 *getBinaryDir() const = 0;
 
        /**
         * Add the file to the operating system most recently used files
         */
-       virtual void addToSystemRecentFiles(const charfilename) const = 0;
+       virtual void addToSystemRecentFiles(const char *filename) const = 0;
 
 private:
        /** The one and only system paths*/
-       static GHOST_ISystemPathsm_systemPaths;
+       static GHOST_ISystemPaths *m_systemPaths;
 };
 
 #endif
index bae41cf84d4d72d739e324f35646e0c74bdced6d..bb4a81be5f84aa659be20d5174dfeb95ed4a706f 100644 (file)
@@ -86,8 +86,12 @@ public:
 
 #ifdef WITH_CXX_GUARDEDALLOC
 public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GHOST:GHOST_ITimerTask"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       void *operator new(size_t num_bytes) {
+               return MEM_mallocN(num_bytes, "GHOST:GHOST_ITimerTask");
+       }
+       void operator delete(void *mem) {
+               MEM_freeN(mem);
+       }
 #endif
 };
 
index 4ce8800fef66325be0c85972b5592335a029c6cd..e754883504dfb12c097482dfb81f4f68a752f0c8 100644 (file)
@@ -70,13 +70,13 @@ public:
         * Returns indication as to whether the window is valid.
         * @return The validity of the window.
         */
-       virtual bool getValid() const = 0;
+       virtual bool getValid() const = 0;
 
        /**
         * Returns the associated OS object/handle
         * @return The associated OS object/handle
         */
-       virtual voidgetOSWindow() const = 0;
+       virtual void *getOSWindow() const = 0;
 
        /**
         * Returns the type of drawing context used in this window.
@@ -108,33 +108,33 @@ public:
         * These are screen coordinates.
         * @param bounds The bounding rectangle of the window.
         */
-       virtual void getWindowBounds(GHOST_Rect& bounds) const = 0;
+       virtual void getWindowBounds(GHOST_Rect& bounds) const = 0;
        
        /**
         * Returns the client rectangle dimensions.
         * The left and top members of the rectangle are always zero.
         * @param bounds The bounding rectangle of the client area of the window.
         */
-       virtual void getClientBounds(GHOST_Rect& bounds) const = 0;
+       virtual void getClientBounds(GHOST_Rect& bounds) const = 0;
 
        /**
         * Resizes client rectangle width.
         * @param width The new width of the client area of the window.
         */
-       virtual GHOST_TSuccess setClientWidth(GHOST_TUns32 width) = 0;
+       virtual GHOST_TSuccess setClientWidth(GHOST_TUns32 width) = 0;
 
        /**
         * Resizes client rectangle height.
         * @param height The new height of the client area of the window.
         */
-       virtual GHOST_TSuccess setClientHeight(GHOST_TUns32 height) = 0;
+       virtual GHOST_TSuccess setClientHeight(GHOST_TUns32 height) = 0;
 
        /**
         * Resizes client rectangle.
         * @param width         The new width of the client area of the window.
         * @param height        The new height of the client area of the window.
         */
-       virtual GHOST_TSuccess setClientSize(GHOST_TUns32 width, GHOST_TUns32 height) = 0;
+       virtual GHOST_TSuccess setClientSize(GHOST_TUns32 width, GHOST_TUns32 height) = 0;
 
        /**
         * Converts a point in screen coordinates to client rectangle coordinates
@@ -143,7 +143,7 @@ public:
         * @param outX  The x-coordinate in the client rectangle.
         * @param outY  The y-coordinate in the client rectangle.
         */
-       virtual void screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const = 0;
+       virtual void screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const = 0;
 
        /**
         * Converts a point in screen coordinates to client rectangle coordinates
@@ -152,7 +152,7 @@ public:
         * @param outX  The x-coordinate on the screen.
         * @param outY  The y-coordinate on the screen.
         */
-       virtual void clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const = 0;
+       virtual void clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const = 0;
 
        /**
         * Tells if the ongoing drag'n'drop object can be accepted upon mouse drop
@@ -232,14 +232,14 @@ public:
         * Returns the tablet data (pressure etc).
         * @return The tablet data (pressure etc).
         */
-       virtual const GHOST_TabletDataGetTabletData() = 0;
+       virtual const GHOST_TabletData *GetTabletData() = 0;
        
        /***************************************************************************************
-        ** Progress bar functionality
-        ***************************************************************************************/
+       ** Progress bar functionality
+       ***************************************************************************************/
        
        /**
-     * Sets the progress bar value displayed in the window/application icon
+        * Sets the progress bar value displayed in the window/application icon
         * @param progress The progress %
         */
        virtual GHOST_TSuccess setProgressBar(float progress) = 0;
@@ -250,8 +250,8 @@ public:
        virtual GHOST_TSuccess endProgressBar() = 0;
        
        /***************************************************************************************
-        ** Cursor management functionality
-        ***************************************************************************************/
+       ** Cursor management functionality
+       ***************************************************************************************/
 
        /**
         * Returns the current cursor shape.
@@ -275,15 +275,15 @@ public:
         * @return      Indication of success.
         */
        virtual GHOST_TSuccess setCustomCursorShape(GHOST_TUns8 bitmap[16][2], 
-                                                                                               GHOST_TUns8 mask[16][2], 
-                                                                                               int hotX, 
-                                                                                               int hotY) = 0;
+                                                   GHOST_TUns8 mask[16][2],
+                                                   int hotX,
+                                                   int hotY) = 0;
                                                                                                
        virtual GHOST_TSuccess setCustomCursorShape(GHOST_TUns8 *bitmap, 
-                                                                                               GHOST_TUns8 *mask, 
-                                                                                               int sizex, int sizey, 
-                                                                                               int hotX, int hotY, 
-                                                                                               int fg_color, int bg_color) = 0;
+                                                   GHOST_TUns8 *mask,
+                                                   int sizex, int sizey,
+                                                   int hotX, int hotY,
+                                                   int fg_color, int bg_color) = 0;
 
        /**
         * Returns the visibility state of the cursor.
index f1b79a98082163fe6f542ba155f7423645f32fe0..811f39bb0234030eabfae5e02dd0ffbbce1dc9de 100644 (file)
@@ -30,7 +30,7 @@
  */
 
 
-#ifndef        __GHOST_PATH_API_H__
+#ifndef __GHOST_PATH_API_H__
 #define __GHOST_PATH_API_H__
 
 #include "GHOST_Types.h"
@@ -58,25 +58,25 @@ extern GHOST_TSuccess GHOST_DisposeSystemPaths(void);
  * "unpack and run" path, then look for properly installed path, not including versioning.
  * @return Unsigned char string pointing to system dir (eg /usr/share/blender/).
  */
-extern const GHOST_TUns8GHOST_getSystemDir(void);
+extern const GHOST_TUns8 *GHOST_getSystemDir(void);
 
 /**
  * Determine the base dir in which user configuration is stored, not including versioning.
  * @return Unsigned char string pointing to user dir (eg ~).
  */
-extern const GHOST_TUns8GHOST_getUserDir(void);
+extern const GHOST_TUns8 *GHOST_getUserDir(void);
 
 
 /**
  * Determine the dir in which the binary file is found.
  * @return Unsigned char string pointing to binary dir (eg ~/usr/local/bin/).
  */
-extern const GHOST_TUns8GHOST_getBinaryDir(void);
+extern const GHOST_TUns8 *GHOST_getBinaryDir(void);
 
 /**
-* Add the file to the operating system most recently used files
-*/
-extern void GHOST_addToSystemRecentFiles(const charfilename);
+ * Add the file to the operating system most recently used files
+ */
+extern void GHOST_addToSystemRecentFiles(const char *filename);
 
 #ifdef __cplusplus
 } 
index 30d9d16b701c4c1ee40ecd0ad62012ff4d9d054a..90678c6dfa23c8ec12ac20cc927388c27db70bf3 100644 (file)
@@ -55,20 +55,23 @@ public:
         * @param       r       requested right coordinate of the rectangle
         * @param       b       requested bottom coordinate of the rectangle
         */
-       GHOST_Rect(GHOST_TInt32 l=0, GHOST_TInt32 t=0, GHOST_TInt32 r=0, GHOST_TInt32 b=0)
-               : m_l(l), m_t(t), m_r(r), m_b(b) {}
+       GHOST_Rect(GHOST_TInt32 l = 0, GHOST_TInt32 t = 0, GHOST_TInt32 r = 0, GHOST_TInt32 b = 0)
+               : m_l(l), m_t(t), m_r(r), m_b(b)
+       {}
 
        /**
         * Copy constructor.
         * @param       r       rectangle to copy
         */
        GHOST_Rect(const GHOST_Rect& r)
-               : m_l(r.m_l), m_t(r.m_t), m_r(r.m_r), m_b(r.m_b) {}
+               : m_l(r.m_l), m_t(r.m_t), m_r(r.m_r), m_b(r.m_b)
+       {}
        
        /**
         * Destructor.
         */
-       virtual ~GHOST_Rect() {};
+       virtual ~GHOST_Rect()
+       {};
 
        /**
         * Access to rectangle width.
@@ -155,7 +158,7 @@ public:
         * @param       cx      requested center x-coordinate of the rectangle
         * @param       cy      requested center y-coordinate of the rectangle
         */
-       virtual void setCenter(GHOST_TInt32 cx, GHOST_TInt32 cy);
+       virtual void setCenter(GHOST_TInt32 cx, GHOST_TInt32 cy);
 
        /**
         * Sets rectangle members.
@@ -166,7 +169,7 @@ public:
         * @param       w       requested width of the rectangle
         * @param       h       requested height of the rectangle
         */
-       virtual void setCenter(GHOST_TInt32 cx, GHOST_TInt32 cy, GHOST_TInt32 w, GHOST_TInt32 h);
+       virtual void setCenter(GHOST_TInt32 cx, GHOST_TInt32 cy, GHOST_TInt32 w, GHOST_TInt32 h);
 
        /**
         * Clips a rectangle.
@@ -175,7 +178,7 @@ public:
         * @param       r       the rectangle to clip
         * @return      whether clipping has occurred
         */
-       virtual bool clip(GHOST_Rect& r) const;
+       virtual bool clip(GHOST_Rect& r) const;
 
        /** Left coordinate of the rectangle */
        GHOST_TInt32 m_l;
@@ -209,7 +212,7 @@ inline void GHOST_Rect::set(GHOST_TInt32 l, GHOST_TInt32 t, GHOST_TInt32 r, GHOS
        m_l = l; m_t = t; m_r = r; m_b = b;
 }
 
-inline bool    GHOST_Rect::isEmpty() const
+inline bool GHOST_Rect::isEmpty() const
 {
        return (getWidth() == 0) || (getHeight() == 0);
 }
@@ -237,18 +240,18 @@ inline void GHOST_Rect::unionPoint(GHOST_TInt32 x, GHOST_TInt32 y)
 #include <stdio.h>
 inline void GHOST_Rect::wrapPoint(GHOST_TInt32 &x, GHOST_TInt32 &y, GHOST_TInt32 ofs)
 {
-       GHOST_TInt32 w= getWidth();
-       GHOST_TInt32 h= getHeight();
+       GHOST_TInt32 w = getWidth();
+       GHOST_TInt32 h = getHeight();
 
        /* highly unlikely but avoid eternal loop */
-       if (w-ofs*2 <= 0 || h-ofs*2 <= 0) {
+       if (w - ofs * 2 <= 0 || h - ofs * 2 <= 0) {
                return;
        }
 
-       while(x-ofs < m_l)              x+= w-(ofs*2);
-       while(y-ofs < m_t)              y+= h-(ofs*2);
-       while(x+ofs > m_r)              x-= w-(ofs*2);
-       while(y+ofs > m_b)              y-= h-(ofs*2);
+       while (x - ofs < m_l) x += w - (ofs * 2);
+       while (y - ofs < m_t) y += h - (ofs * 2);
+       while (x + ofs > m_r) x -= w - (ofs * 2);
+       while (y + ofs > m_b) y -= h - (ofs * 2);
 }
 
 inline bool GHOST_Rect::isInside(GHOST_TInt32 x, GHOST_TInt32 y) const
index 583bfdf1f84b765dac3dd0e43feb377f21e92167..7614cb80e00cf7169d0e50d4fb90ac9888c2fc6d 100644 (file)
 
 #define GHOST_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name
 
-typedef        char                            GHOST_TInt8;
-typedef        unsigned char           GHOST_TUns8;
-typedef short                          GHOST_TInt16;
-typedef unsigned short         GHOST_TUns16;
-typedef        int                                     GHOST_TInt32;
-typedef        unsigned int            GHOST_TUns32;
+typedef char GHOST_TInt8;
+typedef unsigned char GHOST_TUns8;
+typedef short GHOST_TInt16;
+typedef unsigned short GHOST_TUns16;
+typedef int GHOST_TInt32;
+typedef unsigned int GHOST_TUns32;
 
 #if defined(WIN32) && !defined(FREE_WINDOWS)
-typedef __int64                                GHOST_TInt64;
-typedef unsigned __int64       GHOST_TUns64;
+typedef __int64 GHOST_TInt64;
+typedef unsigned __int64 GHOST_TUns64;
 #else
-typedef long long                      GHOST_TInt64;
-typedef unsigned long long     GHOST_TUns64;
+typedef long long GHOST_TInt64;
+typedef unsigned long long GHOST_TUns64;
 #endif
 
-typedef void*                          GHOST_TUserDataPtr;
+typedef void *GHOST_TUserDataPtr;
 
 typedef enum
 {
@@ -77,9 +77,9 @@ typedef enum {
 
 typedef struct GHOST_TabletData {
        GHOST_TTabletMode Active; /* 0=None, 1=Stylus, 2=Eraser */
-       float Pressure; /* range 0.0 (not touching) to 1.0 (full pressure) */
-       float Xtilt;    /* range 0.0 (upright) to 1.0 (tilted fully against the tablet surface) */
-       float Ytilt;    /* as above */
+       float Pressure; /* range 0.0 (not touching) to 1.0 (full pressure) */
+       float Xtilt;    /* range 0.0 (upright) to 1.0 (tilted fully against the tablet surface) */
+       float Ytilt;    /* as above */
 } GHOST_TabletData;
 
 
@@ -152,14 +152,14 @@ typedef enum {
 typedef enum {
        GHOST_kEventUnknown = 0,
 
-       GHOST_kEventCursorMove,         /// Mouse move event
-       GHOST_kEventButtonDown,         /// Mouse button event
-       GHOST_kEventButtonUp,           /// Mouse button event
-       GHOST_kEventWheel,                      /// Mouse wheel event
-       GHOST_kEventTrackpad,           /// Trackpad event
+       GHOST_kEventCursorMove,     /// Mouse move event
+       GHOST_kEventButtonDown,     /// Mouse button event
+       GHOST_kEventButtonUp,       /// Mouse button event
+       GHOST_kEventWheel,          /// Mouse wheel event
+       GHOST_kEventTrackpad,       /// Trackpad event
 
-       GHOST_kEventNDOFMotion,         /// N degree of freedom device motion event
-       GHOST_kEventNDOFButton,         /// N degree of freedom device button event
+       GHOST_kEventNDOFMotion,     /// N degree of freedom device motion event
+       GHOST_kEventNDOFButton,     /// N degree of freedom device button event
 
        GHOST_kEventKeyDown,
        GHOST_kEventKeyUp,
@@ -289,8 +289,8 @@ typedef enum {
        GHOST_kKeyRightControl,
        GHOST_kKeyLeftAlt,
        GHOST_kKeyRightAlt,
-       GHOST_kKeyOS,           // Command key on Apple, Windows key(s) on Windows
-       GHOST_kKeyGrLess ,              // German PC only!
+       GHOST_kKeyOS,       // Command key on Apple, Windows key(s) on Windows
+       GHOST_kKeyGrLess,       // German PC only!
 
        GHOST_kKeyCapsLock,
        GHOST_kKeyNumLock,
@@ -363,13 +363,13 @@ typedef enum {
 } GHOST_TKey;
 
 typedef enum {
-       GHOST_kGrabDisable = 0, /* grab not set */
-       GHOST_kGrabNormal,      /* no cursor adjustments */
-       GHOST_kGrabWrap,                /* wrap the mouse location to prevent limiting screen bounds */
-       GHOST_kGrabHide,                /* hide the mouse while grabbing and restore the original location on release (numbuts) */
+       GHOST_kGrabDisable = 0, /* grab not set */
+       GHOST_kGrabNormal,  /* no cursor adjustments */
+       GHOST_kGrabWrap,        /* wrap the mouse location to prevent limiting screen bounds */
+       GHOST_kGrabHide,        /* hide the mouse while grabbing and restore the original location on release (numbuts) */
 } GHOST_TGrabCursorMode;
 
-typedef voidGHOST_TEventDataPtr;
+typedef void *GHOST_TEventDataPtr;
 
 typedef struct {
        /** The x-coordinate of the cursor position. */
@@ -389,7 +389,7 @@ typedef struct {
 } GHOST_TEventWheelData;
 
 typedef enum {
-       GHOST_kTrackpadEventUnknown =0,
+       GHOST_kTrackpadEventUnknown = 0,
        GHOST_kTrackpadEventScroll,
        GHOST_kTrackpadEventRotate,
        GHOST_kTrackpadEventSwipe, /* Reserved, not used for now */
@@ -412,7 +412,7 @@ typedef struct {
 
 
 typedef enum {
-       GHOST_kDragnDropTypeUnknown =0,
+       GHOST_kDragnDropTypeUnknown = 0,
        GHOST_kDragnDropTypeFilenames, /*Array of strings representing file names (full path) */
        GHOST_kDragnDropTypeString, /* Unformatted text UTF-8 string */
        GHOST_kDragnDropTypeBitmap /*Bitmap image data */
@@ -440,7 +440,7 @@ typedef enum {
        GHOST_kInProgress,
        GHOST_kFinishing,
        GHOST_kFinished
-       } GHOST_TProgress;
+} GHOST_TProgress;
 
 typedef struct {
        /** N-degree of freedom device data v3 [GSoC 2010] */
@@ -448,14 +448,14 @@ typedef struct {
        // These use blender standard view coordinates, with positive rotations being CCW about the axis.
        float tx, ty, tz; // translation
        float rx, ry, rz; // rotation:
-               // axis = (rx,ry,rz).normalized
-               // amount = (rx,ry,rz).magnitude [in revolutions, 1.0 = 360 deg]
+       // axis = (rx,ry,rz).normalized
+       // amount = (rx,ry,rz).magnitude [in revolutions, 1.0 = 360 deg]
        float dt; // time since previous NDOF Motion event
        GHOST_TProgress progress; // Starting, InProgress or Finishing (for modal handlers)
 } GHOST_TEventNDOFMotionData;
 
 typedef enum { GHOST_kPress, GHOST_kRelease } GHOST_TButtonAction;
-       // good for mouse or other buttons too, hmmm?
+// good for mouse or other buttons too, hmmm?
 
 typedef struct {
        GHOST_TButtonAction action;
@@ -464,7 +464,7 @@ typedef struct {
 
 typedef struct {
        /** The key code. */
-       GHOST_TKey              key;
+       GHOST_TKey key;
 
        /* ascii / utf8: both should always be set when possible,
         * - ascii may be '\0' however if the user presses a non ascii key
@@ -476,20 +476,20 @@ typedef struct {
         * use ascii, unicode is ignored - campbell.
         */
        /** The ascii code for the key event ('\0' if none). */
-       char                    ascii;
+       char ascii;
        /** The unicode character. if the length is 6, not NULL terminated if all 6 are set */
-       char                    utf8_buf[6];
+       char utf8_buf[6];
 } GHOST_TEventKeyData;
 
 typedef struct {
        /** Number of pixels on a line. */
-       GHOST_TUns32    xPixels;
+       GHOST_TUns32 xPixels;
        /** Number of lines. */
-       GHOST_TUns32    yPixels;
+       GHOST_TUns32 yPixels;
        /** Numberof bits per pixel. */
-       GHOST_TUns32    bpp;
+       GHOST_TUns32 bpp;
        /** Refresh rate (in Hertz). */
-       GHOST_TUns32    frequency;
+       GHOST_TUns32 frequency;
 } GHOST_DisplaySetting;
 
 
@@ -509,10 +509,10 @@ typedef int GHOST_TEmbedderWindowID;
  */
 #ifdef __cplusplus
 class GHOST_ITimerTask;
-typedef void (*GHOST_TimerProcPtr)(GHOST_ITimerTasktask, GHOST_TUns64 time);
+typedef void (*GHOST_TimerProcPtr)(GHOST_ITimerTask *task, GHOST_TUns64 time);
 #else
 struct GHOST_TimerTaskHandle__;
-typedef void (*GHOST_TimerProcPtr)(struct GHOST_TimerTaskHandle__task, GHOST_TUns64 time);
+typedef void (*GHOST_TimerProcPtr)(struct GHOST_TimerTaskHandle__ *task, GHOST_TUns64 time);
 #endif
 
 #endif // __GHOST_TYPES_H__
index 1f56cf44b565a1eda5beb04342e7d6b36cb640be..6b90383ee6b87f76421356de0ea5b304d00ab942 100644 (file)
@@ -42,37 +42,38 @@ GHOST_Buttons::GHOST_Buttons()
 
 bool GHOST_Buttons::get(GHOST_TButtonMask mask) const
 {
-    switch (mask) {
-    case GHOST_kButtonMaskLeft:
-        return m_ButtonLeft;
-    case GHOST_kButtonMaskMiddle:
-        return m_ButtonMiddle;
-    case GHOST_kButtonMaskRight:
-        return m_ButtonRight;
-    default:
-        return false;
-    }
+       switch (mask) {
+               case GHOST_kButtonMaskLeft:
+                       return m_ButtonLeft;
+               case GHOST_kButtonMaskMiddle:
+                       return m_ButtonMiddle;
+               case GHOST_kButtonMaskRight:
+                       return m_ButtonRight;
+               default:
+                       return false;
+       }
 }
 
 void GHOST_Buttons::set(GHOST_TButtonMask mask, bool down)
 {
-    switch (mask) {
-    case GHOST_kButtonMaskLeft:
-        m_ButtonLeft = down; break;
-    case GHOST_kButtonMaskMiddle:
-        m_ButtonMiddle = down; break;
-    case GHOST_kButtonMaskRight:
-        m_ButtonRight = down; break;
-    default:
-        break;
-    }
+       switch (mask) {
+               case GHOST_kButtonMaskLeft:
+                       m_ButtonLeft = down; break;
+               case GHOST_kButtonMaskMiddle:
+                       m_ButtonMiddle = down; break;
+               case GHOST_kButtonMaskRight:
+                       m_ButtonRight = down; break;
+               default:
+                       break;
+       }
 }
 
 void GHOST_Buttons::clear()
 {
-    m_ButtonLeft = false;
-    m_ButtonMiddle = false;
-    m_ButtonRight = false;
+       m_ButtonLeft = false;
+       m_ButtonMiddle = false;
+       m_ButtonRight = false;
 }
 
-GHOST_Buttons::~GHOST_Buttons() {}
+GHOST_Buttons::~GHOST_Buttons() {
+}
index ea1cce574b802074e46ac19f6d24240bcd271480..edcf01022018ff84c4959c050e493ebed06bec4b 100644 (file)
@@ -69,9 +69,9 @@ struct GHOST_Buttons {
         */
        virtual void clear();
 
-       GHOST_TUns8 m_ButtonLeft                : 1;
-       GHOST_TUns8 m_ButtonMiddle              : 1;
-       GHOST_TUns8 m_ButtonRight               : 1;
+       GHOST_TUns8 m_ButtonLeft        : 1;
+       GHOST_TUns8 m_ButtonMiddle      : 1;
+       GHOST_TUns8 m_ButtonRight       : 1;
 };
 
 #endif // __GHOST_BUTTONS_H__
index 8442f82d88666754a6afb6e720c5e43371d9d026..ad43798bc6009951c780db539639f07332e78ca5 100644 (file)
@@ -50,7 +50,7 @@
 GHOST_SystemHandle GHOST_CreateSystem(void)
 {
        GHOST_ISystem::createSystem();
-       GHOST_ISystemsystem = GHOST_ISystem::getSystem();
+       GHOST_ISystem *system = GHOST_ISystem::getSystem();
 
        return (GHOST_SystemHandle)system;
 }
@@ -59,7 +59,7 @@ GHOST_SystemHandle GHOST_CreateSystem(void)
 
 GHOST_TSuccess GHOST_DisposeSystem(GHOST_SystemHandle systemhandle)
 {
-       GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
+       GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
 
        return system->disposeSystem();
 }
@@ -68,20 +68,20 @@ GHOST_TSuccess GHOST_DisposeSystem(GHOST_SystemHandle systemhandle)
 GHOST_EventConsumerHandle GHOST_CreateEventConsumer(GHOST_EventCallbackProcPtr eventCallback,
                                                     GHOST_TUserDataPtr userdata)
 {
-       return (GHOST_EventConsumerHandle) new GHOST_CallbackEventConsumer (eventCallback, userdata);
+       return (GHOST_EventConsumerHandle) new GHOST_CallbackEventConsumer(eventCallback, userdata);
 }
 
 
 GHOST_TSuccess GHOST_DisposeEventConsumer(GHOST_EventConsumerHandle consumerhandle)
 {
-       delete ((GHOST_CallbackEventConsumer*)consumerhandle);
+       delete ((GHOST_CallbackEventConsumer *)consumerhandle);
        return GHOST_kSuccess;
 }
 
 
 GHOST_TUns64 GHOST_GetMilliSeconds(GHOST_SystemHandle systemhandle)
 {
-       GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
+       GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
 
        return system->getMilliSeconds();
 }
@@ -89,12 +89,12 @@ GHOST_TUns64 GHOST_GetMilliSeconds(GHOST_SystemHandle systemhandle)
 
 
 GHOST_TimerTaskHandle GHOST_InstallTimer(GHOST_SystemHandle systemhandle,
-                                                                                GHOST_TUns64 delay,
-                                                                                GHOST_TUns64 interval,
-                                                                                GHOST_TimerProcPtr timerproc,
-                                                                                GHOST_TUserDataPtr userdata)
+                                         GHOST_TUns64 delay,
+                                         GHOST_TUns64 interval,
+                                         GHOST_TimerProcPtr timerproc,
+                                         GHOST_TUserDataPtr userdata)
 {
-       GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
+       GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
 
        return (GHOST_TimerTaskHandle) system->installTimer(delay, interval, timerproc, userdata);
 }
@@ -102,10 +102,10 @@ GHOST_TimerTaskHandle GHOST_InstallTimer(GHOST_SystemHandle systemhandle,
 
 
 GHOST_TSuccess GHOST_RemoveTimer(GHOST_SystemHandle systemhandle,
-                                                                GHOST_TimerTaskHandle timertaskhandle)
+                                 GHOST_TimerTaskHandle timertaskhandle)
 {
-       GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
-       GHOST_ITimerTask* timertask = (GHOST_ITimerTask*) timertaskhandle;
+       GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
+       GHOST_ITimerTask *timertask = (GHOST_ITimerTask *) timertaskhandle;
 
        return system->removeTimer(timertask);
 }
@@ -114,7 +114,7 @@ GHOST_TSuccess GHOST_RemoveTimer(GHOST_SystemHandle systemhandle,
 
 GHOST_TUns8 GHOST_GetNumDisplays(GHOST_SystemHandle systemhandle)
 {
-       GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
+       GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
 
        return system->getNumDisplays();
 }
@@ -122,10 +122,10 @@ GHOST_TUns8 GHOST_GetNumDisplays(GHOST_SystemHandle systemhandle)
 
 
 void GHOST_GetMainDisplayDimensions(GHOST_SystemHandle systemhandle,
-                                                                       GHOST_TUns32* width,
-                                                                       GHOST_TUns32* height)
+                                    GHOST_TUns32 *width,
+                                    GHOST_TUns32 *height)
 {
-       GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
+       GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
        
        system->getMainDisplayDimensions(*width, *height);
 }
@@ -133,46 +133,46 @@ void GHOST_GetMainDisplayDimensions(GHOST_SystemHandle systemhandle,
 
 
 GHOST_WindowHandle GHOST_CreateWindow(GHOST_SystemHandle systemhandle,
-                                                                         const char* title,
-                                                                         GHOST_TInt32 left,
-                                                                         GHOST_TInt32 top,
-                                                                         GHOST_TUns32 width,
-                                                                         GHOST_TUns32 height,
-                                                                         GHOST_TWindowState state,
-                                                                         GHOST_TDrawingContextType type,
-                                                                         const int stereoVisual,
-                                                                         const GHOST_TUns16 numOfAASamples)
-{
-       GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
+                                      const char *title,
+                                      GHOST_TInt32 left,
+                                      GHOST_TInt32 top,
+                                      GHOST_TUns32 width,
+                                      GHOST_TUns32 height,
+                                      GHOST_TWindowState state,
+                                      GHOST_TDrawingContextType type,
+                                      const int stereoVisual,
+                                      const GHOST_TUns16 numOfAASamples)
+{
+       GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
        bool bstereoVisual;
 
-       if(stereoVisual)
+       if (stereoVisual)
                bstereoVisual = true;
        else
                bstereoVisual = false;
 
        return (GHOST_WindowHandle) system->createWindow(title, left, top, width, height,
-               state, type, bstereoVisual, numOfAASamples);
+                                                        state, type, bstereoVisual, numOfAASamples);
 }
 
 GHOST_TUserDataPtr GHOST_GetWindowUserData(GHOST_WindowHandle windowhandle)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
        return window->getUserData();
 }
 void GHOST_SetWindowUserData(GHOST_WindowHandle windowhandle, GHOST_TUserDataPtr userdata)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
        window->setUserData(userdata);
 }
 
 GHOST_TSuccess GHOST_DisposeWindow(GHOST_SystemHandle systemhandle,
-                                                                  GHOST_WindowHandle windowhandle)
+                                   GHOST_WindowHandle windowhandle)
 {
-       GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
        
        return system->disposeWindow(window);
 }
@@ -180,10 +180,10 @@ GHOST_TSuccess GHOST_DisposeWindow(GHOST_SystemHandle systemhandle,
 
 
 int GHOST_ValidWindow(GHOST_SystemHandle systemhandle,
-                                                                GHOST_WindowHandle windowhandle)
+                      GHOST_WindowHandle windowhandle)
 {
-       GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
        
        return (int) system->validWindow(window);
 }
@@ -191,14 +191,14 @@ int GHOST_ValidWindow(GHOST_SystemHandle systemhandle,
 
 
 GHOST_WindowHandle GHOST_BeginFullScreen(GHOST_SystemHandle systemhandle,
-                                                                                GHOST_DisplaySetting* setting,
-                                                                                const int stereoVisual)
+                                         GHOST_DisplaySetting *setting,
+                                         const int stereoVisual)
 {
-       GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
-       GHOST_IWindowwindow = NULL;
+       GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
+       GHOST_IWindow *window = NULL;
        bool bstereoVisual;
 
-       if(stereoVisual)
+       if (stereoVisual)
                bstereoVisual = true;
        else
                bstereoVisual = false;
@@ -212,7 +212,7 @@ GHOST_WindowHandle GHOST_BeginFullScreen(GHOST_SystemHandle systemhandle,
 
 GHOST_TSuccess GHOST_EndFullScreen(GHOST_SystemHandle systemhandle)
 {
-       GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
+       GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
 
        return system->endFullScreen();
 }
@@ -221,7 +221,7 @@ GHOST_TSuccess GHOST_EndFullScreen(GHOST_SystemHandle systemhandle)
 
 int GHOST_GetFullScreen(GHOST_SystemHandle systemhandle)
 {
-       GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
+       GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
 
        return (int) system->getFullScreen();
 }
@@ -230,16 +230,16 @@ int GHOST_GetFullScreen(GHOST_SystemHandle systemhandle)
 
 int GHOST_ProcessEvents(GHOST_SystemHandle systemhandle, int waitForEvent)
 {
-       GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
+       GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
        
-       return (int) system->processEvents(waitForEvent?true:false);
+       return (int) system->processEvents(waitForEvent ? true : false);
 }
 
 
 
 int GHOST_DispatchEvents(GHOST_SystemHandle systemhandle)
 {
-       GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
+       GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
        
        return (int) system->dispatchEvents();
 }
@@ -247,28 +247,28 @@ int GHOST_DispatchEvents(GHOST_SystemHandle systemhandle)
 
 GHOST_TSuccess GHOST_AddEventConsumer(GHOST_SystemHandle systemhandle, GHOST_EventConsumerHandle consumerhandle)
 {
-       GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
+       GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
        
-       return system->addEventConsumer((GHOST_CallbackEventConsumer*)consumerhandle);
+       return system->addEventConsumer((GHOST_CallbackEventConsumer *)consumerhandle);
 }
 
 GHOST_TSuccess GHOST_RemoveEventConsumer(GHOST_SystemHandle systemhandle, GHOST_EventConsumerHandle consumerhandle)
 {
-       GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
+       GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
 
-       return system->removeEventConsumer((GHOST_CallbackEventConsumer*)consumerhandle);
+       return system->removeEventConsumer((GHOST_CallbackEventConsumer *)consumerhandle);
 }
 
-GHOST_TSuccess GHOST_SetProgressBar(GHOST_WindowHandle windowhandle,float progress)
+GHOST_TSuccess GHOST_SetProgressBar(GHOST_WindowHandle windowhandle, float progress)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
        return window->setProgressBar(progress);
 }
 
 GHOST_TSuccess GHOST_EndProgressBar(GHOST_WindowHandle windowhandle)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
        return window->endProgressBar();
 }
@@ -276,7 +276,7 @@ GHOST_TSuccess GHOST_EndProgressBar(GHOST_WindowHandle windowhandle)
 
 GHOST_TStandardCursor GHOST_GetCursorShape(GHOST_WindowHandle windowhandle)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
        return window->getCursorShape();
 }
@@ -284,45 +284,45 @@ GHOST_TStandardCursor GHOST_GetCursorShape(GHOST_WindowHandle windowhandle)
 
 
 GHOST_TSuccess GHOST_SetCursorShape(GHOST_WindowHandle windowhandle,
-                                                                       GHOST_TStandardCursor cursorshape)
+                                    GHOST_TStandardCursor cursorshape)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
        return window->setCursorShape(cursorshape);
 }
 
 GHOST_TSuccess GHOST_SetCustomCursorShape(GHOST_WindowHandle windowhandle,
-                                                                                 GHOST_TUns8 bitmap[16][2], 
-                                                                                 GHOST_TUns8 mask[16][2], 
-                                                                                 int hotX, 
-                                                                                 int hotY)
+                                          GHOST_TUns8 bitmap[16][2],
+                                          GHOST_TUns8 mask[16][2],
+                                          int hotX,
+                                          int hotY)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
        return window->setCustomCursorShape(bitmap, mask, hotX, hotY);
 }
 
 GHOST_TSuccess GHOST_SetCustomCursorShapeEx(GHOST_WindowHandle windowhandle,
-                                                                                 GHOST_TUns8 *bitmap, 
-                                                                                 GHOST_TUns8 *mask, 
-                                                                                 int sizex, 
-                                                                                 int sizey,
-                                                                                 int hotX, 
-                                                                                 int hotY, 
-                                                                                 int fg_color, 
-                                                                                 int bg_color)
+                                            GHOST_TUns8 *bitmap,
+                                            GHOST_TUns8 *mask,
+                                            int sizex,
+                                            int sizey,
+                                            int hotX,
+                                            int hotY,
+                                            int fg_color,
+                                            int bg_color)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
-       return window->setCustomCursorShape(bitmap, mask, sizex, sizey, 
-                                                                                               hotX, hotY, fg_color, bg_color);
+       return window->setCustomCursorShape(bitmap, mask, sizex, sizey,
+                                           hotX, hotY, fg_color, bg_color);
 }
 
 
 
 int GHOST_GetCursorVisibility(GHOST_WindowHandle windowhandle)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
        return (int) window->getCursorVisibility();
 }
@@ -330,20 +330,20 @@ int GHOST_GetCursorVisibility(GHOST_WindowHandle windowhandle)
 
 
 GHOST_TSuccess GHOST_SetCursorVisibility(GHOST_WindowHandle windowhandle,
-                                                                                int visible)
+                                         int visible)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
-       return window->setCursorVisibility(visible?true:false);
+       return window->setCursorVisibility(visible ? true : false);
 }
 
 
 
 GHOST_TSuccess GHOST_GetCursorPosition(GHOST_SystemHandle systemhandle,
-                                                                          GHOST_TInt32* x,
-                                                                          GHOST_TInt32* y)
+                                       GHOST_TInt32 *x,
+                                       GHOST_TInt32 *y)
 {
-       GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
+       GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
        
        return system->getCursorPosition(*x, *y);
 }
@@ -351,23 +351,23 @@ GHOST_TSuccess GHOST_GetCursorPosition(GHOST_SystemHandle systemhandle,
 
 
 GHOST_TSuccess GHOST_SetCursorPosition(GHOST_SystemHandle systemhandle,
-                                                                          GHOST_TInt32 x,
-                                                                          GHOST_TInt32 y)
+                                       GHOST_TInt32 x,
+                                       GHOST_TInt32 y)
 {
-       GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
+       GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
        
        return system->setCursorPosition(x, y);
 }
 
 
 GHOST_TSuccess GHOST_SetCursorGrab(GHOST_WindowHandle windowhandle,
-                                                                               GHOST_TGrabCursorMode mode,
-                                                                               int *bounds)
+                                   GHOST_TGrabCursorMode mode,
+                                   int *bounds)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
        GHOST_Rect bounds_rect, bounds_win;
 
-       if(bounds) {
+       if (bounds) {
                /* if this is X11 specific we need a function that converts */
                window->getClientBounds(bounds_win);
                window->clientToScreen(bounds[0], bounds_win.getHeight() - bounds[1], bounds_rect.m_l, bounds_rect.m_t);
@@ -375,17 +375,17 @@ GHOST_TSuccess GHOST_SetCursorGrab(GHOST_WindowHandle windowhandle,
 
        }
        
-       return window->setCursorGrab(mode, bounds ? &bounds_rect:NULL);
+       return window->setCursorGrab(mode, bounds ? &bounds_rect : NULL);
 }
 
 
 GHOST_TSuccess GHOST_GetModifierKeyState(GHOST_SystemHandle systemhandle,
-                                                                                GHOST_TModifierKeyMask mask,
-                                                                                int* isDown)
+                                         GHOST_TModifierKeyMask mask,
+                                         int *isDown)
 {
-       GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
+       GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
        GHOST_TSuccess result;
-       bool isdown= false;
+       bool isdown = false;
        
        result = system->getModifierKeyState(mask, isdown);
        *isDown = (int) isdown;
@@ -396,12 +396,12 @@ GHOST_TSuccess GHOST_GetModifierKeyState(GHOST_SystemHandle systemhandle,
 
 
 GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle,
-                                                                       GHOST_TButtonMask mask,
-                                                                       int* isDown)
+                                    GHOST_TButtonMask mask,
+                                    int *isDown)
 {
-       GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
+       GHOST_ISystem *system = (GHOST_ISystem *) systemhandle;
        GHOST_TSuccess result;
-       bool isdown= false;
+       bool isdown = false;
        
        result = system->getButtonState(mask, isdown);
        *isDown = (int) isdown;
@@ -412,7 +412,7 @@ GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle,
 
 void GHOST_setAcceptDragOperation(GHOST_WindowHandle windowhandle, GHOST_TInt8 canAccept)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
        window->setAcceptDragOperation(canAccept);
 }
@@ -420,7 +420,7 @@ void GHOST_setAcceptDragOperation(GHOST_WindowHandle windowhandle, GHOST_TInt8 c
 
 GHOST_TEventType GHOST_GetEventType(GHOST_EventHandle eventhandle)
 {
-       GHOST_IEvent* event = (GHOST_IEvent*) eventhandle;
+       GHOST_IEvent *event = (GHOST_IEvent *) eventhandle;
        
        return event->getType();
 }
@@ -429,7 +429,7 @@ GHOST_TEventType GHOST_GetEventType(GHOST_EventHandle eventhandle)
 
 GHOST_TUns64 GHOST_GetEventTime(GHOST_EventHandle eventhandle)
 {
-       GHOST_IEvent* event = (GHOST_IEvent*) eventhandle;
+       GHOST_IEvent *event = (GHOST_IEvent *) eventhandle;
 
        return event->getTime();
 }
@@ -437,7 +437,7 @@ GHOST_TUns64 GHOST_GetEventTime(GHOST_EventHandle eventhandle)
 
 GHOST_WindowHandle GHOST_GetEventWindow(GHOST_EventHandle eventhandle)
 {
-       GHOST_IEvent* event = (GHOST_IEvent*) eventhandle;
+       GHOST_IEvent *event = (GHOST_IEvent *) eventhandle;
 
        return (GHOST_WindowHandle) event->getWindow();
 }
@@ -445,7 +445,7 @@ GHOST_WindowHandle GHOST_GetEventWindow(GHOST_EventHandle eventhandle)
 
 GHOST_TEventDataPtr GHOST_GetEventData(GHOST_EventHandle eventhandle)
 {
-       GHOST_IEvent* event = (GHOST_IEvent*) eventhandle;
+       GHOST_IEvent *event = (GHOST_IEvent *) eventhandle;
        
        return event->getData();
 }
@@ -454,7 +454,7 @@ GHOST_TEventDataPtr GHOST_GetEventData(GHOST_EventHandle eventhandle)
 
 GHOST_TimerProcPtr GHOST_GetTimerProc(GHOST_TimerTaskHandle timertaskhandle)
 {
-       GHOST_ITimerTask* timertask = (GHOST_ITimerTask*) timertaskhandle;
+       GHOST_ITimerTask *timertask = (GHOST_ITimerTask *) timertaskhandle;
        
        return timertask->getTimerProc();
 }
@@ -462,9 +462,9 @@ GHOST_TimerProcPtr GHOST_GetTimerProc(GHOST_TimerTaskHandle timertaskhandle)
 
 
 void GHOST_SetTimerProc(GHOST_TimerTaskHandle timertaskhandle,
-                                               GHOST_TimerProcPtr timerproc)
+                        GHOST_TimerProcPtr timerproc)
 {
-       GHOST_ITimerTask* timertask = (GHOST_ITimerTask*) timertaskhandle;
+       GHOST_ITimerTask *timertask = (GHOST_ITimerTask *) timertaskhandle;
        
        timertask->setTimerProc(timerproc);
 }
@@ -473,17 +473,17 @@ void GHOST_SetTimerProc(GHOST_TimerTaskHandle timertaskhandle,
 
 GHOST_TUserDataPtr GHOST_GetTimerTaskUserData(GHOST_TimerTaskHandle timertaskhandle)
 {
-       GHOST_ITimerTask* timertask = (GHOST_ITimerTask*) timertaskhandle;
+       GHOST_ITimerTask *timertask = (GHOST_ITimerTask *) timertaskhandle;
 
        return timertask->getUserData();
 }
 
-       
+
 
 void GHOST_SetTimerTaskUserData(GHOST_TimerTaskHandle timertaskhandle,
-                                                               GHOST_TUserDataPtr userdata)
+                                GHOST_TUserDataPtr userdata)
 {
-       GHOST_ITimerTask* timertask = (GHOST_ITimerTask*) timertaskhandle;
+       GHOST_ITimerTask *timertask = (GHOST_ITimerTask *) timertaskhandle;
        
        timertask->setUserData(userdata);
 }
@@ -492,7 +492,7 @@ void GHOST_SetTimerTaskUserData(GHOST_TimerTaskHandle timertaskhandle,
 
 int GHOST_GetValid(GHOST_WindowHandle windowhandle) 
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
        return (int) window->getValid();
 }
@@ -501,7 +501,7 @@ int GHOST_GetValid(GHOST_WindowHandle windowhandle)
 
 GHOST_TDrawingContextType GHOST_GetDrawingContextType(GHOST_WindowHandle windowhandle)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
        return window->getDrawingContextType();
 }
@@ -509,9 +509,9 @@ GHOST_TDrawingContextType GHOST_GetDrawingContextType(GHOST_WindowHandle windowh
 
 
 GHOST_TSuccess GHOST_SetDrawingContextType(GHOST_WindowHandle windowhandle,
-                                                                                  GHOST_TDrawingContextType type)
+                                           GHOST_TDrawingContextType type)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
        return window->setDrawingContextType(type);
 }
@@ -519,26 +519,26 @@ GHOST_TSuccess GHOST_SetDrawingContextType(GHOST_WindowHandle windowhandle,
 
 
 void GHOST_SetTitle(GHOST_WindowHandle windowhandle,
-                                       const char* title)
+                    const char *title)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
        
        window->setTitle(title);
 }
 
 
-charGHOST_GetTitle(GHOST_WindowHandle windowhandle)
+char *GHOST_GetTitle(GHOST_WindowHandle windowhandle)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
        STR_String title;
 
        window->getTitle(title);
 
-       char *ctitle = (char*) malloc(title.Length() + 1);
+       char *ctitle = (char *) malloc(title.Length() + 1);
 
        if (ctitle == NULL) return NULL;
        strcpy(ctitle, title.Ptr());
-               
+
        return ctitle;
 }
 
@@ -546,8 +546,8 @@ char* GHOST_GetTitle(GHOST_WindowHandle windowhandle)
 
 GHOST_RectangleHandle GHOST_GetWindowBounds(GHOST_WindowHandle windowhandle) 
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
-       GHOST_Rectrectangle = NULL;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
+       GHOST_Rect *rectangle = NULL;
 
        rectangle = new GHOST_Rect();
        window->getWindowBounds(*rectangle);
@@ -559,8 +559,8 @@ GHOST_RectangleHandle GHOST_GetWindowBounds(GHOST_WindowHandle windowhandle)
 
 GHOST_RectangleHandle GHOST_GetClientBounds(GHOST_WindowHandle windowhandle) 
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
-       GHOST_Rectrectangle = NULL;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
+       GHOST_Rect *rectangle = NULL;
 
        rectangle = new GHOST_Rect();
        window->getClientBounds(*rectangle);
@@ -572,15 +572,15 @@ GHOST_RectangleHandle GHOST_GetClientBounds(GHOST_WindowHandle windowhandle)
 
 void GHOST_DisposeRectangle(GHOST_RectangleHandle rectanglehandle)
 {
-       delete (GHOST_Rect*) rectanglehandle;
+       delete (GHOST_Rect *) rectanglehandle;
 }
 
 
 
 GHOST_TSuccess GHOST_SetClientWidth(GHOST_WindowHandle windowhandle,
-                                                                       GHOST_TUns32 width)
+                                    GHOST_TUns32 width)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
        return window->setClientWidth(width);
 }
@@ -588,9 +588,9 @@ GHOST_TSuccess GHOST_SetClientWidth(GHOST_WindowHandle windowhandle,
 
 
 GHOST_TSuccess GHOST_SetClientHeight(GHOST_WindowHandle windowhandle,
-                                                                        GHOST_TUns32 height)
+                                     GHOST_TUns32 height)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
        return window->setClientHeight(height);
 }
@@ -598,10 +598,10 @@ GHOST_TSuccess GHOST_SetClientHeight(GHOST_WindowHandle windowhandle,
 
 
 GHOST_TSuccess GHOST_SetClientSize(GHOST_WindowHandle windowhandle,
-                                                                  GHOST_TUns32 width,
-                                                                  GHOST_TUns32 height)
+                                   GHOST_TUns32 width,
+                                   GHOST_TUns32 height)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
        return window->setClientSize(width, height);
 }
@@ -609,12 +609,12 @@ GHOST_TSuccess GHOST_SetClientSize(GHOST_WindowHandle windowhandle,
 
 
 void GHOST_ScreenToClient(GHOST_WindowHandle windowhandle,
-                                                 GHOST_TInt32 inX,
-                                                 GHOST_TInt32 inY,
-                                                 GHOST_TInt32* outX,
-                                                 GHOST_TInt32* outY) 
+                          GHOST_TInt32 inX,
+                          GHOST_TInt32 inY,
+                          GHOST_TInt32 *outX,
+                          GHOST_TInt32 *outY)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
        window->screenToClient(inX, inY, *outX, *outY);
 }
@@ -622,12 +622,12 @@ void GHOST_ScreenToClient(GHOST_WindowHandle windowhandle,
 
 
 void GHOST_ClientToScreen(GHOST_WindowHandle windowhandle,
-                                                 GHOST_TInt32 inX,
-                                                 GHOST_TInt32 inY,
-                                                 GHOST_TInt32* outX,
-                                                 GHOST_TInt32* outY)
+                          GHOST_TInt32 inX,
+                          GHOST_TInt32 inY,
+                          GHOST_TInt32 *outX,
+                          GHOST_TInt32 *outY)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
        window->clientToScreen(inX, inY, *outX, *outY);
 }
@@ -636,7 +636,7 @@ void GHOST_ClientToScreen(GHOST_WindowHandle windowhandle,
 
 GHOST_TWindowState GHOST_GetWindowState(GHOST_WindowHandle windowhandle)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
        return window->getState();
 }
@@ -644,9 +644,9 @@ GHOST_TWindowState GHOST_GetWindowState(GHOST_WindowHandle windowhandle)
 
 
 GHOST_TSuccess GHOST_SetWindowState(GHOST_WindowHandle windowhandle,
-                                                                       GHOST_TWindowState state)
+                                    GHOST_TWindowState state)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
        return window->setState(state);
 }
@@ -654,16 +654,16 @@ GHOST_TSuccess GHOST_SetWindowState(GHOST_WindowHandle windowhandle,
 
 GHOST_TSuccess GHOST_SetWindowModifiedState(GHOST_WindowHandle windowhandle, GHOST_TUns8 isUnsavedChanges)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
        
        return window->setModifiedState(isUnsavedChanges);
 }      
 
 
 GHOST_TSuccess GHOST_SetWindowOrder(GHOST_WindowHandle windowhandle,
-                                                                       GHOST_TWindowOrder order)
+                                    GHOST_TWindowOrder order)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
        
        return window->setOrder(order);
 }
@@ -672,7 +672,7 @@ GHOST_TSuccess GHOST_SetWindowOrder(GHOST_WindowHandle windowhandle,
 
 GHOST_TSuccess GHOST_SwapWindowBuffers(GHOST_WindowHandle windowhandle)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
        return window->swapBuffers();
 }
@@ -681,7 +681,7 @@ GHOST_TSuccess GHOST_SwapWindowBuffers(GHOST_WindowHandle windowhandle)
 
 GHOST_TSuccess GHOST_ActivateWindowDrawingContext(GHOST_WindowHandle windowhandle)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
        
        return window->activateDrawingContext();
 }
@@ -690,54 +690,54 @@ GHOST_TSuccess GHOST_ActivateWindowDrawingContext(GHOST_WindowHandle windowhandl
 
 GHOST_TSuccess GHOST_InvalidateWindow(GHOST_WindowHandle windowhandle)
 {
-       GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
+       GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
 
        return window->invalidate();
 }
 
 
-extern const GHOST_TabletDataGHOST_GetTabletData(GHOST_WindowHandle windowhandle)
+extern const GHOST_TabletData *GHOST_GetTabletData(GHOST_WindowHandle windowhandle)
 {
-       return ((GHOST_IWindow*)windowhandle)->GetTabletData();
+       return ((GHOST_IWindow *)windowhandle)->GetTabletData();
 }
 
 
 GHOST_TInt32 GHOST_GetWidthRectangle(GHOST_RectangleHandle rectanglehandle)
 {
-       return ((GHOST_Rect*)rectanglehandle)->getWidth();
+       return ((GHOST_Rect *)rectanglehandle)->getWidth();
 }
 
 
 
 GHOST_TInt32 GHOST_GetHeightRectangle(GHOST_RectangleHandle rectanglehandle)
 {
-       return ((GHOST_Rect*)rectanglehandle)->getHeight();
+       return ((GHOST_Rect *)rectanglehandle)->getHeight();
 }
 
 
 
 void GHOST_GetRectangle(GHOST_RectangleHandle rectanglehandle,
-                                                          GHOST_TInt32* l,
-                                                          GHOST_TInt32* t,
-                                                          GHOST_TInt32* r,
-                                                          GHOST_TInt32* b)
+                        GHOST_TInt32 *l,
+                        GHOST_TInt32 *t,
+                        GHOST_TInt32 *r,
+                        GHOST_TInt32 *b)
 {
-       GHOST_Rect *rect= (GHOST_Rect*) rectanglehandle;
-       
-       *l= rect->m_l;
-       *t= rect->m_t;
-       *r= rect->m_r;
-       *b= rect->m_b;
+       GHOST_Rect *rect = (GHOST_Rect *) rectanglehandle;
+
+       *l = rect->m_l;
+       *t = rect->m_t;
+       *r = rect->m_r;
+       *b = rect->m_b;
 }
 
 
 void GHOST_SetRectangle(GHOST_RectangleHandle rectanglehandle,
-                                               GHOST_TInt32 l,
-                                               GHOST_TInt32 t,
-                                               GHOST_TInt32 r,
-                                               GHOST_TInt32 b)
+                        GHOST_TInt32 l,
+                        GHOST_TInt32 t,
+                        GHOST_TInt32 r,
+                        GHOST_TInt32 b)
 {
-       ((GHOST_Rect*)rectanglehandle)->set(l, t, r, b);
+       ((GHOST_Rect *)rectanglehandle)->set(l, t, r, b);
 }
 
 
@@ -746,7 +746,7 @@ GHOST_TSuccess GHOST_IsEmptyRectangle(GHOST_RectangleHandle rectanglehandle)
 {
        GHOST_TSuccess result = GHOST_kFailure;
 
-       if (((GHOST_Rect*)rectanglehandle)->isEmpty())
+       if (((GHOST_Rect *)rectanglehandle)->isEmpty())
                result = GHOST_kSuccess;
 
        return result;
@@ -758,7 +758,7 @@ GHOST_TSuccess GHOST_IsValidRectangle(GHOST_RectangleHandle rectanglehandle)
 {
        GHOST_TSuccess result = GHOST_kFailure;
 
-       if(((GHOST_Rect*)rectanglehandle)->isValid())
+       if (((GHOST_Rect *)rectanglehandle)->isValid())
                result = GHOST_kSuccess;
 
        return result;
@@ -767,37 +767,37 @@ GHOST_TSuccess GHOST_IsValidRectangle(GHOST_RectangleHandle rectanglehandle)
 
 
 void GHOST_InsetRectangle(GHOST_RectangleHandle rectanglehandle,
-                                                 GHOST_TInt32 i)
+                          GHOST_TInt32 i)
 {
-       ((GHOST_Rect*)rectanglehandle)->inset(i);
+       ((GHOST_Rect *)rectanglehandle)->inset(i);
 }
 
 
 
 void GHOST_UnionRectangle(GHOST_RectangleHandle rectanglehandle,
-                                                 GHOST_RectangleHandle anotherrectanglehandle)
+                          GHOST_RectangleHandle anotherrectanglehandle)
 {
-       ((GHOST_Rect*)rectanglehandle)->unionRect(*(GHOST_Rect*)anotherrectanglehandle);
+       ((GHOST_Rect *)rectanglehandle)->unionRect(*(GHOST_Rect *)anotherrectanglehandle);
 }
 
 
 
 void GHOST_UnionPointRectangle(GHOST_RectangleHandle rectanglehandle,
-                                                          GHOST_TInt32 x,
-                                                          GHOST_TInt32 y)
+                               GHOST_TInt32 x,
+                               GHOST_TInt32 y)
 {
-       ((GHOST_Rect*)rectanglehandle)->unionPoint(x, y);
+       ((GHOST_Rect *)rectanglehandle)->unionPoint(x, y);
 }
 
 
 
 GHOST_TSuccess GHOST_IsInsideRectangle(GHOST_RectangleHandle rectanglehandle,
-                                                                          GHOST_TInt32 x,
-                                                                          GHOST_TInt32 y)
+                                       GHOST_TInt32 x,
+                                       GHOST_TInt32 y)
 {
        GHOST_TSuccess result = GHOST_kFailure;
 
-       if (((GHOST_Rect*)rectanglehandle)->isInside(x, y))
+       if (((GHOST_Rect *)rectanglehandle)->isInside(x, y))
                result = GHOST_kSuccess;
 
        return result;
@@ -806,11 +806,11 @@ GHOST_TSuccess GHOST_IsInsideRectangle(GHOST_RectangleHandle rectanglehandle,
 
 
 GHOST_TVisibility GHOST_GetRectangleVisibility(GHOST_RectangleHandle rectanglehandle,
-                                                                                          GHOST_RectangleHandle anotherrectanglehandle)
+                                               GHOST_RectangleHandle anotherrectanglehandle)
 {
        GHOST_TVisibility visible = GHOST_kNotVisible;
 
-       visible = ((GHOST_Rect*)rectanglehandle)->getVisibility(*(GHOST_Rect*)anotherrectanglehandle);
+       visible = ((GHOST_Rect *)rectanglehandle)->getVisibility(*(GHOST_Rect *)anotherrectanglehandle);
 
        return visible;
 }
@@ -818,56 +818,56 @@ GHOST_TVisibility GHOST_GetRectangleVisibility(GHOST_RectangleHandle rectangleha
 
 
 void GHOST_SetCenterRectangle(GHOST_RectangleHandle rectanglehandle,
-                                                         GHOST_TInt32 cx,
-                                                         GHOST_TInt32 cy)
+                              GHOST_TInt32 cx,
+                              GHOST_TInt32 cy)
 {
-       ((GHOST_Rect*)rectanglehandle)->setCenter(cx, cy);
+       ((GHOST_Rect *)rectanglehandle)->setCenter(cx, cy);
 }
 
 
 
 void GHOST_SetRectangleCenter(GHOST_RectangleHandle rectanglehandle,
-                                                         GHOST_TInt32 cx,
-                                                         GHOST_TInt32 cy,
-                                                         GHOST_TInt32 w,
-                                                         GHOST_TInt32 h)
+                              GHOST_TInt32 cx,
+                              GHOST_TInt32 cy,
+                              GHOST_TInt32 w,
+                              GHOST_TInt32 h)
 {
-       ((GHOST_Rect*)rectanglehandle)->setCenter(cx, cy, w, h);
+       ((GHOST_Rect *)rectanglehandle)->setCenter(cx, cy, w, h);
 }
 
 
 
 GHOST_TSuccess GHOST_ClipRectangle(GHOST_RectangleHandle rectanglehandle,
-                                                                  GHOST_RectangleHandle anotherrectanglehandle)
+                                   GHOST_RectangleHandle anotherrectanglehandle)
 {
        GHOST_TSuccess result = GHOST_kFailure;
 
-       if (((GHOST_Rect*)rectanglehandle)->clip(*(GHOST_Rect*)anotherrectanglehandle))
+       if (((GHOST_Rect *)rectanglehandle)->clip(*(GHOST_Rect *)anotherrectanglehandle))
                result = GHOST_kSuccess;
 
        return result;
 }
 
-GHOST_TUns8GHOST_getClipboard(int selection)
+GHOST_TUns8 *GHOST_getClipboard(int selection)
 {
-       GHOST_ISystemsystem = GHOST_ISystem::getSystem();
+       GHOST_ISystem *system = GHOST_ISystem::getSystem();
        return system->getClipboard(selection);
 }
 
 void GHOST_putClipboard(GHOST_TInt8 *buffer, int selection)
 {
-       GHOST_ISystemsystem = GHOST_ISystem::getSystem();
+       GHOST_ISystem *system = GHOST_ISystem::getSystem();
        system->putClipboard(buffer, selection);
 }
 
 int GHOST_toggleConsole(int action)
 {
-       GHOST_ISystemsystem = GHOST_ISystem::getSystem();
+       GHOST_ISystem *system = GHOST_ISystem::getSystem();
        return system->toggleConsole(action);
 }
 
 
 int GHOST_confirmQuit(GHOST_WindowHandle windowhandle){
-       GHOST_ISystemsystem = GHOST_ISystem::getSystem();
-       return system->confirmQuit((GHOST_IWindow*) windowhandle);
+       GHOST_ISystem *system = GHOST_ISystem::getSystem();
+       return system->confirmQuit((GHOST_IWindow *) windowhandle);
 }
index 49590c77eaa88a3123005637217924790b55f98c..2e602f33b4346a965aecd8bbb98a95776ac9df2d 100644 (file)
@@ -49,7 +49,7 @@ GHOST_CallbackEventConsumer::GHOST_CallbackEventConsumer(GHOST_EventCallbackProc
 }
 
 
-bool GHOST_CallbackEventConsumer::processEvent(GHOST_IEventevent)
+bool GHOST_CallbackEventConsumer::processEvent(GHOST_IEvent *event)
 {
        return m_eventCallback((GHOST_EventHandle)event, m_userData) != 0;
 }
index e7a1aed507d8e64ab62d846ec75cb9087781ab30..61aef742a48aa8eaf810b69d1afc4601549a90c4 100644 (file)
@@ -51,8 +51,8 @@ public:
         * @param       userData                The data passed back though the call-back routine.
         */
        GHOST_CallbackEventConsumer(
-               GHOST_EventCallbackProcPtr eventCallback, 
-               GHOST_TUserDataPtr userData);
+           GHOST_EventCallbackProcPtr eventCallback,
+           GHOST_TUserDataPtr userData);
 
        /**
         * Destructor.
@@ -66,13 +66,13 @@ public:
         * @param event The event that can be handled or ignored.
         * @return Indication as to whether the event was handled.
         */
-       virtual bool processEvent(GHOST_IEventevent);
+       virtual bool processEvent(GHOST_IEvent *event);
 
 protected:
        /** The call-back routine invoked. */
-       GHOST_EventCallbackProcPtr      m_eventCallback;
+       GHOST_EventCallbackProcPtr m_eventCallback;
        /** The data passed back though the call-back routine. */
-       GHOST_TUserDataPtr                      m_userData;
+       GHOST_TUserDataPtr m_userData;
 };
 
 #endif // __GHOST_CALLBACKEVENTCONSUMER_H__
index ca0d53b8297a67ca3ec33bdcab29dabec6252acd..380fb817ab07e3b58f50c60dd12ba21ff59843eb 100644 (file)
@@ -41,8 +41,8 @@
 
 
 GHOST_DisplayManager::GHOST_DisplayManager(
-       void)
-: m_settingsInitialized(false)
+    void)
+       : m_settingsInitialized(false)
 {
 }
 
@@ -54,7 +54,7 @@ GHOST_DisplayManager::~GHOST_DisplayManager(void)
 
 GHOST_TSuccess
 GHOST_DisplayManager::initialize(
-       void)
+               void)
 {
        GHOST_TSuccess success;
        if (!m_settingsInitialized) {
@@ -70,7 +70,7 @@ GHOST_DisplayManager::initialize(
 
 GHOST_TSuccess
 GHOST_DisplayManager::getNumDisplays(
-       GHOST_TUns8& /*numDisplays*/) const
+               GHOST_TUns8& /*numDisplays*/) const
 {
        // Don't know if we have a display...
        return GHOST_kFailure;
@@ -79,8 +79,8 @@ GHOST_DisplayManager::getNumDisplays(
 
 GHOST_TSuccess
 GHOST_DisplayManager::getNumDisplaySettings(
-       GHOST_TUns8 display, 
-       GHOST_TInt32& numSettings) const
+               GHOST_TUns8 display,
+               GHOST_TInt32& numSettings) const
 {
        GHOST_TSuccess success;
 
@@ -101,9 +101,9 @@ GHOST_DisplayManager::getNumDisplaySettings(
 
 GHOST_TSuccess
 GHOST_DisplayManager::getDisplaySetting(
-       GHOST_TUns8 display, 
-       GHOST_TInt32 index, 
-       GHOST_DisplaySetting& setting) const
+               GHOST_TUns8 display,
+               GHOST_TInt32 index,
+               GHOST_DisplaySetting& setting) const
 {
        GHOST_TSuccess success;
 
@@ -124,8 +124,8 @@ GHOST_DisplayManager::getDisplaySetting(
 
 GHOST_TSuccess
 GHOST_DisplayManager::getCurrentDisplaySetting(
-       GHOST_TUns8 /*display*/,
-       GHOST_DisplaySetting& /*setting*/) const
+               GHOST_TUns8 /*display*/,
+               GHOST_DisplaySetting& /*setting*/) const
 {
        return GHOST_kFailure;
 }
@@ -133,8 +133,8 @@ GHOST_DisplayManager::getCurrentDisplaySetting(
 
 GHOST_TSuccess
 GHOST_DisplayManager::setCurrentDisplaySetting(
-       GHOST_TUns8 /*display*/,
-       const GHOST_DisplaySetting& /*setting*/)
+               GHOST_TUns8 /*display*/,
+               const GHOST_DisplaySetting& /*setting*/)
 {
        return GHOST_kFailure;
 }
@@ -142,18 +142,18 @@ GHOST_DisplayManager::setCurrentDisplaySetting(
 
 GHOST_TSuccess
 GHOST_DisplayManager::findMatch(
-       GHOST_TUns8 display, 
-       const GHOST_DisplaySetting& setting, 
-       GHOST_DisplaySetting& match) const
+               GHOST_TUns8 display,
+               const GHOST_DisplaySetting& setting,
+               GHOST_DisplaySetting& match) const
 {
        GHOST_TSuccess success = GHOST_kSuccess;
        GHOST_ASSERT(m_settingsInitialized, "GHOST_DisplayManager::findMatch(): m_settingsInitialized=false");
 
        int criteria[4] = {
-           (int)setting.xPixels,
-           (int)setting.yPixels,
-           (int)setting.bpp,
-           (int)setting.frequency
+               (int)setting.xPixels,
+               (int)setting.yPixels,
+               (int)setting.bpp,
+               (int)setting.frequency
        };
        int capabilities[4];
        double field, score;
@@ -195,7 +195,7 @@ GHOST_DisplayManager::findMatch(
 
 GHOST_TSuccess
 GHOST_DisplayManager::initializeSettings(
-       void)
+               void)
 {
        GHOST_TUns8 numDisplays;
        GHOST_TSuccess success = getNumDisplays(numDisplays);
index 1449da7b096e0a20cd709adad7dcb8316b37e743..7752ae8cbc0f15f3a0ce0877874ab169bebc2f0c 100644 (file)
@@ -52,8 +52,8 @@ GHOST_DisplayManagerCarbon::GHOST_DisplayManagerCarbon(void)
        }
        if (m_numDisplays > 0)
        {
-               m_displayIDs = new CGDirectDisplayID [m_numDisplays];
-               GHOST_ASSERT((m_displayIDs!=NULL), "GHOST_DisplayManagerCarbon::GHOST_DisplayManagerCarbon(): memory allocation failed");
+               m_displayIDs = new CGDirectDisplayID[m_numDisplays];
+               GHOST_ASSERT((m_displayIDs != NULL), "GHOST_DisplayManagerCarbon::GHOST_DisplayManagerCarbon(): memory allocation failed");
                ::CGGetActiveDisplayList(m_numDisplays, m_displayIDs, &m_numDisplays);
        }
 }
@@ -68,7 +68,7 @@ GHOST_TSuccess GHOST_DisplayManagerCarbon::getNumDisplays(GHOST_TUns8& numDispla
 
 GHOST_TSuccess GHOST_DisplayManagerCarbon::getNumDisplaySettings(GHOST_TUns8 display, GHOST_TInt32& numSettings) const
 {
-       GHOST_ASSERT((display==kMainDisplay), "GHOST_DisplayManagerCarbon::getNumDisplaySettings(): only main display is supported");
+       GHOST_ASSERT((display == kMainDisplay), "GHOST_DisplayManagerCarbon::getNumDisplaySettings(): only main display is supported");
        
        CFArrayRef displayModes;
        displayModes = ::CGDisplayAvailableModes(m_displayIDs[display]);
@@ -81,19 +81,19 @@ GHOST_TSuccess GHOST_DisplayManagerCarbon::getNumDisplaySettings(GHOST_TUns8 dis
 
 GHOST_TSuccess GHOST_DisplayManagerCarbon::getDisplaySetting(GHOST_TUns8 display, GHOST_TInt32 index, GHOST_DisplaySetting& setting) const
 {
-       GHOST_ASSERT((display==kMainDisplay), "GHOST_DisplayManagerCarbon::getDisplaySetting(): only main display is supported");
+       GHOST_ASSERT((display == kMainDisplay), "GHOST_DisplayManagerCarbon::getDisplaySetting(): only main display is supported");
        
        CFArrayRef displayModes;
        CGDirectDisplayID d = m_displayIDs[display];
        displayModes = ::CGDisplayAvailableModes(d);
        //CFIndex numModes = ::CFArrayGetCount(displayModes);/*unused*/
        //GHOST_TInt32 numSettings = (GHOST_TInt32)numModes; /*unused*/
-       CFDictionaryRef displayModeValues = (CFDictionaryRef)::CFArrayGetValueAtIndex(displayModes, index);
+       CFDictionaryRef displayModeValues = (CFDictionaryRef) ::CFArrayGetValueAtIndex(displayModes, index);
                        
-       setting.xPixels         = getValue(displayModeValues, kCGDisplayWidth);
-       setting.yPixels         = getValue(displayModeValues, kCGDisplayHeight);
-       setting.bpp                     = getValue(displayModeValues, kCGDisplayBitsPerPixel);
-       setting.frequency       = getValue(displayModeValues, kCGDisplayRefreshRate);
+       setting.xPixels     = getValue(displayModeValues, kCGDisplayWidth);
+       setting.yPixels     = getValue(displayModeValues, kCGDisplayHeight);
+       setting.bpp         = getValue(displayModeValues, kCGDisplayBitsPerPixel);
+       setting.frequency   = getValue(displayModeValues, kCGDisplayRefreshRate);
                        
 #ifdef GHOST_DEBUG
        printf("display mode: width=%d, height=%d, bpp=%d, frequency=%d\n", setting.xPixels, setting.yPixels, setting.bpp, setting.frequency);
@@ -105,14 +105,14 @@ GHOST_TSuccess GHOST_DisplayManagerCarbon::getDisplaySetting(GHOST_TUns8 display
 
 GHOST_TSuccess GHOST_DisplayManagerCarbon::getCurrentDisplaySetting(GHOST_TUns8 display, GHOST_DisplaySetting& setting) const
 {
-       GHOST_ASSERT((display==kMainDisplay), "GHOST_DisplayManagerCarbon::getCurrentDisplaySetting(): only main display is supported");
+       GHOST_ASSERT((display == kMainDisplay), "GHOST_DisplayManagerCarbon::getCurrentDisplaySetting(): only main display is supported");
         
        CFDictionaryRef displayModeValues = ::CGDisplayCurrentMode(m_displayIDs[display]);
        
-       setting.xPixels         = getValue(displayModeValues, kCGDisplayWidth);
-       setting.yPixels         = getValue(displayModeValues, kCGDisplayHeight);
-       setting.bpp                     = getValue(displayModeValues, kCGDisplayBitsPerPixel);
-       setting.frequency       = getValue(displayModeValues, kCGDisplayRefreshRate);
+       setting.xPixels     = getValue(displayModeValues, kCGDisplayWidth);
+       setting.yPixels     = getValue(displayModeValues, kCGDisplayHeight);
+       setting.bpp         = getValue(displayModeValues, kCGDisplayBitsPerPixel);
+       setting.frequency   = getValue(displayModeValues, kCGDisplayRefreshRate);
 
 #ifdef GHOST_DEBUG
        printf("current display mode: width=%d, height=%d, bpp=%d, frequency=%d\n", setting.xPixels, setting.yPixels, setting.bpp, setting.frequency);
@@ -124,7 +124,7 @@ GHOST_TSuccess GHOST_DisplayManagerCarbon::getCurrentDisplaySetting(GHOST_TUns8
 
 GHOST_TSuccess GHOST_DisplayManagerCarbon::setCurrentDisplaySetting(GHOST_TUns8 display, const GHOST_DisplaySetting& setting)
 {
-       GHOST_ASSERT((display==kMainDisplay), "GHOST_DisplayManagerCarbon::setCurrentDisplaySetting(): only main display is supported");
+       GHOST_ASSERT((display == kMainDisplay), "GHOST_DisplayManagerCarbon::setCurrentDisplaySetting(): only main display is supported");
 
 #ifdef GHOST_DEBUG
        printf("GHOST_DisplayManagerCarbon::setCurrentDisplaySetting(): requested settings:\n");
@@ -135,12 +135,12 @@ GHOST_TSuccess GHOST_DisplayManagerCarbon::setCurrentDisplaySetting(GHOST_TUns8
 #endif // GHOST_DEBUG
 
        CFDictionaryRef displayModeValues = ::CGDisplayBestModeForParametersAndRefreshRate(
-               m_displayIDs[display],
-               (size_t)setting.bpp,
-               (size_t)setting.xPixels,
-               (size_t)setting.yPixels,
-               (CGRefreshRate)setting.frequency,
-               NULL);
+           m_displayIDs[display],
+           (size_t)setting.bpp,
+           (size_t)setting.xPixels,
+           (size_t)setting.yPixels,
+           (CGRefreshRate)setting.frequency,
+           NULL);
 
 #ifdef GHOST_DEBUG
        printf("GHOST_DisplayManagerCarbon::setCurrentDisplaySetting(): switching to:\n");
@@ -158,20 +158,20 @@ GHOST_TSuccess GHOST_DisplayManagerCarbon::setCurrentDisplaySetting(GHOST_TUns8
 
 long GHOST_DisplayManagerCarbon::getValue(CFDictionaryRef values, CFStringRef key) const
 {
-    CFNumberRef numberValue = (CFNumberRef) CFDictionaryGetValue(values, key);
+       CFNumberRef numberValue = (CFNumberRef) CFDictionaryGetValue(values, key);
     
-    if (!numberValue)
-    {
-        return -1;
-    }
+       if (!numberValue)
+       {
+               return -1;
+       }
     
-    long intValue;
+       long intValue;
     
-    if (!CFNumberGetValue(numberValue, kCFNumberLongType, &intValue))
-    {
-        return -1;
-    }
+       if (!CFNumberGetValue(numberValue, kCFNumberLongType, &intValue))
+       {
+               return -1;
+       }
     
-    return intValue;
+       return intValue;
 }
 
index 93467b8f46287aa6a734f588511294d19784821f..d9af12ba13f408921edc0a9b9410428fc9cd907f 100644 (file)
@@ -108,7 +108,7 @@ protected:
        /** Cached number of displays. */
        CGDisplayCount m_numDisplays;
        /** Cached display id's for each display. */
-       CGDirectDisplayIDm_displayIDs;
+       CGDirectDisplayID *m_displayIDs;
 };
 
 
index 31fb9faf0cfc2aa0b68b476fae8d2c1e81d2b285..eb116e30d2dc9ed634c348587ffc769232bec6dd 100644 (file)
@@ -43,7 +43,7 @@ public:
        GHOST_TSuccess getCurrentDisplaySetting( GHOST_TUns8 display, GHOST_DisplaySetting& setting ) const { return getDisplaySetting(display,GHOST_TInt32(0),setting); }
        GHOST_TSuccess setCurrentDisplaySetting( GHOST_TUns8 display, const GHOST_DisplaySetting& setting ){ return GHOST_kSuccess; }
 
-private :
+private:
        GHOST_SystemNULL * m_system;
 };
 
index 8d2348dcf5ca3c4ab2cd0abf4c30f53da71b4754..fbfbce264a52479edc928eca58ccffae657e787d 100644 (file)
@@ -45,7 +45,7 @@ GHOST_DisplayManagerSDL::GHOST_DisplayManagerSDL(GHOST_SystemSDL *system)
 GHOST_TSuccess
 GHOST_DisplayManagerSDL::getNumDisplays(GHOST_TUns8& numDisplays) const
 {
-       numDisplays=  SDL_GetNumVideoDisplays();
+       numDisplays =  SDL_GetNumVideoDisplays();
        return GHOST_kSuccess;
 }
 
@@ -140,8 +140,10 @@ GHOST_DisplayManagerSDL:: setCurrentDisplaySetting(GHOST_TUns8 display,
                        SDL_GetDisplayMode(display, i, &mode);
 
                        if (setting.xPixels > mode.w ||
-                               setting.yPixels > mode.h)
+                           setting.yPixels > mode.h)
+                       {
                                continue;
+                       }
 
                        x = setting.xPixels - mode.w;
                        y = setting.yPixels - mode.h;
@@ -175,7 +177,7 @@ GHOST_DisplayManagerSDL:: setCurrentDisplaySetting(GHOST_TUns8 display,
        }
        else {
                /* this is a problem for the BGE player :S, perhaps SDL2 will resolve at some point.
-                * we really need SDL_SetDisplayModeForDisplay() to become an API func! - campbell */
+               * we really need SDL_SetDisplayModeForDisplay() to become an API func! - campbell */
                printf("no windows available, cant fullscreen");
 
                /* do not fail, we will try again later when the window is created - wander */
index bfd8d1a77e68040b5ad2c209aba1c82512626c15..2139e2d5e7b5302bf7d8fc385397604bf0cf3c17 100644 (file)
@@ -68,8 +68,8 @@ public:
        setCurrentDisplaySetting(GHOST_TUns8 display,
                                 const GHOST_DisplaySetting& setting);
 
-private :
-       GHOST_SystemSDL * m_system;
+private:
+       GHOST_SystemSDL *m_system;
        SDL_DisplayMode m_mode;
 };
 
index b7d62a8109ed06521f8d583a44fd75b31f73e9ea..83df997115880d1e4851e153e7bde1c76770be61 100644 (file)
@@ -67,7 +67,7 @@ GHOST_TSuccess GHOST_DisplayManagerWin32::getNumDisplays(GHOST_TUns8& numDisplay
  */
 GHOST_TSuccess GHOST_DisplayManagerWin32::getNumDisplaySettings(GHOST_TUns8 display, GHOST_TInt32& numSettings) const
 {
-       GHOST_ASSERT((display==kMainDisplay), "GHOST_DisplayManagerWin32::getNumDisplaySettings(): only main displlay is supported");
+       GHOST_ASSERT((display == kMainDisplay), "GHOST_DisplayManagerWin32::getNumDisplaySettings(): only main displlay is supported");
        numSettings = 0;
        DEVMODE dm;
        while (::EnumDisplaySettings(NULL, numSettings, &dm)) {
@@ -79,16 +79,16 @@ GHOST_TSuccess GHOST_DisplayManagerWin32::getNumDisplaySettings(GHOST_TUns8 disp
 
 GHOST_TSuccess GHOST_DisplayManagerWin32::getDisplaySetting(GHOST_TUns8 display, GHOST_TInt32 index, GHOST_DisplaySetting& setting) const
 {
-       GHOST_ASSERT((display==kMainDisplay), "GHOST_DisplayManagerWin32::getDisplaySetting(): only main display is supported");
+       GHOST_ASSERT((display == kMainDisplay), "GHOST_DisplayManagerWin32::getDisplaySetting(): only main display is supported");
        GHOST_TSuccess success;
        DEVMODE dm;
        if (::EnumDisplaySettings(NULL, index, &dm)) {
 #ifdef GHOST_DEBUG
                printf("display mode: width=%d, height=%d, bpp=%d, frequency=%d\n", dm.dmPelsWidth, dm.dmPelsHeight, dm.dmBitsPerPel, dm.dmDisplayFrequency);
 #endif // GHOST_DEBUG
-               setting.xPixels         = dm.dmPelsWidth;
-               setting.yPixels         = dm.dmPelsHeight;
-               setting.bpp                     = dm.dmBitsPerPel;
+               setting.xPixels     = dm.dmPelsWidth;
+               setting.yPixels     = dm.dmPelsHeight;
+               setting.bpp         = dm.dmBitsPerPel;
                /* When you call the EnumDisplaySettings function, the dmDisplayFrequency member
                 * may return with the value 0 or 1. These values represent the display hardware's
                 * default refresh rate. This default rate is typically set by switches on a display 
@@ -112,14 +112,14 @@ GHOST_TSuccess GHOST_DisplayManagerWin32::getDisplaySetting(GHOST_TUns8 display,
 
 GHOST_TSuccess GHOST_DisplayManagerWin32::getCurrentDisplaySetting(GHOST_TUns8 display, GHOST_DisplaySetting& setting) const
 {
-       GHOST_ASSERT((display==kMainDisplay), "GHOST_DisplayManagerWin32::getCurrentDisplaySetting(): only main display is supported");
+       GHOST_ASSERT((display == kMainDisplay), "GHOST_DisplayManagerWin32::getCurrentDisplaySetting(): only main display is supported");
        return getDisplaySetting(kMainDisplay, ENUM_CURRENT_SETTINGS, setting);
 }
 
 
 GHOST_TSuccess GHOST_DisplayManagerWin32::setCurrentDisplaySetting(GHOST_TUns8 display, const GHOST_DisplaySetting& setting)
 {
-       GHOST_ASSERT((display==kMainDisplay), "GHOST_DisplayManagerWin32::setCurrentDisplaySetting(): only main display is supported");
+       GHOST_ASSERT((display == kMainDisplay), "GHOST_DisplayManagerWin32::setCurrentDisplaySetting(): only main display is supported");
 
        GHOST_DisplaySetting match;
        findMatch(display, setting, match);
@@ -127,21 +127,22 @@ GHOST_TSuccess GHOST_DisplayManagerWin32::setCurrentDisplaySetting(GHOST_TUns8 d
        int i = 0;
        while (::EnumDisplaySettings(NULL, i++, &dm)) {
                if ((dm.dmBitsPerPel == match.bpp) &&
-                       (dm.dmPelsWidth == match.xPixels) &&
-                       (dm.dmPelsHeight == match.yPixels) &&
-                       (dm.dmDisplayFrequency == match.frequency)) {
+                   (dm.dmPelsWidth == match.xPixels) &&
+                   (dm.dmPelsHeight == match.yPixels) &&
+                   (dm.dmDisplayFrequency == match.frequency))
+               {
                        break;
                }
        }
        /*
-       dm.dmBitsPerPel = match.bpp;
-       dm.dmPelsWidth = match.xPixels;
-       dm.dmPelsHeight = match.yPixels;
-       dm.dmDisplayFrequency = match.frequency;
-       dm.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY;
-       dm.dmSize = sizeof(DEVMODE);
-       dm.dmDriverExtra = 0;
-       */
+        * dm.dmBitsPerPel = match.bpp;
+        * dm.dmPelsWidth = match.xPixels;
+        * dm.dmPelsHeight = match.yPixels;
+        * dm.dmDisplayFrequency = match.frequency;
+        * dm.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY;
+        * dm.dmSize = sizeof(DEVMODE);
+        * dm.dmDriverExtra = 0;
+        */
 #ifdef GHOST_DEBUG
        printf("display change: Requested settings:\n");
        printf("  dmBitsPerPel=%d\n", dm.dmBitsPerPel);
@@ -154,31 +155,31 @@ GHOST_TSuccess GHOST_DisplayManagerWin32::setCurrentDisplaySetting(GHOST_TUns8 d
 #ifdef GHOST_DEBUG
        switch (status)
        {
-       case DISP_CHANGE_SUCCESSFUL:
-               printf("display change: The settings change was successful.\n");
-               break;
-       case DISP_CHANGE_RESTART:
-               printf("display change: The computer must be restarted in order for the graphics mode to work.\n");
-               break;
-       case DISP_CHANGE_BADFLAGS:
-               printf("display change: An invalid set of flags was passed in.\n");
-               break;
-       case DISP_CHANGE_BADPARAM:
-               printf("display change: An invalid parameter was passed in. This can include an invalid flag or combination of flags.\n");
-               break;
-       case DISP_CHANGE_FAILED:
-               printf("display change: The display driver failed the specified graphics mode.\n");
-               break;
-       case DISP_CHANGE_BADMODE:
-               printf("display change: The graphics mode is not supported.\n");
-               break;
-       case DISP_CHANGE_NOTUPDATED:
-               printf("display change: Windows NT: Unable to write settings to the registry.\n");
-               break;
-       default:
-               printf("display change: Return value invalid\n");
-               break;
+               case DISP_CHANGE_SUCCESSFUL:
+                       printf("display change: The settings change was successful.\n");
+                       break;
+               case DISP_CHANGE_RESTART:
+                       printf("display change: The computer must be restarted in order for the graphics mode to work.\n");
+                       break;
+               case DISP_CHANGE_BADFLAGS:
+                       printf("display change: An invalid set of flags was passed in.\n");
+                       break;
+               case DISP_CHANGE_BADPARAM:
+                       printf("display change: An invalid parameter was passed in. This can include an invalid flag or combination of flags.\n");
+                       break;
+               case DISP_CHANGE_FAILED:
+                       printf("display change: The display driver failed the specified graphics mode.\n");
+                       break;
+               case DISP_CHANGE_BADMODE:
+                       printf("display change: The graphics mode is not supported.\n");
+                       break;
+               case DISP_CHANGE_NOTUPDATED:
+                       printf("display change: Windows NT: Unable to write settings to the registry.\n");
+                       break;
+               default:
+                       printf("display change: Return value invalid\n");
+                       break;
        }
 #endif // GHOST_DEBUG
-       return status == DISP_CHANGE_SUCCESSFUL? GHOST_kSuccess : GHOST_kFailure;
+       return status == DISP_CHANGE_SUCCESSFUL ? GHOST_kSuccess : GHOST_kFailure;
 }
index b8fe271fd4de72dd673e46bd954ab8bf6655bde6..d719a4caa555aeff06b7bb0e062ecfdd27e5d50b 100644 (file)
 
 GHOST_DisplayManagerX11::
 GHOST_DisplayManagerX11(
-       GHOST_SystemX11 *system
-) :
+    GHOST_SystemX11 *system
+    ) :
        GHOST_DisplayManager(),
        m_system(system)
 {
        //nothing to do.
 }
 
-       GHOST_TSuccess 
+GHOST_TSuccess
 GHOST_DisplayManagerX11::
-getNumDisplays(
-       GHOST_TUns8& numDisplays
-) const{       
+getNumDisplays(GHOST_TUns8& numDisplays) const
+{
        numDisplays =  m_system->getNumDisplays();
        return GHOST_kSuccess;
 }
 
 
-       GHOST_TSuccess 
+GHOST_TSuccess
 GHOST_DisplayManagerX11::
 getNumDisplaySettings(
-       GHOST_TUns8 display,
-       GHOST_TInt32& numSettings
-) const{
+               GHOST_TUns8 display,
+               GHOST_TInt32& numSettings) const
+{
 #ifdef WITH_X11_XF86VMODE
        int majorVersion, minorVersion;
        XF86VidModeModeInfo **vidmodes;
@@ -96,13 +95,13 @@ getNumDisplaySettings(
        return GHOST_kSuccess;
 }
 
-       GHOST_TSuccess 
+GHOST_TSuccess
 GHOST_DisplayManagerX11::
 getDisplaySetting(
-       GHOST_TUns8 display,
-       GHOST_TInt32 index,
-       GHOST_DisplaySetting& setting
-) const {
+               GHOST_TUns8 display,
+               GHOST_TInt32 index,
+               GHOST_DisplaySetting& setting) const
+{
 
 #ifdef WITH_X11_XF86VMODE
        int majorVersion, minorVersion;
@@ -128,13 +127,13 @@ getDisplaySetting(
 
        setting.xPixels = vidmodes[index]->hdisplay;
        setting.yPixels = vidmodes[index]->vdisplay;
-       setting.bpp = DefaultDepth(dpy,DefaultScreen(dpy));
+       setting.bpp = DefaultDepth(dpy, DefaultScreen(dpy));
 
 #else
        GHOST_ASSERT(display < 1, "Only single display systems are currently supported.\n");    
        GHOST_ASSERT(index < 1, "Requested setting outside of valid range.\n"); 
        
-       Display * x_display = m_system->getXDisplay();
+       Display *x_display = m_system->getXDisplay();
 
        if (x_display == NULL) {
                return GHOST_kFailure;
@@ -142,7 +141,7 @@ getDisplaySetting(
 
        setting.xPixels  = DisplayWidth(x_display, DefaultScreen(x_display));
        setting.yPixels = DisplayHeight(x_display, DefaultScreen(x_display));
-       setting.bpp = DefaultDepth(x_display,DefaultScreen(x_display));
+       setting.bpp = DefaultDepth(x_display, DefaultScreen(x_display));
 #endif
 
        // Don't think it's possible to get this value from X!
@@ -152,25 +151,25 @@ getDisplaySetting(
        return GHOST_kSuccess;
 }
        
-       GHOST_TSuccess 
+GHOST_TSuccess
 GHOST_DisplayManagerX11::
 getCurrentDisplaySetting(
-       GHOST_TUns8 display,
-       GHOST_DisplaySetting& setting
-) const {
+               GHOST_TUns8 display,
+               GHOST_DisplaySetting& setting) const
+{
        /* According to the xf86vidmodegetallmodelines man page,
         * "The first element of the array corresponds to the current video mode."
         */
-       return getDisplaySetting(display,GHOST_TInt32(0),setting);
+       return getDisplaySetting(display, GHOST_TInt32(0), setting);
 }
 
 
-       GHOST_TSuccess 
+GHOST_TSuccess
 GHOST_DisplayManagerX11::
 setCurrentDisplaySetting(
-       GHOST_TUns8 display,
-       const GHOST_DisplaySetting& setting
-){
+               GHOST_TUns8 display,
+               const GHOST_DisplaySetting& setting)
+{
 #ifdef WITH_X11_XF86VMODE
        //
        // Mode switching code ported from Quake 2:
@@ -196,7 +195,7 @@ setCurrentDisplaySetting(
        }
 #  ifdef _DEBUG
        printf("Using XFree86-VidModeExtension Version %d.%d\n",
-                       majorVersion, minorVersion);
+              majorVersion, minorVersion);
 #  endif
 
        /* The X11 man page says vidmodes needs to be freed, but doing so causes a
@@ -208,7 +207,7 @@ setCurrentDisplaySetting(
 
        for (int i = 0; i < num_vidmodes; i++) {
                if (setting.xPixels > vidmodes[i]->hdisplay ||
-                       setting.yPixels > vidmodes[i]->vdisplay)
+                   setting.yPixels > vidmodes[i]->vdisplay)
                        continue;
 
                x = setting.xPixels - vidmodes[i]->hdisplay;
@@ -226,7 +225,7 @@ setCurrentDisplaySetting(
                actualWidth = vidmodes[best_fit]->hdisplay;
                actualHeight = vidmodes[best_fit]->vdisplay;
                printf("Switching to video mode %dx%d\n",
-                               actualWidth, actualHeight);
+                      actualWidth, actualHeight);
 #  endif
 
                // change to the mode
@@ -234,7 +233,8 @@ setCurrentDisplaySetting(
 
                // Move the viewport to top left
                XF86VidModeSetViewPort(dpy, scrnum, 0, 0);
-       } else
+       }
+       else
                return GHOST_kFailure;
 
        XFlush(dpy);
index c4d2b6dbb0a25de6cd4f02ded7cb7b612c69fc32..61b4578cac3a03a4c60ee525d4c9410a04548d1f 100644 (file)
@@ -50,18 +50,18 @@ public:
         * Constructor.
         */
        GHOST_DisplayManagerX11(
-               GHOST_SystemX11 *system
-       );
+           GHOST_SystemX11 *system
+           );
 
        /**
         * Returns the number of display devices on this system.
         * @param numDisplays The number of displays on this system.
         * @return Indication of success.
         */
-               GHOST_TSuccess 
+       GHOST_TSuccess
        getNumDisplays(
-               GHOST_TUns8& numDisplays
-       ) const;
+           GHOST_TUns8& numDisplays
+           ) const;
 
        /**
         * Returns the number of display settings for this display device.
@@ -69,11 +69,11 @@ public:
         * @param setting The number of settings of the display device with this index.
         * @return Indication of success.
         */
-               GHOST_TSuccess 
+       GHOST_TSuccess
        getNumDisplaySettings(
-               GHOST_TUns8 display,
-               GHOST_TInt32& numSettings
-       ) const;
+           GHOST_TUns8 display,
+           GHOST_TInt32& numSettings
+           ) const;
 
        /**
         * Returns the current setting for this display device. 
@@ -82,12 +82,12 @@ public:
         * @param setting The setting of the display device with this index.
         * @return Indication of success.
         */
-               GHOST_TSuccess 
+       GHOST_TSuccess
        getDisplaySetting(
-               GHOST_TUns8 display,
-               GHOST_TInt32 index,
-               GHOST_DisplaySetting& setting
-       ) const;
+           GHOST_TUns8 display,
+           GHOST_TInt32 index,
+           GHOST_DisplaySetting& setting
+           ) const;
 
        /**
         * Returns the current setting for this display device. 
@@ -95,11 +95,11 @@ public:
         * @param setting The current setting of the display device with this index.
         * @return Indication of success.
         */
-               GHOST_TSuccess 
+       GHOST_TSuccess
        getCurrentDisplaySetting(
-               GHOST_TUns8 display,
-               GHOST_DisplaySetting& setting
-       ) const;
+           GHOST_TUns8 display,
+           GHOST_DisplaySetting& setting
+           ) const;
 
        /**
         * Changes the current setting for this display device. 
@@ -107,15 +107,15 @@ public:
         * @param setting The current setting of the display device with this index.
         * @return Indication of success.
         */
-               GHOST_TSuccess 
+       GHOST_TSuccess
        setCurrentDisplaySetting(
-               GHOST_TUns8 display,
-               const GHOST_DisplaySetting& setting
-       );
+           GHOST_TUns8 display,
+           const GHOST_DisplaySetting& setting
+           );
 
-private :
+private:
 
-       GHOST_SystemX11 * m_system;
+       GHOST_SystemX11 *m_system;
 };
 
 
index c13c242bc7e9b7376f5a6beb2d30ad426fe4c4a3..0f07435d417a0cd9c9ecb32056d1a335308144ac 100644 (file)
@@ -43,10 +43,10 @@ void printLastError(void);
 #endif // GHOST_DEBUG
 
 
-GHOST_DropTargetWin32::GHOST_DropTargetWin32(GHOST_WindowWin32 * window, GHOST_SystemWin32 * system)
-:
-m_window(window),
-m_system(system)
+GHOST_DropTargetWin32::GHOST_DropTargetWin32(GHOST_WindowWin32 *window, GHOST_SystemWin32 *system)
+       :
+       m_window(window),
+       m_system(system)
 {
        m_cRef = 1;
        m_hWnd = window->getHWND();
@@ -63,23 +63,22 @@ GHOST_DropTargetWin32::~GHOST_DropTargetWin32()
 
 
 /* 
- *     IUnknown::QueryInterface
+ *  IUnknown::QueryInterface
  */
-HRESULT __stdcall GHOST_DropTargetWin32::QueryInterface (REFIID riid, void ** ppvObj)
+HRESULT __stdcall GHOST_DropTargetWin32::QueryInterface(REFIID riid, void **ppvObj)
 {
 
        if (!ppvObj)
                return E_INVALIDARG;
        *ppvObj = NULL;
 
-       if(riid == IID_IUnknown || riid == IID_IDropTarget)
+       if (riid == IID_IUnknown || riid == IID_IDropTarget)
        {
                AddRef();
-               *ppvObj = (void*)this;
+               *ppvObj = (void *)this;
                return S_OK;
        }
-       else
-       {
+       else {
                *ppvObj = 0;
                return E_NOINTERFACE;
        }
@@ -102,13 +101,12 @@ ULONG __stdcall GHOST_DropTargetWin32::Release(void)
 {
        ULONG refs = ::InterlockedDecrement(&m_cRef);
                
-       if(refs == 0)
+       if (refs == 0)
        {
                delete this;
                return 0;
        }
-       else
-       {
+       else {
                return refs;
        }
 }
@@ -116,7 +114,7 @@ ULONG __stdcall GHOST_DropTargetWin32::Release(void)
 /* 
  * Implementation of IDropTarget::DragEnter
  */
-HRESULT __stdcall GHOST_DropTargetWin32::DragEnter(IDataObject * pDataObject, DWORD grfKeyState, POINTL pt, DWORD * pdwEffect)
+HRESULT __stdcall GHOST_DropTargetWin32::DragEnter(IDataObject *pDataObject, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
 {
        // we accept all drop by default
        m_window->setAcceptDragOperation(true);
@@ -130,14 +128,13 @@ HRESULT __stdcall GHOST_DropTargetWin32::DragEnter(IDataObject * pDataObject, DW
 /* 
  * Implementation of IDropTarget::DragOver
  */
-HRESULT __stdcall GHOST_DropTargetWin32::DragOver(DWORD grfKeyState, POINTL pt, DWORD * pdwEffect)
+HRESULT __stdcall GHOST_DropTargetWin32::DragOver(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
 {
-       if(m_window->canAcceptDragOperation())
+       if (m_window->canAcceptDragOperation())
        {
                *pdwEffect = allowedDropEffect(*pdwEffect);
        }
-       else
-       {
+       else {
                *pdwEffect = DROPEFFECT_NONE;
                //*pdwEffect = DROPEFFECT_COPY; // XXX Uncomment to test drop. Drop will not be called if pdwEffect == DROPEFFECT_NONE.
        }
@@ -159,20 +156,19 @@ HRESULT __stdcall GHOST_DropTargetWin32::DragLeave(void)
  * This function will not be called if pdwEffect is set to DROPEFFECT_NONE in 
  * the implementation of IDropTarget::DragOver
  */
-HRESULT __stdcall GHOST_DropTargetWin32::Drop(IDataObject * pDataObject, DWORD grfKeyState, POINTL pt, DWORD * pdwEffect)
+HRESULT __stdcall GHOST_DropTargetWin32::Drop(IDataObject *pDataObject, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
 {
-       void * data = getGhostData(pDataObject);
-       if(m_window->canAcceptDragOperation())
+       void *data = getGhostData(pDataObject);
+       if (m_window->canAcceptDragOperation())
        {
                *pdwEffect = allowedDropEffect(*pdwEffect);
 
        }
-       else
-       {
+       else {
                *pdwEffect = DROPEFFECT_NONE;
        }
        if (data)
-               m_system->pushDragDropEvent(GHOST_kEventDraggingDropDone, m_draggedObjectType, m_window, pt.x, pt.y, data );
+               m_system->pushDragDropEvent(GHOST_kEventDraggingDropDone, m_draggedObjectType, m_window, pt.x, pt.y, data);
                
        m_draggedObjectType = GHOST_kDragnDropTypeUnknown;
        return S_OK;
@@ -185,27 +181,27 @@ HRESULT __stdcall GHOST_DropTargetWin32::Drop(IDataObject * pDataObject, DWORD g
 DWORD GHOST_DropTargetWin32::allowedDropEffect(DWORD dwAllowed)
 {
        DWORD dwEffect = DROPEFFECT_NONE;
-       if(dwAllowed & DROPEFFECT_COPY) 
+       if (dwAllowed & DROPEFFECT_COPY)
                dwEffect = DROPEFFECT_COPY;
 
        return dwEffect;
 }
 
-GHOST_TDragnDropTypes GHOST_DropTargetWin32::getGhostType(IDataObject * pDataObject)
+GHOST_TDragnDropTypes GHOST_DropTargetWin32::getGhostType(IDataObject *pDataObject)
 {
        /* Text
         * Note: Unicode text is aviable as CF_TEXT too, the system can do the 
         * conversion, but we do the conversion ourself with WC_NO_BEST_FIT_CHARS.
         */
        FORMATETC fmtetc = { CF_TEXT, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
-       if(pDataObject->QueryGetData(&fmtetc) == S_OK)
+       if (pDataObject->QueryGetData(&fmtetc) == S_OK)
        {
                return GHOST_kDragnDropTypeString;
        }
 
        // Filesnames
        fmtetc.cfFormat = CF_HDROP;
-       if(pDataObject->QueryGetData(&fmtetc) == S_OK)
+       if (pDataObject->QueryGetData(&fmtetc) == S_OK)
        {
                return GHOST_kDragnDropTypeFilenames;
        }
@@ -213,10 +209,10 @@ GHOST_TDragnDropTypes GHOST_DropTargetWin32::getGhostType(IDataObject * pDataObj
        return GHOST_kDragnDropTypeUnknown;
 }
 
-void * GHOST_DropTargetWin32::getGhostData(IDataObject * pDataObject)
+void *GHOST_DropTargetWin32::getGhostData(IDataObject *pDataObject)
 {
        GHOST_TDragnDropTypes type = getGhostType(pDataObject);
-       switch(type)
+       switch (type)
        {
                case GHOST_kDragnDropTypeFilenames:
                        return getDropDataAsFilenames(pDataObject);
@@ -237,11 +233,11 @@ void * GHOST_DropTargetWin32::getGhostData(IDataObject * pDataObject)
        return NULL;
 }
 
-void * GHOST_DropTargetWin32::getDropDataAsFilenames(IDataObject * pDataObject)
+void *GHOST_DropTargetWin32::getDropDataAsFilenames(IDataObject *pDataObject)
 {
-       UINT  totfiles, nvalid=0;
-       WCHAR fpath [MAX_PATH]; 
-       char * temp_path;
+       UINT totfiles, nvalid = 0;
+       WCHAR fpath[MAX_PATH];
+       char *temp_path;
        GHOST_TStringArray *strArray = NULL;
        FORMATETC fmtetc = { CF_HDROP, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
        STGMEDIUM stgmed;
@@ -249,35 +245,35 @@ void * GHOST_DropTargetWin32::getDropDataAsFilenames(IDataObject * pDataObject)
 
        // Check if dataobject supplies the format we want.
        // Double checking here, first in getGhostType.
-       if(pDataObject->QueryGetData(&fmtetc) == S_OK)
+       if (pDataObject->QueryGetData(&fmtetc) == S_OK)
        {
-               if(pDataObject->GetData(&fmtetc, &stgmed) == S_OK)
+               if (pDataObject->GetData(&fmtetc, &stgmed) == S_OK)
                {
-                       hdrop = (HDROP)::GlobalLock(stgmed.hGlobal);
+                       hdrop = (HDROP) ::GlobalLock(stgmed.hGlobal);
 
-                       totfiles = ::DragQueryFileW ( hdrop, -1, NULL, 0 );
+                       totfiles = ::DragQueryFileW(hdrop, -1, NULL, 0);
                        if (!totfiles)
                        {
                                ::GlobalUnlock(stgmed.hGlobal);
                                return NULL;
                        }
 
-                       strArray = (GHOST_TStringArray*) ::malloc(sizeof(GHOST_TStringArray));
+                       strArray = (GHOST_TStringArray *) ::malloc(sizeof(GHOST_TStringArray));
                        strArray->count = 0;
-                       strArray->strings = (GHOST_TUns8**) ::malloc(totfiles*sizeof(GHOST_TUns8*));
+                       strArray->strings = (GHOST_TUns8 **) ::malloc(totfiles * sizeof(GHOST_TUns8 *));
 
-                       for ( UINT nfile = 0; nfile < totfiles; nfile++ )
+                       for (UINT nfile = 0; nfile < totfiles; nfile++)
                        {
-                               if ( ::DragQueryFileW ( hdrop, nfile, fpath, MAX_PATH ) > 0 )
+                               if (::DragQueryFileW(hdrop, nfile, fpath, MAX_PATH) > 0)
                                {
-                                       if ( !(temp_path = alloc_utf_8_from_16(fpath, 0)) )
+                                       if (!(temp_path = alloc_utf_8_from_16(fpath, 0)) )
                                        {
                                                continue;
                                        } 
                                        // Just ignore paths that could not be converted verbatim.
 
-                                       strArray->strings[nvalid] = (GHOST_TUns8*) temp_path;
-                                       strArray->count = nvalid+1;
+                                       strArray->strings[nvalid] = (GHOST_TUns8 *) temp_path;
+                                       strArray->count = nvalid + 1;
                                        nvalid++;
                                }
                        }
@@ -291,20 +287,20 @@ void * GHOST_DropTargetWin32::getDropDataAsFilenames(IDataObject * pDataObject)
        return NULL;
 }
 
-void * GHOST_DropTargetWin32::getDropDataAsString(IDataObject * pDataObject)
+void *GHOST_DropTargetWin32::getDropDataAsString(IDataObject *pDataObject)
 {
-       chartmp_string;
+       char *tmp_string;
        FORMATETC fmtetc = { CF_UNICODETEXT, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
        STGMEDIUM stgmed;
 
        // Try unicode first.
        // Check if dataobject supplies the format we want.
-       if(pDataObject->QueryGetData(&fmtetc) == S_OK)
+       if (pDataObject->QueryGetData(&fmtetc) == S_OK)
        {
-               if(pDataObject->GetData(&fmtetc, &stgmed) == S_OK)
+               if (pDataObject->GetData(&fmtetc, &stgmed) == S_OK)
                {
-                       LPCWSTR wstr = (LPCWSTR)::GlobalLock(stgmed.hGlobal);
-                       if ( !(tmp_string = alloc_utf_8_from_16((wchar_t*)wstr, 0)) )
+                       LPCWSTR wstr = (LPCWSTR) ::GlobalLock(stgmed.hGlobal);
+                       if (!(tmp_string = alloc_utf_8_from_16((wchar_t *)wstr, 0)) )
                        {
                                ::GlobalUnlock(stgmed.hGlobal);
                                return NULL;
@@ -313,7 +309,7 @@ void * GHOST_DropTargetWin32::getDropDataAsString(IDataObject * pDataObject)
                        ::GlobalUnlock(stgmed.hGlobal);
                        ::ReleaseStgMedium(&stgmed);
 #ifdef GHOST_DEBUG
-                       ::printf("\n<converted droped unicode string>\n%s\n</droped converted unicode string>\n",tmp_string);
+                       ::printf("\n<converted droped unicode string>\n%s\n</droped converted unicode string>\n", tmp_string);
 #endif // GHOST_DEBUG
                        return tmp_string;
                }
@@ -321,20 +317,20 @@ void * GHOST_DropTargetWin32::getDropDataAsString(IDataObject * pDataObject)
 
        fmtetc.cfFormat = CF_TEXT;
 
-       if(pDataObject->QueryGetData(&fmtetc) == S_OK)
+       if (pDataObject->QueryGetData(&fmtetc) == S_OK)
        {
-               if(pDataObject->GetData(&fmtetc, &stgmed) == S_OK)
+               if (pDataObject->GetData(&fmtetc, &stgmed) == S_OK)
                {
-                       char * str = (char*)::GlobalLock(stgmed.hGlobal);
+                       char *str = (char *)::GlobalLock(stgmed.hGlobal);
                        
-                       tmp_string = (char*)::malloc(::strlen(str)+1);
-                       if ( !tmp_string )
+                       tmp_string = (char *)::malloc(::strlen(str) + 1);
+                       if (!tmp_string)
                        {
                                ::GlobalUnlock(stgmed.hGlobal);
                                return NULL;
                        }
 
-                       if ( !::strcpy(tmp_string, str) )
+                       if (!::strcpy(tmp_string, str) )
                        {
                                ::free(tmp_string);
                                ::GlobalUnlock(stgmed.hGlobal);
@@ -357,16 +353,16 @@ int GHOST_DropTargetWin32::WideCharToANSI(LPCWSTR in, char * &out)
        out = NULL; //caller should free if != NULL
 
        // Get the required size.
-       size = ::WideCharToMultiByte(CP_ACP,            //System Default Codepage
-                                                               0x00000400,             // WC_NO_BEST_FIT_CHARS
-                                                               in,
-                                                               -1,                             //-1 null terminated, makes output null terminated too.
-                                                               NULL,
-                                                               0,
-                                                               NULL,NULL
-                       );
+       size = ::WideCharToMultiByte(CP_ACP,        //System Default Codepage
+                                    0x00000400,    // WC_NO_BEST_FIT_CHARS
+                                    in,
+                                    -1,            //-1 null terminated, makes output null terminated too.
+                                    NULL,
+                                    0,
+                                    NULL, NULL
+                                    );
        
-       if(!size) 
+       if (!size)
        {
 #ifdef GHOST_DEBUG
                ::printLastError();
@@ -374,7 +370,7 @@ int GHOST_DropTargetWin32::WideCharToANSI(LPCWSTR in, char * &out)
                return 0;
        }
 
-       out = (char*)::malloc(size);
+       out = (char *)::malloc(size);
        if (!out)
        {
                ::printf("\nmalloc failed!!!");
@@ -382,15 +378,15 @@ int GHOST_DropTargetWin32::WideCharToANSI(LPCWSTR in, char * &out)
        }
 
        size = ::WideCharToMultiByte(CP_ACP,
-                                                               0x00000400,
-                                                               in,
-                                                               -1,
-                                                               (LPSTR) out,
-                                                               size,
-                                                               NULL,NULL
-                       );
-
-       if(!size)
+                                    0x00000400,
+                                    in,
+                                    -1,
+                                    (LPSTR) out,
+                                    size,
+                                    NULL, NULL
+                                    );
+
+       if (!size)
        {
 #ifdef GHOST_DEBUG
                ::printLastError();
@@ -408,15 +404,15 @@ void printLastError(void)
        DWORD err;
 
        err = GetLastError();
-       if(FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
-               FORMAT_MESSAGE_FROM_SYSTEM,
-               NULL,
-               err,
-               0,
-               (LPTSTR)&s,
-               0,
-               NULL)
-       )
+       if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
+                         FORMAT_MESSAGE_FROM_SYSTEM,
+                         NULL,
+                         err,
+                         0,
+                         (LPTSTR)&s,
+                         0,
+                         NULL)
+           )
        {
                printf("\nLastError: (%d) %s\n", (int)err, s);
                LocalFree(s);
index 9f80b82436eea61657b64f580c03e76f1fad175b..88a4032ac23747697ef22451308fe29c2a5c6ad3 100644 (file)
@@ -47,22 +47,22 @@ public:
         * inherited, directly or indirectly, from IUnknown. Therefore, the three 
         * methods in IUnknown are the first entries in the VTable for every interface. 
         */
-       HRESULT __stdcall QueryInterface (REFIID riid, void ** ppvObj);
-       ULONG   __stdcall AddRef (void);
-       ULONG   __stdcall Release (void);
+       HRESULT __stdcall QueryInterface(REFIID riid, void **ppvObj);
+       ULONG __stdcall AddRef(void);
+       ULONG __stdcall Release(void);
 
        /* IDropTarget implementation
-        + The IDropTarget interface is one of the interfaces you implement to
-        provide drag-and-drop operations in your application. It contains methods 
-        used in any application that can be a target for data during a 
-        drag-and-drop operation. A drop-target application is responsible for:
+        + The IDropTarget interface is one of the interfaces you implement to
+        *   provide drag-and-drop operations in your application. It contains methods
+        *   used in any application that can be a target for data during a
+        *   drag-and-drop operation. A drop-target application is responsible for:
         * 
-        *      - Determining the effect of the drop on the target application.
-        *      - Incorporating any valid dropped data when the drop occurs.
-        *      - Communicating target feedback to the source so the source application
+        *  - Determining the effect of the drop on the target application.
+        *  - Incorporating any valid dropped data when the drop occurs.
+        *  - Communicating target feedback to the source so the source application
         *        can provide appropriate visual feedback such as setting the cursor.
-        *      - Implementing drag scrolling.
-        *      - Registering and revoking its application windows as drop targets.
+        *  - Implementing drag scrolling.
+        *  - Registering and revoking its application windows as drop targets.
         * 
         * The IDropTarget interface contains methods that handle all these 
         * responsibilities except registering and revoking the application window 
@@ -70,10 +70,10 @@ public:
         * RevokeDragDrop functions.
         */
        
-       HRESULT __stdcall DragEnter (IDataObject * pDataObject, DWORD grfKeyState, POINTL pt, DWORD * pdwEffect);
-       HRESULT __stdcall DragOver (DWORD grfKeyState, POINTL pt, DWORD * pdwEffect);
-       HRESULT __stdcall DragLeave (void);
-       HRESULT __stdcall Drop (IDataObject * pDataObject, DWORD grfKeyState, POINTL pt, DWORD * pdwEffect);
+       HRESULT __stdcall DragEnter(IDataObject *pDataObject, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect);
+       HRESULT __stdcall DragOver(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect);
+       HRESULT __stdcall DragLeave(void);
+       HRESULT __stdcall Drop(IDataObject *pDataObject, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect);
 
        /**
         * Constructor
@@ -83,7 +83,7 @@ public:
         * @param window        The window to register as drop target.
         * @param system        The associated system.
         */
-       GHOST_DropTargetWin32(GHOST_WindowWin32 * window, GHOST_SystemWin32 * system);
+       GHOST_DropTargetWin32(GHOST_WindowWin32 *window, GHOST_SystemWin32 *system);
 
        /**
         * Destructor
@@ -107,7 +107,7 @@ private:
         * @param pDataObject Pointer to the DataObject.
         * @return GHOST data type.
         */
-       GHOST_TDragnDropTypes getGhostType(IDataObject * pDataObject);
+       GHOST_TDragnDropTypes getGhostType(IDataObject *pDataObject);
 
        /**
         * Get data to pass in event.
@@ -115,21 +115,21 @@ private:
         * @param pDataObject Pointer to the DataObject.
         * @return Pointer to data.
         */
-       void * getGhostData(IDataObject * pDataObject);
+       void *getGhostData(IDataObject *pDataObject);
 
        /**
         * Allocate data as file array to pass in event.
         * @param pDataObject Pointer to the DataObject.
         * @return Pointer to data.
         */
-       void * getDropDataAsFilenames(IDataObject * pDataObject);
+       void *getDropDataAsFilenames(IDataObject *pDataObject);
 
        /**
         * Allocate data as string to pass in event.
         * @param pDataObject Pointer to the DataObject.
         * @return Pointer to data.
         */
-       void * getDropDataAsString(IDataObject * pDataObject);
+       void *getDropDataAsString(IDataObject *pDataObject);
 
        /**
         * Convert Unicode to ANSI, replacing unconvertable chars with '?'.
@@ -143,16 +143,15 @@ private:
 
        /* Private member variables */
        /* COM reference count. */
-       LONG    m_cRef; 
+       LONG m_cRef;
        /* Handle of the associated window. */
-       HWND    m_hWnd;
+       HWND m_hWnd;
        /* The associated GHOST_WindowWin32. */
-       GHOST_WindowWin32 * m_window;
+       GHOST_WindowWin32 *m_window;
        /* The System. */
-       GHOST_SystemWin32 * m_system;
+       GHOST_SystemWin32 *m_system;
        /* Data type of the dragged object */
        GHOST_TDragnDropTypes m_draggedObjectType;
-
 };
 
 #endif  // __GHOST_DROPTARGETWIN32_H__
index 2239ac63d3365a403a86af01d00b6a52eb9fd08a..c1cc55b332a03ca505f87ba430969cf3325ec7db 100644 (file)
@@ -37,8 +37,8 @@
 
 bool GHOST_DropTargetX11::m_xdndInitialized = false;
 DndClass GHOST_DropTargetX11::m_dndClass;
-Atom * GHOST_DropTargetX11::m_dndTypes = NULL;
-Atom * GHOST_DropTargetX11::m_dndActions = NULL;
+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_