Native GTK2 D Bindings
bearophile
bearophileHUGS at lycos.com
Sun Jan 22 18:17:56 PST 2012
Artur Skawina:
> So far, a sample D GTK app looks like this:
>
> http://repo.or.cz/w/girtod.git/blob/refs/heads/master:/example_gtk3.d
>
> Anything I could change API-wise to improve things, that doesn't
> require language changes?
The convention for D classes/structs/enums is CamelCase, while functions and methods are the same but start with a lowercase.
This line of code seems an example for people that like named arguments in D:
gtk.init(null,null);
Such lines of code contains a bad cast:
set_title(cast(char*)"Hello World!");
but.signal_connect!"button-press-event"(&bpress_cb, cast(void*)label);
I think toStringz shouldn't return a const pointer:
str0 = cast(char*)toStringz(display_string);
Bye,
bearophile
More information about the Digitalmars-d-announce
mailing list