scsh-checkins
[Top] [All Lists]

[Scsh-checkins] CVS: scx/c/xlib window.c,1.9,1.10

To: scsh-checkins@lists.sourceforge.net
Subject: [Scsh-checkins] CVS: scx/c/xlib window.c,1.9,1.10
From: David Frese <frese@users.sourceforge.net>
Date: Tue, 21 Aug 2001 01:26:56 -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-serv5952

Modified Files:
        window.c 
Log Message:
Abstracted over the input of an XWindowChanges structure as an alist,
to use in scx_Configure_Window as well as in scx_Reconfigure_Wm_Window
(client.c).


Index: window.c
===================================================================
RCS file: /cvsroot/scsh/scx/c/xlib/window.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** window.c    2001/07/31 14:51:21     1.9
--- window.c    2001/08/21 08:26:54     1.10
***************
*** 175,187 ****
  }
  
! s48_value scx_Configure_Window (s48_value Xwindow, s48_value Xdisplay, 
!                           s48_value alist) {
    unsigned long mask = 0;
-   XWindowChanges WC;
    s48_value l, p;
    char* cname;
    int cvalue;
    s48_value name, value;
-   
    for (l = alist; !S48_NULL_P(l); l = S48_CDR(l)) {
      p = S48_CAR(l);
--- 175,184 ----
  }
  
! unsigned long AList_To_XWindowChanges(s48_value alist, XWindowChanges* WC) {
    unsigned long mask = 0;
    s48_value l, p;
    char* cname;
    int cvalue;
    s48_value name, value;
    for (l = alist; !S48_NULL_P(l); l = S48_CDR(l)) {
      p = S48_CAR(l);
***************
*** 192,219 ****
  
      if (strcmp(cname, "x") == 0) {
!       WC.x = cvalue;
        mask |= CWX;
      } else if (strcmp(cname, "y") == 0) {
!       WC.y = cvalue;
        mask |= CWY;
      } else if (strcmp(cname, "width") == 0) {
!       WC.width = cvalue;
        mask |= CWWidth;
      } else if (strcmp(cname, "height") == 0) {
!       WC.height = cvalue;
        mask |= CWHeight;
      } else if (strcmp(cname, "border-width") == 0) {
!       WC.border_width = cvalue;
        mask |= CWBorderWidth;
      } else if (strcmp(cname, "sibling") == 0) {
!       WC.sibling = (Window)s48_extract_integer(value);
        mask |= CWSibling;
      } else if (strcmp(cname, "stack-mode") == 0) {
!       WC.stack_mode = cvalue;
        mask |= CWStackMode;
      }
    } // for
  
!   XConfigureWindow 
(SCX_EXTRACT_DISPLAY(Xdisplay),SCX_EXTRACT_WINDOW(Xwindow), 
                    mask, &WC);
    return S48_UNSPECIFIC;
--- 189,223 ----
  
      if (strcmp(cname, "x") == 0) {
!       WC->x = cvalue;
        mask |= CWX;
      } else if (strcmp(cname, "y") == 0) {
!       WC->y = cvalue;
        mask |= CWY;
      } else if (strcmp(cname, "width") == 0) {
!       WC->width = cvalue;
        mask |= CWWidth;
      } else if (strcmp(cname, "height") == 0) {
!       WC->height = cvalue;
        mask |= CWHeight;
      } else if (strcmp(cname, "border-width") == 0) {
!       WC->border_width = cvalue;
        mask |= CWBorderWidth;
      } else if (strcmp(cname, "sibling") == 0) {
!       WC->sibling = (Window)s48_extract_integer(value);
        mask |= CWSibling;
      } else if (strcmp(cname, "stack-mode") == 0) {
!       WC->stack_mode = cvalue;
        mask |= CWStackMode;
      }
    } // for
+   return mask;
+ }
+ 
+ s48_value scx_Configure_Window (s48_value Xwindow, s48_value Xdisplay, 
+                           s48_value alist) {
+   XWindowChanges WC;
+   unsigned long mask = AList_To_XWindowChanges(alist, &WC);
  
!   XConfigureWindow (SCX_EXTRACT_DISPLAY(Xdisplay), 
SCX_EXTRACT_WINDOW(Xwindow), 
                    mask, &WC);
    return S48_UNSPECIFIC;



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