Commit Graph

92 Commits

Author SHA1 Message Date
Kevin Lange
b583e6c60a Fix sane apps not exiting 2013-04-10 00:18:40 -07:00
Kevin Lange
89fed507b3 Asynchrous sane window events 2013-04-10 00:10:00 -07:00
Kevin Lange
7ed7f85769 Various windowing and TTK improvements 2013-04-07 16:21:00 -07:00
Kevin Lange
c0cc4a8907 For simplicity, use integer degrees for rotation.
Ensures crisp 180s, still working on 90s.
2013-04-02 01:39:48 -07:00
Kevin Lange
17879bd850 EXPERIMENTAL: Rotating windows.
* Dumb bounding box top_at logic replaced with select buffer
* Select buffer rendered through cairo with AA disabled
  Using rectangles for window shapes - this should easily
  be expandable to 1bpp bitmaps. Currently, the select buffer
  is very inefficient, using twice the space it needs (plus,
  it's double buffered, so in reality, 4x the space needed),
  however, it's also very accurate and fast, and I like that.
* Window rotation is controlled through Ctrl+Shift+{z,x,c} where
  z = rotate 1 degree left
  x = rotate 1 degree right
  c = reset rotation
* Input is remapped based on window rotation, so you *can* use the
  draw app, and it is totally epic.
2013-04-02 01:26:32 -07:00
Kevin Lange
5375fb38c4 Proper alpha support in shmemfonts 2013-03-29 01:02:42 -07:00
Kevin Lange
8e48ee8cfa Fix alpha blitting once and for all 2013-03-29 00:34:12 -07:00
Kevin Lange
2d7a29d17e Premulitply PNGs when loaded 2013-03-28 20:04:26 -07:00
Kevin Lange
b2f94bd393 Completely new build system for userspace 2013-02-10 01:36:35 -08:00
Kevin Lange
f8aa509f36 Fix right shift 2013-02-01 22:39:57 -08:00
Kevin Lange
8e9ee3d68e Decoration themes, sort of
A surprise x-mas gift, the old theme is back when WM_THEME=simple is set
2012-12-12 22:42:48 -08:00
Kevin Lange
edf0dcca19 threaded event processor should block
rather than yield-looping on an fstat
2012-12-10 21:19:13 -08:00
Kevin Lange
e5e67c6410 Fix some a quick crash bug 2012-12-10 00:29:04 -08:00
Kevin Lange
8fb898be66 Restructure windowed applications for speed 2012-12-09 23:07:04 -08:00
Kevin Lange
5f17cbc27f primitive scrollback support in terminal 2012-12-09 19:57:04 -08:00
Kevin Lange
cd929b1ceb Fix some minor input issues 2012-12-08 00:24:43 -08:00
Kevin Lange
b5d88b13fc kill a bunch of debug printing 2012-11-21 23:29:57 -08:00
Kevin Lange
ae6b72606b General support for focused/inactive windows 2012-11-19 21:24:21 -08:00
Kevin Lange
07a5ee3c55 Brand new, super-great window decorations 2012-11-18 20:41:30 -08:00
Kevin Lange
25f418e887 Support UTF-8 in shmemfonts w/ fallbacks 2012-11-18 20:14:57 -08:00
Kevin Lange
1081fba885 Updates to the shmem font lib
Supports multiple fonts now!

Loads up with all the standard fonts.
2012-11-18 19:35:17 -08:00
Kevin Lange
94dc368904 Fix signature for draw_sprite_scaled 2012-11-16 18:37:12 -08:00
Kevin Lange
df4d1cca39 Text shadows in various places.
- Desktop icons use the shadowing
- The login screen uses shadows instead of poorly-executed strokes
- The blur_test app has been updated to show multiple blur levels,
  but does not use the library function.
2012-10-16 19:05:58 -07:00
Kevin Lange
8ef81b6924 Graphics library functions for Gaussian blur
And a demo app. Going to use this for soft shadows somewhere.
2012-10-15 23:04:33 -07:00
Kevin Lange
7f28dff33d F-keys :D 2012-10-14 22:38:43 -07:00
Kevin Lange
7d5eb42400 Userspace keyboard handling
Kernel driver sends raw scancodes, compositor or terminal handle the
rest. Support for F* keys will be added soon, in the mean time userspace
applications can know about the status of modifiers (control, shift,
alt, and super).

Compositor actions have been changed to Alt+Left Click for move and
Alt+Middle Click for resize. I'll work on adding more mouse events once
I get them to be faster (they're annoyingly slow at the moment... I want
more accuracy and less latency).
2012-10-14 19:53:16 -07:00
Kevin Lange
79ec8ccdb7 Support resizing in all graphics apps
Sort of. game has issues.
2012-10-13 20:44:59 -07:00
Kevin Lange
217f66e23e Mouse-driven window resizing 2012-10-13 20:19:43 -07:00
Kevin Lange
d56ba02437 Resizing is working okay. 2012-10-13 13:02:58 -07:00
Kevin Lange
0387b2d2c3 Allow windows to disable alpha transparency.
Also add functionality to the terminal to toggle it on and off.
There's a small, but nice-to-have performance increase from disabling
alpha transparency in the terminal.

Also, the display server sets DISPLAY=... to the shmem endpoint for the
compositor, so if getenv("DISPLAY") returns a pointer, you can assume
you are in a graphical environment, instead of having to rely on things
like arguments. Good for those applications that want to be able to run
both full-screen and windowed.
2012-10-11 23:55:53 -07:00
Kevin Lange
66a35ba224 Separate out keyboard stuff into a library.
Eventually this will be used to do ALL keyboard interpreting, so we can
ditch the kernel map and support proper input and special keys.
2012-10-08 22:33:46 -07:00
Kevin Lange
5249138dcd Environment variables, integrated with newlib.
* Patched crt0 to support a pre_main
* pre_main sets up environment variables, can do other things later,
  but then just jumps to main with the same arguments.
* Updated a bunch of apps to pass environment variables around.
2012-10-08 00:17:50 -07:00
Kevin Lange
ac997d0a48 Screenshot utility (testing/brokenish) 2012-09-29 00:38:11 -07:00
Kevin Lange
66c2df40c1 Fix alpha blending for RGBA destinations.
* Also enable PNG loading in `view`
* Also enable RGBA PNG loading in general
2012-09-13 23:22:38 -07:00
Kevin Lange
4c67b5da84 Completely rewrote compositing engine
The compositor itself still needs work, but the compositing engine
within now does full blitting and is faster than the old method.
Transparency is now supported properly, though telling the compositor to
use it on a window will degrade performance. One terminal is usually
okay, and everything runs faster than it did before; two terminals is
pushing it; three will make you very sad. The stacking logic has also
been updated. Presumably, alpha blitting for transparent windows could
be done with SIMD instructions and be extremely fast.

All graphics libraries have also been updated to (hopefully) work
properly with alpha bits.
2012-09-13 22:12:47 -07:00
Kevin Lange
cea692b577 And now with more login.
* Also cleaning up some kernel logging options here.
* You can log in as local or root with passwords local and toor
* Graphical sessions are still buggy, so don't kill that terminal.
2012-09-12 23:19:07 -07:00
Kevin Lange
b4ae49b056 Graphical Login Manager (without the login part)
* Some-what managed sessions
* Cool fade in effect from the bootscreen
* Not terribly unawesome rendering of everything else
2012-09-12 22:10:10 -07:00
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
af6be648d4 A lot of refactoring 2012-09-07 20:17:00 -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
99d12d70a6 New WIP dynamic loader. 2012-05-01 13:40:04 -05:00
Kevin Lange
327523aabf Various bits of cleanup 2012-04-19 20:21:19 -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
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
9987416fad Drawing app has buttons (working on a toolkit) 2012-04-13 01:21:01 -05:00