summaryrefslogtreecommitdiff
path: root/jni/com_android_terminal_Terminal.cpp
AgeCommit message (Collapse)Author
2014-12-31Remove rows/cols from nativeInitTom Marshall
* These are hardcoded, no sense passing them as arguments. Change-Id: I40c26b894b2e668bbebfb779ec5d83a1f34dc0a8
2014-12-04Update and fix Terminal.Elliott Hughes
As of today, bionic has <pty.h>, so there's no need to have another here. Also fix bugs introduced in attempts to make this code 64-bit clean. Change-Id: I40746920764e84a829a3d1df5a900a419589b84a
2014-04-08Terminal: fix compiling for 64-bitColin Cross
Use jlong to store the native pointer. Change-Id: I0d35871da53f08b8835c35a3675fb958e9ec230a
2013-04-25Add scrollback support.Jeff Sharkey
Switch terminal rendering to use ListView, splitting each row into a TerminalLineView item. This leverages existing ListView display list optimizations when scrolling, and gives us fling and overscroll for free. However, the simple case of a single line scrolling requires an entire screen rebind. Added locking between I/O thread and UI thread to provide consistent view of terminal state. Snap to current upstream libvterm, which has updated scrollback API. Examine full cell style when building runs. Address terminals using "keys" instead of indicies, since ordering can shift. Save and restore instance state to remember scrollback position. Avoid crashing after closing last terminal. Remove unused callbacks. Bug: 8332387 Change-Id: I06468d16ae8e1ff8ac79b7115c7cb3f9434b3c0d
2013-03-05Decode UTF-32 chars.Jeff Sharkey
Tested with emoji! Change-Id: I1b3b45f7fdb950c3c29ddad1d80c082c1175a68a
2013-02-26Added input error handling and enabled keyboard inputMichael Wright
Change-Id: Ie74da0b39d9002802c76dc3ceecd5082e7504f26
2013-02-25Remove unnecessary castMichael Wright
Change-Id: Ic10fb897be4002a151c898a7afc12e30114789fc
2013-02-25Add jni hooks for key dispatchingMichael Wright
Change-Id: I51b32fa8635c54418bea73ad7a1fa0c8213cfd32
2013-02-23Service to host long-lived terminals, tab UI.Jeff Sharkey
Bind to new TerminalService when UI is running, and keep service started as long as terminals are active. Use ViewPager to show multiple active terminals, and menu items to open/close terminals. Anti-alias terminal text. Reduce callback logging. Add method to stop a running shell; still need to kill child process. Change-Id: I8efcb43aeaf8813762cd0ceebcd5388fc51ebaab
2013-02-23Correctly resize terminal, hook up colors.Jeff Sharkey
Resize needed to kick the vterm library. Hook up colors to CellRun and cluster cells into single run until style changes. Change-Id: Ib2984d8eedaf6085aba98df7997104b59a832967
2013-02-23Working damage!Jeff Sharkey
Flushing damage to the UI is now driven by the read() thread, and moverect() data is now passed across JNI. TerminalView currently treats moverect() as invalidating the union of the two rects, which repaints everything correctly, yay! Change-Id: I0d38e5c7755d3da06a23802c03fd2e2839aa1a02
2013-02-21Start hooking up damage, shell script to test.Jeff Sharkey
It's still pretty broken and I need to grok how damage and moveRect play together. Avoid allocations inside onDraw(). Change-Id: I0fca467439178d902c4d11ff1523a0ec25c2dd39
2013-02-21Split init() and run().Jeff Sharkey
Also switch to ScopedCharArrayRW. Change-Id: I1e22a166c48ba7209e624fc49bee8618e9b36f0d
2013-02-20Add CellRun to speed up cell rendering.Jeff Sharkey
Change to using CellRun class, and ask JNI to fill it until text style changes. Switch to drawPosText(), which paints an entire run at once. Together these changes improve screen rendering times from 170ms to only 7ms! Change-Id: I62f12ffbb746c0c54191a15f395bbb80229cc959
2013-02-20Initial pass at read() loop.Jeff Sharkey
This also gives us the first glimpse of real rendered text. Change-Id: If05344f1deec6f9c469220861a13442287ce23bf
2013-02-20Properly configure ptys on Terminal constructionMichael Wright
Change-Id: Ia656feda07a752c66d56f72c9b8559b5d3543cf8
2013-02-19TerminalView to draw session contents.Jeff Sharkey
View sets terminal dimensions to match screen, and handles any draw requests for dirty regions. damage() calls from below are translated into normal View invalidates. For now makes separate getCell() calls for each cell while drawing across screen. This currently costs about 130ms for a 38x59 shell. Change-Id: I2d106a8aeb18e9d6993f30cfb02438e85ee63c65
2013-02-19Start hooking up forkpty()Jeff Sharkey
Change-Id: I5bd867a0ab5aaf138da75cedd5352a8876c61194
2013-02-19Add callbacksKenny Root
Change-Id: I0702f4ce4be69f86995956f98a0da52f47026f90
2013-02-19Initial code for Terminal app, with JNI glue.Jeff Sharkey
Change-Id: I4b2ecb2eef9bef7a8236391d19a3708751a7c71d