Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
5ed93126
Commit
5ed93126
authored
Sep 10, 2009
by
JP Dinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skins2: Cut #define down to size. Should result in identical functionality.
parent
6217711a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
37 deletions
+38
-37
modules/gui/skins2/commands/cmd_callbacks.hpp
modules/gui/skins2/commands/cmd_callbacks.hpp
+38
-37
No files found.
modules/gui/skins2/commands/cmd_callbacks.hpp
View file @
5ed93126
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
* $Id$
* $Id$
*
*
* Author: Erwan Tulou <erwan10 aT videolan doT org >
* Author: Erwan Tulou <erwan10 aT videolan doT org >
* JP Dinger <jpd (at) videolan (dot) org>
*
*
* This program is free software; you can redistribute it and/or modify
* 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
* it under the terms of the GNU General Public License as published by
...
@@ -16,9 +17,9 @@
...
@@ -16,9 +17,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License
along
*
along with this program; if not, write to the Free Software
*
with this program; if not, write to the Free Software Foundation, Inc.,
*
Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
* 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
*****************************************************************************/
#ifndef CMD_CALLBACKS_HPP
#ifndef CMD_CALLBACKS_HPP
...
@@ -27,43 +28,43 @@
...
@@ -27,43 +28,43 @@
#include "cmd_generic.hpp"
#include "cmd_generic.hpp"
#include "../src/vlcproc.hpp"
#include "../src/vlcproc.hpp"
class
CmdLabeled
:
public
CmdGeneric
{
private:
vlc_object_t
*
m_pObj
;
vlc_value_t
m_newVal
;
protected:
void
execute_on
(
void
(
VlcProc
::*
on_label
)(
vlc_object_t
*
,
vlc_value_t
)
)
{
if
(
!
m_pObj
)
return
;
#define ADD_COMMAND( label ) \
(
VlcProc
::
instance
(
getIntf
()
)
->*
on_label
)(
m_pObj
,
m_newVal
);
class Cmd_##label : public CmdGeneric \
{ \
vlc_object_release
(
m_pObj
);
public: \
m_pObj
=
NULL
;
Cmd_##label( intf_thread_t *pIntf, \
}
vlc_object_t *pObj, vlc_value_t newVal ) \
CmdLabeled
(
intf_thread_t
*
pIntf
,
vlc_object_t
*
pObj
,
vlc_value_t
newVal
)
: CmdGeneric( pIntf ), m_pObj( pObj ), m_newVal( newVal ) \
:
CmdGeneric
(
pIntf
),
m_pObj
(
pObj
),
m_newVal
(
newVal
)
{ \
{
if( m_pObj ) \
if
(
m_pObj
)
vlc_object_hold( m_pObj ); \
vlc_object_hold
(
m_pObj
);
} \
}
virtual ~Cmd_##label() \
public:
{ \
virtual
~
CmdLabeled
()
{
if( m_pObj ) \
if
(
m_pObj
)
vlc_object_release( m_pObj ); \
vlc_object_release
(
m_pObj
);
} \
}
\
virtual void execute() \
{ \
if( !m_pObj ) \
return; \
\
VlcProc* p_VlcProc = VlcProc::instance( getIntf() ); \
p_VlcProc->on_##label( m_pObj, m_newVal ); \
\
vlc_object_release( m_pObj ); \
m_pObj = NULL; \
} \
\
virtual string getType() const { return #label ; } \
\
private: \
vlc_object_t* m_pObj; \
vlc_value_t m_newVal; \
};
};
#define ADD_COMMAND( label ) \
class Cmd_##label : public CmdLabeled \
{ public: \
Cmd_##label( intf_thread_t *I, vlc_object_t *O, vlc_value_t V ) \
: CmdLabeled (I, O, V) { } \
virtual string getType() const { return #label; } \
virtual void execute() { execute_on( &VlcProc::on_##label ); } \
};
ADD_COMMAND
(
item_current_changed
)
ADD_COMMAND
(
item_current_changed
)
ADD_COMMAND
(
intf_event_changed
)
ADD_COMMAND
(
intf_event_changed
)
...
...
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