www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - OSX Foundation framework D binding

reply Vadim Lopatin <coolreader.org gmail.com> writes:
Hello,

I'm working on native Cocoa backend for DlangUI GUI library under 
OSX.
Is there any ready to use bindings for easy accessing Cocoa API?
Probably, there is some HelloWorld program which creates window 
and draws something?


Best regards,
      Vadim
Nov 10 2015
parent reply Daniel Kozak via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> writes:
V Wed, 11 Nov 2015 06:17:00 +0000
Vadim Lopatin via Digitalmars-d-learn
<digitalmars-d-learn puremagic.com> napsáno:

 Hello,
 
 I'm working on native Cocoa backend for DlangUI GUI library under 
 OSX.
 Is there any ready to use bindings for easy accessing Cocoa API?
 Probably, there is some HelloWorld program which creates window 
 and draws something?
 
 
 Best regards,
       Vadim
I find only this one: http://code.dlang.org/packages/derelict-cocoa
Nov 11 2015
next sibling parent Vadim Lopatin <coolreader.org gmail.com> writes:
On Wednesday, 11 November 2015 at 09:29:47 UTC, Daniel Kozak 
wrote:
 V Wed, 11 Nov 2015 06:17:00 +0000
 Vadim Lopatin via Digitalmars-d-learn
 <digitalmars-d-learn puremagic.com> napsáno:

 Hello,
 
 I'm working on native Cocoa backend for DlangUI GUI library 
 under
 OSX.
 Is there any ready to use bindings for easy accessing Cocoa 
 API?
 Probably, there is some HelloWorld program which creates window
 and draws something?
 
 
 Best regards,
       Vadim
I find only this one: http://code.dlang.org/packages/derelict-cocoa
Me too. It looks promising. I'll try to use it.
Nov 11 2015
prev sibling next sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2015-11-11 10:29, Daniel Kozak via Digitalmars-d-learn wrote:

 I find only this one: http://code.dlang.org/packages/derelict-cocoa
I would recommend creating new bindings which use the new Objective-C interoperability feature that was added in the latest release (2.069.0). -- /Jacob Carlborg
Nov 11 2015
parent reply Jacob Carlborg <doob me.com> writes:
On 2015-11-11 17:02, Jacob Carlborg wrote:

 I would recommend creating new bindings which use the new Objective-C
 interoperability feature that was added in the latest release (2.069.0).
You could use DStep [1] to generate the bindings. It will generate bindings which are not completely compatible with what the compiler can handle. But it can be used as a base. [1] https://github.com/jacob-carlborg/dstep -- /Jacob Carlborg
Nov 11 2015
next sibling parent Vadim Lopatin <coolreader.org gmail.com> writes:
On Wednesday, 11 November 2015 at 16:04:44 UTC, Jacob Carlborg 
wrote:
 On 2015-11-11 17:02, Jacob Carlborg wrote:

 I would recommend creating new bindings which use the new 
 Objective-C
 interoperability feature that was added in the latest release 
 (2.069.0).
You could use DStep [1] to generate the bindings. It will generate bindings which are not completely compatible with what the compiler can handle. But it can be used as a base. [1] https://github.com/jacob-carlborg/dstep
That's interesting. Let me try. Thank you!
Nov 11 2015
prev sibling parent reply Vadim Lopatin <coolreader.org gmail.com> writes:
On Wednesday, 11 November 2015 at 16:04:44 UTC, Jacob Carlborg 
wrote:
 On 2015-11-11 17:02, Jacob Carlborg wrote:

 I would recommend creating new bindings which use the new 
 Objective-C
 interoperability feature that was added in the latest release 
 (2.069.0).
You could use DStep [1] to generate the bindings. It will generate bindings which are not completely compatible with what the compiler can handle. But it can be used as a base. [1] https://github.com/jacob-carlborg/dstep
Aren't there any ready set of translated and post-processed files for main OSX foundations in some repository? Could you point at it?
Nov 11 2015
next sibling parent Jeremy DeHaan <Dehaan.jeremiah gmail.com> writes:
On Thursday, 12 November 2015 at 05:50:09 UTC, Vadim Lopatin 
wrote:
 On Wednesday, 11 November 2015 at 16:04:44 UTC, Jacob Carlborg 
 wrote:
 On 2015-11-11 17:02, Jacob Carlborg wrote:

 I would recommend creating new bindings which use the new 
 Objective-C
 interoperability feature that was added in the latest release 
 (2.069.0).
You could use DStep [1] to generate the bindings. It will generate bindings which are not completely compatible with what the compiler can handle. But it can be used as a base. [1] https://github.com/jacob-carlborg/dstep
Aren't there any ready set of translated and post-processed files for main OSX foundations in some repository? Could you point at it?
That's doubtful. OS X interoperability is pretty new. If anyone has done any bindings like what you want I don't think they've announced it.
Nov 11 2015
prev sibling parent Jacob Carlborg <doob me.com> writes:
On 2015-11-12 06:50, Vadim Lopatin wrote:

 Aren't there any ready set of translated and post-processed files for
 main OSX foundations in some repository? Could you point at it?
I have these 6 years old bindings [1] which uses an old Objective-C bridge. Perhaps it's possible to do some search-and-replace to convert the bindings to use the new Objective-C support. There's the Dive Framework [2] as well. It uses a fork of the compiler which has all the Objective-C interoperability features that the upstream compiler will eventually have. [1] http://dsource.org/projects/dstep/browser/dstep [2] https://github.com/DiveFramework/DiveFramework -- /Jacob Carlborg
Nov 12 2015
prev sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2015-11-11 10:29, Daniel Kozak via Digitalmars-d-learn wrote:

 I find only this one: http://code.dlang.org/packages/derelict-cocoa
Also, there's no point in complicate the bindings by using function pointers like this. -- /Jacob Carlborg
Nov 11 2015
parent reply ponce <contact gamesfrommars.fr> writes:
On Wednesday, 11 November 2015 at 16:06:57 UTC, Jacob Carlborg 
wrote:
 On 2015-11-11 10:29, Daniel Kozak via Digitalmars-d-learn wrote:

 I find only this one: 
 http://code.dlang.org/packages/derelict-cocoa
Also, there's no point in complicate the bindings by using function pointers like this.
Opinion. I only ever got problems with bindings that aren't dynamic. For example that problem would not happen with dynamic loading. https://github.com/nomad-software/x11/issues/11
Nov 12 2015
parent Jacob Carlborg <doob me.com> writes:
On 2015-11-12 09:34, ponce wrote:

 Opinion.
 I only ever got problems with bindings that aren't dynamic.

 For example that problem would not happen with dynamic loading.
 https://github.com/nomad-software/x11/issues/11
I've never encountered that problem. -- /Jacob Carlborg
Nov 12 2015