Re: Porting terminal applications to GTK



Unix OS wrote:
Hello,

I'm an undergraduate student at James Madison University.  I've
decided to convert one of my CS classes to an Honors class, which
involves doing some sort of extra project typically.  Anyway, I've
been working with my professor, and he wants to try porting his text
editor to a windowed application that can run on Windows.  I figured
GTK would be a great place to start.

Enough back story.

What's involved in converting  a terminal application like a text
editor into a windowed application?  Will I need to simply need to
write a custom widget to wrap the terminal application's output? Then
redirect keyboard and mouse events to the original code?  Or is it
more involved than that?

I know Vim can be compiled to run as a GTK app.  I figure the original
terminal-only code must have been reused.

You could use libvte (I think that's it) which is a terminal widget, and
then run the editor, unmodified, in another process, outputting and
receiving input from the terminal widget.

As the other poster mentioned, unless the app being ported is written in
a modular way with a separation of data, control, and presentation,
porting it to a GUI is difficult.  This is because typically older
console apps are procedural, whereas GUI apps are typically
event-driven.  Don't forget other gotchas too, such as OS-specific
calls, directory path separators (/ vs \), etc.



Thanks,
Kris Kalish
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list





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