xwem-patches
[Top] [All Lists]

Summary for xlib-ffi--main--1.0--patch-3

From: Zajcev Evgeny <lg@xxxxxxxx>
Subject: Summary for xlib-ffi--main--1.0--patch-3
Date: Wed, 22 Mar 2006 01:43:54 +0300
Sender: xwem-patches-bounces@xxxxxxxx
Location: lg@xxxxxxxxxxxxxx http://arch.xwem.org/2005/

Revision: xlib-ffi--main--1.0--patch-3
Archive: lg@xxxxxxxxxxxxxx
Creator: Zajcev Evgeny <lg@xxxxxxxx>
Date: Wed Mar 22 01:43:52 MSK 2006
Standard-date: 2006-03-21 22:43:52 GMT
Modified-files: lisp/xlib-xlib.el lisp/xlib-xtest.el
New-patches: lg@xxxxxxxxxxxxxx/xlib-ffi--main--1.0--patch-3
Summary: fixes XDrawArcs, and extends X-XTest-FakeInput
Keywords: arcs, xtest

* lisp/xlib-xlib.el (X:make-arcs): [fix] Fill correct angles.

* lisp/xlib-xtest.el (X:TestFakeButtonEvent): [new]

* lisp/xlib-xtest.el (X-XTest-FakeInput): [addon] Support for mouse
  events as well as keyboad

* added files

    
{arch}/xlib-ffi/xlib-ffi--main/xlib-ffi--main--1.0/lg@xxxxxxxxxxxxxx/patch-log/patch-3

* modified files

--- orig/lisp/xlib-xlib.el
+++ mod/lisp/xlib-xlib.el
@@ -1242,9 +1242,9 @@
       (setq off (+ off (ffi-size-of-type 'unsigned-short)))
       (ffi-store arcs off 'unsigned-short (X-Arc-height (car xarcs)))
       (setq off (+ off (ffi-size-of-type 'unsigned-short)))
-      (ffi-store arcs off 'short (X-Arc-angle1 (car xarcs)))
+      (ffi-store arcs off 'short (* 64 (X-Arc-angle1 (car xarcs))))
       (setq off (+ off (ffi-size-of-type 'short)))
-      (ffi-store arcs off 'short (X-Arc-angle2 (car xarcs)))
+      (ffi-store arcs off 'short (* 64 (X-Arc-angle2 (car xarcs))))
       (setq off (+ off (ffi-size-of-type 'short)))
       (setq xarcs (cdr xarcs)))
     arcs))


--- orig/lisp/xlib-xtest.el
+++ mod/lisp/xlib-xtest.el
@@ -51,18 +51,28 @@
   (is_press Bool)
   (delay unsigned-long))
 
-(defun X-XTest-FakeInput (xdpy evtype detail root rootx rooty &optional time)
+(define-xlib-function X:TestFakeButtonEvent void
+  (dpy (pointer Display))
+  (button unsigned-int)
+  (is_press Bool)
+  (delay unsigned-long))
+
+(defun-x11 X-XTest-FakeInput (xdpy evtype detail &optional root rootx rooty 
time)
   "On display XDPY send fake event of EVTYPE with DETAIL after TIME delay.
 If TIME is X-CurrentTime - fake the event with no delay.
 EVTYPE is one of X-Xtest-KeyPress or X-Xtest-KeyRelease, other event
 types are not supported."
   (X-Dpy-p xdpy 'X-XTest-FakeInput)
-
-  (unless (memq evtype (list X-Xtest-KeyPress X-Xtest-KeyRelease))
-    (error "Unsupported event type" evtype))
-
-  (X:TestFakeKeyEvent xdpy detail (if (= evtype X-Xtest-KeyPress) X-True 
X-False)
-                      time))
+  (unless time (setq time X-CurrentTime))
+  (cond ((memq evtype (list X-Xtest-KeyPress X-Xtest-KeyRelease))
+         (X:TestFakeKeyEvent xdpy detail (if (= evtype X-Xtest-KeyPress)
+                                             X-True X-False)
+                             time))
+        ((memq evtype (list X-Xtest-ButtonPress X-Xtest-ButtonRelease))
+         (X:TestFakeButtonEvent xdpy detail (if (= evtype X-Xtest-ButtonPress)
+                                                X-True X-False)
+                                time))
+        (t (error "Unsupported event type" evtype))))
 
 (provide 'xlib-xtest)
 



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