Giter Club home page Giter Club logo

xtermsharp's Introduction

XtermSharp

Build Status

XtermSharpGuiXtermSharpMac

XtermSharp is a VT100/Xterm terminal emulator for .NET, the engine is intended to be agnostic from potential front-ends and backends.

Consumers use a higher-level implementation that provides integration with their UI toolkit of choice. This module contains both implementation a Cocoa/Mac and a Terminal.Gui implementations that can serve as a reference to other ports.

The terminal itself does not deal with connecting the data to to a process or a remote server. Data is sent to the terminal by passing a byte array with data to the "Feed" method.

Convenience classes exist to spawn a subprocess and connecting the terminal to a local process, and allow some customization of the environment variables to pass to the child.

The SampleTester program is an internal test program that exercises some of the Terminal API.

Long term, I want to have an embeddable console for MonoDevelop/VisualStudioMac that is a proper terminal, so I can debug things like gui.cs without launching an external window as well as having a full terminal for my Gui.cs library.

XtermSharp.Mac

This is a library built on top of XtermSharp that provides a MacOS NSView that can be used in your applications to embed a terminal emulator. This maps the Mac input to send data to the underlying terminal.

Like XtermSharp, this does not wire up the terminal to a backend or a process, this is something that your code still needs to do.

An example terminal on how to connect a Unix shell process is available in the MacTerminal project.

Features

The engine is pretty good at this point and lets you use Emacs, vi, top, mc, blessed and gui.cs both with the keyboard and the mouse. Some features are only available on the Mac version, as the text-version with curses imposes some limitations.

The unicode handling is pretty decent, but does not have support for Grapheme clusters yet, that is coming up later.

Scrollback and reflow are currently missing, those are tied together, and I think it can be done better than the original xterm.js design supported.

Roadmap

There are many issues filed that track some of the capabilities that are missing, the list is by no means complete. What I would like to do is package this in a reusable form for all available platforms (Windows, Mac, Linux, iOS, Android) so others can use this to embed terminal emulators where necessary.

There is currently a native piece of code needed to fork/exec safely on MacOS in the presence of MacOS recent "Runtime Hardening".

Some of the Gui.cs code needs to be moved to its XtermSharp.GuiCs library, and the SubprocessTerminalView needs to introduced for MacOS.

History

I wanted to have a console emulator for .NET since the days of Silverlight, but never quite got around it - but having an engine that could have different front-ends and backends is something that I have desired for a long time. I did some bits and pieces some years ago which are not required nowadays.

This code was originally a port of xterm.js, but has been adjusted for proper processing Unicode using NStack and to make the front-end pluggable in a .NET way. While xterm.js was a useful starting point, the code has deviated and there is limited value in continuing the port, this code can now live on its own.

xtermsharp's People

Contributors

migueldeicaza avatar sgmunn avatar mrward avatar therzok avatar nosami avatar bratsche avatar bergmeister avatar

Watchers

James Cloos avatar  avatar

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.