Re: Cairo Deimos bindings

2012-04-27 Thread Dejan Lekic
James Miller wrote: I am currently writing D bindings for Cairo for submission into Deimos, could somebody please make the repository so I can fork it? Thanks -- James Miller Is it a binding, or a wrapper?

Re: Cairo Deimos bindings

2012-04-27 Thread James Miller
On Friday, 27 April 2012 at 09:50:21 UTC, Dejan Lekic wrote: James Miller wrote: I am currently writing D bindings for Cairo for submission into Deimos, could somebody please make the repository so I can fork it? Thanks -- James Miller Is it a binding, or a wrapper? It is a binding.

Re: Cairo Deimos bindings

2012-04-27 Thread David Nadlinger
On Friday, 27 April 2012 at 11:09:41 UTC, James Miller wrote: It is a binding. There are some very minor cosmetic changes that will be detailed, but otherwise you can just copy-paste a C example into D, make it D-compatible and it will work as intended. It depends on how minor the changes

Re: Cairo Deimos bindings

2012-04-27 Thread Marco Leise
Am Fri, 27 Apr 2012 13:26:49 +0200 schrieb David Nadlinger s...@klickverbot.at: On Friday, 27 April 2012 at 11:09:41 UTC, James Miller wrote: It is a binding. There are some very minor cosmetic changes that will be detailed, but otherwise you can just copy-paste a C example into D, make it

Re: Cairo Deimos bindings

2012-04-27 Thread Andrej Mitrovic
On 4/27/12, Marco Leise marco.le...@gmx.de wrote: In C: STATUS_SUCCESS In D unmodified: cairo_status_t.STATUS_SUCCESS In D with cosmetic changes: cairo_status_t.SUCCESS cairo_status_t.SUCCESS is like going halfway there but stopping. It looks rather ugly imo. I think you either want the

Re: Cairo Deimos bindings

2012-04-27 Thread James Miller
On Friday, 27 April 2012 at 20:49:54 UTC, Andrej Mitrovic wrote: On 4/27/12, Marco Leise marco.le...@gmx.de wrote: In C: STATUS_SUCCESS In D unmodified: cairo_status_t.STATUS_SUCCESS In D with cosmetic changes: cairo_status_t.SUCCESS cairo_status_t.SUCCESS is like going halfway there but

Cairo Deimos bindings

2012-04-26 Thread James Miller
I am currently writing D bindings for Cairo for submission into Deimos, could somebody please make the repository so I can fork it? Thanks -- James Miller

Re: Cairo Deimos bindings

2012-04-26 Thread Johannes Pfau
Am Thu, 26 Apr 2012 10:28:52 +0200 schrieb James Miller ja...@aatch.net: I am currently writing D bindings for Cairo for submission into Deimos, could somebody please make the repository so I can fork it? Thanks -- James Miller Sounds like you already finished most of the bindings,

Re: Cairo Deimos bindings

2012-04-26 Thread Andrej Mitrovic
Is there really a need to write it manually? All I had to do to use the C library directly is call HTOD on the headers. Otherwise I use CairoD. On 4/26/12, Johannes Pfau nos...@example.com wrote: Am Thu, 26 Apr 2012 10:28:52 +0200 schrieb James Miller ja...@aatch.net: I am currently writing D

Re: Cairo Deimos bindings

2012-04-26 Thread Andrej Mitrovic
On 4/26/12, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: Is there really a need to write it manually? All I had to do to use the C library directly is call HTOD on the headers. Otherwise I use CairoD. Sorry for the wrong quote and text above quote, it was meant for OP.

Re: Cairo Deimos bindings

2012-04-26 Thread David Nadlinger
On Thursday, 26 April 2012 at 18:15:49 UTC, Andrej Mitrovic wrote: Is there really a need to write it manually? All I had to do to use the C library directly is call HTOD on the headers. Otherwise I use CairoD. I'd say that usable htod generated headers still are a welcome addition to

Re: Cairo Deimos bindings

2012-04-26 Thread Andrej Mitrovic
On 4/26/12, David Nadlinger s...@klickverbot.at wrote: On Thursday, 26 April 2012 at 18:15:49 UTC, Andrej Mitrovic wrote: Is there really a need to write it manually? All I had to do to use the C library directly is call HTOD on the headers. Otherwise I use CairoD. I'd say that usable htod

Re: Cairo Deimos bindings

2012-04-26 Thread James Miller
On Thursday, 26 April 2012 at 18:20:01 UTC, David Nadlinger wrote: On Thursday, 26 April 2012 at 18:15:49 UTC, Andrej Mitrovic wrote: Is there really a need to write it manually? All I had to do to use the C library directly is call HTOD on the headers. Otherwise I use CairoD. I'd say that

Re: Cairo Deimos bindings

2012-04-26 Thread Trass3r
I'd say that usable htod generated headers still are a welcome addition to Deimos. David Even using some regex's is better than htod. It drops const, removes or messes up the comments etc.

Re: Cairo Deimos bindings

2012-04-26 Thread James Miller
On Thursday, 26 April 2012 at 22:45:01 UTC, Trass3r wrote: I'd say that usable htod generated headers still are a welcome addition to Deimos. David Even using some regex's is better than htod. It drops const, removes or messes up the comments etc. There are also many things that should be

Re: Cairo Deimos bindings

2012-04-26 Thread Trass3r
enums cause issues because the C enum: enum Status { STATUS_SUCCESS } has type enum Status and the members are access like STATUS_SUCCESS. The same enum in D is enum Status { STATUS_SUCCESS } has type Status and the members are accessed using

Re: Cairo Deimos bindings

2012-04-26 Thread James Miller
On Thursday, 26 April 2012 at 23:28:19 UTC, Trass3r wrote: enums cause issues because the C enum: enum Status { STATUS_SUCCESS } has type enum Status and the members are access like STATUS_SUCCESS. The same enum in D is enum Status { STATUS_SUCCESS } has type Status

Re: Cairo Deimos bindings

2012-04-26 Thread Andrej Mitrovic
On 4/27/12, Trass3r u...@known.com wrote: //! bring named enum members into current scope string flattenNamedEnum(EnumType)() if (is (EnumType == enum)) { string s = ; foreach (i, e; __traits(allMembers, EnumType)) { s ~= alias ~ EnumType.stringof ~ . ~

Re: Cairo Deimos bindings

2012-04-26 Thread Walter Bright
On 4/26/2012 1:28 AM, James Miller wrote: I am currently writing D bindings for Cairo for submission into Deimos, could somebody please make the repository so I can fork it? I need: library file name description home page url for the library

Re: Cairo Deimos bindings

2012-04-26 Thread James Miller
On Friday, 27 April 2012 at 01:45:20 UTC, Walter Bright wrote: On 4/26/2012 1:28 AM, James Miller wrote: I am currently writing D bindings for Cairo for submission into Deimos, could somebody please make the repository so I can fork it? I need: library file name cairo (that is it)

Re: Cairo Deimos bindings

2012-04-26 Thread Walter Bright
On 4/26/2012 7:02 PM, James Miller wrote: On Friday, 27 April 2012 at 01:45:20 UTC, Walter Bright wrote: On 4/26/2012 1:28 AM, James Miller wrote: I am currently writing D bindings for Cairo for submission into Deimos, could somebody please make the repository so I can fork it? I need: