Re: Newbie GNOME questions...



Hello,

On Mon, 19 Nov 2001, T.L. wrote:
> #1) Is there a GNOME API that will allow me to display incoming
>        text from a file stream (i.e. incoming data from a serial
> port...)
>
> #2) Same scenario, but in this case I would like to enter text and
>        have the text sent out to a serial port?

Such tasks aren't covered by GNOME really. You should use the standard
system mechanism for this task. E.g open the block device for the
serial port (I believe its something like /dev/tty) with fopen and use it
like a normal file. That's the unix way of doing such things. Grab a Unix
System Programing book for more details.

> #3) How would you create a window that would be divided in two
>        halves such that the top half would be for data display (for #1
>        above) and the bottom half would be for text entry?

This is done with Gtk[H|V]Box objects. These are just container objects
which place their child widgets either horizontally beside or vertically
above each other. In your case you want a GtkVBox with two child widgets.
Look at the GTK tutorial at www.gtk.org and/or into the "Gtk And GNOME
Application Development" (GGAD) online book at developer.gnome.org.

Regards,

  Jens

-- 
"Wer die Freiheit aufgibt, um Sicherheit zu gewinnen, wird am Ende beides
verlieren." -- Benjamin Franklin





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