Description

Awesomium wrapper and WebView GUI library for D programming language.

Package Information

Version0.9.1 (2015-Oct-03)
Repositoryhttps://github.com/k3kaimu/awebview
LicenseNYSL
CopyrightCopyright © 2014, Kazuki Komatsu
AuthorsKazuki Komatsu
Registered byKazuki Komatsu
Dependencies

derelict-sdl2

pegged

msgpack-d

carbon

Installation

To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Readme

awebview

This is Awesomium wrapper and WebView GUI library for D programming language.

Features

full access Awesomium C++ OOP api.

You can build GUI from HTML templates.

For example...

~~~~~~~~~~~~~d // generate html page from topview.html auto topPage = new TemplateHTMLPage!(import(`topview.html))(Top`);

// generate html button from my_btn.html and create a JS global object named btn1. auto btn1 = new InputButton!(["class": "btn btn-xs btn-primary"])(btn1);

// DOM access. This code is translated to document.getElementById("btn1").value = ...; btn1["value"] = "Click me";

// handle onclick event size_t cnt; btn1.onClick.strongConnect((ctx, args){

++cnt;

btn1["value"] = format("cnt: %s", cnt);

});

topPage ~= btn1; ~~~~~~~~~~~~~~

~~~~~~~~~~~html <!-- views/top_view.html --> <!doctype html> <html lang="jp"> <head>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>TopView</title>

<link rel="stylesheet" href="views/bootstrap-3.3.2-dist/css/bootstrap.min.css">
<link rel="stylesheet" href="views/bootstrap-3.3.2-dist/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="views/font-awesome-4.3.0/css/font-awesome.min.css">
<link href="jquery-ui/jquery-ui.css", rel="stylesheet">

</head> <body>

%[elements["btn1"].html%]

<script src="views/jquery-ui/external/jquery/jquery.js"></script> <script src="views/jquery-ui/jquery-ui.js"></script> <script src="views/bootstrap-3.3.2-dist/js/bootstrap.min.js"></script> </body> </html> ~~~~~~~~~~~~~~~

Available versions

0.9.1 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.1 0.2.0 0.1.0 ~master