Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
f2c84d95
Commit
f2c84d95
authored
Apr 16, 2003
by
Emmanuel Puig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Can now quit the interface
parent
5e0f6df7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
9 deletions
+26
-9
modules/gui/skins/gtk2/gtk2_run.cpp
modules/gui/skins/gtk2/gtk2_run.cpp
+26
-9
No files found.
modules/gui/skins/gtk2/gtk2_run.cpp
View file @
f2c84d95
...
...
@@ -2,7 +2,7 @@
* gtk2_run.cpp:
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_run.cpp,v 1.
9 2003/04/16 19:22:53
karibu Exp $
* $Id: gtk2_run.cpp,v 1.
10 2003/04/16 21:30:56
karibu Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -44,6 +44,14 @@
#include "vlcproc.h"
//---------------------------------------------------------------------------
class
CallBackObjects
{
public:
VlcProc
*
Proc
;
GMainLoop
*
Loop
;
};
//---------------------------------------------------------------------------
// Specific method
//---------------------------------------------------------------------------
...
...
@@ -68,10 +76,15 @@ int SkinManage( intf_thread_t *p_intf );
//---------------------------------------------------------------------------
void
GTK2Proc
(
GdkEvent
*
event
,
gpointer
data
)
{
// Get objects from data
CallBackObjects
*
obj
=
(
CallBackObjects
*
)
data
;
VlcProc
*
proc
=
obj
->
Proc
;
// Get pointer to thread info
unsigned
int
msg
;
VlcProc
*
proc
=
(
VlcProc
*
)
data
;
intf_thread_t
*
p_intf
=
proc
->
GetpIntf
();
// Variables
unsigned
int
msg
;
Event
*
evt
;
list
<
Window
*>::
const_iterator
win
;
GdkWindow
*
gwnd
=
((
GdkEventAny
*
)
event
)
->
window
;
...
...
@@ -91,7 +104,7 @@ void GTK2Proc( GdkEvent *event, gpointer data )
else
{
msg
=
event
->
type
;
evt
=
(
Event
*
)
new
OSEvent
(
p_intf
,
evt
=
(
Event
*
)
new
OSEvent
(
p_intf
,
((
GdkEventAny
*
)
event
)
->
window
,
msg
,
0
,
(
long
)
event
);
}
...
...
@@ -101,7 +114,7 @@ void GTK2Proc( GdkEvent *event, gpointer data )
if
(
!
proc
->
EventProc
(
evt
)
)
{
fprintf
(
stderr
,
"Quit
\n
"
);
g_main_
context_unref
(
g_main_context_default
()
);
g_main_
loop_quit
(
obj
->
Loop
);
return
;
// Exit VLC !
}
}
...
...
@@ -185,13 +198,17 @@ void GTK2Proc( GdkEvent *event, gpointer data )
void
OSRun
(
intf_thread_t
*
p_intf
)
{
// Create VLC event object processing
VlcProc
*
proc
=
new
VlcProc
(
p_intf
);
CallBackObjects
*
callbackobj
=
new
CallBackObjects
();
callbackobj
->
Proc
=
new
VlcProc
(
p_intf
);
callbackobj
->
Loop
=
g_main_loop_new
(
NULL
,
TRUE
);
gdk_event_handler_set
(
GTK2Proc
,
(
gpointer
)
proc
,
NULL
);
// Set event callback
gdk_event_handler_set
(
GTK2Proc
,
(
gpointer
)
callbackobj
,
NULL
);
// Main event loop
GMainLoop
*
loop
=
g_main_loop_new
(
NULL
,
TRUE
);
g_main_loop_run
(
loop
);
g_main_loop_run
(
callbackobj
->
Loop
);
delete
callbackobj
;
}
//---------------------------------------------------------------------------
bool
IsVLCEvent
(
unsigned
int
msg
)
...
...
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