bug-bash
[Top][All Lists]
Advanced

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

(announce) GTK+2 + Bash


From: William Park
Subject: (announce) GTK+2 + Bash
Date: Mon, 11 Jul 2005 11:57:38 -0400
User-agent: Mutt/1.4.2i

For your reading pleasure, this is a copy of what I posted to
<comp.unix.shell>, and other mandatory cross-posting...


I'm very excited to announce shell interface to GTK+2 (2.6.1) for Bash.
It read XML syntax describing the widget layout, and returns user
selection as shell variable or runs shell command as callback.  It's
designed for simple GUI dialog or layout, with the emphasis on getting
the user data back into shell.

For the moment, the shell variable and command are disabled.  It just
prints to stdout, instead.  But, you can change it easily.


Ref:
    http://freshmeat.net/projects/bashdiff/
    http://home.eol.ca/~parkw/index.html#gtk

Usage:
    gtk < file.xml
    gtk file.xml...


For example, GTK+2 tutorial has 2 button 'helloworld2.c',

    http://www.gtk.org/tutorial/sec-anupgradedhelloworld.html
    http://www.gtk.org/tutorial/images/helloworld2.png

You can now build the same thing with

    <window border="10" label="Hello Buttons!">
        <hbox>
            <button label="Button 1" clicked="echo Button 1 was pressed" />
            <button label="Button 2" clicked="echo Button 2 was pressed" />
        </hbox>
    </window>

Or, 

    gtk << EOF
        <window>
            ...
        </window>
    EOF


Feedbacks are welcome.  Enjoy!

-- 
William Park <opengeometry@yahoo.ca>, Toronto, Canada
ThinFlash: Linux thin-client on USB key (flash) drive
           http://home.eol.ca/~parkw/thinflash.html
BashDiff: Super Bash shell
          http://freshmeat.net/projects/bashdiff/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]