Sign up

How to use GTKD?

How does GTKD relate to GTK? How do I know where I can find a GTK function in GTKD, and how to call it?

Re: How to use GTKD?

On 03/23/2014 12:49 PM, Jeroen Bollen wrote:

How does GTKD relate to GTK? How do I know where I can find a GTK function in GTKD, and how to call it?

For functions part of the name is used for the package and module name
and the rest of the function name is turned into camelCase instead of
the underscores.

for example:
gtkwindowset_title
is:
gtk.Window.Window.setTitle

The _new function used the construct the object in Gtk+ are turned into
cunstructors:

gtkwindownew();
is:
new Window();

For enums first part of the menbers that is common between them is stripped:

So:
GTKWINDOWTOPLEVEL
is:
GtkWindowType.TOPLEVEL
in GtkD there is also an alias in place so you can use WindowType
instead of GtkWindowType

Re: How to use GTKD?

On Sun, 23 Mar 2014 15:10:38 +0100, Mike Wey wrote:

On 03/23/2014 12:49 PM, Jeroen Bollen wrote:

How does GTKD relate to GTK? How do I know where I can find a GTK function in GTKD, and how to call it?

For functions part of the name is used for the package and module name
and the rest of the function name is turned into camelCase instead of
the underscores.

for example:
gtkwindowset_title
is:
gtk.Window.Window.setTitle

The _new function used the construct the object in Gtk+ are turned into
cunstructors:

gtkwindownew();
is:
new Window();

For enums first part of the menbers that is common between them is stripped:

So:
GTKWINDOWTOPLEVEL
is:
GtkWindowType.TOPLEVEL
in GtkD there is also an alias in place so you can use WindowType
instead of GtkWindowType

Cheers