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
eccd9348
Commit
eccd9348
authored
Jun 07, 2003
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* beginning of tooltips (only in the console at the moment ;)
parent
77a466e3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
52 additions
and
36 deletions
+52
-36
modules/gui/skins/controls/text.cpp
modules/gui/skins/controls/text.cpp
+3
-2
modules/gui/skins/x11/x11_run.cpp
modules/gui/skins/x11/x11_run.cpp
+3
-2
modules/gui/skins/x11/x11_timer.cpp
modules/gui/skins/x11/x11_timer.cpp
+9
-5
modules/gui/skins/x11/x11_timer.h
modules/gui/skins/x11/x11_timer.h
+4
-3
modules/gui/skins/x11/x11_window.cpp
modules/gui/skins/x11/x11_window.cpp
+20
-22
modules/gui/skins/x11/x11_window.h
modules/gui/skins/x11/x11_window.h
+13
-2
No files found.
modules/gui/skins/controls/text.cpp
View file @
eccd9348
...
...
@@ -2,7 +2,7 @@
* text.cpp: Text control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: text.cpp,v 1.1
0 2003/06/05 22:16:15
asmax Exp $
* $Id: text.cpp,v 1.1
1 2003/06/07 12:19:23
asmax Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -121,13 +121,14 @@ extern intf_thread_t *g_pIntf;
//-----------------------------------------------------------------------
// X11 methods
//-----------------------------------------------------------------------
void
ScrollingTextTimer
(
void
*
data
)
bool
ScrollingTextTimer
(
void
*
data
)
{
if
(
(
ControlText
*
)
data
!=
NULL
&&
!
(
(
ControlText
*
)
data
)
->
GetSelected
()
)
{
(
(
ControlText
*
)
data
)
->
DoScroll
();
}
return
True
;
}
//-----------------------------------------------------------------------
...
...
modules/gui/skins/x11/x11_run.cpp
View file @
eccd9348
...
...
@@ -2,7 +2,7 @@
* x11_run.cpp:
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: x11_run.cpp,v 1.1
6 2003/06/06 19:40:37
asmax Exp $
* $Id: x11_run.cpp,v 1.1
7 2003/06/07 12:19:23
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -150,9 +150,10 @@ int ProcessEvent( intf_thread_t *p_intf, VlcProc *proc, XEvent *event )
}
void
RefreshCallback
(
void
*
data
)
bool
RefreshCallback
(
void
*
data
)
{
SkinManage
(
(
intf_thread_t
*
)
data
);
return
True
;
}
...
...
modules/gui/skins/x11/x11_timer.cpp
View file @
eccd9348
...
...
@@ -2,7 +2,7 @@
* x11_timer.cpp: helper class to implement timers
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: x11_timer.cpp,v 1.
1 2003/06/05 22:16:15
asmax Exp $
* $Id: x11_timer.cpp,v 1.
2 2003/06/07 12:19:23
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -55,9 +55,9 @@ mtime_t X11Timer::getNextDate( mtime_t current )
}
void
X11Timer
::
Execute
()
bool
X11Timer
::
Execute
()
{
(
*
_callback
)(
_data
);
return
(
*
_callback
)(
_data
);
}
//---------------------------------------------------------------------------
...
...
@@ -112,6 +112,7 @@ void X11TimerManager::Destroy()
void
*
X11TimerManager
::
Thread
(
void
*
p_timer
)
{
vlc_thread_ready
(
(
vlc_object_t
*
)
p_timer
);
while
(
!
((
timer_thread_t
*
)
p_timer
)
->
die
)
{
list
<
X11Timer
*>::
iterator
timer
;
...
...
@@ -119,11 +120,14 @@ void *X11TimerManager::Thread( void *p_timer )
for
(
timer
=
_instance
->
_timers
.
begin
();
timer
!=
_instance
->
_timers
.
end
();
timer
++
)
{
(
*
timer
)
->
Execute
();
bool
ret
=
(
*
timer
)
->
Execute
();
if
(
!
ret
)
{
_instance
->
_timers
.
remove
(
*
timer
);
break
;
}
}
msleep
(
100000
);
}
}
#endif
modules/gui/skins/x11/x11_timer.h
View file @
eccd9348
...
...
@@ -2,7 +2,7 @@
* x11_timer.h: helper class to implement timers
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: x11_timer.h,v 1.
1 2003/06/05 22:16:15
asmax Exp $
* $Id: x11_timer.h,v 1.
2 2003/06/07 12:19:23
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -36,7 +36,7 @@ typedef struct
class
X11Timer
;
// forward declaration
typedef
void
(
*
callback_t
)(
void
*
);
typedef
bool
(
*
callback_t
)(
void
*
);
//---------------------------------------------------------------------------
class
X11Timer
...
...
@@ -53,7 +53,7 @@ class X11Timer
~
X11Timer
();
mtime_t
getNextDate
(
mtime_t
current
);
void
Execute
();
bool
Execute
();
};
//---------------------------------------------------------------------------
class
X11TimerManager
...
...
@@ -74,6 +74,7 @@ class X11TimerManager
void
Destroy
();
void
addTimer
(
X11Timer
*
timer
)
{
_timers
.
push_back
(
timer
);
}
void
removeTimer
(
X11Timer
*
timer
)
{
_timers
.
remove
(
timer
);
}
};
//---------------------------------------------------------------------------
...
...
modules/gui/skins/x11/x11_window.cpp
View file @
eccd9348
...
...
@@ -2,7 +2,7 @@
* x11_window.cpp: X11 implementation of the Window class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: x11_window.cpp,v 1.1
1 2003/06/07 00:36:28
asmax Exp $
* $Id: x11_window.cpp,v 1.1
2 2003/06/07 12:19:23
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -47,6 +47,10 @@
#include "../src/skin_common.h"
#include "../src/theme.h"
#include "../os_theme.h"
#include "x11_timer.h"
bool
ToolTipCallback
(
void
*
data
);
//---------------------------------------------------------------------------
...
...
@@ -78,24 +82,6 @@ X11Window::X11Window( intf_thread_t *p_intf, Window wnd, int x, int y,
CursorPos = new POINT;
WindowPos = new POINT;
// Create Tool Tip Window
ToolTipWindow = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, NULL,
WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
hWnd, 0, GetModuleHandle( NULL ), 0);
// Create Tool Tip infos
ToolTipInfo.cbSize = sizeof(TOOLINFO);
ToolTipInfo.uFlags = TTF_SUBCLASS|TTF_IDISHWND;
ToolTipInfo.hwnd = hWnd;
ToolTipInfo.hinst = GetModuleHandle( NULL );
ToolTipInfo.uId = (unsigned int)hWnd;
ToolTipInfo.lpszText = NULL;
ToolTipInfo.rect.left = ToolTipInfo.rect.top = 0;
ToolTipInfo.rect.right = ToolTipInfo.rect.bottom = 0;
SendMessage( ToolTipWindow, TTM_ADDTOOL, 0,
(LPARAM)(LPTOOLINFO) &ToolTipInfo );
*/
if
(
DragDrop
)
...
...
@@ -107,6 +93,9 @@ X11Window::X11Window( intf_thread_t *p_intf, Window wnd, int x, int y,
// Create Tool Tip window
ToolTipWindow
=
XCreateSimpleWindow
(
display
,
wnd
,
0
,
0
,
1
,
1
,
0
,
0
,
0
);
X11Timer
*
timer
=
new
X11Timer
(
p_intf
,
100
,
ToolTipCallback
,
&
ToolTipInfo
);
ToolTipInfo
.
p_intf
=
p_intf
;
ToolTipInfo
.
timer
=
timer
;
// Double-click handling
ClickedX
=
0
;
...
...
@@ -369,6 +358,15 @@ void X11Window::Size( int width, int height )
XResizeWindow
(
display
,
Wnd
,
width
,
height
);
}
//---------------------------------------------------------------------------
bool
ToolTipCallback
(
void
*
data
)
{
fprintf
(
stderr
,
" TOOLTIP: %s
\n
"
,
((
tooltip_t
*
)
data
)
->
text
.
c_str
());
return
False
;
}
void
X11Window
::
ChangeToolTipText
(
string
text
)
{
if
(
text
==
"none"
)
...
...
@@ -385,10 +383,10 @@ void X11Window::ChangeToolTipText( string text )
if
(
text
!=
ToolTipText
)
{
ToolTipText
=
text
;
ToolTipInfo
.
text
=
text
;
X11TimerManager
*
timerManager
=
X11TimerManager
::
Instance
(
p_intf
);
timerManager
->
addTimer
(
ToolTipInfo
.
timer
);
// ToolTipInfo.lpszText = (char *)ToolTipText.c_str();
/* SendMessage( ToolTipWindow, TTM_ACTIVATE, 1 , 0 );
SendMessage( ToolTipWindow, TTM_UPDATETIPTEXT, 0,
(LPARAM)(LPTOOLINFO)&ToolTipInfo );*/
}
}
}
...
...
modules/gui/skins/x11/x11_window.h
View file @
eccd9348
...
...
@@ -2,7 +2,7 @@
* x11_window.h: X11 implementation of the Window class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: x11_window.h,v 1.
3 2003/06/07 00:36:28
asmax Exp $
* $Id: x11_window.h,v 1.
4 2003/06/07 12:19:23
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -29,10 +29,21 @@
//--- X11 -------------------------------------------------------------------
#include <X11/Xlib.h>
#include "x11_timer.h"
//---------------------------------------------------------------------------
class
Graphics
;
class
Event
;
typedef
struct
{
intf_thread_t
*
p_intf
;
X11Timer
*
timer
;
string
text
;
}
tooltip_t
;
//---------------------------------------------------------------------------
class
X11Window
:
public
SkinWindow
{
...
...
@@ -52,7 +63,7 @@ class X11Window : public SkinWindow
// Tooltip texts
Window
ToolTipWindow
;
// TOOLINFO
ToolTipInfo;
tooltip_t
ToolTipInfo
;
// Double-click handling
int
ClickedX
;
...
...
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