Get x11 id from wxwindows

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
pichlik
In need of some credit
In need of some credit
Posts: 6
Joined: Wed Feb 09, 2011 5:41 am

Get x11 id from wxwindows

Post by pichlik »

Hi. please,I need to find out how can iget the x11 window system id from a wxwidgets window.

My window

Code: Select all

OknoVidea::OknoVidea(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& size)
{
	//(*Initialize(OknoVidea)
	Create(parent, id, _("OknoVidea"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, _T("id"));
	SetClientSize(wxDefaultSize);
	Move(wxDefaultPosition);
	//*)
And VLC Player,who needs rights of my windows id created with wxWidgets.

Code: Select all

libvlc_media_player_set_xwindow ( libvlc_media_player_t *p_mi, uint32_t drawable );
I've tried the id of the window function is achieved by OknoVidea::GetId ();, but unfortunately, the connection worked. id function returned matters to me was different than I learned with xwininfo.

Thank you in advance for every answer.
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Post by DavidHart »

Hi,

Does the third post in the FAQ help?

Also, http://forums.wxwidgets.org/viewtopic.php?t=29850 looks highly relevant.

Regards,

David
pichlik
In need of some credit
In need of some credit
Posts: 6
Joined: Wed Feb 09, 2011 5:41 am

Post by pichlik »

DavidHart wrote:Hi,

Does the third post in the FAQ help?

Also, http://forums.wxwidgets.org/viewtopic.php?t=29850 looks highly relevant.

Regards,

David
Thank you for the link, I did not see him. Unfortunately, the compilation will stop on the line

Code: Select all

extern "C" {
and outputs an error

Code: Select all

/usr/include/wx-2.8/wx/gtk/win_gtk.h|15|error: expected unqualified-id before string constant|
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Post by DavidHart »

Difficult to say. Perhaps check the lines above, in case you missed a ';' (or similar).
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2409
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Post by evstevemd »

pichlik wrote:
DavidHart wrote:Hi,

Does the third post in the FAQ help?

Also, http://forums.wxwidgets.org/viewtopic.php?t=29850 looks highly relevant.

Regards,

David
Thank you for the link, I did not see him. Unfortunately, the compilation will stop on the line

Code: Select all

extern "C" {
and outputs an error

Code: Select all

/usr/include/wx-2.8/wx/gtk/win_gtk.h|15|error: expected unqualified-id before string constant|
Which one did you tried? I can see this Link is without any extern "C" and OP said it worked!
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE »

Hi!
As I see you're trying to embed VLC in a wxWidgets app.
That's exactly what I do and it works perfectly well, given you use the way of obtaining the XID like I mentioned in the other post.

Where does that extern "C" come from?
In libvlc.h this is use, but guarded with an ifdef block.
Are you trying to compile somehting a C code instead of C++?
Check if the extern "C" is guarded like

Code: Select all

# ifdef __cplusplus
extern "C" {
# endif
and make sure that you're not missing the closing brace to this block.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
pichlik
In need of some credit
In need of some credit
Posts: 6
Joined: Wed Feb 09, 2011 5:41 am

Post by pichlik »

Thanks, it works perfect, an error has been improperly inserted # include
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2409
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Post by evstevemd »

pichlik wrote:Thanks, it works perfect, an error has been improperly inserted # include
Just curious, are you using libvlc? I was just reading about it today that is why I ask :D
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
pichlik
In need of some credit
In need of some credit
Posts: 6
Joined: Wed Feb 09, 2011 5:41 am

Post by pichlik »

Yes We create SDL application GUI, wxWidgets use on user preferences and also to create a window in which I play a video file.

At the moment still addresses both the window created in wxWidgets displayed on the second monitor

Monitor 1 -> SDL fullscreen applications
Monitor2-> window with wxWidgets libvlc to play video in fullscreen

I have a Matrox graphics card with two video outputs.

It occurred to me to create one large work area and have to split in half. (However, I fear that it will make trouble if I have different resolutions.
Post Reply