Giter VIP home page Giter VIP logo

bodge-nuklear's Introduction

Build Status Build status

BODGE-NUKLEAR

Thin wrapper over Nuklear immediate mode GUI library. For rich lispified system based on this wrapper have a look at bodge-ui-window and bodge-ui.

Requirements

  • ASDF/Quicklisp
  • x86_64/i686 GNU/Linux, macOS or Windows

Loading

(ql:quickload '(nuklear-blob bodge-nuklear))

Usage

Interface

All wrapped functions can be found in %nk package. On the other hand, nk package contains minimally lispified wrappers and utility functions.

Example

Example on how to use nuklear and a native renderer can be found in example.lisp. See #'compose-nuklear function.

To run it, evaluate in your REPL:

(ql:quickload :bodge-nuklear/example)
(nuklear.example:run)

bodge-nuklear's People

Contributors

borodust avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bodge-nuklear's Issues

bugged input in nk-textedit-buffer in :editor mode

When nk_text_edit has the editor mode set to :editor (but not in :box or :simple), it does not receive input unless first focusing an nk_text_edit* (e.g. nk-textedit-buffer or nk-text-edit-string-zero-terminated and such) with :simple edit type (:box probably also works) and then focusing back to the input.
This is the same bug reported in 2017 upstream by borodust, but upstream claimed that this bug was fixed quickly thereafter.

  • Are the libraries compiled from up-to-date sources? (probably, I tried compiling from master in the submodule and did not find any difference -- though I note the upstream in the submodule is not up to date and is locked to the 2019 version of Nuklear, as the repository has moved after that point in time)
  • Are the interfaces generated with up-to-date sources (and does that matter)?
  • Is this an upstream issue?

nk_text_calculate_text_bounds is not available

Hi, I've been making good progress using your nuklear library, but I noticed the utility method nk_text_calculate_text_bounds is not currently exported. It also doesn't seem to be in your blob:

nm -g x86_64/libnuklear.so.bodged | grep calculate

(no results).

It's not mentioned in the src/spec/* files either and I'm not sure how those are populated.

Would it be possible to add this utility? It's very nice for computing how much space a string of text will take on screen.

No input in the example

Input does not seem to be processed when running the example. Other programs using bodge-ui/bodge-ui-window work fine on the same system. I'm not too sure where the difference lies.

The alien function "__claw_cE3AE40FE40nk_color_picker" is undefined.

When I work with cloned repo i have following error when press background combobox.

The alien function "__claw_cE3AE40FE40nk_color_picker" is undefined.
   [Condition of type SB-KERNEL::UNDEFINED-ALIEN-FUNCTION-ERROR]

Restarts:
 0: [ABORT] abort thread (#<THREAD "Anonymous thread" RUNNING {1006458113}>)

Backtrace:
  0: ("undefined function")
  1: (NUKLEAR.EXAMPLE::RENDER #<NUKLEAR.EXAMPLE::NUKLEAR-APP {1002930643}>)
  2: ((FLET NUKLEAR.EXAMPLE::%RENDER :IN BODGE-HOST:ON-INIT))
  3: ((LAMBDA NIL :IN BORDEAUX-THREADS::BINDING-DEFAULT-SPECIALS))
  4: ((FLET SB-UNIX::BODY :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE))
  5: ((FLET "WITHOUT-INTERRUPTS-BODY-4" :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE))
  6: ((FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE))
  7: ((FLET "WITHOUT-INTERRUPTS-BODY-1" :IN SB-THREAD::CALL-WITH-MUTEX))
  8: (SB-THREAD::CALL-WITH-MUTEX #<CLOSURE (FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE) {7F76DAA4ED8B}> #<SB-THREAD:MUTEX "thread result lock" owner: #<SB-THREAD:THR..
  9: (SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE #<SB-THREAD:THREAD "Anonymous thread" RUNNING {1006458113}> NIL #<CLOSURE (LAMBDA NIL :IN BORDEAUX-THREADS::BINDING-DEFAULT-SPECIALS) {10064580BB}> NIL)
 10: ("foreign function: call_into_lisp")
 11: ("foreign function: new_thread_trampoline")
 --more--

If i delete cloned repo from quicklisp project folder and do (ql:quickload :bodge-nuklear/example) color picker works.

Package %NK not found on Mac OS X

bodge-nuklear does not load on my computer with the latest Mac OS, SBCL, CCL, Quicklisp & org.borodust.bodge dist, and with Mac OS X 10.11 on another computer. It loads without any problems on Arch Linux.

The displayed error is Package %NK does not exist. on SBCL and Error: There is no package named "%NK" on CCL64.

Failed to create GLFW window

Hi! I am trying to run the example

(ql:quickload :bodge-nuklear/example)
(nuklear.example:run)

but I get this error:

This is SBCL 2.0.3, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
* (ql:quickload :bodge-nuklear/example)
To load "bodge-nuklear/example":
  Load 1 ASDF system:
    bodge-nuklear/example
; Loading "bodge-nuklear/example"
.........
(:BODGE-NUKLEAR/EXAMPLE)
* (nuklear.example:run)
Unhandled error:
Failed to create GLFW window
debugger invoked on a SIMPLE-CONDITION in thread
#<THREAD "main thread" RUNNING {1000508083}>:
  Failed to create GLFW window

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE] Return from BREAK.
  1: [STOP    ] Stop the task.
  2: [ABORT   ] Abort the task.
  3: [UNBLOCK ] Leave the task running and unblock this thread.
  4:            Exit debugger, returning to top level.

(CLUTZ::MAIN #<NUKLEAR.EXAMPLE::NUKLEAR-APP {1004F8D253}>)
   source: (ERROR "Failed to create GLFW window")
0]

Interestingly enough, running the bodge-glfw example

(ql:quickload :bodge-glfw/example)
(glfw.example:run)

works just fine (opens an empty hello world window).

Here are the versions of both bodge-glfw and bodge-nuklear, as found in ~/quicklisp:

./dists/quicklisp/software/bodge-glfw-stable-7519a922-git
./dists/quicklisp/software/bodge-nuklear-stable-16f52766-git

I am running on Arch Linux.

What could be the problem here?

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.