Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
b66ae74a
Commit
b66ae74a
authored
Apr 15, 2003
by
Emmanuel Puig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Fixed mouse events
parent
a3a7c277
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
26 deletions
+30
-26
modules/gui/skins/gtk2/gtk2_theme.cpp
modules/gui/skins/gtk2/gtk2_theme.cpp
+2
-2
modules/gui/skins/gtk2/gtk2_window.cpp
modules/gui/skins/gtk2/gtk2_window.cpp
+22
-21
modules/gui/skins/src/window.cpp
modules/gui/skins/src/window.cpp
+6
-3
No files found.
modules/gui/skins/gtk2/gtk2_theme.cpp
View file @
b66ae74a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* gtk2_theme.cpp: GTK2 implementation of the Theme class
* gtk2_theme.cpp: GTK2 implementation of the Theme class
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_theme.cpp,v 1.1
0 2003/04/15 01:19:11 ipkiss
Exp $
* $Id: gtk2_theme.cpp,v 1.1
1 2003/04/15 16:42:02 karibu
Exp $
*
*
* Authors: Cyril Deguet <asmax@videolan.org>
* Authors: Cyril Deguet <asmax@videolan.org>
*
*
...
@@ -240,7 +240,7 @@ void GTK2Theme::AddWindow( string name, int x, int y, bool visible,
...
@@ -240,7 +240,7 @@ void GTK2Theme::AddWindow( string name, int x, int y, bool visible,
WindowList.push_back( (Window *)new OSWindow( p_intf, hwnd, x, y, visible,
WindowList.push_back( (Window *)new OSWindow( p_intf, hwnd, x, y, visible,
fadetime, alpha, movealpha, dragdrop ) ) ;*/
fadetime, alpha, movealpha, dragdrop ) ) ;*/
GdkWindowAttr
attr
;
GdkWindowAttr
attr
;
attr
.
event_mask
=
GDK_ALL_EVENTS_MASK
;
attr
.
event_mask
=
GDK_ALL_EVENTS_MASK
;
attr
.
width
=
0
;
attr
.
width
=
0
;
...
...
modules/gui/skins/gtk2/gtk2_window.cpp
View file @
b66ae74a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* gtk2_window.cpp: GTK2 implementation of the Window class
* gtk2_window.cpp: GTK2 implementation of the Window class
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_window.cpp,v 1.1
0 2003/04/15 11:46:19 ipkiss
Exp $
* $Id: gtk2_window.cpp,v 1.1
1 2003/04/15 16:42:02 karibu
Exp $
*
*
* Authors: Cyril Deguet <asmax@videolan.org>
* Authors: Cyril Deguet <asmax@videolan.org>
*
*
...
@@ -162,8 +162,6 @@ bool GTK2Window::ProcessOSEvent( Event *evt )
...
@@ -162,8 +162,6 @@ bool GTK2Window::ProcessOSEvent( Event *evt )
unsigned
int
p1
=
evt
->
GetParam1
();
unsigned
int
p1
=
evt
->
GetParam1
();
int
p2
=
evt
->
GetParam2
();
int
p2
=
evt
->
GetParam2
();
fprintf
(
stderr
,
"salut %li
\n
"
,
evt
->
GetMessage
()
);
switch
(
msg
)
switch
(
msg
)
{
{
case
GDK_EXPOSE
:
case
GDK_EXPOSE
:
...
@@ -179,53 +177,57 @@ bool GTK2Window::ProcessOSEvent( Event *evt )
...
@@ -179,53 +177,57 @@ bool GTK2Window::ProcessOSEvent( Event *evt )
// TrackEvent.dwHoverTime = 1;
// TrackEvent.dwHoverTime = 1;
// TrackMouseEvent( &TrackEvent );
// TrackMouseEvent( &TrackEvent );
if
(
LButtonDown
)
if
(
LButtonDown
)
MouseMove
(
(
(
GdkEventButton
*
)
p2
)
->
x_root
,
((
GdkEventButton
*
)
p2
)
->
y_root
,
MouseMove
(
(
int
)(
(
GdkEventButton
*
)
p2
)
->
x
,
1
);
(
int
)(
(
GdkEventButton
*
)
p2
)
->
y
,
1
);
else
if
(
RButtonDown
)
else
if
(
RButtonDown
)
MouseMove
(
(
(
GdkEventButton
*
)
p2
)
->
x_root
,
((
GdkEventButton
*
)
p2
)
->
y_root
,
MouseMove
(
(
int
)(
(
GdkEventButton
*
)
p2
)
->
x
,
2
);
(
int
)(
(
GdkEventButton
*
)
p2
)
->
y
,
2
);
else
else
MouseMove
(
(
(
GdkEventButton
*
)
p2
)
->
x_root
,
((
GdkEventButton
*
)
p2
)
->
y_root
,
MouseMove
(
(
int
)(
(
GdkEventButton
*
)
p2
)
->
x
,
0
);
(
int
)(
(
GdkEventButton
*
)
p2
)
->
y
,
0
);
gdk_window_get_pointer
(
gWnd
,
0
,
0
,
0
);
return
true
;
return
true
;
case
GDK_BUTTON_PRESS
:
case
GDK_BUTTON_PRESS
:
switch
(
(
(
GdkEventButton
*
)
p2
)
->
button
)
switch
(
(
(
GdkEventButton
*
)
p2
)
->
button
)
{
{
case
1
:
case
1
:
// Left button
// Left button
LButtonDown
=
true
;
LButtonDown
=
true
;
MouseDown
(
(
(
GdkEventButton
*
)
p2
)
->
x_root
,
MouseDown
(
(
int
)(
(
GdkEventButton
*
)
p2
)
->
x
,
(
(
GdkEventButton
*
)
p2
)
->
y_root
,
1
);
(
int
)(
(
GdkEventButton
*
)
p2
)
->
y
,
1
);
break
;
break
;
case
3
:
case
3
:
// Right button
// Right button
RButtonDown
=
true
;
RButtonDown
=
true
;
MouseDown
(
(
(
GdkEventButton
*
)
p2
)
->
x_root
,
MouseDown
(
(
int
)(
(
GdkEventButton
*
)
p2
)
->
x
,
(
(
GdkEventButton
*
)
p2
)
->
y_root
,
2
);
(
int
)(
(
GdkEventButton
*
)
p2
)
->
y
,
2
);
break
;
break
;
default:
default:
break
;
break
;
}
}
return
true
;
return
true
;
case
GDK_BUTTON_RELEASE
:
case
GDK_BUTTON_RELEASE
:
switch
(
(
(
GdkEventButton
*
)
p2
)
->
button
)
switch
(
(
(
GdkEventButton
*
)
p2
)
->
button
)
{
{
case
1
:
case
1
:
// Left button
// Left button
LButtonDown
=
false
;
LButtonDown
=
false
;
MouseUp
(
(
(
GdkEventButton
*
)
p2
)
->
x_root
,
MouseUp
(
(
int
)(
(
GdkEventButton
*
)
p2
)
->
x
,
(
(
GdkEventButton
*
)
p2
)
->
y_root
,
1
);
(
int
)(
(
GdkEventButton
*
)
p2
)
->
y
,
1
);
break
;
break
;
case
3
:
case
3
:
// Right button
// Right button
RButtonDown
=
false
;
RButtonDown
=
false
;
MouseUp
(
(
(
GdkEventButton
*
)
p2
)
->
x_root
,
MouseUp
(
(
int
)(
(
GdkEventButton
*
)
p2
)
->
x
,
(
(
GdkEventButton
*
)
p2
)
->
y_root
,
2
);
(
int
)(
(
GdkEventButton
*
)
p2
)
->
y
,
2
);
break
;
break
;
default:
default:
break
;
break
;
}
}
...
@@ -275,7 +277,6 @@ void GTK2Window::RefreshFromImage( int x, int y, int w, int h )
...
@@ -275,7 +277,6 @@ void GTK2Window::RefreshFromImage( int x, int y, int w, int h )
*/
*/
fprintf
(
stderr
,
"window %d %d %d %d
\n
"
,
x
,
y
,
w
,
h
);
gdk_draw_drawable
(
gWnd
,
gc
,
((
GTK2Graphics
*
)
Image
)
->
GetImage
(),
gdk_draw_drawable
(
gWnd
,
gc
,
((
GTK2Graphics
*
)
Image
)
->
GetImage
(),
x
,
y
,
x
,
y
,
w
,
h
);
x
,
y
,
x
,
y
,
w
,
h
);
}
}
...
...
modules/gui/skins/src/window.cpp
View file @
b66ae74a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* window.cpp: Window class
* window.cpp: Window class
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: window.cpp,v 1.
9 2003/04/15 01:19:11 ipkiss
Exp $
* $Id: window.cpp,v 1.
10 2003/04/15 16:42:02 karibu
Exp $
*
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
#include "theme.h"
#include "theme.h"
#include "skin_common.h"
#include "skin_common.h"
#include <stdio.h>
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
...
@@ -309,6 +310,8 @@ void Window::MouseDown( int x, int y, int button )
...
@@ -309,6 +310,8 @@ void Window::MouseDown( int x, int y, int button )
{
{
// Checking event in controls
// Checking event in controls
fprintf
(
stderr
,
" -> mousedown
\n
"
);
for
(
int
i
=
ControlList
.
size
()
-
1
;
i
>=
0
;
i
--
)
for
(
int
i
=
ControlList
.
size
()
-
1
;
i
>=
0
;
i
--
)
{
{
if
(
ControlList
[
i
]
->
MouseDown
(
x
,
y
,
button
)
)
if
(
ControlList
[
i
]
->
MouseDown
(
x
,
y
,
button
)
)
...
@@ -322,8 +325,6 @@ void Window::MouseMove( int x, int y, int button )
...
@@ -322,8 +325,6 @@ void Window::MouseMove( int x, int y, int button )
{
{
int
i
;
int
i
;
fprintf
(
stderr
,
"pouet %i
\n
"
,
button
);
// Move window if selected !
// Move window if selected !
if
(
WindowMoving
)
if
(
WindowMoving
)
{
{
...
@@ -383,6 +384,8 @@ void Window::MouseUp( int x, int y, int button )
...
@@ -383,6 +384,8 @@ void Window::MouseUp( int x, int y, int button )
WindowMoving
=
false
;
WindowMoving
=
false
;
}
}
fprintf
(
stderr
,
" -> mouseup
\n
"
);
// Checking event in controls
// Checking event in controls
for
(
i
=
ControlList
.
size
()
-
1
;
i
>=
0
;
i
--
)
for
(
i
=
ControlList
.
size
()
-
1
;
i
>=
0
;
i
--
)
{
{
...
...
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