chiark / gitweb /
*** empty log message ***
[sympathy.git] / src / keydis.c
index 9a7bd45398c00b86f8363bcb931ea1d6263dd673..3aed96e9f5c40ef90171f121e288cc2115ccb03f 100644 (file)
@@ -10,6 +10,12 @@ static char rcsid[] = "$Id$";
 
 /*
  * $Log$
+ * Revision 1.7  2008/02/28 16:37:16  james
+ * *** empty log message ***
+ *
+ * Revision 1.6  2008/02/28 12:12:25  james
+ * *** empty log message ***
+ *
  * Revision 1.5  2008/02/23 11:48:37  james
  * *** empty log message ***
  *
@@ -116,6 +122,32 @@ keydis_ipc_hangup (KeyDis * _t, Context * c)
   return 0;
 }
 
+
+static int
+keydis_ipc_set_size (KeyDis * _t, Context * c,int w,int h)
+{
+CRT_Pos p={w,h};
+
+  KeyDis_IPC *t = (KeyDis_IPC *) _t;
+
+  vt102_resize(c,p);
+  ipc_msg_send_setsize (t->s,p);
+
+  return 0;
+}
+
+
+static int
+keydis_ipc_reset (KeyDis * _t, Context * c)
+{
+  KeyDis_IPC *t = (KeyDis_IPC *) _t;
+
+  vt102_reset(c);
+  ipc_msg_send_reset (t->s);
+
+  return 0;
+}
+
 static int
 keydis_vt102_key (KeyDis * _t, Context * c, int key)
 {
@@ -179,6 +211,27 @@ keydis_vt102_hangup (KeyDis * _t, Context * c)
   return 0;
 }
 
+static int
+keydis_vt102_set_size (KeyDis * _t, Context * c,int w, int h)
+{
+  KeyDis_VT102 *t = (KeyDis_VT102 *) _t;
+  CRT_Pos p={w,h};
+  
+  vt102_resize(c,p);
+
+  return 0;
+}
+
+static int
+keydis_vt102_reset (KeyDis * _t, Context * c)
+{
+  KeyDis_VT102 *t = (KeyDis_VT102 *) _t;
+
+  vt102_reset (c);
+
+  return 0;
+}
+
 
 
 KeyDis *
@@ -192,6 +245,8 @@ keydis_vt102_new (void)
   t->set_flow = keydis_vt102_set_flow;
   t->set_ansi = keydis_vt102_set_ansi;
   t->hangup = keydis_vt102_hangup;
+  t->set_size = keydis_vt102_set_size;
+  t->reset = keydis_vt102_reset;
   return (KeyDis *) t;
 }
 
@@ -207,6 +262,8 @@ keydis_ipc_new (Socket * s)
   t->set_flow = keydis_ipc_set_flow;
   t->set_ansi = keydis_ipc_set_ansi;
   t->hangup = keydis_ipc_hangup;
+  t->set_size = keydis_ipc_set_size;
+  t->reset = keydis_ipc_reset;
   t->s = s;
   return (KeyDis *) t;
 }