xwem-devel
[Top] [All Lists]

Summary for xlib--main--2.1--patch-9

From: Zajcev Evgeny <lg@xxxxxxxx>
Subject: Summary for xlib--main--2.1--patch-9
Date: Mon, 14 Feb 2005 02:02:50 +0300 (MSK)
Location: lg@xxxxxxxxxxxxxx http://arch.xwem.org/2005/

Revision: xlib--main--2.1--patch-9
Archive: lg@xxxxxxxxxxxxxx
Creator: Zajcev Evgeny <lg@xxxxxxxx>
Date: Mon Feb 14 02:02:44 MSK 2005
Standard-date: 2005-02-13 23:02:44 GMT
Modified-files: lisp/xlib-const.el lisp/xlib-xlib.el
    lisp/xlib-xr.el
New-patches: lg@xxxxxxxxxxxxxx/xlib--main--2.1--patch-9
Summary: Useful addons
Keywords: XDeleteProperty, XSetWindowBackgroundPixmap, XSetPropertyString

* lisp/xlib-xlib.el (XDeleteProperty): [new] X request to delete X
  property.

* lisp/xlib-xlib.el (XSetWindowBackgroundPixmap): [new] Set window
  background pixmap.

* lisp/xlib-xlib.el (XSetPropertyString): [new] To set textual X
  properties.

* lisp/xlib-xr.el (X-EventsList): [fix] sanitify creation.

* lisp/xlib-const.el (errors): [addon] X error codes added.

* added files

    {arch}/xlib/xlib--main/xlib--main--2.1/lg@xxxxxxxxxxxxxx/patch-log/patch-9

* modified files

--- orig/lisp/xlib-const.el
+++ mod/lisp/xlib-const.el
@@ -575,6 +575,27 @@
 (defconst X-LSBFirst 0)
 (defconst X-MSBFirst 1)
 
+;; X errors
+(defconst X-BadRequest 1)
+(defconst X-BadValue 2)
+(defconst X-BadWindow 3)
+(defconst X-BadPixmap 4)
+(defconst X-BadAtom 5)
+(defconst X-BadCursor 6)
+(defconst X-BadFont 7)
+(defconst X-BadMatch 8)
+(defconst X-BadDrawable 9)
+(defconst X-BadAccess 10)
+(defconst X-BadAlloc 11)
+(defconst X-BadColor 12)
+(defconst X-BadGC 13)
+(defconst X-BadIDChoice 14)
+(defconst X-BadName 15)
+(defconst X-BadLength 16)
+(defconst X-BadImplementation 17)
+(defconst X-BadFirstExtension 128)
+(defconst X-BadLastExtension 255)
+
 
 (provide 'xlib-const)
 


--- orig/lisp/xlib-xlib.el
+++ mod/lisp/xlib-xlib.el
@@ -264,9 +264,9 @@
   "On display XDPY for window WIN, set the background to PIXEL."
   (XChangeWindowAttributes xdpy win (make-X-Attr :background-pixel pixel)))
 
-;(defun X-SetWindowForeground (xdpy win pixel)
-;  "On display XDPY for window WIN, set the foreground to PIXEL."
-;  (XChangeWindowAttributes xdpy win (make-X-Attr :foreground-pixel pixel)))
+(defun XSetWindowBackgroundPixmap (xdpy win pixmap)
+  "On display XDPY for window WIN, set the background pixmap to PIXMAP."
+  (XChangeWindowAttributes xdpy win (make-X-Attr :background-pixmap pixmap)))
   
 (defun XSetWindowBorder (xdpy win pixel)
   "On display XDPY for window WIN, set the border color to PIXEL."
@@ -559,8 +559,25 @@
                data (cdr data)))))
     (X-Dpy-send xdpy (X-Create-message ListOfFields))))
 
+(defun XDeleteProperty (xdpy win atom)
+  "On display XDPY for window WIN delete property denoted by ATOM."
+  (X-Win-p win 'XDeleteProperty)
+  (X-Atom-p atom 'XDeleteProperty)
+
+  (let ((ListOfFields
+         (list [1 19]                  ;opcode
+               [1 nil]                  ;unused
+               [2 3]                    ;length
+               [4 (X-Win-id win)]       ;window
+               [4 (X-Atom-id atom)])))  ;atom
+    (X-Dpy-send xdpy (X-Create-message ListOfFields))))
+
 ;; These are Xlib convenience routines
-;;
+(defun XSetPropertyString (xdpy win atom string &optional mode)
+  "On display XDPY and window WIN set ATOM property to STRING."
+  (XChangeProperty xdpy win atom XA-string X-format-8 (or mode 
X-PropModeReplace)
+                   string))
+
 (defun XSetWMProtocols (xdpy win protocol_atoms)
   "On display XDPY, set window's WIN protocols to PROTOCOL_ATOMS.
 Convenience routine which calls `XChangeProperty'"
@@ -1448,7 +1465,7 @@
   ;; Check len, must be < 255
   (when (or (and len (>= len 255))
            (>= (length str) 255))
-    (signal 'overflow-error (list str (or len (length str)))))
+    (setq str (substring str 0 254)))
 
   (let* ((slen (if len len (length str))) ;make len optional
         (ListOfFields


--- orig/lisp/xlib-xr.el
+++ mod/lisp/xlib-xr.el
@@ -72,7 +72,7 @@
 NOTE: * Core event are less than 35, but extensions may generate greater.
       * Eight bit is syntetic bit.")
 
-(defvar X-EventsList (make-vector X-Event-LASTEvent nil)
+(defvar X-EventsList (make-vector X-Event-LASTEvent ["Unknown" nil 0 0])
   "List of event descriptions.")
 
 (defstruct (X-Event (:predicate X-Event-isevent-p))




<Prev in Thread] Current Thread [Next in Thread>
  • Summary for xlib--main--2.1--patch-9, Zajcev Evgeny <=