Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
93cdb2f1
Commit
93cdb2f1
authored
Jan 09, 2005
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- all: skeleton for a MacOSX port of skins2 (happy new year ;)
parent
4aae8a68
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
987 additions
and
0 deletions
+987
-0
modules/gui/skins2/Modules.am
modules/gui/skins2/Modules.am
+15
-0
modules/gui/skins2/macosx/macosx_dragdrop.cpp
modules/gui/skins2/macosx/macosx_dragdrop.cpp
+36
-0
modules/gui/skins2/macosx/macosx_dragdrop.hpp
modules/gui/skins2/macosx/macosx_dragdrop.hpp
+43
-0
modules/gui/skins2/macosx/macosx_factory.cpp
modules/gui/skins2/macosx/macosx_factory.cpp
+129
-0
modules/gui/skins2/macosx/macosx_factory.hpp
modules/gui/skins2/macosx/macosx_factory.hpp
+93
-0
modules/gui/skins2/macosx/macosx_graphics.cpp
modules/gui/skins2/macosx/macosx_graphics.cpp
+97
-0
modules/gui/skins2/macosx/macosx_graphics.hpp
modules/gui/skins2/macosx/macosx_graphics.hpp
+82
-0
modules/gui/skins2/macosx/macosx_loop.cpp
modules/gui/skins2/macosx/macosx_loop.cpp
+75
-0
modules/gui/skins2/macosx/macosx_loop.hpp
modules/gui/skins2/macosx/macosx_loop.hpp
+54
-0
modules/gui/skins2/macosx/macosx_timer.cpp
modules/gui/skins2/macosx/macosx_timer.cpp
+54
-0
modules/gui/skins2/macosx/macosx_timer.hpp
modules/gui/skins2/macosx/macosx_timer.hpp
+53
-0
modules/gui/skins2/macosx/macosx_tooltip.cpp
modules/gui/skins2/macosx/macosx_tooltip.cpp
+53
-0
modules/gui/skins2/macosx/macosx_tooltip.hpp
modules/gui/skins2/macosx/macosx_tooltip.hpp
+50
-0
modules/gui/skins2/macosx/macosx_window.cpp
modules/gui/skins2/macosx/macosx_window.cpp
+79
-0
modules/gui/skins2/macosx/macosx_window.hpp
modules/gui/skins2/macosx/macosx_window.hpp
+70
-0
modules/gui/skins2/src/os_factory.cpp
modules/gui/skins2/src/os_factory.cpp
+4
-0
No files found.
modules/gui/skins2/Modules.am
View file @
93cdb2f1
...
@@ -190,4 +190,19 @@ SOURCES_skins2 = \
...
@@ -190,4 +190,19 @@ SOURCES_skins2 = \
x11/x11_window.hpp \
x11/x11_window.hpp \
x11/x11_tooltip.cpp \
x11/x11_tooltip.cpp \
x11/x11_tooltip.hpp \
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)
$(NULL)
modules/gui/skins2/macosx/macosx_dragdrop.cpp
0 → 100644
View file @
93cdb2f1
/*****************************************************************************
* 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
modules/gui/skins2/macosx/macosx_dragdrop.hpp
0 → 100644
View file @
93cdb2f1
/*****************************************************************************
* 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
modules/gui/skins2/macosx/macosx_factory.cpp
0 → 100644
View file @
93cdb2f1
/*****************************************************************************
* 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
modules/gui/skins2/macosx/macosx_factory.hpp
0 → 100644
View file @
93cdb2f1
/*****************************************************************************
* 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
modules/gui/skins2/macosx/macosx_graphics.cpp
0 → 100644
View file @
93cdb2f1
/*****************************************************************************
* 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
modules/gui/skins2/macosx/macosx_graphics.hpp
0 → 100644
View file @
93cdb2f1
/*****************************************************************************
* 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
modules/gui/skins2/macosx/macosx_loop.cpp
0 → 100644
View file @
93cdb2f1
/*****************************************************************************
* 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
modules/gui/skins2/macosx/macosx_loop.hpp
0 → 100644
View file @
93cdb2f1
/*****************************************************************************
* 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
modules/gui/skins2/macosx/macosx_timer.cpp
0 → 100644
View file @
93cdb2f1
/*****************************************************************************
* 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
modules/gui/skins2/macosx/macosx_timer.hpp
0 → 100644
View file @
93cdb2f1
/*****************************************************************************
* 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
modules/gui/skins2/macosx/macosx_tooltip.cpp
0 → 100644
View file @
93cdb2f1
/*****************************************************************************
* 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
modules/gui/skins2/macosx/macosx_tooltip.hpp
0 → 100644
View file @
93cdb2f1
/*****************************************************************************
* 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
modules/gui/skins2/macosx/macosx_window.cpp
0 → 100644
View file @
93cdb2f1
/*****************************************************************************
* 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
modules/gui/skins2/macosx/macosx_window.hpp
0 → 100644
View file @
93cdb2f1
/*****************************************************************************
* 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
modules/gui/skins2/src/os_factory.cpp
View file @
93cdb2f1
...
@@ -28,6 +28,8 @@
...
@@ -28,6 +28,8 @@
#include "../x11/x11_factory.hpp"
#include "../x11/x11_factory.hpp"
#elif defined WIN32_SKINS
#elif defined WIN32_SKINS
#include "../win32/win32_factory.hpp"
#include "../win32/win32_factory.hpp"
#elif defined MACOSX_SKINS
#include "../macosx/macosx_factory.hpp"
#endif
#endif
OSFactory
*
OSFactory
::
instance
(
intf_thread_t
*
pIntf
)
OSFactory
*
OSFactory
::
instance
(
intf_thread_t
*
pIntf
)
...
@@ -39,6 +41,8 @@ OSFactory *OSFactory::instance( intf_thread_t *pIntf )
...
@@ -39,6 +41,8 @@ OSFactory *OSFactory::instance( intf_thread_t *pIntf )
pOsFactory
=
new
X11Factory
(
pIntf
);
pOsFactory
=
new
X11Factory
(
pIntf
);
#elif defined WIN32_SKINS
#elif defined WIN32_SKINS
pOsFactory
=
new
Win32Factory
(
pIntf
);
pOsFactory
=
new
Win32Factory
(
pIntf
);
#elif defined MACOSX_SKINS
pOsFactory
=
new
MacOSXFactory
(
pIntf
);
#else
#else
#error "No OSFactory implementation !"
#error "No OSFactory implementation !"
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment