LibWMH - Was: Gnuplot GGI driver

2000-02-26 Thread Andreas Beck

> > There is a way of doing this using the wmh-extension, however it will 
> > basically tell you if you are running under a windowing system (of which
> > only X is supported yet).

> I just tried, wmh doesn't even compile (lot's of things not defined in
> move.c)

O.K. - you are now the second person to tell me, that it doesn't compile.
So I really got to investigate, as it works like a charm for me.

I'll update from CVS right away and see if someone broke it after my last
update and I'd like to ask all interested parties to do the same (or at
least get a recent snapshot) and send me reports about failed builds. 
Please send me the output of ./configure and of the failing make. 

As it is included in the buildall process, it would be bad, if it failed.

CU, ANdy

-- 
= Andreas Beck|  Email :  <[EMAIL PROTECTED]> =



Re: Gnuplot GGI driver

2000-02-25 Thread Cesar Crusius

* [EMAIL PROTECTED] ([EMAIL PROTECTED]) [000128 03:06]:

> > * How can I tell if I'm using the X11 device or not?
> 
> Umm - usually you can't. Why do you want to know ?
> 
> There is a way of doing this using the wmh-extension, however it will 
> basically tell you if you are running under a windowing system (of which
> only X is supported yet).

I just tried, wmh doesn't even compile (lot's of things not defined in
move.c)

-- 
Cesar Augusto Rorato Crusius  o__ o__ o__ o__ o__
Stanford University   ,>/'_   ,>/'_   ,>/'_   ,>/'_   ,>/'_
e-mail:[EMAIL PROTECTED](_)\(_) (_)\(_) (_)\(_) (_)\(_) (_)\(_)
www.stanford.edu/~crusius

HE WHO SACRIFICES FUNCTIONALITY FOR EASE OF USE
LOSES BOTH AND DESERVES NEITHER



Re: Gnuplot GGI driver

2000-01-28 Thread Cesar Crusius

* Andreas Beck ([EMAIL PROTECTED]) [000128 16:34]:

> Yes. Look at libwmh in the lib subdir. If you link the application with it
> and Initialize it and Attach the mwh-Extension to a visual, extra commands
> become available, like setting window titles on GGI visuals.

I'll take a look. But before...

> > Btw, the Octave ggiGetc problem persists... If someone wants the GGI driver
> > to test with it I can send it (its very simple).
> 
> That's not an easy thing to solve ...
> You might want to try setting GGI_NEWVT.

I tried GGI_NEWVT. But then when GGI allocates a console I can't switch back
with Alt-Fn (I actually had to reboot the computer!).

I modified the code to ggiGetc, ggiClose, and ggiExit every single time. It
sort of works:

* I get tons of messages like:
  display-fbdev: failed to open tty: device not configured
  L/vtswitch: open /dev/tty: Device not configured
  display-fbdev: Unable to open linux-kbd, trying stdin input.
  input-stdin: tcgetattr: Invalid argument.

Nevertheless the plot appears. But after ggiClose & ggiExit the original
text of the console is not restored properly (I get a mix of the old text
from octave and the plot that was there, a big mess). This happens in
Octave. In gnuplot, the text mode is restored properly but with a blank
console...

Its getting much more difficult than I thought...

Any clues? I would really like to get this done...

-- 
Cesar Augusto Rorato Crusius  o__ o__ o__ o__ o__
Stanford University   ,>/'_   ,>/'_   ,>/'_   ,>/'_   ,>/'_
e-mail:[EMAIL PROTECTED](_)\(_) (_)\(_) (_)\(_) (_)\(_) (_)\(_)
www.stanford.edu/~crusius

HE WHO SACRIFICES FUNCTIONALITY FOR EASE OF USE
LOSES BOTH AND DESERVES NEITHER



Re: Gnuplot GGI driver

2000-01-28 Thread Andreas Beck

> > > * How can I tell if I'm using the X11 device or not?
> If on console, I must wait for a key to release the console. If in a
> windowing system, I must not, since the plot will be in another window...
> And waiting for a key is giving problems on Octave.

I see.

> > There is a way of doing this using the wmh-extension, however it will 
> > basically tell you if you are running under a windowing system (of which
> > only X is supported yet).

> Is this a GGI thing? 

Yes. Look at libwmh in the lib subdir. If you link the application with it
and Initialize it and Attach the mwh-Extension to a visual, extra commands
become available, like setting window titles on GGI visuals.

There is a demo in there to show you how it is done.

> If not, it won't work because GNUplot is being compiled without any X 
> support, so *compiling* will fail... 

It is a GGI thing, so no worries. Just like the GGI target will basically
make the internal X support of gnuplot redundant.

It works by hooking into the dynamic loading mechanism of LibGGI. When it
sees the X renderer being loaded, it will load the X specific  override 
functions for the WMH functions as well, which will magically make them
work on X (or other windowed environments), but fail on others, which 
should be precisely what you want to know.

> I would like to be able to run in X even if in compile-time there were 
> no X-related stuff...

Sure. Should work.

> Btw, the Octave ggiGetc problem persists... If someone wants the GGI driver
> to test with it I can send it (its very simple).

That's not an easy thing to solve ...
You might want to try setting GGI_NEWVT.

CU, ANdy

-- 
= Andreas Beck|  Email :  <[EMAIL PROTECTED]> =



Re: Gnuplot GGI driver

2000-01-28 Thread Cesar Crusius

* [EMAIL PROTECTED] ([EMAIL PROTECTED]) [000128 03:06]:

> > * How can I get the resolution of the visual?
> 
> This one is simple: ggiGetMode():

Thanks! There was no man page for ggi_mode, but a brief look at types.h did
the trick.

> > * How can I tell if I'm using the X11 device or not?
> 
> Umm - usually you can't. Why do you want to know ?

If on console, I must wait for a key to release the console. If in a
windowing system, I must not, since the plot will be in another window...
And waiting for a key is giving problems on Octave.

> There is a way of doing this using the wmh-extension, however it will 
> basically tell you if you are running under a windowing system (of which
> only X is supported yet).

Is this a GGI thing? If not, it won't work because GNUplot is being compiled
without any X support, so *compiling* will fail... I would like to be able
to run in X even if in compile-time there were no X-related stuff...

Btw, the Octave ggiGetc problem persists... If someone wants the GGI driver
to test with it I can send it (its very simple).

-- 
Cesar Augusto Rorato Crusius  o__ o__ o__ o__ o__
Stanford University   ,>/'_   ,>/'_   ,>/'_   ,>/'_   ,>/'_
e-mail:[EMAIL PROTECTED](_)\(_) (_)\(_) (_)\(_) (_)\(_) (_)\(_)
www.stanford.edu/~crusius

HE WHO SACRIFICES FUNCTIONALITY FOR EASE OF USE
LOSES BOTH AND DESERVES NEITHER



Re: Gnuplot GGI driver

2000-01-28 Thread becka

Hi !

> Hi! I'm almost finished with a simple GGI driver for Gnuplot (which will
> make Octave work with GGI, which is what I want in the end). 

Cool.

> * How can I get the resolution of the visual?

This one is simple: ggiGetMode():

> * How can I tell if I'm using the X11 device or not?

Umm - usually you can't. Why do you want to know ?

There is a way of doing this using the wmh-extension, however it will 
basically tell you if you are running under a windowing system (of which
only X is supported yet).

Just call any wmh-function, and it will fail, if it cannot complete the 
request (say to set a window title), which effectively tells you, if you are
running in a windowed environment or not.

CU, ANdy

-- 
Andreas Beck  |  Email :  <[EMAIL PROTECTED]>



Gnuplot GGI driver

2000-01-27 Thread Cesar Crusius

Hi! I'm almost finished with a simple GGI driver for Gnuplot (which will
make Octave work with GGI, which is what I want in the end). I need some
info, however:

* How can I get the resolution of the visual?
* How can I tell if I'm using the X11 device or not?

Cheers,

-- 
Cesar Augusto Rorato Crusius  o__ o__ o__ o__ o__
Stanford University   ,>/'_   ,>/'_   ,>/'_   ,>/'_   ,>/'_
e-mail:[EMAIL PROTECTED](_)\(_) (_)\(_) (_)\(_) (_)\(_) (_)\(_)
www.stanford.edu/~crusius

HE WHO SACRIFICES FUNCTIONALITY FOR EASE OF USE
LOSES BOTH AND DESERVES NEITHER