GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - zhaozg/lui: libui bare bindings for lua

BranchesTags
Open more actions menu

Latest commit

 

History

44 Commits
44 Commits

Folders and files

NameName
Last commit message
Last commit date
deps
deps
 
 
examples
examples
 
 
src
src
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
test.lua
test.lua
 
 

Repository files navigation

lui, libui bare bindings for lua

libui bare bindings for luajit and lua 5.1/ 5.2/ 5.3.

This binding makes libui available to lua scripts. libui is easy binding and should usable from nearly any lua project.

Notice

  • Because lua is missing native threads support, so threads feature maybe lost.
  • Because libui/lui is not mature enough, you maybe encounter strange bugs.

Examples

Examples can be found in the examples folders, those are translate from examples.

Buliding

Checkout source

  git checkout  https://github.com/zhaozg/lui.git
  cd lui
  git submodule init
  git submodule update

Building on linux or macOS

  cd lui
  make install

Building on Windows

TODO

APIs

  • All top level functions are in the table returned by require
  ui = require'lui'  -- type(ui) is 'table'
  • All module level uiXXXX() functions are accessible as ui.XXXX(), they are include
    • Init
    • Uninit
    • Main
    • MainStep
    • MainSteps
    • timer
    • Quit
    • QueueMain
    • OnShouldQuit
    • OpenFile
    • SaveFile
    • MsgBox
    • MsgBoxError.
  assert(ui.Init())
  ui.Quit()
  ui.Uninit()
  • New objects are created with ui.NewXXX() or ui.DrawNewXXXX(), the are include
    • NewArea
    • NewButton
    • NewCheckbox
    • NewCombobox
    • NewColorButton
    • NewDateTimePicker
    • NewDatePicker
    • NewEditableCombobox
    • NewEntry
    • NewFontButton
    • NewForm
    • NewGrid
    • NewGroup
    • NewHorizontalBox
    • NewHorizontalSeparator
    • NewLabel
    • NewMenu
    • NewMultilineEntry
    • NewNonWrappingMultilineEntry
    • NewPasswordEntry
    • NewProgressBar
    • NewRadioButtons
    • NewSearchEntry
    • NewSlider
    • NewSpinbox
    • NewTimePicker
    • NewTab
    • NewVerticalBox
    • NewVerticalSeparator
    • NewWindow
    • DrawNewAreaHandler
    • DrawNewBrush
    • DrawNewPath
    • DrawNewMatrix
    • DrawNewStrokeParams
    • DrawNewTextLayout
    • DrawListFontFamilies (Special)
    • DrawLoadClosestFont (Special)
  wnd = ui.NewWindow(...) -- type(wnd) is userdata with metatable 'libui.Window'
  • All object perperties like uiTypeValue() and uiTypeSetValue() are accessible as obj:Value()
  entry:Padded(true)  -- just call uiEntrySetPadded(entry,1) and return object itself
  entry:Padded()      -- just call uiEntryPadded(entry) and return boolean type padded value
  • Object Append() methods take a variable number of arguments, allowing things
  `ui.NewRadioButtons():Append("One", "Two", "Three")
  • All object functions like uiTypeMethod() are accessible as obj:Method() calls
  wnd:Show()
  wnd:OnClosing(onclosing_cb)

You need read examples to be familiar with them.

Thanks

  • Ico Doornekamp lui basicly forked of libuilua but updated.
  • Pietro Gagliardi author of libui.

About

libui bare bindings for lua

Resources

Readme
License
Activity

Stars

38 stars

Watchers

4 watching

Forks

3 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.