Re: [gtk-list] Re: GTK window manager...



Kenneth Albanowski <kjahds@kjahds.com> writes:

> On 2 May 1999 tibbs@hpc.uh.edu wrote:
> 
> > If someone seriously wants to use Gtk for the window decorations, come to
> > fvwm-workers (@fvwm.org) and ask about it.  There have been rumblings in
> > the past about making decorations implementable via external modules; it
> > may not be all that hard do do.
> 
> For what it is worth, I'd very much like to see a window manager that can
> use a UI kit (Gtk makes a good test case, but I'd like it to be fairly
> generic) for all graphical operations and is amenable to control by an
> outside agency (let us say Perl, or one of the other interpreters that has
> a Gtk binding). That should let us significantly reduce the cost of
> writing and modifying a window manager, and thereby increase the
> likelyhood of good ones being written. (Not dismissing FVWM, of course. I
> use it myself.) If there are some things that Gtk (or some over toolkit) 
> cannot do natively (like draw a rubber-band resize rectangle, or somesuch) 
> then the window manager should export the facilities to make that
> possible. 

Scwm can use Gtk in its full generality (or at least the large
subset of it exposed by the guile-gtk wrapper).  Our configuration
support is all written in scheme, using guile-gtk... we have a snapshot
on our web page:

http://vicarious-existence.mit.edu/scwm/

e.g., we prompt for strings using gtk (for, e.g., renaming windows):


(define*-public (prompt-string prompt proc #&key
       (initval #f) (title "prompt-string"))
  "Use PROMPT as prompt in text entry widget and call PROC with the
entered string.
E.g., (prompt-string \"Enter new name\" (lambda (nm) (set-window-title!
w nm)))"
  (let* ((toplevel (gtk-window-new 'dialog))
 (hbox-and-getter-and-entry (prompt-string-hbox prompt initval))
 (hbox (car hbox-and-getter-and-entry))
 (getter (cadr hbox-and-getter-and-entry))
 (entry (caddr hbox-and-getter-and-entry)))
    (gtk-window-set-title toplevel title)
    (gtk-window-set-wmclass toplevel "prompt-string" "Scwm")
    (gtk-container-add toplevel hbox)
    (gtk-signal-connect entry "activate"
(lambda () (gtk-widget-destroy toplevel) 
(proc (getter))))
    (let ((pp (pointer-position)))
      (gtk-widget-set-uposition toplevel (- (car pp) 150) (cadr pp)))
    (gtk-widget-show toplevel)
    (lambda ()
      (gtk-widget-hide toplevel)
      (gtk-widget-destroy toplevel))))

[prompt-string-hbox is omitted here, but is in prompt-string.scm in the
Scwm distribution].

Greg



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