gutopia-dev
[Top][All Lists]
Advanced

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

Re: [rgui-dev] Clairvoyance


From: Kero van Gelder
Subject: Re: [rgui-dev] Clairvoyance
Date: Fri, 30 Aug 2002 01:07:01 +0200
User-agent: Mutt/1.4i

> Ruby-wise is "RubyTk". and i have talked to Kero about making it tightly
> integrated with the GUtopIa API, such the Ruby-Wise's API *IS* GutopIa's
> API and vice-versa.

That sounds very good to me. But we're not there, yet.
(I'll try to do something about my documentation Wednesday, too)

> so your code below would indeed follow, so to speak,
> but like i said the GUtopIa part won't be going anywhere. essentially
> then:
> 
>   require 'gutopia'  # meta-api
>   require 'wise'     # target platform
> 
> even though, in this case, the binding may very well be 100% one-to-one
> betweeen the two.

Rather, I'd have

   require 'gutopia'
   Gutopia.pref_tk('gtk', 'qt')

So Gutopia will try gtk first, Qt second and the rest of it's backends
in some predefined order. So it will fall back to Wise if nothing else
is installed, perhaps with Wise dropping to raw framebuffer if nothing
else is available. Whatever it tries, I don't want to change the code.

   Gutopia.pref_tk(Native)

would look for Win32 API on Win32 systems first, yet for gtk on a
Gnome system and Qt when KDE panel is running. (Hm, this line should
probably be implicit :)

Note that a resulting automatic "include Wise" brings the Wise API
into the Gutopia module without an extra conceptual layer. Ruby is
just amazingly flexible :)

On a text console, Gutopia::Window.new() would simply fail, since
there is no class Window available.

Each backend would need a method can_run?() for this, obviously.
A method runs_native?() seems required, too.

+--- Kero ------------------------------ address@hidden ---+
|  Don't split your mentality without thinking twice       |
|                          Proud like a God -- Guano Apes  |
+--- M38c ---------- http://httpd.chello.nl/k.vangelder ---+





reply via email to

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