xwem-patches
[Top] [All Lists]

Summary for xlib--main--2.2--patch-6

From: Zajcev Evgeny <lg@xxxxxxxx>
Subject: Summary for xlib--main--2.2--patch-6
Date: Fri, 23 Sep 2005 00:33:14 +0400
Location: lg@xxxxxxxxxxxxxx http://arch.xwem.org/2005/

Revision: xlib--main--2.2--patch-6
Archive: lg@xxxxxxxxxxxxxx
Creator: Zajcev Evgeny <lg@xxxxxxxx>
Date: Fri Sep 23 00:33:11 MSD 2005
Standard-date: 2005-09-22 20:33:11 GMT
Modified-files: lisp/xlib-xlib.el
New-patches: lg@xxxxxxxxxxxxxx/xlib--main--2.2--patch-6
Summary: Compatible cursor creation
Keywords: cursor

* lisp/xlib-xlib.el (XCreateGlyphCursor): [change] Now accept list of
  keyword/values instead of already created cursor.  This is need to
  compat with xlib-ffi

* lisp/xlib-xlib.el (XCreateFontCursor): [new] Function to create simple
  cursors.


* added files

    {arch}/xlib/xlib--main/xlib--main--2.2/lg@xxxxxxxxxxxxxx/patch-log/patch-6

* modified files

--- orig/lisp/xlib-xlib.el
+++ mod/lisp/xlib-xlib.el
@@ -2124,7 +2124,7 @@
                      [4 length-2]      ;length
                      [24 nil]          ;pad
                      [count            ;list of the children
-                      (make-list length-1 [4 integerp])]))))
+                      (make-list length-1 [4 numberp])]))))
 
     (X-Dpy-send-read xdpy msg ReceiveFields)))
 
@@ -2335,23 +2335,29 @@
         (msg (X-Create-message ListOfFields)))
     (X-Dpy-send xdpy msg)))
 
-(defun XCreateGlyphCursor (xdpy cursor)
-  "On display XDPY create CURSOR.
-CURSOR is `X-Cursor' structure."
+(defun XCreateGlyphCursor (xdpy &rest cursor-attrs)
+  "On display XDPY create cursor with CURSOR-ATTRS.
+Return newly created cursor."
   (X-Dpy-p xdpy 'XCreateGlyphCursor)
-  (X-Cursor-p cursor 'XCreateGlyphCursor)
 
-  (unless (X-Cursor-id cursor)
-    (setf (X-Cursor-id cursor) (X-Dpy-get-id xdpy)))
-
-  (let* ((attrmsg (X-Cursor-message cursor))
+  (let* ((cursor (apply #'make-X-Cursor :id (X-Dpy-get-id xdpy) :dpy xdpy 
cursor-attrs))
+         (attrmsg (X-Cursor-message cursor))
         (ListOfFields
          (list [1 94]                  ;opcode
                [1 nil]                 ;pad
                [2 (+ 2 (/ (length attrmsg) 4))] ;length
                [4 (X-Cursor-id cursor)])) ;cursor id
         (msg (concat (X-Create-message ListOfFields) attrmsg)))
-    (X-Dpy-send xdpy msg)))
+    (X-Dpy-send xdpy msg)
+    cursor))
+
+(defun XCreateFontCursor (xdpy chr)
+  (XCreateGlyphCursor xdpy :source (X-Font-get xdpy "cursor")
+                      :mask (X-Font-get xdpy "cursor")
+                      :src-char chr
+                      :msk-char (1+ chr)
+                      :fgred 0 :fggreen 0 :fgblue 0
+                      :bgred 65535 :bggreen 65535 :bgblue 65535))
 
 (defun XFreeCursor (xdpy cursor)
   "On display XDPY free resources associated with CURSOR."




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