Code Monkey home page Code Monkey logo

gtkduilib's Introduction

gtkduilib

duilib向gtk的移植

编译

windows:

install [msys2](https://msys2.github.io/)
then install gtk3.0.x from msys2 shell
install codeblocks
open the workspace and build

linux (ubuntu):

sudo apt-get install codebloks libgtk3.0xxxx
open the workspace and build

Demo

大家可以看下demo.

player run in windows:

player_windows

player run in ubuntu:

player_ubuntu

360safe run in ubuntu:

360demo

和原版的duilib有啥不同

基本上兼容原版duilib的格式,主要有下面几种不同.

  1. 全部使用unicode, 便于移植, windows A/W很是闹心呀.
  2. 绘制字体使用pango的接口,没有保留原版的绘制接口.
  3. 好多LPCTSTR类型的参数使用const CUIString& 传递.
  4. 使用pugixml作为xml解析.
  5. 直接使用gdk-pixbuf加载图片

备注

  1. 做这个的目的其实是为了学习下gtk.duilib的框架很好,把windows消息机制移植到gtk的机制,控件代码基本上都不用改。
  2. gtk for windows的bug多多,建议还是在linux下弄
  3. gtk 在windows下是支持加载系统字体的,但是只支持english name, 大家写xml的时候注意下。
  4. 不喜勿喷, 谢谢 ^_^
  5. 欢迎pull request

TODO:

太多了。

  • 上传demo
  • 键盘事件
  • EDIT控件,树控件, webview
  • 移植原版demo
  • ...

gtkduilib's People

Contributors

progmboy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.