scsh-checkins
[Top] [All Lists]

[Scsh-checkins] CVS: scx/c/xlib display.c,1.8,1.9

To: scsh-checkins@lists.sourceforge.net
Subject: [Scsh-checkins] CVS: scx/c/xlib display.c,1.8,1.9
From: David Frese <frese@users.sourceforge.net>
Date: Wed, 29 Aug 2001 07:52:46 -0700
List-id: <scsh-checkins.lists.sourceforge.net>
Sender: scsh-checkins-admin@lists.sourceforge.net
Update of /cvsroot/scsh/scx/c/xlib
In directory usw-pr-cvs1:/tmp/cvs-serv4249

Modified Files:
        display.c 
Log Message:
corrected the implementation of the after-function stuff.


Index: display.c
===================================================================
RCS file: /cvsroot/scsh/scx/c/xlib/display.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** display.c   2001/07/31 14:51:21     1.8
--- display.c   2001/08/29 14:52:44     1.9
***************
*** 3,6 ****
--- 3,8 ----
  #include <sys/time.h>
  
+ s48_value internal_after_function_binding = S48_FALSE;
+ 
  // Open_Display(name) name should be a string or S48_FALSE (=> Null)
  s48_value scx_Open_Display (s48_value name) {
***************
*** 19,22 ****
--- 21,40 ----
  }
  
+ 
+ // After-Function routines
+ static X_After_Function(Display* d) {
+   s48_call_scheme(S48_SHARED_BINDING_REF(internal_after_function_binding),
+                 1, SCX_ENTER_DISPLAY(d));
+ }
+ 
+ s48_value scx_Set_After_Function(s48_value Xdisplay, s48_value active) {
+   if (S48_FALSE_P(active))
+     (void)XSetAfterFunction(SCX_EXTRACT_DISPLAY(Xdisplay),
+                           (int (*)())0);
+   else
+     (void)XSetAfterFunction(SCX_EXTRACT_DISPLAY(Xdisplay),
+                           X_After_Function);
+ }
+ 
  // This function returns the file destriptor of the message-channel.
  s48_value scx_Display_Message_fd(s48_value Xdisplay) {
***************
*** 212,215 ****
--- 230,238 ----
  
  void scx_init_display(void) {
+   S48_GC_PROTECT_GLOBAL(internal_after_function_binding);
+   internal_after_function_binding = 
+     s48_get_imported_binding("internal-after-function");
+ 
+   S48_EXPORT_FUNCTION(scx_Set_After_Function);
    S48_EXPORT_FUNCTION(scx_Open_Display);
    S48_EXPORT_FUNCTION(scx_Close_Display);



<Prev in Thread] Current Thread [Next in Thread>
  • [Scsh-checkins] CVS: scx/c/xlib display.c,1.8,1.9, David Frese <=