00001 //**************************************************************************/ 00002 // Copyright (c) 2008 Autodesk, Inc. 00003 // All rights reserved. 00004 // 00005 // These coded instructions, statements, and computer programs contain 00006 // unpublished proprietary information written by Autodesk, Inc., and are 00007 // protected by Federal copyright law. They may not be disclosed to third 00008 // parties or copied or duplicated in any form, in whole or in part, without 00009 // the prior written consent of Autodesk, Inc. 00010 //**************************************************************************/ 00011 // AUTHOR: Nicolas Desjardins 00012 // DATE: 2008-10-21 00013 //***************************************************************************/ 00014 00015 #pragma once 00016 #include "WindowsDefines.h" 00017 #include "coreexp.h" 00018 #include "noncopyable.h" 00019 #include "autoptr.h" 00020 00021 namespace MaxSDK 00022 { 00023 00112 class WindowsMessageFilter : public MaxSDK::Util::Noncopyable 00113 { 00114 public: 00118 CoreExport WindowsMessageFilter(); 00119 00123 CoreExport virtual ~WindowsMessageFilter(); 00124 00138 CoreExport virtual void RunNonBlockingMessageLoop(); 00139 00146 CoreExport virtual void AbortMessageLoop(); 00147 00161 CoreExport virtual bool IsAcceptableMessage(const MSG& msg) const; 00162 00172 CoreExport virtual bool IsAbortMessage(const MSG& msg) const; 00173 00182 CoreExport virtual bool ShouldRepostMessage(const MSG& msg) const; 00183 00196 CoreExport virtual bool Aborted() const; 00197 00210 CoreExport void AddUnfilteredWindow(HWND window); 00211 00221 CoreExport void RemoveUnfilteredWindow(HWND window); 00222 00226 CoreExport void ClearUnfilteredWindowList(); 00227 00235 CoreExport bool IsUnfilteredWindow(HWND window) const; 00236 00244 CoreExport bool IsUnfilteredWindowChild(HWND child) const; 00245 00246 private: 00247 struct Storage; 00248 MaxSDK::AutoPtr<Storage> mStorage; 00249 }; 00250 00251 00252 }