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
33eaee68
Commit
33eaee68
authored
Apr 15, 2003
by
Olivier Teulière
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* event broadcasting should work
parent
949b4349
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
76 additions
and
31 deletions
+76
-31
modules/gui/skins/gtk2/gtk2_api.cpp
modules/gui/skins/gtk2/gtk2_api.cpp
+19
-5
modules/gui/skins/gtk2/gtk2_event.cpp
modules/gui/skins/gtk2/gtk2_event.cpp
+18
-7
modules/gui/skins/gtk2/gtk2_run.cpp
modules/gui/skins/gtk2/gtk2_run.cpp
+38
-17
modules/gui/skins/gtk2/gtk2_window.cpp
modules/gui/skins/gtk2/gtk2_window.cpp
+1
-2
No files found.
modules/gui/skins/gtk2/gtk2_api.cpp
View file @
33eaee68
...
...
@@ -2,7 +2,7 @@
* gtk2_api.cpp: Various gtk2-specific functions
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_api.cpp,v 1.
5 2003/04/14 21:38:31 asmax
Exp $
* $Id: gtk2_api.cpp,v 1.
6 2003/04/15 17:55:49 ipkiss
Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -34,6 +34,7 @@
#include "os_api.h"
#include "event.h" // for MAX_PARAM_SIZE
#include <stdio.h>
//---------------------------------------------------------------------------
// Event API
...
...
@@ -51,11 +52,24 @@ void OSAPI_SendMessage( Window *win, unsigned int message, unsigned int param1,
void
OSAPI_PostMessage
(
Window
*
win
,
unsigned
int
message
,
unsigned
int
param1
,
long
param2
)
{
/* if( win == NULL )
PostMessage( NULL, message, param1, param2 );
GdkEventClient
*
event
=
new
GdkEventClient
;
event
->
type
=
GDK_CLIENT_EVENT
;
if
(
win
==
NULL
)
event
->
window
=
NULL
;
else
PostMessage( ( (Win32Window *)win )->GetHandle(), message, param1,
param2 );*/
event
->
window
=
((
GTK2Window
*
)
win
)
->
GetHandle
();
event
->
send_event
=
0
;
event
->
message_type
=
NULL
;
event
->
data_format
=
32
;
event
->
data
.
l
[
0
]
=
message
;
event
->
data
.
l
[
1
]
=
param1
;
event
->
data
.
l
[
2
]
=
param2
;
fprintf
(
stderr
,
"======= message %i
\n
"
,
message
);
gdk_event_put
(
(
GdkEvent
*
)
event
);
delete
event
;
}
//---------------------------------------------------------------------------
...
...
modules/gui/skins/gtk2/gtk2_event.cpp
View file @
33eaee68
...
...
@@ -2,7 +2,7 @@
* gtk2_event.cpp: GTK2 implementation of the Event class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_event.cpp,v 1.
4 2003/04/13 19:09:59 asmax
Exp $
* $Id: gtk2_event.cpp,v 1.
5 2003/04/15 17:55:49 ipkiss
Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -31,6 +31,7 @@
#include <vlc/intf.h>
//--- SKIN ------------------------------------------------------------------
#include "os_api.h"
#include "event.h"
#include "os_event.h"
#include "window.h"
...
...
@@ -67,15 +68,25 @@ GTK2Event::~GTK2Event()
//---------------------------------------------------------------------------
bool
GTK2Event
::
SendEvent
()
{
/* if( Message != VLC_NOTHING )
fprintf
(
stderr
,
"++++++++++++++++ %i
\n
"
,
Message
);
if
(
Message
!=
VLC_NOTHING
)
{
PostMessage( hWnd, Message, Param1, Param2 );
PostSynchroMessage();
return true;
// Find window matching with gwnd
list
<
Window
*>::
const_iterator
win
;
for
(
win
=
p_intf
->
p_sys
->
p_theme
->
WindowList
.
begin
();
win
!=
p_intf
->
p_sys
->
p_theme
->
WindowList
.
end
();
win
++
)
{
// If it is the correct window
if
(
gWnd
==
(
(
GTK2Window
*
)(
*
win
)
)
->
GetHandle
()
)
{
OSAPI_PostMessage
(
*
win
,
Message
,
Param1
,
Param2
);
PostSynchroMessage
();
}
}
}
*/
return
true
;
OSAPI_PostMessage
(
NULL
,
Message
,
Param1
,
Param2
);
return
true
;
}
//---------------------------------------------------------------------------
bool
GTK2Event
::
IsEqual
(
Event
*
evt
)
...
...
modules/gui/skins/gtk2/gtk2_run.cpp
View file @
33eaee68
...
...
@@ -2,7 +2,7 @@
* gtk2_run.cpp:
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_run.cpp,v 1.
5 2003/04/15 01:19:11
ipkiss Exp $
* $Id: gtk2_run.cpp,v 1.
6 2003/04/15 17:55:49
ipkiss Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -68,10 +68,14 @@ int SkinManage( intf_thread_t *p_intf );
//---------------------------------------------------------------------------
void
GTK2Proc
(
GdkEvent
*
event
,
gpointer
data
)
{
GdkWindow
*
gwnd
=
((
GdkEventAny
*
)
event
)
->
window
;
// Get pointer to thread info
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
data
;
VlcProc
*
Proc
=
new
VlcProc
(
p_intf
);
list
<
Window
*>::
const_iterator
win
;
GdkWindow
*
gwnd
=
((
GdkEventAny
*
)
event
)
->
window
;
fprintf
(
stderr
,
"------ %li
\n
"
,
(
long
int
)
gwnd
);
// If doesn't exist, treat windows message normally
// if( p_intf == NULL )
...
...
@@ -81,27 +85,44 @@ void GTK2Proc( GdkEvent *event, gpointer data )
Event
*
evt
=
(
Event
*
)
new
OSEvent
(
p_intf
,
((
GdkEventAny
*
)
event
)
->
window
,
event
->
type
,
0
,
(
long
)
event
);
// Find window matching with gwnd
list
<
Window
*>::
const_iterator
win
;
for
(
win
=
p_intf
->
p_sys
->
p_theme
->
WindowList
.
begin
();
win
!=
p_intf
->
p_sys
->
p_theme
->
WindowList
.
end
();
win
++
)
if
(
IsVLCEvent
(
event
->
type
)
)
{
if
(
!
Proc
->
EventProc
(
evt
)
)
return
;
// Exit VLC !
}
else
if
(
gwnd
==
NULL
)
{
// If it is the correct window
if
(
gwnd
==
(
(
GTK2Window
*
)(
*
win
)
)
->
GetHandle
()
)
for
(
win
=
p_intf
->
p_sys
->
p_theme
->
WindowList
.
begin
();
win
!=
p_intf
->
p_sys
->
p_theme
->
WindowList
.
end
();
win
++
)
{
// Send event and check if processed
if
(
(
*
win
)
->
ProcessEvent
(
evt
)
)
{
delete
(
OSEvent
*
)
evt
;
return
;
}
else
(
*
win
)
->
ProcessEvent
(
evt
);
}
}
else
{
// Find window matching with gwnd
for
(
win
=
p_intf
->
p_sys
->
p_theme
->
WindowList
.
begin
();
win
!=
p_intf
->
p_sys
->
p_theme
->
WindowList
.
end
();
win
++
)
{
// If it is the correct window
if
(
gwnd
==
(
(
GTK2Window
*
)(
*
win
)
)
->
GetHandle
()
)
{
break
;
// Send event and check if processed
if
(
(
*
win
)
->
ProcessEvent
(
evt
)
)
{
delete
(
OSEvent
*
)
evt
;
return
;
}
else
{
break
;
}
}
}
}
delete
(
OSEvent
*
)
evt
;
delete
Proc
;
#if 0
// If Window is parent window
...
...
modules/gui/skins/gtk2/gtk2_window.cpp
View file @
33eaee68
...
...
@@ -2,7 +2,7 @@
* gtk2_window.cpp: GTK2 implementation of the Window class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_window.cpp,v 1.1
3 2003/04/15 16:49:45 karibu
Exp $
* $Id: gtk2_window.cpp,v 1.1
4 2003/04/15 17:55:49 ipkiss
Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -170,7 +170,6 @@ bool GTK2Window::ProcessOSEvent( Event *evt )
case
GDK_MOTION_NOTIFY
:
fpprintf
(
stderr
,
"Mouse move (%i)"
,
(
int
)
evt
);
if
(
LButtonDown
)
MouseMove
(
(
int
)(
(
GdkEventButton
*
)
p2
)
->
x
,
(
int
)(
(
GdkEventButton
*
)
p2
)
->
y
,
1
);
...
...
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