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
beacf908
Commit
beacf908
authored
Apr 17, 2003
by
Emmanuel Puig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* SkinManage is called by a timer
* Timer for text control are working badly but it's the first step
parent
5e99f4d4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
16 deletions
+38
-16
modules/gui/skins/controls/button.cpp
modules/gui/skins/controls/button.cpp
+3
-1
modules/gui/skins/controls/text.cpp
modules/gui/skins/controls/text.cpp
+24
-7
modules/gui/skins/controls/text.h
modules/gui/skins/controls/text.h
+3
-2
modules/gui/skins/gtk2/gtk2_run.cpp
modules/gui/skins/gtk2/gtk2_run.cpp
+8
-6
No files found.
modules/gui/skins/controls/button.cpp
View file @
beacf908
...
...
@@ -2,7 +2,7 @@
* button.cpp: Button control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: button.cpp,v 1.
9 2003/04/16 21:40:07 ipkiss
Exp $
* $Id: button.cpp,v 1.
10 2003/04/17 13:08:02 karibu
Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -135,6 +135,8 @@ void ControlButton::Draw( int x, int y, int w, int h, Graphics *dest )
bool
ControlButton
::
MouseUp
(
int
x
,
int
y
,
int
button
)
{
// If hit in the button
if
(
Img
[
1
]
->
Hit
(
x
-
Left
,
y
-
Top
)
)
{
if
(
!
Enabled
)
...
...
modules/gui/skins/controls/text.cpp
View file @
beacf908
...
...
@@ -2,7 +2,7 @@
* text.cpp: Text control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: text.cpp,v 1.
3 2003/04/16 21:40:07 ipkiss
Exp $
* $Id: text.cpp,v 1.
4 2003/04/17 13:08:02 karibu
Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -77,20 +77,37 @@
//-----------------------------------------------------------------------
#else
//-----------------------------------------------------------------------
// Gtk2 methods
//-----------------------------------------------------------------------
gboolean
ScrollingTextTimer
(
gpointer
data
)
{
if
(
(
ControlText
*
)
data
!=
NULL
)
{
if
(
!
(
(
ControlText
*
)
data
)
->
IsScrolling
()
)
return
false
;
/* FIXME
if( !( (ControlText *)data )->GetSelected() )
( (ControlText *)data )->DoScroll();
*/
return
true
;
}
else
{
return
false
;
}
}
//-----------------------------------------------------------------------
void
ControlText
::
StartScrolling
()
{
/* FIXME: kluge */
/* SetTimer( ( (Win32Window *)ParentWindow )->GetHandle(), (UINT_PTR)this,
100, (TIMERPROC)ScrollingTextTimer );*/
g_timeout_add
(
100
,
(
GSourceFunc
)
ScrollingTextTimer
,
(
gpointer
)
this
);
}
//-----------------------------------------------------------------------
void
ControlText
::
StopScrolling
()
{
/* KillTimer( ( (Win32Window *)ParentWindow )->GetHandle(),
(UINT_PTR)this );*/
}
//-----------------------------------------------------------------------
...
...
@@ -173,8 +190,8 @@ void ControlText::SetScrolling()
}
else
if
(
Scroll
&&
TextWidth
<=
Width
)
{
StopScrolling
();
Scroll
=
false
;
StopScrolling
();
}
}
//---------------------------------------------------------------------------
...
...
modules/gui/skins/controls/text.h
View file @
beacf908
...
...
@@ -2,7 +2,7 @@
* text.h: Text control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: text.h,v 1.
1 2003/03/18 02:21:47 ipkiss
Exp $
* $Id: text.h,v 1.
2 2003/04/17 13:08:02 karibu
Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -106,8 +106,9 @@ class ControlText : public GenericControl
// Keep on scrolling
void
DoScroll
();
//
To avoid auto scrolling when manual scrolling
//
Getters
bool
GetSelected
()
{
return
Selected
;
};
bool
IsScrolling
()
{
return
Scroll
;
};
};
//---------------------------------------------------------------------------
...
...
modules/gui/skins/gtk2/gtk2_run.cpp
View file @
beacf908
...
...
@@ -2,7 +2,7 @@
* gtk2_run.cpp:
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_run.cpp,v 1.1
1 2003/04/16 21:40:07 ipkiss
Exp $
* $Id: gtk2_run.cpp,v 1.1
2 2003/04/17 13:08:02 karibu
Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -63,12 +63,12 @@ int SkinManage( intf_thread_t *p_intf );
//---------------------------------------------------------------------------
// REFRESH TIMER CALLBACK
//---------------------------------------------------------------------------
/*void CALLBACK RefreshTimer( HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime
)
gboolean
RefreshTimer
(
gpointer
data
)
{
intf_thread_t *p_intf = (intf_thread_t *)GetWindowLongPtr( hwnd,
GWLP_USERDATA );
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
data
;
SkinManage
(
p_intf
);
}*/
return
true
;
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
...
...
@@ -191,7 +191,6 @@ void GTK2Proc( GdkEvent *event, gpointer data )
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// GTK2 interface
//---------------------------------------------------------------------------
...
...
@@ -205,6 +204,9 @@ void OSRun( intf_thread_t *p_intf )
// Set event callback
gdk_event_handler_set
(
GTK2Proc
,
(
gpointer
)
callbackobj
,
NULL
);
// Add timer
g_timeout_add
(
200
,
(
GSourceFunc
)
RefreshTimer
,
(
gpointer
)
p_intf
);
// Main event loop
g_main_loop_run
(
callbackobj
->
Loop
);
...
...
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