comp.lang.ada
 help / color / mirror / Atom feed
* GtkAda on WinXP
@ 2005-05-05  1:33 Bart
  2005-05-05  2:05 ` Steve
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Bart @ 2005-05-05  1:33 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1247 bytes --]

Hello

Im trying to learn GtkAda on Windows, i need it for a school proyect with
graphic interface and it must be on Windows. I looked at the tutorial and
hello world and I understad all very well, but I realized that its
impossible to close the black window, "console" or whatever you wanna call
it. It�s useful for text "put"s when debugging, but its really ugly when the
program is done. I�ve seen some screenshots of GtkAda programs on linux and
they don�t have the console window, but I can�t find any shot from a Windows
machine. Even downloaded binaries (LinXtris) run with this irritating
windows.
 - Is there any way to call Gtk.Main.Main closing that console???
I�ve searched in google but there is no help about GtkAda, only the
"official" user guide
 - Am I a horrible searcher or is that the only help avalible?
I saw some other libraries like GWindows or GNATWin.
 - Do they allow to make only-graphic programs?

And maybe this may be kind of weird but, is it possible to do something like
C�s fork(); in ADA? I�ve thought that Gtk.Main could be ran from a "child
process"... I�ve been working much more time with C than with ADA, so i
still have ideas from C.

Thanks for reading and a lot more for any answers.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GtkAda on WinXP
  2005-05-05  1:33 GtkAda on WinXP Bart
@ 2005-05-05  2:05 ` Steve
  2005-05-05  7:29 ` Pascal Obry
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Steve @ 2005-05-05  2:05 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1936 bytes --]

To get rid of the console window either feed gnat the argument:
  -largs -mwindows

Or add the line:

  pragma Linker_Options( "-mwindows" );

To your source code.

The same is true for GWindows, although it may already have the 
Linker_Options pragma in the sources.

Regarding tasking, learn about Ada tasking.  Once you get used to it, it's 
really nice.  It's different from the "fork()" model of unix, and closer to 
the tasking model I have seen in a lot other operating systems over the 
years (only simpler and portable).

Steve
(The Duck)

"Bart" <bart.polot@gmail.com> wrote in message 
news:d5bt0c$8rj$1@news.ya.com...
> Hello
>
> Im trying to learn GtkAda on Windows, i need it for a school proyect with
> graphic interface and it must be on Windows. I looked at the tutorial and
> hello world and I understad all very well, but I realized that its
> impossible to close the black window, "console" or whatever you wanna call
> it. It�s useful for text "put"s when debugging, but its really ugly when 
> the
> program is done. I�ve seen some screenshots of GtkAda programs on linux 
> and
> they don�t have the console window, but I can�t find any shot from a 
> Windows
> machine. Even downloaded binaries (LinXtris) run with this irritating
> windows.
> - Is there any way to call Gtk.Main.Main closing that console???
> I�ve searched in google but there is no help about GtkAda, only the
> "official" user guide
> - Am I a horrible searcher or is that the only help avalible?
> I saw some other libraries like GWindows or GNATWin.
> - Do they allow to make only-graphic programs?
>
> And maybe this may be kind of weird but, is it possible to do something 
> like
> C�s fork(); in ADA? I�ve thought that Gtk.Main could be ran from a "child
> process"... I�ve been working much more time with C than with ADA, so i
> still have ideas from C.
>
> Thanks for reading and a lot more for any answers.
>
> 





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GtkAda on WinXP
  2005-05-05  1:33 GtkAda on WinXP Bart
  2005-05-05  2:05 ` Steve
@ 2005-05-05  7:29 ` Pascal Obry
  2005-05-05 12:19 ` Alex R. Mosteo
  2005-05-06 17:26 ` Björn Persson
  3 siblings, 0 replies; 5+ messages in thread
From: Pascal Obry @ 2005-05-05  7:29 UTC (permalink / raw)



"Bart" <bart.polot@gmail.com> writes:

> And maybe this may be kind of weird but, is it possible to do something like
> C�s fork(); in ADA? 

There is no fork() in C. fork() is an OS primitive and can be used in Ada as
it would be done from C. For that you just need to write the import prototype
which is quite simple for the fork() routine.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GtkAda on WinXP
  2005-05-05  1:33 GtkAda on WinXP Bart
  2005-05-05  2:05 ` Steve
  2005-05-05  7:29 ` Pascal Obry
@ 2005-05-05 12:19 ` Alex R. Mosteo
  2005-05-06 17:26 ` Björn Persson
  3 siblings, 0 replies; 5+ messages in thread
From: Alex R. Mosteo @ 2005-05-05 12:19 UTC (permalink / raw)


Bart wrote:
> (...)
> And maybe this may be kind of weird but, is it possible to do something like
> C�s fork(); in ADA? I�ve thought that Gtk.Main could be ran from a "child
> process"... I�ve been working much more time with C than with ADA, so i

Bear in mind that GtkAda for windows requires that all the Gtk calls be 
made from the same thread.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GtkAda on WinXP
  2005-05-05  1:33 GtkAda on WinXP Bart
                   ` (2 preceding siblings ...)
  2005-05-05 12:19 ` Alex R. Mosteo
@ 2005-05-06 17:26 ` Björn Persson
  3 siblings, 0 replies; 5+ messages in thread
From: Björn Persson @ 2005-05-06 17:26 UTC (permalink / raw)


Bart wrote:
> And maybe this may be kind of weird but, is it possible to do something like
> C�s fork(); in ADA? I�ve thought that Gtk.Main could be ran from a "child
> process"...

Not in XP. Fork is a Unix system call. Windows has a different way of 
starting new processes. (I've heard it doesn't have the concept of 
parent and child processes either.)

What you want is probably threads rather than separate processes, in 
which case you should use Ada tasks, as Steve said.

-- 
Bj�rn Persson                              PGP key A88682FD
                    omb jor ers @sv ge.
                    r o.b n.p son eri nu



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-05-06 17:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-05  1:33 GtkAda on WinXP Bart
2005-05-05  2:05 ` Steve
2005-05-05  7:29 ` Pascal Obry
2005-05-05 12:19 ` Alex R. Mosteo
2005-05-06 17:26 ` Björn Persson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox