aboutsummaryrefslogtreecommitdiff
path: root/termkey.c
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-11-02 17:54:24 +0000
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-11-02 17:54:24 +0000
commit5107112a91895c357da0131424e229d75f5b9462 (patch)
tree1747ac596e95f5af69c1fa00d21536202aa183ab /termkey.c
parent1d4d908cb8668a1c043a4630d114dcfa219711d7 (diff)
downloadtermo-5107112a91895c357da0131424e229d75f5b9462.tar.gz
termo-5107112a91895c357da0131424e229d75f5b9462.tar.xz
termo-5107112a91895c357da0131424e229d75f5b9462.zip
Added new driver virtual methods 'start_driver' and 'stop_driver'
Diffstat (limited to 'termkey.c')
-rw-r--r--termkey.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/termkey.c b/termkey.c
index a1904b6..8f55dd3 100644
--- a/termkey.c
+++ b/termkey.c
@@ -185,6 +185,9 @@ termkey_t *termkey_new_full(int fd, int flags, size_t buffsize, int waittime)
}
}
+ if(tk->driver.start_driver)
+ (*tk->driver.start_driver)(tk);
+
return tk;
abort_free_keynames:
@@ -217,6 +220,9 @@ void termkey_free(termkey_t *tk)
void termkey_destroy(termkey_t *tk)
{
+ if(tk->driver.stop_driver)
+ (*tk->driver.stop_driver)(tk);
+
if(tk->restore_termios_valid)
tcsetattr(tk->fd, TCSANOW, &tk->restore_termios);