exit current proccess added

This commit is contained in:
Timon 2018-06-26 18:21:47 +00:00
parent 46e7ad720f
commit 043bac575f
9 changed files with 249 additions and 215 deletions

View File

@ -2,11 +2,14 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="310aeab2-4737-4e8e-b7eb-0aac10d104a3" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/bin.rs" beforeDir="false" afterPath="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/bin.rs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/color/mod.rs" beforeDir="false" afterPath="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/color/mod.rs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/cursor/ansi_cursor.rs" beforeDir="false" afterPath="$PROJECT_DIR$/src/cursor/ansi_cursor.rs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/style/styles/styledobject.rs" beforeDir="false" afterPath="$PROJECT_DIR$/src/style/styles/styledobject.rs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/kernel/unix_kernel/terminal.rs" beforeDir="false" afterPath="$PROJECT_DIR$/src/kernel/unix_kernel/terminal.rs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/kernel/windows_kernel/terminal.rs" beforeDir="false" afterPath="$PROJECT_DIR$/src/kernel/windows_kernel/terminal.rs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/shared/functions.rs" beforeDir="false" afterPath="$PROJECT_DIR$/src/shared/functions.rs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/terminal/ansi_terminal.rs" beforeDir="false" afterPath="$PROJECT_DIR$/src/terminal/ansi_terminal.rs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/terminal/mod.rs" beforeDir="false" afterPath="$PROJECT_DIR$/src/terminal/mod.rs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/terminal/terminal.rs" beforeDir="false" afterPath="$PROJECT_DIR$/src/terminal/terminal.rs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/terminal/winapi_terminal.rs" beforeDir="false" afterPath="$PROJECT_DIR$/src/terminal/winapi_terminal.rs" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
@ -17,96 +20,108 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="shared_commands.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/state/commands/shared_commands.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="510">
<caret line="40" column="1" selection-start-line="40" selection-start-column="1" selection-end-line="40" selection-end-column="1" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="unix_command.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/state/commands/unix_command.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="600">
<caret line="40" column="9" selection-start-line="40" selection-start-column="9" selection-end-line="40" selection-end-column="9" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="styledobject.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/style/styles/styledobject.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="590">
<caret line="146" column="17" selection-start-line="146" selection-start-column="17" selection-end-line="146" selection-end-column="17" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="bin.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/bin.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="555">
<caret line="37" column="21" selection-start-line="37" selection-start-column="21" selection-end-line="37" selection-end-column="21" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="cursor.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/cursor/cursor.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="450">
<caret line="359" column="31" selection-start-line="359" selection-start-column="31" selection-end-line="359" selection-end-column="31" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="ansi_cursor.rs" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/cursor/ansi_cursor.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="586">
<caret line="92" lean-forward="true" selection-start-line="92" selection-end-line="92" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="ansi_color.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/style/color/ansi_color.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="450">
<caret line="32" column="102" selection-start-line="32" selection-start-column="11" selection-end-line="32" selection-end-column="102" />
<state relative-caret-position="630">
<caret line="42" column="1" selection-start-line="42" selection-start-column="1" selection-end-line="42" selection-end-column="1" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="mod.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/color/mod.rs">
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/cursor/mod.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="635">
<caret line="144" column="1" selection-start-line="144" selection-start-column="1" selection-end-line="144" selection-end-column="1" />
<state relative-caret-position="576">
<caret line="136" column="33" selection-start-line="136" selection-start-column="33" selection-end-line="136" selection-end-column="33" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="color.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/style/color/color.rs">
<file leaf-file-name="terminal.rs" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/kernel/unix_kernel/terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="788">
<caret line="129" column="7" selection-start-line="129" selection-start-column="7" selection-end-line="129" selection-end-column="7" />
<state relative-caret-position="646">
<caret line="136" column="28" selection-start-line="136" selection-start-column="28" selection-end-line="136" selection-end-column="28" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="terminal.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/kernel/windows_kernel/terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="12" column="1" lean-forward="true" selection-start-line="12" selection-start-column="1" selection-end-line="12" selection-end-column="1" />
<folding>
<element signature="e#3841#3842#0" expanded="true" />
<element signature="e#3886#3887#0" expanded="true" />
<element signature="e#276#277#0" expanded="true" />
<element signature="e#307#308#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="win_commands.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/state/commands/win_commands.rs">
<file leaf-file-name="terminal.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/terminal/terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3450">
<caret line="230" column="22" selection-start-line="230" selection-start-column="22" selection-end-line="230" selection-end-column="22" />
<state relative-caret-position="533">
<caret line="199" column="26" selection-start-line="199" selection-start-column="26" selection-end-line="199" selection-end-column="26" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="winapi_terminal.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/terminal/winapi_terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="586">
<caret line="148" column="32" selection-start-line="148" selection-start-column="32" selection-end-line="148" selection-end-column="32" />
<folding>
<element signature="e#4788#4789#0" expanded="true" />
<element signature="e#4820#4821#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="functions.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/shared/functions.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="886">
<caret line="62" column="31" lean-forward="true" selection-start-line="62" selection-start-column="31" selection-end-line="62" selection-end-column="31" />
<folding>
<element signature="e#500#501#0" expanded="true" />
<element signature="e#522#523#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="ansi_terminal.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/terminal/ansi_terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="631">
<caret line="68" lean-forward="true" selection-start-line="68" selection-end-line="68" />
<folding>
<element signature="e#2303#2304#0" expanded="true" />
<element signature="e#2327#2328#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="terminal.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="119">
<caret line="37" column="47" selection-start-line="37" selection-start-column="47" selection-end-line="37" selection-end-column="47" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="alternate_screen.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/alternate_screen.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="473">
<caret line="35" column="52" selection-start-line="35" selection-start-column="7" selection-end-line="35" selection-end-column="52" />
</state>
</provider>
</entry>
@ -175,7 +190,6 @@
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/src/manager/terminal.rs" />
<option value="$PROJECT_DIR$/src/terminal/screen.rs" />
<option value="$PROJECT_DIR$/src/shared/terminal.rs" />
<option value="$PROJECT_DIR$/src/terminal/raw.rs" />
@ -210,12 +224,6 @@
<option value="$PROJECT_DIR$/src/cursor/mod.rs" />
<option value="$PROJECT_DIR$/src/kernel/windows_kernel/kernel.rs" />
<option value="$PROJECT_DIR$/src/cursor/winapi_cursor.rs" />
<option value="$PROJECT_DIR$/src/terminal/mod.rs" />
<option value="$PROJECT_DIR$/src/terminal/winapi_terminal.rs" />
<option value="$PROJECT_DIR$/src/terminal/terminal.rs" />
<option value="$PROJECT_DIR$/src/terminal/ansi_terminal.rs" />
<option value="$PROJECT_DIR$/src/kernel/unix_kernel/terminal.rs" />
<option value="$PROJECT_DIR$/src/shared/functions.rs" />
<option value="$PROJECT_DIR$/src/cursor/cursor.rs" />
<option value="$PROJECT_DIR$/src/manager/manager.rs" />
<option value="$PROJECT_DIR$/src/shared/screen.rs" />
@ -224,8 +232,15 @@
<option value="$PROJECT_DIR$/src/state/commands/unix_command.rs" />
<option value="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/color/mod.rs" />
<option value="$PROJECT_DIR$/src/style/styles/styledobject.rs" />
<option value="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/bin.rs" />
<option value="$PROJECT_DIR$/src/cursor/ansi_cursor.rs" />
<option value="$PROJECT_DIR$/src/terminal/mod.rs" />
<option value="$PROJECT_DIR$/src/terminal/terminal.rs" />
<option value="$PROJECT_DIR$/src/shared/functions.rs" />
<option value="$PROJECT_DIR$/src/terminal/winapi_terminal.rs" />
<option value="$PROJECT_DIR$/src/terminal/ansi_terminal.rs" />
<option value="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/bin.rs" />
<option value="$PROJECT_DIR$/src/kernel/windows_kernel/terminal.rs" />
<option value="$PROJECT_DIR$/src/kernel/unix_kernel/terminal.rs" />
</list>
</option>
</component>
@ -289,26 +304,20 @@
<item name="crossterm" type="462c0819:PsiDirectoryNode" />
<item name="examples" type="462c0819:PsiDirectoryNode" />
<item name="Crossterm 0.2.2 - New Version (Not finished)" type="462c0819:PsiDirectoryNode" />
<item name="color" type="462c0819:PsiDirectoryNode" />
<item name="cursor" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="crossterm" type="b2602c69:ProjectViewProjectNode" />
<item name="crossterm" type="462c0819:PsiDirectoryNode" />
<item name="examples" type="462c0819:PsiDirectoryNode" />
<item name="Crossterm 0.2.2 - New Version (Not finished)" type="462c0819:PsiDirectoryNode" />
<item name="cursor" type="462c0819:PsiDirectoryNode" />
<item name="terminal" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="crossterm" type="b2602c69:ProjectViewProjectNode" />
<item name="crossterm" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="crossterm" type="b2602c69:ProjectViewProjectNode" />
<item name="crossterm" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="cursor" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="crossterm" type="b2602c69:ProjectViewProjectNode" />
<item name="crossterm" type="462c0819:PsiDirectoryNode" />
@ -326,7 +335,8 @@
<item name="crossterm" type="b2602c69:ProjectViewProjectNode" />
<item name="crossterm" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="manager" type="462c0819:PsiDirectoryNode" />
<item name="kernel" type="462c0819:PsiDirectoryNode" />
<item name="windows_kernel" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="crossterm" type="b2602c69:ProjectViewProjectNode" />
@ -334,39 +344,6 @@
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="shared" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="crossterm" type="b2602c69:ProjectViewProjectNode" />
<item name="crossterm" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="state" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="crossterm" type="b2602c69:ProjectViewProjectNode" />
<item name="crossterm" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="state" type="462c0819:PsiDirectoryNode" />
<item name="commands" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="crossterm" type="b2602c69:ProjectViewProjectNode" />
<item name="crossterm" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="style" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="crossterm" type="b2602c69:ProjectViewProjectNode" />
<item name="crossterm" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="style" type="462c0819:PsiDirectoryNode" />
<item name="color" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="crossterm" type="b2602c69:ProjectViewProjectNode" />
<item name="crossterm" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="style" type="462c0819:PsiDirectoryNode" />
<item name="styles" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="crossterm" type="b2602c69:ProjectViewProjectNode" />
<item name="crossterm" type="462c0819:PsiDirectoryNode" />
@ -564,12 +541,12 @@
<workItem from="1529599006635" duration="10804000" />
<workItem from="1529689699529" duration="6745000" />
<workItem from="1529741655974" duration="14906000" />
<workItem from="1530030893916" duration="813000" />
<workItem from="1530030893916" duration="4906000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="613715000" />
<option name="totallyTimeSpent" value="617808000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="0" width="2560" height="1050" extended-state="6" />
@ -641,13 +618,6 @@
<option name="myLimit" value="2678400000" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/style/color/winapi_color.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374">
<caret line="43" column="30" selection-start-line="43" selection-start-column="30" selection-end-line="43" selection-end-column="30" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.cargo/registry/src/github.com-1ecc6299db9ec823/winapi-0.3.5/src/shared/minwindef.rs" />
<entry file="file://$USER_HOME$/.cargo/registry/src/github.com-1ecc6299db9ec823/winapi-0.3.5/src/um/wincon.rs" />
<entry file="file://$USER_HOME$/.rustup/toolchains/nightly-x86_64-pc-windows-msvc/lib/rustlib/src/rust/src/libcore/result.rs" />
@ -659,20 +629,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/mod.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="12" selection-start-line="2" selection-start-column="12" selection-end-line="2" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/alternate_screen.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1071">
<caret line="63" column="62" selection-start-line="63" selection-start-column="62" selection-end-line="63" selection-end-column="62" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/raw_mode.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="466">
@ -739,20 +695,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/cursor/mod.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="576">
<caret line="136" column="33" selection-start-line="136" selection-start-column="33" selection-end-line="136" selection-end-column="33" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="119">
<caret line="37" column="47" selection-start-line="37" selection-start-column="47" selection-end-line="37" selection-end-column="47" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/kernel/windows_kernel/kernel.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="399">
@ -774,13 +716,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/terminal/mod.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="757">
<caret line="51" column="39" selection-start-line="51" selection-start-column="39" selection-end-line="51" selection-end-column="39" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/shared/traits.rs">
<provider selected="true" editor-type-id="text-editor">
<state>
@ -788,20 +723,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/terminal/terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="281">
<caret line="189" selection-start-line="189" selection-end-line="189" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/terminal/winapi_terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="689">
<caret line="143" column="5" selection-start-line="143" selection-start-column="5" selection-end-line="143" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/shared/macros.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
@ -809,13 +730,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/terminal/ansi_terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="587">
<caret line="65" column="25" lean-forward="true" selection-start-line="65" selection-start-column="25" selection-end-line="65" selection-end-column="25" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/state/command_manager.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="360">
@ -823,20 +737,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/kernel/unix_kernel/terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="508">
<caret line="67" column="38" selection-start-line="67" selection-start-column="38" selection-end-line="67" selection-end-column="38" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/shared/functions.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="525">
<caret line="38" selection-start-line="38" selection-end-line="38" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/manager/win_manager.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="488">
@ -946,17 +846,110 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/bin.rs">
<entry file="file://$PROJECT_DIR$/src/cursor/ansi_cursor.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="555">
<caret line="37" column="21" selection-start-line="37" selection-start-column="21" selection-end-line="37" selection-end-column="21" />
<state relative-caret-position="421">
<caret line="81" column="10" selection-start-line="81" selection-start-column="10" selection-end-line="81" selection-end-column="10" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/cursor/ansi_cursor.rs">
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/mod.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="12" selection-start-line="2" selection-start-column="12" selection-end-line="2" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/terminal/mod.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="795">
<caret line="53" column="19" selection-start-line="53" selection-start-column="19" selection-end-line="53" selection-end-column="19" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/terminal/terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="533">
<caret line="199" column="26" selection-start-line="199" selection-start-column="26" selection-end-line="199" selection-end-column="26" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/terminal/winapi_terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="586">
<caret line="92" lean-forward="true" selection-start-line="92" selection-end-line="92" />
<caret line="148" column="32" selection-start-line="148" selection-start-column="32" selection-end-line="148" selection-end-column="32" />
<folding>
<element signature="e#4788#4789#0" expanded="true" />
<element signature="e#4820#4821#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="119">
<caret line="37" column="47" selection-start-line="37" selection-start-column="47" selection-end-line="37" selection-end-column="47" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/alternate_screen.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="473">
<caret line="35" column="52" selection-start-line="35" selection-start-column="7" selection-end-line="35" selection-end-column="52" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/cursor/mod.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="576">
<caret line="136" column="33" selection-start-line="136" selection-start-column="33" selection-end-line="136" selection-end-column="33" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/bin.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="630">
<caret line="42" column="1" selection-start-line="42" selection-start-column="1" selection-end-line="42" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/terminal/ansi_terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="631">
<caret line="68" lean-forward="true" selection-start-line="68" selection-end-line="68" />
<folding>
<element signature="e#2303#2304#0" expanded="true" />
<element signature="e#2327#2328#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/shared/functions.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="886">
<caret line="62" column="31" lean-forward="true" selection-start-line="62" selection-start-column="31" selection-end-line="62" selection-end-column="31" />
<folding>
<element signature="e#500#501#0" expanded="true" />
<element signature="e#522#523#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/kernel/windows_kernel/terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="12" column="1" lean-forward="true" selection-start-line="12" selection-start-column="1" selection-end-line="12" selection-end-column="1" />
<folding>
<element signature="e#276#277#0" expanded="true" />
<element signature="e#307#308#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/kernel/unix_kernel/terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="646">
<caret line="136" column="28" selection-start-line="136" selection-start-column="28" selection-end-line="136" selection-end-column="28" />
</state>
</provider>
</entry>

View File

@ -29,11 +29,15 @@ use crossterm::raw::IntoRawMode;
use std::io::Write;
use std::{time, thread};
use std::process::exit;
fn main() {
let context = Context::new();
use crossterm::cursor::cursor;
use crossterm::terminal::terminal;
let curs = terminal(context.clone());
curs.exit();
thread::sleep(time::Duration::from_secs(3));
let curs = cursor(context.clone());
curs.blink(false);
}

View File

@ -132,6 +132,10 @@ pub fn get_terminal_mode() -> io::Result<Termios>
}
}
pub fn exit()
{
::std::process::exit(0);
/// Is the return value true?
fn is_true(value: i32) -> Result<(), Error>
{

View File

@ -6,3 +6,8 @@ pub fn terminal_size() -> (u16, u16) {
(csbi.srWindow.Bottom - csbi.srWindow.Top) as u16,
)
}
pub fn exit()
{
::std::process::exit(256);
}

View File

@ -4,15 +4,13 @@ use Context;
use std::rc::Rc;
#[cfg(windows)]
use kernel::windows_kernel::terminal::terminal_size;
#[cfg(unix)]
use kernel::unix_kernel::terminal::terminal_size;
use kernel::windows_kernel::terminal::{exit, terminal_size};
#[cfg(windows)]
use kernel::windows_kernel::cursor::pos;
#[cfg(unix)]
use kernel::unix_kernel::terminal::pos;
use kernel::unix_kernel::terminal::{pos, exit,terminal_size };
/// Get the terminal size based on the current platform.
pub fn get_terminal_size() -> (u16, u16)
@ -30,6 +28,16 @@ pub fn get_cursor_position(context: Rc<Context>) -> (u16, u16)
return pos();
}
/// exit the current terminal.
pub fn exit_terminal()
{
#[cfg(unix)]
exit();
#[cfg(windows)]
exit();
}
#[cfg(windows)]
/// Get an module specific implementation based on the current platform.
pub fn get_module<T>(winapi_impl: T, unix_impl: T) -> Option<T>

View File

@ -74,4 +74,9 @@ impl ITerminal for AnsiTerminal {
screen.write_ansi_str("\x1b]2;New terminal titleBEL");
}
}
fn exit(&self)
{
functions::exit_terminal();
}
}

View File

@ -50,4 +50,6 @@ pub trait ITerminal {
fn set_size(&self,width: i16, height: i16);
/// Set the terminal title.
fn set_title(&self, title: String);
/// Close the current terminal
fn exit(&self);
}

View File

@ -193,6 +193,13 @@ impl Terminal {
terminal.set_title(title );
}
}
pub fn exit(&self)
{
if let Some (ref terminal) = self.terminal {
terminal.exit();
}
}
}
/// Get an Terminal implementation whereon terminal related actions can be performed.

View File

@ -6,6 +6,7 @@ use cursor::cursor;
use super::{ClearType, ITerminal, Rc};
use winapi::um::wincon::{SMALL_RECT, COORD, CONSOLE_SCREEN_BUFFER_INFO,};
use kernel::windows_kernel::{kernel, terminal};
use super::super::shared::functions;
/// This struct is an windows implementation for terminal related actions.
pub struct WinApiTerminal
@ -142,6 +143,11 @@ impl ITerminal for WinApiTerminal {
{
}
fn exit(&self)
{
functions::exit_terminal();
}
}
pub fn clear_after_cursor(pos: (u16,u16), csbi: CONSOLE_SCREEN_BUFFER_INFO, context: Rc<Context>) {