Re: Building Public Information Terminal



Thanks for that I would llove to have your dual head code, tht would be great. I will be using a stripped down linux mandrake. Thanks very much

David Corrigan wrote:

Hi,

What OS will you be using? Creating a gui should be easy if you are
using windows or linux you will find most of the tools for it at
www.gtk.org including a tutorial and some examples. Here is some code
to detect multiple monitors which might help.

#include <gtk/gtk.h>
#include <stdio.h>

int main( int   argc,
        char *argv[] )
{
      gint num_screen = 0;
      GdkScreen *display;

      gtk_init (&argc, &argv);

      display = gdk_screen_get_default ();
      num_screen = gdk_screen_get_n_monitors (display);

      if (num_screen <= 1)
      {
      printf ("This Xserver has one screen for the default Xinerama display.");
      }
      else
      {
      printf ("This Xserver has %d screens for the default Xinerama
display.\n",num_screen);
      }

     return 0;
}

I've only tested this code in Linux but it should work for Windows
also assuming you have GTK installed.
I have a better demo which places a window on each screen and another
one with borderless windows. If you need them it I can post them.

David



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]