www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Awesomium D wrappers/bindings

reply "evilrat" <evilrat666 gmail.com> writes:
Hello everyone,

i've just made first preview wrapper package for 
Awesomium(http://awesomium.com) library - closed source 
chromium(you know what is chrome browser are, right?) embededd 
framework, it's free for non-commercial projects and support all 
main OS(well, until last version...).


this could give one a possibility to make graphical user 
interfaces, both native and opengl/direct3d, with the power and 
flexibility(and memory hunger -_-) of HTML and JavaScript.
(of course when it would finished, or at least javascript 
handlers o_O)

i have started it mostly for myself to use with opengl, but i 
would appreciate any help, especially in testing and bug finding.

please keep in mind that it's very raw at this point, but i'm 
actively working on it.

you could get it from there http://code.google.com/p/aws-wrap/

i'll try to answer on any questions here on or mail.

with regards, evilrat.

p.s. i'm also has plans on CEF wrapper for commercial purposes

p.p.s how can i reset password for this forum, i can't remember 
it(same login as my nick/mail) :(
Dec 10 2012
next sibling parent David <d dav1d.de> writes:
I did it again, pressed answer instead of answer to Newsgroup...

От: David
Отправлено: ‎11‎ ‎декабря‎ ‎2012‎ г.
‎18‎:‎43
Кому: evilrat
Тема: Re: Awesomium D wrappers/bindings

Wow! I was thinking of doing that. I made CEF instead...

https://github.com/Dav1dde/cef

So Awesomium supports Linux? I thought it only supports Windows and Mac
(that's the reason I switched to CEF (which unfortunatly doesn't >support
off-screen rendering on Linux, but not because the developers want
money...))?

hi. unfortunately at this moment Awesomium doesn’t have Linux build, but I hope it would when they push final release(it’s still release candidate). and concerning CEF, from what I know it doesn’t have offscreen rendering(except CEF1 on Windows) due to fact that devs still can’t find way to get offscreen renderering with acceptable speed without relying on platform specific and/or vendor specific stuff. p.s. thanks for the link, I though no one has made CEF bindings, would check it later. ------------------ Afaik CEF supports off-screen rendering on Mac and Windows (CEF1) and on Windows (WIP) CEF3.
Dec 11 2012
prev sibling next sibling parent "Bernard Helyer" <b.helyer gmail.com> writes:
On Monday, 10 December 2012 at 08:27:03 UTC, evilrat wrote:
 Hello everyone,

 i've just made first preview wrapper package for 
 Awesomium(http://awesomium.com) library - closed source 
 chromium(you know what is chrome browser are, right?) embededd 
 framework, it's free for non-commercial projects and support 
 all main OS(well, until last version...).

Very cool!
 p.p.s how can i reset password for this forum, i can't remember 
 it(same login as my nick/mail) :(

I don't think you can (could be wrong), but these forums are just a wrapper over a newsgroup -- all the login does is save your settings, and save your read threads. So making a new one should be no problem.
Dec 11 2012
prev sibling next sibling parent reply "evilrat" <evilrat666 gmail.com> writes:
i've just updated source repo, some minor changes, first code 
released. still no xcode projects though, still have some mess in 
project and no docs. but as soon as i have time i will clean this 
up, also i think to add some opengl(and maybe awesomium sdl demo 
port) examples in next commit to draw some attention.

i wonder why no one interested in project? maybe thats just 
because awesomium is um... half dead(can't pick correct word)?
Dec 13 2012
next sibling parent reply David <d dav1d.de> writes:
Am 14.12.2012 06:15, schrieb evilrat:
 i wonder why no one interested in project? maybe thats just because
 awesomium is um... half dead(can't pick correct word)?

Because not a lot of people need this. I also wouldn't need it but I *want* it. Another reason is probably that a lot of the D users use Linux, which isn't supported by awesomium. Furthermore awesomium isn't Opensource, if I had the choice between a working awesomium and a working berkelium, I would choose latter, even if it's a bigger pain to use.
Dec 14 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
On Friday, 14 December 2012 at 10:42:25 UTC, David wrote:
 Am 14.12.2012 06:15, schrieb evilrat:
 i wonder why no one interested in project? maybe thats just 
 because
 awesomium is um... half dead(can't pick correct word)?

Because not a lot of people need this. I also wouldn't need it but I *want* it. Another reason is probably that a lot of the D users use Linux, which isn't supported by awesomium. Furthermore awesomium isn't Opensource, if I had the choice between a working awesomium and a working berkelium, I would choose latter, even if it's a bigger pain to use.

berkellium is at chrome version 8(11 on windows), current chrome version is 25, i've tried to just build up on version 23 but there is soooo much differences so i don't know where to start fixing stuff and where to find updated parts. unfortunately there is no offscreen renderer on linux currently, perphaps this is due to chrome itself(?). anyway, i'm too interested in truly free crossplatform offscreen browser renderer, perhaps i would (or at least try) to upgrade berkellium up to the latest chromium. well, my point is that even with all features D has that would help with UI programming, HTML+JS is both cheap(most?) and simple way to do modern UI, especially if target language don't have decent UI frameworks(no offense to gtkd, dwt and others, but they all mostly just a D wrapper rather than truly D ui), but thats just my opinion =3 and concerning open source vs closed source, i would prefer second if it allow free use when the first is GPL licensed. i hate viral licenses, hate hate hate... (well for the stuff like OS kernel it's fine, but for stuff such a simple small libraries thats a bad idea)
Dec 14 2012
parent reply David <d dav1d.de> writes:
Am 14.12.2012 13:15, schrieb evilrat:
 On Friday, 14 December 2012 at 10:42:25 UTC, David wrote:
 Am 14.12.2012 06:15, schrieb evilrat:
 i wonder why no one interested in project? maybe thats just because
 awesomium is um... half dead(can't pick correct word)?

Because not a lot of people need this. I also wouldn't need it but I *want* it. Another reason is probably that a lot of the D users use Linux, which isn't supported by awesomium. Furthermore awesomium isn't Opensource, if I had the choice between a working awesomium and a working berkelium, I would choose latter, even if it's a bigger pain to use.

berkellium is at chrome version 8(11 on windows), current chrome version is 25, i've tried to just build up on version 23 but there is soooo much differences so i don't know where to start fixing stuff and where to find updated parts.

Chrome 23 is completly different to chrome 8, so it's basically impossible.
 unfortunately there is no offscreen renderer on linux currently,
 perphaps this is due to chrome itself(?).

Should work (according to chromium ppl)
 anyway, i'm too interested in truly free crossplatform offscreen browser
 renderer, perhaps i would (or at least try) to upgrade berkellium up to
 the latest chromium.

That needs a rewrite of berkelium
 well, my point is that even with all features D has that would help with
 UI programming, HTML+JS is both cheap(most?) and simple way to do modern
 UI, especially if target language don't have decent UI frameworks(no
 offense to gtkd, dwt and others, but they all mostly just a D wrapper
 rather than truly D ui), but thats just my opinion =3

A lot of D users use Linux, which isn't supported by awesomium
 and concerning open source vs closed source, i would prefer second if it
 allow free use when the first is GPL licensed. i hate viral licenses,
 hate hate hate... (well for the stuff like OS kernel it's fine, but for
 stuff such a simple small libraries thats a bad idea)

Depends, if you have also a GPL project ...
Dec 14 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
On Friday, 14 December 2012 at 12:24:06 UTC, David wrote:
 A lot of D users use Linux, which isn't supported by awesomium

which debugger Linux users use? does gdb support D at least like visual studio(visual d)/mago? o_O just because when i tried debug simple program in xcode it was really pain and suffering, the whole OS X for D coding is painful :(
Dec 14 2012
next sibling parent reply David <d dav1d.de> writes:
Am 14.12.2012 13:52, schrieb evilrat:
 On Friday, 14 December 2012 at 12:24:06 UTC, David wrote:
 A lot of D users use Linux, which isn't supported by awesomium

which debugger Linux users use? does gdb support D at least like visual studio(visual d)/mago? o_O

I use gdb all the time! Just compile with -g and -gc. And iirc gdb supports D when compiled with gdc.
 just because when i tried debug simple program in xcode it was really
 pain and suffering, the whole OS X for D coding is painful :(

OS X, pfft.
Dec 14 2012
next sibling parent "evilrat" <evilrat666 gmail.com> writes:
On Friday, 14 December 2012 at 14:24:01 UTC, David wrote:
 I use gdb all the time! Just compile with -g and -gc. And iirc 
 gdb
 supports D when compiled with gdc.

okay, thanks. i'll check gdc then. with all negative to OS X this is a one of the major OS, and D should be available everywhere \O/
Dec 14 2012
prev sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
On 14 December 2012 14:24, David <d dav1d.de> wrote:

 Am 14.12.2012 13:52, schrieb evilrat:
 On Friday, 14 December 2012 at 12:24:06 UTC, David wrote:
 A lot of D users use Linux, which isn't supported by awesomium

which debugger Linux users use? does gdb support D at least like visual studio(visual d)/mago? o_O

I use gdb all the time! Just compile with -g and -gc. And iirc gdb supports D when compiled with gdc.

Aye, GDC is supported by the GNU debugger. D arrays and classes have special handling within the gdb code, along with all the pretty names (ubyte, ushort, uint, ulong). The rest of the debugging information exported is pretty much shown identical as you would see it if it were gcc/g++ had compiled it. Regards, -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';
Dec 14 2012
prev sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2012-12-14 13:52, evilrat wrote:

 just because when i tried debug simple program in xcode it was really
 pain and suffering, the whole OS X for D coding is painful :(

GDB shipped with Xcode is way to old, IIRC. -- /Jacob Carlborg
Dec 14 2012
parent "evilrat" <evilrat666 gmail.com> writes:
On Friday, 14 December 2012 at 14:39:55 UTC, Jacob Carlborg wrote:

 GDB shipped with Xcode is way to old, IIRC.

yes i know, but latest versions use lldb, though i don't used it with D yet.
Dec 14 2012
prev sibling next sibling parent reply =?UTF-8?B?U8O2bmtlIEx1ZHdpZw==?= <sludwig outerproduct.org> writes:
Am 14.12.2012 06:15, schrieb evilrat:
 i've just updated source repo, some minor changes, first code released. still
no xcode projects
 though, still have some mess in project and no docs. but as soon as i have
time i will clean this
 up, also i think to add some opengl(and maybe awesomium sdl demo port)
examples in next commit to
 draw some attention.
 
 i wonder why no one interested in project? maybe thats just because awesomium
is um... half
 dead(can't pick correct word)?

In principle I'm very interested, but the fact that it's closed source is not very appealing for such a component (no possibility to modify it when needed and a black box for possibly security critical uses). It also doesn't seem to be ported to the mobile platforms, which makes it an uncertain development target. My plan for sometime in the future when I really need it was basically to write/modify a back end directly for WebKit that uses my renderer/UI library as the target. But I'll definitely take a closer look at Awesomium once I get to that point.
Dec 14 2012
parent reply Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Fri, 14 Dec 2012 13:22:28 +0100
S=F6nke Ludwig <sludwig outerproduct.org> wrote:

 It also doesn't seem to be ported to the mobile platforms,
 which makes it an uncertain development target.
=20

Don't the mobile platforms provide web-view components anyway? Or does all the sandboxing on them prevent loading one up with a file:/// url?
Dec 14 2012
parent =?ISO-8859-1?Q?S=F6nke_Ludwig?= <sludwig outerproduct.org> writes:
Am 14.12.2012 17:50, schrieb Nick Sabalausky:
 On Fri, 14 Dec 2012 13:22:28 +0100
 Snke Ludwig <sludwig outerproduct.org> wrote:
 
 It also doesn't seem to be ported to the mobile platforms,
 which makes it an uncertain development target.

Don't the mobile platforms provide web-view components anyway? Or does all the sandboxing on them prevent loading one up with a file:/// url?

They do (Windows and Mac OS in fact do, too), but then you have to support multiple browser engines with different APIs. The level of control can also be quite limited (or cumbersome to achieve) for some applications. Having a single engine with the same behavior across all platforms would be nice to have. But the most important point (for me) is that the web-view controls do not support off-screen rendering, so you have to use the native UI framework, which further reduces the possible code reuse and flexibility.
Dec 14 2012
prev sibling parent reply "Kapps" <opantm2+spam gmail.com> writes:
On Friday, 14 December 2012 at 05:15:05 UTC, evilrat wrote:
 i've just updated source repo, some minor changes, first code 
 released. still no xcode projects though, still have some mess 
 in project and no docs. but as soon as i have time i will clean 
 this up, also i think to add some opengl(and maybe awesomium 
 sdl demo port) examples in next commit to draw some attention.

 i wonder why no one interested in project? maybe thats just 
 because awesomium is um... half dead(can't pick correct word)?

My biggest issue with using something like this would be the lack of Linux support, and the lack of source code available. From what I understand, your wrapper originally didn't have source code available, but now does? Personally, I'm not too concerned about Awesomium itself charging for the source code, but I would consider including any third party library that you don't have the source code for and isn't *very* well known in your code that you don't have the source for to be irresponsible. As for the Linux support, as far as I understand RC3 is expected have Linux support, and Awesomium itself does support Linux. Games like Heroes of Newerth and Overgrowth use it, and both of those support Linux. It seems like RC1 supported only Windows, RC2 Mac + Windows, and RC3 all three? I hadn't heard of Awesomium before your post, and it actually seems quite interesting. I was originally intending to make my own OpenGL UI library when I reached the point where my programs / game needed an actual UI, but something like this seems like it would be really nice. That being said, that's still a long ways away, so this is mostly future thoughts.
Dec 14 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
On Saturday, 15 December 2012 at 03:41:12 UTC, Kapps wrote:
 My biggest issue with using something like this would be the 
 lack of Linux support, and the lack of source code available. 
 From what I understand, your wrapper originally didn't have 
 source code available, but now does? Personally, I'm not too 
 concerned about Awesomium itself charging for the source code, 
 but I would consider including any third party library that you 
 don't have the source code for and isn't *very* well known in 
 your code that you don't have the source for to be 
 irresponsible.

 As for the Linux support, as far as I understand RC3 is 
 expected have Linux support, and Awesomium itself does support 
 Linux. Games like Heroes of Newerth and Overgrowth use it, and 
 both of those support Linux. It seems like RC1 supported only 
 Windows, RC2 Mac + Windows, and RC3 all three?

 I hadn't heard of Awesomium before your post, and it actually 
 seems quite interesting. I was originally intending to make my 
 own OpenGL UI library when I reached the point where my 
 programs / game needed an actual UI, but something like this 
 seems like it would be really nice. That being said, that's 
 still a long ways away, so this is mostly future thoughts.

awesomium has only 1.6.5 build for linux, it has their own C API so you could start with it right now. version 1.7 don't have linux build and public(!) C API(but it still in the shared libs), but maybe final release would have linux build again. also i've read somewhere that they give source by demand to licensees. i was thinking to do my own OpenGL UI too, but then i've done some tests with offscreen browsers and find this way more convinient, flexible and feature rich with a trade off just a little more memory usage, this is especially not a big price for a rich game ui. i pushed repo to hosting, but it's still too raw to use in non testing/learning apps. it has some flaws in memory management and string interop between D/C++. lack of documentation, code comments and examples would make incredibly hard to use it for anyone who don't know D and Awesomium. and that's what i'm gonna change once i had some free time. i think i can push commits every 2-3 days, and finish most of the job on winter holidays...
Dec 15 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
i have updated project description page, so now it should be 
clear how to build and use wrapper.

though i know it's still not the solution.
Dec 15 2012
parent reply David <d dav1d.de> writes:
Am 15.12.2012 15:45, schrieb evilrat:
 i have updated project description page, so now it should be clear how
 to build and use wrapper.
 
 though i know it's still not the solution.

I'd really like to try it :( But Windows, meh, only used for compilation.
Dec 15 2012
parent "evilrat" <evilrat666 gmail.com> writes:
On Saturday, 15 December 2012 at 18:48:27 UTC, David wrote:
 I'd really like to try it :(
 But Windows, meh, only used for compilation.

hmm. looks like i need to do 1.6 branch, so at least old version would be available on linux and everyone would happy again o_O p.s. thanks to all you guys, this discussion is really helps me with direction on what to fix or what to do.
Dec 15 2012
prev sibling parent reply David <d dav1d.de> writes:
Are you working on a "stable" port (1.6) by any chances?
Dec 24 2012
parent reply David <d dav1d.de> writes:
Am 25.12.2012 00:08, schrieb David:
 Are you working on a "stable" port (1.6) by any chances?
 

Oh wow, I just found out there is an capi, impressive. I never tried it because I thought there was no C-Api... Still any plans of making D bindings, otherwise I might do it.
Dec 24 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
On Monday, 24 December 2012 at 23:17:08 UTC, David wrote:
 Am 25.12.2012 00:08, schrieb David:
 Are you working on a "stable" port (1.6) by any chances?
 

Oh wow, I just found out there is an capi, impressive. I never tried it because I thought there was no C-Api... Still any plans of making D bindings, otherwise I might do it.

1.6 planned go in parallel with 1.7 when all(well, most) of it's(1.7) features would receive their first implementation. i'm already done with most of the webview callbacks stuff(though i don't tested it much), so the rest is the input passing and some support class interfaces, then i would have to do testing and documentation. so i'm think i start 1.6 branch this weekend. it also must be much simpler to do, because it has less features, and it has own C API, but it was designed to use for C++ compiler interop. i need take a look at 1.6 again, can't remember what it has and what's not, and what remains the same in 1.7
Dec 24 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
trying to get xcode project, all fine but i just can't do that 
damn dylib to work with awesomium.framework within another 
bundle. either is i am stupid or xcode is really pita to work 
with.

just losing time...
Dec 25 2012
parent reply David <d dav1d.de> writes:
Am 25.12.2012 13:43, schrieb evilrat:
 trying to get xcode project, all fine but i just can't do that damn
 dylib to work with awesomium.framework within another bundle. either is
 i am stupid or xcode is really pita to work with.
 
 just losing time...

I just compiled a awesomium 1.6.5 test app successfully, so let's get to D bindings!
Dec 25 2012
parent reply David <d dav1d.de> writes:
Am 25.12.2012 13:46, schrieb David:
 Am 25.12.2012 13:43, schrieb evilrat:
 trying to get xcode project, all fine but i just can't do that damn
 dylib to work with awesomium.framework within another bundle. either is
 i am stupid or xcode is really pita to work with.

 just losing time...

I just compiled a awesomium 1.6.5 test app successfully, so let's get to D bindings!

Here are the bindings: 0% tested https://github.com/Dav1dde/awesomium
Dec 25 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
On Tuesday, 25 December 2012 at 13:57:28 UTC, David wrote:
 Am 25.12.2012 13:46, schrieb David:
 Am 25.12.2012 13:43, schrieb evilrat:
 trying to get xcode project, all fine but i just can't do 
 that damn
 dylib to work with awesomium.framework within another bundle. 
 either is
 i am stupid or xcode is really pita to work with.

 just losing time...

I just compiled a awesomium 1.6.5 test app successfully, so let's get to D bindings!

Here are the bindings: 0% tested https://github.com/Dav1dde/awesomium

i've just created empty 1.6 branch, i'll join later this week.
Dec 25 2012
parent reply David <d dav1d.de> writes:
Am 25.12.2012 15:04, schrieb evilrat:
 On Tuesday, 25 December 2012 at 13:57:28 UTC, David wrote:
 Am 25.12.2012 13:46, schrieb David:
 Am 25.12.2012 13:43, schrieb evilrat:
 trying to get xcode project, all fine but i just can't do that damn
 dylib to work with awesomium.framework within another bundle. either is
 i am stupid or xcode is really pita to work with.

 just losing time...

I just compiled a awesomium 1.6.5 test app successfully, so let's get to D bindings!

Here are the bindings: 0% tested https://github.com/Dav1dde/awesomium

i've just created empty 1.6 branch, i'll join later this week.

Oh wow it works! ─[dav1d ArchBox][~/workspaces/d/awesomium_test]╼ dmd -I../awesomium -L-L. -L-lawesomium-1.6.5 short.d ─[dav1d ArchBox][~/workspaces/d/awesomium_test]╼ LD_LIBRARY_PATH=. ./short https://gist.github.com/4373754 that is amzing!
Dec 25 2012
next sibling parent reply "evilrat" <evilrat666 gmail.com> writes:
On Tuesday, 25 December 2012 at 15:35:02 UTC, David wrote:
 Oh wow it works!

 ─[dav1d ArchBox][~/workspaces/d/awesomium_test]╼ dmd 
 -I../awesomium
 -L-L. -L-lawesomium-1.6.5 short.d

 ─[dav1d ArchBox][~/workspaces/d/awesomium_test]╼ 
 LD_LIBRARY_PATH=. ./short


 https://gist.github.com/4373754

 that is amzing!

yeah cool, but we need a OOP wrapper too that mimics C++ API, thats what i'm going to do ;)
Dec 25 2012
parent reply David <d dav1d.de> writes:
Am 26.12.2012 02:27, schrieb evilrat:
 On Tuesday, 25 December 2012 at 15:35:02 UTC, David wrote:
 Oh wow it works!

 ─[dav1d ArchBox][~/workspaces/d/awesomium_test]╼ dmd -I../awesomium
 -L-L. -L-lawesomium-1.6.5 short.d

 ─[dav1d ArchBox][~/workspaces/d/awesomium_test]╼ LD_LIBRARY_PATH=.
 ./short


 https://gist.github.com/4373754

 that is amzing!

yeah cool, but we need a OOP wrapper too that mimics C++ API, thats what i'm going to do ;)

I started with an abstraction: https://github.com/Dav1dde/wonne Currently I've done only strings, I think I can add the rest today
Dec 27 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
On Thursday, 27 December 2012 at 13:16:33 UTC, David wrote:
 I started with an abstraction: https://github.com/Dav1dde/wonne

 Currently I've done only strings, I think I can add the rest 
 today

just to mention, last time i tried D wchar with awesomium wchar it was pure fail, but may be i've just a bit messed up somewhere
Dec 27 2012
parent reply David <d dav1d.de> writes:
Am 27.12.2012 15:30, schrieb evilrat:
 On Thursday, 27 December 2012 at 13:16:33 UTC, David wrote:
 I started with an abstraction: https://github.com/Dav1dde/wonne

 Currently I've done only strings, I think I can add the rest today

just to mention, last time i tried D wchar with awesomium wchar it was pure fail, but may be i've just a bit messed up somewhere

It works fine (at least injecting char events as wchar), probably you mixed up wchar_t and wchar16
Dec 27 2012
parent reply David <d dav1d.de> writes:
Webcore, done
Webview, done (except the callbacks)
Renderbuffer, done

And bindings are waiting to get into deimos:
https://github.com/D-Programming-Deimos/awesomium/pull/1
Dec 27 2012
next sibling parent "evilrat" <evilrat666 gmail.com> writes:
On Thursday, 27 December 2012 at 17:31:58 UTC, David wrote:
 Webcore, done
 Webview, done (except the callbacks)
 Renderbuffer, done

 And bindings are waiting to get into deimos:
 https://github.com/D-Programming-Deimos/awesomium/pull/1

will there be OOP wrapper in deimos? or deimos is purely for C header translation?
Dec 27 2012
prev sibling next sibling parent reply "evilrat" <evilrat666 gmail.com> writes:
On Thursday, 27 December 2012 at 17:31:58 UTC, David wrote:
 Webcore, done
 Webview, done (except the callbacks)
 Renderbuffer, done

 And bindings are waiting to get into deimos:
 https://github.com/D-Programming-Deimos/awesomium/pull/1

will there be OOP wrapper? or deimos is purely for C headers translation?
Dec 27 2012
parent Walter Bright <newshound2 digitalmars.com> writes:
On 12/27/2012 6:17 PM, evilrat wrote:
 will there be OOP wrapper? or deimos is purely for C headers translation?

Deimos is purely for C header translation.
Dec 27 2012
prev sibling parent reply "evilrat" <evilrat666 gmail.com> writes:
On Thursday, 27 December 2012 at 17:31:58 UTC, David wrote:
 Webcore, done
 Webview, done (except the callbacks)
 Renderbuffer, done

 And bindings are waiting to get into deimos:
 https://github.com/D-Programming-Deimos/awesomium/pull/1

will there be OOP wrapper? or deimos is purely for C header translation?
Dec 27 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
oh god. it was lagging this morning, sry for flood
Dec 27 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
i can't make that damn raw input spit out unicode chars, and by 
some reason awesomium internal func don't eat key codes too(well 
it eat, but no chars in input), this is the only problem left 
before wrapper become somehow useful...
Dec 28 2012
parent reply David <d dav1d.de> writes:
Am 29.12.2012 08:20, schrieb evilrat:
 i can't make that damn raw input spit out unicode chars, and by some
 reason awesomium internal func don't eat key codes too(well it eat, but
 no chars in input), this is the only problem left before wrapper become
 somehow useful...

Now that you say it, in my demo that also doesn't work, probably because of my ugly int -> dchar -> wchar casts
Dec 29 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
On Saturday, 29 December 2012 at 14:33:14 UTC, David wrote:
 Now that you say it, in my demo that also doesn't work, 
 probably because
 of my ugly int -> dchar -> wchar casts

i've debugged thru webflow demo, so they inject input 3 times in a row - keydown followed by keyup containing only virtual_keycode(awesomium code), key_scan_code and key text representation(taken from their getkey... func), the last one is char type input which contains all above but adds text and unmodified_text to event, so without full info it wont put text in browser...
Dec 29 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
doh.. now it inputs 2 char in a row, this is really stupid 
because i'm not sending anything but single char event
Dec 29 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
i hate myself sometimes. figured out what the stuck is wrong. it 
was my raw input problems.

so awesomium just need key down without text, and for text input 
one would need just set type and text fields.
Dec 29 2012
parent reply David <d dav1d.de> writes:
Am 30.12.2012 07:14, schrieb evilrat:
 i hate myself sometimes. figured out what the stuck is wrong. it was my
 raw input problems.
 
 so awesomium just need key down without text, and for text input one
 would need just set type and text fields.

And don't forget to set the wchar16 array to cast(wchar)0 otherwise it will display garbage (it needs a terminator)
Dec 30 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
i'm figured out why awesomium doesn't load on osx, they have 
wrong instruction on their wiki. i'll try to do D app project for 
xcode later.

i wish there be already existing template for this :(

On Sunday, 30 December 2012 at 10:41:22 UTC, David wrote:
 And don't forget to set the wchar16 array to cast(wchar)0 
 otherwise it
 will display garbage (it needs a terminator)

arrays initialized with nulls right? anyway just setting only first symbol in text field(it's wchar[4]) is enough.
Jan 01 2013
parent David <d dav1d.de> writes:
Am 02.01.2013 08:48, schrieb evilrat:
 arrays initialized with nulls right? anyway just setting only first
 symbol in text field(it's wchar[4]) is enough.
 

Not wchar arrays: import std.stdio; void main() { writefln("0x%x", wchar.init); } this prints: 0xffff
Jan 02 2013
prev sibling parent reply "evilrat" <evilrat666 gmail.com> writes:
On Tuesday, 25 December 2012 at 15:35:02 UTC, David wrote:
 Oh wow it works!

by the way, how do u launch this on linux(my system is ubuntu 12.10 x86)? i take my mom netbook and it doesn't work, almost same crap as on osx, missing shared libs, though it in the same folder. i don't build my own stuff or samples, just trying to get webflow demo working
Dec 25 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
On Wednesday, 26 December 2012 at 05:08:47 UTC, evilrat wrote:
 On Tuesday, 25 December 2012 at 15:35:02 UTC, David wrote:
 Oh wow it works!

by the way, how do u launch this on linux(my system is ubuntu 12.10 x86)? i take my mom netbook and it doesn't work, almost same crap as on osx, missing shared libs, though it in the same folder. i don't build my own stuff or samples, just trying to get webflow demo working

oops. sorry i'm just copy that awesomium conf and add local path to shared lib. it also by some reason requires libXss(screensaver X11 lib) but it works now. it's really fast, webflow forks cool even on old crappy atom 1.8ghz with 1gb ram \0/
Dec 25 2012
parent reply "dav1d" <d dav1d.de> writes:
On Wednesday, 26 December 2012 at 05:21:03 UTC, evilrat wrote:
 On Wednesday, 26 December 2012 at 05:08:47 UTC, evilrat wrote:
 On Tuesday, 25 December 2012 at 15:35:02 UTC, David wrote:
 Oh wow it works!

by the way, how do u launch this on linux(my system is ubuntu 12.10 x86)? i take my mom netbook and it doesn't work, almost same crap as on osx, missing shared libs, though it in the same folder. i don't build my own stuff or samples, just trying to get webflow demo working

oops. sorry i'm just copy that awesomium conf and add local path to shared lib. it also by some reason requires libXss(screensaver X11 lib) but it works now. it's really fast, webflow forks cool even on old crappy atom 1.8ghz with 1gb ram \0/

You need libjpg6 It is fast for you? I think I am doing something wrong, rendering a testpage (walterbright.com) takes quite a while, building an opengl demo now. Btw. OOP wrapper is planed if I get it working
Dec 26 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
On Wednesday, 26 December 2012 at 11:39:22 UTC, dav1d wrote:
 You need libjpg6

 It is fast for you? I think I am doing something wrong, 
 rendering a testpage (walterbright.com) takes quite a while, 
 building an opengl demo now.
 Btw. OOP wrapper is planed if I get it working

i think this libs shipped with system... webflow demo uses sdl(and so it's opengl). it works really fast, smooth scrolling and navigation, pages loads very fast, renderer draws about 40-60 fps i guess. just to mention, i have quite rare netbook with radeon hd3450, so perhaps this speed is reached with the help of the gpu. and, concerning bindings, do you want make it as your own project, or perhaps you may send me the patches so i'll add you to contributors list? of course everything should be MIT licensed so it will be usable to everyone, including commerce purposes where gpl is no go(if someone buys awesomium license and want use D as main language muahahah).
Dec 26 2012
parent reply David <d dav1d.de> writes:
Am 26.12.2012 13:01, schrieb evilrat:
 On Wednesday, 26 December 2012 at 11:39:22 UTC, dav1d wrote:
 You need libjpg6

 It is fast for you? I think I am doing something wrong, rendering a
 testpage (walterbright.com) takes quite a while, building an opengl
 demo now.
 Btw. OOP wrapper is planed if I get it working

i think this libs shipped with system...

Not e.g. with archlinux which has libjpeg7
 
 webflow demo uses sdl(and so it's opengl). it works really fast, smooth
 scrolling and navigation, pages loads very fast, renderer draws about
 40-60 fps i guess. just to mention, i have quite rare netbook with
 radeon hd3450, so perhaps this speed is reached with the help of the gpu.

Ah I meant loading a website initially, the webflow demo simply reuses the buffer.
 and, concerning bindings, do you want make it as your own project, or
 perhaps you may send me the patches so i'll add you to contributors
 list? of course everything should be MIT licensed so it will be usable
 to everyone, including commerce purposes where gpl is no go(if someone
 buys awesomium license and want use D as main language muahahah).

I want to send an inclusion request to deimos, if I find Walters e-mail
Dec 26 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
On Wednesday, 26 December 2012 at 13:39:20 UTC, David wrote:
 I want to send an inclusion request to deimos, if I find 
 Walters e-mail

his mail is something like "walter at digitalmars dt com", maybe u may find it on forums. but i doubt it will be useful as a just C header translation
Dec 26 2012
parent reply David <d dav1d.de> writes:
Am 26.12.2012 16:03, schrieb evilrat:
 On Wednesday, 26 December 2012 at 13:39:20 UTC, David wrote:
 I want to send an inclusion request to deimos, if I find Walters e-mail

his mail is something like "walter at digitalmars dt com", maybe u may find it on forums. but i doubt it will be useful as a just C header translation

I found it nospam1 walter it is, that's what deimos is for, C -> D translations
Dec 26 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
On Wednesday, 26 December 2012 at 15:06:32 UTC, David wrote:
 I found it nospam1 walter it is, that's what deimos is for, C 
 -> D
 translations

okay :( i was thinking it's for cool wrappers including OOP and not only. now i remember why i've done my own glext and gl translations after using deimos ...
Dec 26 2012
parent reply David <d dav1d.de> writes:
Am 26.12.2012 16:18, schrieb evilrat:
 On Wednesday, 26 December 2012 at 15:06:32 UTC, David wrote:
 I found it nospam1 walter it is, that's what deimos is for, C -> D
 translations

okay :( i was thinking it's for cool wrappers including OOP and not only. now i remember why i've done my own glext and gl translations after using deimos ...

I just found out that keyinput making useable for awesomium is a pain, you know a trick?
Dec 26 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
On Wednesday, 26 December 2012 at 15:21:08 UTC, David wrote:
 I just found out that keyinput making useable for awesomium is 
 a pain,
 you know a trick?

no. a most simple way is to do ctfe function or mixin or template to convert chars to awesomium key codes, but i think it may be not portable and would require own version for each platform, though i may be wrong. also awesomium 1.7 c++ api has function to do this "GetKeyIdentifierFromVirtualKeyCode", doesn't look to deep in 1.6 may be there is something similar
Dec 26 2012
parent reply David <d dav1d.de> writes:
Am 26.12.2012 16:31, schrieb evilrat:
 On Wednesday, 26 December 2012 at 15:21:08 UTC, David wrote:
 I just found out that keyinput making useable for awesomium is a pain,
 you know a trick?

no. a most simple way is to do ctfe function or mixin or template to convert chars to awesomium key codes, but i think it may be not portable and would require own version for each platform, though i may be wrong. also awesomium 1.7 c++ api has function to do this "GetKeyIdentifierFromVirtualKeyCode", doesn't look to deep in 1.6 may be there is something similar

There is the same but, there is no C counterpart and it does something different.
Dec 26 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
On Wednesday, 26 December 2012 at 15:35:56 UTC, David wrote:
 There is the same but, there is no C counterpart and it does 
 something
 different.

look at awesomiumgl demo, there is some example on using it. also it may worth looking at sdl(webflow) example, in webflow there is just simple mapping for this job but sdl provides crossplatform key codes unlike native system codes. and at last for C bindings it is possible to manually load one 1 c++ function.
Dec 26 2012
parent reply David <d dav1d.de> writes:
Am 26.12.2012 16:44, schrieb evilrat:
 On Wednesday, 26 December 2012 at 15:35:56 UTC, David wrote:
 There is the same but, there is no C counterpart and it does something
 different.

look at awesomiumgl demo, there is some example on using it. also it may worth looking at sdl(webflow) example, in webflow there is just simple mapping for this job but sdl provides crossplatform key codes unlike native system codes. and at last for C bindings it is possible to manually load one 1 c++ function.

The c++ function isn't even needed. And meh SDL, using GLFW, I know that I have to map the keys, I simply thought you maybe already did it or knew a trick.
Dec 26 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
On Wednesday, 26 December 2012 at 15:46:12 UTC, David wrote:
 The c++ function isn't even needed. And meh SDL, using GLFW, I 
 know that
 I have to map the keys, I simply thought you maybe already did 
 it or
 knew a trick.

not yet :( i've not finished callbacks stuff, then i would see if can find something. but i agree, glfw and sdl sucks, also glfw has redundant call(glclearcolor) each frame :) btw, may be u can try load that func for testing? should be not that hard, only finding mangled name is a bit problematic, but it's simple like this "nm awesomium.so | grep part_of_funcname"
Dec 26 2012
parent reply David <d dav1d.de> writes:
 but i agree, glfw and sdl sucks, 

No, only SDL sucks
 also glfw has redundant
 call(glclearcolor) each frame :)

That is not redundant, it's not the job of GLFW to do OpenGL stuff you're supposed to do
 btw, may be u can try load that func for testing? should be not that
 hard, only finding mangled name is a bit problematic, but it's simple
 like this "nm awesomium.so | grep part_of_funcname"

Got it working! (textinput and arrowkeys, didn't translate the others) http://imgur.com/a4d6f You don't need that func for the c-api (as it seems)
Dec 26 2012
parent reply "evilrat" <evilrat666 gmail.com> writes:
On Wednesday, 26 December 2012 at 16:14:11 UTC, David wrote:
 but i agree, glfw and sdl sucks,

No, only SDL sucks
 also glfw has redundant
 call(glclearcolor) each frame :)

That is not redundant, it's not the job of GLFW to do OpenGL stuff you're supposed to do

this is OT, but ... glfw does context creation, manages window and so on, it does same job as old glut does, but in drawing func callback it call glclearcolor each frame!(setting color to clear viewport), may be it is a bug or typo, but it is really bad - opengl is a state machine and constant switching one of the states(which also already has same value, unless user want to manually set this which is even more strange to call it) is bad for performance, anyway glfw is good for small samples and demos. and thanks for info about old c api.
Dec 26 2012
parent reply David <d dav1d.de> writes:
Am 27.12.2012 05:30, schrieb evilrat:
 On Wednesday, 26 December 2012 at 16:14:11 UTC, David wrote:
 but i agree, glfw and sdl sucks,

No, only SDL sucks
 also glfw has redundant
 call(glclearcolor) each frame :)

That is not redundant, it's not the job of GLFW to do OpenGL stuff you're supposed to do

this is OT, but ... glfw does context creation, manages window and so on, it does same job as old glut does, but in drawing func callback it call glclearcolor each frame!(setting color to clear viewport), may be it is a bug or typo, but it is really bad - opengl is a state machine and constant switching one of the states(which also already has same value, unless user want to manually set this which is even more strange to call it) is bad for performance, anyway glfw is good for small samples and demos.

There is no "drawing func callback", we are probably speaking of two different glfw version (even though I don't know of such a callback even in glfw 2.7)
 and thanks for info about old c api.

Dec 27 2012
parent "evilrat" <evilrat666 gmail.com> writes:
On Thursday, 27 December 2012 at 10:35:20 UTC, David wrote:
 There is no "drawing func callback", we are probably speaking 
 of two
 different glfw version (even though I don't know of such a 
 callback even
 in glfw 2.7)

well ok i must be forgot something, but i clearly remember that bug(or 'feature'?)
Dec 27 2012