00001 /* 00002 * Copyright (C) 2005, 2006 Free Software Foundation, Inc. 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * You should have received a copy of the GNU General Public License 00014 * along with this program; if not, write to the Free Software 00015 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00016 * 00017 * 00018 */ 00019 00020 #ifndef _GNASH_MOVIETESTER_H 00021 #define _GNASH_MOVIETESTER_H 00022 00023 #include <memory> // for auto_ptr 00024 #include <string> // for auto_ptr 00025 00026 // Forward declarations 00027 namespace gnash { 00028 class movie_definition; 00029 class movie_root; 00030 class sprite_instance; 00031 class character; 00032 } 00033 00034 namespace gnash { 00035 00037 // 00044 class MovieTester 00045 { 00046 public: 00049 MovieTester(const std::string& filespec); 00050 00052 void advance(); 00053 00055 // 00059 const character* findDisplayItemByName(const sprite_instance& mc, 00060 const std::string& name); 00061 00063 // 00067 const character* findDisplayItemByDepth(const sprite_instance& mc, 00068 int depth); 00069 00071 gnash::sprite_instance* getRootMovie() { 00072 return _movie; 00073 } 00074 00076 // 00079 void movePointerTo(int x, int y); 00080 00082 void pressMouseButton(); 00083 00085 void depressMouseButton(); 00086 00090 bool isMouseOverMouseEntity(); 00091 00092 private: 00093 00094 gnash::movie_root* _movie_root; 00095 00096 gnash::movie_definition* _movie_def; 00097 00098 gnash::sprite_instance* _movie; 00099 00100 }; 00101 00102 } // namespace gnash 00103 00104 #endif // _GNASH_MOVIETESTER_H