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
88aa406b
Commit
88aa406b
authored
Apr 20, 2003
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* a few segfaults but wxwindows works under linux !
parent
a64cdbee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
16 deletions
+71
-16
modules/gui/skins/gtk2/gtk2_run.cpp
modules/gui/skins/gtk2/gtk2_run.cpp
+71
-16
No files found.
modules/gui/skins/gtk2/gtk2_run.cpp
View file @
88aa406b
...
...
@@ -2,7 +2,7 @@
* gtk2_run.cpp:
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_run.cpp,v 1.1
2 2003/04/17 13:08:02 karibu
Exp $
* $Id: gtk2_run.cpp,v 1.1
3 2003/04/20 22:52:50 asmax
Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -27,6 +27,10 @@
//--- GTK2 ------------------------------------------------------------------
#include <glib.h>
#include <gdk/gdk.h>
#include <gtk/gtk.h>
//--- WWWINDOWS -------------------------------------------------------------
#include <wx/wx.h>
//--- VLC -------------------------------------------------------------------
#include <vlc/intf.h>
...
...
@@ -42,7 +46,10 @@
#include "../os_theme.h"
#include "../src/skin_common.h"
#include "../src/vlcproc.h"
#include "../src/wxdialogs.h"
// include the icon graphic
#include "share/vlc32x32.xpm"
//---------------------------------------------------------------------------
class
CallBackObjects
...
...
@@ -59,17 +66,23 @@ bool IsVLCEvent( unsigned int msg );
int
SkinManage
(
intf_thread_t
*
p_intf
);
//---------------------------------------------------------------------------
//
REFRESH TIMER CALLBACK
//
Local classes declarations.
//---------------------------------------------------------------------------
gboolean
RefreshTimer
(
gpointer
data
)
class
Instance
:
public
wxApp
{
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
data
;
SkinManage
(
p_intf
);
return
true
;
}
//---------------------------------------------------------------------------
public:
Instance
();
Instance
(
intf_thread_t
*
_p_intf
,
CallBackObjects
*
callback
);
bool
OnInit
();
OpenDialog
*
open
;
private:
intf_thread_t
*
p_intf
;
CallBackObjects
*
callbackobj
;
};
//---------------------------------------------------------------------------
// GTK2 interface
...
...
@@ -187,6 +200,49 @@ void GTK2Proc( GdkEvent *event, gpointer data )
// If hwnd does not match any window or message not processed
return DefWindowProc( hwnd, uMsg, wParam, lParam );
#endif
gtk_main_do_event
(
event
);
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// Implementation of Instance class
//---------------------------------------------------------------------------
Instance
::
Instance
(
)
{
}
Instance
::
Instance
(
intf_thread_t
*
_p_intf
,
CallBackObjects
*
callback
)
{
// Initialization
p_intf
=
_p_intf
;
callbackobj
=
callback
;
}
IMPLEMENT_APP_NO_MAIN
(
Instance
)
bool
Instance
::
OnInit
()
{
// Set event callback. Yes, it's a big hack ;)
gdk_event_handler_set
(
GTK2Proc
,
(
gpointer
)
callbackobj
,
NULL
);
p_intf
->
p_sys
->
p_icon
=
new
wxIcon
(
vlc_xpm
);
p_intf
->
p_sys
->
OpenDlg
=
new
OpenDialog
(
p_intf
,
NULL
,
FILE_ACCESS
);
p_intf
->
p_sys
->
MessagesDlg
=
new
Messages
(
p_intf
,
NULL
);
return
TRUE
;
}
//---------------------------------------------------------------------------
// REFRESH TIMER CALLBACK
//---------------------------------------------------------------------------
gboolean
RefreshTimer
(
gpointer
data
)
{
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
data
;
SkinManage
(
p_intf
);
return
true
;
}
//---------------------------------------------------------------------------
...
...
@@ -196,20 +252,19 @@ void GTK2Proc( GdkEvent *event, gpointer data )
//---------------------------------------------------------------------------
void
OSRun
(
intf_thread_t
*
p_intf
)
{
static
char
*
p_args
[]
=
{
""
};
// Create VLC event object processing
CallBackObjects
*
callbackobj
=
new
CallBackObjects
();
callbackobj
->
Proc
=
new
VlcProc
(
p_intf
);
callbackobj
->
Loop
=
g_main_loop_new
(
NULL
,
TRUE
);
// Set event callback
gdk_event_handler_set
(
GTK2Proc
,
(
gpointer
)
callbackobj
,
NULL
);
wxTheApp
=
new
Instance
(
p_intf
,
callbackobj
);
// Add timer
g_timeout_add
(
200
,
(
GSourceFunc
)
RefreshTimer
,
(
gpointer
)
p_intf
);
// Main event loop
g_main_loop_run
(
callbackobj
->
Loop
);
wxEntry
(
1
,
p_args
);
delete
callbackobj
;
}
//---------------------------------------------------------------------------
...
...
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