可以使用swig来移植GUI函数吗?

huangapple go评论78阅读模式
英文:

Possible to port gui functions with swig

问题

我想知道是否有可能将gtk gui框架与swig包装器一起移植到Go语言?还是我只是活在幻想世界里?

英文:

I was wondering if it would be possible to port the gtk gui framework to Go with the swig wrapper? Or am I just living in a fantasy world?

答案1

得分: 3

从技术上讲,是的。目前看来,SWIG对Go的支持有限。

简单的SWIG包装器的真正问题是丑陋的细节会泄露出来。生成的接口需要在其上面提供一个层,以提供“Goish”行为,特别是在垃圾回收和接口方面。

英文:

Technically, yes. It looks like SWIG support for Go is limited right now.

The real problem with simple SWIG wrappers is the ugly details leak through. The produced interface would need a layer on top of it in order to provide "Goish" behavior, especially in regards to garbage collection and interfaces.

答案2

得分: 3

是的,这是可能的。SWIG甚至并不是必需的,但它确实使过程更加自动化。

这里已经有一个正在进行中的Go的GTK绑定:
http://github.com/mattn/go-gtk

英文:

Yes, it's possible. SWIG isn't even strictly necessary, but it does make the process more automatic.

There's already a GTK binding for Go in progress here:
http://github.com/mattn/go-gtk

huangapple
  • 本文由 发表于 2010年10月28日 10:59:15
  • 转载请务必保留本文链接:https://go.coder-hub.com/4039419.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定