View mode: basic / threaded / horizontal-split · Log in · Help
January 15, 2008
gtkd examples
Does anyone know where I can find code samples that use gtkd?
Or better yet. Can anyone describe the naming conventions used in gtkd, so that I can use existing gtk documentation. I.E. can anyone tell me how gtk function names map onto gtkd function names. Also, can anyone tell me how gtk function parameters map onto gtkd function parameters. Any help will be appreciated.
January 15, 2008
Re: gtkd examples
llee wrote:
> Does anyone know where I can find code samples that use gtkd? 
Leds is probably the biggest example.
http://www.dsource.org/projects/leds/browser/trunk/src/leds

Or
> better yet. Can anyone describe the naming conventions used in gtkd,
> so that I can use existing gtk documentation. 

GtkWidget* w = gtk_widget_new(...)    =>   Widget x = new Widget(....);
gtk_widget_do_something(w, ...)        => x.doSomething(......)

This is the candydoc for it.
http://devel.akbkhome.com/gtkd_docs/src/gtk/GtkD.html

you should be able to get them to build with the makedocs.sh in the gtkd 
distribution - although it's a bit klunky...

I.E. can anyone tell me
> how gtk function names map onto gtkd function names. Also, can anyone
> tell me how gtk function parameters map onto gtkd function
> parameters. Any help will be appreciated.

Basically the first parameter to most gtk methods is the object, which 
is normally removed, and the remaining arguments are used as the object 
method arguments.

Regards
Alan
January 15, 2008
Re: gtkd examples
Alan Knowles Wrote:

> llee wrote:
> > Does anyone know where I can find code samples that use gtkd? 
> Leds is probably the biggest example.
> http://www.dsource.org/projects/leds/browser/trunk/src/leds
> 
> Or
> > better yet. Can anyone describe the naming conventions used in gtkd,
> > so that I can use existing gtk documentation. 
> 
> GtkWidget* w = gtk_widget_new(...)    =>   Widget x = new Widget(....);
> gtk_widget_do_something(w, ...)        => x.doSomething(......)
> 
> This is the candydoc for it.
> http://devel.akbkhome.com/gtkd_docs/src/gtk/GtkD.html
> 
> you should be able to get them to build with the makedocs.sh in the gtkd 
> distribution - although it's a bit klunky...
> 
> I.E. can anyone tell me
> > how gtk function names map onto gtkd function names. Also, can anyone
> > tell me how gtk function parameters map onto gtkd function
> > parameters. Any help will be appreciated.
> 
> Basically the first parameter to most gtk methods is the object, which 
> is normally removed, and the remaining arguments are used as the object 
> method arguments.
> 
> Regards
> Alan

Or you can use the out-dated (yet still relevant) DUI ClassList:

http://dui.sourceforge.net/ClassList.html
January 16, 2008
Re: gtkd examples
On Mon, 14 Jan 2008 22:16:08 -0500, llee wrote:

> Does anyone know where I can find code samples that use gtkd? Or better
> yet. Can anyone describe the naming conventions used in gtkd, so that I
> can use existing gtk documentation. I.E. can anyone tell me how gtk
> function names map onto gtkd function names. Also, can anyone tell me
> how gtk function parameters map onto gtkd function parameters. Any help
> will be appreciated.

It might sound a bit odd, but I found that the C# documentation of gtk 
was almost identical to gtkD, and I've used numerous C# examples in my 
code with little to no change at all in the syntax.
Perhaps you could get some good code examples googling around for gtk-
sharp.
January 20, 2008
Re: gtkd examples
Jarrod Wrote:

> On Mon, 14 Jan 2008 22:16:08 -0500, llee wrote:
> 
> > Does anyone know where I can find code samples that use gtkd? Or better
> > yet. Can anyone describe the naming conventions used in gtkd, so that I
> > can use existing gtk documentation. I.E. can anyone tell me how gtk
> > function names map onto gtkd function names. Also, can anyone tell me
> > how gtk function parameters map onto gtkd function parameters. Any help
> > will be appreciated.
> 
> It might sound a bit odd, but I found that the C# documentation of gtk 
> was almost identical to gtkD, and I've used numerous C# examples in my 
> code with little to no change at all in the syntax.
> Perhaps you could get some good code examples googling around for gtk-
> sharp.


Thanks a lot. This should get me started.
Top | Discussion index | About this forum | D home