4 Star 22 Fork 9

aochulai / GoMiniblink

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

GoMiniblink

介绍

Miniblink的免费版封装,官网:https://miniblink.net/

  1. 不使用CGO
  2. 面向对象
  3. 跨平台设计,但目前只有一个windows实现
  4. 组件和窗体两种模式
  5. JS互操作
  6. 监控与拦截请求
  7. 透明窗体
  8. 支持本地目录加载模式

Go封装的功能比较少,其实就是 https://gitee.com/aochulai/NetMiniblink 的简化版,因为我出Go封装的目标是VIP,所以免费版就懒得像NetMiniblink一样写得那么完善啦,不过VIP版会向NetMiniblink完整度看齐。

简单的例子

package main

import (
	gm "gitee.com/aochulai/GoMiniblink"
	cs "gitee.com/aochulai/GoMiniblink/forms/controls"
	ws "gitee.com/aochulai/GoMiniblink/forms/windows"
)

func main() {
    //windows版本初始化
    cs.App = new(ws.Provider).Init()
    
    //创建一个窗体并设置基本属性
    frm := new(cs.Form).Init()
    frm.SetTitle("普通窗口")
    frm.SetSize(800, 500)
	
    //创建浏览器控件并设置基本属性
    mb := new(gm.MiniblinkBrowser).Init()
    mb.SetSize(700, 400)
    
    //添加浏览器控件到窗体
    frm.AddChild(mb)
    //注册回调, EvLoad回调在窗体首次显示前触发
    frm.EvLoad["回调名称"] = func(s cs.GUI) {
        //加载网址
        mb.LoadUri("https://www.baidu.com")
    }
    //将frm作为主窗口打开
    cs.Run(frm)
}
MIT License Copyright (c) 2020 aochulai Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

基于Miniblink的GUI封装 展开 收起
Go
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Go
1
https://gitee.com/aochulai/GoMiniblink.git
git@gitee.com:aochulai/GoMiniblink.git
aochulai
GoMiniblink
GoMiniblink
master

搜索帮助

14c37bed 8189591 565d56ea 8189591