GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Tue Sep 02, 2014 4:21 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Sending output to multiple displays (i.e. terminals)
PostPosted: Tue Aug 06, 2013 12:05 am 
Offline

Joined: Fri May 17, 2013 7:42 pm
Posts: 3
Although I kick-off my application on host "A", my application will want to output different GUI's to different displays (i.e. terminals). How do I control the display device? This presumably happens when gtk_window_new(GTK_WINDOW_TOPLEVEL) is called.


Top
 Profile  
 
 Post subject: Re: Sending output to multiple displays (i.e. terminals)
PostPosted: Tue Aug 06, 2013 5:34 am 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 745
Location: UK
Hello,

It is not totally clear what you want to do here. You also do not state which version of GTK+ you are using.

Code:
gtk_window_new(GTK_WINDOW_TOPLEVEL)
All this does is create a new window, the window will be on the default screen and will need to be populated with the widgets you want to make it of any use. You can create as many windows as is needed for you application.

Not sure if I am thinking of the same thing you are? You can set your window to another screen. This could be a different monitor or the same monitor but a different screen. The function to call is
Code:
void                gtk_window_set_screen               (GtkWindow *window,
                                                         GdkScreen *screen);
You did not say which version of GTK+ you are using as the method of obtaining the GdkScreen is different between the versions. Most applications do not need to have windows on different screens. The applications that I do know of that take advantage of multiple monitors are video presentation, and audio/video editors where having multiple monitors is very useful.

_________________
E.


Top
 Profile  
 
 Post subject: Re: Sending output to multiple displays (i.e. terminals)
PostPosted: Tue Aug 06, 2013 12:44 pm 
Offline

Joined: Fri May 17, 2013 7:42 pm
Posts: 3
I am using GTK 2.0. The application involves two analysts at two different workstations interacting with a GUI to control aircraft who are in combat. The look and feel of the GUI on each workstation is the same; however the data shown in the each gui is different. Based on your answer, I now need to know what constitutes a GdkScreen.


Top
 Profile  
 
 Post subject: Re: Sending output to multiple displays (i.e. terminals)
PostPosted: Tue Aug 06, 2013 3:12 pm 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 745
Location: UK
With this further information it sounds like you have two physical computers and not one with two monitors. Can you fully describe what you have and what you want to happen. Please include any connections what would seam relevant.

_________________
E.


Top
 Profile  
 
 Post subject: Re: Sending output to multiple displays (i.e. terminals)
PostPosted: Tue Aug 06, 2013 3:44 pm 
Offline

Joined: Fri May 17, 2013 7:42 pm
Posts: 3
I have a network of Linux workstations. Think of it as a game. The game controller (human) kicks off the game on workstation A. The two players are at workstations B and C. The application will communicate with the game controller and the two players thru text input boxes on their respective machines. There will also be some graphical displays on each machine. Bottom line:
Application runs on machine A and displays a GUI on the display of machine A. Machines B and C also have GUIs on their displays for the two players.

The gdk_window_set_screen seems like it leads down the right path. GdkScreen? is that a struct? If so, how are the elements of that struct associated with a particular display?


Top
 Profile  
 
 Post subject: Re: Sending output to multiple displays (i.e. terminals)
PostPosted: Tue Aug 06, 2013 5:57 pm 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 745
Location: UK
For gtk_window_set_screen() to be useful all monitors must be connected to machine A. So I do not think this is the answer for you. GdkScreen is a structure with the members of the structure not accessible except via function calls.

You say that you have a network of machines. The best way to run this would be to have a server application on machine A then have a client application that runs on machines A, B, C etc... that communicates with the server. The client would run the graphical user interface and use TCP or UDP over the network to talk to the server. There are library routines in Linux and in the GIO library to help with this.

_________________
E.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group