about summary refs log tree commit diff stats
path: root/src/lcurseslib.c
Commit message (Collapse)AuthorAgeFilesLines
* ohh, that word 'index' was keyKartik K. Agaram2021-11-051-0/+4
|
* oh, that's just a cosmetic thingKartik K. Agaram2021-11-051-0/+13
| | | | | | | | So why isn't this working? a = curses:stdscr() a:addstr(abc) The error is "attempt to index global 'a' (a userdata value)"
* copy metatable name from lcursesKartik K. Agaram2021-11-051-3/+3
| | | | | Makes no difference to the results of: print(curses:stdscr())
* snapshotKartik K. Agaram2021-11-051-2/+61
| | | | | | | | | Not quite working. curses.stdscr() is returning userdata, not a window. This is true even of the raw array example from the book. So we need to learn something new here. How does lcurses's Pinitscr return a special window object? From what I can tell it's just putting the results of lc_newwin() on the stack. Which is the same as my curses_newwin() here.
* stdscr bindingKartik K. Agaram2021-11-051-0/+12
| | | | | print(curses.stdscr()) print(curses:stdscr())
* starting on curses libraryKartik K. Agaram2021-11-051-0/+40
First piece of working new vocabulary: print(curses:cols()) Just pulling in code from lcurses for the most part. But I'm trying to understand its internals as I gradually add them in, after my more blunt first approach of packaging up lcurses/ext failed. Overall plan for Teliva's API: - start out with a 'curses' library that does what people who are used to ncurses/lcurses expect. - over time create a more opinionated library called 'screen' or 'window' or something.