Git Product home page Git Product logo

libui-euphoria's Introduction

libui-euphoria

libui bindings for Euphoria

Status

  • Wrapper code is complete; new features will be added as they arrive in libui.
  • Testing is incomplete. More examples are welcome.

This wrapper should be stable but keep in mind that libui is still in alpha status.

History

February 22, 2018

  • Added DEBUG output to define_c_func/proc
  • Added uiControlVerifySetParent()
  • Added uiControlEnabledToUser()
  • Added uiUserBugCannotSetParentOnToplevel()
  • Added blurb about position routines to comments
  • Added test for -1 in event handler assignment
  • Removed missing uiDraw functions

December 9, 2016

  • Added new position functions
  • Added more uiDrawBrush functions
  • Removed old position functions

June 17, 2016

  • Added uiFormDelete()
  • Added uiProgressBarValue()
  • Added uiMainSteps()
  • Added uiNewVerticalSeparator()
  • Added window position functions
  • Added window borderless functions
  • Added window fullscreen functions
  • Added Window content size functions

June 13, 2016

  • Added more examples
  • Wrapped uiGrid control
  • Changed call_back() lines to use CDECL
  • Fixed memory allocation in uiDrawTextLayoutExtents

June 9, 2016

  • Wrapped more draw functions
  • Wrapped new uiForm control

June 8, 2016

  • Wrapped more draw functions

June 7, 2016

  • Wrapped more controls
  • Wrapped draw functions
  • Changed string functions to call uiFreeText()
  • Completed controlgallery.ex example

June 6, 2016

  • Initial commit
  • Wrapped most controls
  • Created controlgallery.ex example

Notes

Wrapper Style

A keen observer might notice the seemingly unorthodox C wrapper code used in ui.e. What I've done here, is use a map to provide string lookups for function names instead of using constants. This is an experiment in providing a cleaner C library wrapper. The calls to define_c_func/proc look a lot more like attributes used in C# or VB.NET. I have not compared this method to using constants, so I'm not sure if or by how much this might be slower.

Original Code

constant _uiNewWindow = define_c_func( libui, "uiNewWindow", {C_POINTER,C_INT,C_INT,C_INT}, C_POINTER )
public function uiNewWindow( sequence title, atom width, atom height, atom hasMenubar )
    return c_func( _uiNewWindow, {allocate_string(title,1),width,height,hasMenubar} )
end function

Wrapper Code

define_c_func( libui, "uiNewWindow", {C_POINTER,C_INT,C_INT,C_INT}, C_POINTER )
public function uiNewWindow( sequence title, atom width, atom height, atom hasMenubar )
    return c_func( "uiNewWindow", {allocate_string(title,1),width,height,hasMenubar} )
end function

libui-euphoria's People

Contributors

ghaberek avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

mitgd-learning

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.