Commit 93cdb2f1 authored by Cyril Deguet's avatar Cyril Deguet

- all: skeleton for a MacOSX port of skins2 (happy new year ;)

parent 4aae8a68
......@@ -190,4 +190,19 @@ SOURCES_skins2 = \
x11/x11_window.hpp \
x11/x11_tooltip.cpp \
x11/x11_tooltip.hpp \
\
macosx/macosx_dragdrop.cpp \
macosx/macosx_dragdrop.hpp \
macosx/macosx_factory.cpp \
macosx/macosx_factory.hpp \
macosx/macosx_graphics.cpp \
macosx/macosx_graphics.hpp \
macosx/macosx_loop.cpp \
macosx/macosx_loop.hpp \
macosx/macosx_timer.cpp \
macosx/macosx_timer.hpp \
macosx/macosx_window.cpp \
macosx/macosx_window.hpp \
macosx/macosx_tooltip.cpp \
macosx/macosx_tooltip.hpp \
$(NULL)
/*****************************************************************************
* macosx_dragdrop.cpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifdef MACOSX_SKINS
#include "macosx_dragdrop.hpp"
MacOSXDragDrop::MacOSXDragDrop( intf_thread_t *pIntf, bool playOnDrop ):
SkinObject( pIntf ), m_playOnDrop( playOnDrop )
{
// TODO
}
#endif
/*****************************************************************************
* macosx_dragdrop.hpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef MACOSX_DRAGDROP_HPP
#define MACOSX_DRAGDROP_HPP
#include "../src/skin_common.hpp"
class MacOSXDragDrop: public SkinObject
{
public:
typedef long ldata_t[5];
MacOSXDragDrop( intf_thread_t *pIntf, bool playOnDrop );
virtual ~MacOSXDragDrop() {}
private:
/// Indicates whether the file(s) must be played immediately
bool m_playOnDrop;
};
#endif
/*****************************************************************************
* macosx_factory.cpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifdef MACOSX_SKINS
#include "macosx_factory.hpp"
#include "macosx_graphics.hpp"
#include "macosx_loop.hpp"
#include "macosx_timer.hpp"
#include "macosx_window.hpp"
#include "macosx_tooltip.hpp"
MacOSXFactory::MacOSXFactory( intf_thread_t *pIntf ): OSFactory( pIntf ),
m_dirSep( "/" )
{
// TODO
}
MacOSXFactory::~MacOSXFactory()
{
// TODO
}
bool MacOSXFactory::init()
{
// TODO
return true;
}
OSGraphics *MacOSXFactory::createOSGraphics( int width, int height )
{
return new MacOSXGraphics( getIntf(), width, height );
}
OSLoop *MacOSXFactory::getOSLoop()
{
return MacOSXLoop::instance( getIntf() );
}
void MacOSXFactory::destroyOSLoop()
{
MacOSXLoop::destroy( getIntf() );
}
void MacOSXFactory::minimize()
{
// TODO
}
OSTimer *MacOSXFactory::createOSTimer( const Callback &rCallback )
{
return new MacOSXTimer( getIntf(), rCallback );
}
OSWindow *MacOSXFactory::createOSWindow( GenericWindow &rWindow, bool dragDrop,
bool playOnDrop, OSWindow *pParent )
{
return new MacOSXWindow( getIntf(), rWindow, dragDrop,
playOnDrop, (MacOSXWindow*)pParent );
}
OSTooltip *MacOSXFactory::createOSTooltip()
{
return new MacOSXTooltip( getIntf() );
}
int MacOSXFactory::getScreenWidth() const
{
// TODO
return 0;
}
int MacOSXFactory::getScreenHeight() const
{
// TODO
return 0;
}
Rect MacOSXFactory::getWorkArea() const
{
// XXX
return Rect( 0, 0, getScreenWidth(), getScreenHeight() );
}
void MacOSXFactory::getMousePos( int &rXPos, int &rYPos ) const
{
// TODO
}
void MacOSXFactory::rmDir( const string &rPath )
{
// TODO
}
#endif
/*****************************************************************************
* macosx_factory.hpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef MACOSX_FACTORY_HPP
#define MACOSX_FACTORY_HPP
#include "../src/os_factory.hpp"
/// Class used to instanciate MacOSX specific objects
class MacOSXFactory: public OSFactory
{
public:
MacOSXFactory( intf_thread_t *pIntf );
virtual ~MacOSXFactory();
/// Initialization method
virtual bool init();
/// Instantiate an object OSGraphics.
virtual OSGraphics *createOSGraphics( int width, int height );
/// Get the instance of the singleton OSLoop.
virtual OSLoop *getOSLoop();
/// Destroy the instance of OSLoop.
virtual void destroyOSLoop();
/// Instantiate an OSTimer with the given callback
virtual OSTimer *createOSTimer( const Callback &rCallback );
///
virtual void minimize();
/// Instantiate an OSWindow object
virtual OSWindow *createOSWindow( GenericWindow &rWindow,
bool dragDrop, bool playOnDrop,
OSWindow *pParent );
/// Instantiate an object OSTooltip.
virtual OSTooltip *createOSTooltip();
/// Get the directory separator
virtual const string &getDirSeparator() const { return m_dirSep; }
/// Get the resource path
virtual const list<string> &getResourcePath() const
{ return m_resourcePath; }
/// Get the screen size
virtual int getScreenWidth() const;
virtual int getScreenHeight() const;
/// Get the work area (screen area without taskbars)
virtual Rect getWorkArea() const;
/// Get the position of the mouse
virtual void getMousePos( int &rXPos, int &rYPos ) const;
/// Change the cursor
virtual void changeCursor( CursorType_t type ) const { /*TODO*/ }
/// Delete a directory recursively
virtual void rmDir( const string &rPath );
private:
/// Directory separator
const string m_dirSep;
/// Resource path
list<string> m_resourcePath;
};
#endif
/*****************************************************************************
* macosx_graphics.cpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifdef MACOSX_SKINS
#include "macosx_graphics.hpp"
MacOSXGraphics::MacOSXGraphics( intf_thread_t *pIntf, int width, int height ):
OSGraphics( pIntf ), m_width( width ), m_height( height )
{
// TODO
}
MacOSXGraphics::~MacOSXGraphics()
{
// TODO
}
void MacOSXGraphics::clear()
{
// TODO
}
void MacOSXGraphics::drawGraphics( const OSGraphics &rGraphics, int xSrc,
int ySrc, int xDest, int yDest, int width,
int height )
{
// TODO
}
void MacOSXGraphics::drawBitmap( const GenericBitmap &rBitmap, int xSrc,
int ySrc, int xDest, int yDest, int width,
int height )
{
// TODO
}
void MacOSXGraphics::fillRect( int left, int top, int width, int height,
uint32_t color )
{
// TODO
}
void MacOSXGraphics::drawRect( int left, int top, int width, int height,
uint32_t color )
{
// TODO
}
void MacOSXGraphics::applyMaskToWindow( OSWindow &rWindow )
{
// TODO
}
void MacOSXGraphics::copyToWindow( OSWindow &rWindow, int xSrc, int ySrc,
int width, int height, int xDest, int yDest )
{
// TODO
}
bool MacOSXGraphics::hit( int x, int y ) const
{
// TODO
return false;
}
#endif
/*****************************************************************************
* macosx_graphics.hpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef MACOSX_GRAPHICS_HPP
#define MACOSX_GRAPHICS_HPP
#include "../src/os_graphics.hpp"
class GenericWindow;
class GenericBitmap;
/// MacOSX implementation of OSGraphics
class MacOSXGraphics: public OSGraphics
{
public:
MacOSXGraphics( intf_thread_t *pIntf, int width, int height);
virtual ~MacOSXGraphics();
/// Clear the graphics
virtual void clear();
/// Draw another graphics on this one
virtual void drawGraphics( const OSGraphics &rGraphics, int xSrc = 0,
int ySrc = 0, int xDest = 0, int yDest = 0,
int width = -1, int height = -1 );
/// Render a bitmap on this graphics
virtual void drawBitmap( const GenericBitmap &rBitmap, int xSrc = 0,
int ySrc = 0, int xDest = 0, int yDest = 0,
int width = -1, int height = -1 );
/// Draw a filled rectangle on the grahics (color is #RRGGBB)
virtual void fillRect( int left, int top, int width, int height,
uint32_t color );
/// Draw an empty rectangle on the grahics (color is #RRGGBB)
virtual void drawRect( int left, int top, int width, int height,
uint32_t color );
/// Set the shape of a window with the mask of this graphics.
virtual void applyMaskToWindow( OSWindow &rWindow );
/// Copy the graphics on a window
virtual void copyToWindow( OSWindow &rWindow, int xSrc,
int ySrc, int width, int height,
int xDest, int yDest );
/// Tell whether the pixel at the given position is visible
virtual bool hit( int x, int y ) const;
/// Getters
virtual int getWidth() const { return m_width; }
virtual int getHeight() const { return m_height; }
private:
/// Size of the image
int m_width, m_height;
};
#endif
/*****************************************************************************
* macosx_loop.cpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifdef MACOSX_SKINS
#include "macosx_loop.hpp"
MacOSXLoop::MacOSXLoop( intf_thread_t *pIntf ):
OSLoop( pIntf )
{
// TODO
}
MacOSXLoop::~MacOSXLoop()
{
// TODO
}
OSLoop *MacOSXLoop::instance( intf_thread_t *pIntf )
{
if( pIntf->p_sys->p_osLoop == NULL )
{
OSLoop *pOsLoop = new MacOSXLoop( pIntf );
pIntf->p_sys->p_osLoop = pOsLoop;
}
return pIntf->p_sys->p_osLoop;
}
void MacOSXLoop::destroy( intf_thread_t *pIntf )
{
if( pIntf->p_sys->p_osLoop )
{
delete pIntf->p_sys->p_osLoop;
pIntf->p_sys->p_osLoop = NULL;
}
}
void MacOSXLoop::run()
{
// TODO
}
void MacOSXLoop::exit()
{
// TODO
}
#endif
/*****************************************************************************
* MacOSX_loop.hpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef MACOSX_LOOP_HPP
#define MACOSX_LOOP_HPP
#include "../src/os_loop.hpp"
class MacOSXDisplay;
class GenericWindow;
/// Main event loop for MacOSX (singleton)
class MacOSXLoop: public OSLoop
{
public:
/// Get the instance of MacOSXLoop
static OSLoop *instance( intf_thread_t *pIntf );
/// Destroy the instance of MacOSXLoop
static void destroy( intf_thread_t *pIntf );
/// Enter the event loop
virtual void run();
/// Exit the main loop
virtual void exit();
private:
// Private because it's a singleton
MacOSXLoop( intf_thread_t *pIntf );
virtual ~MacOSXLoop();
};
#endif
/*****************************************************************************
* macosx_timer.cpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifdef MACOSX_SKINS
#include "macosx_timer.hpp"
MacOSXTimer::MacOSXTimer( intf_thread_t *pIntf, const Callback &rCallback ):
OSTimer( pIntf ), m_callback( rCallback )
{
// TODO
}
MacOSXTimer::~MacOSXTimer()
{
// TODO
stop();
}
void MacOSXTimer::start( int delay, bool oneShot )
{
// TODO
}
void MacOSXTimer::stop()
{
// TODO
}
#endif
/*****************************************************************************
* macosx_timer.hpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef MACOSX_TIMER_HPP
#define MACOSX_TIMER_HPP
#include "../src/os_timer.hpp"
// Forward declaration
class MacOSXTimerLoop;
// MacOSX specific timer
class MacOSXTimer: public OSTimer
{
public:
MacOSXTimer( intf_thread_t *pIntf, const Callback &rCallback );
virtual ~MacOSXTimer();
/// (Re)start the timer with the given delay (in ms). If oneShot is
/// true, stop it after the first execution of the callback.
virtual void start( int delay, bool oneShot );
/// Stop the timer
virtual void stop();
private:
/// Callback to execute
Callback m_callback;
};
#endif
/*****************************************************************************
* macosx_tooltip.cpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifdef MACOSX_SKINS
#include "macosx_tooltip.hpp"
MacOSXTooltip::MacOSXTooltip( intf_thread_t *pIntf ):
OSTooltip( pIntf )
{
// TODO
}
MacOSXTooltip::~MacOSXTooltip()
{
// TODO
}
void MacOSXTooltip::show( int left, int top, OSGraphics &rText )
{
// TODO
}
void MacOSXTooltip::hide()
{
// TODO
}
#endif
/*****************************************************************************
* macosx_tooltip.hpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef MACOSX_TOOLTIP_HPP
#define MACOSX_TOOLTIP_HPP
#include "../src/os_tooltip.hpp"
class MacOSXDisplay;
/// MacOSX implementation of OSTooltip
class MacOSXTooltip: public OSTooltip
{
public:
MacOSXTooltip( intf_thread_t *pIntf );
virtual ~MacOSXTooltip();
// Show the tooltip
virtual void show( int left, int top, OSGraphics &rText );
// Hide the tooltip
virtual void hide();
private:
};
#endif
/*****************************************************************************
* macosx_window.cpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifdef MACOSX_SKINS
#include "macosx_window.hpp"
MacOSXWindow::MacOSXWindow( intf_thread_t *pIntf, GenericWindow &rWindow,
bool dragDrop, bool playOnDrop,
MacOSXWindow *pParentWindow ):
OSWindow( pIntf ), m_pParent( pParentWindow ), m_dragDrop( dragDrop )
{
// TODO
}
MacOSXWindow::~MacOSXWindow()
{
// TODO
}
void MacOSXWindow::show( int left, int top ) const
{
// TODO
}
void MacOSXWindow::hide() const
{
// TODO
}
void MacOSXWindow::moveResize( int left, int top, int width, int height ) const
{
// TODO
}
void MacOSXWindow::raise() const
{
// TODO
}
void MacOSXWindow::setOpacity( uint8_t value ) const
{
// TODO
}
void MacOSXWindow::toggleOnTop( bool onTop ) const
{
// TODO
}
#endif
/*****************************************************************************
* macosx_window.hpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef MACOSX_WINDOW_HPP
#define MACOSX_WINDOW_HPP
#include "../src/os_window.hpp"
class MacOSXDisplay;
class MacOSXDragDrop;
/// MacOSX implementation of OSWindow
class MacOSXWindow: public OSWindow
{
public:
MacOSXWindow( intf_thread_t *pIntf, GenericWindow &rWindow,
bool dragDrop, bool playOnDrop,
MacOSXWindow *pParentWindow );
virtual ~MacOSXWindow();
// Show the window
virtual void show( int left, int top ) const;
// Hide the window
virtual void hide() const;
/// Move the window
virtual void moveResize( int left, int top,
int width, int height ) const;
/// Bring the window on top
virtual void raise() const;
/// Set the opacity of the window (0 = transparent, 255 = opaque)
virtual void setOpacity( uint8_t value ) const;
/// Toggle the window on top
virtual void toggleOnTop( bool onTop ) const;
private:
/// Parent window
MacOSXWindow *m_pParent;
/// Indicates whether the window handles drag&drop events
bool m_dragDrop;
};
#endif
......@@ -28,6 +28,8 @@
#include "../x11/x11_factory.hpp"
#elif defined WIN32_SKINS
#include "../win32/win32_factory.hpp"
#elif defined MACOSX_SKINS
#include "../macosx/macosx_factory.hpp"
#endif
OSFactory *OSFactory::instance( intf_thread_t *pIntf )
......@@ -39,6 +41,8 @@ OSFactory *OSFactory::instance( intf_thread_t *pIntf )
pOsFactory = new X11Factory( pIntf );
#elif defined WIN32_SKINS
pOsFactory = new Win32Factory( pIntf );
#elif defined MACOSX_SKINS
pOsFactory = new MacOSXFactory( pIntf );
#else
#error "No OSFactory implementation !"
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment