Commit Graph

224 Commits

Author SHA1 Message Date
Kevin Lange
3a62d779f0 Include a working implementation of wcwidth()
Terminal and Bim both use this third-party implementation of wcwidth()
Please see the README for copyright and license information.

[ci skip]
2012-09-08 16:47:43 -07:00
Kevin Lange
58ca0b984c Add write support; make sacrifices to the gods
- Write support!
- The widths of characters is now determined with freetype ;-;
  I really wish wcwidth() was a real thing, but it's not.
  This is a sacrifice that had to be made.

  If you are building FOR Linux -rather than toaru- you might need to
  poke at some things to make sure it builds, but in my experience it is
  working just fine (and IMEs now work properly).

  [ci skip]
2012-09-08 15:54:56 -07:00
Kevin Lange
d424e70aa6 [bim] Insert linebreaks into the middle of lines
[ci skip]
2012-09-08 15:23:10 -07:00
Kevin Lange
df8afae9b9 Linux support for bim; fix a bug when opening
[ci skip]
2012-09-08 14:37:48 -07:00
Kevin Lange
b63f0a11f7 Refresh the statusbar when the cursor moves
Because we weren't always doing that, especially on normal-mode
movements. [ci skip]
2012-09-08 02:39:45 -07:00
Kevin Lange
d2374903f1 This is Bim, a Bad IMitation of Vim.
It's an editor, but it is incomplete. For example, write is not
supported yet, so you can open existing files and make modifications,
but you can not save them. Use it as a fun little scratchpad, I guess.
2012-09-08 01:47:19 -07:00
Kevin Lange
ea1146ea17 More minor fixes to the terminal 2012-09-08 00:17:43 -07:00
Kevin Lange
af6be648d4 A lot of refactoring 2012-09-07 20:17:00 -07:00
Kevin Lange
12bf07364c Pull the font and palette out of the terminal code
Honestly, the latter should be configurable to an extent.

[ci skip]
2012-09-06 19:46:36 -07:00
Kevin Lange
7939ccb93f Minor bugfixes and readme updates.
[ci skip]
2012-09-06 14:54:05 -07:00
Kevin Lange
9948dcc4c3 Add a hacky method to get the terminal dimensions
\033[1003z will stuff them into stdin like 80,24.
This is a hack, just like the "disable local echo" hack used for
passwords and it should, ideally, be replaced with a proper system as
defined in POSIX for terminal control, but for, it works, and that's
pretty cool because it means `ls` can stop being stupid.
2012-09-05 22:47:52 -07:00
Kevin Lange
1a1a8bcdad Fix redrawing and scrolling for wide chars
[ci skip]
2012-09-05 20:42:54 -07:00
Kevin Lange
ac52d41144 Unicode Text Support
* Some applications now support UTF-8 text through the use of a very
  simple decoder.
* The terminal uses a slow, but accurate method to determine the width
  of a character the first time it is printed to the screen. Characters
  are now stored in the terminal in two bytes, rather than one, and may
  in the future be increased to 3 or 4 bytes to ensure support for
  Unicode supplemental planes.
* A simple font-fallback method is employed in the applications that
  support unicode that will make use of the VL Gothic fonts if the
  DejaVu font does not have a character. No guarantees are made for
  support of writing systems other than extended Latin and Japanese.
2012-09-05 20:19:52 -07:00
Kevin Lange
07955c83c6 Fix dozens of build warnings and other oddities.
* Finally bring syscall.h up to speed and include all syscalls in the
  syscall module of the C library.
* Remove the third-party obfuscated C demos (we have nyancat, good
  enough)
* Fix userspace apps to build without complaining about undeclared
  strtok_r by disable __STRICT_ANSI__
* Fix .eh_frame by including the proper stuff with libgcc.
2012-09-04 20:27:49 -07:00
Kevin Lange
efa51d0d56 Don't print silly messages in the terminal...
[ci skip]
2012-09-03 23:54:04 -07:00
Kevin Lange
8ed06789ed New debug printing facilities.
- Can now register a userspace file descriptor as the output for kernel
  print statements through kprintf()
- Can set logging levels for debug print messages, which are separate
  from kernel log events and meant to be more readily visible. Log
  events are recorded in a buffer to be viewed later, though nothing
  actually using logging at the moment.
- Serial output is disabled by default now. You can enable it yourself
  by appending the logtoserial argument to the kernel on boot.
2012-09-03 22:35:11 -07:00
Kevin Lange
bba242dd62 Add a testing framework.
This is an automated system by which we boot qemu headless and use the
serial line to capture output from a testing application that is started
on bootup, running with the VGA terminal shell. This might be expanded
to boot to the graphical display within VNC and perform more advanced
tests with the Python shim using a VNC module for Python; we'll see.
2012-09-02 02:24:25 -07:00
Kevin Lange
c88d6dcb4f Add or update the heading comments for user apps.
Adds useful descriptions to ones that were lacking them, updates ones
that were innacurate, etc.
2012-07-06 21:08:28 -07:00
Kevin Lange
6dae6ac0a7 Add a simple touch command (not exactly compliant) 2012-05-31 20:37:16 +09:00
Kevin Lange
e9e4d89ac8 Toolchain installer now does freetype 2012-05-17 11:50:25 -04:00
Kevin Lange
b7647f108f Build toolchain should produce working gcc now 2012-05-16 23:08:43 -04:00
Kevin Lange
5457de3906 System Debugging Functions syscall 2012-05-16 20:51:37 -04:00
Kevin Lange
99d12d70a6 New WIP dynamic loader. 2012-05-01 13:40:04 -05:00
Kevin Lange
f2d729aee2 Add some write-verification tools [copy seems to work] 2012-04-30 19:01:55 -05:00
Kevin Lange
327523aabf Various bits of cleanup 2012-04-19 20:21:19 -05:00
Kevin Lange
14c9c1039a Graphics testing application with a cool animation. 2012-04-17 18:37:00 -05:00
Kevin Lange
1869a37582 Fix an off-by-one in the pure int alpha_blend 2012-04-17 18:36:29 -05:00
Kevin Lange
1ea3fc5652 Added thickness settings to draw app 2012-04-17 16:06:44 -05:00
Kevin Lange
de684b66c1 Move the Draw quit button into its titlebar for lulz 2012-04-17 15:41:14 -05:00
Kevin Lange
4cb3f0020b Minor stuff 2012-04-17 15:34:34 -05:00
Kevin Lange
40130c6782 Negative mouse coordinates. 2012-04-17 14:25:03 -05:00
Kevin Lange
0b6045918b Centered text for buttons 2012-04-17 13:55:54 -05:00
Kevin Lange
efcae21316 Shared memory fonts library 2012-04-17 13:46:46 -05:00
Kevin Lange
4f2c122af5 Context-based graphics library.
All graphics library commands now take a gfx_context_t pointer, which
points to a simple datastructure describing a rendering context (width,
height, depth, total size, front buffer, backbuffer; where backbuffer =
front buffer when not in double-buffering mode, thus we always render to
backbuffer except on a flip). This may have caused a minor speed
reduction, but I don't really care as it's far more important that we
support multiple graphics contexts.

TODO:
- Shared Memory Fonts library (there are a couple of apps that use these
  so-called "shmem fonts" on their own; we need a dedicated library for
  them)
- Break off "TTK" GUI toolkit into its own library. Since it's just a
  callback-based button framework, this shouldn't be too hard right now.
  Also, with the previous tick, I'll be able to put labels on controls
  and start using text in more places.
2012-04-17 13:21:34 -05:00
Kevin Lange
35074fedec Quit button? Quit button. 2012-04-13 22:20:36 -05:00
Kevin Lange
9987416fad Drawing app has buttons (working on a toolkit) 2012-04-13 01:21:01 -05:00
Kevin Lange
9d4e560b8b Minor mouse fixes 2012-04-12 23:30:04 -05:00
Kevin Lange
5a1a45bc09 Faster mouse response
- Discard lots of packets
- Don't yield?
2012-04-12 23:21:38 -05:00
Kevin Lange
0eaf3a99a3 Separate pthread; add mouse move events? 2012-04-12 22:42:24 -05:00
Kevin Lange
3e70898674 Yeah, disable debug flags while we're still working on initrds... 2012-04-11 16:03:20 -05:00
Kevin Lange
285acf68a0 Reenable login prompts (vga textmode only) 2012-04-11 15:24:24 -05:00
Kevin Lange
d45b8be815 Let nyancat run with proper VGA term support 2012-04-11 00:04:26 -05:00
Kevin Lange
ac7720f396 Reenable support for a VGA text-mode terminal. 2012-04-10 23:35:12 -05:00
Kevin Lange
e60cd2b49e Collect, but do not send, mouse events. 2012-04-10 22:34:36 -05:00
Kevin Lange
e89fb94d2f Exiting terminals, but there's a problem somewhere... 2012-04-10 21:55:41 -05:00
Kevin Lange
eb56624581 Fix up clock appearance 2012-03-29 12:12:06 -05:00
Kevin Lange
3d9d947701 Graphical analogue clock 2012-03-28 20:34:28 -05:00
Kevin Lange
650e85598f Remove Andy Sloane's Donut Mark (It didn't work) 2012-03-28 16:22:48 -05:00
Kevin Lange
76f96a431e Fix some graphics-related things 2012-03-28 15:54:31 -05:00
Kevin Lange
e6addf3419 The panel app uses a hardcoded version number, update it 2012-03-28 01:16:35 -05:00