macosx_factory.hpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * macosx_factory.hpp
00003  *****************************************************************************
00004  * Copyright (C) 2003 the VideoLAN team
00005  * $Id$
00006  *
00007  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00022  *****************************************************************************/
00023 
00024 #ifndef MACOSX_FACTORY_HPP
00025 #define MACOSX_FACTORY_HPP
00026 
00027 #include "../src/os_factory.hpp"
00028 
00029 
00030 /// Class used to instanciate MacOSX specific objects
00031 class MacOSXFactory: public OSFactory
00032 {
00033     public:
00034         MacOSXFactory( intf_thread_t *pIntf );
00035         virtual ~MacOSXFactory();
00036 
00037         /// Initialization method
00038         virtual bool init();
00039 
00040         /// Instantiate an object OSGraphics
00041         virtual OSGraphics *createOSGraphics( int width, int height );
00042 
00043         /// Get the instance of the singleton OSLoop
00044         virtual OSLoop *getOSLoop();
00045 
00046         /// Destroy the instance of OSLoop
00047         virtual void destroyOSLoop();
00048 
00049         /// Instantiate an OSTimer with the given callback
00050         virtual OSTimer *createOSTimer( CmdGeneric &rCmd );
00051 
00052         /// Minimize all the windows
00053         virtual void minimize();
00054 
00055         /// Restore the minimized windows
00056         virtual void restore();
00057 
00058         /// Add an icon in the system tray
00059         virtual void addInTray();
00060 
00061         /// Remove the icon from the system tray
00062         virtual void removeFromTray();
00063 
00064         /// Show the task in the task bar
00065         virtual void addInTaskBar();
00066 
00067         /// Remove the task from the task bar
00068         virtual void removeFromTaskBar();
00069 
00070         /// Instantiate an OSWindow object
00071         virtual OSWindow *createOSWindow( GenericWindow &rWindow,
00072                                           bool dragDrop, bool playOnDrop,
00073                                           OSWindow *pParent );
00074 
00075         /// Instantiate an object OSTooltip
00076         virtual OSTooltip *createOSTooltip();
00077 
00078         /// Instantiate an object OSPopup
00079         virtual OSPopup *createOSPopup();
00080 
00081         /// Get the directory separator
00082         virtual const string &getDirSeparator() const { return m_dirSep; }
00083 
00084         /// Get the resource path
00085         virtual const list<string> &getResourcePath() const
00086             { return m_resourcePath; }
00087 
00088         /// Get the screen size
00089         virtual int getScreenWidth() const;
00090         virtual int getScreenHeight() const;
00091 
00092         /// Get the work area (screen area without taskbars)
00093         virtual SkinsRect getWorkArea() const;
00094 
00095         /// Get the position of the mouse
00096         virtual void getMousePos( int &rXPos, int &rYPos ) const;
00097 
00098         /// Change the cursor
00099         virtual void changeCursor( CursorType_t type ) const { /*TODO*/ }
00100 
00101         /// Delete a directory recursively
00102         virtual void rmDir( const string &rPath );
00103 
00104     private:
00105         /// Directory separator
00106         const string m_dirSep;
00107         /// Resource path
00108         list<string> m_resourcePath;
00109 };
00110 
00111 #endif

Generated on Wed Aug 13 08:02:38 2008 for VLC by  doxygen 1.5.1